"use strict";
!function(ee){const _2="undefined";if("object"==typeof exports&&_2!=typeof ǃcGE)ǃcGE.exports=ee();else if("function"==typeof ǃcGe&&ǃcGe.ǃcGp)ǃcGe([],ee);else{var te;te=_2==typeof window?_2==typeof global?_2==typeof self?this:self:global:window,te.localforage=ee()}}(function(){const _3="string",_4="setItem",_5="function",_6="readonly",_7="undefined",_8="readwrite",_9=" to version ",_10="asyncStorage",_11="DELETE FROM ",_12="[object Blob]",_13="webSQLStorage",_14="The database \"",_15="SELECT * FROM ",_16="SELECT key FROM ",_17="localStorageWrapper",_18="[object ArrayBuffer]",_19="No available storage method found.",_20=" used as a key, but it is not a string.";return function ee(te,ne,ie){function me(re,Ge){if(!ne[re]){if(!te[re]){var oe=_5==typeof ǃcGf&&ǃcGf;if(!Ge&&oe)return oe(re,!0);if(ae)return ae(re,!0);var le=new Error("Cannot find module '"+re+"'");throw le.code="MODULE_NOT_FOUND",le}var ue=ne[re]={exports:{}};te[re][0].call(ue.exports,function(pe){var ge=te[re][1][pe];return me(ge?ge:pe)},ue,ue.exports,ee,te,ne,ie)}return ne[re].exports}for(var ae=_5==typeof ǃcGf&&ǃcGf,de=0;deHn;Hn++)Un[Hn]=Cn.charCodeAt(Hn);return Rn}function pe(Cn){return new $t(function(xn){var Rn=Cn.transaction(Ft,_8),Un=Ge([""]);Rn.objectStore(Ft).put(Un,"key"),Rn.onabort=function(Hn){Hn.preventDefault(),Hn.stopPropagation(),xn(!1)},Rn.oncomplete=function(){var Hn=navigator.userAgent.match(/Chrome\/(\d+)/),Xn=navigator.userAgent.match(/Edge\//);xn(Xn||!Hn||43<=parseInt(Hn[1],10))}})["catch"](function(){return!1})}function ge(Cn){return"boolean"==typeof zt?$t.resolve(zt):pe(Cn).then(function(xn){return zt=xn})}function he(Cn){var xn=Vt[Cn.name],Rn={};Rn.ǃcGU=new $t(function(Un){Rn.resolve=Un}),xn.ǃcGv.push(Rn),xn.ǃcGq=xn.ǃcGq?xn.ǃcGq.then(function(){return Rn.ǃcGU}):Rn.ǃcGU}function ve(Cn){var xn=Vt[Cn.name],Rn=xn.ǃcGv.pop();Rn&&Rn.resolve()}function be(Cn,xn){return new $t(function(Rn,Un){if(Cn.db){if(!xn)return Rn(Cn.db);he(Cn),Cn.db.close()}var Hn=[Cn.name];xn&&Hn.push(Cn.version);var Xn=_t.open.apply(_t,Hn);xn&&(Xn.onupgradeneeded=function(In){var Sn=Xn.result;try{Sn.createObjectStore(Cn.ǃcGa),1>=In.oldVersion&&Sn.createObjectStore(Ft)}catch(jn){if("ConstraintError"!==jn.name)throw jn;console.warn(_14+Cn.name+"\" has been upgraded from version "+In.oldVersion+_9+In.newVersion+", but the storage \""+Cn.ǃcGa+"\" already exists.")}}),Xn.onerror=function(In){In.preventDefault(),Un(Xn.error)},Xn.onsuccess=function(){Rn(Xn.result),ve(Cn)}})}function Ee(Cn){return be(Cn,!1)}function De(Cn){return be(Cn,!0)}function ye(Cn,xn){if(!Cn.db)return!0;var Rn=!Cn.db.objectStoreNames.contains(Cn.ǃcGa),Un=Cn.versionCn.db.version;if(Un&&(Cn.version!==xn&&console.warn(_14+Cn.name+"\" can't be downgraded from version "+Cn.db.version+_9+Cn.version+"."),Cn.version=Cn.db.version),Hn||Rn){if(Rn){var Xn=Cn.db.version+1;Xn>Cn.version&&(Cn.version=Xn)}return!0}return!1}function Te(Cn){return new $t(function(xn,Rn){var Un=new FileReader;Un.onerror=Rn,Un.onloadend=function(Hn){var Xn=btoa(Hn.target.result||"");xn({ǃcGg:!0,data:Xn,type:Cn.type})},Un.readAsBinaryString(Cn)})}function ke(Cn){var xn=ue(atob(Cn.data));return Ge([xn],{type:Cn.type})}function we(Cn){return Cn&&Cn.ǃcGg}function Le(Cn){var xn=this,Rn=xn.ǃcGN().then(function(){var Un=Vt[xn.ǃcGK.name];return Un&&Un.ǃcGq?Un.ǃcGq:void 0});return le(Rn,Cn,Cn),Rn}function Ae(Cn){var In=.75*Cn.length,Sn=Cn.length,jn=0,xn,Rn,Un,Hn,Xn;"="===Cn[Cn.length-1]&&(In--,"="===Cn[Cn.length-2]&&In--);var An=new ArrayBuffer(In),Nn=new Uint8Array(An);for(xn=0;Sn>xn;xn+=4)Rn=Kt.indexOf(Cn[xn]),Un=Kt.indexOf(Cn[xn+1]),Hn=Kt.indexOf(Cn[xn+2]),Xn=Kt.indexOf(Cn[xn+3]),Nn[jn++]=Rn<<2|Un>>4,Nn[jn++]=(15&Un)<<4|Hn>>2,Nn[jn++]=(3&Hn)<<6|63&Xn;return An}function Ne(Cn){var Rn=new Uint8Array(Cn),Un="",xn;for(xn=0;xn>2],Un+=Kt[(3&Rn[xn])<<4|Rn[xn+1]>>4],Un+=Kt[(15&Rn[xn+1])<<2|Rn[xn+2]>>6],Un+=Kt[63&Rn[xn+2]];return 2==Rn.length%3?Un=Un.substring(0,Un.length-1)+"=":1==Rn.length%3&&(Un=Un.substring(0,Un.length-2)+"=="),Un}function $e(Cn,xn,Rn,Un){var Hn=this;_3!=typeof Cn&&(console.warn(Cn+_20),Cn=Cn+"");var Xn=new $t(function(In,Sn){Hn.ǃcGM().then(function(){void 0===xn&&(xn=null);var jn=xn,An=Hn.ǃcGK;An.ǃcGY.ǃcGF(xn,function(Nn,_n){_n?Sn(_n):An.db.transaction(function(Pn){Pn.ǃcGh("INSERT OR REPLACE INTO "+An.ǃcGa+" (key, value) VALUES (?, ?)",[Cn,Nn],function(){In(jn)},function(zn,Bn){Sn(Bn)})},function(Pn){if(Pn.code===Pn.QUOTA_ERR){if(0Cn?void Hn(null):void Rn.ǃcGM().then(function(){var In=Rn.ǃcGK,Sn=In.db.transaction(In.ǃcGa,_6).objectStore(In.ǃcGa),jn=!1,An=Sn.openCursor();An.onsuccess=function(){var Nn=An.result;return Nn?void(0===Cn?Hn(Nn.key):jn?Hn(Nn.key):(jn=!0,Nn.advance(Cn))):void Hn(null)},An.onerror=function(){Xn(An.error)}})["catch"](Xn)});return oe(Un,xn),Un},keys:function(Cn){var xn=this,Rn=new $t(function(Un,Hn){xn.ǃcGM().then(function(){var Xn=xn.ǃcGK,In=Xn.db.transaction(Xn.ǃcGa,_6).objectStore(Xn.ǃcGa),Sn=In.openCursor(),jn=[];Sn.onsuccess=function(){var An=Sn.result;return An?(jn.push(An.key),void An["continue"]()):void Un(jn)},Sn.onerror=function(){Hn(Sn.error)}})["catch"](Hn)});return oe(Rn,Cn),Rn}},Kt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Zt=/^~~local_forage_type~([^~]+)~/,Jt="__lfsc__:",Mt=Jt.length,Qt="arbf",en="blob",tn="si08",nn="ui08",cn="uic8",mn="si16",an="si32",dn="ur16",rn="ui32",Gn="fl32",on="fl64",ln=Mt+Qt.length,un=Object.prototype.toString,pn={ǃcGF:function(Cn,xn){var Rn="";if(Cn&&(Rn=un.call(Cn)),Cn&&(_18===Rn||Cn.buffer&&_18===un.call(Cn.buffer))){var Hn=Jt,Un;Cn instanceof ArrayBuffer?(Un=Cn,Hn+=Qt):(Un=Cn.buffer,"[object Int8Array]"==Rn?Hn+=tn:"[object Uint8Array]"==Rn?Hn+=nn:"[object Uint8ClampedArray]"==Rn?Hn+=cn:"[object Int16Array]"==Rn?Hn+=mn:"[object Uint16Array]"==Rn?Hn+=dn:"[object Int32Array]"==Rn?Hn+=an:"[object Uint32Array]"==Rn?Hn+=rn:"[object Float32Array]"==Rn?Hn+=Gn:"[object Float64Array]"==Rn?Hn+=on:xn(new Error("Failed to get type for BinaryArray"))),xn(Hn+Ne(Un))}else if(_12===Rn){var Xn=new FileReader;Xn.onload=function(){var In="~~local_forage_type~"+Cn.type+"~"+Ne(this.result);xn(Jt+en+In)},Xn.readAsArrayBuffer(Cn)}else try{xn(JSON.stringify(Cn))}catch(In){console.error("Couldn't convert value into a JSON string: ",Cn),xn(null,In)}},ǃcGz:function(Cn){if(Cn.substring(0,Mt)!==Jt)return JSON.parse(Cn);var Rn=Cn.substring(ln),Un=Cn.substring(Mt,ln),xn;if(Un===en&&Zt.test(Rn)){var Hn=Rn.match(Zt);xn=Hn[1],Rn=Rn.substring(Hn[0].length)}var Xn=Ae(Rn);switch(Un){case Qt:return Xn;case en:return Ge([Xn],{type:xn});case tn:return new Int8Array(Xn);case nn:return new Uint8Array(Xn);case cn:return new Uint8ClampedArray(Xn);case mn:return new Int16Array(Xn);case dn:return new Uint16Array(Xn);case an:return new Int32Array(Xn);case rn:return new Uint32Array(Xn);case Gn:return new Float32Array(Xn);case on:return new Float64Array(Xn);default:throw new Error("Unkown type: "+Un);}},ǃcGI:Ae,ǃcGx:Ne},gn={ǃcGw:_13,ǃcGo:function(Cn){var xn=this,Rn={db:null};if(Cn)for(var Un in Cn)Rn[Un]=_3==typeof Cn[Un]?Cn[Un]:Cn[Un].toString();var Hn=new $t(function(Xn,In){try{Rn.db=openDatabase(Rn.name,Rn.version+"",Rn.description,Rn.size)}catch(Sn){return In(Sn)}Rn.db.transaction(function(Sn){Sn.ǃcGh("CREATE TABLE IF NOT EXISTS "+Rn.ǃcGa+" (id INTEGER PRIMARY KEY, key unique, value)",[],function(){xn.ǃcGK=Rn,Xn()},function(jn,An){In(An)})})});return Rn.ǃcGY=pn,Hn},ǃcGH:function(Cn,xn){var Rn=this,Un=new $t(function(Hn,Xn){Rn.ǃcGM().then(function(){var In=Rn.ǃcGK;In.db.transaction(function(Sn){Sn.ǃcGh(_15+In.ǃcGa,[],function(jn,An){for(var Nn=An.rows,_n=Nn.length,Pn=0;_n>Pn;Pn++){var zn=Nn.item(Pn),Bn=zn.value;if(Bn&&(Bn=In.ǃcGY.ǃcGz(Bn)),Bn=Cn(Bn,zn.key,Pn+1),void 0!==Bn)return void Hn(Bn)}Hn()},function(jn,An){Xn(An)})})})["catch"](Xn)});return oe(Un,xn),Un},getItem:function(Cn,xn){var Rn=this;_3!=typeof Cn&&(console.warn(Cn+_20),Cn=Cn+"");var Un=new $t(function(Hn,Xn){Rn.ǃcGM().then(function(){var In=Rn.ǃcGK;In.db.transaction(function(Sn){Sn.ǃcGh(_15+In.ǃcGa+" WHERE key = ? LIMIT 1",[Cn],function(jn,An){var Nn=An.rows.length?An.rows.item(0).value:null;Nn&&(Nn=In.ǃcGY.ǃcGz(Nn)),Hn(Nn)},function(jn,An){Xn(An)})})})["catch"](Xn)});return oe(Un,xn),Un},setItem:function(Cn,xn,Rn){return $e.apply(this,[Cn,xn,Rn,1])},removeItem:function(Cn,xn){var Rn=this;_3!=typeof Cn&&(console.warn(Cn+_20),Cn=Cn+"");var Un=new $t(function(Hn,Xn){Rn.ǃcGM().then(function(){var In=Rn.ǃcGK;In.db.transaction(function(Sn){Sn.ǃcGh(_11+In.ǃcGa+" WHERE key = ?",[Cn],function(){Hn()},function(jn,An){Xn(An)})})})["catch"](Xn)});return oe(Un,xn),Un},clear:function(Cn){var xn=this,Rn=new $t(function(Un,Hn){xn.ǃcGM().then(function(){var Xn=xn.ǃcGK;Xn.db.transaction(function(In){In.ǃcGh(_11+Xn.ǃcGa,[],function(){Un()},function(Sn,jn){Hn(jn)})})})["catch"](Hn)});return oe(Rn,Cn),Rn},length:function(Cn){var xn=this,Rn=new $t(function(Un,Hn){xn.ǃcGM().then(function(){var Xn=xn.ǃcGK;Xn.db.transaction(function(In){In.ǃcGh("SELECT COUNT(key) as c FROM "+Xn.ǃcGa,[],function(Sn,jn){var An=jn.rows.item(0).c;Un(An)},function(Sn,jn){Hn(jn)})})})["catch"](Hn)});return oe(Rn,Cn),Rn},key:function(Cn,xn){var Rn=this,Un=new $t(function(Hn,Xn){Rn.ǃcGM().then(function(){var In=Rn.ǃcGK;In.db.transaction(function(Sn){Sn.ǃcGh(_16+In.ǃcGa+" WHERE id = ? LIMIT 1",[Cn+1],function(jn,An){var Nn=An.rows.length?An.rows.item(0).key:null;Hn(Nn)},function(jn,An){Xn(An)})})})["catch"](Xn)});return oe(Un,xn),Un},keys:function(Cn){var xn=this,Rn=new $t(function(Un,Hn){xn.ǃcGM().then(function(){var Xn=xn.ǃcGK;Xn.db.transaction(function(In){In.ǃcGh(_16+Xn.ǃcGa,[],function(Sn,jn){for(var An=[],Nn=0;NnAn;An++)if(Nn=localStorage.key(An),0===Nn.indexOf(Xn)){var _n=localStorage.getItem(Nn);if(_n&&(_n=Hn.ǃcGY.ǃcGz(_n)),_n=Cn(_n,Nn.substring(In),jn++),void 0!==_n)return _n}});return oe(Un,xn),Un},getItem:function(Cn,xn){var Rn=this;_3!=typeof Cn&&(console.warn(Cn+_20),Cn=Cn+"");var Un=Rn.ǃcGM().then(function(){var Hn=Rn.ǃcGK,Xn=localStorage.getItem(Hn.ǃcGl+Cn);return Xn&&(Xn=Hn.ǃcGY.ǃcGz(Xn)),Xn});return oe(Un,xn),Un},setItem:function(Cn,xn,Rn){var Un=this;_3!=typeof Cn&&(console.warn(Cn+_20),Cn=Cn+"");var Hn=Un.ǃcGM().then(function(){void 0===xn&&(xn=null);var Xn=xn;return new $t(function(In,Sn){var jn=Un.ǃcGK;jn.ǃcGY.ǃcGF(xn,function(An,Nn){if(Nn)Sn(Nn);else try{localStorage.setItem(jn.ǃcGl+Cn,An),In(Xn)}catch(_n){"QuotaExceededError"!==_n.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==_n.name||Sn(_n),Sn(_n)}})})});return oe(Hn,Rn),Hn},removeItem:function(Cn,xn){var Rn=this;_3!=typeof Cn&&(console.warn(Cn+_20),Cn=Cn+"");var Un=Rn.ǃcGM().then(function(){var Hn=Rn.ǃcGK;localStorage.removeItem(Hn.ǃcGl+Cn)});return oe(Un,xn),Un},clear:function(Cn){var xn=this,Rn=xn.ǃcGM().then(function(){for(var Un=xn.ǃcGK.ǃcGl,Hn=localStorage.length-1,Xn;0<=Hn;Hn--)Xn=localStorage.key(Hn),0===Xn.indexOf(Un)&&localStorage.removeItem(Xn)});return oe(Rn,Cn),Rn},length:function(Cn){var xn=this,Rn=xn.keys().then(function(Un){return Un.length});return oe(Rn,Cn),Rn},key:function(Cn,xn){var Rn=this,Un=Rn.ǃcGM().then(function(){var Xn=Rn.ǃcGK,Hn;try{Hn=localStorage.key(Cn)}catch(In){Hn=null}return Hn&&(Hn=Hn.substring(Xn.ǃcGl.length)),Hn});return oe(Un,xn),Un},keys:function(Cn){var xn=this,Rn=xn.ǃcGM().then(function(){for(var Un=xn.ǃcGK,Hn=localStorage.length,Xn=[],In=0;Hn>In;In++)0===localStorage.key(In).indexOf(Un.ǃcGl)&&Xn.push(localStorage.key(In).substring(Un.ǃcGl.length));return Xn});return oe(Rn,Cn),Rn}},vn={},bn={ǃcGJ:_10,ǃcGZ:_17,ǃcGS:_13},En=[bn.ǃcGJ,bn.ǃcGS,bn.ǃcGZ],Dn=["clear","getItem","iterate","key","keys","length","removeItem",_4],yn={description:"",ǃcGs:En.slice(),name:"localforage",size:4980736,ǃcGa:"keyvaluepairs",version:1},Tn={},zt,Vt;Tn[bn.ǃcGJ]=function(){try{if(!_t)return!1;var Cn=_7!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),xn=_5==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!Cn||xn)&&_7!=typeof indexedDB&&_7!=typeof IDBKeyRange}catch(Rn){return!1}}(),Tn[bn.ǃcGS]=function(){return _5==typeof openDatabase}(),Tn[bn.ǃcGZ]=function(){try{return _7!=typeof localStorage&&_4 in localStorage&&localStorage.setItem}catch(Cn){return!1}}();var kn=Array.isArray||function(Cn){return"[object Array]"===Object.prototype.toString.call(Cn)},wn=function(){function Cn(xn){ie(this,Cn),this.ǃcGJ=bn.ǃcGJ,this.ǃcGZ=bn.ǃcGZ,this.ǃcGS=bn.ǃcGS,this.ǃcGC=It({},yn),this.ǃcGO=It({},this.ǃcGC,xn),this.ǃcGQ=null,this.ǃcmc=null,this.ǃcmG=!1,this.ǃcGK=null,this.ǃcmm(),this.ǃcmD(this.ǃcGO.ǃcGs)["catch"](function(){})}return Cn.prototype.ǃcmi=function(xn){if("object"===(_7==typeof xn?_7:At(xn))){if(this.ǃcmG)return new Error("Can't call config() after localforage has been used.");for(var Rn in xn){if("storeName"==Rn&&(xn[Rn]=xn[Rn].replace(/\W/g,"_")),"version"==Rn&&"number"!=typeof xn[Rn])return new Error("Database version must be a number.");this.ǃcGO[Rn]=xn[Rn]}return"driver"in xn&&xn.ǃcGs?this.ǃcmD(this.ǃcGO.ǃcGs):!0}return _3==typeof xn?this.ǃcGO[xn]:this.ǃcGO},Cn.prototype.ǃcmR=function(xn,Rn,Un){var Hn=new $t(function(Xn,In){try{var Sn=xn.ǃcGw,jn=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver"),An=new Error("Custom driver name already in use: "+xn.ǃcGw);if(!xn.ǃcGw)return void In(jn);if(jt(xn.ǃcGw))return void In(An);for(var Nn=Dn.concat("_initStorage"),_n=0,Pn;_nUn;Un++)Xn=xn[Un],this.supports(Xn)&&Rn.push(Xn);return Rn},Cn.prototype.ǃcmm=function(){for(var xn=0;xnde[5]&de[0]>de[10]?(Ge=2*Math.sqrt(1+de[0]-de[5]-de[10]),ae[3]=(de[6]-de[9])/Ge,ae[0]=0.25*Ge,ae[1]=(de[1]+de[4])/Ge,ae[2]=(de[8]+de[2])/Ge):de[5]>de[10]?(Ge=2*Math.sqrt(1+de[5]-de[0]-de[10]),ae[3]=(de[8]-de[2])/Ge,ae[0]=(de[1]+de[4])/Ge,ae[1]=0.25*Ge,ae[2]=(de[6]+de[9])/Ge):(Ge=2*Math.sqrt(1+de[10]-de[0]-de[5]),ae[3]=(de[1]-de[4])/Ge,ae[0]=(de[8]+de[2])/Ge,ae[1]=(de[6]+de[9])/Ge,ae[2]=0.25*Ge),ae},me.ǃceR=function(ae,de,re,Ge){var oe=de[0],le=de[1],ue=de[2],pe=de[3],ge=oe+oe,he=le+le,ve=ue+ue,be=oe*ge,Ee=oe*he,De=oe*ve,ye=le*he,Te=le*ve,ke=ue*ve,we=pe*ge,Le=pe*he,Ce=pe*ve,xe=Ge[0],Re=Ge[1],Ue=Ge[2];return ae[0]=(1-(ye+ke))*xe,ae[1]=(Ee+Ce)*xe,ae[2]=(De-Le)*xe,ae[3]=0,ae[4]=(Ee-Ce)*Re,ae[5]=(1-(be+ke))*Re,ae[6]=(Te+we)*Re,ae[7]=0,ae[8]=(De+Le)*Ue,ae[9]=(Te-we)*Ue,ae[10]=(1-(be+ye))*Ue,ae[11]=0,ae[12]=re[0],ae[13]=re[1],ae[14]=re[2],ae[15]=1,ae},me.ǃceb=function(ae,de,re,Ge,oe){var le=de[0],ue=de[1],pe=de[2],ge=de[3],he=le+le,ve=ue+ue,be=pe+pe,Ee=le*he,De=le*ve,ye=le*be,Te=ue*ve,ke=ue*be,we=pe*be,Le=ge*he,Ce=ge*ve,xe=ge*be,Re=Ge[0],Ue=Ge[1],He=Ge[2],Xe=oe[0],Ie=oe[1],Se=oe[2];return ae[0]=(1-(Te+we))*Re,ae[1]=(De+xe)*Re,ae[2]=(ye-Ce)*Re,ae[3]=0,ae[4]=(De-xe)*Ue,ae[5]=(1-(Ee+we))*Ue,ae[6]=(ke+Le)*Ue,ae[7]=0,ae[8]=(ye+Ce)*He,ae[9]=(ke-Le)*He,ae[10]=(1-(Ee+Te))*He,ae[11]=0,ae[12]=re[0]+Xe-(ae[0]*Xe+ae[4]*Ie+ae[8]*Se),ae[13]=re[1]+Ie-(ae[1]*Xe+ae[5]*Ie+ae[9]*Se),ae[14]=re[2]+Se-(ae[2]*Xe+ae[6]*Ie+ae[10]*Se),ae[15]=1,ae},me.ǃcEz=function(ae,de){var re=de[0],Ge=de[1],oe=de[2],le=de[3],ue=re+re,pe=Ge+Ge,ge=oe+oe,he=re*ue,ve=Ge*ue,be=Ge*pe,Ee=oe*ue,De=oe*pe,ye=oe*ge,Te=le*ue,ke=le*pe,we=le*ge;return ae[0]=1-be-ye,ae[1]=ve+we,ae[2]=Ee-ke,ae[3]=0,ae[4]=ve-we,ae[5]=1-he-ye,ae[6]=De+Te,ae[7]=0,ae[8]=Ee+ke,ae[9]=De-Te,ae[10]=1-he-be,ae[11]=0,ae[12]=0,ae[13]=0,ae[14]=0,ae[15]=1,ae},me.ǃceT=function(ae,de,re,Ge,oe,le,ue){var pe=1/(re-de),ge=1/(oe-Ge),he=1/(le-ue);return ae[0]=2*le*pe,ae[1]=0,ae[2]=0,ae[3]=0,ae[4]=0,ae[5]=2*le*ge,ae[6]=0,ae[7]=0,ae[8]=(re+de)*pe,ae[9]=(oe+Ge)*ge,ae[10]=(ue+le)*he,ae[11]=-1,ae[12]=0,ae[13]=0,ae[14]=2*(ue*le)*he,ae[15]=0,ae},me.perspective=function(ae,de,re,Ge,oe){var le=1/Math.tan(de/2),ue=1/(Ge-oe);return ae[0]=le/re,ae[1]=0,ae[2]=0,ae[3]=0,ae[4]=0,ae[5]=le,ae[6]=0,ae[7]=0,ae[8]=0,ae[9]=0,ae[10]=(oe+Ge)*ue,ae[11]=-1,ae[12]=0,ae[13]=0,ae[14]=2*oe*Ge*ue,ae[15]=0,ae},me.ǃcek=function(ae,de,re,Ge){var oe=Math.tan(de.ǃceX*Math.PI/180),le=Math.tan(de.ǃce$*Math.PI/180),ue=Math.tan(de.ǃcer*Math.PI/180),pe=Math.tan(de.ǃceV*Math.PI/180),ge=2/(ue+pe),he=2/(oe+le);return ae[0]=ge,ae[1]=0,ae[2]=0,ae[3]=0,ae[4]=0,ae[5]=he,ae[6]=0,ae[7]=0,ae[8]=-(0.5*((ue-pe)*ge)),ae[9]=0.5*((oe-le)*he),ae[10]=Ge/(re-Ge),ae[11]=-1,ae[12]=0,ae[13]=0,ae[14]=Ge*re/(re-Ge),ae[15]=0,ae},me.ǃceA=function(ae,de,re,Ge,oe,le,ue){var pe=1/(de-re),ge=1/(Ge-oe),he=1/(le-ue);return ae[0]=-2*pe,ae[1]=0,ae[2]=0,ae[3]=0,ae[4]=0,ae[5]=-2*ge,ae[6]=0,ae[7]=0,ae[8]=0,ae[9]=0,ae[10]=2*he,ae[11]=0,ae[12]=(de+re)*pe,ae[13]=(oe+Ge)*ge,ae[14]=(ue+le)*he,ae[15]=1,ae},me.ǃceL=function(ae,de,re,Ge){var ye=de[0],Te=de[1],ke=de[2],we=Ge[0],Le=Ge[1],Ce=Ge[2],xe=re[0],Re=re[1],Ue=re[2],oe,le,ue,pe,ge,he,ve,be,Ee,De;return Math.abs(ye-xe)he?(ae.ǃceP(Ge,oe,pe),1e-6>ae.length(Ge)&&ae.ǃceP(Ge,le,pe),ae.normalize(Ge,Ge),re.ǃcej(ue,Ge,Math.PI),ue):0.999999ke&&(ke=-ke,be=-be,Ee=-Ee,De=-De,ye=-ye),1e-6<1-ke?(Te=Math.acos(ke),we=Math.sin(Te),Le=Math.sin((1-ue)*Te)/we,Ce=Math.sin(ue*Te)/we):(Le=1-ue,Ce=ue),Ge[0]=Le*pe+Ce*be,Ge[1]=Le*ge+Ce*Ee,Ge[2]=Le*he+Ce*De,Ge[3]=Le*ve+Ce*ye,Ge},re.ǃcey=function(){var Ge=re.create(),oe=re.create();return function(le,ue,pe,ge,he,ve){return re.ǃcef(Ge,ue,he,ve),re.ǃcef(oe,pe,ge,ve),re.ǃcef(le,Ge,oe,2*ve*(1-ve)),le}}(),re.ǃcEy=function(Ge,oe){var le=oe[0],ue=oe[1],pe=oe[2],ge=oe[3],he=le*le+ue*ue+pe*pe+ge*ge,ve=he?1/he:0;return Ge[0]=-le*ve,Ge[1]=-ue*ve,Ge[2]=-pe*ve,Ge[3]=ge*ve,Ge},re.ǃceB=function(Ge,oe){return Ge[0]=-oe[0],Ge[1]=-oe[1],Ge[2]=-oe[2],Ge[3]=oe[3],Ge},re.length=de.length,re.ǃceW=re.length,re.ǃceu=de.ǃceu,re.ǃceU=re.ǃceu,re.normalize=de.normalize,re.ǃceE=function(Ge,oe){var le=oe[0]+oe[4]+oe[8],ue;if(0oe[0]&&(pe=1),oe[8]>oe[3*pe+pe]&&(pe=2);var ge=(pe+1)%3,he=(pe+2)%3;ue=Math.sqrt(oe[3*pe+pe]-oe[3*ge+ge]-oe[3*he+he]+1),Ge[pe]=0.5*ue,ue=0.5/ue,Ge[3]=(oe[3*ge+he]-oe[3*he+ge])*ue,Ge[ge]=(oe[3*ge+pe]+oe[3*pe+ge])*ue,Ge[he]=(oe[3*he+pe]+oe[3*pe+he])*ue}return Ge},re.ǃcEq=function(Ge){return"quat("+Ge[0]+_22+Ge[1]+_22+Ge[2]+_22+Ge[3]+")"},re.ǃcEK=de.ǃcEK,re.ǃ_c=de.ǃ_c,ee.exports=re},function(ee,te,ne){var ie=ne(1),me={};me.create=function(){var ae=new ie.ǃcE_(3);return ae[0]=0,ae[1]=0,ae[2]=0,ae},me.clone=function(ae){var de=new ie.ǃcE_(3);return de[0]=ae[0],de[1]=ae[1],de[2]=ae[2],de},me.ǃcEp=function(ae,de,re){var Ge=new ie.ǃcE_(3);return Ge[0]=ae,Ge[1]=de,Ge[2]=re,Ge},me.ǃck=function(ae,de){return ae[0]=de[0],ae[1]=de[1],ae[2]=de[2],ae},me.set=function(ae,de,re,Ge){return ae[0]=de,ae[1]=re,ae[2]=Ge,ae},me.add=function(ae,de,re){return ae[0]=de[0]+re[0],ae[1]=de[1]+re[1],ae[2]=de[2]+re[2],ae},me.ǃcEN=function(ae,de,re){return ae[0]=de[0]-re[0],ae[1]=de[1]-re[1],ae[2]=de[2]-re[2],ae},me.sub=me.ǃcEN,me.multiply=function(ae,de,re){return ae[0]=de[0]*re[0],ae[1]=de[1]*re[1],ae[2]=de[2]*re[2],ae},me.ǃcEu=me.multiply,me.ǃf$=function(ae,de,re){return ae[0]=de[0]/re[0],ae[1]=de[1]/re[1],ae[2]=de[2]/re[2],ae},me.ǃcev=me.ǃf$,me.ceil=function(ae,de){return ae[0]=Math.ceil(de[0]),ae[1]=Math.ceil(de[1]),ae[2]=Math.ceil(de[2]),ae},me.floor=function(ae,de){return ae[0]=Math.floor(de[0]),ae[1]=Math.floor(de[1]),ae[2]=Math.floor(de[2]),ae},me.min=function(ae,de,re){return ae[0]=Math.min(de[0],re[0]),ae[1]=Math.min(de[1],re[1]),ae[2]=Math.min(de[2],re[2]),ae},me.max=function(ae,de,re){return ae[0]=Math.max(de[0],re[0]),ae[1]=Math.max(de[1],re[1]),ae[2]=Math.max(de[2],re[2]),ae},me.round=function(ae,de){return ae[0]=Math.round(de[0]),ae[1]=Math.round(de[1]),ae[2]=Math.round(de[2]),ae},me.scale=function(ae,de,re){return ae[0]=de[0]*re,ae[1]=de[1]*re,ae[2]=de[2]*re,ae},me.ǃceq=function(ae,de,re,Ge){return ae[0]=de[0]+re[0]*Ge,ae[1]=de[1]+re[1]*Ge,ae[2]=de[2]+re[2]*Ge,ae},me.ǃcea=function(ae,de){var re=de[0]-ae[0],Ge=de[1]-ae[1],oe=de[2]-ae[2];return Math.sqrt(re*re+Ge*Ge+oe*oe)},me.ǃceg=me.ǃcea,me.ǃceN=function(ae,de){var re=de[0]-ae[0],Ge=de[1]-ae[1],oe=de[2]-ae[2];return re*re+Ge*Ge+oe*oe},me.ǃceK=me.ǃceN,me.length=function(ae){var de=ae[0],re=ae[1],Ge=ae[2];return Math.sqrt(de*de+re*re+Ge*Ge)},me.ǃceW=me.length,me.ǃceu=function(ae){var de=ae[0],re=ae[1],Ge=ae[2];return de*de+re*re+Ge*Ge},me.ǃceU=me.ǃceu,me.ǃcen=function(ae,de){return ae[0]=-de[0],ae[1]=-de[1],ae[2]=-de[2],ae},me.inverse=function(ae,de){return ae[0]=1/de[0],ae[1]=1/de[1],ae[2]=1/de[2],ae},me.normalize=function(ae,de){var re=de[0],Ge=de[1],oe=de[2],le=re*re+Ge*Ge+oe*oe;return 0>>18,ke[1]=128|(258048&we)>>>12,ke[2]=128|(4032&we)>>>6,ke[3]=128|63&we):2048>>12,ke[1]=128|(4032&we)>>>6,ke[2]=128|63&we):128>>6,ke[1]=128|63&we):ke[0]=we,this.ǃceo.push(ke)}this.ǃceo=Array.prototype.concat.apply([],this.ǃceo),this.ǃceo.length!=this.data.length&&(this.ǃceo.unshift(191),this.ǃceo.unshift(187),this.ǃceo.unshift(239))}function te(De,ye){this.ǃceI=De,this.ǃcex=ye,this.ǃceJ=null,this.ǃceZ=0,this.ǃceS=null,this.ǃces=[]}function ne(De,ye){if(De.length==void 0)throw new Error(De.length+"/"+ye);for(var Te=0;Tehe.length)throw new Error("Too long data");return Te}function re(De){var ye=encodeURI(De).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return ye.length+(ye.length==De?0:3)}const _23="100%",_24="http://www.w3.org/1999/xlink";ee.prototype={ǃceH:function(){return this.ǃceo.length},write:function(De){for(var ye=0,Te=this.ǃceo.length;yeDe||this.ǃceZ<=De||0>ye||this.ǃceZ<=ye)throw new Error(De+","+ye);return this.ǃceJ[De][ye]},ǃcpc:function(){return this.ǃceZ},ǃcpG:function(){this.ǃcpm(!1,this.ǃcpD())},ǃcpm:function(De,ye){this.ǃceZ=4*this.ǃceI+17,this.ǃceJ=Array(this.ǃceZ);for(var Te=0;Te=Te;Te++)if(!(-1>=De+Te||this.ǃceZ<=De+Te))for(var ke=-1;7>=ke;ke++)-1>=ye+ke||this.ǃceZ<=ye+ke||(this.ǃceJ[De+Te][ye+ke]=0<=Te&&6>=Te&&(0==ke||6==ke)||0<=ke&&6>=ke&&(0==Te||6==Te)||2<=Te&&4>=Te&&2<=ke&&4>=ke)},ǃcpD:function(){for(var De=0,ye=0,Te=0;8>Te;Te++){this.ǃcpm(!0,Te);var ke=ue.ǃcpr(this);(0==Te||De>ke)&&(De=ke,ye=Te)}return ye},ǃcpV:function(De,ye,Te){var ke=De.ǃcpA(ye,Te),we=1;this.ǃcpG();for(var Le=0,Ce;Le=Le;Le++)for(var Ce=-2;2>=Ce;Ce++)this.ǃceJ[ke+Le][we+Ce]=-2==Le||2==Le||-2==Ce||2==Ce||0==Le&&0==Ce}},ǃcpk:function(De){for(var ye=ue.ǃcpP(this.ǃceI),Te=0,ke;18>Te;Te++)ke=!De&&1==(1&ye>>Te),this.ǃceJ[Math.floor(Te/3)][Te%3+this.ǃceZ-8-3]=ke;for(var Te=0,ke;18>Te;Te++)ke=!De&&1==(1&ye>>Te),this.ǃceJ[Te%3+this.ǃceZ-8-3][Math.floor(Te/3)]=ke},ǃcpT:function(De,ye){for(var Te=this.ǃcex<<3|ye,ke=ue.ǃcpj(Te),we=0,Le;15>we;we++)Le=!De&&1==(1&ke>>we),6>we?this.ǃceJ[we][8]=Le:8>we?this.ǃceJ[we+1][8]=Le:this.ǃceJ[this.ǃceZ-15+we][8]=Le;for(var we=0,Le;15>we;we++)Le=!De&&1==(1&ke>>we),8>we?this.ǃceJ[8][this.ǃceZ-we-1]=Le:9>we?this.ǃceJ[8][15-we-1+1]=Le:this.ǃceJ[8][15-we-1]=Le;this.ǃceJ[this.ǃceZ-8][8]=!De},ǃcp$:function(De,ye){for(var Te=-1,ke=this.ǃceZ-1,we=7,Le=0,Ce=this.ǃceZ-1;0xe;xe++)if(null==this.ǃceJ[ke][Ce-xe]){var Re=!1;Le>>we));var Ue=ue.ǃcpd(ye,ke,Ce-xe);Ue&&(Re=!Re),this.ǃceJ[ke][Ce-xe]=Re,we--,-1==we&&(Le++,we=7)}if(ke+=Te,0>ke||this.ǃceZ<=ke){ke-=Te,Te=-Te;break}}}},te.ǃcpE=236,te.ǃcpe=17,te.ǃcpX=function(De,ye,Te){for(var ke=ie.ǃcpp(De,ye),we=new me,Le=0,Ce;Le8*xe)throw new Error("code length overflow. ("+we.ǃcpf()+">"+8*xe+")");for(we.ǃcpf()+4<=8*xe&&we.put(0,4);0!=we.ǃcpf()%8;)we.ǃcpB(!1);for(;!(we.ǃcpf()>=8*xe)&&!(we.put(te.ǃcpE,8),we.ǃcpf()>=8*xe);)we.put(te.ǃcpe,8);return te.ǃcpW(we,ke)},te.ǃcpW=function(De,ye){for(var Te=0,ke=0,we=0,Le=Array(ye.length),Ce=Array(ye.length),xe=0;xe>>=1;return ye},ǃcpt:function(De){return ue.ǃcpo[De-1]},ǃcpd:function(De,ye,Te){switch(De){case le.ǃcpM:return 0==(ye+Te)%2;case le.ǃcpC:return 0==ye%2;case le.ǃcph:return 0==Te%3;case le.ǃcpY:return 0==(ye+Te)%3;case le.ǃcpz:return 0==(Math.floor(ye/2)+Math.floor(Te/3))%2;case le.ǃcpF:return 0==ye*Te%2+ye*Te%3;case le.ǃcpl:return 0==(ye*Te%2+ye*Te%3)%2;case le.ǃcpw:return 0==(ye*Te%3+(ye+Te)%2)%2;default:throw new Error("bad maskPattern:"+De);}},ǃcpU:function(De){for(var ye=new ne([1],0),Te=0;Teye)switch(De){case Ge.ǃcpq:return 10;case Ge.ǃcpa:return 9;case Ge.ǃcew:return 8;case Ge.ǃcpg:return 8;default:throw new Error("mode:"+De);}else if(27>ye)switch(De){case Ge.ǃcpq:return 12;case Ge.ǃcpa:return 11;case Ge.ǃcew:return 16;case Ge.ǃcpg:return 10;default:throw new Error("mode:"+De);}else if(41>ye)switch(De){case Ge.ǃcpq:return 14;case Ge.ǃcpa:return 13;case Ge.ǃcew:return 16;case Ge.ǃcpg:return 12;default:throw new Error("mode:"+De);}else throw new Error("type:"+ye)},ǃcpr:function(De){for(var ye=De.ǃcpc(),Te=0,ke=0;ke=xe;xe++)if(!(0>ke+xe||ye<=ke+xe))for(var Re=-1;1>=Re;Re++)0>we+Re||ye<=we+Re||(0!=xe||0!=Re)&&Ce==De.ǃceQ(ke+xe,we+Re)&&Le++;5De)throw new Error("glog("+De+")");return pe.ǃcps[De]},ǃcpZ:function(De){for(;0>De;)De+=255;for(;256<=De;)De-=255;return pe.ǃcpO[De]},ǃcpO:Array(256),ǃcps:Array(256)},ge=0;8>ge;ge++)pe.ǃcpO[ge]=1<ge;ge++)pe.ǃcpO[ge]=pe.ǃcpO[ge-4]^pe.ǃcpO[ge-5]^pe.ǃcpO[ge-6]^pe.ǃcpO[ge-8];for(var ge=0;255>ge;ge++)pe.ǃcps[pe.ǃcpO[ge]]=ge;ne.prototype={get:function(De){return this.ǃcpQ[De]},ǃceH:function(){return this.ǃcpQ.length},multiply:function(De){for(var ye=Array(this.ǃceH()+De.ǃceH()-1),Te=0;Tethis.ǃceH()-De.ǃceH())return this;for(var ye=pe.ǃcpS(this.get(0))-pe.ǃcpS(De.get(0)),Te=Array(this.ǃceH()),ke=0;ke>>7-De%8)},put:function(De,ye){for(var Te=0;Te>>ye-Te-1))},ǃcpf:function(){return this.length},ǃcpB:function(De){var ye=Math.floor(this.length/8);this.buffer.length<=ye&&this.buffer.push(0),De&&(this.buffer[ye]|=128>>>this.length%8),this.length++}};var he=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]],ve=function(){var De=function(ye,Te){this.ǃcfm=ye,this.ǃcfD=Te};return De.prototype.ǃcfi=function(ye){function Te(Ie,Se){var je=document.createElementNS("http://www.w3.org/2000/svg",Ie);for(var Ae in Se)Se.hasOwnProperty(Ae)&&je.setAttribute(Ae,Se[Ae]);return je}var ke=this.ǃcfD,we=this.ǃcfm,Le=ye.ǃcpc(),Ce=Math.floor(ke.width/Le),xe=Math.floor(ke.height/Le);this.clear();var Re=Te("svg",{viewBox:"0 0 "+(Le+" ")+(Le+""),width:_23,height:_23,fill:ke.ǃcfR});Re.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",_24),we.appendChild(Re),Re.appendChild(Te("rect",{fill:ke.ǃcfR,width:_23,height:_23})),Re.appendChild(Te("rect",{fill:ke.ǃcfb,width:"1",height:"1",id:"template"}));for(var Ue=0;Ue"],Re=0;Re");for(var Ue=0;Ue");xe.push("")}xe.push(""),ke.innerHTML=xe.join("");var He=ke.childNodes[0],Xe=(Te.width-He.offsetWidth)/2,Ie=(Te.height-He.offsetHeight)/2;0Oe||0>Ke||Oe+Ke>We.size)throw new RangeError("offset:"+Oe+", length:"+Ke+", size:"+We.size);return We.slice?We.slice(Oe,Oe+Ke):We.webkitSlice?We.webkitSlice(Oe,Oe+Ke):We.ǃcff?We.ǃcff(Oe,Oe+Ke):We.ǃcfy?We.ǃcfy(Oe,Oe+Ke):void 0}function me(We,Oe){var Ke,qe;return Ke=new ArrayBuffer(We),qe=new Uint8Array(Ke),Oe&&qe.set(Oe,0),{buffer:Ke,ǃcfB:qe,view:new DataView(Ke)}}function ae(){}function de(We){var qe=this,Ze;qe.size=0,qe.init=function(Je,Me){var Qe=new Blob([We],{type:$e});Ze=new Ge(Qe),Ze.init(function(){qe.size=Ze.size,Je()},Me)},qe.ǃcfW=function(Je,Me,Qe,Gt){Ze.ǃcfW(Je,Me,Qe,Gt)}}function re(We){var qe=this,Ze;qe.size=0,qe.init=function(Je){for(var Me=We.length;"="==We.charAt(Me-1);)Me--;Ze=We.indexOf(",")+1,qe.size=Math.floor(0.75*(Me-Ze)),Je()},qe.ǃcfW=function(Je,Me,Qe){var Dt=me(Me),Gt,Lt=4*Math.floor(Je/3),Ut=4*Math.ceil((Je+Me)/3),Ht=ee.atob(We.substring(Lt+Ze,Ut+Ze)),Xt=Je-3*Math.floor(Lt/4);for(Gt=Xt;GtJe?Gt.readAsArrayBuffer(ie(We,Ze,Je)):ǃG.ǃckO(()=>Gt.readAsArrayBuffer(ie(We,Ze,Je)))}}function oe(){}function le(We){var Ze=[];this.init=function(Je){Je()},this.ǃcfu=function(Je,Me){Ze.push(Fe?Je:Je.buffer),Me()},this.getData=function(Je,Me){var Qe=new Blob(Ze,{type:$e}),Gt=new FileReader;Gt.onload=function(Dt){Je(Dt.target.result)},Gt.onerror=Me,Gt.readAsText(Qe,We)}}function ue(We){var Ze=this,Je="",Me="";Ze.init=function(Qe){Je+="data:"+(We||"")+";base64,",Qe()},Ze.ǃcfu=function(Qe,Gt){var Lt=Me.length,Ut=Me,Dt;for(Me="",Dt=0;Dt<3*Math.floor((Lt+Qe.length)/3)-Lt;Dt++)Ut+=String.fromCharCode(Qe[Dt]);for(;Dt>16,Ke=65535&We;try{return new Date(1980+((65024&Oe)>>9),((480&Oe)>>5)-1,31&Oe,(63488&Ke)>>11,(2016&Ke)>>5,2*(31&Ke),0)}catch(qe){}}function we(We,Oe,Ke,qe,Ze){return(We.version=Oe.view.getUint16(Ke,!0),We.ǃcfv=Oe.view.getUint16(Ke+2,!0),We.ǃcfq=Oe.view.getUint16(Ke+4,!0),We.ǃcfa=Oe.view.getUint32(Ke+6,!0),We.ǃcfg=ke(We.ǃcfa),1==(1&We.ǃcfv))?void Ze(je):((qe||8!=(8&We.ǃcfv))&&(We.ǃcfN=Oe.view.getUint32(Ke+10,!0),We.ǃcfK=Oe.view.getUint32(Ke+14,!0),We.ǃcfn=Oe.view.getUint32(Ke+18,!0)),4294967295===We.ǃcfK||4294967295===We.ǃcfn?void Ze(Ae):void(We.ǃcfM=Oe.view.getUint16(Ke+22,!0),We.ǃcfC=Oe.view.getUint16(Ke+24,!0)))}function Le(We,Oe,Ke){function qe(){}function Ze(Qe){function Gt(Ht,Xt){We.ǃcfW(We.size-Ht,Ht,function(It){for(var jt=It.length-Dt;0<=jt;jt--)if(80===It[jt]&&75===It[jt+1]&&5===It[jt+2]&&6===It[jt+3])return void Qe(new DataView(It.buffer,jt,Dt));Xt()},function(){Ke(Ne)})}var Dt=22;if(We.sizeLt||Lt>=We.size?void Ke(Ie):void We.ǃcfW(Lt,We.size-Lt,function(Ht){var It=0,jt=[],Vt=me(Ht.length,Ht),Xt,At,_t,zt;for(Xt=0;Xt>>8^qe[255&(Ke^Oe[Ze])];this.crc=Ke},te.prototype.get=function(){return~this.crc},te.prototype.table=function(){var qe=[],We,Oe,Ke;for(We=0;256>We;We++){for(Ke=We,Oe=0;8>Oe;Oe++)1&Ke?Ke=3988292384^Ke>>>1:Ke>>>=1;qe[We]=Ke}return qe}(),ne.prototype.append=function(Oe){return Oe},ne.prototype.flush=function(){},de.prototype=new ae,de.prototype.constructor=de,re.prototype=new ae,re.prototype.constructor=re,Ge.prototype=new ae,Ge.prototype.constructor=Ge,oe.prototype.getData=function(We){We(this.data)},le.prototype=new oe,le.prototype.constructor=le,ue.prototype=new oe,ue.prototype.constructor=ue,pe.prototype=new oe,pe.prototype.constructor=pe;var Ye={ǃcfw:[_26,"deflate.js"],inflater:[_26,"inflate.js"]};ee.zip={ǃcfI:ae,ǃcfx:oe,ǃcfJ:Ge,ǃcfZ:re,ǃcfS:de,ǃcfs:pe,ǃcfO:ue,ǃcfQ:le,ǃcyc:function(We,Oe,Ke){Ke=Ke||Xe,We.init(function(){Le(We,Oe,Ke)},Ke)},ǃcyG:function(We,Oe,Ke,qe){Ke=Ke||Xe,qe=!!qe,We.init(function(){Re(We,Oe,Ke,qe)},Ke)},ǃcfU:!0,ǃcfH:null,ǃcfo:null}}(this),"use strict",zip.ǃcfo={deflater:["3rdparty/zipjs/z-worker.js","3rdparty/zipjs/zlib-asm/zlib.js","3rdparty/zipjs/zlib-asm/codecs.js"],inflater:["3rdparty/zipjs/z-worker.js","3rdparty/zipjs/zlib-asm/zlib.js","3rdparty/zipjs/zlib-asm/codecs.js"]},!function(ee,te){"function"==typeof ǃcGe&&ǃcGe.ǃcGp?ǃcGe(ee):"undefined"!=typeof ǃcGE&&"object"==typeof exports?ǃcGE.exports=ee():te.rangy=ee()}(function(){function ee($e,Fe){var Ye=typeof $e[Fe];return Ye==Te||Ye==ye&&$e[Fe]||"unknown"==Ye}function te($e,Fe){return typeof $e[Fe]==ye&&$e[Fe]}function ne($e,Fe){return typeof $e[Fe]!=ke}function ie($e){return function(Fe,Ye){for(var We=Ye.length;We--;)if(!$e(Fe,Ye[We]))return!1;return!0}}function me($e){return $e&&Re($e,xe)&&He($e,Ce)}function ae($e){return te($e,_28)?$e.body:$e.getElementsByTagName(_28)[0]}function de($e){typeof console!=ke&&ee(console,"log")&&console.log($e)}function re($e,Fe){Se&&Fe?alert($e):de($e)}function Ge($e){Ae.ǃcym=!0,Ae.ǃcyD=!1,re("Rangy is not supported in this environment. Reason: "+$e,Ae.ǃcmi.ǃcyi)}function le($e){return $e.message||$e.description||$e+""}function ue(){if(Se&&!Ae.ǃcym){var Fe=!1,Ye=!1,$e;ee(document,_45)&&($e=document.createRange(),Re($e,Le)&&He($e,we)&&(Fe=!0));var We=ae(document);if(!We||_28!=We.nodeName.toLowerCase())return void Ge("No body element found");if(We&&ee(We,"createTextRange")&&($e=We.createTextRange(),me($e)&&(Ye=!0)),!Fe&&!Ye)return void Ge("Neither Range nor TextRange are available");Ae.ǃcym=!0,Ae.ǃcyb={ǃcyT:Fe,ǃcyk:Ye};var Oe,Ke;for(var qe in Ie)(Oe=Ie[qe])instanceof ve&&Oe.init(Oe,Ae);for(var Ze=0,Je=Pe.length;Je>Ze;++Ze)try{Pe[Ze](Ae)}catch(Me){Ke="Rangy init listener threw an exception. Continuing. Detail: "+le(Me),de(Ke)}}}function pe($e,Fe,Ye){Ye&&($e+=_44+Ye.name),Ae.warn(_50+$e+_69+Fe+" instead.")}function ge($e,Fe,Ye,We){$e[Fe]=function(){return pe(Fe,Ye,We),$e[Ye].apply($e,je.toArray(arguments))}}function ve($e,Fe,Ye){this.name=$e,this.ǃcyX=Fe,this.ǃcym=!1,this.ǃcyD=!1,this.ǃcy$=Ye}function be($e,Fe,Ye){var We=new ve($e,Fe,function(Oe){if(!Oe.ǃcym){Oe.ǃcym=!0;try{Ye(Ae,Oe),Oe.ǃcyD=!0}catch(qe){var Ke="Module '"+$e+"' failed to load: "+le(qe);de(Ke),qe.stack&&de(qe.stack)}}});return Ie[$e]=We,We}function Ee(){}const _28="body",_29="start",_30="object",_31="Offset",_32="DomRange",_33="deleteAll",_34="character",_35="undefined",_36="Container",_37="StartToEnd",_38="getRangeAt",_39="cloneRange",_42="startOffset",_44=" in module ",_45="createRange",_46="setEndAfter",_47="endContainer",_48="getSelection",_49="StartToStart",_50="DEPRECATED: ",_51="setEndBefore",_52="WrappedRange",_53="setStartAfter",_54="INDEX_SIZE_ERR",_55="setStartBefore",_56="startContainer",_58="removeAllRanges",_59="addEventListener",_60="WrappedSelection",_61="createRangyRange",_62="required module '",_63="createNativeRange",_64="INVALID_STATE_ERR",_65="WRONG_DOCUMENT_ERR",_66="HIERARCHY_REQUEST_ERR",_67="INVALID_NODE_TYPE_ERR",_68="commonAncestorContainer",_69=" is deprecated. Please use ";var ye=_30,Te="function",ke=_35,we=[_56,_42,_47,"endOffset","collapsed",_68],Le=["setStart",_55,_53,"setEnd",_51,_46,"collapse","selectNode","selectNodeContents","compareBoundaryPoints","deleteContents","extractContents","cloneContents","insertNode","surroundContents",_39,"toString","detach"],Ce=["boundingHeight","boundingLeft","boundingTop","boundingWidth","htmlText","text"],xe=["collapse","compareEndPoints","duplicate","moveToElementText","parentElement","select","setEndPoint","getBoundingClientRect"],Re=ie(ee),Ue=ie(te),He=ie(ne),Xe=[].forEach?function($e,Fe){$e.forEach(Fe)}:function($e,Fe){for(var Ye=0,We=$e.length;We>Ye;++Ye)Fe($e[Ye],Ye)},Ie={},Se=typeof window!=ke&&typeof document!=ke,je={ǃcyr:ee,ǃcyV:te,ǃcyA:ne,ǃcyL:Re,ǃcy_:Ue,ǃcyt:He,ǃcyP:me,ǃcyj:ae,forEach:Xe},Ae={version:"1.3.0",ǃcym:!1,ǃcyd:Se,ǃcyD:!0,ǃcyE:je,ǃcyb:{},ǃceJ:Ie,ǃcmi:{ǃcyi:!1,ǃcyR:!1,ǃcye:!1,ǃcyp:!(typeof ǃcyf!=ke)||ǃcyf}};Ae.ǃcyy=Ge,Ae.warn=function($e){re("Rangy warning: "+$e,Ae.ǃcmi.ǃcyR)};var Ne;({}).hasOwnProperty?(je.extend=Ne=function($e,Fe,Ye){var We,Oe;for(var Ke in Fe)Fe.hasOwnProperty(Ke)&&(We=$e[Ke],Oe=Fe[Ke],Ye&&null!==We&&_30==typeof We&&null!==Oe&&_30==typeof Oe&&Ne(We,Oe,!0),$e[Ke]=Oe);return Fe.hasOwnProperty("toString")&&($e.toString=Fe.toString),$e},je.ǃcyB=function($e,Fe){var Ye={};return Ne(Ye,Fe),$e&&Ne(Ye,$e),Ye}):Ge("hasOwnProperty not supported"),Se||Ge("Rangy can only run in a browser"),function(){var $e;if(Se){var Fe=document.createElement("div");Fe.appendChild(document.createElement("span"));var Ye=[].slice;try{1==Ye.call(Fe.childNodes,0)[0].nodeType&&($e=function(We){return Ye.call(We,0)})}catch(We){}}$e||($e=function(We){for(var Oe=[],Ke=0,qe=We.length;qe>Ke;++Ke)Oe[Ke]=We[Ke];return Oe}),je.toArray=$e}();var _e;Se&&(ee(document,_59)?_e=function($e,Fe,Ye){$e.addEventListener(Fe,Ye,!1)}:ee(document,"attachEvent")?_e=function($e,Fe,Ye){$e.attachEvent("on"+Fe,Ye)}:Ge("Document does not have required addEventListener or attachEvent method"),je.addListener=_e);var Pe=[];je.ǃcyW=pe,je.ǃcyu=ge,Ae.init=ue,Ae.ǃcyU=function($e){Ae.ǃcym?$e(Ae):Pe.push($e)};var ze=[];Ae.ǃcyv=function($e){ze.push($e)},Se&&(Ae.ǃcyq=Ae.ǃcya=function($e){$e=$e||window,ue();for(var Fe=0,Ye=ze.length;Ye>Fe;++Fe)ze[Fe]($e)},ge(Ae,"createMissingNativeApi","shim")),ve.prototype={init:function(){for(var Ye=this.ǃcyX||[],We=0,Oe=Ye.length,$e,Fe;Oe>We;++We){if(Fe=Ye[We],$e=Ie[Fe],!($e&&$e instanceof ve))throw new Error(_62+Fe+"' not found");if($e.init(),!$e.ǃcyD)throw new Error(_62+Fe+"' not supported")}this.ǃcy$(this)},ǃcyy:function($e){throw this.ǃcym=!0,this.ǃcyD=!1,new Error($e)},warn:function($e){Ae.warn("Module "+this.name+": "+$e)},ǃcyW:function($e,Fe){Ae.warn(_50+$e+_44+this.name+_69+Fe+" instead")},ǃcyg:function($e){return new Error("Error in Rangy "+this.name+" module: "+$e)}},Ae.ǃcyN=function($e){var Fe,Ye;2==arguments.length?(Fe=arguments[1],Ye=[]):(Fe=arguments[2],Ye=arguments[1]);var We=be($e,Ye,Fe);Ae.ǃcym&&Ae.ǃcyD&&We.init()},Ae.ǃcyK=function($e,Fe,Ye){be($e,Fe,Ye)},Ae.ǃcyn=Ee,Ae.ǃcyM=new Ee,Ae.ǃcyC=new function(){},Ae.ǃcyK("DomUtil",[],function($e,Fe){function Oe(dn){for(var rn=0;dn=dn.previousSibling;)++rn;return rn}function qe(dn,rn){var on=[],Gn;for(Gn=dn;Gn;Gn=Gn.parentNode)on.push(Gn);for(Gn=rn;Gn;Gn=Gn.parentNode)if(cn(on,Gn))return Gn;return null}function Ze(dn,rn,Gn){for(var on=Gn?rn:rn.parentNode;on;){if(on===dn)return!0;on=on.parentNode}return!1}function Me(dn,rn,Gn){for(var ln=Gn?dn:dn.parentNode,on;ln;){if(on=ln.parentNode,on===rn)return ln;ln=on}return null}function Qe(dn){var rn=dn.nodeType;return 3==rn||4==rn||8==rn}function Dt(dn,rn){var Gn=rn.nextSibling,on=rn.parentNode;return Gn?on.insertBefore(dn,Gn):on.appendChild(dn),dn}function Ut(dn){if(9==dn.nodeType)return dn;if(typeof dn.ownerDocument!=Mt)return dn.ownerDocument;if(typeof dn.document!=Mt)return dn.document;if(dn.parentNode)return Ut(dn.parentNode);throw Fe.ǃcyg("getDocument: no document found for node")}function Ht(dn){var rn=Ut(dn);if(typeof rn.defaultView!=Mt)return rn.defaultView;if(typeof rn.parentWindow!=Mt)return rn.parentWindow;throw Fe.ǃcyg("Cannot get a window object for node")}function Xt(dn){if(typeof dn.contentDocument!=Mt)return dn.contentDocument;if(typeof dn.contentWindow!=Mt)return dn.contentWindow.document;throw Fe.ǃcyg("getIframeDocument: No Document object found for iframe element")}function jt(dn){return dn&&Qt.ǃcyr(dn,"setTimeout")&&Qt.ǃcyV(dn,"document")}function Vt(dn){var rn;try{return rn=dn.parentNode,!1}catch(Gn){return!0}}function $t(dn){if(!dn)return"[No node]";if(mn&&Vt(dn))return"[Broken node]";if(Qe(dn))return"\""+dn.data+"\"";if(1==dn.nodeType){var rn=dn.id?" id=\""+dn.id+"\"":"";return"<"+dn.nodeName+rn+">[index:"+Oe(dn)+",length:"+dn.childNodes.length+"]["+(dn.innerHTML||"[innerHTML not supported]").slice(0,25)+"]"}return dn.nodeName}function Kt(dn){this.root=dn,this.ǃcyh=dn}function Zt(dn,rn){this.node=dn,this.offset=rn}function Jt(dn){this.code=this[dn],this.ǃcyY=dn,this.message="DOMException: "+this.ǃcyY}var Mt=_35,Qt=$e.ǃcyE,en=Qt.ǃcyj;Qt.ǃcyL(document,["createDocumentFragment","createElement","createTextNode"])||Fe.ǃcyy("document missing a Node creation method"),Qt.ǃcyr(document,"getElementsByTagName")||Fe.ǃcyy("document missing getElementsByTagName method");var tn=document.createElement("div");Qt.ǃcyL(tn,["insertBefore","appendChild","cloneNode"])||Fe.ǃcyy("Incomplete Element implementation"),Qt.ǃcyA(tn,"innerHTML")||Fe.ǃcyy("Element is missing innerHTML property");var nn=document.createTextNode("test");Qt.ǃcyL(nn,["splitText","deleteData","insertData","appendData","cloneNode"])||Fe.ǃcyy("Incomplete Text Node implementation");var cn=function(dn,rn){for(var Gn=dn.length;Gn--;)if(dn[Gn]===rn)return!0;return!1},mn=!1;!function(){var dn=document.createElement("b");dn.innerHTML="1";var rn=dn.firstChild;dn.innerHTML="
",mn=Vt(rn),$e.ǃcyb.ǃcyz=mn}();var an;typeof window.getComputedStyle==Mt?typeof document.documentElement.currentStyle==Mt?Fe.ǃcyy("No means of obtaining computed style properties found"):an=function(dn,rn){return dn.currentStyle?dn.currentStyle[rn]:""}:an=function(dn,rn){return Ht(dn).getComputedStyle(dn,null)[rn]},Kt.prototype={ǃcyF:null,ǃcyl:function(){return!!this.ǃcyh},next:function(){var Gn=this.ǃcyF=this.ǃcyh,dn,rn;if(this.ǃcyF)if(dn=Gn.firstChild)this.ǃcyh=dn;else{for(rn=null;Gn!==this.root&&!(rn=Gn.nextSibling);)Gn=Gn.parentNode;this.ǃcyh=rn}return this.ǃcyF},detach:function(){this.ǃcyF=this.ǃcyh=this.root=null}},Zt.prototype={ǃ_c:function(dn){return!!dn&&this.node===dn.node&&this.offset==dn.offset},ǃcyw:function(){return"[DomPosition("+$t(this.node)+":"+this.offset+")]"},toString:function(){return this.ǃcyw()}},Jt.prototype={INDEX_SIZE_ERR:1,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INVALID_STATE_ERR:11,INVALID_NODE_TYPE_ERR:24},Jt.prototype.toString=function(){return this.message},$e.ǃcyo={ǃcyH:cn,ǃcyI:function(dn){var rn;return typeof dn.namespaceURI==Mt||null===(rn=dn.namespaceURI)||"http://www.w3.org/1999/xhtml"==rn},parentElement:function(dn){var rn=dn.parentNode;return 1==rn.nodeType?rn:null},ǃcyx:Oe,ǃcyJ:function(dn){switch(dn.nodeType){case 7:case 10:return 0;case 3:case 8:return dn.length;default:return dn.childNodes.length;}},ǃcyZ:qe,ǃcyS:Ze,ǃcys:function(dn,rn){return Ze(dn,rn,!0)},ǃcyO:Me,ǃcyQ:Qe,ǃcBc:function(dn){if(!dn)return!1;var rn=dn.nodeType;return 3==rn||8==rn},ǃcBG:Dt,ǃcBm:function(dn,rn,Gn){var on=dn.cloneNode(!1);if(on.deleteData(0,rn),dn.deleteData(rn,dn.length-rn),Dt(on,dn),Gn)for(var un=0,ln;ln=Gn[un++];)ln.node==dn&&ln.offset>rn?(ln.node=on,ln.offset-=rn):ln.node==dn.parentNode&&ln.offset>Oe(dn)&&++ln.offset;return on},ǃcBD:Ut,ǃcBi:Ht,ǃcBR:function(dn){if(typeof dn.contentWindow!=Mt)return dn.contentWindow;if(typeof dn.contentDocument!=Mt)return dn.contentDocument.defaultView;throw Fe.ǃcyg("getIframeWindow: No Window object found for iframe element")},ǃcBb:Xt,ǃcyj:en,ǃcBT:jt,ǃcBk:function(dn,rn,Gn){var on;if(dn?Qt.ǃcyA(dn,"nodeType")?on=1==dn.nodeType&&"iframe"==dn.tagName.toLowerCase()?Xt(dn):Ut(dn):jt(dn)&&(on=dn.document):on=document,!on)throw rn.ǃcyg(Gn+"(): Parameter must be a Window object or DOM node");return on},ǃcBX:function(dn){for(var rn;rn=dn.parentNode;)dn=rn;return dn},ǃcB$:function(dn,rn,Gn,on){var ln,un,pn,gn,hn;if(dn==Gn)return rn===on?0:on>rn?-1:1;if(ln=Me(Gn,dn,!0))return rn<=Oe(ln)?-1:1;if(ln=Me(dn,Gn,!0))return Oe(ln)=Bn.childNodes.length?Bn.appendChild(zn):Bn.insertBefore(zn,Bn.childNodes[Vn]),$n}function Ze(zn,Bn,Vn){if(Ft(zn),Ft(Bn),Ye(Bn)!=Ye(zn))throw new mn(_65);var $n=on(zn.startContainer,zn.startOffset,Bn.endContainer,Bn.endOffset),Fn=on(zn.endContainer,zn.endOffset,Bn.startContainer,Bn.startOffset);return Vn?0>=$n&&0<=Fn:0>$n&&0Bn||Bn>(an(zn)?zn.length:zn.childNodes.length))throw new mn(_54)}function At(zn,Bn){if(wn(zn,!0)!==wn(Bn,!0))throw new mn(_65)}function _t(zn){if(Ln(zn,!0))throw new mn("NO_MODIFICATION_ALLOWED_ERR")}function zt(zn,Bn){if(!zn)throw new mn(Bn)}function Vt(zn,Bn){return Bn<=(an(zn)?zn.length:zn.childNodes.length)}function $t(zn){return!!zn.startContainer&&!!zn.endContainer&&!(vn&&(tn.ǃcBr(zn.startContainer)||tn.ǃcBr(zn.endContainer)))&&hn(zn.startContainer)==hn(zn.endContainer)&&Vt(zn.startContainer,zn.startOffset)&&Vt(zn.endContainer,zn.endOffset)}function Ft(zn){if(!$t(zn))throw new Error("Range error: Range is not valid. This usually happens after DOM mutation. Range: ("+zn.ǃcyw()+")")}function Yt(zn,Bn){Ft(zn);var Vn=zn.startContainer,$n=zn.startOffset,Fn=zn.endContainer,Yn=zn.endOffset,Wn=Vn===Fn;an(Fn)&&0=dn(Vn)&&Yn++,$n=0),zn.ǃcBv(Vn,$n,Fn,Yn)}function Wt(zn){Ft(zn);var Bn=zn.commonAncestorContainer.parentNode.cloneNode(!1);return Bn.appendChild(zn.cloneContents()),Bn.innerHTML}function Kt(zn){zn.START_TO_START=Xn,zn.START_TO_END=In,zn.END_TO_END=Sn,zn.END_TO_START=jn,zn.NODE_BEFORE=An,zn.NODE_AFTER=Nn,zn.NODE_BEFORE_AND_AFTER=_n,zn.NODE_INSIDE=Pn}function qt(zn){Kt(zn),Kt(zn.prototype)}function Zt(zn,Bn){return function(){Ft(this);var Fn=this.startContainer,Yn=this.startOffset,Wn=this.commonAncestorContainer,On=new Ut(this,!0),Vn,$n;Fn!==Wn&&(Vn=un(Fn,Wn,!0),$n=Ke(Vn),Fn=$n.node,Yn=$n.offset),Me(On,_t),On.reset();var Kn=zn(On);return On.detach(),Bn(this,Fn,Yn,Fn,Yn),Kn}}function Jt(zn,Bn){function Vn(Wn,On){return function(Kn){It(Kn,En),It(hn(Kn),Dn);var qn=(Wn?Oe:Ke)(Kn);(On?$n:Fn)(this,qn.node,qn.offset)}}function $n(Wn,On,Kn){var qn=Wn.endContainer,Zn=Wn.endOffset;(On!==Wn.startContainer||Kn!==Wn.startOffset)&&((hn(On)!=hn(qn)||1==on(On,Kn,qn,Zn))&&(qn=On,Zn=Kn),Bn(Wn,On,Kn,qn,Zn))}function Fn(Wn,On,Kn){var qn=Wn.startContainer,Zn=Wn.startOffset;(On!==Wn.endContainer||Kn!==Wn.endOffset)&&((hn(On)!=hn(qn)||-1==on(On,Kn,qn,Zn))&&(qn=On,Zn=Kn),Bn(Wn,qn,Zn,On,Kn))}var Yn=function(){};Yn.prototype=$e.ǃcyM,zn.prototype=new Yn,nn.extend(zn.prototype,{setStart:function(Wn,On){Xt(Wn,!0),jt(Wn,On),$n(this,Wn,On)},setEnd:function(Wn,On){Xt(Wn,!0),jt(Wn,On),Fn(this,Wn,On)},ǃcBv:function(){var Wn=arguments,On=Wn[0],Kn=Wn[1],qn=On,Zn=Kn;switch(Wn.length){case 3:Zn=Wn[2];break;case 4:qn=Wn[2],Zn=Wn[3];}Bn(this,On,Kn,qn,Zn)},ǃcBq:function(Wn,On,Kn){this["set"+(Kn?"Start":"End")](Wn,On)},setStartBefore:Vn(!0,!0),setStartAfter:Vn(!1,!0),setEndBefore:Vn(!0,!1),setEndAfter:Vn(!1,!1),collapse:function(Wn){Ft(this),Wn?Bn(this,this.startContainer,this.startOffset,this.startContainer,this.startOffset):Bn(this,this.endContainer,this.endOffset,this.endContainer,this.endOffset)},selectNodeContents:function(Wn){Xt(Wn,!0),Bn(this,Wn,0,Wn,pn(Wn))},selectNode:function(Wn){Xt(Wn,!1),It(Wn,En);var On=Oe(Wn),Kn=Ke(Wn);Bn(this,On.node,On.offset,Kn.node,Kn.offset)},extractContents:Zt(Gt,Bn),deleteContents:Zt(Qe,Bn),ǃcBa:function(){Ft(this),_t(this.startContainer),_t(this.endContainer);var Wn=new Ut(this,!0),On=Wn.ǃcBu&&Fe(Wn.ǃcBu,this)||Wn.ǃcBU&&Fe(Wn.ǃcBU,this);return Wn.detach(),!On},ǃcBg:function(){Yt(this)},ǃcBN:function(Wn){Yt(this,Wn)},ǃcBK:function(){Ft(this);var On=this.startContainer,Kn=this.startOffset,qn=this.endContainer,Zn=this.endOffset,Jn=function(nc){var cc=nc.nextSibling;cc&&cc.nodeType==nc.nodeType&&(qn=nc,Zn=nc.length,nc.appendData(cc.data),bn(cc))},Mn=function(nc){var cc=nc.previousSibling;if(cc&&cc.nodeType==nc.nodeType){On=nc;var ic=nc.length;if(Kn=cc.length,nc.insertData(0,cc.data),bn(cc),On==qn)Zn+=Kn,qn=On;else if(qn==nc.parentNode){var mc=dn(nc);Zn==mc?(qn=nc,Zn=ic):Zn>mc&&Zn--}}},Qn=!0,Wn;if(an(qn))Zn==qn.length?Jn(qn):0==Zn&&(Wn=qn.previousSibling,Wn&&Wn.nodeType==qn.nodeType&&(Zn=Wn.length,On==qn&&(Qn=!1),Wn.appendData(qn.data),bn(qn),qn=Wn));else{if(0x",Rn=3==xn.firstChild.nodeType}catch(zn){}$e.ǃcyb.ǃcBM=Rn;var Un=Rn?function(zn){var Bn=this.startContainer,Vn=Gn(Bn);if(!Bn)throw new mn(_64);var $n=null;return 1==Bn.nodeType?$n=Bn:an(Bn)&&($n=tn.parentElement(Bn)),$n=null===$n||"HTML"==$n.nodeName&&tn.ǃcyI(Gn($n).documentElement)&&tn.ǃcyI($n)?Vn.createElement(_28):$n.cloneNode(!1),$n.innerHTML=zn,tn.ǃcB_($n)}:function(zn){var Bn=Ye(this),Vn=Bn.createElement(_28);return Vn.innerHTML=zn,tn.ǃcB_(Vn)},Hn=[_56,_42,_47,"endOffset","collapsed",_68],Xn=0,In=1,Sn=2,jn=3,An=0,Nn=1,_n=2,Pn=3;nn.extend($e.ǃcyM,{compareBoundaryPoints:function(zn,Bn){Ft(this),At(this.startContainer,Bn.startContainer);var Wn=zn==jn||zn==Xn?_29:"end",On=zn==In||zn==Xn?_29:"end",Vn,$n,Fn,Yn;return Vn=this[Wn+_36],$n=this[Wn+_31],Fn=Bn[On+_36],Yn=Bn[On+_31],on(Vn,$n,Fn,Yn)},insertNode:function(zn){if(Ft(this),It(zn,Tn),_t(this.startContainer),rn(zn,this.startContainer))throw new mn(_66);var Bn=qe(zn,this.startContainer,this.startOffset);this.setStartBefore(Bn)},cloneContents:function(){Ft(this);var zn,Bn;if(this.collapsed)return Ye(this).createDocumentFragment();if(this.startContainer===this.endContainer&&an(this.startContainer))return zn=this.startContainer.cloneNode(!0),zn.data=zn.data.slice(this.startOffset,this.endOffset),Bn=Ye(this).createDocumentFragment(),Bn.appendChild(zn),Bn;var Vn=new Ut(this,!0);return zn=Je(Vn),Vn.detach(),zn},ǃcBa:function(){Ft(this),_t(this.startContainer),_t(this.endContainer);var zn=new Ut(this,!0),Bn=zn.ǃcBu&&Fe(zn.ǃcBu,this)||zn.ǃcBU&&Fe(zn.ǃcBU,this);return zn.detach(),!Bn},surroundContents:function(zn){if(It(zn,kn),!this.ǃcBa())throw new mn(_64);var Bn=this.extractContents();if(zn.hasChildNodes())for(;zn.lastChild;)zn.removeChild(zn.lastChild);qe(zn,this.startContainer,this.startOffset),zn.appendChild(Bn),this.selectNode(zn)},cloneRange:function(){Ft(this);for(var Bn=new en(Ye(this)),Vn=Hn.length,zn;Vn--;)zn=Hn[Vn],Bn[zn]=this[zn];return Bn},toString:function(){Ft(this);var zn=this.startContainer;if(zn===this.endContainer&&an(zn))return 3==zn.nodeType||4==zn.nodeType?zn.data.slice(this.startOffset,this.endOffset):"";var Bn=[],Vn=new Ut(this,!0);return Me(Vn,function($n){(3==$n.nodeType||4==$n.nodeType)&&Bn.push($n.data)}),Vn.detach(),Bn.join("")},compareNode:function(zn){Ft(this);var Bn=zn.parentNode,Vn=dn(zn);if(!Bn)throw new mn("NOT_FOUND_ERR");var $n=this.comparePoint(Bn,Vn),Fn=this.comparePoint(Bn,Vn+1);return 0>$n?0on(zn,Bn,this.startContainer,this.startOffset)?-1:0=Fn&&0<=Yn:0>Fn&&0=on(zn,Bn,this.endContainer,this.endOffset)},ǃcBh:function(zn){return Ze(this,zn,!1)},ǃcBY:function(zn){return Ze(this,zn,!0)},ǃcBz:function(zn){if(this.ǃcBh(zn)){var Bn=on(this.startContainer,this.startOffset,zn.startContainer,zn.startOffset),Vn=on(this.endContainer,this.endOffset,zn.endContainer,zn.endOffset),$n=this.cloneRange();return-1==Bn&&$n.setStart(zn.startContainer,zn.startOffset),1==Vn&&$n.setEnd(zn.endContainer,zn.endOffset),$n}return null},ǃcBF:function(zn){if(this.ǃcBY(zn)){var Bn=this.cloneRange();return-1==on(zn.startContainer,zn.startOffset,this.startContainer,this.startOffset)&&Bn.setStart(zn.startContainer,zn.startOffset),1==on(zn.endContainer,zn.endOffset,this.endContainer,this.endOffset)&&Bn.setEnd(zn.endContainer,zn.endOffset),Bn}throw new mn("Ranges do not intersect")},containsNode:function(zn,Bn){return Bn?this.intersectsNode(zn,!1):this.compareNode(zn)==Pn},ǃcBl:function(zn){return 0<=this.comparePoint(zn,0)&&0>=this.comparePoint(zn,pn(zn))},ǃcBw:function(zn){var Bn=this.ǃcBz(zn);return null!==Bn&&zn.ǃ_c(Bn)},ǃcBo:function(zn){var Bn=this.cloneRange();Bn.selectNode(zn);var Vn=Bn.ǃcBH([3]);if(0=Vn&&zn.start<=Fn&&(this.setStart($n,zn.start-Vn),Kn=!0),Kn&&zn.end>=Vn&&zn.end<=Fn&&(this.setEnd($n,zn.end-Vn),qn=!0),Vn=Fn;else for(Wn=$n.childNodes,Yn=Wn.length;Yn--;)On.push(Wn[Yn])},ǃcBE:function(){return _32},ǃ_c:function(zn){return en.ǃcBZ(this,zn)},ǃcBS:function(){return $t(this)},ǃcyw:function(){return Lt(this)},detach:function(){}}),Jt(en,Qt),nn.extend(en,{ǃcBs:Hn,ǃcBO:Ut,ǃcBQ:qt,ǃcWc:Jt,ǃcyw:Lt,ǃcBC:Wt,ǃcWG:Ye,ǃcBZ:function(zn,Bn){return zn.startContainer===Bn.startContainer&&zn.startOffset===Bn.startOffset&&zn.endContainer===Bn.endContainer&&zn.endOffset===Bn.endOffset}}),$e.ǃcWm=en}),Ae.ǃcyK(_52,[_32],function($e,Fe){var Oe=$e.ǃcyo,Ke=$e.ǃcyE,qe=Oe.ǃcBP,Ze=$e.ǃcWm,Je=Oe.ǃcyj,Me=Oe.ǃcBk,Qe=Oe.ǃcyQ,Ye,We;if($e.ǃcyb.ǃcyT&&!function(){function It(qt){for(var Jt=zt.length,Zt;Jt--;)Zt=zt[Jt],qt[Zt]=qt.ǃcWD[Zt];qt.collapsed=qt.startContainer===qt.endContainer&&qt.startOffset===qt.endOffset}var zt=Ze.ǃcBs,At,_t;Ye=function(qt){if(!qt)throw Fe.ǃcyg("WrappedRange: Range must be specified");this.ǃcWD=qt,It(this)},Ze.ǃcWc(Ye,function(qt,Zt,Jt,Mt,Qt){var en=qt.startContainer!==Zt||qt.startOffset!=Jt,tn=qt.endContainer!==Mt||qt.endOffset!=Qt,nn=!qt.ǃ_c(qt.ǃcWD);(en||tn||nn)&&(qt.setEnd(Mt,Qt),qt.setStart(Zt,Jt))}),At=Ye.prototype,At.selectNode=function(qt){this.ǃcWD.selectNode(qt),It(this)},At.cloneContents=function(){return this.ǃcWD.cloneContents()},At.surroundContents=function(qt){this.ǃcWD.surroundContents(qt),It(this)},At.collapse=function(qt){this.ǃcWD.collapse(qt),It(this)},At.cloneRange=function(){return new Ye(this.ǃcWD.cloneRange())},At.refresh=function(){It(this)},At.toString=function(){return this.ǃcWD.toString()};var Vt=document.createTextNode("test");Je(document).appendChild(Vt);var $t=document.createRange();$t.setStart(Vt,0),$t.setEnd(Vt,0);try{$t.setStart(Vt,1),At.setStart=function(qt,Zt){this.ǃcWD.setStart(qt,Zt),It(this)},At.setEnd=function(qt,Zt){this.ǃcWD.setEnd(qt,Zt),It(this)},_t=function(qt){return function(Zt){this.ǃcWD[qt](Zt),It(this)}}}catch(qt){At.setStart=function(Zt,Jt){try{this.ǃcWD.setStart(Zt,Jt)}catch(Mt){this.ǃcWD.setEnd(Zt,Jt),this.ǃcWD.setStart(Zt,Jt)}It(this)},At.setEnd=function(Zt,Jt){try{this.ǃcWD.setEnd(Zt,Jt)}catch(Mt){this.ǃcWD.setStart(Zt,Jt),this.ǃcWD.setEnd(Zt,Jt)}It(this)},_t=function(Zt,Jt){return function(Mt){try{this.ǃcWD[Zt](Mt)}catch(Qt){this.ǃcWD[Jt](Mt),this.ǃcWD[Zt](Mt)}It(this)}}}At.setStartBefore=_t(_55,_51),At.setStartAfter=_t(_53,_46),At.setEndBefore=_t(_51,_55),At.setEndAfter=_t(_46,_53),At.selectNodeContents=function(qt){this.ǃcBv(qt,0,Oe.ǃcyJ(qt))},$t.selectNodeContents(Vt),$t.setEnd(Vt,3);var Ft=document.createRange();Ft.selectNodeContents(Vt),Ft.setEnd(Vt,4),Ft.setStart(Vt,2),At.compareBoundaryPoints=-1==$t.compareBoundaryPoints($t.START_TO_END,Ft)&&1==$t.compareBoundaryPoints($t.END_TO_START,Ft)?function(qt,Zt){return Zt=Zt.ǃcWD||Zt,qt==Zt.START_TO_END?qt=Zt.END_TO_START:qt==Zt.END_TO_START&&(qt=Zt.START_TO_END),this.ǃcWD.compareBoundaryPoints(qt,Zt)}:function(qt,Zt){return this.ǃcWD.compareBoundaryPoints(qt,Zt.ǃcWD||Zt)};var Yt=document.createElement("div");Yt.innerHTML="123";var Wt=Yt.firstChild,Kt=Je(document);Kt.appendChild(Yt),$t.setStart(Wt,1),$t.setEnd(Wt,2),$t.deleteContents(),"13"==Wt.data&&(At.deleteContents=function(){this.ǃcWD.deleteContents(),It(this)},At.extractContents=function(){var qt=this.ǃcWD.extractContents();return It(this),qt}),Kt.removeChild(Yt),Kt=null,Ke.ǃcyr($t,"createContextualFragment")&&(At.createContextualFragment=function(qt){return this.ǃcWD.createContextualFragment(qt)}),Je(document).removeChild(Vt),At.ǃcBE=function(){return _52},$e.ǃcWi=Ye,$e.ǃcWR=function(qt){return qt=Me(qt,Fe,_63),qt.createRange()}}(),$e.ǃcyb.ǃcyk){var Gt=function(It){var jt=It.parentElement(),At=It.duplicate();At.collapse(!0);var _t=At.parentElement();At=It.duplicate(),At.collapse(!1);var zt=At.parentElement(),Vt=_t==zt?_t:Oe.ǃcyZ(_t,zt);return Vt==jt?Vt:Oe.ǃcyZ(jt,Vt)},Dt=function(It){return 0==It.compareEndPoints(_37,It)},Lt=function(It,jt,At,_t,zt){var Vt=It.duplicate();Vt.collapse(At);var $t=Vt.parentElement();if(Oe.ǃcys(jt,$t)||($t=jt),!$t.canHaveHTML){var Ft=new qe($t.parentNode,Oe.ǃcyx($t));return{ǃcWb:Ft,ǃcWT:{ǃcWk:Ft.offset,ǃcWX:Ft.node}}}var Yt=Oe.ǃcBD($t).createElement("span");Yt.parentNode&&Oe.removeNode(Yt);for(var Mt=At?_49:_37,Qt=zt&&zt.ǃcWX==$t?zt.ǃcWk:0,en=$t.childNodes.length,tn=en,nn=tn,Wt,Kt,qt,Zt,Jt;;){if(nn==en?$t.appendChild(Yt):$t.insertBefore(Yt,$t.childNodes[nn]),Vt.moveToElementText(Yt),Wt=Vt.compareEndPoints(Mt,It),0==Wt||Qt==tn)break;if(-1==Wt){if(tn==Qt+1)break;Qt=nn}else tn=tn==Qt+1?Qt:nn;nn=Math.floor((Qt+tn)/2),$t.removeChild(Yt)}if(Jt=Yt.nextSibling,-1==Wt&&Jt&&Qe(Jt)){Vt.setEndPoint(At?"EndToStart":"EndToEnd",It);var cn;if(/[\r\n]/.test(Jt.data)){var mn=Vt.duplicate(),an=mn.text.replace(/\r\n/g,"\r").length;for(cn=mn.moveStart(_34,an);-1==(Wt=mn.compareEndPoints(_37,mn));)cn++,mn.moveStart(_34,1)}else cn=Vt.text.length;Zt=new qe(Jt,cn)}else Kt=(_t||!At)&&Yt.previousSibling,qt=(_t||At)&&Yt.nextSibling,Zt=qt&&Qe(qt)?new qe(qt,0):Kt&&Qe(Kt)?new qe(Kt,Kt.data.length):new qe($t,Oe.ǃcyx(Yt));return Oe.removeNode(Yt),{ǃcWb:Zt,ǃcWT:{ǃcWk:nn,ǃcWX:$t}}},Ut=function(It,jt){var $t=It.offset,Ft=Oe.ǃcBD(It.node),Yt=Je(Ft).createTextRange(),Wt=Qe(It.node),At,_t,zt,Vt;return Wt?(At=It.node,_t=At.parentNode):(Vt=It.node.childNodes,At=$tIn;++In)if(!qt.ǃcyS(Xn[0],Xn[In]))return!1;return!0}function Dt(Xn){var In=Xn.ǃcBH();if(!Gt(In))throw Fe.ǃcyg("getSingleElementFromRange: range "+Xn.ǃcyw()+" did not consist of a single element");return In[0]}function Lt(Xn){return!!Xn&&_35!=typeof Xn.text}function Ut(Xn,In){var Sn=new Qt(In);Xn.ǃcWP=[Sn],Ze(Xn,Sn,!1),Xn.rangeCount=1,Xn.isCollapsed=Sn.collapsed}function Ht(Xn){if(Xn.ǃcWP.length=0,"None"==Xn.ǃcWj.type)Me(Xn);else{var In=Xn.ǃcWj.createRange();if(Lt(In))Ut(Xn,In);else{Xn.rangeCount=In.length;for(var jn=mn(In.item(0)),An=0,Sn;An_n;++_n)Nn.add(Sn.item(_n));try{Nn.add(jn)}catch(zn){throw Fe.ǃcyg("addRange(): Element within the specified Range could not be added to control selection (does it have layout?)")}Nn.select(),Ht(Xn)}function It(Xn,In,Sn){this.ǃcWt=Xn,this.ǃcWj=In,this.ǃcWP=[],this.ǃcW_=Sn,this.refresh()}function jt(Xn){Xn.ǃcW_=Xn.anchorNode=Xn.focusNode=Xn.ǃcWP=null,Xn.rangeCount=Xn.anchorOffset=Xn.focusOffset=0,Xn.ǃcWd=!0}function At(Xn,In){for(var An=wn.length,Sn,jn;An--;)if(Sn=wn[An],jn=Sn.selection,_33==In)jt(jn);else if(Sn.ǃcW_==Xn)return"delete"==In?(wn.splice(An,1),!0):jn;return _33==In&&(wn.length=0),null}function _t(Xn,In){for(var jn=mn(In[0].startContainer),An=an(jn).createControlRange(),Nn=0,_n=In.length,Sn;_n>Nn;++Nn){Sn=Dt(In[Nn]);try{An.add(Sn)}catch(Pn){throw Fe.ǃcyg("setRanges(): Element within one of the specified Ranges could not be added to control selection (does it have layout?)")}}An.select(),Ht(Xn)}function zt(Xn,In){if(Xn.ǃcW_.document!=mn(In))throw new en(_65)}function Vt(Xn){return function(In,Sn){var jn;this.rangeCount?(jn=this.getRangeAt(0),jn["set"+(Xn?"Start":"End")](In,Sn)):(jn=$e.createRange(this.ǃcW_.document),jn.ǃcBv(In,Sn)),this.ǃcWE(jn,this.ǃcWe())}}function $t(Xn){var In=[],Sn=new tn(Xn.anchorNode,Xn.anchorOffset),jn=new tn(Xn.focusNode,Xn.focusOffset),An="function"==typeof Xn.ǃcBE?Xn.ǃcBE():"Selection";if(_35!=typeof Xn.rangeCount)for(var Nn=0,_n=Xn.rangeCount;_n>Nn;++Nn)In[Nn]=Mt.ǃcyw(Xn.getRangeAt(Nn));return"["+An+"(Ranges: "+In.join(", ")+")(anchor: "+Sn.ǃcyw()+", focus: "+jn.ǃcyw()+"]"}$e.ǃcmi.ǃcWp=!0;var Wt="boolean",Kt="number",qt=$e.ǃcyo,Zt=$e.ǃcyE,Jt=Zt.ǃcyr,Mt=$e.ǃcWm,Qt=$e.ǃcWi,en=$e.DOMException,tn=qt.ǃcBP,nn=$e.ǃcyb,cn="Control",mn=qt.ǃcBD,an=qt.ǃcyj,dn=Mt.ǃcBZ,rn=Jt(window,_48),Gn=Zt.ǃcyV(document,"selection"),Ft,Yt;nn.ǃcWf=rn,nn.ǃcWy=Gn;var on=Gn&&(!rn||$e.ǃcmi.ǃcye);if(on)Ft=Ke,$e.ǃcWB=function(Xn){var In=We(Xn,"isSelectionValid").document,Sn=In.selection;return"None"!=Sn.type||mn(Sn.createRange().parentElement())==In};else{if(!rn)return Fe.ǃcyy("Neither document.selection or window.getSelection() detected."),!1;Ft=Oe,$e.ǃcWB=function(){return!0}}$e.ǃcWW=Ft;var ln=Ft();if(!ln)return Fe.ǃcyy("Native selection was null (possibly issue 138?)"),!1;var un=$e.ǃcWR(document),pn=an(document),gn=Zt.ǃcyt(ln,["anchorNode","focusNode","anchorOffset","focusOffset"]);nn.ǃcWu=gn;var hn=Jt(ln,"extend");nn.ǃcWU=hn;var vn=typeof ln.rangeCount==Kt;nn.ǃcWv=vn;var bn=!1,En=!0,Dn=hn?function(Xn,In){var Sn=Mt.ǃcWG(In),jn=$e.createRange(Sn);jn.ǃcBn(In.endContainer,In.endOffset),Xn.addRange(Qe(jn)),Xn.extend(In.startContainer,In.startOffset)}:null;Zt.ǃcyL(ln,["addRange",_38,_58])&&typeof ln.rangeCount==Kt&&nn.ǃcyT&&!function(){var Xn=window.getSelection();if(Xn){for(var In=Xn.rangeCount,Sn=1Nn;++Nn)jn[Nn]=Xn.getRangeAt(Nn);var _n=qt.ǃcBL(document,"",!1),Pn=_n.appendChild(document.createTextNode("\xA0\xA0\xA0")),zn=document.createRange();if(zn.setStart(Pn,1),zn.collapse(!0),Xn.removeAllRanges(),Xn.addRange(zn),En=1==Xn.rangeCount,Xn.removeAllRanges(),!Sn){var Bn=window.navigator.appVersion.match(/Chrome\/(.*?) /);if(Bn&&36<=parseInt(Bn[1]))bn=!1;else{var Vn=zn.cloneRange();zn.setStart(Pn,0),Vn.setEnd(Pn,3),Vn.setStart(Pn,2),Xn.addRange(zn),Xn.addRange(Vn),bn=2==Xn.rangeCount}}for(qt.removeNode(_n),Xn.removeAllRanges(),Nn=0;In>Nn;++Nn)0==Nn&&An?Dn?Dn(Xn,jn[Nn]):($e.warn("Rangy initialization: original selection was backwards but selection has been restored forwards because the browser does not support Selection.extend"),Xn.addRange(jn[Nn])):Xn.addRange(jn[Nn])}}(),nn.ǃcWq=bn,nn.ǃcWa=En;var Tn=!1,yn;pn&&Jt(pn,"createControlRange")&&(yn=pn.createControlRange(),Zt.ǃcyt(yn,["item","add"])&&(Tn=!0)),nn.ǃcWg=Tn,Yt=gn?function(Xn){return Xn.anchorNode===Xn.focusNode&&Xn.anchorOffset===Xn.focusOffset}:function(Xn){return!!Xn.rangeCount&&Xn.getRangeAt(Xn.rangeCount-1).collapsed};var kn;Jt(ln,_38)?kn=function(Xn,In){try{return Xn.getRangeAt(In)}catch(Sn){return null}}:gn&&(kn=function(Xn){var In=mn(Xn.anchorNode),Sn=$e.createRange(In);return Sn.ǃcBv(Xn.anchorNode,Xn.anchorOffset,Xn.focusNode,Xn.focusOffset),Sn.collapsed!==this.isCollapsed&&Sn.ǃcBv(Xn.focusNode,Xn.focusOffset,Xn.anchorNode,Xn.anchorOffset),Sn}),It.prototype=$e.ǃcyC;var wn=[],Ln=function(Xn){if(Xn&&Xn instanceof It)return Xn.refresh(),Xn;Xn=We(Xn,"getNativeSelection");var In=At(Xn),Sn=Ft(Xn),jn=Gn?Ke(Xn):null;return In?(In.ǃcWt=Sn,In.ǃcWj=jn,In.refresh()):(In=new It(Sn,jn,Xn),wn.push({ǃcW_:Xn,selection:In})),In};$e.getSelection=Ln,Zt.ǃcyu($e,"getIframeSelection",_48);var Cn=It.prototype;if(!on&&gn&&Zt.ǃcyL(ln,[_58,"addRange"])){Cn.removeAllRanges=function(){this.ǃcWt.removeAllRanges(),Me(this)};var xn=function(Xn,In){Dn(Xn.ǃcWt,In),Xn.refresh()};Cn.addRange=vn?function(Xn,In){if(Tn&&Gn&&this.ǃcWj.type==cn)Xt(this,Xn);else if(Ye(In)&&hn)xn(this,Xn);else{var Sn;bn?Sn=this.rangeCount:(this.removeAllRanges(),Sn=0);var jn=Qe(Xn).cloneRange();try{this.ǃcWt.addRange(jn)}catch(Nn){}if(this.rangeCount=this.ǃcWt.rangeCount,this.rangeCount==Sn+1){if($e.ǃcmi.ǃcWp){var An=kn(this.ǃcWt,this.rangeCount-1);An&&!dn(An,Xn)&&(Xn=new Qt(An))}this.ǃcWP[this.rangeCount-1]=Xn,Ze(this,Xn,Hn(this.ǃcWt)),this.isCollapsed=Yt(this)}else this.refresh()}}:function(Xn,In){Ye(In)&&hn?xn(this,Xn):(this.ǃcWt.addRange(Qe(Xn)),this.refresh())},Cn.ǃcWN=function(Xn){if(Tn&&Gn&&1In;++In)this.addRange(Xn[In])}}}else{if(!(Jt(ln,"empty")&&Jt(un,"select")&&Tn&&on))return Fe.ǃcyy("No means of selecting a Range or TextRange was found"),!1;Cn.removeAllRanges=function(){try{if(this.ǃcWj.empty(),"None"!=this.ǃcWj.type){var Xn;if(this.anchorNode)Xn=mn(this.anchorNode);else if(this.ǃcWj.type==cn){var In=this.ǃcWj.createRange();In.length&&(Xn=mn(In.item(0)))}if(Xn){var Sn=an(Xn).createTextRange();Sn.select(),this.ǃcWj.empty()}}}catch(jn){}Me(this)},Cn.addRange=function(Xn){this.ǃcWj.type==cn?Xt(this,Xn):($e.ǃcWA.ǃcWr(Xn).select(),this.ǃcWP[0]=Xn,this.rangeCount=1,this.isCollapsed=this.ǃcWP[0].collapsed,Ze(this,Xn,!1))},Cn.ǃcWN=function(Xn){this.removeAllRanges();var In=Xn.length;1Xn||Xn>=this.rangeCount)throw new en(_54);return this.ǃcWP[Xn].cloneRange()};var Rn;if(on)Rn=function(Xn){var In;$e.ǃcWB(Xn.ǃcW_)?In=Xn.ǃcWj.createRange():(In=an(Xn.ǃcW_.document).createTextRange(),In.collapse(!0)),Xn.ǃcWj.type==cn?Ht(Xn):Lt(In)?Ut(Xn,In):Me(Xn)};else if(Jt(ln,_38)&&typeof ln.rangeCount==Kt)Rn=function(Xn){if(Tn&&Gn&&Xn.ǃcWj.type==cn)Ht(Xn);else if(Xn.ǃcWP.length=Xn.rangeCount=Xn.ǃcWt.rangeCount,Xn.rangeCount){for(var In=0,Sn=Xn.rangeCount;Sn>In;++In)Xn.ǃcWP[In]=new $e.ǃcWi(Xn.ǃcWt.getRangeAt(In));Ze(Xn,Xn.ǃcWP[Xn.rangeCount-1],Hn(Xn.ǃcWt)),Xn.isCollapsed=Yt(Xn)}else Me(Xn)};else{if(!gn||typeof ln.isCollapsed!=Wt||typeof un.collapsed!=Wt||!nn.ǃcyT)return Fe.ǃcyy("No means of obtaining a Range or TextRange from the user's selection was found"),!1;Rn=function(Xn){var Sn=Xn.ǃcWt,In;Sn.anchorNode?(In=kn(Sn,0),Xn.ǃcWP=[In],Xn.rangeCount=1,Je(Xn),Xn.isCollapsed=Yt(Xn)):Me(Xn)}}Cn.refresh=function(Xn){var In=Xn?this.ǃcWP.slice(0):null,Sn=this.anchorNode,jn=this.anchorOffset;if(Rn(this),Xn){var An=In.length;if(An!=this.ǃcWP.length)return!0;if(this.anchorNode!=Sn||this.anchorOffset!=jn)return!0;for(;An--;)if(!dn(In[An],this.ǃcWP[An]))return!0;return!1}};var Un=function(Xn,In){var Sn=Xn.ǃcWK();Xn.removeAllRanges();for(var jn=0,An=Sn.length;An>jn;++jn)dn(In,Sn[jn])||Xn.addRange(Sn[jn]);Xn.rangeCount||Me(Xn)};Cn.removeRange=Tn&&Gn?function(Xn){if(this.ǃcWj.type==cn){for(var Sn=this.ǃcWj.createRange(),jn=Dt(Xn),An=mn(Sn.item(0)),Nn=an(An).createControlRange(),_n=!1,Pn=0,zn=Sn.length,In;zn>Pn;++Pn)In=Sn.item(Pn),In!==jn||_n?Nn.add(Sn.item(Pn)):_n=!0;Nn.select(),Ht(this)}else Un(this,Xn)}:function(Xn){Un(this,Xn)};var Hn;!on&&gn&&nn.ǃcyT?(Hn=qe,Cn.ǃcWe=function(){return Hn(this)}):Hn=Cn.ǃcWe=function(){return!1},Cn.ǃcWn=Cn.ǃcWe,Cn.toString=function(){for(var Xn=[],In=0,Sn=this.rangeCount;Sn>In;++In)Xn[In]=""+this.ǃcWP[In];return Xn.join("")},Cn.collapse=function(Xn,In){zt(this,Xn);var Sn=$e.createRange(Xn);Sn.ǃcBn(Xn,In),this.ǃcWE(Sn),this.isCollapsed=!0},Cn.collapseToStart=function(){if(!this.rangeCount)throw new en(_64);var Xn=this.ǃcWP[0];this.collapse(Xn.startContainer,Xn.startOffset)},Cn.collapseToEnd=function(){if(!this.rangeCount)throw new en(_64);var Xn=this.ǃcWP[this.rangeCount-1];this.collapse(Xn.endContainer,Xn.endOffset)},Cn.selectAllChildren=function(Xn){zt(this,Xn);var In=$e.createRange(Xn);In.selectNodeContents(Xn),this.ǃcWE(In)},Cn.deleteFromDocument=function(){if(Tn&&Gn&&this.ǃcWj.type==cn){for(var In=this.ǃcWj.createRange(),Xn;In.length;)Xn=In.item(0),In.remove(Xn),qt.removeNode(Xn);this.refresh()}else if(this.rangeCount){var Sn=this.ǃcWK();if(Sn.length){this.removeAllRanges();for(var jn=0,An=Sn.length;An>jn;++jn)Sn[jn].deleteContents();this.addRange(Sn[An-1])}}},Cn.ǃcWM=function(Xn,In){for(var Sn=0,jn=this.ǃcWP.length;jn>Sn;++Sn)if(Xn(this.getRangeAt(Sn)))return In},Cn.ǃcWK=function(){var Xn=[];return this.ǃcWM(function(In){Xn.push(In)}),Xn},Cn.ǃcWE=function(Xn,In){this.removeAllRanges(),this.addRange(Xn,In)},Cn.ǃcWC=function(Xn,In){var Sn=[];return this.ǃcWM(function(jn){Sn.push(jn[Xn].apply(jn,In||[]))}),Sn},Cn.setStart=Vt(!0),Cn.setEnd=Vt(!1),$e.ǃcyM.select=function(Xn){Ln(this.ǃcBD()).ǃcWE(this,Xn)},Cn.ǃcWh=function(Xn){var In=[],Sn=this.ǃcWe();this.ǃcWM(function(jn){Xn(jn),In.push(jn)}),this.removeAllRanges(),Sn&&1==In.length?this.addRange(In[0],"backward"):this.ǃcWN(In)},Cn.containsNode=function(Xn,In){return this.ǃcWM(function(Sn){return Sn.containsNode(Xn,In)},!0)||!1},Cn.getBookmark=function(Xn){return{ǃcWY:this.ǃcWe(),ǃcWz:this.ǃcWC("getBookmark",[Xn])}},Cn.moveToBookmark=function(Xn){for(var jn=[],An=0,In,Sn;In=Xn.ǃcWz[An++];)Sn=$e.createRange(this.ǃcW_),Sn.moveToBookmark(In),jn.push(Sn);Xn.ǃcWY?this.ǃcWE(jn[0],"backward"):this.ǃcWN(jn)},Cn.ǃcWF=function(){return{ǃcWY:this.ǃcWe(),ǃcWl:this.ǃcWC(_39)}},Cn.ǃcWw=function(Xn){this.removeAllRanges();for(var Sn=0,In;In=Xn.ǃcWl[Sn];++Sn)this.addRange(In,Xn.ǃcWY&&0==Sn)},Cn.ǃcBC=function(){var Xn=[];return this.ǃcWM(function(In){Xn.push(Mt.ǃcBC(In))}),Xn.join("")},nn.ǃcyk&&(Cn.ǃcWo=function(){var Xn;if(Xn=this.ǃcWj){var In=Xn.createRange();if(Lt(In))return In;throw Fe.ǃcyg("getNativeTextRange: selection is a control selection")}if(0Dn;++Dn)bn[Dn].ǃcWs=En;return En}function ae(hn,vn,bn){for(var Dn=bn(hn,vn),yn=[],Tn=0,En;En=Dn[Tn++];)yn.push(me(hn,En));return yn}function de(hn){var vn=hn||"",bn="string"==typeof vn?vn.split(""):vn;return bn.sort(function(En,Dn){return En.charCodeAt(0)-Dn.charCodeAt(0)}),bn.join("").replace(/(.)\1+/g,"$1")}function re(hn){var vn,bn;return hn?(vn=hn.language||Ut,bn={},Ze(bn,$t[vn]||$t[Ut]),Ze(bn,hn),bn):$t[Ut]}function Ge(hn,vn){var bn=Je(hn,vn);return vn.hasOwnProperty("wordOptions")&&(bn.wordOptions=re(bn.wordOptions)),vn.hasOwnProperty("characterOptions")&&(bn.characterOptions=Je(bn.characterOptions,zt)),bn}function oe(hn,vn){var bn=qt(hn,"display",vn),En=hn.tagName.toLowerCase();return"block"==bn&&_t&&Zt.hasOwnProperty(En)?Zt[En]:bn}function le(hn){for(var vn=ve(hn),bn=0,En=vn.length;En>bn;++bn)if(1==vn[bn].nodeType&&_71==oe(vn[bn]))return!0;return!1}function ue(hn){var vn;return 3==hn.nodeType&&(vn=hn.parentNode)&&"hidden"==qt(vn,"visibility")}function he(hn){for(var vn=[];hn.parentNode;)vn.unshift(hn.parentNode),hn=hn.parentNode;return vn}function ve(hn){return he(hn).concat([hn])}function be(hn){for(;hn&&!hn.nextSibling;)hn=hn.parentNode;return hn?hn.nextSibling:null}function Ee(hn,vn){return!vn&&hn.hasChildNodes()?hn.firstChild:be(hn)}function De(hn){var vn=hn.previousSibling;if(vn){for(hn=vn;hn.hasChildNodes();)hn=hn.lastChild;return hn}var bn=hn.parentNode;return bn&&1==bn.nodeType?bn:null}function ye(hn){if(!hn||3!=hn.nodeType)return!1;var vn=hn.data;if(""===vn)return!0;var bn=hn.parentNode;if(!bn||1!=bn.nodeType)return!1;var En=qt(hn.parentNode,_73);return /^[\t\n\r ]+$/.test(vn)&&/^(normal|nowrap)$/.test(En)||/^[\t\r ]+$/.test(vn)&&"pre-line"==En}function Te(hn){if(""===hn.data)return!0;if(!ye(hn))return!1;var vn=hn.parentNode;return!vn||!!le(hn)}function ke(hn){var vn=hn.nodeType;return 7==vn||8==vn||le(hn)||/^(script|style)$/i.test(hn.nodeName)||ue(hn)||Te(hn)}function we(hn,vn){var bn=hn.nodeType;return 7==bn||8==bn||1==bn&&_71==oe(hn,vn)}function Le(){this.ǃcEI={}}function Ce(hn,vn,bn){return function(En){var Dn=this.cache;if(Dn.hasOwnProperty(hn))return Jt++,Dn[hn];Mt++;var yn=vn.call(this,bn?this[bn]:this,En);return Dn[hn]=yn,yn}}function xe(hn,vn){this.node=hn,this.session=vn,this.cache=new Le,this.positions=new Le}function Re(hn,vn){this.offset=vn,this.ǃcWO=hn,this.node=hn.node,this.session=hn.session,this.cache=new Le}function He(){return Ie(),un=new pn}function Xe(){return un||He()}function Ie(){un&&un.detach(),un=null}function Se(hn,vn,bn,En){function Dn(){var Ln=null;return vn?(Ln=Tn,kn||(Tn=Tn.ǃcWQ(),kn=!Tn||bn&&Tn.ǃ_c(bn))):kn||(Ln=Tn=Tn.ǃcuc(),kn=!Tn||bn&&Tn.ǃ_c(bn)),kn&&(Tn=null),Ln}bn&&(vn?ke(bn.node)&&(bn=hn.ǃcWQ()):ke(bn.node)&&(bn=bn.ǃcuc()));var Tn=hn,kn=!1,wn=!1,yn;return{next:function(){if(wn)return wn=!1,yn;for(var Ln,Cn;Ln=Dn();)if(Cn=Ln.ǃcuG(En))return yn=Ln,Ln;return null},ǃcum:function(){if(!yn)throw ne.ǃcyg("createCharacterIterator: cannot rewind. Only one position can be rewound.");wn=!0},ǃcuD:function(){hn=bn=null}}}function je(hn,vn,bn){function En(Rn){for(var Xn=[],In=Rn?Dn:yn,Sn=!1,jn=!1,Un,Hn;Un=In.next();){if(Hn=Un.ǃcui,Dt.test(Hn))jn&&(jn=!1,Sn=!0);else{if(Sn){In.ǃcum();break}jn=!0}Xn.push(Un)}return Xn}var Dn=Se(hn,!1,null,vn),yn=Se(hn,!0,null,vn),Tn=bn.ǃcuR,kn=En(!0),wn=En(!1).reverse(),Ln=ae(wn.concat(kn),bn,Tn),Cn=kn.length?Ln.slice(gn(Ln,kn[0].ǃcWs)):[],xn=wn.length?Ln.slice(0,gn(Ln,wn.pop().ǃcWs)+1):[];return{ǃcub:function(){for(var Rn,Un;1==Cn.length&&!(Rn=Cn[0]).ǃcWx&&0<(Un=En(!0)).length;)Cn=ae(Rn.ǃcWS.concat(Un),bn,Tn);return Cn.shift()},ǃcuT:function(){for(var Rn,Un;1==xn.length&&!(Rn=xn[0]).ǃcWx&&0<(Un=En(!1)).length;)xn=ae(Un.reverse().concat(Rn.ǃcWS),bn,Tn);return xn.pop()},ǃcuD:function(){Dn.ǃcuD(),yn.ǃcuD(),Cn=xn=null}}}function Ae(hn,vn,bn,En,Dn){var Ln=0,Cn=hn,xn=Math.abs(bn),yn,Tn,kn,wn;if(0!==bn){var Rn=0>bn;switch(vn){case We:for(Tn=Se(hn,Rn,null,En);(yn=Tn.next())&&xn>Ln;)++Ln,Cn=yn;kn=yn,Tn.ǃcuD();break;case Oe:for(var Un=je(hn,En,Dn),Hn=Rn?Un.ǃcuT:Un.ǃcub;(wn=Hn())&&xn>Ln;)wn.ǃcWx&&(++Ln,Cn=Rn?wn.ǃcWS[0]:wn.ǃcWS[wn.ǃcWS.length-1]);break;default:throw new Error("movePositionBy: unit '"+vn+"' not implemented");}Rn?(Cn=Cn.ǃcWQ(),Ln=-Ln):Cn&&Cn.ǃcuk&&!Cn.ǃcuX&&(vn==Oe&&(Tn=Se(hn,!1,null,En),kn=Tn.next(),Tn.ǃcuD()),kn&&(Cn=kn.ǃcWQ()))}return{position:Cn,ǃcu$:Ln}}function Ne(hn,vn,bn,En){var Dn=hn.ǃcur(vn,!0),yn=hn.ǃcur(vn,!1),Tn=En?yn:Dn,kn=En?Dn:yn;return Se(Tn,!!En,kn,bn)}function _e(hn,vn,bn){for(var Dn=[],yn=Ne(hn,vn,bn),En;En=yn.next();)Dn.push(En);return yn.ǃcuD(),Dn}function Pe(hn,vn,bn){var En=te.createRange(hn.node);return En.ǃcBv(hn.node,hn.offset,vn.node,vn.offset),!En.expand("word",{wordOptions:bn})}function ze(hn,vn,bn,En,Dn){function yn(Sn,jn){var An=Xn[Sn].ǃcWQ(),Nn=Xn[jn-1],_n=!Dn.ǃcuV||Pe(An,Nn,Dn.wordOptions);return{ǃcuA:An,ǃcuL:Nn,valid:_n}}for(var Rn=Ht(Dn.direction),Un=Se(hn,Rn,hn.session.ǃcur(En,Rn),Dn.characterOptions),Hn="",Xn=[],In=null,Tn,kn,wn,Ln,Cn,xn;Tn=Un.next();)if(kn=Tn.ǃcui,bn||Dn.ǃcu_||(kn=kn.toLowerCase()),Rn?(Xn.unshift(Tn),Hn=kn+Hn):(Xn.push(Tn),Hn+=kn),bn){if(Cn=vn.exec(Hn))if(wn=Cn.index,Ln=wn+Cn[0].length,!xn)xn=!0;else if(!Rn&&Ln1
",!0),vn=hn.firstChild,bn=te.getSelection();bn.collapse(vn.lastChild,2),bn.setStart(vn.firstChild,0),Xt=1==(""+bn).length,hn.innerHTML="1
",bn.collapse(hn,2),bn.setStart(hn.firstChild,0),It=1==(""+bn).length,hn.innerHTML="1 1
",bn.collapse(hn,2),bn.setStart(hn.firstChild,0),jt=1==(""+bn).length,Ke.removeNode(hn),bn.removeAllRanges()}();var zt={ǃcut:!0,ǃcuP:!0,ǃcuj:!0,ǃcud:!0,ǃcuE:""},Vt={ǃcut:!!0,ǃcuP:!It,ǃcuj:!jt,ǃcud:!0},$t={ǃcue:{ǃcWJ:/[a-z0-9]+('[a-z0-9]+)*/gi,ǃcWZ:!1,ǃcuR:function(hn,vn){function bn(Ln,Cn,xn){kn.push({start:Ln,end:Cn,ǃcWx:xn})}for(var Tn=hn.join(""),kn=[],wn=0,En,Dn,yn;En=vn.ǃcWJ.exec(Tn);){if(Dn=En.index,yn=Dn+En[0].length,Dn>wn&&bn(wn,Dn,!1),vn.ǃcWZ)for(;Lt.test(hn[yn]);)++yn;bn(Dn,yn,!0),wn=yn}return wnbn;++bn)if(!ke(vn[bn]))return!0;return this.ǃcuo()},_70),ǃcuJ:Ce("trailingSpace",function(hn){if("br"==hn.tagName.toLowerCase())return"";switch(this.ǃcuC()){case"inline":for(var vn=hn.lastChild;vn;){if(!we(vn))return 1==vn.nodeType?this.session.ǃcuZ(vn).ǃcuJ():"";vn=vn.previousSibling}break;case _77:case _76:case _71:case _75:case _78:break;case _74:return"\t";default:return this.ǃcux(!0)?"\n":"";}return""},_70),ǃcuS:Ce("leadingSpace",function(){switch(this.ǃcuC()){case"inline":case _77:case _76:case _71:case _75:case _78:case _74:break;default:return this.ǃcux(!1)?"\n":"";}return""},_70)});var ln={ǃcui:"",ǃcus:en,ǃcuO:!1,ǃcuH:function(){var hn=this;if(!hn.ǃcuQ){var vn=hn.node,bn=hn.offset,En="",Dn=en,yn=!1;if(0bn;++bn)if(hn[bn]===vn)return bn;return-1};Ze(te.ǃcyM,{moveStart:Ve(!0,!1),moveEnd:Ve(!1,!1),move:Ve(!0,!0),ǃcuf:$e(!0),ǃcuy:$e(!1),trim:Be(function(hn,vn){var bn=this.ǃcuf(vn),En=this.ǃcuy(vn);return bn||En}),expand:Be(function(hn,vn,bn){var En=!1;bn=Ge(bn,Wt);var Dn=bn.characterOptions;if(vn||(vn=We),vn==Oe){var kn=bn.wordOptions,wn=hn.ǃcur(this,!0),Ln=hn.ǃcur(this,!1),Cn=je(wn,Dn,kn),xn=Cn.ǃcub(),Rn=xn.ǃcWS[0].ǃcWQ(),yn,Tn;if(this.collapsed)yn=xn;else{var Un=je(Ln,Dn,kn);yn=Un.ǃcuT()}return Tn=yn.ǃcWS[yn.ǃcWS.length-1],Rn.ǃ_c(wn)||(this.setStart(Rn.node,Rn.offset),En=!0),Tn&&!Tn.ǃ_c(Ln)&&(this.setEnd(Tn.node,Tn.offset),En=!0),bn.trim&&(bn.ǃcuf&&(En=this.ǃcuf(Dn)||En),bn.ǃcuy&&(En=this.ǃcuy(Dn)||En)),En}return this.moveEnd(We,1,bn)}),text:Be(function(hn,vn){return this.collapsed?"":_e(hn,this,Je(vn,zt)).join("")}),ǃcU$:Be(function(hn,vn,bn,En,Dn){var yn={characterOptions:Dn};vn||(vn=Me(this.ǃcBD())),this.selectNodeContents(vn),this.collapse(!0),this.moveStart(_72,bn,yn),this.collapse(!0),this.moveEnd(_72,En-bn,yn)}),ǃcUr:Be(function(hn,vn,bn){vn||(vn=Me(this.ǃcBD()));var yn=vn.parentNode,Tn=Ke.ǃcyx(vn),kn=-1==Ke.ǃcB$(this.startContainer,this.endContainer,yn,Tn),wn=this.cloneRange(),En,Dn;return kn?(wn.ǃcBv(this.startContainer,this.startOffset,yn,Tn),En=-wn.text(bn).length):(wn.ǃcBv(yn,Tn,this.startContainer,this.startOffset),En=wn.text(bn).length),Dn=En+this.text(bn).length,{start:En,end:Dn}}),findText:Be(function(hn,vn,bn){bn=Ge(bn,Ft),bn.ǃcuV&&(bn.wordOptions.ǃcWZ=!1);var En=Ht(bn.direction),Dn=bn.ǃcup;Dn||(Dn=te.createRange(),Dn.selectNodeContents(this.ǃcBD()));var yn=vn,Tn=!1;"string"==typeof yn?bn.ǃcu_||(yn=yn.toLowerCase()):Tn=!0;var kn=hn.ǃcur(this,!En),wn=Dn.comparePoint(kn.node,kn.offset);-1===wn?kn=hn.ǃcur(Dn,!0):1===wn&&(kn=hn.ǃcur(Dn,!1));for(var Cn=kn,xn=!1,Ln;;)if(Ln=ze(Cn,yn,Tn,Dn,bn)){if(Ln.valid)return this.ǃcBv(Ln.ǃcuA.node,Ln.ǃcuA.offset,Ln.ǃcuL.node,Ln.ǃcuL.offset),!0;Cn=En?Ln.ǃcuA:Ln.ǃcuL}else{if(!bn.wrap||xn)return!1;Dn=Dn.cloneRange(),Cn=hn.ǃcur(Dn,!En),Dn.ǃcBq(kn.node,kn.offset,En),xn=!0}}),ǃcUV:function(hn){if(this.deleteContents(),hn){var vn=this.createContextualFragment(hn),bn=vn.lastChild;this.insertNode(vn),this.ǃcBx(bn)}}}),Ze(te.ǃcyC,{expand:Be(function(hn,vn,bn){this.ǃcWh(function(En){En.expand(vn,bn)})}),move:Be(function(hn,vn,bn,En){var Dn=0;if(this.focusNode){this.collapse(this.focusNode,this.focusOffset);var yn=this.getRangeAt(0);En||(En={}),En.characterOptions=Je(En.characterOptions,Vt),Dn=yn.move(vn,bn,En),this.ǃcWE(yn)}return Dn}),ǃcuf:Fe("trimStart"),ǃcuy:Fe("trimEnd"),trim:Fe("trim"),ǃcU$:Be(function(hn,vn,bn,En,Dn,yn){var Tn=te.createRange(vn);Tn.ǃcU$(vn,bn,En,yn),this.ǃcWE(Tn,Dn)}),ǃcUA:Be(function(hn,vn,bn){for(var En=this.ǃcWK(),Dn=En.length,yn=[],Tn=1==Dn&&this.ǃcWe(),kn=0,wn=En.length;wn>kn;++kn)yn[kn]={ǃcUL:En[kn].ǃcUr(vn,bn),ǃcWY:Tn,characterOptions:bn};return yn}),ǃcU_:Be(function(hn,vn,bn){this.removeAllRanges();for(var Tn=0,kn=bn.length,En,Dn,yn;kn>Tn;++Tn)Dn=bn[Tn],yn=Dn.ǃcUL,En=te.createRange(vn),En.ǃcU$(vn,yn.start,yn.end,Dn.characterOptions),this.addRange(En,Dn.ǃcWY)}),text:Be(function(hn,vn){for(var bn=[],En=0,Dn=this.rangeCount;Dn>En;++En)bn[En]=this.getRangeAt(En).text(vn);return bn.join("")})}),te.innerText=function(hn,vn){var bn=te.createRange(hn);bn.selectNodeContents(hn);var En=bn.text(vn);return En},te.ǃcUt=function(hn,vn,bn){var En=Xe();bn=Ge(bn,Kt);var Dn=En.ǃcuN(hn,vn),yn=je(Dn,bn.characterOptions,bn.wordOptions),Tn=Ht(bn.direction);return{next:function(){return Tn?yn.ǃcuT():yn.ǃcub()},ǃcuD:function(){yn.ǃcuD(),this.next=function(){}}}},te.ǃcUP=function(hn){var vn=Xe();hn(vn),Ie()},te.ǃcUP.ǃcUj=Be,te.ǃcW$={ǃcUd:function(hn){return hn&&(1==hn.nodeType&&!/^(inline(-block|-table)?|none)$/.test(oe(hn))||9==hn.nodeType||11==hn.nodeType)},ǃcUE:Te,ǃcUe:Be(function(hn,vn,bn){return hn.ǃcuN(vn,bn)})}}),ee},this),!function(ee,te){"function"==typeof ǃcGe&&ǃcGe.ǃcGp?ǃcGe(["./rangy-core"],ee):"undefined"!=typeof ǃcGE&&"object"==typeof exports?ǃcGE.exports=ee(ǃcGf("rangy")):ee(te.rangy)}(function(ee){const _79="class",_80="object",_81="string",_82="display",_83="className";return ee.ǃcyN("ClassApplier",["WrappedSelection"],function(te,ne){function ie(Lt,Ut){for(var Ht in Lt)if(Lt.hasOwnProperty(Ht)&&!1===Ut(Ht,Lt[Ht]))return!1;return!0}function me(Lt){return Lt.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function ae(Lt,Ut){return!!Lt&&new RegExp("(?:^|\\s)"+Ut+"(?:\\s|$)").test(Lt)}function de(Lt,Ut){if(_80==typeof Lt.classList)return Lt.classList.contains(Ut);var Ht=_81==typeof Lt.className,Xt=Ht?Lt.className:Lt.getAttribute(_79);return ae(Xt,Ut)}function re(Lt,Ut){if(_80==typeof Lt.classList)Lt.classList.add(Ut);else{var Ht=_81==typeof Lt.className,Xt=Ht?Lt.className:Lt.getAttribute(_79);Xt?ae(Xt,Ut)||(Xt+=" "+Ut):Xt=Ut,Ht?Lt.className=Xt:Lt.setAttribute(_79,Xt)}}function Ge(Lt){var Ut=_81==typeof Lt.className;return Ut?Lt.className:Lt.getAttribute(_79)}function oe(Lt){return Lt&&Lt.split(/\s+/).sort().join(" ")}function le(Lt){return oe(Ge(Lt))}function ue(Lt,Ut){return le(Lt)==le(Ut)}function pe(Lt,Ut){for(var Ht=Ut.split(/\s+/),Xt=0,It=Ht.length;It>Xt;++Xt)if(!de(Lt,me(Ht[Xt])))return!1;return!0}function ge(Lt){var Ut=Lt.parentNode;return Ut&&1==Ut.nodeType&&!/^(textarea|style|script|select|iframe)$/i.test(Ut.nodeName)}function he(Lt,Ut,Ht,Xt,It){var jt=Lt.node,At=Lt.offset,_t=jt,zt=At;jt==Xt&&At>It&&++zt,jt!=Ut||At!=Ht&&At!=Ht+1||(_t=Xt,zt+=It-Ht),jt==Ut&&At>Ht+1&&--zt,Lt.node=_t,Lt.offset=zt}function ve(Lt,Ut,Ht){Lt.node==Ut&&Lt.offset>Ht&&--Lt.offset}function be(Lt,Ut,Ht,Xt){-1==Ht&&(Ht=Ut.childNodes.length);var It=Lt.parentNode,jt=ze.ǃcyx(Lt);Fe(Xt,function(At){he(At,It,jt,Ut,Ht)}),Ut.childNodes.length==Ht?Ut.appendChild(Lt):Ut.insertBefore(Lt,Ut.childNodes[Ht])}function Ee(Lt,Ut){var Ht=Lt.parentNode,Xt=ze.ǃcyx(Lt);Fe(Ut,function(It){ve(It,Ht,Xt)}),ze.removeNode(Lt)}function De(Lt,Ut,Ht,Xt,It){for(var At=[],jt;jt=Lt.firstChild;)be(jt,Ut,Ht++,It),At.push(jt);return Xt&&Ee(Lt,It),At}function ye(Lt,Ut){return De(Lt,Lt.parentNode,ze.ǃcyx(Lt),!0,Ut)}function Te(Lt,Ut){var Ht=Lt.cloneRange();Ht.selectNodeContents(Ut);var Xt=Ht.ǃcBz(Lt),It=Xt?Xt.toString():"";return""!=It}function ke(Lt){for(var Ht=Lt.ǃcBH([3]),Xt=0,Ut;(Ut=Ht[Xt])&&!Te(Lt,Ut);)++Xt;for(var It=Ht.length-1;(Ut=Ht[It])&&!Te(Lt,Ut);)--It;return Ht.slice(Xt,It+1)}function we(Lt,Ut){if(Lt.attributes.length!=Ut.attributes.length)return!1;for(var jt=0,At=Lt.attributes.length,Ht,Xt,It;At>jt;++jt)if(Ht=Lt.attributes[jt],It=Ht.name,_79!=It){if(Xt=Ut.attributes.getNamedItem(It),null===Ht!=(null===Xt))return!1;if(Ht.specified!=Xt.specified)return!1;if(Ht.specified&&Ht.nodeValue!==Xt.nodeValue)return!1}return!0}function Le(Lt,Ut){for(var Xt=0,It=Lt.attributes.length,Ht;It>Xt;++Xt)if(Ht=Lt.attributes[Xt].name,(!Ut||!Ve(Ut,Ht))&&Lt.attributes[Xt].specified&&_79!=Ht)return!0;return!1}function Ce(Lt){var Ut;return Lt&&1==Lt.nodeType&&((Ut=Lt.parentNode)&&9==Ut.nodeType&&"on"==Ut.designMode||qe(Lt)&&!qe(Lt.parentNode))}function xe(Lt){return(qe(Lt)||1!=Lt.nodeType&&qe(Lt.parentNode))&&!Ce(Lt)}function Re(Lt){return Lt&&1==Lt.nodeType&&!Ze.test(Ke(Lt,_82))}function Ue(Lt){if(0==Lt.data.length)return!0;if(Je.test(Lt.data))return!1;var Ut=Ke(Lt.parentNode,"whiteSpace");switch(Ut){case"pre":case"pre-wrap":case"-moz-pre-wrap":return!1;case"pre-line":if(/[\r\n]/.test(Lt.data))return!1;}return Re(Lt.previousSibling)||Re(Lt.nextSibling)}function He(Lt){var Xt=[],Ut,Ht;for(Ut=0;Ht=Lt[Ut++];)Xt.push(new Be(Ht.startContainer,Ht.startOffset),new Be(Ht.endContainer,Ht.endOffset));return Xt}function Xe(Lt,Ut){for(var jt=0,At=Lt.length,Ht,Xt,It;At>jt;++jt)Ht=Lt[jt],Xt=Ut[2*jt],It=Ut[2*jt+1],Ht.ǃcBv(Xt.node,Xt.offset,It.node,It.offset)}function Ie(Lt,Ut){return ze.ǃcyQ(Lt)?0==Ut?!!Lt.previousSibling:Ut!=Lt.length||!!Lt.nextSibling:0It;++It)"*"==Ht[It]?_t.ǃcUg=!0:_t.ǃcUW.push(Ht[It].toLowerCase());else _t.ǃcUW=[_t.ǃcUB]}var ze=te.ǃcyo,Be=ze.ǃcBP,Ve=ze.ǃcyH,$e=te.ǃcyE,Fe=$e.forEach,We=$e.ǃcyr(document,"createElementNS"),Oe=function(){function Lt(Ut,Ht,Xt){return Ht&&Xt?" ":""}return function(Ut,Ht){if(_80==typeof Ut.classList)Ut.classList.remove(Ht);else{var Xt=_81==typeof Ut.className,It=Xt?Ut.className:Ut.getAttribute(_79);It=It.replace(new RegExp("(^|\\s)"+Ht+"(\\s|$)"),Lt),Xt?Ut.className=It:Ut.setAttribute(_79,It)}}}(),Ke=ze.ǃcBA,qe=function(){var Lt=document.createElement("div");return"boolean"==typeof Lt.isContentEditable?function(Ut){return Ut&&1==Ut.nodeType&&Ut.isContentEditable}:function(Ut){return Ut&&1==Ut.nodeType&&"false"!=Ut.contentEditable&&("true"==Ut.contentEditable||qe(Ut.parentNode))}}(),Ze=/^inline(-block|-table)?$/i,Je=/[^\r\n\t\f \u200B]/,Me=Ae(!1),Qe=Ae(!0);Ne.prototype={ǃcUN:function(Lt){var Ut=this.ǃcUf,Ht=Ut[0];if(1It&&(--Vt.offset,Vt.offset==It+1&&ǃceW-1>zt&&(Vt.node=Ht,Vt.offset=At))})),jt[zt]=_t.data,At+=_t.data.length}),Ht.data=jt.join("")}return Ht.data},ǃceH:function(){for(var Lt=this.ǃcUf.length,Ut=0;Lt--;)Ut+=this.ǃcUf[Lt].length;return Ut},toString:function(){var Lt=[];return Fe(this.ǃcUf,function(Ut,Ht){Lt[Ht]="'"+Ut.data+"'"}),"[Merge("+Lt.join(",")+")]"}};var Gt=["elementTagName","ignoreWhiteSpace","applyToEditableOnly","useExistingElements","removeEmptyElements","onElementCreate"],Dt={};_e.prototype={ǃcUB:"span",ǃcUu:{},ǃcUU:{},ǃcUK:!0,ǃcUn:!1,ǃcUM:!0,ǃcUC:!0,ǃcUh:null,ǃcUq:function(Lt,Ut,Ht){var Vt={},Xt,It,jt,At,_t,zt;for(var $t in Lt)if(Lt.hasOwnProperty($t))if(At=Lt[$t],_t=Ut[$t],_83==$t)re(Ut,At),re(Ut,this.className),Ut[$t]=oe(Ut[$t]),Ht&&(Vt[$t]=At);else if("style"==$t){for(Xt in It=_t,Ht&&(Vt[$t]=jt={}),Lt[$t])Lt[$t].hasOwnProperty(Xt)&&(It[Xt]=At[Xt],Ht&&(jt[Xt]=It[Xt]));this.ǃcUv.push($t)}else Ut[$t]=At,Ht&&(Vt[$t]=Ut[$t],zt=Dt.hasOwnProperty($t)?Dt[$t]:$t,this.ǃcUv.push(zt));return Ht?Vt:""},ǃcUY:function(Lt,Ut){for(var Ht in Lt)Lt.hasOwnProperty(Ht)&&!/^class(?:Name)?$/i.test(Ht)&&Ut.setAttribute(Ht,Lt[Ht])},ǃcUz:function(Lt){return Ve(this.ǃcUW,Lt.tagName.toLowerCase())},ǃcUF:function(Lt){var Ut=this;return Lt.ǃcBH([1],function(Ht){return Ut.ǃcUz(Ht)&&!Ht.hasChildNodes()})},ǃcUl:function(Lt){return 1==Lt.nodeType&&(this.ǃcUg||this.ǃcUz(Lt))&&de(Lt,this.className)},ǃcUw:function(Lt){for(;Lt;){if(this.ǃcUl(Lt))return Lt;Lt=Lt.parentNode}return null},ǃcUo:function(Lt){return!this.ǃcUn||xe(Lt)},ǃcUH:function(Lt){return this.ǃcUK&&Lt&&3==Lt.nodeType&&Ue(Lt)},ǃcUI:function(Lt,Ut,Ht,Xt){var At=Lt[0],_t=Lt[Lt.length-1],zt=[],Vt=At,$t=_t,Ft=0,Yt=_t.length,It,jt;Fe(Lt,function(Zt){jt=Me(Zt,!Xt),jt?(It||(It=new Ne(jt),zt.push(It)),It.ǃcUf.push(Zt),Zt===At&&(Vt=It.ǃcUf[0],Ft=Vt.length),Zt===_t&&($t=It.ǃcUf[0],Yt=It.ǃceH())):It=null});var Wt=Qe(_t,!Xt);if(Wt&&(It||(It=new Ne(_t),zt.push(It)),It.ǃcUf.push(Wt)),zt.length){for(var Kt=0,qt=zt.length;qt>Kt;++Kt)zt[Kt].ǃcUN(Ht);Ut.ǃcBv(Vt,Ft,$t,Yt)}},ǃcUx:function(Lt){var Ht=ze.ǃcBD(Lt),Xt=We&&!ze.ǃcyI(Lt)&&(Ut=Lt.namespaceURI)?Ht.createElementNS(Lt.namespaceURI,this.ǃcUB):Ht.createElement(this.ǃcUB),Ut;return this.ǃcUq(this.ǃcUu,Xt,!1),this.ǃcUY(this.ǃcUU,Xt),re(Xt,this.className),this.ǃcUh&&this.ǃcUh(Xt,this),Xt},ǃcUJ:function(Lt,Ut){var Ht=this;return ie(Ut,function(Xt,It){if(_83==Xt)return pe(Lt,It);if(_80==typeof It){if(!Ht.ǃcUJ(Lt[Xt],It))return!1;}else if(Lt[Xt]!==It)return!1})},ǃcUZ:function(Lt,Ut){return ie(Ut,function(Ht,Xt){return!(Lt.getAttribute(Ht)!==Xt)&&void 0})},ǃcUS:function(Lt){if(ge(Lt)){var Ut=Lt.parentNode;if(1==Ut.childNodes.length&&this.ǃcUM&&this.ǃcUz(Ut)&&this.ǃcUJ(Ut,this.ǃcUu)&&this.ǃcUZ(Ut,this.ǃcUU))re(Ut,this.className);else{var Ht=Lt.parentNode,Xt=this.ǃcUx(Ht);Ht.insertBefore(Xt,Lt),Xt.appendChild(Lt)}}},ǃcUs:function(Lt){return Lt.tagName.toLowerCase()==this.ǃcUB&&le(Lt)==this.ǃcUa&&this.ǃcUJ(Lt,this.ǃcUu)&&!Le(Lt,this.ǃcUv)&&this.ǃcUZ(Lt,this.ǃcUU)&&this.ǃcUo(Lt)},ǃcUO:function(Lt){var Ut=Lt.childNodes.length;return 1==Lt.nodeType&&this.ǃcUs(Lt)&&(0==Ut||1==Ut&&this.ǃcUO(Lt.firstChild))},ǃcUQ:function(Lt){var Ut=this,Ht=Lt.ǃcBH([1],function(jt){return Ut.ǃcUO(jt)}),Xt=[Lt],It=He(Xt);Fe(Ht,function(jt){Ee(jt,It)}),Xe(Xt,It)},ǃcvc:function(Lt,Ut,Ht,Xt){if(!Ut.containsNode(Ht)){var It=Ut.cloneRange();It.selectNode(Ht),It.isPointInRange(Ut.endContainer,Ut.endOffset)&&(Se(Ht,Ut.endContainer,Ut.endOffset,Xt),Ut.setEndAfter(Ht)),It.isPointInRange(Ut.startContainer,Ut.startOffset)&&(Ht=Se(Ht,Ut.startContainer,Ut.startOffset,Xt))}this.ǃcUs(Ht)?ye(Ht,Xt):Oe(Ht,this.className)},ǃcvG:function(Lt,Ut,Ht){var Xt=this.ǃcUw(Lt);Xt&&Se(Xt,Lt,Ut,Ht)},ǃcvm:function(Lt,Ut){this.ǃcUs(Lt)?ye(Lt,Ut):Oe(Lt,this.className)},ǃcvD:function(Lt,Ut){var Ht=this;Ut=Ut||[];var Xt=He(Ut||[]);Lt.ǃcBN(Xt),Ht.ǃcUC&&Ht.ǃcUQ(Lt);var It=ke(Lt);if(It.length){Fe(It,function(_t){Ht.ǃcUH(_t)||Ht.ǃcUw(_t)||!Ht.ǃcUo(_t)||Ht.ǃcUS(_t,Xt)});var jt=It[It.length-1];Lt.ǃcBv(It[0],0,jt,jt.length),Ht.normalize&&Ht.ǃcUI(It,Lt,Xt,!1),Xe(Ut,Xt)}var At=Ht.ǃcUF(Lt);Fe(At,function(_t){re(_t,Ht.className)})},ǃcvi:function(Lt){for(var Ut=Lt.length;Ut--;)this.ǃcvD(Lt[Ut],Lt);return Lt},ǃcvR:function(Lt){var Ut=te.getSelection(Lt);Ut.ǃcWN(this.ǃcvi(Ut.ǃcWK()))},ǃcvb:function(Lt,Ut){var Ht=this;Ut=Ut||[];var Xt=He(Ut);Lt.ǃcBN(Xt),Ht.ǃcUC&&Ht.ǃcUQ(Lt,Xt);var At=ke(Lt),_t=At[At.length-1],It,jt;if(At.length){Ht.ǃcvG(Lt.endContainer,Lt.endOffset,Xt),Ht.ǃcvG(Lt.startContainer,Lt.startOffset,Xt);for(var zt=0,Vt=At.length;Vt>zt;++zt)It=At[zt],jt=Ht.ǃcUw(It),jt&&Ht.ǃcUo(It)&&Ht.ǃcvm(jt,Xt);Lt.ǃcBv(At[0],0,_t,_t.length),Ht.normalize&&Ht.ǃcUI(At,Lt,Xt,!0),Xe(Ut,Xt)}var $t=Ht.ǃcUF(Lt);Fe($t,function(Ft){Oe(Ft,Ht.className)})},ǃcvT:function(Lt){for(var Ut=Lt.length;Ut--;)this.ǃcvb(Lt[Ut],Lt);return Lt},ǃcvk:function(Lt){var Ut=te.getSelection(Lt),Ht=te.getSelection(Lt).ǃcWK();this.ǃcvT(Ht),Ut.ǃcWN(Ht)},ǃcvX:function(Lt){if(Lt.collapsed||""==Lt.toString())return!!this.ǃcUw(Lt.commonAncestorContainer);var Ut=Lt.ǃcBH([3]);if(Ut.length)for(var Xt=0,Ht;Ht=Ut[Xt++];)if(!this.ǃcUH(Ht)&&Te(Lt,Ht)&&this.ǃcUo(Ht)&&!this.ǃcUw(Ht))return!1;return!0},ǃcv$:function(Lt){var Ut=Lt.length;if(0==Ut)return!1;for(;Ut--;)if(!this.ǃcvX(Lt[Ut]))return!1;return!0},ǃcvr:function(Lt){var Ut=te.getSelection(Lt);return this.ǃcv$(Ut.ǃcWK())},ǃcvV:function(Lt){this.ǃcvX(Lt)?this.ǃcvb(Lt):this.ǃcvD(Lt)},ǃcvA:function(Lt){this.ǃcvr(Lt)?this.ǃcvk(Lt):this.ǃcvR(Lt)},ǃcvL:function(Lt){var Ut=[],Ht=this;return Lt.ǃcBH([3],function(Xt){var It=Ht.ǃcUw(Xt);It&&!Ve(Ut,It)&&Ut.push(It)}),Ut},detach:function(){}},_e.ǃcyE={ǃcUl:de,ǃcv_:re,ǃcvt:Oe,ǃcvP:Ge,ǃcvj:ue,ǃcvd:pe,ǃcvE:ye,ǃcve:we,ǃcvp:Le,ǃcvf:Se,ǃcvy:qe,ǃcvB:Ce,ǃcvW:xe},te.ǃcvu=te.ǃcvU=_e,te.ǃcvv=function(Lt,Ut,Ht){return new _e(Lt,Ut,Ht)},$e.ǃcyu(te,"createCssClassApplier","createClassApplier",ne)}),ee},this),"use strict";{let ee=!1,te=!1,ne="dev";window.ǃG=class{constructor(){throw TypeError("static class can't be instantiated")}static ǃcvq(){ee=!0}static ǃcva(){return ee}static ǃcvg(){te=!0}static ǃcvN(){return te}static ǃcvK(me){ne=me}static ǃcvn(){return ne}static ǃcvM(){return"final"===ne}},ǃG.ǃDP=!1,ǃG.ǃcvC=!1,ǃG.hardwareConcurrency=navigator.hardwareConcurrency||2}"use strict",ǃG.ǃcvh=class{constructor(te){this.ǃcvY=te,this.ǃcvz=new Map,this.ǃcvF()}ǃcvF(){let te=this.ǃcvY;(te.startsWith("?")||te.startsWith("#"))&&(te=te.substr(1));const ne=te.split("&");for(const ie of ne)this.ǃcvl(ie)}ǃcvl(te){if(te){if(!te.includes("="))return void this.ǃcvz.set(te,null);const ne=te.indexOf("="),ie=decodeURIComponent(te.substring(0,ne)),me=decodeURIComponent(te.substring(ne+1));this.ǃcvz.set(ie,me)}}ǃcvw(){for(const te of this.ǃcvz)console.log("[QueryParser] Parameter '"+te[0]+"' = "+(null===te[1]?"null":"'"+te[1]+"'"))}ǃcrZ(te){return this.ǃcvz.has(te)}ǃDJ(te){const ne=this.ǃcvz.get(te);return"undefined"==typeof ne?null:ne}ǃcXE(){history.replaceState("",document.title,location.pathname+location.search)}ǃcvo(te){this.ǃcvY=te,this.ǃcvz.clear(),this.ǃcvF()}},ǃG.ǃcrS=new ǃG.ǃcvh(location.search),ǃG.ǃcXj=new ǃG.ǃcvh(location.hash),"dev"!==ǃG.ǃcrS.ǃDJ("mode")&&ǃG.ǃcvK("final"),"use strict";{function ee(ve,be,Ee){if(!0===be){Ee();he.set(ve,!0)}else if(be&&be.length){Ee(be[0]);he.set(ve,!0)}else;}const _85="nwjs",_86="32-bit",_87="64-bit",_88="Android",_89="Windows",_90="Trident",_91="Mac OS X",_92="Blackberry",_93="Windows Phone",_94="Internet Explorer",te="(unknown)",ne=navigator.userAgent;let ie={ǃcvH:/linux|openbsd|freebsd|netbsd/i.test(ne),ǃcvI:/CrOS/.test(ne),ǃcvx:/trident|iemobile|msie|tizen/i.test(ne),ǃcvJ:/trident|iemobile|msie|edge\//i.test(ne),ǃcvZ:/bb10/i.test(ne),ǃcvS:/edge\//i.test(ne),ǃcvs:/trident/i.test(ne),ǃcvO:/webkit/i.test(ne),safari:/safari\//i.test(ne),chrome:/chrome\//i.test(ne),ǃcvQ:/chromium\//i.test(ne),ǃcqc:/crosswalk|xwalk/i.test(ne),ǃcqG:/nwjs/i.test(ne),ǃcqm:/amazonwebappplatform/i.test(ne),ǃcqD:/wv\)/.test(ne),ǃcRK:/android/i.test(ne),ǃcqi:/nokiabrowser\/[0-9.]+/i.test(ne)},me={ǃcqR:/windows\s+nt\s+\d+\.\d+/i.exec(ne),ǃcqb:/mac\s+os\s+x\s+[0-9_]+/i.exec(ne),ǃcRK:/android\s+[0-9.]+/i.exec(ne),ǃcqT:/tizen\s+[0-9.]+/i.exec(ne),ǃcqk:/iphone\s+os\s+[0-9_]+/i.exec(ne),ǃcqX:/ipad[^)]*os\s+[0-9_]+/i.exec(ne),ǃcq$:/windows\s+phone\s+[0-9.]+/i.exec(ne),ǃcqr:/windows\s+phone\s+os\s+[0-9.]+/i.exec(ne),chrome:/chrome\/[0-9.]+/i.exec(ne),ǃcvQ:/chromium\/[0-9.]+/i.exec(ne),ǃcqG:/nwjs\/[0-9.]+/i.exec(ne),ǃcqV:/firefox\/[0-9.]+/i.exec(ne),ǃcqA:/msie\s+[0-9.]+/i.exec(ne),ǃcvS:/edge\/[0-9.]+/i.exec(ne),ǃcqL:/silk\/[0-9.]+/i.exec(ne)},ae=te,de=te,re=te,Ge=te,oe=te,le=te,ue=te,pe="browser",ge=!1,he=new Map;ee("isWindows",me.ǃcqR,ve=>{ae=_89;const be=ve.split(" ")[2];be&&("5.0"===be?de="2000":"5.1"===be?de="XP":"5.2"===be?de="XP":"6.0"===be?de="Vista":"6.1"===be?de="7":"6.2"===be?de="8":"6.3"===be?de="8.1":"10.0"===be?de="10":void 0)}),ee("isOSX",me.ǃcqb,ve=>{ae=_91;const be=ve.split(" ")[3];be&&(de=be.replace("_","."))}),ee("isLinux",ie.ǃcvH,()=>{ae="Linux"}),ee("isChromeOS",ie.ǃcvI,()=>{ae="Chrome OS"}),ee("isAndroid",!ie.ǃcvx&&me.ǃcRK,ve=>{ae=_88;const be=ve.split(" ")[1];be&&(de=be)}),ee("isTizen",me.ǃcqT,ve=>{ae="Tizen";const be=ve.split(" ")[1];be&&(de=be)}),ee("isIPhone",!ie.ǃcvx&&me.ǃcqk,ve=>{ae="iOS";const be=ve.split(" ")[2];be&&(de=be.replace("_","."))}),ee("isIPad",!ie.ǃcvx&&me.ǃcqX,ve=>{ae="iOS";const be=ve.split(" ")[3];be&&(de=be.replace("_","."))}),ee("isWindowsPhone",me.ǃcq$,ve=>{ae=_93;const be=ve.split(" ")[2];be&&(de=be)}),ee("isWindowsPhoneOS",me.ǃcqr,ve=>{ae=_93;const be=ve.split(" ")[3];be&&(de=be)}),ee("isBlackberry",ie.ǃcvZ,()=>{ae=_92,de="10",Ge="stock",ue="webkit"}),ee("isChrome",!ie.ǃcvS&&me.chrome,ve=>{Ge="Chrome",ue="Blink";const be=ve.split("/")[1];be&&(oe=be)}),ee("isChromium",me.ǃcvQ,ve=>{Ge="Chromium",ue="Blink";const be=ve.split("/")[1];be&&(oe=be)}),ee("isFirefox",me.ǃcqV,ve=>{Ge="Firefox",ue="Gecko";const be=ve.split("/")[1];be&&(oe=be)}),ee("isInternetExplorer",me.ǃcqA,ve=>{Ge=_94,ue=_90;const be=ve.split(" ")[1];be&&(oe=be)}),ee("isTrident",Ge!==_94&&ie.ǃcvs,()=>{ue=_90;const ve=/rv:[0-9.]+/i.exec(ne);if(ve&&ve.length){Ge=_94;const be=ve[0].split(":")[1];be&&(oe=be)}}),ee("isEdge",me.ǃcvS,ve=>{Ge="Edge",ue="Edge";const be=ve[0].split("/")[1];be&&(oe=be)}),ee("isSafari",ie.safari&&!ie.ǃcqi&&!ie.chrome&&!ie.ǃcvQ&&!ie.ǃcq_&&!ie.ǃcvZ,()=>{Ge="Safari",ue="WebKit";const ve=/version\/[0-9.]+/i.exec(ne),be=/crios\/[0-9.]+/i.exec(ne),Ee=/fxios\/[0-9.]+/i.exec(ne);if(ve&&ve.length){const De=ve[0].split("/")[1];De&&(oe=De)}if(be&&be.length){Ge="Chrome for iOS";const De=be[0].split("/")[1];De&&(oe=De)}if(Ee&&Ee.length){Ge="Firefox for iOS";const De=Ee[0].split("/")[1];De&&(oe=De)}}),ee("isSilk",me.ǃcqL,ve=>{Ge="Silk";const be=ve.split("/")[1];be&&(oe=be)}),ee("isCrosswalk",ie.ǃcqc,()=>pe="crosswalk"),ee("isCordova",window.ǃcqt&&window.ǃcqt.ǃcRg||window.ǃcqt&&window.ǃcqt.ǃcqP,()=>pe="cordova"),ee("isNWJS",me.ǃcqG,ve=>{pe=_85,Ge="NW.js",ue="Chromium";const be=ve.split("/")[1];be&&(oe=be)}),ee("isAmazonWebApp",ie.ǃcqm,()=>pe="webapp"),ee("isHomeScreenWebApp",pe!==_85&&window.matchMedia("(display-mode: standalone)").matches,()=>pe="webapp"),ee("isFalseSafari","Safari"===Ge&&(ae===_88||"Tizen"===ae||ae===_92),()=>Ge="stock"),ee("isAndroidWebview","Chrome"===Ge&&"browser"===pe&&ie.ǃcqD,()=>pe="webview"),ee("isFirefoxOS","Firefox"===Ge&&ae===te,()=>ae="Firefox OS"),ee("isAndroidFallback",ae===te&&!ie.ǃcvx&&ie.ǃcRK,()=>ae=_88),ee("isTridentFallback",ae===te&&ie.ǃcvs,()=>ue=_90),ee("isWebkitFallback",ae===te&&ie.ǃcvO,()=>ue="WebKit"),ee("is64Bit",(ve=>{return ve.test(ne)||ve.test(navigator.platform)||"x64"===navigator.cpuClass})(/x86_64|x86-64|win64|x64;|x64\)|x64_|amd64|wow64|ia64|arm64|arch64|sparc64|ppc64|irix64/i),()=>re=_87),ee("is32Bit",(ve=>{return ve.test(ne)||ve.test(navigator.platform)||"x86"===navigator.cpuClass})(/x86;|x86\)|i86|i386|i486|i586|i686|armv1|armv2|armv3|armv4|armv5|armv6|armv7/i),()=>re=_86),ee("is64BitFallback",re===te&&ae===_91&&10.7<=parseFloat(de),()=>re=_87),ee("is32BitFallback",re===te&&ae===_89||ae===_88&&5>parseFloat(de),()=>re=_86),ee("is32BitBrowser",re===_86||/wow64/i.test(ne),()=>le=_86),ee("is64BitBrowser",/win64/i.test(ne),()=>le=_87),ee("isDesktop",(()=>{return ae===_89||ae===_91||"Linux"===ae||"Chrome OS"===ae||pe===_85})(),()=>ge=!0),ǃG.ǃDG={ǃcqj:ae,ǃcqd:de,ǃcqE:re,ǃciT:Ge,ǃcqe:oe,ǃcqp:le,ǃcqf:ue,ǃDw:pe,ǃPn:ge,ǃDc:!ge,ǃcqy:pe===_85,ǃcqB:ae===_91||"iOS"===ae}}{function ee(){return ne=!1,console.log("(testing if dev tools open, which requires a log)",ie),ne}function te(ae){let de=ǃG.ǃcqW();if(console.error("Assertion failure: "+ae+"\n\nStack trace:\n"+de),!ǃG.ǃDP&&!me&&!ee()){me=!0;let Ge=ǃG.ǃGD.ǃDZ.ǃDJ("CrashReport");Ge.ǃ$i("assertion failure",{stack:de,message:ae},document.body)}}ǃG.ǃDP=!ǃG.ǃcvM()&&ǃG.ǃcrS.ǃcrZ("debug"),ǃG.ǃcvC=!ǃG.ǃcvM()&&ǃG.ǃcrS.ǃcrZ("debug-defend"),ǃG.ǃcvC&&(ǃG.ǃDP=!0);let ne=!1,ie=new Image;ie.__defineGetter__("id",function(){ne=!0});let me=!1;window.assert=function(de,re){de||te(re)}}"use strict",!String.prototype.startsWith&&Object.defineProperty(String.prototype,"startsWith",{ǃcqu:!1,ǃcqU:!1,ǃcqv:!1,value:function(te,ne){return ne=ne||0,this.lastIndexOf(te,ne)===ne}}),!String.prototype.endsWith&&Object.defineProperty(String.prototype,"endsWith",{ǃcqu:!1,ǃcqU:!1,ǃcqv:!1,value:function(te,ne){var ie=this.toString();(ne===void 0||ne>ie.length)&&(ne=ie.length),ne-=te.length;var me=ie.indexOf(te,ne);return-1!==me&&me===ne}}),!String.prototype.includes&&(String.prototype.includes=function(){return-1!==String.prototype.indexOf.apply(this,arguments)}),!Array.prototype.includes&&(Array.prototype.includes=function(){return-1!==Array.prototype.indexOf.apply(this,arguments)}),!Object.entries&&Object.defineProperty(Object,"entries",{ǃcqu:!1,value:function(te){let ne=[];for(let ie of Object.keys(te))ne.push([ie,te[ie]]);return ne}}),!Array.prototype.values&&(Array.prototype.values=function*(){for(const ee of this)yield ee}),!RegExp.escape&&(RegExp.escape=function(ee){return(ee+"").replace(/[\\^$*+?.()|[\]{}]/g,"\\$&")}),"use strict";{const _95="undefined";ǃG.ǃcqq={},ǃG.ǃcqq.ǃcqa=(()=>{try{let ee=document.createElement("div"),te=ee.animate([{opacity:"0"},{opacity:"1"}],1e3);return typeof te.reverse!==_95}catch(ee){return!1}})(),ǃG.ǃcqq.ǃcqg=!!window.requestIdleCallback,ǃG.ǃcqq.ǃcqN=typeof Proxy!==_95,ǃG.ǃcqq.ǃcqK=(()=>{let ee=document.createElement("a");return typeof ee.download!==_95})(),ǃG.ǃcqq.ǃKO=(()=>{let ee=document.createElement("canvas");return typeof ee.toBlob!==_95})(),ǃG.ǃcqq.ImageBitmap=!!window.createImageBitmap,ǃG.ǃcqq.ǃcqn=CSS.supports("background","element(#test)"),ǃG.ǃcqq.ǃcqM="function"==typeof fetch,ǃG.ǃcqq.ǃcqC=window.isSecureContext&&navigator.storage&&navigator.storage.persist,ǃG.ǃcqq.ǃcqh=window.isSecureContext&&navigator.storage&&navigator.storage.estimate}{const _96="undefined",_97="unexpected type",_98="expected 2d array",_99="expected function",_100="expected simple object",_101="expected drawable or image data",_102="expected same function reference";ǃG.ǃcqY=function(te){return"number"==typeof te},ǃG.ǃ_Y=function(te){return ǃG.ǃcqY(te)&&isFinite(te)},ǃG.ǃEe=function(te){if(!ǃG.ǃcqY(te))throw new TypeError("expected number")},ǃG.ǃc$u=function(te){ǃG.ǃgd(te)||ǃG.ǃEe(te)},ǃG.ǃcqz=function(te,ne,ie){if(!ǃG.ǃcqY(te)||isNaN(te)||ne>te||ie","|"]),ne=new Set(["."]),ie=new Set(["."," "]),me=200;ǃG.ǃcaP=function(de){if(ǃG.ǃbv(de),!de)return!1;if(de.length>=me)return!1;let re=[...de];return!re.some(Ge=>te.has(Ge))&&!ne.has(re[0])&&!ie.has(re[re.length-1])&&!ǃG.ǃcaj(de)},ǃG.ǃcad=function(de){ǃG.ǃbv(de),ǃG.ǃbv(name);let re=[...de];for(ǃG.ǃZO(re,Ge=>te.has(Ge));re.length&&ie.has(re[re.length-1]);)re.pop();for(;re.length&&ne.has(re[0]);)re.shift();return re.length>me&&ǃG.ǃMN(re,me),re.join("")},ǃG.ǃcaj=function(de){return ǃG.ǃbv(de),ee.has(de.toLowerCase())}}{const ee=document,te=document.querySelector("base");let ne=te&&te.hasAttribute("href")?te.getAttribute("href"):"";ne&&(ne.startsWith("/")&&(ne=ne.substr(1)),!ne.endsWith("/")&&(ne+="/")),ǃG.ǃ$e=function(){const ae=ee.location;return ǃG.ǃm(ae.origin+ae.pathname)+ne},ǃG.ǃm=function(ae){if(ǃG.ǃbv(ae),!ae.length)return ae;const de=ae.charAt(ae.length-1);if("/"===de||"\\"===de)return ae;let re=ae.lastIndexOf("/");return-1===re&&(re=ae.lastIndexOf("\\")),-1===re?"":ae.substr(0,re+1)},ǃG.ǃcaE=function(ae){if(ǃG.ǃbv(ae),!ae.length)return ae;const de=ae.charAt(ae.length-1);if("/"===de||"\\"===de)return"";let re=ae.lastIndexOf("/");return-1===re&&(re=ae.lastIndexOf("\\")),-1===re?ae:ae.substr(re+1)},ǃG.ǃaY=function(ae){if(ǃG.ǃg(ae,DataTransfer),ae.types)for(let de=0;dede?"":ae.substr(de)},ǃG.ǃFg=function(ae){let de=ae.lastIndexOf(".");return 1>de?ae:ae.substr(0,de)},ǃG.ǃon=function(ae,de){return ǃG.ǃTH(ae),new Promise(re=>{window.setTimeout(re,ae,de)})},ǃG.ǃcae=function(ae){ǃG.ǃXw(ae);try{ae()}catch(de){ǃG.ǃDP&&console.warn("Swallowed exception: ",de)}},ǃG.ǃcap=function(ae){assert(!1,ae||"Unknown error")},ǃG.ǃcaf=function(){},ǃG.ǃck_=function(ae,de){return ǃG.ǃoG(ae),ǃG.ǃoG(de),"string"!=typeof ae||"string"!=typeof de?!1:ae.length===de.length&&(ae===de||ae.toLowerCase()===de.toLowerCase())},ǃG.ǃMN=function(ae,de){ǃG.ǃkF(ae),ǃG.ǃTH(de),ae.length=de},ǃG.ǃGs=function(ae){ǃG.ǃQw(ae);ae&&0!==ae.length&&ǃG.ǃMN(ae,0)},ǃG.ǃgG=function(ae){if(ǃG.ǃaQ(ae),!!ae){for(let de=0,re;deGe&&ǃG.ǃcay(ae,de,re)},ǃG.ǃcGb=function(ae,de){ǃG.ǃkF(ae),ǃG.ǃkF(de),ǃG.ǃGs(ae),ǃG.ǃMg(ae,de)},ǃG.ǃMg=function(ae,de){ǃG.ǃkF(ae),ǃG.ǃkF(de),ae.push(...de)},ǃG.ǃcaW=function(ae,de){ǃG.ǃkF(ae);let re=ae.indexOf(de);0<=re&&ae.splice(re,1)},ǃG.ǃOf=function(ae,de){ǃG.ǃkF(ae),ǃG.ǃkF(de);let re=ae.length;if(de.length!==re)return!1;for(let Ge=0;Gere:5===de?ae>=re:(assert(!1,"Invalid comparison value: "+de),!1)},ǃG.ǃcaK=function(ae){for(let de in ǃG.ǃD_(ae),ae)if(ae.hasOwnProperty(de))return!0;return!1},ǃG.ǃcan=function(ae,de){return ǃG.ǃkK(ae,Promise),ǃG.ǃXw(de),new Promise((re,Ge)=>{let oe=[],le=0,ue=!1;for(let pe=0,ge=ae.length;pe{ue||(oe[pe]=he,++le,le===ae.length?re(oe):de(le,ae.length))}).catch(he=>{ue=!0,Ge(he)})})};let ie=[];ǃG.ǃcaM=function(ae){ǃG.ǃXw(ae),ie.push(ae)},ǃG.ǃcaC=function(){let ae=0;for(let de of ie){let re=de();ǃG.ǃTH(re),ae+=re}return Math.floor(ae)}}{function te(le){le.clipboardData.setData("text/plain",ae),le.stopPropagation(),le.preventDefault()}const _105="contenteditable";ǃG.ǃc=function(){let ue=document.currentScript.ownerDocument,pe=window.c3_releaseMainImportDoc;return ue===document&&pe&&(ue=pe),ue},ǃG.ǃ$$=function(ue){ǃG.ǃbv(ue),window.open(ue)},ǃG.ǃcah=function(){return window.matchMedia("(display-mode: fullscreen)").matches?"fullscreen":window.matchMedia("(display-mode: standalone)").matches?"standalone":window.matchMedia("(display-mode: minimal-ui)").matches?"minimal-ui":"browser"},ǃG.ǃcaY=function(ue,pe){for(ǃG.ǃcam(ue),ǃG.ǃbv(pe),pe=pe.toUpperCase();ue.parentNode;)if(ue=ue.parentNode,ue.tagName===pe)return ue;return null},ǃG.ǃcVf=function(ue,pe){for(ǃG.ǃcXQ(ue),ǃG.ǃkF(pe);ue;){for(const ge of pe)if(ue.classList.contains(ge))return ue;ue=ue.parentElement}return null},ǃG.ǃcLG=function(ue,pe){return ǃG.ǃcXQ(ue),ǃG.ǃkF(pe),!!ǃG.ǃcVf(ue,pe)},ǃG.ǃcVv=function(ue,pe){for(ǃG.ǃcXQ(ue),ǃG.ǃkF(pe);ue;){const ge=ue.tagName;for(const he of pe)if(ǃG.ǃck_(ge,he))return ue;ue=ue.parentElement}return null},ǃG.ǃcaz=function(ue,pe){return ǃG.ǃcXQ(ue),ǃG.ǃkF(pe),!!ǃG.ǃcVv(ue,pe)},ǃG.ǃcLW=function(ue,pe){for(ǃG.ǃc$i(ue),ǃG.ǃc$i(pe);ue.parentNode;){if(ue.parentNode===pe)return!0;ue=ue.parentNode}return!1},ǃG.ǃctn=function(ue){ǃG.ǃc$i(ue);const pe=ue.childNodes;for(let ge=0,he=pe.length,ve;ge{if(!ǃG.ǃcqq.ǃcqK)return void he("browser does not support downloading local content");let ve=document.createElement("a");ve.textContent=ue,ve.href=pe,ve.download=ue,document.body.appendChild(ve),ve.click(),document.body.removeChild(ve),window.setTimeout(ge,16)})},ǃG.ǃKS=function(ue,pe){ǃG.ǃbv(ue),ǃG.ǃg(pe,Blob);let ge=URL.createObjectURL(pe);return setTimeout(()=>URL.revokeObjectURL(ge),6e4),ǃG.ǃwc(ue,ge)},ǃG.ǃcaH=function(ue){performance.mark(ue+"-Start")},ǃG.ǃcaI=function(ue){performance.mark(ue+"-End"),performance.measure(ue,ue+"-Start",ue+"-End")};let ie=document.createElement("input");ie.setAttribute("type","color"),ie.className="hiddenColorPicker",ie.style.opacity="0",ie.addEventListener("change",function(){me&&(me(ie.value),me=null)}),window.C3_IsPopupWindow||document.body.appendChild(ie);let me=null;ǃG.ǃcPa=function(ue){ǃG.ǃbv(ue),ie.value=ue;let pe=new Promise(ge=>{me=ge});return ie.click(),pe};let ae="";ǃG.ǃdY=function(ue){ǃG.ǃbv(ue);let pe=document.createElement("textarea");pe.value="x",document.body.appendChild(pe),pe.select();let ge;window.addEventListener("copy",te,!0),ae=ue;try{ge=document.execCommand("copy")}catch(he){ge=!1}return ae="",window.removeEventListener("copy",te,!0),document.body.removeChild(pe),ge},ǃG.ǃcax=function(ue){ue.reverse(),window.setTimeout(()=>{"pending"===ue.playState&&ue.finish()},50)},ǃG.ǃcaJ=function(ue){ue.playbackRate*=-1,window.setTimeout(()=>{"pending"===ue.playState&&ue.finish()},50)};const de=document.createElement,re=document.appendChild,Ge=MessageChannel,oe=MessagePort.prototype.postMessage;ǃG.ǃcaZ=function(ue){ǃG.ǃD_(ue),ǃG.ǃbv(ue.src),ǃG.ǃbv(ue.ǃcaS),ǃG.ǃcVD(ue.ǃcas),ǃG.ǃoG(ue.sandbox);const pe=de.call(document,"iframe"),ge=new Ge,he=ge.port1,ve=ge.port2;ue.ǃcas&&(he.onmessage=ue.ǃcas);const be=new Promise((Ee,De)=>{pe.addEventListener("load",()=>{pe.contentWindow.postMessage({type:"init"},ue.ǃcaS,[ve]),Ee({ǃcaO:pe,ǃcaQ:function(Te,ke){oe.call(he,Te,ke)}})}),pe.addEventListener("error",ye=>{De(ye)})});return"string"==typeof ue.sandbox&&pe.setAttribute("sandbox",ue.sandbox),pe.style.display="none",pe.src=ue.src,re.call(ue.parent||document.body,pe),be}}{function ee(ae){const de=[];for(let re in ae)ae[re]&&de.push(re+"="+encodeURIComponent(ae[re]));return de.join("&")}function te(ae,de,re,Ge,oe,le,ue){return new Promise((pe,ge)=>{const he=new XMLHttpRequest;if(he.open(ae,de),he.responseType="json"===oe?"text":oe,le&&he.overrideMimeType(le),re)for(const[ve,be]of Object.entries(re))he.setRequestHeader(ve,be);he.onload=()=>{if(!(300>he.status&&200<=he.status))ge({response:he.response,code:he.status,status:he.statusText});else if("json"===oe)try{pe(JSON.parse(he.response))}catch(ve){ge(ve)}else pe(he.response)},ue&&(he.onprogress=ue),he.onerror=()=>ge({response:he.response,code:he.status,status:he.statusText}),he.send(Ge)})}function ne(ae,de,re,Ge,oe){const le={method:ae};return Ge&&(le.body=Ge),re&&(ǃcgc.headers=re),fetch(de,le).then(ue=>{return ue.ok?ue[oe]():ue.text().then(pe=>Promise.reject({response:pe,code:ue.status,status:ue.statusText}))})}const ie=new Set(["text","blob","json","arraybuffer"]),me=new Set(["text","blob","json","arraybuffer","document"]);ǃG.ǃcqM=function(de){de=ǃG.ǃcXf(de)?{url:de}:de,ǃG.ǃD_(de),ǃG.ǃbv(de.url),ǃG.ǃoG(de.method),ǃG.ǃcDt(de.arguments),ǃG.ǃcDt(de.ǃcgG),ǃG.ǃoG(de.response),ǃG.ǃcDt(de.headers),ǃG.ǃoG(de.encode),ǃG.ǃoG(de.ǃcgm),ǃG.ǃcVD(de.onprogress);let re=de.url,Ge=de.data;const oe=de.ǃcgm,le=de.onprogress,ue=de.headers,pe=de.method||"GET",ge=ee(de.arguments)||"",he=de.response||"text";ge&&(re+=re.includes("?")?"&":"?",re+=ge),Ge&&("json"===de.encode?Ge=JSON.stringify(de.data):"url"===de.encode&&(Ge=ee(de.data)));const ve=ǃG.ǃcqq.ǃcqM&&ie.has(he),be=me.has(he);if(ve&&!le)return ne(pe,re,ue,Ge,he);if(be)return te(pe,re,ue,Ge,he,oe,le);throw new TypeError(`Invalid responseType requested ${he}`)},ǃG.ǃTK=function(de){return ǃG.ǃbv(de),ǃG.ǃcqM({url:de,mimeType:"text/plain; charset=utf-8"})},ǃG.ǃcgD=function(de,re){return ǃG.ǃbv(de),ǃG.ǃoG(re),ǃG.ǃcqM({url:de,response:"document",ǃcgm:re})},ǃG.ǃcks=function(de){return ǃG.ǃbv(de),ǃG.ǃcqM({url:de,response:"json"})},ǃG.ǃ$p=function(de,re){return ǃG.ǃbv(de),ǃG.ǃcVD(re),ǃG.ǃcqM({url:de,onprogress:re,response:"blob"})},ǃG.ǃoX=function(de,re=!0){return ǃG.ǃbv(de),new Promise((Ge,oe)=>{let le=document.createElement("link");le.onload=function(){Ge(le)},le.onerror=function(pe){oe(pe)},le.rel="import",re&&le.setAttribute("async",""),le.href=de,document.head.appendChild(le)})},ǃG.ǃcgi=function(de){return ǃG.ǃbv(de),new Promise((re,Ge)=>{let oe=document.createElement("link");oe.onload=function(){re(oe)},oe.onerror=function(ue){Ge(ue)},oe.rel="stylesheet",oe.href=de,document.head.appendChild(oe)})},ǃG.ǃcgR=function(de){return ǃG.ǃbv(de),new Promise((re,Ge)=>{let oe=document.createElement("script");oe.onload=function(){re(oe)},oe.onerror=function(ue){Ge(ue)},oe.src=de,document.head.appendChild(oe)})},ǃG.ǃcv=function(de){return ǃG.ǃbv(de),new Promise((re,Ge)=>{let oe=new Image;oe.onload=function(){re(oe)},oe.onerror=function(ue){Ge(ue)},oe.src=de})}}{function ee(){re||(re=new ǃG.ǃtX(te,5)),re.ǃt$();ae||(ae=document.createElement(_107),ae.width=32,ae.height=32,de=ae.getContext("2d"))}function te(){ae.width=32,ae.height=32}function ne(Ge){ǃG.ǃcaR(Ge),ee(),ae.width=Ge.width,ae.height=Ge.height,de.drawImage(Ge,0,0)}function ie(Ge,oe,le,ue,pe,ge,he){let ve=ue*oe+le;for(let Ee=ve;EeJSON.parse(oe))},ǃG.ǃcgb=function(oe){if(ǃG.ǃbv(oe),"data:"!==oe.substr(0,5))throw new URIError("expected data: uri");let le=oe.indexOf(",");if(0>le)throw new URIError("expected comma in data: uri");let ue=oe.substring(5,le),pe=oe.substring(le+1),ge=ue.split(";"),he=ge[0]||"",ve=ge[1],be=ge[2],Ee;return Ee="base64"===ve||"base64"===be?atob(pe):decodeURIComponent(pe),{ǃcgT:he,data:Ee}},ǃG.ǃcgk=function(oe){ǃG.ǃbv(oe);let le=ǃG.ǃcgb(oe);return ǃG.ǃcgX(le.data,le.ǃcgT)},ǃG.ǃpd=function(oe){return ǃG.ǃg(oe,Blob),new Promise((le,ue)=>{let pe=new FileReader;pe.onload=ge=>le(ge.target.result),pe.onerror=ge=>ue(ge),pe.readAsDataURL(oe)})},ǃG.ǃcgX=function(oe,le){ǃG.ǃbv(oe),ǃG.ǃoG(le);let ue=oe.length,pe=ue>>2,ge=new Uint8Array(ue),he=new Uint32Array(ge.buffer,0,pe),ve,be;for(ve=0,be=0;ve{let pe=new FileReader;pe.onload=ge=>le(ge.target.result),pe.onerror=ge=>ue(ge),pe.readAsArrayBuffer(oe)})},ǃG.ǃcg$=function(oe,le,ue){return ǃG.ǃc$i(oe,_107),ǃG.ǃoG(le),ǃG.ǃNv(ue),"number"!=typeof ue&&(ue=1),le=le||_108,ue=ǃG.ǃAR(ue,0,1),ǃG.ǃcgk(oe.toDataURL(le,ue))},ǃG.ǃKO=function(oe,le,ue){return ǃG.ǃc$i(oe,_107),ǃG.ǃoG(le),ǃG.ǃNv(ue),"number"!=typeof ue&&(ue=1),le=le||_108,ue=ǃG.ǃAR(ue,0,1),ǃG.ǃcqq.ǃKO?new Promise(pe=>{oe.toBlob(pe,le,ue)}):ǃG.ǃckO(()=>ǃG.ǃcg$(oe,le,ue))},ǃG.ǃcgr=function(Ge,oe,le,ue,pe){ǃG.ǃc$i(Ge,_107);let ge=document.createElement(_107);if(ge.width=Ge.width,ge.height=Ge.height,ǃG.ǃ_Y(oe)&&ǃG.ǃ_Y(le)&&ǃG.ǃ_Y(ue)&&ǃG.ǃ_Y(pe)){let he=ue-oe,ve=pe-le;ge.getContext("2d").drawImage(Ge,oe,le,he,ve,0,0,he,ve)}else ge.getContext("2d").drawImage(Ge,0,0);return ge};let ae=null,de=null,re=null;ǃG.ǃcaM(()=>{return ae?4*(ae.width*ae.height):0});ǃG.ǃcgV=function(oe){ǃG.ǃg(oe,Blob);let le=URL.createObjectURL(oe);return ǃG.ǃcv(le).then(ue=>{return URL.revokeObjectURL(le),ue}).catch(ue=>{throw URL.revokeObjectURL(le),ue})},ǃG.ǃ$k=function(oe,le){return ǃG.ǃg(oe,Blob),ǃG.ǃcqq.ImageBitmap&&!le?createImageBitmap(oe):ǃG.ǃcgV(oe)},ǃG.ǃoD=function(oe){return ǃG.ǃg(oe,Blob),new Promise((le,ue)=>{let pe=new FileReader;pe.onload=ge=>le(ge.target.result),pe.onerror=ge=>ue(ge),pe.readAsText(oe)})},ǃG.ǃcgA=function(oe){return ǃG.ǃg(oe,Blob),ǃG.ǃoD(oe).then(ǃG.ǃc$Y)},ǃG.ǃc$E=function(oe,le){let ue=le?JSON.stringify(oe,null,4):JSON.stringify(oe);return new Blob([ue],{type:"application/json"})};ǃG.ǃcgL=function(oe){return ǃG.ǃg(oe,ImageBitmap),ne(oe),de.getImageData(0,0,oe.width,oe.height)},ǃG.ǃcg_=function(oe,le){return ǃG.ǃcaR(oe),ǃG.ǃoG(le),ne(oe),ǃG.ǃKO(ae,le)},ǃG.ǃcgt=function(oe,le){return ǃG.ǃcaR(oe),ǃG.ǃoG(le),ne(oe),ae.toDataURL(le||_108)},ǃG.ǃcgP=function(oe){return ǃG.ǃg(oe,Blob),ǃG.ǃcqq.ImageBitmap?createImageBitmap(oe).then(ǃG.ǃcgL):ǃG.ǃcgV(oe).then(le=>ǃG.ǃcgj(le))},ǃG.ǃcgd=function(oe){return ǃG.ǃg(oe,Image),ne(oe),de.getImageData(0,0,oe.width,oe.height)},ǃG.ǃcgj=function(oe){return ǃG.ǃLK(oe,Image,ImageBitmap),ǃG.ǃcqq.ImageBitmap?createImageBitmap(oe).then(ǃG.ǃcgL):ǃG.ǃckO(()=>ǃG.ǃcgd(oe))},ǃG.ǃcgE=function(oe,le,ue){return ǃG.ǃg(oe,ImageData),ǃG.ǃoG(le),ǃG.ǃNv(ue),ee(),ae.width=oe.width,ae.height=oe.height,de.putImageData(oe,0,0),ǃG.ǃcg$(ae,le,ue)},ǃG.ǃcge=function(oe,le,ue){return ǃG.ǃg(oe,ImageData),ǃG.ǃoG(le),ǃG.ǃNv(ue),ǃG.ǃcqq.ǃKO?ǃG.ǃcqq.ImageBitmap?createImageBitmap(oe).then(pe=>ǃG.ǃcg_(pe)):ǃG.ǃckO(()=>{return ee(),ae.width=oe.width,ae.height=oe.height,de.putImageData(oe,0,0),ǃG.ǃKO(ae,le,ue)}):ǃG.ǃckO(()=>ǃG.ǃcgE(oe,le,ue))},ǃG.ǃcgp=function(oe,le,ue){return ǃG.ǃg(oe,ImageData),ǃG.ǃoG(le),ǃG.ǃNv(ue),"number"!=typeof ue&&(ue=1),le=le||_108,ue=ǃG.ǃAR(ue,0,1),ee(),ae.width=oe.width,ae.height=oe.height,de.putImageData(oe,0,0),ae.toDataURL(le,ue)},ǃG.ǃcgf=function(oe,le,ue,pe="columns"){if(ǃG.ǃcaR(oe),ǃG.ǃTH(le),ǃG.ǃTH(ue),ǃG.ǃoG(pe),"columns"!=pe&&"rows"!=pe)throw new Error("unexpected slicing mode. Supported values are 'columns' and 'rows'.");ee(),ae.width=oe.width,ae.height=oe.height,de.drawImage(oe,0,0);let ge=Math.floor(oe.width/le),he=Math.floor(oe.height/ue),ve=[],be=0,Ee=0;if("columns"===pe)for(be=0;bele||le>=he||0>ue||ue>=ve||le+pe>he||ue+ge>ve)throw new Error(_109);let be=new ImageData(pe,ge),Ee=new Uint32Array(oe.data.buffer),De=new Uint32Array(be.data.buffer);return ǃG.ǃcgy(Ee,he,De,pe,le,ue,0,0,pe,ge),be},ǃG.ǃcgU=function(oe,le,ue,pe){ǃG.ǃg(oe,ImageData),ǃG.ǃg(le,ImageData),ǃG.ǃTH(ue),ǃG.ǃTH(pe),ue|=0,pe|=0;let ge=0|oe.width,he=0|oe.height,ve=0|le.width,be=0|le.height;if(0>ue||0>pe||ue>ge-ve||pe>he-be)throw new Error(_109);let Ee=new Uint32Array(le.data.buffer),De=new Uint32Array(oe.data.buffer);ǃG.ǃcgy(Ee,ve,De,ge,0,0,ue,pe,ve,be)};ǃG.ǃcgv=function(oe,le,ue,pe,ge){ǃG.ǃg(oe,ImageData),ǃG.ǃTH(le),ǃG.ǃTH(ue),ǃG.ǃTH(pe),ǃG.ǃTH(ge),le|=0,ue|=0,pe|=0,ge|=0;let he=0|oe.width,ve=0|oe.height;if(0>le||le>=he||0>ue||ue>=ve||le+pe>he||ue+ge>ve)throw new Error(_109);let be=new Uint32Array(oe.data.buffer);ie(be,he,le,ue,pe,ge,0)};ǃG.ǃcgq=function(oe,le,ue,pe,ge,he,ve,be,Ee,De,ye){if(ǃG.ǃg(oe,Uint32Array),ǃG.ǃTH(le),ǃG.ǃTH(ue),ǃG.ǃTH(pe),ǃG.ǃTH(ge),ǃG.ǃTH(he),ǃG.ǃTH(ve),ǃG.ǃTH(be),ǃG.ǃTH(Ee),ǃG.ǃTH(De),ǃG.ǃTH(ye),he>le||De>le||ve>ue||ye>ue)throw new Error("rectangle larger than destination");if(he>De||ve>ye)throw new Error("inner size larger than outer size");if(pebe+De||ge+ve>Ee+ye)throw new Error("inner rectange not inside outer rectangle");if(he!==De||ve!==ye){let Te=pe+he,ke=Te-1,we=be+De,Le=ge+ve,Ce=Le-1,xe=Ee+ye,Re=me(oe,le,pe,ge);ie(oe,le,be,Ee,pe-be,ge-Ee,Re);for(let Ue=Ee;Uepe&&(pe=oe.byteLength);let ge=new Uint8Array(oe,ue,pe);return ǃG.ǃcgg(ge,le)},ǃG.ǃcgg=function(oe,le){ǃG.ǃg(oe.buffer,ArrayBuffer),ǃG.ǃoG(le);let ue=new TextDecoder(le||"utf-8");return ue.decode(oe)},ǃG.ǃcgN=function(oe){ǃG.ǃbv(oe);let le=new TextEncoder("utf-8");return le.encode(oe).buffer},ǃG.ǃcbP=function(oe,le,ue){ǃG.ǃg(oe,ArrayBuffer),ǃG.ǃXw(le),ǃG.ǃEe(ue);let pe=0,ge=oe.byteLength,he=[];for(;peǃG.ǃcBE(he))),ge=[...pe].join(",");console.warn(`An object derived from DefendedBase was not protected with debugDefend(). This will disable some checks. See the coding guidelines! Possible affected class names: ${ge}`),ae.clear(),de.clear()}}function ie(pe){let ge=new Set;for(let he in pe)ge.add(he);return ge}function me(pe,ge){let he=ie(ge),ve=ue.get(pe);if(ve){let be=[];for(let Ee of ve.values())he.has(Ee)?he.delete(Ee):be.push(Ee);ǃG.ǃMg(be,[...he]),be.length&&console.warn(`[Defence] '${ǃG.ǃcBE(pe)}' constructor creates inconsistent properties: ${be.join(", ")}`)}else ue.set(pe,he)}const _110="undefined";ǃG.ǃcqW=function(){return new Error().stack},ǃG.ǃcgK=function(){debugger},ǃG.cast=function(ge,he){return ge&&ge instanceof he?ge:null},ǃG.ǃcBE=function(ge){return typeof ge===_110?_110:null===ge?"null":"boolean"==typeof ge?"":ǃG.ǃcqY(ge)?"":ǃG.ǃcXf(ge)?"":ǃG.ǃcXp(ge)?"":"symbol"==typeof ge?"<"+ge.toString()+">":ǃG.ǃcqx(ge)?ge.name&&"Function"!==ge.name?ge.name:"":"object"==typeof ge?ge.constructor&&ge.constructor.name&&"Object"!==ge.constructor.name?ge.constructor.name:"":""},ǃG.ǃcgn=function(ge){return null===ge?"null":Array.isArray(ge)?"array":typeof ge};let ae=new Map,de=new Map,re=new WeakMap,Ge=new WeakMap;ǃG.ǃcgM={};const oe=new Set(["then","splice"]);ǃG.ǃcgM.get=function(ge,he){return he in ge||"symbol"==typeof he||oe.has(he)||te(`Accessed missing property '${he}' from defended object '${ǃG.ǃcBE(ge)}', returning undefined`),Ge.has(ge)&&"symbol"!=typeof he&&!oe.has(he)&&te(`Accessed property '${he}' on a released object '${ǃG.ǃcBE(ge)}'\nObject was originally released at: ${Ge.get(ge)})\nCall stack at access: `),ge[he]},ǃG.ǃcgM.set=function(ge,he,ve){return he in ge||ae.has(ge)||te(`Set non-existent property '${he}' to '${ve}' on defended object '${ǃG.ǃcBE(ge)}'`),ee(ge[he],ve)||ae.has(ge)||te(`Set '${ǃG.ǃcgn(ge[he])}' property '${he}' to type '${ǃG.ǃcgn(ve)}' on defended object '${ǃG.ǃcBE(ge)}'`),Ge.has(ge)&&te(`Set property '${he}' on a released object '${ǃG.ǃcBE(ge)}'\nObject was originally released at: ${Ge.get(ge)})\nCall stack at access: `),ge[he]=ve,!0},ǃG.ǃcgM.ǃcgC=function(ge,he){throw new ReferenceError(`Cannot delete property '${he}' from defended object '${ǃG.ǃcBE(ge)}'`)},ǃG.ǃcgM.defineProperty=function(ge,he){throw new ReferenceError(`Cannot define property '${he}' on defended object '${ǃG.ǃcBE(ge)}'`)},ǃG.ǃcgM.enumerate=function(ge){throw new ReferenceError(`Cannot enumerate defended object '${ǃG.ǃcBE(ge)}'`)};let le=-1;ǃG.ǃDa=class{constructor(){if(ǃG.ǃcvC&&ǃG.ǃcqq.ǃcqN){let ge=new.target,he=Object.create(ge.prototype),ve=new Proxy(he,ǃG.ǃcgM);return ae.set(he,ve),de.set(ve,he),re.set(ve,he),-1==le&&(le=requestAnimationFrame(ne)),ve}}},ǃG.ǃcgh=function(ge){if(ǃG.ǃD_(ge),ǃG.ǃcvC&&ǃG.ǃcqq.ǃcqN&&ge instanceof ǃG.ǃDa){if(!de.has(ge))return ge;let he=de.get(ge);return de.delete(ge),ae.delete(he),ge}return ǃG.ǃDP?Object.seal(ge):ge},ǃG.ǃX=function(ge,...he){ǃG.ǃXw(ge);let ve;try{ve=new ge(...he)}catch(be){throw de.clear(),ae.clear(),be}return ǃG.ǃcvC&&me(ge,ve),ǃG.ǃcgh(ve)},ǃG.ǃz=function(ge){let he=re.get(ge);he&&Ge.set(he,ǃG.ǃcqW())},ǃG.ǃYa=function(pe){let ge=re.get(pe);return!!ge&&!!Ge.get(ge)};let ue=new Map}{function ee(ae){return 0>ae?-ae:ae}const te=2*Math.PI,ne=Math.PI/180,ie=180/Math.PI;ǃG.wrap=function(de,re,Ge){if(de=Math.floor(de),re=Math.floor(re),Ge=Math.floor(Ge),deGe?Ge:de},ǃG.ǃAt=function(de){return de%=te,0>de&&(de+=te),de},ǃG.ǃA_=function(de){return de*ne},ǃG.ǃWy=function(de){return de*ie},ǃG.ǃWi=function(de,re,Ge,oe){let le=Ge-de,ue=oe-re;return Math.sqrt(le*le+ue*ue)},ǃG.ǃWB=function(de,re,Ge,oe){return Math.atan2(oe-re,Ge-de)},ǃG.ǃccP=function(de,re){if(de===re)return 0;let Ge=Math.sin(de),oe=Math.cos(de),le=Math.sin(re),ue=Math.cos(re),pe=Ge*le+oe*ue;return 1<=pe?0:-1>=pe?Math.PI:Math.acos(pe)},ǃG.ǃcip=function(de,re,Ge){let oe=Math.sin(de),le=Math.cos(de),ue=Math.sin(re),pe=Math.cos(re);return Math.acos(oe*ue+le*pe)>Ge?0=oe*le-Ge*ue},ǃG.ǃcie=function(de,re,Ge){let oe=ǃG.ǃccP(de,re);return ǃG.ǃcgz(re,de)?ǃG.ǃAt(de+oe*Ge):ǃG.ǃAt(de-oe*Ge)},ǃG.ǃyJ=function(de,re,Ge){return de+Ge*(re-de)},ǃG.ǃciP=function(de,re,Ge){return de===re?0:(Ge-de)/(re-de)},ǃG.ǃtm=function(de,re,Ge,oe,le){return ǃG.ǃyJ(oe,le,ǃG.ǃciP(de,re,Ge))},ǃG.ǃcij=function(de,re,Ge,oe){return ǃG.ǃyJ(ǃG.ǃyJ(de,re,oe),ǃG.ǃyJ(re,Ge,oe),oe)},ǃG.ǃcid=function(de,re,Ge,oe,le){return ǃG.ǃyJ(ǃG.ǃcij(de,re,Ge,le),ǃG.ǃcij(re,Ge,oe,le),le)},ǃG.ǃciE=function(de,re,Ge){return(de+re+(de-re)*Math.cos(Ge*Math.PI))/2},ǃG.ǃcgF=function(de){return 0re;re<<=1)de|=de>>re;return de+1},ǃG.ǃdh=function(de,re){return Math.round(de*re)/re},ǃG.ǃcgl=function(de){return Math.round(1e6*de)/1e6},ǃG.toFixed=function(de,re){ǃG.ǃEe(de),ǃG.ǃTH(re);let Ge=de.toFixed(re),oe=Ge.length-1;for(;0<=oe&&"0"===Ge.charAt(oe);--oe);return 0<=oe&&"."===Ge.charAt(oe)&&--oe,0>oe?Ge:Ge.substr(0,oe+1)},ǃG.ǃciB=function(de,re,Ge){return ǃG.ǃAR(de,0,255)|ǃG.ǃAR(re,0,255)<<8|ǃG.ǃAR(Ge,0,255)<<16},ǃG.ǃcgw=function(de){return 255&de},ǃG.ǃcgo=function(de){return(65280&de)>>8},ǃG.ǃcgH=function(de){return(16711680&de)>>16},ǃG.ǃcgI=function(de,re){for(ǃG.ǃTH(de),ǃG.ǃTH(re),de=Math.floor(de),re=Math.floor(re);0!==re;){let Ge=re;re=de%re,de=Ge}return de};const me=[[3,2],[4,3],[5,4],[5,3],[6,5],[14,9],[16,9],[16,10],[21,9]];ǃG.ǃSQ=function(de,re){ǃG.ǃTH(de),ǃG.ǃTH(re),de=Math.floor(de),re=Math.floor(re);for(let oe of me){let le=de/oe[0]*oe[1];if(1>Math.abs(re-le))return oe.slice(0);if(le=de/oe[1]*oe[0],1>Math.abs(re-le))return[oe[1],oe[0]]}let Ge=ǃG.ǃcgI(de,re);return[de/Ge,re/Ge]};ǃG.ǃcgx=function(de,re,Ge,oe,le,ue,pe,ge){let he=0,ve=0,be=0,Ee=0,De=0,ye=0,Te=0,ke=0;if(deDe)return!1;if(reTe)return!1;let we=le-de+pe-Ge,Le=ue-re+ge-oe,Ce=Ge-de,xe=oe-re,Re=pe-le,Ue=ge-ue,He=ee(xe*Re-Ue*Ce);if(ee(Re*Le-Ue*we)>He)return!1;return ee(Ce*Le-xe*we)<=He},ǃG.ǃcgJ=function(de,re,Ge,oe,le,ue,pe,ge,he,ve,be,Ee){let De=0,ye=0,Te=0,ke=0;if(heDe)return!1;if(veTe)return!1;let we=he-de+be-Ge,Le=ve-re+Ee-oe,Ce=Ge-de,xe=oe-re,Re=be-he,Ue=Ee-ve,He=ee(xe*Re-Ue*Ce);if(ee(Re*Le-Ue*we)>He)return!1;return ee(Ce*Le-xe*we)<=He},ǃG.ǃcgZ=function(de,re,Ge,oe,le){let ue=0,pe=0,ge=0,he=0;return dede&&(de+=1),1de.length)return!1;let re=parseInt(de[0].trim(),10)/255,Ge=parseInt(de[1].trim(),10)/255,oe=parseInt(de[2].trim(),10)/255;return isFinite(re)&&(this.ǃcgs[0]=re),isFinite(Ge)&&(this.ǃcgs[1]=Ge),isFinite(oe)&&(this.ǃcgs[2]=oe),this.ǃAR(),!0}ǃcNA(ae){if(typeof ae!==_111)return!1;ae=ae.replace(/^rgb\(|\)|%/,"");let de=ae.split(",");if(3>de.length)return!1;let re=parseInt(de[0].trim(),10)/100,Ge=parseInt(de[1].trim(),10)/100,oe=parseInt(de[2].trim(),10)/100;return isFinite(re)&&(this.ǃcgs[0]=re),isFinite(Ge)&&(this.ǃcgs[1]=Ge),isFinite(oe)&&(this.ǃcgs[2]=oe),this.ǃAR(),!0}ǃcNL(ae){if(typeof ae!==_111)return!1;ae=ae.replace(/^rgba\(|\)|%/,"");let de=ae.split(",");if(4>de.length)return!1;let re=parseInt(de[0].trim(),10)/255,Ge=parseInt(de[1].trim(),10)/255,oe=parseInt(de[2].trim(),10)/255,le=parseFloat(de[3].trim());return isFinite(re)&&(this.ǃcgs[0]=re),isFinite(Ge)&&(this.ǃcgs[1]=Ge),isFinite(oe)&&(this.ǃcgs[2]=oe),isFinite(le)&&(this.ǃcgs[3]=le),this.ǃAR(),!0}ǃcN_(ae){if(typeof ae!==_111)return!1;ae=ae.replace(/^rgba\(|\)|%/,"");let de=ae.split(",");if(4>de.length)return!1;let re=parseInt(de[0].trim(),10)/100,Ge=parseInt(de[1].trim(),10)/100,oe=parseInt(de[2].trim(),10)/100,le=parseFloat(de[3].trim());return isFinite(re)&&(this.ǃcgs[0]=re),isFinite(Ge)&&(this.ǃcgs[1]=Ge),isFinite(oe)&&(this.ǃcgs[2]=oe),isFinite(le)&&(this.ǃcgs[3]=le),this.ǃAR(),!0}ǃcNt(ae){if(typeof ae!==_111)return!1;if(ae=ae.replace(/\s+/,""),ae.includes(",")){if(ae.match(/^rgb\(/))return ae.includes("%")?this.ǃcNA(ae):this.ǃcNV(ae);if(ae.match(/^rgba\(/))return ae.includes("%")?this.ǃcN_(ae):this.ǃcNL(ae);if(ae.match(/^hsl|hsla\(/))return this.ǃcNP(ae);let de=ae.split(",");return ae.includes("%")?3===de.length?this.ǃcNA(ae):4===de.length&&this.ǃcN_(ae):3===de.length?this.ǃcNV(ae):4===de.length&&this.ǃcNL(ae)}return this.ǃcPg(ae)}toJSON(){return[this.r,this.ǃcNj,this.b,this.a]}ǃcNd(ae,de,re,Ge){let oe,le,ue;if(ǃG.ǃcqz(ae,0,360),ǃG.ǃcqz(de,0,100),ǃG.ǃcqz(re,0,100),ǃG.ǃcqz(Ge,0,1),ae/=360,de/=100,re/=100,0===de)oe=le=ue=re;else{const pe=0.5>re?re*(1+de):re+de-re*de,ge=2*re-pe;oe=te(ge,pe,ae+1/3),le=te(ge,pe,ae),ue=te(ge,pe,ae-1/3)}return this.ǃcgs[0]=ǃG.ǃAR(oe,0,1),this.ǃcgs[1]=ǃG.ǃAR(le,0,1),this.ǃcgs[2]=ǃG.ǃAR(ue,0,1),this.ǃcgs[3]=ǃG.ǃAR(Ge,0,1),this}ǃcNP(ae){const de=ae.replace(/ |hsl|hsla|\(|\)|;/gi,""),re=ne.exec(de),Ge=ie.exec(de);return re&&4===re.length?(this.ǃcNd(+re[1],+re[2],+re[3],1),!0):Ge&&5===Ge.length&&(this.ǃcNd(+re[1],+re[2],+re[3],+re[4]),!0)}ǃcNE(){const ae=this.ǃcgs[0],de=this.ǃcgs[1],re=this.ǃcgs[2],Ge=this.ǃcgs[3],oe=Math.max(ae,de,re),le=Math.min(ae,de,re);let ue,pe,ge=(oe+le)/2;if(oe==le)ue=pe=0;else{const he=oe-le;pe=0.5ae.length||(this.r=ae[0],this.ǃcNj=ae[1],this.b=ae[2],this.a=4<=ae.length?ae[3]:1)}set r(ae){this.ǃcgs[0]=ǃG.ǃAR(ae,0,1)}get r(){return this.ǃcgs[0]}set ǃcNj(ae){this.ǃcgs[1]=ǃG.ǃAR(ae,0,1)}get ǃcNj(){return this.ǃcgs[1]}set b(ae){this.ǃcgs[2]=ǃG.ǃAR(ae,0,1)}get b(){return this.ǃcgs[2]}set a(ae){this.ǃcgs[3]=ǃG.ǃAR(ae,0,1)}get a(){return this.ǃcgs[3]}},ǃG.ǃBc.ǃcNp=Object.freeze(ǃG.ǃX(ǃG.ǃBc,1,1,1,1)),ǃG.ǃBc.ǃcNf=Object.freeze(ǃG.ǃX(ǃG.ǃBc,0,0,0,1)),ǃG.ǃBc.ǃcNy=Object.freeze(ǃG.ǃX(ǃG.ǃBc,0,0,0,0))}"use strict",ǃG.Rect=class{constructor(te,ne,ie,me){this.ǃcNB=new Float64Array(4),te instanceof ǃG.Rect?this.ǃck(te):this.set(te||0,ne||0,ie||0,me||0)}set(te,ne,ie,me){let ae=this.ǃcNB;ae[0]=te,ae[1]=ne,ae[2]=ie,ae[3]=me}ǃck(te){this.ǃcNB.set(te.ǃcNB)}clone(){let te=this.ǃcNB;return new ǃG.Rect(te[0],te[1],te[2],te[3])}static ǃcNW(te,ne){ǃG.ǃg(te,ǃG.Rect),ǃG.ǃg(ne,ǃG.Rect);let ie=te.ǃcNB,me=ne.ǃcNB,ae=new ǃG.Rect;return ae.ǃuu(ie[0]me[2]?ie[2]:me[2]),ae.ǃuU(ie[3]>me[3]?ie[3]:me[3]),ae}static ǃcPp(te){return ǃG.ǃD_(te),new ǃG.Rect(te.left,te.top,te.right,te.bottom)}ǃ_c(te){let ne=this.ǃcNB,ie=te.ǃcNB;return ne[0]===ie[0]&&ne[1]===ie[1]&&ne[2]===ie[2]&&ne[3]===ie[3]}ǃuu(te){this.ǃcNB[0]=te}ǃcb(){return this.ǃcNB[0]}ǃuv(te){this.ǃcNB[1]=te}ǃcT(){return this.ǃcNB[1]}ǃuW(te){this.ǃcNB[2]=te}ǃ$q(){return this.ǃcNB[2]}ǃuU(te){this.ǃcNB[3]=te}ǃ$a(){return this.ǃcNB[3]}ǃOL(){return this.ǃcNB}width(){return this.ǃcNB[2]-this.ǃcNB[0]}height(){return this.ǃcNB[3]-this.ǃcNB[1]}ǃXW(){let te=this.ǃcNB;return te[0]+(te[2]-te[0])/2}ǃXu(){let te=this.ǃcNB;return te[1]+(te[3]-te[1])/2}offset(te,ne){let ie=this.ǃcNB;ie[0]+=te,ie[1]+=ne,ie[2]+=te,ie[3]+=ne}offsetLeft(te){this.ǃcNB[0]+=te}offsetTop(te){this.ǃcNB[1]+=te}ǃ$g(te){this.ǃcNB[2]+=te}ǃcNu(te){this.ǃcNB[3]+=te}ǃcNU(te){if(ǃG.ǃbv(te),"x"!==te&&"y"!==te)throw new Error("invalid axis. Use 'x' or 'y'");let ne=this.ǃcNB;if("x"===te)ne[3]=ne[1]ie&&(ae[2]=ie),ae[3]>me&&(ae[3]=me)}ǃfj(te,ne,ie,me){let ae=this.ǃcNB;ae[0]ne&&(ae[1]=ne),ae[2]>ie&&(ae[2]=ie),ae[3]te[2]&&this.ǃcNa(),te[1]>te[3]&&this.ǃfr()}ǃMw(te){let ne=this.ǃcNB,ie=te.ǃcNB;return!(ie[2]ne[2]||ie[1]>ne[3])}ǃcNN(te,ne,ie){let me=this.ǃcNB,ae=te.ǃcNB;return!(ae[2]+neme[2]||ae[1]+ie>me[3])}ǃBr(te,ne){let ie=this.ǃcNB;return te>=ie[0]&&te<=ie[2]&&ne>=ie[1]&&ne<=ie[3]}ǃeM(te){let ne=this.ǃcNB,ie=te.ǃcNB;return ie[0]>=ne[0]&&ie[1]>=ne[1]&&ie[2]<=ne[2]&&ie[3]<=ne[3]}ǃBh(te){let ne=this.ǃcNB,ie=te.ǃcNB;ie[0]ne[2]&&(ne[2]=ie[2]),ie[3]>ne[3]&&(ne[3]=ie[3])}ǃhU(te){let ne=this.ǃcNB,ie=te.ǃcNB;ne[0]=ǃG.ǃyJ(ie[0],ie[2],ne[0]),ne[1]=ǃG.ǃyJ(ie[1],ie[3],ne[1]),ne[2]=ǃG.ǃyJ(ie[0],ie[2],ne[2]),ne[3]=ǃG.ǃyJ(ie[1],ie[3],ne[3])}},"use strict";{function ee(ie,me,ae,de){iede?me:de):(te=ieae?me:ae):aede?ie:de):(te=meae?ie:ae)}let te=0,ne=0;ǃG.ǃK=class{constructor(me,ae,de,re,Ge,oe,le,ue){this.ǃcNB=new Float64Array(8),me instanceof ǃG.ǃK?this.ǃck(me):this.set(me||0,ae||0,de||0,re||0,Ge||0,oe||0,le||0,ue||0)}set(me,ae,de,re,Ge,oe,le,ue){let pe=this.ǃcNB;pe[0]=me,pe[1]=ae,pe[2]=de,pe[3]=re,pe[4]=Ge,pe[5]=oe,pe[6]=le,pe[7]=ue}ǃtD(me,ae,de,re){this.set(me,ae,de,ae,de,re,me,re)}ǃck(me){this.ǃcNB.set(me.ǃcNB)}ǃ_c(me){let ae=this.ǃcNB,de=me.ǃcNB;return ae[0]===de[0]&&ae[1]===de[1]&&ae[2]===de[2]&&ae[3]===de[3]&&ae[4]===de[4]&&ae[5]===de[5]&&ae[6]===de[6]&&ae[7]===de[7]}ǃcNK(me){this.ǃcNB[0]=me}ǃXt(){return this.ǃcNB[0]}ǃcNn(me){this.ǃcNB[1]=me}ǃXP(){return this.ǃcNB[1]}ǃcNM(me){this.ǃcNB[2]=me}ǃXE(){return this.ǃcNB[2]}ǃcNC(me){this.ǃcNB[3]=me}ǃXe(){return this.ǃcNB[3]}ǃcNh(me){this.ǃcNB[4]=me}ǃXj(){return this.ǃcNB[4]}ǃcNY(me){this.ǃcNB[5]=me}ǃXd(){return this.ǃcNB[5]}ǃcNz(me){this.ǃcNB[6]=me}ǃXp(){return this.ǃcNB[6]}ǃcNF(me){this.ǃcNB[7]=me}ǃXf(){return this.ǃcNB[7]}ǃOL(){return this.ǃcNB}offset(me,ae){let de=this.ǃcNB;de[0]+=me,de[1]+=ae,de[2]+=me,de[3]+=ae,de[4]+=me,de[5]+=ae,de[6]+=me,de[7]+=ae}round(){let me=this.ǃcNB;me[0]=Math.round(me[0]),me[1]=Math.round(me[1]),me[2]=Math.round(me[2]),me[3]=Math.round(me[3]),me[4]=Math.round(me[4]),me[5]=Math.round(me[5]),me[6]=Math.round(me[6]),me[7]=Math.round(me[7])}floor(){let me=this.ǃcNB;me[0]=Math.floor(me[0]),me[1]=Math.floor(me[1]),me[2]=Math.floor(me[2]),me[3]=Math.floor(me[3]),me[4]=Math.floor(me[4]),me[5]=Math.floor(me[5]),me[6]=Math.floor(me[6]),me[7]=Math.floor(me[7])}ceil(){let me=this.ǃcNB;me[0]=Math.ceil(me[0]),me[1]=Math.ceil(me[1]),me[2]=Math.ceil(me[2]),me[3]=Math.ceil(me[3]),me[4]=Math.ceil(me[4]),me[5]=Math.ceil(me[5]),me[6]=Math.ceil(me[6]),me[7]=Math.ceil(me[7])}ǃcX(me){let ae=this.ǃcNB,de=me.ǃcNB;ae[0]=de[0],ae[1]=de[1],ae[2]=de[2],ae[3]=de[1],ae[4]=de[2],ae[5]=de[3],ae[6]=de[0],ae[7]=de[3]}ǃun(me,ae){if(0===ae)this.ǃcX(me);else{let de=Math.sin(ae),re=Math.cos(ae);this.ǃhS(me,de,re)}}ǃhS(me,ae,de){let re=this.ǃcNB,Ge=me.ǃcNB,oe=Ge[0]*ae,le=Ge[1]*ae,ue=Ge[2]*ae,pe=Ge[3]*ae,ge=Ge[0]*de,he=Ge[1]*de,ve=Ge[2]*de,be=Ge[3]*de;re[0]=ge-le,re[1]=he+oe,re[2]=ve-le,re[3]=he+ue,re[4]=ve-pe,re[5]=be+ue,re[6]=ge-pe,re[7]=be+oe}ǃcNl(me){let ae=this.ǃcNB,de=me.ǃOL();ee(ae[0],ae[2],ae[4],ae[6]),de[0]=te,de[2]=ne,ee(ae[1],ae[3],ae[5],ae[7]),de[1]=te,de[3]=ne}ǃBr(me,ae){let de=this.ǃcNB,re=de[2]-de[0],Ge=de[3]-de[1],oe=de[4]-de[0],le=de[5]-de[1],ue=me-de[0],pe=ae-de[1],ge=re*re+Ge*Ge,he=re*oe+Ge*le,ve=re*ue+Ge*pe,be=oe*oe+le*le,Ee=oe*ue+le*pe,De=1/(ge*be-he*he),ye=(be*ve-he*Ee)*De,Te=(ge*Ee-he*ve)*De;return 0<=ye&&0ye+Te||(re=de[6]-de[0],Ge=de[7]-de[1],ge=re*re+Ge*Ge,he=re*oe+Ge*le,ve=re*ue+Ge*pe,De=1/(ge*be-he*he),ye=(be*ve-he*Ee)*De,Te=(ge*Ee-he*ve)*De,0<=ye&&0ye+Te)}ǃXW(){let me=this.ǃcNB;return(me[0]+me[2]+me[4]+me[6])/4}ǃXu(){let me=this.ǃcNB;return(me[1]+me[3]+me[5]+me[7])/4}ǃcNw(me,ae,de,re){return this.ǃBr(me,ae)||this.ǃBr(de,re)||ǃG.ǃcgZ(me,ae,de,re,this.ǃcNB)}ǃcNo(me){let ae=me.ǃXW(),de=me.ǃXu();if(this.ǃBr(ae,de))return!0;if(ae=this.ǃXW(),de=this.ǃXu(),me.ǃBr(ae,de))return!0;let re=this.ǃcNB,Ge=me.ǃcNB;return ǃG.ǃcgZ(re[0],re[1],re[2],re[3],Ge)||ǃG.ǃcgZ(re[2],re[3],re[4],re[5],Ge)||ǃG.ǃcgZ(re[4],re[5],re[6],re[7],Ge)||ǃG.ǃcgZ(re[6],re[7],re[0],re[1],Ge)}ǃgL(){this.ǃcNH(0,2),this.ǃcNH(1,3),this.ǃcNH(6,4),this.ǃcNH(7,5)}ǃg_(){this.ǃcNH(0,6),this.ǃcNH(1,7),this.ǃcNH(2,4),this.ǃcNH(3,5)}ǃJf(){this.ǃcNH(2,6),this.ǃcNH(3,7)}ǃcNH(me,ae){let de=this.ǃcNB[me];this.ǃcNB[me]=this.ǃcNB[ae],this.ǃcNB[ae]=de}}}{const ne="loaded",ae=localforage.ǃcmr({name:"PersistantMap"});ǃG.ǃcNI=class extends Map{constructor(re){super(),this.state="loading",this.ǃcNx=re,this.ǃcNJ=[],this.ǃcNZ=ǃG.ǃX(ǃG.ǃGe,()=>this.ǃcNS(re),500),this.ǃcNs=this.ǃcNO(re)}ǃcNQ(){if(!this.ǃcKc())throw new Error("PersistantMap not ready for access")}ǃcKG(){if(0this.ǃcKG())}ǃcNO(re){return ae.getItem(re).then(Ge=>{Ge=Ge||[];for(let oe of Ge)super.set(oe[0],oe[1]);return this.state=ne,this},Ge=>{throw this.state="failed",`Failed to load PersistantMap with id "${re}" Error => "${Ge}"`})}release(){this.clear(),this.ǃcNZ.ǃz()}ǃcKm(re,...Ge){if(!re||!re in this||"async"===re||"onReady"===re||"force"===re)throw new Error(`Cannot execute invalid method "${re}" asychronously`);return this.ǃcNs.then(()=>new Promise(oe=>{let le=this[re](...Ge);this.ǃcNJ.push(()=>oe(le)),this.ǃcNS(this.ǃcNx)}))}async(re,...Ge){if(!re||!re in this||"async"===re||"onReady"===re||"force"===re)throw new Error(`Cannot execute invalid method "${re}" asychronously`);return this.ǃcNs.then(()=>new Promise(oe=>{let le=this[re](...Ge);this.ǃcNJ.push(()=>oe(le))}))}ǃcKD(re){return re?this.ǃcNs.then(re):this.ǃcNs}ǃcKc(){return this.state===ne}set(re,Ge){return ǃG.ǃbv(re),this.ǃcNQ(),this.ǃcNZ.ǃGI(),super.set(re,Ge)}get(re){return this.ǃcNQ(),super.get(re)}has(re){return this.ǃcNQ(),super.has(re)}clear(){return this.ǃcNQ(),this.ǃcNZ.ǃGI(),super.clear()}delete(re){return this.ǃcNQ(),this.ǃcNZ.ǃGI(),super.delete(re)}entries(){return this.ǃcNQ(),super.entries()}forEach(re,Ge){return this.ǃcNQ(),super.forEach(re,Ge)}keys(){return this.ǃcNQ(),super.keys()}values(){return this.ǃcNQ(),super.values()}[Symbol.iterator](){return this.ǃcNQ(),super[Symbol.iterator]()}}}{const ee="00";ǃG.Crypto={},ǃG.Crypto.ǃcKR=function(ne){let ie="",me=new DataView(ne);for(let ae=0;ae{Ge&&(Ge(re.value),Ge=null);try{re.value=null}catch(pe){}},re.oncancel=()=>{Ge&&(Ge(null),Ge=null)},document.body.appendChild(re),oe=document.createElement("input"),oe.style.display="none",oe.setAttribute("type","file"),oe.setAttribute("nwsaveas",""),oe.onchange=()=>{le&&(le(oe.value),le=null);try{oe.value=null}catch(pe){}},oe.oncancel=()=>{le&&(le(null),le=null)},document.body.appendChild(oe)),ǃG.ǃpe.ǃcKk=function(ue,pe){return new Promise((ge,he)=>{de.ǃcKX(ue,pe,ve=>{ve?he(ve):ge()})})},ǃG.ǃpe.ǃcK$=function(){if(!te)throw new Error(_114);return new Promise(pe=>{Ge=pe,re.click()})},ǃG.ǃpe.ǃcKr=function(pe){if(ǃG.ǃoG(pe),!te)throw new Error(_114);return oe.setAttribute("accept",pe||""),new Promise(ge=>{le=ge,oe.click()})},ǃG.ǃpe.ǃcKV=function(pe,ge="text",he=!1){if(ǃG.ǃbv(ge),he=!!he,!te)throw new Error(_114);if(!ee.includes(ge))throw new Error(_115);ae.set(pe,ge,he)},ǃG.ǃpe.ǃcKA=function(pe="text",ge=!1){if(ǃG.ǃbv(pe),ge=!!ge,!te)throw new Error(_114);if(!ee.includes(pe))throw new Error(_115);return ae.get(pe,ge)},ǃG.ǃpe.ǃpE=function(){if(!te)throw new Error(_114);return ae.get("text")},ǃG.ǃpe.ǃcKL=function(){if(!te)throw new Error(_114);return me.homedir()},ǃG.ǃpe.ǃcK_=function(...pe){if(!te)throw new Error(_114);return ie.join(...pe)},ǃG.ǃpe.ǃcKt=function(pe){if(ǃG.ǃbv(pe),!te)throw new Error(_114);return new Promise((ge,he)=>{ne.stat(pe,(ve,be)=>{ve?"ENOENT"===ve.code?ge(!1):he(ve):ge(be.isFile())})})},ǃG.ǃpe.ǃcKP=function(pe){if(ǃG.ǃbv(pe),!te)throw new Error(_114);try{return ne.statSync(pe).isDirectory()}catch(ge){if("ENOENT"===ge.code)return!1;throw ge}},ǃG.ǃpe.ǃcKj=function(pe){if(ǃG.ǃbv(pe),!te)throw new Error(_114);if(!ǃG.ǃpe.ǃcKP(pe))try{ne.mkdirSync(pe)}catch(ge){ǃG.ǃpe.ǃcKj(ie.dirname(pe)),ne.mkdirSync(pe)}},ǃG.ǃpe.ǃcKd=function(pe,ge){if(ǃG.ǃbv(pe),!te)throw new Error(_114);if("string"==typeof ge)return ǃG.ǃpe.ǃcKE(pe,ge);if(ge instanceof Blob)return ǃG.ǃpe.ǃcKe(pe,ge);throw new TypeError("expected string or blob")},ǃG.ǃpe.ǃcKE=function(pe,ge){if(ǃG.ǃbv(pe),ǃG.ǃbv(ge),!te)throw new Error(_114);return new Promise((he,ve)=>{ne.writeFile(pe,ge,"utf8",be=>{be?ve(be):he()})})},ǃG.ǃpe.ǃcKe=function(pe,ge){if(ǃG.ǃbv(pe),ǃG.ǃg(ge,Blob),!te)throw new Error(_114);return ǃG.ǃcbt(ge).then(he=>{return new Promise((ve,be)=>{ne.writeFile(pe,ǃcKp.from(new Uint8Array(he)),{encoding:null},Ee=>{Ee?be(Ee):ve()})})})},ǃG.ǃpe.ǃcKf=function(pe,ge,he){return ǃG.ǃbv(pe),ǃG.ǃbv(ge),ǃG.ǃpe.ǃcKd(ge,he).then(()=>ǃG.ǃpe.ǃcKy(pe)).then(()=>ǃG.ǃpe.ǃcKB(ge,pe))},ǃG.ǃpe.ǃcKW=function(pe,ge,he){if(ǃG.ǃbv(pe),ǃG.ǃg(ge,Map),ǃG.ǃcVD(he),!te)throw new Error(_114);let ve=new Set;for(let Ee of ge.keys())ve.add(ie.dirname(ie.join(pe,Ee)));for(let Ee of ve)ǃG.ǃpe.ǃcKj(Ee);let be=[];for(let[Ee,De]of ge)be.push(ǃG.ǃpe.ǃcKd(ie.join(pe,Ee),De));return he?ǃG.ǃcan(be,he):Promise.all(be)},ǃG.ǃpe.ǃcKu=function(pe,ge){if(ǃG.ǃbv(pe),!te)throw new Error(_114);return new Promise((he,ve)=>{ne.readFile(pe,ge,(be,Ee)=>{be?ve(be):he(Ee)})})},ǃG.ǃpe.ǃcKy=function(pe){if(ǃG.ǃbv(pe),!te)throw new Error(_114);return new Promise((ge,he)=>{ne.unlink(pe,ve=>{ve?"ENOENT"===ve.code?ge():he(ve):ge()})})},ǃG.ǃpe.ǃcKU=function(pe,ge){if(ǃG.ǃbv(pe),ǃG.ǃbv(ge),!te)throw new Error(_114);return new Promise(he=>{let be=ne.createReadStream(pe),Ee=ne.createWriteStream(ge);be.on("error",function(De){he(De)}),Ee.on("error",function(De){he(De)}),Ee.on("finish",function(){he()}),be.pipe(Ee)})},ǃG.ǃpe.ǃcKB=function(pe,ge){if(ǃG.ǃbv(pe),ǃG.ǃbv(ge),!te)throw new Error(_114);return new Promise((he,ve)=>{ne.rename(pe,ge,be=>{be?ve(be):he()})})},ǃG.ǃpe.ǃIc=function(){if(!te)throw new Error(_114);return ǃciQ.Window.get()}}{function ee(ve,be){let Ee=ve.data,De=be.data;if(Ee.length!==De.length)return!1;let ye=new Uint32Array(Ee.buffer),Te=new Uint32Array(De.buffer);for(let ke=0,we=ye.length;ke{let be=ǃG.ǃcKv.ǃcKa,Ee=be.fontCandidateList,De=new Set(be.fontAlwaysShowList),ye=[];pe=document.createElement("canvas"),pe.width=Ge,pe.height=oe,ge=pe.getContext("2d"),ge.textBaseline="top",ge.fillStyle="black",he=te("unknownFontName948958658");for(let Te of Ee){if(De.has(Te)){de.push(Te);continue}ye.push(ǃG.ǃckO(()=>{ne(Te)&&de.push(Te)}))}return Promise.all(ye)}).then(()=>{return ae=!0,pe.width=32,pe.height=32,pe=null,ge=null,he=null,re=null,de.sort(),de}).catch(be=>{throw re=null,be}),re)}}}{const _117="Times New Roman";ǃG.ǃcKv.ǃcKa={fontCandidateList:["Algerian","Andale Mono","Arial","Avant Garde","Baskerville","Big Caslon","Bitstream Vera","Bodoni MT","Book Antiqua","Bookman","Bookman Old Style","Bradley Hand ITC TT","Broadway","Brush Script MT","Calibri","Calisto MT","Candara","Cambria","Cardo","Carrois Gothic SC","Caslon Roman","Century Gothic","Century Schoolbook","Comic Sans MS","Consolas","Copperplate","Copperplate Gothic","Courier New","Cutive Mono","Dancing Script","Diavlo","Didot","Droid","Droid Sans","Droid Sans Mono","Droid Serif","Franklin Gothic","Futura","Garamond","Geneva","Gentium","Georgia","Ghostscript","Gill Sans","Goudy","Goudy Old Style","Haettenschweiler","Helvetica","Hoefler Text","Impact","ITC Stone Serif","Junicode","Latin Modern","Lucida Bright","Lucida Calligraphy","Lucida Console","Lucida Grande","Lucida Sans","Lucida Sans Typewriter","Lucida Sans Unicode","Mistral","Moire","Monaco","MS Mincho","MS Sans Serif","New Athena Unicode","New York","Noto","Noto Sans","Noto Serif","Old Standard TT","Onyx","Optima","Oxygen","Palatino","Palatino Linotype","Papyrus","Perpetua","Perpetua Titling MT","Playbill","Roboto","Rockwell","San Francisco","Segoe UI","Snap ITC","Source Sans Pro","Source Code Pro","Stencil","Symbol","Symbola","Tahoma","Times",_117,"Trebuchet MS","Tw Cen MT","UniFraktur","Verdana","Webdings","Wide Latin","Wingdings"],fontAlwaysShowList:["Arial",_117]}}{function ee(ge){return me.get(ge)}const te=new Set([..."0123456789"]);ǃG.ǃcKg=function(he){return ǃG.ǃbv(he),te.has(he)};const ne=new Set([..." \t\n\r\xA0\x85\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u200B\u2028\u2029\u202F\u205F\u3000"]);ǃG.ǃcKN=function(he){return ǃG.ǃbv(he),ne.has(he)},ǃG.ǃcKK=function(he){return[...he].filter(ve=>!ǃG.ǃcKN(ve)).join("")},ǃG.ǃcKn=function(he){return[...he].every(ve=>ǃG.ǃcKN(ve))},ǃG.ǃcKM=function(he){return ǃG.ǃbv(he),1===he.length&&32>he.charCodeAt(0)},ǃG.ǃcKC=function(he){return[...he].filter(ve=>!ǃG.ǃcKM(ve)).join("")};const ie=new Set([..."0123456789.+-e"]);ǃG.ǃcKh=function(he){if(ǃG.ǃbv(he),he=he.trim(),!he.length)return!1;let ve=he.charAt(0);if("-"!==ve&&!te.has(ve))return!1;for(let be of he)if(!ie.has(be))return!1;return!0},ǃG.ǃpP=function(he){ǃG.ǃbv(he);let ve=he.length;for(;0",">"],["\"","""],["'","'"]]);const ae=/[&<>"']/g;ǃG.ǃcKz=function(he){return ǃG.ǃcDf(he),he.replace(ae,ee)},ǃG.ǃcKF=function(he){let ve=ǃG.ǃcKl(he,"\\","\\\\");return ve=ǃG.ǃcKl(ve,"\"","\\\""),ve=ǃG.ǃcKl(ve,"\t","\\t"),ve=ǃG.ǃcKl(ve,"\r",""),ǃG.ǃcKl(ve,"\n","\\n")},ǃG.ǃcbh=function(he){let ve=ǃG.ǃcKl(he,"<","<");return ve=ǃG.ǃcKl(ve,">",">"),ve=ǃG.ǃcKl(ve,"\"","""),ǃG.ǃcKl(ve,"&","&")};const de=/[-[\]{}()*+?.,\\^$|#\s]/g;ǃG.ǃcKw=function(he){return ǃG.ǃcDf(he),he.replace(de,"\\$&")},ǃG.ǃcKo=function(he,ve,be=!1){if(ǃG.ǃbv(he),ǃG.ǃbv(ve),!ve)return[];be||(he=he.toLowerCase(),ve=ve.toLowerCase());const Ee=ve.length;let De=0,ye=0,Te=[];for(;-1<(ye=he.indexOf(ve,De));)Te.push(ye),De=ye+Ee;return Te},ǃG.ǃcKl=function(he,ve,be){return ǃG.ǃbv(he),ǃG.ǃbv(ve),ǃG.ǃbv(be),he.replace(new RegExp(ǃG.ǃcKw(ve),"g"),be)},ǃG.ǃcif=function(he,ve,be){return ǃG.ǃbv(he),ǃG.ǃbv(ve),ǃG.ǃbv(be),he.replace(new RegExp(ǃG.ǃcKw(ve),"gi"),be)};let re=new WeakMap;ǃG.ǃcmS=function(he,ve,be){ǃG.ǃc$i(he),ǃG.ǃcDf(ve);let Ee=re.get(he);if("string"==typeof ve){if(!be&&ve===Ee)return;he.textContent=ve,re.set(he,ve)}else{if(!be&&ve.ǃ_c(Ee))return;if(ve.ǃcKH()){let De=ve.toString();he.textContent=De,re.set(he,De)}else he.innerHTML=ve.ǃcPl(),re.set(he,ve.toString())}},ǃG.ǃcKI=function(he,ve){return he instanceof ǃG.ǃca$||he instanceof ǃG.ǃmZ?he.ǃ_c(ve):ve instanceof ǃG.ǃca$||ve instanceof ǃG.ǃmZ?ve.ǃ_c(he):he===ve},ǃG.ǃcKx=function(he,...ve){ǃG.ǃbv(he);let be=he;for(let Ee=0,De=ve.length,ye;EeEe?1:beEe?Math.round(10*Ee)/10:Math.round(Ee),ǃmo(be+"kilobytes",Ee)}if(heEe?Math.round(10*Ee)/10:Math.round(Ee),ǃmo(be+"megabytes",Ee)}if(heEe?Math.round(10*Ee)/10:Math.round(Ee),ǃmo(be+"gigabytes",Ee)}let Ee=he/ue;return Ee=10>Ee?Math.round(10*Ee)/10:Math.round(Ee),ǃmo(be+"terabytes",Ee)};const pe={ǃcKs:!1,ǃcKO:!0,ǃcKQ:!0,ǃcnc:!0,ǃcnG:!0};ǃG.ǃcnm=function(he,ve){ve=Object.assign({},pe,ve),ǃG.ǃi.ǃT("common.time");const be=[];if(ve.ǃcKO){const De=Math.floor(he/86400);0ge?"-":"";ge=Math.abs(ge);let be=ge.toString(),Ee=he-be.length;for(let De=0;Deve.toUpperCase())},ǃG.ǃcbx=function(he,ve){let be=he.split(".").map(De=>De.trim()),Ee=ve.split(".").map(De=>De.trim());ǃG.ǃcaB(be,4,"0"),ǃG.ǃcaB(Ee,4,"0"),be=be.map(De=>parseInt(De,10)),Ee=Ee.map(De=>parseInt(De,10));for(let De=0;4>De;++De){const ye=be[De]-Ee[De];if(0!=ye)return 0>ye?-1:1}return 0}}"use strict",ǃG.ǃca$=class{constructor(te){ǃG.ǃbv(te),this.ǃcni=te,this.ǃcnR=!this.ǃcni.includes("<")&&!this.ǃcni.includes("&")}toString(){return this.ǃcni}valueOf(){return this.ǃcni}ǃcKH(){return this.ǃcnR}ǃcPl(){return this.ǃcni}ǃ_c(te){return te instanceof ǃG.ǃca$?this.ǃcni===te.ǃcni:te instanceof ǃG.ǃmZ?this.ǃcni===te.ǃcPl():this.ǃcni===te}},"use strict";{function ee(ae,de,re){let Ge=te.get(re);if(Ge){if("string"==typeof Ge){if("a"===Ge&&!de){let oe=parseInt(re.substring(1),10)-1;if(0>oe||oe>=ie.length||"string"!=typeof ie[oe])throw new Error("invalid bbcode link substitution");return``}return"<"+de+Ge+">"}if(Array.isArray(Ge)){assert(2===Ge.length,_120);let oe=Ge[0],le=Ge[1];return de?""+oe+">":`<${oe} class="${le}">`}assert(!1,_120)}else return ae}const _119="span",_120="invalid bbcode entry",te=new Map([["b","strong"],["i","em"],["s","s"],["u","u"],["sub","sub"],["sup","sup"],["small","small"],["mark","mark"],["a1","a"],["a2","a"],["a3","a"],["a4","a"],["a5","a"],["a6","a"],["a7","a"],["a8","a"],["a9","a"],["bad",[_119,"bbCodeBad"]],["good",[_119,"bbCodeGood"]],["info",[_119,"bbCodeInfo"]],["h1",[_119,"bbCodeH1"]],["h2",[_119,"bbCodeH2"]],["h3",[_119,"bbCodeH3"]],["h4",[_119,"bbCodeH4"]],["item",[_119,"bbCodeItem"]]]),ne=/\[(\/?)([a-zA-Z0-9]+)\]/g;let ie=null;const me=/\n/g;ǃG.ǃmZ=class{constructor(de,re){if(ǃG.ǃbv(de),ǃG.ǃcDt(re),this.ǃcnb=re&&re.ǃcnT?de:ǃG.ǃcKz(de),this.ǃcnk="",this.ǃcnX=!1,this.ǃcn$=[],re&&(this.ǃcnX=!!re.ǃcms,re.links)){if(ǃG.ǃkF(re.links),9")),this.ǃcnk=de}return this.ǃcnk}ǃ_c(de){return de instanceof ǃG.ǃca$?this.ǃcPl()===de.ǃcPl():de instanceof ǃG.ǃmZ?this.ǃcnb===de.ǃcnb:this.ǃcnb===de}static ǃcnA(de){return ǃG.ǃX(ǃG.ǃmZ,de,{ǃcnT:!0}).ǃmS()}}}"use strict",ǃG.ǃcnL=Object.freeze({ǃcn_:"\xA0",ǃcnt:"\u200B",ǃcnP:"\xAD",ǃcnj:"\u2260",ǃcnd:"\u2264",ǃcnE:"\u2265",ǃcne:"\xB1",ǃcnp:"\xB7",ǃcnf:"\xD7",ǃcny:"\xF7",ǃcnB:"\u221A",ǃcnW:"\u221E",ǃcnu:"\u2248",PI:"\u03C0",ǃcnU:"\xB2",ǃcnv:"\xB3",ǃcnq:"\xBD",ǃcna:"\xBC",ǃcng:"\xBE",ǃcnN:"\u2153",ǃcnK:"\u2154",ǃcnn:"\xB0",ǃcnM:"\xA9",ǃcnC:"\u2122",ǃcnh:"\xA7",ǃcnY:"\u20AC",ǃcnz:"\u2022",ǃcnF:"\u2026"}),"use strict";{function ee(ne){return ne.length&&" "===ne.charAt(ne.length-1)?ne.substring(0,ne.length-1):ne}let te=[];ǃG.ǃhh=class{constructor(){this.ǃcnl=[]}ǃhJ(){return this.ǃcnl}ǃcnw(ie,me){return ie(ee(me))}ǃhh(ie,me,ae,de){if(ǃG.ǃbv(ie),ǃG.ǃXw(me),ǃG.ǃTH(ae),ǃG.ǃbv(de),ǃG.ǃGs(this.ǃcnl),ie&&ie.length&&!(2>ae)){if(100>=ie.length&&-1===ie.indexOf("\n")){let Ge=this.ǃcnw(me,ie);if(Ge<=ae)return void this.ǃcnl.push({text:ie,width:Ge})}let re;"word"===de?(this.ǃcno(ie),re=te):re=[...ie],this.ǃcnH(re,me,ae,de),ǃG.ǃGs(te)}}ǃcno(ie){let me="",ae=0;for(;ae=ae&&(0!==oe&&(le=ee(le),this.ǃcnl.push({text:le,width:this.ǃcnw(me,le)})),re=ie[oe]," "===re&&"character"===de?(re="",Ge=0):Ge=this.ǃcnw(me,re))}re.length&&(re=ee(re),this.ǃcnl.push({text:re,width:this.ǃcnw(me,re)}))}ǃmt(){ǃG.ǃGs(this.ǃcnl)}}}{const _122="synthetic-";let ee=null,te=null,ne="",ie=!1,me=[],ae=[],de=ǃG.ǃcvM();const re="[???]";ǃG.ǃi=class{constructor(){throw new TypeError("static class can't be instantiated")}static ǃMC(le){if(ǃG.ǃbv(le),ne=le,te=ǃG.ǃX(ǃG.ǃi.ǃcnI),de?te.ǃcnx("loader/precompiled-en-US.json",!0):te.ǃcnx(`lang/en-US.json`),"en-US"!=ne)if(ne.startsWith(_122)){let ue=ǃG.ǃi.ǃcnJ(ne);if(!ue)throw new Error(`invalid synthetic language '${ne}'`);ee=ǃG.ǃX(ǃG.ǃi.ǃcnZ,te,ue)}else ee=ǃG.ǃX(ǃG.ǃi.ǃcnI),de||ee.ǃcnx(`lang/${ne}.json`);ie=!0;for(let ue of me)ǃG.ǃi.ǃD(ue);return ǃG.ǃGs(me),ǃG.ǃi.ǃUO()}static ǃD(le,ue){if(ǃG.ǃbv(le),de){if(!ue)return;}else if(ue)throw new Error("do not specify the 'includeWhenPrecompiled' flag on AddPath when not using a pre-compiled language file");return ie?void(te.ǃcnx(`${le}/en-US.json`),"en-US"===ne||ne.startsWith(_122)||ee.ǃcnx(`${le}/${ne}.json`)):void me.push(le)}static ǃcnS(le){return ǃG.ǃbv(le),ie?void te.ǃcnx(le):void me.push(le)}static ǃUO(le){return"en-US"===ne||ne.startsWith(_122)?te.ǃUO(le):Promise.all([te.ǃUO(le),ee.ǃUO(le)]).then(()=>ǃG.ǃGD.ǃcns(ee.ǃcnO()))}static ǃDJ(le){if(ǃG.ǃbv(le),assert(te,"English language not initialised"),ee){let ue=ee.ǃcnQ(le);return ue===re?(ue=te.ǃcnQ(le),ue===re?ue:`[${ue}]`):ue}return te.ǃcnQ(le)}static ǃcMc(le){return ǃG.ǃbv(le),new ǃG.ǃmZ(ǃG.ǃi.ǃDJ(le))}static ǃcMG(le){return!!ǃG.ǃi.ǃDJ(le).match(/{\d+}|\{{1}.+\}{1}/g)}static ǃcMm(le,...ue){return ǃG.ǃbv(le),1===ue.length?ǃG.ǃc$M(ue[0])?ǃG.ǃcKJ(ǃG.ǃi.ǃDJ(le),ue[0]):ǃG.ǃcKx(ǃG.ǃi.ǃDJ(le),...ue):ǃG.ǃcKx(ǃG.ǃi.ǃDJ(le),...ue)}static ǃcMD(le,...ue){return ǃG.ǃbv(le),new ǃG.ǃmZ(ǃG.ǃcKx(ǃG.ǃi.ǃDJ(le),...ue))}static ǃvv(){let le=ae.length,ue=le-1;for(;0<=ue&&!("."!==ae[ue][0]);--ue);0>ue&&(ue=0);let pe="";for(;ueae.length,"language context stack reached 100 items - is this right?"),ǃG.ǃi.ǃcMi()}static ǃW(){assert(0{return ǃG.ǃcks(me).then(ae=>this.ǃcvF(ae,ne))})).then(()=>this)}ǃcvF(ne,ie){ǃG.ǃD_(ne);let me=ne.languageTag;if(!this.ǃcMA)this.ǃcMA=me;else if(this.ǃcMA!==me)throw new Error(`language file has wrong language tag (has '${me}', expected '${this.ǃcMA}')`);ne.main&&(this.ǃcMr=ne.englishName,this.ǃcMV=ne.nativeName,this.ǃcML=!!ne.rightToLeft,this.ǃcM$=!0),this.ǃcMt(ne.text,"",ie)}ǃcMt(ne,ie,me){ǃG.ǃD_(ne),ǃG.ǃbv(ie),ie&&(ie+=".");for(let[ae,de]of Object.entries(ne)){let re=ie+ae;if("object"==typeof de)this.ǃcMt(de,re,me);else if("string"==typeof de){if(!me&&this.ǃcM_.has(re))throw new Error(`key name '${re}' already exists in language string map`);this.ǃcM_.set(re,de)}}}ǃcMR(ne){ǃG.ǃbv(ne),this.ǃUL=ne}ǃcnQ(ne){if(ǃG.ǃbv(ne),!this.ǃcM$)throw new Error(_124);if(!ne)throw new Error("cannot lookup empty key");if(ne.startsWith(".")){if(!this.ǃUL)throw new Error("relative language string used with no context set");ne=this.ǃUL+ne}let ie=this.ǃcM_.get(ne);return"undefined"==typeof ie?(console.warn(`[LANG] Failed to find '${this.ǃcMA}' string ${ne}'`),ǃG.ǃi.ǃcMT):ie}ǃcnO(){if(!this.ǃcM$)throw new Error(_124);return this.ǃcML}ǃcMb(){let ne={};for(let[ie,me]of this.ǃcM_)ee(ne,ie,me);return ne}}}{function ee(ve){return ve===ǃG.ǃi.ǃcMT||ve.startsWith("http:")||ve.startsWith("https:")}function te(ve,be){if(!be)return ve;let Ee="",De=!1,ye=!1;for(let Te=0,ke=ve.length,we;Tete(Ee,be)}let le=new Set([" ","\n","\t","-",".",":",";","'","\"","(",")","+","=","[","]","{","}","!","?","|","\\","/","<",">","@","#","~","%","&","*"]);let ue="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",ge=new Map;for(let ve=0,be=ue.length;vete&&(this.ǃchi=!0)}ǃchR(oe){this.ǃchm=oe.clientX,this.ǃchD=oe.clientY;let le=Date.now(),ue=!1;if(!this.ǃchi&&le-this.ǃchGae(te)));for(let ie=0,me=this.ǃchU.length,ae;ieae(te)));return Promise.all(ne).then(()=>!te.defaultPrevented)}}}{let ee=[];ǃG.ǃEt=class{constructor(){throw new TypeError("static class")}static ǃP_(ne){let ie=ne.which;for(;ee.length<=ie;)ee.push(!1);ie===ǃG.ǃEj.ǃEP&&ee[ie]&&ne.preventDefault(),ee[ie]=!0}static ǃPP(ne){let ie=ne.which;0>ie||ie>=ee.length||(ee[ie]=!1)}static ǃchC(){for(let ne=0,ie=ee.length;nene||ne>=ee.length?!1:ee[ne]}},window.addEventListener("keydown",ǃG.ǃEt.ǃP_),window.addEventListener("keyup",ǃG.ǃEt.ǃPP),window.addEventListener("blur",ǃG.ǃEt.ǃchC)}{let ee=new Set;ǃG.ǃyy=class{constructor(){throw new TypeError("static class")}static ǃyf(ne){if(ǃG.ǃTH(ne),ee.has(ne))throw new Error("pointer already captured");ee.add(ne)}static ǃz(ne){if(ǃG.ǃTH(ne),!ee.has(ne))throw new Error("pointer not captured");ee.delete(ne)}static ǃchY(ne){return ǃG.ǃTH(ne),ee.has(ne)}}}{function ee(ue){Ge=de&&0===oe?requestIdleCallback(te,{timeout:ae}):setTimeout(te,ue)}function te(ue){if(Ge=-1,!!re.length){let pe=performance.now(),ge=pe,he=0,ve=0;do ne(re.shift()),ge=performance.now(),++he,ve=1.1*((ge-pe)/he);while(re.length&&(de&&0===oe&&"undefined"!=typeof ue?ve{return re.push({ǃchz:pe,resolve:he,reject:ve,stack:ge}),le?void ne(re.pop()):void(-1===Ge&&ee(me))})},ǃG.ǃckO.ǃcrm=function(pe){if(pe)++oe;else if(--oe,0>oe)throw new Error("already turned off high throughput mode")}}{function ee(){te&&(ne=!te.charging)}let te=null,ne=!1;navigator.getBattery&&navigator.getBattery().then(ie=>{te=ie,ee(),ie.addEventListener("chargingchange",ee)}),ǃG.ǃchF=class{constructor(){throw new Error("static class")}static ǃchl(){return ne}}}{const _135="already disposed";ǃG.ǃGh=class ee{constructor(te){ǃG.ǃcVD(te),this.ǃchw=!1,this.ǃcho=te}ǃGS(){this.ǃchw||(this.ǃchw=!0,this.ǃcho&&(this.ǃcho(),this.ǃcho=null))}ǃchH(){return this.ǃchw}static ǃz(te){return new ee(()=>te.ǃz())}static ǃGC(te,ne,ie,me,ae){if(ǃG.ǃLK(te,EventTarget,ǃG.Event.ǃpF),ǃG.ǃbv(ne),ǃG.ǃXw(ie),"undefined"==typeof me||null===me)me=!1;else if("boolean"!=typeof me&&"object"!=typeof me)throw new TypeError("invalid event listener options");if(ae&&(ie=ie.bind(ae)),ne.includes(" ")){ne=ne.split(" ");const de=new ǃG.ǃGM;for(let re of ne)te.addEventListener(re,ie,me),de.ǃrL(ǃG.ǃX(ǃG.ǃGh,()=>te.removeEventListener(re,ie,me)));return de}return te.addEventListener(ne,ie,me),ǃG.ǃX(ǃG.ǃGh,()=>te.removeEventListener(ne,ie,me))}},ǃG.ǃchI=class extends ǃG.ǃGh{ǃchx(te){ǃG.ǃXw(te),this.ǃcho=te}},ǃG.ǃGM=class extends ǃG.ǃGh{constructor(...te){super(),this.ǃGn=new Set;for(let ne of te)this.ǃrL(ne)}ǃrL(...te){if(ǃG.ǃkK(te,ǃG.ǃGh),this.ǃchw)throw new Error(_135);for(let ne of te)this.ǃGn.add(ne)}ǃj_(te){if(ǃG.ǃg(te,ǃG.ǃGh),this.ǃchw)throw new Error(_135);this.ǃGn.delete(te)}ǃGS(){if(this.ǃchw)throw new Error(_135);this.ǃchw=!0;for(let te of this.ǃGn)te.ǃGS();this.ǃGn.clear(),this.ǃGn=null}ǃz(){this.ǃGS()}}}{function ee(){me=-1}function te(){ae=-1,de=-1;let Ge=Date.now();for(let oe of re)if(oe.ǃchZ(Ge)){let le=oe.ǃchS();(-1===de||leoe+ne&&(window.clearTimeout(ae),de=this.ǃchO,ae=window.setTimeout(te,this.ǃMU+ie))}ǃchZ(oe){return!(oe>=this.ǃchO)||(this.ǃchs()?(this.ǃchO=oe+this.ǃMU,!0):(this.ǃCt=!1,!1))}ǃchS(){return this.ǃchO}ǃWm(){this.ǃCt&&(re.delete(this),this.ǃCt=!1,0===re.size&&-1!==ae&&(window.clearTimeout(ae),ae=-1,de=-1))}ǃz(){this.ǃWm(),this.ǃchs=null}}}{function ee(){me=-1;let ae=performance.now()-ie;for(let de of ne.values())de.ǃchQ++,de.ǃcYc.push(ae);0Ge&&(Ge=le);if(3<=de.ǃcYc.length){de.ǃcYc.pop(),de.ǃcYc.shift();for(let le of de.ǃcYc)le>oe&&(oe=le)}console.log(`[JankMeasurement] '${this.ǃcYm}' ended. Duration: ${Math.round(10*re)/10} ms, frame count: ${de.ǃchQ}, max dt: ${Math.round(10*Ge)/10}ms, max dt exclusive: ${Math.round(10*oe)/10}ms`)}}}{function ee(){return ǃG.ǃDP&&console.warn("using default mime type"),ae}function te(re,Ge,oe,le){let ue=new ǃG.MimeType(re,Ge,oe,le);de.set(re,ue)}const ne=1,ie=2,me=4;let ae=null,de=new Map;ǃG.MimeType=class{constructor(Ge,oe,le,ue){if(ǃG.ǃbv(Ge),ǃG.ǃoG(le),ǃG.ǃNv(ue),!Ge)throw new Error("invalid MIME type");if(this.ǃcYD=Ge,this.ǃcYi=Ge.split("/")[0],this.ǃcYR=[],this.ǃcYb=le||Ge,this.ǃcYT=!1,this.ǃcYk=!1,this.ǃcYX=!1,"string"==typeof oe)this.ǃcYR.push(oe);else if(Array.isArray(oe))this.ǃcYR=oe;else throw new TypeError("expected string or array");"number"==typeof ue&&(this.ǃcYT=!!(ue&ne),this.ǃcYk=!!(ue&ie),this.ǃcYX=!!(ue&me))}ǃT_(){return this.ǃcYD}ǃcY$(){return this.ǃcYi}ǃcYr(){return this.ǃcYR}ǃcYV(){return this.ǃcYb}ǃcYA(){return this.ǃcYT}ǃlO(){return this.ǃcYk||"text"===this.ǃcY$()}ǃls(){return this.ǃcYX}static ǃDJ(Ge){return ǃG.ǃbv(Ge),de.get(Ge)||ee()}static ǃcYL(Ge){ǃG.ǃg(Ge,Blob);const oe=Ge.name?ǃG.ǃFa(Ge.name).slice(1):"",le=Ge.type;if(!oe)return le?ǃG.MimeType.ǃDJ(le):ee();if(!le)return ǃG.MimeType.ǃcY_(oe);for(let ue of de.values())if(ue.ǃT_()===le)for(let pe of ue.ǃcYr())if(pe===oe)return ue;return ǃG.MimeType.ǃcY_(oe)}static ǃoR(Ge){return ǃG.MimeType.ǃcY_(Ge).ǃT_()}static ǃcY_(Ge,oe){ǃG.ǃbv(Ge),ǃG.ǃoG(oe),Ge.length&&"."===Ge[0]&&(Ge=Ge.substr(1)),Ge=Ge.toLowerCase();const le=[];for(const ue of de.values())for(const pe of ue.ǃcYr())pe===Ge&&le.push(ue);if(!le.length)return ee();if(1===le.length||!oe)return le[0];for(const ue of le)if(ue.ǃT_().toLowerCase().includes(oe.toLowerCase()))return ue;return le[0]}},ae=new ǃG.MimeType("application/octet-stream",[],"Binary");te("text/html",["html","htm"],"HTML"),te("application/javascript","js","Javascript",ie),te("text/css","css","CSS"),te("application/json",["json","scon"],"JSON",ie),te("text/xml",["xml","scml"],"XML"),te("text/csv","csv","CSV"),te("text/plain","txt","Text"),te("image/png","png","PNG",ne),te("image/jpeg",["jpg","jpeg"],"JPEG",ne),te("image/svg+xml","svg","SVG",ie),te("image/webp","webp","WebP",ne),te("image/gif","gif","GIF",ne),te("image/tiff",["tif","tiff"],"TIFF"),te("image/bmp","bmp","Bitmap"),te("image/x-icon","ico","Icon"),te("audio/ogg; codecs=opus","opus","Ogg Opus",ne),te("audio/ogg; codecs=vorbis","ogg","Ogg Vorbis",ne),te("audio/webm; codecs=opus","webm","WebM Opus",ne),te("audio/mp4","m4a","MPEG-4 AAC",ne),te("audio/wav","wav","WAV"),te("audio/flac","flac","FLAC",ne),te("audio/mpeg","mp3","MP3",ne),te("audio/midi",["mid","midi","kar"],"MIDI"),te("video/webm","webm","WebM",ne),te("video/ogg","ogv","Ogg video",ne),te("video/mp4","mp4","MPEG-4 video",ne),te("video/mpeg",["mpg","mpeg"],"MPEG video",ne),te("video/quicktime",["mov","qt"],"Quicktime movie",ne),te("video/avi","avi","AVI"),te("application/font-woff","woff","Web font",me|ne),te("font/woff2","woff2","Web font",me|ne),te("application/font-sfnt",["ttf","otf"],"TrueType/OpenType font",me),te("application/vnd.ms-fontobject","eot","Embedded OpenType",me),te("application/pdf","pdf","PDF"),te("application/zip",["zip","c3p"],"ZIP",ne),te("application/x-construct3-addon","c3addon","Construct 3 addon",ne)}"use strict",ǃG.ǃcYt=class{constructor(te=ǃG.hardwareConcurrency){ǃG.ǃEe(te),this.ǃcYP=te,this.ǃcYj=[],this.ǃcYd=0}ǃrL(te){return ǃG.ǃXw(te),new Promise((ne,ie)=>{this.ǃcYj.push({ǃchz:te,resolve:ne,reject:ie}),this.ǃcYE()})}ǃcYE(){if(this.ǃcYj.length&&!(this.ǃcYd>=this.ǃcYP)){this.ǃcYd++;let te=this.ǃcYj.shift();te.ǃchz().then(ne=>{te.resolve(ne),this.ǃcYd--,this.ǃcYE()}).catch(ne=>{te.reject(ne),this.ǃcYd--,this.ǃcYE()})}}},"use strict",ǃG.ǃGe=class{constructor(te,ne,ie){ǃG.ǃXw(te),ǃG.ǃTH(ne),ǃG.ǃNv(ie),this.ǃchs=te,this.ǃcYe=ne,this.ǃcYp=ie||2*ne,this.ǃcYf=-1,this.ǃcYy=-Infinity,this.ǃcYB=()=>this.ǃcYW(),this.ǃcYu=!1,this.ǃcYU=!1,this.ǃcYv=null}ǃGf(te){this.ǃcYU=!!te}ǃcYq(){return ǃG.ǃchF.ǃchl()?this.ǃcYp:this.ǃcYe}ǃGI(...te){if(-1===this.ǃcYf){this.ǃcYv=te;let ne=ǃG.ǃchJ(),ie=ne-this.ǃcYy,me=this.ǃcYq();ie>=me&&this.ǃcYU?(this.ǃcYy=ne,this.ǃcYa()):this.ǃcYf=window.setTimeout(this.ǃcYB,Math.max(me-ie,4))}}ǃcYa(){this.ǃcYu=!0,this.ǃchs(...this.ǃcYv),this.ǃcYu=!1}ǃt$(){this.ǃcYu||(this.ǃcYg(),this.ǃcYy=ǃG.ǃchJ())}ǃcYW(){this.ǃcYf=-1,this.ǃcYy=ǃG.ǃchJ(),this.ǃcYa()}ǃcYg(){-1!==this.ǃcYf&&(window.clearTimeout(this.ǃcYf),this.ǃcYf=-1)}ǃz(){this.ǃcYg(),this.ǃchs=null,this.ǃcYv=null,this.ǃcYB=null}},"use strict",ǃG.ǃKI={},ǃG.ǃKI.Document=class{constructor(){this.ǃcYN=null,this.ǃcYK=null}static ǃKH(te){ǃG.ǃbv(te);let ne=new ǃG.ǃKI.Document;return ne.ǃcYn(te)}static ǃcYM(te){return new Promise(ne=>{let me=new FileReader;me.onload=ae=>ǃG.ǃKI.Document.ǃKH(ae.target.result).then(ne),me.readAsText(te)})}ǃcYn(te,ne){return ǃG.ǃbv(te),ǃG.ǃoG(ne),ǃG.ǃckO(()=>{const ie=new DOMParser;return this.ǃcYN=ie.parseFromString(te,ne||"text/xml"),this.ǃcYK=new ǃG.ǃKI.Element(this.ǃcYN.documentElement,this.ǃcYN),this})}ǃmV(){return this.ǃcYN}ǃKx(){return this.ǃcYK}ǃKs(){return new Blob([this.ǃcYC(!0)],{type:"text/xml"})}ǃcYh(){return new XMLSerializer().serializeToString(this.ǃcYN)}ǃcYC(te){te=!!te;let ne="",ie=/(>)(<)(\/*)/g,me=0,ae=this.ǃcYh().replace(ie,"$1\r\n$2$3");for(let de of ae.split("\r\n")){let re=0;de.match(/.+<\/\w[^>]*>$/)?re=0:de.match(/^<\/\w/)?0!=me&&(me-=1):de.match(/^<\w[^>]*[^\/]>.*$/)?re=1:re=0;let Ge="";for(let oe=0;oe{zip.ǃcyc(new zip.ǃcfJ(ie),de=>{this.ǃczi=de,this.ǃczi.getEntries(re=>{for(let Ge=0,oe=re.length,le;Geae(de))})}ǃcz_(ie){return ǃG.ǃbv(ie),this.ǃczR.has(ee(ie))}ǃczt(ie){return ǃG.ǃbv(ie),this.ǃczR.get(ee(ie))}ǃczP(){return this.ǃczR.values()}ǃczj(ie){ǃG.ǃbv(ie);let me=ie.toLowerCase();for(let ae of this.ǃczR.values())if(ae.filename.toLowerCase().endsWith(me))return ae;return null}ǃczd(ie){ǃG.ǃD_(ie);let me=ie.ǃcfK;return new Promise(ae=>{let re={ǃczE:0};this.ǃczk.add(re),ie.getData(new zip.ǃcfQ,Ge=>{this.ǃczk.delete(re),this.ǃczT+=me,ae(Ge)},(Ge,oe)=>{re.ǃczE=Ge/oe*me})})}ǃcze(ie){ǃG.ǃD_(ie);let me=ie.ǃcfK;return new Promise(ae=>{let re={ǃczE:0};this.ǃczk.add(re),ie.getData(new zip.ǃcfQ,Ge=>{this.ǃczk.delete(re),this.ǃczT+=me,ae(ǃG.ǃc$Y(Ge))},(Ge,oe)=>{re.ǃczE=Ge/oe*me})})}ǃczp(ie,me){ǃG.ǃD_(ie),ǃG.ǃoG(me);let ae=me||ǃG.MimeType.ǃcY_(ǃG.ǃFa(ie.filename)).ǃT_(),de=ie.ǃcfK;return new Promise(re=>{let oe={ǃczE:0};this.ǃczk.add(oe),ie.getData(new zip.ǃcfs(ae),le=>{this.ǃczk.delete(oe),this.ǃczT+=de,re(le)},(le,ue)=>{oe.ǃczE=le/ue*de})})}ǃczf(){return this.ǃczb}ǃczy(){return this.ǃczT+this.ǃczB()}ǃczB(){let ie=0;for(let me of this.ǃczk)ie+=me.ǃczE;return ie}ǃczL(){this.ǃczi&&(this.ǃczi.close(),this.ǃczi=null)}ǃczW(ie,me){return ǃG.ǃmL(me,Map),this.ǃczX.length=0,this.ǃcz$=0,this.ǃczr=0,this.ǃczV=0,new Promise((ae,de)=>{zip.ǃcyG(new zip.ǃcfs("application/zip"),re=>{this.ǃczu(re,ie,me).then(()=>re.close(ae))},re=>de(re))})}ǃczu(ie,me,ae){for(let re of me){this.ǃczX.push(re);let Ge=re[1];if("string"==typeof Ge)this.ǃcz$+=Ge.length;else if(ǃG.ǃaJ(Ge,Blob))this.ǃcz$+=Ge.size;else throw new Error(_138)}return this.ǃczU(ie,ae)}ǃczU(ie,me){if(!this.ǃczX.length)return Promise.resolve(!0);let ae=this.ǃczX.pop(),de=ae[0],re=ae[1];return new Promise((Ge,oe)=>{let le,ue=5,pe=0;if("string"==typeof re)le=new zip.ǃcfS(re),pe=re.length;else if(ǃG.ǃaJ(re,Blob)){le=new zip.ǃcfJ(re),pe=re.size;let ge=re.type;ge||(ge=ǃG.MimeType.ǃcY_(ǃG.ǃFa(de)).ǃT_()),ǃG.MimeType.ǃDJ(ge).ǃcYA()&&(ue=0)}else return void oe(_138);this.ǃczV=0,ie.add(de,le,ge=>{this.ǃczr+=pe,this.ǃczV=0,me&&me.set(de,ge),Ge(this.ǃczU(ie,me))},(ge,he)=>{this.ǃczV=ge/he*pe},{level:ue})})}ǃczv(){return this.ǃcz$}ǃczq(){return this.ǃczr+this.ǃczV}}}{const _139="setInt8",_140="setInt32",_141="setUint8",_142="getUint8",_143="setInt16",_144="setUint32",_145="setUint16",_146="setFloat64",_147="setFloat32",_148="setArrayBuffer",_149="missing DataView",_150="data already commited";let ee=class{constructor(ne,ie,me,ae){if(ǃG.ǃbv(ne),ǃG.ǃTH(ie),!ǃG.ǃ_Y(me)&&!ǃG.ǃFZ(me,ArrayBuffer))throw new Error("unsupported data");this.ǃcza=ne,this.ǃczg=ie,this.ǃczN=me,this.ǃczK=!!ae}ǃczn(){return this.ǃcza}ǃczM(){return this.ǃczg}ǃczC(){return this.ǃczN}ǃczh(){return this.ǃczK}};ǃG.DataView=class{constructor(ne){ǃG.ǃmL(ne,ArrayBuffer),this.ǃczY=null,this.ǃczz=[],ne&&(this.ǃczY=new DataView(ne)),this.ǃczF=0,this.ǃczl=0}ǃKs(){return new Blob([this.ǃczw()])}ǃczo(){if(!this.ǃczY)throw new Error(_149);return this.ǃczY}ǃczw(){if(!this.ǃczY)throw new Error(_149);return this.ǃczY.buffer}ǃczH(){this.ǃczl=0}ǃz(){this.ǃczY=null,this.ǃczz=null}ǃczI(){if(this.ǃczY)throw new Error(_150);let ne=0;for(let ie of this.ǃczz)ne+=ie.ǃczM();this.ǃczY=new DataView(new ArrayBuffer(ne));for(let ie of this.ǃczz){switch(ie.ǃczn()){case _139:this.ǃczY.setInt8(this.ǃczF,ie.ǃczC());break;case _141:this.ǃczY.setUint8(this.ǃczF,ie.ǃczC());break;case _143:this.ǃczY.setInt16(this.ǃczF,ie.ǃczC(),ie.ǃczh());break;case _145:this.ǃczY.setUint16(this.ǃczF,ie.ǃczC(),ie.ǃczh());break;case _140:this.ǃczY.setInt32(this.ǃczF,ie.ǃczC(),ie.ǃczh());break;case _144:this.ǃczY.setUint32(this.ǃczF,ie.ǃczC(),ie.ǃczh());break;case _147:this.ǃczY.setFloat32(this.ǃczF,ie.ǃczC(),ie.ǃczh());break;case _146:this.ǃczY.setFloat64(this.ǃczF,ie.ǃczC(),ie.ǃczh());break;case _148:let me=new Uint8Array(this.ǃczY.buffer),ae=new Uint8Array(ie.ǃczC());me.set(ae,this.ǃczF),this.ǃczY=new DataView(me.buffer);}this.ǃczF+=ie.ǃczM()}this.ǃczz=null}ǃczx(ne){ǃG.ǃg(ne,ArrayBuffer),this.ǃczJ(ne.byteLength),this.ǃczz.push(new ee(_148,ne.byteLength,ne))}ǃczZ(ne){switch(ǃG.ǃbv(ne),ne){case"int8":return this.ǃczS();case"uint8":return this.ǃczs();case"clampedUint8":return this.ǃczO();case"int16":return this.ǃczQ();case"uint16":return this.ǃcFc();case"int32":return this.ǃcFG();case"uint32":return this.ǃcFm();case"float32":return this.ǃcFD();case"float64":return this.ǃcFi();case"raw":return this.ǃczs().buffer;default:throw new Error("unsupported return type. supported types are 'int8, uint8, clampedUint8, int16, uint16, int32, uint32, float32, float64, raw'");}}ǃczp(){let ne=this.ǃczZ("raw");return new Blob([ne])}ǃcFR(ne,ie){ǃG.ǃbv(ne);let me=Array.prototype.map.call(ne,(ae,de)=>{return ne.charCodeAt(de)});this.ǃcFb(me,ie)}ǃcFT(ne){return Array.prototype.map.call(this.ǃcFc(ne),ie=>{return String.fromCharCode(ie)}).join("")}ǃcFk(ne){this.ǃcFX(!ne?0:1)}ǃcF$(){return!!this.ǃcFr()}ǃcFV(ne){if(this.ǃczY)throw new Error(_150);this.ǃczz.push(new ee(_139,Int8Array.BYTES_PER_ELEMENT,ne))}ǃcFX(ne){if(this.ǃczY)throw new Error(_150);this.ǃczz.push(new ee(_141,Uint8Array.BYTES_PER_ELEMENT,ne))}ǃcFA(ne,ie){if(this.ǃczY)throw new Error(_150);this.ǃczz.push(new ee(_143,Int16Array.BYTES_PER_ELEMENT,ne,!!ie))}ǃcFL(ne,ie){if(this.ǃczY)throw new Error(_150);this.ǃczz.push(new ee(_145,Uint16Array.BYTES_PER_ELEMENT,ne,!!ie))}ǃcF_(ne,ie){if(this.ǃczY)throw new Error(_150);this.ǃczz.push(new ee(_140,Int32Array.BYTES_PER_ELEMENT,ne,!!ie))}ǃczJ(ne,ie){if(this.ǃczY)throw new Error(_150);this.ǃczz.push(new ee(_144,Uint32Array.BYTES_PER_ELEMENT,ne,!!ie))}ǃcFt(ne,ie){if(this.ǃczY)throw new Error(_150);this.ǃczz.push(new ee(_147,Float32Array.BYTES_PER_ELEMENT,ne,!!ie))}ǃcFP(ne,ie){if(this.ǃczY)throw new Error(_150);this.ǃczz.push(new ee(_146,Float64Array.BYTES_PER_ELEMENT,ne,!!ie))}ǃcFj(ne,ie){this.ǃczJ(ne.length,!!ie),this.ǃcFd(ne,_139)}ǃcFE(ne,ie){this.ǃczJ(ne.length,!!ie),this.ǃcFd(ne,_141)}ǃcFe(ne,ie){this.ǃczJ(ne.length,!!ie),this.ǃcFd(ne,_143,!!ie)}ǃcFb(ne,ie){this.ǃczJ(ne.length,!!ie),this.ǃcFd(ne,_145,!!ie)}ǃcFp(ne,ie){this.ǃczJ(ne.length,!!ie),this.ǃcFd(ne,_140,!!ie)}ǃcFf(ne,ie){this.ǃczJ(ne.length,!!ie),this.ǃcFd(ne,_144,!!ie)}ǃcFy(ne,ie){this.ǃczJ(ne.length,!!ie),this.ǃcFd(ne,_147,!!ie)}ǃcFB(ne,ie){this.ǃczJ(ne.length,!!ie),this.ǃcFd(ne,_146,!!ie)}ǃcFW(){let ne=this.ǃczY.getInt8(this.ǃczl);return this.ǃczl+=Int8Array.BYTES_PER_ELEMENT,ne}ǃcFr(){let ne=this.ǃczY.getUint8(this.ǃczl);return this.ǃczl+=Uint8Array.BYTES_PER_ELEMENT,ne}ǃcFu(ne){let ie=this.ǃczY.getInt16(this.ǃczl,!!ne);return this.ǃczl+=Int16Array.BYTES_PER_ELEMENT,ie}ǃcFU(ne){let ie=this.ǃczY.getUint16(this.ǃczl,!!ne);return this.ǃczl+=Uint16Array.BYTES_PER_ELEMENT,ie}ǃcFv(ne){let ie=this.ǃczY.getInt32(this.ǃczl,!!ne);return this.ǃczl+=Int32Array.BYTES_PER_ELEMENT,ie}ǃcFq(ne){let ie=this.ǃczY.getUint32(this.ǃczl,!!ne);return this.ǃczl+=Uint32Array.BYTES_PER_ELEMENT,ie}ǃcFa(ne){let ie=this.ǃczY.getFloat32(this.ǃczl,!!ne);return this.ǃczl+=Float32Array.BYTES_PER_ELEMENT,ie}ǃcFg(ne){let ie=this.ǃczY.getFloat64(this.ǃczl,!!ne);return this.ǃczl+=Float64Array.BYTES_PER_ELEMENT,ie}ǃczS(ne){return this.ǃcFN(this.ǃcFq(!!ne),"getInt8",Int8Array)}ǃczs(ne){return this.ǃcFN(this.ǃcFq(!!ne),_142,Uint8Array)}ǃczO(ne){return this.ǃcFN(this.ǃcFq(!!ne),_142,Uint8ClampedArray)}ǃczQ(ne){return this.ǃcFN(this.ǃcFq(!!ne),"getInt16",Int16Array,!!ne)}ǃcFc(ne){return this.ǃcFN(this.ǃcFq(!!ne),"getUint16",Uint16Array,!!ne)}ǃcFG(ne){return this.ǃcFN(this.ǃcFq(!!ne),"getInt32",Int32Array,!!ne)}ǃcFm(ne){return this.ǃcFN(this.ǃcFq(!!ne),"getUint32",Uint32Array,!!ne)}ǃcFD(ne){return this.ǃcFN(this.ǃcFq(!!ne),"getFloat32",Float32Array,!!ne)}ǃcFi(ne){return this.ǃcFN(this.ǃcFq(!!ne),"getFloat64",Float64Array,!!ne)}ǃcFd(ne,ie,me){let ae=ne.length;for(let de=0;de{const Te=parseFloat(ne.value);if(Te!==de)return Ee();const ke=Math.round(re-ye.detail.clientX),we=Math.round(Ge-ye.detail.clientY),Le=""===ne.min?-Infinity:parseFloat(ne.min),Ce=""===ne.max?Infinity:parseFloat(ne.max),xe=""===ne.step?1:parseFloat(ne.step);ye.preventDefault();let Re=we*xe;Re=me?ae-Re:ae+Re,de=ǃG.ǃAR(Re,Le,Ce),ne.value=de,ne.select(),ge.ǃGI()},Ee=()=>{pe=!1,ae=null,re=null,Ge=null,le.ǃGS(),ue.ǃGS(),oe.ǃj_(le),oe.ǃj_(ue),le=null,ue=null},De=ye=>{ye.target!==ne&&ye.preventDefault(),ye.stopPropagation(),Ee();let Te=new Event("change");ne.dispatchEvent(Te),ie&&ie()};return ge=ǃG.ǃX(ǃG.ǃGe,()=>{let ye=new Event("input");ne.dispatchEvent(ye)},60),oe.ǃrL(ǃG.ǃGh.ǃGC(ne,"UIPointerDown",ye=>{pe||(pe=!0,Ge=ye.detail.clientY,re=ye.detail.clientX,ae=parseFloat(ne.value),de=ae,le=ǃG.ǃGh.ǃGC(ne.ownerDocument,"UIPointerMove",ve),ue=ǃG.ǃGh.ǃGC(ne.ownerDocument,"UIPointerUp ",De),oe.ǃrL(le),oe.ǃrL(ue))})),oe.ǃrL(ǃG.ǃX(ǃG.ǃGh,()=>{ne=null,ie=null,le=null,ue=null,oe=null,ge.ǃz()})),oe}}ǃG.ǃcFn=class{constructor(te,ne,ie,me){this.ǃcFM=null,this.ǃcFC=te,this.ǃcFh=ie,this.ǃcFY=ne,me||this.ǃTR()}get ǃcFz(){return!!this.ǃcFM}ǃz(){this.ǃcFF(),this.ǃcFC=null,this.ǃcFh=null,this.ǃcFl=null}ǃt$(){this.ǃcFz||(this.ǃcFF(),this.ǃTR())}ǃTR(){if(!this.ǃcFz){let te=this.ǃcFh,ne=this.ǃcFC,ie=this.ǃcFY,me=te?ne.bind(te):ne;this.ǃcFM=setInterval(me,ie)}}ǃcFF(){this.ǃcFz&&(clearInterval(this.ǃcFM),this.ǃcFM=null)}ǃcFw(te){this.ǃcFY=te,this.ǃt$()}ǃcFo(te){this.ǃcFC=te,this.ǃt$()}ǃcMR(te){this.ǃcFh=te,this.ǃt$()}},"use strict";{let ee=new Set;ǃG.ǃcFH=class{constructor(ie){ǃG.ǃg(ie,Blob),this.ǃcFI=ie}ǃcFx(){return this.ǃcFJ().then(ie=>this.ǃcFZ(ie))}ǃcFJ(){return new Promise((ie,me)=>{let ae=this.ǃcFI.slice(0,Math.min(1024,this.ǃcFI.size));this.ǃcFI=null;let de=new FileReader;de.onload=re=>ie(re.target.result),de.onerror=me,de.readAsArrayBuffer(ae)})}ǃcFZ(ie){for(let me of ee){let ae=me(ie);if(ae)return ae}return null}static ǃcFS(ie){ǃG.ǃXw(ie),ee.add(ie)}}}{let ee=new Set;ee.add((te,ne)=>{let ie=te.subarray(1,7);if("vorbis"!==ǃG.ǃcgg(ie,"ascii"))return null;let me={type:"audio",ǃcFs:"vorbis"},ae=te[0];if(1===ae){let de=7;me.version=ne.getUint32(de,!0),de+=4,me.ǃcFO=ne.getUint8(de),de+=1,me.sampleRate=ne.getUint32(de,!0),de+=4,me.ǃcFQ=ne.getUint32(de,!0),de+=4,me.ǃclc=ne.getUint32(de,!0),de+=4,me.ǃclG=ne.getUint32(de,!0),de+=4}return me}),ee.add((te,ne)=>{let ie=te.subarray(0,8);if("OpusHead"!==ǃG.ǃcgg(ie,"ascii"))return null;let me={type:"audio",ǃcFs:"opus"},ae=8;return me.version=ne.getUint8(ae),ae+=1,me.ǃcFO=ne.getUint8(ae),ae+=1,ae+=2,me.ǃclm=ne.getUint32(ae,!0),ae+=4,me.sampleRate=48000,me}),ǃG.ǃcFH.ǃcFS(te=>{if("OggS"!==ǃG.ǃcga(te,"ascii",0,4))return null;let ne="",ie=[],me=new Uint8Array(te),ae=me[26],de=27+ae;for(let Ge=0;Gethis.ǃcli(),10,null,!0),this.ǃclR=new ǃG.ǃGM(ǃG.ǃGh.ǃGC(this.ǃcRC,"open",me=>this.ǃiU(me)),ǃG.ǃGh.ǃGC(this.ǃcRC,"close",me=>this.ǃiv(me)),ǃG.ǃGh.ǃGC(this.ǃcRC,"message",me=>this.ǃia(me)),ǃG.ǃGh.ǃGC(this.ǃcRC,"error",me=>this.ǃiq(me)),ǃG.ǃGh.ǃz(this.ǃo$)),this.ǃclb=null,this.ǃclT=[],this.ǃclk=new Map,this.ǃclX=null,this.ǃcl$=null}ǃz(){this.ǃIi(),this.ǃclb=null,this.ǃclR.ǃGS(),this.ǃclT.length=0,this.ǃclk.forEach(ie=>ie.ǃz()),this.ǃclk.clear()}ǃcb$(){if(this.ǃcRC.readyState!==WebSocket.CLOSED)throw new Error("Websocket is not closed");return this.ǃclR.ǃGS(),this.ǃcRC=new WebSocket(this.ǃclD),this.ǃcRC.binaryType="arraybuffer",this.ǃo$=new ǃG.ǃcFn(()=>this.ǃcli(),10,null,!0),this.ǃclR=new ǃG.ǃGM(ǃG.ǃGh.ǃGC(this.ǃcRC,"open",ie=>this.ǃiU(ie)),ǃG.ǃGh.ǃGC(this.ǃcRC,"close",ie=>this.ǃiv(ie)),ǃG.ǃGh.ǃGC(this.ǃcRC,"message",ie=>this.ǃia(ie)),ǃG.ǃGh.ǃGC(this.ǃcRC,"error",ie=>this.ǃiq(ie)),ǃG.ǃGh.ǃz(this.ǃo$)),new Promise((ie,me)=>{this.ǃclX=ie,this.ǃcl$=me})}ǃcva(){return this.ǃcmG}ǃcbj(ie,me,ae=ǃG.WebSocket.ǃcbj.ǃclr){ǃG.ǃbv(ie),ǃG.ǃbv(ae),ǃG.ǃcVD(me);let de=this.ǃclk.get(ie);if(de||(de=new ǃG.WebSocket.ǃcbj(this,ie,ae),this.ǃclk.set(ie,de)),!de.ǃclV(ae))throw new Error(`Requested channel is not requested type "${ae}"`);return me?de.ǃcbp(me):de}ǃcbE(ie,me){return this.ǃcbj(ie,me,ǃG.WebSocket.ǃcbj.ǃclA)}ǃcbd(ie,me){return this.ǃcbj(ie,me,ǃG.WebSocket.ǃcbj.JSON)}ǃclL(ie){ǃG.ǃbv(ie);let me=this.ǃclk.get(ie);me&&me.ǃz()}ǃcl_(ie){this.ǃclk.delete(ie)}ǃIi(ie,me){this.ǃcRC.close(ie,me)}ǃcb_(ie,me,ae){ǃG.ǃg(me,Uint8Array);const de=new Uint8Array(me.length+te);for(let re=0;re{let re={data:ie,resolve:ae,reject:de};me?this.ǃclT.unshift(re):this.ǃclT.push(re),this.ǃcva()&&!this.ǃo$.ǃcFz&&(this.ǃcli(),this.ǃo$.ǃTR())})}ǃia({data:ie}){let me=new Uint8Array(ie,0,te),ae=[,,,];for(let Ge=0;Gethis.ǃchU.delete(ne))}ǃcld(ne){let ie;switch(this.ǃchB){case te.ǃclr:ie=ee.decode(ne);break;case te.JSON:ie=JSON.parse(ee.decode(ne));break;case te.ǃclA:ie=ne;}for(let me of this.ǃchU)me(ie)}},ǃG.WebSocket.ǃcbj.ǃclA="binary",ǃG.WebSocket.ǃcbj.JSON="json",ǃG.WebSocket.ǃcbj.ǃclr="text"}{function ee(){ǃG.ǃDG&&ǃG.ǃDG.ǃDc?document.body.parentElement.setAttribute("mobile",""):document.body.parentElement.setAttribute("desktop","")}const _154="border-bottom-width";ǃG.ǃi.ǃD("lib/ui/lang");const te=new Map([["progress","cursorBackgroundWait"],["wait","cursorWait"],["crosshair","cursorCrosshair"],["move","cursorMove"],["not-allowed","cursorNotAllowed"],["col-resize","cursorResizeCol"],["row-resize","cursorResizeRow"],["ns-resize","cursorResizeNS"],["ew-resize","cursorResizeEW"],["nwse-resize","cursorResizeNWSE"],["nesw-resize","cursorResizeNESW"],["rotate-topleft","cursorRotateTL"],["rotate-top","cursorRotateTop"],["rotate-topright","cursorRotateTR"],["rotate-right","cursorRotateRight"],["rotate-bottomright","cursorRotateBR"],["rotate-bottom","cursorRotateBottom"],["rotate-bottomleft","cursorRotateBL"],["rotate-left","cursorRotateLeft"]]),ne="default",ie=["fr","px","mm","cm","in","pt","pc","vh","vw","vmin","vmax","em","ex","ch","rem"],me=["auto","top","bottom"];let ae=!1,de=null,re=window.innerWidth,Ge=window.innerHeight;window.addEventListener("resize",()=>{re=window.innerWidth,Ge=window.innerHeight},!0);let oe=NaN,le=NaN,ue=NaN,pe=NaN;const ge=new WeakMap;class he{constructor(ve,be){ǃG.ǃbv(ve),ǃG.ǃcXQ(be),this.ǃclp=ve,this.ǃclf="",this.ǃUk=be,this.ǃcly=be.ownerDocument}ǃmV(){return this.ǃcly}Set(ve){if(ǃG.ǃbv(ve),ve!==ne&&!te.has(ve))throw new RangeError(`invalid mouse cursor name '${ve}'`);this.ǃclp===ve||(this.ǃclp=ve,ǃG.ǃGD.ǃclB(this)&&this.ǃclW(!1))}ǃclW(ve){if(this.ǃclp===ne)return void this.ǃclu();let be=te.get(this.ǃclp);assert(be,"invalid cursor attribute");(this.ǃclf!==be||ve)&&(this.ǃclu(),this.ǃUk.setAttribute(be,""),this.ǃclf=be)}ǃclu(){this.ǃclf&&this.ǃUk.removeAttribute(this.ǃclf),this.ǃclf=""}ǃz(){this.ǃclu(),this.ǃUk=null,this.ǃcly=null}}ǃG.ǃGD=class{constructor(){throw new TypeError("static class can't be instantiated")}static ǃclU(){return ae}static ǃcns(be){be=!!be;be===ae||(ae=be,document.getElementsByTagName("body")[0].dir=be?"rtl":"ltr")}static ǃclv(be){ǃG.ǃcam(be,"#document");let Ee=ge.get(be);return Ee||(Ee=[],ge.set(be,Ee)),Ee}static ǃclB(be){ǃG.ǃg(be,he);const Ee=ǃG.ǃGD.ǃclv(be.ǃmV());let De=Ee.length;return De&&Ee[De-1]===be}static ǃV_(be,Ee){ǃG.ǃbv(be);let De=null,ye=null;if(Ee?Ee.nodeName&&"#document"===Ee.nodeName?(De=Ee,ye=De.body):(ǃG.ǃc$i(Ee),ye=Ee,De=ye.ownerDocument):(De=document,ye=document.body),be!==ne&&!te.has(be))throw new RangeError(`invalid mouse cursor name '${be}'`);const Te=ǃG.ǃGD.ǃclv(De);if(100<=Te.length)throw new Error("pushed too many mouse cursors");Te.length&&Te[Te.length-1].ǃclu();let ke=ǃG.ǃX(he,be,ye);return Te.push(ke),ke.ǃclW(!1),ke}static ǃVe(be){if(ǃG.ǃmL(be,he),!!be){const Ee=ǃG.ǃGD.ǃclv(be.ǃmV());be.ǃz();const De=Ee.indexOf(be);0>De||(Ee.splice(De,1),Ee.length&&Ee[Ee.length-1].ǃclW(!0))}}static ǃjE(be){ǃG.ǃcXQ(be),be&&be.parentElement&&be.parentElement.removeChild(be)}static ǃclq(be){ǃG.ǃbv(be),ǃG.ǃGD.ǃjE(document.getElementById(be))}static ǃcla(be){ǃG.ǃbv(be);let Ee=document.querySelectorAll(be);for(let De=0,ye=Ee.length;De=ke?Ee.insertBefore(Le,Ce[0]):0Ee)return!1;if(0===Ee)return!0;let De=be.toLowerCase();for(let ye=0,Te=ie.length;yeTe.bottom&&(be.scrollIntoView(!1),Ee.scrollTop+=5):"top"===De?(be.scrollIntoView(!0),Ee.scrollTop-=5):"bottom"===De?(be.scrollIntoView(!1),Ee.scrollTop+=5):void 0}static ǃclw(be,Ee){ǃG.ǃc$i(be),ǃG.ǃbv(Ee),Ee=Ee.trim();let De=Ee.lastIndexOf(" ");if(0>=De)return void(be.textContent=Ee);let ye=Ee.lastIndexOf(" ",De-1);if(0>=ye)return void(be.textContent=Ee);be.textContent=Ee.substring(0,ye+1);let Te=ǃG.ǃGD.ǃXK("span",be,null,"nowrap");Te.textContent=Ee.substring(ye+1)}static ǃclo(be,Ee){ǃG.ǃbv(be),ǃG.ǃcDt(Ee);let De=Ee.parent||document.body,ye=Ee.tag||"div",Te=Ee.ǃcXT||null,ke=Ee.ǃclH,we=Ee.className,Le=Ee.id,Ce=!1;Te||(Te=document.createElement(ye),Ce=!0),ke&&Te.setAttribute(ke,""),we&&(Te.className=we),Le&&(Te.id=Le),Ce&&De.appendChild(Te);let xe=window.getComputedStyle(Te),Re=xe.getPropertyValue(be);return Ce&&De.removeChild(Te),Re}static ǃIv(){if(isNaN(oe)){let be=ǃG.ǃGD.ǃclo("width",{className:"width100em"});if(!be.endsWith("px"))throw new Error("expected em size in px");oe=parseFloat(be)/100}return oe}static ǃclI(){if(isNaN(le)){let be=ǃG.ǃGD.ǃclo(_154,{ǃclH:"floating"});if(!be.endsWith("px"))throw new Error("CSS style for panes must specify the border size in units of 'px'");le=parseFloat(be)||7}return le}static ǃclx(){if(isNaN(ue)){let be=ǃG.ǃGD.ǃclo(_154,{tag:"dialog"});if(!be.endsWith("px"))throw new Error("CSS style for dialogs must specify the border size in units of 'px'");ue=parseFloat(be)||1}return ue}static ǃclJ(){if(isNaN(pe)){let be=ǃG.ǃGD.ǃclo(_154,{tag:"dialog",ǃclH:"resizable"});if(!be.endsWith("px"))throw new Error("CSS style for resizable dialogs must specify the border size in units of 'px'");pe=parseFloat(be)||7}return pe}static ǃclZ(be){be.preventDefault()}static ǃclS(be){be.stopPropagation()}static ǃcls(be){be.preventDefault(),be.stopPropagation()}static ǃED(be,Ee,De){return ǃG.ǃTH(be),ǃG.ǃTH(Ee),ǃG.ǃmL(De,ǃG.ǃGD.ǃGm.ǃok),ǃG.ǃGD.ǃmR.ǃclO(be,Ee)||ǃG.ǃGD.ǃE$.ǃclO(be,Ee)||ǃG.ǃGD.ǃrV.ǃclQ(be,Ee,De)}},ǃG.ǃGD.devicePixelRatio=window.devicePixelRatio||1;if("loading"===document.readyState?document.addEventListener("DOMContentLoaded",ee):ee(),!ǃG.ǃDP){let ve=new Set(["input","textarea","datalist"]);document.addEventListener("contextmenu",be=>{let Ee=be.target,De=Ee.tagName.toLowerCase();ve.has(De)||ǃG.ǃcaF(Ee)||be.preventDefault()}),document.addEventListener("mousewheel",be=>{ǃG.ǃEt.ǃyI(be)&&be.preventDefault()})}}{const _155="theme not loaded yet";let ee=null,te="",ne=!1,ie=null,me=null;ǃG.ǃGD.ǃcwc=class{constructor(){throw new TypeError("static class can't be instantiated")}static ǃUO(de){ǃG.ǃbv(de);let re=`theme/${de}/import.html`;return new Promise((Ge,oe)=>{ee&&(document.head.removeChild(ee),ee=null,te="",ne=!1);let le=document.createElement("link");le.rel="import",le.href=re,le.onload=function(){te=ǃG.ǃm(le.import.URL),ne=!0,Ge()},le.onerror=function(pe){console.error(`[THEME] Error loading from ${re}: `,pe),ǃG.ǃcae(()=>document.head.removeChild(le)),ee=null,te="",ne=!1,oe(pe)},ee=le,document.head.appendChild(le)})}static ǃcwG(){if(!ne)throw new Error(_155);return te}static ǃcwm(){if(!ne)throw new Error(_155);return te+"icons/"}static ǃcwD(){return me?Promise.resolve(me):ie?ie:(ie=ǃG.ǃcks(ǃG.ǃGD.ǃcwc.ǃcwm()+"precompiled-icons.json").then(de=>{return me=de,ie=null,me}).catch(de=>{throw ie=null,de}),ie)}}}{const _156="using removed window",ee=new Map;let te=!ǃG.ǃcrS.ǃcrZ("default-layout")&&ǃG.ǃX(ǃG.ǃcNI,"UI_STATE"),ne=ǃG.ǃX(ǃG.ǃcNI,"UI_USERDATA");ǃG.ǃGD.Window=class extends ǃG.Event.ǃpF{constructor(me,ae){ǃG.ǃc$i(me),ǃG.ǃoG(ae),super(),this.ǃUk=me,this.ǃclE=ae||"",this.ǃcwi=null,this.ǃcwR=!1,this.ǃcwb=-1,this.ǃcwT=null,this.ǃcwk=!1,this.ǃWA=0,this.ǃWL=0,this.ǃcwX=0,this.ǃcw$=0,this.ǃcwr="",this.ǃWo=0,this.ǃWH=0,this.ǃWI=0,this.ǃWx=0,this.ǃcwV=!1,ǃG.ǃGD.ǃbB.ǃcwA(this)}ǃj_(){assert(!this.ǃcwV,"window already removed"),ǃG.ǃGD.ǃbB.ǃjL(this),ǃG.ǃGD.ǃjE(this.ǃUk),this.ǃUk=null,this.ǃcwV=!0,this.ǃcwi&&ee.delete(this.ǃcwi),this.ǃcwi=null,super.ǃz()}ǃGL(){return assert(!this.ǃcwV,_156),this.ǃUk}ǃcu(){return this.ǃclE}ǃr(me){ǃG.ǃbv(me),this.ǃclE=me}ǃcwL(me){if(ǃG.ǃbv(me),ee.has(me))throw new Error("Identifier already in use");ee.set(me,this),this.ǃcwi=me}ǃcw_(){return this.ǃcwi}ǃcwt(me){let ae=this.ǃcwi;ae&&ne&&ne.set(ae,me)}ǃcwP(){ne&&ne.ǃcKm("clear").then(()=>ne.release()).then(()=>ne=null)}ǃcwj(){let me=this.ǃcwi;return me&&ne&&ne.get(me)}ǃcwd(){let me=this.ǃcwi;return me&&ne&&ne.has(me)}ǃcwE(me){let ae=this.ǃcwi;ae&&te&&te.set(ae,me)}ǃcwe(){te&&te.ǃcKm("clear").then(()=>te.release()).then(()=>te=null)}ǃcwp(){let me=this.ǃcwi;return me&&te&&te.get(me)}ǃcwf(){let me=this.ǃcwi;return me&&te&&te.has(me)}ǃcwy(){throw new Error("derived class must override")}ǃvA(){this.ǃcwy()&&ǃG.ǃGD.ǃbB.ǃvA(this)}ǃcwB(me){ǃG.ǃTH(me);let ae=this.ǃGL();ae.style.zIndex=0>me?"":me,this.ǃcwb=me}ǃcwW(){return this.ǃcwb}static ǃ_A(me,ae){return me.ǃcwW()-ae.ǃcwW()}ǃkM(){return!0}ǃcD$(){return this.ǃcwR}ǃcwu(me){me=!!me;this.ǃcwR===me||(this.ǃcwR=me,ǃG.ǃGD.ǃFh(this.ǃUk,"active",this.ǃcwR))}ǃcwU(){this.ǃcwT=null}ǃcwv(){this.ǃcwT=this.ǃGL().getBoundingClientRect()}ǃMl(){return assert(!this.ǃcwV,_156),this.ǃcwT||this.ǃcwv(),this.ǃcwT}ǃVE(me,ae){ǃG.ǃTH(me),ǃG.ǃTH(ae);let de=this.ǃMl();return me>=de.left&&me=de.top&&ae{let le=oe.detail;ǃG.ǃGD.ǃbB.ǃcwI(le.clientX,le.clientY,le.id,le.ǃET)&&(oe.preventDefault(),oe.stopPropagation())}),document.addEventListener("keydown",oe=>{ǃG.ǃGD.ǃbB.ǃP_(oe)}),document.addEventListener("keypress",oe=>{ǃG.ǃGD.ǃbB.ǃNP(oe)}),document.addEventListener("keyup",oe=>{ǃG.ǃGD.ǃbB.ǃPP(oe)}),document.addEventListener("cut",oe=>{ǃG.ǃGD.ǃbB.ǃjc(oe)}),document.addEventListener("copy",oe=>{ǃG.ǃGD.ǃbB.ǃjG(oe)}),document.addEventListener("paste",oe=>{ǃG.ǃGD.ǃbB.ǃjm(oe)}),window.addEventListener("blur",()=>{ie=ne,ǃG.ǃGD.ǃbB.ǃby(null)}),window.addEventListener("focus",()=>{!ne&&ie&&ǃG.ǃGD.ǃbB.ǃby(ie),ie=null});class Ge extends ǃG.Event.ǃpF{constructor(){super()}ǃcwA(oe){ǃG.ǃg(oe,ǃG.ǃGD.Window),te.push(oe)}ǃjL(oe){ǃG.ǃg(oe,ǃG.ǃGD.Window),this.ǃcwx(oe),ie===oe&&(ie=null),me===oe&&(me=null);let le=te.indexOf(oe);assert(0<=le,"cannot find window"),te.splice(le,1),this.ǃcwJ()}*ǃcwZ(){for(let oe=te.length-1;0<=oe;--oe)yield te[oe]}ǃcwI(oe,le,ue){ǃG.ǃTH(oe),ǃG.ǃTH(le),ǃG.ǃTH(ue);let ge=ǃG.ǃGD.ǃE$.ǃcwS();if(ge&&ge.ǃLI()){for(let he of ge.ǃcws())if(he.ǃVE(oe,le))return this.ǃby(he.ǃcwq()),!1;if(ge.ǃVE(oe,le))return this.ǃby(ge.ǃcwq()),!1}else for(let he of this.ǃcwZ())if(he.ǃVE(oe,le)&&(!ge||he===ge))return this.ǃby(he.ǃcwq()),!1}ǃvA(oe){ǃG.ǃg(oe,ǃG.ǃGD.Window);let le=te.indexOf(oe);0>le||(te.splice(le,1),te.push(oe),this.ǃcwJ())}ǃcwJ(){let oe=[];for(let ue of te)ue.ǃcwy()||(ue.ǃcwB(-1),oe.push(ue));let le=1;for(let ue of te)ue.ǃcwy()&&(ue.ǃcwB(le++),oe.push(ue));if(!ǃG.ǃOf(oe,te)){ǃG.ǃcGb(te,oe);let ue=new ǃG.Event("zindexchanged");this.dispatchEvent(ue)}}ǃby(oe,le){if(ǃG.ǃmL(oe,ǃG.ǃGD.Window),ne!==oe){ae="",-1!=de&&(window.clearTimeout(de),de=-1),ne&&ne.ǃcwu(!1),ne=oe,ne&&(!le&&this.ǃvA(ne),ne.ǃcwu(!0));let ue=new ǃG.Event("activewindowchange");this.dispatchEvent(ue)}}ǃyk(){return ne}ǃcwO(){me=this.ǃyk()}ǃcwQ(){this.ǃby(me),me=null}ǃP_(oe){ne&&ne.ǃP_(oe)}ǃPP(oe){ne&&ne.ǃPP(oe)}ǃNP(oe){if(oe.key&&ne){const le=ne.ǃGL().ownerDocument;if(!ǃG.ǃcal(le)){ae+=oe.key,-1!=de&&window.clearTimeout(de),de=window.setTimeout(ee,1e3);const ue=new ǃG.Event("searchinput");ue.ǃ$H=ae,ne.dispatchEvent(ue)}}}ǃjc(oe){ne&&ne.ǃjc(oe)}ǃjG(oe){ne&&ne.ǃjG(oe)}ǃjm(oe){ne&&ne.ǃjm(oe)}ǃcwx(oe){if(ǃG.ǃg(oe,ǃG.ǃGD.Window),oe===ne){for(let le=te.length-1,ue;0<=le;--le)if(ue=te[le],ue!==oe&&ue.ǃkM())return void this.ǃby(ue,!0);this.ǃby(null)}}ǃclO(oe,le,ue){ǃG.ǃTH(oe),ǃG.ǃTH(le),ǃG.ǃmL(ue,ǃG.ǃGD.Window);let pe=ǃG.ǃGD.ǃE$.ǃcwS();if(pe&&pe.ǃLI()){for(let ge of pe.ǃcws())if(ge!==ue&&ge.ǃVE(oe,le))return!0;if(pe===ue)return!1;if(pe.ǃVE(oe,le))return!0}else for(let ge of this.ǃcwZ())if(ge!==ue&&ge.ǃVE(oe,le))return!0;return!1}ǃcoc(oe,le,ue){ǃG.ǃTH(oe),ǃG.ǃTH(le),ǃG.ǃg(ue,ǃG.ǃGD.Window);let pe=ǃG.ǃGD.ǃE$.ǃcwS();if(pe&&pe.ǃLI()){for(let ge of pe.ǃcws()){if(ge===ue)return!1;if(ge.ǃVE(oe,le))return!0}if(pe===ue)return!1;if(pe.ǃVE(oe,le))return!0}else for(let ge of this.ǃcwZ()){if(ge===ue)return!1;if(ge.ǃVE(oe,le))return!0}throw new Error("couldn't find window")}}ǃG.ǃGD.ǃbB=ǃG.ǃX(Ge)}{window.addEventListener("message",ne=>{ne.origin!==location.origin||ǃG.ǃGD.ǃiG.ǃia(ne.source,ne.data)});let ee=new Set,te=new Map;ǃG.ǃGD.ǃiG=class{constructor(){throw new TypeError("static class can't be instantiated")}static ǃcoG(ie,me,ae,de,re,Ge){ǃG.ǃbv(ie),ǃG.ǃbv(me),ǃG.ǃTH(ae),ǃG.ǃTH(de),ǃG.ǃNv(re),ǃG.ǃNv(Ge);let oe,le;oe="number"==typeof re?re:window.screenX+window.outerWidth/2-ae/2,le="number"==typeof Ge?Ge:window.screenY+window.outerHeight/2-de/2;let ue=`width=${ae},height=${de},left=${oe},top=${le},menubar=no,toolbar=no,location=no,personalbar=no,status=no,dependent=yes,dialog=yes,resizable=yes,scrollbars=no`,pe=window.open(ie,me,ue);return new Promise((ge,he)=>{pe||he(),te.set(pe,{resolve:ge,reject:he})})}static ǃia(ie,me){if(me&&"object"==typeof me&&"string"==typeof me.type)switch(me.type){case"ready":ǃG.ǃGD.ǃiG.ǃcom(ie);break;case"keydown-event":ǃG.ǃGD.ǃiG.ǃcoD(me.event);break;case"closed":ǃG.ǃGD.ǃiG.ǃcoi(ie);}}static ǃcom(ie){ee.add(ie);let me=te.get(ie);me&&me.resolve(ie),te.delete(ie),ǃG.ǃGD.ǃiG.ǃcoR(ie,"init-settings",{uiEffectsEnabled:app.ǃyO()})}static ǃcoi(ie){ee.delete(ie);let me=te.get(ie);me&&me.reject(ie),te.delete(ie)}static ǃcoR(ie,me,ae){ie.postMessage({type:me,param:ae},location.origin)}static ǃcoD(ie){const me=ǃG.ǃX(ǃG.Event,"external-keydown");me.ǃcGA=ie,app.dispatchEvent(me)}static ǃcob(ie){ie=!!ie;for(let me of ee)ǃG.ǃGD.ǃiG.ǃcoR(me,"show-dimmer",ie)}static ǃic(ie,me,ae){ǃG.ǃbv(ie),ǃG.ǃoG(name),ǃG.ǃoG(me),ǃG.ǃcXQ(ae);let de=window.open(ie,null,me);if(de)return Promise.resolve(de);let re=ǃG.ǃGD.ǃDZ.ǃDJ("OpenPopupWindow");return re.ǃ$i(ie,me,ae)}}}{const _159="UIPointerMove",_160="UIPointerDown";let ee=new Map,te=new Set,ne=new Set,ie=new Map,me=new Map,ae=new Map,de=new Map,re=!1,Ge=null,oe=function(ge){ge.document.addEventListener(_160,he=>{let ve=he.detail;ǃG.ǃGD.ǃE$.ǃcwI(ve.clientX,ve.clientY,ve.id,ve.ǃET)&&(he.preventDefault(),he.stopPropagation())}),ge.document.addEventListener(_159,he=>{let ve=he.detail;ǃG.ǃGD.ǃE$.ǃcoT(ve.clientX,ve.clientY,ve.id)&&(he.preventDefault(),he.stopPropagation())}),ge.document.addEventListener("UIPointerUp",he=>{let ve=he.detail;ǃG.ǃGD.ǃE$.ǃcok(ve.clientX,ve.clientY,ve.screenX,ve.screenY,ve.id)&&(he.preventDefault(),he.stopPropagation())})},le=function(ge){ge.document.removeEventListener(_160,he=>{let ve=he.detail;ǃG.ǃGD.ǃE$.ǃcwI(ve.clientX,ve.clientY,ve.id,ve.ǃET)&&(he.preventDefault(),he.stopPropagation())}),ge.document.removeEventListener(_159,he=>{let ve=he.detail;ǃG.ǃGD.ǃE$.ǃcoT(ve.clientX,ve.clientY,ve.id)&&(he.preventDefault(),he.stopPropagation())}),ge.document.removeEventListener("UIPointerUp",he=>{let ve=he.detail;ǃG.ǃGD.ǃE$.ǃcok(ve.clientX,ve.clientY,ve.screenX,ve.screenY,ve.id)&&(he.preventDefault(),he.stopPropagation())})};oe(window),window.addEventListener("focus",()=>{let he=ǃG.ǃGD.ǃE$.ǃcwS();he&&ǃG.ǃGD.ǃbB.ǃby(he)});let ue=null,pe=ǃG.ǃX(ǃG.Event.ǃpF);ǃG.ǃGD.ǃE$=class{constructor(){throw new TypeError("static class can't be instantiated")}static ǃcoX(he,ve){if(ǃG.ǃbv(he),ǃG.ǃXw(ve),ee.has(he))throw new Error(`dialog name '${he}' already in use`);ee.set(he,{ǃco$:ve,ǃLo:[]})}static ǃcor(he,ve){ǃG.ǃbv(he);let be=ee.get(he);if(!be)throw new Error(`dialog name '${he}' not found`);let Ee=null;if(ve){for(let De of be.ǃLo)if(!De.ǃHH()){Ee=De;break}}else be.ǃLo.length&&(Ee=be.ǃLo[0]);return Ee||(re=ve,Ee=ǃG.ǃX(be.ǃco$,ve),be.ǃLo.push(Ee),Ee.ǃr(he),Ee.ǃcwL("DIALOG_"+he+be.ǃLo.length),Ee.ǃcoV(),re=!1),Ee}static ǃcoA(){return re}static ǃcoL(){return!!this.ǃcwS()}static ǃcwS(){let he=[...ne];return he.length?he[he.length-1]:null}static ǃco_(){let he=[...te];return he.reverse(),he}static ǃcot(he){let ve=[];for(let be of te)he===be.ǃmV()&&ve.push(be);return ve}static ǃcoP(){let he=ǃG.ǃGD.ǃE$.ǃcwS(),ve=ǃG.ǃGD.ǃE$.ǃco_();return he?(ǃG.ǃZO(ve,be=>!be.ǃcoj()),ǃG.ǃZO(ve,be=>!be.ǃ_T()===he),ve.push(he)):ǃG.ǃZO(ve,be=>be.ǃcod()),ve}static ǃcoE(){let he=ǃG.ǃGD.ǃbB.ǃyk();return he instanceof ǃG.ǃGD.ǃDZ?he:null}static ǃcoe(he){oe(he)}static ǃcop(he){le(he)}static ǃcof(he,ve){ǃG.ǃg(he,ǃG.ǃGD.ǃDZ),ve?(te.add(he),he.ǃcoy()&&(ne.add(he),this.ǃcoB("showmodal",he)),ǃG.ǃGD.ǃbB.ǃby(he)):(te.delete(he),he.ǃcoy()&&(ne.delete(he),this.ǃcoB("hidemodal",he)))}static ǃclO(he,ve){ǃG.ǃTH(he),ǃG.ǃTH(ve);for(let be of te)if(be.ǃVE(he,ve))return!0;return!1}static ǃcoW(he){ǃG.ǃg(he,ǃG.ǃGD.ǃDZ);let ve=he.ǃpi(),be=he.ǃpR();for(let Ee of te)if(he!==Ee&&Ee.ǃpi()===ve&&Ee.ǃpR()===be)return!0;return!1}static ǃyx(){return 0{ǃG.ǃGD.ǃE$.ǃcRG.ǃchP("load")})}static ǃcoa(he,ve,be,Ee){(ǃG.ǃg(he,ǃG.ǃGD.ǃDZ),ǃG.ǃTH(ve),ǃG.ǃTH(be),ǃG.ǃTH(Ee),!(me.has(he)||de.has(he)))&&(ǃG.ǃGD.ǃmR.ǃclO(ve,be)||(ǃG.ǃGD.ǃE$.ǃcwI(ve,be,Ee),de.has(he)||(ie.set(Ee,he),me.set(he,Ee),he.ǃcwa(ve,be),he.ǃcwK(he.ǃpi()-ve,he.ǃpR()-be),he.ǃcog("startdragging"))))}static ǃcwI(he,ve,be,Ee){if(ǃG.ǃTH(he),ǃG.ǃTH(ve),ǃG.ǃTH(be),ie.has(be)||ae.has(be)||ǃG.ǃGD.ǃmR.ǃclO(he,ve))return!1;for(let De of ǃG.ǃGD.ǃE$.ǃcoP()){let ye=De.ǃcoN(he,ve);if("m"===ye)return!1;if(ye&&Ee===ǃG.ǃye.ǃBX){if(me.has(De))return!1;if(ǃG.ǃGD.ǃbB.ǃcoc(he,ve,De))break;return ae.set(be,De),de.set(De,be),De.ǃcog("startresizing"),De.ǃcwC(ye),De.ǃcwa(he,ve),De.ǃcwY(De.ǃpi(),De.ǃpR()),De.ǃcwl(De.ǃcE(),De.ǃce()),!0}}return!1}static ǃcoT(he,ve,be){if(ǃG.ǃTH(he),ǃG.ǃTH(ve),ǃG.ǃTH(be),ǃG.ǃyy.ǃchY(be))return!1;if(ie.has(be))return ǃG.ǃGD.ǃE$.ǃcoK(he,ve,be,ie.get(be)),!0;if(ae.has(be))return ǃG.ǃGD.ǃE$.ǃcon(he,ve,be,ae.get(be)),!0;if(ǃG.ǃGD.ǃmR.ǃclO(he,ve))return ue&&ue.Set("default"),!1;for(let Ee of ǃG.ǃGD.ǃE$.ǃcoP()){let De=Ee.ǃcoN(he,ve);if(De){if(ǃG.ǃGD.ǃbB.ǃcoc(he,ve,Ee))break;return ue?"e"===De||"w"===De?ue.Set("ew-resize"):"n"===De||"s"===De?ue.Set("ns-resize"):"nw"===De||"se"===De?ue.Set("nwse-resize"):"ne"===De||"sw"===De?ue.Set("nesw-resize"):"m"===De&&(ǃG.ǃGD.ǃVe(ue),ue=null):"e"===De||"w"===De?ue=ǃG.ǃGD.ǃV_("ew-resize"):"n"===De||"s"===De?ue=ǃG.ǃGD.ǃV_("ns-resize"):"nw"===De||"se"===De?ue=ǃG.ǃGD.ǃV_("nwse-resize"):("ne"===De||"sw"===De)&&(ue=ǃG.ǃGD.ǃV_("nesw-resize")),!!ue}}return ǃG.ǃGD.ǃVe(ue),ue=null,!1}static ǃcoK(he,ve,be,Ee){ǃG.ǃTH(he),ǃG.ǃTH(ve),ǃG.ǃTH(be),ǃG.ǃg(Ee,ǃG.ǃGD.ǃDZ),Ee.ǃEu(he+Ee.ǃcwn()),Ee.ǃEU(ve+Ee.ǃcwM())}static ǃcon(he,ve,be,Ee){ǃG.ǃTH(he),ǃG.ǃTH(ve),ǃG.ǃTH(be),ǃG.ǃg(Ee,ǃG.ǃGD.ǃDZ);let De=he-Ee.ǃcwg(),ye=ve-Ee.ǃcwN(),Te=Ee.ǃcwz(),ke=Ee.ǃcwF(),we=Ee.ǃcww(),Le=Ee.ǃcwo(),Ce=Ee.ǃcwh();if("e"===Ce||"se"===Ce||"ne"===Ce)Ee.ǃEB(we+De);else if("w"===Ce||"sw"===Ce||"nw"===Ce){let xe=Te+we-Ee.ǃcoM();Ee.ǃEu(Math.min(Te+De,xe)),Ee.ǃEB(we-De)}if("s"===Ce||"sw"===Ce||"se"===Ce)Ee.ǃEW(Le+ye);else if("n"===Ce||"nw"===Ce||"ne"===Ce){let xe=ke+Le-Ee.ǃcoC();Ee.ǃEU(Math.min(ke+ye,xe)),Ee.ǃEW(Le-ye)}}static ǃcok(he,ve,be,Ee,De){if(ǃG.ǃTH(he),ǃG.ǃTH(ve),ǃG.ǃTH(De),ie.has(De)){let ye=ie.get(De);if(ǃG.ǃGD.ǃE$.ǃcoK(he,ve,De,ye),(0>he||0>ve||he>window.innerWidth||ve>window.innerHeight)&&ye.ǃcoh()){let Te=ǃG.ǃGD.devicePixelRatio;ye.ǃcVG(be/Te+ye.ǃcwn(),Ee/Te+ye.ǃcwM()).catch(()=>ye.ǃcoY())}else ye.ǃcoY();return ie.delete(De),me.delete(ye),ye.ǃcog("finishdragging"),!0}if(ae.has(De)){let ye=ae.get(De);ǃG.ǃGD.ǃE$.ǃcon(he,ve,De,ye),ye.ǃcoY(),ae.delete(De),de.delete(ye),ye.ǃcog("finishresizing")}return!1}static ǃcoB(he,ve){ǃG.ǃbv(he),ǃG.ǃmL(ve,ǃG.ǃGD.ǃDZ);let be=new ǃG.Event(he);be.ǃcoz=ve,this.dispatchEvent(be)}static addEventListener(he,ve,be){pe.addEventListener(he,ve,be)}static removeEventListener(he,ve,be){pe.removeEventListener(he,ve,be)}static dispatchEvent(he){return pe.dispatchEvent(he)}},ǃG.ǃGD.ǃE$.ǃcRG=ǃG.ǃX(ǃG.Event.ǃpF)}{const _161="widthchange",_162="heightchange",_163="UIPointerDown",_164="startresizing",_165="startdragging",_166="inPopupWindow",_167="positionchange",_168="afterpopupclose",_169="ui-dialog-caption",ee={duration:200,easing:"ease-out"},ae=30;let de=new Map;ǃG.ǃGD.ǃDZ=class extends ǃG.ǃGD.Window{constructor(Ge){if(ǃG.ǃc$i(Ge,"dialog"),ǃG.ǃGD.ǃE$.ǃcoA()&&(Ge=Ge.cloneNode(!0)),super(Ge),de.has(Ge))throw new Error("dialog class already created");de.set(Ge,this),this.ǃcoF=Ge.querySelector(_169),this.ǃcol=Ge.querySelector("ui-dialog-contents"),this.ǃcow=Ge.querySelector("ui-dialog-footer"),this.ǃcoo=this.ǃUk.ownerDocument,this.ǃcoH=null,this.ǃUk.hasAttribute("role")||this.ǃUk.setAttribute("role","dialog"),this.ǃcoI=this.ǃUk.hasAttribute("resizable"),this.ǃcox=!0,this.ǃcoJ=!1,this.ǃcoZ=!1,this.ǃcoS=null,this.ǃcos=!1,this.ǃcoO=null,this.ǃcoQ=null,this.ǃcHc=null,this.ǃcHG=this.ǃUk.querySelector(_169),this.ǃcHm=null,this.ǃcHD=null,this.ǃcHi=!1,this.ǃcHR=!1,this.ǃcHb=!0,this.ǃcHT=!1,this.ǃcHk="",this.ǃNS=0,this.ǃNs=0,this.ǃhm=0,this.ǃhD=0,this.ǃcHX=0,this.ǃcH$=0,this.ǃckB=()=>this.ǃcoY(),this.ǃyj=null,this.ǃcHr=null,this.ǃcHV=!1,this.ǃcHA=!1,this.ǃDN=null,this.ǃcHL=()=>this.ǃcrY(),this.ǃcH_=null,this.ǃcHt=null,this.ǃcHG&&(this.ǃcHk=this.ǃcHG.textContent,ǃG.ǃGD.ǃciO(this.ǃcHG),this.ǃcHm=ǃG.ǃGD.ǃXK("span",this.ǃcHG,null,"dialog-caption-text"),this.ǃcHm.textContent=this.ǃcHk,this.ǃyj=oe=>{oe.detail.ǃET!==ǃG.ǃye.ǃBX||this.ǃcHP(oe.detail.clientX,oe.detail.clientY,oe.detail.id)},this.ǃcHr=oe=>this.ǃcHj(oe),this.ǃcHG.addEventListener("contextmenu",this.ǃcHr),this.ǃUk.hasAttribute("closebutton")&&(this.ǃcH_=ǃG.ǃX(ǃG.ǃGD.ǃGr.ǃcmy,this.ǃcHG),this.ǃcH_.onclick=()=>this.ǃcRE()),this.ǃUk.hasAttribute("backbutton")&&(this.ǃcHt=ǃG.ǃX(ǃG.ǃGD.ǃGr.ǃcHd,this.ǃcHG),this.ǃcHt.onclick=()=>this.ǃcHE())),this.ǃcHe=null,this.ǃcHp=[],this.ǃcHf=[],this.ǃcHy=0,this.ǃcHB=0,this.ǃcHW=null,this.ǃcHu=null,this.ǃcHU=oe=>this.ǃcHv(oe),this.ǃcHq=oe=>this.ǃcHa(oe),this.ǃcHg=oe=>this.ǃcHN(oe),this.ǃcHK=!1}ǃcoV(){}ǃcwf(){if(super.ǃcwf()){let Ge=this.ǃcwp();return Ge.devicePixelRatio===window.devicePixelRatio}return!1}ǃcHn(...Ge){if(!this.ǃcHK&&this.ǃclE&&this.ǃcox&&ǃG.ǃGD.ǃDZ.ǃDJ(this.ǃclE)===this){let oe=this.ǃcoH&&this.ǃcoH.defaultView,le={popup:this.ǃcHM(),nested:this.ǃcoj(),width:this.ǃhm,height:this.ǃhD,resizable:this.ǃcoI,devicePixelRatio:window.devicePixelRatio,xRatio:oe&&this.ǃNS/oe.innerWidth,yRatio:oe&&this.ǃNs/oe.innerHeight,xParentRatio:oe&&this.ǃcHC()/oe.innerWidth,yParentRatio:oe&&this.ǃcHh()/oe.innerHeight};Object.assign(le,...Ge),this.ǃcwE(le)}}ǃcHY(){this.ǃcHK=!0;let Ge=this.ǃcwp();if(this.ǃcox&&Ge)if(Ge.popup)this.ǃcVG(screen.width/2,screen.height/2);else{if(this.ǃcoJ)this.ǃcHz();else{var oe=this.ǃcoH&&this.ǃcoH.defaultView;if(oe&&"xRatio"in Ge&&"yRatio"in Ge)if("nested"in Ge&&"xParentRatio"in Ge&&"yParentRatio"in Ge){let le=this.ǃcHC(),ue=this.ǃcHh(),pe=Ge.xParentRatio*oe.innerWidth,ge=Ge.yParentRatio*oe.innerHeight;this.ǃcHF(Ge.xRatio*oe.innerWidth-(le-pe),Ge.yRatio*oe.innerHeight-(ue-ge))}else this.ǃcHF(Ge.xRatio*oe.innerWidth,Ge.yRatio*oe.innerHeight)}Ge.resizable&&(this.ǃEB(Ge.width),this.ǃEW(Ge.height)),this.ǃcoY()}this.ǃcHK=!1}static ǃcRm(Ge,oe){ǃG.ǃGD.ǃE$.ǃcoX(Ge,oe)}static ǃDJ(Ge,oe){return ǃG.ǃGD.ǃE$.ǃcor(Ge,oe)}static ǃcHl(Ge){return de.get(Ge)||null}ǃDs(Ge){if(ǃG.ǃoG(Ge),this.ǃcHm){let oe=Ge||window.app.ǃcu();this.ǃcHk!==oe&&(this.ǃcHm.textContent=oe,this.ǃcHk=oe)}}ǃcwy(){return this.ǃHH()}ǃHH(){return!!(this.ǃUk.open||this.ǃcHi||this.ǃcHR||this.ǃcHD)}ǃkM(){return this.ǃUk.open&&!this.ǃcHR}ǃcHw(){return!!(this.ǃcHi||this.ǃcHR||this.ǃcHD)}ǃcHM(){return!!this.ǃDN}ǃcHo(){return this.ǃcoH===document}ǃcou(){return ǃG.ǃGD.ǃE$.ǃcou(this)}ǃut(){return ǃG.ǃGD.ǃE$.ǃut(this)}ǃ_T(){return this.ǃcHe||this.ǃcHW}ǃcoj(){return!!this.ǃcHe||!!this.ǃcHW}ǃcHH(){return!!this.ǃcoj()&&-1!==this.ǃ_T().ǃcHI().indexOf(this)}ǃcHx(){return!!this.ǃcoj()&&-1!==this.ǃ_T().ǃcHJ().indexOf(this)}ǃcHZ(){return this.ǃcoF}ǃbg(){return this.ǃcol}ǃcHS(){return this.ǃcow}ǃciC(Ge){ǃG.ǃbv(Ge);let oe=this.ǃUk.querySelector("."+Ge);if(!oe)throw new Error(`missing dialog element with class name: ${Ge}`);return oe}ǃcHs(Ge){ǃG.ǃbv(Ge);let oe=this.ǃUk.querySelector("#"+Ge);if(!oe)throw new Error(`missing dialog element with id: ${Ge}`);return oe}ǃcHO(Ge){ǃG.ǃbv(Ge);let oe=this.ǃUk.getElementsByTagName(Ge);if(!oe)throw new Error(`tag '${Ge}' does not match any element`);return oe}ǃcHQ(Ge){ǃG.ǃbv(Ge);let oe=this.ǃUk.querySelector(Ge);if(!oe)throw new Error(`CSS selector '${Ge}' does not match any element`);return oe}ǃcrh(){return this.ǃDN}ǃcIc(Ge){this.ǃcoH=Ge?Ge.ownerDocument:this.ǃDN?this.ǃDN.document:document,assert(this.ǃcoH,"no display document for dialog")}ǃcIG(Ge){ǃG.ǃg(Ge,ǃG.ǃGD.ǃDZ);let oe=this.ǃcHf.indexOf(Ge);assert(-1===oe,"child popup window is already part of parent dialog"),this.ǃcHf.push(Ge),Ge.addEventListener(_168,this.ǃcHg)}ǃcIm(Ge){ǃG.ǃg(Ge,ǃG.ǃGD.ǃDZ);let oe=this.ǃcHf.indexOf(Ge);assert(-1!==oe,"child popup window is not part of parent dialog"),this.ǃcHf.splice(oe,1),Ge.removeEventListener(_168,this.ǃcHg)}ǃcHN(Ge){let oe=Ge.ǃcoz,le=oe.ǃ_T();assert(le,"parent can not be null when a child popup is closed"),le.ǃcIm(oe)}ǃcID(Ge){ǃG.ǃg(Ge,ǃG.ǃGD.ǃDZ);let oe=this.ǃcHp.indexOf(Ge);assert(-1===oe,"child dialog is already part of parent dialog"),Ge.ǃcHe=this,this.ǃcHp.length||(this.addEventListener(_167,this.ǃcHq),this.addEventListener(_161,this.ǃcHq),this.addEventListener(_162,this.ǃcHq),this.addEventListener(_165,this.ǃcHU),this.addEventListener(_164,this.ǃcHU)),this.ǃcHp.push(Ge)}ǃcIi(Ge){ǃG.ǃg(Ge,ǃG.ǃGD.ǃDZ);let oe=this.ǃcHp.indexOf(Ge);assert(-1!==oe,"child dialog is not part of parent dialog"),this.ǃcHp.splice(oe,1),Ge.ǃcHe=null,this.ǃcHp.length||(this.removeEventListener(_167,this.ǃcHq),this.removeEventListener(_161,this.ǃcHq),this.removeEventListener(_162,this.ǃcHq),this.removeEventListener(_165,this.ǃcHU),this.removeEventListener(_164,this.ǃcHU))}ǃcIR(){for(let Ge of this.ǃcHp)Ge.ǃcHe=null,Ge.ǃcHA||Ge.ǃDz();if(ǃG.ǃGs(this.ǃcHp),!this.ǃcHA){for(let Ge of this.ǃcHf)Ge.removeEventListener(_168,this.ǃcHg),Ge.ǃcHW=null,Ge.ǃcHA||Ge.ǃDz();ǃG.ǃGs(this.ǃcHf)}this.removeEventListener(_167,this.ǃcHq),this.removeEventListener(_161,this.ǃcHq),this.removeEventListener(_162,this.ǃcHq),this.removeEventListener(_165,this.ǃcHU),this.removeEventListener(_164,this.ǃcHU)}ǃLI(){return!!this.ǃcHp.length}ǃcIb(){return!!this.ǃcHf.length}ǃcHI(){return this.ǃcHp}ǃcHJ(){return this.ǃcHf}*ǃcws(){for(let Ge=this.ǃcHp.length-1;0<=Ge;--Ge)yield this.ǃcHp[Ge]}ǃcHC(){return this.ǃcHe?this.ǃcHe.ǃNS+this.ǃcHe.ǃcIT():0}ǃcHh(){return this.ǃcHe?this.ǃcHe.ǃNs+this.ǃcHe.ǃcIT():0}ǃcHa(){let oe=this.ǃpi()-this.ǃcHy,le=this.ǃpR()-this.ǃcHB;for(let ue of this.ǃcHp)ue.ǃcHF(ue.ǃcHy-oe,ue.ǃcHB-le)}ǃcHv(){this.ǃcHy=this.ǃpi(),this.ǃcHB=this.ǃpR();for(let oe of this.ǃcHp)oe.ǃcHy=oe.ǃpi(),oe.ǃcHB=oe.ǃpR()}ǃ$i(Ge){return this.ǃcIk(),this.ǃcIX(!0,Ge)}ǃDS(Ge){return this.ǃcIk(),this.ǃcIX(!1,Ge)}ǃcIk(){assert(!1===this.ǃcHA,"_isPopupTransfer must be false"),assert(null===this.ǃcHe,"_parent must be null"),assert(null===this.ǃcHW,"_parentBeforeDetach must be null")}ǃcIX(Ge,oe){if(Ge=!!Ge,ǃG.ǃcXQ(oe),ǃG.ǃDG.ǃDc&&(Ge=!0),this.ǃHH()&&this.ǃcoy()!==Ge)throw new Error("dialog already showing with different modal setting");this.ǃcoZ=Ge;let le=this.ǃcI$();if(le)return le;if(this.ǃcHR&&(this.ǃcHD.cancel(),this.ǃcHD=null,this.ǃcIr()),this.ǃcHc=null,this.ǃcIc(oe),this.ǃHH())return this.ǃcHu;if(ǃG.ǃGD.ǃFh(this.ǃUk,"modal",this.ǃcoZ),ǃG.ǃGD.ǃFh(this.ǃUk,"non-modal",!this.ǃcoZ),this.ǃcHb&&this.ǃcIV(),this.ǃcoZ&&(ǃG.ǃGD.ǃcIA.ǃDS(oe),this.ǃcoS=ǃG.ǃGD.ǃV_("default",this.ǃcoH)),this.ǃcos?this.ǃUk.style.display="":this.ǃcoo!==this.ǃcoH&&(ǃG.ǃGD.ǃjE(this.ǃUk),this.ǃcoH.body.appendChild(this.ǃUk)),this.ǃcoZ?this.ǃUk.showModal():this.ǃUk.show(),this.ǃcIL(),ǃG.ǃGD.ǃE$.ǃcof(this,!0),this.ǃcwf())this.ǃcI_(),this.ǃcIt(),this.ǃcHY(),this.ǃcHb=!1,this.ǃcHT=!1;else if(this.ǃcHb)this.ǃcI_(),this.ǃcIt(),this.ǃcHb=!1,this.ǃcHT=!1;else if(this.ǃcHT){this.ǃUk.style.width=`${this.ǃhm}px`,this.ǃUk.style.height=`${this.ǃhD}px`;let ue=this.ǃNS,pe=this.ǃNs;this.ǃcI_(),this.ǃcHF(ue,pe),this.ǃcHT=!1}else ǃG.ǃDG.ǃDc&&this.ǃcHz();if(this.ǃcIP(),this.ǃcoH.defaultView.addEventListener("resize",this.ǃckB),this.ǃcHG&&!ǃG.ǃDG.ǃDc&&this.ǃcHG.addEventListener(_163,this.ǃyj),this.ǃcHi=!0,app.ǃcPG()&&!this.ǃcHA){let ue=this.ǃMl(),pe=ue.left+ue.width/2-this.ǃcHC(),ge=ue.top+ue.height/2-this.ǃcHh(),he=[{transform:`perspective(600px) translate3d(${this.ǃNS}px, ${this.ǃNs}px, -20px)`,transformOrigin:`${pe}px ${ge}px`,opacity:"0"},{transform:`perspective(600px) translate3d(${this.ǃNS}px, ${this.ǃNs}px, 0)`,transformOrigin:`${pe}px ${ge}px`,opacity:"1"}];this.ǃUk.style.transform="",this.ǃcHD=this.ǃUk.animate(he,ee),this.ǃcHD.onfinish=()=>this.ǃcIr()}else this.ǃcIr();return this.ǃcHA?this.ǃcHu:(this.ǃcol&&(this.ǃcol.scrollTop=0),this.ǃcwf()||this.ǃcHn(),this.ǃcHu?this.ǃcHu:this.ǃcIj())}ǃcIL(){if(!this.ǃcoZ&&!this.ǃcHM()){let Ge=ǃG.ǃGD.ǃE$.ǃcwS();if(Ge&&!Ge.ǃcHM()&&Ge.ǃkM()){if(this.ǃcos)throw new Error("not supported");ǃG.ǃGD.ǃjE(this.ǃUk),Ge.ǃGL().appendChild(this.ǃUk),Ge.ǃcID(this)}}}ǃcI$(){if(!this.ǃcoZ&&!this.ǃcHM()){let Ge=ǃG.ǃGD.ǃE$.ǃcwS();if(Ge&&Ge.ǃcHM()){if(this.ǃcHW=Ge,this.ǃcwf()){let oe=this.ǃcwp();this.ǃEB(oe.width),this.ǃEW(oe.height)}else this.ǃcIt();return this.ǃcVG().then(()=>{return this.ǃcIj()})}}}ǃcIj(){return this.ǃcHu=new Promise((Ge,oe)=>{this.ǃcoO=Ge,this.ǃcoQ=oe}),this.ǃcHu}ǃcIV(){this.ǃcHk||this.ǃDs(null),this.ǃciI()}ǃciI(){}ǃcId(){if(!this.ǃHH())throw new Error("dialog not open");if(ǃG.ǃGD.ǃmR.ǃcIE(),ǃG.ǃGD.ǃGr.ǃev.ǃcIe(this),!this.ǃcoj()&&this.ǃcHM()&&ǃG.ǃGD.ǃE$.ǃcot(this.ǃmV()).forEach(Ge=>{Ge===this||Ge.ǃDz(!0)}),ǃG.ǃGD.ǃbB.ǃcwx(this),this.ǃcoH.defaultView.removeEventListener("resize",this.ǃckB),this.ǃcHG&&this.ǃcHG.removeEventListener(_163,this.ǃyj),this.ǃcoZ&&ǃG.ǃGD.ǃcIA.ǃHI(),this.ǃcHD)return void(this.ǃcHi&&(this.ǃcHi=!1,this.ǃcHR=!0,ǃG.ǃcaJ(this.ǃcHD)));if(this.ǃcHR=!0,this.ǃcHn(),this.ǃcHH()&&this.ǃ_T().ǃcIi(this),(this.ǃLI()||this.ǃcIb())&&this.ǃcIR(),app.ǃcPG()&&!this.ǃcHA&&!this.ǃDN){let Ge=this.ǃMl(),oe=Ge.left+Ge.width/2-this.ǃcHC(),le=Ge.top+Ge.height/2-this.ǃcHh(),ue=[{transform:`perspective(600px) translate3d(${this.ǃNS}px, ${this.ǃNs}px, 0)`,transformOrigin:`${oe}px ${le}px`,opacity:"1"},{transform:`perspective(600px) translate3d(${this.ǃNS}px, ${this.ǃNs}px, -20px)`,transformOrigin:`${oe}px ${le}px`,opacity:"0"}];this.ǃUk.style.transform="",this.ǃcHD=this.ǃUk.animate(ue,ee),this.ǃcHD.onfinish=()=>this.ǃcIr()}else this.ǃcIr()}ǃcod(){return this.ǃcHR||!this.ǃHH()}ǃcih(){this.ǃcRW(!0)}ǃcRE(){this.ǃDz()}ǃcHE(){this.ǃcRE()}ǃcRW(Ge){this.ǃcHR||(this.ǃcIp(Ge),this.ǃcId())}ǃcIp(Ge){this.ǃcoO&&this.ǃcoO(Ge),this.ǃcHu=null}ǃDz(Ge=!1){Ge=!!Ge,Ge&&(this.ǃcHD=null);this.ǃcHR||(this.ǃcIf(),this.ǃcId())}ǃcIf(){this.ǃcoO&&this.ǃcoO(null),this.ǃcHu=null}ǃcIy(Ge){this.ǃcHR||(this.ǃcIB(Ge),this.ǃcId())}ǃcIB(Ge){this.ǃcoQ&&this.ǃcoQ(Ge),this.ǃcHu=null}ǃcIW(){}ǃcIu(){}ǃcIr(){this.ǃcHR&&(!this.ǃcHA&&(this.ǃjL(),ǃG.ǃGD.ǃE$.ǃcof(this,!1),ǃG.ǃGD.ǃVe(this.ǃcoS),this.ǃcoS=null),this.ǃUk.close(),!this.ǃcHA&&this.ǃDN&&(this.ǃcrY(),this.ǃcHT=!0),this.ǃcos?this.ǃUk.style.display="none":this.ǃcoo!==this.ǃcoH&&(ǃG.ǃGD.ǃjE(this.ǃUk),this.ǃcoo.body.appendChild(this.ǃUk)),this.ǃcoH=null,this.ǃcHc&&(this.ǃcHc(),this.ǃcHc=null),this.ǃcIu()),this.ǃcHi&&this.ǃcIW();let Ge=this.ǃcHi;this.ǃcHi=!1,this.ǃcHR=!1,this.ǃcHD=null,Ge&&!this.ǃcHA&&(ǃG.ǃDG.ǃDc?this.ǃcHz():this.ǃcIU()),this.ǃcwU()}ǃjL(){}ǃlM(){return new Promise(Ge=>{this.ǃcHc=Ge})}ǃmV(){return this.ǃcoH}ǃDF(){return this.ǃmV().defaultView}ǃcoy(){return this.ǃcoZ}ǃcoh(){return this.ǃuj()&&this.ǃcwH()}ǃcHj(Ge){Ge.preventDefault(),ǃG.ǃi.ǃT("ui.dialogs.caption-menu");let oe=ǃG.ǃX(ǃG.ǃGD.ǃmR,this.ǃcHG);this.ǃcoh()&&oe.ǃmb("open-popup",lang(".open-to-popup-window"),()=>this.ǃcVG(),{ǃXZ:!0}),oe.ǃmb("close",lang(".close"),()=>this.ǃcRE()),oe.ǃm$(Ge.clientX,Ge.clientY),ǃG.ǃi.ǃW()}ǃcVG(Ge,oe){if(ǃG.ǃNv(Ge),ǃG.ǃNv(oe),this.ǃcHV)throw new Error("already awaiting popup window");if(this.ǃDN)throw new Error("already in popup window");return this.ǃcoh()?(this.ǃcHV=!0,this.ǃcog("beforepopupopen"),ǃG.ǃGD.ǃiG.ǃcoG("window.html",this.ǃclE,this.ǃcE(),this.ǃce(),Ge,oe).then(le=>{return le.addEventListener("unload",()=>this.ǃcIv(le)),this.ǃcIq(le)}).catch(()=>{this.ǃcHV=!1,this.ǃcHn();let ue=ǃG.ǃGD.ǃDZ.ǃDJ("OK");ue.ǃ$i("Unable to open a popup window. If the browser warned you about a popup, you will need to approve it and then try again. Otherwise you may need to configure your browser or popup blocker to allow popups for this page."),this.ǃcog(_168)})):void 0}ǃcIa(){return this.ǃLI()?Promise.resolve().then(()=>{return Promise.all(this.ǃcHI().map(Ge=>{return this.ǃcIG(Ge),Ge.ǃcVG()}))}):Promise.resolve()}ǃcIq(Ge){return Promise.resolve().then(()=>{return this.ǃcIa()}).then(()=>{if(ǃG.ǃGD.ǃE$.ǃcoe(Ge),this.ǃcHA=!0,this.ǃcHW=this.ǃ_T(),this.ǃcoj()&&!this.ǃcHx()&&this.ǃcHW.ǃcIG(this),this.ǃHH())return this.ǃcId()}).then(()=>{return this.ǃcHV=!1,this.ǃDN=Ge,window.addEventListener("unload",this.ǃcHL),this.ǃUk.setAttribute(_166,""),this.ǃUk.style.transform="",this.ǃUk.style.width="",this.ǃUk.style.height="",this.ǃcIX(this.ǃcoZ),this.ǃcHA=!1,Ge.document.title=this.ǃcHk,this.ǃcog("afterpopupopen"),Ge})}ǃcIv(Ge){this.ǃDN&&(ǃG.ǃGD.ǃE$.ǃcop(Ge),this.ǃcog("beforepopupclose"),this.ǃcHA=!0,this.ǃhm=ǃG.ǃAR(this.ǃDN.innerWidth,this.ǃcHX,ǃG.ǃcao(0.9*window.innerWidth)),this.ǃhD=ǃG.ǃAR(this.ǃDN.innerHeight,this.ǃcH$,ǃG.ǃcao(0.9*window.innerHeight)),window.removeEventListener("unload",this.ǃcHL),this.ǃcId(),this.ǃDN=null,this.ǃUk.removeAttribute(_166),this.ǃcHT=!0,this.ǃcoj()&&(!this.ǃcoj()||this.ǃ_T().ǃcHM())?this.ǃcIf():this.ǃcIX(this.ǃcoZ),this.ǃcog(_168),this.ǃcHA=!1,this.ǃcHW=null)}ǃcrY(){if(this.ǃDN){this.ǃhm=ǃG.ǃAR(this.ǃDN.innerWidth,this.ǃcHX,ǃG.ǃcao(0.9*window.innerWidth)),this.ǃhD=ǃG.ǃAR(this.ǃDN.innerHeight,this.ǃcH$,ǃG.ǃcao(0.9*window.innerHeight));let Ge=this.ǃDN;this.ǃDN=null,Ge.close(),this.ǃUk.removeAttribute(_166),this.ǃcHV=!1}}ǃcwv(){if(this.ǃHH()){super.ǃcwv(),this.ǃNS=ǃG.ǃcao(this.ǃcwT.left),this.ǃNs=ǃG.ǃcao(this.ǃcwT.top);let Ge=2*this.ǃcIT();this.ǃhm=this.ǃcwT.right-this.ǃcwT.left-Ge,this.ǃhD=this.ǃcwT.bottom-this.ǃcwT.top-Ge}}ǃcI_(){this.ǃcHz(),this.ǃUk.style.margin="0",this.ǃUk.style.position="absolute",this.ǃUk.style.left="0px",this.ǃUk.style.top="0px",this.ǃcwU()}ǃcHz(){this.ǃcwU(),super.ǃMl();let Ge=2*this.ǃcIT(),oe=(this.ǃhm+Ge)/2,le=(this.ǃhD+Ge)/2,ue=this.ǃcoH.defaultView.innerWidth/2,pe=this.ǃcoH.defaultView.innerHeight/2;this.ǃNS=ǃG.ǃcao(ue-oe-this.ǃcHC()),this.ǃNs=ǃG.ǃcao(pe-le-this.ǃcHh()),this.ǃcIU()}ǃcIt(){let Ge=ǃG.ǃGD.ǃclo("min-width",{ǃcXT:this.ǃUk});if(!Ge.endsWith("px"))throw new Error("CSS style for dialog min-width must specify the size in units of 'px'");let oe=parseInt(Ge,10);isFinite(oe)||(oe=this.ǃuj()?300:125),this.ǃcHX=oe;let le=ǃG.ǃGD.ǃclo("min-height",{ǃcXT:this.ǃUk});if(!le.endsWith("px"))throw new Error("CSS style for dialog min-height must specify the size in units of 'px'");let ue=parseInt(le,10);isFinite(ue)||(ue=this.ǃuj()?200:50),this.ǃcH$=ue}ǃMl(){if(!this.ǃcHb||this.ǃcoj()){let Ge=2*this.ǃcIT(),oe=this.ǃcHC(),le=this.ǃcHh();return{left:this.ǃNS+oe,top:this.ǃNs+le,right:this.ǃNS+this.ǃhm+Ge+oe,bottom:this.ǃNs+this.ǃhD+Ge+le,width:this.ǃhm+Ge,height:this.ǃhD+Ge}}return super.ǃMl()}ǃcIU(){this.ǃcHi||this.ǃcHR||(this.ǃcHM()?this.ǃUk.style.transform="":this.ǃUk.style.transform=`translate(${this.ǃNS}px,${this.ǃNs}px)`)}ǃcHF(Ge,oe){ǃG.ǃTH(Ge),ǃG.ǃTH(oe),Ge=ǃG.ǃcao(Ge),oe=ǃG.ǃcao(oe);this.ǃNS===Ge&&this.ǃNs===oe||this.ǃDN||(this.ǃNS=Ge,this.ǃNs=oe,this.ǃcIU(),this.ǃcwU(),this.ǃcog(_167),this.ǃcHn())}ǃEu(Ge){ǃG.ǃTH(Ge),Ge=ǃG.ǃcao(Ge);this.ǃNS===Ge||this.ǃDN||(this.ǃNS=Ge,this.ǃcIU(),this.ǃcwU(),this.ǃcog(_167),this.ǃcHn())}ǃpi(){return this.ǃMl(),this.ǃNS}ǃcIg(){return this.ǃpi()+this.ǃcIT()+this.ǃcHC()}ǃEU(Ge){ǃG.ǃTH(Ge),Ge=ǃG.ǃcao(Ge);this.ǃNs===Ge||this.ǃDN||(this.ǃNs=Ge,this.ǃcIU(),this.ǃcwU(),this.ǃcog(_167),this.ǃcHn())}ǃpR(){return this.ǃMl(),this.ǃNs}ǃcIN(){return this.ǃpR()+this.ǃcIT()+this.ǃcHh()}ǃEB(Ge){ǃG.ǃTH(Ge),Ge=ǃG.ǃcao(Ge),GeGe&&this.ǃEB(Ge-le),this.ǃhD+le>oe&&this.ǃEW(oe-le);let ue=-this.ǃcHC(),pe=-this.ǃcHh();this.ǃNSGe&&this.ǃEu(Ge-this.ǃhm-le+ue),this.ǃNsoe&&this.ǃEU(oe-this.ǃhD-le+pe)}this.ǃcog("resize")}}ǃcIP(){if(!ǃG.ǃDG.ǃDc&&!this.ǃcHM())for(;ǃG.ǃGD.ǃE$.ǃcoW(this);)this.ǃcHF(this.ǃpi()+ae,this.ǃpR()+ae)}ǃVE(Ge,oe){return ǃG.ǃTH(Ge),ǃG.ǃTH(oe),!!this.ǃHH()&&super.ǃVE(Ge,oe)}ǃcHP(Ge,oe,le){ǃG.ǃTH(Ge),ǃG.ǃTH(oe),ǃG.ǃNv(le),ǃG.ǃGD.ǃE$.ǃcoa(this,Ge,oe,le)}ǃP_(Ge){let oe=Ge.which;return this.ǃcHR?void Ge.preventDefault():void(oe===ǃG.ǃEj.ǃuI?(Ge.preventDefault(),this.ǃcRE()):oe!==ǃG.ǃEj.ǃBz||Ge.shiftKey||(Ge.preventDefault(),this.ǃcih()))}ǃcIT(){return this.ǃcHM()?0:this.ǃuj()?ǃG.ǃGD.ǃclJ():ǃG.ǃGD.ǃclx()}ǃcoN(Ge,oe){if(ǃG.ǃTH(Ge),ǃG.ǃTH(oe),!this.ǃuj())return"";if(ǃG.ǃDG.ǃDc)return"";let le=this.ǃMl(),ue=this.ǃcIT(),pe=2*ue,ge="";return Ge>le.left+ue&&Gele.top+ue&&oe=le.left&&Ge<=le.left+pe?oe>=le.top&&oe<=le.top+pe?ge="nw":oe<=le.bottom&&oe>=le.bottom-pe?ge="sw":oe>le.top+pe&&oe=le.right-pe?oe>=le.top&&oe<=le.top+pe?ge="ne":oe<=le.bottom&&oe>=le.bottom-pe?ge="se":oe>le.top+pe&&oe=le.right-ue&&(ge="e"):Ge>le.left+pe&&Ge=le.top&&oe<=le.top+ue?ge="n":oe<=le.bottom&&oe>=le.bottom-ue&&(ge="s")),ge}ǃcog(Ge){ǃG.ǃbv(Ge);let oe=new ǃG.Event(Ge);oe.ǃcoz=this,this.dispatchEvent(oe)}ǃcIK(){if(this.ǃcos)throw new Error("already keeping in main document");this.ǃcos=!0,this.ǃcoo=document,document.body.appendChild(this.ǃUk),this.ǃUk.style.display="none"}}}{const ee=[{opacity:"0"},{opacity:"1"}],te={duration:200,easing:"ease-out"},ne={duration:200,easing:"ease-out",direction:"reverse"};let ie=null,me=null,ae=!1,de=!1,re=null,Ge=0;ǃG.ǃGD.ǃcIA=class{constructor(){throw new TypeError("static class can't be instantiated")}static ǃDS(le){return re=le?le.ownerDocument:document,assert(re,"no display document for dimmer"),++Ge,me?void(de&&(de=!1,ae=!0,ǃG.ǃcaJ(me))):void(ie||(!window.C3_IsPopupWindow&&ǃG.ǃGD.ǃiG.ǃcob(!0),ie=ǃG.ǃGD.ǃXK("div",re.body,null,"c3-dimmer"),ae=!0,app.ǃcPG()?(me=ie.animate(ee,te),me.onfinish=ǃG.ǃGD.ǃcIA.ǃcIr):ǃG.ǃGD.ǃcIA.ǃcIr()))}static ǃHI(){if(0!=Ge)return(--Ge,!(0{this.ǃcIY=()=>{this.ǃcIh=!0,this.ǃcIC.files.length?ie?ae(this.ǃcIC.files):ae(this.ǃcIC.files[0]):ae(null),this.ǃjL()},this.ǃcIC.addEventListener("change",this.ǃcIY),this.ǃcIC.click()})}ǃjL(){this.ǃcIC.removeEventListener("change",this.ǃcIY),this.ǃcIY=null,this.ǃcYN.defaultView.removeEventListener("focus",this.ǃcIz),this.ǃcIz=null,ǃG.ǃGD.ǃjE(this.ǃcIC),this.ǃcIC=null,this.ǃcYN=null}},"use strict";{const ee=ǃG.ǃc(),te=ee.getElementById("okDialog"),ie={message:"",align:"center",ǃcIF:!1},me=ǃG.ǃGD.ǃDZ.ǃcIl=class extends ǃG.ǃGD.ǃDZ{constructor(){super(te),this.ǃcIw=this.ǃciC("okMessage"),this.ǃciM=this.ǃciC("okButton"),this.ǃciM.onclick=()=>this.ǃcih(),this.ǃcox=!1}ǃciI(){this.ǃciM.textContent=lang("common.ok")}ǃ$i(de,re){let Ge;ǃG.ǃcaX(de)?(Ge=Object.assign({},ie),Ge.message=de):(ǃG.ǃD_(de),Ge=Object.assign({},ie,de));let oe=Ge.message;return ǃG.ǃGD.ǃFh(this.ǃbg(),"alignleft","left"===Ge.align),ǃG.ǃGD.ǃFh(this.ǃbg(),"selectable",Ge.ǃcIF),"string"==typeof oe||oe.ǃcKH()?ǃG.ǃGD.ǃclw(this.ǃcIw,oe.toString()):ǃG.ǃcmS(this.ǃcIw,oe),super.ǃ$i(re)}ǃjL(){this.ǃDs(null)}};ǃG.ǃGD.ǃE$.ǃcRG.addEventListener("load",function(){ǃG.ǃGD.ǃDZ.ǃcRm("OK",me)})}{const ee=ǃG.ǃc(),te=ee.getElementById("confirmDialog"),ie=ǃG.ǃGD.ǃDZ.ǃcIo=class extends ǃG.ǃGD.ǃDZ{constructor(){super(te),this.ǃp$=null,this.ǃcIH=this.ǃciC("confirmMessage"),this.ǃcII=this.ǃciC("confirmButton"),this.ǃcox=!1,this.ǃcII.onclick=()=>{return this.ǃp$&&this.ǃp$(),this.ǃcih()},this.ǃcRd=this.ǃciC("cancelConfirmButton"),this.ǃcRd.onclick=()=>this.ǃcRE()}ǃciI(){}ǃ$i(ae,de){ǃG.ǃcXB(ae),ǃG.ǃcXQ(de);let re=ae.caption||"",Ge=ae.message||"",oe=ae.ǃpr||lang("common.ok"),le=ae.ǃcIx||lang("common.cancel");return re&&this.ǃDs(re),"string"==typeof Ge||Ge.ǃcKH()?ǃG.ǃGD.ǃclw(this.ǃcIH,Ge.toString()):ǃG.ǃcmS(this.ǃcIH,Ge),this.ǃcII.textContent=oe,this.ǃcRd.textContent=le,super.ǃ$i(de)}ǃjL(){this.ǃp$=null}};ǃG.ǃGD.ǃE$.ǃcRG.addEventListener("load",function(){ǃG.ǃGD.ǃDZ.ǃcRm("Confirm",ie)})}{const ee=ǃG.ǃc(),te=ee.getElementById("confirmMultipleDialog"),ie=ǃG.ǃGD.ǃDZ.ǃcIJ=class extends ǃG.ǃGD.ǃDZ{constructor(){super(te),this.ǃcIH=this.ǃciC("confirmMultipleMessage"),this.ǃcIZ=this.ǃciC("confirmMultipleButtonWrap"),this.ǃcIS=""}ǃciI(){}ǃ$i(ae,de){ǃG.ǃcXB(ae),ǃG.ǃcXQ(de),ǃG.ǃkF(ae.options),ae.ǃlh&&ae.options.push({text:lang("common.cancel"),tag:"cancel"});const re=ae.caption||"",Ge=ae.message||"";re&&this.ǃDs(re),"string"==typeof Ge||Ge.ǃcKH()?ǃG.ǃGD.ǃclw(this.ǃcIH,Ge.toString()):ǃG.ǃcmS(this.ǃcIH,Ge);const oe=super.ǃ$i(de);for(let le=0,ue=ae.options.length;lethis.ǃcih(he),0===le&&(this.ǃcIS=he,ve.setAttribute("main","")),lethis.ǃcbV(),100)):(this.ǃcxm(!0),this.ǃDs(this.ǃcxG));let oe=super.ǃ$i(Ge);return this.ǃyP||(this.ǃyP=ǃG.ǃGD.ǃV_("wait")),oe}ǃcxm(re){re=!!re;this.ǃcIQ===re||(this.ǃcIQ=re,this.ǃcIQ?(this.ǃcIO.removeAttribute("value"),this.ǃcIO.removeAttribute("max")):(this.ǃcIO.value=this.ǃcxc,this.ǃcIO.max=1))}ǃcbV(re){if(this.onprogress){let Ge=this.onprogress();(this.ǃcxc!==Ge||re)&&(this.ǃcxc=Ge,null===this.ǃcxc?(this.ǃcxm(!0),this.ǃDs(this.ǃcxG.replace("{0}","0"))):(this.ǃcxc=ǃG.ǃAR(this.ǃcxc,0,1),this.ǃcxm(!1),this.ǃcIO.value=this.ǃcxc,this.ǃDs(this.ǃcxG.replace("{0}",Math.round(1e3*Ge)/10))))}}ǃcId(){-1!==this.ǃcYf&&(window.clearInterval(this.ǃcYf),this.ǃcYf=-1),ǃG.ǃGD.ǃVe(this.ǃyP),this.ǃyP=null,this.onprogress=null,this.ǃcxc=0,super.ǃcId()}ǃcih(){}ǃcRE(){}};ǃG.ǃGD.ǃE$.ǃcRG.addEventListener("load",function(){ǃG.ǃGD.ǃDZ.ǃcRm("Progress",ae)})}{const _175="Calculating...",ee=ǃG.ǃc(),te=ee.getElementById("downloadDialog"),ae=ǃG.ǃGD.ǃDZ.ǃwc=class extends ǃG.ǃGD.ǃDZ{constructor(){super(te),this.ǃcIO=this.ǃciC("downloadProgressBar"),this.ǃcxD=this.ǃciC("downloadDetails"),this.ǃcYf=-1,this.ǃcxi="",this.ǃcxR="",this.ǃcxb=0,this.ǃcxT=0,this.ǃcxk=0,this.ǃcxX=[],this.ǃcx$=0,this.ǃcxr=!1,this.ǃyP=null,this.ǃcox=!1}ǃciI(){}ǃ$i(re,Ge){ǃG.ǃbv(re),this.ǃcxi=re,this.ǃcxb=0,this.ǃcxT=0,this.ǃcx$=0,this.ǃcxk=0,ǃG.ǃGs(this.ǃcxX),this.ǃcxr=!0;let oe=this.ǃcxi.lastIndexOf("/");this.ǃcxR=this.ǃcxi.substring(oe+1),this.ǃDs("Downloading...");let le=super.ǃ$i(Ge);return this.ǃyP||(this.ǃyP=ǃG.ǃGD.ǃV_("progress")),ǃG.ǃ$p(re,ue=>this.ǃcxV(ue)).then(ue=>{ǃG.ǃGD.ǃVe(this.ǃyP),this.ǃyP=null,this.ǃcRW(ue)}).catch(ue=>{ǃG.ǃGD.ǃVe(this.ǃyP),this.ǃyP=null,this.ǃcIy(ue)}),this.ǃcYf=window.setInterval(()=>this.ǃcxA(!0),1e3),this.ǃcxA(),le}ǃcxV(re){if(re.lengthComputable){this.ǃcx$=re.total,this.ǃcxT=re.loaded,this.ǃcxr&&(this.ǃcxr=!1,this.ǃcxA(!1));let Ge=100*this.ǃcxT/this.ǃcx$;this.ǃcIO.value=Ge,this.ǃDs(`Downloading (${Math.round(Ge)}%)...`)}}ǃcxL(re){ǃG.ǃTH(re),this.ǃcxX.length>=10&&this.ǃcxX.shift(),this.ǃcxX.push(re)}ǃcx_(){if(0===this.ǃcxX.length)return 0;let re=0;for(let Ge of this.ǃcxX)re+=Ge;return re/this.ǃcxX.length}ǃcxA(re){re&&(this.ǃcxk=this.ǃcxT-this.ǃcxb,this.ǃcxL(this.ǃcxk),this.ǃcxb=this.ǃcxT);let Ge="Downloading: "+this.ǃcxR;0",Ge+="Speed: ",Ge+=0===this.ǃcxk?_175:ǃG.ǃcKS(this.ǃcxk,!0);let oe=navigator.connection||navigator.ǃcxt||navigator.ǃcxP,le=oe?oe.type:"";le&&"other"!==le&&"unknown"!==le&&(Ge+=" ("+le+")"),Ge+="
",Ge+="Time remaining: ";let ue=-1;if(2>this.ǃcxX.length)Ge+=_175;else{let pe=this.ǃcx_();0===pe?Ge+="Stalled...":(ue=(this.ǃcx$-this.ǃcxT)/pe,ue=5*Math.round(ue/5),Ge+=5>ue?lang("common.time.a-few-seconds"):ǃG.ǃcnm(ue,{ǃcKs:!0}))}this.ǃcxD.innerHTML=Ge,this.ǃcHz()}ǃcId(){window.clearInterval(this.ǃcYf),this.ǃcYf=-1,super.ǃcId()}ǃcih(){}ǃcRE(){}};ǃG.ǃGD.ǃE$.ǃcRG.addEventListener("load",function(){ǃG.ǃGD.ǃDZ.ǃcRm("Download",ae)})}{const ee=ǃG.ǃc(),te=ee.getElementById("openPopupWindowDialog"),ne=ǃG.ǃm(ee.URL);ǃG.ǃi.ǃD(ne+"lang");const me=ǃG.ǃGD.ǃDZ.ǃcxj=class extends ǃG.ǃGD.ǃDZ{constructor(){super(te),this.ǃcIH=this.ǃciC("openPopupWindowMessage"),this.ǃcxd=this.ǃciC("openPopupWindowTryAgain"),this.ǃcxd.onclick=()=>this.ǃcih(),this.ǃcRd=this.ǃciC("openPopupWindowCancel"),this.ǃcRd.onclick=()=>this.ǃcRE(),this.ǃcxi="",this.ǃcxE="",this.ǃcox=!1}ǃciI(){this.ǃDs(lang("ui.dialogs.openPopupWindow.caption")),this.ǃcIH.textContent=lang("ui.dialogs.openPopupWindow.body")}ǃ$i(de,re,Ge){return this.ǃcxi=de,this.ǃcxE=re,super.ǃ$i(Ge)}ǃcih(){let de=window.open(this.ǃcxi,null,this.ǃcxE);de&&this.ǃcRW(de)}};ǃG.ǃGD.ǃE$.ǃcRG.addEventListener("load",function(){ǃG.ǃGD.ǃDZ.ǃcRm("OpenPopupWindow",me)})}{const _177="option",_178="ui.dialogs.std.font-picker",_179="ui.dialogs.std.font-picker.none-selected",ee=ǃG.ǃc(),te=ee.getElementById("fontPickerDialog"),ie=250,me={ǃQe:"",ǃQp:"",ǃQf:20,ǃQy:[],ǃQB:""},ae=ǃG.ǃGD.ǃDZ.ǃcxe=class extends ǃG.ǃGD.ǃDZ{constructor(){super(te),this.ǃciM=this.ǃciC("okButton"),this.ǃciM.onclick=()=>this.ǃcih(),this.ǃcRd=this.ǃciC("cancelButton"),this.ǃcRd.onclick=()=>this.ǃcRE(),this.ǃcxp=this.ǃciC("fontPickerLocalHeaderText"),this.ǃcxf=this.ǃciC("localFontSelect"),this.ǃcxf.addEventListener("change",()=>this.ǃcxy()),this.ǃcxB=this.ǃciC("additionalFontSection"),this.ǃcxW=this.ǃciC("fontPickerAdditionalHeaderText"),this.ǃcxu=this.ǃciC("additionalFontSelect"),this.ǃcxu.addEventListener("change",()=>this.ǃcxU()),this.ǃcxv=this.ǃciC("sampleTextHeader"),this.ǃcxq=this.ǃciC("sampleText"),this.ǃcxa="",this.ǃcxg=this.ǃciC("fontPickerMorePreview"),this.ǃcxg.onclick=()=>this.ǃcxN(),this.ǃcxK="",this.ǃcxn="",this.ǃcxM=!1,this.ǃYv=!1,this.ǃcox=!1}ǃciI(){ǃG.ǃi.ǃT(_178),this.ǃDs(lang(".caption")),this.ǃcxp.textContent=lang(".loading-message"),this.ǃciM.textContent=lang("common.ok"),this.ǃcRd.textContent=lang("common.cancel"),this.ǃcxg.textContent=lang(".more-preview"),ǃG.ǃi.ǃW()}ǃ$i(re,Ge){ǃG.ǃD_(re),re=Object.assign({},me,re),ǃG.ǃbv(re.ǃQe),ǃG.ǃbv(re.ǃQp),ǃG.ǃkF(re.ǃQy),ǃG.ǃbv(re.ǃQB),this.ǃcxM||this.ǃYv||this.ǃcxC(),this.ǃcxK=re.ǃQe||"",this.ǃcxn=this.ǃcxK,this.ǃcxa=re.ǃQp||"";let oe=re.ǃQf;return 72ie&&(this.ǃcxa=this.ǃcxa.substr(0,ie)+"..."),re.ǃQy.length?(this.ǃcxB.removeAttribute("hidden"),this.ǃcxW.textContent=re.ǃQB||lang("ui.dialogs.std.font-picker.default-additional-fonts-header"),this.ǃcxh(re.ǃQy)):this.ǃcxB.setAttribute("hidden",""),this.ǃcxM&&(this.ǃcxq.textContent=this.ǃcxa||lang("ui.dialogs.std.font-picker.default-sample-text"),this.ǃcxY()),super.ǃ$i(Ge)}ǃcxC(){this.ǃYv=!0;let re=this.ǃGL().ownerDocument,Ge=re.createElement(_177);Ge.value="",Ge.textContent=lang(_179),this.ǃcxf.appendChild(Ge),ǃG.ǃcKv.ǃcKq().then(oe=>this.ǃcxz(oe))}ǃcxz(re){this.ǃYv=!1,this.ǃcxM=!0;let Ge=this.ǃGL().ownerDocument;for(let oe of re){let le=Ge.createElement(_177);le.value=oe,le.textContent=oe,le.style.fontFamily=oe,le.setAttribute("title",oe),le.addEventListener("UIDoubleTap",()=>this.ǃcRW(oe)),this.ǃcxf.appendChild(le)}this.ǃcxY(),ǃG.ǃi.ǃT(_178),this.ǃcxp.textContent=lang(".local-font-header"),this.ǃcxv.textContent=lang(".sample-text-header"),this.ǃcxq.textContent=this.ǃcxa||lang(".default-sample-text"),ǃG.ǃi.ǃW()}ǃcxh(re){let Ge=this.ǃGL().ownerDocument,oe=Ge.createElement(_177);oe.value="",oe.textContent=lang(_179),this.ǃcxu.appendChild(oe);for(let le of re){let ue=Ge.createElement(_177);ue.value=le,ue.textContent=le,ue.style.fontFamily=le,ue.setAttribute("title",le),ue.addEventListener("UIDoubleTap",()=>this.ǃcRW(le)),this.ǃcxu.appendChild(ue)}}ǃcxY(){this.ǃcxK&&(this.ǃcxf.value=this.ǃcxK,-1===this.ǃcxf.selectedIndex?(this.ǃcxu.value=this.ǃcxK,-1===this.ǃcxu.selectedIndex?(this.ǃcxf.selectedIndex=0,this.ǃcxy()):this.ǃcxU()):this.ǃcxy())}ǃcxy(){return 0===this.ǃcxf.selectedIndex?void(this.ǃcxf.style.fontFamily=""):void(this.ǃcxn=this.ǃcxf.value,this.ǃcxf.style.fontFamily=this.ǃcxn,this.ǃcxu.selectedIndex=0,this.ǃcxu.style.fontFamily="",this.ǃcxF())}ǃcxU(){return 0===this.ǃcxu.selectedIndex?void(this.ǃcxu.style.fontFamily=""):void(this.ǃcxn=this.ǃcxu.value,this.ǃcxu.style.fontFamily=this.ǃcxn,this.ǃcxf.selectedIndex=0,this.ǃcxf.style.fontFamily="",this.ǃcxF())}ǃcxF(){this.ǃcxq.style.fontFamily=this.ǃcxn}ǃcxN(){let re=ǃG.ǃGD.ǃDZ.ǃDJ("FontPreview");re.ǃ$i(this.ǃcxn,this.ǃGL())}ǃcih(){this.ǃcRW(this.ǃcxn)}ǃjL(){ǃG.ǃGD.ǃciO(this.ǃcxu)}};ǃG.ǃGD.ǃE$.ǃcRG.addEventListener("load",function(){ǃG.ǃGD.ǃDZ.ǃcRm("FontPicker",ae)})}{const ee=ǃG.ǃc(),te=ee.getElementById("fontPreviewDialog"),ne=ǃG.ǃm(ee.URL);ǃG.ǃi.ǃD(ne+"lang");const me=[5,8,11,14,20,36,48,72],ae=ǃG.ǃGD.ǃDZ.ǃcxl=class extends ǃG.ǃGD.ǃDZ{constructor(){super(te),this.ǃciM=this.ǃciC("okButton"),this.ǃciM.onclick=()=>this.ǃcih(),this.ǃcxw=this.ǃciC("fontPreviewBody"),this.ǃcox=!1}ǃciI(){this.ǃciM.textContent=lang("common.close-dialog")}ǃ$i(re,Ge){ǃG.ǃbv(re),ǃG.ǃi.ǃT("ui.dialogs.fontPreview"),this.ǃDs(ǃmo(".caption",re));let oe=lang(".example-text");ǃG.ǃi.ǃW();for(let le=0,ue;le{ǃG.ǃGD.ǃDZ.ǃcRm("FontPreview",ae)})}{const _180="left",_181="right",_182="hgrid",_183="vgrid",_184="bottom",_185="No point subdividing a Layout in the same direction",_186="Dock side incompatible with direction of this layout";ǃG.ǃGD.ǃGm=class extends ǃG.ǃDa{constructor(te,ne,ie){ǃG.ǃbv(te),ǃG.ǃmL(ie,ǃG.ǃGD.ǃGm.ǃok),super(),this.ǃcCQ=te,this.ǃcxo=ne,this.ǃcxH=ie||null,this.ǃcxI=!1,this.ǃcxH?(this.ǃUk=this.ǃcxH.ǃUk,this.ǃUk.id=te,this.ǃcxI=ie.ǃcxI):(this.ǃUk=ǃG.ǃGD.ǃXK("ui-pane",null,te),document.body.appendChild(this.ǃUk),ǃG.ǃGD.ǃclK(this)),this.ǃcxx=[],this.ǃcxJ=!0,this.ǃUk.removeAttribute(this.ǃcxo?_183:_182),this.ǃUk.setAttribute(this.ǃcxo?_182:_183,""),this.ǃcxZ=null,this.ǃcxS=!0,this.ǃYq=!1}ǃj_(){if(this.ǃYq)throw new Error("layout has already been released");if(ǃG.ǃGD.ǃclM(this))throw new Error("main layout can not be removed");this.ǃYq=!0,this.ǃUk=null,this.ǃcxH=null,this.ǃcxZ=null,ǃG.ǃz(this)}ǃcxs(te){te?(this.ǃUk.style.position="relative",this.ǃUk.style.top=window.innerHeight+100+"px"):(this.ǃUk.style.position="",this.ǃUk.style.top="")}ǃEK(){return this.ǃcCQ}ǃcxO(){return this.ǃcxo}ǃcxQ(){return this.ǃcxH}ǃcJc(te){return this.ǃcxx.includes(te)}ǃGL(){return this.ǃUk}ǃcJG(){return this.ǃcxx}ǃcJm(){return this.ǃcxI}ǃcJD(te){if(te=!!te,this.ǃcxI!==te){this.ǃcxI=te;for(let ne=0,ie=this.ǃcxx.length;ne=ie.left&&te=ie.top&&nene&&this.ǃcJs(ne,ie);for(let me=0,ae=this.ǃcxx.length;meGe;++Ge)re+=ae.charAt(Math.floor(Math.random()*de));super.ǃcwL("PANE_"+re)}else super.ǃcwL("PANE_"+me)}ǃcZ_(){const me=this instanceof ǃG.ǃGD.ǃGm.ǃcJX&&this.ǃDN,ae=this.ǃtj&&this.ǃtj.ǃcxH,de=this.ǃcZt(),re="main"!==this.ǃcCQ&&(this instanceof ǃG.ǃGD.ǃGm.ǃcJT&&"undefined"!=typeof this.ǃcJM?this.ǃcJM:!0);if(!(!me&&re&&(ae||de))){let Ge=this.ǃcZP((oe,le)=>{const ue={id:oe.ǃcCQ,size:oe.ǃCe,name:oe.ǃclE,devicePixelRatio:window.devicePixelRatio,popup:"CaptionPane"===oe.constructor.name&&!!oe.ǃDN,type:null,activeTab:oe.ǃcZj()};switch(oe.constructor){case ǃG.ǃGD.ǃGm.ǃcJ$:ue.side=oe.ǃcJy,ue.type="TabPane",ue.docked="main"!==oe.ǃcCQ&&oe.ǃcJM;break;case ǃG.ǃGD.ǃGm.ǃcJX:ue.caption=oe.ǃcZd,ue.side=oe.ǃcJy,ue.type="CaptionPane",ue.docked="main"!==oe.ǃcCQ&&oe.ǃcJM;break;case ǃG.ǃGD.ǃGm.ǃcJT:ue.side=oe.ǃcJy,ue.type="DockingPane",ue.docked="main"!==oe.ǃcCQ&&oe.ǃcJM;break;default:ue.type="Pane";}return"main"!==oe.ǃcCQ&&!1===oe.ǃcJM&&(ue.position={x:oe.ǃcZE,y:oe.ǃcZe,width:oe.ǃcZp,height:oe.ǃcZf}),oe.ǃcZX?ue.layout={tabSide:!1,id:oe.ǃcZX.ǃEK(),isHorizontal:oe.ǃcZX.ǃcxo,children:[]}:"TabPane"===ue.type&&(ue.layout={tabSide:oe.ǃcZB.ǃcZy,children:[]}),le&&le.layout&&le.layout.children.push(ue),ue});return Ge}}ǃcZW(){return this.ǃcwp()}ǃj_(){if(!this.ǃUk)throw new Error("removing pane which has already been removed");let me=new ǃG.Event("remove");me.ǃaU=this,this.dispatchEvent(me),this.ǃcZX&&(this.ǃcZX.ǃj_(),this.ǃcZX=null),ne.delete(this),super.ǃj_()}ǃrq(){return this.ǃtj}ǃcZu(){if(this.ǃcJN())throw new Error("pane has flex size");return parseInt(this.ǃCe,10)}ǃcJj(){return this.ǃCe}ǃcJF(me){if(ǃG.ǃbv(me),me=me.toLowerCase(),!ǃG.ǃGD.ǃcll(me))throw new Error(`invalid CSS length: '${me}'`);this.ǃCe=me}ǃcJN(){return this.ǃCe.includes("fr")}ǃcJP(){return this.ǃcJN()||this.ǃcJE()}ǃcJE(){return this.ǃcZT}ǃcJd(me){me=!!me,this.ǃcZT=me}ǃcXk(){this.ǃcZr=!1}ǃcZP(me,ae){if(this.ǃcZr){const de=me(this,ae);if(this.ǃcZX&&this.ǃcZX.ǃcxx)for(let re of this.ǃcZX.ǃcxx)re.ǃcZP(me,de);else if(this.constructor===ǃG.ǃGD.ǃGm.ǃcJ$)for(let re of this.ǃcZB.ǃcZU)re.ǃcZv.ǃcZP(me,de);return de}}ǃcwy(){return!1}ǃcJf(){return!1}ǃcJm(){return this.ǃcxI}ǃcJD(me){me=!!me;this.ǃcxI===me||(this.ǃcxI=me,this.ǃcZX&&this.ǃcZX.ǃcJD(me))}ǃcJz(me){this.ǃcZk=me}ǃcZq(){return this.ǃcZk}ǃcZt(){return!!this.ǃcZk}ǃcZj(){return this.ǃcZk&&this.ǃcZk.ǃcZa()===this}ǃcZb(){this.ǃtj&&(this.ǃtj.ǃcJr(this),this.ǃtj.ǃ$X(),this.ǃtj=null),ǃG.ǃGD.ǃjE(this.ǃUk),this.ǃcZg(),this.ǃcZN(),this.ǃcwU()}ǃjn(){return!!this.ǃUk.parentElement}ǃdW(){return this.ǃjn()}ǃcJK(me,ae){if(ǃG.ǃbv(me),ae=!!ae,this.ǃcZX)throw new Error("cannot create a sub-grid on a pane which already has one");return this.ǃcZX=ǃG.ǃX(ǃG.ǃGD.ǃGm,me,ae,this),this.ǃcZX}ǃcJa(me){if(ǃG.ǃg(me,ǃG.ǃGD.ǃGm),this.ǃcZX)throw new Error("cannot attach a sub grid on a pane which already has one");this.ǃcZX=me,this.ǃcZX.ǃcxH=this;let ae=me.ǃcxO();this.ǃUk.removeAttribute(ae?"vgrid":"hgrid"),this.ǃUk.setAttribute(ae?"hgrid":"vgrid","")}ǃcJq(me){ǃG.ǃg(me,ǃG.ǃGD.ǃGm),assert(this.ǃcZX,"Should not replace a sub grid on a pane which does not already have one"),assert(this.ǃcZX!==me,"Should not replace a sub grid with the same grid"),this.ǃcZX=me,this.ǃcZX.ǃcxH=this;let ae=new ǃG.Event("replacesubgrid");ae.ǃaU=this,ae.ǃcZK=me,this.dispatchEvent(ae)}ǃcJU(){return this.ǃcZX}ǃcJu(){return!!this.ǃcZX}ǃVE(me,ae,de){return ǃG.ǃTH(me),ǃG.ǃTH(ae),!de&&this.ǃcJu()?!1:super.ǃVE(me,ae)}ǃcZg(){this.ǃUk.style.gridColumn="",this.ǃUk.style.gridRow=""}ǃcZN(){this.ǃcZ$&&(this.ǃUk.removeAttribute(this.ǃcZ$),this.ǃcwU()),this.ǃcZ$=""}ǃcJp(me){ǃG.ǃTH(me),assert(1<=me&&20>=me,"Invalid grid row number, must be 1-20");let ae="row"+me;this.ǃcZ$===ae||(this.ǃcZN(),this.ǃcZ$=ae,this.ǃUk.setAttribute(this.ǃcZ$,""),this.ǃcwU())}ǃcJe(me){ǃG.ǃTH(me),assert(1<=me&&20>=me,"Invalid grid column number, must be 1-20");let ae="col"+me;this.ǃcZ$===ae||(this.ǃcZN(),this.ǃcZ$=ae,this.ǃUk.setAttribute(this.ǃcZ$,""),this.ǃcwU())}ǃcwU(){super.ǃcwU(),this.ǃcZX&&this.ǃcZX.ǃcwU()}ǃpi(){return this.ǃMl().left}ǃpR(){return this.ǃMl().top}ǃcE(){let me=this.ǃMl();return me.right-me.left}ǃce(){let me=this.ǃMl();return me.bottom-me.top}ǃcoM(){return this.ǃcJu()?this.ǃcZX.ǃcoM():this.ǃcHX}ǃcoC(){return this.ǃcJu()?this.ǃcZX.ǃcoC():this.ǃcH$}ǃcZn(){"PANE_main"===this.ǃcwi&&this.ǃcwe()}ǃcZM(){if("PANE_main"===this.ǃcwi){let me=[],ae;for(let de of ne)ae=de.ǃcZ_(),ae&&me.push(ae);this.ǃcwE(me)}}ǃcJl(){if(!this.ǃcwV){let me=this.ǃcE(),ae=this.ǃce();if(me!==this.ǃcZV||ae!==this.ǃcZA){this.ǃcZV=me,this.ǃcZA=ae;let de=new ǃG.Event("resize");de.ǃaU=this,this.dispatchEvent(de),this.ǃcZX&&this.ǃcZX.ǃcJQ()}}}ǃtL(me){ǃG.ǃmL(me,ǃG.ǃBc),this.ǃcZL=me}ǃt_(){return this.ǃcZL?this.ǃcZL.clone():null}static ǃcZC(me){return!!ne.has(me)&&this.ǃcZr}}}{const _188="left",_189="right",_190="bottom",_191="floating",_192="UIPointerDown",_193="complementary",_194="cannot set the position of a docked pane",ee=[_188,"top",_189,_190],te=300,ne=350;ǃG.ǃGD.ǃGm.ǃcJT=class extends ǃG.ǃGD.ǃGm.ǃok{constructor(Ge,oe,le,ue){super(Ge,oe,le,ue),this.ǃUk.setAttribute("role","section"),this.ǃcJM=!0,this.ǃcZh=!1,this.ǃcZY=!1,this.ǃcZz=!1,this.ǃcZF=!0,this.ǃcZl=0,this.ǃcJy="",this.ǃcHD=null,this.ǃyj=()=>this.ǃvA(),this.ǃUk.addEventListener(_192,this.ǃyj),this.ǃcZw=100,this.ǃcZo=100,this.ǃcZE=0,this.ǃcZe=0,this.ǃcZp=0,this.ǃcZf=0,this.ǃcHX=100,this.ǃcH$=100,this.ǃcZH=!0,this.ǃcZI=null,this.ǃcZx=0,ǃG.ǃGD.ǃrV.ǃcZJ(this)}ǃcJk(Ge){ǃG.ǃoG(Ge),this.ǃcJM=!1,this.ǃcZT=!1,this.ǃcJy=this.ǃtj.ǃcxO()?_188:"top";const oe=parseInt(Ge,10)||te;this.ǃcJF(`${oe}px`),this.ǃcZg(),this.ǃcZN(),this.ǃcZZ(),this.ǃcZS(this.ǃcZo,this.ǃcZw,oe,ne),document.body.appendChild(this.ǃUk),this.ǃcwU(),this.ǃvA()}ǃj_(){this.ǃcZH=!1,this.ǃUk.removeEventListener(_192,this.ǃyj),this.ǃyj=null,ǃG.ǃGD.ǃrV.ǃcZs(this),super.ǃj_()}ǃcJf(){return!0}ǃcJB(Ge){return ǃG.ǃbv(Ge),assert(ee.includes(Ge),"Invalid dock side parameter"),this.ǃcJy===Ge?void 0:this.ǃcZO()&&this.ǃcJE()?void(this.ǃcJy=Ge):void(this.ǃcZm(),this.ǃcZQ(Ge),this.ǃtj&&this.ǃtj.ǃcwU())}ǃcSc(){return this.ǃcZh}ǃcSG(){return this.ǃcZF}ǃaP(){this.ǃcZF=!1}ǃaj(){this.ǃcZF=!0}ǃcSm(){assert(!this.ǃcZk&&!this.ǃcJM,"should not be tabbed or docked to go in swipe-in mode"),this.ǃcZh=!0,this.ǃUk.setAttribute("swipe-in-"+this.ǃcJy,""),this.ǃUk.removeAttribute(_191),this.ǃUk.setAttribute("role",_193),this.ǃcSD(!0),this.ǃcSi(),ǃG.ǃGD.ǃrV.ǃcSR(this)}ǃcSb(){for(let Ge=document.activeElement;Ge;)if(Ge=Ge.parentElement,Ge===this.ǃUk)return void document.activeElement.blur()}ǃcST(Ge){Ge=!!Ge,this.ǃcSk();let oe=ǃG.ǃGD.ǃclC();this.ǃcZY=Ge,this.ǃcZY&&this.ǃcSD(!1),this.ǃcZY?(this.ǃcSX(this.ǃcJy===_188?0:oe-this.ǃcE()),ǃG.ǃGD.ǃbB.ǃby(this)):(this.ǃcSX(this.ǃcJy===_188?-this.ǃcE():oe),this.ǃcSb())}ǃcSk(){this.ǃcHD&&(this.ǃcHD.cancel(),this.ǃcIr())}ǃcSX(Ge){if(ǃG.ǃTH(Ge),this.ǃcZE===Ge)return void this.ǃcIr();let oe=this.ǃcZE;this.ǃEu(Ge),app.ǃcPG()?(this.ǃcHD=this.ǃUk.animate([{transform:`translate(${oe}px,${this.ǃcZe}px)`},{transform:`translate(${Ge}px,${this.ǃcZe}px)`}],{duration:200,easing:"ease"}),this.ǃcHD.onfinish=()=>this.ǃcIr()):this.ǃcIr()}ǃcIr(){this.ǃcHD=null,this.ǃcZY||this.ǃcSD(!0)}ǃcSD(Ge){Ge=!!Ge;this.ǃcZz===Ge||(Ge?(this.ǃMl(),this.ǃcZz=!0,this.ǃUk.style.display="none",this.ǃUk.setAttribute("aria-hidden","true")):(this.ǃUk.style.display="",this.ǃUk.removeAttribute("aria-hidden"),this.ǃcZz=!1,this.ǃcwU()),this.ǃcS$(!Ge))}ǃcwU(){this.ǃcZz||super.ǃcwU()}ǃMl(){return this.ǃcwy()?{left:this.ǃcZE,top:this.ǃcZe,right:this.ǃcZE+this.ǃcZp,bottom:this.ǃcZe+this.ǃcZf,width:this.ǃcZp,height:this.ǃcZf}:super.ǃMl()}ǃVE(Ge,oe,le){return this.ǃcZh&&!this.ǃcZY?!1:super.ǃVE(Ge,oe,le)}ǃcSr(Ge){ǃG.ǃTH(Ge),Ge=ǃG.ǃAR(Ge,0,1),this.ǃcSk();let oe=ǃG.ǃGD.ǃclC(),le=this.ǃcJy===_188?-this.ǃcE():oe,ue=this.ǃcJy===_188?0:oe-this.ǃcE(),pe=ǃG.ǃcao(ǃG.ǃyJ(le,ue,Ge));this.ǃEu(pe),this.ǃcSD(!1)}ǃcSV(){return this.ǃcJy===_188?(this.ǃpi()+this.ǃcE()+this.ǃcZl)/2:(this.ǃpi()+this.ǃcZl-ǃG.ǃGD.ǃclC())/2}ǃcSi(){this.ǃEU(0),this.ǃEW(Math.min(ǃG.ǃGD.ǃclh())),this.ǃEB(Math.min(ǃG.ǃGD.ǃclC()-50,375)),this.ǃcST(this.ǃcZY)}ǃcZm(){this.ǃcJy&&this.ǃUk.removeAttribute(`dock${this.ǃcJy}`)}ǃcZQ(Ge){Ge&&(this.ǃcJy=Ge),""!==this.ǃcJy&&this.ǃUk.setAttribute(`dock${this.ǃcJy}`,"")}ǃcJd(Ge){Ge=!!Ge;Ge===this.ǃcJE()||(super.ǃcJd(Ge),this.ǃcZO()&&(Ge?this.ǃcZm():this.ǃcZQ(),this.ǃtj.ǃcwU()))}ǃcJA(){return this.ǃcZk?this.ǃcZk.ǃcJy:this.ǃcJy}ǃcZO(){return this.ǃcJM&&!this.ǃcZh}ǃcwy(){return!this.ǃcJM||this.ǃcZh}ǃGZ(Ge){Ge=!!Ge;this.ǃcZH===Ge||(this.ǃcZH=Ge,this.ǃcZH?(this.ǃUk.style.display="",this.ǃcwU()):this.ǃUk.style.display="none")}ǃdW(){return this.ǃcZh?this.ǃcZY:this.ǃcZH&&super.ǃdW()}ǃcSA(){return!!this.ǃcJf()&&(this.ǃcwy()||this.ǃcJy===_189)}ǃcSL(){return!!this.ǃcJf()&&(this.ǃcwy()||this.ǃcJy===_188)}ǃcS_(){return!!this.ǃcJf()&&(this.ǃcwy()||this.ǃcJy===_190)}ǃcSt(){return!!this.ǃcJf()&&(this.ǃcwy()||"top"===this.ǃcJy)}ǃcIU(){this.ǃUk.style.transform=`translate(${this.ǃcZE}px, ${this.ǃcZe}px)`}ǃEu(Ge,oe){if(ǃG.ǃTH(Ge),Ge=ǃG.ǃcao(Ge),oe=!!oe,this.ǃcZO())throw new Error(_194);this.ǃcZE=Ge,this.ǃcIU(),this.ǃcwU(),oe||(this.ǃcZw=Ge)}ǃEU(Ge,oe){if(ǃG.ǃTH(Ge),Ge=ǃG.ǃcao(Ge),oe=!!oe,this.ǃcZO())throw new Error(_194);this.ǃcZe=Ge,this.ǃcIU(),this.ǃcwU(),oe||(this.ǃcZo=Ge)}ǃcSP(Ge){if(Ge=!!Ge,Ge?++this.ǃcZx:--this.ǃcZx,0>this.ǃcZx)throw new Error("invalid unlock");0===this.ǃcZx&&this.ǃcJl()}ǃcJl(){0ue&&(Ge=ue)}this.ǃcJF(`${Ge}px`),this.ǃtj.ǃ$X(!0),this.ǃtj.ǃcwU()}else this.ǃcZp=Ge,this.ǃUk.style.width=`${Ge}px`,this.ǃcwU();this.ǃcJl()}ǃEW(Ge,oe){if(ǃG.ǃTH(Ge),Ge=ǃG.ǃcao(Ge),oe=!!oe,this.ǃcZO()&&(this.ǃcJy===_188||this.ǃcJy===_189))throw new Error("cannot set height of horizontally docked bar");let le=this.ǃcoC();if(Geue&&(Ge=ue)}this.ǃcJF(`${Ge}px`),this.ǃtj.ǃ$X(!0),this.ǃtj.ǃcwU()}else this.ǃcZf=Ge,this.ǃUk.style.height=`${Ge}px`,this.ǃcwU();this.ǃcJl()}ǃcZb(){super.ǃcZb(),this.ǃcwB(-1),this.ǃcJy&&(this.ǃcZm(),this.ǃcJy=""),this.ǃcSj(),this.ǃtj&&this.ǃtj.ǃcwU(),ǃG.ǃGD.ǃbB.ǃcwJ()}ǃcJz(Ge){super.ǃcJz(Ge),Ge&&(this.ǃcJy=Ge.ǃcJA(),this.ǃcJM=!0,Ge.ǃcJh()&&(this.ǃcZI=Ge))}ǃtt(){if(this.ǃcJM){const Ge=new ǃG.Event("beforeundock");Ge.ǃaU=this,this.dispatchEvent(Ge),this.ǃcSP(!0);let oe=null,le=null;this.ǃcZt()&&(le=this.ǃcZk.ǃMl(),this.ǃtj=this.ǃcZk.ǃrq(),this.ǃcJy=this.ǃcZk.ǃcJA(),this.ǃcZk.ǃcZs(this),1===this.ǃcZk.ǃcDV()&&(oe=this.ǃcZk),this.ǃcZk=null);let ue=this.ǃcJy===_188||this.ǃcJy===_189;""===this.ǃcJy&&(ue=this.ǃtj.ǃcxO());let pe=this.ǃtj.ǃcxQ();if(pe&&pe.ǃcJf()){let ve=pe.ǃcJA();ue=ve===_188||ve===_189}le||(le=this.ǃMl());let ge;ue?(ge=le.right-le.left,ge>window.innerWidth/2&&(ge=window.innerWidth/2)):(ge=le.bottom-le.top,ge>window.innerHeight/2&&(ge=window.innerHeight/2)),0>=ge&&(ge=te),this.ǃtj.ǃcJr(this),this.ǃcZg(),this.ǃtj.ǃ$X(),this.ǃcZN(),this.ǃcZm(),this.ǃcZZ(),this.ǃcZS(this.ǃcZo,this.ǃcZw,ge,ne),this.ǃcJF(`${ge}px`),pe&&pe.ǃcJf()&&pe.ǃcJy?this.ǃcJy=pe.ǃcJy:!this.ǃcJy&&(this.ǃcJy=ue?_188:"top"),document.body.appendChild(this.ǃUk),this.ǃcJM=!1,this.ǃcZT=!1,this.ǃcwU(),this.ǃtj=this.ǃtj.ǃcJH(),this.ǃtj.ǃcJJ(),oe&&!oe.ǃcJh()&&(oe.ǃcZO()?this.ǃtj.ǃcJC(oe):ǃG.ǃGD.ǃGm.ǃcJ$.ǃcSd(oe)),this.ǃvA(),this.ǃcSP(!1),this.ǃtj.ǃcJQ();const he=new ǃG.Event("afterundock");he.ǃaU=this,this.dispatchEvent(he),this.ǃUk.setAttribute("role",_193)}}ǃDm(Ge,oe,le){if(ǃG.ǃmL(Ge,ǃG.ǃGD.ǃGm),ǃG.ǃoG(oe),ǃG.ǃmL(le,ǃG.ǃGD.ǃGm.ǃok),!this.ǃcJM){if(ǃG.ǃDG.ǃDc)return this.ǃcJy=oe===_188||"top"===oe?_188:_189,void this.ǃcSm();if(!Ge&&!oe&&!le&&this.ǃcZI)return this.ǃcZI.ǃcmQ(this),void this.ǃcZI.ǃcDc(this);const ue=new ǃG.Event("beforedock");ue.ǃaU=this,this.dispatchEvent(ue),this.ǃcSP(!0),Ge||(Ge=this.ǃtj),Ge.ǃGL()||(Ge=ǃG.ǃGD.ǃrV.ǃcSE(),assert(Ge&&Ge.ǃGL(),"Nowhere to dock this pane to"));let pe=oe;if(oe||(this.ǃcJy=""),le&&le.ǃcJf()){let be=le.ǃcJA();be&&(pe=be)}Ge.ǃcxO()?"top"===pe?pe=_188:pe===_190&&(pe=_189):pe===_188?pe="top":pe===_189&&(pe=_190);let ge=this.ǃMl(),he=ge.right-ge.left;this.ǃtj=Ge,le&&le.ǃcJf()?pe===_188||pe===_189?le.ǃcJN()?he=Math.min(le.ǃcE()/2,Math.max(he,this.ǃcoM())):(he=Math.max(le.ǃcE()/2,this.ǃcoM()),le.ǃEB(le.ǃcE()/2)):("top"===pe||pe===_190)&&(le.ǃcJN()?he=Math.min(le.ǃce()/2,Math.max(he,this.ǃcoC())):(he=Math.max(le.ǃce()/2,this.ǃcoC()),le.ǃEW(le.ǃce()/2))):!le&&(pe===_188||pe===_189?he=Math.min(this.ǃtj.ǃcE()/2,he):("top"===pe||pe===_190)&&(he=Math.min(this.ǃtj.ǃce()/2,he))),this.ǃcZQ(pe),this.ǃcJM=!0,document.body.removeChild(this.ǃUk),oe&&this.ǃcJF(`${he}px`),this.ǃcSj(),this.ǃtj.ǃcJV(this,le,oe),this.ǃtj.ǃ$X(),ǃG.ǃGD.ǃbB.ǃcwJ(),this.ǃcSP(!1);const ve=new ǃG.Event("afterdock");ve.ǃaU=this,this.dispatchEvent(ve),this.ǃUk.setAttribute("role","section")}}ǃIi(){this.ǃtt(),this.ǃj_()}ǃvA(){this.ǃcZt()?(this.ǃcZk.ǃcDc(this),this.ǃcZk.ǃvA()):super.ǃvA()}ǃcSe(Ge){if(Ge=!!Ge,!(!this.ǃcJf()||this.ǃcZO()||this.ǃcSc())){Ge&&(this.ǃEu(this.ǃcZw,!0),this.ǃEU(this.ǃcZo,!0));let oe=this.ǃMl(),le=window.innerWidth,ue=window.innerHeight;oe.right>le&&this.ǃEu(Math.max(this.ǃpi()-(oe.right-le),0),!0),0>oe.left&&this.ǃEu(this.ǃpi()-oe.left,!0),oe.bottom>ue&&this.ǃEU(Math.max(this.ǃpR()-(oe.bottom-ue),0),!0),0>oe.top&&this.ǃEU(this.ǃpR()-oe.top,!0)}}ǃcSp(){let Ge=new ǃG.Event("activate");Ge.ǃaU=this,this.dispatchEvent(Ge)}ǃcS$(Ge){let oe=new ǃG.Event("displaystylechange");oe.ǃaU=this,oe.visible=Ge,this.dispatchEvent(oe)}ǃcoN(Ge,oe){if(ǃG.ǃTH(Ge),ǃG.ǃTH(oe),this.ǃcZt()||!this.ǃcJy)return"";let le=this.ǃMl(),ue=ǃG.ǃGD.ǃclI(),pe=2*ue,ge="";if(Ge>le.left+ue&&Gele.top+ue&&oe=le.left&&Ge<=le.left+pe?oe>=le.top&&oe<=le.top+pe?ge="nw":oe<=le.bottom&&oe>=le.bottom-pe?ge="sw":oe>le.top+pe&&oe=le.right-pe?oe>=le.top&&oe<=le.top+pe?ge="ne":oe<=le.bottom&&oe>=le.bottom-pe?ge="se":oe>le.top+pe&&oe=le.right-ue&&(ge="e"):Ge>le.left+pe&&Ge=le.top&&oe<=le.top+ue?ge="n":oe<=le.bottom&&oe>=le.bottom-ue&&(ge="s"))),this.ǃcZO())if(this.ǃcJy===_188)ge="ne"==ge||"se"==ge||"e"==ge?"e":"";else if(this.ǃcJy===_189)ge="nw"==ge||"sw"==ge||"w"==ge?"w":"";else if("top"===this.ǃcJy)ge="sw"==ge||"se"==ge||"s"==ge?"s":"";else if(this.ǃcJy===_190)ge="nw"==ge||"ne"==ge||"n"==ge?"n":"";else if("tab"===this.ǃcJy)return"";return ge}ǃcZZ(){let Ge=ǃG.ǃGD.ǃrV.ǃcSf(this.ǃcZw,this.ǃcZo);this.ǃcZw=Ge.x,this.ǃcZo=Ge.y}ǃcZS(Ge,oe,le,ue){this.ǃUk.setAttribute(_191,""),this.ǃcZE=oe,this.ǃcZe=Ge,this.ǃcIU(),this.ǃcZp=le,this.ǃcZf=ue,this.ǃUk.style.width=`${le}px`,this.ǃUk.style.height=`${ue}px`}ǃcSj(){this.ǃUk.style.transform="",this.ǃUk.style.width="",this.ǃUk.style.height="",this.ǃUk.removeAttribute(_191)}static ǃcSy(Ge){ǃG.ǃg(Ge,ǃG.ǃGD.ǃGm.ǃok),assert(!(Ge instanceof ǃG.ǃGD.ǃGm.ǃcJ$),"cannot replace tabbed pane with another tabbed pane"),assert(Ge.ǃcJf()&&Ge.ǃcwy(),"expected floating docking pane");let oe=ǃG.ǃcKY(Ge.ǃcCQ),le=ǃG.ǃX(ǃG.ǃGD.ǃGm.ǃcJ$,Ge.ǃrq(),Ge.ǃcJj(),oe);return le.ǃtt(),le.ǃcJB(Ge.ǃcJA()),le.ǃEB(Ge.ǃcE()),le.ǃEW(Ge.ǃce()),le.ǃEu(Ge.ǃpi()),le.ǃEU(Ge.ǃpR()),ǃG.ǃGD.ǃjE(Ge.ǃGL()),Ge.ǃcwU(),ǃG.ǃGD.ǃbB.ǃcwJ(),le}}}{const _195="UIPointerDown",_196="caption-hidden",_197="afterpopupclose";ǃG.ǃGD.ǃGm.ǃcJX=class extends ǃG.ǃGD.ǃGm.ǃcJT{constructor(ne,ie,me,ae){super(ne,ie,me,ae),this.ǃcHG=ǃG.ǃGD.ǃXK("ui-caption",this.ǃUk),this.ǃcZd=this.ǃcu(),this.ǃcHm=ǃG.ǃGD.ǃXK("span",this.ǃcHG,null,"pane-caption-text"),this.ǃcHm.textContent=this.ǃcZd,this.ǃcSB="",this.ǃcH_=ǃG.ǃX(ǃG.ǃGD.ǃGr.ǃcmy,this.ǃcHG),this.ǃcH_.onclick=()=>this.ǃIi(),this.ǃ$M=ǃG.ǃGD.ǃXK("ui-body",this.ǃUk),this.ǃ$M.setAttribute("row2",""),this.ǃUk.setAttribute("captioned",""),this.ǃcSW=!1,this.ǃcSu=!1,this.ǃDN=null,this.ǃcHV=!1,this.ǃcSU=!0,this.ǃcHL=()=>this.ǃcrY(),this.ǃcSv=()=>this.ǃcJl(),this.ǃyj=de=>{let re=de.detail;re.ǃET!==ǃG.ǃye.ǃBX||this.ǃcSq(re.clientX,re.clientY,re.id)},this.ǃcHG.addEventListener(_195,this.ǃyj),this.ǃctR=()=>this.ǃcSa(),this.ǃcHG.addEventListener("UIDoubleTap",this.ǃctR),this.ǃBb=de=>{de.preventDefault(),this.ǃcSg(de.clientX,de.clientY)},this.ǃcHG.addEventListener("contextmenu",this.ǃBb)}ǃcHZ(){return this.ǃcHG}ǃGV(){return this.ǃ$M}ǃj_(){this.ǃcHG.removeEventListener(_195,this.ǃyj),this.ǃcHG.removeEventListener("UIDoubleTap",this.ǃctR),this.ǃcHG.removeEventListener("contextmenu",this.ǃBb),this.ǃyj=null,this.ǃctR=null,this.ǃBb=null,this.ǃcH_.ǃz(),this.ǃcH_=null,ǃG.ǃGD.ǃjE(this.ǃcHm),ǃG.ǃGD.ǃjE(this.ǃcHG),ǃG.ǃGD.ǃjE(this.ǃ$M),this.ǃcHm=null,this.ǃcHG=null,this.ǃ$M=null,super.ǃj_()}ǃcSm(){super.ǃcSm(),this.ǃcH_.ǃz(),this.ǃcH_=null}ǃcSq(ne,ie,me){ǃG.ǃTH(ne),ǃG.ǃTH(ie),ǃG.ǃTH(me),ǃG.ǃGD.ǃrV.ǃcoa(this,ne,ie,me)}ǃcSa(){this.ǃcSc()||(this.ǃcwy()?this.ǃcSN():this.ǃtt())}ǃcVG(ne,ie){if(ǃG.ǃNv(ne),ǃG.ǃNv(ie),this.ǃcHV)throw new Error("already awaiting popup window");if(this.ǃDN)throw new Error("already in popup window");if(!this.ǃcwH())throw new Error("opening to popup window disabled for this pane");this.ǃcHV=!0;let me=new ǃG.Event("beforepopupopen");return me.ǃaU=this,this.dispatchEvent(me),ǃG.ǃGD.ǃiG.ǃcoG("window.html",this.ǃcCQ,this.ǃcE(),350,ne,ie).then(ae=>{return this.ǃcIq(ae),app.ǃIR(),ae.addEventListener("unload",()=>this.ǃcIv(ae)),ae}).catch(()=>{this.ǃcHV=!1;let de=ǃG.ǃGD.ǃDZ.ǃDJ("OK");de.ǃ$i("Unable to open a popup window. If the browser warned you about a popup, you will need to approve it and then try again. Otherwise you may need to configure your browser or popup blocker to allow popups for this page.");let re=new ǃG.Event(_197);re.ǃaU=this,this.dispatchEvent(re)})}ǃcIq(ne){this.ǃcZO()?(this.ǃcSU=!0,this.ǃtt()):this.ǃcSU=!1,this.ǃGZ(!1),ǃG.ǃGD.ǃjE(this.ǃ$M),ne.document.body.appendChild(this.ǃ$M),this.ǃcHV=!1,this.ǃDN=ne,window.addEventListener("unload",this.ǃcHL),ne.addEventListener("resize",this.ǃcSv),ne.document.title=this.ǃcZd,this.ǃcJl();let ie=new ǃG.Event("afterpopupopen");ie.ǃaU=this,this.dispatchEvent(ie)}ǃcIv(ne){let ie=new ǃG.Event("beforepopupclose");ie.ǃaU=this,this.dispatchEvent(ie),ǃG.ǃGD.ǃjE(this.ǃ$M),this.ǃUk.appendChild(this.ǃ$M),this.ǃDN=null,ne.removeEventListener("resize",this.ǃcSv),window.removeEventListener("unload",this.ǃcHL),this.ǃcHm.textContent=this.ǃcZd,this.ǃGZ(!0),this.ǃcSU?this.ǃcSN():this.ǃcSe(),ie=new ǃG.Event(_197),ie.ǃaU=this,this.dispatchEvent(ie)}ǃcrY(){this.ǃDN&&(this.ǃDN.close(),this.ǃDN=null,this.ǃcHV=!1)}ǃEr(){return!!this.ǃDN}ǃcrh(){return this.ǃDN}ǃcE(){return this.ǃDN?this.ǃDN.innerWidth:super.ǃcE()}ǃce(){return this.ǃDN?this.ǃDN.innerHeight:super.ǃce()}ǃeb(){return this.ǃ$M.clientWidth}ǃeT(){return this.ǃ$M.clientHeight}ǃcSg(ne,ie){if(ǃG.ǃTH(ne),ǃG.ǃTH(ie),!this.ǃcSc()){ǃG.ǃi.ǃT("ui.bars.captionMenu");let me=ǃG.ǃX(ǃG.ǃGD.ǃmR,this.ǃcHG);ǃG.ǃDG.ǃPn&&(me.ǃmb(null,this.ǃcZO()?lang(".undock"):lang(".dock"),this.ǃctR),this.ǃcwH()&&me.ǃmb("open-popup",lang(".open-to-popup-window"),()=>this.ǃcVG(),{ǃXZ:!0})),me.ǃmb("close",lang(".close"),()=>this.ǃIi()),me.ǃm$(ne,ie),ǃG.ǃi.ǃW()}}ǃtA(){this.ǃcSW=!0}ǃcSK(ne){ne=!!ne,ne&&!this.ǃcSu?(this.ǃUk.setAttribute(_196,""),this.ǃcHG.setAttribute("hidden","")):!ne&&this.ǃcSu&&(this.ǃUk.removeAttribute(_196),this.ǃcHG.removeAttribute("hidden")),this.ǃcSu=ne}ǃcJz(ne){super.ǃcJz(ne),this.ǃcSW&&(ne?this.ǃcSK(ne.ǃcJh()):this.ǃcSK(!1))}ǃkg(ne){if(ǃG.ǃbv(ne),this.ǃcZd!==ne){this.ǃcZd=ne,this.ǃDN?this.ǃDN.document.title=ne:this.ǃcHm.textContent=ne;let ie=this.ǃcZq();ie&&ie.ǃcSn(this,this.ǃcZd)}}ǃcSM(){return this.ǃcZd}ǃpz(ne){if(ǃG.ǃbv(ne),this.ǃcSB!==ne){this.ǃcSB=ne;let ie=this.ǃcZq();ie&&ie.ǃcSC(this,this.ǃcSB)}}ǃcSh(){return this.ǃcSB}ǃtt(){this.ǃcSK(!1),super.ǃtt()}ǃDm(ne,ie,me){this.ǃcSW||(this.ǃcZI=null),super.ǃDm(ne,ie,me)}ǃcSN(){let ne=this.ǃcZI?null:this.ǃcJA();this.ǃDm(null,ne)}}}{const _198="bottom",_199="tabcontextmenu",_200="tabmiddleclick",_201="activetabchanged",_202="activewindowchange",ne=new Set(["top",_198]);ǃG.ǃGD.ǃGm.ǃcJ$=class extends ǃG.ǃGD.ǃGm.ǃcJT{constructor(me,ae,de,re){super(me,ae,de,re),this.ǃcZy="",this.ǃ$M=ǃG.ǃGD.ǃXK("ui-body",this.ǃUk),this.ǃcZB=ǃG.ǃX(ǃG.ǃGD.ǃGr.ǃcSY,this.ǃUk,{ǃcSz:!0,ǃcSF:!0}),this.ǃcSl=!1,this.ǃcSw=null,this.ǃcSo=Ge=>this.ǃcSH(Ge),this.ǃcZB.addEventListener(_201,this.ǃcSo),this.ǃcSI=Ge=>this.ǃcSx(Ge),this.ǃcZB.addEventListener("tearofftab",this.ǃcSI),this.ǃcSJ=Ge=>this.ǃcSZ(Ge.ǃcSS),this.ǃcZB.addEventListener(_200,this.ǃcSJ),this.ǃcSs=Ge=>{Ge.preventDefault(),this.ǃcSO(Ge.ǃcSS,Ge.clientX,Ge.clientY)},this.ǃcZB.addEventListener(_199,this.ǃcSs),this.ǃcSQ=Ge=>this.ǃcsc(Ge.ǃcSS),this.ǃcZB.addEventListener("tabclose",this.ǃcSQ),this.ǃcsG=-1,this.ǃcmP(_198),this.ǃcsm=()=>this.ǃfH(),ǃG.ǃGD.ǃbB.addEventListener(_202,this.ǃcsm)}ǃj_(){-1!==this.ǃcsG&&(window.clearTimeout(this.ǃcsG),this.ǃcsG=-1),ǃG.ǃGD.ǃbB.removeEventListener(_202,this.ǃcsm),this.ǃcsm=null,ǃG.ǃGD.ǃjE(this.ǃ$M),this.ǃ$M=null,this.ǃcZB.removeEventListener("tabclose",this.ǃcSQ),this.ǃcSQ=null,this.ǃcZB.removeEventListener(_199,this.ǃcSs),this.ǃcSs=null,this.ǃcZB.removeEventListener(_200,this.ǃcSJ),this.ǃcSJ=null,this.ǃcZB.removeEventListener("tearofftab",this.ǃcSI),this.ǃcSI=null,this.ǃcZB.removeEventListener(_201,this.ǃcSo),this.ǃcSo=null,this.ǃcZB.ǃz(),this.ǃcZB=null,super.ǃj_()}ǃGV(){return this.ǃ$M}ǃXI(){return this.ǃcZB}ǃcDV(){return this.ǃcZB.ǃcDV()}ǃcmj(){this.ǃcSl=!0}ǃcJh(){return this.ǃcSl}ǃcmP(me){if(!ne.has(me))throw new Error(`invalid tab side '${me}'`);this.ǃcZy===me||(this.ǃcZy===_198?(this.ǃUk.removeAttribute("tabbed-bottom"),this.ǃ$M.removeAttribute("row1"),this.ǃcZB.ǃGL().removeAttribute("row2")):(this.ǃUk.removeAttribute("tabbed-top"),this.ǃ$M.removeAttribute("row2"),this.ǃcZB.ǃGL().removeAttribute("row1")),this.ǃcZy=me,this.ǃUk.setAttribute("tabbed-"+this.ǃcZy,""),this.ǃcZy===_198?(this.ǃ$M.setAttribute("row1",""),this.ǃcZB.ǃGL().setAttribute("row2","")):(this.ǃ$M.setAttribute("row2",""),this.ǃcZB.ǃGL().setAttribute("row1","")),this.ǃcZB.ǃcmP(this.ǃcZy))}ǃcJY(){return assert(1===this.ǃcZB.ǃcDV(),"should have only one tab"),this.ǃcZB.ǃcsD(0).ǃmc()}ǃcmQ(me){if(ǃG.ǃg(me,ǃG.ǃGD.ǃGm.ǃok),me instanceof ǃG.ǃGD.ǃGm.ǃcJ$){let ae=me.ǃcZB;for(let de of ae.ǃcDb()){let re=de.ǃmc();re.ǃcZb();let Ge=this.ǃcZB.ǃcmO(re.ǃcu());Ge.ǃcsi(re),Ge.ǃSv(re.ǃt_()),re.ǃcJz(this)}me.ǃj_(),this.ǃcZB.ǃcDA(this.ǃcZB.ǃcDV()-1)}else{me.ǃcZb(),me.ǃcJz(this);let ae=me instanceof ǃG.ǃGD.ǃGm.ǃcJX?me.ǃcSM():me.ǃcu();let de=this.ǃcZB.ǃcmO(ae);de.ǃcsi(me),de.ǃSv(me.ǃt_());const re=me.ǃcSh();re&&de.ǃcsR(re),this.ǃcSw||this.ǃcsb(me)}this.ǃcJl()}ǃcsT(me){ǃG.ǃg(me,ǃG.ǃGD.ǃGm.ǃok);for(let ae of this.ǃcZB.ǃcDb())if(ae.ǃmc()===me)return ae;return null}ǃcsk(me){ǃG.ǃg(me,ǃG.ǃGD.ǃGm.ǃok);let ae=0;for(let de of this.ǃcZB.ǃcDb()){if(de.ǃmc()===me)return ae;++ae}return-1}ǃcZs(me){ǃG.ǃg(me,ǃG.ǃGD.ǃGm.ǃok);let ae=this.ǃcsk(me);assert(-1{if(ǃG.ǃbs){if(ǃG.ǃYa(de))return;}else if(de.ǃYa())return;de.ǃcSp()},5)}else this.ǃcSw.ǃcSp();ǃG.ǃGD.ǃbB.ǃby(this.ǃcSw)}}ǃcJl(){super.ǃcJl(),this.ǃcSw&&this.ǃcSw.ǃcJl()}ǃcDc(me){ǃG.ǃg(me,ǃG.ǃGD.ǃGm.ǃok);let ae=this.ǃcsk(me);0>ae||this.ǃcZB.ǃcDA(ae)}ǃcSn(me,ae){ǃG.ǃg(me,ǃG.ǃGD.ǃGm.ǃok),ǃG.ǃbv(ae);let de=this.ǃcsT(me);de&&de.ǃc_G(ae)}ǃcSC(me,ae){ǃG.ǃg(me,ǃG.ǃGD.ǃGm.ǃok),ǃG.ǃbv(ae);const de=this.ǃcsT(me);de&&de.ǃcsR(ae)}ǃcSH(me){let ae=me.ǃcSS.ǃmc();ae&&this.ǃcsb(ae,me.ǃcsr)}ǃcSx(me){let ae=me.ǃcSS,de=ae.ǃmc();de.ǃcJf()&&(de.ǃcwK(-30,-16),ǃG.ǃGD.ǃrV.ǃcsV(de,me.pointerId),ǃG.ǃGD.ǃrV.ǃcoT(me.clientX,me.clientY,me.pointerId),ǃG.ǃGD.ǃbB.ǃby(de))}ǃcSO(me,ae,de){ǃG.ǃg(me,ǃG.ǃGD.ǃGr.ǃcsA),ǃG.ǃTH(ae),ǃG.ǃTH(de),ǃG.ǃi.ǃT("ui.bars.tabPaneMenu");let re=ǃG.ǃX(ǃG.ǃGD.ǃmR,this.ǃ$M);ǃG.ǃDG.ǃPn&&re.ǃmb(null,lang(".undock"),()=>{let Ge=me.ǃmc();Ge.ǃtt()}),re.ǃmb("close",lang(".close"),()=>this.ǃcsc(me)),1this.ǃcsL(me)),re.ǃm$(ae,de),ǃG.ǃi.ǃW()}ǃcsc(me){let ae=me.ǃmc();ae.ǃIi()}ǃcSZ(me){this.ǃcsc(me)}ǃcsL(me){ǃG.ǃg(me,ǃG.ǃGD.ǃGr.ǃcsA);let ae=me.ǃmc(),de=[];for(let re of this.ǃcZB.ǃcDb()){let Ge=re.ǃmc();Ge!==ae&&de.push(Ge)}for(let re of de)re.ǃIi()}ǃcwU(){super.ǃcwU(),this.ǃcSw&&this.ǃcSw.ǃcwU()}ǃcs_(){for(let me of this.ǃcZB.ǃcDb()){let ae=me.ǃmc();if(!ae.ǃcJf())return!0}return!1}ǃcwq(){return this.ǃcSw||this}ǃcD$(){return this.ǃUk.hasAttribute("active")}ǃfH(){let me=ǃG.ǃGD.ǃbB.ǃyk()===this.ǃcSw;ǃG.ǃGD.ǃFh(this.ǃUk,"active",me)}static ǃcSd(me){ǃG.ǃg(me,ǃG.ǃGD.ǃGm.ǃcJ$),assert(!me.ǃcJh(),"should keep tabbed pane"),ǃG.ǃg(me,ǃG.ǃGD.ǃGm.ǃcJ$),assert(1===me.ǃcDV(),"expected tab pane with a single tab");let ae=me.ǃcJY();ae.ǃtt(),ae.ǃcJB(me.ǃcJA()),ae.ǃEB(me.ǃcE()),ae.ǃEW(me.ǃce()),ae.ǃEu(me.ǃpi()),ae.ǃEU(me.ǃpR()),me.ǃj_()}}}{function ee(){if(isNaN(Te)){let Ae=ǃG.ǃGD.ǃclo("width",{className:"dockIndicator"});if(!Ae.endsWith("px"))throw new Error("CSS style for dock indicators must specify the size in units of 'px'");Te=parseInt(Ae,10)||re}return Te}function te(Ae){let Ne=Ae.ǃcJA(),_e=we.indexOf(Ae);assert(-1!==_e,"cannot find swipe-in pane");for(let Pe=1,ze=we.length;Pe{let Ne=Ae.detail;Ne.ǃET!==ǃG.ǃye.ǃBX||!Ge||ǃG.ǃGD.ǃrV.ǃcwI(Ne.clientX,Ne.clientY,Ne.id)&&(Ae.preventDefault(),Ae.stopPropagation())}),document.addEventListener("UIPointerMove",Ae=>{if(Ge){let Ne=Ae.detail;ǃG.ǃGD.ǃrV.ǃcoT(Ne.clientX,Ne.clientY,Ne.id)&&(Ae.preventDefault(),Ae.stopPropagation())}}),document.addEventListener("UIPointerUp",Ae=>{if(Ge){let Ne=Ae.detail;ǃG.ǃGD.ǃrV.ǃcok(Ne.clientX,Ne.clientY,Ne.screenX,Ne.screenY,Ne.id)&&(Ae.preventDefault(),Ae.stopPropagation()),app.ǃIR()}}),window.addEventListener("resize",()=>{let Ae=ǃG.ǃGD.ǃcln();Ae&&Ae.ǃclz(),ǃG.ǃGD.ǃrV.ǃcst(),ǃG.ǃGD.ǃrV.ǃclF(!0)}),ǃG.ǃGD.ǃbB.addEventListener("zindexchanged",()=>ǃG.ǃGD.ǃrV.ǃcsP());class je extends ǃG.Event.ǃpF{constructor(){if(Ge)throw new Error("already created DockManager");super(),Ge=!0}ǃcsj(){return!!(oe.size||ve.size)}ǃcZJ(Ae){ǃG.ǃg(Ae,ǃG.ǃGD.ǃGm.ǃcJT),assert(!ke.includes(Ae),"Docking pane already exists in dock manager, don't try to add again"),ke.push(Ae)}ǃcZs(Ae){ǃG.ǃg(Ae,ǃG.ǃGD.ǃGm.ǃcJT);let Ne=ke.indexOf(Ae);assert(0<=Ne,"Cannot find docking pane to remove"),ke.splice(Ne,1)}ǃcSR(Ae){ǃG.ǃg(Ae,ǃG.ǃGD.ǃGm.ǃcJT),assert(Ae.ǃcSc(),"should be in swipe-in mode"),we.push(Ae),Le||Ae.ǃcJA()!==_203?!Ce&&Ae.ǃcJA()===_204&&(Ce=Ae):Le=Ae}ǃcsP(){ke.sort(ǃG.ǃGD.Window.ǃ_A)}ǃcsd(Ae,Ne){ǃG.ǃTH(Ae),ǃG.ǃTH(Ne);for(let _e=0,Pe=ke.length,ze;_e=ǃG.ǃGD.ǃclC()-me}ǃEi(Ae){return ǃG.ǃTH(Ae),this.ǃcsE(Ae)||this.ǃcse(Ae)}ǃcwI(Ae,Ne,_e){if(ǃG.ǃTH(Ae),ǃG.ǃTH(Ne),ǃG.ǃTH(_e),oe.has(_e)||ve.has(_e)||ǃG.ǃGD.ǃE$.ǃEX()||ǃG.ǃGD.ǃmR.ǃclO(Ae,Ne))return!1;if(we.length&&-2==Ue)if(this.ǃcsE(Ae)&&Le){if(Re&&!Re.ǃcSG())return!1;if(Re&&Re.ǃcJA()===_203&&(Le=te(Re)),Le!==Re)return xe=Le,xe.ǃvA(),Ue=_e,He=0,!0}else if(this.ǃcse(Ae)&&Ce){if(Re&&!Re.ǃcSG())return!1;if(Re&&Re.ǃcJA()===_204&&(Ce=te(Re)),Ce!==Re)return xe=Ce,xe.ǃvA(),Ue=_e,He=0,!0}for(let Pe=ke.length-1;0<=Pe;--Pe){let ze=ke[Pe],Be=ze.ǃcoN(Ae,Ne);if("m"===Be)return ze!==Re||-2!==Ue||ǃG.ǃGD.ǃED(Ae,Ne,ze)||(Xe=_e,Ie=Ae,Se=Ne,He=Re.ǃcJA()===_203?Re.ǃcE()-Ae:Re.ǃpi()-Ae),!1;if(Be&&!ze.ǃcSc()){if(le.has(ze))return!1;if(ǃG.ǃGD.ǃbB.ǃcoc(Ae,Ne,ze))break;return ve.set(_e,ze),be.set(ze,_e),ze.ǃcwC(Be),ze.ǃcwa(Ae,Ne),ze.ǃcwY(ze.ǃpi(),ze.ǃpR()),ze.ǃcwl(ze.ǃcE(),ze.ǃce()),ze.ǃcSp(),!0}}return!1}ǃcsp(Ae,Ne){ǃG.ǃTH(Ae),ǃG.ǃTH(Ne);for(let _e=0,Pe=Ee.length,ze;_e=Ie+ae)&&!ǃG.ǃGD.ǃED(Ae,Ne,Re)&&(Ue=Xe,Xe=-2,xe=Re,Re=null),Math.abs(Se-Ne)>=30&&(Xe=-2)),xe&&Ue===_e)return ǃG.ǃGD.ǃrV.ǃcsy(Ae+He,Ne),!1;if(oe.has(_e))return ǃG.ǃGD.ǃrV.ǃcsB(Ae,Ne,_e,oe.get(_e),Pe),!0;if(ve.has(_e))return ǃG.ǃGD.ǃrV.ǃcsW(Ae,Ne,_e,ve.get(_e)),!0;for(let ze=ke.length-1,Be;0<=ze;--ze)if(Be=ke[ze],!Be.ǃcSc()){let $e=Be.ǃcoN(Ae,Ne);if($e){if(ǃG.ǃGD.ǃbB.ǃcoc(Ae,Ne,Be))break;return ye?"e"===$e||"w"===$e?ye.Set("ew-resize"):"n"===$e||"s"===$e?ye.Set("ns-resize"):"nw"===$e||"se"===$e?ye.Set("nwse-resize"):"ne"===$e||"sw"===$e?ye.Set("nesw-resize"):"m"===$e&&(ǃG.ǃGD.ǃVe(ye),ye=null):"e"===$e||"w"===$e?ye=ǃG.ǃGD.ǃV_("ew-resize"):"n"===$e||"s"===$e?ye=ǃG.ǃGD.ǃV_("ns-resize"):"nw"===$e||"se"===$e?ye=ǃG.ǃGD.ǃV_("nwse-resize"):("ne"===$e||"sw"===$e)&&(ye=ǃG.ǃGD.ǃV_("nesw-resize")),!!ye}}return ǃG.ǃGD.ǃVe(ye),ye=null,!1}ǃcsV(Ae,Ne){ǃG.ǃg(Ae,ǃG.ǃGD.ǃGm.ǃcJT),ǃG.ǃTH(Ne),Ae.ǃvA();let _e=Ae.ǃcJA();Ae.ǃtt(),("top"===_e||_e===_205)&&Ae.ǃcwK(Ae.ǃcE()/-2,Ae.ǃcwM()),oe.set(Ne,Ae),le.set(Ae,Ne),1===oe.size?ǃG.ǃGD.ǃrV.ǃcsu():ǃG.ǃGD.ǃrV.ǃcsU()}ǃcsy(Ae,Ne){ǃG.ǃTH(Ae),ǃG.ǃTH(Ne);let _e=ǃG.ǃGD.ǃclC(),Pe=xe.ǃcE(),ze=xe.ǃcJA(),Be=0;if(ze===_203){let Ve=Ae-Pe;080&&ǃG.ǃGD.ǃrV.ǃcsV(Pe,_e),Pe.ǃcwy()){Pe.ǃEu(Ae+Pe.ǃcwn()),Pe.ǃEU(Ne+Pe.ǃcwM());const Be=new ǃG.Event("move");Be.ǃaU=Pe,Pe.dispatchEvent(Be);let Ve=ǃG.ǃGD.ǃrV.ǃcsp(Ae,Ne);ze||1!==oe.size?ǃG.ǃGD.ǃrV.ǃcsU():(Pe.ǃcwg()!==Ae||Pe.ǃcwN()!==Ne)&&ǃG.ǃGD.ǃrV.ǃcsu(),Ve!==pe&&(pe&&ǃG.ǃGD.ǃrV.ǃcsq(),Ve&&ǃG.ǃGD.ǃrV.ǃcsa(Ve,Pe),pe=Ve);let $e=ǃG.ǃGD.ǃcln();if($e&&1===oe.size){let Fe=ǃG.ǃGD.ǃrV.ǃcsf(Ae,Ne,Pe);Fe||(Fe=$e.ǃcJW(Ae,Ne,!0)),Fe&&!Fe.ǃcJm()&&(Fe=null),be.has(Fe)&&(Fe=null),Fe!==ge&&(ge&&ǃG.ǃGD.ǃrV.ǃcsg(),Fe&&ǃG.ǃGD.ǃrV.ǃcsN(Fe),ge=Fe)}}}ǃcsW(Ae,Ne,_e,Pe){ǃG.ǃTH(Ae),ǃG.ǃTH(Ne),ǃG.ǃTH(_e),ǃG.ǃg(Pe,ǃG.ǃGD.ǃGm.ǃcJT);let ze=Ae-Pe.ǃcwg(),Be=Ne-Pe.ǃcwN(),Ve=Pe.ǃcwz(),$e=Pe.ǃcwF(),Fe=Pe.ǃcww(),Ye=Pe.ǃcwo(),We=Pe.ǃcwh();if("e"===We||"se"===We||"ne"===We)Pe.ǃEB(Fe+ze);else if("w"===We||"sw"===We||"nw"===We){if(Pe.ǃcwy()){let Oe=Ve+Fe-Pe.ǃcoM();Pe.ǃEu(Math.min(Ve+ze,Oe))}Pe.ǃEB(Fe-ze)}if("s"===We||"sw"===We||"se"===We)Pe.ǃEW(Ye+Be);else if("n"===We||"nw"===We||"ne"===We){if(Pe.ǃcwy()){let Oe=$e+Ye-Pe.ǃcoC();Pe.ǃEU(Math.min($e+Be,Oe))}Pe.ǃEW(Ye-Be)}}ǃcok(Ae,Ne,_e,Pe,ze){if(ǃG.ǃTH(Ae),ǃG.ǃTH(Ne),ǃG.ǃTH(_e),ǃG.ǃTH(Pe),ǃG.ǃTH(ze),Xe===ze&&(Xe=-2),xe&&Ue===ze)return Ae+=He,xe.ǃcJA()===_203?AeǃG.ǃGD.ǃclC()-xe.ǃcE()/2?(xe.ǃcST(!1),Re&&Re!==xe&&Re.ǃcST(!0),Re===xe&&(Re=null)):(xe.ǃcST(!0),Re&&Re!==xe&&Re.ǃcST(!1),Re=xe),xe=null,Ue=-2,this.ǃcsv(),!1;if(oe.has(ze)){let Be=oe.get(ze);if(ǃG.ǃGD.ǃrV.ǃcsB(Ae,Ne,ze,Be,!0),pe)ǃG.ǃGD.ǃrV.ǃcsK(Be);else{let Ve=Be.ǃMl();if(Be instanceof ǃG.ǃGD.ǃGm.ǃcJX&&Be.ǃcwH()&&(0>=Ve.right||0>=Ve.bottom||Ve.left>ǃG.ǃGD.ǃclC()||Ve.top>ǃG.ǃGD.ǃclh())){let $e=ǃG.ǃGD.devicePixelRatio;Be.ǃcVG(_e/$e+Be.ǃcwn(),Pe/$e+Be.ǃcwM()).catch(()=>{Be.ǃcSe()})}else Be.ǃcSe()}return oe.delete(ze),le.delete(Be),ǃG.ǃGD.ǃrV.ǃcsg(),ǃG.ǃGD.ǃrV.ǃcsU(),ǃG.ǃGD.ǃrV.ǃcsq(),pe=null,ge=null,!0}if(ve.has(ze)){let Be=ve.get(ze);return ǃG.ǃGD.ǃrV.ǃcoT(Ae,Ne,ze),Be.ǃcSe(),ve.delete(ze),be.delete(Be),!0}return!1}ǃcst(){for(let Ae=0,Ne=ke.length;AeVe)&&Ae.ǃEW(ze/2):(!Ne.ǃcJN()||Ae.ǃcE()>Be)&&Ae.ǃEB(ze/2);Pe.ǃ$X(!0)}Ne.ǃcSP(!1),Ae.ǃcSP(!1)}}ǃcsg(){for(let Ae=0,Ne=De.length,_e;Aethis.ǃcss()}ǃcsh(){app.ǃcPG()?this.ǃcsS(!1):this.ǃcss()}ǃcsY(){assert(!this.ǃcsZ,"Animating out dock indicator which is already animating out"),this.ǃcsZ=!0,this.ǃUk.style.transform="",app.ǃcPG()?this.ǃcHD?ǃG.ǃcaJ(this.ǃcHD):this.ǃcsS(!0):window.setTimeout(()=>this.ǃcss(),10)}ǃcss(){this.ǃcHD=null,this.ǃcsZ?this.ǃj_():this.ǃUk.style.transform=`translate(${this.ǃNS}px, ${this.ǃNs}px)`}ǃj_(){this.ǃcHD=null,this.ǃcso.removeChild(this.ǃUk),this.ǃUk=null,this.ǃcso=null,this.ǃcsH=null,ǃG.ǃz(this)}ǃVE(re,Ge){return ǃG.ǃTH(re),ǃG.ǃTH(Ge),re>=this.ǃNS&&Ge>=this.ǃNs&&re<=this.ǃNS+this.ǃhm&&Ge<=this.ǃNs+this.ǃhD}ǃcsF(){return this.ǃcsI}ǃcsz(){return this.ǃcsH}}}{const ee="0.5",te=[{transform:"scale(0.9)",opacity:"0"},{transform:"scale(1)",opacity:ee}];let ne={duration:300,easing:"ease",fill:"forwards",direction:null};ǃG.ǃGD.ǃcsl=class extends ǃG.ǃDa{constructor(me,ae,de,re,Ge){ǃG.ǃTH(me),ǃG.ǃTH(ae),ǃG.ǃTH(de),ǃG.ǃTH(re),ǃG.ǃbv(Ge),super(),this.ǃcso=document.body,this.ǃUk=ǃG.ǃGD.ǃXK("div",this.ǃcso,null,"dockGhost"),this.ǃcHD=null,this.ǃcsZ=!1;"left"===Ge?this.ǃUk.classList.add("originLeft"):"top"===Ge?this.ǃUk.classList.add("originTop"):"right"===Ge?this.ǃUk.classList.add("originRight"):"bottom"===Ge?this.ǃUk.classList.add("originBottom"):"tab"===Ge?this.ǃUk.classList.add("originMiddle"):void 0;this.ǃcsO(me,ae,de,re)}ǃcsS(me){me=!!me,assert(!this.ǃcHD,"Should not start new dock ghost animation if already playing animation"),ne.direction=me?"reverse":"normal",this.ǃcHD=this.ǃUk.animate(te,ne),this.ǃcHD.onfinish=()=>this.ǃcsQ()}ǃcsh(){app.ǃcPG()?this.ǃcsS(!1):this.ǃUk.style.opacity=ee}ǃcsY(){this.ǃcsZ=!0,app.ǃcPG()?this.ǃcHD?ǃG.ǃcaJ(this.ǃcHD):this.ǃcsS(!0):this.ǃcsQ()}ǃcsQ(){this.ǃcHD=null,this.ǃcsZ&&this.ǃj_()}ǃj_(){this.ǃcHD=null,this.ǃcso.removeChild(this.ǃUk),this.ǃUk=null,this.ǃcso=null,ǃG.ǃz(this)}ǃcsO(me,ae,de,re){ǃG.ǃTH(me),ǃG.ǃTH(ae),ǃG.ǃTH(de),ǃG.ǃTH(re),this.ǃUk.style.left=`${me}px`,this.ǃUk.style.top=`${ae}px`,this.ǃUk.style.width=`${de}px`,this.ǃUk.style.height=`${re}px`}}}{let ne=new Map;const ie={name:null,source:null,ǃcN:!1};ǃG.ǃGD.ǃXY=class extends ǃG.ǃDa{constructor(ae,de,re,Ge,oe,le,ue){ǃG.ǃg(ae,ǃG.ǃGD.ǃcOc),ǃG.ǃTH(Ge),ǃG.ǃTH(oe),ǃG.ǃoG(le),ǃG.ǃoG(ue),super(),this.ǃcOG=ae,this.ǃcOm=de,this.ǃcOD=re,this.ǃcOi=Ge,this.ǃcOR=oe,this.ǃcOb=null,this.ǃcxM=!1,this.ǃcOT=null,this.ǃckw=null,this.ǃcOk=!1,this.ǃcOX=!1,this.ǃclE="",this.ǃcO$="",this.ǃcOr(le,ue)}ǃcOr(ae,de){if(this.ǃclE=ae||"",this.ǃcO$=de||"",this.ǃcOk=!1,this.ǃcOX=!1,this.ǃckw=new Promise(re=>this.ǃcOT=re),this.ǃcO$){let re=`${this.ǃcOG.ǃcOV()},${this.ǃcO$}`;assert(!ne.has(re),"icon already cached"),ne.set(re,this)}}ǃz(){if(!this.ǃcOk){if(this.ǃcOk=!0,this.ǃcOX=!1,this.ǃcOG.ǃcOA(this),this.ǃcO$){let ae=`${this.ǃcOG.ǃcOV()},${this.ǃcO$}`;ne.delete(ae)}this.ǃcxM=!1,this.ǃcOT=null,this.ǃckw=null,this.ǃclE="",this.ǃcO$=""}}ǃcOL(){return this.ǃcOV()<=app.ǃGP()}ǃcO_(){return this.ǃcOV()>app.ǃGP()&&this.ǃcOV()<=app.ǃXz()}ǃcOt(){return this.ǃcOV()>app.ǃXz()}ǃcOP(){return this.ǃcOk}ǃcOj(){return this.ǃcOX}ǃfe(){return this.ǃcOG}ǃcOd(){return this.ǃcOG.ǃcOd()}ǃcOE(){return this.ǃcOG.ǃcOE()}ǃcOe(){return this.ǃcOG.ǃTe()}ǃcOV(){return this.ǃcOG.ǃcOV()}ǃcOp(){return this.ǃcOm}ǃcOf(){return this.ǃcOD}ǃcOy(){return this.ǃcOG.ǃcOy()}ǃcOB(){return this.ǃcOi}ǃcOW(){return this.ǃcOR}ǃcOu(ae){ǃG.ǃmL(ae,ǃG.ǃGD.ǃcOU),this.ǃcOb=ae}ǃcOv(){return this.ǃcOb}ǃcOq(){return this.ǃcxM}ǃcOa(){this.ǃcxM||(this.ǃcxM=!0,this.ǃcOT(),this.ǃcOT=null)}ǃcOg(){return this.ǃckw}addEventListener(ae,de,re){return this.ǃcOG.addEventListener(ae,de,re)}removeEventListener(ae,de,re){return this.ǃcOG.removeEventListener(ae,de,re)}ǃcON(ae,de){ǃG.ǃbv(ae),ǃG.ǃcDt(de),this.ǃcOG.ǃcOK(),ǃG.ǃcqq.ImageBitmap&&!de.ǃcN?ǃG.ǃ$p(ae).then(createImageBitmap).then(re=>{this.ǃcOG.ǃcOn(),this.ǃ$X(re,de)}).catch(re=>{this.ǃcOG.ǃcOn(),this.ǃcOX=!0,console.warn(`[Icon] Error updating from URL '${ae}': `,re)}):ǃG.ǃcv(ae).then(re=>{this.ǃcOG.ǃcOn(),this.ǃ$X(re,de)}).catch(re=>{this.ǃcOG.ǃcOn(),this.ǃcOX=!0,console.warn(`[Icon] Error updating from URL '${ae}': `,re)})}ǃ$X(ae,de){ǃG.ǃcaR(ae),ǃG.ǃcDt(de),this.ǃcOG.ǃcOM(this,ae,de)}ǃcOC(ae){ǃG.ǃkK(ae,ǃG.ǃGD.ǃXY);for(let re of ae)if(re.ǃcOV()!==this.ǃcOV())throw new Error("overlay icons must be same size");let de=ae.map(re=>re.ǃcOg());return Promise.all(de).then(()=>{for(let re of ae)this.ǃcOh(re)})}ǃcOh(ae){ǃG.ǃg(ae,ǃG.ǃGD.ǃXY),this.ǃfe().ǃcOh(this,ae)}static ǃcOY(ae,de,re){ǃG.ǃbv(ae),ǃG.ǃGD.ǃXY.ǃcOz(de),ǃG.ǃcDt(re),re=Object.assign({},ie,re);let Ge=ne.get(`${de},${ae}`);if(Ge)return Ge;let oe=ǃG.ǃGD.ǃcOl.ǃcOF(de,re.name,re.source||ae);return oe.ǃcON(ae,{ǃcOw:!0,ǃcN:re.ǃcN}),oe}static ǃDi(ae,de,re){ǃG.ǃvd(ae),ǃG.ǃGD.ǃXY.ǃcOz(de),ǃG.ǃcDt(re),re=Object.assign({},ie,re);let Ge=ǃG.ǃGD.ǃcOl.ǃcOF(de,re.name,re.source);return ae&&Ge.ǃ$X(ae,{ǃcOw:!0,ǃcN:re.ǃcN}),Ge}static ǃcOz(ae){if(ǃG.ǃTH(ae),ae<1||ae>2048)throw new RangeError("invalid icon size")}}}{const _209="icon from wrong sheet",ee=ǃG.ǃGD.devicePixelRatio,Ge=2048,pe={ǃcOw:!1,ǃcN:!1};let ge=new Set;ǃG.ǃGD.ǃcOc=class extends ǃG.Event.ǃpF{constructor(ve,be){super(),ǃG.ǃGD.ǃXY.ǃcOz(ve),ǃG.ǃTH(be),this.ǃcOo=ve,this.ǃcOH=Math.ceil(ve*ee),this.ǃcOI=0,this.ǃcOx=0,this.ǃcOJ=be,this.ǃcOZ="iconsheet"+this.ǃcOJ,this.ǃta=null,this.ǃtM=null,this.ǃcOS=!1,this.ǃcFI=null,this.ǃcxi="",this.ǃcOs=!1,this.ǃcOO=0,this.ǃcOQ=-1,this.ǃcQc=-1,this.ǃcQG=()=>{this.ǃcOQ=-1,this.ǃcQm()},this.ǃcQD=[],this.ǃcQi=[],this.ǃcQR=[],this.ǃcQb=[],this.ǃcQT=0,this.ǃcQk=0,this.ǃcQX=0,this.ǃcQ$=0,this.ǃcQr=!1,this.ǃcOI=this.ǃcOo<=24?128:this.ǃcOo<=48?256:this.ǃcOo<=96?512:1024,this.ǃcOI*ee>Ge&&(this.ǃcOI=Math.floor(Ge/ee));let Ee=this.ǃcOI/this.ǃcOo;this.ǃcOx=Math.ceil(this.ǃcOH*Ee),ge.add(this)}ǃcOV(){return this.ǃcOo}ǃcOy(){return this.ǃcOH}ǃcOd(){return this.ǃcOI}ǃcOE(){return this.ǃcOx}ǃcQV(){return this.ǃta}ǃcQA(){return this.ǃcQR.length-this.ǃcQb.length}ǃcQL(){return this.ǃcQr&&0===this.ǃcQb.length}ǃcOK(){this.ǃcOO++}ǃcOn(){if(this.ǃcOO--,0>this.ǃcOO)throw new Error("too many pending icons removed")}ǃcQm(){if(this.ǃta&&!(this.ǃcOS||this.ǃcxi&&!this.ǃcOs)){this.ǃcOS=!0,this.ǃcOs=!1,ǃG.ǃcGb(this.ǃcQi,this.ǃcQD),ǃG.ǃGs(this.ǃcQD),this.ǃcQc=Date.now();let ve=this.ǃcFI,be=this.ǃcxi;ǃG.ǃKO(this.ǃta).then(Ee=>{return this.ǃcFI=Ee,this.ǃcxi=URL.createObjectURL(Ee),ǃG.ǃcv(this.ǃcxi)}).then(()=>{this.ǃcOS=!1,this.ǃcQ_(),be&&URL.revokeObjectURL(be),ve&&ve.close&&ve.close()})}}ǃcQ_(){for(let ve of this.ǃcQi)ve.ǃcOa();ǃG.ǃGs(this.ǃcQi),this.dispatchEvent(new ǃG.Event("change")),this.ǃcOs&&this.ǃcQt()}ǃTe(){return this.ǃcxi}ǃcQt(){if(!(this.ǃcOS||-1!==this.ǃcOQ)){let ve=app.ǃyO()&&ǃG.ǃDG.ǃPn?250:500;Date.now()-this.ǃcQc>=ve&&(ve=50),this.ǃcOQ=window.setTimeout(this.ǃcQG,ve)}}ǃcQP(){if(!this.ǃtM&&(this.ǃta=document.createElement("canvas"),this.ǃta.width=this.ǃcOx,this.ǃta.height=this.ǃcOx,this.ǃtM=this.ǃta.getContext("2d"),this.ǃtM.imageSmoothingEnabled=!0,this.ǃtM.ǃcQj="high",!this.ǃtM))throw new Error("failed to create 2d context")}ǃcQd(){if(this.ǃcQr)throw new Error("no icon spaces left");this.ǃcQT+=this.ǃcOH,this.ǃcQX+=this.ǃcOo,this.ǃcQT>this.ǃcOx-this.ǃcOH&&(this.ǃcQk+=this.ǃcOH,this.ǃcQ$+=this.ǃcOo,this.ǃcQT=0,this.ǃcQX=0,this.ǃcQk>this.ǃcOx-this.ǃcOH&&(this.ǃcQr=!0))}ǃcOA(ve){if(ǃG.ǃg(ve,ǃG.ǃGD.ǃXY),ve.ǃfe()!==this)throw new Error(_209);assert(!this.ǃcQb.includes(ve),"icon already removed"),this.ǃcQb.push(ve),this.ǃtM&&this.ǃtM.clearRect(ve.ǃcOB(),ve.ǃcOW(),this.ǃcOH,this.ǃcOH)}ǃcQE(ve,be){if(ǃG.ǃoG(ve),ǃG.ǃoG(be),this.ǃcQL())throw new Error("icon sheet is already full");if(this.ǃcQb.length){let Ee=this.ǃcQb.pop();return Ee.ǃcOr(ve,be),Ee}let Ee=ǃG.ǃX(ǃG.ǃGD.ǃXY,this,this.ǃcQX,this.ǃcQ$,this.ǃcQT,this.ǃcQk,ve,be);return this.ǃcQR.push(Ee),this.ǃcQd(),Ee}ǃcOM(ve,be,Ee){if(ǃG.ǃg(ve,ǃG.ǃGD.ǃXY),ǃG.ǃcaR(be),ǃG.ǃTH(be.width),ǃG.ǃTH(be.height),ǃG.ǃcDt(Ee),Ee=Object.assign({},pe,Ee),!ve.ǃcOP()){if(ve.ǃfe()!==this)throw new Error("updating icon from wrong sheet");if(be instanceof Image&&!be.complete)throw new Error("image is not complete");if(0>=be.width||0>=be.height)throw new Error("invalid size");let De,ye;if(be.widththis.ǃcQN(),ǃG.ǃcqY(de.ǃcQf)?(ǃG.ǃGD.ǃXY.ǃcOz(de.ǃcQf),this.ǃcOo=de.ǃcQf):this.ǃcQK(de.icon),this.ǃcQn(),this.ǃcQN(),ae&&ae.appendChild(this.ǃUk)}ǃz(){this.ǃcOA(),this.ǃcQg=null,this.ǃcQv=null,ǃG.ǃGD.ǃjE(this.ǃUk),this.ǃUk=null,ǃG.ǃz(this)}ǃcQM(me){let ae=this.ǃcOo;this.ǃUk.parentElement.insertBefore(me,this.ǃUk),this.ǃz(),me.style.width=ae+"px",me.style.height=ae+"px"}ǃlf(me){if(ǃG.ǃXw(me),this.ǃcQB)throw new Error("already got an icon");this.ǃcQv=me,this.ǃcQq=!0}ǃlH(){if(this.ǃcQv){let me=this.ǃcQv();ǃG.ǃmL(me,ǃG.ǃGD.ǃXY),me&&(!me.ǃcOq()&&(this.ǃcQa=!0),this.ǃ$R(me))}}ǃcQC(){return this.ǃcOo}ǃ$R(me){this.ǃcQv=null;this.ǃcQB===me||(this.ǃcOA(),this.ǃcQK(me),this.ǃcQn(),this.ǃcQN())}ǃcjY(me){return this.ǃUk.parentElement?this.ǃUk.parentElement===me?void 0:(ǃG.ǃGD.ǃjE(this.ǃUk),void me.appendChild(this.ǃUk)):void me.appendChild(this.ǃUk)}ǃGL(){return this.ǃUk}ǃ$b(me){me=!!me;this.ǃcQW===me||(this.ǃcQW=me,this.ǃcQn(!0))}ǃcQh(){return this.ǃcQW}ǃGZ(me){me=!!me;this.ǃcZH===me||(this.ǃcZH=me,ǃG.ǃGD.ǃFh(this.ǃUk,"hidden",!this.ǃcZH))}ǃHI(){this.ǃGZ(!1)}ǃDS(){this.ǃGZ(!0)}ǃcQK(me){ǃG.ǃmL(me,ǃG.ǃGD.ǃXY),this.ǃcQY(),this.ǃcQB=me;this.ǃcQB&&(this.ǃcOo=this.ǃcQB.ǃcOV(),this.ǃcQB.addEventListener("change",this.ǃcQg))}ǃcOA(){this.ǃcQB&&(this.ǃcQY(),this.ǃcQB.removeEventListener("change",this.ǃcQg),this.ǃcQB=null)}ǃcQn(me){(me||this.ǃcOo!==this.ǃcQU)&&(this.ǃUk.style.width=`${this.ǃcOo}px`,this.ǃUk.style.height=`${this.ǃcOo}px`,this.ǃcQW&&(this.ǃUk.style.borderRadius=`${this.ǃcOo/2}px`),this.ǃcQU=this.ǃcOo)}ǃcQN(){let me=this.ǃcQu;this.ǃcQB&&this.ǃcQB.ǃcOq()?(this.ǃcQa&&(this.ǃcQz(),this.ǃcQa=!1),me=`url("${this.ǃcQB.ǃcOe()}") ${-this.ǃcQB.ǃcOp()}px ${-this.ǃcQB.ǃcOf()}px`,1!==ǃG.ǃGD.devicePixelRatio&&(me+=` / ${this.ǃcQB.ǃcOd()}px ${this.ǃcQB.ǃcOd()}px`),me+=" no-repeat"):!this.ǃcQB&&(me=""),me!==this.ǃcQu&&(this.ǃUk.style.background=me,this.ǃcQu=me)}ǃcQz(){this.ǃcHD=this.ǃUk.animate(ee,te),this.ǃcHD.onfinish=()=>this.ǃcQF()}ǃcQY(){this.ǃcHD&&(this.ǃcHD.cancel(),this.ǃcHD=null)}ǃcQF(){this.ǃcHD=null}}}{const _211="image/svg+xml";ǃG.ǃGD.ǃcOU=class extends ǃG.ǃDa{constructor(te,ne,ie){super(),ǃG.ǃg(te,ǃG.ǃcov),ǃG.ǃbv(ne),ǃG.ǃD_(ie),ǃG.ǃoG(ie.name),ǃG.ǃoG(ie.source),this.ǃcQl=te,this.ǃcQw=ne,this.ǃcQo="",this.ǃcQH=null,this.ǃcQI=null,this.ǃclE=ie.name,this.ǃcO$=ie.source,this.ǃcQx=ie.color,this.ǃcQJ=null,this.ǃcQZ=null,this.ǃcQS=null,this.ǃcQs=null}ǃz(){this.ǃcQJ&&this.ǃcQJ.ǃz(),this.ǃcQZ&&this.ǃcQZ.ǃz(),this.ǃcQS&&this.ǃcQS.ǃz(),this.ǃcQO(),this.ǃcQJ=null,this.ǃcQZ=null,this.ǃcQS=null,this.ǃcQl=null,this.ǃcQw="",this.ǃcQo="",this.ǃcQH=null,this.ǃcQI=null,this.ǃclE="",this.ǃcQs=null,ǃG.ǃz(this)}ǃcv(){return this.ǃcQI?Promise.resolve(this.ǃcQI):this.ǃcQs?this.ǃcQs:(this.ǃcQs=app.ǃcQQ(this.ǃcQw).then(te=>{this.ǃcQO(),this.ǃcQo=te;let ne=ǃG.ǃX(ǃG.ǃKI.Document);return ne.ǃcYn(this.ǃcQo,_211)}).then(te=>{return this.ǃcQH=te.ǃKx().ǃcYz(),this.ǃGcc()}).then(()=>{let te=new Blob([this.ǃcQo],{type:_211});return ǃG.ǃcgV(te)}).then(te=>ǃG.ǃckO(()=>this.ǃGcG(te))).catch(te=>{throw this.ǃcQs=null,te}),this.ǃcQs)}ǃcQO(){this.ǃcQw.match(/^blob:.+$/)&&URL.revokeObjectURL(this.ǃcQw)}ǃGcc(te){let ne=this.ǃcQx||app.ǃbl().iconColor;return ne&&("#000000"!==ne||te)?ǃG.ǃckO(()=>{this.ǃcQH.setAttribute("fill",ne),this.ǃcQH.hasAttribute("stroke")&&"none"!==this.ǃcQH.getAttribute("stroke")&&this.ǃcQH.setAttribute("stroke",ne);let ie=new XMLSerializer;this.ǃcQo=ie.serializeToString(this.ǃcQH.ownerDocument)}):Promise.resolve()}ǃGcm(){return this.ǃGcc(!0).then(()=>{let te=new Blob([this.ǃcQo],{type:_211});return ǃG.ǃcgV(te)}).then(te=>{this.ǃcQI=te;let ne={ǃcOw:!1,ǃcN:!0};this.ǃcQJ&&this.ǃcQJ.ǃ$X(this.ǃcQI,ne),this.ǃcQZ&&this.ǃcQZ.ǃ$X(this.ǃcQI,ne),this.ǃcQS&&this.ǃcQS.ǃ$X(this.ǃcQI,ne)})}ǃGcG(te){this.ǃcQI=te,this.ǃcQs=null;let ne={ǃcOw:!0,ǃcN:!0};return this.ǃcQJ&&this.ǃcQJ.ǃ$X(this.ǃcQI,ne),this.ǃcQZ&&this.ǃcQZ.ǃ$X(this.ǃcQI,ne),this.ǃcQS&&this.ǃcQS.ǃ$X(this.ǃcQI,ne),this.ǃcQI}ǃmy(){return this.ǃcQJ||(this.ǃcQJ=ǃG.ǃGD.ǃXY.ǃDi(this.ǃcQI,this.ǃcQl.ǃGP(),{name:this.ǃclE,source:this.ǃcO$,ǃcN:!0}),this.ǃcQJ.ǃcOu(this),ǃG.ǃcvN()&&this.ǃcv()),this.ǃcQJ}ǃGcD(){return this.ǃcQZ||(this.ǃcQZ=ǃG.ǃGD.ǃXY.ǃDi(this.ǃcQI,this.ǃcQl.ǃXz(),{name:this.ǃclE,source:this.ǃcO$,ǃcN:!0}),this.ǃcQZ.ǃcOu(this),ǃG.ǃcvN()&&this.ǃcv()),this.ǃcQZ}ǃGci(){return this.ǃcQS||(this.ǃcQS=ǃG.ǃGD.ǃXY.ǃDi(this.ǃcQI,this.ǃcQl.ǃXF(),{name:this.ǃclE,source:this.ǃcO$,ǃcN:!0}),this.ǃcQS.ǃcOu(this),ǃG.ǃcvN()&&this.ǃcv()),this.ǃcQS}ǃGcR(){return this.ǃcv().then(()=>this.ǃcQH)}ǃGcb(){return this.ǃGcR().then(te=>te.cloneNode(!0))}}}"use strict",ǃG.ǃGD.ǃGr={},"use strict",ǃG.ǃGD.ǃGr.ǃGcT=class extends ǃG.ǃDa{constructor(te,ne,ie,me){ǃG.ǃg(te,ǃG.ǃGD.ǃGr.ǃJZ),ǃG.ǃbv(ne),ǃG.ǃoG(ie),super(),this.ǃJJ=te,this.ǃclE=ne,this.ǃGck=ie,this.ǃcHe=me,this.ǃcCQ=this.ǃJJ.ǃGcX(),this.ǃGc$=!0,this.ǃUk=ǃG.ǃGD.ǃXK("ui-proprow",this.ǃJJ.ǃGcr())}ǃND(){this.ǃJJ.ǃGcV(this),ǃG.ǃGD.ǃjE(this.ǃUk),this.ǃUk=null,this.ǃJJ=null,ǃG.ǃz(this)}ǃGcA(){this.ǃJJ.ǃGcL(this)}ǃGc_(){}ǃGct(){let te=0,ne=this.ǃcHe;for(;ne;)++te,ne=ne.ǃcHe;return te}ǃGcP(){return this.ǃJJ}ǃ_T(){return this.ǃcHe}ǃcu(){return this.ǃclE}ǃkQ(){return this.ǃGck}ǃGcj(){return this.ǃUk}ǃEK(){return this.ǃcCQ}ǃLJ(){return!0}ǃGcd(te,ne){if(te=!!te,ne=!!ne,!ne&&this.ǃJJ.ǃGcE()&&this.ǃJJ.ǃGce(),te&&!this.ǃGc$){if(this.ǃGc$=!0,ne)this.ǃJJ.ǃGcp(this);else{this.ǃUk.removeAttribute("collapsed");let ie=this.ǃJJ.ǃGcf();ie&&ie()}}else if(!te&&this.ǃGc$)if(this.ǃGc$=!1,ne)this.ǃJJ.ǃGcy(this);else{this.ǃUk.setAttribute("collapsed","");let ie=this.ǃJJ.ǃGcf();ie&&ie()}}ǃctl(){for(let te=this.ǃcHe;te;){if(!te.ǃLJ())return!1;te=te.ǃcHe}return!0}ǃEh(){return!0}ǃGcB(){}ǃGcW(){}ǃw_(){}ǃwd(){}},"use strict";{const _213="UIPointerDown";ǃG.ǃGD.ǃGr.ǃGcu=class extends ǃG.ǃGD.ǃGr.ǃGcT{constructor(te,ne,ie,me){super(te,ne,ie,me),this.ǃcdZ=ǃG.ǃGD.ǃXK("ui-propname",this.ǃUk);let ae=this.ǃGct();0{de.detail.ǃET!==ǃG.ǃye.ǃBX||(this.ǃJJ.ǃ_d(this)&&de.preventDefault(),this.ǃGcA())},this.ǃcdZ.addEventListener(_213,this.ǃGcU),this.ǃo_=ǃG.ǃGD.ǃXK("div",this.ǃcdZ,null,"propname-wrap"),this.ǃGcv=ǃG.ǃGD.ǃXK("label",this.ǃo_,null,"propname-label"),this.ǃGcv.textContent=this.ǃclE,this.ǃGcv.setAttribute("for",this.ǃcCQ),this.ǃGcq=ǃG.ǃGD.ǃXK("ui-propvalue",this.ǃUk),this.ǃyN=!0}ǃND(){this.ǃcdZ.removeEventListener(_213,this.ǃGcU),this.ǃGcU=null,ǃG.ǃGD.ǃjE(this.ǃGcv),this.ǃGcv=null,ǃG.ǃGD.ǃjE(this.ǃo_),this.ǃo_=null,ǃG.ǃGD.ǃjE(this.ǃcdZ),this.ǃcdZ=null,ǃG.ǃGD.ǃjE(this.ǃGcq),this.ǃGcq=null,super.ǃND()}ǃGcA(){super.ǃGcA(),ǃG.ǃGD.ǃFK(this.ǃcdZ,this.ǃJJ.ǃGca())}ǃGcg(){return this.ǃcdZ}ǃGcN(){return this.ǃGcq}ǃdr(te){te=!!te;this.ǃyN===te||(ǃG.ǃGD.ǃFh(this.ǃGcv,"disabled",!te),ǃG.ǃGD.ǃFh(this.ǃGcq,"disabled",!te),!te&&this.ǃJJ.ǃGcV(this),this.ǃyN=te,this.ǃGcK(te))}ǃEh(){return this.ǃyN}ǃGcK(){}}}{const _214="text",_215="angle",_216="float",_217="number",_218="percent",_219="integer",_220="UIPointerUp",_221="placeholder",_222="UIPointerDown",_223="UIPointerMove",_224="ui.bars.properties.angle-suffix",_225="ui.bars.properties.percent-suffix";let te=null;const ne=new Map([[_214,_214],[_219,_217],[_216,_217],[_218,_214],[_215,_214],["email","email"],["password","password"],["tel","tel"],["url","url"]]);ǃG.ǃGD.ǃGr.ǃGcn=class extends ǃG.ǃGD.ǃGr.ǃGcu{constructor(me,ae,de,re,Ge,oe,le,ue,pe){if(super(me,ae,de,Ge),ǃG.ǃoG(re),ǃG.ǃcVD(oe),ǃG.ǃcVD(le),ǃG.ǃcVD(ue),re=re||_214,!ne.has(re))throw new Error(`invalid InputProperty type '${re}'`);this.ǃchB=re,this.ǃcIC=ǃG.ǃGD.ǃXK("input",this.ǃGcq),this.ǃcIC.id=this.ǃEK(),this.ǃGcM=!0;let ge=ne.get(this.ǃchB);this.ǃGcC()&&this.ǃGch()&&(ge=_214),this.ǃcIC.type=ge,ge===_214&&this.ǃcIC.setAttribute("spellcheck","false"),this.ǃGcY=oe,this.ǃGcz=le,this.ǃGcF=ue,this.ǃGcl=this.ǃJJ.ǃGcw(),this.ǃGco=!1,this.ǃGcH=pe,this.ǃGcI=!1,this.ǃGcx=null,this.ǃGcJ=!1,this.ǃGcZ=!0,this.ǃGcS=!1,this.ǃGcs=!1,this.ǃGcO=!1,this.ǃGcQ=0,this.ǃGGc=!1,this.ǃGGG=0,this.ǃGGm=!0,this.ǃGGD=3,this.ǃGGi="",this.ǃGGR=!1,this.ǃGGb=()=>this.ǃow(),this.ǃcIC.addEventListener("change",this.ǃGGb),this.ǃGGT=he=>{return ǃG.ǃGD.ǃrV.ǃcsj()?(he.preventDefault(),void this.ǃcIC.blur()):void(window.setTimeout(()=>{this.ǃcIC&&ǃG.ǃGD.ǃFK(this.ǃcdZ,this.ǃJJ.ǃGca())},300),this.ǃGcA(),this.ǃGcZ=!1)},this.ǃcIC.addEventListener("focus",this.ǃGGT),this.ǃGGk=()=>{this.ǃJJ.ǃGcV(this),this.ǃGcZ=!0,this.ǃGcS=!1},this.ǃcIC.addEventListener("blur",this.ǃGGk),this.ǃGGX=-1,this.ǃGG$=()=>{if(!this.ǃGGr){let he=this.ǃGGV();he!==this.ǃGcx&&(!this.ǃGcs&&(this.ǃ_X(),this.ǃGcs=!0),this.ǃGco=!0,this.ǃow(he),this.ǃGco=!1),this.ǃGGX=requestAnimationFrame(this.ǃGG$)}},this.ǃGGA=()=>{this.ǃGcZ&&(this.ǃGcS=!0,this.ǃGcZ=!1),this.ǃGGL()&&-1===this.ǃGGX&&(this.ǃGcs=!1,this.ǃGGX=requestAnimationFrame(this.ǃGG$),this.ǃcIC.ownerDocument.addEventListener(_220,this.ǃGG_))},this.ǃcIC.addEventListener(_222,this.ǃGGA),this.ǃGGt=he=>{this.ǃGcS&&(this.ǃGcS=!1,this.ǃGGL()?requestAnimationFrame(()=>this.ǃcIC.select()):he.preventDefault())},this.ǃcIC.addEventListener(_220,this.ǃGGt),this.ǃGG_=null,this.ǃGGP=he=>{he.preventDefault(),this.ǃGGj(he.clientX,he.clientY)},this.ǃcIC.addEventListener("dragstart",this.ǃGGP),this.ǃGGd=he=>this.ǃP_(he),this.ǃcIC.addEventListener("keydown",this.ǃGGd),this.ǃP$=null,this.ǃPV=null,this.ǃGGr=!1,this.ǃGGE=0,this.ǃGGe=0,this.ǃGGp=0,this.ǃGGf=1,this.ǃGcC()&&(this.ǃP$=he=>this.ǃPr(he),this.ǃPV=he=>this.ǃPA(he),this.ǃGG_=()=>{-1!==this.ǃGGX&&(cancelAnimationFrame(this.ǃGGX),this.ǃGGX=-1),this.ǃcIC.ownerDocument.removeEventListener(_220,this.ǃGG_)}),this.ǃGcY&&(this.ǃGcx=this.ǃGGy(),this.ǃGGB(this.ǃGcx))}ǃGGy(){return this.ǃGcY?this.ǃGcH?this.ǃJJ.ǃGGW(this.ǃGcY,this):this.ǃGcY(this):null}ǃGGu(me){this.ǃGcz&&(this.ǃGcH?this.ǃJJ.ǃGGU(this.ǃGcz,me,this):this.ǃGcz(me,this))}ǃ_X(){this.ǃGcl&&this.ǃGcl(this.ǃcu())}ǃGGB(me){this.ǃGcJ=!0,this.ǃGGv(me),this.ǃGcJ=!1}ǃND(){-1!==this.ǃGGX&&cancelAnimationFrame(this.ǃGGX),this.ǃGG$=null,this.ǃGcY=null,this.ǃGcz=null,this.ǃGcF=null,this.ǃGcl=null,this.ǃGcx=null,this.ǃGcC()&&(this.ǃcIC.ownerDocument.removeEventListener(_223,this.ǃP$),this.ǃP$=null,this.ǃcIC.ownerDocument.removeEventListener(_220,this.ǃPV),this.ǃPV=null,this.ǃcIC.ownerDocument.removeEventListener(_220,this.ǃGG_),this.ǃGG_=null),this.ǃcIC.removeEventListener("keydown",this.ǃGGd),this.ǃGGd=null,this.ǃcIC.removeEventListener("dragstart",this.ǃGGP),this.ǃGGP=null,this.ǃcIC.removeEventListener("change",this.ǃGGb),this.ǃGGb=null,this.ǃcIC.removeEventListener("blur",this.ǃGGk),this.ǃGGk=null,this.ǃcIC.removeEventListener("focus",this.ǃGGT),this.ǃGGT=null,this.ǃcIC.removeEventListener(_222,this.ǃGGA),this.ǃGGA=null,this.ǃcIC.removeEventListener(_220,this.ǃGGt),this.ǃGGt=null,ǃG.ǃGD.ǃjE(this.ǃcIC),this.ǃcIC=null,super.ǃND()}ǃOg(){this.ǃGcI=!0}ǃGGq(){return this.ǃGcI}ǃGcC(){return this.ǃchB===_219||this.ǃchB===_216||this.ǃchB===_218||this.ǃchB===_215}ǃGGL(){return this.ǃchB===_219||this.ǃchB===_216}ǃsF(me){ǃG.ǃTH(me),this.ǃGGf=me}ǃsw(me){if(ǃG.ǃTH(me),!this.ǃGcC())throw new Error("cannot set minimum value on this property type");if(this.ǃchB===_219&&(me=Math.floor(me)),this.ǃGGc&&me>this.ǃGGG)throw new Error("cannot set a minimum value greater than the maximum value");return this.ǃGcO=!0,this.ǃGcQ=me,this.ǃcIC.setAttribute("min",me.toString()),this}ǃQt(me){if(ǃG.ǃTH(me),!this.ǃGcC())throw new Error("cannot set maximum value on this property type");if(this.ǃchB===_219&&(me=Math.floor(me)),this.ǃGcO&&meme||20me?this.ǃcIC.removeAttribute("maxlength"):this.ǃcIC.setAttribute("maxlength",me.toString()),this}ǃSj(me){if(ǃG.ǃbv(me),this.ǃGcC())throw new Error("cannot set a placeholder on this property type");return this.ǃGGi=me,this.ǃGGR||this.ǃcIC.setAttribute(_221,me),this}ǃGGN(){this.ǃGGR&&(this.ǃGGi?this.ǃcIC.setAttribute(_221,this.ǃGGi):this.ǃcIC.removeAttribute(_221),this.ǃGGR=!1)}ǃGch(){return this.ǃGcM&&ǃG.ǃDG.ǃPn&&this.ǃJJ.ǃGGK()}ǃOO(me){if(me=!!me,this.ǃGcM!==me){this.ǃGcM=me;let ae=ne.get(this.ǃchB);if(this.ǃGcC()&&this.ǃGch()&&(ae=_214),this.ǃcIC.type!==ae){let de=this.ǃcIC.value;this.ǃcIC.type=ae,this.ǃcIC.value=de}}}ǃGGv(me){return null===me?(this.ǃcIC.value="",this.ǃcIC.setAttribute(_221,lang("ui.bars.properties.multiple-placeholder")),void(this.ǃGGR=!0)):void(this.ǃGGN(),this.ǃchB===_219?(ǃG.ǃEe(me),me=Math.floor(me),this.ǃGGc&&me>this.ǃGGG&&(me=this.ǃGGG),this.ǃGcO&&methis.ǃGGG&&(me=this.ǃGGG),this.ǃGcO&&methis.ǃGGG&&(me=this.ǃGGG),this.ǃGcO&&methis.ǃGGG&&(me=this.ǃGGG),this.ǃGcO&&meme&&(me+=360),this.ǃcIC.value=ǃG.toFixed(me,1)+lang(_224)):(ǃG.ǃbv(me),this.ǃcIC.value=me))}ǃGGn(me){if((ǃG.ǃbv(me),this.ǃcIC.value!==me)&&(!this.ǃGcC()||me)){if(this.ǃGcC()&&this.ǃGch()){let ae=this.ǃGGM(me);return typeof ae===_217&&isFinite(ae)&&this.ǃGGv(ae),this.ǃGco=!0,this.ǃow(),void(this.ǃGco=!1)}if(this.ǃchB===_219){let ae=parseInt(me,10);if(!isFinite(ae))return;this.ǃGGv(ae)}else if(this.ǃchB===_216||this.ǃchB===_215){let ae=parseFloat(me);if(!isFinite(ae))return;this.ǃGGv(ae)}else if(this.ǃchB===_218){let ae=parseFloat(me);if(!isFinite(ae))return;ae/=100,this.ǃGGv(ae)}else this.ǃcIC.value=me;this.ǃGco=!0,this.ǃow(),this.ǃGco=!1}}ǃGGV(){let me=this.ǃcIC.value;if(this.ǃchB===_219){let ae=parseInt(me,10);return isFinite(ae)?(this.ǃGGc&&ae>this.ǃGGG&&(ae=this.ǃGGG),this.ǃGcO&&aethis.ǃGGG&&(ae=this.ǃGGG),this.ǃGcO&&aethis.ǃGGG&&(ae=this.ǃGGG),this.ǃGcO&&aeae&&(ae+=360),this.ǃGGc&&ae>this.ǃGGG&&(ae=this.ǃGGG),this.ǃGcO&&aethis.ǃGGG&&(this.ǃGcx=this.ǃGGG),this.ǃGGB(this.ǃGcx),this.ǃow(this.ǃGcx)),this.ǃcIC.select(),this.ǃGGE=de,this.ǃGGe=re}}ǃPA(me){this.ǃGGr&&(me.preventDefault(),this.ǃPr(me),this.ǃGGr=!1,ǃG.ǃGD.ǃVe(te),te=null,this.ǃcIC.ownerDocument.removeEventListener(_223,this.ǃP$),this.ǃcIC.ownerDocument.removeEventListener(_220,this.ǃPV))}ǃP_(me){me.which===ǃG.ǃEj.ǃBz&&(me.preventDefault(),this.ǃcIC.blur(),this.ǃJJ.ǃGGl(this))}ǃGcB(){!this.ǃGcF||this.ǃGGr||(this.ǃGcH?this.ǃdr(this.ǃJJ.ǃGGw(this.ǃGcF)):this.ǃdr(this.ǃGcF()))}ǃGcK(me){this.ǃcIC.disabled=!me,this.ǃcIC.readOnly=!me}ǃGcW(){if(!this.ǃGGr&&this.ǃGcY){let me=this.ǃGGy();me===this.ǃGcx||(this.ǃGcx=me,this.ǃGGB(this.ǃGcx),this.ǃGGY())}}}}{function ee(de){let re=de.replace(ie,"\\\\");return re=re.replace(ae,"\\t"),re.replace(me,"\\n")}function te(de){let re=[];for(let oe of de)re.push(oe);let Ge="";for(let oe=0,le=re.length,ue;oethis.ǃGGJ(),this.ǃGGI.addEventListener("click",this.ǃGGx),this.ǃGGZ=null,this.ǃGGb=()=>this.ǃow(),this.ǃcIC.addEventListener("change",this.ǃGGb),this.ǃGGT=()=>{window.setTimeout(()=>{this.ǃcIC&&ǃG.ǃGD.ǃFK(this.ǃcdZ,this.ǃJJ.ǃGca())},300),this.ǃGcA(),this.ǃGcZ=!1},this.ǃcIC.addEventListener("focus",this.ǃGGT),this.ǃGGk=()=>{this.ǃJJ.ǃGcV(this),this.ǃGcZ=!0,this.ǃGcS=!1},this.ǃcIC.addEventListener("blur",this.ǃGGk),this.ǃGGA=()=>{this.ǃGcZ&&(this.ǃGcS=!0,this.ǃGcZ=!1)},this.ǃcIC.addEventListener(_227,this.ǃGGA),this.ǃGGt=ve=>{this.ǃGcS&&(ve.preventDefault(),this.ǃGcS=!1)},this.ǃcIC.addEventListener("UIPointerUp",this.ǃGGt),this.ǃGGd=ve=>this.ǃP_(ve),this.ǃcIC.addEventListener("keydown",this.ǃGGd),this.ǃcIC.addEventListener("dragstart",ǃG.ǃGD.ǃclZ),this.ǃGcY&&(this.ǃGcx=this.ǃGGy(),this.ǃGGB(this.ǃGcx))}ǃGGy(){return this.ǃGcY?this.ǃGcH?this.ǃJJ.ǃGGW(this.ǃGcY,this):this.ǃGcY(this):null}ǃGGu(re){this.ǃGcz&&(this.ǃGcH?this.ǃJJ.ǃGGU(this.ǃGcz,re,this):this.ǃGcz(re,this))}ǃ_X(){this.ǃGcl&&this.ǃGcl(this.ǃcu())}ǃND(){this.ǃGcY=null,this.ǃGcz=null,this.ǃGcF=null,this.ǃGcl=null,this.ǃGcx=null,this.ǃcIC.removeEventListener("change",this.ǃGGb),this.ǃGGb=null,this.ǃcIC.removeEventListener("blur",this.ǃGGk),this.ǃGGk=null,this.ǃcIC.removeEventListener("focus",this.ǃGGT),this.ǃGGT=null,this.ǃcIC.removeEventListener(_227,this.ǃGGA),this.ǃGGA=null,this.ǃcIC.removeEventListener("UIPointerUp",this.ǃGGt),this.ǃGGt=null,this.ǃcIC.removeEventListener("keydown",this.ǃGGd),this.ǃGGd=null,this.ǃcIC.removeEventListener("dragstart",ǃG.ǃGD.ǃclZ),ǃG.ǃGD.ǃjE(this.ǃcIC),this.ǃcIC=null,this.ǃGGI.removeEventListener("click",this.ǃGGx),this.ǃGGx=null,this.ǃGGZ=null,ǃG.ǃGD.ǃjE(this.ǃGGI),this.ǃGGI=null,ǃG.ǃGD.ǃjE(this.ǃGGH),this.ǃGGH=null,super.ǃND()}ǃQd(re){ǃG.ǃXw(re),this.ǃGGZ=re}ǃQj(re){ǃG.ǃbv(re),this.ǃGGI.textContent=re}ǃGGg(re){return ǃG.ǃTH(re),re=Math.floor(re),0>re?this.ǃcIC.removeAttribute("maxlength"):this.ǃcIC.setAttribute("maxlength",re.toString()),this}ǃSj(re){return ǃG.ǃbv(re),this.ǃGGi=re,this.ǃGGR||this.ǃcIC.setAttribute(_226,re),this}ǃGGN(){this.ǃGGR&&(this.ǃGGi?this.ǃcIC.setAttribute(_226,this.ǃGGi):this.ǃcIC.removeAttribute(_226),this.ǃGGR=!1)}ǃGcA(){this.ǃcIC.select(),super.ǃGcA()}ǃGc_(){this.ǃcIC.focus()}ǃGGB(re){this.ǃGcJ=!0,this.ǃGGv(re),this.ǃGcJ=!1}ǃGGv(re){return null===re?(this.ǃcIC.value="",this.ǃcIC.setAttribute(_226,lang("ui.bars.properties.multiple-placeholder")),void(this.ǃGGR=!0)):void(this.ǃGGN(),this.ǃcIC.value=ee(re))}ǃGGV(){return te(this.ǃcIC.value)}ǃow(){if(!this.ǃGcJ&&this.ǃGcz){this.ǃ_X();let re=this.ǃGGV();if(this.ǃGGu(re),this.ǃGcx=re,this.ǃGcY){let Ge=this.ǃGGy();(Ge!==this.ǃGcx||ee(Ge)!==this.ǃcIC.value)&&(this.ǃGcx=Ge,this.ǃGGB(this.ǃGcx))}this.ǃJJ.ǃZr()}}ǃGGJ(){if(this.ǃGcA(),this.ǃGGZ){let Ge=this.ǃGGZ(this);return void(Ge.then&&Ge.then(oe=>{"string"!=typeof oe||(this.ǃGGv(oe),this.ǃow())}))}let re=ǃG.ǃGD.ǃDZ.ǃDJ("LongTextPropertyDialog");re.ǃDs(this.ǃclE),re.ǃ$i(this.ǃGGV()).then(Ge=>{null!==Ge&&(Ge||null!==this.ǃGcx)&&(this.ǃGGv(Ge),this.ǃow())})}ǃP_(re){re.which===ǃG.ǃEj.ǃBz&&(re.preventDefault(),this.ǃcIC.blur(),this.ǃJJ.ǃGGl(this))}ǃSt(){return this.ǃcIC}ǃGcB(){this.ǃGcF&&(this.ǃGcH?this.ǃdr(this.ǃJJ.ǃGGw(this.ǃGcF)):this.ǃdr(this.ǃGcF()))}ǃGcK(re){this.ǃcIC.disabled=!re,this.ǃcIC.readOnly=!re,this.ǃGGI.disabled=!re}ǃGcW(){if(this.ǃGcY){let re=this.ǃGGy();re===this.ǃGcx||(this.ǃGcx=re,this.ǃGGB(this.ǃGcx))}}}}{const ee="__multiple__";ǃG.ǃGD.ǃGr.ǃGGS=class extends ǃG.ǃGD.ǃGr.ǃGcu{constructor(ne,ie,me,ae,de,re,Ge,oe){super(ne,ie,me,ae),ǃG.ǃcVD(de),ǃG.ǃcVD(re),ǃG.ǃcVD(Ge),this.ǃGGs=ǃG.ǃGD.ǃXK("select",this.ǃGcq),this.ǃGGs.id=this.ǃEK(),this.ǃGcY=de,this.ǃGcz=re,this.ǃGcF=Ge,this.ǃGcl=this.ǃJJ.ǃGcw(),this.ǃGcH=oe,this.ǃGGO=!1,this.ǃGGQ=null,this.ǃGcJ=!1,this.ǃGcx=null,this.ǃGcY&&(this.ǃGcx=this.ǃGGy(),null===this.ǃGcx&&this.ǃGmc()),this.ǃGGb=()=>this.ǃow(),this.ǃGGs.addEventListener("change",this.ǃGGb),this.ǃGGT=()=>this.ǃGcA(),this.ǃGGs.addEventListener("focus",this.ǃGGT),this.ǃGGk=()=>this.ǃJJ.ǃGcV(this),this.ǃGGs.addEventListener("blur",this.ǃGGk)}ǃND(){this.ǃGcY=null,this.ǃGcz=null,this.ǃGcF=null,this.ǃGcl=null,this.ǃGGs.removeEventListener("change",this.ǃGGb),this.ǃGGb=null,this.ǃGGs.removeEventListener("focus",this.ǃGGT),this.ǃGGT=null,this.ǃGGs.removeEventListener("blur",this.ǃGGk),this.ǃGGk=null,ǃG.ǃGD.ǃjE(this.ǃGGs),this.ǃGGs=null,super.ǃND()}ǃGGy(){return this.ǃGcY?this.ǃGcH?this.ǃJJ.ǃGGW(this.ǃGcY,this):this.ǃGcY(this):null}ǃGGu(ne){this.ǃGcz&&(this.ǃGcH?this.ǃJJ.ǃGGU(this.ǃGcz,ne,this):this.ǃGcz(ne,this))}ǃ_X(ne){this.ǃGcl&&this.ǃGcl(this.ǃcu(),ne)}ǃGmG(ne){this.ǃGcJ=!0,null===ne?this.ǃGmc():this.ǃGGs.value=ne,this.ǃGcJ=!1}ǃGmc(){this.ǃGGO||(this.ǃmb(lang("ui.bars.properties.multiple-placeholder"),ee),this.ǃGGO=!0),this.ǃGGs.value=ee}ǃGmm(){this.ǃGGQ&&(ǃG.ǃGD.ǃjE(this.ǃGGQ),this.ǃGGO=!1)}ǃow(){this.ǃGcJ||!this.ǃGcz||this.ǃGGs.value===ee||(this.ǃ_X(this.ǃGGs.value),this.ǃGGu(this.ǃGGs.value),this.ǃGcY&&(this.ǃGcx=this.ǃGGy(),null!==this.ǃGcx&&this.ǃGmm(),this.ǃGGs.value!==this.ǃGcx&&this.ǃGmG(this.ǃGcx)),this.ǃJJ.ǃZr())}ǃGmD(){return this.ǃGGs}ǃmb(ne,ie,me=!1){ǃG.ǃbv(ne),ǃG.ǃoG(ie),me=!!me,("undefined"==typeof ie||null===ie)&&(ie=ne);let ae=ǃG.ǃGD.ǃXK("option",this.ǃGGs);return ae.text=ne,ae.value=ie,me&&ae.setAttribute("hidden",""),ie===this.ǃGcx&&(ae.selected=!0),ie===ee&&(this.ǃGGQ=ae),this}ǃGc_(){this.ǃGGs.focus()}ǃGcB(){this.ǃGcF&&(this.ǃGcH?this.ǃdr(this.ǃJJ.ǃGGw(this.ǃGcF)):this.ǃdr(this.ǃGcF()))}ǃGcK(ne){this.ǃGGs.disabled=!ne}ǃGcW(){if(this.ǃGcY){let ne=this.ǃGGy();ne===this.ǃGcx||(this.ǃGcx=ne,this.ǃGmG(this.ǃGcx))}}}}{const _230="change",_231="placeholder",_232="colorProperty",_233="ui.bars.properties.multiple-placeholder";let ee=function(te){te.preventDefault();let ne=this.getAttribute("for"),ie=this.ownerDocument.getElementById(ne);ie&&ie.focus()};ǃG.ǃGD.ǃGr.ǃGmi=class extends ǃG.ǃGD.ǃGr.ǃGcu{constructor(ne,ie,me,ae,de,re,Ge,oe){if(super(ne,ie,me,ae),ǃG.ǃcVD(de),ǃG.ǃcVD(re),ǃG.ǃcVD(Ge),this.ǃGGH=ǃG.ǃGD.ǃXK("div",this.ǃGcq,null,"flexVstretch"),this.ǃGmR=ǃG.ǃGD.ǃXK("input",this.ǃGGH,null,_232),this.ǃGmR.type="color",this.ǃGmR.id=this.ǃEK(),this.ǃGmb=ǃG.ǃGD.ǃXK("input",this.ǃGGH,null,_232),this.ǃGmb.type="text",this.ǃGmb.setAttribute("spellcheck","false"),this.ǃGcY=de,this.ǃGcz=re,this.ǃGcF=Ge,this.ǃGcl=this.ǃJJ.ǃGcw(),this.ǃGcH=oe,this.ǃGcJ=!1,this.ǃGmT=ǃG.ǃX(ǃG.ǃBc,0,0,0,1),this.ǃGmk=!1,this.ǃGcY){let le=this.ǃGGy();null===le?this.ǃGmk=!0:le instanceof ǃG.ǃBc&&this.ǃGmT.set(le)}this.ǃGmR.value=this.ǃGmT.ǃTX(),this.ǃGmk?(this.ǃGmb.value="",this.ǃGmb.setAttribute(_231,lang(_233))):this.ǃGmb.value=this.ǃGmT.ǃcN$(),this.ǃGcv.addEventListener("click",ee),this.ǃGmX=()=>this.ǃGm$(),this.ǃGmR.addEventListener(_230,this.ǃGmX),this.ǃGmr=()=>this.ǃGcA(),this.ǃGmR.addEventListener("focus",this.ǃGmr),this.ǃGmV=()=>this.ǃJJ.ǃGcV(this),this.ǃGmR.addEventListener("blur",this.ǃGmV),this.ǃGmA=()=>this.ǃGmL(),this.ǃGmb.addEventListener(_230,this.ǃGmA),this.ǃGm_=le=>{return ǃG.ǃGD.ǃrV.ǃcsj()?(le.preventDefault(),void this.ǃGmb.blur()):void this.ǃGcA()},this.ǃGmb.addEventListener("focus",this.ǃGm_),this.ǃGmt=()=>this.ǃJJ.ǃGcV(this),this.ǃGmb.addEventListener("blur",this.ǃGmt),this.ǃGmP=le=>this.ǃP_(le),this.ǃGmb.addEventListener("keydown",this.ǃGmP),this.ǃGmb.addEventListener("dragstart",ǃG.ǃGD.ǃclZ)}ǃND(){this.ǃGcv.removeEventListener("click",ee),this.ǃGcY=null,this.ǃGcz=null,this.ǃGcF=null,this.ǃGcl=null,this.ǃGmR.removeEventListener(_230,this.ǃGmX),this.ǃGmX=null,this.ǃGmR.removeEventListener("focus",this.ǃGmr),this.ǃGmr=null,this.ǃGmR.removeEventListener("blur",this.ǃGmV),this.ǃGmV=null,ǃG.ǃGD.ǃjE(this.ǃGmR),this.ǃGmR=null,this.ǃGmb.removeEventListener(_230,this.ǃGmA),this.ǃGmA=null,this.ǃGmb.removeEventListener("focus",this.ǃGm_),this.ǃGm_=null,this.ǃGmb.removeEventListener("blur",this.ǃGmt),this.ǃGmt=null,this.ǃGmb.removeEventListener("keydown",this.ǃGmP),this.ǃGmP=null,this.ǃGmb.removeEventListener("dragstart",ǃG.ǃGD.ǃclZ),ǃG.ǃGD.ǃjE(this.ǃGmb),this.ǃGmb=null,ǃG.ǃGD.ǃjE(this.ǃGGH),this.ǃGGH=null,super.ǃND()}ǃGGu(){if(this.ǃGcz){let ne=ǃG.ǃX(ǃG.ǃBc,this.ǃGmT);this.ǃGcH?this.ǃJJ.ǃGGU(this.ǃGcz,ne,this):this.ǃGcz(ne,this),this.ǃJJ.ǃZr()}}ǃGGy(){return this.ǃGcY?this.ǃGcH?this.ǃJJ.ǃGGW(this.ǃGcY,this):this.ǃGcY(this):null}ǃ_X(){this.ǃGcl&&this.ǃGcl(this.ǃcu())}ǃGm$(){this.ǃGcJ||!this.ǃGcz||(this.ǃGmT.ǃcPg(this.ǃGmR.value),this.ǃGcJ=!0,this.ǃGmb.value=this.ǃGmT.ǃcN$(),this.ǃGcJ=!1,this.ǃGmj(),this.ǃGmR.focus())}ǃGmL(){return this.ǃGcJ||!this.ǃGcz?void 0:this.ǃGmT.ǃcNt(this.ǃGmb.value)?void(this.ǃGcJ=!0,this.ǃGmR.value=this.ǃGmT.ǃTX(),this.ǃGmb.value=this.ǃGmT.ǃcN$(),this.ǃGcJ=!1,this.ǃGmj()):(this.ǃGcJ=!0,this.ǃGmk?(this.ǃGmb.value="",this.ǃGmb.setAttribute(_231,lang(_233))):(this.ǃGmb.value=this.ǃGmT.ǃcN$(),this.ǃGmb.removeAttribute(_231)),void(this.ǃGcJ=!1))}ǃGmj(){if(this.ǃ_X(),this.ǃGGu(),this.ǃGmk=!1,this.ǃGmb.removeAttribute(_231),this.ǃGcY){let ne=this.ǃGGy();null===ne?(this.ǃGmk=!0,this.ǃGmT.ǃcNm(0,0,0),this.ǃGcJ=!0,this.ǃGmR.value=this.ǃGmT.ǃTX(),this.ǃGmb.value="",this.ǃGmb.setAttribute(_231,lang(_233)),this.ǃGcJ=!1):!this.ǃGmT.ǃcNi(ne)&&(this.ǃGmk=!1,this.ǃGcJ=!0,this.ǃGmT.ǃcNm(ne.r,ne.ǃcNj,ne.b),this.ǃGmR.value=this.ǃGmT.ǃTX(),this.ǃGmb.value=this.ǃGmT.ǃcN$(),this.ǃGcJ=!1)}}ǃP_(ne){ne.which===ǃG.ǃEj.ǃBz&&(ne.preventDefault(),this.ǃGmb.blur(),this.ǃJJ.ǃGGl(this))}ǃGc_(){return this.ǃGmR.focus()}ǃGmd(){return this.ǃGmR}ǃGcB(){this.ǃGcF&&(this.ǃGcH?this.ǃdr(this.ǃJJ.ǃGGw(this.ǃGcF)):this.ǃdr(this.ǃGcF()))}ǃGcK(ne){this.ǃGmR.disabled=!ne,this.ǃGmb.disabled=!ne,this.ǃGmb.readOnly=!ne}ǃGcW(){if(this.ǃGcY){let ne=this.ǃGGy();this.ǃGmk&&null===ne||!this.ǃGmk&&null!==ne&&ne.ǃcNi(this.ǃGmT)||(this.ǃGmk=null===ne,this.ǃGmk?(this.ǃGmT.ǃcNm(0,0,0),this.ǃGmR.value=this.ǃGmT.ǃTX(),this.ǃGmb.value="",this.ǃGmb.setAttribute(_231,lang(_233))):(this.ǃGmT.ǃcNm(ne.r,ne.ǃcNj,ne.b),this.ǃGmR.value=this.ǃGmT.ǃTX(),this.ǃGmb.value=this.ǃGmT.ǃcN$(),this.ǃGmb.removeAttribute(_231)))}}}}{function ee(te){te.preventDefault();let ne=this.getAttribute("for"),ie=this.ownerDocument.getElementById(ne);ie&&ie.focus()}const _234="UIPointerDown";ǃG.ǃGD.ǃGr.ǃGmE=class extends ǃG.ǃGD.ǃGr.ǃGcu{constructor(ne,ie,me,ae,de,re,Ge,oe){super(ne,ie,me,ae),ǃG.ǃcVD(de),ǃG.ǃcVD(re),ǃG.ǃcVD(Ge),this.ǃGme=ǃG.ǃGD.ǃXK("input",this.ǃGcq),this.ǃGme.type="checkbox",this.ǃGme.id=this.ǃEK(),this.ǃGcv.addEventListener("click",ee),this.ǃGcY=de,this.ǃGcz=re,this.ǃGcF=Ge,this.ǃGcl=this.ǃJJ.ǃGcw(),this.ǃGcx=null,this.ǃGcH=oe,this.ǃGcJ=!1,this.ǃGcY&&(this.ǃGcx=this.ǃGGy(),this.ǃGmp(this.ǃGcx)),this.ǃGGb=()=>this.ǃow(),this.ǃGme.addEventListener("change",this.ǃGGb),this.ǃGGT=()=>this.ǃGcA(),this.ǃGme.addEventListener("focus",this.ǃGGT),this.ǃGGk=()=>this.ǃJJ.ǃGcV(this),this.ǃGme.addEventListener("blur",this.ǃGGk),this.ǃGmf=!1,this.ǃyj=le=>{le.detail.ǃET!==ǃG.ǃye.ǃBX||le.target===this.ǃGcq&&(!le.detail.ǃEV&&le.preventDefault(),this.ǃGmf=!0,this.ǃGme.focus())},this.ǃGcq.addEventListener(_234,this.ǃyj),this.ǃBR=le=>{le.target===this.ǃGcq&&this.ǃGmf&&(le.preventDefault(),this.ǃGme.click()),this.ǃGmf=!1},this.ǃGcq.addEventListener("UITap",this.ǃBR)}ǃND(){this.ǃGcv.removeEventListener("click",ee),this.ǃGcY=null,this.ǃGcz=null,this.ǃGcF=null,this.ǃGcl=null,this.ǃGcx=null,this.ǃGme.removeEventListener("change",this.ǃGGb),this.ǃGGb=null,this.ǃGme.removeEventListener("focus",this.ǃGGT),this.ǃGGT=null,this.ǃGme.removeEventListener("blur",this.ǃGGk),this.ǃGGk=null,this.ǃGcq.removeEventListener(_234,this.ǃyj),this.ǃyj=null,this.ǃGcq.removeEventListener("UITap",this.ǃBR),this.ǃBR=null,ǃG.ǃGD.ǃjE(this.ǃGme),this.ǃGme=null,super.ǃND()}ǃGGy(){return this.ǃGcY?this.ǃGcH?this.ǃJJ.ǃGGW(this.ǃGcY,this):this.ǃGcY(this):null}ǃGGu(ne){this.ǃGcz&&(ne=!!ne,this.ǃGcH?this.ǃJJ.ǃGGU(this.ǃGcz,ne,this):this.ǃGcz(ne,this))}ǃ_X(){this.ǃGcl&&this.ǃGcl(this.ǃcu())}ǃGmp(ne){this.ǃGcJ=!0,null===ne?this.ǃGme.indeterminate=!0:(this.ǃGme.indeterminate=!1,this.ǃGme.checked=!!ne),this.ǃGcJ=!1}ǃow(){this.ǃGcJ||!this.ǃGcz||(this.ǃ_X(),this.ǃGGu(!!this.ǃGme.checked),this.ǃGcY&&(this.ǃGcx=this.ǃGGy(),!!this.ǃGme.checked!==this.ǃGcx&&this.ǃGmp(this.ǃGcx)),this.ǃJJ.ǃZr())}ǃGc_(){this.ǃGme.focus()}ǃGmy(){return this.ǃGme}ǃGcB(){this.ǃGcF&&(this.ǃGcH?this.ǃdr(this.ǃJJ.ǃGGw(this.ǃGcF)):this.ǃdr(this.ǃGcF()))}ǃGcK(ne){this.ǃGme.disabled=!ne}ǃGcW(){if(this.ǃGcY){let ne=this.ǃGGy();ne===this.ǃGcx||(this.ǃGcx=ne,this.ǃGmp(this.ǃGcx))}}}}"use strict",ǃG.ǃGD.ǃGr.ǃGmB=class extends ǃG.ǃGD.ǃGr.ǃGcu{constructor(te,ne,ie,me,ae,de,re){super(te,ne,ie,me),ǃG.ǃcVD(ae),this.ǃGmW=ǃG.ǃGD.ǃXK("span",this.ǃGcq,null,"infoProperty"),this.ǃGmW.setAttribute("tabindex","-1"),this.ǃGmu=ae,this.ǃGcx=null,this.ǃGcF=de,this.ǃGcH=re,this.ǃGcW(),this.ǃdr(!1)}ǃGGy(){return this.ǃGmu?this.ǃGcH?this.ǃJJ.ǃGGW(this.ǃGmu,this):this.ǃGmu(this):null}ǃGcW(){if(this.ǃGmu){let te=this.ǃGGy();null===te?te=lang("ui.bars.properties.multiple-placeholder"):!ǃG.ǃcaX(te)&&(te=te.toString()),ǃG.ǃcKI(this.ǃGcx,te)||(this.ǃGcx=te,ǃG.ǃcmS(this.ǃGmW,this.ǃGcx))}}ǃGc_(){this.ǃGmW.focus()}ǃND(){ǃG.ǃGD.ǃjE(this.ǃGmW),this.ǃGmW=null,this.ǃGmu=null,this.ǃGcF=null,this.ǃGcx=null,super.ǃND()}ǃGmU(){return this.ǃGmW}ǃGcB(){this.ǃGcF&&(this.ǃGcH?this.ǃdr(this.ǃJJ.ǃGGw(this.ǃGcF)):this.ǃdr(this.ǃGcF()))}},"use strict",ǃG.ǃGD.ǃGr.ǃGmv=class extends ǃG.ǃGD.ǃGr.ǃGcu{constructor(te,ne,ie,me,ae,de){if(super(te,ne,ie,me),ǃG.ǃbv(ae),this.ǃGmq=ǃG.ǃGD.ǃXK("a",this.ǃGcq),this.ǃGma=null,"string"==typeof de)this.ǃGmq.href=de,this.ǃGmq.target="_blank";else if("function"==typeof de)this.ǃGma=de,this.ǃGmq.addEventListener("click",this.ǃGma);else throw new TypeError("expected string or function");this.ǃGmq.textContent=ae,this.ǃGGT=()=>this.ǃGcA(),this.ǃGmq.addEventListener("focus",this.ǃGGT),this.ǃGGk=()=>this.ǃJJ.ǃGcV(this),this.ǃGmq.addEventListener("blur",this.ǃGGk)}ǃND(){this.ǃGmq.removeEventListener("focus",this.ǃGGT),this.ǃGGT=null,this.ǃGmq.removeEventListener("blur",this.ǃGGk),this.ǃGGk=null,this.ǃGma&&(this.ǃGmq.removeEventListener("click",this.ǃGma),this.ǃGma=null),ǃG.ǃGD.ǃjE(this.ǃGmq),this.ǃGmq=null,super.ǃND()}ǃGc_(){this.ǃGmq.focus()}ǃGmg(){return this.ǃGmq}ǃGmN(te){if(ǃG.ǃbv(te),this.ǃGma)throw new Error("not an external link");this.ǃGmq.href=te}ǃGmK(te){ǃG.ǃbv(te),this.ǃGmq.textContent=te}},"use strict";{const _236="UIPointerDown";ǃG.ǃGD.ǃGr.ǃGmn=class extends ǃG.ǃGD.ǃGr.ǃGcT{constructor(te,ne,ie,me){super(te,ne,ie,me),this.ǃcjc=ǃG.ǃGD.ǃXK("td",this.ǃUk),this.ǃcjc.setAttribute("colspan","2"),this.ǃcjc.setAttribute("tabindex","-1"),this.ǃcjc.setAttribute("propgroup",""),this.ǃo_=ǃG.ǃGD.ǃXK("div",this.ǃcjc,null,"propgroup-wrap");let ae=this.ǃGct();0this.ǃGcA(),this.ǃcjc.addEventListener("focus",this.ǃGmY),this.ǃGmz=()=>this.ǃJJ.ǃGcV(this),this.ǃcjc.addEventListener("blur",this.ǃGmz),this.ǃGmF=()=>this.ǃwG(!0),this.ǃGcv.addEventListener("UIDoubleTap",this.ǃGmF),this.ǃGmM.ǃGL().addEventListener(_236,this.ǃGmF)}ǃND(){this.ǃGmM.ǃGL().removeEventListener(_236,this.ǃGmF),this.ǃGmM.ǃz(),this.ǃGmM=null,this.ǃGcv.removeEventListener("UIDoubleTap",this.ǃGmF),this.ǃGmF=null,ǃG.ǃGD.ǃjE(this.ǃGcv),this.ǃGcv=null,ǃG.ǃGD.ǃjE(this.ǃo_),this.ǃo_=null,this.ǃcjc.removeEventListener("blur",this.ǃGmz),this.ǃGmz=null,this.ǃcjc.removeEventListener("focus",this.ǃGmY),this.ǃGmY=null,ǃG.ǃGD.ǃjE(this.ǃcjc),this.ǃcjc=null,super.ǃND()}ǃGc_(){this.ǃcjc.focus()}ǃGcg(){return this.ǃcjc}ǃGml(){if(2>=this.ǃGmh.length){for(let te of this.ǃGmh)if(te instanceof ǃG.ǃGD.ǃGr.ǃGmn)return!0;return!1}return!0}ǃLJ(){return this.ǃGmC}ǃ_C(te,ne){te=!!te,ne=!!ne;this.ǃGmC===te||(!this.ǃGml()&&(ne=!1),this.ǃGmC=te,this.ǃGmM.ǃ$R(app.ǃml(this.ǃGmC?"expanded":"collapsed")),this.ǃGmw(ne))}ǃwG(te){te=!!te,this.ǃ_C(!this.ǃLJ(),te)}ǃGcd(te,ne){te=!!te,ne=!!ne,super.ǃGcd(te,ne),this.ǃGmw(ne)}ǃGmw(te){let ne=this.ǃGmC&&this.ǃctl();for(let ie of this.ǃGmh)ie.ǃGcd(ne,te)}ǃS_(te,ne,ie,me,ae,de,re){let Ge=ǃG.ǃX(ǃG.ǃGD.ǃGr.ǃGcn,this.ǃJJ,te,ne,ie,this,me,ae,de,!!re);return Ge.ǃGcd(this.ǃGmC&&this.ǃctl()),this.ǃJJ.ǃGmo.push(Ge),this.ǃGmh.push(Ge),Ge}ǃSE(te,ne,ie,me,ae,de){let re=ǃG.ǃX(ǃG.ǃGD.ǃGr.ǃGGo,this.ǃJJ,te,ne,this,ie,me,ae,!!de);return re.ǃGcd(this.ǃGmC&&this.ǃctl()),this.ǃJJ.ǃGmo.push(re),this.ǃGmh.push(re),re}ǃSC(te,ne,ie,me,ae,de){let re=ǃG.ǃX(ǃG.ǃGD.ǃGr.ǃGGS,this.ǃJJ,te,ne,this,ie,me,ae,!!de);return re.ǃGcd(this.ǃGmC&&this.ǃctl()),this.ǃJJ.ǃGmo.push(re),this.ǃGmh.push(re),re}ǃSU(te,ne,ie,me,ae,de){let re=ǃG.ǃX(ǃG.ǃGD.ǃGr.ǃGmi,this.ǃJJ,te,ne,this,ie,me,ae,!!de);return re.ǃGcd(this.ǃGmC&&this.ǃctl()),this.ǃJJ.ǃGmo.push(re),this.ǃGmh.push(re),re}ǃSg(te,ne,ie,me,ae,de){let re=ǃG.ǃX(ǃG.ǃGD.ǃGr.ǃGmE,this.ǃJJ,te,ne,this,ie,me,ae,!!de);return re.ǃGcd(this.ǃGmC&&this.ǃctl()),this.ǃJJ.ǃGmo.push(re),this.ǃGmh.push(re),re}ǃSO(te,ne,ie,me,ae){let de=ǃG.ǃX(ǃG.ǃGD.ǃGr.ǃGmB,this.ǃJJ,te,ne,this,ie,me,ae);return de.ǃGcd(this.ǃGmC&&this.ǃctl()),this.ǃJJ.ǃGmo.push(de),this.ǃGmh.push(de),de}ǃsW(te,ne,ie,me){let ae=ǃG.ǃX(ǃG.ǃGD.ǃGr.ǃGmv,this.ǃJJ,te,ne,this,ie,me);return ae.ǃGcd(this.ǃGmC&&this.ǃctl()),this.ǃJJ.ǃGmo.push(ae),this.ǃGmh.push(ae),ae}ǃSA(te,ne){let ie=ǃG.ǃX(ǃG.ǃGD.ǃGr.ǃGmn,this.ǃJJ,te,ne,this);return ie.ǃGcd(this.ǃGmC&&this.ǃctl()),this.ǃJJ.ǃGmo.push(ie),this.ǃGmh.push(ie),ie}ǃSJ(te,ne,ie){let me=ǃG.ǃX(ǃG.ǃGD.ǃGr.ǃGGz,this.ǃJJ,te,ne,ie,this);return me.ǃGcd(this.ǃGmC&&this.ǃctl()),this.ǃJJ.ǃGmo.push(me),this.ǃGmh.push(me),me}*children(){for(let te of this.ǃGmh)yield te}ǃw_(){return{name:this.ǃcu(),expanded:this.ǃLJ(),children:this.ǃGmh.map(te=>te.ǃw_()).filter(te=>te)}}ǃwd(te){if(te){for(let ne of te.children){let ie=this.ǃGmH(ne.name);ie&&ie.ǃwd(ne)}this.ǃ_C(te.expanded)}}ǃGmH(te){ǃG.ǃbv(te);for(let ne of this.ǃGmh)if(ne.ǃcu()===te)return ne}}}{const _237="UIPointerDown";ǃG.ǃGD.ǃGr.ǃGGz=class extends ǃG.ǃGD.ǃGr.ǃGcu{constructor(ie,me,ae,de,re){if(super(ie,me,ae,re),ǃG.ǃbv(de),!de)throw new Error("non-empty separator required");this.ǃGmI=de,this.ǃGmx=ǃG.ǃGD.ǃXK("input",this.ǃGcq),this.ǃGmx.type="text",this.ǃGmx.id=this.ǃEK(),this.ǃGmx.setAttribute("spellcheck","false"),this.ǃGmM=ǃG.ǃX(ǃG.ǃGD.ǃmF,app.ǃml("collapsed"),this.ǃo_),this.ǃGmJ=()=>this.ǃwG(!0),this.ǃGmM.ǃGL().addEventListener(_237,this.ǃGmJ),this.ǃGcJ=!1,this.ǃGcZ=!0,this.ǃGcS=!1,this.ǃGcl=this.ǃJJ.ǃGcw(),this.ǃGmC=!1,this.ǃGmh=[],this.ǃGGb=()=>this.ǃow(),this.ǃGmx.addEventListener("change",this.ǃGGb),this.ǃGGT=Ge=>{return ǃG.ǃGD.ǃrV.ǃcsj()?(Ge.preventDefault(),void this.ǃGmx.blur()):void(window.setTimeout(()=>{this.ǃGmx&&ǃG.ǃGD.ǃFK(this.ǃcdZ,this.ǃJJ.ǃGca())},300),this.ǃGcA(),this.ǃGcZ=!1)},this.ǃGmx.addEventListener("focus",this.ǃGGT),this.ǃGGk=()=>{this.ǃJJ.ǃGcV(this),this.ǃGcZ=!0,this.ǃGcS=!1},this.ǃGmx.addEventListener("blur",this.ǃGGk),this.ǃyj=()=>{this.ǃGcZ&&(this.ǃGcS=!0,this.ǃGcZ=!1)},this.ǃGmx.addEventListener(_237,this.ǃyj),this.ǃPV=Ge=>{this.ǃGcS&&(Ge.preventDefault(),this.ǃGcS=!1)},this.ǃGmx.addEventListener("UIPointerUp",this.ǃPV),this.ǃPL=Ge=>this.ǃP_(Ge),this.ǃGmx.addEventListener("keydown",this.ǃPL),this.ǃGmx.addEventListener("dragstart",ǃG.ǃGD.ǃclZ),this.ǃGmF=()=>this.ǃwG(!0),this.ǃGcv.addEventListener("UIDoubleTap",this.ǃGmF)}ǃND(){this.ǃGcl=null,this.ǃGcv.removeEventListener("UIDoubleTap",this.ǃGmF),this.ǃGmF=null,this.ǃGmx.removeEventListener("change",this.ǃGGb),this.ǃGGb=null,this.ǃGmx.removeEventListener("focus",this.ǃGGT),this.ǃGGT=null,this.ǃGmx.removeEventListener("blur",this.ǃGGk),this.ǃGGk=null,this.ǃGmx.removeEventListener(_237,this.ǃyj),this.ǃyj=null,this.ǃGmx.removeEventListener("UIPointerUp",this.ǃPV),this.ǃPV=null,this.ǃGmx.removeEventListener("keydown",this.ǃPL),this.ǃPL=null,this.ǃGmx.removeEventListener("dragstart",ǃG.ǃGD.ǃclZ),ǃG.ǃGD.ǃjE(this.ǃGmx),this.ǃGmx=null,this.ǃGmM.ǃGL().removeEventListener(_237,this.ǃGmJ),this.ǃGmJ=null,this.ǃGmM.ǃz(),this.ǃGmM=null,super.ǃND()}ǃGcA(){this.ǃGmx.select(),super.ǃGcA()}ǃGc_(){this.ǃGmx.focus()}ǃ_X(){this.ǃGcl&&this.ǃGcl(this.ǃcu())}ǃGmZ(){let ie=[];for(let me of this.ǃGmh)me.ǃGGq()||ie.push(me);return ie}ǃow(){if(!this.ǃGcJ){this.ǃ_X(),this.ǃGcJ=!0;let ie=this.ǃGmx.value.trim(),me=this.ǃGmI.trim(),ae=ie.split(me),de=this.ǃGmZ(),re=Math.min(ae.length,de.length);for(let Ge=0;Geie.ǃw_()).filter(ie=>ie)}}ǃwd(ie){if(ie){for(let me of ie.children){let ae=this.ǃGmH(me.name);ae&&ae.ǃwd(me)}this.ǃ_C(ie.expanded)}}ǃGmH(ie){ǃG.ǃbv(ie);for(let me of this.ǃGmh)if(me.ǃcu()===ie)return me}}}{const _238="selected",_239="UIPointerMove",_240="UIPointerDown",_241="no item array available",te={ǃJS:!1};ǃG.ǃGD.ǃGr.ǃJZ=class extends ǃG.Event.ǃpF{constructor(ie,me){super(),ǃG.ǃcDt(me),me=Object.assign({},te,me),this.ǃcHe=ie,this.ǃUk=ǃG.ǃGD.ǃXK("ui-propertygrid",this.ǃcHe),this.ǃGms=ǃG.ǃGD.ǃXK("ui-propertygrid-container",this.ǃUk),this.ǃGmO=ǃG.ǃGD.ǃXK("ui-propertygrid-table",this.ǃGms),this.ǃGmQ=ǃG.ǃGD.ǃXK("tr",this.ǃGmO),this.ǃGDc=ǃG.ǃGD.ǃXK("td",this.ǃGmQ),this.ǃGDc.style.width="50%",this.ǃGDG=ǃG.ǃGD.ǃXK("td",this.ǃGmQ),this.ǃGDm=ǃG.ǃGD.ǃXK("ui-propertygrid-footer",this.ǃUk),this.ǃGDm.style.display="none",this.ǃGDD=ǃG.ǃGD.ǃXK("span",this.ǃGDm,null,"property-footer-title"),this.ǃGDi=ǃG.ǃGD.ǃXK("span",this.ǃGDm,null,"property-footer-description"),this.ǃGDR=!!me.ǃJS,this.ǃGmo=[],this.ǃGcl=null,this.ǃGDb=null,this.ǃGDT=null,this.ǃGDk=0,this.ǃGDX=null,this.ǃGD$=0,this.ǃGDr=[],this.ǃGDV=-1,this.ǃGDA=[],this.ǃGDL=()=>this.ǃGD_(!1),this.ǃGDt=-1,this.ǃGDP=[],this.ǃGDj=()=>this.ǃGDd(!1),this.ǃGDE=!0,this.ǃGDe=1,this.ǃyj=ae=>this.ǃji(ae),this.ǃP$=ae=>this.ǃPr(ae),this.ǃGDp=ae=>this.ǃGDf(ae),this.ǃGG_=ae=>this.ǃGDy(ae),this.ǃyP=null,this.ǃGDB=!1,this.ǃcrV=0,this.ǃcrA=null,this.ǃGDR&&(this.ǃGmO.addEventListener(_240,this.ǃyj,!0),this.ǃGmO.addEventListener(_239,this.ǃP$),this.ǃmV().addEventListener(_239,this.ǃGDp),this.ǃmV().addEventListener("UIPointerUp",this.ǃGG_))}ǃz(){this.ǃmt(),this.ǃcrQ(),this.ǃGmO.removeEventListener(_240,this.ǃyj,!0),this.ǃyj=null,this.ǃGmO.removeEventListener(_239,this.ǃP$),this.ǃP$=null,this.ǃmV().removeEventListener(_239,this.ǃGDp),this.ǃGDp=null,this.ǃmV().removeEventListener("UIPointerUp",this.ǃGG_),this.ǃGG_=null,ǃG.ǃGD.ǃjE(this.ǃcrA),this.ǃcrA=null,ǃG.ǃGD.ǃjE(this.ǃGDG),this.ǃGDG=null,ǃG.ǃGD.ǃjE(this.ǃGDc),this.ǃGDc=null,ǃG.ǃGD.ǃjE(this.ǃGmQ),this.ǃGmQ=null,ǃG.ǃGD.ǃjE(this.ǃGmO),this.ǃGmO=null,ǃG.ǃGD.ǃjE(this.ǃGms),this.ǃGms=null,ǃG.ǃGD.ǃjE(this.ǃGDm),this.ǃGDm=null,ǃG.ǃGD.ǃjE(this.ǃUk),this.ǃUk=null,this.ǃcHe=null,this.ǃGDL=null,this.ǃGDj=null,this.ǃGDT=null,super.ǃz()}ǃmt(){this.ǃcSb(),ǃG.ǃGs(this.ǃGDr),this.ǃGDW("",""),-1!==this.ǃGDV&&(this.ǃDF().cancelAnimationFrame(this.ǃGDV),this.ǃGDV=-1),ǃG.ǃGs(this.ǃGDA),-1!==this.ǃGDt&&(this.ǃDF().cancelAnimationFrame(this.ǃGDt),this.ǃGDt=-1),ǃG.ǃGs(this.ǃGDP);for(let ie=this.ǃGmo.length-1;0<=ie;--ie)this.ǃGmo[ie].ǃND();this.ǃGcl=null,this.ǃGDb=null,ǃG.ǃGs(this.ǃGmo),this.ǃGDk=0}ǃcrQ(){ǃG.ǃGD.ǃVe(this.ǃyP),this.ǃyP=null}ǃcSb(){for(let ie=document.activeElement;ie;)if(ie=ie.parentElement,ie===this.ǃGmO)return void document.activeElement.blur()}ǃGL(){return this.ǃUk}ǃGcX(){return"propid"+this.ǃGDk++}ǃGcr(){return this.ǃGmO}ǃGca(){return this.ǃGms}ǃmV(){return this.ǃGL().ownerDocument}ǃDF(){return this.ǃmV().defaultView}ǃGDW(ie,me){ǃG.ǃbv(ie),ǃG.ǃbv(me);let ae=this.ǃGms.scrollTop;if(ie&&"\xA0"!==ie){let de=lang("ui.bars.properties.footer-title-prefix"),re=lang("ui.bars.properties.footer-title-suffix");this.ǃGDD.textContent=de+ie+re}else ǃG.ǃGD.ǃciO(this.ǃGDD);me?this.ǃGDi.textContent=me:ǃG.ǃGD.ǃciO(this.ǃGDi),this.ǃGDm.style.display=ie||me?"":"none",this.ǃGms.scrollTop=ae}ǃOy(ie){if(ǃG.ǃkF(ie),!ie.length)throw new Error("cannot set empty item array");ǃG.ǃcGb(this.ǃGDr,ie)}ǃcjY(ie){ǃG.ǃc$i(ie),this.ǃcHe!==ie&&(this.ǃcHe&&this.ǃcHe.removeChild(this.ǃUk),this.ǃcHe=ie,this.ǃcHe.appendChild(this.ǃUk))}ǃSL(ie){ǃG.ǃcVD(ie),this.ǃGcl=ie}ǃGcw(){return this.ǃGcl}ǃsU(ie){ǃG.ǃcVD(ie),this.ǃGDb=ie}ǃGcf(){return this.ǃGDb}ǃGGW(ie,me){if(!this.ǃGDr.length)throw new Error(_241);let ae=ie(this.ǃGDr[0],me),de=ae instanceof ǃG.ǃBc;for(let re=1,Ge=this.ǃGDr.length,oe;reme)){++me;for(let ae=this.ǃGmo.length,de;methis.ǃcih(),this.ǃcRd=ee.getElementById("cancelButton"),this.ǃcRd.onclick=()=>this.ǃcRE()}ǃciI(){this.ǃciM.textContent=lang("common.ok"),this.ǃcRd.textContent=lang("common.cancel")}ǃ$i(ae,de){return ǃG.ǃbv(ae),this.ǃGDq.value=ae,super.ǃ$i(de)}ǃcih(){this.ǃcRW(this.ǃGDq.value)}};ǃG.ǃGD.ǃE$.ǃcRG.addEventListener("load",function(){ǃG.ǃGD.ǃDZ.ǃcRm("LongTextPropertyDialog",ie)})}{const _242="UIPointerUp",_243="UIPointerDown",_244="UIPointerMove",ie={title:"",ǃHa:"",ǃGDa:!1};ǃG.ǃGD.ǃGr.ǃcsA=class extends ǃG.ǃDa{constructor(ae,de){super(),ǃG.ǃcDt(de),de=Object.assign({},ie,de),ǃG.ǃbv(de.title),this.ǃcZB=ae,this.ǃUk=ǃG.ǃGD.ǃXK("ui-tab",this.ǃcZB.ǃGL()),this.ǃUk.setAttribute("role","tab"),this.ǃGDg=ǃG.ǃGD.ǃXK("span",this.ǃUk),this.ǃGDg.textContent=de.title,this.ǃCt=!1,this.ǃGDN=de.title,this.ǃGDK=de.ǃHa,this.ǃcH_=null,this.ǃGDK&&this.ǃUk.setAttribute("title",this.ǃGDK),this.ǃGGr=!1,this.ǃWA=0,this.ǃWL=0,this.ǃGDn=!1,this.ǃcZv=null,this.ǃyj=re=>this.ǃji(re),this.ǃUk.addEventListener(_243,this.ǃyj),this.ǃBb=re=>this.ǃ$l(re),this.ǃUk.addEventListener("contextmenu",this.ǃBb),this.ǃP$=re=>this.ǃPr(re),this.ǃPV=re=>this.ǃPA(re),de.ǃGDa&&(this.ǃUk.setAttribute("closebutton",""),this.ǃcH_=ǃG.ǃX(ǃG.ǃGD.ǃGr.ǃcmy,this.ǃUk),this.ǃcH_.onclick=()=>this.ǃcZB.ǃGDM(this,"tabclose"))}ǃND(){this.ǃUk.removeEventListener("contextmenu",this.ǃBb),this.ǃBb=null,this.ǃUk.ownerDocument.removeEventListener(_242,this.ǃPV),this.ǃPV=null,this.ǃUk.ownerDocument.removeEventListener(_244,this.ǃP$),this.ǃP$=null,this.ǃUk.removeEventListener(_243,this.ǃyj),this.ǃyj=null,this.ǃcH_&&(this.ǃcH_.ǃz(),this.ǃcH_=null),ǃG.ǃGD.ǃjE(this.ǃGDg),this.ǃGDg=null,ǃG.ǃGD.ǃjE(this.ǃUk),this.ǃUk=null,this.ǃcZv=null,this.ǃcZB=null,ǃG.ǃz(this)}ǃji(ae){let de=ae.detail.clientX,re=ae.detail.clientY;return this.ǃGGr?void 0:1===ae.detail.ǃET?void this.ǃXI().ǃGDM(this,"tabmiddleclick"):void(this.ǃcZB.ǃcs$(this),this.ǃGGr=!0,this.ǃWA=de,this.ǃWL=re,this.ǃGDn=!1,this.ǃUk.ownerDocument.addEventListener(_244,this.ǃP$),this.ǃUk.ownerDocument.addEventListener(_242,this.ǃPV))}ǃPr(ae){let de=ae.detail,re=de.clientX,Ge=de.clientY,oe=de.id;if(this.ǃGGr){if(this.ǃcZB.ǃGDC()&&Math.abs(re-this.ǃWA)>=10&&(this.ǃGDn=!0),this.ǃGDn){let he=this.ǃcZB.ǃGDh(re,Ge);if(he&&he!==this){let ve=this.ǃcE(),be=he.ǃcE(),Ee=be-ve,De=!0;return 0=ue.left-pe&&Ge>=ue.top-pe&&re<=ue.right+pe&&Ge<=ue.bottom+pe;ǃG.ǃWi(this.ǃWA,this.ǃWL,re,Ge)>80&&!ge&&ǃG.ǃDG.ǃPn&&(this.ǃPA(),this.ǃXI().ǃcSx(this,re,Ge,oe))}}ǃPA(){this.ǃGGr=!1,this.ǃGDn=!1,this.ǃUk.ownerDocument.removeEventListener(_242,this.ǃPV),this.ǃUk.ownerDocument.removeEventListener(_244,this.ǃP$)}ǃ$l(ae){this.ǃcZB.ǃcSO(this,ae.clientX,ae.clientY)||ae.preventDefault()}ǃGDz(ae){ae=!!ae;this.ǃCt===ae||(ǃG.ǃGD.ǃFh(this.ǃUk,"active",ae),this.ǃCt=ae)}ǃpi(){return this.ǃUk.getBoundingClientRect().left}ǃcE(){let ae=this.ǃUk.getBoundingClientRect();return ae.right-ae.left}ǃVE(ae,de){ǃG.ǃTH(ae),ǃG.ǃTH(de);let re=this.ǃUk.getBoundingClientRect();return ae>=re.left&&de>=re.top&&aeie||ie>=this.ǃcZU.length?null:this.ǃcZU[ie]}*ǃcDb(){for(let ie=0,me=this.ǃcZU.length;ieie||ie>=this.ǃcZU.length)throw new RangeError(_245);let me=this.ǃcZU[ie];me.ǃND(),this.ǃcZU.splice(ie,1),this.ǃGDo===me&&(this.ǃcZU.length?this.ǃcs$(this.ǃcZU[0],!0):this.ǃGDo=null),this.ǃGDM(null,"tabremove")}ǃcDA(ie){if(ǃG.ǃTH(ie),ie=Math.floor(ie),0>ie||ie>=this.ǃcZU.length)throw new RangeError(_245);this.ǃcs$(this.ǃcZU[ie])}ǃGDh(ie,me){ǃG.ǃTH(ie),ǃG.ǃTH(me);for(let ae of this.ǃcZU)if(ae.ǃVE(ie,me))return ae;return null}ǃcs$(ie,me=!1){if(ǃG.ǃg(ie,ǃG.ǃGD.ǃGr.ǃcsA),this.ǃGDo!==ie){if(!this.ǃcZU.includes(ie))throw new Error("tab does not belong to this tab bar");this.ǃGDo=ie,this.ǃGDH(),this.ǃGDM(ie,"activetabchanged",me)}}ǃGDH(){for(let ie=0,me=this.ǃcZU.length,ae;ieae||0>de)throw new Error("cannot find tab");this.ǃcZU[ae]=me,this.ǃcZU[de]=ie,this.ǃGDI()}ǃGDI(){for(let ie of this.ǃcZU)ǃG.ǃGD.ǃjE(ie.ǃGL());for(let ie of this.ǃcZU)this.ǃUk.appendChild(ie.ǃGL())}ǃcSx(ie,me,ae,de){ǃG.ǃg(ie,ǃG.ǃGD.ǃGr.ǃcsA),ǃG.ǃTH(me),ǃG.ǃTH(ae),ǃG.ǃTH(de);let re=new ǃG.Event("tearofftab");re.ǃcSS=ie,re.clientX=me,re.clientY=ae,re.pointerId=de,this.dispatchEvent(re)}ǃcSO(ie,me,ae){ǃG.ǃg(ie,ǃG.ǃGD.ǃGr.ǃcsA),ǃG.ǃTH(me),ǃG.ǃTH(ae);let de=new ǃG.Event("tabcontextmenu",!0);return de.ǃcSS=ie,de.clientX=me,de.clientY=ae,this.dispatchEvent(de)}ǃGDM(ie,me,ae=!1){ǃG.ǃmL(ie,ǃG.ǃGD.ǃGr.ǃcsA),ǃG.ǃbv(me);let de=new ǃG.Event(me);de.ǃcSS=ie,de.ǃcsr=ae?"removal":"",this.dispatchEvent(de)}}}{const _246="insert-inside",_247="item from different tree",ee={ǃGDx:-1,ǃ$Y:!1,ǃAy:!1,ǃAB:!1,ǃ$z:!1,ǃ$F:!1,ǃGDJ:!0},te=400;ǃG.ǃGD.ǃGr.ǃ$h=class extends ǃG.Event.ǃpF{constructor(ie,me){super(),ǃG.ǃc$i(ie),ǃG.ǃcDt(me),me=Object.assign({},ee,me),ǃG.ǃTH(me.ǃGDx),this.ǃcHe=ie,this.ǃGDZ=me.ǃGDx,0>this.ǃGDZ&&(this.ǃGDZ=app.ǃGP()),this.ǃGDS=!!me.ǃ$Y&&ǃG.ǃDG.ǃPn,this.ǃGDs=!!me.ǃAy,this.ǃGDO=!!me.ǃ$z,this.ǃGDQ=!!me.ǃ$F,this.ǃGic=!!me.ǃAB,this.ǃGiG=!!me.ǃGDJ,this.ǃUk=ǃG.ǃGD.ǃXK("ui-tree",this.ǃcHe),this.ǃUk.setAttribute("role","tree"),this.ǃUk.setAttribute("tabindex",0),this.ǃGGT=()=>this.ǃGim(),this.ǃGGk=()=>this.ǃGiD(),this.ǃUk.addEventListener("focus",this.ǃGGT),this.ǃUk.addEventListener("blur",this.ǃGGk),this.ǃPL=ae=>this.ǃP_(ae),this.ǃGDQ?this.ǃUk.setAttribute("fullrowselect",""):this.ǃUk.setAttribute("itemselect",""),this.ǃGiG&&this.ǃUk.setAttribute("wraplongitems",""),this.ǃcYK=ǃG.ǃX(ǃG.ǃGD.ǃGr.ǃrE,this,null,null,""),this.ǃGii=app.ǃml("expanded"),this.ǃGiR=app.ǃml("collapsed"),this.ǃGib=new Set,this.ǃGiT=null,this.ǃcrE=ǃG.ǃGD.ǃXK("div",null,null,"tree-insert-mark"),this.ǃGik=null,this.ǃcrp="",this.ǃGiX=!1,this.ǃtF=-1,this.ǃGi$=()=>this.ǃGir(),this.ǃGiV=0,this.ǃGiA=0,this.ǃGiL=0,this.ǃGi_=0}ǃz(){this.ǃmV().removeEventListener("keydown",this.ǃPL),this.ǃPL=null,this.ǃGib.clear(),this.ǃGiT=null,this.ǃVd(),this.ǃcrE=null,this.ǃGit(),this.ǃGi$=null,this.ǃcYK.ǃz(!0),this.ǃcYK=null,this.ǃUk.removeEventListener("focus",this.ǃGGT),this.ǃUk.removeEventListener("blur",this.ǃGGk),this.ǃGGT=null,this.ǃGGk=null,ǃG.ǃGD.ǃjE(this.ǃUk),this.ǃUk=null,this.ǃcHe=null,super.ǃz()}ǃza(ie){ie=!!ie,this.ǃcYK.ǃGiP(ie)}ǃzN(ie,me,ae){let de=ie instanceof ǃG.ǃGD.ǃGr.ǃrE?ie:this.ǃGij(re=>re.ǃmc()===ie);de&&(me=!!me,ae=!!ae,ae?de.ǃGiP(me):de.ǃ_C(!1,me))}ǃzg(ie){ie=!!ie,this.ǃcYK.ǃGid(ie)}ǃzK(ie,me,ae){let de;de=ie instanceof ǃG.ǃGD.ǃGr.ǃrE?ie:this.ǃGij(re=>re.ǃmc()===ie),me=!!me,ae=!!ae,ae?de.ǃGid(me):de.ǃ_C(!0,me)}ǃGiE(ie){if(ǃG.ǃg(ie,ǃG.ǃGD.ǃGr.ǃrE),ie.ǃGie()!==this)throw new Error(_247)}ǃGip(ie){if(ǃG.ǃmL(ie,ǃG.ǃGD.ǃGr.ǃrE),ie&&ie.ǃGie()!==this)throw new Error(_247)}ǃGij(ie){return this.ǃcYK.ǃGij(ie)}ǃmt(){this.ǃVd(),this.ǃcYK.ǃrK()}ǃGif(){return this.ǃGDZ}ǃrN(){return this.ǃcYK}ǃGL(){return this.ǃUk}ǃmV(){return this.ǃUk.ownerDocument}ǃDF(){return this.ǃmV().defaultView}ǃGiy(){return this.ǃGii}ǃGiB(){return this.ǃGiR}ǃGiW(){return this.ǃGDS}ǃGiu(){return this.ǃGDs}ǃGiU(){return this.ǃGic}ǃGiv(){return this.ǃGDO}ǃGiq(){return this.ǃGDQ}ǃGia(ie){this.ǃGiE(ie),this.ǃGib.add(ie),this.ǃGig(ie,"itemselect")}ǃGiN(ie){this.ǃGiE(ie),this.ǃGib.delete(ie)}ǃzH(){return this.ǃGib.size}ǃ_W(){this.ǃGiT=null;for(let ie of this.ǃGib)ie.ǃcVx(!1);assert(0===this.ǃGib.size,"should have deleted all selected items")}ǃ_D(){return this.ǃGib.values()}ǃrp(){return ǃG.ǃds(this.ǃGib)}ǃFS(){let ie=[];for(let me of this.ǃ_D())ie.push(me);return this.ǃGiK(ie),ie}ǃGin(ie){this.ǃGip(ie),this.ǃGiT=ie}ǃGiM(){return this.ǃGiT}ǃGiC(){return this.ǃcYK.ǃGiC()}ǃGih(){return this.ǃcYK.ǃGih()}ǃrW(ie,me){ǃG.ǃbv(ie);const ae=ie.toLowerCase();for(const de of this.ǃGiC())if((me||de.ǃctl())&&de.ǃLx().toLowerCase().startsWith(ae))return de;return null}ǃGiY(ie,me){if(this.ǃGiE(ie),this.ǃGiE(me),ie===me)return void ie.ǃcVx(!0);let ae=!1,de=null,re=[];for(let Ge of this.ǃGiC())if(ae||(Ge===ie?(ae=!0,de=me):Ge===me&&(ae=!0,de=ie)),ae&&(re.push(Ge),Ge===de))break;de===ie&&re.reverse();for(let Ge of re)Ge.ǃcVx(!0)}ǃGim(){this.ǃmV().addEventListener("keydown",this.ǃPL)}ǃGiD(){this.ǃmV().removeEventListener("keydown",this.ǃPL)}ǃP_(ie){if(1===this.ǃzH()){const me=ie.which;if(me===ǃG.ǃEj.ǃWn||me===ǃG.ǃEj.ǃWM){const ae=this.ǃrp(),de=[...this.ǃGih()];let re=de.indexOf(ae);0>re||(me===ǃG.ǃEj.ǃWn?--re:++re,0>re||re>=de.length||(de[re].ǃrU(),de[re].ǃFK(),ie.preventDefault()))}}}ǃVE(ie,me,ae,de){ǃG.ǃTH(ie),ǃG.ǃTH(me),ǃG.ǃoG(ae),ae=ae||"full",de=!!de;let re=this.ǃUk.getBoundingClientRect();if(iere.right||me>re.bottom)return null;for(let Ge of this.ǃGiC()){let oe=Ge.ǃVE(ie,me,ae);if(oe)return{item:Ge,ǃVj:oe.ǃVj,ǃFx:oe.ǃFx}}return de&&ie>re.left&&me>re.top&&ie=ae.left&&this.ǃGiA<=ae.right)if(this.ǃGiLae.bottom){let de=this.ǃUk.scrollTop,re=de+te*me+this.ǃGi_;this.ǃGi_=re-Math.floor(re),re=Math.floor(re),this.ǃUk.scrollTop=re}this.ǃtF=this.ǃDF().requestAnimationFrame(this.ǃGi$)}}ǃGit(){this.ǃGiX=!1,-1!==this.ǃtF&&(this.ǃDF().cancelAnimationFrame(this.ǃtF),this.ǃtF=-1)}ǃGiK(ie){ǃG.ǃkF(ie);for(let me of ie)this.ǃGiE(me);this.ǃGiz(),ie.sort(ǃG.ǃGD.ǃGr.ǃrE.ǃGiF)}ǃGiz(){let ie=0;for(let me of this.ǃGiC())me.ǃGil(ie++)}ǃGiw(ie){ǃG.ǃbv(ie);let me=new ǃG.Event(ie,!0);return me.ǃGio=this,this.dispatchEvent(me)}ǃGig(ie,me){this.ǃGiE(ie),ǃG.ǃbv(me);let ae=new ǃG.Event(me,!0);return ae.item=ie,this.dispatchEvent(ae)}ǃGiH(ie,me,ae,de){this.ǃGiE(ie),ǃG.ǃbv(me),ǃG.ǃTH(ae),ǃG.ǃTH(de);let re=new ǃG.Event(me,!0);return re.item=ie,re.clientX=ae,re.clientY=de,this.dispatchEvent(re)}ǃ$s(ie,me){this.ǃGiE(ie);let ae=new ǃG.Event("itemcontextmenu",!0);return ae.item=ie,ae.clientX=me.clientX,ae.clientY=me.clientY,this.dispatchEvent(ae)}ǃw_(){return{name:this.ǃcYK.ǃLx(),children:[...this.ǃcYK.children()].map(ie=>ie.ǃw_())}}ǃwd(ie){if(ie){let me=[...this.ǃcYK.children()];if(me.length)for(let ae=0;aethis.ǃGis(),this.ǃGiO=!0,this.ǃGiQ=ge=>this.ǃGRc(ge),this.ǃGRG=0,this.ǃGRm=0,this.ǃcrP=-1,this.ǃWA=0,this.ǃWL=0,this.ǃGGr=!1,this.ǃP$=null,this.ǃPV=null,this.ǃGRD=null,this.ǃGRi=0,this.ǃGRR=0,this.ǃctR=ge=>this.ǃjb(ge),this.ǃcjR=ge=>this.ǃcjb(ge),this.ǃctI=()=>this.ǃctx(),this.ǃGRb=null,this.ǃcti=!1,this.ǃBb=ge=>this.ǃ$l(ge),this.ǃGRT=null,this.ǃGRk=null,this.ǃXh=null,this.ǃGRX=null,this.ǃGR$=null,this.ǃcIC=null,this.ǃGRr=null,this.ǃGRV=null,this.ǃGGd=null,this.ǃGRA=null,this.ǃGRL=null,this.ǃGR_=null,this.ǃGRt=-1,this.ǃzx()||(this.ǃUk=ǃG.ǃGD.ǃXK("ui-treeitem",this.ǃcHe.ǃGRP(),null,null,null,ue),this.ǃUk.setAttribute("role","treeitem"),this.ǃUk.addEventListener("contextmenu",this.ǃBb),!this.enable&&this.ǃUk.setAttribute("disable",""),this.ǃcji=ǃG.ǃX(ǃG.ǃGD.ǃmF,this.ǃ$C.ǃGiy().ǃcOV(),this.ǃUk),this.ǃGRb=ǃG.ǃGD.ǃXK("div",this.ǃUk,null,"tree-item-wrap"),this.ǃGRj().addEventListener("UIDoubleTap",this.ǃctR),this.ǃXh=ǃG.ǃX(ǃG.ǃGD.ǃmF,this.ǃcQB||this.ǃ$C.ǃGif(),this.ǃGRb),this.ǃGRX=ge=>this.ǃGRd(ge),this.ǃXh.ǃGL().addEventListener(_253,this.ǃGRX),this.ǃGR$=ǃG.ǃGD.ǃXK("span",this.ǃGRb,null,"tree-item-name"),this.ǃGR$.textContent=this.ǃhM,this.ǃGRA=()=>this.ǃGRE(),this.ǃyj=ge=>this.ǃji(ge),this.ǃGRj().addEventListener(_253,this.ǃyj),this.ǃP$=ge=>this.ǃPr(ge),this.ǃPV=ge=>this.ǃPA(ge)),this.ǃcmI=!1}ǃGRe(de){de=!!de,this.ǃGix=de}ǃFp(){return this.ǃGix}ǃrK(){this.ǃctO(),this.ǃGiI=!0;for(let de=this.ǃcHp.length-1,re;0<=de;--de)re=this.ǃcHp[de],re.ǃGRe(!0),re.ǃz();ǃG.ǃGs(this.ǃcHp),this.ǃGiI=!1,this.ǃGRp()}ǃcIi(de){if(ǃG.ǃg(de,ǃG.ǃGD.ǃGr.ǃrE),!this.ǃGiI){let re=this.ǃcHp.indexOf(de);assert(0<=re,"cannot find child to remove"),this.ǃcHp.splice(re,1),this.ǃcHp.length||this.ǃGRp()}}ǃz(de){if(this.ǃzx()&&!de)throw new Error("root item cannot be removed");this.ǃGRf(),this.ǃGiQ=null,this.ǃGRy(),this.ǃctO(),this.ǃcVx(!1),this.ǃ$C.ǃGiM()===this&&(1<=this.ǃ$C.ǃzH()?this.ǃ$C.ǃGin(this.ǃ$C.ǃrp()):this.ǃ$C.ǃGin(null)),this.ǃrK(),this.ǃctI=null,this.ǃGRA=null,this.ǃzx()||(this.ǃGRj().removeEventListener("UIDoubleTap",this.ǃctR),this.ǃGRj().removeEventListener(_253,this.ǃyj),this.ǃmV().removeEventListener(_254,this.ǃP$),this.ǃmV().removeEventListener(_250,this.ǃPV)),this.ǃcji&&(this.ǃcji.ǃGL().removeEventListener("UITap",this.ǃcjR),this.ǃcji.ǃz(),this.ǃcji=null),this.ǃGiJ&&(ǃG.ǃGD.ǃjE(this.ǃGiJ),this.ǃGiJ=null),this.ǃGR$&&(ǃG.ǃGD.ǃjE(this.ǃGR$),this.ǃGR$=null),this.ǃGRD&&(ǃG.ǃGD.ǃjE(this.ǃGRD),this.ǃGRD=null),this.ǃGRT&&(this.ǃGRT.removeEventListener("change",this.ǃGRk),this.ǃGRk=null,ǃG.ǃGD.ǃjE(this.ǃGRT),this.ǃGRT=null),this.ǃXh&&(this.ǃXh.ǃGL().removeEventListener(_253,this.ǃGRX),this.ǃGRX=null,this.ǃXh.ǃz(),this.ǃXh=null),this.ǃGRb&&(ǃG.ǃGD.ǃjE(this.ǃGRb),this.ǃGRb=null),this.ǃUk&&(this.ǃUk.removeEventListener("contextmenu",this.ǃBb),ǃG.ǃGD.ǃjE(this.ǃUk),this.ǃUk=null),this.ǃBb=null,this.ǃctR=null,this.ǃyj=null,this.ǃP$=null,this.ǃPV=null,this.ǃGiS=null,this.ǃcjR=null,this.ǃcHe&&this.ǃcHe.ǃcIi(this),this.ǃzx()||this.ǃ$C.ǃGig(this,"itemremove"),this.ǃcQB=null,this.ǃcZv=null,this.ǃ$C=null,this.ǃcHe=null,ǃG.ǃz(this)}ǃGL(){return this.ǃUk}ǃVi(){return this.ǃGRb}ǃGRj(){return this.ǃ$C.ǃGiq()?this.ǃUk:this.ǃGRb}ǃGie(){return this.ǃ$C}ǃmV(){return this.ǃUk.ownerDocument}ǃdr(de){de=!!de;this.enable===de||(this.enable=de,this.enable?this.ǃUk.setAttribute("disable",""):this.ǃUk.removeAttribute("disable"))}ǃEh(){return this.enable}*ǃGiC(){this.ǃzx()||(yield this);for(const de of this.ǃcHp)yield*de.ǃGiC()}*ǃGih(){if(this.ǃzx()||(yield this),this.ǃLJ())for(const de of this.ǃcHp)yield*de.ǃGih()}*children(){for(let de of this.ǃcHp)yield de}ǃji(de){let re=de.detail;re.ǃET!==ǃG.ǃye.ǃBX||(this.ǃGRj().setAttribute(_251,""),this.ǃmV().addEventListener(_254,this.ǃP$),this.ǃmV().addEventListener(_250,this.ǃPV),this.ǃcrP=re.id,this.ǃWA=re.clientX,this.ǃWL=re.clientY,this.ǃGGr=!1)}ǃPr(de){let re=de.detail;if(re.id===this.ǃcrP){if(this.ǃ$C.ǃGiv()&&!this.ǃGGr&&ǃG.ǃWi(this.ǃWA,this.ǃWL,re.clientX,re.clientY)>=10)if(this.ǃGRj().removeAttribute(_251,""),this.ǃ$C.ǃGig(this,"dragstart")){this.ǃGGr=!0,this.ǃGRf(),this.ǃ$C.ǃGin(this),this.ǃ_d()||this.ǃrU();for(let oe of this.ǃ$C.ǃ_D())oe.ǃGRj().setAttribute("dragged","");1===this.ǃ$C.ǃzH()?(this.ǃGRD=this.ǃGRb.cloneNode(!0),this.ǃGRD.removeAttribute(_248),this.ǃGRD.setAttribute(_255,"")):(this.ǃGRD=this.ǃGR$.cloneNode(!0),this.ǃGRD.setAttribute(_255,""),this.ǃGRD.textContent=ǃmo("ui.controls.tree.multi-select-drag-tooltip",this.ǃ$C.ǃzH()));let Ge=ǃG.ǃcaY(this.ǃUk,"dialog");if(Ge){Ge.appendChild(this.ǃGRD);let oe=ǃG.ǃGD.ǃDZ.ǃcHl(Ge);this.ǃGRi=oe.ǃcIg(),this.ǃGRR=oe.ǃcIN()}else this.ǃmV().body.appendChild(this.ǃGRD);this.ǃ$C.ǃ$Q()}else return this.ǃcrP=-1,this.ǃmV().removeEventListener(_254,this.ǃP$),this.ǃmV().removeEventListener(_250,this.ǃPV),void(this.ǃ_d()||this.ǃrU());this.ǃGGr&&(de.preventDefault(),this.ǃ$C.ǃGiH(this,"dragmove",re.clientX,re.clientY),this.ǃGRD.style.left=`${re.clientX-this.ǃGRi}px`,this.ǃGRD.style.top=`${re.clientY-this.ǃGRR}px`,this.ǃ$C.ǃrc(re.clientX,re.clientY))}}ǃGRc(de){this.ǃGRG=de.detail.clientX,this.ǃGRm=de.detail.clientY}ǃPA(de){let re=de.detail;if(re.id===this.ǃcrP)if(this.ǃGRj().removeAttribute(_251,""),this.ǃmV().removeEventListener(_254,this.ǃP$),this.ǃmV().removeEventListener(_250,this.ǃPV),this.ǃGGr){this.ǃGGr=!1,this.ǃcrP=-1;for(let Ge of this.ǃ$C.ǃ_D())Ge.ǃGRj().removeAttribute("dragged");ǃG.ǃGD.ǃjE(this.ǃGRD),this.ǃGRD=null,this.ǃ$C.ǃGit(),this.ǃ$C.ǃGiH(this,"drop",re.clientX,re.clientY)}else{if(de.target===this.ǃGRT)return;this.ǃ$C.ǃGiW()&&this.ǃ_d()&&1===this.ǃ$C.ǃzH()&&this.ǃVE(re.clientX,re.clientY,"label")&&(this.ǃGRf(),de.target!==this.ǃXh.ǃGL()&&(this.ǃGRG=re.clientX,this.ǃGRm=re.clientY,this.ǃmV().addEventListener(_254,this.ǃGiQ),this.ǃGiZ=setTimeout(this.ǃGiS,700))),this.ǃ$C.ǃGig(this,"itemclick");let Ge=this.ǃ$C.ǃGiM();if(this.ǃ$C.ǃGiu()){let oe=ǃG.ǃEt.ǃyI(),le=ǃG.ǃEt.ǃE_(ǃG.ǃEj.ǃBL);if(oe&&le&&Ge)return this.ǃ$C.ǃGiY(this,Ge),this.ǃ_d()&&this.ǃ$C.ǃGin(this),this.ǃ$C.ǃGiU()&&this.ǃGRB(!0),void this.ǃ$C.ǃGig(this,_256);if(oe){let ue=!this.ǃ_d();return this.ǃcVx(ue),this.ǃ_d()&&this.ǃ$C.ǃGin(this),this.ǃ$C.ǃGiU()&&this.ǃGRB(ue),void this.ǃ$C.ǃGig(this,_256)}if(le&&Ge)return this.ǃ$C.ǃ_W(),this.ǃ$C.ǃGiY(this,Ge),this.ǃ$C.ǃGiU()&&(this.ǃGRB(!0),Ge.ǃGRB(!0)),void this.ǃ$C.ǃGig(this,_256)}this.ǃ$C.ǃGin(this),this.ǃGRW(!1),this.ǃ$C.ǃ_W(),this.ǃcVx(!0),this.ǃGRW(!0),this.ǃ$C.ǃGiU()&&this.ǃGRB(!0),this.ǃ$C.ǃGig(this,_256)}}ǃGRB(de){if(de=!!de,this.ǃLI())for(let re of this.children())re.ǃcVx(de)}ǃjb(){this.ǃGRf(),this.ǃ$C.ǃGig(this,"itemdoubletap")&&this.ǃGiJ&&this.ǃwG(!0)}ǃGRd(de){this.ǃGRf(),de.detail.ǃET===ǃG.ǃye.ǃBX&&this.ǃ$C.ǃGig(this,"itemiconclick"),de.stopPropagation()}ǃGij(de){if(ǃG.ǃXw(de),de(this))return this;for(let re=0,Ge;reoe.right||reoe.bottom)return null;let le=oe.bottom-oe.top,ue=oe.top+le/4,pe=oe.bottom-le/4,ge=oe.top+le/2,he=re>=ge,ve=re>ue&&re<=pe;return he&&!ve&&this.ǃLJ()&&this.ǃLI()&&(ve=!0),{ǃVj:he?"after":"before",ǃFx:ve}}ǃGRU(){if(this.ǃlH(),this.ǃGmC)for(let de of this.ǃcHp)de.ǃGRU()}ǃ$R(de){if(!ǃG.ǃcXf(de)&&!(de instanceof ǃG.ǃGD.ǃXY))throw new TypeError(_252);ǃG.ǃcXf(de)?this.ǃXh.ǃ$R(app.ǃml(de)):this.ǃXh.ǃ$R(de)}ǃlf(de){ǃG.ǃXw(de),this.ǃXh.ǃlf(de),this.ǃctl()&&this.ǃlH()}ǃlH(){this.ǃXh.ǃlH()}ǃctl(){for(let de=this.ǃcHe;de;){if(!de.ǃLJ())return!1;de=de.ǃcHe}return!0}ǃcjb(de){de.detail.ǃET!==ǃG.ǃye.ǃBX||this.ǃwG(!0)}ǃLJ(){return this.ǃGmC}ǃ_C(de,re){if(this.ǃzx())throw new Error("cannot change expanded state of root item");if(de=!!de,re=!!(re&&this.ǃctl()&&app.ǃcPG()),!this.ǃGiJ)return void(this.ǃGmC=de);if((!re||re&&this.ǃcPm())&&(this.ǃctO(),re=!1),de&&!this.ǃGmC){if(this.ǃGmC=!0,this.ǃGiJ.removeAttribute(_249),this.ǃcji.ǃ$R(this.ǃ$C.ǃGiy()),this.ǃGiR&&this.ǃXh.ǃ$R(this.ǃcQB),this.ǃGRv(),this.ǃctl()&&this.ǃGRU(),re){let Ge=this.ǃGiJ.getBoundingClientRect(),oe=Ge.bottom-Ge.top;ee[0].height="0px",ee[1].height=`${oe}px`,this.ǃGiJ.style.overflow="hidden",this.ǃctH=this.ǃGiJ.animate(ee,te),this.ǃctH.onfinish=this.ǃctI}}else if(!de&&this.ǃGmC)if(this.ǃGmC=!1,this.ǃcji.ǃ$R(this.ǃ$C.ǃGiB()),this.ǃGiR&&this.ǃXh.ǃ$R(this.ǃGiR),this.ǃGRv(),re){let Ge=this.ǃGiJ.getBoundingClientRect(),oe=Ge.bottom-Ge.top;ee[0].height=`${oe}px`,ee[1].height="0px",this.ǃGiJ.style.overflow="hidden",this.ǃctH=this.ǃGiJ.animate(ee,te),this.ǃctH.onfinish=this.ǃctI}else this.ǃGiJ.setAttribute(_249,"")}ǃGRv(){this.ǃcmI||this.ǃ$C.ǃGig(this,"itemexpand")}ǃGid(de){this.ǃzx()||this.ǃ_C(!0,de);let re=this.ǃcHp.length;for(let Ge=0;Geoe?this.ǃcHp.unshift(ue):this.ǃcHp.splice(oe,0,ue):this.ǃcHp.push(ue),ue}ǃFG(de){de?this.ǃUk.setAttribute("fade",""):this.ǃUk.removeAttribute("fade","")}ǃlm(de){ǃG.ǃg(de,ǃG.ǃGD.ǃXY);this.ǃzx()||(this.ǃGiR=de,this.ǃGiJ&&!this.ǃGmC&&this.ǃXh.ǃ$R(this.ǃGiR))}ǃ$l(de){this.ǃ_d()||this.ǃrU(),this.ǃGRf(),this.ǃ$C.ǃ$s(this,de)||(de.preventDefault(),de.stopPropagation())}ǃGRg(de){de=!!de;for(let re=this.ǃcHe;re;)re.ǃzx()||re.ǃ_C(!0,de),re=re.ǃ_T()}ǃFK(){ǃG.ǃGD.ǃFK(this.ǃUk,this.ǃ$C.ǃGL())}ǃru(de){de=!!de,this.ǃGRg(de),this.ǃFK()}ǃGis(){this.ǃGiZ=-1,this.ǃUk&&this.ǃmV().removeEventListener(_254,this.ǃGiQ);this.ǃVE(this.ǃGRG,this.ǃGRm,"full")&&this.ǃ$C.ǃGig(this,"itemedit")}ǃGRW(de){this.ǃGiO=!!de}ǃGRf(){this.ǃGiO&&(this.ǃUk&&this.ǃmV().removeEventListener(_254,this.ǃGiQ),-1!==this.ǃGiZ&&(clearTimeout(this.ǃGiZ),this.ǃGiZ=-1))}ǃGRN(){return!!this.ǃcIC}ǃrQ(de=this.ǃLx(),re=0,Ge=de.length){if(ǃG.ǃoG(de),!this.ǃcIC){this.ǃrU(),this.ǃru();let oe=this.ǃ$C.ǃGL(),le=oe.getBoundingClientRect(),ue=this.ǃGR$.getBoundingClientRect(),pe=ue.left-le.left,ge=ue.top-le.top+oe.scrollTop;return this.ǃcIC=ǃG.ǃGD.ǃXK("input",this.ǃ$C.ǃGL(),null,"tree-edit-text"),this.ǃcIC.type="text",this.ǃcIC.style.left=`${pe}px`,this.ǃcIC.style.top=`${ge}px`,this.ǃcIC.style.width=`${Math.max(ue.right-ue.left,30)}px`,this.ǃcIC.style.maxWidth=`${Math.max(ue.right-ue.left,30)}px`,this.ǃcIC.style.height=`${ue.bottom-ue.top}px`,this.ǃcIC.setAttribute("spellcheck","false"),this.ǃGRr=()=>this.ǃGRK(),this.ǃcIC.addEventListener("blur",this.ǃGRr),this.ǃGRV=()=>this.ǃGRn(),this.ǃcIC.addEventListener("input",this.ǃGRV),this.ǃGGd=he=>this.ǃGRM(he),this.ǃcIC.addEventListener("keydown",this.ǃGGd,!0),this.ǃ$C.ǃGL().addEventListener("scroll",this.ǃGRA,{ǃtq:!0}),this.ǃcIC.value=de,this.ǃcIC.focus(),this.ǃcIC.setSelectionRange(re,Ge),this.ǃGR$.textContent=".",new Promise((he,ve)=>{this.ǃGRL=he,this.ǃGR_=ve})}}ǃGRM(de){de.which===ǃG.ǃEj.ǃBz?(de.preventDefault(),de.stopPropagation(),this.ǃGRK()):de.which===ǃG.ǃEj.ǃuI&&(de.preventDefault(),de.stopPropagation(),this.ǃGRy())}ǃGRn(){this.ǃGR$.textContent=this.ǃcIC.value;let de=this.ǃGR$.getBoundingClientRect();this.ǃcIC.style.width=`${Math.max(de.right-de.left,30)}px`,this.ǃGR$.textContent="."}ǃGRE(){this.ǃcIC.style.left=`${this.ǃGR$.offsetLeft}px`,this.ǃcIC.style.top=`${this.ǃGR$.offsetTop-this.ǃ$C.ǃGL().scrollTop}px`;let de=this.ǃ$C.ǃGL().getBoundingClientRect(),re=this.ǃcIC.getBoundingClientRect();(re.bottom>de.bottom+1||re.topde.right+1)&&this.ǃGRy()}ǃGRC(){this.ǃcIC&&(this.ǃGR$.textContent=this.ǃhM,this.ǃ$C.ǃGL().removeEventListener("scroll",this.ǃGRA,{ǃtq:!0}),this.ǃcIC.removeEventListener("keydown",this.ǃGGd,!0),this.ǃGGd=null,this.ǃcIC.removeEventListener("input",this.ǃGRV),this.ǃGRV=null,this.ǃcIC.removeEventListener("blur",this.ǃGRr),this.ǃGRr=null,ǃG.ǃGD.ǃjE(this.ǃcIC),this.ǃcIC=null)}ǃGRy(){this.ǃcIC&&(this.ǃGRC(),this.ǃGRL&&this.ǃGRL(null),this.ǃGRL=null,this.ǃGR_=null)}ǃGRK(){if(this.ǃcIC){let de=this.ǃcIC.value;this.ǃGRC(),this.ǃGRL&&this.ǃGRL(de),this.ǃGRL=null,this.ǃGR_=null,this.ǃrU()}}ǃrh(){if(this.ǃzx())throw new Error("cannot add checkbox to root item");this.ǃGRT||(this.ǃGRT=this.ǃmV().createElement("input"),this.ǃGRT.className="tree-checkbox",this.ǃGRT.type="checkbox",this.ǃGRk=()=>this.ǃGRh(),this.ǃGRT.addEventListener("change",this.ǃGRk),this.ǃGRb.insertBefore(this.ǃGRT,this.ǃGRb.firstChild))}ǃGRh(){this.ǃGRf(),this.ǃ$C.ǃGig(this,"itemcheckchange")}ǃrY(de){if(!this.ǃGRT)throw new Error(_257);this.ǃGRT.checked=!!de}ǃrO(){if(!this.ǃGRT)throw new Error(_257);return!!this.ǃGRT.checked}ǃGil(de){ǃG.ǃTH(de),this.ǃGRt=de}ǃGRY(){return this.ǃGRt}static ǃGiF(de,re){return de.ǃGRY()-re.ǃGRY()}ǃw_(){return{name:this.ǃLx(),expanded:this.ǃLJ(),children:[...this.children()].map(de=>de.ǃw_())}}ǃwd(de){if(de){this.ǃcmI=!0,this.ǃ_C(de.expanded);let re=[...this.children()];if(re.length){const Ge=Math.min(de.children.length,re.length);for(let oe=0;oethis.ǃGDZ&&(this.ǃGDZ=app.ǃXz()),this.ǃGRw=re.itemType,this.ǃGRo=re.ǃGRz,this.ǃGDs=!!re.ǃAy,this.ǃGRH=[],this.ǃGib=new Set,this.ǃGRI=[],de&&"ui-iconview"===de.tagName.toLowerCase()?(this.ǃcHe=de.parentElement,this.ǃUk=de):(this.ǃcHe=de,this.ǃUk=ǃG.ǃGD.ǃXK("ui-iconview",this.ǃcHe)),this.ǃUk.setAttribute(this.ǃGRo,""),this.ǃyj=Ge=>this.ǃji(Ge),this.ǃUk.addEventListener(_260,this.ǃyj),this.ǃUk.setAttribute("tabindex",0),this.ǃGGT=()=>this.ǃGim(),this.ǃGGk=()=>this.ǃGiD(),this.ǃUk.addEventListener("focus",this.ǃGGT),this.ǃUk.addEventListener("blur",this.ǃGGk),this.ǃPL=Ge=>this.ǃP_(Ge),this.ǃGRx="",this.ǃGRJ=null,this.ǃckn=new ǃG.ǃGe(()=>this.ǃGRZ(),100),this.ǃckn.ǃGf(!0),this.ǃGRS=!1,this.ǃGRs=ǃG.ǃGD.ǃXK("div",null,null,"iconViewNoSearchResults"),this.ǃGRO=!1,this.ǃGRQ=ǃG.ǃGD.ǃXK("div",this.ǃUk,null,"iconViewNoItems"),this.ǃGRQ.textContent=re.ǃGRF||lang("ui.controls.icon-view.no-items-showing"),this.ǃGbc=!0,this.ǃcxZ=null}ǃz(){this.ǃmt(),this.ǃmV().removeEventListener("keydown",this.ǃPL),this.ǃPL=null,this.ǃGRJ=null,this.ǃckn.ǃz(),this.ǃckn=null,this.ǃUk.removeEventListener(_260,this.ǃyj),this.ǃyj=null,ǃG.ǃGD.ǃjE(this.ǃGRQ),this.ǃGRQ=null,ǃG.ǃGD.ǃjE(this.ǃGRs),this.ǃGRs=null,this.ǃUk.removeEventListener("focus",this.ǃGGT),this.ǃUk.removeEventListener("blur",this.ǃGGk),this.ǃGGT=null,this.ǃGGk=null,ǃG.ǃGD.ǃjE(this.ǃUk),this.ǃUk=null,this.ǃcHe=null,super.ǃz()}ǃcjY(de){ǃG.ǃc$i(de),this.ǃcHe!==de&&(this.ǃcHe&&this.ǃcHe.removeChild(this.ǃUk),this.ǃcHe=de,this.ǃcHe.appendChild(this.ǃUk))}ǃmV(){return this.ǃUk.ownerDocument}ǃGbG(de){if(ǃG.ǃg(de,ǃG.ǃGD.ǃGr.ǃGbm),de.ǃGbD()!==this)throw new Error("item from different icon view")}ǃmt(){for(let de of this.ǃGRI)de.ǃND();ǃG.ǃGs(this.ǃGRI);for(let de of this.ǃGRH)de.ǃND();ǃG.ǃGs(this.ǃGRH),this.ǃGib.clear(),this.ǃGbi()}ǃGbR(de){this.ǃGbG(de),de.ǃND(),this.ǃGRH.splice(this.ǃGRH.indexOf(de),1),this.ǃGbi()}ǃGif(){return this.ǃGDZ}ǃGbb(){return this.ǃGRo}ǃGiu(){return this.ǃGDs}ǃGbT(de){de=!!de;this.ǃGDs===de||(!de&&this.ǃ_W(),this.ǃGDs=de)}ǃGL(){return this.ǃUk}ǃ_T(){return this.ǃcHe}ǃB(){return this.ǃGRH}ǃGbk(){return this.ǃGRH.length}ǃGbX(de){return ǃG.ǃTH(de),de=Math.floor(de),0>de||de>=this.ǃGRH.length?null:this.ǃGRH[de]}ǃGb$(){return ǃG.ǃds(this.ǃB())}ǃGbr(de){this.ǃGbG(de);let re=this.ǃGbV(de)-1;return ǃG.ǃcaU(re,this.ǃGRH)?this.ǃGRH[re]:null}ǃGbA(de){this.ǃGbG(de);let re=this.ǃGbV(de)+1;return ǃG.ǃcaU(re,this.ǃGRH)?this.ǃGRH[re]:null}ǃGbL(){return this.ǃGRw===_258?ǃG.ǃGD.ǃGr.ǃGbm:this.ǃGRw===_259?ǃG.ǃGD.ǃGr.ǃGb_:void 0}ǃGbt(de){ǃG.ǃXw(de);for(let re of this.ǃGRH)if(de(re))return re;return null}ǃGbP(){this.ǃGRH.reverse();let de=this.ǃUk.firstChild;for(let re=this.ǃUk.children.length-1,Ge;0de||de>=this.ǃGRH.length)throw new Error(_261);if(0>re||re>=this.ǃGRH.length)throw new Error(_261);if(de!==re){let Ge=this.ǃGRH[de],oe=Ge.ǃGL();this.ǃUk.removeChild(oe);let le=this.ǃGRH[re],ue=le.ǃGL();deoe)){if(re===ǃG.ǃEj.ǃWg)--oe;else if(re===ǃG.ǃEj.ǃWK)++oe;else{Ge.ǃcwv();const le=Ge.ǃMl(),ue=re===ǃG.ǃEj.ǃWM?1:-1;oe+=ue;for(let pe=this.ǃGRH.length;0<=oe&&oele.right)&&(1==ue&&he.top>le.bottom||-1==ue&&he.bottomoe||oe>=this.ǃGRH.length||(this.ǃGRH[oe].ǃrU(),this.ǃGRH[oe].ǃFK(),de.preventDefault())}}}}ǃji(de){de.target!==this.ǃUk||ǃG.ǃEt.ǃyI(event)||de.shiftKey||this.ǃ_W()}ǃGig(de,re){this.ǃGbG(de),ǃG.ǃbv(re);let Ge=new ǃG.Event(re,!0);return Ge.item=de,this.dispatchEvent(Ge)}ǃ$s(de,re){this.ǃGbG(de);let Ge=new ǃG.Event("itemcontextmenu",!0);return Ge.item=de,Ge.clientX=re.clientX,Ge.clientY=re.clientY,this.dispatchEvent(Ge)}ǃGbV(de){return this.ǃGbG(de),this.ǃGRH.indexOf(de)}ǃGbE(de){return this.ǃGbG(de),Array.prototype.indexOf.call(this.ǃUk.children,de.ǃGL())}ǃGbe(de,re,Ge){this.ǃGbG(de),ǃG.ǃTH(re),ǃG.ǃbv(Ge);let oe=this.ǃGRH;if(0>re||re>=oe.length)throw new Error("new index is out of bounds");if(!te.includes(Ge))throw new Error(`invalid position, '${Ge}' was used. Only ${te.toString()} are valid positions.`);let le=this.ǃGRH[re];this.ǃGL().removeChild(de.ǃGL()),"left"===Ge&&this.ǃGL().insertBefore(de.ǃGL(),le.ǃGL()),"right"===Ge&&le.ǃGL().parentNode.insertBefore(de.ǃGL(),le.ǃGL().nextSibling);let ue=this.ǃGbV(de),pe=0;return re>ue?("left"===Ge&&(pe=0oe?this.ǃGRH.unshift(ue):this.ǃGRH.splice(oe,0,ue):this.ǃGRH.push(ue),this.ǃGbi(),ue}ǃcAU(de){if(ǃG.ǃbv(de),this.ǃGRw===_259)throw new Error("not yet implemented: groups for sortable icon views");let re=ǃG.ǃX(ǃG.ǃGD.ǃGr.ǃGbB,this,de);return this.ǃGRI.push(re),this.ǃGbi(),re}ǃGbW(de,re){ǃG.ǃbv(de),ǃG.ǃcDt(re),this.ǃGRS=!1,re&&(this.ǃGRS=!!re.ǃGbu),this.ǃGRx=de,this.ǃGRJ=null,this.ǃckn.ǃGI()}ǃGbU(de,re,Ge){ǃG.ǃXw(de),ǃG.ǃoG(re),ǃG.ǃcDt(Ge),this.ǃGRS=!1,Ge&&(this.ǃGRS=!!Ge.ǃGbu),this.ǃGRx=re||"",this.ǃGRJ=de,this.ǃckn.ǃGI()}ǃGRZ(){let de=this.ǃGRx.toLowerCase(),re=!1,Ge=this.ǃGRJ,oe=!0;for(let le of this.ǃB())if(Ge){let ue=Ge(le);le.ǃct_(!ue),ue&&(oe&&(this.ǃGRS&&le.ǃrU(),oe=!1),re=!0)}else if(de){let ue=le.ǃGbv(de);le.ǃct_(!ue),ue&&(oe&&(this.ǃGRS&&le.ǃrU(),oe=!1),re=!0)}else le.ǃct_(!1),re=!0;this.ǃGbq(!re),this.ǃGRJ=null}ǃGbi(){let de=!this.ǃGRH.length&&!this.ǃGRI.length;this.ǃGbc===de||(this.ǃGbc=de,this.ǃGbc?this.ǃUk.appendChild(this.ǃGRQ):ǃG.ǃGD.ǃjE(this.ǃGRQ))}ǃGbq(de){return this.ǃGbc?void 0:this.ǃGRO===de?void(this.ǃGRO&&(this.ǃGRJ&&!this.ǃGRx?this.ǃGRs.textContent=lang(_262):this.ǃGRs.textContent=ǃmo(_263,this.ǃGRx))):void(this.ǃGRO=de,this.ǃGRO?(this.ǃUk.appendChild(this.ǃGRs),this.ǃGRs.textContent=this.ǃGRJ&&!this.ǃGRx?lang(_262):ǃmo(_263,this.ǃGRx)):ǃG.ǃGD.ǃjE(this.ǃGRs))}}}{const _264="UIPointerUp",_265="UIPointerDown",_266="UIPointerMove",_267="ui-iconviewitem";ǃG.ǃGD.ǃGr.ǃGbm=class extends ǃG.ǃDa{constructor(te,ne,ie,me,ae,de){ǃG.ǃg(te,ǃG.ǃGD.ǃGr.ǃGRl),ǃG.ǃmL(ne,ǃG.ǃGD.ǃXY),ǃG.ǃbv(ie),ǃG.ǃNv(ae),ǃG.ǃmL(de,ǃG.ǃGD.ǃGr.ǃGbB),super(),this.ǃGba=te,this.ǃcQB=ne||null,this.ǃhM=ie,this.ǃcZv=me,this.ǃcti=!1,this.ǃGbg=de,this.ǃGbN=!1,this.ǃcrP=-1,this.ǃWA=0,this.ǃWL=0,this.ǃcxZ=null,this.ǃUk=null,this.ǃUk=ǃG.ǃ_Y(ae)?ǃG.ǃGD.ǃXK(_267,this.ǃGba.ǃGL(),null,null,null,ae):ǃG.ǃGD.ǃXK(_267,this.ǃGbg?this.ǃGbg.ǃGbK():this.ǃGba.ǃGL()),this.ǃo_=ǃG.ǃGD.ǃXK("div",this.ǃUk,null,"iconViewItemWrap"),this.ǃXh=ǃG.ǃX(ǃG.ǃGD.ǃmF,this.ǃcQB||this.ǃGba.ǃGif(),this.ǃo_),this.ǃGR$=ǃG.ǃGD.ǃXK("span",this.ǃo_,null,"iconViewItemText"),this.ǃGR$.textContent=this.ǃhM,this.ǃctR=()=>this.ǃGba.ǃGig(this,"itemdoubletap"),this.ǃUk.addEventListener("UIDoubleTap",this.ǃctR),this.ǃBb=re=>this.ǃ$l(re),this.ǃUk.addEventListener("contextmenu",this.ǃBb),this.ǃyj=re=>this.ǃji(re),this.ǃUk.addEventListener(_265,this.ǃyj),this.ǃP$=re=>this.ǃPr(re),this.ǃPV=re=>this.ǃPA(re)}ǃND(){this.ǃcVx(!1),this.ǃUk.removeEventListener(_265,this.ǃyj),this.ǃyj=null,this.ǃmV().removeEventListener(_266,this.ǃP$),this.ǃP$=null,this.ǃmV().removeEventListener(_264,this.ǃPV),this.ǃPV=null,this.ǃUk.removeEventListener("UIDoubleTap",this.ǃctR),this.ǃctR=null,this.ǃUk.removeEventListener("contextmenu",this.ǃBb),this.ǃBb=null,ǃG.ǃGD.ǃjE(this.ǃGR$),this.ǃGR$=null,this.ǃXh.ǃz(),this.ǃXh=null,ǃG.ǃGD.ǃjE(this.ǃo_),this.ǃo_=null,ǃG.ǃGD.ǃjE(this.ǃUk),this.ǃUk=null,this.ǃGba=null,this.ǃcQB=null,this.ǃcZv=null,ǃG.ǃz(this)}ǃmV(){return this.ǃUk.ownerDocument}ǃDF(){return this.ǃmV().defaultView}ǃ$R(te){ǃG.ǃg(te,ǃG.ǃGD.ǃXY),this.ǃXh.ǃ$R(te)}ǃlf(te){ǃG.ǃXw(te),this.ǃXh.ǃlf(te)}ǃlH(){this.ǃXh.ǃlH()}ǃji(te){let ne=te.detail;ne.ǃET!==ǃG.ǃye.ǃBX||(this.ǃcwv(),this.ǃUk.setAttribute("pointerheld",""),this.ǃmV().addEventListener(_266,this.ǃP$),this.ǃmV().addEventListener(_264,this.ǃPV),this.ǃcrP=ne.id,this.ǃWA=ne.clientX,this.ǃWL=ne.clientY)}ǃPr(te){let ne=te.detail;ne.id!==this.ǃcrP}ǃPA(te){let ne=te.detail;if(ne.id===this.ǃcrP){if(this.ǃUk.removeAttribute("pointerheld",""),this.ǃmV().removeEventListener(_266,this.ǃP$),this.ǃmV().removeEventListener(_264,this.ǃPV),this.ǃGba.ǃGig(this,"itemclick"),this.ǃGba.ǃGiu()){let ie=ǃG.ǃEt.ǃyI(),me=ǃG.ǃEt.ǃE_(ǃG.ǃEj.ǃBL);if(ie)return void this.ǃcVx(!this.ǃ_d())}this.ǃGbn(ne.clientX,ne.clientY)&&this.ǃrU()}}ǃrU(){this.ǃ_d()&&1===this.ǃGba.ǃzH()||(this.ǃGba.ǃ_W(),this.ǃcVx(!0))}ǃFF(){this.ǃcVx(!1)}ǃ_d(){return this.ǃcti}ǃcVx(te){te=!!te;this.ǃcti===te||(te?(this.ǃGba.ǃGig(this,"beforeitemselect"),this.ǃUk.setAttribute("selected",""),this.ǃGba.ǃGia(this)):(this.ǃUk.removeAttribute("selected"),this.ǃGba.ǃGiN(this)),this.ǃcti=te)}ǃGL(){return this.ǃUk}ǃGbD(){return this.ǃGba}ǃcsi(te){this.ǃcZv=te}ǃmc(){return this.ǃcZv}ǃMl(){return this.ǃcxZ}ǃcW(te){ǃG.ǃbv(te);this.ǃhM===te||(this.ǃhM=te,this.ǃGR$.textContent=this.ǃhM)}ǃLx(){return this.ǃhM}ǃct_(te){te=!!te;this.ǃGbN===te||(this.ǃGbN=te,this.ǃGbN?(this.ǃcVx(!1),this.ǃUk.setAttribute("hidden",""),this.ǃGbg&&this.ǃGbg.ǃGbM(this,!0)):(this.ǃUk.removeAttribute("hidden"),this.ǃGbg&&this.ǃGbg.ǃGbM(this,!1)))}ǃQA(){return this.ǃGbN}ǃFK(){ǃG.ǃGD.ǃFK(this.ǃUk,this.ǃGba.ǃGL())}ǃGbv(te){return this.ǃhM.toLowerCase().includes(te)}ǃcwv(){this.ǃcxZ=this.ǃUk.getBoundingClientRect()}ǃ$l(te){this.ǃrU(),this.ǃGba.ǃ$s(this,te)||(te.preventDefault(),te.stopPropagation())}ǃGbn(te,ne){if(ǃG.ǃTH(te),ǃG.ǃTH(ne),!this.ǃcxZ)return!1;let ie=this.ǃcxZ;return te>=ie.left&&ne>=ie.top&&te=ye.left&&De>=ye.top&&Ee=ye.left&&Ee<=ye.left+ye.width/2?"left":"right"}ǃGbz(){let Ee=this.ǃGL();Ee.removeAttribute(_269),Ee.removeAttribute(_268)}static ǃGbh(Ee,De){if(ǃG.ǃTH(Ee),ǃG.ǃTH(De),re){let ye=-ge+Ee-ve-pe.width/2,Te=-he+De-ve-pe.height/2,ke=ǃG.ǃcaY(re,"dialog");if(ke){let we=ǃG.ǃGD.ǃDZ.ǃcHl(ke);ye-=we.ǃpi(),Te-=we.ǃpR()}re.style.transform=`translateX(${ye}px) translateY(${Te}px)`}}static ǃGbH(Ee){ǃG.ǃc$i(Ee);let De=ǃG.ǃGD.ǃclo("border-width",{ǃcXT:Ee});if(!De.endsWith("px"))throw new Error("CSS style for menu border-width must be in units of 'px'");return parseFloat(De)||0}static ǃGbC(Ee,De){ǃG.ǃbv(Ee);let ye=new ǃG.Event(Ee);ye.item=De,De.ǃGbD().dispatchEvent(ye)}static ǃGbF(Ee,De,ye){ǃG.ǃTH(Ee),ǃG.ǃTH(De),ǃG.ǃg(ye,ǃG.ǃGD.ǃGr.ǃGbm);let Te=new ǃG.Event("itemsorted");Te.ǃGbI=Ee,Te.ǃGbx=De,Te.item=ye,ye.ǃGbD().dispatchEvent(Te)}}}"use strict",ǃG.ǃGD.ǃGr.ǃGbB=class extends ǃG.ǃDa{constructor(te,ne){ǃG.ǃg(te,ǃG.ǃGD.ǃGr.ǃGRl),ǃG.ǃbv(ne),super(),this.ǃGba=te,this.ǃclE=ne,this.ǃcjc=ǃG.ǃGD.ǃXK("div",this.ǃGba.ǃGL(),null,"iconview-group"),this.ǃcjD=ǃG.ǃGD.ǃXK("div",this.ǃcjc,null,"iconview-grouptitle"),this.ǃcdZ=ǃG.ǃGD.ǃXK("span",this.ǃcjD,null,"iconview-groupname"),this.ǃGbJ=ǃG.ǃGD.ǃXK("span",this.ǃcjD,null,"iconview-grouprule"),this.ǃGbZ=ǃG.ǃGD.ǃXK("div",this.ǃcjc,null,"iconview-groupcontent"),this.ǃGRH=[],this.ǃGbS=0,this.ǃGbN=!1,this.ǃcdZ.textContent=this.ǃclE}ǃGbK(){return this.ǃGbZ}ǃND(){ǃG.ǃGs(this.ǃGRH),ǃG.ǃGD.ǃjE(this.ǃGbZ),this.ǃGbZ=null,ǃG.ǃGD.ǃjE(this.ǃGbJ),this.ǃGbJ=null,ǃG.ǃGD.ǃjE(this.ǃcdZ),this.ǃcdZ=null,ǃG.ǃGD.ǃjE(this.ǃcjD),this.ǃcjD=null,ǃG.ǃGD.ǃjE(this.ǃcjc),this.ǃcjc=null,this.ǃGba=null,ǃG.ǃz(this)}ǃmb(te,ne,ie,me){let ae=this.ǃGba.ǃmb(te,ne,ie,me,this);return this.ǃGRH.push(ae),ae}ǃGbM(te,ne){ǃG.ǃg(te,ǃG.ǃGD.ǃGr.ǃGbm),ne=!!ne,ne?this.ǃGbS++:this.ǃGbS--,this.ǃct_(this.ǃGbS===this.ǃGRH.length)}ǃct_(te){te=!!te;this.ǃGbN===te||(this.ǃGbN=te,ǃG.ǃGD.ǃFh(this.ǃcjc,"hidden",this.ǃGbN))}ǃQA(){return this.ǃGbN}},"use strict";{const _271="horizontal",_272="ui-toolbar-container",_273="ui-toolbar-remaining-space",_274="ui-toolbar-container[level='0']";ǃG.ǃGD.ǃqc=class extends ǃG.Event.ǃpF{constructor(te){ǃG.ǃc$i(te),super(),this.ǃcHe=te,this.ǃGbs=[],this.ǃGbO=new Map,this.ǃGbQ=!1,this.ǃGTc=null,this.ǃcHe.style.display="flex"}ǃz(){for(let te=0;te{ǃG.ǃGD.ǃjE(te)}),Array.prototype.forEach.call(this.ǃcHe.getElementsByTagName(_272),te=>{ǃG.ǃGD.ǃjE(te)}),this.ǃcHe.style.display="",this.ǃcHe=null,this.ǃGbs=null,this.ǃGTc=null,this.ǃGbO=null,super.ǃz()}ǃqO(){return this.ǃGTc}ǃqb(){if(!this.ǃcHe)throw new Error("missing parent element");let te=this.ǃcHe.querySelector(_274);if(!te)throw new Error("missing root container element");return te}ǃqD(te,ne,ie){ǃG.ǃbv(te),ǃG.ǃTH(ne),ǃG.ǃkF(ie);let me=ǃG.ǃX(ǃG.ǃGD.ǃGr.ǃGTm,this,this.ǃcHe,te,ne,_271,"required");return this.ǃGbs.push(me),this.ǃGbQ=!0,this.ǃGTD(me,ie),me}ǃGTi(te,ne,ie){ǃG.ǃbv(te),ǃG.ǃTH(ne),ǃG.ǃkF(ie);let me=ǃG.ǃX(ǃG.ǃGD.ǃGr.ǃGTm,this,this.ǃcHe,te,ne,"vertical","required");return this.ǃGbs.push(me),this.ǃGbQ=!0,this.ǃGTD(me,ie),me}ǃGTR(te,ne,ie){ǃG.ǃbv(te),ǃG.ǃTH(ne),ǃG.ǃkF(ie);let me=ǃG.ǃX(ǃG.ǃGD.ǃGr.ǃGTm,this,this.ǃcHe,te,ne,_271,"optional");this.ǃGbO.set(te,me),this.ǃGTD(me,ie)}ǃGTb(te,ne){ǃG.ǃbv(te),ne=!!ne;let ie=this.ǃGbO.get(te);if(assert(ie,"optional toolbar is not present in this toolbar layout"),ne){if(-1!==this.ǃGbs.indexOf(ie))return;this.ǃGbs.push(ie)}else{if(-1===this.ǃGbs.indexOf(ie))return;this.ǃGbs.splice(this.ǃGbs.indexOf(ie),1)}ie.ǃGZ(ne),this.ǃGbQ=!0}ǃGTT(te){te=!!te;for(let ne of this.ǃGbO.keys())this.ǃGTb(ne,te)}ǃGTk(){for(let te=0,ne;tethis.ǃGm$(ae),this.ǃUk=ǃG.ǃGD.ǃXK("ui-toolbar-color-picker",this.ǃGTs.ǃGL()),this.ǃGki=ǃG.ǃGD.ǃXK("input",this.ǃUk,null,null,{type:"color"}),this.ǃGki.addEventListener("change",this.ǃGkD),this.ǃcYm=ǃG.ǃGD.ǃXK("span",this.ǃUk),this.ǃcYm.innerHTML=this.ǃGki.value}ǃz(){this.ǃGki.removeEventListener("change",this.ǃGkD),ǃG.ǃGD.ǃjE(this.ǃGki),ǃG.ǃGD.ǃjE(this.ǃcYm),ǃG.ǃGD.ǃjE(this.ǃUk),this.ǃGkD=null,this.ǃGTs=null,this.ǃUk=null,this.ǃGki=null,this.ǃcYm=null}ǃ$X(ne){ǃG.ǃcXB(ne),this.ǃGkm(ne,ee),ne.hasOwnProperty("color")&&ǃG.ǃcXf(ne.color)&&(this.ǃGki.value=ne.color)}ǃt$(){}ǃGTV(){this.ǃGkR()}ǃGTS(){}ǃGm$(){this.ǃcYm.innerHTML=this.ǃGki.value,this.ǃGkR()}ǃGkR(){let ne=new ǃG.Event("colorchange");ne.ǃGkb=this.ǃGTs.ǃcbJ(),ne.ǃGkT=this.ǃcCQ.toLowerCase(),ne.color=this.ǃGki.value,this.ǃGTs.ǃGTY().dispatchEvent(ne),this.ǃGkG(this.ǃGki.value)}}}{const _278="sliderinput",ee=["min","max","step","value","label"];ǃG.ǃGD.ǃGr.ǃGTm.ǃGTl=class extends ǃG.ǃGD.ǃGr.ǃGTm.Element{constructor(ne,ie,me,ae,de,re,Ge,oe,le){ǃG.ǃTH(me),ǃG.ǃTH(ae),ǃG.ǃTH(de),ǃG.ǃNv(re),ǃG.ǃoG(Ge),super(ne,ie,oe),this.ǃGkk=me,this.ǃGkX=ae,this.ǃGk$=de?de:1,this.ǃGkr=re?re:0,this.ǃGkV=this.ǃGkr,this.ǃUk=ǃG.ǃGD.ǃXK("ui-toolbar-slider",this.ǃGTs.ǃGL()),this.ǃGki=ǃG.ǃGD.ǃXK("input",this.ǃUk,null,null,{type:"range",min:me.toString(),max:ae.toString(),step:this.ǃGk$.toString(),value:this.ǃGkr.toString()}),this.ǃGkA=ǃG.ǃGD.ǃXK("input",this.ǃUk,null,null,{type:"number",min:me.toString(),max:ae.toString(),value:this.ǃGki.value.toString()}),this.ǃcYm=ǃG.ǃGD.ǃXK("span"),le?(this.ǃcYm.setAttribute("side","right"),this.ǃUk.appendChild(this.ǃcYm)):(this.ǃcYm.setAttribute("side","left"),this.ǃUk.insertBefore(this.ǃcYm,this.ǃGki)),this.ǃcYm.textContent=Ge?Ge:ie.charAt(0).toUpperCase()+ie.slice(1),this.ǃGn=null,this.ǃGkL=null,this.ǃGk_(),this.ǃGkt()}ǃz(){ǃG.ǃGD.ǃjE(this.ǃGki),ǃG.ǃGD.ǃjE(this.ǃcYm),ǃG.ǃGD.ǃjE(this.ǃGkA),ǃG.ǃGD.ǃjE(this.ǃUk),this.ǃGn&&(this.ǃGn.ǃGS(),this.ǃGn=null),this.ǃGkL&&(this.ǃGkL.ǃGS(),this.ǃGkL=null),this.ǃGTs=null,this.ǃUk=null,this.ǃGki=null,this.ǃcYm=null,this.ǃGkA=null}ǃ$X(ne){if(ǃG.ǃcXB(ne),this.ǃGkm(ne,ee),ne.hasOwnProperty("min")&&ǃG.ǃ_Y(ne.min)&&(this.ǃGkk=ne.min,this.ǃGki.min=this.ǃGkk.toString(),this.ǃGkA.min=this.ǃGkk.toString()),ne.hasOwnProperty("max")&&ǃG.ǃ_Y(ne.max)&&(this.ǃGkX=ne.max,this.ǃGki.max=this.ǃGkX.toString(),this.ǃGkA.max=this.ǃGkk.toString()),ne.hasOwnProperty("step")&&ǃG.ǃ_Y(ne.step)&&(this.ǃGki.step=ne.step.toString()),ne.hasOwnProperty("value")&&ǃG.ǃ_Y(ne.value)){let ie=ne.value.toString();this.ǃGki.value=ie,this.ǃGkA.value=ie}ne.hasOwnProperty("label")&&ǃG.ǃcXf(ne.label)&&(this.ǃGki.label=ne.label)}ǃt$(){}ǃGTV(){this.ǃGkP("sliderchange")}ǃGTS(){}ǃGk_(){this.ǃGn=ǃG.ǃX(ǃG.ǃGM,ǃG.ǃGh.ǃGC(this.ǃGki,"input change",ne=>this.ǃGkj(ne)),ǃG.ǃGh.ǃGC(this.ǃGkA,"keypress",ne=>this.ǃGkd(ne)),ǃG.ǃGh.ǃGC(this.ǃGkA,"change input",ne=>this.ǃGkE(ne)),ǃG.ǃGh.ǃGC(this.ǃGkA,"blur",()=>this.ǃGiD()))}ǃGkt(){this.ǃGkL=ǃG.ǃcFK(this.ǃGkA)}ǃGkj(ne){this.ǃGkA.value=this.ǃGki.value,this.ǃGkV=+this.ǃGki.value,"change"===ne.type&&this.ǃGkP("sliderchange"),"input"===ne.type&&this.ǃGkP(_278)}ǃGkd(ne){ne.key.match(/[0-9.e\-]/)||ne.preventDefault()}ǃGkE(){let ie=this.ǃGkA.value;if(ie.length&&(ie=+ie,!isNaN(ie))){let me=this.ǃGke(),ae=this.ǃGkp();if((ie>ae||iethis.ǃGkj(ie)),ǃG.ǃGh.ǃGC(this.ǃGkA,"keypress",ie=>this.ǃGkd(ie)),ǃG.ǃGh.ǃGC(this.ǃGkA,"change input",ie=>this.ǃGkE(ie)))}ǃGkU(ie){ǃG.ǃkF(ie),assert(ie.length,"no steps defined for the step slider"),ǃG.ǃGs(this.ǃGku);let me=0;for(var ae=0;ae=de.ǃGkN,"percentage slice of a step can not be larger than 100%"),assert(0de||me=me.ǃGkK&&ie<=me.ǃGkn)return me}ǃGkC(){let ie=this.ǃGkA.value;for(let me of this.ǃGku)if(ie>=me.ǃGkv&&ie<=me.ǃGkq)return me}ǃGkh(ie){for(let me=0,ae;methis.ǃGkI(he),this.ǃgJ=he=>this.ǃGkx(he),this.ǃGkJ=()=>{},this.ǃGkZ=he=>this.ǃGkS(he),this.ǃGks=he=>this.ǃGkO(he)),"check"===le&&(this.ǃgI=he=>this.ǃGkQ(he),this.ǃgJ=he=>this.ǃGXc(he),this.ǃGkJ=he=>this.ǃGXG(he),this.ǃGkZ=he=>this.ǃGXm(he),this.ǃGks=he=>this.ǃGXD(he)),this.ǃGXi=he=>this.ǃ$l(he),this.ǃGXR=he=>this.ǃGXb(he),this.ǃUk.addEventListener(_289,this.ǃgI),this.ǃUk.addEventListener(_288,this.ǃgJ),this.ǃUk.addEventListener(_288,this.ǃGkJ),this.ǃUk.addEventListener("contextmenu",this.ǃGXi),this.ǃUk.addEventListener(_284,this.ǃGkZ),this.ǃUk.addEventListener(_285,this.ǃGks)}ǃz(){this.ǃUk.removeEventListener(_289,this.ǃgI),this.ǃUk.removeEventListener(_288,this.ǃgJ),this.ǃUk.removeEventListener(_288,this.ǃGkJ),this.ǃUk.removeEventListener(_284,this.ǃGkZ),this.ǃUk.removeEventListener(_285,this.ǃGks),ǃG.ǃGD.ǃjE(this.ǃUk),this.ǃXh.ǃz(),this.ǃGTs=null,this.ǃXh=null,this.ǃUk=null,this.ǃgI=null,this.ǃgJ=null,this.ǃGkZ=null,this.ǃGks=null,clearTimeout(this.ǃGkl),this.ǃGkl=-1,clearTimeout(this.ǃGkw),this.ǃGkw=-1}ǃ$X(de){ǃG.ǃcXB(de),this.ǃGkm(de,ee)}ǃt$(){this.ǃUk.removeAttribute(_287),this.ǃUk.removeAttribute(_286),this.ǃGkz&&!this.ǃGko&&(this.ǃGkz=!1,this.ǃUk.addEventListener(_288,this.ǃgJ),this.ǃUk.addEventListener(_284,this.ǃGkZ),this.ǃUk.addEventListener(_285,this.ǃGks)),clearTimeout(this.ǃGkl),this.ǃGkl=-1,clearTimeout(this.ǃGkw),this.ǃGkw=-1}ǃGTV(){}ǃGTS(de=!0){if(de=!!de,!this.ǃGkz){if("click"===this.ǃchB){if(this.ǃGkH)return;this.ǃUk.setAttribute(_287,""),this.ǃGkw=setTimeout(()=>{this.ǃUk.removeAttribute(_287,""),de&&this.ǃGXT(),this.ǃGkH=!1},100),this.ǃGkH=!0}"check"===this.ǃchB&&this.ǃGXk(de),this.ǃUk.removeEventListener(_288,this.ǃgJ),this.ǃUk.removeEventListener(_284,this.ǃGkZ),this.ǃUk.removeEventListener(_285,this.ǃGks)}}ǃGkI(de){me=de.detail.ǃEV;!me&&de.detail.ǃET!==ǃG.ǃye.ǃBX||this.ǃGkH||(this.ǃGkF=!1,this.ǃUk.setAttribute(_287,""))}ǃGkx(de){(me||de.detail.ǃET===ǃG.ǃye.ǃBX)&&this.ǃUk.hasAttribute(_287)&&!this.ǃGkH&&(!this.ǃGkF&&this.ǃGXT(),this.ǃUk.removeAttribute(_287))}ǃGkS(){me||this.ǃGkH||(this.ǃUk.removeAttribute(_287),this.ǃUk.removeAttribute(_286))}ǃGkO(){me||this.ǃGkH||this.ǃUk.setAttribute(_286,"")}ǃGkQ(de){return me=de.detail.ǃEV,this.ǃGkF=!1,me||de.detail.ǃET===ǃG.ǃye.ǃBX?me?void(-1!==this.ǃGkl||(this.ǃGkl=setTimeout(this.ǃGXR,1e3))):void this.ǃGXk():void 0}ǃGXc(de){(me||de.detail.ǃET===ǃG.ǃye.ǃBX)&&this.ǃUk.removeAttribute(_287)}ǃGXG(){-1!==this.ǃGkl&&(clearTimeout(this.ǃGkl),this.ǃGkl=-1,this.ǃGXk())}ǃGXm(){this.ǃUk.removeAttribute(_287),this.ǃUk.removeAttribute(_286)}ǃGXD(){me||this.ǃUk.setAttribute(_286,"")}ǃ$l(de){de.preventDefault(),this.ǃGkF=!0,this.ǃGXX(de)}ǃGXk(de=!0){this.ǃGkF||(this.ǃGko=!0,this.ǃGkz=!this.ǃGkz,de&&this.ǃGX$(),this.ǃGkz?(this.ǃUk.setAttribute(_287,""),this.ǃUk.removeAttribute(_286),this.ǃUk.removeEventListener(_288,this.ǃgJ),this.ǃUk.removeEventListener(_284,this.ǃGkZ),this.ǃUk.removeEventListener(_285,this.ǃGks)):(this.ǃUk.removeAttribute(_287),!me&&this.ǃUk.setAttribute(_286,""),this.ǃUk.addEventListener(_288,this.ǃgJ),this.ǃUk.addEventListener(_284,this.ǃGkZ),this.ǃUk.addEventListener(_285,this.ǃGks)),this.ǃGko=!1)}ǃGXb(){this.ǃGXk(),this.ǃGkl=-1}ǃGXT(){let de=new ǃG.Event("click");de.ǃGkb=this.ǃGTs.ǃcbJ(),de.ǃqy=this.ǃcCQ,this.ǃGTs.ǃGTY().dispatchEvent(de),this.ǃGkG()}ǃGX$(){let de=new ǃG.Event("check");de.ǃGkb=this.ǃGTs.ǃcbJ(),de.ǃqy=this.ǃcCQ,de.checked=this.ǃGkz,this.ǃGTs.ǃGTY().dispatchEvent(de),this.ǃGkG(this.ǃGkz)}ǃGXX(de){let re=new ǃG.Event("buttoncontextmenu");re.ǃGkb=this.ǃGTs.ǃcbJ(),re.ǃqy=this.ǃcCQ,re.clientX=de.clientX,re.clientY=de.clientY,this.ǃGTs.ǃGTY().dispatchEvent(re)}ǃGL(){return this.ǃUk}}}{const ee=["checked"];ǃG.ǃGD.ǃGr.ǃGTm.ǃGTH=class extends ǃG.ǃGD.ǃGr.ǃGTm.Element{constructor(ne,ie,me,ae){ǃG.ǃoG(me),super(ne,ie,ae),this.ǃUk=ǃG.ǃGD.ǃXK("ui-toolbar-checkbox",this.ǃGTs.ǃGL()),this.ǃGXr=ǃG.ǃGD.ǃXK("div",this.ǃUk,null,"checkboxWrapper"),this.ǃGki=ǃG.ǃGD.ǃXK("input",this.ǃGXr,null,null,{type:"checkbox"}),this.ǃGXV=()=>this.ǃGX$(this.ǃGki.checked),this.ǃGXA=()=>{this.ǃGTS(),this.ǃGXV()},this.ǃcYm=ǃG.ǃGD.ǃXK("span",this.ǃUk),this.ǃcYm.innerHTML=me?me:ie.charAt(0).toUpperCase()+ie.slice(1),this.ǃGki.addEventListener("change",this.ǃGXV),this.ǃcYm.addEventListener("UIPointerUp",this.ǃGXA),this.ǃUk.style.height=`${this.ǃGTs.ǃcQC()}px`}ǃz(){this.ǃGki.removeEventListener("change",this.ǃGXV),this.ǃcYm.removeEventListener("UIPointerUp",this.ǃGXA),ǃG.ǃGD.ǃjE(this.ǃGki),ǃG.ǃGD.ǃjE(this.ǃGXr),ǃG.ǃGD.ǃjE(this.ǃcYm),ǃG.ǃGD.ǃjE(this.ǃUk),this.ǃGXV=null,this.ǃGTs=null,this.ǃUk=null,this.ǃGXr=null,this.ǃGki=null,this.ǃcYm=null}ǃ$X(ne){ǃG.ǃcXB(ne),this.ǃGkm(ne,ee),ne.hasOwnProperty("checked")&&(this.ǃGki.checked=!!ne.checked)}ǃt$(){}ǃGTV(){this.ǃGX$()}ǃGTS(){this.ǃGki.checked=!this.ǃGki.checked}ǃGX$(){let ie=new ǃG.Event("checkboxchecked");ie.ǃGkb=this.ǃGTs.ǃcbJ(),ie.ǃGXL=this.ǃcCQ,ie.checked=this.ǃGki.checked,this.ǃGTs.ǃGTY().dispatchEvent(ie),this.ǃGkG(this.ǃGki.checked)}}}{const _291="input",_292="spinnerchange",ee=["min","max","step","value","label"];ǃG.ǃGD.ǃGr.ǃGTm.ǃGTI=class extends ǃG.ǃGD.ǃGr.ǃGTm.Element{constructor(ne,ie,me,ae,de,re,Ge,oe,le){ǃG.ǃNv(me),ǃG.ǃNv(ae),ǃG.ǃNv(de),ǃG.ǃNv(re),ǃG.ǃoG(Ge),super(ne,ie,oe),this.ǃGkk=me,this.ǃGkX=ae,this.ǃGk$=de?de:1,this.ǃGkr=re?re:0,this.ǃGX_=null,this.ǃGXt=!0,this.ǃUa=!1,this.ǃGXP="",this.ǃUk=ǃG.ǃGD.ǃXK("ui-toolbar-spinner",this.ǃGTs.ǃGL());let ue={};ue.type="number",ue.step=this.ǃGk$.toString(),ue.value=this.ǃGkr.toString(),ǃG.ǃ_Y(me)&&(ue.min=me.toString()),ǃG.ǃ_Y(ae)&&(ue.max=ae.toString()),this.ǃGXj=ue,this.ǃGki=ǃG.ǃGD.ǃXK(_291,this.ǃUk,null,null,this.ǃGXj),this.ǃGXd=null,this.ǃGXE=null,this.ǃGXe=Ge||ie.charAt(0).toUpperCase()+ie.slice(1),this.ǃcYm=document.createElement("span"),this.ǃcYm.textContent=this.ǃGXe,le?this.ǃUk.appendChild(this.ǃcYm):this.ǃUk.insertBefore(this.ǃcYm,this.ǃGki),this.ǃGXp=pe=>this.ǃGXf(pe),this.ǃGXy=pe=>this.ǃGXB(pe),this.ǃGXW=pe=>this.ǃGXu(pe),this.ǃGXU=pe=>this.ǃGXv(pe),this.ǃGn=ǃG.ǃX(ǃG.ǃGM,ǃG.ǃGh.ǃGC(this.ǃGki,"focus",pe=>this.ǃGim(pe)),ǃG.ǃGh.ǃGC(this.ǃGki,"UIPointerDown",pe=>this.ǃji(pe)),ǃG.ǃGh.ǃGC(this.ǃGki,"UIPointerUp",pe=>this.ǃPA(pe)),ǃG.ǃGh.ǃGC(this.ǃGki,"change",this.ǃGXp),ǃG.ǃGh.ǃGC(this.ǃGki,_291,this.ǃGXy),ǃG.ǃcFK(this.ǃGki))}ǃGXq(){return+this.ǃGki.value}ǃz(){this.ǃGXa(),ǃG.ǃGD.ǃjE(this.ǃGki),ǃG.ǃGD.ǃjE(this.ǃcYm),ǃG.ǃGD.ǃjE(this.ǃUk),this.ǃGn.ǃGS(),this.ǃGn=null,this.ǃGXE&&this.ǃGXE.ǃGS(),this.ǃGXE=null,this.ǃGTs=null,this.ǃUk=null,this.ǃGki=null,this.ǃcYm=null}ǃ$X(ne){if(ǃG.ǃcXB(ne),this.ǃGkm(ne,ee),ne.hasOwnProperty("min")&&ǃG.ǃ_Y(ne.min)){let ie=ne.min;this.ǃGkk=ie,this.ǃGXj.min=ie.toString(),this.ǃGki.min=ie.toString(),this.ǃGXd&&(this.ǃGXd.min=ie.toString())}if(ne.hasOwnProperty("max")&&ǃG.ǃ_Y(ne.max)){let ie=ne.max;this.ǃGkX=ie,this.ǃGXj.max=ie.toString(),this.ǃGki.max=ie.toString(),this.ǃGXd&&(this.ǃGXd.max=ie.toString())}if(ne.hasOwnProperty("step")&&ǃG.ǃ_Y(ne.step)){let ie=ne.step;this.ǃGk$=ie,this.ǃGXj.step=ie.toString(),this.ǃGki.step=ie.toString(),this.ǃGXd&&(this.ǃGXd.step=ie.toString())}if(ne.hasOwnProperty("value")&&ǃG.ǃ_Y(ne.value)){let ie=ne.value;this.ǃGkr=ie,this.ǃGXj.value=ie.toString(),this.ǃGki.value=ie.toString(),this.ǃGXd&&this.ǃGXg(ie.toString())}ne.hasOwnProperty("label")&&ǃG.ǃcXf(ne.label)&&(this.ǃGXe=ne.label,this.ǃcYm.textContent=this.ǃGXe)}ǃt$(){}ǃGTV(){this.ǃGXN(_292)}ǃGTS(){}ǃc$a(ne){ǃG.ǃbv(ne);this.ǃGXe===ne||(this.ǃGXe=ne,this.ǃcYm.textContent=ne)}ǃGXK(){return this.ǃGXe}ǃji(){this.ǃUa=!0}ǃPA(){this.ǃUa=!1,this.ǃGim()}ǃGim(){this.ǃUa||(this.ǃGXP=this.ǃGki.value,this.ǃGki.style.display="none",this.ǃGXj.value=this.ǃGki.value,this.ǃGXd=ǃG.ǃGD.ǃXK(_291,this.ǃUk,"spinnerEditInput",null,this.ǃGXj,1),this.ǃGXE=ǃG.ǃcFK(this.ǃGXd),this.ǃGXd.addEventListener("change",this.ǃGXp),this.ǃGXd.addEventListener(_291,this.ǃGXy),this.ǃGXd.addEventListener("blur",this.ǃGXU),this.ǃGXd.addEventListener("focus",this.ǃGXW),this.ǃGXd.focus())}ǃGXf(){this.ǃGXd&&this.ǃti(this.ǃGXd.value),this.ǃGXt=!0,this.ǃGXN(_292)}ǃGXB(){this.ǃGXd&&this.ǃti(this.ǃGXd.value),this.ǃGXt&&(this.ǃGXt=!1,this.ǃGXn()),this.ǃGXN("spinnerinput")}ǃGXu(){this.ǃGXd.value=this.ǃGXP,this.ǃGXd.removeEventListener("focus",this.ǃGXW)}ǃGXv(){this.ǃGki.style.display="",this.ǃGki.value=this.ǃGXd.value,this.ǃti(this.ǃGXd.value),this.ǃGXa()}ǃGXa(){this.ǃGXd&&(this.ǃGXE.ǃGS(),this.ǃGXE=null,this.ǃGXd.removeEventListener("change",this.ǃGXp),this.ǃGXd.removeEventListener(_291,this.ǃGXy),this.ǃGXd.removeEventListener("focus",this.ǃGXW),this.ǃGXd.removeEventListener("blur",this.ǃGXU),ǃG.ǃGD.ǃjE(this.ǃGXd),this.ǃGXd=null)}ǃti(ne){this.ǃGki.value=""===ne?"0":this.ǃGkk&&+nethis.ǃGkX?this.ǃGkX.toString():ne}ǃGXg(ne){if(this.ǃGXd){let ie=this.ǃGXd.ownerDocument,me=ie.defaultView;ie.execCommand("selectAll",!1),ie.execCommand("delete",!1),ie.execCommand("insertText",!1,ne)}}ǃGXn(){let ne=new ǃG.Event("firstspinnerinput");ne.ǃGkb=this.ǃGTs.ǃcbJ(),ne.ǃGXM=this.ǃcCQ.toLowerCase(),ne.ǃGXC=this.ǃGXq(),this.ǃGTs.ǃGTY().dispatchEvent(ne)}ǃGXN(ne){ǃG.ǃbv(ne);let ie=this.ǃGXq();if(ie!==this.ǃGX_){let me=new ǃG.Event(ne);me.ǃGkb=this.ǃGTs.ǃcbJ(),me.ǃGXM=this.ǃcCQ.toLowerCase(),me.ǃGXC=this.ǃGXq(),this.ǃGX_=ie,this.ǃGTs.ǃGTY().dispatchEvent(me),this.ǃGkG(this.ǃGXq())}}}}{const ee=["value","label"];ǃG.ǃGD.ǃGr.ǃGTm.ǃGTx=class extends ǃG.ǃGD.ǃGr.ǃGTm.Element{constructor(ne,ie,me,ae,de,re){ǃG.ǃoG(ae),ǃG.ǃoG(me),super(ne,ie,de),this.ǃGXt=!0,this.ǃUk=ǃG.ǃGD.ǃXK("ui-toolbar-textbox",this.ǃGTs.ǃGL());({}).type="text",this.ǃGki=document.createElement("input"),this.ǃGki.type="text",this.ǃUk.appendChild(this.ǃGki),this.ǃcYm=document.createElement("span"),re?this.ǃUk.insertBefore(this.ǃcYm,this.ǃGki):this.ǃUk.appendChild(this.ǃcYm),this.ǃGn=ǃG.ǃGh.ǃGC(this.ǃGki,"input",oe=>this.ǃGXh(oe)),this.ǃcYm.innerHTML=ae?ae:ie.charAt(0).toUpperCase()+ie.slice(1)}ǃwU(){return this.ǃGki.value}ǃGXY(ne){ǃG.ǃbv(ne),this.ǃGki.value=ne}ǃz(){ǃG.ǃGD.ǃjE(this.ǃGki),ǃG.ǃGD.ǃjE(this.ǃcYm),ǃG.ǃGD.ǃjE(this.ǃUk),this.ǃGn.ǃGS(),this.ǃGn=null,this.ǃGTs=null,this.ǃUk=null,this.ǃGki=null,this.ǃcYm=null}ǃ$X(ne){ǃG.ǃcXB(ne),this.ǃGkm(ne,ee),ne.hasOwnProperty("value")&&ǃG.ǃcXf(ne.value)&&(this.ǃGki.value=ne.value.toString()),ne.hasOwnProperty("label")&&ǃG.ǃcXf(ne.label)&&(this.ǃGki.label=ne.label)}ǃt$(){}ǃGTV(){this.ǃGXh()}ǃGTS(){}ǃGXh(){let ne=new ǃG.Event("textinput");ne.ǃGkb=this.ǃGTs.ǃcbJ(),ne.ǃGXz=this.ǃcCQ.toLowerCase(),ne.ǃGXF=this.ǃwU(),this.ǃGTs.ǃGTY().dispatchEvent(ne),this.ǃGkG(this.ǃwU())}}}{const ee=["value","label"];ǃG.ǃGD.ǃGr.ǃGTm.ǃGTJ=class extends ǃG.ǃGD.ǃGr.ǃGTm.Element{constructor(ne,ie,me,ae,de,re){ǃG.ǃoG(ae),ǃG.ǃkF(me),super(ne,ie,de),this.ǃGXt=!0,this.ǃUk=ǃG.ǃGD.ǃXK("ui-toolbar-dropdown",this.ǃGTs.ǃGL());({}).type="text",this.ǃGki=document.createElement("select"),this.ǃUk.appendChild(this.ǃGki),this.ǃgl=new Map;for(let oe of me){let le=document.createElement("option");this.ǃGki.appendChild(le),this.ǃgl.set(oe.value,le),le.value=oe.value,le.textContent=oe.label,oe.selected&&le.setAttribute("selected",""),oe.disabled&&le.setAttribute("disabled","")}this.ǃcYm=document.createElement("span"),re?this.ǃUk.insertBefore(this.ǃcYm,this.ǃGki):this.ǃUk.appendChild(this.ǃcYm),this.ǃGn=ǃG.ǃGh.ǃGC(this.ǃGki,"change",oe=>this.ǃGXh(oe)),this.ǃcYm.innerHTML=ae?ae:ie.charAt(0).toUpperCase()+ie.slice(1)}ǃwU(){return this.ǃGki.value}ǃGXl(ne){ǃG.ǃTH(ne),this.ǃGki.selectedIndex=ne}ǃGXw(ne){ǃG.ǃbv(ne),this.ǃGki.value=ne}ǃz(){ǃG.ǃGD.ǃjE(this.ǃGki),ǃG.ǃGD.ǃjE(this.ǃcYm),ǃG.ǃGD.ǃjE(this.ǃUk),this.ǃGn.ǃGS(),this.ǃGn=null,this.ǃGTs=null,this.ǃUk=null,this.ǃGki=null,this.ǃcYm=null}ǃ$X(ne){ǃG.ǃcXB(ne),this.ǃGkm(ne,ee),ne.hasOwnProperty("value")&&ǃG.ǃcXf(ne.value)&&(this.ǃGki.value=ne.value.toString()),ne.hasOwnProperty("label")&&ǃG.ǃcXf(ne.label)&&(this.ǃGki.label=ne.label)}ǃt$(){}ǃGTV(){this.ǃGXh()}ǃGTS(){}ǃGXh(){let ne=new ǃG.Event("optionselected");ne.ǃGkb=this.ǃGTs.ǃcbJ(),ne.ǃGXo=this.ǃcCQ.toLowerCase(),ne.ǃGXH=this.ǃwU(),this.ǃGTs.ǃGTY().dispatchEvent(ne),this.ǃGkG(this.ǃwU())}}}{const _295="mouse-over",_296="mouse-down",_297="UIPointerDown",_298="--arrow-color",_299="mouse-down-light",_300="mouse-over-light",ee=[];let te=!1;ǃG.ǃGD.ǃGr.ǃGTm.ǃGTz=class extends ǃG.ǃGD.ǃGr.ǃGTm.Element{constructor(ie,me,ae,de,re,Ge,oe){ǃG.ǃg(ae,ǃG.ǃGD.ǃXY),ǃG.ǃoG(de),ǃG.ǃoG(re),ǃG.ǃcVD(oe),super(ie,me,Ge),this.ǃGXI=oe,this.ǃGkF=!1,this.ǃUk=ǃG.ǃGD.ǃXK("ui-toolbar-split-button",this.ǃGTs.ǃGL()),this.ǃUk.style.height=`${this.ǃGTs.ǃcQC()}px`,this.ǃUk.setAttribute("type","split"),this.ǃGXx=ǃG.ǃGD.ǃXK("div",this.ǃUk),this.ǃGXJ=ǃG.ǃGD.ǃXK("div",this.ǃUk),this.ǃGXx.setAttribute("primary",""),this.ǃGXJ.setAttribute("secondary",""),de&&this.ǃGXx.setAttribute("title",de),re&&this.ǃGXJ.setAttribute("title",re),this.ǃGXZ=ǃG.ǃX(ǃG.ǃGD.ǃmF,ae,this.ǃGXx),this.ǃGXS=ǃG.ǃGD.ǃXK("div",this.ǃGXJ,null,"arrow"),this.ǃUk.style.setProperty("--arrow-size",`${app.ǃGP()/2}px`),this.ǃUk.style.setProperty(_298,app.ǃbl().iconColor),this.ǃGn=ǃG.ǃX(ǃG.ǃGM,ǃG.ǃGh.ǃGC(this.ǃGXx,_297,le=>this.ǃji(le)),ǃG.ǃGh.ǃGC(this.ǃGXx,"UIPointerUp",le=>this.ǃPA(le)),ǃG.ǃGh.ǃGC(this.ǃGXx,"contextmenu",le=>this.ǃ$l(le)),ǃG.ǃGh.ǃGC(this.ǃGXx,"mouseout",le=>this.ǃGXs(le)),ǃG.ǃGh.ǃGC(this.ǃGXx,"mouseover",le=>this.ǃGXO(le)),ǃG.ǃGh.ǃGC(this.ǃGXJ,_297,le=>this.ǃji(le)),ǃG.ǃGh.ǃGC(this.ǃGXJ,"UIPointerUp",le=>this.ǃPA(le)),ǃG.ǃGh.ǃGC(this.ǃGXJ,"contextmenu",le=>this.ǃ$l(le)),ǃG.ǃGh.ǃGC(this.ǃGXJ,"mouseout",le=>this.ǃGXs(le)),ǃG.ǃGh.ǃGC(this.ǃGXJ,"mouseover",le=>this.ǃGXO(le)),ǃG.ǃGh.ǃGC(app,"settingschange",le=>this.ǃGXQ(le)))}ǃz(){this.ǃGn.ǃGS(),this.ǃGn=null,this.ǃGXZ.ǃz(),this.ǃGXZ=null,ǃG.ǃGD.ǃjE(this.ǃGXS),this.ǃGXS=null,ǃG.ǃGD.ǃjE(this.ǃGXx),this.ǃGXx=null,ǃG.ǃGD.ǃjE(this.ǃGXJ),this.ǃGXJ=null,ǃG.ǃGD.ǃjE(this.ǃUk),this.ǃUk=null,this.ǃGTs=null}ǃ$X(ie){ǃG.ǃcXB(ie),this.ǃGkm(ie,ee)}ǃqX(ie){super.ǃqX(ie),ie||this.ǃt$()}ǃc$y(ie,me){ǃG.ǃoG(ie),ǃG.ǃoG(me),ie&&this.ǃGXx.setAttribute("title",ie),me&&this.ǃGXJ.setAttribute("title",me)}ǃt$(){this.ǃGXx.removeAttribute(_296),this.ǃGXx.removeAttribute(_299),this.ǃGXx.removeAttribute(_295),this.ǃGXJ.removeAttribute(_296),this.ǃGXJ.removeAttribute(_299),this.ǃGXJ.removeAttribute(_295)}ǃGTV(){}ǃGTS(){this.ǃGXx.setAttribute(_296,""),this.ǃGXx.removeAttribute(_299),this.ǃGXJ.removeAttribute(_296,""),this.ǃGXJ.removeAttribute(_299),this.ǃG$c()}ǃG$G(){this.ǃUk.setAttribute("type","single"),this.ǃUk.style.width=`${this.ǃGTs.ǃcQC()}px`,this.ǃUk.style.padding="",this.ǃGXJ.setAttribute("hide","")}ǃIo(){this.ǃUk.setAttribute("type","split"),this.ǃUk.style.width="",this.ǃUk.style.padding="",this.ǃGXJ.removeAttribute("hide")}ǃIw(){this.ǃUk.setAttribute("type","wide"),this.ǃUk.style.width="",this.ǃUk.style.padding=`0 ${app.ǃGP()/4+1}px`,this.ǃGXJ.setAttribute("hide","")}ǃji(ie){te=ie.detail.ǃEV;(te||ie.detail.ǃET===ǃG.ǃye.ǃBX)&&(this.ǃGkF=!1,this.ǃUk.setAttribute(_296,""),ie.target===this.ǃGXx&&(this.ǃGXx.setAttribute(_296,""),this.ǃGXJ.removeAttribute(_296)),ie.target===this.ǃGXJ&&(this.ǃGXx.removeAttribute(_296),this.ǃGXJ.setAttribute(_296,"")))}ǃPA(ie){(te||ie.detail.ǃET===ǃG.ǃye.ǃBX)&&this.ǃUk.hasAttribute(_296)&&(!this.ǃGkF&&(ie.target===this.ǃGXx&&this.ǃG$c(ie),ie.target===this.ǃGXJ&&this.ǃG$m(ie)),this.ǃUk.removeAttribute(_296),this.ǃGXx.removeAttribute(_296),this.ǃGXx.removeAttribute(_299),this.ǃGXJ.removeAttribute(_296),this.ǃGXJ.removeAttribute(_299))}ǃGXs(){te||(this.ǃUk.removeAttribute(_296),this.ǃGXx.removeAttribute(_296),this.ǃGXJ.removeAttribute(_296),this.ǃUk.removeAttribute(_295),this.ǃGXx.removeAttribute(_295),this.ǃGXJ.removeAttribute(_295))}ǃGXO(ie){te||(this.ǃUk.setAttribute(_295,""),ie.target===this.ǃGXx&&(this.ǃGXx.setAttribute(_295,""),this.ǃGXJ.setAttribute(_300,""),this.ǃGXx.removeAttribute(_300,""),this.ǃGXJ.removeAttribute(_295)),ie.target===this.ǃGXJ&&(this.ǃGXx.setAttribute(_300,""),this.ǃGXJ.setAttribute(_295,""),this.ǃGXx.removeAttribute(_295),this.ǃGXJ.removeAttribute(_300)))}ǃ$l(ie){ie.preventDefault(),this.ǃGkF=!0,this.ǃGXX(ie)}ǃGXQ(ie){this.ǃUk.style.setProperty(_298,ie.ǃG$D.iconColor)}ǃG$c(ie){let me=new ǃG.Event("primaryclick");me.ǃGkb=this.ǃGTs.ǃcbJ(),me.ǃqy=this.ǃcCQ,me.clientX=ie?ie.detail.clientX:0,me.clientY=ie?ie.detail.clientY:0,this.ǃGTs.ǃGTY().dispatchEvent(me),this.ǃGkG()}ǃG$m(ie){let me=new ǃG.Event("secondaryclick");me.ǃGkb=this.ǃGTs.ǃcbJ(),me.ǃqy=this.ǃcCQ,me.clientX=ie.detail.clientX,me.clientY=ie.detail.clientY,this.ǃGTs.ǃGTY().dispatchEvent(me),this.ǃGXI&&this.ǃGXI()}ǃGXX(ie){let me=new ǃG.Event("splitbuttoncontextmenu");me.ǃGkb=this.ǃGTs.ǃcbJ(),me.ǃqy=this.ǃcCQ,me.clientX=ie.detail.clientX,me.clientY=ie.detail.clientY,this.ǃGTs.ǃGTY().dispatchEvent(me)}}}{ǃG.ǃGD.ǃGr.ǃcRZ=class extends ǃG.Event.ǃpF{constructor(){super(),this.ǃUk=null,this.ǃG$i=[],this.ǃG$R=-1,this.ǃG$b=()=>this.ǃG$T()}ǃz(){ǃG.ǃGD.ǃjE(this.ǃUk),this.ǃUk=null;for(let me of this.ǃG$i)me.ǃz();ǃG.ǃGs(this.ǃG$i),-1=100)throw new Error("too much content added to status indicator");if(this.ǃG$i.includes(me))throw new Error("already added");this.ǃG$i.push(me),this.ǃG$X()}ǃG$$(me){let ae=this.ǃG$i.indexOf(me);if(0>ae)throw new Error("content not added to status indicator");this.ǃG$i.splice(ae,1),this.ǃG$X()}ǃG$X(){-1"),me+=this.ǃG$i[ae].ǃG$r();ǃG.ǃcmS(this.ǃUk,new ǃG.ǃca$(me))}else this.ǃGcd(!1)}ǃGcd(me){me=!!me;!!this.ǃUk===me||(me?(this.ǃUk=ǃG.ǃGD.ǃXK("ui-statusIndicator",document.body),this.ǃUk.setAttribute("role","status")):(ǃG.ǃGD.ǃjE(this.ǃUk),this.ǃUk=null))}}}"use strict",ǃG.ǃGD.ǃGr.ǃG$V=class{constructor(te,ne){ǃG.ǃg(te,ǃG.ǃGD.ǃGr.ǃcRZ),ǃG.ǃbv(ne),this.ǃcRS=te,this.ǃG$A=ne,this.ǃcOO=0}ǃz(){0=this.ǃcOO)throw new Error("removed too many times");this.ǃcOO--,0===this.ǃcOO?this.ǃcRS.ǃG$$(this):this.ǃcRS.ǃG$X()}ǃG$r(){return ǃG.ǃcKx(this.ǃG$A,this.ǃcOO)}},"use strict",ǃG.ǃGD.ǃGr.ǃcRO=class{constructor(te,ne){ǃG.ǃg(te,ǃG.ǃGD.ǃGr.ǃcRZ),ǃG.ǃbv(ne),this.ǃcRS=te,this.ǃG$A=ne,this.ǃG$L=0,this.ǃCt=!1}ǃz(){this.ǃCt&&(this.ǃcRS.ǃG$$(this),this.ǃCt=!1),this.ǃcRS=null}ǃcbA(te){ǃG.ǃTH(te),te=ǃG.ǃAR(te,0,1),this.ǃCt||(this.ǃcRS.ǃG$k(this),this.ǃCt=!0);this.ǃG$L===te||(this.ǃG$L=te,this.ǃcRS.ǃG$X())}ǃjZ(){this.ǃCt&&(this.ǃcRS.ǃG$$(this),this.ǃCt=!1,this.ǃG$L=0)}ǃG$r(){return ǃG.ǃcKx(this.ǃG$A,Math.round(1e3*this.ǃG$L)/10)}},"use strict",ǃG.ǃGD.ǃGr.ǃcbc=class{constructor(te,ne){ǃG.ǃg(te,ǃG.ǃGD.ǃGr.ǃcRZ),ǃG.ǃbv(ne),this.ǃcRS=te,this.ǃhM=ne,this.ǃCt=!1}ǃz(){this.ǃCt&&(this.ǃcRS.ǃG$$(this),this.ǃCt=!1),this.ǃcRS=null}ǃcW(te){ǃG.ǃbv(te),this.ǃCt||(this.ǃcRS.ǃG$k(this),this.ǃCt=!0);this.ǃhM===te||(this.ǃhM=te,this.ǃcRS.ǃG$X())}ǃG$r(){return this.ǃhM}},"use strict";{const _301="ui-balloontip",_302="UIPointerDown",_303="invalid alignment",ee=[{opacity:"1"},{opacity:"0"}],te=[{transform:"scale(0.85)",opacity:"0"},{transform:"scale(1)",opacity:"1"}],ne={duration:100,easing:"ease-out"},ie=ǃG.ǃc().getElementById("balloontip-svg"),me={ǃG$_:1e4,maxWidth:"300px",align:"center",clientX:null,clientY:null},ae=5,de=new Set(["top-left","top","top-right","left","center","right","bottom-left","bottom","bottom-right"]);let re=null;ǃG.ǃGD.ǃGr.ǃev=class extends ǃG.ǃDa{constructor(oe,le,ue,pe,ge){ǃG.ǃLK(oe,HTMLElement,Range),ǃG.ǃcDf(ue),ǃG.ǃcDf(pe),ǃG.ǃcDt(ge),super(),"string"==typeof le&&(le=app.ǃ$y(le)),ǃG.ǃmL(le,ǃG.ǃGD.ǃXY),this.ǃG$t=oe,this.ǃG$P=ue,this.ǃG$j=pe,ge=Object.assign({},me,ge),ǃG.ǃbv(ge.maxWidth),ǃG.ǃTH(ge.ǃG$_),ǃG.ǃbv(ge.align),ǃG.ǃNv(ge.clientX),ǃG.ǃNv(ge.clientY);let he=ge.clientX,ve=ge.clientY,be=Number.isFinite(he)&&Number.isFinite(ve);if(!de.has(ge.align))throw new Error(_303);re&&re.ǃG$d(),re=this,this.ǃG$E=ge.maxWidth,this.ǃG$e=ge.ǃG$_,this.ǃG$p=ge.align,this.ǃUk=null,this.ǃG$f=-1,this.ǃyj=()=>this.ǃji(),this.ǃG$y=!1;let Ee=this.ǃG$t;Ee instanceof Range&&(Ee=this.ǃG$t.commonAncestorContainer);let De=ǃG.ǃcaY(Ee,"dialog"),ye=0,Te=0;if(De){let Pe=ǃG.ǃGD.ǃDZ.ǃcHl(De);Pe.ǃcHM()||(ye=Pe.ǃcIg(),Te=Pe.ǃcIN()),this.ǃUk=ǃG.ǃGD.ǃXK(_301,De)}else ye=0,Te=0,this.ǃUk=ǃG.ǃGD.ǃXK(_301,Ee.ownerDocument.body);this.ǃG$B=ǃG.ǃGD.ǃXK("ui-balloontip-icon",this.ǃUk),this.ǃG$W=ǃG.ǃGD.ǃXK("ui-balloontip-text",this.ǃUk),this.ǃcjO=ǃG.ǃX(ǃG.ǃGD.ǃmF,le||app.ǃXz()),this.ǃG$B.appendChild(this.ǃcjO.ǃGL()),this.ǃcjD=ǃG.ǃGD.ǃXK("ui-balloontip-title",this.ǃG$W),this.ǃ$M=ǃG.ǃGD.ǃXK("ui-balloontip-body",this.ǃG$W),ǃG.ǃcmS(this.ǃcjD,this.ǃG$P),ǃG.ǃcmS(this.ǃ$M,this.ǃG$j),this.ǃcjD.style.maxWidth=this.ǃG$E,this.ǃ$M.style.maxWidth=this.ǃG$E;let ke=this.ǃUk.ownerDocument.defaultView.getComputedStyle(this.ǃUk),we=this.ǃG$t.getBoundingClientRect(),Le=parseInt(ke.paddingLeft),Ce=parseInt(ke.paddingTop),xe=0,Re=0;switch(this.ǃG$p){case"top-left":xe=0,Re=0;break;case"top":xe=we.width/2,Re=0;break;case"top-right":xe=we.width,Re=0;break;case"left":xe=0,Re=we.height/2;break;case"center":xe=we.width/2,Re=we.height/2;break;case"right":xe=we.width,Re=we.height/2;break;case"bottom-left":xe=0,Re=we.height;break;case"bottom":xe=we.width/2,Re=we.height;break;case"bottom-right":xe=we.width,Re=we.height;break;default:throw new Error(_303);}let Ue=we.left+xe,He=we.top+Re;be&&(Ue=he-ye,He=ve-Te);let Xe=Ue-2*Le-ye,Ie=He+Ce-Te,Se=parseInt(ke.width),je=parseInt(ke.height),Ae=Se+4*Le,Ne=je+4*Ce;this.ǃG$u=ie.cloneNode(!0),this.ǃG$u.setAttributeNS(null,"width",Ae),this.ǃG$u.setAttributeNS(null,"height",Ne),this.ǃG$u.style.left=`${-Le}px`,this.ǃG$u.style.top=`${-Ce}px`,this.ǃG$U=this.ǃG$u.querySelector(".balloontipPath"),this.ǃUk.insertBefore(this.ǃG$u,this.ǃG$B);let _e=null;if(this.ǃG$v(Xe+2*Le,Se-Le,ye))this.ǃG$q(Ie+Ce,je,Te)?(this.ǃUk.style.top=`${Ie}px`,this.ǃUk.style.left=`${Xe}px`,this.ǃUk.style.transformOrigin=`${Ue-Xe-ye}px 0%`,_e=this.ǃG$a):(this.ǃUk.style.top=`${Ie-je-4*Ce}px`,this.ǃUk.style.left=`${Xe}px`,this.ǃUk.style.transformOrigin=`${Ue-Xe-ye}px 100%`,_e=this.ǃG$g);else if(this.ǃG$q(Ie+Ce,je,Te)){let Pe=Xe-Se+2*Le;this.ǃUk.style.top=`${Ie}px`,this.ǃUk.style.left=`${Pe}px`,this.ǃUk.style.transformOrigin=`${Ue-Pe-ye}px 0%`,_e=this.ǃG$N}else{let Pe=Xe-Se+2*Le;this.ǃUk.style.top=`${Ie-je-4*Ce}px`,this.ǃUk.style.left=`${Pe}px`,this.ǃUk.style.transformOrigin=`${Ue-Pe-ye}px 100%`,_e=this.ǃG$K}this.ǃG$U.setAttributeNS(null,"d",_e(Le,Ce,Ae-Le,Ne-Ce,Le,Ce)),this.ǃcsS(te,ne,"show")}ǃG$n(){let oe=this.ǃG$t;return oe instanceof Range&&(oe=this.ǃG$t.commonAncestorContainer),oe.ownerDocument}ǃG$M(){return this.ǃG$n().defaultView}ǃcsS(oe,le,ue){let pe;"show"===ue&&(pe=this.ǃG$C),"hide"===ue&&(pe=this.ǃG$h),app.ǃcPG()?(this.ǃcHD=this.ǃUk.animate(oe,le),this.ǃcHD.onfinish=()=>pe.call(this)):pe.call(this)}ǃG$C(){this.ǃG$f=setTimeout(()=>this.ǃG$d(),this.ǃG$e),this.ǃG$n().addEventListener(_302,this.ǃyj)}ǃG$h(){this.ǃND()}ǃji(){this.ǃG$d()}ǃG$d(){this.ǃG$y||(re===this&&(re=null),this.ǃG$y=!0,this.ǃcsS(ee,ne,"hide"))}ǃND(){re===this&&(re=null),-1!==this.ǃG$f&&(clearTimeout(this.ǃG$f),this.ǃG$f=-1),this.ǃG$n().removeEventListener(_302,this.ǃyj),this.ǃyj=null,this.ǃcjO&&this.ǃcjO.ǃz(),ǃG.ǃGD.ǃjE(this.ǃcjD),ǃG.ǃGD.ǃjE(this.ǃcjD),ǃG.ǃGD.ǃjE(this.ǃcjD),ǃG.ǃGD.ǃjE(this.ǃG$u),ǃG.ǃGD.ǃjE(this.ǃG$B),ǃG.ǃGD.ǃjE(this.ǃG$W),ǃG.ǃGD.ǃjE(this.ǃUk),this.ǃG$B=null,this.ǃG$W=null,this.ǃcjO=null,this.ǃG$u=null,this.ǃcjD=null,this.ǃ$M=null,this.ǃG$t=null,this.ǃUk=null,ǃG.ǃz(this)}ǃG$a(oe,le,ue,pe,ge,he){return`M ${oe+ae} ${le}
L ${oe+ge} ${le}
L ${oe+2*ge} ${le-he}
L ${oe+2*ge} ${le}
L ${ue-ae} ${le}
A ${ae} ${ae} 0 0 1 ${ue} ${le+ae}
L ${ue} ${pe-ae}
A ${ae} ${ae} 0 0 1 ${ue-ae} ${pe}
L ${oe+ae} ${pe}
A ${ae} ${ae} 0 0 1 ${oe} ${pe-ae}
L ${oe} ${le+ae}
A ${ae} ${ae} 0 0 1 ${oe+ae} ${le}
Z`}ǃG$N(oe,le,ue,pe,ge,he){return`M ${ue/2} ${le}
L ${oe+ue-4*ge} ${le}
L ${oe+ue-4*ge+ge} ${le-he}
L ${oe+ue-4*ge+ge} ${le}
L ${ue-ae} ${le}
A ${ae} ${ae} 0 0 1 ${ue} ${le+ae}
L ${ue} ${pe-ae}
A ${ae} ${ae} 0 0 1 ${ue-ae} ${pe}
L ${oe+ae} ${pe}
A ${ae} ${ae} 0 0 1 ${oe} ${pe-ae}
L ${oe} ${le+ae}
A ${ae} ${ae} 0 0 1 ${oe+ae} ${le}
Z`}ǃG$g(oe,le,ue,pe,ge,he){return`M ${oe+ae} ${le}
L ${ue-ae} ${le}
A ${ae} ${ae} 0 0 1 ${ue} ${le+ae}
L ${ue} ${pe-ae}
A ${ae} ${ae} 0 0 1 ${ue-ae} ${pe}
L ${oe+2*ge} ${pe}
L ${oe+2*ge} ${pe+he}
L ${oe+ge} ${pe}
L ${oe+ae} ${pe}
A ${ae} ${ae} 0 0 1 ${oe} ${pe-ae}
L ${oe} ${le+ae}
A ${ae} ${ae} 0 0 1 ${oe+ae} ${le}
Z`}ǃG$K(oe,le,ue,pe,ge,he){return`M ${oe+ae} ${le}
L ${ue-ae} ${le}
A ${ae} ${ae} 0 0 1 ${ue} ${le+ae}
L ${ue} ${pe-ae}
A ${ae} ${ae} 0 0 1 ${ue-ae} ${pe}
L ${oe+ue-4*ge+ge} ${pe}
L ${oe+ue-4*ge+ge} ${pe+he}
L ${oe+ue-4*ge} ${pe}
L ${oe+ae} ${pe}
A ${ae} ${ae} 0 0 1 ${oe} ${pe-ae}
L ${oe} ${le+ae}
A ${ae} ${ae} 0 0 1 ${oe+ae} ${le}
Z`}ǃG$v(oe,le,ue){return oe+le+uethis.ǃtv(ae),this.ǃG$I=()=>this.ǃG$x(),this.ǃG$J=0,this.ǃtF=-1,this.ǃcrE=ǃG.ǃGD.ǃXK("div",null,null,"table-insert-mark"),this.ǃG$Z=null,this.ǃcrp="",this.ǃG$S=!1,this.ǃtF=-1,this.ǃGi$=()=>this.ǃGir(),this.ǃGiV=0,this.ǃGiA=0,this.ǃGiL=0,this.ǃGi_=0,this.ǃG$s=!1,this.ǃG$O=null,this.ǃG$Q=null,this.ǃcZH=!0}ǃz(){this.ǃmt(),this.ǃVd(),this.ǃcrE=null,this.ǃGrc(),this.ǃGi$=null,this.ǃG$w&&(this.ǃG$w.ǃz(),this.ǃG$w=null),this.ǃG$Q&&(ǃG.ǃGD.ǃjE(this.ǃG$Q),this.ǃG$Q=null),this.ǃG$O&&(this.ǃG$O.ǃz(),this.ǃG$O=null),-1!==this.ǃtF&&(this.ǃDF().cancelAnimationFrame(this.ǃtF),this.ǃtF=-1),this.ǃtE&&(this.ǃtE.removeEventListener("scroll",this.ǃG$H,{ǃtq:!0}),this.ǃG$H=null,ǃG.ǃGD.ǃjE(this.ǃtE),this.ǃtE=null),ǃG.ǃGD.ǃjE(this.ǃG$l),this.ǃG$l=null,this.ǃG$I=null,this.ǃcHe=null,super.ǃz()}ǃmt(){this.ǃG$o.clear(),this.ǃVd();for(let ie of this.ǃcXa)ie.ǃz();this.ǃcXa.length=0}ǃGL(){return this.ǃG$l}ǃmV(){return this.ǃGL().ownerDocument}ǃDF(){return this.ǃmV().defaultView}ǃGiv(){return this.ǃGDO}ǃGrG(ie){this.ǃG$s=ie}ǃGrm(){return this.ǃG$s}ǃGrD(ie){this.ǃGri(ie),this.ǃG$o.add(ie)}ǃGrR(ie){this.ǃGri(ie),this.ǃG$o.delete(ie)}ǃzH(){return this.ǃG$o.size}ǃ_W(){for(let ie of this.ǃG$o)ie.ǃcVx(!1);assert(0===this.ǃG$o.size,"should have deleted all selected row")}ǃGrb(){return this.ǃG$o.values()}ǃGrT(){return ǃG.ǃds(this.ǃG$o)}ǃGrk(){return this.ǃG$w}ǃGrX(){return this.ǃtE}ǃGr$(ie){this.ǃtE.insertBefore(ie,this.ǃG$O.ǃGL())}ǃG_(){if(this.ǃcXa.length)throw new Error("table must be empty before setting the top row");return this.ǃG$w&&this.ǃG$w.ǃz(),this.ǃG$w=ǃG.ǃX(ǃG.ǃGD.ǃGr.ǃG$.ǃGrr,this),this.ǃtE=ǃG.ǃGD.ǃXK("div",this.ǃG$l,null,"table-scroll-container"),this.ǃtE.addEventListener("scroll",this.ǃG$H,{ǃtq:!0}),this.ǃG$w}ǃmJ(ie){this.ǃGd();let me=ǃG.ǃX(ǃG.ǃGD.ǃGr.ǃG$.ǃGQ,ie,this);return this.ǃcXa.push(me),me}ǃGd(){this.ǃG$O||(this.ǃG$O=ǃG.ǃX(ǃG.ǃGD.ǃGr.ǃG$.ǃGQ,null,this,!0))}ǃGrV(){if(this.ǃG$Q)return this.ǃG$Q;if(!this.ǃG$O)throw new Error("must create padding row before footer element");this.ǃG$Q=ǃG.ǃGD.ǃXK("div",null,null,"tableFooterElem");const ie=this.ǃG$O.ǃGL();return ie.insertBefore(this.ǃG$Q,ie.firstChild),this.ǃG$Q}ǃcHS(){return this.ǃG$Q}ǃGrA(ie){ǃG.ǃXw(ie);for(let me of this.ǃcXa)if(ie(me))return me}ǃXD(ie){ǃG.ǃg(ie,ǃG.ǃGD.ǃGr.ǃG$.ǃGQ);let me=this.ǃcXa.indexOf(ie);if(0>me)throw new Error("cannot find row");this.ǃcXa[me].ǃz(),this.ǃcXa.splice(me,1)}ǃGRy(){for(let ie of this.ǃcXa)ie.ǃGRy()}ǃtv(){let me=this.ǃtE.scrollLeft;this.ǃG$J===me||(this.ǃG$J=me,-1===this.ǃtF&&(this.ǃtF=this.ǃDF().requestAnimationFrame(this.ǃG$I)))}ǃG$x(){this.ǃG$w.ǃGL().style.marginLeft=`-${this.ǃG$J}px`,this.ǃtF=-1}ǃGri(ie){if(ǃG.ǃg(ie,ǃG.ǃGD.ǃGr.ǃG$.ǃGQ),ie.ǃGrL()!==this)throw new Error("row from different table")}*rows(){for(let ie of this.ǃcXa)yield ie}ǃVE(ie,me){ǃG.ǃTH(ie),ǃG.ǃTH(me);let ae=this.ǃG$l.getBoundingClientRect();if(ieae.right||me>ae.bottom)return null;for(let de of this.rows()){let re=de.ǃVE(ie,me);if(re)return{ǃGz:de,ǃVj:re.ǃVj}}return null}ǃVP(ie,me){if(this.ǃGri(ie),ǃG.ǃbv(me),"before"!==me&&"after"!==me)throw new Error("invalid insert mark type");if(ie!==this.ǃG$Z||me!==this.ǃcrp){this.ǃVd();let ae=ie.ǃGL(),de=ae.parentElement;de.insertBefore(this.ǃcrE,"before"===me?ae:ae.nextSibling),this.ǃG$Z=ie,this.ǃcrp=me}}ǃVd(){this.ǃcrp&&(ǃG.ǃGD.ǃjE(this.ǃcrE),this.ǃG$Z=null,this.ǃcrp="")}ǃGr_(){this.ǃG$S||(this.ǃG$S=!0,this.ǃGi_=0,this.ǃGiV=performance.now(),this.ǃtF=this.ǃDF().requestAnimationFrame(this.ǃGi$))}ǃGrt(ie,me){this.ǃG$S&&(this.ǃGiA=ie,this.ǃGiL=me)}ǃGir(){if(this.ǃtF=-1,!!this.ǃG$S){let ie=performance.now(),me=(ie-this.ǃGiV)/1e3;this.ǃGiV=ie;let ae=this.ǃG$l.getBoundingClientRect();if(this.ǃGiA>=ae.left&&this.ǃGiA<=ae.right)if(this.ǃGiLae.bottom){let de=this.ǃtE.scrollTop,re=de+te*me+this.ǃGi_;this.ǃGi_=re-Math.floor(re),re=Math.floor(re),this.ǃtE.scrollTop=re}this.ǃtF=requestAnimationFrame(this.ǃGi$)}}ǃkY(){return this.ǃtE.scrollTop}ǃkz(ie){ǃG.ǃTH(ie),this.ǃtE.scrollTop=ie}ǃGrc(){this.ǃG$S=!1,-1!==this.ǃtF&&(this.ǃDF().cancelAnimationFrame(this.ǃtF),this.ǃtF=-1)}ǃGrP(ie,me,ae,de,re){let Ge=new ǃG.Event(me),oe=null;if(!(ae&&(oe=ae.getAttribute("columnName"),!oe)))return Ge.ǃGz=ie,Ge.ǃGrj=oe,typeof de!==_304&&typeof re!==_304&&(Ge.clientX=de,Ge.clientY=re),Ge.ǃGrd=ae?ie.ǃGrE(Ge.ǃGrj):null,this.dispatchEvent(Ge)}ǃGre(ie,me,ae){let de=new ǃG.Event(ie);return de.table=this,typeof me!==_304&&typeof ae!==_304&&(de.clientX=me,de.clientY=ae),this.dispatchEvent(de)}ǃdW(){return this.ǃcZH}ǃGZ(ie){ie=!!ie;this.ǃcZH===ie||(this.ǃcZH=ie,this.ǃG$l.style.display=this.ǃcZH?"":"none")}}}{const _305="UIPointerUp",_306="UIPointerMove",_307="UIPointerDown";ǃG.ǃGD.ǃGr.ǃG$.ǃGQ=class extends ǃG.Event.ǃpF{constructor(ne,ie,me){ǃG.ǃg(ie,ǃG.ǃGD.ǃGr.ǃG$),me=!!me,super(),this.ǃGX=ie,this.ǃcZv=ne,this.ǃGrp=me,this.ǃcti=!1,this.ǃcZH=!0,this.ǃG$w=ie.ǃGrk(),this.ǃGrf=ǃG.ǃGD.ǃXK("ui-table-row"),this.ǃGrf.setAttribute("tabindex",-1),this.ǃGrp&&this.ǃGrf.setAttribute("filler",""),this.ǃGrp?this.ǃGX.ǃGrX().appendChild(this.ǃGrf):this.ǃGX.ǃGr$(this.ǃGrf),this.ǃGry=[],this.ǃGrB=new Set,this.ǃGrW=this.ǃG$w.ǃGru(),this.ǃGrU=[];for(let ae=0;aethis.ǃjR(ae),this.ǃctR=ae=>this.ǃjb(ae),this.ǃBb=ae=>this.ǃ$l(ae),this.ǃGGT=ae=>this.ǃGim(ae),this.ǃGGk=ae=>this.ǃGiD(ae),this.ǃcrP=-1,this.ǃWA=0,this.ǃWL=0,this.ǃGGr=!1,this.ǃyj=null,this.ǃP$=null,this.ǃPV=null,this.ǃGrf.addEventListener("UIDoubleTap",this.ǃctR),this.ǃGrp||(this.ǃGrf.addEventListener("focus",this.ǃGGT),this.ǃGrf.addEventListener("blur",this.ǃGGk),this.ǃGrf.addEventListener("UITap",this.ǃBR),this.ǃGX.ǃGiv()&&(this.ǃyj=ae=>this.ǃji(ae),this.ǃP$=ae=>this.ǃPr(ae),this.ǃPV=ae=>this.ǃPA(ae),this.ǃGrf.addEventListener(_307,this.ǃyj))),this.ǃGrf.addEventListener("contextmenu",this.ǃBb)}ǃz(){for(let ne of this.ǃGry)ne.ǃz();for(let ne of this.ǃGrU)ne.ǃz();ǃG.ǃGs(this.ǃGrU),ǃG.ǃGs(this.ǃGry),this.ǃGrB.clear(),this.ǃcVx(!1),ǃG.ǃGD.ǃjE(this.ǃGrf),this.ǃGrf.removeEventListener("focus",this.ǃGGT),this.ǃGGT=null,this.ǃGrf.removeEventListener("blur",this.ǃGGk),this.ǃGGk=null,this.ǃGrf.removeEventListener("UITap",this.ǃBR),this.ǃBR=null,this.ǃGrf.removeEventListener("UIDoubleTap",this.ǃctR),this.ǃctR=null,this.ǃGrf.removeEventListener(_307,this.ǃyj),this.ǃyj=null,this.ǃmV().removeEventListener(_306,this.ǃP$),this.ǃP$=null,this.ǃmV().removeEventListener(_305,this.ǃPV),this.ǃPV=null,this.ǃGrf.removeEventListener("contextmenu",this.ǃBb),this.ǃBb=null,this.ǃGrB=null,this.ǃGry=null,this.ǃGrf=null,this.ǃGrW=null,this.ǃGX=null,this.ǃcZv=null,this.ǃG$w=null,this.ǃGrU=null,super.ǃz()}ǃmc(){return this.ǃcZv}ǃGrL(){return this.ǃGX}ǃGL(){return this.ǃGrf}ǃmV(){return this.ǃGL().ownerDocument}ǃGra(){return Array.prototype.indexOf.call(this.ǃGrf.parentElement.children,this.ǃGrf)}ǃGrE(ne){ǃG.ǃbv(ne);for(let ie of this.ǃGry)if(ie.ǃGrg()===ne)return ie;return null}ǃGRy(){for(let ne of this.ǃGry)ne.ǃGrN()&&ne.ǃGRy()}ǃmx(ne,ie){ǃG.ǃbv(ne),ǃG.ǃg(ie,ǃG.ǃGD.ǃXY),this.ǃGrK(ne);let me=this.ǃGrf.querySelector(`[columnName="${ne}"]`);return this.ǃGry.push(ǃG.ǃX(ǃG.ǃGD.ǃGr.ǃG$.ǃGrn,me,ie)),this}ǃGrM(ne,ie){ǃG.ǃbv(ne),ǃG.ǃbv(ie),this.ǃGrK(ne);let me=this.ǃGrf.querySelector(`[columnName="${ne}"]`);return this.ǃGry.push(ǃG.ǃX(ǃG.ǃGD.ǃGr.ǃG$.ǃGrC,me,ie)),this}ǃGrh(ne,ie){ǃG.ǃbv(ne),ǃG.ǃTH(ie),this.ǃGrK(ne);let me=this.ǃGrf.querySelector(`[columnName="${ne}"]`);return this.ǃGry.push(ǃG.ǃX(ǃG.ǃGD.ǃGr.ǃG$.ǃGrY,me,ie)),this}ǃmH(ne,ie){ǃG.ǃbv(ne),ǃG.ǃcDf(ie),this.ǃGrK(ne);let me=this.ǃGrf.querySelector(`[columnName="${ne}"]`);return this.ǃGry.push(ǃG.ǃX(ǃG.ǃGD.ǃGr.ǃG$.ǃGrz,me,ie)),this}ǃmI(ne,ie){ǃG.ǃbv(ne),ǃG.ǃg(ie,ie.ownerDocument.defaultView.DocumentFragment),this.ǃGrK(ne);let me=this.ǃGrf.querySelector(`[columnName="${ne}"]`);return this.ǃGry.push(ǃG.ǃX(ǃG.ǃGD.ǃGr.ǃG$.ǃGrF,me,ie)),this}ǃGrK(ne){if(this.ǃGrB.has(ne))throw new Error(`field '${ne}' has already been set`);if(!this.ǃGrW.some(ie=>ie.ǃcbJ()===ne))throw new Error(`field '${ne}' does not exist`);this.ǃGrB.add(ne)}ǃjR(ne){this.ǃGX.ǃGrP(this,"rowtapped",ne.target,ne.clientX,ne.clientY)}ǃjb(ne){this.ǃGrp?this.ǃGX.ǃGre("tablespacedoubletap",ne.clientX,ne.clientY):this.ǃGX.ǃGrP(this,"rowdoubletapped",ne.target,ne.clientX,ne.clientY)}ǃ$l(ne){ne.preventDefault(),this.ǃGrp?this.ǃGX.ǃGre("tablecontextmenu",ne.clientX,ne.clientY):this.ǃGX.ǃGrP(this,"rowcontextmenu",ne.target,ne.clientX,ne.clientY)}ǃGZ(ne){ne=!!ne;this.ǃcZH===ne||(this.ǃcZH=ne,this.ǃGrf.style.display=this.ǃcZH?"":"none")}ǃrU(){this.ǃ_d()||(this.ǃGX.ǃ_W(),this.ǃcVx(!0))}ǃFF(){this.ǃcVx(!1)}ǃcVx(ne){ne=!!ne;this.ǃcti===ne||(ne?(this.ǃGrf.setAttribute("selected",""),this.ǃGX.ǃGrD(this)):(this.ǃGrf.removeAttribute("selected"),this.ǃGX.ǃGrR(this)),this.ǃcti=ne)}ǃ_d(){return this.ǃcti}ǃGim(){this.ǃrU()}ǃGiD(){this.ǃcVx(!1)}ǃVE(ne,ie){if(ǃG.ǃTH(ne),ǃG.ǃTH(ie),this.ǃGrp)return null;let me=this.ǃGrf.getBoundingClientRect();if(neme.right||ieme.bottom)return null;let ae=me.bottom-me.top,de=me.top+ae/2;return{ǃVj:ie>=de?"after":"before"}}ǃji(ne){let ie=ne.detail;ie.ǃET!==ǃG.ǃye.ǃBX||this.ǃGX.ǃGrm()||-1===this.ǃcrP&&(this.ǃmV().addEventListener(_306,this.ǃP$),this.ǃmV().addEventListener(_305,this.ǃPV),this.ǃcrP=ie.id,this.ǃWA=ie.clientX,this.ǃWL=ie.clientY,this.ǃGGr=!1)}ǃPr(ne){ne.preventDefault();let ie=ne.detail;if(ie.id===this.ǃcrP&&!this.ǃGX.ǃGrm()){if(this.ǃGX.ǃGiv()&&!this.ǃGGr&&ǃG.ǃWi(this.ǃWA,this.ǃWL,ie.clientX,ie.clientY)>=10)if(this.ǃGX.ǃGrP(this,"dragstart",ne.target))this.ǃGGr=!0,this.ǃGX.ǃGr_();else return this.ǃcrP=-1,this.ǃmV().removeEventListener(_306,this.ǃP$),void this.ǃmV().removeEventListener(_305,this.ǃPV);this.ǃGGr&&(this.ǃGX.ǃGrP(this,"dragmove",null,ie.clientX,ie.clientY),this.ǃGX.ǃGrt(ie.clientX,ie.clientY))}}ǃPA(ne){let ie=ne.detail;ie.id!==this.ǃcrP||(this.ǃmV().removeEventListener(_306,this.ǃP$),this.ǃmV().removeEventListener(_305,this.ǃPV),this.ǃGGr&&(this.ǃGGr=!1,this.ǃcrP=-1,this.ǃGX.ǃGrc(),this.ǃGX.ǃGrP(this,"drop",null,ie.clientX,ie.clientY)))}}}{const _308="UIPointerUp",_309="UIPointerDown",_310="UIPointerMove",_311="ui-table-column",_312="resizing-column",ee=2;ǃG.ǃGD.ǃGr.ǃG$.ǃGrq=class extends ǃG.Event.ǃpF{constructor(ne,ie,me,ae){ǃG.ǃg(ne,ǃG.ǃGD.ǃGr.ǃG$),ǃG.ǃc$i(ie),ǃG.ǃTH(me),ǃG.ǃoG(ae),super(),this.ǃGX=ne,this.ǃcHe=ie,this.ǃCe=me,this.ǃcCQ=ae,this.ǃUk=null,this.ǃGrl=null,this.ǃGrw=null,this.ǃGro=null,this.ǃGrH=null,this.ǃGrU=null,this.ǃGrI=0,this.ǃGrx=0,this.ǃGrJ=-1,this.ǃGrZ=-1,this.ǃGrS="",this.ǃUk=ae?ǃG.ǃGD.ǃXK(_311,ie,null,null,{columnName:ae}):ǃG.ǃGD.ǃXK(_311,ie),me&&-1!==me&&(this.ǃUk.style.width=`${me}px`,this.ǃUk.style.maxWidth=`${me}px`,this.ǃUk.style.minWidth=`${me}px`),this.ǃgI=de=>this.ǃji(de),this.ǃgS=de=>this.ǃPr(de),this.ǃgJ=de=>this.ǃPA(de),this.ǃGrs=de=>this.ǃGrO(de),this.ǃUk.addEventListener(_309,this.ǃgI),this.ǃUk.addEventListener(_310,this.ǃGrs)}ǃz(){this.ǃUk.removeEventListener(_309,this.ǃgI),this.ǃUk.removeEventListener(_310,this.ǃGrs),this.ǃGX.ǃmV().removeEventListener(_310,this.ǃgS),this.ǃGX.ǃmV().removeEventListener(_308,this.ǃgJ),ǃG.ǃGD.ǃjE(this.ǃUk),this.ǃGrl&&ǃG.ǃGs(this.ǃGrl),this.ǃGrw&&ǃG.ǃGs(this.ǃGrw),this.ǃGrU&&ǃG.ǃGs(this.ǃGrU),this.ǃgI=null,this.ǃgS=null,this.ǃgJ=null,this.ǃGrs=null,this.ǃGrl=null,this.ǃGro=null,this.ǃGrw=null,this.ǃGrH=null,this.ǃGrU=null,this.ǃGX=null,this.ǃcHe=null,this.ǃUk=null,super.ǃz()}ǃGL(){return this.ǃUk}ǃGrv(){return-1===this.ǃCe}ǃGrQ(){return 0===this.ǃGVc(this.ǃUk)}ǃGVG(){return this.ǃGVc(this.ǃUk)===this.ǃGX.ǃGrk().ǃGru().length-1}ǃcbJ(){return this.ǃcCQ}ǃcQC(){if(-1===this.ǃCe){let ne=getComputedStyle(this.ǃUk),ie=parseInt(ne.width);return ie}return this.ǃCe}ǃH(ne){ǃG.ǃTH(ne);-1===this.ǃCe||(this.ǃCe=ne)}ǃc$G(ne){ǃG.ǃg(ne,ǃG.ǃGD.ǃGr.ǃG$.ǃGrq),this.ǃGrU||(this.ǃGrU=[]),this.ǃGrU.push(ne)}ǃGVm(){return this.ǃGrU}ǃGVc(ne){return Array.prototype.indexOf.call(ne.parentNode.childNodes,ne)}ǃGVD(ne){ǃG.ǃTH(ne);let ie=this.ǃGVc(this.ǃUk)+ne,me=this.ǃGX.ǃGL(),ae=me.getElementsByTagName(_311);return 0===ne?this.ǃGro=this.ǃGX.ǃGrk().ǃGru()[ie]:this.ǃGrH=this.ǃGX.ǃGrk().ǃGru()[ie],Array.prototype.filter.call(ae,de=>{return this.ǃGVc(de)===ie})}ǃji(ne){let ie=ne.target,me=ie.getBoundingClientRect(),ae=ne.detail.clientX-me.left,de=parseInt(getComputedStyle(ie).padding);return(this.ǃGrI=ne.detail.clientX,this.ǃGrx=me.width-2*de,ae<=ee)?this.ǃGrQ()?void 0:(this.ǃGX.ǃGrG(!0),this.ǃGrS="left",this.ǃGrl=this.ǃGVD(0),this.ǃGrw=this.ǃGVD(-1),this.ǃGX.ǃmV().addEventListener(_310,this.ǃgS),this.ǃGX.ǃmV().addEventListener(_308,this.ǃgJ),void this.ǃUk.removeEventListener(_310,this.ǃGrs)):ae>=me.width-ee?(this.ǃGX.ǃGrG(!0),this.ǃGrS="right",this.ǃGrl=this.ǃGVD(0),this.ǃGrw=this.ǃGVD(1),this.ǃGX.ǃmV().addEventListener(_310,this.ǃgS),this.ǃGX.ǃmV().addEventListener(_308,this.ǃgJ),void this.ǃUk.removeEventListener(_310,this.ǃGrs)):void 0}ǃPr(ne){let ie=ne.detail.clientX-this.ǃGrI;if(("left"===this.ǃGrS&&(ie*=-1),this.ǃGrJ=this.ǃGrx+ie,!(0>this.ǃGrJ))&&!(this.ǃGrH&&(this.ǃGrZ=this.ǃGrH.ǃcQC()-ie,!this.ǃGrH.ǃGrv()&&0>this.ǃGrZ))){for(let me of this.ǃGrl)me.style.width=`${this.ǃGrJ}px`,me.style.maxWidth&&(me.style.maxWidth=`${this.ǃGrJ}px`),me.style.minWidth&&(me.style.minWidth=`${this.ǃGrJ}px`);for(let me of this.ǃGrw)me.style.width=`${this.ǃGrZ}px`,me.style.maxWidth&&(me.style.maxWidth=`${this.ǃGrZ}px`),me.style.minWidth&&(me.style.minWidth=`${this.ǃGrZ}px`)}}ǃGrO(ne){let ie=ne.target,me=ie.getBoundingClientRect(),ae=ne.detail.clientX-me.left;return ae<=ee?0===this.ǃGVc(ie)?void this.ǃGX.ǃGL().removeAttribute(_312):void this.ǃGX.ǃGL().setAttribute(_312,""):ae>=me.width-ee?this.ǃGrv()&&this.ǃGVG()?void this.ǃGX.ǃGL().removeAttribute(_312):void this.ǃGX.ǃGL().setAttribute(_312,""):void this.ǃGX.ǃGL().removeAttribute(_312)}ǃPA(){if(this.ǃGro&&-1!==this.ǃGrJ){let ie=0{ne.preventDefault(),this.ǃGX.ǃGre("tablecontextmenu",ne.clientX,ne.clientY)},this.ǃUk.addEventListener("contextmenu",this.ǃGVR)}ǃz(){this.ǃUk.removeEventListener("contextmenu",this.ǃGVR),this.ǃGVR=null,ǃG.ǃGD.ǃjE(this.ǃUk),this.ǃUk=null;for(let te of this.ǃGrW)te.ǃz();ǃG.ǃGs(this.ǃGrW),this.ǃGrW=null,this.ǃGX=null,this.ǃGVi=!1,super.ǃz()}ǃGL(){return this.ǃUk}ǃGru(){return this.ǃGrW}ǃGt(te,ne,ie){if(ǃG.ǃbv(te),ǃG.ǃTH(ne),ǃG.ǃoG(ie),this.ǃGVi)throw new Error("only one auto sizing column at the end of the table is allowed");let me=ǃG.ǃX(ǃG.ǃGD.ǃGr.ǃG$.ǃGrq,this.ǃGX,this.ǃUk,ne,te);if(ie){let ae=ǃG.ǃGD.ǃXK("div",me.ǃGL());ae.textContent=ie}return this.ǃGrW.push(me),this}ǃGj(te,ne){ǃG.ǃbv(te),ǃG.ǃoG(ne),this.ǃGt(te,-1,ne),this.ǃGX.ǃGL().setAttribute("flex-filler",""),this.ǃGX.ǃGrX().style.overflowX="hidden",this.ǃGVi=!0}},"use strict",ǃG.ǃGD.ǃGr.ǃG$.ǃGVb=class{constructor(){this.ǃGVT=!1}ǃGrg(){ǃG.ǃDW()}ǃz(){ǃG.ǃDW()}ǃGrN(){return this.ǃGVT}},"use strict",ǃG.ǃGD.ǃGr.ǃG$.ǃGrn=class extends ǃG.ǃGD.ǃGr.ǃG$.ǃGVb{constructor(te,ne){ǃG.ǃc$i(te),ǃG.ǃg(ne,ǃG.ǃGD.ǃXY),super(),this.ǃXh=ǃG.ǃX(ǃG.ǃGD.ǃmF,ne,te),this.ǃXh.ǃGL().style.pointerEvents="none",this.ǃcHe=te,this.ǃcHe.setAttribute("icon","")}ǃGrg(){return this.ǃcHe.getAttribute("columnName")}ǃz(){this.ǃXh.ǃz(),this.ǃXh=null,this.ǃcHe=null}},"use strict",ǃG.ǃGD.ǃGr.ǃG$.ǃGrz=class extends ǃG.ǃGD.ǃGr.ǃG$.ǃGVb{constructor(te,ne){ǃG.ǃc$i(te),ǃG.ǃcDf(ne),super(),this.ǃhM=ǃG.ǃGD.ǃXK("div",te),ǃG.ǃcmS(this.ǃhM,ne),this.ǃhM.style.pointerEvents="none",this.ǃcHe=te}ǃGrg(){return this.ǃcHe.getAttribute("columnName")}ǃz(){ǃG.ǃGD.ǃjE(this.ǃhM),this.ǃhM=null,this.ǃcHe=null}ǃcW(te){ǃG.ǃcDf(te),ǃG.ǃcmS(this.ǃhM,te)}},"use strict",ǃG.ǃGD.ǃGr.ǃG$.ǃGrY=class extends ǃG.ǃGD.ǃGr.ǃG$.ǃGVb{constructor(te,ne){ǃG.ǃc$i(te),ǃG.ǃTH(ne),super(),this.ǃGVk=ǃG.ǃGD.ǃXK("div",te),this.ǃGVk.textContent=ne.toString(),this.ǃGVk.style.pointerEvents="none",this.ǃcHe=te}ǃGrg(){return this.ǃcHe.getAttribute("columnName")}ǃz(){ǃG.ǃGD.ǃjE(this.ǃGVk),this.ǃGVk=null,this.ǃcHe=null}},"use strict";{ǃG.ǃGD.ǃGr.ǃG$.ǃGrC=class extends ǃG.ǃGD.ǃGr.ǃG$.ǃGVb{constructor(ne,ie){ǃG.ǃc$i(ne),ǃG.ǃbv(ie),super(),this.ǃcHe=ne,this.ǃGVX=ie,this.ǃhM=ǃG.ǃGD.ǃXK("div",this.ǃcHe),this.ǃhM.textContent=this.ǃGVX,this.ǃhM.style.pointerEvents="none",this.ǃcIC=null,this.ǃGRL=null,this.ǃGR_=null,this.ǃGRr=null,this.ǃGRV=null,this.ǃGGd=null,this.ǃGV$=null,this.ǃGVr=()=>this.ǃGRE(),this.ǃGVT=!0}ǃz(){this.ǃGRC(),ǃG.ǃGD.ǃjE(this.ǃhM),this.ǃGVX=null,this.ǃhM=null,this.ǃcHe=null,this.ǃGRL=null,this.ǃGR_=null,this.ǃGRr=null,this.ǃGRV=null,this.ǃGGd=null,this.ǃGV$=null,this.ǃGVr=null}ǃGrg(){return this.ǃcHe.getAttribute("columnName")}ǃGL(){return this.ǃhM}ǃcW(ne){ǃG.ǃbv(ne),this.ǃGVX=ne,this.ǃhM.textContent=this.ǃGVX}ǃLx(){return this.ǃGVX}ǃrQ(){if(!this.ǃcIC)return this.ǃcIC=ǃG.ǃGD.ǃXK("input",this.ǃcHe,null,"table-edit-text"),this.ǃcIC.type="text",this.ǃcIC.setAttribute("spellcheck","false"),this.ǃGRV=()=>this.ǃGRn(),this.ǃcIC.addEventListener("input",this.ǃGRV),this.ǃcIC.addEventListener("UITap",ǃG.ǃGD.ǃclS),this.ǃcIC.addEventListener("UIDoubleTap",ǃG.ǃGD.ǃclS),window.setTimeout(()=>{this.ǃGRr=()=>this.ǃGRK(),this.ǃcIC.addEventListener("blur",this.ǃGRr),this.ǃcIC.select()},30),this.ǃGGd=ne=>this.ǃGRM(ne),this.ǃcIC.addEventListener("keydown",this.ǃGGd,!0),this.ǃcHe.addEventListener("scroll",this.ǃGVr,{ǃtq:!0}),this.ǃcIC.value=this.ǃGVX,this.ǃcIC.focus(),this.ǃhM.textContent=".",new Promise((ne,ie)=>{this.ǃGRL=ne,this.ǃGR_=ie})}ǃGRM(ne){ne.which===ǃG.ǃEj.ǃBz?(ne.preventDefault(),ne.stopPropagation(),this.ǃGRK()):ne.which===ǃG.ǃEj.ǃuI&&(ne.preventDefault(),ne.stopPropagation(),this.ǃGRy())}ǃGRK(){if(this.ǃcIC){let ne=this.ǃcIC.value;this.ǃGRC(),this.ǃGRL&&this.ǃGRL(ne),this.ǃGRL=null,this.ǃGR_=null}}ǃGRy(){this.ǃcIC&&(this.ǃGRC(),this.ǃGRL&&this.ǃGRL(null),this.ǃGRL=null,this.ǃGR_=null)}ǃGRC(){this.ǃcIC&&(this.ǃhM.textContent=this.ǃGVX,this.ǃcHe.removeEventListener("scroll",this.ǃGVr,{ǃtq:!0}),this.ǃcIC.removeEventListener("keydown",this.ǃGGd,!0),this.ǃcIC.removeEventListener("input",this.ǃGRV),this.ǃcIC.removeEventListener("blur",this.ǃGRr),this.ǃcIC.removeEventListener("contextmenu",this.ǃGV$),this.ǃcIC.removeEventListener("UITap",ǃG.ǃGD.ǃclS),this.ǃcIC.removeEventListener("UIDoubleTap",ǃG.ǃGD.ǃclS),ǃG.ǃGD.ǃjE(this.ǃcIC),this.ǃGGd=null,this.ǃGRV=null,this.ǃGRr=null,this.ǃcIC=null)}ǃGRn(){this.ǃhM.textContent=this.ǃcIC.value;let ne=this.ǃhM.getBoundingClientRect();this.ǃcIC.style.width=`${Math.max(ne.right-ne.left,30)}px`,this.ǃhM.textContent="."}ǃGRE(){this.ǃcIC.style.left=`${this.ǃhM.offsetLeft}px`,this.ǃcIC.style.top=`${this.ǃhM.offsetTop-this.ǃcHe.scrollTop}px`;let ne=this.ǃcHe.getBoundingClientRect(),ie=this.ǃcIC.getBoundingClientRect();(ie.bottom>ne.bottom||ie.topne.right)&&this.ǃGRy()}}}"use strict",ǃG.ǃGD.ǃGr.ǃG$.ǃGrF=class extends ǃG.ǃGD.ǃGr.ǃG$.ǃGVb{constructor(te,ne){ǃG.ǃc$i(te),ǃG.ǃg(ne,ne.ownerDocument.defaultView.DocumentFragment),super(),this.ǃcHe=te,this.ǃcHe.appendChild(ne)}ǃGrg(){return this.ǃcHe.getAttribute("columnName")}ǃz(){this.ǃcHe=null}},"use strict";{const _315="UIPointerDown";ǃG.ǃGD.ǃGr.ǃcmy=class extends ǃG.Event.ǃpF{constructor(te){super(),ǃG.ǃc$i(te),this.ǃUk=ǃG.ǃGD.ǃXK("ui-close-button",te),this.ǃUk.setAttribute("title",lang("ui.controls.close-button.close-tooltip")),this.ǃcQH=null,app.ǃGVV("close").ǃGcb().then(ne=>{ǃG.ǃYa(this)||this.ǃGVA(ne)}),this.onclick=null,this.ǃyj=ne=>this.ǃji(ne),this.ǃUk.addEventListener(_315,this.ǃyj),this.ǃYq=!1}ǃz(){this.ǃYq=!0,ǃG.ǃGD.ǃjE(this.ǃcQH),this.ǃcQH=null,this.ǃUk.removeEventListener(_315,this.ǃyj),this.ǃyj=null,this.onclick=null,ǃG.ǃGD.ǃjE(this.ǃUk),this.ǃUk=null,super.ǃz()}ǃGVA(te){this.ǃYq||(this.ǃcQH=te,this.ǃUk.appendChild(this.ǃcQH))}ǃGL(){return this.ǃUk}ǃji(te){0!==te.detail.ǃET||(te.stopPropagation(),this.onclick&&this.onclick())}}}{const _316="UIPointerDown";ǃG.ǃGD.ǃGr.ǃcHd=class extends ǃG.Event.ǃpF{constructor(te){super(),ǃG.ǃc$i(te),this.ǃUk=ǃG.ǃGD.ǃXK("ui-back-button"),te.insertBefore(this.ǃUk,te.firstChild),this.ǃUk.setAttribute("title",lang("ui.controls.back-button.back-tooltip")),this.ǃcQH=null,app.ǃGVV("back").ǃGcb().then(ne=>this.ǃGVA(ne)),this.onclick=null,this.ǃyj=ne=>this.ǃji(ne),this.ǃUk.addEventListener(_316,this.ǃyj),this.ǃYq=!1}ǃz(){this.ǃYq=!0,ǃG.ǃGD.ǃjE(this.ǃcQH),this.ǃcQH=null,this.ǃUk.removeEventListener(_316,this.ǃyj),this.ǃyj=null,this.onclick=null,ǃG.ǃGD.ǃjE(this.ǃUk),this.ǃUk=null,super.ǃz()}ǃGVA(te){this.ǃYq||(this.ǃcQH=te,this.ǃUk.appendChild(this.ǃcQH))}ǃGL(){return this.ǃUk}ǃji(te){0!==te.detail.ǃET||(te.stopPropagation(),this.onclick&&this.onclick())}}}{function ee(ge){oe&&oe.ǃPr(ge)}const _317="right",_318="top-left",_319="UIPointerMove",_320="UIPointerDown",_321="not in a group",_322="menu was released",_323="should not be current menu",te=[{opacity:"1"},{opacity:"0"}],ne=[{transform:"scale(0.85)",opacity:"0"},{transform:"scale(1)",opacity:"1"}],ie=[{opacity:"0"},{opacity:"1"}],me={duration:100,easing:"ease-out"},ae=[_318,"top","top-right","left","center",_317,"bottom-left","bottom","bottom-right"],de=[_317,"left"],re=4,Ge={ǃIN:null};let oe=null,le=NaN;ǃG.ǃGD.ǃmR=class extends ǃG.ǃDa{constructor(he,ve,be,Ee){ǃG.ǃc$i(he),ǃG.ǃNv(ve),ǃG.ǃmL(be,ǃG.ǃGD.ǃmR.ǃGVL),ǃG.ǃcDt(Ee),super(),Ee=Object.assign({},Ge,Ee),this.ǃGV_=he,this.ǃcYN=null,this.ǃGVt=Ee.ǃIN||null,this.ǃGVP=!1,this.ǃUk=ǃG.ǃGD.ǃXK("ui-menu"),this.ǃUk.setAttribute("role","menu"),this.ǃGRH=[],this.ǃcxZ=null,this.ǃGVj=[],this.ǃGVd=null,this.ǃcHD=null,this.ǃcHi=!1,this.ǃcHR=!1,this.ǃCt=!1,this.ǃGVE=be,this.ǃcZH=!0,this.ǃGVe(!1),this.ǃcrg=0,this.ǃGVp=0,this.ǃGVf=0,this.ǃGVy=_317,this.ǃcoO=null,this.ǃGVB=ǃG.ǃDG.ǃDc&&window.matchMedia("(max-width: 500px), (max-height: 500px)").matches,this.ǃGVW=!1,this.ǃGVB&&this.ǃUk.setAttribute("compact",""),this.ǃGDZ=ve||(this.ǃGVB?app.ǃXz():app.ǃGP()),this.ǃYq=!1}ǃz(){assert(!this.ǃYq,"already released"),this.ǃGVu(),this.ǃcHD&&(this.ǃcHD.finish(),this.ǃcHD=null);for(let he of this.ǃGRH)he.ǃND();ǃG.ǃGs(this.ǃGRH);for(let he of this.ǃGVj)ǃG.ǃGD.ǃjE(he);ǃG.ǃGs(this.ǃGVj),this.ǃGVd=null,this.ǃUk&&(ǃG.ǃGD.ǃjE(this.ǃUk),this.ǃUk=null),this.ǃcxZ=null,this.ǃcHD=null,this.ǃGV_=null,this.ǃGVE=null,this.ǃYq=!0,ǃG.ǃz(this)}ǃYa(){return this.ǃYq}ǃGL(){return this.ǃUk}ǃGVU(){return this.ǃGVd||this.ǃUk}ǃGif(){return this.ǃGDZ}ǃGVv(){return this.ǃGVE}ǃGVq(){if(isNaN(le)){let he=ǃG.ǃGD.ǃclo("padding-top",{ǃcXT:this.ǃUk});if(!he.endsWith("px"))throw new Error("CSS style for menu padding-top must be in units of 'px'");le=parseFloat(he)||0}return le}ǃkM(){return this.ǃCt}ǃGVa(){return this.ǃUk.scrollTop!==this.ǃcrg}ǃGVg(){this.ǃcrg=this.ǃUk.scrollTop}ǃmb(he,ve,be,Ee){"string"==typeof he&&(he=app.ǃGVN(he,this.ǃGDZ)),ǃG.ǃmL(he,ǃG.ǃGD.ǃXY),ǃG.ǃbv(ve),ǃG.ǃcVD(be),ǃG.ǃcDt(Ee),this.ǃGVW||(this.ǃGVW=!0,this.ǃGVB&&this.ǃGVK()&&this.ǃGVn());let De=ǃG.ǃX(ǃG.ǃGD.ǃmR.ǃGVL,this,he,ve,be,Ee);return this.ǃGRH.push(De),this.ǃGVM(),De}ǃmk(){let he=ǃG.ǃX(ǃG.ǃGD.ǃmR.ǃGTF,this);return this.ǃGRH.push(he),this.ǃGVM(),he}ǃV$(he,ve,be,Ee){"string"==typeof he&&(he=app.ǃGVN(he,this.ǃGDZ)),ǃG.ǃmL(he,ǃG.ǃGD.ǃXY),ǃG.ǃbv(ve),ǃG.ǃcDt(be),ǃG.ǃcDt(Ee);let De=this.ǃmb(he,ve,null,be);return De.ǃGVC(Ee),De.ǃGVh()}ǃdw(){if(this.ǃGVY())throw new Error("already in a group");this.ǃGVd=ǃG.ǃGD.ǃXK("div",this.ǃGL(),null,"menuitemgroup"),this.ǃGVj.push(this.ǃGVd)}ǃdJ(){if(!this.ǃGVY())throw new Error(_321);this.ǃGVd=null}ǃGVz(){if(!this.ǃGVY())throw new Error(_321);ǃG.ǃGD.ǃjE(this.ǃGVd),this.ǃGVd=null,this.ǃGVj.pop()}ǃGVY(){return!!this.ǃGVd}ǃGVn(){const he=this.ǃGVY();he&&this.ǃGVz(),this.ǃmb(app.ǃGVN("close",this.ǃGif()),lang("common.close-menu"),ǃG.ǃcaf),this.ǃmk(),he&&this.ǃdw()}ǃGVM(){null===this.ǃGVt||this.ǃGRH.length>=this.ǃGVt&&(this.ǃGVP=!0)}ǃm$(he,ve,be){if(ǃG.ǃTH(he),ǃG.ǃTH(ve),ǃG.ǃNv(be),assert(!this.ǃYq,_322),assert(!this.ǃCt,"showing already active menu"),this.ǃGVd)throw new Error("group not finished");if(this.ǃGVK()){ǃG.ǃGD.ǃmR.ǃG$z(),oe=this;let Ee=new Promise(De=>this.ǃcoO=De);return this.ǃGVB&&ǃG.ǃGD.ǃcIA.ǃDS(this.ǃGV_),this.ǃGVF(he,ve),this.ǃGVl(),this.ǃcYN.addEventListener(_320,ǃG.ǃGD.ǃmR.ǃji,!0),this.ǃcYN.addEventListener("keydown",ǃG.ǃGD.ǃmR.ǃP_),this.ǃcYN.addEventListener("wheel",ǃG.ǃGD.ǃmR.ǃGVw,!0),this.ǃcYN.defaultView.addEventListener("resize",ǃG.ǃGD.ǃmR.ǃG$z),this.ǃcYN.defaultView.addEventListener("unload",ǃG.ǃGD.ǃmR.ǃG$z),this.ǃcYN.addEventListener(_319,ee),ǃG.ǃDP||this.ǃcYN.defaultView.addEventListener("blur",ǃG.ǃGD.ǃmR.ǃG$z),Ee}this.ǃGVo()&&(this.ǃGVH()?this.ǃGVv().ǃGVI().ǃGVa()&&this.ǃGVF(he,ve,be):this.ǃGVF(he,ve,be),this.ǃGVl())}ǃXs(he=_318,ve=0,be=0,Ee=_317){if(ǃG.ǃbv(he),ǃG.ǃTH(ve),ǃG.ǃTH(be),ǃG.ǃbv(Ee),!ae.includes(he))throw new Error("invalid alignment");if(!de.includes(Ee))throw new Error("invalid preferred expand direction");this.ǃGVy=Ee;const De=this.ǃGV_.getBoundingClientRect();return he===_318?this.ǃm$(De.left+ve,De.top+be):"top"===he?this.ǃm$(De.left+De.width/2+ve,De.top+be):"top-right"===he?this.ǃm$(De.right+ve,De.top+be):"left"===he?this.ǃm$(De.left+ve,De.top+De.height/2+be):"center"===he?this.ǃm$(De.left+De.width/2+ve,De.top+De.height/2+be):he===_317?this.ǃm$(De.right+ve,De.top+De.height/2+be):"bottom-left"===he?this.ǃm$(De.left+ve,De.bottom+be):"bottom"===he?this.ǃm$(De.left+De.width/2+ve,De.bottom+be):"bottom-right"===he?this.ǃm$(De.right+ve,De.bottom+be):void 0}ǃHI(he){!he&&(this.ǃcHR||this.ǃGVx()||!this.ǃCt)||(this.ǃCt=!1,this.ǃGVJ(),this.ǃGVK()&&(oe===this&&(oe=null),this.ǃGVB&&ǃG.ǃGD.ǃcIA.ǃHI(),this.ǃcYN&&(this.ǃcYN.removeEventListener(_320,ǃG.ǃGD.ǃmR.ǃji,!0),this.ǃcYN.removeEventListener("keydown",ǃG.ǃGD.ǃmR.ǃP_),this.ǃcYN.removeEventListener("wheel",ǃG.ǃGD.ǃmR.ǃGVw,!0),this.ǃcYN.defaultView.removeEventListener("resize",ǃG.ǃGD.ǃmR.ǃG$z),this.ǃcYN.defaultView.removeEventListener("unload",ǃG.ǃGD.ǃmR.ǃG$z),this.ǃcYN.removeEventListener(_319,ee),!ǃG.ǃDP&&this.ǃcYN.defaultView.removeEventListener("blur",ǃG.ǃGD.ǃmR.ǃG$z)),this.ǃGVu()),this.ǃcYN=null,this.ǃGVZ())}ǃGVu(){this.ǃcoO&&(this.ǃcoO(),this.ǃcoO=null)}ǃVE(he,ve){if(ǃG.ǃTH(he),ǃG.ǃTH(ve),assert(!this.ǃYq,_322),this.ǃcHR||!this.ǃCt||this.ǃGVx())return!1;let be=this.ǃcxZ;return be?he>=be.left&&ve>=be.top&&heXe?(he=0,ǃG.ǃDG.ǃDc&&(ve=be),Te="100%"):(he=we-De,Te="0%")}let Ue="number"==typeof be?be:ve;ve+ye+re<=Le?ke="0%":0<=Ue-ye?(ve=Ue-ye,ke="100%"):(ke=100*ve/Le+"%",ve=0,this.ǃUk.style.height=Math.min(ye,Le-5)+"px"),this.ǃUk.style.transformOrigin=`${Te} ${ke}`,this.ǃUk.style.left=`${he-this.ǃGVp}px`,this.ǃUk.style.top=`${ve-this.ǃGVf}px`,"DIALOG"===this.ǃGVs().tagName&&(this.ǃUk.style.width=`${De}px`),this.ǃGVP&&this.ǃGRH.length&&(this.ǃUk.style.width=`${Ee.width+(Ee.width-this.ǃUk.clientWidth)}px`),this.ǃcxZ=this.ǃUk.getBoundingClientRect(),this.ǃGVg()}ǃGVl(){assert(!this.ǃYq,_322),assert(!this.ǃcHi,"already fading in"),assert(!this.ǃcHR,"menu is fading out"),this.ǃcHi=!0,this.ǃCt=!0,this.ǃGVx()?(this.ǃGVe(!0),this.ǃcsS(this.ǃGVB?ie:ne,me)):this.ǃcIr()}ǃGVZ(){return assert(!this.ǃcHR,"already animating out"),assert(oe!==this,_323),this.ǃcHR=!0,this.ǃcHi&&(this.ǃcHi=!1,this.ǃcHD)?void ǃG.ǃcax(this.ǃcHD):void(this.ǃGVO()?this.ǃcsS(te,me):this.ǃcIr())}ǃcsS(he,ve){app.ǃcPG()?(assert(!this.ǃcHD,"already animating"),this.ǃcHD=this.ǃUk.animate(he,ve),this.ǃcHD.onfinish=()=>this.ǃcIr()):this.ǃcIr()}ǃcIr(){if(!(ǃG.ǃYa(this)||this.ǃYq)){let he=!1;this.ǃcHR&&(assert(oe!==this,_323),this.ǃGVK()&&(he=!0),this.ǃGVo()&&this.ǃGVe(!1)),this.ǃcHi=!1,this.ǃcHR=!1,this.ǃcHD=null,he&&this.ǃz()}}ǃGVQ(he){ǃG.ǃmL(he,ǃG.ǃGD.ǃmR.ǃGVL);for(let ve of this.ǃGRH)ve.ǃcVx(ve===he)}ǃGVJ(){for(let he of this.ǃGRH)if(he.ǃGAc()){let je=he.ǃGVh();je&&je.ǃGVI().ǃHI()}}ǃGAG(){for(let he of this.ǃGRH)if(he.ǃGAc()){let Ke=he.ǃGVh();Ke&&Ke.ǃGVI().ǃz()}}ǃGAm(he,ve){for(let be of this.ǃGRH)if(be.ǃGAc()){let qe=be.ǃGVh();if(qe&&qe.ǃGVI().ǃGAD(he,ve))return!0}return!1}ǃGAD(he,ve){return this.ǃVE(he,ve)||this.ǃGAm(he,ve)}ǃGVe(he){if((he=!!he,this.ǃcZH!==he)&&(this.ǃcZH=he,this.ǃUk.setAttribute("visible",this.ǃcZH?"true":"false"),!this.ǃcZH))for(let ve of this.ǃGRH)ve.ǃcVx(!1)}ǃGAi(){return this.ǃcHR}ǃGAR(){return this.ǃCt}ǃGVx(){return!this.ǃcZH}ǃGVO(){return this.ǃcZH}ǃGVo(){return!!this.ǃGVE}ǃGVK(){return!this.ǃGVE}ǃGAb(){return this.ǃGVB}ǃGAT(he){this.ǃGVB&&(this.ǃCt=!!he,this.ǃGVe(this.ǃCt))}ǃGAk(){return this.ǃUk.scrollHeight>this.ǃUk.clientHeight}ǃGVH(){return!!this.ǃUk.parentNode}ǃGVs(){return this.ǃUk.parentNode}static ǃyx(){return!!oe}static ǃG$z(){oe&&(assert(!oe.ǃYa(),_322),oe.ǃHI(oe.ǃGAb()),oe=null)}static ǃcIE(){oe&&(assert(!oe.ǃYa(),_322),oe.ǃGAG(),oe.ǃz(),oe=null)}static ǃclO(he,ve){return!!oe&&(assert(!oe.ǃYa(),_322),oe.ǃGAD(he,ve))}static ǃji(he){oe&&(assert(!oe.ǃYa(),_322),!oe.ǃGAD(he.detail.clientX,he.detail.clientY)&&(oe.ǃGAb()&&(he.stopPropagation(),he.preventDefault()),ǃG.ǃGD.ǃmR.ǃG$z()))}ǃPr(he){if(!this.ǃYa())for(let ve of this.ǃGRH)if(ve.ǃGAc()&&(ve.ǃPr(he),ve.ǃGAX())){let Je=ve.ǃGVh();Je.ǃGA$()&&(Je.ǃPr(he),Je.ǃGVI().ǃPr(he))}}static ǃP_(he){oe&&(he.which!==ǃG.ǃEj.ǃuI||ǃG.ǃGD.ǃmR.ǃG$z())}static ǃGVw(he){ǃG.ǃGD.ǃmR.ǃyx()&&(he.preventDefault(),he.stopPropagation())}}}{const _324="UIPointerDown",ne={ǃXZ:!1,bold:!1,ǃHa:"",ǃ$D:!1,ǃGAr:!1};ǃG.ǃGD.ǃmR.ǃGVL=class extends ǃG.ǃDa{constructor(me,ae,de,re,Ge){if(ǃG.ǃg(me,ǃG.ǃGD.ǃmR),ǃG.ǃmL(ae,ǃG.ǃGD.ǃXY),ǃG.ǃbv(de),ǃG.ǃcVD(re),ǃG.ǃcDt(Ge),Ge=Object.assign({},ne,Ge),ǃG.ǃbv(Ge.ǃHa),super(),this.ǃGAV=me,this.ǃGAA=null,this.ǃUk=ǃG.ǃGD.ǃXK("ui-menuitem",this.ǃGAV.ǃGVU()),this.ǃUk.setAttribute("role","menuitem"),this.ǃcxZ=null,this.ǃcti=!1,this.ǃGrI=0,this.ǃGAL=0,this.ǃGA_=!1,this.ǃGAt=!0,this.ǃXh=null,this.ǃcQH=null,ae){this.ǃXh=ǃG.ǃX(ǃG.ǃGD.ǃmF,{icon:ae,ǃcQy:Ge.ǃ$D},this.ǃUk);let oe=ae.ǃcOv();oe&&oe.ǃGcb().then(le=>{this.ǃXh&&(this.ǃXh.ǃcQM(le),this.ǃXh=null,this.ǃcQH=le)})}else this.ǃXh=ǃG.ǃX(ǃG.ǃGD.ǃmF,this.ǃGAV.ǃGif(),this.ǃUk);this.ǃGAP=ǃG.ǃGD.ǃXK("span",this.ǃUk,null,"menu-item-text"),this.ǃGAP.textContent=de,this.ǃGma=re,this.ǃGAj=!!Ge.ǃXZ,this.ǃGAd=!!Ge.ǃGAr,Ge.bold&&this.ǃUk.setAttribute("bold",""),Ge.ǃHa&&this.ǃUk.setAttribute("title",Ge.ǃHa),this.ǃyj=oe=>this.ǃji(oe),this.ǃUk.addEventListener(_324,this.ǃyj),this.ǃPV=oe=>this.ǃPA(oe),this.ǃUk.addEventListener("UIPointerUp",this.ǃPV,!0),this.ǃUk.addEventListener("contextmenu",ǃG.ǃGD.ǃclZ)}ǃND(){this.ǃGAA&&(this.ǃGAA.ǃz(),this.ǃGAA=null),this.ǃXh&&(this.ǃXh.ǃz(),this.ǃXh=null),ǃG.ǃGD.ǃjE(this.ǃcQH),this.ǃcQH=null,this.ǃGAP&&(ǃG.ǃGD.ǃjE(this.ǃGAP),this.ǃGAP=null),this.ǃUk&&(this.ǃUk.removeEventListener("contextmenu",ǃG.ǃGD.ǃclZ),this.ǃUk.removeEventListener("UIPointerUp",this.ǃPV,!0),this.ǃPV=null,this.ǃUk.removeEventListener(_324,this.ǃyj),this.ǃyj=null,ǃG.ǃGD.ǃjE(this.ǃUk),this.ǃUk=null),this.ǃGAV=null,this.ǃGma=null,this.ǃcxZ=null,ǃG.ǃz(this)}ǃGL(){return this.ǃUk}ǃGVh(){return this.ǃGAA}ǃGVI(){return this.ǃGAV}ǃmj(){let me=this.ǃGVI();do{if(me.ǃGVK())return me;me=me.ǃGVv().ǃGVI()}while(me);throw new Error("unable to get root menu")}ǃGAc(){return!0}ǃGAX(){return!!this.ǃGVh()}ǃGVS(me){return(me=!!me,me)?(this.ǃcxZ=this.ǃUk.getBoundingClientRect(),this.ǃcxZ):(this.ǃcxZ||(this.ǃcxZ=this.ǃUk.getBoundingClientRect()),this.ǃcxZ)}ǃGVC(me){ǃG.ǃcDt(me);this.ǃGAA||(assert(!this.ǃGma,"submenu items should not have a callback function"),this.ǃGAA=ǃG.ǃX(ǃG.ǃGD.ǃmR.ǃGAE,this,this.ǃGAV.ǃGif(),me))}ǃGAe(){}ǃGAp(){}ǃji(me){this.ǃGAV.ǃkM()&&(!this.ǃGAV.ǃGAk()&&me.preventDefault(),this.ǃGrI=me.detail.clientX,this.ǃGAL=me.detail.clientY,me.detail.ǃEV&&this.ǃGAV.ǃGVQ(this))}ǃPr(me){if(!ǃG.ǃYa(this)&&!this.ǃmj().ǃGAb()){let ae=this.ǃGAt||this.ǃGAV.ǃGVa(),de=this.ǃVE(me.detail.clientX,me.detail.clientY,ae);!this.ǃGA_&&de?(this.ǃGA_=!0,this.ǃGAt=!1,this.ǃGAe(me)):this.ǃGA_&&!de&&(this.ǃGA_=!1,this.ǃGAp(me))}}ǃPA(me){if(this.ǃGAV.ǃkM()&&(me.preventDefault(),me.detail.ǃET!==ǃG.ǃye.ǃyE)){if(me.detail.ǃEV&&!this.ǃVE(me.detail.clientX,me.detail.clientY))return void this.ǃGVI().ǃGVQ(null);if(this.ǃGAX())return void((!this.ǃGAA.ǃkM()||me.detail.ǃEV)&&this.ǃGAV.ǃGVJ());let ae=me.detail.clientX,de=me.detail.clientY;return ǃG.ǃWi(this.ǃGrI,this.ǃGAL,ae,de)>=25?void this.ǃGAV.ǃGVQ(null):void(this.ǃGma&&(this.ǃGAj?this.ǃGma():window.setTimeout(this.ǃGma,16)),!this.ǃGAd&&ǃG.ǃGD.ǃmR.ǃG$z())}}ǃVE(me,ae,de){ǃG.ǃTH(me),ǃG.ǃTH(ae);let re=this.ǃGVI();return re.ǃGAi()||!re.ǃGAR()||re.ǃGVx()?!1:(de=!!de,this.ǃcxZ=this.ǃGVS(de),me>=this.ǃcxZ.left&&ae>=this.ǃcxZ.top&&methis.ǃPA(de),this.ǃyj=de=>this.ǃji(de),this.ǃGAV=ǃG.ǃX(ǃG.ǃGD.ǃmR,this.ǃGV_,this.ǃGDZ,this.ǃGAf,ae)}ǃz(){this.ǃGAM(),this.ǃGAC(),this.ǃGV_.removeEventListener("UIPointerUp",this.ǃPV),this.ǃGV_.removeEventListener(_325,this.ǃyj),this.ǃXh&&(this.ǃXh.ǃz(),this.ǃXh=null),ǃG.ǃGD.ǃjE(this.ǃcQH),this.ǃcQH=null,this.ǃGAV&&!ǃG.ǃYa(this.ǃGAV)&&this.ǃGAV.ǃGL()&&this.ǃGAV.ǃz(),this.ǃGAV=null,this.ǃPV=null,this.ǃyj=null,this.ǃGV_=null,this.ǃGAf=null,ǃG.ǃz(this)}ǃGVI(){return this.ǃGAV}ǃGA$(){return this.ǃGAy}ǃmj(){let ie=this.ǃGAf.ǃGVI();do{if(ie.ǃGVK())return ie;ie=ie.ǃGVv().ǃGVI()}while(ie);throw new Error("unable to get root menu")}ǃmb(ie,me,ae,de){return this.ǃGAh(),this.ǃGVI().ǃmb(ie,me,ae,de)}ǃmk(){return this.ǃGAh(),this.ǃGVI().ǃmk()}ǃV$(ie,me){return this.ǃGAh(),this.ǃGVI().ǃV$(ie,me)}ǃdw(){this.ǃGVI().ǃdw()}ǃdJ(){this.ǃGVI().ǃdJ()}ǃGVY(){this.ǃGVI().ǃGVY()}ǃji(){this.ǃGAB=!1,this.ǃGAW=!1}ǃPA(ie){if(!(ie.detail.ǃEV&&this.ǃGAV.ǃGAi())&&ie.detail.ǃET!==ǃG.ǃye.ǃyE){if(ie.detail.ǃEV){if(!this.ǃGAf.ǃVE(ie.detail.clientX,ie.detail.clientY))return void this.ǃGAf.ǃGVI().ǃGVQ(null);if(this.ǃmj().ǃGAb()&&(this.ǃGAB||this.ǃGAW))return void this.ǃGAf.ǃGVI().ǃGVQ(null)}this.ǃGAY()}}ǃGAe(){this.ǃGAM(),this.ǃGAC(),this.ǃGAn=setTimeout(()=>{this.ǃGAz()},300)}ǃGAp(){this.ǃGAu=!1,this.ǃGAU=!1,this.ǃGAM(),this.ǃGAC(),this.ǃG$f=setTimeout(()=>{this.ǃGAF(this.ǃGAq,this.ǃGAa)},500)}ǃPr(ie){if(!ǃG.ǃYa(this)){this.ǃGAq=ie.detail.clientX,this.ǃGAa=ie.detail.clientY;let me=this.ǃGAv||!this.ǃGAV.ǃGVa(),ae=this.ǃGAf.ǃVE(this.ǃGAq,this.ǃGAa,me);!this.ǃGAu&&ae?(this.ǃGAu=!0,this.ǃGAv=!1,this.ǃmj().ǃGAb()||this.ǃGAe(ie)):this.ǃGAu&&!ae&&(this.ǃGAu=!1,this.ǃmj().ǃGAb()?this.ǃGAB=!0:this.ǃGAp(ie)),ae=this.ǃGAV.ǃVE(this.ǃGAq,this.ǃGAa),!this.ǃGAU&&ae?this.ǃGAU=!0:this.ǃGAU&&!ae&&(this.ǃGAU=!1,this.ǃmj().ǃGAb()?this.ǃGAW=!0:this.ǃGAp(ie))}}ǃGAM(){-1!==this.ǃGAn&&(clearTimeout(this.ǃGAn),this.ǃGAn=-1)}ǃGAC(){-1!==this.ǃG$f&&(clearTimeout(this.ǃG$f),this.ǃG$f=-1)}ǃkM(){return this.ǃGVI().ǃkM()}ǃGAY(){this.ǃGAf.ǃGVI().ǃGAT(!1);let ie=this.ǃGVI();if(!ie.ǃkM()){this.ǃGAM(),this.ǃGAC();let me=this.ǃGAf.ǃGVI();if(0===this.ǃGAg&&0===this.ǃGAN&&0===this.ǃGAK){let ae=me.ǃGVq(),de=this.ǃGAf.ǃGVS(!0);this.ǃGAg=de.left+de.width,this.ǃGAN=de.top-ae,this.ǃGAK=de.bottom+ae}else if(me.ǃGVa()){let ae=me.ǃGVq(),de=this.ǃGAf.ǃGVS(!0);this.ǃGAg=de.left+de.width,this.ǃGAN=de.top-ae,this.ǃGAK=de.bottom+ae}ie.ǃm$(this.ǃGAg,this.ǃGAN,this.ǃGAK)}}ǃGAz(){this.ǃGAn=-1;this.ǃGVI().ǃkM()||(this.ǃGAf.ǃGVI().ǃGVJ(),this.ǃGAY())}ǃGAF(ie,me){ǃG.ǃTH(ie),ǃG.ǃTH(me),this.ǃG$f=-1;let ae=this.ǃGVI();ae.ǃkM()&&!ae.ǃGAD(ie,me)&&ae.ǃHI()}ǃGAh(){if(!this.ǃGAy){this.ǃGV_.setAttribute("sub-menu","full");let ie=app.ǃml("menu-submenu");this.ǃXh=ǃG.ǃX(ǃG.ǃGD.ǃmF,ie,this.ǃGV_);let me=ie.ǃcOv();me&&me.ǃGcb().then(de=>{this.ǃXh&&(this.ǃXh.ǃcQM(de),this.ǃXh=null,this.ǃcQH=de)}),this.ǃGV_.addEventListener("UIPointerUp",this.ǃPV),this.ǃGV_.addEventListener(_325,this.ǃyj),this.ǃGAy=!0;const ae=this.ǃmj();if(ae.ǃGAb()){const de=this.ǃGVI(),re=de.ǃGVY();re&&de.ǃGVz(),de.ǃmb(app.ǃGVN("back",ae.ǃGif()),lang("common.back"),()=>this.ǃGAl(),{ǃGAr:!0}),de.ǃmk(),re&&de.ǃdw()}}}ǃGAl(){this.ǃGAf.ǃGVI().ǃGAT(!0),this.ǃGAV.ǃHI()}}}{function ee(te,ne){return!!te==!!ne}ǃG.ǃGD.ǃGAw=class{constructor(...ne){if(2>ne.length)throw new Error("missing arguments");this.ǃGma=null,this.ǃcYm="",this.ǃGAo=ne[ne.length-2],this.ǃGAH=!1,this.ǃGAI=!1,this.ǃGAx=!1,this.ǃGAJ=!1,this.ǃGAZ=!1;let ie=[];for(let ae=0,de=ne.length-2,re;aethis.ǃP_(ne,!1)),te.addEventListener("external-keydown",ne=>this.ǃP_(ne.ǃcGA,!0))}ǃGLD(te){ǃG.ǃkK(te,ǃG.ǃGD.ǃGAw),ǃG.ǃMg(this.ǃGLG,te)}ǃGLi(){this.ǃGLm=!1}ǃP_(te,ne){if(window.C3_IsPopupWindow)return console.log("[Popup window] Forwarding keyboard event"),void window.opener.postMessage({type:"keydown-event",event:{key:te.key,keyCode:te.keyCode,keyIdentifier:te.keyIdentifier,keyLocation:te.keyLocation,code:te.code,location:te.location,char:te.char,charCode:te.charCode,which:te.which,ctrlKey:te.ctrlKey,shiftKey:te.shiftKey,altKey:te.altKey,metaKey:te.metaKey}},location.origin);const ie=ǃG.ǃcal();for(let me of this.ǃGLG)if((!ie||me.ǃGAs())&&me.ǃGAO(te))return this.ǃGLm=!0,me.ǃGAQ(this.ǃcQl),ǃG.ǃGD.ǃmR.ǃG$z(),void(!ne&&this.ǃGLm&&te.preventDefault())}},"use strict",ǃG.ǃGLR=class extends ǃG.ǃDa{constructor(te,ne){super(),ǃG.ǃg(te,ǃG.ǃjk.constructor),ǃG.ǃbv(ne),this.ǃcle=te,this.ǃclE=ne,this.ǃGLb=`@font-face {
font-family: '${this.ǃclE}';
src: `,this.ǃGLT=null,this.ǃGLk="",this.ǃGLX=[],this.ǃGL$=null}ǃcu(){return this.ǃclE}ǃcwA(te,ne,ie,me){ǃG.ǃg(te,Blob),ǃG.ǃbv(ne),ǃG.ǃbv(ie);let ae=URL.createObjectURL(te);this.ǃGLX.push(ae),this.ǃGLb+=`url('${ae}')`;let de=ǃG.ǃjk.ǃGLr(ne,ie);de&&(this.ǃGLb+=` format('${de}')`),this.ǃGLb+=me?";\n}":", "}ǃGLV(){return this.ǃGLT=new Blob([this.ǃGLb],{type:"text/css"}),this.ǃGLk=URL.createObjectURL(this.ǃGLT),ǃG.ǃcgi(this.ǃGLk).then(te=>{return this.ǃGL$=te,this.ǃGL$.setAttribute("data-comment","webfont-"+this.ǃclE),document.fonts.load("1em '"+this.ǃclE+"'")}).then(()=>{return ǃG.ǃjk.ǃGLA(this),this})}ǃz(){this.ǃcle.ǃGLL(this),this.ǃcle=null;for(let te of this.ǃGLX)URL.revokeObjectURL(te);ǃG.ǃGs(this.ǃGLX),this.ǃGLk&&(URL.revokeObjectURL(this.ǃGLk),this.ǃGLk=""),this.ǃGLT=null,ǃG.ǃGD.ǃjE(this.ǃGL$),this.ǃGL$=null}},"use strict";{const _327="application/font-woff";class ee extends ǃG.Event.ǃpF{constructor(){super(),this.ǃGL_=new Map}ǃGLt(te,ne){if(ǃG.ǃbv(te),ǃG.ǃkF(ne),this.ǃGL_.has(te.toLowerCase()))return Promise.resolve(this.ǃGL_.get(te.toLowerCase()));let ie=ǃG.ǃX(ǃG.ǃGLR,this,te);ne=this.ǃGLP(ne);for(let me=0,ae=ne.length,de;me{ǃG.ǃGD.ǃGLE.ǃGLd()}),ǃG.ǃGD.ǃE$.addEventListener("hidemodal",()=>{ǃG.ǃGD.ǃGLE.ǃz()}),ǃG.ǃGD.ǃGLE=class{constructor(){}static ǃz(){for(let te of this.ǃGLe.values()){for(let ne of te)ne.ǃND(!1);ǃG.ǃGs(te)}}static ǃGLp(te){ǃG.ǃg(te,ǃG.ǃGD.Notification);let ne=this.ǃGLe.get(te.ǃGLf());ne.unshift(te);for(let ie=0;ie=this.ǃGLB+1){let ie=ne[ne.length-1];this.ǃGLW(ie),ie.ǃG$d()}}static ǃGLu(te){ǃG.ǃg(te,ǃG.ǃGD.Notification),this.ǃGLW(te)}static ǃGLU(te){ǃG.ǃg(te,ǃG.ǃGD.Notification);let ne=this.ǃGLe.get(te.ǃGLf());for(let ie=0,me;iethis.ǃGLn(),this.ǃGLM=()=>this.ǃGLC(),this.ǃGLh=()=>this.ǃGLY(),this.ǃGLz=()=>this.ǃG$d(),this.ǃGLF=ue=>this.ǃGLl(ue),this.ǃGLw=ue=>this.ǃGLo(ue),this.ǃUk=ǃG.ǃGD.ǃXK("ui-notification"),this.ǃGLH=ǃG.ǃGD.ǃE$.ǃcwS(),this.ǃGLH?(this.ǃGLH.ǃGL().appendChild(this.ǃUk),this.ǃGLH.addEventListener(_335,this.ǃGLK),this.ǃGLH.addEventListener("widthchange",this.ǃGLK),this.ǃGLH.addEventListener("heightchange",this.ǃGLK),this.ǃGLH.addEventListener(_333,this.ǃGLh),this.ǃGLH.addEventListener(_337,this.ǃGLM),this.ǃGLH.addEventListener(_334,this.ǃGLh),this.ǃGLH.addEventListener(_338,this.ǃGLM)):(document.body.appendChild(this.ǃUk),this.ǃUk.setAttribute("document-parent","")),this.ǃUk.setAttribute("align",this.ǃG$p),this.ǃUk.style.transitionDuration=oe.duration,this.ǃG$B=ǃG.ǃGD.ǃXK("ui-notification-icon",this.ǃUk),this.ǃG$W=ǃG.ǃGD.ǃXK("ui-notification-text",this.ǃUk),this.ǃcjO=ǃG.ǃX(ǃG.ǃGD.ǃmF,de),this.ǃG$B.appendChild(this.ǃcjO.ǃGL()),this.ǃcjD=ǃG.ǃGD.ǃXK("ui-notification-title",this.ǃG$W),this.ǃ$M=ǃG.ǃGD.ǃXK("ui-notification-body",this.ǃG$W),ǃG.ǃcmS(this.ǃcjD,this.ǃG$P),ǃG.ǃcmS(this.ǃ$M,this.ǃG$j),this.ǃhD=this.ǃUk.getBoundingClientRect().height,this.ǃGLI(),ǃG.ǃGD.ǃGLE.ǃGLp(this),app.ǃcPG()||(this.ǃUk.style.transition="none")}ǃND(de=!0){de=!!de,de&&ǃG.ǃGD.ǃGLE.ǃGLu(this),this.ǃGLH&&(this.ǃGLH.removeEventListener(_335,this.ǃGLK),this.ǃGLH.removeEventListener("widthchange",this.ǃGLK),this.ǃGLH.removeEventListener("heightchange",this.ǃGLK),this.ǃGLH.removeEventListener(_333,this.ǃGLh),this.ǃGLH.removeEventListener(_337,this.ǃGLM),this.ǃGLH.removeEventListener(_334,this.ǃGLh),this.ǃGLH.removeEventListener(_338,this.ǃGLM),this.ǃGLH=null,this.ǃGLK=null,this.ǃGLh=null,this.ǃGLM=null),this.ǃGAC(),this.ǃcjO&&this.ǃcjO.ǃz(),ǃG.ǃGD.ǃjE(this.ǃcjD),ǃG.ǃGD.ǃjE(this.ǃG$B),ǃG.ǃGD.ǃjE(this.ǃG$W),ǃG.ǃGD.ǃjE(this.ǃUk),this.ǃG$B=null,this.ǃG$W=null,this.ǃcjO=null,this.ǃcjD=null,this.ǃ$M=null,this.ǃUk=null,ǃG.ǃz(this)}ǃGLf(){return this.ǃG$p}ǃGLx(){return this.ǃG$e}ǃGLa(){return this.ǃhD+5}ǃGLy(de){ǃG.ǃTH(de),de>=ǃG.ǃGD.ǃGLE.ǃGLB-1&&(de=ǃG.ǃGD.ǃGLE.ǃGLB-1);this.ǃGLg===de||(this.ǃGLg=de,this.ǃGLn())}ǃGLI(){this.ǃGLn(),this.ǃUk.setAttribute("showing",this.ǃG$p),app.ǃcPG()?this.ǃUk.addEventListener(_332,this.ǃGLF):ǃG.ǃGD.ǃGLE.ǃGLU(this)}ǃGLl(de){"transform"!==de.propertyName||(this.ǃUk.removeEventListener(_332,this.ǃGLF),ǃG.ǃGD.ǃGLE.ǃGLU(this))}ǃGLJ(){this.ǃGLN||(this.ǃGLN=!0,this.ǃUk.removeAttribute("showing"),(this.ǃG$p===_328||this.ǃG$p===_330)&&this.ǃUk.setAttribute("hiding-left",""),(this.ǃG$p===_329||this.ǃG$p===_331)&&this.ǃUk.setAttribute("hiding-right",""),app.ǃcPG()?this.ǃUk.addEventListener(_332,this.ǃGLw):this.ǃND())}ǃGLo(de){"transform"!==de.propertyName||(this.ǃUk.removeEventListener(_332,this.ǃGLw),this.ǃND())}ǃGAC(){clearTimeout(this.ǃG$f)}ǃGLv(){this.ǃG$f=setTimeout(this.ǃGLz,this.ǃG$e)}ǃGLZ(){this.ǃUk.setAttribute("no-position-transitions","")}ǃGLY(){this.ǃUk.setAttribute(_336,"")}ǃGLC(){this.ǃUk.removeAttribute(_336)}ǃGLS(){return!this.ǃUk.hasAttribute(_336)}ǃG$d(){this.ǃGAC(),this.ǃGLS()||(this.ǃGLC(),this.ǃGLZ()),this.ǃGLJ()}ǃGLn(){let de=this.ǃUk.style,re=ǃG.ǃGD.ǃGLE.ǃGLq(this);if(this.ǃGLH&&!this.ǃGLH.ǃcHM()){let Ge=this.ǃUk.ownerDocument,oe=Ge.defaultView,le=oe.innerWidth||Ge.documentElement.clientWidth||Ge.body.clientWidth,ue=oe.innerHeight||Ge.documentElement.clientHeight||Ge.body.clientHeight,pe=this.ǃGLH.ǃcIg(),ge=this.ǃGLH.ǃcIN(),he=le-(pe+this.ǃGLH.ǃcE()),ve=ue-(ge+this.ǃGLH.ǃce());this.ǃG$p===_328?(de.left=`${-pe}px`,de.top=`${-ge+re}px`):this.ǃG$p===_329?(de.right=`${-he}px`,de.top=`${-ge+re}px`):this.ǃG$p===_330?(de.left=`${-pe}px`,de.bottom=`${-ve+re}px`):this.ǃG$p===_331&&(de.right=`${-he}px`,de.bottom=`${-ve+re}px`)}else this.ǃG$p===_328?(de.left=`${0}px`,de.top=`${re}px`):this.ǃG$p===_329?(de.right=`${0}px`,de.top=`${re}px`):this.ǃG$p===_330?(de.left=`${0}px`,de.bottom=`${re}px`):this.ǃG$p===_331&&(de.right=`${0}px`,de.bottom=`${re}px`)}static ǃm$(de,re,Ge,oe){app.ǃGLs()&&ǃG.ǃX(ǃG.ǃGD.Notification,de,re,Ge,oe,me)}}}{const _339="ui-loader-message",ee=ǃG.ǃc(),te=ee.getElementById("ui-loader-template");ǃG.ǃGD.ǃoM=class{constructor(me){ǃG.ǃmL(me,HTMLElement),this.ǃGLO=document.createElement("ui-loader");const ae=te.content.cloneNode(!0);this.ǃGLO.appendChild(ae),me&&me.appendChild(this.ǃGLO)}ǃGZ(me){me?this.ǃGLO.removeAttribute("hidden",""):this.ǃGLO.setAttribute("hidden","")}ǃoY(){this.ǃGLO.setAttribute("pause","")}ǃGLQ(){this.ǃGLO.removeAttribute("pause")}get ǃoC(){return this.ǃGLO.getElementsByTagName(_339)[0].innerHTML}set ǃoC(me){this.ǃGLO.getElementsByTagName(_339)[0].innerHTML=me}remove(){this.ǃGLO.remove()}}}"use strict",ǃG.ǃDk=ǃG.ǃX(ǃG.Event.ǃpF),ǃG.ǃG_c=class{constructor(te,ne,ie){if(ǃG.ǃbv(te),ǃG.ǃD_(ne),ǃG.ǃcam(ie,"#document"),ie===document)throw new Error("component cannot reference main document");this.ǃcCQ=te,this.ǃG_G=ne,this.ǃG_m=ie,this.ǃG_D=ie.documentURI}ǃz(){this.ǃcCQ=null,this.ǃG_G=null,this.ǃG_m=null,this.ǃG_D=null}ǃEK(){return this.ǃcCQ}ǃDV(){return this.ǃG_G}ǃc(){return this.ǃG_m}ǃG_i(){return this.ǃG_D}},"use strict";{const _340="preview-debug",_341="loop-condition",_342="instance-variable",_343="trigger-condition",ee="c3-user-settings",ne=["account","account-login","account-logout","account-register","add","add-folder","addon","align-bottom","align-top","align-left","align-vcenter","align-hcenter","align-right","align-edge-left","align-edge-top","align-edge-right","align-edge-bottom","ambiguous","animation","array","arrow-pointer","audio","back","bar","bookmark","breakpoint","breakpoint-active-left","breakpoint-active-right","brush","bucket","build","check","clear","cloud","close","closed-folder","code","collapsed","color","copy","crop","cross","cut","debug","delete","delete-all","delete-column","delete-row","dictionary","disabled","dot","download","dpad","dropbox","duplicate","edit","ellipse","eraser","error","event-comment","event-sheet","exit-fullscreen","expanded","export","external","eye-dropper","file","font","frame","fullscreen","generic-file","globe","global-variable","google-drive","goto","grid","hand","help","home","html","image","import","import-files","insert-row-before","insert-row-after","insert-column-before","insert-column-after",_342,"info","invisible","javascript","json","language","layers","layout","line","link","local-variable","location-pin","locked",_341,"menu-submenu","mirror-h","mirror-v","move-down","move-up","new","offline","onedrive","open","open-folder","open-popup","origin","paste","pause","play","polygon","preview",_340,"print","rectangle","rectangle-select","redo","reload","remove","replace","resize","reverse","rotate-acw","rotate-cw","save","scirra-store","scroll","search","security-shield","select-all","send-to-back","send-to-front","settings","sound","space-horiz","space-vert","statistics","style","thumbnail","timer","toggle-background","tools","touch",_343,"undo","unlocked","update","video","videogame","view","visible","warning","xml","z-order","zoom-in","zoom-out","zoom-reset",{name:"effect",color:"#590094"},{name:"family-overlay",color:"#F05300"},{name:"image-point",color:"#FF0000"},{name:"invert",color:"#FF0000"},{ǃG_R:"origin",name:"origin-cursor",color:"#FFFFFF"},{ǃG_R:"image-point",name:"image-point-cursor",color:"#00FFFF"}],ie=new Set(["save","undo","redo","preview",_340,"menu-submenu","account"]),me=new Set(["animation","event-sheet",_342,"layout",_341,_343]),ae=new Set(["effect"]),de=!!window.C3_IsPopupWindow;let re=!1;ǃG.ǃcov=class extends ǃG.Event.ǃpF{constructor(){if(super(),re)throw new Error("only one C3.App should be instantiated");re=!0,this.ǃclE="MyApp",this.ǃG_b=new Map,this.ǃG_T=de,this.ǃG_k=null,this.ǃG_X={},"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{this.ǃG_$=Math.round(1.54*ǃG.ǃGD.ǃIv()),this.ǃG_r=2*this.ǃG_$,this.ǃG_V=2*this.ǃG_r}):(this.ǃG_$=Math.round(1.54*ǃG.ǃGD.ǃIv()),this.ǃG_r=2*this.ǃG_$,this.ǃG_V=2*this.ǃG_r),this.ǃG_A=new Map,this.ǃG_L=new Map,window.addEventListener("beforeunload",oe=>this.ǃG__(oe)),window.app=this}ǃG_t(){this.ǃG_T||(this.ǃG_k=ǃG.ǃX(ǃG.ǃGD.ǃGm,"main",!1),ǃG.ǃDP?this.ǃG_P():this.ǃG_k.ǃcxs(!0))}ǃG_P(){C3_HideLoader(),ǃG.ǃGD.ǃclq("supportMessage"),ǃG.ǃGD.ǃcla("noscript"),ǃG.ǃGD.ǃcla("script[src$='supportCheck.js']"),ǃG.ǃGD.ǃcla("script[src$='es2015check.js']"),ǃG.ǃDP||this.ǃG_k.ǃcxs(!1)}ǃcu(){return this.ǃclE}ǃcln(){return this.ǃG_k}ǃGP(){return this.ǃG_$}ǃXz(){return this.ǃG_r}ǃXF(){return this.ǃG_V}ǃGif(oe){switch(ǃG.ǃbv(oe),oe){case"small":return this.ǃG_$;case"medium":return this.ǃG_r;case"large":return this.ǃG_V;default:throw new Error("invalid icon size specifier");}}ǃcHM(){return this.ǃG_T}ǃG_j(){let oe=new ǃG.Event("load");return oe.app=this,oe.ǃDX=this.ǃG_T,ǃG.ǃDk.ǃchf(oe)}ǃDr(oe){return ǃG.ǃbv(oe),this.ǃG_b.get(oe)}ǃG_d(oe){return ǃG.ǃbv(oe),this.ǃG_b.has(oe)}ǃ$u(oe,le,ue){if(ǃG.ǃbv(oe),ǃG.ǃD_(le),ǃG.ǃcam(ue,"#document"),ue===document)throw new Error("cannot register component with main document");if(this.ǃG_d(oe))throw new Error(`component id '${oe}' already registered`);let pe=ǃG.ǃX(ǃG.ǃG_c,oe,le,ue);this.ǃG_b.set(oe,pe);let ge=new ǃG.Event("registercomponent");ge.app=this,ge.ǃG_E=pe,ǃG.ǃDk.dispatchEvent(ge)}ǃG_e(oe){if(ǃG.ǃbv(oe),!this.ǃG_d(oe))throw new Error(`component id '${oe}' is not registered`);let le=this.ǃG_b.get(oe),ue=new ǃG.Event("unregistercomponent");ue.app=this,ue.ǃG_E=le,ǃG.ǃDk.dispatchEvent(ue),le.ǃz(),this.ǃG_b.delete(oe)}ǃHS(oe){const le=this.ǃDr(oe);return le?le.ǃDV():null}ǃG_p(){return{}}ǃG_f(){return localforage.getItem(ee).then(oe=>{return this.ǃG_X=Object.assign({},this.ǃG_p(),oe),this.ǃG_X})}ǃbl(){return this.ǃG_X}ǃG_y(){return localforage.setItem(ee,this.ǃG_X)}ǃG_B(oe){ǃG.ǃbv(oe);let le=new ǃG.Event(oe);le.ǃG$D=this.ǃG_X,this.dispatchEvent(le)}ǃcPG(){return!0}ǃyO(){return!0}ǃG_W(){let oe=document.body.parentElement,le=this.ǃyO()?"highgfxmode":"lowgfxmode",ue=this.ǃyO()?"lowgfxmode":"highgfxmode";oe.removeAttribute(ue),oe.setAttribute(le,"")}ǃG_u(){this.ǃG_W(),ǃG.ǃcvg();const oe=[];for(const le of ie)oe.push(this.ǃG_A.get(le).ǃcv());return Promise.all(oe)}ǃG_U(){const oe=[];for(const[le,ue]of this.ǃG_A.entries())ie.has(le)||oe.push(ue.ǃcv());return Promise.all(oe)}ǃG_v(){let oe=ǃG.ǃGD.ǃcwc.ǃcwm();for(let le of ne){let ue,pe=null,ge=null;"object"==typeof le?(ue=le.name,pe=le.color,ge=le.ǃG_R):(ue=le,me.has(le)&&(pe="#398C00"));let he=ge?ge:ue,ve=ǃG.ǃX(ǃG.ǃGD.ǃcOU,this,`${oe}${he}.svg`,{name:ue,color:pe});this.ǃG_A.set(ue,ve)}}ǃml(oe){ǃG.ǃbv(oe);let le=this.ǃG_A.get(oe);if(le)return le.ǃmy();throw new Error(`common small icon '${oe}' not found`)}ǃ$y(oe){ǃG.ǃbv(oe);let le=this.ǃG_A.get(oe);if(le)return le.ǃGcD();throw new Error(`common medium icon '${oe}' not found`)}ǃ$W(oe){ǃG.ǃbv(oe);let le=this.ǃG_A.get(oe);if(le)return le.ǃGci();throw new Error(`common large icon '${oe}' not found`)}ǃG_q(oe,le){switch(ǃG.ǃbv(oe),ǃG.ǃbv(le),le){case"small":return this.ǃml(oe);case"medium":return this.ǃ$y(oe);case"large":return this.ǃ$W(oe);default:throw new Error("invalid icon size");}}ǃGVN(oe,le){return ǃG.ǃbv(oe),ǃG.ǃTH(le),le<=this.ǃGP()?this.ǃml(oe):le<=this.ǃXz()?this.ǃ$y(oe):this.ǃ$W(oe)}ǃcQQ(oe){let le=ǃG.ǃGD.ǃcwc.ǃcwm();if(oe.startsWith(le)){let ue=ǃG.ǃcaE(oe).toLowerCase();return ǃG.ǃGD.ǃcwc.ǃcwD().then(pe=>{return pe.hasOwnProperty(ue)?pe[ue]:ǃG.ǃTK(oe)})}return ǃG.ǃTK(oe)}ǃGVV(oe){return ǃG.ǃbv(oe),this.ǃG_A.get(oe)||null}ǃIY(oe){if(ǃG.ǃbv(oe),this.ǃG_L.has(oe))return this.ǃG_L.get(oe);let le=``,ue=new Blob([le],{type:"image/svg+xml"}),pe=URL.createObjectURL(ue),ge=ǃG.ǃX(ǃG.ǃGD.ǃcOU,app,pe,{});return this.ǃG_L.set(oe,ge),ge}ǃG_a(){return this.ǃG_A.values()}ǃG__(){}}}"use strict",ǃG.ǃcA={},"use strict";{function ee(ne,ie){return ne[0]===ie[0]&&ne[1]===ie[1]&&ne[2]===ie[2]&&ne[3]===ie[3]&&ne[4]===ie[4]&&ne[5]===ie[5]&&ne[6]===ie[6]&&ne[7]===ie[7]&&ne[8]===ie[8]&&ne[9]===ie[9]&&ne[10]===ie[10]&&ne[11]===ie[11]&&ne[12]===ie[12]&&ne[13]===ie[13]&&ne[14]===ie[14]&&ne[15]===ie[15]}function te(ne,ie){return ne[0]===ie[0]&&ne[1]===ie[1]&&ne[2]===ie[2]&&ne[3]===ie[3]}const _344="\tvTex = aTex;",_345="void main(void) {",_346="uniform highp mat4 matP;",_347="uniform lowp vec4 color;",_348="uniform highp mat4 matMV;",_349="varying mediump vec2 vTex;",_350="attribute mediump vec2 aTex;",_351="uniform lowp sampler2D samplerFront;";ǃG.ǃcA.ǃG_g=class{constructor(ie,me,ae,de,re,Ge){this.ǃG_N=ie,this.ǃjz=me,this.ǃG_K=ae,this.name=re,this.index=Ge,this.ǃG_n=ie.getAttribLocation(ae,"aPos"),this.ǃG_M=ie.getAttribLocation(ae,"aTex"),this.ǃG_C=ie.getAttribLocation(ae,"aPoints"),-1!==this.ǃG_n&&(ie.bindBuffer(ie.ARRAY_BUFFER,this.ǃjz.ǃG_h),ie.vertexAttribPointer(this.ǃG_n,2,ie.FLOAT,!1,0,0),ie.enableVertexAttribArray(this.ǃG_n)),-1!==this.ǃG_M&&(ie.bindBuffer(ie.ARRAY_BUFFER,this.ǃjz.ǃG_Y),ie.vertexAttribPointer(this.ǃG_M,2,ie.FLOAT,!1,0,0),ie.enableVertexAttribArray(this.ǃG_M)),-1!==this.ǃG_C&&(ie.bindBuffer(ie.ARRAY_BUFFER,this.ǃjz.ǃG_z),ie.vertexAttribPointer(this.ǃG_C,4,ie.FLOAT,!1,0,0),ie.enableVertexAttribArray(this.ǃG_C)),ie.bindBuffer(ie.ARRAY_BUFFER,null),this.ǃG_F=ie.getUniformLocation(ae,"matP"),this.ǃG_l=ie.getUniformLocation(ae,"matMV"),this.ǃG_w=ie.getUniformLocation(ae,"opacity"),this.ǃG_o=ie.getUniformLocation(ae,"color"),this.ǃG_H=ie.getUniformLocation(ae,"samplerFront"),this.ǃG_I=ie.getUniformLocation(ae,"pointTexStart"),this.ǃG_x=ie.getUniformLocation(ae,"pointTexEnd"),this.ǃG_J=ie.getUniformLocation(ae,"samplerBack"),this.ǃG_Z=ie.getUniformLocation(ae,"destStart"),this.ǃG_S=ie.getUniformLocation(ae,"destEnd"),this.ǃG_s=ie.getUniformLocation(ae,"srcStart"),this.ǃG_O=ie.getUniformLocation(ae,"srcEnd"),this.ǃG_Q=ie.getUniformLocation(ae,"seconds"),this.ǃGtc=ie.getUniformLocation(ae,"pixelWidth"),this.ǃGtG=ie.getUniformLocation(ae,"pixelHeight"),this.ǃGtm=ie.getUniformLocation(ae,"layerScale"),this.ǃGtD=ie.getUniformLocation(ae,"layerAngle"),this.ǃGti=ie.getUniformLocation(ae,"viewStart"),this.ǃGtR=ie.getUniformLocation(ae,"viewEnd"),this.ǃGtb=ie.getUniformLocation(ae,"layoutStart"),this.ǃGtT=ie.getUniformLocation(ae,"layoutEnd"),this.ǃGtk=!!(this.ǃGtc||this.ǃGtG||this.ǃG_Q||this.ǃG_J||this.ǃG_Z||this.ǃG_S||this.ǃG_s||this.ǃG_O||this.ǃGtm||this.ǃGtD||this.ǃGti||this.ǃGtR||this.ǃGtb||this.ǃGtT),this.ǃGtX=de.ǃGtX||0,this.ǃGt$=de.ǃGt$||0,this.ǃGtr=!!de.ǃGtr,this.ǃGtV=!!de.ǃGtV,this.ǃGtA=!!de.ǃGtA,this.ǃc_L=de.ǃc_L||[],this.ǃGtL=-999,this.ǃGt_=-999,this.ǃGtt=vec4.ǃcEp(1,1,1,1),this.ǃGtP=0,this.ǃGtj=0,this.ǃGtd=1,this.ǃGtE=1,this.ǃGte=0,this.ǃGtp=0,this.ǃGtf=1,this.ǃGty=1,this.ǃGtB=0,this.ǃGtW=0,this.ǃGtu=0,this.ǃGtU=0,this.ǃGtv=1,this.ǃGtq=0,this.ǃGta=0,this.ǃGtg=0,this.ǃGtN=0,this.ǃGtK=0,this.ǃGtn=0,this.ǃGtM=0,this.ǃGtC=0,this.ǃGth=0,this.ǃGtY=0,this.ǃGtz=[],this.ǃGtF=mat4.create(),this.ǃGtl=!1,this.ǃG_w&&ie.uniform1f(this.ǃG_w,1),this.ǃG_o&&ie.uniform4f(this.ǃG_o,1,1,1,1),this.ǃG_H&&ie.uniform1i(this.ǃG_H,0),this.ǃG_J&&ie.uniform1i(this.ǃG_J,1),this.ǃG_I&&ie.uniform2f(this.ǃG_I,0,0),this.ǃG_x&&ie.uniform2f(this.ǃG_x,1,1),this.ǃG_Z&&ie.uniform2f(this.ǃG_Z,0,0),this.ǃG_S&&ie.uniform2f(this.ǃG_S,1,1),this.ǃG_s&&ie.uniform2f(this.ǃG_s,0,0),this.ǃG_O&&ie.uniform2f(this.ǃG_O,0,0),this.ǃGtm&&ie.uniform1f(this.ǃGtm,1),this.ǃGtD&&ie.uniform1f(this.ǃGtD,0),this.ǃGti&&ie.uniform2f(this.ǃGti,0,0),this.ǃGtR&&ie.uniform2f(this.ǃGtR,0,0),this.ǃGtb&&ie.uniform2f(this.ǃGtb,0,0),this.ǃGtT&&ie.uniform2f(this.ǃGtT,0,0);for(let oe=0,le=this.ǃc_L.length,ue;oe=this.ǃhm||0>=this.ǃhD)throw new Error("invalid texture data size");if(re.ǃcN){let ge=document.createElement("canvas");ge.width=this.ǃhm,ge.height=this.ǃhD;let he=ge.getContext("2d");he.drawImage(de,0,0,this.ǃhm,this.ǃhD),de=ge}let Ge=ǃG.ǃcgF(this.ǃhm)&&ǃG.ǃcgF(this.ǃhD),oe=this.ǃYU.ǃGPx();if(this.ǃhm>oe||this.ǃhD>oe)throw new Error("texture data exceeds maximum texture size");let le=this.ǃYU.ǃvv(),ue=this.ǃYU.ǃGPJ();this.ǃYE=le.createTexture(),le.bindTexture(le.TEXTURE_2D,this.ǃYE),re.ǃGPM&&le.pixelStorei(le.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0);let pe=ee(this.ǃGPl,le);if(!this.ǃYU.ǃdm()&&!Ge&&this.ǃGPY){if(null===de)throw new Error("cannot pass null data when creating a NPOT tiled texture without NPOT support");if(de instanceof ArrayBuffer&&(de=new ImageData(new Uint8ClampedArray(de),this.ǃhm,this.ǃhD)),de instanceof ImageData){let ve=document.createElement("canvas");ve.width=this.ǃhm,ve.height=this.ǃhD;let be=ve.getContext("2d");be.putImageData(de,0,0),de=ve}let ge=document.createElement("canvas");ge.width=ǃG.ǃcj(this.ǃhm),ge.height=ǃG.ǃcj(this.ǃhD);let he=ge.getContext("2d");he.imageSmoothingEnabled=this.ǃGPF,he.drawImage(de,0,0,this.ǃhm,this.ǃhD,0,0,ge.width,ge.height),le.texImage2D(le.TEXTURE_2D,0,pe.ǃGPN,pe.format,pe.type,ge)}else if(2<=ue){let ge;ge=this.ǃGPw?Math.floor(Math.log2(Math.max(this.ǃhm,this.ǃhD))+1):1,le.texStorage2D(le.TEXTURE_2D,ge,pe.ǃGPg,this.ǃhm,this.ǃhD),de instanceof ArrayBuffer?le.texSubImage2D(le.TEXTURE_2D,0,0,0,this.ǃhm,this.ǃhD,pe.format,pe.type,new Uint8Array(de)):null!==de&&le.texSubImage2D(le.TEXTURE_2D,0,0,0,pe.format,pe.type,de)}else de instanceof ArrayBuffer?le.texImage2D(le.TEXTURE_2D,0,pe.ǃGPN,this.ǃhm,this.ǃhD,0,pe.format,pe.type,new Uint8Array(de)):null===de?le.texImage2D(le.TEXTURE_2D,0,pe.ǃGPN,this.ǃhm,this.ǃhD,0,pe.format,pe.type,null):le.texImage2D(le.TEXTURE_2D,0,pe.ǃGPN,pe.format,pe.type,de);null!==de&&this.ǃGPZ(le),le.bindTexture(le.TEXTURE_2D,null),this.ǃYU.ǃGPS(),this.ǃGPH=1,me.add(this)}ǃGPs(de,re){ǃG.ǃg(de,ArrayBuffer),ǃG.ǃTH(re);let Ge=de.byteLength;if(Ge!==4*(this.ǃhm*this.ǃhD))throw new Error(_357);this.ǃGPC=!0;let oe=this.ǃYU.ǃvv(),le=ee(this.ǃGPl,oe),ue=4*this.ǃhm;re=Math.floor(re/ue)*ue,assert(0Ge&&(Ee=Ge-be,ye=Ee/ue),he.push(ǃG.ǃckO(()=>this.ǃGPO(oe,de,le,be,Ee,De,ye)))}return Promise.all(he).then(()=>{return this.ǃYE?(this.ǃYU.ǃGPQ(),oe.bindTexture(oe.TEXTURE_2D,this.ǃYE),this.ǃGPZ(oe),oe.bindTexture(oe.TEXTURE_2D,null),this.ǃYU.ǃGPS(),this.ǃGPC=!1,this):null})}ǃGPO(de,re,Ge,oe,le,ue,pe){this.ǃYE&&(this.ǃYU.ǃGPQ(),de.bindTexture(de.TEXTURE_2D,this.ǃYE),de.texSubImage2D(de.TEXTURE_2D,0,0,ue,this.ǃhm,pe,Ge.format,Ge.type,new Uint8Array(re,oe,le)),de.bindTexture(de.TEXTURE_2D,null),this.ǃYU.ǃGPS())}ǃGjc(){return this.ǃGPC}ǃGjG(de,re,Ge){if(ǃG.ǃTH(de),ǃG.ǃTH(re),ǃG.ǃcDt(Ge),Ge=Object.assign({},ie,Ge),this.ǃYE)throw new Error(_358);if(ǃG.ǃbv(Ge.ǃYM),ǃG.ǃbv(Ge.ǃGPK),this.ǃGPY=!!Ge.ǃdi,this.ǃGPz=Ge.ǃYM,this.ǃGPF=!!Ge.ǃdb,this.ǃGPl=Ge.ǃGPK,this.ǃGPw=!!Ge.ǃdR,!te.has(this.ǃGPl))throw new Error(_354);this.ǃGPh=!1,this.ǃhm=Math.floor(de),this.ǃhD=Math.floor(re);let oe=ǃG.ǃcgF(this.ǃhm)&&ǃG.ǃcgF(this.ǃhD),le=this.ǃYU.ǃGPx();if(0>=this.ǃhm||0>=this.ǃhD)throw new Error("invalid texture size");if(this.ǃhm>le||this.ǃhD>le)throw new Error("texture exceeds maximum texture size");if(!this.ǃYU.ǃdm()&&this.ǃGPY&&!oe)throw new Error(_359);let ue=this.ǃYU.ǃvv(),pe=this.ǃYU.ǃGPJ();this.ǃYE=ue.createTexture(),ue.bindTexture(ue.TEXTURE_2D,this.ǃYE),ue.pixelStorei(ue.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0);let ge=ee(this.ǃGPl,ue),he=2<=pe?ge.ǃGPg:ge.ǃGPN;ue.texImage2D(ue.TEXTURE_2D,0,he,this.ǃhm,this.ǃhD,0,ge.format,ge.type,null),this.ǃGPZ(ue),ue.bindTexture(ue.TEXTURE_2D,null),this.ǃYU.ǃGPS(),this.ǃGPH=1,me.add(this)}ǃGjm(de){if(this.ǃGPo===_353)return this.ǃGPh?de.NICEST:de.FASTEST;if("low"===this.ǃGPo)return de.FASTEST;if("high"===this.ǃGPo)return de.NICEST;throw new Error(_355)}ǃGPZ(de){let re=ǃG.ǃcgF(this.ǃhm)&&ǃG.ǃcgF(this.ǃhD);if(!this.ǃGPY)de.texParameteri(de.TEXTURE_2D,de.TEXTURE_WRAP_S,de.CLAMP_TO_EDGE),de.texParameteri(de.TEXTURE_2D,de.TEXTURE_WRAP_T,de.CLAMP_TO_EDGE);else if("repeat-x"===this.ǃGPz)de.texParameteri(de.TEXTURE_2D,de.TEXTURE_WRAP_S,de.REPEAT),de.texParameteri(de.TEXTURE_2D,de.TEXTURE_WRAP_T,de.CLAMP_TO_EDGE);else if("repeat-y"===this.ǃGPz)de.texParameteri(de.TEXTURE_2D,de.TEXTURE_WRAP_S,de.CLAMP_TO_EDGE),de.texParameteri(de.TEXTURE_2D,de.TEXTURE_WRAP_T,de.REPEAT);else if("repeat"===this.ǃGPz)de.texParameteri(de.TEXTURE_2D,de.TEXTURE_WRAP_S,de.REPEAT),de.texParameteri(de.TEXTURE_2D,de.TEXTURE_WRAP_T,de.REPEAT);else throw new Error("invalid tile type");this.ǃGPF?(de.texParameteri(de.TEXTURE_2D,de.TEXTURE_MAG_FILTER,de.LINEAR),(re||this.ǃYU.ǃdm())&&this.ǃGPw?(de.hint(de.GENERATE_MIPMAP_HINT,this.ǃGjm(de)),de.generateMipmap(de.TEXTURE_2D),de.texParameteri(de.TEXTURE_2D,de.TEXTURE_MIN_FILTER,de.LINEAR_MIPMAP_LINEAR)):(de.texParameteri(de.TEXTURE_2D,de.TEXTURE_MIN_FILTER,de.LINEAR),this.ǃGPw=!1)):(de.texParameteri(de.TEXTURE_2D,de.TEXTURE_MAG_FILTER,de.NEAREST),de.texParameteri(de.TEXTURE_2D,de.TEXTURE_MIN_FILTER,de.NEAREST),this.ǃGPw=!1)}ǃGjD(de){if(!(de instanceof HTMLImageElement)&&!(de instanceof HTMLCanvasElement)&&!(de instanceof ImageData)&&!(de instanceof ImageBitmap))throw new Error(_356);if(!this.ǃYE||0>=this.ǃGPH)throw new Error("texture not created");if(this.ǃGPh)throw new Error("cannot update static texture");let re=de.width,Ge=de.height,oe=this.ǃYU.ǃGPJ(),le=this.ǃYU.ǃvv();le.bindTexture(le.TEXTURE_2D,this.ǃYE),le.pixelStorei(le.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0);let ue=ee(this.ǃGPl,le),pe=2<=oe?ue.ǃGPg:ue.ǃGPN;try{if(this.ǃhm===re&&this.ǃhD===Ge){let ge=ǃG.ǃcgF(this.ǃhm)&&ǃG.ǃcgF(this.ǃhD);le.texSubImage2D(le.TEXTURE_2D,0,0,0,ue.format,ue.type,de),(ge||this.ǃYU.ǃdm())&&this.ǃGPw&&(le.hint(le.GENERATE_MIPMAP_HINT,this.ǃGjm(le)),le.generateMipmap(le.TEXTURE_2D))}else{this.ǃhm=re,this.ǃhD=Ge;let ge=ǃG.ǃcgF(this.ǃhm)&&ǃG.ǃcgF(this.ǃhD);if(!this.ǃYU.ǃdm()&&this.ǃGPY&&!ge)throw new Error(_359);le.texImage2D(le.TEXTURE_2D,0,pe,ue.format,ue.type,de),(ge||this.ǃYU.ǃdm())&&this.ǃGPw&&(le.hint(le.GENERATE_MIPMAP_HINT,this.ǃGjm(le)),le.generateMipmap(le.TEXTURE_2D))}}catch(ge){console.error("Error updating WebGL texture: ",ge)}le.bindTexture(le.TEXTURE_2D,null),this.ǃYU.ǃGPS()}ǃGji(){if(0=this.ǃGPH)throw new Error("no more references");this.ǃGPH--}ǃGjk(){return this.ǃGPH}ǃcE(){return this.ǃhm}ǃce(){return this.ǃhD}ǃGjX(){return this.ǃGPh}ǃee(){let de=this.ǃhm*this.ǃhD;switch(this.ǃGPl){case _352:de*=4;break;case"rgb8":de*=3;break;case"rgba4":case"rgb5_a1":case"rgb565":de*=2;}return this.ǃGPw&&(de+=Math.floor(de/3)),de}static ǃF(){me.clear()}static ǃGj$(){return me.values()}}}{const _360="WebGLRenderTarget framebuffer is incomplete",ee={ǃdb:!0,alpha:!0,ǃGjr:!0};let te=new Set;ǃG.ǃcA.ǃpo=class{constructor(ie){ǃG.ǃg(ie,ǃG.ǃcA.ǃfG),this.ǃYU=ie,this.ǃGjV=null,this.ǃYE=null,this.ǃGjA=null,this.ǃhm=0,this.ǃhD=0,this.ǃGPF=!0,this.ǃGjL=!0,this.ǃGj_=!0}ǃHv(ie,me,ae){if(ǃG.ǃTH(ie),ǃG.ǃTH(me),ǃG.ǃcDt(ae),ae=Object.assign({},ee,ae),this.ǃYE||this.ǃGjA)throw new Error("already created render target");if(this.ǃGPF=!!ae.ǃdb,this.ǃGjL=!!ae.alpha,this.ǃGj_=!!ae.ǃGjr,2>this.ǃYU.ǃGPJ()&&(this.ǃGj_=!0),this.ǃhm=ie,this.ǃhD=me,0>=this.ǃhm||0>=this.ǃhD)throw new Error("invalid render target size");let de=this.ǃYU.ǃvv();if(this.ǃGjV=de.createFramebuffer(),de.bindFramebuffer(de.FRAMEBUFFER,this.ǃGjV),this.ǃGj_){this.ǃYE=this.ǃYU.ǃdD(this.ǃhm,this.ǃhD,{ǃdb:this.ǃGPF,ǃGPK:this.ǃGjL?"rgba8":"rgb8",ǃdR:!1});let re=this.ǃYE.ǃGjR();de.framebufferTexture2D(de.FRAMEBUFFER,de.COLOR_ATTACHMENT0,de.TEXTURE_2D,re,0)}else this.ǃGjA=de.ǃGjt(),de.bindRenderbuffer(de.RENDERBUFFER,this.ǃGjA),de.renderbufferStorage(de.RENDERBUFFER,this.ǃGjL?de.RGBA8:de.RGB8,this.ǃhm,this.ǃhD),de.framebufferRenderbuffer(de.FRAMEBUFFER,de.COLOR_ATTACHMENT0,de.RENDERBUFFER,this.ǃGjA),de.bindRenderbuffer(de.RENDERBUFFER,null);assert(de.checkFramebufferStatus(de.FRAMEBUFFER)===de.FRAMEBUFFER_COMPLETE,_360),de.bindFramebuffer(de.FRAMEBUFFER,null),te.add(this)}ǃGjP(ie,me){this.ǃhm=ie,this.ǃhD=me;let ae=this.ǃYU.ǃvv();ae.bindFramebuffer(ae.FRAMEBUFFER,this.ǃGjV),this.ǃYE?this.ǃYE.ǃGjD(new ImageData(this.ǃhm,this.ǃhD)):(ae.bindRenderbuffer(ae.RENDERBUFFER,this.ǃGjA),ae.renderbufferStorage(ae.RENDERBUFFER,this.ǃGjL?ae.RGBA8:ae.RGB8,this.ǃhm,this.ǃhD),ae.bindRenderbuffer(ae.RENDERBUFFER,null)),assert(ae.checkFramebufferStatus(ae.FRAMEBUFFER)===ae.FRAMEBUFFER_COMPLETE,_360),ae.bindFramebuffer(ae.FRAMEBUFFER,null)}ǃGji(){if(!this.ǃYE&&!this.ǃGjA)throw new Error("already deleted render target");te.delete(this);let ie=this.ǃYU.ǃvv();ie.bindFramebuffer(ie.FRAMEBUFFER,this.ǃGjV),this.ǃYE?(ie.framebufferTexture2D(ie.FRAMEBUFFER,ie.COLOR_ATTACHMENT0,ie.TEXTURE_2D,null,0),this.ǃYU.ǃjP(this.ǃYE),this.ǃYE=null):this.ǃGjA&&(ie.framebufferRenderbuffer(ie.FRAMEBUFFER,ie.COLOR_ATTACHMENT0,ie.RENDERBUFFER,null),ie.deleteRenderbuffer(this.ǃGjA),this.ǃGjA=null),ie.bindFramebuffer(ie.FRAMEBUFFER,null),ie.deleteFramebuffer(this.ǃGjV),this.ǃYU.ǃGPE=null,this.ǃGjV=null}ǃGPd(){return this.ǃGjV}ǃcD(){return this.ǃYE}ǃfQ(){return this.ǃGPF}ǃciJ(){return{ǃdb:this.ǃGPF,alpha:this.ǃGjL,ǃGjr:this.ǃGj_}}ǃGPj(){return this.ǃYE?this.ǃYE.ǃGjR():null}ǃee(){return this.ǃYE?this.ǃYE.ǃee():this.ǃhm*this.ǃhD*(this.ǃGjL?4:3)}static ǃpw(ie,me){ie.ǃGPQ();let ae=ie.ǃf_(),de,re,Ge;me?(de=me.ǃhm,re=me.ǃhD,Ge=me.ǃGjV):(de=ie.ǃcE(),re=ie.ǃce(),Ge=null);let oe=ie.ǃvv();oe.bindFramebuffer(oe.FRAMEBUFFER,Ge);let le=new ImageData(de,re);oe.readPixels(0,0,de,re,oe.RGBA,oe.UNSIGNED_BYTE,new Uint8Array(le.data.buffer));let ue=ǃG.ǃcgE(le);return oe.bindFramebuffer(oe.FRAMEBUFFER,null),ie.ǃGjj=null,ie.ǃGPE=null,ie.ǃjw(ae),ue}static ǃF(){te.clear()}static ǃGjd(){return te.values()}static ǃGjE(ie,me){for(let ae of te)ae.ǃGjP(ie,me)}}}{function ee(_e,Pe){return _e[0]===Pe[0]&&_e[1]===Pe[1]&&_e[2]===Pe[2]&&_e[3]===Pe[3]&&_e[4]===Pe[4]&&_e[5]===Pe[5]&&_e[6]===Pe[6]&&_e[7]===Pe[7]&&_e[8]===Pe[8]&&_e[9]===Pe[9]&&_e[10]===Pe[10]&&_e[11]===Pe[11]&&_e[12]===Pe[12]&&_e[13]===Pe[13]&&_e[14]===Pe[14]&&_e[15]===Pe[15]}function te(_e,Pe){return _e[0]===Pe[0]&&_e[1]===Pe[1]&&_e[2]===Pe[2]&&_e[3]===Pe[3]}const _361="(unavailable)",_362="experimental-webgl",_363="WEBGL_lose_context not supported",_364="pushed too many line caps - check push/pop pairs",ne={ǃfS:"default"},ie=new Set(["default","low-power","high-performance"]),de=8e3,Ge=3*(de/2),oe=8e3;let pe=window.devicePixelRatio||1;const be=3,Te=7;const Ue=new Float32Array([0,0,1,0,1,1,0,1]);let He=[0,0,0,0,0,0,0,0],Xe=vec3.ǃcEp(0,0,0),Ie=vec3.ǃcEp(0,0,0),Se=mat4.create(),je=new ǃG.ǃK,Ae=new ǃG.Rect,Ne=null;ǃG.ǃDP&&(window.ǃGje=function(){return Ne?void Ne.ǃGjp():void console.warn(_363)},window.ǃGjf=function(){return Ne?void Ne.ǃGjy():void console.warn(_363)}),ǃG.ǃcA.ǃfG=class{constructor(Pe,ze){if(ze=Object.assign({},ne,ze),ǃG.ǃbv(ze.ǃfS),!ie.has(ze.ǃfS))throw new Error("invalid power preference");let Be=null,Ve=!1,$e={alpha:!1,depth:!1,antialias:!1,powerPreference:ze.ǃfS,failIfMajorPerformanceCaveat:!0};if(Be=Pe.getContext("webgl2",$e)||Pe.getContext("webgl",$e)||Pe.getContext(_362,$e),Be||(Ve=!0,$e.failIfMajorPerformanceCaveat=!1,Be=Pe.getContext("webgl",$e)||Pe.getContext(_362,$e)),!Be)throw new Error("failed to initialise WebGL context");this.ǃG_N=Be,this.ǃGjB=this.ǃG_N.getContextAttributes(),this.ǃGjW=this.ǃG_N.getParameter(Be.VERSION),this.version=1;let Fe=this.ǃGjW.indexOf("WebGL ");if(0<=Fe){let We=parseFloat(this.ǃGjW.substr(Fe+6));isFinite(We)&&1<=We&&(this.version=We)}this.ǃGju=2<=this.version,this.width=0,this.height=0,this.ǃGjU=vec3.ǃcEp(0,0,100),this.ǃGjv=vec3.ǃcEp(0,0,0),this.ǃGjq=vec3.ǃcEp(0,1,0),this.ǃGja=vec3.ǃcEp(1,1,1),this.ǃGjg=mat4.create(),this.ǃGjN=mat4.create(),this.ǃGjK=mat4.create(),this.ǃGP_=mat4.create(),this.ǃG_h=null,this.ǃG_Y=null,this.ǃGjn=null,this.ǃG_z=null,this.ǃGjM=new Float32Array(2*de),this.ǃGjC=new Uint16Array(Ge),this.ǃGjh=new Float32Array(2*de),this.ǃGjY=new Float32Array(4*oe),this.ǃGjz=0,this.ǃGjF=0,this.ǃGjl=0,this.ǃGPA=[],this.ǃGjw=-1,this.ǃGPL=-1,this.ǃGPX=null,this.ǃGjo=[],this.ǃGjH=0,this.ǃGjI=0,this.ǃGjj=null,this.ǃGPE=null,this.ǃGjx=vec4.ǃcEp(1,1,1,1),this.ǃGPk=vec4.ǃcEp(1,1,1,1),this.ǃGjJ=null,this.ǃGPP=null,this.ǃGjZ=0,this.ǃGjS=0,this.lineWidth=1,this.ǃGjs=[this.lineWidth],this.lineCap=1,this.ǃGjO=[this.lineCap],this.ǃGjQ=0.5,this.ǃGdc=[this.ǃGjQ],this.ǃGPf=!1,this.ǃGPy=-1,this.ǃGPB=-1,this.ǃGdG=new ǃG.Rect,this.ǃGPu=new ǃG.Rect,this.ǃGdm=-1,this.ǃGdD=0,this.ǃGdi=0,this.ǃGdR=_361,this.ǃGdb=_361,this.extensions=[],this.ǃGdT=Ve,this.ǃGdk(),this.ǃGdX();let Ye=this.ǃG_N.getExtension("WEBGL_debug_renderer_info");Ye&&(this.ǃGdR=this.ǃG_N.getParameter(Ye.UNMASKED_VENDOR_WEBGL),this.ǃGdb=this.ǃG_N.getParameter(Ye.UNMASKED_RENDERER_WEBGL)),ǃG.ǃDP&&(Ne=this.ǃG_N.getExtension("WEBGL_lose_context"))}ǃGdX(){let Pe=this.ǃG_N;vec4.set(this.ǃGjx,1,1,1,1),vec4.set(this.ǃGPk,1,1,1,1),this.ǃGjJ=null,this.ǃGPP=null,this.ǃGjz=0,this.ǃGjl=0,ǃG.ǃGs(this.ǃGjo),this.ǃGjH=0,this.ǃGjI=0,this.ǃGjw=-1,this.ǃGPL=-1,this.ǃGPX=null,this.ǃGjj=null,this.ǃGPE=null,this.ǃGdG.set(0,0,1,1),this.ǃGPu.set(0,0,1,1),Pe.clearColor(0,0,0,0),Pe.clear(Pe.COLOR_BUFFER_BIT),Pe.enable(Pe.BLEND),Pe.blendFunc(Pe.ONE,Pe.ONE_MINUS_SRC_ALPHA),this.ǃGjZ=Pe.ONE,this.ǃGjS=Pe.ONE_MINUS_SRC_ALPHA,Pe.disable(Pe.CULL_FACE),Pe.disable(Pe.STENCIL_TEST),Pe.disable(Pe.DITHER),Pe.disable(Pe.DEPTH_TEST),this.ǃG_z=Pe.createBuffer(),Pe.bindBuffer(Pe.ARRAY_BUFFER,this.ǃG_z),Pe.bufferData(Pe.ARRAY_BUFFER,this.ǃGjY.byteLength,Pe.DYNAMIC_DRAW),this.ǃG_h=Pe.createBuffer(),Pe.bindBuffer(Pe.ARRAY_BUFFER,this.ǃG_h),Pe.bufferData(Pe.ARRAY_BUFFER,this.ǃGjM.byteLength,Pe.DYNAMIC_DRAW),this.ǃG_Y=Pe.createBuffer(),Pe.bindBuffer(Pe.ARRAY_BUFFER,this.ǃG_Y),Pe.bufferData(Pe.ARRAY_BUFFER,this.ǃGjh.byteLength,Pe.DYNAMIC_DRAW),this.ǃGjn=Pe.createBuffer(),Pe.bindBuffer(Pe.ELEMENT_ARRAY_BUFFER,this.ǃGjn),Pe.bufferData(Pe.ELEMENT_ARRAY_BUFFER,this.ǃGjC,Pe.STATIC_DRAW),ǃG.ǃGs(this.ǃGPA);const ze=ǃG.ǃcA.ǃG_g;let Be=ze.ǃGtx();this.ǃGd$({src:ze.ǃGtJ()},Be,""),this.ǃGd$({src:ze.ǃGtS()},ze.ǃGtZ(),""),this.ǃGd$({src:ze.ǃGts()},Be,""),this.ǃGd$({src:ze.ǃGtO()},Be,""),Pe.activeTexture(Pe.TEXTURE0),Pe.bindTexture(Pe.TEXTURE_2D,null),this.ǃGdm=Pe.getParameter(Pe.MAX_TEXTURE_SIZE);let Ve=Pe.getParameter(Pe.ALIASED_POINT_SIZE_RANGE);this.ǃGdD=Ve[0],this.ǃGdi=Ve[1],2048=2*de-8&&(this.ǃGPQ(),Pe=0),1===this.ǃGjI)this.ǃGjo[this.ǃGjH-1].ǃGPm+=6;else{let ze=this.ǃGd_(1);ze.ǃGPG=3*(Pe/2),ze.ǃGPm=6,this.ǃGjI=1}}ǃK(Pe){this.ǃGde();let ze=this.ǃGjz,Be=this.ǃGjF,Ve=this.ǃGjM,$e=this.ǃGjh;Ve.set(Pe.ǃOL(),ze),ze+=8,$e.set(Ue,Be),Be+=8,this.ǃGjz=ze,this.ǃGjF=Be}ǃGdE(Pe,ze,Be,Ve,$e,Fe,Ye,We){this.ǃGde();let Oe=this.ǃGjz,Ke=this.ǃGjF,qe=this.ǃGjM,Ze=this.ǃGjh;qe[Oe++]=Pe,qe[Oe++]=ze,qe[Oe++]=Be,qe[Oe++]=Ve,qe[Oe++]=$e,qe[Oe++]=Fe,qe[Oe++]=Ye,qe[Oe++]=We,Ze.set(Ue,Ke),Ke+=8,this.ǃGjz=Oe,this.ǃGjF=Ke}ǃc$(Pe,ze){this.ǃGde();let Be=this.ǃGjz,Ve=this.ǃGjF,$e=this.ǃGjM,Fe=this.ǃGjh;$e.set(Pe.ǃOL(),Be),Be+=8;let Ye=ze.ǃOL();Fe[Ve++]=Ye[0],Fe[Ve++]=Ye[1],Fe[Ve++]=Ye[2],Fe[Ve++]=Ye[1],Fe[Ve++]=Ye[2],Fe[Ve++]=Ye[3],Fe[Ve++]=Ye[0],Fe[Ve++]=Ye[3],this.ǃGjz=Be,this.ǃGjF=Ve}ǃJy(Pe,ze){this.ǃGde();let Be=this.ǃGjz,Ve=this.ǃGjF,$e=this.ǃGjM,Fe=this.ǃGjh;$e.set(Pe.ǃOL(),Be),Be+=8,Fe.set(ze.ǃOL(),Ve),Ve+=8,this.ǃGjz=Be,this.ǃGjF=Ve}ǃGdp(){if(mat4.ǃck(Se,this.ǃGjK),vec3.ǃck(Xe,this.ǃGjU),vec3.ǃck(Ie,this.ǃGjv),this.ǃGjU[0]=0,this.ǃGjU[1]=0,this.ǃGjU[2]=100,this.ǃGjv[0]=0,this.ǃGjv[1]=0,this.ǃGjv[2]=0,this.ǃja(),this.ǃjN(),this.ǃGPf){let Pe=this.width/2/pe,ze=this.height/2/pe;Ae.set(-Pe,ze,-Pe+this.ǃGPy,ze-this.ǃGPB),je.ǃcX(Ae),Ae.set(0,0,this.ǃGPy/this.width,this.ǃGPB/this.height),this.ǃc$(je,Ae)}else{let Pe=this.width/2/pe,ze=this.height/2/pe;this.ǃWb(-Pe,ze,Pe,-ze)}mat4.ǃck(this.ǃGjN,Se),vec3.ǃck(this.ǃGjU,Xe),vec3.ǃck(this.ǃGjv,Ie),this.ǃjN()}ǃccs(Pe){let ze=Pe.length/2;if(3>ze)throw new Error("need at least 3 points");let Be=ze-2,$e=Pe[0],Fe=Pe[1],Ye,We,Oe,Ke,qe,Ze,Je,Me;for(Ye=0;Ye=this.ǃGjs.length)throw new Error("cannot pop last line width - check push/pop pairs");this.ǃGjs.pop(),this.lineWidth=this.ǃGjs[this.ǃGjs.length-1]}ǃGdC(){this.lineCap=0,this.ǃGjO[this.ǃGjO.length-1]=0}ǃGdh(){this.lineCap=1,this.ǃGjO[this.ǃGjO.length-1]=0}ǃGdY(){this.lineCap=2,this.ǃGjO[this.ǃGjO.length-1]=0}ǃGdz(){if(100<=this.ǃGjO.length)throw new Error(_364);this.ǃGjO.push(0),this.lineCap=0}ǃnp(){if(100<=this.ǃGjO.length)throw new Error(_364);this.ǃGjO.push(1),this.lineCap=1}ǃBe(){if(100<=this.ǃGjO.length)throw new Error(_364);this.ǃGjO.push(2),this.lineCap=2}ǃBf(){if(1>=this.ǃGjO.length)throw new Error("cannot pop last line cap - check push/pop pairs");this.ǃGjO.pop(),this.lineCap=this.ǃGjO[this.ǃGjO.length-1]}ǃjl(Pe){this.ǃGjQ=Pe,this.ǃGdc[this.ǃGdc.length-1]=Pe}ǃGdF(){return this.ǃGjQ}ǃXA(Pe){if(100<=this.ǃGdc.length)throw new Error("pushed too many line offsets - check push/pop pairs");this.ǃGdc.push(Pe),this.ǃGjQ=Pe}ǃXB(){if(1>=this.ǃGdc.length)throw new Error("cannot pop last line offset - check push/pop pairs");this.ǃGdc.pop(),this.ǃGjQ=this.ǃGdc[this.ǃGdc.length-1]}ǃMF(Pe){if(!this.ǃGdG.ǃ_c(Pe)){this.ǃGdG.ǃck(Pe);let ze=this.ǃGd_(13);ze.ǃGPi.set(Pe.ǃOL(),0),this.ǃGjI=0}}ǃCu(Pe,ze,Be,Ve){this.ǃGjl>=oe-4&&this.ǃGPQ();let $e=this.ǃGjl,Fe=this.ǃGjY;if(2===this.ǃGjI)this.ǃGjo[this.ǃGjH-1].ǃGPm++;else{let Ye=this.ǃGd_(8);Ye.ǃGPG=$e,Ye.ǃGPm=1,this.ǃGjI=2}Fe[$e++]=Pe,Fe[$e++]=ze,Fe[$e++]=Be,Fe[$e++]=Ve,this.ǃGjl=$e}ǃfR(Pe){if(this.ǃGjw!==Pe){let ze=this.ǃGd_(9);ze.ǃGPG=Pe,this.ǃGjw=Pe,this.ǃGjI=0}}ǃci(){this.ǃfR(0)}ǃO(){this.ǃfR(2)}ǃXL(){this.ǃfR(3)}ǃGdl(Pe){let ze=this.ǃGPA[Pe];return!!(ze.ǃG_Z||ze.ǃG_S)}ǃGdw(Pe){let ze=this.ǃGPA[Pe];return!!(ze.ǃG_Z||ze.ǃG_S||ze.ǃGtr)}ǃGdo(Pe){return this.ǃGPA[Pe].ǃGtV}ǃGdH(Pe){let ze=this.ǃGPA[Pe];return 0!==ze.ǃGtX||0!==ze.ǃGt$}ǃGdI(Pe){return this.ǃGPA[Pe].ǃGtX}ǃGdx(Pe){return this.ǃGPA[Pe].ǃGt$}ǃGdJ(Pe,ze){return this.ǃGPA[Pe].ǃc_L[ze][2]}ǃGdZ(Pe){return this.ǃGPA[Pe].ǃGtA}ǃfp(Pe,ze,Be,Ve,$e,Fe,Ye,We,Oe,Ke,qe){let Ze=this.ǃGPA[this.ǃGjw];if(Ze.ǃGtk||qe.length){let Je=this.ǃGd_(10);if(Ze.ǃGtk){let Me=Je.ǃGPi;Me[0]=Fe,Me[1]=Ye,Me.set(ze.ǃOL(),2),Me[6]=We,Me[7]=Oe,Me.set(Be.ǃOL(),8),Me.set(Ve.ǃOL(),12);let Qe=Je.ǃGPc;Qe.set($e.ǃOL(),0),Je.ǃGPG=Ke,Ze.ǃG_J?(Pe&&(Pe=Pe.ǃGPj()),assert(!Pe||!this.ǃGjj||Pe!==this.ǃGjj.ǃGPj(),"Warning: setting texture1 to current render texture"),Je.ǃGPD=Pe):Je.ǃGPD=null}qe.length&&ǃG.ǃcGb(Je.ǃGPR,qe),this.ǃGjI=0}}ǃfA(Pe,ze,Be,Ve){let $e=this.ǃGd_(Te);$e.ǃGPG=0,$e.ǃGPi||($e.ǃGPi=mat4.create());let Fe=$e.ǃGPi;Fe[0]=Pe,Fe[1]=ze,Fe[2]=Be,Fe[3]=Ve,this.ǃGjI=0}ǃmt(Pe){let ze=this.ǃGd_(Te);ze.ǃGPG=0,ze.ǃGPi||(ze.ǃGPi=mat4.create());let Be=ze.ǃGPi,Ve=Pe.ǃOL();Be[0]=Ve[0],Be[1]=Ve[1],Be[2]=Ve[2],Be[3]=Ve[3],this.ǃGjI=0}ǃfL(Pe,ze,Be,Ve){if(!(0>Be||0>Ve)){let $e=this.ǃGd_(Te);$e.ǃGPG=1,$e.ǃGPi||($e.ǃGPi=mat4.create());let Fe=$e.ǃGPi;Fe[0]=Pe,Fe[1]=ze,Fe[2]=Be,Fe[3]=Ve,this.ǃGjI=0}}ǃjZ(){this.ǃGPQ(),this.ǃG_N.flush()}ǃca(){return!this.ǃG_N||this.ǃG_N.isContextLost()}ǃF(){ǃG.ǃcA.ǃxg.ǃF(),ǃG.ǃcA.ǃpo.ǃF()}ǃyi(){this.ǃGdX(),this.ǃH(this.width,this.height,!0)}ǃcg(Pe,ze){this.ǃGPQ();let Be=ǃG.ǃX(ǃG.ǃcA.ǃxg,this);return Be.ǃGPI(Pe,ze),this.ǃGjJ=null,Be}ǃxq(Pe,ze){return ze=Object.assign({},ze),ze.ǃGPM=!1,createImageBitmap(Pe,{premultiplyAlpha:"premultiply"}).then(Be=>this.ǃcg(Be,ze))}ǃGdS(Pe,ze){this.ǃGPQ();let Be=ǃG.ǃX(ǃG.ǃcA.ǃxg,this);return Be.ǃGPI(null,ze),Be.ǃGPs(Pe,262144)}ǃdD(Pe,ze,Be){this.ǃGPQ();let Ve=ǃG.ǃX(ǃG.ǃcA.ǃxg,this);return Ve.ǃGjG(Pe,ze,Be),this.ǃGjJ=null,Ve}ǃdT(Pe,ze){this.ǃGPQ(),ze.ǃGjD(Pe),this.ǃGjJ=null}ǃjP(Pe){if(Pe&&(Pe.ǃGjT(),!(0=this.width||0>=this.height)throw new Error("invalid size");this.ǃGPQ();let ze=ǃG.ǃX(ǃG.ǃcA.ǃpo,this);return ze.ǃHv(this.width,this.height,Pe),this.ǃGjj=null,this.ǃGPE=null,ze}ǃjw(Pe){if(Pe!==this.ǃGjj){assert(!Pe||!this.ǃGjJ||Pe.ǃGPj()!==this.ǃGjJ,"Warning: set rendering to current texture 0");let ze=this.ǃGd_(6);ze.ǃGPD=Pe,this.ǃGjj=Pe,this.ǃGjI=0}}ǃf_(){return this.ǃGjj}ǃft(Pe){assert(Pe!==this.ǃGjj,"drawing render target to itself");let ze=Pe.ǃcD();if(ze)this.ǃcc(ze),this.ǃGdp(),this.ǃcc(null);else throw new Error("renderbuffer -> rendertarget not yet implemented")}ǃfP(Pe){if(!(2>this.version)){let ze=this.ǃGd_(12);ze.ǃGPD=Pe.ǃGPd(),this.ǃGjI=0}}ǃGds(){return this.width*this.height*(this.ǃGjB.alpha?4:3)}ǃGdO(){let Pe=0;for(let ze of ǃG.ǃcA.ǃpo.ǃGjd())ze.ǃcD()||(Pe+=ze.ǃee());return Pe}ǃGdQ(){let Pe=0;for(let ze of ǃG.ǃcA.ǃxg.ǃGj$())Pe+=ze.ǃee();return Pe}ǃGEc(){return this.ǃGds()+this.ǃGdO()+this.ǃGdQ()}ǃGEG(){return this.ǃGjW}ǃGPJ(){return this.version}ǃdm(){return this.ǃGju}ǃGPx(){return this.ǃGdm}ǃCW(){return this.ǃGdD}ǃCB(){return this.ǃGdi}ǃGEm(){return this.ǃGdR}ǃGED(){return this.ǃGdb}ǃGEi(){return this.extensions}ǃGER(){return this.ǃGdT}ǃvv(){return this.ǃG_N}ǃfB(Pe){let ze=this.ǃG_N,Be=ze.ONE,Ve=ze.ONE_MINUS_SRC_ALPHA;switch(Pe){case"normal":Be=ze.ONE,Ve=ze.ONE_MINUS_SRC_ALPHA;break;case"additive":Be=ze.ONE,Ve=ze.ONE;break;case"copy":Be=ze.ONE,Ve=ze.ZERO;break;case"destination-over":Be=ze.ONE_MINUS_DST_ALPHA,Ve=ze.ONE;break;case"source-in":Be=ze.DST_ALPHA,Ve=ze.ZERO;break;case"destination-in":Be=ze.ZERO,Ve=ze.SRC_ALPHA;break;case"source-out":Be=ze.ONE_MINUS_DST_ALPHA,Ve=ze.ZERO;break;case"destination-out":Be=ze.ZERO,Ve=ze.ONE_MINUS_SRC_ALPHA;break;case"source-atop":Be=ze.DST_ALPHA,Ve=ze.ONE_MINUS_SRC_ALPHA;break;case"destination-atop":Be=ze.ONE_MINUS_DST_ALPHA,Ve=ze.SRC_ALPHA;break;default:throw new Error("invalid blend name");}return{ǃfU:Be,ǃfv:Ve}}ǃGEb(Pe){let ze=this.ǃG_N,Be=ze.ONE,Ve=ze.ONE_MINUS_SRC_ALPHA;switch(Pe){case 0:Be=ze.ONE,Ve=ze.ONE_MINUS_SRC_ALPHA;break;case 1:Be=ze.ONE,Ve=ze.ONE;break;case 3:Be=ze.ONE,Ve=ze.ZERO;break;case 4:Be=ze.ONE_MINUS_DST_ALPHA,Ve=ze.ONE;break;case 5:Be=ze.DST_ALPHA,Ve=ze.ZERO;break;case 6:Be=ze.ZERO,Ve=ze.SRC_ALPHA;break;case 7:Be=ze.ONE_MINUS_DST_ALPHA,Ve=ze.ZERO;break;case 8:Be=ze.ZERO,Ve=ze.ONE_MINUS_SRC_ALPHA;break;case 9:Be=ze.DST_ALPHA,Ve=ze.ONE_MINUS_SRC_ALPHA;break;case 10:Be=ze.ONE_MINUS_DST_ALPHA,Ve=ze.SRC_ALPHA;break;default:throw new Error("invalid blend index");}return{ǃfU:Be,ǃfv:Ve}}}}{function ee(ye,Te){Ge||(Ge=document.createElement("canvas"));let ke=!1;(le!==ye||ue!==Te)&&(le=ye,ue=Te,Ge.width=ye,Ge.height=Te,ke=!0),oe||(oe=Ge.getContext("2d"),ke=!0),ke?(oe.textBaseline="top",oe.font=pe,oe.fillStyle=ge.ǃcNk()):oe.clearRect(0,0,ye,Te),he.ǃt$()}function ne(ye){return oe.measureText(ye).width}const _365="center";let ie=window.devicePixelRatio||1;let re=new ǃG.ǃBc(0,0,0,1),Ge=null,oe=null,le=-1,ue=-1,pe="",ge=new ǃG.ǃBc(0,0,0,1),he=new ǃG.ǃtX(function(){ee(32,32)},5);const ve=new Set(["left",_365,"right"]),be=new Set(["top",_365,"bottom"]),Ee=new Set(["word","character"]);let De=new Set;ǃG.ǃjk&&ǃG.ǃjk.addEventListener("fontload",ye=>{let Te=ye.font.ǃcu();for(let ke of De)ǃG.ǃck_(ke.ǃGET(),Te)&&ke.ǃGEk()});ǃG.ǃcaM(()=>{return Ge?4*(Ge.width*Ge.height):0});ǃG.ǃcA.ǃcV=class{constructor(Te){ǃG.ǃg(Te,ǃG.ǃcA.ǃfG),this.ǃYU=Te,this.ǃGEX="Arial",this.ǃGE$=16,this.ǃhH=0,this.ǃGEr=!1,this.ǃGEV=!1,this.ǃcQx=new ǃG.ǃBc(0,0,0,1),this.ǃhF="left",this.ǃhl="top",this.ǃhM="",this.ǃhC=ǃG.ǃX(ǃG.ǃhh),this.ǃhY="word",this.ǃGEA=!1,this.ǃGEL=!1,this.ǃGE_=!0,this.ǃhK=0,this.ǃhn=0,this.ǃhm=0,this.ǃhD=0,this.ǃGEt=1,this.ǃcOs=!1,this.ǃYE=null,this.ǃGEP=0,this.ǃGEj=0,this.ǃGEd=new ǃG.Rect,this.ǃGEE=1,this.ǃGEe=!1,this.ǃGEp=new ǃG.ǃtX(()=>this.ǃym(),60),this.ǃcL=null,this.ǃYq=!1,De.add(this)}ǃz(){this.ǃGEp.ǃz(),this.ǃcL=null,this.ǃym(),this.ǃhC.ǃmt(),this.ǃhC=null,this.ǃYU=null,this.ǃYq=!0,De.delete(this)}ǃGEf(){this.ǃcOs=!0}ǃGEk(){this.ǃGEf(),this.ǃhC.ǃmt(),this.ǃGEA=!0}ǃGEy(Te){this.ǃGE_=!!Te}ǃGEB(){return this.ǃGE_}ǃJo(Te){ǃG.ǃbv(Te),Te||(Te="serif");this.ǃGEX===Te||(this.ǃGEX=Te,this.ǃGEk())}ǃGET(){return this.ǃGEX}ǃc_(Te){ǃG.ǃTH(Te),0.1>Te&&(Te=0.1);this.ǃGE$===Te||(this.ǃGE$=Te,this.ǃGEk())}ǃCQ(Te){ǃG.ǃTH(Te);this.ǃhH===Te||(this.ǃhH=Te,this.ǃGEf())}ǃJl(Te){Te=!!Te;this.ǃGEr===Te||(this.ǃGEr=Te,this.ǃGEk())}ǃJw(Te){Te=!!Te;this.ǃGEV===Te||(this.ǃGEV=Te,this.ǃGEk())}ǃGEW(Te){let ke="";return this.ǃGEr&&(ke+=" bold"),this.ǃGEV&&(ke+=" italic"),ke+=Te?" "+this.ǃGE$+"pt":" "+this.ǃGE$*this.ǃGEE*this.ǃGEt*ie+"pt",this.ǃGEX&&(ke+=" \""+this.ǃGEX+"\""),ke.trim()}ǃBt(Te){ǃG.ǃg(Te,ǃG.ǃBc);this.ǃcQx.ǃcNi(Te)||(this.ǃcQx.ǃcNm(Te.r,Te.ǃcNj,Te.b),this.ǃGEf())}ǃ$N(Te,ke,we){ǃG.ǃTH(Te),ǃG.ǃTH(ke),ǃG.ǃTH(we),re.ǃcNm(Te,ke,we),this.ǃBt(re)}ǃct(Te){if(ǃG.ǃbv(Te),!ve.has(Te))throw new Error("invalid horizontal alignment");this.ǃhF===Te||(this.ǃhF=Te,this.ǃGEf())}ǃcP(Te){if(ǃG.ǃbv(Te),!be.has(Te))throw new Error("invalid vertical alignment");this.ǃhl===Te||(this.ǃhl=Te,this.ǃGEf())}ǃCJ(Te){if(ǃG.ǃbv(Te),!Ee.has(Te))throw new Error("invalid word wrap mode");this.ǃhY===Te||(this.ǃhY=Te,this.ǃGEk())}ǃcW(Te){ǃG.ǃbv(Te);this.ǃhM===Te||(this.ǃhM=Te,this.ǃGEk())}ǃH(Te,ke,we){if((ǃG.ǃTH(Te),ǃG.ǃTH(ke),ǃG.ǃNv(we),"undefined"==typeof we&&(we=1),!(0>=Te||0>=Te))&&(this.ǃhK!==Te||this.ǃhn!==ke||this.ǃGEt!==we)){1===this.ǃGEt!=(1===we)&&(this.ǃGEe=!0);let Le=this.ǃhK,Ce=this.ǃGEt;this.ǃhK=Te,this.ǃhn=ke,this.ǃGEt=we,this.ǃhm=this.ǃhK*this.ǃGEt*ie,this.ǃhD=this.ǃhn*this.ǃGEt*ie;let xe=Math.max(this.ǃhm,this.ǃhD),Re=1,Ue=Math.min(this.ǃYU.ǃGPx(),2048);xe>Ue&&(Re=Ue/xe,this.ǃhm=Math.min(this.ǃhm*Re,Ue),this.ǃhD=Math.min(this.ǃhD*Re,Ue)),this.ǃGEE=Re,0=this.ǃhm||0>=this.ǃhD||(this.ǃcOs=!1,this.ǃGEL=!0,this.ǃGE_?ǃG.ǃckO(()=>this.ǃGEU()):this.ǃGEU())}ǃGEU(){this.ǃYq||(ee(Math.ceil(this.ǃhm),Math.ceil(this.ǃhD)),this.ǃhx(),this.ǃGEv(),this.ǃGEq(),this.ǃGEp.ǃt$(),this.ǃGEL=!1)}ǃhx(){if(this.ǃGEA){let Te=this.ǃGEW(!0);pe!==Te&&(pe=Te,oe.font=Te),this.ǃhC.ǃhh(this.ǃhM,ne,this.ǃhK,this.ǃhY),this.ǃGEA=!1}}ǃGEv(){let Te=this.ǃGEW(!1);pe!==Te&&(pe=Te,oe.font=Te),ge.ǃcNi(this.ǃcQx)||(ge.ǃcNm(this.ǃcQx.r,this.ǃcQx.ǃcNj,this.ǃcQx.b),oe.fillStyle=this.ǃcQx.ǃcNk());let ke=0,we=96*(this.ǃGE$/72)*this.ǃGEE*this.ǃGEt*ie,Le=(96*(this.ǃGE$/72)+4+this.ǃhH)*this.ǃGEE*this.ǃGEt*ie,Ce=this.ǃhC.ǃhJ();this.ǃhl===_365?ke=Math.max(this.ǃhD/2-Ce.length*Le/2,0):"bottom"===this.ǃhl&&(ke=Math.max(this.ǃhD-Ce.length*Le-2,0));for(let xe of Ce){let Re=0;if(this.ǃhF===_365?Re=(this.ǃhm-xe.width*this.ǃGEE*this.ǃGEt*ie)/2:"right"===this.ǃhF&&(Re=this.ǃhm-xe.width*this.ǃGEE*this.ǃGEt*ie),oe.fillText(xe.text,Re,ke),ke+=Le,ke>this.ǃhD-we)break}}ǃGEq(){this.ǃYU.ǃca()||(this.ǃGEP=Math.ceil(this.ǃhm),this.ǃGEj=Math.ceil(this.ǃhD),this.ǃGEd.set(0,0,this.ǃhm/this.ǃGEP,this.ǃhD/this.ǃGEj),this.ǃGEe&&(this.ǃym(),this.ǃGEe=!1),!this.ǃYE&&(this.ǃYE=this.ǃYU.ǃdD(this.ǃGEP,this.ǃGEj,{ǃdR:1===this.ǃGEt,ǃGPn:"high"})),this.ǃYU.ǃdT(Ge,this.ǃYE),this.ǃcL&&this.ǃcL())}ǃcr(){return this.ǃGEd}ǃym(){this.ǃYE&&(!this.ǃYU.ǃca()&&this.ǃYU.ǃjP(this.ǃYE),this.ǃYE=null)}static ǃyG(){return De.values()}}}"use strict",ǃG.ǃ$V={},ǃG.ǃ$V.ǃGEa=1300,ǃG.ǃ$V.ǃGEg=!0,ǃG.ǃ$V.URL={ǃ$r:"https://www.construct.net/register",ǃHQ:"https://www.scirra.com/store",ǃci$:"https://www.scirra.com/manual",ǃGEN:"https://www.construct.net/make-games/releases/",ǃGEK:"https://www.construct.net/profile/edit"},ǃG.ǃGEn=function(te){ǃG.ǃTH(te);let ne=Math.floor(te/100),ie=te%100,me="r"+ne;return 0!=ie&&(me+="."+ie),me},ǃG.ǃ$V.ǃGEM=ǃG.ǃGEn(ǃG.ǃ$V.ǃGEa),ǃG.ǃ$V.ǃGEC=ǃG.ǃcKl(ǃG.ǃ$V.ǃGEM,".","-"),ǃG.ǃGD.ǃGm.ǃGEh=[{id:"main",size:"1fr",name:"Main area",popup:!1,type:"Pane",layout:{tabSide:!1,id:"middle",isHorizontal:!0,children:[{id:"propertiesBar",size:"300px",name:"\u1E56\u1E5B\xF6\u1E57\xEB\u1E5B\u1E97\xEF\xEB\u1E61",popup:!1,docked:!0,type:"CaptionPane",caption:"\u1E56\u1E5B\xF6\u1E57\xEB\u1E5B\u1E97\xEF\xEB\u1E61",side:"left"},{id:"midPane",size:"1fr",name:"Mid pane",popup:!1,docked:!0,type:"TabPane",side:"",layout:{tabSide:"top",children:[]}},{size:"300px",name:"middle2",popup:!1,docked:!0,type:"DockingPane",side:"right",layout:{tabSide:!1,id:"middle3",isHorizontal:!1,children:[{id:"projectBar",size:"477.5px",name:"\u1E56\u1E5B\xF6j\xEB\u010B\u1E97",popup:!1,docked:!0,type:"CaptionPane",caption:"\u1E56\u1E5B\xF6j\xEB\u010B\u1E97",side:"top"},{size:"300px",name:"middle4",popup:!1,docked:!0,type:"TabPane",side:"bottom",layout:{tabSide:"bottom",children:[{id:"layersBar",size:"300px",name:"\u1E36\xE4\xFF\xEB\u1E5B\u1E61",popup:!1,docked:!0,type:"CaptionPane",caption:"\u1E36\xE4\xFF\xEB\u1E5B\u1E61",side:""},{id:"tilemapBar",size:"300px",name:"\u1E6A\xEF\u1E37\xEB\u1E41\xE4\u1E57: \u1E44\xF6 \u1E60\xEB\u1E37\xEB\u010B\u1E97\xEF\xF6\u1E45",popup:!1,docked:!0,type:"CaptionPane",caption:"\u1E6A\xEF\u1E37\xEB\u1E41\xE4\u1E57: \u1E44\xF6 \u1E60\xEB\u1E37\xEB\u010B\u1E97\xEF\xF6\u1E45",side:""}]}}]}}]}}],"use strict";{const _367="invalid job ID",ee=ǃG.ǃc(),te="workers/";class me extends ǃG.ǃDa{constructor(){super(),this.ǃGEY=null,this.ǃGEz=[],this.ǃGEF=new Map,this.ǃGEl=0,this.ǃGEw=!1,this.ǃckw=null,this.ǃckl=null,this.ǃGEo=0}ǃMC(){if(this.ǃGEw)throw new Error("already initialised");this.ǃGEY=new Worker(te+"dispatchWorker.js"),this.ǃGEY.addEventListener("message",re=>this.ǃGEH(re));let ae=[];const de=ǃG.ǃcrS.ǃcrZ("oneworker")?1:ǃG.hardwareConcurrency;for(let re=0,Ge;rethis.ǃGEI(le));let oe=new MessageChannel;ae.push(oe.port1),Ge.postMessage({type:"init",number:this.ǃGEz.length,port:oe.port2},[oe.port2]),this.ǃGEz.push(Ge)}return this.ǃGEY.postMessage({type:"_init",ports:ae},ae),this.ǃGEw=!0,this.ǃckw=new Promise(re=>{this.ǃckl=re}),this.ǃckw}ǃGEx(ae,de,re,Ge,oe){if(ǃG.ǃbv(ae),ǃG.ǃcVD(Ge),ǃG.ǃmL(oe,ǃG.ǃchI),ǃG.ǃgz(de),ǃG.ǃQw(re),!this.ǃGEw)throw new Error("not yet initialised");re||(re=[]);let le=this.ǃGEl++,ue={type:ae,jobId:le,params:de,transferables:re},pe=new Promise((ge,he)=>{this.ǃGEF.set(le,{resolve:ge,ǃczE:Ge,reject:he,ǃGEJ:!1})});return oe&&oe.ǃchx(()=>this.ǃGEZ(le)),this.ǃGEY.postMessage(ue,re),pe}ǃGEZ(ae){ǃG.ǃTH(ae);let de=this.ǃGEF.get(ae);de&&(de.ǃGEJ=!0,de.resolve=null,de.ǃczE=null,de.reject=null,this.ǃGEY.postMessage({type:"_cancel",jobId:ae}))}ǃGEH(ae){let de=ae.data,re=de.type;switch(re){case"error":console.error("[Dispatch worker] Error: "+de.error);break;default:throw new Error(`unknown message from dispatch worker '${re}'`);}}ǃGEI(ae){let de=ae.data,re=de.type,Ge=de.jobId;switch(re){case"result":this.ǃGES(Ge,de.result);break;case"progress":this.ǃGEs(Ge,de.progress);break;case"error":this.ǃGEO(Ge,de.error);break;case"ready":this.ǃGEQ();break;default:throw new Error(`unknown message from worker '${re}'`);}}ǃGES(ae,de){let re=this.ǃGEF.get(ae);if(!re)throw new Error(_367);re.ǃGEJ||re.resolve(de),this.ǃGEF.delete(ae)}ǃGEs(ae,de){let re=this.ǃGEF.get(ae);if(!re)throw new Error(_367);!re.ǃGEJ&&re.ǃczE&&re.ǃczE(de)}ǃGEO(ae,de){let re=this.ǃGEF.get(ae);if(!re)throw new Error(_367);re.ǃGEJ||re.reject(de),this.ǃGEF.delete(ae)}ǃGEQ(){this.ǃGEo++,this.ǃGEo===this.ǃGEz.length&&(this.ǃckl(),this.ǃckl=null,this.ǃckw=null)}}ǃG.ǃGec=ǃG.ǃX(me)}"use strict",window.ǃGeG=class extends ǃG.ǃDa{constructor(){super(),this.ǃcOs=!1,this.ǃGem=!0}ǃz(){ǃG.ǃDW()}ǃTS(){ǃG.ǃDW()}ǃGeD(){return this.ǃcOs}ǃGei(){return this.ǃGem}ǃctW(te){this.ǃGem=!!te}ǃcVi(te){this.ǃcOs=!!te;!this.ǃTS().ǃwe()&&this.ǃcOs&&app.ǃGeR(this.ǃTS().ǃGeb())&&this.ǃGeT()}ǃeP(){ǃG.ǃDW()}ǃwt(){ǃG.ǃDW()}ǃpj(){ǃG.ǃDW()}ǃpU(){ǃG.ǃDW()}ǃGeT(){ǃG.ǃDW()}ǃDD(){}ǃGek(te,ne){if(ǃG.ǃgd(te)&&ǃG.ǃgd(ne))return!0;if(!ǃG.ǃgd(te)&&ǃG.ǃgd(ne))return!1;if(ǃG.ǃgd(te)&&!ǃG.ǃgd(ne))return!1;for(let ie in te)if(ǃG.ǃcqo(te[ie])&&ǃG.ǃcqo(ne[ie])){if(!this.ǃGek(te[ie],ne[ie]))return!1;}else if(ǃG.ǃcXp(te[ie])&&ǃG.ǃcXp(ne[ie])){if(te[ie].length!==ne[ie].length)return!1;for(let me=0;methis.ǃGej(),this.ǃGed=()=>this.ǃGej(),app.addEventListener("projectclose",this.ǃZ_),app.addEventListener(_369,this.ǃGed)}ǃz(){app.removeEventListener("projectclose",this.ǃZ_),this.ǃZ_=null,app.removeEventListener(_369,this.ǃGed),this.ǃGed=null,this.ǃGT=null,this.ǃGe$=null,this.ǃGeV=null,this.ǃGeA=null,this.ǃGeL=null}ǃTS(){return this.ǃGT}ǃGeE(re){re=!!re;this.ǃGet===re||(this.ǃGet=re,this.ǃcVi(!0))}ǃGee(){return this.ǃGet}ǃGep(re){if(ǃG.ǃbv(re),!ae.has(re))throw new Error(`invalid preview browser '${re}'`);this.ǃGeP===re||(this.ǃGeP=re,this.ǃcVi(!0))}ǃGef(){return this.ǃGeP}ǃGey(re){re=!!re;this.ǃGe_===re||(this.ǃGe_=re,this.ǃcVi(!0))}ǃGeB(){return this.ǃGe_}ǃeP(re,Ge){if(ǃG.ǃbv(re),!me.includes(re))throw new Error(_370);re===de.ǃQn&&this.ǃGeW(Ge),re===de.ǃwP&&this.ǃGeu(Ge),re===de.ǃcDd&&this.ǃGeU(Ge)}ǃwt(re){if(ǃG.ǃbv(re),!me.includes(re))throw new Error(_370);return re===de.ǃQn?this.ǃGe$:re===de.ǃwP?this.ǃGeV:re===de.ǃcDd?this.ǃGeA:re===de.ǃQH?this.ǃGeL:void 0}ǃGeT(){this.ǃGei()&&app.ǃHr(this.ǃGT,_368)}ǃpj(){let re={propertiesBar:this.ǃGe$,openTabs:this.ǃGeA,previewEffects:this.ǃGet,previewBrowser:this.ǃGeP,pauseOnUnfocus:this.ǃGe_};if(app.ǃciR()&&(re.projectBar=app.ǃrA().ǃw_()),app.ǃrl()){let Ge=app.ǃrw().ǃZS();re.propertiesBarActiveObject={},Ge instanceof ǃm_?(re.propertiesBarActiveObject.name=Ge.ǃcu(),re.propertiesBarActiveObject.type="project"):Ge instanceof ǃGm?(re.propertiesBarActiveObject.name=Ge.ǃcu(),re.propertiesBarActiveObject.type="layout"):Ge instanceof ǃrP?(re.propertiesBarActiveObject.name=Ge.ǃcu(),re.propertiesBarActiveObject.type="layer"):Ge instanceof Array&&(re.propertiesBarActiveObject.name="instances",re.propertiesBarActiveObject.type="array")}return re}ǃpU(re){this.ǃGeX(re)&&(this.ǃGe$=re.propertiesBar,this.ǃGeV=re.projectBar,this.ǃGeA=re.openTabs,this.ǃGet=!!re.previewEffects,this.ǃGe_=!!re.pauseOnUnfocus,this.ǃGeP=re.previewBrowser||"default",this.ǃGeL=re.propertiesBarActiveObject,this.ǃGT.ǃwe()||this.ǃGei()&&app.ǃHr(this.ǃGT,_368))}ǃGeW(re){!this.ǃGeX(re)||this.ǃGek(this.ǃGe$,re)||(this.ǃGe$=re,this.ǃcVi(!0))}ǃGeu(re){!this.ǃGeX(re)||this.ǃGek(this.ǃGeV,re)||(this.ǃGeV=re,this.ǃcVi(!0))}ǃGeU(re){!this.ǃGeX(re)||this.ǃGek(this.ǃGeA,re)||(this.ǃGeA=re,this.ǃcVi(!0))}ǃGej(){app.ǃciR()&&(this.ǃGeV=app.ǃrA().ǃw_())}},window.ǃwj.ǃQn=ee,window.ǃwj.ǃwP=te,window.ǃwj.ǃcDd=ne,window.ǃwj.ǃQH=ie}{const _371="layeractive",_372="layoutuichange",_373="invalid ui state key",ee="propertiesBar",te="instanceCollectionProperties",ne="layoutView",ie="layoutViewInstanceCollection",me=[ee,te,ne,ie];window.ǃed=class ae extends ǃGeG{constructor(de){ǃG.ǃg(de,ǃGm),super(),this.ǃtj=de,this.ǃGev=null,this.ǃGeq=!1,this.ǃGea=!1,this.ǃGeg=32,this.ǃGeN=32,this.ǃGeK=1e3,this.ǃGen=1e3,this.ǃGeM=!1,this.ǃGeC=!1,this.ǃGeh=null,this.ǃcZL=this.ǃtj.ǃTS().ǃGeY(),this.ǃGe$=null,this.ǃGez=new Map,this.ǃGeF=null,this.ǃGel=null,this.ǃGew=re=>this.ǃGeo(re.ǃrD),app.addEventListener(_371,this.ǃGew)}ǃz(){app.removeEventListener(_371,this.ǃGew),this.ǃGew=null,this.ǃGez&&this.ǃGez.clear(),ǃG.ǃGs(this.ǃGel),this.ǃtj=null,this.ǃGev=null,this.ǃGe$=null,this.ǃGez=null,this.ǃGeF=null,this.ǃGel=null,this.ǃcZL=null}ǃTS(){return this.ǃtj.ǃTS()}ǃBY(){return app.ǃM().ǃrI(this.ǃtj)}ǃLW(){return this.ǃGev||(this.ǃGev=this.ǃtj.ǃGeH()),this.ǃGev.ǃkM()||(this.ǃGev=this.ǃtj.ǃGeH()),this.ǃGev}ǃrx(de){if(ǃG.ǃg(de,ǃrP),de!==this.ǃGev){this.ǃGev=de;let re=this.ǃBY();re&&re.ǃj$(),app.ǃGeI(de,_371),this.ǃcVi(!0)}}ǃty(){return this.ǃGeK}ǃso(de){if(ǃG.ǃTH(de),de=Math.floor(de),0>de)throw new Error("invalid margin width");this.ǃGeK===de||(this.ǃGeK=de,this.ǃcVi(!0))}ǃtW(){return this.ǃGen}ǃsH(de){if(ǃG.ǃTH(de),de=Math.floor(de),0>de)throw new Error("invalid margin height");this.ǃGen===de||(this.ǃGen=de,this.ǃcVi(!0))}ǃGex(){return this.ǃGeq}ǃpc(de){this.ǃGex()===de||(this.ǃGeq=de,this.ǃcVi(!0))}ǃGeJ(){return this.ǃGea}ǃpG(de){this.ǃGeJ()===de||(this.ǃGea=de,this.ǃcVi(!0))}ǃdc(){return this.ǃGeg}ǃeO(de){ǃG.ǃTH(de),de=ǃG.ǃAR(de,1,1e3);this.ǃdc()===de||(this.ǃGeg=de,this.ǃcVi(!0))}ǃdG(){return this.ǃGeN}ǃeQ(de){ǃG.ǃTH(de),de=ǃG.ǃAR(de,1,1e3);this.ǃdG()===de||(this.ǃGeN=de,this.ǃcVi(!0))}ǃsI(de){de=!!de;this.ǃGeM===de||(this.ǃGeM=de,this.ǃGeZ(),this.ǃcVi(!0))}ǃjH(){return this.ǃGeM}ǃGeZ(){if(this.ǃGeM){let de=this.ǃBY();de&&de.ǃtS()}}ǃsJ(de){de=!!de;this.ǃGeC===de||(this.ǃGeC=de,this.ǃGeS(),this.ǃcVi(!0))}ǃsx(){return this.ǃGeC}ǃt_(){return this.ǃcZL?this.ǃcZL.clone():null}ǃGeS(){let de=this.ǃBY();if(de)for(let re of this.ǃtj.ǃrn())this.ǃGeC?de.ǃLW()===re?(re.ǃGes(1),re.ǃrZ(!1)):(re.ǃGes(0.33),re.ǃrZ(!0)):(re.ǃGes(1),re.ǃrZ(!1))}ǃeP(de,re,Ge){if(ǃG.ǃbv(de),!me.includes(de))throw new Error(_373);de===ae.ǃQn&&this.ǃGeW(re),de===ae.ǃQo&&this.ǃGeO(re,Ge),de===ae.ǃej&&this.ǃGeQ()}ǃwt(de,re){if(ǃG.ǃbv(de),ǃG.ǃQw(re),!me.includes(de))throw new Error(_373);return de===ae.ǃQn?this.ǃGe$:de===ae.ǃQo?re?this.ǃGpc(re):this.ǃGez:de===ae.ǃej?this.ǃGeF:de===ae.ǃQI?this.ǃGel:void 0}ǃDD(){this.ǃGpG(),this.ǃsx()&&this.ǃGeS()}ǃGeT(){this.ǃGei()&&app.ǃGpm(this.ǃtj,_372)}ǃpj(){let de={propertiesBar:this.ǃGe$,grid:{show:this.ǃGeq,snap:this.ǃGea,width:this.ǃGeg,height:this.ǃGeN},marginWidth:this.ǃGeK,marginHeight:this.ǃGen,showCollisionPolygons:this.ǃGeM,showTranslucentInactiveLayers:this.ǃGeC,tabColor:this.ǃcZL?this.ǃcZL.toJSON():null,layers:[...this.ǃtj.ǃrn()].map(Ge=>Ge.ǃw_())},re=this.ǃBY();if(re&&(de.view={},de.view.x=re.ǃEw(),de.view.y=re.ǃEo(),de.view.z=re.ǃEQ(),de.view.activeLayer=this.ǃLW().ǃcu(),de.selectedInstances=[...re.ǃLe().ǃeY()].map(Ge=>Ge.ǃ_l())),this.ǃGez){de.instanceCollections=[];for(let[Ge,oe]of this.ǃGez)de.instanceCollections.push({uids:Ge.map(le=>le.ǃ_l()),properties:oe})}return de}ǃpU(de){if(this.ǃGeX(de)){this.ǃGe$=de.propertiesBar,this.ǃGel=de.selectedInstances,this.ǃGeh=de.instanceCollections,this.ǃGeq=!!de.grid.show,this.ǃGea=!!de.grid.snap,this.ǃGeg=de.grid.width,this.ǃGeN=de.grid.height,this.ǃGeK=de.marginWidth,this.ǃGen=de.marginHeight,this.ǃGeM=!!de.showCollisionPolygons,this.ǃGeC=!!de.showTranslucentInactiveLayers,de.tabColor?this.ǃcZL.ǃcNe(de.tabColor):this.ǃcZL=null,this.ǃGeF=de.view;for(let re of de.layers){let Ge=this.ǃtj.ǃOz(re.name);Ge&&Ge.ǃwd(re)}this.ǃGei()&&app.ǃGpm(this.ǃtj,_372)}}ǃGeW(de){!this.ǃGeX(de)||this.ǃGek(this.ǃGe$,de)||(this.ǃGe$=de,this.ǃcVi(!0))}ǃGeO(de,re){let Ge=[...re],oe=null;if(0!==Ge.length){if(ǃG.ǃ_Y(Ge[0])){oe=[];for(let le of Ge){let ue=this.ǃtj.ǃGpD(le);ue&&oe.push(ue)}}else if(Ge[0]instanceof ǃxR)oe=Ge;else throw new Error("unexpected instance collection ui state arguments");this.ǃGpi(oe),ǃG.ǃgd(de)?(this.ǃGel=null,this.ǃGez.set(oe,null)):(this.ǃGel=oe,this.ǃGez.set(oe,de)),this.ǃcVi(!0)}}ǃGeQ(){let de=this.ǃBY();if(de){let re=!1;if(this.ǃGel){let Ge=de.ǃLe();Ge.ǃep(this.ǃGel.filter(oe=>oe.ǃkM())),app.ǃrl()&&!ǃG.ǃDG.ǃDc&&app.ǃrw().ǃrJ(this.ǃGel,null,{ǃet:!1}),this.ǃGel=null,re=!0}if(this.ǃGeF){de.ǃEZ(this.ǃGeF.x,this.ǃGeF.y),de.ǃEO(this.ǃGeF.z);let Ge=this.ǃGeF.activeLayer;if(Ge){let oe=this.ǃtj.ǃOz(Ge);oe&&de.ǃrx(oe)}this.ǃGeF=null,re=!0}re&&this.ǃcVi(!0)}}ǃGpi(de){for(let re of this.ǃGez.keys())ǃG.ǃOf(de,re)&&this.ǃGez.delete(re)}ǃGpc(de){if(this.ǃGez)for(let[re,Ge]of this.ǃGez)if(ǃG.ǃOf(re,de))return Ge}ǃGpG(){if(this.ǃGeh){this.ǃGez.clear();for(let de of this.ǃGeh){let re=[];for(let Ge of de.uids){let oe=this.ǃtj.ǃGpD(Ge);oe&&re.push(oe)}this.ǃGez.set(re,de.properties)}}if(this.ǃGel&&ǃG.ǃ_Y(this.ǃGel[0])){let de=[];for(let re of this.ǃGel){let Ge=this.ǃtj.ǃGpD(re);Ge&&de.push(Ge)}this.ǃGel=de}}ǃGeo(de){ǃG.ǃg(de,ǃrP);this.ǃTS().ǃwe()||!this.ǃsx()||this.ǃtj.ǃGpR(de)&&this.ǃGeS()}},window.ǃed.ǃQn=ee,window.ǃed.ǃQo=te,window.ǃed.ǃej=ne,window.ǃed.ǃQI=ie}{const _374="layeruichange",_375="invalid ui state key",ee="propertiesBar",te=[ee];window.ǃQz=class ne extends ǃGeG{constructor(ie){ǃG.ǃg(ie,ǃrP),super(),this.ǃGpb=ie,this.ǃGpT=!0,this.ǃGpk=!1,this.ǃGpX=!1,this.ǃGp$=!1,this.ǃCd=1,this.ǃGpr=new ǃG.ǃBc,this.ǃGe$=null}ǃz(){this.ǃGpb=null,this.ǃGe$=null}ǃTS(){return this.ǃGpb.ǃTS()}ǃGpV(){return this.ǃGpT}ǃrs(ie){ie=!!ie;this.ǃGpV()===ie||(this.ǃGpT=ie,this.ǃcVi(!0))}ǃGpA(){return this.ǃGpk}ǃrZ(ie){ie=!!ie;this.ǃGpA()===ie||(this.ǃGpk=ie,this.ǃcVi(!0))}ǃGpL(){return this.ǃGpX}ǃOV(ie){ie=!!ie;this.ǃGpL()===ie||(this.ǃGpX=ie,this.ǃcVi(!0))}ǃGp_(){return this.ǃGp$}ǃGpt(ie){if(ie=!!ie,this.ǃGpb.ǃ_R())throw new Error("can not set global property of overriden layer");this.ǃGp_()===ie||(this.ǃGp$=ie,this.ǃcVi(!0),this.ǃTS().ǃGpP())}ǃfi(ie){ǃG.ǃTH(ie),this.ǃCd=ǃG.ǃAR(ie,0,1),this.ǃGpr.set(this.ǃGpb.ǃne()),this.ǃGpr.a*=this.ǃCd,this.ǃGpr.ǃyQ()}ǃpZ(){return this.ǃCd}ǃne(){return this.ǃGpr}ǃeP(ie,me){if(ǃG.ǃbv(ie),!te.includes(ie))throw new Error(_375);ie===ne.ǃQn&&this.ǃGeW(me)}ǃwt(ie){if(ǃG.ǃbv(ie),!te.includes(ie))throw new Error(_375);return ie===ne.ǃQn?this.ǃGe$:void 0}ǃGeT(){this.ǃGei()&&app.ǃGeI(this.ǃGpb,_374),app.ǃM().ǃVW(this.ǃGpb.ǃrq())}ǃpj(){return{name:this.ǃGpb.ǃcu(),propertiesBar:this.ǃGe$,visibleInEditor:this.ǃGpT,locked:this.ǃGpk,parallaxInEditor:this.ǃGpX,isGlobal:this.ǃGp$,opacity:this.ǃCd,color:this.ǃGpr.toJSON()}}ǃpU(ie){this.ǃGeX(ie)&&(this.ǃGe$=ie.propertiesBar,this.ǃGpT=!!ie.visibleInEditor,this.ǃGpk=!!ie.locked,this.ǃGpX=!!ie.parallaxInEditor,this.ǃGp$=!!ie.isGlobal,this.ǃCd=ie.opacity,this.ǃGpr.ǃcNe(ie.color),app.ǃGeI(this.ǃGpb,_374))}ǃGeW(ie){!this.ǃGeX(ie)||this.ǃGek(this.ǃGe$,ie)||(this.ǃGe$=ie,this.ǃcVi(!0))}},window.ǃQz.ǃQn=ee}{const ee="eventObjectViews",te=[ee];window.ǃGpj=class ne extends ǃGeG{constructor(ie){super(),this.ǃc_O=ie,this.ǃGpd=[],this.ǃGpE=!1}ǃz(){ǃG.ǃGs(this.ǃGpd),this.ǃc_O=null,this.ǃGpd=null}ǃTS(){return this.ǃc_O.ǃTS()}ǃGpe(){return this.ǃGpE}ǃmA(ie){ie=!!ie;this.ǃGpE===ie||(this.ǃGpE=!!ie,this.ǃc_O.ǃmm().ǃGpp(),this.ǃcVi(!0))}ǃwt(ie,me){if(ǃG.ǃbv(ie),ǃG.ǃg(me,ǃcVM),!te.includes(ie))throw new Error("invalid ui state key");return ie===ne.ǃGpf?this.ǃGpy(me):void 0}ǃGeT(){this.ǃc_O.ǃGpB(),this.ǃGei()&&app.ǃGpW(this.ǃc_O.ǃmm(),"eventsheetuichange")}ǃpj(){return{viewsUIState:[...this.ǃc_O.ǃc_K()].map(ie=>ie.ǃw_()),bookmark:this.ǃGpE}}ǃpU(ie){this.ǃGeX(ie)&&(this.ǃGpu(ie.viewsUIState),this.ǃmA(ie.bookmark))}ǃGpy(ie){ǃG.ǃg(ie,ǃcVM);let me=[...this.ǃc_O.ǃc_K()],ae=me.indexOf(ie);if(-1!==ae)return this.ǃGpd[ae]}ǃGpu(ie){ǃG.ǃkF(ie);this.ǃGek(ie,this.ǃGpd)||(this.ǃGpd=ǃG.ǃIK(ie),this.ǃcVi(!0))}},window.ǃGpj.ǃGpf=ee}"use strict",window.ǃctG=class extends ǃGeG{constructor(te){super(),this.ǃGpU=te,this.ǃGpv=!0,this.ǃG_b=new Map}ǃctS(te,ne){ne.ǃcjY(this),this.ǃG_b.set(te,ne)}ǃcPD(te,ne){if(!this.ǃG_b.has(te))throw new Error("missing id");this.ǃG_b.get(te).Set(ne)}ǃcPc(te){if(!this.ǃG_b.has(te))throw new Error("missing id");return this.ǃG_b.get(te).ǃDJ()}ǃz(){this.ǃGpU=null}ǃmm(){return this.ǃkl().ǃmm()}ǃkl(){return this.ǃGpU.ǃkl()}ǃTS(){return this.ǃkl().ǃTS()}ǃwt(){return this.ǃGpv?(this.ǃGpv=!1,this.ǃkl().ǃwt(this.ǃGpU)):this.ǃpj()}ǃGeT(){this.ǃGei()&&app.ǃGpW(this.ǃmm(),"eventsheetuichange")}ǃpj(){let te={};for(let ne of this.ǃG_b.values())ne.ǃpj(te);return te}ǃpU(te){if(this.ǃGeX(te))for(let ne of this.ǃG_b.values())ne.ǃpU(te)}},"use strict",window.ǃcts=class{constructor(te){this.ǃGpq=te,this.ǃcHe=null,this.ǃGmC=!0}ǃcjY(te){ǃG.ǃg(te,ǃctG),this.ǃcHe=te}ǃDJ(){return this.ǃGmC}Set(te){te=!!te;this.ǃGmC===te||(te&&!this.ǃGmC?(this.ǃGmC=!0,this.ǃGpa(),this.ǃcHe.ǃcVi(!0)):!te&&this.ǃGmC&&(this.ǃGmC=!1,this.ǃGpa(),this.ǃcHe.ǃcVi(!0)))}ǃGpa(){let te=this.ǃcHe.ǃkl(),ne=te.ǃwt(this.ǃGpq);if(ne)ne.expanded=this.ǃGmC;else{let ie=te.ǃw_();te.ǃwd(ie)}}ǃpj(te){te.expanded=this.ǃGmC}ǃpU(te){!this.ǃcHe.ǃGeX(te)||te.hasOwnProperty("expanded")&&(assert(ǃG.ǃcqx(this.ǃGpq.ǃ_C),"missing 'SetExpanded' method"),this.ǃGpq.ǃ_C(te.expanded,!1),this.ǃGmC=te.expanded)}},"use strict",ǃG.ǃGpg=class extends ǃG.ǃDa{constructor(){super()}ǃz(){}ǃGpN(){ǃG.ǃDW()}ǃczd(){ǃG.ǃDW()}ǃcze(){ǃG.ǃDW()}ǃczp(){ǃG.ǃDW()}},"use strict",ǃG.ǃGpK=class extends ǃG.ǃGpg{constructor(te){super(),ǃG.ǃg(te,ǃG.ǃczD),this.ǃGpn=te}ǃz(){this.ǃGpn=null,super.ǃz()}ǃGpN(te){return ǃG.ǃbv(te),Promise.resolve(this.ǃGpn.ǃcz_(te))}ǃczd(te){ǃG.ǃbv(te);const ne=this.ǃGpn.ǃczt(te);if(!ne)throw new Error(`missing file path '${te}'`);return this.ǃGpn.ǃczd(ne)}ǃcze(te){ǃG.ǃbv(te);const ne=this.ǃGpn.ǃczt(te);if(!ne)throw new Error(`missing file path '${te}'`);return this.ǃGpn.ǃcze(ne)}ǃczp(te,ne){ǃG.ǃbv(te),ǃG.ǃoG(ne);const ie=this.ǃGpn.ǃczt(te);if(!ie)throw new Error(`missing file path '${te}'`);return this.ǃGpn.ǃczp(ie,ne)}},"use strict",ǃG.ǃGpM=class extends ǃG.ǃGpg{constructor(te){if(super(),ǃG.ǃbv(te),"nwjs"!==ǃG.ǃDG.ǃDw)throw new Error("only supported in NW.js mode");this.ǃGpC=te}ǃz(){super.ǃz()}ǃGpN(te){const ne=ǃG.ǃpe.ǃcK_(this.ǃGpC,te);return ǃG.ǃpe.ǃcKt(ne)}ǃczd(te){const ne=ǃG.ǃpe.ǃcK_(this.ǃGpC,te);return ǃG.ǃpe.ǃcKu(ne,{encoding:"utf8"})}ǃcze(te){const ne=ǃG.ǃpe.ǃcK_(this.ǃGpC,te);return ǃG.ǃpe.ǃcKu(ne,{encoding:"utf8"}).then(ie=>ǃG.ǃc$Y(ie))}ǃczp(te,ne){const ie=ǃG.ǃpe.ǃcK_(this.ǃGpC,te);return ǃG.ǃpe.ǃcKu(ie).then(me=>new Blob([Uint8Array.from(me)],{type:ne}))}},"use strict",window.ǃXb=class ee extends ǃG.Event.ǃpF{constructor(te){super(),ǃG.ǃg(te,ǃm_),this.ǃGT=te,this.ǃGph=this.ǃGT.ǃGpY(),this.ǃGpz=0}ǃz(){this.ǃGT=null,super.ǃz()}ǃxJ(){return"project-object"}ǃTS(){return this.ǃGT}ǃkM(){return 0===this.ǃGpz}ǃGpF(){return this.ǃGph}static ǃGpl(te){return"number"==typeof te&&Math.floor(te)===te&&0<=te&&1e16>=te}ǃGpw(te){if(ǃG.ǃTH(te),!ee.ǃGpl(te))throw new Error("invalid SID");this.ǃGph=te}ǃVR(){this.ǃGpo()}ǃcLE(){this.ǃGpH()}ǃGpo(){let te=this.ǃkM();++this.ǃGpz,te&&!this.ǃkM()&&this.ǃGpI()}ǃGpH(){if(0===this.ǃGpz)throw new Error("cannot undelete active project object");--this.ǃGpz,this.ǃkM()&&this.ǃGpx()}ǃGpx(){}ǃGpI(){}ǃDD(){}static ǃlp(te,ne){let ie=te.ǃcu().toLowerCase(),me=ne.ǃcu().toLowerCase();return ie>me?1:ieae)throw new Error("item not in this folder");if(this.ǃGRH.splice(ae,1),assert(!ne.ǃGRH.includes(te),"item should not already be in destination folder"),ie){if(!ne.ǃGRH.includes(ie))throw new Error("relative item not in destination folder");if(!ie.ǃkM())throw new Error("relative item is deleted");if(ae=ne.ǃGRH.indexOf(ie),"after"===me)++ae;else if("before"!==me)throw new Error(_378);ne.ǃGRH.splice(ae,0,te)}else ne.ǃGRH.push(te);te.ǃGf$(ne),this.ǃcVi()}ǃlG(te,ne,ie,me){if(ǃG.ǃg(te,ee),ǃG.ǃg(ne,ee),ǃG.ǃmL(ie,ee),ǃG.ǃoG(me),ne.ǃsn()!==this.ǃchB)throw new Error(_380);if(!te.ǃkM())throw new Error("cannot move deleted subfolder");let ae=this.ǃGpJ.indexOf(te);if(0>ae)throw new Error("subfolder not in this folder");if(this.ǃGpJ.splice(ae,1),assert(!ne.ǃGpJ.includes(te),"subfolder should not already be in destination folder"),ie){if(!ne.ǃGpJ.includes(ie))throw new Error("relative subfolder not in destination folder");if(!ie.ǃkM())throw new Error("relative subfolder is deleted");if(ae=ne.ǃGpJ.indexOf(ie),"after"===me)++ae;else if("before"!==me)throw new Error(_378);ne.ǃGpJ.splice(ae,0,te)}else ne.ǃGpJ.push(te);te.ǃcHe=ne,this.ǃcVi()}ǃGfA(te,ne){return te.ǃpj(ne)}ǃpj(te){ǃG.ǃcDt(te);let ne=[];for(let ae of this.ǃB())ne.push(this.ǃGfA(ae,te));let ie=[];for(let ae of this.ǃle())ie.push(ae.ǃpj(te));let me={items:ne,subfolders:ie};return this.ǃzx()||(me.name=this.ǃclE),me}}}{function ee(){const De=pe.length;let ye="";for(let Te=0;11>Te;++Te)ye+=pe.charAt(Math.floor(Math.random()*De));return ye}const _381="splash",_382="plugin",_383="author",_384="effect",_385="project",_386="behavior",_387="invalid uid",_388="progress-logo",_389="missing-addons",_390="project.c3proj",_391="letterbox-scale",_392="projectundopointset",_393="project.uistate.json",_394="audio/webm; codecs=opus",_395="letterbox-integer-scale",_396="object class name already in use",_397="expected object class name to exist",te=ǃG.ǃc(),ne=ǃG.ǃm(te.URL);ǃG.ǃi.ǃD(ne+"lang");const ie=1,me=new Set(["default","cloud","local-single-file","local-folder"]),ae=new Set(["off","scale-inner","scale-outer",_391,_395]),de=new Set(["low","high"]),re=new Set(["any","portrait","landscape"]),Ge=new Set(["linear","point"]),oe=new Set(["low","medium","high"]),le=new Set([_381,_388,"progress","percent","none"]),ue=new Set(["c2","c3"]),pe="abcdefghijklmnopqrstuvwxyz0123456789";const ge=["loading-logo.png","icon-16.png","icon-32.png","icon-64.png","icon-128.png","icon-256.png","icon-512.png"],ve=new Map([[_394,1],["audio/ogg; codecs=opus",2],["audio/webm; codecs=vorbis",3],["audio/ogg; codecs=vorbis",4],["audio/mp4",5],["audio/wav",6]]),be={ǃGfL:!1};window.ǃm_=class De extends ǃG.ǃDa{constructor(){super(),this.ǃclE=lang("model.project.new-project-name"),this.ǃGmo=ǃG.ǃcgh({description:"",version:"1.0.0.0",ǃGf_:"",ǃGft:"",ǃGfP:"",ǃGfj:"",ǃGfd:!1,ǃGfE:!1,ǃGfe:_391,ǃGfp:"high",backgroundColor:ǃG.ǃX(ǃG.ǃBc,0,0,0),ǃGff:ǃG.ǃX(ǃG.ǃBc,1,1,1),ǃGfy:!1,ǃGfB:ǃG.ǃX(ǃG.ǃBc,1,1,1),ǃGfW:!0,ǃGfu:"any",ǃGfU:!0,ǃGfv:"linear",ǃGfq:"medium",ǃGfa:_381,ǃGfg:!0,ǃGfN:!0,ǃGfK:!0}),this.ǃGfn=ee(),this.ǃGfM="",this.ǃGfC="default",this.ǃGfh=null,this.ǃGfY="user",this.ǃGfz=854,this.ǃGfF=480,this.ǃGfl=!1,this.ǃGfw=!1,this.ǃYv=!0,this.ǃGfo=!1,this.ǃGfH=ǃG.ǃcrS.ǃcrZ("forcec3")?"c3":"c2",this.ǃGfI=null,this.ǃGfx=!1,this.ǃGfJ={plugin:new Set,behavior:new Set,effect:new Set},this.ǃGfZ=ǃG.ǃX(ǃEv,this,null),this.ǃGfS=new Map,this.ǃGfs=new Map,this.ǃGfO=new Set,this.ǃGfQ=ǃG.ǃX(ǃzF,this,null),this.ǃGyc=[],this.ǃGyG=new Map,this.ǃGym=[],this.ǃGyD=0,this.ǃGyi=new Set,this.ǃGyR=0,this.ǃGyb=!1,this.ǃGyT=ǃG.ǃX(ǃzY,this,null),this.ǃGyk=null,this.ǃGyX="",this.ǃGy$=ǃG.ǃX(ǃzz,this,null),this.ǃGyr=[],this.ǃGyV=ǃG.ǃX(ǃzl,this,null,"sound"),this.ǃGyA=ǃG.ǃX(ǃzl,this,null,"music"),this.ǃGyL=ǃG.ǃX(ǃzl,this,null,"video"),this.ǃGy_=ǃG.ǃX(ǃzl,this,null,"font"),this.ǃGyt=ǃG.ǃX(ǃzl,this,null,"icon"),this.ǃGyP=ǃG.ǃX(ǃzl,this,null,"general"),this.ǃGyj=0,this.ǃGyd=0,this.ǃGyt.ǃFE(!1),this.ǃGyE=new ǃGye(this),this.ǃGfI=ǃG.ǃv.ǃGyp().ǃpu(this,"System"),this.ǃGyf=0,this.ǃGyy=ǃG.ǃX(ǃG.ǃGe,()=>this.ǃGyB(),1e3),this.ǃGyW=ǃG.ǃX(ǃwj,this)}ǃz(){this.ǃGyu(),this.ǃGyy.ǃz(),this.ǃGyy=null,this.ǃGfI.ǃz(),this.ǃGfI=null,this.ǃGyE.ǃz(),this.ǃGyE=null,this.ǃGyW.ǃz(),this.ǃGyW=null,this.ǃGfC=null,this.ǃGfh=null,this.ǃGfS.clear(),this.ǃGfs.clear(),this.ǃGfO.clear();for(let ye of this.ǃGyU())ye.ǃz();for(let ye of this.ǃGyv())ye.ǃz();for(let ye of this.ǃGyq())ye.ǃz();for(let ye of this.ǃGya())ye.ǃz();for(let ye of this.ǃGyc)ye.ǃz(!0);ǃG.ǃGs(this.ǃGyc),ǃG.ǃGs(this.ǃGyr),ǃG.ǃz(this)}ǃGyg(ye,Te){if(ǃG.ǃbv(ye),!me.has(ye))throw new Error("invalid origin filesystem mode");this.ǃGfC=ye,this.ǃGfh=Te,ǃHC.ǃ$X(this)}ǃGyN(){return this.ǃGfC}ǃGyK(){return this.ǃGfh}ǃxJ(){return _385}ǃly(){return this.ǃGfl}ǃcVi(){this.ǃwe()||this.ǃGfl||(this.ǃGfl=!0,this.ǃGyn(!0),app.ǃHr(this,"projectmarkchanged"))}ǃGyM(){this.ǃGfl=!1,app.ǃHr(this,"projectunmarkchanged")}ǃGyC(){this.ǃGyM();for(let ye of this.ǃc_q())ye.ǃGyh();for(let ye of this.ǃSF())ye.ǃGyh();for(let ye of this.ǃsq())ye.ǃGyh();for(let ye of this.ǃTr()){ye.ǃGyh();for(let Te of ye.ǃTA())Te.ǃGyh()}this.ǃGyn(!1)}ǃGyY(){this.ǃwe()||(this.ǃcVi(),this.ǃGyz(),this.ǃGyF(),this.ǃGyl())}ǃGyz(){if(!this.ǃwe())for(let ye of this.ǃc_q())ye.ǃcVi()}ǃGyF(){if(!this.ǃwe())for(let ye of this.ǃSF())ye.ǃcVi()}ǃGyl(){if(!this.ǃwe())for(let ye of this.ǃsq())ye.ǃcVi()}ǃGyn(ye){ye=!!ye;this.ǃGfw===ye||(this.ǃGfw=ye,app.ǃHr(this,"projectanychange"))}ǃIl(){return this.ǃGfw}ǃwe(){return this.ǃYv}ǃSr(){return this.ǃGfo}ǃGyu(){this.ǃGfo=!0}ǃGyw(){this.ǃGyX&&(this.ǃGyk=this.ǃSz(this.ǃGyX)),this.ǃGyX="",this.ǃGyo();for(let we of this.ǃGyH())we.ǃDD();for(let we of this.ǃSF())we.ǃDD();for(let we of this.ǃTr())we.ǃDD();this.ǃGyW.ǃDD(),this.ǃYv=!1,this.ǃGyI(),this.ǃGyr=this.ǃGyx();let ye=this.ǃGyr.length,Te=performance.now(),ke=ǃG.ǃcrS.ǃcrZ("perf");this.ǃGyJ().then(()=>{if(ke&&console.log(`[Project] Finished background parsing ${ye} expressions over duration of ${performance.now()-Te} ms`),!ǃG.ǃcvM())return app.ǃGyZ()})}ǃGyJ(){return ǃG.ǃckO(()=>{if(this.ǃGyS(),this.ǃGyr.length)return this.ǃGyJ()})}ǃGyS(){let ye=this.ǃGyr;for(let Te=0,ke=Math.min(50,ye.length);TeTe)throw new Error(_387);assert(Te>=this.ǃGym.length||null===this.ǃGym[Te],"reserving UID that is already in use");for(let ke=this.ǃGym.length-1;keye)throw new Error(_387);assert(yeye)throw new Error(_387);return!!this.ǃGpD(ye)}ǃGpD(ye){if(ǃG.ǃTH(ye),ye=Math.floor(ye),0>ye)throw new Error(_387);return ye>=this.ǃGym.length?null:this.ǃGym[ye]}ǃGBD(){return this.ǃGym.length}ǃGpY(){let ye=0;for(let Te=0,ke;15>Te;++Te){if(ke=Math.floor(10*Math.random()),0===Te)for(;0===ke;)ke=Math.floor(10*Math.random());ye*=10,ye+=ke}return ye}ǃGeb(){return this.ǃGfn}ǃGBi(ye){ǃG.ǃbv(ye);this.ǃGfM===ye||(this.ǃGfM=ye,this.ǃcVi())}ǃGBR(){return this.ǃGfM}ǃGBb(){return this.ǃGfY}ǃcX_(ye){ǃG.ǃbv(ye),this.ǃGfY=ye}ǃcAd(){return ǃG.ǃbx.ǃGBT()?ǃG.ǃbx.ǃGBX().ǃGBk().ǃTJ(this,!1):null}ǃr(ye){if((ǃG.ǃbv(ye),ye=ǃG.ǃcad(ye),!!ye.length)&&this.ǃclE!==ye){if(!ǃG.ǃcaP(ye))throw new Error("name has invalid characters");this.ǃclE=ye,this.ǃcVi(),app.ǃGB$(),app.ǃHr(this,"projectnamechange")}}ǃVD(ye,Te){if(ǃG.ǃbv(ye),ǃG.ǃc$i(Te),ǃG.ǃi.ǃT("model.project.errors"),ye=ǃG.ǃcad(ye),!ǃG.ǃcaP(ye)){let ke=lang(".name-invalid.title"),we=lang(".name-invalid.message");return ǃG.ǃGD.ǃGr.ǃev.ǃm$(Te,"warning",ke,we,{align:"bottom"}),void ǃG.ǃi.ǃW()}ǃG.ǃi.ǃW(),this.ǃr(ye)}ǃcu(){return this.ǃclE}ǃV(ye){ǃG.ǃbv(ye);this.ǃGmo.description===ye||(this.ǃGmo.description=ye,this.ǃcVi())}ǃkQ(){return this.ǃGmo.description}ǃA(ye){ǃG.ǃbv(ye);this.ǃGmo.version===ye||(this.ǃGmo.version=ye,this.ǃcVi())}ǃSd(){return this.ǃGmo.version}ǃ_(ye){ǃG.ǃbv(ye);this.ǃGmo.ǃGf_===ye||(this.ǃGmo.ǃGf_=ye,this.ǃcVi())}ǃSf(){return this.ǃGmo.ǃGf_}ǃSB(ye){ǃG.ǃbv(ye);this.ǃGmo.ǃGft===ye||(this.ǃGmo.ǃGft=ye,this.ǃcVi())}ǃSy(){return this.ǃGmo.ǃGft}ǃSu(ye){ǃG.ǃbv(ye);this.ǃGmo.ǃGfP===ye||(this.ǃGmo.ǃGfP=ye,this.ǃcVi())}ǃSW(){return this.ǃGmo.ǃGfP}ǃSp(ye){ǃG.ǃbv(ye);this.ǃGmo.ǃGfj===ye||(this.ǃGmo.ǃGfj=ye,this.ǃcVi())}ǃSe(){return this.ǃGmo.ǃGfj}ǃSS(ye){if(ǃG.ǃTH(ye),ye=Math.floor(ye),2>ye)throw new Error("invalid viewport width");this.ǃGfz===ye||(this.ǃGfz=ye,this.ǃcVi())}ǃDO(){return this.ǃGfz}ǃSs(ye){if(ǃG.ǃTH(ye),ye=Math.floor(ye),2>ye)throw new Error("invalid viewport height");this.ǃGfF===ye||(this.ǃGfF=ye,this.ǃcVi())}ǃDQ(){return this.ǃGfF}ǃsT(ye){ye=!!ye;this.ǃGmo.ǃGfd===ye||(this.ǃGmo.ǃGfd=ye,this.ǃcVi())}ǃnC(){return this.ǃGmo.ǃGfd}ǃSY(ye){if(ǃG.ǃmL(ye,ǃGm),ye&&ye.ǃTS()!==this)throw new Error("layout from wrong project");this.ǃGyk===ye||(this.ǃGyk=ye||null,this.ǃcVi())}ǃSh(){return this.ǃGyk&&this.ǃGyk.ǃkM()?this.ǃGyk:null}ǃSw(ye){ye=!!ye;this.ǃGmo.ǃGfE===ye||(this.ǃGmo.ǃGfE=ye,this.ǃcVi())}ǃSl(){return this.ǃGmo.ǃGfE}ǃsG(ye){if(ǃG.ǃbv(ye),!ae.has(ye))throw new Error(`invalid fullscreen mode '${ye}'`);this.ǃGmo.ǃGfe===ye||(this.ǃGmo.ǃGfe=ye,this.ǃcVi())}ǃsc(){return this.ǃGmo.ǃGfe}ǃGBr(){return"off"!==this.ǃsc()}ǃGBV(){switch(this.ǃsc()){case"off":return 0;case"scale-inner":return 2;case"scale-outer":return 3;case _391:return 4;case _395:return 5;default:throw new Error("invalid fullscreen mode");}}ǃsD(ye){if(ǃG.ǃbv(ye),!de.has(ye))throw new Error(`invalid fullscreen quality '${ye}'`);this.ǃGmo.ǃGfp===ye||(this.ǃGmo.ǃGfp=ye,this.ǃcVi())}ǃsm(){return this.ǃGmo.ǃGfp}ǃSv(ye){ǃG.ǃg(ye,ǃG.ǃBc);this.ǃGmo.backgroundColor.ǃcNi(ye)||(this.ǃGmo.backgroundColor.ǃccV(ye),this.ǃcVi())}ǃT$(){return this.ǃGmo.backgroundColor.clone()}ǃSa(ye){ǃG.ǃg(ye,ǃG.ǃBc);this.ǃGmo.ǃGff.ǃcNi(ye)||(this.ǃGmo.ǃGff.ǃccV(ye),this.ǃcVi())}ǃSq(){return this.ǃGmo.ǃGff.clone()}ǃSK(ye){ye=!!ye;this.ǃGmo.ǃGfy===ye||(this.ǃGmo.ǃGfy=ye,this.ǃcVi())}ǃSN(){return this.ǃGmo.ǃGfy}ǃSM(ye){ǃG.ǃg(ye,ǃG.ǃBc);this.ǃGmo.ǃGfB.ǃcNi(ye)||(this.ǃGmo.ǃGfB.ǃccV(ye),this.ǃcVi())}ǃSn(){return this.ǃGmo.ǃGfB.clone()}ǃsV(ye){if(ye=!!ye,this.ǃGmo.ǃGfW!==ye){if(!ye&&"c3"===this.ǃTk())throw new Error("cannot disable high-DPI in C3 runtime");this.ǃGmo.ǃGfW=ye,this.ǃcVi()}}ǃsr(){return this.ǃGmo.ǃGfW||"c3"===this.ǃTk()}ǃsR(ye){if(ǃG.ǃbv(ye),!re.has(ye))throw new Error(`invalid orientation '${ye}'`);this.ǃGmo.ǃGfu===ye||(this.ǃGmo.ǃGfu=ye,this.ǃcVi())}ǃsi(){return this.ǃGmo.ǃGfu}ǃGBA(){switch(this.ǃsi()){case"any":return 0;case"portrait":return 1;case"landscape":return 2;default:throw new Error("invalid orientation");}}ǃs$(ye){if(ye=!!ye,this.ǃGmo.ǃGfU!==ye){if(!ye&&"c3"===this.ǃTk()){if(this.ǃwe())return;throw new Error("cannot disable WebGL in C3 runtime")}this.ǃGmo.ǃGfU=ye,this.ǃcVi()}}ǃsX(){return this.ǃGmo.ǃGfU||"c3"===this.ǃTk()}ǃsb(ye){if(ǃG.ǃbv(ye),!Ge.has(ye))throw new Error(`invalid sampling mode '${ye}'`);this.ǃGmo.ǃGfv===ye||(this.ǃGmo.ǃGfv=ye,this.ǃcVi(),this.ǃGBL(),app.ǃM().ǃn())}ǃpO(){return this.ǃGmo.ǃGfv}ǃst(ye){if(ǃG.ǃbv(ye),!oe.has(ye))throw new Error(`invalid downscaling quality '${ye}'`);this.ǃGmo.ǃGfq===ye||(this.ǃGmo.ǃGfq=ye,this.ǃcVi(),this.ǃGB_(),app.ǃM().ǃn())}ǃs_(){return this.ǃGmo.ǃGfq}ǃGBt(){switch(this.ǃs_()){case"low":return 0;case"medium":return 1;case"high":return 2;default:throw new Error("invalid downscaling quality");}}ǃSH(ye){if(ǃG.ǃbv(ye),!le.has(ye))throw new Error(`invalid loader style '${ye}'`);return this.ǃGmo.ǃGfa===ye?void 0:app.ǃTT()&&ye!==_381?void(this.ǃwe()||app.ǃkm(5)):void(this.ǃGmo.ǃGfa=ye,this.ǃcVi())}ǃSo(){return app.ǃTT()?_381:this.ǃGmo.ǃGfa}ǃGBP(){switch(this.ǃSo()){case _388:return 0;case"progress":return 1;case"percent":return 2;case"none":return 3;case _381:return 4;default:throw new Error("invalid loader style");}}ǃSx(ye){ye=!!ye;this.ǃGmo.ǃGfg===ye||(this.ǃGmo.ǃGfg=ye,this.ǃcVi())}ǃSI(){return this.ǃGmo.ǃGfg}ǃsj(ye){ye=!!ye;this.ǃGmo.ǃGfN===ye||(this.ǃGmo.ǃGfN=ye,this.ǃcVi())}ǃsP(){return this.ǃGmo.ǃGfN}ǃsk(ye){if(ǃG.ǃbv(ye),!ue.has(ye))throw new Error("invalid runtime");this.ǃGfH===ye||(this.ǃGfH=ye,this.ǃcVi())}ǃTk(){return this.ǃGfH}ǃGBj(ye){return ye=!!ye,this.ǃGfx===ye?void 0:app.ǃTT()&&ye?void(this.ǃwe()||app.ǃkm(19)):void(this.ǃGfx=ye,this.ǃcVi())}ǃsy(){return!app.ǃTT()&&this.ǃGfx}ǃsL(ye){ye=!!ye;this.ǃGmo.ǃGfK===ye||(this.ǃGmo.ǃGfK=ye,this.ǃcVi())}ǃsA(){return this.ǃGmo.ǃGfK}*ǃrn(){for(let ye of this.ǃSF())for(let Te of ye.ǃrn())yield Te}*ǃGBd(){for(let ye of this.ǃrn())ye.ǃmq()||(yield ye)}*ǃGBE(){for(let ye of this.ǃrn())ye.ǃmq()&&(yield ye)}ǃFO(){return this.ǃGyT}ǃSF(){return this.ǃGyT.ǃGiC()}ǃGyU(){return this.ǃGyT.ǃGfR()}ǃSz(ye){ǃG.ǃbv(ye),ye=ye.toLowerCase();for(let Te of this.ǃSF())if(ǃG.ǃck_(ye,Te.ǃcu()))return Te;return null}ǃGBe(ye){return ǃG.ǃbv(ye),!!this.ǃSz(ye)}ǃGBp(){let ye=1,Te="",ke=lang("model.project.new-layout-name");do Te=ke.replace("{0}",ye),++ye;while(this.ǃGBe(Te));return Te}ǃGBf(){return ǃG.ǃds(this.ǃSF())}ǃGBy(){return ǃG.ǃds(this.ǃsq())}ǃmE(){return this.ǃGy$}ǃsq(){return this.ǃGy$.ǃGiC()}ǃGBB(){return this.ǃGy$.ǃGfR()}ǃTh(ye){ǃG.ǃbv(ye),ye=ye.toLowerCase();for(let Te of this.ǃsq())if(ǃG.ǃck_(ye,Te.ǃcu()))return Te;return null}ǃGBW(ye){return ǃG.ǃbv(ye),!!this.ǃTh(ye)}ǃGBu(){let ye=1,Te="",ke=lang("model.project.new-event-sheet-name");do Te=ke.replace("{0}",ye),++ye;while(this.ǃGBW(Te));return Te}ǃGyo(){this.ǃGBU(ǃG.ǃX(ǃc_w))}ǃGBv(ye){let Te=ǃG.ǃX(ǃGBq,ye);return this.ǃGBU(Te),Te.ǃkh()}ǃc_N(){this.ǃwe()||this.ǃGBU(ǃG.ǃX(ǃGBa))}ǃcLy(){this.ǃwe()||this.ǃGBU(ǃG.ǃX(ǃGBg))}ǃGBU(ye){ǃG.ǃg(ye,ǃGBN);for(let Te of this.ǃsq())Te.ǃmj().accept(ye)}ǃcDW(ye){let Te=null;if(ye instanceof ǃSR)Te=ǃG.ǃX(ǃGBK,ye);else if(ye instanceof ǃSi)Te=ǃG.ǃX(ǃGBn,ye);else if(ye instanceof ǃGv)Te=ǃG.ǃX(ǃGBM,ye);else if(ye instanceof ǃSb)Te=ǃG.ǃX(ǃGBC,ye);else if(ye instanceof ǃ_K)Te=ǃG.ǃX(ǃGBh,ye);else if(ye instanceof Plugin)Te=ǃG.ǃX(ǃGBY,ye,this);else if(ye instanceof ǃGBz)Te=ǃG.ǃX(ǃGBF,ye,this);else if(ye instanceof ǃGBl)Te=ǃG.ǃX(ǃGBw,ye,this);else throw new Error("cannot find all references for given type");return this.ǃGBU(Te),Te.ǃkh()}ǃGBo(ye,Te,ke=!0){return ǃG.ǃbv(ye),ǃG.ǃmL(Te,ǃcLB),ke=!!ke,!!this.ǃGBH(ye,Te,ke)}ǃGBH(ye,Te,ke=!0){ǃG.ǃbv(ye),ǃG.ǃmL(Te,ǃcLB),ke=!!ke;for(let we of this.ǃGBI(Te,ke))if(ǃG.ǃck_(ye,we.ǃmv()))return we;return null}ǃGBx(ye){ǃG.ǃmL(ye,ǃcLB);let Te=1,ke="",we=lang("model.event-sheet.event-variable.new-variable-name");do ke=we.replace("{0}",Te),++Te;while(this.ǃGBo(ke,ye,!1));return ke}*ǃGBI(ye,Te=!0){ǃG.ǃmL(ye,ǃcLB),Te=!!Te,Te||(ye?yield*ye.ǃGBJ():yield*this.ǃGBZ()),ye&&(yield*ye.ǃGBS()),yield*this.ǃGBs()}*ǃGBO(ye,Te){ǃG.ǃmL(ye,ǃcLB);for(let ke of this.ǃGBI(ye))"boolean"===ke.ǃmU()?Te&&(yield ke):Te||(yield ke)}*ǃGBs(){for(let ye of this.ǃsq())yield*ye.ǃGBs()}*ǃGBZ(){for(let ye of this.ǃsq())yield*ye.ǃmj().ǃGBJ()}ǃGBQ(ye){ǃG.ǃbv(ye);let Te=ǃG.ǃX(ǃGWc,ye);return this.ǃGBU(Te),Te.ǃGWG()}ǃGWm(ye){return ǃG.ǃbv(ye),!!this.ǃGBQ(ye)}ǃGWD(){let ye=1,Te="",ke=lang("model.event-sheet.event-group.new-group-name");do Te=ke.replace("{0}",ye),++ye;while(this.ǃGWm(Te));return Te}ǃGWi(){const ye=ǃG.ǃX(ǃGWR);return this.ǃGBU(ye),ye.ǃGWb()}ǃGWT(){const ye=ǃG.ǃX(ǃGWk);return this.ǃGBU(ye),ye.ǃGWb()}ǃGWX(){let ye=ǃG.ǃX(ǃGW$);this.ǃGBU(ye);let Te=ye.ǃGWr();return Te?{ok:!1,ǃGWV:Te}:{ok:!0}}ǃGyx(){let ye=ǃG.ǃX(ǃGWA);return this.ǃGBU(ye),ye.ǃGWL()}ǃIn(){return this.ǃGyE.ǃGW_()}ǃIC(){return this.ǃGyE.ǃGWt()}ǃVc(ye){ǃG.ǃg(ye,ǃVm),this.ǃGyE.ǃrL(ye),this.ǃGyE.ǃGWP(!1),app.ǃHr(this,_392),this.ǃGyE.ǃGWP(!0)}ǃcXx(ye){ǃG.ǃg(ye,ǃVm),this.ǃGyE.ǃj_(ye),app.ǃHr(this,_392)}ǃoz(){return this.ǃGyE.ǃIH()?this.ǃGyE.ǃoz().then(ye=>ye):Promise.resolve(!1)}ǃoF(){return this.ǃGyE.ǃII()?this.ǃGyE.ǃoF().then(ye=>ye):Promise.resolve(!1)}ǃIH(){return this.ǃGyE.ǃIH()}ǃII(){return this.ǃGyE.ǃII()}ǃel(){this.ǃGyE.ǃel()}ǃWC(){return this.ǃGyE.ǃWC()}ǃGWj(ye){this.ǃGyE.ǃqX(!!ye)}ǃcjo(){return this.ǃGfI}ǃeu(){let ye=0;for(let Te of this.ǃGyH())for(let ke of Te.ǃLo())ye++;return ye}ǃpn(){return this.ǃGfZ}ǃGyH(){return this.ǃGfZ.ǃGiC()}ǃGyq(){return this.ǃGfZ.ǃGfR()}*ǃc_q(){yield*this.ǃGyH(),yield*this.ǃGWd()}ǃGWE(ye){return ǃG.ǃbv(ye),this.ǃGfS.get(ye.toLowerCase())||null}ǃpB(ye){ǃG.ǃbv(ye);let Te=this.ǃGfS.get(ye.toLowerCase())||null;return Te instanceof ǃEE||(Te=null),Te}ǃGWe(ye){return ǃG.ǃbv(ye),!!this.ǃpB(ye)}ǃGWp(ye){return ǃG.ǃbv(ye),this.ǃGfS.has(ye.toLowerCase())}ǃpt(ye){if(ǃG.ǃbv(ye),ye=ǃ_K.ǃGWf(ye,!0),!this.ǃGWp(ye))return ye;let Te=2,ke="";do ke=ye+Te,++Te;while(this.ǃGWp(ke));return ke}ǃGWy(ye){ǃG.ǃg(ye,ǃEE);for(let ke of this.ǃGyc)if(ke.ǃZQ(ye))throw new Error("object type already in shared collection");for(let ke of this.ǃGyc)if(!ke.ǃcQL())return ke.ǃGWB(ye),ke.ǃGWW();let Te=ǃG.ǃX(ǃGWu,this,this.ǃGWU());return Te.ǃGWB(ye),this.ǃGyc.push(Te),Te.ǃGWW()}ǃGWv(ye){ǃG.ǃg(ye,ǃEE);for(let Te of this.ǃGyc)if(Te.ǃla(ye))return void(Te.ǃFQ()&&(Te.ǃz(),ǃG.ǃcaW(this.ǃGyc,Te)));throw new Error("could not find collection to remove from")}*ǃGWq(){for(let ye of this.ǃGyc)yield ye}*ǃGWa(){for(let ye of this.ǃGWq())yield ye.ǃGWW();for(let ye of this.ǃGyH())(ye.ǃ_H()||ye.ǃ_w())&&(ye.ǃGWg()||(yield ye.ǃGWN()))}*ǃGWK(){for(let ye of this.ǃGWa())for(let Te of ye.ǃGWn())yield Te}ǃGWM(ye){return ǃG.ǃbv(ye),this.ǃGyG.has(ye)}ǃGWC(ye){if(ǃG.ǃg(ye,ǃGWh),this.ǃGWM(ye.ǃcu()))throw new Error(`sprite sheet collection name '${ye.ǃcu()}' already in use`);this.ǃGyG.set(ye.ǃcu(),ye)}ǃGWY(ye){if(ǃG.ǃg(ye,ǃGWh),!this.ǃGWM(ye.ǃcu())){if(this.ǃSr())return;throw new Error("expected name to be in use")}this.ǃGyG.delete(ye.ǃcu())}ǃGWU(){let ye=0,Te="";do Te="shared-"+ye,++ye;while(this.ǃGWM(Te));return Te}ǃGWz(){let ye=this.ǃGyR;for(;this.ǃGyi.has(ye);)ye++;return this.ǃGyi.add(ye),this.ǃGyR=ye+1,ye}ǃGWF(ye){if(ǃG.ǃTH(ye),0>ye)throw new Error("invalid id");if(this.ǃGyi.has(ye))throw new Error("id already in use");this.ǃGyi.add(ye)}ǃGWl(ye){if(ǃG.ǃTH(ye),0>ye)throw new Error("invalid id");if(!this.ǃGyi.has(ye))throw new Error("id not in use");this.ǃGyi.delete(ye)}ǃGWw(){return"c2"===this.ǃTk()?2048:4096}ǃGWo(){let ye=new Set;for(let Te of this.ǃGyH())ye.add(Te.ǃcy());return ye}ǃGWH(){let ye=new Set,Te=new Set,ke=new Set;for(let we of this.ǃc_q()){if(ye.add(we.ǃcy()),we.ǃcy().ǃlu())for(let Le of we.ǃGWI())Te.add(Le.ǃOI());if(we.ǃcy().ǃlU())for(let Le of we.ǃGWx())ke.add(Le.ǃpH())}for(let we of this.ǃSF()){for(let Le of we.ǃGWx())ke.add(Le.ǃpH());for(let Le of we.ǃrn())for(let Ce of Le.ǃGWx())ke.add(Ce.ǃpH())}return{ǃGWJ:ye,ǃGWZ:Te,ǃGWS:ke}}ǃGWs(){const ye=this.ǃGWH(),Te=[];for(const ke of ye.ǃGWJ)"built-in"===ke.ǃcbH()||ke.ǃGWO()||Te.push({type:_382,name:ke.ǃcu(),id:ke.ǃEK(),ǃGf_:ke.ǃSf()});for(const ke of ye.ǃGWZ)"built-in"===ke.ǃcbH()||ke.ǃGWO()||Te.push({type:_386,name:ke.ǃcu(),id:ke.ǃEK(),ǃGf_:ke.ǃSf()});return Te}ǃsB(ye){if(ye=!!ye,!this.ǃsy()&&ye){const Te=this.ǃGWs();if(Te.length){ǃG.ǃi.ǃT("model.project.errors.unbundlable-addons-warning");const ke={ǃGWQ:Te,caption:lang(".title"),ǃGuc:lang(".message")};ǃG.ǃi.ǃW();const we=ǃG.ǃGD.ǃDZ.ǃDJ("MissingAddons");we.ǃ$i(ke)}}this.ǃGBj(ye)}ǃGuG(){this.ǃGyb=!0}ǃGum(){return this.ǃGyb}ǃGBL(){for(let ye of this.ǃGyG.values())for(let Te of ye.ǃGuD())Te.ǃym()}ǃGB_(){for(let ye of this.ǃGyG.values())for(let Te of ye.ǃGuD())Te.ǃym(),Te.ǃGui();for(let ye of this.ǃGyH())ye.ǃGB_()}*ǃccR(ye){ǃG.ǃg(ye,ǃGBz);for(let Te of this.ǃGyH())if(Te.ǃcy().ǃlu())for(let Gt of Te.ǃGWI())Gt.ǃOI()===ye&&(yield*Gt.ǃEc())}ǃGuR(ye){this.ǃGfJ[ye.ǃsn()].add(ye.ǃEK()),this.ǃcVi()}ǃGub(ye){return!!this.ǃGuT(ye)}ǃGuT(ye){ǃG.ǃbv(ye);let Te=this.ǃGfS.get(ye.toLowerCase())||null;return Te instanceof ǃeg||(Te=null),Te}ǃlN(){let ye=1,Te="";do Te=ǃmo("model.object-class.new-family-name",ye),++ye;while(this.ǃGWp(Te));return Te}ǃln(ye){if(ǃG.ǃg(ye,ǃeg),0===ye.ǃlv())throw new Error("cannot add empty family");this.ǃGfQ.ǃrL(ye),this.ǃcVi()}ǃFC(){return this.ǃGfQ}ǃGWd(){return this.ǃGfQ.ǃGiC()}ǃGyv(){return this.ǃGfQ.ǃGfR()}*ǃFy(ye){ǃG.ǃg(ye,ǃEE);let Te=this.ǃGfs.get(ye);Te||(Te=this.ǃGuk(ye));for(let ke of Te)ke.ǃkM()&&(yield ke)}*ǃGuX(ye){ǃG.ǃg(ye,ǃEE);let Te=this.ǃGfs.get(ye);Te||(Te=this.ǃGuk(ye));for(let ke of Te)yield ke}ǃGuk(ye){ǃG.ǃg(ye,ǃEE);let Te=[];for(let ke of this.ǃGyv())ke.ǃZQ(ye)&&Te.push(ke);return assert(!this.ǃGfs.has(ye),"overwriting families for type cache entry"),this.ǃGfs.set(ye,Te),Te}ǃlk(){return this.ǃGyV}ǃlX(){return this.ǃGyA}ǃl$(){return this.ǃGyL}ǃlr(){return this.ǃGy_}ǃlV(){return this.ǃGyt}ǃlA(){return this.ǃGyP}*ǃGu$(){yield this.ǃGyV,yield this.ǃGyA,yield this.ǃGyL,yield this.ǃGy_,yield this.ǃGyt,yield this.ǃGyP}*ǃGur(){yield*this.ǃGyV.ǃGiC(),yield*this.ǃGyA.ǃGiC()}*ǃGuV(){yield*this.ǃGyL.ǃGiC(),yield*this.ǃGy_.ǃGiC(),yield*this.ǃGyt.ǃGiC(),yield*this.ǃGyP.ǃGiC()}*ǃGuA(){for(let ye of this.ǃGuV())yield*ye.ǃTA()}ǃGuL(ye){ǃG.ǃbv(ye);for(let Te of this.ǃGu$())if(Te.ǃTV()===ye)return Te;throw new Error("invalid folder kind")}*ǃTr(){for(let ye of this.ǃGu$())yield*ye.ǃGiC()}*ǃGya(){for(let ye of this.ǃGu$())yield*ye.ǃGfR()}*ǃGu_(){for(let ye of this.ǃTr())yield*ye.ǃTA()}ǃGut(){return this.ǃGy_.ǃGiC()}ǃQE(){let ye=[];for(let Te of this.ǃGut())ye.push(Te.ǃwV());return Promise.all(ye)}ǃJF(ye){ǃG.ǃbv(ye);for(let Te of this.ǃGy_.ǃGiC())Te.ǃls()&&ǃG.ǃck_(ye,Te.ǃcu())&&Te.ǃwV()}ǃcmL(ye){ǃG.ǃbv(ye);let Te=ye.toLowerCase();for(let ke of this.ǃTr())if(ǃG.ǃck_(ke.ǃcu(),Te))return ke;return null}ǃGuP(ye){return ǃG.ǃbv(ye),!!this.ǃcmL(ye)}ǃcm_(ye){ǃG.ǃbv(ye);let Te=ǃG.ǃFg(ye),ke=ǃG.ǃFa(ye),we=this.ǃcmL(Te);return we?we.ǃGuj(ke):null}ǃGud(ye){return ǃG.ǃbv(ye),!!this.ǃcm_(ye)}ǃGuE(){return Promise.all(ge.map(Te=>{return ǃG.ǃ$p("media/"+Te).then(ke=>{this.ǃlV().ǃGue(ke,Te)})}))}ǃcbY(){const ye=/icon\-\d+\.png/i,Te=[];for(const ke of this.ǃGyt.ǃGiC())for(const we of ke.ǃTA())ye.test(we.ǃTP())&&Te.push(we);return Te.sort((ke,we)=>{const Le=ke.ǃTP(),Ce=we.ǃTP(),xe=parseInt(Le.substr(5,Le.length-9),10),Re=parseInt(Ce.substr(5,Ce.length-9),10);return xe-Re}),Te}ǃGup(){for(const ye of this.ǃGur())for(const Te of ye.ǃTA())if(Te.ǃTt().ǃT_()===_394)return!0;return!1}ǃGyI(){this.ǃwe()||app.ǃdQ().then(ye=>{ye&&this.ǃGyy.ǃGI()})}ǃGyB(){this.ǃcLj()&&app.ǃcDp("info",lang("model.project.exceeds-free-limits"))}ǃcLj(){if(!app.ǃTT())return!1;const ye=this.ǃGBv(!0).ǃGuf;if(ye>app.ǃGuy())return!0;let Te=0;const ke=app.ǃGuB(),we=app.ǃVT();for(const Le of this.ǃSF()){Te+=Le.ǃGuW();let Ce=0;for(const xe of Le.ǃrn())++Ce,Te+=xe.ǃGuW();if(Ce>we||Te>ke)return!0}for(const Le of this.ǃc_q())if(Te+=Le.ǃGuW(),Te>ke)return!0;return!!(this.ǃwD()>app.ǃwi())}ǃwD(){let ye=0;for(const Te of this.ǃGut())++ye;return ye}ǃGuu(){let ye=0;for(const Te of this.ǃSF()){ye+=Te.ǃGuW();for(const ke of Te.ǃrn())ye+=ke.ǃGuW()}for(const Te of this.ǃc_q())ye+=Te.ǃGuW();return ye}ǃGuU(ye,Te){ǃG.ǃg(ye,ǃTb),ǃG.ǃLK(Te,Plugin,ǃGBz);let ke=Te.ǃGuv();ke.length&&ye.ǃGuq(Te,ke)}ǃGua(ye){ǃG.ǃg(ye,ǃTb);let Te=this.ǃGWH(),ke=Te.ǃGWJ,we=Te.ǃGWZ,Le=Te.ǃGWS,Ce=[];"c3"===this.ǃTk()&&ye.ǃGug(this.ǃcjo().ǃcy());for(let xe of ke)ye.ǃGug(xe),this.ǃGuU(ye,xe),Ce.push([ye.ǃGuN(xe.ǃEK()),xe.ǃzQ(),"world"===xe.ǃEq(),xe.ǃGuK(),xe.ǃGun(),xe.ǃGuM(),xe.ǃGuC(),xe.ǃGuh(),xe.ǃlU(),xe.ǃpI()]);for(let xe of we)ye.ǃGuY(xe),this.ǃGuU(ye,xe);for(let xe of Le)ye.ǃGuz(xe.ǃEK(),xe.ǃGuF());return Ce}ǃGul(ye){ǃG.ǃg(ye,ǃTb);let Te=[];for(let ke of this.ǃGWd()){let we=[ye.ǃGuw(ke)];for(let Le of ke.ǃBW())we.push(ye.ǃGuw(Le));Te.push(we)}return Te}ǃGuo(ye){ǃG.ǃg(ye,ǃTb),this.ǃGyd=0,this.ǃGyj=0;let Te=[];for(let ke of this.ǃGur()){let we=[],Le=[...ke.ǃTA()].filter(Ce=>ye.ǃGuH(Ce)).sort(De.ǃTL);for(let Ce of Le)we.push([Ce.ǃTt().ǃT_(),Ce.ǃFa().toLowerCase(),Ce.ǃbJ().size]);we.length&&("music"===ke.ǃTV()?this.ǃGyd+=Le[0].ǃbJ().size:this.ǃGyj+=Le[0].ǃbJ().size,Te.push([ke.ǃcu().toLowerCase(),we]))}return Te}static ǃGuI(ye){let Te=ve.get(ye.ǃTt().ǃT_());return Te?Te:99}static ǃTL(ye,Te){return De.ǃGuI(ye)-De.ǃGuI(Te)}ǃGuF(ye){ǃG.ǃg(ye,ǃTb);let Te=null,ke=[...this.ǃc_q()].map(Ce=>ǃG.ǃckO(()=>Ce.ǃGuF(ye))),we=null,Le=null;return Promise.all(ke).then(Ce=>{Te=Ce;let xe=[...this.ǃSF()].map(Ue=>ǃG.ǃckO(()=>Ue.ǃGuF(ye))),Re=[...this.ǃsq()].map(Ue=>ǃG.ǃckO(()=>Ue.ǃGuF(ye)));return Promise.all([Promise.all(xe),Promise.all(Re)])}).then(Ce=>{we=Ce[0],Le=Ce[1];let xe=ye.ǃSh(),Re=[...ǃGuJ.ǃGux(this)].map(He=>He.ǃGuF(ye)),Ue=[...this.ǃGut()].map(He=>He.ǃcu());return{project:[this.ǃcu(),xe?xe.ǃcu():null,this.ǃGua(ye),Te,this.ǃGul(ye),we,Le,this.ǃGuo(ye),ye.ǃki(),this.ǃnC(),this.ǃDO(),this.ǃDQ(),this.ǃGBV(),this.ǃsX(),"linear"===this.ǃpO(),this.ǃsP(),this.ǃSd(),this.ǃsr(),this.ǃSl(),this.ǃGBP(),this.ǃGBA(),this.ǃGBD(),this.ǃsp(),"high"===this.ǃsm(),this.ǃGBt(),this.ǃSI(),!1,Re,ye.ǃkR(),Ue,this.ǃsA()]}})}ǃGuZ(){return this.ǃGyd}ǃGuS(){return this.ǃGyj}ǃGus(){return{properties:{description:this.ǃGmo.description,version:this.ǃGmo.version,author:this.ǃGmo.ǃGf_,authorEmail:this.ǃGmo.ǃGft,authorWebsite:this.ǃGmo.ǃGfP,appId:this.ǃGmo.ǃGfj,pixelRounding:this.ǃGmo.ǃGfd,useLoaderLayout:this.ǃGmo.ǃGfE,fullscreenMode:this.ǃGmo.ǃGfe,fullscreenQuality:this.ǃGmo.ǃGfp,backgroundColor:this.ǃGmo.backgroundColor.toJSON(),splashColor:this.ǃGmo.ǃGff.toJSON(),useThemeColor:this.ǃGmo.ǃGfy,themeColor:this.ǃGmo.ǃGfB.toJSON(),useHighDpi:this.ǃGmo.ǃGfW,orientations:this.ǃGmo.ǃGfu,enableWebGL:this.ǃGmo.ǃGfU,sampling:this.ǃGmo.ǃGfv,downscaling:this.ǃGmo.ǃGfq,loaderStyle:this.ǃGmo.ǃGfa,preloadSounds:this.ǃGmo.ǃGfg,clearBackground:this.ǃGmo.ǃGfN,enhancedAccelerationPrecision:this.ǃGmo.ǃGfK,previewEffects:this.ǃGmo.ǃGuO,previewBrowser:this.ǃGmo.ǃGuQ,pauseOnUnfocus:this.ǃGmo.ǃGUc},viewportWidth:this.ǃGfz,viewportHeight:this.ǃGfF}}ǃGUG(){let ye={};for(let Te of this.ǃGu$())ye[Te.ǃTV()]=Te.ǃpj();return ye}ǃGUm(ye){const Te=ye.ǃsn(),ke=ye.ǃEK();if(this.ǃGfJ[Te].has(ke)&&ǃG.ǃGUi.ǃGUD(Te,ke,null)){const we=ǃG.ǃGUi.ǃpW(Te,ke,null);return we.ǃGUR()}return ye.ǃGUR()}ǃGUb(ye){const Te=[],ke=this.ǃGWH();for(const we of ke.ǃGWJ){const Le=("addon"===we.ǃcbH()||we.ǃcbH()===_385)&&this.ǃsy()&&we.ǃGWO();Le&&ye.set(`addons/plugin/${we.ǃEK()}.c3addon`,this.ǃGUm(we)),Te.push({type:_382,id:we.ǃEK(),name:we.ǃcu(),author:we.ǃSf(),version:we.ǃSd(),bundled:Le})}for(const we of ke.ǃGWZ){const Le=("addon"===we.ǃcbH()||we.ǃcbH()===_385)&&this.ǃsy()&&we.ǃGWO();Le&&ye.set(`addons/behavior/${we.ǃEK()}.c3addon`,this.ǃGUm(we)),Te.push({type:_386,id:we.ǃEK(),name:we.ǃcu(),author:we.ǃSf(),version:we.ǃSd(),bundled:Le})}for(const we of ke.ǃGWS){const Le=("addon"===we.ǃcbH()||we.ǃcbH()===_385)&&this.ǃsy();Le&&ye.set(`addons/effect/${we.ǃEK()}.c3addon`,this.ǃGUm(we)),Te.push({type:_384,id:we.ǃEK(),name:we.ǃcu(),author:we.ǃSf(),version:we.ǃSd(),bundled:Le})}return this.ǃGfJ.plugin.clear(),this.ǃGfJ.behavior.clear(),this.ǃGfJ.effect.clear(),Te}ǃpj(ye){let Te=this.ǃSh(),ke={projectFormatVersion:ie,name:this.ǃclE,runtime:this.ǃGfH,bundleAddons:this.ǃsy(),usedAddons:this.ǃGUb(ye),uniqueId:this.ǃGfn,cloudId:this.ǃGfM,firstLayout:Te?Te.ǃcu():null,objectTypes:this.ǃGfZ.ǃpj(),containers:[...ǃGuJ.ǃGux(this)].map(we=>we.ǃpj()),families:this.ǃGfQ.ǃpj(),layouts:this.ǃGyT.ǃpj(),eventSheets:this.ǃGy$.ǃpj(),rootFileFolders:this.ǃGUG()};return Object.assign(ke,this.ǃGus())}ǃGUT(ye){let Te=ye.properties;this.ǃV(Te.description),this.ǃA(Te.version),this.ǃ_(Te.author),this.ǃSB(Te.authorEmail),this.ǃSu(Te.authorWebsite),this.ǃSp(Te.appId),this.ǃsT(Te.pixelRounding),this.ǃSw(Te.useLoaderLayout),this.ǃsG(Te.fullscreenMode),this.ǃsD(Te.fullscreenQuality),this.ǃGmo.backgroundColor.ǃcNe(Te.backgroundColor),this.ǃGmo.ǃGff.ǃcNe(Te.splashColor),this.ǃSK(Te.useThemeColor),this.ǃGmo.ǃGfB.ǃcNe(Te.themeColor),this.ǃsV(Te.useHighDpi),this.ǃsR(Te.orientations),this.ǃs$(Te.enableWebGL),this.ǃsb(Te.sampling),this.ǃst(Te.downscaling),this.ǃSH(Te.loaderStyle),this.ǃSx(Te.preloadSounds),this.ǃsj(Te.clearBackground),Te.hasOwnProperty("enhancedAccelerationPrecision")&&this.ǃsL(Te.enhancedAccelerationPrecision),this.ǃSS(ye.viewportWidth),this.ǃSs(ye.viewportHeight)}ǃpU(ye){if(ye.projectFormatVersion>ie)throw new Error("project from a future version of C3");this.ǃclE=ye.name,this.ǃGfH=ye.runtime||"c2",this.ǃGfn=ye.uniqueId,this.ǃGfM=ye.cloudId||"",this.ǃGfx=!!ye.bundleAddons,this.ǃGyX=ye.firstLayout,this.ǃGUT(ye)}ǃGUk(){return this.ǃGyW.ǃpj()}ǃGUX(ye){this.ǃse(ye.previewEffects),this.ǃGep(ye.previewBrowser),this.ǃsf(ye.pauseOnUnfocus)}ǃw_(){return this.ǃGyW.ǃpj()}ǃwd(ye){this.ǃGyW.ǃpU(ye)}ǃeP(ye,Te){ǃG.ǃbv(ye),this.ǃGyW.ǃeP(ye,Te)}ǃwt(ye){return ǃG.ǃbv(ye),this.ǃGyW.ǃwt(ye)}ǃwE(ye){ye=!!ye,this.ǃGyW.ǃctW(ye)}ǃse(ye){this.ǃGyW.ǃGeE(ye)}ǃsE(){return this.ǃGyW.ǃGee()}ǃGep(ye){this.ǃGyW.ǃGep(ye)}ǃGef(){return this.ǃGyW.ǃGef()}ǃsf(ye){this.ǃGyW.ǃGey(ye)}ǃsp(){return this.ǃGyW.ǃGeB()}ǃGU$(ye){ǃG.ǃcDt(ye),ye=Object.assign({},be,ye);const Te=new Map,ke=new Set;ye.ǃGUr=ke;const we=!!ye.ǃGfL;Te.set(_390,JSON.stringify(this.ǃpj(Te))),Te.set(_393,JSON.stringify(this.ǃw_()));for(let Ce of this.ǃGyH())we&&Ce.ǃGUV(ke),(!we||Ce.ǃly())&&Te.set(Ce.ǃGUA(),JSON.stringify(Ce.ǃpj())),Ce.ǃGUL(Te,ye);for(let Ce of this.ǃGWd()){if(we){if(!Ce.ǃly())continue;Ce.ǃGUV(ke)}Te.set(Ce.ǃGUA(),JSON.stringify(Ce.ǃpj()))}for(let Ce of this.ǃSF()){if(we){if(!Ce.ǃly())continue;Ce.ǃGUV(ke)}Te.set(Ce.ǃGUA(Ce.ǃcu()),JSON.stringify(Ce.ǃpj())),Te.set(Ce.ǃGUA(Ce.ǃcu()+".uistate"),JSON.stringify(Ce.ǃw_()))}for(let Ce of this.ǃGu_()){if(we){if(!Ce.ǃly())continue;Ce.ǃGUV(ke)}Te.set(Ce.ǃGUA(),Ce.ǃbJ())}for(let Ce of this.ǃsq()){if(we){if(!Ce.ǃly())continue;Ce.ǃGUV(ke)}Te.set(Ce.ǃGUA(Ce.ǃcu()),JSON.stringify(Ce.ǃpj())),Te.set(Ce.ǃGUA(Ce.ǃcu()+".uistate"),JSON.stringify(Ce.ǃw_()))}we&&this.ǃGU_(ke);return Promise.resolve({ǃGUt:Te,ǃGUP:ke})}ǃGU_(ye){for(let Te of this.ǃGyq())Te.ǃGU_(ye);for(let Te of this.ǃGyv())Te.ǃGU_(ye);for(let Te of this.ǃGyU())Te.ǃGU_(ye);for(let Te of this.ǃGu_())Te.ǃGU_(ye);for(let Te of this.ǃGBB())Te.ǃGU_(ye)}static ǃGUj(ye,Te){ǃG.ǃD_(ye);const ke=ǃG.ǃX(ǃG.ǃGpK,ye);return ke.ǃcze(_390).then(we=>{const Le=ǃG.ǃX(De),Ce=Le.ǃGUd(we),xe=Ce.ǃGWQ,Re=Ce.ǃGUE;return xe.length?Promise.reject({type:_389,ǃGWQ:xe}):Le.ǃGUe(Re,ke).then(()=>{return Te.duplicate&&(we.uniqueId=ee(),we.cloudId=""),Le.ǃGUp(we,ke,Te)})})}ǃGUd(ye){const Te=ye.usedAddons,ke={ǃGWQ:[],ǃGUE:[]};if(!Te)return ke;for(const we of Te)if(we.bundled)ke.ǃGUE.push(we);else{const Le=we.type===_382&&ǃG.ǃv.ǃGUD(we.id,this)||we.type===_386&&ǃG.ǃcl.ǃGUD(we.id,this)||we.type===_384&&ǃG.ǃGUf.ǃGUD(we.id,this);Le||ke.ǃGWQ.push(we)}return ke}ǃGUe(ye,Te){const ke=[];for(const we of ye){const Le=we.id,Ce=we.type;ke.push(Te.ǃczp(`addons/${Ce}/${Le}.c3addon`).then(xe=>{return ǃG.ǃGUi.ǃGUy(xe,this)}))}return Promise.all(ke).then(()=>ǃG.ǃi.ǃUO(!0)).then(()=>ǃG.ǃGUi.ǃGUB(this)).then(()=>ǃG.ǃGUi.ǃGUW(this)).then(()=>ǃG.ǃv.ǃUO()).then(()=>ǃG.ǃcl.ǃUO()).then(()=>ǃG.ǃGUi.ǃGUW(null))}static ǃGUu(ye,Te,ke){ǃG.ǃg(ye,Blob),ǃG.ǃbv(Te);const we=ǃG.ǃX(ǃG.ǃGpM,Te);return ǃG.ǃcgA(ye).then(Le=>{let Ce=ǃG.ǃX(De);return Ce.ǃGUp(Le,we,ke)})}ǃGUp(ye,Te,ke){return ǃG.ǃD_(ye),ǃG.ǃg(Te,ǃG.ǃGpg),this.ǃpU(ye),this.ǃGfZ.ǃGUU(ye.objectTypes,Te).then(()=>{ke.indeterminate=!0}).then(()=>this.ǃGUv(ye.containers)).then(()=>this.ǃGfQ.ǃGUq(ye.families,Te)).then(()=>this.ǃGyT.ǃGUa(ye.layouts,Te)).then(()=>this.ǃGUg(ye.rootFileFolders,Te)).then(()=>this.ǃGy$.ǃGUN(ye.eventSheets,Te)).then(()=>this.ǃGpP()).then(()=>this.ǃGUK(Te)).then(()=>{return this.ǃGyw(),this})}ǃGUK(ye){return ǃG.ǃD_(ye),ye.ǃGpN(_393).then(Te=>{return Te?ye.ǃcze(_393).then(ke=>{return this.ǃwd(ke),this}):this})}ǃGUv(ye){ǃG.ǃkF(ye);for(let Te of ye)ǃGuJ.ǃGUn(this,Te)}ǃGUg(ye,Te){if(ǃG.ǃg(Te,ǃG.ǃGpg),!!ye){let ke=[];for(let[we,Le]of Object.entries(ye)){let Ce=this.ǃGuL(we);ke.push(Ce.ǃGUM(Le,Te))}return Promise.all(ke)}}static ǃGUC(ye,Te){ǃG.ǃD_(ye);let ke=ye.ǃczj(".caproj");if(!ke)throw new Error("missing .caproj file");return ye.ǃczd(ke).then(ǃG.ǃKI.Document.ǃKH).then(we=>{const Le=De.ǃGUh(we);if(Le.length)return Promise.reject({type:_389,ǃGWQ:Le});let Ce=ǃG.ǃX(De);return Ce.ǃGUY(we,ye,Te)}).then(we=>{return we.ǃGyw(),we})}static ǃGUh(ye){const Te=ye.ǃKx(),ke=[],we=Te.ǃcYH("used-plugins");if(we)for(const xe of we.children(_382)){const Re=xe.ǃcYQ("id");ǃG.ǃv.ǃGUD(Re)||ke.push({type:_382,id:Re,name:xe.ǃLx(),ǃGf_:xe.ǃcYQ(_383)})}const Le=Te.ǃcYH("used-behaviors");if(Le)for(const xe of Le.children(_386)){const Re=xe.ǃcYQ("id");ǃG.ǃcl.ǃGUD(Re)||ke.push({type:_386,id:Re,name:xe.ǃLx(),ǃGf_:xe.ǃcYQ(_383)})}const Ce=Te.ǃcYH("used-effects");if(Ce)for(const xe of Ce.children(_384)){const Re=xe.ǃcYQ("id");ǃG.ǃGUf.ǃGUD(Re)||ke.push({type:_384,id:Re,name:xe.ǃLx(),ǃGf_:xe.ǃcYQ(_383)})}return ke}ǃGUY(ye,Te,ke){ǃG.ǃg(ye,ǃG.ǃKI.Document),ǃG.ǃD_(Te);let we=ye.ǃKx();if("c2project"!==we.ǃcYw())throw new Error("expected c2project tag");let Le=ke?ee():we.ǃcYo("unique-id");Le&&(this.ǃGfn=Le),this.ǃclE=we.ǃLx("name"),this.ǃV(we.ǃcYo("description")),this.ǃA(we.ǃcYo("version")),this.ǃ_(we.ǃcYo(_383)),this.ǃSB(we.ǃcYo("author-email")),this.ǃSu(we.ǃcYo("author-website")),this.ǃSp(we.ǃcYo("app-id")),this.ǃsT(we.ǃcYs("pixel-rounding",!1)),this.ǃse(we.ǃcYs("preview-effects",!0)),this.ǃSw(we.ǃcYs("use-loader-layout",!1)),we.ǃczm("first-layout")&&(this.ǃGyX=we.ǃLx("first-layout"));let Ce=we.ǃJk("window-size");this.ǃSS(Ce.ǃcYI("width")),this.ǃSs(Ce.ǃcYI("height"));let xe=we.ǃJk("configuration-settings"),Re=new Map;for(let Se of xe.children("prop"))Re.set(Se.ǃcYQ("name"),Se.ǃLx());this.ǃGep(ǃJI.ǃGUz(Re.get("Preview browser"))),this.ǃsG(ǃJI.ǃGUF(Re.get("Fullscreen in browser"))),this.ǃsD(ǃJI.ǃGUl(Re.get("Fullscreen scaling"))),this.ǃsV("No"!==Re.get("Use high-DPI display")),this.ǃsR(ǃJI.ǃGUw(Re.get("Orientations"))),this.ǃs$("Off"!==Re.get("Enable WebGL")),this.ǃsb(ǃJI.ǃGUo(Re.get("Sampling"))),this.ǃst(ǃJI.ǃGUH(Re.get("Downscaling"))),this.ǃSH(ǃJI.ǃGUI(Re.get("Loader style"))),this.ǃSx("No"!==Re.get("Preload sounds")),this.ǃsf("Yes"===Re.get("Pause on unfocus")),this.ǃsj("No"!==Re.get("Clear background"));let Ue=we.ǃJk("object-folder"),He=we.ǃcYH("families"),Xe=we.ǃJk("layout-folder"),Ie=we.ǃJk("event-folder");return this.ǃGfZ.ǃGUx(Ue,Te).then(()=>this.ǃGUJ()).then(()=>this.ǃGUZ(He)).then(()=>this.ǃGUS(we.ǃcYH("global-instances"))).then(()=>this.ǃGUs(we,Te)).then(()=>this.ǃGyT.ǃGUO(Xe,Te)).then(()=>this.ǃGy$.ǃGUQ(Ie,Te)).then(()=>this.ǃGpP()).then(()=>this)}ǃGvc(ye){if(ǃG.ǃkF(ye),2>ye.length)throw new Error("container needs at least 2 objects");ye.sort(ǃG.ǃcKZ),this.ǃGfO.add(ye.join(","))}ǃGUJ(){for(let ye of this.ǃGfO){let Te=ye.split(","),ke=[];for(let we of Te){let Le=this.ǃpB(we);if(!Le)throw new Error(`missing object type name '${we}' in container`);ke.push(Le)}if(2>ke.length)throw new Error("invalid container");ke[0].ǃQV(ke)}this.ǃGfO.clear()}ǃGUZ(ye){if(ye)for(let Te of ye.children("family")){let ke=ǃeg.ǃGvG(Te,this);this.ǃGfQ.ǃrL(ke)}}ǃGUS(ye){if(ye)for(let Te of ye.children("global-instance")){let ke=Te.ǃcYQ("type"),we=this.ǃpB(ke);if(!we)throw new Error(`cannot find object type named '${ke}'`);we.ǃFc().ǃGvm(Te)}}ǃGUs(ye,Te){let ke=[],we=ye.ǃcYH("sounds-folder");we&&ke.push(this.ǃGyV.ǃGvD(we,Te));let Le=ye.ǃcYH("music-folder");Le&&ke.push(this.ǃGyA.ǃGvD(Le,Te));let Ce=ye.ǃcYH("files-folder");return Ce&&ke.push(this.ǃGyP.ǃGvD(Ce,Te)),Promise.all(ke).then(()=>{let xe=this.ǃGyP.ǃGpQ("Icons",!1);return xe&&xe.ǃFQ()&&xe.ǃVR(),this})}ǃGpP(){for(let ye of this.ǃGBd()){ye.ǃGvi();let Te=ye.ǃcu();for(let ke of this.ǃGBE())if(Te===ke.ǃcu()){ye.ǃGvR(ke);continue}}app.ǃHr(this,"refreshgloballayers")}ǃGeY(){let ye=ǃG.ǃX(ǃG.ǃBc),Te=Math.floor(this.ǃGyf/8),ke=this.ǃGyf%8,we=45*ke;return 0!==Te&&(we+=45/(Te+1)),ye.ǃcNd(we%360,100,90,1),this.ǃGyf++,ye}},ǃm_.ǃGvb=new Map([["normal",0],["additive",1],["copy",3],["destination-over",4],["source-in",5],["destination-in",6],["source-out",7],["destination-out",8],["source-atop",9],["destination-atop",10]])}{function ee(){return ge||(ge=new Map([["event-block",ǃGN],["comment",ǃGu],["event-group",ǃGB],["variable",ǃGv],["include",ǃGa]])),ge}const _398="normal",_399="scale-outer",_400="progress-logo",_401="letterbox-scale",te=[_398,"additive",_398,"copy","destination-over","source-in","destination-in","source-out","destination-out","source-atop","destination-atop"],ne=new Set(["1","True","true","On","on","Yes","yes","Enabled","enabled"]),ie=new Set(["0","False","false","Off","off","No","no","Disabled","disabled"]),me=/ /g,ae=/icon\-[0-9]*\.png/,de=new Map([["(default)","default"],["Chrome","chrome"],["Edge","edge"],["Internet Explorer","internet-explorer"],["Firefox","firefox"],["Opera","opera"],["Safari","default"],["Node-Webkit","nwjs"],["NW.js","nwjs"],["Custom","custom"]]),re=new Map([["Off","off"],["No","off"],["","off"],["Crop","off"],["Yes","off"],["On (crop mode)","off"],["Scale inner","scale-inner"],["Scale outer",_399],["On (scale mode)",_399],["Scale",_399],["Letterbox scale",_401],["Letterbox integer scale","letterbox-integer-scale"]]),Ge=new Map([["Low quality","low"],["High quality","high"]]),oe=new Map([["Any","any"],["Portrait","portrait"],["Landscape","landscape"]]),le=new Map([["Point","point"],["Linear","linear"]]),ue=new Map([["Low quality","low"],["Medium quality","medium"],["High quality","high"]]),pe=new Map([["Progress bar & logo",_400],["",_400],["Progress bar only","progress"],["Percentage text","percent"],["Nothing (not recommended)","none"]]);let ge=null;window.ǃJI=class he{constructor(){throw new TypeError("static class can't be instantiated")}static ǃcib(ve){return ǃG.ǃbv(ve),ve.toLowerCase().replace(me,"-")}static ǃGvT(ve){return isFinite(ve)?(ve=Math.floor(ve),0>ve||ve>=te.length?_398:te[ve]):_398}static ǃGUz(ve){return de.get(ve)||"default"}static ǃGUF(ve){return re.get(ve)||_401}static ǃGUl(ve){return Ge.get(ve)||"high"}static ǃGUw(ve){return oe.get(ve)||"any"}static ǃGUo(ve){return le.get(ve)||"linear"}static ǃGUH(ve){return ue.get(ve)||"medium"}static ǃGUI(ve){return pe.get(ve)||_400}static ǃcke(ve){return ve&&"(none)"!==ve?he.ǃcib(ve):_398}static ǃGvk(ve){let be=ve.toString();return 0===be.length?"000":1===be.length?"00"+be:2===be.length?"0"+be:be}static ǃJH(ve){let be=ve.split(","),Ee={name:"Arial",size:12,bold:!1,ǃJx:!1};if(0De&&(De=72*-De/96),Ee.size=De||16}return 2"===we){let Le=De.ǃcf(be);if("combo"!==Le.ǃsn())ve.ǃcn(be,Ee);else if(Le.ǃGvr(Ee))ve.ǃcn(be,Ee);else if(Ee=he.ǃcib(Ee),Le.ǃGvr(Ee))ve.ǃcn(be,Ee);else{let Ce=Le.ǃOQ().map(xe=>"\""+xe.value+"\"").join(",");console.warn(`[C2 compat] Could not load ${ye} '${Te}' property '${be}' from a Construct 2 project: the value '${Ee}' could not be automatically recognised as one of the valid combo items [${Ce}]. Handle it with LoadC2Property().`)}return}if(""===we){let Le=parseFloat(Ee);return void(ǃG.ǃcKh(Ee)&&isFinite(Le)?ve.ǃcn(be,Le):console.warn(`[C2 compat] Could not load ${ye} '${Te}' property '${be}' from a Construct 2 project: the value '${Ee}' could not be recognised as a number. Handle it with LoadC2Property().`))}if(""===we){let Le=!1;if(ne.has(Ee))Le=!0;else if(ie.has(Ee))Le=!1;else return void console.warn(`[C2 compat] Could not load ${ye} '${Te}' property '${be}' from a Construct 2 project: the value '${Ee}' could not be recognised as a boolean. Handle it with LoadC2Property().`);return void ve.ǃcn(be,Le)}if(ke instanceof ǃG.ǃBc){let Le=new ǃG.ǃBc;return void(Le.ǃcNt(Ee)?ve.ǃcn(be,Le):console.warn(`[C2 compat] Could not load ${ye} '${Te}' property '${be}' from a Construct 2 project: the value '${Ee}' could not be recognised as a color. Handle it with LoadC2Property().`))}return void console.warn(`[C2 compat] Could not load ${ye} '${Te}' property '${be}' from a Construct 2 project: the value '${Ee}' could not be converted to '${we}'. Handle it with LoadC2Property().`)}console.warn(`[C2 compat] Could not load ${ye} '${Te}' property '${be}' from a Construct 2 project, because the property name is not recognised. The value '${Ee}' has been ignored. Handle it with LoadC2Property().`)}}static ǃGvV(ve,be,Ee,De){let ye=be.ǃGvA(Ee);if(ye&&("float"===ye.ǃsn()||"percent"===ye.ǃsn())){let ke=parseFloat(De);if(isFinite(ke))return void ve.ǃsz(Ee,ke)}let Te=be.ǃGvL(Ee);if(Te){let ke=Te.ǃGv_;if("color"===ke.ǃsn()){let we=Te.ǃG_E,Le=parseFloat(De);if(isFinite(Le)&&0<=we&&4>we){let Ce=ve.ǃsh(ke.ǃEK());return Ce.ǃOL()[we]=ǃG.ǃAR(Le/255,0,1),void ve.ǃsz(ke.ǃEK(),Ce)}}else{let we=parseFloat(De);if(isFinite(we))return void ve.ǃsz(Ee,we)}}console.warn(`[C2 compat] Could not load effect '${be.ǃEK()}' parameter '${Ee}' value '${De}' from a Construct 2 project.`)}static ǃGvt(ve){return ǃG.ǃbv(ve),ae.test(ve)||"loading-logo.png"===ve}static ǃGvP(ve){return ǃG.ǃbv(ve),ee().get(ve)||null}}}{const _402="cannot find id";window.ǃGWh=class extends ǃG.ǃDa{constructor(te,ne,ie){ǃG.ǃg(te,ǃm_),ǃG.ǃbv(ne),super(),this.ǃGT=te,this.ǃclE=ne,this.ǃGPY=!!ie,this.ǃGvj=[],this.ǃGvd=new Map,this.ǃGfl=!1,this.ǃGvE=null,this.ǃGT.ǃGWC(this)}ǃz(te){this.ǃGvE=null,this.ǃGT.ǃGWY(this);for(let ne of this.ǃGvj)ne.ǃz(te);if(ǃG.ǃGs(this.ǃGvj),!te){for(let ne of this.ǃGvd.values())ne.ǃz();this.ǃGvd.clear()}ǃG.ǃz(this)}ǃcVi(){this.ǃGfl=!0}ǃly(){return this.ǃGfl}ǃr(te){ǃG.ǃbv(te);this.ǃclE===te||(this.ǃGT.ǃGWY(this),this.ǃclE=te,this.ǃGT.ǃGWC(this))}ǃcu(){return this.ǃclE}ǃTS(){return this.ǃGT}ǃGve(){return this.ǃGPY}ǃGvp(te){if(ǃG.ǃg(te,ǃGvf),this.ǃGvd.has(te.ǃcbJ()))throw new Error("id already in use");this.ǃGvd.set(te.ǃcbJ(),te),this.ǃGfl=!0}ǃGvy(te){ǃG.ǃg(te,ǃGvf);let ne=te.ǃcbJ();if(!this.ǃGvd.has(ne))throw new Error(_402);this.ǃGvd.delete(ne);let ie=te.ǃfe();ie&&ie.ǃGvy(te),this.ǃGfl=!0}ǃGvB(te){ǃG.ǃTH(te);let ne=this.ǃGvd.get(te);if("undefined"==typeof ne)throw new Error(_402);return ne}ǃGvW(te){return ǃG.ǃTH(te),this.ǃGvd.has(te)}ǃGvu(){return!!this.ǃGvE}ǃGvU(){if(!this.ǃGvu())throw new Error("not busy");return this.ǃGvE.then(()=>this)}ǃGvv(){return this.ǃGfl?this.ǃGvE?this.ǃGvE:(app.ǃGvq().ǃrL(),this.ǃGvE=this.ǃGva().then(te=>{return this.ǃGvg(te),app.ǃGvq().ǃj_(),this.ǃGvE=null,this}).catch(te=>{throw this.ǃGvE=null,te}),this.ǃGvE):Promise.resolve(this)}ǃGvN(){this.ǃGfl=!1;let te=[];for(let ne of this.ǃGvd.values())ne.ǃGvK()||te.push(ne.ǃGvn());if(0===te.length)return Promise.resolve([]);if(1===te.length){let ne=te[0];return Promise.resolve([{width:ne.w,height:ne.h,rects:[{id:ne.id,x:0,y:0}]}])}return ǃG.ǃGec.ǃGEx("BuildSpriteSheets",{rects:te,maxSize:this.ǃGT.ǃGWw()})}ǃGva(){return this.ǃGvN().then(te=>{return this.ǃGfl?this.ǃGva():te})}ǃGvg(te){for(let ne=this.ǃGvj.length,ie=te.length;nete.length;){let ne=this.ǃGvj.pop();ne.ǃz()}for(let ne=0,ie=te.length;nethis.ǃym(),300),this.ǃGvI=()=>this.ǃjr(),app.ǃM().addEventListener(_403,this.ǃGvI)}ǃz(ie){if(this.ǃYq)throw new Error("spritesheet was already released");this.ǃYq=!0,this.ǃGvz=null,app.ǃM().removeEventListener(_403,this.ǃGvI),this.ǃGvI=null,ie?this.ǃGvd.clear():this.ǃGvx(),this.ǃym(),this.ǃGvl=null,this.ǃGui(),this.ǃGEp.ǃz(),this.ǃGEp=null,this.ǃGvC=null,ǃG.ǃz(this)}ǃGui(){this.ǃciF&&(URL.revokeObjectURL(this.ǃciF),this.ǃciF=""),this.ǃGvw=null}ǃjr(){this.ǃym()}ǃko(){return assert(0<=this.ǃJn,"invalid sprite sheet index"),this.ǃJn}ǃTQ(){return(this.ǃGvC.ǃcu()+"-sheet"+this.ǃko()+("jpeg"===this.ǃGvo?".jpg":".png")).toLowerCase()}ǃcE(){if(0>=this.ǃhm)throw new Error(_405);return this.ǃhm}ǃce(){if(0>=this.ǃhD)throw new Error(_405);return this.ǃhD}ǃTS(){return this.ǃGvC.ǃTS()}ǃGvJ(){return this.ǃGvd.size}ǃGvZ(){return this.ǃGvo}ǃGvS(ie){if(ie=!!ie,this.ǃGvC.ǃly())throw new Error("sprite sheet collection changed");return this.ǃGvw?Promise.resolve(this.ǃGvw):this.ǃGvl?this.ǃGvl:(app.ǃGvs().ǃrL(),this.ǃGvl=ee.ǃrL(()=>{return this.ǃGvO(ie,!0).then(me=>{app.ǃGvs().ǃj_(),app.ǃGvQ().ǃrL();let ae="jpeg"===this.ǃGvo?"image/jpeg":"image/png";return ǃG.ǃcge(me,ae,this.ǃGvH)}).then(me=>{return app.ǃGvQ().ǃj_(),this.ǃGui(),this.ǃGvw=me,this.ǃGvl=null,this.ǃGvw}).catch(me=>{throw this.ǃGvl=null,me})}),this.ǃGvl)}ǃGqc(){return assert(this.ǃGvw,"no pre-rendered sprite sheet blob available"),this.ǃGvw}ǃkc(){return this.ǃciF||(this.ǃciF=URL.createObjectURL(this.ǃGqc())),this.ǃciF}ǃGqG(){return this.ǃGqc().size}ǃGqm(){return this.ǃGvC.ǃly()?null:(this.ǃGvF&&this.ǃGEp.ǃt$(),this.ǃGvF)}ǃGqD(ie,me){return(this.ǃGEp.ǃt$(),this.ǃGvF)?Promise.resolve(this.ǃGvF):this.ǃGvz?this.ǃGvz:(ie=!!ie,me=!!me,this.ǃGvz=this.ǃGqi(ie,me).then(ae=>{return ǃG.ǃYa(this)||this.ǃYq||!ae?null:(this.ǃGEp.ǃt$(),this.ǃGvF=ae,this.ǃGvz=null,app.ǃM().ǃn(),this.ǃGvF)}).catch(ae=>{throw this.ǃGvz=null,ae}),this.ǃGvz)}ǃGqR(ie,me){this.ǃGvY=!1;let ae;return ae=this.ǃGvC.ǃly()?this.ǃGvC.ǃGvv():Promise.resolve(!0),ae.then(()=>{return ǃG.ǃYa(this)||this.ǃYq||this.ǃGvY?null:this.ǃGvO()}).then(de=>{return ǃG.ǃYa(this)||this.ǃYq||this.ǃGvY||!de||app.ǃjj().ǃca()?null:(app.ǃGqb().ǃrL(),app.ǃjj().ǃxq(de,{ǃdi:ie,ǃdb:me,ǃdR:"low"!==this.ǃTS().ǃs_(),width:this.ǃhm,height:this.ǃhD}))}).then(de=>{return de&&app.ǃGqb().ǃj_(),app.ǃjj().ǃca()?null:ǃG.ǃYa(this)||this.ǃYq||this.ǃGvY||!de?(de&&app.ǃjj().ǃjP(de),null):de})}ǃGqi(ie,me){return this.ǃGqR(ie,me).then(ae=>{return ǃG.ǃYa(this)||this.ǃYq?null:this.ǃGvY?this.ǃGqi(ie,me):ae})}ǃGvO(ie,me){ie=!!ie,me||app.ǃGvs().ǃrL();let ae=[],de=[];for(let re of this.ǃGvd.values())ǃG.ǃYa(re)||re.ǃYa()||(ae.push(re),de.push(re.ǃGqT(ie)));if(1===ae.length){let re=ae[0];if(0===re.ǃGqk()&&0===re.ǃGqX()&&re.ǃcE()===this.ǃhm&&re.ǃce()===this.ǃhD)return de[0].then(Ge=>{return me||app.ǃGvs().ǃj_(),Ge})}return Promise.all(de).then(re=>this.ǃGq$(ae,re,me))}ǃGq$(ie,me,ae){return ǃG.ǃYa(this)||this.ǃYq||!ie.length?null:(assert(ie.length===me.length,"should have same number of ImageSprite and ImageData"),16384>=this.ǃhm*this.ǃhD?this.ǃGqr(ie,me,ae):this.ǃGqV(ie,me,ae))}ǃGqr(ie,me,ae){let de=this.ǃhm,re=this.ǃhD,Ge=new ImageData(de,re),oe=new Uint32Array(Ge.data.buffer);for(let le=0,ue=ie.length,pe;le{return ae||app.ǃGvs().ǃj_(),ǃG.ǃYa(this)||this.ǃYq?null:new ImageData(new Uint8ClampedArray(oe),this.ǃhm,this.ǃhD)})}ǃym(){this.ǃGvF&&(this.ǃGEp.ǃWm(),!app.ǃjj().ǃca()&&app.ǃjj().ǃjP(this.ǃGvF),this.ǃGvF=null)}ǃGvy(ie){ǃG.ǃg(ie,ǃGvf);let me=ie.ǃcbJ();if(!this.ǃGvd.has(me))throw new Error("cannot find id");this.ǃGvd.delete(me)}ǃGvx(){for(let ie of this.ǃGvd.values())ie.ǃGqj();this.ǃGvd.clear()}ǃGEf(){this.ǃGui(),this.ǃym(),this.ǃGvx(),this.ǃGvh=!0}ǃGvM(ie,me){ǃG.ǃTH(me),this.ǃJn=me;let ae=ie.width,de=ie.height,re=ie.rects;if(assert(0this.ǃGqg(),30),this.ǃhm=0,this.ǃhD=0,this.ǃGqN=0,this.ǃGqK=0,this.ǃhr=new ǃG.Rect,this.ǃGqn=ae,this.ǃGqM=this.ǃGqn===_406?0:1,this.ǃGqC=this.ǃGqM,this.ǃGqh=this.ǃGqM,this.ǃGqY=0,this.ǃGqz=0,this.ǃGqF=0,this.ǃGql=0,this.ǃGvo="png",this.ǃGvH=1,this.ǃGqw="",this.ǃGqo=null,this.ǃGvC.ǃGvp(this),ne.add(this),this.ǃYq=!1}ǃz(){if(ǃG.ǃYa(this))throw new Error(_411);if(this.ǃYq)throw new Error(_411);this.ǃYq=!0,this.ǃGqq=0,this.ǃGvC.ǃGvW(this.ǃcCQ)&&this.ǃGvC.ǃGvy(this),this.ǃGqU=null,this.ǃGqv=null,ne.delete(this),this.ǃGT.ǃGWl(this.ǃcCQ),this.ǃcCQ=-1,this.ǃGvC=null,this.ǃGT=null,this.ǃcOG=null,this.ǃcFI=null,this.ǃGqB=null,this.ǃGqW=null,this.ǃGqu=null,this.ǃhr=null,this.ǃGqo=null,this.ǃGqa.ǃz(),this.ǃGqa=null,ǃG.ǃz(this)}ǃYa(){return this.ǃYq}ǃGvu(){return 0this.ǃGqY&&(this.ǃGqY=4),4>this.ǃGqz&&(this.ǃGqz=4);else throw new Error(_408);this.ǃGqF=this.ǃGqY,this.ǃGql=this.ǃGqz}ǃGqe(me,ae){if(ǃG.ǃTH(me),ǃG.ǃTH(ae),this.ǃhm>me||this.ǃhD>ae)throw new Error("cannot clamp padding to smaller than content size");this.ǃGqY>me&&(this.ǃGqY=me),this.ǃGqz>ae&&(this.ǃGqz=ae)}ǃGqE(){return this.ǃGqn}ǃGqI(me,ae,de){if(ǃG.ǃg(me,Blob),ǃG.ǃTH(ae),ǃG.ǃTH(de),this.ǃGqy)throw new Error(_409);this.ǃGqy=!0,this.ǃGqH(ae,de),this.ǃcFI=me}ǃGqx(me){if(ǃG.ǃg(me,Blob),this.ǃGqy)throw new Error(_409);return this.ǃGqy=!0,this.ǃcFI=me,this.ǃGqq++,this.ǃ_I().then(ae=>{return ǃG.ǃYa(this)?null:this.ǃYq?null:(this.ǃGqH(ae.width,ae.height),this.ǃGqq--,this)})}ǃGqJ(me){if(ǃG.ǃc$i(me,"canvas"),this.ǃGqy)throw new Error(_409);return this.ǃGqy=!0,this.ǃGqH(me.width,me.height),this.ǃGqq++,ǃG.ǃKO(me).then(ae=>{return ǃG.ǃYa(this)?null:this.ǃYq?null:(this.ǃcFI=ae,this.ǃGqq--,this)})}ǃcbJ(){return this.ǃcCQ}ǃcE(){return this.ǃhm}ǃce(){return this.ǃhD}ǃGq_(){return this.ǃGqY}ǃGqt(){return this.ǃGqz}ǃGqk(){return this.ǃGqN}ǃGqX(){return this.ǃGqK}ǃGqA(){return this.ǃGqC}ǃGqL(){return this.ǃGqh}ǃGqp(me){return assert(this.ǃcOG,"should already be on a sheet"),this.ǃGqC!==me.x||this.ǃGqh!==me.y}ǃbJ(){if(!this.ǃcFI)throw new Error(_407);return this.ǃcFI}ǃGqZ(){if(!this.ǃcFI)throw new Error(_407);return this.ǃcFI.slice(0,this.ǃcFI.size,this.ǃcFI.type)}ǃ_I(me){if(me=!!me,!this.ǃcFI)throw new Error(_407);return(this.ǃGqa.ǃt$(),this.ǃGqB)?Promise.resolve(this.ǃGqB):this.ǃGqU?this.ǃGqU:(this.ǃGqq++,this.ǃGqU=ǃG.ǃcgV(this.ǃcFI).then(ae=>{return ǃG.ǃYa(this)?ae:this.ǃYq?ae:(this.ǃGqa.ǃt$(),me||(this.ǃGqB=ae),this.ǃGqU=null,this.ǃGqq--,ae)}).catch(ae=>{throw this.ǃGqU=null,this.ǃGqq--,ae}),this.ǃGqU)}ǃGqS(me){if(me=!!me,!this.ǃcFI)throw new Error(_407);if(!ǃG.ǃcqq.ImageBitmap)throw new Error("imagebitmap not supported");return(this.ǃGqa.ǃt$(),this.ǃGqW)?Promise.resolve(this.ǃGqW):this.ǃGqv?this.ǃGqv:(this.ǃGqq++,this.ǃGqv=createImageBitmap(this.ǃcFI).then(ae=>{return ǃG.ǃYa(this)?ae:this.ǃYq?ae:(this.ǃGqa.ǃt$(),me||(this.ǃGqW=ae),this.ǃGqv=null,this.ǃGqq--,ae)}).catch(ae=>{throw this.ǃGqv=null,this.ǃGqq--,ae}),this.ǃGqv)}ǃYN(me){return ǃG.ǃcqq.ImageBitmap?this.ǃGqS(me):this.ǃ_I(me)}ǃGqT(me){if(me=!!me,!this.ǃcFI)throw new Error(_407);return(this.ǃGqa.ǃt$(),this.ǃGqu)?Promise.resolve(this.ǃGqu):(this.ǃGqq++,ǃG.ǃcgP(this.ǃcFI).then(ae=>{return ǃG.ǃYa(this)?ae:this.ǃYq?ae:(this.ǃGqa.ǃt$(),me||(this.ǃGqu=ae),this.ǃGqq--,ae)}))}ǃGqP(){this.ǃGqu=null}ǃGqj(){this.ǃcOG=null}ǃfe(){return this.ǃcOG}ǃGjD(me,ae,de){this.ǃcOG=ae,this.ǃGqC=me.x,this.ǃGqh=me.y;let re=this.ǃhm,Ge=this.ǃhD,oe=this.ǃcOG.ǃcE(),le=this.ǃcOG.ǃce();de?(this.ǃGqN=this.ǃGqC+this.ǃGqM,this.ǃGqK=this.ǃGqh+this.ǃGqM,this.ǃGqY=this.ǃGqF,this.ǃGqz=this.ǃGql):(this.ǃGqN=0,this.ǃGqK=0,this.ǃGqC=0,this.ǃGqh=0),this.ǃhr.set(this.ǃGqN/oe,this.ǃGqK/le,(this.ǃGqN+re)/oe,(this.ǃGqK+Ge)/le)}ǃGqm(){if(ǃG.ǃYa(this))throw new Error(_410);if(this.ǃYq)throw new Error(_410);if(!this.ǃcFI)throw new Error(_407);return this.ǃcOG?this.ǃcOG.ǃGqm():null}ǃGqD(me,ae){if(!this.ǃcFI)throw new Error(_407);return!this.ǃcOG&&this.ǃGvK()?Promise.resolve(null):(this.ǃGqq++,!this.ǃcOG||this.ǃGvC.ǃly()?this.ǃGvC.ǃGvv().then(()=>{return ǃG.ǃYa(this)?null:this.ǃYq?null:this.ǃcOG.ǃGqD(me,ae)}).then(de=>{return ǃG.ǃYa(this)?null:this.ǃYq?null:(this.ǃGqq--,de)}):this.ǃcOG.ǃGqD(me,ae).then(de=>{return ǃG.ǃYa(this)?null:this.ǃYq?null:(this.ǃGqq--,de)}))}ǃfE(){return!ǃG.ǃYa(this)&&this.ǃcFI&&this.ǃcOG&&this.ǃGvC&&!this.ǃGvC.ǃly()}ǃcr(){if(ǃG.ǃYa(this))throw new Error(_410);if(this.ǃYq)throw new Error(_410);if(!this.ǃcFI)throw new Error(_407);if(!this.ǃcOG)throw new Error("image sprite not on a sheet");if(this.ǃGvC&&this.ǃGvC.ǃly())throw new Error("image sprite collection needs rebuilding");return this.ǃhr}ǃGvn(){if(ǃG.ǃYa(this))throw new Error(_410);if(this.ǃYq)throw new Error(_410);if(0>=this.ǃhm||0>=this.ǃhD||0>=this.ǃGqY||0>=this.ǃGqz)throw new Error("invalid size");return{w:this.ǃGqF,h:this.ǃGql,ow:this.ǃhm,oh:this.ǃhD,id:this.ǃcCQ,own:this.ǃGqn===_406}}ǃGvZ(){return this.ǃGvo}ǃGqd(){return this.ǃGvH}ǃGqs(me,ae){ǃG.ǃbv(me),ǃG.ǃTH(ae),this.ǃGvo=me,this.ǃGvH=ae}ǃGqO(){return this.ǃGqw?Promise.resolve(this.ǃGqw):te.ǃrL(()=>{return this.ǃGqT(!0).then(me=>ǃG.Crypto.ǃcKb(me.data.buffer)).then(me=>{return this.ǃGqw=me,me})})}ǃGqQ(me){ǃG.ǃmL(me,ie);this.ǃGqo===me||(this.ǃGqo=me,this.ǃGvC.ǃcVi())}ǃGac(){return this.ǃGqo}ǃGvK(){return!!this.ǃGqo}ǃGaG(){return this.ǃcFI?this.ǃcFI.size:0}ǃGam(){return this.ǃGqB||this.ǃGqu||this.ǃGqW?4*(this.ǃhm*this.ǃhD):0}static all(){return ne.values()}}}{window.ǃGWu=class extends ǃG.ǃDa{constructor(ne,ie){ǃG.ǃg(ne,ǃm_),ǃG.ǃbv(ie),super(),this.ǃGvC=ǃG.ǃX(ǃGWh,ne,ie,!1),this.ǃGaD=new Set}ǃz(ne){this.ǃGvC.ǃz(ne),this.ǃGvC=null,this.ǃGaD.clear(),this.ǃGaD=null,ǃG.ǃz(this)}ǃGWW(){return this.ǃGvC}ǃGai(){return this.ǃGaD.size}ǃcu(){return this.ǃGvC.ǃcu()}ǃFQ(){return 0===this.ǃGaD.size}ǃGaR(){let ne=0;for(let ie of this.ǃGaD)ie.ǃ_w()?ne+=ie.ǃGab():ne++;return ne}ǃcQL(){return this.ǃGaR()>=100}ǃGWB(ne){if(ǃG.ǃg(ne,ǃEE),this.ǃcQL())throw new Error("shared sprite sheet collection is full");if(this.ǃGaD.has(ne))throw new Error("object already added");this.ǃGaD.add(ne)}ǃla(ne){return(ǃG.ǃg(ne,ǃEE),!!this.ǃGaD.has(ne))&&(this.ǃGaD.delete(ne),!0)}ǃZQ(ne){return ǃG.ǃg(ne,ǃEE),this.ǃGaD.has(ne)}ǃGvv(){return this.ǃGvC.ǃGvv()}}}{const _412="string",_413="number",_414="boolean",_415="invalid type",_416="name already in object class namespace",ee=new Set([_414,_413,_412]);window.ǃSi=class te extends ǃXb{constructor(ne,ie,me){if(ǃG.ǃg(ne,ǃ_K),ǃG.ǃbv(ie),ǃG.ǃbv(me),super(ne.ǃTS()),!ee.has(me))throw new Error(_415);if(this.ǃGaT=ne,this.ǃGak=null,ie=ǃ_K.ǃGWf(ie,!1),!ie)throw new Error("invalid name");if(this.ǃGaT.ǃGaX(ie))throw new Error(_416);this.ǃclE=ie,this.ǃchB=me,this.ǃGck="",this.ǃGa$=new Map}ǃz(){this.ǃGaT=null,this.ǃGa$.clear()}ǃxJ(){return"instance-variable"}ǃFu(){if(!this.ǃGak)throw new Error("instance var not yet added to folder");return this.ǃGak}ǃGf$(ne){ǃG.ǃg(ne,ǃGar),this.ǃGak=ne}ǃmK(){return this.ǃGaT}ǃVR(){super.ǃVR(),this.ǃTS().ǃcLy()}ǃcLE(){super.ǃcLE(),this.ǃTS().ǃcLy()}ǃGpx(){app.ǃGaV(this,"instancevariableadd"),this.ǃTS().ǃGyY()}ǃGpI(){this.ǃTS().ǃGyY(),app.ǃGaV(this,"instancevariableremove")}ǃr(ne){if(ǃG.ǃbv(ne),ne=ǃ_K.ǃGWf(ne,!1),!ne)throw new Error("invalid name");if(this.ǃclE!==ne){if(!ǃG.ǃck_(this.ǃclE,ne)&&this.ǃGaT.ǃGaX(ne))throw new Error(_416);this.ǃclE=ne;const ie=this.ǃTS();ie.ǃc_N(),ie.ǃGyY(),app.ǃGps(this,"projectobjectnamechange")}}ǃcu(){return this.ǃclE}ǃGaA(ne){if(ǃG.ǃbv(ne),this.ǃchB!==ne){if(!ee.has(ne))throw new Error(_415);this.ǃchB=ne;for(let ie of this.ǃGa$.keys()){let me;switch(this.ǃchB){case _414:me=!1;break;case _413:me=0;break;case _412:me="";}this.ǃGa$.set(ie,me)}this.ǃmK().ǃcVi(),this.ǃmK().ǃGaL()}}ǃsn(){return this.ǃchB}ǃV(ne){ǃG.ǃbv(ne);this.ǃGck===ne||(this.ǃGck=ne,this.ǃmK().ǃcVi())}ǃkQ(){return this.ǃGck}ǃOo(ne,ie){switch(ǃG.ǃg(ne,ǃxR),this.ǃchB){case _414:ie=!!ie;break;case _413:ǃG.ǃEe(ie);break;case _412:ǃG.ǃbv(ie);}this.ǃGa$.set(ne,ie),ne instanceof ǃLn&&ne.ǃrq().ǃcVi()}ǃGa_(ne,ie){ǃG.ǃg(ne,ǃxR),ǃG.ǃbv(ie);let me;switch(this.ǃchB){case _414:me="true"===ie.toLowerCase();break;case _413:me=parseFloat(ie);break;case _412:me=ie;break;default:throw new TypeError(_415);}this.ǃOo(ne,me)}ǃGat(ne){return ǃG.ǃg(ne,ǃxR),this.ǃGa$.has(ne)}ǃOw(ne){ǃG.ǃg(ne,ǃxR);let ie=this.ǃGa$.get(ne);if("undefined"==typeof ie)throw new Error("missing instance variable value");return ie}ǃGaP(ne){ǃG.ǃmL(ne,ǃEE);let ie=null;for(let[me,ae]of this.ǃGa$)if(me.ǃkM()&&(null==ie&&(ie=ae),ne&&me.ǃcU()===ne))return ae;if(null!==ie)return ie;switch(this.ǃchB){case _414:return!1;case _413:return 0;case _412:return"";default:throw new TypeError(_415);}}ǃGaj(){if(0===this.ǃGa$.size)return this.ǃGaP();let ne=null;for(let ie of this.ǃGa$.values())if(null==ne)ne=ie;else if(ne!==ie)return null;return ne}ǃGad(ne){ǃG.ǃg(ne,ǃ_K);let ie=[...ne.ǃOF()],me=ie.indexOf(this);return assert(-1!==me,"cannot find instance variable export index"),me}ǃpj(ne){ǃG.ǃcDt(ne);let ie=ne&&ne.mode||"",me={name:this.ǃcu(),type:this.ǃsn(),desc:this.ǃkQ()};return"copy"!==ie&&(me.sid=this.ǃGpF()),me}static ǃc_z(ne,ie){let me=ǃG.ǃX(te,ne,ie.name,ie.type);return ie.hasOwnProperty("sid")&&me.ǃGpw(ie.sid),me}static ǃGaE(ne,ie){ǃG.ǃg(ne,ǃ_K);let me=ie.ǃcYQ("name"),ae=ie.ǃcYQ("type"),de=ne.ǃGae(me,ae);return de.ǃV(ie.ǃcYQ("comment")||""),ie.ǃcYO("sid")&&de.ǃGpw(ie.ǃczc("sid")),de}}}"use strict",window.ǃGar=class extends ǃzI{constructor(te,ne){ǃG.ǃg(te,ǃ_K),super(te.ǃTS(),ne,ǃSi),this.ǃGaT=te,this.ǃzx()&&(this.ǃclE="")}ǃcVi(){this.ǃGaT.ǃcVi()}ǃrL(te){if(ǃG.ǃg(te,ǃSi),te.ǃGak)throw new Error("instance variable already belongs to folder");te.ǃGak=this,super.ǃrL(te),app.ǃGaV(te,"instancevariableadd")}ǃGpx(){this.ǃcVi()}ǃGpI(){this.ǃcVi()}},"use strict";{const _417="name already in object class namespace";window.ǃSR=class extends ǃXb{constructor(te,ne,ie){if(ǃG.ǃg(te,ǃ_K),ǃG.ǃg(ne,ǃGBz),ǃG.ǃbv(ie),super(te.ǃTS()),this.ǃGaT=te,this.ǃGap=ne,this.ǃGak=null,this.ǃnB=null,ie=ǃ_K.ǃGWf(ie,!0),!ie)throw new Error("invalid name");if(this.ǃGaT.ǃGaX(ie))throw new Error(_417);this.ǃclE=ie,this.ǃGaf=new Map}ǃz(){this.ǃnB.ǃz(),this.ǃGaf.clear(),this.ǃnB=null,this.ǃGaT=null,this.ǃGap=null}ǃxJ(){return"behavior-type"}ǃFu(){if(!this.ǃGak)throw new Error("behavior type not yet added to folder");return this.ǃGak}ǃGf$(te){ǃG.ǃg(te,ǃGay),this.ǃGak=te}ǃmK(){return this.ǃGaT}ǃOI(){return this.ǃGap}ǃVR(){super.ǃVR(),this.ǃTS().ǃcLy()}ǃcLE(){super.ǃcLE(),this.ǃTS().ǃcLy()}ǃGpo(){for(let te of this.ǃGaf.values())te.ǃGpo();super.ǃGpo()}ǃGpH(){super.ǃGpH();for(let te of this.ǃGaf.values())te.ǃGpH()}ǃGpx(){app.ǃGaB(this,"behaviortypeadd"),this.ǃTS().ǃGyY()}ǃGpI(){this.ǃTS().ǃGyY(),app.ǃGaB(this,"behaviortyperemove")}ǃGaW(te){ǃG.ǃg(te,ǃxR);let ne=ǃG.ǃX(ǃGv$,this,te);return ne.ǃGau=this.ǃnB.ǃxi(ne),ne}ǃGaU(te){ǃG.ǃg(te,ǃxR);let ne=this.ǃGaf.get(te);if(ne)return ne;let ie=this.ǃGaW(te);return this.ǃGaf.set(te,ie),ie}ǃOZ(te){ǃG.ǃg(te,ǃxR);let ne=this.ǃGaf.get(te);if(!ne)throw new Error("object instance does not have associated behavior instance");return ne}ǃGav(te){return ǃG.ǃg(te,ǃxR),this.ǃGaf.has(te)}ǃGaq(){return ǃG.ǃds(this.ǃGaf.values())}*ǃEc(){for(let te of this.ǃGaf.values())te.ǃkM()&&(yield te)}ǃr(te){if(ǃG.ǃbv(te),te=ǃ_K.ǃGWf(te,!0),!te||ǃG.ǃcaj(te))throw new Error("invalid name");if(this.ǃclE!==te){if(!ǃG.ǃck_(this.ǃclE,te)&&this.ǃGaT.ǃGaX(te))throw new Error(_417);this.ǃclE=te;const ne=this.ǃTS();ne.ǃc_N(),ne.ǃGyY(),app.ǃGps(this,"projectobjectnamechange")}}ǃVD(te,ne){return ǃG.ǃbv(te),ǃG.ǃc$i(ne),name=ǃ_K.ǃGWf(te,!0),ǃG.ǃi.ǃT("model.object-class.behavior-types.errors"),!name||ǃG.ǃcaj(name)?(ǃG.ǃGD.ǃGr.ǃev.ǃm$(ne,"warning",lang(".name-invalid.title"),lang(".name-invalid.message"),{align:"bottom"}),void ǃG.ǃi.ǃW()):!ǃG.ǃck_(name,this.ǃcu())&&this.ǃGaT.ǃGaX(name)?(ǃG.ǃGD.ǃGr.ǃev.ǃm$(ne,"warning",lang(".name-used.title"),ǃcDZ(".name-used.message",name),{align:"bottom"}),void ǃG.ǃi.ǃW()):void(!ǃG.ǃck_(name,te)&&ǃG.ǃGD.ǃGr.ǃev.ǃm$(ne,"warning",lang(".name-changed.title"),lang(".name-changed.message"),{align:"bottom"}),ǃG.ǃi.ǃW(),this.ǃr(name))}ǃcu(){return this.ǃclE}ǃGuF(te){ǃG.ǃg(te,ǃTb);let ne=te.ǃGaa(this.ǃOI().ǃEK());return[this.ǃcu(),ne,this.ǃGpF()]}ǃpj(te){ǃG.ǃcDt(te);let ne=te&&te.mode||"",ie={behaviorId:this.ǃOI().ǃEK(),name:this.ǃcu()};return"copy"!==ne&&(ie.sid=this.ǃGpF()),ie}static ǃc_z(te,ne){let ie=ne.behaviorId;const me=te.ǃTS();if(!ǃG.ǃcl.ǃGUD(ie,me))throw new Error(`missing behavior id '${ie}'`);let ae=ǃG.ǃcl.ǃpW(ie,me),de=ae.ǃGag(te,ne.name);return ne.hasOwnProperty("sid")&&de.ǃGpw(ne.sid),de}static ǃGaE(te,ne){ǃG.ǃg(te,ǃ_K);let ie=ne.ǃJk("behavior").ǃcYQ("id");if(!ǃG.ǃcl.ǃGUD(ie))throw new Error(`missing behavior id '${ie}'`);let me=ǃG.ǃcl.ǃpW(ie),ae=ne.ǃcYQ("name"),de=te.ǃGaN(me,ae);return ne.ǃcYO("sid")&&de.ǃGpw(ne.ǃJT("sid")),de}}}"use strict",window.ǃGay=class extends ǃzI{constructor(te,ne){ǃG.ǃg(te,ǃ_K),super(te.ǃTS(),ne,ǃSR),this.ǃGaT=te,this.ǃzx()&&(this.ǃclE="")}ǃcVi(){this.ǃGaT.ǃcVi()}ǃrL(te){if(ǃG.ǃg(te,ǃSR),te.ǃGak)throw new Error("behavior already belongs to folder");te.ǃGak=this,super.ǃrL(te),app.ǃGaB(te,"behaviortypeadd")}ǃGpx(){this.ǃcVi()}ǃGpI(){this.ǃcVi()}},"use strict";{let ee=!1;window.ǃGv$=class te extends ǃXb{constructor(ne,ie){ǃG.ǃg(ne,ǃSR),ǃG.ǃg(ie,ǃxR),super(ne.ǃTS()),this.ǃGau=null,this.ǃGaK=ne,this.ǃI=ie,this.ǃGan=new Map,this.ǃGaM=!1,this.ǃGaC()}ǃz(){this.ǃGau.ǃz(),this.ǃGan.clear(),this.ǃGau=null,this.ǃGaK=null,this.ǃI=null}ǃDD(){this.ǃl()}ǃl(){if(this.ǃGaM)throw new Error("already called OnCreate");this.ǃGau.ǃl(),this.ǃGaM=!0}ǃcVi(){this.ǃTS().ǃwe()||this.ǃI.ǃcVi()}ǃGah(ne){if(ǃG.ǃg(ne,te),this.ǃOI()!==ne.ǃOI())throw new Error("instance from different behavior");for(let ie of ne.ǃGan)this.ǃGan.set(ie[0],ie[1])}ǃcdr(){return this.ǃGaK}ǃOI(){return this.ǃGaK.ǃOI()}ǃvf(){return this.ǃGau}ǃccb(){return this.ǃI}ǃGaC(){this.ǃGan.clear();let ne=this.ǃOI().ǃOx();for(let ie of ne)ie.ǃGaY()&&this.ǃGan.set(ie.ǃEK(),ie.ǃxj())}ǃEG(ne){return ǃG.ǃbv(ne),this.ǃGan.has(ne)}ǃcp(ne){ǃG.ǃbv(ne);let ie=this.ǃGan.get(ne);if("undefined"==typeof ie)throw new Error(`invalid property id '${ne}'`);return ie instanceof ǃG.ǃBc?ǃG.ǃX(ǃG.ǃBc,ie):ie}ǃcn(ne,ie){ǃG.ǃbv(ne);let me=ǃG.ǃcBE(ie),ae=ie instanceof ǃG.ǃBc;if(""!==me&&""!==me&&""!==me&&!ae)throw new Error(`cannot store '${me}' in a property value`);let de=this.ǃGan.get(ne);if("undefined"==typeof de)throw new Error(`invalid property id '${ne}'`);let re=ǃG.ǃcBE(de);if(me!==re)throw new Error(`cannot change property '${ne}' from '${re}' to '${me}'`);if(ae){if(ie.ǃ_c(de))return;ie=ǃG.ǃX(ǃG.ǃBc,ie)}else if(ie===de)return;this.ǃGan.set(ne,ie),ee||this.ǃGT.ǃwe()||(ee=!0,ae?this.ǃGau.ǃcJ(ne,ǃG.ǃX(ǃG.ǃBc,ie)):this.ǃGau.ǃcJ(ne,ie),ee=!1),ee||this.ǃcVi()}ǃGuF(){let ne=[];for(let ie of this.ǃOI().ǃOx())if(ie.ǃGaY()&&"live-preview"!==ie.ǃEK()){let on=ie.ǃsn(),ln=this.ǃcp(ie.ǃEK());"combo"===on?ln=ie.ǃGaz(ln):"color"===on&&(ln=`rgb(${ln.ǃcN$()})`),ne.push(ln)}return ne}ǃpj(){let ne={};for(let[ie,me]of this.ǃGan)me instanceof ǃG.ǃBc&&(me=me.toJSON()),ne[ie]=me;return{properties:ne}}ǃpU(ne){let ie=ne.properties;for(let[me,ae]of Object.entries(ie))Array.isArray(ae)&&(ae=new ǃG.ǃBc,ae.ǃcNe(ie[me])),this.ǃcn(me,ae)}ǃGvm(ne){if(ǃG.ǃg(ne,ǃG.ǃKI.Element),"behavior-instance"!==ne.ǃcYw())throw new Error("unexpected tag name");let ie=ne.ǃcYH("properties");if(ie)for(let me of ie.children()){let ae=me.ǃcYw(),de=me.ǃLx();ǃJI.ǃGvX(this,ae,de)}}}}{const _419="bottom",_420="warning",_421=".name-used.title",_422=".name-used.message",_423="effect type not for an ObjectClass",_424="name already in object class namespace";window.ǃSb=class extends ǃXb{constructor(te,ne,ie){if(ǃG.ǃg(te,ǃfm),ǃG.ǃg(ne,ǃGBl),ǃG.ǃbv(ie),super(te.ǃTS()),this.ǃGaF=te,this.ǃGal=ne,this.ǃGak=null,ie=ǃ_K.ǃGWf(ie,!0),!ie)throw new Error("invalid name");if(this.ǃGaF instanceof ǃ_K&&this.ǃGaF.ǃGaX(ie))throw new Error(_424);this.ǃclE=ie,this.ǃGaf=new Map,this.ǃGaw=null,this.ǃGaF instanceof ǃ_K||(this.ǃGaw=ǃG.ǃX(ǃGao,this,null)),this.ǃGal.ǃpx()&&this.ǃTS().ǃGuG()}ǃz(){this.ǃGaf.clear(),this.ǃGaw=null,this.ǃGak=null,this.ǃGal=null,this.ǃGaF=null}ǃxJ(){return"effect-type"}ǃFu(){if(!this.ǃGak)throw new Error("effect type not yet added to folder");return this.ǃGak}ǃGf$(te){ǃG.ǃg(te,ǃGaH),this.ǃGak=te}ǃQG(){return this.ǃGaF}ǃpH(){return this.ǃGal}ǃVR(){super.ǃVR(),this.ǃTS().ǃcLy()}ǃcLE(){super.ǃcLE(),this.ǃTS().ǃcLy()}ǃGpo(){for(let te of this.ǃGaf.values())te.ǃGpo();this.ǃGaw&&this.ǃGaw.ǃGpo(),super.ǃGpo()}ǃGpH(){super.ǃGpH(),this.ǃGaw&&this.ǃGaw.ǃGpH();for(let te of this.ǃGaf.values())te.ǃGpH()}ǃGpx(){this.ǃGaF.ǃGaI(),app.ǃGax(this,"effecttypeadd"),this.ǃTS().ǃGyY(),app.ǃM().ǃn()}ǃGpI(){this.ǃTS().ǃGyY(),this.ǃGaF.ǃGaI(),app.ǃGax(this,"effecttyperemove"),app.ǃM().ǃn()}ǃGaJ(te){if(ǃG.ǃg(te,ǃLn),!(this.ǃGaF instanceof ǃ_K))throw new Error(_423);let ne=this.ǃGaf.get(te);if(ne)return ne;let ie=ǃG.ǃX(ǃGao,this,te);return this.ǃGaf.set(te,ie),ie}ǃQD(te){if(ǃG.ǃg(te,ǃLn),!(this.ǃGaF instanceof ǃ_K))throw new Error(_423);let ne=this.ǃGaf.get(te);if(!ne)throw new Error("object instance does not have associated effect instance");return ne}ǃGaZ(te){if(ǃG.ǃg(te,ǃLn),!(this.ǃGaF instanceof ǃ_K))throw new Error(_423);return this.ǃGaf.has(te)}ǃGaS(){return this.ǃGaw||ǃG.ǃds(this.ǃGaf.values())}ǃGas(){return!!this.ǃGaw}ǃsY(){if(this.ǃGaF instanceof ǃ_K)throw new Error("effect type not for a Layout or Layer");return this.ǃGaw}ǃff(te){ǃG.ǃmL(te,ǃLn);let ne=this.ǃGaw||this.ǃGaf.get(te);return ne.ǃff()}ǃr(te){if(ǃG.ǃbv(te),te=ǃ_K.ǃGWf(te,!0),!te||ǃG.ǃcaj(te))throw new Error("invalid name");if(this.ǃclE!==te){if(!ǃG.ǃck_(this.ǃclE,te))if(this.ǃGaF instanceof ǃ_K&&this.ǃGaF.ǃGaX(te))throw new Error(_424);else if(!(this.ǃGaF instanceof ǃ_K)&&this.ǃGaF.ǃGaO)throw new Error("name already used");this.ǃclE=te,this.ǃTS().ǃGyY(),app.ǃGps(this,"projectobjectnamechange")}}ǃVD(te,ne){if(ǃG.ǃbv(te),ǃG.ǃc$i(ne),name=ǃ_K.ǃGWf(te,!0),ǃG.ǃi.ǃT("model.object-class.effect-types.errors"),!name||ǃG.ǃcaj(name))return ǃG.ǃGD.ǃGr.ǃev.ǃm$(ne,_420,lang(".name-invalid.title"),lang(".name-invalid.message"),{align:_419}),void ǃG.ǃi.ǃW();if(!ǃG.ǃck_(name,this.ǃcu()))if(this.ǃGaF instanceof ǃ_K){if(this.ǃGaF.ǃGaX(name))return ǃG.ǃGD.ǃGr.ǃev.ǃm$(ne,_420,lang(_421),ǃcDZ(_422,name),{align:_419}),void ǃG.ǃi.ǃW();}else if(this.ǃGaF.ǃGaQ(name))return ǃG.ǃGD.ǃGr.ǃev.ǃm$(ne,_420,lang(_421),ǃcDZ(_422,name),{align:_419}),void ǃG.ǃi.ǃW();ǃG.ǃck_(name,te)||ǃG.ǃGD.ǃGr.ǃev.ǃm$(ne,_420,lang(".name-changed.title"),lang(".name-changed.message"),{align:_419}),ǃG.ǃi.ǃW(),this.ǃr(name)}ǃcu(){return this.ǃclE}ǃGuF(te=!1){let ne=[this.ǃpH().ǃEK(),this.ǃcu()];return te&&ne.push(this.ǃsY().ǃGuF()),ne}ǃpj(){let te={effectId:this.ǃpH().ǃEK(),name:this.ǃcu()};return this.ǃGas()&&(te.instance=this.ǃsY().ǃpj()),te}static ǃc_z(te,ne){let ie=ne.effectId;const me=te.ǃTS();if(!ǃG.ǃGUf.ǃGUD(ie,me))throw new Error(`missing effect id '${ie}'`);let ae=ǃG.ǃGUf.ǃpW(ie,me),de=ae.ǃGgc(te,ne.name);return de.ǃGas()&&de.ǃsY().ǃpU(ne.instance),te.ǃGaI(),de}static ǃGaE(te,ne){ǃG.ǃg(te,ǃfm);let ie=ne.ǃJk("effect").ǃcYQ("id");if(!ǃG.ǃGUf.ǃGUD(ie))throw new Error(`missing effect id '${ie}'`);let me=ǃG.ǃGUf.ǃpW(ie),ae=ne.ǃcYQ("name"),de=te.ǃGgG(me,ae);return de}}}"use strict",window.ǃGaH=class extends ǃzI{constructor(te,ne){ǃG.ǃg(te,ǃfm),super(te.ǃTS(),ne,ǃSb),this.ǃGaF=te,this.ǃzx()&&(this.ǃclE="")}ǃcVi(){this.ǃGaF.ǃcVi()}ǃrL(te){if(ǃG.ǃg(te,ǃSb),te.ǃGak)throw new Error("effect already belongs to folder");te.ǃGak=this,super.ǃrL(te),app.ǃGax(te,"effecttypeadd")}ǃVB(te,ne,ie,me){super.ǃVB(te,ne,ie,me),this.ǃGaF.ǃGaI(),app.ǃM().ǃn()}ǃGpx(){this.ǃcVi()}ǃGpI(){this.ǃcVi()}},"use strict",window.ǃGao=class ee extends ǃXb{constructor(te,ne){ǃG.ǃg(te,ǃSb),ǃG.ǃmL(ne,ǃLn),super(te.ǃTS()),this.ǃGgm=te,this.ǃI=ne,this.ǃGgD=new Map,this.ǃGgi=[],this.ǃGgR=!0,this.ǃGgb()}ǃz(){this.ǃGgD.clear(),this.ǃGgm=null,this.ǃI=null}ǃGah(te){if(ǃG.ǃg(te,ee),this.ǃpH()!==te.ǃpH())throw new Error("instance from different effect");for(let ne of te.ǃGgD)this.ǃGgD.set(ne[0],ne[1])}ǃGgT(){return this.ǃGgm}ǃpH(){return this.ǃGgm.ǃpH()}ǃGgk(){return this.ǃI}ǃcVi(){this.ǃTS().ǃwe()||(this.ǃI?this.ǃI.ǃcVi():this.ǃGgm.ǃQG().ǃcVi())}ǃGgb(){this.ǃGgD.clear();let te=this.ǃpH().ǃsK();for(let ne of te)this.ǃGgD.set(ne.ǃEK(),ne.ǃxj())}ǃGgX(te){return ǃG.ǃbv(te),this.ǃGgD.has(te)}ǃsh(te){ǃG.ǃbv(te);let ne=this.ǃGgD.get(te);if("undefined"==typeof ne)throw new Error(`invalid parameter id '${te}'`);return ne instanceof ǃG.ǃBc?ǃG.ǃX(ǃG.ǃBc,ne):ne}ǃsz(te,ne){ǃG.ǃbv(te);let ie=ǃG.ǃcBE(ne),me=ne instanceof ǃG.ǃBc;if(""!==ie&&""!==ie&&""!==ie&&!me)throw new Error(`cannot store '${ie}' in a parameter value`);let ae=this.ǃGgD.get(te);if("undefined"==typeof ae)throw new Error(`invalid parameter id '${te}'`);let de=ǃG.ǃcBE(ae);if(ie!==de)throw new Error(`cannot change parameter '${te}' from '${de}' to '${ie}'`);if(me){if(ne.ǃ_c(ae))return;ne=ǃG.ǃX(ǃG.ǃBc,ne)}else if(ne===ae)return;this.ǃGgD.set(te,ne),this.ǃGgR=!0,this.ǃcVi()}ǃGg$(){if(this.ǃGgR){ǃG.ǃGs(this.ǃGgi);for(let te of this.ǃpH().ǃsK())this.ǃGgi.push(this.ǃsh(te.ǃEK()));this.ǃGgR=!1}}ǃff(){return this.ǃGg$(),this.ǃGgi}ǃGuF(){let te=[];for(let ne of this.ǃpH().ǃsK())if(ne.ǃGaY()){let ie=ne.ǃsn(),me=this.ǃsh(ne.ǃEK());"color"===ie&&(me=[me.r,me.ǃcNj,me.b]),te.push(me)}return te}ǃpj(){let te={};for(let[ne,ie]of this.ǃGgD)ie instanceof ǃG.ǃBc&&(ie=ie.toJSON()),te[ne]=ie;return{parameters:te}}ǃpU(te){let ne=te.parameters;for(let[ie,me]of Object.entries(ne))Array.isArray(me)&&(me=new ǃG.ǃBc,me.ǃcNe(ne[ie])),this.ǃsz(ie,me)}ǃGvm(te){if(ǃG.ǃg(te,ǃG.ǃKI.Element),"effect-instance"!==te.ǃcYw())throw new Error("unexpected tag name");let ne=te.ǃcYH("parameters");if(ne){let ie=this.ǃpH();for(let me of ne.children()){let ae=me.ǃcYw(),de=me.ǃLx();ǃJI.ǃGvV(this,ie,ae.toLowerCase(),de)}}}},"use strict";{const _426="containerchange",_427="object type is deleted",ee=new Set(["normal","all","wrap"]);let te=new Set;window.ǃGuJ=class extends ǃG.ǃDa{constructor(ie){if(ǃG.ǃkK(ie,ǃEE),super(),2>ie.length)throw new Error("need at least 2 objects to create a container");this.ǃGgr=[],this.ǃGgV="normal",this.ǃGT=null,ǃG.ǃcGb(this.ǃGgr,ie),this.ǃGgr.sort(ǃ_K.ǃGgA),this.ǃGT=this.ǃGgr[0].ǃTS(),te.add(this)}ǃND(){for(let ie of this.ǃGgr)ie.ǃGgL(null);ǃG.ǃGs(this.ǃGgr),te.delete(this),ǃG.ǃz(this)}ǃTS(){return this.ǃGT}ǃkM(ie){let me=0;for(let ae of this.ǃGgr)if(ae.ǃkM()&&(ie||ae.ǃGg_()===this)&&(++me,2<=me))return!0;return!1}ǃGgt(){if(ǃG.ǃDP)for(let ie of this.ǃGgr)ie.ǃkM()&&assert(ie.ǃGg_()===this,"wrong container linkage")}ǃQR(ie){if(ǃG.ǃbv(ie),!ee.has(ie))throw new Error("invalid select mode");this.ǃGgV===ie||(this.ǃGgV=ie,this.ǃTS().ǃcVi())}ǃBg(){return this.ǃGgV}*ǃBW(){for(let ie of this.ǃGgr)ie.ǃkM()&&(yield ie)}ǃZQ(ie){if(ǃG.ǃg(ie,ǃEE),!ie.ǃkM())throw new Error(_427);return this.ǃGgr.includes(ie)}ǃGWB(ie){this.ǃGgP(ie),this.ǃGgr.sort(ǃ_K.ǃGgA),app.ǃGgj(this,ie,_426),this.ǃTS().ǃcVi()}ǃQr(ie){for(let me of ie)this.ǃGgP(me);this.ǃGgr.sort(ǃ_K.ǃGgA),app.ǃGgj(this,ǃG.ǃds(this.ǃBW()),_426),this.ǃTS().ǃcVi()}ǃGgP(ie){if(ǃG.ǃg(ie,ǃEE),!ie.ǃkM())throw new Error(_427);if(ie.ǃBP()||this.ǃGgr.includes(ie))throw new Error("object type already in a container");this.ǃGgr.push(ie),ie.ǃGgL(this)}ǃla(ie){if(ǃG.ǃg(ie,ǃEE),!ie.ǃkM())throw new Error(_427);let me=this.ǃGgr.indexOf(ie);if(ie.ǃBy()!==this||0>me)throw new Error("object type not in this container");this.ǃGgr.splice(me,1),ie.ǃGgL(null),app.ǃGgj(this,ie,_426),this.ǃTS().ǃcVi()}ǃGgd(ie){ǃG.ǃkK(ie,ǃEE);let me=this.ǃkM(),ae=ǃG.ǃds(this.ǃBW());for(let de of this.ǃGgr)-1===ie.indexOf(de)&&de.ǃGgL(null);ǃG.ǃcGb(this.ǃGgr,ie),!me&&this.ǃkM(!0)?this.ǃGpx():me&&!this.ǃkM()&&this.ǃGpI(),this.ǃGgt()}ǃGgE(){return this.ǃGgr.slice(0)}ǃGge(){for(let ie of this.ǃGgr)ie.ǃGgL(this)}ǃGpx(){this.ǃGge(),app.ǃGgj(this,ǃG.ǃds(this.ǃBW()),_426),this.ǃTS().ǃcVi()}ǃGpI(){this.ǃTS().ǃcVi(),app.ǃGgj(this,null,_426)}ǃpj(){return{members:[...this.ǃBW()].map(ie=>ie.ǃcu()),selectMode:this.ǃBg()}}static ǃGUn(ie,me){let ae=[];for(let re of me.members){let Ge=ie.ǃpB(re);if(!Ge)throw new Error(`cannot find object type name '${re}'`);ae.push(Ge)}if(2>ae.length)throw new Error("need at least 2 types in container");let de=ae[0].ǃQV(ae);me.hasOwnProperty("selectMode")&&de.ǃQR(me.selectMode)}static*ǃGux(ie){ǃG.ǃg(ie,ǃm_);for(let me of te)me.ǃkM()&&me.ǃTS()===ie&&(yield me)}ǃGuF(ie){return ǃG.ǃg(ie,ǃTb),[...this.ǃBW()].map(me=>ie.ǃGuw(me))}}}"use strict",window.ǃfm=class extends ǃXb{constructor(te){super(te),this.ǃGgp=ǃG.ǃX(ǃGaH,this,null)}ǃGpo(){this.ǃGgp.ǃGpo(),super.ǃGpo()}ǃGpH(){super.ǃGpH(),this.ǃGgp.ǃGpH()}ǃGgG(te,ne){ǃG.ǃg(te,ǃGBl),ǃG.ǃbv(ne);let ie=this instanceof ǃ_K?this:null;if(ie&&!ie.ǃcy().ǃlU())throw new Error("effects not supported");if(ne=ǃ_K.ǃGWf(ne,!0),!ne)throw new Error("invalid name");if(ie&&ie.ǃGaX(ne))throw new Error("name already in object class namespace");let me=te.ǃGgc(this,ne);if(this.ǃGgp.ǃrL(me),this.ǃGaI(),ie){for(let ae of ie.ǃGgf())me.ǃGaJ(ae);ie.ǃGaL()}return this.ǃcVi(),me}ǃGWx(){return this.ǃGgp.ǃGiC()}ǃGgy(){return this.ǃGgp.ǃGfR()}*ǃsN(){yield*this.ǃGWx()}ǃGuW(){let te=0;for(const ne of this.ǃGWx())++te;return te}ǃGaI(){}ǃGgB(){return!!ǃG.ǃds(this.ǃsN())}ǃGgW(){return this.ǃGgp}ǃGgu(te){ǃG.ǃbv(te);for(let ne of this.ǃsN())if(ǃG.ǃck_(te,ne.ǃcu()))return ne;return null}ǃGaO(te){return ǃG.ǃbv(te),!!this.ǃGgu(te)}ǃGgU(te){ǃG.ǃbv(te),te=ǃ_K.ǃGWf(te,!0);let ne=this instanceof ǃ_K?this:null;if(ne?!ne.ǃGaX(te):!this.ǃGaO(te))return te;let ie=2,me="";do me=te+ie,++ie;while(ne?ne.ǃGaX(me):this.ǃGaO(me));return me}ǃGgv(){let te=new Set;for(let ne of this.ǃsN())te.add(ne.ǃpH());return te}ǃGgq(te){let ne=[];for(let ie of this.ǃGWx())ne.push(ie.ǃpj());te.effectTypes=ne}ǃGga(te){if(te.effectTypes){let ne=te.effectTypes;for(let ie of ne)this.ǃGgp.ǃrL(ǃSb.ǃc_z(this,ie))}}ǃGgg(te,ne=!1){let ie=te.ǃJk("effects");for(let me of ie.children("effect-type")){let ae=ǃSb.ǃGaE(this,me);if(ne){let de=me.ǃcYH("effect-instance");de&&ae.ǃsY().ǃGvm(de)}}}},"use strict";{const _428="bottom",_429="warning",_430="invalid name",_431="name is reserved",_432="instance-variables",_433="should be overridden",_434="behaviors not supported",_435="instance variables not supported",_436="name already in object class namespace",ee=new Set([..."\\/:;*?\"|.,'-`!\xAC\xA3$%^&+=<>{}()[]@#~\xAD"]),te=new Set(["self","true","false","system"]);window.ǃ_K=class ne extends ǃfm{constructor(ie,me,ae){if(super(ie),ǃG.ǃbv(ae),ae=ne.ǃGWf(ae,!0),!ae)throw new Error(_430);if("System"!==ae&&ne.ǃGgN(ae,ie))throw new Error(_431);if(this.ǃTS().ǃGWp(ae))throw new Error(`object class name '${ae}' already used`);ǃG.ǃg(me,Plugin),this.ǃciL=me,this.ǃclE=ae,this.ǃGgK=ae,this.ǃGgn=ǃG.ǃX(ǃGar,this,null),this.ǃGgM=ǃG.ǃX(ǃGay,this,null),this.ǃcOs=!1,this.ǃTS().ǃzr(this)}ǃz(){}ǃly(){return this.ǃcOs}ǃcVi(){this.ǃTS().ǃwe()||this.ǃcOs||(this.ǃcOs=!0,this.ǃTS().ǃGyn(!0),app.ǃGgC(this,"objectclassmarkchanged"))}ǃGyh(){this.ǃcOs&&(this.ǃcOs=!1,app.ǃGgC(this,"objectclassunmarkchanged"))}ǃVR(){super.ǃVR(),this.ǃTS().ǃcLy()}ǃcLE(){super.ǃcLE(),this.ǃTS().ǃcLy()}ǃGpo(){this.ǃGgn.ǃGpo(),this.ǃGgM.ǃGpo(),super.ǃGpo()}ǃGpH(){super.ǃGpH(),this.ǃGgM.ǃGpH(),this.ǃGgn.ǃGpH()}ǃGpx(){this.ǃTS().ǃzr(this),this.ǃTS().ǃGys(),app.ǃGgC(this,"objectclassadd"),this.ǃTS().ǃGyY(),app.ǃn()}ǃGpI(){this.ǃTS().ǃGyY(),this.ǃTS().ǃGys(),app.ǃGgC(this,"objectclassremove"),this.ǃTS().ǃzV(this),app.ǃn()}ǃGaL(){throw new Error(_433)}*ǃLo(){throw new Error(_433)}*ǃGgf(){throw new Error(_433)}ǃGgh(ie){ǃG.ǃbv(ie);const me=this.ǃcy();return me.ǃlW()&&this.ǃGgY(ie)||me.ǃlu()&&this.ǃGgz(ie)||this.ǃcy().ǃGgF(ie)||this.ǃciL.ǃlU()&&this.ǃGaO(ie)}ǃGaX(ie){throw ǃG.ǃbv(ie),new Error(_433)}static ǃGWf(ie,me){ǃG.ǃbv(ie),me=!!me;let ae=[...ie];for(let de=0,re=ae.length;de!ne.ǃGgl(de)),me){for(;ae.length&&"_"===ae[0];)ae.shift();let de=!0;for(let re of ae)if(!ǃG.ǃcKg(re)){de=!1;break}de&&ǃG.ǃGs(ae)}else for(;ae.length&&(ǃG.ǃcKg(ae[0])||"_"===ae[0]);)ae.shift();return ae.join("")}static ǃGgl(ie){return ǃG.ǃbv(ie),!ee.has(ie)&&!ǃG.ǃcKN(ie)}static ǃGgN(ie,me){return ǃG.ǃbv(ie),ǃG.ǃg(me,ǃm_),!!ǃG.ǃcaj(ie)||!!te.has(ie.toLowerCase())||!!me.ǃcjo().ǃcy().ǃGgF(ie)}ǃcu(){return this.ǃclE}ǃmM(){return"system"===this.ǃciL.ǃEK()?this.ǃciL.ǃcu():this.ǃcu()}ǃr(ie){if(ǃG.ǃbv(ie),ie=ne.ǃGWf(ie,!0),this.ǃclE!==ie){if(!ie)throw new Error(_430);if(!ǃG.ǃck_(this.ǃclE,ie)&&this.ǃTS().ǃGWp(ie))throw new Error(`object class name '${ie}' already used`);if(ne.ǃGgN(ie,this.ǃTS()))throw new Error(_431);let me=this.ǃclE;this.ǃclE=ie,this.ǃTS().ǃwe()&&(this.ǃGgK=ie),this.ǃTS().ǃc_N(),this.ǃTS().ǃGyY(),this.ǃTS().ǃAx(this,me),app.ǃGgC(this,"objectclassnamechange"),app.ǃGps(this,"projectobjectnamechange")}}ǃVD(ie,me){return ǃG.ǃbv(ie),ǃG.ǃc$i(me),name=ne.ǃGWf(ie,!0),ǃG.ǃi.ǃT("model.object-class.errors"),name?ne.ǃGgN(name,this.ǃTS())?(ǃG.ǃGD.ǃGr.ǃev.ǃm$(me,_429,lang(".name-reserved.title"),ǃcDZ(".name-reserved.message",name),{align:_428}),void ǃG.ǃi.ǃW()):!ǃG.ǃck_(name,this.ǃcu())&&this.ǃTS().ǃGWp(name)?(ǃG.ǃGD.ǃGr.ǃev.ǃm$(me,_429,lang(".name-used.title"),ǃcDZ(".name-used.message",name),{align:_428}),void ǃG.ǃi.ǃW()):void(this.ǃr(name),!ǃG.ǃck_(name,ie)&&ǃG.ǃGD.ǃGr.ǃev.ǃm$(me,_429,lang(".name-changed.title"),lang(".name-changed.message"),{align:_428}),ǃG.ǃi.ǃW()):(ǃG.ǃGD.ǃGr.ǃev.ǃm$(me,_429,lang(".name-invalid.title"),lang(".name-invalid.message"),{align:_428}),void ǃG.ǃi.ǃW())}ǃGUA(){ǃG.ǃDW()}ǃGUV(ie){this.ǃGgK===this.ǃcu()||(this.ǃGgK&&ie.add(this.ǃGUA(this.ǃGgK)),this.ǃGgK=this.ǃcu())}ǃGU_(ie){!this.ǃkM()&&this.ǃGgK&&(ie.add(this.ǃGUA(this.ǃGgK)),this.ǃGgK="")}ǃcy(){return this.ǃciL}ǃmy(){return this.ǃciL.ǃmy()}ǃGcD(){return this.ǃciL.ǃGcD()}ǃGci(){return this.ǃciL.ǃGci()}ǃmq(){return!1}ǃc_a(ie){if(ǃG.ǃD_(ie),ǃG.ǃg(ie.ǃAJ,ne),ǃG.ǃkK(ie.ǃc_y,ǃGgw),ǃG.ǃkK(ie.ǃc_W,ǃGgo),ǃG.ǃkK(ie.ǃc_U,ǃGgH),ie.ǃAJ===this)return!1;if(ie.ǃAJ.ǃcy()!==this.ǃcy())return!1;for(let me of ie.ǃc_y){let ae=this.ǃGgI(me.ǃcu());if(!ae||ae.ǃsn()!==me.ǃsn())return!1}for(let me of ie.ǃc_W){let ae=this.ǃGgx(me.ǃcu());if(!ae||ae.ǃOI()!==me.ǃOI())return!1}for(let me of ie.ǃc_U){let ae=this.ǃGgu(me.ǃcu());if(!ae||ae.ǃpH()!==me.ǃpH())return!1}return!0}ǃGae(ie,me,ae){if(!this.ǃciL.ǃlW())throw new Error(_435);if(ǃG.ǃbv(ie),ǃG.ǃbv(me),ie=ne.ǃGWf(ie,!1),!ie)throw new Error(_430);if(this.ǃGaX(ie))throw new Error(_436);if("undefined"==typeof ae)switch(me){case"boolean":ae=!1;break;case"number":ae=0;break;case"string":ae="";break;default:throw new TypeError("invalid initial value");}let de=ǃG.ǃX(ǃSi,this,ie,me);for(let re of this.ǃGgf())de.ǃOo(re,ae);return this.ǃGgn.ǃrL(de),this.ǃcVi(),this.ǃGaL(),de}ǃGgJ(){if(!this.ǃciL.ǃlW())throw new Error(_435);return this.ǃGgn.ǃGiC()}ǃGgZ(){if(!this.ǃciL.ǃlW())throw new Error(_435);return this.ǃGgn.ǃGfR()}*ǃOF(){if(!this.ǃciL.ǃlW())throw new Error(_435);yield*this.ǃGgJ()}*ǃGgS(ie){if(!this.ǃciL.ǃlW())throw new Error(_435);for(let me of this.ǃOF())"boolean"===me.ǃsn()?ie&&(yield me):ie||(yield me)}ǃGgs(){if(!this.ǃciL.ǃlW())throw new Error(_435);return this.ǃGgn}ǃGgI(ie){if(!this.ǃciL.ǃlW())throw new Error(_435);ǃG.ǃbv(ie);for(let me of this.ǃOF())if(ǃG.ǃck_(ie,me.ǃcu()))return me;return null}ǃGgY(ie){if(!this.ǃciL.ǃlW())throw new Error(_435);return ǃG.ǃbv(ie),!!this.ǃGgI(ie)}ǃGgO(){if(!this.ǃciL.ǃlW())throw new Error(_435);let ie,me=1;do ie=ǃmo("model.object-class.instance-variables.new-variable-name",me++);while(this.ǃGaX(ie));return ie}ǃGaN(ie,me){if(!this.ǃciL.ǃlu())throw new Error(_434);if(ǃG.ǃg(ie,ǃGBz),ǃG.ǃbv(me),me=ne.ǃGWf(me,!0),!me)throw new Error(_430);if(this.ǃGaX(me))throw new Error(_436);let ae=ie.ǃGag(this,me);this.ǃGgM.ǃrL(ae);for(let de of this.ǃGgf())ae.ǃGaU(de);return this.ǃcVi(),this.ǃGaL(),ae}ǃGWI(){if(!this.ǃciL.ǃlu())throw new Error(_434);return this.ǃGgM.ǃGiC()}ǃGgQ(){if(!this.ǃciL.ǃlu())throw new Error(_434);return this.ǃGgM.ǃGfR()}*ǃOH(){if(!this.ǃciL.ǃlu())throw new Error(_434);yield*this.ǃGWI()}ǃGNc(){if(!this.ǃciL.ǃlu())throw new Error(_434);return this.ǃGgM}ǃGgx(ie){if(!this.ǃciL.ǃlu())throw new Error(_434);ǃG.ǃbv(ie);for(let me of this.ǃOH())if(ǃG.ǃck_(ie,me.ǃcu()))return me;return null}ǃGgz(ie){if(!this.ǃciL.ǃlu())throw new Error(_434);return ǃG.ǃbv(ie),!!this.ǃGgx(ie)}ǃGNG(ie){if(ǃG.ǃbv(ie),ie=ne.ǃGWf(ie,!0),!this.ǃGaX(ie))return ie;let me=2,ae="";do ae=ie+me,++me;while(this.ǃGaX(ae));return ae}ǃGNm(){if(!this.ǃciL.ǃlu())throw new Error(_434);let ie=new Set;for(let me of this.ǃOH())ie.add(me.ǃOI());return ie}ǃGuF(ie){ǃG.ǃg(ie,ǃTb),ie.ǃGND(this);let me=ie.ǃGuN(this.ǃcy().ǃEK()),ae=this instanceof ǃeg,de=null,re=null;ae||(this.ǃcy().ǃ_H()?de=this.ǃGNi(ie):this.ǃcy().ǃ_w()&&(re=this.ǃGNR(ie)));let Ge=[],oe=[],le=0,ue=[],pe=0,ge=null;this.ǃcy().ǃlW()&&(Ge=[...this.ǃOF()].map(ve=>ve.ǃGpF())),this.ǃcy().ǃlu()&&(oe=[...this.ǃGWI()].map(ve=>ve.ǃGuF(ie)),le=oe.length),this.ǃcy().ǃlU()&&(ue=[...this.ǃGWx()].map(ve=>ve.ǃGuF()),pe=ue.length),!ae&&this.ǃcy().ǃGNb()&&(ge=this.ǃGNT());let he=[this.ǃcu(),me,ae,Ge,le,pe,de,re,oe,this.ǃmq(),!1,this.ǃGpF(),ue,ge];return!ae&&this.ǃcy().ǃzQ()&&he.push(this.ǃFc().ǃGNk()),he}ǃGus(){return{}}ǃGUT(){}ǃpj(ie){ǃG.ǃcDt(ie);let me=ie&&ie.mode||"",ae=this.ǃclE;ie&&ie.ǃp_&&(ae=ie.ǃp_);let de={name:ae,"plugin-id":this.ǃcy().ǃEK()};if("copy"!==me&&(de.sid=this.ǃGpF()),Object.assign(de,this.ǃGus()),this.ǃcy().ǃlW()){let re=[];for(let Ge of this.ǃGgJ())re.push(Ge.ǃpj(ie));de.instanceVariables=re}if(this.ǃcy().ǃlu()){let re=[];for(let Ge of this.ǃGWI())re.push(Ge.ǃpj(ie));de.behaviorTypes=re}return this.ǃcy().ǃlU()&&this.ǃGgq(de),de}ǃpU(ie){ie.hasOwnProperty("sid")&&this.ǃGpw(ie.sid),this.ǃGUT(ie)}ǃpv(ie){if(this.ǃcy().ǃlW()&&ie.instanceVariables){let me=ie.instanceVariables;for(let ae of me)this.ǃGgn.ǃrL(ǃSi.ǃc_z(this,ae))}if(this.ǃcy().ǃlu()&&ie.behaviorTypes){let me=ie.behaviorTypes;for(let ae of me)this.ǃGgM.ǃrL(ǃSR.ǃc_z(this,ae))}this.ǃcy().ǃlU()&&ie.effectTypes&&this.ǃGga(ie)}static ǃGgA(ie,me){let ae=ie.ǃcu().toLowerCase(),de=me.ǃcu().toLowerCase();return ae>de?1:aede?1:aethis.ǃGNd(),500)}ǃz(){for(let me of this.ǃGaf)me.ǃz();if(this.ǃGaf.clear(),this.ǃGNE(),this.ǃnB.ǃz(),this.ǃnB=null,this.ǃcQJ&&(this.ǃcQJ.ǃz(),this.ǃcQJ=null),this.ǃcQZ&&(this.ǃcQZ.ǃz(),this.ǃcQZ=null),this.ǃcQS&&(this.ǃcQS.ǃz(),this.ǃcQS=null),this.ǃ_w()){for(let me of this.ǃGNe())me.ǃz();this.ǃGN_.clear(),this.ǃGN_=null}else this.ǃ_H()&&this.ǃpK.ǃz();if(this.ǃGNb()){for(let me of this.ǃGNt.values())me.ǃmt();this.ǃGNt.clear(),this.ǃGNt=null}!this.ǃGNL&&this.ǃGNA&&(this.ǃGNA.ǃz(!0),this.ǃGNA=null),this.ǃGNj.ǃz(),this.ǃGNj=null,super.ǃz()}ǃxJ(){return"object-type"}ǃGUA(me){return ǃG.ǃoG(me),me=(me||this.ǃcu()).toLowerCase(),`objectTypes\\${me}.json`}ǃGpo(){for(let me of this.ǃGaf)me.ǃGpo();if(this.ǃcy().ǃlW())for(let me of this.ǃGgZ())me.ǃGpo();super.ǃGpo()}ǃGpH(){if(super.ǃGpH(),this.ǃcy().ǃlW())for(let me of this.ǃGgZ())me.ǃGpH();for(let me of this.ǃGaf)me.ǃGpH()}ǃGpx(){let me=this.ǃGN$&&this.ǃGN$.ǃkM();super.ǃGpx(),this.ǃGN$&&!me&&this.ǃGN$.ǃkM(!0)&&this.ǃGN$.ǃGpx();for(let ae of this.ǃTS().ǃFy(this))ae.ǃGNp(this);!this.ǃGNL&&this.ǃGNA&&this.ǃTS().ǃGWC(this.ǃGWN())}ǃGpI(){let me=this.ǃGN$&&this.ǃGN$.ǃkM();super.ǃGpI(),this.ǃGN$&&me&&!this.ǃGN$.ǃkM()&&this.ǃGN$.ǃGpI();for(let ae of this.ǃTS().ǃGuX(this))ae.ǃGNp(this);!this.ǃGNL&&this.ǃGNA&&this.ǃTS().ǃGWY(this.ǃGWN())}ǃGNf(){assert(this.ǃcy().ǃzQ(),"expected single global plugin type"),assert(0===this.ǃGaf.size,"expected zero instances");let me=ǃG.ǃX(ǃxR,this);return me.ǃGau=this.ǃnB.ǃxi(me),this.ǃGaf.add(me),this.ǃTS().ǃwe()||me.ǃl(),me}ǃr(me){ǃG.ǃbv(me),super.ǃr(me),!this.ǃGNL&&this.ǃGNA&&this.ǃGNA.ǃr(me)}ǃDD(){super.ǃDD();for(let me of this.ǃGaf)me.ǃDD();this.ǃnB.ǃDD&&this.ǃnB.ǃDD()}ǃFu(){if(!this.ǃGak)throw new Error("object type not yet added to folder");return this.ǃGak}ǃGf$(me){ǃG.ǃg(me,ǃEv),this.ǃGak=me}ǃxS(){return this.ǃnB}ǃGNy(me){if(ǃG.ǃg(me,ǃxR),this.ǃcy().ǃlW())for(let ae of this.ǃOF())ae.ǃOo(me,ae.ǃGaP(this))}ǃGNB(me){if(ǃG.ǃg(me,ǃxR),this.ǃcy().ǃlu())for(let ae of this.ǃOH())ae.ǃGaU(me)}ǃGNW(me){if(ǃG.ǃg(me,ǃLn),this.ǃcy().ǃlU())for(let ae of this.ǃsN())ae.ǃGaJ(me)}ǃGNu(){if("object"!==this.ǃciL.ǃEq()||this.ǃciL.ǃzQ())throw new Error(_441);let me=ǃG.ǃX(ǃxR,this);return me.ǃGau=this.ǃnB.ǃxi(me),this.ǃGNy(me),this.ǃGNB(me),this.ǃGaf.add(me),app.ǃJi(me,_439),me}ǃEp(me,ae){if(ǃG.ǃg(me,ǃrP),ǃG.ǃmL(ae,window.ǃLn),"world"!==this.ǃciL.ǃEq())throw new Error(_441);let de=ǃG.ǃX(window.ǃLn,this,me);return ae&&de.ǃGNU(ae),de.ǃGau=this.ǃnB.ǃxi(de),this.ǃGNy(de),this.ǃGNB(de),this.ǃGNW(de),this.ǃGaf.add(de),me.ǃGNv(de),app.ǃJi(de,_439),de}ǃGNq(){if(this.ǃ_w()){let me=ǃG.ǃX(ǃckt,this,_438),ae=ǃG.ǃX(ǃckk,this,me);return me.ǃGNa(ae),this.ǃGNr.ǃrL(me),ae.ǃGNq().then(()=>this)}if(this.ǃ_H()){let me=this.ǃcy().ǃGNg();return me?this.ǃpK.ǃGNN(me).then(()=>this):this.ǃpK.ǃGNq().then(()=>this)}return Promise.resolve(this)}ǃGNN(me){return ǃG.ǃg(me,Blob),ǃG.ǃcgV(me).then(ae=>{if(this.ǃ_w()){let de=ǃG.ǃX(ǃckt,this,_438),re=ǃG.ǃX(ǃckk,this,de);de.ǃGNa(re),this.ǃGNr.ǃrL(de),re.ǃGNK(me,ae.width,ae.height)}else this.ǃ_H()&&this.ǃpK.ǃGNK(me,ae.width,ae.height);return Promise.resolve(this)})}ǃGNK(me,ae,de){if(ǃG.ǃg(me,Blob),ǃG.ǃTH(ae),ǃG.ǃTH(de),this.ǃ_w()){let re=ǃG.ǃX(ǃckt,this,_438),Ge=ǃG.ǃX(ǃckk,this,re);re.ǃGNa(Ge),this.ǃGNr.ǃrL(re),Ge.ǃGNK(me,ae,de)}else this.ǃ_H()&&this.ǃpK.ǃGNK(me,ae,de);return this}*ǃLo(){if(this.ǃciL.ǃzQ())throw new Error(_441);for(let me of this.ǃGaf)me.ǃkM()&&(yield me)}*ǃGgf(){if(this.ǃciL.ǃzQ())throw new Error(_441);yield*this.ǃGaf.values()}ǃeu(){return[...this.ǃLo()].length}ǃeI(){return ǃG.ǃds(this.ǃLo())}ǃFc(){if(!this.ǃciL.ǃzQ())throw new Error(_441);return assert(1===this.ǃGaf.size,"expected single instance for singleglobal plugin"),ǃG.ǃds(this.ǃGaf)}ǃGNn(me){switch(me){case"small":return this.ǃcQJ&&this.ǃcQJ.ǃcOP()&&(this.ǃcQJ=null),this.ǃcQJ;case _437:return this.ǃcQZ&&this.ǃcQZ.ǃcOP()&&(this.ǃcQZ=null),this.ǃcQZ;case"large":return this.ǃcQS&&this.ǃcQS.ǃcOP()&&(this.ǃcQS=null),this.ǃcQS;default:throw new Error(_440);}}ǃGNM(me,ae){switch(me){case"small":this.ǃcQJ=ae;break;case _437:this.ǃcQZ=ae;break;case"large":this.ǃcQS=ae;break;default:throw new Error(_440);}}ǃGNC(me){if(this.ǃ_w()){let ae=this.ǃul();return ae?this.ǃGNn(me)?this.ǃGNn(me):(this.ǃGNM(me,ae.ǃGNh(me)),this.ǃGNn(me)):super.ǃmy()}if(this.ǃ_H())return this.ǃGNn(me)?this.ǃGNn(me):(this.ǃGNM(me,this.ǃ_I().ǃGNh(me)),this.ǃGNn(me));switch(me){case"small":return super.ǃmy();case _437:return super.ǃGcD();case"large":return super.ǃGci();default:throw new Error("invalid icon size specifier");}}ǃmy(){return this.ǃGNC("small")}ǃGcD(){return this.ǃGNC(_437)}ǃGci(){return this.ǃGNC("large")}ǃGNY(){(this.ǃcQJ||this.ǃcQZ||this.ǃcQS)&&this.ǃGNj.ǃGI()}ǃGNd(){if(this.ǃ_w()){let me=this.ǃul();if(!me)return;me.ǃYN().then(ae=>{this.ǃcQJ&&this.ǃcQJ.ǃ$X(ae),this.ǃcQZ&&this.ǃcQZ.ǃ$X(ae),this.ǃcQS&&this.ǃcQS.ǃ$X(ae)})}else this.ǃ_H()&&this.ǃ_I().ǃYN().then(me=>{this.ǃcQJ&&this.ǃcQJ.ǃ$X(me),this.ǃcQZ&&this.ǃcQZ.ǃ$X(me),this.ǃcQS&&this.ǃcQS.ǃ$X(me)})}ǃGaL(){if(this.ǃciL.ǃzQ())throw new Error(_441);let me=new Set;if("world"===this.ǃcy().ǃEq())for(let ae of this.ǃLo())me.add(ae.ǃrq());else for(let ae of this.ǃLo())me.add(ae.ǃGNz());for(let ae of me)ae.ǃcVi()}ǃGNF(){if(!this.ǃGNb())throw new Error("object type does not refer to a tilemap");return this.ǃGNt}ǃBP(){return this.ǃGN$&&this.ǃGN$.ǃkM()}ǃBy(){return this.ǃGN$&&this.ǃGN$.ǃkM()?(assert(this.ǃGN$.ǃZQ(this),"container should include self"),this.ǃGN$.ǃGgt(),this.ǃGN$):null}ǃGg_(){return this.ǃGN$}ǃGgL(me){if(ǃG.ǃmL(me,ǃGuJ),me&&me!==this.ǃGN$&&this.ǃBP())throw new Error(_442);this.ǃGN$=me}ǃQV(me){if(ǃG.ǃkK(me,ie),2>me.length)throw new Error("need at least 2 objects to create a container");if(!me.includes(this))throw new Error("container initial members should include this");if(this.ǃBP())throw new Error(_442);let ae=ǃG.ǃX(ǃGuJ,me);for(let de of me){if(!de.ǃkM())throw new Error("cannot create container with inactive ObjectType");de.ǃGgL(ae)}return ae.ǃGgt(),app.ǃGgj(ae,this,"containerchange"),this.ǃTS().ǃcVi(),ae}ǃGNE(){this.ǃGN$&&this.ǃGN$.ǃND()}ǃGaX(me){if(ǃG.ǃbv(me),this.ǃGgh(me))return!0;for(let ae of this.ǃTS().ǃFy(this))if(ae.ǃGgh(me))return!0;return!1}*ǃOF(){if(!this.ǃciL.ǃlW())throw new Error("instance variables not supported");for(let me of this.ǃTS().ǃFy(this))yield*me.ǃGgJ();yield*this.ǃGgJ()}*ǃOH(){if(!this.ǃciL.ǃlu())throw new Error("behaviors not supported");for(let me of this.ǃTS().ǃFy(this))yield*me.ǃGWI();yield*this.ǃGWI()}ǃGaI(){this.ǃGNV=null}ǃGNl(){if(null===this.ǃGNV){this.ǃGNV=[];for(let me of this.ǃTS().ǃFy(this))for(let ae of me.ǃGWx())this.ǃGNV.push(ae);for(let me of this.ǃGWx())this.ǃGNV.push(me)}}*ǃsN(){if(!this.ǃciL.ǃlU())throw new Error("effects not supported");this.ǃGNl();for(let me of this.ǃGNV)yield me}ǃGNw(){return this.ǃGNl(),this.ǃGNV}ǃGgB(){return this.ǃGNl(),0te?this.ǃGNo():(this.ǃGNA||(this.ǃGNA=this.ǃTS().ǃGWy(this),this.ǃGNL=!0),this.ǃGNA)}ǃGWg(){return this.ǃGNL}ǃGNH(me){if(ǃG.ǃg(me,ǃckk),!this.ǃ_H()){if(!this.ǃ_w())throw new Error(_443);this.ǃGN_.size===te&&this.ǃGNI(),assert(!this.ǃGN_.has(me),"animation frame already active"),this.ǃGN_.add(me)}}ǃGNx(me){if(ǃG.ǃg(me,ǃckk),!this.ǃ_H()){if(!this.ǃ_w())throw new Error(_443);this.ǃGN_.delete(me),this.ǃGN_.size!==te||this.ǃTS().ǃSr()||this.ǃGNJ()}}ǃGNI(){this.ǃGNA&&(assert(this.ǃGNL,"expected to be using own sprite sheet collection"),this.ǃGNL=!1,this.ǃGNA=ǃG.ǃX(ǃGWh,this.ǃTS(),this.ǃcu(),!1),this.ǃGB_(),this.ǃTS().ǃGWv(this))}ǃGNJ(){if(this.ǃGNA){assert(!this.ǃGNL,"expected to be using shared sprite sheet collection");let me=this.ǃGNA;this.ǃGNA=this.ǃTS().ǃGWy(this),this.ǃGNL=!0,this.ǃGB_(),me.ǃz(),me=null}}ǃGB_(){if(this.ǃ_w())for(let me of this.ǃGN_)me.ǃGNZ();else this.ǃ_H()&&this.ǃpK.ǃGNZ()}ǃGve(){return this.ǃciL&&this.ǃciL.ǃGve()}ǃls(){return this.ǃciL&&this.ǃciL.ǃls()}ǃaL(){return!1}ǃGNb(){return this.ǃciL&&this.ǃciL.ǃGNb()}ǃ_H(){return this.ǃciL&&this.ǃciL.ǃ_H()}ǃ_I(){if(!this.ǃ_H())throw new Error("object type does not have an image");return this.ǃpK}ǃ_w(){return this.ǃciL&&this.ǃciL.ǃ_w()}ǃpa(){if(!this.ǃ_w())throw new Error(_444);return this.ǃGNr}ǃGNS(){if(!this.ǃ_w())throw new Error(_444);return this.ǃGNr.ǃGiC()}ǃGNe(){if(!this.ǃ_w())throw new Error(_444);return this.ǃGNr.ǃGfR()}ǃcTX(me){ǃG.ǃbv(me),me=me.toLowerCase();for(let ae of this.ǃGNS())if(ǃG.ǃck_(me,ae.ǃcu()))return ae;return null}ǃckP(){if(!this.ǃ_w())throw new Error(_444);return ǃG.ǃds(this.ǃGNS())}ǃGNs(){if(!this.ǃ_w())throw new Error(_444);let me=0;for(let ae of this.ǃGNS())++me;return me}ǃGNO(){return 0<=this.ǃGNs()}ǃGNQ(){if(!this.ǃ_w())throw new Error(_444);return 1>=this.ǃGN_.size}ǃGab(){if(!this.ǃ_w())throw new Error(_444);return this.ǃGN_.size}ǃ_o(me,ae){if(ǃG.ǃbv(me),ǃG.ǃTH(ae),ae=Math.floor(ae),!this.ǃ_w())throw new Error(_444);let de=this.ǃcTX(me);if(de||(de=this.ǃckP()),!de)throw new Error("object type has no animations");return 0>ae&&(ae=0),ae>=de.ǃcT$()&&(ae=de.ǃcT$()-1),de.ǃcTj(ae)}ǃul(){if(!this.ǃ_w())throw new Error(_444);let me=this.ǃckP();return me?me.ǃcTj(0):null}ǃQW(){let me=[];for(let ae of this.ǃGNS())me.push(ae);return me.sort(ee),me}ǃGKc(me,ae){if(ǃG.ǃg(me,ǃckk),ǃG.ǃbv(ae),!this.ǃTS().ǃwe()){let de=new ǃG.Event(ae);de.ǃxk=me,this.dispatchEvent(de)}}*ǃGKG(){this.ǃ_w()?yield*this.ǃGN_.values():this.ǃ_H()&&(yield this.ǃpK)}ǃGNi(me){ǃG.ǃg(me,ǃTb);let ae=this.ǃ_I().ǃGKm(),de=ae.ǃfe();return assert(de,"missing spritesheet"),[me.ǃTs(de),de.ǃGqG(),0,ae.ǃGqk(),ae.ǃGqX(),ae.ǃcE(),ae.ǃce()]}ǃGNR(me){return ǃG.ǃg(me,ǃTb),[...this.ǃGNS()].map(ae=>ae.ǃGuF(me))}ǃGNT(){assert(this.ǃGNb(),"type does not have a tilemap");let me=[];for(let[ae,de]of this.ǃGNt)if(!de.ǃGKD()){let un=ae+1;me.length{if(re.name!==ae)throw new Error(`unexpected object type name '${re.name}'`);let Ge=ǃG.ǃv.ǃpW(re["plugin-id"],me),oe=Ge.ǃpu(me,ae);return oe.ǃpU(re),oe.ǃpv(re),oe.ǃ_w()?oe.ǃpa().ǃpq(re.animations,{ǃGKb:de}).then(()=>oe):oe.ǃ_H()?oe.ǃpK.ǃpN(re.image,{ǃGKb:de}).then(()=>oe):Promise.resolve(oe)})}ǃGUL(me,ae){if(ǃG.ǃcDt(ae),this.ǃ_H())this.ǃpK.ǃUS(me,ae);else if(this.ǃ_w())for(let de of this.ǃGNS())for(let re of de.frames())re.ǃUS(me,ae)}static ǃGKT(me,ae,de){ǃG.ǃg(me,ǃm_),ǃG.ǃg(ae,ǃG.ǃKI.Element),ǃG.ǃg(de,ǃG.ǃczD);let re=ae.ǃcYQ("name"),Ge=ae.ǃJk("plugin"),oe=Ge.ǃcYQ("id");if(!ǃG.ǃv.ǃGUD(oe))throw new Error(`missing plugin id '${oe}'`);let le=ǃG.ǃv.ǃpW(oe),ue=le.ǃpu(me,re);if(ae.ǃcYO("sid")&&ue.ǃGpw(ae.ǃczc("sid")),ae.ǃczG("global")&&ue.ǃOA(!0),ue.ǃGNX(ae),le.ǃGNb()&&ae.ǃczm("tiles")&&ue.ǃGKk(ae.ǃJk("tiles")),ae.ǃczm("container")){let pe=ae.ǃJk("container"),ge=[];for(let he of pe.children("type"))ge.push(he.ǃLx());me.ǃGvc(ge)}return ue.ǃ_w()?ue.ǃpa().ǃGKX(ae.ǃJk("animation-folder"),de).then(()=>ue):ue.ǃ_H()?ue.ǃpK.ǃGK$(ae.ǃcYH("texture"),de).then(()=>ue):Promise.resolve(ue)}ǃGKk(me){for(let ae of me.children("tile")){let de=ae.ǃJT("id"),re=ae.ǃJk("collision-poly"),Ge=ǃG.ǃX(ǃccQ);Ge.ǃGKr(re),this.ǃGNt.set(de,Ge)}}ǃGKi(me){if(me)for(let ae in me)if(me.hasOwnProperty(ae))if(this.ǃGNt.has(ae)){let de=this.ǃGNt.get(ae);de.ǃpU(me[ae])}else{let de=ǃG.ǃX(ǃccQ);de.ǃpU(me[ae]),this.ǃGNt.set(+ae,de)}}}}{const _445="objecttypefolderadd";window.ǃEv=class ee extends ǃzI{constructor(te,ne){super(te,ne,ǃEE),this.ǃzx()&&(this.ǃclE=lang("ui.bars.project.items.object-types"))}ǃrL(te){if(ǃG.ǃg(te,ǃEE),te.ǃGak)throw new Error("object type already belongs to folder");te.ǃGak=this,super.ǃrL(te),this.ǃTS().ǃGys(),app.ǃGgC(te,"objectclassadd"),te.ǃcVi()}ǃlB(){let te=ǃG.ǃX(ee,this.ǃGT,this);return this.ǃGpJ.push(te),app.ǃGKV(te,_445),this.ǃcVi(),te}ǃGpx(){app.ǃGKV(this,_445),this.ǃcVi()}ǃGpI(){this.ǃcVi(),app.ǃGKV(this,"objecttypefolderremove")}ǃVR(){super.ǃVR(),this.ǃTS().ǃcLy()}ǃcLE(){super.ǃcLE(),this.ǃTS().ǃcLy()}ǃGfA(te){return te.ǃcu()}ǃGUU(te,ne){ǃG.ǃD_(te),ǃG.ǃg(ne,ǃG.ǃGpg),this.ǃzx()||this.ǃr(te.name);let ie=[];for(let ae of te.subfolders){let de=this.ǃlB();ie.push(de.ǃGUU(ae,ne))}let me=[];for(let ae of te.items)me.push(ǃG.ǃckO(()=>ǃEE.ǃGKR(this.ǃTS(),ae,ne)));return Promise.all(ie).then(()=>Promise.all(me)).then(ae=>{for(let de of ae)this.ǃrL(de);return this})}ǃGUx(te,ne){ǃG.ǃg(te,ǃG.ǃKI.Element),ǃG.ǃg(ne,ǃG.ǃczD),this.ǃzx()||this.ǃr(te.ǃcYQ("name"));let ie=[];for(let ae of te.children("object-folder")){let de=this.ǃlB();ie.push(de.ǃGUx(ae,ne))}let me=[];for(let ae of te.children("object-type"))me.push(ǃG.ǃckO(()=>ǃEE.ǃGKT(this.ǃTS(),ae,ne)));return Promise.all(ie).then(()=>Promise.all(me)).then(ae=>{for(const de of ae)this.ǃrL(de);return this})}}}{const _446="familymemberschange";window.ǃeg=class ee extends ǃ_K{constructor(te,ne,ie){super(te,ne,ie),this.ǃGak=null,this.ǃGgr=new Set,this.ǃGKA=!1}ǃz(){this.ǃGgr.clear(),this.ǃGgr=null,super.ǃz()}ǃxJ(){return"family"}ǃGUA(te){return ǃG.ǃoG(te),te=(te||this.ǃcu()).toLowerCase(),`families\\${te}.json`}ǃkM(){if(!super.ǃkM())return!1;for(let te of this.ǃGgr)if(te.ǃkM())return!0;return!1}ǃFE(te){this.ǃGKA=!!te}ǃlE(){return this.ǃGKA}ǃGpx(){this.ǃGKL(),super.ǃGpx()}ǃGpI(){this.ǃGKL(),super.ǃGpI()}ǃGaI(){this.ǃGKL()}ǃGNp(te){if(te.ǃkM()){let ne=[...this.ǃBW()];1===ne.length&&ne[0]===te&&this.ǃGpx()}else this.ǃkM()||this.ǃGpI()}ǃGaL(){for(let te of this.ǃGgr)te.ǃGaL()}*ǃLo(){for(let te of this.ǃGgr)yield*te.ǃLo()}*ǃGgf(){for(let te of this.ǃGgr)yield*te.ǃGgf()}ǃmy(){return this.ǃciL.ǃGK_()}ǃGcD(){return this.ǃciL.ǃGKt()}ǃGci(){return this.ǃciL.ǃGKP()}ǃGaX(te){if(ǃG.ǃbv(te),this.ǃGgh(te))return!0;for(let ne of this.ǃBW())if(ne.ǃGaX(te))return!0;return!1}ǃZQ(te){return ǃG.ǃg(te,ǃEE),this.ǃGgr.has(te)}ǃla(te){if(ǃG.ǃg(te,ǃEE),!this.ǃGgr.has(te))throw new Error("object type not in this family");if(1===this.ǃlv())throw new Error("cannot remove last family member - remove family itself instead");this.ǃGgr.delete(te);const ne=this.ǃTS();te.ǃGaI(),ne.ǃGys(),app.ǃGgC(this,_446),ne.ǃcVi(),ne.ǃGyz(),ne.ǃGyl()}ǃlC(te){let ne=[...te],ie=[...this.ǃBW()];return!(ne.length!==ie.length)&&(ne.sort(ǃ_K.ǃGgA),ie.sort(ǃ_K.ǃGgA),ǃG.ǃOf(ne,ie))}ǃlK(te){if(!this.ǃlC(te)){let ne=[...te];if(ǃG.ǃkK(ne,ǃEE),!ne.length)throw new Error("cannot make family empty");this.ǃGKL();for(let me of ne)if(!this.ǃZQ(me)){for(let pn of this.ǃGgJ()){let gn=pn.ǃGaP();for(let hn of me.ǃLo())pn.ǃOo(hn,gn)}if(this.ǃcy().ǃlu())for(let pn of this.ǃGWI()){let gn=pn.ǃGaq();for(let hn of me.ǃLo()){let vn=pn.ǃGaU(hn);gn&&vn.ǃGah(gn)}}if(this.ǃcy().ǃlU())for(let pn of this.ǃGWx()){let gn=pn.ǃGaS();for(let hn of me.ǃLo()){let vn=pn.ǃGaJ(hn);gn&&vn.ǃGah(gn)}}}this.ǃGgr.clear(),this.ǃciL=ne[0].ǃcy();for(let me of ne){if(me.ǃcy()!==this.ǃciL)throw new Error("wrong plugin");this.ǃGgr.add(me)}const ie=this.ǃTS();this.ǃGKL(),ie.ǃGys(),app.ǃGgC(this,_446),ie.ǃcLy(),ie.ǃcVi(),ie.ǃGyz(),ie.ǃGyl()}}*ǃBW(){for(let te of this.ǃGgr)te.ǃkM()&&(yield te)}ǃlv(){let te=0;for(let ne of this.ǃBW())++te;return te}ǃGKL(){for(let te of this.ǃGgr)te.ǃGaI()}ǃpj(){let te=super.ǃpj();return te.members=[...this.ǃBW()].map(ne=>ne.ǃcu()),te}ǃpU(te){super.ǃpU(te),assert(0===this.ǃGgr.size,"should not be overwriting family");let ne=[];for(let ie of te.members){let me=this.ǃTS().ǃpB(ie);if(!me)throw new Error(`cannot find family member with name '${ie}'`);ne.push(me)}this.ǃlK(ne)}static ǃGKj(te,ne,ie){return ie.ǃcze(`families\\${ne.toLowerCase()}.json`).then(me=>{if(me.name!==ne)throw new Error(`unexpected family name '${me.name}'`);let ae=ǃG.ǃv.ǃpW(me["plugin-id"],te),de=ǃG.ǃX(ee,te,ae,ne);return de.ǃpU(me),de.ǃpv(me),de.ǃGKL(),de})}static ǃGvG(te,ne){let ie=te.ǃcYQ("name"),me=te.ǃcYQ("plugin-id");if(!ǃG.ǃv.ǃGUD(me))throw new Error(`missing plugin id '${me}'`);let ae=ǃG.ǃv.ǃpW(me),de=ǃG.ǃX(ee,ne,ae,ie);te.ǃcYO("sid")&&de.ǃGpw(te.ǃczc("sid"));let re=[],Ge=te.ǃJk("members");for(let oe of Ge.children("member")){let le=oe.ǃLx(),ue=ne.ǃpB(le);if(!ue)throw new Error(`cannot find object type named '${le}'`);re.push(ue)}return de.ǃlK(re),de.ǃGNX(te),de}}}"use strict",window.ǃzF=class extends ǃzI{constructor(te,ne){super(te,ne,ǃeg),this.ǃzx()&&(this.ǃclE=lang("ui.bars.project.items.families"))}ǃrL(te){if(ǃG.ǃg(te,ǃeg),te.ǃGak)throw new Error("family already belongs to folder");te.ǃGak=this,super.ǃrL(te),this.ǃTS().ǃGys(),app.ǃGgC(te,"objectclassadd"),te.ǃcVi()}ǃVR(){super.ǃVR(),this.ǃTS().ǃcLy()}ǃcLE(){super.ǃcLE(),this.ǃTS().ǃcLy()}ǃGfA(te){return te.ǃcu()}ǃGUq(te,ne){ǃG.ǃD_(te),ǃG.ǃg(ne,ǃG.ǃGpg);let ie=[];for(let me of te.items)ie.push(ǃeg.ǃGKj(this.ǃTS(),me,ne));return Promise.all(ie).then(me=>{for(let ae of me)this.ǃrL(ae);return this})}},"use strict";{const _447="collision-poly",_448="invalid poly point";window.ǃccQ=class ee{constructor(){this.ǃcNB=[],this.ǃt$()}ǃt$(){this.ǃmt(),this.ǃcNB.push(0),this.ǃcNB.push(0),this.ǃcNB.push(1),this.ǃcNB.push(0),this.ǃcNB.push(1),this.ǃcNB.push(1),this.ǃcNB.push(0),this.ǃcNB.push(1)}ǃGKd(te){ǃG.ǃkF(te),ǃG.ǃcGb(this.ǃcNB,te)}ǃGKE(){return ǃG.ǃIK(this.ǃcNB)}ǃxJ(){return _447}ǃmt(){ǃG.ǃGs(this.ǃcNB)}ǃcGk(){return this.ǃcNB}ǃGKD(){let te=this.ǃcNB;return 8===te.length&&0===te[0]&&0===te[1]&&1===te[2]&&0===te[3]&&1===te[4]&&1===te[5]&&0===te[6]&&1===te[7]}ǃGKe(te){ǃG.ǃg(te,ee);te===this||ǃG.ǃcGb(this.ǃcNB,te.ǃcNB)}ǃJB(){return assert(0==this.ǃcNB.length%2,"must have an even number of elements in collision poly points array"),assert(6<=this.ǃcNB.length,"must have at least three points in a collision poly"),this.ǃcNB.length/2}ǃGKp(te,ne){if(ǃG.ǃTH(te),ǃG.ǃTH(ne),te=Math.floor(te),0>te)throw new RangeError(_448);let ie=this.ǃJB();if(te===ie&&(te=0),te>=ie)throw new RangeError(_448);return this.ǃcNB[2*te+ne]}ǃJW(te){return this.ǃGKp(te,0)}ǃJu(te){return this.ǃGKp(te,1)}ǃGKf(te,ne,ie){if(ǃG.ǃTH(te),ǃG.ǃTH(ne),ǃG.ǃTH(ie),te=Math.floor(te),0>te)throw new RangeError(_448);let me=this.ǃJB();if(te===me&&(te=0),te>=me)throw new RangeError(_448);this.ǃcNB[2*te+ne]=ǃG.ǃAR(ie,0,1)}ǃGKy(te,ne){this.ǃGKf(te,0,ne)}ǃGKB(te,ne){this.ǃGKf(te,1,ne)}ǃGKW(te,ne){this.ǃGKf(te,0,this.ǃJW(te)+ne)}ǃGKu(te,ne){this.ǃGKf(te,1,this.ǃJu(te)+ne)}ǃGKU(te){if(ǃG.ǃTH(te),te=Math.floor(te),0>te||te>=this.ǃJB())throw new RangeError("invalid poly point insert position");let ne=(this.ǃJW(te)+this.ǃJW(te+1))/2,ie=(this.ǃJu(te)+this.ǃJu(te+1))/2;this.ǃcNB.splice(2*(te+1),0,ne,ie)}ǃGKv(te,ne){ǃG.ǃTH(te),ǃG.ǃTH(ne),this.ǃcNB.push(te),this.ǃcNB.push(ne)}ǃGKq(te){ǃG.ǃTH(te),te=Math.floor(te);let ne=this.ǃJB();if(0>te||te>=ne)throw new RangeError("invalid poly point delete position");if(3>=ne)throw new Error("cannot delete poly point: must have at least 3 points in poly at all times");this.ǃcNB.splice(2*te,2)}ǃGKa(){this.ǃcNB.reverse(),this.ǃGKg()}ǃGKg(){let te=this.ǃcNB;for(let ne=0,ie=te.length,me;nene.length?void this.ǃt$():void ǃG.ǃcGb(this.ǃcNB,ne)}}}"use strict",window.ǃGKl=class ee extends ǃXb{constructor(te){super(te),this.ǃNS=0.5,this.ǃNs=0.5,this.ǃclE=""}ǃt$(){this.ǃNS=0.5,this.ǃNs=0.5}ǃxJ(){return"image-point"}ǃKP(te){return ǃG.ǃg(te,ee),this.ǃNS===te.ǃpi()&&this.ǃNs===te.ǃpR()&&this.ǃclE===te.ǃcu()}ǃGKe(te){ǃG.ǃg(te,ee);te===this||(this.ǃr(te.ǃcu()),this.ǃcHF(te.ǃpi(),te.ǃpR()))}ǃr(te){ǃG.ǃbv(te),this.ǃclE=te}ǃcu(){return this.ǃclE}ǃGKw(te,ne){this.ǃGKo(te),this.ǃGKH(ne)}ǃGKo(te){ǃG.ǃTH(te),this.ǃNS+=te}ǃGKH(te){ǃG.ǃTH(te),this.ǃNs+=te}ǃcHF(te,ne){this.ǃEu(te),this.ǃEU(ne)}ǃEu(te){ǃG.ǃTH(te),this.ǃNS=te}ǃEU(te){ǃG.ǃTH(te),this.ǃNs=te}ǃpi(){return this.ǃNS}ǃpR(){return this.ǃNs}ǃGKn(){this.ǃNS=1-this.ǃNS}ǃGKM(){this.ǃNs=1-this.ǃNs}ǃGKh(){let te=this.ǃNS;this.ǃNS=this.ǃNs,this.ǃNs=te,this.ǃGKn()}ǃGKY(){let te=this.ǃNS;this.ǃNS=this.ǃNs,this.ǃNs=te,this.ǃGKM()}ǃGuF(){return[this.ǃcu(),this.ǃpi(),this.ǃpR()]}ǃpj(){return{name:this.ǃclE,x:this.ǃNS,y:this.ǃNs}}ǃpU(te){ǃG.ǃD_(te),ǃG.ǃbv(te.name),ǃG.ǃTH(te.x),ǃG.ǃTH(te.y),this.ǃr(te.name),this.ǃcHF(te.x,te.y)}static ǃGaE(te,ne){ǃG.ǃg(te,ǃm_),ǃG.ǃg(ne,ǃG.ǃKI.Element);let ie=ǃG.ǃX(ee,te);return ie.ǃr(ne.ǃcYQ("name")),ie.ǃcHF(ne.ǃczc("x"),ne.ǃczc("y")),ie}static ǃGUn(te,ne){let ie=ǃG.ǃX(ee,te);return ie.ǃpU(ne),ie}},"use strict";{const _449="animationfolderadd";window.ǃGNP=class ee extends ǃzI{constructor(te,ne){super(te.ǃTS(),ne,ǃckt),this.ǃYT=te,this.ǃzx()&&(this.ǃclE="Animations")}ǃcU(){return this.ǃYT}ǃcVi(){this.ǃYT.ǃcVi()}ǃGKI(){let te=ǃG.ǃX(ǃckt,this.ǃYT,`Animation ${this.ǃYT.ǃGNs()+1}`),ne=ǃG.ǃX(ǃckk,this.ǃYT,te);return te.ǃGNa(ne),this.ǃrL(te),ne.ǃGNq().then(()=>te)}ǃGKx(te,ne,ie){let me=ǃG.ǃX(ǃckt,this.ǃYT,`Animation ${this.ǃYT.ǃGNs()+1}`);return Promise.resolve().then(()=>{return Array.prototype.map.call(te,ae=>{if(!(ae instanceof ImageData)&&!(ae instanceof Blob)&&!(ae instanceof File))throw new Error("data source is not supported. Use ImageData, Blob or File");return ae instanceof ImageData?ǃG.ǃcge(ae).then(de=>{return{blob:de,width:ne||ae.width,height:ie||ae.height}}):ǃG.ǃ_Y(ne)&&ǃG.ǃ_Y(ie)?Promise.resolve({blob:blob,width:ne,height:ie}):ǃG.ǃ$k(ae).then(de=>{return{blob:blob,width:de.width,height:de.height}})})}).then(ae=>{return Promise.all(ae)}).then(ae=>{for(let de of ae)me.ǃGKJ(de.blob,de.width,de.height)}).then(()=>{return this.ǃrL(me),me})}ǃrL(te){if(ǃG.ǃg(te,ǃckt),te.ǃGak)throw new Error("animation already belongs to folder");te.ǃGak=this,super.ǃrL(te),app.ǃGKZ(te,"animationadd")}ǃlB(){let te=ǃG.ǃX(ee,this.ǃYT,this);return this.ǃGpJ.push(te),app.ǃGKS(te,_449),this.ǃcVi(),te}ǃGpO(te){ǃG.ǃg(te,this.ǃsn()),super.ǃGpO(te),this.ǃYT.ǃGNY()}ǃVB(te,ne,ie,me){this.ǃGKs(()=>{super.ǃVB(te,ne,ie,me)})}ǃlG(te,ne,ie,me){this.ǃGKs(()=>{super.ǃlG(te,ne,ie,me)})}ǃGfX(te){this.ǃGKs(()=>{super.ǃGfX(te)})}ǃGfV(te){this.ǃGKs(()=>{super.ǃGfV(te)})}ǃGKs(te){let ne=this.ǃGKO();te();let ie=this.ǃGKO();ne!==ie&&this.ǃYT.ǃGNY()}ǃGKO(){let te=[...this.ǃGiC()];return te.find(ne=>{return ne instanceof ǃckt})}ǃGpx(){app.ǃGKS(this,_449),this.ǃcVi()}ǃGpI(){this.ǃcVi(),app.ǃGKS(this,"animationfolderremove")}ǃpq(te,ne){ǃG.ǃD_(te),ǃG.ǃD_(ne),this.ǃzx()||this.ǃr(te.name);let ie=[];for(let ae of te.subfolders){let de=this.ǃlB();ie.push(de.ǃpq(ae,ne))}let me=[];for(let ae of te.items){let de=ǃG.ǃX(ǃckt,this.ǃYT);me.push(de.ǃGKQ(ae,ne)),this.ǃrL(de)}return Promise.all(ie).then(()=>Promise.all(me)).then(()=>this)}ǃGKX(te,ne){ǃG.ǃg(te,ǃG.ǃKI.Element),ǃG.ǃg(ne,ǃG.ǃczD),this.ǃzx()||this.ǃr(te.ǃcYQ("name"));let ie=[];for(let ae of te.children("animation-folder")){let de=this.ǃlB();ie.push(de.ǃGKX(ae,ne))}let me=[];for(let ae of te.children("animation")){let de=ǃG.ǃX(ǃckt,this.ǃYT);me.push(de.ǃGnc(ae,ne)),this.ǃrL(de)}return Promise.all(ie).then(()=>Promise.all(me)).then(()=>this)}}}{const _450="animationframeadded",_451="invalid frame index",_452="animationframeorderchange",_453="animation frame belongs to different animation",ee=["before","after"];window.ǃckt=class te extends ǃXb{constructor(ne,ie){ǃG.ǃg(ne,ǃEE),ǃG.ǃoG(ie),super(ne.ǃTS()),this.ǃGak=null,this.ǃYT=ne,this.ǃclE=ie||"",this.ǃGnG=!1,this.ǃGnm=!1,this.ǃGnD=1,this.ǃGni=0,this.ǃCP=5,this.ǃGnR=[],this.ǃGnb=[],this.ǃcOs=!1}ǃz(){for(let ne of this.ǃGnT())ne.ǃz();ǃG.ǃGs(this.ǃGnb)}ǃxJ(){return"animation"}ǃex(){let ne=ǃG.ǃX(te,this.ǃYT,`Animation ${this.ǃYT.ǃGNs()+1}`);ne.ǃGnG=this.ǃGnG,ne.ǃGnm=this.ǃGnm,ne.ǃGnD=this.ǃGnD,ne.ǃGni=this.ǃGni,ne.ǃCP=this.ǃCP;let ie=[];for(let me of this.frames())ie.push(me.ǃex(ne));return Promise.all(ie).then(me=>{for(let ae of me)ne.ǃGNa(ae);return ne})}ǃGnk(){for(let ne of this.frames())ne.ǃVR()}ǃGpo(){let ne=this.ǃYT.ǃckP()===this;app.ǃGKZ(this,"beforeanimationdeleted"),this.ǃGnb=[...this.frames()];for(let ie of this.ǃGnb)ie.ǃGnX(!0),ie.ǃGpo();super.ǃGpo(),ne&&this.ǃYT.ǃGNY()}ǃGpH(){for(app.ǃGKZ(this,"beforeanimationundeleted");this.ǃGnb.length;){let ne=this.ǃGnb.pop();ne.ǃGpH(),ne.ǃGnX(!1)}super.ǃGpH(),this.ǃYT.ǃckP()===this&&this.ǃYT.ǃGNY()}ǃGpx(){app.ǃGKZ(this,"animationundeleted"),this.ǃcVi()}ǃGpI(){this.ǃcVi(),app.ǃGKZ(this,"animationdeleted")}ǃFu(){if(!this.ǃGak)throw new Error("animation not yet added to folder");return this.ǃGak}ǃGf$(ne){ǃG.ǃg(ne,ǃGNP),this.ǃGak=ne}ǃcU(){return this.ǃYT}ǃcVi(){this.ǃTS().ǃwe()||(this.ǃcOs=!0,this.ǃcU().ǃcVi())}ǃr(ne){if(ǃG.ǃbv(ne),!ne)throw new Error("cannot set empty name");if(ne=ǃG.ǃcad(ne),this.ǃclE!==ne){if(this.ǃcU().ǃcTX(ne))throw new Error("duplicate animation name");if(!ǃG.ǃcaP(ne))throw new Error("name has invalid characters");this.ǃclE=ne,this.ǃcVi(),app.ǃGKZ(this,"animationnamechange"),app.ǃGps(this,"projectobjectnamechange")}}ǃVD(ne,ie){if(ǃG.ǃbv(ne),ǃG.ǃc$i(ie),ǃG.ǃi.ǃT("model.animation.errors"),ne=ǃG.ǃcad(ne),!ǃG.ǃcaP(ne)){let me=lang(".name-invalid.title"),ae=lang(".name-invalid.message");return ǃG.ǃGD.ǃGr.ǃev.ǃm$(ie,"warning",me,ae,{align:"bottom"}),void ǃG.ǃi.ǃW()}if(this.ǃcU().ǃcTX(ne)){let me=lang(".name-used.title"),ae=ǃcDZ(".name-used.message",ne);return ǃG.ǃGD.ǃGr.ǃev.ǃm$(ie,"warning",me,ae,{align:"bottom"}),void ǃG.ǃi.ǃW()}ǃG.ǃi.ǃW(),this.ǃr(ne)}ǃcu(){return this.ǃclE}ǃGn$(ne){ne=!!ne;this.ǃGnG===ne||(this.ǃGnG=ne,this.ǃcVi())}ǃcTg(){return this.ǃGnG}ǃGnr(ne){ne=!!ne;this.ǃGnm===ne||(this.ǃGnm=ne,this.ǃcVi())}ǃcTa(){return this.ǃGnm}ǃGnV(ne){if(ǃG.ǃTH(ne),ne=Math.floor(ne),0>=ne)throw new Error("invalid repeat count");this.ǃGnD===ne||(this.ǃGnD=ne,this.ǃcVi())}ǃcTK(){return this.ǃGnD}ǃGnA(ne){if(ǃG.ǃTH(ne),ne=Math.floor(ne),0!==ne&&(0>ne||ne>=this.ǃGnR.length))throw new Error(_451);this.ǃGni===ne||(this.ǃGni=ne,this.ǃcVi())}ǃcTN(){return this.ǃGni}ǃGnL(ne){ǃG.ǃTH(ne),assert(0<=ne,"animation speed can not be lower than 0");this.ǃCP===ne||(this.ǃCP=ne,this.ǃcVi())}ǃcTq(){return this.ǃCP}ǃGn_(){let ne=[];for(let ie of this.frames())ne.push(ie.ǃ_I());return Promise.all(ne)}ǃGnt(){let ne=[];for(let ie of this.frames())ne.push(ie.ǃGqT());return Promise.all(ne)}ǃcT$(){let ne=0;for(let ie of this.frames())ne++;return ne}ǃGnP(){return this.ǃGnR.length}ǃcTj(ne){if(ǃG.ǃTH(ne),ne=Math.floor(ne),0>ne||ne>=this.ǃGnR.length)return null;let ie=0;for(let me of this.frames()){if(ie===ne)return me;ie++}return null}ǃGnj(ne){return ǃG.ǃTH(ne),ne=Math.floor(ne),0>ne||ne>=this.ǃGnR.length?null:this.ǃGnR[ne]}ǃGnd(){return this.ǃcTj(this.ǃcT$()-1)}ǃGnE(){this.ǃGnR=this.ǃGnR.reverse(),app.ǃGKZ(this,_452),this.ǃYT.ǃGNY()}ǃGne(ne,ie){ǃG.ǃTH(ne),ǃG.ǃTH(ie);let me=ne,ae=ie;if(ne=this.ǃGnp(this.ǃcTj(ne)),ie=this.ǃGnp(this.ǃcTj(ie)),0>ne||ne>=this.ǃGnR.length)throw new Error(_451);if(0>ie||ie>=this.ǃGnR.length)throw new Error(_451);ne===ie||(this.ǃGnR.splice(ie,0,this.ǃGnR.splice(ne,1)[0]),app.ǃGKZ(this,_452),(0===me||0===ae)&&this.ǃYT.ǃGNY())}ǃGnf(ne){if(ǃG.ǃg(ne,Map),ǃG.ǃcqs(ǃckk,...ne.keys()),ǃG.ǃcql(...ne.values()),[...ne.keys()].length!==this.ǃcT$())throw new Error("new order map must have the same amount of entries as frames in the animation");let ie=[];for(let me of ne.keys()){if(me.ǃckA()!==this)throw new Error("frame does not belong to animation");if(!me.ǃkM())throw new Error("frame to re order is not active");ie.push(this.ǃGnR.splice(this.ǃGnR.indexOf(me),1)[0])}if(0!==this.ǃcT$())throw new Error("no active frames can remain");for(;ie.length;){let me=ie.pop(),ae=ne.get(me);this.ǃGnR[ae]=me}this.ǃYT.ǃGNY(),app.ǃGKZ(this,_452)}*frames(){for(let ne of this.ǃGnR)ne.ǃkM()&&(yield ne)}*ǃGnT(){yield*this.ǃGnR}ǃGny(ne,ie){ǃG.ǃNv(ne),ǃG.ǃNv(ie);let me=ǃG.ǃX(ǃckk,this.ǃYT,this);return this.ǃGNa(me),me.ǃGNq(ne,ie).then(()=>me)}ǃGKJ(ne,ie,me){if(ǃG.ǃg(ne,Blob),ǃG.ǃTH(ie),ǃG.ǃTH(me),0>=ie||0>=me)throw new Error("invalid width and height values provided");let ae=ǃG.ǃX(ǃckk,this.ǃYT,this);return this.ǃGNa(ae),ae.ǃGNK(ne,ie,me)}ǃGNa(ne,ie,me){if(ǃG.ǃg(ne,ǃckk),ǃG.ǃmL(ie,ǃckk),ǃG.ǃoG(me),ne.ǃckA()!==this)throw new Error(_453);if(this.ǃGnR.includes(ne))throw new Error("animation frame already in this animation");if(!ne.ǃkM())throw new Error("frame to add is not active");if(!ie&&!me)return this.ǃGnR.push(ne),this.ǃcVi(),void app.ǃGKZ(this,_450);if(!ie&&me)throw new Error("animation Addframe method was called with invalid arguments. Missing argument 'pivotframe' of type AnimationFrame.");if(ie&&!me)throw new Error("animation Addframe method was called with invalid arguments. Missing argument 'position' of type String.");if(!ie.ǃkM())throw new Error("pivotframe is not active");if(!ee.includes(me))throw new Error(`invalid position: ${me}. Valid positions are ${ee.toString()}.`);let ae=this.ǃGnp(ie);"before"===me&&(this.ǃGnR.splice(ae,0,ne),0===this.ǃGnB(ie)&&this.ǃYT.ǃGNY()),"after"===me&&this.ǃGnR.splice(ae+1,0,ne),this.ǃcVi(),app.ǃGKZ(this,_450)}ǃGnB(ne){if(ǃG.ǃg(ne,ǃckk),ne.ǃckA()!==this)throw new Error(_453);if(!ne.ǃkM())throw new Error("frame is not active");let ie=0;for(let me of this.frames()){if(me===ne)return ie;ie++}throw new Error("frame not found")}ǃGnp(ne){ǃG.ǃg(ne,ǃckk);let ie=this.ǃGnR.indexOf(ne);if(0>ie)throw new Error("frame not in this animation");return ie}ǃGuF(ne){ǃG.ǃg(ne,ǃTb);let ie=[...this.frames()].map(me=>me.ǃGuF(ne));return[this.ǃcu(),this.ǃcTq(),this.ǃcTg(),this.ǃcTK(),this.ǃcTN(),this.ǃcTa(),this.ǃGpF(),ie]}ǃGus(){return{name:this.ǃclE,isLooping:this.ǃGnG,isPingPong:this.ǃGnm,repeatCount:this.ǃGnD,repeatTo:this.ǃGni,speed:this.ǃCP}}ǃpj(ne){ǃG.ǃcDt(ne);let ie=ne&&ne.mode||"",me={frames:[...this.frames()].map(ae=>ae.ǃpj(ne))};return"copy"!==ie&&(me.sid=this.ǃGpF()),Object.assign(me,this.ǃGus())}ǃGUT(ne){this.ǃr(ne.name),this.ǃGn$(ne.isLooping),this.ǃGnr(ne.isPingPong),this.ǃGnV(ne.repeatCount),this.ǃGnA(ne.repeatTo),this.ǃGnL(ne.speed)}ǃpU(ne){ne.hasOwnProperty("sid")&&this.ǃGpw(ne.sid),this.ǃGUT(ne)}ǃGKQ(ne,ie){ǃG.ǃD_(ne),ǃG.ǃD_(ie),this.ǃr(ne.name);let me=[],ae=0;for(let de of ne.frames){let re=ǃG.ǃX(ǃckk,this.ǃYT,this);this.ǃGNa(re),me.push(re.ǃpN(de,ie,ae++))}return this.ǃpU(ne),Promise.all(me).then(()=>this)}ǃGnc(ne,ie){if(ǃG.ǃg(ne,ǃG.ǃKI.Element),ǃG.ǃg(ie,ǃG.ǃczD),"animation"!==ne.ǃcYw())throw new Error("expected tag name 'animation'");ne.ǃcYO("sid")&&this.ǃGpw(ne.ǃczc("sid")),this.ǃr(ne.ǃcYQ("name")),this.ǃGn$(ne.ǃczG("loop")),this.ǃGnr(ne.ǃczG("pingpong"));let me=ne.ǃJT("repeatcount");0===me&&(me=1),this.ǃGnV(me),this.ǃGnL(ne.ǃczc("speed"));let ae=[];for(let re of ne.children("frame")){let Ge=ǃG.ǃX(ǃckk,this.ǃYT,this);this.ǃGNa(Ge),ae.push(Ge.ǃGnW(re,ie))}for(let de=ne.ǃJT("framecount")||0,re;de>this.ǃcT$();)re=ǃG.ǃX(ǃckk,this.ǃYT,this),this.ǃGNa(re),ae.push(re.ǃGnW(null,ie));return this.ǃGnA(ne.ǃJT("repeatto")),Promise.all(ae).then(()=>this)}}}{const _454="quality",_455="original-source",_456="invalid icon size",_457="animationframechange",_458="imagesprite was released",_459="animationframeimagechange",_460="beforeanimationframeimagechange",_461="animation frame already has content",_462="cannot find image point in this frame",ee=["png","jpeg"],ie=0.8;window.ǃckk=class me extends ǃXb{constructor(ae,de){ǃG.ǃg(ae,ǃEE),ǃG.ǃmL(de,ǃckt),super(ae.ǃTS()),this.ǃYT=ae,this.ǃGnu=de,this.ǃGnU=1,this.ǃWz=0.5,this.ǃWl=0.5,this.ǃGnv=[],this.ǃGnq="",this.ǃGvo="png",this.ǃGvH=ie,this.ǃGna=ǃG.ǃX(ǃccQ),this.ǃGng=null,this.ǃGnN=!1,this.ǃGnK=!1,this.ǃGnn=!1,this.ǃGnM=!1,this.ǃGnC=null,this.ǃGnh=-1,this.ǃGnY=-1,this.ǃGnz=!1,this.ǃcQJ=null,this.ǃcQZ=null,this.ǃcQS=null,this.ǃGnF="",this.ǃYT.ǃGNH(this)}ǃz(){this.ǃYT.ǃGNx(this),!this.ǃGng||ǃG.ǃYa(this.ǃGng)||this.ǃGng.ǃYa()||this.ǃGnl(),this.ǃcQJ&&this.ǃcQJ.ǃz(),this.ǃcQZ&&this.ǃcQZ.ǃz(),this.ǃcQS&&this.ǃcQS.ǃz(),this.ǃGna=null,this.ǃYT=null,this.ǃGnu=null,this.ǃGnC=null,this.ǃcQJ=null,this.ǃcQZ=null,this.ǃcQS=null,ǃG.ǃGs(this.ǃGnv)}ǃxJ(){return"animation-frame"}ǃGnl(){this.ǃGng.ǃz(),this.ǃGng=null}ǃGpx(){if(this.ǃGng)throw new Error("image sprite should be null");if(!this.ǃGnC)throw new Error("backup blob required");this.ǃGnz||app.ǃGKc(this,"beforeanimationframeundeleted"),this.ǃYT.ǃGNH(this),this.ǃGnh&&this.ǃGnY?this.ǃGNK(this.ǃGnC,this.ǃGnh,this.ǃGnY):this.ǃGNN(this.ǃGnC),this.ǃGnC=null,this.ǃGnh=-1,this.ǃGnY=-1,this.ǃGnz||app.ǃGKc(this,"animationframeundeleted"),this.ǃGnw(),this.ǃGno()||this.ǃckA().ǃcTj(0)!==this||this.ǃGnz||this.ǃYT.ǃGNY()}ǃGpI(){if(this.ǃGnC)throw new Error("backup blob is already defined");if(this.ǃGnz||app.ǃGKc(this,"beforeanimationframedeleted"),!this.ǃGno()&&!this.ǃGnz){let ae=this.ǃckA().ǃcTj(0);if(ae){let de=ae.ǃGnH(),re=this.ǃGnH();reoe):void 0:(oe.ǃGNK(this.ǃGng.ǃGqZ(),this.ǃGng.ǃcE(),this.ǃGng.ǃce()),Promise.resolve(oe))}ǃYg(){return this.ǃGnx(),this.ǃGng}ǃGKm(){let ae=this.ǃYg(),de=ae.ǃGac();return de||ae}ǃckA(){return this.ǃGnu}ǃGno(){return!this.ǃGnu}ǃGnJ(){return this.ǃGnM}ǃGnZ(ae){this.ǃGnM=!!ae}ǃGnX(ae){this.ǃGnz=!!ae}ǃcU(){return this.ǃYT}ǃGnS(){return this.ǃGnK}ǃGns(){return this.ǃGnn}ǃGnw(){return!this.ǃTS().ǃwe()&&void(this.ǃGnK=!0,this.ǃGnn=!0,this.ǃcU().ǃcVi(),this.ǃYT.ǃGKc(this,_457),app.ǃGKc(this,_457))}ǃGnO(){return!this.ǃTS().ǃwe()&&void(this.ǃGnn=!0,this.ǃYT.ǃGKc(this,_457),app.ǃGKc(this,_457))}ǃGnQ(){return!this.ǃTS().ǃwe()&&void(this.ǃGnK=!0,this.ǃcU().ǃcVi(),this.ǃYT.ǃGKc(this,_457),app.ǃGKc(this,_457))}ǃGMc(ae){if(ǃG.ǃTH(ae),0>ae)throw new Error("invalid frame duration");if(this.ǃGno())throw new Error("cannot change duration of non-animated image");this.ǃGnU===ae||(this.ǃGnU=ae,this.ǃGnQ())}ǃcTv(){return this.ǃGnU}ǃGMG(ae){ǃG.ǃTH(ae),this.ǃWz+=ae,this.ǃGnQ()}ǃnj(ae){ǃG.ǃTH(ae);this.ǃWz===ae||(this.ǃWz=ae,this.ǃGnQ())}ǃWF(){return this.ǃWz}ǃGMm(ae){ǃG.ǃTH(ae),this.ǃWl+=ae,this.ǃGnQ()}ǃnd(ae){ǃG.ǃTH(ae);this.ǃWl===ae||(this.ǃWl=ae,this.ǃGnQ())}ǃWw(){return this.ǃWl}ǃGMD(ae){ǃG.ǃbv(ae);this.ǃGnq===ae||(this.ǃGnq=ae,app.ǃGKc(this,"animationframesourcechange"),this.ǃGnQ())}ǃGMi(){return this.ǃGnq}ǃGqs(ae){if(ǃG.ǃbv(ae),!ee.includes(ae))throw new Error("invalid export format");this.ǃGvo!==ae&&(this.ǃGvo=ae,!this.ǃTS().ǃwe()&&this.ǃGNZ(),this.ǃGnQ())}ǃGvZ(){return this.ǃGvo}ǃGMR(ae){ǃG.ǃTH(ae),ae=ǃG.ǃAR(ae,0,1),this.ǃGvH!==ae&&(this.ǃGvH=ae,!this.ǃTS().ǃwe()&&this.ǃGNZ(),this.ǃGnQ())}ǃGqd(){return this.ǃGvH}ǃGMb(ae){ǃG.ǃg(ae,ǃccQ),this.ǃGna=ae}ǃat(){return this.ǃGna}ǃckX(){return this.ǃGno()?0:this.ǃGnu.ǃGnB(this)}ǃGnH(){return this.ǃGno()?0:this.ǃGnu.ǃGnp(this)}ǃGMT(ae){ǃG.ǃbv(ae);let de=ǃG.ǃX(ǃGKl,this.ǃYT.ǃTS());return de.ǃr(ae),this.ǃGnv.push(de),this.ǃGnQ(),de}ǃGMk(){let ae=!1;for(let de of this.ǃGMX())ae=!0,de.ǃz();ae&&(this.ǃGnv.length=0,this.ǃGnQ())}ǃGM$(ae){ǃG.ǃg(ae,ǃGKl);let de=this.ǃGMr(ae.ǃcu());if(!de){let re=ǃG.ǃX(ǃGKl,this.ǃYT.ǃTS());return re.ǃGKe(ae),this.ǃGnv.push(re),this.ǃGnQ(),re}return null}ǃGMV(ae){ǃG.ǃg(ae,ǃGKl);let de=this.ǃGnv.indexOf(ae);if(0>de)throw new Error("cannot find image point to remove");ae.ǃVR(),this.ǃGnQ()}ǃGMA(ae){ǃG.ǃg(ae,ǃGKl);let de=this.ǃGnv.indexOf(ae);if(0>de)throw new Error(_462);de+1>this.ǃGnv.length-1||(this.ǃGnv.splice(de,1),this.ǃGnv.splice(de+1,0,ae),this.ǃGnQ())}ǃGML(ae){ǃG.ǃg(ae,ǃGKl);let de=this.ǃGnv.indexOf(ae);if(0>de)throw new Error(_462);0>de-1||(this.ǃGnv.splice(de,1),this.ǃGnv.splice(de-1,0,ae),this.ǃGnQ())}ǃGM_(ae){if(ǃG.ǃTH(ae),ae=Math.floor(ae),0>ae||ae>=this.ǃGnv.length)return null;let de=0;for(let re of this.ǃGMt()){if(de===ae)return re;de++}return null}ǃGMr(ae){ǃG.ǃbv(ae);for(let de of this.ǃGMt())if(de.ǃcu()===ae)return de}ǃGMP(ae){return ǃG.ǃTH(ae),ǃG.ǃcav(ae,this.ǃGnv),this.ǃGnv[ae]}ǃGMj(){this.ǃnj(1-this.ǃWF());for(let ae of this.ǃGnv)ae.ǃGKn();this.ǃGnQ()}ǃGMd(){this.ǃnd(1-this.ǃWw());for(let ae of this.ǃGnv)ae.ǃGKM();this.ǃGnQ()}ǃGME(){let ae=this.ǃWF();this.ǃnj(this.ǃWw()),this.ǃnd(ae),this.ǃnj(1-this.ǃWF());for(let de of this.ǃGnv)de.ǃGKh();this.ǃGnQ()}ǃGMe(){let ae=this.ǃWF();this.ǃnj(this.ǃWw()),this.ǃnd(ae),this.ǃnd(1-this.ǃWw());for(let de of this.ǃGnv)de.ǃGKY();this.ǃGnQ()}*ǃGMt(){for(let ae of this.ǃGnv)ae.ǃkM()&&(yield ae)}*ǃGMX(){yield*this.ǃGnv}ǃGMp(){let ae=0;for(let de of this.ǃGMt())ae++;return ae}ǃGMf(){return this.ǃGnv.length}ǃGMy(){return this.ǃYT.ǃcy().ǃGve()||"jpeg"===this.ǃGvZ()?"none-own-sheet":"high"===this.ǃTS().ǃs_()?"power-of-two":"border"}ǃGMB(){return!!this.ǃGng&&!ǃG.ǃYa(this.ǃGng)&&!this.ǃGng.ǃYa()&&!this.ǃGnN}ǃGnx(){if(!this.ǃGng)throw new Error("animation frame has no content");if(ǃG.ǃYa(this.ǃGng))throw new Error(_458);if(this.ǃGng.ǃYa())throw new Error(_458);if(this.ǃGnN)throw new Error("animation frame still loading content")}ǃGNq(ae,de){if(ǃG.ǃNv(ae),ǃG.ǃNv(de),this.ǃGng||this.ǃGnN)throw new Error(_461);this.ǃGnZ(!1);let re=document.createElement("canvas");return re.width=ae||250,re.height=de||250,this.ǃGng=ǃG.ǃX(ǃGvf,this.ǃYT.ǃGWN(),this.ǃGMy()),this.ǃGng.ǃGqs(this.ǃGvZ(),this.ǃGqd()),this.ǃGng.ǃGqJ(re)}ǃGnI(ae){if(ǃG.ǃg(ae,ImageData),this.ǃGng||this.ǃGnN)throw new Error(_461);return this.ǃGnZ(!1),this.ǃGnN=!0,ǃG.ǃcge(ae).then(de=>{return this.ǃGng=ǃG.ǃX(ǃGvf,this.ǃYT.ǃGWN(),this.ǃGMy()),this.ǃGng.ǃGqs(this.ǃGvZ(),this.ǃGqd()),this.ǃGng.ǃGqI(de,ae.width,ae.height),this.ǃGnN=!1,this})}ǃGNK(ae,de,re){if(ǃG.ǃg(ae,Blob),ǃG.ǃTH(de),ǃG.ǃTH(re),this.ǃGng||this.ǃGnN)throw new Error(_461);return this.ǃGnZ(!1),this.ǃGng=ǃG.ǃX(ǃGvf,this.ǃYT.ǃGWN(),this.ǃGMy()),this.ǃGng.ǃGqs(this.ǃGvZ(),this.ǃGqd()),this.ǃGng.ǃGqI(ae,Math.floor(de),Math.floor(re)),this}ǃGNN(ae){if(ǃG.ǃg(ae,Blob),this.ǃGng||this.ǃGnN)throw new Error(_461);return this.ǃGnZ(!1),this.ǃGnN=!0,this.ǃGng=ǃG.ǃX(ǃGvf,this.ǃYT.ǃGWN(),this.ǃGMy()),this.ǃGng.ǃGqs(this.ǃGvZ(),this.ǃGqd()),this.ǃGng.ǃGqx(ae).then(()=>{return this.ǃGnN=!1,this})}ǃGMW(ae){return ǃG.ǃg(ae,ImageData),this.ǃGnZ(!0),ǃG.ǃcge(ae).then(de=>this.ǃnD(de,ae.width,ae.height))}ǃaH(ae){return ǃG.ǃg(ae,Blob),this.ǃGnZ(!0),ǃG.ǃcgV(ae).then(de=>this.ǃnD(ae,de.width,de.height))}ǃnD(ae,de,re){if(ǃG.ǃg(ae,Blob),ǃG.ǃTH(de),ǃG.ǃTH(re),0>=de||0>=re)throw new Error("invalid size");this.ǃYT.ǃGKc(this,_460),app.ǃGKc(this,_460),this.ǃGnZ(!0),this.ǃGnx(),this.ǃGnl(),this.ǃGNK(ae,de,re),this.ǃGnO(),this.ǃGNY(),this.ǃYT.ǃGNY(),this.ǃYT.ǃGKc(this,_459),app.ǃGKc(this,_459)}ǃGNZ(){this.ǃGnx();let ae=this.ǃGng.ǃbJ(),de=this.ǃGng.ǃcE(),re=this.ǃGng.ǃce();this.ǃGnl(),this.ǃGNK(ae,de,re)}ǃcE(){return this.ǃGnx(),this.ǃGng.ǃcE()}ǃce(){return this.ǃGnx(),this.ǃGng.ǃce()}ǃGqm(){return this.ǃGng?this.ǃGng.ǃGqm():null}ǃGqD(){let ae=this.ǃYT.ǃcy().ǃGve(),de="linear"===this.ǃTS().ǃpO(),re=this.ǃYT.ǃGWN();return re.ǃGvu()?re.ǃGvU().then(()=>{return this.ǃGnx(),this.ǃGng.ǃGqD(ae,de)}):(this.ǃGnx(),this.ǃGng.ǃGqD(ae,de))}ǃcr(){return this.ǃGnx(),this.ǃGng.ǃcr()}ǃbJ(){return this.ǃGnx(),this.ǃGng.ǃbJ()}ǃ_I(ae){return this.ǃGnx(),this.ǃGng.ǃ_I(ae)}ǃYN(ae){return this.ǃGnx(),this.ǃGng.ǃYN(ae)}ǃGqT(ae){return this.ǃGnx(),this.ǃGng.ǃGqT(ae)}ǃGMu(){return this.ǃGnx(),this.ǃGng.ǃfe()}ǃmy(){return this.ǃGNh("small")}ǃGcD(){return this.ǃGNh("medium")}ǃGci(){return this.ǃGNh("large")}ǃGNh(ae){if(!this.ǃGNn(ae)){let de;if(this.ǃGno())de=this.ǃcU().ǃcu();else{let Ge=this.ǃckA(),oe=Ge.ǃGnp(this),le=Ge.ǃcu();de=`${le}_${oe}`}let re=ǃG.ǃGD.ǃXY.ǃDi(null,app.ǃGif(ae),{name:de});this.ǃYN().then(Ge=>{re.ǃ$X(Ge,{ǃcOw:!0})}),this.ǃGNM(ae,re)}return this.ǃGNn(ae)}ǃGNn(ae){switch(ae){case"small":return this.ǃcQJ&&this.ǃcQJ.ǃcOP()&&(this.ǃcQJ=null),this.ǃcQJ;case"medium":return this.ǃcQZ&&this.ǃcQZ.ǃcOP()&&(this.ǃcQZ=null),this.ǃcQZ;case"large":return this.ǃcQS&&this.ǃcQS.ǃcOP()&&(this.ǃcQS=null),this.ǃcQS;default:throw new Error(_456);}}ǃGNM(ae,de){switch(ae){case"small":this.ǃcQJ=de;break;case"medium":this.ǃcQZ=de;break;case"large":this.ǃcQS=de;break;default:throw new Error(_456);}}ǃGNY(){(this.ǃcQJ||this.ǃcQZ||this.ǃcQS)&&this.ǃYN().then(ae=>{this.ǃcQJ&&this.ǃcQJ.ǃ$X(ae),this.ǃcQZ&&this.ǃcQZ.ǃ$X(ae),this.ǃcQS&&this.ǃcQS.ǃ$X(ae)})}ǃGuF(ae){ǃG.ǃg(ae,ǃTb);let de=this.ǃGKm(),re=de.ǃfe();assert(re,"missing spritesheet");let Ge=[...this.ǃGMt()].map(le=>le.ǃGuF()),oe=this.ǃat().ǃGuF(this.ǃWF(),this.ǃWw());return[ae.ǃTs(re),re.ǃGqG(),de.ǃGqk(),de.ǃGqX(),de.ǃcE(),de.ǃce(),this.ǃcTv(),this.ǃWF(),this.ǃWw(),Ge,oe,0]}ǃpj(ae){ǃG.ǃcDt(ae);let de=ae&&ae.mode||"";this.ǃGnx();let re={width:this.ǃGng.ǃcE(),height:this.ǃGng.ǃce(),originX:this.ǃWz,originY:this.ǃWl,originalSource:this.ǃGnq,exportFormat:this.ǃGvo,exportQuality:this.ǃGvH};if("copy"===de){if(!ae||!Array.isArray(ae.ǃpL))throw new Error("caller must convert blobs");re.imageDataIndex=ae.ǃpL.length,ae.ǃpL.push(this.ǃGng.ǃbJ())}else re.imageSpriteId=this.ǃGng.ǃcbJ();this.ǃGna.ǃGKD()||(re.collisionPoly=this.ǃGna.ǃpj());let Ge=[...this.ǃGMt()].map(oe=>oe.ǃpj());return 0ǃG.ǃcgk(ge))}else throw new Error("no image source");return ue.then(pe=>{return this.ǃGng=ǃG.ǃX(ǃGvf,this.ǃYT.ǃGWN(),this.ǃGMy(),le),this.ǃGng.ǃGqs(this.ǃGvZ(),this.ǃGqd()),this.ǃGng.ǃGqI(pe,Ge,oe),this})}ǃGMU(ae){return ǃG.ǃNv(ae),this.ǃGnu?("number"!=typeof ae&&(ae=this.ǃckX()),`images\\${this.ǃYT.ǃcu().toLowerCase()}-${this.ǃGnu.ǃcu().toLowerCase()}-${ǃG.ǃciy(ae,3)}.png`):`images\\${this.ǃYT.ǃcu().toLowerCase()}.png`}ǃGMv(ae){this.ǃGnF=this.ǃGMU(ae)}ǃUS(ae,de){const re=this.ǃGMU(),Ge=this.ǃGnF;if(de.ǃGfL){if(!this.ǃGns()&&re===Ge)return;Ge&&re!==Ge&&de.ǃGUr.add(Ge),this.ǃGnF=re}ae.set(re,this.ǃGng.ǃbJ())}ǃGnW(ae,de){if(ǃG.ǃmL(ae,ǃG.ǃKI.Element),ǃG.ǃg(de,ǃG.ǃczD),assert(!this.ǃGno(),"loading single image as if an animation frame"),ae){this.ǃGMc(ae.ǃczc("duration")),this.ǃnj(ae.ǃczc("hotspotX")),this.ǃnd(ae.ǃczc("hotspotY"));let le=ae.ǃcYQ(_455);this.ǃGMD(le||"");for(let ge of ae.children("image-point"))this.ǃGnv.push(ǃGKl.ǃGaE(this.ǃTS(),ge));let ue=ae.ǃcYH("collision-poly");ue&&this.ǃat().ǃGKr(ue);let pe=ae.ǃcYQ("format");if("jpeg"===pe&&(this.ǃGqs("jpeg"),ae.ǃcYO(_454))){let ge=ae.ǃczc(_454)/100;this.ǃGMR(ge)}}let re=ǃJI.ǃGvk(this.ǃckX()),Ge=`Animations\\${this.ǃYT.ǃcu()}\\${this.ǃGnu.ǃcu()}\\${re}.png`,oe=de.ǃczt(Ge);if(!oe)throw new Error(`animation frame missing: ${Ge}`);return this.ǃGMq(de,oe)}ǃGK$(ae,de){if(ǃG.ǃmL(ae,ǃG.ǃKI.Element),ǃG.ǃg(de,ǃG.ǃczD),assert(this.ǃGno(),"expected single-image AnimationFrame"),ae){let oe=ae.ǃcYQ(_455);this.ǃGMD(oe||"");let le=ae.ǃcYQ("format");if("jpeg"===le&&(this.ǃGqs("jpeg"),ae.ǃcYO(_454))){let ue=ae.ǃczc(_454)/100;this.ǃGMR(ue)}}let re=`Textures\\${this.ǃYT.ǃcu()}.png`,Ge=de.ǃczt(re);if(!Ge)throw new Error(`object image missing: ${re}`);return this.ǃGMq(de,Ge)}ǃGMq(ae,de){if(this.ǃGng||this.ǃGnN)throw new Error("already loaded content");return this.ǃGnN=!0,ae.ǃczp(de).then(re=>{return this.ǃGng=ǃG.ǃX(ǃGvf,this.ǃYT.ǃGWN(),this.ǃGMy()),this.ǃGng.ǃGqs(this.ǃGvZ(),this.ǃGqd()),this.ǃGng.ǃGqx(re)}).then(()=>{return this.ǃGnN=!1,this})}}}{const _463="undefined";let ee=!1;window.ǃxR=class te extends ǃXb{constructor(ne){ǃG.ǃg(ne,ǃEE),super(ne.ǃTS()),this.ǃGau=null,this.ǃYT=ne,this.ǃGMa=this.ǃTS().ǃGyO(this),this.ǃGan=new Map,this.ǃGfl=!1,this.ǃGaM=!1,this.ǃGMg=null,this.ǃGaC()}ǃz(){this.ǃGau.ǃz(),this.ǃGan.clear(),this.ǃGMg=null,this.ǃGau=null,this.ǃYT=null}ǃDD(){this.ǃl()}ǃl(){if(this.ǃGaM)throw new Error("already called OnCreate");this.ǃGau.ǃl(),this.ǃGaM=!0}ǃcVi(){this.ǃTS().ǃwe()||(this.ǃGfl=!0,this.ǃGMg&&this.ǃGMg.ǃcVi(),app.ǃrl()&&app.ǃrw().ǃrS(this))}ǃGpo(){if(this.ǃcy().ǃlu())for(let ne of this.ǃYT.ǃGWI())ne.ǃOZ(this).ǃGpo();super.ǃGpo()}ǃGpH(){if(super.ǃGpH(),this.ǃcy().ǃlu())for(let ne of this.ǃYT.ǃGWI())ne.ǃOZ(this).ǃGpH()}ǃGpx(){this.ǃTS().ǃGBc(this,this.ǃGMa),app.ǃJi(this,"objectinstanceadd"),this.ǃcVi()}ǃGpI(){this.ǃcVi(),app.ǃJi(this,"objectinstanceremove"),this.ǃTS().ǃGBG(this.ǃGMa)}ǃGMN(ne){ǃG.ǃbv(ne);let ie=new ǃG.Event(ne);ie.ǃAw=this,this.dispatchEvent(ie)}ǃGMK(ne){if(ǃG.ǃg(ne,ǃGm),!this.ǃcy().ǃGMn())throw new Error("not a non-world instance");this.ǃGMg=ne}ǃGNz(){return this.ǃGMg}ǃGMM(ne){if(ǃG.ǃTH(ne),ne=Math.floor(ne),0>ne)throw new Error("invalid uid");if(!this.ǃkM())throw new Error("cannot set deleted instance's UID");if(this.ǃGMa!==ne){let ie=this.ǃTS();if(ie.ǃGBG(this.ǃGMa),!ie.ǃGBm(ne))this.ǃGMa=ne,ie.ǃGBc(this,this.ǃGMa);else if(ie.ǃwe()){let me=ie.ǃGpD(ne),ae=this.ǃGMa;ie.ǃGBG(ne),me.ǃGMa=ae,ie.ǃGBc(me,me.ǃGMa),this.ǃGMa=ne,ie.ǃGBc(this,this.ǃGMa)}else this.ǃGMa=ie.ǃGyO(this)}}ǃ_l(){return this.ǃGMa}static ǃOp(ne,ie){return ne.ǃ_l()-ie.ǃ_l()}ǃex(){let ne=this.ǃYT.ǃGNu();return ne.ǃGah(this),ne.ǃl(),ne}ǃGah(ne){if(ǃG.ǃg(ne,te),this.ǃcy()!==ne.ǃcy())throw new Error("instance from different plugin");for(let ie of ne.ǃGan)this.ǃGan.set(ie[0],ie[1])}ǃcU(){return this.ǃYT}ǃcy(){return this.ǃYT.ǃcy()}ǃvf(){return this.ǃGau}ǃdE(){return!!this.ǃGau.ǃdE()}ǃde(){return!!this.ǃdE()&&(this.ǃGau.ǃde(),!0)}ǃo(){this.ǃGau.ǃo()}*ǃEm(){for(let ne of this.ǃYT.ǃGWI())yield ne.ǃOZ(this)}*ǃGMC(){for(let ne of this.ǃYT.ǃOH())yield ne.ǃOZ(this)}ǃGaC(){this.ǃGan.clear();let ne=this.ǃYT.ǃcy(),ie=ne.ǃOx();for(let me of ie)me.ǃGaY()&&this.ǃGan.set(me.ǃEK(),me.ǃxj())}ǃEG(ne){return ǃG.ǃbv(ne),this.ǃGan.has(ne)}ǃcp(ne){ǃG.ǃbv(ne);let ie=this.ǃGan.get(ne);if(typeof ie===_463)throw new Error(`invalid property id '${ne}'`);return ie instanceof ǃG.ǃBc?ǃG.ǃX(ǃG.ǃBc,ie):ie}ǃcn(ne,ie){ǃG.ǃbv(ne);let me=ǃG.ǃcBE(ie),ae=ie instanceof ǃG.ǃBc;if(""!==me&&""!==me&&""!==me&&!ae)throw new Error(`cannot store '${me}' in a property value`);let de=this.ǃGan.get(ne);if(typeof de===_463)throw new Error(`invalid property id '${ne}'`);let re=ǃG.ǃcBE(de);if(me!==re)throw new Error(`cannot change property '${ne}' from '${re}' to '${me}'`);if(ae){if(ie.ǃ_c(de))return;ie=ǃG.ǃX(ǃG.ǃBc,ie)}else if(ie===de)return;if(this.ǃGan.set(ne,ie),!ee&&!this.ǃGT.ǃwe()){ee=!0;let Ge;Ge=ae?ǃG.ǃX(ǃG.ǃBc,ie):ie,this.ǃGau.ǃcJ(ne,Ge),this.ǃGMh(ne,Ge),ee=!1}ee||this.ǃcVi()}ǃGMh(ne,ie){ǃG.ǃbv(ne);let me=new ǃG.Event("propertychange");me.ǃ_x=this,me.ǃ_J=ne,me.value=ie,this.dispatchEvent(me)}ǃGNk(){let ne=[];for(let ie of this.ǃcy().ǃOx())if(ie.ǃGaY()&&"live-preview"!==ie.ǃEK()){let Dn=ie.ǃsn(),yn=this.ǃcp(ie.ǃEK());"combo"===Dn?yn=ie.ǃGaz(yn):"color"===Dn&&("c2"===this.ǃTS().ǃTk()?yn=`rgb(${yn.ǃcN$()})`:yn=yn.ǃcN$()),ne.push(yn)}return ne}ǃGuF(ne){ǃG.ǃg(ne,ǃTb);let ie=[];if(this.ǃcy().ǃlW())for(let de of this.ǃcU().ǃOF()){let re=de.ǃOw(this);"boolean"===de.ǃsn()&&(re=re?1:0);let Ge=[re];ne.ǃGMY()&&Ge.push(de.ǃcu()),ie.push(Ge)}let me=[];this.ǃcy().ǃlu()&&(me=[...this.ǃGMC()].map(de=>de.ǃGuF()));let ae=ne.ǃGuw(this.ǃcU());return[null,ae,this.ǃ_l(),ie,me,this.ǃGNk()]}ǃpj(ne){ǃG.ǃcDt(ne);let ie=ne&&ne.mode||"",me={};for(let[Ge,oe]of this.ǃGan)assert(typeof oe!==_463&&null!==oe,"saving invalid property value"),oe instanceof ǃG.ǃBc&&(oe=oe.toJSON()),me[Ge]=oe;let ae=this.ǃYT.ǃcu();ne&&ne.ǃp_&&(ae=ne.ǃp_);let de={type:ae,properties:me};if("copy"!==ie&&(de.uid=this.ǃ_l()),this.ǃcy().ǃlW()){let Ge={};for(let oe of this.ǃYT.ǃOF())Ge[oe.ǃcu()]=oe.ǃOw(this);de.instanceVariables=Ge}if(this.ǃcy().ǃlu()){let Ge={};for(let oe of this.ǃYT.ǃOH())Ge[oe.ǃcu()]=oe.ǃOZ(this).ǃpj();de.behaviors=Ge}let re=this.ǃGau.ǃJa();return re&&(de.ownData=re),de}ǃpU(ne,ie=!0){ne.hasOwnProperty("uid")&&this.ǃGMM(ne.uid);let me=ne.properties;for(let[ae,de]of Object.entries(me))Array.isArray(de)&&(de=new ǃG.ǃBc,de.ǃcNe(me[ae])),this.ǃcn(ae,de);if(this.ǃcy().ǃlW()&&ne.instanceVariables){let ae=ne.instanceVariables;for(let[de,re]of Object.entries(ae)){let Ge=this.ǃYT.ǃGgI(de);if(!Ge)throw new Error(`cannot find instance variable '${de}'`);Ge.ǃOo(this,re)}}if(this.ǃcy().ǃlu()&&ne.behaviors){let ae=ne.behaviors;for(let[de,re]of Object.entries(ae)){let Ge=this.ǃYT.ǃGgx(de);if(!Ge)throw new Error(`cannot find behavior type '${de}'`);Ge.ǃOZ(this).ǃpU(re)}}ie&&this.ǃGMz(ne)}ǃGMz(ne){ne.hasOwnProperty("ownData")&&this.ǃGau.ǃJg(ne.ownData)}ǃGvm(ne){if(ǃG.ǃg(ne,ǃG.ǃKI.Element),"instance"!==ne.ǃcYw()&&"global-instance"!==ne.ǃcYw())throw new Error("unexpected tag name");ne.ǃcYO("uid")&&this.ǃGMM(ne.ǃJT("uid"));let ie=ne.ǃcYH("properties");if(ie)for(let de of ie.children()){let re=de.ǃcYw(),Ge=de.ǃLx();ǃJI.ǃGvX(this,re,Ge)}let me=ne.ǃcYH("instance-variables");if(me)for(let de of me.children()){let re=this.ǃYT.ǃGgI(de.ǃcYw());assert(re,"cannot find instance variable by name"),re.ǃGa_(this,de.ǃLx())}let ae=ne.ǃcYH("behavior-instances");if(ae)for(let de of ae.children("behavior-instance")){let re=de.ǃcYQ("type"),Ge=this.ǃYT.ǃGgx(re);if(!Ge)throw new Error(`missing behavior type '${re}'`);Ge.ǃOZ(this).ǃGvm(de)}}}}{const _464="normal",_465="no original size available",_466="plugin does not support blend modes";let ee=new ǃG.Rect,te=ǃG.ǃX(ǃccQ);window.ǃLn=class ne extends ǃxR{constructor(ie,me){super(ie),assert("world"===ie.ǃcy().ǃEq(),"creating WorldInstance for wrong plugin type"),this.ǃGpb=me,this.ǃNS=0,this.ǃNs=0,this.ǃhm=0,this.ǃhD=0,this.ǃWz=0.5,this.ǃWl=0.5,this.ǃCj=0,this.ǃGMF=[],this.ǃGMl=new ǃG.ǃK,this.ǃGMw=new ǃG.Rect,this.ǃGMo=ǃG.ǃX(ǃccQ),this.ǃGMH=!0,this.ǃGMI=!0,this.ǃGMx=!1,this.ǃcQx=new ǃG.ǃBc(1,1,1,1),this.ǃGMJ=new ǃG.ǃBc(1,1,1,1),this.ǃGMZ=_464,this.ǃGMS=!0,this.ǃcwb=-1,this.ǃGMs=-1,this.ǃGMO=0,this.ǃGMQ=!0,this.ǃGc$=!0,this.ǃGCc()}ǃz(){this.ǃGpb=null;for(let ie of this.ǃGMF)ie.ǃz();ǃG.ǃGs(this.ǃGMF),super.ǃz()}ǃxJ(){return"world-instance"}ǃGCc(){this.ǃrq().ǃGCG(this.ǃcU()),this.ǃ_b().ǃGCm()}ǃGpx(){this.ǃGCc(),super.ǃGpx()}ǃGpI(){this.ǃGCc(),super.ǃGpI()}ǃex(ie){ǃG.ǃmL(ie,ǃrP),ie||(ie=this.ǃGpb);let me=this.ǃYT.ǃEp(ie,this);return me.ǃl(),me}ǃGNU(ie){ǃG.ǃg(ie,window.ǃLn),this.ǃGah(ie),this.ǃNS=ie.ǃNS,this.ǃNs=ie.ǃNs,this.ǃhm=ie.ǃhm,this.ǃhD=ie.ǃhD,this.ǃWz=ie.ǃWz,this.ǃWl=ie.ǃWl,this.ǃCj=ie.ǃCj,this.ǃcQx.set(ie.ǃcQx),this.ǃGCD(),this.ǃGMI=!0,this.ǃGCi()}ǃcVi(){this.ǃTS().ǃwe()||(super.ǃcVi(),this.ǃGpb.ǃcVi(),app.ǃM().ǃn())}ǃuE(){return this.ǃGCR()&&!this.ǃGCb()}ǃGCR(){return this.ǃYT.ǃcy().ǃuE()}ǃuj(){return this.ǃYT.ǃcy().ǃuj()&&!this.ǃGCb()}ǃAj(){this.ǃGMI=!0,this.ǃGMH=!0,this.ǃGMN("boxchange")}ǃ_q(){return this.ǃGc$}ǃ_v(ie){ie===this.ǃGc$||(this.ǃGc$=!!ie,app.ǃM().ǃrI(this.ǃrq()).ǃtS())}ǃGCi(){if(this.ǃGMI){let ie=this.ǃcE(),me=this.ǃce(),ae=this.ǃWF()*ie,de=this.ǃWw()*me;ee.set(0,0,ie,me),ee.offset(-ae,-de),this.ǃGMl.ǃun(ee,this.ǃpJ()),this.ǃGMl.offset(this.ǃpi(),this.ǃpR()),this.ǃGMl.ǃcNl(this.ǃGMw),this.ǃGMI=!1}}ǃs(){return this.ǃGCi(),this.ǃGMl}ǃS(){return this.ǃGCi(),this.ǃGMw}ǃGCT(){if(this.ǃGMH){let ie=0,me=0,ae=null,de=this.ǃckj();de?(ae=de.ǃat(),this.ǃYT.ǃ_H()?(ie=-this.ǃWF(),me=-this.ǃWw()):(ie=-de.ǃWF(),me=-de.ǃWw())):(te.ǃt$(),ae=te,ie=-this.ǃWF(),me=-this.ǃWw()),this.ǃGMo.ǃGKz(ae,ie,me,this.ǃcE(),this.ǃce(),this.ǃpJ()),this.ǃGMo.ǃGKF(this.ǃpi(),this.ǃpR()),this.ǃGMH=!1}}ǃccT(){return this.ǃGCT(),this.ǃGMo}ǃ_F(){let ie=app.ǃM().ǃyT();return this.ǃ_b().ǃmq()&&this.ǃrq()!==ie}ǃGCk(){return this.ǃGpb}ǃ_b(){return this.ǃGpb.ǃOX()}ǃGCX(ie){ǃG.ǃg(ie,ǃrP),this.ǃGpb=ie}ǃeo(ie){if(ǃG.ǃg(ie,ǃrP),ie.ǃTS()!==this.ǃTS())throw new Error("cannot move to different project");if(ie.ǃ_R())throw new Error("cannot move to overriden layer");this.ǃGpb===ie||this.ǃGpb.ǃGC$(this,ie)}ǃrq(){return this.ǃ_b().ǃrq()}ǃBY(){return app.ǃM().ǃrI(this.ǃrq())}ǃcwB(ie){ǃG.ǃTH(ie),ie=Math.floor(ie),this.ǃcwb=ie}ǃ_B(){return this.ǃ_b().ǃGCr(),this.ǃcwb}ǃLH(){return this.ǃ_b().ǃeu()-this.ǃcwb-1}ǃGCV(ie){ǃG.ǃTH(ie),this.ǃGMs=ie}ǃGCA(){return this.ǃGMs}ǃeJ(){return!!this.ǃGau.ǃeJ()}ǃeZ(){return this.ǃeJ()?this.ǃGau.ǃeZ():this.ǃcE()}ǃeS(){return this.ǃeJ()?this.ǃGau.ǃeS():this.ǃce()}ǃGCL(ie){ie.ǃMw(this.ǃS())&&this.ǃGau.ǃnW()}ǃcTu(){let ie=ǃG.ǃX(ǃGC_,this);return this.ǃGMF.push(ie),ie}ǃcTU(ie){ǃG.ǃg(ie,ǃGC_);let me=this.ǃGMF.indexOf(ie);if(-1===me)throw new Error("virtual position not enabled on this instance");this.ǃGMF.splice(me,1),ie.ǃz(),this.ǃAj(),this.ǃGCD()}ǃGCb(){return 0ie.ǃGCj())}ǃGCd(){return this.ǃGCt(ie=>ie.ǃGCE())}ǃGCe(){return this.ǃGCt(ie=>ie.ǃGCp())}ǃGCf(){return this.ǃGCt(ie=>ie.ǃGCy())}ǃGCB(){return this.ǃGCt(ie=>ie.ǃGCW())}ǃGCu(){return this.ǃGCt(ie=>ie.ǃGCU())}ǃGCv(){return this.ǃGCt(ie=>ie.ǃGCq())}ǃGCa(){return this.ǃGCt(ie=>ie.ǃGCg())}ǃVK(){return!!(this.ǃGau instanceof ǃG.ǃMD)&&this.ǃGau.ǃVK()}ǃEu(ie){ǃG.ǃTH(ie);this.ǃNS===ie||(this.ǃNS=ie,this.ǃAj(),this.ǃcVi())}ǃW$(){return this.ǃNS}ǃpi(){return this.ǃGCb()?this.ǃNS+this.ǃGCP():this.ǃNS}ǃEU(ie){ǃG.ǃTH(ie);this.ǃNs===ie||(this.ǃNs=ie,this.ǃAj(),this.ǃcVi())}ǃWV(){return this.ǃNs}ǃpR(){return this.ǃGCb()?this.ǃNs+this.ǃGCd():this.ǃNs}ǃEB(ie){ǃG.ǃTH(ie);this.ǃhm===ie||(this.ǃhm=ie,this.ǃAj(),this.ǃcVi())}ǃwJ(){return this.ǃhm}ǃcE(){return this.ǃGCb()?this.ǃhm+this.ǃGCe():this.ǃhm}ǃEW(ie){ǃG.ǃTH(ie);this.ǃhD===ie||(this.ǃhD=ie,this.ǃAj(),this.ǃcVi())}ǃwx(){return this.ǃhD}ǃce(){return this.ǃGCb()?this.ǃhD+this.ǃGCf():this.ǃhD}ǃH(ie,me){ǃG.ǃTH(ie),ǃG.ǃTH(me);this.ǃhm===ie&&this.ǃhD===me||(this.ǃhm=ie,this.ǃhD=me,this.ǃAj(),this.ǃcVi())}ǃckr(ie,me){if(ǃG.ǃTH(ie),ǃG.ǃTH(me),!this.ǃeJ())throw new Error(_465);this.ǃH(this.ǃeZ()*ie,this.ǃeS()*me)}ǃOK(ie){if(ǃG.ǃTH(ie),!this.ǃeJ())throw new Error(_465);this.ǃEB(this.ǃeZ()*ie)}ǃON(){if(!this.ǃeJ())throw new Error(_465);return this.ǃcE()/this.ǃeZ()}ǃOM(ie){if(ǃG.ǃTH(ie),!this.ǃeJ())throw new Error(_465);this.ǃEW(this.ǃeS()*ie)}ǃOn(){if(!this.ǃeJ())throw new Error(_465);return this.ǃce()/this.ǃeS()}ǃck$(ie,me){ǃG.ǃTH(ie),ǃG.ǃTH(me);this.ǃWz===ie&&this.ǃWl===me||(this.ǃWz=ie,this.ǃWl=me,this.ǃAj(),this.ǃcVi())}ǃnj(ie){ǃG.ǃTH(ie);this.ǃWz===ie||(this.ǃWz=ie,this.ǃAj(),this.ǃcVi())}ǃWF(){return this.ǃGCb()?this.ǃWz+this.ǃGCB():this.ǃWz}ǃGCN(){return this.ǃWz}ǃnd(ie){ǃG.ǃTH(ie);this.ǃWl===ie||(this.ǃWl=ie,this.ǃAj(),this.ǃcVi())}ǃWw(){return this.ǃGCb()?this.ǃWl+this.ǃGCu():this.ǃWl}ǃGCK(){return this.ǃWl}ǃuc(ie){if(!this.ǃGCR())throw new Error("object not rotatable");ǃG.ǃTH(ie),ie=ǃG.ǃAt(ie);this.ǃCj===ie||(this.ǃCj=ie,this.ǃAj(),this.ǃcVi())}ǃOY(){return this.ǃCj}ǃpJ(){return this.ǃGCb()?this.ǃCj+this.ǃGCv():this.ǃCj}ǃfi(ie){ǃG.ǃTH(ie),ie=ǃG.ǃAR(ie,0,1);this.ǃcQx.a===ie||(this.ǃcQx.a=ie,this.ǃGCD(),this.ǃcVi())}ǃVz(){return this.ǃcQx.a}ǃpZ(){return this.ǃGCb()?ǃG.ǃAR(this.ǃcQx.a+this.ǃGCa(),0,1):this.ǃcQx.a}ǃGCD(){this.ǃGCb()?(this.ǃGMJ.ǃccV(this.ǃcQx),this.ǃGMJ.a=this.ǃpZ()):this.ǃGMJ.set(this.ǃcQx),this.ǃGMJ.ǃyQ()}ǃne(){return this.ǃGMJ}ǃO$(ie){if(ǃG.ǃbv(ie),!this.ǃcy().ǃlU())throw new Error(_466);if(!ǃm_.ǃGvb.has(ie))throw new Error("invalid blend mode");this.ǃGMZ===ie||(this.ǃGMZ=ie,this.ǃGMS=this.ǃGMZ===_464,this.ǃcVi())}ǃfW(){if(!this.ǃcy().ǃlU())throw new Error(_466);return this.ǃGMZ}ǃGCn(){return this.ǃGMS}ǃfy(ie){if(ǃG.ǃg(ie,ǃG.ǃcA.ǃfG),this.ǃGCn())ie.ǃQ();else{let me=ie.ǃfB(this.ǃfW());ie.ǃfu(me.ǃfU,me.ǃfv)}}ǃGgB(){return this.ǃcU().ǃGgB()}*ǃGCM(){for(let ie of this.ǃYT.ǃGWx())yield ie.ǃQD(this)}*ǃGCC(){for(let ie of this.ǃYT.ǃsN())yield ie.ǃQD(this)}ǃx(ie,me){ǃG.ǃD_(ie),ǃG.ǃD_(me),this.ǃGc$&&this.ǃGau.ǃx(ie,me),this.ǃGCh()&&me.ǃJ.ǃtS()}ǃJ_(ie,me){ǃG.ǃD_(ie),ǃG.ǃD_(me),this.ǃGc$&&this.ǃGau.ǃJ_(ie,me)}ǃnv(ie){ie?this.ǃGMO++:0Ge.ǃGuF()));let de=[this.ǃW$(),this.ǃWV(),0,this.ǃwJ(),this.ǃwx(),0,this.ǃOY(),this.ǃVz(),this.ǃGCN(),this.ǃGCK(),me,0,ae];this.ǃcy().ǃGNb()&&de.push(this.ǃGau.ǃar().ǃGuF());let re=super.ǃGuF(ie);return re[0]=de,re}ǃpj(ie){ǃG.ǃcDt(ie);let me=super.ǃpj(ie),ae={x:this.ǃNS,y:this.ǃNs,width:this.ǃhm,height:this.ǃhD,originX:this.ǃWz,originY:this.ǃWl,color:this.ǃcQx.toJSON()};if(this.ǃGCR()&&(ae.angle=this.ǃCj),this.ǃcy().ǃlU()){const de=this.ǃfW();de!==_464&&(ae.blendMode=de);let re={},Ge=!1;for(let oe of this.ǃYT.ǃsN())re[oe.ǃcu()]=oe.ǃQD(this).ǃpj(),Ge=!0;Ge&&(me.effects=re)}return me.world=ae,me}ǃpU(ie){super.ǃpU(ie,!1);let me=ie.world;if(this.ǃEu(me.x),this.ǃEU(me.y),this.ǃH(me.width,me.height),this.ǃnj(me.originX),this.ǃnd(me.originY),this.ǃGCR()&&this.ǃuc(me.angle),this.ǃcy().ǃlU()&&(this.ǃO$(me.blendMode||_464),ie.effects)){let ae=ie.effects;for(let[de,re]of Object.entries(ae)){let Ge=this.ǃYT.ǃGgu(de);if(!Ge)throw new Error(`cannot find effect type '${de}'`);Ge.ǃQD(this).ǃpU(re)}}this.ǃcQx.ǃcNe(me.color),this.ǃGCD(),this.ǃGMz(ie)}ǃGvm(ie){super.ǃGvm(ie);let me=ie.ǃJk("world");this.ǃEu(me.ǃcYJ("x")),this.ǃEU(me.ǃcYJ("y")),this.ǃEB(me.ǃcYJ("width")),this.ǃEW(me.ǃcYJ("height")),this.ǃnj(me.ǃcYZ("hotspotX",0.5)),this.ǃnd(me.ǃcYZ("hotspotY",0.5)),this.ǃGCR()&&me.ǃczm("angle")&&this.ǃuc(me.ǃcYJ("angle")),this.ǃcy().ǃlU()&&ie.ǃczm("blend-mode")&&this.ǃO$(ǃJI.ǃGvT(ie.ǃcYI("blend-mode"))),this.ǃcy().ǃGNb()&&ie.ǃczm("tilemap-data")&&this.ǃGau.ǃJK(ie.ǃJk("tilemap-data")),this.ǃfi(me.ǃcYZ("opacity",1));let ae=ie.ǃcYH("effect-instances");if(ae)for(let de of ae.children("effect-instance")){let re=de.ǃcYQ("type"),Ge=this.ǃYT.ǃGgu(re);if(!Ge)throw new Error(`missing effect type name '${re}'`);Ge.ǃQD(this).ǃGvm(de)}}static ǃ_A(ie,me){let ae=ie.ǃ_b().ǃko(),de=me.ǃ_b().ǃko();if(ae>de)return 1;return aethis.ǃGhG(),this.ǃGhm=_468}ǃz(){for(let oe of this.ǃJV())oe.ǃz();-1!==this.ǃGCQ&&clearTimeout(this.ǃGCQ),ǃG.ǃgG(this.ǃGCZ),this.ǃGCZ=null,this.ǃGCS=null,this.ǃGhc=null,this.ǃYT=null,super.ǃz()}ǃt$(oe,le){ǃG.ǃTH(oe),ǃG.ǃTH(le),this.ǃGhD(),this.ǃhm=Math.floor(oe),this.ǃhD=Math.floor(le),this.ǃG$E=this.ǃhm,this.ǃGCJ=this.ǃhD,ǃG.ǃgG(this.ǃGCZ),this.ǃGCZ=Array(this.ǃhm);for(let ue=0;ue=this.ǃG$E)return!1;if(le>=this.ǃGCJ)return!1;let Ee=this.ǃGCZ[oe][le];return(!ǃG.ǃ_Y(ue)||0>ue)&&Ee?(be&&ǃG.ǃ_Y(ue)?Ee.ǃGh_(ue):Ee.ǃt$(),ve||this.ǃGht(),!0):(ǃG.ǃ_Y(ue)&&0<=ue&&this.ǃYT&&!this.ǃGCS.has(ue)&&this.ǃGCS.set(ue,ǃG.ǃX(ǃccQ)),!Ee&&ǃG.ǃ_Y(ue)&&0<=ue||!Ee&&be?(this.ǃGCZ[oe][le]=ǃG.ǃX(ǃG.ǃaZ,this,oe,le,ue,pe,ge,he),ve||this.ǃGht(),!0):(Ee&&ǃG.ǃ_Y(ue)&&0<=ue||Ee&&be)&&Ee.ǃGhP(ue,pe,ge,he)&&(Ee.Set(ue,pe,ge,he),ve||this.ǃGht(),!0))}ǃKr(oe,le){ǃG.ǃTH(oe),ǃG.ǃTH(le);let ue=this.ǃGCZ[oe][le];if(ue)return ue}ǃvg(oe,le){ǃG.ǃTH(oe),ǃG.ǃTH(le);let ue=this.ǃKr(oe,le);if(ue)return ue.ǃko()}ǃGhj(oe){ǃG.ǃNU(oe);let le=!1;for(let ue=0,pe;ue=this.ǃG$E){ge?be.push(pe?ae:-1):be.push(null);continue}if(ye>=this.ǃGCJ){ge?be.push(pe?ae:-1):be.push(null);continue}let Te=this.ǃKr(De,ye);Te?ge?be.push(Te.ǃko()):be.push(Te.ǃex()):ge?be.push(pe?ae:-1):be.push(new ǃG.ǃaZ(this,De,ye,pe?ae:-1,!1,!1,!1))}he.push(be)}return he}ǃNg(oe,le,ue,pe,ge,he,ve){ǃG.ǃTH(oe),ǃG.ǃTH(le),ǃG.ǃNU(ue),ǃG.ǃNv(ve),pe=!!pe,ge=!!ge,he=!!he;let be=this.ǃgT(ue);for(let Ee=0,De;Ee=this.ǃG$E)&&!(xn>=this.ǃGCJ)){let Rn=this.ǃKr(Cn,xn);if(!Rn&&ǃG.ǃ_Y(Te)&&0<=Te)return!0;if(be){let Un=De[ye];if(Rn&&Rn.ǃGhP(Te,Un.ǃqo(),Un.ǃqH(),Un.ǃqI()))return!0}else if(Rn&&Rn.ǃGhP(Te,pe,ge,he))return!0}}}}return!1}ǃgT(oe){if(ǃG.ǃaQ(oe),!oe)return!1;for(let le=0,ue;leoe===ue.ǃko();for(let ue of this.ǃJV(le))yield ue}*ǃJV(oe){switch(ǃG.ǃcVD(oe),this.ǃGhm){case _468:for(let le=0,ue;le>>=0,ue.push(Ee)}else ue.push(0);return oe?ue:ue.join(",")}ǃJX(oe,le=_467){if(ǃG.ǃLK(oe,Array,Uint32Array),ǃG.ǃbv(le),!de.includes(le))throw new Error("invalid tilemap data source");for(let ue=0,pe=oe.length;ue=this.ǃGCZ.length?this.ǃGhV(oe-this.ǃGCZ.length):this.ǃGCZ.splice(oe),this.ǃhm=oe,this.ǃG$E=oe}ǃGhA(oe){if(ǃG.ǃTH(oe),assert(0=this.ǃGCZ[0].length)this.ǃGhL(oe-this.ǃGCZ[0].length);else for(let le=0;le=oe)){oe=Math.floor(oe);for(let le=0;le=oe)){for(let le=0;leparseInt(Ee,10)+1);for(let Ee=0,De=be.length;Eele)throw new Error("invalid layout width");this.ǃhm===le||(this.ǃhm=le,this.ǃcVi())}ǃce(){return this.ǃhD}ǃEW(le){if(ǃG.ǃTH(le),le=Math.floor(le),2>le)throw new Error("invalid layout height");this.ǃhD===le||(this.ǃhD=le,this.ǃcVi())}ǃsa(){return this.ǃGhW}ǃsg(le){le=!!le;this.ǃGhW===le||(this.ǃGhW=le,this.ǃcVi())}ǃlY(le){if(ǃG.ǃmL(le,ǃme),le&&le.ǃTS()!==this.ǃTS())throw new Error("event sheet from wrong project");this.ǃc$x===le||(this.ǃc$x=le||null,this.ǃcVi())}ǃmm(){return this.ǃc$x&&this.ǃc$x.ǃkM()?this.ǃc$x:null}ǃVp(){return this.ǃGhu}ǃrn(){return this.ǃGhu.ǃGiC()}*ǃLF(){for(let le of this.ǃrn())le.ǃGhz()&&(yield le)}ǃdU(){return this.ǃGhu.ǃGfi()}*ǃLv(){for(let le of this.ǃdU())le.ǃGhz()&&(yield le)}ǃGhn(){return this.ǃGhu.ǃGfR()}ǃrf(){let le=0;for(let ue of this.ǃrn())++le;return le}ǃGeH(){return ǃG.ǃds(this.ǃdU())}ǃOz(le){ǃG.ǃbv(le),le=le.toLowerCase();for(let ue of this.ǃrn())if(ǃG.ǃck_(le,ue.ǃcu()))return ue;return null}ǃGhF(le){return ǃG.ǃbv(le),!!this.ǃOz(le)}ǃGpR(le){for(let ue of this.ǃrn())if(le===ue)return!0;return!1}ǃGhl(){let le=0,ue="",pe=lang("model.project.new-layer-name");do ue=pe.replace("{0}",le),++le;while(this.ǃGhF(ue));return ue}ǃVk(){if(app.ǃTT()&&this.ǃrf()>=app.ǃVT())throw new Error(_471);let le=ǃG.ǃX(ǃrP,this);return this.ǃGhu.ǃrL(le),this.ǃcVi(),le}ǃVX(){if(app.ǃTT()&&this.ǃrf()>=app.ǃVT())throw new Error(_471);let le=ǃG.ǃX(ǃrP,this);return this.ǃGhu.ǃGpO(le),this.ǃcVi(),le}ǃVE(le,ue){ǃG.ǃTH(le),ǃG.ǃTH(ue);for(let pe of this.ǃLv()){let ge=pe.ǃVE(le,ue);if(ge)return ge}return null}ǃ_P(le){ǃG.ǃg(le,ǃG.Rect);for(let ue of this.ǃLv()){let pe=ue.ǃ_P(le);if(pe)return pe}return null}ǃBV(le,ue){ǃG.ǃTH(le),ǃG.ǃTH(ue);let pe=[];for(let ge of this.ǃLF())ǃG.ǃMg(pe,ge.ǃBV(le,ue));return pe}ǃ_y(le){ǃG.ǃg(le,ǃG.Rect);let ue=[];for(let pe of this.ǃLF())ǃG.ǃMg(ue,pe.ǃ_y(le));return ue}*ǃEc(){for(const le of this.ǃrn())yield*le.ǃLo()}ǃGhw(le){if(ǃG.ǃg(le,ǃ_K),le instanceof ǃEE)return this.ǃGho(le);if(le instanceof ǃeg)return this.ǃGhH(le);throw new Error(_472)}*ǃGho(le){ǃG.ǃg(le,ǃEE);for(const ue of this.ǃEc())ue.ǃcU()===le&&(yield ue)}*ǃGhH(le){ǃG.ǃg(le,ǃeg);for(const ue of this.ǃEc())le.ǃZQ(ue.ǃcU())&&(yield ue)}*ǃGhI(le){ǃG.ǃg(le,Plugin);for(const ue of this.ǃEc())ue.ǃcy()===le&&(yield ue)}*ǃef(){for(const le of this.ǃLF())yield*le.ǃLo()}ǃea(le){if(ǃG.ǃg(le,ǃ_K),le instanceof ǃEE)return this.ǃ_n(le);if(le instanceof ǃeg)return this.ǃGhx(le);throw new Error(_472)}*ǃ_n(le){ǃG.ǃg(le,ǃEE);for(const ue of this.ǃef())ue.ǃcU()===le&&(yield ue)}*ǃGhx(le){ǃG.ǃg(le,ǃeg);for(const ue of this.ǃef())le.ǃZQ(ue.ǃcU())&&(yield ue)}*ǃeK(le){ǃG.ǃg(le,Plugin);for(const ue of this.ǃef())ue.ǃcy()===le&&(yield ue)}ǃGhJ(){return new Set([...this.ǃEc()].map(le=>le.ǃcU()))}ǃGhZ(le){ǃG.ǃg(le,ǃEE);const ue=le.ǃGNu();return ue.ǃGMK(this),this.ǃTS().ǃwe()||ue.ǃl(),this.ǃGhq.push(ue),this.ǃcVi(),ue}*ǃGhS(){for(const le of this.ǃGhq)le.ǃkM()&&(yield le)}ǃGhs(le){ǃG.ǃg(le,ǃEE);let ue=this.ǃGha.get(le);if("undefined"!=typeof ue)return ue;ue=[];for(let pe of this.ǃEc())pe.ǃcU()===le&&(pe.ǃGCV(ue.length),ue.push(pe));return this.ǃGha.set(le,ue),ue}ǃGCG(le){ǃG.ǃmL(le,ǃEE),le?this.ǃGha.delete(le):this.ǃGha.clear()}ǃBB(le){return ǃG.ǃg(le,ǃLn),this.ǃGhs(le.ǃcU()),le.ǃGCA()}ǃBu(le,ue){ǃG.ǃg(le,ǃEE),ǃG.ǃTH(ue),ue=Math.floor(ue);let pe=this.ǃGhs(le);return 0>ue||ue>=pe.length?null:pe[ue]}ǃGpD(le){ǃG.ǃTH(le);for(let ue of this.ǃEc())if(ue.ǃ_l()===le)return ue}ǃOk(){return this.ǃTS().ǃGum()||this.ǃGgB()}ǃf_(){return this.ǃGhN}ǃx(le,ue){ǃG.ǃD_(le),ǃG.ǃD_(ue);let pe=ue.ǃJ,ge=this.ǃcE(),he=this.ǃce(),ve=this.ǃty(),be=this.ǃtW(),Ee=this.ǃGT.ǃDO(),De=this.ǃGT.ǃDQ();le.ǃmt(te),le.ǃcR(),this.ǃGhN=null;let ye=null,Te=this.ǃOk();Te&&(this.ǃGhN=app.ǃM().ǃps("linear"===this.ǃTS().ǃpO()),ye=le.ǃf_(),le.ǃjw(this.ǃGhN),le.ǃfA(0,0,0,0));for(let we of this.ǃrn())we.ǃrz()&&we.ǃx(le,ue);le.ǃQ(),le.ǃci();let ke=app.ǃM().ǃyR();if(le.ǃcc(ke),le.ǃBt(ne),le.ǃGdW(Ee,De,0,De,0,Ee/ie),le.ǃGdW(Ee,De,Ee,0,0,De/ie),le.ǃO(),le.ǃcc(null),le.ǃBt(ee),le.ǃWT(0,0,ge,he),ve>=me&&be>=me){le.ǃBt(ne);let we=-ve+ae,Le=-be+ae,Ce=ge+ve-ae,xe=he+be-ae;le.ǃX_(we,Le,we+me,Le),le.ǃX_(we,Le,we,Le+me),le.ǃX_(Ce,Le,Ce-me,Le),le.ǃX_(Ce,Le,Ce,Le+me),le.ǃX_(Ce,xe,Ce-me,xe),le.ǃX_(Ce,xe,Ce,xe-me),le.ǃX_(we,xe,we+me,xe),le.ǃX_(we,xe,we,xe-me)}if(Te){let we=[...this.ǃGWx()];if(this.ǃGhO(we)){if(le.ǃjw(ye),1===we.length){let Le=we[0],Ce=Le.ǃpH();le.ǃfR(Ce.ǃfb(le)),Ge.set(0,0,pe.ǃek()/le.ǃcE(),pe.ǃeX()/le.ǃce()),re.set(0,0,this.ǃcE(),this.ǃce()),le.ǃfp(null,de,re,Ge,re,1/re.width(),1/re.height(),pe.ǃcd(),0,ue.ǃtx,Le.ǃff(null))}else le.ǃci();le.ǃQ(),le.ǃcR(),le.ǃft(this.ǃGhN),le.ǃfP(this.ǃGhN),app.ǃM().ǃpQ(this.ǃGhN)}else ǃG.ǃfc(le,ue,this,null,ye,we)}this.ǃGhN=null}ǃGhO(le){if(0===le.length)return!0;let ue=le[0],pe=ue.ǃpH();return 1===le.length&&!pe.ǃpI()}ǃjI(le,ue){le.ǃO(),le.ǃcc(null),le.ǃBt(new ǃG.ǃBc(1,0,0,1));for(let pe of this.ǃrn())pe.ǃrz()&&pe.ǃjI(le,ue)}ǃlF(){let le=this.ǃpj({mode:"copy",ǃpA:!1}),ue=ǃG.ǃX(oe,this.ǃTS());return ue.ǃpU(le),ue.ǃGga(le),ue.ǃGhQ(le.layers),ue}ǃGuF(le){ǃG.ǃg(le,ǃTb);let ue=[...this.ǃrn()].map(ve=>ve.ǃGuF(le)),pe=this.ǃmm(),ge=[...this.ǃGhS()].map(ve=>ve.ǃGuF(le)),he=[...this.ǃGWx()].map(ve=>ve.ǃGuF(!0));return[this.ǃcu(),this.ǃcE(),this.ǃce(),this.ǃsa(),pe?pe.ǃcu():null,this.ǃGpF(),ue,ge,he]}static ǃGYc(le,ue,pe){ǃG.ǃg(pe,ǃG.ǃGpg);const ge=`layouts\\${ue.toLowerCase()}.uistate.json`,he=ǃG.ǃX(oe,le);return pe.ǃcze(`layouts\\${ue.toLowerCase()}.json`).then(ve=>ǃG.ǃckO(()=>{he.ǃpU(ve),he.ǃGga(ve),he.ǃGhQ(ve.layers),he.ǃGYG(ve["nonworld-instances"])})).then(()=>pe.ǃGpN(ge)).then(ve=>{return ve?pe.ǃcze(ge).then(be=>he.ǃwd(be)).then(()=>he):he})}ǃGus(){return{width:this.ǃhm,height:this.ǃhD,unboundedScrolling:this.ǃGhW}}ǃpj(le){ǃG.ǃcDt(le);let ue=le&&le.mode||"",pe=this.ǃmm(),ge=this.ǃcu();if("copy"===ue)do ge=ǃG.ǃcKY(ge);while(this.ǃTS().ǃGBe(ge));let he={name:ge,eventSheet:pe?pe.ǃcu():null,layers:[...this.ǃrn()].map(ve=>ve.ǃpj(le))};return"copy"!==ue&&(he.sid=this.ǃGpF(),he["nonworld-instances"]=[...this.ǃGhS()].map(ve=>ve.ǃpj(le))),this.ǃGgq(he),Object.assign(he,this.ǃGus())}ǃGUT(le){this.ǃEB(le.width),this.ǃEW(le.height),this.ǃsg(le.unboundedScrolling)}ǃpU(le){this.ǃr(le.name),le.hasOwnProperty("sid")&&this.ǃGpw(le.sid),this.ǃGhg=le.eventSheet,this.ǃGUT(le)}ǃGhQ(le){for(let ue of le){let pe=ǃG.ǃX(ǃrP,this);pe.ǃGYm(ue),this.ǃGhu.ǃrL(pe)}}ǃGYG(le){if(le)for(let ue of le){let pe=ue.type,ge=this.ǃGT.ǃpB(pe);if(!ge)throw new Error(`cannot find object type named '${pe}'`);let he=this.ǃGhZ(ge);he.ǃpU(ue)}}ǃeP(le,ue,pe){ǃG.ǃbv(le),this.ǃGhK.ǃeP(le,ue,pe)}ǃwt(le,ue){return ǃG.ǃbv(le),this.ǃGhK.ǃwt(le,ue)}ǃwE(le){le=!!le,this.ǃGhK.ǃctW(le)}ǃGUk(){return this.ǃGhK.ǃpj()}ǃGUX(le){le&&(this.ǃso(le.marginWidth),this.ǃsH(le.marginHeight),this.ǃsI(le.showCollisionPolygons),this.ǃsJ(le.showTranslucentInactiveLayers))}ǃw_(){return this.ǃGhK.ǃpj()}ǃwd(le){this.ǃGhK.ǃpU(le)}ǃt_(){return this.ǃGhK.ǃt_()}ǃty(){return this.ǃGhK.ǃty()}ǃso(le){this.ǃGhK.ǃso(le)}ǃtW(){return this.ǃGhK.ǃtW()}ǃsH(le){this.ǃGhK.ǃsH(le)}ǃjH(){return this.ǃGhK.ǃjH()}ǃsI(le){this.ǃGhK.ǃsI(le)}ǃsx(){return this.ǃGhK.ǃsx()}ǃsJ(le){this.ǃGhK.ǃsJ(le)}static ǃGYD(le,ue,pe){ǃG.ǃg(le,ǃm_),ǃG.ǃD_(ue),ǃG.ǃD_(pe);let ge=`Layouts\\${ue.ǃLx()}`,he=pe.ǃczt(ge);if(!he)throw new Error(`layout XML file '${ge}' is missing`);return pe.ǃczd(he).then(ǃG.ǃKI.Document.ǃKH).then(ve=>{let be=ǃG.ǃX(oe,le);return be.ǃGYi(ve),be})}ǃGYi(le){ǃG.ǃg(le,ǃG.ǃKI.Document);let ue=le.ǃKx();if("c2layout"!==ue.ǃcYw())throw new Error("expected c2layout tag");this.ǃr(ue.ǃLx("name")),ue.ǃczm("sid")&&this.ǃGpw(ue.ǃcYJ("sid"));let pe=ue.ǃJk("size");this.ǃEB(pe.ǃcYI("width")),this.ǃEW(pe.ǃcYI("height"));let ge=ue.ǃJk("margins");this.ǃso(ge.ǃcYI("horizontal")),this.ǃsH(ge.ǃcYI("vertical")),this.ǃsg(ue.ǃcYs("unbounded-scrolling",!1)),ue.ǃczm("event-sheet")&&(this.ǃGhg=ue.ǃLx("event-sheet"));let he=ue.ǃJk("layers");for(let be of he.children("layer")){let Ee=ǃG.ǃX(ǃrP,this);Ee.ǃGYi(be),this.ǃGhu.ǃrL(Ee)}ue.ǃczm("effects")&&this.ǃGgg(ue,!0);let ve=ue.ǃcYH("nonworld-instances");if(ve)for(let be of ve.children("instance")){let Ee=be.ǃcYQ("type"),De=this.ǃGT.ǃpB(Ee);if(!De)throw new Error(`cannot find object type named '${Ee}'`);let ye=this.ǃGhZ(De);ye.ǃGvm(be)}}}}{const _473="layoutfolderadd";window.ǃzY=class ee extends ǃzI{constructor(te,ne){super(te,ne,ǃGm),this.ǃzx()&&(this.ǃclE=lang("ui.bars.project.items.layouts"))}ǃrL(te){if(ǃG.ǃg(te,ǃGm),te.ǃGak)throw new Error("layout already belongs to folder");if(this.ǃGT.ǃGBe(te.ǃcu()))throw new Error(`layout name '${te.ǃcu()}' already used`);te.ǃGak=this,super.ǃrL(te),app.ǃGpm(te,"layoutadd"),te.ǃcVi()}ǃlB(){let te=ǃG.ǃX(ee,this.ǃGT,this);return this.ǃGpJ.push(te),app.ǃGYR(te,_473),this.ǃcVi(),te}ǃGpx(){app.ǃGYR(this,_473),this.ǃcVi()}ǃGpI(){this.ǃcVi(),app.ǃGYR(this,"layoutfolderremove")}ǃGfA(te){return te.ǃcu()}ǃGUa(te,ne){ǃG.ǃD_(te),ǃG.ǃg(ne,ǃG.ǃGpg),this.ǃzx()||this.ǃr(te.name);let ie=[];for(let ae of te.subfolders){let de=this.ǃlB();ie.push(de.ǃGUa(ae,ne))}let me=[];for(let ae of te.items)me.push(ǃGm.ǃGYc(this.ǃTS(),ae,ne));return Promise.all(ie).then(()=>Promise.all(me)).then(ae=>{for(let de of ae)this.ǃrL(de);return this})}ǃGUO(te,ne){ǃG.ǃg(te,ǃG.ǃKI.Element),ǃG.ǃg(ne,ǃG.ǃczD),this.ǃzx()||this.ǃr(te.ǃcYQ("name"));let ie=[];for(let ae of te.children("layout-folder")){let de=this.ǃlB();ie.push(de.ǃGUO(ae,ne))}let me=[];for(let ae of te.children("layout"))me.push(ǃGm.ǃGYD(this.ǃTS(),ae,ne));return Promise.all(ie).then(()=>Promise.all(me)).then(ae=>{for(let de of ae)this.ǃrL(de);return this})}}}{const _474="global",_475="reverse",_476="forward",_477="unexpected argument",_478="instance from different layer",_479="cannot move to overriden layer",_480="instance from different global layer",_481="wrong arguments, second and third arguments must be specified",ee=0.25,te=["self",_474],ne=[_476,_475];let ie=new ǃG.Rect,me=new ǃG.Rect;window.ǃrP=class ae extends ǃfm{constructor(de){super(de.ǃTS()),ǃG.ǃg(de,ǃGm),this.ǃtj=de,this.ǃGak=null,this.ǃclE=this.ǃtj.ǃGhl(),this.ǃGaf=[],this.ǃGmo={ǃGYb:!0,color:new ǃG.ǃBc(1,1,1,1),ǃGYT:new ǃG.ǃBc(1,1,1,1),backgroundColor:new ǃG.ǃBc(1,1,1,1),ǃGYk:!0,ǃGYX:1,ǃGY$:1,ǃGYr:1,ǃGYV:!1,ǃGYA:!1,ǃGYL:"normal"},this.ǃGY_=new ǃG.Rect,this.ǃGYt=new ǃG.Rect,this.ǃGhN=null,this.ǃJn=-1,this.ǃGYP=!1,this.ǃGYj=0,this.ǃtj.ǃGhC(),this.ǃGYd=ǃG.ǃX(ǃQz,this),this.ǃGYE=null}ǃz(){this.ǃGYd.ǃz(),this.ǃGYd=null}ǃxJ(){return"layer"}ǃFu(){if(!this.ǃGak)throw new Error("layer not yet added to folder");return this.ǃGak}ǃGf$(de){ǃG.ǃg(de,ǃGhU),this.ǃGak=de,this.ǃtj.ǃGhC()}ǃrq(){return this.ǃtj}ǃcVi(){this.ǃtj.ǃcVi()}ǃGCm(){this.ǃGYP=!1}ǃVR(){super.ǃVR(),this.ǃTS().ǃcLy()}ǃcLE(){super.ǃcLE(),this.ǃTS().ǃcLy()}ǃGpx(){this.ǃtj.ǃGhC(),app.ǃGeI(this,"layeradd"),this.ǃcVi()}ǃGpI(){this.ǃcVi(),this.ǃtj.ǃGhC(),app.ǃGeI(this,"layerremove")}ǃDD(){}ǃko(){return this.ǃtj.ǃGhh(),this.ǃJn}ǃLl(){return this.ǃtj.ǃGhh(),this.ǃtj.ǃrf()-1-this.ǃJn}ǃGhY(de){ǃG.ǃTH(de),this.ǃJn=de}ǃGhz(){return!this.ǃrM()&&this.ǃrz()}ǃ_R(){return!!this.ǃGYE&&this.ǃGYE.ǃmq()&&ǃG.ǃck_(this.ǃGYE.ǃcu(),this.ǃcu())}ǃOX(){return this.ǃ_R()?this.ǃGYE:this}ǃGvR(de){ǃG.ǃg(de,ae),this.ǃGYE=de}ǃGvi(){this.ǃGYE=null}ǃOx(){return this.ǃ_R()?this.ǃGYE.ǃOx():this.ǃGmo}ǃcu(){return this.ǃclE}ǃr(de){if(ǃG.ǃbv(de),de=ǃG.ǃcad(de),this.ǃclE!==de){if(!ǃG.ǃcaP(de))throw new Error("invalid name");if(!ǃG.ǃck_(this.ǃclE,de)&&this.ǃrq().ǃGhF(de))throw new Error(`layer name '${de}' already used`);this.ǃclE=de,this.ǃcVi(),this.ǃTS().ǃGpP(),app.ǃGeI(this,"layernamechange"),app.ǃGps(this,"projectobjectnamechange")}}ǃVD(de,re){return ǃG.ǃbv(de),ǃG.ǃc$i(re),ǃG.ǃi.ǃT("model.layout.layer.errors"),de=ǃG.ǃcad(de),ǃG.ǃcaP(de)?!ǃG.ǃck_(de,this.ǃcu())&&this.ǃrq().ǃGhF(de)?(ǃG.ǃGD.ǃGr.ǃev.ǃm$(re,"warning",lang(".name-used.title"),ǃcDZ(".name-used.message",de),{align:"bottom"}),void ǃG.ǃi.ǃW()):void(this.ǃr(de),ǃG.ǃi.ǃW()):(ǃG.ǃGD.ǃGr.ǃev.ǃm$(re,"warning",lang(".name-invalid.title"),lang(".name-invalid.message"),{align:"bottom"}),void ǃG.ǃi.ǃW())}ǃsS(de){de=!!de;this.ǃOx().ǃGYb===de||(this.ǃOx().ǃGYb=de,this.ǃcVi())}ǃsZ(){return this.ǃOx().ǃGYb}ǃSv(de){ǃG.ǃg(de,ǃG.ǃBc),this.ǃGYe(de.r,de.ǃcNj,de.b)}ǃGYe(de,re,Ge){ǃG.ǃTH(de),ǃG.ǃTH(re),ǃG.ǃTH(Ge),de=ǃG.ǃAR(de,0,1),re=ǃG.ǃAR(re,0,1),Ge=ǃG.ǃAR(Ge,0,1);this.ǃOx().backgroundColor.ǃcNR(de,re,Ge)||(this.ǃOx().backgroundColor.ǃcNm(de,re,Ge),this.ǃcVi())}ǃT$(){return new ǃG.ǃBc(this.ǃOx().backgroundColor)}ǃGYp(){return this.ǃOx().backgroundColor.r}ǃGYf(){return this.ǃOx().backgroundColor.ǃcNj}ǃGYy(){return this.ǃOx().backgroundColor.b}ǃfi(de){ǃG.ǃTH(de),de=ǃG.ǃAR(de,0,1);this.ǃOx().color.a===de||(this.ǃOx().color.a=de,this.ǃGCD(),this.ǃcVi())}ǃpZ(){return this.ǃOx().color.a}ǃGCD(){this.ǃOx().ǃGYT.set(this.ǃOx().color),this.ǃOx().ǃGYT.ǃyQ()}ǃne(){return this.ǃOx().ǃGYT}ǃlz(de){de=!!de;this.ǃOx().ǃGYk===de||(this.ǃOx().ǃGYk=de,this.ǃcVi())}ǃOR(){return this.ǃOx().ǃGYk}ǃOm(de){ǃG.ǃTH(de);this.ǃOx().ǃGYX===de||(this.ǃOx().ǃGYX=de,this.ǃcVi())}ǃOG(){return this.ǃOx().ǃGYX}ǃOi(de){ǃG.ǃTH(de);this.ǃOx().ǃGY$===de||(this.ǃOx().ǃGY$=de,this.ǃcVi())}ǃOD(){return this.ǃOx().ǃGY$}ǃOc(de){ǃG.ǃTH(de);this.ǃOx().ǃGYr===de||(this.ǃOx().ǃGYr=de,this.ǃcVi())}ǃsQ(){return this.ǃOx().ǃGYr}ǃOT(de){de=!!de;this.ǃOx().ǃGYV===de||(this.ǃOx().ǃGYV=de,this.ǃcVi())}ǃOb(){return this.ǃOx().ǃGYV}ǃOk(){return this.ǃOb()||1!==this.ǃpZ()||1!==this.ǃGYB()||"normal"!==this.ǃfW()||this.ǃGgB()}ǃsO(de){de=!!de;this.ǃOx().ǃGYA===de||(this.ǃOx().ǃGYA=de,this.ǃcVi())}ǃss(){return this.ǃOx().ǃGYA}ǃO$(de){if(ǃG.ǃbv(de),!ǃm_.ǃGvb.has(de))throw new Error("invalid blend mode");this.ǃOx().ǃGYL===de||(this.ǃOx().ǃGYL=de,this.ǃcVi())}ǃfW(){return this.ǃOx().ǃGYL}*ǃGYW(){yield*this.ǃGaf}*ǃGYu(){for(let de=this.ǃGaf.length-1,re;0<=de;--de)re=this.ǃGaf[de],re.ǃkM()&&(yield re)}ǃGYU(){return this.ǃOX().ǃGaf}*ǃGYv(){for(let de of this.ǃOX().ǃGaf)de.ǃkM()&&(yield de)}*ǃGYq(){let de=this.ǃOX().ǃGaf;for(let re=de.length-1,Ge;0<=re;--re)Ge=de[re],Ge.ǃkM()&&(yield Ge)}*ǃLo(){for(let de of this.ǃGYv())de.ǃkM()&&(yield de)}*ǃGgf(){yield*this.ǃOX().ǃGaf}*ǃLq(){for(let de of this.ǃGYq())de.ǃkM()&&(yield de)}*ǃ_j(de,re=_474){ǃG.ǃg(de,ǃG.Rect),ǃG.ǃbv(re);for(let Ge of this.ǃGYv())Ge.ǃ_P(de,re)&&(yield Ge)}*ǃGYa(de,re=_474){ǃG.ǃg(de,ǃG.Rect),ǃG.ǃbv(re);for(let Ge of this.ǃGYq())Ge.ǃ_P(de,re)&&(yield Ge)}*ǃGYg(de=_474,re=_476){if(ǃG.ǃbv(de),ǃG.ǃbv(re),!te.includes(de))throw new Error(_477);if(!ne.includes(re))throw new Error(_477);de===_474?re===_476?yield*this.ǃGYv():re===_475&&(yield*this.ǃGYq()):"self"===de&&(yield*this.ǃGaf)}ǃVE(de,re,Ge=_474){ǃG.ǃTH(de),ǃG.ǃTH(re),ǃG.ǃbv(Ge);for(let oe of this.ǃGYg(Ge,_475))if(oe.ǃVE(de,re))return oe;return null}ǃ_P(de,re=_474){ǃG.ǃg(de,ǃG.Rect),ǃG.ǃbv(re);for(let Ge of this.ǃGYg(re,_475))if(Ge.ǃ_P(de))return de;return null}ǃBV(de,re,Ge=_474){ǃG.ǃTH(de),ǃG.ǃTH(re),ǃG.ǃbv(Ge);let oe=[];for(let le of this.ǃGYg(Ge,_476))le.ǃVE(de,re)&&oe.push(le);return oe}ǃ_y(de,re=_474){ǃG.ǃg(de,ǃG.Rect),ǃG.ǃbv(re);let Ge=[];for(let oe of this.ǃGYg(re,_476))oe.ǃ_P(de)&&Ge.push(oe);return Ge}ǃGNv(de){if(ǃG.ǃg(de,ǃLn),this.ǃ_R()){if(de.ǃ_b()!==this.ǃGYE)throw new Error(_480);}else if(de.ǃ_b()!==this)throw new Error(_478);this.ǃGYU().includes(de)||(this.ǃGYP&&de.ǃcwB(this.ǃGYj++),this.ǃGYU().push(de),de.ǃGCc(),this.ǃcVi())}ǃGYN(de){if(ǃG.ǃg(de,ǃLn),this.ǃ_R()){if(de.ǃ_b()!==this.ǃGYE)throw new Error(_480);}else if(de.ǃ_b()!==this)throw new Error(_478);let re=this.ǃGYU().indexOf(de);if(0>re)throw new Error("instance is not part of layer");this.ǃGYU().splice(re,1),de.ǃGCc(),this.ǃGCm(),this.ǃcVi()}ǃGCr(){if(!this.ǃGYP){let de=0;for(let re of this.ǃGYv())re.ǃcwB(de++);this.ǃGYj=de,this.ǃGYP=!0}}ǃeu(){return this.ǃGCr(),this.ǃGYj}ǃez(de){ǃG.ǃg(de,Set);let re=ǃG.ǃZO(this.ǃGYU(),Ge=>de.has(Ge));re.length&&(ǃG.ǃMg(this.ǃGYU(),re),this.ǃGYP=!1,this.ǃGYK(),this.ǃcVi())}ǃew(de){ǃG.ǃg(de,Set);let re=ǃG.ǃZO(this.ǃGYU(),Ge=>de.has(Ge));re.length&&(ǃG.ǃMg(re,this.ǃGYU()),ǃG.ǃcGb(this.ǃGYU(),re),this.ǃGYP=!1,this.ǃGYK(),this.ǃcVi())}ǃGC$(de,re){if(ǃG.ǃg(de,ǃLn),ǃG.ǃg(re,ae),this.ǃ_R())throw new Error(_479);if(this.ǃTS()!==re.ǃTS())throw new Error("cannot move to different project");if(re!==this){let Ge=this.ǃGaf.indexOf(de);if(0>Ge)throw new Error("instance not on this layer");this.ǃGaf.splice(Ge,1),re.ǃGaf.push(de),de.ǃGCX(re),this.ǃGYP=!1,re.ǃGYP=!1,this.ǃtj.ǃGCG(),this.ǃcVi(),re.ǃcVi()}}ǃ__(de,re,Ge){if(ǃG.ǃkK(de,window.ǃLn),ǃG.ǃmL(re,window.ǃLn),ǃG.ǃoG(Ge),this.ǃ_R())throw new Error(_479);for(let le of de)le.ǃ_b().ǃGYN(le),le.ǃGCX(this);let oe=this.ǃGYn(re,Ge);this.ǃGaf.splice(oe,0,...de),this.ǃtj.ǃGCG(),this.ǃGCm(),this.ǃcVi()}ǃGYK(){this.ǃOX().ǃrq().ǃGCG()}ǃGYn(de,re){if(ǃG.ǃmL(de,window.ǃLn),ǃG.ǃoG(re),de&&!this.ǃGYU().includes(de))throw new Error("pivot instance is not part of the layer");if(!de&&re)throw new Error(_481);if(de&&!re)throw new Error(_481);let Ge=de?de.ǃ_B():0;if("before"===re||"undefined"==typeof re)return Ge+1;if("after"===re)return Ge;throw new Error("unexpected 'where' value. Only 'before' and 'after' are valid values")}ǃGYM(){return this.ǃGYU().slice(0)}ǃGYC(de){ǃG.ǃkK(de,ǃLn),ǃG.ǃcGb(this.ǃGYU(),de),this.ǃGYP=!1;for(let re of this.ǃGYU())this.ǃ_R()?re.ǃGCX(this.ǃGYE):re.ǃGCX(this);this.ǃGYK(),app.ǃGeI(this,"layerinstancelistset")}ǃGYh(de){ǃG.ǃg(de,ǃrv);let re=de.ǃeb(),Ge=de.ǃeT();this.ǃGY_.set(de.ǃd_(0),de.ǃdP(0),de.ǃd_(re),de.ǃdP(Ge));let oe=this.ǃGY_.width()*ee,le=this.ǃGY_.height()*ee;this.ǃGYt.ǃck(this.ǃGY_),this.ǃGYt.ǃXU(oe,le)}ǃfD(){return this.ǃGY_}ǃf_(){return this.ǃGhN}ǃx(de,re){if(this.ǃrz()){if(this.ǃ_R())return void this.ǃGYE.ǃx(de,re);let Ge=re.ǃJ;this.ǃGYh(Ge),Ge.ǃjW(de),this.ǃGhN=null;let oe=null,le=de.ǃf_(),ue=this.ǃOk();de.ǃQ(),ue&&(this.ǃGhN=app.ǃM().ǃps("linear"===this.ǃTS().ǃpO()),le=this.ǃGhN,oe=this.ǃtj.ǃf_(),de.ǃjw(this.ǃGhN),de.ǃfA(0,0,0,0)),this.ǃOR()||(de.ǃO(),de.ǃBt(this.ǃOx().backgroundColor),de.ǃWb(0,0,this.ǃtj.ǃcE(),this.ǃtj.ǃce()));let pe=this.ǃGY_,ge=this.ǃGYt;for(let he of this.ǃLo()){let ve=pe.ǃMw(he.ǃS());if(he.ǃGCY(ve),!ve&&!he.ǃGCh()){he.ǃGCL(ge);continue}he.ǃGgB()?this.ǃGYY(de,re,he,le):(de.ǃci(),he.ǃx(de,re))}if(de.ǃfR(0),ue){let he=[...this.ǃGWx()];if(this.ǃGYz(he)){if(de.ǃjw(oe),1===he.length){let be=he[0],Ee=be.ǃpH();de.ǃfR(Ee.ǃfb(de)),me.set(0,0,Ge.ǃek()/de.ǃcE(),Ge.ǃeX()/de.ǃce());let De=this.ǃGY_;de.ǃfp(null,ie,De,me,De,1/De.width(),1/De.height(),Ge.ǃcd(),0,re.ǃtx,be.ǃff(null))}else de.ǃci();this.ǃrq().ǃsx()?Ge.ǃLW()===this?de.ǃBt(this.ǃne()):de.ǃBt(this.ǃGYF()):de.ǃBt(this.ǃne());let ve=de.ǃfB(this.ǃfW());de.ǃfu(ve.ǃfU,ve.ǃfv),de.ǃft(this.ǃGhN),de.ǃfP(this.ǃGhN),app.ǃM().ǃpQ(this.ǃGhN)}else ǃG.ǃfc(de,re,this,null,oe,he),Ge.ǃjW(de)}this.ǃGhN=null}}ǃGYz(de){if(0===de.length)return!0;let re=de[0],Ge=re.ǃpH();return 1===de.length&&!Ge.ǃpI()&&!Ge.ǃpx()&&!Ge.ǃpS()&&1===this.ǃpZ()&&1===this.ǃGYB()}ǃGYl(de,re){let Ge=de[0],oe=Ge.ǃpH();return 1===de.length&&!oe.ǃpI()&&!oe.ǃpx()&&!oe.ǃpS()&&!oe.ǃGYw()&&1===re.ǃpZ()&&!re.ǃcy().ǃpI()}ǃGYY(de,re,Ge,oe){let le=Ge.ǃcU().ǃGNw();this.ǃGYl(le,Ge)?this.ǃGYo(de,re,Ge,le[0]):(ǃG.ǃfc(de,re,Ge.ǃcU(),Ge,oe,le),re.ǃJ.ǃjW(de))}ǃGYo(de,re,Ge,oe){let le=oe.ǃpH(),ue=re.ǃJ;de.ǃfR(le.ǃfb(de)),Ge.ǃfy(de);let pe=100,ge=100,he=Ge.ǃfd();if(he&&he.ǃfE()){me.ǃck(he.ǃcr());let ve=he.ǃfe();pe=ve.ǃcE(),ge=ve.ǃce()}else me.set(0,0,0,0);de.ǃfp(null,ie,this.ǃGY_,me,Ge.ǃS(),1/pe,1/ge,ue.ǃcd(),0,re.ǃtx,oe.ǃff(Ge)),Ge.ǃx(de,re)}ǃjI(de,re){if(this.ǃrz())for(let Ge of this.ǃLo())Ge.ǃBd()&&Ge.ǃJ_(de,re)}ǃGuF(de){ǃG.ǃg(de,ǃTb);let re=[...this.ǃLo()].map(le=>le.ǃGuF(de)),Ge=ǃm_.ǃGvb.get(this.ǃfW()),oe=[...this.ǃOX().ǃGWx()].map(le=>le.ǃGuF(!0));return[this.ǃcu(),this.ǃko(),this.ǃGpF(),this.ǃsZ(),this.ǃT$().ǃcNr(),this.ǃOR(),this.ǃOG(),this.ǃOD(),this.ǃpZ(),this.ǃOb(),this.ǃss(),this.ǃsQ(),Ge,0,re,oe]}ǃGus(){return{isInitiallyVisible:this.ǃOx().ǃGYb,color:this.ǃOx().color.toJSON(),backgroundColor:this.ǃOx().backgroundColor.toJSON(),isTransparent:this.ǃOx().ǃGYk,parallaxX:this.ǃOx().ǃGYX,parallaxY:this.ǃOx().ǃGY$,scaleRate:this.ǃOx().ǃGYr,forceOwnTexture:this.ǃOx().ǃGYV,useRenderCells:this.ǃOx().ǃGYA,blendMode:this.ǃOx().ǃGYL}}ǃpj(de){ǃG.ǃcDt(de);let re=de&&de.mode||"",Ge={name:this.ǃclE,instances:[...this.ǃLo()].map(oe=>oe.ǃpj(de))};return"copy"!==re&&(Ge.sid=this.ǃGpF()),this.ǃGgq(Ge),Object.assign(Ge,this.ǃGus())}ǃGUT(de){this.ǃsS(de.isInitiallyVisible),this.ǃOx().color.ǃcNe(de.color),this.ǃGCD(),this.ǃOx().backgroundColor.ǃcNe(de.backgroundColor),this.ǃlz(de.isTransparent),this.ǃOm(de.parallaxX),this.ǃOi(de.parallaxY),this.ǃOc(de.scaleRate),this.ǃOT(de.forceOwnTexture),this.ǃsO(de.useRenderCells),this.ǃO$(de.blendMode)}ǃpU(de){this.ǃr(de.name),de.hasOwnProperty("sid")&&this.ǃGpw(de.sid),this.ǃGUT(de)}ǃGYm(de){this.ǃpU(de),this.ǃGga(de);for(let re of de.instances){let Ge=re.type,oe=this.ǃGT.ǃpB(Ge);if(!oe)throw new Error(`cannot find object type named '${Ge}'`);let le=oe.ǃEp(this);le.ǃpU(re)}}ǃGUk(){return this.ǃGYd.ǃpj()}ǃGUX(de){this.ǃrs(de.visibleInEditor),this.ǃrZ(de.locked),this.ǃOV(de.parallaxInEditor),this.ǃOA(de.isGlobal)}ǃw_(){return this.ǃGYd.ǃpj()}ǃwd(de){this.ǃGYd.ǃpU(de)}ǃeP(de,re){ǃG.ǃbv(de),this.ǃGYd.ǃeP(de,re)}ǃwt(de){return ǃG.ǃbv(de),this.ǃGYd.ǃwt(de)}ǃwE(de){de=!!de,this.ǃGYd.ǃctW(de)}ǃrs(de){this.ǃGYd.ǃrs(de)}ǃrz(){return this.ǃGYd.ǃGpV()}ǃrZ(de){this.ǃGYd.ǃrZ(de)}ǃrM(){return this.ǃGYd.ǃGpA()}ǃOV(de){this.ǃGYd.ǃOV(de)}ǃOr(){return this.ǃGYd.ǃGpL()}ǃOA(de){this.ǃGYd.ǃGpt(de)}ǃmq(){return this.ǃGYd.ǃGp_()}ǃGes(de){this.ǃGYd.ǃfi(de)}ǃGYB(){return this.ǃGYd.ǃpZ()}ǃGYF(){return this.ǃGYd.ǃne()}ǃGYi(de){if(ǃG.ǃg(de,ǃG.ǃKI.Element),"layer"!==de.ǃcYw())throw new Error("expected layer tag");this.ǃclE=de.ǃcYQ("name"),de.ǃcYO("sid")&&this.ǃGpw(de.ǃczc("sid")),this.ǃsS(de.ǃcYS("initially-visible"));let re=new ǃG.ǃBc;re.ǃcNV(de.ǃLx("background-color")),this.ǃSv(re),this.ǃfi(de.ǃcYJ("opacity")),this.ǃlz(de.ǃcYS("transparent"));let Ge=de.ǃJk("parallax");this.ǃOm(Ge.ǃcYJ("x")),this.ǃOi(Ge.ǃcYJ("y")),this.ǃOc(de.ǃcYZ("zoom-rate",1)),this.ǃOT(de.ǃcYs("force-own-texture",!1)),this.ǃOA(de.ǃcYs(_474,!1)),this.ǃsO(de.ǃcYs("use-render-cells",!1)),this.ǃO$(ǃJI.ǃGvT(de.ǃcYx("blend-mode")));let oe=de.ǃJk("instances");for(let le of oe.children("instance")){let ue=le.ǃcYQ("type"),pe=this.ǃGT.ǃpB(ue);if(!pe)throw new Error(`cannot find object type named '${ue}'`);let ge=pe.ǃEp(this);ge.ǃGvm(le)}de.ǃczm("effects")&&this.ǃGgg(de,!0)}}}{const _482="layer already belongs to folder";window.ǃGhU=class extends ǃzI{constructor(te,ne){super(te.ǃTS(),ne,ǃrP),ǃG.ǃg(te,ǃGm),this.ǃtj=te,this.ǃzx()&&(this.ǃclE=lang("model.layout.layer.name-plural"))}ǃcVi(){this.ǃtj.ǃcVi()}ǃrL(te){if(ǃG.ǃg(te,ǃrP),te.ǃGak)throw new Error(_482);if(this.ǃtj.ǃGhF(te.ǃcu()))throw new Error(`layer name '${te.ǃcu()}' already used`);te.ǃGak=this,super.ǃrL(te),app.ǃGeI(te,"layeradd")}ǃGpO(te){if(ǃG.ǃg(te,ǃrP),te.ǃGak)throw new Error(_482);if(this.ǃtj.ǃGhF(te.ǃcu()))throw new Error(`layer name '${te.ǃcu()}' already used`);te.ǃGak=this,super.ǃGpO(te),app.ǃGeI(te,"layeradd")}ǃVB(te,ne,ie,me){super.ǃVB(te,ne,ie,me),this.ǃtj.ǃGhC(),app.ǃGeI(te,"layermove")}ǃlG(te,ne,ie,me){super.ǃlG(te,ne,ie,me),this.ǃtj.ǃGhC()}ǃGpx(){app.ǃGYH(this,"layerfolderadd"),this.ǃcVi()}ǃGpI(){this.ǃcVi(),app.ǃGYH(this,"layerfolderremove")}}}{let ee=!1;window.ǃme=class te extends ǃXb{constructor(ne){super(ne),this.ǃGak=null,this.ǃclE=this.ǃGT.ǃGBu(),this.ǃGgK=this.ǃclE,this.ǃcYK=ǃG.ǃX(ǃcLl,this),this.ǃGYI=!0,this.ǃcOs=!1,this.ǃGYx=new ǃG.ǃGe(()=>this.ǃGYJ(),50),this.ǃcZL=this.ǃTS().ǃGeY()}ǃz(){this.ǃcZL=null,this.ǃGYx.ǃz(),this.ǃGYx=null,this.ǃcYK.ǃz(),this.ǃcYK=null,this.ǃGak=null}ǃxJ(){return"event-sheet"}ǃFu(){if(!this.ǃGak)throw new Error("event sheet not yet added to folder");return this.ǃGak}ǃGf$(ne){ǃG.ǃg(ne,ǃzz),this.ǃGak=ne}ǃrq(){let ne=this.ǃTS();for(let ie of ne.ǃSF())if(ie.ǃmm()===this)return ie}ǃly(){return this.ǃcOs}ǃcVi(){this.ǃTS().ǃwe()||(app.ǃGpW(this,"eventsheetchange"),this.ǃcOs||(this.ǃcOs=!0,this.ǃTS().ǃGyn(!0),app.ǃGpW(this,"eventsheetmarkchanged")))}ǃGyh(){this.ǃcOs&&(this.ǃcOs=!1,app.ǃGpW(this,"eventsheetunmarkchanged"))}ǃGpo(){super.ǃGpo()}ǃGpH(){super.ǃGpH()}ǃGpx(){this.ǃTS().ǃcLy(),app.ǃGpW(this,"eventsheetadd"),this.ǃcVi(),this.ǃTS().ǃcVi()}ǃGpI(){this.ǃTS().ǃcLy(),app.ǃGpW(this,"eventsheetremove"),this.ǃcVi(),this.ǃTS().ǃcVi()}ǃDD(){}ǃGYJ(){this.ǃGYI&&(assert(!ee,"recursing in to _UpdateEventNumbers()"),ee=!0,this.ǃcYK.ǃGYZ(0),this.ǃcYK.ǃGYS(0),this.ǃGYI=!1,ee=!1)}ǃGYs(){this.ǃGYI=!0}ǃGYO(){this.ǃGYx.ǃGI()}ǃcu(){return this.ǃclE}ǃr(ne){if(ǃG.ǃbv(ne),ne=ǃG.ǃcad(ne),this.ǃclE!==ne){if(!ǃG.ǃcaP(ne))throw new Error("invalid name");if(!ǃG.ǃck_(this.ǃclE,ne)&&this.ǃTS().ǃGBW(ne))throw new Error(`event sheet name '${ne}' already used`);this.ǃclE=ne,this.ǃTS().ǃwe()&&(this.ǃGgK=ne),this.ǃcVi(),this.ǃTS().ǃc_N(),app.ǃGpW(this,"eventsheetnamechange"),app.ǃGps(this,"projectobjectnamechange")}}ǃVD(ne,ie){return ǃG.ǃbv(ne),ǃG.ǃc$i(ie),ne=ǃG.ǃcad(ne),ǃG.ǃi.ǃT("model.event-sheet.errors"),ǃG.ǃcaP(ne)?!ǃG.ǃck_(ne,this.ǃcu())&&this.ǃTS().ǃGBW(ne)?(ǃG.ǃGD.ǃGr.ǃev.ǃm$(ie,"warning",lang(".name-used.title"),ǃcDZ(".name-used.message",ne),{align:"bottom"}),void ǃG.ǃi.ǃW()):void(this.ǃr(ne),ǃG.ǃi.ǃW()):(ǃG.ǃGD.ǃGr.ǃev.ǃm$(ie,"warning",lang(".name-invalid.title"),lang(".name-invalid.message"),{align:"bottom"}),void ǃG.ǃi.ǃW())}ǃGUA(ne){return ǃG.ǃoG(ne),ne=(ne||this.ǃcu()).toLowerCase(),`eventSheets\\${ne}.json`}ǃGUV(ne){this.ǃGgK===this.ǃcu()||(this.ǃGgK&&(ne.add(this.ǃGUA(this.ǃGgK)),ne.add(this.ǃGUA(this.ǃGgK+".uistate"))),this.ǃGgK=this.ǃcu())}ǃGU_(ne){!this.ǃkM()&&this.ǃGgK&&(ne.add(this.ǃGUA(this.ǃGgK)),ne.add(this.ǃGUA(this.ǃGgK+".uistate")),this.ǃGgK="")}ǃmj(){return this.ǃcYK}ǃGBs(){return this.ǃcYK.ǃGYQ()}*includes(){for(let ne of this.ǃcYK.ǃGzc())ne instanceof ǃGa&&(yield ne)}ǃGzG(ne){ǃG.ǃg(ne,te);for(let ie of this.includes())if(ie.ǃc__()===ne)return!0;return!1}ǃc_i(ne){ǃG.ǃmL(ne,ǃcLB),ne||(ne=this.ǃcYK);let ie=[...ne.children()],me=null,ae=!1;for(let de=0,re=ie.length,Ge;deǃG.ǃckO(()=>{de.ǃpU(re)})).then(()=>me.ǃGpN(ae)).then(re=>{return re?me.ǃcze(ae).then(Ge=>de.ǃwd(Ge)).then(()=>de):de})}static ǃGzi(ne,ie,me){ǃG.ǃg(ne,ǃm_),ǃG.ǃD_(ie),ǃG.ǃD_(me);let ae=`Event sheets\\${ie.ǃLx()}`,de=me.ǃczt(ae);if(!de)throw new Error(`event sheet XML file '${ae}' is missing`);return me.ǃczd(de).then(ǃG.ǃKI.Document.ǃKH).then(re=>{let Ge=ǃG.ǃX(te,ne);return Ge.ǃGYi(re),Ge})}ǃGYi(ne){ǃG.ǃg(ne,ǃG.ǃKI.Document);let ie=ne.ǃKx();if("c2eventsheet"!==ie.ǃcYw())throw new Error("expected c2eventsheet tag");this.ǃr(ie.ǃLx("name")),this.ǃcYK.ǃGYi(ie.ǃJk("events"))}}}{const _484="eventsheetfolderadd";window.ǃzz=class ee extends ǃzI{constructor(te,ne){super(te,ne,ǃme),this.ǃzx()&&(this.ǃclE=lang("ui.bars.project.items.event-sheets"))}ǃrL(te){if(ǃG.ǃg(te,ǃme),te.ǃGak)throw new Error("event sheet already belongs to folder");if(this.ǃGT.ǃGBW(te.ǃcu()))throw new Error(`event sheet name '${te.ǃcu()}' already used`);te.ǃGak=this,super.ǃrL(te),app.ǃGpW(te,"eventsheetadd"),te.ǃcVi()}ǃlB(){let te=ǃG.ǃX(ee,this.ǃGT,this);return this.ǃGpJ.push(te),app.ǃGzR(te,_484),this.ǃcVi(),te}ǃGpx(){app.ǃGzR(this,_484),this.ǃcVi()}ǃGpI(){this.ǃcVi(),app.ǃGzR(this,"eventsheetfolderremove")}ǃGfA(te){return te.ǃcu()}ǃGUN(te,ne){ǃG.ǃD_(te),ǃG.ǃg(ne,ǃG.ǃGpg),this.ǃzx()||this.ǃr(te.name);let ie=[];for(let ae of te.subfolders){let de=this.ǃlB();ie.push(de.ǃGUN(ae,ne))}let me=[];for(let ae of te.items)me.push(ǃme.ǃGzD(this.ǃTS(),ae,ne));return Promise.all(ie).then(()=>Promise.all(me)).then(ae=>{for(let de of ae)this.ǃrL(de);return this})}ǃGUQ(te,ne){ǃG.ǃg(te,ǃG.ǃKI.Element),ǃG.ǃg(ne,ǃG.ǃczD),this.ǃzx()||this.ǃr(te.ǃcYQ("name"));let ie=[];for(let ae of te.children("event-folder")){let de=this.ǃlB();ie.push(de.ǃGUQ(ae,ne))}let me=[];for(let ae of te.children("event-sheet"))me.push(ǃme.ǃGzi(this.ǃTS(),ae,ne));return Promise.all(ie).then(()=>Promise.all(me)).then(ae=>{for(let de of ae)this.ǃrL(de);return this})}}}"use strict",window.ǃXT=class ee extends ǃXb{constructor(te,ne){ǃG.ǃg(te,ǃme),ǃG.ǃmL(ne,ee),super(te.ǃTS()),this.ǃc$x=te,this.ǃcHe=ne,this.ǃGzb=new Set,this.ǃGzT=ǃG.ǃX(ǃGpj,this),this.ǃCt=!0}ǃz(){this.ǃGzb.clear(),this.ǃGzT.ǃz(),this.ǃGzT=null,this.ǃcHe=null,this.ǃc$x=null,super.ǃz()}ǃxJ(){return"event-object"}ǃex(){ǃG.ǃDW()}ǃkM(){return this.ǃCt&&super.ǃkM()}ǃoK(te){let ne=this.ǃkM();this.ǃCt=!!te;let ie=this.ǃkM();!ne&&ie?this.ǃGpx():ne&&!ie&&this.ǃGpI()}accept(te){ǃG.ǃg(te,ǃGBN);let ne=te.ǃGzk(this);this.ǃGzX(te),te.ǃGz$(this,ne)}ǃGzX(){}ǃmm(){return this.ǃc$x}ǃ_T(){return this.ǃcHe}ǃmy(){ǃG.ǃDW()}ǃctb(te){ǃG.ǃg(te,ǃcVM),assert(!this.ǃGzb.has(te),"already added view"),this.ǃGzb.add(te)}ǃctX(te){ǃG.ǃg(te,ǃcVM),assert(this.ǃGzb.has(te),"view not added"),this.ǃGzb.delete(te)}ǃGpB(){for(let te of this.ǃGzb)te.ǃ$X()}ǃGzr(te){ǃG.ǃTH(te);for(let ne of this.ǃGzb)ne.ǃctp(te)}ǃGzV(){return[...this.ǃc_K()][0]}ǃTl(te){ǃG.ǃg(te,ǃc$H);for(let ne of this.ǃGzb)if(ne.ǃcte()===te)return ne;return null}ǃc_K(){return this.ǃGzb.values()}ǃcrF(){ǃG.ǃDW()}ǃGzA(te){for(let ne of this.ǃGzb)ne.ǃct_(te)}ǃGpx(){this.ǃGzA(!1),app.ǃGps(this,"projectobjectundelete"),this.ǃcVi()}ǃGpI(){this.ǃGzA(!0),app.ǃGps(this,"projectobjectdelete"),this.ǃcVi()}ǃcLx(){return!1}ǃdr(){ǃG.ǃDW()}ǃEh(){return!0}ǃc_l(){}ǃc_Y(){ǃG.ǃDW()}ǃcVi(){this.ǃTS().ǃwe()||(this.ǃc$x.ǃcVi(),this.ǃGpB())}ǃGuF(){return null}ǃpj(){ǃG.ǃDW()}ǃpU(){ǃG.ǃDW()}ǃw_(){return this.ǃGzT.ǃpj()}ǃwd(te){this.ǃGzT.ǃpU(te)}ǃwt(te){return this.ǃGzT.ǃwt(ǃGpj.ǃGpf,te)}ǃwE(te){te=!!te,this.ǃGzT.ǃctW(te)}},"use strict";{function ee(){return te||(te=new Map([["group",ǃGB],["comment",ǃGu],["variable",ǃGv],["include",ǃGa],["block",ǃGN]])),te}let te=null;window.ǃkx=class extends ǃXT{constructor(ie,me){ǃG.ǃg(ie,ǃme),ǃG.ǃmL(me,ǃcLB),super(ie,me),this.ǃGzL=-1,this.ǃGz_=-1,this.ǃGzt=!1}ǃz(){super.ǃz()}ǃGYZ(ie){return ǃG.ǃTH(ie),this.ǃGzL=ie++,ie}ǃGzP(){return this.ǃmm().ǃGYJ(),assert(-1!==this.ǃGzL,"no sequence number assigned"),this.ǃGzL}static ǃcVO(ie,me){return ie.ǃGzP()-me.ǃGzP()}ǃGYS(ie){ǃG.ǃTH(ie);let me=ie++;return this.ǃGz_!==me&&(this.ǃGz_=me,this.ǃGzr(this.ǃGz_)),ie}ǃmB(){return this.ǃmm().ǃGYJ(),this.ǃGz_}ǃGpx(){super.ǃGpx();let ie=this.ǃ_T();ie&&1===ie.ǃGzj()&&ie.ǃGpB(),this.ǃmm().ǃGYs(),this.ǃmm().ǃGYO()}ǃGpI(){super.ǃGpI();let ie=this.ǃ_T();ie&&0===ie.ǃGzj()&&ie.ǃGpB(),this.ǃmm().ǃGYs(),this.ǃmm().ǃGYO()}ǃmA(ie){this.ǃGzT.ǃmA(ie)}ǃcVF(){return this.ǃGzT.ǃGpe()}ǃcAe(){return!0}ǃcAy(ie){if(ie=!!ie,this.ǃGzt!==ie){if(app.ǃTT()&&ie)return void app.ǃkm(15);if(ie&&!this.ǃcAf())throw new Error("branch not breakable");this.ǃGzt=ie,this.ǃcVi();let me=this.ǃmm();me.ǃGzm(),me.ǃTo(this)}}ǃcVH(){return!app.ǃTT()&&this.ǃGzt}ǃcAf(){return!this.ǃcLN()&&!this.ǃGzd()}ǃcj_(){return!this.ǃ_T().ǃ_T()}*ǃcth(){for(let ie=this.ǃ_T();ie;)yield ie,ie=ie.ǃ_T()}ǃcLW(ie){ǃG.ǃg(ie,ǃcLB);for(let me of this.ǃcth())if(me===ie)return!0;return!1}ǃcAm(ie){ǃG.ǃg(ie,Set);for(let me of this.ǃcth())if(ie.has(me))return!0;return!1}*children(){}*ǃGzE(){}*ǃGzc(){}*ǃGze(){}ǃcjH(){return this.ǃ_T().ǃGzp(this,!0)}ǃGzf(){return this.ǃ_T().ǃGzp(this,!1)}ǃGzy(){return this.ǃ_T().ǃGzB(this)}ǃkJ(){return this.ǃ_T().ǃGzW(this)}ǃmw(){let ie=this.ǃGzy(),me=this.ǃkJ();if(ie&&me){let ae=this.ǃGzP(),de=ie.ǃGzP(),re=me.ǃGzP(),Ge=Math.abs(de-ae),oe=Math.abs(re-ae);return Geae)throw new Error("cannot find child to insert by");ie&&++ae,this.ǃcHp.splice(ae,0,te)}else this.ǃcHp.push(te);this.ǃcVi(),this.ǃmm().ǃGYs();let me=[];for(let ae of this.ǃc_K()){let de=null;ne&&(de=ne.ǃTl(ae.ǃcte()),ie&&(de=de.ǃctL())),me.push(te.ǃcrF(ae,de))}return this.ǃTS().ǃGyI(),Promise.all(me)}ǃcLf(){return ǃG.ǃds(this.children())}ǃGzp(te,ne){ǃG.ǃg(te,ǃkx),ne=!!ne;let ie=this.ǃcHp.indexOf(te);if(0>ie)throw new Error(_486);return ne?ie++:ie--,0>ie||ie>=this.ǃcHp.length?null:this.ǃcHp[ie]}ǃGzB(te){ǃG.ǃg(te,ǃkx);let ne=this.ǃcHp.indexOf(te);if(0>ne)throw new Error(_486);do--ne;while(0ne?null:this.ǃcHp[ne]}ǃGzW(te){ǃG.ǃg(te,ǃkx);let ne=this.ǃcHp.indexOf(te);if(0>ne)throw new Error(_486);do++ne;while(ne=this.ǃcHp.length?null:this.ǃcHp[ne]}ǃLI(){return!!this.ǃcLf()}ǃGzj(){return[...this.children()].length}*children(){for(let te of this.ǃGzE())te.ǃkM()&&(yield te)}*ǃGzq(){for(let te of this.children())te.ǃEh()&&(yield te)}*ǃGzE(){for(let te of this.ǃcHp)yield te}*ǃGzc(){for(let te of this.children())yield te,yield*te.ǃGzc()}*ǃGze(){for(let te of this.ǃGzE())yield te,yield*te.ǃGze()}ǃcVz(){return this.ǃGzu||this.ǃGpp(),!!this.ǃGzu.length}ǃGpp(){this.ǃGzu=[...this.ǃmP()]}ǃcVY(){return this.ǃGzu||this.ǃGpp(),this.ǃGzu}*ǃmP(){for(let te of this.children())te.ǃcVF()&&(yield te),te instanceof ee&&(yield*te.ǃmP())}ǃcVo(){return this.ǃGzU||this.ǃGzm(),!!this.ǃGzU.length}ǃGzm(){this.ǃGzU=[...this.ǃGza()]}ǃcVw(){return this.ǃGzU||this.ǃGzm(),this.ǃGzU}*ǃGza(){for(let te of this.children())te.ǃcVH()&&(yield te),te instanceof ee&&(yield*te.ǃGza())}*ǃGYQ(){for(let te of this.children())te instanceof ǃGv&&(yield te)}*ǃGzg(){for(let te of this.ǃGzc())te instanceof ǃGv&&(yield te)}*ǃGBJ(){for(let te of this.children())te instanceof ee&&(yield*te.ǃGzg())}*ǃGBS(){for(let te=this;!(te instanceof ǃcLl);)yield*te.ǃGYQ(),te=te.ǃ_T()}*ǃGzN(){yield*this.ǃGBS(),yield*this.ǃTS().ǃGBs()}ǃGzX(te){if(!te.ǃGzK())for(let ne of te.ǃGzn()?this.ǃGzE():this.children())if(ne.accept(te),te.ǃGzK())return}ǃGzM(te){return this.ǃcHp.length?ǃG.ǃckO(()=>{let ne=[];for(let ie of this.ǃGzE()){let me=ie.ǃcrF(te);me.then&&ne.push(me)}return Promise.all(ne)}):Promise.resolve(this)}ǃGzC(){for(let te of this.ǃGzc())te.ǃGpB()}ǃGYZ(te){ǃG.ǃTH(te),te=super.ǃGYZ(te);for(let ne of this.children())te=ne.ǃGYZ(te);return te}ǃGYS(te){ǃG.ǃTH(te),te=super.ǃGYS(te);for(let ne of this.children())te=ne.ǃGYS(te);return te}ǃcLF(te){ǃG.ǃg(te,ǃkx);let ne=this.ǃcHp.indexOf(te);assert(0<=ne,"cannot find row in parent");for(let ie=ne+1,me=this.ǃcHp.length,ae;ieie.ǃc_Y(te)).join("\n");return ne&&(ne="\n"+ne),ne}ǃGzY(te){ǃG.ǃg(te,ǃTb);let ne=[];for(let ie of this.ǃGzq()){let me=ie.ǃGuF(te);me&&ne.push(me)}return ne}ǃGzz(te){return ǃG.ǃcDt(te),[...this.children()].map(ne=>ne.ǃpj(te))}ǃGzF(te){if(ǃG.ǃQw(te),!!te)for(let ne of te)this.ǃrC(ǃkx.ǃc_F(ne,this))}ǃGzl(){return[...this.children()].map(te=>te.ǃw_())}ǃGzw(te){let ne=[...this.children()];for(let ie=0;iene)}ǃGuF(te){return ǃG.ǃg(te,ǃTb),this.ǃGzY(te)}ǃpj(te){return ǃG.ǃcDt(te),this.ǃGzz(te)}ǃpU(te){this.ǃGzF(te)}ǃw_(){let te=super.ǃw_();return te.eventsUIState=this.ǃGzl(),te}ǃwd(te){super.ǃwd(te),this.ǃGzw(te.eventsUIState)}ǃGYi(te){if(!te)throw new Error("missing root events element");this.ǃGzo(te)}},"use strict";{const _487="event-comment";window.ǃGu=class ee extends ǃkx{constructor(te){ǃG.ǃg(te,ǃcLB),super(te.ǃmm(),te),this.ǃGzH="",this.ǃGzI=!0,this.ǃGzx=ǃG.ǃX(ǃG.ǃBc),this.ǃGzJ=!0,this.ǃGzZ=ǃG.ǃX(ǃG.ǃBc)}ǃz(){super.ǃz()}ǃxJ(){return _487}ǃcrF(te,ne){return ǃG.ǃg(te,ǃctu),ǃG.ǃmL(ne,ǃc$o),ǃG.ǃX(ǃcAt,this,te,ne)}ǃex(te,ne){ǃG.ǃg(te,ǃcLB),ǃG.ǃbv(ne);let ie=ǃG.ǃX(ee,te);return ie.ǃcAy(this.ǃcVH()),ie.ǃmA(this.ǃcVF()),ie.ǃGzH=this.ǃGzH,ie.ǃGzI=this.ǃGzI,ie.ǃGzx=this.ǃGzx.clone(),ie.ǃGzJ=this.ǃGzJ,ie.ǃGzZ=this.ǃGzZ.clone(),ie}ǃGYS(te){return ǃG.ǃTH(te),te}ǃc_Y(te){return ǃG.ǃTH(te),`${" ".repeat(te)}// ${this.ǃmu()}`}ǃcAf(){return!1}ǃmy(){return app.ǃml(_487)}ǃcPq(te){ǃG.ǃbv(te);this.ǃGzH===te||(this.ǃGzH=te,this.ǃcVi())}ǃmu(){return this.ǃGzH}ǃcPN(te){te=!!te;this.ǃGzI===te||(this.ǃGzI=te,this.ǃcVi())}ǃcPK(te){ǃG.ǃg(te,ǃG.ǃBc);this.ǃGzx.ǃcNi(te)||(this.ǃGzx.set(te),this.ǃcVi())}ǃcPf(){return this.ǃGzI?"":this.ǃGzx.ǃTX()}ǃcPn(te){te=!!te;this.ǃGzJ===te||(this.ǃGzJ=te,this.ǃcVi())}ǃSv(te){ǃG.ǃg(te,ǃG.ǃBc);this.ǃGzZ.ǃcNi(te)||(this.ǃGzZ.set(te),this.ǃcVi())}ǃcPy(){return this.ǃGzJ?"":this.ǃGzZ.ǃTX()}ǃpj(te){ǃG.ǃcDt(te);let ne=super.ǃpj(te);return ne=Object.assign(ne,{eventType:"comment",text:this.ǃmu()}),this.ǃGzI||(ne["text-color"]=this.ǃGzx.toJSON()),this.ǃGzJ||(ne["background-color"]=this.ǃGzZ.toJSON()),ne}ǃpU(te){super.ǃpU(te),this.ǃGzH=te.text,this.ǃGzI=!te.hasOwnProperty("text-color"),this.ǃGzI||this.ǃGzx.ǃcNe(te["text-color"]),this.ǃGzJ=!te.hasOwnProperty("background-color"),this.ǃGzJ||this.ǃGzZ.ǃcNe(te["background-color"])}ǃGYi(te){assert("comment"===te.ǃcYw(),"tag name should be 'comment'"),this.ǃGzH=te.ǃLx()}}}{const _488="string",_489="number",_490="boolean",ee=new Set([_490,_489,_488]);window.ǃGv=class te extends ǃkx{constructor(ne){ǃG.ǃg(ne,ǃcLB),super(ne.ǃmm(),ne),this.ǃGzS="Variable1",this.ǃGzs=_489,this.ǃGzO="0",this.ǃGzQ="",this.ǃGPh=!1,this.ǃGFc=!1}ǃz(){super.ǃz()}ǃxJ(){return"event-variable"}ǃcrF(ne,ie){return ǃG.ǃg(ne,ǃctu),ǃG.ǃmL(ie,ǃc$o),ǃG.ǃX(ǃcLo,this,ne,ie)}ǃex(ne,ie){ǃG.ǃg(ne,ǃcLB),ǃG.ǃbv(ie);let me=ǃG.ǃX(te,ne),ae=this.ǃGzS;if("copy"===ie){let de=ne;for(ne.ǃ_T()||(de=null);this.ǃTS().ǃGBo(ae,de,!1);)ae=ǃG.ǃcKY(ae)}return me.ǃcAy(this.ǃcVH()),me.ǃmA(this.ǃcVF()),me.ǃGzS=ae,me.ǃGzs=this.ǃGzs,me.ǃGzO=this.ǃGzO,me.ǃGzQ=this.ǃGzQ,me.ǃGPh=this.ǃGPh,me.ǃGFc=this.ǃGFc,me}ǃc_l(){let ne=this.ǃ_T();for(this.ǃcj_()&&(ne=null);this.ǃTS().ǃGBo(this.ǃGzS,ne,!1);)this.ǃGzS=ǃG.ǃcKY(this.ǃGzS)}ǃGYS(ne){return ǃG.ǃTH(ne),ne}ǃVR(){super.ǃVR(),this.ǃTS().ǃcLy()}ǃcLE(){super.ǃcLE(),this.ǃTS().ǃcLy()}ǃXc(){ǃG.ǃi.ǃT("model.event-sheet.event-variable");let ne=this.ǃmq()?lang(".global-sp"):lang(".local-sp"),ie=this.ǃGjX()?lang(".static-sp"):"",me=this.ǃGFG()?lang(".constant-sp"):"",ae=lang("model.data-type."+this.ǃmU()).toLowerCase(),de=this.ǃmv(),re=this.ǃxj();this.ǃmU()===_490&&(re=lang("common.boolean."+re).toLowerCase());let Ge=ǃcDZ(".description",ne,ie,me,ae,de,re);return ǃG.ǃi.ǃW(),Ge}ǃc_Y(ne){return ǃG.ǃTH(ne),`${" ".repeat(ne)}| ${this.ǃXc().ǃmS()}`}ǃcAf(){return!1}ǃmy(){return app.ǃml(this.ǃmq()?"global-variable":"local-variable")}ǃmq(){return!this.ǃ_T().ǃ_T()}ǃcPH(){return this.ǃmq()?null:this.ǃ_T()}ǃc_R(ne){if(ǃG.ǃbv(ne),ne=ǃ_K.ǃGWf(ne),this.ǃGzS!==ne){if(!ǃG.ǃck_(this.ǃGzS,ne)&&this.ǃTS().ǃGBo(ne,this.ǃcPH(),!1))throw new Error("event variable name '"+ne+"' already in use");this.ǃGzS=ne,this.ǃcVi();const ie=this.ǃTS();ie.ǃc_N(),ie.ǃcVi(),ie.ǃGyl()}}ǃmv(){return this.ǃGFG()?this.ǃGzS.toUpperCase():this.ǃGzS}ǃc_b(ne){if(ǃG.ǃbv(ne),!ee.has(ne))throw new Error("invalid event variable type");this.ǃGzs===ne||(this.ǃGzs=ne,this.ǃcVi(),this.ǃGFm(this.ǃxj()))}ǃmU(){return this.ǃGzs}ǃGFm(ne){ǃG.ǃbv(ne),this.ǃGzs===_489?ne=parseFloat(ne).toString():this.ǃGzs===_490&&(ne="true"===ne.toLowerCase()?"true":"false");this.ǃGzO===ne||(this.ǃGzO=ne,this.ǃcVi())}ǃxj(){return this.ǃGzO}ǃc_T(ne){this.ǃGzs===_488?this.ǃGFm(ne):this.ǃGzs===_489?this.ǃGFm(ne.toString()):this.ǃGFm(ne?"true":"false")}ǃGFD(){return this.ǃGzs===_488?this.ǃGzO:this.ǃGzs===_489?parseFloat(this.ǃGzO):"true"===this.ǃGzO}ǃc_k(ne){ǃG.ǃbv(ne);this.ǃGzQ===ne||(this.ǃGzQ=ne,this.ǃcVi())}ǃcPw(){return this.ǃGzQ}ǃcPx(ne){return ne=!!ne,this.ǃGPh===ne?void 0:this.ǃmq()?void(this.ǃGPh=!1):void(this.ǃGPh=ne,this.ǃcVi())}ǃGjX(){return this.ǃGPh}ǃc_X(ne){ne=!!ne;this.ǃGFc===ne||(this.ǃGFc=ne,this.ǃcVi())}ǃGFG(){return this.ǃGFc}static ǃGFi(ne,ie){let me=ne.ǃmv().toLowerCase(),ae=ie.ǃmv().toLowerCase();return me>ae?1:me`}ǃcAf(){return!1}ǃc_t(te){if(ǃG.ǃg(te,ǃme),te===this.ǃmm())throw new Error("cannot include own event sheet");this.ǃGFb===te||(this.ǃGFb=te,this.ǃcVi())}ǃc__(){return this.ǃGFb}ǃma(){return this.ǃGFb.ǃcu()}ǃmy(){return app.ǃml("event-sheet")}ǃGuF(){return[2,this.ǃc__().ǃcu(),!1]}ǃpj(te){ǃG.ǃcDt(te);let ne=super.ǃpj(te);return Object.assign(ne,{eventType:"include",includeSheet:this.ǃc__().ǃcu()})}ǃpU(te){super.ǃpU(te),this.ǃGFT=te.includeSheet}ǃGYi(te){assert("include"===te.ǃcYw(),"tag name should be 'include'"),this.ǃGFT=te.ǃLx(),assert(this.ǃGFT,_492)}}}"use strict",window.ǃGB=class ee extends ǃcLB{constructor(te){ǃG.ǃg(te,ǃcLB),super(te.ǃmm(),te),this.ǃGDN="",this.ǃGck="",this.ǃGFk=!0,this.ǃyN=!0,this.ǃGzI=!0,this.ǃGzx=ǃG.ǃX(ǃG.ǃBc),this.ǃGzJ=!0,this.ǃGzZ=ǃG.ǃX(ǃG.ǃBc)}ǃz(){super.ǃz()}ǃxJ(){return"event-group"}ǃcrF(te,ne){ǃG.ǃg(te,ǃctu),ǃG.ǃmL(ne,ǃc$o);let ie=ǃG.ǃX(ǃcVW,this,te,ne);return this.ǃGzM(ie)}ǃex(te,ne){ǃG.ǃg(te,ǃcLB),ǃG.ǃbv(ne);let ie=ǃG.ǃX(ee,te),me=this.ǃGDN;if("copy"===ne)for(;this.ǃTS().ǃGWm(me);)me=ǃG.ǃcKY(me);return ie.ǃcAy(this.ǃcVH()),ie.ǃmA(this.ǃcVF()),ie.ǃGDN=me,ie.ǃGck=this.ǃGck,ie.ǃGFk=this.ǃGFk,ie.ǃyN=this.ǃyN,ie.ǃGzI=this.ǃGzI,ie.ǃGzx=this.ǃGzx.clone(),ie.ǃGzJ=this.ǃGzJ,ie.ǃGzZ=this.ǃGzZ.clone(),this.ǃGzv(ie,ne),ie}ǃc_l(){for(;this.ǃTS().ǃGWm(this.ǃGDN);)this.ǃGDN=ǃG.ǃcKY(this.ǃGDN)}ǃcLx(){return!0}ǃdr(te){te=!!te;this.ǃyN===te||(this.ǃyN=te,this.ǃcVi())}ǃEh(){return this.ǃyN}ǃc_Y(te){ǃG.ǃTH(te);let ne=`${"----".repeat(te)}[${this.ǃmf()}]`;return ne+=this.ǃGzh(te+1),ne}ǃmy(){return app.ǃml("closed-folder")}ǃc_G(te){ǃG.ǃbv(te);this.ǃGDN===te||(this.ǃGDN=te,this.ǃcVi())}ǃmf(){return this.ǃGDN}ǃV(te){ǃG.ǃbv(te);this.ǃGck===te||(this.ǃGck=te,this.ǃcVi())}ǃkQ(){return this.ǃGck}ǃc_m(te){te=!!te;this.ǃGFk===te||(this.ǃGFk=te,this.ǃcVi())}ǃcjG(){return this.ǃGFk}ǃcPN(te){te=!!te;this.ǃGzI===te||(this.ǃGzI=te,this.ǃcVi())}ǃcPK(te){ǃG.ǃg(te,ǃG.ǃBc);this.ǃGzx.ǃcNi(te)||(this.ǃGzx.set(te),this.ǃcVi())}ǃcPf(){return this.ǃGzI?"":this.ǃGzx.ǃTX()}ǃcPn(te){te=!!te;this.ǃGzJ===te||(this.ǃGzJ=te,this.ǃcVi())}ǃSv(te){ǃG.ǃg(te,ǃG.ǃBc);this.ǃGzZ.ǃcNi(te)||(this.ǃGzZ.set(te),this.ǃcVi())}ǃcPy(){return this.ǃGzJ?"":this.ǃGzZ.ǃTX()}ǃGuF(te){ǃG.ǃg(te,ǃTb);let ne=[this.ǃcjG(),this.ǃmf()],ie=te.ǃGFX({ǃGF$:"System",ǃGFr:"IsGroupActive"}),me=[[-1,ie,null,0,!1,!1,!1,0,!1,[[1,[2,this.ǃmf()]]]]],ae=te.ǃGMY()?[this.ǃcVH(),this.ǃmB(),this.ǃcAf()]:null,de=[0,ne,!1,ae,this.ǃGpF(),me,[]],re=this.ǃGzY(te);return re.length&&de.push(re),de}ǃpj(te){ǃG.ǃcDt(te);let ne=te&&te.mode||"",ie=super.ǃpj(te);return ie=Object.assign(ie,{eventType:"group",disabled:!this.ǃEh(),title:this.ǃmf(),description:this.ǃkQ(),isActiveOnStart:this.ǃcjG(),children:this.ǃGzz(te)}),"copy"!==ne&&(ie.sid=this.ǃGpF()),this.ǃGzI||(ie["text-color"]=this.ǃGzx.toJSON()),this.ǃGzJ||(ie["background-color"]=this.ǃGzZ.toJSON()),ie}ǃpU(te){super.ǃpU(te),te.hasOwnProperty("sid")&&this.ǃGpw(te.sid),this.ǃdr(!te.disabled),this.ǃGDN=te.title,this.ǃGck=te.description,this.ǃGFk=!!te.isActiveOnStart,this.ǃGzI=!te.hasOwnProperty("text-color"),this.ǃGzI||this.ǃGzx.ǃcNe(te["text-color"]),this.ǃGzJ=!te.hasOwnProperty("background-color"),this.ǃGzJ||this.ǃGzZ.ǃcNe(te["background-color"]),this.ǃGzF(te.children)}ǃw_(){let te=super.ǃw_();return te.children=this.ǃGzl(),te}ǃwd(te){if(super.ǃwd(te),!!te.hasOwnProperty("children")){let ne=[...this.children()],ie=te.children;for(let me=0;me{1===this.ǃGzj()&&this.ǃGpB()})}ǃcrF(te,ne){ǃG.ǃg(te,ǃctu),ǃG.ǃmL(ne,ǃc$o);let ie=ǃG.ǃX(ǃcVy,this,te,ne);return this.ǃGzM(ie)}ǃGzM(te){let ne=ǃG.ǃckO(()=>{for(let me of this.ǃGFP())me.ǃcrF(te);for(let me of this.ǃGFj())me.ǃcrF(te);te.ǃ$X()}),ie=super.ǃGzM(te);return Promise.all([ne,ie])}ǃex(te,ne){ǃG.ǃg(te,ǃcLB),ǃG.ǃbv(ne);let ie=ǃG.ǃX(ee,te);ie.ǃGFL=this.ǃGFL,ie.ǃyN=this.ǃyN,ie.ǃcAy(this.ǃcVH()),ie.ǃmA(this.ǃcVF());for(let me of this.ǃTz())ie.ǃGFV.push(me.ǃex(ie,ne));for(let me of this.ǃTF())ie.ǃGFA.push(me.ǃex(ie,ne));return this.ǃGzv(ie,ne),ie}ǃGpx(){super.ǃGpx(),this.ǃGF_=!0,this.ǃGFt=!0}ǃGzX(te){if(!te.ǃGzK()){if(te.ǃGFd()){for(let ne of te.ǃGzn()?this.ǃGFP():this.ǃTz())if(ne.accept(te),te.ǃGzK())return;for(let ne of te.ǃGzn()?this.ǃGFj():this.ǃTF())if(ne.accept(te),te.ǃGzK())return}super.ǃGzX(te)}}ǃFQ(){return!ǃG.ǃds(this.ǃTz())&&!ǃG.ǃds(this.ǃTF())&&!ǃG.ǃds(this.children())}ǃcLU(te){ǃG.ǃmL(te,ǃkj);for(let ne of this.ǃTz())if(ne!==te&&ne.ǃcLq())return!0;return!1}ǃcTg(){for(let te of this.ǃTz())if(te.ǃcTg())return!0;return!1}ǃcLx(){return!0}ǃdr(te){te=!!te;this.ǃyN===te||(this.ǃyN=te,this.ǃcVi())}ǃEh(){return this.ǃyN}ǃc_Y(te){ǃG.ǃTH(te);let ne="",ie=[...this.ǃTz()];ne=ie.length?ie.map(de=>de.ǃc_Y(te)).join("\n"):"+ "+lang("model.event-sheet.text-format.no-conditions"),ne+="\n";let me=[...this.ǃTF()];me.length?ne+=me.map(de=>de.ǃc_Y(te)).join("\n"):!this.ǃLI()&&(ne+="-> "+lang("model.event-sheet.text-format.no-actions"));let ae=this.ǃGzh(te+1);return ae&&(ne+="\n"+ae),ne+="\n",ne}*ǃTz(){for(let te of this.ǃGFP())te.ǃkM()&&(yield te)}*ǃGFE(){for(let te of this.ǃTz())te.ǃEh()&&(yield te)}*ǃGFP(){for(let te of this.ǃGFV)yield te}ǃcjz(){let te=0;for(let ne of this.ǃTz())++te;return te}ǃGFe(){let te=0;for(let ne of this.ǃTF())++te;return te}ǃcjF(){let te=0;for(let ne of this.ǃTz())ne.ǃcLq()&&++te;return te}ǃcLg(te){if(ǃG.ǃmL(te,ǃkj),this.ǃcLu())return!1;for(let ne of this.ǃTz())if(ne!==te&&!ne.ǃmN().ǃcLa())return!0;return!1}*ǃTF(){for(let te of this.ǃGFj())te.ǃkM()&&(yield te)}*ǃGFp(){for(let te of this.ǃTF())te.ǃEh()&&(yield te)}*ǃGFj(){for(let te of this.ǃGFA)yield te}*ǃGza(){for(let te of this.ǃGFV)te.ǃcVH()&&(yield te);for(let te of this.ǃGFA)te.ǃcVH()&&(yield te);for(let te of this.children())te.ǃcVH()&&(yield te),te instanceof ǃcLB&&(yield*te.ǃGza())}ǃmg(){for(let te of this.ǃGFP())if(te.ǃkM())return te;return null}ǃGFf(){for(let te of this.ǃGFj())if(te.ǃkM())return te;return null}ǃcLt(){return!!this.ǃmg()}ǃGFy(){return!!this.ǃGFf()}ǃGFB(){this.ǃGF_=!0}ǃGFW(){this.ǃGFt=!0}ǃGFu(){if(this.ǃGF_){let te=1;for(let ne of this.ǃTz())ne.ǃGFU(te++);this.ǃGF_=!1}}ǃGFv(){if(this.ǃGFt){let te=1;for(let ne of this.ǃTF())ne.ǃGFU(te++);this.ǃGFt=!1}}ǃcAI(te,ne,ie){if(ǃG.ǃg(te,ǃkj),ǃG.ǃmL(ne,ǃkj),ie=!!ie,!this.ǃcLu()){if(this.ǃcLv()&&te.ǃcLq())throw new Error(_495);ne&&ne.ǃcLq()&&!ie&&(ie=!0)}else if(!this.ǃcLU()&&this.ǃcLv()&&te.ǃcLq())throw new Error(_495);if(te.ǃcLq()&&!this.ǃcLu()&&(ne=this.ǃmg(),ie=!1),ne){let me=this.ǃGFV.indexOf(ne);if(0>me)throw new Error(_494);ie&&++me,this.ǃGFV.splice(me,0,te)}else this.ǃGFV.push(te);this.ǃGFB();for(let me of this.ǃc_K()){let ae=null;ne&&(ae=ne.ǃTl(me.ǃcte()),ie&&(ae=ae.ǃctL())),te.ǃcrF(me,ae)}this.ǃcVi()}ǃcAo(te,ne,ie){if(ǃG.ǃg(te,ǃkE),ǃG.ǃmL(ne,ǃkE),ie=!!ie,ne){let me=this.ǃGFA.indexOf(ne);if(0>me)throw new Error(_494);ie&&++me,this.ǃGFA.splice(me,0,te)}else this.ǃGFA.push(te);this.ǃGFW();for(let me of this.ǃc_K()){let ae=null;ne&&(ae=ne.ǃTl(me.ǃcte()),ie&&(ae=ae.ǃctL())),te.ǃcrF(me,ae)}this.ǃcVi()}ǃcLz(te){ǃG.ǃg(te,ǃcDn);let ne=te instanceof ǃkj?this.ǃGFV:this.ǃGFA;let ie=ne.indexOf(te);assert(0<=ie,"cannot find action/condition in block");for(let me=ie+1,ae=ne.length,de;mere.ǃGuF(te)),ie=[...this.ǃGFp()].map(re=>re.ǃGuF(te)),me=te.ǃGMY()?[this.ǃcVH(),this.ǃmB(),this.ǃcAf()]:null,ae=[0,null,this.ǃcLu(),me,this.ǃGpF(),ne,ie],de=this.ǃGzY(te);return de.length&&ae.push(de),ae}ǃpj(te){ǃG.ǃcDt(te);let ne=te&&te.mode||"",ie=super.ǃpj(te);ie=Object.assign(ie,{eventType:"block",conditions:[...this.ǃTz()].map(ae=>ae.ǃpj(te)),actions:[...this.ǃTF()].map(ae=>ae.ǃpj(te))}),"copy"!==ne&&(ie.sid=this.ǃGpF()),this.ǃEh()||(ie.disabled=!0);let me=this.ǃGzz(te);return me.length&&(ie.children=me),this.ǃcLu()&&(ie.isOrBlock=!0),ie}ǃpU(te){super.ǃpU(te),te.hasOwnProperty("sid")&&this.ǃGpw(te.sid),this.ǃdr(!te.disabled),te.isOrBlock&&this.ǃcjI(!0);for(let ne of te.conditions)this.ǃcAI(ǃkj.ǃc_z(ne,this));for(let ne of te.actions)this.ǃcAo(ǃkE.ǃc_z(ne,this));this.ǃGzF(te.children)}ǃw_(){let te=super.ǃw_();return te.children=this.ǃGzl(),te}ǃwd(te){if(super.ǃwd(te),!!te.hasOwnProperty("children")){let ne=[...this.children()],ie=te.children;for(let me=0;meme?1:(assert(te.ǃks()===ne.ǃks(),"expected same event block"),te.ǃkO()-ne.ǃkO())}*ǃc_L(){for(let te of this.ǃcvz)yield te}ǃmC(){return this.ǃcvz.length}ǃmh(te){if(ǃG.ǃTH(te),te=Math.floor(te),0>te||te>=this.ǃcvz.length)throw new RangeError("invalid parameter index");return this.ǃcvz[te]}static ǃcdp(te,ne){ǃG.ǃkF(te),ǃG.ǃkF(ne);let ie=ǃG.ǃcaa(te),me=ǃG.ǃcaa(ne);return ǃG.ǃOf(ie,me)}ǃcAy(te){if(te=!!te,this.ǃGzt!==te){if(app.ǃTT()&&te)return void app.ǃkm(15);if(te&&!this.ǃcAf())throw new Error("branch not breakable");this.ǃGzt=te,this.ǃcVi();let ne=this.ǃmm();ne.ǃGzm(),ne.ǃTo(this)}}ǃcVH(){return!app.ǃTT()&&this.ǃGzt}ǃcAf(){return this.ǃcjE.ǃcAf()}ǃcAe(){return!1}ǃpj(te){ǃG.ǃcDt(te);let ne=te&&te.mode||"",ie={id:this.ǃGFa.ǃEK(),objectClass:this.ǃGaT.ǃcu()};if("copy"!==ne&&(ie.sid=this.ǃGpF()),this.ǃEh()||(ie.disabled=!0),this.ǃcVH()&&(ie.breakpoint=!0),this.ǃGaK&&(ie.behaviorType=this.ǃGaK.ǃcu()),this.ǃcvz.length){let me={};for(let ae of this.ǃc_L())me[ae.ǃcdq().ǃEK()]=ae.ǃpj();ie.parameters=me}return ie}ǃGFM(te){if(ǃG.ǃcDt(te),!!te)for(let[ne,ie]of Object.entries(te))if(this.ǃGFa.ǃGFC(ne)){let Cn=this.ǃGFa.ǃGFh(ne).ǃko();assert(0<=Cn&&Cnle.ǃGuF(te));return oe.length&&Ge.push(oe),Ge}ǃpj(te){ǃG.ǃcDt(te);let ne=super.ǃpj(te);return this.ǃmz()&&(ne.isInverted=!0),ne}static ǃc_z(te,ne){ǃG.ǃD_(te),ǃG.ǃg(ne,ǃGN);let ie=ne.ǃTS(),me=te.objectClass,ae=ie.ǃGWE(me);if(!ae)throw new Error(`cannot find object '${me}'`);let de=ae.ǃcy(),re=null,Ge=te.behaviorType;if(Ge&&(re=ae.ǃGgx(Ge),!re))throw new Error(`cannot find object '${me}' behavior '${Ge}'`);let oe=te.id,le=null;if(re){if(le=re.ǃOI().ǃciA(oe),!le)throw new Error(`cannot find object '${me}' behavior '${Ge}' condition '${oe}'`);}else if(de&&(le=de.ǃciA(oe),!le))throw new Error(`cannot find object '${me}' condition '${oe}'`);let ue=ǃG.ǃX(ee,ne,ae,re,le);return te.hasOwnProperty("sid")&&ue.ǃGpw(te.sid),ue.ǃGFM(te.parameters),ue.ǃdr(!te.disabled),ue.ǃcAy(te.breakpoint),ue.ǃcdf(te.isInverted),ue}static ǃGaE(te,ne){assert("condition"===te.ǃcYw(),"tag name should be 'condition'"),ǃG.ǃg(ne,ǃGN);let ie=ne.ǃTS(),me=te.ǃcYQ("type"),ae=ie.ǃGWE(me),de=ae.ǃcy(),re=te.ǃcYQ("behavior"),Ge=!!re,oe=null;Ge&&(oe=ae.ǃGgx(re));let le=te.ǃJT("id"),ue=null;Ge?ue=oe.ǃOI().ǃGFO(le):de&&(ue=de.ǃGFO(le));let pe=ǃG.ǃX(ee,ne,ae,oe,ue);return te.ǃcYO("sid")&&pe.ǃGpw(te.ǃczc("sid")),pe.ǃGFY(te),te.ǃczG("disabled")&&pe.ǃdr(!1),te.ǃczG("inverted")&&pe.ǃcdf(!0),pe}},"use strict",window.ǃkE=class ee extends ǃcDn{constructor(te,ne,ie,me){ǃG.ǃg(te,ǃGN),ǃG.ǃg(ne,ǃ_K),ǃG.ǃmL(ie,ǃSR),ǃG.ǃg(me,ǃGFQ),super(te,ne,ie,me)}ǃz(){super.ǃz()}ǃxJ(){return"event-action"}ǃcrF(te,ne){return ǃG.ǃg(te,ǃcVy),ǃG.ǃmL(ne,ǃc$l),ǃG.ǃX(ǃc$l,this,te,ne)}ǃGpx(){this.ǃcjE.ǃGFW(),super.ǃGpx()}ǃGpI(){this.ǃcjE.ǃGFW(),super.ǃGpI()}ǃex(te,ne){ǃG.ǃg(te,ǃGN),ǃG.ǃbv(ne);let ie=ǃG.ǃX(ee,te,this.ǃmK(),this.ǃcdr(),this.ǃmN());ie.ǃyN=this.ǃyN;for(let me=0,ae=this.ǃcvz.length;me ${this.ǃmK().ǃcu()}: ${this.ǃkS()}`}ǃGuF(te){ǃG.ǃg(te,ǃTb);let ne=-1,ie=-1,me=null,ae=this.ǃmK(),de=this.ǃmN().ǃGFS();if(ae===this.ǃTS().ǃcjo())ie=te.ǃGFX({ǃGF$:"System",ǃGlc:de});else{ne=te.ǃGuw(ae);let oe=this.ǃcdr();oe?(ie=te.ǃGFX({ǃGFs:oe.ǃOI().ǃEK(),ǃGlc:de}),me=oe.ǃcu()):ie=te.ǃGFX({ǃGF$:ae.ǃcy().ǃEK(),ǃGlc:de})}let re=[ne,ie,me,this.ǃGpF(),this.ǃcVH()],Ge=[...this.ǃc_L()].map(oe=>oe.ǃGuF(te));return Ge.length&&re.push(Ge),re}static ǃc_z(te,ne){ǃG.ǃD_(te),ǃG.ǃg(ne,ǃGN);let ie=ne.ǃTS(),me=te.objectClass,ae=ie.ǃGWE(me);if(!ae)throw new Error(`cannot find object '${me}'`);let de=ae.ǃcy(),re=null,Ge=te.behaviorType;if(Ge&&(re=ae.ǃGgx(Ge),!re))throw new Error(`cannot find object '${me}' behavior '${Ge}'`);let oe=te.id,le=null;if(re){if(le=re.ǃOI().ǃci_(oe),!le)throw new Error(`cannot find object '${me}' behavior '${Ge}' action '${oe}'`);}else if(de&&(le=de.ǃci_(oe),!le))throw new Error(`cannot find object '${me}' action '${oe}'`);let ue=ǃG.ǃX(ee,ne,ae,re,le);return te.hasOwnProperty("sid")&&ue.ǃGpw(te.sid),ue.ǃGFM(te.parameters),ue.ǃdr(!te.disabled),ue.ǃcAy(te.breakpoint),ue}static ǃGaE(te,ne){assert("action"===te.ǃcYw(),"tag name should be 'action'"),ǃG.ǃg(ne,ǃGN);let ie=ne.ǃTS(),me=te.ǃcYQ("type"),ae=ie.ǃGWE(me),de=ae.ǃcy(),re=te.ǃcYQ("behavior"),Ge=!!re,oe=null;Ge&&(oe=ae.ǃGgx(re));let le=te.ǃJT("id"),ue=null;Ge?ue=oe.ǃOI().ǃGlG(le):de&&(ue=de.ǃGlG(le));let pe=ǃG.ǃX(ee,ne,ae,oe,ue);return te.ǃcYO("sid")&&pe.ǃGpw(te.ǃczc("sid")),pe.ǃGFY(te),te.ǃczG("disabled")&&pe.ǃdr(!1),pe}},"use strict";{const _499="combo",_500="number",_501="undefined",_502="not a combo param",_503="invalid combo item value",_504="combo item index out of range",ee=new Set([_500,"string","any",_499,"cmp","object","objectname","layer","layout","keyb","instancevar","instancevarbool","eventvar","eventvarbool","animation","audiofile","file","layouteffect","layereffect","objecteffect","variadic","objinstancevar","functionname","groupname"]);window.ǃGlm=class extends ǃG.ǃDa{constructor(ne,ie){if(super(),ǃG.ǃD_(ne),ǃG.ǃTH(ie),ǃG.ǃbv(ne.id),ǃG.ǃNv(ne.c2id),ǃG.ǃbv(ne.type),!ee.has(ne.type))throw new Error(`invalid parameter type '${ne.type}'`);let me=ne.initialValue;if(typeof me===_500)me=me.toString();else if(typeof me===_501||null===me)me="";else if("string"!=typeof me)throw new TypeError("invalid type of initialValue");if(this.ǃcCQ=ne.id,this.ǃGlD=typeof ne.c2id===_500?Math.floor(ne.c2id):ie,this.ǃJn=ie,this.ǃchB=ne.type,this.ǃGzO=me,this.ǃclE="",this.ǃGck="",this.ǃGli=[],this.ǃGlR=new Map,this.ǃGlb=new Map,this.ǃchB===_499){ǃG.ǃkF(ne.items);let ae=!1;for(let de of ne.items)ǃG.ǃbv(de),this.ǃGzO===de&&(ae=!0),this.ǃGlb.set(de,this.ǃGli.length),this.ǃGli.push({name:"",value:de});if(0===ne.items.length)throw new Error("combo parameter must have at least one item");if(this.ǃGzO&&!ae)throw new Error(`combo parameter initial value '${this.ǃGzO}' not found in the item list`);this.ǃGzO||(this.ǃGzO=this.ǃGli[0].value)}this.ǃGlT()}ǃGlk(){if(ǃG.ǃi.ǃT("."+this.ǃEK()),this.ǃclE=lang(".name"),this.ǃGck=lang(".desc"),this.ǃclE===ǃG.ǃi.ǃcMT)throw new Error(`ACE parameter language string 'name' missing for '${this.ǃcCQ}'`);if(this.ǃGck===ǃG.ǃi.ǃcMT)throw new Error(`ACE parameter language string 'desc' missing for '${this.ǃcCQ}'`);if(this.ǃchB===_499){ǃG.ǃi.ǃT(".items");for(let ne of this.ǃGli){if(ne.name=lang("."+ne.value),ne.name===ǃG.ǃi.ǃcMT)throw new Error(`combo parameter '${this.ǃcCQ}' language string missing for item '${ne.value}'`);this.ǃGlR.set(ne.value,ne.name)}ǃG.ǃi.ǃW()}ǃG.ǃi.ǃW()}ǃGlT(){if(!this.ǃGzO)switch(this.ǃchB){case _500:case"any":case"layer":this.ǃGzO="0";break;case"string":case"layout":case"animation":case"objectname":case"audiofile":case"file":case"layouteffect":case"layereffect":case"objecteffect":case"functionname":case"groupname":this.ǃGzO=`""`;}}ǃEK(){return this.ǃcCQ}ǃGlX(){return this.ǃGlD}ǃko(){return this.ǃJn}ǃsn(){return this.ǃchB}ǃxj(){return this.ǃGzO}ǃcu(){return this.ǃclE}ǃkQ(){return this.ǃGck}ǃGl$(){if(this.ǃchB!==_499)throw new Error(_502);return this.ǃGli.length}ǃGvr(ne){if(ǃG.ǃbv(ne),this.ǃchB!==_499)throw new Error(_502);return this.ǃGlR.has(ne)}ǃGlr(ne){if(ǃG.ǃTH(ne),ne=Math.floor(ne),this.ǃchB!==_499)throw new Error(_502);if(0>ne||ne>=this.ǃGli.length)throw new RangeError(_504);return this.ǃGli[ne].name}ǃGlV(ne){if(ǃG.ǃTH(ne),ne=Math.floor(ne),this.ǃchB!==_499)throw new Error(_502);if(0>ne||ne>=this.ǃGli.length)throw new RangeError(_504);return this.ǃGli[ne].value}ǃcdw(ne){ǃG.ǃbv(ne);let ie=this.ǃGlR.get(ne);if(typeof ie===_501)throw new Error(_503);return ie}ǃGlA(ne){ǃG.ǃbv(ne);let ie=this.ǃGlb.get(ne);if(typeof ie===_501)throw new Error(_503);return ie}ǃr(ne){ǃG.ǃbv(ne),this.ǃclE=ne}ǃV(ne){ǃG.ǃbv(ne),this.ǃGck=ne}}}"use strict",window.ǃGlL=class extends ǃG.ǃDa{constructor(te,ne){if(super(),ǃG.ǃD_(te),ǃG.ǃbv(te.id),ǃG.ǃNv(te.c2id),ǃG.ǃQw(te.params),ǃG.ǃbv(ne),this.ǃcCQ=te.id,this.ǃGlD="number"==typeof te.c2id?Math.floor(te.c2id):null,this.ǃGl_=ne,this.ǃGlt=!!te.isDeprecated,this.ǃGlP=!!te.highlight,this.ǃcQJ=null,this.ǃGlj=[],this.ǃGld=new Map,this.ǃGlE=new Map,this.ǃGck="",te.params){let ie=0;for(let me of te.params)this.ǃGle(me,ie++)}}ǃGlk(){if(this.ǃGck=lang(".description"),this.ǃGck===ǃG.ǃi.ǃcMT)throw new Error(`ACE language string 'description' missing for '${this.ǃcCQ}'`);if(this.ǃGlj.length){ǃG.ǃi.ǃT(".params");for(let te of this.ǃGlj)te.ǃGlk();ǃG.ǃi.ǃW()}}ǃGlp(te){ǃG.ǃbv(te);te.toLowerCase();return this.ǃGl_.toLowerCase().includes(te)||this.ǃGck.toLowerCase().includes(te)}ǃGle(te,ne){ǃG.ǃD_(te),ǃG.ǃTH(ne);let ie=ǃG.ǃX(ǃGlm,te,ne);if(this.ǃGld.has(ie.ǃEK()))throw new Error(`duplicate parameter ID '${ie.ǃEK()}'`);if(this.ǃGlE.has(ie.ǃGlX()))throw new Error(`duplicate parameter C2 ID '${ie.ǃGlX()}'`);this.ǃGlj.push(ie),this.ǃGld.set(ie.ǃEK(),ie),this.ǃGlE.set(ie.ǃGlX(),ie)}ǃEK(){return this.ǃcCQ}ǃGlX(){return this.ǃGlD}ǃGlf(){return this.ǃGl_}ǃGly(){return!!this.ǃGlj.length}ǃmC(){return this.ǃGlj.length}ǃmh(te){if(ǃG.ǃTH(te),te=Math.floor(te),0>te||te>=this.ǃGlj.length)throw new RangeError("invalid parameter index");return this.ǃGlj[te]}*ǃc_L(){for(let te of this.ǃGlj)yield te}ǃGFC(te){return ǃG.ǃbv(te),this.ǃGld.has(te)}ǃGFh(te){ǃG.ǃbv(te);let ne=this.ǃGld.get(te);if(!ne)throw new Error(`cannot find parameter with id '${te}'`);return ne}ǃGFz(te){return ǃG.ǃTH(te),te=Math.floor(te),this.ǃGlE.has(te)}ǃGFF(te){ǃG.ǃTH(te),te=Math.floor(te);let ne=this.ǃGlE.get(te);if(!ne)throw new Error(`cannot find parameter with C2 id '${te}'`);return ne}ǃGlB(){return this.ǃGlt}ǃcTr(te){this.ǃGlP=!!te}ǃGlW(){return this.ǃGlP}ǃkQ(){return this.ǃGck}ǃciV(te){ǃG.ǃmL(te,ǃG.ǃGD.ǃXY),this.ǃcQJ=te}ǃmy(){return this.ǃcQJ}},"use strict";{const _505="no display text to parse",ee=/\{(\d+)\}/g,te=/\{my\}/g,ne=/\{\.\.\.\}/g;window.ǃGFq=class extends ǃGlL{constructor(me,ae){super(me,ae),ǃG.ǃbv(me.scriptName),this.ǃGlu=me.scriptName,this.ǃGlU="",this.ǃGlv="",this.ǃGlq=null,this.ǃGla=!1,this.ǃGlg=!1,this.ǃGlN=!1}ǃGlk(){if(super.ǃGlk(),this.ǃGlU=lang(".list-name"),this.ǃGlv=lang(".display-text"),this.ǃGlU===ǃG.ǃi.ǃcMT)throw new Error(`ACE language string 'list-name' missing for '${this.ǃcCQ}'`);if(this.ǃGlv===ǃG.ǃi.ǃcMT)throw new Error(`ACE language string 'display-text' missing for '${this.ǃcCQ}'`);let me=0;for(let ae=this.ǃGlj.length,de;meme;++me){let ae="{"+me+"}";if(this.ǃGlv.includes(ae))throw new Error(`display text for '${this.ǃEK()}' has incorrect placeholder '${ae}'`)}}ǃGlp(me){if(ǃG.ǃbv(me),super.ǃGlp(me))return!0;me.toLowerCase();return this.ǃGlU.toLowerCase().includes(me)||this.ǃGlv.toLowerCase().includes(me)}ǃGlK(){if(!this.ǃGlq){assert(this.ǃGlv,_505);let me=new ǃG.ǃmZ(this.ǃGlv).ǃcPl(),ae=me.replace(ee,"");ae!==me&&(this.ǃGla=!0),me=ae.replace(te,""),me!==ae&&(this.ǃGlg=!0),ae=me.replace(ne,()=>``),ae!==me&&(this.ǃGla=!0,this.ǃGlN=!0);let de=document.createElement("template");de.innerHTML=ae,this.ǃGlq=de.content}}ǃcdi(){if(!this.ǃGlv)throw new Error(_505);return this.ǃGlq||this.ǃGlK(),this.ǃGlq.cloneNode(!0)}ǃGln(){for(let me=0,ae=this.ǃGlj.length;mere?1:de=this.ǃGlj.length:me===this.ǃGlj.length}ǃmh(me){if(ǃG.ǃTH(me),me=Math.floor(me),0>me)throw new RangeError(_506);if(me