/**************************************************************************** * * LiveAct(R) PRO * Framework * * (c) 2016 CRI Middleware Co., Ltd. * Version : 1.99.674.0 * ****************************************************************************/ "use strict"; var CriLaPlayTrigger={TAP:"tap",AUTO:"auto",SCROLL:"scroll",UNMUTETAP:"tap-unmute",SCRIPT:"script"};var CriLaPlayerType={NORMAL:"2d",WEBGL:"webgl"};var CriLaBaseURL={CURRENT:"./",LJT_LOCATION:"[LA_LJT_LOCATION]",LJT_LOCATION_REGEX:/\[LA_LJT_LOCATION\]/g};CriLaBaseURL.DEFAULT=CriLaBaseURL.LJT_LOCATION;function CriLaFw(){}CriLaFw.isScriptLoaded=false;CriLaFw.playCount_=0;CriLaFw.contentList_=[];CriLaFw.playerList_=[];CriLaFw.isFirstPlayList_=[];CriLaFw.loopStartFrame_=0;CriLaFw.debug={};CriLaFw.firstLuminunceAdjustOptions=null;CriLaFw.luminunceAdjust=null;CriLaFw.parentDivList_=[];CriLaFw.isStartLoaded_=false;CriLaFw.playerContexts_={};CriLaFw.questionnaire_=[];CriLaFw.cognition_=[];CriLaFw.getPlayerByIndex=function(a){var b=null;var c=CriLaFw.contentList_[a];if(c!=null){b=c.getPlayer()}return b};CriLaFw.getNumPlayers=function(){return CriLaFw.contentList_.length};CriLaFw.getNumPlayer=CriLaFw.getNumPlayers;CriLaFw.getPlayCount=function(){return CriLaFw.playCount_};CriLaFw.getPlayerIndex_=function(c){var d=CriLaFw.getNumPlayers();for(var b=0;b100){j=100}else{if(j===-0){j=0}}}return j}function e(j){var k=j.map(function(m){var l=m.getAttribute("data-load-priority");if(l==null||l==""){l="50"}l=i(l);return new a(m,l)});k.sort(g);return k}function c(j){if(j===undefined){return true}return j.every(function(k){return k.player.isCompleteCurrentScene()})}function h(l){var m=new Array();var k=l[0].priority;m.push(l[0]);l.shift();for(var j=0;j1){h.url=f[1].trim()}}if("target" in k){h.target=k.target}if(h.url!=""){return h}try{var c="{"+i+"}";var j=[["'",'"']];j.forEach(function(m){var n=m[0];var l=m[1];var e=new RegExp(n,"g");c=c.replace(e,l)});var d=JSON.parse(c);h.url=d.url;h.target=d.target}catch(g){h.url=i}return h};a.parsePlayableBuffer_=function(e,f){var d=f.getAttribute("data-playable-buffer");if(d){var h=void (0);var g=void (0);var i=d||"";var c=/^(.+)(ms|%)$/;var b=i.match(c);if(b){h=parseInt(b[1],10);g=b[2];if(isNaN(h)){h=void (0);g=void (0)}}else{g=void (0);h=parseInt(i,10);if(isNaN(h)){h=void (0)}}e.setPlayableBufferSize(h,g)}};a.createOptions_=function(d){var c={};var b=d.getAttribute("data-frameblend")==="true";c.frameblend=b;c.async=true;return c};a.loadLjt_=function(k,j){if(CriLaFw.setResourceLoadQueue_==true){k.setVideoPreloadType("metadata");k.enableRequestLoadResource(false)}var c=j.getAttribute("data-play-trigger");if(c===CriLaPlayTrigger.SCRIPT){k.enableTapPlay(false)}this.parsePlayableBuffer_(k,j);var h=false;var e=j.getAttribute("data-ljt-variable");var f=j.getAttribute("data-ljt-url");if(e!=null&&f!=null){return}var g=CriLaBaseURL.LJT_LOCATION_REGEX;var i=CriLaBaseURL.CURRENT;if(e==null&&f!=null){i=CriLaURL.getDirectory(f)}var d=j.getAttribute("data-base-url")||CriLaBaseURL.DEFAULT;var b=k.getSharedResourcesBaseURL();b=b||CriLaBaseURL.DEFAULT;b=j.getAttribute("data-shared-base-url")||b;d=d.replace(g,i);b=b.replace(g,i);k.setResourcesBaseURL(d);k.setSharedResourcesBaseURL(b);var l=this.createOptions_(j);if(e!=null){h=k.loadLjtFromString(window[e],l)}else{if(f!=null){h=k.loadLjt(f,l)}}if(h==false){console.warn("「ljt」の読み込みに失敗しました。\n正しいljtフォーマットでない可能性があります。");return null}if(e!=null){k.requestLoadResourcesCurrentScene()}};a.loadResources_=function(c,d){var f=d.getAttribute("data-loop");if(f){var b=(f==="true");c.setLoopFlg(b)}var e=d.getAttribute("data-loop-start");if(e){var g=this.getFrameByString(e,c);this.setLoopStart(c,g)}this.setupPlayerSize_();if(CriLaFw.setResourceLoadQueue_==false){c.requestLoadResources()}};a.configPlayer_=function(){var w=this.player_;var e=this.element_;var y=this.play_trigger_;var l=this.jump_url_;var q=this.jump_target_;var s=this.content_type_;var v=this.start_frame_;var b=this.swipe_direction_;var c=this.autoplay_duration_;var u=this.autoplay_type_;var i=this.set_prevent_scroll_;var t=this.swipe_angle_limit_str_;var h=this.scroll_to_play_enabled_;var m=this.skip_backward_time_ms_;var r=this.skip_forward_time_ms_;var p=this.luminance_adjust_;var f=this.questionnaire_option_;if(CriLaFw.memoryReduction==true){w.setMemoryReduction(true)}if(y!=CriLaPlayTrigger.TAP&&this.canAutoPlayMP4()){w.setControlStyle({screenPlayButton:false})}var o=e.getAttribute("data-clickable-map");if(o!=null){CriLaFw.setClickableMap(w,o)}if((y===CriLaPlayTrigger.AUTO)&&(s!=="rotate360")){w.play()}else{w.pause()}if(y===CriLaPlayTrigger.TAP){w.enableTapPlay(true)}if(y===CriLaPlayTrigger.UNMUTETAP){w.enableTapPlay(true);w.addEventListener(CriLaEvent.FIRST_PLAY_START,function(){w.mute(false)})}var g=w.getStreamType();var k=false;if(f==""){k=CriLaFw.setupJumpURL(w,l,q)}if(s=="rotate360"){w.enableTapPlay(false);CriLaFw.setup360Rotate(w,v,b,c,u,i,t)}else{if(s=="fullscreen-FAR"){this.setupFullscreenFAR(w)}else{if(s=="allaround-sphere"){CriLaFw.setupAllaroundSphere(w,i,e,p)}}}if((h=="true"||y==CriLaPlayTrigger.SCROLL)&&s!="rotate360"){this.setupScrollToPlay()}if(m!==null){var d=Number(m);if(!isNaN(d)){w.setSkipBackwardTimeMs(d)}}if(r!==null){var d=Number(r);if(!isNaN(d)){w.setSkipForwardTimeMs(d)}}var j=e.getAttribute("data-control-style")||"";this.setupControlStyle(w,j);var n=e.getAttribute("data-overlay-style")||"";this.setupOverlayStyle(w,n);var x=e.getAttribute("data-preload")||"";this.setupPreload(w,x);switch(s){case"rotate360":case"allaround-sphere":w.enableGrabCursor();break}};a.setupPlayerSize_=function(){var c=this.player_;var b=c.getCanvas();if(b.width<=0||b.height<=0){c.resizeCanvasToCurrentScene(CriLaCanvasResolutionUsage.ATTRIBUTE)}};a.createCanvas=function(f,e,b,d){var c=document.createElement("canvas");c.id=f;c.width=e;c.height=b;c.style.width="100%";d.appendChild(c);CriLaEventDispatcher.global.dispatchEvent(new CriLaPolyfill.Event.CustomEvent("domchanged"));return c};a.setupScrollToPlay=function(){var d=this.player_;var c=false;var e=d.getCanvas();d.pause();var b=function(){if((d.isPaused()||d.isStopped())&&!c){d.play();c=true}};var f=function(){if((d.isPaused()||d.isStopped())==false){d.pause();c=false}};d.addEventListener(CriLaEvent.SCROLL_IN,b);d.addEventListener(CriLaEvent.SCROLL_OUT,f)};a.setupFullscreenFAR=function(b){CriLaEventDispatcher.global.addEventListener("resize",function(){a.resizeCanvasFullScreenFAR(b)},false);this.resizeCanvasFullScreenFAR(b)};a.setupControlStyle=function(b,d){var c=CriLaData.Dict.fromString(";",":",d);b.setControlStyle(c)};a.setupOverlayStyle=function(b,d){var c=CriLaData.Dict.fromString(";",":",d);b.setOverlayStyle(c);this.initialOverlayStyle_=b.getOverlays().getOverlayStyle()};a.getInitialOverlayStyle=function(){return this.initialOverlayStyle_};a.setupPreload=function(c,d){var b=CriLaData.Dict.fromString(";",":",d);c.setPreload(b)};a.getSwipeHintFirstShowStatus=function(b){return this.swipeHintFirstShowStatus_[b]!==undefined?this.swipeHintFirstShowStatus_[b]:null};a.stepSwipeHintFirstShowStatus=function(b){if(this.swipeHintFirstShowStatus_[b]===undefined){return}if(this.getSwipeHintFirstShowStatus(b)=e;if(c){f.resizeCanvasToFixedRatioWidth("100vw")}else{f.resizeCanvasToFixedRatioHeight("100vh")}};a.getFrameByString=function(f,b){var c=f.match(/(\d+)(.*)/);var e=0;if(c.length>1){e=Number(c[1])}if(c.length>2){if(c[2]=="ms"){var d=b.getCurrentSceneFrameRate();e=e/1000*d}}return e};a.setLoopStart=function(b,c){b.addEventListener("ended",function(){b.setFrame(c);b.play()});b.setLoopFlg(false)};a.canAutoPlayMP4=function(){var d=CriUAChecker.getOS();var c=false;if(CriUAOS.Windows==d){c=true}else{if(CriUAOS.macOS==d){c=true}else{if(CriUAOS.iOS==d){var b=CriUAChecker.getOSVersion();if(b>=10){c=true}}else{if(CriUAOS.Android==d){if(CriUAChecker.getBrowser()==CriUABrowser.Chrome){if(CriUAChecker.getBrowserVersion()>=53){c=true}}}}}}return c}})(CriLaC400.prototype);CriLaFw.loadResourceContentsList_=[];CriLaFw.queueSize_=3;CriLaFw.setResourceLoadQueue_=false;CriLaFw.bfcacheFirstVideoLoadStartCount=8;CriLaFw.bfcacheRemainingVideoLoadStartCount=16;CriLaFw.bfcacheRestorePollingTimeMs=33;CriLaFw.bfcacheJumpWaitTimeMs=300;CriLaFw.updateLoadResourcePlayerDebounceTimeMs=33;CriLaFw.requestPageJump_=false;CriLaFw.bfcacheRestore=function(){var b=0;function a(){if(b==CriLaFw.bfcacheFirstVideoLoadStartCount){CriLaFw.requestPageJump_=false;var c=CriLaFw.loadResourceContentsList_[0].getPlayer();c.loadCurrentSceneResourcesAll()}if(b>=CriLaFw.bfcacheRemainingVideoLoadStartCount){CriLaFw.loadResourceContentsList_.slice(1).forEach(function(e){var d=e.getPlayer();d.loadCurrentSceneResourcesAll()})}else{b++;setTimeout(a,CriLaFw.bfcacheRestorePollingTimeMs)}}if(CriLaFw.loadResourceContentsList_.length>0){setTimeout(a,CriLaFw.bfcacheRestorePollingTimeMs)}};CriLaFw.getSortedContentsList=function(){function b(f,d){var e=f.getPlayer().getDistanceFromViewport();var c=d.getPlayer().getDistanceFromViewport();var g=e[1]-c[1];if(g===0){g=e[3]-c[3]}return g}var a=CriLaFw.contentList_.concat();a=a.filter(function(c){return c.isLjtLoaded});a.sort(b);return a};CriLaFw.updateLoadResourcePlayer=function(){var b=CriLaFw.loadResourceContentsList_;var f=CriLaFw.getSortedContentsList();var e=b.slice(0,CriLaFw.queueSize_);var a=f.slice(0,CriLaFw.queueSize_);var d=e.filter(function(g){return a.indexOf(g)===-1});var c=a.filter(function(g){return e.indexOf(g)===-1});d.forEach(function(h){var g=h.getPlayer();g.unloadVideoResource()});c.forEach(function(h){var g=h.getPlayer();g.loadCurrentSceneResourcesAll()});CriLaFw.loadResourceContentsList_=a};CriLaFw.setLoadQueueSize=function(a){CriLaFw.queueSize_=isNaN(a)==false?a:CriLaFw.queueSize_;CriLaFw.setResourceLoadQueue_=true;window.addEventListener("scroll",CriLaFunctional.debounce(CriLaFw.updateLoadResourcePlayerDebounceTimeMs,function(){CriLaEventDispatcher.global.dispatchEvent(new CriLaPolyfill.Event.CustomEvent("domchanged"));CriLaFw.updateLoadResourcePlayer()}))};CriLaFw.unloadResourcePlayer=function(){CriLaFw.loadResourceContentsList_.forEach(function(b){var a=b.getPlayer();a.setPageJumpMode();a.unloadVideoResource()})};CriLaFw.setupAllaroundSphere=function(G,a,t,d){var f=G.canvas_;G.enableEveryFrameDrawing(true);var y=true;var r=this.setAllaroundViewUI(G,f);var K=t.getAttribute("data-rotate")||"";try{var A=CriLaFw.parseRotateAllaroundSphere_(K)}catch(J){console.warn("data-rotate 属性値が不正です")}var s=t.getAttribute("data-view-angle")||"";var b=CriUnitValue.parseAngleToRadian(s);if(b!==0){CriLaFw.setViewAngle(G,b)}var I=G.getWorldMatrix();var x=G.getCamera().getViewMatrix();CriLaFw.setupAutoLuminanceAdjust(G,d);G.getCamera().position_.z=0;G.getCamera().update();var j=G.getContext();j.cullFace(j.FRONT);j.disable(j.DEPTH_TEST);var u=null;u=f;G.enableTapPlay(false);G.addEventListener(CriLaEvent.CAN_PLAY,function(){var e=G.getModel();if(e){var L=e.getMaterialByIndex(0);L.setUvMatrix([-1,0,0,1,0,1,0,0])}});var v=m();var g=null;function F(N){var M=N.detail.timeStamp;if(g===null){g=M}var L=M-g;g=M;var e=G.getStatus();if(e==CriLaPlayStatus.STOP){return}v=m();h(L)}G.addEventListener(CriLaEvent.MAIN_LOOP,F);function h(N){if(D==null){return}D.updateInertia(N);var M=D.getInertia();var P=D.isDown();if(P==false){var L=CriGrxVector2_Scale(M,N);var O=CriGrxVector2_Scale(L,v);var e=r.rot;e=CriGrxVector2_Add(e,O);H(e);r.rot=e}}function m(){var e=0.5;var N=G.getCanvas();var M=CriLaHtmlCss.getElementWidthHeight(N);var L=M.getWidth();if(L<=0){return 0}e=720/L;e*=0.002;e*=-1;e*=(r.viewAngle/CriLaC403.DEFAULT_VIEW_ANGLE);return e}function l(e){I.setIdentity();I.rotateY(e+A.y);return e}function E(L,e){I.setIdentity();I.rotateY(e+A.y);I.rotateX(L+A.x)}function H(e){if(r.gyroSensorEnabled){l(e.x+e.y)}else{E(e.y,e.x)}}function k(e){CriLaFw.terminateFirstShowSwipeHint(G)}function B(M){if(y){M.preventDefault()}var L=M.getMoveValue();var N=CriGrxVector2_Scale(L,v);var e=r.rot;e=CriGrxVector2_Add(e,N);H(e);r.rot=e}function o(e){}function p(e){e.preventDefault()}function c(e){e.preventDefault();CriLaFw.scaleViewAngle_(G,1/e.getScale())}function q(e){}var D=new CriLaC401();D.initialize(f);D.addEventListener("swipebegin",k);D.addEventListener("swipe",B);D.addEventListener("swipeend",o);D.addEventListener("pinchbegin",p);D.addEventListener("pinch",c);D.addEventListener("pinchend",q);var z=function(){CriLaFw.firstShowSwipeHint(G)};G.addEventListener(CriLaEvent.SCROLL_IN,z);if(typeof(f.onmousedown)!=="undefined"){f.addEventListener("wheel",n,false)}function n(L){if(!CriLaFw.swipeZoom){return}L.preventDefault();var e=L.deltaY>0?1.05:1/1.05;CriLaFw.scaleViewAngle_(G,e)}function w(L){if(r.gyroSensorEnabled==false){return}var e=(L.beta);var N=L.alpha;var M=-L.gamma;e=CriGrxMath.degreeToRadian(e);N=CriGrxMath.degreeToRadian(N);M=CriGrxMath.degreeToRadian(M);C(e,N,M)}function C(e,M,L){if(e==0&&M==0&&L==0){return}x.setIdentity();x.rotateX(-Math.PI/2);if(window.orientation!=null){x.rotateY(CriGrxMath.degreeToRadian(-window.orientation))}x.rotateZ(L);x.rotateX(e);x.rotateY(M);x.transpose();x.translateXYZ(0,0,-1)}if(window.DeviceOrientationEvent){var i=false;window.addEventListener("deviceorientation",function(e){if(e.alpha===null||e.beta===null||e.gamma===null){return}if(!i){G.setControlStyle({gyro:true});i=true}w(e)})}return G};CriLaFw.setupAutoLuminanceAdjust=function(a,d){if(d=="none"){return}var c=a.getContext();var b=CriLaFw.getLuminanceAdjustAnalysisArea(c);a.setupLuminanceAdjust(b);a.setLuminanceAdjustMode(d)};CriLaFw.getLuminanceAdjustAnalysisArea=function(g){if(CriLaFw.AutoLuminanceAdjustCropArea){return CriLaFw.AutoLuminanceAdjustCropArea}var d=g.drawingBufferWidth;var e=g.drawingBufferHeight;var c=0.3;var f=d*c;var b=e*c;var a=(d-f)/2;var h=(e-b)/2;return CriLaRectangle.createFromXYWH(a,h,f,b)};function CriLaC403(){this.gyroSensorEnabled=false;this.viewAngle_=CriLaC403.DEFAULT_VIEW_ANGLE;this.rot=new CriGrxVector2()}CriLaC403.DEFAULT_VIEW_ANGLE=CriGrxMath.degreeToRadian(60);CriLaC403.VIEW_ANGLE_MIN=CriGrxMath.degreeToRadian(10);CriLaC403.VIEW_ANGLE_MAX=CriGrxMath.degreeToRadian(100);Object.defineProperty(CriLaC403.prototype,"viewAngle",{get:function(){return this.viewAngle_},set:function(a){this.viewAngle_=CriGrxMath.clamp(CriLaC403.VIEW_ANGLE_MIN,CriLaC403.VIEW_ANGLE_MAX,a)},enumerable:true});CriLaFw.setAllaroundViewUI=function(f,c){var a=CriLaFw.getPlayerIndex_(f);var e=new CriLaC403();CriLaFw.playerContexts_[a]=e;if(f.isEnabledControlTemplate()===true){f.setupTemplateControl()}else{f.setupAllaroundControl()}f.setupAllaroundOverlay();var b=f.getControls();b.addEventListener(CriLaControlEvent.GYRO_BUTTON_CLICKED,function(){d()});f.addEventListener(CriLaEvent.GYRO_CHANGE,function(){b.setButtonState(CriLaControlComponentName.GYRO_BUTTON,e.gyroSensorEnabled)});b.addEventListener(CriLaControlEvent.ZOOM_IN_BUTTON_PRESSED,function(h){g(-1)});b.addEventListener(CriLaControlEvent.ZOOM_OUT_BUTTON_PRESSED,function(h){var i=CriGrxMath.degreeToRadian(0.5);g(+1)});CriLaFw.setViewAngle(f,e.viewAngle);function g(h){CriLaFw.stepViewAngle_(f,g.STEP_VIEW_ANGLE*h)}g.STEP_VIEW_ANGLE=CriGrxMath.degreeToRadian(0.5);function d(){if(!e.gyroSensorEnabled){e.gyroSensorEnabled=true}else{if(e.gyroSensorEnabled){var h=new CriGrxVector3();var j=new CriGrxVector3();var k=new CriGrxVector3();h.setXYZ(0,0,0);j.setXYZ(0,0,-1);k.setXYZ(0,1,0);var i=f.getCamera().getViewMatrix();i.setIdentity();i.lookAtRH(h,j,k);e.gyroSensorEnabled=false}}f.dispatchEvent(CriLaEvent.GYRO_CHANGE)}return e};CriLaFw.setViewAngle=function(b,c){if(b.getCamera){var a=CriLaFw.getContext(b);a.viewAngle=c;b.getCamera().setViewAngle(c)}};CriLaFw.stepViewAngle_=function(c,a){if(c.getCamera){var b=CriLaFw.getContext(c);this.setViewAngle(c,b.viewAngle+a)}};CriLaFw.scaleViewAngle_=function(b,c){if(b.getCamera){var a=CriLaFw.getContext(b);this.setViewAngle(b,a.viewAngle*c)}};CriLaFw.enableGyroSensor=function(c,a){var b=CriLaFw.getContext(c);if("gyroSensorEnabled" in b){b.gyroSensorEnabled=Boolean(a)}};CriLaFw.parseRotateAllaroundSphere_=function(b){var c=new CriGrxVector3();if(b){var a=JSON.parse(b.toLowerCase());["x","y","z"].forEach(function(d){c[d]=CriUnitValue.parseAngleToRadian(a[d])})}return c};function CriLaFwSwipe(){}CriLaFw.setup360Rotate=function(M,H,d,D,w,a,C){var o=M.getCurrentSceneLength();var v=function(){return CriLaFw.preventScroll==null?a:CriLaFw.preventScroll};if(CriLaFw.getContext(M).cosineSwipeLimit==null){CriLaFw.setSwipeAngleLimit(M,0)}if(C){var O=C;var f=CriUnitValue.parseAngleToRadian(O);CriLaFw.setSwipeAngleLimit(M,f)}var B=CriGrxVector2.createFromXY(0,1);var e=function(P){var R=CriGrxVector2_Div(P,P.getLength());var S=CriGrxVector2_Dot(B,R);S=Math.abs(S);var Q=CriLaFw.getContext(M);var T=Q.cosineSwipeLimit;return T-S>=0.001};M.setFrame(H);var g=M.getCanvas();var F=1;if(d==="right"){F=-1}else{if(d==="left"){F=+1}}CriLaFw.setupSwipeUI(M);var b=false;var A=new CriLaC401();A.initialize(g);A.addEventListener("swipebegin",k);A.addEventListener("swipe",x);A.addEventListener("swipeend",m);A.addEventListener("pinchbegin",n);A.addEventListener("pinch",c);A.addEventListener("pinchend",p);function k(P){if(!M.canPlayCurrentScene()){return}M.pause();b=true;CriLaFw.terminateFirstShowSwipeHint(M)}function x(T){if(!M.canPlayCurrentScene()){return}if(v()){T.preventDefault()}var R=T.getMoveValue();var Q=T.getOriginMoveValue();var W=CriGrxVector2_Add(R,Q);if(e(W)===false){return}var V=T.event_;if(r(V)){if(!CriLaFw.swipeZoom){return}CriLaFw.move(M,R.x,R.y);T.resetInertia()}else{var S=l();var U=CriGrxVector2_Scale(R,S);var P=U.x;N(-P)}}function m(P){}function n(P){if(!CriLaFw.swipeZoom){return}P.preventDefault()}function c(R){if(!CriLaFw.swipeZoom){return}R.preventDefault();var Q=(R.getScale()*100)-100;var P=R.getMoveValue();CriLaFw.zoom(M,Q,R.getPosition());CriLaFw.move(M,P.x,P.y)}function p(P){}function l(){var P=0.5;var S=M.getCanvas();var R=CriLaHtmlCss.getElementWidthHeight(S);var Q=R.w;if(Q<=0){return 0}P=720/Q;P*=o/330;P*=F;P/=M.getScaleXY()[0];return P}function r(Q){if(Q&&Q.detail.shiftKey){return true}var P=CriLaFw.getContext(M);return P.swipeMode}var s=false;function N(S){if(S===0){return}if(!s){s=true;M.play();M.pause()}var Q=M.getFrame();Q+=S;var P=o-1;var R=M.getLoopFlg();if(R){Q=(Q+P)%P}else{Q=Q<0?0:Q>P?P:Q}M.setFrame(Q)}function j(S){if(!A){return}A.updateInertia(S);var R=A.getInertia();var P=A.getOriginMoveValue();if(!A.isDown()){var Q=CriGrxVector2_Scale(R,S);var U=CriGrxVector2_Add(P,Q);if(e(U)===false){return}var T=Q.x*l();T/=2;N(-T)}}var i=null;function G(Q){if(i===null){i=Q}var P=Q-i;i=Q;j(P);window.requestAnimationFrame(G)}window.requestAnimationFrame(G);var J=D;if(J){var u=M.getCurrentSceneDuration();var L=M.getCurrentSceneFrameRate();var y=u*1000/L;var z=y/J;var t=M.getPlaybackRateRange();M.setPlaybackRateRange(t[0],Math.ceil(z));M.setPlaybackRate(z);var q=function(){if(b==false){M.play()}};var K=function(){if(b==false){M.pause()}};M.addEventListener(CriLaEvent.SCROLL_IN,q);M.addEventListener(CriLaEvent.SCROLL_OUT,K);var h=w==="once"?360:0;var E=h/360;if(E>=1){M.addEventListener(CriLaEvent.FIRST_PLAY_END,function(){var Q=CriLaFw.decelerateSettings;if(Q){var S=Q.type;var R=Q.timeConstant;if(R==null){R=500}if(R<0){R=0}var P=M.getPlaybackRate();if(S==="friction"){M.decelerateFunc_=CriLaFw.decelerate_factory_friction_(P,R)}else{if(S==="air_resistance"){M.decelerateFunc_=CriLaFw.decelerate_factory_air_resistance_(P,R/Math.log(10))}}}else{M.pause();b=true}CriLaFw.firstShowSwipeHint(M)})}}else{var I=function(){CriLaFw.firstShowSwipeHint(M);M.removeEventListener(CriLaEvent.SCROLL_IN,I)};M.addEventListener(CriLaEvent.SCROLL_IN,I)}};CriLaFw.firstShowSwipeHint=function(a){var b=this.getContent(a);if(!b){return}var c=function(k){var d=a.getOverlayPanel(k);var j=b.getInitialOverlayStyle();var f=CriLaSwipeHintFirstShowStatus.BEFORE_SHOW;var h=CriLaSwipeHintFirstShowStatus.SHOWING;var i=b.getSwipeHintFirstShowStatus(k)!==f;if((!j[k])||i){return}b.stepSwipeHintFirstShowStatus(k);d.fadeIn(500);var e=function(){b.stepSwipeHintFirstShowStatus(k);setTimeout(function(){if(b.getSwipeHintFirstShowStatus(k)!==h){return}b.stepSwipeHintFirstShowStatus(k);d.fadeOut(500)},2000);d.removeEventListener(CriLaOverlayEvent.OVERLAY_FADE_IN_END,e)};d.addEventListener(CriLaOverlayEvent.OVERLAY_FADE_IN_END,e);var g=function(){b.stepSwipeHintFirstShowStatus(k);d.removeEventListener(CriLaOverlayEvent.OVERLAY_FADE_OUT_END,g)};d.addEventListener(CriLaOverlayEvent.OVERLAY_FADE_OUT_END,g)};c(CriLaOverlayName.COACH_MARK_SWIPE);c(CriLaOverlayName.COACH_MARK_SWIPE_MINI)};CriLaFw.terminateFirstShowSwipeHint=function(b){var a=function(j){var i=this.getContent(b);if(!i){return}var f=CriLaSwipeHintFirstShowStatus.BEFORE_SHOW;var g=CriLaSwipeHintFirstShowStatus.FADING_IN;var e=CriLaSwipeHintFirstShowStatus.SHOWING;var d=CriLaSwipeHintFirstShowStatus.FADING_OUT;var k=CriLaSwipeHintFirstShowStatus.AFTER_SHOW;var c=b.getOverlayPanel(j);var h=i.getSwipeHintFirstShowStatus(j);if(h===f){i.setSwipeHintFirstShowStatus(j,k)}else{if(h===g||h===e){c.fadeOut(500);i.setSwipeHintFirstShowStatus(j,d)}}};a.call(this,CriLaOverlayName.COACH_MARK_SWIPE);a.call(this,CriLaOverlayName.COACH_MARK_SWIPE_MINI)};CriLaFw.decelerate_factory_friction_=function(a,b){var d=0;var c=false;return function(f){if(g){return 0}d+=f;var e=a*(b-d)/b;if(e<0){var g=true;e=0}return e}};CriLaFw.decelerate_factory_air_resistance_=function(a,b){var d=0;var e=0.01;var c=false;return function(g){if(h){return 0}d+=g;var f=a*Math.exp(-d/b);if(f0){f[0]=0}else{if(g-h>0){f[0]=g*(1-c[0])}}if(e>0){f[1]=0}else{if(d-a>0){f[1]=d*(1-c[1])}}i.setPositionXY(f[0],f[1])};CriLaFw.zoom=function(o,b,r){var l=o.getCurrentSceneWidth();var f=o.getCurrentSceneHeight();var n=o.getCanvas();var p=CriLaHtmlCss.getElementWidthHeight(n);var d=p.getWidth();var q=p.getHeight();if(r==null){r=CriGrxVector2.createFromXY(d/2,q/2)}var c=o.getScaleXY();var m=l*c[0];var g=f*c[1];var k=o.getPositionXY();r=CriGrxVector2.createFromXY((-k[0]+l*r.x/d)/m,(-k[1]+f*r.y/q)/g);c=o.getScaleXY().map(function(h){return h*(100+b)/100});c=c.map(function(h){return h<1?1:h>6?6:h});o.setScaleXY(c[0],c[1]);var e=l*c[0];var i=f*c[1];var a=e-m;var j=i-g;CriLaFw.move_scene(o,-a*r.x,-j*r.y);o.requestRedraw()};CriLaFw.setupSwipeUI=function(e){if(!CriLaFw.swipeZoom){return}if(e.isEnabledControlTemplate()===true){e.setupTemplateControl()}else{e.setupSwipeControl()}e.setupSwipeOverlay();var a=e.getControls();var d=CriLaFw.getContext(e);d.swipeMode=false;e.addEventListener(CriLaEvent.SWIPE_MODE_CHANGE,function(){a.setButtonState(CriLaControlComponentName.SWIPE_MODE_BUTTON,d.swipeMode)});a.addEventListener(CriLaControlEvent.SWIPE_MODE_BUTTON_CLICKED,function(){d.swipeMode^=true;e.dispatchEvent(CriLaEvent.SWIPE_MODE_CHANGE)});a.addEventListener(CriLaControlEvent.ZOOM_IN_BUTTON_PRESSED,function(g){var f=g.detail.deltaTime;CriLaFw.zoom(e,1)});a.addEventListener(CriLaControlEvent.ZOOM_OUT_BUTTON_PRESSED,function(g){var f=g.detail.deltaTime;CriLaFw.zoom(e,-1)});var c=e.getCanvas();if(typeof(c.onmousedown)!=="undefined"){c.addEventListener("wheel",b,false)}function b(h){var f=CriGrxVector2.createFromXY(h.offsetX,h.offsetY);var g=h.deltaY>0?-5:5;CriLaFw.zoom(e,g,f);h.preventDefault()}};CriLaFw.setSwipeAngleLimit=function(b,d){d=d<0?0:d>Math.PI/2?Math.PI/2:d;var a=CriLaFw.getContext(b);var c=Math.abs(Math.cos(d));a.cosineSwipeLimit=c};CriLaFw.setupJumpURL=function(j,d,f){d=CriLaURL.sanitize(d);if(!d){return false}function m(){if(CriLaFw.setResourceLoadQueue_==true&&CriUAChecker.getOS()==CriUAOS.iOS){if(CriLaFw.requestPageJump_==true){return}CriLaFw.requestPageJump_=true;CriLaFw.unloadResourcePlayer();setTimeout(function(){CriLaFw.loadResourceContentsList_.reverse();CriLaFw.loadResourceContentsList_.forEach(function(o){var n=o.getPlayer();n.restoreFromPageJumpMode()});CriLaFw.loadResourceContentsList_.reverse();CriLaFw.bfcacheRestore();j.pagejump(d,f)},CriLaFw.bfcacheJumpWaitTimeMs)}else{j.pagejump(d,f)}}j.addEventListener(CriLaEvent.CLICK,m);var c=j.getCanvas();var l=c.parentNode;var i=document.createElement("div");i.className="liveact-link-highlight";var a=i.style;l.style.cursor="pointer";var e=function(n){a.opacity=(n?0.5:0)};var k=e.bind(null,false);var h=e.bind(null,true);k();if(CriUAChecker.isMobile()){var b=new CriLaCustomPointerEvent(c);b.addEventListener("down",h,false);b.addEventListener("up",k,false)}var g=c.nextSibling;l.insertBefore(i,g);return true};CriLaFw.setupQuestionnaire=function(b,c,d,a){CriLaXHR.requestLoad(c,"json",function(f){var e=new CriLaFwQuestionnaire();CriLaFw.questionnaire_.push(e);e.setup(b,f,d,a)},null,{async:true})};var CriLaFwQuestionnaireAnswerCustomAttribute={INDEX:"data-index",SELECTED:"data-selected"};var CriLaFwQuestionnaireType={QUESTIONNAIRE:"questionnaire",TEST:"test"};function CriLaFwQuestionnaire(){this.dom_top=null;this.dom_scroll_description=null;this.dom_answer_top=null;this.dom_answer_button=null;this.dom_next_button=null;this.dom_wrap=null;this.dom_answer_button_span=null;this.question=null;this.dom_inner=null;this.enable_show=true;this.is_send=false;this.is_enable_answer_button=false;this.is_show_scroll_description=false;this.is_set_fade=false;this.class_name_answer="la-answer";this.class_name_answer_selected=" la-answer-selected";this.class_name_answer_no_selected=" la-answer-noselected"}function CriLaFwQuestionnaireQuestion(a,b){this.question=a;this.answers=[];this.type=b}function CriLaFwQuestionnaireAnswer(b,d,a,c){this.index=b;this.display=d;this.url="";this.is_correct=c==null?false:c;if(a){this.url=CriLaURL.sanitize(a)}}(function(a){a.getSelectedAnserUrl=function(){var d=this.question.answers;var c="";var b=this.getSelectedIndex();b.forEach(function(e){if(d[e].url!=""){c=d[e].url}});return c};a.isValidScrollDescription=function(){return this.dom_top&&this.dom_wrap&&this.dom_top.clientHeightl-1){h.showTop();i.pause()}else{h.hideTop()}});var b=g.getElementsByClassName("lac-minimenu-field")[0];window.addEventListener("resize",function(){h.adjustQuestionnaireHeightToElementHeihgt(b)});i.addEventListener(CriLaEvent.FULLSCREEN_CHANGE,function(){h.adjustQuestionnaireHeightToElementHeihgt(b)});this.adjustQuestionnaireHeightToElementHeihgt(b);if(this.question.type==CriLaFwQuestionnaireType.TEST){this.shuffle()}};a.setAnswerErattaDom=function(){var d=this.dom_answer_top.getElementsByClassName(this.class_name_answer);var c=CriLaPolyfill.Array.from(d);var b=this;if(this.question.type==CriLaFwQuestionnaireType.TEST){c.forEach(function(f){var g=parseInt(f.getAttribute("data-index"));var h=b.question.answers[g].is_correct?"la-answer-status la-answer-status--correct":"la-answer-status la-answer-status--wrong";var e=b.createDiv(h,"","inline");f.insertBefore(e,f.firstChild)})}this.dom_answer_button_span.innerHTML="回答済み"};a.updateAnswerClassNameByAnswerSend=function(){var d=this.dom_answer_top.getElementsByClassName(this.class_name_answer);var c=CriLaPolyfill.Array.from(d);var b=this;c.forEach(function(e){var f=e.getAttribute(CriLaFwQuestionnaireAnswerCustomAttribute.SELECTED);e.className=f==="true"?b.class_name_answer+b.class_name_answer_selected:b.class_name_answer+b.class_name_answer_no_selected})};a.adjustQuestionnaireHeightToElementHeihgt=function(b){this.dom_top.style.setProperty("height",b.clientHeight+"px");this.updateScrollDescriptionDisplay()};a.shuffle=function(){var b=this.dom_answer_top;var e=b.getElementsByClassName(this.class_name_answer);for(var c=e.length-1;c>0;c--){var d=Math.floor(Math.random()*(c+1));b.appendChild(e[d])}};a.setScrollDescriptionFadeOut=function(){var d=this.dom_scroll_description;var g=this.dom_inner;var c=1;var b=20;var e=this;g.addEventListener("scroll",function f(){if(e.is_show_scroll_description){CriLaFwUtility.domFadeOut(c,d,b);g.removeEventListener("scroll",f)}})};a.updateScrollDescriptionDisplay=function(){this.is_show_scroll_description=this.isValidScrollDescription();var b=this.is_show_scroll_description?"block":"none";this.setDomDisplayStyle(this.dom_scroll_description,b);if(!this.is_set_fade&&this.is_show_scroll_description){this.setScrollDescriptionFadeOut();this.is_set_fade=true}};a.setDomDisplayStyle=function(d,c,b){b=b==null?"":b;d.style.setProperty("display",c,b)};a.setDomVisibilityStyle=function(d,c,b){b=b==null?"":b;d.style.setProperty("visibility",c,b)};a.setAnswerButtonVisibility=function(b){this.setDomVisibilityStyle(this.dom_answer_button,b)};a.setNextButtonVisibility=function(b){this.setDomVisibilityStyle(this.dom_next_button,b)};a.showTop=function(){if(this.enable_show){this.setDomDisplayStyle(this.dom_top,"block","important");this.updateScrollDescriptionDisplay()}};a.hideTop=function(){this.setDomDisplayStyle(this.dom_top,"none","important")};a.setNoRedisplayMode=function(){this.enable_show=false};a.resetAnswers=function(){var b=this.dom_answer_top;var d=b.getElementsByClassName(this.class_name_answer);for(var c=0;c0};a.show=function(){this.dom_top.style.setProperty("display","block")};a.hide=function(){this.dom_top.style.setProperty("display","none")};a.regist=function(c){if(!this.isRegisteredCampanyCode(c)){var b=c.getCompanyCode();var d=this.getRegisteredlist();var g={};g.code=b;g.expired=Date.now()+2*60*60*1000;d.push(g);var h=null;try{h=localStorage}catch(f){console.warn("LiveAct Warning: localStorage disabled")}if(h){h.setItem("_la-cr",JSON.stringify(d))}}};a.getRegisteredlist=function(b){var c=[];var f=null;try{f=localStorage}catch(d){console.warn("LiveAct Warning: localStorage disabled")}if(f){c=JSON.parse(f.getItem("_la-cr"))||[];c=c.filter(function(e){return e.expired>Date.now()})}return c};a.isRegisteredCampanyCode=function(d){var b=d.getCompanyCode();var e=this.getRegisteredlist();var f=false;for(var c=0;curl".replace(/url/g,b)};a.replaceUrlToAtagText=function(e){var d=this.getUrlTextList(e);var c=this;if(d){d=d.filter(function(f,h,g){return g.indexOf(f)===h});d=CriLaPolyfill.Array.from(d).sort(function(g,f){return f.length-g.length});var b=[];d.forEach(function(h,g){var f="$CRILAFWUSERCOGNITION_TEMPSTR"+g+"$";var i=c.convertTextToAtagText(h);e=e.split(h).join(f);var j={};j.atag=i;j.temp_str=f;b.push(j)});b.forEach(function(f){e=e.split(f.temp_str).join(f.atag)})}return e};a.getUrlTextList=function(c){var b=new RegExp("((http(s)?)(://[-_.!~*'()a-zA-Z0-9;/?:@&=+$,%#]+))","g");return c.match(b)};a.parseText=function(b){return CriLaHtmlCss.escapeHtml(b||"")};a.setScrollDescriptionFadeOut=function(){var e=this.dom_scroll_description;var b=this.dom_inner;var d=1;var c=20;b.addEventListener("scroll",function f(){CriLaFwUtility.domFadeOut(d,e,c);b.removeEventListener("scroll",f)})};a.updateScrollDescriptionDisplay=function(){if(this.dom_inner.clientHeight0){b-=0.1;e.style.setProperty("opacity",b);var d=this;setTimeout(function(){d.domFadeOut(b,e,c)},c)}else{e.style.setProperty("display","none")}};a.convertReturnCode=function(b){return b.replace(/(¥{2,}n)|(¥{1}n)|(\\{2,}n)|(\n)/g,function(c){return c=="¥n"||c=="\n"?"
":c})}})(CriLaFwUtility);function CriLaC401(){this.lastPosition_=null;this.lastDistance_=null;this.moveHistory_=null;this.elapsedHistory_=null;this.lastOrigin_=null;this.originMove_=null;this.scale_=1;this.startPosition_=null;this.startDistance_=null;this.totalMove_=new CriGrxVector2();this.totalScale_=1;this.swipeing_=false;this.pinching_=false;this.lastTime_=null;this.lastPinchTime_=null;this.inertia_=new CriGrxVector2();this.eventListenersDict={};this.element_=null;this.cpe_=null;this.event_=null;this.swipeID_=null}var CriLaC402=CriLaC401.prototype;CriLaC401.Type={SWIPE_BEGIN:"swipebegin",SWIPE:"swipe",SWIPE_END:"swipeend",PINCH_BEGIN:"pinchbegin",PINCH:"pinch",PINCH_END:"pinchend"};Object.freeze(CriLaC401.Type);CriLaC401.isValidType=function(b){var a=CriLaC401.Type;for(var d in a){var c=a[d];if(c===b){return true}}return false};CriLaC402.initialize=function(c){this.moveHistory_=new CriLaC401.LimitedQueue(3);this.elapsedHistory_=new CriLaC401.LimitedQueue(3);this.lastOrigin_=this.getOrigin_();this.updateOrigin_();this.element_=c;var a=this.cpe_=new CriLaCustomPointerEvent(c);a.addEventListener("down",this.down_.bind(this),false);a.addEventListener("move",this.move_.bind(this),false);a.addEventListener("up",this.up_.bind(this),false);a.addEventListener("out",this.out_.bind(this),false);var e=this.eventListenersDict;var b=CriLaC401.Type;for(var f in b){var d=b[f];e[d]=[]}};CriLaC402.addEventListener=function(a,b){if(!CriLaC401.isValidType(a)){return}this.eventListenersDict[a].push(b)};CriLaC402.isDown=function(){if(!this.event_){return false}var a=this.event_.detail.points;return(a.length>0)};CriLaC402.getTotalMoveValue=function(){return this.totalMove_};CriLaC402.getMoveValue=function(){var a=this.moveHistory_.back();return a};CriLaC402.getOriginMoveValue=function(){return this.originMove_};CriLaC402.getTotalScale=function(){return this.totalScale_};CriLaC402.getScale=function(){return this.scale_};CriLaC402.getInertia=function(){return this.inertia_};CriLaC402.updateInertia=function(c){var b=this.inertia_;var e=Math.exp(Math.log(0.97)*c/16.666666666666);var d=CriGrxVector2_Scale(b,e);var a=0.18;if(d.getLength()50){return b}else{var d=c.map(function(g,h){var f=a[h];return f?CriGrxVector2_Div(g,f):null}).filter(Boolean);if(d.length){b=CriGrxVector2_CenterOfGravity(d)}return b}};CriLaC402.dispatchEvent_=function(e){var b=void (0);if(!CriLaC401.isValidType(e)){return b}var d=this.eventListenersDict[e];var c=this.element_;var a=this;d.forEach(function(g){var f=g.call(c,a);if(f===false){b=false}});return b};CriLaC402.getDistanceTouches_=function(a){var b=a;if(b<=1){return null}var c=CriGrxVector2_Sub(a[0],a[1]);return c.getLength()};CriLaC402.clearHistory_=function(){this.moveHistory_.clear();this.elapsedHistory_.clear();this.inertia_=new CriGrxVector2()};CriLaC402.down_=function(g){this.event_=g;var b=void (0);var d=g.detail.points;var f=d.length;var c=window.getSelection();c.collapse(document.body,0);if(f===1){var a=d[0];b=this.swipeBegin_(a)}else{if(f===2){this.pinchInOutBegin_(g)}else{}}return b};CriLaC402.move_=function(f){this.event_=f;var b=void (0);var c=f.detail.points;var d=c.length;if(d===1){var a=c[this.swipeID_];if(a){b=this.swipe_(a)}}else{if(d===2){b=this.pinchInOut_(f)}}return b};CriLaC402.up_=function(b){this.event_=b;var c=void (0);var i=b.detail.points;var j=b.detail.changedPoints;var d=i.length;var k=j.length;if(d===0){if(this.pinching_){c=this.pinchInOutEnd_(b)}else{if(this.swiping_){var a=j[this.swipeID_];if(a){c=this.swipeEnd_(a)}}}}else{if(d===1){var g=this.pinchInOutEnd_(b);var h=i[0];var f=this.swipeBegin_(h);if(g===false||f===false){c=false}}}return c};CriLaC402.out_=CriLaC402.up_;CriLaC402.swipeBegin_=function(a){var b=void (0);this.clearHistory_();this.swipeID_=a.id;this.startPosition_=a;this.lastPosition_=a;this.lastTime_=criLaTimer_GetTimeMs();this.swiping_=true;b=this.dispatchEvent_(CriLaC401.Type.SWIPE_BEGIN);return b};CriLaC402.swipe_=function(a){var b=void (0);if(!this.swiping_){return b}this.inertia_=new CriGrxVector2();this.updateMove_(a);b=this.dispatchEvent_(CriLaC401.Type.SWIPE);return b};CriLaC402.swipeEnd_=function(a){var b=void (0);if(!this.swiping_){return b}this.inertia_=this.calculateInertia_();this.startPosition_=null;this.lastPosition_=null;this.swiping_=false;this.swipeID_=null;b=this.dispatchEvent_(CriLaC401.Type.SWIPE_END);return b};CriLaC402.pinchInOutBegin_=function(g){var a=void (0);var b=g.detail.points;var f=this.swipeEnd_(b[this.swipeID_]);this.clearHistory_();var h=this.getDistanceTouches_(b);this.startDistance_=h;this.lastDistance_=h;var d=CriGrxVector2_CenterOfGravity(b);Object.freeze(d);this.startPosition_=d;this.lastPosition_=d;this.lastTime_=criLaTimer_GetTimeMs();this.pinching_=true;var c=this.dispatchEvent_(CriLaC401.Type.PINCH_BEGIN);if(f===false||c===false){a=false}return a};CriLaC402.pinchInOut_=function(d){var a=void (0);if(!this.pinching_){return a}var b=d.detail.points;var f=this.getDistanceTouches_(b);this.updateScale_(f);var c=CriGrxVector2_CenterOfGravity(b);Object.freeze(c);this.updateMove_(c);a=this.dispatchEvent_(CriLaC401.Type.PINCH);return a};CriLaC402.pinchInOutEnd_=function(b){var a=void (0);if(!this.pinching_){return a}this.startDistance_=null;this.lastDistance_=null;this.pinching_=false;this.lastPinchTime_=criLaTimer_GetTimeMs();a=this.dispatchEvent_(CriLaC401.Type.PINCH_END);return a};CriLaC402.preventDefault=function(){return this.event_.preventDefault()};CriLaC402.stopPropagation=function(){return this.event_.stopPropagation()};CriLaC401.LimitedQueue=function(a){this.maxLength_=a};var CriLaC404=CriLaC401.LimitedQueue.prototype;CriLaPolyfill.Object.setPrototypeOf(CriLaC404,Array.prototype);CriLaC404.push=function(a){Array.prototype.push.call(this,a);if(this.length>this.maxLength_){this.pop()}};CriLaC404.pop=function(a){return Array.prototype.shift.call(this)};CriLaC404.front=function(){return this[0]};CriLaC404.back=function(){return this[this.length-1]};CriLaC404.clear=function(){this.length=0};CriLaFw.isScriptLoaded=true;