diff --git a/carrot.yml b/carrot.yml index 5062c522..29b8d920 100644 --- a/carrot.yml +++ b/carrot.yml @@ -1,4 +1,4 @@ - name: whiteboard-bridge repoPath: ../whiteboard-bridge repoURL: 'https://github.com/netless-io/whiteboard-bridge.git' - commit: a737ce1 + commit: 46c0c42 diff --git a/sdk/src/main/assets/whiteboard/a737ce1 b/sdk/src/main/assets/whiteboard/46c0c42 similarity index 100% rename from sdk/src/main/assets/whiteboard/a737ce1 rename to sdk/src/main/assets/whiteboard/46c0c42 diff --git a/sdk/src/main/assets/whiteboard/index.html b/sdk/src/main/assets/whiteboard/index.html index 9feea8d0..84157cb2 100644 --- a/sdk/src/main/assets/whiteboard/index.html +++ b/sdk/src/main/assets/whiteboard/index.html @@ -1 +1 @@ -white-sdk-bridge Application
\ No newline at end of file +white-sdk-bridge Application
\ No newline at end of file diff --git a/sdk/src/main/assets/whiteboard/netless.9d50552a.js b/sdk/src/main/assets/whiteboard/netless.7b2a56d4.js similarity index 84% rename from sdk/src/main/assets/whiteboard/netless.9d50552a.js rename to sdk/src/main/assets/whiteboard/netless.7b2a56d4.js index 79358ae2..b2cf9c1f 100644 --- a/sdk/src/main/assets/whiteboard/netless.9d50552a.js +++ b/sdk/src/main/assets/whiteboard/netless.7b2a56d4.js @@ -1,4 +1,4 @@ -"use strict";(self.webpackChunkwhiteboard_bridge=self.webpackChunkwhiteboard_bridge||[]).push([[83],{19418:function(e,t,n){n.r(t)},24496:function(e,t,n){function r(e){var t="function"==typeof Map?new Map:void 0;return r=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return i(e,arguments,x(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),v(r,e)},r(e)}function i(e,t,n){return i=b()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&v(i,n.prototype),i},i.apply(null,arguments)}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){return function(e){if(Array.isArray(e))return A(e)}(e)||s(e)||E(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function u(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function l(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){u(o,r,i,a,s,"next",e)}function s(e){u(o,r,i,a,s,"throw",e)}a(void 0)}))}}function c(e,t){return d(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||E(e,t)||h()}function h(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function d(e){if(Array.isArray(e))return e}function f(e,t,n){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=x(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}},f(e,t,n||e)}function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}function v(e,t){return v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},v(e,t)}function m(e){var t=b();return function(){var n,r=x(e);if(t){var i=x(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return g(this,n)}}function g(e,t){return!t||"object"!==M(t)&&"function"!=typeof t?y(e):t}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function x(e){return x=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},x(e)}function _(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w(e,t){for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,o=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}function E(e,t){if(e){if("string"==typeof e)return A(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(e,t):void 0}}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,o=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}function E(e,t){if(e){if("string"==typeof e)return A(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(e,t):void 0}}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n20&&(e.value=Math.floor(1e3*e.times/e.valueTotal),e.valueTotal=0,e.times=0,e.destroyed||e.emit("update",e.value)),e.prevTime=t,e.destroyed||e.calcFps()}))}},{key:"destroy",value:function(){this.destroyed=!0}}]),n}(Ks.a);!function(e){e.ResourceError="RESOURCE_ERROR",e.RuntimeError="RUNTIME_ERROR",e.RuntimeWarn="RUNTIME_WARN",e.CanvasCrash="CANVAS_CRASH"}(Jp||(Jp={}));var rv=function(e){p(n,e);var t=m(n);function n(e,r){var i,o,a;return _(this,n),o=y(i=t.call(this,r)),a=(this instanceof n?this.constructor:void 0).prototype,Object.setPrototypeOf?Object.setPrototypeOf(o,a):o.__proto__&&(o.__proto__=a),i.errorType=e,i.errorMsg=r,i}return T(n,null,[{key:"transform",value:function(e){return e instanceof n?e:new n(Jp.RuntimeError,e.message)}}]),n}(r(Error));function iv(){return function(e,t,n){var r=n.value;n.value=function(){try{for(var e=arguments.length,t=new Array(e),n=0;n2048||x>2048)&&(_=(y*=2048/b)*x)>2048&&(y*=x/_),w=document.createElement("canvas"),T=Math.ceil(g.width*y),M=Math.ceil(g.height*y),w.width=T,w.height=M,w.getContext("2d").drawImage(g,0,0,T,M),S=w.toDataURL("image/png"),E=new Xl.c(S,{resolution:1}),n.abrupt("return",(this.logger.info("load end. "+o,this.taskId||""),this.useCache&&this.localStorage.setItem(u,{scale:y,scaledBase64:S}).catch((function(){})),{baseTexture:E,scale:y}));case 70:case"end":return n.stop()}}),n,this,[[22,34],[39,52]])})))}},{key:"destroy",value:function(){}}]),e}(),mv=function(){function e(t){var n=this;_(this,e),this.isPaused=!1,this.timestamp=0,this.callbackList=[],this.onTimeUpdate=function(e){var t=e/(nd.b.TARGET_FPMS||.06);if(!n.isPaused){n.timestamp+=t,n.callbackList=n.callbackList.filter((function(e){return e&&!e.applied}));for(var r=n.callbackList.length,i=0;i=0&&!this.callbackList[t].running&&this.callbackList.splice(t,1)}},{key:"delay",value:function(e){var t=this;return new Promise((function(n){t.setTimeout(n,e)}))}},{key:"waitUntil",value:function(e,t){return function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}(this,void 0,void 0,regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:r=this.timestamp;case 1:if(e()||!(this.timestamp-r90&&a<270||a<-90&&a>-270)&&(r=-r),i=s*r}return{x:r,y:i}}function Sv(e,t,n,r,i,o){var a,s,u,l,c,h=e,d=t;if(0===Math.round(r))a=i,s=o,c=0;else if(Math.round(r)>=360)a=i,s=o,u=i+2*e*Math.abs(Math.cos(-n/180*Math.PI)),l=o+2*t*Math.sin(-n/180*Math.PI),c=1;else{var f=-(n+r),p=Mv(-n,h,d),v=i-p.x,m=o+p.y,g=Mv(f,h,d);a=g.x+v,s=m-g.y,c=r>=-360&&r<-180?1:r>=-180&&r<0||r>0&&r<180?0:1}return{radiusX:h,radiusY:d,xAxisRotation:0,largeArcFlag:c,sweepFlag:r>0?1:0,endX:a,endY:s,middleX:u,middleY:l}}var Ev=function(){function e(){_(this,e),this.pool=[]}return T(e,[{key:"getObject",value:function(e){var t=this.pool.find((function(e){return!e.isUsed}));if(t)return t.isUsed=!0,t.obj;var n={obj:this.createObject(),isUsed:!0,group:e};return this.pool.push(n),n.obj}},{key:"collectObject",value:function(e){var t=this.pool.find((function(t){return t.obj===e}));t&&(t.isUsed=!1,this.resetObject(t.obj))}},{key:"collectObjectByGroup",value:function(e){var t=this;this.pool.filter((function(t){return t.group===e})).forEach((function(e){return t.collectObject(e.obj)}))}}]),e}(),Av=new(function(e){p(n,e);var t=m(n);function n(){return _(this,n),t.apply(this,arguments)}return T(n,[{key:"createObject",value:function(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");return e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e.setAttribute("version","1.1"),e}},{key:"resetObject",value:function(e){e.removeAttribute("viewBox"),e.removeAttribute("width"),e.removeAttribute("height"),e.innerHTML=""}}]),n}(Ev)),Iv=new(function(e){p(n,e);var t=m(n);function n(){return _(this,n),t.apply(this,arguments)}return T(n,[{key:"createObject",value:function(){return document.createElement("img")}},{key:"resetObject",value:function(e){e.removeAttribute("src")}}]),n}(Ev)),Cv=function(){function e(t){_(this,e),this.imgElements=[],this.svgElements=[],this.idToHashMap=Object.create(null),this.textures=Object.create(null),this.graphics=[],this.hashToIdMap=Object.create(null),this.maxResolution=t}return T(e,[{key:"render",value:function(e,t,n,r){return function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}(this,void 0,void 0,regeneratorRuntime.mark((function t(){var i,o,a,s,u,l,h,d,f,p,v,m=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=e.items,o=e.width,a=e.height,s=Iv.getObject(n),u=new Xl.c(s,{width:o*r,height:a*r,resolution:1}),l=Av.getObject(n),this.imgElements.push(s),this.svgElements.push(l),l.setAttribute("viewBox","0 0 ".concat(o," ").concat(a)),l.setAttribute("width",""+o),l.setAttribute("height",""+a),h={},i.forEach((function(e){var t=e.item,n=e.x,i=e.y,o=n+2,a=i+2;t.pathsData.forEach((function(e){var t="";e.cmds.forEach((function(n){var r=c(n,2),i=r[0],s=r[1];t+=i+" ",t+=s.map((function(t){return Tv()(t)||(t.x=t.x+e.offset.x+o,t.y=t.y+e.offset.y+a),t})).reduce((function(e,t){return Tv()(t)?e+=t+" ":e+="".concat(t.x," ").concat(t.y," "),e}),""),t+=" "})),e.pathElement.setAttribute("d",t),l.appendChild(e.pathElement)}));var s=t.width-4-2*t.padding,d=t.height-4-2*t.padding;m.textures[t.hash]={texture:new Xl.t(u,new jl.j((o+2)*r,(a+2)*r,s*r,d*r)),pivot:t.pivot,scale:1/r},h[t.hash]=m.hashToIdMap[t.hash]})),f=''+l.outerHTML,d="data:image/svg+xml,"+encodeURIComponent(f).replace(/'/g,"%27").replace(/"/g,"%22"),(p=document.createElement("img")).src=d,t.next=9,new Promise((function(e,t){p.onload=function(){return e("")},p.onerror=function(){return t()}}));case 9:return(v=document.createElement("canvas")).width=p.width*r,v.height=p.height*r,v.getContext("2d").drawImage(p,0,0,v.width,v.height),s.src=v.toDataURL("image/png"),t.next=15,new Promise((function(e,t){s.onload=function(){return e("")},s.onerror=function(){return t()}}));case 15:case"end":return t.stop()}}),t,this)})))}},{key:"getGraphicsData",value:function(e){var t=this.idToHashMap[e]||"";return this.textures[t]||null}},{key:"addGraphics",value:function(e,t,n,r,i,o,a,s,u,l,h){var d,f;if(!a&&!u)return e;var p,v,m,g,y,b,x,_,w,T,M,S,E,A,I,C,N,k,D=_v()(n+(null!==(f=null===(d=null==a?void 0:a.width)||void 0===d?void 0:d.toString())&&void 0!==f?f:0)+u+l+h);if(this.hashToIdMap[D]||(this.hashToIdMap[D]=[]),this.hashToIdMap[D].push(e),this.idToHashMap[e]=D,this.graphics.findIndex((function(e){return e.hash===D}))<0){var P=(p=t,v=i,m=o,g=a,y=r,b=u,x=l,_=h,T=[],M={x:Math.abs(y.x),y:Math.abs(y.y)},S=0,E=0,A=0,I=0,C=0,N="none",k=null!==(w=null==g?void 0:g.width)&&void 0!==w?w:0,b?(S=v,E=m,C=0):(N=_||"#ff0000",C=k,A=.5*k,I=.5*k,S=v+k,E=m+k,M.x+=.5*k,M.y+=.5*k),S+=Math.abs(y.x),E+=Math.abs(y.y),A+=Math.abs(y.x),I+=Math.abs(y.y),S+=4,E+=4,A+=2,I+=2,S=Math.ceil(S),E=Math.ceil(E),p.forEach((function(e){var t=document.createElementNS("http://www.w3.org/2000/svg","path");"none"!==e.fill&&b?t.setAttribute("fill",x||"#ff0000"):t.setAttribute("fill","none"),e.hasStroke&&!b&&(t.setAttribute("stroke-linecap",(null==g?void 0:g.cap)||"butt"),t.setAttribute("stroke-linejoin",(null==g?void 0:g.join)||"miter"),t.setAttribute("stroke-width",C.toString()),t.setAttribute("stroke",N),(null==g?void 0:g.dash)&&t.setAttribute("stroke-dasharray",g.dash));for(var n=e.scale,r=e.path.trim().split(" "),i={x:0,y:0},o={offset:{x:A,y:I},cmds:[],pathElement:t},a=0;a=360?(i={x:M.endX,y:M.endY},o.cmds.push(["A",[M.radiusX/9525*n.x,M.radiusY/9525*n.y,M.xAxisRotation,M.largeArcFlag,M.sweepFlag,{x:M.middleX/9525*n.x,y:M.middleY/9525*n.y}]]),o.cmds.push(["A",[M.radiusX/9525*n.x,M.radiusY/9525*n.y,M.xAxisRotation,M.largeArcFlag,M.sweepFlag,{x:M.endX/9525*n.x,y:M.endY/9525*n.y}]])):(i={x:M.endX,y:M.endY},o.cmds.push(["A",[M.radiusX/9525*n.x,M.radiusY/9525*n.y,M.xAxisRotation,M.largeArcFlag,M.sweepFlag,{x:M.endX/9525*n.x,y:M.endY/9525*n.y}]]))}else if("L"===s){var S=c(u.split(",").map((function(e){return Number(e)})),2),E=S[0],k=S[1];i={x:E,y:k},E=E/9525*n.x,k=k/9525*n.y,o.cmds.push(["L",[{x:E,y:k}]])}else if("QB"===s){var D=c(u.split(",").map((function(e){return Number(e)})),4),P=D[0],O=D[1],R=D[2],L=D[3];i={x:R,y:L},P=P/9525*n.x,O=O/9525*n.y,R=R/9525*n.x,L=L/9525*n.y,o.cmds.push(["Q",[{x:P,y:O},{x:R,y:L}]])}else if("CB"===s){var j=c(u.split(",").map((function(e){return Number(e)})),6),B=j[0],U=j[1],z=j[2],F=j[3],G=j[4],H=j[5];i={x:G,y:H},B=B/9525*n.x,U=U/9525*n.y,z=z/9525*n.x,F=F/9525*n.y,G=G/9525*n.x,H=H/9525*n.y,o.cmds.push(["C",[{x:B,y:U},{x:z,y:F},{x:G,y:H}]])}else"C"===s&&o.cmds.push(["Z",[]])}T.push(o)})),{graphicsWidth:S,graphicsHeight:E,pivot:M,padding:2,pathsData:T}),O=P.graphicsWidth,R=P.graphicsHeight,L=P.pathsData,j=P.pivot,B=P.padding;this.graphics.push({hash:D,pathsData:L,pivot:j,width:O,height:R,padding:B})}return e}},{key:"pack",value:function(){return this.graphics.forEach((function(e){e.width+=4,e.height+=4})),function e(t){for(var n=[],r=t.filter((function(e){var t=e.width<2048&&e.height<2048;return t||n.push(e),t})).sort((function(e,t){return e.width*e.height-t.width*t.height})),i=r.length+1,o=2050,a=2050,s=[],u=null;(o>2048||a>2048)&&r.length>0;)i-=1,o=(u=av()(r.slice(0,i))).width,a=u.height;return u&&s.push(u),n.forEach((function(e){var t=av()([e]);s.push(t)})),i2&&void 0!==arguments[2]?arguments[2]:{type:"el",index:0,id:""},o=this.targets[e.id];return"shape"!==e.type?o:("shape"===e.type&&e.txEl&&(o=null!==(n=null==o?void 0:o.getTextElement(e.txEl.type,e.txEl.range))&&void 0!==n?n:null),"shape"===e.type&&e.bg&&0===i.index&&(t=!1,o=null!==(r=null==o?void 0:o.getBgElement())&&void 0!==r?r:null,this.eventHub.emit("IterateTimeNodeEnd",i.id)),t&&o?o.getIterateEntry(i.type,i.index,i.id):(o||this.eventHub.emit("IterateTimeNodeEnd",i.id),o))}},{key:"clearTargets",value:function(){this.targets=Object.create(null)}}]),e}(),Dv=function(){function e(t){_(this,e),this.target=t}return T(e,[{key:"color",get:function(){return this.target.strokeColorFilter.currentColor},set:function(e){this.target.strokeColorFilter.color=e}},{key:"on",get:function(){return this.target.strokeActive?"true":"false"},set:function(e){this.target.strokeActive="true"===e}}]),e}(),Pv=function e(t){var n=this;_(this,e),this.applyCommand=function(e,t){n.target.applyCommand(e,t)},this.target=t},Ov=function(){function e(t){_(this,e),this.target=t}return T(e,[{key:"toString",value:function(){return this.color}},{key:"color",get:function(){return this.target.pptColorFilter.currentColor},set:function(e){this.target.pptColorActive&&(this.target.pptColorFilter.color=e)}},{key:"on",get:function(){return this.target.pptColorActive?"true":"false"},set:function(e){this.target.pptColorActive="true"===e}},{key:"designColor",get:function(){return this.target.pptColorFilter.designColor}}]),e}(),Rv=function(){function e(t){_(this,e),this.target=t}return T(e,[{key:"color",get:function(){return this.target.fillColorFilter.currentColor},set:function(e){this.target.fillActive&&(this.target.fillColorFilter.color=e)}},{key:"on",get:function(){return this.target.fillActive?"true":"false"},set:function(e){this.target.fillActive="true"===e}},{key:"designColor",get:function(){return this.target.fillColorFilter.designColor}}]),e}(),Lv=function(){function e(t,n,r){_(this,e),this.hardHidden=!1,this.designRotation=0,this.target=t,!0===n&&(this.hardHidden=!0),this.designRotation=r}return T(e,[{key:"opacity",get:function(){return this.target.alpha},set:function(e){this.target.alpha=e}},{key:"rotation",get:function(){return this.target.rotation/Math.PI*180},set:function(e){this.target.rotation=e/180*Math.PI+this.designRotation}},{key:"visibility",get:function(){return this.target.visible?"visible":"hidden"},set:function(e){this.visibility===e||this.hardHidden||(this.target.visible="visible"===e)}}]),e}(),jv=function(){function e(t,n){_(this,e),this.actions=[],this.ctx=n,this.object=t,this.object.interactive=!0}return T(e,[{key:"reset",value:function(e){this.object.interactive=!1,this.object.removeAllListeners(),this.object=e,this.object.interactive=!0}},{key:"addAction",value:function(e,t){var n=this;this.actions.push([e,t]),"click"===t?(this.object.addListener("pointertap",(function(){return n.handleAction(e)})),this.object.cursor="pointer"):"hover"===t&&this.object.addListener("mouseover",(function(){return n.handleAction(e)}))}},{key:"getOriginHitArea",value:function(){return this.object.hitArea?this.object.hitArea:new jl.k(0,0,this.object.width,this.object.height)}},{key:"handleAction",value:function(e){this.ctx.eventHub.emit(bb.hyperlinkTrigger,e),this.execAction(e)}},{key:"execAction",value:function(e){var t,n;if(this.ctx.eventHub.emit(bb.userInput),"ppaction://hlinksldjump"===e.action){var r=(null!==(t=null==e?void 0:e.target)&&void 0!==t?t:"").match(/slide(\d+)\.xml/);r&&r[1]&&this.ctx.eventHub.emit(bb.requestGotoSlide,Number(r[1]))}else if("ppaction://hlinkshowjump?jump=nextslide"===e.action)this.ctx.eventHub.emit(bb.requestNextSlide);else if("ppaction://hlinkshowjump?jump=previousslide"===e.action)this.ctx.eventHub.emit(bb.requestPrevSlide);else if("ppaction://hlinkshowjump?jump=firstslide"===e.action)this.ctx.eventHub.emit(bb.requestGotoSlide,1);else if("ppaction://hlinkshowjump?jump=lastslide"===e.action)this.ctx.eventHub.emit(bb.requestGotoSlide,-1);else if("ppaction://hlinkshowjump?jump=lastslideviewed"===e.action){var i=this.ctx.lastViewedIndex;this.ctx.eventHub.emit(bb.requestGotoSlide,i)}else"ppaction://hlinkshowjump?jump=endshow"===e.action?this.ctx.eventHub.emit(bb.requestGotoSlide,-1):""===e.action&&(null===(n=e.target)||void 0===n?void 0:n.startsWith("http"))&&this.ctx.eventHub.emit(bb.requestOpenUrl,e.target)}}]),e}();function Bv(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5;return Math.abs(e-t)<=Math.pow(10,-n)}function Uv(e){return Math.floor(1e6*e)/1e6}var zv=function(){function e(){_(this,e),this.point={x:0,y:0},this.slope=Math.PI/4}return T(e,[{key:"resolveY",value:function(e){return Math.tan(this.slope)*(e-this.point.x)+this.point.y}},{key:"distanceToLinearEquation",value:function(e){return Bv(this.slope,e.slope)?this.distanceToPoint(e.point):-1}},{key:"distanceToPoint",value:function(t){var n;if(Math.tan(this.slope)*(t.x-this.point.x)+this.point.y===t.y)return 0;n=this.slope>=Math.PI/2?this.slope-Math.PI/2:Math.PI/2+this.slope;var r=e.fromPointSlope(t,n),i=this.crossPoint(r);return i?Math.ceil(Math.sqrt(Math.pow(i.x-t.x,2)+Math.pow(i.y-t.y,2))):0}},{key:"crossPoint",value:function(e){if(Bv(e.slope,this.slope))return null;var t=0,n=0,r=Math.tan(e.slope),i=Math.tan(this.slope),o=this.point,a=o.x,s=o.y,u=e.point,l=u.x,c=u.y;return Bv(this.slope,Math.PI/2)?n=r*((t=this.point.x)-l)+c:Bv(e.slope,Math.PI/2)?n=i*((t=e.point.x)-a)+s:Bv(this.slope,Math.PI)||Bv(this.slope,0)?t=((n=this.point.y)-c)/r+l:Bv(e.slope,Math.PI)||Bv(e.slope,0)?t=((n=e.point.y)-s)/i+a:n=i*((t=(r*l-c+s-i*a)/(r-i))-a)+s,{x:t,y:n}}}],[{key:"fromPointSlope",value:function(t,n){var r=new e;return r.point=t,r.slope=n,r}}]),e}(),Fv=function(){function e(t,n,r){var i,o,a,s,u,l,c=this;_(this,e),this.scaleExt={x:1,y:1},this.scaleOrigin={x:1,y:1},this.designScale={x:1,y:1},this.bound=new jl.j(0,0,1,1),this.pptX=0,this.pptY=0,this.presetSubType=0,this.designWidth=0,this.designHeight=0,this.designX=0,this.designY=0,this.hasPreset=!1,this.container=new Rl.b,this.ctx=n,this.style=new Lv(this.container,!!t.hardHidden,t.rotation||0),this.designGlobalPosition={x:r.parentGlobalPos.x+(null!==(o=null===(i=t.position)||void 0===i?void 0:i.x)&&void 0!==o?o:0),y:r.parentGlobalPos.y+(null!==(s=null===(a=t.position)||void 0===a?void 0:a.y)&&void 0!==s?s:0)},(t.hlinkClick||t.hlinkHover)&&(this.hyperlink=new jv(this.container,this.ctx),t.hlinkHover&&(null===(u=this.hyperlink)||void 0===u||u.addAction(t.hlinkHover,"hover")),t.hlinkClick&&(null===(l=this.hyperlink)||void 0===l||l.addAction(t.hlinkClick,"click"))),this.ctx.clock.waitUntil((function(){try{return!!c.container.width}catch(e){return!1}}),3e3).then((function(){try{c.designWidth=c.designWidth||c.container.width}catch(e){}})),this.ctx.clock.waitUntil((function(){try{return!!c.container.height}catch(e){return!1}}),3e3).then((function(){try{c.designHeight=c.designHeight||c.container.height}catch(e){}}))}return T(e,[{key:"updateScale",value:function(){this.container&&(this.container.scale.x=this.designScale.x*this.scaleExt.x*this.scaleOrigin.x,this.container.scale.y=this.designScale.y*this.scaleExt.y*this.scaleOrigin.y)}},{key:"updateTransform",value:function(e){var t,n,r,i,o,a,s,u;this.designWidth=e.width,this.designHeight=e.height,this.designX=null!==(n=null===(t=e.position)||void 0===t?void 0:t.x)&&void 0!==n?n:0,this.designY=null!==(i=null===(r=e.position)||void 0===r?void 0:r.y)&&void 0!==i?i:0;var l=this.designWidth/2,c=this.designHeight/2;this.container.width=this.designWidth,this.container.height=this.designHeight,this.container.pivot.x=l,this.container.pivot.y=c;var h=null!==(a=null===(o=e.position)||void 0===o?void 0:o.x)&&void 0!==a?a:0,d=null!==(u=null===(s=e.position)||void 0===s?void 0:s.y)&&void 0!==u?u:0;this.container.x=h+l,this.container.y=d+c,e.scale&&(this.designScale={x:e.scale.x,y:e.scale.y},this.container.scale.x=e.scale.x,this.container.scale.y=e.scale.y),e.rotation&&(this.container.rotation=e.rotation);var f=new Dd;f.drawRect(0,0,this.designWidth,this.designHeight),this.container.addChild(f),this.json.hardHidden&&(this.container.visible=!1),this.bound.x=h,this.bound.y=d,this.bound.width=this.designWidth,this.bound.height=this.designHeight}},{key:"scale",get:function(){return this.scaleOrigin},set:function(e){this.scaleOrigin.x=e.x,this.scaleOrigin.y=e.y,this.updateScale()}},{key:"design_ppt_w",get:function(){return Uv(this.designWidth/this.ctx.stageWidth)}},{key:"design_ppt_h",get:function(){return Uv((this.designHeight||this.container.height)/this.ctx.stageHeight)}},{key:"design_ppt_x",get:function(){return Uv(this.designX/this.ctx.stageWidth)}},{key:"design_ppt_y",get:function(){return Uv(this.designY/this.ctx.stageHeight)}},{key:"ppt_w",get:function(){return this.scaleExt.x*this.scaleOrigin.x*this.designWidth/this.ctx.stageWidth},set:function(e){this.designWidth&&(this.scaleExt.x=e*this.ctx.stageWidth/this.designWidth,this.updateScale())}},{key:"ppt_h",get:function(){var e=this.designHeight||this.container.height;return this.scaleExt.y*this.scaleOrigin.y*e/this.ctx.stageHeight},set:function(e){this.designHeight&&(this.scaleExt.y=e*this.ctx.stageHeight/this.designHeight,this.updateScale())}},{key:"ppt_x",get:function(){return(this.container.position.x-this.container.pivot.x)/this.ctx.stageWidth},set:function(e){this.pptX=e;var t=544===this.presetSubType?this.scaleExt.x:1;this.container.position.x=e*this.ctx.stageWidth+this.container.pivot.x*t}},{key:"ppt_y",get:function(){return(this.container.position.y-this.container.pivot.y)/this.ctx.stageHeight},set:function(e){this.pptY=e;var t=544===this.presetSubType?this.scaleExt.y:1;this.container.position.y=e*this.ctx.stageHeight+this.container.pivot.y*t}},{key:"r",get:function(){return this.container.rotation},set:function(e){this.container.rotation=e}},{key:"xshear",set:function(e){this.container.skew.x=e},get:function(){return this.container.skew.x}},{key:"yshear",set:function(e){this.container.skew.y=e},get:function(){return this.container.skew.y}}]),e}(),Gv=n(112),Hv=n.n(Gv),Vv=function(){function e(t){if(_(this,e),this._isInit=!1,this.h=0,this.s=0,this.l=0,this.a=1,t){this._isInit=!0;var n=t.match(/-?[0-9]+/g);n&&(this.h=parseInt(n[0],10),this.s=parseInt(n[1],10)/100,this.l=parseInt(n[2],10)/100)}}return T(e,[{key:"isInit",value:function(){return this._isInit}},{key:"by",value:function(e,t){t.h=Math.max(Math.min(this.h+e.h,359),0),t.s=Math.max(Math.min(this.s+e.s,1),0),t.l=Math.max(Math.min(this.l+e.l,1),0),t.a=Math.max(Math.min(this.a+e.a,1),0)}},{key:"fromHexString",value:function(e){var t,n,r=c(Xv(e),4),i=r[0],o=r[1],a=r[2],s=r[3],u=0,l=Math.max(i,o,a),h=Math.min(i,o,a),d=l-h;n=(l+h)/2,0===d?u=0:l===i?u=(o-a)/d%6*60:l===o?u=60*((a-i)/d+2):l===a&&(u=60*((i-o)/d+4)),t=0===d?0:d/(1-Math.abs(2*n-1)),this.h=u,this.s=t,this.l=n,this.a=s}},{key:"interpolationFrom",value:function(e,t,n){var r=e.h+(this.h-e.h)*t,i=e.s+(this.s-e.s)*t,o=e.l+(this.l-e.l)*t,a=e.a+(this.a-e.a)*t;n.h=Math.max(Math.min(r,359),0),n.s=Math.max(Math.min(i,1),0),n.l=Math.max(Math.min(o,1),0),n.a=Math.max(Math.min(a,1),0)}},{key:"toHexString",value:function(){var e=[0,0,0,0],t=this.h,n=this.s,r=this.l;if(t<360&&t>=0&&n<=1&&n>=0&&r<=1&&r>=0){var i,o=(1-Math.abs(2*r-1))*n,a=o*(1-Math.abs(t/60%2-1)),s=r-o/2;e=[(i=c(t>=0&&t<60?[o,a,0]:t>=60&&t<120?[a,o,0]:t>=120&&t<180?[0,o,a]:t>=180&&t<240?[0,a,o]:t>=240&&t<300?[a,0,o]:[o,0,a],3))[0]+s,i[1]+s,i[2]+s,this.a]}return Qv(e)}}]),e}(),Wv=function(){function e(t){_(this,e),this._isInit=!1,this.r=0,this.g=0,this.b=0,this.a=0,t&&(this._isInit=!0,this.fromHexString(t))}return T(e,[{key:"fromHexString",value:function(e){var t=c(Xv(e),4),n=t[0],r=t[1],i=t[2],o=t[3];this.r=n,this.g=r,this.b=i,this.a=o}},{key:"isInit",value:function(){return this._isInit}},{key:"interpolationFrom",value:function(e,t,n){n.r=e.r+(this.r-e.r)*t,n.g=e.g+(this.g-e.g)*t,n.b=e.b+(this.b-e.b)*t,n.a=e.a+(this.a-e.a)*t}},{key:"by",value:function(e,t){t.r=Math.min(Math.max(this.r+e.r,0),255),t.g=Math.min(Math.max(this.g+e.g,0),255),t.b=Math.min(Math.max(this.b+e.b,0),255),t.a=Math.min(Math.max(this.a+e.a,0),1)}},{key:"toHexString",value:function(){return Qv([this.r,this.g,this.b,this.a])}}]),e}();function Yv(e){var t=e.substring(1);return[parseInt(t.substring(0,6),16),parseInt(t.substring(6,8),16)/255]}function Xv(e){return 0===(e=e.replace(/^#/,"")).substring(6,8).length&&(e+="FF"),[parseInt(e.substring(0,2).padStart(8,"0"),16)/255,parseInt(e.substring(2,4).padStart(8,"0"),16)/255,parseInt(e.substring(4,6).padStart(8,"0"),16)/255,parseInt(e.substring(6,8).padStart(8,"0"),16)/255]}function Qv(e){return"#"+Math.round(255*e[0]).toString(16).padStart(2,"0")+Math.round(255*e[1]).toString(16).padStart(2,"0")+Math.round(255*e[2]).toString(16).padStart(2,"0")+Math.round(255*e[3]).toString(16).padStart(2,"0")}function Zv(e,t,n){var r=Xv(e),i=Xv(t),o=Math.round(255*(r[0]+(i[0]-r[0])*n)),a=Math.round(255*(r[1]+(i[1]-r[1])*n)),s=Math.round(255*(r[2]+(i[2]-r[2])*n)),u=Math.round(255*(r[3]+(i[3]-r[3])*n));return"#"+o.toString(16).padStart(2,"0")+a.toString(16).padStart(2,"0")+s.toString(16).padStart(2,"0")+u.toString(16).padStart(2,"0")}var qv=function(e){p(n,e);var t=m(n);function n(){var e;return _(this,n),(e=t.call(this,void 0,"\nvarying vec2 vTextureCoord;\n\nuniform vec4 color;\nuniform sampler2D uSampler;\n\nvoid main(void){\n vec4 texColor = texture2D(uSampler, vTextureCoord);\n\n if (texColor.a > 0.0) {\n vec4 resultColor = color;\n resultColor = resultColor * texColor.a;\n gl_FragColor = resultColor;\n } else {\n gl_FragColor = texColor;\n }\n}\n",{color:new Float32Array([0,0,0,0]),active:0})).currentColor="#FFFFFFFF",e.designColor="#FFFFFFFF",e}return T(n,[{key:"color",set:function(e){this.currentColor=e;var t=Xv(e);this.uniforms.color=Float32Array.from(t)},get:function(){return this.currentColor}}]),n}(Xl.k),Jv=new Up.ColorMatrixFilter;Jv.matrix=[1,0,0,0,-.2,0,1,0,0,-.2,0,0,1,0,-.2,0,0,0,1,0];var Kv=new Up.ColorMatrixFilter;Kv.matrix=[1,0,0,0,-.1,0,1,0,0,-.1,0,0,1,0,-.1,0,0,0,1,0];var $v=new Up.ColorMatrixFilter;$v.matrix=[1,0,0,0,.2,0,1,0,0,.2,0,0,1,0,.2,0,0,0,1,0];var em=new Up.ColorMatrixFilter;em.matrix=[1,0,0,0,.1,0,1,0,0,.1,0,0,1,0,.1,0,0,0,1,0];var tm={darken:Jv,darkenLess:Kv,lightenLess:em,lighten:$v},nm=function(e){p(n,e);var t=m(n);function n(e,r,i){var o;return _(this,n),(o=t.call(this,{position:{x:e.x,y:e.y},width:e.width,height:e.height},r,i)).fillColorFilter=new qv,o.fill=new Rv(y(o)),o.json=e,o.ctx=r,o.parentGlobalPos=i.parentGlobalPos,o.global={x:i.parentGlobalPos.x+e.x,y:i.parentGlobalPos.y+e.y},o.updateTransform({position:{x:e.x,y:e.y},width:e.width,height:e.height}),o}return T(n,[{key:"clearOnSlideChange",value:function(){}},{key:"initOnReuse",value:function(){}},{key:"getTextElement",value:function(){return null}},{key:"getBgElement",value:function(){return null}},{key:"fillActive",get:function(){var e,t;return(null!==(t=null===(e=this.container.filters)||void 0===e?void 0:e.length)&&void 0!==t?t:-1)>0},set:function(e){var t,n;e?(null!==(n=null===(t=this.container.filters)||void 0===t?void 0:t.indexOf(this.fillColorFilter))&&void 0!==n?n:-1)<0&&(this.container.filters=[this.fillColorFilter]):this.container.filters=[]}},{key:"renderContainer",get:function(){return this.container}},{key:"interactiveContainer",get:function(){return this.container}},{key:"ppt_x",get:function(){return this.global.x/this.ctx.stageWidth},set:function(e){var t=e*this.ctx.stageWidth-this.global.x,n=544===this.presetSubType?this.scaleExt.x:1;this.container.position.x=this.designX+t+this.container.pivot.x*n}},{key:"ppt_y",get:function(){return this.global.y/this.ctx.stageHeight},set:function(e){var t=e*this.ctx.stageHeight-this.global.y,n=544===this.presetSubType?this.scaleExt.y:1;this.container.position.y=this.designY+t+this.container.pivot.y*n}},{key:"design_ppt_x",get:function(){return Uv(this.global.x/this.ctx.stageWidth)}},{key:"design_ppt_y",get:function(){return Uv(this.global.y/this.ctx.stageHeight)}}]),n}(Fv),rm=function(){function e(t,n,r,i,o,a,s,u,l,c,h){_(this,e),this.ctx=t,this.type=n,this.lineWidth=r,this.width=i,this.height=o,this.fillColor=a,this.isHorz=s,this.renderContainer=new Rl.b,this.ghcTextureId="".concat(u,"-text-p").concat(l,"-l").concat(c,"-u").concat(h,"-underLine")}return T(e,[{key:"createPaths",value:function(){if("ww"===this.type)return null;var e,t="M 0,0 L ".concat(9525*this.width,",0"),n=[this.width,this.lineWidth],r=n[0],i=n[1];return this.isHorz||(t="M 0,0 L 0,"+9525*this.height,r=(e=[this.lineWidth,this.height])[0],i=e[1]),{paths:[{id:uv(),path:t,fill:"norm",hasStroke:!0,scale:{x:1,y:1},hash:_v()(t)}],width:r,height:i}}},{key:"getLineStyle",value:function(){var e={width:this.lineWidth};return"dotted"===this.type&&(e.dash=""+this.lineWidth),e}},{key:"preRender",value:function(){var e=this.createPaths();if(e){var t=e.paths,n=e.width,r=e.height,i=t.reduce((function(e,t){return e+t.hash}),"");this.ctx.graphicsTexture.addGraphics(this.ghcTextureId,t,i,{x:0,y:0},n,r,this.getLineStyle(),this.ctx.objectPoolGroup,!1,null,this.fillColor)}}},{key:"render",value:function(){if(this.ghcTextureId){var e=this.ctx.graphicsTexture.getGraphicsData(this.ghcTextureId);e&&(this.sprite=new Ld,this.sprite.texture=e.texture,this.sprite.pivot.x=e.pivot.x,this.sprite.scale.x=e.scale,this.sprite.scale.y=e.scale)}}},{key:"destroy",value:function(){var e;null===(e=this.sprite)||void 0===e||e.destroy({texture:!0})}}]),e}(),im=134217729;function om(e,t,n,r,i){var o,a,s,u,l=t[0],c=r[0],h=0,d=0;c>l==c>-l?(o=l,l=t[++h]):(o=c,c=r[++d]);var f=0;if(hl==c>-l?(s=o-((a=l+o)-l),l=t[++h]):(s=o-((a=c+o)-c),c=r[++d]),o=a,0!==s&&(i[f++]=s);hl==c>-l?(s=o-((a=o+l)-(u=a-o))+(l-u),l=t[++h]):(s=o-((a=o+c)-(u=a-o))+(c-u),c=r[++d]),o=a,0!==s&&(i[f++]=s);for(;h0!=s>0)return u;var l=Math.abs(a+s);return Math.abs(u)>=33306690738754716e-32*l?u:-function(e,t,n,r,i,o,a){var s,u,l,c,h,d,f,p,v,m,g,y,b,x,_,w,T,M,S=e-i,E=n-i,A=t-o,I=r-o;h=(_=(p=S-(f=(d=im*S)-(d-S)))*(m=I-(v=(d=im*I)-(d-I)))-((x=S*I)-f*v-p*v-f*m))-(g=_-(T=(p=A-(f=(d=im*A)-(d-A)))*(m=E-(v=(d=im*E)-(d-E)))-((w=A*E)-f*v-p*v-f*m))),sm[0]=_-(g+h)+(h-T),h=(b=x-((y=x+g)-(h=y-x))+(g-h))-(g=b-w),sm[1]=b-(g+h)+(h-w),h=(M=y+g)-y,sm[2]=y-(M-h)+(g-h),sm[3]=M;var C=function(e,t){for(var n=t[0],r=1;r=N||-C>=N)return C;if(s=e-(S+(h=e-S))+(h-i),l=n-(E+(h=n-E))+(h-i),u=t-(A+(h=t-A))+(h-o),c=r-(I+(h=r-I))+(h-o),0===s&&0===u&&0===l&&0===c)return C;if(N=11093356479670487e-47*a+33306690738754706e-32*Math.abs(C),(C+=S*c+I*s-(A*l+E*u))>=N||-C>=N)return C;h=(_=(p=s-(f=(d=im*s)-(d-s)))*(m=I-(v=(d=im*I)-(d-I)))-((x=s*I)-f*v-p*v-f*m))-(g=_-(T=(p=u-(f=(d=im*u)-(d-u)))*(m=E-(v=(d=im*E)-(d-E)))-((w=u*E)-f*v-p*v-f*m))),hm[0]=_-(g+h)+(h-T),h=(b=x-((y=x+g)-(h=y-x))+(g-h))-(g=b-w),hm[1]=b-(g+h)+(h-w),h=(M=y+g)-y,hm[2]=y-(M-h)+(g-h),hm[3]=M;var k=om(4,sm,4,hm,um);h=(_=(p=S-(f=(d=im*S)-(d-S)))*(m=c-(v=(d=im*c)-(d-c)))-((x=S*c)-f*v-p*v-f*m))-(g=_-(T=(p=A-(f=(d=im*A)-(d-A)))*(m=l-(v=(d=im*l)-(d-l)))-((w=A*l)-f*v-p*v-f*m))),hm[0]=_-(g+h)+(h-T),h=(b=x-((y=x+g)-(h=y-x))+(g-h))-(g=b-w),hm[1]=b-(g+h)+(h-w),h=(M=y+g)-y,hm[2]=y-(M-h)+(g-h),hm[3]=M;var D=om(k,um,4,hm,lm);h=(_=(p=s-(f=(d=im*s)-(d-s)))*(m=c-(v=(d=im*c)-(d-c)))-((x=s*c)-f*v-p*v-f*m))-(g=_-(T=(p=u-(f=(d=im*u)-(d-u)))*(m=l-(v=(d=im*l)-(d-l)))-((w=u*l)-f*v-p*v-f*m))),hm[0]=_-(g+h)+(h-T),h=(b=x-((y=x+g)-(h=y-x))+(g-h))-(g=b-w),hm[1]=b-(g+h)+(h-w),h=(M=y+g)-y,hm[2]=y-(M-h)+(g-h),hm[3]=M;var P=om(D,lm,4,hm,cm);return cm[P-1]}(e,t,n,r,i,o,l)}var fm=Math.pow(2,-52),pm=new Uint32Array(512),vm=function(){function e(t){_(this,e);var n=t.length>>1;if(n>0&&"number"!=typeof t[0])throw new Error("Expected coords to contain numbers.");this.coords=t;var r=Math.max(2*n-5,0);this._triangles=new Uint32Array(3*r),this._halfedges=new Int32Array(3*r),this._hashSize=Math.ceil(Math.sqrt(n)),this._hullPrev=new Uint32Array(n),this._hullNext=new Uint32Array(n),this._hullTri=new Uint32Array(n),this._hullHash=new Int32Array(this._hashSize).fill(-1),this._ids=new Uint32Array(n),this._dists=new Float64Array(n),this.update()}return T(e,null,[{key:"from",value:function(t){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_m,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:wm,i=t.length,o=new Float64Array(2*i),a=0;a>1,a=1/0,s=1/0,u=-1/0,l=-1/0,c=0;cu&&(u=h),d>l&&(l=d),this._ids[c]=c}for(var f,p,v,m=(a+u)/2,g=(s+l)/2,y=1/0,b=0;b0&&(p=T,y=M)}for(var S=e[2*p],E=e[2*p+1],A=1/0,I=0;IL&&(P[O++]=j,L=this._dists[j])}return this.hull=P.subarray(0,O),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(dm(_,w,S,E,N,k)<0){var B=p,U=S,z=E;p=v,S=N,E=k,v=B,N=U,k=z}var F=function(e,t,n,r,i,o){var a=n-e,s=r-t,u=i-e,l=o-t,c=a*a+s*s,h=u*u+l*l,d=.5/(a*l-s*u);return{x:e+(l*c-s*h)*d,y:t+(a*h-u*c)*d}}(_,w,S,E,N,k);this._cx=F.x,this._cy=F.y;for(var G=0;G0&&Math.abs(Q-V)<=fm&&Math.abs(Z-W)<=fm)&&(V=Q,W=Z,X!==f&&X!==p&&X!==v)){for(var q=0,J=0,K=this._hashKey(Q,Z);J=0;)if((ee=$)===q){ee=-1;break}if(-1!==ee){var te=this._addTriangle(ee,X,n[ee],-1,-1,r[ee]);r[X]=this._legalize(te+2),r[ee]=te,H++;for(var ne=n[ee];$=n[ne],dm(Q,Z,e[2*ne],e[2*ne+1],e[2*$],e[2*$+1])<0;)te=this._addTriangle(ne,X,$,r[X],-1,r[ne]),r[X]=this._legalize(te+2),n[ne]=ne,H--,ne=$;if(ee===q)for(;dm(Q,Z,e[2*($=t[ee])],e[2*$+1],e[2*ee],e[2*ee+1])<0;)te=this._addTriangle($,X,ee,-1,r[ee],r[$]),this._legalize(te+2),r[$]=te,n[ee]=ee,H--,ee=$;this._hullStart=t[X]=ee,n[ee]=t[ne]=X,n[X]=ne,i[this._hashKey(Q,Z)]=X,i[this._hashKey(e[2*ee],e[2*ee+1])]=ee}}}this.hull=new Uint32Array(H);for(var re=0,ie=this._hullStart;re0?3-i:1+i)/4*this._hashSize))%this._hashSize;var n,r,i}},{key:"_legalize",value:function(e){for(var t=this._triangles,n=this._halfedges,r=this.coords,i=0,o=0;;){var a=n[e],s=e-e%3;if(o=s+(e+2)%3,-1!==a){var u=a-a%3,l=s+(e+1)%3,c=u+(a+2)%3,h=t[o],d=t[e],f=t[l],p=t[c];if(gm(r[2*h],r[2*h+1],r[2*d],r[2*d+1],r[2*f],r[2*f+1],r[2*p],r[2*p+1])){t[e]=p,t[a]=h;var v=n[c];if(-1===v){var m=this._hullStart;do{if(this._hullTri[m]===c){this._hullTri[m]=e;break}m=this._hullPrev[m]}while(m!==this._hullStart)}this._link(e,v),this._link(a,n[o]),this._link(o,c);var g=u+(a+1)%3;i=n&&t[e[s]]>a;)e[s+1]=e[s--];e[s+1]=o}else{var u=n+1,l=r;xm(e,n+r>>1,u),t[e[n]]>t[e[r]]&&xm(e,n,r),t[e[u]]>t[e[r]]&&xm(e,u,r),t[e[n]]>t[e[u]]&&xm(e,n,u);for(var c=e[u],h=t[c];;){do{u++}while(t[e[u]]h);if(l=l-n?(bm(e,t,u,r),bm(e,t,n,l-1)):(bm(e,t,n,l-1),bm(e,t,u,r))}}function xm(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function _m(e){return e[0]}function wm(e){return e[1]}function Tm(e,t,n){var r=t/2,i=n/2,o=[{x:-r,y:i},{x:-r,y:-i},{x:r,y:i},{x:r,y:-i}],s=[zv.fromPointSlope({x:-r,y:0},Math.PI/2),zv.fromPointSlope({x:0,y:i},0),zv.fromPointSlope({x:r,y:0},Math.PI/2),zv.fromPointSlope({x:0,y:-i},0)],u=[],l=e.stopList.slice(1,e.stopList.length-1).map((function(o){for(var l,c,h,d=2*Math.PI,f=null!==(c=null===(l=e.line)||void 0===l?void 0:l.ang)&&void 0!==c?c:0;f>d;)f-=d;for(;f<0;)f+=d;var p={x:0,y:0};Bv(f,Math.PI/2)?(p.x=0,p.y=n/2-o.pos*n):Bv(f,0)?(p.x=o.pos*t-t/2,p.y=0):(p.x=o.pos*t-t/2,p.y=n/2-o.pos*n),f>Math.PI/2&&f<=Math.PI&&(p.x*=-1),f>Math.PI&&f<=2*Math.PI&&(p.y*=-1);var v=zv.fromPointSlope(p,Math.PI/2-((null===(h=e.line)||void 0===h?void 0:h.ang)||0)),m=s.map((function(e){return v.crossPoint(e)})).filter((function(e){return e&&e.x<=r&&e.x>=-r&&e.y<=i&&e.y>=-i})).map((function(e){return{point:e,color:o.color}})).sort((function(e,t){return t.point.y-e.point.y}));u.push.apply(u,a(m));for(var g=Math.abs(m[1].point.x-m[0].point.x)/10,y=20;y--;){var b=y%2==0?1:-1,x=p.x+b*g,_=v.resolveY(x);x<=r&&x>=-r&&_<=i&&_>=-i&&u.push({point:{x:x,y:_},color:o.color}),g+=g}return v})),c=[],h=[];e:for(var d=0;d= 0.49 || texColor.a < 0.9) {\n return vec4(1.0, 1.0, 1.0, 1.0) * texColor.a;\n } else {\n return vec4(0.0, 0.0, 0.0, 1.0) * texColor.a;\n }\n}\n",alphaModFix:"\nvec4 transform(vec4 texColor, float arg) {\n return texColor * arg;\n}\n",alphaBiLevel:"\nvec4 transform(vec4 texColor, float arg) {\n vec4 result = vec4(texColor);\n result.rgb = result.rgb / texColor.a;\n if (texColor.a < arg) {\n result.a = 0.0;\n } else {\n result.a = 1.0;\n }\n return result;\n}\n",alphaCeiling:"\nvec4 transform(vec4 texColor, float arg) {\n vec4 result = vec4(texColor);\n result.rgb = result.rgb / texColor.a;\n if (texColor.a > 0.0) {\n result.a = 1.0;\n }\n return result;\n}\n",alphaFloor:"\nvec4 transform(vec4 texColor, float arg) {\n vec4 result = vec4(texColor);\n result.rgb = result.rgb / texColor.a;\n if (texColor.a < 1.0) {\n result.a = 0.0;\n }\n return result;\n}\n",grayscl:"\nvec4 transform(vec4 texColor, float arg) {\n float avg = (texColor.r + texColor.g + texColor.b) / 3.0;\n return vec4(avg, avg, avg, texColor.a);\n}\n"},Am=function(e){p(n,e);var t=m(n);function n(e,r){var i;return _(this,n),t.call(this,void 0,(i=Em[e],"\nvarying vec2 vTextureCoord;\n\nuniform float arg;\nuniform sampler2D uSampler;\n\n".concat(Sm.map((function(e){return e+"\n"})).join("\n"),"\n\n").concat(i,"\n\nvoid main(void){\n vec4 texColor = texture2D(uSampler, vTextureCoord);\n gl_FragColor = transform(texColor, arg);\n}\n")),{arg:r})}return n}(Xl.k),Im=[Mm],Cm={clrChange:"\nvec4 transform(vec4 texColor, vec4 arg1, vec4 arg2) {\n float epsilon = 0.001;\n vec3 colorDiff = arg1.rgb - (texColor.rgb / max(texColor.a, 0.0000000001));\n float colorDistance = length(colorDiff);\n if (colorDistance < epsilon) {\n arg2.rgb *= arg2.a;\n return arg2;\n } else {\n return texColor;\n }\n}\n",changeBulletColor:"\nvec4 transform(vec4 texColor, vec4 arg1, vec4 arg2) {\n if (texColor.a == 0.0) {\n return texColor;\n } else {\n return arg2;\n }\n}\n",duotone:"\nvec4 transform(vec4 texColor, vec4 arg1, vec4 arg2) {\n float avg = (texColor.r + texColor.g + texColor.b) / 3.0;\n\n vec3 hsl = rgb2hsl(vec3(avg, avg, avg));\n\n vec3 result = arg2.rgb * hsl.z + arg1.rgb * (1.0 - hsl.z);\n\n return vec4(result * texColor.a, texColor.a);\n}\n"},Nm=function(e){p(n,e);var t=m(n);function n(e,r,i){var o;return _(this,n),t.call(this,void 0,(o=Cm[e],"\nvarying vec2 vTextureCoord;\n\nuniform vec4 arg1;\nuniform vec4 arg2;\nuniform sampler2D uSampler;\n\n".concat(Im.map((function(e){return e+"\n"})).join("\n"),"\n\n").concat(o,"\n\nvoid main(void){\n vec4 texColor = texture2D(uSampler, vTextureCoord);\n gl_FragColor = transform(texColor, arg1, arg2);\n}\n")),{arg1:Float32Array.from(r),arg2:Float32Array.from(i)})}return n}(Xl.k),km=[Mm],Dm={lum:"\nvec4 transform(vec4 texColor, float arg1, float arg2) {\n vec3 rgb = texColor.rgb / texColor.a;\n\n // 对比度\n highp float C = arg2 * 255.0;\n highp float F = (259.0 * (255.0 + C)) / (255.0 * (259.0 - C));\n rgb.rgb = F * (rgb.rgb - 0.5) + 0.5;\n\n // 亮度\n rgb.rgb += arg1;\n\n rgb.rgb *= texColor.a;\n return vec4(rgb, texColor.a);\n}\n"},Pm=function(e){p(n,e);var t=m(n);function n(e,r,i){var o;return _(this,n),t.call(this,void 0,(o=Dm[e],"\nvarying vec2 vTextureCoord;\n\nuniform float arg1;\nuniform float arg2;\nuniform sampler2D uSampler;\n\n".concat(km.map((function(e){return e+"\n"})).join("\n"),"\n\n").concat(o,"\n\nvoid main(void){\n vec4 texColor = texture2D(uSampler, vTextureCoord);\n gl_FragColor = transform(texColor, arg1, arg2);\n}\n")),{arg1:r,arg2:i})}return n}(Xl.k),Om=[Mm],Rm={alphaInv:"\nvec4 transform(vec4 texColor, vec4 arg1) {\n float alpha = 1.0 - texColor.a;\n arg1.rgb = arg1.rgb * alpha;\n arg1.a = alpha;\n return arg1;\n}\n"},Lm=function(e){p(n,e);var t=m(n);function n(e,r){var i;return _(this,n),t.call(this,void 0,(i=Rm[e],"\nvarying vec2 vTextureCoord;\n\nuniform vec4 arg1;\nuniform sampler2D uSampler;\n\n".concat(Om.map((function(e){return e+"\n"})).join("\n"),"\n\n").concat(i,"\n\nvoid main(void){\n vec4 texColor = texture2D(uSampler, vTextureCoord);\n gl_FragColor = transform(texColor, arg1);\n}\n")),{arg1:Float32Array.from(r)})}return n}(Xl.k);function jm(e,t){var n=[];return e.forEach((function(e){var r=((null==t?void 0:t.filter)||[]).indexOf(e.type)>=0;if(["biLevel","alphaBiLevel","alphaCeiling","alphaModFix","alphaFloor","grayscl"].indexOf(e.type)>=0&&r)n.push(new Am(e.type,e.args[0]||0));else if(["clrChange","changeBulletColor","duotone"].indexOf(e.type)>=0&&r){var i=Xv(e.args[0]),o=Xv(e.args[1]);n.push(new Nm(e.type,i,o))}else if("lum"===e.type&&r)n.push(new Pm(e.type,e.args[0],e.args[1]));else if("alphaInv"===e.type&&r){var a=Xv(e.args[0]);n.push(new Lm(e.type,a))}})),n}var Bm=function(){function e(t,n,r,i,o){_(this,e),this.ctx=t,this.fillStyle=n,this.width=r,this.height=i,this.config=o,this.clonedObjects=[],this._displayObject=null,this.gradientHash=_v()("".concat(JSON.stringify(n)).concat(Math.ceil(r)).concat(Math.ceil(i)))}return T(e,[{key:"createDisplayObject",value:function(){var e;if(!this.fillStyle)return null;if(this.config.useSlideBackgroundFill&&this.ctx.bgTexture){var t=new Ld;return t.texture=this.ctx.bgTexture,t}if("solidFill"===this.fillStyle.fillType||"noFill"===this.fillStyle.fillType)return null;if("gradientFill"===this.fillStyle.fillType){var n=new Ld,r=function(e,t,n){var r,i=new Rl.b;if(e.stopList.sort((function(e,t){return e.pos-t.pos})),!e.stopList.find((function(e){return 0===e.pos}))){var o=e.stopList[0];e.stopList.unshift({pos:0,color:o.color})}if(!e.stopList.find((function(e){return 1===e.pos}))){var s=e.stopList[e.stopList.length-1];e.stopList.push({pos:1,color:s.color})}var u=function(e){for(var t=[],n=0,r=e.length;n0&&this.config.useFilter&&(this.ctx.featureList||{}).filter&&(h.filters=jm(u,this.ctx.featureList)),this.config.fillFloat){var d=this.config.fillFloat.fillRect,f=d.l,p=d.t,v=d.r,m=d.b,g=this.width*(1-f-v),y=this.height*(1-p-m),b=null!==(e=this.config.shapeRotation)&&void 0!==e?e:0,x=new Dd;x.drawRect(0,0,g,y),x.pivot.x=g/2,x.pivot.y=y/2,x.rotation=b;var _=x.getBounds(),w=_.width,T=_.height;h.width=w,h.height=T,h.anchor.x=.5,h.anchor.y=.5,h.rotation=-1*b,h.name="math-texture",0===b?(h.position.x=w/2+f*this.width,h.position.y=T/2+p*this.height):(h.position.x=this.width/2,h.position.y=this.height/2)}else h.width=this.width,h.height=this.height,c.rotate&&(h.position.x=this.width/2,h.position.y=this.height/2,h.anchor.x=.5,h.anchor.y=.5,h.rotation=c.rotate/180*Math.PI);return h}}else if("gifFill"===this.fillStyle.fillType){var M=this.fillStyle,S=M.src,E=M.delays,A=M.filters,I=this.ctx.spriteTexture.getGifFrames(S).map((function(e,t){return{texture:e,time:E[t]||20}})),C=new jp(I,!0);C.name=uv(),C.width=this.width,C.height=this.height,A.length>0&&this.config.useFilter&&(this.ctx.featureList||{}).filter&&(C.filters=jm(A,this.ctx.featureList));var N=this.fillStyle.loop,k=1;return C.onLoop=function(){k+=1,N>0&&k>N&&C.gotoAndStop(C.totalFrames)},C}return null}},{key:"isSolidFill",value:function(){var e;return"solidFill"===(null===(e=this.fillStyle)||void 0===e?void 0:e.fillType)}},{key:"getSolidFillColor",value:function(){var e;return"solidFill"===(null===(e=this.fillStyle)||void 0===e?void 0:e.fillType)?this.fillStyle.color:"#000000"}},{key:"getClonedDisplayObject",value:function(){var e=this.createDisplayObject();return this.clonedObjects.push(e),e}},{key:"destroy",value:function(){var e;null===(e=this._displayObject)||void 0===e||e.destroy(),this._displayObject=null,this.clonedObjects.forEach((function(e){null==e||e.destroy()})),this.clonedObjects=[]}},{key:"displayObject",get:function(){return this._displayObject||(this._displayObject=this.createDisplayObject()),this._displayObject},set:function(e){this._displayObject&&this._displayObject.destroy({children:!0,texture:!0}),this._displayObject=e}},{key:"hasFill",get:function(){return!!this.fillStyle&&"noFill"!==this.fillStyle.fillType}}]),e}(),Um=function(e){p(n,e);var t=m(n);function n(){return _(this,n),t.apply(this,arguments)}return n}(Xl.k),zm=n(113),Fm=n.n(zm),Gm=n(114),Hm=n.n(Gm),Vm=function(e){p(n,e);var t=m(n);function n(e){var r;return _(this,n),(r=t.call(this,Fm.a,Hm.a,{uShapeFilterArea:new Float32Array([0,0,0,0]),uGlowColor:Xv(e.color),uSdfSampler:Xl.t.WHITE,uSdfReady:0,uSdfMaxDis:0,uRad:e.rad/2,uSdfPosition:new Float32Array([0,0])})).priority=3,r.json=e,r}return T(n,[{key:"filterAreaJustify",value:function(e){var t=Math.ceil(this.json.rad),n=Math.ceil(e.width+2*t),r=Math.ceil(e.height+2*t);return new jl.j(e.x-t,e.y-t,n,r)}},{key:"sdfBox",value:function(e,t){var n=Math.ceil(this.json.rad),r=Math.ceil(e+2*n),i=Math.ceil(t+2*n);return new jl.j(n,n,r,i)}}]),n}(Um),Wm=n(19),Ym=n.n(Wm),Xm=n(115),Qm=n.n(Xm),Zm=function(e){p(n,e);var t=m(n);function n(e){var r;return _(this,n),(r=t.call(this,Ym.a,Qm.a,{uShapeFilterArea:new Float32Array([0,0,0,0]),uRad:e.rad,uSdfSampler:Xl.t.WHITE,uSdfReady:0,uSdfMaxDis:1})).priority=2,r.json=e,r}return T(n,[{key:"filterAreaJustify",value:function(e){return e}},{key:"sdfBox",value:function(e,t){return new jl.j(0,0,e,t)}}]),n}(Um),qm=function e(){_(this,e)},Jm=n(116),Km=n.n(Jm),$m=function(e){p(n,e);var t=m(n);function n(e){return _(this,n),t.call(this,Ym.a,Km.a,{uColor:Xv(e)})}return n}(Xl.k),eg=function(e){p(n,e);var t=m(n);function n(e,r,i){var o;return _(this,n),(o=t.call(this)).order=1,o.outputTexture=Xl.t.WHITE,o.frameTextures=[],o.json=e,o.effectContainer=r,o.outputSprite=new Ld,o.targetScale=i,o.outputSprite.scale.x=o.json.sx,o.outputSprite.scale.y=o.json.sy,o.outputSprite.skew.x=(o.targetScale.x>0?1:-1)*o.json.kx,o.outputSprite.skew.y=(o.targetScale.y>0?1:-1)*o.json.ky,o.outputSprite.filters=[new Up.BlurFilter(o.json.blurRad/2,4),new $m(o.json.color)],o}return T(n,[{key:"updateFrame",value:function(e){var t=this.frameTextures[e];if(t){var n=this.effectContainer.getBounds(),r=(this.effectContainer.width-t.width)/2,i=(this.effectContainer.height-t.height)/2,o=new jl.g(n.x,n.y),a=new jl.g(n.x,n.y);switch(this.json.align){case"tl":a.x=n.x,a.y=n.y;break;case"t":a.x=n.x+n.width/2,a.y=n.y,o.x+=n.width/2;break;case"tr":a.x=n.x+n.width,a.y=n.y,o.x+=n.width;break;case"l":a.x=n.x,a.y=n.y+n.height/2,o.y+=n.height/2;break;case"ctr":a.x=n.x+n.width/2,a.y=n.y+n.height/2,o.x+=n.width/2,o.y+=n.height/2;break;case"r":a.x=n.x+n.width,a.y=n.y+n.height/2,o.x+=n.width,o.y+=n.height/2;break;case"bl":a.x=n.x,a.y=n.y+n.height,o.y+=n.height;break;case"b":a.x=n.x+n.width/2,a.y=n.y+n.height,o.x+=n.width/2,o.y+=n.height;break;case"br":a.x=n.x+n.width,a.y=n.y+n.height,o.x+=n.width,o.y+=n.height}var s=this.effectContainer.toLocal(a);this.outputSprite.pivot.x=s.x,this.outputSprite.pivot.y=s.y;var u=new jl.g(this.json.dist,0),l=new jl.d;l.rotate(this.json.dir),l.translate(o.x+r,o.y+i),l.apply({x:u.x,y:u.y},u);var c=this.effectContainer.toLocal(u);this.outputSprite.position.x=c.x,this.outputSprite.position.y=c.y,this.outputSprite.texture=t}}},{key:"createOutput",value:function(e,t){this.frameTextures[t]=e}},{key:"setFrameOffset",value:function(e,t){}}]),n}(qm),tg=n(117),ng=n.n(tg),rg=function(e){p(n,e);var t=m(n);function n(e,r){var i;return _(this,n),i=t.call(this,Ym.a,ng.a,{uStartAlpha:e.startAlpha,uEndAlpha:e.endAlpha,uStartPos:e.startPos,uEndPos:e.endPos,uHeight:r}),console.log(y(i)),i}return n}(Xl.k),ig=function(e){p(n,e);var t=m(n);function n(e,r,i,o,a){var s;_(this,n),(s=t.call(this)).order=2,s.outputSprite=new Ld,s.outputTexture=Xl.t.WHITE,s.frameTextures=[],s.json=e,s.shapeScaleX=o,s.effectContainer=r,s.rotation=i,s.ctx=a,s.outputSprite.anchor.x=.5,s.outputSprite.anchor.y=.5;var u=s.effectContainer.getBounds();return s.outputSprite.filters=[new Up.BlurFilter(s.json.blurRad/2,4),new rg(s.json,u.height)],s.outputSprite.alpha=.5,s.outputSprite.rotation=-1===s.shapeScaleX?Math.PI+2*s.rotation:Math.PI-2*s.rotation,s.outputSprite.scale.x=-1,s}return T(n,[{key:"updateFrame",value:function(e){var t=this.frameTextures[e];t&&(this.outputSprite.texture=t)}},{key:"createOutput",value:function(e,t){this.frameTextures[t]=e}},{key:"setFrameOffset",value:function(e,t){var n=this.effectContainer.getBounds(),r=new jl.g(n.x+n.width/2,n.y+n.height/2),i=new jl.g(r.x,r.y+n.height+this.json.dist),o=this.effectContainer.toLocal(i);this.outputSprite.position.x=o.x+e,this.outputSprite.position.y=o.y+t}}]),n}(qm),og=n(118),ag=n.n(og),sg=function(e){p(n,e);var t=m(n);function n(e){var r;return _(this,n),(r=t.call(this,Ym.a,ag.a,{})).priority=1,r.json=e,r}return T(n,[{key:"filterAreaJustify",value:function(e){return e}},{key:"sdfBox",value:function(){return null}}]),n}(Um),ug=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},lg=function(e){p(n,e);var t=m(n);function n(e,r,i,o,s,u){var l;_(this,n),(l=t.call(this)).effects=[],l.attachs=[],l.frames=new Map,l._targetContainer=new Rl.b,l.frameCount=1,l.ctx=o,l.originWidth=e.width,l.originHeight=e.height,l.cacheKey=i,l.sourceSprite=new Ld;var c,h=S(r);try{for(h.s();!(c=h.n()).done;){var d=c.value;switch(d.type){case"innerShadow":l.effects.push(new sg(d));break;case"softEdge":l.effects.push(new Zm(d));break;case"glow":l.effects.push(new Vm(d));break;case"reflection":l.attachs.push(new ig(d,e,s,u.x,l.ctx));break;case"outerShadow":l.attachs.push(new eg(d,e,u))}}}catch(e){h.e(e)}finally{h.f()}l.effects=l.effects.sort((function(e,t){return e.priority-t.priority})),l.attachs=l.attachs.sort((function(e,t){return e.order-t.order}));var f,p=S(l.attachs);try{for(p.s();!(f=p.n()).done;){var v=f.value;l._targetContainer.addChild(v.outputSprite)}}catch(e){p.e(e)}finally{p.f()}l.sourceSprite.name="effect-sprite";var m=new jl.j(0,0,l.originWidth,l.originHeight),g=l.effects.map((function(e){return e.filterAreaJustify(m)})),y=g.map((function(e){return e.x})),b=g.map((function(e){return e.y})),x=g.map((function(e){return e.width})),w=g.map((function(e){return e.height}));return l.filterArea=new jl.j(Math.min.apply(Math,a(y).concat([0])),Math.min.apply(Math,a(b).concat([0])),Math.max.apply(Math,a(x).concat([l.originWidth])),Math.max.apply(Math,a(w).concat([l.originHeight]))),l.sourceSprite.filters=l.effects,l.sourceSprite.filterArea=new jl.j(0,0,l.filterArea.width,l.filterArea.height),l._targetSprite=new Ld,l._targetSprite.name="effect-sprite",l._targetContainer.sortableChildren=!0,l._targetSprite.zIndex=999,l._targetContainer.addChild(l._targetSprite),l}return T(n,[{key:"getSdfTexture",value:function(e,t){return ug(this,void 0,void 0,regeneratorRuntime.mark((function n(){var r,i;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r="".concat(this.cacheKey,"_").concat(e),i=this.effects.map((function(e){return{sdfRect:e.sdfBox(t.width,t.height)}})).reduce((function(e,t){return t.sdfRect?(e.width5&&(t.dist=5),x[e]})),o.ctx.slideScopeEventHub.once("slide-render",(function(e){if(o.ctx.slideIndex===e&&o.effectObject){var t=o.getEffectTexture();if(t){var n=t.texture,r=t.offsetX,i=t.offsetY;o.effectObject.setFrameOffset(r,i),o.effectObject.createFrame(1,n)}}}))}return o}return T(n,[{key:"getEffectTexture",value:function(){var e,t=this.json,n=t.lineHeight,r=t.fillLineHeight,i=t.isHorz,o=t.lineWidth,a=this.effectContainer.getLocalBounds(),s=0,u=0,l=S(this.effectContainer.children);try{for(l.s();!(e=l.n()).done;){var c=e.value;c.pivot.x>s&&(s=c.pivot.x),c.pivot.y>u&&(u=c.pivot.y)}}catch(e){l.e(e)}finally{l.f()}var h=new jl.d;h.translate(s,u);var d=Xl.p.create({width:i?a.width:o,height:i?Math.max(r,n):a.height,resolution:2});return this.ctx.renderer.render(this.effectContainer,{renderTexture:d,transform:h}),{texture:d,offsetX:s,offsetY:u}}},{key:"createStrokeFill",value:function(){var e=this.json,t=e.stroke,n=e.lineWidth,r=e.lineHeight;return new Bm(this.ctx,null==t?void 0:t.fill,n,r,{useFilter:!1,useSlideBackgroundFill:!1})}},{key:"createStrokeGraphics",value:function(){var e=this.json.stroke,t=(null==e?void 0:e.key)?{fillType:"blipFill",src:e.key,filters:[]}:void 0;return new Bm(this.ctx,t,(null==e?void 0:e.width)||0,(null==e?void 0:e.height)||0,{useFilter:!1,useSlideBackgroundFill:!1})}},{key:"createTextFill",value:function(){var e=this.json,t=e.isHorz,n=e.fill,r=e.lineWidth,i=e.lineHeight,o=e.fillLineHeight;return t?new Bm(this.ctx,null==n?void 0:n.fill,r,Math.max(o,i),{useFilter:!1,useSlideBackgroundFill:!1}):new Bm(this.ctx,null==n?void 0:n.fill,o,i,{useFilter:!1,useSlideBackgroundFill:!1})}},{key:"createTextGraphics",value:function(){var e,t=this.json,n=t.fill,r=t.content,i="#000000";"solidFill"===(null===(e=null==n?void 0:n.fill)||void 0===e?void 0:e.fillType)&&(i=n.fill.color);var o=(null==n?void 0:n.key)?{fillType:"blipFill",src:n.key,filters:[{type:"changeBulletColor",args:["#000000",i]}]}:void 0;return new Bm(this.ctx,o,(null==n?void 0:n.width)||0,(null==n?void 0:n.height)||0,{useFilter:"◾"===r,useSlideBackgroundFill:!1})}},{key:"getIterateEntry",value:function(){return null}},{key:"getBgElement",value:function(){return null}},{key:"updateTransform",value:function(e){var t,r,i,o,a=this.json.isHorz;e.position={x:a&&null!==(r=null===(t=e.position)||void 0===t?void 0:t.x)&&void 0!==r?r:0,y:a?0:null!==(o=null===(i=e.position)||void 0===i?void 0:i.y)&&void 0!==o?o:0},e.width=a?this.json.width:this.json.lineWidth,e.height=a?this.json.lineHeight:this.json.height,f(x(n.prototype),"updateTransform",this).call(this,e)}},{key:"preRender",value:function(){var e;null===(e=this.underline)||void 0===e||e.preRender()}},{key:"render",value:function(e){var t=this;e.addSubMTask((function(){return cg(t,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.doRender();case 1:case"end":return e.stop()}}),e,this)})))}),"@TextUnitImpl[doRender]"),e.addSubMTask((function(){return cg(t,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,r=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.effectList&&this.effectList.length>0&&(n="".concat(this.ctx.taskId,"_").concat(this.ctx.slideIndex,"_").concat(null===(t=this.json.fill)||void 0===t?void 0:t.key,"_").concat(this.json.effectIndexList),this.effectObject=new lg(this.effectContainer,this.effectList,n,this.ctx,0,new jl.g(1,1)),this.effectObject.on("ready",(function(){var e;r.effectContainer.visible=!1,r.effectObject.container.zIndex=10,r.container.addChild(r.effectObject.container),null===(e=r.effectObject)||void 0===e||e.updateFrame(1)})));case 1:case"end":return e.stop()}}),e,this)})))}),"@ShapeImpl[post.render]")}},{key:"doRender",value:function(){var e=!1,t=this.json,n=t.lineWidth,r=t.lineHeight,i=t.baseLine,o=t.isHorz,a=t.underline,s=t.height,u=t.width,l=t.highlightColor,h=t.x,d=t.y,f=t.content,p=t.fillLineHeight,v=t.fill,m=!1!==this.json.needFill;if(v&&v.fill&&"solidFill"!==v.fill.fillType&&(m=!0),l){var g=new Dd,y=c(Yv(l),2),b=y[0],x=y[1];g.beginFill(b,x),g.drawRect(0,0,o?u:n,o?r:s),g.endFill(),this.textureContainer.addChild(g)}if(this.textGraphics.displayObject){var _=this.textGraphics.displayObject;if(o&&(_.position.y=d>0?d:0),m){var w=this.textFill.displayObject;if(w)w.mask=_,w.addChild(_),w.position.x=-h,_.position.x+=h,e=!0,this.textureContainer.addChild(w);else if(this.textFill.isSolidFill()){var T=new qv;T.color=this.textFill.getSolidFillColor(),_.filters=[T],e=!0,this.textureContainer.addChild(_)}}else this.textureContainer.addChild(_)}if(this.strokeGraphics.displayObject){var M=this.strokeGraphics.displayObject;if(m){var S=this.strokeFill.displayObject;if(S)S.mask=M,S.addChild(M),o?S.position.y=d>0?d:0:S.position.x=h,this.textureContainer.addChild(S);else if(this.strokeFill.isSolidFill()){o?M.position.y=d>0?d:0:M.position.x=h;var E=new qv;E.color=this.strokeFill.getSolidFillColor(),M.filters=[E],e=!0,this.textureContainer.addChild(M)}}else o?M.position.y=d>0?d:0:M.position.x=h,this.textureContainer.addChild(M)}if(this.underline&&(this.underline.render(),this.underline.sprite)){o?(this.underline.sprite.position.y=a?a-r/16:i,this.underline.sprite.position.x=0):(this.underline.sprite.position.x=0,this.underline.sprite.position.y=0);var A=this.textFill.getClonedDisplayObject();A?(A.mask=this.underline.sprite,A.addChild(this.underline.sprite),this.textureContainer.addChild(A)):this.textureContainer.addChild(this.underline.sprite)}if(e){var I=Xl.p.create({width:o?u:n,height:o?Math.max(p,r):s,resolution:this.ctx.renderer.resolution});this.ctx.renderer.render(this.textureContainer,{renderTexture:I}),this.cacheSprite.texture=I,o&&d<0&&(this.cacheSprite.position.y=d),this.effectContainer.addChild(this.cacheSprite)}else this.effectContainer.addChild(this.textureContainer);this.container.name=f}},{key:"destroy",value:function(){this.textFill.destroy(),this.textGraphics.destroy(),this.strokeFill.destroy(),this.strokeGraphics.destroy(),this.cacheSprite.texture.destroy(!0),this.cacheSprite.destroy(),this.textureContainer.destroy(),this.container.destroy()}}]),n}(nm),dg=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},fg=function(e){p(n,e);var t=m(n);function n(e,r,i){var o;return _(this,n),(o=t.call(this,e,r,i)).units=[],o.isHorz=!0,o.hyperLinkMap=new Map,o.hyperLinkContainerMap=new Map,o.effectList=[],i.effectList&&(o.effectList=i.effectList),o}return T(n,[{key:"getIterateElements",value:function(){return this.units}},{key:"getIterateEntry",value:function(e,t,n){return this.units[t]?this.units[t]:(this.ctx.eventHub.emit("IterateTimeNodeEnd",n),null)}},{key:"preRender",value:function(){}},{key:"createUnits",value:function(e,t,n,r){for(var i=this,o=function(o,a){r.addSubMTask((function(){return dg(i,void 0,void 0,regeneratorRuntime.mark((function r(){var i,a,s,u,l,c,h,d,f,p;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:i=this.json.textUnits[o],a=this.json,s=a.height,u=a.width,l=a.fillHeight,c=a.baseline,h=a.y,d=a.underline,(f=new hg(Object.assign(Object.assign({},i),{lineHeight:s,lineWidth:u,baseLine:c-h,underline:d,fillLineHeight:l||s,isHorz:this.isHorz,shapeId:e,paragraphIndex:t,lineIndex:n,unitIndex:o}),this.ctx,{parentGlobalPos:this.global,effectList:this.effectList})).preRender(),this.units.push(f),(i.hyperlink||i.hlinkHover)&&(p=new jv(f.container,this.ctx),i.hyperlink&&p.addAction(i.hyperlink,"click"),i.hlinkHover&&p.addAction(i.hlinkHover,"hover"),this.container.sortableChildren=!0);case 2:case"end":return r.stop()}}),r,this)})))}),"@TextLineImpl[createUnits]")},a=0,s=this.json.textUnits.length;a0)return this.iterateElements;var e=this.lines.reduce((function(e,t){return e.concat(t.getIterateElements())}),[]);return this.iterateElements=e,e}},{key:"getIterateEntry",value:function(e,t,n){var r=this.getIterateElements();return r[t]?r[t]:(this.ctx.eventHub.emit("IterateTimeNodeEnd",n),null)}},{key:"preRender",value:function(){}},{key:"createLines",value:function(e,t,n){for(var r=this,i=function(i,o){n.addSubMTask((function(){return pg(r,void 0,void 0,regeneratorRuntime.mark((function r(){var o,a;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:o=this.json.lines[i],(a=new fg(o,this.ctx,{parentGlobalPos:this.global,effectList:this.effectList})).isHorz=this.isHorz,a.container.name="line-"+i,a.createUnits(e,t,i,n),this.lines.push(a);case 2:case"end":return r.stop()}}),r,this)})))}),"@TextParagraphImpl[createLines]")},o=0,a=this.json.lines.length;o90&&o<270||o<-90&&o>-270)&&(r=-r),i=-a*r}return{x:r,y:i}}((i=-i)/Math.PI*180,n,r),s=e.x-a.x,u=e.y-a.y;return{centerX:s/9525*t.x,centerY:u/9525*t.y,rx:n/9525*t.x,ry:r/9525*t.y,st:-i,end:-i+o,aClockWise:o<0}}function gg(e){for(var t=new os,n=e.scale,r={x:0,y:0},i=e.path.trim().split(" "),o=0;o=0&&(d=xg(s.paths[0].path,this.json.width,this.json.height,i,o),s.paths.unshift(Object.assign(Object.assign({},s.paths[0]),{path:d}))),f=function(e,t,n,r){if(!bg[n])return null;var i=bg[n].top(gg(t)),o=bg[n].bottom(gg(e));if(i.length!==o.length)return null;for(var a=Math.min(i.length,o.length),s=1/(a-1),u=[],l=[],c=new Array(2*a).fill("").map((function(e,t){return t})),h=0;h0&&(this.textColorFilter.color=e)},get:function(){return this.textColorFilter.color}},{key:"on",get:function(){var e;return(null!==(e=this.container.filters)&&void 0!==e?e:[]).length>0?"true":"false"},set:function(e){var t;"true"===e?(null!==(t=this.container.filters)&&void 0!==t?t:[]).indexOf(this.textColorFilter)<0&&(this.container.filters=[this.textColorFilter]):this.container.filters=[]}}]),e}(),Tg=function(){function e(t){_(this,e),this.scaleX=1,this.scaleY=1,this.pivot={x:0,y:0},this.paths=[],this.hash="",this.width=0,this.height=0,this.graphicsId="",this.textureId="",this.id=t.id,this.type=t.type,this.heightSize=t.heightSize,this.widthSize=t.widthSize,this.fillStyle=t.fillStyle||{fillType:"solidFill",color:"#ffffffff"},this.lineWidth=t.lineWidth||1,this.position=t.position||{x:0,y:0},this.rotate=t.rotation||1,this.path=this.getUnitPath(),this.setScaleFromLineWidth(),this.setScaleFromSize(),this.generatePaths(),this.setPivot()}return T(e,[{key:"setPivot",value:function(){switch(this.type){case"oval":case"diamond":this.pivot={x:this.width/2,y:this.height/2};break;case"triangle":this.pivot={x:.7*this.width,y:this.height/2};break;default:this.pivot={x:this.width,y:this.height/2}}}},{key:"generatePaths",value:function(){this.hash="arrow-"+_v()(this.path+this.scaleX+this.scaleY),this.paths=[{id:this.id,path:this.path,fill:"norm",hasStroke:!1,hash:this.hash,scale:{x:this.scaleX,y:this.scaleY}}]}},{key:"getUnitPath",value:function(){switch(this.type){case"stealth":return"M 0,0 L 95250,47625 L 0,95250 L 28575,47625 C C";case"oval":return"M 0,47625 A 47625,47625,-3.14159265,6.2831853 C C";case"diamond":return"M 47625,0 L 95250,47625 L 47625,95250 L 0,47625 C C";case"arrow":return"M 9525,0 L 95250,47625 L 9525,95250 L 0,85725 L 68389.5,47625 L 0,9525 C C";case"triangle":return"M 0,0 L 95250,47625 L 0,95250 C C";default:return""}}},{key:"setScaleFromLineWidth",value:function(){switch(this.type){case"stealth":case"oval":case"diamond":case"arrow":case"triangle":this.scaleX*=.29*this.lineWidth+.7,this.scaleY*=.29*this.lineWidth+.7;break;default:throw new Error("can't match any arrow type!")}}},{key:"setScaleFromSize",value:function(){switch(this.type){case"stealth":case"oval":case"diamond":case"arrow":case"triangle":this.scaleX*=1,this.scaleY*=1;break;default:throw new Error("can't match any arrow type!")}switch(this.widthSize){case"sm":this.scaleX*=3/4;break;case"lg":this.scaleX*=1.25;break;case"med":this.scaleX*=1}switch(this.heightSize){case"sm":this.scaleY*=3/4;break;case"lg":this.scaleY*=1.25;break;case"med":this.scaleY*=1}this.width=10*this.scaleX,this.height=10*this.scaleY}}]),e}(),Mg=function(){function e(t,n,r,i,o,a,s,u,l,c,h){_(this,e),this.id=t,this.ctx=n,this.paths=r,this.hash=i,this.nept=o,this.width=a,this.height=s,this.lineStyle=u,this.shouldFill=l,this.bgColor=c,this.lnColor=h,this.clonedObjects=[],this._displayObject=null,this.isRectangle=!1,this.isPureRect=!1,this.isColoredPureRect=!1,this.isRectangle=this.rectangleDetect(r),this.isRectangle&&l?this.bgColor?this.isColoredPureRect=!0:this.isPureRect=!0:this.ctx.graphicsTexture.addGraphics(this.id,this.paths,this.hash,this.nept,this.width,this.height,this.lineStyle,this.ctx.objectPoolGroup,this.shouldFill,this.bgColor,this.lnColor)}return T(e,[{key:"pointDis",value:function(e,t){return Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)}},{key:"isPoint",value:function(e){return Number.isNaN(Number(e.x))||Number.isNaN(Number(e.y))}},{key:"isSquare",value:function(e,t){var n=this;if("MLLLC"!==e.join("")&&"MLLLCC"!==e.join(""))return!1;var r=t.filter((function(e){return!n.isPoint(e)}));if(4!==r.length)return!1;var i,o=Math.min.apply(Math,a(r.map((function(e){return e.x})))),s=Math.min.apply(Math,a(r.map((function(e){return e.y})))),u=Math.max.apply(Math,a(r.map((function(e){return e.x})))),l=Math.max.apply(Math,a(r.map((function(e){return e.y})))),c=S(r);try{for(c.s();!(i=c.n()).done;){var h=i.value;if(h.x!==o&&h.x!==u||h.y!==s&&h.y!==l)return!1}}catch(e){c.e(e)}finally{c.f()}return!0}},{key:"rectangleDetect",value:function(e){if(1!==e.length)return!1;var t=e[0].path.trim().split(" ");if(10!==t.length)return!1;for(var n=[],r=[],i=0;in&&(n=o.pivot.x),o.pivot.y>r&&(r=o.pivot.y)}}catch(e){i.e(e)}finally{i.f()}var a=new jl.d;if(a.translate(n,r),0===this.effectContainer.children.length)return null;var s=Xl.p.create({width:t.width,height:t.height,resolution:this.ctx.renderer.resolution});return this.ctx.renderer.render(this.effectContainer,{renderTexture:s,transform:a}),{texture:s,offsetX:n,offsetY:r}}},{key:"createStrokeGraphics",value:function(){var e,t,n,r,i=this.json,o=i.id,a=i.geometry,s=i.lineStyle,u=(null==a?void 0:a.lineTransform)||Eg,l=u.width,c=u.height,h=u.pivot,d=l||this.json.width,f=c||this.json.height,p="solidFill"===(null===(e=null==s?void 0:s.fill)||void 0===e?void 0:e.fillType)?s.fill.color:null;return s&&"noFill"!==(null===(t=s.fill)||void 0===t?void 0:t.fillType)?new Mg(o+"-path-graphics",this.ctx,null!==(n=null==a?void 0:a.paths)&&void 0!==n?n:[],null!==(r=null==a?void 0:a.hash)&&void 0!==r?r:"",h||{x:0,y:0},d,f,s,!1,null,p):null}},{key:"createStrokeFill",value:function(){var e=c(this.calculateFillObjectOffset(),2),t=e[0],n=e[1],r=this.json,i=r.geometry,o=r.lineStyle,a=r.width,s=r.height,u=(null==i?void 0:i.lineTransform)||Eg,l=Tv()(null==o?void 0:o.width)?o.width:1;return new Bm(this.ctx,null==o?void 0:o.fill,(u.width||a)+l+t,Math.max((u.height||s)+l,n),{useFilter:!0,useSlideBackgroundFill:!1})}},{key:"createBackgroundGraphics",value:function(){var e,t=this.json,n=t.geometry,r=t.lineStyle,i=t.fillStyle,o=t.id,a=(null==n?void 0:n.lineTransform)||Eg,s=a.width,u=a.height,l=a.pivot,c=s||this.json.width,h=u||this.json.height,d="solidFill"===(null==i?void 0:i.fillType)?i.color:null;return i&&"noFill"!==i.fillType||this.json.isPicture?new Mg(o+"-bg-graphics",this.ctx,null!==(e=null==n?void 0:n.paths)&&void 0!==e?e:[],(null==n?void 0:n.hash)||"",l||{x:0,y:0},c,h,r,!0,d,null):null}},{key:"createBackgroundFill",value:function(){var e,t,n,r,i=this.json,o=i.fillStyle,a=i.width,s=i.height,u=i.lineStyle,l=i.geometry,c=(null==l?void 0:l.fillTransform)||Eg,h={useFilter:!0,useSlideBackgroundFill:this.json.useBgFill,fillFloat:this.json.fillFloat,shapeRotation:this.json.rotation},d=this.useGroupFill&&(null===(e=this.option.groupSize)||void 0===e?void 0:e.w)?this.option.groupSize.w:c.width||a,f=this.useGroupFill&&(null===(t=this.option.groupSize)||void 0===t?void 0:t.h)?this.option.groupSize.h:c.height||s;return new Bm(this.ctx,o,d+(null!==(n=null==u?void 0:u.width)&&void 0!==n?n:0),f+(null!==(r=null==u?void 0:u.width)&&void 0!==r?r:0),h)}},{key:"createBackground",value:function(){var e,t,n,r,i,o,a,s,u,l,c,h,d=(null===(e=this.json.geometry)||void 0===e?void 0:e.fillTransform)||Eg,f=d.pivot,p=d.width,v=d.height,m=this.backgroundFill.displayObject;m?(this.json.useBgFill&&(null===(n=this.backgroundGraphics)||void 0===n?void 0:n.displayObject)?(this.needCacheAsBitMap=!0,m.mask=this.backgroundGraphics.displayObject,m.pivot.x=(null===(r=this.json.position)||void 0===r?void 0:r.x)||0,m.pivot.y=(null===(i=this.json.position)||void 0===i?void 0:i.y)||0,this.effectContainer.addChild(this.backgroundGraphics.displayObject)):"gifFill"===(null===(o=this.json.fillStyle)||void 0===o?void 0:o.fillType)?(m.height=v||this.designHeight,m.width=p||this.designWidth,m instanceof jp&&m.play(),(null===(a=this.backgroundGraphics)||void 0===a?void 0:a.isNeedMask(m.width,m.height))&&(m.mask=this.backgroundGraphics.displayObject,this.backgroundGraphics.displayObject&&this.effectContainer.addChild(this.backgroundGraphics.displayObject))):(null===(s=this.backgroundGraphics)||void 0===s?void 0:s.isNeedMask(m.width,m.height))&&(this.json.fillFloat||(this.needCacheAsBitMap=!0,m.mask=this.backgroundGraphics.displayObject,this.backgroundGraphics.displayObject&&this.effectContainer.addChild(this.backgroundGraphics.displayObject))),this.json.fillFloat||(m.x=f.x,m.y=f.y),this.useGroupFill&&(m.x-=null!==(l=null===(u=this.json.position)||void 0===u?void 0:u.x)&&void 0!==l?l:0,m.y-=null!==(h=null===(c=this.json.position)||void 0===c?void 0:c.y)&&void 0!==h?h:0),this.effectContainer.addChild(m)):this.backgroundFill.hasFill&&(null===(t=this.backgroundGraphics)||void 0===t?void 0:t.displayObject)&&this.effectContainer.addChild(this.backgroundGraphics.displayObject)}},{key:"createPathFill",value:function(){var e,t,n,r=this.strokeFill.displayObject,i=null===(e=this.strokeGraphics)||void 0===e?void 0:e.displayObject,o=c(this.calculateFillObjectOffset(),2),a=o[0],s=o[1];r?((null===(t=this.strokeGraphics)||void 0===t?void 0:t.isNeedMask(r.width,r.height))&&i&&(this.needCacheAsBitMap=!0,r.pivot.x=i.pivot.x,r.pivot.y=i.pivot.y,i.pivot.x=0,i.pivot.y=0,r.mask=i,r.addChild(i),r.position.x=-a/2,r.position.y=-s/2,i.position.x=a/2,i.position.y=s/2),this.effectContainer.addChild(r)):this.strokeFill.hasFill&&(null===(n=this.strokeGraphics)||void 0===n?void 0:n.displayObject)&&this.effectContainer.addChild(this.strokeGraphics.displayObject)}},{key:"createFilledPathMask",value:function(){var e,t,n,r,i=(null===(t=null===(e=this.json.geometry)||void 0===e?void 0:e.paths)||void 0===t?void 0:t.filter((function(e){return"none"!==e.fill&&"norm"!==e.fill})))||[],o=S(i);try{for(o.s();!(r=o.n()).done;){var a=r.value,s=this.ctx.graphicsTexture.getGraphicsData(a.id);if(s){var u=new Ld(s.texture);u.pivot.x=s.pivot.x,u.pivot.y=s.pivot.y,u.scale.x=s.scale,u.scale.y=s.scale;var l=this.backgroundFill.getClonedDisplayObject(),c=null===(n=this.backgroundGraphics)||void 0===n?void 0:n.getClonedDisplayObject(),h=l||c;h&&(this.backgroundFill.displayObject&&(h.pivot.x=this.backgroundFill.displayObject.pivot.x,h.pivot.y=this.backgroundFill.displayObject.pivot.y),h.mask=u,h.filters=[tm[a.fill]],this.needCacheAsBitMap=!0,this.effectContainer.addChild(h),this.effectContainer.addChild(u))}}}catch(e){o.e(e)}finally{o.f()}}},{key:"createArrow",value:function(){var e=this;this.arrowList.length&&this.arrowList.forEach((function(t){var n,r=e.ctx.graphicsTexture.getGraphicsData(t.graphicsId);if(r){var i=r.texture,o=new Ld(i);o.pivot.x=t.pivot.x,o.pivot.y=t.pivot.y,o.position.x=t.position.x,o.position.y=t.position.y,o.rotation=t.rotate/180*Math.PI,o.scale.x=r.scale,o.scale.y=r.scale,null===(n=e.backgroundGraphics)||void 0===n||n.addArrows(o)}}))}},{key:"generateArrowList",value:function(){var e,t,n=this,r=this.json,i=r.lineArrowList,o=r.lineStyle,a=r.id,s="solidFill"===(null===(e=null==o?void 0:o.fill)||void 0===e?void 0:e.fillType)?o.fill.color:null;null===(t=i||[])||void 0===t||t.forEach((function(e,t){var r,i,u=new Tg(Object.assign(Object.assign({},e),{fillStyle:null==o?void 0:o.fill,lineWidth:null!==(r=null==o?void 0:o.width)&&void 0!==r?r:0}));u.graphicsId="".concat(a,"-arrow-").concat(t,"-graphics"),u.textureId="".concat(a,"-arrow-").concat(t,"-fill"),n.ctx.graphicsTexture.addGraphics(u.graphicsId,null!==(i=u.paths)&&void 0!==i?i:[],u.hash,{x:0,y:0},u.width,u.height,void 0,n.ctx.objectPoolGroup,!0,s,null),n.arrowList.push(u)}))}},{key:"calculateFillObjectOffset",value:function(){var e=0,t=0;return this.arrowList.length&&(e=this.arrowList.reduce((function(e,t){return Math.max(e,t.width)}),0),t=this.arrowList.reduce((function(e,t){return Math.max(e,t.height)}),0)),[e,t]}},{key:"preRender",value:function(e){var t,n,r,i=this,o=this.json,a=o.lineStyle,s=o.geometry,u=(null==s?void 0:s.lineTransform)||Eg,l=u.width,c=u.height,h=l||this.json.width,d=c||this.json.height,f=(null===(t=null==s?void 0:s.paths)||void 0===t?void 0:t.filter((function(e){return"none"!==e.fill&&"norm"!==e.fill})))||[],p="solidFill"===(null===(n=null==a?void 0:a.fill)||void 0===n?void 0:n.fillType)?a.fill.color:null;e.addSubMTask((function(){return Sg(i,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=S(f);try{for(t.s();!(n=t.n()).done;)r=n.value,this.ctx.graphicsTexture.addGraphics(r.id,[r],r.hash,((null==s?void 0:s.lineTransform)||Eg).pivot,h,d,a,this.ctx.objectPoolGroup,!0,null,p)}catch(e){t.e(e)}finally{t.f()}case 2:case"end":return e.stop()}}),e,this)})))}),"@ShapeImpl[addGraphics]"),null===(r=this.text)||void 0===r||r.createParagraphs(this.json.id,e)}},{key:"subClassRender",value:function(){return Sg(this,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))}},{key:"render",value:function(e){var t=this;e.addSubMTask((function(){return Sg(t,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return null===(t=this.strokeGraphics)||void 0===t||t.render(),null===(n=this.backgroundGraphics)||void 0===n||n.render(),this.createBackground(),e.next=5,this.subClassRender();case 5:this.createFilledPathMask(),this.createPathFill(),this.createArrow();case 8:case"end":return e.stop()}}),e,this)})))}),"@ShapeImpl[render]"),this.text&&this.text.render(e),e.addSubMTask((function(){return Sg(t,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,r,i,o,a,s,u,l,c,h,d,f,p,v,m,g,y,b,x,_,w,T,M,S,E,A,I,C=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:"wd"===(null===(t=this.json.textBody)||void 0===t?void 0:t.iterateType)||"lt"===(null===(n=this.json.textBody)||void 0===n?void 0:n.iterateType)?(this.renderContainer.addChild(this.container),this.text&&(p=null!==(r=this.json.scale)&&void 0!==r?r:{x:1,y:1},v=p.x,m=p.y,this.text.container.scale.x=m<0?-Math.abs(v):Math.abs(v),this.text.container.scale.y=m,this.text.container.position.x=(null!==(o=null===(i=this.json.position)||void 0===i?void 0:i.x)&&void 0!==o?o:0)+this.text.x,this.text.container.position.y=(null!==(s=null===(a=this.json.position)||void 0===a?void 0:a.y)&&void 0!==s?s:0)+this.text.y,this.text.container.scale.y<0&&(this.text.container.position.y+=this.text.height),this.text.container.scale.x<0&&(this.text.container.position.x+=this.json.width),this.json.textRotation&&(this.text.container.rotation=this.json.textRotation),this.renderContainer.addChild(this.text.container))):(this.text&&(this.json.textRotation&&(this.text.container.rotation=this.json.textRotation,g=this.text,y=g.width,b=g.height,x=this.text.container.position,_=x.x,w=x.y,this.text.container.pivot.x=y/2,this.text.container.pivot.y=b/2,this.text.container.x=_+y/2,this.text.container.y=w+b/2),Hv()(this.json.textRotateWithShape)&&!this.json.textRotateWithShape&&(T=this.json.rotation||0,this.text.container.rotation=-T,M=this.text.width,this.text.container.position.x=M),this.text.container.zIndex=100,S=null===(u=this.json.effectList)||void 0===u?void 0:u.find((function(e){return"outerShadow"===e.type})),E=null===(l=this.json.effectList)||void 0===l?void 0:l.find((function(e){return"softEdge"===e.type})),A=null===(c=this.json.effectList)||void 0===c?void 0:c.find((function(e){return"glow"===e.type})),S&&1!==S.sx||E||A?this.container.addChild(this.text.container):this.effectContainer.addChild(this.text.container)),this.renderContainer.addChild(this.container)),this.needCacheAsBitMap,"background"===this.json.id&&this.ctx.hasBackgroundFillShape&&(I=Xl.p.create({width:this.json.width,height:this.json.height,resolution:Math.ceil(this.ctx.renderer.resolution)}),this.ctx.renderer.render(this.renderContainer,{renderTexture:I}),this.ctx.bgTexture=I),this.json.effectList&&this.json.effectList.length>0&&(null===(h=this.ctx.featureList)||void 0===h?void 0:h.effect)&&!this.ctx.forceCanvas&&!this.json.media&&(this.effectObject=new lg(this.effectContainer,this.json.effectList,"".concat(this.ctx.taskId,"_").concat(this.ctx.slideIndex,"_").concat(this.json.id),this.ctx,this.json.rotation||0,new jl.g((null===(d=this.json.scale)||void 0===d?void 0:d.x)||1,(null===(f=this.json.scale)||void 0===f?void 0:f.y)||1)),function(e){var t,n,r;return"gifFill"===(null===(t=e.fillStyle)||void 0===t?void 0:t.fillType)||"gifFill"===(null===(r=null===(n=e.lineStyle)||void 0===n?void 0:n.fill)||void 0===r?void 0:r.fillType)||!!e.picFill&&"gifFill"===e.picFill.fillType}(this.json)&&this.effectObject.setFrameCount(-1),this.effectObject.on("ready",(function(){var e;C.effectContainer.visible=!1,C.effectObject.container.zIndex=10,C.container.addChild(C.effectObject.container),null===(e=C.effectObject)||void 0===e||e.updateFrame(1)})));case 3:case"end":return e.stop()}}),e,this)})))}),"@ShapeImpl[post.render]")}},{key:"clearOnSlideChange",value:function(){}},{key:"initOnReuse",value:function(){}},{key:"destroy",value:function(){var e,t,n,r;null===(e=this.text)||void 0===e||e.destroy(),this.fillColorFilter.destroy(),this.strokeColorFilter.destroy(),this.backgroundFill.destroy(),null===(t=this.backgroundGraphics)||void 0===t||t.destroy(),this.strokeFill.destroy(),null===(n=this.strokeGraphics)||void 0===n||n.destroy(),this.renderContainer.destroy(),null===(r=this.arrowRenderTexture)||void 0===r||r.destroy(!0),this.arrowList=[],this.effectDisposer()}},{key:"interactiveContainer",get:function(){return this.renderContainer}},{key:"strokeActive",get:function(){var e,t,n,r,i,o,a;return this.strokeFill.displayObject?(null!==(n=null===(t=null===(e=this.strokeFill.displayObject)||void 0===e?void 0:e.filters)||void 0===t?void 0:t.length)&&void 0!==n?n:-1)>0:(null!==(a=null===(o=null===(i=null===(r=this.strokeGraphics)||void 0===r?void 0:r.displayObject)||void 0===i?void 0:i.filters)||void 0===o?void 0:o.length)&&void 0!==a?a:-1)>0},set:function(e){var t,n,r,i,o,a,s=this.strokeFill.displayObject;e?s&&(null!==(n=null===(t=s.filters)||void 0===t?void 0:t.indexOf(this.strokeColorFilter))&&void 0!==n?n:-1)<0?s.filters=[this.strokeColorFilter]:(null===(r=this.strokeGraphics)||void 0===r?void 0:r.displayObject)&&(null!==(o=null===(i=this.strokeGraphics.displayObject.filters)||void 0===i?void 0:i.indexOf(this.strokeColorFilter))&&void 0!==o?o:-1)<0&&(this.strokeGraphics.displayObject.filters=[this.strokeColorFilter]):s?s.filters=[]:(null===(a=this.strokeGraphics)||void 0===a?void 0:a.displayObject)&&(this.strokeGraphics.displayObject.filters=[])}},{key:"pptColorActive",get:function(){var e,t;return(null!==(t=null===(e=this.renderContainer.filters)||void 0===e?void 0:e.length)&&void 0!==t?t:-1)>0},set:function(e){this.renderContainer.filters=e?[this.pptColorFilter]:[]}},{key:"fillActive",get:function(){var e,t,n,r,i,o,a;return this.backgroundFill.displayObject?(null!==(n=null===(t=null===(e=this.backgroundFill.displayObject)||void 0===e?void 0:e.filters)||void 0===t?void 0:t.length)&&void 0!==n?n:-1)>0:(null!==(a=null===(o=null===(i=null===(r=this.backgroundGraphics)||void 0===r?void 0:r.displayObject)||void 0===i?void 0:i.filters)||void 0===o?void 0:o.length)&&void 0!==a?a:-1)>0},set:function(e){var t,n,r,i,o,a;e?this.backgroundFill.displayObject&&(null!==(n=null===(t=this.backgroundFill.displayObject.filters)||void 0===t?void 0:t.indexOf(this.fillColorFilter))&&void 0!==n?n:-1)<0?this.backgroundFill.displayObject.filters=[this.fillColorFilter]:(null===(r=this.backgroundGraphics)||void 0===r?void 0:r.displayObject)&&(null!==(o=null===(i=this.backgroundGraphics.displayObject.filters)||void 0===i?void 0:i.indexOf(this.fillColorFilter))&&void 0!==o?o:-1)<0&&(this.backgroundGraphics.displayObject.filters=[this.fillColorFilter]):this.backgroundFill.displayObject?this.backgroundFill.displayObject.filters=[]:(null===(a=this.backgroundGraphics)||void 0===a?void 0:a.displayObject)&&(this.backgroundGraphics.displayObject.filters=[])}}]),n}(Fv),Ig=n(119),Cg=new(n.n(Ig).a),Ng=Cg.getDevice(),kg=Cg.getBrowser(),Dg=Cg.getOS(),Pg={isDesktop:function(){var e=!0;return"mobile"===Ng.type&&(e=!1),/Samsung/.test(kg.name||"")&&(e=!1),window.__nativeTags&&window.__nativeTags.platform&&(e=!1),e},isIOS:function(){var e=!1;return window.__nativeTags&&window.__nativeTags.platform&&/^ios/i.test(window.__nativeTags.platform)&&(e=!0),Dg.name&&/iOS/.test(Dg.name)&&(e=!0),e},isAndroid:function(){var e=!1;return window.__nativeTags&&window.__nativeTags.platform&&/^android/i.test(window.__nativeTags.platform)&&(e=!0),Dg.name&&/android/i.test(Dg.name)&&(e=!0),e},isLowGpuMemory:function(){var e,t,n=null!==(t=null===(e=window.__nativeTags)||void 0===e?void 0:e.platform)&&void 0!==t?t:"";if(n){var r=n.split(" ");if(r[1]){if(/^iPad/.test(r[1])){var i=r[1].match(/^iPad(\d+)/);return!(i&&i[1]&&parseInt(i[1],10)>=6)}if(/^iPhone/.test(r[1])){var o=r[1].match(/^iPhone(\d+)/);return!(o&&o[1]&&parseInt(o[1],10)>=9)}return!1}return!1}return!0}},Og=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))};function Rg(e,t){for(var n in t)e.style[n]=t[n]}var Lg="median-container",jg=1500,Bg=300,Ug=50,zg="0",Fg="1",Gg=.4,Hg=function(){function e(t){var n,r,i=this;_(this,e),this.progress=document.createElement("div"),this.totalTime=document.createElement("span"),this.playButton=document.createElement("div"),this.pauseButton=document.createElement("div"),this.currentTime=document.createElement("span"),this.mediaController=document.createElement("div"),this.currentProgress=document.createElement("div"),this.fullScreenButton=document.createElement("div"),this.exitFullScreenButton=document.createElement("div"),this.medianIsEnd=!1,this.pickBookmarkIndex=0,this.playCallBackList=[],this.duration=0,this.isVideo=!1,this.start=0,this.end=0,this.fullscreenStatus=!1,this.fadeState={in:!1,out:!1},this.changeMediaProgress=function(e){if(i.ctx.isPlayerPaused())i.ctx.logger.info("Media controller prevent seek event with paused state",i.ctx.taskId);else{e.stopPropagation();var t=e.offsetX/i.progress.clientWidth*i.duration;i.medianIsEnd=!1,"interactive"!==i.ctx.mode&&i.jumpToTime(t),"local"!==i.ctx.mode&&i.ctx.eventHub.emit(bb.mediaSeek,{id:i.targetId,time:t,isPlaying:i.media.isPlaying}),i.delayHide()}},this.jumpToTime=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return Og(i,void 0,void 0,regeneratorRuntime.mark((function t(){var n,r=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,dv((function(){return!!r.duration}),3e3);case 2:n=Math.floor(e)+this.start,this.media.currentTime!==n&&(this.media.currentTime=n,this.changeBookmarkIndex(n,n>this.media.currentTime));case 4:case"end":return t.stop()}}),t,this)})))},this.showController=function(e){e.stopPropagation(),i.show()},this.getMediaDuration=function(){i.duration&&!Number.isNaN(i.duration)||(i.duration=i.media.duration,i.start&&(i.duration-=i.start,i.jumpToTime()),i.end&&(i.duration-=i.end)),i.totalTime.innerText=e.formatTime(i.duration)},this.playMedia=function(){return Og(i,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.playButton.style.display="none",this.pauseButton.style.display="block",e.next=4,this.media.play();case 4:this.medianIsEnd&&(this.medianIsEnd=!1,this.jumpToTime()),this.playCallBackList.forEach((function(e){e()})),this.delayHide();case 7:case"end":return e.stop()}}),e,this)})))},this.pauseMedia=function(){return Og(i,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.playButton.style.display="block",this.pauseButton.style.display="none",e.next=4,this.media.pause();case 4:case"end":return e.stop()}}),e,this)})))},this.onMouseOut=function(e){e.stopPropagation(),i.hide()},this.mediaTimeUpdate=function(){return Og(i,void 0,void 0,regeneratorRuntime.mark((function t(){var n,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this.media.currentTime-this.start,t.t0=this.duration>0&&(Math.abs(n-this.duration)<.3||n>this.duration),!t.t0){t.next=9;break}return t.next=5,this.pauseMedia();case 5:this.medianIsEnd=!0,this.jumpToTime(),this.ctx.eventHub.emit(bb.mediaStop,{id:this.targetId}),this.onClickCancelFullScreenButtonHandle();case 9:if(this.currentTime.innerText=e.formatTime(n),this.currentProgress.style.flex=(n/this.duration).toString(),!(this.bookmarkList&&this.bookmarkList.length>0)){t.next=14;break}(r=this.bookmarkList[this.pickBookmarkIndex])&&r.time.toFixed(0)===this.media.currentTime.toFixed(0)&&(this.ctx.timingEventHub.emit("shape ".concat(this.shapeId," onMediaBookmark ").concat(r.name)),this.pickBookmarkIndex+=1);case 14:this.fadeHit(n);case 15:case"end":return t.stop()}}),t,this)})))},this.onPauseMedia=function(){i.playButton.style.display="block",i.pauseButton.style.display="none"},this.onPlayMedia=function(){i.fadeState={in:!1,out:!1},i.fadeHit(0),i.playButton.style.display="none",i.pauseButton.style.display="block",i.playCallBackList.forEach((function(e){e()})),i.media.currentTime0&&void 0!==arguments[0]?arguments[0]:20,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,n=document.createElementNS("http://www.w3.org/2000/svg","svg");n.setAttributeNS(null,"viewBox","0 0 512 512"),n.setAttributeNS(null,"height",e.toString()),n.setAttributeNS(null,"width",t.toString());var r=document.createElementNS("http://www.w3.org/2000/svg","polyline");return r.setAttributeNS(null,"points","35 0, 477 256, 35 512"),r.setAttributeNS(null,"fill","#000000"),n.appendChild(r),n}},{key:"generatePauseButton",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,n=document.createElementNS("http://www.w3.org/2000/svg","svg");Rg(n,{height:e+"px"}),n.setAttributeNS(null,"viewBox","0 0 512 512"),n.setAttributeNS(null,"height",e.toString()),n.setAttributeNS(null,"width",t.toString());var r=document.createElementNS("http://www.w3.org/2000/svg","rect");r.setAttributeNS(null,"x","35"),r.setAttributeNS(null,"y","0"),r.setAttributeNS(null,"width","148"),r.setAttributeNS(null,"height","512");var i=r.cloneNode(!0);return i.setAttributeNS(null,"x","330"),n.append(r,i),n}},{key:"generateFullScreenButton",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,n=document.createElementNS("http://www.w3.org/2000/svg","svg");Rg(n,{height:e+"px",width:t+"px"}),n.setAttributeNS(null,"width",t.toString()),n.setAttributeNS(null,"height",e.toString()),n.setAttributeNS(null,"viewBox","0 0 1024 1024");var r=document.createElementNS("http://www.w3.org/2000/svg","path");return r.setAttributeNS(null,"d","M918.116352 107.409408c10.186752 10.175488 10.186752 26.691584 0 36.87936L653.734912 407.038976c-10.187776 10.187776-26.703872 10.187776-36.891648 0-10.175488-10.187776-10.175488-26.703872 0.013312-36.891648l264.38144-262.73792c10.174464-10.187776 26.69056-10.200064 36.87936-0.013312L918.117376 107.409408zM878.281728 148.096l-161.155072-0.44544c-11.283456 0.279552-20.85888-8.226816-21.90336-19.458048l0-13.421568c0.318464-10.671104 8.889344-19.241984 19.560448-19.560448l187.030528 0.827392c0.1792-0.037888 0.357376-0.0768 0.523264-0.089088l9.549824-0.229376c5.005312-0.152576 9.843712 1.770496 13.372416 5.336064 3.32288 3.629056 4.9664 8.49408 4.545536 13.40928l-1.032192 9.537536c0 0.191488 0.70144 0.318464 0.70144 0.49664l-0.534528 188.279808c-0.54784 9.984-9.092096 17.637376-19.076096 17.089536-0.165888-0.012288-0.319488-0.0256-0.484352-0.037888L896.009216 329.8304c-10.379264-0.0512-18.733056-8.506368-18.681856-18.885632 0.013312-0.191488 0.013312-0.381952 0.013312-0.585728L878.281728 148.096zM105.884672 916.661248c-10.187776-10.175488-10.200064-26.691584-0.013312-36.87936 0 0 0-0.013312 0.013312-0.013312l265.19552-262.73792c10.35264-10.008576 26.86976-9.729024 36.866048 0.636928 9.766912 10.110976 9.766912 26.131456 0 36.242432L143.579136 916.661248C133.072896 926.848 116.3776 926.848 105.884672 916.661248L105.884672 916.661248zM146.533376 875.973632l161.154048 0.433152c11.283456-0.292864 20.85888 8.213504 21.891072 19.458048l0 13.38368c-0.292864 10.672128-8.876032 19.255296-19.560448 19.561472l-187.858944-0.828416c-0.165888 0.037888-0.344064 0.075776-0.509952 0.089088l-9.550848 0.229376c-5.004288 0.152576-9.831424-1.782784-13.35808-5.336064-3.323904-3.629056-4.979712-8.493056-4.54656-13.395968l1.031168-9.537536c0-0.191488-0.712704-0.330752-0.700416-0.509952l0.534528-188.278784c0.534528-9.984 9.066496-17.625088 19.050496-17.089536 0.165888 0.013312 0.330752 0.0256 0.508928 0.037888l14.212096 0c10.365952 0.0512 18.719744 8.507392 18.656256 18.873344 0 0.191488 0 0.395264-0.013312 0.598016L146.533376 875.973632zM918.116352 916.661248c10.186752-10.175488 10.200064-26.691584 0.012288-36.87936 0 0 0-0.013312-0.012288-0.013312l-264.38144-262.73792c-10.365952-10.008576-26.86976-9.729024-36.87936 0.636928-9.766912 10.110976-9.766912 26.131456 0 36.242432L881.22368 916.661248c10.186752 10.186752 26.703872 10.186752 36.891648 0.013312L918.115328 916.661248 918.116352 916.661248zM878.281728 875.973632l-161.168384 0.433152c-11.270144-0.292864-20.845568 8.213504-21.890048 19.458048l0 13.38368c0.306176 10.672128 8.889344 19.241984 19.560448 19.561472l187.030528-0.828416c0.1792 0.037888 0.357376 0.075776 0.523264 0.089088l9.549824 0.229376c5.005312 0.152576 9.843712-1.782784 13.372416-5.336064 3.32288-3.629056 4.978688-8.493056 4.545536-13.395968l-1.032192-9.537536c0-0.191488 0.70144-0.330752 0.70144-0.509952l-0.534528-188.278784c-0.54784-9.984-9.092096-17.637376-19.076096-17.089536-0.165888 0.013312-0.319488 0.0256-0.484352 0.037888L896.009216 694.19008c-10.379264 0.0512-18.733056 8.507392-18.681856 18.885632 0 0.191488 0.013312 0.381952 0.013312 0.584704L878.281728 875.973632zM105.884672 107.409408c-10.187776 10.175488-10.187776 26.691584 0 36.87936l265.19552 262.750208c10.187776 10.187776 26.691584 10.187776 36.87936 0s10.175488-26.703872-0.012288-36.891648l-264.368128-262.73792C133.072896 97.222656 116.3776 97.222656 105.884672 107.409408L105.884672 107.409408zM146.533376 148.096l161.154048-0.44544c11.283456 0.292864 20.85888-8.213504 21.891072-19.458048l0-13.421568c-0.306176-10.671104-8.889344-19.241984-19.560448-19.560448l-187.858944 0.827392c-0.165888-0.0512-0.344064-0.0768-0.509952-0.089088l-9.550848-0.229376c-5.004288-0.152576-9.831424 1.782784-13.35808 5.336064-3.323904 3.629056-4.979712 8.49408-4.54656 13.40928l1.031168 9.537536c0 0.191488-0.712704 0.318464-0.700416 0.49664l0.534528 188.279808c0.534528 9.970688 9.066496 17.624064 19.050496 17.089536 0.165888-0.012288 0.330752-0.0256 0.508928-0.037888l14.212096 0c10.365952-0.0512 18.719744-8.506368 18.656256-18.87232 0-0.191488 0-0.395264-0.013312-0.598016L146.533376 148.096z"),n.appendChild(r),document.body.appendChild(n),n}},{key:"generateExitFullScreenButton",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,n=document.createElementNS("http://www.w3.org/2000/svg","svg");Rg(n,{height:e+"px",width:t+"px"}),n.setAttributeNS(null,"width",t.toString()),n.setAttributeNS(null,"height",e.toString()),n.setAttributeNS(null,"viewBox","0 0 1024 1024");var r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=document.createElementNS("http://www.w3.org/2000/svg","path");return r.setAttributeNS(null,"d","M716.8 998.4a25.6 25.6 0 0 1-25.6-25.6v-256a25.6 25.6 0 0 1 25.6-25.6h256a25.6 25.6 0 1 1 0 51.2h-230.4v230.4a25.6 25.6 0 0 1-25.6 25.6zM307.2 998.4a25.6 25.6 0 0 1-25.6-25.6v-230.4H51.2a25.6 25.6 0 1 1 0-51.2h256a25.6 25.6 0 0 1 25.6 25.6v256a25.6 25.6 0 0 1-25.6 25.6zM972.8 332.8h-256a25.6 25.6 0 0 1-25.6-25.6v-256a25.6 25.6 0 1 1 51.2 0v230.4h230.4a25.6 25.6 0 1 1 0 51.2zM307.2 332.8h-256a25.6 25.6 0 1 1 0-51.2h230.4V51.2a25.6 25.6 0 1 1 51.2 0v256a25.6 25.6 0 0 1-25.6 25.6z"),i.setAttributeNS(null,"d","M307.2 332.8a25.6 25.6 0 0 1-18.112-7.488L56.896 93.12a25.6 25.6 0 0 1 36.224-36.224l232.192 232.192A25.6 25.6 0 0 1 307.2 332.8zM716.8 332.8a25.6 25.6 0 0 1-18.112-43.712L930.88 56.896a25.6 25.6 0 0 1 36.224 36.224l-232.192 232.192a25.472 25.472 0 0 1-18.112 7.488zM948.992 974.592a25.6 25.6 0 0 1-18.112-7.488l-232.192-232.192a25.6 25.6 0 0 1 36.224-36.224l232.192 232.192a25.6 25.6 0 0 1-18.112 43.712zM75.008 974.592a25.6 25.6 0 0 1-18.112-43.712l232.192-232.192a25.6 25.6 0 0 1 36.224 36.224l-232.192 232.192a25.472 25.472 0 0 1-18.112 7.488z"),n.appendChild(r),n.appendChild(i),document.body.appendChild(n),n}},{key:"createButton",value:function(){var e={marginLeft:"15px",marginRight:"10px",fontSize:"0",height:"20px",display:"flex",justifyContent:"center",alignItems:"center"};Rg(this.playButton,Object.assign(Object.assign({},e),{display:"block"}));var t=this.generatePlayButton();Rg(t,{height:"20px"}),this.playButton.appendChild(t),Rg(this.pauseButton,Object.assign(Object.assign({},e),{display:"none"}));var n=this.generatePauseButton();if(Rg(n,{height:"20px"}),this.pauseButton.appendChild(n),this.isVideo){var r=this.generateFullScreenButton(20,20);this.fullScreenButton.appendChild(r),Rg(this.fullScreenButton,Object.assign(Object.assign({},e),{display:"block"}));var i=this.generateExitFullScreenButton(20,20);this.exitFullScreenButton.appendChild(i),Rg(this.exitFullScreenButton,Object.assign(Object.assign({},e),{display:"none"}))}}},{key:"createTimer",value:function(){var e=document.createElement("div");Rg(e,{width:"100px"}),this.currentTime.innerText="00:00";var t=document.createElement("span");return t.innerText="/",e.append(this.currentTime,t,this.totalTime),e}},{key:"createProgress",value:function(){var e={flex:"1",position:"relative"};this.isVideo||(e.marginRight="10px"),Rg(this.progress,e);var t=document.createElement("div");Rg(t,{background:"#D9D9D9",position:"relative",height:"10px",display:"flex"}),this.progress.appendChild(t),Rg(this.currentProgress,{background:"#4F4F4F",top:"0px",left:"0",height:"10px",flex:"0"}),t.appendChild(this.currentProgress)}},{key:"fadeHit",value:function(e){if(this.info.fade){var t=this.info.fade,n=t.start,r=t.end;n&&!this.fadeState.in&&e>=0&&(this.fadeState.in=!0,this.media.fadeIn(0,n)),r&&!this.fadeState.out&&e>=this.duration-r/1e3&&(this.fadeState.out=!0,this.media.fadeOut(0,r))}}},{key:"changeBookmarkIndex",value:function(e,t){if(this.bookmarkList&&0!==this.bookmarkList.length){if(this.pickBookmarkIndex>0)for(var n=0;ne){this.pickBookmarkIndex=n;break}if(t){for(var r=this.pickBookmarkIndex-1,i=0;il?l/n:1);s.y=s.y+this.height-r,s.x=Math.max(s.x,0),s.x=Math.min(s.x,o-n*c),s.y=Math.max(s.y,0),s.y=Math.min(s.y,a-r),Rg(this.mediaController,{height:r+"px",borderRadius:r/2+"px",width:n+"px",flexDirection:"row",alignItems:"center",position:"absolute",left:s.x+"px",top:s.y+"px",background:"#fff",zIndex:"2",border:"1px solid #ccc",transform:"scale(".concat(c,")"),transformOrigin:"0 100%"}),this.fullscreenStatus&&Rg(this.mediaController,{left:"0",top:a-r+"px"})}},{key:"createMediaController",value:function(){this.setControllerPosition(),Rg(this.mediaController,{display:"none",transition:"opacity ".concat(Gg,"s")}),this.createButton();var e=this.createTimer();this.createProgress(),this.mediaController.append(this.playButton,this.pauseButton,e,this.progress),this.isVideo&&this.mediaController.append(this.fullScreenButton,this.exitFullScreenButton),this.container.appendChild(this.mediaController),this.bindEvent()}},{key:"addPlayCallBack",value:function(e){this.playCallBackList.push(e)}},{key:"fullscreenPlay",value:function(){this.fullscreenStatus=!0,"interactive"!==this.ctx.mode&&this.media.requestFullscreen(),"local"!==this.ctx.mode&&this.ctx.eventHub.emit(bb.fullscreenChange,{targetId:this.targetId,state:!0}),this.delayHide()}},{key:"changeFullScreenState",value:function(e,t,n){n===this.ctx.slideIndex&&(e&&this.targetId===t?this.fullscreenStatus=e:this.fullscreenStatus=!1,this.fullscreenStatus?(this.fullScreenButton.style.display="none",this.exitFullScreenButton.style.display="block"):(this.fullScreenButton.style.display="block",this.exitFullScreenButton.style.display="none"),this.setControllerPosition())}},{key:"bindEvent",value:function(){Pg.isDesktop()&&(this.mediaController.addEventListener("mouseout",this.onMouseOut,!1),this.mediaController.addEventListener("mouseover",this.showController,!1)),this.progress.addEventListener("click",this.changeMediaProgress,!1),this.playButton.addEventListener("click",this._playMediaFromCtrl,!1),this.pauseButton.addEventListener("click",this._pauseMediaFromCtrl,!1),this.media.on("durationchange",this.getMediaDuration,!1),this.media.on("timeupdate",this.mediaTimeUpdate,!1),this.media.on("pause",this.onPauseMedia,!1),this.media.on("play",this.onPlayMedia,!1),this.containerObserver=new MutationObserver(this.onContainerSizeChange),this.container&&this.containerObserver.observe(this.container,{attributes:!0,attributeFilter:["data-scale","style"]}),this.isVideo&&(this.ctx.globalEventHub.on("onFullscreenChange",this.onFullScreenChange),this.ctx.globalEventHub.on("controllerShowStatusChange",this.onControllerShowStatusChange),this.fullScreenButton.addEventListener("click",this.onClickFullScreenButtonHandle,!1),this.exitFullScreenButton.addEventListener("click",this.onClickCancelFullScreenButtonHandle,!1))}},{key:"unbindEvent",value:function(){var e;Pg.isDesktop()&&(this.mediaController.removeEventListener("mouseout",this.onMouseOut,!1),this.mediaController.removeEventListener("mouseover",this.showController,!1)),this.progress.removeEventListener("click",this.changeMediaProgress,!1),this.playButton.removeEventListener("click",this._playMediaFromCtrl,!1),this.pauseButton.removeEventListener("click",this._pauseMediaFromCtrl,!1),this.media.removeAllListeners(),null===(e=this.containerObserver)||void 0===e||e.disconnect(),this.isVideo&&(this.ctx.globalEventHub.removeListener("onFullscreenChange",this.onFullScreenChange),this.ctx.globalEventHub.removeListener("controllerShowStatusChange",this.onControllerShowStatusChange),this.fullScreenButton.removeEventListener("click",this.onClickFullScreenButtonHandle,!1),this.exitFullScreenButton.removeEventListener("click",this.onClickCancelFullScreenButtonHandle,!1))}},{key:"show",value:function(){this.setControllerPosition(),this.mediaController.style.opacity=Fg,this.fullscreenStatus||(this.mediaController.style.display="flex"),this.delayHide()}},{key:"hide",value:function(){this.fullscreenStatus?this.mediaController.style.opacity=zg:this.mediaController.style.display="none"}},{key:"delayHide",value:function(){var e=this;clearTimeout(this.autoHiddenTimer),this.autoHiddenTimer=setTimeout((function(){e.hide()}),jg)}},{key:"destroy",value:function(){var e;this.unbindEvent(),this.playCallBackList=[],null===(e=this.container)||void 0===e||e.removeChild(this.mediaController)}},{key:"clippedDuration",get:function(){return this.duration}}],[{key:"formatTime",value:function(e){var t="00:00";if(e){var n=Math.floor(e/60),r=String(n<0?0:n).padStart(2,"0"),i=Math.floor(e%60);t="".concat(r,":").concat(String(i<0?0:i).padStart(2,"0"))}return t}}]),e}(),Vg=n(120),Wg=function(e){p(n,e);var t=m(n);function n(e,r,i){var o,a,s,u;return _(this,n),(a=t.call(this)).isGlobalPause=!1,a.lastTime=-1,a.howl=null,a.rctClient=null,a.isHowlEnd=!1,a.isHowlLoadEmit=!1,a.staticEventId=1001,a._catParams=void 0,a.url=e,a.runningAudio=r,i&&(a._catParams=i),xb.RtcAudioClazz?(a.rctClient=new xb.RtcAudioClazz(e,null===(s=a._catParams)||void 0===s?void 0:s.start,null===(u=a._catParams)||void 0===u?void 0:u.end),a.rctClient.on("load",(function(){return a.emit("load")})),a.rctClient.on("pause",(function(){return a.emit("pause")})),a.rctClient.on("play",(function(){a.startTimeChangeEmit(),a.emit("play")})),a.rctClient.on("resumeAllAudioInterruptByAudioSessionChanged",(function(){a.emit("resumeAllAudioInterruptByAudioSessionChanged")}))):(a.howl=new Vg.Howl({src:[e]}),o=c(a.howl._getSoundIds(),1),a.staticEventId=o[0],a.howl.load(),a.howl.on("load",(function(){a.isHowlLoadEmit=!0,a.emit("load")})),a.howl.on("pause",(function(){return a.emit("pause")})),a.howl.on("play",(function(){a.isHowlLoadEmit||a.emit("load"),a.isHowlEnd=!1,a.startTimeChangeEmit(),a.emit("play")})),a.howl.on("end",(function(){a.isHowlEnd=!0}))),a}return T(n,[{key:"startTimeChangeEmit",value:function(){var e=this;this.currentTime!==this.lastTime&&(this.lastTime=this.currentTime,this.emit("timeupdate",this.lastTime)),this.isPaused||setTimeout((function(){e.isPaused||e.startTimeChangeEmit()}),300)}},{key:"play",value:function(){var e,t,n;this.runningAudio.has(this.url)&&(null===(e=this.runningAudio.get(this.url))||void 0===e||e.stop(),this.runningAudio.delete(this.url)),this.isHowlEnd=!1,this.lastTime=-1,null===(t=this.howl)||void 0===t||t.play(this.staticEventId),null===(n=this.rctClient)||void 0===n||n.play(),this.runningAudio.set(this.url,this)}},{key:"fade",value:function(e,t,n){this.howl&&this.howl.fade(e,t,n)}},{key:"pause",value:function(){var e,t;null===(e=this.howl)||void 0===e||e.pause(this.staticEventId),null===(t=this.rctClient)||void 0===t||t.pause(),this.runningAudio.has(this.url)&&this.runningAudio.delete(this.url)}},{key:"globalPause",value:function(){this.isPaused||(this.isGlobalPause=!0,this.pause())}},{key:"globalResume",value:function(){this.isGlobalPause&&(this.isGlobalPause=!1,this.play())}},{key:"stop",value:function(){var e;null===(e=this.howl)||void 0===e||e.pause(this.staticEventId),this.rctClient&&(this.rctClient.pause(),this.rctClient.currentTime=0),this.runningAudio.has(this.url)&&this.runningAudio.delete(this.url)}},{key:"destroy",value:function(){var e,t,n,r,i,o,a,s;null===(e=this.howl)||void 0===e||e.stop(this.staticEventId),null===(t=this.howl)||void 0===t||t.unload(),null===(n=this.rctClient)||void 0===n||n.pause(),null===(r=this.rctClient)||void 0===r||r.destroy(),null===(i=this.rctClient)||void 0===i||i.removeAllListeners("load"),null===(o=this.rctClient)||void 0===o||o.removeAllListeners("play"),null===(a=this.rctClient)||void 0===a||a.removeAllListeners("pause"),null===(s=this.rctClient)||void 0===s||s.removeAllListeners("resumeAllAudioInterruptByAudioSessionChanged"),this.runningAudio.has(this.url)&&this.runningAudio.delete(this.url)}},{key:"volume",value:function(e){this.rctClient?this.rctClient.volume(e):this.howl&&this.howl.volume(e)}},{key:"currentTime",get:function(){return this.rctClient?this.rctClient.currentTime:this.howl?this.howl.seek(this.staticEventId):-1},set:function(e){this.rctClient?this.rctClient.currentTime=e:this.howl&&this.howl.seek(e,this.staticEventId)}},{key:"duration",get:function(){return this.rctClient?this.rctClient.duration:this.howl?this.howl.duration(this.staticEventId):0}},{key:"isPaused",get:function(){return this.rctClient?this.rctClient.isPaused:!!this.howl&&!this.howl.playing(this.staticEventId)}}]),n}(Ks.a),Yg=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Xg=function(e){p(n,e);var t=m(n);function n(e){var r,i,o,a,s,u,l,c;_(this,n),(r=t.call(this)).type="video",r.sprite=new Ld,r.isPlaying=!1,r.isGlobalPause=!1,r.fullscreen=!1,r.url="",r.isLoaded=!1,r.onVideoResourceLoaded=function(){r.isLoaded=!0},r.onVideoStalled=function(){r.ctx.logger.warn(r.url+", Failed to fetch data, but trying.",r.ctx.taskId)},r.updateVolume=function(e){r.rtcAudio.volume(e)},r.syncFullscreenVideoState=function(e){var t=e.targetId,n=e.state;e.slideIndex===r.ctx.slideIndex&&t===r.id&&(n?(r.requestFullscreen(),r.ctx.latestChangeFullscreenTargetId=t):r.requestCancelFullscreen())},r.id=e.id,r.start=null===(i=e.video.cut)||void 0===i?void 0:i.start,r.end=null===(o=e.video.cut)||void 0===o?void 0:o.end,r.fullscreen=null!==(a=e.video.fullscreen)&&void 0!==a&&a,r.container=e.container,r.ctx=e.ctx,r.ctx.medias[r.id]=y(r);var h=e.video.src;r.videoResource=new Xl.w(h,{autoLoad:!0,autoPlay:!1,updateFPS:30,crossorigin:!0}),null===(s=r.videoElement)||void 0===s||s.addEventListener("stalled",r.onVideoStalled),null===(u=r.videoElement)||void 0===u||u.addEventListener("loadedmetadata",r.onVideoResourceLoaded),r.url=e.video.src;var d=e.video.src.replace(/4$/,"3");r.ctx.loaderDelegate&&(d=r.ctx.loaderDelegate.redirectMedia(d),r.ctx.logger.info("redirect media url from ".concat(e.video.src.replace(/4$/,"3")," to ").concat(d," by delegate."),e.ctx.taskId)),r.rtcAudio=new Wg(d,e.ctx.runningAudio,{start:null===(l=e.video.cut)||void 0===l?void 0:l.start,end:null===(c=e.video.cut)||void 0===c?void 0:c.end}),r.rtcAudio.on("timeupdate",(function(e){if(r.videoElement){var t=r.videoElement.currentTime;Math.abs(t-e)>.5&&(r.videoElement.currentTime=e)}})),r.rtcAudio.on("resumeAllAudioInterruptByAudioSessionChanged",(function(){var e;null===(e=r.videoElement)||void 0===e||e.pause(),setTimeout((function(){var e;r.rtcAudio.isPaused||null===(e=r.videoElement)||void 0===e||e.play()}),200)}));var f=e.video,p=e.width,v=e.height,m=e.target;r.controller=new Hg({targetId:e.id,shapeId:e.shapeId,ctx:e.ctx,width:p,height:v,target:m,media:y(r),info:f,canvasElement:e.canvasElement}),r.controller.addPlayCallBack((function(){r.sprite.width=p,r.sprite.height=v,r.ctx.clock.setTimeout((function(){r.sprite.visible=!0}),50)}));var g=new Xl.c(null,{height:v,width:p});return g.resource=r.videoResource,r.videoResource.bind(g),r.sprite=new Ld,r.sprite.visible=!1,r.sprite.texture=new Xl.t(g),r.sprite.interactive=!0,r.container.addChild(r.sprite),r.sprite.on("mouseover",(function(e){e.stopPropagation(),r.controller.show()})),r.sprite.on("mouseout",(function(e){e.stopPropagation(),r.controller.hide()})),["durationchange","timeupdate","pause","play"].forEach((function(e){var t;null===(t=r.videoElement)||void 0===t||t.addEventListener(e,(function(){"timeupdate"===e&&r.isPlaying,r.emit(e)}))})),r.ctx.activeMedia.add(y(r)),r.ctx.volumeAdjuster.on("update",r.updateVolume),r.ctx.globalEventHub.on("syncFullscreenVideoState",r.syncFullscreenVideoState),r}return T(n,[{key:"showController",value:function(){this.controller.show()}},{key:"hideController",value:function(){this.controller.hide()}},{key:"play",value:function(){return Yg(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.isPlaying=!0,this.updateVolume(this.ctx.volumeAdjuster.volume),e.next=4,this.load();case 4:return e.next=6,this.ctx.clock.waitUntil((function(){var e=n.videoElement;return!!(e&&e.videoWidth>0)}),3e3);case 6:(t=this.videoElement)&&t.videoWidth<=0||(this.videoElement&&(this.videoElement.volume=0,this.videoElement.muted=!0),this.rtcAudio.on("play",(function(){var e;null===(e=n.videoElement)||void 0===e||e.play(),n.fullscreen&&n.controller.fullscreenPlay()})),this.rtcAudio.play());case 8:case"end":return e.stop()}}),e,this)})))}},{key:"load",value:function(){return this.videoResource.load()}},{key:"pause",value:function(){var e=this;this.isPlaying=!1,this.ctx.logger.warn(this.url+", pause video manual.",this.ctx.taskId),this.ctx.logger.warn(this.url+", pause rtc audio manual.",this.ctx.taskId),this.rtcAudio.on("pause",(function(){var t;null===(t=e.videoElement)||void 0===t||t.pause()})),this.rtcAudio.pause()}},{key:"globalPause",value:function(){this.isPlaying&&(this.isGlobalPause=!0,this.pause())}},{key:"globalResume",value:function(){this.isGlobalPause&&(this.isGlobalPause=!1,this.play())}},{key:"togglePause",value:function(){this.isPlaying?this.pause():this.play()}},{key:"seek",value:function(e){this.controller.jumpToTime(e)}},{key:"stop",value:function(){this.rtcAudio.stop(),this.seek(0),this.pause(),this.ctx.eventHub.emit(bb.mediaStop,{id:this.id})}},{key:"requestFullscreen",value:function(){return Yg(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,dv((function(){return n.isLoaded}),5e3);case 2:t=new Xl.t(this.sprite.texture.baseTexture),this.ctx.globalEventHub.emit("requestFullscreen",{texture:t,index:this.ctx.slideIndex,targetId:this.id});case 4:case"end":return e.stop()}}),e,this)})))}},{key:"requestCancelFullscreen",value:function(){this.ctx.globalEventHub.emit("requestCancelFullscreen",{targetId:this.id,index:this.ctx.slideIndex})}},{key:"destroy",value:function(){var e,t,n;this.ctx.volumeAdjuster.removeListener("update",this.updateVolume),this.ctx.globalEventHub.removeListener("syncFullscreenVideoState",this.syncFullscreenVideoState),null===(e=this.videoElement)||void 0===e||e.removeEventListener("stalled",this.onVideoStalled),null===(t=this.videoElement)||void 0===t||t.removeEventListener("loadedmetadata",this.onVideoResourceLoaded),this.sprite.interactive=!1,this.sprite.destroy({texture:!0,baseTexture:!0}),null===(n=this.videoResource)||void 0===n||n.destroy(),this.rtcAudio.destroy(),this.stop(),this.controller.destroy(),this.ctx.activeMedia.delete(this)}},{key:"fadeIn",value:function(e,t){this.rtcAudio.fade(e,this.ctx.volumeAdjuster.volume,t)}},{key:"fadeOut",value:function(e,t){this.rtcAudio.fade(this.ctx.volumeAdjuster.volume,e,t)}},{key:"videoElement",get:function(){return this.videoResource.source}},{key:"currentTime",get:function(){var e,t;return null!==(t=null===(e=this.videoElement)||void 0===e?void 0:e.currentTime)&&void 0!==t?t:0},set:function(e){this.rtcAudio.currentTime=e,this.videoElement&&(this.videoElement.currentTime=e)}},{key:"paused",get:function(){var e,t;return null===(t=null===(e=this.videoElement)||void 0===e?void 0:e.paused)||void 0===t||t}},{key:"duration",get:function(){var e,t;return null!==(t=null===(e=this.videoElement)||void 0===e?void 0:e.duration)&&void 0!==t?t:0}},{key:"clippedDuration",get:function(){return this.controller.clippedDuration}}]),n}(Ks.a),Qg=function(e){p(n,e);var t=m(n);function n(e){var r,i,o;_(this,n),(r=t.call(this)).type="audio",r.isPlaying=!1,r.isGlobalPause=!1,r.updateVolume=function(e){r.audioPlayer.volume(e)},r.id=e.id;var a=e.audio.src;r.audioPlayer=new Wg(a,e.ctx.runningAudio,{start:null===(i=e.audio.cut)||void 0===i?void 0:i.start,end:null===(o=e.audio.cut)||void 0===o?void 0:o.end}),e.audio.cut&&(r.start=e.audio.cut.start,r.end=e.audio.cut.end),r.ctx=e.ctx,r.ctx.medias[r.id]=y(r);var s=e.width,u=e.height,l=e.target;return r.controller=new Hg({targetId:e.id,shapeId:e.shapeId,ctx:e.ctx,height:u,width:s,target:l,media:y(r),info:e.audio,canvasElement:e.canvasElement}),r.audioPlayer.on("load",(function(){return r.emit("durationchange")})),r.audioPlayer.on("timeupdate",(function(){return r.emit("timeupdate")})),r.audioPlayer.on("pause",(function(){return r.emit("pause")})),r.audioPlayer.on("play",(function(){return r.emit("play")})),r.ctx.activeMedia.add(y(r)),r.ctx.volumeAdjuster.on("update",r.updateVolume),r}return T(n,[{key:"load",value:function(){return Promise.resolve()}},{key:"showController",value:function(){this.controller.show()}},{key:"hideController",value:function(){this.controller.hide()}},{key:"play",value:function(){return function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}(this,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.ctx.isPlayerPaused()?this.ctx.logger.info("Audio player prevent play event with paused state",this.ctx.taskId):(this.updateVolume(this.ctx.volumeAdjuster.volume),this.isPlaying=!0,this.audioPlayer.play());case 1:case"end":return e.stop()}}),e,this)})))}},{key:"pause",value:function(){this.ctx.isPlayerPaused()?this.ctx.logger.info("Audio player prevent pause event with paused state",this.ctx.taskId):(this.isPlaying=!1,this.audioPlayer.pause())}},{key:"globalPause",value:function(){this.isPlaying&&(this.isGlobalPause=!0,this.pause())}},{key:"globalResume",value:function(){this.isGlobalPause&&(this.isGlobalPause=!1,this.play())}},{key:"togglePause",value:function(){this.isPlaying?this.pause():this.play()}},{key:"seek",value:function(e){this.ctx.isPlayerPaused()?this.ctx.logger.info("Audio player prevent seek event with paused state",this.ctx.taskId):this.controller.jumpToTime(e)}},{key:"stop",value:function(){this.audioPlayer.stop(),this.seek(0),this.pause(),this.ctx.eventHub.emit(bb.mediaStop,{id:this.id})}},{key:"requestFullscreen",value:function(){}},{key:"requestCancelFullscreen",value:function(){}},{key:"destroy",value:function(){this.ctx.volumeAdjuster.removeListener("update",this.updateVolume),this.stop(),this.controller.destroy(),this.ctx.activeMedia.delete(this),this.audioPlayer.destroy()}},{key:"fadeIn",value:function(e,t){this.audioPlayer.fade(e,this.ctx.volumeAdjuster.volume,t)}},{key:"fadeOut",value:function(e,t){this.audioPlayer.fade(this.ctx.volumeAdjuster.volume,e,t)}},{key:"currentTime",get:function(){return this.audioPlayer.currentTime},set:function(e){this.audioPlayer.currentTime=e}},{key:"clippedDuration",get:function(){return this.controller.clippedDuration}},{key:"paused",get:function(){return this.audioPlayer.isPaused}},{key:"isPaused",get:function(){return this.audioPlayer.isPaused}},{key:"duration",get:function(){return this.audioPlayer.duration}}]),n}(Ks.a),Zg=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},qg=function(e){p(n,e);var t=m(n);function n(e,r,i){var o;return _(this,n),(o=t.call(this,Object.assign(Object.assign({},e),{type:"Shape",useBgFill:!1,textRotateWithShape:!0,isPicture:!0}),r,i)).isInteractiveOutside=!1,o.cmd=new Pv(y(o)),o.media=null==e?void 0:e.media,o.container.name=e.id+"_container_[Picture]",o.renderContainer.name=e.id+"_render_container_[Picture]",o.picFill=new Bm(o.ctx,e.picFill,e.width,e.height,{useFilter:!0,useSlideBackgroundFill:!1}),o}return T(n,[{key:"applyCommand",value:function(e,t){var n,r,i,o;if("call"===t)if(/playFrom\(([0-9.]+)\)/.test(e)){var a=e.match(/playFrom\(([0-9.]+)\)/),s=Number(a[1]||"0");null===(n=this.mediaPlayer)||void 0===n||n.controller.playMediaFromCtrl(!0),Math.abs(s)>.1&&(null===(r=this.mediaPlayer)||void 0===r||r.controller.jumpToTime(s))}else"custom-pause"===e?null===(i=this.mediaPlayer)||void 0===i||i.controller.pauseMediaFromCtrl(!0):"togglePause"===e?this.mediaPlayer&&(this.mediaPlayer.isPlaying?this.mediaPlayer.controller.pauseMediaFromCtrl(!0):this.mediaPlayer.controller.playMediaFromCtrl(!0)):"stop"===e&&(null===(o=this.mediaPlayer)||void 0===o||o.stop())}},{key:"renderPic",value:function(){var e,t,n,r,i,o;return Zg(this,void 0,void 0,regeneratorRuntime.mark((function a(){var s,u,l,c,h,d=this;return regeneratorRuntime.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(!(s=this.picFill.displayObject)){a.next=15;break}if(s.name=this.json.id+"_pic_fill_[Picture]",u=null===(e=this.backgroundGraphics)||void 0===e?void 0:e.getClonedDisplayObject(),(null===(t=this.backgroundGraphics)||void 0===t?void 0:t.isNeedMask(s.width,s.height))&&u&&(s.mask=u,this.effectContainer.addChild(u)),s.width=this.designWidth,s.height=this.designHeight,s instanceof jp&&this.ctx.slideScopeEventHub.once("slide-render",(function(e){var t;d.ctx.slideIndex===e&&(null===(t=d.effectObject)||void 0===t||t.setFrameCount(s.totalFrames),s.play(),s.onFrameChange=function(e){if(d.effectObject)if(d.effectObject.hasFrame(e))d.effectObject.updateFrame(e);else{var t=d.getEffectTexture();t&&(d.effectObject.createFrame(e,t.texture),d.effectObject.setFrameOffset(t.offsetX,t.offsetY))}})})),this.effectContainer.addChild(s),!this.media){a.next=13;break}if(l=this.media.src,"audio"===this.media.type&&/mp4$/.test(l)&&(l=l.replace(/mp4$/,"mp3")),!this.ctx.urlInterrupter){a.next=12;break}return c=Date.now(),a.next=10,this.ctx.urlInterrupter(l);case 10:l=a.sent,this.ctx.logger.info("redirect media url by interrupter. time: "+(Date.now()-c),this.ctx.taskId);case 12:this.ctx.loaderDelegate&&(l=this.ctx.loaderDelegate.redirectMedia(l),this.ctx.logger.info("redirect media url to ".concat(l," by delegate."),this.ctx.taskId)),this.media.src=l;case 13:"video"===(null===(n=this.media)||void 0===n?void 0:n.type)&&this.media.src?(this.mediaPlayer=new Xg({id:this.json.id+"-video",shapeId:this.json.id,ctx:this.ctx,video:this.media,height:this.designHeight,width:this.designWidth,target:s,container:this.effectContainer,canvasElement:this.ctx.view}),(null===(r=this.mediaPlayer)||void 0===r?void 0:r.sprite)&&u&&(h=null===(i=this.backgroundGraphics)||void 0===i?void 0:i.getClonedDisplayObject())&&(this.mediaPlayer.sprite.mask=h,this.container.addChild(h))):"audio"===(null===(o=this.media)||void 0===o?void 0:o.type)&&this.media.src&&(this.mediaPlayer=new Qg({id:this.json.id+"-audio",shapeId:this.json.id,ctx:this.ctx,audio:this.media,height:this.designHeight,width:this.designWidth,target:s,canvasElement:this.ctx.view,fade:this.media.fade})),this.mediaPlayer&&(this.isInteractiveOutside=!!this.container.interactive,this.container.interactive=!0,Pg.isDesktop()?(this.container.on("mouseover",(function(){d.mediaPlayer.showController()})),this.container.on("mouseout",(function(){d.mediaPlayer.hideController()}),!1)):this.container.on("pointerdown",(function(){d.mediaPlayer.showController()})));case 15:case"end":return a.stop()}}),a,this)})))}},{key:"preRender",value:function(e){f(x(n.prototype),"preRender",this).call(this,e)}},{key:"subClassRender",value:function(){return Zg(this,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.renderPic();case 2:case"end":return e.stop()}}),e,this)})))}},{key:"clearOnSlideChange",value:function(){f(x(n.prototype),"clearOnSlideChange",this).call(this),this.mediaPlayer&&(this.container.interactive=!1,this.mediaPlayer.stop(),this.mediaPlayer.hideController())}},{key:"initOnReuse",value:function(){f(x(n.prototype),"initOnReuse",this).call(this),this.mediaPlayer&&(this.container.interactive=!0)}},{key:"destroy",value:function(){this.mediaPlayer&&(this.picFill.displayObject&&!this.isInteractiveOutside&&(this.container.interactive=!1),this.mediaPlayer.destroy(),this.mediaPlayer=void 0),this.picFill.destroy()}}]),n}(Ag),Jg=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Kg=function(e){p(n,e);var t=m(n);function n(e,r,i,o){var a;return _(this,n),(a=t.call(this,e,r,i)).children=[],a.cacheSprite=new Ld,a.cacheContainer=new Rl.b,a.json=e,a.json.fillStyle&&"groupFill"===a.json.fillStyle.fillType&&i.groupFillStyle&&(a.json.fillStyle=i.groupFillStyle),a.container.name=e.id+"_container_[Container]",a.cacheContainer.name=e.id+"_cache_container_[Container]",a.ctx.timingTargets.addTarget(e.id,y(a)),a.updateTransform(a.json),a.fillObject=new Bm(a.ctx,e.fillStyle,e.width,e.height,{useFilter:!1,useSlideBackgroundFill:!1}),a.createChildren(o),a}return T(n,[{key:"createChildren",value:function(e){for(var t,r,i,o,a=this,s={x:null!==(r=null===(t=this.json.position)||void 0===t?void 0:t.x)&&void 0!==r?r:0,y:null!==(o=null===(i=this.json.position)||void 0===i?void 0:i.y)&&void 0!==o?o:0},u=function(t,r){e.addSubMTask((function(){return Jg(a,void 0,void 0,regeneratorRuntime.mark((function r(){var i,o,a,u,l;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:i=this.json.children[t],o=null,this.ctx.featureList&&this.ctx.featureList.smartArt&&("Shape"===(null==i?void 0:i.type)||"Picture"===(null==i?void 0:i.type))&&this.ctx.smartArtShapeList&&(a=i.id,(u=this.ctx.smartArtShapeList.find((function(e){return e.id===a})))&&(i=u)),l={parentGlobalPos:s,groupFillStyle:this.json.fillStyle,groupSize:{w:this.json.width,h:this.json.height}},"Shape"===(null==i?void 0:i.type)?o=new Ag(i,this.ctx,l):"Picture"===(null==i?void 0:i.type)?o=new qg(i,this.ctx,l):"Container"===(null==i?void 0:i.type)&&(o=new n(i,this.ctx,l,e)),o&&this.children.push(o);case 4:case"end":return r.stop()}}),r,this)})))}),"@ContainerImpl[child.init]")},l=0,c=this.json.children.length;l1&&void 0!==arguments[1]?arguments[1]:{};if(e)if(e.delay&&e.delay>0){var n=a.ctx.clock.setTimeout((function(){e.event&&(a.cond[e.event]=!0,a.detectTrigger(t))}),e.delay);a.timeoutIds.push(n)}else a.cond[e.event]=!0,a.detectTrigger(t);else a.detectTrigger(t)},a.id=e,a.ctx=o,a.eventHubs=i,r.forEach((function(e){a.addCond(e)})),a}return T(n,[{key:"setTriggerParams",value:function(e){this.triggerParams=e}},{key:"addCond",value:function(e){var t=this,n=function(){for(var n=arguments.length,r=new Array(n),i=0;i0&&(this.cond[e.event]=!1,this.eventHubs.runtime.addListener(e.event,n)):this.cond[e.event]=!1)}},{key:"isTrigger",value:function(){var e=this;return Object.keys(this.cond).every((function(t){return!!e.cond[t]}))}},{key:"isTriggerWithoutParent",value:function(){var e=this;return Object.keys(this.cond).filter((function(e){return"self"!==e})).every((function(t){return!!e.cond[t]}))}},{key:"detectTrigger",value:function(e){var t=this;if(Object.keys(this.cond).every((function(e){return!!t.cond[e]}))){Object.keys(this.cond).forEach((function(e){t.cond[e]=!1}));var n=this.triggerParams;this.triggerParams=void 0,this.emit("active",n,e)}}},{key:"reset",value:function(){var e=this;Object.keys(this.cond).forEach((function(t){e.cond[t]=!1})),this.timeoutIds.forEach((function(t){return e.ctx.clock.clearTimeout(t)}))}}]),n}(Ks.a),ey=function(e){p(n,e);var t=m(n);function n(e){var r;_(this,n),(r=t.call(this)).isTimeNodeEndSync=!1,r.interactiveListeners=[],r.runtimeNodeEventHub=new Ks.a,r._currentSeqIndex=0,r._currentSeqState="idle",r.isForward=!0,r.autoPlay=!1,r.handlePrev=function(){var e,t,n,i,o,a,s=arguments.length>0&&void 0!==arguments[0]&&arguments[0];r.hasPrev()||!r.isMainSeq?"idle"===r.currentSeqState?(r.decrSeqIndex(),null===(e=r.commonTimeNode.children[r.currentSeqIndex])||void 0===e||e.commonTimeNode.seekToStart(),null===(t=r.commonTimeNode.children[r.currentSeqIndex])||void 0===t||t.commonTimeNode.clearSubList(),r.currentSeqState="idle"):"running"===r.currentSeqState?(null===(n=r.commonTimeNode.children[r.currentSeqIndex])||void 0===n||n.commonTimeNode.seekToStart(),null===(i=r.commonTimeNode.children[r.currentSeqIndex])||void 0===i||i.commonTimeNode.clearSubList(),r.currentSeqState="idle"):"end"===r.currentSeqState&&(r.currentSeqIndex>=r.commonTimeNode.children.length&&(r.currentSeqIndex=r.commonTimeNode.children.length-1),null===(o=r.commonTimeNode.children[r.currentSeqIndex])||void 0===o||o.commonTimeNode.seekToStart(),null===(a=r.commonTimeNode.children[r.currentSeqIndex])||void 0===a||a.commonTimeNode.clearSubList(),r.currentSeqState="idle"):r.globalEventHub.emit("c:prev slide",s)},r.handleNext=function(e,t){var n,i,o,a;if(r.isTimeNodeEndSync&&(r.isTimeNodeEndSync=!1,r.currentSeqState="idle",r.currentSeqIndex=0),!r.hasNext()&&r.isMainSeq&&t)r.globalEventHub.emit("c:next slide",e);else{if(r.isInteractiveSeq){r.globalEventHub.emit("shape slide onNext"+(r.json.ctn.id||""));var s={result:null};r.findChildInfiniteRepeat(r.commonTimeNode,s),1===r.commonTimeNode.children.length&&s.result&&(s.result.json.subTnLst||[]).length>0&&0===r.currentSeqIndex&&"running"===r.currentSeqState&&r.commonTimeNode.allChildrenEndHandle()}"idle"===r.currentSeqState?null===(n=r.commonTimeNode.children[r.currentSeqIndex])||void 0===n||n.commonTimeNode.startTimeNodeForce():"running"===r.currentSeqState?(null===(i=r.commonTimeNode.children[r.currentSeqIndex])||void 0===i||i.commonTimeNode.seekToEnd(!1,!0),r.currentSeqState="end",r.incrSeqIndex(),null===(o=r.commonTimeNode.children[r.currentSeqIndex])||void 0===o||o.commonTimeNode.startTimeNodeForce()):"end"===r.currentSeqState&&(r.incrSeqIndex(),null===(a=r.commonTimeNode.children[r.currentSeqIndex])||void 0===a||a.commonTimeNode.startTimeNodeForce())}};var i=e.json,o=e.iterateType,a=e.isIterate,s=e.isSub,u=e.parent,l=e.ctx,h=e.eventHub,d=e.iterateIndex,f=e.iterateId,p=e.isInInteractiveSeq;return r.isMainSeq="mainSeq"===i.ctn.nodeType,r.isInteractiveSeq="interactiveSeq"===i.ctn.nodeType,r.id=i.ctn.id,r.isIterate=a,r.json=i,r.ctx=l,r.globalEventHub=h,r.commonTimeNode=new tb({json:i.ctn,isSub:s,eventHubs:{global:h,runtime:r.runtimeNodeEventHub},ctx:l,parent:u,isIterate:!1,iterateType:o,iterateIndex:d,iterateId:f,isInInteractiveSeq:p||r.isInteractiveSeq,fromSeqId:r.isInteractiveSeq?r.json.ctn.id:""}),r.bindShapeEvent(),r.nextConds=new $g("mainSeq",i.nextCondLst,{global:h,runtime:r.runtimeNodeEventHub},r.ctx),r.prevConds=new $g("mainSeq",i.preCondLst,{global:h,runtime:r.runtimeNodeEventHub},r.ctx),r.commonTimeNode.on("timeNodeRestart",(function(){r.currentSeqIndex=0,r.currentSeqState="idle"})),r.commonTimeNode.on("childTimeNodeStart",(function(e){var t=r.commonTimeNode.children.findIndex((function(t){return t.commonTimeNode.uuid===e.id}));t>=0&&(r.currentSeqIndex=t),r.currentSeqState="running",r.isMainSeq&&r.ctx.eventHub.emit(bb.mainSeqStepStart,t)})),r.commonTimeNode.on("childTimeNodeEnd",(function(e){var t=r.commonTimeNode.children.findIndex((function(t){return t.commonTimeNode.uuid===e.id}));t>=0&&(r.currentSeqIndex=t),r.currentSeqState="end",r.autoPlay&&r.ctx.clock.setTimeout((function(){r.handleNext(!1,!0)})),r.isMainSeq&&r.ctx.eventHub.emit(bb.mainSeqStepEnd,t)})),r.commonTimeNode.on("timeNodeEndSync",(function(){r.isTimeNodeEndSync=!0,r.commonTimeNode.resetForRepeat()})),r.commonTimeNode.on("timeNodeDestroy",(function(){r.interactiveListeners.forEach((function(e){var t=c(e,2),n=t[0],r=t[1];n&&r&&n.interactiveContainer.removeListener("pointerdown",r)})),r.interactiveListeners=[]})),r.nextConds.on("active",(function(e,t){Array.isArray(t)?r.handleNext(t[0],t[1]):r.handleNext(t,!0)})),r.prevConds.on("active",(function(e,t){Array.isArray(t)?r.handlePrev(t[0]):r.handlePrev(t)})),r}return T(n,[{key:"startAutoPlay",value:function(){this.autoPlay=!0,this.commonTimeNode.children[0].commonTimeNode.startTimeNodeForce()}},{key:"incrSeqIndex",value:function(){this.currentSeqIndex+1<=this.commonTimeNode.children.length&&(this.currentSeqIndex+=1)}},{key:"decrSeqIndex",value:function(){this.currentSeqIndex-1>=-1&&(this.currentSeqIndex-=1)}},{key:"hasPrev",value:function(){return!(this.currentSeqIndex<=0&&"idle"===this.currentSeqState)}},{key:"hasNext",value:function(){return!(this.currentSeqIndex>=this.commonTimeNode.children.length||this.currentSeqIndex===this.commonTimeNode.children.length-1&&"end"===this.currentSeqState)}},{key:"findChildInfiniteRepeat",value:function(e,t){var n=this;e.isInfiniteRepeat()?t.result=e:e.children.map((function(e){return e.commonTimeNode})).forEach((function(e){return n.findChildInfiniteRepeat(e,t)}))}},{key:"bindShapeEvent",value:function(){var e=this;"interactiveSeq"===this.json.ctn.nodeType&&this.json.nextCondLst.forEach((function(t){if(/^shape/.test(t.event)){var n=t.event.split(" ")[1];if(n){var r=e.ctx.timingTargets.getTargetById(n);if(r){r.interactiveContainer.interactive=!0,r.interactiveContainer.cursor="pointer";var i=function(){e.ctx.eventHub.emit(bb.userInput);var t="shape ".concat(n," onClick"),r=e.ctx.mode;"interactive"!==r&&"sync"!==r||e.ctx.eventHub.emit(bb.interactiveSeqAction,{action:t,seqId:e.json.ctn.id}),"sync"!==r&&"local"!==r||e.globalEventHub.emit(t)};r.interactiveContainer.on("pointerdown",i),e.interactiveListeners.push([r,i])}}}}))}},{key:"setCurrentStep",value:function(e,t){var n=this.commonTimeNode.children.length;if(!(e>n)){this.isInteractiveSeq&&0===this.commonTimeNode.applyCount&&(this.commonTimeNode.applyCount=1);var r=e;if(this.commonTimeNode.seekToStart(),-1===r&&(r=n-1),0!==r||"start"!==t){if(r>=0&&r=1){var n=r.json.cBhvr.attrList[0];r.json.cBhvr.attrList.length>1&&console.warn("this.json.cBhvr.attrList.length > 0");var i=r.json.cBhvr.to||r.json.to;i&&r.timingTarget&&ty(r.timingTarget,n,i)}})),r}return T(n,[{key:"modifyAttrKey",get:function(){return this.json.cBhvr.attrList[0]}}]),n}(ry),oy=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==("undefined"==typeof Reflect?"undefined":M(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},ay=function(){function e(t,n){_(this,e),this.math={pi:Math.PI,e:Math.E,abs:Math.abs,acos:Math.acos,asin:Math.asin,atan:Math.atan,ceil:Math.ceil,cos:Math.cos,cosh:Math.cosh,deg:function(e){return e/Math.PI*180},exp:Math.exp,floor:Math.floor,ln:Math.log,max:Math.max,min:Math.min,rad:function(e){return e/180*Math.PI},rand:Math.random,sin:Math.sin,sinh:Math.sinh,sqrt:Math.sqrt,tan:Math.tan,tanh:Math.tanh},this.timingTarget=n,this.val=t.val.value,this.time=t.time,t.fmla&&(this.fmla=this.parseFmla(t.fmla))}return T(e,[{key:"parseFmla",value:function(e){var t=e.replace(/#ppt_h/g,"(".concat(this.timingTarget.design_ppt_h,")"));return t=(t=(t=(t=(t=(t=(t=(t=t.replace(/#ppt_w/g,"(".concat(this.timingTarget.design_ppt_w,")"))).replace(/#ppt_x/g,"(".concat(this.timingTarget.design_ppt_x,")"))).replace(/#ppt_y/g,"(".concat(this.timingTarget.design_ppt_y,")"))).replace(/ppt_w/g,"vars.ppt_w")).replace(/ppt_h/g,"vars.ppt_h")).replace(/ppt_x/g,"vars.ppt_x")).replace(/ppt_y/g,"vars.ppt_y")).replace(/#/g,"vars."),["abs","acos","asin","atan","ceil","cos","cosh","deg","exp","floor","ln","max","min","rad","rand","sin","sinh","sqrt","tan","tanh","pi","e"].forEach((function(e){var n=new RegExp("([^a-z])".concat(e,"([^a-z])"),"g");t=t.replace(n,(function(t,n,r){return"".concat(n,"math.").concat(e).concat(r)}))})),new Function("vars","math","$","return "+t)}}]),e}(),sy=function(e){p(n,e);var t=m(n);function n(e,r,i){var o;return _(this,n),(o=t.call(this,e,r)).value=e.val.value,i&&(o.fmla=o.parseFmla(i)),o}return T(n,[{key:"resolveValue",value:function(){return this.value}},{key:"interpolationFrom",value:function(e,t,n){var r=e.resolveValue(n),i=r+(this.resolveValue()-r)*t;return e.fmla?e.fmla(n,this.math,i):i}}]),n}(ay);oy([iv()],sy.prototype,"interpolationFrom",null);var uy=function(e){p(n,e);var t=m(n);function n(e,r){var i,o;return _(this,n),(i=t.call(this,e,r)).value=null===(o=e.val)||void 0===o?void 0:o.value,i}return T(n,[{key:"interpolationFrom",value:function(e,t,n){var r=e.resolveValue(n);return t>this.time&&["hidden","visible"].indexOf(r)<0&&(r=this.resolveValue()),r}},{key:"resolveValue",value:function(){return this.value||""}}]),n}(ay);oy([iv()],uy.prototype,"interpolationFrom",null);var ly=function(e){p(n,e);var t=m(n);function n(e,r){var i;return _(this,n),(i=t.call(this,e,r)).fn=i.parseFmla(i.val),i}return T(n,[{key:"resolveValue",value:function(e){return this.fn(e,this.math,1)}},{key:"interpolationFrom",value:function(e,t,n){var r=e.resolveValue(n),i=r+(this.resolveValue(n)-r)*t;return e.fmla?e.fmla(n,this.math,i):i}}]),n}(ay);oy([iv()],ly.prototype,"interpolationFrom",null);var cy=function(e){p(n,e);var t=m(n);function n(e,r){var i;return _(this,n),(i=t.call(this,e,r)).value=e.val.value,i}return T(n,[{key:"interpolationFrom",value:function(e,t){return Zv(e.resolveValue(),this.value,t)}},{key:"resolveValue",value:function(){return this.value}}]),n}(ay);oy([iv()],cy.prototype,"interpolationFrom",null);var hy=function(e){p(n,e);var t=m(n);function n(e){var r;return _(this,n),(r=t.call(this,e)).isConflict=!0,r.activeWhenConflict="next",r.startVal=null,r.createVal=null,r.vars={ppt_x:0,ppt_y:0,ppt_w:0,ppt_h:0},r.keyFrames=[],r.isColorAnim=!1,r.onTimeNodeStart=function(){r.timingTarget&&(r.startVal=ny(r.timingTarget,r.json.cBhvr.attrList[0]))},r.updateVars=function(){var e,t,n,i;(null===(e=r.timingTarget)||void 0===e?void 0:e.ppt_h)&&(r.vars.ppt_h=r.timingTarget.ppt_h),(null===(t=r.timingTarget)||void 0===t?void 0:t.ppt_w)&&(r.vars.ppt_w=r.timingTarget.ppt_w),(null===(n=r.timingTarget)||void 0===n?void 0:n.ppt_x)&&(r.vars.ppt_x=r.timingTarget.ppt_x),(null===(i=r.timingTarget)||void 0===i?void 0:i.ppt_y)&&(r.vars.ppt_y=r.timingTarget.ppt_y),r.isColorAnim},r.onTimeUpdate=function(e){var t=e.duration,n=e.delta/t,i=r.keyFrames.findIndex((function(e){return n<=e[0]})),o=r.json.cBhvr.attrList;if(i<0){var a=r.keyFrames[r.keyFrames.length-1];r.timingTarget&&o&&o[0]&&ty(r.timingTarget,o[0],a[1].resolveValue(r.vars))}else{var s=i-1,u=r.keyFrames[i],l=r.keyFrames[s]||u,c=u[0]-l[0]==0?1:(n-l[0])/(u[0]-l[0]),h=u[1].interpolationFrom(l[1],c,r.vars);r.timingTarget&&o&&o[0]&&ty(r.timingTarget,o[0],h)}},r.onSeekToStart=function(){null!==r.startVal&&r.timingTarget&&ty(r.timingTarget,r.json.cBhvr.attrList[0],r.startVal)},r.onSeekToEnd=function(){r.onTimeUpdate({duration:1,delta:1,isReverse:!1})},r.onDestroy=function(){null!==r.createVal&&r.timingTarget&&ty(r.timingTarget,r.json.cBhvr.attrList[0],r.createVal)},r.initKeyFrames(),r.commonTimeNode.on("timeUpdate",r.onTimeUpdate),r.commonTimeNode.on("timelineStart",r.updateVars),r.commonTimeNode.on("timeNodeStart",r.onTimeNodeStart),r.commonTimeNode.on("timeNodeCreate",r.onTimeNodeStart),r.commonTimeNode.on("timeNodeDestroy",r.onDestroy),r.createVal=ny(r.timingTarget,r.json.cBhvr.attrList[0]),r}return T(n,[{key:"initKeyFrames",value:function(){var e,t=this.json.valueType;if(this.json.tavLst.length<=0)if(this.json.to){if(this.json.from||this.startVal){var n={time:0,val:{type:"string",value:this.json.from||this.startVal.toString()},fmla:""};if("num"===t&&this.timingTarget){var r=new ly(n,this.timingTarget);this.keyFrames.push([n.time,r])}}var i={time:1,val:{type:"string",value:this.json.to},fmla:""};if("num"===t&&this.timingTarget){var o=new ly(i,this.timingTarget);this.keyFrames.push([i.time,o])}}else if(this.json.by){var a={time:0,val:{type:"string",value:this.json.cBhvr.attrList[0]},fmla:""};if("num"===t&&this.timingTarget){var s=new ly(a,this.timingTarget);this.keyFrames.push([a.time,s])}var u={time:1,val:{type:"string",value:((null===(e=a.val)||void 0===e?void 0:e.value)||"")+"+"+this.json.by},fmla:""};if("num"===t&&this.timingTarget){var l=new ly(u,this.timingTarget);this.keyFrames.push([u.time,l])}}if(this.json.tavLst.length>0){var c,h=S(this.json.tavLst);try{for(h.s();!(c=h.n()).done;){var d=c.value;if(d.val&&this.timingTarget){var f=null;"string"===d.val.type?"num"===t?f=new ly(d,this.timingTarget):"str"===t&&(f=new uy(d,this.timingTarget)):"number"===d.val.type?f=new sy(d,this.timingTarget):"color"===d.val.type?(this.isColorAnim=!0,f=new cy(d,this.timingTarget)):"boolean"===d.val.type&&console.warn("not implements"),f&&this.keyFrames.push([d.time,f])}}}catch(e){h.e(e)}finally{h.f()}}}},{key:"modifyAttrKey",get:function(){return this.json.cBhvr.attrList[0]}}]),n}(ry),dy=function(e){p(n,e);var t=m(n);function n(e,r,i){return _(this,n),t.call(this,e,r,i)}return T(n,[{key:"percent",set:function(e){this.uniforms.percent=e}},{key:"transition",set:function(e){this.uniforms.transition=e}}]),n}(Xl.k),fy=n(121),py=n.n(fy),vy=n(122),my=n.n(vy),gy=n(123),yy=n.n(gy),by=n(124),xy=n.n(by),_y=n(9),wy=n.n(_y),Ty=n(125),My=n.n(Ty),Sy=n(126),Ey=n.n(Sy),Ay="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAMAAABHPGVmAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAr5QTFRFAAAATwAAOQAAZgAAKwAAPAAAPQAA7AAA/wAA/QAAugAA5QAAsQAAwQAAsAAAfwAAawAASQAAZAAAOAAAJwAALAAALQAAqQAAiwAAmgAA5AAA7QAAtQAAhQAALwAAfAAAXwAAYQAAigAAuQAAfgAAswAAcgAArQAAqgAAZwAAaQAAMgAAGAAAiAAAjwAA1gAA6QAA+wAA7wAA2AAAbQAA2gAA3QAAuwAA3wAA2QAAxQAA0QAAzwAA0gAAXQAAYAAADAAADwAAGQAALgAAjgAAcAAAzQAAwgAA+gAA3A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9bZAfc5LA84bxj3frYCxezbP9KG7QeJzevIhiAU4p/j+y2OyMV2mxNgAAAABJRU5ErkJggg==",Iy=n(127),Cy=n.n(Iy),Ny=n(128),ky=n.n(Ny),Dy=n(129),Py=n.n(Dy),Oy=n(130),Ry=n.n(Oy),Ly=n(131),jy=n.n(Ly),By=n(132),Uy=n.n(By),zy=n(133),Fy=n.n(zy),Gy=n(134),Hy=n.n(Gy),Vy=n(135),Wy=n.n(Vy),Yy={wipe:function(e){p(n,e);var t=m(n);function n(e){var r;_(this,n);var i=1;return"up"===e?i=1:"down"===e?i=2:"left"===e?i=3:"right"===e&&(i=4),(r=t.call(this,my.a,py.a,{percent:0,direction:1,transition:0})).uniforms.direction=i,r}return n}(dy),fade:function(e){p(n,e);var t=m(n);function n(e){var r;_(this,n);var i=1;return"out"===e?i=-1:"in"===e&&(i=1),(r=t.call(this,void 0,yy.a,{percent:0,transition:1})).uniforms.transition=Math.pow(i,i),r}return n}(dy),blinds:function(e){p(n,e);var t=m(n);function n(e){var r;return _(this,n),(r=t.call(this,wy.a,xy.a,{percent:0,transition:1,rect:new Float32Array([0,0,0,0])})).uniforms.option="vertical"===e?1:0,r}return n}(dy),checkerboard:function(e){p(n,e);var t=m(n);function n(e){var r;return _(this,n),(r=t.call(this,wy.a,My.a,{percent:0,transition:1,rect:new Float32Array([0,0,0,0])})).uniforms.option="down"===e?1:0,r}return n}(dy),dissolve:function(e){p(n,e);var t=m(n);function n(e){var r;return _(this,n),(r=t.call(this,wy.a,Ey.a,{percent:0,transition:1,rect:new Float32Array([0,0,0,0])})).setTextTure(),r}return T(n,[{key:"setTextTure",value:function(){this.uniforms.dissolveSampler=Xl.t.from(Ay)}}]),n}(dy),randombar:function(e){p(n,e);var t=m(n);function n(e){var r;return _(this,n),(r=t.call(this,wy.a,Cy.a,{percent:0,transition:1,rect:new Float32Array([0,0,0,0])})).uniforms.option="vertical"===e?1:0,r.setTextTure(),r}return T(n,[{key:"setTextTure",value:function(){this.uniforms.dissolveSampler=Xl.t.from(Ay)}}]),n}(dy),circle:function(e){p(n,e);var t=m(n);function n(e){var r;return _(this,n),(r=t.call(this,wy.a,ky.a,{percent:0,transition:1,rect:new Float32Array([0,0,0,0])})).uniforms.option="out"===e?1:0,r}return n}(dy),box:function(e){p(n,e);var t=m(n);function n(e){var r;return _(this,n),(r=t.call(this,wy.a,Py.a,{percent:0,transition:1,rect:new Float32Array([0,0,0,0])})).uniforms.option="out"===e?1:0,r}return n}(dy),diamond:function(e){p(n,e);var t=m(n);function n(e){var r;return _(this,n),(r=t.call(this,wy.a,Ry.a,{percent:0,transition:1,rect:new Float32Array([0,0,0,0])})).uniforms.option="out"===e?1:0,r}return n}(dy),plus:function(e){p(n,e);var t=m(n);function n(e){var r;return _(this,n),(r=t.call(this,wy.a,jy.a,{percent:0,transition:1,rect:new Float32Array([0,0,0,0])})).uniforms.option="out"===e?1:0,r}return n}(dy),barn:function(e){p(n,e);var t=m(n);function n(e){var r;return _(this,n),(r=t.call(this,wy.a,Uy.a,{percent:0,transition:1,rect:new Float32Array([0,0,0,0])})).uniforms.option="inHorizontal"===e?1:"outHorizontal"===e?2:"outVertical"===e?3:0,r}return n}(dy),strips:function(e){p(n,e);var t=m(n);function n(e){var r;return _(this,n),(r=t.call(this,wy.a,Fy.a,{percent:0,transition:1,rect:new Float32Array([0,0,0,0])})).uniforms.option="upLeft"===e?1:"downRight"===e?2:"upRight"===e?3:0,r}return n}(dy),wedge:function(e){p(n,e);var t=m(n);function n(e){return _(this,n),t.call(this,wy.a,Hy.a,{percent:0,transition:1,rect:new Float32Array([0,0,0,0])})}return n}(dy),wheel:function(e){p(n,e);var t=m(n);function n(e){var r;return _(this,n),(r=t.call(this,wy.a,Wy.a,{percent:0,transition:1,rect:new Float32Array([0,0,0,0])})).uniforms.option=Number(e)||1,r}return n}(dy)},Xy=function(e){p(n,e);var t=m(n);function n(e){var r,i;_(this,n),(r=t.call(this,e)).filterType="",r.isConflict=!1,r.activeWhenConflict="prev",r.onTimeUpdate=function(e){var t,n=e.duration,i=e.delta/n;if(r.filter){r.filter.percent=r.commonTimeNode.applyTimeFilter(i);var o=null===(t=r.timingTarget)||void 0===t?void 0:t.container.getBounds();o&&(r.filter.uniforms.uBoundRect=new Float32Array([o.x,o.y,o.width,o.height]))}i>=1&&r.timingTarget&&r.ctx.clock.setTimeout((function(){r.removeFilter()}),34)},r.onSeekToStart=function(){r.timingTarget&&r.removeFilter()},r.onSeekToEnd=function(){r.timingTarget&&r.removeFilter()},r.onDestroy=function(){r.removeFilter()},r.commonTimeNode.on("timelineStart",(function(){r.filter&&r.timingTarget&&(r.timingTarget.container.filters&&0!==r.timingTarget.container.filters.length?r.timingTarget.container.filters.push(r.filter):r.timingTarget.container.filters=[r.filter])})),r.commonTimeNode.on("timeNodeDestroy",r.onDestroy),r.commonTimeNode.on("timeUpdate",r.onTimeUpdate);var o=1;"out"===e.json.transition&&(o=-1);var a=null===(i=e.json.filter)||void 0===i?void 0:i.match(/^([a-zA-Z]+)(\((.+)\))?/);if(a){var s=a[1],u=a[3];Yy[s]&&(r.filter=new Yy[s](u),r.filterType="".concat(s,"-").concat(u),r.filter&&(r.filter.transition=o))}return r}return T(n,[{key:"removeFilter",value:function(){var e,t=this;if((null===(e=this.timingTarget)||void 0===e?void 0:e.container.filters)&&this.filter){var n=this.timingTarget.container.filters.findIndex((function(e){return e===t.filter}));n>=0&&this.timingTarget.container.filters.splice(n,1)}}},{key:"modifyAttrKey",get:function(){return this.filterType}}]),n}(ry),Qy=function(e){p(n,e);var t=m(n);function n(e){var r;return _(this,n),(r=t.call(this,e)).isConflict=!0,r.activeWhenConflict="next",r.startPos=null,r.onTimeNodeStart=function(){var e,t;r.startPos={x:(null===(e=r.timingTarget)||void 0===e?void 0:e.ppt_x)||0,y:(null===(t=r.timingTarget)||void 0===t?void 0:t.ppt_y)||0}},r.onTimeUpdate=function(e){var t,n=e.duration,i=e.delta/n,o=null===(t=r.path)||void 0===t?void 0:t.getPoint(i);r.timingTarget&&o&&(r.timingTarget.ppt_x=o.x+r.timingTarget.design_ppt_x,r.timingTarget.ppt_y=o.y+ +r.timingTarget.design_ppt_y)},r.onSeekToStart=function(){r.timingTarget&&r.startPos&&(r.timingTarget.ppt_x=r.startPos.x,r.timingTarget.ppt_y=r.startPos.y)},r.onSeekToEnd=function(){var e,t,n,i=null!==(t=null===(e=r.commonTimeNode.json)||void 0===e?void 0:e.spd)&&void 0!==t?t:1,o=null===(n=r.path)||void 0===n?void 0:n.getPoint(i>0?1:0);r.timingTarget&&o&&(r.timingTarget.ppt_x=o.x+r.timingTarget.design_ppt_x,r.timingTarget.ppt_y=o.y+r.timingTarget.design_ppt_y)},r.commonTimeNode.on("timeUpdate",r.onTimeUpdate),r.commonTimeNode.on("timeNodeCreate",r.onTimeNodeStart),r.commonTimeNode.on("timeNodeDestroy",r.onSeekToStart),r.createPath(),r}return T(n,[{key:"createPath",value:function(){var e,t,n=new os,r=null===(e=this.json.path)||void 0===e?void 0:e.match(/[MLCmlc][^MLCmlc]+/g);if(r){var i,o=S(r);try{for(o.s();!(i=o.n()).done;){var a=i.value.trim().replace(/\s+/g," ").split(" "),u=d(t=a)||s(t)||E(t)||h(),l=u[0],f=u.slice(1);if("M"===l){var p=c(f.map((function(e){return Number(e)})),2),v=p[0],m=p[1];n.moveTo(v,m)}else if("L"===l){var g=c(f.map((function(e){return Number(e)})),2),y=g[0],b=g[1];n.lineTo(y,b)}else if("C"===l){var x=c(f.map((function(e){return Number(e)})),6),_=x[0],w=x[1],T=x[2],M=x[3],A=x[4],I=x[5];n.bezierCurveTo(_,w,T,M,A,I)}else if("Z"===l)n.closePath();else if("E"===l)console.warn("not implements");else if("c"===l){var C=c(f.map((function(e){return Number(e)})),6),N=C[0],k=C[1],D=C[2],P=C[3],O=C[4],R=C[5],L=n.currentPoint;n.bezierCurveTo(N+L.x,k+L.y,D+L.x,P+L.y,O+L.x,R+L.y)}else if("l"===l){var j=n.currentPoint,B=c(f.map((function(e){return Number(e)})),2),U=B[0],z=B[1];n.lineTo(U+j.x,z+j.y)}else if("m"===l){var F=n.currentPoint,G=c(f.map((function(e){return Number(e)})),2),H=G[0],V=G[1];n.moveTo(H+F.x,V+F.y)}}}catch(e){o.e(e)}finally{o.f()}}this.path=n}},{key:"modifyAttrKey",get:function(){return"motion"}}]),n}(ry),Zy=function(e){p(n,e);var t=m(n);function n(e){var r,i;return _(this,n),(r=t.call(this,e)).isConflict=!0,r.activeWhenConflict="next",r.startVal=null,r.createVal=null,r.onTimelineStart=function(e){e.isReverse||r.updateCurrentValue()},r.onTimeUpdate=function(e){var t,n,i,o,a,s=e.duration,u=e.delta/s,l={x:1,y:1};if(r.to){var c=null!==(t=r.from)&&void 0!==t?t:{x:null!==(i=null===(n=r.startVal)||void 0===n?void 0:n.x)&&void 0!==i?i:1,y:null!==(a=null===(o=r.startVal)||void 0===o?void 0:o.y)&&void 0!==a?a:1};l.x=c.x+(r.to.x-c.x)*u,l.y=c.y+(r.to.y-c.y)*u}else if(r.by){var h={x:r.by.x,y:r.by.y};l.x=1+(h.x-1)*u,l.y=1+(h.y-1)*u}r.timingTarget&&(r.timingTarget.scale=l)},r.onTimeNodeStart=function(){r.timingTarget&&(r.startVal={x:r.timingTarget.scale.x,y:r.timingTarget.scale.y})},r.onSeekToStart=function(){r.timingTarget&&r.startVal&&(r.timingTarget.scale=r.startVal)},r.onSeekToEnd=function(){r.onTimeUpdate({duration:1,delta:1,isReverse:!1})},r.onDestroy=function(){null!==r.createVal&&r.timingTarget&&(r.timingTarget.scale=r.createVal)},r.from=e.json.from,r.to=e.json.to,r.by=e.json.by,r.commonTimeNode.on("timelineStart",r.onTimelineStart),r.commonTimeNode.on("timeNodeCreate",r.onTimeNodeStart),r.commonTimeNode.on("timeUpdate",r.onTimeUpdate),r.commonTimeNode.on("timeNodeStart",r.onTimeNodeStart),r.commonTimeNode.on("timeNodeDestroy",r.onSeekToStart),(null===(i=r.timingTarget)||void 0===i?void 0:i.scale.x)&&(r.createVal={x:r.timingTarget.scale.x,y:r.timingTarget.scale.y}),r}return T(n,[{key:"updateCurrentValue",value:function(){this.timingTarget&&(this.current={x:this.timingTarget.scale.x,y:this.timingTarget.scale.y})}},{key:"modifyAttrKey",get:function(){return"scale"}}]),n}(ry),qy=function(e){p(n,e);var t=m(n);function n(e){var r;return _(this,n),(r=t.call(this,e)).isConflict=!1,r.activeWhenConflict="next",r.isTimelineStart=!1,r.startColorString=null,r.currentColorString="#FFFFFFFF",r.onTimelineStart=function(e){if(!r.isTimelineStart){r.isTimelineStart=!0,e.isReverse||r.updateCurrentValue(),r.from.isInit()||r.from.fromHexString(r.currentColorString),r.to.isInit()||r.from.by(r.by,r.to);var t=c(r.json.cBhvr.attrList[0].split("."),1)[0];ty(r.timingTarget,t+".on","true")}},r.onTimeNodeEnd=function(){var e=r.json.cBhvr.attrList[0];if("remove"===r.json.cBhvr.ctn.fill){var t=c(e.split("."),1)[0];ty(r.timingTarget,t+".on","false")}r.isTimelineStart=!1},r.onSeekToStart=function(){var e,t=r.json.cBhvr.attrList[0];if(r.timingTarget){r.onTimeUpdate({duration:1,delta:0});var n="ppt_c.color"===t||"text.color"===t;if((null===(e=r.timingTarget.fill)||void 0===e?void 0:e.designColor.toUpperCase())===r.from.toHexString().toUpperCase()||n){var i=c(t.split("."),1)[0];ty(r.timingTarget,i+".on","false")}}},r.onTimeNodeStart=function(){if(r.timingTarget){var e=r.json.cBhvr.attrList[0],t=ny(r.timingTarget,e);t&&(r.startColorString=t)}},r.onTimeUpdate=function(e){var t=e.delta/e.duration;if(r.to.interpolationFrom(r.from,t,r.target),r.timingTarget){var n=r.json.cBhvr.attrList[0];ty(r.timingTarget,n,r.target.toHexString())}},r.onSeekToEnd=function(){r.isTimelineStart||r.onTimelineStart({isReverse:!1,activeCount:0,id:""}),r.onTimeUpdate({duration:1,delta:1})},r.replaceAttrToRelation(),"rgb"===r.json.clrSpc?(r.from=new Wv(r.json.from),r.to=new Wv(r.json.to),r.by=new Wv(r.json.by),r.target=new Wv):(r.from=new Vv(r.json.from),r.to=new Vv(r.json.to),r.by=new Vv(r.json.by),r.target=new Vv),r.commonTimeNode.on("timeNodeStart",r.onTimeNodeStart),r.commonTimeNode.on("timeNodeCreate",r.onTimeNodeStart),r.commonTimeNode.on("timelineStart",r.onTimelineStart),r.commonTimeNode.on("timeNodeEnd",r.onTimeNodeEnd),r.commonTimeNode.on("timeUpdate",r.onTimeUpdate),r.commonTimeNode.on("timeNodeDestroy",r.onSeekToStart),r}return T(n,[{key:"replaceAttrToRelation",value:function(){var e=this.json.cBhvr.attrList[0];"ppt_c"!==e?"style.color"===e&&(this.json.cBhvr.attrList[0]="text.color"):this.json.cBhvr.attrList[0]="ppt_c.color"}},{key:"updateCurrentValue",value:function(){if(this.timingTarget){var e=this.json.cBhvr.attrList[0],t=ny(this.timingTarget,e);t&&(this.currentColorString=t)}}},{key:"modifyAttrKey",get:function(){return this.json.cBhvr.attrList[0]}}]),n}(ry),Jy=function(e){p(n,e);var t=m(n);function n(e){var r;return _(this,n),(r=t.call(this,e)).isConflict=!1,r.activeWhenConflict="next",r.startVal=null,r.createVal=null,r.lastVal=null,r.onTimelineStart=function(e){r.lastVal=null,e.isReverse||r.updateCurrentValue()},r.onTimeUpdate=function(e){var t=e.duration,n=e.delta/t,i=0;if(void 0!==r.from&&void 0!==r.to){var o=(i=r.from)+(r.to-i)*n;r.timingTarget&&(r.timingTarget.r=o)}else if(void 0!==r.by){r.lastVal||(r.lastVal=0);var a=r.by*n-r.lastVal;r.lastVal=r.by*n,r.timingTarget&&(r.timingTarget.r+=a)}},r.onTimeNodeCreate=function(){var e;Tv()(null===(e=r.timingTarget)||void 0===e?void 0:e.r)&&(r.createVal=r.timingTarget.r)},r.onTimeNodeStart=function(){var e;Tv()(null===(e=r.timingTarget)||void 0===e?void 0:e.r)&&(r.startVal=r.timingTarget.r)},r.onSeekToStart=function(){r.timingTarget&&null!==r.startVal&&(r.timingTarget.r=r.startVal)},r.onSeekToEnd=function(){r.onTimeUpdate({duration:1,delta:1,isReverse:!1})},r.onDestroy=function(){r.timingTarget&&null!==r.createVal&&(r.timingTarget.r=r.createVal),r.startVal=null},r.from=r.json.from,r.to=r.json.to,r.by=r.json.by,r.by?r.isConflict=!1:r.isConflict=!0,r.onTimeNodeCreate(),r.commonTimeNode.on("timeNodeStart",r.onTimeNodeStart),r.commonTimeNode.on("timeNodeCreate",r.onTimeNodeStart),r.commonTimeNode.on("timelineStart",r.onTimelineStart),r.commonTimeNode.on("timeUpdate",r.onTimeUpdate),r.commonTimeNode.on("timeNodeDestroy",r.onDestroy),r}return T(n,[{key:"updateCurrentValue",value:function(){var e;this.currentVal=null===(e=this.timingTarget)||void 0===e?void 0:e.r}},{key:"modifyAttrKey",get:function(){return"rotate"}}]),n}(ry),Ky=function(e){p(n,e);var t=m(n);function n(e){var r;return _(this,n),(r=t.call(this,e)).isConflict=!1,r.activeWhenConflict="next",r.isApplied=!1,r.onTimeUpdate=function(){var e,t,n=r.json,i=n.cmd,o=n.cmdType;!r.isApplied&&i&&o&&(r.isApplied=!0,null===(t=null===(e=r.timingTarget)||void 0===e?void 0:e.cmd)||void 0===t||t.applyCommand(i,o))},r.onSeekToStart=function(){var e,t;r.commonTimeNode.isInInteractiveSeq||null===(t=null===(e=r.timingTarget)||void 0===e?void 0:e.cmd)||void 0===t||t.applyCommand("custom-pause","call")},r.onSeekToEnd=function(){},r.commonTimeNode.on("timeNodeStart",(function(){r.isApplied=!1})),r.commonTimeNode.on("timeNodeEnd",(function(){r.isApplied=!1})),r.commonTimeNode.on("timeUpdate",r.onTimeUpdate),r.commonTimeNode.on("seekToStart",r.onSeekToStart),r.commonTimeNode.on("seekToEnd",r.onSeekToEnd),r}return T(n,[{key:"modifyAttrKey",get:function(){var e,t,n,r;return(null!==(t=null===(e=this.json)||void 0===e?void 0:e.cmd)&&void 0!==t?t:"")+(null!==(r=null===(n=this.json)||void 0===n?void 0:n.cmdType)&&void 0!==r?r:"")}}]),n}(ry),$y=function e(t){var n=this;_(this,e),this.runtimeNodeEventHub=new Ks.a,this.onVolumeUpdate=function(e){n.audio.volume(e)},this.stopAudio=function(){n.audio.stop()},this.destroy=function(){n.stopAudio(),n.audio.destroy(),n.ctx.activeMedia.delete(n.audio),n.ctx.volumeAdjuster.off("update",n.onVolumeUpdate)};var r=t.json,i=t.isIterate,o=t.isSub,a=t.eventHub,s=t.ctx,u=t.parent,l=t.iterateType,c=t.iterateIndex,h=t.iterateId,d=t.isInInteractiveSeq,f=t.fromSeqId;this.json=r,this.id=r.cMediaNode.ctn.id,this.commonTimeNode=new tb({json:r.cMediaNode.ctn,isSub:o,eventHubs:{global:a,runtime:this.runtimeNodeEventHub},ctx:s,parent:u,isIterate:i,iterateType:l,iterateIndex:c,iterateId:h,isInInteractiveSeq:d,fromSeqId:f});var p=r.cMediaNode.tgtEl;s.loaderDelegate&&(p=s.loaderDelegate.redirectMedia(p),s.logger.info("redirect media url from ".concat(r.cMediaNode.tgtEl," to ").concat(p," by delegate."),s.taskId)),this.audio=new Wg(p,s.runningAudio),s.activeMedia.add(this.audio),this.commonTimeNode.on("timelineStart",(function(){n.audio.volume(s.volumeAdjuster.volume),n.audio.play()})),this.commonTimeNode.on("seekToStart",this.stopAudio),this.commonTimeNode.on("seekToEnd",this.stopAudio),this.commonTimeNode.on("timeNodeDestroy",this.destroy),this.ctx=s,this.ctx.volumeAdjuster.on("update",this.onVolumeUpdate)};function eb(e){return(null===(t=e)||void 0===t?void 0:t.cBhvr)?e.cBhvr.ctn:function(e){var t,n;return!!(null===(n=null===(t=e)||void 0===t?void 0:t.cMediaNode)||void 0===n?void 0:n.ctn)}(e)?e.cMediaNode.ctn:e.ctn;var t}var tb=function(e){p(n,e);var t=m(n);function n(e){var r,i,o;_(this,n),(r=t.call(this)).uuid=uv(),r.isSub=!1,r.isShadow=!1,r.startCount=0,r.applyCount=0,r.isReverse=!1,r.isConflictDispose=!1,r.isIterateEnd=!1,r.parentTimeNode=null,r.isActive=!1,r.isDestroy=!1,r.shouldSeekOnStart=!1,r.repeatTimeoutId="",r.iterateShadows=[],r.isEndEventsEmitted=!1,r.tmFilter=[],r.timeDelta=0,r.isIterate=!1,r.iterateType="el",r.iterateIndex=0,r.children=[],r.subList=[],r.duration=0,r.isNegativeSpeed=!1,r.handleEndCond=function(){r.isActive&&(r.isActive=!1,r.isInfiniteRepeat()?r.repeatTimeNodeEnd():r.seekToEnd(!1,!0))},r.handleActive=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(r.isActive=!0,r.isConflictDispose=!1,r.applyCount+=1,r.json.iterate||r.emit("timeNodeStart",{id:r.uuid,activeCount:r.applyCount,isReverse:r.isReverse}),r.startCount>0&&r.json.restart){if("never"===r.json.restart)return;"whenNotActive"!==r.json.restart&&"always"!==r.json.restart||(r.seekToStart(),r.emit("timeNodeRestart",{id:r.uuid,activeCount:r.applyCount,isReverse:r.isReverse}),r.startTimeLine(e))}else r.startTimeLine(e)},r.updateTimeLine=function(e){var t=e/(nd.b.TARGET_FPMS||.06);r.timeDelta+=t,r.duration-r.timeDelta<=t&&(r.timeDelta=r.duration),r.timeDelta0&&void 0!==arguments[0]&&arguments[0];(r.isTimeNodeEnd()||e)&&(r.isActive=!1,r.isSub&&r.destroy(),r.emitEndEvents())};var a=e.isSub,s=e.isIterate,u=e.ctx,l=e.eventHubs,c=e.parent,h=e.json,d=e.iterateType,f=e.iterateId,p=e.iterateIndex,v=e.isInInteractiveSeq,m=e.fromSeqId;r.isSub=a,r.fromSeqId=m,r.isInInteractiveSeq=v,r.isIterate=s,r.parentTimeNode=c,r.json=h,r.ctx=u,r.iterateIndex=p,r.eventHubs=l,r.iterateType=d,r.iterateId=f,r.tmFilter=null!==(o=null===(i=h.tmFilter)||void 0===i?void 0:i.split(";").map((function(e){return e.split(",").map((function(e){return parseFloat(e.trim())}))})))&&void 0!==o?o:[];var g=Number(r.json.dur),y=r.json.spd||1;if(r.isNegativeSpeed=y<0,Number.isNaN(g)||(r.duration=g/Math.abs(y)),r.uuid+="--"+r.json.id,r.setPreStyle(),h.childTnLst&&r.createChildren(h.childTnLst),r.startConds=new $g(r.json.id||"",h.stCondLst,l,r.ctx),r.endConds=new $g(r.json.id||"",h.endCondLst,l,r.ctx),h.endSync&&(r.endSync=new $g(r.json.id||"",[h.endSync],l,r.ctx),r.endSync.on("active",(function(){var e;"interactiveSeq"===r.json.nodeType&&(r.isActive=!1,r.shouldSeekOnStart=!0,r.emit("timeNodeEndSync"),null===(e=r.endSync)||void 0===e||e.reset())}))),r.startConds.on("active",(function(e){r.isActive||(r.shouldSeekOnStart&&(r.shouldSeekOnStart=!1,r.seekToStart()),r.handleActive(e))})),r.endConds.on("active",(function(){r.handleEndCond(),r.children.forEach((function(e){return e.commonTimeNode.handleEndCond()}))})),r.parentTimeNode&&r.parentTimeNode.on("timeNodeStart",(function(){r.applyCount=0})),r.isSub&&"nextClick"===r.json.masterRel){var b="shape slide onNext"+r.fromSeqId;r.startConds.addCond({event:b})}return r.json.iterate&&!1===r.isIterate&&r.createIterateShadow(),r}return T(n,[{key:"createIterateShadow",value:function(){var e=this,t=uv(),r=!0,i=0;for(this.ctx.eventHub.on("IterateTimeNodeEnd",(function n(i){i===t&&(r=!1,e.ctx.eventHub.removeListener("IterateTimeNodeEnd",n))}));r;){var o=JSON.parse(JSON.stringify(this.json)),a=new n({json:o,isSub:!1,eventHubs:this.eventHubs,ctx:this.ctx,parent:null,isIterate:!0,iterateType:o.iterate.type,iterateIndex:i,iterateId:t,isInInteractiveSeq:this.isInInteractiveSeq,fromSeqId:this.fromSeqId});this.iterateShadows[i]=a,i+=1}}},{key:"isInfiniteRepeat",value:function(){return this.json.repeatCount>999999998}},{key:"getReverse",value:function(){return this.isReverse}},{key:"setReverse",value:function(e){this.isReverse=e}},{key:"createTimeNode",value:function(e,t){var n=null,r={json:e,isSub:t,isIterate:this.isIterate,eventHub:this.eventHubs.global,ctx:this.ctx,parent:this,iterateType:this.iterateType,iterateIndex:this.iterateIndex,iterateId:this.iterateId,isInInteractiveSeq:this.isInInteractiveSeq,fromSeqId:this.fromSeqId};return"seq"===e.type?n=new ey(r):"par"===e.type?n=new nb(r):"set"===e.type?n=new iy(r):"anim"===e.type?n=new hy(r):"animEffect"===e.type?n=new Xy(r):"animMotion"===e.type?n=new Qy(r):"animScale"===e.type?n=new Zy(r):"animClr"===e.type?n=new qy(r):"animRot"===e.type?n=new Jy(r):"cmd"===e.type?n=new Ky(r):"audio"===e.type&&(n=new $y(r)),n}},{key:"createSubList",value:function(e){var t=this;this.subList&&this.subList.forEach((function(e){return e.commonTimeNode.destroy()})),this.subList=[],e.forEach((function(e){var n=t.createTimeNode(e,!0);n&&t.subList.push(n)}))}},{key:"bindCommonTimeNodeEvent",value:function(e){var t=this;e.commonTimeNode.on("timeNodeStart",(function(e){t.emit("childTimeNodeStart",e)})),e.commonTimeNode.on("timeNodeEnd",(function(e){t.emit("childTimeNodeEnd",e),t.children.every((function(e){return e.commonTimeNode.isTimeNodeEndWhenDetectEndSync()}))&&(t.json.iterate||t.allChildrenEndHandle())}))}},{key:"createChildren",value:function(e){var t=this;function n(e){return eb(e).presetOrder}function r(e){return/^slide/.test(e)?"slide":/^layout/.test(e)?"layout":/^master/.test(e)?"master":"unknow"}var i=["master","layout","slide","unknow"];e&&e[0]&&n(e[0])?a(e).sort((function(e,t){var o,a,s,u,l=eb(e).id,c=eb(t).id;if(l&&c){var h=r(l),d=r(c);return h===d?(null!==(o=n(e))&&void 0!==o?o:0)-(null!==(a=n(t))&&void 0!==a?a:0):i.indexOf(h)-i.indexOf(d)}return(null!==(s=n(e))&&void 0!==s?s:0)-(null!==(u=n(t))&&void 0!==u?u:0)})).forEach((function(e){var n=t.createTimeNode(e,!1);n&&(t.bindCommonTimeNodeEvent(n),t.children.push(n))})):e.forEach((function(e){var n=t.createTimeNode(e,!1);n&&(t.bindCommonTimeNodeEvent(n),t.children.push(n))}))}},{key:"playReverse",value:function(){this.isReverse=!0,this.startReverseTimeLine(),this.children.forEach((function(e){return e.commonTimeNode.playReverse()}))}},{key:"allChildrenEndHandle",value:function(){var e=this;if(!this.isDestroy){if(this.json.autoRev&&!this.isReverse)return this.isReverse=!0,void this.playReverse();this.isReverse&&(this.isReverse=!1),this.json.repeatCount&&this.json.repeatCount>this.applyCount?this.repeatTimeoutId=this.ctx.clock.setTimeout((function(){e.seekToStart(!1),e.resetForRepeat(),e.startTimeNodeRepeat()})):(this.json.iterate&&!this.isIterate&&(this.isIterateEnd=!0),this.eventHubs.runtime.emit("runtime all end"),this.startSubList(),this.handleEnd())}}},{key:"resetForRepeat",value:function(){this.isInInteractiveSeq&&this.isInfiniteRepeat()&&this.repeatTimeNodeEnd(),this.timeDelta=0,this.children.forEach((function(e){return e.commonTimeNode.resetForRepeat()}))}},{key:"startSubList",value:function(){this.subList.forEach((function(e){return e.commonTimeNode.startTimeNode()}))}},{key:"startReverseTimeLine",value:function(){this.isEndEventsEmitted=!1,this.timeDelta=0;var e=1e3/this.ctx.ticker.maxFPS;this.duration<=e&&this.duration>0?(this.emit("timeUpdate",{delta:this.duration,duration:this.duration,isReverse:this.isReverse}),this.ctx.eventHub.emit(bb.animateEnd),this.ctx.ticker.remove(this.updateTimeLine)):this.duration>e&&(this.ctx.eventHub.emit(bb.animateStart),this.ctx.ticker.add(this.updateTimeLine))}},{key:"startTimeLine",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(t&&(this.isEndEventsEmitted=!1,this.eventHubs.global.emit("time ".concat(this.json.id," begin")),this.eventHubs.global.emit("time ".concat(this.json.id," onBegin")),this.eventHubs.runtime.emit("runtime ".concat(this.json.id," begin"))),this.json.iterate)this.startIterate();else{this.timeDelta=0,this.emit("timelineStart",{id:this.uuid,activeCount:this.applyCount,isReverse:this.isReverse});var n=1e3/this.ctx.ticker.maxFPS;this.duration<=n&&this.duration>0?(this.timeDelta=this.isReverse?0:this.duration,this.emit("timeUpdate",{delta:this.timeDelta,duration:this.duration,isReverse:this.isReverse}),this.emit("timelineEnd",{id:this.uuid,activeCount:this.applyCount,isReverse:this.isReverse}),this.ctx.ticker.addOnce((function(){e.onTimeLineEnd()}))):this.duration>n&&(this.ctx.eventHub.emit(bb.animateStart),this.updateTimeLine(0),this.ctx.ticker.add(this.updateTimeLine))}}},{key:"startIterate",value:function(){return function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.json.iterate){e.next=24;break}this.isIterateEnd=!1,t=S(this.iterateShadows),e.prev=3,t.s();case 5:if((n=t.n()).done){e.next=15;break}if(r=n.value,!this.isIterateEnd){e.next=9;break}return e.abrupt("break",15);case 9:return r.children.forEach((function(e){e.commonTimeNode.startTimeNode()})),r.applyCount+=1,e.next=13,this.ctx.clock.delay(this.json.iterate.interval);case 13:e.next=5;break;case 15:e.next=20;break;case 17:e.prev=17,e.t0=e.catch(3),t.e(e.t0);case 20:return e.prev=20,t.f(),e.finish(20);case 23:this.onTimeLineEnd();case 24:case"end":return e.stop()}}),e,this,[[3,17,20,23]])})))}},{key:"applyTimeFilter",value:function(e){if(!this.tmFilter.every((function(e){return Tv()(e[0])&&Tv()(e[1])})))return e;for(var t=0;t0?this.tmFilter[this.tmFilter.length-1][1]:e}},{key:"isNatureTimeEnd",value:function(){return this.duration>=0&&this.timeDelta>=this.duration}},{key:"findTargets",value:function(){var e=[];return function t(n){n.forEach((function(n){var r,i,o;n.cBhvr&&n.cBhvr.target&&e.findIndex((function(e){return e.id===n.cBhvr.target.id}))<0&&e.push(n.cBhvr.target),(null===(i=null===(r=null==n?void 0:n.cBhvr)||void 0===r?void 0:r.ctn)||void 0===i?void 0:i.childTnLst)&&n.cBhvr.ctn.childTnLst.length>0&&t(n.cBhvr.ctn.childTnLst),(null===(o=null==n?void 0:n.ctn)||void 0===o?void 0:o.childTnLst)&&n.ctn.childTnLst.length>0&&t(n.ctn.childTnLst)}))}(this.json.childTnLst||[]),e}},{key:"setPreStyle",value:function(){var e=this;this.json.presetClass&&this.findTargets().forEach((function(t){if(e.json.iterate)for(var n=0,r=!0;r;){var i=e.ctx.timingTargets.getTarget(t,!0,{type:e.json.iterate.type,index:n,id:""});i&&(e.setPreStyleForTarget(i),n+=1),r=!!i}else{var o=e.ctx.timingTargets.getTarget(t,!1);o&&e.setPreStyleForTarget(o)}}))}},{key:"setPreStyleForTarget",value:function(e){var t,n;if(e&&this.json.presetSubtype&&(e.presetSubType=this.json.presetSubtype),e&&!e.hasPreset)if("entr"===this.json.presetClass){var r=null===(n=null===(t=this.json)||void 0===t?void 0:t.childTnLst)||void 0===n?void 0:n.filter((function(e){return"set"===e.type&&"visible"===e.to}));(null==r?void 0:r.length)&&(e.hasPreset=!0,e.style.visibility="hidden")}else("exit"===this.json.presetClass||"path"===this.json.presetClass||"emph"===this.json.presetClass)&&(e.hasPreset=!0,e.style.visibility="visible")}},{key:"startTimeNodeRepeat",value:function(){this.timeDelta=0,this.isActive=!0,this.applyCount+=1,this.startTimeLine(!1),this.json.iterate||this.emit("timeNodeRepeat",{id:this.uuid,activeCount:this.applyCount,isReverse:this.isReverse})}},{key:"startTimeNodeForce",value:function(){this.json.subTnLst&&this.createSubList(this.json.subTnLst),this.timeDelta=0,this.isActive=!0,this.handleActive(!1)}},{key:"startTimeNode",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!this.isDestroy){this.collectStartValue(),this.timeDelta=0,this.isReverse=!1,this.json.subTnLst&&this.createSubList(this.json.subTnLst),this.startConds.setTriggerParams(e);var t=this.json.stCondLst.filter((function(e){return/^self/.test(e.event||"")}))[0];t&&this.startConds.condHandle(t);var n=this.json.endCondLst.filter((function(e){return/^self/.test(e.event||"")}))[0];n&&this.endConds.condHandle(n),this.startConds.condHandle()}}},{key:"onTimeLineEnd",value:function(){this.dispose(),(0===this.children.length||this.json.iterate)&&this.allChildrenEndHandle()}},{key:"clearSubList",value:function(){this.subList.forEach((function(e){return e.commonTimeNode.destroy()}))}},{key:"seekToStart",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.isEndEventsEmitted=!1,this.isActive=!1,this.dispose(),this.timeDelta=0,this.emit("seekToStart"),this.json.iterate&&!this.isIterate)return this.isIterateEnd=!0,void this.iterateShadows.forEach((function(t){return t.seekToStart(e)}));if(e)for(var t=this.subList.length-1;t>=0;t--){var n=this.subList[t];null==n||n.commonTimeNode.seekToStart()}for(var r=this.children.length-1;r>=0;r--){var i=this.children[r];null==i||i.commonTimeNode.seekToStart()}if(this.children.length>1)for(var o=this.children.length-1;o>=0;o--){var a=this.children[o];null==a||a.commonTimeNode.seekToStart()}}},{key:"repeatTimeNodeEnd",value:function(){this.dispose(),this.children.forEach((function(e){e.commonTimeNode.isActive=!1,e.commonTimeNode.dispose()}))}},{key:"dispose",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.isConflictDispose=e,this.ctx.clock.clearTimeout(this.repeatTimeoutId),this.ctx.eventHub.emit(bb.animateEnd);try{this.ctx.ticker.remove(this.updateTimeLine)}catch(e){}this.startConds.reset(),this.endConds.reset()}},{key:"seekToEnd",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.isInfiniteRepeat()){!this.isActive&&this.applyCount<=0&&this.collectStartValue(),this.applyCount=this.json.repeatCount,this.json.autoRev&&(this.isReverse=!0),this.timeDelta=this.duration,this.isActive=!1,this.dispose();var n=this.json.autoRev||e;if(n?this.emit("seekToStart"):this.emit("seekToEnd"),this.json.iterate&&!this.isIterate)return this.isIterateEnd=!0,void this.iterateShadows.forEach((function(e){return e.seekToEnd(n,t)}));0===this.children.length&&(this.eventHubs.runtime.emit("runtime all end"),this.handleEnd()),this.children.forEach((function(e){return e.commonTimeNode.seekToEnd(n,t)})),t&&this.json.subTnLst&&(this.subList.length<=0&&this.createSubList(this.json.subTnLst),this.subList.forEach((function(e){return e.commonTimeNode.seekToEnd(!1)})),this.clearSubList())}}},{key:"isTimeNodeEndWhenDetectEndSync",value:function(){if(this.isInInteractiveSeq&&this.isInfiniteRepeat())return!0;var e=!0;return this.children.length>0&&(e=e&&this.children.every((function(e){return e.commonTimeNode.isTimeNodeEndWhenDetectEndSync()}))),this.json.repeatCount&&(e=e&&this.applyCount>=this.json.repeatCount),this.json.autoRev&&(e=e&&!this.isReverse),e=e&&this.isNatureTimeEnd(),!!this.isConflictDispose||!(!this.isIterateEnd||!this.json.iterate)||e}},{key:"isTimeNodeEnd",value:function(){var e=!0;return this.children.length>0&&(e=e&&this.children.every((function(e){return e.commonTimeNode.isTimeNodeEnd()}))),this.json.repeatCount&&(e=e&&this.applyCount>=this.json.repeatCount),this.json.autoRev&&(e=e&&!this.isReverse),e=e&&this.isNatureTimeEnd(),!!this.isConflictDispose||!(!this.isIterateEnd||!this.json.iterate)||e}},{key:"emitEndEvents",value:function(){this.isEndEventsEmitted||(this.isEndEventsEmitted=!0,this.eventHubs.global.emit("time ".concat(this.json.id," end")),this.eventHubs.global.emit("time ".concat(this.json.id," onEnd")),this.eventHubs.runtime.emit("runtime ".concat(this.json.id," end")),this.emit("timeNodeEnd",{id:this.uuid,activeCount:this.applyCount,isReverse:this.isReverse}))}},{key:"collectStartValue",value:function(){this.emit("timeNodeCreate"),this.children.forEach((function(e){return e.commonTimeNode.collectStartValue()}))}},{key:"destroy",value:function(){this.emit("timeNodeDestroy"),this.isDestroy=!0,this.dispose(),this.startConds.removeAllListeners(),this.endConds.removeAllListeners(),this.children.forEach((function(e){return e.commonTimeNode.destroy()})),this.clearSubList()}}]),n}(Ks.a),nb=function(e){p(n,e);var t=m(n);function n(e){var r;_(this,n),(r=t.call(this)).isRunning=!1,r.runtimeNodeEventHub=new Ks.a;var i=e.json,o=e.iterateType,a=e.isIterate,s=e.isSub,u=e.parent,l=e.ctx,c=e.eventHub,h=e.iterateIndex,d=e.iterateId,f=e.isInInteractiveSeq,p=e.fromSeqId;return r.id=i.ctn.id,r.json=i,r.ctx=l,r.isIterate=a,r.globalEventHub=c,r.commonTimeNode=new tb({json:i.ctn,isSub:s,eventHubs:{global:c,runtime:r.runtimeNodeEventHub},ctx:l,parent:u,isIterate:!1,iterateType:o,iterateIndex:h,iterateId:d,isInInteractiveSeq:f,fromSeqId:p}),r.commonTimeNode.on("timeNodeStart",(function(){r.commonTimeNode.children.forEach((function(e){e.commonTimeNode.setReverse(r.commonTimeNode.getReverse()),e.commonTimeNode.startTimeNode()})),r.isRunning||(r.isRunning=!0,r.globalEventHub.emit("runtime ".concat(r.id," begin")),r.emit("begin"))})),r.commonTimeNode.on("timeNodeRepeat",(function(){r.commonTimeNode.children.forEach((function(e){e.commonTimeNode.startTimeNode(!1)}))})),r.commonTimeNode.on("timeNodeEnd",(function(){r.commonTimeNode.isTimeNodeEnd()&&r.isRunning&&(r.isRunning=!1,r.globalEventHub.emit("runtime ".concat(r.id," end")),r.emit("end")),"exit"===r.commonTimeNode.json.presetClass&&r.commonTimeNode.children.length>=1&&r.commonTimeNode.children[r.commonTimeNode.children.length-1]instanceof iy&&r.commonTimeNode.children.forEach((function(e){e instanceof iy||"function"!=typeof e.onSeekToStart||e.onSeekToStart()}))})),r}return n}(Ks.a),rb=function(){function e(t,n,r){_(this,e),this.json=t,this.ctx=r,this.globalEventHub=n;var i=t.timeNodeList.find((function(e){return"par"===e.type&&"tmRoot"===e.ctn.nodeType}));i&&(this.tmRoot=new nb({json:i,isSub:!1,isIterate:!1,eventHub:n,ctx:r,parent:null,iterateType:"el",iterateIndex:0,iterateId:"",isInInteractiveSeq:!1,fromSeqId:""}),this.mainSeq=this.tmRoot.commonTimeNode.children.find((function(e){var t,n,r;return"seq"===(null===(t=e.json)||void 0===t?void 0:t.type)&&"mainSeq"===(null===(r=null===(n=e.json)||void 0===n?void 0:n.ctn)||void 0===r?void 0:r.nodeType)})))}return T(e,[{key:"findSeq",value:function(e){var t;return null===(t=this.tmRoot)||void 0===t?void 0:t.commonTimeNode.children.find((function(t){var n,r,i;return"seq"===(null===(n=t.json)||void 0===n?void 0:n.type)&&(null===(i=null===(r=t.json)||void 0===r?void 0:r.ctn)||void 0===i?void 0:i.id)===e}))}},{key:"start",value:function(){var e,t;return function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}(this,void 0,void 0,regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!this.json.autoPlayMainSeq){n.next=6;break}return n.next=3,this.ctx.clock.delay(16);case 3:null===(e=this.mainSeq)||void 0===e||e.commonTimeNode.startTimeNode(),n.next=7;break;case 6:null===(t=this.mainSeq)||void 0===t||t.commonTimeNode.startTimeNode();case 7:case"end":return n.stop()}}),n,this)})))}},{key:"setMainSeqApplied",value:function(){this.mainSeq&&(this.mainSeq.commonTimeNode.applyCount=1)}},{key:"collectMainSeqStartValue",value:function(){var e;null===(e=this.mainSeq)||void 0===e||e.commonTimeNode.collectStartValue()}},{key:"setMainSeqStep",value:function(e,t){var n;-1===e&&this.mainSeq&&(this.mainSeq.commonTimeNode.applyCount=1),null===(n=this.mainSeq)||void 0===n||n.setCurrentStep(e,t)}},{key:"destroy",value:function(){var e;this.globalEventHub.removeAllListeners(),null===(e=this.tmRoot)||void 0===e||e.commonTimeNode.destroy()}},{key:"hasMainSeq",value:function(){return!!this.mainSeq&&this.mainSeq.commonTimeNode.children.length>0}},{key:"currentMainSeqState",value:function(){return this.mainSeq?this.mainSeq.currentState:null}},{key:"currentMainSeqStep",value:function(){return this.mainSeq?this.mainSeq.currentStep:0}},{key:"currentMainSeqLength",value:function(){return this.mainSeq?this.mainSeq.stepLength:0}},{key:"mainSeqHasNextStep",value:function(){return!!this.mainSeq&&this.mainSeq.hasNext()}},{key:"mainSeqHasPrevStep",value:function(){return!!this.mainSeq&&this.mainSeq.hasPrev()}},{key:"seekInteractiveSeqToEnd",value:function(e){var t=this.findSeq(e);t&&t.commonTimeNode.seekToEnd(!1,!0)}},{key:"setInteractiveSeqState",value:function(e,t,n){var r=this.findSeq(e);r&&r.setCurrentStep(t,n)}},{key:"resetAllInteractiveSeq",value:function(){var e;((null===(e=this.tmRoot)||void 0===e?void 0:e.commonTimeNode.children.filter((function(e){var t,n,r;return"seq"===(null===(t=e.json)||void 0===t?void 0:t.type)&&"interactiveSeq"===(null===(r=null===(n=e.json)||void 0===n?void 0:n.ctn)||void 0===r?void 0:r.nodeType)})))||[]).forEach((function(e){e.setCurrentStep(0,"start")}))}},{key:"applyInteractiveAction",value:function(e){this.globalEventHub.emit(e)}}]),e}(),ib=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},ob=function(e){p(n,e);var t=m(n);function n(e,r,i,o){var a;_(this,n),(a=t.call(this,{id:"stage",width:e.width,height:e.height,type:"Container",children:e.children},r,{parentGlobalPos:i},o)).isRendered=!1,a.isTimingStartValueCollected=!1,a.json=e,a.json.smartArtShapeList&&(r.smartArtShapeList=a.json.smartArtShapeList),r.hasBackgroundFillShape=a.detectUseBackgroundFill(a.json),a.container.visible=!1,a.ctx=r;var s=new Dd;return s.beginFill(16777215),s.drawRect(0,0,e.width,e.height),s.endFill(),a.container.addChild(s),a}return T(n,[{key:"detectUseBackgroundFill",value:function(e){var t=this;return!!e&&("Picture"===e.type||"Shape"===e.type?e.useBgFill:!(!e.children||!Array.isArray(e.children))&&e.children.some((function(e){return t.detectUseBackgroundFill(e)})))}},{key:"initOnReuse",value:function(){var e=this;f(x(n.prototype),"initOnReuse",this).call(this),this.ctx.timingEventHub.on("c:prev slide",(function(t){e.ctx.eventHub.emit(bb.requestPrevSlide,t)})),this.ctx.timingEventHub.on("c:next slide",(function(t,n){e.ctx.eventHub.emit(bb.requestNextSlide,t,n)}))}},{key:"render",value:function(e){var t=this;this.isRendered||(this.collectAnimatedIds().forEach((function(e){return t.ctx.animatedIds.add(e)})),this.isRendered=!0,f(x(n.prototype),"render",this).call(this,e),e.addSubMTask((function(){return ib(t,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.ctx.eventHub.emit("StageRenderEnd");case 1:case"end":return e.stop()}}),e,this)})))}),"@StageImpl[emit.StageRenderEnd]"))}},{key:"isListTimeNode",value:function(e){return["excel","seq","par"].indexOf(e.type)>=0}},{key:"isAnimatedTimeNode",value:function(e){return!!e.cBhvr}},{key:"collectAnimatedIdsForTimeNode",value:function(e,t){var n,r=this;this.isListTimeNode(e)?null===(n=e.ctn.childTnLst)||void 0===n||n.forEach((function(e){r.collectAnimatedIdsForTimeNode(e,t)})):this.isAnimatedTimeNode(e)&&t.push(e.cBhvr.target.id)}},{key:"collectAnimatedIds",value:function(){var e=this,t=[];return this.json.timing&&this.json.timing.timeNodeList.forEach((function(n){e.collectAnimatedIdsForTimeNode(n,t)})),t}},{key:"createTiming",value:function(){this.json.timing&&!this.timing&&(this.timing=new rb(this.json.timing,this.ctx.timingEventHub,this.ctx))}},{key:"startTiming",value:function(){var e;return(null===(e=this.timing)||void 0===e?void 0:e.start())||Promise.resolve()}},{key:"setMainSeqApplied",value:function(){var e;null===(e=this.timing)||void 0===e||e.setMainSeqApplied()}},{key:"setMainSeqStep",value:function(e,t){var n;null===(n=this.timing)||void 0===n||n.setMainSeqStep(e,t)}},{key:"collectMainSeqStartValue",value:function(){var e;this.isTimingStartValueCollected||(this.isTimingStartValueCollected=!0,null===(e=this.timing)||void 0===e||e.collectMainSeqStartValue())}},{key:"hasTiming",value:function(){return!!this.timing}},{key:"clearOnSlideChange",value:function(){this.ctx.eventHub.removeAllListeners(),this.ctx.timingEventHub.removeAllListeners(),f(x(n.prototype),"clearOnSlideChange",this).call(this)}},{key:"clearOnTransactionEnd",value:function(){var e,t;this.ctx.timingTargets.getTargets().forEach((function(e){e.hasPreset=!1})),null===(e=this.timing)||void 0===e||e.resetAllInteractiveSeq(),null===(t=this.timing)||void 0===t||t.destroy(),this.timing=void 0}},{key:"destroy",value:function(){var e,t;this.isTimingStartValueCollected=!1,this.isRendered=!1,this.ctx.eventHub.removeAllListeners(),this.ctx.graphicsTexture.destroy(),null===(e=this.ctx.bgTexture)||void 0===e||e.destroy(!0),this.ctx.spriteTexture.destroy(),this.ctx.timingEventHub.removeAllListeners(),null===(t=this.timing)||void 0===t||t.destroy(),this.timing=void 0,f(x(n.prototype),"destroy",this).call(this)}},{key:"mainSeqStep",value:function(){var e,t;return null!==(t=null===(e=this.timing)||void 0===e?void 0:e.currentMainSeqStep())&&void 0!==t?t:0}},{key:"mainSeqLength",value:function(){var e,t;return null!==(t=null===(e=this.timing)||void 0===e?void 0:e.currentMainSeqLength())&&void 0!==t?t:0}},{key:"mainSeqHasNextStep",value:function(){var e,t;return null!==(t=null===(e=this.timing)||void 0===e?void 0:e.mainSeqHasNextStep())&&void 0!==t&&t}},{key:"mainSeqHasPrevStep",value:function(){var e,t;return null!==(t=null===(e=this.timing)||void 0===e?void 0:e.mainSeqHasPrevStep())&&void 0!==t&&t}},{key:"mainSeqState",value:function(){return this.timing?this.timing.currentMainSeqState():null}},{key:"nextStep",value:function(e,t){var n;this.hasTiming()&&(null===(n=this.timing)||void 0===n?void 0:n.hasMainSeq())?(this.ctx.timingEventHub.emit("shape slide onStopAudio"),this.ctx.timingEventHub.emit("shape slide onNext",e,t)):this.ctx.eventHub.emit(bb.requestNextSlide,e,t)}},{key:"prevStep",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.hasTiming()&&(null===(e=this.timing)||void 0===e?void 0:e.hasMainSeq())?(this.ctx.timingEventHub.emit("shape slide onStopAudio"),this.ctx.timingEventHub.emit("shape slide onPrev",t)):this.ctx.eventHub.emit(bb.requestPrevSlide,t)}},{key:"applyInteractiveAction",value:function(e){var t;null===(t=this.timing)||void 0===t||t.applyInteractiveAction(e)}},{key:"seekInteractiveSeqToEnd",value:function(e){var t;null===(t=this.timing)||void 0===t||t.seekInteractiveSeqToEnd(e)}},{key:"setInteractiveSeqState",value:function(e,t,n){var r;null===(r=this.timing)||void 0===r||r.setInteractiveSeqState(e,t,n)}},{key:"setMediaState",value:function(e,t,n){return ib(this,void 0,void 0,regeneratorRuntime.mark((function r(){var i;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(i=this.ctx.medias[e],r.t0=i,!r.t0){r.next=21;break}if(!t){r.next=18;break}if(!n){r.next=14;break}return r.next=7,dv((function(){return i.clippedDuration>0}),5e3);case 7:if(r.t1=n=0&&t.tasks.splice(n,1)})),e.once("task-error",(function(){var n=t.tasks.indexOf(e);n>=0&&t.tasks.splice(n,1)}))}},{key:"start",value:function(){this.couldRunning=!0}},{key:"stop",value:function(){this.couldRunning=!1}}]),e}(),sb=function(e){return new Promise((function(t){return setTimeout(t,e)}))},ub=function(e){p(n,e);var t=m(n);function n(e,r,i){var o;return _(this,n),(o=t.call(this)).slideIndex=e,o.taskId=r,o.logger=i,o.uuid=uv(),o.isCancel=!1,o.tasks=[],o}return T(n,[{key:"addMTask",value:function(e,t){this.tasks.push({fn:e,state:"wait",sub:[],name:t})}},{key:"addSubMTask",value:function(e,t){var n=this.tasks.findIndex((function(e){return"running"===e.state}));n<0&&(n=0),this.tasks[n].sub.push({fn:e,state:"wait",sub:[],name:t})}},{key:"cancel",value:function(){this.tasks=[],this.isCancel=!0}},{key:"applyNext",value:function(){var e=this;if(!this.tasks.some((function(e){return"running"===e.state}))&&!this.tasks.some((function(e){return"error"===e.state})))if(this.tasks.every((function(e){return"finish"===e.state})))this.isCancel||this.emit("task-finish");else{var t=this.tasks.find((function(e){return"wait"===e.state}));t&&(t.state="running",t.fn.apply(null).then((function(){if(t.state="finish",t.sub.length>0){var n,r=e.tasks.findIndex((function(e){return e===t}));(n=e.tasks).splice.apply(n,[r+1,0].concat(a(t.sub)))}})).catch((function(n){t.state="error",e.logger.error("".concat(n," ").concat(n.stack),e.taskId),e.emit("task-error",rv.transform(n),e.slideIndex)})))}}},{key:"applyAll",value:function(){return function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.tasks.every((function(e){return"finish"===e.state}))){e.next=14;break}if(!this.tasks.some((function(e){return"running"===e.state}))){e.next=6;break}return e.next=4,sb(16);case 4:e.next=12;break;case 6:if(!this.tasks.some((function(e){return"error"===e.state}))){e.next=8;break}return e.abrupt("return");case 8:return e.delegateYield(regeneratorRuntime.mark((function e(){var n,r,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=t.tasks.find((function(e){return"wait"===e.state})))){e.next=17;break}return n.state="running",e.prev=3,e.next=6,hv((function(){return n.fn.apply(null)}),6e4);case 6:if(e.t0=e.sent,e.t1=lv,e.t0!==e.t1){e.next=10;break}throw new rv(Jp.RuntimeError,"subtask ".concat(n.name," apply timeout"));case 10:n.state="finish",n.sub.length>0&&(i=t.tasks.findIndex((function(e){return e===n})),(r=t.tasks).splice.apply(r,[i+1,0].concat(a(n.sub)))),e.next=17;break;case 13:return e.prev=13,e.t2=e.catch(3),o=(null==e.t2?void 0:e.t2.errorType)?e.t2:new rv(Jp.RuntimeError,"subtask ".concat(n.name," error. ").concat(e.t2)),n.state="error",t.logger.error("".concat(e.t2," ").concat(e.t2.stack),t.taskId),t.emit("task-error",rv.transform(o),t.slideIndex),e.abrupt("return","break");case 17:case"end":return e.stop()}}),e,null,[[3,13]])}))(),"t0",9);case 9:if("break"!==e.t0){e.next=12;break}return e.abrupt("break",14);case 12:e.next=0;break;case 14:!this.isCancel&&this.tasks.every((function(e){return"finish"===e.state}))&&this.emit("task-finish");case 15:case"end":return e.stop()}}),e,this)})))}}]),n}(Ks.a),lb=function(){function e(t,n){var r=this;if(_(this,e),this.renderer=t,this.localStorage=n,this.outputData=new Map,this.loadingSdfKeys=new Set,!e.worker){var i=new Blob(['\nself.onmessage = function(e) {\n var data = e.data.data;\n var key = e.data.key;\n var height = Math.ceil(e.data.height);\n var width = Math.ceil(e.data.width);\n if (!data || !key) {\n return;\n }\n var maxDis = 0;\n var d = [];\n var p = [];\n var maxInt = Number.MAX_SAFE_INTEGER || 255 * 255 * 255;\n var setD = function(x, y, v) { d[y * width + x] = v; };\n var getD = function(x, y) { return d[y * width + x]; };\n var setP = function(x, y, v) { p[y * width + x] = v; };\n var getP = function(x, y) { return p[y * width + x]; };\n var isContains = function(x, y) { return x >= 0 && x < width && y >= 0 && y < height; };\n var isInterior = function(x, y) { return data[(y * width + x) * 4 + 3] > 10; };\n for (var y = 0; y < height; ++ y) {\n for (var x = 0; x < width; ++ x) {\n var c = isInterior(x, y);\n var t = isContains(x, y - 1) ? isInterior(x, y - 1) : false;\n var b = isContains(x, y + 1) ? isInterior(x, y + 1) : false;\n var l = isContains(x - 1, y) ? isInterior(x - 1, y) : false;\n var r = isContains(x + 1, y) ? isInterior(x + 1, y) : false;\n if (c !== t || c !== b || c !== l || c !== r) {\n setD(x, y, 0);\n setP(x, y, [x, y]);\n } else {\n setD(x, y, maxInt);\n setP(x, y, [-1, -1]);\n }\n }\n }\n \n var f = function (x, y, dir) {\n var d1 = 1;\n var d2 = Math.sqrt(2);\n var dx;\n var dy;\n var od;\n switch (dir) {\n case "TL": dx = -1; dy = -1; od = d2; break;\n case "T": dx = 0; dy = -1; od = d1; break;\n case "TR": dx = 1; dy = -1; od = d2; break;\n case "L": dx = -1; dy = 0; od = d1; break;\n case "R": dx = 1; dy = 0; od = d1; break;\n case "BL": dx = -1; dy = 1; od = d2; break;\n case "B": dx = 0; dy = 1; od = d1; break;\n case "BR": dx = 1; dy = 1; od = d2; break;\n }\n var b = isContains(x + dx, y + dy);\n var cb = b ? getD(x + dx, y + dy) : maxInt;\n if (cb + od < getD(x, y)) {\n var p = b ? getP(x + dx, y + dy) : [-1, -1];\n var dis = Math.sqrt(Math.pow(x - p[0], 2) + Math.pow(y - p[1], 2));\n setP(x, y, p);\n setD(x, y, dis);\n if (dis > maxDis) {\n maxDis = dis;\n }\n }\n };\n \n for (var y = 0; y < height; ++ y) {\n for (var x = 0; x < width; ++ x) {\n var dirs = ["TL", "T", "TR", "L"];\n for (var i = 0; i < dirs.length; ++ i) {\n var dir = dirs[i];\n f(x, y, dir);\n }\n }\n }\n\n for (var y = height - 1; y >= 0; -- y) {\n for (var x = width - 1; x >= 0; -- x) {\n var dirs = ["R", "BL", "B", "BR"];\n for (var i = 0; i < dirs.length; ++ i) {\n var dir = dirs[i];\n f(x, y, dir);\n }\n }\n }\n\n var outputData = [];\n for (var y = 0; y < height; ++ y) {\n for (var x = 0; x < width; ++ x) {\n outputData.push(isInterior(x, y) ? 255: 0);\n outputData.push(0);\n outputData.push(0);\n outputData.push(Math.ceil(getD(x, y) / maxDis * 255));\n }\n }\n self.postMessage({\n key, outputData, maxDis\n });\n};\n'],{type:"text/javascript"});e.worker=new Worker(URL.createObjectURL(i)),e.worker.onmessage=function(e){r.outputData.set(e.data.key,{data:e.data.outputData,maxDis:e.data.maxDis})},this.outputData.set("111","222")}}return T(e,[{key:"createSdfByWorker",value:function(t,n,r,i,o,a,s,u){var l=document.createElement("canvas");l.width=o,l.height=a;var c=l.getContext("2d");if(c&&e.worker){c.drawImage(s,t,n,r,i);var h=c.getImageData(0,0,o,a).data;e.worker.postMessage({data:h,key:u,width:o,height:a})}}},{key:"createSdf",value:function(e,t,n){var r=document.createElement("canvas");r.width=e,r.height=t;var i=r.getContext("2d");if(!i)return{src:"",maxDis:1};i.drawImage(n,0,0);for(var o=0,a=i.getImageData(0,0,e,t).data,s=[],u=[],l=function(t,n,r){s[n*e+t]=r},c=function(t,n){return s[n*e+t]},h=function(t,n,r){u[n*e+t]=r},d=function(n,r){return n>=0&&n=0&&r10},p=0;po&&(o=m)}},w=0;w=0;--E)for(var A=e-1;A>=0;--A)for(var I=0,C=["R","BL","B","BR"];It.maxResolution.x||s>t.maxResolution.y){var r=(n=t.maxResolution.x/a)*s;r>t.maxResolution.y&&(n*=t.maxResolution.y/r)}return o.loadSpriteSheetItem(t.url,t.taskId,e,n)}),"@StagePool[spriteTexture.loadSpriteSheetItem]")})),Promise.resolve()}),"@StagePool[loadSpriteSheets]")}},{key:"createStage",value:function(e){var t=this,n=this.stageStates[e].task;n.addMTask((function(){var r=t.stageJsons[e],i=t.stageCtxs[e],o=new ob(r,i,{x:0,y:0},n);return t.stageImpls[e]=o,Promise.resolve()}),"@StagePool[createStage]")}},{key:"preRenderStage",value:function(e){var t=this,n=this.stageStates[e].task;n.addMTask((function(){return t.stageImpls[e].preRender(n),Promise.resolve()}),"@StagePool[preRenderStage]")}},{key:"createGraphicsTexture",value:function(e){var t=this,n=this.stageStates[e].task;n.addMTask((function(){return cb(t,void 0,void 0,regeneratorRuntime.mark((function t(){var r,i=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(r=this.stageCtxs[e]).graphicsTexture.pack().forEach((function(t,o){n.addSubMTask((function(){var n=i.stageCtxs[e],a=n.stageWidth,s=n.stageHeight,u=1;if(a>i.maxResolution.x||s>i.maxResolution.y){var l=(u=i.maxResolution.x/a)*s;l>i.maxResolution.y&&(u*=i.maxResolution.y/l)}return r.graphicsTexture.render(t,o,i.objPoolGroup,u)}),"@StagePool[graphicsTexture.render]")}));case 2:case"end":return t.stop()}}),t,this)})))}),"@StagePool[createGraphicsTexture]")}},{key:"renderStage",value:function(e){var t=this,n=this.stageStates[e].task;n.addMTask((function(){return cb(t,void 0,void 0,regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this.stageImpls[e],t.next=3,r.render(n);case 3:case"end":return t.stop()}}),t,this)})))}),"@StagePool[renderStage]")}},{key:"destroyStageByIndex",value:function(e){"load"===this.stageStates[e].state&&this.stageStates[e].task.cancel(),delete this.stageStates[e],this.stageImpls[e].destroy(),delete this.stageImpls[e],delete this.stageCtxs[e]}},{key:"destroyStage",value:function(){var e=this;Object.keys(this.stageImpls).forEach((function(t){var n=parseInt(t,10);Math.abs(e.currentStageIndex-n)>e.cacheCount&&e.destroyStageByIndex(n)}))}},{key:"destroyAllStage",value:function(){var e=this;Object.keys(this.stageImpls).forEach((function(t){var n=parseInt(t,10);e.destroyStageByIndex(n)}))}},{key:"preload",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.stageImpls[e]||this.stageStates[e])return Promise.resolve();var r=new ub(e,this.taskId,this.logger);return r.on("task-error",(function(e,n){delete t.stageStates[n],delete t.stageImpls[n],delete t.stageCtxs[n],t.errorChannel.emit("error",e,n)})),this.stageStates[e]={state:"load",task:r},this.createCtx(e),this.loadStageJson(e),this.loadSpriteSheets(e),this.createStage(e),this.preRenderStage(e),this.createGraphicsTexture(e),this.renderStage(e),this.microTaskManager.addTask(r),n?r.applyAll():new Promise((function(n){r.once("task-finish",(function(){t.stageStates[e].state="finish",Object.keys(t.stageStates).length>2*t.cacheCount+1&&t.destroyStage(),n()}))}))}},{key:"getStageJson",value:function(e){return this.stageJsons[e]||null}},{key:"getStage",value:function(e){return cb(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.currentStageIndex=e,"finish"!==(null==(n=this.stageStates[e])?void 0:n.state)||!this.stageImpls[e]){t.next=6;break}t.t0=this.stageImpls[e],t.next=16;break;case 6:if("load"!==(null==n?void 0:n.state)){t.next=12;break}return t.next=9,n.task.applyAll();case 9:t.t1=this.stageImpls[e],t.next=15;break;case 12:return t.next=14,this.preload(e,!0);case 14:t.t1=this.stageImpls[e];case 15:t.t0=t.t1;case 16:return t.abrupt("return",t.t0);case 17:case"end":return t.stop()}}),t,this)})))}},{key:"destroy",value:function(){this.runningAudio.clear()}}]),e}(),db=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},fb=function(){function e(t){var n,r=this;_(this,e),this.logger=t,this.taskId="",this.isIndexDBReady=!1,this.memoryCache=new Map,null===(n=e.localCache)||void 0===n||n.ready((function(e){e||(r.isIndexDBReady=!0)})).catch((function(){t.warn("local storage not ready",r.taskId)}))}return T(e,[{key:"attachTaskId",value:function(e){this.taskId=e}},{key:"getItem",value:function(t){return db(this,void 0,void 0,regeneratorRuntime.mark((function n(){var r,i=this;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r=null,!this.couldUseIndexDBCache||!e.localCache){n.next=10;break}return n.prev=2,n.next=5,hv((function(){return e.localCache.getItem("".concat(i.taskId,"/").concat(t))}),500);case 5:r=n.sent,n.next=10;break;case 8:n.prev=8,n.t0=n.catch(2);case 10:return n.abrupt("return",(r=r===lv?null:r)||this.memoryCache.get(t)||null);case 11:case"end":return n.stop()}}),n,this,[[2,8]])})))}},{key:"setItem",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return db(this,void 0,void 0,regeneratorRuntime.mark((function i(){var o,a=this;return regeneratorRuntime.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(this.couldUseIndexDBCache){i.next=2;break}return i.abrupt("return",(r&&this.memoryCache.set(t,n),Promise.resolve()));case 2:if(!e.localCache){i.next=13;break}return o=null,i.prev=4,i.next=7,hv((function(){return e.localCache.setItem("".concat(a.taskId,"/").concat(t),n).catch((function(){r&&a.memoryCache.set(t,n)}))}),500);case 7:o=i.sent,i.next=12;break;case 10:i.prev=10,i.t0=i.catch(4);case 12:o!==lv&&null!==o||!r||this.memoryCache.set(t,n);case 13:case"end":return i.stop()}}),i,this,[[4,10]])})))}},{key:"dispose",value:function(){var t,n=this;this.memoryCache=new Map,this.couldUseIndexDBCache&&(null===(t=e.localCache)||void 0===t||t.keys().then((function(t){t.filter((function(e){return e.indexOf(n.taskId)>=0})).forEach((function(t){var n;null===(n=e.localCache)||void 0===n||n.removeItem(t).catch((function(){}))}))})).catch((function(){})))}},{key:"couldUseIndexDBCache",get:function(){return this.isIndexDBReady&&this.taskId.length>0}}]),e}();fb.localCache=null;try{fb.localCache=b.createInstance({name:"slide_local_cache",driver:b.INDEXEDDB,version:1})}catch(u){}var pb=new jl.j,vb=function(){function e(t){_(this,e),this.localStorage=t}return T(e,[{key:"canvas",value:function(t,n,r,i){var o,a,s,u=!1,l=!1;t&&(t instanceof Xl.p?s=t:(s=n.generateTexture(t),l=!0)),s?(o=s.baseTexture.resolution,a=s.frame,u=!1,n.renderTexture.bind(s)):(o=n.resolution,u=!0,(a=pb).width=n.width,a.height=n.height,n.renderTexture.bind(null));var c=Math.floor(a.width*o+1e-4),h=Math.floor(a.height*o+1e-4),d=document.createElement("canvas");d.width=c,d.height=h;var f=d.getContext("2d");if(!f)throw new Error("ctx");if(r)f.putImageData(r,0,0);else{var p=f.getImageData(0,0,c,h),v=new Uint8Array(4*c*h),m=n.gl;m.readPixels(a.x*o,a.y*o,c,h,m.RGBA,m.UNSIGNED_BYTE,v),e.arrayPostDivide(v,p.data),f.putImageData(p,0,0),i&&this.localStorage.setItem(i,p).catch((function(){}))}if(u){var g=document.createElement("canvas");g.width=c,g.height=h;var y=g.getContext("2d");y.scale(1,-1),y.drawImage(d,0,-h),d=g}return l&&(null==s||s.destroy(!0)),d}}],[{key:"arrayPostDivide",value:function(e,t){for(var n=0;n1&&(e=1),this._volume=e,this.emit("update",this._volume)}}]),n}(Ks.a),gb=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))};Ol.skipHello();var yb={randomBar:"RandomLines",circle:"Shape",ripple:"Ripples",wipe:"Erase",dissolve:"Dissolve",morph:"Smooth",fade:"FadeInOut",push:"Push",split:"Separation",reveal:"Display",pull:"Uncover",cover:"Cover",flash:"Flash",checker:"Checkerboard",blinds:"WindowShades",curtains:"Curtain",fallOver:"Fall",drape:"Suspension",wheel:"Clock",comb:"Combing",warp:"Scale",peelOff:"PeelOff",flip:"Flip",gallery:"Gallery",switch:"Switch",prism:"Prism",doors:"Doors"},bb={mainSeqStepChange:"mainSeqStepChange",mainSeqStateChange:"mainSeqStateChange",interactiveSeqStateChange:"interactiveSeqStateChange",interactiveSeqAction:"interactiveSeqAction",mainSeqStepStart:"mainSeqStepStart",mainSeqStepEnd:"mainSeqStepEnd",slideChange:"slideChange",renderStart:"renderStart",renderEnd:"renderEnd",hyperlinkTrigger:"hyperlinkTrigger",animateStart:"animateStart",animateEnd:"animateEnd",mediaSeek:"mediaSeek",mediaPlay:"mediaPlay",mediaPause:"mediaPause",mediaStop:"mediaStop",requestNextSlide:"requestNextSlide",requestPrevSlide:"requestPrevSlide",requestGotoSlide:"requestGotoSlide",requestOpenUrl:"requestOpenUrl",userInput:"userInput",fullscreenChange:"fullscreenChange",changeLocalFullscreenState:"changeLocalFullscreenState"},xb=function(e){p(n,e);var t=m(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};_(this,n),(r=t.call(this)).errorChannel=new Ks.a,r.transactionPlayer=null,r.isForward=!0,r.drawCall=0,r.scale=1,r._isPaused=!1,r.maxResolution=new jl.g(0,0),r.isNVIDIA=!1,r.fps=new nv,r.designWidth=0,r.designHeight=0,r.currentIndex=0,r.slideCount=0,r.runtime={drawCall:0,fps:0},r.globalEventHub=new Ks.a,r.globalVideoBackground=new Dd,r.globalVideoSprite=new Ld,r.onMousemoveTimeout=null,r.cacheFunctionMap=new Map,r.isPlayerPaused=function(){return r._isPaused},r.onWebGLLost=function(){r.errorChannel.emit("error",new rv(Jp.CanvasCrash,"webgl context lost."))},r.fullscreenOnMousemove=function(e){var t=e.index,n=e.targetId;r.globalEventHub.emit("controllerShowStatusChange",{slideIndex:t,targetId:n,status:!0}),r.onMousemoveTimeout&&clearTimeout(r.onMousemoveTimeout),r.onMousemoveTimeout=setTimeout((function(){r.globalEventHub.emit("controllerShowStatusChange",{slideIndex:t,targetId:n,status:!1})}),jg)},r.fullscreenOnMouseleave=function(e){var t=e.index,n=e.targetId;r.globalEventHub.emit("controllerShowStatusChange",{slideIndex:t,targetId:n,status:!1})},r.calculateFullscreenVideoPosition=function(e){var t=e.width,n=e.height,i=y(r),o=i.designWidth,a=i.designHeight,s=Math.min(o/t,a/n);return{x:(o-t*s)/2,y:(a-n*s)/2,width:t*s,height:n*s}},r.onRequestFullscreenVideo=function(e){var t=e.texture,n=e.index,i=e.targetId;if(n===r.currentIndex){r.onRequestCancelFullscreenVideo(),r.globalVideoBackground.width=r.designWidth,r.globalVideoBackground.height=r.designHeight,r.globalVideoBackground.beginFill(0,1),r.globalVideoBackground.drawRect(0,0,r.designWidth,r.designHeight),r.globalVideoBackground.endFill(),r.globalVideoBackground.interactive=!0,r.app.stage.addChild(r.globalVideoBackground);var o=r.calculateFullscreenVideoPosition(t),a=o.x,s=o.y,u=o.width,l=o.height;r.globalVideoSprite.texture=t,r.globalVideoSprite.width=u,r.globalVideoSprite.height=l,r.globalVideoSprite.position.x=a,r.globalVideoSprite.position.y=s,r.globalVideoBackground.addChild(r.globalVideoSprite),r.globalEventHub.emit("onFullscreenChange",{status:!0,targetId:i,slideIndex:r.currentIndex}),r.clearFullscreenEventListenersWithAppView();var c={handleEvent:function(){var e;null===(e=r.currentStage)||void 0===e||e.ctx.eventHub.emit(bb.userInput)}};if(r.app.view.addEventListener("pointerdown",c,!1),r.cacheFunctionMap.set("pointerdown",c),Pg.isDesktop()){var h={handleEvent:function(){r.fullscreenOnMouseleave({index:n,targetId:i})}};r.app.view.addEventListener("mouseout",h,!1);var d={handleEvent:function(){r.globalEventHub.emit("controllerShowStatusChange",{slideIndex:n,targetId:i,status:!0})}};r.app.view.addEventListener("mouseover",d,!1);var f={handleEvent:function(){r.fullscreenOnMousemove({index:n,targetId:i})}};r.app.view.addEventListener("mousemove",f,!1),r.cacheFunctionMap.set("mouseover",d),r.cacheFunctionMap.set("mousemove",f),r.cacheFunctionMap.set("mouseout",h)}else{var p={handleEvent:function(){r.fullscreenOnMousemove({index:n,targetId:i})}};r.app.view.addEventListener("touchstart",p,!1),r.cacheFunctionMap.set("touchstart",p)}}else t.destroy(!1)},r.onRequestCancelFullscreenVideo=function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];r.globalVideoSprite.texture.destroy(!1),r.globalVideoBackground.removeChild(r.globalVideoSprite),r.app.stage.removeChild(r.globalVideoBackground),r.globalEventHub.emit("onFullscreenChange",{status:!1,slideIndex:r.currentIndex,targetId:null===(e=r.currentStage)||void 0===e?void 0:e.ctx.latestChangeFullscreenTargetId}),r.clearFullscreenEventListenersWithAppView(),n&&r.emit(bb.changeLocalFullscreenState,{status:!1,slideIndex:r.currentIndex,targetId:null===(t=r.currentStage)||void 0===t?void 0:t.ctx.latestChangeFullscreenTargetId})},r.logger=e.logger,r.tracker=e.tracker,r.mode=e.mode,r.volumeAdjuster=e.volumeAdjuster,r.localStorage=new fb(r.logger),r.cachedExtract=new vb(r.localStorage),r.config={minFPS:nu()(i.minFPS)?30:i.minFPS,maxFPS:nu()(i.maxFPS)?40:i.maxFPS,resolution:nu()(i.resolution)?1:i.resolution,autoFPS:!nu()(i.autoFPS)&&i.autoFPS,autoResolution:!nu()(i.autoResolution)&&i.autoResolution,transactionBgColor:nu()(i.transactionBgColor)?0:i.transactionBgColor,maxResolutionLevel:r.getMaxResolution(i.maxResolutionLevel),forceCanvas:!nu()(i.forceCanvas)&&i.forceCanvas,enableNvidiaDetect:!nu()(i.enableNvidiaDetect)&&i.enableNvidiaDetect},r.updateMaxResolutionLevel(r.config.maxResolutionLevel),r.loader=new vv(r.localStorage,e.useLocalCache,r.logger,r.tracker,e.resourceTimeout,e.loadDelegate,e.urlInterrupter);var o=Ol.isWebGLSupported();r.app=new Ql({antialias:!0,autoDensity:!1,backgroundColor:16777215,forceCanvas:r.config.forceCanvas||!o}),r.tracker({name:"slidePlayerCreate",result:"",reason:"",payload:{webgl:o,resolution:r.config.resolution,minFPS:r.config.minFPS,maxFPS:r.config.maxFPS,maxResolutionLevel:r.config.maxResolutionLevel,forceCanvas:r.config.forceCanvas}}),r.updateConfig(r.config),r.app.ticker.maxFPS=60,r.app.ticker.minFPS=r.config.minFPS,r.app.ticker.maxFPS=r.config.maxFPS,r.app.view.style.zIndex="1",r.app.stage.sortableChildren=!0;var a=r.app.renderer;if(a.gl){var s=a.gl.drawElements,u=a.gl.getExtension("WEBGL_debug_renderer_info"),l=a.gl.getParameter(u.UNMASKED_RENDERER_WEBGL);/nvidia/i.test(l)&&r.config.enableNvidiaDetect&&(r.isNVIDIA=!0),a.gl.drawElements=function(){for(var e=arguments.length,t=new Array(e),n=0;n=t&&r.updateResolution(i)}}else if(e>r.config.maxFPS&&r.config.autoResolution){var o=r.scale*r.config.resolution,a=r.app.renderer.resolution,s=Math.min(o,a+.1);s<=r.config.resolution&&r.updateResolution(s)}})),r.app.ticker.add((function(){r.runtime.drawCall=r.drawCall,r.runtime.fps=Math.floor(r.app.ticker.minFPS),r.drawCall=0}),null,Bl.c.LOW),r.clock=new mv(r.app.ticker),r.objPoolGroup=uv(),r.stagePool=new hb(r.loader,r.mode,r.app.renderer,r.app.ticker,r.app.view,r.clock,r.objPoolGroup,r.errorChannel,r.localStorage,r.logger,e.loadDelegate,e.urlInterrupter,r.isPlayerPaused,r.maxResolution,r.volumeAdjuster,r.config.forceCanvas,r.globalEventHub),r.app.view.addEventListener("webglcontextlost",r.onWebGLLost);try{r.config.forceCanvas||(r.transactionPlayer=new Pl)}catch(s){/Error creating WebGL context/.test(s.message)?r.errorChannel.emit("error",new rv(Jp.CanvasCrash,"webgl context lost.")):r.errorChannel.emit("error",new rv(Jp.RuntimeWarn,s.message))}return r.globalEventHub.on("requestFullscreen",r.onRequestFullscreenVideo),r.globalEventHub.on("requestCancelFullscreen",r.onRequestCancelFullscreenVideo),r}return T(n,[{key:"getMaxResolution",value:function(e){return!nu()(e)&&Number.isInteger(e)?(e<1&&(e=1),e>4&&(e=4),e):n.platform.isAndroid()||n.platform.isIOS()?2:4}},{key:"updateMaxResolutionLevel",value:function(e){e<0&&(e=0),e>4&&(e=4);var t=[640,960,1280,1920,3200][e],n=[360,540,720,1080,1800][e];this.maxResolution.set(t,n)}},{key:"updateConfig",value:function(e){nu()(e.maxFPS)||nu()(e.minFPS)||(this.config.maxFPS=e.maxFPS,this.app.ticker.maxFPS=e.maxFPS,this.config.minFPS=e.minFPS,this.app.ticker.minFPS=e.minFPS),nu()(e.resolution)||(this.config.resolution=e.resolution,this.updateResolution(this.scale*this.config.resolution)),nu()(e.autoFPS)||(this.config.autoFPS=e.autoFPS),nu()(e.autoResolution)||(this.config.autoResolution=e.autoResolution),nu()(e.transactionBgColor)||(this.config.transactionBgColor=e.transactionBgColor),this.taskId&&this.logger.info("ppt player update config: "+JSON.stringify(this.config),this.taskId),nu()(e.maxResolutionLevel)||(this.config.maxResolutionLevel=e.maxResolutionLevel,this.updateMaxResolutionLevel(this.config.maxResolutionLevel))}},{key:"preload",value:function(e){return gb(this,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.t0=e<1||e>this.slideCount,t.t0){t.next=6;break}return this.logger.info("preload slide ".concat(e," begin"),this.taskId),t.next=5,this.stagePool.preload(e);case 5:this.logger.info("preload slide ".concat(e," end"),this.taskId);case 6:case"end":return t.stop()}}),t,this)})))}},{key:"setResourceData",value:function(e,t){this.logger.info("ppt player init config: "+JSON.stringify(this.config),e),this.logger.info("set resource to "+t,e),this.taskId=e,this.url=t,this.stagePool.setResourceData(e,t),this.localStorage.attachTaskId(e),this.loader.attachTaskId(e)}},{key:"setInteractive",value:function(e){this.app.stage.interactive=e,this.app.stage.interactiveChildren=e}},{key:"translateEvent",value:function(e,t){var n=this;t.forEach((function(t){e.on(t,(function(){for(var e,r,i,o,a=arguments.length,s=new Array(a),u=0;u0&&this.view&&p&&(m=s.json.transition,!this.isForward&&(null==p?void 0:p.json.transition)&&(m=p.json.transition),g=this.getTransactionTexture(p,this.view,null,null),this.initTransactionPlayer(m),null===(n=this.transactionPlayer)||void 0===n||n.setPrevTexture(g),v=!0),this.app.stage.addChild(s.container),this.updateResolution(this.config.resolution*this.scale),p&&(p.clearOnTransactionEnd(),this.app.stage.removeChild(p.container)),!(s.json.transition&&s.json.transition.type&&this.app.stage.children.length>0&&this.view&&this.transactionPlayer&&v)){i.next=30;break}return i.next=23,this.getTransactionTexture(s,this.view,u,l);case 23:return y=i.sent,this.transactionPlayer.setNextTexture(y),i.next=27,this.transactionPlayer.play();case 27:if(b=this.transactionPlayer.renderer.domElement,this.view.parentElement&&b)try{this.view.parentElement.removeChild(b)}catch(e){}null===(r=this.transactionPlayer)||void 0===r||r.dispose();case 30:if(!this.isForward){i.next=35;break}return i.next=33,s.startTiming();case 33:i.next=36;break;case 35:s.setMainSeqApplied();case 36:s.ctx.slideScopeEventHub.emit("slide-render",s.ctx.slideIndex),this.emit(bb.renderEnd,e),this.emit(bb.slideChange,e),s.ctx.isRendering=!1,this.preload(e+1).catch((function(t){x.errorChannel.emit("error",rv.transform(t),e+1)})),this.preload(e-1).catch((function(t){x.errorChannel.emit("error",rv.transform(t),e-1)})),this.logger.info("render slide ".concat(e," done, time: ").concat(Date.now()-a,"ms"),this.taskId),this.tracker({name:"slidePageChange",reason:"",result:"",payload:{duration:Date.now()-a,from:o,to:e}});case 44:case"end":return i.stop()}}),i,this)})))}},{key:"getTransactionTexture",value:function(e,t,n,r){var i=Xl.p.create({width:e.json.width,height:e.json.height,resolution:1});this.app.renderer.render(e.container,{renderTexture:i});var o=this.cachedExtract.canvas(i,this.app.renderer,r,n);return new G(o)}},{key:"renderToBase64",value:function(e,t,n){return gb(this,void 0,void 0,regeneratorRuntime.mark((function r(){var i,o,a,s,u,l;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.stagePool.getStage(e);case 2:if(!(i=r.sent)){r.next=10;break}return o=i.json,a=o.width,s=o.height,this.designWidth=a,this.designHeight=s,u=Xl.p.create({width:this.designWidth,height:this.designHeight,resolution:t}),i.container.visible=!0,this.app.renderer.render(i.container,{renderTexture:u}),l=this.app.renderer.plugins.extract.base64(u,n),r.abrupt("return",(this.stagePool.destroyStageByIndex(e),l));case 10:return r.abrupt("return","__null__");case 11:case"end":return r.stop()}}),r,this)})))}},{key:"renderMainSeqToBase64",value:function(e,t,n){return gb(this,void 0,void 0,regeneratorRuntime.mark((function r(){var i,o,a,s,u,l,c,h,d,f;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return i=[],r.next=3,this.stagePool.getStage(e);case 3:if((o=r.sent).createTiming(),o)for(a=o.json,s=a.width,u=a.height,this.designWidth=s,this.designHeight=u,l=Xl.p.create({width:this.designWidth,height:this.designHeight,resolution:t}),o.container.visible=!0,c=o.mainSeqLength(),o.setMainSeqStep(0,"start"),this.app.renderer.render(o.container,{renderTexture:l}),h=this.app.renderer.plugins.extract.base64(l,n),i.push(h),d=0;dn.maxResolution.x||r*n.designHeight>n.maxResolution.y;)r-=.1;n.app.renderer.resolution=r,n.app.renderer.plugins.interaction.resolution=n.app.renderer.resolution,n.app.renderer.resize(n.designWidth,n.designHeight),eu()(t)&&t()}))}},{key:"nextStep",value:function(e,t){var n;if(this._isPaused)this.logger.info("ppt play prevent next step with paused state",this.taskId);else{this.logger.info("ppt play trigger next step",this.taskId);try{this.onRequestCancelFullscreenVideo(!0),null===(n=this.currentStage)||void 0===n||n.nextStep(e,t)}catch(e){this.errorChannel.emit("error",rv.transform(e),this.currentIndex)}}}},{key:"prevStep",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this._isPaused)this.logger.info("ppt play prevent prev step with paused state",this.taskId);else{this.logger.info("ppt play trigger prev step",this.taskId);try{this.onRequestCancelFullscreenVideo(!0),null===(e=this.currentStage)||void 0===e||e.prevStep(t)}catch(e){this.errorChannel.emit("error",rv.transform(e),this.currentIndex)}}}},{key:"mainSeqLength",value:function(){var e,t;return null!==(t=null===(e=this.currentStage)||void 0===e?void 0:e.mainSeqLength())&&void 0!==t?t:0}},{key:"mainSeqStep",value:function(){var e,t;return null!==(t=null===(e=this.currentStage)||void 0===e?void 0:e.mainSeqStep())&&void 0!==t?t:0}},{key:"setMainSeqStep",value:function(e,t){var n;null===(n=this.currentStage)||void 0===n||n.setMainSeqStep(e,t)}},{key:"mainSeqState",value:function(){var e,t;return null!==(t=null===(e=this.currentStage)||void 0===e?void 0:e.mainSeqState())&&void 0!==t?t:null}},{key:"mainSeqHasNextStep",value:function(){var e,t;return null!==(t=null===(e=this.currentStage)||void 0===e?void 0:e.mainSeqHasNextStep())&&void 0!==t&&t}},{key:"mainSeqHasPrevStep",value:function(){var e,t;return null!==(t=null===(e=this.currentStage)||void 0===e?void 0:e.mainSeqHasPrevStep())&&void 0!==t&&t}},{key:"nextTick",value:function(e){this.app.ticker.addOnce((function(){e()}),Bl.c.LOW)}},{key:"applyInteractiveAction",value:function(e){var t;null===(t=this.currentStage)||void 0===t||t.applyInteractiveAction(e)}},{key:"seekInteractiveSeqToEnd",value:function(e){var t;null===(t=this.currentStage)||void 0===t||t.seekInteractiveSeqToEnd(e)}},{key:"setInteractiveSeqState",value:function(e,t,n){var r;null===(r=this.currentStage)||void 0===r||r.setInteractiveSeqState(e,t,n)}},{key:"setMediaState",value:function(e,t,n){var r;return gb(this,void 0,void 0,regeneratorRuntime.mark((function i(){return regeneratorRuntime.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,null===(r=this.currentStage)||void 0===r?void 0:r.setMediaState(e,t,n);case 2:case"end":return i.stop()}}),i,this)})))}},{key:"setMediaCurrentTime",value:function(e,t){var n;null===(n=this.currentStage)||void 0===n||n.setMediaCurrentTime(e,t)}},{key:"pause",value:function(){var e;this.app.ticker.stop(),null===(e=this.currentStage)||void 0===e||e.ctx.activeMedia.forEach((function(e){e.globalPause()})),this._isPaused=!0}},{key:"resume",value:function(){var e;this._isPaused=!1,this.app.ticker.start(),null===(e=this.currentStage)||void 0===e||e.ctx.activeMedia.forEach((function(e){e.globalResume()}))}},{key:"getSnapshot",value:function(){return this.currentStage&&this.getBase64(this.currentStage)||""}},{key:"clearLocalCache",value:function(){this.localStorage.dispose()}},{key:"clearFullscreenEventListenersWithAppView",value:function(){var e=this;["mousemove","mouseout","mouseover","touchstart","pointerdown"].forEach((function(t){e.cacheFunctionMap.has(t)&&(e.app.view.removeEventListener(t,e.cacheFunctionMap.get(t),!1),e.cacheFunctionMap.delete(t))}))}},{key:"syncFullscreenVideoState",value:function(e){this.globalEventHub.emit("syncFullscreenVideoState",e)}},{key:"destroy",value:function(){var e,t;try{this.app.view.removeEventListener("webglcontextlost",this.onWebGLLost),this.app.renderer.filter.texturePool.clear(!0),Av.collectObjectByGroup(this.objPoolGroup),Iv.collectObjectByGroup(this.objPoolGroup),null===(e=this.transactionPlayer)||void 0===e||e.destroy(),this.loader.destroy(),this.fps.destroy(),this.stagePool.destroyAllStage(),this.stagePool.destroy(),this.app.renderer.gl.getExtension("WEBGL_lose_context").loseContext(),this.app.destroy(!0,{children:!0,texture:!0,baseTexture:!0}),null===(t=lb.worker)||void 0===t||t.terminate(),this.tracker({name:"slidePlayerDestroy",result:"",reason:"",payload:{}})}catch(e){}}},{key:"view",get:function(){return this.app.renderer?this.app.view:null}},{key:"nextSlideIndex",get:function(){var e;return(null===(e=this.currentStage)||void 0===e?void 0:e.json.nextIndex)?this.currentStage.json.nextIndex:this.currentIndex+1}},{key:"prevSlideIndex",get:function(){var e;return(null===(e=this.currentStage)||void 0===e?void 0:e.json.prevIndex)?this.currentStage.json.prevIndex:this.currentIndex-1}}],[{key:"clearLocalCache",value:function(){var e;null===(e=fb.localCache)||void 0===e||e.clear().catch((function(){}))}}]),n}(Ks.a);xb.platform=Pg,xb.RtcAudioClazz=null;var _b,wb=new Map,Tb=n(136),Mb=n.n(Tb),Sb=n(49),Eb=n.n(Sb),Ab=n(50),Ib=n.n(Ab),Cb=[],Nb="ResizeObserver loop completed with undelivered notifications.";!function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(_b||(_b={}));var kb,Db=function(e){return Object.freeze(e)},Pb=function(e,t){this.inlineSize=e,this.blockSize=t,Db(this)},Ob=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Db(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),Rb=function(e){return e instanceof SVGElement&&"getBBox"in e},Lb=function(e){if(Rb(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,o=i.offsetWidth,a=i.offsetHeight;return!(o||a||e.getClientRects().length)},jb=function(e){var t;if(e instanceof Element)return!0;var n=null===(t=null==e?void 0:e.ownerDocument)||void 0===t?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},Bb="undefined"!=typeof window?window:{},Ub=new WeakMap,zb=/auto|scroll/,Fb=/^tb|vertical/,Gb=/msie|trident/i.test(Bb.navigator&&Bb.navigator.userAgent),Hb=function(e){return parseFloat(e||"0")},Vb=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new Pb((n?t:e)||0,(n?e:t)||0)},Wb=Db({devicePixelContentBoxSize:Vb(),borderBoxSize:Vb(),contentBoxSize:Vb(),contentRect:new Ob(0,0,0,0)}),Yb=function(e,t){if(void 0===t&&(t=!1),Ub.has(e)&&!t)return Ub.get(e);if(Lb(e))return Ub.set(e,Wb),Wb;var n=getComputedStyle(e),r=Rb(e)&&e.ownerSVGElement&&e.getBBox(),i=!Gb&&"border-box"===n.boxSizing,o=Fb.test(n.writingMode||""),a=!r&&zb.test(n.overflowY||""),s=!r&&zb.test(n.overflowX||""),u=r?0:Hb(n.paddingTop),l=r?0:Hb(n.paddingRight),c=r?0:Hb(n.paddingBottom),h=r?0:Hb(n.paddingLeft),d=r?0:Hb(n.borderTopWidth),f=r?0:Hb(n.borderRightWidth),p=r?0:Hb(n.borderBottomWidth),v=h+l,m=u+c,g=(r?0:Hb(n.borderLeftWidth))+f,y=d+p,b=s?e.offsetHeight-y-e.clientHeight:0,x=a?e.offsetWidth-g-e.clientWidth:0,_=i?v+g:0,w=i?m+y:0,T=r?r.width:Hb(n.width)-_-x,M=r?r.height:Hb(n.height)-w-b,S=T+v+x+g,E=M+m+b+y,A=Db({devicePixelContentBoxSize:Vb(Math.round(T*devicePixelRatio),Math.round(M*devicePixelRatio),o),borderBoxSize:Vb(S,E,o),contentBoxSize:Vb(T,M,o),contentRect:new Ob(h,u,T,M)});return Ub.set(e,A),A},Xb=function(e,t,n){var r=Yb(e,n),i=r.borderBoxSize,o=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case _b.DEVICE_PIXEL_CONTENT_BOX:return a;case _b.BORDER_BOX:return i;default:return o}},Qb=function(e){var t=Yb(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=Db([t.borderBoxSize]),this.contentBoxSize=Db([t.contentBoxSize]),this.devicePixelContentBoxSize=Db([t.devicePixelContentBoxSize])},Zb=function(e){if(Lb(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},qb=function(){var e=1/0,t=[];Cb.forEach((function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach((function(t){var n=new Qb(t.target),i=Zb(t.target);r.push(n),t.lastReportedSize=Xb(t.target,t.observedBox),ie?t.activeTargets.push(n):t.skippedTargets.push(n))}))}))},Kb=[],$b=0,ex={attributes:!0,characterData:!0,childList:!0,subtree:!0},tx=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],nx=function(e){return void 0===e&&(e=0),Date.now()+e},rx=!1,ix=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!rx){rx=!0;var n,r=nx(e);n=function(){var n=!1;try{n=function(){var e,t=0;for(Jb(t);Cb.some((function(e){return e.activeTargets.length>0}));)t=qb(),Jb(t);return Cb.some((function(e){return e.skippedTargets.length>0}))&&("function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:Nb}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=Nb),window.dispatchEvent(e)),t>0}()}finally{if(rx=!1,e=r-nx(),!$b)return;n?t.run(1e3):e>0?t.run(e):t.start()}},function(e){if(!kb){var t=0,n=document.createTextNode("");new MutationObserver((function(){return Kb.splice(0).forEach((function(e){return e()}))})).observe(n,{characterData:!0}),kb=function(){n.textContent="".concat(t?t--:t++)}}Kb.push(e),kb()}((function(){requestAnimationFrame(n)}))}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,ex)};document.body?t():Bb.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),tx.forEach((function(t){return Bb.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),tx.forEach((function(t){return Bb.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}()),ox=function(e){!$b&&e>0&&ix.start(),!($b+=e)&&ix.stop()},ax=function(){function e(e,t){this.target=e,this.observedBox=t||_b.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e,t=Xb(this.target,this.observedBox,!0);return e=this.target,Rb(e)||function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(e)||"inline"!==getComputedStyle(e).display||(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),sx=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},ux=new WeakMap,lx=function(e,t){for(var n=0;n=0&&(i&&Cb.splice(Cb.indexOf(n),1),n.observationTargets.splice(r,1),ox(-1))},e.disconnect=function(e){var t=this,n=ux.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},e}(),hx=function(){function e(e){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof e)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");cx.connect(this,e)}return e.prototype.observe=function(e,t){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!jb(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");cx.observe(this,e,t)},e.prototype.unobserve=function(e){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!jb(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");cx.unobserve(this,e)},e.prototype.disconnect=function(){cx.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}(),dx=function(){function e(e,t,n,r,i){this.state="idle",this.index=-1,this.slideIndex=-1,this.fn=n,this.index=e,this.slideIndex=t,this.eventHub=r,this.id=i}return e.prototype.apply=function(){return function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}(this,void 0,void 0,(function(){var e;return function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=0&&(null===(n=e.tasks[i])||void 0===n||n.apply()),r>=0&&(e.tasks.splice(r,1),e.replaceIdleTask()),e.eventHub.emit("task-end-"+t.id)})),this.eventHub.on("task-error",(function(t){var n=t.task,r=e.tasks.findIndex((function(e){return e.index===n.index}));r>=0&&(e.tasks.splice(r,1),e.replaceIdleTask())}))}return e.prototype.replaceIdleTask=function(){for(var e,t=this,n=new Set,r=0,i=this.tasks.length;r=0;n--)t=[e[n].apply(this,t)];return t[0]}},each:function(e,t,n){if(e)if(vx&&e.forEach&&e.forEach===vx)e.forEach(t,n);else if(e.length===e.length+0){var r,i=void 0;for(i=0,r=e.length;i1?gx.toArray(arguments):arguments[0];return gx.each(yx,(function(t){if(t.litmus(e))return gx.each(t.conversions,(function(t,n){if(bx=t.read(e),!1===xx&&!1!==bx)return xx=bx,bx.conversionName=n,bx.conversion=t,gx.BREAK})),gx.BREAK})),xx},wx=void 0,Tx={hsv_to_rgb:function(e,t,n){var r=Math.floor(e/60)%6,i=e/60-Math.floor(e/60),o=n*(1-t),a=n*(1-i*t),s=n*(1-(1-i)*t),u=[[n,s,o],[a,n,o],[o,n,s],[o,a,n],[s,o,n],[n,o,a]][r];return{r:255*u[0],g:255*u[1],b:255*u[2]}},rgb_to_hsv:function(e,t,n){var r=Math.min(e,t,n),i=Math.max(e,t,n),o=i-r,a=void 0;return 0===i?{h:NaN,s:0,v:0}:(a=e===i?(t-n)/o:t===i?2+(n-e)/o:4+(e-t)/o,(a/=6)<0&&(a+=1),{h:360*a,s:o/i,v:i/255})},rgb_to_hex:function(e,t,n){var r=this.hex_with_component(0,2,e);return r=this.hex_with_component(r,1,t),this.hex_with_component(r,0,n)},component_from_hex:function(e,t){return e>>8*t&255},hex_with_component:function(e,t,n){return n<<(wx=8*t)|e&~(255<-1?t.length-t.indexOf(".")-1:0}var Gx=function(e){function t(e,n,r){Sx(this,t);var i=Cx(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n)),o=r||{};return i.__min=o.min,i.__max=o.max,i.__step=o.step,gx.isUndefined(i.__step)?0===i.initialValue?i.__impliedStep=1:i.__impliedStep=Math.pow(10,Math.floor(Math.log(Math.abs(i.initialValue))/Math.LN10))/10:i.__impliedStep=i.__step,i.__precision=Fx(i.__impliedStep),i}return Ix(t,e),Ex(t,[{key:"setValue",value:function(e){var n=e;return void 0!==this.__min&&nthis.__max&&(n=this.__max),void 0!==this.__step&&n%this.__step!=0&&(n=Math.round(n/this.__step)*this.__step),Ax(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setValue",this).call(this,n)}},{key:"min",value:function(e){return this.__min=e,this}},{key:"max",value:function(e){return this.__max=e,this}},{key:"step",value:function(e){return this.__step=e,this.__impliedStep=e,this.__precision=Fx(e),this}}]),t}(Px),Hx=function(e){function t(e,n,r){Sx(this,t);var i=Cx(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,r));i.__truncationSuspended=!1;var o=i,a=void 0;function s(){o.__onFinishChange&&o.__onFinishChange.call(o,o.getValue())}function u(e){var t=a-e.clientY;o.setValue(o.getValue()+t*o.__impliedStep),a=e.clientY}function l(){jx.unbind(window,"mousemove",u),jx.unbind(window,"mouseup",l),s()}return i.__input=document.createElement("input"),i.__input.setAttribute("type","text"),jx.bind(i.__input,"change",(function(){var e=parseFloat(o.__input.value);gx.isNaN(e)||o.setValue(e)})),jx.bind(i.__input,"blur",(function(){s()})),jx.bind(i.__input,"mousedown",(function(e){jx.bind(window,"mousemove",u),jx.bind(window,"mouseup",l),a=e.clientY})),jx.bind(i.__input,"keydown",(function(e){13===e.keyCode&&(o.__truncationSuspended=!0,this.blur(),o.__truncationSuspended=!1,s())})),i.updateDisplay(),i.domElement.appendChild(i.__input),i}return Ix(t,e),Ex(t,[{key:"updateDisplay",value:function(){var e,n,r;return this.__input.value=this.__truncationSuspended?this.getValue():(e=this.getValue(),n=this.__precision,r=Math.pow(10,n),Math.round(e*r)/r),Ax(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updateDisplay",this).call(this)}}]),t}(Gx);function Vx(e,t,n,r,i){return r+(e-t)/(n-t)*(i-r)}var Wx=function(e){function t(e,n,r,i,o){Sx(this,t);var a=Cx(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,{min:r,max:i,step:o})),s=a;function u(e){e.preventDefault();var t=s.__background.getBoundingClientRect();return s.setValue(Vx(e.clientX,t.left,t.right,s.__min,s.__max)),!1}function l(){jx.unbind(window,"mousemove",u),jx.unbind(window,"mouseup",l),s.__onFinishChange&&s.__onFinishChange.call(s,s.getValue())}function c(e){var t=e.touches[0].clientX,n=s.__background.getBoundingClientRect();s.setValue(Vx(t,n.left,n.right,s.__min,s.__max))}function h(){jx.unbind(window,"touchmove",c),jx.unbind(window,"touchend",h),s.__onFinishChange&&s.__onFinishChange.call(s,s.getValue())}return a.__background=document.createElement("div"),a.__foreground=document.createElement("div"),jx.bind(a.__background,"mousedown",(function(e){document.activeElement.blur(),jx.bind(window,"mousemove",u),jx.bind(window,"mouseup",l),u(e)})),jx.bind(a.__background,"touchstart",(function(e){1===e.touches.length&&(jx.bind(window,"touchmove",c),jx.bind(window,"touchend",h),c(e))})),jx.addClass(a.__background,"slider"),jx.addClass(a.__foreground,"slider-fg"),a.updateDisplay(),a.__background.appendChild(a.__foreground),a.domElement.appendChild(a.__background),a}return Ix(t,e),Ex(t,[{key:"updateDisplay",value:function(){var e=(this.getValue()-this.__min)/(this.__max-this.__min);return this.__foreground.style.width=100*e+"%",Ax(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updateDisplay",this).call(this)}}]),t}(Gx),Yx=function(e){function t(e,n,r){Sx(this,t);var i=Cx(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n)),o=i;return i.__button=document.createElement("div"),i.__button.innerHTML=void 0===r?"Fire":r,jx.bind(i.__button,"click",(function(e){return e.preventDefault(),o.fire(),!1})),jx.addClass(i.__button,"button"),i.domElement.appendChild(i.__button),i}return Ix(t,e),Ex(t,[{key:"fire",value:function(){this.__onChange&&this.__onChange.call(this),this.getValue().call(this.object),this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue())}}]),t}(Px),Xx=function(e){function t(e,n){Sx(this,t);var r=Cx(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));r.__color=new Nx(r.getValue()),r.__temp=new Nx(0);var i=r;r.domElement=document.createElement("div"),jx.makeSelectable(r.domElement,!1),r.__selector=document.createElement("div"),r.__selector.className="selector",r.__saturation_field=document.createElement("div"),r.__saturation_field.className="saturation-field",r.__field_knob=document.createElement("div"),r.__field_knob.className="field-knob",r.__field_knob_border="2px solid ",r.__hue_knob=document.createElement("div"),r.__hue_knob.className="hue-knob",r.__hue_field=document.createElement("div"),r.__hue_field.className="hue-field",r.__input=document.createElement("input"),r.__input.type="text",r.__input_textShadow="0 1px 1px ",jx.bind(r.__input,"keydown",(function(e){13===e.keyCode&&h.call(this)})),jx.bind(r.__input,"blur",h),jx.bind(r.__selector,"mousedown",(function(){jx.addClass(this,"drag").bind(window,"mouseup",(function(){jx.removeClass(i.__selector,"drag")}))})),jx.bind(r.__selector,"touchstart",(function(){jx.addClass(this,"drag").bind(window,"touchend",(function(){jx.removeClass(i.__selector,"drag")}))}));var o,a=document.createElement("div");function s(e){f(e),jx.bind(window,"mousemove",f),jx.bind(window,"touchmove",f),jx.bind(window,"mouseup",l),jx.bind(window,"touchend",l)}function u(e){p(e),jx.bind(window,"mousemove",p),jx.bind(window,"touchmove",p),jx.bind(window,"mouseup",c),jx.bind(window,"touchend",c)}function l(){jx.unbind(window,"mousemove",f),jx.unbind(window,"touchmove",f),jx.unbind(window,"mouseup",l),jx.unbind(window,"touchend",l),d()}function c(){jx.unbind(window,"mousemove",p),jx.unbind(window,"touchmove",p),jx.unbind(window,"mouseup",c),jx.unbind(window,"touchend",c),d()}function h(){var e=_x(this.value);!1!==e?(i.__color.__state=e,i.setValue(i.__color.toOriginal())):this.value=i.__color.toString()}function d(){i.__onFinishChange&&i.__onFinishChange.call(i,i.__color.toOriginal())}function f(e){-1===e.type.indexOf("touch")&&e.preventDefault();var t=i.__saturation_field.getBoundingClientRect(),n=e.touches&&e.touches[0]||e,r=n.clientX,o=n.clientY,a=(r-t.left)/(t.right-t.left),s=1-(o-t.top)/(t.bottom-t.top);return s>1?s=1:s<0&&(s=0),a>1?a=1:a<0&&(a=0),i.__color.v=s,i.__color.s=a,i.setValue(i.__color.toOriginal()),!1}function p(e){-1===e.type.indexOf("touch")&&e.preventDefault();var t=i.__hue_field.getBoundingClientRect(),n=1-((e.touches&&e.touches[0]||e).clientY-t.top)/(t.bottom-t.top);return n>1?n=1:n<0&&(n=0),i.__color.h=360*n,i.setValue(i.__color.toOriginal()),!1}return gx.extend(r.__selector.style,{width:"122px",height:"102px",padding:"3px",backgroundColor:"#222",boxShadow:"0px 1px 3px rgba(0,0,0,0.3)"}),gx.extend(r.__field_knob.style,{position:"absolute",width:"12px",height:"12px",border:r.__field_knob_border+(r.__color.v<.5?"#fff":"#000"),boxShadow:"0px 1px 3px rgba(0,0,0,0.5)",borderRadius:"12px",zIndex:1}),gx.extend(r.__hue_knob.style,{position:"absolute",width:"15px",height:"2px",borderRight:"4px solid #fff",zIndex:1}),gx.extend(r.__saturation_field.style,{width:"100px",height:"100px",border:"1px solid #555",marginRight:"3px",display:"inline-block",cursor:"pointer"}),gx.extend(a.style,{width:"100%",height:"100%",background:"none"}),Zx(a,"top","rgba(0,0,0,0)","#000"),gx.extend(r.__hue_field.style,{width:"15px",height:"100px",border:"1px solid #555",cursor:"ns-resize",position:"absolute",top:"3px",right:"3px"}),(o=r.__hue_field).style.background="",o.style.cssText+="background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);",o.style.cssText+="background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",o.style.cssText+="background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",o.style.cssText+="background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",o.style.cssText+="background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",gx.extend(r.__input.style,{outline:"none",textAlign:"center",color:"#fff",border:0,fontWeight:"bold",textShadow:r.__input_textShadow+"rgba(0,0,0,0.7)"}),jx.bind(r.__saturation_field,"mousedown",s),jx.bind(r.__saturation_field,"touchstart",s),jx.bind(r.__field_knob,"mousedown",s),jx.bind(r.__field_knob,"touchstart",s),jx.bind(r.__hue_field,"mousedown",u),jx.bind(r.__hue_field,"touchstart",u),r.__saturation_field.appendChild(a),r.__selector.appendChild(r.__field_knob),r.__selector.appendChild(r.__saturation_field),r.__selector.appendChild(r.__hue_field),r.__hue_field.appendChild(r.__hue_knob),r.domElement.appendChild(r.__input),r.domElement.appendChild(r.__selector),r.updateDisplay(),r}return Ix(t,e),Ex(t,[{key:"updateDisplay",value:function(){var e=_x(this.getValue());if(!1!==e){var t=!1;gx.each(Nx.COMPONENTS,(function(n){if(!gx.isUndefined(e[n])&&!gx.isUndefined(this.__color.__state[n])&&e[n]!==this.__color.__state[n])return t=!0,{}}),this),t&&gx.extend(this.__color.__state,e)}gx.extend(this.__temp.__state,this.__color.__state),this.__temp.a=1;var n=this.__color.v<.5||this.__color.s>.5?255:0,r=255-n;gx.extend(this.__field_knob.style,{marginLeft:100*this.__color.s-7+"px",marginTop:100*(1-this.__color.v)-7+"px",backgroundColor:this.__temp.toHexString(),border:this.__field_knob_border+"rgb("+n+","+n+","+n+")"}),this.__hue_knob.style.marginTop=100*(1-this.__color.h/360)+"px",this.__temp.s=1,this.__temp.v=1,Zx(this.__saturation_field,"left","#fff",this.__temp.toHexString()),this.__input.value=this.__color.toString(),gx.extend(this.__input.style,{backgroundColor:this.__color.toHexString(),color:"rgb("+n+","+n+","+n+")",textShadow:this.__input_textShadow+"rgba("+r+","+r+","+r+",.7)"})}}]),t}(Px),Qx=["-moz-","-o-","-webkit-","-ms-",""];function Zx(e,t,n,r){e.style.background="",gx.each(Qx,(function(i){e.style.cssText+="background: "+i+"linear-gradient("+t+", "+n+" 0%, "+r+" 100%); "}))}var qx='
\n\n Here\'s the new load parameter for your GUI\'s constructor:\n\n \n\n
\n\n Automatically save\n values to localStorage on exit.\n\n
The values saved to localStorage will\n override those passed to dat.GUI\'s constructor. This makes it\n easier to work incrementally, but localStorage is fragile,\n and your friends may not see the same values you do.\n\n
\n\n
\n\n
',Jx=function(e,t){var n=e[t];return gx.isArray(arguments[2])||gx.isObject(arguments[2])?new Ux(e,t,arguments[2]):gx.isNumber(n)?gx.isNumber(arguments[2])&&gx.isNumber(arguments[3])?gx.isNumber(arguments[4])?new Wx(e,t,arguments[2],arguments[3],arguments[4]):new Wx(e,t,arguments[2],arguments[3]):gx.isNumber(arguments[4])?new Hx(e,t,{min:arguments[2],max:arguments[3],step:arguments[4]}):new Hx(e,t,{min:arguments[2],max:arguments[3]}):gx.isString(n)?new zx(e,t):gx.isFunction(n)?new Yx(e,t,""):gx.isBoolean(n)?new Bx(e,t):null},Kx=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){setTimeout(e,1e3/60)},$x=function(){function e(){Sx(this,e),this.backgroundElement=document.createElement("div"),gx.extend(this.backgroundElement.style,{backgroundColor:"rgba(0,0,0,0.8)",top:0,left:0,display:"none",zIndex:"1000",opacity:0,WebkitTransition:"opacity 0.2s linear",transition:"opacity 0.2s linear"}),jx.makeFullscreen(this.backgroundElement),this.backgroundElement.style.position="fixed",this.domElement=document.createElement("div"),gx.extend(this.domElement.style,{position:"fixed",display:"none",zIndex:"1001",opacity:0,WebkitTransition:"-webkit-transform 0.2s ease-out, opacity 0.2s linear",transition:"transform 0.2s ease-out, opacity 0.2s linear"}),document.body.appendChild(this.backgroundElement),document.body.appendChild(this.domElement);var t=this;jx.bind(this.backgroundElement,"click",(function(){t.hide()}))}return Ex(e,[{key:"show",value:function(){var e=this;this.backgroundElement.style.display="block",this.domElement.style.display="block",this.domElement.style.opacity=0,this.domElement.style.webkitTransform="scale(1.1)",this.layout(),gx.defer((function(){e.backgroundElement.style.opacity=1,e.domElement.style.opacity=1,e.domElement.style.webkitTransform="scale(1)"}))}},{key:"hide",value:function(){var e=this,t=function t(){e.domElement.style.display="none",e.backgroundElement.style.display="none",jx.unbind(e.domElement,"webkitTransitionEnd",t),jx.unbind(e.domElement,"transitionend",t),jx.unbind(e.domElement,"oTransitionEnd",t)};jx.bind(this.domElement,"webkitTransitionEnd",t),jx.bind(this.domElement,"transitionend",t),jx.bind(this.domElement,"oTransitionEnd",t),this.backgroundElement.style.opacity=0,this.domElement.style.opacity=0,this.domElement.style.webkitTransform="scale(1.1)"}},{key:"layout",value:function(){this.domElement.style.left=window.innerWidth/2-jx.getWidth(this.domElement)/2+"px",this.domElement.style.top=window.innerHeight/2-jx.getHeight(this.domElement)/2+"px"}}]),e}();!function(e,t){var n=t||document,r=document.createElement("style");r.type="text/css",r.innerHTML=e;var i=n.getElementsByTagName("head")[0];try{i.appendChild(r)}catch(e){}}(function(e){if("undefined"!=typeof window){var t=document.createElement("style");return t.setAttribute("type","text/css"),t.innerHTML=e,document.head.appendChild(t),e}}(".dg ul{list-style:none;margin:0;padding:0;width:100%;clear:both}.dg.ac{position:fixed;top:0;left:0;right:0;height:0;z-index:0}.dg:not(.ac) .main{overflow:hidden}.dg.main{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear}.dg.main.taller-than-window{overflow-y:auto}.dg.main.taller-than-window .close-button{opacity:1;margin-top:-1px;border-top:1px solid #2c2c2c}.dg.main ul.closed .close-button{opacity:1 !important}.dg.main:hover .close-button,.dg.main .close-button.drag{opacity:1}.dg.main .close-button{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear;border:0;line-height:19px;height:20px;cursor:pointer;text-align:center;background-color:#000}.dg.main .close-button.close-top{position:relative}.dg.main .close-button.close-bottom{position:absolute}.dg.main .close-button:hover{background-color:#111}.dg.a{float:right;margin-right:15px;overflow-y:visible}.dg.a.has-save>ul.close-top{margin-top:0}.dg.a.has-save>ul.close-bottom{margin-top:27px}.dg.a.has-save>ul.closed{margin-top:0}.dg.a .save-row{top:0;z-index:1002}.dg.a .save-row.close-top{position:relative}.dg.a .save-row.close-bottom{position:fixed}.dg li{-webkit-transition:height .1s ease-out;-o-transition:height .1s ease-out;-moz-transition:height .1s ease-out;transition:height .1s ease-out;-webkit-transition:overflow .1s linear;-o-transition:overflow .1s linear;-moz-transition:overflow .1s linear;transition:overflow .1s linear}.dg li:not(.folder){cursor:auto;height:27px;line-height:27px;padding:0 4px 0 5px}.dg li.folder{padding:0;border-left:4px solid rgba(0,0,0,0)}.dg li.title{cursor:pointer;margin-left:-4px}.dg .closed li:not(.title),.dg .closed ul li,.dg .closed ul li>*{height:0;overflow:hidden;border:0}.dg .cr{clear:both;padding-left:3px;height:27px;overflow:hidden}.dg .property-name{cursor:default;float:left;clear:left;width:40%;overflow:hidden;text-overflow:ellipsis}.dg .cr.function .property-name{width:100%}.dg .c{float:left;width:60%;position:relative}.dg .c input[type=text]{border:0;margin-top:4px;padding:3px;width:100%;float:right}.dg .has-slider input[type=text]{width:30%;margin-left:0}.dg .slider{float:left;width:66%;margin-left:-5px;margin-right:0;height:19px;margin-top:4px}.dg .slider-fg{height:100%}.dg .c input[type=checkbox]{margin-top:7px}.dg .c select{margin-top:5px}.dg .cr.function,.dg .cr.function .property-name,.dg .cr.function *,.dg .cr.boolean,.dg .cr.boolean *{cursor:pointer}.dg .cr.color{overflow:visible}.dg .selector{display:none;position:absolute;margin-left:-9px;margin-top:23px;z-index:10}.dg .c:hover .selector,.dg .selector.drag{display:block}.dg li.save-row{padding:0}.dg li.save-row .button{display:inline-block;padding:0px 6px}.dg.dialogue{background-color:#222;width:460px;padding:15px;font-size:13px;line-height:15px}#dg-new-constructor{padding:10px;color:#222;font-family:Monaco, monospace;font-size:10px;border:0;resize:none;box-shadow:inset 1px 1px 1px #888;word-wrap:break-word;margin:12px 0;display:block;width:440px;overflow-y:scroll;height:100px;position:relative}#dg-local-explain{display:none;font-size:11px;line-height:17px;border-radius:3px;background-color:#333;padding:8px;margin-top:10px}#dg-local-explain code{font-size:10px}#dat-gui-save-locally{display:none}.dg{color:#eee;font:11px 'Lucida Grande', sans-serif;text-shadow:0 -1px 0 #111}.dg.main::-webkit-scrollbar{width:5px;background:#1a1a1a}.dg.main::-webkit-scrollbar-corner{height:0;display:none}.dg.main::-webkit-scrollbar-thumb{border-radius:5px;background:#676767}.dg li:not(.folder){background:#1a1a1a;border-bottom:1px solid #2c2c2c}.dg li.save-row{line-height:25px;background:#dad5cb;border:0}.dg li.save-row select{margin-left:5px;width:108px}.dg li.save-row .button{margin-left:5px;margin-top:1px;border-radius:2px;font-size:9px;line-height:7px;padding:4px 4px 5px 4px;background:#c5bdad;color:#fff;text-shadow:0 1px 0 #b0a58f;box-shadow:0 -1px 0 #b0a58f;cursor:pointer}.dg li.save-row .button.gears{background:#c5bdad url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAANCAYAAAB/9ZQ7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQJJREFUeNpiYKAU/P//PwGIC/ApCABiBSAW+I8AClAcgKxQ4T9hoMAEUrxx2QSGN6+egDX+/vWT4e7N82AMYoPAx/evwWoYoSYbACX2s7KxCxzcsezDh3evFoDEBYTEEqycggWAzA9AuUSQQgeYPa9fPv6/YWm/Acx5IPb7ty/fw+QZblw67vDs8R0YHyQhgObx+yAJkBqmG5dPPDh1aPOGR/eugW0G4vlIoTIfyFcA+QekhhHJhPdQxbiAIguMBTQZrPD7108M6roWYDFQiIAAv6Aow/1bFwXgis+f2LUAynwoIaNcz8XNx3Dl7MEJUDGQpx9gtQ8YCueB+D26OECAAQDadt7e46D42QAAAABJRU5ErkJggg==) 2px 1px no-repeat;height:7px;width:8px}.dg li.save-row .button:hover{background-color:#bab19e;box-shadow:0 -1px 0 #b0a58f}.dg li.folder{border-bottom:0}.dg li.title{padding-left:16px;background:#000 url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlI+hKgFxoCgAOw==) 6px 10px no-repeat;cursor:pointer;border-bottom:1px solid rgba(255,255,255,0.2)}.dg .closed li.title{background-image:url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlGIWqMCbWAEAOw==)}.dg .cr.boolean{border-left:3px solid #806787}.dg .cr.color{border-left:3px solid}.dg .cr.function{border-left:3px solid #e61d5f}.dg .cr.number{border-left:3px solid #2FA1D6}.dg .cr.number input[type=text]{color:#2FA1D6}.dg .cr.string{border-left:3px solid #1ed36f}.dg .cr.string input[type=text]{color:#1ed36f}.dg .cr.function:hover,.dg .cr.boolean:hover{background:#111}.dg .c input[type=text]{background:#303030;outline:none}.dg .c input[type=text]:hover{background:#3c3c3c}.dg .c input[type=text]:focus{background:#494949;color:#fff}.dg .c .slider{background:#303030;cursor:ew-resize}.dg .c .slider-fg{background:#2FA1D6;max-width:100%}.dg .c .slider:hover{background:#3c3c3c}.dg .c .slider:hover .slider-fg{background:#44abda}\n"));var e_=function(){try{return!!window.localStorage}catch(e){return!1}}(),t_=void 0,n_=!0,r_=void 0,i_=!1,o_=[],a_=function e(t){var n=this,r=t||{};this.domElement=document.createElement("div"),this.__ul=document.createElement("ul"),this.domElement.appendChild(this.__ul),jx.addClass(this.domElement,"dg"),this.__folders={},this.__controllers=[],this.__rememberedObjects=[],this.__rememberedObjectIndecesToControllers=[],this.__listening=[],r=gx.defaults(r,{closeOnTop:!1,autoPlace:!0,width:e.DEFAULT_WIDTH}),r=gx.defaults(r,{resizable:r.autoPlace,hideable:r.autoPlace}),gx.isUndefined(r.load)?r.load={preset:"Default"}:r.preset&&(r.load.preset=r.preset),gx.isUndefined(r.parent)&&r.hideable&&o_.push(this),r.resizable=gx.isUndefined(r.parent)&&r.resizable,r.autoPlace&&gx.isUndefined(r.scrollable)&&(r.scrollable=!0);var i,o=e_&&"true"===localStorage.getItem(d_(this,"isLocal")),a=void 0,s=void 0;if(Object.defineProperties(this,{parent:{get:function(){return r.parent}},scrollable:{get:function(){return r.scrollable}},autoPlace:{get:function(){return r.autoPlace}},closeOnTop:{get:function(){return r.closeOnTop}},preset:{get:function(){return n.parent?n.getRoot().preset:r.load.preset},set:function(e){n.parent?n.getRoot().preset=e:r.load.preset=e,function(e){for(var t=0;t1){var r=n.__li.nextElementSibling;return n.remove(),h_(e,n.object,n.property,{before:r,factoryArgs:[gx.toArray(arguments)]})}if(gx.isArray(t)||gx.isObject(t)){var i=n.__li.nextElementSibling;return n.remove(),h_(e,n.object,n.property,{before:i,factoryArgs:[t]})}},name:function(e){return n.__li.firstElementChild.firstElementChild.innerHTML=e,n},listen:function(){return n.__gui.listen(n),n},remove:function(){return n.__gui.remove(n),n}}),n instanceof Wx){var r=new Hx(n.object,n.property,{min:n.__min,max:n.__max,step:n.__step});gx.each(["updateDisplay","onChange","onFinishChange","step","min","max"],(function(e){var t=n[e],i=r[e];n[e]=r[e]=function(){var e=Array.prototype.slice.call(arguments);return i.apply(r,e),t.apply(n,e)}})),jx.addClass(t,"has-slider"),n.domElement.insertBefore(r.domElement,n.domElement.firstElementChild)}else if(n instanceof Hx){var i=function(t){if(gx.isNumber(n.__min)&&gx.isNumber(n.__max)){var r=n.__li.firstElementChild.firstElementChild.innerHTML,i=n.__gui.__listening.indexOf(n)>-1;n.remove();var o=h_(e,n.object,n.property,{before:n.__li.nextElementSibling,factoryArgs:[n.__min,n.__max,n.__step]});return o.name(r),i&&o.listen(),o}return t};n.min=gx.compose(i,n.min),n.max=gx.compose(i,n.max)}else n instanceof Bx?(jx.bind(t,"click",(function(){jx.fakeEvent(n.__checkbox,"click")})),jx.bind(n.__checkbox,"click",(function(e){e.stopPropagation()}))):n instanceof Yx?(jx.bind(t,"click",(function(){jx.fakeEvent(n.__button,"click")})),jx.bind(t,"mouseover",(function(){jx.addClass(n.__button,"hover")})),jx.bind(t,"mouseout",(function(){jx.removeClass(n.__button,"hover")}))):n instanceof Xx&&(jx.addClass(t,"color"),n.updateDisplay=gx.compose((function(e){return t.style.borderLeftColor=n.__color.toString(),e}),n.updateDisplay),n.updateDisplay());n.setValue=gx.compose((function(t){return e.getRoot().__preset_select&&n.isModified()&&l_(e.getRoot(),!0),t}),n.setValue)}(e,u,i),e.__controllers.push(i),i}function d_(e,t){return document.location.href+"."+t}function f_(e,t,n){var r=document.createElement("option");r.innerHTML=t,r.value=t,e.__preset_select.appendChild(r),n&&(e.__preset_select.selectedIndex=e.__preset_select.length-1)}function p_(e,t){t.style.display=e.useLocalStorage?"block":"none"}function v_(e){var t=e.__save_row=document.createElement("li");jx.addClass(e.domElement,"has-save"),e.__ul.insertBefore(t,e.__ul.firstChild),jx.addClass(t,"save-row");var n=document.createElement("span");n.innerHTML=" ",jx.addClass(n,"button gears");var r=document.createElement("span");r.innerHTML="Save",jx.addClass(r,"button"),jx.addClass(r,"save");var i=document.createElement("span");i.innerHTML="New",jx.addClass(i,"button"),jx.addClass(i,"save-as");var o=document.createElement("span");o.innerHTML="Revert",jx.addClass(o,"button"),jx.addClass(o,"revert");var a=e.__preset_select=document.createElement("select");if(e.load&&e.load.remembered?gx.each(e.load.remembered,(function(t,n){f_(e,n,n===e.preset)})):f_(e,"Default",!1),jx.bind(a,"change",(function(){for(var t=0;t0&&(e.preset=this.preset,e.remembered||(e.remembered={}),e.remembered[this.preset]=g_(this)),e.folders={},gx.each(this.__folders,(function(t,n){e.folders[n]=t.getSaveObject()})),e},save:function(){this.load.remembered||(this.load.remembered={}),this.load.remembered[this.preset]=g_(this),l_(this,!1),this.saveToLocalStorageIfPossible()},saveAs:function(e){this.load.remembered||(this.load.remembered={},this.load.remembered.Default=g_(this,!0)),this.load.remembered[e]=g_(this),this.preset=e,f_(this,e,!0),this.saveToLocalStorageIfPossible()},revert:function(e){gx.each(this.__controllers,(function(t){this.getRoot().load.remembered?c_(e||this.getRoot(),t):t.setValue(t.initialValue),t.__onFinishChange&&t.__onFinishChange.call(t,t.getValue())}),this),gx.each(this.__folders,(function(e){e.revert(e)})),e||l_(this.getRoot(),!1)},listen:function(e){var t=0===this.__listening.length;this.__listening.push(e),t&&function e(t){0!==t.length&&Kx.call(window,(function(){e(t)})),gx.each(t,(function(e){e.updateDisplay()}))}(this.__listening)},updateDisplay:function(){gx.each(this.__controllers,(function(e){e.updateDisplay()})),gx.each(this.__folders,(function(e){e.updateDisplay()}))}});var y_=a_,b_=function(){function e(e){this.player=e}return Object.defineProperty(e.prototype,"frameRate",{get:function(){return this.player.fps.value},set:function(e){},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"drawFrames",{get:function(){return this.player.runtime.fps},set:function(e){},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"drawCall",{get:function(){return this.player.runtime.drawCall},set:function(e){},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"resolution",{get:function(){return this.player.config.resolution},set:function(e){this.player.updateConfig({resolution:e})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){var e,t;return(null===(e=this.player.view)||void 0===e?void 0:e.width)+"*"+(null===(t=this.player.view)||void 0===t?void 0:t.height)},set:function(e){},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"minFPS",{get:function(){return this.player.config.minFPS},set:function(e){this.player.updateConfig({minFPS:e,maxFPS:this.player.config.maxFPS})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxFPS",{get:function(){return this.player.config.maxFPS},set:function(e){this.player.updateConfig({maxFPS:e,minFPS:this.player.config.minFPS})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"autoResolution",{get:function(){return this.player.config.autoResolution},set:function(e){this.player.updateConfig({autoResolution:e})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"autoFPS",{get:function(){return this.player.config.autoFPS},set:function(e){this.player.updateConfig({autoFPS:e})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backgroundColor",{get:function(){return this.player.config.transactionBgColor},set:function(e){this.player.updateConfig({transactionBgColor:e})},enumerable:!1,configurable:!0}),e}(),x_=function(){function e(e,t){var n;this.config=new b_(e),this.anchor=t,n=this.createControllerGUI(),this.gui=n[0],this.controller=n[1],this.createStats()}return e.prototype.createStats=function(){var e=this;this.stateId=setInterval((function(){e.controller.frameRate.updateDisplay(),e.controller.size.updateDisplay(),e.controller.minFPS.updateDisplay(),e.controller.drawFrames.updateDisplay(),e.controller.maxFPS.updateDisplay(),e.controller.resolution.updateDisplay(),e.controller.autoFps.updateDisplay(),e.controller.autoResolution.updateDisplay(),e.controller.drawCall.updateDisplay()}),16)},e.prototype.createControllerGUI=function(){var e=new y_({autoPlace:!0,closed:!0});e.domElement.style.opacity=".6",e.domElement.style.transformOrigin="100% 0",e.domElement.style.transform="scale(1)",this.anchor.appendChild(e.domElement),e.domElement.style.position="absolute",e.domElement.style.right="0",e.domElement.style.top="0",e.domElement.style.zIndex="2";var t={frameRate:e.add(this.config,"frameRate"),drawFrames:e.add(this.config,"drawFrames"),drawCall:e.add(this.config,"drawCall"),size:e.add(this.config,"size"),minFPS:e.add(this.config,"minFPS",0,60),maxFPS:e.add(this.config,"maxFPS",0,60),resolution:e.add(this.config,"resolution",.5,8,.5),autoResolution:e.add(this.config,"autoResolution"),autoFps:e.add(this.config,"autoFPS"),transactionBgColor:e.addColor(this.config,"backgroundColor")};return[e,t]},e.prototype.destroy=function(){try{window.clearInterval(this.stateId),this.anchor.removeChild(this.gui.domElement),this.gui.destroy()}catch(e){}},e}(),__=function(){function e(e){var t=this;this.tasks=[],this.isDestroy=!1,this.isScheduling=!1,this.schedule=function(){t.isScheduling=!0;var e=t.tasks.shift();e&&!t.isDestroy&&t.fn(e).then((function(){t.tasks.length>0?window.requestAnimationFrame(t.schedule):t.isScheduling=!1}))},this.fn=e}return e.prototype.destroy=function(){this.isDestroy=!0},e.prototype.addTask=function(e){this.tasks.push(e),this.isScheduling||this.schedule()},e}(),w_=function(){function e(e){this.autoUnlock=Object.create(null),this.locks=Object.create(null),this.available=!1,this.available=e}return e.prototype.addLock=function(e,t){var n=this;this.available&&(this.locks[e]=t,this.autoUnlock[e]=window.setTimeout((function(){delete n.locks[e]}),3e3))},e.prototype.unlock=function(e,t){this.available&&t&&this.locks[e]&&this.locks[e]===t&&(window.clearTimeout(this.autoUnlock[e]),delete this.locks[e])},e.prototype.isLocked=function(e){return!!this.available&&!!this.locks[e]},e}(),T_=function(){function e(){var e=this;this.tasks=[],this.isDestroy=!1,this.isScheduling=!1,this.schedule=function(){e.isScheduling=!0;var t=e.tasks.shift();t&&!e.isDestroy&&(t.status="running",t.fn.apply(null).then((function(){e.tasks.length>0?window.requestAnimationFrame(e.schedule):e.isScheduling=!1})).catch((function(){e.tasks.length>0?window.requestAnimationFrame(e.schedule):e.isScheduling=!1})))}}return e.prototype.getRunningTask=function(){return this.tasks[0]&&"running"===this.tasks[0].status?this.tasks[0]:null},e.prototype.addTask=function(e,t){var n={type:e,status:"wait",fn:t},r=this.getRunningTask();r&&e===r.type||(this.tasks=this.tasks.filter((function(t){return t.type!==e})),this.tasks.push(n),this.isScheduling||this.schedule())},e.prototype.destroy=function(){this.isDestroy=!0},e}(),M_=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},S_=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=this.config.buffer||e))return[2];t=this.logList.splice(0),n=function(){i.logList=t.concat(i.logList),i.retryTimes>3&&i.pause(),i.retryTimes+=1},o.label=1;case 1:return o.trys.push([1,3,,4]),[4,fetch("https://netless-ppt-plugin-dev.cn-hangzhou.log.aliyuncs.com/logstores/netless-ppt-plugin-dev/track",{method:"POST",headers:{"x-log-apiversion":"0.6.0","Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify({__topic__:"netless-ppt-plugin-dev",__source__:"netless-ppt-plugin-dev",__logs__:t})})];case 2:return o.sent().ok?this.retryTimes=0:n(),[3,4];case 3:return r=o.sent(),console.warn(r),n(),[3,4];case 4:return[2]}}))}))},e.prototype.setEnable=function(e){this.enable!==e&&(e?this.start():this.pause())},e}();function A_(e,t,n){return function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}(this,void 0,void 0,(function(){var r,i,o,a;return function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]500&&r.enableGlobalClick&&r.nextStep()}))},r.handleViewTouchStart=function(){window.clearTimeout(r.touchStartId),r.isTouchStart=!0,r.touchStartId=setTimeout((function(){r.isTouchStart=!1}),350)},r.handleViewTouchEnd=function(){r.isTouchStart&&(r.isTouchStart=!1,r.handleViewClick())},r.handleSlideRef=function(){console.log(r),window.__slide=r},r.receiveSyncHandler=function(e){return k_(r,void 0,void 0,(function(){var t,n,r,i,o,a=this;return D_(this,(function(s){switch(s.label){case 0:return Tv()(e.incrId)&&(e.incrId&&e.incrId-this._receiveIncrId!=1&&this.emit(L_.syncEventLag),this._receiveIncrId=e.incrId||0),this.logger.info("sync receive "+JSON.stringify(e),this.taskId),"nextStep"!==e.type?[3,1]:(this.mainSeqStep!==e.next-1&&this.mainSeqStep+1!==this.mainSeqLength&&this.player?(this.setMainSeqStep(e.next,"start"),this.player.nextTick((function(){a.doNextStep(!0,e.clientId||"")}))):this.doNextStep(!0,e.clientId||""),[3,6]);case 1:return"prevStep"!==e.type?[3,2]:(0===this.mainSeqStep&&"idle"===this.mainSeqState||this.mainSeqStep===e.next+1||this.mainSeqStep+1===this.mainSeqLength?this.doPrevStep(!0):(this.setMainSeqStep(e.next+1,"start"),null===(t=this.player)||void 0===t||t.nextTick((function(){a.doPrevStep(!0)}))),[3,6]);case 2:return"interactiveAnim"!==e.type?[3,3]:(this.player?this.player.applyInteractiveAction(e.action):this.__slideState.interactiveSeqState[e.seqId]?this.__slideState.interactiveSeqState[e.seqId].step+=1:this.__slideState.interactiveSeqState[e.seqId]={step:0,state:"end"},[3,6]);case 3:return"renderSlide"!==e.type?[3,5]:[4,this.doRenderSlide(e.index,e.isForward)];case 4:return s.sent(),[3,6];case 5:"mediaPlay"===e.type?(null===(n=this.player)||void 0===n||n.setMediaState(e.id,!0),this.__slideState.mediaState[e.id]=e.state):"mediaPause"===e.type?(null===(r=this.player)||void 0===r||r.setMediaState(e.id,!1),this.__slideState.mediaState[e.id]=e.state):"mediaSeek"===e.type?(null===(i=this.player)||void 0===i||i.setMediaCurrentTime(e.id,e.time),this.__slideState.mediaState[e.id]=e.state):"mediaFullscreen"===e.type&&(e.targetId&&this.__slideState.mediaState[e.targetId]?this.__slideState.mediaState[e.targetId].fullscreen=e.state:this.__slideState.mediaState[e.targetId]={fullscreen:e.state,type:"pause",time:0},null===(o=this.player)||void 0===o||o.syncFullscreenVideoState({targetId:e.targetId,state:e.state,slideIndex:e.slideIndex})),s.label=6;case 6:return[2]}}))}))},r.handlePrevSlide=function(e){return void 0===e&&(e=!1),k_(r,void 0,void 0,(function(){var t,n;return D_(this,(function(r){return this.player?((t=this.player.prevSlideIndex)>=1&&((null===(n=this.config.navigatorDelegate)||void 0===n?void 0:n.gotoPage)?this.config.navigatorDelegate.gotoPage(t):e?this.doRenderSlide(t,!1):this.renderSlide(t,!1)),[2]):[2]}))}))},r.handleNextSlide=function(e){return void 0===e&&(e=!1),k_(r,void 0,void 0,(function(){var t,n;return D_(this,(function(r){return this.player?((t=this.player.nextSlideIndex)<=this.slideCount&&((null===(n=this.config.navigatorDelegate)||void 0===n?void 0:n.gotoPage)?this.config.navigatorDelegate.gotoPage(t):e?this.doRenderSlide(t,!0):this.renderSlide(t,!0)),[2]):[2]}))}))},r.handleGotoSlide=function(e){if(e<=r.slideCount&&e>=1){var t=r.slideState.currentSlideIndex<=e;r.renderSlide(e,t)}else-1===e&&r.renderSlide(r.slideCount,!0)},t.instances.push(r),r.config=r.initSlideConfig(n),r.tracker=function(e){n.whiteTracker&&n.whiteTracker.commit({name:e.name,reason:e.reason,result:e.result,payload:N_(N_({},e.payload),{slideId:r.randomId,taskId:r.taskId})},{slideVersion:r.version||""})},t.trackLogger.setEnable(!!r.config.enableTracking),r.logger={info:function(e,n){var i;t.appendLogString("INFO - "+(new Date).toISOString()+" - {"+r.randomId+"}["+n+"] "+e+"\n"),t.trackLogger.addLog(e,"info",n,r.randomId);var o=null===(i=r.config.logger)||void 0===i?void 0:i.info;o&&o("["+n+"] "+e)},warn:function(e,n){var i;t.appendLogString("WARN - "+(new Date).toISOString()+" - {"+r.randomId+"}["+n+"] "+e+"\n"),t.trackLogger.addLog(e,"warn",n,r.randomId);var o=null===(i=r.config.logger)||void 0===i?void 0:i.warn;o&&o("["+n+"] "+e)},error:function(e,n){var i;t.appendLogString("ERROR - "+(new Date).toISOString()+" - {"+r.randomId+"}["+n+"] "+e+"\n"),t.trackLogger.addLog(e,"error",n,r.randomId);var o=null===(i=r.config.logger)||void 0===i?void 0:i.error;o&&o("["+n+"] "+e)}},r.logger.info("new slide with clientId: "+r.config.clientId+", version: "+r.version,r.taskId),r.tracker({name:"initSlide",result:"",reason:"",payload:{taskId:r.taskId}}),r.anchor=r.config.anchor,r.syncQueue=new __(r.receiveSyncHandler),r.lock=new w_("interactive"===r.mode),r.cacheImage.style.position="absolute",r.cacheImage.style.zIndex="100",r.setMedianControllerAttribute(),r.canvasContainer.style.position="relative",r.canvasContainer.style.fontSize="0",r.canvasContainer.appendChild(r.medianController),r.frame.appendChild(r.canvasContainer),r.frameResizeObserver.observe(r.frame),r.on(L_.syncReceive,(function(e){r.lock.unlock(e.type,e.uuid),r.syncQueue.addTask(e)})),r.renderingTaskManager.eventHub.on("task-error",(function(e){var t=e.error,n=e.task,i=rv.transform(t);i.errorType===Jp.RuntimeWarn?r.logger.warn(i.message,r.taskId):r.logger.error(i.message,r.taskId),r.isLoading=!1,r.reportError(i,n.slideIndex)})),window.addEventListener("__slide_ref__",r.handleSlideRef),r.resizeView=Eb()(r.resizeView.bind(r),50),r.player=r.initPlayer(r.config),r.config.controller&&r.createController(),r.player.view&&r.canvasContainer.appendChild(r.player.view),r.handleViewClick=Eb()(r.handleViewClick,300),r.player.errorChannel.on("error",(function(e,t){var n=rv.transform(e);n.errorType===Jp.RuntimeWarn?r.logger.warn(n.message,r.taskId):r.logger.error(n.message,r.taskId),r.isLoading=!1,r.reportError(e,t),r.tracker({name:"slideError",reason:n.errorMsg,result:"",payload:{code:n.errorType}})})),window.addEventListener("message",r.recoverHandler),t.volumeAdjuster.on("update",r._updateVolumeByStaticAdjuster),r.volumeAdjuster.volume=t.volumeAdjuster.volume,r}var n,r;return C_(t,e),t.flushLog=function(e){return void 0===e&&(e=!1),k_(this,void 0,void 0,(function(){return D_(this,(function(n){switch(n.label){case 0:if(!(t._tempLog.length>131072||e&&t._tempLog.length>0))return[3,5];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,null==U_?void 0:U_.setItem("run_time_log_"+t._tempLogIndex,t._tempLog)];case 2:case 3:return n.sent(),[3,4];case 4:t._tempLog="",t._tempLogIndex+=1,n.label=5;case 5:return[2]}}))}))},t.stopRemoteLog=function(){t.remoteLogAddress=null},t.startRemoteLog=function(e){return k_(this,void 0,void 0,(function(){var n,r,i,o,a;return D_(this,(function(s){switch(s.label){case 0:return t.remoteLogAddress=e,[4,t.flushLog(!0)];case 1:if(s.sent(),!U_)return[3,13];n=[],s.label=2;case 2:return s.trys.push([2,4,,5]),[4,U_.keys()];case 3:return n=(s.sent()||[]).sort((function(e,t){return parseInt(e.replace("run_time_log_",""))-parseInt(t.replace("run_time_log_",""))})),[3,5];case 4:return s.sent(),[3,5];case 5:r=0,i=n,s.label=6;case 6:if(!(r0&&o>0){var a=this.frameWidth/i,s=a*o;s>this.frameHeight&&(a*=this.frameHeight/s),null===(t=this.player)||void 0===t||t.scaleView(a,this.resize,e),this.cacheImage.style.transform="scale("+a+")",this.medianController.style.transform="scale("+a+")",this.medianController.setAttribute("data-scale",a.toString()),this.isInitResized||(this.isInitResized=!0,null===(n=this.player)||void 0===n||n.clock.setTimeout((function(){r.frame.style.visibility="visible"}),32))}},t.prototype.setSlideState=function(e){var t,n,r;return k_(this,void 0,void 0,(function(){var i,o=this;return D_(this,(function(a){switch(a.label){case 0:return this.isSyncingSlideState=!0,this.logger.info("stateChange receive "+JSON.stringify(e),this.taskId),e.taskId&&e.taskId!==this.__slideState.taskId&&(this.__slideState.taskId=e.taskId,null===(t=this.player)||void 0===t||t.setResourceData(e.taskId,this.__slideState.url)),e.url&&e.url!==this.__slideState.url&&(this.__slideState.url=e.url,null===(n=this.player)||void 0===n||n.setResourceData(this.__slideState.taskId,e.url)),Number.isInteger(e.currentSlideIndex)&&e.currentSlideIndex!==this.__slideState.currentSlideIndex?(this.__slideState.currentSlideIndex=e.currentSlideIndex,[4,this.doRenderSlide(e.currentSlideIndex)]):[3,2];case 1:a.sent(),a.label=2;case 2:return[4,null===(r=this.player)||void 0===r?void 0:r.clock.waitUntil((function(){var t,n;return(null===(t=o.player)||void 0===t?void 0:t.currentIndex)===e.currentSlideIndex&&(null===(n=o.player)||void 0===n?void 0:n.currentStage)}),3e3)];case 3:return a.sent(),i=!1,Number.isInteger(e.mainSeqStep)&&e.mainSeqStep!==this.__slideState.mainSeqStep&&(i=!0,this.__slideState.mainSeqStep=e.mainSeqStep),e.mainSeqState&&e.mainSeqState!==this.__slideState.mainSeqState&&(i=!0,this.__slideState.mainSeqState=e.mainSeqState),i&&this.setMainSeqStep(this.__slideState.mainSeqStep,"idle"===this.__slideState.mainSeqState?"start":"end"),e.interactiveSeqState&&(this.initInteractiveSeq(e),this.__slideState.interactiveSeqState=e.interactiveSeqState),[4,O_(1500)];case 4:return a.sent(),e.mediaState&&(this.initMedia(e),this.__slideState.mediaState=e.mediaState),this.isSyncingSlideState=!1,[2]}}))}))},t.prototype.initInteractiveSeq=function(e){var t;for(var n in e.interactiveSeqState){var r=e.interactiveSeqState[n];null===(t=this.player)||void 0===t||t.setInteractiveSeqState(n,r.step,"idle"===r.state?"start":"end")}},t.prototype.initMedia=function(e){var t,n,r;for(var i in e.mediaState){var o=e.mediaState[i],a=this.__slideState.mediaState[i];if(null===(t=this.player)||void 0===t||t.syncFullscreenVideoState({targetId:i,state:!!o.fullscreen,slideIndex:this.slideState.currentSlideIndex}),!a||o.type!==a.type||o.time!==a.time)if("play"===o.type){var s=(this.timestamp()-o.time)/1e3;null===(n=this.player)||void 0===n||n.setMediaState(i,!0,s)}else null===(r=this.player)||void 0===r||r.setMediaState(i,!1,o.time)}},Object.defineProperty(t.prototype,"slideCount",{get:function(){return this._slideCount},enumerable:!1,configurable:!0}),t.prototype.getSizeAsync=function(){return k_(this,void 0,void 0,(function(){var e;return D_(this,(function(t){switch(t.label){case 0:if(this.width>0&&this.height>0)return[2,[this.width,this.height]];t.label=1;case 1:return t.trys.push([1,4,,5]),[4,fetch(this.__slideState.url+"/"+this.__slideState.taskId+"/jsonOutput/slide-1.json")];case 2:return[4,t.sent().json()];case 3:return[2,[(e=t.sent()).width,e.height]];case 4:return t.sent(),[2,[0,0]];case 5:return[2]}}))}))},t.prototype.getSlideCountAsync=function(){return k_(this,void 0,void 0,(function(){return D_(this,(function(e){switch(e.label){case 0:if(this._slideCount>0)return[2,this._slideCount];e.label=1;case 1:return e.trys.push([1,4,,5]),[4,fetch(this.__slideState.url+"/"+this.__slideState.taskId+"/jsonOutput/slide-1.json")];case 2:return[4,e.sent().json()];case 3:return[2,e.sent().slideCount];case 4:return e.sent(),[2,0];case 5:return[2]}}))}))},Object.defineProperty(t.prototype,"slideState",{get:function(){return this.__slideState.mainSeqState=this.mainSeqState,this.__slideState.mainSeqStep=this.mainSeqStep,JSON.parse(JSON.stringify(this.__slideState))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mainSeqLength",{get:function(){var e;return(null===(e=this.player)||void 0===e?void 0:e.mainSeqLength())||0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mainSeqStep",{get:function(){var e;return(null===(e=this.player)||void 0===e?void 0:e.mainSeqStep())||0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mainSeqState",{get:function(){var e;return(null===(e=this.player)||void 0===e?void 0:e.mainSeqState())||null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderOptions",{get:function(){var e;return(null===(e=this.player)||void 0===e?void 0:e.config)||null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"drawCall",{get:function(){var e;return(null===(e=this.player)||void 0===e?void 0:e.runtime.drawCall)||0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderFps",{get:function(){var e;return(null===(e=this.player)||void 0===e?void 0:e.runtime.fps)||0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"runtimeFps",{get:function(){var e;return(null===(e=this.player)||void 0===e?void 0:e.fps.value)||0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"view",{get:function(){var e;return(null===(e=this.player)||void 0===e?void 0:e.view)||null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.designWidth},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.designHeight},enumerable:!1,configurable:!0}),t.prototype.updateRenderOption=function(e){this.player&&(this.player.updateConfig(e),this.renderOptions&&(this.config.renderOptions=this.renderOptions))},t.prototype.setResource=function(e,t){var n;this.taskId=e,null===(n=this.player)||void 0===n||n.setResourceData(e,t),this.__slideState.taskId=e,this.__slideState.url=t,this.emitSyncDispatch({slideIndex:this.__slideState.currentSlideIndex,type:"setResource",taskId:e,url:t})},t.prototype._renderSlide=function(e){var t;return k_(this,void 0,void 0,(function(){var n=this;return D_(this,(function(r){switch(r.label){case 0:return this.renderingIndex=e,this.player&&e===this.player.currentIndex?[2]:((xb.platform.isIOS()||xb.platform.isAndroid())&&this.iosResetCache.indexOf(e)<0&&this.iosResetCache.push(e),[4,null===(t=this.player)||void 0===t?void 0:t.renderSlide(e)]);case 1:return r.sent(),this.__slideState.currentSlideIndex=e,this.resizeView(),this.__slideState.interactiveSeqState={},this.__slideState.mediaState={},this.emitStateChange(),setTimeout((function(){var e,t;if("hidden"===(null===(t=null===(e=n.player)||void 0===e?void 0:e.view)||void 0===t?void 0:t.style.visibility)&&(n.player.view.style.visibility="visible"),"hidden"===n.frame.style.visibility&&(n.frame.style.visibility="visible"),n.needClearCacheImage)try{n.frame.removeChild(n.cacheImage)}catch(e){}}),100),[2]}}))}))},t.prototype.renderSlide=function(e,t){if(void 0===t&&(t=!0),this.player){var n=Number(e);(n!==this.player.currentIndex||this.renderingTaskManager.hasStartTask())&&(n>this.slideCount&&this.slideCount>0||this.poseRenderSlide(n,t))}},t.prototype.needCreateNewPlayer=function(){var e=xb.platform.isLowGpuMemory()?15:30;return(xb.platform.isIOS()||xb.platform.isAndroid())&&this.iosResetCache.length>e},t.prototype.poseRenderSlide=function(e,t){"interactive"===this.mode?this.emitSyncDispatch({slideIndex:this.__slideState.currentSlideIndex,type:"renderSlide",index:e,isForward:t}):"sync"===this.mode?(this.doRenderSlide(e,t),this.emitSyncDispatch({slideIndex:this.__slideState.currentSlideIndex,type:"renderSlide",index:e,isForward:t})):this.doRenderSlide(e,t)},t.prototype.doRenderSlide=function(e,t){var n,r,i,o=this;if(void 0===t&&(t=!0),!this.player)return Promise.resolve();if(this.needCreateNewPlayer()&&(this.iosResetCache=[],this.iosNewPlayer=this.initPlayer(this.config),this.iosNewPlayer.setResourceData(this.__slideState.taskId,this.__slideState.url)),this.iosNewPlayer){var a=this.player.getSnapshot();this.cacheImage.src=a,this.frame.appendChild(this.cacheImage),this.player.destroy(),null===(n=this.playerController)||void 0===n||n.destroy(),this.player=this.iosNewPlayer,this.iosNewPlayer=void 0,(null===(r=this.config)||void 0===r?void 0:r.controller)&&this.createController(),this.needClearCacheImage=!0,(null===(i=null==this?void 0:this.player)||void 0===i?void 0:i.view)&&(this.player.view.style.visibility="hidden",this.canvasContainer.appendChild(this.player.view))}var s=Math.random().toString(32).substr(2);return this.player.isForward=t,this.renderingTaskManager.addTask((function(){return o._renderSlide(e)}),e,s),new Promise((function(e){o.renderingTaskManager.eventHub.once("task-end-"+s,e)}))},t.prototype.getSnapshot=function(){var e,t;return null!==(t=null===(e=this.player)||void 0===e?void 0:e.getSnapshot())&&void 0!==t?t:null},t.prototype.nextStep=function(){!this.isLoading&&this.player&&this.interactive?(this.hasNextStep()||this.emit(L_.slideStepEnd),this.player.mainSeqHasNextStep()?"interactive"===this.mode?this.emitSyncDispatch({slideIndex:this.__slideState.currentSlideIndex,type:"nextStep",next:this.player.mainSeqStep()+1}):"sync"===this.mode?(this.doNextStep(!1,""),this.emitSyncDispatch({slideIndex:this.__slideState.currentSlideIndex,type:"nextStep",next:this.player.mainSeqStep()})):this.doNextStep(!1,""):this.handleNextSlide()):this.logger.info("prevent nextStep. isLoading: "+this.isLoading+", player: "+!!this.player+", interactive: "+this.interactive,this.taskId)},t.prototype.doNextStep=function(e,t){if(this.player){var n=!this.config.clientId||t===this.config.clientId;this.player.nextStep(e,n);var r=this.player.mainSeqStep();this.__slideState.mainSeqStep=r,this.emitStateChange()}},t.prototype.prevStep=function(){!this.isLoading&&this.player&&this.interactive?(this.hasPrevStep()||this.emit(L_.slideStepStart),this.player.mainSeqHasPrevStep()?"interactive"===this.mode?this.emitSyncDispatch({type:"prevStep",slideIndex:this.__slideState.currentSlideIndex,next:this.player.mainSeqStep()-1}):"sync"===this.mode?(this.doPrevStep(),this.emitSyncDispatch({slideIndex:this.__slideState.currentSlideIndex,type:"prevStep",next:this.player.mainSeqStep()})):this.doPrevStep():this.handlePrevSlide()):this.logger.info("prevent nextStep. isLoading: "+this.isLoading+", player: "+this.player+", interactive: "+this.interactive,this.taskId)},t.prototype.doPrevStep=function(e){if(void 0===e&&(e=!1),this.player){this.player.prevStep(e);var t=this.player.mainSeqStep();this.__slideState.mainSeqStep=t,this.emitStateChange()}},t.prototype.isSlideStateReady=function(e){return e.taskId.length>0&&e.url.length>0&&e.currentSlideIndex>0},t.prototype.emitStateChange=function(){if("local"!==this.mode&&!this.isSyncingSlideState){var e=this.slideState;!Mb()(this.lastEmitedState,e)&&this.isSlideStateReady(e)&&(this.lastEmitedState=e,this.emit(L_.stateChange,e),this.logger.info("stateChange dispatch "+JSON.stringify(this.slideState),this.taskId))}},t.prototype.emitSyncDispatch=function(e){if(!this.lock.isLocked(e.type)){var t=Math.random().toString(32).substr(2);this.lock.addLock(e.type,t);var n=N_(N_({},e),{uuid:t,clientId:this.config.clientId});"sync"===this.config.mode&&(n.incrId=this.dispatchIncrId),this.emit(L_.syncDispatch,n),this.logger.info("sync dispatch "+JSON.stringify(n),this.taskId)}},t.prototype.setMainSeqStep=function(e,t){var n;null===(n=this.player)||void 0===n||n.setMainSeqStep(e,t)},t.prototype.setInteractive=function(e){var t;this.interactive=e,null===(t=this.player)||void 0===t||t.setInteractive(e)},t.prototype.pause=function(){var e;null===(e=this.player)||void 0===e||e.pause()},t.prototype.resume=function(){var e;null===(e=this.player)||void 0===e||e.resume()},t.prototype._doFrozen=function(){var e;return k_(this,void 0,void 0,(function(){var t,n,r,i=this;return D_(this,(function(o){switch(o.label){case 0:return this.logger.info("frozen with player["+!!this.player+"]",this.taskId),this.tracker({name:"frozenSlide",reason:"",result:"",payload:{taskId:this.taskId}}),this.view&&this.player?[4,this.player.clock.waitUntil((function(){return!i.isLoading}),6e4)]:[3,2];case 1:for(n in o.sent(),t=this.player.getSnapshot()||"",this.cacheImage.src=t,this.frame.appendChild(this.cacheImage),this.player.destroy(),null===(e=this.playerController)||void 0===e||e.destroy(),this.player=void 0,this.__slideState.mediaState)r=this.__slideState.mediaState[n],this.__slideState.mediaState[n]=N_(N_({},r),{frozenTime:this.timestamp()});o.label=2;case 2:return[2]}}))}))},t.prototype.frozen=function(){var e=this;this.frozenTaskManager.addTask("frozen",(function(){return e._doFrozen()}))},t.prototype._doRelease=function(){var e,t;return k_(this,void 0,void 0,(function(){var n,r,i,o;return D_(this,(function(a){switch(a.label){case 0:if(this.logger.info("do release slide",this.taskId),this.tracker({name:"releaseSlide",reason:"",result:"",payload:{taskId:this.taskId}}),this.player)return[2];for(r in this.player=this.initPlayer(this.config),(null===(e=this.config)||void 0===e?void 0:e.controller)&&this.createController(),this.player.view&&(this.canvasContainer.appendChild(this.player.view),this.player.view.style.visibility="hidden"),n=this.__slideState,this.__slideState=Ib()(j_),n.mediaState)"play"===(i=n.mediaState[r]).type&&(o=Math.max(null!==(t=i.frozenTime)&&void 0!==t?t:0,i.time),i.time=this.timestamp()-(o-i.time),i.frozenTime=void 0);return[4,this.setSlideState(n)];case 1:return a.sent(),[4,this.player.clock.delay(333)];case 2:a.sent(),this.player.view&&(this.player.view.style.visibility="visible");try{this.frame.removeChild(this.cacheImage)}catch(e){}return[2]}}))}))},t.prototype.release=function(){var e=this;this.frozenTaskManager.addTask("release",(function(){return e._doRelease()}))},t.prototype._doDestroy=function(){var e,n,r,i,o=this;this.logger.info("do destroy slide",this.taskId),this.tracker({name:"destroySlide",reason:"",result:"",payload:{taskId:this.taskId}});var a=t.instances.findIndex((function(e){return e.randomId===o.randomId}));a>=0&&t.instances.splice(a,1),this.playerController&&this.playerController.destroy(),this.frameResizeObserver.disconnect(),null===(e=this.player)||void 0===e||e.removeAllListeners(),null===(n=this.player)||void 0===n||n.destroy(),null===(r=this.player)||void 0===r||r.removeAllListeners(),this.logger={warn:function(){return{}},info:function(){return{}},error:function(){return{}}},this.syncQueue.destroy(),this.renderingTaskManager.destroy(),this.frozenTaskManager.destroy(),window.removeEventListener("__slide_ref__",this.handleSlideRef),window.removeEventListener("message",this.recoverHandler),this.removeAllListeners();try{(null===(i=this.player)||void 0===i?void 0:i.view)&&this.anchor.removeChild(this.player.view),this.anchor.removeChild(this.frame)}catch(e){}t.volumeAdjuster.off("update",this._updateVolumeByStaticAdjuster)},t.prototype.waitLoadEnd=function(){return k_(this,void 0,void 0,(function(){var e;return D_(this,(function(t){switch(t.label){case 0:e=0,t.label=1;case 1:return this.isLoading&&e<10?[4,O_(100)]:[3,3];case 2:return t.sent(),e+=1,[3,1];case 3:return[2]}}))}))},t.prototype.preload=function(e){return this.player?this.player.preload(e):Promise.resolve()},t.prototype.destroy=function(){var e=this;this.logger.info("pre destroy slide",""),this.isLoading?this.waitLoadEnd().then((function(){e._doDestroy()})):this._doDestroy()},t.prototype.clearSlideCache=function(){var e;null===(e=this.player)||void 0===e||e.clearLocalCache()},t.prototype.hasNextStep=function(){if(!this.player)return!1;var e=this.player.currentIndex===this.slideCount,t=0===this.mainSeqLength||this.mainSeqStep>=this.mainSeqLength-1,n="end"===this.mainSeqState||"running"===this.mainSeqState||null==this.mainSeqState;return!(e&&t&&n)},t.prototype.hasPrevStep=function(){if(!this.player)return!1;var e=1===this.player.currentIndex,t=0===this.mainSeqLength||0===this.mainSeqStep,n="idle"===this.mainSeqState||null===this.mainSeqState;return!(e&&t&&n)},t.prototype.snapshot=function(){return k_(this,void 0,void 0,(function(){return D_(this,(function(e){return this.player?[2,this.player.getSnapshot()]:[2,null]}))}))},t.prototype.snapshotWithTimingEnd=function(e){return k_(this,void 0,void 0,(function(){return D_(this,(function(t){return this.player?[2,this.player.snapshotWithTimingEnd(e)]:[2,null]}))}))},t.prototype.updateGlobalVolume=function(e){this.volumeAdjuster.volume=e},t.prototype.getGlobalVolume=function(){return this.volumeAdjuster.volume},t.clearLocalCache=function(){xb.clearLocalCache()},t.disposeLocalCache=function(){},n=t,t.preloadResource=A_,t.instances=[],t._tempFrozenIds=[],t._tempLog="",t._tempLogIndex=1,t.remoteLogAddress=null,t.usePlugin=function(e){var n,r;e.context({logger:{info:function(e){t.appendLogString("INFO - "+(new Date).toISOString()+" - "+e+"\n")},warn:function(e){t.appendLogString("WARN - "+(new Date).toISOString()+" - "+e+"\n")},error:function(e){t.appendLogString("ERROR - "+(new Date).toISOString()+" - "+e+"\n")}}}),n=e,(r=wb.get(n.hookPoint)||[]).push(n),wb.set(n.hookPoint,r)},t.volumeAdjuster=new mb,t.trackLogger=new E_,t.handleFrozenAllSlide=function(){t.instances.forEach((function(e){e.player&&(t._tempFrozenIds.push(e.randomId),e.frozen())}))},t.handleReleaseAllSlide=function(){t._tempFrozenIds.forEach((function(e){var n=t.instances.find((function(t){return t.randomId===e}));n&&n.release()})),t._tempFrozenIds=[]},t.handleLogReport=function(e){return k_(void 0,void 0,void 0,(function(){var r,i,o,a,s,u;return D_(n,(function(n){switch(n.label){case 0:return[4,t.flushLog(!0)];case 1:if(n.sent(),!U_)return[3,12];r=[],n.label=2;case 2:return n.trys.push([2,4,,5]),[4,U_.keys()];case 3:return r=(n.sent()||[]).sort((function(e,t){return parseInt(e.replace("run_time_log_",""))-parseInt(t.replace("run_time_log_",""))})),[3,5];case 4:return n.sent(),[3,5];case 5:if(0===r.length)return window.postMessage({type:"@slide/_report_log_",log:"",index:1,total:1,customMessage:"@slide/_report_log_",sessionId:e},"*"),[2];i=0,o=r,n.label=6;case 6:if(!(i=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);o>3&&a&&Object.defineProperty(t,n,a)}([(r="Slide.initConfig",function(e,t,n){var i=n.value;n.value=function(){for(var e=[],t=0;t1&&void 0!==arguments[1]?arguments[1]:this.genUID();return this.flush(t),this.disposers.set(t,Array.isArray(e)?F(e):e),t}},{key:"add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.genUID(),n=e();return n?this.addDisposer(n,t):t}},{key:"addEventListener",value:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.genUID();return e.addEventListener(t,n,r),this.addDisposer((function(){return e.removeEventListener(t,n,r)}),i),i}},{key:"setTimeout",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.genUID(),i=window.setTimeout((function(){n.remove(r),e()}),t);return this.addDisposer((function(){return window.clearTimeout(i)}),r)}},{key:"setInterval",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.genUID(),r=window.setInterval(e,t);return this.addDisposer((function(){return window.clearInterval(r)}),n)}},{key:"remove",value:function(e){var t=this.disposers.get(e);return this.disposers.delete(e),t}},{key:"flush",value:function(e){var t=this.remove(e);t&&t()}},{key:"flushAll",value:function(){this.disposers.forEach(U),this.disposers.clear()}},{key:"genUID",value:function(){var e;do{e=B()}while(this.disposers.has(e));return e}}]),e}();function F(e){return function(){return e.forEach(U)}}function G(e,t,n){return Math.min(Math.max(e,t),n)}var H={exports:{}},V={exports:{}},W=function(e){return!(!e||"string"==typeof e)&&(e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&"String"!==e.constructor.name))},Y=Array.prototype.concat,X=Array.prototype.slice,Q=V.exports=function(e){for(var t=[],n=0,r=e.length;n=4&&1!==e[3]&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"},ee.to.keyword=function(e){return K[e.slice(0,3)]};var re=H.exports,ie=function(){function e(t){var n=this;_(this,e),this.enable=t,this.apps={},this.level="debug",this.roomLogger=null,this._onMessage=function(e){var t,r;e instanceof CustomEvent?t=e.detail:"object"===M(r=e.data)&&null!==r&&(t=e.data),t&&("boolean"==typeof t.slide?n.enable=t.slide:"__instance"===t.slide?console.log(n):"__debug"===t.slide&&Object.values(n.apps).forEach((function(e){var t,n;null==(n=null==(t=e.controller)?void 0:t.slide)||n.createController()})))},this.initialize()}return T(e,[{key:"setAppContext",value:function(e,t){var n;((n=this.apps)[e]||(n[e]={})).context=t,this.log("[Slide] new ".concat(e))}},{key:"setAppController",value:function(e,t){var n;((n=this.apps)[e]||(n[e]={})).controller=t}},{key:"deleteApp",value:function(e){delete this.apps[e],this.log("[Slide] delete ".concat(e))}},{key:"initialize",value:function(){window.addEventListener("message",this._onMessage)}},{key:"dispose",value:function(){window.removeEventListener("message",this._onMessage)}},{key:"log",value:function(){var e;if(this.roomLogger)(e=this.roomLogger).info.apply(e,arguments);else if(this.enable){var t;(t=console).log.apply(t,arguments)}}},{key:"verbose",value:function(){var e;if(this.roomLogger)(e=this.roomLogger).debug.apply(e,arguments);else if(this.enable&&"verbose"===this.level){var t;(t=console).log.apply(t,arguments)}}},{key:"warn",value:function(){var e,t;this.roomLogger?(e=this.roomLogger).warn.apply(e,arguments):(t=console).warn.apply(t,arguments)}}]),e}(),oe=new ie(!1),ae=oe.log.bind(oe),se=oe.verbose.bind(oe);function ue(e){try{var t=window.getComputedStyle(e).backgroundColor;if("rgba(0, 0, 0, 0)"!==t&&"transparent"!==t)return t;if(e.parentElement)return ue(e.parentElement)}catch(e){}return"#ffffff"}var le="";function ce(e){return le||(le=function(e){var t=re.get(e);if(t&&"rgb"===t.model){var n=t.value,r=(((255&Math.round(n[0]))<<16)+((255&Math.round(n[1]))<<8)+(255&Math.round(n[2]))).toString(16);return"#"+"000000".substring(r.length)+r}return e}(ue(e)),ae("[Slide] guess bg color",le)),le}var he=function(e){return e.tracker};function de(e){for(var t=e.width,n=e.height,r=e.slideCount,i=e.slideState,o=i.taskId,a=i.url,s=[],u=1;u<=r;++u)s.push({width:t,height:n,thumbnail:"".concat(a,"/").concat(o,"/preview/").concat(u,".png"),src:"ppt"});return s}function fe(e,t,n,r){var i,o=n.slideState.currentSlideIndex;if(o>0&&t.getIsWritable()){var a=[r,o].join("/");if("page"!==e.scenePathType(a)){e.removeScenes(r);for(var s=n.slideCount,u=[],l=1;l<=s;++l)u.push({name:"".concat(l)});e.putScenes(r,u)}(t.getBox().focus?e.state.sceneState.scenePath:(null==(i=t.getView())?void 0:i.focusScenePath)||"")!==a&&t.setScenePath(a)}}var pe="https://convertcdn.netless.link/dynamicConvert";t.DefaultUrl=pe;var ve={taskId:"",url:"",state:null},me=function(){function e(t){var n,r=this,i=t.context,o=t.anchor,a=t.onRenderStart,s=t.onPageChanged,u=t.onTransitionStart,c=t.onTransitionEnd,h=t.onError,d=t.onRenderError,f=t.showRenderError;_(this,e),this.sideEffect=new z,this.ready=!1,this.readyPromise=new Promise((function(e){r.resolveReady=function(){r.ready?ae("[Slide] render end"):setTimeout((function(){r.ready=!0,e()}),1e3)}})),this.onSyncDispatch=function(e){if(r.context.getIsWritable()&&r.room){var t={type:L.SLIDE_EVENTS.syncDispatch,payload:e};se("[Slide] dispatch",JSON.stringify(e)),r.context.dispatchMagixEvent(L.SLIDE_EVENTS.syncDispatch,t)}},this.magixEventListener=function(e){var t=e.payload,n=t.type,i=t.payload;n===L.SLIDE_EVENTS.syncDispatch&&(r.syncStateOnce(),se("[Slide] receive",JSON.stringify(i)),r.slide.emit(L.SLIDE_EVENTS.syncReceive,i))},this.onStateChange=function(e){r.context.getIsWritable()&&(se("[Slide] state change",JSON.stringify(e,null,2)),r.context.storage.setState({state:e}))},this.pollCount=0,this.pollReadyState=function(){r.ready?1===r._toFreeze?r.freeze():-1===r._toFreeze&&r.unfreeze():r.pollCount<40?(r.pollCount++,setTimeout(r.pollReadyState,500)):(r.pollCount=0,ae("[Slide] renderSlide 1 (retry after timeout)"),r.slide.renderSlide(1))},this._pageCount=0,this.destroyed=!1,this.timestamp=function(){return r.room&&r.room.calibrationTimestamp?r.room.calibrationTimestamp:r.player?r.player.beginTimestamp+r.player.progressTime:Date.now()},this.isFrozen=!1,this._toFreeze=0,this.freeze=function(){r.isFrozen=!0,r.ready?(ae("[Slide] freeze",r.context.appId),r.slide.frozen()):r._toFreeze=1},this.unfreeze=l(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.visible){e.next=2;break}return e.abrupt("return");case 2:r.isFrozen=!1,r.ready?(ae("[Slide] unfreeze",r.context.appId),r.slide.release()):r._toFreeze=-1;case 4:case"end":return e.stop()}}),e)}))),this.onVisibilityChange=l(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(r.visible="visible"===document.visibilityState)?(ae("[Slide] unfreeze because tab becomes visible",{savedIsFrozen:r.savedIsFrozen}),r.savedIsFrozen||r.unfreeze()):(r.savedIsFrozen=r.isFrozen,ae("[Slide] freeze because tab becomes invisible"),r.freeze());case 1:case"end":return e.stop()}}),e)}))),this.onRenderStart=a,this.onPageChanged=s,this.onTransitionStart=u,this.onTransitionEnd=c,this.onError=h,this.onRenderError=d,this.showRenderError=null==f||f,this.context=i,this.room=i.getRoom(),this.player=this.room?void 0:i.getDisplayer(),n=this.room||this.player,oe.roomLogger=n.logger,this.slide=this.createSlide(o,{whiteTracker:he(i.getDisplayer())}),this.syncStateOnceFlag=!this.context.isAddApp,this.visible="visible"===document.visibilityState,this.savedIsFrozen=!1,this.initialize()}return T(e,[{key:"jumpToPage",value:function(e){this.ready&&(e=G(e,1,this.pageCount),this.slide.renderSlide(e))}},{key:"initialize",value:function(){this.registerEventListeners(),this.kickStart()}},{key:"kickStart",value:function(){var e=this.context,t=this.slide;e.getIsWritable()&&e.storage.ensureState(ve);var n=e.storage.state,r=n.taskId,i=n.url,o=n.state;t.setResource(r,i||pe),o?(ae("[Slide] init with state",JSON.stringify(o)),this.syncStateOnceFlag=!1,t.setSlideState(o)):e.isAddApp&&(ae("[Slide] init by renderSlide",1),t.renderSlide(1)),this.pollReadyState()}},{key:"registerEventListeners",value:function(){var e=this,t=this.context,n=this.slide,r=this.sideEffect.addDisposer(t.storage.addStateChangedListener((function(){t.storage.state.state&&(e.syncStateOnce(),e.sideEffect.flush(r))})));this.sideEffect.add((function(){return t.addMagixEventListener(L.SLIDE_EVENTS.syncDispatch,e.magixEventListener,{fireSelfEventAfterCommit:!0})})),n.on(L.SLIDE_EVENTS.renderStart,this.onRenderStart),n.on(L.SLIDE_EVENTS.slideChange,this.onPageChanged),n.on(L.SLIDE_EVENTS.renderEnd,this.onTransitionEnd),n.on(L.SLIDE_EVENTS.mainSeqStepStart,this.onTransitionStart),n.on(L.SLIDE_EVENTS.mainSeqStepEnd,this.onTransitionEnd),n.on(L.SLIDE_EVENTS.renderError,this.onError),n.on(L.SLIDE_EVENTS.stateChange,this.onStateChange),n.on(L.SLIDE_EVENTS.syncDispatch,this.onSyncDispatch),n.on(L.SLIDE_EVENTS.renderEnd,this.resolveReady),this.sideEffect.add((function(){return document.addEventListener("visibilitychange",e.onVisibilityChange),function(){return document.removeEventListener("visibilitychange",e.onVisibilityChange)}}))}},{key:"syncStateOnce",value:function(){if(this.syncStateOnceFlag){this.context.getIsWritable()&&this.context.storage.ensureState(ve);var e=this.context.storage.state.state;e&&(ae("[Slide] sync with state (once)",JSON.stringify(e)),this.slide.setSlideState(e),this.syncStateOnceFlag=!1)}}},{key:"createSlide",value:function(e){var t,n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=this.context.getAppOptions()||{},a=new L.Slide({anchor:e,interactive:!0,mode:"interactive",controller:oe.enable,enableGlobalClick:null==(t=o.enableGlobalClick)||t,renderOptions:{minFPS:o.minFPS||25,maxFPS:o.maxFPS||30,autoFPS:null==(n=o.autoFPS)||n,autoResolution:null==(r=o.autoResolution)||r,resolution:o.resolution,transactionBgColor:o.bgColor||ce(e),maxResolutionLevel:o.maxResolutionLevel,forceCanvas:o.forceCanvas,enableNvidiaDetect:o.enableNvidiaDetect},fixedFrameSize:o.fixedFrameSize,loaderDelegate:o.loaderDelegate,navigatorDelegate:o.navigatorDelegate,urlInterrupter:o.urlInterrupter,resourceTimeout:o.resourceTimeout,rtcAudio:o.rtcAudio,useLocalCache:o.useLocalCache,logger:o.logger,whiteTracker:i.whiteTracker,timestamp:this.timestamp});return a}},{key:"destroy",value:function(){this.sideEffect.flushAll(),this.destroyed||(ae("[Slide] destroy slide (once)"),this.slide.destroy(),this.destroyed=!0)}},{key:"pageCount",get:function(){return this._pageCount>0||(this._pageCount=this.slide.slideCount),this._pageCount}},{key:"page",get:function(){return this.slide.slideState.currentSlideIndex}}]),e}();var ge="undefined"!=typeof window,ye=ge&&!("onscroll"in window)||"undefined"!=typeof navigator&&/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),be=ge&&"IntersectionObserver"in window,xe=ge&&"classList"in document.createElement("p"),_e=ge&&window.devicePixelRatio>1,we={elements_selector:".lazy",container:ye||ge?document:null,threshold:300,thresholds:null,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",data_bg:"bg",data_bg_hidpi:"bg-hidpi",data_bg_multi:"bg-multi",data_bg_multi_hidpi:"bg-multi-hidpi",data_bg_set:"bg-set",data_poster:"poster",class_applied:"applied",class_loading:"loading",class_loaded:"loaded",class_error:"error",class_entered:"entered",class_exited:"exited",unobserve_completed:!0,unobserve_entered:!1,cancel_on_exit:!0,callback_enter:null,callback_exit:null,callback_applied:null,callback_loading:null,callback_loaded:null,callback_error:null,callback_finish:null,callback_cancel:null,use_native:!1,restore_on_error:!1},Te=function(e){return Object.assign({},we,e)},Me=function(e,t){var n,r="LazyLoad::Initialized",i=new e(t);try{n=new CustomEvent(r,{detail:{instance:i}})}catch(e){(n=document.createEvent("CustomEvent")).initCustomEvent(r,!1,!1,{instance:i})}window.dispatchEvent(n)},Se="src",Ee="srcset",Ae="sizes",Ie="poster",Ce="llOriginalAttrs",Ne="data",ke="loading",De="loaded",Pe="applied",Oe="error",Re="native",Le="data-",je="ll-status",Be=function(e,t){return e.getAttribute(Le+t)},Ue=function(e){return Be(e,je)},ze=function(e,t){return function(e,t,n){var r=Le+t;null!==n?e.setAttribute(r,n):e.removeAttribute(r)}(e,je,t)},Fe=function(e){return ze(e,null)},Ge=function(e){return null===Ue(e)},He=function(e){return Ue(e)===Re},Ve=[ke,De,Pe,Oe],We=function(e,t,n,r){e&&(void 0===r?void 0===n?e(t):e(t,n):e(t,n,r))},Ye=function(e,t){xe?e.classList.add(t):e.className+=(e.className?" ":"")+t},Xe=function(e,t){xe?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\s+)"+t+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,"")},Qe=function(e){return e.llTempImage},Ze=function(e,t){if(t){var n=t._observer;n&&n.unobserve(e)}},qe=function(e,t){e&&(e.loadingCount+=t)},Je=function(e,t){e&&(e.toLoadCount=t)},Ke=function(e){for(var t,n=[],r=0;t=e.children[r];r+=1)"SOURCE"===t.tagName&&n.push(t);return n},$e=function(e,t){var n=e.parentNode;n&&"PICTURE"===n.tagName&&Ke(n).forEach(t)},et=function(e,t){Ke(e).forEach(t)},tt=[Se],nt=[Se,Ie],rt=[Se,Ee,Ae],it=[Ne],ot=function(e){return!!e[Ce]},at=function(e){return e[Ce]},st=function(e){return delete e[Ce]},ut=function(e,t){if(!ot(e)){var n={};t.forEach((function(t){n[t]=e.getAttribute(t)})),e[Ce]=n}},lt=function(e,t){if(ot(e)){var n=at(e);t.forEach((function(t){!function(e,t,n){n?e.setAttribute(t,n):e.removeAttribute(t)}(e,t,n[t])}))}},ct=function(e,t,n){Ye(e,t.class_applied),ze(e,Pe),n&&(t.unobserve_completed&&Ze(e,t),We(t.callback_applied,e,n))},ht=function(e,t,n){Ye(e,t.class_loading),ze(e,ke),n&&(qe(n,1),We(t.callback_loading,e,n))},dt=function(e,t,n){n&&e.setAttribute(t,n)},ft=function(e,t){dt(e,Ae,Be(e,t.data_sizes)),dt(e,Ee,Be(e,t.data_srcset)),dt(e,Se,Be(e,t.data_src))},pt={IMG:function(e,t){$e(e,(function(e){ut(e,rt),ft(e,t)})),ut(e,rt),ft(e,t)},IFRAME:function(e,t){ut(e,tt),dt(e,Se,Be(e,t.data_src))},VIDEO:function(e,t){et(e,(function(e){ut(e,tt),dt(e,Se,Be(e,t.data_src))})),ut(e,nt),dt(e,Ie,Be(e,t.data_poster)),dt(e,Se,Be(e,t.data_src)),e.load()},OBJECT:function(e,t){ut(e,it),dt(e,Ne,Be(e,t.data_src))}},vt=["IMG","IFRAME","VIDEO","OBJECT"],mt=function(e,t){!t||function(e){return e.loadingCount>0}(t)||function(e){return e.toLoadCount>0}(t)||We(e.callback_finish,t)},gt=function(e,t,n){e.addEventListener(t,n),e.llEvLisnrs[t]=n},yt=function(e,t,n){e.removeEventListener(t,n)},bt=function(e){return!!e.llEvLisnrs},xt=function(e){if(bt(e)){var t=e.llEvLisnrs;for(var n in t){var r=t[n];yt(e,n,r)}delete e.llEvLisnrs}},_t=function(e,t,n){!function(e){delete e.llTempImage}(e),qe(n,-1),function(e){e&&(e.toLoadCount-=1)}(n),Xe(e,t.class_loading),t.unobserve_completed&&Ze(e,n)},wt=function(e,t,n){var r=Qe(e)||e;if(!bt(r)){!function(e,t,n){bt(e)||(e.llEvLisnrs={});var r="VIDEO"===e.tagName?"loadeddata":"load";gt(e,r,t),gt(e,"error",n)}(r,(function(i){!function(e,t,n,r){var i=He(t);_t(t,n,r),Ye(t,n.class_loaded),ze(t,De),We(n.callback_loaded,t,r),i||mt(n,r)}(0,e,t,n),xt(r)}),(function(i){!function(e,t,n,r){var i=He(t);_t(t,n,r),Ye(t,n.class_error),ze(t,Oe),We(n.callback_error,t,r),n.restore_on_error&<(t,rt),i||mt(n,r)}(0,e,t,n),xt(r)}))}},Tt=function(e,t,n){!function(e){e.llTempImage=document.createElement("IMG")}(e),wt(e,t,n),function(e){ot(e)||(e[Ce]={backgroundImage:e.style.backgroundImage})}(e),function(e,t,n){var r=Be(e,t.data_bg),i=Be(e,t.data_bg_hidpi),o=_e&&i?i:r;o&&(e.style.backgroundImage='url("'.concat(o,'")'),Qe(e).setAttribute(Se,o),ht(e,t,n))}(e,t,n),function(e,t,n){var r=Be(e,t.data_bg_multi),i=Be(e,t.data_bg_multi_hidpi),o=_e&&i?i:r;o&&(e.style.backgroundImage=o,ct(e,t,n))}(e,t,n),function(e,t,n){var r=Be(e,t.data_bg_set);if(r){var i=r.split("|"),o=i.map((function(e){return"image-set(".concat(e,")")}));e.style.backgroundImage=o.join(),""===e.style.backgroundImage&&(o=i.map((function(e){return"-webkit-image-set(".concat(e,")")})),e.style.backgroundImage=o.join()),ct(e,t,n)}}(e,t,n)},Mt=function(e,t,n){wt(e,t,n),function(e,t,n){var r=pt[e.tagName];r&&(r(e,t),ht(e,t,n))}(e,t,n)},St=function(e,t,n){!function(e){return vt.indexOf(e.tagName)>-1}(e)?Tt(e,t,n):Mt(e,t,n)},Et=function(e,t,n){e.setAttribute("loading","lazy"),wt(e,t,n),function(e,t){var n=pt[e.tagName];n&&n(e,t)}(e,t),ze(e,Re)},At=function(e){e.removeAttribute(Se),e.removeAttribute(Ee),e.removeAttribute(Ae)},It=function(e){$e(e,(function(e){lt(e,rt)})),lt(e,rt)},Ct={IMG:It,IFRAME:function(e){lt(e,tt)},VIDEO:function(e){et(e,(function(e){lt(e,tt)})),lt(e,nt),e.load()},OBJECT:function(e){lt(e,it)}},Nt=function(e){var t=Ct[e.tagName];t?t(e):function(e){if(ot(e)){var t=at(e);e.style.backgroundImage=t.backgroundImage}}(e)},kt=function(e,t){Nt(e),function(e,t){Ge(e)||He(e)||(Xe(e,t.class_entered),Xe(e,t.class_exited),Xe(e,t.class_applied),Xe(e,t.class_loading),Xe(e,t.class_loaded),Xe(e,t.class_error))}(e,t),Fe(e),st(e)},Dt=function(e,t,n,r){n.cancel_on_exit&&function(e){return Ue(e)===ke}(e)&&"IMG"===e.tagName&&(xt(e),function(e){$e(e,(function(e){At(e)})),At(e)}(e),It(e),Xe(e,n.class_loading),qe(r,-1),Fe(e),We(n.callback_cancel,e,t,r))},Pt=function(e,t,n,r){var i=function(e){return Ve.indexOf(Ue(e))>=0}(e);ze(e,"entered"),Ye(e,n.class_entered),Xe(e,n.class_exited),function(e,t,n){t.unobserve_entered&&Ze(e,n)}(e,n,r),We(n.callback_enter,e,t,r),i||St(e,n,r)},Ot=["IMG","IFRAME","VIDEO"],Rt=function(e){return e.use_native&&"loading"in HTMLImageElement.prototype},Lt=function(e,t,n){e.forEach((function(e){return function(e){return e.isIntersecting||e.intersectionRatio>0}(e)?Pt(e.target,e,t,n):function(e,t,n,r){Ge(e)||(Ye(e,n.class_exited),Dt(e,t,n,r),We(n.callback_exit,e,t,r))}(e.target,e,t,n)}))},jt=function(e,t){be&&!Rt(e)&&(t._observer=new IntersectionObserver((function(n){Lt(n,e,t)}),function(e){return{root:e.container===document?null:e.container,rootMargin:e.thresholds||e.threshold+"px"}}(e)))},Bt=function(e){return Array.prototype.slice.call(e)},Ut=function(e){return e.container.querySelectorAll(e.elements_selector)},zt=function(e){return function(e){return Ue(e)===Oe}(e)},Ft=function(e,t){return function(e){return Bt(e).filter(Ge)}(e||Ut(t))},Gt=function(e,t){var n;(n=Ut(e),Bt(n).filter(zt)).forEach((function(t){Xe(t,e.class_error),Fe(t)})),t.update()},Ht=function(e,t){var n=Te(e);this._settings=n,this.loadingCount=0,jt(n,this),function(e,t){ge&&(t._onlineHandler=function(){Gt(e,t)},window.addEventListener("online",t._onlineHandler))}(n,this),this.update(t)};Ht.prototype={update:function(e){var t,n,r=this._settings,i=Ft(e,r);(Je(this,i.length),!ye&&be)?Rt(r)?function(e,t,n){e.forEach((function(e){-1!==Ot.indexOf(e.tagName)&&Et(e,t,n)})),Je(n,0)}(i,r,this):(t=this._observer,n=i,function(e){e.disconnect()}(t),function(e,t){t.forEach((function(t){e.observe(t)}))}(t,n)):this.loadAll(i)},destroy:function(){var e;this._observer&&this._observer.disconnect(),e=this,ge&&window.removeEventListener("online",e._onlineHandler),Ut(this._settings).forEach((function(e){st(e)})),delete this._observer,delete this._settings,delete this._onlineHandler,delete this.loadingCount,delete this.toLoadCount},loadAll:function(e){var t=this,n=this._settings;Ft(e,n).forEach((function(e){Ze(e,t),St(e,n,t)}))},restoreAll:function(){var e=this._settings;Ut(e).forEach((function(t){kt(t,e)}))}},Ht.load=function(e,t){var n=Te(t);St(e,n)},Ht.resetStatus=function(e){Fe(e)},ge&&function(e,t){if(t)if(t.length)for(var n,r=0;n=t[r];r+=1)Me(e,n);else Me(e,t)}(Ht,window.lazyLoadOptions);var Vt=function(){function e(t){var n=this,r=t.readonly,i=t.onNewPageIndex,o=t.onPlay,a=t.onPagesReady,s=t.urlInterrupter;_(this,e),this._pages=[],this.pageIndex=0,this.setPaused=function(){n.$btnPlay.classList.toggle(n.wrapClassName("footer-btn-playing"),!1)},this.setPlaying=function(){n.$btnPlay.classList.toggle(n.wrapClassName("footer-btn-playing"),!0)},this.namespace="netless-app-slide",this.isShowPreview=!1,this.isSmallBox=!1,this.sideEffect=new z,this.readonly=r,this.onNewPageIndex=i,this.onPlay=o,this.onPagesReady=a,this.urlInterrupter=s||function(e){return e},this.render()}var t;return T(e,[{key:"unmount",value:function(){this.$content.remove(),this.$footer.remove()}},{key:"setReadonly",value:function(e){this.readonly=e,this.$content.classList.toggle(this.wrapClassName("readonly"),e),this.$footer.classList.toggle(this.wrapClassName("readonly"),e),this.$pageNumberInput.disabled=e}},{key:"destroy",value:function(){var e;null==(e=this.previewLazyLoad)||e.destroy(),this.sideEffect.flushAll(),this.unmount()}},{key:"setPageIndex",value:function(e){Number.isNaN(e)||(this.pageIndex=e,this.$pageNumberInput.value=String(e+1))}},{key:"refreshTotalPage",value:function(){this.pages.length?this.$totalPage.textContent=" / "+this.pages.length:this.$totalPage.textContent=""}},{key:"setSmallBox",value:function(e){this.isSmallBox!==e&&(this.isSmallBox=e,this.$footer.classList.toggle(this.wrapClassName("float-footer"),e))}},{key:"render",value:function(){return this.renderContent(),this.renderFooter(),this.$content}},{key:"renderContent",value:function(){if(!this.$content){var e=document.createElement("div");e.className=this.wrapClassName("content"),this.$content=e,this.readonly&&e.classList.add(this.wrapClassName("readonly")),e.appendChild(this.renderPreviewMask()),e.appendChild(this.renderPreview())}return this.$content}},{key:"renderPreview",value:function(){var e=this;if(!this.$preview){var t=document.createElement("div");t.className=this.wrapClassName("preview")+" tele-fancy-scrollbar",this.$preview=t,this.refreshPreview(),this.sideEffect.addEventListener(t,"click",(function(t){var n;if(!e.readonly){var r=null==(n=t.target.dataset)?void 0:n.pageIndex;r&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),e.onNewPageIndex(Number(r)),e.togglePreview(!1))}}))}return this.$preview}},{key:"refreshPreview",value:(t=l(regeneratorRuntime.mark((function e(){var t,n,r,i,o,a,s,u,l,c,h,d,f=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(r=this.$preview,i=this.wrapClassName("preview-page"),o=this.wrapClassName("preview-page-name");r.firstChild;)r.firstChild.remove();for(a=[],s=0,u=this.pages.length;s0?"":"none"}},{key:"renderFooter",value:function(){var e=this;if(!this.$footer){var t=document.createElement("div");t.className=this.wrapClassName("footer"),this.$footer=t,this.readonly&&t.classList.add(this.wrapClassName("readonly")),this.isSmallBox&&t.classList.add(this.wrapClassName("float-footer"));var n=this.renderFooterBtn("btn-sidebar",function(e){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"svg");n.setAttribute("class","".concat(e,"-footer-icon-sidebar")),n.setAttribute("viewBox","0 0 64 64");var r=document.createElementNS(t,"path");return r.setAttribute("fill","currentColor"),r.setAttribute("d","M50 8H14c-3.309 0-6 2.691-6 6v36c0 3.309 2.691 6 6 6h36c3.309 0 6-2.691 6-6V14c0-3.309-2.691-6-6-6zM12 50V14c0-1.103.897-2 2-2h8v40h-8c-1.103 0-2-.897-2-2zm40 0c0 1.103-.897 2-2 2H26V12h24c1.103 0 2 .897 2 2z"),n.appendChild(r),n}(this.namespace));this.sideEffect.addEventListener(n,"click",(function(){e.readonly||e.togglePreview()})),this.$btnSidebar=n,this.$btnSidebar.style.display="none",this.$footer.appendChild(n);var r=document.createElement("div");r.className=this.wrapClassName("page-jumps");var i=this.renderFooterBtn("btn-page-back",function(e){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"svg");n.setAttribute("class","".concat(e,"-footer-icon-arrow-left")),n.setAttribute("viewBox","0 0 500 500");var r=document.createElementNS(t,"path");return r.setAttribute("fill","currentColor"),r.setAttribute("d","M177.81 249.959L337.473 90.295c2.722-2.865 2.651-7.378-.143-10.1-2.793-2.65-7.163-2.65-9.956 0l-164.75 164.75c-2.793 2.793-2.793 7.306 0 10.1l164.75 164.75c2.865 2.722 7.378 2.65 10.099-.143 2.651-2.794 2.651-7.163 0-9.957L177.809 249.959z"),n.appendChild(r),n}(this.namespace));if(this.sideEffect.addEventListener(i,"click",(function(){e.readonly||e.onNewPageIndex(e.pageIndex-1)})),r.appendChild(i),this.onPlay){var o=this.renderFooterBtn("btn-page-play",function(e){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"svg");n.setAttribute("class","".concat(e,"-footer-icon-play")),n.setAttribute("viewBox","0 0 500 500");var r=document.createElementNS(t,"path");return r.setAttribute("fill","currentColor"),r.setAttribute("d","M418.158 257.419L174.663 413.33c-6.017 3.919-15.708 3.772-21.291-.29-2.791-2.018-4.295-4.483-4.295-7.084V94.109c0-5.65 6.883-10.289 15.271-10.289 4.298 0 8.391 1.307 11.181 3.332l242.629 155.484c6.016 3.917 6.451 10.292.649 14.491-.216.154-.432.154-.649.292zM170.621 391.288l223.116-141.301L170.71 107.753l-.089 283.535z"),n.appendChild(r),n}(this.namespace),function(e){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"svg");n.setAttribute("class","".concat(e,"-footer-icon-pause")),n.setAttribute("viewBox","0 0 500 500");var r=document.createElementNS(t,"path");return r.setAttribute("fill","currentColor"),r.setAttribute("d","M312.491 78.261c0-6.159 4.893-11.213 11.04-11.213 6.158 0 11.211 5.054 11.211 11.213v343.478c0 6.159-5.053 11.213-11.211 11.213-6.147 0-11.04-5.054-11.04-11.213V78.261zM165.257 78.261c0-6.159 4.893-11.213 11.04-11.213 6.158 0 11.211 5.054 11.211 11.213v343.478c0 6.159-5.053 11.213-11.211 11.213-6.147 0-11.04-5.054-11.04-11.213V78.261z"),n.appendChild(r),n}(this.namespace));this.$btnPlay=o,this.sideEffect.addEventListener(o,"click",(function(){e.readonly||(e.setPlaying(),e.onPlay&&e.onPlay())})),r.appendChild(o)}var a=this.renderFooterBtn("btn-page-next",function(e){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"svg");n.setAttribute("class","".concat(e,"-footer-icon-arrow-right")),n.setAttribute("viewBox","0 0 500 500");var r=document.createElementNS(t,"path");return r.setAttribute("fill","currentColor"),r.setAttribute("d","M322.19 250.041L162.527 409.705c-2.722 2.865-2.651 7.378.143 10.1 2.793 2.65 7.163 2.65 9.956 0l164.75-164.75c2.793-2.793 2.793-7.306 0-10.1l-164.75-164.75c-2.865-2.722-7.378-2.65-10.099.143-2.651 2.794-2.651 7.163 0 9.957l159.664 159.736z"),n.appendChild(r),n}(this.namespace));this.sideEffect.addEventListener(a,"click",(function(){e.readonly||e.onNewPageIndex(e.pageIndex+1)})),r.appendChild(a);var s=document.createElement("div");s.className=this.wrapClassName("page-number");var u=document.createElement("input");u.className=this.wrapClassName("page-number-input"),u.value=String(this.pageIndex+1),this.readonly&&(u.disabled=!0),this.$pageNumberInput=u,this.sideEffect.addEventListener(u,"focus",(function(){u.select()})),this.sideEffect.addEventListener(u,"change",(function(){e.readonly||u.value&&e.onNewPageIndex(Number(u.value)-1)}));var l=document.createElement("span");this.$totalPage=l,s.appendChild(u),s.appendChild(l),this.$footer.appendChild(r),this.$footer.appendChild(s)}return this.$footer}},{key:"renderFooterBtn",value:function(e,t,n){var r=document.createElement("button");return r.className=this.wrapClassName("footer-btn")+" "+this.wrapClassName(e),r.appendChild(t),n&&r.appendChild(n),r}},{key:"togglePreview",value:function(e){if(this.isShowPreview=null!=e?e:!this.isShowPreview,this.$content.classList.toggle(this.wrapClassName("preview-active"),this.isShowPreview),this.isShowPreview){var t=this.$preview.querySelector("."+this.wrapClassName("preview-page-".concat(this.pageIndex)));t&&(this.previewLazyLoad||(this.previewLazyLoad=new Ht({container:this.$preview,elements_selector:".".concat(this.wrapClassName("preview-page>img"))})),this.$preview.scrollTo({top:t.offsetTop-16}))}}},{key:"wrapClassName",value:function(e){return"".concat(this.namespace,"-").concat(e)}},{key:"pages",set:function(e){this._pages=e,this.refreshPreview().then(this.refreshBtnSidebar.bind(this)),this.refreshTotalPage(),this.onPagesReady&&this.onPagesReady(e)},get:function(){return this._pages}}]),e}(),Wt=new Set(["clicker"]),Yt=function(){function e(t){var r=this,i=t.box,o=t.view,a=t.mountSlideController,s=t.mountWhiteboard,u=t.baseScenePath,c=t.appId,h=t.urlInterrupter,d=t.onPagesReady;_(this,e),this.slideController=null,this.isViewMounted=!1,this.onError=function(e){var t,n,i=e.error,o=e.index;r.viewer.setPaused(),(null==(t=r.slideController)?void 0:t.showRenderError)&&(r.$overlay.textContent="Error on slide[page=".concat(r.slideController.page,"]: ").concat(i.message),r.$overlay.style.opacity="1"),(null==(n=r.slideController)?void 0:n.onRenderError)&&r.slideController.onRenderError(i,o),oe.warn("[Slide] render error",i)},this.onRenderStart=function(){r.$whiteboardView.classList.add(r.wrapClassName("wb-view-hidden")),r.viewer.setPlaying()},this.onRenderEnd=function(){},this.onPageChanged=function(){clearTimeout(r._onPageChangedTimer),r._onPageChangedTimer=setTimeout(r._onPageChanged,200)},this._onPageChangedTimer=0,this._onPageChanged=function(){r.$overlay.style.opacity="",r.$whiteboardView.classList.remove(r.wrapClassName("wb-view-hidden"))},this.refreshPages=function(){r.slideController&&(r.viewer.pages=de(r.slideController.slide),r.viewer.setPageIndex(r.getPageIndex(r.slideController.page)),r.scaleDocsToFit())},this.scaleDocsToFit=function(){if(r.slideController){var e=r.slideController.slide,t=e.width,n=e.height;t&&n&&(r.whiteboardView.moveCameraToContain({originX:-t/2,originY:-n/2,width:t,height:n,animationMode:"immediately"}),r.whiteboardView.setCameraBound({damping:1,maxContentMode:function(){return r.whiteboardView.camera.scale},minContentMode:function(){return r.whiteboardView.camera.scale},centerX:0,centerY:0,width:t,height:n}),r.isViewMounted||(r.isViewMounted=!0,console.log("[Slide] mount whiteboard view"),r.mountWhiteboard(r.$whiteboardView)))}},this.onPlay=function(){r.slideController&&r.slideController.slide.nextStep()},this.onNewPageIndex=function(e){r.slideController&&r.slideController.jumpToPage(e+1)},this.sideEffect=new z,this.namespace="netless-app-slide",this.toPdf=l(regeneratorRuntime.mark((function e(){var t,i,o,a,s,u,l,c,h,d,f,p,v,m,g,y,b,x,_,w;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.slideController){e.next=3;break}return r.reportProgress(100,null),e.abrupt("return");case 3:if(t=r.slideController.slide,i=1920,o=document.createElement("canvas"),a=o.getContext("2d"),s=t.slideCount,u=t.width,l=t.height,c=Math.floor(u),h=Math.floor(l),c>i&&(c=i,h=Math.floor(l*c/u)),h>i&&(h=i,c=Math.floor(u*h/l)),o.width=c,o.height=h,(d=document.createElement("canvas")).width=c,d.height=h,(f=d.getContext("2d"))&&r.getWhiteSnapshot&&a){e.next=21;break}return r.reportProgress(100,null),e.abrupt("return",null);case 21:return p=c>h?"l":"p",e.next=24,Promise.resolve().then(n.bind(n,88877));case 24:v=e.sent,m=v.jsPDF,g=new m({format:[c,h],orientation:p,compress:!0}),y=1;case 28:if(!(y<=s)){e.next=57;break}return b=null,e.prev=30,e.next=33,r.slideController.slide.snapshotWithTimingEnd(y);case 33:b=e.sent,e.next=38;break;case 36:e.prev=36,e.t0=e.catch(30);case 38:if(!b){e.next=40;break}return e.delegateYield(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=document.createElement("img")).src=b,e.next=4,new Promise((function(e){return t.onload=e}));case 4:a.drawImage(t,0,0,c,h);case 5:case"end":return e.stop()}}),e)}))(),"t1",40);case 40:return f.clearRect(0,0,c,h),r.getWhiteSnapshot(y,d,f,u,l),e.prev=42,e.delegateYield(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=d.toDataURL("image/png"),(n=document.createElement("img")).src=t,e.next=5,new Promise((function(e){return n.onload=e}));case 5:a.drawImage(n,0,0,c,h);case 6:case"end":return e.stop()}}),e)}))(),"t2",44);case 44:e.next=48;break;case 46:e.prev=46,e.t3=e.catch(42);case 48:x=o.toDataURL("image/jpeg",.6),y>1&&g.addPage(),g.addImage(x,"JPEG",0,0,c,h,"","FAST"),a.clearRect(0,0,c,h),Math.ceil(y/s*100)<100&&r.reportProgress(Math.ceil(y/s*100),null);case 54:y++,e.next=28;break;case 57:_=g.output("arraybuffer"),w=r.box.title,r.reportProgress(100,{pdf:_,title:w});case 60:case"end":return e.stop()}}),e,null,[[30,36],[42,46]])}))),this.box=i,this.whiteboardView=o,this.mountSlideController=a,this.mountWhiteboard=s,this.baseScenePath=u,this.appId=c,this.viewer=new Vt({readonly:i.readonly,onNewPageIndex:this.onNewPageIndex,onPlay:this.onPlay,urlInterrupter:h,onPagesReady:d}),this.sideEffect.add((function(){var e=function(e){r.setReadonly(e)};return i.events.on("readonly",e),function(){return i.events.off("readonly",e)}})),this.sideEffect.add((function(){var e=function(e){"@netless/_request_save_pdf_"===e.data.type&&e.data.appId===r.appId&&r.toPdf().catch((function(){return r.reportProgress(100,null)}))};return window.addEventListener("message",e),function(){window.removeEventListener("message",e)}})),this.render()}return T(e,[{key:"render",value:function(){var e=this;this.viewer.$content.appendChild(this.renderSlideContainer()),this.viewer.$content.appendChild(this.renderWhiteboardView()),this.viewer.$content.appendChild(this.renderOverlay()),this.sideEffect.addEventListener(window,"keydown",(function(t){if(e.box.focus&&e.slideController&&!function(e){if(!e)return!1;var t=e.tagName;return"INPUT"===t||"TEXTAREA"===t||"SELECT"===t}(t.target))switch(t.key){case"ArrowUp":case"ArrowLeft":e.slideController.slide.prevStep();break;case"ArrowRight":case"ArrowDown":e.slideController.slide.nextStep()}}))}},{key:"renderOverlay",value:function(){if(!this.$overlay){var e=document.createElement("div");e.className=this.wrapClassName("overlay"),this.$overlay=e}return this.$overlay}},{key:"renderSlideContainer",value:function(){if(!this.$slide){var e=document.createElement("div");e.className=this.wrapClassName("slide"),e.dataset.appKind="Slide",this.$slide=e}return this.$slide}},{key:"renderWhiteboardView",value:function(){return this.$whiteboardView||(this.$whiteboardView=document.createElement("div"),this.$whiteboardView.className=this.wrapClassName("wb-view")),this.$whiteboardView}},{key:"mount",value:function(){var e=this;return this.box.mountContent(this.viewer.$content),this.box.mountFooter(this.viewer.$footer),this.slideController=this.mountSlideController({anchor:this.$slide,onRenderStart:this.onRenderStart,onRenderEnd:this.onRenderEnd,onTransitionStart:this.viewer.setPlaying,onTransitionEnd:this.viewer.setPaused,onReady:this.refreshPages,onError:this.onError}),this.scaleDocsToFit(),this.sideEffect.add((function(){return e.whiteboardView.callbacks.on("onSizeUpdated",e.scaleDocsToFit),function(){return e.whiteboardView.callbacks.off("onSizeUpdated",e.scaleDocsToFit)}})),this}},{key:"getPageIndex",value:function(e){return(e>0?e:1)-1}},{key:"unmount",value:function(){return this.slideController&&(this.slideController.destroy(),this.slideController=null),this.viewer.unmount(),this}},{key:"setReadonly",value:function(e){this.viewer.setReadonly(e)}},{key:"destroy",value:function(){this.sideEffect.flushAll(),this.unmount(),this.viewer.destroy()}},{key:"toggleClickThrough",value:function(e){this.$whiteboardView.style.pointerEvents=!e||Wt.has(e)?"none":"auto"}},{key:"wrapClassName",value:function(e){return"".concat(this.namespace,"-").concat(e)}},{key:"getWhiteSnapshot",value:function(e,t,n,r,i){this.whiteboardView.screenshotToCanvas(n,"".concat(this.baseScenePath,"/").concat(e),t.width,t.height,{centerX:0,centerY:0,scale:Math.min(t.width/r,t.height/i)})}},{key:"reportProgress",value:function(e,t){window.postMessage({type:"@netless/_result_save_pdf_",appId:this.appId,progress:e,result:t})}}]),e}(),Xt=!1,Qt=2;t.FreezerLength=Qt;var Zt=function(e){return"["+e+"]"},qt={map:new Map,boxes:new Map,queue:[],validateQueue:function(){var e=this;for(this.queue.sort((function(t,n){var r,i,o,a;return-((null!=(i=null==(r=e.boxes.get(t))?void 0:r.zIndex)?i:0)-(null!=(a=null==(o=e.boxes.get(n))?void 0:o.zIndex)?a:0))})),ae("[Slide] freezer: validate",Zt(this.queue));this.queue.length>Qt;){var t=this.queue.pop(),n=this.map.get(t);n&&(ae("[Slide] freezer: validate-freeze",t,Zt(this.queue)),n.freeze())}},set:function(e,t,n){ae("[Slide] freezer: add",e,Zt(this.queue)),this.map.set(e,t),this.boxes.set(e,n),this.queue.includes(e)||this.queue.unshift(e),this.validateQueue()},delete:function(e){this.map.delete(e),this.boxes.delete(e),this.queue=this.queue.filter((function(t){return t!==e})),ae("[Slide] freezer: delete",e,Zt(this.queue))},focus:function(e){var t=this.map.get(e),n=this.queue.indexOf(e);n>-1&&this.queue.splice(n,1),this.queue.unshift(e),this.validateQueue(),ae("[Slide] freezer: focus",e,Zt(this.queue)),t&&t.unfreeze()}};t.apps=qt;var Jt=new Set;var Kt=new Set;t.addHooks=function(e){Xt=!0,e.on("focus",(function(e){var t=e.appId;qt.focus(t)})),e.on("created",(function(e){var t=e.appId;Jt.forEach((function(e){return e(t)}))})),e.on("destroy",(function(e){var t=e.appId;Kt.forEach((function(e){return e(t)}))}))};var $t=function(){return".netless-app-slide-content{position:relative;height:100%;overflow:hidden}.netless-app-slide-preview-mask{display:none;position:absolute;z-index:200;top:0;left:0;width:100%;height:100%}.netless-app-slide-preview{display:flex;flex-direction:column;align-items:center;position:absolute;z-index:300;top:0;left:0;width:33%;max-width:200px;height:100%;padding-top:10px;transform:translate(-100%);background:rgba(237,237,240,.9);box-shadow:inset -1px 0 #0000001c;transition:transform .4s}.netless-app-slide-preview-active .netless-app-slide-preview-mask{display:block}.netless-app-slide-preview-active .netless-app-slide-preview{transform:translate(0)}.netless-app-slide-preview-page{position:relative;display:block;width:55%;margin-bottom:10px;font-size:0;color:transparent;outline:none;border:7px solid transparent;border-radius:4px;transition:border-color .3s;user-select:none}.netless-app-slide-preview-page:hover,.netless-app-slide-preview-page.netless-app-slide-preview-page-active{border-color:#444e601a}.netless-app-slide-preview-page>img{width:100%;height:auto;box-sizing:border-box;border:1px solid rgba(0,0,0,.5);border-radius:1px;background-color:#fff;box-shadow:0 2px 8px #0000004d}.netless-app-slide-preview-page-name{position:absolute;top:1px;left:-10px;transform:translate(-100%);text-align:right;font-size:12px;color:#5f5f5f;user-select:none}.netless-app-slide-footer{box-sizing:border-box;height:26px;display:flex;align-items:center;padding:0 16px;border-top:1px solid #eeeef7;color:#191919}.netless-app-slide-float-footer{width:100%;min-height:26px;position:absolute;left:0;bottom:0;z-index:2000;background:rgba(249,249,252,.9);transition:opacity .4s}.netless-app-slide-footer-btn{box-sizing:border-box;width:26px;height:26px;font-size:0;margin:0;padding:3px;border:none;border-radius:1px;outline:none;color:currentColor;background:transparent;transition:background .4s;cursor:pointer;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.netless-app-slide-footer-btn:hover{background:rgba(237,237,240,.9)}@media (hover: none){.netless-app-slide-footer-btn:hover{background:transparent!important}}.netless-app-slide-footer-btn>svg{width:100%;height:100%}.netless-app-slide-footer-btn>svg:nth-of-type(2){display:none}.netless-app-slide-footer-btn.netless-app-slide-footer-btn-playing>svg:nth-of-type(1){display:none}.netless-app-slide-footer-btn.netless-app-slide-footer-btn-playing>svg:nth-of-type(2){display:initial}.netless-app-slide-footer-btn~.netless-app-slide-footer-btn{margin-left:15px}.netless-app-slide-page-jumps{flex:1;display:flex;justify-content:center;align-items:center}.netless-app-slide-page-number{margin-left:auto;font-size:13px;user-select:none;white-space:nowrap;word-break:keep-all}.netless-app-slide-page-number-input{border:none;outline:none;width:3em;margin:0;padding:0 2px;text-align:right;font-size:13px;line-height:1;font-weight:400;font-family:inherit;border-radius:2px;color:currentColor;background:transparent;transition:background .4s;user-select:text;-webkit-tap-highlight-color:rgba(0,0,0,0)}.netless-app-slide-page-number-input:hover,.netless-app-slide-page-number-input:focus,.netless-app-slide-page-number-input:active{background:#fff;box-shadow:#63636333 0 2px 8px}.netless-app-slide-readonly.netless-app-slide-footer{display:none}.telebox-color-scheme-dark .netless-app-slide-page-number-input{color:#a6a6a8}.telebox-color-scheme-dark .netless-app-slide-page-number-input:active,.telebox-color-scheme-dark .netless-app-slide-page-number-input:focus,.telebox-color-scheme-dark .netless-app-slide-page-number-input:hover{color:#222}.telebox-color-scheme-dark .netless-app-slide-footer{color:#a6a6a8;background:#2d2d33;border-top:none}.telebox-color-scheme-dark .netless-app-slide-footer-btn:hover{background:#212126}.telebox-color-scheme-dark .netless-app-slide-preview{background:rgba(50,50,50,.9)}.netless-app-slide-wb-view{position:absolute;top:0;left:0;width:100%;height:100%;z-index:100;overflow:hidden;transition:opacity .2s}.netless-app-slide-wb-view-hidden{opacity:0}.netless-app-slide-overlay{display:flex;align-items:center;justify-content:center;position:absolute;z-index:200;top:0;left:0;width:100%;height:100%;padding:8px;background:rgba(255,0,0,.25);transition:opacity .3s;opacity:0;pointer-events:none}.netless-app-slide-slide{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.netless-app-slide-slide canvas{transform:scale(var(--netless-app-slide-scale, 1))}\n"}();var en=function(){function e(t){var n=this;_(this,e),this.slide=null,this.debug=!1,this.sideEffect=new z,this.ready=!1,this.readyPromise=new Promise((function(e){n.resolveReady=function(){n.ready=!0,e()}})),this.hotkeyListener=function(e){if(n.slide)switch(e.key){case"ArrowUp":case"ArrowLeft":n.slide.prevStep();break;case"ArrowRight":case"ArrowDown":n.slide.nextStep()}},this.onPageChanged=function(e){n.viewer.setPageIndex(e-1)},this.onTransitionStart=function(){n.viewer.setPlaying()},this.onTransitionEnd=function(){n.viewer.setPaused()},this.onError=function(e){var t=e.error;n.viewer.setPaused(),console.warn("[Slide] render error",t)},this.destroyed=!1,this.refreshPages=function(){n.slide&&(n.viewer.pages=de(n.slide),n.viewer.setPageIndex(n.getPageIndex(n.slide.slideState.currentSlideIndex)))},this.onPlay=function(){n.slide&&n.slide.nextStep()},this.onNewPageIndex=function(e){n.slide&&n.slide.slideCount>0&&n.slide.renderSlide(G(e+1,1,n.slide.slideCount))},this.namespace="netless-app-slide",this.target=t.target,this.bgColor=ce(this.target),this.viewer=new Vt({readonly:!1,onNewPageIndex:this.onNewPageIndex,onPlay:this.onPlay}),this.render()}return T(e,[{key:"render",value:function(){this.viewer.$content.appendChild(this.renderSlideContainer()),this.registerHotKeys(window)}},{key:"registerHotKeys",value:function(e){this.sideEffect.addEventListener(e,"keydown",this.hotkeyListener,void 0,"hotkey")}},{key:"mount",value:function(e,t){this.target.appendChild(this.renderStyle()),this.target.appendChild(this.viewer.$content),this.target.appendChild(this.viewer.$footer),this.slide=new L.Slide({anchor:this.$slide,interactive:!0,mode:"local",controller:this.debug,enableGlobalClick:!0,renderOptions:{minFPS:25,maxFPS:30,autoFPS:!0,autoResolution:!0,transactionBgColor:this.bgColor}}),this.registerEventListeners(),this.slide.setResource(e,t),this.slide.renderSlide(1)}},{key:"renderStyle",value:function(){var e=document.createElement("style");return e.appendChild(document.createTextNode($t)),e}},{key:"registerEventListeners",value:function(){if(this.slide){var e=this.slide;e.on(L.SLIDE_EVENTS.slideChange,this.onPageChanged),e.on(L.SLIDE_EVENTS.renderStart,this.onTransitionStart),e.on(L.SLIDE_EVENTS.renderEnd,this.onTransitionEnd),e.on(L.SLIDE_EVENTS.mainSeqStepStart,this.onTransitionStart),e.on(L.SLIDE_EVENTS.mainSeqStepEnd,this.onTransitionEnd),e.on(L.SLIDE_EVENTS.renderError,this.onError),e.on(L.SLIDE_EVENTS.renderEnd,this.resolveReady),this.readyPromise.then(this.refreshPages)}}},{key:"destroy",value:function(){this.sideEffect.flushAll(),this.slide&&!this.destroyed&&(this.slide.destroy(),this.destroyed=!0),this.viewer.destroy()}},{key:"getPageIndex",value:function(e){return(e>0?e:1)-1}},{key:"renderSlideContainer",value:function(){if(!this.$slide){var e=document.createElement("div");e.className=this.wrapClassName("slide"),e.dataset.appKind="Slide",this.$slide=e}return this.$slide}},{key:"wrapClassName",value:function(e){return"".concat(this.namespace,"-").concat(e)}}]),e}();t.SlidePreviewer=en;var tn=L.Slide.usePlugin.bind(L.Slide);t.usePlugin=tn;var nn="0.2.51";t.version=nn;var rn={kind:"Slide",setup:function(e){var t;if(console.log("[Slide] setup @ 0.2.51"),e.getIsWritable()&&e.storage.ensureState(ve),!e.storage.state.taskId)throw new Error("[Slide] no taskId");var n=e.getView();if(!n)throw new Error("[Slide] no view, please set scenePath on addApp()");n.disableCameraTransform=!0;var r=e.getBox();r.mountStyles($t);try{r.$content.dataset.appSlideVersion=nn}catch(e){}var i=e.getInitScenePath(),o=null,a=function(t){var n=e.getRoom();if(o&&o.slideController){var r=!1;n&&e.getIsWritable()&&(fe(n,e,o.slideController.slide,i),r=!0),ae("[Slide] page to",t,r?"(synced)":""),o.viewer.setPageIndex(t-1),o.viewer.setPaused(),o.onPageChanged();var a=o.viewer.pages.length;a>0&&e.dispatchAppEvent("pageStateChange",{index:t-1,length:a})}};o=new Yt({box:r,view:n,mountSlideController:function(t){var n,o,s=e.getAppOptions()||{},u=new me((n=R({context:e},t),o={onPageChanged:a,onRenderError:s.onRenderError,showRenderError:s.showRenderError},C(n,N(o))));return Xt&&qt.set(e.appId,u,r),oe.setAppController(e.appId,u),u.readyPromise.then(t.onReady).then((function(){var n=e.getRoom(),r=!1;n&&e.getIsWritable()&&(fe(n,e,u.slide,i),r=!0);var o=u.slide.slideState.currentSlideIndex;ae("[Slide] page to",o,r?"(synced)":"","(on ready)"),u.slide.on("renderEnd",t.onRenderEnd)})),u},mountWhiteboard:e.mountView.bind(e),baseScenePath:i,appId:e.appId,urlInterrupter:null==(t=e.getAppOptions())?void 0:t.urlInterrupter,onPagesReady:function(t){var n=t.length,r=(null==o?void 0:o.viewer.pageIndex)||0;e.dispatchAppEvent("pageStateChange",{index:r,length:n})}});var s=e.getRoom(),u=new z;return u.add((function(){var t;return oe.setAppContext(e.appId,e),oe.enable=(null==(t=e.getAppOptions())?void 0:t.debug)||!1,oe.level="debug",function(){return oe.deleteApp(e.appId)}})),s&&(o.toggleClickThrough(s.state.memberState.currentApplianceName),u.add((function(){var e=function(e){e.memberState&&o&&o.toggleClickThrough(e.memberState.currentApplianceName)};return s.callbacks.on("onRoomStateChanged",e),function(){return s.callbacks.off("onRoomStateChanged",e)}}))),e.emitter.on("destroy",(function(){ae("[Slide] destroy",e.appId),Xt&&qt.delete(e.appId),u.flushAll(),o&&(o.destroy(),o=null)})),o.mount(),{viewer:function(){return o},controller:function(){return null==o?void 0:o.slideController},slide:function(){var e;return null==(e=null==o?void 0:o.slideController)?void 0:e.slide},nextStep:function(){var e;return!(!o||!o.slideController)&&(null==(e=null==o?void 0:o.slideController)||e.slide.nextStep(),!0)},prevStep:function(){var e;return!(!o||!o.slideController)&&(null==(e=null==o?void 0:o.slideController)||e.slide.prevStep(),!0)},position:function(){var e=null==o?void 0:o.slideController;if(e)return[e.page,e.pageCount]},nextPage:function(){var e=null==o?void 0:o.slideController;if(e){var t=e.page,n=e.pageCount;if(n>0&&t0&&t>1)return e.jumpToPage(t-1),!0}return!1},jumpToPage:function(e){var t=null==o?void 0:o.slideController;if(t){var n=t.page,r=t.pageCount;if(r>0&&n>0&&n<=r)return t.jumpToPage(e),!0}return!1}}}};t.default=rn;var on=L.Slide;t.Slide=on},18808:function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}var t,n,r,i,o,a,s,u;void 0===CanvasRenderingContext2D.prototype.ellipse&&(CanvasRenderingContext2D.prototype.ellipse=function(e,t,n,r,i,o,a,s){this.save(),this.translate(e,t),this.rotate(i),this.scale(n,r),this.arc(0,0,1,o,a,s),this.restore()}),void 0===CanvasRenderingContext2D.prototype.resetTransform&&(CanvasRenderingContext2D.prototype.resetTransform=function(){this.setTransform(1,0,0,1,0,0)}),void 0===CanvasRenderingContext2D.prototype.getTransform&&(CanvasRenderingContext2D.prototype.getTransform=function(){return this._t2stack&&this._t2stack[this._t2stack.length-1]||{a:1,b:0,c:0,d:1,e:0,f:0}},CanvasRenderingContext2D.prototype.save=(t=CanvasRenderingContext2D.prototype.save,function(){this._t2stack||(this._t2stack=[{a:1,b:0,c:0,d:1,e:0,f:0}]);var e=this._t2stack[this._t2stack.length-1];this._t2stack.push(e&&{a:e.a,b:e.b,c:e.c,d:e.d,e:e.e,f:e.f}),t.call(this)}),CanvasRenderingContext2D.prototype.restore=(n=CanvasRenderingContext2D.prototype.restore,function(){this._t2stack&&this._t2stack.pop(),n.call(this)}),CanvasRenderingContext2D.prototype.transform=(r=CanvasRenderingContext2D.prototype.transform,function(e,t,n,i,o,a){this._t2stack||(this._t2stack=[{a:1,b:0,c:0,d:1,e:0,f:0}]);var s=this._t2stack[this._t2stack.length-1],u=s.a*e+s.c*t,l=s.b*e+s.d*t,c=s.a*n+s.c*i,h=s.b*n+s.d*i,d=s.e+s.a*o+s.c*a,f=s.f+s.b*o+s.d*a;s.a=u,s.b=l,s.c=c,s.d=h,s.e=d,s.f=f,r.call(this,e,t,n,i,o,a)}),CanvasRenderingContext2D.prototype.setTransform=(i=CanvasRenderingContext2D.prototype.setTransform,function(t,n,r,o,a,s){if(this._t2stack||(this._t2stack=[{}]),"object"===e(t)||void 0===t){var u=t.a,l=t.b,c=t.c,h=t.d,d=t.e,f=t.f;this._t2stack[this._t2stack.length-1]={a:u,b:l,c:c,d:h,e:d,f:f},i.call(this,u,l,c,h,d,f)}else this._t2stack[this._t2stack.length-1]={a:t,b:n,c:r,d:o,e:a,f:s},i.call(this,t,n,r,o,a,s)}),CanvasRenderingContext2D.prototype.resetTransform=(o=CanvasRenderingContext2D.prototype.resetTransform,function(){this._t2stack||(this._t2stack=[{}]),this._t2stack[this._t2stack.length-1]={a:1,b:0,c:0,d:1,e:0,f:0},o&&o.call(this)}),CanvasRenderingContext2D.prototype.scale=(a=CanvasRenderingContext2D.prototype.scale,function(e,t){this._t2stack||(this._t2stack=[{a:1,b:0,c:0,d:1,e:0,f:0}]);var n=this._t2stack[this._t2stack.length-1];e=e||1,t=t||e,n.a*=e,n.c*=t,n.b*=e,n.d*=t,a.call(this,e,t)}),CanvasRenderingContext2D.prototype.rotate=(s=CanvasRenderingContext2D.prototype.rotate,function(e){this._t2stack||(this._t2stack=[{a:1,b:0,c:0,d:1,e:0,f:0}]);var t=this._t2stack[this._t2stack.length-1],n=Math.cos(-e),r=Math.sin(-e),i=t.a*n-t.c*r,o=t.b*n-t.d*r,a=t.c*n+t.a*r,u=t.d*n+t.b*r;return t.a=i,t.b=o,t.c=a,t.d=u,s.call(this,e)}),CanvasRenderingContext2D.prototype.translate=(u=CanvasRenderingContext2D.prototype.translate,function(e,t){this._t2stack||(this._t2stack=[{a:1,b:0,c:0,d:1,e:0,f:0}]);var n=this._t2stack[this._t2stack.length-1];return n.e+=e*n.a+t*n.c,n.f+=e*n.b+t*n.d,u.call(this,e,t)}))},92710:function(e,t,n){function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==r(e)&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}({"./src/CombinePlayerImplement.ts":function(e,t,n){n.d(t,"a",(function(){return y}));var r=n("@babel/runtime/regenerator"),i=n.n(r),o=n("@babel/runtime/helpers/asyncToGenerator"),a=n.n(o),s=n("@babel/runtime/helpers/classCallCheck"),u=n.n(s),l=n("@babel/runtime/helpers/createClass"),c=n.n(l),h=function(e,t,n){"string"==typeof n?console.log("[Combine-Player][".concat(e,"]: ").concat(t," -"),n):console.log("[Combine-Player][".concat(e,"]: ").concat(t," -"),JSON.stringify(n,null,2))},d=n("./src/StatusContant.ts"),f=n("./src/EventEmitter.ts"),p=n("./src/ErrorConstant.ts");function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(this.statusIgnoreCrashByDisabled[0]);try{for(i.s();!(n=i.n()).done;){var o=n.value,a=o.video;if(t===o.whiteboard&&a===e){r=!0;break}}}catch(e){i.e(e)}finally{i.f()}return!r}},{key:"unlockCombineStatus",value:function(){this.statusLockInfo.isLocked=!1,this.statusLockInfo.allowStatusList=[],this.statusLockInfo.unLockStatusList=[]}},{key:"setPreviousStatus",value:function(e,t){this.whiteboardStatus.previous=e,this.videoStatus.previous=t}},{key:"dispatchEvent",value:function(e){var t=this,n=e.videoStatus,r=e.whiteboardStatus,i=e.combineStatus,o={whiteboard:this.getStatus(d.a.Whiteboard).previous,video:this.getStatus(d.a.Video).previous},a={whiteboard:r,video:n};this.debug("CombinedStatus",i,{previous:{whiteboard:d.b[o.whiteboard],video:d.b[o.video]},current:{whiteboard:d.b[a.whiteboard],video:d.b[a.video]}}),this.events.emit(i,o,a,(function(){t.setPreviousStatus(r,n)}))}},{key:"initTables",value:function(){var e=function(e){return function(t,n){return Object.freeze({combineStatus:e,whiteboardStatus:t,videoStatus:n})}},t=e(d.c.PauseSeeking),n=e(d.c.PlayingSeeking),r=e(d.c.PauseBuffering),i=e(d.c.PlayingBuffering),o=e(d.c.ToPlay),a=e(d.c.ToPause),s=e(d.c.Pause),u=e(d.c.Playing),l=e(d.c.Disabled),c=e(d.c.Ended);return Object.freeze([Object.freeze([t(d.b.PauseSeeking,d.b.PauseSeeking),t(d.b.PauseSeeking,d.b.Pause),l(d.b.PauseSeeking,d.b.PauseBuffering),l(d.b.PauseSeeking,d.b.PlayingBuffering),l(d.b.PauseSeeking,d.b.Playing),l(d.b.PauseSeeking,d.b.PlayingSeeking),t(d.b.PauseSeeking,d.b.Ended)]),Object.freeze([t(d.b.Pause,d.b.PauseSeeking),s(d.b.Pause,d.b.Pause),r(d.b.Pause,d.b.PauseBuffering),i(d.b.Pause,d.b.PlayingBuffering),o(d.b.Pause,d.b.Playing),n(d.b.Pause,d.b.PlayingSeeking),c(d.b.Pause,d.b.Ended)]),Object.freeze([l(d.b.PauseBuffering,d.b.PauseSeeking),r(d.b.PauseBuffering,d.b.Pause),r(d.b.PauseBuffering,d.b.PauseBuffering),l(d.b.PauseBuffering,d.b.PlayingBuffering),l(d.b.PauseBuffering,d.b.Playing),l(d.b.PauseBuffering,d.b.PlayingSeeking),l(d.b.PauseBuffering,d.b.Ended)]),[l(d.b.PlayingBuffering,d.b.PauseSeeking),i(d.b.PlayingBuffering,d.b.Pause),l(d.b.PlayingBuffering,d.b.PauseBuffering),i(d.b.PlayingBuffering,d.b.PlayingBuffering),a(d.b.PlayingBuffering,d.b.Playing),l(d.b.PlayingBuffering,d.b.PlayingSeeking),l(d.b.PlayingBuffering,d.b.Ended)],Object.freeze([l(d.b.Playing,d.b.PauseSeeking),o(d.b.Playing,d.b.Pause),l(d.b.Playing,d.b.PauseBuffering),a(d.b.Playing,d.b.PlayingBuffering),u(d.b.Playing,d.b.Playing),a(d.b.Playing,d.b.PlayingSeeking),a(d.b.Playing,d.b.Ended)]),Object.freeze([l(d.b.PlayingSeeking,d.b.PauseSeeking),n(d.b.PlayingSeeking,d.b.Pause),l(d.b.PlayingSeeking,d.b.PauseBuffering),l(d.b.PlayingSeeking,d.b.PlayingBuffering),a(d.b.PlayingSeeking,d.b.Playing),n(d.b.PlayingSeeking,d.b.PlayingSeeking),n(d.b.PlayingSeeking,d.b.Ended)]),Object.freeze([t(d.b.Ended,d.b.PauseSeeking),c(d.b.Ended,d.b.Pause),l(d.b.Ended,d.b.PauseBuffering),l(d.b.Ended,d.b.PlayingBuffering),a(d.b.Ended,d.b.Playing),n(d.b.Ended,d.b.PlayingSeeking),c(d.b.Ended,d.b.Ended)])])}}]),e}(),g=function(){function e(){u()(this,e),this.queue=[],this.isHanding=!1}var t;return c()(e,[{key:"append",value:function(e){var t=this;return new Promise((function(n,r){var i={handler:e,resolve:n,reject:r};t.queue.push(i),t.isHanding||t.startHandingTasksLoop()}))}},{key:"destroy",value:function(){this.queue=[]}},{key:"startHandingTasksLoop",value:(t=a()(i.a.mark((function e(){var t;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0,this.isHanding=!0;case 2:if(!(this.queue.length>0)){e.next=20;break}return t=this.queue[0],e.prev=4,e.t0=t,e.next=8,t.handler();case 8:e.t1=e.sent,e.t0.resolve.call(e.t0,e.t1),e.next=15;break;case 12:e.prev=12,e.t2=e.catch(4),t.reject(e.t2);case 15:return e.prev=15,this.queue.shift(),e.finish(15);case 18:e.next=2;break;case 20:e.next=25;break;case 22:throw e.prev=22,e.t3=e.catch(0),new Error(e.t3);case 25:return e.prev=25,this.isHanding=!1,e.finish(25);case 28:case"end":return e.stop()}}),e,this,[[0,22,25,28],[4,12,15,18]])}))),function(){return t.apply(this,arguments)})}]),e}(),y=function(){function e(t){u()(this,e),this.video=void 0,this.whiteboard=void 0,this.videoOptions=void 0,this.stateMachine=void 0,this._playbackRate=1,this.seekTime=NaN,this.triggerSource=d.e.None,this.currentCombineStatus=d.d.PauseBuffering,this.whiteboardEmitter=void 0,this.taskQueue=new g,this.onStatusChangeHandleList=[];var n=t.videoConfig,r=t.whiteboard,i=t.whiteboardEmitter,o=t.debug;this.videoOptions=n.videoOptions,this.video=n.video,this.whiteboard=r,this.whiteboardEmitter=i,this.stateMachine=new m(o),this.initOnCrashByDisabledStatusCallback(),this.initVideo(n.isCanplay),this.initWhiteboard()}var t,n,r,o,s,l,h,f,v,y,b,x,_,w,T,M,S,E;return c()(e,[{key:"setOnStatusChange",value:function(e){this.onStatusChangeHandleList.push(e)}},{key:"removeStatusChange",value:function(e){this.onStatusChangeHandleList=this.onStatusChangeHandleList.filter((function(t){return t!==e}))}},{key:"removeAllStatusChange",value:function(){this.onStatusChangeHandleList=[]}},{key:"getStatus",value:function(){return this.combinedStatus}},{key:"playbackSpeed",value:function(e){this.playbackRate=e}},{key:"stop",value:function(){if(this.currentCombineStatus===d.d.Stopped)throw new Error(p.d);if(this.currentCombineStatus===d.d.Disabled)throw new Error(p.c);this.releaseEvents(),this.onStatusUpdate(d.d.Stopped)}},{key:"play",value:(E=a()(i.a.mark((function e(){var t=this;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isNotResponse()){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.taskQueue.append(a()(i.a.mark((function e(){var n,r,o;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.triggerSource=d.e.Plugin,n=t.stateMachine.getCombinationStatus().current,e.t0=n,e.next=e.t0===d.c.Pause?5:e.t0===d.c.PauseBuffering?8:e.t0===d.c.Ended?24:27;break;case 5:return e.next=7,t.playWhenPause();case 7:return e.abrupt("break",27);case 8:if(r=t.stateMachine.getStatus(d.a.Video).current,o=t.stateMachine.getStatus(d.a.Whiteboard).current,r!==d.b.Pause||o!==d.b.PauseBuffering){e.next=15;break}return e.next=13,t.playWhenVideoIsPauseAndWhiteboardIsPauseBuffering();case 13:e.next=23;break;case 15:if(r!==d.b.PauseBuffering||o!==d.b.Pause){e.next=21;break}return t.onStatusUpdate(d.d.PlayingBuffering),e.next=19,t.playWhenPause();case 19:e.next=23;break;case 21:return e.next=23,t.playWhenAllPlayerIsPauseBuffering();case 23:return e.abrupt("break",27);case 24:return e.next=26,t.playWhenEnded();case 26:return e.abrupt("break",27);case 27:if(isNaN(t.seekTime)){e.next=31;break}return e.next=30,t.seekWhenPlaying(t.seekTime);case 30:t.seekTime=NaN;case 31:t.triggerSource=d.e.None;case 32:case"end":return e.stop()}}),e)}))));case 4:case"end":return e.stop()}}),e,this)}))),function(){return E.apply(this,arguments)})},{key:"pause",value:(S=a()(i.a.mark((function e(){var t=this;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isNotResponse()){e.next=2;break}return e.abrupt("return");case 2:return e.abrupt("return",this.taskQueue.append(a()(i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.triggerSource=d.e.Plugin,t.stateMachine.getCombinationStatus().current!==d.c.Playing){e.next=5;break}return e.next=5,t.pauseWhenPlaying();case 5:t.triggerSource=d.e.None;case 6:case"end":return e.stop()}}),e)})))));case 3:case"end":return e.stop()}}),e,this)}))),function(){return S.apply(this,arguments)})},{key:"seek",value:(M=a()(i.a.mark((function e(t){var n=this;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isNotResponse()){e.next=2;break}return e.abrupt("return");case 2:return e.abrupt("return",this.taskQueue.append(a()(i.a.mark((function e(){var r,o,a,s,u,l,c,h,f;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n.whiteboard.progressTime,o=n.video.currentTime(),0!==r||0!==o){e.next=5;break}return 0!==t&&(n.seekTime=t),e.abrupt("return");case 5:n.triggerSource=d.e.Plugin,a=n.stateMachine.getCombinationStatus().current,e.t0=a,e.next=e.t0===d.c.Playing?10:e.t0===d.c.Pause||e.t0===d.c.PauseBuffering?13:e.t0===d.c.Ended?23:30;break;case 10:return e.next=12,n.seekWhenPlaying(t);case 12:return e.abrupt("break",30);case 13:if(s=n.getPlayerDuration(),u=s.video,l=s.whiteboard,!(t>u||t>l)){e.next=20;break}return e.next=18,n.seekWhenPauseFinallyIsEnded(t,s);case 18:e.next=22;break;case 20:return e.next=22,n.seekWhenPause(t);case 22:return e.abrupt("break",30);case 23:if(c=n.getPlayerDuration(),h=c.video,f=c.whiteboard,!(t<=h&&t<=f)){e.next=29;break}return e.next=27,n.seekWhenPause(t);case 27:return e.next=29,n.playWhenPause();case 29:return e.abrupt("break",30);case 30:n.triggerSource=d.e.None;case 31:case"end":return e.stop()}}),e)})))));case 3:case"end":return e.stop()}}),e,this)}))),function(e){return M.apply(this,arguments)})},{key:"initVideo",value:function(e){this.stateMachine.setStatus(d.a.Video,e?d.b.Pause:d.b.PauseBuffering),e||(this.currentCombineStatus=d.d.PauseBuffering),this.initVideoJSEvents()}},{key:"initVideoJSEvents",value:function(){var e=this,t=!1,n=function(t){return a()(i.a.mark((function n(){return i.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(e.triggerSource!==d.e.None&&e.triggerSource!==d.e.Video){n.next=4;break}return e.triggerSource=d.e.Video,n.next=4,t();case 4:case"end":return n.stop()}}),n)})))};this.video.on("canplay",(function(){var t=e.stateMachine.getStatus(d.a.Whiteboard).current;e.stateMachine.getStatus(d.a.Video).current===d.b.PauseBuffering&&(e.stateMachine.setStatus(d.a.Video,d.b.Pause),t===d.b.Pause&&e.onStatusUpdate(d.d.Pause))})),this.video.on("seeking",n(a()(i.a.mark((function n(){return i.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,e.taskQueue.append((function(){t=!0}));case 2:case"end":return n.stop()}}),n)}))))),this.video.on("waiting",n(a()(i.a.mark((function t(){return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.onStatusUpdate(d.d.PlayingBuffering),t.next=3,e.taskQueue.append((function(){return e.pauseWhiteboardWhenVideoWaiting()}));case 3:e.triggerSource=d.e.None;case 4:case"end":return t.stop()}}),t)}))))),this.video.on("playing",n(a()(i.a.mark((function n(){return i.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,e.taskQueue.append(a()(i.a.mark((function n(){return i.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!t){n.next=2;break}return n.abrupt("return",e.playingWhiteboardWhenVideoPlayingDropFrame());case 2:return n.abrupt("return",e.playingWhiteboardWhenVideoPlaying());case 3:case"end":return n.stop()}}),n)}))));case 2:t=!1,e.triggerSource=d.e.None;case 4:case"end":return n.stop()}}),n)}))))),this.video.on("ended",n(a()(i.a.mark((function t(){return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.taskQueue.append((function(){return e.pauseWhiteboardWhenVideoEnded()}));case 2:e.triggerSource=d.e.None;case 3:case"end":return t.stop()}}),t)}))))),this.video.on("fullscreenchange",n(a()(i.a.mark((function t(){return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.taskQueue.append((function(){var t=e.stateMachine.getStatus(d.a.Video).current;t!==d.b.Playing&&t!==d.b.PlayingBuffering||!e.video.isFullscreen()&&e.video.paused()&&(e.whiteboardEmitter.one("pause",(function(){e.stateMachine.setStatus(d.a.Whiteboard,d.b.Pause),e.stateMachine.setStatus(d.a.Video,d.b.Pause),e.onStatusUpdate(d.d.Pause)})),e.whiteboard.pause()),e.triggerSource=d.e.None}));case 2:case"end":return t.stop()}}),t)})))))}},{key:"initWhiteboard",value:function(){this.initWhiteboardIsPlayable(),this.initWhiteboardEvents(),this.stateMachine.setStatus(d.a.Whiteboard,d.b.PauseBuffering),this.currentCombineStatus=d.d.PauseBuffering,this.whiteboard.seekToProgressTime(0)}},{key:"initWhiteboardIsPlayable",value:function(){var e=this;this.whiteboardEmitter.addListener("playableChange",(function(t){var n=e.stateMachine.getStatus(d.a.Whiteboard).current,r=e.stateMachine.getStatus(d.a.Video).current;t&&n===d.b.PauseBuffering&&(e.stateMachine.setStatus(d.a.Whiteboard,d.b.Pause),r===d.b.Pause&&e.onStatusUpdate(d.d.Pause))}))}},{key:"initWhiteboardEvents",value:function(){var e=this,t=function(t){return a()(i.a.mark((function n(){return i.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(e.triggerSource!==d.e.None&&e.triggerSource!==d.e.Whiteboard){n.next=5;break}return e.triggerSource=d.e.Whiteboard,n.next=4,t();case 4:e.triggerSource=d.e.None;case 5:case"end":return n.stop()}}),n)})))};this.whiteboardEmitter.addListener("buffering",t(a()(i.a.mark((function t(){return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.taskQueue.append((function(){return e.pauseVideoWhenWhiteboardBuffering()}));case 2:case"end":return t.stop()}}),t)}))))),this.whiteboardEmitter.addListener("playing",t(a()(i.a.mark((function t(){return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.taskQueue.append((function(){return e.playingVideoWhenWhiteboardPlaying()}));case 2:case"end":return t.stop()}}),t)}))))),this.whiteboardEmitter.addListener("ended",t(a()(i.a.mark((function t(){return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.taskQueue.append((function(){return e.pauseVideoWhenWhiteboardEnded()}));case 2:case"end":return t.stop()}}),t)})))))}},{key:"playWhenPause",value:(T=a()(i.a.mark((function e(){var t,n,r,o,s=this;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.stateMachine.lockCombineStatus([d.c.ToPlay,d.c.Playing],[d.c.Playing]),t=function(){s.stateMachine.setStatus(d.a.Video,d.b.Playing)},n=function(){s.stateMachine.setStatus(d.a.Whiteboard,d.b.Playing)},this.whiteboardEmitter.one("playing",n),r=this.stateMachine.one(d.c.ToPlay,a()(i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s.whiteboard.play();case 1:case"end":return e.stop()}}),e)})))),o=this.stateMachine.one(d.c.Playing,a()(i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s.onStatusUpdate(d.d.Playing);case 1:case"end":return e.stop()}}),e)})))),this.video.one("playing",t),this.video.play(),e.next=10,Promise.all([r,o]);case 10:case"end":return e.stop()}}),e,this)}))),function(){return T.apply(this,arguments)})},{key:"playWhenVideoIsPauseAndWhiteboardIsPauseBuffering",value:(w=a()(i.a.mark((function e(){var t,n,r,o,s,u,l,c,h,f=this;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.stateMachine.lockCombineStatus([d.c.Disabled,d.c.Pause,d.c.PauseBuffering,d.c.ToPlay,d.c.Playing],[d.c.Playing]),t=function(){f.stateMachine.setStatus(d.a.Video,d.b.Playing)},n=function(){f.stateMachine.setStatus(d.a.Video,d.b.Pause)},r=function(){f.stateMachine.setStatus(d.a.Whiteboard,d.b.PlayingBuffering)},o=function(){f.stateMachine.setStatus(d.a.Whiteboard,d.b.Playing)},s=function(){f.whiteboardEmitter.removeListener("playing",o),f.whiteboardEmitter.removeListener("buffering",r),f.video.off("playing",t),f.video.off("pause",n)},this.stateMachine.oneButNotCrashByDisabled([{video:d.b.Playing,whiteboard:d.b.PauseBuffering}],a()(i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:f.video.pause();case 1:case"end":return e.stop()}}),e)})))).catch((function(e){throw Error(e)})),u=this.stateMachine.one(d.c.PauseBuffering,a()(i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:f.whiteboard.play();case 1:case"end":return e.stop()}}),e)})))),l=this.stateMachine.one(d.c.Pause,a()(i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:f.whiteboard.play();case 1:case"end":return e.stop()}}),e)})))),c=this.stateMachine.one(d.c.ToPlay,a()(i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:f.video.play();case 1:case"end":return e.stop()}}),e)})))),h=this.stateMachine.one(d.c.Playing,a()(i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:f.onStatusUpdate(d.d.Playing),f.stateMachine.off([d.c.PauseBuffering,d.c.Pause,d.c.ToPlay]),s();case 3:case"end":return e.stop()}}),e)})))),this.whiteboardEmitter.one("buffering",r),this.whiteboardEmitter.one("playing",o),this.video.on("playing",t),this.video.one("pause",n),this.video.play(),e.next=18,Promise.all([Promise.race([u,l]),c,h]);case 18:case"end":return e.stop()}}),e,this)}))),function(){return w.apply(this,arguments)})},{key:"playWhenAllPlayerIsPauseBuffering",value:(_=a()(i.a.mark((function e(){var t,n,r,o,s,u,l,c,h,f=this;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.stateMachine.lockCombineStatus([d.c.Disabled,d.c.ToPause,d.c.ToPlay,d.c.Playing],[d.c.Playing]),t=function(){f.stateMachine.setStatus(d.a.Whiteboard,d.b.PlayingBuffering)},n=function(){f.stateMachine.setStatus(d.a.Whiteboard,d.b.Playing)},r=function(){f.stateMachine.setStatus(d.a.Whiteboard,d.b.Pause)},o=function(){f.stateMachine.setStatus(d.a.Video,d.b.Playing)},s=function(){f.stateMachine.setStatus(d.a.Video,d.b.PlayingBuffering)},u=function(){f.stateMachine.setStatus(d.a.Video,d.b.Pause)},this.stateMachine.oneButNotCrashByDisabled([{video:d.b.PlayingBuffering,whiteboard:d.b.PauseBuffering},{video:d.b.PauseBuffering,whiteboard:d.b.PlayingBuffering}],a()(i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:f.stateMachine.oneButNotCrashByDisabled([{video:d.b.Playing,whiteboard:d.b.PauseBuffering},{video:d.b.PauseBuffering,whiteboard:d.b.Playing}],function(){var e=a()(i.a.mark((function e(t){var n;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(n=t.current).video===d.b.Playing?f.video.pause():n.whiteboard===d.b.Playing&&f.whiteboard.pause();case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){throw Error(e)}));case 1:case"end":return e.stop()}}),e)})))).catch((function(e){throw Error(e)})),l=this.stateMachine.one(d.c.ToPause,function(){var e=a()(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.current.video===d.b.Playing?f.video.pause():f.whiteboard.pause();case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),c=this.stateMachine.one(d.c.ToPlay,function(){var e=a()(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.current.video===d.b.Playing?f.whiteboard.play():f.video.play();case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),h=this.stateMachine.one(d.c.Playing,a()(i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:f.onStatusUpdate(d.d.Playing),f.stateMachine.cancelOneButNotCrashByDisabled(),f.stateMachine.off([d.c.ToPause,d.c.ToPlay]),f.video.off("playing",o),f.whiteboardEmitter.removeListener("playing",n),f.whiteboardEmitter.removeListener("pause",r);case 6:case"end":return e.stop()}}),e)})))),this.whiteboardEmitter.one("buffering",t),this.whiteboardEmitter.addListener("playing",n),this.whiteboardEmitter.one("pause",r),this.video.on("playing",o),this.video.one("play",s),this.video.one("pause",u),this.video.play(),this.whiteboard.play(),e.next=21,Promise.all([Promise.race([l,c]),h]);case 21:case"end":return e.stop()}}),e,this)}))),function(){return _.apply(this,arguments)})},{key:"playWhenEnded",value:(x=a()(i.a.mark((function e(){var t,n,r,o,s,u,l,c,h,f=this;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.onStatusUpdate(d.d.PlayingBuffering),t=NaN,this.stateMachine.lockCombineStatus([d.c.Pause],[d.c.Pause]),n=function(){f.stateMachine.setStatus(d.a.Whiteboard,d.b.PauseSeeking)},r=function(){f.stateMachine.setStatus(d.a.Whiteboard,d.b.Pause)},o=function(){f.whiteboard.pause()},s=function(){f.video.off("pause",u),f.video.off("play",l),f.video.one("play",(function(){f.video.one("pause",(function(){f.stateMachine.setStatus(d.a.Video,d.b.Pause)})),f.video.pause()})),f.video.play()},u=function(){f.video.play()},l=function(){f.video.pause()},c=function(){f.stateMachine.setStatus(d.a.Video,d.b.PauseSeeking),t=window.setInterval((function(){f.video.readyState()>=d.f.HAVE_CURRENT_DATA&&(clearInterval(t),f.video.play())}),500)},h=this.stateMachine.one(d.c.Pause,a()(i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return f.whiteboardEmitter.removeListener("buffering",n),f.whiteboardEmitter.removeListener("playing",o),clearInterval(t),e.next=5,f.playWhenPause();case 5:case"end":return e.stop()}}),e)})))),this.whiteboardEmitter.one("buffering",n),this.whiteboardEmitter.one("pause",r),this.whiteboardEmitter.one("playing",o),this.video.one("seeking",c),this.video.one("seeked",s),this.video.on("play",l),this.video.on("pause",u),this.whiteboard.seekToProgressTime(0),this.video.currentTime(0),e.next=22,h;case 22:case"end":return e.stop()}}),e,this)}))),function(){return x.apply(this,arguments)})},{key:"pauseWhenPlaying",value:(b=a()(i.a.mark((function e(){var t,n,r,o=this;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.stateMachine.lockCombineStatus([d.c.Pause],[d.c.Pause]),t=function(){o.stateMachine.setStatus(d.a.Whiteboard,d.b.Pause)},n=function(){o.stateMachine.setStatus(d.a.Video,d.b.Pause)},r=this.stateMachine.one(d.c.Pause,a()(i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o.onStatusUpdate(d.d.Pause);case 1:case"end":return e.stop()}}),e)})))),this.whiteboardEmitter.one("pause",t),this.video.one("pause",n),this.whiteboard.pause(),this.video.pause(),e.next=10,r;case 10:case"end":return e.stop()}}),e,this)}))),function(){return b.apply(this,arguments)})},{key:"seekWhenPlaying",value:(y=a()(i.a.mark((function e(t){var n,r,o,s,u,l,c,h,f,p,v,m=this;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.onStatusUpdate(d.d.PlayingSeeking),n=NaN,r=this.getPlayerDuration(),this.stateMachine.lockCombineStatus([d.c.Pause,d.c.Ended,d.c.PlayingSeeking],[d.c.Pause,d.c.Ended]),o=function(){m.stateMachine.setStatus(d.a.Whiteboard,d.b.PlayingSeeking)},s=function(){t=d.f.HAVE_CURRENT_DATA&&(clearInterval(n),t=d.f.HAVE_CURRENT_DATA&&(clearInterval(n),h.stateMachine.setStatus(d.a.Video,d.b.Pause))}),500)},o=function(){h.stateMachine.setStatus(d.a.Whiteboard,d.b.PauseSeeking)},s=function(){h.stateMachine.setStatus(d.a.Whiteboard,d.b.Pause)},u=function(){h.whiteboard.pause()},l=function(){clearInterval(n),h.video.off("seeking",r),h.whiteboardEmitter.removeListener("buffering",o),h.whiteboardEmitter.removeListener("pause",s)},this.stateMachine.oneButNotCrashByDisabled([{video:d.b.PauseSeeking,whiteboard:d.b.PauseSeeking}]).catch((function(e){throw Error(e)})),c=this.stateMachine.one(d.c.Pause,a()(i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:h.onStatusUpdate(d.d.Pause),h.stateMachine.cancelOneButNotCrashByDisabled(),h.stateMachine.off(d.c.Ended),h.whiteboardEmitter.removeListener("playing",u),l();case 5:case"end":return e.stop()}}),e)})))),this.video.one("seeking",r),this.whiteboardEmitter.one("buffering",o),this.whiteboardEmitter.one("playing",u),this.whiteboardEmitter.one("pause",s),this.whiteboard.seekToProgressTime(t),this.video.currentTime(t/1e3),e.next=18,c;case 18:case"end":return e.stop()}}),e,this)}))),function(e){return v.apply(this,arguments)})},{key:"seekWhenPauseFinallyIsEnded",value:(f=a()(i.a.mark((function e(t,n){var r,o,s,u,l,c,h,f=this;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.onStatusUpdate(d.d.PauseSeeking),r=NaN,this.stateMachine.lockCombineStatus([d.c.Disabled,d.c.Ended],[d.c.Ended]),o=function(){f.stateMachine.setStatus(d.a.Video,d.b.PauseSeeking),r=window.setInterval((function(){f.video.readyState()>=d.f.HAVE_CURRENT_DATA&&(clearInterval(r),f.stateMachine.setStatus(d.a.Video,d.b.Pause),t>=n.video&&f.stateMachine.setStatus(d.a.Video,d.b.Ended))}),500)},s=function(){t1?t-1:0),r=1;r2&&void 0!==arguments[2]&&arguments[2];a()(this,e),this.videoOptions=void 0,this.whiteboard=void 0,this.debug=void 0,Object(l.a)(n);var i=e.videoDefaultOptions(n);this.videoOptions=y(y(y({},i),n),{},{videoJsOptions:y(y({},i.videoJsOptions),n.videoJsOptions)}),this.whiteboard=t,this.debug=r}return u()(e,[{key:"create",value:function(){var e=new c.a;this.handleWhiteboardCallback(e);var t=this.getVideoDOM(),n=f()(t,this.videoOptions.videoJsOptions);return n.src(this.videoOptions.url),new h.a({videoConfig:{videoOptions:this.videoOptions,video:n,isCanplay:n.readyState()>p.f.HAVE_CURRENT_DATA},whiteboard:this.whiteboard,whiteboardEmitter:e,debug:this.debug})}},{key:"getVideoDOM",value:function(){return void 0!==this.videoOptions.videoElementID?document.getElementById(this.videoOptions.videoElementID):this.videoOptions.videoDOM}},{key:"handleWhiteboardCallback",value:function(e){this.whiteboard.callbacks.on("onPhaseChanged",(function(t){e.emit(t)})),this.whiteboard.callbacks.on("onIsPlayableChanged",(function(t){e.emit("playableChange",t)}))}}],[{key:"videoDefaultOptions",value:function(e){var t={videoJsOptions:{preload:"auto"}};return e.videoDOM||e.videoElementID||(t.videoDOM=document.createElement("video")),t}}]),e}()},0:function(e,t,n){e.exports=n("./src/index.ts")},"@babel/runtime/helpers/asyncToGenerator":function(e,t){e.exports=n(34397)},"@babel/runtime/helpers/classCallCheck":function(e,t){e.exports=n(57750)},"@babel/runtime/helpers/createClass":function(e,t){e.exports=n(67338)},"@babel/runtime/helpers/defineProperty":function(e,t){e.exports=n(91566)},"@babel/runtime/regenerator":function(e,t){e.exports=n(64910)},"video.js":function(e,t){e.exports=n(30825)}})},20597:function(e,t,n){var r,i,o,a;function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}e=n.nmd(e),window,a=function(e,t){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==s(e)&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=7)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAYAAADFeBvrAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAYISURBVHgB7ZpNSCtXFIBPEuvz+dMGpYUKD/sWFX+Qti6kK7Hqpm6e9q0rIoIUFUShPLV10VZx4+JZqa9v20LBhdq9fyBUCtKNPH8qYl2IOw3G38Rkek4y15y5uTOZJDOWggcOSSYzN/ebc+45554JwIM8iBCPyTEP+86T4vyMfsRN4b+nQTKIJp0vzuGvlpID7os8EQNEIBD4oKio6Bm9DwaDv/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MDcsMTQuODk4MDg1IDI0LjEzNDUxMjMsMTQuOTg5OTQ3OSBMMjQsMTUgTDIxLDE1IEwyMSwyNSBMMjQsMjUgQzI0LjU1MjI4NDcsMjUgMjUsMjUuNDQ3NzE1MyAyNSwyNiBDMjUsMjYuNDg1NDEwMyAyNC42NTIwMDA3LDI2Ljg5ODA4NSAyNC4xMzQ1MTIzLDI2Ljk4OTk0NzkgTDI0LDI3IEwxNiwyNyBDMTUuNDQ3NzE1MywyNyAxNSwyNi41NTIyODQ3IDE1LDI2IEMxNSwyNS41MTQ1ODk3IDE1LjM0Nzk5OTMsMjUuMTAxOTE1IDE1Ljg2NTQ4NzcsMjUuMDEwMDUyMSBMMTYsMjUgTDE5LDI1IFoiIGZpbGw9IiMyMTIzMjQiIGZpbGwtcnVsZT0iZXZlbm9kZCI+PC9wYXRoPgogICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4="},function(e,t,n){n.r(t),n.d(t,"CursorTool",(function(){return y}));var r,i=n(0),o=n(1),a=n(2),s=n.n(a),u=n(3),l=n.n(u),c=n(4),h=n.n(c),d=n(5),f=n.n(d),p=n(6),v=n.n(p),m=(n(8),r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),g=function(e){function t(t){var n=e.call(this,t)||this;return n.renderAvatar=function(e){var t,r="rgb("+e.memberState.strokeColor[0]+", "+e.memberState.strokeColor[1]+", "+e.memberState.strokeColor[2]+")";if(n.detectAvatar(e)){var o=n.detectCursorName(e);return i.createElement("img",{className:"cursor-selector-avatar",style:{width:o?19:28,height:o?19:28,position:o?"initial":"absolute",borderColor:o?"white":r,marginRight:o?4:0},src:null===(t=e.payload)||void 0===t?void 0:t.avatar,alt:"avatar"})}return null},n.getOpacity=function(e){var t=n.getCursorName(e),r=n.detectAvatar(e);return void 0===t&&void 0===r?0:1},n.getCursorName=function(e){return e.payload&&e.payload.cursorName?e.payload.cursorName:void 0},n.getThemeClass=function(e){return e.payload&&e.payload.theme?"cursor-inner-mellow":"cursor-inner"},n.getCursorBackgroundColor=function(e){var t=n.detectCursorName(e);return e.payload&&e.payload.cursorBackgroundColor?e.payload.cursorBackgroundColor:t?"rgb("+e.memberState.strokeColor[0]+", "+e.memberState.strokeColor[1]+", "+e.memberState.strokeColor[2]+")":void 0},n.getCursorTextColor=function(e){return e.payload&&e.payload.cursorTextColor?e.payload.cursorTextColor:"#FFFFFF"},n.getCursorTagBackgroundColor=function(e){return e.payload&&e.payload.cursorTagBackgroundColor?e.payload.cursorTagBackgroundColor:n.getCursorBackgroundColor(e)},n.detectCursorName=function(e){return!(!e.payload||!e.payload.cursorName)},n.detectAvatar=function(e){return!(!e.payload||!e.payload.avatar)},n.renderTag=function(e){return e.payload&&e.payload.cursorTagName?i.createElement("span",{className:"cursor-tag-name",style:{backgroundColor:n.getCursorTagBackgroundColor(e)}},e.payload.cursorTagName):void 0},n}return m(t,e),t.prototype.render=function(){var e=this.props.roomMember,t=this.getCursorName(e);switch(e.memberState.currentApplianceName){case o.ApplianceNames.pencil:return i.createElement("div",{className:"cursor-box"},i.createElement("div",{className:"cursor-mid cursor-pencil-offset"},i.createElement("div",{className:"cursor-name"},i.createElement("div",{style:{opacity:this.getOpacity(e),backgroundColor:this.getCursorBackgroundColor(e),color:this.getCursorTextColor(e)},className:this.getThemeClass(e)},this.renderAvatar(e),t,this.renderTag(e))),i.createElement("div",null,i.createElement("img",{className:"cursor-pencil-image",src:s.a,alt:"pencilCursor"}))));case o.ApplianceNames.selector:return i.createElement("div",{className:"cursor-box"},i.createElement("div",{className:"cursor-mid cursor-selector-offset"},i.createElement("div",null,i.createElement("img",{className:"cursor-selector-image",src:l.a,alt:"selectorCursor"})),i.createElement("div",{className:"cursor-name"},i.createElement("div",{style:{opacity:this.getOpacity(e),backgroundColor:this.getCursorBackgroundColor(e),color:this.getCursorTextColor(e)},className:this.getThemeClass(e)},this.renderAvatar(e),t,this.renderTag(e)))));case o.ApplianceNames.eraser:return i.createElement("div",{className:"cursor-box"},i.createElement("div",{className:"cursor-mid cursor-pencil-offset"},i.createElement("div",{className:"cursor-name"},i.createElement("div",{style:{opacity:this.getOpacity(e),backgroundColor:this.getCursorBackgroundColor(e),color:this.getCursorTextColor(e)},className:this.getThemeClass(e)},this.renderAvatar(e),t,this.renderTag(e))),i.createElement("div",null,i.createElement("img",{className:"cursor-pencil-image",src:h.a,alt:"selectorCursor"}))));case o.ApplianceNames.text:return i.createElement("div",{className:"cursor-box"},i.createElement("div",{className:"cursor-text-offset cursor-mid"},i.createElement("div",{className:"cursor-name"},i.createElement("div",{style:{opacity:this.getOpacity(e),backgroundColor:this.getCursorBackgroundColor(e),color:this.getCursorTextColor(e)},className:this.getThemeClass(e)},this.renderAvatar(e),t,this.renderTag(e))),i.createElement("div",null,i.createElement("img",{src:v.a,alt:"selectorCursor"}))));default:return i.createElement("div",{className:"cursor-box"},i.createElement("div",{className:"cursor-shape-offset cursor-mid"},i.createElement("div",{className:"cursor-name"},i.createElement("div",{style:{opacity:this.getOpacity(e),backgroundColor:this.getCursorBackgroundColor(e),color:this.getCursorTextColor(e)},className:this.getThemeClass(e)},this.renderAvatar(e),t,this.renderTag(e))),i.createElement("div",null,i.createElement("img",{src:f.a,alt:"shapeCursor"}))))}},t}(i.Component),y=function(){function e(){this.cursors={},this.roomMembers=[],this.isFirstFrameReady=!1,this.isCursorDisappear=function(e){return!(!e.payload||!e.payload.disappearCursor)}}return e.prototype.createCursor=function(){return{x:64,y:64,width:128,height:128}},e.prototype.onAddedCursor=function(e){for(var t=0,n=this.roomMembers;t0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]this.totalPage)return;this.displayer.setSceneIndex(e-1),this.dispatchMagixEvent(h.NextPage,{})}},t.prototype.handlePrevPage=function(){if(this.canOperation){var e=this.currentPage-1;if(e<0)return;this.displayer.setSceneIndex(e-1),this.dispatchMagixEvent(h.PrevPage,{})}},t.prototype.handlePageTo=function(e){if(this.canOperation){var t=e.payload;if(!Number.isSafeInteger(t)||t<=0)return;var n=t-1;this.displayer.setSceneIndex(n),this.dispatchMagixEvent(h.PageTo,n)}},t.prototype.handleRemoveAllMagixEvent=function(){var e=this;this.magixEventMap.forEach((function(t,n){e.displayer.removeMagixEventListener(n,t)})),this.magixEventMap.clear()},t.prototype.handleGetAttributes=function(){this.postMessage({kind:h.GetAttributes,payload:this.attributes})},t.prototype.postMessage=function(e){var t;this.iframe&&(null===(t=this.iframe.contentWindow)||void 0===t||t.postMessage(JSON.parse(JSON.stringify(e)),"*"))},t.prototype.dispatchMagixEvent=function(t,n){this.canOperation&&(e.prototype.setAttributes.call(this,{lastEvent:{name:t,payload:n}}),this.displayer.dispatchMagixEvent(t,n))},Object.defineProperty(t.prototype,"currentIndex",{get:function(){return this.displayer.state.sceneState.index},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentPage",{get:function(){return this.currentIndex+1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"totalPage",{get:function(){return this.displayer.state.sceneState.scenes.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"readonly",{get:function(){return!this.displayer.isWritable},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isReplay",{get:function(){return(0,o.isPlayer)(this.displayer)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"inDisplaySceneDir",{get:function(){return this.displayer.state.sceneState.scenePath.startsWith(this.attributes.displaySceneDir)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canOperation",{get:function(){return!this.isReplay&&(!this.readonly&&this.displayer.phase===o.RoomPhase.Connected)},enumerable:!1,configurable:!0}),t.prototype.isClicker=function(){if(this.readonly)return!1;var e=this.displayer.state.memberState.currentApplianceName;return this.allowAppliances.includes(e)},Object.defineProperty(t.prototype,"isDisableInput",{get:function(){return!("disableDeviceInputs"in this.displayer)||this.displayer.disableDeviceInputs},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"iframeOrigin",{get:function(){return this.iframe?new URL(this.iframe.src).origin:void 0},enumerable:!1,configurable:!0}),t.prototype._destory=function(){var e=this;window.removeEventListener("message",this.messageListener),this.magixEventMap.forEach((function(t,n){e.displayer.removeMagixEventListener(n,t)})),this.displayer.callbacks.off(this.callbackName,this.stateChangeListener),this.displayer.callbacks.off("onPhaseChanged",this.onPhaseChangedListener),this.magixEventMap.clear(),this.iframe&&(t.emitter.emit(h.Destory),this.iframe=null,t.alreadyCreate=!1),this.bridgeDisposer(),t.emitter.removeAllListeners()},t.kind="IframeBridge",t.emitter=new a.EventEmitter2,t.alreadyCreate=!1,t}(o.InvisiblePlugin);t.IframeBridge=g},24182:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.times=void 0;t.times=function(e,t){return new Array(e).fill(0).map((function(e,n){return t(n)}))}},82372:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.EffectPlugin=void 0;var r,i=n(26913),o=(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=function(e){function t(n,r,i){var o,a,s,u,l,c,h,d=e.call(this)||this;return d._volume=50,d._currentTime=0,d._isPaused=!0,d._duration=0,d.timer=null,d._startPos=0,d.onDurationBack=function(e,t){d.url===e&&(d._duration=t/1e3),d.emit("load")},d.onEffectStop=function(e){e===d.soundIndex&&(window.clearInterval(d.timer),d._isPaused=!0,d._duration=0,d._currentTime=0,d.emit("pause"))},d.onEffectPause=function(e){e===d.soundIndex&&(d._isPaused=!0,d.emit("pause"))},d.onEffectPlay=function(e){e===d.soundIndex&&(d.timer&&clearInterval(d.timer),d.timer=window.setInterval((function(){var e;null===(e=t.audioEffector)||void 0===e||e.getEffectCurrentPosition(d.soundIndex).then((function(e){var n;d._currentTime=e,null===(n=t.ctx)||void 0===n||n.logger.info("rtc callback position, "+e+", endPos: "+d._endPos)})).catch((function(){}))}),300),d._isPaused=!1,d.emit("play"))},null===(o=t.ctx)||void 0===o||o.logger.info("url: "+n+", start: "+r+", end: "+i),d.url=n,r&&(d._startPos=r),i&&(d._endPos=i),d.soundIndex=t.nextSoundIndex(),window.addEventListener("message",(function(e){e.data&&"resumeAllAudioInterruptByAudioSessionChanged"===e.data.name&&d.emit("resumeAllAudioInterruptByAudioSessionChanged")})),null===(a=t.audioEffector)||void 0===a||a.on("play",d.onEffectPlay),null===(s=t.audioEffector)||void 0===s||s.on("pause",d.onEffectPause),null===(u=t.audioEffector)||void 0===u||u.on("effectFinished",d.onEffectPause),null===(l=t.audioEffector)||void 0===l||l.on("error",d.onEffectStop),null===(c=t.audioEffector)||void 0===c||c.on("duration",d.onDurationBack),null===(h=t.audioEffector)||void 0===h||h.getEffectDuration(d.url),d.onEffectPause(d.soundIndex),d}return o(t,e),t.nextSoundIndex=function(){return t.soundIndex+=1,t.soundIndex},t.prototype.play=function(){var e,n,r;clearInterval(this.timer),null===(e=t.ctx)||void 0===e||e.logger.info("effect play call, "+this.url),null===(n=t.ctx)||void 0===n||n.logger.info("play "+this.url+" from "+this._startPos+" by slide, current is "+this.currentTime),null===(r=t.audioEffector)||void 0===r||r.playEffect(this.soundIndex,this.url,0,1,0,this._volume,!1,Math.max(this._currentTime,this._startPos))},t.prototype.pause=function(){var e,n;null===(e=t.ctx)||void 0===e||e.logger.info(this.url+" pause by slide"),null===(n=t.audioEffector)||void 0===n||n.pauseEffect(this.soundIndex)},t.prototype.destroy=function(){var e,n,r,i,o,a,s,u;this._startPos=0,window.clearInterval(this.timer),null===(e=t.ctx)||void 0===e||e.logger.info(this.url+" destroy by slide"),null===(n=t.audioEffector)||void 0===n||n.stopEffect(this.soundIndex),null===(r=t.audioEffector)||void 0===r||r.unloadEffect(this.soundIndex),null===(i=t.audioEffector)||void 0===i||i.removeListener("play",this.onEffectPlay),null===(o=t.audioEffector)||void 0===o||o.removeListener("pause",this.onEffectPause),null===(a=t.audioEffector)||void 0===a||a.removeListener("effectFinished",this.onEffectPause),null===(s=t.audioEffector)||void 0===s||s.removeListener("error",this.onEffectStop),null===(u=t.audioEffector)||void 0===u||u.removeListener("duration",this.onDurationBack)},Object.defineProperty(t.prototype,"currentTime",{get:function(){return this._currentTime/1e3},set:function(e){var n;this._currentTime=1e3*e,null===(n=t.audioEffector)||void 0===n||n.setEffectPosition(this.soundIndex,1e3*e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isPaused",{get:function(){return this._isPaused},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"duration",{get:function(){return this._duration},enumerable:!1,configurable:!0}),t.prototype.volume=function(e){var n;null===(n=t.audioEffector)||void 0===n||n.setEffectsVolume(100*e)},t.audioEffector=null,t.ctx=null,t.soundIndex=0,t}(i.EventEmitter),s=function(){function e(e){this.hookPoint="Slide.initConfig",this.rtc=e}return e.prototype.after=function(e){return e},e.prototype.before=function(e){var t=e[0];return a.audioEffector=this.rtc,t.rtcAudio=a,[t]},e.prototype.context=function(e){a.ctx=e},e}();t.EffectPlugin=s},29181:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.MixingPlugin=void 0;var r,i=n(26913),o=n(5495),a=(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});var s=function(e){function t(n){var r=e.call(this)||this;return r.isStartPlaying=!1,r.isAudioPlaying=!1,r._volume=50,r.commandCaches=[],r.onError=function(e){var n;null===(n=t.ctx)||void 0===n||n.logger.error("audio error: "+e)},r.onAudioStalled=function(){var e;null===(e=t.ctx)||void 0===e||e.logger.warn(r.url+" Failed to fetch data, but trying.")},r.onMetaLoaded=function(){var e;null===(e=t.ctx)||void 0===e||e.logger.info(r.url+" load"),r.emit("load")},r.onAudioPlay=function(){var e,n,i,o;null===(e=t.ctx)||void 0===e||e.logger.info(r.url+" audio play"),null===(n=t.audioMixer)||void 0===n||n.startAudioMixing(r.url,!1,!1,1,(i=function(e,n){var i,o,a;r.isAudioPlaying=!0,r.isStartPlaying=!1,r.emit("play");var s=r.audio.seek();null===(i=t.audioMixer)||void 0===i||i.setAudioMixingPosition(Math.round(1e3*s)),(null===(o=t.audioMixer)||void 0===o?void 0:o.adjustAudioMixingVolume)&&(null===(a=t.audioMixer)||void 0===a||a.adjustAudioMixingVolume(r._volume)),r.commandCaches.forEach((function(e){return e()})),r.commandCaches=[]},o=0,function(){for(var e=[],t=0;t0&&void 0!==arguments[0]?arguments[0]:O.kind;return e=function(e){s(n,e);var t=l(n);function n(){return b(this,n),t.apply(this,arguments)}return n}(O),e.kind=t,e},t.SyncedStorePlugin=t.SyncedStore=t.Storage=t.STORAGE_NS=t.MAIN_STORAGE=void 0;var r=n(71895),i=n(73549),o=n(63266),a=n(5094);function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}function u(e,t){return u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},u(e,t)}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var i=d(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){return!t||"object"!==T(t)&&"function"!=typeof t?h(e):t}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||g(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function v(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){p(o,r,i,a,s,"next",e)}function s(e){p(o,r,i,a,s,"throw",e)}a(void 0)}))}}function m(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||g(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){if(e){if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:(0,i.genUID)();return w(t={},A,1),w(t,"k",n),w(t,"v",e),t}(e,this.genKey()),this.refMap.set(e,t)),this.refKeys.add(t.k),t}},{key:"deleteRefKey",value:function(e){var t=this.state[e],n=this.refMap.get(t);return n&&this.refKeys.delete(n.k),t}}]),e}(),C="_WM-StOrAgE_";t.STORAGE_NS=C;var N="_WM-MaIn-StOrAgE_";t.MAIN_STORAGE=N;var k=function(){function e(t){var n=this,a=t.plugin$,s=t.isWritable$,u=t.namespace,l=void 0===u?N:u,c=t.defaultState,h=void 0===c?{}:c;if(b(this,e),this._sideEffect=new i.SideEffectManager,this._events=new o.Remitter,this._disconnected=!1,h&&!M(h))throw new Error("Default state for Storage ".concat(l," is not an object."));this.on=this._events.on.bind(this._events),this.off=this._events.off.bind(this._events);var d=function(){var e,t;return null==(t=null==(e=a.value)?void 0:e.attributes[C])?void 0:t[l]};this.namespace=l,this.defaultState=h,this._plugin$=a,this._isWritable$=s,this._refine=new I((0,r.toJS)(d()),h);var f=function(e){e&&n._events.emit("stateChanged",e)},p=function(){var e,t=(0,r.reaction)(d,(function(){var t=d();t&&(f(n._refine.replaceState((0,r.toJS)(t))),null==e||e(),e=function(e){var t=function(e){if(!(e.length<=0)){for(var t={},i=!1,o=0;o0&&n._sideEffect.addDisposer(t,"plugin-init")})))}return _(e,[{key:"setState",value:function(e){var t=this._requireAccess("setState");if(!this.isWritable)throw new Error('Cannot setState on Storage "'.concat(this.namespace,'" without writable access'));for(var n=E(e),r=0;r1&&void 0!==arguments[1]?arguments[1]:this.genUID();return this.flush(t),this.disposers.set(t,Array.isArray(e)?function(){return e.forEach(h)}:e),t}},{key:"add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.genUID(),n=e();return n?this.addDisposer(n,t):t}},{key:"addEventListener",value:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.genUID();return e.addEventListener(t,n,r),this.addDisposer((function(){return e.removeEventListener(t,n,r)}),i),i}},{key:"setTimeout",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.genUID(),i=window.setTimeout((function(){n.remove(r),e()}),t);return this.addDisposer((function(){return window.clearTimeout(i)}),r)}},{key:"setInterval",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.genUID(),r=window.setInterval(e,t);return this.addDisposer((function(){return window.clearInterval(r)}),n)}},{key:"remove",value:function(e){var t=this.disposers.get(e);return this.disposers.delete(e),t}},{key:"flush",value:function(e){var t=this.remove(e);if(t)try{t()}catch(e){console.error(e)}}},{key:"flushAll",value:function(){this.disposers.forEach(h),this.disposers.clear()}},{key:"genUID",value:function(){var e;do{e=c()}while(this.disposers.has(e));return e}}]),e}();t.SideEffectManager=d;var f=function(){function e(){i(this,e),this.finished=Promise.resolve(),this.disposers=new Map,this._nextTask=new Map,this._isRunning=new Set}var t,n;return a(e,[{key:"add",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.genUID();return this._isRunning.has(n)?this._nextTask.set(n,(function(){return t._add(e,n)})):this._add(e,n),n}},{key:"_add",value:(n=r(regeneratorRuntime.mark((function e(t,n){var i,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._startTask(n),!(i=this.remove(n))){e.next=11;break}return e.prev=3,e.next=6,i();case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(3),console.error(e.t0);case 11:return e.prev=11,e.next=14,t();case 14:(o=e.sent)&&this.disposers.set(n,Array.isArray(o)?r(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.all(o.map(h)));case 1:case"end":return e.stop()}}),e)}))):o),e.next=21;break;case 18:e.prev=18,e.t1=e.catch(11),console.error(e.t1);case 21:this._endTask(n),(a=this._nextTask.get(n))&&(this._nextTask.delete(n),a());case 24:case"end":return e.stop()}}),e,this,[[3,8],[11,18]])}))),function(e,t){return n.apply(this,arguments)})},{key:"addDisposer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.genUID();return this.add((function(){return e}),t)}},{key:"remove",value:function(e){var t=this.disposers.get(e);return this.disposers.delete(e),t}},{key:"flush",value:function(e){var t=this;this._isRunning.has(e)?this._nextTask.set(e,(function(){return t._flush(e)})):this._flush(e)}},{key:"_flush",value:(t=r(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=this.remove(t))){e.next=12;break}return this._startTask(t),e.prev=3,e.next=6,n();case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(3),console.error(e.t0);case 11:this._endTask(t);case 12:(r=this._nextTask.get(t))&&(this._nextTask.delete(t),r());case 14:case"end":return e.stop()}}),e,this,[[3,8]])}))),function(e){return t.apply(this,arguments)})},{key:"flushAll",value:function(){var e=this;this.disposers.forEach((function(t,n){return e.flush(n)}))}},{key:"genUID",value:function(){var e;do{e=c()}while(this.disposers.has(e));return e}},{key:"_startTask",value:function(e){var t=this;this._isRunning.add(e),this._resolveFinished||(this.finished=new Promise((function(e){t._resolveFinished=e})))}},{key:"_endTask",value:function(e){this._isRunning.delete(e),this._resolveFinished&&this._isRunning.size<=0&&this._nextTask.size<=0&&(this._resolveFinished(),this._resolveFinished=void 0)}}]),e}();t.AsyncSideEffectManager=f},59849:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.videoJsPlugin=t.Version=t.PluginId=void 0;var r,i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==w(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(17328)),o=(r=n(30825))&&r.__esModule?r:{default:r},a=n(71895);function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function u(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function l(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){u(o,r,i,a,s,"next",e)}function s(e){u(o,r,i,a,s,"throw",e)}a(void 0)}))}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var n=0;n=t||n<0||h&&e-l>=o}function m(){var e=ne();if(v(e))return g(e);s=setTimeout(m,function(e){var n=t-(e-u);return h?ie(n,o-(e-l)):n}(e))}function g(e){return s=void 0,d&&r?f(e):(r=i=void 0,a)}function y(){var e=ne(),n=v(e);if(r=arguments,i=this,u=e,n){if(void 0===s)return p(u);if(h)return clearTimeout(s),s=setTimeout(m,t),f(u)}return void 0===s&&(s=setTimeout(m,t)),a}return t=te(t)||0,q(n)&&(c=!!n.leading,o=(h="maxWait"in n)?re(te(n.maxWait)||0,t):o,d="trailing"in n?!!n.trailing:d),y.cancel=function(){void 0!==s&&clearTimeout(s),l=0,r=u=i=s=void 0},y.flush=function(){return void 0===s?a:g(ne())},y};function ae(e){var t=document.createElement("style"),n=document.createTextNode(e);t.appendChild(n),document.head.appendChild(t)}ae(".vjs-p .player-controller{position:absolute;z-index:100;bottom:0px;left:0;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:stretch;height:64px;background-image:linear-gradient(0deg,#000,transparent);transition:opacity .2s}.vjs-p .player-menu-box{display:flex;align-items:center;justify-content:center;flex-direction:column;margin-bottom:40px}.vjs-p .player-menu-cell{width:100%;text-align:center;font-size:12px;color:#7a7b7c}.vjs-p .player-multiple-play{width:64px;height:120px}.vjs-p .player-controller-actions-left{display:flex;justify-content:center;align-items:center;flex-shrink:0}.vjs-p .player-right-box{font-size:14px;color:#7a7b7c;cursor:pointer;margin-right:12px}.vjs-p .player-controller-actions{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding-left:8px;padding-right:8px;margin-top:2px}.vjs-p .player-mid-box-time{font-size:9px;display:flex;justify-content:center;align-items:center;color:#fff;flex-shrink:0;margin-right:8px;font-family:monospace}.vjs-p .player-controller-play{display:flex;align-items:center;justify-content:center;cursor:pointer;padding-right:4px}.vjs-p .player-controller-progress{width:calc(100% - 28px);margin-left:14px;display:flex;align-items:center;justify-content:center;margin-top:8px}.vjs-p .player-volume{display:flex;align-items:center;justify-content:center;cursor:pointer;margin-right:16px;margin-left:16px}.vjs-p .player-volume-slider{width:60px;margin-right:12px;display:flex;align-items:center}.vjs-p .player-volume-box{display:flex;flex-direction:row}\n");ae(".vjs-p .seek-slider{position:relative;width:100%}.vjs-p .seek-slider:focus{outline:none}.vjs-p .seek-slider .track{padding:10px 0;cursor:pointer;outline:none}.vjs-p .seek-slider .track:focus{border:0;outline:none}.vjs-p .seek-slider .track .main{width:100%;height:3px;background-color:#ffffff4d;border-radius:30px;position:absolute;left:0;top:8.5px;transition:transform .4s;outline:none}.vjs-p .seek-slider .track .main:focus{border:0;outline:none}.vjs-p .seek-slider .track .main .buffered{position:absolute;background-color:#ffffff4d;width:100%;height:100%;transform:scaleX(.8);z-index:2;transform-origin:0 0}.vjs-p .seek-slider .track .main .seek-hover{position:absolute;background-color:#ffffff80;width:100%;height:100%;z-index:1;transform:scaleX(.6);transform-origin:0 0;opacity:0;transition:opacity .4s}.vjs-p .seek-slider .track .main .connect{position:absolute;background-color:#fff;width:100%;height:100%;z-index:3;left:0;transform:scaleX(.13);transform-origin:0 0}.vjs-p .seek-slider .track.active .main{transform:scaleY(2)}.vjs-p .seek-slider .thumb{pointer-events:none;position:absolute;width:12px;height:12px;left:-6px;top:4px;z-index:4;transform:translate(100px)}.vjs-p .seek-slider .thumb .handler{border-radius:100%;width:100%;height:100%;background-color:#fff;opacity:0;transform:scale(.4);cursor:pointer;transition:transform .2s;pointer-events:none}.vjs-p .seek-slider .thumb.active .handler{opacity:1;transform:scale(1)}.vjs-p .seek-slider .hover-time{position:absolute;background-color:#0000004d;line-height:18px;font-size:16px;color:#ddd;top:-25px;left:0;padding:5px 10px;border-radius:5px;box-shadow:0 0 5px #0000004d;opacity:0;transform:translate(150px);pointer-events:none}.vjs-p .seek-slider .hover-time.active{opacity:1}.vjs-p .seek-slider:hover .track .main .seek-hover{opacity:1}\n");var se=function(e){f(n,e);var t=v(n);function n(e){var r;return c(this,n),r=t.call(this,e),M(g(r),"seeking",!1),M(g(r),"mobileSeeking",!1),M(g(r),"track",null),M(g(r),"hoverTime",null),M(g(r),"offset",0),M(g(r),"secondsPrefix","00:00:"),M(g(r),"minutesPrefix","00:"),M(g(r),"seekPause",!1),M(g(r),"handleTouchSeeking",(function(e){for(var t=0,n=0;nthis.state.trackWidth&&(e=this.state.trackWidth-this.hoverTime.offsetWidth))),{transform:"translateX(".concat(e,"px)")}}},{key:"secondsToTime",value:function(e){e=Math.round(e+this.offset);var t=Math.floor(e/3600),n=e%3600,r=Math.floor(n/60),i=Math.ceil(n%60);return{hh:t.toString(),mm:r<10?"0"+r:r.toString(),ss:i<10?"0"+i:i.toString()}}},{key:"getHoverTime",value:function(){var e=100*this.state.seekHoverPosition/this.state.trackWidth,t=Math.floor(+e*(this.props.total/100)),n=this.secondsToTime(t);return this.props.total+this.offset<60?this.secondsPrefix+n.ss:this.props.total+this.offset<3600?this.minutesPrefix+n.mm+":"+n.ss:n.hh+":"+n.mm+":"+n.ss}},{key:"isThumbActive",value:function(){return this.state.seekHoverPosition>0||this.seeking}},{key:"drawHoverTime",value:function(){var e=this;return this.props.hideHoverTime?null:i.default.createElement("div",{className:this.isThumbActive()?"hover-time active":"hover-time",style:this.getHoverTimePosition(),ref:function(t){return e.hoverTime=t}},this.getHoverTime())}},{key:"render",value:function(){var e=this;return i.default.createElement("div",{className:"seek-slider"},i.default.createElement("div",{className:"track",ref:function(t){return e.track=t},onMouseMove:function(t){return e.handleTrackHover(!1,t)},onMouseLeave:function(t){return e.handleTrackHover(!0,t)},onMouseDown:this.onMouseDown,onTouchStart:function(t){e.setMobileSeeking(!0),e.onMouseDown(t)},onMouseUp:this.onMouseUp,onTouchEnd:this.onMouseUp},i.default.createElement("div",{className:"main"},this.renderBufferProgress(),this.renderHoverProgress(),this.renderProgress())),this.drawHoverTime(),this.renderThumb())}}]),n}(i.Component),ue=function(e){f(n,e);var t=v(n);function n(e){var r;return c(this,n),r=t.call(this,e),M(g(r),"stageVolume",0),M(g(r),"updateVolumeTimer",0),M(g(r),"onVolumeSeeking",!1),M(g(r),"onClickOperationButton",(function(){r.props.paused?r.props.play():r.props.pause()})),M(g(r),"operationButton",(function(){return r.props.paused?i.default.createElement("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iI0ZGRiIgZmlsbC1ydWxlPSJub256ZXJvIj48cGF0aCBmaWxsLW9wYWNpdHk9Ii4wMSIgZD0iTTAgMGgyMnYyMkgweiIvPjxwYXRoIGQ9Im03LjUxNCA1LjkwOSA3LjA1NyA0LjIzNGExIDEgMCAwIDEgMCAxLjcxNGwtNy4wNTcgNC4yMzRBMSAxIDAgMCAxIDYgMTUuMjM0VjYuNzY2YTEgMSAwIDAgMSAxLjUxNC0uODU3eiIvPjwvZz48L3N2Zz4="}):i.default.createElement("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iI0ZGRiIgZmlsbC1ydWxlPSJub256ZXJ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UgMCAwIDAgMS4wNzggMCAyLjk0MyAyLjk0MyAwIDAgMC0uMDA0LTQuNTVoLjAwNGEuODA1LjgwNSAwIDAgMC0xLjA3OCAwIC41NzYuNTc2IDAgMCAwIDAgLjg5NiAxLjc5NCAxLjc5NCAwIDAgMSAwIDIuNzU2eiIvPjxwYXRoIGZpbGwtb3BhY2l0eT0iLjAxIiBkPSJNMCAwaDIydjIySDB6Ii8+PC9nPjwvc3ZnPg=="})})),M(g(r),"handleClickVolume",(function(){0===r.props.volume?0!==r.stageVolume?r.props.setVolume(r.stageVolume):r.props.setVolume(1):(r.stageVolume=r.props.volume,r.props.setVolume(0))})),M(g(r),"onChange",(function(e){r.setState({currentTime:e}),e&&r.changeTime(e)})),M(g(r),"changeTime",oe((function(e){r.props.setCurrentTime(e)}),50)),M(g(r),"onVolumeChange",(function(e){r.changeVolume(e),r.setState({seekVolume:e/100})})),M(g(r),"changeVolume",oe((function(e){r.props.setVolume(e/100)}),50)),M(g(r),"onVolumeSeekStart",(function(){r.onVolumeSeeking=!0})),M(g(r),"onVolumeSeekEnd",oe((function(){r.onVolumeSeeking=!1}),500)),M(g(r),"onProgressSeekStart",(function(){return r.setState({isPlayerSeeking:!0})})),M(g(r),"onProgressSeekEnd",oe((function(){r.setState({isPlayerSeeking:!1})}),500)),r.state={isPlayerSeeking:!1,isVolumeHover:!1,seekVolume:1,visible:!0,currentTime:0},r.stageVolume=e.volume,r}return d(n,[{key:"componentDidMount",value:function(){var e=this;this.updateVolumeTimer=setInterval((function(){e.onVolumeSeeking||e.setState({seekVolume:e.props.volume}),e.state.isPlayerSeeking||e.setState({currentTime:e.props.currentTime})}),100)}},{key:"componentWillUnmount",value:function(){this.updateVolumeTimer&&clearInterval(this.updateVolumeTimer)}},{key:"render",value:function(){var e=this,t=this.props,n=t.duration,r=t.currentTime;return i.default.createElement("div",{className:"player-controller",style:{opacity:this.props.visible?"1":"0"}},i.default.createElement("div",{className:"player-controller-progress"},i.default.createElement(se,{total:n,current:this.state.currentTime,onChange:this.onChange,buffered:this.props.buffered,bufferColor:"rgba(255,255,255,0.3)",hideHoverTime:!0,limitTimeTooltipBySides:!0,onSeekStart:this.onProgressSeekStart,onSeekEnd:this.onProgressSeekEnd,play:this.props.play,pause:this.props.pause,paused:this.props.paused,scale:this.props.scale})),i.default.createElement("div",{className:"player-controller-actions"},i.default.createElement("div",{className:"player-controller-actions-left"},i.default.createElement("div",{onClick:this.onClickOperationButton,className:"player-controller-play"},this.operationButton()),i.default.createElement("div",{className:"player-volume-box",onMouseEnter:function(){return e.setState({isVolumeHover:!0})},onMouseLeave:function(){return e.setState({isVolumeHover:!1})}},i.default.createElement("div",{onClick:this.handleClickVolume,className:"player-volume"},this.operationVolumeButton()),i.default.createElement("div",{className:"player-volume-slider"},i.default.createElement(se,{total:100,current:100*this.state.seekVolume,onChange:this.onVolumeChange,onSeekStart:this.onVolumeSeekStart,onSeekEnd:this.onVolumeSeekEnd,scale:this.props.scale,limitTimeTooltipBySides:!0,hideHoverTime:!0})))),i.default.createElement("div",{className:"player-mid-box-time"},le(Math.floor(r/1e3))," /"," ",le(Math.floor(n/1e3)))))}}]),n}(i.Component);function le(e){var t=e%60,n=(e-t)/60;if(n>=60){var r=n%60;return"".concat(ce((n-r)/60),":").concat(ce(r),":").concat(ce(t))}return"".concat(ce(n),":").concat(ce(t))}function ce(e){return e<=9?"0".concat(e):"".concat(e)}function he(e){var t=e.scale,n=void 0===t?1:t,r=e.size,o=e.children;return i.default.createElement("div",{style:{width:r.width/n,height:r.height/n,transform:"scale(".concat(n,")"),transformOrigin:"top left",display:"flex",overflow:"hidden"}},o)}ae('.vjs-p{display:flex;flex-grow:1;position:relative}.vjs-p *{pointer-events:auto}.vjs-p.disabled *{pointer-events:none}.vjs-p .videojs-plugin-close-icon,.vjs-p .player-controller,.vjs-p .videojs-plugin-muted-alert{pointer-events:auto}.vjs-p.disabled .videojs-plugin-close-icon,.vjs-p.disabled .player-controller{pointer-events:none}.vjs-p .video-js-plugin-header{position:absolute;z-index:100;top:-.5px;height:30px;width:100%;display:flex;background:linear-gradient(rgba(0,0,0,.85),rgba(0,0,0,.45) 40%,rgba(0,0,0,0));transition:opacity .2s;user-select:none}.vjs-p .video-js-plugin-title{padding:10px;font-size:14px;color:#fff}.vjs-p .video-js-plugin-player{position:absolute;top:0;left:0;right:0;bottom:0}.video-js,[data-vjs-player]{width:100%;height:100%}.vjs-p .videojs-plugin-close-icon.disabled{display:none}.vjs-p .videojs-plugin-close-icon{pointer-events:auto;z-index:42;color:#fff;position:absolute;top:0;right:0;width:32px;height:32px;font-size:20px;display:flex;align-items:center;justify-content:center}.vjs-p .videojs-plugin-muted-alert{pointer-events:auto;cursor:pointer;position:absolute;top:0;left:0;right:0;bottom:0;z-index:43}.vjs-p .videojs-plugin-muted-alert:before{pointer-events:auto;cursor:pointer;position:absolute;top:0;left:0;right:0;bottom:0;z-index:43;content:"";background:rgba(0,0,0,.3);font-family:VideoJS;font-size:2em;display:flex;align-items:center;justify-content:center;color:#fff}.vjs-p .videojs-plugin-recovery-mode{pointer-events:auto;cursor:pointer;position:absolute;top:0;left:0;right:0;bottom:0;z-index:44}.vjs-p .videojs-plugin-recovery-mode button{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}\n');var de=function(e){f(n,e);var t=v(n);function n(){return c(this,n),t.apply(this,arguments)}return d(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.cnode,r=t.size,o=t.scale;return i.default.createElement(a.CNode,{context:n},i.default.createElement(he,{size:r,scale:o},i.default.createElement(a.RoomConsumer,null,(function(t){return t&&i.default.createElement(fe,x({room:t},e.props))})),i.default.createElement(a.PlayerConsumer,null,(function(t){return t&&i.default.createElement(fe,x({player:t},e.props))}))))}}]),n}(i.Component),fe=function(e){f(n,e);var t=v(n);function n(e){var r;return c(this,n),r=t.call(this,e),M(g(r),"closeIcon",null),M(g(r),"alertMask",null),M(g(r),"container",i.default.createRef()),M(g(r),"player"),M(g(r),"controllerHiddenTimer",0),M(g(r),"syncPlayerTimer",0),M(g(r),"retryCount",0),M(g(r),"decreaseRetryTimer",0),M(g(r),"disposer"),M(g(r),"showController",(function(){r.setState({controllerVisible:!0}),r.debounceHidingController()})),M(g(r),"play",(function(){var e,t=null==(e=r.props.room)?void 0:e.calibrationTimestamp;r.debug(">>> play",{paused:!1,hostTime:t}),r.isEnabled()&&r.props.plugin.putAttributes({paused:!1,hostTime:t})})),M(g(r),"pause",(function(){var e=r.getAttributes();if(e){var t=C(e,r.props);r.debug(">>> pause",{paused:!0,currentTime:t}),r.isEnabled()&&r.props.plugin.putAttributes({paused:!0,currentTime:t})}})),M(g(r),"setVolume",(function(e){r.debug(">>> volume",{volume:e}),r.isEnabled()&&r.props.plugin.putAttributes({volume:e}),r.isEnabled()&&r.props.plugin.putAttributes({volume:e,muted:0===e})})),M(g(r),"setCurrentTime",(function(e){var t,n=null==(t=r.props.room)?void 0:t.calibrationTimestamp;r.debug(">>> seek",{currentTime:e/1e3,hostTime:n}),r.isEnabled()&&r.props.plugin.putAttributes({currentTime:e/1e3,hostTime:n})})),M(g(r),"resetPlayer",(function(){var e;null==(e=r.player)||e.autoplay(!1),r.debug(">>> ended",{paused:!0,currentTime:0}),r.isEnabled()&&r.props.plugin.putAttributes({paused:!0,currentTime:0})})),M(g(r),"syncPlayerWithAttributes",(function(){var e;r.props.plugin.context;var t=r.getAttributes();if(t){var n=r.player;if(n){n.paused()!==t.paused&&(r.debug("<<< paused -> %o",t.paused),t.paused?n.pause():null==(e=n.play())||e.catch(r.catchPlayFail)),n.muted()!==t.muted&&(r.debug("<<< muted -> %o",t.muted),n.muted(t.muted)),n.volume()!==t.volume&&(r.debug("<<< volume -> %o",t.volume),n.volume(t.volume));var i=C(t,r.props);i>n.duration()?r.resetPlayer():Math.abs(n.currentTime()-i)>I.currentTimeMaxError&&(r.debug("<<< currentTime -> %o",i),n.currentTime(i))}}})),M(g(r),"debounceHidingController",(function(){r.controllerHiddenTimer&&(clearTimeout(r.controllerHiddenTimer),r.controllerHiddenTimer=0),r.controllerHiddenTimer=setTimeout((function(){r.setState({controllerVisible:!1}),r.controllerHiddenTimer=0}),3e3)})),M(g(r),"decreaseRetryCount",(function(){r.player&&r.retryCount>0&&(r.retryCount=r.retryCount-1)})),M(g(r),"catchPlayFail",(function(e){var t,n,i=String(e);if(N&&i.includes("NotAllowedError")||i.includes("interact"))null==(t=r.player)||t.autoplay("any"),r.setState({NoSound:!0});else{var o=null==(n=r.player)?void 0:n.error();o&&(r.retryCount<=3?(r.initPlayer(),r.retryCount=r.retryCount+1):(r.debug("catch videojs media error",o),r.setState({MediaError:!0}))),r.debug("catch error",e)}})),M(g(r),"fixPlayFail",(function(){r.debug("try to fix play state"),r.setState({NoSound:!1});var e=r.getAttributes(),t=e.muted,n=e.volume;r.player&&(r.player.muted(t),r.player.volume(n))})),M(g(r),"initPlayer",l(regeneratorRuntime.mark((function e(){var t,n,i,a,s,u,l,c,h;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return null==(t=r.player)||t.dispose(),r.player=void 0,r.debug("creating elements ..."),n=r.getAttributes(),i=n.type,a=n.src,s=n.poster,(u=document.createElement("div")).setAttribute("data-vjs-player",""),(l=document.createElement("video")).className="video-js",s&&(l.poster=s),l.setAttribute("playsInline",""),l.setAttribute("webkit-playsinline",""),c=document.createElement("source"),new URL(a).pathname.endsWith(".m3u8")?c.type="application/x-mpegURL":l.src=a,c.src=a,i&&(c.type=i),l.appendChild(c),u.appendChild(l),r.container.current.appendChild(u),e.next=20,new Promise((function(e){return(window.requestAnimationFrame||window.setTimeout)(e)}));case 20:r.debug("initializing videojs() ..."),h=(0,o.default)(l),r.player=h,h.one("loadedmetadata",r.gracefullyUpdate),h.on("ready",(function(){var e,t;null==(t=(e=I).onPlayer)||t.call(e,h),h.on("timeupdate",r.gracefullyUpdate),h.on("volumechange",r.gracefullyUpdate),h.on("seeked",r.gracefullyUpdate),h.on("play",r.gracefullyUpdate),h.on("pause",r.gracefullyUpdate),h.on("ended",r.resetPlayer)})),h.on("error",r.catchPlayFail),r.setState({MediaError:!1});case 27:case"end":return e.stop()}}),e)})))),M(g(r),"gracefullyUpdate",(function(){return r.setState({updater:!r.state.updater})})),M(g(r),"setupClose",(function(e){e&&(e.addEventListener("touchstart",r.removeSelf),e.addEventListener("click",r.removeSelf)),r.closeIcon=e})),M(g(r),"setupAlert",(function(e){e&&(e.addEventListener("touchstart",r.fixPlayFail),e.addEventListener("click",r.fixPlayFail)),r.alertMask=e})),M(g(r),"setupReload",(function(e){e&&(e.addEventListener("touchstart",r.initPlayer),e.addEventListener("click",r.initPlayer))})),M(g(r),"removeSelf",(function(){return r.props.plugin.remove()})),r.state={NoSound:!1,MediaError:!1,updater:!1,controllerVisible:!1},e.room&&function(e){if(!e.calibrationTimestamp)throw new Error("@netless/video-js-plugin@".concat(S," requires white-web-sdk@^2.13.8 to work properly."))}(e.room),r}return d(n,[{key:"getAttributes",value:function(){var e,t=this.props.plugin.attributes;if(t){var n=[a.PlayerPhase.Pause,a.PlayerPhase.Ended,a.PlayerPhase.Stopped];if(!t.paused&&n.includes(null==(e=this.props.player)?void 0:e.phase)){var r=C(t,this.props);t=x(x({},t),{},{currentTime:r,paused:!0})}return t}}},{key:"render",value:function(){var e,t,n,r;if(!this.props.room&&!this.props.player)return null;var o=this.getAttributes();if(!o)return null;var a=1e3*((null==(e=this.player)?void 0:e.duration())||1e3),s=(null==(t=this.player)?void 0:t.bufferedPercent())||0;return i.default.createElement("div",{className:this.isEnabled()?"vjs-p":"vjs-p disabled",onMouseEnter:this.showController,onMouseMove:this.showController},i.default.createElement("div",{className:"video-js-plugin-player",ref:this.container}),i.default.createElement("div",{className:"video-js-plugin-header"},o.title&&i.default.createElement("div",{className:"video-js-plugin-title"},o.title),(null==(n=o.close)||n)&&i.default.createElement("div",{className:"videojs-plugin-close-icon",ref:this.setupClose},"×")),i.default.createElement(ue,{duration:a,volume:o.volume,setVolume:this.setVolume,paused:o.paused,play:this.play,pause:this.pause,currentTime:1e3*C(o,this.props),setCurrentTime:this.setCurrentTime,buffered:a*s,scale:this.props.scale,visible:!0}),!(null==(r=this.props.plugin.context)?void 0:r.hideMuteAlert)&&this.state.NoSound&&i.default.createElement("div",{ref:this.setupAlert,className:"videojs-plugin-muted-alert"}),this.state.MediaError&&i.default.createElement("div",{className:"videojs-plugin-recovery-mode"},i.default.createElement("button",{ref:this.setupReload},"Reload Player")))}},{key:"debug",value:function(e){var t;if(null==(t=this.props.plugin.context)?void 0:t.verbose){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i20&&(e.value=Math.floor(1e3*e.times/e.valueTotal),e.valueTotal=0,e.times=0,e.destroyed||e.emit("update",e.value)),e.prevTime=t,e.destroyed||e.calcFps()}))}},{key:"destroy",value:function(){this.destroyed=!0}}]),n}(Ks.a);!function(e){e.ResourceError="RESOURCE_ERROR",e.RuntimeError="RUNTIME_ERROR",e.RuntimeWarn="RUNTIME_WARN",e.CanvasCrash="CANVAS_CRASH"}(Jp||(Jp={}));var rv=function(e){p(n,e);var t=m(n);function n(e,r){var i,o,a;return _(this,n),o=y(i=t.call(this,r)),a=(this instanceof n?this.constructor:void 0).prototype,Object.setPrototypeOf?Object.setPrototypeOf(o,a):o.__proto__&&(o.__proto__=a),i.errorType=e,i.errorMsg=r,i}return T(n,null,[{key:"transform",value:function(e){return e instanceof n?e:new n(Jp.RuntimeError,e.message)}}]),n}(r(Error));function iv(){return function(e,t,n){var r=n.value;n.value=function(){try{for(var e=arguments.length,t=new Array(e),n=0;n2048||x>2048)&&(_=(y*=2048/b)*x)>2048&&(y*=x/_),w=document.createElement("canvas"),T=Math.ceil(g.width*y),M=Math.ceil(g.height*y),w.width=T,w.height=M,w.getContext("2d").drawImage(g,0,0,T,M),S=w.toDataURL("image/png"),E=new Xl.c(S,{resolution:1}),n.abrupt("return",(this.logger.info("load end. "+o,this.taskId||""),this.useCache&&this.localStorage.setItem(u,{scale:y,scaledBase64:S}).catch((function(){})),{baseTexture:E,scale:y}));case 70:case"end":return n.stop()}}),n,this,[[22,34],[39,52]])})))}},{key:"destroy",value:function(){}}]),e}(),mv=function(){function e(t){var n=this;_(this,e),this.isPaused=!1,this.timestamp=0,this.callbackList=[],this.onTimeUpdate=function(e){var t=e/(nd.b.TARGET_FPMS||.06);if(!n.isPaused){n.timestamp+=t,n.callbackList=n.callbackList.filter((function(e){return e&&!e.applied}));for(var r=n.callbackList.length,i=0;i=0&&!this.callbackList[t].running&&this.callbackList.splice(t,1)}},{key:"delay",value:function(e){var t=this;return new Promise((function(n){t.setTimeout(n,e)}))}},{key:"waitUntil",value:function(e,t){return function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}(this,void 0,void 0,regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:r=this.timestamp;case 1:if(e()||!(this.timestamp-r90&&a<270||a<-90&&a>-270)&&(r=-r),i=s*r}return{x:r,y:i}}function Sv(e,t,n,r,i,o){var a,s,u,l,c,h=e,d=t;if(0===Math.round(r))a=i,s=o,c=0;else if(Math.round(r)>=360)a=i,s=o,u=i+2*e*Math.abs(Math.cos(-n/180*Math.PI)),l=o+2*t*Math.sin(-n/180*Math.PI),c=1;else{var f=-(n+r),p=Mv(-n,h,d),v=i-p.x,m=o+p.y,g=Mv(f,h,d);a=g.x+v,s=m-g.y,c=r>=-360&&r<-180?1:r>=-180&&r<0||r>0&&r<180?0:1}return{radiusX:h,radiusY:d,xAxisRotation:0,largeArcFlag:c,sweepFlag:r>0?1:0,endX:a,endY:s,middleX:u,middleY:l}}var Ev=function(){function e(){_(this,e),this.pool=[]}return T(e,[{key:"getObject",value:function(e){var t=this.pool.find((function(e){return!e.isUsed}));if(t)return t.isUsed=!0,t.obj;var n={obj:this.createObject(),isUsed:!0,group:e};return this.pool.push(n),n.obj}},{key:"collectObject",value:function(e){var t=this.pool.find((function(t){return t.obj===e}));t&&(t.isUsed=!1,this.resetObject(t.obj))}},{key:"collectObjectByGroup",value:function(e){var t=this;this.pool.filter((function(t){return t.group===e})).forEach((function(e){return t.collectObject(e.obj)}))}}]),e}(),Av=new(function(e){p(n,e);var t=m(n);function n(){return _(this,n),t.apply(this,arguments)}return T(n,[{key:"createObject",value:function(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");return e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e.setAttribute("version","1.1"),e}},{key:"resetObject",value:function(e){e.removeAttribute("viewBox"),e.removeAttribute("width"),e.removeAttribute("height"),e.innerHTML=""}}]),n}(Ev)),Iv=new(function(e){p(n,e);var t=m(n);function n(){return _(this,n),t.apply(this,arguments)}return T(n,[{key:"createObject",value:function(){return document.createElement("img")}},{key:"resetObject",value:function(e){e.removeAttribute("src")}}]),n}(Ev)),Cv=function(){function e(t){_(this,e),this.imgElements=[],this.svgElements=[],this.idToHashMap=Object.create(null),this.textures=Object.create(null),this.graphics=[],this.hashToIdMap=Object.create(null),this.maxResolution=t}return T(e,[{key:"render",value:function(e,t,n,r){return function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}(this,void 0,void 0,regeneratorRuntime.mark((function t(){var i,o,a,s,u,l,h,d,f,p,v,m=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=e.items,o=e.width,a=e.height,s=Iv.getObject(n),u=new Xl.c(s,{width:o*r,height:a*r,resolution:1}),l=Av.getObject(n),this.imgElements.push(s),this.svgElements.push(l),l.setAttribute("viewBox","0 0 ".concat(o," ").concat(a)),l.setAttribute("width",""+o),l.setAttribute("height",""+a),h={},i.forEach((function(e){var t=e.item,n=e.x,i=e.y,o=n+2,a=i+2;t.pathsData.forEach((function(e){var t="";e.cmds.forEach((function(n){var r=c(n,2),i=r[0],s=r[1];t+=i+" ",t+=s.map((function(t){return Tv()(t)||(t.x=t.x+e.offset.x+o,t.y=t.y+e.offset.y+a),t})).reduce((function(e,t){return Tv()(t)?e+=t+" ":e+="".concat(t.x," ").concat(t.y," "),e}),""),t+=" "})),e.pathElement.setAttribute("d",t),l.appendChild(e.pathElement)}));var s=t.width-4-2*t.padding,d=t.height-4-2*t.padding;m.textures[t.hash]={texture:new Xl.t(u,new jl.j((o+2)*r,(a+2)*r,s*r,d*r)),pivot:t.pivot,scale:1/r},h[t.hash]=m.hashToIdMap[t.hash]})),f=''+l.outerHTML,d="data:image/svg+xml,"+encodeURIComponent(f).replace(/'/g,"%27").replace(/"/g,"%22"),(p=document.createElement("img")).src=d,t.next=9,new Promise((function(e,t){p.onload=function(){return e("")},p.onerror=function(){return t()}}));case 9:return(v=document.createElement("canvas")).width=p.width*r,v.height=p.height*r,v.getContext("2d").drawImage(p,0,0,v.width,v.height),s.src=v.toDataURL("image/png"),t.next=15,new Promise((function(e,t){s.onload=function(){return e("")},s.onerror=function(){return t()}}));case 15:case"end":return t.stop()}}),t,this)})))}},{key:"getGraphicsData",value:function(e){var t=this.idToHashMap[e]||"";return this.textures[t]||null}},{key:"addGraphics",value:function(e,t,n,r,i,o,a,s,u,l,h){var d,f;if(!a&&!u)return e;var p,v,m,g,y,b,x,_,w,T,M,S,E,A,I,C,N,k,D=_v()(n+(null!==(f=null===(d=null==a?void 0:a.width)||void 0===d?void 0:d.toString())&&void 0!==f?f:0)+u+l+h);if(this.hashToIdMap[D]||(this.hashToIdMap[D]=[]),this.hashToIdMap[D].push(e),this.idToHashMap[e]=D,this.graphics.findIndex((function(e){return e.hash===D}))<0){var P=(p=t,v=i,m=o,g=a,y=r,b=u,x=l,_=h,T=[],M={x:Math.abs(y.x),y:Math.abs(y.y)},S=0,E=0,A=0,I=0,C=0,N="none",k=null!==(w=null==g?void 0:g.width)&&void 0!==w?w:0,b?(S=v,E=m,C=0):(N=_||"#ff0000",C=k,A=.5*k,I=.5*k,S=v+k,E=m+k,M.x+=.5*k,M.y+=.5*k),S+=Math.abs(y.x),E+=Math.abs(y.y),A+=Math.abs(y.x),I+=Math.abs(y.y),S+=4,E+=4,A+=2,I+=2,S=Math.ceil(S),E=Math.ceil(E),p.forEach((function(e){var t=document.createElementNS("http://www.w3.org/2000/svg","path");"none"!==e.fill&&b?t.setAttribute("fill",x||"#ff0000"):t.setAttribute("fill","none"),e.hasStroke&&!b&&(t.setAttribute("stroke-linecap",(null==g?void 0:g.cap)||"butt"),t.setAttribute("stroke-linejoin",(null==g?void 0:g.join)||"miter"),t.setAttribute("stroke-width",C.toString()),t.setAttribute("stroke",N),(null==g?void 0:g.dash)&&t.setAttribute("stroke-dasharray",g.dash));for(var n=e.scale,r=e.path.trim().split(" "),i={x:0,y:0},o={offset:{x:A,y:I},cmds:[],pathElement:t},a=0;a=360?(i={x:M.endX,y:M.endY},o.cmds.push(["A",[M.radiusX/9525*n.x,M.radiusY/9525*n.y,M.xAxisRotation,M.largeArcFlag,M.sweepFlag,{x:M.middleX/9525*n.x,y:M.middleY/9525*n.y}]]),o.cmds.push(["A",[M.radiusX/9525*n.x,M.radiusY/9525*n.y,M.xAxisRotation,M.largeArcFlag,M.sweepFlag,{x:M.endX/9525*n.x,y:M.endY/9525*n.y}]])):(i={x:M.endX,y:M.endY},o.cmds.push(["A",[M.radiusX/9525*n.x,M.radiusY/9525*n.y,M.xAxisRotation,M.largeArcFlag,M.sweepFlag,{x:M.endX/9525*n.x,y:M.endY/9525*n.y}]]))}else if("L"===s){var S=c(u.split(",").map((function(e){return Number(e)})),2),E=S[0],k=S[1];i={x:E,y:k},E=E/9525*n.x,k=k/9525*n.y,o.cmds.push(["L",[{x:E,y:k}]])}else if("QB"===s){var D=c(u.split(",").map((function(e){return Number(e)})),4),P=D[0],O=D[1],R=D[2],L=D[3];i={x:R,y:L},P=P/9525*n.x,O=O/9525*n.y,R=R/9525*n.x,L=L/9525*n.y,o.cmds.push(["Q",[{x:P,y:O},{x:R,y:L}]])}else if("CB"===s){var j=c(u.split(",").map((function(e){return Number(e)})),6),B=j[0],U=j[1],z=j[2],F=j[3],G=j[4],H=j[5];i={x:G,y:H},B=B/9525*n.x,U=U/9525*n.y,z=z/9525*n.x,F=F/9525*n.y,G=G/9525*n.x,H=H/9525*n.y,o.cmds.push(["C",[{x:B,y:U},{x:z,y:F},{x:G,y:H}]])}else"C"===s&&o.cmds.push(["Z",[]])}T.push(o)})),{graphicsWidth:S,graphicsHeight:E,pivot:M,padding:2,pathsData:T}),O=P.graphicsWidth,R=P.graphicsHeight,L=P.pathsData,j=P.pivot,B=P.padding;this.graphics.push({hash:D,pathsData:L,pivot:j,width:O,height:R,padding:B})}return e}},{key:"pack",value:function(){return this.graphics.forEach((function(e){e.width+=4,e.height+=4})),function e(t){for(var n=[],r=t.filter((function(e){var t=e.width<2048&&e.height<2048;return t||n.push(e),t})).sort((function(e,t){return e.width*e.height-t.width*t.height})),i=r.length+1,o=2050,a=2050,s=[],u=null;(o>2048||a>2048)&&r.length>0;)i-=1,o=(u=av()(r.slice(0,i))).width,a=u.height;return u&&s.push(u),n.forEach((function(e){var t=av()([e]);s.push(t)})),i2&&void 0!==arguments[2]?arguments[2]:{type:"el",index:0,id:""},o=this.targets[e.id];return"shape"!==e.type?o:("shape"===e.type&&e.txEl&&(o=null!==(n=null==o?void 0:o.getTextElement(e.txEl.type,e.txEl.range))&&void 0!==n?n:null),"shape"===e.type&&e.bg&&0===i.index&&(t=!1,o=null!==(r=null==o?void 0:o.getBgElement())&&void 0!==r?r:null,this.eventHub.emit("IterateTimeNodeEnd",i.id)),t&&o?o.getIterateEntry(i.type,i.index,i.id):(o||this.eventHub.emit("IterateTimeNodeEnd",i.id),o))}},{key:"clearTargets",value:function(){this.targets=Object.create(null)}}]),e}(),Dv=function(){function e(t){_(this,e),this.target=t}return T(e,[{key:"color",get:function(){return this.target.strokeColorFilter.currentColor},set:function(e){this.target.strokeColorFilter.color=e}},{key:"on",get:function(){return this.target.strokeActive?"true":"false"},set:function(e){this.target.strokeActive="true"===e}}]),e}(),Pv=function e(t){var n=this;_(this,e),this.applyCommand=function(e,t){n.target.applyCommand(e,t)},this.target=t},Ov=function(){function e(t){_(this,e),this.target=t}return T(e,[{key:"toString",value:function(){return this.color}},{key:"color",get:function(){return this.target.pptColorFilter.currentColor},set:function(e){this.target.pptColorActive&&(this.target.pptColorFilter.color=e)}},{key:"on",get:function(){return this.target.pptColorActive?"true":"false"},set:function(e){this.target.pptColorActive="true"===e}},{key:"designColor",get:function(){return this.target.pptColorFilter.designColor}}]),e}(),Rv=function(){function e(t){_(this,e),this.target=t}return T(e,[{key:"color",get:function(){return this.target.fillColorFilter.currentColor},set:function(e){this.target.fillActive&&(this.target.fillColorFilter.color=e)}},{key:"on",get:function(){return this.target.fillActive?"true":"false"},set:function(e){this.target.fillActive="true"===e}},{key:"designColor",get:function(){return this.target.fillColorFilter.designColor}}]),e}(),Lv=function(){function e(t,n,r){_(this,e),this.hardHidden=!1,this.designRotation=0,this.target=t,!0===n&&(this.hardHidden=!0),this.designRotation=r}return T(e,[{key:"opacity",get:function(){return this.target.alpha},set:function(e){this.target.alpha=e}},{key:"rotation",get:function(){return this.target.rotation/Math.PI*180},set:function(e){this.target.rotation=e/180*Math.PI+this.designRotation}},{key:"visibility",get:function(){return this.target.visible?"visible":"hidden"},set:function(e){this.visibility===e||this.hardHidden||(this.target.visible="visible"===e)}}]),e}(),jv=function(){function e(t,n){_(this,e),this.actions=[],this.ctx=n,this.object=t,this.object.interactive=!0}return T(e,[{key:"reset",value:function(e){this.object.interactive=!1,this.object.removeAllListeners(),this.object=e,this.object.interactive=!0}},{key:"addAction",value:function(e,t){var n=this;this.actions.push([e,t]),"click"===t?(this.object.addListener("pointertap",(function(){return n.handleAction(e)})),this.object.cursor="pointer"):"hover"===t&&this.object.addListener("mouseover",(function(){return n.handleAction(e)}))}},{key:"getOriginHitArea",value:function(){return this.object.hitArea?this.object.hitArea:new jl.k(0,0,this.object.width,this.object.height)}},{key:"handleAction",value:function(e){this.ctx.eventHub.emit(bb.hyperlinkTrigger,e),this.execAction(e)}},{key:"execAction",value:function(e){var t,n;if(this.ctx.eventHub.emit(bb.userInput),"ppaction://hlinksldjump"===e.action){var r=(null!==(t=null==e?void 0:e.target)&&void 0!==t?t:"").match(/slide(\d+)\.xml/);r&&r[1]&&this.ctx.eventHub.emit(bb.requestGotoSlide,Number(r[1]))}else if("ppaction://hlinkshowjump?jump=nextslide"===e.action)this.ctx.eventHub.emit(bb.requestNextSlide);else if("ppaction://hlinkshowjump?jump=previousslide"===e.action)this.ctx.eventHub.emit(bb.requestPrevSlide);else if("ppaction://hlinkshowjump?jump=firstslide"===e.action)this.ctx.eventHub.emit(bb.requestGotoSlide,1);else if("ppaction://hlinkshowjump?jump=lastslide"===e.action)this.ctx.eventHub.emit(bb.requestGotoSlide,-1);else if("ppaction://hlinkshowjump?jump=lastslideviewed"===e.action){var i=this.ctx.lastViewedIndex;this.ctx.eventHub.emit(bb.requestGotoSlide,i)}else"ppaction://hlinkshowjump?jump=endshow"===e.action?this.ctx.eventHub.emit(bb.requestGotoSlide,-1):""===e.action&&(null===(n=e.target)||void 0===n?void 0:n.startsWith("http"))&&this.ctx.eventHub.emit(bb.requestOpenUrl,e.target)}}]),e}();function Bv(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5;return Math.abs(e-t)<=Math.pow(10,-n)}function Uv(e){return Math.floor(1e6*e)/1e6}var zv=function(){function e(){_(this,e),this.point={x:0,y:0},this.slope=Math.PI/4}return T(e,[{key:"resolveY",value:function(e){return Math.tan(this.slope)*(e-this.point.x)+this.point.y}},{key:"distanceToLinearEquation",value:function(e){return Bv(this.slope,e.slope)?this.distanceToPoint(e.point):-1}},{key:"distanceToPoint",value:function(t){var n;if(Math.tan(this.slope)*(t.x-this.point.x)+this.point.y===t.y)return 0;n=this.slope>=Math.PI/2?this.slope-Math.PI/2:Math.PI/2+this.slope;var r=e.fromPointSlope(t,n),i=this.crossPoint(r);return i?Math.ceil(Math.sqrt(Math.pow(i.x-t.x,2)+Math.pow(i.y-t.y,2))):0}},{key:"crossPoint",value:function(e){if(Bv(e.slope,this.slope))return null;var t=0,n=0,r=Math.tan(e.slope),i=Math.tan(this.slope),o=this.point,a=o.x,s=o.y,u=e.point,l=u.x,c=u.y;return Bv(this.slope,Math.PI/2)?n=r*((t=this.point.x)-l)+c:Bv(e.slope,Math.PI/2)?n=i*((t=e.point.x)-a)+s:Bv(this.slope,Math.PI)||Bv(this.slope,0)?t=((n=this.point.y)-c)/r+l:Bv(e.slope,Math.PI)||Bv(e.slope,0)?t=((n=e.point.y)-s)/i+a:n=i*((t=(r*l-c+s-i*a)/(r-i))-a)+s,{x:t,y:n}}}],[{key:"fromPointSlope",value:function(t,n){var r=new e;return r.point=t,r.slope=n,r}}]),e}(),Fv=function(){function e(t,n,r){var i,o,a,s,u,l,c=this;_(this,e),this.scaleExt={x:1,y:1},this.scaleOrigin={x:1,y:1},this.designScale={x:1,y:1},this.bound=new jl.j(0,0,1,1),this.pptX=0,this.pptY=0,this.presetSubType=0,this.designWidth=0,this.designHeight=0,this.designX=0,this.designY=0,this.hasPreset=!1,this.container=new Rl.b,this.ctx=n,this.style=new Lv(this.container,!!t.hardHidden,t.rotation||0),this.designGlobalPosition={x:r.parentGlobalPos.x+(null!==(o=null===(i=t.position)||void 0===i?void 0:i.x)&&void 0!==o?o:0),y:r.parentGlobalPos.y+(null!==(s=null===(a=t.position)||void 0===a?void 0:a.y)&&void 0!==s?s:0)},(t.hlinkClick||t.hlinkHover)&&(this.hyperlink=new jv(this.container,this.ctx),t.hlinkHover&&(null===(u=this.hyperlink)||void 0===u||u.addAction(t.hlinkHover,"hover")),t.hlinkClick&&(null===(l=this.hyperlink)||void 0===l||l.addAction(t.hlinkClick,"click"))),this.ctx.clock.waitUntil((function(){try{return!!c.container.width}catch(e){return!1}}),3e3).then((function(){try{c.designWidth=c.designWidth||c.container.width}catch(e){}})),this.ctx.clock.waitUntil((function(){try{return!!c.container.height}catch(e){return!1}}),3e3).then((function(){try{c.designHeight=c.designHeight||c.container.height}catch(e){}}))}return T(e,[{key:"updateScale",value:function(){this.container&&(this.container.scale.x=this.designScale.x*this.scaleExt.x*this.scaleOrigin.x,this.container.scale.y=this.designScale.y*this.scaleExt.y*this.scaleOrigin.y)}},{key:"updateTransform",value:function(e){var t,n,r,i,o,a,s,u;this.designWidth=e.width,this.designHeight=e.height,this.designX=null!==(n=null===(t=e.position)||void 0===t?void 0:t.x)&&void 0!==n?n:0,this.designY=null!==(i=null===(r=e.position)||void 0===r?void 0:r.y)&&void 0!==i?i:0;var l=this.designWidth/2,c=this.designHeight/2;this.container.width=this.designWidth,this.container.height=this.designHeight,this.container.pivot.x=l,this.container.pivot.y=c;var h=null!==(a=null===(o=e.position)||void 0===o?void 0:o.x)&&void 0!==a?a:0,d=null!==(u=null===(s=e.position)||void 0===s?void 0:s.y)&&void 0!==u?u:0;this.container.x=h+l,this.container.y=d+c,e.scale&&(this.designScale={x:e.scale.x,y:e.scale.y},this.container.scale.x=e.scale.x,this.container.scale.y=e.scale.y),e.rotation&&(this.container.rotation=e.rotation);var f=new Dd;f.drawRect(0,0,this.designWidth,this.designHeight),this.container.addChild(f),this.json.hardHidden&&(this.container.visible=!1),this.bound.x=h,this.bound.y=d,this.bound.width=this.designWidth,this.bound.height=this.designHeight}},{key:"scale",get:function(){return this.scaleOrigin},set:function(e){this.scaleOrigin.x=e.x,this.scaleOrigin.y=e.y,this.updateScale()}},{key:"design_ppt_w",get:function(){return Uv(this.designWidth/this.ctx.stageWidth)}},{key:"design_ppt_h",get:function(){return Uv((this.designHeight||this.container.height)/this.ctx.stageHeight)}},{key:"design_ppt_x",get:function(){return Uv(this.designX/this.ctx.stageWidth)}},{key:"design_ppt_y",get:function(){return Uv(this.designY/this.ctx.stageHeight)}},{key:"ppt_w",get:function(){return this.scaleExt.x*this.scaleOrigin.x*this.designWidth/this.ctx.stageWidth},set:function(e){this.designWidth&&(this.scaleExt.x=e*this.ctx.stageWidth/this.designWidth,this.updateScale())}},{key:"ppt_h",get:function(){var e=this.designHeight||this.container.height;return this.scaleExt.y*this.scaleOrigin.y*e/this.ctx.stageHeight},set:function(e){this.designHeight&&(this.scaleExt.y=e*this.ctx.stageHeight/this.designHeight,this.updateScale())}},{key:"ppt_x",get:function(){return(this.container.position.x-this.container.pivot.x)/this.ctx.stageWidth},set:function(e){this.pptX=e;var t=544===this.presetSubType?this.scaleExt.x:1;this.container.position.x=e*this.ctx.stageWidth+this.container.pivot.x*t}},{key:"ppt_y",get:function(){return(this.container.position.y-this.container.pivot.y)/this.ctx.stageHeight},set:function(e){this.pptY=e;var t=544===this.presetSubType?this.scaleExt.y:1;this.container.position.y=e*this.ctx.stageHeight+this.container.pivot.y*t}},{key:"r",get:function(){return this.container.rotation},set:function(e){this.container.rotation=e}},{key:"xshear",set:function(e){this.container.skew.x=e},get:function(){return this.container.skew.x}},{key:"yshear",set:function(e){this.container.skew.y=e},get:function(){return this.container.skew.y}}]),e}(),Gv=n(112),Hv=n.n(Gv),Vv=function(){function e(t){if(_(this,e),this._isInit=!1,this.h=0,this.s=0,this.l=0,this.a=1,t){this._isInit=!0;var n=t.match(/-?[0-9]+/g);n&&(this.h=parseInt(n[0],10),this.s=parseInt(n[1],10)/100,this.l=parseInt(n[2],10)/100)}}return T(e,[{key:"isInit",value:function(){return this._isInit}},{key:"by",value:function(e,t){t.h=Math.max(Math.min(this.h+e.h,359),0),t.s=Math.max(Math.min(this.s+e.s,1),0),t.l=Math.max(Math.min(this.l+e.l,1),0),t.a=Math.max(Math.min(this.a+e.a,1),0)}},{key:"fromHexString",value:function(e){var t,n,r=c(Xv(e),4),i=r[0],o=r[1],a=r[2],s=r[3],u=0,l=Math.max(i,o,a),h=Math.min(i,o,a),d=l-h;n=(l+h)/2,0===d?u=0:l===i?u=(o-a)/d%6*60:l===o?u=60*((a-i)/d+2):l===a&&(u=60*((i-o)/d+4)),t=0===d?0:d/(1-Math.abs(2*n-1)),this.h=u,this.s=t,this.l=n,this.a=s}},{key:"interpolationFrom",value:function(e,t,n){var r=e.h+(this.h-e.h)*t,i=e.s+(this.s-e.s)*t,o=e.l+(this.l-e.l)*t,a=e.a+(this.a-e.a)*t;n.h=Math.max(Math.min(r,359),0),n.s=Math.max(Math.min(i,1),0),n.l=Math.max(Math.min(o,1),0),n.a=Math.max(Math.min(a,1),0)}},{key:"toHexString",value:function(){var e=[0,0,0,0],t=this.h,n=this.s,r=this.l;if(t<360&&t>=0&&n<=1&&n>=0&&r<=1&&r>=0){var i,o=(1-Math.abs(2*r-1))*n,a=o*(1-Math.abs(t/60%2-1)),s=r-o/2;e=[(i=c(t>=0&&t<60?[o,a,0]:t>=60&&t<120?[a,o,0]:t>=120&&t<180?[0,o,a]:t>=180&&t<240?[0,a,o]:t>=240&&t<300?[a,0,o]:[o,0,a],3))[0]+s,i[1]+s,i[2]+s,this.a]}return Qv(e)}}]),e}(),Wv=function(){function e(t){_(this,e),this._isInit=!1,this.r=0,this.g=0,this.b=0,this.a=0,t&&(this._isInit=!0,this.fromHexString(t))}return T(e,[{key:"fromHexString",value:function(e){var t=c(Xv(e),4),n=t[0],r=t[1],i=t[2],o=t[3];this.r=n,this.g=r,this.b=i,this.a=o}},{key:"isInit",value:function(){return this._isInit}},{key:"interpolationFrom",value:function(e,t,n){n.r=e.r+(this.r-e.r)*t,n.g=e.g+(this.g-e.g)*t,n.b=e.b+(this.b-e.b)*t,n.a=e.a+(this.a-e.a)*t}},{key:"by",value:function(e,t){t.r=Math.min(Math.max(this.r+e.r,0),255),t.g=Math.min(Math.max(this.g+e.g,0),255),t.b=Math.min(Math.max(this.b+e.b,0),255),t.a=Math.min(Math.max(this.a+e.a,0),1)}},{key:"toHexString",value:function(){return Qv([this.r,this.g,this.b,this.a])}}]),e}();function Yv(e){var t=e.substring(1);return[parseInt(t.substring(0,6),16),parseInt(t.substring(6,8),16)/255]}function Xv(e){return 0===(e=e.replace(/^#/,"")).substring(6,8).length&&(e+="FF"),[parseInt(e.substring(0,2).padStart(8,"0"),16)/255,parseInt(e.substring(2,4).padStart(8,"0"),16)/255,parseInt(e.substring(4,6).padStart(8,"0"),16)/255,parseInt(e.substring(6,8).padStart(8,"0"),16)/255]}function Qv(e){return"#"+Math.round(255*e[0]).toString(16).padStart(2,"0")+Math.round(255*e[1]).toString(16).padStart(2,"0")+Math.round(255*e[2]).toString(16).padStart(2,"0")+Math.round(255*e[3]).toString(16).padStart(2,"0")}function Zv(e,t,n){var r=Xv(e),i=Xv(t),o=Math.round(255*(r[0]+(i[0]-r[0])*n)),a=Math.round(255*(r[1]+(i[1]-r[1])*n)),s=Math.round(255*(r[2]+(i[2]-r[2])*n)),u=Math.round(255*(r[3]+(i[3]-r[3])*n));return"#"+o.toString(16).padStart(2,"0")+a.toString(16).padStart(2,"0")+s.toString(16).padStart(2,"0")+u.toString(16).padStart(2,"0")}var qv=function(e){p(n,e);var t=m(n);function n(){var e;return _(this,n),(e=t.call(this,void 0,"\nvarying vec2 vTextureCoord;\n\nuniform vec4 color;\nuniform sampler2D uSampler;\n\nvoid main(void){\n vec4 texColor = texture2D(uSampler, vTextureCoord);\n\n if (texColor.a > 0.0) {\n vec4 resultColor = color;\n resultColor = resultColor * texColor.a;\n gl_FragColor = resultColor;\n } else {\n gl_FragColor = texColor;\n }\n}\n",{color:new Float32Array([0,0,0,0]),active:0})).currentColor="#FFFFFFFF",e.designColor="#FFFFFFFF",e}return T(n,[{key:"color",set:function(e){this.currentColor=e;var t=Xv(e);this.uniforms.color=Float32Array.from(t)},get:function(){return this.currentColor}}]),n}(Xl.k),Jv=new Up.ColorMatrixFilter;Jv.matrix=[1,0,0,0,-.2,0,1,0,0,-.2,0,0,1,0,-.2,0,0,0,1,0];var Kv=new Up.ColorMatrixFilter;Kv.matrix=[1,0,0,0,-.1,0,1,0,0,-.1,0,0,1,0,-.1,0,0,0,1,0];var $v=new Up.ColorMatrixFilter;$v.matrix=[1,0,0,0,.2,0,1,0,0,.2,0,0,1,0,.2,0,0,0,1,0];var em=new Up.ColorMatrixFilter;em.matrix=[1,0,0,0,.1,0,1,0,0,.1,0,0,1,0,.1,0,0,0,1,0];var tm={darken:Jv,darkenLess:Kv,lightenLess:em,lighten:$v},nm=function(e){p(n,e);var t=m(n);function n(e,r,i){var o;return _(this,n),(o=t.call(this,{position:{x:e.x,y:e.y},width:e.width,height:e.height},r,i)).fillColorFilter=new qv,o.fill=new Rv(y(o)),o.json=e,o.ctx=r,o.parentGlobalPos=i.parentGlobalPos,o.global={x:i.parentGlobalPos.x+e.x,y:i.parentGlobalPos.y+e.y},o.updateTransform({position:{x:e.x,y:e.y},width:e.width,height:e.height}),o}return T(n,[{key:"clearOnSlideChange",value:function(){}},{key:"initOnReuse",value:function(){}},{key:"getTextElement",value:function(){return null}},{key:"getBgElement",value:function(){return null}},{key:"fillActive",get:function(){var e,t;return(null!==(t=null===(e=this.container.filters)||void 0===e?void 0:e.length)&&void 0!==t?t:-1)>0},set:function(e){var t,n;e?(null!==(n=null===(t=this.container.filters)||void 0===t?void 0:t.indexOf(this.fillColorFilter))&&void 0!==n?n:-1)<0&&(this.container.filters=[this.fillColorFilter]):this.container.filters=[]}},{key:"renderContainer",get:function(){return this.container}},{key:"interactiveContainer",get:function(){return this.container}},{key:"ppt_x",get:function(){return this.global.x/this.ctx.stageWidth},set:function(e){var t=e*this.ctx.stageWidth-this.global.x,n=544===this.presetSubType?this.scaleExt.x:1;this.container.position.x=this.designX+t+this.container.pivot.x*n}},{key:"ppt_y",get:function(){return this.global.y/this.ctx.stageHeight},set:function(e){var t=e*this.ctx.stageHeight-this.global.y,n=544===this.presetSubType?this.scaleExt.y:1;this.container.position.y=this.designY+t+this.container.pivot.y*n}},{key:"design_ppt_x",get:function(){return Uv(this.global.x/this.ctx.stageWidth)}},{key:"design_ppt_y",get:function(){return Uv(this.global.y/this.ctx.stageHeight)}}]),n}(Fv),rm=function(){function e(t,n,r,i,o,a,s,u,l,c,h){_(this,e),this.ctx=t,this.type=n,this.lineWidth=r,this.width=i,this.height=o,this.fillColor=a,this.isHorz=s,this.renderContainer=new Rl.b,this.ghcTextureId="".concat(u,"-text-p").concat(l,"-l").concat(c,"-u").concat(h,"-underLine")}return T(e,[{key:"createPaths",value:function(){if("ww"===this.type)return null;var e,t="M 0,0 L ".concat(9525*this.width,",0"),n=[this.width,this.lineWidth],r=n[0],i=n[1];return this.isHorz||(t="M 0,0 L 0,"+9525*this.height,r=(e=[this.lineWidth,this.height])[0],i=e[1]),{paths:[{id:uv(),path:t,fill:"norm",hasStroke:!0,scale:{x:1,y:1},hash:_v()(t)}],width:r,height:i}}},{key:"getLineStyle",value:function(){var e={width:this.lineWidth};return"dotted"===this.type&&(e.dash=""+this.lineWidth),e}},{key:"preRender",value:function(){var e=this.createPaths();if(e){var t=e.paths,n=e.width,r=e.height,i=t.reduce((function(e,t){return e+t.hash}),"");this.ctx.graphicsTexture.addGraphics(this.ghcTextureId,t,i,{x:0,y:0},n,r,this.getLineStyle(),this.ctx.objectPoolGroup,!1,null,this.fillColor)}}},{key:"render",value:function(){if(this.ghcTextureId){var e=this.ctx.graphicsTexture.getGraphicsData(this.ghcTextureId);e&&(this.sprite=new Ld,this.sprite.texture=e.texture,this.sprite.pivot.x=e.pivot.x,this.sprite.scale.x=e.scale,this.sprite.scale.y=e.scale)}}},{key:"destroy",value:function(){var e;null===(e=this.sprite)||void 0===e||e.destroy({texture:!0})}}]),e}(),im=134217729;function om(e,t,n,r,i){var o,a,s,u,l=t[0],c=r[0],h=0,d=0;c>l==c>-l?(o=l,l=t[++h]):(o=c,c=r[++d]);var f=0;if(hl==c>-l?(s=o-((a=l+o)-l),l=t[++h]):(s=o-((a=c+o)-c),c=r[++d]),o=a,0!==s&&(i[f++]=s);hl==c>-l?(s=o-((a=o+l)-(u=a-o))+(l-u),l=t[++h]):(s=o-((a=o+c)-(u=a-o))+(c-u),c=r[++d]),o=a,0!==s&&(i[f++]=s);for(;h0!=s>0)return u;var l=Math.abs(a+s);return Math.abs(u)>=33306690738754716e-32*l?u:-function(e,t,n,r,i,o,a){var s,u,l,c,h,d,f,p,v,m,g,y,b,x,_,w,T,M,S=e-i,E=n-i,A=t-o,I=r-o;h=(_=(p=S-(f=(d=im*S)-(d-S)))*(m=I-(v=(d=im*I)-(d-I)))-((x=S*I)-f*v-p*v-f*m))-(g=_-(T=(p=A-(f=(d=im*A)-(d-A)))*(m=E-(v=(d=im*E)-(d-E)))-((w=A*E)-f*v-p*v-f*m))),sm[0]=_-(g+h)+(h-T),h=(b=x-((y=x+g)-(h=y-x))+(g-h))-(g=b-w),sm[1]=b-(g+h)+(h-w),h=(M=y+g)-y,sm[2]=y-(M-h)+(g-h),sm[3]=M;var C=function(e,t){for(var n=t[0],r=1;r=N||-C>=N)return C;if(s=e-(S+(h=e-S))+(h-i),l=n-(E+(h=n-E))+(h-i),u=t-(A+(h=t-A))+(h-o),c=r-(I+(h=r-I))+(h-o),0===s&&0===u&&0===l&&0===c)return C;if(N=11093356479670487e-47*a+33306690738754706e-32*Math.abs(C),(C+=S*c+I*s-(A*l+E*u))>=N||-C>=N)return C;h=(_=(p=s-(f=(d=im*s)-(d-s)))*(m=I-(v=(d=im*I)-(d-I)))-((x=s*I)-f*v-p*v-f*m))-(g=_-(T=(p=u-(f=(d=im*u)-(d-u)))*(m=E-(v=(d=im*E)-(d-E)))-((w=u*E)-f*v-p*v-f*m))),hm[0]=_-(g+h)+(h-T),h=(b=x-((y=x+g)-(h=y-x))+(g-h))-(g=b-w),hm[1]=b-(g+h)+(h-w),h=(M=y+g)-y,hm[2]=y-(M-h)+(g-h),hm[3]=M;var k=om(4,sm,4,hm,um);h=(_=(p=S-(f=(d=im*S)-(d-S)))*(m=c-(v=(d=im*c)-(d-c)))-((x=S*c)-f*v-p*v-f*m))-(g=_-(T=(p=A-(f=(d=im*A)-(d-A)))*(m=l-(v=(d=im*l)-(d-l)))-((w=A*l)-f*v-p*v-f*m))),hm[0]=_-(g+h)+(h-T),h=(b=x-((y=x+g)-(h=y-x))+(g-h))-(g=b-w),hm[1]=b-(g+h)+(h-w),h=(M=y+g)-y,hm[2]=y-(M-h)+(g-h),hm[3]=M;var D=om(k,um,4,hm,lm);h=(_=(p=s-(f=(d=im*s)-(d-s)))*(m=c-(v=(d=im*c)-(d-c)))-((x=s*c)-f*v-p*v-f*m))-(g=_-(T=(p=u-(f=(d=im*u)-(d-u)))*(m=l-(v=(d=im*l)-(d-l)))-((w=u*l)-f*v-p*v-f*m))),hm[0]=_-(g+h)+(h-T),h=(b=x-((y=x+g)-(h=y-x))+(g-h))-(g=b-w),hm[1]=b-(g+h)+(h-w),h=(M=y+g)-y,hm[2]=y-(M-h)+(g-h),hm[3]=M;var P=om(D,lm,4,hm,cm);return cm[P-1]}(e,t,n,r,i,o,l)}var fm=Math.pow(2,-52),pm=new Uint32Array(512),vm=function(){function e(t){_(this,e);var n=t.length>>1;if(n>0&&"number"!=typeof t[0])throw new Error("Expected coords to contain numbers.");this.coords=t;var r=Math.max(2*n-5,0);this._triangles=new Uint32Array(3*r),this._halfedges=new Int32Array(3*r),this._hashSize=Math.ceil(Math.sqrt(n)),this._hullPrev=new Uint32Array(n),this._hullNext=new Uint32Array(n),this._hullTri=new Uint32Array(n),this._hullHash=new Int32Array(this._hashSize).fill(-1),this._ids=new Uint32Array(n),this._dists=new Float64Array(n),this.update()}return T(e,null,[{key:"from",value:function(t){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_m,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:wm,i=t.length,o=new Float64Array(2*i),a=0;a>1,a=1/0,s=1/0,u=-1/0,l=-1/0,c=0;cu&&(u=h),d>l&&(l=d),this._ids[c]=c}for(var f,p,v,m=(a+u)/2,g=(s+l)/2,y=1/0,b=0;b0&&(p=T,y=M)}for(var S=e[2*p],E=e[2*p+1],A=1/0,I=0;IL&&(P[O++]=j,L=this._dists[j])}return this.hull=P.subarray(0,O),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(dm(_,w,S,E,N,k)<0){var B=p,U=S,z=E;p=v,S=N,E=k,v=B,N=U,k=z}var F=function(e,t,n,r,i,o){var a=n-e,s=r-t,u=i-e,l=o-t,c=a*a+s*s,h=u*u+l*l,d=.5/(a*l-s*u);return{x:e+(l*c-s*h)*d,y:t+(a*h-u*c)*d}}(_,w,S,E,N,k);this._cx=F.x,this._cy=F.y;for(var G=0;G0&&Math.abs(Q-V)<=fm&&Math.abs(Z-W)<=fm)&&(V=Q,W=Z,X!==f&&X!==p&&X!==v)){for(var q=0,J=0,K=this._hashKey(Q,Z);J=0;)if((ee=$)===q){ee=-1;break}if(-1!==ee){var te=this._addTriangle(ee,X,n[ee],-1,-1,r[ee]);r[X]=this._legalize(te+2),r[ee]=te,H++;for(var ne=n[ee];$=n[ne],dm(Q,Z,e[2*ne],e[2*ne+1],e[2*$],e[2*$+1])<0;)te=this._addTriangle(ne,X,$,r[X],-1,r[ne]),r[X]=this._legalize(te+2),n[ne]=ne,H--,ne=$;if(ee===q)for(;dm(Q,Z,e[2*($=t[ee])],e[2*$+1],e[2*ee],e[2*ee+1])<0;)te=this._addTriangle($,X,ee,-1,r[ee],r[$]),this._legalize(te+2),r[$]=te,n[ee]=ee,H--,ee=$;this._hullStart=t[X]=ee,n[ee]=t[ne]=X,n[X]=ne,i[this._hashKey(Q,Z)]=X,i[this._hashKey(e[2*ee],e[2*ee+1])]=ee}}}this.hull=new Uint32Array(H);for(var re=0,ie=this._hullStart;re0?3-i:1+i)/4*this._hashSize))%this._hashSize;var n,r,i}},{key:"_legalize",value:function(e){for(var t=this._triangles,n=this._halfedges,r=this.coords,i=0,o=0;;){var a=n[e],s=e-e%3;if(o=s+(e+2)%3,-1!==a){var u=a-a%3,l=s+(e+1)%3,c=u+(a+2)%3,h=t[o],d=t[e],f=t[l],p=t[c];if(gm(r[2*h],r[2*h+1],r[2*d],r[2*d+1],r[2*f],r[2*f+1],r[2*p],r[2*p+1])){t[e]=p,t[a]=h;var v=n[c];if(-1===v){var m=this._hullStart;do{if(this._hullTri[m]===c){this._hullTri[m]=e;break}m=this._hullPrev[m]}while(m!==this._hullStart)}this._link(e,v),this._link(a,n[o]),this._link(o,c);var g=u+(a+1)%3;i=n&&t[e[s]]>a;)e[s+1]=e[s--];e[s+1]=o}else{var u=n+1,l=r;xm(e,n+r>>1,u),t[e[n]]>t[e[r]]&&xm(e,n,r),t[e[u]]>t[e[r]]&&xm(e,u,r),t[e[n]]>t[e[u]]&&xm(e,n,u);for(var c=e[u],h=t[c];;){do{u++}while(t[e[u]]h);if(l=l-n?(bm(e,t,u,r),bm(e,t,n,l-1)):(bm(e,t,n,l-1),bm(e,t,u,r))}}function xm(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function _m(e){return e[0]}function wm(e){return e[1]}function Tm(e,t,n){var r=t/2,i=n/2,o=[{x:-r,y:i},{x:-r,y:-i},{x:r,y:i},{x:r,y:-i}],s=[zv.fromPointSlope({x:-r,y:0},Math.PI/2),zv.fromPointSlope({x:0,y:i},0),zv.fromPointSlope({x:r,y:0},Math.PI/2),zv.fromPointSlope({x:0,y:-i},0)],u=[],l=e.stopList.slice(1,e.stopList.length-1).map((function(o){for(var l,c,h,d=2*Math.PI,f=null!==(c=null===(l=e.line)||void 0===l?void 0:l.ang)&&void 0!==c?c:0;f>d;)f-=d;for(;f<0;)f+=d;var p={x:0,y:0};Bv(f,Math.PI/2)?(p.x=0,p.y=n/2-o.pos*n):Bv(f,0)?(p.x=o.pos*t-t/2,p.y=0):(p.x=o.pos*t-t/2,p.y=n/2-o.pos*n),f>Math.PI/2&&f<=Math.PI&&(p.x*=-1),f>Math.PI&&f<=2*Math.PI&&(p.y*=-1);var v=zv.fromPointSlope(p,Math.PI/2-((null===(h=e.line)||void 0===h?void 0:h.ang)||0)),m=s.map((function(e){return v.crossPoint(e)})).filter((function(e){return e&&e.x<=r&&e.x>=-r&&e.y<=i&&e.y>=-i})).map((function(e){return{point:e,color:o.color}})).sort((function(e,t){return t.point.y-e.point.y}));u.push.apply(u,a(m));for(var g=Math.abs(m[1].point.x-m[0].point.x)/10,y=20;y--;){var b=y%2==0?1:-1,x=p.x+b*g,_=v.resolveY(x);x<=r&&x>=-r&&_<=i&&_>=-i&&u.push({point:{x:x,y:_},color:o.color}),g+=g}return v})),c=[],h=[];e:for(var d=0;d= 0.49 || texColor.a < 0.9) {\n return vec4(1.0, 1.0, 1.0, 1.0) * texColor.a;\n } else {\n return vec4(0.0, 0.0, 0.0, 1.0) * texColor.a;\n }\n}\n",alphaModFix:"\nvec4 transform(vec4 texColor, float arg) {\n return texColor * arg;\n}\n",alphaBiLevel:"\nvec4 transform(vec4 texColor, float arg) {\n vec4 result = vec4(texColor);\n result.rgb = result.rgb / texColor.a;\n if (texColor.a < arg) {\n result.a = 0.0;\n } else {\n result.a = 1.0;\n }\n return result;\n}\n",alphaCeiling:"\nvec4 transform(vec4 texColor, float arg) {\n vec4 result = vec4(texColor);\n result.rgb = result.rgb / texColor.a;\n if (texColor.a > 0.0) {\n result.a = 1.0;\n }\n return result;\n}\n",alphaFloor:"\nvec4 transform(vec4 texColor, float arg) {\n vec4 result = vec4(texColor);\n result.rgb = result.rgb / texColor.a;\n if (texColor.a < 1.0) {\n result.a = 0.0;\n }\n return result;\n}\n",grayscl:"\nvec4 transform(vec4 texColor, float arg) {\n float avg = (texColor.r + texColor.g + texColor.b) / 3.0;\n return vec4(avg, avg, avg, texColor.a);\n}\n"},Am=function(e){p(n,e);var t=m(n);function n(e,r){var i;return _(this,n),t.call(this,void 0,(i=Em[e],"\nvarying vec2 vTextureCoord;\n\nuniform float arg;\nuniform sampler2D uSampler;\n\n".concat(Sm.map((function(e){return e+"\n"})).join("\n"),"\n\n").concat(i,"\n\nvoid main(void){\n vec4 texColor = texture2D(uSampler, vTextureCoord);\n gl_FragColor = transform(texColor, arg);\n}\n")),{arg:r})}return n}(Xl.k),Im=[Mm],Cm={clrChange:"\nvec4 transform(vec4 texColor, vec4 arg1, vec4 arg2) {\n float epsilon = 0.001;\n vec3 colorDiff = arg1.rgb - (texColor.rgb / max(texColor.a, 0.0000000001));\n float colorDistance = length(colorDiff);\n if (colorDistance < epsilon) {\n arg2.rgb *= arg2.a;\n return arg2;\n } else {\n return texColor;\n }\n}\n",changeBulletColor:"\nvec4 transform(vec4 texColor, vec4 arg1, vec4 arg2) {\n if (texColor.a == 0.0) {\n return texColor;\n } else {\n return arg2;\n }\n}\n",duotone:"\nvec4 transform(vec4 texColor, vec4 arg1, vec4 arg2) {\n float avg = (texColor.r + texColor.g + texColor.b) / 3.0;\n\n vec3 hsl = rgb2hsl(vec3(avg, avg, avg));\n\n vec3 result = arg2.rgb * hsl.z + arg1.rgb * (1.0 - hsl.z);\n\n return vec4(result * texColor.a, texColor.a);\n}\n"},Nm=function(e){p(n,e);var t=m(n);function n(e,r,i){var o;return _(this,n),t.call(this,void 0,(o=Cm[e],"\nvarying vec2 vTextureCoord;\n\nuniform vec4 arg1;\nuniform vec4 arg2;\nuniform sampler2D uSampler;\n\n".concat(Im.map((function(e){return e+"\n"})).join("\n"),"\n\n").concat(o,"\n\nvoid main(void){\n vec4 texColor = texture2D(uSampler, vTextureCoord);\n gl_FragColor = transform(texColor, arg1, arg2);\n}\n")),{arg1:Float32Array.from(r),arg2:Float32Array.from(i)})}return n}(Xl.k),km=[Mm],Dm={lum:"\nvec4 transform(vec4 texColor, float arg1, float arg2) {\n vec3 rgb = texColor.rgb / texColor.a;\n\n // 对比度\n highp float C = arg2 * 255.0;\n highp float F = (259.0 * (255.0 + C)) / (255.0 * (259.0 - C));\n rgb.rgb = F * (rgb.rgb - 0.5) + 0.5;\n\n // 亮度\n rgb.rgb += arg1;\n\n rgb.rgb *= texColor.a;\n return vec4(rgb, texColor.a);\n}\n"},Pm=function(e){p(n,e);var t=m(n);function n(e,r,i){var o;return _(this,n),t.call(this,void 0,(o=Dm[e],"\nvarying vec2 vTextureCoord;\n\nuniform float arg1;\nuniform float arg2;\nuniform sampler2D uSampler;\n\n".concat(km.map((function(e){return e+"\n"})).join("\n"),"\n\n").concat(o,"\n\nvoid main(void){\n vec4 texColor = texture2D(uSampler, vTextureCoord);\n gl_FragColor = transform(texColor, arg1, arg2);\n}\n")),{arg1:r,arg2:i})}return n}(Xl.k),Om=[Mm],Rm={alphaInv:"\nvec4 transform(vec4 texColor, vec4 arg1) {\n float alpha = 1.0 - texColor.a;\n arg1.rgb = arg1.rgb * alpha;\n arg1.a = alpha;\n return arg1;\n}\n"},Lm=function(e){p(n,e);var t=m(n);function n(e,r){var i;return _(this,n),t.call(this,void 0,(i=Rm[e],"\nvarying vec2 vTextureCoord;\n\nuniform vec4 arg1;\nuniform sampler2D uSampler;\n\n".concat(Om.map((function(e){return e+"\n"})).join("\n"),"\n\n").concat(i,"\n\nvoid main(void){\n vec4 texColor = texture2D(uSampler, vTextureCoord);\n gl_FragColor = transform(texColor, arg1);\n}\n")),{arg1:Float32Array.from(r)})}return n}(Xl.k);function jm(e,t){var n=[];return e.forEach((function(e){var r=((null==t?void 0:t.filter)||[]).indexOf(e.type)>=0;if(["biLevel","alphaBiLevel","alphaCeiling","alphaModFix","alphaFloor","grayscl"].indexOf(e.type)>=0&&r)n.push(new Am(e.type,e.args[0]||0));else if(["clrChange","changeBulletColor","duotone"].indexOf(e.type)>=0&&r){var i=Xv(e.args[0]),o=Xv(e.args[1]);n.push(new Nm(e.type,i,o))}else if("lum"===e.type&&r)n.push(new Pm(e.type,e.args[0],e.args[1]));else if("alphaInv"===e.type&&r){var a=Xv(e.args[0]);n.push(new Lm(e.type,a))}})),n}var Bm=function(){function e(t,n,r,i,o){_(this,e),this.ctx=t,this.fillStyle=n,this.width=r,this.height=i,this.config=o,this.clonedObjects=[],this._displayObject=null,this.gradientHash=_v()("".concat(JSON.stringify(n)).concat(Math.ceil(r)).concat(Math.ceil(i)))}return T(e,[{key:"createDisplayObject",value:function(){var e;if(!this.fillStyle)return null;if(this.config.useSlideBackgroundFill&&this.ctx.bgTexture){var t=new Ld;return t.texture=this.ctx.bgTexture,t}if("solidFill"===this.fillStyle.fillType||"noFill"===this.fillStyle.fillType)return null;if("gradientFill"===this.fillStyle.fillType){var n=new Ld,r=function(e,t,n){var r,i=new Rl.b;if(e.stopList.sort((function(e,t){return e.pos-t.pos})),!e.stopList.find((function(e){return 0===e.pos}))){var o=e.stopList[0];e.stopList.unshift({pos:0,color:o.color})}if(!e.stopList.find((function(e){return 1===e.pos}))){var s=e.stopList[e.stopList.length-1];e.stopList.push({pos:1,color:s.color})}var u=function(e){for(var t=[],n=0,r=e.length;n0&&this.config.useFilter&&(this.ctx.featureList||{}).filter&&(h.filters=jm(u,this.ctx.featureList)),this.config.fillFloat){var d=this.config.fillFloat.fillRect,f=d.l,p=d.t,v=d.r,m=d.b,g=this.width*(1-f-v),y=this.height*(1-p-m),b=null!==(e=this.config.shapeRotation)&&void 0!==e?e:0,x=new Dd;x.drawRect(0,0,g,y),x.pivot.x=g/2,x.pivot.y=y/2,x.rotation=b;var _=x.getBounds(),w=_.width,T=_.height;h.width=w,h.height=T,h.anchor.x=.5,h.anchor.y=.5,h.rotation=-1*b,h.name="math-texture",0===b?(h.position.x=w/2+f*this.width,h.position.y=T/2+p*this.height):(h.position.x=this.width/2,h.position.y=this.height/2)}else h.width=this.width,h.height=this.height,c.rotate&&(h.position.x=this.width/2,h.position.y=this.height/2,h.anchor.x=.5,h.anchor.y=.5,h.rotation=c.rotate/180*Math.PI);return h}}else if("gifFill"===this.fillStyle.fillType){var M=this.fillStyle,S=M.src,E=M.delays,A=M.filters,I=this.ctx.spriteTexture.getGifFrames(S).map((function(e,t){return{texture:e,time:E[t]||20}})),C=new jp(I,!0);C.name=uv(),C.width=this.width,C.height=this.height,A.length>0&&this.config.useFilter&&(this.ctx.featureList||{}).filter&&(C.filters=jm(A,this.ctx.featureList));var N=this.fillStyle.loop,k=1;return C.onLoop=function(){k+=1,N>0&&k>N&&C.gotoAndStop(C.totalFrames)},C}return null}},{key:"isSolidFill",value:function(){var e;return"solidFill"===(null===(e=this.fillStyle)||void 0===e?void 0:e.fillType)}},{key:"getSolidFillColor",value:function(){var e;return"solidFill"===(null===(e=this.fillStyle)||void 0===e?void 0:e.fillType)?this.fillStyle.color:"#000000"}},{key:"getClonedDisplayObject",value:function(){var e=this.createDisplayObject();return this.clonedObjects.push(e),e}},{key:"destroy",value:function(){var e;null===(e=this._displayObject)||void 0===e||e.destroy(),this._displayObject=null,this.clonedObjects.forEach((function(e){null==e||e.destroy()})),this.clonedObjects=[]}},{key:"displayObject",get:function(){return this._displayObject||(this._displayObject=this.createDisplayObject()),this._displayObject},set:function(e){this._displayObject&&this._displayObject.destroy({children:!0,texture:!0}),this._displayObject=e}},{key:"hasFill",get:function(){return!!this.fillStyle&&"noFill"!==this.fillStyle.fillType}}]),e}(),Um=function(e){p(n,e);var t=m(n);function n(){return _(this,n),t.apply(this,arguments)}return n}(Xl.k),zm=n(113),Fm=n.n(zm),Gm=n(114),Hm=n.n(Gm),Vm=function(e){p(n,e);var t=m(n);function n(e){var r;return _(this,n),(r=t.call(this,Fm.a,Hm.a,{uShapeFilterArea:new Float32Array([0,0,0,0]),uGlowColor:Xv(e.color),uSdfSampler:Xl.t.WHITE,uSdfReady:0,uSdfMaxDis:0,uRad:e.rad/2,uSdfPosition:new Float32Array([0,0])})).priority=3,r.json=e,r}return T(n,[{key:"filterAreaJustify",value:function(e){var t=Math.ceil(this.json.rad),n=Math.ceil(e.width+2*t),r=Math.ceil(e.height+2*t);return new jl.j(e.x-t,e.y-t,n,r)}},{key:"sdfBox",value:function(e,t){var n=Math.ceil(this.json.rad),r=Math.ceil(e+2*n),i=Math.ceil(t+2*n);return new jl.j(n,n,r,i)}}]),n}(Um),Wm=n(19),Ym=n.n(Wm),Xm=n(115),Qm=n.n(Xm),Zm=function(e){p(n,e);var t=m(n);function n(e){var r;return _(this,n),(r=t.call(this,Ym.a,Qm.a,{uShapeFilterArea:new Float32Array([0,0,0,0]),uRad:e.rad,uSdfSampler:Xl.t.WHITE,uSdfReady:0,uSdfMaxDis:1})).priority=2,r.json=e,r}return T(n,[{key:"filterAreaJustify",value:function(e){return e}},{key:"sdfBox",value:function(e,t){return new jl.j(0,0,e,t)}}]),n}(Um),qm=function e(){_(this,e)},Jm=n(116),Km=n.n(Jm),$m=function(e){p(n,e);var t=m(n);function n(e){return _(this,n),t.call(this,Ym.a,Km.a,{uColor:Xv(e)})}return n}(Xl.k),eg=function(e){p(n,e);var t=m(n);function n(e,r,i){var o;return _(this,n),(o=t.call(this)).order=1,o.outputTexture=Xl.t.WHITE,o.frameTextures=[],o.json=e,o.effectContainer=r,o.outputSprite=new Ld,o.targetScale=i,o.outputSprite.scale.x=o.json.sx,o.outputSprite.scale.y=o.json.sy,o.outputSprite.skew.x=(o.targetScale.x>0?1:-1)*o.json.kx,o.outputSprite.skew.y=(o.targetScale.y>0?1:-1)*o.json.ky,o.outputSprite.filters=[new Up.BlurFilter(o.json.blurRad/2,4),new $m(o.json.color)],o}return T(n,[{key:"updateFrame",value:function(e){var t=this.frameTextures[e];if(t){var n=this.effectContainer.getBounds(),r=(this.effectContainer.width-t.width)/2,i=(this.effectContainer.height-t.height)/2,o=new jl.g(n.x,n.y),a=new jl.g(n.x,n.y);switch(this.json.align){case"tl":a.x=n.x,a.y=n.y;break;case"t":a.x=n.x+n.width/2,a.y=n.y,o.x+=n.width/2;break;case"tr":a.x=n.x+n.width,a.y=n.y,o.x+=n.width;break;case"l":a.x=n.x,a.y=n.y+n.height/2,o.y+=n.height/2;break;case"ctr":a.x=n.x+n.width/2,a.y=n.y+n.height/2,o.x+=n.width/2,o.y+=n.height/2;break;case"r":a.x=n.x+n.width,a.y=n.y+n.height/2,o.x+=n.width,o.y+=n.height/2;break;case"bl":a.x=n.x,a.y=n.y+n.height,o.y+=n.height;break;case"b":a.x=n.x+n.width/2,a.y=n.y+n.height,o.x+=n.width/2,o.y+=n.height;break;case"br":a.x=n.x+n.width,a.y=n.y+n.height,o.x+=n.width,o.y+=n.height}var s=this.effectContainer.toLocal(a);this.outputSprite.pivot.x=s.x,this.outputSprite.pivot.y=s.y;var u=new jl.g(this.json.dist,0),l=new jl.d;l.rotate(this.json.dir),l.translate(o.x+r,o.y+i),l.apply({x:u.x,y:u.y},u);var c=this.effectContainer.toLocal(u);this.outputSprite.position.x=c.x,this.outputSprite.position.y=c.y,this.outputSprite.texture=t}}},{key:"createOutput",value:function(e,t){this.frameTextures[t]=e}},{key:"setFrameOffset",value:function(e,t){}}]),n}(qm),tg=n(117),ng=n.n(tg),rg=function(e){p(n,e);var t=m(n);function n(e,r){var i;return _(this,n),i=t.call(this,Ym.a,ng.a,{uStartAlpha:e.startAlpha,uEndAlpha:e.endAlpha,uStartPos:e.startPos,uEndPos:e.endPos,uHeight:r}),console.log(y(i)),i}return n}(Xl.k),ig=function(e){p(n,e);var t=m(n);function n(e,r,i,o,a){var s;_(this,n),(s=t.call(this)).order=2,s.outputSprite=new Ld,s.outputTexture=Xl.t.WHITE,s.frameTextures=[],s.json=e,s.shapeScaleX=o,s.effectContainer=r,s.rotation=i,s.ctx=a,s.outputSprite.anchor.x=.5,s.outputSprite.anchor.y=.5;var u=s.effectContainer.getBounds();return s.outputSprite.filters=[new Up.BlurFilter(s.json.blurRad/2,4),new rg(s.json,u.height)],s.outputSprite.alpha=.5,s.outputSprite.rotation=-1===s.shapeScaleX?Math.PI+2*s.rotation:Math.PI-2*s.rotation,s.outputSprite.scale.x=-1,s}return T(n,[{key:"updateFrame",value:function(e){var t=this.frameTextures[e];t&&(this.outputSprite.texture=t)}},{key:"createOutput",value:function(e,t){this.frameTextures[t]=e}},{key:"setFrameOffset",value:function(e,t){var n=this.effectContainer.getBounds(),r=new jl.g(n.x+n.width/2,n.y+n.height/2),i=new jl.g(r.x,r.y+n.height+this.json.dist),o=this.effectContainer.toLocal(i);this.outputSprite.position.x=o.x+e,this.outputSprite.position.y=o.y+t}}]),n}(qm),og=n(118),ag=n.n(og),sg=function(e){p(n,e);var t=m(n);function n(e){var r;return _(this,n),(r=t.call(this,Ym.a,ag.a,{})).priority=1,r.json=e,r}return T(n,[{key:"filterAreaJustify",value:function(e){return e}},{key:"sdfBox",value:function(){return null}}]),n}(Um),ug=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},lg=function(e){p(n,e);var t=m(n);function n(e,r,i,o,s,u){var l;_(this,n),(l=t.call(this)).effects=[],l.attachs=[],l.frames=new Map,l._targetContainer=new Rl.b,l.frameCount=1,l.ctx=o,l.originWidth=e.width,l.originHeight=e.height,l.cacheKey=i,l.sourceSprite=new Ld;var c,h=S(r);try{for(h.s();!(c=h.n()).done;){var d=c.value;switch(d.type){case"innerShadow":l.effects.push(new sg(d));break;case"softEdge":l.effects.push(new Zm(d));break;case"glow":l.effects.push(new Vm(d));break;case"reflection":l.attachs.push(new ig(d,e,s,u.x,l.ctx));break;case"outerShadow":l.attachs.push(new eg(d,e,u))}}}catch(e){h.e(e)}finally{h.f()}l.effects=l.effects.sort((function(e,t){return e.priority-t.priority})),l.attachs=l.attachs.sort((function(e,t){return e.order-t.order}));var f,p=S(l.attachs);try{for(p.s();!(f=p.n()).done;){var v=f.value;l._targetContainer.addChild(v.outputSprite)}}catch(e){p.e(e)}finally{p.f()}l.sourceSprite.name="effect-sprite";var m=new jl.j(0,0,l.originWidth,l.originHeight),g=l.effects.map((function(e){return e.filterAreaJustify(m)})),y=g.map((function(e){return e.x})),b=g.map((function(e){return e.y})),x=g.map((function(e){return e.width})),w=g.map((function(e){return e.height}));return l.filterArea=new jl.j(Math.min.apply(Math,a(y).concat([0])),Math.min.apply(Math,a(b).concat([0])),Math.max.apply(Math,a(x).concat([l.originWidth])),Math.max.apply(Math,a(w).concat([l.originHeight]))),l.sourceSprite.filters=l.effects,l.sourceSprite.filterArea=new jl.j(0,0,l.filterArea.width,l.filterArea.height),l._targetSprite=new Ld,l._targetSprite.name="effect-sprite",l._targetContainer.sortableChildren=!0,l._targetSprite.zIndex=999,l._targetContainer.addChild(l._targetSprite),l}return T(n,[{key:"getSdfTexture",value:function(e,t){return ug(this,void 0,void 0,regeneratorRuntime.mark((function n(){var r,i;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r="".concat(this.cacheKey,"_").concat(e),i=this.effects.map((function(e){return{sdfRect:e.sdfBox(t.width,t.height)}})).reduce((function(e,t){return t.sdfRect?(e.width5&&(t.dist=5),x[e]})),o.ctx.slideScopeEventHub.once("slide-render",(function(e){if(o.ctx.slideIndex===e&&o.effectObject){var t=o.getEffectTexture();if(t){var n=t.texture,r=t.offsetX,i=t.offsetY;o.effectObject.setFrameOffset(r,i),o.effectObject.createFrame(1,n)}}}))}return o}return T(n,[{key:"getEffectTexture",value:function(){var e,t=this.json,n=t.lineHeight,r=t.fillLineHeight,i=t.isHorz,o=t.lineWidth,a=this.effectContainer.getLocalBounds(),s=0,u=0,l=S(this.effectContainer.children);try{for(l.s();!(e=l.n()).done;){var c=e.value;c.pivot.x>s&&(s=c.pivot.x),c.pivot.y>u&&(u=c.pivot.y)}}catch(e){l.e(e)}finally{l.f()}var h=new jl.d;h.translate(s,u);var d=Xl.p.create({width:i?a.width:o,height:i?Math.max(r,n):a.height,resolution:2});return this.ctx.renderer.render(this.effectContainer,{renderTexture:d,transform:h}),{texture:d,offsetX:s,offsetY:u}}},{key:"createStrokeFill",value:function(){var e=this.json,t=e.stroke,n=e.lineWidth,r=e.lineHeight;return new Bm(this.ctx,null==t?void 0:t.fill,n,r,{useFilter:!1,useSlideBackgroundFill:!1})}},{key:"createStrokeGraphics",value:function(){var e=this.json.stroke,t=(null==e?void 0:e.key)?{fillType:"blipFill",src:e.key,filters:[]}:void 0;return new Bm(this.ctx,t,(null==e?void 0:e.width)||0,(null==e?void 0:e.height)||0,{useFilter:!1,useSlideBackgroundFill:!1})}},{key:"createTextFill",value:function(){var e=this.json,t=e.isHorz,n=e.fill,r=e.lineWidth,i=e.lineHeight,o=e.fillLineHeight;return t?new Bm(this.ctx,null==n?void 0:n.fill,r,Math.max(o,i),{useFilter:!1,useSlideBackgroundFill:!1}):new Bm(this.ctx,null==n?void 0:n.fill,o,i,{useFilter:!1,useSlideBackgroundFill:!1})}},{key:"createTextGraphics",value:function(){var e,t=this.json,n=t.fill,r=t.content,i="#000000";"solidFill"===(null===(e=null==n?void 0:n.fill)||void 0===e?void 0:e.fillType)&&(i=n.fill.color);var o=(null==n?void 0:n.key)?{fillType:"blipFill",src:n.key,filters:[{type:"changeBulletColor",args:["#000000",i]}]}:void 0;return new Bm(this.ctx,o,(null==n?void 0:n.width)||0,(null==n?void 0:n.height)||0,{useFilter:"◾"===r,useSlideBackgroundFill:!1})}},{key:"getIterateEntry",value:function(){return null}},{key:"getBgElement",value:function(){return null}},{key:"updateTransform",value:function(e){var t,r,i,o,a=this.json.isHorz;e.position={x:a&&null!==(r=null===(t=e.position)||void 0===t?void 0:t.x)&&void 0!==r?r:0,y:a?0:null!==(o=null===(i=e.position)||void 0===i?void 0:i.y)&&void 0!==o?o:0},e.width=a?this.json.width:this.json.lineWidth,e.height=a?this.json.lineHeight:this.json.height,f(x(n.prototype),"updateTransform",this).call(this,e)}},{key:"preRender",value:function(){var e;null===(e=this.underline)||void 0===e||e.preRender()}},{key:"render",value:function(e){var t=this;e.addSubMTask((function(){return cg(t,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.doRender();case 1:case"end":return e.stop()}}),e,this)})))}),"@TextUnitImpl[doRender]"),e.addSubMTask((function(){return cg(t,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,r=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.effectList&&this.effectList.length>0&&(n="".concat(this.ctx.taskId,"_").concat(this.ctx.slideIndex,"_").concat(null===(t=this.json.fill)||void 0===t?void 0:t.key,"_").concat(this.json.effectIndexList),this.effectObject=new lg(this.effectContainer,this.effectList,n,this.ctx,0,new jl.g(1,1)),this.effectObject.on("ready",(function(){var e;r.effectContainer.visible=!1,r.effectObject.container.zIndex=10,r.container.addChild(r.effectObject.container),null===(e=r.effectObject)||void 0===e||e.updateFrame(1)})));case 1:case"end":return e.stop()}}),e,this)})))}),"@ShapeImpl[post.render]")}},{key:"doRender",value:function(){var e=!1,t=this.json,n=t.lineWidth,r=t.lineHeight,i=t.baseLine,o=t.isHorz,a=t.underline,s=t.height,u=t.width,l=t.highlightColor,h=t.x,d=t.y,f=t.content,p=t.fillLineHeight,v=t.fill,m=!1!==this.json.needFill;if(v&&v.fill&&"solidFill"!==v.fill.fillType&&(m=!0),l){var g=new Dd,y=c(Yv(l),2),b=y[0],x=y[1];g.beginFill(b,x),g.drawRect(0,0,o?u:n,o?r:s),g.endFill(),this.textureContainer.addChild(g)}if(this.textGraphics.displayObject){var _=this.textGraphics.displayObject;if(o&&(_.position.y=d>0?d:0),m){var w=this.textFill.displayObject;if(w)w.mask=_,w.addChild(_),w.position.x=-h,_.position.x+=h,e=!0,this.textureContainer.addChild(w);else if(this.textFill.isSolidFill()){var T=new qv;T.color=this.textFill.getSolidFillColor(),_.filters=[T],e=!0,this.textureContainer.addChild(_)}}else this.textureContainer.addChild(_)}if(this.strokeGraphics.displayObject){var M=this.strokeGraphics.displayObject;if(m){var S=this.strokeFill.displayObject;if(S)S.mask=M,S.addChild(M),o?S.position.y=d>0?d:0:S.position.x=h,this.textureContainer.addChild(S);else if(this.strokeFill.isSolidFill()){o?M.position.y=d>0?d:0:M.position.x=h;var E=new qv;E.color=this.strokeFill.getSolidFillColor(),M.filters=[E],e=!0,this.textureContainer.addChild(M)}}else o?M.position.y=d>0?d:0:M.position.x=h,this.textureContainer.addChild(M)}if(this.underline&&(this.underline.render(),this.underline.sprite)){o?(this.underline.sprite.position.y=a?a-r/16:i,this.underline.sprite.position.x=0):(this.underline.sprite.position.x=0,this.underline.sprite.position.y=0);var A=this.textFill.getClonedDisplayObject();A?(A.mask=this.underline.sprite,A.addChild(this.underline.sprite),this.textureContainer.addChild(A)):this.textureContainer.addChild(this.underline.sprite)}if(e){var I=Xl.p.create({width:o?u:n,height:o?Math.max(p,r):s,resolution:this.ctx.renderer.resolution});this.ctx.renderer.render(this.textureContainer,{renderTexture:I}),this.cacheSprite.texture=I,o&&d<0&&(this.cacheSprite.position.y=d),this.effectContainer.addChild(this.cacheSprite)}else this.effectContainer.addChild(this.textureContainer);this.container.name=f}},{key:"destroy",value:function(){this.textFill.destroy(),this.textGraphics.destroy(),this.strokeFill.destroy(),this.strokeGraphics.destroy(),this.cacheSprite.texture.destroy(!0),this.cacheSprite.destroy(),this.textureContainer.destroy(),this.container.destroy()}}]),n}(nm),dg=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},fg=function(e){p(n,e);var t=m(n);function n(e,r,i){var o;return _(this,n),(o=t.call(this,e,r,i)).units=[],o.isHorz=!0,o.hyperLinkMap=new Map,o.hyperLinkContainerMap=new Map,o.effectList=[],i.effectList&&(o.effectList=i.effectList),o}return T(n,[{key:"getIterateElements",value:function(){return this.units}},{key:"getIterateEntry",value:function(e,t,n){return this.units[t]?this.units[t]:(this.ctx.eventHub.emit("IterateTimeNodeEnd",n),null)}},{key:"preRender",value:function(){}},{key:"createUnits",value:function(e,t,n,r){for(var i=this,o=function(o,a){r.addSubMTask((function(){return dg(i,void 0,void 0,regeneratorRuntime.mark((function r(){var i,a,s,u,l,c,h,d,f,p;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:i=this.json.textUnits[o],a=this.json,s=a.height,u=a.width,l=a.fillHeight,c=a.baseline,h=a.y,d=a.underline,(f=new hg(Object.assign(Object.assign({},i),{lineHeight:s,lineWidth:u,baseLine:c-h,underline:d,fillLineHeight:l||s,isHorz:this.isHorz,shapeId:e,paragraphIndex:t,lineIndex:n,unitIndex:o}),this.ctx,{parentGlobalPos:this.global,effectList:this.effectList})).preRender(),this.units.push(f),(i.hyperlink||i.hlinkHover)&&(p=new jv(f.container,this.ctx),i.hyperlink&&p.addAction(i.hyperlink,"click"),i.hlinkHover&&p.addAction(i.hlinkHover,"hover"),this.container.sortableChildren=!0);case 2:case"end":return r.stop()}}),r,this)})))}),"@TextLineImpl[createUnits]")},a=0,s=this.json.textUnits.length;a0)return this.iterateElements;var e=this.lines.reduce((function(e,t){return e.concat(t.getIterateElements())}),[]);return this.iterateElements=e,e}},{key:"getIterateEntry",value:function(e,t,n){var r=this.getIterateElements();return r[t]?r[t]:(this.ctx.eventHub.emit("IterateTimeNodeEnd",n),null)}},{key:"preRender",value:function(){}},{key:"createLines",value:function(e,t,n){for(var r=this,i=function(i,o){n.addSubMTask((function(){return pg(r,void 0,void 0,regeneratorRuntime.mark((function r(){var o,a;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:o=this.json.lines[i],(a=new fg(o,this.ctx,{parentGlobalPos:this.global,effectList:this.effectList})).isHorz=this.isHorz,a.container.name="line-"+i,a.createUnits(e,t,i,n),this.lines.push(a);case 2:case"end":return r.stop()}}),r,this)})))}),"@TextParagraphImpl[createLines]")},o=0,a=this.json.lines.length;o90&&o<270||o<-90&&o>-270)&&(r=-r),i=-a*r}return{x:r,y:i}}((i=-i)/Math.PI*180,n,r),s=e.x-a.x,u=e.y-a.y;return{centerX:s/9525*t.x,centerY:u/9525*t.y,rx:n/9525*t.x,ry:r/9525*t.y,st:-i,end:-i+o,aClockWise:o<0}}function gg(e){for(var t=new os,n=e.scale,r={x:0,y:0},i=e.path.trim().split(" "),o=0;o=0&&(d=xg(s.paths[0].path,this.json.width,this.json.height,i,o),s.paths.unshift(Object.assign(Object.assign({},s.paths[0]),{path:d}))),f=function(e,t,n,r){if(!bg[n])return null;var i=bg[n].top(gg(t)),o=bg[n].bottom(gg(e));if(i.length!==o.length)return null;for(var a=Math.min(i.length,o.length),s=1/(a-1),u=[],l=[],c=new Array(2*a).fill("").map((function(e,t){return t})),h=0;h0&&(this.textColorFilter.color=e)},get:function(){return this.textColorFilter.color}},{key:"on",get:function(){var e;return(null!==(e=this.container.filters)&&void 0!==e?e:[]).length>0?"true":"false"},set:function(e){var t;"true"===e?(null!==(t=this.container.filters)&&void 0!==t?t:[]).indexOf(this.textColorFilter)<0&&(this.container.filters=[this.textColorFilter]):this.container.filters=[]}}]),e}(),Tg=function(){function e(t){_(this,e),this.scaleX=1,this.scaleY=1,this.pivot={x:0,y:0},this.paths=[],this.hash="",this.width=0,this.height=0,this.graphicsId="",this.textureId="",this.id=t.id,this.type=t.type,this.heightSize=t.heightSize,this.widthSize=t.widthSize,this.fillStyle=t.fillStyle||{fillType:"solidFill",color:"#ffffffff"},this.lineWidth=t.lineWidth||1,this.position=t.position||{x:0,y:0},this.rotate=t.rotation||1,this.path=this.getUnitPath(),this.setScaleFromLineWidth(),this.setScaleFromSize(),this.generatePaths(),this.setPivot()}return T(e,[{key:"setPivot",value:function(){switch(this.type){case"oval":case"diamond":this.pivot={x:this.width/2,y:this.height/2};break;case"triangle":this.pivot={x:.7*this.width,y:this.height/2};break;default:this.pivot={x:this.width,y:this.height/2}}}},{key:"generatePaths",value:function(){this.hash="arrow-"+_v()(this.path+this.scaleX+this.scaleY),this.paths=[{id:this.id,path:this.path,fill:"norm",hasStroke:!1,hash:this.hash,scale:{x:this.scaleX,y:this.scaleY}}]}},{key:"getUnitPath",value:function(){switch(this.type){case"stealth":return"M 0,0 L 95250,47625 L 0,95250 L 28575,47625 C C";case"oval":return"M 0,47625 A 47625,47625,-3.14159265,6.2831853 C C";case"diamond":return"M 47625,0 L 95250,47625 L 47625,95250 L 0,47625 C C";case"arrow":return"M 9525,0 L 95250,47625 L 9525,95250 L 0,85725 L 68389.5,47625 L 0,9525 C C";case"triangle":return"M 0,0 L 95250,47625 L 0,95250 C C";default:return""}}},{key:"setScaleFromLineWidth",value:function(){switch(this.type){case"stealth":case"oval":case"diamond":case"arrow":case"triangle":this.scaleX*=.29*this.lineWidth+.7,this.scaleY*=.29*this.lineWidth+.7;break;default:throw new Error("can't match any arrow type!")}}},{key:"setScaleFromSize",value:function(){switch(this.type){case"stealth":case"oval":case"diamond":case"arrow":case"triangle":this.scaleX*=1,this.scaleY*=1;break;default:throw new Error("can't match any arrow type!")}switch(this.widthSize){case"sm":this.scaleX*=3/4;break;case"lg":this.scaleX*=1.25;break;case"med":this.scaleX*=1}switch(this.heightSize){case"sm":this.scaleY*=3/4;break;case"lg":this.scaleY*=1.25;break;case"med":this.scaleY*=1}this.width=10*this.scaleX,this.height=10*this.scaleY}}]),e}(),Mg=function(){function e(t,n,r,i,o,a,s,u,l,c,h){_(this,e),this.id=t,this.ctx=n,this.paths=r,this.hash=i,this.nept=o,this.width=a,this.height=s,this.lineStyle=u,this.shouldFill=l,this.bgColor=c,this.lnColor=h,this.clonedObjects=[],this._displayObject=null,this.isRectangle=!1,this.isPureRect=!1,this.isColoredPureRect=!1,this.isRectangle=this.rectangleDetect(r),this.isRectangle&&l?this.bgColor?this.isColoredPureRect=!0:this.isPureRect=!0:this.ctx.graphicsTexture.addGraphics(this.id,this.paths,this.hash,this.nept,this.width,this.height,this.lineStyle,this.ctx.objectPoolGroup,this.shouldFill,this.bgColor,this.lnColor)}return T(e,[{key:"pointDis",value:function(e,t){return Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)}},{key:"isPoint",value:function(e){return Number.isNaN(Number(e.x))||Number.isNaN(Number(e.y))}},{key:"isSquare",value:function(e,t){var n=this;if("MLLLC"!==e.join("")&&"MLLLCC"!==e.join(""))return!1;var r=t.filter((function(e){return!n.isPoint(e)}));if(4!==r.length)return!1;var i,o=Math.min.apply(Math,a(r.map((function(e){return e.x})))),s=Math.min.apply(Math,a(r.map((function(e){return e.y})))),u=Math.max.apply(Math,a(r.map((function(e){return e.x})))),l=Math.max.apply(Math,a(r.map((function(e){return e.y})))),c=S(r);try{for(c.s();!(i=c.n()).done;){var h=i.value;if(h.x!==o&&h.x!==u||h.y!==s&&h.y!==l)return!1}}catch(e){c.e(e)}finally{c.f()}return!0}},{key:"rectangleDetect",value:function(e){if(1!==e.length)return!1;var t=e[0].path.trim().split(" ");if(10!==t.length)return!1;for(var n=[],r=[],i=0;in&&(n=o.pivot.x),o.pivot.y>r&&(r=o.pivot.y)}}catch(e){i.e(e)}finally{i.f()}var a=new jl.d;if(a.translate(n,r),0===this.effectContainer.children.length)return null;var s=Xl.p.create({width:t.width,height:t.height,resolution:this.ctx.renderer.resolution});return this.ctx.renderer.render(this.effectContainer,{renderTexture:s,transform:a}),{texture:s,offsetX:n,offsetY:r}}},{key:"createStrokeGraphics",value:function(){var e,t,n,r,i=this.json,o=i.id,a=i.geometry,s=i.lineStyle,u=(null==a?void 0:a.lineTransform)||Eg,l=u.width,c=u.height,h=u.pivot,d=l||this.json.width,f=c||this.json.height,p="solidFill"===(null===(e=null==s?void 0:s.fill)||void 0===e?void 0:e.fillType)?s.fill.color:null;return s&&"noFill"!==(null===(t=s.fill)||void 0===t?void 0:t.fillType)?new Mg(o+"-path-graphics",this.ctx,null!==(n=null==a?void 0:a.paths)&&void 0!==n?n:[],null!==(r=null==a?void 0:a.hash)&&void 0!==r?r:"",h||{x:0,y:0},d,f,s,!1,null,p):null}},{key:"createStrokeFill",value:function(){var e=c(this.calculateFillObjectOffset(),2),t=e[0],n=e[1],r=this.json,i=r.geometry,o=r.lineStyle,a=r.width,s=r.height,u=(null==i?void 0:i.lineTransform)||Eg,l=Tv()(null==o?void 0:o.width)?o.width:1;return new Bm(this.ctx,null==o?void 0:o.fill,(u.width||a)+l+t,Math.max((u.height||s)+l,n),{useFilter:!0,useSlideBackgroundFill:!1})}},{key:"createBackgroundGraphics",value:function(){var e,t=this.json,n=t.geometry,r=t.lineStyle,i=t.fillStyle,o=t.id,a=(null==n?void 0:n.lineTransform)||Eg,s=a.width,u=a.height,l=a.pivot,c=s||this.json.width,h=u||this.json.height,d="solidFill"===(null==i?void 0:i.fillType)?i.color:null;return i&&"noFill"!==i.fillType||this.json.isPicture?new Mg(o+"-bg-graphics",this.ctx,null!==(e=null==n?void 0:n.paths)&&void 0!==e?e:[],(null==n?void 0:n.hash)||"",l||{x:0,y:0},c,h,r,!0,d,null):null}},{key:"createBackgroundFill",value:function(){var e,t,n,r,i=this.json,o=i.fillStyle,a=i.width,s=i.height,u=i.lineStyle,l=i.geometry,c=(null==l?void 0:l.fillTransform)||Eg,h={useFilter:!0,useSlideBackgroundFill:this.json.useBgFill,fillFloat:this.json.fillFloat,shapeRotation:this.json.rotation},d=this.useGroupFill&&(null===(e=this.option.groupSize)||void 0===e?void 0:e.w)?this.option.groupSize.w:c.width||a,f=this.useGroupFill&&(null===(t=this.option.groupSize)||void 0===t?void 0:t.h)?this.option.groupSize.h:c.height||s;return new Bm(this.ctx,o,d+(null!==(n=null==u?void 0:u.width)&&void 0!==n?n:0),f+(null!==(r=null==u?void 0:u.width)&&void 0!==r?r:0),h)}},{key:"createBackground",value:function(){var e,t,n,r,i,o,a,s,u,l,c,h,d=(null===(e=this.json.geometry)||void 0===e?void 0:e.fillTransform)||Eg,f=d.pivot,p=d.width,v=d.height,m=this.backgroundFill.displayObject;m?(this.json.useBgFill&&(null===(n=this.backgroundGraphics)||void 0===n?void 0:n.displayObject)?(this.needCacheAsBitMap=!0,m.mask=this.backgroundGraphics.displayObject,m.pivot.x=(null===(r=this.json.position)||void 0===r?void 0:r.x)||0,m.pivot.y=(null===(i=this.json.position)||void 0===i?void 0:i.y)||0,this.effectContainer.addChild(this.backgroundGraphics.displayObject)):"gifFill"===(null===(o=this.json.fillStyle)||void 0===o?void 0:o.fillType)?(m.height=v||this.designHeight,m.width=p||this.designWidth,m instanceof jp&&m.play(),(null===(a=this.backgroundGraphics)||void 0===a?void 0:a.isNeedMask(m.width,m.height))&&(m.mask=this.backgroundGraphics.displayObject,this.backgroundGraphics.displayObject&&this.effectContainer.addChild(this.backgroundGraphics.displayObject))):(null===(s=this.backgroundGraphics)||void 0===s?void 0:s.isNeedMask(m.width,m.height))&&(this.json.fillFloat||(this.needCacheAsBitMap=!0,m.mask=this.backgroundGraphics.displayObject,this.backgroundGraphics.displayObject&&this.effectContainer.addChild(this.backgroundGraphics.displayObject))),this.json.fillFloat||(m.x=f.x,m.y=f.y),this.useGroupFill&&(m.x-=null!==(l=null===(u=this.json.position)||void 0===u?void 0:u.x)&&void 0!==l?l:0,m.y-=null!==(h=null===(c=this.json.position)||void 0===c?void 0:c.y)&&void 0!==h?h:0),this.effectContainer.addChild(m)):this.backgroundFill.hasFill&&(null===(t=this.backgroundGraphics)||void 0===t?void 0:t.displayObject)&&this.effectContainer.addChild(this.backgroundGraphics.displayObject)}},{key:"createPathFill",value:function(){var e,t,n,r=this.strokeFill.displayObject,i=null===(e=this.strokeGraphics)||void 0===e?void 0:e.displayObject,o=c(this.calculateFillObjectOffset(),2),a=o[0],s=o[1];r?((null===(t=this.strokeGraphics)||void 0===t?void 0:t.isNeedMask(r.width,r.height))&&i&&(this.needCacheAsBitMap=!0,r.pivot.x=i.pivot.x,r.pivot.y=i.pivot.y,i.pivot.x=0,i.pivot.y=0,r.mask=i,r.addChild(i),r.position.x=-a/2,r.position.y=-s/2,i.position.x=a/2,i.position.y=s/2),this.effectContainer.addChild(r)):this.strokeFill.hasFill&&(null===(n=this.strokeGraphics)||void 0===n?void 0:n.displayObject)&&this.effectContainer.addChild(this.strokeGraphics.displayObject)}},{key:"createFilledPathMask",value:function(){var e,t,n,r,i=(null===(t=null===(e=this.json.geometry)||void 0===e?void 0:e.paths)||void 0===t?void 0:t.filter((function(e){return"none"!==e.fill&&"norm"!==e.fill})))||[],o=S(i);try{for(o.s();!(r=o.n()).done;){var a=r.value,s=this.ctx.graphicsTexture.getGraphicsData(a.id);if(s){var u=new Ld(s.texture);u.pivot.x=s.pivot.x,u.pivot.y=s.pivot.y,u.scale.x=s.scale,u.scale.y=s.scale;var l=this.backgroundFill.getClonedDisplayObject(),c=null===(n=this.backgroundGraphics)||void 0===n?void 0:n.getClonedDisplayObject(),h=l||c;h&&(this.backgroundFill.displayObject&&(h.pivot.x=this.backgroundFill.displayObject.pivot.x,h.pivot.y=this.backgroundFill.displayObject.pivot.y),h.mask=u,h.filters=[tm[a.fill]],this.needCacheAsBitMap=!0,this.effectContainer.addChild(h),this.effectContainer.addChild(u))}}}catch(e){o.e(e)}finally{o.f()}}},{key:"createArrow",value:function(){var e=this;this.arrowList.length&&this.arrowList.forEach((function(t){var n,r=e.ctx.graphicsTexture.getGraphicsData(t.graphicsId);if(r){var i=r.texture,o=new Ld(i);o.pivot.x=t.pivot.x,o.pivot.y=t.pivot.y,o.position.x=t.position.x,o.position.y=t.position.y,o.rotation=t.rotate/180*Math.PI,o.scale.x=r.scale,o.scale.y=r.scale,null===(n=e.backgroundGraphics)||void 0===n||n.addArrows(o)}}))}},{key:"generateArrowList",value:function(){var e,t,n=this,r=this.json,i=r.lineArrowList,o=r.lineStyle,a=r.id,s="solidFill"===(null===(e=null==o?void 0:o.fill)||void 0===e?void 0:e.fillType)?o.fill.color:null;null===(t=i||[])||void 0===t||t.forEach((function(e,t){var r,i,u=new Tg(Object.assign(Object.assign({},e),{fillStyle:null==o?void 0:o.fill,lineWidth:null!==(r=null==o?void 0:o.width)&&void 0!==r?r:0}));u.graphicsId="".concat(a,"-arrow-").concat(t,"-graphics"),u.textureId="".concat(a,"-arrow-").concat(t,"-fill"),n.ctx.graphicsTexture.addGraphics(u.graphicsId,null!==(i=u.paths)&&void 0!==i?i:[],u.hash,{x:0,y:0},u.width,u.height,void 0,n.ctx.objectPoolGroup,!0,s,null),n.arrowList.push(u)}))}},{key:"calculateFillObjectOffset",value:function(){var e=0,t=0;return this.arrowList.length&&(e=this.arrowList.reduce((function(e,t){return Math.max(e,t.width)}),0),t=this.arrowList.reduce((function(e,t){return Math.max(e,t.height)}),0)),[e,t]}},{key:"preRender",value:function(e){var t,n,r,i=this,o=this.json,a=o.lineStyle,s=o.geometry,u=(null==s?void 0:s.lineTransform)||Eg,l=u.width,c=u.height,h=l||this.json.width,d=c||this.json.height,f=(null===(t=null==s?void 0:s.paths)||void 0===t?void 0:t.filter((function(e){return"none"!==e.fill&&"norm"!==e.fill})))||[],p="solidFill"===(null===(n=null==a?void 0:a.fill)||void 0===n?void 0:n.fillType)?a.fill.color:null;e.addSubMTask((function(){return Sg(i,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=S(f);try{for(t.s();!(n=t.n()).done;)r=n.value,this.ctx.graphicsTexture.addGraphics(r.id,[r],r.hash,((null==s?void 0:s.lineTransform)||Eg).pivot,h,d,a,this.ctx.objectPoolGroup,!0,null,p)}catch(e){t.e(e)}finally{t.f()}case 2:case"end":return e.stop()}}),e,this)})))}),"@ShapeImpl[addGraphics]"),null===(r=this.text)||void 0===r||r.createParagraphs(this.json.id,e)}},{key:"subClassRender",value:function(){return Sg(this,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))}},{key:"render",value:function(e){var t=this;e.addSubMTask((function(){return Sg(t,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return null===(t=this.strokeGraphics)||void 0===t||t.render(),null===(n=this.backgroundGraphics)||void 0===n||n.render(),this.createBackground(),e.next=5,this.subClassRender();case 5:this.createFilledPathMask(),this.createPathFill(),this.createArrow();case 8:case"end":return e.stop()}}),e,this)})))}),"@ShapeImpl[render]"),this.text&&this.text.render(e),e.addSubMTask((function(){return Sg(t,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,r,i,o,a,s,u,l,c,h,d,f,p,v,m,g,y,b,x,_,w,T,M,S,E,A,I,C=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:"wd"===(null===(t=this.json.textBody)||void 0===t?void 0:t.iterateType)||"lt"===(null===(n=this.json.textBody)||void 0===n?void 0:n.iterateType)?(this.renderContainer.addChild(this.container),this.text&&(p=null!==(r=this.json.scale)&&void 0!==r?r:{x:1,y:1},v=p.x,m=p.y,this.text.container.scale.x=m<0?-Math.abs(v):Math.abs(v),this.text.container.scale.y=m,this.text.container.position.x=(null!==(o=null===(i=this.json.position)||void 0===i?void 0:i.x)&&void 0!==o?o:0)+this.text.x,this.text.container.position.y=(null!==(s=null===(a=this.json.position)||void 0===a?void 0:a.y)&&void 0!==s?s:0)+this.text.y,this.text.container.scale.y<0&&(this.text.container.position.y+=this.text.height),this.text.container.scale.x<0&&(this.text.container.position.x+=this.json.width),this.json.textRotation&&(this.text.container.rotation=this.json.textRotation),this.renderContainer.addChild(this.text.container))):(this.text&&(this.json.textRotation&&(this.text.container.rotation=this.json.textRotation,g=this.text,y=g.width,b=g.height,x=this.text.container.position,_=x.x,w=x.y,this.text.container.pivot.x=y/2,this.text.container.pivot.y=b/2,this.text.container.x=_+y/2,this.text.container.y=w+b/2),Hv()(this.json.textRotateWithShape)&&!this.json.textRotateWithShape&&(T=this.json.rotation||0,this.text.container.rotation=-T,M=this.text.width,this.text.container.position.x=M),this.text.container.zIndex=100,S=null===(u=this.json.effectList)||void 0===u?void 0:u.find((function(e){return"outerShadow"===e.type})),E=null===(l=this.json.effectList)||void 0===l?void 0:l.find((function(e){return"softEdge"===e.type})),A=null===(c=this.json.effectList)||void 0===c?void 0:c.find((function(e){return"glow"===e.type})),S&&1!==S.sx||E||A?this.container.addChild(this.text.container):this.effectContainer.addChild(this.text.container)),this.renderContainer.addChild(this.container)),this.needCacheAsBitMap,"background"===this.json.id&&this.ctx.hasBackgroundFillShape&&(I=Xl.p.create({width:this.json.width,height:this.json.height,resolution:Math.ceil(this.ctx.renderer.resolution)}),this.ctx.renderer.render(this.renderContainer,{renderTexture:I}),this.ctx.bgTexture=I),this.json.effectList&&this.json.effectList.length>0&&(null===(h=this.ctx.featureList)||void 0===h?void 0:h.effect)&&!this.ctx.forceCanvas&&!this.json.media&&(this.effectObject=new lg(this.effectContainer,this.json.effectList,"".concat(this.ctx.taskId,"_").concat(this.ctx.slideIndex,"_").concat(this.json.id),this.ctx,this.json.rotation||0,new jl.g((null===(d=this.json.scale)||void 0===d?void 0:d.x)||1,(null===(f=this.json.scale)||void 0===f?void 0:f.y)||1)),function(e){var t,n,r;return"gifFill"===(null===(t=e.fillStyle)||void 0===t?void 0:t.fillType)||"gifFill"===(null===(r=null===(n=e.lineStyle)||void 0===n?void 0:n.fill)||void 0===r?void 0:r.fillType)||!!e.picFill&&"gifFill"===e.picFill.fillType}(this.json)&&this.effectObject.setFrameCount(-1),this.effectObject.on("ready",(function(){var e;C.effectContainer.visible=!1,C.effectObject.container.zIndex=10,C.container.addChild(C.effectObject.container),null===(e=C.effectObject)||void 0===e||e.updateFrame(1)})));case 3:case"end":return e.stop()}}),e,this)})))}),"@ShapeImpl[post.render]")}},{key:"clearOnSlideChange",value:function(){}},{key:"initOnReuse",value:function(){}},{key:"destroy",value:function(){var e,t,n,r;null===(e=this.text)||void 0===e||e.destroy(),this.fillColorFilter.destroy(),this.strokeColorFilter.destroy(),this.backgroundFill.destroy(),null===(t=this.backgroundGraphics)||void 0===t||t.destroy(),this.strokeFill.destroy(),null===(n=this.strokeGraphics)||void 0===n||n.destroy(),this.renderContainer.destroy(),null===(r=this.arrowRenderTexture)||void 0===r||r.destroy(!0),this.arrowList=[],this.effectDisposer()}},{key:"interactiveContainer",get:function(){return this.renderContainer}},{key:"strokeActive",get:function(){var e,t,n,r,i,o,a;return this.strokeFill.displayObject?(null!==(n=null===(t=null===(e=this.strokeFill.displayObject)||void 0===e?void 0:e.filters)||void 0===t?void 0:t.length)&&void 0!==n?n:-1)>0:(null!==(a=null===(o=null===(i=null===(r=this.strokeGraphics)||void 0===r?void 0:r.displayObject)||void 0===i?void 0:i.filters)||void 0===o?void 0:o.length)&&void 0!==a?a:-1)>0},set:function(e){var t,n,r,i,o,a,s=this.strokeFill.displayObject;e?s&&(null!==(n=null===(t=s.filters)||void 0===t?void 0:t.indexOf(this.strokeColorFilter))&&void 0!==n?n:-1)<0?s.filters=[this.strokeColorFilter]:(null===(r=this.strokeGraphics)||void 0===r?void 0:r.displayObject)&&(null!==(o=null===(i=this.strokeGraphics.displayObject.filters)||void 0===i?void 0:i.indexOf(this.strokeColorFilter))&&void 0!==o?o:-1)<0&&(this.strokeGraphics.displayObject.filters=[this.strokeColorFilter]):s?s.filters=[]:(null===(a=this.strokeGraphics)||void 0===a?void 0:a.displayObject)&&(this.strokeGraphics.displayObject.filters=[])}},{key:"pptColorActive",get:function(){var e,t;return(null!==(t=null===(e=this.renderContainer.filters)||void 0===e?void 0:e.length)&&void 0!==t?t:-1)>0},set:function(e){this.renderContainer.filters=e?[this.pptColorFilter]:[]}},{key:"fillActive",get:function(){var e,t,n,r,i,o,a;return this.backgroundFill.displayObject?(null!==(n=null===(t=null===(e=this.backgroundFill.displayObject)||void 0===e?void 0:e.filters)||void 0===t?void 0:t.length)&&void 0!==n?n:-1)>0:(null!==(a=null===(o=null===(i=null===(r=this.backgroundGraphics)||void 0===r?void 0:r.displayObject)||void 0===i?void 0:i.filters)||void 0===o?void 0:o.length)&&void 0!==a?a:-1)>0},set:function(e){var t,n,r,i,o,a;e?this.backgroundFill.displayObject&&(null!==(n=null===(t=this.backgroundFill.displayObject.filters)||void 0===t?void 0:t.indexOf(this.fillColorFilter))&&void 0!==n?n:-1)<0?this.backgroundFill.displayObject.filters=[this.fillColorFilter]:(null===(r=this.backgroundGraphics)||void 0===r?void 0:r.displayObject)&&(null!==(o=null===(i=this.backgroundGraphics.displayObject.filters)||void 0===i?void 0:i.indexOf(this.fillColorFilter))&&void 0!==o?o:-1)<0&&(this.backgroundGraphics.displayObject.filters=[this.fillColorFilter]):this.backgroundFill.displayObject?this.backgroundFill.displayObject.filters=[]:(null===(a=this.backgroundGraphics)||void 0===a?void 0:a.displayObject)&&(this.backgroundGraphics.displayObject.filters=[])}}]),n}(Fv),Ig=n(119),Cg=new(n.n(Ig).a),Ng=Cg.getDevice(),kg=Cg.getBrowser(),Dg=Cg.getOS(),Pg={isDesktop:function(){var e=!0;return"mobile"===Ng.type&&(e=!1),/Samsung/.test(kg.name||"")&&(e=!1),window.__nativeTags&&window.__nativeTags.platform&&(e=!1),e},isIOS:function(){var e=!1;return window.__nativeTags&&window.__nativeTags.platform&&/^ios/i.test(window.__nativeTags.platform)&&(e=!0),Dg.name&&/iOS/.test(Dg.name)&&(e=!0),e},isAndroid:function(){var e=!1;return window.__nativeTags&&window.__nativeTags.platform&&/^android/i.test(window.__nativeTags.platform)&&(e=!0),Dg.name&&/android/i.test(Dg.name)&&(e=!0),e},isLowGpuMemory:function(){var e,t,n=null!==(t=null===(e=window.__nativeTags)||void 0===e?void 0:e.platform)&&void 0!==t?t:"";if(n){var r=n.split(" ");if(r[1]){if(/^iPad/.test(r[1])){var i=r[1].match(/^iPad(\d+)/);return!(i&&i[1]&&parseInt(i[1],10)>=6)}if(/^iPhone/.test(r[1])){var o=r[1].match(/^iPhone(\d+)/);return!(o&&o[1]&&parseInt(o[1],10)>=9)}return!1}return!1}return!0}},Og=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))};function Rg(e,t){for(var n in t)e.style[n]=t[n]}var Lg="median-container",jg=1500,Bg=300,Ug=50,zg="0",Fg="1",Gg=.4,Hg=function(){function e(t){var n,r,i=this;_(this,e),this.progress=document.createElement("div"),this.totalTime=document.createElement("span"),this.playButton=document.createElement("div"),this.pauseButton=document.createElement("div"),this.currentTime=document.createElement("span"),this.mediaController=document.createElement("div"),this.currentProgress=document.createElement("div"),this.fullScreenButton=document.createElement("div"),this.exitFullScreenButton=document.createElement("div"),this.medianIsEnd=!1,this.pickBookmarkIndex=0,this.playCallBackList=[],this.duration=0,this.isVideo=!1,this.start=0,this.end=0,this.fullscreenStatus=!1,this.fadeState={in:!1,out:!1},this.changeMediaProgress=function(e){if(i.ctx.isPlayerPaused())i.ctx.logger.info("Media controller prevent seek event with paused state",i.ctx.taskId);else{e.stopPropagation();var t=e.offsetX/i.progress.clientWidth*i.duration;i.medianIsEnd=!1,"interactive"!==i.ctx.mode&&i.jumpToTime(t),"local"!==i.ctx.mode&&i.ctx.eventHub.emit(bb.mediaSeek,{id:i.targetId,time:t,isPlaying:i.media.isPlaying}),i.delayHide()}},this.jumpToTime=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return Og(i,void 0,void 0,regeneratorRuntime.mark((function t(){var n,r=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,dv((function(){return!!r.duration}),3e3);case 2:n=Math.floor(e)+this.start,this.media.currentTime!==n&&(this.media.currentTime=n,this.changeBookmarkIndex(n,n>this.media.currentTime));case 4:case"end":return t.stop()}}),t,this)})))},this.showController=function(e){e.stopPropagation(),i.show()},this.getMediaDuration=function(){i.duration&&!Number.isNaN(i.duration)||(i.duration=i.media.duration,i.start&&(i.duration-=i.start,i.jumpToTime()),i.end&&(i.duration-=i.end)),i.totalTime.innerText=e.formatTime(i.duration)},this.playMedia=function(){return Og(i,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.playButton.style.display="none",this.pauseButton.style.display="block",e.next=4,this.media.play();case 4:this.medianIsEnd&&(this.medianIsEnd=!1,this.jumpToTime()),this.playCallBackList.forEach((function(e){e()})),this.delayHide();case 7:case"end":return e.stop()}}),e,this)})))},this.pauseMedia=function(){return Og(i,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.playButton.style.display="block",this.pauseButton.style.display="none",e.next=4,this.media.pause();case 4:case"end":return e.stop()}}),e,this)})))},this.onMouseOut=function(e){e.stopPropagation(),i.hide()},this.mediaTimeUpdate=function(){return Og(i,void 0,void 0,regeneratorRuntime.mark((function t(){var n,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this.media.currentTime-this.start,console.log("duration",this.duration,"current",n),t.t0=this.duration>0&&(Math.abs(n-this.duration)<.3||n>this.duration),!t.t0){t.next=10;break}return t.next=6,this.pauseMedia();case 6:this.medianIsEnd=!0,this.jumpToTime(),this.ctx.eventHub.emit(bb.mediaStop,{id:this.targetId}),this.onClickCancelFullScreenButtonHandle();case 10:if(this.currentTime.innerText=e.formatTime(n),this.currentProgress.style.flex=(n/this.duration).toString(),!(this.bookmarkList&&this.bookmarkList.length>0)){t.next=15;break}(r=this.bookmarkList[this.pickBookmarkIndex])&&r.time.toFixed(0)===this.media.currentTime.toFixed(0)&&(this.ctx.timingEventHub.emit("shape ".concat(this.shapeId," onMediaBookmark ").concat(r.name)),this.pickBookmarkIndex+=1);case 15:this.fadeHit(n);case 16:case"end":return t.stop()}}),t,this)})))},this.onPauseMedia=function(){i.playButton.style.display="block",i.pauseButton.style.display="none"},this.onPlayMedia=function(){i.fadeState={in:!1,out:!1},i.fadeHit(0),i.playButton.style.display="none",i.pauseButton.style.display="block",i.playCallBackList.forEach((function(e){e()})),i.media.currentTime0&&void 0!==arguments[0]?arguments[0]:20,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,n=document.createElementNS("http://www.w3.org/2000/svg","svg");n.setAttributeNS(null,"viewBox","0 0 512 512"),n.setAttributeNS(null,"height",e.toString()),n.setAttributeNS(null,"width",t.toString());var r=document.createElementNS("http://www.w3.org/2000/svg","polyline");return r.setAttributeNS(null,"points","35 0, 477 256, 35 512"),r.setAttributeNS(null,"fill","#000000"),n.appendChild(r),n}},{key:"generatePauseButton",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,n=document.createElementNS("http://www.w3.org/2000/svg","svg");Rg(n,{height:e+"px"}),n.setAttributeNS(null,"viewBox","0 0 512 512"),n.setAttributeNS(null,"height",e.toString()),n.setAttributeNS(null,"width",t.toString());var r=document.createElementNS("http://www.w3.org/2000/svg","rect");r.setAttributeNS(null,"x","35"),r.setAttributeNS(null,"y","0"),r.setAttributeNS(null,"width","148"),r.setAttributeNS(null,"height","512");var i=r.cloneNode(!0);return i.setAttributeNS(null,"x","330"),n.append(r,i),n}},{key:"generateFullScreenButton",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,n=document.createElementNS("http://www.w3.org/2000/svg","svg");Rg(n,{height:e+"px",width:t+"px"}),n.setAttributeNS(null,"width",t.toString()),n.setAttributeNS(null,"height",e.toString()),n.setAttributeNS(null,"viewBox","0 0 1024 1024");var r=document.createElementNS("http://www.w3.org/2000/svg","path");return r.setAttributeNS(null,"d","M918.116352 107.409408c10.186752 10.175488 10.186752 26.691584 0 36.87936L653.734912 407.038976c-10.187776 10.187776-26.703872 10.187776-36.891648 0-10.175488-10.187776-10.175488-26.703872 0.013312-36.891648l264.38144-262.73792c10.174464-10.187776 26.69056-10.200064 36.87936-0.013312L918.117376 107.409408zM878.281728 148.096l-161.155072-0.44544c-11.283456 0.279552-20.85888-8.226816-21.90336-19.458048l0-13.421568c0.318464-10.671104 8.889344-19.241984 19.560448-19.560448l187.030528 0.827392c0.1792-0.037888 0.357376-0.0768 0.523264-0.089088l9.549824-0.229376c5.005312-0.152576 9.843712 1.770496 13.372416 5.336064 3.32288 3.629056 4.9664 8.49408 4.545536 13.40928l-1.032192 9.537536c0 0.191488 0.70144 0.318464 0.70144 0.49664l-0.534528 188.279808c-0.54784 9.984-9.092096 17.637376-19.076096 17.089536-0.165888-0.012288-0.319488-0.0256-0.484352-0.037888L896.009216 329.8304c-10.379264-0.0512-18.733056-8.506368-18.681856-18.885632 0.013312-0.191488 0.013312-0.381952 0.013312-0.585728L878.281728 148.096zM105.884672 916.661248c-10.187776-10.175488-10.200064-26.691584-0.013312-36.87936 0 0 0-0.013312 0.013312-0.013312l265.19552-262.73792c10.35264-10.008576 26.86976-9.729024 36.866048 0.636928 9.766912 10.110976 9.766912 26.131456 0 36.242432L143.579136 916.661248C133.072896 926.848 116.3776 926.848 105.884672 916.661248L105.884672 916.661248zM146.533376 875.973632l161.154048 0.433152c11.283456-0.292864 20.85888 8.213504 21.891072 19.458048l0 13.38368c-0.292864 10.672128-8.876032 19.255296-19.560448 19.561472l-187.858944-0.828416c-0.165888 0.037888-0.344064 0.075776-0.509952 0.089088l-9.550848 0.229376c-5.004288 0.152576-9.831424-1.782784-13.35808-5.336064-3.323904-3.629056-4.979712-8.493056-4.54656-13.395968l1.031168-9.537536c0-0.191488-0.712704-0.330752-0.700416-0.509952l0.534528-188.278784c0.534528-9.984 9.066496-17.625088 19.050496-17.089536 0.165888 0.013312 0.330752 0.0256 0.508928 0.037888l14.212096 0c10.365952 0.0512 18.719744 8.507392 18.656256 18.873344 0 0.191488 0 0.395264-0.013312 0.598016L146.533376 875.973632zM918.116352 916.661248c10.186752-10.175488 10.200064-26.691584 0.012288-36.87936 0 0 0-0.013312-0.012288-0.013312l-264.38144-262.73792c-10.365952-10.008576-26.86976-9.729024-36.87936 0.636928-9.766912 10.110976-9.766912 26.131456 0 36.242432L881.22368 916.661248c10.186752 10.186752 26.703872 10.186752 36.891648 0.013312L918.115328 916.661248 918.116352 916.661248zM878.281728 875.973632l-161.168384 0.433152c-11.270144-0.292864-20.845568 8.213504-21.890048 19.458048l0 13.38368c0.306176 10.672128 8.889344 19.241984 19.560448 19.561472l187.030528-0.828416c0.1792 0.037888 0.357376 0.075776 0.523264 0.089088l9.549824 0.229376c5.005312 0.152576 9.843712-1.782784 13.372416-5.336064 3.32288-3.629056 4.978688-8.493056 4.545536-13.395968l-1.032192-9.537536c0-0.191488 0.70144-0.330752 0.70144-0.509952l-0.534528-188.278784c-0.54784-9.984-9.092096-17.637376-19.076096-17.089536-0.165888 0.013312-0.319488 0.0256-0.484352 0.037888L896.009216 694.19008c-10.379264 0.0512-18.733056 8.507392-18.681856 18.885632 0 0.191488 0.013312 0.381952 0.013312 0.584704L878.281728 875.973632zM105.884672 107.409408c-10.187776 10.175488-10.187776 26.691584 0 36.87936l265.19552 262.750208c10.187776 10.187776 26.691584 10.187776 36.87936 0s10.175488-26.703872-0.012288-36.891648l-264.368128-262.73792C133.072896 97.222656 116.3776 97.222656 105.884672 107.409408L105.884672 107.409408zM146.533376 148.096l161.154048-0.44544c11.283456 0.292864 20.85888-8.213504 21.891072-19.458048l0-13.421568c-0.306176-10.671104-8.889344-19.241984-19.560448-19.560448l-187.858944 0.827392c-0.165888-0.0512-0.344064-0.0768-0.509952-0.089088l-9.550848-0.229376c-5.004288-0.152576-9.831424 1.782784-13.35808 5.336064-3.323904 3.629056-4.979712 8.49408-4.54656 13.40928l1.031168 9.537536c0 0.191488-0.712704 0.318464-0.700416 0.49664l0.534528 188.279808c0.534528 9.970688 9.066496 17.624064 19.050496 17.089536 0.165888-0.012288 0.330752-0.0256 0.508928-0.037888l14.212096 0c10.365952-0.0512 18.719744-8.506368 18.656256-18.87232 0-0.191488 0-0.395264-0.013312-0.598016L146.533376 148.096z"),n.appendChild(r),document.body.appendChild(n),n}},{key:"generateExitFullScreenButton",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,n=document.createElementNS("http://www.w3.org/2000/svg","svg");Rg(n,{height:e+"px",width:t+"px"}),n.setAttributeNS(null,"width",t.toString()),n.setAttributeNS(null,"height",e.toString()),n.setAttributeNS(null,"viewBox","0 0 1024 1024");var r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=document.createElementNS("http://www.w3.org/2000/svg","path");return r.setAttributeNS(null,"d","M716.8 998.4a25.6 25.6 0 0 1-25.6-25.6v-256a25.6 25.6 0 0 1 25.6-25.6h256a25.6 25.6 0 1 1 0 51.2h-230.4v230.4a25.6 25.6 0 0 1-25.6 25.6zM307.2 998.4a25.6 25.6 0 0 1-25.6-25.6v-230.4H51.2a25.6 25.6 0 1 1 0-51.2h256a25.6 25.6 0 0 1 25.6 25.6v256a25.6 25.6 0 0 1-25.6 25.6zM972.8 332.8h-256a25.6 25.6 0 0 1-25.6-25.6v-256a25.6 25.6 0 1 1 51.2 0v230.4h230.4a25.6 25.6 0 1 1 0 51.2zM307.2 332.8h-256a25.6 25.6 0 1 1 0-51.2h230.4V51.2a25.6 25.6 0 1 1 51.2 0v256a25.6 25.6 0 0 1-25.6 25.6z"),i.setAttributeNS(null,"d","M307.2 332.8a25.6 25.6 0 0 1-18.112-7.488L56.896 93.12a25.6 25.6 0 0 1 36.224-36.224l232.192 232.192A25.6 25.6 0 0 1 307.2 332.8zM716.8 332.8a25.6 25.6 0 0 1-18.112-43.712L930.88 56.896a25.6 25.6 0 0 1 36.224 36.224l-232.192 232.192a25.472 25.472 0 0 1-18.112 7.488zM948.992 974.592a25.6 25.6 0 0 1-18.112-7.488l-232.192-232.192a25.6 25.6 0 0 1 36.224-36.224l232.192 232.192a25.6 25.6 0 0 1-18.112 43.712zM75.008 974.592a25.6 25.6 0 0 1-18.112-43.712l232.192-232.192a25.6 25.6 0 0 1 36.224 36.224l-232.192 232.192a25.472 25.472 0 0 1-18.112 7.488z"),n.appendChild(r),n.appendChild(i),document.body.appendChild(n),n}},{key:"createButton",value:function(){var e={marginLeft:"15px",marginRight:"10px",fontSize:"0",height:"20px",display:"flex",justifyContent:"center",alignItems:"center"};Rg(this.playButton,Object.assign(Object.assign({},e),{display:"block"}));var t=this.generatePlayButton();Rg(t,{height:"20px"}),this.playButton.appendChild(t),Rg(this.pauseButton,Object.assign(Object.assign({},e),{display:"none"}));var n=this.generatePauseButton();if(Rg(n,{height:"20px"}),this.pauseButton.appendChild(n),this.isVideo){var r=this.generateFullScreenButton(20,20);this.fullScreenButton.appendChild(r),Rg(this.fullScreenButton,Object.assign(Object.assign({},e),{display:"block"}));var i=this.generateExitFullScreenButton(20,20);this.exitFullScreenButton.appendChild(i),Rg(this.exitFullScreenButton,Object.assign(Object.assign({},e),{display:"none"}))}}},{key:"createTimer",value:function(){var e=document.createElement("div");Rg(e,{width:"100px"}),this.currentTime.innerText="00:00";var t=document.createElement("span");return t.innerText="/",e.append(this.currentTime,t,this.totalTime),e}},{key:"createProgress",value:function(){var e={flex:"1",position:"relative"};this.isVideo||(e.marginRight="10px"),Rg(this.progress,e);var t=document.createElement("div");Rg(t,{background:"#D9D9D9",position:"relative",height:"10px",display:"flex"}),this.progress.appendChild(t),Rg(this.currentProgress,{background:"#4F4F4F",top:"0px",left:"0",height:"10px",flex:"0"}),t.appendChild(this.currentProgress)}},{key:"fadeHit",value:function(e){if(this.info.fade){var t=this.info.fade,n=t.start,r=t.end;n&&!this.fadeState.in&&e>=0&&(this.fadeState.in=!0,this.media.fadeIn(0,n)),r&&!this.fadeState.out&&e>=this.duration-r/1e3&&(this.fadeState.out=!0,this.media.fadeOut(0,r))}}},{key:"changeBookmarkIndex",value:function(e,t){if(this.bookmarkList&&0!==this.bookmarkList.length){if(this.pickBookmarkIndex>0)for(var n=0;ne){this.pickBookmarkIndex=n;break}if(t){for(var r=this.pickBookmarkIndex-1,i=0;il?l/n:1);s.y=s.y+this.height-r,s.x=Math.max(s.x,0),s.x=Math.min(s.x,o-n*c),s.y=Math.max(s.y,0),s.y=Math.min(s.y,a-r),Rg(this.mediaController,{height:r+"px",borderRadius:r/2+"px",width:n+"px",flexDirection:"row",alignItems:"center",position:"absolute",left:s.x+"px",top:s.y+"px",background:"#fff",zIndex:"2",border:"1px solid #ccc",transform:"scale(".concat(c,")"),transformOrigin:"0 100%"}),this.fullscreenStatus&&Rg(this.mediaController,{left:"0",top:a-r+"px"})}},{key:"createMediaController",value:function(){this.setControllerPosition(),Rg(this.mediaController,{display:"none",transition:"opacity ".concat(Gg,"s")}),this.createButton();var e=this.createTimer();this.createProgress(),this.mediaController.append(this.playButton,this.pauseButton,e,this.progress),this.isVideo&&this.mediaController.append(this.fullScreenButton,this.exitFullScreenButton),this.container.appendChild(this.mediaController),this.bindEvent()}},{key:"addPlayCallBack",value:function(e){this.playCallBackList.push(e)}},{key:"fullscreenPlay",value:function(){this.fullscreenStatus=!0,"interactive"!==this.ctx.mode&&this.media.requestFullscreen(),"local"!==this.ctx.mode&&this.ctx.eventHub.emit(bb.fullscreenChange,{targetId:this.targetId,state:!0}),this.delayHide()}},{key:"changeFullScreenState",value:function(e,t,n){n===this.ctx.slideIndex&&(e&&this.targetId===t?this.fullscreenStatus=e:this.fullscreenStatus=!1,this.fullscreenStatus?(this.fullScreenButton.style.display="none",this.exitFullScreenButton.style.display="block"):(this.fullScreenButton.style.display="block",this.exitFullScreenButton.style.display="none"),this.setControllerPosition())}},{key:"bindEvent",value:function(){Pg.isDesktop()&&(this.mediaController.addEventListener("mouseout",this.onMouseOut,!1),this.mediaController.addEventListener("mouseover",this.showController,!1)),this.progress.addEventListener("click",this.changeMediaProgress,!1),this.playButton.addEventListener("click",this._playMediaFromCtrl,!1),this.pauseButton.addEventListener("click",this._pauseMediaFromCtrl,!1),this.media.on("durationchange",this.getMediaDuration,!1),this.media.on("timeupdate",this.mediaTimeUpdate,!1),this.media.on("pause",this.onPauseMedia,!1),this.media.on("play",this.onPlayMedia,!1),this.containerObserver=new MutationObserver(this.onContainerSizeChange),this.container&&this.containerObserver.observe(this.container,{attributes:!0,attributeFilter:["data-scale","style"]}),this.isVideo&&(this.ctx.globalEventHub.on("onFullscreenChange",this.onFullScreenChange),this.ctx.globalEventHub.on("controllerShowStatusChange",this.onControllerShowStatusChange),this.fullScreenButton.addEventListener("click",this.onClickFullScreenButtonHandle,!1),this.exitFullScreenButton.addEventListener("click",this.onClickCancelFullScreenButtonHandle,!1))}},{key:"unbindEvent",value:function(){var e;Pg.isDesktop()&&(this.mediaController.removeEventListener("mouseout",this.onMouseOut,!1),this.mediaController.removeEventListener("mouseover",this.showController,!1)),this.progress.removeEventListener("click",this.changeMediaProgress,!1),this.playButton.removeEventListener("click",this._playMediaFromCtrl,!1),this.pauseButton.removeEventListener("click",this._pauseMediaFromCtrl,!1),this.media.removeAllListeners(),null===(e=this.containerObserver)||void 0===e||e.disconnect(),this.isVideo&&(this.ctx.globalEventHub.removeListener("onFullscreenChange",this.onFullScreenChange),this.ctx.globalEventHub.removeListener("controllerShowStatusChange",this.onControllerShowStatusChange),this.fullScreenButton.removeEventListener("click",this.onClickFullScreenButtonHandle,!1),this.exitFullScreenButton.removeEventListener("click",this.onClickCancelFullScreenButtonHandle,!1))}},{key:"show",value:function(){this.setControllerPosition(),this.mediaController.style.opacity=Fg,this.fullscreenStatus||(this.mediaController.style.display="flex"),this.delayHide()}},{key:"hide",value:function(){this.fullscreenStatus?this.mediaController.style.opacity=zg:this.mediaController.style.display="none"}},{key:"delayHide",value:function(){var e=this;clearTimeout(this.autoHiddenTimer),this.autoHiddenTimer=setTimeout((function(){e.hide()}),jg)}},{key:"destroy",value:function(){var e;this.unbindEvent(),this.playCallBackList=[],null===(e=this.container)||void 0===e||e.removeChild(this.mediaController)}},{key:"clippedDuration",get:function(){return this.duration}}],[{key:"formatTime",value:function(e){var t="00:00";if(e){var n=Math.floor(e/60),r=String(n<0?0:n).padStart(2,"0"),i=Math.floor(e%60);t="".concat(r,":").concat(String(i<0?0:i).padStart(2,"0"))}return t}}]),e}(),Vg=n(120),Wg=function(e){p(n,e);var t=m(n);function n(e,r,i){var o,a,s,u;return _(this,n),(a=t.call(this)).isGlobalPause=!1,a.lastTime=-1,a.howl=null,a.rctClient=null,a.isHowlEnd=!1,a.isHowlLoadEmit=!1,a.staticEventId=1001,a._catParams=void 0,a.url=e,a.runningAudio=r,i&&(a._catParams=i),xb.RtcAudioClazz?(a.rctClient=new xb.RtcAudioClazz(e,null===(s=a._catParams)||void 0===s?void 0:s.start,null===(u=a._catParams)||void 0===u?void 0:u.end),a.rctClient.on("load",(function(){return a.emit("load")})),a.rctClient.on("pause",(function(){return a.emit("pause")})),a.rctClient.on("play",(function(){a.startTimeChangeEmit(),a.emit("play")})),a.rctClient.on("resumeAllAudioInterruptByAudioSessionChanged",(function(){a.emit("resumeAllAudioInterruptByAudioSessionChanged")}))):(a.howl=new Vg.Howl({src:[e]}),o=c(a.howl._getSoundIds(),1),a.staticEventId=o[0],a.howl.load(),a.howl.on("load",(function(){a.isHowlLoadEmit=!0,a.emit("load")})),a.howl.on("pause",(function(){return a.emit("pause")})),a.howl.on("play",(function(){a.isHowlLoadEmit||a.emit("load"),a.isHowlEnd=!1,a.startTimeChangeEmit(),a.emit("play")})),a.howl.on("end",(function(){a.isHowlEnd=!0}))),a}return T(n,[{key:"startTimeChangeEmit",value:function(){var e=this;this.currentTime!==this.lastTime&&(this.lastTime=this.currentTime,this.emit("timeupdate",this.lastTime)),this.isPaused||setTimeout((function(){e.isPaused||e.startTimeChangeEmit()}),300)}},{key:"play",value:function(){var e,t,n;this.runningAudio.has(this.url)&&(null===(e=this.runningAudio.get(this.url))||void 0===e||e.stop(),this.runningAudio.delete(this.url)),this.isHowlEnd=!1,this.lastTime=-1,null===(t=this.howl)||void 0===t||t.play(this.staticEventId),null===(n=this.rctClient)||void 0===n||n.play(),this.runningAudio.set(this.url,this)}},{key:"fade",value:function(e,t,n){this.howl&&this.howl.fade(e,t,n)}},{key:"pause",value:function(){var e,t;null===(e=this.howl)||void 0===e||e.pause(this.staticEventId),null===(t=this.rctClient)||void 0===t||t.pause(),this.runningAudio.has(this.url)&&this.runningAudio.delete(this.url)}},{key:"globalPause",value:function(){this.isPaused||(this.isGlobalPause=!0,this.pause())}},{key:"globalResume",value:function(){this.isGlobalPause&&(this.isGlobalPause=!1,this.play())}},{key:"stop",value:function(){var e;null===(e=this.howl)||void 0===e||e.pause(this.staticEventId),this.rctClient&&(this.rctClient.pause(),this.rctClient.currentTime=0),this.runningAudio.has(this.url)&&this.runningAudio.delete(this.url)}},{key:"destroy",value:function(){var e,t,n,r,i,o,a,s;null===(e=this.howl)||void 0===e||e.stop(this.staticEventId),null===(t=this.howl)||void 0===t||t.unload(),null===(n=this.rctClient)||void 0===n||n.pause(),null===(r=this.rctClient)||void 0===r||r.destroy(),null===(i=this.rctClient)||void 0===i||i.removeAllListeners("load"),null===(o=this.rctClient)||void 0===o||o.removeAllListeners("play"),null===(a=this.rctClient)||void 0===a||a.removeAllListeners("pause"),null===(s=this.rctClient)||void 0===s||s.removeAllListeners("resumeAllAudioInterruptByAudioSessionChanged"),this.runningAudio.has(this.url)&&this.runningAudio.delete(this.url)}},{key:"volume",value:function(e){this.rctClient?this.rctClient.volume(e):this.howl&&this.howl.volume(e)}},{key:"currentTime",get:function(){return this.rctClient?this.rctClient.currentTime:this.howl?this.howl.seek(this.staticEventId):-1},set:function(e){this.rctClient?this.rctClient.currentTime=e:this.howl&&this.howl.seek(e,this.staticEventId)}},{key:"duration",get:function(){return this.rctClient?this.rctClient.duration:this.howl?this.howl.duration(this.staticEventId):0}},{key:"isPaused",get:function(){return this.rctClient?this.rctClient.isPaused:!!this.howl&&!this.howl.playing(this.staticEventId)}}]),n}(Ks.a),Yg=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Xg=function(e){p(n,e);var t=m(n);function n(e){var r,i,o,a,s,u,l,c;_(this,n),(r=t.call(this)).type="video",r.sprite=new Ld,r.isPlaying=!1,r.isGlobalPause=!1,r.fullscreen=!1,r.url="",r.isLoaded=!1,r.onVideoResourceLoaded=function(){r.isLoaded=!0},r.onVideoStalled=function(){r.ctx.logger.warn(r.url+", Failed to fetch data, but trying.",r.ctx.taskId)},r.updateVolume=function(e){r.rtcAudio.volume(e)},r.syncFullscreenVideoState=function(e){var t=e.targetId,n=e.state;e.slideIndex===r.ctx.slideIndex&&t===r.id&&(n?(r.requestFullscreen(),r.ctx.latestChangeFullscreenTargetId=t):r.requestCancelFullscreen())},r.id=e.id,r.start=null===(i=e.video.cut)||void 0===i?void 0:i.start,r.end=null===(o=e.video.cut)||void 0===o?void 0:o.end,r.fullscreen=null!==(a=e.video.fullscreen)&&void 0!==a&&a,r.container=e.container,r.ctx=e.ctx,r.ctx.medias[r.id]=y(r);var h=e.video.src;r.videoResource=new Xl.w(h,{autoLoad:!0,autoPlay:!1,updateFPS:30,crossorigin:!0}),null===(s=r.videoElement)||void 0===s||s.addEventListener("stalled",r.onVideoStalled),null===(u=r.videoElement)||void 0===u||u.addEventListener("loadedmetadata",r.onVideoResourceLoaded),r.url=e.video.src;var d=e.video.src.replace(/4$/,"3");r.ctx.loaderDelegate&&(d=r.ctx.loaderDelegate.redirectMedia(d),r.ctx.logger.info("redirect media url from ".concat(e.video.src.replace(/4$/,"3")," to ").concat(d," by delegate."),e.ctx.taskId)),r.rtcAudio=new Wg(d,e.ctx.runningAudio,{start:null===(l=e.video.cut)||void 0===l?void 0:l.start,end:null===(c=e.video.cut)||void 0===c?void 0:c.end}),r.rtcAudio.on("timeupdate",(function(e){if(r.videoElement){var t=r.videoElement.currentTime;Math.abs(t-e)>.5&&(r.videoElement.currentTime=e)}})),r.rtcAudio.on("resumeAllAudioInterruptByAudioSessionChanged",(function(){var e;null===(e=r.videoElement)||void 0===e||e.pause(),setTimeout((function(){var e;r.rtcAudio.isPaused||null===(e=r.videoElement)||void 0===e||e.play()}),200)}));var f=e.video,p=e.width,v=e.height,m=e.target;r.controller=new Hg({targetId:e.id,shapeId:e.shapeId,ctx:e.ctx,width:p,height:v,target:m,media:y(r),info:f,canvasElement:e.canvasElement}),r.controller.addPlayCallBack((function(){r.sprite.width=p,r.sprite.height=v,r.ctx.clock.setTimeout((function(){r.sprite.visible=!0}),50)}));var g=new Xl.c(null,{height:v,width:p});return g.resource=r.videoResource,r.videoResource.bind(g),r.sprite=new Ld,r.sprite.visible=!1,r.sprite.texture=new Xl.t(g),r.sprite.interactive=!0,r.container.addChild(r.sprite),r.sprite.on("mouseover",(function(e){e.stopPropagation(),r.controller.show()})),r.sprite.on("mouseout",(function(e){e.stopPropagation(),r.controller.hide()})),["durationchange","timeupdate","pause","play"].forEach((function(e){var t;null===(t=r.videoElement)||void 0===t||t.addEventListener(e,(function(){"timeupdate"===e&&r.isPlaying,r.emit(e)}))})),r.ctx.activeMedia.add(y(r)),r.ctx.volumeAdjuster.on("update",r.updateVolume),r.ctx.globalEventHub.on("syncFullscreenVideoState",r.syncFullscreenVideoState),r}return T(n,[{key:"showController",value:function(){this.controller.show()}},{key:"hideController",value:function(){this.controller.hide()}},{key:"play",value:function(){return Yg(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.isPlaying=!0,this.updateVolume(this.ctx.volumeAdjuster.volume),e.next=4,this.load();case 4:return e.next=6,this.ctx.clock.waitUntil((function(){var e=n.videoElement;return!!(e&&e.videoWidth>0)}),3e3);case 6:(t=this.videoElement)&&t.videoWidth<=0||(this.videoElement&&(this.videoElement.volume=0,this.videoElement.muted=!0),this.rtcAudio.on("play",(function(){var e;null===(e=n.videoElement)||void 0===e||e.play(),n.fullscreen&&n.controller.fullscreenPlay()})),this.rtcAudio.play());case 8:case"end":return e.stop()}}),e,this)})))}},{key:"load",value:function(){return this.videoResource.load()}},{key:"pause",value:function(){var e=this;this.isPlaying=!1,this.ctx.logger.warn(this.url+", pause video manual.",this.ctx.taskId),this.ctx.logger.warn(this.url+", pause rtc audio manual.",this.ctx.taskId),this.rtcAudio.once("pause",(function(){var t;null===(t=e.videoElement)||void 0===t||t.pause()})),this.rtcAudio.pause()}},{key:"globalPause",value:function(){this.isPlaying&&(this.isGlobalPause=!0,this.pause())}},{key:"globalResume",value:function(){this.isGlobalPause&&(this.isGlobalPause=!1,this.play())}},{key:"togglePause",value:function(){this.isPlaying?this.pause():this.play()}},{key:"seek",value:function(e){this.controller.jumpToTime(e)}},{key:"stop",value:function(){this.rtcAudio.stop(),this.seek(0),this.pause(),this.ctx.eventHub.emit(bb.mediaStop,{id:this.id})}},{key:"requestFullscreen",value:function(){return Yg(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,dv((function(){return n.isLoaded}),5e3);case 2:t=new Xl.t(this.sprite.texture.baseTexture),this.ctx.globalEventHub.emit("requestFullscreen",{texture:t,index:this.ctx.slideIndex,targetId:this.id});case 4:case"end":return e.stop()}}),e,this)})))}},{key:"requestCancelFullscreen",value:function(){this.ctx.globalEventHub.emit("requestCancelFullscreen",{targetId:this.id,index:this.ctx.slideIndex})}},{key:"destroy",value:function(){var e,t,n;this.ctx.volumeAdjuster.removeListener("update",this.updateVolume),this.ctx.globalEventHub.removeListener("syncFullscreenVideoState",this.syncFullscreenVideoState),null===(e=this.videoElement)||void 0===e||e.removeEventListener("stalled",this.onVideoStalled),null===(t=this.videoElement)||void 0===t||t.removeEventListener("loadedmetadata",this.onVideoResourceLoaded),this.sprite.interactive=!1,this.sprite.destroy({texture:!0,baseTexture:!0}),null===(n=this.videoResource)||void 0===n||n.destroy(),this.rtcAudio.destroy(),this.stop(),this.controller.destroy(),this.ctx.activeMedia.delete(this)}},{key:"fadeIn",value:function(e,t){this.rtcAudio.fade(e,this.ctx.volumeAdjuster.volume,t)}},{key:"fadeOut",value:function(e,t){this.rtcAudio.fade(this.ctx.volumeAdjuster.volume,e,t)}},{key:"videoElement",get:function(){return this.videoResource.source}},{key:"currentTime",get:function(){var e,t;return null!==(t=null===(e=this.videoElement)||void 0===e?void 0:e.currentTime)&&void 0!==t?t:0},set:function(e){this.rtcAudio.currentTime=e,this.videoElement&&(this.videoElement.currentTime=e)}},{key:"paused",get:function(){var e,t;return null===(t=null===(e=this.videoElement)||void 0===e?void 0:e.paused)||void 0===t||t}},{key:"duration",get:function(){var e,t;return null!==(t=null===(e=this.videoElement)||void 0===e?void 0:e.duration)&&void 0!==t?t:0}},{key:"clippedDuration",get:function(){return this.controller.clippedDuration}}]),n}(Ks.a),Qg=function(e){p(n,e);var t=m(n);function n(e){var r,i,o;_(this,n),(r=t.call(this)).type="audio",r.isPlaying=!1,r.isGlobalPause=!1,r.updateVolume=function(e){r.audioPlayer.volume(e)},r.id=e.id;var a=e.audio.src;r.audioPlayer=new Wg(a,e.ctx.runningAudio,{start:null===(i=e.audio.cut)||void 0===i?void 0:i.start,end:null===(o=e.audio.cut)||void 0===o?void 0:o.end}),e.audio.cut&&(r.start=e.audio.cut.start,r.end=e.audio.cut.end),r.ctx=e.ctx,r.ctx.medias[r.id]=y(r);var s=e.width,u=e.height,l=e.target;return r.controller=new Hg({targetId:e.id,shapeId:e.shapeId,ctx:e.ctx,height:u,width:s,target:l,media:y(r),info:e.audio,canvasElement:e.canvasElement}),r.audioPlayer.on("load",(function(){return r.emit("durationchange")})),r.audioPlayer.on("timeupdate",(function(){return r.emit("timeupdate")})),r.audioPlayer.on("pause",(function(){return r.emit("pause")})),r.audioPlayer.on("play",(function(){return r.emit("play")})),r.ctx.activeMedia.add(y(r)),r.ctx.volumeAdjuster.on("update",r.updateVolume),r}return T(n,[{key:"load",value:function(){return Promise.resolve()}},{key:"showController",value:function(){this.controller.show()}},{key:"hideController",value:function(){this.controller.hide()}},{key:"play",value:function(){return function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}(this,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.ctx.isPlayerPaused()?this.ctx.logger.info("Audio player prevent play event with paused state",this.ctx.taskId):(this.updateVolume(this.ctx.volumeAdjuster.volume),this.isPlaying=!0,this.audioPlayer.play());case 1:case"end":return e.stop()}}),e,this)})))}},{key:"pause",value:function(){this.ctx.isPlayerPaused()?this.ctx.logger.info("Audio player prevent pause event with paused state",this.ctx.taskId):(this.isPlaying=!1,this.audioPlayer.pause())}},{key:"globalPause",value:function(){this.isPlaying&&(this.isGlobalPause=!0,this.pause())}},{key:"globalResume",value:function(){this.isGlobalPause&&(this.isGlobalPause=!1,this.play())}},{key:"togglePause",value:function(){this.isPlaying?this.pause():this.play()}},{key:"seek",value:function(e){this.ctx.isPlayerPaused()?this.ctx.logger.info("Audio player prevent seek event with paused state",this.ctx.taskId):this.controller.jumpToTime(e)}},{key:"stop",value:function(){this.audioPlayer.stop(),this.seek(0),this.pause(),this.ctx.eventHub.emit(bb.mediaStop,{id:this.id})}},{key:"requestFullscreen",value:function(){}},{key:"requestCancelFullscreen",value:function(){}},{key:"destroy",value:function(){this.ctx.volumeAdjuster.removeListener("update",this.updateVolume),this.stop(),this.controller.destroy(),this.ctx.activeMedia.delete(this),this.audioPlayer.destroy()}},{key:"fadeIn",value:function(e,t){this.audioPlayer.fade(e,this.ctx.volumeAdjuster.volume,t)}},{key:"fadeOut",value:function(e,t){this.audioPlayer.fade(this.ctx.volumeAdjuster.volume,e,t)}},{key:"currentTime",get:function(){return this.audioPlayer.currentTime},set:function(e){this.audioPlayer.currentTime=e}},{key:"clippedDuration",get:function(){return this.controller.clippedDuration}},{key:"paused",get:function(){return this.audioPlayer.isPaused}},{key:"isPaused",get:function(){return this.audioPlayer.isPaused}},{key:"duration",get:function(){return this.audioPlayer.duration}}]),n}(Ks.a),Zg=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},qg=function(e){p(n,e);var t=m(n);function n(e,r,i){var o;return _(this,n),(o=t.call(this,Object.assign(Object.assign({},e),{type:"Shape",useBgFill:!1,textRotateWithShape:!0,isPicture:!0}),r,i)).isInteractiveOutside=!1,o.cmd=new Pv(y(o)),o.media=null==e?void 0:e.media,o.container.name=e.id+"_container_[Picture]",o.renderContainer.name=e.id+"_render_container_[Picture]",o.picFill=new Bm(o.ctx,e.picFill,e.width,e.height,{useFilter:!0,useSlideBackgroundFill:!1}),o}return T(n,[{key:"applyCommand",value:function(e,t){var n,r,i,o;if("call"===t)if(/playFrom\(([0-9.]+)\)/.test(e)){var a=e.match(/playFrom\(([0-9.]+)\)/),s=Number(a[1]||"0");null===(n=this.mediaPlayer)||void 0===n||n.controller.playMediaFromCtrl(!0),Math.abs(s)>.1&&(null===(r=this.mediaPlayer)||void 0===r||r.controller.jumpToTime(s))}else"custom-pause"===e?null===(i=this.mediaPlayer)||void 0===i||i.controller.pauseMediaFromCtrl(!0):"togglePause"===e?this.mediaPlayer&&(this.mediaPlayer.isPlaying?this.mediaPlayer.controller.pauseMediaFromCtrl(!0):this.mediaPlayer.controller.playMediaFromCtrl(!0)):"stop"===e&&(null===(o=this.mediaPlayer)||void 0===o||o.stop())}},{key:"renderPic",value:function(){var e,t,n,r,i,o;return Zg(this,void 0,void 0,regeneratorRuntime.mark((function a(){var s,u,l,c,h,d=this;return regeneratorRuntime.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(!(s=this.picFill.displayObject)){a.next=15;break}if(s.name=this.json.id+"_pic_fill_[Picture]",u=null===(e=this.backgroundGraphics)||void 0===e?void 0:e.getClonedDisplayObject(),(null===(t=this.backgroundGraphics)||void 0===t?void 0:t.isNeedMask(s.width,s.height))&&u&&(s.mask=u,this.effectContainer.addChild(u)),s.width=this.designWidth,s.height=this.designHeight,s instanceof jp&&this.ctx.slideScopeEventHub.once("slide-render",(function(e){var t;d.ctx.slideIndex===e&&(null===(t=d.effectObject)||void 0===t||t.setFrameCount(s.totalFrames),s.play(),s.onFrameChange=function(e){if(d.effectObject)if(d.effectObject.hasFrame(e))d.effectObject.updateFrame(e);else{var t=d.getEffectTexture();t&&(d.effectObject.createFrame(e,t.texture),d.effectObject.setFrameOffset(t.offsetX,t.offsetY))}})})),this.effectContainer.addChild(s),!this.media){a.next=13;break}if(l=this.media.src,"audio"===this.media.type&&/mp4$/.test(l)&&(l=l.replace(/mp4$/,"mp3")),!this.ctx.urlInterrupter){a.next=12;break}return c=Date.now(),a.next=10,this.ctx.urlInterrupter(l);case 10:l=a.sent,this.ctx.logger.info("redirect media url by interrupter. time: "+(Date.now()-c),this.ctx.taskId);case 12:this.ctx.loaderDelegate&&(l=this.ctx.loaderDelegate.redirectMedia(l),this.ctx.logger.info("redirect media url to ".concat(l," by delegate."),this.ctx.taskId)),this.media.src=l;case 13:"video"===(null===(n=this.media)||void 0===n?void 0:n.type)&&this.media.src?(this.mediaPlayer=new Xg({id:this.json.id+"-video",shapeId:this.json.id,ctx:this.ctx,video:this.media,height:this.designHeight,width:this.designWidth,target:s,container:this.effectContainer,canvasElement:this.ctx.view}),(null===(r=this.mediaPlayer)||void 0===r?void 0:r.sprite)&&u&&(h=null===(i=this.backgroundGraphics)||void 0===i?void 0:i.getClonedDisplayObject())&&(this.mediaPlayer.sprite.mask=h,this.container.addChild(h))):"audio"===(null===(o=this.media)||void 0===o?void 0:o.type)&&this.media.src&&(this.mediaPlayer=new Qg({id:this.json.id+"-audio",shapeId:this.json.id,ctx:this.ctx,audio:this.media,height:this.designHeight,width:this.designWidth,target:s,canvasElement:this.ctx.view,fade:this.media.fade})),this.mediaPlayer&&(this.isInteractiveOutside=!!this.container.interactive,this.container.interactive=!0,Pg.isDesktop()?(this.container.on("mouseover",(function(){d.mediaPlayer.showController()})),this.container.on("mouseout",(function(){d.mediaPlayer.hideController()}),!1)):this.container.on("pointerdown",(function(){d.mediaPlayer.showController()})));case 15:case"end":return a.stop()}}),a,this)})))}},{key:"preRender",value:function(e){f(x(n.prototype),"preRender",this).call(this,e)}},{key:"subClassRender",value:function(){return Zg(this,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.renderPic();case 2:case"end":return e.stop()}}),e,this)})))}},{key:"clearOnSlideChange",value:function(){f(x(n.prototype),"clearOnSlideChange",this).call(this),this.mediaPlayer&&(this.container.interactive=!1,this.mediaPlayer.stop(),this.mediaPlayer.hideController())}},{key:"initOnReuse",value:function(){f(x(n.prototype),"initOnReuse",this).call(this),this.mediaPlayer&&(this.container.interactive=!0)}},{key:"destroy",value:function(){this.mediaPlayer&&(this.picFill.displayObject&&!this.isInteractiveOutside&&(this.container.interactive=!1),this.mediaPlayer.destroy(),this.mediaPlayer=void 0),this.picFill.destroy()}}]),n}(Ag),Jg=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Kg=function(e){p(n,e);var t=m(n);function n(e,r,i,o){var a;return _(this,n),(a=t.call(this,e,r,i)).children=[],a.cacheSprite=new Ld,a.cacheContainer=new Rl.b,a.json=e,a.json.fillStyle&&"groupFill"===a.json.fillStyle.fillType&&i.groupFillStyle&&(a.json.fillStyle=i.groupFillStyle),a.container.name=e.id+"_container_[Container]",a.cacheContainer.name=e.id+"_cache_container_[Container]",a.ctx.timingTargets.addTarget(e.id,y(a)),a.updateTransform(a.json),a.fillObject=new Bm(a.ctx,e.fillStyle,e.width,e.height,{useFilter:!1,useSlideBackgroundFill:!1}),a.createChildren(o),a}return T(n,[{key:"createChildren",value:function(e){for(var t,r,i,o,a=this,s={x:null!==(r=null===(t=this.json.position)||void 0===t?void 0:t.x)&&void 0!==r?r:0,y:null!==(o=null===(i=this.json.position)||void 0===i?void 0:i.y)&&void 0!==o?o:0},u=function(t,r){e.addSubMTask((function(){return Jg(a,void 0,void 0,regeneratorRuntime.mark((function r(){var i,o,a,u,l;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:i=this.json.children[t],o=null,this.ctx.featureList&&this.ctx.featureList.smartArt&&("Shape"===(null==i?void 0:i.type)||"Picture"===(null==i?void 0:i.type))&&this.ctx.smartArtShapeList&&(a=i.id,(u=this.ctx.smartArtShapeList.find((function(e){return e.id===a})))&&(i=u)),l={parentGlobalPos:s,groupFillStyle:this.json.fillStyle,groupSize:{w:this.json.width,h:this.json.height}},"Shape"===(null==i?void 0:i.type)?o=new Ag(i,this.ctx,l):"Picture"===(null==i?void 0:i.type)?o=new qg(i,this.ctx,l):"Container"===(null==i?void 0:i.type)&&(o=new n(i,this.ctx,l,e)),o&&this.children.push(o);case 4:case"end":return r.stop()}}),r,this)})))}),"@ContainerImpl[child.init]")},l=0,c=this.json.children.length;l1&&void 0!==arguments[1]?arguments[1]:{};if(e)if(e.delay&&e.delay>0){var n=a.ctx.clock.setTimeout((function(){e.event&&(a.cond[e.event]=!0,a.detectTrigger(t))}),e.delay);a.timeoutIds.push(n)}else a.cond[e.event]=!0,a.detectTrigger(t);else a.detectTrigger(t)},a.id=e,a.ctx=o,a.eventHubs=i,r.forEach((function(e){a.addCond(e)})),a}return T(n,[{key:"setTriggerParams",value:function(e){this.triggerParams=e}},{key:"addCond",value:function(e){var t=this,n=function(){for(var n=arguments.length,r=new Array(n),i=0;i0&&(this.cond[e.event]=!1,this.eventHubs.runtime.addListener(e.event,n)):this.cond[e.event]=!1)}},{key:"isTrigger",value:function(){var e=this;return Object.keys(this.cond).every((function(t){return!!e.cond[t]}))}},{key:"isTriggerWithoutParent",value:function(){var e=this;return Object.keys(this.cond).filter((function(e){return"self"!==e})).every((function(t){return!!e.cond[t]}))}},{key:"detectTrigger",value:function(e){var t=this;if(Object.keys(this.cond).every((function(e){return!!t.cond[e]}))){Object.keys(this.cond).forEach((function(e){t.cond[e]=!1}));var n=this.triggerParams;this.triggerParams=void 0,this.emit("active",n,e)}}},{key:"reset",value:function(){var e=this;Object.keys(this.cond).forEach((function(t){e.cond[t]=!1})),this.timeoutIds.forEach((function(t){return e.ctx.clock.clearTimeout(t)}))}}]),n}(Ks.a),ey=function(e){p(n,e);var t=m(n);function n(e){var r;_(this,n),(r=t.call(this)).isTimeNodeEndSync=!1,r.interactiveListeners=[],r.runtimeNodeEventHub=new Ks.a,r._currentSeqIndex=0,r._currentSeqState="idle",r.isForward=!0,r.autoPlay=!1,r.handlePrev=function(){var e,t,n,i,o,a,s=arguments.length>0&&void 0!==arguments[0]&&arguments[0];r.hasPrev()||!r.isMainSeq?"idle"===r.currentSeqState?(r.decrSeqIndex(),null===(e=r.commonTimeNode.children[r.currentSeqIndex])||void 0===e||e.commonTimeNode.seekToStart(),null===(t=r.commonTimeNode.children[r.currentSeqIndex])||void 0===t||t.commonTimeNode.clearSubList(),r.currentSeqState="idle"):"running"===r.currentSeqState?(null===(n=r.commonTimeNode.children[r.currentSeqIndex])||void 0===n||n.commonTimeNode.seekToStart(),null===(i=r.commonTimeNode.children[r.currentSeqIndex])||void 0===i||i.commonTimeNode.clearSubList(),r.currentSeqState="idle"):"end"===r.currentSeqState&&(r.currentSeqIndex>=r.commonTimeNode.children.length&&(r.currentSeqIndex=r.commonTimeNode.children.length-1),null===(o=r.commonTimeNode.children[r.currentSeqIndex])||void 0===o||o.commonTimeNode.seekToStart(),null===(a=r.commonTimeNode.children[r.currentSeqIndex])||void 0===a||a.commonTimeNode.clearSubList(),r.currentSeqState="idle"):r.globalEventHub.emit("c:prev slide",s)},r.handleNext=function(e,t){var n,i,o,a;if(r.isTimeNodeEndSync&&(r.isTimeNodeEndSync=!1,r.currentSeqState="idle",r.currentSeqIndex=0),!r.hasNext()&&r.isMainSeq&&t)r.globalEventHub.emit("c:next slide",e);else{if(r.isInteractiveSeq){r.globalEventHub.emit("shape slide onNext"+(r.json.ctn.id||""));var s={result:null};r.findChildInfiniteRepeat(r.commonTimeNode,s),1===r.commonTimeNode.children.length&&s.result&&(s.result.json.subTnLst||[]).length>0&&0===r.currentSeqIndex&&"running"===r.currentSeqState&&r.commonTimeNode.allChildrenEndHandle()}"idle"===r.currentSeqState?null===(n=r.commonTimeNode.children[r.currentSeqIndex])||void 0===n||n.commonTimeNode.startTimeNodeForce():"running"===r.currentSeqState?(null===(i=r.commonTimeNode.children[r.currentSeqIndex])||void 0===i||i.commonTimeNode.seekToEnd(!1,!0),r.currentSeqState="end",r.incrSeqIndex(),null===(o=r.commonTimeNode.children[r.currentSeqIndex])||void 0===o||o.commonTimeNode.startTimeNodeForce()):"end"===r.currentSeqState&&(r.incrSeqIndex(),null===(a=r.commonTimeNode.children[r.currentSeqIndex])||void 0===a||a.commonTimeNode.startTimeNodeForce())}};var i=e.json,o=e.iterateType,a=e.isIterate,s=e.isSub,u=e.parent,l=e.ctx,h=e.eventHub,d=e.iterateIndex,f=e.iterateId,p=e.isInInteractiveSeq;return r.isMainSeq="mainSeq"===i.ctn.nodeType,r.isInteractiveSeq="interactiveSeq"===i.ctn.nodeType,r.id=i.ctn.id,r.isIterate=a,r.json=i,r.ctx=l,r.globalEventHub=h,r.commonTimeNode=new tb({json:i.ctn,isSub:s,eventHubs:{global:h,runtime:r.runtimeNodeEventHub},ctx:l,parent:u,isIterate:!1,iterateType:o,iterateIndex:d,iterateId:f,isInInteractiveSeq:p||r.isInteractiveSeq,fromSeqId:r.isInteractiveSeq?r.json.ctn.id:""}),r.bindShapeEvent(),r.nextConds=new $g("mainSeq",i.nextCondLst,{global:h,runtime:r.runtimeNodeEventHub},r.ctx),r.prevConds=new $g("mainSeq",i.preCondLst,{global:h,runtime:r.runtimeNodeEventHub},r.ctx),r.commonTimeNode.on("timeNodeRestart",(function(){r.currentSeqIndex=0,r.currentSeqState="idle"})),r.commonTimeNode.on("childTimeNodeStart",(function(e){var t=r.commonTimeNode.children.findIndex((function(t){return t.commonTimeNode.uuid===e.id}));t>=0&&(r.currentSeqIndex=t),r.currentSeqState="running",r.isMainSeq&&r.ctx.eventHub.emit(bb.mainSeqStepStart,t)})),r.commonTimeNode.on("childTimeNodeEnd",(function(e){var t=r.commonTimeNode.children.findIndex((function(t){return t.commonTimeNode.uuid===e.id}));t>=0&&(r.currentSeqIndex=t),r.currentSeqState="end",r.autoPlay&&r.ctx.clock.setTimeout((function(){r.handleNext(!1,!0)})),r.isMainSeq&&r.ctx.eventHub.emit(bb.mainSeqStepEnd,t)})),r.commonTimeNode.on("timeNodeEndSync",(function(){r.isTimeNodeEndSync=!0,r.commonTimeNode.resetForRepeat()})),r.commonTimeNode.on("timeNodeDestroy",(function(){r.interactiveListeners.forEach((function(e){var t=c(e,2),n=t[0],r=t[1];n&&r&&n.interactiveContainer.removeListener("pointerdown",r)})),r.interactiveListeners=[]})),r.nextConds.on("active",(function(e,t){Array.isArray(t)?r.handleNext(t[0],t[1]):r.handleNext(t,!0)})),r.prevConds.on("active",(function(e,t){Array.isArray(t)?r.handlePrev(t[0]):r.handlePrev(t)})),r}return T(n,[{key:"startAutoPlay",value:function(){this.autoPlay=!0,this.commonTimeNode.children[0].commonTimeNode.startTimeNodeForce()}},{key:"incrSeqIndex",value:function(){this.currentSeqIndex+1<=this.commonTimeNode.children.length&&(this.currentSeqIndex+=1)}},{key:"decrSeqIndex",value:function(){this.currentSeqIndex-1>=-1&&(this.currentSeqIndex-=1)}},{key:"hasPrev",value:function(){return!(this.currentSeqIndex<=0&&"idle"===this.currentSeqState)}},{key:"hasNext",value:function(){return!(this.currentSeqIndex>=this.commonTimeNode.children.length||this.currentSeqIndex===this.commonTimeNode.children.length-1&&"end"===this.currentSeqState)}},{key:"findChildInfiniteRepeat",value:function(e,t){var n=this;e.isInfiniteRepeat()?t.result=e:e.children.map((function(e){return e.commonTimeNode})).forEach((function(e){return n.findChildInfiniteRepeat(e,t)}))}},{key:"bindShapeEvent",value:function(){var e=this;"interactiveSeq"===this.json.ctn.nodeType&&this.json.nextCondLst.forEach((function(t){if(/^shape/.test(t.event)){var n=t.event.split(" ")[1];if(n){var r=e.ctx.timingTargets.getTargetById(n);if(r){r.interactiveContainer.interactive=!0,r.interactiveContainer.cursor="pointer";var i=function(){e.ctx.eventHub.emit(bb.userInput);var t="shape ".concat(n," onClick"),r=e.ctx.mode;"interactive"!==r&&"sync"!==r||e.ctx.eventHub.emit(bb.interactiveSeqAction,{action:t,seqId:e.json.ctn.id}),"sync"!==r&&"local"!==r||e.globalEventHub.emit(t)};r.interactiveContainer.on("pointerdown",i),e.interactiveListeners.push([r,i])}}}}))}},{key:"setCurrentStep",value:function(e,t){var n=this.commonTimeNode.children.length;if(!(e>n)){this.isInteractiveSeq&&0===this.commonTimeNode.applyCount&&(this.commonTimeNode.applyCount=1);var r=e;if(this.commonTimeNode.seekToStart(),-1===r&&(r=n-1),0!==r||"start"!==t){if(r>=0&&r=1){var n=r.json.cBhvr.attrList[0];r.json.cBhvr.attrList.length>1&&console.warn("this.json.cBhvr.attrList.length > 0");var i=r.json.cBhvr.to||r.json.to;i&&r.timingTarget&&ty(r.timingTarget,n,i)}})),r}return T(n,[{key:"modifyAttrKey",get:function(){return this.json.cBhvr.attrList[0]}}]),n}(ry),oy=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==("undefined"==typeof Reflect?"undefined":M(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},ay=function(){function e(t,n){_(this,e),this.math={pi:Math.PI,e:Math.E,abs:Math.abs,acos:Math.acos,asin:Math.asin,atan:Math.atan,ceil:Math.ceil,cos:Math.cos,cosh:Math.cosh,deg:function(e){return e/Math.PI*180},exp:Math.exp,floor:Math.floor,ln:Math.log,max:Math.max,min:Math.min,rad:function(e){return e/180*Math.PI},rand:Math.random,sin:Math.sin,sinh:Math.sinh,sqrt:Math.sqrt,tan:Math.tan,tanh:Math.tanh},this.timingTarget=n,this.val=t.val.value,this.time=t.time,t.fmla&&(this.fmla=this.parseFmla(t.fmla))}return T(e,[{key:"parseFmla",value:function(e){var t=e.replace(/#ppt_h/g,"(".concat(this.timingTarget.design_ppt_h,")"));return t=(t=(t=(t=(t=(t=(t=(t=t.replace(/#ppt_w/g,"(".concat(this.timingTarget.design_ppt_w,")"))).replace(/#ppt_x/g,"(".concat(this.timingTarget.design_ppt_x,")"))).replace(/#ppt_y/g,"(".concat(this.timingTarget.design_ppt_y,")"))).replace(/ppt_w/g,"vars.ppt_w")).replace(/ppt_h/g,"vars.ppt_h")).replace(/ppt_x/g,"vars.ppt_x")).replace(/ppt_y/g,"vars.ppt_y")).replace(/#/g,"vars."),["abs","acos","asin","atan","ceil","cos","cosh","deg","exp","floor","ln","max","min","rad","rand","sin","sinh","sqrt","tan","tanh","pi","e"].forEach((function(e){var n=new RegExp("([^a-z])".concat(e,"([^a-z])"),"g");t=t.replace(n,(function(t,n,r){return"".concat(n,"math.").concat(e).concat(r)}))})),new Function("vars","math","$","return "+t)}}]),e}(),sy=function(e){p(n,e);var t=m(n);function n(e,r,i){var o;return _(this,n),(o=t.call(this,e,r)).value=e.val.value,i&&(o.fmla=o.parseFmla(i)),o}return T(n,[{key:"resolveValue",value:function(){return this.value}},{key:"interpolationFrom",value:function(e,t,n){var r=e.resolveValue(n),i=r+(this.resolveValue()-r)*t;return e.fmla?e.fmla(n,this.math,i):i}}]),n}(ay);oy([iv()],sy.prototype,"interpolationFrom",null);var uy=function(e){p(n,e);var t=m(n);function n(e,r){var i,o;return _(this,n),(i=t.call(this,e,r)).value=null===(o=e.val)||void 0===o?void 0:o.value,i}return T(n,[{key:"interpolationFrom",value:function(e,t,n){var r=e.resolveValue(n);return t>this.time&&["hidden","visible"].indexOf(r)<0&&(r=this.resolveValue()),r}},{key:"resolveValue",value:function(){return this.value||""}}]),n}(ay);oy([iv()],uy.prototype,"interpolationFrom",null);var ly=function(e){p(n,e);var t=m(n);function n(e,r){var i;return _(this,n),(i=t.call(this,e,r)).fn=i.parseFmla(i.val),i}return T(n,[{key:"resolveValue",value:function(e){return this.fn(e,this.math,1)}},{key:"interpolationFrom",value:function(e,t,n){var r=e.resolveValue(n),i=r+(this.resolveValue(n)-r)*t;return e.fmla?e.fmla(n,this.math,i):i}}]),n}(ay);oy([iv()],ly.prototype,"interpolationFrom",null);var cy=function(e){p(n,e);var t=m(n);function n(e,r){var i;return _(this,n),(i=t.call(this,e,r)).value=e.val.value,i}return T(n,[{key:"interpolationFrom",value:function(e,t){return Zv(e.resolveValue(),this.value,t)}},{key:"resolveValue",value:function(){return this.value}}]),n}(ay);oy([iv()],cy.prototype,"interpolationFrom",null);var hy=function(e){p(n,e);var t=m(n);function n(e){var r;return _(this,n),(r=t.call(this,e)).isConflict=!0,r.activeWhenConflict="next",r.startVal=null,r.createVal=null,r.vars={ppt_x:0,ppt_y:0,ppt_w:0,ppt_h:0},r.keyFrames=[],r.isColorAnim=!1,r.onTimeNodeStart=function(){r.timingTarget&&(r.startVal=ny(r.timingTarget,r.json.cBhvr.attrList[0]))},r.updateVars=function(){var e,t,n,i;(null===(e=r.timingTarget)||void 0===e?void 0:e.ppt_h)&&(r.vars.ppt_h=r.timingTarget.ppt_h),(null===(t=r.timingTarget)||void 0===t?void 0:t.ppt_w)&&(r.vars.ppt_w=r.timingTarget.ppt_w),(null===(n=r.timingTarget)||void 0===n?void 0:n.ppt_x)&&(r.vars.ppt_x=r.timingTarget.ppt_x),(null===(i=r.timingTarget)||void 0===i?void 0:i.ppt_y)&&(r.vars.ppt_y=r.timingTarget.ppt_y),r.isColorAnim},r.onTimeUpdate=function(e){var t=e.duration,n=e.delta/t,i=r.keyFrames.findIndex((function(e){return n<=e[0]})),o=r.json.cBhvr.attrList;if(i<0){var a=r.keyFrames[r.keyFrames.length-1];r.timingTarget&&o&&o[0]&&ty(r.timingTarget,o[0],a[1].resolveValue(r.vars))}else{var s=i-1,u=r.keyFrames[i],l=r.keyFrames[s]||u,c=u[0]-l[0]==0?1:(n-l[0])/(u[0]-l[0]),h=u[1].interpolationFrom(l[1],c,r.vars);r.timingTarget&&o&&o[0]&&ty(r.timingTarget,o[0],h)}},r.onSeekToStart=function(){null!==r.startVal&&r.timingTarget&&ty(r.timingTarget,r.json.cBhvr.attrList[0],r.startVal)},r.onSeekToEnd=function(){r.onTimeUpdate({duration:1,delta:1,isReverse:!1})},r.onDestroy=function(){null!==r.createVal&&r.timingTarget&&ty(r.timingTarget,r.json.cBhvr.attrList[0],r.createVal)},r.initKeyFrames(),r.commonTimeNode.on("timeUpdate",r.onTimeUpdate),r.commonTimeNode.on("timelineStart",r.updateVars),r.commonTimeNode.on("timeNodeStart",r.onTimeNodeStart),r.commonTimeNode.on("timeNodeCreate",r.onTimeNodeStart),r.commonTimeNode.on("timeNodeDestroy",r.onDestroy),r.createVal=ny(r.timingTarget,r.json.cBhvr.attrList[0]),r}return T(n,[{key:"initKeyFrames",value:function(){var e,t=this.json.valueType;if(this.json.tavLst.length<=0)if(this.json.to){if(this.json.from||this.startVal){var n={time:0,val:{type:"string",value:this.json.from||this.startVal.toString()},fmla:""};if("num"===t&&this.timingTarget){var r=new ly(n,this.timingTarget);this.keyFrames.push([n.time,r])}}var i={time:1,val:{type:"string",value:this.json.to},fmla:""};if("num"===t&&this.timingTarget){var o=new ly(i,this.timingTarget);this.keyFrames.push([i.time,o])}}else if(this.json.by){var a={time:0,val:{type:"string",value:this.json.cBhvr.attrList[0]},fmla:""};if("num"===t&&this.timingTarget){var s=new ly(a,this.timingTarget);this.keyFrames.push([a.time,s])}var u={time:1,val:{type:"string",value:((null===(e=a.val)||void 0===e?void 0:e.value)||"")+"+"+this.json.by},fmla:""};if("num"===t&&this.timingTarget){var l=new ly(u,this.timingTarget);this.keyFrames.push([u.time,l])}}if(this.json.tavLst.length>0){var c,h=S(this.json.tavLst);try{for(h.s();!(c=h.n()).done;){var d=c.value;if(d.val&&this.timingTarget){var f=null;"string"===d.val.type?"num"===t?f=new ly(d,this.timingTarget):"str"===t&&(f=new uy(d,this.timingTarget)):"number"===d.val.type?f=new sy(d,this.timingTarget):"color"===d.val.type?(this.isColorAnim=!0,f=new cy(d,this.timingTarget)):"boolean"===d.val.type&&console.warn("not implements"),f&&this.keyFrames.push([d.time,f])}}}catch(e){h.e(e)}finally{h.f()}}}},{key:"modifyAttrKey",get:function(){return this.json.cBhvr.attrList[0]}}]),n}(ry),dy=function(e){p(n,e);var t=m(n);function n(e,r,i){return _(this,n),t.call(this,e,r,i)}return T(n,[{key:"percent",set:function(e){this.uniforms.percent=e}},{key:"transition",set:function(e){this.uniforms.transition=e}}]),n}(Xl.k),fy=n(121),py=n.n(fy),vy=n(122),my=n.n(vy),gy=n(123),yy=n.n(gy),by=n(124),xy=n.n(by),_y=n(9),wy=n.n(_y),Ty=n(125),My=n.n(Ty),Sy=n(126),Ey=n.n(Sy),Ay="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAMAAABHPGVmAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAr5QTFRFAAAATwAAOQAAZgAAKwAAPAAAPQAA7AAA/wAA/QAAugAA5QAAsQAAwQAAsAAAfwAAawAASQAAZAAAOAAAJwAALAAALQAAqQAAiwAAmgAA5AAA7QAAtQAAhQAALwAAfAAAXwAAYQAAigAAuQAAfgAAswAAcgAArQAAqgAAZwAAaQAAMgAAGAAAiA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BCPcQwB2+rRpubsw03qWL2iRyHH9Afl/YHuFYa8v7zEXDEigXJo9RAtTM4BTzElQhSgePv55AmHTo4W9v4SmkPDlLIhOpcXBK4GO2AnyzeN0MaKP7umX9bZAfc5LA84bxj3frYCxezbP9KG7QeJzevIhiAU4p/j+y2OyMV2mxNgAAAABJRU5ErkJggg==",Iy=n(127),Cy=n.n(Iy),Ny=n(128),ky=n.n(Ny),Dy=n(129),Py=n.n(Dy),Oy=n(130),Ry=n.n(Oy),Ly=n(131),jy=n.n(Ly),By=n(132),Uy=n.n(By),zy=n(133),Fy=n.n(zy),Gy=n(134),Hy=n.n(Gy),Vy=n(135),Wy=n.n(Vy),Yy={wipe:function(e){p(n,e);var t=m(n);function n(e){var r;_(this,n);var i=1;return"up"===e?i=1:"down"===e?i=2:"left"===e?i=3:"right"===e&&(i=4),(r=t.call(this,my.a,py.a,{percent:0,direction:1,transition:0})).uniforms.direction=i,r}return n}(dy),fade:function(e){p(n,e);var t=m(n);function n(e){var r;_(this,n);var i=1;return"out"===e?i=-1:"in"===e&&(i=1),(r=t.call(this,void 0,yy.a,{percent:0,transition:1})).uniforms.transition=Math.pow(i,i),r}return n}(dy),blinds:function(e){p(n,e);var t=m(n);function n(e){var r;return _(this,n),(r=t.call(this,wy.a,xy.a,{percent:0,transition:1,rect:new Float32Array([0,0,0,0])})).uniforms.option="vertical"===e?1:0,r}return n}(dy),checkerboard:function(e){p(n,e);var t=m(n);function n(e){var r;return _(this,n),(r=t.call(this,wy.a,My.a,{percent:0,transition:1,rect:new Float32Array([0,0,0,0])})).uniforms.option="down"===e?1:0,r}return n}(dy),dissolve:function(e){p(n,e);var t=m(n);function n(e){var r;return _(this,n),(r=t.call(this,wy.a,Ey.a,{percent:0,transition:1,rect:new Float32Array([0,0,0,0])})).setTextTure(),r}return T(n,[{key:"setTextTure",value:function(){this.uniforms.dissolveSampler=Xl.t.from(Ay)}}]),n}(dy),randombar:function(e){p(n,e);var t=m(n);function n(e){var r;return _(this,n),(r=t.call(this,wy.a,Cy.a,{percent:0,transition:1,rect:new Float32Array([0,0,0,0])})).uniforms.option="vertical"===e?1:0,r.setTextTure(),r}return T(n,[{key:"setTextTure",value:function(){this.uniforms.dissolveSampler=Xl.t.from(Ay)}}]),n}(dy),circle:function(e){p(n,e);var t=m(n);function n(e){var r;return _(this,n),(r=t.call(this,wy.a,ky.a,{percent:0,transition:1,rect:new Float32Array([0,0,0,0])})).uniforms.option="out"===e?1:0,r}return n}(dy),box:function(e){p(n,e);var t=m(n);function n(e){var r;return _(this,n),(r=t.call(this,wy.a,Py.a,{percent:0,transition:1,rect:new Float32Array([0,0,0,0])})).uniforms.option="out"===e?1:0,r}return n}(dy),diamond:function(e){p(n,e);var t=m(n);function n(e){var r;return _(this,n),(r=t.call(this,wy.a,Ry.a,{percent:0,transition:1,rect:new Float32Array([0,0,0,0])})).uniforms.option="out"===e?1:0,r}return n}(dy),plus:function(e){p(n,e);var t=m(n);function n(e){var r;return _(this,n),(r=t.call(this,wy.a,jy.a,{percent:0,transition:1,rect:new Float32Array([0,0,0,0])})).uniforms.option="out"===e?1:0,r}return n}(dy),barn:function(e){p(n,e);var t=m(n);function n(e){var r;return _(this,n),(r=t.call(this,wy.a,Uy.a,{percent:0,transition:1,rect:new Float32Array([0,0,0,0])})).uniforms.option="inHorizontal"===e?1:"outHorizontal"===e?2:"outVertical"===e?3:0,r}return n}(dy),strips:function(e){p(n,e);var t=m(n);function n(e){var r;return _(this,n),(r=t.call(this,wy.a,Fy.a,{percent:0,transition:1,rect:new Float32Array([0,0,0,0])})).uniforms.option="upLeft"===e?1:"downRight"===e?2:"upRight"===e?3:0,r}return n}(dy),wedge:function(e){p(n,e);var t=m(n);function n(e){return _(this,n),t.call(this,wy.a,Hy.a,{percent:0,transition:1,rect:new Float32Array([0,0,0,0])})}return n}(dy),wheel:function(e){p(n,e);var t=m(n);function n(e){var r;return _(this,n),(r=t.call(this,wy.a,Wy.a,{percent:0,transition:1,rect:new Float32Array([0,0,0,0])})).uniforms.option=Number(e)||1,r}return n}(dy)},Xy=function(e){p(n,e);var t=m(n);function n(e){var r,i;_(this,n),(r=t.call(this,e)).filterType="",r.isConflict=!1,r.activeWhenConflict="prev",r.onTimeUpdate=function(e){var t,n=e.duration,i=e.delta/n;if(r.filter){r.filter.percent=r.commonTimeNode.applyTimeFilter(i);var o=null===(t=r.timingTarget)||void 0===t?void 0:t.container.getBounds();o&&(r.filter.uniforms.uBoundRect=new Float32Array([o.x,o.y,o.width,o.height]))}i>=1&&r.timingTarget&&r.ctx.clock.setTimeout((function(){r.removeFilter()}),34)},r.onSeekToStart=function(){r.timingTarget&&r.removeFilter()},r.onSeekToEnd=function(){r.timingTarget&&r.removeFilter()},r.onDestroy=function(){r.removeFilter()},r.commonTimeNode.on("timelineStart",(function(){r.filter&&r.timingTarget&&(r.timingTarget.container.filters&&0!==r.timingTarget.container.filters.length?r.timingTarget.container.filters.push(r.filter):r.timingTarget.container.filters=[r.filter])})),r.commonTimeNode.on("timeNodeDestroy",r.onDestroy),r.commonTimeNode.on("timeUpdate",r.onTimeUpdate);var o=1;"out"===e.json.transition&&(o=-1);var a=null===(i=e.json.filter)||void 0===i?void 0:i.match(/^([a-zA-Z]+)(\((.+)\))?/);if(a){var s=a[1],u=a[3];Yy[s]&&(r.filter=new Yy[s](u),r.filterType="".concat(s,"-").concat(u),r.filter&&(r.filter.transition=o))}return r}return T(n,[{key:"removeFilter",value:function(){var e,t=this;if((null===(e=this.timingTarget)||void 0===e?void 0:e.container.filters)&&this.filter){var n=this.timingTarget.container.filters.findIndex((function(e){return e===t.filter}));n>=0&&this.timingTarget.container.filters.splice(n,1)}}},{key:"modifyAttrKey",get:function(){return this.filterType}}]),n}(ry),Qy=function(e){p(n,e);var t=m(n);function n(e){var r;return _(this,n),(r=t.call(this,e)).isConflict=!0,r.activeWhenConflict="next",r.startPos=null,r.onTimeNodeStart=function(){var e,t;r.startPos={x:(null===(e=r.timingTarget)||void 0===e?void 0:e.ppt_x)||0,y:(null===(t=r.timingTarget)||void 0===t?void 0:t.ppt_y)||0}},r.onTimeUpdate=function(e){var t,n=e.duration,i=e.delta/n,o=null===(t=r.path)||void 0===t?void 0:t.getPoint(i);r.timingTarget&&o&&(r.timingTarget.ppt_x=o.x+r.timingTarget.design_ppt_x,r.timingTarget.ppt_y=o.y+ +r.timingTarget.design_ppt_y)},r.onSeekToStart=function(){r.timingTarget&&r.startPos&&(r.timingTarget.ppt_x=r.startPos.x,r.timingTarget.ppt_y=r.startPos.y)},r.onSeekToEnd=function(){var e,t,n,i=null!==(t=null===(e=r.commonTimeNode.json)||void 0===e?void 0:e.spd)&&void 0!==t?t:1,o=null===(n=r.path)||void 0===n?void 0:n.getPoint(i>0?1:0);r.timingTarget&&o&&(r.timingTarget.ppt_x=o.x+r.timingTarget.design_ppt_x,r.timingTarget.ppt_y=o.y+r.timingTarget.design_ppt_y)},r.commonTimeNode.on("timeUpdate",r.onTimeUpdate),r.commonTimeNode.on("timeNodeCreate",r.onTimeNodeStart),r.commonTimeNode.on("timeNodeDestroy",r.onSeekToStart),r.createPath(),r}return T(n,[{key:"createPath",value:function(){var e,t,n=new os,r=null===(e=this.json.path)||void 0===e?void 0:e.match(/[MLCmlc][^MLCmlc]+/g);if(r){var i,o=S(r);try{for(o.s();!(i=o.n()).done;){var a=i.value.trim().replace(/\s+/g," ").split(" "),u=d(t=a)||s(t)||E(t)||h(),l=u[0],f=u.slice(1);if("M"===l){var p=c(f.map((function(e){return Number(e)})),2),v=p[0],m=p[1];n.moveTo(v,m)}else if("L"===l){var g=c(f.map((function(e){return Number(e)})),2),y=g[0],b=g[1];n.lineTo(y,b)}else if("C"===l){var x=c(f.map((function(e){return Number(e)})),6),_=x[0],w=x[1],T=x[2],M=x[3],A=x[4],I=x[5];n.bezierCurveTo(_,w,T,M,A,I)}else if("Z"===l)n.closePath();else if("E"===l)console.warn("not implements");else if("c"===l){var C=c(f.map((function(e){return Number(e)})),6),N=C[0],k=C[1],D=C[2],P=C[3],O=C[4],R=C[5],L=n.currentPoint;n.bezierCurveTo(N+L.x,k+L.y,D+L.x,P+L.y,O+L.x,R+L.y)}else if("l"===l){var j=n.currentPoint,B=c(f.map((function(e){return Number(e)})),2),U=B[0],z=B[1];n.lineTo(U+j.x,z+j.y)}else if("m"===l){var F=n.currentPoint,G=c(f.map((function(e){return Number(e)})),2),H=G[0],V=G[1];n.moveTo(H+F.x,V+F.y)}}}catch(e){o.e(e)}finally{o.f()}}this.path=n}},{key:"modifyAttrKey",get:function(){return"motion"}}]),n}(ry),Zy=function(e){p(n,e);var t=m(n);function n(e){var r,i;return _(this,n),(r=t.call(this,e)).isConflict=!0,r.activeWhenConflict="next",r.startVal=null,r.createVal=null,r.onTimelineStart=function(e){e.isReverse||r.updateCurrentValue()},r.onTimeUpdate=function(e){var t,n,i,o,a,s=e.duration,u=e.delta/s,l={x:1,y:1};if(r.to){var c=null!==(t=r.from)&&void 0!==t?t:{x:null!==(i=null===(n=r.startVal)||void 0===n?void 0:n.x)&&void 0!==i?i:1,y:null!==(a=null===(o=r.startVal)||void 0===o?void 0:o.y)&&void 0!==a?a:1};l.x=c.x+(r.to.x-c.x)*u,l.y=c.y+(r.to.y-c.y)*u}else if(r.by){var h={x:r.by.x,y:r.by.y};l.x=1+(h.x-1)*u,l.y=1+(h.y-1)*u}r.timingTarget&&(r.timingTarget.scale=l)},r.onTimeNodeStart=function(){r.timingTarget&&(r.startVal={x:r.timingTarget.scale.x,y:r.timingTarget.scale.y})},r.onSeekToStart=function(){r.timingTarget&&r.startVal&&(r.timingTarget.scale=r.startVal)},r.onSeekToEnd=function(){r.onTimeUpdate({duration:1,delta:1,isReverse:!1})},r.onDestroy=function(){null!==r.createVal&&r.timingTarget&&(r.timingTarget.scale=r.createVal)},r.from=e.json.from,r.to=e.json.to,r.by=e.json.by,r.commonTimeNode.on("timelineStart",r.onTimelineStart),r.commonTimeNode.on("timeNodeCreate",r.onTimeNodeStart),r.commonTimeNode.on("timeUpdate",r.onTimeUpdate),r.commonTimeNode.on("timeNodeStart",r.onTimeNodeStart),r.commonTimeNode.on("timeNodeDestroy",r.onSeekToStart),(null===(i=r.timingTarget)||void 0===i?void 0:i.scale.x)&&(r.createVal={x:r.timingTarget.scale.x,y:r.timingTarget.scale.y}),r}return T(n,[{key:"updateCurrentValue",value:function(){this.timingTarget&&(this.current={x:this.timingTarget.scale.x,y:this.timingTarget.scale.y})}},{key:"modifyAttrKey",get:function(){return"scale"}}]),n}(ry),qy=function(e){p(n,e);var t=m(n);function n(e){var r;return _(this,n),(r=t.call(this,e)).isConflict=!1,r.activeWhenConflict="next",r.isTimelineStart=!1,r.startColorString=null,r.currentColorString="#FFFFFFFF",r.onTimelineStart=function(e){if(!r.isTimelineStart){r.isTimelineStart=!0,e.isReverse||r.updateCurrentValue(),r.from.isInit()||r.from.fromHexString(r.currentColorString),r.to.isInit()||r.from.by(r.by,r.to);var t=c(r.json.cBhvr.attrList[0].split("."),1)[0];ty(r.timingTarget,t+".on","true")}},r.onTimeNodeEnd=function(){var e=r.json.cBhvr.attrList[0];if("remove"===r.json.cBhvr.ctn.fill){var t=c(e.split("."),1)[0];ty(r.timingTarget,t+".on","false")}r.isTimelineStart=!1},r.onSeekToStart=function(){var e,t=r.json.cBhvr.attrList[0];if(r.timingTarget){r.onTimeUpdate({duration:1,delta:0});var n="ppt_c.color"===t||"text.color"===t;if((null===(e=r.timingTarget.fill)||void 0===e?void 0:e.designColor.toUpperCase())===r.from.toHexString().toUpperCase()||n){var i=c(t.split("."),1)[0];ty(r.timingTarget,i+".on","false")}}},r.onTimeNodeStart=function(){if(r.timingTarget){var e=r.json.cBhvr.attrList[0],t=ny(r.timingTarget,e);t&&(r.startColorString=t)}},r.onTimeUpdate=function(e){var t=e.delta/e.duration;if(r.to.interpolationFrom(r.from,t,r.target),r.timingTarget){var n=r.json.cBhvr.attrList[0];ty(r.timingTarget,n,r.target.toHexString())}},r.onSeekToEnd=function(){r.isTimelineStart||r.onTimelineStart({isReverse:!1,activeCount:0,id:""}),r.onTimeUpdate({duration:1,delta:1})},r.replaceAttrToRelation(),"rgb"===r.json.clrSpc?(r.from=new Wv(r.json.from),r.to=new Wv(r.json.to),r.by=new Wv(r.json.by),r.target=new Wv):(r.from=new Vv(r.json.from),r.to=new Vv(r.json.to),r.by=new Vv(r.json.by),r.target=new Vv),r.commonTimeNode.on("timeNodeStart",r.onTimeNodeStart),r.commonTimeNode.on("timeNodeCreate",r.onTimeNodeStart),r.commonTimeNode.on("timelineStart",r.onTimelineStart),r.commonTimeNode.on("timeNodeEnd",r.onTimeNodeEnd),r.commonTimeNode.on("timeUpdate",r.onTimeUpdate),r.commonTimeNode.on("timeNodeDestroy",r.onSeekToStart),r}return T(n,[{key:"replaceAttrToRelation",value:function(){var e=this.json.cBhvr.attrList[0];"ppt_c"!==e?"style.color"===e&&(this.json.cBhvr.attrList[0]="text.color"):this.json.cBhvr.attrList[0]="ppt_c.color"}},{key:"updateCurrentValue",value:function(){if(this.timingTarget){var e=this.json.cBhvr.attrList[0],t=ny(this.timingTarget,e);t&&(this.currentColorString=t)}}},{key:"modifyAttrKey",get:function(){return this.json.cBhvr.attrList[0]}}]),n}(ry),Jy=function(e){p(n,e);var t=m(n);function n(e){var r;return _(this,n),(r=t.call(this,e)).isConflict=!1,r.activeWhenConflict="next",r.startVal=null,r.createVal=null,r.lastVal=null,r.onTimelineStart=function(e){r.lastVal=null,e.isReverse||r.updateCurrentValue()},r.onTimeUpdate=function(e){var t=e.duration,n=e.delta/t,i=0;if(void 0!==r.from&&void 0!==r.to){var o=(i=r.from)+(r.to-i)*n;r.timingTarget&&(r.timingTarget.r=o)}else if(void 0!==r.by){r.lastVal||(r.lastVal=0);var a=r.by*n-r.lastVal;r.lastVal=r.by*n,r.timingTarget&&(r.timingTarget.r+=a)}},r.onTimeNodeCreate=function(){var e;Tv()(null===(e=r.timingTarget)||void 0===e?void 0:e.r)&&(r.createVal=r.timingTarget.r)},r.onTimeNodeStart=function(){var e;Tv()(null===(e=r.timingTarget)||void 0===e?void 0:e.r)&&(r.startVal=r.timingTarget.r)},r.onSeekToStart=function(){r.timingTarget&&null!==r.startVal&&(r.timingTarget.r=r.startVal)},r.onSeekToEnd=function(){r.onTimeUpdate({duration:1,delta:1,isReverse:!1})},r.onDestroy=function(){r.timingTarget&&null!==r.createVal&&(r.timingTarget.r=r.createVal),r.startVal=null},r.from=r.json.from,r.to=r.json.to,r.by=r.json.by,r.by?r.isConflict=!1:r.isConflict=!0,r.onTimeNodeCreate(),r.commonTimeNode.on("timeNodeStart",r.onTimeNodeStart),r.commonTimeNode.on("timeNodeCreate",r.onTimeNodeStart),r.commonTimeNode.on("timelineStart",r.onTimelineStart),r.commonTimeNode.on("timeUpdate",r.onTimeUpdate),r.commonTimeNode.on("timeNodeDestroy",r.onDestroy),r}return T(n,[{key:"updateCurrentValue",value:function(){var e;this.currentVal=null===(e=this.timingTarget)||void 0===e?void 0:e.r}},{key:"modifyAttrKey",get:function(){return"rotate"}}]),n}(ry),Ky=function(e){p(n,e);var t=m(n);function n(e){var r;return _(this,n),(r=t.call(this,e)).isConflict=!1,r.activeWhenConflict="next",r.isApplied=!1,r.onTimeUpdate=function(){var e,t,n=r.json,i=n.cmd,o=n.cmdType;!r.isApplied&&i&&o&&(r.isApplied=!0,null===(t=null===(e=r.timingTarget)||void 0===e?void 0:e.cmd)||void 0===t||t.applyCommand(i,o))},r.onSeekToStart=function(){var e,t;r.commonTimeNode.isInInteractiveSeq||null===(t=null===(e=r.timingTarget)||void 0===e?void 0:e.cmd)||void 0===t||t.applyCommand("custom-pause","call")},r.onSeekToEnd=function(){},r.commonTimeNode.on("timeNodeStart",(function(){r.isApplied=!1})),r.commonTimeNode.on("timeNodeEnd",(function(){r.isApplied=!1})),r.commonTimeNode.on("timeUpdate",r.onTimeUpdate),r.commonTimeNode.on("seekToStart",r.onSeekToStart),r.commonTimeNode.on("seekToEnd",r.onSeekToEnd),r}return T(n,[{key:"modifyAttrKey",get:function(){var e,t,n,r;return(null!==(t=null===(e=this.json)||void 0===e?void 0:e.cmd)&&void 0!==t?t:"")+(null!==(r=null===(n=this.json)||void 0===n?void 0:n.cmdType)&&void 0!==r?r:"")}}]),n}(ry),$y=function e(t){var n=this;_(this,e),this.runtimeNodeEventHub=new Ks.a,this.onVolumeUpdate=function(e){n.audio.volume(e)},this.stopAudio=function(){n.audio.stop()},this.destroy=function(){n.stopAudio(),n.audio.destroy(),n.ctx.activeMedia.delete(n.audio),n.ctx.volumeAdjuster.off("update",n.onVolumeUpdate)};var r=t.json,i=t.isIterate,o=t.isSub,a=t.eventHub,s=t.ctx,u=t.parent,l=t.iterateType,c=t.iterateIndex,h=t.iterateId,d=t.isInInteractiveSeq,f=t.fromSeqId;this.json=r,this.id=r.cMediaNode.ctn.id,this.commonTimeNode=new tb({json:r.cMediaNode.ctn,isSub:o,eventHubs:{global:a,runtime:this.runtimeNodeEventHub},ctx:s,parent:u,isIterate:i,iterateType:l,iterateIndex:c,iterateId:h,isInInteractiveSeq:d,fromSeqId:f});var p=r.cMediaNode.tgtEl;s.loaderDelegate&&(p=s.loaderDelegate.redirectMedia(p),s.logger.info("redirect media url from ".concat(r.cMediaNode.tgtEl," to ").concat(p," by delegate."),s.taskId)),this.audio=new Wg(p,s.runningAudio),s.activeMedia.add(this.audio),this.commonTimeNode.on("timelineStart",(function(){n.audio.volume(s.volumeAdjuster.volume),n.audio.play()})),this.commonTimeNode.on("seekToStart",this.stopAudio),this.commonTimeNode.on("seekToEnd",this.stopAudio),this.commonTimeNode.on("timeNodeDestroy",this.destroy),this.ctx=s,this.ctx.volumeAdjuster.on("update",this.onVolumeUpdate)};function eb(e){return(null===(t=e)||void 0===t?void 0:t.cBhvr)?e.cBhvr.ctn:function(e){var t,n;return!!(null===(n=null===(t=e)||void 0===t?void 0:t.cMediaNode)||void 0===n?void 0:n.ctn)}(e)?e.cMediaNode.ctn:e.ctn;var t}var tb=function(e){p(n,e);var t=m(n);function n(e){var r,i,o;_(this,n),(r=t.call(this)).uuid=uv(),r.isSub=!1,r.isShadow=!1,r.startCount=0,r.applyCount=0,r.isReverse=!1,r.isConflictDispose=!1,r.isIterateEnd=!1,r.parentTimeNode=null,r.isActive=!1,r.isDestroy=!1,r.shouldSeekOnStart=!1,r.repeatTimeoutId="",r.iterateShadows=[],r.isEndEventsEmitted=!1,r.tmFilter=[],r.timeDelta=0,r.isIterate=!1,r.iterateType="el",r.iterateIndex=0,r.children=[],r.subList=[],r.duration=0,r.isNegativeSpeed=!1,r.handleEndCond=function(){r.isActive&&(r.isActive=!1,r.isInfiniteRepeat()?r.repeatTimeNodeEnd():r.seekToEnd(!1,!0))},r.handleActive=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(r.isActive=!0,r.isConflictDispose=!1,r.applyCount+=1,r.json.iterate||r.emit("timeNodeStart",{id:r.uuid,activeCount:r.applyCount,isReverse:r.isReverse}),r.startCount>0&&r.json.restart){if("never"===r.json.restart)return;"whenNotActive"!==r.json.restart&&"always"!==r.json.restart||(r.seekToStart(),r.emit("timeNodeRestart",{id:r.uuid,activeCount:r.applyCount,isReverse:r.isReverse}),r.startTimeLine(e))}else r.startTimeLine(e)},r.updateTimeLine=function(e){var t=e/(nd.b.TARGET_FPMS||.06);r.timeDelta+=t,r.duration-r.timeDelta<=t&&(r.timeDelta=r.duration),r.timeDelta0&&void 0!==arguments[0]&&arguments[0];(r.isTimeNodeEnd()||e)&&(r.isActive=!1,r.isSub&&r.destroy(),r.emitEndEvents())};var a=e.isSub,s=e.isIterate,u=e.ctx,l=e.eventHubs,c=e.parent,h=e.json,d=e.iterateType,f=e.iterateId,p=e.iterateIndex,v=e.isInInteractiveSeq,m=e.fromSeqId;r.isSub=a,r.fromSeqId=m,r.isInInteractiveSeq=v,r.isIterate=s,r.parentTimeNode=c,r.json=h,r.ctx=u,r.iterateIndex=p,r.eventHubs=l,r.iterateType=d,r.iterateId=f,r.tmFilter=null!==(o=null===(i=h.tmFilter)||void 0===i?void 0:i.split(";").map((function(e){return e.split(",").map((function(e){return parseFloat(e.trim())}))})))&&void 0!==o?o:[];var g=Number(r.json.dur),y=r.json.spd||1;if(r.isNegativeSpeed=y<0,Number.isNaN(g)||(r.duration=g/Math.abs(y)),r.uuid+="--"+r.json.id,r.setPreStyle(),h.childTnLst&&r.createChildren(h.childTnLst),r.startConds=new $g(r.json.id||"",h.stCondLst,l,r.ctx),r.endConds=new $g(r.json.id||"",h.endCondLst,l,r.ctx),h.endSync&&(r.endSync=new $g(r.json.id||"",[h.endSync],l,r.ctx),r.endSync.on("active",(function(){var e;"interactiveSeq"===r.json.nodeType&&(r.isActive=!1,r.shouldSeekOnStart=!0,r.emit("timeNodeEndSync"),null===(e=r.endSync)||void 0===e||e.reset())}))),r.startConds.on("active",(function(e){r.isActive||(r.shouldSeekOnStart&&(r.shouldSeekOnStart=!1,r.seekToStart()),r.handleActive(e))})),r.endConds.on("active",(function(){r.handleEndCond(),r.children.forEach((function(e){return e.commonTimeNode.handleEndCond()}))})),r.parentTimeNode&&r.parentTimeNode.on("timeNodeStart",(function(){r.applyCount=0})),r.isSub&&"nextClick"===r.json.masterRel){var b="shape slide onNext"+r.fromSeqId;r.startConds.addCond({event:b})}return r.json.iterate&&!1===r.isIterate&&r.createIterateShadow(),r}return T(n,[{key:"createIterateShadow",value:function(){var e=this,t=uv(),r=!0,i=0;for(this.ctx.eventHub.on("IterateTimeNodeEnd",(function n(i){i===t&&(r=!1,e.ctx.eventHub.removeListener("IterateTimeNodeEnd",n))}));r;){var o=JSON.parse(JSON.stringify(this.json)),a=new n({json:o,isSub:!1,eventHubs:this.eventHubs,ctx:this.ctx,parent:null,isIterate:!0,iterateType:o.iterate.type,iterateIndex:i,iterateId:t,isInInteractiveSeq:this.isInInteractiveSeq,fromSeqId:this.fromSeqId});this.iterateShadows[i]=a,i+=1}}},{key:"isInfiniteRepeat",value:function(){return this.json.repeatCount>999999998}},{key:"getReverse",value:function(){return this.isReverse}},{key:"setReverse",value:function(e){this.isReverse=e}},{key:"createTimeNode",value:function(e,t){var n=null,r={json:e,isSub:t,isIterate:this.isIterate,eventHub:this.eventHubs.global,ctx:this.ctx,parent:this,iterateType:this.iterateType,iterateIndex:this.iterateIndex,iterateId:this.iterateId,isInInteractiveSeq:this.isInInteractiveSeq,fromSeqId:this.fromSeqId};return"seq"===e.type?n=new ey(r):"par"===e.type?n=new nb(r):"set"===e.type?n=new iy(r):"anim"===e.type?n=new hy(r):"animEffect"===e.type?n=new Xy(r):"animMotion"===e.type?n=new Qy(r):"animScale"===e.type?n=new Zy(r):"animClr"===e.type?n=new qy(r):"animRot"===e.type?n=new Jy(r):"cmd"===e.type?n=new Ky(r):"audio"===e.type&&(n=new $y(r)),n}},{key:"createSubList",value:function(e){var t=this;this.subList&&this.subList.forEach((function(e){return e.commonTimeNode.destroy()})),this.subList=[],e.forEach((function(e){var n=t.createTimeNode(e,!0);n&&t.subList.push(n)}))}},{key:"bindCommonTimeNodeEvent",value:function(e){var t=this;e.commonTimeNode.on("timeNodeStart",(function(e){t.emit("childTimeNodeStart",e)})),e.commonTimeNode.on("timeNodeEnd",(function(e){t.emit("childTimeNodeEnd",e),t.children.every((function(e){return e.commonTimeNode.isTimeNodeEndWhenDetectEndSync()}))&&(t.json.iterate||t.allChildrenEndHandle())}))}},{key:"createChildren",value:function(e){var t=this;function n(e){return eb(e).presetOrder}function r(e){return/^slide/.test(e)?"slide":/^layout/.test(e)?"layout":/^master/.test(e)?"master":"unknow"}var i=["master","layout","slide","unknow"];e&&e[0]&&n(e[0])?a(e).sort((function(e,t){var o,a,s,u,l=eb(e).id,c=eb(t).id;if(l&&c){var h=r(l),d=r(c);return h===d?(null!==(o=n(e))&&void 0!==o?o:0)-(null!==(a=n(t))&&void 0!==a?a:0):i.indexOf(h)-i.indexOf(d)}return(null!==(s=n(e))&&void 0!==s?s:0)-(null!==(u=n(t))&&void 0!==u?u:0)})).forEach((function(e){var n=t.createTimeNode(e,!1);n&&(t.bindCommonTimeNodeEvent(n),t.children.push(n))})):e.forEach((function(e){var n=t.createTimeNode(e,!1);n&&(t.bindCommonTimeNodeEvent(n),t.children.push(n))}))}},{key:"playReverse",value:function(){this.isReverse=!0,this.startReverseTimeLine(),this.children.forEach((function(e){return e.commonTimeNode.playReverse()}))}},{key:"allChildrenEndHandle",value:function(){var e=this;if(!this.isDestroy){if(this.json.autoRev&&!this.isReverse)return this.isReverse=!0,void this.playReverse();this.isReverse&&(this.isReverse=!1),this.json.repeatCount&&this.json.repeatCount>this.applyCount?this.repeatTimeoutId=this.ctx.clock.setTimeout((function(){e.seekToStart(!1),e.resetForRepeat(),e.startTimeNodeRepeat()})):(this.json.iterate&&!this.isIterate&&(this.isIterateEnd=!0),this.eventHubs.runtime.emit("runtime all end"),this.startSubList(),this.handleEnd())}}},{key:"resetForRepeat",value:function(){this.isInInteractiveSeq&&this.isInfiniteRepeat()&&this.repeatTimeNodeEnd(),this.timeDelta=0,this.children.forEach((function(e){return e.commonTimeNode.resetForRepeat()}))}},{key:"startSubList",value:function(){this.subList.forEach((function(e){return e.commonTimeNode.startTimeNode()}))}},{key:"startReverseTimeLine",value:function(){this.isEndEventsEmitted=!1,this.timeDelta=0;var e=1e3/this.ctx.ticker.maxFPS;this.duration<=e&&this.duration>0?(this.emit("timeUpdate",{delta:this.duration,duration:this.duration,isReverse:this.isReverse}),this.ctx.eventHub.emit(bb.animateEnd),this.ctx.ticker.remove(this.updateTimeLine)):this.duration>e&&(this.ctx.eventHub.emit(bb.animateStart),this.ctx.ticker.add(this.updateTimeLine))}},{key:"startTimeLine",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(t&&(this.isEndEventsEmitted=!1,this.eventHubs.global.emit("time ".concat(this.json.id," begin")),this.eventHubs.global.emit("time ".concat(this.json.id," onBegin")),this.eventHubs.runtime.emit("runtime ".concat(this.json.id," begin"))),this.json.iterate)this.startIterate();else{this.timeDelta=0,this.emit("timelineStart",{id:this.uuid,activeCount:this.applyCount,isReverse:this.isReverse});var n=1e3/this.ctx.ticker.maxFPS;this.duration<=n&&this.duration>0?(this.timeDelta=this.isReverse?0:this.duration,this.emit("timeUpdate",{delta:this.timeDelta,duration:this.duration,isReverse:this.isReverse}),this.emit("timelineEnd",{id:this.uuid,activeCount:this.applyCount,isReverse:this.isReverse}),this.ctx.ticker.addOnce((function(){e.onTimeLineEnd()}))):this.duration>n&&(this.ctx.eventHub.emit(bb.animateStart),this.updateTimeLine(0),this.ctx.ticker.add(this.updateTimeLine))}}},{key:"startIterate",value:function(){return function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.json.iterate){e.next=24;break}this.isIterateEnd=!1,t=S(this.iterateShadows),e.prev=3,t.s();case 5:if((n=t.n()).done){e.next=15;break}if(r=n.value,!this.isIterateEnd){e.next=9;break}return e.abrupt("break",15);case 9:return r.children.forEach((function(e){e.commonTimeNode.startTimeNode()})),r.applyCount+=1,e.next=13,this.ctx.clock.delay(this.json.iterate.interval);case 13:e.next=5;break;case 15:e.next=20;break;case 17:e.prev=17,e.t0=e.catch(3),t.e(e.t0);case 20:return e.prev=20,t.f(),e.finish(20);case 23:this.onTimeLineEnd();case 24:case"end":return e.stop()}}),e,this,[[3,17,20,23]])})))}},{key:"applyTimeFilter",value:function(e){if(!this.tmFilter.every((function(e){return Tv()(e[0])&&Tv()(e[1])})))return e;for(var t=0;t0?this.tmFilter[this.tmFilter.length-1][1]:e}},{key:"isNatureTimeEnd",value:function(){return this.duration>=0&&this.timeDelta>=this.duration}},{key:"findTargets",value:function(){var e=[];return function t(n){n.forEach((function(n){var r,i,o;n.cBhvr&&n.cBhvr.target&&e.findIndex((function(e){return e.id===n.cBhvr.target.id}))<0&&e.push(n.cBhvr.target),(null===(i=null===(r=null==n?void 0:n.cBhvr)||void 0===r?void 0:r.ctn)||void 0===i?void 0:i.childTnLst)&&n.cBhvr.ctn.childTnLst.length>0&&t(n.cBhvr.ctn.childTnLst),(null===(o=null==n?void 0:n.ctn)||void 0===o?void 0:o.childTnLst)&&n.ctn.childTnLst.length>0&&t(n.ctn.childTnLst)}))}(this.json.childTnLst||[]),e}},{key:"setPreStyle",value:function(){var e=this;this.json.presetClass&&this.findTargets().forEach((function(t){if(e.json.iterate)for(var n=0,r=!0;r;){var i=e.ctx.timingTargets.getTarget(t,!0,{type:e.json.iterate.type,index:n,id:""});i&&(e.setPreStyleForTarget(i),n+=1),r=!!i}else{var o=e.ctx.timingTargets.getTarget(t,!1);o&&e.setPreStyleForTarget(o)}}))}},{key:"setPreStyleForTarget",value:function(e){var t,n;if(e&&this.json.presetSubtype&&(e.presetSubType=this.json.presetSubtype),e&&!e.hasPreset)if("entr"===this.json.presetClass){var r=null===(n=null===(t=this.json)||void 0===t?void 0:t.childTnLst)||void 0===n?void 0:n.filter((function(e){return"set"===e.type&&"visible"===e.to}));(null==r?void 0:r.length)&&(e.hasPreset=!0,e.style.visibility="hidden")}else("exit"===this.json.presetClass||"path"===this.json.presetClass||"emph"===this.json.presetClass)&&(e.hasPreset=!0,e.style.visibility="visible")}},{key:"startTimeNodeRepeat",value:function(){this.timeDelta=0,this.isActive=!0,this.applyCount+=1,this.startTimeLine(!1),this.json.iterate||this.emit("timeNodeRepeat",{id:this.uuid,activeCount:this.applyCount,isReverse:this.isReverse})}},{key:"startTimeNodeForce",value:function(){this.json.subTnLst&&this.createSubList(this.json.subTnLst),this.timeDelta=0,this.isActive=!0,this.handleActive(!1)}},{key:"startTimeNode",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!this.isDestroy){this.collectStartValue(),this.timeDelta=0,this.isReverse=!1,this.json.subTnLst&&this.createSubList(this.json.subTnLst),this.startConds.setTriggerParams(e);var t=this.json.stCondLst.filter((function(e){return/^self/.test(e.event||"")}))[0];t&&this.startConds.condHandle(t);var n=this.json.endCondLst.filter((function(e){return/^self/.test(e.event||"")}))[0];n&&this.endConds.condHandle(n),this.startConds.condHandle()}}},{key:"onTimeLineEnd",value:function(){this.dispose(),(0===this.children.length||this.json.iterate)&&this.allChildrenEndHandle()}},{key:"clearSubList",value:function(){this.subList.forEach((function(e){return e.commonTimeNode.destroy()}))}},{key:"seekToStart",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.isEndEventsEmitted=!1,this.isActive=!1,this.dispose(),this.timeDelta=0,this.emit("seekToStart"),this.json.iterate&&!this.isIterate)return this.isIterateEnd=!0,void this.iterateShadows.forEach((function(t){return t.seekToStart(e)}));if(e)for(var t=this.subList.length-1;t>=0;t--){var n=this.subList[t];null==n||n.commonTimeNode.seekToStart()}for(var r=this.children.length-1;r>=0;r--){var i=this.children[r];null==i||i.commonTimeNode.seekToStart()}if(this.children.length>1)for(var o=this.children.length-1;o>=0;o--){var a=this.children[o];null==a||a.commonTimeNode.seekToStart()}}},{key:"repeatTimeNodeEnd",value:function(){this.dispose(),this.children.forEach((function(e){e.commonTimeNode.isActive=!1,e.commonTimeNode.dispose()}))}},{key:"dispose",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.isConflictDispose=e,this.ctx.clock.clearTimeout(this.repeatTimeoutId),this.ctx.eventHub.emit(bb.animateEnd);try{this.ctx.ticker.remove(this.updateTimeLine)}catch(e){}this.startConds.reset(),this.endConds.reset()}},{key:"seekToEnd",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.isInfiniteRepeat()){!this.isActive&&this.applyCount<=0&&this.collectStartValue(),this.applyCount=this.json.repeatCount,this.json.autoRev&&(this.isReverse=!0),this.timeDelta=this.duration,this.isActive=!1,this.dispose();var n=this.json.autoRev||e;if(n?this.emit("seekToStart"):this.emit("seekToEnd"),this.json.iterate&&!this.isIterate)return this.isIterateEnd=!0,void this.iterateShadows.forEach((function(e){return e.seekToEnd(n,t)}));0===this.children.length&&(this.eventHubs.runtime.emit("runtime all end"),this.handleEnd()),this.children.forEach((function(e){return e.commonTimeNode.seekToEnd(n,t)})),t&&this.json.subTnLst&&(this.subList.length<=0&&this.createSubList(this.json.subTnLst),this.subList.forEach((function(e){return e.commonTimeNode.seekToEnd(!1)})),this.clearSubList())}}},{key:"isTimeNodeEndWhenDetectEndSync",value:function(){if(this.isInInteractiveSeq&&this.isInfiniteRepeat())return!0;var e=!0;return this.children.length>0&&(e=e&&this.children.every((function(e){return e.commonTimeNode.isTimeNodeEndWhenDetectEndSync()}))),this.json.repeatCount&&(e=e&&this.applyCount>=this.json.repeatCount),this.json.autoRev&&(e=e&&!this.isReverse),e=e&&this.isNatureTimeEnd(),!!this.isConflictDispose||!(!this.isIterateEnd||!this.json.iterate)||e}},{key:"isTimeNodeEnd",value:function(){var e=!0;return this.children.length>0&&(e=e&&this.children.every((function(e){return e.commonTimeNode.isTimeNodeEnd()}))),this.json.repeatCount&&(e=e&&this.applyCount>=this.json.repeatCount),this.json.autoRev&&(e=e&&!this.isReverse),e=e&&this.isNatureTimeEnd(),!!this.isConflictDispose||!(!this.isIterateEnd||!this.json.iterate)||e}},{key:"emitEndEvents",value:function(){this.isEndEventsEmitted||(this.isEndEventsEmitted=!0,this.eventHubs.global.emit("time ".concat(this.json.id," end")),this.eventHubs.global.emit("time ".concat(this.json.id," onEnd")),this.eventHubs.runtime.emit("runtime ".concat(this.json.id," end")),this.emit("timeNodeEnd",{id:this.uuid,activeCount:this.applyCount,isReverse:this.isReverse}))}},{key:"collectStartValue",value:function(){this.emit("timeNodeCreate"),this.children.forEach((function(e){return e.commonTimeNode.collectStartValue()}))}},{key:"destroy",value:function(){this.emit("timeNodeDestroy"),this.isDestroy=!0,this.dispose(),this.startConds.removeAllListeners(),this.endConds.removeAllListeners(),this.children.forEach((function(e){return e.commonTimeNode.destroy()})),this.clearSubList()}}]),n}(Ks.a),nb=function(e){p(n,e);var t=m(n);function n(e){var r;_(this,n),(r=t.call(this)).isRunning=!1,r.runtimeNodeEventHub=new Ks.a;var i=e.json,o=e.iterateType,a=e.isIterate,s=e.isSub,u=e.parent,l=e.ctx,c=e.eventHub,h=e.iterateIndex,d=e.iterateId,f=e.isInInteractiveSeq,p=e.fromSeqId;return r.id=i.ctn.id,r.json=i,r.ctx=l,r.isIterate=a,r.globalEventHub=c,r.commonTimeNode=new tb({json:i.ctn,isSub:s,eventHubs:{global:c,runtime:r.runtimeNodeEventHub},ctx:l,parent:u,isIterate:!1,iterateType:o,iterateIndex:h,iterateId:d,isInInteractiveSeq:f,fromSeqId:p}),r.commonTimeNode.on("timeNodeStart",(function(){r.commonTimeNode.children.forEach((function(e){e.commonTimeNode.setReverse(r.commonTimeNode.getReverse()),e.commonTimeNode.startTimeNode()})),r.isRunning||(r.isRunning=!0,r.globalEventHub.emit("runtime ".concat(r.id," begin")),r.emit("begin"))})),r.commonTimeNode.on("timeNodeRepeat",(function(){r.commonTimeNode.children.forEach((function(e){e.commonTimeNode.startTimeNode(!1)}))})),r.commonTimeNode.on("timeNodeEnd",(function(){r.commonTimeNode.isTimeNodeEnd()&&r.isRunning&&(r.isRunning=!1,r.globalEventHub.emit("runtime ".concat(r.id," end")),r.emit("end")),"exit"===r.commonTimeNode.json.presetClass&&r.commonTimeNode.children.length>=1&&r.commonTimeNode.children[r.commonTimeNode.children.length-1]instanceof iy&&r.commonTimeNode.children.forEach((function(e){e instanceof iy||"function"!=typeof e.onSeekToStart||e.onSeekToStart()}))})),r}return n}(Ks.a),rb=function(){function e(t,n,r){_(this,e),this.json=t,this.ctx=r,this.globalEventHub=n;var i=t.timeNodeList.find((function(e){return"par"===e.type&&"tmRoot"===e.ctn.nodeType}));i&&(this.tmRoot=new nb({json:i,isSub:!1,isIterate:!1,eventHub:n,ctx:r,parent:null,iterateType:"el",iterateIndex:0,iterateId:"",isInInteractiveSeq:!1,fromSeqId:""}),this.mainSeq=this.tmRoot.commonTimeNode.children.find((function(e){var t,n,r;return"seq"===(null===(t=e.json)||void 0===t?void 0:t.type)&&"mainSeq"===(null===(r=null===(n=e.json)||void 0===n?void 0:n.ctn)||void 0===r?void 0:r.nodeType)})))}return T(e,[{key:"findSeq",value:function(e){var t;return null===(t=this.tmRoot)||void 0===t?void 0:t.commonTimeNode.children.find((function(t){var n,r,i;return"seq"===(null===(n=t.json)||void 0===n?void 0:n.type)&&(null===(i=null===(r=t.json)||void 0===r?void 0:r.ctn)||void 0===i?void 0:i.id)===e}))}},{key:"start",value:function(){var e,t;return function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}(this,void 0,void 0,regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!this.json.autoPlayMainSeq){n.next=6;break}return n.next=3,this.ctx.clock.delay(16);case 3:null===(e=this.mainSeq)||void 0===e||e.commonTimeNode.startTimeNode(),n.next=7;break;case 6:null===(t=this.mainSeq)||void 0===t||t.commonTimeNode.startTimeNode();case 7:case"end":return n.stop()}}),n,this)})))}},{key:"setMainSeqApplied",value:function(){this.mainSeq&&(this.mainSeq.commonTimeNode.applyCount=1)}},{key:"collectMainSeqStartValue",value:function(){var e;null===(e=this.mainSeq)||void 0===e||e.commonTimeNode.collectStartValue()}},{key:"setMainSeqStep",value:function(e,t){var n;-1===e&&this.mainSeq&&(this.mainSeq.commonTimeNode.applyCount=1),null===(n=this.mainSeq)||void 0===n||n.setCurrentStep(e,t)}},{key:"destroy",value:function(){var e;this.globalEventHub.removeAllListeners(),null===(e=this.tmRoot)||void 0===e||e.commonTimeNode.destroy()}},{key:"hasMainSeq",value:function(){return!!this.mainSeq&&this.mainSeq.commonTimeNode.children.length>0}},{key:"currentMainSeqState",value:function(){return this.mainSeq?this.mainSeq.currentState:null}},{key:"currentMainSeqStep",value:function(){return this.mainSeq?this.mainSeq.currentStep:0}},{key:"currentMainSeqLength",value:function(){return this.mainSeq?this.mainSeq.stepLength:0}},{key:"mainSeqHasNextStep",value:function(){return!!this.mainSeq&&this.mainSeq.hasNext()}},{key:"mainSeqHasPrevStep",value:function(){return!!this.mainSeq&&this.mainSeq.hasPrev()}},{key:"seekInteractiveSeqToEnd",value:function(e){var t=this.findSeq(e);t&&t.commonTimeNode.seekToEnd(!1,!0)}},{key:"setInteractiveSeqState",value:function(e,t,n){var r=this.findSeq(e);r&&r.setCurrentStep(t,n)}},{key:"resetAllInteractiveSeq",value:function(){var e;((null===(e=this.tmRoot)||void 0===e?void 0:e.commonTimeNode.children.filter((function(e){var t,n,r;return"seq"===(null===(t=e.json)||void 0===t?void 0:t.type)&&"interactiveSeq"===(null===(r=null===(n=e.json)||void 0===n?void 0:n.ctn)||void 0===r?void 0:r.nodeType)})))||[]).forEach((function(e){e.setCurrentStep(0,"start")}))}},{key:"applyInteractiveAction",value:function(e){this.globalEventHub.emit(e)}}]),e}(),ib=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},ob=function(e){p(n,e);var t=m(n);function n(e,r,i,o){var a;_(this,n),(a=t.call(this,{id:"stage",width:e.width,height:e.height,type:"Container",children:e.children},r,{parentGlobalPos:i},o)).isRendered=!1,a.isTimingStartValueCollected=!1,a.json=e,a.json.smartArtShapeList&&(r.smartArtShapeList=a.json.smartArtShapeList),r.hasBackgroundFillShape=a.detectUseBackgroundFill(a.json),a.container.visible=!1,a.ctx=r;var s=new Dd;return s.beginFill(16777215),s.drawRect(0,0,e.width,e.height),s.endFill(),a.container.addChild(s),a}return T(n,[{key:"detectUseBackgroundFill",value:function(e){var t=this;return!!e&&("Picture"===e.type||"Shape"===e.type?e.useBgFill:!(!e.children||!Array.isArray(e.children))&&e.children.some((function(e){return t.detectUseBackgroundFill(e)})))}},{key:"initOnReuse",value:function(){var e=this;f(x(n.prototype),"initOnReuse",this).call(this),this.ctx.timingEventHub.on("c:prev slide",(function(t){e.ctx.eventHub.emit(bb.requestPrevSlide,t)})),this.ctx.timingEventHub.on("c:next slide",(function(t,n){e.ctx.eventHub.emit(bb.requestNextSlide,t,n)}))}},{key:"render",value:function(e){var t=this;this.isRendered||(this.collectAnimatedIds().forEach((function(e){return t.ctx.animatedIds.add(e)})),this.isRendered=!0,f(x(n.prototype),"render",this).call(this,e),e.addSubMTask((function(){return ib(t,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.ctx.eventHub.emit("StageRenderEnd");case 1:case"end":return e.stop()}}),e,this)})))}),"@StageImpl[emit.StageRenderEnd]"))}},{key:"isListTimeNode",value:function(e){return["excel","seq","par"].indexOf(e.type)>=0}},{key:"isAnimatedTimeNode",value:function(e){return!!e.cBhvr}},{key:"collectAnimatedIdsForTimeNode",value:function(e,t){var n,r=this;this.isListTimeNode(e)?null===(n=e.ctn.childTnLst)||void 0===n||n.forEach((function(e){r.collectAnimatedIdsForTimeNode(e,t)})):this.isAnimatedTimeNode(e)&&t.push(e.cBhvr.target.id)}},{key:"collectAnimatedIds",value:function(){var e=this,t=[];return this.json.timing&&this.json.timing.timeNodeList.forEach((function(n){e.collectAnimatedIdsForTimeNode(n,t)})),t}},{key:"createTiming",value:function(){this.json.timing&&!this.timing&&(this.timing=new rb(this.json.timing,this.ctx.timingEventHub,this.ctx))}},{key:"startTiming",value:function(){var e;return(null===(e=this.timing)||void 0===e?void 0:e.start())||Promise.resolve()}},{key:"setMainSeqApplied",value:function(){var e;null===(e=this.timing)||void 0===e||e.setMainSeqApplied()}},{key:"setMainSeqStep",value:function(e,t){var n;null===(n=this.timing)||void 0===n||n.setMainSeqStep(e,t)}},{key:"collectMainSeqStartValue",value:function(){var e;this.isTimingStartValueCollected||(this.isTimingStartValueCollected=!0,null===(e=this.timing)||void 0===e||e.collectMainSeqStartValue())}},{key:"hasTiming",value:function(){return!!this.timing}},{key:"clearOnSlideChange",value:function(){this.ctx.eventHub.removeAllListeners(),this.ctx.timingEventHub.removeAllListeners(),f(x(n.prototype),"clearOnSlideChange",this).call(this)}},{key:"clearOnTransactionEnd",value:function(){var e,t;this.ctx.timingTargets.getTargets().forEach((function(e){e.hasPreset=!1})),null===(e=this.timing)||void 0===e||e.resetAllInteractiveSeq(),null===(t=this.timing)||void 0===t||t.destroy(),this.timing=void 0}},{key:"destroy",value:function(){var e,t;this.isTimingStartValueCollected=!1,this.isRendered=!1,this.ctx.eventHub.removeAllListeners(),this.ctx.graphicsTexture.destroy(),null===(e=this.ctx.bgTexture)||void 0===e||e.destroy(!0),this.ctx.spriteTexture.destroy(),this.ctx.timingEventHub.removeAllListeners(),null===(t=this.timing)||void 0===t||t.destroy(),this.timing=void 0,f(x(n.prototype),"destroy",this).call(this)}},{key:"mainSeqStep",value:function(){var e,t;return null!==(t=null===(e=this.timing)||void 0===e?void 0:e.currentMainSeqStep())&&void 0!==t?t:0}},{key:"mainSeqLength",value:function(){var e,t;return null!==(t=null===(e=this.timing)||void 0===e?void 0:e.currentMainSeqLength())&&void 0!==t?t:0}},{key:"mainSeqHasNextStep",value:function(){var e,t;return null!==(t=null===(e=this.timing)||void 0===e?void 0:e.mainSeqHasNextStep())&&void 0!==t&&t}},{key:"mainSeqHasPrevStep",value:function(){var e,t;return null!==(t=null===(e=this.timing)||void 0===e?void 0:e.mainSeqHasPrevStep())&&void 0!==t&&t}},{key:"mainSeqState",value:function(){return this.timing?this.timing.currentMainSeqState():null}},{key:"nextStep",value:function(e,t){var n;this.hasTiming()&&(null===(n=this.timing)||void 0===n?void 0:n.hasMainSeq())?(this.ctx.timingEventHub.emit("shape slide onStopAudio"),this.ctx.timingEventHub.emit("shape slide onNext",e,t)):this.ctx.eventHub.emit(bb.requestNextSlide,e,t)}},{key:"prevStep",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.hasTiming()&&(null===(e=this.timing)||void 0===e?void 0:e.hasMainSeq())?(this.ctx.timingEventHub.emit("shape slide onStopAudio"),this.ctx.timingEventHub.emit("shape slide onPrev",t)):this.ctx.eventHub.emit(bb.requestPrevSlide,t)}},{key:"applyInteractiveAction",value:function(e){var t;null===(t=this.timing)||void 0===t||t.applyInteractiveAction(e)}},{key:"seekInteractiveSeqToEnd",value:function(e){var t;null===(t=this.timing)||void 0===t||t.seekInteractiveSeqToEnd(e)}},{key:"setInteractiveSeqState",value:function(e,t,n){var r;null===(r=this.timing)||void 0===r||r.setInteractiveSeqState(e,t,n)}},{key:"setMediaState",value:function(e,t,n){return ib(this,void 0,void 0,regeneratorRuntime.mark((function r(){var i;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(i=this.ctx.medias[e],r.t0=i,!r.t0){r.next=21;break}if(!t){r.next=18;break}if(!n){r.next=14;break}return r.next=7,dv((function(){return i.clippedDuration>0}),5e3);case 7:if(r.t1=n=0&&t.tasks.splice(n,1)})),e.once("task-error",(function(){var n=t.tasks.indexOf(e);n>=0&&t.tasks.splice(n,1)}))}},{key:"start",value:function(){this.couldRunning=!0}},{key:"stop",value:function(){this.couldRunning=!1}}]),e}(),sb=function(e){return new Promise((function(t){return setTimeout(t,e)}))},ub=function(e){p(n,e);var t=m(n);function n(e,r,i){var o;return _(this,n),(o=t.call(this)).slideIndex=e,o.taskId=r,o.logger=i,o.uuid=uv(),o.isCancel=!1,o.tasks=[],o}return T(n,[{key:"addMTask",value:function(e,t){this.tasks.push({fn:e,state:"wait",sub:[],name:t})}},{key:"addSubMTask",value:function(e,t){var n=this.tasks.findIndex((function(e){return"running"===e.state}));n<0&&(n=0),this.tasks[n].sub.push({fn:e,state:"wait",sub:[],name:t})}},{key:"cancel",value:function(){this.tasks=[],this.isCancel=!0}},{key:"applyNext",value:function(){var e=this;if(!this.tasks.some((function(e){return"running"===e.state}))&&!this.tasks.some((function(e){return"error"===e.state})))if(this.tasks.every((function(e){return"finish"===e.state})))this.isCancel||this.emit("task-finish");else{var t=this.tasks.find((function(e){return"wait"===e.state}));t&&(t.state="running",t.fn.apply(null).then((function(){if(t.state="finish",t.sub.length>0){var n,r=e.tasks.findIndex((function(e){return e===t}));(n=e.tasks).splice.apply(n,[r+1,0].concat(a(t.sub)))}})).catch((function(n){t.state="error",e.logger.error("".concat(n," ").concat(n.stack),e.taskId),e.emit("task-error",rv.transform(n),e.slideIndex)})))}}},{key:"applyAll",value:function(){return function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.tasks.every((function(e){return"finish"===e.state}))){e.next=14;break}if(!this.tasks.some((function(e){return"running"===e.state}))){e.next=6;break}return e.next=4,sb(16);case 4:e.next=12;break;case 6:if(!this.tasks.some((function(e){return"error"===e.state}))){e.next=8;break}return e.abrupt("return");case 8:return e.delegateYield(regeneratorRuntime.mark((function e(){var n,r,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=t.tasks.find((function(e){return"wait"===e.state})))){e.next=17;break}return n.state="running",e.prev=3,e.next=6,hv((function(){return n.fn.apply(null)}),6e4);case 6:if(e.t0=e.sent,e.t1=lv,e.t0!==e.t1){e.next=10;break}throw new rv(Jp.RuntimeError,"subtask ".concat(n.name," apply timeout"));case 10:n.state="finish",n.sub.length>0&&(i=t.tasks.findIndex((function(e){return e===n})),(r=t.tasks).splice.apply(r,[i+1,0].concat(a(n.sub)))),e.next=17;break;case 13:return e.prev=13,e.t2=e.catch(3),o=(null==e.t2?void 0:e.t2.errorType)?e.t2:new rv(Jp.RuntimeError,"subtask ".concat(n.name," error. ").concat(e.t2)),n.state="error",t.logger.error("".concat(e.t2," ").concat(e.t2.stack),t.taskId),t.emit("task-error",rv.transform(o),t.slideIndex),e.abrupt("return","break");case 17:case"end":return e.stop()}}),e,null,[[3,13]])}))(),"t0",9);case 9:if("break"!==e.t0){e.next=12;break}return e.abrupt("break",14);case 12:e.next=0;break;case 14:!this.isCancel&&this.tasks.every((function(e){return"finish"===e.state}))&&this.emit("task-finish");case 15:case"end":return e.stop()}}),e,this)})))}}]),n}(Ks.a),lb=function(){function e(t,n){var r=this;if(_(this,e),this.renderer=t,this.localStorage=n,this.outputData=new Map,this.loadingSdfKeys=new Set,!e.worker){var i=new Blob(['\nself.onmessage = function(e) {\n var data = e.data.data;\n var key = e.data.key;\n var height = Math.ceil(e.data.height);\n var width = Math.ceil(e.data.width);\n if (!data || !key) {\n return;\n }\n var maxDis = 0;\n var d = [];\n var p = [];\n var maxInt = Number.MAX_SAFE_INTEGER || 255 * 255 * 255;\n var setD = function(x, y, v) { d[y * width + x] = v; };\n var getD = function(x, y) { return d[y * width + x]; };\n var setP = function(x, y, v) { p[y * width + x] = v; };\n var getP = function(x, y) { return p[y * width + x]; };\n var isContains = function(x, y) { return x >= 0 && x < width && y >= 0 && y < height; };\n var isInterior = function(x, y) { return data[(y * width + x) * 4 + 3] > 10; };\n for (var y = 0; y < height; ++ y) {\n for (var x = 0; x < width; ++ x) {\n var c = isInterior(x, y);\n var t = isContains(x, y - 1) ? isInterior(x, y - 1) : false;\n var b = isContains(x, y + 1) ? isInterior(x, y + 1) : false;\n var l = isContains(x - 1, y) ? isInterior(x - 1, y) : false;\n var r = isContains(x + 1, y) ? isInterior(x + 1, y) : false;\n if (c !== t || c !== b || c !== l || c !== r) {\n setD(x, y, 0);\n setP(x, y, [x, y]);\n } else {\n setD(x, y, maxInt);\n setP(x, y, [-1, -1]);\n }\n }\n }\n \n var f = function (x, y, dir) {\n var d1 = 1;\n var d2 = Math.sqrt(2);\n var dx;\n var dy;\n var od;\n switch (dir) {\n case "TL": dx = -1; dy = -1; od = d2; break;\n case "T": dx = 0; dy = -1; od = d1; break;\n case "TR": dx = 1; dy = -1; od = d2; break;\n case "L": dx = -1; dy = 0; od = d1; break;\n case "R": dx = 1; dy = 0; od = d1; break;\n case "BL": dx = -1; dy = 1; od = d2; break;\n case "B": dx = 0; dy = 1; od = d1; break;\n case "BR": dx = 1; dy = 1; od = d2; break;\n }\n var b = isContains(x + dx, y + dy);\n var cb = b ? getD(x + dx, y + dy) : maxInt;\n if (cb + od < getD(x, y)) {\n var p = b ? getP(x + dx, y + dy) : [-1, -1];\n var dis = Math.sqrt(Math.pow(x - p[0], 2) + Math.pow(y - p[1], 2));\n setP(x, y, p);\n setD(x, y, dis);\n if (dis > maxDis) {\n maxDis = dis;\n }\n }\n };\n \n for (var y = 0; y < height; ++ y) {\n for (var x = 0; x < width; ++ x) {\n var dirs = ["TL", "T", "TR", "L"];\n for (var i = 0; i < dirs.length; ++ i) {\n var dir = dirs[i];\n f(x, y, dir);\n }\n }\n }\n\n for (var y = height - 1; y >= 0; -- y) {\n for (var x = width - 1; x >= 0; -- x) {\n var dirs = ["R", "BL", "B", "BR"];\n for (var i = 0; i < dirs.length; ++ i) {\n var dir = dirs[i];\n f(x, y, dir);\n }\n }\n }\n\n var outputData = [];\n for (var y = 0; y < height; ++ y) {\n for (var x = 0; x < width; ++ x) {\n outputData.push(isInterior(x, y) ? 255: 0);\n outputData.push(0);\n outputData.push(0);\n outputData.push(Math.ceil(getD(x, y) / maxDis * 255));\n }\n }\n self.postMessage({\n key, outputData, maxDis\n });\n};\n'],{type:"text/javascript"});e.worker=new Worker(URL.createObjectURL(i)),e.worker.onmessage=function(e){r.outputData.set(e.data.key,{data:e.data.outputData,maxDis:e.data.maxDis})},this.outputData.set("111","222")}}return T(e,[{key:"createSdfByWorker",value:function(t,n,r,i,o,a,s,u){var l=document.createElement("canvas");l.width=o,l.height=a;var c=l.getContext("2d");if(c&&e.worker){c.drawImage(s,t,n,r,i);var h=c.getImageData(0,0,o,a).data;e.worker.postMessage({data:h,key:u,width:o,height:a})}}},{key:"createSdf",value:function(e,t,n){var r=document.createElement("canvas");r.width=e,r.height=t;var i=r.getContext("2d");if(!i)return{src:"",maxDis:1};i.drawImage(n,0,0);for(var o=0,a=i.getImageData(0,0,e,t).data,s=[],u=[],l=function(t,n,r){s[n*e+t]=r},c=function(t,n){return s[n*e+t]},h=function(t,n,r){u[n*e+t]=r},d=function(n,r){return n>=0&&n=0&&r10},p=0;po&&(o=m)}},w=0;w=0;--E)for(var A=e-1;A>=0;--A)for(var I=0,C=["R","BL","B","BR"];It.maxResolution.x||s>t.maxResolution.y){var r=(n=t.maxResolution.x/a)*s;r>t.maxResolution.y&&(n*=t.maxResolution.y/r)}return o.loadSpriteSheetItem(t.url,t.taskId,e,n)}),"@StagePool[spriteTexture.loadSpriteSheetItem]")})),Promise.resolve()}),"@StagePool[loadSpriteSheets]")}},{key:"createStage",value:function(e){var t=this,n=this.stageStates[e].task;n.addMTask((function(){var r=t.stageJsons[e],i=t.stageCtxs[e],o=new ob(r,i,{x:0,y:0},n);return t.stageImpls[e]=o,Promise.resolve()}),"@StagePool[createStage]")}},{key:"preRenderStage",value:function(e){var t=this,n=this.stageStates[e].task;n.addMTask((function(){return t.stageImpls[e].preRender(n),Promise.resolve()}),"@StagePool[preRenderStage]")}},{key:"createGraphicsTexture",value:function(e){var t=this,n=this.stageStates[e].task;n.addMTask((function(){return cb(t,void 0,void 0,regeneratorRuntime.mark((function t(){var r,i=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(r=this.stageCtxs[e]).graphicsTexture.pack().forEach((function(t,o){n.addSubMTask((function(){var n=i.stageCtxs[e],a=n.stageWidth,s=n.stageHeight,u=1;if(a>i.maxResolution.x||s>i.maxResolution.y){var l=(u=i.maxResolution.x/a)*s;l>i.maxResolution.y&&(u*=i.maxResolution.y/l)}return r.graphicsTexture.render(t,o,i.objPoolGroup,u)}),"@StagePool[graphicsTexture.render]")}));case 2:case"end":return t.stop()}}),t,this)})))}),"@StagePool[createGraphicsTexture]")}},{key:"renderStage",value:function(e){var t=this,n=this.stageStates[e].task;n.addMTask((function(){return cb(t,void 0,void 0,regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this.stageImpls[e],t.next=3,r.render(n);case 3:case"end":return t.stop()}}),t,this)})))}),"@StagePool[renderStage]")}},{key:"destroyStageByIndex",value:function(e){"load"===this.stageStates[e].state&&this.stageStates[e].task.cancel(),delete this.stageStates[e],this.stageImpls[e].destroy(),delete this.stageImpls[e],delete this.stageCtxs[e]}},{key:"destroyStage",value:function(){var e=this;Object.keys(this.stageImpls).forEach((function(t){var n=parseInt(t,10);Math.abs(e.currentStageIndex-n)>e.cacheCount&&e.destroyStageByIndex(n)}))}},{key:"destroyAllStage",value:function(){var e=this;Object.keys(this.stageImpls).forEach((function(t){var n=parseInt(t,10);e.destroyStageByIndex(n)}))}},{key:"preload",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.stageImpls[e]||this.stageStates[e])return Promise.resolve();var r=new ub(e,this.taskId,this.logger);return r.on("task-error",(function(e,n){delete t.stageStates[n],delete t.stageImpls[n],delete t.stageCtxs[n],t.errorChannel.emit("error",e,n)})),this.stageStates[e]={state:"load",task:r},this.createCtx(e),this.loadStageJson(e),this.loadSpriteSheets(e),this.createStage(e),this.preRenderStage(e),this.createGraphicsTexture(e),this.renderStage(e),this.microTaskManager.addTask(r),n?r.applyAll():new Promise((function(n){r.once("task-finish",(function(){t.stageStates[e].state="finish",Object.keys(t.stageStates).length>2*t.cacheCount+1&&t.destroyStage(),n()}))}))}},{key:"getStageJson",value:function(e){return this.stageJsons[e]||null}},{key:"getStage",value:function(e){return cb(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.currentStageIndex=e,"finish"!==(null==(n=this.stageStates[e])?void 0:n.state)||!this.stageImpls[e]){t.next=6;break}t.t0=this.stageImpls[e],t.next=16;break;case 6:if("load"!==(null==n?void 0:n.state)){t.next=12;break}return t.next=9,n.task.applyAll();case 9:t.t1=this.stageImpls[e],t.next=15;break;case 12:return t.next=14,this.preload(e,!0);case 14:t.t1=this.stageImpls[e];case 15:t.t0=t.t1;case 16:return t.abrupt("return",t.t0);case 17:case"end":return t.stop()}}),t,this)})))}},{key:"destroy",value:function(){this.runningAudio.clear()}}]),e}(),db=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},fb=function(){function e(t){var n,r=this;_(this,e),this.logger=t,this.taskId="",this.isIndexDBReady=!1,this.memoryCache=new Map,null===(n=e.localCache)||void 0===n||n.ready((function(e){e||(r.isIndexDBReady=!0)})).catch((function(){t.warn("local storage not ready",r.taskId)}))}return T(e,[{key:"attachTaskId",value:function(e){this.taskId=e}},{key:"getItem",value:function(t){return db(this,void 0,void 0,regeneratorRuntime.mark((function n(){var r,i=this;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r=null,!this.couldUseIndexDBCache||!e.localCache){n.next=10;break}return n.prev=2,n.next=5,hv((function(){return e.localCache.getItem("".concat(i.taskId,"/").concat(t))}),500);case 5:r=n.sent,n.next=10;break;case 8:n.prev=8,n.t0=n.catch(2);case 10:return n.abrupt("return",(r=r===lv?null:r)||this.memoryCache.get(t)||null);case 11:case"end":return n.stop()}}),n,this,[[2,8]])})))}},{key:"setItem",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return db(this,void 0,void 0,regeneratorRuntime.mark((function i(){var o,a=this;return regeneratorRuntime.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(this.couldUseIndexDBCache){i.next=2;break}return i.abrupt("return",(r&&this.memoryCache.set(t,n),Promise.resolve()));case 2:if(!e.localCache){i.next=13;break}return o=null,i.prev=4,i.next=7,hv((function(){return e.localCache.setItem("".concat(a.taskId,"/").concat(t),n).catch((function(){r&&a.memoryCache.set(t,n)}))}),500);case 7:o=i.sent,i.next=12;break;case 10:i.prev=10,i.t0=i.catch(4);case 12:o!==lv&&null!==o||!r||this.memoryCache.set(t,n);case 13:case"end":return i.stop()}}),i,this,[[4,10]])})))}},{key:"dispose",value:function(){var t,n=this;this.memoryCache=new Map,this.couldUseIndexDBCache&&(null===(t=e.localCache)||void 0===t||t.keys().then((function(t){t.filter((function(e){return e.indexOf(n.taskId)>=0})).forEach((function(t){var n;null===(n=e.localCache)||void 0===n||n.removeItem(t).catch((function(){}))}))})).catch((function(){})))}},{key:"couldUseIndexDBCache",get:function(){return this.isIndexDBReady&&this.taskId.length>0}}]),e}();fb.localCache=null;try{fb.localCache=b.createInstance({name:"slide_local_cache",driver:b.INDEXEDDB,version:1})}catch(u){}var pb=new jl.j,vb=function(){function e(t){_(this,e),this.localStorage=t}return T(e,[{key:"canvas",value:function(t,n,r,i){var o,a,s,u=!1,l=!1;t&&(t instanceof Xl.p?s=t:(s=n.generateTexture(t),l=!0)),s?(o=s.baseTexture.resolution,a=s.frame,u=!1,n.renderTexture.bind(s)):(o=n.resolution,u=!0,(a=pb).width=n.width,a.height=n.height,n.renderTexture.bind(null));var c=Math.floor(a.width*o+1e-4),h=Math.floor(a.height*o+1e-4),d=document.createElement("canvas");d.width=c,d.height=h;var f=d.getContext("2d");if(!f)throw new Error("ctx");if(r)f.putImageData(r,0,0);else{var p=f.getImageData(0,0,c,h),v=new Uint8Array(4*c*h),m=n.gl;m.readPixels(a.x*o,a.y*o,c,h,m.RGBA,m.UNSIGNED_BYTE,v),e.arrayPostDivide(v,p.data),f.putImageData(p,0,0),i&&this.localStorage.setItem(i,p).catch((function(){}))}if(u){var g=document.createElement("canvas");g.width=c,g.height=h;var y=g.getContext("2d");y.scale(1,-1),y.drawImage(d,0,-h),d=g}return l&&(null==s||s.destroy(!0)),d}}],[{key:"arrayPostDivide",value:function(e,t){for(var n=0;n1&&(e=1),this._volume=e,this.emit("update",this._volume)}}]),n}(Ks.a),gb=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))};Ol.skipHello();var yb={randomBar:"RandomLines",circle:"Shape",ripple:"Ripples",wipe:"Erase",dissolve:"Dissolve",morph:"Smooth",fade:"FadeInOut",push:"Push",split:"Separation",reveal:"Display",pull:"Uncover",cover:"Cover",flash:"Flash",checker:"Checkerboard",blinds:"WindowShades",curtains:"Curtain",fallOver:"Fall",drape:"Suspension",wheel:"Clock",comb:"Combing",warp:"Scale",peelOff:"PeelOff",flip:"Flip",gallery:"Gallery",switch:"Switch",prism:"Prism",doors:"Doors"},bb={mainSeqStepChange:"mainSeqStepChange",mainSeqStateChange:"mainSeqStateChange",interactiveSeqStateChange:"interactiveSeqStateChange",interactiveSeqAction:"interactiveSeqAction",mainSeqStepStart:"mainSeqStepStart",mainSeqStepEnd:"mainSeqStepEnd",slideChange:"slideChange",renderStart:"renderStart",renderEnd:"renderEnd",hyperlinkTrigger:"hyperlinkTrigger",animateStart:"animateStart",animateEnd:"animateEnd",mediaSeek:"mediaSeek",mediaPlay:"mediaPlay",mediaPause:"mediaPause",mediaStop:"mediaStop",requestNextSlide:"requestNextSlide",requestPrevSlide:"requestPrevSlide",requestGotoSlide:"requestGotoSlide",requestOpenUrl:"requestOpenUrl",userInput:"userInput",fullscreenChange:"fullscreenChange",changeLocalFullscreenState:"changeLocalFullscreenState"},xb=function(e){p(n,e);var t=m(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};_(this,n),(r=t.call(this)).errorChannel=new Ks.a,r.transactionPlayer=null,r.isForward=!0,r.drawCall=0,r.scale=1,r._isPaused=!1,r.maxResolution=new jl.g(0,0),r.isNVIDIA=!1,r.fps=new nv,r.designWidth=0,r.designHeight=0,r.currentIndex=0,r.slideCount=0,r.runtime={drawCall:0,fps:0},r.globalEventHub=new Ks.a,r.globalVideoBackground=new Dd,r.globalVideoSprite=new Ld,r.onMousemoveTimeout=null,r.cacheFunctionMap=new Map,r.isPlayerPaused=function(){return r._isPaused},r.onWebGLLost=function(){r.errorChannel.emit("error",new rv(Jp.CanvasCrash,"webgl context lost."))},r.fullscreenOnMousemove=function(e){var t=e.index,n=e.targetId;r.globalEventHub.emit("controllerShowStatusChange",{slideIndex:t,targetId:n,status:!0}),r.onMousemoveTimeout&&clearTimeout(r.onMousemoveTimeout),r.onMousemoveTimeout=setTimeout((function(){r.globalEventHub.emit("controllerShowStatusChange",{slideIndex:t,targetId:n,status:!1})}),jg)},r.fullscreenOnMouseleave=function(e){var t=e.index,n=e.targetId;r.globalEventHub.emit("controllerShowStatusChange",{slideIndex:t,targetId:n,status:!1})},r.calculateFullscreenVideoPosition=function(e){var t=e.width,n=e.height,i=y(r),o=i.designWidth,a=i.designHeight,s=Math.min(o/t,a/n);return{x:(o-t*s)/2,y:(a-n*s)/2,width:t*s,height:n*s}},r.onRequestFullscreenVideo=function(e){var t=e.texture,n=e.index,i=e.targetId;if(n===r.currentIndex){r.onRequestCancelFullscreenVideo(),r.globalVideoBackground.width=r.designWidth,r.globalVideoBackground.height=r.designHeight,r.globalVideoBackground.beginFill(0,1),r.globalVideoBackground.drawRect(0,0,r.designWidth,r.designHeight),r.globalVideoBackground.endFill(),r.globalVideoBackground.interactive=!0,r.app.stage.addChild(r.globalVideoBackground);var o=r.calculateFullscreenVideoPosition(t),a=o.x,s=o.y,u=o.width,l=o.height;r.globalVideoSprite.texture=t,r.globalVideoSprite.width=u,r.globalVideoSprite.height=l,r.globalVideoSprite.position.x=a,r.globalVideoSprite.position.y=s,r.globalVideoBackground.addChild(r.globalVideoSprite),r.globalEventHub.emit("onFullscreenChange",{status:!0,targetId:i,slideIndex:r.currentIndex}),r.clearFullscreenEventListenersWithAppView();var c={handleEvent:function(){var e;null===(e=r.currentStage)||void 0===e||e.ctx.eventHub.emit(bb.userInput)}};if(r.app.view.addEventListener("pointerdown",c,!1),r.cacheFunctionMap.set("pointerdown",c),Pg.isDesktop()){var h={handleEvent:function(){r.fullscreenOnMouseleave({index:n,targetId:i})}};r.app.view.addEventListener("mouseout",h,!1);var d={handleEvent:function(){r.globalEventHub.emit("controllerShowStatusChange",{slideIndex:n,targetId:i,status:!0})}};r.app.view.addEventListener("mouseover",d,!1);var f={handleEvent:function(){r.fullscreenOnMousemove({index:n,targetId:i})}};r.app.view.addEventListener("mousemove",f,!1),r.cacheFunctionMap.set("mouseover",d),r.cacheFunctionMap.set("mousemove",f),r.cacheFunctionMap.set("mouseout",h)}else{var p={handleEvent:function(){r.fullscreenOnMousemove({index:n,targetId:i})}};r.app.view.addEventListener("touchstart",p,!1),r.cacheFunctionMap.set("touchstart",p)}}else t.destroy(!1)},r.onRequestCancelFullscreenVideo=function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];r.globalVideoSprite.texture.destroy(!1),r.globalVideoBackground.removeChild(r.globalVideoSprite),r.app.stage.removeChild(r.globalVideoBackground),r.globalEventHub.emit("onFullscreenChange",{status:!1,slideIndex:r.currentIndex,targetId:null===(e=r.currentStage)||void 0===e?void 0:e.ctx.latestChangeFullscreenTargetId}),r.clearFullscreenEventListenersWithAppView(),n&&r.emit(bb.changeLocalFullscreenState,{status:!1,slideIndex:r.currentIndex,targetId:null===(t=r.currentStage)||void 0===t?void 0:t.ctx.latestChangeFullscreenTargetId})},r.logger=e.logger,r.tracker=e.tracker,r.mode=e.mode,r.volumeAdjuster=e.volumeAdjuster,r.localStorage=new fb(r.logger),r.cachedExtract=new vb(r.localStorage),r.config={minFPS:nu()(i.minFPS)?30:i.minFPS,maxFPS:nu()(i.maxFPS)?40:i.maxFPS,resolution:nu()(i.resolution)?1:i.resolution,autoFPS:!nu()(i.autoFPS)&&i.autoFPS,autoResolution:!nu()(i.autoResolution)&&i.autoResolution,transactionBgColor:nu()(i.transactionBgColor)?0:i.transactionBgColor,maxResolutionLevel:r.getMaxResolution(i.maxResolutionLevel),forceCanvas:!nu()(i.forceCanvas)&&i.forceCanvas,enableNvidiaDetect:!nu()(i.enableNvidiaDetect)&&i.enableNvidiaDetect},r.updateMaxResolutionLevel(r.config.maxResolutionLevel),r.loader=new vv(r.localStorage,e.useLocalCache,r.logger,r.tracker,e.resourceTimeout,e.loadDelegate,e.urlInterrupter);var o=Ol.isWebGLSupported();r.app=new Ql({antialias:!0,autoDensity:!1,backgroundColor:16777215,forceCanvas:r.config.forceCanvas||!o}),r.tracker({name:"slidePlayerCreate",result:"",reason:"",payload:{webgl:o,resolution:r.config.resolution,minFPS:r.config.minFPS,maxFPS:r.config.maxFPS,maxResolutionLevel:r.config.maxResolutionLevel,forceCanvas:r.config.forceCanvas}}),r.updateConfig(r.config),r.app.ticker.maxFPS=60,r.app.ticker.minFPS=r.config.minFPS,r.app.ticker.maxFPS=r.config.maxFPS,r.app.view.style.zIndex="1",r.app.stage.sortableChildren=!0;var a=r.app.renderer;if(a.gl){var s=a.gl.drawElements,u=a.gl.getExtension("WEBGL_debug_renderer_info"),l=a.gl.getParameter(u.UNMASKED_RENDERER_WEBGL);/nvidia/i.test(l)&&r.config.enableNvidiaDetect&&(r.isNVIDIA=!0),a.gl.drawElements=function(){for(var e=arguments.length,t=new Array(e),n=0;n=t&&r.updateResolution(i)}}else if(e>r.config.maxFPS&&r.config.autoResolution){var o=r.scale*r.config.resolution,a=r.app.renderer.resolution,s=Math.min(o,a+.1);s<=r.config.resolution&&r.updateResolution(s)}})),r.app.ticker.add((function(){r.runtime.drawCall=r.drawCall,r.runtime.fps=Math.floor(r.app.ticker.minFPS),r.drawCall=0}),null,Bl.c.LOW),r.clock=new mv(r.app.ticker),r.objPoolGroup=uv(),r.stagePool=new hb(r.loader,r.mode,r.app.renderer,r.app.ticker,r.app.view,r.clock,r.objPoolGroup,r.errorChannel,r.localStorage,r.logger,e.loadDelegate,e.urlInterrupter,r.isPlayerPaused,r.maxResolution,r.volumeAdjuster,r.config.forceCanvas,r.globalEventHub),r.app.view.addEventListener("webglcontextlost",r.onWebGLLost);try{r.config.forceCanvas||(r.transactionPlayer=new Pl)}catch(s){/Error creating WebGL context/.test(s.message)?r.errorChannel.emit("error",new rv(Jp.CanvasCrash,"webgl context lost.")):r.errorChannel.emit("error",new rv(Jp.RuntimeWarn,s.message))}return r.globalEventHub.on("requestFullscreen",r.onRequestFullscreenVideo),r.globalEventHub.on("requestCancelFullscreen",r.onRequestCancelFullscreenVideo),r}return T(n,[{key:"getMaxResolution",value:function(e){return!nu()(e)&&Number.isInteger(e)?(e<1&&(e=1),e>4&&(e=4),e):n.platform.isAndroid()||n.platform.isIOS()?2:4}},{key:"updateMaxResolutionLevel",value:function(e){e<0&&(e=0),e>4&&(e=4);var t=[640,960,1280,1920,3200][e],n=[360,540,720,1080,1800][e];this.maxResolution.set(t,n)}},{key:"updateConfig",value:function(e){nu()(e.maxFPS)||nu()(e.minFPS)||(this.config.maxFPS=e.maxFPS,this.app.ticker.maxFPS=e.maxFPS,this.config.minFPS=e.minFPS,this.app.ticker.minFPS=e.minFPS),nu()(e.resolution)||(this.config.resolution=e.resolution,this.updateResolution(this.scale*this.config.resolution)),nu()(e.autoFPS)||(this.config.autoFPS=e.autoFPS),nu()(e.autoResolution)||(this.config.autoResolution=e.autoResolution),nu()(e.transactionBgColor)||(this.config.transactionBgColor=e.transactionBgColor),this.taskId&&this.logger.info("ppt player update config: "+JSON.stringify(this.config),this.taskId),nu()(e.maxResolutionLevel)||(this.config.maxResolutionLevel=e.maxResolutionLevel,this.updateMaxResolutionLevel(this.config.maxResolutionLevel))}},{key:"preload",value:function(e){return gb(this,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.t0=e<1||e>this.slideCount,t.t0){t.next=6;break}return this.logger.info("preload slide ".concat(e," begin"),this.taskId),t.next=5,this.stagePool.preload(e);case 5:this.logger.info("preload slide ".concat(e," end"),this.taskId);case 6:case"end":return t.stop()}}),t,this)})))}},{key:"setResourceData",value:function(e,t){this.logger.info("ppt player init config: "+JSON.stringify(this.config),e),this.logger.info("set resource to "+t,e),this.taskId=e,this.url=t,this.stagePool.setResourceData(e,t),this.localStorage.attachTaskId(e),this.loader.attachTaskId(e)}},{key:"setInteractive",value:function(e){this.app.stage.interactive=e,this.app.stage.interactiveChildren=e}},{key:"translateEvent",value:function(e,t){var n=this;t.forEach((function(t){e.on(t,(function(){for(var e,r,i,o,a=arguments.length,s=new Array(a),u=0;u0&&this.view&&p&&(m=s.json.transition,!this.isForward&&(null==p?void 0:p.json.transition)&&(m=p.json.transition),g=this.getTransactionTexture(p,this.view,null,null),this.initTransactionPlayer(m),null===(n=this.transactionPlayer)||void 0===n||n.setPrevTexture(g),v=!0),this.app.stage.addChild(s.container),this.updateResolution(this.config.resolution*this.scale),p&&(p.clearOnTransactionEnd(),this.app.stage.removeChild(p.container)),!(s.json.transition&&s.json.transition.type&&this.app.stage.children.length>0&&this.view&&this.transactionPlayer&&v)){i.next=30;break}return i.next=23,this.getTransactionTexture(s,this.view,u,l);case 23:return y=i.sent,this.transactionPlayer.setNextTexture(y),i.next=27,this.transactionPlayer.play();case 27:if(b=this.transactionPlayer.renderer.domElement,this.view.parentElement&&b)try{this.view.parentElement.removeChild(b)}catch(e){}null===(r=this.transactionPlayer)||void 0===r||r.dispose();case 30:if(!this.isForward){i.next=35;break}return i.next=33,s.startTiming();case 33:i.next=36;break;case 35:s.setMainSeqApplied();case 36:s.ctx.slideScopeEventHub.emit("slide-render",s.ctx.slideIndex),this.emit(bb.renderEnd,e),this.emit(bb.slideChange,e),s.ctx.isRendering=!1,this.preload(e+1).catch((function(t){x.errorChannel.emit("error",rv.transform(t),e+1)})),this.preload(e-1).catch((function(t){x.errorChannel.emit("error",rv.transform(t),e-1)})),this.logger.info("render slide ".concat(e," done, time: ").concat(Date.now()-a,"ms"),this.taskId),this.tracker({name:"slidePageChange",reason:"",result:"",payload:{duration:Date.now()-a,from:o,to:e}});case 44:case"end":return i.stop()}}),i,this)})))}},{key:"getTransactionTexture",value:function(e,t,n,r){var i=Xl.p.create({width:e.json.width,height:e.json.height,resolution:1});this.app.renderer.render(e.container,{renderTexture:i});var o=this.cachedExtract.canvas(i,this.app.renderer,r,n);return new G(o)}},{key:"renderToBase64",value:function(e,t,n){return gb(this,void 0,void 0,regeneratorRuntime.mark((function r(){var i,o,a,s,u,l;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.stagePool.getStage(e);case 2:if(!(i=r.sent)){r.next=10;break}return o=i.json,a=o.width,s=o.height,this.designWidth=a,this.designHeight=s,u=Xl.p.create({width:this.designWidth,height:this.designHeight,resolution:t}),i.container.visible=!0,this.app.renderer.render(i.container,{renderTexture:u}),l=this.app.renderer.plugins.extract.base64(u,n),r.abrupt("return",(this.stagePool.destroyStageByIndex(e),l));case 10:return r.abrupt("return","__null__");case 11:case"end":return r.stop()}}),r,this)})))}},{key:"renderMainSeqToBase64",value:function(e,t,n){return gb(this,void 0,void 0,regeneratorRuntime.mark((function r(){var i,o,a,s,u,l,c,h,d,f;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return i=[],r.next=3,this.stagePool.getStage(e);case 3:if((o=r.sent).createTiming(),o)for(a=o.json,s=a.width,u=a.height,this.designWidth=s,this.designHeight=u,l=Xl.p.create({width:this.designWidth,height:this.designHeight,resolution:t}),o.container.visible=!0,c=o.mainSeqLength(),o.setMainSeqStep(0,"start"),this.app.renderer.render(o.container,{renderTexture:l}),h=this.app.renderer.plugins.extract.base64(l,n),i.push(h),d=0;dn.maxResolution.x||r*n.designHeight>n.maxResolution.y;)r-=.1;n.app.renderer.resolution=r,n.app.renderer.plugins.interaction.resolution=n.app.renderer.resolution,n.app.renderer.resize(n.designWidth,n.designHeight),eu()(t)&&t()}))}},{key:"nextStep",value:function(e,t){var n;if(this._isPaused)this.logger.info("ppt play prevent next step with paused state",this.taskId);else{this.logger.info("ppt play trigger next step",this.taskId);try{this.onRequestCancelFullscreenVideo(!0),null===(n=this.currentStage)||void 0===n||n.nextStep(e,t)}catch(e){this.errorChannel.emit("error",rv.transform(e),this.currentIndex)}}}},{key:"prevStep",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this._isPaused)this.logger.info("ppt play prevent prev step with paused state",this.taskId);else{this.logger.info("ppt play trigger prev step",this.taskId);try{this.onRequestCancelFullscreenVideo(!0),null===(e=this.currentStage)||void 0===e||e.prevStep(t)}catch(e){this.errorChannel.emit("error",rv.transform(e),this.currentIndex)}}}},{key:"mainSeqLength",value:function(){var e,t;return null!==(t=null===(e=this.currentStage)||void 0===e?void 0:e.mainSeqLength())&&void 0!==t?t:0}},{key:"mainSeqStep",value:function(){var e,t;return null!==(t=null===(e=this.currentStage)||void 0===e?void 0:e.mainSeqStep())&&void 0!==t?t:0}},{key:"setMainSeqStep",value:function(e,t){var n;null===(n=this.currentStage)||void 0===n||n.setMainSeqStep(e,t)}},{key:"mainSeqState",value:function(){var e,t;return null!==(t=null===(e=this.currentStage)||void 0===e?void 0:e.mainSeqState())&&void 0!==t?t:null}},{key:"mainSeqHasNextStep",value:function(){var e,t;return null!==(t=null===(e=this.currentStage)||void 0===e?void 0:e.mainSeqHasNextStep())&&void 0!==t&&t}},{key:"mainSeqHasPrevStep",value:function(){var e,t;return null!==(t=null===(e=this.currentStage)||void 0===e?void 0:e.mainSeqHasPrevStep())&&void 0!==t&&t}},{key:"nextTick",value:function(e){this.app.ticker.addOnce((function(){e()}),Bl.c.LOW)}},{key:"applyInteractiveAction",value:function(e){var t;null===(t=this.currentStage)||void 0===t||t.applyInteractiveAction(e)}},{key:"seekInteractiveSeqToEnd",value:function(e){var t;null===(t=this.currentStage)||void 0===t||t.seekInteractiveSeqToEnd(e)}},{key:"setInteractiveSeqState",value:function(e,t,n){var r;null===(r=this.currentStage)||void 0===r||r.setInteractiveSeqState(e,t,n)}},{key:"setMediaState",value:function(e,t,n){var r;return gb(this,void 0,void 0,regeneratorRuntime.mark((function i(){return regeneratorRuntime.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,null===(r=this.currentStage)||void 0===r?void 0:r.setMediaState(e,t,n);case 2:case"end":return i.stop()}}),i,this)})))}},{key:"setMediaCurrentTime",value:function(e,t){var n;null===(n=this.currentStage)||void 0===n||n.setMediaCurrentTime(e,t)}},{key:"pause",value:function(){var e;this.app.ticker.stop(),null===(e=this.currentStage)||void 0===e||e.ctx.activeMedia.forEach((function(e){e.globalPause()})),this._isPaused=!0}},{key:"resume",value:function(){var e;this._isPaused=!1,this.app.ticker.start(),null===(e=this.currentStage)||void 0===e||e.ctx.activeMedia.forEach((function(e){e.globalResume()}))}},{key:"getSnapshot",value:function(){return this.currentStage&&this.getBase64(this.currentStage)||""}},{key:"clearLocalCache",value:function(){this.localStorage.dispose()}},{key:"clearFullscreenEventListenersWithAppView",value:function(){var e=this;["mousemove","mouseout","mouseover","touchstart","pointerdown"].forEach((function(t){e.cacheFunctionMap.has(t)&&(e.app.view.removeEventListener(t,e.cacheFunctionMap.get(t),!1),e.cacheFunctionMap.delete(t))}))}},{key:"syncFullscreenVideoState",value:function(e){this.globalEventHub.emit("syncFullscreenVideoState",e)}},{key:"destroy",value:function(){var e,t;try{this.app.view.removeEventListener("webglcontextlost",this.onWebGLLost),this.app.renderer.filter.texturePool.clear(!0),Av.collectObjectByGroup(this.objPoolGroup),Iv.collectObjectByGroup(this.objPoolGroup),null===(e=this.transactionPlayer)||void 0===e||e.destroy(),this.loader.destroy(),this.fps.destroy(),this.stagePool.destroyAllStage(),this.stagePool.destroy(),this.app.renderer.gl.getExtension("WEBGL_lose_context").loseContext(),this.app.destroy(!0,{children:!0,texture:!0,baseTexture:!0}),null===(t=lb.worker)||void 0===t||t.terminate(),this.tracker({name:"slidePlayerDestroy",result:"",reason:"",payload:{}})}catch(e){}}},{key:"view",get:function(){return this.app.renderer?this.app.view:null}},{key:"nextSlideIndex",get:function(){var e;return(null===(e=this.currentStage)||void 0===e?void 0:e.json.nextIndex)?this.currentStage.json.nextIndex:this.currentIndex+1}},{key:"prevSlideIndex",get:function(){var e;return(null===(e=this.currentStage)||void 0===e?void 0:e.json.prevIndex)?this.currentStage.json.prevIndex:this.currentIndex-1}}],[{key:"clearLocalCache",value:function(){var e;null===(e=fb.localCache)||void 0===e||e.clear().catch((function(){}))}}]),n}(Ks.a);xb.platform=Pg,xb.RtcAudioClazz=null;var _b,wb=new Map,Tb=n(136),Mb=n.n(Tb),Sb=n(49),Eb=n.n(Sb),Ab=n(50),Ib=n.n(Ab),Cb=[],Nb="ResizeObserver loop completed with undelivered notifications.";!function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(_b||(_b={}));var kb,Db=function(e){return Object.freeze(e)},Pb=function(e,t){this.inlineSize=e,this.blockSize=t,Db(this)},Ob=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Db(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),Rb=function(e){return e instanceof SVGElement&&"getBBox"in e},Lb=function(e){if(Rb(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,o=i.offsetWidth,a=i.offsetHeight;return!(o||a||e.getClientRects().length)},jb=function(e){var t;if(e instanceof Element)return!0;var n=null===(t=null==e?void 0:e.ownerDocument)||void 0===t?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},Bb="undefined"!=typeof window?window:{},Ub=new WeakMap,zb=/auto|scroll/,Fb=/^tb|vertical/,Gb=/msie|trident/i.test(Bb.navigator&&Bb.navigator.userAgent),Hb=function(e){return parseFloat(e||"0")},Vb=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new Pb((n?t:e)||0,(n?e:t)||0)},Wb=Db({devicePixelContentBoxSize:Vb(),borderBoxSize:Vb(),contentBoxSize:Vb(),contentRect:new Ob(0,0,0,0)}),Yb=function(e,t){if(void 0===t&&(t=!1),Ub.has(e)&&!t)return Ub.get(e);if(Lb(e))return Ub.set(e,Wb),Wb;var n=getComputedStyle(e),r=Rb(e)&&e.ownerSVGElement&&e.getBBox(),i=!Gb&&"border-box"===n.boxSizing,o=Fb.test(n.writingMode||""),a=!r&&zb.test(n.overflowY||""),s=!r&&zb.test(n.overflowX||""),u=r?0:Hb(n.paddingTop),l=r?0:Hb(n.paddingRight),c=r?0:Hb(n.paddingBottom),h=r?0:Hb(n.paddingLeft),d=r?0:Hb(n.borderTopWidth),f=r?0:Hb(n.borderRightWidth),p=r?0:Hb(n.borderBottomWidth),v=h+l,m=u+c,g=(r?0:Hb(n.borderLeftWidth))+f,y=d+p,b=s?e.offsetHeight-y-e.clientHeight:0,x=a?e.offsetWidth-g-e.clientWidth:0,_=i?v+g:0,w=i?m+y:0,T=r?r.width:Hb(n.width)-_-x,M=r?r.height:Hb(n.height)-w-b,S=T+v+x+g,E=M+m+b+y,A=Db({devicePixelContentBoxSize:Vb(Math.round(T*devicePixelRatio),Math.round(M*devicePixelRatio),o),borderBoxSize:Vb(S,E,o),contentBoxSize:Vb(T,M,o),contentRect:new Ob(h,u,T,M)});return Ub.set(e,A),A},Xb=function(e,t,n){var r=Yb(e,n),i=r.borderBoxSize,o=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case _b.DEVICE_PIXEL_CONTENT_BOX:return a;case _b.BORDER_BOX:return i;default:return o}},Qb=function(e){var t=Yb(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=Db([t.borderBoxSize]),this.contentBoxSize=Db([t.contentBoxSize]),this.devicePixelContentBoxSize=Db([t.devicePixelContentBoxSize])},Zb=function(e){if(Lb(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},qb=function(){var e=1/0,t=[];Cb.forEach((function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach((function(t){var n=new Qb(t.target),i=Zb(t.target);r.push(n),t.lastReportedSize=Xb(t.target,t.observedBox),ie?t.activeTargets.push(n):t.skippedTargets.push(n))}))}))},Kb=[],$b=0,ex={attributes:!0,characterData:!0,childList:!0,subtree:!0},tx=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],nx=function(e){return void 0===e&&(e=0),Date.now()+e},rx=!1,ix=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!rx){rx=!0;var n,r=nx(e);n=function(){var n=!1;try{n=function(){var e,t=0;for(Jb(t);Cb.some((function(e){return e.activeTargets.length>0}));)t=qb(),Jb(t);return Cb.some((function(e){return e.skippedTargets.length>0}))&&("function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:Nb}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=Nb),window.dispatchEvent(e)),t>0}()}finally{if(rx=!1,e=r-nx(),!$b)return;n?t.run(1e3):e>0?t.run(e):t.start()}},function(e){if(!kb){var t=0,n=document.createTextNode("");new MutationObserver((function(){return Kb.splice(0).forEach((function(e){return e()}))})).observe(n,{characterData:!0}),kb=function(){n.textContent="".concat(t?t--:t++)}}Kb.push(e),kb()}((function(){requestAnimationFrame(n)}))}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,ex)};document.body?t():Bb.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),tx.forEach((function(t){return Bb.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),tx.forEach((function(t){return Bb.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}()),ox=function(e){!$b&&e>0&&ix.start(),!($b+=e)&&ix.stop()},ax=function(){function e(e,t){this.target=e,this.observedBox=t||_b.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e,t=Xb(this.target,this.observedBox,!0);return e=this.target,Rb(e)||function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(e)||"inline"!==getComputedStyle(e).display||(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),sx=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},ux=new WeakMap,lx=function(e,t){for(var n=0;n=0&&(i&&Cb.splice(Cb.indexOf(n),1),n.observationTargets.splice(r,1),ox(-1))},e.disconnect=function(e){var t=this,n=ux.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},e}(),hx=function(){function e(e){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof e)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");cx.connect(this,e)}return e.prototype.observe=function(e,t){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!jb(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");cx.observe(this,e,t)},e.prototype.unobserve=function(e){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!jb(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");cx.unobserve(this,e)},e.prototype.disconnect=function(){cx.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}(),dx=function(){function e(e,t,n,r,i){this.state="idle",this.index=-1,this.slideIndex=-1,this.fn=n,this.index=e,this.slideIndex=t,this.eventHub=r,this.id=i}return e.prototype.apply=function(){return function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}(this,void 0,void 0,(function(){var e;return function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=0&&(null===(n=e.tasks[i])||void 0===n||n.apply()),r>=0&&(e.tasks.splice(r,1),e.replaceIdleTask()),e.eventHub.emit("task-end-"+t.id)})),this.eventHub.on("task-error",(function(t){var n=t.task,r=e.tasks.findIndex((function(e){return e.index===n.index}));r>=0&&(e.tasks.splice(r,1),e.replaceIdleTask())}))}return e.prototype.replaceIdleTask=function(){for(var e,t=this,n=new Set,r=0,i=this.tasks.length;r=0;n--)t=[e[n].apply(this,t)];return t[0]}},each:function(e,t,n){if(e)if(vx&&e.forEach&&e.forEach===vx)e.forEach(t,n);else if(e.length===e.length+0){var r,i=void 0;for(i=0,r=e.length;i1?gx.toArray(arguments):arguments[0];return gx.each(yx,(function(t){if(t.litmus(e))return gx.each(t.conversions,(function(t,n){if(bx=t.read(e),!1===xx&&!1!==bx)return xx=bx,bx.conversionName=n,bx.conversion=t,gx.BREAK})),gx.BREAK})),xx},wx=void 0,Tx={hsv_to_rgb:function(e,t,n){var r=Math.floor(e/60)%6,i=e/60-Math.floor(e/60),o=n*(1-t),a=n*(1-i*t),s=n*(1-(1-i)*t),u=[[n,s,o],[a,n,o],[o,n,s],[o,a,n],[s,o,n],[n,o,a]][r];return{r:255*u[0],g:255*u[1],b:255*u[2]}},rgb_to_hsv:function(e,t,n){var r=Math.min(e,t,n),i=Math.max(e,t,n),o=i-r,a=void 0;return 0===i?{h:NaN,s:0,v:0}:(a=e===i?(t-n)/o:t===i?2+(n-e)/o:4+(e-t)/o,(a/=6)<0&&(a+=1),{h:360*a,s:o/i,v:i/255})},rgb_to_hex:function(e,t,n){var r=this.hex_with_component(0,2,e);return r=this.hex_with_component(r,1,t),this.hex_with_component(r,0,n)},component_from_hex:function(e,t){return e>>8*t&255},hex_with_component:function(e,t,n){return n<<(wx=8*t)|e&~(255<-1?t.length-t.indexOf(".")-1:0}var Gx=function(e){function t(e,n,r){Sx(this,t);var i=Cx(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n)),o=r||{};return i.__min=o.min,i.__max=o.max,i.__step=o.step,gx.isUndefined(i.__step)?0===i.initialValue?i.__impliedStep=1:i.__impliedStep=Math.pow(10,Math.floor(Math.log(Math.abs(i.initialValue))/Math.LN10))/10:i.__impliedStep=i.__step,i.__precision=Fx(i.__impliedStep),i}return Ix(t,e),Ex(t,[{key:"setValue",value:function(e){var n=e;return void 0!==this.__min&&nthis.__max&&(n=this.__max),void 0!==this.__step&&n%this.__step!=0&&(n=Math.round(n/this.__step)*this.__step),Ax(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setValue",this).call(this,n)}},{key:"min",value:function(e){return this.__min=e,this}},{key:"max",value:function(e){return this.__max=e,this}},{key:"step",value:function(e){return this.__step=e,this.__impliedStep=e,this.__precision=Fx(e),this}}]),t}(Px),Hx=function(e){function t(e,n,r){Sx(this,t);var i=Cx(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,r));i.__truncationSuspended=!1;var o=i,a=void 0;function s(){o.__onFinishChange&&o.__onFinishChange.call(o,o.getValue())}function u(e){var t=a-e.clientY;o.setValue(o.getValue()+t*o.__impliedStep),a=e.clientY}function l(){jx.unbind(window,"mousemove",u),jx.unbind(window,"mouseup",l),s()}return i.__input=document.createElement("input"),i.__input.setAttribute("type","text"),jx.bind(i.__input,"change",(function(){var e=parseFloat(o.__input.value);gx.isNaN(e)||o.setValue(e)})),jx.bind(i.__input,"blur",(function(){s()})),jx.bind(i.__input,"mousedown",(function(e){jx.bind(window,"mousemove",u),jx.bind(window,"mouseup",l),a=e.clientY})),jx.bind(i.__input,"keydown",(function(e){13===e.keyCode&&(o.__truncationSuspended=!0,this.blur(),o.__truncationSuspended=!1,s())})),i.updateDisplay(),i.domElement.appendChild(i.__input),i}return Ix(t,e),Ex(t,[{key:"updateDisplay",value:function(){var e,n,r;return this.__input.value=this.__truncationSuspended?this.getValue():(e=this.getValue(),n=this.__precision,r=Math.pow(10,n),Math.round(e*r)/r),Ax(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updateDisplay",this).call(this)}}]),t}(Gx);function Vx(e,t,n,r,i){return r+(e-t)/(n-t)*(i-r)}var Wx=function(e){function t(e,n,r,i,o){Sx(this,t);var a=Cx(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,{min:r,max:i,step:o})),s=a;function u(e){e.preventDefault();var t=s.__background.getBoundingClientRect();return s.setValue(Vx(e.clientX,t.left,t.right,s.__min,s.__max)),!1}function l(){jx.unbind(window,"mousemove",u),jx.unbind(window,"mouseup",l),s.__onFinishChange&&s.__onFinishChange.call(s,s.getValue())}function c(e){var t=e.touches[0].clientX,n=s.__background.getBoundingClientRect();s.setValue(Vx(t,n.left,n.right,s.__min,s.__max))}function h(){jx.unbind(window,"touchmove",c),jx.unbind(window,"touchend",h),s.__onFinishChange&&s.__onFinishChange.call(s,s.getValue())}return a.__background=document.createElement("div"),a.__foreground=document.createElement("div"),jx.bind(a.__background,"mousedown",(function(e){document.activeElement.blur(),jx.bind(window,"mousemove",u),jx.bind(window,"mouseup",l),u(e)})),jx.bind(a.__background,"touchstart",(function(e){1===e.touches.length&&(jx.bind(window,"touchmove",c),jx.bind(window,"touchend",h),c(e))})),jx.addClass(a.__background,"slider"),jx.addClass(a.__foreground,"slider-fg"),a.updateDisplay(),a.__background.appendChild(a.__foreground),a.domElement.appendChild(a.__background),a}return Ix(t,e),Ex(t,[{key:"updateDisplay",value:function(){var e=(this.getValue()-this.__min)/(this.__max-this.__min);return this.__foreground.style.width=100*e+"%",Ax(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updateDisplay",this).call(this)}}]),t}(Gx),Yx=function(e){function t(e,n,r){Sx(this,t);var i=Cx(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n)),o=i;return i.__button=document.createElement("div"),i.__button.innerHTML=void 0===r?"Fire":r,jx.bind(i.__button,"click",(function(e){return e.preventDefault(),o.fire(),!1})),jx.addClass(i.__button,"button"),i.domElement.appendChild(i.__button),i}return Ix(t,e),Ex(t,[{key:"fire",value:function(){this.__onChange&&this.__onChange.call(this),this.getValue().call(this.object),this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue())}}]),t}(Px),Xx=function(e){function t(e,n){Sx(this,t);var r=Cx(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));r.__color=new Nx(r.getValue()),r.__temp=new Nx(0);var i=r;r.domElement=document.createElement("div"),jx.makeSelectable(r.domElement,!1),r.__selector=document.createElement("div"),r.__selector.className="selector",r.__saturation_field=document.createElement("div"),r.__saturation_field.className="saturation-field",r.__field_knob=document.createElement("div"),r.__field_knob.className="field-knob",r.__field_knob_border="2px solid ",r.__hue_knob=document.createElement("div"),r.__hue_knob.className="hue-knob",r.__hue_field=document.createElement("div"),r.__hue_field.className="hue-field",r.__input=document.createElement("input"),r.__input.type="text",r.__input_textShadow="0 1px 1px ",jx.bind(r.__input,"keydown",(function(e){13===e.keyCode&&h.call(this)})),jx.bind(r.__input,"blur",h),jx.bind(r.__selector,"mousedown",(function(){jx.addClass(this,"drag").bind(window,"mouseup",(function(){jx.removeClass(i.__selector,"drag")}))})),jx.bind(r.__selector,"touchstart",(function(){jx.addClass(this,"drag").bind(window,"touchend",(function(){jx.removeClass(i.__selector,"drag")}))}));var o,a=document.createElement("div");function s(e){f(e),jx.bind(window,"mousemove",f),jx.bind(window,"touchmove",f),jx.bind(window,"mouseup",l),jx.bind(window,"touchend",l)}function u(e){p(e),jx.bind(window,"mousemove",p),jx.bind(window,"touchmove",p),jx.bind(window,"mouseup",c),jx.bind(window,"touchend",c)}function l(){jx.unbind(window,"mousemove",f),jx.unbind(window,"touchmove",f),jx.unbind(window,"mouseup",l),jx.unbind(window,"touchend",l),d()}function c(){jx.unbind(window,"mousemove",p),jx.unbind(window,"touchmove",p),jx.unbind(window,"mouseup",c),jx.unbind(window,"touchend",c),d()}function h(){var e=_x(this.value);!1!==e?(i.__color.__state=e,i.setValue(i.__color.toOriginal())):this.value=i.__color.toString()}function d(){i.__onFinishChange&&i.__onFinishChange.call(i,i.__color.toOriginal())}function f(e){-1===e.type.indexOf("touch")&&e.preventDefault();var t=i.__saturation_field.getBoundingClientRect(),n=e.touches&&e.touches[0]||e,r=n.clientX,o=n.clientY,a=(r-t.left)/(t.right-t.left),s=1-(o-t.top)/(t.bottom-t.top);return s>1?s=1:s<0&&(s=0),a>1?a=1:a<0&&(a=0),i.__color.v=s,i.__color.s=a,i.setValue(i.__color.toOriginal()),!1}function p(e){-1===e.type.indexOf("touch")&&e.preventDefault();var t=i.__hue_field.getBoundingClientRect(),n=1-((e.touches&&e.touches[0]||e).clientY-t.top)/(t.bottom-t.top);return n>1?n=1:n<0&&(n=0),i.__color.h=360*n,i.setValue(i.__color.toOriginal()),!1}return gx.extend(r.__selector.style,{width:"122px",height:"102px",padding:"3px",backgroundColor:"#222",boxShadow:"0px 1px 3px rgba(0,0,0,0.3)"}),gx.extend(r.__field_knob.style,{position:"absolute",width:"12px",height:"12px",border:r.__field_knob_border+(r.__color.v<.5?"#fff":"#000"),boxShadow:"0px 1px 3px rgba(0,0,0,0.5)",borderRadius:"12px",zIndex:1}),gx.extend(r.__hue_knob.style,{position:"absolute",width:"15px",height:"2px",borderRight:"4px solid #fff",zIndex:1}),gx.extend(r.__saturation_field.style,{width:"100px",height:"100px",border:"1px solid #555",marginRight:"3px",display:"inline-block",cursor:"pointer"}),gx.extend(a.style,{width:"100%",height:"100%",background:"none"}),Zx(a,"top","rgba(0,0,0,0)","#000"),gx.extend(r.__hue_field.style,{width:"15px",height:"100px",border:"1px solid #555",cursor:"ns-resize",position:"absolute",top:"3px",right:"3px"}),(o=r.__hue_field).style.background="",o.style.cssText+="background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);",o.style.cssText+="background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",o.style.cssText+="background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",o.style.cssText+="background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",o.style.cssText+="background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",gx.extend(r.__input.style,{outline:"none",textAlign:"center",color:"#fff",border:0,fontWeight:"bold",textShadow:r.__input_textShadow+"rgba(0,0,0,0.7)"}),jx.bind(r.__saturation_field,"mousedown",s),jx.bind(r.__saturation_field,"touchstart",s),jx.bind(r.__field_knob,"mousedown",s),jx.bind(r.__field_knob,"touchstart",s),jx.bind(r.__hue_field,"mousedown",u),jx.bind(r.__hue_field,"touchstart",u),r.__saturation_field.appendChild(a),r.__selector.appendChild(r.__field_knob),r.__selector.appendChild(r.__saturation_field),r.__selector.appendChild(r.__hue_field),r.__hue_field.appendChild(r.__hue_knob),r.domElement.appendChild(r.__input),r.domElement.appendChild(r.__selector),r.updateDisplay(),r}return Ix(t,e),Ex(t,[{key:"updateDisplay",value:function(){var e=_x(this.getValue());if(!1!==e){var t=!1;gx.each(Nx.COMPONENTS,(function(n){if(!gx.isUndefined(e[n])&&!gx.isUndefined(this.__color.__state[n])&&e[n]!==this.__color.__state[n])return t=!0,{}}),this),t&&gx.extend(this.__color.__state,e)}gx.extend(this.__temp.__state,this.__color.__state),this.__temp.a=1;var n=this.__color.v<.5||this.__color.s>.5?255:0,r=255-n;gx.extend(this.__field_knob.style,{marginLeft:100*this.__color.s-7+"px",marginTop:100*(1-this.__color.v)-7+"px",backgroundColor:this.__temp.toHexString(),border:this.__field_knob_border+"rgb("+n+","+n+","+n+")"}),this.__hue_knob.style.marginTop=100*(1-this.__color.h/360)+"px",this.__temp.s=1,this.__temp.v=1,Zx(this.__saturation_field,"left","#fff",this.__temp.toHexString()),this.__input.value=this.__color.toString(),gx.extend(this.__input.style,{backgroundColor:this.__color.toHexString(),color:"rgb("+n+","+n+","+n+")",textShadow:this.__input_textShadow+"rgba("+r+","+r+","+r+",.7)"})}}]),t}(Px),Qx=["-moz-","-o-","-webkit-","-ms-",""];function Zx(e,t,n,r){e.style.background="",gx.each(Qx,(function(i){e.style.cssText+="background: "+i+"linear-gradient("+t+", "+n+" 0%, "+r+" 100%); "}))}var qx='
\n\n Here\'s the new load parameter for your GUI\'s constructor:\n\n \n\n
\n\n Automatically save\n values to localStorage on exit.\n\n
The values saved to localStorage will\n override those passed to dat.GUI\'s constructor. This makes it\n easier to work incrementally, but localStorage is fragile,\n and your friends may not see the same values you do.\n\n
\n\n
\n\n
',Jx=function(e,t){var n=e[t];return gx.isArray(arguments[2])||gx.isObject(arguments[2])?new Ux(e,t,arguments[2]):gx.isNumber(n)?gx.isNumber(arguments[2])&&gx.isNumber(arguments[3])?gx.isNumber(arguments[4])?new Wx(e,t,arguments[2],arguments[3],arguments[4]):new Wx(e,t,arguments[2],arguments[3]):gx.isNumber(arguments[4])?new Hx(e,t,{min:arguments[2],max:arguments[3],step:arguments[4]}):new Hx(e,t,{min:arguments[2],max:arguments[3]}):gx.isString(n)?new zx(e,t):gx.isFunction(n)?new Yx(e,t,""):gx.isBoolean(n)?new Bx(e,t):null},Kx=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){setTimeout(e,1e3/60)},$x=function(){function e(){Sx(this,e),this.backgroundElement=document.createElement("div"),gx.extend(this.backgroundElement.style,{backgroundColor:"rgba(0,0,0,0.8)",top:0,left:0,display:"none",zIndex:"1000",opacity:0,WebkitTransition:"opacity 0.2s linear",transition:"opacity 0.2s linear"}),jx.makeFullscreen(this.backgroundElement),this.backgroundElement.style.position="fixed",this.domElement=document.createElement("div"),gx.extend(this.domElement.style,{position:"fixed",display:"none",zIndex:"1001",opacity:0,WebkitTransition:"-webkit-transform 0.2s ease-out, opacity 0.2s linear",transition:"transform 0.2s ease-out, opacity 0.2s linear"}),document.body.appendChild(this.backgroundElement),document.body.appendChild(this.domElement);var t=this;jx.bind(this.backgroundElement,"click",(function(){t.hide()}))}return Ex(e,[{key:"show",value:function(){var e=this;this.backgroundElement.style.display="block",this.domElement.style.display="block",this.domElement.style.opacity=0,this.domElement.style.webkitTransform="scale(1.1)",this.layout(),gx.defer((function(){e.backgroundElement.style.opacity=1,e.domElement.style.opacity=1,e.domElement.style.webkitTransform="scale(1)"}))}},{key:"hide",value:function(){var e=this,t=function t(){e.domElement.style.display="none",e.backgroundElement.style.display="none",jx.unbind(e.domElement,"webkitTransitionEnd",t),jx.unbind(e.domElement,"transitionend",t),jx.unbind(e.domElement,"oTransitionEnd",t)};jx.bind(this.domElement,"webkitTransitionEnd",t),jx.bind(this.domElement,"transitionend",t),jx.bind(this.domElement,"oTransitionEnd",t),this.backgroundElement.style.opacity=0,this.domElement.style.opacity=0,this.domElement.style.webkitTransform="scale(1.1)"}},{key:"layout",value:function(){this.domElement.style.left=window.innerWidth/2-jx.getWidth(this.domElement)/2+"px",this.domElement.style.top=window.innerHeight/2-jx.getHeight(this.domElement)/2+"px"}}]),e}();!function(e,t){var n=t||document,r=document.createElement("style");r.type="text/css",r.innerHTML=e;var i=n.getElementsByTagName("head")[0];try{i.appendChild(r)}catch(e){}}(function(e){if("undefined"!=typeof window){var t=document.createElement("style");return t.setAttribute("type","text/css"),t.innerHTML=e,document.head.appendChild(t),e}}(".dg ul{list-style:none;margin:0;padding:0;width:100%;clear:both}.dg.ac{position:fixed;top:0;left:0;right:0;height:0;z-index:0}.dg:not(.ac) .main{overflow:hidden}.dg.main{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear}.dg.main.taller-than-window{overflow-y:auto}.dg.main.taller-than-window .close-button{opacity:1;margin-top:-1px;border-top:1px solid #2c2c2c}.dg.main ul.closed .close-button{opacity:1 !important}.dg.main:hover .close-button,.dg.main .close-button.drag{opacity:1}.dg.main .close-button{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear;border:0;line-height:19px;height:20px;cursor:pointer;text-align:center;background-color:#000}.dg.main .close-button.close-top{position:relative}.dg.main .close-button.close-bottom{position:absolute}.dg.main .close-button:hover{background-color:#111}.dg.a{float:right;margin-right:15px;overflow-y:visible}.dg.a.has-save>ul.close-top{margin-top:0}.dg.a.has-save>ul.close-bottom{margin-top:27px}.dg.a.has-save>ul.closed{margin-top:0}.dg.a .save-row{top:0;z-index:1002}.dg.a .save-row.close-top{position:relative}.dg.a .save-row.close-bottom{position:fixed}.dg li{-webkit-transition:height .1s ease-out;-o-transition:height .1s ease-out;-moz-transition:height .1s ease-out;transition:height .1s ease-out;-webkit-transition:overflow .1s linear;-o-transition:overflow .1s linear;-moz-transition:overflow .1s linear;transition:overflow .1s linear}.dg li:not(.folder){cursor:auto;height:27px;line-height:27px;padding:0 4px 0 5px}.dg li.folder{padding:0;border-left:4px solid rgba(0,0,0,0)}.dg li.title{cursor:pointer;margin-left:-4px}.dg .closed li:not(.title),.dg .closed ul li,.dg .closed ul li>*{height:0;overflow:hidden;border:0}.dg .cr{clear:both;padding-left:3px;height:27px;overflow:hidden}.dg .property-name{cursor:default;float:left;clear:left;width:40%;overflow:hidden;text-overflow:ellipsis}.dg .cr.function .property-name{width:100%}.dg .c{float:left;width:60%;position:relative}.dg .c input[type=text]{border:0;margin-top:4px;padding:3px;width:100%;float:right}.dg .has-slider input[type=text]{width:30%;margin-left:0}.dg .slider{float:left;width:66%;margin-left:-5px;margin-right:0;height:19px;margin-top:4px}.dg .slider-fg{height:100%}.dg .c input[type=checkbox]{margin-top:7px}.dg .c select{margin-top:5px}.dg .cr.function,.dg .cr.function .property-name,.dg .cr.function *,.dg .cr.boolean,.dg .cr.boolean *{cursor:pointer}.dg .cr.color{overflow:visible}.dg .selector{display:none;position:absolute;margin-left:-9px;margin-top:23px;z-index:10}.dg .c:hover .selector,.dg .selector.drag{display:block}.dg li.save-row{padding:0}.dg li.save-row .button{display:inline-block;padding:0px 6px}.dg.dialogue{background-color:#222;width:460px;padding:15px;font-size:13px;line-height:15px}#dg-new-constructor{padding:10px;color:#222;font-family:Monaco, monospace;font-size:10px;border:0;resize:none;box-shadow:inset 1px 1px 1px #888;word-wrap:break-word;margin:12px 0;display:block;width:440px;overflow-y:scroll;height:100px;position:relative}#dg-local-explain{display:none;font-size:11px;line-height:17px;border-radius:3px;background-color:#333;padding:8px;margin-top:10px}#dg-local-explain code{font-size:10px}#dat-gui-save-locally{display:none}.dg{color:#eee;font:11px 'Lucida Grande', sans-serif;text-shadow:0 -1px 0 #111}.dg.main::-webkit-scrollbar{width:5px;background:#1a1a1a}.dg.main::-webkit-scrollbar-corner{height:0;display:none}.dg.main::-webkit-scrollbar-thumb{border-radius:5px;background:#676767}.dg li:not(.folder){background:#1a1a1a;border-bottom:1px solid #2c2c2c}.dg li.save-row{line-height:25px;background:#dad5cb;border:0}.dg li.save-row select{margin-left:5px;width:108px}.dg li.save-row .button{margin-left:5px;margin-top:1px;border-radius:2px;font-size:9px;line-height:7px;padding:4px 4px 5px 4px;background:#c5bdad;color:#fff;text-shadow:0 1px 0 #b0a58f;box-shadow:0 -1px 0 #b0a58f;cursor:pointer}.dg li.save-row .button.gears{background:#c5bdad url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAANCAYAAAB/9ZQ7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQJJREFUeNpiYKAU/P//PwGIC/ApCABiBSAW+I8AClAcgKxQ4T9hoMAEUrxx2QSGN6+egDX+/vWT4e7N82AMYoPAx/evwWoYoSYbACX2s7KxCxzcsezDh3evFoDEBYTEEqycggWAzA9AuUSQQgeYPa9fPv6/YWm/Acx5IPb7ty/fw+QZblw67vDs8R0YHyQhgObx+yAJkBqmG5dPPDh1aPOGR/eugW0G4vlIoTIfyFcA+QekhhHJhPdQxbiAIguMBTQZrPD7108M6roWYDFQiIAAv6Aow/1bFwXgis+f2LUAynwoIaNcz8XNx3Dl7MEJUDGQpx9gtQ8YCueB+D26OECAAQDadt7e46D42QAAAABJRU5ErkJggg==) 2px 1px no-repeat;height:7px;width:8px}.dg li.save-row .button:hover{background-color:#bab19e;box-shadow:0 -1px 0 #b0a58f}.dg li.folder{border-bottom:0}.dg li.title{padding-left:16px;background:#000 url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlI+hKgFxoCgAOw==) 6px 10px no-repeat;cursor:pointer;border-bottom:1px solid rgba(255,255,255,0.2)}.dg .closed li.title{background-image:url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlGIWqMCbWAEAOw==)}.dg .cr.boolean{border-left:3px solid #806787}.dg .cr.color{border-left:3px solid}.dg .cr.function{border-left:3px solid #e61d5f}.dg .cr.number{border-left:3px solid #2FA1D6}.dg .cr.number input[type=text]{color:#2FA1D6}.dg .cr.string{border-left:3px solid #1ed36f}.dg .cr.string input[type=text]{color:#1ed36f}.dg .cr.function:hover,.dg .cr.boolean:hover{background:#111}.dg .c input[type=text]{background:#303030;outline:none}.dg .c input[type=text]:hover{background:#3c3c3c}.dg .c input[type=text]:focus{background:#494949;color:#fff}.dg .c .slider{background:#303030;cursor:ew-resize}.dg .c .slider-fg{background:#2FA1D6;max-width:100%}.dg .c .slider:hover{background:#3c3c3c}.dg .c .slider:hover .slider-fg{background:#44abda}\n"));var e_=function(){try{return!!window.localStorage}catch(e){return!1}}(),t_=void 0,n_=!0,r_=void 0,i_=!1,o_=[],a_=function e(t){var n=this,r=t||{};this.domElement=document.createElement("div"),this.__ul=document.createElement("ul"),this.domElement.appendChild(this.__ul),jx.addClass(this.domElement,"dg"),this.__folders={},this.__controllers=[],this.__rememberedObjects=[],this.__rememberedObjectIndecesToControllers=[],this.__listening=[],r=gx.defaults(r,{closeOnTop:!1,autoPlace:!0,width:e.DEFAULT_WIDTH}),r=gx.defaults(r,{resizable:r.autoPlace,hideable:r.autoPlace}),gx.isUndefined(r.load)?r.load={preset:"Default"}:r.preset&&(r.load.preset=r.preset),gx.isUndefined(r.parent)&&r.hideable&&o_.push(this),r.resizable=gx.isUndefined(r.parent)&&r.resizable,r.autoPlace&&gx.isUndefined(r.scrollable)&&(r.scrollable=!0);var i,o=e_&&"true"===localStorage.getItem(d_(this,"isLocal")),a=void 0,s=void 0;if(Object.defineProperties(this,{parent:{get:function(){return r.parent}},scrollable:{get:function(){return r.scrollable}},autoPlace:{get:function(){return r.autoPlace}},closeOnTop:{get:function(){return r.closeOnTop}},preset:{get:function(){return n.parent?n.getRoot().preset:r.load.preset},set:function(e){n.parent?n.getRoot().preset=e:r.load.preset=e,function(e){for(var t=0;t1){var r=n.__li.nextElementSibling;return n.remove(),h_(e,n.object,n.property,{before:r,factoryArgs:[gx.toArray(arguments)]})}if(gx.isArray(t)||gx.isObject(t)){var i=n.__li.nextElementSibling;return n.remove(),h_(e,n.object,n.property,{before:i,factoryArgs:[t]})}},name:function(e){return n.__li.firstElementChild.firstElementChild.innerHTML=e,n},listen:function(){return n.__gui.listen(n),n},remove:function(){return n.__gui.remove(n),n}}),n instanceof Wx){var r=new Hx(n.object,n.property,{min:n.__min,max:n.__max,step:n.__step});gx.each(["updateDisplay","onChange","onFinishChange","step","min","max"],(function(e){var t=n[e],i=r[e];n[e]=r[e]=function(){var e=Array.prototype.slice.call(arguments);return i.apply(r,e),t.apply(n,e)}})),jx.addClass(t,"has-slider"),n.domElement.insertBefore(r.domElement,n.domElement.firstElementChild)}else if(n instanceof Hx){var i=function(t){if(gx.isNumber(n.__min)&&gx.isNumber(n.__max)){var r=n.__li.firstElementChild.firstElementChild.innerHTML,i=n.__gui.__listening.indexOf(n)>-1;n.remove();var o=h_(e,n.object,n.property,{before:n.__li.nextElementSibling,factoryArgs:[n.__min,n.__max,n.__step]});return o.name(r),i&&o.listen(),o}return t};n.min=gx.compose(i,n.min),n.max=gx.compose(i,n.max)}else n instanceof Bx?(jx.bind(t,"click",(function(){jx.fakeEvent(n.__checkbox,"click")})),jx.bind(n.__checkbox,"click",(function(e){e.stopPropagation()}))):n instanceof Yx?(jx.bind(t,"click",(function(){jx.fakeEvent(n.__button,"click")})),jx.bind(t,"mouseover",(function(){jx.addClass(n.__button,"hover")})),jx.bind(t,"mouseout",(function(){jx.removeClass(n.__button,"hover")}))):n instanceof Xx&&(jx.addClass(t,"color"),n.updateDisplay=gx.compose((function(e){return t.style.borderLeftColor=n.__color.toString(),e}),n.updateDisplay),n.updateDisplay());n.setValue=gx.compose((function(t){return e.getRoot().__preset_select&&n.isModified()&&l_(e.getRoot(),!0),t}),n.setValue)}(e,u,i),e.__controllers.push(i),i}function d_(e,t){return document.location.href+"."+t}function f_(e,t,n){var r=document.createElement("option");r.innerHTML=t,r.value=t,e.__preset_select.appendChild(r),n&&(e.__preset_select.selectedIndex=e.__preset_select.length-1)}function p_(e,t){t.style.display=e.useLocalStorage?"block":"none"}function v_(e){var t=e.__save_row=document.createElement("li");jx.addClass(e.domElement,"has-save"),e.__ul.insertBefore(t,e.__ul.firstChild),jx.addClass(t,"save-row");var n=document.createElement("span");n.innerHTML=" ",jx.addClass(n,"button gears");var r=document.createElement("span");r.innerHTML="Save",jx.addClass(r,"button"),jx.addClass(r,"save");var i=document.createElement("span");i.innerHTML="New",jx.addClass(i,"button"),jx.addClass(i,"save-as");var o=document.createElement("span");o.innerHTML="Revert",jx.addClass(o,"button"),jx.addClass(o,"revert");var a=e.__preset_select=document.createElement("select");if(e.load&&e.load.remembered?gx.each(e.load.remembered,(function(t,n){f_(e,n,n===e.preset)})):f_(e,"Default",!1),jx.bind(a,"change",(function(){for(var t=0;t0&&(e.preset=this.preset,e.remembered||(e.remembered={}),e.remembered[this.preset]=g_(this)),e.folders={},gx.each(this.__folders,(function(t,n){e.folders[n]=t.getSaveObject()})),e},save:function(){this.load.remembered||(this.load.remembered={}),this.load.remembered[this.preset]=g_(this),l_(this,!1),this.saveToLocalStorageIfPossible()},saveAs:function(e){this.load.remembered||(this.load.remembered={},this.load.remembered.Default=g_(this,!0)),this.load.remembered[e]=g_(this),this.preset=e,f_(this,e,!0),this.saveToLocalStorageIfPossible()},revert:function(e){gx.each(this.__controllers,(function(t){this.getRoot().load.remembered?c_(e||this.getRoot(),t):t.setValue(t.initialValue),t.__onFinishChange&&t.__onFinishChange.call(t,t.getValue())}),this),gx.each(this.__folders,(function(e){e.revert(e)})),e||l_(this.getRoot(),!1)},listen:function(e){var t=0===this.__listening.length;this.__listening.push(e),t&&function e(t){0!==t.length&&Kx.call(window,(function(){e(t)})),gx.each(t,(function(e){e.updateDisplay()}))}(this.__listening)},updateDisplay:function(){gx.each(this.__controllers,(function(e){e.updateDisplay()})),gx.each(this.__folders,(function(e){e.updateDisplay()}))}});var y_=a_,b_=function(){function e(e){this.player=e}return Object.defineProperty(e.prototype,"frameRate",{get:function(){return this.player.fps.value},set:function(e){},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"drawFrames",{get:function(){return this.player.runtime.fps},set:function(e){},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"drawCall",{get:function(){return this.player.runtime.drawCall},set:function(e){},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"resolution",{get:function(){return this.player.config.resolution},set:function(e){this.player.updateConfig({resolution:e})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){var e,t;return(null===(e=this.player.view)||void 0===e?void 0:e.width)+"*"+(null===(t=this.player.view)||void 0===t?void 0:t.height)},set:function(e){},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"minFPS",{get:function(){return this.player.config.minFPS},set:function(e){this.player.updateConfig({minFPS:e,maxFPS:this.player.config.maxFPS})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxFPS",{get:function(){return this.player.config.maxFPS},set:function(e){this.player.updateConfig({maxFPS:e,minFPS:this.player.config.minFPS})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"autoResolution",{get:function(){return this.player.config.autoResolution},set:function(e){this.player.updateConfig({autoResolution:e})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"autoFPS",{get:function(){return this.player.config.autoFPS},set:function(e){this.player.updateConfig({autoFPS:e})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backgroundColor",{get:function(){return this.player.config.transactionBgColor},set:function(e){this.player.updateConfig({transactionBgColor:e})},enumerable:!1,configurable:!0}),e}(),x_=function(){function e(e,t){var n;this.config=new b_(e),this.anchor=t,n=this.createControllerGUI(),this.gui=n[0],this.controller=n[1],this.createStats()}return e.prototype.createStats=function(){var e=this;this.stateId=setInterval((function(){e.controller.frameRate.updateDisplay(),e.controller.size.updateDisplay(),e.controller.minFPS.updateDisplay(),e.controller.drawFrames.updateDisplay(),e.controller.maxFPS.updateDisplay(),e.controller.resolution.updateDisplay(),e.controller.autoFps.updateDisplay(),e.controller.autoResolution.updateDisplay(),e.controller.drawCall.updateDisplay()}),16)},e.prototype.createControllerGUI=function(){var e=new y_({autoPlace:!0,closed:!0});e.domElement.style.opacity=".6",e.domElement.style.transformOrigin="100% 0",e.domElement.style.transform="scale(1)",this.anchor.appendChild(e.domElement),e.domElement.style.position="absolute",e.domElement.style.right="0",e.domElement.style.top="0",e.domElement.style.zIndex="2";var t={frameRate:e.add(this.config,"frameRate"),drawFrames:e.add(this.config,"drawFrames"),drawCall:e.add(this.config,"drawCall"),size:e.add(this.config,"size"),minFPS:e.add(this.config,"minFPS",0,60),maxFPS:e.add(this.config,"maxFPS",0,60),resolution:e.add(this.config,"resolution",.5,8,.5),autoResolution:e.add(this.config,"autoResolution"),autoFps:e.add(this.config,"autoFPS"),transactionBgColor:e.addColor(this.config,"backgroundColor")};return[e,t]},e.prototype.destroy=function(){try{window.clearInterval(this.stateId),this.anchor.removeChild(this.gui.domElement),this.gui.destroy()}catch(e){}},e}(),__=function(){function e(e){var t=this;this.tasks=[],this.isDestroy=!1,this.isScheduling=!1,this.schedule=function(){t.isScheduling=!0;var e=t.tasks.shift();e&&!t.isDestroy&&t.fn(e).then((function(){t.tasks.length>0?window.requestAnimationFrame(t.schedule):t.isScheduling=!1}))},this.fn=e}return e.prototype.destroy=function(){this.isDestroy=!0},e.prototype.addTask=function(e){this.tasks.push(e),this.isScheduling||this.schedule()},e}(),w_=function(){function e(e){this.autoUnlock=Object.create(null),this.locks=Object.create(null),this.available=!1,this.available=e}return e.prototype.addLock=function(e,t){var n=this;this.available&&(this.locks[e]=t,this.autoUnlock[e]=window.setTimeout((function(){delete n.locks[e]}),3e3))},e.prototype.unlock=function(e,t){this.available&&t&&this.locks[e]&&this.locks[e]===t&&(window.clearTimeout(this.autoUnlock[e]),delete this.locks[e])},e.prototype.isLocked=function(e){return!!this.available&&!!this.locks[e]},e}(),T_=function(){function e(){var e=this;this.tasks=[],this.isDestroy=!1,this.isScheduling=!1,this.schedule=function(){e.isScheduling=!0;var t=e.tasks.shift();t&&!e.isDestroy&&(t.status="running",t.fn.apply(null).then((function(){e.tasks.length>0?window.requestAnimationFrame(e.schedule):e.isScheduling=!1})).catch((function(){e.tasks.length>0?window.requestAnimationFrame(e.schedule):e.isScheduling=!1})))}}return e.prototype.getRunningTask=function(){return this.tasks[0]&&"running"===this.tasks[0].status?this.tasks[0]:null},e.prototype.addTask=function(e,t){var n={type:e,status:"wait",fn:t},r=this.getRunningTask();r&&e===r.type||(this.tasks=this.tasks.filter((function(t){return t.type!==e})),this.tasks.push(n),this.isScheduling||this.schedule())},e.prototype.destroy=function(){this.isDestroy=!0},e}(),M_=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},S_=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=this.config.buffer||e))return[2];t=this.logList.splice(0),n=function(){i.logList=t.concat(i.logList),i.retryTimes>3&&i.pause(),i.retryTimes+=1},o.label=1;case 1:return o.trys.push([1,3,,4]),[4,fetch("https://netless-ppt-plugin-dev.cn-hangzhou.log.aliyuncs.com/logstores/netless-ppt-plugin-dev/track",{method:"POST",headers:{"x-log-apiversion":"0.6.0","Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify({__topic__:"netless-ppt-plugin-dev",__source__:"netless-ppt-plugin-dev",__logs__:t})})];case 2:return o.sent().ok?this.retryTimes=0:n(),[3,4];case 3:return r=o.sent(),console.warn(r),n(),[3,4];case 4:return[2]}}))}))},e.prototype.setEnable=function(e){this.enable!==e&&(e?this.start():this.pause())},e}();function A_(e,t,n){return function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}(this,void 0,void 0,(function(){var r,i,o,a;return function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]500&&r.enableGlobalClick&&r.nextStep()}))},r.handleViewTouchStart=function(){window.clearTimeout(r.touchStartId),r.isTouchStart=!0,r.touchStartId=setTimeout((function(){r.isTouchStart=!1}),350)},r.handleViewTouchEnd=function(){r.isTouchStart&&(r.isTouchStart=!1,r.handleViewClick())},r.handleSlideRef=function(){console.log(r),window.__slide=r},r.receiveSyncHandler=function(e){return k_(r,void 0,void 0,(function(){var t,n,r,i,o,a=this;return D_(this,(function(s){switch(s.label){case 0:return Tv()(e.incrId)&&(e.incrId&&e.incrId-this._receiveIncrId!=1&&this.emit(L_.syncEventLag),this._receiveIncrId=e.incrId||0),this.logger.info("sync receive "+JSON.stringify(e),this.taskId),"nextStep"!==e.type?[3,1]:(this.mainSeqStep!==e.next-1&&this.mainSeqStep+1!==this.mainSeqLength&&this.player?(this.setMainSeqStep(e.next,"start"),this.player.nextTick((function(){a.doNextStep(!0,e.clientId||"")}))):this.doNextStep(!0,e.clientId||""),[3,6]);case 1:return"prevStep"!==e.type?[3,2]:(0===this.mainSeqStep&&"idle"===this.mainSeqState||this.mainSeqStep===e.next+1||this.mainSeqStep+1===this.mainSeqLength?this.doPrevStep(!0):(this.setMainSeqStep(e.next+1,"start"),null===(t=this.player)||void 0===t||t.nextTick((function(){a.doPrevStep(!0)}))),[3,6]);case 2:return"interactiveAnim"!==e.type?[3,3]:(this.player?this.player.applyInteractiveAction(e.action):this.__slideState.interactiveSeqState[e.seqId]?this.__slideState.interactiveSeqState[e.seqId].step+=1:this.__slideState.interactiveSeqState[e.seqId]={step:0,state:"end"},[3,6]);case 3:return"renderSlide"!==e.type?[3,5]:[4,this.doRenderSlide(e.index,e.isForward)];case 4:return s.sent(),[3,6];case 5:"mediaPlay"===e.type?(null===(n=this.player)||void 0===n||n.setMediaState(e.id,!0),this.__slideState.mediaState[e.id]=e.state):"mediaPause"===e.type?(null===(r=this.player)||void 0===r||r.setMediaState(e.id,!1),this.__slideState.mediaState[e.id]=e.state):"mediaSeek"===e.type?(null===(i=this.player)||void 0===i||i.setMediaCurrentTime(e.id,e.time),this.__slideState.mediaState[e.id]=e.state):"mediaFullscreen"===e.type&&(e.targetId&&this.__slideState.mediaState[e.targetId]?this.__slideState.mediaState[e.targetId].fullscreen=e.state:this.__slideState.mediaState[e.targetId]={fullscreen:e.state,type:"pause",time:0},null===(o=this.player)||void 0===o||o.syncFullscreenVideoState({targetId:e.targetId,state:e.state,slideIndex:e.slideIndex})),s.label=6;case 6:return[2]}}))}))},r.handlePrevSlide=function(e){return void 0===e&&(e=!1),k_(r,void 0,void 0,(function(){var t,n;return D_(this,(function(r){return this.player?((t=this.player.prevSlideIndex)>=1&&((null===(n=this.config.navigatorDelegate)||void 0===n?void 0:n.gotoPage)?this.config.navigatorDelegate.gotoPage(t):e?this.doRenderSlide(t,!1):this.renderSlide(t,!1)),[2]):[2]}))}))},r.handleNextSlide=function(e){return void 0===e&&(e=!1),k_(r,void 0,void 0,(function(){var t,n;return D_(this,(function(r){return this.player?((t=this.player.nextSlideIndex)<=this.slideCount&&((null===(n=this.config.navigatorDelegate)||void 0===n?void 0:n.gotoPage)?this.config.navigatorDelegate.gotoPage(t):e?this.doRenderSlide(t,!0):this.renderSlide(t,!0)),[2]):[2]}))}))},r.handleGotoSlide=function(e){if(e<=r.slideCount&&e>=1){var t=r.slideState.currentSlideIndex<=e;r.renderSlide(e,t)}else-1===e&&r.renderSlide(r.slideCount,!0)},t.instances.push(r),r.config=r.initSlideConfig(n),r.tracker=function(e){n.whiteTracker&&n.whiteTracker.commit({name:e.name,reason:e.reason,result:e.result,payload:N_(N_({},e.payload),{slideId:r.randomId,taskId:r.taskId})},{slideVersion:r.version||""})},t.trackLogger.setEnable(!!r.config.enableTracking),r.logger={info:function(e,n){var i;t.appendLogString("INFO - "+(new Date).toISOString()+" - {"+r.randomId+"}["+n+"] "+e+"\n"),t.trackLogger.addLog(e,"info",n,r.randomId);var o=null===(i=r.config.logger)||void 0===i?void 0:i.info;o&&o("["+n+"] "+e)},warn:function(e,n){var i;t.appendLogString("WARN - "+(new Date).toISOString()+" - {"+r.randomId+"}["+n+"] "+e+"\n"),t.trackLogger.addLog(e,"warn",n,r.randomId);var o=null===(i=r.config.logger)||void 0===i?void 0:i.warn;o&&o("["+n+"] "+e)},error:function(e,n){var i;t.appendLogString("ERROR - "+(new Date).toISOString()+" - {"+r.randomId+"}["+n+"] "+e+"\n"),t.trackLogger.addLog(e,"error",n,r.randomId);var o=null===(i=r.config.logger)||void 0===i?void 0:i.error;o&&o("["+n+"] "+e)}},r.logger.info("new slide with clientId: "+r.config.clientId+", version: "+r.version,r.taskId),r.tracker({name:"initSlide",result:"",reason:"",payload:{taskId:r.taskId}}),r.anchor=r.config.anchor,r.syncQueue=new __(r.receiveSyncHandler),r.lock=new w_("interactive"===r.mode),r.cacheImage.style.position="absolute",r.cacheImage.style.zIndex="100",r.setMedianControllerAttribute(),r.canvasContainer.style.position="relative",r.canvasContainer.style.fontSize="0",r.canvasContainer.appendChild(r.medianController),r.frame.appendChild(r.canvasContainer),r.frameResizeObserver.observe(r.frame),r.on(L_.syncReceive,(function(e){r.lock.unlock(e.type,e.uuid),r.syncQueue.addTask(e)})),r.renderingTaskManager.eventHub.on("task-error",(function(e){var t=e.error,n=e.task,i=rv.transform(t);i.errorType===Jp.RuntimeWarn?r.logger.warn(i.message,r.taskId):r.logger.error(i.message,r.taskId),r.isLoading=!1,r.reportError(i,n.slideIndex)})),window.addEventListener("__slide_ref__",r.handleSlideRef),r.resizeView=Eb()(r.resizeView.bind(r),50),r.player=r.initPlayer(r.config),r.config.controller&&r.createController(),r.player.view&&r.canvasContainer.appendChild(r.player.view),r.handleViewClick=Eb()(r.handleViewClick,300),r.player.errorChannel.on("error",(function(e,t){var n=rv.transform(e);n.errorType===Jp.RuntimeWarn?r.logger.warn(n.message,r.taskId):r.logger.error(n.message,r.taskId),r.isLoading=!1,r.reportError(e,t),r.tracker({name:"slideError",reason:n.errorMsg,result:"",payload:{code:n.errorType}})})),window.addEventListener("message",r.recoverHandler),t.volumeAdjuster.on("update",r._updateVolumeByStaticAdjuster),r.volumeAdjuster.volume=t.volumeAdjuster.volume,r}var n,r;return C_(t,e),t.flushLog=function(e){return void 0===e&&(e=!1),k_(this,void 0,void 0,(function(){return D_(this,(function(n){switch(n.label){case 0:if(!(t._tempLog.length>131072||e&&t._tempLog.length>0))return[3,5];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,null==U_?void 0:U_.setItem("run_time_log_"+t._tempLogIndex,t._tempLog)];case 2:case 3:return n.sent(),[3,4];case 4:t._tempLog="",t._tempLogIndex+=1,n.label=5;case 5:return[2]}}))}))},t.stopRemoteLog=function(){t.remoteLogAddress=null},t.startRemoteLog=function(e){return k_(this,void 0,void 0,(function(){var n,r,i,o,a;return D_(this,(function(s){switch(s.label){case 0:return t.remoteLogAddress=e,[4,t.flushLog(!0)];case 1:if(s.sent(),!U_)return[3,13];n=[],s.label=2;case 2:return s.trys.push([2,4,,5]),[4,U_.keys()];case 3:return n=(s.sent()||[]).sort((function(e,t){return parseInt(e.replace("run_time_log_",""))-parseInt(t.replace("run_time_log_",""))})),[3,5];case 4:return s.sent(),[3,5];case 5:r=0,i=n,s.label=6;case 6:if(!(r0&&o>0){var a=this.frameWidth/i,s=a*o;s>this.frameHeight&&(a*=this.frameHeight/s),null===(t=this.player)||void 0===t||t.scaleView(a,this.resize,e),this.cacheImage.style.transform="scale("+a+")",this.medianController.style.transform="scale("+a+")",this.medianController.setAttribute("data-scale",a.toString()),this.isInitResized||(this.isInitResized=!0,null===(n=this.player)||void 0===n||n.clock.setTimeout((function(){r.frame.style.visibility="visible"}),32))}},t.prototype.setSlideState=function(e){var t,n,r;return k_(this,void 0,void 0,(function(){var i,o=this;return D_(this,(function(a){switch(a.label){case 0:return this.isSyncingSlideState=!0,this.logger.info("stateChange receive "+JSON.stringify(e),this.taskId),e.taskId&&e.taskId!==this.__slideState.taskId&&(this.__slideState.taskId=e.taskId,null===(t=this.player)||void 0===t||t.setResourceData(e.taskId,this.__slideState.url)),e.url&&e.url!==this.__slideState.url&&(this.__slideState.url=e.url,null===(n=this.player)||void 0===n||n.setResourceData(this.__slideState.taskId,e.url)),Number.isInteger(e.currentSlideIndex)&&e.currentSlideIndex!==this.__slideState.currentSlideIndex?(this.__slideState.currentSlideIndex=e.currentSlideIndex,[4,this.doRenderSlide(e.currentSlideIndex)]):[3,2];case 1:a.sent(),a.label=2;case 2:return[4,null===(r=this.player)||void 0===r?void 0:r.clock.waitUntil((function(){var t,n;return(null===(t=o.player)||void 0===t?void 0:t.currentIndex)===e.currentSlideIndex&&(null===(n=o.player)||void 0===n?void 0:n.currentStage)}),3e3)];case 3:return a.sent(),i=!1,Number.isInteger(e.mainSeqStep)&&e.mainSeqStep!==this.__slideState.mainSeqStep&&(i=!0,this.__slideState.mainSeqStep=e.mainSeqStep),e.mainSeqState&&e.mainSeqState!==this.__slideState.mainSeqState&&(i=!0,this.__slideState.mainSeqState=e.mainSeqState),i&&this.setMainSeqStep(this.__slideState.mainSeqStep,"idle"===this.__slideState.mainSeqState?"start":"end"),e.interactiveSeqState&&(this.initInteractiveSeq(e),this.__slideState.interactiveSeqState=e.interactiveSeqState),[4,O_(1500)];case 4:return a.sent(),e.mediaState&&(this.initMedia(e),this.__slideState.mediaState=e.mediaState),this.isSyncingSlideState=!1,[2]}}))}))},t.prototype.initInteractiveSeq=function(e){var t;for(var n in e.interactiveSeqState){var r=e.interactiveSeqState[n];null===(t=this.player)||void 0===t||t.setInteractiveSeqState(n,r.step,"idle"===r.state?"start":"end")}},t.prototype.initMedia=function(e){var t,n,r;for(var i in e.mediaState){var o=e.mediaState[i],a=this.__slideState.mediaState[i];if(null===(t=this.player)||void 0===t||t.syncFullscreenVideoState({targetId:i,state:!!o.fullscreen,slideIndex:this.slideState.currentSlideIndex}),!a||o.type!==a.type||o.time!==a.time)if("play"===o.type){var s=(this.timestamp()-o.time)/1e3;null===(n=this.player)||void 0===n||n.setMediaState(i,!0,s)}else null===(r=this.player)||void 0===r||r.setMediaState(i,!1,o.time)}},Object.defineProperty(t.prototype,"slideCount",{get:function(){return this._slideCount},enumerable:!1,configurable:!0}),t.prototype.getSizeAsync=function(){return k_(this,void 0,void 0,(function(){var e;return D_(this,(function(t){switch(t.label){case 0:if(this.width>0&&this.height>0)return[2,[this.width,this.height]];t.label=1;case 1:return t.trys.push([1,4,,5]),[4,fetch(this.__slideState.url+"/"+this.__slideState.taskId+"/jsonOutput/slide-1.json")];case 2:return[4,t.sent().json()];case 3:return[2,[(e=t.sent()).width,e.height]];case 4:return t.sent(),[2,[0,0]];case 5:return[2]}}))}))},t.prototype.getSlideCountAsync=function(){return k_(this,void 0,void 0,(function(){return D_(this,(function(e){switch(e.label){case 0:if(this._slideCount>0)return[2,this._slideCount];e.label=1;case 1:return e.trys.push([1,4,,5]),[4,fetch(this.__slideState.url+"/"+this.__slideState.taskId+"/jsonOutput/slide-1.json")];case 2:return[4,e.sent().json()];case 3:return[2,e.sent().slideCount];case 4:return e.sent(),[2,0];case 5:return[2]}}))}))},Object.defineProperty(t.prototype,"slideState",{get:function(){return this.__slideState.mainSeqState=this.mainSeqState,this.__slideState.mainSeqStep=this.mainSeqStep,JSON.parse(JSON.stringify(this.__slideState))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mainSeqLength",{get:function(){var e;return(null===(e=this.player)||void 0===e?void 0:e.mainSeqLength())||0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mainSeqStep",{get:function(){var e;return(null===(e=this.player)||void 0===e?void 0:e.mainSeqStep())||0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mainSeqState",{get:function(){var e;return(null===(e=this.player)||void 0===e?void 0:e.mainSeqState())||null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderOptions",{get:function(){var e;return(null===(e=this.player)||void 0===e?void 0:e.config)||null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"drawCall",{get:function(){var e;return(null===(e=this.player)||void 0===e?void 0:e.runtime.drawCall)||0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderFps",{get:function(){var e;return(null===(e=this.player)||void 0===e?void 0:e.runtime.fps)||0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"runtimeFps",{get:function(){var e;return(null===(e=this.player)||void 0===e?void 0:e.fps.value)||0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"view",{get:function(){var e;return(null===(e=this.player)||void 0===e?void 0:e.view)||null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.designWidth},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.designHeight},enumerable:!1,configurable:!0}),t.prototype.updateRenderOption=function(e){this.player&&(this.player.updateConfig(e),this.renderOptions&&(this.config.renderOptions=this.renderOptions))},t.prototype.setResource=function(e,t){var n;this.taskId=e,null===(n=this.player)||void 0===n||n.setResourceData(e,t),this.__slideState.taskId=e,this.__slideState.url=t,this.emitSyncDispatch({slideIndex:this.__slideState.currentSlideIndex,type:"setResource",taskId:e,url:t})},t.prototype._renderSlide=function(e){var t;return k_(this,void 0,void 0,(function(){var n=this;return D_(this,(function(r){switch(r.label){case 0:return this.renderingIndex=e,this.player&&e===this.player.currentIndex?[2]:((xb.platform.isIOS()||xb.platform.isAndroid())&&this.iosResetCache.indexOf(e)<0&&this.iosResetCache.push(e),[4,null===(t=this.player)||void 0===t?void 0:t.renderSlide(e)]);case 1:return r.sent(),this.__slideState.currentSlideIndex=e,this.resizeView(),this.__slideState.interactiveSeqState={},this.__slideState.mediaState={},this.emitStateChange(),setTimeout((function(){var e,t;if("hidden"===(null===(t=null===(e=n.player)||void 0===e?void 0:e.view)||void 0===t?void 0:t.style.visibility)&&(n.player.view.style.visibility="visible"),"hidden"===n.frame.style.visibility&&(n.frame.style.visibility="visible"),n.needClearCacheImage)try{n.frame.removeChild(n.cacheImage)}catch(e){}}),100),[2]}}))}))},t.prototype.renderSlide=function(e,t){if(void 0===t&&(t=!0),this.player){var n=Number(e);(n!==this.player.currentIndex||this.renderingTaskManager.hasStartTask())&&(n>this.slideCount&&this.slideCount>0||this.poseRenderSlide(n,t))}},t.prototype.needCreateNewPlayer=function(){var e=xb.platform.isLowGpuMemory()?15:30;return(xb.platform.isIOS()||xb.platform.isAndroid())&&this.iosResetCache.length>e},t.prototype.poseRenderSlide=function(e,t){"interactive"===this.mode?this.emitSyncDispatch({slideIndex:this.__slideState.currentSlideIndex,type:"renderSlide",index:e,isForward:t}):"sync"===this.mode?(this.doRenderSlide(e,t),this.emitSyncDispatch({slideIndex:this.__slideState.currentSlideIndex,type:"renderSlide",index:e,isForward:t})):this.doRenderSlide(e,t)},t.prototype.doRenderSlide=function(e,t){var n,r,i,o=this;if(void 0===t&&(t=!0),!this.player)return Promise.resolve();if(this.needCreateNewPlayer()&&(this.iosResetCache=[],this.iosNewPlayer=this.initPlayer(this.config),this.iosNewPlayer.setResourceData(this.__slideState.taskId,this.__slideState.url)),this.iosNewPlayer){var a=this.player.getSnapshot();this.cacheImage.src=a,this.frame.appendChild(this.cacheImage),this.player.destroy(),null===(n=this.playerController)||void 0===n||n.destroy(),this.player=this.iosNewPlayer,this.iosNewPlayer=void 0,(null===(r=this.config)||void 0===r?void 0:r.controller)&&this.createController(),this.needClearCacheImage=!0,(null===(i=null==this?void 0:this.player)||void 0===i?void 0:i.view)&&(this.player.view.style.visibility="hidden",this.canvasContainer.appendChild(this.player.view))}var s=Math.random().toString(32).substr(2);return this.player.isForward=t,this.renderingTaskManager.addTask((function(){return o._renderSlide(e)}),e,s),new Promise((function(e){o.renderingTaskManager.eventHub.once("task-end-"+s,e)}))},t.prototype.getSnapshot=function(){var e,t;return null!==(t=null===(e=this.player)||void 0===e?void 0:e.getSnapshot())&&void 0!==t?t:null},t.prototype.nextStep=function(){!this.isLoading&&this.player&&this.interactive?(this.hasNextStep()||this.emit(L_.slideStepEnd),this.player.mainSeqHasNextStep()?"interactive"===this.mode?this.emitSyncDispatch({slideIndex:this.__slideState.currentSlideIndex,type:"nextStep",next:this.player.mainSeqStep()+1}):"sync"===this.mode?(this.doNextStep(!1,""),this.emitSyncDispatch({slideIndex:this.__slideState.currentSlideIndex,type:"nextStep",next:this.player.mainSeqStep()})):this.doNextStep(!1,""):this.handleNextSlide()):this.logger.info("prevent nextStep. isLoading: "+this.isLoading+", player: "+!!this.player+", interactive: "+this.interactive,this.taskId)},t.prototype.doNextStep=function(e,t){if(this.player){var n=!this.config.clientId||t===this.config.clientId;this.player.nextStep(e,n);var r=this.player.mainSeqStep();this.__slideState.mainSeqStep=r,this.emitStateChange()}},t.prototype.prevStep=function(){!this.isLoading&&this.player&&this.interactive?(this.hasPrevStep()||this.emit(L_.slideStepStart),this.player.mainSeqHasPrevStep()?"interactive"===this.mode?this.emitSyncDispatch({type:"prevStep",slideIndex:this.__slideState.currentSlideIndex,next:this.player.mainSeqStep()-1}):"sync"===this.mode?(this.doPrevStep(),this.emitSyncDispatch({slideIndex:this.__slideState.currentSlideIndex,type:"prevStep",next:this.player.mainSeqStep()})):this.doPrevStep():this.handlePrevSlide()):this.logger.info("prevent nextStep. isLoading: "+this.isLoading+", player: "+this.player+", interactive: "+this.interactive,this.taskId)},t.prototype.doPrevStep=function(e){if(void 0===e&&(e=!1),this.player){this.player.prevStep(e);var t=this.player.mainSeqStep();this.__slideState.mainSeqStep=t,this.emitStateChange()}},t.prototype.isSlideStateReady=function(e){return e.taskId.length>0&&e.url.length>0&&e.currentSlideIndex>0},t.prototype.emitStateChange=function(){if("local"!==this.mode&&!this.isSyncingSlideState){var e=this.slideState;!Mb()(this.lastEmitedState,e)&&this.isSlideStateReady(e)&&(this.lastEmitedState=e,this.emit(L_.stateChange,e),this.logger.info("stateChange dispatch "+JSON.stringify(this.slideState),this.taskId))}},t.prototype.emitSyncDispatch=function(e){if(!this.lock.isLocked(e.type)){var t=Math.random().toString(32).substr(2);this.lock.addLock(e.type,t);var n=N_(N_({},e),{uuid:t,clientId:this.config.clientId});"sync"===this.config.mode&&(n.incrId=this.dispatchIncrId),this.emit(L_.syncDispatch,n),this.logger.info("sync dispatch "+JSON.stringify(n),this.taskId)}},t.prototype.setMainSeqStep=function(e,t){var n;null===(n=this.player)||void 0===n||n.setMainSeqStep(e,t)},t.prototype.setInteractive=function(e){var t;this.interactive=e,null===(t=this.player)||void 0===t||t.setInteractive(e)},t.prototype.pause=function(){var e;null===(e=this.player)||void 0===e||e.pause()},t.prototype.resume=function(){var e;null===(e=this.player)||void 0===e||e.resume()},t.prototype._doFrozen=function(){var e;return k_(this,void 0,void 0,(function(){var t,n,r,i=this;return D_(this,(function(o){switch(o.label){case 0:return this.logger.info("frozen with player["+!!this.player+"]",this.taskId),this.tracker({name:"frozenSlide",reason:"",result:"",payload:{taskId:this.taskId}}),this.view&&this.player?[4,this.player.clock.waitUntil((function(){return!i.isLoading}),6e4)]:[3,2];case 1:for(n in o.sent(),t=this.player.getSnapshot()||"",this.cacheImage.src=t,this.frame.appendChild(this.cacheImage),this.player.destroy(),null===(e=this.playerController)||void 0===e||e.destroy(),this.player=void 0,this.__slideState.mediaState)r=this.__slideState.mediaState[n],this.__slideState.mediaState[n]=N_(N_({},r),{frozenTime:this.timestamp()});o.label=2;case 2:return[2]}}))}))},t.prototype.frozen=function(){var e=this;this.frozenTaskManager.addTask("frozen",(function(){return e._doFrozen()}))},t.prototype._doRelease=function(){var e,t;return k_(this,void 0,void 0,(function(){var n,r,i,o;return D_(this,(function(a){switch(a.label){case 0:if(this.logger.info("do release slide",this.taskId),this.tracker({name:"releaseSlide",reason:"",result:"",payload:{taskId:this.taskId}}),this.player)return[2];for(r in this.player=this.initPlayer(this.config),(null===(e=this.config)||void 0===e?void 0:e.controller)&&this.createController(),this.player.view&&(this.canvasContainer.appendChild(this.player.view),this.player.view.style.visibility="hidden"),n=this.__slideState,this.__slideState=Ib()(j_),n.mediaState)"play"===(i=n.mediaState[r]).type&&(o=Math.max(null!==(t=i.frozenTime)&&void 0!==t?t:0,i.time),i.time=this.timestamp()-(o-i.time),i.frozenTime=void 0);return[4,this.setSlideState(n)];case 1:return a.sent(),[4,this.player.clock.delay(333)];case 2:a.sent(),this.player.view&&(this.player.view.style.visibility="visible");try{this.frame.removeChild(this.cacheImage)}catch(e){}return[2]}}))}))},t.prototype.release=function(){var e=this;this.frozenTaskManager.addTask("release",(function(){return e._doRelease()}))},t.prototype._doDestroy=function(){var e,n,r,i,o=this;this.logger.info("do destroy slide",this.taskId),this.tracker({name:"destroySlide",reason:"",result:"",payload:{taskId:this.taskId}});var a=t.instances.findIndex((function(e){return e.randomId===o.randomId}));a>=0&&t.instances.splice(a,1),this.playerController&&this.playerController.destroy(),this.frameResizeObserver.disconnect(),null===(e=this.player)||void 0===e||e.removeAllListeners(),null===(n=this.player)||void 0===n||n.destroy(),null===(r=this.player)||void 0===r||r.removeAllListeners(),this.logger={warn:function(){return{}},info:function(){return{}},error:function(){return{}}},this.syncQueue.destroy(),this.renderingTaskManager.destroy(),this.frozenTaskManager.destroy(),window.removeEventListener("__slide_ref__",this.handleSlideRef),window.removeEventListener("message",this.recoverHandler),this.removeAllListeners();try{(null===(i=this.player)||void 0===i?void 0:i.view)&&this.anchor.removeChild(this.player.view),this.anchor.removeChild(this.frame)}catch(e){}t.volumeAdjuster.off("update",this._updateVolumeByStaticAdjuster)},t.prototype.waitLoadEnd=function(){return k_(this,void 0,void 0,(function(){var e;return D_(this,(function(t){switch(t.label){case 0:e=0,t.label=1;case 1:return this.isLoading&&e<10?[4,O_(100)]:[3,3];case 2:return t.sent(),e+=1,[3,1];case 3:return[2]}}))}))},t.prototype.preload=function(e){return this.player?this.player.preload(e):Promise.resolve()},t.prototype.destroy=function(){var e=this;this.logger.info("pre destroy slide",""),this.isLoading?this.waitLoadEnd().then((function(){e._doDestroy()})):this._doDestroy()},t.prototype.clearSlideCache=function(){var e;null===(e=this.player)||void 0===e||e.clearLocalCache()},t.prototype.hasNextStep=function(){if(!this.player)return!1;var e=this.player.currentIndex===this.slideCount,t=0===this.mainSeqLength||this.mainSeqStep>=this.mainSeqLength-1,n="end"===this.mainSeqState||"running"===this.mainSeqState||null==this.mainSeqState;return!(e&&t&&n)},t.prototype.hasPrevStep=function(){if(!this.player)return!1;var e=1===this.player.currentIndex,t=0===this.mainSeqLength||0===this.mainSeqStep,n="idle"===this.mainSeqState||null===this.mainSeqState;return!(e&&t&&n)},t.prototype.snapshot=function(){return k_(this,void 0,void 0,(function(){return D_(this,(function(e){return this.player?[2,this.player.getSnapshot()]:[2,null]}))}))},t.prototype.snapshotWithTimingEnd=function(e){return k_(this,void 0,void 0,(function(){return D_(this,(function(t){return this.player?[2,this.player.snapshotWithTimingEnd(e)]:[2,null]}))}))},t.prototype.updateGlobalVolume=function(e){this.volumeAdjuster.volume=e},t.prototype.getGlobalVolume=function(){return this.volumeAdjuster.volume},t.clearLocalCache=function(){xb.clearLocalCache()},t.disposeLocalCache=function(){},n=t,t.preloadResource=A_,t.instances=[],t._tempFrozenIds=[],t._tempLog="",t._tempLogIndex=1,t.remoteLogAddress=null,t.usePlugin=function(e){var n,r;e.context({logger:{info:function(e){t.appendLogString("INFO - "+(new Date).toISOString()+" - "+e+"\n")},warn:function(e){t.appendLogString("WARN - "+(new Date).toISOString()+" - "+e+"\n")},error:function(e){t.appendLogString("ERROR - "+(new Date).toISOString()+" - "+e+"\n")}}}),n=e,(r=wb.get(n.hookPoint)||[]).push(n),wb.set(n.hookPoint,r)},t.volumeAdjuster=new mb,t.trackLogger=new E_,t.handleFrozenAllSlide=function(){t.instances.forEach((function(e){e.player&&(t._tempFrozenIds.push(e.randomId),e.frozen())}))},t.handleReleaseAllSlide=function(){t._tempFrozenIds.forEach((function(e){var n=t.instances.find((function(t){return t.randomId===e}));n&&n.release()})),t._tempFrozenIds=[]},t.handleLogReport=function(e){return k_(void 0,void 0,void 0,(function(){var r,i,o,a,s,u;return D_(n,(function(n){switch(n.label){case 0:return[4,t.flushLog(!0)];case 1:if(n.sent(),!U_)return[3,12];r=[],n.label=2;case 2:return n.trys.push([2,4,,5]),[4,U_.keys()];case 3:return r=(n.sent()||[]).sort((function(e,t){return parseInt(e.replace("run_time_log_",""))-parseInt(t.replace("run_time_log_",""))})),[3,5];case 4:return n.sent(),[3,5];case 5:if(0===r.length)return window.postMessage({type:"@slide/_report_log_",log:"",index:1,total:1,customMessage:"@slide/_report_log_",sessionId:e},"*"),[2];i=0,o=r,n.label=6;case 6:if(!(i=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);o>3&&a&&Object.defineProperty(t,n,a)}([(r="Slide.initConfig",function(e,t,n){var i=n.value;n.value=function(){for(var e=[],t=0;t1&&void 0!==arguments[1]?arguments[1]:this.genUID();return this.flush(t),this.disposers.set(t,Array.isArray(e)?F(e):e),t}},{key:"add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.genUID(),n=e();return n?this.addDisposer(n,t):t}},{key:"addEventListener",value:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.genUID();return e.addEventListener(t,n,r),this.addDisposer((function(){return e.removeEventListener(t,n,r)}),i),i}},{key:"setTimeout",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.genUID(),i=window.setTimeout((function(){n.remove(r),e()}),t);return this.addDisposer((function(){return window.clearTimeout(i)}),r)}},{key:"setInterval",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.genUID(),r=window.setInterval(e,t);return this.addDisposer((function(){return window.clearInterval(r)}),n)}},{key:"remove",value:function(e){var t=this.disposers.get(e);return this.disposers.delete(e),t}},{key:"flush",value:function(e){var t=this.remove(e);t&&t()}},{key:"flushAll",value:function(){this.disposers.forEach(U),this.disposers.clear()}},{key:"genUID",value:function(){var e;do{e=B()}while(this.disposers.has(e));return e}}]),e}();function F(e){return function(){return e.forEach(U)}}function G(e,t,n){return Math.min(Math.max(e,t),n)}var H={exports:{}},V={exports:{}},W=function(e){return!(!e||"string"==typeof e)&&(e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&"String"!==e.constructor.name))},Y=Array.prototype.concat,X=Array.prototype.slice,Q=V.exports=function(e){for(var t=[],n=0,r=e.length;n=4&&1!==e[3]&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"},ee.to.keyword=function(e){return K[e.slice(0,3)]};var re=H.exports,ie=function(){function e(t){var n=this;_(this,e),this.enable=t,this.apps={},this.level="debug",this.roomLogger=null,this._onMessage=function(e){var t,r;e instanceof CustomEvent?t=e.detail:"object"===M(r=e.data)&&null!==r&&(t=e.data),t&&("boolean"==typeof t.slide?n.enable=t.slide:"__instance"===t.slide?console.log(n):"__debug"===t.slide&&Object.values(n.apps).forEach((function(e){var t,n;null==(n=null==(t=e.controller)?void 0:t.slide)||n.createController()})))},this.initialize()}return T(e,[{key:"setAppContext",value:function(e,t){var n;((n=this.apps)[e]||(n[e]={})).context=t,this.log("[Slide] new ".concat(e))}},{key:"setAppController",value:function(e,t){var n;((n=this.apps)[e]||(n[e]={})).controller=t}},{key:"deleteApp",value:function(e){delete this.apps[e],this.log("[Slide] delete ".concat(e))}},{key:"initialize",value:function(){window.addEventListener("message",this._onMessage)}},{key:"dispose",value:function(){window.removeEventListener("message",this._onMessage)}},{key:"log",value:function(){var e;if(this.roomLogger)(e=this.roomLogger).info.apply(e,arguments);else if(this.enable){var t;(t=console).log.apply(t,arguments)}}},{key:"verbose",value:function(){var e;if(this.roomLogger)(e=this.roomLogger).debug.apply(e,arguments);else if(this.enable&&"verbose"===this.level){var t;(t=console).log.apply(t,arguments)}}},{key:"warn",value:function(){var e,t;this.roomLogger?(e=this.roomLogger).warn.apply(e,arguments):(t=console).warn.apply(t,arguments)}}]),e}(),oe=new ie(!1),ae=oe.log.bind(oe),se=oe.verbose.bind(oe);function ue(e){try{var t=window.getComputedStyle(e).backgroundColor;if("rgba(0, 0, 0, 0)"!==t&&"transparent"!==t)return t;if(e.parentElement)return ue(e.parentElement)}catch(e){}return"#ffffff"}var le="";function ce(e){return le||(le=function(e){var t=re.get(e);if(t&&"rgb"===t.model){var n=t.value,r=(((255&Math.round(n[0]))<<16)+((255&Math.round(n[1]))<<8)+(255&Math.round(n[2]))).toString(16);return"#"+"000000".substring(r.length)+r}return e}(ue(e)),ae("[Slide] guess bg color",le)),le}var he=function(e){return e.tracker};function de(e){for(var t=e.width,n=e.height,r=e.slideCount,i=e.slideState,o=i.taskId,a=i.url,s=[],u=1;u<=r;++u)s.push({width:t,height:n,thumbnail:"".concat(a,"/").concat(o,"/preview/").concat(u,".png"),src:"ppt"});return s}function fe(e,t,n,r){var i,o=n.slideState.currentSlideIndex;if(o>0&&t.getIsWritable()){var a=[r,o].join("/");if("page"!==e.scenePathType(a)){e.removeScenes(r);for(var s=n.slideCount,u=[],l=1;l<=s;++l)u.push({name:"".concat(l)});e.putScenes(r,u)}(t.getBox().focus?e.state.sceneState.scenePath:(null==(i=t.getView())?void 0:i.focusScenePath)||"")!==a&&t.setScenePath(a)}}var pe="https://convertcdn.netless.link/dynamicConvert";t.DefaultUrl=pe;var ve={taskId:"",url:"",state:null},me=function(){},ge=function(){function e(t){var n,r=this,i=t.context,o=t.anchor,a=t.onRenderStart,s=t.onPageChanged,u=t.onTransitionStart,c=t.onTransitionEnd,h=t.onNavigate,d=t.onError,f=t.onRenderError,p=t.showRenderError;_(this,e),this.sideEffect=new z,this.ready=!1,this.readyPromise=new Promise((function(e){r.resolveReady=function(){r.ready?ae("[Slide] render end"):setTimeout((function(){r.ready=!0,e()}),1e3)}})),this.onSyncDispatch=function(e){if(r.context.getIsWritable()&&r.room){var t={type:L.SLIDE_EVENTS.syncDispatch,payload:e};se("[Slide] dispatch",JSON.stringify(e)),r.context.dispatchMagixEvent(L.SLIDE_EVENTS.syncDispatch,t)}},this.magixEventListener=function(e){var t=e.payload,n=t.type,i=t.payload;n===L.SLIDE_EVENTS.syncDispatch&&(r.syncStateOnce(),se("[Slide] receive",JSON.stringify(i)),r.slide.emit(L.SLIDE_EVENTS.syncReceive,i))},this.onStateChange=function(e){r.context.getIsWritable()&&(se("[Slide] state change",JSON.stringify(e,null,2)),r.context.storage.setState({state:e}))},this.pollCount=0,this.pollReadyState=function(){r.ready?1===r._toFreeze?r.freeze():-1===r._toFreeze&&r.unfreeze():r.pollCount<40?(r.pollCount++,setTimeout(r.pollReadyState,500)):(r.pollCount=0,ae("[Slide] init timeout"))},this._pageCount=0,this.destroyed=!1,this.timestamp=function(){return r.room&&r.room.calibrationTimestamp?r.room.calibrationTimestamp:r.player?r.player.beginTimestamp+r.player.progressTime:Date.now()},this.isFrozen=!1,this._toFreeze=0,this.freeze=function(){r.isFrozen=!0,r.ready?(ae("[Slide] freeze",r.context.appId),r.slide.frozen()):r._toFreeze=1},this.unfreeze=l(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.visible){e.next=2;break}return e.abrupt("return");case 2:r.isFrozen=!1,r.ready?(ae("[Slide] unfreeze",r.context.appId),r.slide.release()):r._toFreeze=-1;case 4:case"end":return e.stop()}}),e)}))),this.onVisibilityChange=l(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(r.visible="visible"===document.visibilityState)?(ae("[Slide] unfreeze because tab becomes visible",{savedIsFrozen:r.savedIsFrozen}),r.savedIsFrozen||r.unfreeze()):(r.savedIsFrozen=r.isFrozen,ae("[Slide] freeze because tab becomes invisible"),r.freeze());case 1:case"end":return e.stop()}}),e)}))),this.onRenderStart=a,this.onPageChanged=s,this.onTransitionStart=u,this.onTransitionEnd=c,this.onNavigate=h||me,this.onError=d,this.onRenderError=f,this.showRenderError=null==p||p,this.context=i,this.room=i.getRoom(),this.player=this.room?void 0:i.getDisplayer(),n=this.room||this.player,oe.roomLogger=n.logger,this.slide=this.createSlide(o,{whiteTracker:he(i.getDisplayer())}),this.syncStateOnceFlag=!this.context.isAddApp,this.visible="visible"===document.visibilityState,this.savedIsFrozen=!1,this.initialize()}return T(e,[{key:"jumpToPage",value:function(e,t){this.ready&&(e=G(e,1,this.pageCount),this.onNavigate(e,t),this.slide.renderSlide(e))}},{key:"initialize",value:function(){this.registerEventListeners(),this.kickStart()}},{key:"kickStart",value:function(){var e=this.context,t=this.slide;e.getIsWritable()&&e.storage.ensureState(ve);var n=e.storage.state,r=n.taskId,i=n.url,o=n.state;t.setResource(r,i||pe),o?(ae("[Slide] init with state",JSON.stringify(o)),this.syncStateOnceFlag=!1,t.setSlideState(o)):e.isAddApp&&(ae("[Slide] init by renderSlide",1),t.renderSlide(1)),this.pollReadyState()}},{key:"registerEventListeners",value:function(){var e=this,t=this.context,n=this.slide,r=this.sideEffect.addDisposer(t.storage.addStateChangedListener((function(){t.storage.state.state&&(e.syncStateOnce(),e.sideEffect.flush(r))})));this.sideEffect.add((function(){return t.addMagixEventListener(L.SLIDE_EVENTS.syncDispatch,e.magixEventListener,{fireSelfEventAfterCommit:!0})})),n.on(L.SLIDE_EVENTS.renderStart,this.onRenderStart),n.on(L.SLIDE_EVENTS.slideChange,this.onPageChanged),n.on(L.SLIDE_EVENTS.renderEnd,this.onTransitionEnd),n.on(L.SLIDE_EVENTS.mainSeqStepStart,this.onTransitionStart),n.on(L.SLIDE_EVENTS.mainSeqStepEnd,this.onTransitionEnd),n.on(L.SLIDE_EVENTS.renderError,this.onError),n.on(L.SLIDE_EVENTS.stateChange,this.onStateChange),n.on(L.SLIDE_EVENTS.syncDispatch,this.onSyncDispatch),n.on(L.SLIDE_EVENTS.renderEnd,this.resolveReady),this.sideEffect.add((function(){return document.addEventListener("visibilitychange",e.onVisibilityChange),function(){return document.removeEventListener("visibilitychange",e.onVisibilityChange)}}))}},{key:"syncStateOnce",value:function(){if(this.syncStateOnceFlag){this.context.getIsWritable()&&this.context.storage.ensureState(ve);var e=this.context.storage.state.state;e&&(ae("[Slide] sync with state (once)",JSON.stringify(e)),this.slide.setSlideState(e),this.syncStateOnceFlag=!1)}}},{key:"createSlide",value:function(e){var t,n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=this.context.getAppOptions()||{},a=new L.Slide({anchor:e,interactive:!0,mode:"interactive",controller:oe.enable,enableGlobalClick:null==(t=o.enableGlobalClick)||t,renderOptions:{minFPS:o.minFPS||25,maxFPS:o.maxFPS||30,autoFPS:null==(n=o.autoFPS)||n,autoResolution:null==(r=o.autoResolution)||r,resolution:o.resolution,transactionBgColor:o.bgColor||ce(e),maxResolutionLevel:o.maxResolutionLevel,forceCanvas:o.forceCanvas,enableNvidiaDetect:o.enableNvidiaDetect},fixedFrameSize:o.fixedFrameSize,loaderDelegate:o.loaderDelegate,navigatorDelegate:o.navigatorDelegate,urlInterrupter:o.urlInterrupter,resourceTimeout:o.resourceTimeout,rtcAudio:o.rtcAudio,useLocalCache:o.useLocalCache,logger:o.logger,whiteTracker:i.whiteTracker,timestamp:this.timestamp});return a}},{key:"destroy",value:function(){this.sideEffect.flushAll(),this.destroyed||(ae("[Slide] destroy slide (once)"),this.slide.destroy(),this.destroyed=!0)}},{key:"pageCount",get:function(){return this._pageCount>0||(this._pageCount=this.slide.slideCount),this._pageCount}},{key:"page",get:function(){return this.slide.slideState.currentSlideIndex}}]),e}();var ye="undefined"!=typeof window,be=ye&&!("onscroll"in window)||"undefined"!=typeof navigator&&/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),xe=ye&&"IntersectionObserver"in window,_e=ye&&"classList"in document.createElement("p"),we=ye&&window.devicePixelRatio>1,Te={elements_selector:".lazy",container:be||ye?document:null,threshold:300,thresholds:null,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",data_bg:"bg",data_bg_hidpi:"bg-hidpi",data_bg_multi:"bg-multi",data_bg_multi_hidpi:"bg-multi-hidpi",data_bg_set:"bg-set",data_poster:"poster",class_applied:"applied",class_loading:"loading",class_loaded:"loaded",class_error:"error",class_entered:"entered",class_exited:"exited",unobserve_completed:!0,unobserve_entered:!1,cancel_on_exit:!0,callback_enter:null,callback_exit:null,callback_applied:null,callback_loading:null,callback_loaded:null,callback_error:null,callback_finish:null,callback_cancel:null,use_native:!1,restore_on_error:!1},Me=function(e){return Object.assign({},Te,e)},Se=function(e,t){var n,r="LazyLoad::Initialized",i=new e(t);try{n=new CustomEvent(r,{detail:{instance:i}})}catch(e){(n=document.createEvent("CustomEvent")).initCustomEvent(r,!1,!1,{instance:i})}window.dispatchEvent(n)},Ee="src",Ae="srcset",Ie="sizes",Ce="poster",Ne="llOriginalAttrs",ke="data",De="loading",Pe="loaded",Oe="applied",Re="error",Le="native",je="data-",Be="ll-status",Ue=function(e,t){return e.getAttribute(je+t)},ze=function(e){return Ue(e,Be)},Fe=function(e,t){return function(e,t,n){var r=je+t;null!==n?e.setAttribute(r,n):e.removeAttribute(r)}(e,Be,t)},Ge=function(e){return Fe(e,null)},He=function(e){return null===ze(e)},Ve=function(e){return ze(e)===Le},We=[De,Pe,Oe,Re],Ye=function(e,t,n,r){e&&(void 0===r?void 0===n?e(t):e(t,n):e(t,n,r))},Xe=function(e,t){_e?e.classList.add(t):e.className+=(e.className?" ":"")+t},Qe=function(e,t){_e?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\s+)"+t+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,"")},Ze=function(e){return e.llTempImage},qe=function(e,t){if(t){var n=t._observer;n&&n.unobserve(e)}},Je=function(e,t){e&&(e.loadingCount+=t)},Ke=function(e,t){e&&(e.toLoadCount=t)},$e=function(e){for(var t,n=[],r=0;t=e.children[r];r+=1)"SOURCE"===t.tagName&&n.push(t);return n},et=function(e,t){var n=e.parentNode;n&&"PICTURE"===n.tagName&&$e(n).forEach(t)},tt=function(e,t){$e(e).forEach(t)},nt=[Ee],rt=[Ee,Ce],it=[Ee,Ae,Ie],ot=[ke],at=function(e){return!!e[Ne]},st=function(e){return e[Ne]},ut=function(e){return delete e[Ne]},lt=function(e,t){if(!at(e)){var n={};t.forEach((function(t){n[t]=e.getAttribute(t)})),e[Ne]=n}},ct=function(e,t){if(at(e)){var n=st(e);t.forEach((function(t){!function(e,t,n){n?e.setAttribute(t,n):e.removeAttribute(t)}(e,t,n[t])}))}},ht=function(e,t,n){Xe(e,t.class_applied),Fe(e,Oe),n&&(t.unobserve_completed&&qe(e,t),Ye(t.callback_applied,e,n))},dt=function(e,t,n){Xe(e,t.class_loading),Fe(e,De),n&&(Je(n,1),Ye(t.callback_loading,e,n))},ft=function(e,t,n){n&&e.setAttribute(t,n)},pt=function(e,t){ft(e,Ie,Ue(e,t.data_sizes)),ft(e,Ae,Ue(e,t.data_srcset)),ft(e,Ee,Ue(e,t.data_src))},vt={IMG:function(e,t){et(e,(function(e){lt(e,it),pt(e,t)})),lt(e,it),pt(e,t)},IFRAME:function(e,t){lt(e,nt),ft(e,Ee,Ue(e,t.data_src))},VIDEO:function(e,t){tt(e,(function(e){lt(e,nt),ft(e,Ee,Ue(e,t.data_src))})),lt(e,rt),ft(e,Ce,Ue(e,t.data_poster)),ft(e,Ee,Ue(e,t.data_src)),e.load()},OBJECT:function(e,t){lt(e,ot),ft(e,ke,Ue(e,t.data_src))}},mt=["IMG","IFRAME","VIDEO","OBJECT"],gt=function(e,t){!t||function(e){return e.loadingCount>0}(t)||function(e){return e.toLoadCount>0}(t)||Ye(e.callback_finish,t)},yt=function(e,t,n){e.addEventListener(t,n),e.llEvLisnrs[t]=n},bt=function(e,t,n){e.removeEventListener(t,n)},xt=function(e){return!!e.llEvLisnrs},_t=function(e){if(xt(e)){var t=e.llEvLisnrs;for(var n in t){var r=t[n];bt(e,n,r)}delete e.llEvLisnrs}},wt=function(e,t,n){!function(e){delete e.llTempImage}(e),Je(n,-1),function(e){e&&(e.toLoadCount-=1)}(n),Qe(e,t.class_loading),t.unobserve_completed&&qe(e,n)},Tt=function(e,t,n){var r=Ze(e)||e;if(!xt(r)){!function(e,t,n){xt(e)||(e.llEvLisnrs={});var r="VIDEO"===e.tagName?"loadeddata":"load";yt(e,r,t),yt(e,"error",n)}(r,(function(i){!function(e,t,n,r){var i=Ve(t);wt(t,n,r),Xe(t,n.class_loaded),Fe(t,Pe),Ye(n.callback_loaded,t,r),i||gt(n,r)}(0,e,t,n),_t(r)}),(function(i){!function(e,t,n,r){var i=Ve(t);wt(t,n,r),Xe(t,n.class_error),Fe(t,Re),Ye(n.callback_error,t,r),n.restore_on_error&&ct(t,it),i||gt(n,r)}(0,e,t,n),_t(r)}))}},Mt=function(e,t,n){!function(e){e.llTempImage=document.createElement("IMG")}(e),Tt(e,t,n),function(e){at(e)||(e[Ne]={backgroundImage:e.style.backgroundImage})}(e),function(e,t,n){var r=Ue(e,t.data_bg),i=Ue(e,t.data_bg_hidpi),o=we&&i?i:r;o&&(e.style.backgroundImage='url("'.concat(o,'")'),Ze(e).setAttribute(Ee,o),dt(e,t,n))}(e,t,n),function(e,t,n){var r=Ue(e,t.data_bg_multi),i=Ue(e,t.data_bg_multi_hidpi),o=we&&i?i:r;o&&(e.style.backgroundImage=o,ht(e,t,n))}(e,t,n),function(e,t,n){var r=Ue(e,t.data_bg_set);if(r){var i=r.split("|"),o=i.map((function(e){return"image-set(".concat(e,")")}));e.style.backgroundImage=o.join(),""===e.style.backgroundImage&&(o=i.map((function(e){return"-webkit-image-set(".concat(e,")")})),e.style.backgroundImage=o.join()),ht(e,t,n)}}(e,t,n)},St=function(e,t,n){Tt(e,t,n),function(e,t,n){var r=vt[e.tagName];r&&(r(e,t),dt(e,t,n))}(e,t,n)},Et=function(e,t,n){!function(e){return mt.indexOf(e.tagName)>-1}(e)?Mt(e,t,n):St(e,t,n)},At=function(e,t,n){e.setAttribute("loading","lazy"),Tt(e,t,n),function(e,t){var n=vt[e.tagName];n&&n(e,t)}(e,t),Fe(e,Le)},It=function(e){e.removeAttribute(Ee),e.removeAttribute(Ae),e.removeAttribute(Ie)},Ct=function(e){et(e,(function(e){ct(e,it)})),ct(e,it)},Nt={IMG:Ct,IFRAME:function(e){ct(e,nt)},VIDEO:function(e){tt(e,(function(e){ct(e,nt)})),ct(e,rt),e.load()},OBJECT:function(e){ct(e,ot)}},kt=function(e){var t=Nt[e.tagName];t?t(e):function(e){if(at(e)){var t=st(e);e.style.backgroundImage=t.backgroundImage}}(e)},Dt=function(e,t){kt(e),function(e,t){He(e)||Ve(e)||(Qe(e,t.class_entered),Qe(e,t.class_exited),Qe(e,t.class_applied),Qe(e,t.class_loading),Qe(e,t.class_loaded),Qe(e,t.class_error))}(e,t),Ge(e),ut(e)},Pt=function(e,t,n,r){n.cancel_on_exit&&function(e){return ze(e)===De}(e)&&"IMG"===e.tagName&&(_t(e),function(e){et(e,(function(e){It(e)})),It(e)}(e),Ct(e),Qe(e,n.class_loading),Je(r,-1),Ge(e),Ye(n.callback_cancel,e,t,r))},Ot=function(e,t,n,r){var i=function(e){return We.indexOf(ze(e))>=0}(e);Fe(e,"entered"),Xe(e,n.class_entered),Qe(e,n.class_exited),function(e,t,n){t.unobserve_entered&&qe(e,n)}(e,n,r),Ye(n.callback_enter,e,t,r),i||Et(e,n,r)},Rt=["IMG","IFRAME","VIDEO"],Lt=function(e){return e.use_native&&"loading"in HTMLImageElement.prototype},jt=function(e,t,n){e.forEach((function(e){return function(e){return e.isIntersecting||e.intersectionRatio>0}(e)?Ot(e.target,e,t,n):function(e,t,n,r){He(e)||(Xe(e,n.class_exited),Pt(e,t,n,r),Ye(n.callback_exit,e,t,r))}(e.target,e,t,n)}))},Bt=function(e,t){xe&&!Lt(e)&&(t._observer=new IntersectionObserver((function(n){jt(n,e,t)}),function(e){return{root:e.container===document?null:e.container,rootMargin:e.thresholds||e.threshold+"px"}}(e)))},Ut=function(e){return Array.prototype.slice.call(e)},zt=function(e){return e.container.querySelectorAll(e.elements_selector)},Ft=function(e){return function(e){return ze(e)===Re}(e)},Gt=function(e,t){return function(e){return Ut(e).filter(He)}(e||zt(t))},Ht=function(e,t){var n;(n=zt(e),Ut(n).filter(Ft)).forEach((function(t){Qe(t,e.class_error),Ge(t)})),t.update()},Vt=function(e,t){var n=Me(e);this._settings=n,this.loadingCount=0,Bt(n,this),function(e,t){ye&&(t._onlineHandler=function(){Ht(e,t)},window.addEventListener("online",t._onlineHandler))}(n,this),this.update(t)};Vt.prototype={update:function(e){var t,n,r=this._settings,i=Gt(e,r);(Ke(this,i.length),!be&&xe)?Lt(r)?function(e,t,n){e.forEach((function(e){-1!==Rt.indexOf(e.tagName)&&At(e,t,n)})),Ke(n,0)}(i,r,this):(t=this._observer,n=i,function(e){e.disconnect()}(t),function(e,t){t.forEach((function(t){e.observe(t)}))}(t,n)):this.loadAll(i)},destroy:function(){var e;this._observer&&this._observer.disconnect(),e=this,ye&&window.removeEventListener("online",e._onlineHandler),zt(this._settings).forEach((function(e){ut(e)})),delete this._observer,delete this._settings,delete this._onlineHandler,delete this.loadingCount,delete this.toLoadCount},loadAll:function(e){var t=this,n=this._settings;Gt(e,n).forEach((function(e){qe(e,t),Et(e,n,t)}))},restoreAll:function(){var e=this._settings;zt(e).forEach((function(t){Dt(t,e)}))}},Vt.load=function(e,t){var n=Me(t);Et(e,n)},Vt.resetStatus=function(e){Ge(e)},ye&&function(e,t){if(t)if(t.length)for(var n,r=0;n=t[r];r+=1)Se(e,n);else Se(e,t)}(Vt,window.lazyLoadOptions);var Wt=function(){function e(t){var n=this,r=t.readonly,i=t.onNewPageIndex,o=t.onPlay,a=t.onPagesReady,s=t.urlInterrupter;_(this,e),this._pages=[],this.pageIndex=0,this.setPaused=function(){n.$btnPlay.classList.toggle(n.wrapClassName("footer-btn-playing"),!1)},this.setPlaying=function(){n.$btnPlay.classList.toggle(n.wrapClassName("footer-btn-playing"),!0)},this.namespace="netless-app-slide",this.isShowPreview=!1,this.isSmallBox=!1,this.sideEffect=new z,this.readonly=r,this.onNewPageIndex=i,this.onPlay=o,this.onPagesReady=a,this.urlInterrupter=s||function(e){return e},this.render()}var t;return T(e,[{key:"unmount",value:function(){this.$content.remove(),this.$footer.remove()}},{key:"setReadonly",value:function(e){this.readonly=e,this.$content.classList.toggle(this.wrapClassName("readonly"),e),this.$footer.classList.toggle(this.wrapClassName("readonly"),e),this.$pageNumberInput.disabled=e}},{key:"destroy",value:function(){var e;null==(e=this.previewLazyLoad)||e.destroy(),this.sideEffect.flushAll(),this.unmount()}},{key:"setPageIndex",value:function(e){Number.isNaN(e)||(this.pageIndex=e,this.$pageNumberInput.value=String(e+1))}},{key:"refreshTotalPage",value:function(){this.pages.length?this.$totalPage.textContent=" / "+this.pages.length:this.$totalPage.textContent=""}},{key:"setSmallBox",value:function(e){this.isSmallBox!==e&&(this.isSmallBox=e,this.$footer.classList.toggle(this.wrapClassName("float-footer"),e))}},{key:"render",value:function(){return this.renderContent(),this.renderFooter(),this.$content}},{key:"renderContent",value:function(){if(!this.$content){var e=document.createElement("div");e.className=this.wrapClassName("content"),this.$content=e,this.readonly&&e.classList.add(this.wrapClassName("readonly")),e.appendChild(this.renderPreviewMask()),e.appendChild(this.renderPreview())}return this.$content}},{key:"renderPreview",value:function(){var e=this;if(!this.$preview){var t=document.createElement("div");t.className=this.wrapClassName("preview")+" tele-fancy-scrollbar",this.$preview=t,this.refreshPreview(),this.sideEffect.addEventListener(t,"click",(function(t){var n;if(!e.readonly){var r=null==(n=t.target.dataset)?void 0:n.pageIndex;r&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),e.onNewPageIndex(Number(r),"preview"),e.togglePreview(!1))}}))}return this.$preview}},{key:"refreshPreview",value:(t=l(regeneratorRuntime.mark((function e(){var t,n,r,i,o,a,s,u,l,c,h,d,f=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(r=this.$preview,i=this.wrapClassName("preview-page"),o=this.wrapClassName("preview-page-name");r.firstChild;)r.firstChild.remove();for(a=[],s=0,u=this.pages.length;s0?"":"none"}},{key:"renderFooter",value:function(){var e=this;if(!this.$footer){var t=document.createElement("div");t.className=this.wrapClassName("footer"),this.$footer=t,this.readonly&&t.classList.add(this.wrapClassName("readonly")),this.isSmallBox&&t.classList.add(this.wrapClassName("float-footer"));var n=this.renderFooterBtn("btn-sidebar",function(e){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"svg");n.setAttribute("class","".concat(e,"-footer-icon-sidebar")),n.setAttribute("viewBox","0 0 64 64");var r=document.createElementNS(t,"path");return r.setAttribute("fill","currentColor"),r.setAttribute("d","M50 8H14c-3.309 0-6 2.691-6 6v36c0 3.309 2.691 6 6 6h36c3.309 0 6-2.691 6-6V14c0-3.309-2.691-6-6-6zM12 50V14c0-1.103.897-2 2-2h8v40h-8c-1.103 0-2-.897-2-2zm40 0c0 1.103-.897 2-2 2H26V12h24c1.103 0 2 .897 2 2z"),n.appendChild(r),n}(this.namespace));this.sideEffect.addEventListener(n,"click",(function(){e.readonly||e.togglePreview()})),this.$btnSidebar=n,this.$btnSidebar.style.display="none",this.$footer.appendChild(n);var r=document.createElement("div");r.className=this.wrapClassName("page-jumps");var i=this.renderFooterBtn("btn-page-back",function(e){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"svg");n.setAttribute("class","".concat(e,"-footer-icon-arrow-left")),n.setAttribute("viewBox","0 0 500 500");var r=document.createElementNS(t,"path");return r.setAttribute("fill","currentColor"),r.setAttribute("d","M177.81 249.959L337.473 90.295c2.722-2.865 2.651-7.378-.143-10.1-2.793-2.65-7.163-2.65-9.956 0l-164.75 164.75c-2.793 2.793-2.793 7.306 0 10.1l164.75 164.75c2.865 2.722 7.378 2.65 10.099-.143 2.651-2.794 2.651-7.163 0-9.957L177.809 249.959z"),n.appendChild(r),n}(this.namespace));if(this.sideEffect.addEventListener(i,"click",(function(){e.readonly||e.onNewPageIndex(e.pageIndex-1,"navigation")})),r.appendChild(i),this.onPlay){var o=this.renderFooterBtn("btn-page-play",function(e){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"svg");n.setAttribute("class","".concat(e,"-footer-icon-play")),n.setAttribute("viewBox","0 0 500 500");var r=document.createElementNS(t,"path");return r.setAttribute("fill","currentColor"),r.setAttribute("d","M418.158 257.419L174.663 413.33c-6.017 3.919-15.708 3.772-21.291-.29-2.791-2.018-4.295-4.483-4.295-7.084V94.109c0-5.65 6.883-10.289 15.271-10.289 4.298 0 8.391 1.307 11.181 3.332l242.629 155.484c6.016 3.917 6.451 10.292.649 14.491-.216.154-.432.154-.649.292zM170.621 391.288l223.116-141.301L170.71 107.753l-.089 283.535z"),n.appendChild(r),n}(this.namespace),function(e){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"svg");n.setAttribute("class","".concat(e,"-footer-icon-pause")),n.setAttribute("viewBox","0 0 500 500");var r=document.createElementNS(t,"path");return r.setAttribute("fill","currentColor"),r.setAttribute("d","M312.491 78.261c0-6.159 4.893-11.213 11.04-11.213 6.158 0 11.211 5.054 11.211 11.213v343.478c0 6.159-5.053 11.213-11.211 11.213-6.147 0-11.04-5.054-11.04-11.213V78.261zM165.257 78.261c0-6.159 4.893-11.213 11.04-11.213 6.158 0 11.211 5.054 11.211 11.213v343.478c0 6.159-5.053 11.213-11.211 11.213-6.147 0-11.04-5.054-11.04-11.213V78.261z"),n.appendChild(r),n}(this.namespace));this.$btnPlay=o,this.sideEffect.addEventListener(o,"click",(function(){e.readonly||(e.setPlaying(),e.onPlay&&e.onPlay())})),r.appendChild(o)}var a=this.renderFooterBtn("btn-page-next",function(e){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"svg");n.setAttribute("class","".concat(e,"-footer-icon-arrow-right")),n.setAttribute("viewBox","0 0 500 500");var r=document.createElementNS(t,"path");return r.setAttribute("fill","currentColor"),r.setAttribute("d","M322.19 250.041L162.527 409.705c-2.722 2.865-2.651 7.378.143 10.1 2.793 2.65 7.163 2.65 9.956 0l164.75-164.75c2.793-2.793 2.793-7.306 0-10.1l-164.75-164.75c-2.865-2.722-7.378-2.65-10.099.143-2.651 2.794-2.651 7.163 0 9.957l159.664 159.736z"),n.appendChild(r),n}(this.namespace));this.sideEffect.addEventListener(a,"click",(function(){e.readonly||e.onNewPageIndex(e.pageIndex+1,"navigation")})),r.appendChild(a);var s=document.createElement("div");s.className=this.wrapClassName("page-number");var u=document.createElement("input");u.className=this.wrapClassName("page-number-input"),u.value=String(this.pageIndex+1),this.readonly&&(u.disabled=!0),this.$pageNumberInput=u,this.sideEffect.addEventListener(u,"focus",(function(){u.select()})),this.sideEffect.addEventListener(u,"change",(function(){e.readonly||u.value&&e.onNewPageIndex(Number(u.value)-1,"input")}));var l=document.createElement("span");this.$totalPage=l,s.appendChild(u),s.appendChild(l),this.$footer.appendChild(r),this.$footer.appendChild(s)}return this.$footer}},{key:"renderFooterBtn",value:function(e,t,n){var r=document.createElement("button");return r.className=this.wrapClassName("footer-btn")+" "+this.wrapClassName(e),r.appendChild(t),n&&r.appendChild(n),r}},{key:"togglePreview",value:function(e){if(this.isShowPreview=null!=e?e:!this.isShowPreview,this.$content.classList.toggle(this.wrapClassName("preview-active"),this.isShowPreview),this.isShowPreview){var t=this.$preview.querySelector("."+this.wrapClassName("preview-page-".concat(this.pageIndex)));t&&(this.previewLazyLoad||(this.previewLazyLoad=new Vt({container:this.$preview,elements_selector:".".concat(this.wrapClassName("preview-page>img"))})),this.$preview.scrollTo({top:t.offsetTop-16}))}}},{key:"wrapClassName",value:function(e){return"".concat(this.namespace,"-").concat(e)}},{key:"pages",set:function(e){this._pages=e,this.refreshPreview().then(this.refreshBtnSidebar.bind(this)),this.refreshTotalPage(),this.onPagesReady&&this.onPagesReady(e)},get:function(){return this._pages}}]),e}(),Yt=new Set(["clicker"]),Xt=function(){},Qt=function(){function e(t){var r=this,i=t.box,o=t.view,a=t.mountSlideController,s=t.mountWhiteboard,u=t.baseScenePath,c=t.appId,h=t.urlInterrupter,d=t.onPagesReady,f=t.onNavigate;_(this,e),this.slideController=null,this.isViewMounted=!1,this.onError=function(e){var t,n,i=e.error,o=e.index;r.viewer.setPaused(),(null==(t=r.slideController)?void 0:t.showRenderError)&&(r.$overlay.textContent="Error on slide[page=".concat(r.slideController.page,"]: ").concat(i.message),r.$overlay.style.opacity="1"),(null==(n=r.slideController)?void 0:n.onRenderError)&&r.slideController.onRenderError(i,o),oe.warn("[Slide] render error",i)},this.onRenderStart=function(){r.$whiteboardView.classList.add(r.wrapClassName("wb-view-hidden")),r.viewer.setPlaying()},this.onRenderEnd=function(){},this.onPageChanged=function(){clearTimeout(r._onPageChangedTimer),r._onPageChangedTimer=setTimeout(r._onPageChanged,200)},this._onPageChangedTimer=0,this._onPageChanged=function(){r.$overlay.style.opacity="",r.$whiteboardView.classList.remove(r.wrapClassName("wb-view-hidden"))},this.refreshPages=function(){r.slideController&&(r.viewer.pages=de(r.slideController.slide),r.viewer.setPageIndex(r.getPageIndex(r.slideController.page)),r.scaleDocsToFit())},this.scaleDocsToFit=function(){if(r.slideController){var e=r.slideController.slide,t=e.width,n=e.height;t&&n&&(r.whiteboardView.moveCameraToContain({originX:-t/2,originY:-n/2,width:t,height:n,animationMode:"immediately"}),r.whiteboardView.setCameraBound({damping:1,maxContentMode:function(){return r.whiteboardView.camera.scale},minContentMode:function(){return r.whiteboardView.camera.scale},centerX:0,centerY:0,width:t,height:n}),r.isViewMounted||(r.isViewMounted=!0,console.log("[Slide] mount whiteboard view"),r.mountWhiteboard(r.$whiteboardView)))}},this.onPlay=function(){r.slideController&&r.slideController.slide.nextStep()},this.onNewPageIndex=function(e,t){r.slideController&&r.slideController.jumpToPage(e+1,t)},this.sideEffect=new z,this.namespace="netless-app-slide",this.toPdf=l(regeneratorRuntime.mark((function e(){var t,i,o,a,s,u,l,c,h,d,f,p,v,m,g,y,b,x,_,w;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.slideController){e.next=3;break}return r.reportProgress(100,null),e.abrupt("return");case 3:if(t=r.slideController.slide,i=1920,o=document.createElement("canvas"),a=o.getContext("2d"),s=t.slideCount,u=t.width,l=t.height,c=Math.floor(u),h=Math.floor(l),c>i&&(c=i,h=Math.floor(l*c/u)),h>i&&(h=i,c=Math.floor(u*h/l)),o.width=c,o.height=h,(d=document.createElement("canvas")).width=c,d.height=h,(f=d.getContext("2d"))&&r.getWhiteSnapshot&&a){e.next=21;break}return r.reportProgress(100,null),e.abrupt("return",null);case 21:return p=c>h?"l":"p",e.next=24,Promise.resolve().then(n.bind(n,88877));case 24:v=e.sent,m=v.jsPDF,g=new m({format:[c,h],orientation:p,compress:!0}),y=1;case 28:if(!(y<=s)){e.next=57;break}return b=null,e.prev=30,e.next=33,r.slideController.slide.snapshotWithTimingEnd(y);case 33:b=e.sent,e.next=38;break;case 36:e.prev=36,e.t0=e.catch(30);case 38:if(!b){e.next=40;break}return e.delegateYield(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=document.createElement("img")).src=b,e.next=4,new Promise((function(e){return t.onload=e}));case 4:a.drawImage(t,0,0,c,h);case 5:case"end":return e.stop()}}),e)}))(),"t1",40);case 40:return f.clearRect(0,0,c,h),r.getWhiteSnapshot(y,d,f,u,l),e.prev=42,e.delegateYield(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=d.toDataURL("image/png"),(n=document.createElement("img")).src=t,e.next=5,new Promise((function(e){return n.onload=e}));case 5:a.drawImage(n,0,0,c,h);case 6:case"end":return e.stop()}}),e)}))(),"t2",44);case 44:e.next=48;break;case 46:e.prev=46,e.t3=e.catch(42);case 48:x=o.toDataURL("image/jpeg",.6),y>1&&g.addPage(),g.addImage(x,"JPEG",0,0,c,h,"","FAST"),a.clearRect(0,0,c,h),Math.ceil(y/s*100)<100&&r.reportProgress(Math.ceil(y/s*100),null);case 54:y++,e.next=28;break;case 57:_=g.output("arraybuffer"),w=r.box.title,r.reportProgress(100,{pdf:_,title:w});case 60:case"end":return e.stop()}}),e,null,[[30,36],[42,46]])}))),this.box=i,this.whiteboardView=o,this.mountSlideController=a,this.mountWhiteboard=s,this.onNavigate=f||Xt,this.baseScenePath=u,this.appId=c,this.viewer=new Wt({readonly:i.readonly,onNewPageIndex:this.onNewPageIndex,onPlay:this.onPlay,urlInterrupter:h,onPagesReady:d}),this.sideEffect.add((function(){var e=function(e){r.setReadonly(e)};return i.events.on("readonly",e),function(){return i.events.off("readonly",e)}})),this.sideEffect.add((function(){var e=function(e){"@netless/_request_save_pdf_"===e.data.type&&e.data.appId===r.appId&&r.toPdf().catch((function(){return r.reportProgress(100,null)}))};return window.addEventListener("message",e),function(){window.removeEventListener("message",e)}})),this.render()}return T(e,[{key:"render",value:function(){var e=this;this.viewer.$content.appendChild(this.renderSlideContainer()),this.viewer.$content.appendChild(this.renderWhiteboardView()),this.viewer.$content.appendChild(this.renderOverlay()),this.sideEffect.addEventListener(window,"keydown",(function(t){if(e.box.focus&&e.slideController&&!function(e){if(!e)return!1;var t=e.tagName;return"INPUT"===t||"TEXTAREA"===t||"SELECT"===t}(t.target))switch(t.key){case"ArrowUp":case"ArrowLeft":e.slideController.slide.prevStep(),e.onNavigate(e.slideController.page,"keydown");break;case"ArrowRight":case"ArrowDown":e.slideController.slide.nextStep(),e.onNavigate(e.slideController.page,"keydown")}}))}},{key:"renderOverlay",value:function(){if(!this.$overlay){var e=document.createElement("div");e.className=this.wrapClassName("overlay"),this.$overlay=e}return this.$overlay}},{key:"renderSlideContainer",value:function(){if(!this.$slide){var e=document.createElement("div");e.className=this.wrapClassName("slide"),e.dataset.appKind="Slide",this.$slide=e}return this.$slide}},{key:"renderWhiteboardView",value:function(){return this.$whiteboardView||(this.$whiteboardView=document.createElement("div"),this.$whiteboardView.className=this.wrapClassName("wb-view")),this.$whiteboardView}},{key:"mount",value:function(){var e=this;return this.box.mountContent(this.viewer.$content),this.box.mountFooter(this.viewer.$footer),this.slideController=this.mountSlideController({anchor:this.$slide,onRenderStart:this.onRenderStart,onRenderEnd:this.onRenderEnd,onTransitionStart:this.viewer.setPlaying,onTransitionEnd:this.viewer.setPaused,onReady:this.refreshPages,onNavigate:this.onNavigate,onError:this.onError}),this.scaleDocsToFit(),this.sideEffect.add((function(){return e.whiteboardView.callbacks.on("onSizeUpdated",e.scaleDocsToFit),function(){return e.whiteboardView.callbacks.off("onSizeUpdated",e.scaleDocsToFit)}})),this}},{key:"getPageIndex",value:function(e){return(e>0?e:1)-1}},{key:"unmount",value:function(){return this.slideController&&(this.slideController.destroy(),this.slideController=null),this.viewer.unmount(),this}},{key:"setReadonly",value:function(e){this.viewer.setReadonly(e)}},{key:"destroy",value:function(){this.sideEffect.flushAll(),this.unmount(),this.viewer.destroy()}},{key:"toggleClickThrough",value:function(e){this.$whiteboardView.style.pointerEvents=!e||Yt.has(e)?"none":"auto"}},{key:"wrapClassName",value:function(e){return"".concat(this.namespace,"-").concat(e)}},{key:"getWhiteSnapshot",value:function(e,t,n,r,i){this.whiteboardView.screenshotToCanvas(n,"".concat(this.baseScenePath,"/").concat(e),t.width,t.height,{centerX:0,centerY:0,scale:Math.min(t.width/r,t.height/i)})}},{key:"reportProgress",value:function(e,t){window.postMessage({type:"@netless/_result_save_pdf_",appId:this.appId,progress:e,result:t})}}]),e}(),Zt=!1,qt=2;t.FreezerLength=qt;var Jt=function(e){return"["+e+"]"},Kt={map:new Map,boxes:new Map,queue:[],validateQueue:function(){var e=this;for(this.queue.sort((function(t,n){var r,i,o,a;return-((null!=(i=null==(r=e.boxes.get(t))?void 0:r.zIndex)?i:0)-(null!=(a=null==(o=e.boxes.get(n))?void 0:o.zIndex)?a:0))})),ae("[Slide] freezer: validate",Jt(this.queue));this.queue.length>qt;){var t=this.queue.pop(),n=this.map.get(t);n&&(ae("[Slide] freezer: validate-freeze",t,Jt(this.queue)),n.freeze())}},set:function(e,t,n){ae("[Slide] freezer: add",e,Jt(this.queue)),this.map.set(e,t),this.boxes.set(e,n),this.queue.includes(e)||this.queue.unshift(e),this.validateQueue()},delete:function(e){this.map.delete(e),this.boxes.delete(e),this.queue=this.queue.filter((function(t){return t!==e})),ae("[Slide] freezer: delete",e,Jt(this.queue))},focus:function(e){var t=this.map.get(e),n=this.queue.indexOf(e);n>-1&&this.queue.splice(n,1),this.queue.unshift(e),this.validateQueue(),ae("[Slide] freezer: focus",e,Jt(this.queue)),t&&t.unfreeze()}};t.apps=Kt;var $t=new Set;var en=new Set;t.addHooks=function(e){Zt=!0,e.on("focus",(function(e){var t=e.appId;Kt.focus(t)})),e.on("created",(function(e){var t=e.appId;$t.forEach((function(e){return e(t)}))})),e.on("destroy",(function(e){var t=e.appId;en.forEach((function(e){return e(t)}))}))};var tn=function(){return".netless-app-slide-content{position:relative;height:100%;overflow:hidden}.netless-app-slide-preview-mask{display:none;position:absolute;z-index:200;top:0;left:0;width:100%;height:100%}.netless-app-slide-preview{display:flex;flex-direction:column;align-items:center;position:absolute;z-index:300;top:0;left:0;width:33%;max-width:200px;height:100%;padding-top:10px;transform:translate(-100%);background:rgba(237,237,240,.9);box-shadow:inset -1px 0 #0000001c;transition:transform .4s}.netless-app-slide-preview-active .netless-app-slide-preview-mask{display:block}.netless-app-slide-preview-active .netless-app-slide-preview{transform:translate(0)}.netless-app-slide-preview-page{position:relative;display:block;width:55%;margin-bottom:10px;font-size:0;color:transparent;outline:none;border:7px solid transparent;border-radius:4px;transition:border-color .3s;user-select:none}.netless-app-slide-preview-page:hover,.netless-app-slide-preview-page.netless-app-slide-preview-page-active{border-color:#444e601a}.netless-app-slide-preview-page>img{width:100%;height:auto;box-sizing:border-box;border:1px solid rgba(0,0,0,.5);border-radius:1px;background-color:#fff;box-shadow:0 2px 8px #0000004d}.netless-app-slide-preview-page-name{position:absolute;top:1px;left:-10px;transform:translate(-100%);text-align:right;font-size:12px;color:#5f5f5f;user-select:none}.netless-app-slide-footer{box-sizing:border-box;height:26px;display:flex;align-items:center;padding:0 16px;border-top:1px solid #eeeef7;color:#191919}.netless-app-slide-float-footer{width:100%;min-height:26px;position:absolute;left:0;bottom:0;z-index:2000;background:rgba(249,249,252,.9);transition:opacity .4s}.netless-app-slide-footer-btn{box-sizing:border-box;width:26px;height:26px;font-size:0;margin:0;padding:3px;border:none;border-radius:1px;outline:none;color:currentColor;background:transparent;transition:background .4s;cursor:pointer;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.netless-app-slide-footer-btn:hover{background:rgba(237,237,240,.9)}@media (hover: none){.netless-app-slide-footer-btn:hover{background:transparent!important}}.netless-app-slide-footer-btn>svg{width:100%;height:100%}.netless-app-slide-footer-btn>svg:nth-of-type(2){display:none}.netless-app-slide-footer-btn.netless-app-slide-footer-btn-playing>svg:nth-of-type(1){display:none}.netless-app-slide-footer-btn.netless-app-slide-footer-btn-playing>svg:nth-of-type(2){display:initial}.netless-app-slide-footer-btn~.netless-app-slide-footer-btn{margin-left:15px}.netless-app-slide-page-jumps{flex:1;display:flex;justify-content:center;align-items:center}.netless-app-slide-page-number{margin-left:auto;font-size:13px;user-select:none;white-space:nowrap;word-break:keep-all}.netless-app-slide-page-number-input{border:none;outline:none;width:3em;margin:0;padding:0 2px;text-align:right;font-size:13px;line-height:1;font-weight:400;font-family:inherit;border-radius:2px;color:currentColor;background:transparent;transition:background .4s;user-select:text;-webkit-tap-highlight-color:rgba(0,0,0,0)}.netless-app-slide-page-number-input:hover,.netless-app-slide-page-number-input:focus,.netless-app-slide-page-number-input:active{background:#fff;box-shadow:#63636333 0 2px 8px}.netless-app-slide-readonly.netless-app-slide-footer{display:none}.telebox-color-scheme-dark .netless-app-slide-page-number-input{color:#a6a6a8}.telebox-color-scheme-dark .netless-app-slide-page-number-input:active,.telebox-color-scheme-dark .netless-app-slide-page-number-input:focus,.telebox-color-scheme-dark .netless-app-slide-page-number-input:hover{color:#222}.telebox-color-scheme-dark .netless-app-slide-footer{color:#a6a6a8;background:#2d2d33;border-top:none}.telebox-color-scheme-dark .netless-app-slide-footer-btn:hover{background:#212126}.telebox-color-scheme-dark .netless-app-slide-preview{background:rgba(50,50,50,.9)}.netless-app-slide-wb-view{position:absolute;top:0;left:0;width:100%;height:100%;z-index:100;overflow:hidden;transition:opacity .2s}.netless-app-slide-wb-view-hidden{opacity:0}.netless-app-slide-overlay{display:flex;align-items:center;justify-content:center;position:absolute;z-index:200;top:0;left:0;width:100%;height:100%;padding:8px;background:rgba(255,0,0,.25);transition:opacity .3s;opacity:0;pointer-events:none}.netless-app-slide-slide{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.netless-app-slide-slide canvas{transform:scale(var(--netless-app-slide-scale, 1))}\n"}();var nn=function(){function e(t){var n=this;_(this,e),this.slide=null,this.debug=!1,this.sideEffect=new z,this.ready=!1,this.readyPromise=new Promise((function(e){n.resolveReady=function(){n.ready=!0,e()}})),this.hotkeyListener=function(e){if(n.slide)switch(e.key){case"ArrowUp":case"ArrowLeft":n.slide.prevStep();break;case"ArrowRight":case"ArrowDown":n.slide.nextStep()}},this.onPageChanged=function(e){n.viewer.setPageIndex(e-1)},this.onTransitionStart=function(){n.viewer.setPlaying()},this.onTransitionEnd=function(){n.viewer.setPaused()},this.onError=function(e){var t=e.error;n.viewer.setPaused(),console.warn("[Slide] render error",t)},this.destroyed=!1,this.refreshPages=function(){n.slide&&(n.viewer.pages=de(n.slide),n.viewer.setPageIndex(n.getPageIndex(n.slide.slideState.currentSlideIndex)))},this.onPlay=function(){n.slide&&n.slide.nextStep()},this.onNewPageIndex=function(e){n.slide&&n.slide.slideCount>0&&n.slide.renderSlide(G(e+1,1,n.slide.slideCount))},this.namespace="netless-app-slide",this.target=t.target,this.bgColor=ce(this.target),this.viewer=new Wt({readonly:!1,onNewPageIndex:this.onNewPageIndex,onPlay:this.onPlay}),this.render()}return T(e,[{key:"render",value:function(){this.viewer.$content.appendChild(this.renderSlideContainer()),this.registerHotKeys(window)}},{key:"registerHotKeys",value:function(e){this.sideEffect.addEventListener(e,"keydown",this.hotkeyListener,void 0,"hotkey")}},{key:"mount",value:function(e,t){this.target.appendChild(this.renderStyle()),this.target.appendChild(this.viewer.$content),this.target.appendChild(this.viewer.$footer),this.slide=new L.Slide({anchor:this.$slide,interactive:!0,mode:"local",controller:this.debug,enableGlobalClick:!0,renderOptions:{minFPS:25,maxFPS:30,autoFPS:!0,autoResolution:!0,transactionBgColor:this.bgColor}}),this.registerEventListeners(),this.slide.setResource(e,t),this.slide.renderSlide(1)}},{key:"renderStyle",value:function(){var e=document.createElement("style");return e.appendChild(document.createTextNode(tn)),e}},{key:"registerEventListeners",value:function(){if(this.slide){var e=this.slide;e.on(L.SLIDE_EVENTS.slideChange,this.onPageChanged),e.on(L.SLIDE_EVENTS.renderStart,this.onTransitionStart),e.on(L.SLIDE_EVENTS.renderEnd,this.onTransitionEnd),e.on(L.SLIDE_EVENTS.mainSeqStepStart,this.onTransitionStart),e.on(L.SLIDE_EVENTS.mainSeqStepEnd,this.onTransitionEnd),e.on(L.SLIDE_EVENTS.renderError,this.onError),e.on(L.SLIDE_EVENTS.renderEnd,this.resolveReady),this.readyPromise.then(this.refreshPages)}}},{key:"destroy",value:function(){this.sideEffect.flushAll(),this.slide&&!this.destroyed&&(this.slide.destroy(),this.destroyed=!0),this.viewer.destroy()}},{key:"getPageIndex",value:function(e){return(e>0?e:1)-1}},{key:"renderSlideContainer",value:function(){if(!this.$slide){var e=document.createElement("div");e.className=this.wrapClassName("slide"),e.dataset.appKind="Slide",this.$slide=e}return this.$slide}},{key:"wrapClassName",value:function(e){return"".concat(this.namespace,"-").concat(e)}}]),e}();t.SlidePreviewer=nn;var rn=L.Slide.usePlugin.bind(L.Slide);t.usePlugin=rn;var on="0.2.53";t.version=on;var an={kind:"Slide",setup:function(e){var t;if(console.log("[Slide] setup @ 0.2.53"),e.getIsWritable()&&e.storage.ensureState(ve),!e.storage.state.taskId)throw new Error("[Slide] no taskId");var n=e.getView();if(!n)throw new Error("[Slide] no view, please set scenePath on addApp()");n.disableCameraTransform=!0;var r=e.getBox();r.mountStyles(tn);try{r.$content.dataset.appSlideVersion=on}catch(e){}var i=e.getInitScenePath(),o=null,a=function(t){var n=e.getRoom();if(o&&o.slideController){var r=!1;n&&e.getIsWritable()&&(fe(n,e,o.slideController.slide,i),r=!0),ae("[Slide] page to",t,r?"(synced)":""),o.viewer.setPageIndex(t-1),o.viewer.setPaused(),o.onPageChanged();var a=o.viewer.pages.length;a>0&&e.dispatchAppEvent("pageStateChange",{index:t-1,length:a})}};o=new Qt({box:r,view:n,mountSlideController:function(t){var n,o,s=e.getAppOptions()||{},u=new ge((n=R({context:e},t),o={onPageChanged:a,onNavigate:t.onNavigate,onRenderError:s.onRenderError,showRenderError:s.showRenderError},C(n,N(o))));return Zt&&Kt.set(e.appId,u,r),oe.setAppController(e.appId,u),u.readyPromise.then(t.onReady).then((function(){var n=e.getRoom(),r=!1;n&&e.getIsWritable()&&(fe(n,e,u.slide,i),r=!0);var o=u.slide.slideState.currentSlideIndex;ae("[Slide] page to",o,r?"(synced)":"","(on ready)"),u.slide.on("renderEnd",t.onRenderEnd)})),u},mountWhiteboard:e.mountView.bind(e),baseScenePath:i,appId:e.appId,urlInterrupter:null==(t=e.getAppOptions())?void 0:t.urlInterrupter,onPagesReady:function(t){var n=t.length,r=(null==o?void 0:o.viewer.pageIndex)||0;e.dispatchAppEvent("pageStateChange",{index:r,length:n})},onNavigate:function(e,t){ae("[Slide] user navigate to",e,t?"(".concat(t,")"):"")}});var s=e.getRoom(),u=new z;return u.add((function(){var t;return oe.setAppContext(e.appId,e),oe.enable=(null==(t=e.getAppOptions())?void 0:t.debug)||!1,oe.level="debug",function(){return oe.deleteApp(e.appId)}})),s&&(o.toggleClickThrough(s.state.memberState.currentApplianceName),u.add((function(){var e=function(e){e.memberState&&o&&o.toggleClickThrough(e.memberState.currentApplianceName)};return s.callbacks.on("onRoomStateChanged",e),function(){return s.callbacks.off("onRoomStateChanged",e)}}))),e.emitter.on("destroy",(function(){ae("[Slide] destroy",e.appId),Zt&&Kt.delete(e.appId),u.flushAll(),o&&(o.destroy(),o=null)})),o.mount(),{viewer:function(){return o},controller:function(){return null==o?void 0:o.slideController},slide:function(){var e;return null==(e=null==o?void 0:o.slideController)?void 0:e.slide},nextStep:function(){var e;return!(!o||!o.slideController)&&(null==(e=null==o?void 0:o.slideController)||e.slide.nextStep(),!0)},prevStep:function(){var e;return!(!o||!o.slideController)&&(null==(e=null==o?void 0:o.slideController)||e.slide.prevStep(),!0)},position:function(){var e=null==o?void 0:o.slideController;if(e)return[e.page,e.pageCount]},nextPage:function(){var e=null==o?void 0:o.slideController;if(e){var t=e.page,n=e.pageCount;if(n>0&&t0&&t>1)return e.jumpToPage(t-1),!0}return!1},jumpToPage:function(e){var t=null==o?void 0:o.slideController;if(t){var n=t.page,r=t.pageCount;if(r>0&&n>0&&n<=r)return t.jumpToPage(e),!0}return!1}}}};t.default=an;var sn=L.Slide;t.Slide=sn},18808:function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}var t,n,r,i,o,a,s,u;void 0===CanvasRenderingContext2D.prototype.ellipse&&(CanvasRenderingContext2D.prototype.ellipse=function(e,t,n,r,i,o,a,s){this.save(),this.translate(e,t),this.rotate(i),this.scale(n,r),this.arc(0,0,1,o,a,s),this.restore()}),void 0===CanvasRenderingContext2D.prototype.resetTransform&&(CanvasRenderingContext2D.prototype.resetTransform=function(){this.setTransform(1,0,0,1,0,0)}),void 0===CanvasRenderingContext2D.prototype.getTransform&&(CanvasRenderingContext2D.prototype.getTransform=function(){return this._t2stack&&this._t2stack[this._t2stack.length-1]||{a:1,b:0,c:0,d:1,e:0,f:0}},CanvasRenderingContext2D.prototype.save=(t=CanvasRenderingContext2D.prototype.save,function(){this._t2stack||(this._t2stack=[{a:1,b:0,c:0,d:1,e:0,f:0}]);var e=this._t2stack[this._t2stack.length-1];this._t2stack.push(e&&{a:e.a,b:e.b,c:e.c,d:e.d,e:e.e,f:e.f}),t.call(this)}),CanvasRenderingContext2D.prototype.restore=(n=CanvasRenderingContext2D.prototype.restore,function(){this._t2stack&&this._t2stack.pop(),n.call(this)}),CanvasRenderingContext2D.prototype.transform=(r=CanvasRenderingContext2D.prototype.transform,function(e,t,n,i,o,a){this._t2stack||(this._t2stack=[{a:1,b:0,c:0,d:1,e:0,f:0}]);var s=this._t2stack[this._t2stack.length-1],u=s.a*e+s.c*t,l=s.b*e+s.d*t,c=s.a*n+s.c*i,h=s.b*n+s.d*i,d=s.e+s.a*o+s.c*a,f=s.f+s.b*o+s.d*a;s.a=u,s.b=l,s.c=c,s.d=h,s.e=d,s.f=f,r.call(this,e,t,n,i,o,a)}),CanvasRenderingContext2D.prototype.setTransform=(i=CanvasRenderingContext2D.prototype.setTransform,function(t,n,r,o,a,s){if(this._t2stack||(this._t2stack=[{}]),"object"===e(t)||void 0===t){var u=t.a,l=t.b,c=t.c,h=t.d,d=t.e,f=t.f;this._t2stack[this._t2stack.length-1]={a:u,b:l,c:c,d:h,e:d,f:f},i.call(this,u,l,c,h,d,f)}else this._t2stack[this._t2stack.length-1]={a:t,b:n,c:r,d:o,e:a,f:s},i.call(this,t,n,r,o,a,s)}),CanvasRenderingContext2D.prototype.resetTransform=(o=CanvasRenderingContext2D.prototype.resetTransform,function(){this._t2stack||(this._t2stack=[{}]),this._t2stack[this._t2stack.length-1]={a:1,b:0,c:0,d:1,e:0,f:0},o&&o.call(this)}),CanvasRenderingContext2D.prototype.scale=(a=CanvasRenderingContext2D.prototype.scale,function(e,t){this._t2stack||(this._t2stack=[{a:1,b:0,c:0,d:1,e:0,f:0}]);var n=this._t2stack[this._t2stack.length-1];e=e||1,t=t||e,n.a*=e,n.c*=t,n.b*=e,n.d*=t,a.call(this,e,t)}),CanvasRenderingContext2D.prototype.rotate=(s=CanvasRenderingContext2D.prototype.rotate,function(e){this._t2stack||(this._t2stack=[{a:1,b:0,c:0,d:1,e:0,f:0}]);var t=this._t2stack[this._t2stack.length-1],n=Math.cos(-e),r=Math.sin(-e),i=t.a*n-t.c*r,o=t.b*n-t.d*r,a=t.c*n+t.a*r,u=t.d*n+t.b*r;return t.a=i,t.b=o,t.c=a,t.d=u,s.call(this,e)}),CanvasRenderingContext2D.prototype.translate=(u=CanvasRenderingContext2D.prototype.translate,function(e,t){this._t2stack||(this._t2stack=[{a:1,b:0,c:0,d:1,e:0,f:0}]);var n=this._t2stack[this._t2stack.length-1];return n.e+=e*n.a+t*n.c,n.f+=e*n.b+t*n.d,u.call(this,e,t)}))},92710:function(e,t,n){function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==r(e)&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}({"./src/CombinePlayerImplement.ts":function(e,t,n){n.d(t,"a",(function(){return y}));var r=n("@babel/runtime/regenerator"),i=n.n(r),o=n("@babel/runtime/helpers/asyncToGenerator"),a=n.n(o),s=n("@babel/runtime/helpers/classCallCheck"),u=n.n(s),l=n("@babel/runtime/helpers/createClass"),c=n.n(l),h=function(e,t,n){"string"==typeof n?console.log("[Combine-Player][".concat(e,"]: ").concat(t," -"),n):console.log("[Combine-Player][".concat(e,"]: ").concat(t," -"),JSON.stringify(n,null,2))},d=n("./src/StatusContant.ts"),f=n("./src/EventEmitter.ts"),p=n("./src/ErrorConstant.ts");function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(this.statusIgnoreCrashByDisabled[0]);try{for(i.s();!(n=i.n()).done;){var o=n.value,a=o.video;if(t===o.whiteboard&&a===e){r=!0;break}}}catch(e){i.e(e)}finally{i.f()}return!r}},{key:"unlockCombineStatus",value:function(){this.statusLockInfo.isLocked=!1,this.statusLockInfo.allowStatusList=[],this.statusLockInfo.unLockStatusList=[]}},{key:"setPreviousStatus",value:function(e,t){this.whiteboardStatus.previous=e,this.videoStatus.previous=t}},{key:"dispatchEvent",value:function(e){var t=this,n=e.videoStatus,r=e.whiteboardStatus,i=e.combineStatus,o={whiteboard:this.getStatus(d.a.Whiteboard).previous,video:this.getStatus(d.a.Video).previous},a={whiteboard:r,video:n};this.debug("CombinedStatus",i,{previous:{whiteboard:d.b[o.whiteboard],video:d.b[o.video]},current:{whiteboard:d.b[a.whiteboard],video:d.b[a.video]}}),this.events.emit(i,o,a,(function(){t.setPreviousStatus(r,n)}))}},{key:"initTables",value:function(){var e=function(e){return function(t,n){return Object.freeze({combineStatus:e,whiteboardStatus:t,videoStatus:n})}},t=e(d.c.PauseSeeking),n=e(d.c.PlayingSeeking),r=e(d.c.PauseBuffering),i=e(d.c.PlayingBuffering),o=e(d.c.ToPlay),a=e(d.c.ToPause),s=e(d.c.Pause),u=e(d.c.Playing),l=e(d.c.Disabled),c=e(d.c.Ended);return Object.freeze([Object.freeze([t(d.b.PauseSeeking,d.b.PauseSeeking),t(d.b.PauseSeeking,d.b.Pause),l(d.b.PauseSeeking,d.b.PauseBuffering),l(d.b.PauseSeeking,d.b.PlayingBuffering),l(d.b.PauseSeeking,d.b.Playing),l(d.b.PauseSeeking,d.b.PlayingSeeking),t(d.b.PauseSeeking,d.b.Ended)]),Object.freeze([t(d.b.Pause,d.b.PauseSeeking),s(d.b.Pause,d.b.Pause),r(d.b.Pause,d.b.PauseBuffering),i(d.b.Pause,d.b.PlayingBuffering),o(d.b.Pause,d.b.Playing),n(d.b.Pause,d.b.PlayingSeeking),c(d.b.Pause,d.b.Ended)]),Object.freeze([l(d.b.PauseBuffering,d.b.PauseSeeking),r(d.b.PauseBuffering,d.b.Pause),r(d.b.PauseBuffering,d.b.PauseBuffering),l(d.b.PauseBuffering,d.b.PlayingBuffering),l(d.b.PauseBuffering,d.b.Playing),l(d.b.PauseBuffering,d.b.PlayingSeeking),l(d.b.PauseBuffering,d.b.Ended)]),[l(d.b.PlayingBuffering,d.b.PauseSeeking),i(d.b.PlayingBuffering,d.b.Pause),l(d.b.PlayingBuffering,d.b.PauseBuffering),i(d.b.PlayingBuffering,d.b.PlayingBuffering),a(d.b.PlayingBuffering,d.b.Playing),l(d.b.PlayingBuffering,d.b.PlayingSeeking),l(d.b.PlayingBuffering,d.b.Ended)],Object.freeze([l(d.b.Playing,d.b.PauseSeeking),o(d.b.Playing,d.b.Pause),l(d.b.Playing,d.b.PauseBuffering),a(d.b.Playing,d.b.PlayingBuffering),u(d.b.Playing,d.b.Playing),a(d.b.Playing,d.b.PlayingSeeking),a(d.b.Playing,d.b.Ended)]),Object.freeze([l(d.b.PlayingSeeking,d.b.PauseSeeking),n(d.b.PlayingSeeking,d.b.Pause),l(d.b.PlayingSeeking,d.b.PauseBuffering),l(d.b.PlayingSeeking,d.b.PlayingBuffering),a(d.b.PlayingSeeking,d.b.Playing),n(d.b.PlayingSeeking,d.b.PlayingSeeking),n(d.b.PlayingSeeking,d.b.Ended)]),Object.freeze([t(d.b.Ended,d.b.PauseSeeking),c(d.b.Ended,d.b.Pause),l(d.b.Ended,d.b.PauseBuffering),l(d.b.Ended,d.b.PlayingBuffering),a(d.b.Ended,d.b.Playing),n(d.b.Ended,d.b.PlayingSeeking),c(d.b.Ended,d.b.Ended)])])}}]),e}(),g=function(){function e(){u()(this,e),this.queue=[],this.isHanding=!1}var t;return c()(e,[{key:"append",value:function(e){var t=this;return new Promise((function(n,r){var i={handler:e,resolve:n,reject:r};t.queue.push(i),t.isHanding||t.startHandingTasksLoop()}))}},{key:"destroy",value:function(){this.queue=[]}},{key:"startHandingTasksLoop",value:(t=a()(i.a.mark((function e(){var t;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0,this.isHanding=!0;case 2:if(!(this.queue.length>0)){e.next=20;break}return t=this.queue[0],e.prev=4,e.t0=t,e.next=8,t.handler();case 8:e.t1=e.sent,e.t0.resolve.call(e.t0,e.t1),e.next=15;break;case 12:e.prev=12,e.t2=e.catch(4),t.reject(e.t2);case 15:return e.prev=15,this.queue.shift(),e.finish(15);case 18:e.next=2;break;case 20:e.next=25;break;case 22:throw e.prev=22,e.t3=e.catch(0),new Error(e.t3);case 25:return e.prev=25,this.isHanding=!1,e.finish(25);case 28:case"end":return e.stop()}}),e,this,[[0,22,25,28],[4,12,15,18]])}))),function(){return t.apply(this,arguments)})}]),e}(),y=function(){function e(t){u()(this,e),this.video=void 0,this.whiteboard=void 0,this.videoOptions=void 0,this.stateMachine=void 0,this._playbackRate=1,this.seekTime=NaN,this.triggerSource=d.e.None,this.currentCombineStatus=d.d.PauseBuffering,this.whiteboardEmitter=void 0,this.taskQueue=new g,this.onStatusChangeHandleList=[];var n=t.videoConfig,r=t.whiteboard,i=t.whiteboardEmitter,o=t.debug;this.videoOptions=n.videoOptions,this.video=n.video,this.whiteboard=r,this.whiteboardEmitter=i,this.stateMachine=new m(o),this.initOnCrashByDisabledStatusCallback(),this.initVideo(n.isCanplay),this.initWhiteboard()}var t,n,r,o,s,l,h,f,v,y,b,x,_,w,T,M,S,E;return c()(e,[{key:"setOnStatusChange",value:function(e){this.onStatusChangeHandleList.push(e)}},{key:"removeStatusChange",value:function(e){this.onStatusChangeHandleList=this.onStatusChangeHandleList.filter((function(t){return t!==e}))}},{key:"removeAllStatusChange",value:function(){this.onStatusChangeHandleList=[]}},{key:"getStatus",value:function(){return this.combinedStatus}},{key:"playbackSpeed",value:function(e){this.playbackRate=e}},{key:"stop",value:function(){if(this.currentCombineStatus===d.d.Stopped)throw new Error(p.d);if(this.currentCombineStatus===d.d.Disabled)throw new Error(p.c);this.releaseEvents(),this.onStatusUpdate(d.d.Stopped)}},{key:"play",value:(E=a()(i.a.mark((function e(){var t=this;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isNotResponse()){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.taskQueue.append(a()(i.a.mark((function e(){var n,r,o;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.triggerSource=d.e.Plugin,n=t.stateMachine.getCombinationStatus().current,e.t0=n,e.next=e.t0===d.c.Pause?5:e.t0===d.c.PauseBuffering?8:e.t0===d.c.Ended?24:27;break;case 5:return e.next=7,t.playWhenPause();case 7:return e.abrupt("break",27);case 8:if(r=t.stateMachine.getStatus(d.a.Video).current,o=t.stateMachine.getStatus(d.a.Whiteboard).current,r!==d.b.Pause||o!==d.b.PauseBuffering){e.next=15;break}return e.next=13,t.playWhenVideoIsPauseAndWhiteboardIsPauseBuffering();case 13:e.next=23;break;case 15:if(r!==d.b.PauseBuffering||o!==d.b.Pause){e.next=21;break}return t.onStatusUpdate(d.d.PlayingBuffering),e.next=19,t.playWhenPause();case 19:e.next=23;break;case 21:return e.next=23,t.playWhenAllPlayerIsPauseBuffering();case 23:return e.abrupt("break",27);case 24:return e.next=26,t.playWhenEnded();case 26:return e.abrupt("break",27);case 27:if(isNaN(t.seekTime)){e.next=31;break}return e.next=30,t.seekWhenPlaying(t.seekTime);case 30:t.seekTime=NaN;case 31:t.triggerSource=d.e.None;case 32:case"end":return e.stop()}}),e)}))));case 4:case"end":return e.stop()}}),e,this)}))),function(){return E.apply(this,arguments)})},{key:"pause",value:(S=a()(i.a.mark((function e(){var t=this;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isNotResponse()){e.next=2;break}return e.abrupt("return");case 2:return e.abrupt("return",this.taskQueue.append(a()(i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.triggerSource=d.e.Plugin,t.stateMachine.getCombinationStatus().current!==d.c.Playing){e.next=5;break}return e.next=5,t.pauseWhenPlaying();case 5:t.triggerSource=d.e.None;case 6:case"end":return e.stop()}}),e)})))));case 3:case"end":return e.stop()}}),e,this)}))),function(){return S.apply(this,arguments)})},{key:"seek",value:(M=a()(i.a.mark((function e(t){var n=this;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isNotResponse()){e.next=2;break}return e.abrupt("return");case 2:return e.abrupt("return",this.taskQueue.append(a()(i.a.mark((function e(){var r,o,a,s,u,l,c,h,f;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n.whiteboard.progressTime,o=n.video.currentTime(),0!==r||0!==o){e.next=5;break}return 0!==t&&(n.seekTime=t),e.abrupt("return");case 5:n.triggerSource=d.e.Plugin,a=n.stateMachine.getCombinationStatus().current,e.t0=a,e.next=e.t0===d.c.Playing?10:e.t0===d.c.Pause||e.t0===d.c.PauseBuffering?13:e.t0===d.c.Ended?23:30;break;case 10:return e.next=12,n.seekWhenPlaying(t);case 12:return e.abrupt("break",30);case 13:if(s=n.getPlayerDuration(),u=s.video,l=s.whiteboard,!(t>u||t>l)){e.next=20;break}return e.next=18,n.seekWhenPauseFinallyIsEnded(t,s);case 18:e.next=22;break;case 20:return e.next=22,n.seekWhenPause(t);case 22:return e.abrupt("break",30);case 23:if(c=n.getPlayerDuration(),h=c.video,f=c.whiteboard,!(t<=h&&t<=f)){e.next=29;break}return e.next=27,n.seekWhenPause(t);case 27:return e.next=29,n.playWhenPause();case 29:return e.abrupt("break",30);case 30:n.triggerSource=d.e.None;case 31:case"end":return e.stop()}}),e)})))));case 3:case"end":return e.stop()}}),e,this)}))),function(e){return M.apply(this,arguments)})},{key:"initVideo",value:function(e){this.stateMachine.setStatus(d.a.Video,e?d.b.Pause:d.b.PauseBuffering),e||(this.currentCombineStatus=d.d.PauseBuffering),this.initVideoJSEvents()}},{key:"initVideoJSEvents",value:function(){var e=this,t=!1,n=function(t){return a()(i.a.mark((function n(){return i.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(e.triggerSource!==d.e.None&&e.triggerSource!==d.e.Video){n.next=4;break}return e.triggerSource=d.e.Video,n.next=4,t();case 4:case"end":return n.stop()}}),n)})))};this.video.on("canplay",(function(){var t=e.stateMachine.getStatus(d.a.Whiteboard).current;e.stateMachine.getStatus(d.a.Video).current===d.b.PauseBuffering&&(e.stateMachine.setStatus(d.a.Video,d.b.Pause),t===d.b.Pause&&e.onStatusUpdate(d.d.Pause))})),this.video.on("seeking",n(a()(i.a.mark((function n(){return i.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,e.taskQueue.append((function(){t=!0}));case 2:case"end":return n.stop()}}),n)}))))),this.video.on("waiting",n(a()(i.a.mark((function t(){return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.onStatusUpdate(d.d.PlayingBuffering),t.next=3,e.taskQueue.append((function(){return e.pauseWhiteboardWhenVideoWaiting()}));case 3:e.triggerSource=d.e.None;case 4:case"end":return t.stop()}}),t)}))))),this.video.on("playing",n(a()(i.a.mark((function n(){return i.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,e.taskQueue.append(a()(i.a.mark((function n(){return i.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!t){n.next=2;break}return n.abrupt("return",e.playingWhiteboardWhenVideoPlayingDropFrame());case 2:return n.abrupt("return",e.playingWhiteboardWhenVideoPlaying());case 3:case"end":return n.stop()}}),n)}))));case 2:t=!1,e.triggerSource=d.e.None;case 4:case"end":return n.stop()}}),n)}))))),this.video.on("ended",n(a()(i.a.mark((function t(){return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.taskQueue.append((function(){return e.pauseWhiteboardWhenVideoEnded()}));case 2:e.triggerSource=d.e.None;case 3:case"end":return t.stop()}}),t)}))))),this.video.on("fullscreenchange",n(a()(i.a.mark((function t(){return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.taskQueue.append((function(){var t=e.stateMachine.getStatus(d.a.Video).current;t!==d.b.Playing&&t!==d.b.PlayingBuffering||!e.video.isFullscreen()&&e.video.paused()&&(e.whiteboardEmitter.one("pause",(function(){e.stateMachine.setStatus(d.a.Whiteboard,d.b.Pause),e.stateMachine.setStatus(d.a.Video,d.b.Pause),e.onStatusUpdate(d.d.Pause)})),e.whiteboard.pause()),e.triggerSource=d.e.None}));case 2:case"end":return t.stop()}}),t)})))))}},{key:"initWhiteboard",value:function(){this.initWhiteboardIsPlayable(),this.initWhiteboardEvents(),this.stateMachine.setStatus(d.a.Whiteboard,d.b.PauseBuffering),this.currentCombineStatus=d.d.PauseBuffering,this.whiteboard.seekToProgressTime(0)}},{key:"initWhiteboardIsPlayable",value:function(){var e=this;this.whiteboardEmitter.addListener("playableChange",(function(t){var n=e.stateMachine.getStatus(d.a.Whiteboard).current,r=e.stateMachine.getStatus(d.a.Video).current;t&&n===d.b.PauseBuffering&&(e.stateMachine.setStatus(d.a.Whiteboard,d.b.Pause),r===d.b.Pause&&e.onStatusUpdate(d.d.Pause))}))}},{key:"initWhiteboardEvents",value:function(){var e=this,t=function(t){return a()(i.a.mark((function n(){return i.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(e.triggerSource!==d.e.None&&e.triggerSource!==d.e.Whiteboard){n.next=5;break}return e.triggerSource=d.e.Whiteboard,n.next=4,t();case 4:e.triggerSource=d.e.None;case 5:case"end":return n.stop()}}),n)})))};this.whiteboardEmitter.addListener("buffering",t(a()(i.a.mark((function t(){return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.taskQueue.append((function(){return e.pauseVideoWhenWhiteboardBuffering()}));case 2:case"end":return t.stop()}}),t)}))))),this.whiteboardEmitter.addListener("playing",t(a()(i.a.mark((function t(){return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.taskQueue.append((function(){return e.playingVideoWhenWhiteboardPlaying()}));case 2:case"end":return t.stop()}}),t)}))))),this.whiteboardEmitter.addListener("ended",t(a()(i.a.mark((function t(){return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.taskQueue.append((function(){return e.pauseVideoWhenWhiteboardEnded()}));case 2:case"end":return t.stop()}}),t)})))))}},{key:"playWhenPause",value:(T=a()(i.a.mark((function e(){var t,n,r,o,s=this;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.stateMachine.lockCombineStatus([d.c.ToPlay,d.c.Playing],[d.c.Playing]),t=function(){s.stateMachine.setStatus(d.a.Video,d.b.Playing)},n=function(){s.stateMachine.setStatus(d.a.Whiteboard,d.b.Playing)},this.whiteboardEmitter.one("playing",n),r=this.stateMachine.one(d.c.ToPlay,a()(i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s.whiteboard.play();case 1:case"end":return e.stop()}}),e)})))),o=this.stateMachine.one(d.c.Playing,a()(i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s.onStatusUpdate(d.d.Playing);case 1:case"end":return e.stop()}}),e)})))),this.video.one("playing",t),this.video.play(),e.next=10,Promise.all([r,o]);case 10:case"end":return e.stop()}}),e,this)}))),function(){return T.apply(this,arguments)})},{key:"playWhenVideoIsPauseAndWhiteboardIsPauseBuffering",value:(w=a()(i.a.mark((function e(){var t,n,r,o,s,u,l,c,h,f=this;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.stateMachine.lockCombineStatus([d.c.Disabled,d.c.Pause,d.c.PauseBuffering,d.c.ToPlay,d.c.Playing],[d.c.Playing]),t=function(){f.stateMachine.setStatus(d.a.Video,d.b.Playing)},n=function(){f.stateMachine.setStatus(d.a.Video,d.b.Pause)},r=function(){f.stateMachine.setStatus(d.a.Whiteboard,d.b.PlayingBuffering)},o=function(){f.stateMachine.setStatus(d.a.Whiteboard,d.b.Playing)},s=function(){f.whiteboardEmitter.removeListener("playing",o),f.whiteboardEmitter.removeListener("buffering",r),f.video.off("playing",t),f.video.off("pause",n)},this.stateMachine.oneButNotCrashByDisabled([{video:d.b.Playing,whiteboard:d.b.PauseBuffering}],a()(i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:f.video.pause();case 1:case"end":return e.stop()}}),e)})))).catch((function(e){throw Error(e)})),u=this.stateMachine.one(d.c.PauseBuffering,a()(i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:f.whiteboard.play();case 1:case"end":return e.stop()}}),e)})))),l=this.stateMachine.one(d.c.Pause,a()(i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:f.whiteboard.play();case 1:case"end":return e.stop()}}),e)})))),c=this.stateMachine.one(d.c.ToPlay,a()(i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:f.video.play();case 1:case"end":return e.stop()}}),e)})))),h=this.stateMachine.one(d.c.Playing,a()(i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:f.onStatusUpdate(d.d.Playing),f.stateMachine.off([d.c.PauseBuffering,d.c.Pause,d.c.ToPlay]),s();case 3:case"end":return e.stop()}}),e)})))),this.whiteboardEmitter.one("buffering",r),this.whiteboardEmitter.one("playing",o),this.video.on("playing",t),this.video.one("pause",n),this.video.play(),e.next=18,Promise.all([Promise.race([u,l]),c,h]);case 18:case"end":return e.stop()}}),e,this)}))),function(){return w.apply(this,arguments)})},{key:"playWhenAllPlayerIsPauseBuffering",value:(_=a()(i.a.mark((function e(){var t,n,r,o,s,u,l,c,h,f=this;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.stateMachine.lockCombineStatus([d.c.Disabled,d.c.ToPause,d.c.ToPlay,d.c.Playing],[d.c.Playing]),t=function(){f.stateMachine.setStatus(d.a.Whiteboard,d.b.PlayingBuffering)},n=function(){f.stateMachine.setStatus(d.a.Whiteboard,d.b.Playing)},r=function(){f.stateMachine.setStatus(d.a.Whiteboard,d.b.Pause)},o=function(){f.stateMachine.setStatus(d.a.Video,d.b.Playing)},s=function(){f.stateMachine.setStatus(d.a.Video,d.b.PlayingBuffering)},u=function(){f.stateMachine.setStatus(d.a.Video,d.b.Pause)},this.stateMachine.oneButNotCrashByDisabled([{video:d.b.PlayingBuffering,whiteboard:d.b.PauseBuffering},{video:d.b.PauseBuffering,whiteboard:d.b.PlayingBuffering}],a()(i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:f.stateMachine.oneButNotCrashByDisabled([{video:d.b.Playing,whiteboard:d.b.PauseBuffering},{video:d.b.PauseBuffering,whiteboard:d.b.Playing}],function(){var e=a()(i.a.mark((function e(t){var n;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(n=t.current).video===d.b.Playing?f.video.pause():n.whiteboard===d.b.Playing&&f.whiteboard.pause();case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){throw Error(e)}));case 1:case"end":return e.stop()}}),e)})))).catch((function(e){throw Error(e)})),l=this.stateMachine.one(d.c.ToPause,function(){var e=a()(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.current.video===d.b.Playing?f.video.pause():f.whiteboard.pause();case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),c=this.stateMachine.one(d.c.ToPlay,function(){var e=a()(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.current.video===d.b.Playing?f.whiteboard.play():f.video.play();case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),h=this.stateMachine.one(d.c.Playing,a()(i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:f.onStatusUpdate(d.d.Playing),f.stateMachine.cancelOneButNotCrashByDisabled(),f.stateMachine.off([d.c.ToPause,d.c.ToPlay]),f.video.off("playing",o),f.whiteboardEmitter.removeListener("playing",n),f.whiteboardEmitter.removeListener("pause",r);case 6:case"end":return e.stop()}}),e)})))),this.whiteboardEmitter.one("buffering",t),this.whiteboardEmitter.addListener("playing",n),this.whiteboardEmitter.one("pause",r),this.video.on("playing",o),this.video.one("play",s),this.video.one("pause",u),this.video.play(),this.whiteboard.play(),e.next=21,Promise.all([Promise.race([l,c]),h]);case 21:case"end":return e.stop()}}),e,this)}))),function(){return _.apply(this,arguments)})},{key:"playWhenEnded",value:(x=a()(i.a.mark((function e(){var t,n,r,o,s,u,l,c,h,f=this;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.onStatusUpdate(d.d.PlayingBuffering),t=NaN,this.stateMachine.lockCombineStatus([d.c.Pause],[d.c.Pause]),n=function(){f.stateMachine.setStatus(d.a.Whiteboard,d.b.PauseSeeking)},r=function(){f.stateMachine.setStatus(d.a.Whiteboard,d.b.Pause)},o=function(){f.whiteboard.pause()},s=function(){f.video.off("pause",u),f.video.off("play",l),f.video.one("play",(function(){f.video.one("pause",(function(){f.stateMachine.setStatus(d.a.Video,d.b.Pause)})),f.video.pause()})),f.video.play()},u=function(){f.video.play()},l=function(){f.video.pause()},c=function(){f.stateMachine.setStatus(d.a.Video,d.b.PauseSeeking),t=window.setInterval((function(){f.video.readyState()>=d.f.HAVE_CURRENT_DATA&&(clearInterval(t),f.video.play())}),500)},h=this.stateMachine.one(d.c.Pause,a()(i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return f.whiteboardEmitter.removeListener("buffering",n),f.whiteboardEmitter.removeListener("playing",o),clearInterval(t),e.next=5,f.playWhenPause();case 5:case"end":return e.stop()}}),e)})))),this.whiteboardEmitter.one("buffering",n),this.whiteboardEmitter.one("pause",r),this.whiteboardEmitter.one("playing",o),this.video.one("seeking",c),this.video.one("seeked",s),this.video.on("play",l),this.video.on("pause",u),this.whiteboard.seekToProgressTime(0),this.video.currentTime(0),e.next=22,h;case 22:case"end":return e.stop()}}),e,this)}))),function(){return x.apply(this,arguments)})},{key:"pauseWhenPlaying",value:(b=a()(i.a.mark((function e(){var t,n,r,o=this;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.stateMachine.lockCombineStatus([d.c.Pause],[d.c.Pause]),t=function(){o.stateMachine.setStatus(d.a.Whiteboard,d.b.Pause)},n=function(){o.stateMachine.setStatus(d.a.Video,d.b.Pause)},r=this.stateMachine.one(d.c.Pause,a()(i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o.onStatusUpdate(d.d.Pause);case 1:case"end":return e.stop()}}),e)})))),this.whiteboardEmitter.one("pause",t),this.video.one("pause",n),this.whiteboard.pause(),this.video.pause(),e.next=10,r;case 10:case"end":return e.stop()}}),e,this)}))),function(){return b.apply(this,arguments)})},{key:"seekWhenPlaying",value:(y=a()(i.a.mark((function e(t){var n,r,o,s,u,l,c,h,f,p,v,m=this;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.onStatusUpdate(d.d.PlayingSeeking),n=NaN,r=this.getPlayerDuration(),this.stateMachine.lockCombineStatus([d.c.Pause,d.c.Ended,d.c.PlayingSeeking],[d.c.Pause,d.c.Ended]),o=function(){m.stateMachine.setStatus(d.a.Whiteboard,d.b.PlayingSeeking)},s=function(){t=d.f.HAVE_CURRENT_DATA&&(clearInterval(n),t=d.f.HAVE_CURRENT_DATA&&(clearInterval(n),h.stateMachine.setStatus(d.a.Video,d.b.Pause))}),500)},o=function(){h.stateMachine.setStatus(d.a.Whiteboard,d.b.PauseSeeking)},s=function(){h.stateMachine.setStatus(d.a.Whiteboard,d.b.Pause)},u=function(){h.whiteboard.pause()},l=function(){clearInterval(n),h.video.off("seeking",r),h.whiteboardEmitter.removeListener("buffering",o),h.whiteboardEmitter.removeListener("pause",s)},this.stateMachine.oneButNotCrashByDisabled([{video:d.b.PauseSeeking,whiteboard:d.b.PauseSeeking}]).catch((function(e){throw Error(e)})),c=this.stateMachine.one(d.c.Pause,a()(i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:h.onStatusUpdate(d.d.Pause),h.stateMachine.cancelOneButNotCrashByDisabled(),h.stateMachine.off(d.c.Ended),h.whiteboardEmitter.removeListener("playing",u),l();case 5:case"end":return e.stop()}}),e)})))),this.video.one("seeking",r),this.whiteboardEmitter.one("buffering",o),this.whiteboardEmitter.one("playing",u),this.whiteboardEmitter.one("pause",s),this.whiteboard.seekToProgressTime(t),this.video.currentTime(t/1e3),e.next=18,c;case 18:case"end":return e.stop()}}),e,this)}))),function(e){return v.apply(this,arguments)})},{key:"seekWhenPauseFinallyIsEnded",value:(f=a()(i.a.mark((function e(t,n){var r,o,s,u,l,c,h,f=this;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.onStatusUpdate(d.d.PauseSeeking),r=NaN,this.stateMachine.lockCombineStatus([d.c.Disabled,d.c.Ended],[d.c.Ended]),o=function(){f.stateMachine.setStatus(d.a.Video,d.b.PauseSeeking),r=window.setInterval((function(){f.video.readyState()>=d.f.HAVE_CURRENT_DATA&&(clearInterval(r),f.stateMachine.setStatus(d.a.Video,d.b.Pause),t>=n.video&&f.stateMachine.setStatus(d.a.Video,d.b.Ended))}),500)},s=function(){t1?t-1:0),r=1;r2&&void 0!==arguments[2]&&arguments[2];a()(this,e),this.videoOptions=void 0,this.whiteboard=void 0,this.debug=void 0,Object(l.a)(n);var i=e.videoDefaultOptions(n);this.videoOptions=y(y(y({},i),n),{},{videoJsOptions:y(y({},i.videoJsOptions),n.videoJsOptions)}),this.whiteboard=t,this.debug=r}return u()(e,[{key:"create",value:function(){var e=new c.a;this.handleWhiteboardCallback(e);var t=this.getVideoDOM(),n=f()(t,this.videoOptions.videoJsOptions);return n.src(this.videoOptions.url),new h.a({videoConfig:{videoOptions:this.videoOptions,video:n,isCanplay:n.readyState()>p.f.HAVE_CURRENT_DATA},whiteboard:this.whiteboard,whiteboardEmitter:e,debug:this.debug})}},{key:"getVideoDOM",value:function(){return void 0!==this.videoOptions.videoElementID?document.getElementById(this.videoOptions.videoElementID):this.videoOptions.videoDOM}},{key:"handleWhiteboardCallback",value:function(e){this.whiteboard.callbacks.on("onPhaseChanged",(function(t){e.emit(t)})),this.whiteboard.callbacks.on("onIsPlayableChanged",(function(t){e.emit("playableChange",t)}))}}],[{key:"videoDefaultOptions",value:function(e){var t={videoJsOptions:{preload:"auto"}};return e.videoDOM||e.videoElementID||(t.videoDOM=document.createElement("video")),t}}]),e}()},0:function(e,t,n){e.exports=n("./src/index.ts")},"@babel/runtime/helpers/asyncToGenerator":function(e,t){e.exports=n(34397)},"@babel/runtime/helpers/classCallCheck":function(e,t){e.exports=n(57750)},"@babel/runtime/helpers/createClass":function(e,t){e.exports=n(67338)},"@babel/runtime/helpers/defineProperty":function(e,t){e.exports=n(91566)},"@babel/runtime/regenerator":function(e,t){e.exports=n(64910)},"video.js":function(e,t){e.exports=n(30825)}})},20597:function(e,t,n){var r,i,o,a;function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}e=n.nmd(e),window,a=function(e,t){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==s(e)&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=7)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.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zZT4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBzdHJva2U9IiNGRkZGRkYiIHN0cm9rZS13aWR0aD0iMSIgZD0iTTE5LDI1IEwxOSwxNSBMMTYsMTUgQzE1LjQ0NzcxNTMsMTUgMTUsMTQuNTUyMjg0NyAxNSwxNCBDMTUsMTMuNTE0NTg5NyAxNS4zNDc5OTkzLDEzLjEwMTkxNSAxNS44NjU0ODc3LDEzLjAxMDA1MjEgTDE2LDEzIEwyNCwxMyBDMjQuNTUyMjg0NywxMyAyNSwxMy40NDc3MTUzIDI1LDE0IEMyNSwxNC40ODU0MTAzIDI0LjY1MjAwMDcsMTQuODk4MDg1IDI0LjEzNDUxMjMsMTQuOTg5OTQ3OSBMMjQsMTUgTDIxLDE1IEwyMSwyNSBMMjQsMjUgQzI0LjU1MjI4NDcsMjUgMjUsMjUuNDQ3NzE1MyAyNSwyNiBDMjUsMjYuNDg1NDEwMyAyNC42NTIwMDA3LDI2Ljg5ODA4NSAyNC4xMzQ1MTIzLDI2Ljk4OTk0NzkgTDI0LDI3IEwxNiwyNyBDMTUuNDQ3NzE1MywyNyAxNSwyNi41NTIyODQ3IDE1LDI2IEMxNSwyNS41MTQ1ODk3IDE1LjM0Nzk5OTMsMjUuMTAxOTE1IDE1Ljg2NTQ4NzcsMjUuMDEwMDUyMSBMMTYsMjUgTDE5LDI1IFoiIGZpbGw9IiMyMTIzMjQiIGZpbGwtcnVsZT0iZXZlbm9kZCI+PC9wYXRoPgogICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4="},function(e,t,n){n.r(t),n.d(t,"CursorTool",(function(){return y}));var r,i=n(0),o=n(1),a=n(2),s=n.n(a),u=n(3),l=n.n(u),c=n(4),h=n.n(c),d=n(5),f=n.n(d),p=n(6),v=n.n(p),m=(n(8),r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),g=function(e){function t(t){var n=e.call(this,t)||this;return n.renderAvatar=function(e){var t,r="rgb("+e.memberState.strokeColor[0]+", "+e.memberState.strokeColor[1]+", "+e.memberState.strokeColor[2]+")";if(n.detectAvatar(e)){var o=n.detectCursorName(e);return i.createElement("img",{className:"cursor-selector-avatar",style:{width:o?19:28,height:o?19:28,position:o?"initial":"absolute",borderColor:o?"white":r,marginRight:o?4:0},src:null===(t=e.payload)||void 0===t?void 0:t.avatar,alt:"avatar"})}return null},n.getOpacity=function(e){var t=n.getCursorName(e),r=n.detectAvatar(e);return void 0===t&&void 0===r?0:1},n.getCursorName=function(e){return e.payload&&e.payload.cursorName?e.payload.cursorName:void 0},n.getThemeClass=function(e){return e.payload&&e.payload.theme?"cursor-inner-mellow":"cursor-inner"},n.getCursorBackgroundColor=function(e){var t=n.detectCursorName(e);return e.payload&&e.payload.cursorBackgroundColor?e.payload.cursorBackgroundColor:t?"rgb("+e.memberState.strokeColor[0]+", "+e.memberState.strokeColor[1]+", "+e.memberState.strokeColor[2]+")":void 0},n.getCursorTextColor=function(e){return e.payload&&e.payload.cursorTextColor?e.payload.cursorTextColor:"#FFFFFF"},n.getCursorTagBackgroundColor=function(e){return e.payload&&e.payload.cursorTagBackgroundColor?e.payload.cursorTagBackgroundColor:n.getCursorBackgroundColor(e)},n.detectCursorName=function(e){return!(!e.payload||!e.payload.cursorName)},n.detectAvatar=function(e){return!(!e.payload||!e.payload.avatar)},n.renderTag=function(e){return e.payload&&e.payload.cursorTagName?i.createElement("span",{className:"cursor-tag-name",style:{backgroundColor:n.getCursorTagBackgroundColor(e)}},e.payload.cursorTagName):void 0},n}return m(t,e),t.prototype.render=function(){var e=this.props.roomMember,t=this.getCursorName(e);switch(e.memberState.currentApplianceName){case o.ApplianceNames.pencil:return i.createElement("div",{className:"cursor-box"},i.createElement("div",{className:"cursor-mid cursor-pencil-offset"},i.createElement("div",{className:"cursor-name"},i.createElement("div",{style:{opacity:this.getOpacity(e),backgroundColor:this.getCursorBackgroundColor(e),color:this.getCursorTextColor(e)},className:this.getThemeClass(e)},this.renderAvatar(e),t,this.renderTag(e))),i.createElement("div",null,i.createElement("img",{className:"cursor-pencil-image",src:s.a,alt:"pencilCursor"}))));case o.ApplianceNames.selector:return i.createElement("div",{className:"cursor-box"},i.createElement("div",{className:"cursor-mid cursor-selector-offset"},i.createElement("div",null,i.createElement("img",{className:"cursor-selector-image",src:l.a,alt:"selectorCursor"})),i.createElement("div",{className:"cursor-name"},i.createElement("div",{style:{opacity:this.getOpacity(e),backgroundColor:this.getCursorBackgroundColor(e),color:this.getCursorTextColor(e)},className:this.getThemeClass(e)},this.renderAvatar(e),t,this.renderTag(e)))));case o.ApplianceNames.eraser:return i.createElement("div",{className:"cursor-box"},i.createElement("div",{className:"cursor-mid cursor-pencil-offset"},i.createElement("div",{className:"cursor-name"},i.createElement("div",{style:{opacity:this.getOpacity(e),backgroundColor:this.getCursorBackgroundColor(e),color:this.getCursorTextColor(e)},className:this.getThemeClass(e)},this.renderAvatar(e),t,this.renderTag(e))),i.createElement("div",null,i.createElement("img",{className:"cursor-pencil-image",src:h.a,alt:"selectorCursor"}))));case o.ApplianceNames.text:return i.createElement("div",{className:"cursor-box"},i.createElement("div",{className:"cursor-text-offset cursor-mid"},i.createElement("div",{className:"cursor-name"},i.createElement("div",{style:{opacity:this.getOpacity(e),backgroundColor:this.getCursorBackgroundColor(e),color:this.getCursorTextColor(e)},className:this.getThemeClass(e)},this.renderAvatar(e),t,this.renderTag(e))),i.createElement("div",null,i.createElement("img",{src:v.a,alt:"selectorCursor"}))));default:return i.createElement("div",{className:"cursor-box"},i.createElement("div",{className:"cursor-shape-offset cursor-mid"},i.createElement("div",{className:"cursor-name"},i.createElement("div",{style:{opacity:this.getOpacity(e),backgroundColor:this.getCursorBackgroundColor(e),color:this.getCursorTextColor(e)},className:this.getThemeClass(e)},this.renderAvatar(e),t,this.renderTag(e))),i.createElement("div",null,i.createElement("img",{src:f.a,alt:"shapeCursor"}))))}},t}(i.Component),y=function(){function e(){this.cursors={},this.roomMembers=[],this.isFirstFrameReady=!1,this.isCursorDisappear=function(e){return!(!e.payload||!e.payload.disappearCursor)}}return e.prototype.createCursor=function(){return{x:64,y:64,width:128,height:128}},e.prototype.onAddedCursor=function(e){for(var t=0,n=this.roomMembers;t0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]this.totalPage)return;this.displayer.setSceneIndex(e-1),this.dispatchMagixEvent(h.NextPage,{})}},t.prototype.handlePrevPage=function(){if(this.canOperation){var e=this.currentPage-1;if(e<0)return;this.displayer.setSceneIndex(e-1),this.dispatchMagixEvent(h.PrevPage,{})}},t.prototype.handlePageTo=function(e){if(this.canOperation){var t=e.payload;if(!Number.isSafeInteger(t)||t<=0)return;var n=t-1;this.displayer.setSceneIndex(n),this.dispatchMagixEvent(h.PageTo,n)}},t.prototype.handleRemoveAllMagixEvent=function(){var e=this;this.magixEventMap.forEach((function(t,n){e.displayer.removeMagixEventListener(n,t)})),this.magixEventMap.clear()},t.prototype.handleGetAttributes=function(){this.postMessage({kind:h.GetAttributes,payload:this.attributes})},t.prototype.postMessage=function(e){var t;this.iframe&&(null===(t=this.iframe.contentWindow)||void 0===t||t.postMessage(JSON.parse(JSON.stringify(e)),"*"))},t.prototype.dispatchMagixEvent=function(t,n){this.canOperation&&(e.prototype.setAttributes.call(this,{lastEvent:{name:t,payload:n}}),this.displayer.dispatchMagixEvent(t,n))},Object.defineProperty(t.prototype,"currentIndex",{get:function(){return this.displayer.state.sceneState.index},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentPage",{get:function(){return this.currentIndex+1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"totalPage",{get:function(){return this.displayer.state.sceneState.scenes.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"readonly",{get:function(){return!this.displayer.isWritable},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isReplay",{get:function(){return(0,o.isPlayer)(this.displayer)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"inDisplaySceneDir",{get:function(){return this.displayer.state.sceneState.scenePath.startsWith(this.attributes.displaySceneDir)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canOperation",{get:function(){return!this.isReplay&&(!this.readonly&&this.displayer.phase===o.RoomPhase.Connected)},enumerable:!1,configurable:!0}),t.prototype.isClicker=function(){if(this.readonly)return!1;var e=this.displayer.state.memberState.currentApplianceName;return this.allowAppliances.includes(e)},Object.defineProperty(t.prototype,"isDisableInput",{get:function(){return!("disableDeviceInputs"in this.displayer)||this.displayer.disableDeviceInputs},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"iframeOrigin",{get:function(){return this.iframe?new URL(this.iframe.src).origin:void 0},enumerable:!1,configurable:!0}),t.prototype._destory=function(){var e=this;window.removeEventListener("message",this.messageListener),this.magixEventMap.forEach((function(t,n){e.displayer.removeMagixEventListener(n,t)})),this.displayer.callbacks.off(this.callbackName,this.stateChangeListener),this.displayer.callbacks.off("onPhaseChanged",this.onPhaseChangedListener),this.magixEventMap.clear(),this.iframe&&(t.emitter.emit(h.Destory),this.iframe=null,t.alreadyCreate=!1),this.bridgeDisposer(),t.emitter.removeAllListeners()},t.kind="IframeBridge",t.emitter=new a.EventEmitter2,t.alreadyCreate=!1,t}(o.InvisiblePlugin);t.IframeBridge=g},24182:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.times=void 0;t.times=function(e,t){return new Array(e).fill(0).map((function(e,n){return t(n)}))}},82372:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.EffectPlugin=void 0;var r,i=n(26913),o=(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=function(e){function t(n,r,i){var o,a,s,u,l,c,h,d=e.call(this)||this;return d._volume=50,d._currentTime=0,d._isPaused=!0,d._duration=0,d.timer=null,d._startPos=0,d.onDurationBack=function(e,t){d.url===e&&(d._duration=t/1e3),d.emit("load")},d.onEffectStop=function(e){e===d.soundIndex&&(window.clearInterval(d.timer),d._isPaused=!0,d._duration=0,d._currentTime=0,d.emit("pause"))},d.onEffectPause=function(e){e===d.soundIndex&&(d._isPaused=!0,d.emit("pause"))},d.onEffectFinished=function(e){d.onEffectPause(e),d._currentTime=d._duration},d.onEffectPlay=function(e){e===d.soundIndex&&(d.timer&&clearInterval(d.timer),d.timer=window.setInterval((function(){var e;null===(e=t.audioEffector)||void 0===e||e.getEffectCurrentPosition(d.soundIndex).then((function(e){var n;d._currentTime=e,null===(n=t.ctx)||void 0===n||n.logger.info("rtc callback position, "+e+", endPos: "+d._endPos)})).catch((function(){}))}),300),d._isPaused=!1,d.emit("play"))},null===(o=t.ctx)||void 0===o||o.logger.info("url: "+n+", start: "+r+", end: "+i),d.url=n,r&&(d._startPos=r),i&&(d._endPos=i),d.soundIndex=t.nextSoundIndex(),window.addEventListener("message",(function(e){e.data&&"resumeAllAudioInterruptByAudioSessionChanged"===e.data.name&&d.emit("resumeAllAudioInterruptByAudioSessionChanged")})),null===(a=t.audioEffector)||void 0===a||a.on("play",d.onEffectPlay),null===(s=t.audioEffector)||void 0===s||s.on("pause",d.onEffectPause),null===(u=t.audioEffector)||void 0===u||u.on("effectFinished",d.onEffectPause),null===(l=t.audioEffector)||void 0===l||l.on("error",d.onEffectStop),null===(c=t.audioEffector)||void 0===c||c.on("duration",d.onDurationBack),null===(h=t.audioEffector)||void 0===h||h.getEffectDuration(d.url),d.onEffectPause(d.soundIndex),d}return o(t,e),t.nextSoundIndex=function(){return t.soundIndex+=1,t.soundIndex},t.prototype.play=function(){var e,n,r;clearInterval(this.timer),null===(e=t.ctx)||void 0===e||e.logger.info("effect play call, "+this.url),null===(n=t.ctx)||void 0===n||n.logger.info("play "+this.url+" from "+this._startPos+" by slide, current is "+this.currentTime),null===(r=t.audioEffector)||void 0===r||r.playEffect(this.soundIndex,this.url,0,1,0,this._volume,!1,Math.max(this._currentTime,this._startPos))},t.prototype.pause=function(){var e,n;null===(e=t.ctx)||void 0===e||e.logger.info(this.url+" pause by slide"),null===(n=t.audioEffector)||void 0===n||n.pauseEffect(this.soundIndex)},t.prototype.destroy=function(){var e,n,r,i,o,a,s,u;this._startPos=0,window.clearInterval(this.timer),null===(e=t.ctx)||void 0===e||e.logger.info(this.url+" destroy by slide"),null===(n=t.audioEffector)||void 0===n||n.stopEffect(this.soundIndex),null===(r=t.audioEffector)||void 0===r||r.unloadEffect(this.soundIndex),null===(i=t.audioEffector)||void 0===i||i.removeListener("play",this.onEffectPlay),null===(o=t.audioEffector)||void 0===o||o.removeListener("pause",this.onEffectPause),null===(a=t.audioEffector)||void 0===a||a.removeListener("effectFinished",this.onEffectFinished),null===(s=t.audioEffector)||void 0===s||s.removeListener("error",this.onEffectStop),null===(u=t.audioEffector)||void 0===u||u.removeListener("duration",this.onDurationBack)},Object.defineProperty(t.prototype,"currentTime",{get:function(){return this._currentTime/1e3},set:function(e){var n;this._currentTime=1e3*e,null===(n=t.audioEffector)||void 0===n||n.setEffectPosition(this.soundIndex,1e3*e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isPaused",{get:function(){return this._isPaused},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"duration",{get:function(){return this._duration},enumerable:!1,configurable:!0}),t.prototype.volume=function(e){var n;null===(n=t.audioEffector)||void 0===n||n.setEffectsVolume(100*e)},t.audioEffector=null,t.ctx=null,t.soundIndex=0,t}(i.EventEmitter),s=function(){function e(e){this.hookPoint="Slide.initConfig",this.rtc=e}return e.prototype.after=function(e){return e},e.prototype.before=function(e){var t=e[0];return a.audioEffector=this.rtc,t.rtcAudio=a,[t]},e.prototype.context=function(e){a.ctx=e},e}();t.EffectPlugin=s},29181:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.MixingPlugin=void 0;var r,i=n(26913),o=n(5495),a=(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});var s=function(e){function t(n){var r=e.call(this)||this;return r.isStartPlaying=!1,r.isAudioPlaying=!1,r._volume=50,r.commandCaches=[],r.onError=function(e){var n;null===(n=t.ctx)||void 0===n||n.logger.error("audio error: "+e)},r.onAudioStalled=function(){var e;null===(e=t.ctx)||void 0===e||e.logger.warn(r.url+" Failed to fetch data, but trying.")},r.onMetaLoaded=function(){var e;null===(e=t.ctx)||void 0===e||e.logger.info(r.url+" load"),r.emit("load")},r.onAudioPlay=function(){var e,n,i,o;null===(e=t.ctx)||void 0===e||e.logger.info(r.url+" audio play"),null===(n=t.audioMixer)||void 0===n||n.startAudioMixing(r.url,!1,!1,1,(i=function(e,n){var i,o,a;r.isAudioPlaying=!0,r.isStartPlaying=!1,r.emit("play");var s=r.audio.seek();null===(i=t.audioMixer)||void 0===i||i.setAudioMixingPosition(Math.round(1e3*s)),(null===(o=t.audioMixer)||void 0===o?void 0:o.adjustAudioMixingVolume)&&(null===(a=t.audioMixer)||void 0===a||a.adjustAudioMixingVolume(r._volume)),r.commandCaches.forEach((function(e){return e()})),r.commandCaches=[]},o=0,function(){for(var e=[],t=0;t0&&void 0!==arguments[0]?arguments[0]:O.kind;return e=function(e){s(n,e);var t=l(n);function n(){return b(this,n),t.apply(this,arguments)}return n}(O),e.kind=t,e},t.SyncedStorePlugin=t.SyncedStore=t.Storage=t.STORAGE_NS=t.MAIN_STORAGE=void 0;var r=n(71895),i=n(73549),o=n(63266),a=n(5094);function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}function u(e,t){return u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},u(e,t)}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var i=d(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){return!t||"object"!==T(t)&&"function"!=typeof t?h(e):t}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||g(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function v(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){p(o,r,i,a,s,"next",e)}function s(e){p(o,r,i,a,s,"throw",e)}a(void 0)}))}}function m(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||g(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){if(e){if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:(0,i.genUID)();return w(t={},A,1),w(t,"k",n),w(t,"v",e),t}(e,this.genKey()),this.refMap.set(e,t)),this.refKeys.add(t.k),t}},{key:"deleteRefKey",value:function(e){var t=this.state[e],n=this.refMap.get(t);return n&&this.refKeys.delete(n.k),t}}]),e}(),C="_WM-StOrAgE_";t.STORAGE_NS=C;var N="_WM-MaIn-StOrAgE_";t.MAIN_STORAGE=N;var k=function(){function e(t){var n=this,a=t.plugin$,s=t.isWritable$,u=t.namespace,l=void 0===u?N:u,c=t.defaultState,h=void 0===c?{}:c;if(b(this,e),this._sideEffect=new i.SideEffectManager,this._events=new o.Remitter,this._disconnected=!1,h&&!M(h))throw new Error("Default state for Storage ".concat(l," is not an object."));this.on=this._events.on.bind(this._events),this.off=this._events.off.bind(this._events);var d=function(){var e,t;return null==(t=null==(e=a.value)?void 0:e.attributes[C])?void 0:t[l]};this.namespace=l,this.defaultState=h,this._plugin$=a,this._isWritable$=s,this._refine=new I((0,r.toJS)(d()),h);var f=function(e){e&&n._events.emit("stateChanged",e)},p=function(){var e,t=(0,r.reaction)(d,(function(){var t=d();t&&(f(n._refine.replaceState((0,r.toJS)(t))),null==e||e(),e=function(e){var t=function(e){if(!(e.length<=0)){for(var t={},i=!1,o=0;o0&&n._sideEffect.addDisposer(t,"plugin-init")})))}return _(e,[{key:"setState",value:function(e){var t=this._requireAccess("setState");if(!this.isWritable)throw new Error('Cannot setState on Storage "'.concat(this.namespace,'" without writable access'));for(var n=E(e),r=0;r1&&void 0!==arguments[1]?arguments[1]:this.genUID();return this.flush(t),this.disposers.set(t,Array.isArray(e)?function(){return e.forEach(h)}:e),t}},{key:"add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.genUID(),n=e();return n?this.addDisposer(n,t):t}},{key:"addEventListener",value:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.genUID();return e.addEventListener(t,n,r),this.addDisposer((function(){return e.removeEventListener(t,n,r)}),i),i}},{key:"setTimeout",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.genUID(),i=window.setTimeout((function(){n.remove(r),e()}),t);return this.addDisposer((function(){return window.clearTimeout(i)}),r)}},{key:"setInterval",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.genUID(),r=window.setInterval(e,t);return this.addDisposer((function(){return window.clearInterval(r)}),n)}},{key:"remove",value:function(e){var t=this.disposers.get(e);return this.disposers.delete(e),t}},{key:"flush",value:function(e){var t=this.remove(e);if(t)try{t()}catch(e){console.error(e)}}},{key:"flushAll",value:function(){this.disposers.forEach(h),this.disposers.clear()}},{key:"genUID",value:function(){var e;do{e=c()}while(this.disposers.has(e));return e}}]),e}();t.SideEffectManager=d;var f=function(){function e(){i(this,e),this.finished=Promise.resolve(),this.disposers=new Map,this._nextTask=new Map,this._isRunning=new Set}var t,n;return a(e,[{key:"add",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.genUID();return this._isRunning.has(n)?this._nextTask.set(n,(function(){return t._add(e,n)})):this._add(e,n),n}},{key:"_add",value:(n=r(regeneratorRuntime.mark((function e(t,n){var i,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._startTask(n),!(i=this.remove(n))){e.next=11;break}return e.prev=3,e.next=6,i();case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(3),console.error(e.t0);case 11:return e.prev=11,e.next=14,t();case 14:(o=e.sent)&&this.disposers.set(n,Array.isArray(o)?r(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.all(o.map(h)));case 1:case"end":return e.stop()}}),e)}))):o),e.next=21;break;case 18:e.prev=18,e.t1=e.catch(11),console.error(e.t1);case 21:this._endTask(n),(a=this._nextTask.get(n))&&(this._nextTask.delete(n),a());case 24:case"end":return e.stop()}}),e,this,[[3,8],[11,18]])}))),function(e,t){return n.apply(this,arguments)})},{key:"addDisposer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.genUID();return this.add((function(){return e}),t)}},{key:"remove",value:function(e){var t=this.disposers.get(e);return this.disposers.delete(e),t}},{key:"flush",value:function(e){var t=this;this._isRunning.has(e)?this._nextTask.set(e,(function(){return t._flush(e)})):this._flush(e)}},{key:"_flush",value:(t=r(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=this.remove(t))){e.next=12;break}return this._startTask(t),e.prev=3,e.next=6,n();case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(3),console.error(e.t0);case 11:this._endTask(t);case 12:(r=this._nextTask.get(t))&&(this._nextTask.delete(t),r());case 14:case"end":return e.stop()}}),e,this,[[3,8]])}))),function(e){return t.apply(this,arguments)})},{key:"flushAll",value:function(){var e=this;this.disposers.forEach((function(t,n){return e.flush(n)}))}},{key:"genUID",value:function(){var e;do{e=c()}while(this.disposers.has(e));return e}},{key:"_startTask",value:function(e){var t=this;this._isRunning.add(e),this._resolveFinished||(this.finished=new Promise((function(e){t._resolveFinished=e})))}},{key:"_endTask",value:function(e){this._isRunning.delete(e),this._resolveFinished&&this._isRunning.size<=0&&this._nextTask.size<=0&&(this._resolveFinished(),this._resolveFinished=void 0)}}]),e}();t.AsyncSideEffectManager=f},59849:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.videoJsPlugin=t.Version=t.PluginId=void 0;var r,i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==w(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(17328)),o=(r=n(30825))&&r.__esModule?r:{default:r},a=n(71895);function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function u(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function l(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){u(o,r,i,a,s,"next",e)}function s(e){u(o,r,i,a,s,"throw",e)}a(void 0)}))}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var n=0;n=t||n<0||h&&e-l>=o}function m(){var e=ne();if(v(e))return g(e);s=setTimeout(m,function(e){var n=t-(e-u);return h?ie(n,o-(e-l)):n}(e))}function g(e){return s=void 0,d&&r?f(e):(r=i=void 0,a)}function y(){var e=ne(),n=v(e);if(r=arguments,i=this,u=e,n){if(void 0===s)return p(u);if(h)return clearTimeout(s),s=setTimeout(m,t),f(u)}return void 0===s&&(s=setTimeout(m,t)),a}return t=te(t)||0,q(n)&&(c=!!n.leading,o=(h="maxWait"in n)?re(te(n.maxWait)||0,t):o,d="trailing"in n?!!n.trailing:d),y.cancel=function(){void 0!==s&&clearTimeout(s),l=0,r=u=i=s=void 0},y.flush=function(){return void 0===s?a:g(ne())},y};function ae(e){var t=document.createElement("style"),n=document.createTextNode(e);t.appendChild(n),document.head.appendChild(t)}ae(".vjs-p .player-controller{position:absolute;z-index:100;bottom:0px;left:0;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:stretch;height:64px;background-image:linear-gradient(0deg,#000,transparent);transition:opacity .2s}.vjs-p .player-menu-box{display:flex;align-items:center;justify-content:center;flex-direction:column;margin-bottom:40px}.vjs-p .player-menu-cell{width:100%;text-align:center;font-size:12px;color:#7a7b7c}.vjs-p .player-multiple-play{width:64px;height:120px}.vjs-p .player-controller-actions-left{display:flex;justify-content:center;align-items:center;flex-shrink:0}.vjs-p .player-right-box{font-size:14px;color:#7a7b7c;cursor:pointer;margin-right:12px}.vjs-p .player-controller-actions{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding-left:8px;padding-right:8px;margin-top:2px}.vjs-p .player-mid-box-time{font-size:9px;display:flex;justify-content:center;align-items:center;color:#fff;flex-shrink:0;margin-right:8px;font-family:monospace}.vjs-p .player-controller-play{display:flex;align-items:center;justify-content:center;cursor:pointer;padding-right:4px}.vjs-p .player-controller-progress{width:calc(100% - 28px);margin-left:14px;display:flex;align-items:center;justify-content:center;margin-top:8px}.vjs-p .player-volume{display:flex;align-items:center;justify-content:center;cursor:pointer;margin-right:16px;margin-left:16px}.vjs-p .player-volume-slider{width:60px;margin-right:12px;display:flex;align-items:center}.vjs-p .player-volume-box{display:flex;flex-direction:row}\n");ae(".vjs-p .seek-slider{position:relative;width:100%}.vjs-p .seek-slider:focus{outline:none}.vjs-p .seek-slider .track{padding:10px 0;cursor:pointer;outline:none}.vjs-p .seek-slider .track:focus{border:0;outline:none}.vjs-p .seek-slider .track .main{width:100%;height:3px;background-color:#ffffff4d;border-radius:30px;position:absolute;left:0;top:8.5px;transition:transform .4s;outline:none}.vjs-p .seek-slider .track .main:focus{border:0;outline:none}.vjs-p .seek-slider .track .main .buffered{position:absolute;background-color:#ffffff4d;width:100%;height:100%;transform:scaleX(.8);z-index:2;transform-origin:0 0}.vjs-p .seek-slider .track .main .seek-hover{position:absolute;background-color:#ffffff80;width:100%;height:100%;z-index:1;transform:scaleX(.6);transform-origin:0 0;opacity:0;transition:opacity .4s}.vjs-p .seek-slider .track .main .connect{position:absolute;background-color:#fff;width:100%;height:100%;z-index:3;left:0;transform:scaleX(.13);transform-origin:0 0}.vjs-p .seek-slider .track.active .main{transform:scaleY(2)}.vjs-p .seek-slider .thumb{pointer-events:none;position:absolute;width:12px;height:12px;left:-6px;top:4px;z-index:4;transform:translate(100px)}.vjs-p .seek-slider .thumb .handler{border-radius:100%;width:100%;height:100%;background-color:#fff;opacity:0;transform:scale(.4);cursor:pointer;transition:transform .2s;pointer-events:none}.vjs-p .seek-slider .thumb.active .handler{opacity:1;transform:scale(1)}.vjs-p .seek-slider .hover-time{position:absolute;background-color:#0000004d;line-height:18px;font-size:16px;color:#ddd;top:-25px;left:0;padding:5px 10px;border-radius:5px;box-shadow:0 0 5px #0000004d;opacity:0;transform:translate(150px);pointer-events:none}.vjs-p .seek-slider .hover-time.active{opacity:1}.vjs-p .seek-slider:hover .track .main .seek-hover{opacity:1}\n");var se=function(e){f(n,e);var t=v(n);function n(e){var r;return c(this,n),r=t.call(this,e),M(g(r),"seeking",!1),M(g(r),"mobileSeeking",!1),M(g(r),"track",null),M(g(r),"hoverTime",null),M(g(r),"offset",0),M(g(r),"secondsPrefix","00:00:"),M(g(r),"minutesPrefix","00:"),M(g(r),"seekPause",!1),M(g(r),"handleTouchSeeking",(function(e){for(var t=0,n=0;nthis.state.trackWidth&&(e=this.state.trackWidth-this.hoverTime.offsetWidth))),{transform:"translateX(".concat(e,"px)")}}},{key:"secondsToTime",value:function(e){e=Math.round(e+this.offset);var t=Math.floor(e/3600),n=e%3600,r=Math.floor(n/60),i=Math.ceil(n%60);return{hh:t.toString(),mm:r<10?"0"+r:r.toString(),ss:i<10?"0"+i:i.toString()}}},{key:"getHoverTime",value:function(){var e=100*this.state.seekHoverPosition/this.state.trackWidth,t=Math.floor(+e*(this.props.total/100)),n=this.secondsToTime(t);return this.props.total+this.offset<60?this.secondsPrefix+n.ss:this.props.total+this.offset<3600?this.minutesPrefix+n.mm+":"+n.ss:n.hh+":"+n.mm+":"+n.ss}},{key:"isThumbActive",value:function(){return this.state.seekHoverPosition>0||this.seeking}},{key:"drawHoverTime",value:function(){var e=this;return this.props.hideHoverTime?null:i.default.createElement("div",{className:this.isThumbActive()?"hover-time active":"hover-time",style:this.getHoverTimePosition(),ref:function(t){return e.hoverTime=t}},this.getHoverTime())}},{key:"render",value:function(){var e=this;return i.default.createElement("div",{className:"seek-slider"},i.default.createElement("div",{className:"track",ref:function(t){return e.track=t},onMouseMove:function(t){return e.handleTrackHover(!1,t)},onMouseLeave:function(t){return e.handleTrackHover(!0,t)},onMouseDown:this.onMouseDown,onTouchStart:function(t){e.setMobileSeeking(!0),e.onMouseDown(t)},onMouseUp:this.onMouseUp,onTouchEnd:this.onMouseUp},i.default.createElement("div",{className:"main"},this.renderBufferProgress(),this.renderHoverProgress(),this.renderProgress())),this.drawHoverTime(),this.renderThumb())}}]),n}(i.Component),ue=function(e){f(n,e);var t=v(n);function n(e){var r;return c(this,n),r=t.call(this,e),M(g(r),"stageVolume",0),M(g(r),"updateVolumeTimer",0),M(g(r),"onVolumeSeeking",!1),M(g(r),"onClickOperationButton",(function(){r.props.paused?r.props.play():r.props.pause()})),M(g(r),"operationButton",(function(){return r.props.paused?i.default.createElement("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iI0ZGRiIgZmlsbC1ydWxlPSJub256ZXJvIj48cGF0aCBmaWxsLW9wYWNpdHk9Ii4wMSIgZD0iTTAgMGgyMnYyMkgweiIvPjxwYXRoIGQ9Im03LjUxNCA1LjkwOSA3LjA1NyA0LjIzNGExIDEgMCAwIDEgMCAxLjcxNGwtNy4wNTcgNC4yMzRBMSAxIDAgMCAxIDYgMTUuMjM0VjYuNzY2YTEgMSAwIDAgMSAxLjUxNC0uODU3eiIvPjwvZz48L3N2Zz4="}):i.default.createElement("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iI0ZGRiIgZmlsbC1ydWxlPSJub256ZXJvIj48cGF0aCBmaWxsLW9wYWNpdHk9Ii4wMSIgZD0iTTAgMGgyMnYyMkgweiIvPjxyZWN0IHg9IjciIHk9IjYiIHdpZHRoPSIyIiBoZWlnaHQ9IjEwIiByeD0iMSIvPjxyZWN0IHg9IjEzIiB5PSI2IiB3aWR0aD0iMiIgaGVpZ2h0PSIxMCIgcng9IjEiLz48L2c+PC9zdmc+"})})),M(g(r),"operationVolumeButton",(function(){return r.props.volume>.9?i.default.createElement("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iI0ZGRiIgZmlsbC1ydWxlPSJub256ZXJvIj48cGF0aCBkPSJNNy4wOCA4LjQ0NUg1YS45NjIuOTYyIDAgMCAwLTEgLjkyNHYzLjkwN2EuOTYzLjk2MyAwIDAgMCAuOTYuOTY2bC4wNDYtLjAwMWgyLjAxbDMuMjI3IDIuMjc0Yy41MDIuMzQ0LjkzMi4xMzguOTMyLS4zNDVWNi41MTZjLS4wMDQtLjQ4My0uNDM2LS42OS0uODY2LS4zNDVMNy4wOCA4LjQ0NXptNS43NDUgNC40MTNhLjU3Ni41NzYgMCAwIDAgMCAuOD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SJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iI0ZGRiIgZmlsbC1ydWxlPSJub256ZXJvIj48cGF0aCBkPSJNNy4wOCA4LjQ0NUg1YS45NjIuOTYyIDAgMCAwLTEgLjkyNHYzLjkwN2EuOTYzLjk2MyAwIDAgMCAuOTYuOTY2bC4wNDYtLjAwMWgyLjAxbDMuMjI3IDIuMjc0Yy41MDIuMzQ0LjkzMi4xMzguOTMyLS4zNDVWNi41MTZjLS4wMDQtLjQ4My0uNDM2LS42OS0uODY2LS4zNDVMNy4wOCA4LjQ0NXptNS43NDUgNC40MTNhLjU3Ni41NzYgMCAwIDAgMCAuODk4LjgwNS44MDUgMCAwIDAgMS4wNzggMCAyLjk0MyAyLjk0MyAwIDAgMC0uMDA0LTQuNTVoLjAwNGEuODA1LjgwNSAwIDAgMC0xLjA3OCAwIC41NzYuNTc2IDAgMCAwIDAgLjg5NiAxLjc5NCAxLjc5NCAwIDAgMSAwIDIuNzU2eiIvPjxwYXRoIGZpbGwtb3BhY2l0eT0iLjAxIiBkPSJNMCAwaDIydjIySDB6Ii8+PC9nPjwvc3ZnPg=="})})),M(g(r),"handleClickVolume",(function(){0===r.props.volume?0!==r.stageVolume?r.props.setVolume(r.stageVolume):r.props.setVolume(1):(r.stageVolume=r.props.volume,r.props.setVolume(0))})),M(g(r),"onChange",(function(e){r.setState({currentTime:e}),e&&r.changeTime(e)})),M(g(r),"changeTime",oe((function(e){r.props.setCurrentTime(e)}),50)),M(g(r),"onVolumeChange",(function(e){r.changeVolume(e),r.setState({seekVolume:e/100})})),M(g(r),"changeVolume",oe((function(e){r.props.setVolume(e/100)}),50)),M(g(r),"onVolumeSeekStart",(function(){r.onVolumeSeeking=!0})),M(g(r),"onVolumeSeekEnd",oe((function(){r.onVolumeSeeking=!1}),500)),M(g(r),"onProgressSeekStart",(function(){return r.setState({isPlayerSeeking:!0})})),M(g(r),"onProgressSeekEnd",oe((function(){r.setState({isPlayerSeeking:!1})}),500)),r.state={isPlayerSeeking:!1,isVolumeHover:!1,seekVolume:1,visible:!0,currentTime:0},r.stageVolume=e.volume,r}return d(n,[{key:"componentDidMount",value:function(){var e=this;this.updateVolumeTimer=setInterval((function(){e.onVolumeSeeking||e.setState({seekVolume:e.props.volume}),e.state.isPlayerSeeking||e.setState({currentTime:e.props.currentTime})}),100)}},{key:"componentWillUnmount",value:function(){this.updateVolumeTimer&&clearInterval(this.updateVolumeTimer)}},{key:"render",value:function(){var e=this,t=this.props,n=t.duration,r=t.currentTime;return i.default.createElement("div",{className:"player-controller",style:{opacity:this.props.visible?"1":"0"}},i.default.createElement("div",{className:"player-controller-progress"},i.default.createElement(se,{total:n,current:this.state.currentTime,onChange:this.onChange,buffered:this.props.buffered,bufferColor:"rgba(255,255,255,0.3)",hideHoverTime:!0,limitTimeTooltipBySides:!0,onSeekStart:this.onProgressSeekStart,onSeekEnd:this.onProgressSeekEnd,play:this.props.play,pause:this.props.pause,paused:this.props.paused,scale:this.props.scale})),i.default.createElement("div",{className:"player-controller-actions"},i.default.createElement("div",{className:"player-controller-actions-left"},i.default.createElement("div",{onClick:this.onClickOperationButton,className:"player-controller-play"},this.operationButton()),i.default.createElement("div",{className:"player-volume-box",onMouseEnter:function(){return e.setState({isVolumeHover:!0})},onMouseLeave:function(){return e.setState({isVolumeHover:!1})}},i.default.createElement("div",{onClick:this.handleClickVolume,className:"player-volume"},this.operationVolumeButton()),i.default.createElement("div",{className:"player-volume-slider"},i.default.createElement(se,{total:100,current:100*this.state.seekVolume,onChange:this.onVolumeChange,onSeekStart:this.onVolumeSeekStart,onSeekEnd:this.onVolumeSeekEnd,scale:this.props.scale,limitTimeTooltipBySides:!0,hideHoverTime:!0})))),i.default.createElement("div",{className:"player-mid-box-time"},le(Math.floor(r/1e3))," /"," ",le(Math.floor(n/1e3)))))}}]),n}(i.Component);function le(e){var t=e%60,n=(e-t)/60;if(n>=60){var r=n%60;return"".concat(ce((n-r)/60),":").concat(ce(r),":").concat(ce(t))}return"".concat(ce(n),":").concat(ce(t))}function ce(e){return e<=9?"0".concat(e):"".concat(e)}function he(e){var t=e.scale,n=void 0===t?1:t,r=e.size,o=e.children;return i.default.createElement("div",{style:{width:r.width/n,height:r.height/n,transform:"scale(".concat(n,")"),transformOrigin:"top left",display:"flex",overflow:"hidden"}},o)}ae('.vjs-p{display:flex;flex-grow:1;position:relative}.vjs-p *{pointer-events:auto}.vjs-p.disabled *{pointer-events:none}.vjs-p .videojs-plugin-close-icon,.vjs-p .player-controller,.vjs-p .videojs-plugin-muted-alert{pointer-events:auto}.vjs-p.disabled .videojs-plugin-close-icon,.vjs-p.disabled .player-controller{pointer-events:none}.vjs-p .video-js-plugin-header{position:absolute;z-index:100;top:-.5px;height:30px;width:100%;display:flex;background:linear-gradient(rgba(0,0,0,.85),rgba(0,0,0,.45) 40%,rgba(0,0,0,0));transition:opacity .2s;user-select:none}.vjs-p .video-js-plugin-title{padding:10px;font-size:14px;color:#fff}.vjs-p .video-js-plugin-player{position:absolute;top:0;left:0;right:0;bottom:0}.video-js,[data-vjs-player]{width:100%;height:100%}.vjs-p .videojs-plugin-close-icon.disabled{display:none}.vjs-p .videojs-plugin-close-icon{pointer-events:auto;z-index:42;color:#fff;position:absolute;top:0;right:0;width:32px;height:32px;font-size:20px;display:flex;align-items:center;justify-content:center}.vjs-p .videojs-plugin-muted-alert{pointer-events:auto;cursor:pointer;position:absolute;top:0;left:0;right:0;bottom:0;z-index:43}.vjs-p .videojs-plugin-muted-alert:before{pointer-events:auto;cursor:pointer;position:absolute;top:0;left:0;right:0;bottom:0;z-index:43;content:"";background:rgba(0,0,0,.3);font-family:VideoJS;font-size:2em;display:flex;align-items:center;justify-content:center;color:#fff}.vjs-p .videojs-plugin-recovery-mode{pointer-events:auto;cursor:pointer;position:absolute;top:0;left:0;right:0;bottom:0;z-index:44}.vjs-p .videojs-plugin-recovery-mode button{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}\n');var de=function(e){f(n,e);var t=v(n);function n(){return c(this,n),t.apply(this,arguments)}return d(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.cnode,r=t.size,o=t.scale;return i.default.createElement(a.CNode,{context:n},i.default.createElement(he,{size:r,scale:o},i.default.createElement(a.RoomConsumer,null,(function(t){return t&&i.default.createElement(fe,x({room:t},e.props))})),i.default.createElement(a.PlayerConsumer,null,(function(t){return t&&i.default.createElement(fe,x({player:t},e.props))}))))}}]),n}(i.Component),fe=function(e){f(n,e);var t=v(n);function n(e){var r;return c(this,n),r=t.call(this,e),M(g(r),"closeIcon",null),M(g(r),"alertMask",null),M(g(r),"container",i.default.createRef()),M(g(r),"player"),M(g(r),"controllerHiddenTimer",0),M(g(r),"syncPlayerTimer",0),M(g(r),"retryCount",0),M(g(r),"decreaseRetryTimer",0),M(g(r),"disposer"),M(g(r),"showController",(function(){r.setState({controllerVisible:!0}),r.debounceHidingController()})),M(g(r),"play",(function(){var e,t=null==(e=r.props.room)?void 0:e.calibrationTimestamp;r.debug(">>> play",{paused:!1,hostTime:t}),r.isEnabled()&&r.props.plugin.putAttributes({paused:!1,hostTime:t})})),M(g(r),"pause",(function(){var e=r.getAttributes();if(e){var t=C(e,r.props);r.debug(">>> pause",{paused:!0,currentTime:t}),r.isEnabled()&&r.props.plugin.putAttributes({paused:!0,currentTime:t})}})),M(g(r),"setVolume",(function(e){r.debug(">>> volume",{volume:e}),r.isEnabled()&&r.props.plugin.putAttributes({volume:e}),r.isEnabled()&&r.props.plugin.putAttributes({volume:e,muted:0===e})})),M(g(r),"setCurrentTime",(function(e){var t,n=null==(t=r.props.room)?void 0:t.calibrationTimestamp;r.debug(">>> seek",{currentTime:e/1e3,hostTime:n}),r.isEnabled()&&r.props.plugin.putAttributes({currentTime:e/1e3,hostTime:n})})),M(g(r),"resetPlayer",(function(){var e;null==(e=r.player)||e.autoplay(!1),r.debug(">>> ended",{paused:!0,currentTime:0}),r.isEnabled()&&r.props.plugin.putAttributes({paused:!0,currentTime:0})})),M(g(r),"syncPlayerWithAttributes",(function(){var e;r.props.plugin.context;var t=r.getAttributes();if(t){var n=r.player;if(n){n.paused()!==t.paused&&(r.debug("<<< paused -> %o",t.paused),t.paused?n.pause():null==(e=n.play())||e.catch(r.catchPlayFail)),n.muted()!==t.muted&&(r.debug("<<< muted -> %o",t.muted),n.muted(t.muted)),n.volume()!==t.volume&&(r.debug("<<< volume -> %o",t.volume),n.volume(t.volume));var i=C(t,r.props);i>n.duration()?r.resetPlayer():Math.abs(n.currentTime()-i)>I.currentTimeMaxError&&(r.debug("<<< currentTime -> %o",i),n.currentTime(i))}}})),M(g(r),"debounceHidingController",(function(){r.controllerHiddenTimer&&(clearTimeout(r.controllerHiddenTimer),r.controllerHiddenTimer=0),r.controllerHiddenTimer=setTimeout((function(){r.setState({controllerVisible:!1}),r.controllerHiddenTimer=0}),3e3)})),M(g(r),"decreaseRetryCount",(function(){r.player&&r.retryCount>0&&(r.retryCount=r.retryCount-1)})),M(g(r),"catchPlayFail",(function(e){var t,n,i=String(e);if(N&&i.includes("NotAllowedError")||i.includes("interact"))null==(t=r.player)||t.autoplay("any"),r.setState({NoSound:!0});else{var o=null==(n=r.player)?void 0:n.error();o&&(r.retryCount<=3?(r.initPlayer(),r.retryCount=r.retryCount+1):(r.debug("catch videojs media error",o),r.setState({MediaError:!0}))),r.debug("catch error",e)}})),M(g(r),"fixPlayFail",(function(){r.debug("try to fix play state"),r.setState({NoSound:!1});var e=r.getAttributes(),t=e.muted,n=e.volume;r.player&&(r.player.muted(t),r.player.volume(n))})),M(g(r),"initPlayer",l(regeneratorRuntime.mark((function e(){var t,n,i,a,s,u,l,c,h;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return null==(t=r.player)||t.dispose(),r.player=void 0,r.debug("creating elements ..."),n=r.getAttributes(),i=n.type,a=n.src,s=n.poster,(u=document.createElement("div")).setAttribute("data-vjs-player",""),(l=document.createElement("video")).className="video-js",s&&(l.poster=s),l.setAttribute("playsInline",""),l.setAttribute("webkit-playsinline",""),c=document.createElement("source"),new URL(a).pathname.endsWith(".m3u8")?c.type="application/x-mpegURL":l.src=a,c.src=a,i&&(c.type=i),l.appendChild(c),u.appendChild(l),r.container.current.appendChild(u),e.next=20,new Promise((function(e){return(window.requestAnimationFrame||window.setTimeout)(e)}));case 20:r.debug("initializing videojs() ..."),h=(0,o.default)(l),r.player=h,h.one("loadedmetadata",r.gracefullyUpdate),h.on("ready",(function(){var e,t;null==(t=(e=I).onPlayer)||t.call(e,h),h.on("timeupdate",r.gracefullyUpdate),h.on("volumechange",r.gracefullyUpdate),h.on("seeked",r.gracefullyUpdate),h.on("play",r.gracefullyUpdate),h.on("pause",r.gracefullyUpdate),h.on("ended",r.resetPlayer)})),h.on("error",r.catchPlayFail),r.setState({MediaError:!1});case 27:case"end":return e.stop()}}),e)})))),M(g(r),"gracefullyUpdate",(function(){return r.setState({updater:!r.state.updater})})),M(g(r),"setupClose",(function(e){e&&(e.addEventListener("touchstart",r.removeSelf),e.addEventListener("click",r.removeSelf)),r.closeIcon=e})),M(g(r),"setupAlert",(function(e){e&&(e.addEventListener("touchstart",r.fixPlayFail),e.addEventListener("click",r.fixPlayFail)),r.alertMask=e})),M(g(r),"setupReload",(function(e){e&&(e.addEventListener("touchstart",r.initPlayer),e.addEventListener("click",r.initPlayer))})),M(g(r),"removeSelf",(function(){return r.props.plugin.remove()})),r.state={NoSound:!1,MediaError:!1,updater:!1,controllerVisible:!1},e.room&&function(e){if(!e.calibrationTimestamp)throw new Error("@netless/video-js-plugin@".concat(S," requires white-web-sdk@^2.13.8 to work properly."))}(e.room),r}return d(n,[{key:"getAttributes",value:function(){var e,t=this.props.plugin.attributes;if(t){var n=[a.PlayerPhase.Pause,a.PlayerPhase.Ended,a.PlayerPhase.Stopped];if(!t.paused&&n.includes(null==(e=this.props.player)?void 0:e.phase)){var r=C(t,this.props);t=x(x({},t),{},{currentTime:r,paused:!0})}return t}}},{key:"render",value:function(){var e,t,n,r;if(!this.props.room&&!this.props.player)return null;var o=this.getAttributes();if(!o)return null;var a=1e3*((null==(e=this.player)?void 0:e.duration())||1e3),s=(null==(t=this.player)?void 0:t.bufferedPercent())||0;return i.default.createElement("div",{className:this.isEnabled()?"vjs-p":"vjs-p disabled",onMouseEnter:this.showController,onMouseMove:this.showController},i.default.createElement("div",{className:"video-js-plugin-player",ref:this.container}),i.default.createElement("div",{className:"video-js-plugin-header"},o.title&&i.default.createElement("div",{className:"video-js-plugin-title"},o.title),(null==(n=o.close)||n)&&i.default.createElement("div",{className:"videojs-plugin-close-icon",ref:this.setupClose},"×")),i.default.createElement(ue,{duration:a,volume:o.volume,setVolume:this.setVolume,paused:o.paused,play:this.play,pause:this.pause,currentTime:1e3*C(o,this.props),setCurrentTime:this.setCurrentTime,buffered:a*s,scale:this.props.scale,visible:!0}),!(null==(r=this.props.plugin.context)?void 0:r.hideMuteAlert)&&this.state.NoSound&&i.default.createElement("div",{ref:this.setupAlert,className:"videojs-plugin-muted-alert"}),this.state.MediaError&&i.default.createElement("div",{className:"videojs-plugin-recovery-mode"},i.default.createElement("button",{ref:this.setupReload},"Reload Player")))}},{key:"debug",value:function(e){var t;if(null==(t=this.props.plugin.context)?void 0:t.verbose){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i