diff --git a/assets/index-41daed13.js b/assets/index-41daed13.js new file mode 100644 index 000000000..8fcfc43ac --- /dev/null +++ b/assets/index-41daed13.js @@ -0,0 +1,4077 @@ +var OM=Object.defineProperty;var AM=(e,t,r)=>t in e?OM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var oe=(e,t,r)=>(AM(e,typeof t!="symbol"?t+"":t,r),r);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();var en=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function pr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function PM(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}var LO={exports:{}},Vl={};/* +object-assign +(c) Sindre Sorhus +@license MIT +*/var M1=Object.getOwnPropertySymbols,RM=Object.prototype.hasOwnProperty,IM=Object.prototype.propertyIsEnumerable;function kM(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function NM(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var n=Object.getOwnPropertyNames(t).map(function(o){return t[o]});if(n.join("")!=="0123456789")return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(o){i[o]=o}),Object.keys(Object.assign({},i)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}var e0=NM()?Object.assign:function(e,t){for(var r,n=kM(e),i,o=1;o"u"||typeof MessageChannel!="function"){var u=null,l=null,c=function(){if(u!==null)try{var L=e.unstable_now();u(!0,L),u=null}catch(q){throw setTimeout(c,0),q}};t=function(L){u!==null?setTimeout(t,0,L):(u=L,setTimeout(c,0))},r=function(L,q){l=setTimeout(L,q)},n=function(){clearTimeout(l)},e.unstable_shouldYield=function(){return!1},i=e.unstable_forceFrameRate=function(){}}else{var f=window.setTimeout,h=window.clearTimeout;if(typeof console<"u"){var d=window.cancelAnimationFrame;typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),typeof d!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var v=!1,g=null,p=-1,m=5,y=0;e.unstable_shouldYield=function(){return e.unstable_now()>=y},i=function(){},e.unstable_forceFrameRate=function(L){0>L||125>>1,ye=L[ue];if(ye!==void 0&&0R(we,re))He!==void 0&&0>R(He,we)?(L[ue]=He,L[Ue]=re,ue=Ue):(L[ue]=we,L[Se]=re,ue=Se);else if(He!==void 0&&0>R(He,re))L[ue]=He,L[Ue]=re,ue=Ue;else break e}}return q}return null}function R(L,q){var re=L.sortIndex-q.sortIndex;return re!==0?re:L.id-q.id}var A=[],P=[],F=1,B=null,$=3,Y=!1,U=!1,z=!1;function ie(L){for(var q=w(P);q!==null;){if(q.callback===null)E(P);else if(q.startTime<=L)E(P),q.sortIndex=q.expirationTime,S(A,q);else break;q=w(P)}}function be(L){if(z=!1,ie(L),!U)if(w(A)!==null)U=!0,t(de);else{var q=w(P);q!==null&&r(be,q.startTime-L)}}function de(L,q){U=!1,z&&(z=!1,n()),Y=!0;var re=$;try{for(ie(q),B=w(A);B!==null&&(!(B.expirationTime>q)||L&&!e.unstable_shouldYield());){var ue=B.callback;if(typeof ue=="function"){B.callback=null,$=B.priorityLevel;var ye=ue(B.expirationTime<=q);q=e.unstable_now(),typeof ye=="function"?B.callback=ye:B===w(A)&&E(A),ie(q)}else E(A);B=w(A)}if(B!==null)var Se=!0;else{var we=w(P);we!==null&&r(be,we.startTime-q),Se=!1}return Se}finally{B=null,$=re,Y=!1}}var W=i;e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(L){L.callback=null},e.unstable_continueExecution=function(){U||Y||(U=!0,t(de))},e.unstable_getCurrentPriorityLevel=function(){return $},e.unstable_getFirstCallbackNode=function(){return w(A)},e.unstable_next=function(L){switch($){case 1:case 2:case 3:var q=3;break;default:q=$}var re=$;$=q;try{return L()}finally{$=re}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=W,e.unstable_runWithPriority=function(L,q){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var re=$;$=L;try{return q()}finally{$=re}},e.unstable_scheduleCallback=function(L,q,re){var ue=e.unstable_now();switch(typeof re=="object"&&re!==null?(re=re.delay,re=typeof re=="number"&&0ue?(L.sortIndex=re,S(P,L),w(A)===null&&L===w(P)&&(z?n():z=!0,r(be,re-ue))):(L.sortIndex=ye,S(A,L),U||Y||(U=!0,t(de))),L},e.unstable_wrapCallback=function(L){var q=$;return function(){var re=$;$=q;try{return L.apply(this,arguments)}finally{$=re}}}})(JO);QO.exports=JO;var HM=QO.exports;/** @license React v17.0.2 + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Yh=G,dt=e0,qt=HM;function Q(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),VM=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,j1=Object.prototype.hasOwnProperty,$1={},U1={};function WM(e){return j1.call(U1,e)?!0:j1.call($1,e)?!1:VM.test(e)?U1[e]=!0:($1[e]=!0,!1)}function qM(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function XM(e,t,r,n){if(t===null||typeof t>"u"||qM(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function wr(e,t,r,n,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var rr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){rr[e]=new wr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];rr[t]=new wr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){rr[e]=new wr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){rr[e]=new wr(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){rr[e]=new wr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){rr[e]=new wr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){rr[e]=new wr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){rr[e]=new wr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){rr[e]=new wr(e,5,!1,e.toLowerCase(),null,!1,!1)});var a0=/[\-:]([a-z])/g;function s0(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(a0,s0);rr[t]=new wr(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(a0,s0);rr[t]=new wr(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(a0,s0);rr[t]=new wr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){rr[e]=new wr(e,1,!1,e.toLowerCase(),null,!1,!1)});rr.xlinkHref=new wr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){rr[e]=new wr(e,1,!1,e.toLowerCase(),null,!0,!0)});function u0(e,t,r,n){var i=rr.hasOwnProperty(t)?rr[t]:null,o=i!==null?i.type===0:n?!1:!(!(2s||i[a]!==o[s])return` +`+i[a].replace(" at new "," at ");while(1<=a&&0<=s);break}}}finally{Lp=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Pu(e):""}function YM(e){switch(e.tag){case 5:return Pu(e.type);case 16:return Pu("Lazy");case 13:return Pu("Suspense");case 19:return Pu("SuspenseList");case 0:case 2:case 15:return e=gc(e.type,!1),e;case 11:return e=gc(e.type.render,!1),e;case 22:return e=gc(e.type._render,!1),e;case 1:return e=gc(e.type,!0),e;default:return""}}function Ha(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ki:return"Fragment";case No:return"Portal";case Du:return"Profiler";case l0:return"StrictMode";case Bu:return"Suspense";case zf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case f0:return(e.displayName||"Context")+".Consumer";case c0:return(e._context.displayName||"Context")+".Provider";case Kh:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case Zh:return Ha(e.type);case d0:return Ha(e._render);case h0:t=e._payload,e=e._init;try{return Ha(e(t))}catch{}}return null}function to(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function rA(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function KM(e){var t=rA(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,o=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){n=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function yc(e){e._valueTracker||(e._valueTracker=KM(e))}function nA(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=rA(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Hf(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function eg(e,t){var r=t.checked;return dt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function z1(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=to(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function iA(e,t){t=t.checked,t!=null&&u0(e,"checked",t,!1)}function tg(e,t){iA(e,t);var r=to(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?rg(e,t.type,r):t.hasOwnProperty("defaultValue")&&rg(e,t.type,to(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function H1(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function rg(e,t,r){(t!=="number"||Hf(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}function ZM(e){var t="";return Yh.Children.forEach(e,function(r){r!=null&&(t+=r)}),t}function ng(e,t){return e=dt({children:void 0},t),(t=ZM(t.children))&&(e.children=t),e}function Va(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i=r.length))throw Error(Q(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:to(r)}}function oA(e,t){var r=to(t.value),n=to(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function W1(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}var og={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function aA(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ag(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?aA(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var _c,sA=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,i){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,i)})}:e}(function(e,t){if(e.namespaceURI!==og.svg||"innerHTML"in e)e.innerHTML=t;else{for(_c=_c||document.createElement("div"),_c.innerHTML=""+t.valueOf().toString()+"",t=_c.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ol(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var ju={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},QM=["Webkit","ms","Moz","O"];Object.keys(ju).forEach(function(e){QM.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ju[t]=ju[e]})});function uA(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||ju.hasOwnProperty(e)&&ju[e]?(""+t).trim():t+"px"}function lA(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=uA(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var JM=dt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function sg(e,t){if(t){if(JM[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Q(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Q(60));if(!(typeof t.dangerouslySetInnerHTML=="object"&&"__html"in t.dangerouslySetInnerHTML))throw Error(Q(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Q(62))}}function ug(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function m0(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var lg=null,Wa=null,qa=null;function q1(e){if(e=Xl(e)){if(typeof lg!="function")throw Error(Q(280));var t=e.stateNode;t&&(t=nd(t),lg(e.stateNode,e.type,t))}}function cA(e){Wa?qa?qa.push(e):qa=[e]:Wa=e}function fA(){if(Wa){var e=Wa,t=qa;if(qa=Wa=null,q1(e),t)for(e=0;en?0:1<r;r++)t.push(e);return t}function Jh(e,t,r){e.pendingLanes|=t;var n=t-1;e.suspendedLanes&=n,e.pingedLanes&=n,e=e.eventTimes,t=31-ro(t),e[t]=r}var ro=Math.clz32?Math.clz32:vF,dF=Math.log,pF=Math.LN2;function vF(e){return e===0?32:31-(dF(e)/pF|0)|0}var mF=qt.unstable_UserBlockingPriority,gF=qt.unstable_runWithPriority,pf=!0;function yF(e,t,r,n){Lo||y0();var i=w0,o=Lo;Lo=!0;try{hA(i,e,t,r,n)}finally{(Lo=o)||_0()}}function _F(e,t,r,n){gF(mF,w0.bind(null,e,t,r,n))}function w0(e,t,r,n){if(pf){var i;if((i=(t&4)===0)&&0=Uu),nS=String.fromCharCode(32),iS=!1;function PA(e,t){switch(e){case"keyup":return GF.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function RA(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Na=!1;function HF(e,t){switch(e){case"compositionend":return RA(t);case"keypress":return t.which!==32?null:(iS=!0,nS);case"textInput":return e=t.data,e===nS&&iS?null:e;default:return null}}function VF(e,t){if(Na)return e==="compositionend"||!A0&&PA(e,t)?(e=OA(),vf=T0=Fi=null,Na=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=uS(r)}}function LA(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?LA(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function cS(){for(var e=window,t=Hf();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Hf(e.document)}return t}function pg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var tD=bi&&"documentMode"in document&&11>=document.documentMode,La=null,vg=null,zu=null,mg=!1;function fS(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;mg||La==null||La!==Hf(n)||(n=La,"selectionStart"in n&&pg(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),zu&&fl(zu,n)||(zu=n,n=Xf(vg,"onSelect"),0Fa||(e.current=yg[Fa],yg[Fa]=null,Fa--)}function xt(e,t){Fa++,yg[Fa]=e.current,e.current=t}var no={},hr=po(no),kr=po(!1),Yo=no;function ss(e,t){var r=e.type.contextTypes;if(!r)return no;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in r)i[o]=t[o];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Nr(e){return e=e.childContextTypes,e!=null}function Zf(){lt(kr),lt(hr)}function xS(e,t,r){if(hr.current!==no)throw Error(Q(168));xt(hr,t),xt(kr,r)}function GA(e,t,r){var n=e.stateNode;if(e=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in e))throw Error(Q(108,Ha(t)||"Unknown",i));return dt({},r,n)}function gf(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||no,Yo=hr.current,xt(hr,e),xt(kr,kr.current),!0}function bS(e,t,r){var n=e.stateNode;if(!n)throw Error(Q(169));r?(e=GA(e,t,Yo),n.__reactInternalMemoizedMergedChildContext=e,lt(kr),lt(hr),xt(hr,e)):lt(kr),xt(kr,r)}var R0=null,Go=null,iD=qt.unstable_runWithPriority,I0=qt.unstable_scheduleCallback,_g=qt.unstable_cancelCallback,oD=qt.unstable_shouldYield,SS=qt.unstable_requestPaint,xg=qt.unstable_now,aD=qt.unstable_getCurrentPriorityLevel,id=qt.unstable_ImmediatePriority,zA=qt.unstable_UserBlockingPriority,HA=qt.unstable_NormalPriority,VA=qt.unstable_LowPriority,WA=qt.unstable_IdlePriority,qp={},sD=SS!==void 0?SS:function(){},hi=null,yf=null,Xp=!1,wS=xg(),cr=1e4>wS?xg:function(){return xg()-wS};function us(){switch(aD()){case id:return 99;case zA:return 98;case HA:return 97;case VA:return 96;case WA:return 95;default:throw Error(Q(332))}}function qA(e){switch(e){case 99:return id;case 98:return zA;case 97:return HA;case 96:return VA;case 95:return WA;default:throw Error(Q(332))}}function Ko(e,t){return e=qA(e),iD(e,t)}function dl(e,t,r){return e=qA(e),I0(e,t,r)}function ti(){if(yf!==null){var e=yf;yf=null,_g(e)}XA()}function XA(){if(!Xp&&hi!==null){Xp=!0;var e=0;try{var t=hi;Ko(99,function(){for(;eE?(R=w,w=null):R=w.sibling;var A=h(p,w,y[E],_);if(A===null){w===null&&(w=R);break}e&&w&&A.alternate===null&&t(p,w),m=o(A,m,E),S===null?x=A:S.sibling=A,S=A,w=R}if(E===y.length)return r(p,w),x;if(w===null){for(;EE?(R=w,w=null):R=w.sibling;var P=h(p,w,A.value,_);if(P===null){w===null&&(w=R);break}e&&w&&P.alternate===null&&t(p,w),m=o(P,m,E),S===null?x=P:S.sibling=P,S=P,w=R}if(A.done)return r(p,w),x;if(w===null){for(;!A.done;E++,A=y.next())A=f(p,A.value,_),A!==null&&(m=o(A,m,E),S===null?x=A:S.sibling=A,S=A);return x}for(w=n(p,w);!A.done;E++,A=y.next())A=d(w,p,E,A.value,_),A!==null&&(e&&A.alternate!==null&&w.delete(A.key===null?E:A.key),m=o(A,m,E),S===null?x=A:S.sibling=A,S=A);return e&&w.forEach(function(F){return t(p,F)}),x}return function(p,m,y,_){var x=typeof y=="object"&&y!==null&&y.type===ki&&y.key===null;x&&(y=y.props.children);var S=typeof y=="object"&&y!==null;if(S)switch(y.$$typeof){case Au:e:{for(S=y.key,x=m;x!==null;){if(x.key===S){switch(x.tag){case 7:if(y.type===ki){r(p,x.sibling),m=i(x,y.props.children),m.return=p,p=m;break e}break;default:if(x.elementType===y.type){r(p,x.sibling),m=i(x,y.props),m.ref=su(p,x,y),m.return=p,p=m;break e}}r(p,x);break}else t(p,x);x=x.sibling}y.type===ki?(m=Ja(y.props.children,p.mode,_,y.key),m.return=p,p=m):(_=Sf(y.type,y.key,y.props,null,p.mode,_),_.ref=su(p,m,y),_.return=p,p=_)}return a(p);case No:e:{for(x=y.key;m!==null;){if(m.key===x)if(m.tag===4&&m.stateNode.containerInfo===y.containerInfo&&m.stateNode.implementation===y.implementation){r(p,m.sibling),m=i(m,y.children||[]),m.return=p,p=m;break e}else{r(p,m);break}else t(p,m);m=m.sibling}m=ev(y,p.mode,_),m.return=p,p=m}return a(p)}if(typeof y=="string"||typeof y=="number")return y=""+y,m!==null&&m.tag===6?(r(p,m.sibling),m=i(m,y),m.return=p,p=m):(r(p,m),m=Jp(y,p.mode,_),m.return=p,p=m),a(p);if(Sc(y))return v(p,m,y,_);if(tu(y))return g(p,m,y,_);if(S&&wc(p,y),typeof y>"u"&&!x)switch(p.tag){case 1:case 22:case 0:case 11:case 15:throw Error(Q(152,Ha(p.type)||"Component"))}return r(p,m)}}var rh=JA(!0),eP=JA(!1),Yl={},zn=po(Yl),vl=po(Yl),ml=po(Yl);function Fo(e){if(e===Yl)throw Error(Q(174));return e}function Sg(e,t){switch(xt(ml,t),xt(vl,e),xt(zn,Yl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ag(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ag(t,e)}lt(zn),xt(zn,t)}function ls(){lt(zn),lt(vl),lt(ml)}function AS(e){Fo(ml.current);var t=Fo(zn.current),r=ag(t,e.type);t!==r&&(xt(vl,e),xt(zn,r))}function M0(e){vl.current===e&&(lt(zn),lt(vl))}var _t=po(0);function nh(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&64)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var vi=null,Bi=null,Hn=!1;function tP(e,t){var r=Jr(5,null,null,0);r.elementType="DELETED",r.type="DELETED",r.stateNode=t,r.return=e,r.flags=8,e.lastEffect!==null?(e.lastEffect.nextEffect=r,e.lastEffect=r):e.firstEffect=e.lastEffect=r}function PS(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,!0):!1;case 13:return!1;default:return!1}}function wg(e){if(Hn){var t=Bi;if(t){var r=t;if(!PS(e,t)){if(t=Xa(r.nextSibling),!t||!PS(e,t)){e.flags=e.flags&-1025|2,Hn=!1,vi=e;return}tP(vi,r)}vi=e,Bi=Xa(t.firstChild)}else e.flags=e.flags&-1025|2,Hn=!1,vi=e}}function RS(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;vi=e}function Ec(e){if(e!==vi)return!1;if(!Hn)return RS(e),Hn=!0,!1;var t=e.type;if(e.tag!==5||t!=="head"&&t!=="body"&&!gg(t,e.memoizedProps))for(t=Bi;t;)tP(e,t),t=Xa(t.nextSibling);if(RS(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Q(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){Bi=Xa(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Bi=null}}else Bi=vi?Xa(e.stateNode.nextSibling):null;return!0}function Yp(){Bi=vi=null,Hn=!1}var Ka=[];function F0(){for(var e=0;eo))throw Error(Q(301));o+=1,Jt=ur=null,t.updateQueue=null,Hu.current=hD,e=r(n,i)}while(Vu)}if(Hu.current=uh,t=ur!==null&&ur.next!==null,gl=0,Jt=ur=Ot=null,ih=!1,t)throw Error(Q(300));return e}function Do(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Jt===null?Ot.memoizedState=Jt=e:Jt=Jt.next=e,Jt}function sa(){if(ur===null){var e=Ot.alternate;e=e!==null?e.memoizedState:null}else e=ur.next;var t=Jt===null?Ot.memoizedState:Jt.next;if(t!==null)Jt=t,ur=e;else{if(e===null)throw Error(Q(310));ur=e,e={memoizedState:ur.memoizedState,baseState:ur.baseState,baseQueue:ur.baseQueue,queue:ur.queue,next:null},Jt===null?Ot.memoizedState=Jt=e:Jt=Jt.next=e}return Jt}function $n(e,t){return typeof t=="function"?t(e):t}function uu(e){var t=sa(),r=t.queue;if(r===null)throw Error(Q(311));r.lastRenderedReducer=e;var n=ur,i=n.baseQueue,o=r.pending;if(o!==null){if(i!==null){var a=i.next;i.next=o.next,o.next=a}n.baseQueue=i=o,r.pending=null}if(i!==null){i=i.next,n=n.baseState;var s=a=o=null,u=i;do{var l=u.lane;if((gl&l)===l)s!==null&&(s=s.next={lane:0,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null}),n=u.eagerReducer===e?u.eagerState:e(n,u.action);else{var c={lane:l,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null};s===null?(a=s=c,o=n):s=s.next=c,Ot.lanes|=l,Kl|=l}u=u.next}while(u!==null&&u!==i);s===null?o=n:s.next=a,Qr(n,t.memoizedState)||(xn=!0),t.memoizedState=n,t.baseState=o,t.baseQueue=s,r.lastRenderedState=n}return[t.memoizedState,r.dispatch]}function lu(e){var t=sa(),r=t.queue;if(r===null)throw Error(Q(311));r.lastRenderedReducer=e;var n=r.dispatch,i=r.pending,o=t.memoizedState;if(i!==null){r.pending=null;var a=i=i.next;do o=e(o,a.action),a=a.next;while(a!==i);Qr(o,t.memoizedState)||(xn=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),r.lastRenderedState=o}return[o,n]}function IS(e,t,r){var n=t._getVersion;n=n(t._source);var i=t._workInProgressVersionPrimary;if(i!==null?e=i===n:(e=e.mutableReadLanes,(e=(gl&e)===e)&&(t._workInProgressVersionPrimary=n,Ka.push(t))),e)return r(t._source);throw Ka.push(t),Error(Q(350))}function rP(e,t,r,n){var i=_r;if(i===null)throw Error(Q(349));var o=t._getVersion,a=o(t._source),s=Hu.current,u=s.useState(function(){return IS(i,t,r)}),l=u[1],c=u[0];u=Jt;var f=e.memoizedState,h=f.refs,d=h.getSnapshot,v=f.source;f=f.subscribe;var g=Ot;return e.memoizedState={refs:h,source:t,subscribe:n},s.useEffect(function(){h.getSnapshot=r,h.setSnapshot=l;var p=o(t._source);if(!Qr(a,p)){p=r(t._source),Qr(c,p)||(l(p),p=qi(g),i.mutableReadLanes|=p&i.pendingLanes),p=i.mutableReadLanes,i.entangledLanes|=p;for(var m=i.entanglements,y=p;0r?98:r,function(){e(!0)}),Ko(97<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=a.createElement(r,{is:n.is}):(e=a.createElement(r),r==="select"&&(a=e,n.multiple?a.multiple=!0:n.size&&(a.size=n.size))):e=a.createElementNS(e,r),e[Di]=t,e[Kf]=n,fP(e,t,!1,!1),t.stateNode=e,a=ug(r,n),r){case"dialog":ot("cancel",e),ot("close",e),i=n;break;case"iframe":case"object":case"embed":ot("load",e),i=n;break;case"video":case"audio":for(i=0;iNg&&(t.flags|=64,o=!0,fu(n,!1),t.lanes=33554432)}else{if(!o)if(e=nh(a),e!==null){if(t.flags|=64,o=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),fu(n,!0),n.tail===null&&n.tailMode==="hidden"&&!a.alternate&&!Hn)return t=t.lastEffect=n.lastEffect,t!==null&&(t.nextEffect=null),null}else 2*cr()-n.renderingStartTime>Ng&&r!==1073741824&&(t.flags|=64,o=!0,fu(n,!1),t.lanes=33554432);n.isBackwards?(a.sibling=t.child,t.child=a):(r=n.last,r!==null?r.sibling=a:t.child=a,n.last=a)}return n.tail!==null?(r=n.tail,n.rendering=r,n.tail=r.sibling,n.lastEffect=t.lastEffect,n.renderingStartTime=cr(),r.sibling=null,t=_t.current,xt(_t,o?t&1|2:t&1),r):null;case 23:case 24:return W0(),e!==null&&e.memoizedState!==null!=(t.memoizedState!==null)&&n.mode!=="unstable-defer-without-hiding"&&(t.flags|=4),null}throw Error(Q(156,t.tag))}function vD(e){switch(e.tag){case 1:Nr(e.type)&&Zf();var t=e.flags;return t&4096?(e.flags=t&-4097|64,e):null;case 3:if(ls(),lt(kr),lt(hr),F0(),t=e.flags,t&64)throw Error(Q(285));return e.flags=t&-4097|64,e;case 5:return M0(e),null;case 13:return lt(_t),t=e.flags,t&4096?(e.flags=t&-4097|64,e):null;case 19:return lt(_t),null;case 4:return ls(),null;case 10:return N0(e),null;case 23:case 24:return W0(),null;default:return null}}function G0(e,t){try{var r="",n=t;do r+=YM(n),n=n.return;while(n);var i=r}catch(o){i=` +Error generating stack: `+o.message+` +`+o.stack}return{value:e,source:t,stack:i}}function Ag(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var mD=typeof WeakMap=="function"?WeakMap:Map;function pP(e,t,r){r=Vi(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){ch||(ch=!0,Lg=n),Ag(e,t)},r}function vP(e,t,r){r=Vi(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var i=t.value;r.payload=function(){return Ag(e,t),n(i)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(r.callback=function(){typeof n!="function"&&(Un===null?Un=new Set([this]):Un.add(this),Ag(e,t));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),r}var gD=typeof WeakSet=="function"?WeakSet:Set;function HS(e){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(r){Yi(e,r)}else t.current=null}function yD(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(t.flags&256&&e!==null){var r=e.memoizedProps,n=e.memoizedState;e=t.stateNode,t=e.getSnapshotBeforeUpdate(t.elementType===t.type?r:yn(t.type,r),n),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:t.flags&256&&P0(t.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(Q(163))}function _D(e,t,r){switch(r.tag){case 0:case 11:case 15:case 22:if(t=r.updateQueue,t=t!==null?t.lastEffect:null,t!==null){e=t=t.next;do{if((e.tag&3)===3){var n=e.create;e.destroy=n()}e=e.next}while(e!==t)}if(t=r.updateQueue,t=t!==null?t.lastEffect:null,t!==null){e=t=t.next;do{var i=e;n=i.next,i=i.tag,i&4&&i&1&&(EP(r,e),OD(r,e)),e=n}while(e!==t)}return;case 1:e=r.stateNode,r.flags&4&&(t===null?e.componentDidMount():(n=r.elementType===r.type?t.memoizedProps:yn(r.type,t.memoizedProps),e.componentDidUpdate(n,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),t=r.updateQueue,t!==null&&TS(r,t,e);return;case 3:if(t=r.updateQueue,t!==null){if(e=null,r.child!==null)switch(r.child.tag){case 5:e=r.child.stateNode;break;case 1:e=r.child.stateNode}TS(r,t,e)}return;case 5:e=r.stateNode,t===null&&r.flags&4&&$A(r.type,r.memoizedProps)&&e.focus();return;case 6:return;case 4:return;case 12:return;case 13:r.memoizedState===null&&(r=r.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&_A(r))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(Q(163))}function VS(e,t){for(var r=e;;){if(r.tag===5){var n=r.stateNode;if(t)n=n.style,typeof n.setProperty=="function"?n.setProperty("display","none","important"):n.display="none";else{n=r.stateNode;var i=r.memoizedProps.style;i=i!=null&&i.hasOwnProperty("display")?i.display:null,n.style.display=uA("display",i)}}else if(r.tag===6)r.stateNode.nodeValue=t?"":r.memoizedProps;else if((r.tag!==23&&r.tag!==24||r.memoizedState===null||r===e)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}}function WS(e,t){if(Go&&typeof Go.onCommitFiberUnmount=="function")try{Go.onCommitFiberUnmount(R0,t)}catch{}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(e=t.updateQueue,e!==null&&(e=e.lastEffect,e!==null)){var r=e=e.next;do{var n=r,i=n.destroy;if(n=n.tag,i!==void 0)if(n&4)EP(t,r);else{n=t;try{i()}catch(o){Yi(n,o)}}r=r.next}while(r!==e)}break;case 1:if(HS(t),e=t.stateNode,typeof e.componentWillUnmount=="function")try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(o){Yi(t,o)}break;case 5:HS(t);break;case 4:mP(e,t)}}function qS(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function XS(e){return e.tag===5||e.tag===3||e.tag===4}function YS(e){e:{for(var t=e.return;t!==null;){if(XS(t))break e;t=t.return}throw Error(Q(160))}var r=t;switch(t=r.stateNode,r.tag){case 5:var n=!1;break;case 3:t=t.containerInfo,n=!0;break;case 4:t=t.containerInfo,n=!0;break;default:throw Error(Q(161))}r.flags&16&&(ol(t,""),r.flags&=-17);e:t:for(r=e;;){for(;r.sibling===null;){if(r.return===null||XS(r.return)){r=null;break e}r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue t;r.child.return=r,r=r.child}if(!(r.flags&2)){r=r.stateNode;break e}}n?Pg(e,r,t):Rg(e,r,t)}function Pg(e,t,r){var n=e.tag,i=n===5||n===6;if(i)e=i?e.stateNode:e.stateNode.instance,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Yf));else if(n!==4&&(e=e.child,e!==null))for(Pg(e,t,r),e=e.sibling;e!==null;)Pg(e,t,r),e=e.sibling}function Rg(e,t,r){var n=e.tag,i=n===5||n===6;if(i)e=i?e.stateNode:e.stateNode.instance,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(Rg(e,t,r),e=e.sibling;e!==null;)Rg(e,t,r),e=e.sibling}function mP(e,t){for(var r=t,n=!1,i,o;;){if(!n){n=r.return;e:for(;;){if(n===null)throw Error(Q(160));switch(i=n.stateNode,n.tag){case 5:o=!1;break e;case 3:i=i.containerInfo,o=!0;break e;case 4:i=i.containerInfo,o=!0;break e}n=n.return}n=!0}if(r.tag===5||r.tag===6){e:for(var a=e,s=r,u=s;;)if(WS(a,u),u.child!==null&&u.tag!==4)u.child.return=u,u=u.child;else{if(u===s)break e;for(;u.sibling===null;){if(u.return===null||u.return===s)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}o?(a=i,s=r.stateNode,a.nodeType===8?a.parentNode.removeChild(s):a.removeChild(s)):i.removeChild(r.stateNode)}else if(r.tag===4){if(r.child!==null){i=r.stateNode.containerInfo,o=!0,r.child.return=r,r=r.child;continue}}else if(WS(e,r),r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return,r.tag===4&&(n=!1)}r.sibling.return=r.return,r=r.sibling}}function Qp(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var n=r=r.next;do(n.tag&3)===3&&(e=n.destroy,n.destroy=void 0,e!==void 0&&e()),n=n.next;while(n!==r)}return;case 1:return;case 5:if(r=t.stateNode,r!=null){n=t.memoizedProps;var i=e!==null?e.memoizedProps:n;e=t.type;var o=t.updateQueue;if(t.updateQueue=null,o!==null){for(r[Kf]=n,e==="input"&&n.type==="radio"&&n.name!=null&&iA(r,n),ug(e,i),t=ug(e,n),i=0;ii&&(i=a),r&=~o}if(r=i,r=cr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*bD(r/1960))-r,10 component higher in the tree to provide a loading indicator or placeholder to display.`)}tr!==5&&(tr=2),u=G0(u,s),h=a;do{switch(h.tag){case 3:o=u,h.flags|=4096,t&=-t,h.lanes|=t;var S=pP(h,o,t);ES(h,S);break e;case 1:o=u;var w=h.type,E=h.stateNode;if(!(h.flags&64)&&(typeof w.getDerivedStateFromError=="function"||E!==null&&typeof E.componentDidCatch=="function"&&(Un===null||!Un.has(E)))){h.flags|=4096,t&=-t,h.lanes|=t;var R=vP(h,o,t);ES(h,R);break e}}h=h.return}while(h!==null)}wP(r)}catch(A){t=A,Bt===r&&r!==null&&(Bt=r=r.return);continue}break}while(1)}function bP(){var e=lh.current;return lh.current=uh,e===null?uh:e}function ku(e,t){var r=me;me|=16;var n=bP();_r===e&&fr===t||Qa(e,t);do try{wD();break}catch(i){xP(e,i)}while(1);if(k0(),me=r,lh.current=n,Bt!==null)throw Error(Q(261));return _r=null,fr=0,tr}function wD(){for(;Bt!==null;)SP(Bt)}function ED(){for(;Bt!==null&&!oD();)SP(Bt)}function SP(e){var t=TP(e.alternate,e,Zo);e.memoizedProps=e.pendingProps,t===null?wP(e):Bt=t,z0.current=null}function wP(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&2048){if(r=vD(t),r!==null){r.flags&=2047,Bt=r;return}e!==null&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}else{if(r=pD(r,t,Zo),r!==null){Bt=r;return}if(r=t,r.tag!==24&&r.tag!==23||r.memoizedState===null||Zo&1073741824||!(r.mode&4)){for(var n=0,i=r.child;i!==null;)n|=i.lanes|i.childLanes,i=i.sibling;r.childLanes=n}e!==null&&!(e.flags&2048)&&(e.firstEffect===null&&(e.firstEffect=t.firstEffect),t.lastEffect!==null&&(e.lastEffect!==null&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1a&&(s=a,a=S,S=s),s=lS(y,S),o=lS(y,a),s&&o&&(x.rangeCount!==1||x.anchorNode!==s.node||x.anchorOffset!==s.offset||x.focusNode!==o.node||x.focusOffset!==o.offset)&&(_=_.createRange(),_.setStart(s.node,s.offset),x.removeAllRanges(),S>a?(x.addRange(_),x.extend(o.node,o.offset)):(_.setEnd(o.node,o.offset),x.addRange(_)))))),_=[],x=y;x=x.parentNode;)x.nodeType===1&&_.push({element:x,left:x.scrollLeft,top:x.scrollTop});for(typeof y.focus=="function"&&y.focus(),y=0;y<_.length;y++)x=_[y],x.element.scrollLeft=x.left,x.element.scrollTop=x.top}pf=!!Hp,Vp=Hp=null,e.current=r,ae=n;do try{for(y=e;ae!==null;){var w=ae.flags;if(w&36&&_D(y,ae.alternate,ae),w&128){_=void 0;var E=ae.ref;if(E!==null){var R=ae.stateNode;switch(ae.tag){case 5:_=R;break;default:_=R}typeof E=="function"?E(_):E.current=_}}ae=ae.nextEffect}}catch(A){if(ae===null)throw Error(Q(330));Yi(ae,A),ae=ae.nextEffect}while(ae!==null);ae=null,sD(),me=i}else e.current=r;if(io)io=!1,Wu=e,Iu=t;else for(ae=n;ae!==null;)t=ae.nextEffect,ae.nextEffect=null,ae.flags&8&&(w=ae,w.sibling=null,w.stateNode=null),ae=t;if(n=e.pendingLanes,n===0&&(Un=null),n===1?e===Dg?qu++:(qu=0,Dg=e):qu=0,r=r.stateNode,Go&&typeof Go.onCommitFiberRoot=="function")try{Go.onCommitFiberRoot(R0,r,void 0,(r.current.flags&64)===64)}catch{}if(sn(e,cr()),ch)throw ch=!1,e=Lg,Lg=null,e;return me&8||ti(),null}function CD(){for(;ae!==null;){var e=ae.alternate;bf||Xu===null||(ae.flags&8?Y1(ae,Xu)&&(bf=!0):ae.tag===13&&xD(e,ae)&&Y1(ae,Xu)&&(bf=!0));var t=ae.flags;t&256&&yD(e,ae),!(t&512)||io||(io=!0,dl(97,function(){return vo(),null})),ae=ae.nextEffect}}function vo(){if(Iu!==90){var e=97cr()-V0?Qa(e,0):H0|=r),sn(e,t)}function RD(e,t){var r=e.stateNode;r!==null&&r.delete(t),t=0,t===0&&(t=e.mode,t&2?t&4?(di===0&&(di=As),t=Ra(62914560&~di),t===0&&(t=4194304)):t=us()===99?1:2:t=1),r=Ur(),e=sd(e,t),e!==null&&(Jh(e,t,r),sn(e,r))}var TP;TP=function(e,t,r){var n=t.lanes;if(e!==null)if(e.memoizedProps!==t.pendingProps||kr.current)xn=!0;else if(r&n)xn=!!(e.flags&16384);else{switch(xn=!1,t.tag){case 3:DS(t),Yp();break;case 5:AS(t);break;case 1:Nr(t.type)&&gf(t);break;case 4:Sg(t,t.stateNode.containerInfo);break;case 10:n=t.memoizedProps.value;var i=t.type._context;xt(Qf,i._currentValue),i._currentValue=n;break;case 13:if(t.memoizedState!==null)return r&t.child.childLanes?BS(e,t,r):(xt(_t,_t.current&1),t=mi(e,t,r),t!==null?t.sibling:null);xt(_t,_t.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&64){if(n)return zS(e,t,r);t.flags|=64}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),xt(_t,_t.current),n)break;return null;case 23:case 24:return t.lanes=0,Kp(e,t,r)}return mi(e,t,r)}else xn=!1;switch(t.lanes=0,t.tag){case 2:if(n=t.type,e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=ss(t,hr.current),Ya(t,r),i=B0(null,t,n,e,i,r),t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,Nr(n)){var o=!0;gf(t)}else o=!1;t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,L0(t);var a=n.getDerivedStateFromProps;typeof a=="function"&&th(t,n,a,e),i.updater=od,t.stateNode=i,i._reactInternals=t,bg(t,n,e,r),t=Cg(null,t,n,!0,o,r)}else t.tag=0,Or(null,t,i,r),t=t.child;return t;case 16:i=t.elementType;e:{switch(e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,o=i._init,i=o(i._payload),t.type=i,o=t.tag=kD(i),e=yn(i,e),o){case 0:t=Tg(null,t,i,e,r);break e;case 1:t=FS(null,t,i,e,r);break e;case 11:t=LS(null,t,i,e,r);break e;case 14:t=MS(null,t,i,yn(i.type,e),n,r);break e}throw Error(Q(306,i,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:yn(n,i),Tg(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:yn(n,i),FS(e,t,n,i,r);case 3:if(DS(t),n=t.updateQueue,e===null||n===null)throw Error(Q(282));if(n=t.pendingProps,i=t.memoizedState,i=i!==null?i.element:null,KA(e,t),pl(t,n,null,r),n=t.memoizedState.element,n===i)Yp(),t=mi(e,t,r);else{if(i=t.stateNode,(o=i.hydrate)&&(Bi=Xa(t.stateNode.containerInfo.firstChild),vi=t,o=Hn=!0),o){if(e=i.mutableSourceEagerHydrationData,e!=null)for(i=0;i"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(OP)}catch(e){console.error(e)}}OP(),ZO.exports=cn;var AP=ZO.exports;const Kn=pr(AP);const jD="_Title_main_xpe81_1",$D="_Title_buttonList_xpe81_8",UD="_Title_button_xpe81_8",GD="_Title_button_text_xpe81_41",zD="_Title_backup_background_xpe81_48",Dr={Title_main:jD,Title_buttonList:$D,Title_button:UD,Title_button_text:GD,Title_backup_background:zD};function _n(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n3?t.i-4:t.i:Array.isArray(e)?1:Z0(e)?2:Q0(e)?3:0}function es(e,t){return Is(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function HD(e,t){return Is(e)===2?e.get(t):e[t]}function PP(e,t,r){var n=Is(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function RP(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Z0(e){return KD&&e instanceof Map}function Q0(e){return ZD&&e instanceof Set}function To(e){return e.o||e.t}function J0(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=kP(e);delete t[ht];for(var r=ts(t),n=0;n1&&(e.set=e.add=e.clear=e.delete=VD),Object.freeze(e),t&&Qo(e,function(r,n){return ex(n,!0)},!0)),e}function VD(){_n(2)}function tx(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Vn(e){var t=Gg[e];return t||_n(18,e),t}function WD(e,t){Gg[e]||(Gg[e]=t)}function jg(){return yl}function rv(e,t){t&&(Vn("Patches"),e.u=[],e.s=[],e.v=t)}function hh(e){$g(e),e.p.forEach(qD),e.p=null}function $g(e){e===yl&&(yl=e.l)}function JS(e){return yl={p:[],l:yl,h:e,m:!0,_:0}}function qD(e){var t=e[ht];t.i===0||t.i===1?t.j():t.g=!0}function nv(e,t){t._=t.p.length;var r=t.p[0],n=e!==void 0&&e!==r;return t.h.O||Vn("ES5").S(t,e,n),n?(r[ht].P&&(hh(t),_n(4)),Si(e)&&(e=dh(t,e),t.l||ph(t,e)),t.u&&Vn("Patches").M(r[ht].t,e,t.u,t.s)):e=dh(t,r,[]),hh(t),t.u&&t.v(t.u,t.s),e!==IP?e:void 0}function dh(e,t,r){if(tx(t))return t;var n=t[ht];if(!n)return Qo(t,function(s,u){return ew(e,n,t,s,u,r)},!0),t;if(n.A!==e)return t;if(!n.P)return ph(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=J0(n.k):n.o,o=i,a=!1;n.i===3&&(o=new Set(i),i.clear(),a=!0),Qo(o,function(s,u){return ew(e,n,i,s,u,r,a)}),ph(e,i,!1),r&&e.u&&Vn("Patches").N(n,r,e.u,e.s)}return n.o}function ew(e,t,r,n,i,o,a){if(ao(i)){var s=dh(e,i,o&&t&&t.i!==3&&!es(t.R,n)?o.concat(n):void 0);if(PP(r,n,s),!ao(s))return;e.m=!1}else a&&r.add(i);if(Si(i)&&!tx(i)){if(!e.h.D&&e._<1)return;dh(e,i),t&&t.A.l||ph(e,i)}}function ph(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&ex(t,r)}function iv(e,t){var r=e[ht];return(r?To(r):e)[t]}function tw(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function Ni(e){e.P||(e.P=!0,e.l&&Ni(e.l))}function ov(e){e.o||(e.o=J0(e.t))}function Ug(e,t,r){var n=Z0(t)?Vn("MapSet").F(t,r):Q0(t)?Vn("MapSet").T(t,r):e.O?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:jg(),P:!1,I:!1,R:{},l:o,t:i,k:null,o:null,j:null,C:!1},u=s,l=_l;a&&(u=[s],l=Nu);var c=Proxy.revocable(u,l),f=c.revoke,h=c.proxy;return s.k=h,s.j=f,h}(t,r):Vn("ES5").J(t,r);return(r?r.A:jg()).p.push(n),n}function XD(e){return ao(e)||_n(22,e),function t(r){if(!Si(r))return r;var n,i=r[ht],o=Is(r);if(i){if(!i.P&&(i.i<4||!Vn("ES5").K(i)))return i.t;i.I=!0,n=rw(r,o),i.I=!1}else n=rw(r,o);return Qo(n,function(a,s){i&&HD(i.t,a)===s||PP(n,a,t(s))}),o===3?new Set(n):n}(e)}function rw(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return J0(e)}function YD(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var u=this[ht];return _l.get(u,o)},set:function(u){var l=this[ht];_l.set(l,o,u)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][ht];if(!s.P)switch(s.i){case 5:n(s)&&Ni(s);break;case 4:r(s)&&Ni(s)}}}function r(o){for(var a=o.t,s=o.k,u=ts(s),l=u.length-1;l>=0;l--){var c=u[l];if(c!==ht){var f=a[c];if(f===void 0&&!es(a,c))return!0;var h=s[c],d=h&&h[ht];if(d?d.t!==f:!RP(h,f))return!0}}var v=!!a[ht];return u.length!==ts(a).length+(v?0:1)}function n(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var u=0;u1?m-1:0),_=1;_1?c-1:0),h=1;h=0;i--){var o=n[i];if(o.path.length===0&&o.op==="replace"){r=o.value;break}}i>-1&&(n=n.slice(i+1));var a=Vn("Patches").$;return ao(r)?a(r,n):this.produce(r,function(s){return a(s,n)})},e}(),zr=new JD,NP=zr.produce;zr.produceWithPatches.bind(zr);zr.setAutoFreeze.bind(zr);zr.setUseProxies.bind(zr);zr.applyPatches.bind(zr);zr.createDraft.bind(zr);zr.finishDraft.bind(zr);function Wt(e){"@babel/helpers - typeof";return Wt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wt(e)}function e3(e,t){if(Wt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Wt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function LP(e){var t=e3(e,"string");return Wt(t)=="symbol"?t:t+""}function Vr(e,t,r){return t=LP(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function aw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function sw(e){for(var t=1;t"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(sr(1));return r(MP)(e,t)}if(typeof e!="function")throw new Error(sr(2));var i=e,o=t,a=[],s=a,u=!1;function l(){s===a&&(s=a.slice())}function c(){if(u)throw new Error(sr(3));return o}function f(g){if(typeof g!="function")throw new Error(sr(4));if(u)throw new Error(sr(5));var p=!0;return l(),s.push(g),function(){if(p){if(u)throw new Error(sr(6));p=!1,l();var y=s.indexOf(g);s.splice(y,1),a=null}}}function h(g){if(!t3(g))throw new Error(sr(7));if(typeof g.type>"u")throw new Error(sr(8));if(u)throw new Error(sr(9));try{u=!0,o=i(o,g)}finally{u=!1}for(var p=a=s,m=0;m"u")throw new Error(sr(12));if(typeof r(void 0,{type:vh.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(sr(13))})}function n3(e){for(var t=Object.keys(e),r={},n=0;n"u")throw l&&l.type,new Error(sr(14));f[d]=p,c=c||p!==g}return c=c||o.length!==Object.keys(u).length,c?f:u}}function mh(){for(var e=arguments.length,t=new Array(e),r=0;r0&&o[o.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]-1}var H3=z3,V3=cd;function W3(e,t){var r=this.__data__,n=V3(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var q3=W3,X3=R3,Y3=B3,K3=U3,Z3=H3,Q3=q3;function ks(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=Q4}var fx=J4,e$=Jl,t$=fx,r$=la,n$="[object Arguments]",i$="[object Array]",o$="[object Boolean]",a$="[object Date]",s$="[object Error]",u$="[object Function]",l$="[object Map]",c$="[object Number]",f$="[object Object]",h$="[object RegExp]",d$="[object Set]",p$="[object String]",v$="[object WeakMap]",m$="[object ArrayBuffer]",g$="[object DataView]",y$="[object Float32Array]",_$="[object Float64Array]",x$="[object Int8Array]",b$="[object Int16Array]",S$="[object Int32Array]",w$="[object Uint8Array]",E$="[object Uint8ClampedArray]",T$="[object Uint16Array]",C$="[object Uint32Array]",at={};at[y$]=at[_$]=at[x$]=at[b$]=at[S$]=at[w$]=at[E$]=at[T$]=at[C$]=!0;at[n$]=at[i$]=at[m$]=at[o$]=at[g$]=at[a$]=at[s$]=at[u$]=at[l$]=at[c$]=at[f$]=at[h$]=at[d$]=at[p$]=at[v$]=!1;function O$(e){return r$(e)&&t$(e.length)&&!!at[e$(e)]}var A$=O$;function P$(e){return function(t){return e(t)}}var hx=P$,yh={exports:{}};yh.exports;(function(e,t){var r=UP,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===n,a=o&&r.process,s=function(){try{var u=i&&i.require&&i.require("util").types;return u||a&&a.binding&&a.binding("util")}catch{}}();e.exports=s})(yh,yh.exports);var dx=yh.exports,R$=A$,I$=hx,Sw=dx,ww=Sw&&Sw.isTypedArray,k$=ww?I$(ww):R$,XP=k$,N$=M4,L$=qP,M$=Ei,F$=lx,D$=cx,B$=XP,j$=Object.prototype,$$=j$.hasOwnProperty;function U$(e,t){var r=M$(e),n=!r&&L$(e),i=!r&&!n&&F$(e),o=!r&&!n&&!i&&B$(e),a=r||n||i||o,s=a?N$(e.length,String):[],u=s.length;for(var l in e)(t||$$.call(e,l))&&!(a&&(l=="length"||i&&(l=="offset"||l=="parent")||o&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||D$(l,u)))&&s.push(l);return s}var YP=U$,G$=Object.prototype;function z$(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||G$;return e===r}var px=z$;function H$(e,t){return function(r){return e(t(r))}}var KP=H$,V$=KP,W$=V$(Object.keys,Object),q$=W$,X$=px,Y$=q$,K$=Object.prototype,Z$=K$.hasOwnProperty;function Q$(e){if(!X$(e))return Y$(e);var t=[];for(var r in Object(e))Z$.call(e,r)&&r!="constructor"&&t.push(r);return t}var J$=Q$,eU=zP,tU=fx;function rU(e){return e!=null&&tU(e.length)&&!eU(e)}var ZP=rU,nU=YP,iU=J$,oU=ZP;function aU(e){return oU(e)?nU(e):iU(e)}var vd=aU,sU=pd,uU=vd;function lU(e,t){return e&&sU(t,uU(t),e)}var cU=lU;function fU(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var hU=fU,dU=ri,pU=px,vU=hU,mU=Object.prototype,gU=mU.hasOwnProperty;function yU(e){if(!dU(e))return vU(e);var t=pU(e),r=[];for(var n in e)n=="constructor"&&(t||!gU.call(e,n))||r.push(n);return r}var _U=yU,xU=YP,bU=_U,SU=ZP;function wU(e){return SU(e)?xU(e,!0):bU(e)}var vx=wU,EU=pd,TU=vx;function CU(e,t){return e&&EU(t,TU(t),e)}var OU=CU,_h={exports:{}};_h.exports;(function(e,t){var r=Tn,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===n,a=o?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;function u(l,c){if(c)return l.slice();var f=l.length,h=s?s(f):new l.constructor(f);return l.copy(h),h}e.exports=u})(_h,_h.exports);var AU=_h.exports;function PU(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r(e[e.say=0]="say",e[e.changeBg=1]="changeBg",e[e.changeFigure=2]="changeFigure",e[e.bgm=3]="bgm",e[e.video=4]="video",e[e.pixi=5]="pixi",e[e.pixiInit=6]="pixiInit",e[e.intro=7]="intro",e[e.miniAvatar=8]="miniAvatar",e[e.changeScene=9]="changeScene",e[e.choose=10]="choose",e[e.end=11]="end",e[e.setComplexAnimation=12]="setComplexAnimation",e[e.setFilter=13]="setFilter",e[e.label=14]="label",e[e.jumpLabel=15]="jumpLabel",e[e.chooseLabel=16]="chooseLabel",e[e.setVar=17]="setVar",e[e.if=18]="if",e[e.callScene=19]="callScene",e[e.showVars=20]="showVars",e[e.unlockCg=21]="unlockCg",e[e.unlockBgm=22]="unlockBgm",e[e.filmMode=23]="filmMode",e[e.setTextbox=24]="setTextbox",e[e.setAnimation=25]="setAnimation",e[e.playEffect=26]="playEffect",e[e.setTempAnimation=27]="setTempAnimation",e[e.comment=28]="comment",e[e.setTransform=29]="setTransform",e[e.setTransition=30]="setTransition",e[e.getUserInput=31]="getUserInput",e[e.applyStyle=32]="applyStyle",e))(ke||{});const Ac={BGMAIN:"bg-main",FIG_C:"fig-center",FIG_L:"fig-left",FIG_R:"fig-right"},Yg="none",f2={oldBgName:"",bgName:"",figName:"",figNameLeft:"",figNameRight:"",freeFigure:[],figureAssociatedAnimation:[],showText:"",showTextSize:-1,showName:"",command:"",choose:[],vocal:"",playVocal:"",vocalVolume:100,bgm:{src:"",enter:0,volume:100},uiSe:"",miniAvatar:"",GameVar:{},effects:[],bgFilter:"",bgTransform:"",PerformList:[],currentDialogKey:"initial",live2dMotion:[],live2dExpression:[],currentConcatDialogPrev:"",enableFilm:"",isDisableTextbox:!1,replacedUIlable:{},figureMetaData:{}},yx=ld({name:"stage",initialState:bt(f2),reducers:{resetStageState:(e,t)=>{Object.assign(e,t.payload)},setStage:(e,t)=>{e[t.payload.key]=t.payload.value},setStageVar:(e,t)=>{e.GameVar[t.payload.key]=t.payload.value},updateEffect:(e,t)=>{const{target:r,transform:n}=t.payload;if(![Ac.BGMAIN,Ac.FIG_C,Ac.FIG_L,Ac.FIG_R,...e.freeFigure.map(a=>a.key)].includes(r))return;const o=e.effects.findIndex(a=>a.target===r);o>=0?e.effects[o].transform=n:e.effects.push({target:r,transform:n})},removeEffectByTargetId:(e,t)=>{const r=e.effects.findIndex(n=>n.target===t.payload);r>=0&&e.effects.splice(r,1)},addPerform:(e,t)=>{if(e.PerformList.findIndex(n=>n.id===t.payload.id)>-1){const n=t.payload.id;for(let i=0;i{for(let r=0;r{e.PerformList.splice(0,e.PerformList.length)},removeAllPixiPerforms:(e,t)=>{for(let r=0;r{const r=e.freeFigure,n=t.payload,i=r.findIndex(o=>o.key===n.key);if(i>=0)if(n.name===""){r.splice(i,1);const o=e.figureAssociatedAnimation.findIndex(a=>a.targetId===n.key);e.figureAssociatedAnimation.splice(o,1)}else r[i].basePosition=n.basePosition,r[i].name=n.name;else n.name!==""&&r.push(n)},setLive2dMotion:(e,t)=>{const{target:r,motion:n,overrideBounds:i}=t.payload,o=e.live2dMotion.findIndex(a=>a.target===r);o<0?e.live2dMotion.push({target:r,motion:n,overrideBounds:i}):(e.live2dMotion[o].motion=n,e.live2dMotion[o].overrideBounds=i)},setLive2dExpression:(e,t)=>{const{target:r,expression:n}=t.payload,i=e.live2dExpression.findIndex(o=>o.target===r);i<0?e.live2dExpression.push({target:r,expression:n}):e.live2dExpression[i].expression=n},replaceUIlable:(e,t)=>{e.replacedUIlable[t.payload[0]]=t.payload[1]},setFigureMetaData:(e,t)=>{t.payload[3]?e.figureMetaData[t.payload[0]]&&delete e.figureMetaData[t.payload[0]]:(e.figureMetaData[t.payload[0]]||(e.figureMetaData[t.payload[0]]={}),e.figureMetaData[t.payload[0]][t.payload[1]]=t.payload[2])}}}),{resetStageState:gd,setStage:Te,setStageVar:h2}=yx.actions,Mt=yx.actions,KG=yx.reducer;function Pc(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var d2={exports:{}};/*! + localForage -- Offline Storage, Improved + Version 1.10.0 + https://localforage.github.io/localForage + (c) 2013-2017 Mozilla, Apache License 2.0 +*/(function(e,t){(function(r){e.exports=r()})(function(){return function r(n,i,o){function a(l,c){if(!i[l]){if(!n[l]){var f=typeof Pc=="function"&&Pc;if(!c&&f)return f(l,!0);if(s)return s(l,!0);var h=new Error("Cannot find module '"+l+"'");throw h.code="MODULE_NOT_FOUND",h}var d=i[l]={exports:{}};n[l][0].call(d.exports,function(v){var g=n[l][1][v];return a(g||v)},d,d.exports,r,n,i,o)}return i[l].exports}for(var s=typeof Pc=="function"&&Pc,u=0;u"u"&&r(3);var f=Promise;function h(T,I){I&&T.then(function(O){I(null,O)},function(O){I(O)})}function d(T,I,O){typeof I=="function"&&T.then(I),typeof O=="function"&&T.catch(O)}function v(T){return typeof T!="string"&&(console.warn(T+" used as a key, but it is not a string."),T=String(T)),T}function g(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var p="local-forage-detect-blob-support",m=void 0,y={},_=Object.prototype.toString,x="readonly",S="readwrite";function w(T){for(var I=T.length,O=new ArrayBuffer(I),N=new Uint8Array(O),M=0;M=43)}}).catch(function(){return!1})}function R(T){return typeof m=="boolean"?f.resolve(m):E(T).then(function(I){return m=I,m})}function A(T){var I=y[T.name],O={};O.promise=new f(function(N,M){O.resolve=N,O.reject=M}),I.deferredOperations.push(O),I.dbReady?I.dbReady=I.dbReady.then(function(){return O.promise}):I.dbReady=O.promise}function P(T){var I=y[T.name],O=I.deferredOperations.pop();if(O)return O.resolve(),O.promise}function F(T,I){var O=y[T.name],N=O.deferredOperations.pop();if(N)return N.reject(I),N.promise}function B(T,I){return new f(function(O,N){if(y[T.name]=y[T.name]||q(),T.db)if(I)A(T),T.db.close();else return O(T.db);var M=[T.name];I&&M.push(T.version);var k=u.open.apply(u,M);I&&(k.onupgradeneeded=function(j){var H=k.result;try{H.createObjectStore(T.storeName),j.oldVersion<=1&&H.createObjectStore(p)}catch(X){if(X.name==="ConstraintError")console.warn('The database "'+T.name+'" has been upgraded from version '+j.oldVersion+" to version "+j.newVersion+', but the storage "'+T.storeName+'" already exists.');else throw X}}),k.onerror=function(j){j.preventDefault(),N(k.error)},k.onsuccess=function(){var j=k.result;j.onversionchange=function(H){H.target.close()},O(j),P(T)}})}function $(T){return B(T,!1)}function Y(T){return B(T,!0)}function U(T,I){if(!T.db)return!0;var O=!T.db.objectStoreNames.contains(T.storeName),N=T.versionT.db.version;if(N&&(T.version!==I&&console.warn('The database "'+T.name+`" can't be downgraded from version `+T.db.version+" to version "+T.version+"."),T.version=T.db.version),M||O){if(O){var k=T.db.version+1;k>T.version&&(T.version=k)}return!0}return!1}function z(T){return new f(function(I,O){var N=new FileReader;N.onerror=O,N.onloadend=function(M){var k=btoa(M.target.result||"");I({__local_forage_encoded_blob:!0,data:k,type:T.type})},N.readAsBinaryString(T)})}function ie(T){var I=w(atob(T.data));return c([I],{type:T.type})}function be(T){return T&&T.__local_forage_encoded_blob}function de(T){var I=this,O=I._initReady().then(function(){var N=y[I._dbInfo.name];if(N&&N.dbReady)return N.dbReady});return d(O,T,T),O}function W(T){A(T);for(var I=y[T.name],O=I.forages,N=0;N0&&(!T.db||k.name==="InvalidStateError"||k.name==="NotFoundError"))return f.resolve().then(function(){if(!T.db||k.name==="NotFoundError"&&!T.db.objectStoreNames.contains(T.storeName)&&T.version<=T.db.version)return T.db&&(T.version=T.db.version+1),Y(T)}).then(function(){return W(T).then(function(){L(T,I,O,N-1)})}).catch(O);O(k)}}function q(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function re(T){var I=this,O={db:null};if(T)for(var N in T)O[N]=T[N];var M=y[O.name];M||(M=q(),y[O.name]=M),M.forages.push(I),I._initReady||(I._initReady=I.ready,I.ready=de);var k=[];function j(){return f.resolve()}for(var H=0;H>4,ee[M++]=(j&15)<<4|H>>2,ee[M++]=(H&3)<<6|X&63;return K}function Cp(T){var I=new Uint8Array(T),O="",N;for(N=0;N>2],O+=ct[(I[N]&3)<<4|I[N+1]>>4],O+=ct[(I[N+1]&15)<<2|I[N+2]>>6],O+=ct[I[N+2]&63];return I.length%3===2?O=O.substring(0,O.length-1)+"=":I.length%3===1&&(O=O.substring(0,O.length-2)+"=="),O}function zL(T,I){var O="";if(T&&(O=O1.call(T)),T&&(O==="[object ArrayBuffer]"||T.buffer&&O1.call(T.buffer)==="[object ArrayBuffer]")){var N,M=mr;T instanceof ArrayBuffer?(N=T,M+=Ti):(N=T.buffer,O==="[object Int8Array]"?M+=Ks:O==="[object Uint8Array]"?M+=Zs:O==="[object Uint8ClampedArray]"?M+=Qs:O==="[object Int16Array]"?M+=x1:O==="[object Uint16Array]"?M+=S1:O==="[object Int32Array]"?M+=b1:O==="[object Uint32Array]"?M+=w1:O==="[object Float32Array]"?M+=E1:O==="[object Float64Array]"?M+=T1:I(new Error("Failed to get type for BinaryArray"))),I(M+Cp(N))}else if(O==="[object Blob]"){var k=new FileReader;k.onload=function(){var j=ir+T.type+"~"+Cp(this.result);I(mr+va+j)},k.readAsArrayBuffer(T)}else try{I(JSON.stringify(T))}catch(j){console.error("Couldn't convert value into a JSON string: ",T),I(null,j)}}function HL(T){if(T.substring(0,Rn)!==mr)return JSON.parse(T);var I=T.substring(C1),O=T.substring(Rn,C1),N;if(O===va&&Me.test(I)){var M=I.match(Me);N=M[1],I=I.substring(M[0].length)}var k=A1(I);switch(O){case Ti:return k;case va:return c([k],{type:N});case Ks:return new Int8Array(k);case Zs:return new Uint8Array(k);case Qs:return new Uint8ClampedArray(k);case x1:return new Int16Array(k);case S1:return new Uint16Array(k);case b1:return new Int32Array(k);case w1:return new Uint32Array(k);case E1:return new Float32Array(k);case T1:return new Float64Array(k);default:throw new Error("Unkown type: "+O)}}var Op={serialize:zL,deserialize:HL,stringToBuffer:A1,bufferToString:Cp};function P1(T,I,O,N){T.executeSql("CREATE TABLE IF NOT EXISTS "+I.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],O,N)}function VL(T){var I=this,O={db:null};if(T)for(var N in T)O[N]=typeof T[N]!="string"?T[N].toString():T[N];var M=new f(function(k,j){try{O.db=openDatabase(O.name,String(O.version),O.description,O.size)}catch(H){return j(H)}O.db.transaction(function(H){P1(H,O,function(){I._dbInfo=O,k()},function(X,K){j(K)})},j)});return O.serializer=Op,M}function Ci(T,I,O,N,M,k){T.executeSql(O,N,M,function(j,H){H.code===H.SYNTAX_ERR?j.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[I.storeName],function(X,K){K.rows.length?k(X,H):P1(X,I,function(){X.executeSql(O,N,M,k)},k)},k):k(j,H)},k)}function WL(T,I){var O=this;T=v(T);var N=new f(function(M,k){O.ready().then(function(){var j=O._dbInfo;j.db.transaction(function(H){Ci(H,j,"SELECT * FROM "+j.storeName+" WHERE key = ? LIMIT 1",[T],function(X,K){var ee=K.rows.length?K.rows.item(0).value:null;ee&&(ee=j.serializer.deserialize(ee)),M(ee)},function(X,K){k(K)})})}).catch(k)});return h(N,I),N}function qL(T,I){var O=this,N=new f(function(M,k){O.ready().then(function(){var j=O._dbInfo;j.db.transaction(function(H){Ci(H,j,"SELECT * FROM "+j.storeName,[],function(X,K){for(var ee=K.rows,le=ee.length,Ce=0;Ce0){j(R1.apply(M,[T,X,O,N-1]));return}H(Ce)}})})}).catch(H)});return h(k,O),k}function XL(T,I,O){return R1.apply(this,[T,I,O,1])}function YL(T,I){var O=this;T=v(T);var N=new f(function(M,k){O.ready().then(function(){var j=O._dbInfo;j.db.transaction(function(H){Ci(H,j,"DELETE FROM "+j.storeName+" WHERE key = ?",[T],function(){M()},function(X,K){k(K)})})}).catch(k)});return h(N,I),N}function KL(T){var I=this,O=new f(function(N,M){I.ready().then(function(){var k=I._dbInfo;k.db.transaction(function(j){Ci(j,k,"DELETE FROM "+k.storeName,[],function(){N()},function(H,X){M(X)})})}).catch(M)});return h(O,T),O}function ZL(T){var I=this,O=new f(function(N,M){I.ready().then(function(){var k=I._dbInfo;k.db.transaction(function(j){Ci(j,k,"SELECT COUNT(key) as c FROM "+k.storeName,[],function(H,X){var K=X.rows.item(0).c;N(K)},function(H,X){M(X)})})}).catch(M)});return h(O,T),O}function QL(T,I){var O=this,N=new f(function(M,k){O.ready().then(function(){var j=O._dbInfo;j.db.transaction(function(H){Ci(H,j,"SELECT key FROM "+j.storeName+" WHERE id = ? LIMIT 1",[T+1],function(X,K){var ee=K.rows.length?K.rows.item(0).key:null;M(ee)},function(X,K){k(K)})})}).catch(k)});return h(N,I),N}function JL(T){var I=this,O=new f(function(N,M){I.ready().then(function(){var k=I._dbInfo;k.db.transaction(function(j){Ci(j,k,"SELECT key FROM "+k.storeName,[],function(H,X){for(var K=[],ee=0;ee '__WebKitDatabaseInfoTable__'",[],function(M,k){for(var j=[],H=0;H0}function aM(T){var I=this,O={};if(T)for(var N in T)O[N]=T[N];return O.keyPrefix=I1(T,I._defaultConfig),oM()?(I._dbInfo=O,O.serializer=Op,f.resolve()):f.reject()}function sM(T){var I=this,O=I.ready().then(function(){for(var N=I._dbInfo.keyPrefix,M=localStorage.length-1;M>=0;M--){var k=localStorage.key(M);k.indexOf(N)===0&&localStorage.removeItem(k)}});return h(O,T),O}function uM(T,I){var O=this;T=v(T);var N=O.ready().then(function(){var M=O._dbInfo,k=localStorage.getItem(M.keyPrefix+T);return k&&(k=M.serializer.deserialize(k)),k});return h(N,I),N}function lM(T,I){var O=this,N=O.ready().then(function(){for(var M=O._dbInfo,k=M.keyPrefix,j=k.length,H=localStorage.length,X=1,K=0;K=0;j--){var H=localStorage.key(j);H.indexOf(k)===0&&localStorage.removeItem(H)}}):M=f.reject("Invalid arguments"),h(M,I),M}var mM={_driver:"localStorageWrapper",_initStorage:aM,_support:nM(),iterate:lM,getItem:uM,setItem:pM,removeItem:dM,clear:sM,length:hM,key:cM,keys:fM,dropInstance:vM},gM=function(I,O){return I===O||typeof I=="number"&&typeof O=="number"&&isNaN(I)&&isNaN(O)},yM=function(I,O){for(var N=I.length,M=0;M"u"?"undefined":o(O))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var N in O){if(N==="storeName"&&(O[N]=O[N].replace(/\W/g,"_")),N==="version"&&typeof O[N]!="number")return new Error("Database version must be a number.");this._config[N]=O[N]}return"driver"in O&&O.driver?this.setDriver(this._config.driver):!0}else return typeof O=="string"?this._config[O]:this._config},T.prototype.defineDriver=function(O,N,M){var k=new f(function(j,H){try{var X=O._driver,K=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!O._driver){H(K);return}for(var ee=Ap.concat("_initStorage"),le=0,Ce=ee.length;le"u"}function QG(e){return e!==null&&!Kg(e)&&e.constructor!==null&&!Kg(e.constructor)&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function JG(e){return fa.call(e)==="[object ArrayBuffer]"}function e6(e){return typeof FormData<"u"&&e instanceof FormData}function t6(e){var t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&e.buffer instanceof ArrayBuffer,t}function r6(e){return typeof e=="string"}function n6(e){return typeof e=="number"}function v2(e){return e!==null&&typeof e=="object"}function Ef(e){if(fa.call(e)!=="[object Object]")return!1;var t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function i6(e){return fa.call(e)==="[object Date]"}function o6(e){return fa.call(e)==="[object File]"}function a6(e){return fa.call(e)==="[object Blob]"}function m2(e){return fa.call(e)==="[object Function]"}function s6(e){return v2(e)&&m2(e.pipe)}function u6(e){return typeof URLSearchParams<"u"&&e instanceof URLSearchParams}function l6(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function c6(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function bx(e,t){if(!(e===null||typeof e>"u"))if(typeof e!="object"&&(e=[e]),xx(e))for(var r=0,n=e.length;r"u"||(ya.isArray(u)?l=l+"[]":u=[u],ya.forEach(u,function(f){ya.isDate(f)?f=f.toISOString():ya.isObject(f)&&(f=JSON.stringify(f)),o.push(jw(l)+"="+jw(f))}))}),i=o.join("&")}if(i){var a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t},d6=Wr;function yd(){this.handlers=[]}yd.prototype.use=function(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1};yd.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)};yd.prototype.forEach=function(t){d6.forEach(this.handlers,function(n){n!==null&&t(n)})};var p6=yd,v6=Wr,m6=function(t,r){v6.forEach(t,function(i,o){o!==r&&o.toUpperCase()===r.toUpperCase()&&(t[r]=i,delete t[o])})},y2=function(t,r,n,i,o){return t.config=r,n&&(t.code=n),t.request=i,t.response=o,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},t},cv,$w;function _2(){if($w)return cv;$w=1;var e=y2;return cv=function(r,n,i,o,a){var s=new Error(r);return e(s,n,i,o,a)},cv}var fv,Uw;function g6(){if(Uw)return fv;Uw=1;var e=_2();return fv=function(r,n,i){var o=i.config.validateStatus;!i.status||!o||o(i.status)?r(i):n(e("Request failed with status code "+i.status,i.config,null,i.request,i))},fv}var hv,Gw;function y6(){if(Gw)return hv;Gw=1;var e=Wr;return hv=e.isStandardBrowserEnv()?function(){return{write:function(n,i,o,a,s,u){var l=[];l.push(n+"="+encodeURIComponent(i)),e.isNumber(o)&&l.push("expires="+new Date(o).toGMTString()),e.isString(a)&&l.push("path="+a),e.isString(s)&&l.push("domain="+s),u===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(n){var i=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return i?decodeURIComponent(i[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),hv}var dv,zw;function _6(){return zw||(zw=1,dv=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}),dv}var pv,Hw;function x6(){return Hw||(Hw=1,pv=function(t,r){return r?t.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):t}),pv}var vv,Vw;function b6(){if(Vw)return vv;Vw=1;var e=_6(),t=x6();return vv=function(n,i){return n&&!e(i)?t(n,i):i},vv}var mv,Ww;function S6(){if(Ww)return mv;Ww=1;var e=Wr,t=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return mv=function(n){var i={},o,a,s;return n&&e.forEach(n.split(` +`),function(l){if(s=l.indexOf(":"),o=e.trim(l.substr(0,s)).toLowerCase(),a=e.trim(l.substr(s+1)),o){if(i[o]&&t.indexOf(o)>=0)return;o==="set-cookie"?i[o]=(i[o]?i[o]:[]).concat([a]):i[o]=i[o]?i[o]+", "+a:a}}),i},mv}var gv,qw;function w6(){if(qw)return gv;qw=1;var e=Wr;return gv=e.isStandardBrowserEnv()?function(){var r=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),i;function o(a){var s=a;return r&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return i=o(window.location.href),function(s){var u=e.isString(s)?o(s):s;return u.protocol===i.protocol&&u.host===i.host}}():function(){return function(){return!0}}(),gv}var yv,Xw;function _d(){if(Xw)return yv;Xw=1;function e(t){this.message=t}return e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,yv=e,yv}var _v,Yw;function Kw(){if(Yw)return _v;Yw=1;var e=Wr,t=g6(),r=y6(),n=g2,i=b6(),o=S6(),a=w6(),s=_2(),u=xd(),l=_d();return _v=function(f){return new Promise(function(d,v){var g=f.data,p=f.headers,m=f.responseType,y;function _(){f.cancelToken&&f.cancelToken.unsubscribe(y),f.signal&&f.signal.removeEventListener("abort",y)}e.isFormData(g)&&delete p["Content-Type"];var x=new XMLHttpRequest;if(f.auth){var S=f.auth.username||"",w=f.auth.password?unescape(encodeURIComponent(f.auth.password)):"";p.Authorization="Basic "+btoa(S+":"+w)}var E=i(f.baseURL,f.url);x.open(f.method.toUpperCase(),n(E,f.params,f.paramsSerializer),!0),x.timeout=f.timeout;function R(){if(x){var P="getAllResponseHeaders"in x?o(x.getAllResponseHeaders()):null,F=!m||m==="text"||m==="json"?x.responseText:x.response,B={data:F,status:x.status,statusText:x.statusText,headers:P,config:f,request:x};t(function(Y){d(Y),_()},function(Y){v(Y),_()},B),x=null}}if("onloadend"in x?x.onloadend=R:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.indexOf("file:")===0)||setTimeout(R)},x.onabort=function(){x&&(v(s("Request aborted",f,"ECONNABORTED",x)),x=null)},x.onerror=function(){v(s("Network Error",f,null,x)),x=null},x.ontimeout=function(){var F=f.timeout?"timeout of "+f.timeout+"ms exceeded":"timeout exceeded",B=f.transitional||u.transitional;f.timeoutErrorMessage&&(F=f.timeoutErrorMessage),v(s(F,f,B.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",x)),x=null},e.isStandardBrowserEnv()){var A=(f.withCredentials||a(E))&&f.xsrfCookieName?r.read(f.xsrfCookieName):void 0;A&&(p[f.xsrfHeaderName]=A)}"setRequestHeader"in x&&e.forEach(p,function(F,B){typeof g>"u"&&B.toLowerCase()==="content-type"?delete p[B]:x.setRequestHeader(B,F)}),e.isUndefined(f.withCredentials)||(x.withCredentials=!!f.withCredentials),m&&m!=="json"&&(x.responseType=f.responseType),typeof f.onDownloadProgress=="function"&&x.addEventListener("progress",f.onDownloadProgress),typeof f.onUploadProgress=="function"&&x.upload&&x.upload.addEventListener("progress",f.onUploadProgress),(f.cancelToken||f.signal)&&(y=function(P){x&&(v(!P||P&&P.type?new l("canceled"):P),x.abort(),x=null)},f.cancelToken&&f.cancelToken.subscribe(y),f.signal&&(f.signal.aborted?y():f.signal.addEventListener("abort",y))),g||(g=null),x.send(g)})},_v}var xv,Zw;function xd(){if(Zw)return xv;Zw=1;var e=Wr,t=m6,r=y2,n={"Content-Type":"application/x-www-form-urlencoded"};function i(u,l){!e.isUndefined(u)&&e.isUndefined(u["Content-Type"])&&(u["Content-Type"]=l)}function o(){var u;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(u=Kw()),u}function a(u,l,c){if(e.isString(u))try{return(l||JSON.parse)(u),e.trim(u)}catch(f){if(f.name!=="SyntaxError")throw f}return(c||JSON.stringify)(u)}var s={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:o(),transformRequest:[function(l,c){return t(c,"Accept"),t(c,"Content-Type"),e.isFormData(l)||e.isArrayBuffer(l)||e.isBuffer(l)||e.isStream(l)||e.isFile(l)||e.isBlob(l)?l:e.isArrayBufferView(l)?l.buffer:e.isURLSearchParams(l)?(i(c,"application/x-www-form-urlencoded;charset=utf-8"),l.toString()):e.isObject(l)||c&&c["Content-Type"]==="application/json"?(i(c,"application/json"),a(l)):l}],transformResponse:[function(l){var c=this.transitional||s.transitional,f=c&&c.silentJSONParsing,h=c&&c.forcedJSONParsing,d=!f&&this.responseType==="json";if(d||h&&e.isString(l)&&l.length)try{return JSON.parse(l)}catch(v){if(d)throw v.name==="SyntaxError"?r(v,this,"E_JSON_PARSE"):v}return l}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(l){return l>=200&&l<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};return e.forEach(["delete","get","head"],function(l){s.headers[l]={}}),e.forEach(["post","put","patch"],function(l){s.headers[l]=e.merge(n)}),xv=s,xv}var E6=Wr,T6=xd(),C6=function(t,r,n){var i=this||T6;return E6.forEach(n,function(a){t=a.call(i,t,r)}),t},bv,Qw;function x2(){return Qw||(Qw=1,bv=function(t){return!!(t&&t.__CANCEL__)}),bv}var Jw=Wr,Sv=C6,O6=x2(),A6=xd(),P6=_d();function wv(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new P6("canceled")}var R6=function(t){wv(t),t.headers=t.headers||{},t.data=Sv.call(t,t.data,t.headers,t.transformRequest),t.headers=Jw.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),Jw.forEach(["delete","get","head","post","put","patch","common"],function(i){delete t.headers[i]});var r=t.adapter||A6.adapter;return r(t).then(function(i){return wv(t),i.data=Sv.call(t,i.data,i.headers,t.transformResponse),i},function(i){return O6(i)||(wv(t),i&&i.response&&(i.response.data=Sv.call(t,i.response.data,i.response.headers,t.transformResponse))),Promise.reject(i)})},Br=Wr,b2=function(t,r){r=r||{};var n={};function i(c,f){return Br.isPlainObject(c)&&Br.isPlainObject(f)?Br.merge(c,f):Br.isPlainObject(f)?Br.merge({},f):Br.isArray(f)?f.slice():f}function o(c){if(Br.isUndefined(r[c])){if(!Br.isUndefined(t[c]))return i(void 0,t[c])}else return i(t[c],r[c])}function a(c){if(!Br.isUndefined(r[c]))return i(void 0,r[c])}function s(c){if(Br.isUndefined(r[c])){if(!Br.isUndefined(t[c]))return i(void 0,t[c])}else return i(void 0,r[c])}function u(c){if(c in r)return i(t[c],r[c]);if(c in t)return i(void 0,t[c])}var l={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:u};return Br.forEach(Object.keys(t).concat(Object.keys(r)),function(f){var h=l[f]||o,d=h(f);Br.isUndefined(d)&&h!==u||(n[f]=d)}),n},Ev,eE;function S2(){return eE||(eE=1,Ev={version:"0.24.0"}),Ev}var I6=S2().version,Sx={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){Sx[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});var tE={};Sx.transitional=function(t,r,n){function i(o,a){return"[Axios v"+I6+"] Transitional option '"+o+"'"+a+(n?". "+n:"")}return function(o,a,s){if(t===!1)throw new Error(i(a," has been removed"+(r?" in "+r:"")));return r&&!tE[a]&&(tE[a]=!0,console.warn(i(a," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(o,a,s):!0}};function k6(e,t,r){if(typeof e!="object")throw new TypeError("options must be an object");for(var n=Object.keys(e),i=n.length;i-- >0;){var o=n[i],a=t[o];if(a){var s=e[o],u=s===void 0||a(s,o,e);if(u!==!0)throw new TypeError("option "+o+" must be "+u);continue}if(r!==!0)throw Error("Unknown option "+o)}}var N6={assertOptions:k6,validators:Sx},w2=Wr,L6=g2,rE=p6,nE=R6,bd=b2,E2=N6,_a=E2.validators;function ec(e){this.defaults=e,this.interceptors={request:new rE,response:new rE}}ec.prototype.request=function(t){typeof t=="string"?(t=arguments[1]||{},t.url=arguments[0]):t=t||{},t=bd(this.defaults,t),t.method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var r=t.transitional;r!==void 0&&E2.assertOptions(r,{silentJSONParsing:_a.transitional(_a.boolean),forcedJSONParsing:_a.transitional(_a.boolean),clarifyTimeoutError:_a.transitional(_a.boolean)},!1);var n=[],i=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(t)===!1||(i=i&&h.synchronous,n.unshift(h.fulfilled,h.rejected))});var o=[];this.interceptors.response.forEach(function(h){o.push(h.fulfilled,h.rejected)});var a;if(!i){var s=[nE,void 0];for(Array.prototype.unshift.apply(s,n),s=s.concat(o),a=Promise.resolve(t);s.length;)a=a.then(s.shift(),s.shift());return a}for(var u=t;n.length;){var l=n.shift(),c=n.shift();try{u=l(u)}catch(f){c(f);break}}try{a=nE(u)}catch(f){return Promise.reject(f)}for(;o.length;)a=a.then(o.shift(),o.shift());return a};ec.prototype.getUri=function(t){return t=bd(this.defaults,t),L6(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")};w2.forEach(["delete","get","head","options"],function(t){ec.prototype[t]=function(r,n){return this.request(bd(n||{},{method:t,url:r,data:(n||{}).data}))}});w2.forEach(["post","put","patch"],function(t){ec.prototype[t]=function(r,n,i){return this.request(bd(i||{},{method:t,url:r,data:n}))}});var M6=ec,Tv,iE;function F6(){if(iE)return Tv;iE=1;var e=_d();function t(r){if(typeof r!="function")throw new TypeError("executor must be a function.");var n;this.promise=new Promise(function(a){n=a});var i=this;this.promise.then(function(o){if(i._listeners){var a,s=i._listeners.length;for(a=0;a{a.trace("Logged to cloud.",void 0,!1)}).catch(s=>{a.error("Logging to cloud failed!",void 0,!1)})}clog(t,r,n,i,o,a){const s={all:7,ALL:7,TRACE:6,DEBUG:5,INFO:4,WARN:3,ERROR:2,FATAL:1,NONE:0,none:0};s[n]<=s[this.level]&&(console.log("%c%s%c%s%c%s%c %s","color:white;background-color:"+i,"["+n+"]",""," ","color:"+i,"["+o.toLocaleString()+"]","",t),r&&(console.log(r),console.log("------------------------"))),a===void 0&&this.upload(t,r,n,o),a!==void 0&&a&&this.upload(t,r,n,o)}trace(t,r,n){const i=new Date,o="TRACE",a="#005CAF";this.clog(t,r,o,a,i,n)}debug(t,r,n){const i=new Date,o="DEBUG",a="#0089A7";this.clog(t,r,o,a,i,n)}info(t,r,n){const i=new Date,o="INFO",a="#00896C";this.clog(t,r,o,a,i,n)}warn(t,r,n){const i=new Date,o="WARN",a="#DDA52D";this.clog(t,r,o,a,i,n)}error(t,r,n){const i=new Date,o="ERROR",a="#AB3B3A";this.clog(t,r,o,a,i,n)}fatal(t,r,n){const i=new Date,o="FATAL",a="#E16B8C";this.clog(t,r,o,a,i,n)}}var W6=V6;const q6=pr(W6),te=new q6;te.setLevel("INFO");const X6={common:{yes:"OK",no:"Cancel"},menu:{options:{title:"OPTIONS",pages:{system:{title:"System",options:{autoSpeed:{title:"Autoplay Speed",options:{slow:"Slow",medium:"Medium",fast:"Fast"}},language:{title:"Language"},resetData:{title:"Clear or Reset Data",options:{clearGameSave:"Clear game saving",resetSettings:"Reset settings",clearAll:"Clear all data"},dialogs:{clearGameSave:"Are you sure you want to clear game saving",resetSettings:"Are you sure you want to reset all settings",clearAll:"Are you sure you want to clear all data"}},gameSave:{title:"Import or Export Game Saving and Options",options:{export:"Export game saving and options",import:"Import game saving and options"},dialogs:{import:{title:"Are you sure you want to import game saving and options",tip:"Import game saving",error:"Parse game saving failed"}}},about:{title:"About WebGAL",subTitle:"WebGAL: An Open-Source Web-Based Visual Novel Engine",version:"Version",source:"Source Code Repository",contributors:"Contributors",website:"Website"}}},display:{title:"Display",options:{fullScreen:{title:"Full Screen",options:{on:"ON",off:"OFF"}},textSpeed:{title:"Text Speed",options:{slow:"Slow",medium:"Medium",fast:"Fast"}},textSize:{title:"Text Size",options:{small:"Small",medium:"Medium",large:"Large"}},textFont:{title:"Text Font",options:{siYuanSimSun:"Source Han Serif",SimHei:"Sans",lxgw:"LXGW WenKai"}},textboxOpacity:{title:"Textbox Opacity"},textPreview:{title:"Preview Text Showing",text:"You are previewing the text's font, size and playback speed, now. You can adjust the above options according to your perception."}}},sound:{title:"Sound",options:{volumeMain:{title:"Main Volume"},vocalVolume:{title:"Vocal Volume"},bgmVolume:{title:"BGM Volume"},seVolume:{title:"Sound Effects Volume"},uiSeVolume:{title:"UI Sound Effects Volume"}}}}},saving:{title:"SAVE",isOverwrite:"Are you sure you want to overwrite this save?"},loadSaving:{title:"LOAD"},title:{title:"TITLE"},exit:{title:"BACK"}},title:{start:{title:"START",subtitle:""},continue:{title:"CONTINUE",subtitle:""},options:{title:"OPTIONS",subtitle:""},load:{title:"LOAD",subtitle:""},extra:{title:"EXTRA",subtitle:""}},gaming:{noSaving:"No saving",buttons:{hide:"Hide",show:"Show",backlog:"Backlog",replay:"Replay",auto:"Auto",forward:"Forward",quicklySave:"Quickly Save",quicklyLoad:"Quickly Load",save:"Save",load:"Load",options:"Options",title:"Title",titleTips:"Confirm return to the title screen"}},extra:{title:"EXTRA"}},Y6={common:{yes:"はい",no:"いいえ"},menu:{options:{title:"CONFIG",pages:{system:{title:"システム",options:{autoSpeed:{title:"自動再生速度",options:{slow:"遅く",medium:"標準",fast:"速く"}},language:{title:"言語"},resetData:{title:"データの復元と削除",options:{clearGameSave:"すべてのセーブデータを削除",resetSettings:"設定を元に戻す",clearAll:"すべてのデータを削除"},dialogs:{clearGameSave:"すべてのセーブデータを削除しますか?",resetSettings:"設定を元に戻しますか?",clearAll:"すべてのデータを削除しますか?"}},gameSave:{title:"セーブデータと設定のインポートとエクスポート",options:{export:"セーブデータと設定のエクスポート",import:"セーブデータと設定のインポート"},dialogs:{import:{title:"セーブデータと設定をインポートしますか?",tip:"セーブデータのインポート",error:"セーブデータの読み込みに失敗しました"}}},about:{title:"WebGAL について",subTitle:"WebGAL: オープンソースのウェブベースビジュアルノベルエンジン",version:"バージョン",source:"ソースコードリポジトリ",contributors:"貢献者",website:"ウェブサイト"}}},display:{title:"ウィンドウ",options:{fullScreen:{title:"フルスクリーン",options:{on:"オン",off:"オフ"}},textSpeed:{title:"テキスト表示速度",options:{slow:"遅く",medium:"標準",fast:"速く"}},textSize:{title:"テキストサイズ",options:{small:"小",medium:"中",large:"大"}},textFont:{title:"フォント",options:{siYuanSimSun:"源ノ明朝(中国語)",SimHei:"OPPO Sans",lxgw:"LXGW WenKai"}},textboxOpacity:{title:"テキストボックスの不透明度"},textPreview:{title:"テキスト表示プレビュー",text:"これはテキストボックスのフォントとサイズ、表示速度のプレビューです。上にある設定で変更できます。"}}},sound:{title:"サウンド",options:{volumeMain:{title:"メイン音量"},vocalVolume:{title:"ボイス音量"},bgmVolume:{title:"BGM 音量"},seVolume:{title:"効果音音量"},uiSeVolume:{title:"UI 効果音音量"},voiceOption:{title:"ボイスの中断"},voiceStop:{title:"中断する"},voiceContinue:{title:"中断しない"}}}}},saving:{title:"SAVE",isOverwrite:"セーブデータを上書きしますか?"},loadSaving:{title:"LOAD"},title:{title:"HOME"},exit:{title:"BACK"}},title:{start:{title:"初めから",subtitle:"START"},continue:{title:"続きから",subtitle:"CONTINUE"},options:{title:"設定",subtitle:"CONFIG"},load:{title:"ロード",subtitle:"LOAD"},extra:{title:"鑑賞モード",subtitle:"EXTRA"}},gaming:{noSaving:"クイックセーブなし",buttons:{hide:"CLOSE",show:"SHOW",backlog:"LOG",replay:"REPLAY",auto:"AUTO",forward:"SKIP",quicklySave:"QUICK SAVE",quicklyLoad:"QUICK LOAD",save:"SAVE",load:"LOAD",options:"CONFIG",title:"HOME",titleTips:"タイトル画面に戻りますか?"}},extra:{title:"鑑賞モード"}},K6={common:{yes:"是",no:"否"},menu:{options:{title:"选项",pages:{system:{title:"系统",options:{autoSpeed:{title:"自动播放速度",options:{slow:"慢",medium:"中",fast:"快"}},language:{title:"语言"},resetData:{title:"清除或还原数据",options:{clearGameSave:"清除所有存档",resetSettings:"还原默认设置",clearAll:"清除所有数据"},dialogs:{clearGameSave:"确定要清除存档吗",resetSettings:"确定要还原默认设置吗",clearAll:"确定要清除所有数据吗"}},gameSave:{title:"导入或导出存档与选项",options:{export:"导出存档与选项",import:"导入存档与选项"},dialogs:{import:{title:"确定要导入存档与选项吗",tip:"导入存档",error:"存档解析失败"}}},about:{title:"关于 WebGAL",subTitle:"WebGAL:开源的网页端视觉小说引擎",version:"版本号",source:"源代码仓库",contributors:"贡献者",website:"网站"}}},display:{title:"显示",options:{fullScreen:{title:"全屏模式",options:{on:"开启",off:"关闭"}},textSpeed:{title:"文字显示速度",options:{slow:"慢",medium:"中",fast:"快"}},textSize:{title:"文本大小",options:{small:"小",medium:"中",large:"大"}},textFont:{title:"文本字体",options:{siYuanSimSun:"思源宋体",SimHei:"黑体",lxgw:"霞鹜文楷"}},textboxOpacity:{title:"文本框不透明度"},textPreview:{title:"文本显示预览",text:"现在预览的是文本框字体大小和播放速度的情况,您可以根据您的观感调整上面的选项。"}}},sound:{title:"音频",options:{volumeMain:{title:"主音量"},vocalVolume:{title:"语音音量"},bgmVolume:{title:"背景音乐音量"},seVolume:{title:"音效音量"},uiSeVolume:{title:"用户界面音效音量"},voiceOption:{title:"是否中断语音"},voiceStop:{title:"停止语音"},voiceContinue:{title:"继续语音"}}}}},saving:{title:"存档",isOverwrite:"是否覆盖存档?"},loadSaving:{title:"读档"},title:{title:"标题",options:{load:"",extra:"鉴赏模式"}},exit:{title:"返回"}},title:{start:{title:"开始游戏",subtitle:"START"},continue:{title:"继续游戏",subtitle:"CONTINUE"},options:{title:"游戏选项",subtitle:"OPTIONS"},load:{title:"读取存档",subtitle:"LOAD"},extra:{title:"鉴赏模式",subtitle:"EXTRA"}},gaming:{noSaving:"暂无存档",buttons:{hide:"隐藏",show:"显示",backlog:"回想",replay:"重播",auto:"自动",forward:"快进",quicklySave:"快速存档",quicklyLoad:"快速读档",save:"存档",load:"读档",options:"选项",title:"标题",titleTips:"确认返回到标题界面吗"}},extra:{title:"鉴赏模式"}},Z6={common:{yes:"OK",no:"Annuler"},menu:{options:{title:"OPTIONS",pages:{system:{title:"Système",options:{autoSpeed:{title:"Vitesse de lecture automatique",options:{slow:"Lente",medium:"Moyenne",fast:"Rapide"}},language:{title:"Langue"},resetData:{title:"Effacer ou réinitialiser les données",options:{clearGameSave:"Effacer la sauvegarde du jeu",resetSettings:"Réinitialiser les paramètres",clearAll:"Tout effacer"},dialogs:{clearGameSave:"Êtes-vous sûr de vouloir effacer la sauvegarde du jeu",resetSettings:"Êtes-vous sûr de vouloir réinitialiser tous les paramètres",clearAll:"Êtes-vous sûr de vouloir tout effacer"}},gameSave:{title:"Importer ou exporter la sauvegarde du jeu et les options",options:{export:"Exporter la sauvegarde du jeu et les options",import:"Importer la sauvegarde du jeu et les options"},dialogs:{import:{title:"Êtes-vous sûr de vouloir importer la sauvegarde du jeu et les options",tip:"Importer la sauvegarde du jeu",error:"Impossible d'analyser la sauvegarde du jeu"}}},about:{title:"À propos de WebGAL",subTitle:"WebGAL: Un moteur de visual novel basé sur le web en open-source",version:"Version",source:"Dépôt de code source",contributors:"Contributeurs",website:"Site web"}}},display:{title:"Affichage",options:{textSpeed:{title:"Vitesse d'affichage du texte",options:{slow:"Lente",medium:"Moyenne",fast:"Rapide"}},textSize:{title:"Taille du texte",options:{small:"Petite",medium:"Moyenne",large:"Grande"}},textFont:{title:"Police du texte",options:{siYuanSimSun:"Source Han Serif",SimHei:"Sans",lxgw:"LXGW WenKai"}},textboxOpacity:{title:"Textbox Opacity"},textPreview:{title:"Aperçu de l'affichage du texte",text:"Vous prévisualisez la police, la taille et la vitesse de lecture du texte, maintenant. Vous pouvez ajuster les options ci-dessus selon votre perception."}}},sound:{title:"Son",options:{volumeMain:{title:"Volume principal"},vocalVolume:{title:"Volume des voix"},bgmVolume:{title:"Volume de la musique de fond"},seVolume:{title:"Volume des effets sonores"},uiSeVolume:{title:"Volume de l’interface utilisateur"}}}}},saving:{title:"SAUVEGARDER",isOverwrite:"Êtes-vous sûr de vouloir écraser cette sauvegarde ?"},loadSaving:{title:"CHARGER"},title:{title:"TITRE"},exit:{title:"RETOUR"}},title:{start:{title:"COMMENCER",subtitle:""},continue:{title:"CONTINUER",subtitle:""},options:{title:"OPTIONS",subtitle:""},load:{title:"CHARGER",subtitle:""},extra:{title:"EXTRA",subtitle:""}},gaming:{noSaving:"Aucune sauvegarde",buttons:{hide:"Masquer",show:"Afficher",backlog:"Journal",replay:"Rejouer",auto:"Automatique",forward:"Avancer",quicklySave:"Sauvegarde rapide",quicklyLoad:"Chargement rapide",save:"Sauvegarder",load:"Charger",options:"Options",title:"Titre",titleTips:"Confirmer le retour à l'écran titre"}},extra:{title:"EXTRA"}},Q6={common:{yes:"Ja",no:"Nein"},menu:{options:{title:"OPTIONEN",pages:{system:{title:"System",options:{autoSpeed:{title:"Auto-Geschwindigkeit",options:{slow:"Langsam",medium:"Normal",fast:"Schnell"}},language:{title:"Sprache"},resetData:{title:"Daten löschen oder zurücksetzen",options:{clearGameSave:"Alle Spielstände löschen",resetSettings:"Alle Einstellungen zurücksetzen",clearAll:"Alle Daten löschen"},dialogs:{clearGameSave:"Sind Sie sicher, dass Sie den Spielstand löschen möchten?",resetSettings:"Sind Sie sicher, dass Sie alle Einstellungen zurücksetzen möchten?",clearAll:"Sind Sie sicher, dass Sie alle Daten löschen möchten?"}},gameSave:{title:"Spielstand und Optionen importieren oder exportieren",options:{export:"Spielstand und Optionen exportieren",import:"Spielstand und Optionen importieren"},dialogs:{import:{title:"Sind Sie sicher, dass Sie den Spielstand und die Optionen importieren möchten?",tip:"Spielstand importieren",error:"Ein Fehler ist beim Analysieren des Spielstands aufgetreten"}}},about:{title:"Über WebGAL",subTitle:"WebGAL: Eine Open-Source Web-Based Visual Novel Engine",version:"Version",source:"Source Code Repository",contributors:"Contributors",website:"Website"}}},display:{title:"Darstellung",options:{textSpeed:{title:"Geschwindigkeit der Textanzeige",options:{slow:"Langsam",medium:"Normal",fast:"Schnell"}},textSize:{title:"Textgröße",options:{small:"Klein",medium:"Normal",large:"Groß"}},textFont:{title:"Schriftart",options:{siYuanSimSun:"Source Han Serif",SimHei:"Sans",lxgw:"LXGW WenKai"}},textboxOpacity:{title:"Textbox Opacity"},textPreview:{title:"Vorschautext wird angezeigt",text:"Sie können jederzeit die Schriftart, Größe und Wiedergabegeschwindigkeit des Textes nach Ihrer Vorliebe anpassen."}}},sound:{title:"Ton",options:{volumeMain:{title:"Hauptlautstärke"},vocalVolume:{title:"Stimmlautstärke"},bgmVolume:{title:"Musiklautstärke"},seVolume:{title:"Soundeffektlautstärke"},uiSeVolume:{title:"UI Soundeffektlautstärke"}}}}},saving:{title:"SPEICHERN",isOverwrite:"Sind Sie sicher, dass Sie diesen Spielstand überschreiben möchten?"},loadSaving:{title:"LADEN"},title:{title:"TITEL"},exit:{title:"ZURÜCK"}},title:{start:{title:"STARTEN",subtitle:""},continue:{title:"WEITERLESEN",subtitle:""},options:{title:"OPTIONEN",subtitle:""},load:{title:"LADEN",subtitle:""},extra:{title:"EXTRA",subtitle:""}},gaming:{noSaving:"Keine Speicherung",buttons:{hide:"Verstecken",show:"Anzeigen",backlog:"Verlauf",replay:"Wiedergabe",auto:"Auto",forward:"Überspringen",quicklySave:"Quickly Save",quicklyLoad:"Quickly Load",save:"Speichern",load:"Laden",options:"Optionen",title:"Titel"}},extra:{title:"EXTRA"}},J6={common:{yes:"是",no:"否"},menu:{options:{title:"設定",pages:{system:{title:"系統",options:{autoSpeed:{title:"自動播放速度",options:{slow:"慢",medium:"中",fast:"快"}},language:{title:"語言"},resetData:{title:"清除或還原紀錄",options:{clearGameSave:"清除所有存檔",resetSettings:"還原預設設定",clearAll:"清除所有紀錄"},dialogs:{clearGameSave:"確定要清除存檔嗎",resetSettings:"確定要還原預設設定嗎",clearAll:"確定要清除所有紀錄嗎"}},gameSave:{title:"匯入或匯出存檔與設定",options:{export:"匯出存檔與設定",import:"匯入存檔與設定"},dialogs:{import:{title:"確定要匯入存檔與設定嗎",tip:"匯入存檔",error:"存檔匯入失敗"}}},about:{title:"關於 WebGAL",subTitle:"WebGAL:開源的線上視覺小說製作引擎",version:"版本號",source:"原始碼倉庫",contributors:"貢獻者",website:"網站"}}},display:{title:"顯示",options:{fullScreen:{title:"全螢幕模式",options:{on:"開啟",off:"關閉"}},textSpeed:{title:"文字顯示速度",options:{slow:"慢",medium:"中",fast:"快"}},textSize:{title:"文字大小",options:{small:"小",medium:"中",large:"大"}},textFont:{title:"文字字體",options:{siYuanSimSun:"思源宋體",SimHei:"黑體",lxgw:"霞鶩文楷"}},textboxOpacity:{title:"文字方塊不透明度"},textPreview:{title:"文字顯示預覽",text:"現在預覽的是文字方塊字體大小和播放速度的情況,您可以根據您的觀感調整上面的設定。"}}},sound:{title:"音量",options:{volumeMain:{title:"主音量"},vocalVolume:{title:"語音音量"},bgmVolume:{title:"背景音樂音量"},seVolume:{title:"音效音量"},uiSeVolume:{title:"介面音效音量"},voiceOption:{title:"是否中斷語音"},voiceStop:{title:"停止語音"},voiceContinue:{title:"繼續語音"}}}}},saving:{title:"存檔",isOverwrite:"是否要覆蓋存檔?"},loadSaving:{title:"讀檔"},title:{title:"主選單",options:{load:"",extra:"CG模式"}},exit:{title:"返回"}},title:{start:{title:"開始遊戲",subtitle:"START"},continue:{title:"繼續遊戲",subtitle:"CONTINUE"},options:{title:"遊戲設定",subtitle:"OPTIONS"},load:{title:"讀取存檔",subtitle:"LOAD"},extra:{title:"CG模式",subtitle:"EXTRA"}},gaming:{noSaving:"暫無存檔",buttons:{hide:"隱藏",show:"顯示",backlog:"回想",replay:"重播",auto:"自動",forward:"加速",quicklySave:"快速存檔",quicklyLoad:"快速讀檔",save:"存檔",load:"讀檔",options:"設定",title:"主選單",titleTips:"確認返回到主選單嗎"}},extra:{title:"CG模式"}};var ha=(e=>(e[e.zhCn=0]="zhCn",e[e.en=1]="en",e[e.jp=2]="jp",e[e.fr=3]="fr",e[e.de=4]="de",e[e.zhTw=5]="zhTw",e))(ha||{});const xh={zhCn:"简体中文",en:"English",jp:"日本語",fr:"Français",de:"Deutsch",zhTw:"繁體中文"},ez={en:{translation:X6},zhCn:{translation:K6},jp:{translation:Y6},fr:{translation:Z6},de:{translation:Q6},zhTw:{translation:J6}},tz=0;var on=(e=>(e[e.small=0]="small",e[e.medium=1]="medium",e[e.large=2]="large",e))(on||{}),Wn=(e=>(e[e.song=0]="song",e[e.hei=1]="hei",e[e.lxgw=2]="lxgw",e))(Wn||{}),xl=(e=>(e[e.yes=0]="yes",e[e.no=1]="no",e))(xl||{}),qn=(e=>(e[e.on=0]="on",e[e.off=1]="off",e))(qn||{});const C2={slPage:1,volumeMain:100,textSpeed:50,autoSpeed:50,textSize:on.medium,vocalVolume:100,bgmVolume:25,seVolume:100,uiSeVolume:50,textboxFont:Wn.song,textboxOpacity:75,language:ha.zhCn,voiceInterruption:xl.yes,fullScreen:qn.off},Qg={optionData:C2,scriptManagedGlobalVar:[],globalGameVar:{},appreciationData:{bgm:[],cg:[]}},O2=ld({name:"userData",initialState:bt(Qg),reducers:{setUserData:(e,t)=>{const{key:r,value:n}=t.payload;e[r]=n},unlockCgInUserData:(e,t)=>{const{name:r,url:n,series:i}=t.payload;let o=!1;e.appreciationData.cg.forEach(a=>{n===a.url&&(o=!0,a.url=n,a.series=i)}),o||e.appreciationData.cg.push(t.payload)},unlockBgmInUserData:(e,t)=>{const{name:r,url:n,series:i}=t.payload;let o=!1;e.appreciationData.bgm.forEach(a=>{n===a.url&&(o=!0,a.url=n,a.series=i)}),o||e.appreciationData.bgm.push(t.payload)},resetUserData:(e,t)=>{Object.assign(e,t.payload)},setOptionData:(e,t)=>{const{key:r,value:n}=t.payload;e.optionData[r]=n},setGlobalVar:(e,t)=>{e.scriptManagedGlobalVar.findIndex(n=>n===t.payload.key)>=0||(e.globalGameVar[t.payload.key]=t.payload.value)},setScriptManagedGlobalVar:(e,t)=>{const r=e.scriptManagedGlobalVar.findIndex(n=>n===t.payload.key)>=0;e.globalGameVar[t.payload.key]=t.payload.value,r||e.scriptManagedGlobalVar.push(t.payload.key)},setSlPage:(e,t)=>{e.optionData.slPage=t.payload},resetOptionSet(e){Object.assign(e.optionData,C2)},resetAllData(e){Object.assign(e,bt(Qg))}}}),{setUserData:h0e,resetUserData:wx,setOptionData:Ct,setGlobalVar:uE,setScriptManagedGlobalVar:rz,setSlPage:A2,unlockCgInUserData:P2,unlockBgmInUserData:R2,resetOptionSet:nz,resetAllData:iz}=O2.actions,oz=O2.reducer,I2={backlog_size:200,fast_timeout:50},az={textInitialDelay:80};class sz{constructor(t){oe(this,"isSaveBacklogNext",!1);oe(this,"backlog",[]);oe(this,"sceneManager");this.sceneManager=t}getBacklog(){return this.backlog}editLastBacklogItemEffect(t){this.backlog[this.backlog.length-1].currentStageState.effects=t}makeBacklogEmpty(){this.backlog.splice(0,this.backlog.length)}insertBacklogItem(t){this.backlog.push(t)}saveCurrentStateToBacklog(){const t=D.getState().stage,r=bt(t);r.PerformList.forEach(i=>{i.script.args.forEach(o=>{o.key==="concat"&&(o.value=!1,i.script.content=r.showText)})});const n={currentStageState:r,saveScene:{currentSentenceId:this.sceneManager.sceneData.currentSentenceId,sceneStack:bt(this.sceneManager.sceneData.sceneStack),sceneName:this.sceneManager.sceneData.currentScene.sceneName,sceneUrl:this.sceneManager.sceneData.currentScene.sceneUrl}};for(this.getBacklog().push(n);this.getBacklog().length>I2.backlog_size;)this.getBacklog().shift()}}const lE={currentSentenceId:0,sceneStack:[],currentScene:{sceneName:"",sceneUrl:"",sentenceList:[],assetsList:[],subSceneList:[]}};class uz{constructor(){oe(this,"settledScenes",[]);oe(this,"settledAssets",[]);oe(this,"sceneData",bt(lE));oe(this,"lockSceneWrite",!1)}resetScene(){this.sceneData.currentSentenceId=0,this.sceneData.sceneStack=[],this.sceneData.currentScene=bt(lE.currentScene)}}class lz{constructor(){oe(this,"nextEnterAnimationName",new Map);oe(this,"nextExitAnimationName",new Map);oe(this,"animations",[])}addAnimation(t){this.animations.push(t)}getAnimations(){return this.animations}}const cz={performName:"",duration:100,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0};var jr=(e=>(e[e.background=0]="background",e[e.bgm=1]="bgm",e[e.figure=2]="figure",e[e.scene=3]="scene",e[e.tex=4]="tex",e[e.vocal=5]="vocal",e[e.video=6]="video",e))(jr||{});const $r=(e,t)=>{if(e.match("http://")||e.match("https://"))return e;{let r;switch(t){case 0:r=`./game/background/${e}`;break;case 3:r=`./game/scene/${e}`;break;case 5:r=`./game/vocal/${e}`;break;case 2:r=`./game/figure/${e}`;break;case 1:r=`./game/bgm/${e}`;break;case 6:r=`./game/video/${e}`;break;default:r="";break}return r}},fz=e=>{for(const t of e)if(C.sceneManager.settledAssets.includes(t.url))te.debug(`该资源${t.url}已在预加载列表中,无需重复加载`);else{const n=document.createElement("link");n.setAttribute("rel","prefetch"),n.setAttribute("href",t.url);const i=document.getElementsByTagName("head");if(i.length)try{i[0].appendChild(n)}catch(o){console.log("预加载出错",o)}C.sceneManager.settledAssets.push(t.url)}};var se;(function(e){e[e.say=0]="say",e[e.changeBg=1]="changeBg",e[e.changeFigure=2]="changeFigure",e[e.bgm=3]="bgm",e[e.video=4]="video",e[e.pixi=5]="pixi",e[e.pixiInit=6]="pixiInit",e[e.intro=7]="intro",e[e.miniAvatar=8]="miniAvatar",e[e.changeScene=9]="changeScene",e[e.choose=10]="choose",e[e.end=11]="end",e[e.setComplexAnimation=12]="setComplexAnimation",e[e.setFilter=13]="setFilter",e[e.label=14]="label",e[e.jumpLabel=15]="jumpLabel",e[e.chooseLabel=16]="chooseLabel",e[e.setVar=17]="setVar",e[e.if=18]="if",e[e.callScene=19]="callScene",e[e.showVars=20]="showVars",e[e.unlockCg=21]="unlockCg",e[e.unlockBgm=22]="unlockBgm",e[e.filmMode=23]="filmMode",e[e.setTextbox=24]="setTextbox",e[e.setAnimation=25]="setAnimation",e[e.playEffect=26]="playEffect",e[e.setTempAnimation=27]="setTempAnimation",e[e.comment=28]="comment",e[e.setTransform=29]="setTransform",e[e.setTransition=30]="setTransition",e[e.getUserInput=31]="getUserInput",e[e.applyStyle=32]="applyStyle"})(se||(se={}));se.intro,se.changeBg,se.changeFigure,se.miniAvatar,se.changeScene,se.choose,se.end,se.bgm,se.video,se.setComplexAnimation,se.setFilter,se.pixiInit,se.pixi,se.label,se.jumpLabel,se.setVar,se.callScene,se.showVars,se.unlockCg,se.unlockBgm,se.say,se.filmMode,se.callScene,se.setTextbox,se.setAnimation,se.playEffect,se.applyStyle;se.bgm,se.pixi,se.pixiInit,se.label,se.if,se.miniAvatar,se.setVar,se.unlockBgm,se.unlockCg,se.filmMode,se.playEffect;var Pt;(function(e){e[e.background=0]="background",e[e.bgm=1]="bgm",e[e.figure=2]="figure",e[e.scene=3]="scene",e[e.tex=4]="tex",e[e.vocal=5]="vocal",e[e.video=6]="video"})(Pt||(Pt={}));function k2(e,t){const r=[];let i=e.replace(/ /g," ").split(" -");return i=i.filter(o=>o!==""),i.forEach(o=>{const a=o.indexOf("=");let s=o.slice(0,a),u=o.slice(a+1);a<0&&(s=o,u=void 0),s.toLowerCase().match(/.ogg|.mp3|.wav/)?r.push({key:"vocal",value:t(o,Pt.vocal)}):u===void 0?r.push({key:s,value:!0}):u==="true"||u==="false"?r.push({key:s,value:u==="true"}):isNaN(Number(u))?r.push({key:s,value:u}):r.push({key:s,value:Number(u)})}),r}function hz(e){const t=[];let r,n=e.split(";")[0];if(n==="")return{command:"",args:[],options:[]};const i=/\s*:\s*/.exec(n);i===null?r="":(r=n.substring(0,i.index),n=n.substring(i.index+1,n.length));const o=/ -/.exec(n);if(o){const a=n.substring(o.index,n.length);n=n.substring(0,o.index);for(const s of k2(a,(u,l)=>u))t.push(s)}return{command:r,args:n.split("|").map(a=>a.trim()).filter(a=>a!==""),options:t}}function dz(e){return e.replaceAll("\r","").split(` +`).map(r=>hz(r)).filter(r=>r.command!=="")}const cE=(e,t,r)=>{let n={type:se.say,additionalArgs:[]};const i=pz(e,t,r);return n.type=i,i===se.say&&e!=="say"&&n.additionalArgs.push({key:"speaker",value:e}),n=vz(n,i,t),n};function pz(e,t,r){var n;return((n=r.get(e))==null?void 0:n.scriptType)??se.say}function vz(e,t,r){return r.includes(t)&&e.additionalArgs.push({key:"next",value:!0}),e}const mz=(e,t,r)=>{if(e==="none"||e==="")return"";switch(t){case se.playEffect:return r(e,Pt.vocal);case se.changeBg:return r(e,Pt.background);case se.changeFigure:return r(e,Pt.figure);case se.bgm:return r(e,Pt.bgm);case se.callScene:return r(e,Pt.scene);case se.changeScene:return r(e,Pt.scene);case se.miniAvatar:return r(e,Pt.figure);case se.video:return r(e,Pt.video);case se.choose:return gz(e,r);case se.unlockBgm:return r(e,Pt.bgm);case se.unlockCg:return r(e,Pt.background);default:return e}};function gz(e,t){const r=e.split(new RegExp("(?s.match(/\./)?t(s,Pt.scene):s);let a="";for(let s=0;s{const n=[];return e===se.say&&r.forEach(i=>{i.key==="vocal"&&n.push({name:i.value,url:i.value,lineNumber:0,type:Pt.vocal})}),t==="none"||t===""||(e===se.changeBg&&n.push({name:t,url:t,lineNumber:0,type:Pt.background}),e===se.changeFigure&&n.push({name:t,url:t,lineNumber:0,type:Pt.figure}),e===se.miniAvatar&&n.push({name:t,url:t,lineNumber:0,type:Pt.figure}),e===se.video&&n.push({name:t,url:t,lineNumber:0,type:Pt.video}),e===se.bgm&&n.push({name:t,url:t,lineNumber:0,type:Pt.bgm})),n},_z=(e,t)=>{const r=[];return(e===se.changeScene||e===se.callScene)&&r.push(t),e===se.choose&&t.split("|").map(o=>o.split(":")[1]??"").forEach(o=>{o.match(/\./)&&r.push(o)}),r},xz=(e,t,r,n)=>{let i,o,a;const s=[];let u,l,c,f=e.split(new RegExp("(?-1}var dH=hH,pH=Ed;function vH(e,t){var r=this.__data__,n=pH(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var mH=vH,gH=Q9,yH=sH,_H=cH,xH=dH,bH=mH;function Bs(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t-1}var bV=xV;function SV(e,t,r){for(var n=-1,i=e==null?0:e.length;++n=HV){var l=t?null:GV(e);if(l)return zV(l);a=!1,i=UV,u=new BV}else u=t?[]:s;e:for(;++n{const u=e.split(` +`);let l=[],c=[];const f=u.map(h=>{const d=xz(h,i,o,a);return l=[...l,...d.sentenceAssets],c=[...c,...d.subScene],d});return l=YV(l),n(l),{sceneName:t,sceneUrl:r,sentenceList:f,assetsList:l,subSceneList:c}};function ZV(e){const[t,r]=QV(e);return{classNameStyles:t,others:r}}function QV(e){const t={};let r="",n;const i=/\.([^{\s]+)\s*{((?:[^{}]*|{[^}]*})*)}/g,o=/(@[^{]+{\s*(?:[^{}]*{[^}]*}[^{}]*)+\s*})/g;for(;(n=i.exec(e))!==null;){const a=n[1],s=n[2].trim().replace(/\s*;\s*/g,`; +`);t[a]=s}for(;(n=o.exec(e))!==null;)r+=n[1].trim()+` +`;return[t,r.trim()]}class JV{constructor(t,r,n,i){oe(this,"assetsPrefetcher");oe(this,"assetSetter");oe(this,"ADD_NEXT_ARG_LIST");oe(this,"SCRIPT_CONFIG_MAP");this.assetsPrefetcher=t,this.assetSetter=r,this.ADD_NEXT_ARG_LIST=n,Array.isArray(i)?(this.SCRIPT_CONFIG_MAP=new Map,i.forEach(o=>{this.SCRIPT_CONFIG_MAP.set(o.scriptString,o)})):this.SCRIPT_CONFIG_MAP=i}parse(t,r,n){return KV(t,r,n,this.assetsPrefetcher,this.assetSetter,this.ADD_NEXT_ARG_LIST,this.SCRIPT_CONFIG_MAP)}parseConfig(t){return dz(t)}stringifyConfig(t){return t.reduce((r,n)=>r+`${n.command}:${n.args.join("|")}${n.options.length<=0?"":n.options.reduce((i,o)=>i+" -"+o.key+"="+o.value,"")}; +`,"")}parseScssToWebgalStyleObj(t){return ZV(t)}}function Pe(e,t){const n=e.args.find(i=>i.key===t);return n?n.value:null}const eW=e=>{let t=e.content,r="",n="default";e.args.forEach(a=>{a.key==="unlockname"&&(r=a.value.toString()),a.key==="series"&&(n=a.value.toString())});const i=Pe(e,"enter"),o=Pe(e,"volume");return r!==""&&D.dispatch(R2({name:r,url:t,series:n})),d1(t,typeof i=="number"&&i>=0?i:0,typeof o=="number"&&o>=0&&o<=100?o:100),{performName:"none",duration:0,isHoldOn:!0,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};var Tx={exports:{}},D2=function(t,r){return function(){return t.apply(r,arguments)}},tW=D2,Cx=Object.prototype.toString,Ox=function(e){return function(t){var r=Cx.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())}}(Object.create(null));function mo(e){return e=e.toLowerCase(),function(r){return Ox(r)===e}}function Cd(e){return Array.isArray(e)}function Jg(e){return typeof e>"u"}function rW(e){return e!==null&&!Jg(e)&&e.constructor!==null&&!Jg(e.constructor)&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}var B2=mo("ArrayBuffer");function nW(e){var t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&B2(e.buffer),t}function iW(e){return typeof e=="string"}function j2(e){return typeof e=="number"}function $2(e){return e!==null&&typeof e=="object"}function Cf(e){if(Ox(e)!=="object")return!1;var t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function oW(e){return e&&Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}var aW=mo("Date"),sW=mo("File"),uW=mo("Blob"),lW=mo("FileList");function Ax(e){return Cx.call(e)==="[object Function]"}function cW(e){return $2(e)&&Ax(e.pipe)}function fW(e){var t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||Cx.call(e)===t||Ax(e.toString)&&e.toString()===t)}var hW=mo("URLSearchParams");function dW(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}function pW(){var e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"}function Px(e,t){if(!(e===null||typeof e>"u"))if(typeof e!="object"&&(e=[e]),Cd(e))for(var r=0,n=e.length;r0;)a=i[o],(!n||n(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=r!==!1&&Object.getPrototypeOf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t}function _W(e,t,r){e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;var n=e.indexOf(t,r);return n!==-1&&n===r}function xW(e){if(!e)return null;if(Cd(e))return e;var t=e.length;if(!j2(t))return null;for(var r=new Array(t);t-- >0;)r[t]=e[t];return r}var bW=function(e){return function(t){return e&&t instanceof e}}(typeof Uint8Array<"u"&&Object.getPrototypeOf(Uint8Array));function SW(e,t){for(var r=e&&e[Symbol.iterator],n=r.call(e),i;(i=n.next())&&!i.done;){var o=i.value;t.call(e,o[0],o[1])}}function wW(e,t){for(var r,n=[];(r=e.exec(t))!==null;)n.push(r);return n}var EW=mo("HTMLFormElement"),TW=function(t){return function(r,n){return t.call(r,n)}}(Object.prototype.hasOwnProperty),jt={isArray:Cd,isArrayBuffer:B2,isBuffer:rW,isFormData:fW,isArrayBufferView:nW,isString:iW,isNumber:j2,isObject:$2,isPlainObject:Cf,isEmptyObject:oW,isUndefined:Jg,isDate:aW,isFile:sW,isBlob:uW,isFunction:Ax,isStream:cW,isURLSearchParams:hW,isStandardBrowserEnv:pW,forEach:Px,merge:ey,extend:vW,trim:dW,stripBOM:mW,inherits:gW,toFlatObject:yW,kindOf:Ox,kindOfTest:mo,endsWith:_W,toArray:xW,isTypedArray:bW,isFileList:lW,forEachEntry:SW,matchAll:wW,isHTMLForm:EW,hasOwnProperty:TW},U2=jt;function fs(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i)}U2.inherits(fs,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var G2=fs.prototype,z2={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(function(e){z2[e]={value:e}});Object.defineProperties(fs,z2);Object.defineProperty(G2,"isAxiosError",{value:!0});fs.from=function(e,t,r,n,i,o){var a=Object.create(G2);return U2.toFlatObject(e,a,function(u){return u!==Error.prototype}),fs.call(a,e.message,t,r,n,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};var da=fs,CW=typeof self=="object"?self.FormData:window.FormData,OW=CW,rt=jt,AW=da,PW=OW;function ty(e){return rt.isPlainObject(e)||rt.isArray(e)}function H2(e){return rt.endsWith(e,"[]")?e.slice(0,-2):e}function gE(e,t,r){return e?e.concat(t).map(function(i,o){return i=H2(i),!r&&o?"["+i+"]":i}).join(r?".":""):t}function RW(e){return rt.isArray(e)&&!e.some(ty)}var IW=rt.toFlatObject(rt,{},null,function(t){return/^is[A-Z]/.test(t)});function kW(e){return e&&rt.isFunction(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator]}function NW(e,t,r){if(!rt.isObject(e))throw new TypeError("target must be an object");t=t||new(PW||FormData),r=rt.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,p){return!rt.isUndefined(p[g])});var n=r.metaTokens,i=r.visitor||c,o=r.dots,a=r.indexes,s=r.Blob||typeof Blob<"u"&&Blob,u=s&&kW(t);if(!rt.isFunction(i))throw new TypeError("visitor must be a function");function l(v){if(v===null)return"";if(rt.isDate(v))return v.toISOString();if(!u&&rt.isBlob(v))throw new AW("Blob is not supported. Use a Buffer instead.");return rt.isArrayBuffer(v)||rt.isTypedArray(v)?u&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function c(v,g,p){var m=v;if(v&&!p&&typeof v=="object"){if(rt.endsWith(g,"{}"))g=n?g:g.slice(0,-2),v=JSON.stringify(v);else if(rt.isArray(v)&&RW(v)||rt.isFileList(v)||rt.endsWith(g,"[]")&&(m=rt.toArray(v)))return g=H2(g),m.forEach(function(_,x){!rt.isUndefined(_)&&t.append(a===!0?gE([g],x,o):a===null?g:g+"[]",l(_))}),!1}return ty(v)?!0:(t.append(gE(p,g,o),l(v)),!1)}var f=[],h=Object.assign(IW,{defaultVisitor:c,convertValue:l,isVisitable:ty});function d(v,g){if(!rt.isUndefined(v)){if(f.indexOf(v)!==-1)throw Error("Circular reference detected in "+g.join("."));f.push(v),rt.forEach(v,function(m,y){var _=!rt.isUndefined(m)&&i.call(t,m,rt.isString(y)?y.trim():y,g,h);_===!0&&d(m,g?g.concat(y):[y])}),f.pop()}}if(!rt.isObject(e))throw new TypeError("data must be an object");return d(e),t}var Od=NW,LW=Od;function yE(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'\(\)~]|%20|%00/g,function(n){return t[n]})}function V2(e,t){this._pairs=[],e&&LW(e,this,t)}var W2=V2.prototype;W2.append=function(t,r){this._pairs.push([t,r])};W2.toString=function(t){var r=t?function(n){return t.call(this,n,yE)}:yE;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};var q2=V2,MW=jt,FW=q2;function DW(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var X2=function(t,r,n){if(!r)return t;var i=t.indexOf("#");i!==-1&&(t=t.slice(0,i));var o=n&&n.encode||DW,a=MW.isURLSearchParams(r)?r.toString():new FW(r,n).toString(o);return a&&(t+=(t.indexOf("?")===-1?"?":"&")+a),t},BW=jt;function tc(){this.handlers=[]}tc.prototype.use=function(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1};tc.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)};tc.prototype.clear=function(){this.handlers&&(this.handlers=[])};tc.prototype.forEach=function(t){BW.forEach(this.handlers,function(n){n!==null&&t(n)})};var jW=tc,$W=jt,Y2=function(t,r){$W.forEach(t,function(i,o){o!==r&&o.toUpperCase()===r.toUpperCase()&&(t[r]=i,delete t[o])})},K2={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},UW=q2,GW=typeof URLSearchParams<"u"?URLSearchParams:UW,zW=FormData,HW={isBrowser:!0,classes:{URLSearchParams:GW,FormData:zW,Blob},protocols:["http","https","file","blob","url","data"]},Rx=HW,VW=jt,WW=Od,_E=Rx,qW=function(t,r){return WW(t,new _E.classes.URLSearchParams,Object.assign({visitor:function(n,i,o,a){return _E.isNode&&VW.isBuffer(n)?(this.append(i,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},r))},Ai=jt;function XW(e){return Ai.matchAll(/\w+|\[(\w*)]/g,e).map(function(t){return t[0]==="[]"?"":t[1]||t[0]})}function YW(e){var t={},r=Object.keys(e),n,i=r.length,o;for(n=0;n=n.length;if(s=!s&&Ai.isArray(o)?o.length:s,l)return Ai.hasOwnProperty(o,s)?o[s]=[o[s],i]:o[s]=i,!u;(!o[s]||!Ai.isObject(o[s]))&&(o[s]=[]);var c=t(n,i,o[s],a);return c&&Ai.isArray(o[s])&&(o[s]=YW(o[s])),!u}if(Ai.isFormData(e)&&Ai.isFunction(e.entries)){var r={};return Ai.forEachEntry(e,function(n,i){t(XW(n),i,r,0)}),r}return null}var Z2=KW,Rv,xE;function ZW(){if(xE)return Rv;xE=1;var e=da;return Rv=function(r,n,i){var o=i.config.validateStatus;!i.status||!o||o(i.status)?r(i):n(new e("Request failed with status code "+i.status,[e.ERR_BAD_REQUEST,e.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i))},Rv}var Iv,bE;function QW(){if(bE)return Iv;bE=1;var e=jt;return Iv=e.isStandardBrowserEnv()?function(){return{write:function(n,i,o,a,s,u){var l=[];l.push(n+"="+encodeURIComponent(i)),e.isNumber(o)&&l.push("expires="+new Date(o).toGMTString()),e.isString(a)&&l.push("path="+a),e.isString(s)&&l.push("domain="+s),u===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(n){var i=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return i?decodeURIComponent(i[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),Iv}var JW=function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)},e7=function(t,r){return r?t.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):t},t7=JW,r7=e7,Q2=function(t,r){return t&&!t7(r)?r7(t,r):r},kv,SE;function n7(){if(SE)return kv;SE=1;var e=jt,t=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return kv=function(n){var i={},o,a,s;return n&&e.forEach(n.split(` +`),function(l){if(s=l.indexOf(":"),o=e.trim(l.slice(0,s)).toLowerCase(),a=e.trim(l.slice(s+1)),o){if(i[o]&&t.indexOf(o)>=0)return;o==="set-cookie"?i[o]=(i[o]?i[o]:[]).concat([a]):i[o]=i[o]?i[o]+", "+a:a}}),i},kv}var Nv,wE;function i7(){if(wE)return Nv;wE=1;var e=jt;return Nv=e.isStandardBrowserEnv()?function(){var r=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),i;function o(a){var s=a;return r&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return i=o(window.location.href),function(s){var u=e.isString(s)?o(s):s;return u.protocol===i.protocol&&u.host===i.host}}():function(){return function(){return!0}}(),Nv}var Lv,EE;function Ad(){if(EE)return Lv;EE=1;var e=da,t=jt;function r(n,i,o){e.call(this,n??"canceled",e.ERR_CANCELED,i,o),this.name="CanceledError"}return t.inherits(r,e,{__CANCEL__:!0}),Lv=r,Lv}var Mv,TE;function o7(){return TE||(TE=1,Mv=function(t){var r=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return r&&r[1]||""}),Mv}var Fv,CE;function OE(){if(CE)return Fv;CE=1;var e=jt,t=ZW(),r=QW(),n=X2,i=Q2,o=n7(),a=i7(),s=K2,u=da,l=Ad(),c=o7(),f=Rx;return Fv=function(d){return new Promise(function(g,p){var m=d.data,y=d.headers,_=d.responseType,x=d.withXSRFToken,S;function w(){d.cancelToken&&d.cancelToken.unsubscribe(S),d.signal&&d.signal.removeEventListener("abort",S)}e.isFormData(m)&&e.isStandardBrowserEnv()&&delete y["Content-Type"];var E=new XMLHttpRequest;if(d.auth){var R=d.auth.username||"",A=d.auth.password?unescape(encodeURIComponent(d.auth.password)):"";y.Authorization="Basic "+btoa(R+":"+A)}var P=i(d.baseURL,d.url);E.open(d.method.toUpperCase(),n(P,d.params,d.paramsSerializer),!0),E.timeout=d.timeout;function F(){if(E){var Y="getAllResponseHeaders"in E?o(E.getAllResponseHeaders()):null,U=!_||_==="text"||_==="json"?E.responseText:E.response,z={data:U,status:E.status,statusText:E.statusText,headers:Y,config:d,request:E};t(function(be){g(be),w()},function(be){p(be),w()},z),E=null}}if("onloadend"in E?E.onloadend=F:E.onreadystatechange=function(){!E||E.readyState!==4||E.status===0&&!(E.responseURL&&E.responseURL.indexOf("file:")===0)||setTimeout(F)},E.onabort=function(){E&&(p(new u("Request aborted",u.ECONNABORTED,d,E)),E=null)},E.onerror=function(){p(new u("Network Error",u.ERR_NETWORK,d,E)),E=null},E.ontimeout=function(){var U=d.timeout?"timeout of "+d.timeout+"ms exceeded":"timeout exceeded",z=d.transitional||s;d.timeoutErrorMessage&&(U=d.timeoutErrorMessage),p(new u(U,z.clarifyTimeoutError?u.ETIMEDOUT:u.ECONNABORTED,d,E)),E=null},e.isStandardBrowserEnv()&&(x&&e.isFunction(x)&&(x=x(d)),x||x!==!1&&a(P))){var B=d.xsrfHeaderName&&d.xsrfCookieName&&r.read(d.xsrfCookieName);B&&(y[d.xsrfHeaderName]=B)}"setRequestHeader"in E&&e.forEach(y,function(U,z){typeof m>"u"&&z.toLowerCase()==="content-type"?delete y[z]:E.setRequestHeader(z,U)}),e.isUndefined(d.withCredentials)||(E.withCredentials=!!d.withCredentials),_&&_!=="json"&&(E.responseType=d.responseType),typeof d.onDownloadProgress=="function"&&E.addEventListener("progress",d.onDownloadProgress),typeof d.onUploadProgress=="function"&&E.upload&&E.upload.addEventListener("progress",d.onUploadProgress),(d.cancelToken||d.signal)&&(S=function(Y){E&&(p(!Y||Y.type?new l(null,d,req):Y),E.abort(),E=null)},d.cancelToken&&d.cancelToken.subscribe(S),d.signal&&(d.signal.aborted?S():d.signal.addEventListener("abort",S))),!m&&m!==!1&&m!==0&&m!==""&&(m=null);var $=c(P);if($&&f.protocols.indexOf($)===-1){p(new u("Unsupported protocol "+$+":",u.ERR_BAD_REQUEST,d));return}E.send(m)})},Fv}var Lt=jt,AE=Y2,PE=da,a7=K2,s7=Od,u7=qW,RE=Rx,l7=Z2,c7={"Content-Type":"application/x-www-form-urlencoded"};function IE(e,t){!Lt.isUndefined(e)&&Lt.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function f7(){var e;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(e=OE()),e}function h7(e,t,r){if(Lt.isString(e))try{return(t||JSON.parse)(e),Lt.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}var Pd={transitional:a7,adapter:f7(),transformRequest:[function(t,r){AE(r,"Accept"),AE(r,"Content-Type");var n=r&&r["Content-Type"]||"",i=n.indexOf("application/json")>-1,o=Lt.isObject(t);o&&Lt.isHTMLForm(t)&&(t=new FormData(t));var a=Lt.isFormData(t);if(a)return i?JSON.stringify(l7(t)):t;if(Lt.isArrayBuffer(t)||Lt.isBuffer(t)||Lt.isStream(t)||Lt.isFile(t)||Lt.isBlob(t))return t;if(Lt.isArrayBufferView(t))return t.buffer;if(Lt.isURLSearchParams(t))return IE(r,"application/x-www-form-urlencoded;charset=utf-8"),t.toString();var s;if(o){if(n.indexOf("application/x-www-form-urlencoded")!==-1)return u7(t,this.formSerializer).toString();if((s=Lt.isFileList(t))||n.indexOf("multipart/form-data")>-1){var u=this.env&&this.env.FormData;return s7(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}return o||i?(IE(r,"application/json"),h7(t)):t}],transformResponse:[function(t){var r=this.transitional||Pd.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(t&&Lt.isString(t)&&(n&&!this.responseType||i)){var o=r&&r.silentJSONParsing,a=!o&&i;try{return JSON.parse(t)}catch(s){if(a)throw s.name==="SyntaxError"?PE.from(s,PE.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:RE.classes.FormData,Blob:RE.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};Lt.forEach(["delete","get","head"],function(t){Pd.headers[t]={}});Lt.forEach(["post","put","patch"],function(t){Pd.headers[t]=Lt.merge(c7)});var Ix=Pd,d7=jt,p7=Ix,v7=function(t,r,n,i){var o=this||p7;return d7.forEach(i,function(s){t=s.call(o,t,r,n)}),t},Dv,kE;function J2(){return kE||(kE=1,Dv=function(t){return!!(t&&t.__CANCEL__)}),Dv}var NE=jt,Bv=v7,m7=J2(),g7=Ix,y7=Ad(),LE=Y2;function jv(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new y7}var _7=function(t){jv(t),t.headers=t.headers||{},t.data=Bv.call(t,t.data,t.headers,null,t.transformRequest),LE(t.headers,"Accept"),LE(t.headers,"Content-Type"),t.headers=NE.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),NE.forEach(["delete","get","head","post","put","patch","common"],function(i){delete t.headers[i]});var r=t.adapter||g7.adapter;return r(t).then(function(i){return jv(t),i.data=Bv.call(t,i.data,i.headers,i.status,t.transformResponse),i},function(i){return m7(i)||(jv(t),i&&i.response&&(i.response.data=Bv.call(t,i.response.data,i.response.headers,i.response.status,t.transformResponse))),Promise.reject(i)})},gr=jt,eR=function(t,r){r=r||{};var n={};function i(c,f){return gr.isPlainObject(c)&&gr.isPlainObject(f)?gr.merge(c,f):gr.isEmptyObject(f)?gr.merge({},c):gr.isPlainObject(f)?gr.merge({},f):gr.isArray(f)?f.slice():f}function o(c){if(gr.isUndefined(r[c])){if(!gr.isUndefined(t[c]))return i(void 0,t[c])}else return i(t[c],r[c])}function a(c){if(!gr.isUndefined(r[c]))return i(void 0,r[c])}function s(c){if(gr.isUndefined(r[c])){if(!gr.isUndefined(t[c]))return i(void 0,t[c])}else return i(void 0,r[c])}function u(c){if(c in r)return i(t[c],r[c]);if(c in t)return i(void 0,t[c])}var l={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:u};return gr.forEach(Object.keys(t).concat(Object.keys(r)),function(f){var h=l[f]||o,d=h(f);gr.isUndefined(d)&&h!==u||(n[f]=d)}),n},$v,ME;function tR(){return ME||(ME=1,$v={version:"0.28.0"}),$v}var x7=tR().version,Ri=da,kx={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){kx[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});var FE={};kx.transitional=function(t,r,n){function i(o,a){return"[Axios v"+x7+"] Transitional option '"+o+"'"+a+(n?". "+n:"")}return function(o,a,s){if(t===!1)throw new Ri(i(a," has been removed"+(r?" in "+r:"")),Ri.ERR_DEPRECATED);return r&&!FE[a]&&(FE[a]=!0,console.warn(i(a," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(o,a,s):!0}};function b7(e,t,r){if(typeof e!="object")throw new Ri("options must be an object",Ri.ERR_BAD_OPTION_VALUE);for(var n=Object.keys(e),i=n.length;i-- >0;){var o=n[i],a=t[o];if(a){var s=e[o],u=s===void 0||a(s,o,e);if(u!==!0)throw new Ri("option "+o+" must be "+u,Ri.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Ri("Unknown option "+o,Ri.ERR_BAD_OPTION)}}var S7={assertOptions:b7,validators:kx},Nx=jt,w7=X2,DE=jW,BE=_7,Rd=eR,E7=Q2,rR=S7,xa=rR.validators;function hs(e){this.defaults=e,this.interceptors={request:new DE,response:new DE}}hs.prototype.request=function(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Rd(this.defaults,r),r.method?r.method=r.method.toLowerCase():this.defaults.method?r.method=this.defaults.method.toLowerCase():r.method="get";var n=r.transitional;n!==void 0&&rR.assertOptions(n,{silentJSONParsing:xa.transitional(xa.boolean),forcedJSONParsing:xa.transitional(xa.boolean),clarifyTimeoutError:xa.transitional(xa.boolean)},!1);var i=r.paramsSerializer;Nx.isFunction(i)&&(r.paramsSerializer={serialize:i});var o=[],a=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(r)===!1||(a=a&&v.synchronous,o.unshift(v.fulfilled,v.rejected))});var s=[];this.interceptors.response.forEach(function(v){s.push(v.fulfilled,v.rejected)});var u;if(!a){var l=[BE,void 0];for(Array.prototype.unshift.apply(l,o),l=l.concat(s),u=Promise.resolve(r);l.length;)u=u.then(l.shift(),l.shift());return u}for(var c=r;o.length;){var f=o.shift(),h=o.shift();try{c=f(c)}catch(d){h(d);break}}try{u=BE(c)}catch(d){return Promise.reject(d)}for(;s.length;)u=u.then(s.shift(),s.shift());return u};hs.prototype.getUri=function(t){t=Rd(this.defaults,t);var r=E7(t.baseURL,t.url);return w7(r,t.params,t.paramsSerializer)};Nx.forEach(["delete","get","head","options"],function(t){hs.prototype[t]=function(r,n){return this.request(Rd(n||{},{method:t,url:r,data:(n||{}).data}))}});Nx.forEach(["post","put","patch"],function(t){function r(n){return function(o,a,s){return this.request(Rd(s||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}hs.prototype[t]=r(),hs.prototype[t+"Form"]=r(!0)});var T7=hs,Uv,jE;function C7(){if(jE)return Uv;jE=1;var e=Ad();function t(r){if(typeof r!="function")throw new TypeError("executor must be a function.");var n;this.promise=new Promise(function(a){n=a});var i=this;this.promise.then(function(o){if(i._listeners){for(var a=i._listeners.length;a-- >0;)i._listeners[a](o);i._listeners=null}}),this.promise.then=function(o){var a,s=new Promise(function(u){i.subscribe(u),a=u}).then(o);return s.cancel=function(){i.unsubscribe(a)},s},r(function(a,s,u){i.reason||(i.reason=new e(a,s,u),n(i.reason))})}return t.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},t.prototype.subscribe=function(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]},t.prototype.unsubscribe=function(n){if(this._listeners){var i=this._listeners.indexOf(n);i!==-1&&this._listeners.splice(i,1)}},t.source=function(){var n,i=new t(function(a){n=a});return{token:i,cancel:n}},Uv=t,Uv}var Gv,$E;function O7(){return $E||($E=1,Gv=function(t){return function(n){return t.apply(null,n)}}),Gv}var zv,UE;function A7(){if(UE)return zv;UE=1;var e=jt;return zv=function(r){return e.isObject(r)&&r.isAxiosError===!0},zv}var ry=jt,P7=D2,Of=T7,R7=eR,I7=Ix,k7=Z2;function nR(e){var t=new Of(e),r=P7(Of.prototype.request,t);return ry.extend(r,Of.prototype,t),ry.extend(r,t),r.create=function(i){return nR(R7(e,i))},r}var Sr=nR(I7);Sr.Axios=Of;Sr.CanceledError=Ad();Sr.CancelToken=C7();Sr.isCancel=J2();Sr.VERSION=tR().version;Sr.toFormData=Od;Sr.AxiosError=da;Sr.Cancel=Sr.CanceledError;Sr.all=function(t){return Promise.all(t)};Sr.spread=O7();Sr.isAxiosError=A7();Sr.formToJSON=function(e){return k7(ry.isHTMLForm(e)?new FormData(e):e)};Tx.exports=Sr;Tx.exports.default=Sr;var N7=Tx.exports,L7=N7;const bl=pr(L7),ii=e=>new Promise((t,r)=>{bl.get(e).then(n=>{const i=n.data.toString();t(i)}).catch(n=>{r(n)})});var M7="__lodash_hash_undefined__";function F7(e){return this.__data__.set(e,M7),this}var D7=F7;function B7(e){return this.__data__.has(e)}var j7=B7,$7=ax,U7=D7,G7=j7;function Sh(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new $7;++t-1}var rq=tq;function nq(e,t,r){for(var n=-1,i=e==null?0:e.length;++n=xq){var l=t?null:yq(e);if(l)return _q(l);a=!1,i=gq,u=new pq}else u=t?[]:s;e:for(;++n{for(const t of e)C.sceneManager.settledScenes.includes(t)?te.warn(`场景${t}已经加载过,无需再次加载`):(te.info(`现在预加载场景${t}`),ii(t).then(r=>{On(r,t,t)}))},Cq=(e,t)=>{C.sceneManager.lockSceneWrite||(C.sceneManager.lockSceneWrite=!0,C.sceneManager.sceneData.sceneStack.push({sceneName:C.sceneManager.sceneData.currentScene.sceneName,sceneUrl:C.sceneManager.sceneData.currentScene.sceneUrl,continueLine:C.sceneManager.sceneData.currentSentenceId}),ii(e).then(r=>{C.sceneManager.sceneData.currentScene=On(r,t,e),C.sceneManager.sceneData.currentSentenceId=0;const n=C.sceneManager.sceneData.currentScene.subSceneList;C.sceneManager.settledScenes.push(e);const i=rc(n);nc(i),te.debug("现在调用场景,调用结果:",C.sceneManager.sceneData),C.sceneManager.lockSceneWrite=!1,nr()}).catch(r=>{te.error("场景调用错误",r),C.sceneManager.lockSceneWrite=!1}))},Oq=e=>{const t=e.content.split("/"),r=t[t.length-1];return Cq(e.content,r),{performName:"none",duration:0,isHoldOn:!0,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function Aq(e){return e===null}var Pq=Aq;const Rq=pr(Pq);function Sl(e,t,r){let n;const o=D.getState().stage.effects.find(a=>a.target===e);if(t.duration=500,!Rq(r)&&typeof r=="number"&&(t.duration=r),n=[t],o){const a={...o.transform,duration:0};n.unshift(a)}else{const a={...t,alpha:0,duration:0};n.unshift(a)}return n}function aR(e,t){const r=C.gameplay.pixiStage.getStageObjByKey(e);function n(){r&&(r.pixiContainer.alphaFilterVal=0)}function i(){r&&(r.pixiContainer.alphaFilterVal=1)}function o(a){if(r){const s=r.pixiContainer,u=C.gameplay.pixiStage.frameDuration,c=1/(t/u*a);s.alphaFilterVal<1&&(s.alpha+=c)}}return{setStartState:n,setEndState:i,tickerFunc:o}}function sR(e,t){const r=C.gameplay.pixiStage.getStageObjByKey(e);function n(){}function i(){r&&(r.pixiContainer.alphaFilterVal=0)}function o(a){if(r){const s=r.pixiContainer,u=C.gameplay.pixiStage.frameDuration,c=1/(t/u*a);s.alphaFilterVal>0&&(s.alphaFilterVal-=c)}}return{setStartState:n,setEndState:i,tickerFunc:o}}const Mx={alpha:1,scale:{x:1,y:1},position:{x:0,y:0},rotation:0,blur:0};function uR(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);iMath.min(Math.max(r,e),t),Vv=.001,kq=.01,zE=10,Nq=.05,Lq=1;function Mq({duration:e=800,bounce:t=.25,velocity:r=0,mass:n=1}){let i,o;Iq(e<=zE*1e3);let a=1-t;a=ny(Nq,Lq,a),e=ny(kq,zE,e/1e3),a<1?(i=l=>{const c=l*a,f=c*e,h=c-r,d=iy(l,a),v=Math.exp(-f);return Vv-h/d*v},o=l=>{const f=l*a*e,h=f*r+r,d=Math.pow(a,2)*Math.pow(l,2)*e,v=Math.exp(-f),g=iy(Math.pow(l,2),a);return(-i(l)+Vv>0?-1:1)*((h-d)*v)/g}):(i=l=>{const c=Math.exp(-l*e),f=(l-r)*e+1;return-Vv+c*f},o=l=>{const c=Math.exp(-l*e),f=(r-l)*(e*e);return c*f});const s=5/e,u=Dq(i,o,s);if(e=e*1e3,isNaN(u))return{stiffness:100,damping:10,duration:e};{const l=Math.pow(u,2)*n;return{stiffness:l,damping:a*2*Math.sqrt(n*l),duration:e}}}const Fq=12;function Dq(e,t,r){let n=r;for(let i=1;ie[r]!==void 0)}function $q(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!HE(e,jq)&&HE(e,Bq)){const r=Mq(e);t=Object.assign(Object.assign(Object.assign({},t),r),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function Fx(e){var{from:t=0,to:r=1,restSpeed:n=2,restDelta:i}=e,o=uR(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:u,mass:l,velocity:c,duration:f,isResolvedFromDuration:h}=$q(o),d=VE,v=VE;function g(){const p=c?-(c/1e3):0,m=r-t,y=u/(2*Math.sqrt(s*l)),_=Math.sqrt(s/l)/1e3;if(i===void 0&&(i=Math.min(Math.abs(r-t)/100,.4)),y<1){const x=iy(_,y);d=S=>{const w=Math.exp(-y*_*S);return r-w*((p+y*_*m)/x*Math.sin(x*S)+m*Math.cos(x*S))},v=S=>{const w=Math.exp(-y*_*S);return y*_*w*(Math.sin(x*S)*(p+y*_*m)/x+m*Math.cos(x*S))-w*(Math.cos(x*S)*(p+y*_*m)-x*m*Math.sin(x*S))}}else if(y===1)d=x=>r-Math.exp(-_*x)*(m+(p+_*m)*x);else{const x=_*Math.sqrt(y*y-1);d=S=>{const w=Math.exp(-y*_*S),E=Math.min(x*S,300);return r-w*((p+y*_*m)*Math.sinh(E)+x*m*Math.cosh(E))/x}}}return g(),{next:p=>{const m=d(p);if(h)a.done=p>=f;else{const y=v(p)*1e3,_=Math.abs(y)<=n,x=Math.abs(r-m)<=i;a.done=_&&x}return a.value=a.done?r:m,a},flipTarget:()=>{c=-c,[t,r]=[r,t],g()}}}Fx.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const VE=e=>0,lR=(e,t,r)=>{const n=t-e;return n===0?1:(r-e)/n},Dx=(e,t,r)=>-r*e+r*t+e,cR=(e,t)=>r=>Math.max(Math.min(r,t),e),Yu=e=>e%1?Number(e.toFixed(5)):e,wh=/(-)?([\d]*\.?[\d])+/g,oy=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Uq=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function ic(e){return typeof e=="string"}const Id={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},fR=Object.assign(Object.assign({},Id),{transform:cR(0,1)});Object.assign(Object.assign({},Id),{default:1});const Gq=e=>({test:t=>ic(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ku=Gq("%");Object.assign(Object.assign({},Ku),{parse:e=>Ku.parse(e)/100,transform:e=>Ku.transform(e*100)});const Bx=(e,t)=>r=>!!(ic(r)&&Uq.test(r)&&r.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(r,t)),hR=(e,t,r)=>n=>{if(!ic(n))return n;const[i,o,a,s]=n.match(wh);return{[e]:parseFloat(i),[t]:parseFloat(o),[r]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},Bo={test:Bx("hsl","hue"),parse:hR("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+Ku.transform(Yu(t))+", "+Ku.transform(Yu(r))+", "+Yu(fR.transform(n))+")"},zq=cR(0,255),Wv=Object.assign(Object.assign({},Id),{transform:e=>Math.round(zq(e))}),ji={test:Bx("rgb","red"),parse:hR("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+Wv.transform(e)+", "+Wv.transform(t)+", "+Wv.transform(r)+", "+Yu(fR.transform(n))+")"};function Hq(e){let t="",r="",n="",i="";return e.length>5?(t=e.substr(1,2),r=e.substr(3,2),n=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),r=e.substr(2,1),n=e.substr(3,1),i=e.substr(4,1),t+=t,r+=r,n+=n,i+=i),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}const ay={test:Bx("#"),parse:Hq,transform:ji.transform},kd={test:e=>ji.test(e)||ay.test(e)||Bo.test(e),parse:e=>ji.test(e)?ji.parse(e):Bo.test(e)?Bo.parse(e):ay.parse(e),transform:e=>ic(e)?e:e.hasOwnProperty("red")?ji.transform(e):Bo.transform(e)},dR="${c}",pR="${n}";function Vq(e){var t,r,n,i;return isNaN(e)&&ic(e)&&((r=(t=e.match(wh))===null||t===void 0?void 0:t.length)!==null&&r!==void 0?r:0)+((i=(n=e.match(oy))===null||n===void 0?void 0:n.length)!==null&&i!==void 0?i:0)>0}function vR(e){typeof e=="number"&&(e=`${e}`);const t=[];let r=0;const n=e.match(oy);n&&(r=n.length,e=e.replace(oy,dR),t.push(...n.map(kd.parse)));const i=e.match(wh);return i&&(e=e.replace(wh,pR),t.push(...i.map(Id.parse))),{values:t,numColors:r,tokenised:e}}function mR(e){return vR(e).values}function gR(e){const{values:t,numColors:r,tokenised:n}=vR(e),i=t.length;return o=>{let a=n;for(let s=0;stypeof e=="number"?0:e;function qq(e){const t=mR(e);return gR(e)(t.map(Wq))}const yR={test:Vq,parse:mR,createTransformer:gR,getAnimatableNone:qq};function qv(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function WE({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let i=0,o=0,a=0;if(!t)i=o=a=r;else{const s=r<.5?r*(1+t):r+t-r*t,u=2*r-s;i=qv(u,s,e+1/3),o=qv(u,s,e),a=qv(u,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:n}}const Xq=(e,t,r)=>{const n=e*e,i=t*t;return Math.sqrt(Math.max(0,r*(i-n)+n))},Yq=[ay,ji,Bo],qE=e=>Yq.find(t=>t.test(e)),_R=(e,t)=>{let r=qE(e),n=qE(t),i=r.parse(e),o=n.parse(t);r===Bo&&(i=WE(i),r=ji),n===Bo&&(o=WE(o),n=ji);const a=Object.assign({},i);return s=>{for(const u in a)u!=="alpha"&&(a[u]=Xq(i[u],o[u],s));return a.alpha=Dx(i.alpha,o.alpha,s),r.transform(a)}},Kq=e=>typeof e=="number",Zq=(e,t)=>r=>t(e(r)),xR=(...e)=>e.reduce(Zq);function bR(e,t){return Kq(e)?r=>Dx(e,t,r):kd.test(e)?_R(e,t):wR(e,t)}const SR=(e,t)=>{const r=[...e],n=r.length,i=e.map((o,a)=>bR(o,t[a]));return o=>{for(let a=0;a{const r=Object.assign(Object.assign({},e),t),n={};for(const i in r)e[i]!==void 0&&t[i]!==void 0&&(n[i]=bR(e[i],t[i]));return i=>{for(const o in n)r[o]=n[o](i);return r}};function XE(e){const t=yR.parse(e),r=t.length;let n=0,i=0,o=0;for(let a=0;a{const r=yR.createTransformer(t),n=XE(e),i=XE(t);return n.numHSL===i.numHSL&&n.numRGB===i.numRGB&&n.numNumbers>=i.numNumbers?xR(SR(n.parsed,i.parsed),r):a=>`${a>0?t:e}`},Jq=(e,t)=>r=>Dx(e,t,r);function eX(e){if(typeof e=="number")return Jq;if(typeof e=="string")return kd.test(e)?_R:wR;if(Array.isArray(e))return SR;if(typeof e=="object")return Qq}function tX(e,t,r){const n=[],i=r||eX(e[0]),o=e.length-1;for(let a=0;ar(lR(e,t,n))}function nX(e,t){const r=e.length,n=r-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[n]&&(o=n-1,a=!0),!a){let u=1;for(;ui||u===n);u++);o=u-1}const s=lR(e[o],e[o+1],i);return t[o](s)}}function ER(e,t,{clamp:r=!0,ease:n,mixer:i}={}){const o=e.length;GE(o===t.length),GE(!n||!Array.isArray(n)||n.length===o-1),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=tX(t,n,i),s=o===2?rX(e,a):nX(e,a);return r?u=>s(ny(e[0],e[o-1],u)):s}const iX=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,oX=e=>t=>Math.pow(t,e),aX=e=>t=>t*t*((e+1)*t-e),sX=e=>{const t=aX(e);return r=>(r*=2)<1?.5*t(r):.5*(2-Math.pow(2,-10*(r-1)))},uX=1.525,lX=oX(2),cX=iX(lX);sX(uX);function fX(e,t){return e.map(()=>t||cX).splice(0,e.length-1)}function hX(e){const t=e.length;return e.map((r,n)=>n!==0?n/(t-1):0)}function dX(e,t){return e.map(r=>r*t)}function Af({from:e=0,to:t=1,ease:r,offset:n,duration:i=300}){const o={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=dX(n&&n.length===a.length?n:hX(a),i);function u(){return ER(s,a,{ease:Array.isArray(r)?r:fX(a,r)})}let l=u();return{next:c=>(o.value=l(c),o.done=c>=i,o),flipTarget:()=>{a.reverse(),l=u()}}}function pX({velocity:e=0,from:t=0,power:r=.8,timeConstant:n=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:t};let s=r*e;const u=t+s,l=o===void 0?u:o(u);return l!==u&&(s=l-t),{next:c=>{const f=-s*Math.exp(-c/n);return a.done=!(f>i||f<-i),a.value=a.done?l:l+f,a},flipTarget:()=>{}}}const YE={keyframes:Af,spring:Fx,decay:pX};function vX(e){if(Array.isArray(e.to))return Af;if(YE[e.type])return YE[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?Af:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?Fx:Af}const TR=1/60*1e3,mX=typeof performance<"u"?()=>performance.now():()=>Date.now(),CR=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(mX()),TR);function gX(e){let t=[],r=[],n=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(u,l=!1,c=!1)=>{const f=c&&i,h=f?t:r;return l&&a.add(u),h.indexOf(u)===-1&&(h.push(u),f&&i&&(n=t.length)),u},cancel:u=>{const l=r.indexOf(u);l!==-1&&r.splice(l,1),a.delete(u)},process:u=>{if(i){o=!0;return}if(i=!0,[t,r]=[r,t],r.length=0,n=t.length,n)for(let l=0;l(e[t]=gX(()=>wl=!0),e),{}),_X=oc.reduce((e,t)=>{const r=Nd[t];return e[t]=(n,i=!1,o=!1)=>(wl||SX(),r.schedule(n,i,o)),e},{}),xX=oc.reduce((e,t)=>(e[t]=Nd[t].cancel,e),{});oc.reduce((e,t)=>(e[t]=()=>Nd[t].process(Zu),e),{});const bX=e=>Nd[e].process(Zu),OR=e=>{wl=!1,Zu.delta=sy?TR:Math.max(Math.min(e-Zu.timestamp,yX),1),Zu.timestamp=e,uy=!0,oc.forEach(bX),uy=!1,wl&&(sy=!1,CR(OR))},SX=()=>{wl=!0,sy=!0,uy||CR(OR)},wX=_X;function AR(e,t,r=0){return e-t-r}function EX(e,t,r=0,n=!0){return n?AR(t+-e,t,r):t-(e-t)+r}function TX(e,t,r,n){return n?e>=t+r:e<=-r}const CX=e=>{const t=({delta:r})=>e(r);return{start:()=>wX.update(t,!0),stop:()=>xX.update(t)}};function OX(e){var t,r,{from:n,autoplay:i=!0,driver:o=CX,elapsed:a=0,repeat:s=0,repeatType:u="loop",repeatDelay:l=0,onPlay:c,onStop:f,onComplete:h,onRepeat:d,onUpdate:v}=e,g=uR(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:p}=g,m,y=0,_=g.duration,x,S=!1,w=!0,E;const R=vX(g);!((r=(t=R).needsInterpolation)===null||r===void 0)&&r.call(t,n,p)&&(E=ER([0,100],[n,p],{clamp:!1}),n=0,p=100);const A=R(Object.assign(Object.assign({},g),{from:n,to:p}));function P(){y++,u==="reverse"?(w=y%2===0,a=EX(a,_,l,w)):(a=AR(a,_,l),u==="mirror"&&A.flipTarget()),S=!1,d&&d()}function F(){m.stop(),h&&h()}function B(Y){if(w||(Y=-Y),a+=Y,!S){const U=A.next(Math.max(0,a));x=U.value,E&&(x=E(x)),S=w?U.done:a<=0}v==null||v(x),S&&(y===0&&(_??(_=a)),y{f==null||f(),m.stop()}}}function AX(e,t){for(var r=-1,n=e==null?0:e.length;++rs))return!1;var l=o.get(e),c=o.get(t);if(l&&c)return l==t&&c==e;var f=-1,h=!0,d=r&LX?new RX:void 0;for(o.set(e,t),o.set(t,e);++f"u"&&(typeof self<"u"?self.globalThis=self:typeof global<"u"&&(global.globalThis=global));globalThis.Promise||(globalThis.Promise=yt);Object.assign||(Object.assign=LM);var XZ=16;Date.now&&Date.prototype.getTime||(Date.now=function(){return new Date().getTime()});if(!(globalThis.performance&&globalThis.performance.now)){var YZ=Date.now();globalThis.performance||(globalThis.performance={}),globalThis.performance.now=function(){return Date.now()-YZ}}var Zv=Date.now(),fT=["ms","moz","webkit","o"];for(var Qv=0;Qv0?1:-1});Number.isInteger||(Number.isInteger=function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t});globalThis.ArrayBuffer||(globalThis.ArrayBuffer=Array);globalThis.Float32Array||(globalThis.Float32Array=Array);globalThis.Uint32Array||(globalThis.Uint32Array=Array);globalThis.Uint16Array||(globalThis.Uint16Array=Array);globalThis.Uint8Array||(globalThis.Uint8Array=Array);globalThis.Int32Array||(globalThis.Int32Array=Array);/*! + * @pixi/constants - v6.5.10 + * Compiled Thu, 06 Jul 2023 15:25:11 UTC + * + * @pixi/constants is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */var Zn;(function(e){e[e.WEBGL_LEGACY=0]="WEBGL_LEGACY",e[e.WEBGL=1]="WEBGL",e[e.WEBGL2=2]="WEBGL2"})(Zn||(Zn={}));var ds;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.WEBGL=1]="WEBGL",e[e.CANVAS=2]="CANVAS"})(ds||(ds={}));var Tl;(function(e){e[e.COLOR=16384]="COLOR",e[e.DEPTH=256]="DEPTH",e[e.STENCIL=1024]="STENCIL"})(Tl||(Tl={}));var ce;(function(e){e[e.NORMAL=0]="NORMAL",e[e.ADD=1]="ADD",e[e.MULTIPLY=2]="MULTIPLY",e[e.SCREEN=3]="SCREEN",e[e.OVERLAY=4]="OVERLAY",e[e.DARKEN=5]="DARKEN",e[e.LIGHTEN=6]="LIGHTEN",e[e.COLOR_DODGE=7]="COLOR_DODGE",e[e.COLOR_BURN=8]="COLOR_BURN",e[e.HARD_LIGHT=9]="HARD_LIGHT",e[e.SOFT_LIGHT=10]="SOFT_LIGHT",e[e.DIFFERENCE=11]="DIFFERENCE",e[e.EXCLUSION=12]="EXCLUSION",e[e.HUE=13]="HUE",e[e.SATURATION=14]="SATURATION",e[e.COLOR=15]="COLOR",e[e.LUMINOSITY=16]="LUMINOSITY",e[e.NORMAL_NPM=17]="NORMAL_NPM",e[e.ADD_NPM=18]="ADD_NPM",e[e.SCREEN_NPM=19]="SCREEN_NPM",e[e.NONE=20]="NONE",e[e.SRC_OVER=0]="SRC_OVER",e[e.SRC_IN=21]="SRC_IN",e[e.SRC_OUT=22]="SRC_OUT",e[e.SRC_ATOP=23]="SRC_ATOP",e[e.DST_OVER=24]="DST_OVER",e[e.DST_IN=25]="DST_IN",e[e.DST_OUT=26]="DST_OUT",e[e.DST_ATOP=27]="DST_ATOP",e[e.ERASE=26]="ERASE",e[e.SUBTRACT=28]="SUBTRACT",e[e.XOR=29]="XOR"})(ce||(ce={}));var tn;(function(e){e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN"})(tn||(tn={}));var J;(function(e){e[e.RGBA=6408]="RGBA",e[e.RGB=6407]="RGB",e[e.RG=33319]="RG",e[e.RED=6403]="RED",e[e.RGBA_INTEGER=36249]="RGBA_INTEGER",e[e.RGB_INTEGER=36248]="RGB_INTEGER",e[e.RG_INTEGER=33320]="RG_INTEGER",e[e.RED_INTEGER=36244]="RED_INTEGER",e[e.ALPHA=6406]="ALPHA",e[e.LUMINANCE=6409]="LUMINANCE",e[e.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",e[e.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL"})(J||(J={}));var Qi;(function(e){e[e.TEXTURE_2D=3553]="TEXTURE_2D",e[e.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",e[e.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"})(Qi||(Qi={}));var fe;(function(e){e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",e[e.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",e[e.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",e[e.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",e[e.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",e[e.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",e[e.BYTE=5120]="BYTE",e[e.SHORT=5122]="SHORT",e[e.INT=5124]="INT",e[e.FLOAT=5126]="FLOAT",e[e.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",e[e.HALF_FLOAT=36193]="HALF_FLOAT"})(fe||(fe={}));var Cl;(function(e){e[e.FLOAT=0]="FLOAT",e[e.INT=1]="INT",e[e.UINT=2]="UINT"})(Cl||(Cl={}));var Pr;(function(e){e[e.NEAREST=0]="NEAREST",e[e.LINEAR=1]="LINEAR"})(Pr||(Pr={}));var bn;(function(e){e[e.CLAMP=33071]="CLAMP",e[e.REPEAT=10497]="REPEAT",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"})(bn||(bn={}));var Lr;(function(e){e[e.OFF=0]="OFF",e[e.POW2=1]="POW2",e[e.ON=2]="ON",e[e.ON_MANUAL=3]="ON_MANUAL"})(Lr||(Lr={}));var un;(function(e){e[e.NPM=0]="NPM",e[e.UNPACK=1]="UNPACK",e[e.PMA=2]="PMA",e[e.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",e[e.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",e[e.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA",e[e.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA"})(un||(un={}));var Zr;(function(e){e[e.NO=0]="NO",e[e.YES=1]="YES",e[e.AUTO=2]="AUTO",e[e.BLEND=0]="BLEND",e[e.CLEAR=1]="CLEAR",e[e.BLIT=2]="BLIT"})(Zr||(Zr={}));var Ol;(function(e){e[e.AUTO=0]="AUTO",e[e.MANUAL=1]="MANUAL"})(Ol||(Ol={}));var Rr;(function(e){e.LOW="lowp",e.MEDIUM="mediump",e.HIGH="highp"})(Rr||(Rr={}));var Tt;(function(e){e[e.NONE=0]="NONE",e[e.SCISSOR=1]="SCISSOR",e[e.STENCIL=2]="STENCIL",e[e.SPRITE=3]="SPRITE",e[e.COLOR=4]="COLOR"})(Tt||(Tt={}));var fy;(function(e){e[e.RED=1]="RED",e[e.GREEN=2]="GREEN",e[e.BLUE=4]="BLUE",e[e.ALPHA=8]="ALPHA"})(fy||(fy={}));var ut;(function(e){e[e.NONE=0]="NONE",e[e.LOW=2]="LOW",e[e.MEDIUM=4]="MEDIUM",e[e.HIGH=8]="HIGH"})(ut||(ut={}));var Sn;(function(e){e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER"})(Sn||(Sn={}));/*! + * @pixi/settings - v6.5.10 + * Compiled Thu, 06 Jul 2023 15:25:11 UTC + * + * @pixi/settings is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */var zR={createCanvas:function(e,t){var r=document.createElement("canvas");return r.width=e,r.height=t,r},getWebGLRenderingContext:function(){return WebGLRenderingContext},getNavigator:function(){return navigator},getBaseUrl:function(){var e;return(e=document.baseURI)!==null&&e!==void 0?e:window.location.href},fetch:function(e,t){return fetch(e,t)}},em=/iPhone/i,hT=/iPod/i,dT=/iPad/i,pT=/\biOS-universal(?:.+)Mac\b/i,tm=/\bAndroid(?:.+)Mobile\b/i,vT=/Android/i,ba=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,kc=/Silk/i,si=/Windows Phone/i,mT=/\bWindows(?:.+)ARM\b/i,gT=/BlackBerry/i,yT=/BB10/i,_T=/Opera Mini/i,xT=/\b(CriOS|Chrome)(?:.+)Mobile/i,bT=/Mobile(?:.+)Firefox\b/i,ST=function(e){return typeof e<"u"&&e.platform==="MacIntel"&&typeof e.maxTouchPoints=="number"&&e.maxTouchPoints>1&&typeof MSStream>"u"};function KZ(e){return function(t){return t.test(e)}}function ZZ(e){var t={userAgent:"",platform:"",maxTouchPoints:0};!e&&typeof navigator<"u"?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof e=="string"?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0});var r=t.userAgent,n=r.split("[FBAN");typeof n[1]<"u"&&(r=n[0]),n=r.split("Twitter"),typeof n[1]<"u"&&(r=n[0]);var i=KZ(r),o={apple:{phone:i(em)&&!i(si),ipod:i(hT),tablet:!i(em)&&(i(dT)||ST(t))&&!i(si),universal:i(pT),device:(i(em)||i(hT)||i(dT)||i(pT)||ST(t))&&!i(si)},amazon:{phone:i(ba),tablet:!i(ba)&&i(kc),device:i(ba)||i(kc)},android:{phone:!i(si)&&i(ba)||!i(si)&&i(tm),tablet:!i(si)&&!i(ba)&&!i(tm)&&(i(kc)||i(vT)),device:!i(si)&&(i(ba)||i(kc)||i(tm)||i(vT))||i(/\bokhttp\b/i)},windows:{phone:i(si),tablet:i(mT),device:i(si)||i(mT)},other:{blackberry:i(gT),blackberry10:i(yT),opera:i(_T),firefox:i(bT),chrome:i(xT),device:i(gT)||i(yT)||i(_T)||i(bT)||i(xT)},any:!1,phone:!1,tablet:!1};return o.any=o.apple.device||o.android.device||o.windows.device||o.other.device,o.phone=o.apple.phone||o.android.phone||o.windows.phone,o.tablet=o.apple.tablet||o.android.tablet||o.windows.tablet,o}var rn=ZZ(globalThis.navigator);function QZ(){return!rn.apple.device}function JZ(e){var t=!0;if(rn.tablet||rn.phone){if(rn.apple.device){var r=navigator.userAgent.match(/OS (\d+)_(\d+)?/);if(r){var n=parseInt(r[1],10);n<11&&(t=!1)}}if(rn.android.device){var r=navigator.userAgent.match(/Android\s([0-9.]*)/);if(r){var n=parseInt(r[1],10);n<7&&(t=!1)}}}return t?e:4}var ne={ADAPTER:zR,MIPMAP_TEXTURES:Lr.POW2,ANISOTROPIC_LEVEL:0,RESOLUTION:1,FILTER_RESOLUTION:1,FILTER_MULTISAMPLE:ut.NONE,SPRITE_MAX_TEXTURES:JZ(32),SPRITE_BATCH_SIZE:4096,RENDER_OPTIONS:{view:null,width:800,height:600,autoDensity:!1,backgroundColor:0,backgroundAlpha:1,useContextAlpha:!0,clearBeforeRender:!0,antialias:!1,preserveDrawingBuffer:!1},GC_MODE:Ol.AUTO,GC_MAX_IDLE:60*60,GC_MAX_CHECK_COUNT:60*10,WRAP_MODE:bn.CLAMP,SCALE_MODE:Pr.LINEAR,PRECISION_VERTEX:Rr.HIGH,PRECISION_FRAGMENT:rn.apple.device?Rr.HIGH:Rr.MEDIUM,CAN_UPLOAD_SAME_BUFFER:QZ(),CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1},HR={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(u,l,c){this.fn=u,this.context=l,this.once=c||!1}function o(u,l,c,f,h){if(typeof c!="function")throw new TypeError("The listener must be a function");var d=new i(c,f||u,h),v=r?r+l:l;return u._events[v]?u._events[v].fn?u._events[v]=[u._events[v],d]:u._events[v].push(d):(u._events[v]=d,u._eventsCount++),u}function a(u,l){--u._eventsCount===0?u._events=new n:delete u._events[l]}function s(){this._events=new n,this._eventsCount=0}s.prototype.eventNames=function(){var l=[],c,f;if(this._eventsCount===0)return l;for(f in c=this._events)t.call(c,f)&&l.push(r?f.slice(1):f);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(c)):l},s.prototype.listeners=function(l){var c=r?r+l:l,f=this._events[c];if(!f)return[];if(f.fn)return[f.fn];for(var h=0,d=f.length,v=new Array(d);h80*r){s=l=e[0],u=c=e[1];for(var v=r;vl&&(l=f),h>c&&(c=h);d=Math.max(l-s,c-u),d=d!==0?32767/d:0}return Al(o,a,r,s,u,d,0),a}function VR(e,t,r,n,i){var o,a;if(i===py(e,t,r,n)>0)for(o=t;o=t;o-=n)a=wT(o,e[o],e[o+1],a);return a&&Dd(a,a.next)&&(Rl(a),a=a.next),a}function ea(e,t){if(!e)return e;t||(t=e);var r=e,n;do if(n=!1,!r.steiner&&(Dd(r,r.next)||mt(r.prev,r,r.next)===0)){if(Rl(r),r=t=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==t);return t}function Al(e,t,r,n,i,o,a){if(e){!a&&o&&cQ(e,n,i,o);for(var s=e,u,l;e.prev!==e.next;){if(u=e.prev,l=e.next,o?rQ(e,n,i,o):tQ(e)){t.push(u.i/r|0),t.push(e.i/r|0),t.push(l.i/r|0),Rl(e),e=l.next,s=l.next;continue}if(e=l,e===s){a?a===1?(e=nQ(ea(e),t,r),Al(e,t,r,n,i,o,2)):a===2&&iQ(e,t,r,n,i,o):Al(ea(e),t,r,n,i,o,1);break}}}}function tQ(e){var t=e.prev,r=e,n=e.next;if(mt(t,r,n)>=0)return!1;for(var i=t.x,o=r.x,a=n.x,s=t.y,u=r.y,l=n.y,c=io?i>a?i:a:o>a?o:a,d=s>u?s>l?s:l:u>l?u:l,v=n.next;v!==t;){if(v.x>=c&&v.x<=h&&v.y>=f&&v.y<=d&&Ba(i,s,o,u,a,l,v.x,v.y)&&mt(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function rQ(e,t,r,n){var i=e.prev,o=e,a=e.next;if(mt(i,o,a)>=0)return!1;for(var s=i.x,u=o.x,l=a.x,c=i.y,f=o.y,h=a.y,d=su?s>l?s:l:u>l?u:l,p=c>f?c>h?c:h:f>h?f:h,m=hy(d,v,t,r,n),y=hy(g,p,t,r,n),_=e.prevZ,x=e.nextZ;_&&_.z>=m&&x&&x.z<=y;){if(_.x>=d&&_.x<=g&&_.y>=v&&_.y<=p&&_!==i&&_!==a&&Ba(s,c,u,f,l,h,_.x,_.y)&&mt(_.prev,_,_.next)>=0||(_=_.prevZ,x.x>=d&&x.x<=g&&x.y>=v&&x.y<=p&&x!==i&&x!==a&&Ba(s,c,u,f,l,h,x.x,x.y)&&mt(x.prev,x,x.next)>=0))return!1;x=x.nextZ}for(;_&&_.z>=m;){if(_.x>=d&&_.x<=g&&_.y>=v&&_.y<=p&&_!==i&&_!==a&&Ba(s,c,u,f,l,h,_.x,_.y)&&mt(_.prev,_,_.next)>=0)return!1;_=_.prevZ}for(;x&&x.z<=y;){if(x.x>=d&&x.x<=g&&x.y>=v&&x.y<=p&&x!==i&&x!==a&&Ba(s,c,u,f,l,h,x.x,x.y)&&mt(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function nQ(e,t,r){var n=e;do{var i=n.prev,o=n.next.next;!Dd(i,o)&&WR(i,n,n.next,o)&&Pl(i,o)&&Pl(o,i)&&(t.push(i.i/r|0),t.push(n.i/r|0),t.push(o.i/r|0),Rl(n),Rl(n.next),n=e=o),n=n.next}while(n!==e);return ea(n)}function iQ(e,t,r,n,i,o){var a=e;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&dQ(a,s)){var u=qR(a,s);a=ea(a,a.next),u=ea(u,u.next),Al(a,t,r,n,i,o,0),Al(u,t,r,n,i,o,0);return}s=s.next}a=a.next}while(a!==e)}function oQ(e,t,r,n){var i=[],o,a,s,u,l;for(o=0,a=t.length;o=r.next.y&&r.next.y!==r.y){var s=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=n&&s>o&&(o=s,a=r.x=r.x&&r.x>=l&&n!==r.x&&Ba(ia.x||r.x===a.x&&lQ(a,r)))&&(a=r,f=h)),r=r.next;while(r!==u);return a}function lQ(e,t){return mt(e.prev,e,t.prev)<0&&mt(t.next,e,e.next)<0}function cQ(e,t,r,n){var i=e;do i.z===0&&(i.z=hy(i.x,i.y,t,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,fQ(i)}function fQ(e){var t,r,n,i,o,a,s,u,l=1;do{for(r=e,e=null,o=null,a=0;r;){for(a++,n=r,s=0,t=0;t0||u>0&&n;)s!==0&&(u===0||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,u--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;r=n}o.nextZ=null,l*=2}while(a>1);return e}function hy(e,t,r,n,i){return e=(e-r)*i|0,t=(t-n)*i|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function hQ(e){var t=e,r=e;do(t.x=(e-a)*(o-s)&&(e-a)*(n-s)>=(r-a)*(t-s)&&(r-a)*(o-s)>=(i-a)*(n-s)}function dQ(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!pQ(e,t)&&(Pl(e,t)&&Pl(t,e)&&vQ(e,t)&&(mt(e.prev,e,t.prev)||mt(e,t.prev,t))||Dd(e,t)&&mt(e.prev,e,e.next)>0&&mt(t.prev,t,t.next)>0)}function mt(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function Dd(e,t){return e.x===t.x&&e.y===t.y}function WR(e,t,r,n){var i=Lc(mt(e,t,r)),o=Lc(mt(e,t,n)),a=Lc(mt(r,n,e)),s=Lc(mt(r,n,t));return!!(i!==o&&a!==s||i===0&&Nc(e,r,t)||o===0&&Nc(e,n,t)||a===0&&Nc(r,e,n)||s===0&&Nc(r,t,n))}function Nc(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function Lc(e){return e>0?1:e<0?-1:0}function pQ(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&WR(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function Pl(e,t){return mt(e.prev,e,e.next)<0?mt(e,t,e.next)>=0&&mt(e,e.prev,t)>=0:mt(e,t,e.prev)<0||mt(e,e.next,t)<0}function vQ(e,t){var r=e,n=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do r.y>o!=r.next.y>o&&r.next.y!==r.y&&i<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next;while(r!==e);return n}function qR(e,t){var r=new dy(e.i,e.x,e.y),n=new dy(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,o.next=n,n.prev=o,n}function wT(e,t,r,n){var i=new dy(e,t,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function Rl(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function dy(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}Fd.deviation=function(e,t,r,n){var i=t&&t.length,o=i?t[0]*r:e.length,a=Math.abs(py(e,0,o,r));if(i)for(var s=0,u=t.length;s0&&(n+=e[i-1].length,r.holes.push(n))}return r};var mQ=Gx.exports;const zx=pr(mQ);var Eh={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */Eh.exports;(function(e,t){(function(r){var n=t&&!t.nodeType&&t,i=e&&!e.nodeType&&e,o=typeof en=="object"&&en;(o.global===o||o.window===o||o.self===o)&&(r=o);var a,s=2147483647,u=36,l=1,c=26,f=38,h=700,d=72,v=128,g="-",p=/^xn--/,m=/[^\x20-\x7E]/,y=/[\x2E\u3002\uFF0E\uFF61]/g,_={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},x=u-l,S=Math.floor,w=String.fromCharCode,E;function R(W){throw new RangeError(_[W])}function A(W,L){for(var q=W.length,re=[];q--;)re[q]=L(W[q]);return re}function P(W,L){var q=W.split("@"),re="";q.length>1&&(re=q[0]+"@",W=q[1]),W=W.replace(y,".");var ue=W.split("."),ye=A(ue,L).join(".");return re+ye}function F(W){for(var L=[],q=0,re=W.length,ue,ye;q=55296&&ue<=56319&&q65535&&(L-=65536,q+=w(L>>>10&1023|55296),L=56320|L&1023),q+=w(L),q}).join("")}function $(W){return W-48<10?W-22:W-65<26?W-65:W-97<26?W-97:u}function Y(W,L){return W+22+75*(W<26)-((L!=0)<<5)}function U(W,L,q){var re=0;for(W=q?S(W/h):W>>1,W+=S(W/L);W>x*c>>1;re+=u)W=S(W/x);return S(re+(x+1)*W/(W+f))}function z(W){var L=[],q=W.length,re,ue=0,ye=v,Se=d,we,Ue,He,Qe,Ae,De,Ve,Ee,ct;for(we=W.lastIndexOf(g),we<0&&(we=0),Ue=0;Ue=128&&R("not-basic"),L.push(W.charCodeAt(Ue));for(He=we>0?we+1:0;He=q&&R("invalid-input"),Ve=$(W.charCodeAt(He++)),(Ve>=u||Ve>S((s-ue)/Ae))&&R("overflow"),ue+=Ve*Ae,Ee=De<=Se?l:De>=Se+c?c:De-Se,!(VeS(s/ct)&&R("overflow"),Ae*=ct;re=L.length+1,Se=U(ue-Qe,re,Qe==0),S(ue/re)>s-ye&&R("overflow"),ye+=S(ue/re),ue%=re,L.splice(ue++,0,ye)}return B(L)}function ie(W){var L,q,re,ue,ye,Se,we,Ue,He,Qe,Ae,De=[],Ve,Ee,ct,ir;for(W=F(W),Ve=W.length,L=v,q=0,ye=d,Se=0;Se=L&&AeS((s-q)/Ee)&&R("overflow"),q+=(we-L)*Ee,L=we,Se=0;Ses&&R("overflow"),Ae==L){for(Ue=q,He=u;Qe=He<=ye?l:He>=ye+c?c:He-ye,!(Ue"u"||!zt?Re:zt(Uint8Array),Ho={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Re:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Re:ArrayBuffer,"%ArrayIteratorPrototype%":Sa&&zt?zt([][Symbol.iterator]()):Re,"%AsyncFromSyncIteratorPrototype%":Re,"%AsyncFunction%":Ia,"%AsyncGenerator%":Ia,"%AsyncGeneratorFunction%":Ia,"%AsyncIteratorPrototype%":Ia,"%Atomics%":typeof Atomics>"u"?Re:Atomics,"%BigInt%":typeof BigInt>"u"?Re:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Re:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Re:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Re:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":$Q,"%eval%":eval,"%EvalError%":UQ,"%Float32Array%":typeof Float32Array>"u"?Re:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Re:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Re:FinalizationRegistry,"%Function%":YR,"%GeneratorFunction%":Ia,"%Int8Array%":typeof Int8Array>"u"?Re:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Re:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Re:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Sa&&zt?zt(zt([][Symbol.iterator]())):Re,"%JSON%":typeof JSON=="object"?JSON:Re,"%Map%":typeof Map>"u"?Re:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Sa||!zt?Re:zt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Re:Promise,"%Proxy%":typeof Proxy>"u"?Re:Proxy,"%RangeError%":GQ,"%ReferenceError%":zQ,"%Reflect%":typeof Reflect>"u"?Re:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Re:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Sa||!zt?Re:zt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Re:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Sa&&zt?zt(""[Symbol.iterator]()):Re,"%Symbol%":Sa?Symbol:Re,"%SyntaxError%":ps,"%ThrowTypeError%":VQ,"%TypedArray%":qQ,"%TypeError%":rs,"%Uint8Array%":typeof Uint8Array>"u"?Re:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Re:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Re:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Re:Uint32Array,"%URIError%":HQ,"%WeakMap%":typeof WeakMap>"u"?Re:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Re:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Re:WeakSet};if(zt)try{null.error}catch(e){var XQ=zt(zt(e));Ho["%Error.prototype%"]=XQ}var YQ=function e(t){var r;if(t==="%AsyncFunction%")r=nm("async function () {}");else if(t==="%GeneratorFunction%")r=nm("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=nm("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&zt&&(r=zt(i.prototype))}return Ho[t]=r,r},CT={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},uc=Hx,Th=jQ,KQ=uc.call(Function.call,Array.prototype.concat),ZQ=uc.call(Function.apply,Array.prototype.splice),OT=uc.call(Function.call,String.prototype.replace),Ch=uc.call(Function.call,String.prototype.slice),QQ=uc.call(Function.call,RegExp.prototype.exec),JQ=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,eJ=/\\(\\)?/g,tJ=function(t){var r=Ch(t,0,1),n=Ch(t,-1);if(r==="%"&&n!=="%")throw new ps("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new ps("invalid intrinsic syntax, expected opening `%`");var i=[];return OT(t,JQ,function(o,a,s,u){i[i.length]=s?OT(u,eJ,"$1"):a||o}),i},rJ=function(t,r){var n=t,i;if(Th(CT,n)&&(i=CT[n],n="%"+i[0]+"%"),Th(Ho,n)){var o=Ho[n];if(o===Ia&&(o=YQ(n)),typeof o>"u"&&!r)throw new rs("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:o}}throw new ps("intrinsic "+t+" does not exist!")},Us=function(t,r){if(typeof t!="string"||t.length===0)throw new rs("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new rs('"allowMissing" argument must be a boolean');if(QQ(/^%?[^%]*%?$/,t)===null)throw new ps("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=tJ(t),i=n.length>0?n[0]:"",o=rJ("%"+i+"%",r),a=o.name,s=o.value,u=!1,l=o.alias;l&&(i=l[0],ZQ(n,KQ([0,1],l)));for(var c=1,f=!0;c=n.length){var g=zo(s,h);f=!!g,f&&"get"in g&&!("originalValue"in g.get)?s=g.get:s=s[h]}else f=Th(s,h),s=s[h];f&&!u&&(Ho[a]=s)}}return s},KR={exports:{}},om,AT;function Vx(){if(AT)return om;AT=1;var e=Us,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return om=t,om}var nJ=Us,Pf=nJ("%Object.getOwnPropertyDescriptor%",!0);if(Pf)try{Pf([],"length")}catch{Pf=null}var ZR=Pf,PT=Vx(),iJ=XR,wa=sc,RT=ZR,oJ=function(t,r,n){if(!t||typeof t!="object"&&typeof t!="function")throw new wa("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new wa("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new wa("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new wa("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new wa("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new wa("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,a=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,u=!!RT&&RT(t,r);if(PT)PT(t,r,{configurable:a===null&&u?u.configurable:!a,enumerable:i===null&&u?u.enumerable:!i,value:n,writable:o===null&&u?u.writable:!o});else if(s||!i&&!o&&!a)t[r]=n;else throw new iJ("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},vy=Vx(),QR=function(){return!!vy};QR.hasArrayLengthDefineBug=function(){if(!vy)return null;try{return vy([],"length",{value:1}).length!==1}catch{return!0}};var aJ=QR,sJ=Us,IT=oJ,uJ=aJ(),kT=ZR,NT=sc,lJ=sJ("%Math.floor%"),cJ=function(t,r){if(typeof t!="function")throw new NT("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||lJ(r)!==r)throw new NT("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,o=!0;if("length"in t&&kT){var a=kT(t,"length");a&&!a.configurable&&(i=!1),a&&!a.writable&&(o=!1)}return(i||o||!n)&&(uJ?IT(t,"length",r,!0,!0):IT(t,"length",r)),t};(function(e){var t=Hx,r=Us,n=cJ,i=sc,o=r("%Function.prototype.apply%"),a=r("%Function.prototype.call%"),s=r("%Reflect.apply%",!0)||t.call(a,o),u=Vx(),l=r("%Math.max%");e.exports=function(h){if(typeof h!="function")throw new i("a function is required");var d=s(t,a,arguments);return n(d,1+l(0,h.length-(arguments.length-1)),!0)};var c=function(){return s(t,o,arguments)};u?u(e.exports,"apply",{value:c}):e.exports.apply=c})(KR);var fJ=KR.exports,JR=Us,eI=fJ,hJ=eI(JR("String.prototype.indexOf")),dJ=function(t,r){var n=JR(t,!!r);return typeof n=="function"&&hJ(t,".prototype.")>-1?eI(n):n};const pJ={},vJ=Object.freeze(Object.defineProperty({__proto__:null,default:pJ},Symbol.toStringTag,{value:"Module"})),mJ=PM(vJ);var Wx=typeof Map=="function"&&Map.prototype,am=Object.getOwnPropertyDescriptor&&Wx?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Oh=Wx&&am&&typeof am.get=="function"?am.get:null,LT=Wx&&Map.prototype.forEach,qx=typeof Set=="function"&&Set.prototype,sm=Object.getOwnPropertyDescriptor&&qx?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Ah=qx&&sm&&typeof sm.get=="function"?sm.get:null,MT=qx&&Set.prototype.forEach,gJ=typeof WeakMap=="function"&&WeakMap.prototype,Qu=gJ?WeakMap.prototype.has:null,yJ=typeof WeakSet=="function"&&WeakSet.prototype,Ju=yJ?WeakSet.prototype.has:null,_J=typeof WeakRef=="function"&&WeakRef.prototype,FT=_J?WeakRef.prototype.deref:null,xJ=Boolean.prototype.valueOf,bJ=Object.prototype.toString,SJ=Function.prototype.toString,wJ=String.prototype.match,Xx=String.prototype.slice,$i=String.prototype.replace,EJ=String.prototype.toUpperCase,DT=String.prototype.toLowerCase,tI=RegExp.prototype.test,BT=Array.prototype.concat,Mn=Array.prototype.join,TJ=Array.prototype.slice,jT=Math.floor,my=typeof BigInt=="function"?BigInt.prototype.valueOf:null,um=Object.getOwnPropertySymbols,gy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,vs=typeof Symbol=="function"&&typeof Symbol.iterator=="object",dr=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===vs||"symbol")?Symbol.toStringTag:null,rI=Object.prototype.propertyIsEnumerable,$T=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function UT(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||tI.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-jT(-e):jT(e);if(n!==e){var i=String(n),o=Xx.call(t,i.length+1);return $i.call(i,r,"$&_")+"."+$i.call($i.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return $i.call(t,r,"$&_")}var yy=mJ,GT=yy.custom,zT=iI(GT)?GT:null,CJ=function e(t,r,n,i){var o=r||{};if(Ii(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ii(o,"maxStringLength")&&(typeof o.maxStringLength=="number"?o.maxStringLength<0&&o.maxStringLength!==1/0:o.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=Ii(o,"customInspect")?o.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Ii(o,"indent")&&o.indent!==null&&o.indent!==" "&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Ii(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=o.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return aI(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var u=String(t);return s?UT(t,u):u}if(typeof t=="bigint"){var l=String(t)+"n";return s?UT(t,l):l}var c=typeof o.depth>"u"?5:o.depth;if(typeof n>"u"&&(n=0),n>=c&&c>0&&typeof t=="object")return _y(t)?"[Array]":"[Object]";var f=HJ(o,n);if(typeof i>"u")i=[];else if(oI(i,t)>=0)return"[Circular]";function h($,Y,U){if(Y&&(i=TJ.call(i),i.push(Y)),U){var z={depth:o.depth};return Ii(o,"quoteStyle")&&(z.quoteStyle=o.quoteStyle),e($,z,n+1,i)}return e($,o,n+1,i)}if(typeof t=="function"&&!HT(t)){var d=MJ(t),v=Mc(t,h);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(v.length>0?" { "+Mn.call(v,", ")+" }":"")}if(iI(t)){var g=vs?$i.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):gy.call(t);return typeof t=="object"&&!vs?vu(g):g}if(UJ(t)){for(var p="<"+DT.call(String(t.nodeName)),m=t.attributes||[],y=0;y",p}if(_y(t)){if(t.length===0)return"[]";var _=Mc(t,h);return f&&!zJ(_)?"["+xy(_,f)+"]":"[ "+Mn.call(_,", ")+" ]"}if(PJ(t)){var x=Mc(t,h);return!("cause"in Error.prototype)&&"cause"in t&&!rI.call(t,"cause")?"{ ["+String(t)+"] "+Mn.call(BT.call("[cause]: "+h(t.cause),x),", ")+" }":x.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Mn.call(x,", ")+" }"}if(typeof t=="object"&&a){if(zT&&typeof t[zT]=="function"&&yy)return yy(t,{depth:c-n});if(a!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(FJ(t)){var S=[];return LT&<.call(t,function($,Y){S.push(h(Y,t,!0)+" => "+h($,t))}),VT("Map",Oh.call(t),S,f)}if(jJ(t)){var w=[];return MT&&MT.call(t,function($){w.push(h($,t))}),VT("Set",Ah.call(t),w,f)}if(DJ(t))return lm("WeakMap");if($J(t))return lm("WeakSet");if(BJ(t))return lm("WeakRef");if(IJ(t))return vu(h(Number(t)));if(NJ(t))return vu(h(my.call(t)));if(kJ(t))return vu(xJ.call(t));if(RJ(t))return vu(h(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(t===en)return"{ [object globalThis] }";if(!AJ(t)&&!HT(t)){var E=Mc(t,h),R=$T?$T(t)===Object.prototype:t instanceof Object||t.constructor===Object,A=t instanceof Object?"":"null prototype",P=!R&&dr&&Object(t)===t&&dr in t?Xx.call(go(t),8,-1):A?"Object":"",F=R||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",B=F+(P||A?"["+Mn.call(BT.call([],P||[],A||[]),": ")+"] ":"");return E.length===0?B+"{}":f?B+"{"+xy(E,f)+"}":B+"{ "+Mn.call(E,", ")+" }"}return String(t)};function nI(e,t,r){var n=(r.quoteStyle||t)==="double"?'"':"'";return n+e+n}function OJ(e){return $i.call(String(e),/"/g,""")}function _y(e){return go(e)==="[object Array]"&&(!dr||!(typeof e=="object"&&dr in e))}function AJ(e){return go(e)==="[object Date]"&&(!dr||!(typeof e=="object"&&dr in e))}function HT(e){return go(e)==="[object RegExp]"&&(!dr||!(typeof e=="object"&&dr in e))}function PJ(e){return go(e)==="[object Error]"&&(!dr||!(typeof e=="object"&&dr in e))}function RJ(e){return go(e)==="[object String]"&&(!dr||!(typeof e=="object"&&dr in e))}function IJ(e){return go(e)==="[object Number]"&&(!dr||!(typeof e=="object"&&dr in e))}function kJ(e){return go(e)==="[object Boolean]"&&(!dr||!(typeof e=="object"&&dr in e))}function iI(e){if(vs)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!gy)return!1;try{return gy.call(e),!0}catch{}return!1}function NJ(e){if(!e||typeof e!="object"||!my)return!1;try{return my.call(e),!0}catch{}return!1}var LJ=Object.prototype.hasOwnProperty||function(e){return e in this};function Ii(e,t){return LJ.call(e,t)}function go(e){return bJ.call(e)}function MJ(e){if(e.name)return e.name;var t=wJ.call(SJ.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function oI(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;rt.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return aI(Xx.call(e,0,t.maxStringLength),t)+n}var i=$i.call($i.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,GJ);return nI(i,"single",t)}function GJ(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+EJ.call(t.toString(16))}function vu(e){return"Object("+e+")"}function lm(e){return e+" { ? }"}function VT(e,t,r,n){var i=n?xy(r,n):Mn.call(r,", ");return e+" ("+t+") {"+i+"}"}function zJ(e){for(var t=0;t=0)return!1;return!0}function HJ(e,t){var r;if(e.indent===" ")r=" ";else if(typeof e.indent=="number"&&e.indent>0)r=Mn.call(Array(e.indent+1)," ");else return null;return{base:r,prev:Mn.call(Array(t+1),r)}}function xy(e,t){if(e.length===0)return"";var r=` +`+t.prev+t.base;return r+Mn.call(e,","+r)+` +`+t.prev}function Mc(e,t){var r=_y(e),n=[];if(r){n.length=e.length;for(var i=0;i1;){var r=t.pop(),n=r.obj[r.prop];if(ko(n)){for(var i=[],o=0;o=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||o===oee.RFC1738&&(l===40||l===41)){s+=a.charAt(u);continue}if(l<128){s=s+In[l];continue}if(l<2048){s=s+(In[192|l>>6]+In[128|l&63]);continue}if(l<55296||l>=57344){s=s+(In[224|l>>12]+In[128|l>>6&63]+In[128|l&63]);continue}u+=1,l=65536+((l&1023)<<10|a.charCodeAt(u)&1023),s+=In[240|l>>18]+In[128|l>>12&63]+In[128|l>>6&63]+In[128|l&63]}return s},fee=function(t){for(var r=[{obj:{o:t},prop:"o"}],n=[],i=0;i"u"&&(S=0)}if(typeof c=="function"?_=c(r,_):_ instanceof Date?_=d(_):n==="comma"&&Nn(_)&&(_=Rf.maybeMap(_,function(W){return W instanceof Date?d(W):W})),_===null){if(a)return l&&!p?l(r,Nt.encoder,m,"key",v):r;_=""}if(_ee(_)||Rf.isBuffer(_)){if(l){var R=p?r:l(r,Nt.encoder,m,"key",v);return[g(R)+"="+g(l(_,Nt.encoder,m,"value",v))]}return[g(r)+"="+g(String(_))]}var A=[];if(typeof _>"u")return A;var P;if(n==="comma"&&Nn(_))p&&l&&(_=Rf.maybeMap(_,l)),P=[{value:_.length>0?_.join(",")||null:void 0}];else if(Nn(c))P=c;else{var F=Object.keys(_);P=f?F.sort(f):F}var B=u?r.replace(/\./g,"%2E"):r,$=i&&Nn(_)&&_.length===1?B+"[]":B;if(o&&Nn(_)&&_.length===0)return $+"[]";for(var Y=0;Y"u"?t.encodeDotInKeys===!0?!0:Nt.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:Nt.addQueryPrefix,allowDots:s,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:Nt.allowEmptyArrays,arrayFormat:a,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Nt.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?Nt.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Nt.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:Nt.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:Nt.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Nt.encodeValuesOnly,filter:o,format:n,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Nt.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Nt.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Nt.strictNullHandling}},See=function(e,t){var r=e,n=bee(t),i,o;typeof n.filter=="function"?(o=n.filter,r=o("",r)):Nn(n.filter)&&(o=n.filter,i=o);var a=[];if(typeof r!="object"||r===null)return"";var s=fI[n.arrayFormat],u=s==="comma"&&n.commaRoundTrip;i||(i=Object.keys(r)),n.sort&&i.sort(n.sort);for(var l=cI(),c=0;c0?d+h:""},ms=lI,by=Object.prototype.hasOwnProperty,wee=Array.isArray,Et={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!0,decoder:ms.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},Eee=function(e){return e.replace(/&#(\d+);/g,function(t,r){return String.fromCharCode(parseInt(r,10))})},dI=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},Tee="utf8=%26%2310003%3B",Cee="utf8=%E2%9C%93",Oee=function(t,r){var n={__proto__:null},i=r.ignoreQueryPrefix?t.replace(/^\?/,""):t,o=r.parameterLimit===1/0?void 0:r.parameterLimit,a=i.split(r.delimiter,o),s=-1,u,l=r.charset;if(r.charsetSentinel)for(u=0;u-1&&(v=wee(v)?[v]:v);var g=by.call(n,d);g&&r.duplicates==="combine"?n[d]=ms.combine(n[d],v):(!g||r.duplicates==="last")&&(n[d]=v)}return n},Aee=function(e,t,r,n){for(var i=n?t:dI(t,r),o=e.length-1;o>=0;--o){var a,s=e[o];if(s==="[]"&&r.parseArrays)a=r.allowEmptyArrays&&i===""?[]:[].concat(i);else{a=r.plainObjects?Object.create(null):{};var u=s.charAt(0)==="["&&s.charAt(s.length-1)==="]"?s.slice(1,-1):s,l=r.decodeDotInKeys?u.replace(/%2E/g,"."):u,c=parseInt(l,10);!r.parseArrays&&l===""?a={0:i}:!isNaN(c)&&s!==l&&String(c)===l&&c>=0&&r.parseArrays&&c<=r.arrayLimit?(a=[],a[c]=i):l!=="__proto__"&&(a[l]=i)}i=a}return i},Pee=function(t,r,n,i){if(t){var o=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,a=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,u=n.depth>0&&a.exec(o),l=u?o.slice(0,u.index):o,c=[];if(l){if(!n.plainObjects&&by.call(Object.prototype,l)&&!n.allowPrototypes)return;c.push(l)}for(var f=0;n.depth>0&&(u=s.exec(o))!==null&&f"u"?Et.charset:t.charset,n=typeof t.duplicates>"u"?Et.duplicates:t.duplicates;if(n!=="combine"&&n!=="first"&&n!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var i=typeof t.allowDots>"u"?t.decodeDotInKeys===!0?!0:Et.allowDots:!!t.allowDots;return{allowDots:i,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:Et.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Et.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Et.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Et.arrayLimit,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Et.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Et.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:Et.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:Et.decoder,delimiter:typeof t.delimiter=="string"||ms.isRegExp(t.delimiter)?t.delimiter:Et.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Et.depth,duplicates:n,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Et.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Et.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Et.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Et.strictNullHandling}},Iee=function(e,t){var r=Ree(t);if(e===""||e===null||typeof e>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof e=="string"?Oee(e,r):e,i=r.plainObjects?Object.create(null):{},o=Object.keys(n),a=0;a",'"',"`"," ","\r",` +`," "],Uee=["{","}","|","\\","^","`"].concat($ee),Sy=["'"].concat(Uee),qT=["%","/","?",";","#"].concat(Sy),XT=["/","?","#"],Gee=255,YT=/^[+a-z0-9A-Z_-]{0,63}$/,zee=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Hee={javascript:!0,"javascript:":!0},wy={javascript:!0,"javascript:":!0},ns={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},Ey=Mee;function Bd(e,t,r){if(e&&typeof e=="object"&&e instanceof wn)return e;var n=new wn;return n.parse(e,t,r),n}wn.prototype.parse=function(e,t,r){if(typeof e!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var n=e.indexOf("?"),i=n!==-1&&n127?S+="x":S+=x[w];if(!S.match(YT)){var R=y.slice(0,d),A=y.slice(d+1),P=x.match(zee);P&&(R.push(P[1]),A.unshift(P[2])),A.length&&(s="/"+A.join(".")+s),this.hostname=R.join(".");break}}}this.hostname.length>Gee?this.hostname="":this.hostname=this.hostname.toLowerCase(),m||(this.hostname=Fee.toASCII(this.hostname));var F=this.port?":"+this.port:"",B=this.hostname||"";this.host=B+F,this.href+=this.host,m&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),s[0]!=="/"&&(s="/"+s))}if(!Hee[c])for(var d=0,_=Sy.length;d<_;d++){var $=Sy[d];if(s.indexOf($)!==-1){var Y=encodeURIComponent($);Y===$&&(Y=escape($)),s=s.split($).join(Y)}}var U=s.indexOf("#");U!==-1&&(this.hash=s.substr(U),s=s.slice(0,U));var z=s.indexOf("?");if(z!==-1?(this.search=s.substr(z),this.query=s.substr(z+1),t&&(this.query=Ey.parse(this.query)),s=s.slice(0,z)):t&&(this.search="",this.query={}),s&&(this.pathname=s),ns[c]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var F=this.pathname||"",ie=this.search||"";this.path=F+ie}return this.href=this.format(),this};function Vee(e){return typeof e=="string"&&(e=Bd(e)),e instanceof wn?e.format():wn.prototype.format.call(e)}wn.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,o="";this.host?i=e+this.host:this.hostname&&(i=e+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(o=Ey.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var a=this.search||o&&"?"+o||"";return t&&t.substr(-1)!==":"&&(t+=":"),this.slashes||(!t||ns[t])&&i!==!1?(i="//"+(i||""),r&&r.charAt(0)!=="/"&&(r="/"+r)):i||(i=""),n&&n.charAt(0)!=="#"&&(n="#"+n),a&&a.charAt(0)!=="?"&&(a="?"+a),r=r.replace(/[?#]/g,function(s){return encodeURIComponent(s)}),a=a.replace("#","%23"),t+i+r+a+n};function Wee(e,t){return Bd(e,!1,!0).resolve(t)}wn.prototype.resolve=function(e){return this.resolveObject(Bd(e,!1,!0)).format()};wn.prototype.resolveObject=function(e){if(typeof e=="string"){var t=new wn;t.parse(e,!1,!0),e=t}for(var r=new wn,n=Object.keys(this),i=0;i0?r.host.split("@"):!1;S&&(r.auth=S.shift(),r.hostname=S.shift(),r.host=r.hostname)}return r.search=e.search,r.query=e.query,(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!y.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var w=y.slice(-1)[0],E=(r.host||e.host||y.length>1)&&(w==="."||w==="..")||w==="",R=0,A=y.length;A>=0;A--)w=y[A],w==="."?y.splice(A,1):w===".."?(y.splice(A,1),R++):R&&(y.splice(A,1),R--);if(!p&&!m)for(;R--;R)y.unshift("..");p&&y[0]!==""&&(!y[0]||y[0].charAt(0)!=="/")&&y.unshift(""),E&&y.join("/").substr(-1)!=="/"&&y.push("");var P=y[0]===""||y[0]&&y[0].charAt(0)==="/";if(x){r.hostname=P?"":y.length?y.shift():"",r.host=r.hostname;var S=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;S&&(r.auth=S.shift(),r.hostname=S.shift(),r.host=r.hostname)}return p=p||r.host&&y.length,p&&!P&&y.unshift(""),y.length>0?r.pathname=y.join("/"):(r.pathname=null,r.path=null),(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r};wn.prototype.parseHost=function(){var e=this.host,t=Bee.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var qee=Bd,Xee=Wee,Yee=Vee;/*! + * @pixi/utils - v6.5.10 + * Compiled Thu, 06 Jul 2023 15:25:11 UTC + * + * @pixi/utils is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */var jo={parse:qee,format:Yee,resolve:Xee};function dn(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function KT(e){var t=e.split("?")[0];return t.split("#")[0]}function Kee(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Zee(e,t,r){return e.replace(new RegExp(Kee(t),"g"),r)}function Qee(e,t){for(var r="",n=0,i=-1,o=0,a,s=0;s<=e.length;++s){if(s2){var u=r.lastIndexOf("/");if(u!==r.length-1){u===-1?(r="",n=0):(r=r.slice(0,u),n=r.length-1-r.lastIndexOf("/")),i=s,o=0;continue}}else if(r.length===2||r.length===1){r="",n=0,i=s,o=0;continue}}t&&(r.length>0?r+="/..":r="..",n=2)}else r.length>0?r+="/"+e.slice(i+1,s):r=e.slice(i+1,s),n=s-i-1;i=s,o=0}else a===46&&o!==-1?++o:o=-1}return r}var pI={toPosix:function(e){return Zee(e,"\\","/")},isUrl:function(e){return/^https?:/.test(this.toPosix(e))},isDataUrl:function(e){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(e)},hasProtocol:function(e){return/^[^/:]+:\//.test(this.toPosix(e))},getProtocol:function(e){dn(e),e=this.toPosix(e);var t="",r=/^file:\/\/\//.exec(e),n=/^[^/:]+:\/\//.exec(e),i=/^[^/:]+:\//.exec(e);if(r||n||i){var o=(r==null?void 0:r[0])||(n==null?void 0:n[0])||(i==null?void 0:i[0]);t=o,e=e.slice(o.length)}return t},toAbsolute:function(e,t,r){if(this.isDataUrl(e))return e;var n=KT(this.toPosix(t??ne.ADAPTER.getBaseUrl())),i=KT(this.toPosix(r??this.rootname(n)));if(dn(e),e=this.toPosix(e),e.startsWith("/"))return pI.join(i,e.slice(1));var o=this.isAbsolute(e)?e:this.join(n,e);return o},normalize:function(e){if(e=this.toPosix(e),dn(e),e.length===0)return".";var t="",r=e.startsWith("/");this.hasProtocol(e)&&(t=this.rootname(e),e=e.slice(t.length));var n=e.endsWith("/");return e=Qee(e,!1),e.length>0&&n&&(e+="/"),r?"/"+e:t+e},isAbsolute:function(e){return dn(e),e=this.toPosix(e),this.hasProtocol(e)?!0:e.startsWith("/")},join:function(){for(var e=arguments,t,r=[],n=0;n0)if(i===void 0)i=a;else{var s=(t=r[o-1])!==null&&t!==void 0?t:"";this.extname(s)?i+="/../"+a:i+="/"+a}}return i===void 0?".":this.normalize(i)},dirname:function(e){if(dn(e),e.length===0)return".";e=this.toPosix(e);var t=e.charCodeAt(0),r=t===47,n=-1,i=!0,o=this.getProtocol(e),a=e;e=e.slice(o.length);for(var s=e.length-1;s>=1;--s)if(t=e.charCodeAt(s),t===47){if(!i){n=s;break}}else i=!1;return n===-1?r?"/":this.isUrl(a)?o+e:o:r&&n===1?"//":o+e.slice(0,n)},rootname:function(e){dn(e),e=this.toPosix(e);var t="";if(e.startsWith("/")?t="/":t=this.getProtocol(e),this.isUrl(e)){var r=e.indexOf("/",t.length);r!==-1?t=e.slice(0,r):t=e,t.endsWith("/")||(t+="/")}return t},basename:function(e,t){dn(e),t&&dn(t),e=this.toPosix(e);var r=0,n=-1,i=!0,o;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var a=t.length-1,s=-1;for(o=e.length-1;o>=0;--o){var u=e.charCodeAt(o);if(u===47){if(!i){r=o+1;break}}else s===-1&&(i=!1,s=o+1),a>=0&&(u===t.charCodeAt(a)?--a===-1&&(n=o):(a=-1,n=s))}return r===n?n=s:n===-1&&(n=e.length),e.slice(r,n)}for(o=e.length-1;o>=0;--o)if(e.charCodeAt(o)===47){if(!i){r=o+1;break}}else n===-1&&(i=!1,n=o+1);return n===-1?"":e.slice(r,n)},extname:function(e){dn(e),e=this.toPosix(e);for(var t=-1,r=0,n=-1,i=!0,o=0,a=e.length-1;a>=0;--a){var s=e.charCodeAt(a);if(s===47){if(!i){r=a+1;break}continue}n===-1&&(i=!1,n=a+1),s===46?t===-1?t=a:o!==1&&(o=1):t!==-1&&(o=-1)}return t===-1||n===-1||o===0||o===1&&t===n-1&&t===r+1?"":e.slice(t,n)},parse:function(e){dn(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;e=this.toPosix(e);var r=e.charCodeAt(0),n=this.isAbsolute(e),i;t.root=this.rootname(e),n||this.hasProtocol(e)?i=1:i=0;for(var o=-1,a=0,s=-1,u=!0,l=e.length-1,c=0;l>=i;--l){if(r=e.charCodeAt(l),r===47){if(!u){a=l+1;break}continue}s===-1&&(u=!1,s=l+1),r===46?o===-1?o=l:c!==1&&(c=1):o!==-1&&(c=-1)}return o===-1||s===-1||c===0||c===1&&o===s-1&&o===a+1?s!==-1&&(a===0&&n?t.base=t.name=e.slice(1,s):t.base=t.name=e.slice(a,s)):(a===0&&n?(t.name=e.slice(1,o),t.base=e.slice(1,s)):(t.name=e.slice(a,o),t.base=e.slice(a,s)),t.ext=e.slice(o,s)),t.dir=this.dirname(e),t},sep:"/",delimiter:":"};ne.RETINA_PREFIX=/@([0-9\.]+)x/;ne.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var Ty=!1,ZT="6.5.10";function Jee(){Ty=!0}function vI(e){var t;if(!Ty){if(ne.ADAPTER.getNavigator().userAgent.toLowerCase().indexOf("chrome")>-1){var r=[` + %c %c %c PixiJS `+ZT+" - ✰ "+e+` ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥ + +`,"background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];(t=globalThis.console).log.apply(t,r)}else globalThis.console&&globalThis.console.log("PixiJS "+ZT+" - "+e+" - http://www.pixijs.com/");Ty=!0}}var dm;function mI(){return typeof dm>"u"&&(dm=function(){var t={stencil:!0,failIfMajorPerformanceCaveat:ne.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!ne.ADAPTER.getWebGLRenderingContext())return!1;var r=ne.ADAPTER.createCanvas(),n=r.getContext("webgl",t)||r.getContext("experimental-webgl",t),i=!!(n&&n.getContextAttributes().stencil);if(n){var o=n.getExtension("WEBGL_lose_context");o&&o.loseContext()}return n=null,i}catch{return!1}}()),dm}var ete="#f0f8ff",tte="#faebd7",rte="#00ffff",nte="#7fffd4",ite="#f0ffff",ote="#f5f5dc",ate="#ffe4c4",ste="#000000",ute="#ffebcd",lte="#0000ff",cte="#8a2be2",fte="#a52a2a",hte="#deb887",dte="#5f9ea0",pte="#7fff00",vte="#d2691e",mte="#ff7f50",gte="#6495ed",yte="#fff8dc",_te="#dc143c",xte="#00ffff",bte="#00008b",Ste="#008b8b",wte="#b8860b",Ete="#a9a9a9",Tte="#006400",Cte="#a9a9a9",Ote="#bdb76b",Ate="#8b008b",Pte="#556b2f",Rte="#ff8c00",Ite="#9932cc",kte="#8b0000",Nte="#e9967a",Lte="#8fbc8f",Mte="#483d8b",Fte="#2f4f4f",Dte="#2f4f4f",Bte="#00ced1",jte="#9400d3",$te="#ff1493",Ute="#00bfff",Gte="#696969",zte="#696969",Hte="#1e90ff",Vte="#b22222",Wte="#fffaf0",qte="#228b22",Xte="#ff00ff",Yte="#dcdcdc",Kte="#f8f8ff",Zte="#daa520",Qte="#ffd700",Jte="#808080",ere="#008000",tre="#adff2f",rre="#808080",nre="#f0fff0",ire="#ff69b4",ore="#cd5c5c",are="#4b0082",sre="#fffff0",ure="#f0e68c",lre="#fff0f5",cre="#e6e6fa",fre="#7cfc00",hre="#fffacd",dre="#add8e6",pre="#f08080",vre="#e0ffff",mre="#fafad2",gre="#d3d3d3",yre="#90ee90",_re="#d3d3d3",xre="#ffb6c1",bre="#ffa07a",Sre="#20b2aa",wre="#87cefa",Ere="#778899",Tre="#778899",Cre="#b0c4de",Ore="#ffffe0",Are="#00ff00",Pre="#32cd32",Rre="#faf0e6",Ire="#ff00ff",kre="#800000",Nre="#66cdaa",Lre="#0000cd",Mre="#ba55d3",Fre="#9370db",Dre="#3cb371",Bre="#7b68ee",jre="#00fa9a",$re="#48d1cc",Ure="#c71585",Gre="#191970",zre="#f5fffa",Hre="#ffe4e1",Vre="#ffe4b5",Wre="#ffdead",qre="#000080",Xre="#fdf5e6",Yre="#808000",Kre="#6b8e23",Zre="#ffa500",Qre="#ff4500",Jre="#da70d6",ene="#eee8aa",tne="#98fb98",rne="#afeeee",nne="#db7093",ine="#ffefd5",one="#ffdab9",ane="#cd853f",sne="#ffc0cb",une="#dda0dd",lne="#b0e0e6",cne="#800080",fne="#663399",hne="#ff0000",dne="#bc8f8f",pne="#4169e1",vne="#8b4513",mne="#fa8072",gne="#f4a460",yne="#2e8b57",_ne="#fff5ee",xne="#a0522d",bne="#c0c0c0",Sne="#87ceeb",wne="#6a5acd",Ene="#708090",Tne="#708090",Cne="#fffafa",One="#00ff7f",Ane="#4682b4",Pne="#d2b48c",Rne="#008080",Ine="#d8bfd8",kne="#ff6347",Nne="#40e0d0",Lne="#ee82ee",Mne="#f5deb3",Fne="#ffffff",Dne="#f5f5f5",Bne="#ffff00",jne="#9acd32",$ne={aliceblue:ete,antiquewhite:tte,aqua:rte,aquamarine:nte,azure:ite,beige:ote,bisque:ate,black:ste,blanchedalmond:ute,blue:lte,blueviolet:cte,brown:fte,burlywood:hte,cadetblue:dte,chartreuse:pte,chocolate:vte,coral:mte,cornflowerblue:gte,cornsilk:yte,crimson:_te,cyan:xte,darkblue:bte,darkcyan:Ste,darkgoldenrod:wte,darkgray:Ete,darkgreen:Tte,darkgrey:Cte,darkkhaki:Ote,darkmagenta:Ate,darkolivegreen:Pte,darkorange:Rte,darkorchid:Ite,darkred:kte,darksalmon:Nte,darkseagreen:Lte,darkslateblue:Mte,darkslategray:Fte,darkslategrey:Dte,darkturquoise:Bte,darkviolet:jte,deeppink:$te,deepskyblue:Ute,dimgray:Gte,dimgrey:zte,dodgerblue:Hte,firebrick:Vte,floralwhite:Wte,forestgreen:qte,fuchsia:Xte,gainsboro:Yte,ghostwhite:Kte,goldenrod:Zte,gold:Qte,gray:Jte,green:ere,greenyellow:tre,grey:rre,honeydew:nre,hotpink:ire,indianred:ore,indigo:are,ivory:sre,khaki:ure,lavenderblush:lre,lavender:cre,lawngreen:fre,lemonchiffon:hre,lightblue:dre,lightcoral:pre,lightcyan:vre,lightgoldenrodyellow:mre,lightgray:gre,lightgreen:yre,lightgrey:_re,lightpink:xre,lightsalmon:bre,lightseagreen:Sre,lightskyblue:wre,lightslategray:Ere,lightslategrey:Tre,lightsteelblue:Cre,lightyellow:Ore,lime:Are,limegreen:Pre,linen:Rre,magenta:Ire,maroon:kre,mediumaquamarine:Nre,mediumblue:Lre,mediumorchid:Mre,mediumpurple:Fre,mediumseagreen:Dre,mediumslateblue:Bre,mediumspringgreen:jre,mediumturquoise:$re,mediumvioletred:Ure,midnightblue:Gre,mintcream:zre,mistyrose:Hre,moccasin:Vre,navajowhite:Wre,navy:qre,oldlace:Xre,olive:Yre,olivedrab:Kre,orange:Zre,orangered:Qre,orchid:Jre,palegoldenrod:ene,palegreen:tne,paleturquoise:rne,palevioletred:nne,papayawhip:ine,peachpuff:one,peru:ane,pink:sne,plum:une,powderblue:lne,purple:cne,rebeccapurple:fne,red:hne,rosybrown:dne,royalblue:pne,saddlebrown:vne,salmon:mne,sandybrown:gne,seagreen:yne,seashell:_ne,sienna:xne,silver:bne,skyblue:Sne,slateblue:wne,slategray:Ene,slategrey:Tne,snow:Cne,springgreen:One,steelblue:Ane,tan:Pne,teal:Rne,thistle:Ine,tomato:kne,turquoise:Nne,violet:Lne,wheat:Mne,white:Fne,whitesmoke:Dne,yellow:Bne,yellowgreen:jne};function Xt(e,t){return t===void 0&&(t=[]),t[0]=(e>>16&255)/255,t[1]=(e>>8&255)/255,t[2]=(e&255)/255,t}function Zx(e){var t=e.toString(16);return t="000000".substring(0,6-t.length)+t,"#"+t}function Qx(e){return typeof e=="string"&&(e=$ne[e.toLowerCase()]||e,e[0]==="#"&&(e=e.slice(1))),parseInt(e,16)}function ln(e){return(e[0]*255<<16)+(e[1]*255<<8)+(e[2]*255|0)}function Une(){for(var e=[],t=[],r=0;r<32;r++)e[r]=r,t[r]=r;e[ce.NORMAL_NPM]=ce.NORMAL,e[ce.ADD_NPM]=ce.ADD,e[ce.SCREEN_NPM]=ce.SCREEN,t[ce.NORMAL]=ce.NORMAL_NPM,t[ce.ADD]=ce.ADD_NPM,t[ce.SCREEN]=ce.SCREEN_NPM;var n=[];return n.push(t),n.push(e),n}var Jx=Une();function eb(e,t){return Jx[t?1:0][e]}function gI(e,t,r,n){return r=r||new Float32Array(4),n||n===void 0?(r[0]=e[0]*t,r[1]=e[1]*t,r[2]=e[2]*t):(r[0]=e[0],r[1]=e[1],r[2]=e[2]),r[3]=t,r}function jd(e,t){if(t===1)return(t*255<<24)+e;if(t===0)return 0;var r=e>>16&255,n=e>>8&255,i=e&255;return r=r*t+.5|0,n=n*t+.5|0,i=i*t+.5|0,(t*255<<24)+(r<<16)+(n<<8)+i}function tb(e,t,r,n){return r=r||new Float32Array(4),r[0]=(e>>16&255)/255,r[1]=(e>>8&255)/255,r[2]=(e&255)/255,(n||n===void 0)&&(r[0]*=t,r[1]*=t,r[2]*=t),r[3]=t,r}function yI(e,t){t===void 0&&(t=null);var r=e*6;if(t=t||new Uint16Array(r),t.length!==r)throw new Error("Out buffer length is incorrect, got "+t.length+" and expected "+r);for(var n=0,i=0;n>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1}function Cy(e){return!(e&e-1)&&!!e}function Oy(e){var t=(e>65535?1:0)<<4;e>>>=t;var r=(e>255?1:0)<<3;return e>>>=r,t|=r,r=(e>15?1:0)<<2,e>>>=r,t|=r,r=(e>3?1:0)<<1,e>>>=r,t|=r,t|e>>1}function Vo(e,t,r){var n=e.length,i;if(!(t>=n||r===0)){r=t+r>n?n-t:r;var o=n-r;for(i=t;i"u"?console.warn("PixiJS Deprecation Warning: ",t+` +Deprecated since v`+e):(n=n.split(` +`).splice(r).join(` +`),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",t+` +Deprecated since v`+e),console.warn(n),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",t+` +Deprecated since v`+e),console.warn(n))),QT[t]=!0}}var Ay={},Ar=Object.create(null),Kr=Object.create(null);function Vne(){var e;for(e in Ar)Ar[e].destroy();for(e in Kr)Kr[e].destroy()}function _I(){var e;for(e in Ar)delete Ar[e];for(e in Kr)delete Kr[e]}var Py=function(){function e(t,r,n){this.canvas=ne.ADAPTER.createCanvas(),this.context=this.canvas.getContext("2d"),this.resolution=n||ne.RESOLUTION,this.resize(t,r)}return e.prototype.clear=function(){this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.canvas.width,this.canvas.height)},e.prototype.resize=function(t,r){this.canvas.width=Math.round(t*this.resolution),this.canvas.height=Math.round(r*this.resolution)},e.prototype.destroy=function(){this.context=null,this.canvas=null},Object.defineProperty(e.prototype,"width",{get:function(){return this.canvas.width},set:function(t){this.canvas.width=Math.round(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.canvas.height},set:function(t){this.canvas.height=Math.round(t)},enumerable:!1,configurable:!0}),e}();function xI(e){var t=e.width,r=e.height,n=e.getContext("2d",{willReadFrequently:!0}),i=n.getImageData(0,0,t,r),o=i.data,a=o.length,s={top:null,left:null,right:null,bottom:null},u=null,l,c,f;for(l=0;l=this.x&&t=this.y&&rt.right?t.right:this.right;if(i<=n)return!1;var o=this.yt.bottom?t.bottom:this.bottom;return a>o}var s=this.left,u=this.right,l=this.top,c=this.bottom;if(u<=s||c<=l)return!1;var f=jc[0].set(t.left,t.top),h=jc[1].set(t.left,t.bottom),d=jc[2].set(t.right,t.top),v=jc[3].set(t.right,t.bottom);if(d.x<=f.x||h.y<=f.y)return!1;var g=Math.sign(r.a*r.d-r.b*r.c);if(g===0||(r.apply(f,f),r.apply(h,h),r.apply(d,d),r.apply(v,v),Math.max(f.x,h.x,d.x,v.x)<=s||Math.min(f.x,h.x,d.x,v.x)>=u||Math.max(f.y,h.y,d.y,v.y)<=l||Math.min(f.y,h.y,d.y,v.y)>=c))return!1;var p=g*(h.y-f.y),m=g*(f.x-h.x),y=p*s+m*l,_=p*u+m*l,x=p*s+m*c,S=p*u+m*c;if(Math.max(y,_,x,S)<=p*f.x+m*f.y||Math.min(y,_,x,S)>=p*v.x+m*v.y)return!1;var w=g*(f.y-d.y),E=g*(d.x-f.x),R=w*s+E*l,A=w*u+E*l,P=w*s+E*c,F=w*u+E*c;return!(Math.max(R,A,P,F)<=w*f.x+E*f.y||Math.min(R,A,P,F)>=w*v.x+E*v.y)},e.prototype.pad=function(t,r){return t===void 0&&(t=0),r===void 0&&(r=t),this.x-=t,this.y-=r,this.width+=t*2,this.height+=r*2,this},e.prototype.fit=function(t){var r=Math.max(this.x,t.x),n=Math.min(this.x+this.width,t.x+t.width),i=Math.max(this.y,t.y),o=Math.min(this.y+this.height,t.y+t.height);return this.x=r,this.width=Math.max(n-r,0),this.y=i,this.height=Math.max(o-i,0),this},e.prototype.ceil=function(t,r){t===void 0&&(t=1),r===void 0&&(r=.001);var n=Math.ceil((this.x+this.width-r)*t)/t,i=Math.ceil((this.y+this.height-r)*t)/t;return this.x=Math.floor((this.x+r)*t)/t,this.y=Math.floor((this.y+r)*t)/t,this.width=n-this.x,this.height=i-this.y,this},e.prototype.enlarge=function(t){var r=Math.min(this.x,t.x),n=Math.max(this.x+this.width,t.x+t.width),i=Math.min(this.y,t.y),o=Math.max(this.y+this.height,t.y+t.height);return this.x=r,this.width=n-r,this.y=i,this.height=o-i,this},e.prototype.toString=function(){return"[@pixi/math:Rectangle x="+this.x+" y="+this.y+" width="+this.width+" height="+this.height+"]"},e}(),EI=function(){function e(t,r,n){t===void 0&&(t=0),r===void 0&&(r=0),n===void 0&&(n=0),this.x=t,this.y=r,this.radius=n,this.type=Dt.CIRC}return e.prototype.clone=function(){return new e(this.x,this.y,this.radius)},e.prototype.contains=function(t,r){if(this.radius<=0)return!1;var n=this.radius*this.radius,i=this.x-t,o=this.y-r;return i*=i,o*=o,i+o<=n},e.prototype.getBounds=function(){return new Le(this.x-this.radius,this.y-this.radius,this.radius*2,this.radius*2)},e.prototype.toString=function(){return"[@pixi/math:Circle x="+this.x+" y="+this.y+" radius="+this.radius+"]"},e}(),TI=function(){function e(t,r,n,i){t===void 0&&(t=0),r===void 0&&(r=0),n===void 0&&(n=0),i===void 0&&(i=0),this.x=t,this.y=r,this.width=n,this.height=i,this.type=Dt.ELIP}return e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.contains=function(t,r){if(this.width<=0||this.height<=0)return!1;var n=(t-this.x)/this.width,i=(r-this.y)/this.height;return n*=n,i*=i,n+i<=1},e.prototype.getBounds=function(){return new Le(this.x-this.width,this.y-this.height,this.width,this.height)},e.prototype.toString=function(){return"[@pixi/math:Ellipse x="+this.x+" y="+this.y+" width="+this.width+" height="+this.height+"]"},e}(),tl=function(){function e(){for(var t=arguments,r=[],n=0;nr!=c>r&&t<(l-s)*((r-u)/(c-u))+s;f&&(n=!n)}return n},e.prototype.toString=function(){return"[@pixi/math:Polygon"+("closeStroke="+this.closeStroke)+("points="+this.points.reduce(function(t,r){return t+", "+r},"")+"]")},e}(),CI=function(){function e(t,r,n,i,o){t===void 0&&(t=0),r===void 0&&(r=0),n===void 0&&(n=0),i===void 0&&(i=0),o===void 0&&(o=20),this.x=t,this.y=r,this.width=n,this.height=i,this.radius=o,this.type=Dt.RREC}return e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height,this.radius)},e.prototype.contains=function(t,r){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&r>=this.y&&r<=this.y+this.height){var n=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(r>=this.y+n&&r<=this.y+this.height-n||t>=this.x+n&&t<=this.x+this.width-n)return!0;var i=t-(this.x+n),o=r-(this.y+n),a=n*n;if(i*i+o*o<=a||(i=t-(this.x+this.width-n),i*i+o*o<=a)||(o=r-(this.y+this.height-n),i*i+o*o<=a)||(i=t-(this.x+n),i*i+o*o<=a))return!0}return!1},e.prototype.toString=function(){return"[@pixi/math:RoundedRectangle x="+this.x+" y="+this.y+("width="+this.width+" height="+this.height+" radius="+this.radius+"]")},e}(),Ui=function(){function e(t,r,n,i){n===void 0&&(n=0),i===void 0&&(i=0),this._x=n,this._y=i,this.cb=t,this.scope=r}return e.prototype.clone=function(t,r){return t===void 0&&(t=this.cb),r===void 0&&(r=this.scope),new e(t,r,this._x,this._y)},e.prototype.set=function(t,r){return t===void 0&&(t=0),r===void 0&&(r=t),(this._x!==t||this._y!==r)&&(this._x=t,this._y=r,this.cb.call(this.scope)),this},e.prototype.copyFrom=function(t){return(this._x!==t.x||this._y!==t.y)&&(this._x=t.x,this._y=t.y,this.cb.call(this.scope)),this},e.prototype.copyTo=function(t){return t.set(this._x,this._y),t},e.prototype.equals=function(t){return t.x===this._x&&t.y===this._y},e.prototype.toString=function(){return"[@pixi/math:ObservablePoint x=0 y=0 scope="+this.scope+"]"},Object.defineProperty(e.prototype,"x",{get:function(){return this._x},set:function(t){this._x!==t&&(this._x=t,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this._y},set:function(t){this._y!==t&&(this._y=t,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),e}(),kt=function(){function e(t,r,n,i,o,a){t===void 0&&(t=1),r===void 0&&(r=0),n===void 0&&(n=0),i===void 0&&(i=1),o===void 0&&(o=0),a===void 0&&(a=0),this.array=null,this.a=t,this.b=r,this.c=n,this.d=i,this.tx=o,this.ty=a}return e.prototype.fromArray=function(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]},e.prototype.set=function(t,r,n,i,o,a){return this.a=t,this.b=r,this.c=n,this.d=i,this.tx=o,this.ty=a,this},e.prototype.toArray=function(t,r){this.array||(this.array=new Float32Array(9));var n=r||this.array;return t?(n[0]=this.a,n[1]=this.b,n[2]=0,n[3]=this.c,n[4]=this.d,n[5]=0,n[6]=this.tx,n[7]=this.ty,n[8]=1):(n[0]=this.a,n[1]=this.c,n[2]=this.tx,n[3]=this.b,n[4]=this.d,n[5]=this.ty,n[6]=0,n[7]=0,n[8]=1),n},e.prototype.apply=function(t,r){r=r||new Oe;var n=t.x,i=t.y;return r.x=this.a*n+this.c*i+this.tx,r.y=this.b*n+this.d*i+this.ty,r},e.prototype.applyInverse=function(t,r){r=r||new Oe;var n=1/(this.a*this.d+this.c*-this.b),i=t.x,o=t.y;return r.x=this.d*n*i+-this.c*n*o+(this.ty*this.c-this.tx*this.d)*n,r.y=this.a*n*o+-this.b*n*i+(-this.ty*this.a+this.tx*this.b)*n,r},e.prototype.translate=function(t,r){return this.tx+=t,this.ty+=r,this},e.prototype.scale=function(t,r){return this.a*=t,this.d*=r,this.c*=t,this.b*=r,this.tx*=t,this.ty*=r,this},e.prototype.rotate=function(t){var r=Math.cos(t),n=Math.sin(t),i=this.a,o=this.c,a=this.tx;return this.a=i*r-this.b*n,this.b=i*n+this.b*r,this.c=o*r-this.d*n,this.d=o*n+this.d*r,this.tx=a*r-this.ty*n,this.ty=a*n+this.ty*r,this},e.prototype.append=function(t){var r=this.a,n=this.b,i=this.c,o=this.d;return this.a=t.a*r+t.b*i,this.b=t.a*n+t.b*o,this.c=t.c*r+t.d*i,this.d=t.c*n+t.d*o,this.tx=t.tx*r+t.ty*i+this.tx,this.ty=t.tx*n+t.ty*o+this.ty,this},e.prototype.setTransform=function(t,r,n,i,o,a,s,u,l){return this.a=Math.cos(s+l)*o,this.b=Math.sin(s+l)*o,this.c=-Math.sin(s-u)*a,this.d=Math.cos(s-u)*a,this.tx=t-(n*this.a+i*this.c),this.ty=r-(n*this.b+i*this.d),this},e.prototype.prepend=function(t){var r=this.tx;if(t.a!==1||t.b!==0||t.c!==0||t.d!==1){var n=this.a,i=this.c;this.a=n*t.a+this.b*t.c,this.b=n*t.b+this.b*t.d,this.c=i*t.a+this.d*t.c,this.d=i*t.b+this.d*t.d}return this.tx=r*t.a+this.ty*t.c+t.tx,this.ty=r*t.b+this.ty*t.d+t.ty,this},e.prototype.decompose=function(t){var r=this.a,n=this.b,i=this.c,o=this.d,a=t.pivot,s=-Math.atan2(-i,o),u=Math.atan2(n,r),l=Math.abs(s+u);return l<1e-5||Math.abs(Nl-l)<1e-5?(t.rotation=u,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=s,t.skew.y=u),t.scale.x=Math.sqrt(r*r+n*n),t.scale.y=Math.sqrt(i*i+o*o),t.position.x=this.tx+(a.x*r+a.y*i),t.position.y=this.ty+(a.x*n+a.y*o),t},e.prototype.invert=function(){var t=this.a,r=this.b,n=this.c,i=this.d,o=this.tx,a=t*i-r*n;return this.a=i/a,this.b=-r/a,this.c=-n/a,this.d=t/a,this.tx=(n*this.ty-i*o)/a,this.ty=-(t*this.ty-r*o)/a,this},e.prototype.identity=function(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this},e.prototype.clone=function(){var t=new e;return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t},e.prototype.copyTo=function(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t},e.prototype.copyFrom=function(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty,this},e.prototype.toString=function(){return"[@pixi/math:Matrix a="+this.a+" b="+this.b+" c="+this.c+" d="+this.d+" tx="+this.tx+" ty="+this.ty+"]"},Object.defineProperty(e,"IDENTITY",{get:function(){return new e},enumerable:!1,configurable:!0}),Object.defineProperty(e,"TEMP_MATRIX",{get:function(){return new e},enumerable:!1,configurable:!0}),e}(),Oo=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],Ao=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Po=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Ro=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],Ry=[],OI=[],$c=Math.sign;function Xne(){for(var e=0;e<16;e++){var t=[];Ry.push(t);for(var r=0;r<16;r++)for(var n=$c(Oo[e]*Oo[r]+Po[e]*Ao[r]),i=$c(Ao[e]*Oo[r]+Ro[e]*Ao[r]),o=$c(Oo[e]*Po[r]+Po[e]*Ro[r]),a=$c(Ao[e]*Po[r]+Ro[e]*Ro[r]),s=0;s<16;s++)if(Oo[s]===n&&Ao[s]===i&&Po[s]===o&&Ro[s]===a){t.push(s);break}}for(var e=0;e<16;e++){var u=new kt;u.set(Oo[e],Ao[e],Po[e],Ro[e],0,0),OI.push(u)}}Xne();var ft={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:function(e){return Oo[e]},uY:function(e){return Ao[e]},vX:function(e){return Po[e]},vY:function(e){return Ro[e]},inv:function(e){return e&8?e&15:-e&7},add:function(e,t){return Ry[e][t]},sub:function(e,t){return Ry[e][ft.inv(t)]},rotate180:function(e){return e^4},isVertical:function(e){return(e&3)===2},byDirection:function(e,t){return Math.abs(e)*2<=Math.abs(t)?t>=0?ft.S:ft.N:Math.abs(t)*2<=Math.abs(e)?e>0?ft.E:ft.W:t>0?e>0?ft.SE:ft.SW:e>0?ft.NE:ft.NW},matrixAppendRotationInv:function(e,t,r,n){r===void 0&&(r=0),n===void 0&&(n=0);var i=OI[ft.inv(t)];i.tx=r,i.ty=n,e.append(i)}},rb=function(){function e(){this.worldTransform=new kt,this.localTransform=new kt,this.position=new Ui(this.onChange,this,0,0),this.scale=new Ui(this.onChange,this,1,1),this.pivot=new Ui(this.onChange,this,0,0),this.skew=new Ui(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}return e.prototype.onChange=function(){this._localID++},e.prototype.updateSkew=function(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++},e.prototype.toString=function(){return"[@pixi/math:Transform "+("position=("+this.position.x+", "+this.position.y+") ")+("rotation="+this.rotation+" ")+("scale=("+this.scale.x+", "+this.scale.y+") ")+("skew=("+this.skew.x+", "+this.skew.y+") ")+"]"},e.prototype.updateLocalTransform=function(){var t=this.localTransform;this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this._currentLocalID=this._localID,this._parentID=-1)},e.prototype.updateTransform=function(t){var r=this.localTransform;if(this._localID!==this._currentLocalID&&(r.a=this._cx*this.scale.x,r.b=this._sx*this.scale.x,r.c=this._cy*this.scale.y,r.d=this._sy*this.scale.y,r.tx=this.position.x-(this.pivot.x*r.a+this.pivot.y*r.c),r.ty=this.position.y-(this.pivot.x*r.b+this.pivot.y*r.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==t._worldID){var n=t.worldTransform,i=this.worldTransform;i.a=r.a*n.a+r.b*n.c,i.b=r.a*n.b+r.b*n.d,i.c=r.c*n.a+r.d*n.c,i.d=r.c*n.b+r.d*n.d,i.tx=r.tx*n.a+r.ty*n.c+n.tx,i.ty=r.tx*n.b+r.ty*n.d+n.ty,this._parentID=t._worldID,this._worldID++}},e.prototype.setFromMatrix=function(t){t.decompose(this),this._localID++},Object.defineProperty(e.prototype,"rotation",{get:function(){return this._rotation},set:function(t){this._rotation!==t&&(this._rotation=t,this.updateSkew())},enumerable:!1,configurable:!0}),e.IDENTITY=new e,e}();/*! + * @pixi/display - v6.5.10 + * Compiled Thu, 06 Jul 2023 15:25:11 UTC + * + * @pixi/display is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ne.SORTABLE_CHILDREN=!1;var Ll=function(){function e(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}return e.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},e.prototype.clear=function(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},e.prototype.getRectangle=function(t){return this.minX>this.maxX||this.minY>this.maxY?Le.EMPTY:(t=t||new Le(0,0,1,1),t.x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)},e.prototype.addPoint=function(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)},e.prototype.addPointMatrix=function(t,r){var n=t.a,i=t.b,o=t.c,a=t.d,s=t.tx,u=t.ty,l=n*r.x+o*r.y+s,c=i*r.x+a*r.y+u;this.minX=Math.min(this.minX,l),this.maxX=Math.max(this.maxX,l),this.minY=Math.min(this.minY,c),this.maxY=Math.max(this.maxY,c)},e.prototype.addQuad=function(t){var r=this.minX,n=this.minY,i=this.maxX,o=this.maxY,a=t[0],s=t[1];r=ai?a:i,o=s>o?s:o,a=t[2],s=t[3],r=ai?a:i,o=s>o?s:o,a=t[4],s=t[5],r=ai?a:i,o=s>o?s:o,a=t[6],s=t[7],r=ai?a:i,o=s>o?s:o,this.minX=r,this.minY=n,this.maxX=i,this.maxY=o},e.prototype.addFrame=function(t,r,n,i,o){this.addFrameMatrix(t.worldTransform,r,n,i,o)},e.prototype.addFrameMatrix=function(t,r,n,i,o){var a=t.a,s=t.b,u=t.c,l=t.d,c=t.tx,f=t.ty,h=this.minX,d=this.minY,v=this.maxX,g=this.maxY,p=a*r+u*n+c,m=s*r+l*n+f;h=pv?p:v,g=m>g?m:g,p=a*i+u*n+c,m=s*i+l*n+f,h=pv?p:v,g=m>g?m:g,p=a*r+u*o+c,m=s*r+l*o+f,h=pv?p:v,g=m>g?m:g,p=a*i+u*o+c,m=s*i+l*o+f,h=pv?p:v,g=m>g?m:g,this.minX=h,this.minY=d,this.maxX=v,this.maxY=g},e.prototype.addVertexData=function(t,r,n){for(var i=this.minX,o=this.minY,a=this.maxX,s=this.maxY,u=r;ua?l:a,s=c>s?c:s}this.minX=i,this.minY=o,this.maxX=a,this.maxY=s},e.prototype.addVertices=function(t,r,n,i){this.addVerticesMatrix(t.worldTransform,r,n,i)},e.prototype.addVerticesMatrix=function(t,r,n,i,o,a){o===void 0&&(o=0),a===void 0&&(a=o);for(var s=t.a,u=t.b,l=t.c,c=t.d,f=t.tx,h=t.ty,d=this.minX,v=this.minY,g=this.maxX,p=this.maxY,m=n;mi?t.maxX:i,this.maxY=t.maxY>o?t.maxY:o},e.prototype.addBoundsMask=function(t,r){var n=t.minX>r.minX?t.minX:r.minX,i=t.minY>r.minY?t.minY:r.minY,o=t.maxXl?o:l,this.maxY=a>c?a:c}},e.prototype.addBoundsMatrix=function(t,r){this.addFrameMatrix(r,t.minX,t.minY,t.maxX,t.maxY)},e.prototype.addBoundsArea=function(t,r){var n=t.minX>r.x?t.minX:r.x,i=t.minY>r.y?t.minY:r.y,o=t.maxXl?o:l,this.maxY=a>c?a:c}},e.prototype.pad=function(t,r){t===void 0&&(t=0),r===void 0&&(r=t),this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=r,this.maxY+=r)},e.prototype.addFramePad=function(t,r,n,i,o,a){t-=o,r-=a,n+=o,i+=a,this.minX=this.minXn?this.maxX:n,this.minY=this.minYi?this.maxY:i},e}();/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var Iy=function(e,t){return Iy=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},Iy(e,t)};function nb(e,t){Iy(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var St=function(e){nb(t,e);function t(){var r=e.call(this)||this;return r.tempDisplayObjectParent=null,r.transform=new rb,r.alpha=1,r.visible=!0,r.renderable=!0,r.cullable=!1,r.cullArea=null,r.parent=null,r.worldAlpha=1,r._lastSortedIndex=0,r._zIndex=0,r.filterArea=null,r.filters=null,r._enabledFilters=null,r._bounds=new Ll,r._localBounds=null,r._boundsID=0,r._boundsRect=null,r._localBoundsRect=null,r._mask=null,r._maskRefCount=0,r._destroyed=!1,r.isSprite=!1,r.isMask=!1,r}return t.mixin=function(r){for(var n=Object.keys(r),i=0;i1)for(var o=0;othis.children.length)throw new Error(r+"addChildAt: The index "+n+" supplied is out of bounds "+this.children.length);return r.parent&&r.parent.removeChild(r),r.parent=this,this.sortDirty=!0,r.transform._parentID=-1,this.children.splice(n,0,r),this._boundsID++,this.onChildrenChange(n),r.emit("added",this),this.emit("childAdded",r,this,n),r},t.prototype.swapChildren=function(r,n){if(r!==n){var i=this.getChildIndex(r),o=this.getChildIndex(n);this.children[i]=n,this.children[o]=r,this.onChildrenChange(i=this.children.length)throw new Error("The index "+n+" supplied is out of bounds "+this.children.length);var i=this.getChildIndex(r);Vo(this.children,i,1),this.children.splice(n,0,r),this.onChildrenChange(n)},t.prototype.getChildAt=function(r){if(r<0||r>=this.children.length)throw new Error("getChildAt: Index ("+r+") does not exist.");return this.children[r]},t.prototype.removeChild=function(){for(var r=arguments,n=[],i=0;i1)for(var o=0;o0&&a<=o){s=this.children.splice(i,a);for(var u=0;u1&&this.children.sort(Yne),this.sortDirty=!1},t.prototype.updateTransform=function(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var r=0,n=this.children.length;r0&&n.height>0){var i,o;if(this.cullArea?(i=this.cullArea,o=this.worldTransform):this._render!==t.prototype._render&&(i=this.getBounds(!0)),i&&n.intersects(i,o))this._render(r);else if(this.cullArea)return;for(var a=0,s=this.children.length;a8)throw new Error("max arguments reached");var l=this,c=l.name,f=l.items;this._aliasCount++;for(var h=0,d=f.length;h0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))},e.prototype.add=function(t){return t[this._name]&&(this.ensureNonAliasedItems(),this.remove(t),this.items.push(t)),this},e.prototype.remove=function(t){var r=this.items.indexOf(t);return r!==-1&&(this.ensureNonAliasedItems(),this.items.splice(r,1)),this},e.prototype.contains=function(t){return this.items.indexOf(t)!==-1},e.prototype.removeAll=function(){return this.ensureNonAliasedItems(),this.items.length=0,this},e.prototype.destroy=function(){this.removeAll(),this.items=null,this._name=null},Object.defineProperty(e.prototype,"empty",{get:function(){return this.items.length===0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),e}();Object.defineProperties(Ht.prototype,{dispatch:{value:Ht.prototype.emit},run:{value:Ht.prototype.emit}});/*! + * @pixi/ticker - v6.5.10 + * Compiled Thu, 06 Jul 2023 15:25:11 UTC + * + * @pixi/ticker is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ne.TARGET_FPMS=.06;var Qn;(function(e){e[e.INTERACTION=50]="INTERACTION",e[e.HIGH=25]="HIGH",e[e.NORMAL=0]="NORMAL",e[e.LOW=-25]="LOW",e[e.UTILITY=-50]="UTILITY"})(Qn||(Qn={}));var pm=function(){function e(t,r,n,i){r===void 0&&(r=null),n===void 0&&(n=0),i===void 0&&(i=!1),this.next=null,this.previous=null,this._destroyed=!1,this.fn=t,this.context=r,this.priority=n,this.once=i}return e.prototype.match=function(t,r){return r===void 0&&(r=null),this.fn===t&&this.context===r},e.prototype.emit=function(t){this.fn&&(this.context?this.fn.call(this.context,t):this.fn(t));var r=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),r},e.prototype.connect=function(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this},e.prototype.destroy=function(t){t===void 0&&(t=!1),this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);var r=this.next;return this.next=t?null:r,this.previous=null,r},e}(),Vt=function(){function e(){var t=this;this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new pm(null,null,1/0),this.deltaMS=1/ne.TARGET_FPMS,this.elapsedMS=1/ne.TARGET_FPMS,this._tick=function(r){t._requestId=null,t.started&&(t.update(r),t.started&&t._requestId===null&&t._head.next&&(t._requestId=requestAnimationFrame(t._tick)))}}return e.prototype._requestIfNeeded=function(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))},e.prototype._cancelIfNeeded=function(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)},e.prototype._startIfPossible=function(){this.started?this._requestIfNeeded():this.autoStart&&this.start()},e.prototype.add=function(t,r,n){return n===void 0&&(n=Qn.NORMAL),this._addListener(new pm(t,r,n))},e.prototype.addOnce=function(t,r,n){return n===void 0&&(n=Qn.NORMAL),this._addListener(new pm(t,r,n,!0))},e.prototype._addListener=function(t){var r=this._head.next,n=this._head;if(!r)t.connect(n);else{for(;r;){if(t.priority>r.priority){t.connect(n);break}n=r,r=r.next}t.previous||t.connect(n)}return this._startIfPossible(),this},e.prototype.remove=function(t,r){for(var n=this._head.next;n;)n.match(t,r)?n=n.destroy():n=n.next;return this._head.next||this._cancelIfNeeded(),this},Object.defineProperty(e.prototype,"count",{get:function(){if(!this._head)return 0;for(var t=0,r=this._head;r=r.next;)t++;return t},enumerable:!1,configurable:!0}),e.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},e.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},e.prototype.destroy=function(){if(!this._protected){this.stop();for(var t=this._head.next;t;)t=t.destroy(!0);this._head.destroy(),this._head=null}},e.prototype.update=function(t){t===void 0&&(t=performance.now());var r;if(t>this.lastTime){if(r=this.elapsedMS=t-this.lastTime,r>this._maxElapsedMS&&(r=this._maxElapsedMS),r*=this.speed,this._minElapsedMS){var n=t-this._lastFrame|0;if(n=0;--i){var o=Ml[i];if(o.test&&o.test(e,r))return new o(e,t)}throw new Error("Unrecognized source type to auto-detect Resource")}/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var ky=function(e,t){return ky=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},ky(e,t)};function it(e,t){ky(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Ny=function(){return Ny=Object.assign||function(t){for(var r=arguments,n,i=1,o=arguments.length;i0&&c>0,i.textureCacheIds=[],i.destroyed=!1,i.resource=null,i._batchEnabled=0,i._batchLocation=0,i.parentTextureArray=null,i.setResource(r),i}return Object.defineProperty(t.prototype,"realWidth",{get:function(){return Math.round(this.width*this.resolution)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"realHeight",{get:function(){return Math.round(this.height*this.resolution)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mipmap",{get:function(){return this._mipmap},set:function(r){this._mipmap!==r&&(this._mipmap=r,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scaleMode",{get:function(){return this._scaleMode},set:function(r){this._scaleMode!==r&&(this._scaleMode=r,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wrapMode",{get:function(){return this._wrapMode},set:function(r){this._wrapMode!==r&&(this._wrapMode=r,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),t.prototype.setStyle=function(r,n){var i;return r!==void 0&&r!==this.scaleMode&&(this.scaleMode=r,i=!0),n!==void 0&&n!==this.mipmap&&(this.mipmap=n,i=!0),i&&this.dirtyStyleId++,this},t.prototype.setSize=function(r,n,i){return i=i||this.resolution,this.setRealSize(r*i,n*i,i)},t.prototype.setRealSize=function(r,n,i){return this.resolution=i||this.resolution,this.width=Math.round(r)/this.resolution,this.height=Math.round(n)/this.resolution,this._refreshPOT(),this.update(),this},t.prototype._refreshPOT=function(){this.isPowerOfTwo=Cy(this.realWidth)&&Cy(this.realHeight)},t.prototype.setResolution=function(r){var n=this.resolution;return n===r?this:(this.resolution=r,this.valid&&(this.width=Math.round(this.width*n)/r,this.height=Math.round(this.height*n)/r,this.emit("update",this)),this._refreshPOT(),this)},t.prototype.setResource=function(r){if(this.resource===r)return this;if(this.resource)throw new Error("Resource can be set only once");return r.bind(this),this.resource=r,this},t.prototype.update=function(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))},t.prototype.onError=function(r){this.emit("error",this,r)},t.prototype.destroy=function(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete Kr[this.cacheId],delete Ar[this.cacheId],this.cacheId=null),this.dispose(),t.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0},t.prototype.dispose=function(){this.emit("dispose",this)},t.prototype.castToBaseTexture=function(){return this},t.from=function(r,n,i){i===void 0&&(i=ne.STRICT_TEXTURE_CACHE);var o=typeof r=="string",a=null;if(o)a=r;else{if(!r._pixiId){var s=n&&n.pixiIdPrefix||"pixiid";r._pixiId=s+"_"+so()}a=r._pixiId}var u=Kr[a];if(o&&i&&!u)throw new Error('The cacheId "'+a+'" does not exist in BaseTextureCache.');return u||(u=new t(r,n),u.cacheId=a,t.addToCache(u,a)),u},t.fromBuffer=function(r,n,i,o){r=r||new Float32Array(n*i*4);var a=new pa(r,{width:n,height:i}),s=r instanceof Float32Array?fe.FLOAT:fe.UNSIGNED_BYTE;return new t(a,Object.assign({},Zne,o||{width:n,height:i,type:s}))},t.addToCache=function(r,n){n&&(r.textureCacheIds.indexOf(n)===-1&&r.textureCacheIds.push(n),Kr[n]&&console.warn("BaseTexture added to the cache with an id ["+n+"] that already had an entry"),Kr[n]=r)},t.removeFromCache=function(r){if(typeof r=="string"){var n=Kr[r];if(n){var i=n.textureCacheIds.indexOf(r);return i>-1&&n.textureCacheIds.splice(i,1),delete Kr[r],n}}else if(r&&r.textureCacheIds){for(var o=0;o0)if(r.resource)this.addResourceAt(r.resource,n);else throw new Error("CubeResource does not support copying of renderTexture.");else r.target=Qi.TEXTURE_CUBE_MAP_POSITIVE_X+n,r.parentTextureArray=this.baseTexture,this.items[n]=r;return r.valid&&!this.valid&&this.resize(r.realWidth,r.realHeight),this.items[n]=r,this},t.prototype.upload=function(r,n,i){for(var o=this.itemDirtyIds,a=0;a)?\s*()]*-->)?\s*\]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i,t}(Jn),lb=function(e){it(t,e);function t(r,n){var i=this;if(n=n||{},!(r instanceof HTMLVideoElement)){var o=document.createElement("video");o.setAttribute("preload","auto"),o.setAttribute("webkit-playsinline",""),o.setAttribute("playsinline",""),typeof r=="string"&&(r=[r]);var a=r[0].src||r[0];Jn.crossOrigin(o,a,n.crossorigin);for(var s=0;s2},t.prototype._onPlayStart=function(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(Vt.shared.add(this.update,this),this._isConnectedToTicker=!0)},t.prototype._onPlayStop=function(){this._isConnectedToTicker&&(Vt.shared.remove(this.update,this),this._isConnectedToTicker=!1)},t.prototype._onCanPlay=function(){var r=this.source;r.removeEventListener("canplay",this._onCanPlay),r.removeEventListener("canplaythrough",this._onCanPlay);var n=this.valid;this.resize(r.videoWidth,r.videoHeight),!n&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&r.play()},t.prototype.dispose=function(){this._isConnectedToTicker&&(Vt.shared.remove(this.update,this),this._isConnectedToTicker=!1);var r=this.source;r&&(r.removeEventListener("error",this._onError,!0),r.pause(),r.src="",r.load()),e.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"autoUpdate",{get:function(){return this._autoUpdate},set:function(r){r!==this._autoUpdate&&(this._autoUpdate=r,!this._autoUpdate&&this._isConnectedToTicker?(Vt.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(Vt.shared.add(this.update,this),this._isConnectedToTicker=!0))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"updateFPS",{get:function(){return this._updateFPS},set:function(r){r!==this._updateFPS&&(this._updateFPS=r)},enumerable:!1,configurable:!0}),t.test=function(r,n){return globalThis.HTMLVideoElement&&r instanceof HTMLVideoElement||t.TYPES.indexOf(n)>-1},t.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],t.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},t}(Jn),cb=function(e){it(t,e);function t(r){return e.call(this,r)||this}return t.test=function(r){return!!globalThis.createImageBitmap&&typeof ImageBitmap<"u"&&r instanceof ImageBitmap},t}(Jn);Ml.push(zd,cb,ab,lb,ub,pa,sb,ob);var PI={__proto__:null,Resource:ta,BaseImageResource:Jn,INSTALLED:Ml,autoDetectResource:Ud,AbstractMultiResource:Gd,ArrayResource:ob,BufferResource:pa,CanvasResource:ab,CubeResource:sb,ImageResource:zd,SVGResource:ub,VideoResource:lb,ImageBitmapResource:cb},Qne=function(e){it(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.upload=function(r,n,i){var o=r.gl;o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.alphaMode===un.UNPACK);var a=n.realWidth,s=n.realHeight;return i.width===a&&i.height===s?o.texSubImage2D(n.target,0,0,0,a,s,n.format,i.type,this.data):(i.width=a,i.height=s,o.texImage2D(n.target,0,i.internalFormat,a,s,0,n.format,i.type,this.data)),!0},t}(pa),Ph=function(){function e(t,r){this.width=Math.round(t||100),this.height=Math.round(r||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new Ht("disposeFramebuffer"),this.multisample=ut.NONE}return Object.defineProperty(e.prototype,"colorTexture",{get:function(){return this.colorTextures[0]},enumerable:!1,configurable:!0}),e.prototype.addColorTexture=function(t,r){return t===void 0&&(t=0),this.colorTextures[t]=r||new Ne(null,{scaleMode:Pr.NEAREST,resolution:1,mipmap:Lr.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this},e.prototype.addDepthTexture=function(t){return this.depthTexture=t||new Ne(new Qne(null,{width:this.width,height:this.height}),{scaleMode:Pr.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:Lr.OFF,format:J.DEPTH_COMPONENT,type:fe.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this},e.prototype.enableDepth=function(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this},e.prototype.enableStencil=function(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this},e.prototype.resize=function(t,r){if(t=Math.round(t),r=Math.round(r),!(t===this.width&&r===this.height)){this.width=t,this.height=r,this.dirtyId++,this.dirtySize++;for(var n=0;n-1&&n.textureCacheIds.splice(i,1),delete Ar[r],n}}else if(r&&r.textureCacheIds){for(var o=0;othis.baseTexture.width,u=i+a>this.baseTexture.height;if(s||u){var l=s&&u?"and":"or",c="X: "+n+" + "+o+" = "+(n+o)+" > "+this.baseTexture.width,f="Y: "+i+" + "+a+" = "+(i+a)+" > "+this.baseTexture.height;throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: "+(c+" "+l+" "+f))}this.valid=o&&a&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=r),this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rotate",{get:function(){return this._rotate},set:function(r){this._rotate=r,this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.orig.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.orig.height},enumerable:!1,configurable:!0}),t.prototype.castToBaseTexture=function(){return this.baseTexture},Object.defineProperty(t,"EMPTY",{get:function(){return t._EMPTY||(t._EMPTY=new t(new Ne),Uc(t._EMPTY),Uc(t._EMPTY.baseTexture)),t._EMPTY},enumerable:!1,configurable:!0}),Object.defineProperty(t,"WHITE",{get:function(){if(!t._WHITE){var r=ne.ADAPTER.createCanvas(16,16),n=r.getContext("2d");r.width=16,r.height=16,n.fillStyle="white",n.fillRect(0,0,16,16),t._WHITE=new t(Ne.from(r)),Uc(t._WHITE),Uc(t._WHITE.baseTexture)}return t._WHITE},enumerable:!1,configurable:!0}),t}($s),lo=function(e){it(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.valid=!0,i.filterFrame=null,i.filterPoolKey=null,i.updateUvs(),i}return Object.defineProperty(t.prototype,"framebuffer",{get:function(){return this.baseTexture.framebuffer},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"multisample",{get:function(){return this.framebuffer.multisample},set:function(r){this.framebuffer.multisample=r},enumerable:!1,configurable:!0}),t.prototype.resize=function(r,n,i){i===void 0&&(i=!0);var o=this.baseTexture.resolution,a=Math.round(r*o)/o,s=Math.round(n*o)/o;this.valid=a>0&&s>0,this._frame.width=this.orig.width=a,this._frame.height=this.orig.height=s,i&&this.baseTexture.resize(a,s),this.updateUvs()},t.prototype.setResolution=function(r){var n=this.baseTexture;n.resolution!==r&&(n.setResolution(r),this.resize(n.width,n.height,!1))},t.create=function(r){for(var n=arguments,i=[],o=1;o>>0,i>1&&(o+=i*4294967296)):o=i>1?-i:-1,this.texturePool[o]||(this.texturePool[o]=[]);var a=this.texturePool[o].pop();return a||(a=this.createTexture(t,r,i)),a.filterPoolKey=o,a.setResolution(n),a},e.prototype.getFilterTexture=function(t,r,n){var i=this.getOptimalTexture(t.width,t.height,r||t.resolution,n||ut.NONE);return i.filterFrame=t.filterFrame,i},e.prototype.returnTexture=function(t){var r=t.filterPoolKey;t.filterFrame=null,this.texturePool[r].push(t)},e.prototype.returnFilterTexture=function(t){this.returnTexture(t)},e.prototype.clear=function(t){if(t=t!==!1,t)for(var r in this.texturePool){var n=this.texturePool[r];if(n)for(var i=0;i0&&t.height>0;for(var r in this.texturePool)if(Number(r)<0){var n=this.texturePool[r];if(n)for(var i=0;i1){for(var c=0;c1&&(f=this.getOptimalFilterTexture(c.width,c.height,r.resolution),f.filterFrame=c.filterFrame),n[h].apply(this,c,f,Zr.CLEAR,r);var d=c;c=f,f=d}n[h].apply(this,c,l.renderTexture,Zr.BLEND,r),h>1&&r.multisample>1&&this.returnFilterTexture(r.renderTexture),this.returnFilterTexture(c),this.returnFilterTexture(f)}r.clear(),this.statePool.push(r)},e.prototype.bindAndClear=function(t,r){r===void 0&&(r=Zr.CLEAR);var n=this.renderer,i=n.renderTexture,o=n.state;if(t===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,t&&t.filterFrame){var a=this.tempRect;a.x=0,a.y=0,a.width=t.filterFrame.width,a.height=t.filterFrame.height,i.bind(t,t.filterFrame,a)}else t!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?i.bind(t):this.renderer.renderTexture.bind(t,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);var s=o.stateId&1||this.forceClear;(r===Zr.CLEAR||r===Zr.BLIT&&s)&&this.renderer.framebuffer.clear(0,0,0,0)},e.prototype.applyFilter=function(t,r,n,i){var o=this.renderer;o.state.set(t.state),this.bindAndClear(n,i),t.uniforms.uSampler=r,t.uniforms.filterGlobals=this.globalUniforms,o.shader.bind(t),t.legacy=!!t.program.attributeData.aTextureCoord,t.legacy?(this.quadUv.map(r._frame,r.filterFrame),o.geometry.bind(this.quadUv),o.geometry.draw(tn.TRIANGLES)):(o.geometry.bind(this.quad),o.geometry.draw(tn.TRIANGLE_STRIP))},e.prototype.calculateSpriteMatrix=function(t,r){var n=this.activeState,i=n.sourceFrame,o=n.destinationFrame,a=r._texture.orig,s=t.set(o.width,0,0,o.height,i.x,i.y),u=r.worldTransform.copyTo(kt.TEMP_MATRIX);return u.invert(),s.prepend(u),s.scale(1/a.width,1/a.height),s.translate(r.anchor.x,r.anchor.y),s},e.prototype.destroy=function(){this.renderer=null,this.texturePool.clear(!1)},e.prototype.getOptimalFilterTexture=function(t,r,n,i){return n===void 0&&(n=1),i===void 0&&(i=ut.NONE),this.texturePool.getOptimalTexture(t,r,n,i)},e.prototype.getFilterTexture=function(t,r,n){if(typeof t=="number"){var i=t;t=r,r=i}t=t||this.activeState.renderTexture;var o=this.texturePool.getOptimalTexture(t.width,t.height,r||t.resolution,n||ut.NONE);return o.filterFrame=t.filterFrame,o},e.prototype.returnFilterTexture=function(t){this.texturePool.returnTexture(t)},e.prototype.emptyPool=function(){this.texturePool.clear(!0)},e.prototype.resize=function(){this.texturePool.setScreenSize(this.renderer.view)},e.prototype.transformAABB=function(t,r){var n=Gc[0],i=Gc[1],o=Gc[2],a=Gc[3];n.set(r.left,r.top),i.set(r.left,r.bottom),o.set(r.right,r.top),a.set(r.right,r.bottom),t.apply(n,n),t.apply(i,i),t.apply(o,o),t.apply(a,a);var s=Math.min(n.x,i.x,o.x,a.x),u=Math.min(n.y,i.y,o.y,a.y),l=Math.max(n.x,i.x,o.x,a.x),c=Math.max(n.y,i.y,o.y,a.y);r.x=s,r.y=u,r.width=l-s,r.height=c-u},e.prototype.roundFrame=function(t,r,n,i,o){if(!(t.width<=0||t.height<=0||n.width<=0||n.height<=0)){if(o){var a=o.a,s=o.b,u=o.c,l=o.d;if((Math.abs(s)>1e-4||Math.abs(u)>1e-4)&&(Math.abs(a)>1e-4||Math.abs(l)>1e-4))return}o=o?vm.copyFrom(o):vm.identity(),o.translate(-n.x,-n.y).scale(i.width/n.width,i.height/n.height).translate(i.x,i.y),this.transformAABB(o,t),t.ceil(r),this.transformAABB(o.invert(),t)}},e}(),lc=function(){function e(t){this.renderer=t}return e.prototype.flush=function(){},e.prototype.destroy=function(){this.renderer=null},e.prototype.start=function(){},e.prototype.stop=function(){this.flush()},e.prototype.render=function(t){},e}(),vb=function(){function e(t){this.renderer=t,this.emptyRenderer=new lc(t),this.currentRenderer=this.emptyRenderer}return e.prototype.setObjectRenderer=function(t){this.currentRenderer!==t&&(this.currentRenderer.stop(),this.currentRenderer=t,this.currentRenderer.start())},e.prototype.flush=function(){this.setObjectRenderer(this.emptyRenderer)},e.prototype.reset=function(){this.setObjectRenderer(this.emptyRenderer)},e.prototype.copyBoundTextures=function(t,r){for(var n=this.renderer.texture.boundTextures,i=r-1;i>=0;--i)t[i]=n[i]||null,t[i]&&(t[i]._batchLocation=i)},e.prototype.boundArray=function(t,r,n,i){for(var o=t.elements,a=t.ids,s=t.count,u=0,l=0;l=0&&f=Zn.WEBGL2&&(n=t.getContext("webgl2",r)),n)this.webGLVersion=2;else if(this.webGLVersion=1,n=t.getContext("webgl",r)||t.getContext("experimental-webgl",r),!n)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=n,this.getExtensions(),this.gl},e.prototype.getExtensions=function(){var t=this.gl,r={loseContext:t.getExtension("WEBGL_lose_context"),anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),s3tc:t.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:t.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:t.getExtension("WEBGL_compressed_texture_etc"),etc1:t.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:t.getExtension("WEBGL_compressed_texture_atc"),astc:t.getExtension("WEBGL_compressed_texture_astc")};this.webGLVersion===1?Object.assign(this.extensions,r,{drawBuffers:t.getExtension("WEBGL_draw_buffers"),depthTexture:t.getExtension("WEBGL_depth_texture"),vertexArrayObject:t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:t.getExtension("OES_element_index_uint"),floatTexture:t.getExtension("OES_texture_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),textureHalfFloat:t.getExtension("OES_texture_half_float"),textureHalfFloatLinear:t.getExtension("OES_texture_half_float_linear")}):this.webGLVersion===2&&Object.assign(this.extensions,r,{colorBufferFloat:t.getExtension("EXT_color_buffer_float")})},e.prototype.handleContextLost=function(t){var r=this;t.preventDefault(),setTimeout(function(){r.gl.isContextLost()&&r.extensions.loseContext&&r.extensions.loseContext.restoreContext()},0)},e.prototype.handleContextRestored=function(){this.renderer.runners.contextChange.emit(this.gl)},e.prototype.destroy=function(){var t=this.renderer.view;this.renderer=null,t.removeEventListener("webglcontextlost",this.handleContextLost),t.removeEventListener("webglcontextrestored",this.handleContextRestored),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()},e.prototype.postrender=function(){this.renderer.renderingToScreen&&this.gl.flush()},e.prototype.validateContext=function(t){var r=t.getContextAttributes(),n="WebGL2RenderingContext"in globalThis&&t instanceof globalThis.WebGL2RenderingContext;n&&(this.webGLVersion=2),r&&!r.stencil&&console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");var i=n||!!t.getExtension("OES_element_index_uint");this.supports.uint32Indices=i,i||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")},e}(),NI=function(){function e(t){this.framebuffer=t,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=ut.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}return e}(),oie=new Le,gb=function(){function e(t){this.renderer=t,this.managedFramebuffers=[],this.unknownFramebuffer=new Ph(10,10),this.msaaSamples=null}return e.prototype.contextChange=function(){this.disposeAll(!0);var t=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new Le,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){var r=this.renderer.context.extensions.drawBuffers,n=this.renderer.context.extensions.depthTexture;ne.PREFER_ENV===Zn.WEBGL_LEGACY&&(r=null,n=null),r?t.drawBuffers=function(i){return r.drawBuffersWEBGL(i)}:(this.hasMRT=!1,t.drawBuffers=function(){}),n||(this.writeDepthTexture=!1)}else this.msaaSamples=t.getInternalformatParameter(t.RENDERBUFFER,t.RGBA8,t.SAMPLES)},e.prototype.bind=function(t,r,n){n===void 0&&(n=0);var i=this.gl;if(t){var o=t.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(t);this.current!==t&&(this.current=t,i.bindFramebuffer(i.FRAMEBUFFER,o.framebuffer)),o.mipLevel!==n&&(t.dirtyId++,t.dirtyFormat++,o.mipLevel=n),o.dirtyId!==t.dirtyId&&(o.dirtyId=t.dirtyId,o.dirtyFormat!==t.dirtyFormat?(o.dirtyFormat=t.dirtyFormat,o.dirtySize=t.dirtySize,this.updateFramebuffer(t,n)):o.dirtySize!==t.dirtySize&&(o.dirtySize=t.dirtySize,this.resizeFramebuffer(t)));for(var a=0;a>n,l=r.height>>n,c=u/r.width;this.setViewport(r.x*c,r.y*c,u,l)}else{var u=t.width>>n,l=t.height>>n;this.setViewport(0,0,u,l)}}else this.current&&(this.current=null,i.bindFramebuffer(i.FRAMEBUFFER,null)),r?this.setViewport(r.x,r.y,r.width,r.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)},e.prototype.setViewport=function(t,r,n,i){var o=this.viewport;t=Math.round(t),r=Math.round(r),n=Math.round(n),i=Math.round(i),(o.width!==n||o.height!==i||o.x!==t||o.y!==r)&&(o.x=t,o.y=r,o.width=n,o.height=i,this.gl.viewport(t,r,n,i))},Object.defineProperty(e.prototype,"size",{get:function(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}},enumerable:!1,configurable:!0}),e.prototype.clear=function(t,r,n,i,o){o===void 0&&(o=Tl.COLOR|Tl.DEPTH);var a=this.gl;a.clearColor(t,r,n,i),a.clear(o)},e.prototype.initFramebuffer=function(t){var r=this.gl,n=new NI(r.createFramebuffer());return n.multisample=this.detectSamples(t.multisample),t.glFramebuffers[this.CONTEXT_UID]=n,this.managedFramebuffers.push(t),t.disposeRunner.add(this),n},e.prototype.resizeFramebuffer=function(t){var r=this.gl,n=t.glFramebuffers[this.CONTEXT_UID];n.msaaBuffer&&(r.bindRenderbuffer(r.RENDERBUFFER,n.msaaBuffer),r.renderbufferStorageMultisample(r.RENDERBUFFER,n.multisample,r.RGBA8,t.width,t.height)),n.stencil&&(r.bindRenderbuffer(r.RENDERBUFFER,n.stencil),n.msaaBuffer?r.renderbufferStorageMultisample(r.RENDERBUFFER,n.multisample,r.DEPTH24_STENCIL8,t.width,t.height):r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t.width,t.height));var i=t.colorTextures,o=i.length;r.drawBuffers||(o=Math.min(o,1));for(var a=0;a1&&this.canMultisampleFramebuffer(t)?(i.msaaBuffer=i.msaaBuffer||n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,i.msaaBuffer),n.renderbufferStorageMultisample(n.RENDERBUFFER,i.multisample,n.RGBA8,t.width,t.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.RENDERBUFFER,i.msaaBuffer)):i.msaaBuffer&&(n.deleteRenderbuffer(i.msaaBuffer),i.msaaBuffer=null,i.blitFramebuffer&&(i.blitFramebuffer.dispose(),i.blitFramebuffer=null));for(var s=[],u=0;u1&&n.drawBuffers(s),t.depthTexture){var f=this.writeDepthTexture;if(f){var h=t.depthTexture;this.renderer.texture.bind(h,0),n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,h._glTextures[this.CONTEXT_UID].texture,r)}}(t.stencil||t.depth)&&!(t.depthTexture&&this.writeDepthTexture)?(i.stencil=i.stencil||n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,i.stencil),i.msaaBuffer?n.renderbufferStorageMultisample(n.RENDERBUFFER,i.multisample,n.DEPTH24_STENCIL8,t.width,t.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,t.width,t.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,i.stencil)):i.stencil&&(n.deleteRenderbuffer(i.stencil),i.stencil=null)},e.prototype.canMultisampleFramebuffer=function(t){return this.renderer.context.webGLVersion!==1&&t.colorTextures.length<=1&&!t.depthTexture},e.prototype.detectSamples=function(t){var r=this.msaaSamples,n=ut.NONE;if(t<=1||r===null)return n;for(var i=0;i=0&&this.managedFramebuffers.splice(o,1),t.disposeRunner.remove(this),r||(i.deleteFramebuffer(n.framebuffer),n.msaaBuffer&&i.deleteRenderbuffer(n.msaaBuffer),n.stencil&&i.deleteRenderbuffer(n.stencil)),n.blitFramebuffer&&n.blitFramebuffer.dispose()}},e.prototype.disposeAll=function(t){var r=this.managedFramebuffers;this.managedFramebuffers=[];for(var n=0;n=Zn.WEBGL2&&(t=e.getContext("webgl2",{})),t||(t=e.getContext("webgl",{})||e.getContext("experimental-webgl",{}),t?t.getExtension("WEBGL_draw_buffers"):t=null),mu=t}return mu}var zc;function sie(){if(!zc){zc=Rr.MEDIUM;var e=DI();if(e&&e.getShaderPrecisionFormat){var t=e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT);zc=t.precision?Rr.HIGH:Rr.MEDIUM}}return zc}function oC(e,t,r){if(e.substring(0,9)!=="precision"){var n=t;return t===Rr.HIGH&&r!==Rr.HIGH&&(n=Rr.MEDIUM),"precision "+n+` float; +`+e}else if(r!==Rr.HIGH&&e.substring(0,15)==="precision highp")return e.replace("precision highp","precision mediump");return e}var uie={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function BI(e){return uie[e]}var Hc=null,aC={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function jI(e,t){if(!Hc){var r=Object.keys(aC);Hc={};for(var n=0;n0&&(t+=` +else `),r"u"?.5:r,this.isSimple=!1}return Object.defineProperty(e.prototype,"texture",{get:function(){return this._texture},set:function(t){this._texture=t,this._textureID=-1},enumerable:!1,configurable:!0}),e.prototype.multiplyUvs=function(t,r){r===void 0&&(r=t);for(var n=this.mapCoord,i=0;i0?this.maskStack[this.maskStack.length-1]._colorMask:15;n!==r&&this.renderer.gl.colorMask((n&1)!==0,(n&2)!==0,(n&4)!==0,(n&8)!==0)},e.prototype.destroy=function(){this.renderer=null},e}(),GI=function(){function e(t){this.renderer=t,this.maskStack=[],this.glConst=0}return e.prototype.getStackLength=function(){return this.maskStack.length},e.prototype.setMaskStack=function(t){var r=this.renderer.gl,n=this.getStackLength();this.maskStack=t;var i=this.getStackLength();i!==n&&(i===0?r.disable(this.glConst):(r.enable(this.glConst),this._useCurrent()))},e.prototype._useCurrent=function(){},e.prototype.destroy=function(){this.renderer=null,this.maskStack=null},e}(),uC=new kt,lC=[],xb=function(e){it(t,e);function t(r){var n=e.call(this,r)||this;return n.glConst=ne.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST,n}return t.prototype.getStackLength=function(){var r=this.maskStack[this.maskStack.length-1];return r?r._scissorCounter:0},t.prototype.calcScissorRect=function(r){var n;if(!r._scissorRectLocal){var i=r._scissorRect,o=r.maskObject,a=this.renderer,s=a.renderTexture,u=o.getBounds(!0,(n=lC.pop())!==null&&n!==void 0?n:new Le);this.roundFrameToPixels(u,s.current?s.current.resolution:a.resolution,s.sourceFrame,s.destinationFrame,a.projection.transform),i&&u.fit(i),r._scissorRectLocal=u}},t.isMatrixRotated=function(r){if(!r)return!1;var n=r.a,i=r.b,o=r.c,a=r.d;return(Math.abs(i)>1e-4||Math.abs(o)>1e-4)&&(Math.abs(n)>1e-4||Math.abs(a)>1e-4)},t.prototype.testScissor=function(r){var n=r.maskObject;if(!n.isFastRect||!n.isFastRect()||t.isMatrixRotated(n.worldTransform)||t.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(r);var i=r._scissorRectLocal;return i.width>0&&i.height>0},t.prototype.roundFrameToPixels=function(r,n,i,o,a){t.isMatrixRotated(a)||(a=a?uC.copyFrom(a):uC.identity(),a.translate(-i.x,-i.y).scale(o.width/i.width,o.height/i.height).translate(o.x,o.y),this.renderer.filter.transformAABB(a,r),r.fit(o),r.x=Math.round(r.x*n),r.y=Math.round(r.y*n),r.width=Math.round(r.width*n),r.height=Math.round(r.height*n))},t.prototype.push=function(r){r._scissorRectLocal||this.calcScissorRect(r);var n=this.renderer.gl;r._scissorRect||n.enable(n.SCISSOR_TEST),r._scissorCounter++,r._scissorRect=r._scissorRectLocal,this._useCurrent()},t.prototype.pop=function(r){var n=this.renderer.gl;r&&lC.push(r._scissorRectLocal),this.getStackLength()>0?this._useCurrent():n.disable(n.SCISSOR_TEST)},t.prototype._useCurrent=function(){var r=this.maskStack[this.maskStack.length-1]._scissorRect,n;this.renderer.renderTexture.current?n=r.y:n=this.renderer.height-r.height-r.y,this.renderer.gl.scissor(r.x,n,r.width,r.height)},t}(GI),bb=function(e){it(t,e);function t(r){var n=e.call(this,r)||this;return n.glConst=ne.ADAPTER.getWebGLRenderingContext().STENCIL_TEST,n}return t.prototype.getStackLength=function(){var r=this.maskStack[this.maskStack.length-1];return r?r._stencilCounter:0},t.prototype.push=function(r){var n=r.maskObject,i=this.renderer.gl,o=r._stencilCounter;o===0&&(this.renderer.framebuffer.forceStencil(),i.clearStencil(0),i.clear(i.STENCIL_BUFFER_BIT),i.enable(i.STENCIL_TEST)),r._stencilCounter++;var a=r._colorMask;a!==0&&(r._colorMask=0,i.colorMask(!1,!1,!1,!1)),i.stencilFunc(i.EQUAL,o,4294967295),i.stencilOp(i.KEEP,i.KEEP,i.INCR),n.renderable=!0,n.render(this.renderer),this.renderer.batch.flush(),n.renderable=!1,a!==0&&(r._colorMask=a,i.colorMask((a&1)!==0,(a&2)!==0,(a&4)!==0,(a&8)!==0)),this._useCurrent()},t.prototype.pop=function(r){var n=this.renderer.gl;if(this.getStackLength()===0)n.disable(n.STENCIL_TEST);else{var i=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null,o=i?i._colorMask:15;o!==0&&(i._colorMask=0,n.colorMask(!1,!1,!1,!1)),n.stencilOp(n.KEEP,n.KEEP,n.DECR),r.renderable=!0,r.render(this.renderer),this.renderer.batch.flush(),r.renderable=!1,o!==0&&(i._colorMask=o,n.colorMask((o&1)!==0,(o&2)!==0,(o&4)!==0,(o&8)!==0)),this._useCurrent()}},t.prototype._useCurrent=function(){var r=this.renderer.gl;r.stencilFunc(r.EQUAL,this.getStackLength(),4294967295),r.stencilOp(r.KEEP,r.KEEP,r.KEEP)},t}(GI),Sb=function(){function e(t){this.renderer=t,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new kt,this.transform=null}return e.prototype.update=function(t,r,n,i){this.destinationFrame=t||this.destinationFrame||this.defaultFrame,this.sourceFrame=r||this.sourceFrame||t,this.calculateProjection(this.destinationFrame,this.sourceFrame,n,i),this.transform&&this.projectionMatrix.append(this.transform);var o=this.renderer;o.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,o.globalUniforms.update(),o.shader.shader&&o.shader.syncUniformGroup(o.shader.shader.uniforms.globals)},e.prototype.calculateProjection=function(t,r,n,i){var o=this.projectionMatrix,a=i?-1:1;o.identity(),o.a=1/r.width*2,o.d=a*(1/r.height*2),o.tx=-1-r.x*o.a,o.ty=-a-r.y*o.d},e.prototype.setTransform=function(t){},e.prototype.destroy=function(){this.renderer=null},e}(),_o=new Le,yu=new Le,wb=function(){function e(t){this.renderer=t,this.clearColor=t._backgroundColorRgba,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new Le,this.destinationFrame=new Le,this.viewportFrame=new Le}return e.prototype.bind=function(t,r,n){t===void 0&&(t=null);var i=this.renderer;this.current=t;var o,a,s;t?(o=t.baseTexture,s=o.resolution,r||(_o.width=t.frame.width,_o.height=t.frame.height,r=_o),n||(yu.x=t.frame.x,yu.y=t.frame.y,yu.width=r.width,yu.height=r.height,n=yu),a=o.framebuffer):(s=i.resolution,r||(_o.width=i.screen.width,_o.height=i.screen.height,r=_o),n||(n=_o,n.width=r.width,n.height=r.height));var u=this.viewportFrame;u.x=n.x*s,u.y=n.y*s,u.width=n.width*s,u.height=n.height*s,t||(u.y=i.view.height-(u.y+u.height)),u.ceil(),this.renderer.framebuffer.bind(a,u),this.renderer.projection.update(n,r,s,!a),t?this.renderer.mask.setMaskStack(o.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(r),this.destinationFrame.copyFrom(n)},e.prototype.clear=function(t,r){this.current?t=t||this.current.baseTexture.clearColor:t=t||this.clearColor;var n=this.destinationFrame,i=this.current?this.current.baseTexture:this.renderer.screen,o=n.width!==i.width||n.height!==i.height;if(o){var a=this.viewportFrame,s=a.x,u=a.y,l=a.width,c=a.height;s=Math.round(s),u=Math.round(u),l=Math.round(l),c=Math.round(c),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(s,u,l,c)}this.renderer.framebuffer.clear(t[0],t[1],t[2],t[3],r),o&&this.renderer.scissor.pop()},e.prototype.resize=function(){this.bind(null)},e.prototype.reset=function(){this.bind(null)},e.prototype.destroy=function(){this.renderer=null},e}();function Sie(e,t,r,n,i){r.buffer.update(i)}var wie={float:` + data[offset] = v; + `,vec2:` + data[offset] = v[0]; + data[offset+1] = v[1]; + `,vec3:` + data[offset] = v[0]; + data[offset+1] = v[1]; + data[offset+2] = v[2]; + + `,vec4:` + data[offset] = v[0]; + data[offset+1] = v[1]; + data[offset+2] = v[2]; + data[offset+3] = v[3]; + `,mat2:` + data[offset] = v[0]; + data[offset+1] = v[1]; + + data[offset+4] = v[2]; + data[offset+5] = v[3]; + `,mat3:` + data[offset] = v[0]; + data[offset+1] = v[1]; + data[offset+2] = v[2]; + + data[offset + 4] = v[3]; + data[offset + 5] = v[4]; + data[offset + 6] = v[5]; + + data[offset + 8] = v[6]; + data[offset + 9] = v[7]; + data[offset + 10] = v[8]; + `,mat4:` + for(var i = 0; i < 16; i++) + { + data[offset + i] = v[i]; + } + `},zI={float:4,vec2:8,vec3:12,vec4:16,int:4,ivec2:8,ivec3:12,ivec4:16,uint:4,uvec2:8,uvec3:12,uvec4:16,bool:4,bvec2:8,bvec3:12,bvec4:16,mat2:16*2,mat3:16*3,mat4:16*4};function HI(e){for(var t=e.map(function(u){return{data:u,offset:0,dataLen:0,dirty:0}}),r=0,n=0,i=0,o=0;o1&&(r=Math.max(r,16)*a.data.size),a.dataLen=r,n%r!==0&&n<16){var s=n%r%16;n+=s,i+=s}n+r>16?(i=Math.ceil(i/16)*16,a.offset=i,i+=r,n=r):(a.offset=i,n+=r,i+=r)}return i=Math.ceil(i/16)*16,{uboElements:t,size:i}}function VI(e,t){var r=[];for(var n in e)t[n]&&r.push(t[n]);return r.sort(function(i,o){return i.index-o.index}),r}function WI(e,t){if(!e.autoManage)return{size:0,syncFunc:Sie};for(var r=VI(e.uniforms,t),n=HI(r),i=n.uboElements,o=n.size,a=[` + var v = null; + var v2 = null; + var cv = null; + var t = 0; + var gl = renderer.gl + var index = 0; + var data = buffer.data; + `],s=0;s1){var v=BI(u.data.type),g=Math.max(zI[u.data.type]/16,1),p=v/g,m=(4-p%4)%4;a.push(` + cv = ud.`+c+`.value; + v = uv.`+c+`; + offset = `+u.offset/4+`; + + t = 0; + + for(var i=0; i < `+u.data.size*g+`; i++) + { + for(var j = 0; j < `+p+`; j++) + { + data[offset++] = v[t++]; + } + offset += `+m+`; + } + + `)}else{var y=wie[u.data.type];a.push(` + cv = ud.`+c+`.value; + v = uv.`+c+`; + offset = `+u.offset/4+`; + `+y+`; + `)}}return a.push(` + renderer.buffer.update(buffer); + `),{size:o,syncFunc:new Function("ud","uv","renderer","syncData","buffer",a.join(` +`))}}var Eie=function(){function e(){}return e}(),qI=function(){function e(t,r){this.program=t,this.uniformData=r,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}return e.prototype.destroy=function(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null},e}();function Tie(e,t){for(var r={},n=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),i=0;if?1:-1});for(var a=0;a>1,n++;this.stateId=t.data}for(var n=0;nthis.checkCountMax&&(this.checkCount=0,this.run())))},e.prototype.run=function(){for(var t=this.renderer.texture,r=t.managedTextures,n=!1,i=0;ithis.maxIdle&&(t.destroyTexture(o,!0),r[i]=null,n=!0)}if(n){for(var a=0,i=0;i=0;i--)this.unload(t.children[i])},e.prototype.destroy=function(){this.renderer=null},e}();function Mie(e){var t,r,n,i,o,a,s,u,l,c,f,h,d,v,g,p,m,y,_,x,S,w,E;return"WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext?E=(t={},t[fe.UNSIGNED_BYTE]=(r={},r[J.RGBA]=e.RGBA8,r[J.RGB]=e.RGB8,r[J.RG]=e.RG8,r[J.RED]=e.R8,r[J.RGBA_INTEGER]=e.RGBA8UI,r[J.RGB_INTEGER]=e.RGB8UI,r[J.RG_INTEGER]=e.RG8UI,r[J.RED_INTEGER]=e.R8UI,r[J.ALPHA]=e.ALPHA,r[J.LUMINANCE]=e.LUMINANCE,r[J.LUMINANCE_ALPHA]=e.LUMINANCE_ALPHA,r),t[fe.BYTE]=(n={},n[J.RGBA]=e.RGBA8_SNORM,n[J.RGB]=e.RGB8_SNORM,n[J.RG]=e.RG8_SNORM,n[J.RED]=e.R8_SNORM,n[J.RGBA_INTEGER]=e.RGBA8I,n[J.RGB_INTEGER]=e.RGB8I,n[J.RG_INTEGER]=e.RG8I,n[J.RED_INTEGER]=e.R8I,n),t[fe.UNSIGNED_SHORT]=(i={},i[J.RGBA_INTEGER]=e.RGBA16UI,i[J.RGB_INTEGER]=e.RGB16UI,i[J.RG_INTEGER]=e.RG16UI,i[J.RED_INTEGER]=e.R16UI,i[J.DEPTH_COMPONENT]=e.DEPTH_COMPONENT16,i),t[fe.SHORT]=(o={},o[J.RGBA_INTEGER]=e.RGBA16I,o[J.RGB_INTEGER]=e.RGB16I,o[J.RG_INTEGER]=e.RG16I,o[J.RED_INTEGER]=e.R16I,o),t[fe.UNSIGNED_INT]=(a={},a[J.RGBA_INTEGER]=e.RGBA32UI,a[J.RGB_INTEGER]=e.RGB32UI,a[J.RG_INTEGER]=e.RG32UI,a[J.RED_INTEGER]=e.R32UI,a[J.DEPTH_COMPONENT]=e.DEPTH_COMPONENT24,a),t[fe.INT]=(s={},s[J.RGBA_INTEGER]=e.RGBA32I,s[J.RGB_INTEGER]=e.RGB32I,s[J.RG_INTEGER]=e.RG32I,s[J.RED_INTEGER]=e.R32I,s),t[fe.FLOAT]=(u={},u[J.RGBA]=e.RGBA32F,u[J.RGB]=e.RGB32F,u[J.RG]=e.RG32F,u[J.RED]=e.R32F,u[J.DEPTH_COMPONENT]=e.DEPTH_COMPONENT32F,u),t[fe.HALF_FLOAT]=(l={},l[J.RGBA]=e.RGBA16F,l[J.RGB]=e.RGB16F,l[J.RG]=e.RG16F,l[J.RED]=e.R16F,l),t[fe.UNSIGNED_SHORT_5_6_5]=(c={},c[J.RGB]=e.RGB565,c),t[fe.UNSIGNED_SHORT_4_4_4_4]=(f={},f[J.RGBA]=e.RGBA4,f),t[fe.UNSIGNED_SHORT_5_5_5_1]=(h={},h[J.RGBA]=e.RGB5_A1,h),t[fe.UNSIGNED_INT_2_10_10_10_REV]=(d={},d[J.RGBA]=e.RGB10_A2,d[J.RGBA_INTEGER]=e.RGB10_A2UI,d),t[fe.UNSIGNED_INT_10F_11F_11F_REV]=(v={},v[J.RGB]=e.R11F_G11F_B10F,v),t[fe.UNSIGNED_INT_5_9_9_9_REV]=(g={},g[J.RGB]=e.RGB9_E5,g),t[fe.UNSIGNED_INT_24_8]=(p={},p[J.DEPTH_STENCIL]=e.DEPTH24_STENCIL8,p),t[fe.FLOAT_32_UNSIGNED_INT_24_8_REV]=(m={},m[J.DEPTH_STENCIL]=e.DEPTH32F_STENCIL8,m),t):E=(y={},y[fe.UNSIGNED_BYTE]=(_={},_[J.RGBA]=e.RGBA,_[J.RGB]=e.RGB,_[J.ALPHA]=e.ALPHA,_[J.LUMINANCE]=e.LUMINANCE,_[J.LUMINANCE_ALPHA]=e.LUMINANCE_ALPHA,_),y[fe.UNSIGNED_SHORT_5_6_5]=(x={},x[J.RGB]=e.RGB,x),y[fe.UNSIGNED_SHORT_4_4_4_4]=(S={},S[J.RGBA]=e.RGBA,S),y[fe.UNSIGNED_SHORT_5_5_5_1]=(w={},w[J.RGBA]=e.RGBA,w),y),E}var If=function(){function e(t){this.texture=t,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=fe.UNSIGNED_BYTE,this.internalFormat=J.RGBA,this.samplerType=0}return e}(),Ob=function(){function e(t){this.renderer=t,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new Ne,this.hasIntegerTextures=!1}return e.prototype.contextChange=function(){var t=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=Mie(t);var r=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=r;for(var n=0;n=0;--a){var s=n[a];if(s){var u=s._glTextures[o];u.samplerType!==Cl.FLOAT&&this.renderer.texture.unbind(s)}}},e.prototype.initTexture=function(t){var r=new If(this.gl.createTexture());return r.dirtyId=-1,t._glTextures[this.CONTEXT_UID]=r,this.managedTextures.push(t),t.on("dispose",this.destroyTexture,this),r},e.prototype.initTextureType=function(t,r){var n,i;r.internalFormat=(i=(n=this.internalFormats[t.type])===null||n===void 0?void 0:n[t.format])!==null&&i!==void 0?i:t.format,this.webGLVersion===2&&t.type===fe.HALF_FLOAT?r.type=this.gl.HALF_FLOAT:r.type=t.type},e.prototype.updateTexture=function(t){var r=t._glTextures[this.CONTEXT_UID];if(r){var n=this.renderer;if(this.initTextureType(t,r),t.resource&&t.resource.upload(n,t,r))r.samplerType!==Cl.FLOAT&&(this.hasIntegerTextures=!0);else{var i=t.realWidth,o=t.realHeight,a=n.gl;(r.width!==i||r.height!==o||r.dirtyId<0)&&(r.width=i,r.height=o,a.texImage2D(t.target,0,r.internalFormat,i,o,0,t.format,r.type,null))}t.dirtyStyleId!==r.dirtyStyleId&&this.updateTextureStyle(t),r.dirtyId=t.dirtyId}},e.prototype.destroyTexture=function(t,r){var n=this.gl;if(t=t.castToBaseTexture(),t._glTextures[this.CONTEXT_UID]&&(this.unbind(t),n.deleteTexture(t._glTextures[this.CONTEXT_UID].texture),t.off("dispose",this.destroyTexture,this),delete t._glTextures[this.CONTEXT_UID],!r)){var i=this.managedTextures.indexOf(t);i!==-1&&Vo(this.managedTextures,i,1)}},e.prototype.updateTextureStyle=function(t){var r=t._glTextures[this.CONTEXT_UID];r&&((t.mipmap===Lr.POW2||this.webGLVersion!==2)&&!t.isPowerOfTwo?r.mipmap=!1:r.mipmap=t.mipmap>=1,this.webGLVersion!==2&&!t.isPowerOfTwo?r.wrapMode=bn.CLAMP:r.wrapMode=t.wrapMode,t.resource&&t.resource.style(this.renderer,t,r)||this.setStyle(t,r),r.dirtyStyleId=t.dirtyStyleId)},e.prototype.setStyle=function(t,r){var n=this.gl;if(r.mipmap&&t.mipmap!==Lr.ON_MANUAL&&n.generateMipmap(t.target),n.texParameteri(t.target,n.TEXTURE_WRAP_S,r.wrapMode),n.texParameteri(t.target,n.TEXTURE_WRAP_T,r.wrapMode),r.mipmap){n.texParameteri(t.target,n.TEXTURE_MIN_FILTER,t.scaleMode===Pr.LINEAR?n.LINEAR_MIPMAP_LINEAR:n.NEAREST_MIPMAP_NEAREST);var i=this.renderer.context.extensions.anisotropicFiltering;if(i&&t.anisotropicLevel>0&&t.scaleMode===Pr.LINEAR){var o=Math.min(t.anisotropicLevel,n.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT));n.texParameterf(t.target,i.TEXTURE_MAX_ANISOTROPY_EXT,o)}}else n.texParameteri(t.target,n.TEXTURE_MIN_FILTER,t.scaleMode===Pr.LINEAR?n.LINEAR:n.NEAREST);n.texParameteri(t.target,n.TEXTURE_MAG_FILTER,t.scaleMode===Pr.LINEAR?n.LINEAR:n.NEAREST)},e.prototype.destroy=function(){this.renderer=null},e}(),YI={__proto__:null,FilterSystem:pb,BatchSystem:vb,ContextSystem:mb,FramebufferSystem:gb,GeometrySystem:yb,MaskSystem:_b,ScissorSystem:xb,StencilSystem:bb,ProjectionSystem:Sb,RenderTextureSystem:wb,ShaderSystem:Eb,StateSystem:Tb,TextureGCSystem:Cb,TextureSystem:Ob},Em=new kt,KI=function(e){it(t,e);function t(r,n){r===void 0&&(r=ds.UNKNOWN);var i=e.call(this)||this;return n=Object.assign({},ne.RENDER_OPTIONS,n),i.options=n,i.type=r,i.screen=new Le(0,0,n.width,n.height),i.view=n.view||ne.ADAPTER.createCanvas(),i.resolution=n.resolution||ne.RESOLUTION,i.useContextAlpha=n.useContextAlpha,i.autoDensity=!!n.autoDensity,i.preserveDrawingBuffer=n.preserveDrawingBuffer,i.clearBeforeRender=n.clearBeforeRender,i._backgroundColor=0,i._backgroundColorRgba=[0,0,0,1],i._backgroundColorString="#000000",i.backgroundColor=n.backgroundColor||i._backgroundColor,i.backgroundAlpha=n.backgroundAlpha,n.transparent!==void 0&&(xr("6.0.0","Option transparent is deprecated, please use backgroundAlpha instead."),i.useContextAlpha=n.transparent,i.backgroundAlpha=n.transparent?0:1),i._lastObjectRendered=null,i.plugins={},i}return t.prototype.initPlugins=function(r){for(var n in r)this.plugins[n]=new r[n](this)},Object.defineProperty(t.prototype,"width",{get:function(){return this.view.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.view.height},enumerable:!1,configurable:!0}),t.prototype.resize=function(r,n){this.view.width=Math.round(r*this.resolution),this.view.height=Math.round(n*this.resolution);var i=this.view.width/this.resolution,o=this.view.height/this.resolution;this.screen.width=i,this.screen.height=o,this.autoDensity&&(this.view.style.width=i+"px",this.view.style.height=o+"px"),this.emit("resize",i,o)},t.prototype.generateTexture=function(r,n,i,o){n===void 0&&(n={}),typeof n=="number"&&(xr("6.1.0","generateTexture options (scaleMode, resolution, region) are now object options."),n={scaleMode:n,resolution:i,region:o});var a=n.region,s=Kne(n,["region"]);o=a||r.getLocalBounds(null,!0),o.width===0&&(o.width=1),o.height===0&&(o.height=1);var u=lo.create(Ny({width:o.width,height:o.height},s));return Em.tx=-o.x,Em.ty=-o.y,this.render(r,{renderTexture:u,clear:!1,transform:Em,skipUpdateTransform:!!r.parent}),u},t.prototype.destroy=function(r){for(var n in this.plugins)this.plugins[n].destroy(),this.plugins[n]=null;r&&this.view.parentNode&&this.view.parentNode.removeChild(this.view);var i=this;i.plugins=null,i.type=ds.UNKNOWN,i.view=null,i.screen=null,i._tempDisplayObjectParent=null,i.options=null,this._backgroundColorRgba=null,this._backgroundColorString=null,this._lastObjectRendered=null},Object.defineProperty(t.prototype,"backgroundColor",{get:function(){return this._backgroundColor},set:function(r){this._backgroundColor=r,this._backgroundColorString=Zx(r),Xt(r,this._backgroundColorRgba)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"backgroundAlpha",{get:function(){return this._backgroundColorRgba[3]},set:function(r){this._backgroundColorRgba[3]=r},enumerable:!1,configurable:!0}),t}($s),Fie=function(){function e(t){this.buffer=t||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}return e}(),Die=function(){function e(t){this.renderer=t,this.managedBuffers={},this.boundBufferBases={}}return e.prototype.destroy=function(){this.renderer=null},e.prototype.contextChange=function(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID},e.prototype.bind=function(t){var r=this,n=r.gl,i=r.CONTEXT_UID,o=t._glBuffers[i]||this.createGLBuffer(t);n.bindBuffer(t.type,o.buffer)},e.prototype.bindBufferBase=function(t,r){var n=this,i=n.gl,o=n.CONTEXT_UID;if(this.boundBufferBases[r]!==t){var a=t._glBuffers[o]||this.createGLBuffer(t);this.boundBufferBases[r]=t,i.bindBufferBase(i.UNIFORM_BUFFER,r,a.buffer)}},e.prototype.bindBufferRange=function(t,r,n){var i=this,o=i.gl,a=i.CONTEXT_UID;n=n||0;var s=t._glBuffers[a]||this.createGLBuffer(t);o.bindBufferRange(o.UNIFORM_BUFFER,r||0,s.buffer,n*256,256)},e.prototype.update=function(t){var r=this,n=r.gl,i=r.CONTEXT_UID,o=t._glBuffers[i];if(t._updateID!==o.updateID)if(o.updateID=t._updateID,n.bindBuffer(t.type,o.buffer),o.byteLength>=t.data.byteLength)n.bufferSubData(t.type,0,t.data);else{var a=t.static?n.STATIC_DRAW:n.DYNAMIC_DRAW;o.byteLength=t.data.byteLength,n.bufferData(t.type,t.data,a)}},e.prototype.dispose=function(t,r){if(this.managedBuffers[t.id]){delete this.managedBuffers[t.id];var n=t._glBuffers[this.CONTEXT_UID],i=this.gl;t.disposeRunner.remove(this),n&&(r||i.deleteBuffer(n.buffer),delete t._glBuffers[this.CONTEXT_UID])}},e.prototype.disposeAll=function(t){for(var r=Object.keys(this.managedBuffers),n=0;n=ut.HIGH?this.multisample=ut.HIGH:n>=ut.MEDIUM?this.multisample=ut.MEDIUM:n>=ut.LOW?this.multisample=ut.LOW:this.multisample=ut.NONE},t.prototype.addSystem=function(r,n){var i=new r(this);if(this[n])throw new Error('Whoops! The name "'+n+'" is already in use');this[n]=i;for(var o in this.runners)this.runners[o].add(i);return this},t.prototype.render=function(r,n){var i,o,a,s;if(n&&(n instanceof lo?(xr("6.0.0","Renderer#render arguments changed, use options instead."),i=n,o=arguments[2],a=arguments[3],s=arguments[4]):(i=n.renderTexture,o=n.clear,a=n.transform,s=n.skipUpdateTransform)),this.renderingToScreen=!i,this.runners.prerender.emit(),this.emit("prerender"),this.projection.transform=a,!this.context.isLost){if(i||(this._lastObjectRendered=r),!s){var u=r.enableTempParent();r.updateTransform(),r.disableTempParent(u)}this.renderTexture.bind(i),this.batch.currentRenderer.start(),(o!==void 0?o:this.clearBeforeRender)&&this.renderTexture.clear(),r.render(this),this.batch.currentRenderer.flush(),i&&i.baseTexture.update(),this.runners.postrender.emit(),this.projection.transform=null,this.emit("postrender")}},t.prototype.generateTexture=function(r,n,i,o){n===void 0&&(n={});var a=e.prototype.generateTexture.call(this,r,n,i,o);return this.framebuffer.blit(),a},t.prototype.resize=function(r,n){e.prototype.resize.call(this,r,n),this.runners.resize.emit(this.screen.height,this.screen.width)},t.prototype.reset=function(){return this.runners.reset.emit(),this},t.prototype.clear=function(){this.renderTexture.bind(),this.renderTexture.clear()},t.prototype.destroy=function(r){this.runners.destroy.emit();for(var n in this.runners)this.runners[n].destroy();e.prototype.destroy.call(this,r),this.gl=null},Object.defineProperty(t.prototype,"extract",{get:function(){return xr("6.0.0","Renderer#extract has been deprecated, please use Renderer#plugins.extract instead."),this.plugins.extract},enumerable:!1,configurable:!0}),t.registerPlugin=function(r,n){xr("6.5.0","Renderer.registerPlugin() has been deprecated, please use extensions.add() instead."),oi.add({name:r,type:Xe.RendererPlugin,ref:n})},t.__plugins={},t}(KI);oi.handleByMap(Xe.RendererPlugin,Ab.__plugins);function ZI(e){return Ab.create(e)}var Bie=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,jie=`attribute vec2 aVertexPosition; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +uniform vec4 inputSize; +uniform vec4 outputFrame; + +vec4 filterVertexPosition( void ) +{ + vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy; + + return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0); +} + +vec2 filterTextureCoord( void ) +{ + return aVertexPosition * (outputFrame.zw * inputSize.zw); +} + +void main(void) +{ + gl_Position = filterVertexPosition(); + vTextureCoord = filterTextureCoord(); +} +`,QI=Bie,Pb=jie,$ie=function(){function e(t){xr("6.1.0","System class is deprecated, implemement ISystem interface instead."),this.renderer=t}return e.prototype.destroy=function(){this.renderer=null},e}(),Rh=function(){function e(){this.texArray=null,this.blend=0,this.type=tn.TRIANGLES,this.start=0,this.size=0,this.data=null}return e}(),Ih=function(){function e(){this.elements=[],this.ids=[],this.count=0}return e.prototype.clear=function(){for(var t=0;tthis.size&&this.flush(),this._vertexCount+=r.vertexData.length/2,this._indexCount+=r.indices.length,this._bufferedTextures[this._bufferSize]=r._texture.baseTexture,this._bufferedElements[this._bufferSize++]=r)},t.prototype.buildTexturesAndDrawCalls=function(){var r=this,n=r._bufferedTextures,i=r.MAX_TEXTURES,o=t._textureArrayPool,a=this.renderer.batch,s=this._tempBoundTextures,u=this.renderer.textureGC.count,l=++Ne._globalBatch,c=0,f=o[0],h=0;a.copyBoundTextures(s,i);for(var d=0;d=i&&(a.boundArray(f,s,l,i),this.buildDrawCalls(f,h,d),h=d,f=o[++c],++l),v._batchEnabled=l,v.touched=u,f.elements[f.count++]=v)}f.count>0&&(a.boundArray(f,s,l,i),this.buildDrawCalls(f,h,this._bufferSize),++c,++l);for(var d=0;d0&&(r+=` +else `),n title : "+t.title+"
tabIndex: "+t.tabIndex},e.prototype.capHitArea=function(t){t.x<0&&(t.width+=t.x,t.x=0),t.y<0&&(t.height+=t.y,t.y=0);var r=this.renderer,n=r.width,i=r.height;t.x+t.width>n&&(t.width=n-t.x),t.y+t.height>i&&(t.height=i-t.y)},e.prototype.addChild=function(t){var r=this.pool.pop();r||(r=document.createElement("button"),r.style.width=qc+"px",r.style.height=qc+"px",r.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",r.style.position="absolute",r.style.zIndex=hC.toString(),r.style.borderStyle="none",navigator.userAgent.toLowerCase().indexOf("chrome")>-1?r.setAttribute("aria-live","off"):r.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?r.setAttribute("aria-relevant","additions"):r.setAttribute("aria-relevant","text"),r.addEventListener("click",this._onClick.bind(this)),r.addEventListener("focus",this._onFocus.bind(this)),r.addEventListener("focusout",this._onFocusOut.bind(this))),r.style.pointerEvents=t.accessiblePointerEvents,r.type=t.accessibleType,t.accessibleTitle&&t.accessibleTitle!==null?r.title=t.accessibleTitle:(!t.accessibleHint||t.accessibleHint===null)&&(r.title="displayObject "+t.tabIndex),t.accessibleHint&&t.accessibleHint!==null&&r.setAttribute("aria-label",t.accessibleHint),this.debug&&this.updateDebugHTML(r),t._accessibleActive=!0,t._accessibleDiv=r,r.displayObject=t,this.children.push(t),this.div.appendChild(t._accessibleDiv),t._accessibleDiv.tabIndex=t.tabIndex},e.prototype._onClick=function(t){var r=this.renderer.plugins.interaction,n=t.target.displayObject,i=r.eventData;r.dispatchEvent(n,"click",i),r.dispatchEvent(n,"pointertap",i),r.dispatchEvent(n,"tap",i)},e.prototype._onFocus=function(t){t.target.getAttribute("aria-live")||t.target.setAttribute("aria-live","assertive");var r=this.renderer.plugins.interaction,n=t.target.displayObject,i=r.eventData;r.dispatchEvent(n,"mouseover",i)},e.prototype._onFocusOut=function(t){t.target.getAttribute("aria-live")||t.target.setAttribute("aria-live","polite");var r=this.renderer.plugins.interaction,n=t.target.displayObject,i=r.eventData;r.dispatchEvent(n,"mouseout",i)},e.prototype._onKeyDown=function(t){t.keyCode===Hie&&this.activate()},e.prototype._onMouseMove=function(t){t.movementX===0&&t.movementY===0||this.deactivate()},e.prototype.destroy=function(){this.destroyTouchHook(),this.div=null,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null},e.extension={name:"accessibility",type:[Xe.RendererPlugin,Xe.CanvasRendererPlugin]},e}();/*! + * @pixi/interaction - v6.5.10 + * Compiled Thu, 06 Jul 2023 15:25:11 UTC + * + * @pixi/interaction is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */var My=function(){function e(){this.pressure=0,this.rotationAngle=0,this.twist=0,this.tangentialPressure=0,this.global=new Oe,this.target=null,this.originalEvent=null,this.identifier=null,this.isPrimary=!1,this.button=0,this.buttons=0,this.width=0,this.height=0,this.tiltX=0,this.tiltY=0,this.pointerType=null,this.pressure=0,this.rotationAngle=0,this.twist=0,this.tangentialPressure=0}return Object.defineProperty(e.prototype,"pointerId",{get:function(){return this.identifier},enumerable:!1,configurable:!0}),e.prototype.getLocalPosition=function(t,r,n){return t.worldTransform.applyInverse(n||this.global,r)},e.prototype.copyEvent=function(t){"isPrimary"in t&&t.isPrimary&&(this.isPrimary=!0),this.button="button"in t&&t.button;var r="buttons"in t&&t.buttons;this.buttons=Number.isInteger(r)?r:"which"in t&&t.which,this.width="width"in t&&t.width,this.height="height"in t&&t.height,this.tiltX="tiltX"in t&&t.tiltX,this.tiltY="tiltY"in t&&t.tiltY,this.pointerType="pointerType"in t&&t.pointerType,this.pressure="pressure"in t&&t.pressure,this.rotationAngle="rotationAngle"in t&&t.rotationAngle,this.twist="twist"in t&&t.twist||0,this.tangentialPressure="tangentialPressure"in t&&t.tangentialPressure||0},e.prototype.reset=function(){this.isPrimary=!1},e}();/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var Fy=function(e,t){return Fy=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},Fy(e,t)};function Kie(e,t){Fy(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var ak=function(){function e(){this.stopped=!1,this.stopsPropagatingAt=null,this.stopPropagationHint=!1,this.target=null,this.currentTarget=null,this.type=null,this.data=null}return e.prototype.stopPropagation=function(){this.stopped=!0,this.stopPropagationHint=!0,this.stopsPropagatingAt=this.currentTarget},e.prototype.reset=function(){this.stopped=!1,this.stopsPropagatingAt=null,this.stopPropagationHint=!1,this.currentTarget=null,this.target=null},e}(),kf=function(){function e(t){this._pointerId=t,this._flags=e.FLAGS.NONE}return e.prototype._doSet=function(t,r){r?this._flags=this._flags|t:this._flags=this._flags&~t},Object.defineProperty(e.prototype,"pointerId",{get:function(){return this._pointerId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"flags",{get:function(){return this._flags},set:function(t){this._flags=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"none",{get:function(){return this._flags===e.FLAGS.NONE},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"over",{get:function(){return(this._flags&e.FLAGS.OVER)!==0},set:function(t){this._doSet(e.FLAGS.OVER,t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rightDown",{get:function(){return(this._flags&e.FLAGS.RIGHT_DOWN)!==0},set:function(t){this._doSet(e.FLAGS.RIGHT_DOWN,t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leftDown",{get:function(){return(this._flags&e.FLAGS.LEFT_DOWN)!==0},set:function(t){this._doSet(e.FLAGS.LEFT_DOWN,t)},enumerable:!1,configurable:!0}),e.FLAGS=Object.freeze({NONE:0,OVER:1,LEFT_DOWN:2,RIGHT_DOWN:4}),e}(),Zie=function(){function e(){this._tempPoint=new Oe}return e.prototype.recursiveFindHit=function(t,r,n,i,o){var a;if(!r||!r.visible)return!1;var s=t.data.global;o=r.interactive||o;var u=!1,l=o,c=!0;if(r.hitArea)i&&(r.worldTransform.applyInverse(s,this._tempPoint),r.hitArea.contains(this._tempPoint.x,this._tempPoint.y)?u=!0:(i=!1,c=!1)),l=!1;else if(r._mask&&i){var f=r._mask.isMaskData?r._mask.maskObject:r._mask;f&&!(!((a=f.containsPoint)===null||a===void 0)&&a.call(f,s))&&(i=!1)}if(c&&r.interactiveChildren&&r.children)for(var h=r.children,d=h.length-1;d>=0;d--){var v=h[d],g=this.recursiveFindHit(t,v,n,i,l);if(g){if(!v.parent)continue;l=!1,g&&(t.target&&(i=!1),u=!0)}}return o&&(i&&!t.target&&!r.hitArea&&r.containsPoint&&r.containsPoint(s)&&(u=!0),r.interactive&&(u&&!t.target&&(t.target=r),n&&n(t,r,!!u))),u},e.prototype.findHit=function(t,r,n,i){this.recursiveFindHit(t,r,n,i,!1)},e}(),sk={interactive:!1,interactiveChildren:!0,hitArea:null,get buttonMode(){return this.cursor==="pointer"},set buttonMode(e){e?this.cursor="pointer":this.cursor==="pointer"&&(this.cursor=null)},cursor:null,get trackedPointers(){return this._trackedPointers===void 0&&(this._trackedPointers={}),this._trackedPointers},_trackedPointers:void 0};St.mixin(sk);var Xc=1,Yc={target:null,data:{global:null}},uk=function(e){Kie(t,e);function t(r,n){var i=e.call(this)||this;return n=n||{},i.renderer=r,i.autoPreventDefault=n.autoPreventDefault!==void 0?n.autoPreventDefault:!0,i.interactionFrequency=n.interactionFrequency||10,i.mouse=new My,i.mouse.identifier=Xc,i.mouse.global.set(-999999),i.activeInteractionData={},i.activeInteractionData[Xc]=i.mouse,i.interactionDataPool=[],i.eventData=new ak,i.interactionDOMElement=null,i.moveWhenInside=!1,i.eventsAdded=!1,i.tickerAdded=!1,i.mouseOverRenderer=!("PointerEvent"in globalThis),i.supportsTouchEvents="ontouchstart"in globalThis,i.supportsPointerEvents=!!globalThis.PointerEvent,i.onPointerUp=i.onPointerUp.bind(i),i.processPointerUp=i.processPointerUp.bind(i),i.onPointerCancel=i.onPointerCancel.bind(i),i.processPointerCancel=i.processPointerCancel.bind(i),i.onPointerDown=i.onPointerDown.bind(i),i.processPointerDown=i.processPointerDown.bind(i),i.onPointerMove=i.onPointerMove.bind(i),i.processPointerMove=i.processPointerMove.bind(i),i.onPointerOut=i.onPointerOut.bind(i),i.processPointerOverOut=i.processPointerOverOut.bind(i),i.onPointerOver=i.onPointerOver.bind(i),i.cursorStyles={default:"inherit",pointer:"pointer"},i.currentCursorMode=null,i.cursor=null,i.resolution=1,i.delayedEvents=[],i.search=new Zie,i._tempDisplayObject=new ib,i._eventListenerOptions={capture:!0,passive:!1},i._useSystemTicker=n.useSystemTicker!==void 0?n.useSystemTicker:!0,i.setTargetElement(i.renderer.view,i.renderer.resolution),i}return Object.defineProperty(t.prototype,"useSystemTicker",{get:function(){return this._useSystemTicker},set:function(r){this._useSystemTicker=r,r?this.addTickerListener():this.removeTickerListener()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastObjectRendered",{get:function(){return this.renderer._lastObjectRendered||this._tempDisplayObject},enumerable:!1,configurable:!0}),t.prototype.hitTest=function(r,n){return Yc.target=null,Yc.data.global=r,n||(n=this.lastObjectRendered),this.processInteractive(Yc,n,null,!0),Yc.target},t.prototype.setTargetElement=function(r,n){n===void 0&&(n=1),this.removeTickerListener(),this.removeEvents(),this.interactionDOMElement=r,this.resolution=n,this.addEvents(),this.addTickerListener()},t.prototype.addTickerListener=function(){this.tickerAdded||!this.interactionDOMElement||!this._useSystemTicker||(Vt.system.add(this.tickerUpdate,this,Qn.INTERACTION),this.tickerAdded=!0)},t.prototype.removeTickerListener=function(){this.tickerAdded&&(Vt.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)},t.prototype.addEvents=function(){if(!(this.eventsAdded||!this.interactionDOMElement)){var r=this.interactionDOMElement.style;globalThis.navigator.msPointerEnabled?(r.msContentZooming="none",r.msTouchAction="none"):this.supportsPointerEvents&&(r.touchAction="none"),this.supportsPointerEvents?(globalThis.document.addEventListener("pointermove",this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.addEventListener("pointerdown",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener("pointerleave",this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.addEventListener("pointerover",this.onPointerOver,this._eventListenerOptions),globalThis.addEventListener("pointercancel",this.onPointerCancel,this._eventListenerOptions),globalThis.addEventListener("pointerup",this.onPointerUp,this._eventListenerOptions)):(globalThis.document.addEventListener("mousemove",this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.addEventListener("mousedown",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener("mouseout",this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.addEventListener("mouseover",this.onPointerOver,this._eventListenerOptions),globalThis.addEventListener("mouseup",this.onPointerUp,this._eventListenerOptions)),this.supportsTouchEvents&&(this.interactionDOMElement.addEventListener("touchstart",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener("touchcancel",this.onPointerCancel,this._eventListenerOptions),this.interactionDOMElement.addEventListener("touchend",this.onPointerUp,this._eventListenerOptions),this.interactionDOMElement.addEventListener("touchmove",this.onPointerMove,this._eventListenerOptions)),this.eventsAdded=!0}},t.prototype.removeEvents=function(){if(!(!this.eventsAdded||!this.interactionDOMElement)){var r=this.interactionDOMElement.style;globalThis.navigator.msPointerEnabled?(r.msContentZooming="",r.msTouchAction=""):this.supportsPointerEvents&&(r.touchAction=""),this.supportsPointerEvents?(globalThis.document.removeEventListener("pointermove",this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("pointerdown",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("pointerleave",this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("pointerover",this.onPointerOver,this._eventListenerOptions),globalThis.removeEventListener("pointercancel",this.onPointerCancel,this._eventListenerOptions),globalThis.removeEventListener("pointerup",this.onPointerUp,this._eventListenerOptions)):(globalThis.document.removeEventListener("mousemove",this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("mousedown",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("mouseout",this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("mouseover",this.onPointerOver,this._eventListenerOptions),globalThis.removeEventListener("mouseup",this.onPointerUp,this._eventListenerOptions)),this.supportsTouchEvents&&(this.interactionDOMElement.removeEventListener("touchstart",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("touchcancel",this.onPointerCancel,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("touchend",this.onPointerUp,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("touchmove",this.onPointerMove,this._eventListenerOptions)),this.interactionDOMElement=null,this.eventsAdded=!1}},t.prototype.tickerUpdate=function(r){this._deltaTime+=r,!(this._deltaTime0&&(s=r.composedPath()[0]);for(var u=s!==this.interactionDOMElement?"outside":"",l=0;l"u"&&(a.button=r.touches.length?1:0),typeof a.buttons>"u"&&(a.buttons=r.touches.length?1:0),typeof a.isPrimary>"u"&&(a.isPrimary=r.touches.length===1&&r.type==="touchstart"),typeof a.width>"u"&&(a.width=a.radiusX||1),typeof a.height>"u"&&(a.height=a.radiusY||1),typeof a.tiltX>"u"&&(a.tiltX=0),typeof a.tiltY>"u"&&(a.tiltY=0),typeof a.pointerType>"u"&&(a.pointerType="touch"),typeof a.pointerId>"u"&&(a.pointerId=a.identifier||0),typeof a.pressure>"u"&&(a.pressure=a.force||.5),typeof a.twist>"u"&&(a.twist=0),typeof a.tangentialPressure>"u"&&(a.tangentialPressure=0),typeof a.layerX>"u"&&(a.layerX=a.offsetX=a.clientX),typeof a.layerY>"u"&&(a.layerY=a.offsetY=a.clientY),a.isNormalized=!0,n.push(a)}else if(!globalThis.MouseEvent||r instanceof MouseEvent&&(!this.supportsPointerEvents||!(r instanceof globalThis.PointerEvent))){var s=r;typeof s.isPrimary>"u"&&(s.isPrimary=!0),typeof s.width>"u"&&(s.width=1),typeof s.height>"u"&&(s.height=1),typeof s.tiltX>"u"&&(s.tiltX=0),typeof s.tiltY>"u"&&(s.tiltY=0),typeof s.pointerType>"u"&&(s.pointerType="mouse"),typeof s.pointerId>"u"&&(s.pointerId=Xc),typeof s.pressure>"u"&&(s.pressure=.5),typeof s.twist>"u"&&(s.twist=0),typeof s.tangentialPressure>"u"&&(s.tangentialPressure=0),s.isNormalized=!0,n.push(s)}else n.push(r);return n},t.prototype.destroy=function(){this.removeEvents(),this.removeTickerListener(),this.removeAllListeners(),this.renderer=null,this.mouse=null,this.eventData=null,this.interactionDOMElement=null,this.onPointerDown=null,this.processPointerDown=null,this.onPointerUp=null,this.processPointerUp=null,this.onPointerCancel=null,this.processPointerCancel=null,this.onPointerMove=null,this.processPointerMove=null,this.onPointerOut=null,this.processPointerOverOut=null,this.onPointerOver=null,this.search=null},t.extension={name:"interaction",type:[Xe.RendererPlugin,Xe.CanvasRendererPlugin]},t}($s);/*! + * @pixi/extract - v6.5.10 + * Compiled Thu, 06 Jul 2023 15:25:11 UTC + * + * @pixi/extract is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */var Qie=new Le,Jie=4,lk=function(){function e(t){this.renderer=t}return e.prototype.image=function(t,r,n){var i=new Image;return i.src=this.base64(t,r,n),i},e.prototype.base64=function(t,r,n){return this.canvas(t).toDataURL(r,n)},e.prototype.canvas=function(t,r){var n=this._rawPixels(t,r),i=n.pixels,o=n.width,a=n.height,s=n.flipY,u=new Py(o,a,1),l=u.context.getImageData(0,0,o,a);if(e.arrayPostDivide(i,l.data),u.context.putImageData(l,0,0),s){var c=new Py(u.width,u.height,1);c.context.scale(1,-1),c.context.drawImage(u.canvas,0,-a),u.destroy(),u=c}return u.canvas},e.prototype.pixels=function(t,r){var n=this._rawPixels(t,r).pixels;return e.arrayPostDivide(n,n),n},e.prototype._rawPixels=function(t,r){var n=this.renderer,i,o=!1,a,s=!1;if(t)if(t instanceof lo)a=t;else{var u=n.context.webGLVersion>=2?n.multisample:ut.NONE;if(a=this.renderer.generateTexture(t,{multisample:u}),u!==ut.NONE){var l=lo.create({width:a.width,height:a.height});n.framebuffer.bind(a.framebuffer),n.framebuffer.blit(l.framebuffer),n.framebuffer.bind(null),a.destroy(!0),a=l}s=!0}a?(i=a.baseTexture.resolution,r=r??a.frame,o=!1,n.renderTexture.bind(a)):(i=n.resolution,r||(r=Qie,r.width=n.width,r.height=n.height),o=!0,n.renderTexture.bind(null));var c=Math.round(r.width*i),f=Math.round(r.height*i),h=new Uint8Array(Jie*c*f),d=n.gl;return d.readPixels(Math.round(r.x*i),Math.round(r.y*i),c,f,d.RGBA,d.UNSIGNED_BYTE,h),s&&a.destroy(!0),{pixels:h,width:c,height:f,flipY:o}},e.prototype.destroy=function(){this.renderer=null},e.arrayPostDivide=function(t,r){for(var n=0;n"u"&&(Tm=!!(globalThis.XDomainRequest&&!("withCredentials"in new XMLHttpRequest))),Tm&&this.crossOrigin?this._loadXdr():this._loadXhr();break}}},e.prototype._hasFlag=function(t){return(this._flags&t)!==0},e.prototype._setFlag=function(t,r){this._flags=r?this._flags|t:this._flags&~t},e.prototype._clearEvents=function(){clearTimeout(this._elementTimer),this.data&&this.data.removeEventListener&&(this.data.removeEventListener("error",this._boundOnError,!1),this.data.removeEventListener("load",this._boundComplete,!1),this.data.removeEventListener("progress",this._boundOnProgress,!1),this.data.removeEventListener("canplaythrough",this._boundComplete,!1)),this.xhr&&(this.xhr.removeEventListener?(this.xhr.removeEventListener("error",this._boundXhrOnError,!1),this.xhr.removeEventListener("timeout",this._boundXhrOnTimeout,!1),this.xhr.removeEventListener("abort",this._boundXhrOnAbort,!1),this.xhr.removeEventListener("progress",this._boundOnProgress,!1),this.xhr.removeEventListener("load",this._boundXhrOnLoad,!1)):(this.xhr.onerror=null,this.xhr.ontimeout=null,this.xhr.onprogress=null,this.xhr.onload=null))},e.prototype._finish=function(){if(this.isComplete)throw new Error("Complete called again for an already completed resource.");this._setFlag(e.STATUS_FLAGS.COMPLETE,!0),this._setFlag(e.STATUS_FLAGS.LOADING,!1),this.onComplete.dispatch(this)},e.prototype._loadElement=function(t){this.metadata.loadElement?this.data=this.metadata.loadElement:t==="image"&&typeof globalThis.Image<"u"?this.data=new Image:this.data=document.createElement(t),this.crossOrigin&&(this.data.crossOrigin=this.crossOrigin),this.metadata.skipSource||(this.data.src=this.url),this.data.addEventListener("error",this._boundOnError,!1),this.data.addEventListener("load",this._boundComplete,!1),this.data.addEventListener("progress",this._boundOnProgress,!1),this.timeout&&(this._elementTimer=setTimeout(this._boundOnTimeout,this.timeout))},e.prototype._loadSourceElement=function(t){if(this.metadata.loadElement?this.data=this.metadata.loadElement:t==="audio"&&typeof globalThis.Audio<"u"?this.data=new Audio:this.data=document.createElement(t),this.data===null){this.abort("Unsupported element: "+t);return}if(this.crossOrigin&&(this.data.crossOrigin=this.crossOrigin),!this.metadata.skipSource)if(navigator.isCocoonJS)this.data.src=Array.isArray(this.url)?this.url[0]:this.url;else if(Array.isArray(this.url))for(var r=this.metadata.mimeType,n=0;n"u"?vC:t.status;(t.responseType===""||t.responseType==="text"||typeof t.responseType>"u")&&(r=t.responseText),n===eoe&&(r.length>0||t.responseType===e.XHR_RESPONSE_TYPE.BUFFER)?n=vC:n===roe&&(n=toe);var i=n/100|0;if(i===noe)if(this.xhrType===e.XHR_RESPONSE_TYPE.TEXT)this.data=r,this.type=e.TYPE.TEXT;else if(this.xhrType===e.XHR_RESPONSE_TYPE.JSON)try{this.data=JSON.parse(r),this.type=e.TYPE.JSON}catch(s){this.abort("Error trying to parse loaded json: "+s);return}else if(this.xhrType===e.XHR_RESPONSE_TYPE.DOCUMENT)try{if(globalThis.DOMParser){var o=new DOMParser;this.data=o.parseFromString(r,"text/xml")}else{var a=document.createElement("div");a.innerHTML=r,this.data=a}this.type=e.TYPE.XML}catch(s){this.abort("Error trying to parse loaded xml: "+s);return}else this.data=t.response||r;else{this.abort("["+t.status+"] "+t.statusText+": "+t.responseURL);return}this.complete()},e.prototype._determineCrossOrigin=function(t,r){if(t.indexOf("data:")===0)return"";if(globalThis.origin!==globalThis.location.origin)return"anonymous";r=r||globalThis.location,Zc||(Zc=document.createElement("a")),Zc.href=t;var n=ck(Zc.href,{strictMode:!0}),i=!n.port&&r.port===""||n.port===r.port,o=n.protocol?n.protocol+":":"";return n.host!==r.hostname||!i||o!==r.protocol?"anonymous":""},e.prototype._determineXhrType=function(){return e._xhrTypeMap[this.extension]||e.XHR_RESPONSE_TYPE.TEXT},e.prototype._determineLoadType=function(){return e._loadTypeMap[this.extension]||e.LOAD_TYPE.XHR},e.prototype._getExtension=function(t){t===void 0&&(t=this.url);var r="";if(this.isDataUrl){var n=t.indexOf("/");r=t.substring(n+1,t.indexOf(";",n))}else{var i=t.indexOf("?"),o=t.indexOf("#"),a=Math.min(i>-1?i:t.length,o>-1?o:t.length);t=t.substring(0,a),r=t.substring(t.lastIndexOf(".")+1)}return r.toLowerCase()},e.prototype._getMimeFromXhrType=function(t){switch(t){case e.XHR_RESPONSE_TYPE.BUFFER:return"application/octet-binary";case e.XHR_RESPONSE_TYPE.BLOB:return"application/blob";case e.XHR_RESPONSE_TYPE.DOCUMENT:return"application/xml";case e.XHR_RESPONSE_TYPE.JSON:return"application/json";case e.XHR_RESPONSE_TYPE.DEFAULT:case e.XHR_RESPONSE_TYPE.TEXT:default:return"text/plain"}},e}();(function(e){(function(t){t[t.NONE=0]="NONE",t[t.DATA_URL=1]="DATA_URL",t[t.COMPLETE=2]="COMPLETE",t[t.LOADING=4]="LOADING"})(e.STATUS_FLAGS||(e.STATUS_FLAGS={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.JSON=1]="JSON",t[t.XML=2]="XML",t[t.IMAGE=3]="IMAGE",t[t.AUDIO=4]="AUDIO",t[t.VIDEO=5]="VIDEO",t[t.TEXT=6]="TEXT"}(e.TYPE||(e.TYPE={})),function(t){t[t.XHR=1]="XHR",t[t.IMAGE=2]="IMAGE",t[t.AUDIO=3]="AUDIO",t[t.VIDEO=4]="VIDEO"}(e.LOAD_TYPE||(e.LOAD_TYPE={})),function(t){t.DEFAULT="text",t.BUFFER="arraybuffer",t.BLOB="blob",t.DOCUMENT="document",t.JSON="json",t.TEXT="text"}(e.XHR_RESPONSE_TYPE||(e.XHR_RESPONSE_TYPE={})),e._loadTypeMap={gif:e.LOAD_TYPE.IMAGE,png:e.LOAD_TYPE.IMAGE,bmp:e.LOAD_TYPE.IMAGE,jpg:e.LOAD_TYPE.IMAGE,jpeg:e.LOAD_TYPE.IMAGE,tif:e.LOAD_TYPE.IMAGE,tiff:e.LOAD_TYPE.IMAGE,webp:e.LOAD_TYPE.IMAGE,tga:e.LOAD_TYPE.IMAGE,avif:e.LOAD_TYPE.IMAGE,svg:e.LOAD_TYPE.IMAGE,"svg+xml":e.LOAD_TYPE.IMAGE,mp3:e.LOAD_TYPE.AUDIO,ogg:e.LOAD_TYPE.AUDIO,wav:e.LOAD_TYPE.AUDIO,mp4:e.LOAD_TYPE.VIDEO,webm:e.LOAD_TYPE.VIDEO},e._xhrTypeMap={xhtml:e.XHR_RESPONSE_TYPE.DOCUMENT,html:e.XHR_RESPONSE_TYPE.DOCUMENT,htm:e.XHR_RESPONSE_TYPE.DOCUMENT,xml:e.XHR_RESPONSE_TYPE.DOCUMENT,tmx:e.XHR_RESPONSE_TYPE.DOCUMENT,svg:e.XHR_RESPONSE_TYPE.DOCUMENT,tsx:e.XHR_RESPONSE_TYPE.DOCUMENT,gif:e.XHR_RESPONSE_TYPE.BLOB,png:e.XHR_RESPONSE_TYPE.BLOB,bmp:e.XHR_RESPONSE_TYPE.BLOB,jpg:e.XHR_RESPONSE_TYPE.BLOB,jpeg:e.XHR_RESPONSE_TYPE.BLOB,tif:e.XHR_RESPONSE_TYPE.BLOB,tiff:e.XHR_RESPONSE_TYPE.BLOB,webp:e.XHR_RESPONSE_TYPE.BLOB,tga:e.XHR_RESPONSE_TYPE.BLOB,avif:e.XHR_RESPONSE_TYPE.BLOB,json:e.XHR_RESPONSE_TYPE.JSON,text:e.XHR_RESPONSE_TYPE.TEXT,txt:e.XHR_RESPONSE_TYPE.TEXT,ttf:e.XHR_RESPONSE_TYPE.BUFFER,otf:e.XHR_RESPONSE_TYPE.BUFFER},e.EMPTY_GIF="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="})(gt||(gt={}));function xo(){}function ioe(e){return function(){for(var r=arguments,n=[],i=0;i>2,i[1]=(n[0]&3)<<4|n[1]>>4,i[2]=(n[1]&15)<<2|n[2]>>6,i[3]=n[2]&63;var a=r-(e.length-1);switch(a){case 2:i[3]=64,i[2]=64;break;case 1:i[3]=64;break}for(var o=0;o0&&o[o.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]=33776&&r<=33779)return"s3tc";if(r>=37488&&r<=37497)return"etc";if(r>=35840&&r<=35843)return"pvrtc";if(r>=36196)return"etc1";if(r>=35986&&r<=34798)return"atc";throw new Error("Invalid (compressed) texture format given!")},t._createLevelBuffers=function(r,n,i,o,a,s,u){for(var l=new Array(i),c=r.byteOffset,f=s,h=u,d=f+o-1&~(o-1),v=h+a-1&~(a-1),g=d*v*Fl[n],p=0;p1?f:d,levelHeight:i>1?h:v,levelBuffer:new Uint8Array(r.buffer,c,g)},c+=g,f=f>>1||1,h=h>>1||1,d=f+o-1&~(o-1),v=h+a-1&~(a-1),g=d*v*Fl[n];return l},t}(pk),vk=function(){function e(){}return e.use=function(t,r){var n=t.data,i=this;if(t.type===gt.TYPE.JSON&&n&&n.cacheID&&n.textures){for(var o=n.textures,a=void 0,s=void 0,u=0,l=o.length;u>>1,P=P>>>1}for(var U=w,F=0;F<_;F++)S.push(new Uint8Array(e,U,R)),U+=R}return S.map(function(z){return new Nh(z,{format:x,width:o,height:i,levels:a})})}throw u&_oe?new Error("DDSParser does not support uncompressed texture data."):u&xoe?new Error("DDSParser does not supported YUV uncompressed texture data."):u&boe?new Error("DDSParser does not support single-channel (lumninance) texture data!"):u&goe?new Error("DDSParser does not support single-channel (alpha) texture data!"):new Error("DDSParser failed to load a texture file due to an unknown reason!")}var Oi,ui,xu,_C=[171,75,84,88,32,49,49,187,13,10,26,10],Poe=67305985,vn={FILE_IDENTIFIER:0,ENDIANNESS:12,GL_TYPE:16,GL_TYPE_SIZE:20,GL_FORMAT:24,GL_INTERNAL_FORMAT:28,GL_BASE_INTERNAL_FORMAT:32,PIXEL_WIDTH:36,PIXEL_HEIGHT:40,PIXEL_DEPTH:44,NUMBER_OF_ARRAY_ELEMENTS:48,NUMBER_OF_FACES:52,NUMBER_OF_MIPMAP_LEVELS:56,BYTES_OF_KEY_VALUE_DATA:60},jy=64,$y=(Oi={},Oi[fe.UNSIGNED_BYTE]=1,Oi[fe.UNSIGNED_SHORT]=2,Oi[fe.INT]=4,Oi[fe.UNSIGNED_INT]=4,Oi[fe.FLOAT]=4,Oi[fe.HALF_FLOAT]=8,Oi),yk=(ui={},ui[J.RGBA]=4,ui[J.RGB]=3,ui[J.RG]=2,ui[J.RED]=1,ui[J.LUMINANCE]=1,ui[J.LUMINANCE_ALPHA]=2,ui[J.ALPHA]=1,ui),_k=(xu={},xu[fe.UNSIGNED_SHORT_4_4_4_4]=2,xu[fe.UNSIGNED_SHORT_5_5_5_1]=2,xu[fe.UNSIGNED_SHORT_5_6_5]=2,xu);function xk(e,t,r){r===void 0&&(r=!1);var n=new DataView(t);if(!Roe(e,n))return null;var i=n.getUint32(vn.ENDIANNESS,!0)===Poe,o=n.getUint32(vn.GL_TYPE,i),a=n.getUint32(vn.GL_FORMAT,i),s=n.getUint32(vn.GL_INTERNAL_FORMAT,i),u=n.getUint32(vn.PIXEL_WIDTH,i),l=n.getUint32(vn.PIXEL_HEIGHT,i)||1,c=n.getUint32(vn.PIXEL_DEPTH,i)||1,f=n.getUint32(vn.NUMBER_OF_ARRAY_ELEMENTS,i)||1,h=n.getUint32(vn.NUMBER_OF_FACES,i),d=n.getUint32(vn.NUMBER_OF_MIPMAP_LEVELS,i),v=n.getUint32(vn.BYTES_OF_KEY_VALUE_DATA,i);if(l===0||c!==1)throw new Error("Only 2D textures are supported");if(h!==1)throw new Error("CubeTextures are not supported by KTXLoader yet!");if(f!==1)throw new Error("WebGL does not support array textures");var g=4,p=4,m=u+3&-4,y=l+3&-4,_=new Array(f),x=u*l;o===0&&(x=m*y);var S;if(o!==0?$y[o]?S=$y[o]*yk[a]:S=_k[o]:S=Fl[s],S===void 0)throw new Error("Unable to resolve the pixel format stored in the *.ktx file!");for(var w=r?koe(n,v,i):null,E=x*S,R=E,A=u,P=l,F=m,B=y,$=jy+v,Y=0;Y1||o!==0?A:F,levelHeight:d>1||o!==0?P:B,levelBuffer:new Uint8Array(t,z,R)},z+=R}$+=U+4,$=$%4!==0?$+4-$%4:$,A=A>>1||1,P=P>>1||1,F=A+g-1&~(g-1),B=P+p-1&~(p-1),R=F*B*S}return o!==0?{uncompressed:_.map(function(de){var W=de[0].levelBuffer,L=!1;return o===fe.FLOAT?W=new Float32Array(de[0].levelBuffer.buffer,de[0].levelBuffer.byteOffset,de[0].levelBuffer.byteLength/4):o===fe.UNSIGNED_INT?(L=!0,W=new Uint32Array(de[0].levelBuffer.buffer,de[0].levelBuffer.byteOffset,de[0].levelBuffer.byteLength/4)):o===fe.INT&&(L=!0,W=new Int32Array(de[0].levelBuffer.buffer,de[0].levelBuffer.byteOffset,de[0].levelBuffer.byteLength/4)),{resource:new pa(W,{width:de[0].levelWidth,height:de[0].levelHeight}),type:o,format:L?Ioe(a):a}}),kvData:w}:{compressed:_.map(function(de){return new Nh(null,{format:s,width:u,height:l,levels:d,levelBuffers:de})}),kvData:w}}function Roe(e,t){for(var r=0;r<_C.length;r++)if(t.getUint8(r)!==_C[r])return console.error(e+" is not a valid *.ktx file!"),!1;return!0}function Ioe(e){switch(e){case J.RGBA:return J.RGBA_INTEGER;case J.RGB:return J.RGB_INTEGER;case J.RG:return J.RG_INTEGER;case J.RED:return J.RED_INTEGER;default:return e}}function koe(e,t,r){for(var n=new Map,i=0;it-i){console.error("KTXLoader: keyAndValueByteSize out of bounds");break}for(var u=0;us&&(i=s),a._properties=[!1,!0,!1,!1,!1],a._maxSize=r,a._batchSize=i,a._buffers=null,a._bufferUpdateIDs=[],a._updateID=0,a.interactiveChildren=!1,a.blendMode=ce.NORMAL,a.autoResize=o,a.roundPixels=!0,a.baseTexture=null,a.setProperties(n),a._tint=0,a.tintRgb=new Float32Array(4),a.tint=16777215,a}return t.prototype.setProperties=function(r){r&&(this._properties[0]="vertices"in r||"scale"in r?!!r.vertices||!!r.scale:this._properties[0],this._properties[1]="position"in r?!!r.position:this._properties[1],this._properties[2]="rotation"in r?!!r.rotation:this._properties[2],this._properties[3]="uvs"in r?!!r.uvs:this._properties[3],this._properties[4]="tint"in r||"alpha"in r?!!r.tint||!!r.alpha:this._properties[4])},t.prototype.updateTransform=function(){this.displayObjectUpdateTransform()},Object.defineProperty(t.prototype,"tint",{get:function(){return this._tint},set:function(r){this._tint=r,Xt(r,this.tintRgb)},enumerable:!1,configurable:!0}),t.prototype.render=function(r){var n=this;!this.visible||this.worldAlpha<=0||!this.children.length||!this.renderable||(this.baseTexture||(this.baseTexture=this.children[0]._texture.baseTexture,this.baseTexture.valid||this.baseTexture.once("update",function(){return n.onChildrenChange(0)})),r.batch.setObjectRenderer(r.plugins.particle),r.plugins.particle.render(this))},t.prototype.onChildrenChange=function(r){for(var n=Math.floor(r/this._batchSize);this._bufferUpdateIDs.lengthi&&!r.autoResize&&(s=i);var u=r._buffers;u||(u=r._buffers=this.generateBuffers(r));var l=n[0]._texture.baseTexture,c=l.alphaMode>0;this.state.blendMode=eb(r.blendMode,c),a.state.set(this.state);var f=a.gl,h=r.worldTransform.copyTo(this.tempMatrix);h.prepend(a.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=h.toArray(!0),this.shader.uniforms.uColor=gI(r.tintRgb,r.worldAlpha,this.shader.uniforms.uColor,c),this.shader.uniforms.uSampler=l,this.renderer.shader.bind(this.shader);for(var d=!1,v=0,g=0;vo&&(p=o),g>=u.length&&u.push(this._generateOneMoreBuffer(r));var m=u[g];m.uploadDynamic(n,v,p);var y=r._bufferUpdateIDs[g]||0;d=d||m._updateID0,f=l.alpha,h=f<1&&c?jd(l._tintRGB,f):l._tintRGB+(f*255<<24);o[s]=h,o[s+a]=h,o[s+a*2]=h,o[s+a*3]=h,s+=a*4}},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null},t.extension={name:"particle",type:Xe.RendererPlugin},t}(lc);/*! + * @pixi/graphics - v6.5.10 + * Compiled Thu, 06 Jul 2023 15:25:11 UTC + * + * @pixi/graphics is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */var Bn;(function(e){e.MITER="miter",e.BEVEL="bevel",e.ROUND="round"})(Bn||(Bn={}));var gi;(function(e){e.BUTT="butt",e.ROUND="round",e.SQUARE="square"})(gi||(gi={}));var ys={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount:function(e,t){if(t===void 0&&(t=20),!this.adaptive||!e||isNaN(e))return t;var r=Math.ceil(e/this.maxLength);return rthis.maxSegments&&(r=this.maxSegments),r}},Nb=function(){function e(){this.color=16777215,this.alpha=1,this.texture=ve.WHITE,this.matrix=null,this.visible=!1,this.reset()}return e.prototype.clone=function(){var t=new e;return t.color=this.color,t.alpha=this.alpha,t.texture=this.texture,t.matrix=this.matrix,t.visible=this.visible,t},e.prototype.reset=function(){this.color=16777215,this.alpha=1,this.texture=ve.WHITE,this.matrix=null,this.visible=!1},e.prototype.destroy=function(){this.texture=null,this.matrix=null},e}();/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var Gy=function(e,t){return Gy=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},Gy(e,t)};function Lb(e,t){Gy(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function bC(e,t){var r,n;t===void 0&&(t=!1);var i=e.length;if(!(i<6)){for(var o=0,a=0,s=e[i-2],u=e[i-1];a0||t&&o<=0)for(var f=i/2,a=f+f%2;a=6){bC(r,!1);for(var a=[],s=0;s=0&&s>=0&&i>=0&&o>=0)){t.length=0;return}var d=Math.ceil(2.3*Math.sqrt(a+s)),v=d*8+(i?4:0)+(o?4:0);if(t.length=v,v!==0){if(d===0){t.length=8,t[0]=t[6]=r+i,t[1]=t[3]=n+o,t[2]=t[4]=r-i,t[5]=t[7]=n-o;return}var g=0,p=d*4+(i?2:0)+2,m=p,y=v;{var _=i+a,x=o,S=r+_,w=r-_,E=n+x;if(t[g++]=S,t[g++]=E,t[--p]=E,t[--p]=w,o){var R=n-x;t[m++]=w,t[m++]=R,t[--y]=R,t[--y]=S}}for(var A=1;Af&&(f+=Math.PI*2);var h=c,d=f-c,v=Math.abs(d),g=Math.sqrt(u*u+l*l),p=(15*v*Math.sqrt(g)/Math.PI>>0)+1,m=d/p;if(h+=m,s){a.push(e,t),a.push(r,n);for(var y=1,_=h;y=0&&(o.join===Bn.ROUND?v+=bo(S,w,S-A*U,w-P*U,S-F*U,w-B*U,h,!1)+4:v+=2,h.push(S-F*z,w-B*z),h.push(S+F*U,w+B*U));continue}var ye=(-A+_)*(-P+w)-(-A+S)*(-P+x),Se=(-F+E)*(-B+w)-(-F+S)*(-B+R),we=(be*Se-W*ye)/re,Ue=(L*ye-de*Se)/re,He=(we-S)*(we-S)+(Ue-w)*(Ue-w),Qe=S+(we-S)*U,Ae=w+(Ue-w)*U,De=S-(we-S)*z,Ve=w-(Ue-w)*z,Ee=Math.min(be*be+de*de,W*W+L*L),ct=ue?U:z,ir=Ee+ct*ct*m,Me=He<=ir;Me?o.join===Bn.BEVEL||He/m>y?(ue?(h.push(Qe,Ae),h.push(S+A*z,w+P*z),h.push(Qe,Ae),h.push(S+F*z,w+B*z)):(h.push(S-A*U,w-P*U),h.push(De,Ve),h.push(S-F*U,w-B*U),h.push(De,Ve)),v+=2):o.join===Bn.ROUND?ue?(h.push(Qe,Ae),h.push(S+A*z,w+P*z),v+=bo(S,w,S+A*z,w+P*z,S+F*z,w+B*z,h,!0)+4,h.push(Qe,Ae),h.push(S+F*z,w+B*z)):(h.push(S-A*U,w-P*U),h.push(De,Ve),v+=bo(S,w,S-A*U,w-P*U,S-F*U,w-B*U,h,!1)+4,h.push(S-F*U,w-B*U),h.push(De,Ve)):(h.push(Qe,Ae),h.push(De,Ve)):(h.push(S-A*U,w-P*U),h.push(S+A*z,w+P*z),o.join===Bn.ROUND?ue?v+=bo(S,w,S+A*z,w+P*z,S+F*z,w+B*z,h,!0)+2:v+=bo(S,w,S-A*U,w-P*U,S-F*U,w-B*U,h,!1)+2:o.join===Bn.MITER&&He/m<=y&&(ue?(h.push(De,Ve),h.push(De,Ve)):(h.push(Qe,Ae),h.push(Qe,Ae)),v+=2),h.push(S-F*U,w-B*U),h.push(S+F*z,w+B*z),v+=2)}_=n[(d-2)*2],x=n[(d-2)*2+1],S=n[(d-1)*2],w=n[(d-1)*2+1],A=-(x-w),P=_-S,$=Math.sqrt(A*A+P*P),A/=$,P/=$,A*=p,P*=p,h.push(S-A*U,w-P*U),h.push(S+A*z,w+P*z),u||(o.cap===gi.ROUND?v+=bo(S-A*(U-z)*.5,w-P*(U-z)*.5,S-A*U,w-P*U,S+A*z,w+P*z,h,!1)+2:o.cap===gi.SQUARE&&(v+=SC(S,w,A,P,U,z,!1,h)));for(var mr=t.indices,Rn=ys.epsilon*ys.epsilon,ie=g;ieh*l}},e.arc=function(t,r,n,i,o,a,s,u,l){for(var c=s-a,f=ys._segmentsCount(Math.abs(c)*o,Math.ceil(Math.abs(c)/Nl)*40),h=c/(f*2),d=h*2,v=Math.cos(h),g=Math.sin(h),p=f-1,m=p%1/p,y=0;y<=p;++y){var _=y+m*y,x=h+a+d*_,S=Math.cos(x),w=-Math.sin(x);l.push((v*S+g*w)*o+n,(v*-w+g*S)*o+i)}},e}(),Ok=function(){function e(){}return e.curveLength=function(t,r,n,i,o,a,s,u){for(var l=10,c=0,f=0,h=0,d=0,v=0,g=0,p=0,m=0,y=0,_=0,x=0,S=t,w=r,E=1;E<=l;++E)f=E/l,h=f*f,d=h*f,v=1-f,g=v*v,p=g*v,m=p*t+3*g*f*n+3*v*h*o+d*s,y=p*r+3*g*f*i+3*v*h*a+d*u,_=S-m,x=w-y,S=m,w=y,c+=Math.sqrt(_*_+x*x);return c},e.curveTo=function(t,r,n,i,o,a,s){var u=s[s.length-2],l=s[s.length-1];s.length-=2;var c=ys._segmentsCount(e.curveLength(u,l,t,r,n,i,o,a)),f=0,h=0,d=0,v=0,g=0;s.push(u,l);for(var p=1,m=0;p<=c;++p)m=p/c,f=1-m,h=f*f,d=h*f,v=m*m,g=v*m,s.push(d*u+3*h*m*t+3*f*v*n+g*o,d*l+3*h*m*r+3*f*v*i+g*a)},e}(),Ak=function(){function e(){}return e.curveLength=function(t,r,n,i,o,a){var s=t-2*n+o,u=r-2*i+a,l=2*n-2*t,c=2*i-2*r,f=4*(s*s+u*u),h=4*(s*l+u*c),d=l*l+c*c,v=2*Math.sqrt(f+h+d),g=Math.sqrt(f),p=2*f*g,m=2*Math.sqrt(d),y=h/g;return(p*v+g*h*(v-m)+(4*d*f-h*h)*Math.log((2*g+y+v)/(y+m)))/(4*p)},e.curveTo=function(t,r,n,i,o){for(var a=o[o.length-2],s=o[o.length-1],u=ys._segmentsCount(e.curveLength(a,s,t,r,n,i)),l=0,c=0,f=1;f<=u;++f){var h=f/u;l=a+(t-a)*h,c=s+(r-s)*h,o.push(l+(t+(n-t)*h-l)*h,c+(r+(i-r)*h-c)*h)}},e}(),Pk=function(){function e(){this.reset()}return e.prototype.begin=function(t,r,n){this.reset(),this.style=t,this.start=r,this.attribStart=n},e.prototype.end=function(t,r){this.attribSize=r-this.attribStart,this.size=t-this.start},e.prototype.reset=function(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0},e}(),So,Nf=(So={},So[Dt.POLY]=Mb,So[Dt.CIRC]=Dl,So[Dt.ELIP]=Dl,So[Dt.RECT]=Tk,So[Dt.RREC]=Ck,So),Vy=[],Lu=[],Wy=function(){function e(t,r,n,i){r===void 0&&(r=null),n===void 0&&(n=null),i===void 0&&(i=null),this.points=[],this.holes=[],this.shape=t,this.lineStyle=n,this.fillStyle=r,this.matrix=i,this.type=t.type}return e.prototype.clone=function(){return new e(this.shape,this.fillStyle,this.lineStyle,this.matrix)},e.prototype.destroy=function(){this.shape=null,this.holes.length=0,this.holes=null,this.points.length=0,this.points=null,this.lineStyle=null,this.fillStyle=null},e}(),Ta=new Oe,Rk=function(e){Lb(t,e);function t(){var r=e.call(this)||this;return r.closePointEps=1e-4,r.boundsPadding=0,r.uvsFloat32=null,r.indicesUint16=null,r.batchable=!1,r.points=[],r.colors=[],r.uvs=[],r.indices=[],r.textureIds=[],r.graphicsData=[],r.drawCalls=[],r.batchDirty=-1,r.batches=[],r.dirty=0,r.cacheDirty=-1,r.clearDirty=0,r.shapeIndex=0,r._bounds=new Ll,r.boundsDirty=-1,r}return Object.defineProperty(t.prototype,"bounds",{get:function(){return this.updateBatches(),this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.calculateBounds()),this._bounds},enumerable:!1,configurable:!0}),t.prototype.invalidate=function(){this.boundsDirty=-1,this.dirty++,this.batchDirty++,this.shapeIndex=0,this.points.length=0,this.colors.length=0,this.uvs.length=0,this.indices.length=0,this.textureIds.length=0;for(var r=0;r0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this},t.prototype.drawShape=function(r,n,i,o){n===void 0&&(n=null),i===void 0&&(i=null),o===void 0&&(o=null);var a=new Wy(r,n,i,o);return this.graphicsData.push(a),this.dirty++,this},t.prototype.drawHole=function(r,n){if(n===void 0&&(n=null),!this.graphicsData.length)return null;var i=new Wy(r,null,null,n),o=this.graphicsData[this.graphicsData.length-1];return i.lineStyle=o.lineStyle,o.holes.push(i),this.dirty++,this},t.prototype.destroy=function(){e.prototype.destroy.call(this);for(var r=0;r0&&(i=this.batches[this.batches.length-1],o=i.style);for(var a=this.shapeIndex;a65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&_===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=_?new Uint32Array(this.indices):new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}},t.prototype._compareStyles=function(r,n){return!(!r||!n||r.texture.baseTexture!==n.texture.baseTexture||r.color+r.alpha!==n.color+n.alpha||!!r.native!=!!n.native)},t.prototype.validateBatching=function(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(var r=0,n=this.graphicsData.length;r65535*2)return!1;for(var r=this.batches,n=0;n0&&(a=Lu.pop(),a||(a=new Rh,a.texArray=new Ih),this.drawCalls.push(a)),a.start=h,a.size=0,a.texArray.count=0,a.type=f),p.touched=1,p._batchEnabled=r,p._batchLocation=s,p.wrapMode=bn.REPEAT,a.texArray.elements[a.texArray.count++]=p,s++)),a.size+=d.size,h+=d.size,l=p._batchLocation,this.addColors(i,g.color,g.alpha,d.attribSize,d.attribStart),this.addTextureIds(o,l,d.attribSize,d.attribStart)}Ne._globalBatch=r,this.packAttributes()},t.prototype.packAttributes=function(){for(var r=this.points,n=this.uvs,i=this.colors,o=this.textureIds,a=new ArrayBuffer(r.length*3*4),s=new Float32Array(a),u=new Uint32Array(a),l=0,c=0;c>16)+(n&65280)+((n&255)<<16),u=jd(s,i);r.length=Math.max(r.length,a+o);for(var l=0;l0&&r.alpha>0;return n?(r.matrix&&(r.matrix=r.matrix.clone(),r.matrix.invert()),Object.assign(this._lineStyle,{visible:n},r)):this._lineStyle.reset(),this},t.prototype.startPoly=function(){if(this.currentPath){var r=this.currentPath.points,n=this.currentPath.points.length;n>2&&(this.drawShape(this.currentPath),this.currentPath=new tl,this.currentPath.closeStroke=!1,this.currentPath.points.push(r[n-2],r[n-1]))}else this.currentPath=new tl,this.currentPath.closeStroke=!1},t.prototype.finishPoly=function(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)},t.prototype.moveTo=function(r,n){return this.startPoly(),this.currentPath.points[0]=r,this.currentPath.points[1]=n,this},t.prototype.lineTo=function(r,n){this.currentPath||this.moveTo(0,0);var i=this.currentPath.points,o=i[i.length-2],a=i[i.length-1];return(o!==r||a!==n)&&i.push(r,n),this},t.prototype._initCurve=function(r,n){r===void 0&&(r=0),n===void 0&&(n=0),this.currentPath?this.currentPath.points.length===0&&(this.currentPath.points=[r,n]):this.moveTo(r,n)},t.prototype.quadraticCurveTo=function(r,n,i,o){this._initCurve();var a=this.currentPath.points;return a.length===0&&this.moveTo(0,0),Ak.curveTo(r,n,i,o,a),this},t.prototype.bezierCurveTo=function(r,n,i,o,a,s){return this._initCurve(),Ok.curveTo(r,n,i,o,a,s,this.currentPath.points),this},t.prototype.arcTo=function(r,n,i,o,a){this._initCurve(r,n);var s=this.currentPath.points,u=Hy.curveTo(r,n,i,o,a,s);if(u){var l=u.cx,c=u.cy,f=u.radius,h=u.startAngle,d=u.endAngle,v=u.anticlockwise;this.arc(l,c,f,h,d,v)}return this},t.prototype.arc=function(r,n,i,o,a,s){if(s===void 0&&(s=!1),o===a)return this;!s&&a<=o?a+=Nl:s&&o<=a&&(o+=Nl);var u=a-o;if(u===0)return this;var l=r+Math.cos(o)*i,c=n+Math.sin(o)*i,f=this._geometry.closePointEps,h=this.currentPath?this.currentPath.points:null;if(h){var d=Math.abs(h[h.length-2]-l),v=Math.abs(h[h.length-1]-c);d0;return n?(r.matrix&&(r.matrix=r.matrix.clone(),r.matrix.invert()),Object.assign(this._fillStyle,{visible:n},r)):this._fillStyle.reset(),this},t.prototype.endFill=function(){return this.finishPoly(),this._fillStyle.reset(),this},t.prototype.drawRect=function(r,n,i,o){return this.drawShape(new Le(r,n,i,o))},t.prototype.drawRoundedRect=function(r,n,i,o,a){return this.drawShape(new CI(r,n,i,o,a))},t.prototype.drawCircle=function(r,n,i){return this.drawShape(new EI(r,n,i))},t.prototype.drawEllipse=function(r,n,i,o){return this.drawShape(new TI(r,n,i,o))},t.prototype.drawPolygon=function(){for(var r=arguments,n=[],i=0;i>16&255)/255*a,s.tint[1]=(o>>8&255)/255*a,s.tint[2]=(o&255)/255*a,s.tint[3]=a,r.shader.bind(n),r.geometry.bind(i,n),r.state.set(this.state);for(var l=0,c=u.length;l>16)+(l&65280)+((l&255)<<16)}}},t.prototype.calculateVertices=function(){var r=this.transform._worldID;if(this._transformID!==r){this._transformID=r;for(var n=this.transform.worldTransform,i=n.a,o=n.b,a=n.c,s=n.d,u=n.tx,l=n.ty,c=this._geometry.points,f=this.vertexData,h=0,d=0;d=o&&bu.x=a&&bu.y>16)+(r&65280)+((r&255)<<16)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"texture",{get:function(){return this._texture},set:function(r){this._texture!==r&&(this._texture&&this._texture.off("update",this._onTextureUpdate,this),this._texture=r||ve.EMPTY,this._cachedTint=16777215,this._textureID=-1,this._textureTrimmedID=-1,r&&(r.baseTexture.valid?this._onTextureUpdate():r.once("update",this._onTextureUpdate,this)))},enumerable:!1,configurable:!0}),t}(br);/*! + * @pixi/text - v6.5.10 + * Compiled Thu, 06 Jul 2023 15:25:11 UTC + * + * @pixi/text is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + *//*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var Xy=function(e,t){return Xy=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},Xy(e,t)};function Goe(e,t){Xy(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var _s;(function(e){e[e.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",e[e.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL"})(_s||(_s={}));var Im={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:_s.LINEAR_VERTICAL,fillGradientStops:[],fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100,leading:0},zoe=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],ra=function(){function e(t){this.styleID=0,this.reset(),Nm(this,t,t)}return e.prototype.clone=function(){var t={};return Nm(t,this,Im),new e(t)},e.prototype.reset=function(){Nm(this,Im,Im)},Object.defineProperty(e.prototype,"align",{get:function(){return this._align},set:function(t){this._align!==t&&(this._align=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"breakWords",{get:function(){return this._breakWords},set:function(t){this._breakWords!==t&&(this._breakWords=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dropShadow",{get:function(){return this._dropShadow},set:function(t){this._dropShadow!==t&&(this._dropShadow=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dropShadowAlpha",{get:function(){return this._dropShadowAlpha},set:function(t){this._dropShadowAlpha!==t&&(this._dropShadowAlpha=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dropShadowAngle",{get:function(){return this._dropShadowAngle},set:function(t){this._dropShadowAngle!==t&&(this._dropShadowAngle=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dropShadowBlur",{get:function(){return this._dropShadowBlur},set:function(t){this._dropShadowBlur!==t&&(this._dropShadowBlur=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dropShadowColor",{get:function(){return this._dropShadowColor},set:function(t){var r=km(t);this._dropShadowColor!==r&&(this._dropShadowColor=r,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dropShadowDistance",{get:function(){return this._dropShadowDistance},set:function(t){this._dropShadowDistance!==t&&(this._dropShadowDistance=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fill",{get:function(){return this._fill},set:function(t){var r=km(t);this._fill!==r&&(this._fill=r,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fillGradientType",{get:function(){return this._fillGradientType},set:function(t){this._fillGradientType!==t&&(this._fillGradientType=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fillGradientStops",{get:function(){return this._fillGradientStops},set:function(t){Hoe(this._fillGradientStops,t)||(this._fillGradientStops=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fontFamily",{get:function(){return this._fontFamily},set:function(t){this.fontFamily!==t&&(this._fontFamily=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fontSize",{get:function(){return this._fontSize},set:function(t){this._fontSize!==t&&(this._fontSize=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fontStyle",{get:function(){return this._fontStyle},set:function(t){this._fontStyle!==t&&(this._fontStyle=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fontVariant",{get:function(){return this._fontVariant},set:function(t){this._fontVariant!==t&&(this._fontVariant=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fontWeight",{get:function(){return this._fontWeight},set:function(t){this._fontWeight!==t&&(this._fontWeight=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"letterSpacing",{get:function(){return this._letterSpacing},set:function(t){this._letterSpacing!==t&&(this._letterSpacing=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lineHeight",{get:function(){return this._lineHeight},set:function(t){this._lineHeight!==t&&(this._lineHeight=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leading",{get:function(){return this._leading},set:function(t){this._leading!==t&&(this._leading=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lineJoin",{get:function(){return this._lineJoin},set:function(t){this._lineJoin!==t&&(this._lineJoin=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"miterLimit",{get:function(){return this._miterLimit},set:function(t){this._miterLimit!==t&&(this._miterLimit=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"padding",{get:function(){return this._padding},set:function(t){this._padding!==t&&(this._padding=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"stroke",{get:function(){return this._stroke},set:function(t){var r=km(t);this._stroke!==r&&(this._stroke=r,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"strokeThickness",{get:function(){return this._strokeThickness},set:function(t){this._strokeThickness!==t&&(this._strokeThickness=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textBaseline",{get:function(){return this._textBaseline},set:function(t){this._textBaseline!==t&&(this._textBaseline=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"trim",{get:function(){return this._trim},set:function(t){this._trim!==t&&(this._trim=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"whiteSpace",{get:function(){return this._whiteSpace},set:function(t){this._whiteSpace!==t&&(this._whiteSpace=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"wordWrap",{get:function(){return this._wordWrap},set:function(t){this._wordWrap!==t&&(this._wordWrap=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"wordWrapWidth",{get:function(){return this._wordWrapWidth},set:function(t){this._wordWrapWidth!==t&&(this._wordWrapWidth=t,this.styleID++)},enumerable:!1,configurable:!0}),e.prototype.toFontString=function(){var t=typeof this.fontSize=="number"?this.fontSize+"px":this.fontSize,r=this.fontFamily;Array.isArray(this.fontFamily)||(r=this.fontFamily.split(","));for(var n=r.length-1;n>=0;n--){var i=r[n].trim();!/([\"\'])[^\'\"]+\1/.test(i)&&zoe.indexOf(i)<0&&(i='"'+i+'"'),r[n]=i}return this.fontStyle+" "+this.fontVariant+" "+this.fontWeight+" "+t+" "+r.join(",")},e}();function wC(e){return typeof e=="number"?Zx(e):(typeof e=="string"&&e.indexOf("0x")===0&&(e=e.replace("0x","#")),e)}function km(e){if(Array.isArray(e)){for(var t=0;tv)if(a!==""&&(s+=e.addLine(a),a="",o=0),e.canBreakWords(m,r.breakWords))for(var S=e.wordWrapSplit(m),w=0;wv&&(s+=e.addLine(a),d=!1,a="",o=0),a+=E,o+=F}else{a.length>0&&(s+=e.addLine(a),a="",o=0);var B=p===g.length-1;s+=e.addLine(m,!B),d=!1,a="",o=0}else x+o>v&&(d=!1,s+=e.addLine(a),a="",o=0),(a.length>0||!e.isBreakingSpace(m)||d)&&(a+=m,o+=x)}return s+=e.addLine(a,!1),s},e.addLine=function(t,r){return r===void 0&&(r=!0),t=e.trimRight(t),t=r?t+` +`:t,t},e.getFromCache=function(t,r,n,i){var o=n[t];if(typeof o!="number"){var a=t.length*r;o=i.measureText(t).width+a,n[t]=o}return o},e.collapseSpaces=function(t){return t==="normal"||t==="pre-line"},e.collapseNewlines=function(t){return t==="normal"},e.trimRight=function(t){if(typeof t!="string")return"";for(var r=t.length-1;r>=0;r--){var n=t[r];if(!e.isBreakingSpace(n))break;t=t.slice(0,-1)}return t},e.isNewline=function(t){return typeof t!="string"?!1:e._newlines.indexOf(t.charCodeAt(0))>=0},e.isBreakingSpace=function(t,r){return typeof t!="string"?!1:e._breakingSpaces.indexOf(t.charCodeAt(0))>=0},e.tokenize=function(t){var r=[],n="";if(typeof t!="string")return r;for(var i=0;is;--h){for(var g=0;g0&&p>m&&(y=(m+p)/2);var _=m+g,x=i.lineHeight*(v+1),S=_;v+10},e}();function qoe(e,t){var r=!1;if(e&&e._textures&&e._textures.length){for(var n=0;n=0;r--)this.add(t.children[r]);return this},e.prototype.destroy=function(){this.ticking&&Vt.system.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null},e}();function Lk(e,t){return t instanceof Ne?(t._glTextures[e.CONTEXT_UID]||e.texture.bind(t),!0):!1}function eae(e,t){if(!(t instanceof Bl))return!1;var r=t.geometry;t.finishPoly(),r.updateBatches();for(var n=r.batches,i=0;i=o&&Su.x=a&&Su.y1?xi.from(aae,sae,n):xi.from(EC,oae,n)},t.prototype.render=function(r){var n=this.renderer,i=this.quad,o=i.vertices;o[0]=o[6]=r._width*-r.anchor.x,o[1]=o[3]=r._height*-r.anchor.y,o[2]=o[4]=r._width*(1-r.anchor.x),o[5]=o[7]=r._height*(1-r.anchor.y);var a=r.uvRespectAnchor?r.anchor.x:0,s=r.uvRespectAnchor?r.anchor.y:0;o=i.uvs,o[0]=o[6]=-a,o[1]=o[3]=-s,o[2]=o[4]=1-a,o[5]=o[7]=1-s,i.invalidate();var u=r._texture,l=u.baseTexture,c=l.alphaMode>0,f=r.tileTransform.localTransform,h=r.uvMatrix,d=l.isPowerOfTwo&&u.frame.width===l.width&&u.frame.height===l.height;d&&(l._glTextures[n.CONTEXT_UID]?d=l.wrapMode!==bn.CLAMP:l.wrapMode===bn.CLAMP&&(l.wrapMode=bn.REPEAT));var v=d?this.simpleShader:this.shader,g=u.width,p=u.height,m=r._width,y=r._height;nf.set(f.a*g/m,f.b*g/y,f.c*p/m,f.d*p/y,f.tx/m,f.ty/y),nf.invert(),d?nf.prepend(h.mapCoord):(v.uniforms.uMapCoord=h.mapCoord.toArray(!0),v.uniforms.uClampFrame=h.uClampFrame,v.uniforms.uClampOffset=h.uClampOffset),v.uniforms.uTransform=nf.toArray(!0),v.uniforms.uColor=tb(r.tint,r.worldAlpha,v.uniforms.uColor,c),v.uniforms.translationMatrix=r.transform.worldTransform.toArray(!0),v.uniforms.uSampler=u,n.shader.bind(v),n.geometry.bind(i),this.state.blendMode=eb(r.blendMode,c),n.state.set(this.state),n.geometry.draw(this.renderer.gl.TRIANGLES,6,0)},t.extension={name:"tilingSprite",type:Xe.RendererPlugin},t}(lc);/*! + * @pixi/mesh - v6.5.10 + * Compiled Thu, 06 Jul 2023 15:25:11 UTC + * + * @pixi/mesh is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + *//*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var Zy=function(e,t){return Zy=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},Zy(e,t)};function Db(e,t){Zy(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var $k=function(){function e(t,r){this.uvBuffer=t,this.uvMatrix=r,this.data=null,this._bufferUpdateId=-1,this._textureUpdateId=-1,this._updateID=0}return e.prototype.update=function(t){if(!(!t&&this._bufferUpdateId===this.uvBuffer._updateID&&this._textureUpdateId===this.uvMatrix._updateID)){this._bufferUpdateId=this.uvBuffer._updateID,this._textureUpdateId=this.uvMatrix._updateID;var r=this.uvBuffer.data;(!this.data||this.data.length!==r.length)&&(this.data=new Float32Array(r.length)),this.uvMatrix.multiplyUvs(r,this.data),this._updateID++}},e}(),Lm=new Oe,TC=new tl,xs=function(e){Db(t,e);function t(r,n,i,o){o===void 0&&(o=tn.TRIANGLES);var a=e.call(this)||this;return a.geometry=r,a.shader=n,a.state=i||yo.for2d(),a.drawMode=o,a.start=0,a.size=0,a.uvs=null,a.indices=null,a.vertexData=new Float32Array(1),a.vertexDirty=-1,a._transformID=-1,a._roundPixels=ne.ROUND_PIXELS,a.batchUvs=null,a}return Object.defineProperty(t.prototype,"geometry",{get:function(){return this._geometry},set:function(r){this._geometry!==r&&(this._geometry&&(this._geometry.refCount--,this._geometry.refCount===0&&this._geometry.dispose()),this._geometry=r,this._geometry&&this._geometry.refCount++,this.vertexDirty=-1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"uvBuffer",{get:function(){return this.geometry.buffers[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"verticesBuffer",{get:function(){return this.geometry.buffers[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"material",{get:function(){return this.shader},set:function(r){this.shader=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"blendMode",{get:function(){return this.state.blendMode},set:function(r){this.state.blendMode=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"roundPixels",{get:function(){return this._roundPixels},set:function(r){this._roundPixels!==r&&(this._transformID=-1),this._roundPixels=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tint",{get:function(){return"tint"in this.shader?this.shader.tint:null},set:function(r){this.shader.tint=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"texture",{get:function(){return"texture"in this.shader?this.shader.texture:null},set:function(r){this.shader.texture=r},enumerable:!1,configurable:!0}),t.prototype._render=function(r){var n=this.geometry.buffers[0].data,i=this.shader;i.batchable&&this.drawMode===tn.TRIANGLES&&n.length>16)+(r&65280)+((r&255)<<16),this._colorDirty=!0)},enumerable:!1,configurable:!0}),t.prototype.update=function(){if(this._colorDirty){this._colorDirty=!1;var r=this.texture.baseTexture;tb(this._tint,this._alpha,this.uniforms.uColor,r.alphaMode)}this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)},t}(xi),cc=function(e){Db(t,e);function t(r,n,i){var o=e.call(this)||this,a=new Rt(r),s=new Rt(n,!0),u=new Rt(i,!0,!0);return o.addAttribute("aVertexPosition",a,2,!1,fe.FLOAT).addAttribute("aTextureCoord",s,2,!1,fe.FLOAT).addIndex(u),o._updateId=-1,o}return Object.defineProperty(t.prototype,"vertexDirtyId",{get:function(){return this.buffers[0]._updateID},enumerable:!1,configurable:!0}),t}(zs);/*! + * @pixi/text-bitmap - v6.5.10 + * Compiled Thu, 06 Jul 2023 15:25:11 UTC + * + * @pixi/text-bitmap is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + *//*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var Qy=function(e,t){return Qy=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},Qy(e,t)};function cae(e,t){Qy(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var jl=function(){function e(){this.info=[],this.common=[],this.page=[],this.char=[],this.kerning=[],this.distanceField=[]}return e}(),Uk=function(){function e(){}return e.test=function(t){return typeof t=="string"&&t.indexOf("info face=")===0},e.parse=function(t){var r=t.match(/^[a-z]+\s+.+$/gm),n={info:[],common:[],page:[],char:[],chars:[],kerning:[],kernings:[],distanceField:[]};for(var i in r){var o=r[i].match(/^[a-z]+/gm)[0],a=r[i].match(/[a-zA-Z]+=([^\s"']+|"([^"]*)")/gm),s={};for(var u in a){var l=a[u].split("="),c=l[0],f=l[1].replace(/"/gm,""),h=parseFloat(f),d=isNaN(h)?f:h;s[c]=d}n[o].push(s)}var v=new jl;return n.info.forEach(function(g){return v.info.push({face:g.face,size:parseInt(g.size,10)})}),n.common.forEach(function(g){return v.common.push({lineHeight:parseInt(g.lineHeight,10)})}),n.page.forEach(function(g){return v.page.push({id:parseInt(g.id,10),file:g.file})}),n.char.forEach(function(g){return v.char.push({id:parseInt(g.id,10),page:parseInt(g.page,10),x:parseInt(g.x,10),y:parseInt(g.y,10),width:parseInt(g.width,10),height:parseInt(g.height,10),xoffset:parseInt(g.xoffset,10),yoffset:parseInt(g.yoffset,10),xadvance:parseInt(g.xadvance,10)})}),n.kerning.forEach(function(g){return v.kerning.push({first:parseInt(g.first,10),second:parseInt(g.second,10),amount:parseInt(g.amount,10)})}),n.distanceField.forEach(function(g){return v.distanceField.push({distanceRange:parseInt(g.distanceRange,10),fieldType:g.fieldType})}),v},e}(),Lh=function(){function e(){}return e.test=function(t){return t instanceof XMLDocument&&t.getElementsByTagName("page").length&&t.getElementsByTagName("info")[0].getAttribute("face")!==null},e.parse=function(t){for(var r=new jl,n=t.getElementsByTagName("info"),i=t.getElementsByTagName("common"),o=t.getElementsByTagName("page"),a=t.getElementsByTagName("char"),s=t.getElementsByTagName("kerning"),u=t.getElementsByTagName("distanceField"),l=0;l")>-1){var r=new globalThis.DOMParser().parseFromString(t,"text/xml");return Lh.test(r)}return!1},e.parse=function(t){var r=new globalThis.DOMParser().parseFromString(t,"text/xml");return Lh.parse(r)},e}(),Mm=[Uk,Lh,Gk];function Bb(e){for(var t=0;t=l-A*s){if(g===0)throw new Error("[BitmapFont] textureHeight "+l+"px is too small "+("(fontFamily: '"+f.fontFamily+"', fontSize: "+f.fontSize+"px, char: '"+w+"')"));--S,p=null,m=null,y=null,g=0,v=0,_=0;continue}if(_=Math.max(A+E.fontProperties.descent,_),P*s+v>=h){if(v===0)throw new Error("[BitmapFont] textureWidth "+u+"px is too small "+("(fontFamily: '"+f.fontFamily+"', fontSize: "+f.fontSize+"px, char: '"+w+"')"));--S,g+=_*s,g=Math.ceil(g),v=0,_=0;continue}hae(p,m,E,v,g,s,f);var F=Lf(E.text);d.char.push({id:F,page:x.length-1,x:v/s,y:g/s,width:P,height:A,xoffset:0,yoffset:0,xadvance:Math.ceil(R-(f.dropShadow?f.dropShadowDistance:0)-(f.stroke?f.strokeThickness:0))}),v+=(P+2*a)*s,v=Math.ceil(v)}if(!(n!=null&&n.skipKerning))for(var S=0,B=c.length;S 0.99) {\r + alpha = 1.0;\r + }\r +\r + // NPM Textures, NPM outputs\r + gl_FragColor = vec4(uColor.rgb, uColor.a * alpha);\r +\r +}\r +`,vae=`// Mesh material default fragment\r +attribute vec2 aVertexPosition;\r +attribute vec2 aTextureCoord;\r +\r +uniform mat3 projectionMatrix;\r +uniform mat3 translationMatrix;\r +uniform mat3 uTextureMatrix;\r +\r +varying vec2 vTextureCoord;\r +\r +void main(void)\r +{\r + gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\r +\r + vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;\r +}\r +`,CC=[],OC=[],AC=[],mae=function(e){cae(t,e);function t(r,n){n===void 0&&(n={});var i=e.call(this)||this;i._tint=16777215;var o=Object.assign({},t.styleDefaults,n),a=o.align,s=o.tint,u=o.maxWidth,l=o.letterSpacing,c=o.fontName,f=o.fontSize;if(!fi.available[c])throw new Error('Missing BitmapFont "'+c+'"');return i._activePagesMeshData=[],i._textWidth=0,i._textHeight=0,i._align=a,i._tint=s,i._font=void 0,i._fontName=c,i._fontSize=f,i.text=r,i._maxWidth=u,i._maxLineHeight=0,i._letterSpacing=l,i._anchor=new Ui(function(){i.dirty=!0},i,0,0),i._roundPixels=ne.ROUND_PIXELS,i.dirty=!0,i._resolution=ne.RESOLUTION,i._autoResolution=!0,i._textureCache={},i}return t.prototype.updateText=function(){for(var r,n=fi.available[this._fontName],i=this.fontSize,o=i/n.size,a=new Oe,s=[],u=[],l=[],c=this._text.replace(/(?:\r\n|\r)/g,` +`)||" ",f=zk(c),h=this._maxWidth*n.size/i,d=n.distanceFieldType==="none"?CC:OC,v=null,g=0,p=0,m=0,y=-1,_=0,x=0,S=0,w=0,E=0;E0&&a.x>h&&(++x,Vo(s,1+y-x,1+E-y),E=y,y=-1,u.push(_),l.push(s.length>0?s[s.length-1].prevSpaces:0),p=Math.max(p,_),m++,a.x=0,a.y+=n.lineHeight,v=null,w=0)}}var B=f[f.length-1];B!=="\r"&&B!==` +`&&(/(?:\s)/.test(B)&&(g=_),u.push(g),p=Math.max(p,g),l.push(-1));for(var $=[],E=0;E<=m;E++){var Y=0;this._align==="right"?Y=p-u[E]:this._align==="center"?Y=(p-u[E])/2:this._align==="justify"&&(Y=l[E]<0?0:(p-u[E])/l[E]),$.push(Y)}var U=s.length,z={},ie=[],be=this._activePagesMeshData;d.push.apply(d,be);for(var E=0;E6*we)||L.vertices.length=r&&(a=e-s-1),u=u.replace("%value%",t[a].toString()),i+=u,i+=` +`}return n=n.replace("%blur%",i),n=n.replace("%size%",e.toString()),n}var $l=function(e){Wk(t,e);function t(r,n,i,o,a){n===void 0&&(n=8),i===void 0&&(i=4),o===void 0&&(o=ne.FILTER_RESOLUTION),a===void 0&&(a=5);var s=this,u=xae(a,r),l=wae(a);return s=e.call(this,u,l)||this,s.horizontal=r,s.resolution=o,s._quality=0,s.quality=i,s.blur=n,s}return t.prototype.apply=function(r,n,i,o){if(i?this.horizontal?this.uniforms.strength=1/i.width*(i.width/n.width):this.uniforms.strength=1/i.height*(i.height/n.height):this.horizontal?this.uniforms.strength=1/r.renderer.width*(r.renderer.width/n.width):this.uniforms.strength=1/r.renderer.height*(r.renderer.height/n.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,this.passes===1)r.applyFilter(this,n,i,o);else{var a=r.getFilterTexture(),s=r.renderer,u=n,l=a;this.state.blend=!1,r.applyFilter(this,u,l,Zr.CLEAR);for(var c=1;c 0.0) { + c.rgb /= c.a; + } + + vec4 result; + + result.r = (m[0] * c.r); + result.r += (m[1] * c.g); + result.r += (m[2] * c.b); + result.r += (m[3] * c.a); + result.r += m[4]; + + result.g = (m[5] * c.r); + result.g += (m[6] * c.g); + result.g += (m[7] * c.b); + result.g += (m[8] * c.a); + result.g += m[9]; + + result.b = (m[10] * c.r); + result.b += (m[11] * c.g); + result.b += (m[12] * c.b); + result.b += (m[13] * c.a); + result.b += m[14]; + + result.a = (m[15] * c.r); + result.a += (m[16] * c.g); + result.a += (m[17] * c.b); + result.a += (m[18] * c.a); + result.a += m[19]; + + vec3 rgb = mix(c.rgb, result.rgb, uAlpha); + + // Premultiply alpha again. + rgb *= result.a; + + gl_FragColor = vec4(rgb, result.a); +} +`,r_=function(e){Tae(t,e);function t(){var r=this,n={m:new Float32Array([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]),uAlpha:1};return r=e.call(this,Pb,Cae,n)||this,r.alpha=1,r}return t.prototype._loadMatrix=function(r,n){n===void 0&&(n=!1);var i=r;n&&(this._multiply(i,this.uniforms.m,r),i=this._colorMatrix(i)),this.uniforms.m=i},t.prototype._multiply=function(r,n,i){return r[0]=n[0]*i[0]+n[1]*i[5]+n[2]*i[10]+n[3]*i[15],r[1]=n[0]*i[1]+n[1]*i[6]+n[2]*i[11]+n[3]*i[16],r[2]=n[0]*i[2]+n[1]*i[7]+n[2]*i[12]+n[3]*i[17],r[3]=n[0]*i[3]+n[1]*i[8]+n[2]*i[13]+n[3]*i[18],r[4]=n[0]*i[4]+n[1]*i[9]+n[2]*i[14]+n[3]*i[19]+n[4],r[5]=n[5]*i[0]+n[6]*i[5]+n[7]*i[10]+n[8]*i[15],r[6]=n[5]*i[1]+n[6]*i[6]+n[7]*i[11]+n[8]*i[16],r[7]=n[5]*i[2]+n[6]*i[7]+n[7]*i[12]+n[8]*i[17],r[8]=n[5]*i[3]+n[6]*i[8]+n[7]*i[13]+n[8]*i[18],r[9]=n[5]*i[4]+n[6]*i[9]+n[7]*i[14]+n[8]*i[19]+n[9],r[10]=n[10]*i[0]+n[11]*i[5]+n[12]*i[10]+n[13]*i[15],r[11]=n[10]*i[1]+n[11]*i[6]+n[12]*i[11]+n[13]*i[16],r[12]=n[10]*i[2]+n[11]*i[7]+n[12]*i[12]+n[13]*i[17],r[13]=n[10]*i[3]+n[11]*i[8]+n[12]*i[13]+n[13]*i[18],r[14]=n[10]*i[4]+n[11]*i[9]+n[12]*i[14]+n[13]*i[19]+n[14],r[15]=n[15]*i[0]+n[16]*i[5]+n[17]*i[10]+n[18]*i[15],r[16]=n[15]*i[1]+n[16]*i[6]+n[17]*i[11]+n[18]*i[16],r[17]=n[15]*i[2]+n[16]*i[7]+n[17]*i[12]+n[18]*i[17],r[18]=n[15]*i[3]+n[16]*i[8]+n[17]*i[13]+n[18]*i[18],r[19]=n[15]*i[4]+n[16]*i[9]+n[17]*i[14]+n[18]*i[19]+n[19],r},t.prototype._colorMatrix=function(r){var n=new Float32Array(r);return n[4]/=255,n[9]/=255,n[14]/=255,n[19]/=255,n},t.prototype.brightness=function(r,n){var i=[r,0,0,0,0,0,r,0,0,0,0,0,r,0,0,0,0,0,1,0];this._loadMatrix(i,n)},t.prototype.tint=function(r,n){var i=r>>16&255,o=r>>8&255,a=r&255,s=[i/255,0,0,0,0,0,o/255,0,0,0,0,0,a/255,0,0,0,0,0,1,0];this._loadMatrix(s,n)},t.prototype.greyscale=function(r,n){var i=[r,r,r,0,0,r,r,r,0,0,r,r,r,0,0,0,0,0,1,0];this._loadMatrix(i,n)},t.prototype.blackAndWhite=function(r){var n=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0];this._loadMatrix(n,r)},t.prototype.hue=function(r,n){r=(r||0)/180*Math.PI;var i=Math.cos(r),o=Math.sin(r),a=Math.sqrt,s=1/3,u=a(s),l=i+(1-i)*s,c=s*(1-i)-u*o,f=s*(1-i)+u*o,h=s*(1-i)+u*o,d=i+s*(1-i),v=s*(1-i)-u*o,g=s*(1-i)-u*o,p=s*(1-i)+u*o,m=i+s*(1-i),y=[l,c,f,0,0,h,d,v,0,0,g,p,m,0,0,0,0,0,1,0];this._loadMatrix(y,n)},t.prototype.contrast=function(r,n){var i=(r||0)+1,o=-.5*(i-1),a=[i,0,0,0,o,0,i,0,0,o,0,0,i,0,o,0,0,0,1,0];this._loadMatrix(a,n)},t.prototype.saturate=function(r,n){r===void 0&&(r=0);var i=r*2/3+1,o=(i-1)*-.5,a=[i,o,o,0,0,o,i,o,0,0,o,o,i,0,0,0,0,0,1,0];this._loadMatrix(a,n)},t.prototype.desaturate=function(){this.saturate(-1)},t.prototype.negative=function(r){var n=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0];this._loadMatrix(n,r)},t.prototype.sepia=function(r){var n=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0];this._loadMatrix(n,r)},t.prototype.technicolor=function(r){var n=[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0];this._loadMatrix(n,r)},t.prototype.polaroid=function(r){var n=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0];this._loadMatrix(n,r)},t.prototype.toBGR=function(r){var n=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0];this._loadMatrix(n,r)},t.prototype.kodachrome=function(r){var n=[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0];this._loadMatrix(n,r)},t.prototype.browni=function(r){var n=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0];this._loadMatrix(n,r)},t.prototype.vintage=function(r){var n=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0];this._loadMatrix(n,r)},t.prototype.colorTone=function(r,n,i,o,a){r=r||.2,n=n||.15,i=i||16770432,o=o||3375104;var s=(i>>16&255)/255,u=(i>>8&255)/255,l=(i&255)/255,c=(o>>16&255)/255,f=(o>>8&255)/255,h=(o&255)/255,d=[.3,.59,.11,0,0,s,u,l,r,0,c,f,h,n,0,s-c,u-f,l-h,0,0];this._loadMatrix(d,a)},t.prototype.night=function(r,n){r=r||.1;var i=[r*-2,-r,0,0,0,-r,0,r,0,0,0,r,r*2,0,0,0,0,0,1,0];this._loadMatrix(i,n)},t.prototype.predator=function(r,n){var i=[11.224130630493164*r,-4.794486999511719*r,-2.8746118545532227*r,0*r,.40342438220977783*r,-3.6330697536468506*r,9.193157196044922*r,-2.951810836791992*r,0*r,-1.316135048866272*r,-3.2184197902679443*r,-4.2375030517578125*r,7.476448059082031*r,0*r,.8044459223747253*r,0,0,0,1,0];this._loadMatrix(i,n)},t.prototype.lsd=function(r){var n=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0];this._loadMatrix(n,r)},t.prototype.reset=function(){var r=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];this._loadMatrix(r,!1)},Object.defineProperty(t.prototype,"matrix",{get:function(){return this.uniforms.m},set:function(r){this.uniforms.m=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"alpha",{get:function(){return this.uniforms.uAlpha},set:function(r){this.uniforms.uAlpha=r},enumerable:!1,configurable:!0}),t}(ge);r_.prototype.grayscale=r_.prototype.greyscale;/*! + * @pixi/filter-displacement - v6.5.10 + * Compiled Thu, 06 Jul 2023 15:25:11 UTC + * + * @pixi/filter-displacement is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + *//*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var n_=function(e,t){return n_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},n_(e,t)};function Oae(e,t){n_(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Aae=`varying vec2 vFilterCoord; +varying vec2 vTextureCoord; + +uniform vec2 scale; +uniform mat2 rotation; +uniform sampler2D uSampler; +uniform sampler2D mapSampler; + +uniform highp vec4 inputSize; +uniform vec4 inputClamp; + +void main(void) +{ + vec4 map = texture2D(mapSampler, vFilterCoord); + + map -= 0.5; + map.xy = scale * inputSize.zw * (rotation * map.xy); + + gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), inputClamp.xy, inputClamp.zw)); +} +`,Pae=`attribute vec2 aVertexPosition; + +uniform mat3 projectionMatrix; +uniform mat3 filterMatrix; + +varying vec2 vTextureCoord; +varying vec2 vFilterCoord; + +uniform vec4 inputSize; +uniform vec4 outputFrame; + +vec4 filterVertexPosition( void ) +{ + vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy; + + return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0); +} + +vec2 filterTextureCoord( void ) +{ + return aVertexPosition * (outputFrame.zw * inputSize.zw); +} + +void main(void) +{ + gl_Position = filterVertexPosition(); + vTextureCoord = filterTextureCoord(); + vFilterCoord = ( filterMatrix * vec3( vTextureCoord, 1.0) ).xy; +} +`,Rae=function(e){Oae(t,e);function t(r,n){var i=this,o=new kt;return r.renderable=!1,i=e.call(this,Pae,Aae,{mapSampler:r._texture,filterMatrix:o,scale:{x:1,y:1},rotation:new Float32Array([1,0,0,1])})||this,i.maskSprite=r,i.maskMatrix=o,n==null&&(n=20),i.scale=new Oe(n,n),i}return t.prototype.apply=function(r,n,i,o){this.uniforms.filterMatrix=r.calculateSpriteMatrix(this.maskMatrix,this.maskSprite),this.uniforms.scale.x=this.scale.x,this.uniforms.scale.y=this.scale.y;var a=this.maskSprite.worldTransform,s=Math.sqrt(a.a*a.a+a.b*a.b),u=Math.sqrt(a.c*a.c+a.d*a.d);s!==0&&u!==0&&(this.uniforms.rotation[0]=a.a/s,this.uniforms.rotation[1]=a.b/s,this.uniforms.rotation[2]=a.c/u,this.uniforms.rotation[3]=a.d/u),r.applyFilter(this,n,i,o)},Object.defineProperty(t.prototype,"map",{get:function(){return this.uniforms.mapSampler},set:function(r){this.uniforms.mapSampler=r},enumerable:!1,configurable:!0}),t}(ge);/*! + * @pixi/filter-fxaa - v6.5.10 + * Compiled Thu, 06 Jul 2023 15:25:11 UTC + * + * @pixi/filter-fxaa is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + *//*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var i_=function(e,t){return i_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},i_(e,t)};function Iae(e,t){i_(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var kae=` +attribute vec2 aVertexPosition; + +uniform mat3 projectionMatrix; + +varying vec2 v_rgbNW; +varying vec2 v_rgbNE; +varying vec2 v_rgbSW; +varying vec2 v_rgbSE; +varying vec2 v_rgbM; + +varying vec2 vFragCoord; + +uniform vec4 inputSize; +uniform vec4 outputFrame; + +vec4 filterVertexPosition( void ) +{ + vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy; + + return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0); +} + +void texcoords(vec2 fragCoord, vec2 inverseVP, + out vec2 v_rgbNW, out vec2 v_rgbNE, + out vec2 v_rgbSW, out vec2 v_rgbSE, + out vec2 v_rgbM) { + v_rgbNW = (fragCoord + vec2(-1.0, -1.0)) * inverseVP; + v_rgbNE = (fragCoord + vec2(1.0, -1.0)) * inverseVP; + v_rgbSW = (fragCoord + vec2(-1.0, 1.0)) * inverseVP; + v_rgbSE = (fragCoord + vec2(1.0, 1.0)) * inverseVP; + v_rgbM = vec2(fragCoord * inverseVP); +} + +void main(void) { + + gl_Position = filterVertexPosition(); + + vFragCoord = aVertexPosition * outputFrame.zw; + + texcoords(vFragCoord, inputSize.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM); +} +`,Nae=`varying vec2 v_rgbNW; +varying vec2 v_rgbNE; +varying vec2 v_rgbSW; +varying vec2 v_rgbSE; +varying vec2 v_rgbM; + +varying vec2 vFragCoord; +uniform sampler2D uSampler; +uniform highp vec4 inputSize; + + +/** + Basic FXAA implementation based on the code on geeks3d.com with the + modification that the texture2DLod stuff was removed since it's + unsupported by WebGL. + + -- + + From: + https://github.com/mitsuhiko/webgl-meincraft + + Copyright (c) 2011 by Armin Ronacher. + + Some rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + * The names of the contributors may not be used to endorse or + promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef FXAA_REDUCE_MIN +#define FXAA_REDUCE_MIN (1.0/ 128.0) +#endif +#ifndef FXAA_REDUCE_MUL +#define FXAA_REDUCE_MUL (1.0 / 8.0) +#endif +#ifndef FXAA_SPAN_MAX +#define FXAA_SPAN_MAX 8.0 +#endif + +//optimized version for mobile, where dependent +//texture reads can be a bottleneck +vec4 fxaa(sampler2D tex, vec2 fragCoord, vec2 inverseVP, + vec2 v_rgbNW, vec2 v_rgbNE, + vec2 v_rgbSW, vec2 v_rgbSE, + vec2 v_rgbM) { + vec4 color; + vec3 rgbNW = texture2D(tex, v_rgbNW).xyz; + vec3 rgbNE = texture2D(tex, v_rgbNE).xyz; + vec3 rgbSW = texture2D(tex, v_rgbSW).xyz; + vec3 rgbSE = texture2D(tex, v_rgbSE).xyz; + vec4 texColor = texture2D(tex, v_rgbM); + vec3 rgbM = texColor.xyz; + vec3 luma = vec3(0.299, 0.587, 0.114); + float lumaNW = dot(rgbNW, luma); + float lumaNE = dot(rgbNE, luma); + float lumaSW = dot(rgbSW, luma); + float lumaSE = dot(rgbSE, luma); + float lumaM = dot(rgbM, luma); + float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE))); + float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE))); + + mediump vec2 dir; + dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE)); + dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE)); + + float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) * + (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN); + + float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce); + dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX), + max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX), + dir * rcpDirMin)) * inverseVP; + + vec3 rgbA = 0.5 * ( + texture2D(tex, fragCoord * inverseVP + dir * (1.0 / 3.0 - 0.5)).xyz + + texture2D(tex, fragCoord * inverseVP + dir * (2.0 / 3.0 - 0.5)).xyz); + vec3 rgbB = rgbA * 0.5 + 0.25 * ( + texture2D(tex, fragCoord * inverseVP + dir * -0.5).xyz + + texture2D(tex, fragCoord * inverseVP + dir * 0.5).xyz); + + float lumaB = dot(rgbB, luma); + if ((lumaB < lumaMin) || (lumaB > lumaMax)) + color = vec4(rgbA, texColor.a); + else + color = vec4(rgbB, texColor.a); + return color; +} + +void main() { + + vec4 color; + + color = fxaa(uSampler, vFragCoord, inputSize.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM); + + gl_FragColor = color; +} +`,Lae=function(e){Iae(t,e);function t(){return e.call(this,kae,Nae)||this}return t}(ge);/*! + * @pixi/filter-noise - v6.5.10 + * Compiled Thu, 06 Jul 2023 15:25:11 UTC + * + * @pixi/filter-noise is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + *//*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var o_=function(e,t){return o_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},o_(e,t)};function Mae(e,t){o_(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Fae=`precision highp float; + +varying vec2 vTextureCoord; +varying vec4 vColor; + +uniform float uNoise; +uniform float uSeed; +uniform sampler2D uSampler; + +float rand(vec2 co) +{ + return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453); +} + +void main() +{ + vec4 color = texture2D(uSampler, vTextureCoord); + float randomValue = rand(gl_FragCoord.xy * uSeed); + float diff = (randomValue - 0.5) * uNoise; + + // Un-premultiply alpha before applying the color matrix. See issue #3539. + if (color.a > 0.0) { + color.rgb /= color.a; + } + + color.r += diff; + color.g += diff; + color.b += diff; + + // Premultiply alpha again. + color.rgb *= color.a; + + gl_FragColor = color; +} +`,Dae=function(e){Mae(t,e);function t(r,n){r===void 0&&(r=.5),n===void 0&&(n=Math.random());var i=e.call(this,Pb,Fae,{uNoise:0,uSeed:0})||this;return i.noise=r,i.seed=n,i}return Object.defineProperty(t.prototype,"noise",{get:function(){return this.uniforms.uNoise},set:function(r){this.uniforms.uNoise=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"seed",{get:function(){return this.uniforms.uSeed},set:function(r){this.uniforms.uSeed=r},enumerable:!1,configurable:!0}),t}(ge);/*! + * @pixi/mixin-cache-as-bitmap - v6.5.10 + * Compiled Thu, 06 Jul 2023 15:25:11 UTC + * + * @pixi/mixin-cache-as-bitmap is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */var qk=new kt;St.prototype._cacheAsBitmap=!1;St.prototype._cacheData=null;St.prototype._cacheAsBitmapResolution=null;St.prototype._cacheAsBitmapMultisample=ut.NONE;var Bae=function(){function e(){this.textureCacheId=null,this.originalRender=null,this.originalRenderCanvas=null,this.originalCalculateBounds=null,this.originalGetLocalBounds=null,this.originalUpdateTransform=null,this.originalDestroy=null,this.originalMask=null,this.originalFilterArea=null,this.originalContainsPoint=null,this.sprite=null}return e}();Object.defineProperties(St.prototype,{cacheAsBitmapResolution:{get:function(){return this._cacheAsBitmapResolution},set:function(e){e!==this._cacheAsBitmapResolution&&(this._cacheAsBitmapResolution=e,this.cacheAsBitmap&&(this.cacheAsBitmap=!1,this.cacheAsBitmap=!0))}},cacheAsBitmapMultisample:{get:function(){return this._cacheAsBitmapMultisample},set:function(e){e!==this._cacheAsBitmapMultisample&&(this._cacheAsBitmapMultisample=e,this.cacheAsBitmap&&(this.cacheAsBitmap=!1,this.cacheAsBitmap=!0))}},cacheAsBitmap:{get:function(){return this._cacheAsBitmap},set:function(e){if(this._cacheAsBitmap!==e){this._cacheAsBitmap=e;var t;e?(this._cacheData||(this._cacheData=new Bae),t=this._cacheData,t.originalRender=this.render,t.originalRenderCanvas=this.renderCanvas,t.originalUpdateTransform=this.updateTransform,t.originalCalculateBounds=this.calculateBounds,t.originalGetLocalBounds=this.getLocalBounds,t.originalDestroy=this.destroy,t.originalContainsPoint=this.containsPoint,t.originalMask=this._mask,t.originalFilterArea=this.filterArea,this.render=this._renderCached,this.renderCanvas=this._renderCachedCanvas,this.destroy=this._cacheAsBitmapDestroy):(t=this._cacheData,t.sprite&&this._destroyCachedDisplayObject(),this.render=t.originalRender,this.renderCanvas=t.originalRenderCanvas,this.calculateBounds=t.originalCalculateBounds,this.getLocalBounds=t.originalGetLocalBounds,this.destroy=t.originalDestroy,this.updateTransform=t.originalUpdateTransform,this.containsPoint=t.originalContainsPoint,this._mask=t.originalMask,this.filterArea=t.originalFilterArea)}}}});St.prototype._renderCached=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObject(t),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._render(t))};St.prototype._initCachedDisplayObject=function(t){var r;if(!(this._cacheData&&this._cacheData.sprite)){var n=this.alpha;this.alpha=1,t.batch.flush();var i=this.getLocalBounds(null,!0).clone();if(this.filters&&this.filters.length){var o=this.filters[0].padding;i.pad(o)}i.ceil(ne.RESOLUTION);var a=t.renderTexture.current,s=t.renderTexture.sourceFrame.clone(),u=t.renderTexture.destinationFrame.clone(),l=t.projection.transform,c=lo.create({width:i.width,height:i.height,resolution:this.cacheAsBitmapResolution||t.resolution,multisample:(r=this.cacheAsBitmapMultisample)!==null&&r!==void 0?r:t.multisample}),f="cacheAsBitmap_"+so();this._cacheData.textureCacheId=f,Ne.addToCache(c.baseTexture,f),ve.addToCache(c,f);var h=this.transform.localTransform.copyTo(qk).invert().translate(-i.x,-i.y);this.render=this._cacheData.originalRender,t.render(this,{renderTexture:c,clear:!0,transform:h,skipUpdateTransform:!1}),t.framebuffer.blit(),t.projection.transform=l,t.renderTexture.bind(a,s,u),this.render=this._renderCached,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null,this.alpha=n;var d=new co(c);d.transform.worldTransform=this.transform.worldTransform,d.anchor.x=-(i.x/i.width),d.anchor.y=-(i.y/i.height),d.alpha=n,d._bounds=this._bounds,this._cacheData.sprite=d,this.transform._parentID=-1,this.parent?this.updateTransform():(this.enableTempParent(),this.updateTransform(),this.disableTempParent(null)),this.containsPoint=d.containsPoint.bind(d)}};St.prototype._renderCachedCanvas=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObjectCanvas(t),this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._renderCanvas(t))};St.prototype._initCachedDisplayObjectCanvas=function(t){if(!(this._cacheData&&this._cacheData.sprite)){var r=this.getLocalBounds(null,!0),n=this.alpha;this.alpha=1;var i=t.context,o=t._projTransform;r.ceil(ne.RESOLUTION);var a=lo.create({width:r.width,height:r.height}),s="cacheAsBitmap_"+so();this._cacheData.textureCacheId=s,Ne.addToCache(a.baseTexture,s),ve.addToCache(a,s);var u=qk;this.transform.localTransform.copyTo(u),u.invert(),u.tx-=r.x,u.ty-=r.y,this.renderCanvas=this._cacheData.originalRenderCanvas,t.render(this,{renderTexture:a,clear:!0,transform:u,skipUpdateTransform:!1}),t.context=i,t._projTransform=o,this.renderCanvas=this._renderCachedCanvas,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null,this.alpha=n;var l=new co(a);l.transform.worldTransform=this.transform.worldTransform,l.anchor.x=-(r.x/r.width),l.anchor.y=-(r.y/r.height),l.alpha=n,l._bounds=this._bounds,this._cacheData.sprite=l,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=t._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=l.containsPoint.bind(l)}};St.prototype._calculateCachedBounds=function(){this._bounds.clear(),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite._calculateBounds(),this._bounds.updateID=this._boundsID};St.prototype._getCachedLocalBounds=function(){return this._cacheData.sprite.getLocalBounds(null)};St.prototype._destroyCachedDisplayObject=function(){this._cacheData.sprite._texture.destroy(!0),this._cacheData.sprite=null,Ne.removeFromCache(this._cacheData.textureCacheId),ve.removeFromCache(this._cacheData.textureCacheId),this._cacheData.textureCacheId=null};St.prototype._cacheAsBitmapDestroy=function(t){this.cacheAsBitmap=!1,this.destroy(t)};/*! + * @pixi/mixin-get-child-by-name - v6.5.10 + * Compiled Thu, 06 Jul 2023 15:25:11 UTC + * + * @pixi/mixin-get-child-by-name is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */St.prototype.name=null;br.prototype.getChildByName=function(t,r){for(var n=0,i=this.children.length;n0){var v=l.x-r[h].x,g=l.y-r[h].y,p=Math.sqrt(v*v+g*g);l=r[h],u+=p/c}else u=h/(f-1);a[d]=u,a[d+1]=0,a[d+2]=u,a[d+3]=1}for(var m=0,h=0;h0?this.textureScale*this._width/2:this._width/2;o/=h,a/=h,o*=d,a*=d,s[f]=c.x+o,s[f+1]=c.y+a,s[f+2]=c.x-o,s[f+3]=c.y-a,n=c}this.buffers[0].update()}},t.prototype.update=function(){this.textureScale>0?this.build():this.updateVertices()},t}(cc),jae=function(e){Vs(t,e);function t(r,n,i){i===void 0&&(i=0);var o=this,a=new Kk(r.height,n,i),s=new bs(r);return i>0&&(r.baseTexture.wrapMode=bn.REPEAT),o=e.call(this,a,s)||this,o.autoUpdate=!0,o}return t.prototype._render=function(r){var n=this.geometry;(this.autoUpdate||n._width!==this.shader.texture.height)&&(n._width=this.shader.texture.height,n.update()),e.prototype._render.call(this,r)},t}(xs),Zk=function(e){Vs(t,e);function t(r,n,i){var o=this,a=new Yk(r.width,r.height,n,i),s=new bs(ve.WHITE);return o=e.call(this,a,s)||this,o.texture=r,o.autoResize=!0,o}return t.prototype.textureUpdated=function(){this._textureID=this.shader.texture._updateID;var r=this.geometry,n=this.shader.texture,i=n.width,o=n.height;this.autoResize&&(r.width!==i||r.height!==o)&&(r.width=this.shader.texture.width,r.height=this.shader.texture.height,r.build())},Object.defineProperty(t.prototype,"texture",{get:function(){return this.shader.texture},set:function(r){this.shader.texture!==r&&(this.shader.texture=r,this._textureID=-1,r.baseTexture.valid?this.textureUpdated():r.once("update",this.textureUpdated,this))},enumerable:!1,configurable:!0}),t.prototype._render=function(r){this._textureID!==this.shader.texture._updateID&&this.textureUpdated(),e.prototype._render.call(this,r)},t.prototype.destroy=function(r){this.shader.texture.off("update",this.textureUpdated,this),e.prototype.destroy.call(this,r)},t}(xs),$ae=function(e){Vs(t,e);function t(r,n,i,o,a){r===void 0&&(r=ve.EMPTY);var s=this,u=new cc(n,i,o);u.getBuffer("aVertexPosition").static=!1;var l=new bs(r);return s=e.call(this,u,l,null,a)||this,s.autoUpdate=!0,s}return Object.defineProperty(t.prototype,"vertices",{get:function(){return this.geometry.getBuffer("aVertexPosition").data},set:function(r){this.geometry.getBuffer("aVertexPosition").data=r},enumerable:!1,configurable:!0}),t.prototype._render=function(r){this.autoUpdate&&this.geometry.getBuffer("aVertexPosition").update(),e.prototype._render.call(this,r)},t}(xs),of=10,Uae=function(e){Vs(t,e);function t(r,n,i,o,a){n===void 0&&(n=of),i===void 0&&(i=of),o===void 0&&(o=of),a===void 0&&(a=of);var s=e.call(this,ve.WHITE,4,4)||this;return s._origWidth=r.orig.width,s._origHeight=r.orig.height,s._width=s._origWidth,s._height=s._origHeight,s._leftWidth=n,s._rightWidth=o,s._topHeight=i,s._bottomHeight=a,s.texture=r,s}return t.prototype.textureUpdated=function(){this._textureID=this.shader.texture._updateID,this._refresh()},Object.defineProperty(t.prototype,"vertices",{get:function(){return this.geometry.getBuffer("aVertexPosition").data},set:function(r){this.geometry.getBuffer("aVertexPosition").data=r},enumerable:!1,configurable:!0}),t.prototype.updateHorizontalVertices=function(){var r=this.vertices,n=this._getMinScale();r[9]=r[11]=r[13]=r[15]=this._topHeight*n,r[17]=r[19]=r[21]=r[23]=this._height-this._bottomHeight*n,r[25]=r[27]=r[29]=r[31]=this._height},t.prototype.updateVerticalVertices=function(){var r=this.vertices,n=this._getMinScale();r[2]=r[10]=r[18]=r[26]=this._leftWidth*n,r[4]=r[12]=r[20]=r[28]=this._width-this._rightWidth*n,r[6]=r[14]=r[22]=r[30]=this._width},t.prototype._getMinScale=function(){var r=this._leftWidth+this._rightWidth,n=this._width>r?1:this._width/r,i=this._topHeight+this._bottomHeight,o=this._height>i?1:this._height/i,a=Math.min(n,o);return a},Object.defineProperty(t.prototype,"width",{get:function(){return this._width},set:function(r){this._width=r,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._height},set:function(r){this._height=r,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"leftWidth",{get:function(){return this._leftWidth},set:function(r){this._leftWidth=r,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rightWidth",{get:function(){return this._rightWidth},set:function(r){this._rightWidth=r,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"topHeight",{get:function(){return this._topHeight},set:function(r){this._topHeight=r,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bottomHeight",{get:function(){return this._bottomHeight},set:function(r){this._bottomHeight=r,this._refresh()},enumerable:!1,configurable:!0}),t.prototype._refresh=function(){var r=this.texture,n=this.geometry.buffers[1].data;this._origWidth=r.orig.width,this._origHeight=r.orig.height;var i=1/this._origWidth,o=1/this._origHeight;n[0]=n[8]=n[16]=n[24]=0,n[1]=n[3]=n[5]=n[7]=0,n[6]=n[14]=n[22]=n[30]=1,n[25]=n[27]=n[29]=n[31]=1,n[2]=n[10]=n[18]=n[26]=i*this._leftWidth,n[4]=n[12]=n[20]=n[28]=1-i*this._rightWidth,n[9]=n[11]=n[13]=n[15]=o*this._topHeight,n[17]=n[19]=n[21]=n[23]=1-o*this._bottomHeight,this.updateHorizontalVertices(),this.updateVerticalVertices(),this.geometry.buffers[0].update(),this.geometry.buffers[1].update()},t}(Zk);/*! + * @pixi/sprite-animated - v6.5.10 + * Compiled Thu, 06 Jul 2023 15:25:11 UTC + * + * @pixi/sprite-animated is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + *//*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var s_=function(e,t){return s_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},s_(e,t)};function Gae(e,t){s_(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var zae=function(e){Gae(t,e);function t(r,n){n===void 0&&(n=!0);var i=e.call(this,r[0]instanceof ve?r[0]:r[0].texture)||this;return i._textures=null,i._durations=null,i._autoUpdate=n,i._isConnectedToTicker=!1,i.animationSpeed=1,i.loop=!0,i.updateAnchor=!1,i.onComplete=null,i.onFrameChange=null,i.onLoop=null,i._currentTime=0,i._playing=!1,i._previousFrame=null,i.textures=r,i}return t.prototype.stop=function(){this._playing&&(this._playing=!1,this._autoUpdate&&this._isConnectedToTicker&&(Vt.shared.remove(this.update,this),this._isConnectedToTicker=!1))},t.prototype.play=function(){this._playing||(this._playing=!0,this._autoUpdate&&!this._isConnectedToTicker&&(Vt.shared.add(this.update,this,Qn.HIGH),this._isConnectedToTicker=!0))},t.prototype.gotoAndStop=function(r){this.stop();var n=this.currentFrame;this._currentTime=r,n!==this.currentFrame&&this.updateTexture()},t.prototype.gotoAndPlay=function(r){var n=this.currentFrame;this._currentTime=r,n!==this.currentFrame&&this.updateTexture(),this.play()},t.prototype.update=function(r){if(this._playing){var n=this.animationSpeed*r,i=this.currentFrame;if(this._durations!==null){var o=this._currentTime%1*this._durations[this.currentFrame];for(o+=n/60*1e3;o<0;)this._currentTime--,o+=this._durations[this.currentFrame];var a=Math.sign(this.animationSpeed*r);for(this._currentTime=Math.floor(this._currentTime);o>=this._durations[this.currentFrame];)o-=this._durations[this.currentFrame]*a,this._currentTime+=a;this._currentTime+=o/this._durations[this.currentFrame]}else this._currentTime+=n;this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete&&this.onComplete()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete&&this.onComplete()):i!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFramei&&this.onLoop()),this.updateTexture())}},t.prototype.updateTexture=function(){var r=this.currentFrame;this._previousFrame!==r&&(this._previousFrame=r,this._texture=this._textures[r],this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this.uvs=this._texture._uvs.uvsFloat32,this.updateAnchor&&this._anchor.copyFrom(this._texture.defaultAnchor),this.onFrameChange&&this.onFrameChange(this.currentFrame))},t.prototype.destroy=function(r){this.stop(),e.prototype.destroy.call(this,r),this.onComplete=null,this.onFrameChange=null,this.onLoop=null},t.fromFrames=function(r){for(var n=[],i=0;i{te.warn("清除所有演出");for(let e=0;e{const e=D.getState().stage,t=bt(e.PerformList);D.dispatch(Mt.removeAllPerform()),t.forEach(r=>{f1(r.script)})},Qk=(e,t=!0)=>{const r=D.dispatch,n=C.backlogManager.getBacklog()[e];te.debug("读取的backlog数据",n),t&&ii(n.saveScene.sceneUrl).then(o=>{C.sceneManager.sceneData.currentScene=On(o,n.saveScene.sceneName,n.saveScene.sceneUrl);const a=C.sceneManager.sceneData.currentScene.subSceneList;C.sceneManager.settledScenes.push(C.sceneManager.sceneData.currentScene.sceneUrl);const s=rc(a);nc(s)}),C.sceneManager.sceneData.currentSentenceId=n.saveScene.currentSentenceId,C.sceneManager.sceneData.sceneStack=bt(n.saveScene.sceneStack),$b();for(let o=C.backlogManager.getBacklog().length-1;o>e;o--)C.backlogManager.getBacklog().pop();C.backlogManager.isSaveBacklogNext=!0;const i=bt(n.currentStageState);r(gd(i)),setTimeout(Ub,0),r(Ie({component:"showBacklog",visibility:!1})),r(Ie({component:"showTextBox",visibility:!0}))};function fc(e){const t=document.getElementById("ebg");t&&(t.style.backgroundImage=`url("${e}")`)}const Jk=e=>{const r=D.getState().saveData.saveData[e];te.debug("读取的存档数据",r),eN(r)};function eN(e){if(!e){te.info("暂无存档");return}const t=e;ii(t.sceneData.sceneUrl).then(o=>{C.sceneManager.sceneData.currentScene=On(o,t.sceneData.sceneName,t.sceneData.sceneUrl);const a=C.sceneManager.sceneData.currentScene.subSceneList;C.sceneManager.settledScenes.push(C.sceneManager.sceneData.currentScene.sceneUrl);const s=rc(a);nc(s)}),C.sceneManager.sceneData.currentSentenceId=t.sceneData.currentSentenceId,C.sceneManager.sceneData.sceneStack=bt(t.sceneData.sceneStack),$b();const r=t.backlog;C.backlogManager.getBacklog().splice(0,C.backlogManager.getBacklog().length);for(const o of r)C.backlogManager.getBacklog().push(o);const n=bt(t.nowStageState),i=D.dispatch;i(gd(n)),setTimeout(Ub,0),i(Ie({component:"showTitle",visibility:!1})),i(Ie({component:"showMenuPanel",visibility:!1})),fc(D.getState().stage.bgName)}const Yae={saveData:[],quickSaveData:null},tN=ld({name:"saveData",initialState:bt(Yae),reducers:{setFastSave:(e,t)=>{e.quickSaveData=t.payload},resetFastSave:e=>{e.quickSaveData=null},resetSaves:e=>{e.quickSaveData=null,e.saveData=[]},saveGame:(e,t)=>{e.saveData[t.payload.index]=t.payload.saveData},replaceSaveGame:(e,t)=>{e.saveData=t.payload}}}),yi=tN.actions,Kae=tN.reducer;function Mf(e,t){for(let r=e;r<=t;r++){const n=D.getState().saveData.saveData[r];ca.setItem(`${C.gameKey}-saves${r}`,n).then(()=>{te.info(`存档${r}写入本地存储`)})}}function Vd(e,t){for(let r=e;r<=t;r++)ca.getItem(`${C.gameKey}-saves${r}`).then(n=>{D.dispatch(yi.saveGame({index:r,saveData:n})),te.info(`存档${r}读取自本地存储`)})}async function Ff(){const e=D.getState().saveData.quickSaveData;await ca.setItem(`${C.gameKey}-saves-fast`,e),te.info("快速存档写入本地存储")}async function Gb(){const e=await ca.getItem(`${C.gameKey}-saves-fast`);D.dispatch(yi.setFastSave(e)),te.info("快速存档读取自本地存储")}const l_=e=>{const t=rN(e);D.dispatch(yi.saveGame({index:e,saveData:t})),Mf(e,e)};function rN(e,t=!0){const r=D.getState().stage,n=bt(C.backlogManager.getBacklog());let i="";if(t){const a=document.getElementById("pixiCanvas"),s=document.createElement("canvas"),u=s.getContext("2d");s.width=480,s.height=270,u.drawImage(a,0,0,480,270),i=s.toDataURL("image/webp",.5),s.remove()}return{nowStageState:bt(r),backlog:n,index:e,saveTime:new Date().toLocaleDateString()+" "+new Date().toLocaleTimeString("chinese",{hour12:!1}),sceneData:{currentSentenceId:C.sceneManager.sceneData.currentSentenceId,sceneStack:bt(C.sceneManager.sceneData.sceneStack),sceneName:C.sceneManager.sceneData.currentScene.sceneName,sceneUrl:C.sceneManager.sceneData.currentScene.sceneUrl},previewImage:i}}function Zae(){`${C.gameName}${C.gameKey}`,`${C.gameName}${C.gameKey}`}async function Qae(){const e=rN(-1,!1),t=bt(e);D.dispatch(yi.setFastSave(t)),await Ff()}async function Jae(){return await pL(),D.getState().saveData.quickSaveData!==null}async function ese(){await Gb();const e=D.getState().saveData.quickSaveData;e&&eN(e)}const tse=e=>{const t=D.dispatch;bl.get(e).then(async r=>{var a,s;let n=r.data,i=xp.parseConfig(n);te.info("获取到游戏信息",i);const o=i.find(u=>u.command==="Game_key");C.gameKey=((a=o==null?void 0:o.args)==null?void 0:a[0])??"",Zae(),await pL(),Gb(),Vd(0,0),i.forEach(u=>{const{command:l,args:c}=u;if(c.length>0)if(c.length>1)t(uE({key:l,value:c.join("|")}));else{let f=c[0].trim();/^(true|false)$/g.test(c[0])?f=f==="true":/^[0-9]+\.?[0-9]+$/g.test(c[0])&&(f=Number(f)),t(uE({key:l,value:f}))}}),(s=window==null?void 0:window.renderPromise)==null||s.call(window),delete window.renderPromise,et()})},Wd=(e,t=!0)=>{e&&C.backlogManager.makeBacklogEmpty(),t&&C.sceneManager.resetScene(),C.gameplay.performController.removeAllPerform(),C.gameplay.resetGamePlay();const r=bt(f2),n=D.getState().stage.GameVar;D.dispatch(gd(r)),t||D.dispatch(Te({key:"GameVar",value:n}))};let c_;const rse=(e,t,r=!1)=>{te.warn("正在跳转到"+e+":"+t);const n=D.dispatch;n(Ie({component:"showTitle",visibility:!1})),n(Ie({component:"showMenuPanel",visibility:!1})),n(Ie({component:"isShowLogo",visibility:!1}));const i=document.getElementById("Title_enter_page");i&&(i.style.display="none");const o=bt(C.sceneManager.sceneData.currentScene),a=$r(e,jr.scene);ii(a).then(s=>{const u=nse(o,C.sceneManager.sceneData.currentScene,t),l=Math.min(t,u),c=ise(l,e),f=c>=0&&r;Wd(!f),C.sceneManager.sceneData.currentScene=On(s,e,a);const h=C.sceneManager.sceneData.currentScene.sceneName;C.gameplay.isFast=!0,f&&Qk(c,!1),c_&&clearTimeout(c_),zb(t,h)})};function zb(e,t){C.sceneManager.sceneData.currentSentenceIdzb(e,t),2)):C.gameplay.isFast=!1}function nse(e,t,r){let n=0;for(let i=0;i{const o=n.saveScene.currentSentenceId,a=n.saveScene.sceneName;o<=e&&a===t&&(r=i)}),r}const ose=()=>{window.JMP=zb};var Io=(e=>(e[e.JUMP=0]="JUMP",e[e.SYNCFC=1]="SYNCFC",e[e.SYNCFE=2]="SYNCFE",e[e.EXE_COMMAND=3]="EXE_COMMAND",e[e.REFETCH_TEMPLATE_FILES=4]="REFETCH_TEMPLATE_FILES",e[e.SET_COMPONENT_VISIBILITY=5]="SET_COMPONENT_VISIBILITY",e[e.TEMP_SCENE=6]="TEMP_SCENE",e))(Io||{});const ase=()=>{const e=window.location.hostname,t=window.location.protocol,r=window.location.port;let n="";if(r&&r!=="80"&&r!=="443"&&(n=`:${r}`),t!=="http:"&&t!=="https:")return;let i=`ws://${e}${n}/api/webgalsync`;t==="https:"&&(i=`wss://${e}${n}/api/webgalsync`),te.info("正在启动socket连接位于:"+i);const o=new WebSocket(i);o.onopen=()=>{te.info("socket已连接");function a(){const s={event:"message",data:{command:Io.SYNCFC,sceneMsg:{scene:C.sceneManager.sceneData.currentScene.sceneName,sentence:C.sceneManager.sceneData.currentSentenceId},stageSyncMsg:D.getState().stage,message:"sync"}};o.send(JSON.stringify(s)),setTimeout(a,1e3)}a()},o.onmessage=a=>{const s=a.data,l=JSON.parse(s).data;if(l.command===Io.JUMP&&rse(l.sceneMsg.scene,l.sceneMsg.sentence,l.message==="exp"),l.command===Io.EXE_COMMAND){const c=l.message;xp.parse(c,"temp.txt","temp.txt").sentenceList.forEach(h=>{f1(h)})}if(l.command===Io.REFETCH_TEMPLATE_FILES){const c=document.getElementById("Title_enter_page");c&&(c.style.display="none"),C.events.styleUpdate.emit()}if(l.command===Io.SET_COMPONENT_VISIBILITY){const c=l.message;JSON.parse(c).forEach(h=>{h&&D.dispatch(Ie({component:h.component,visibility:h.visibility}))})}if(l.command===Io.TEMP_SCENE){const c=l.message;Wd(!0),C.sceneManager.sceneData.currentScene=On(c,"temp","./temp.txt"),D.dispatch(Ie({component:"showTitle",visibility:!1})),D.dispatch(Ie({component:"showMenuPanel",visibility:!1})),D.dispatch(Ie({component:"showPanicOverlay",visibility:!1})),setTimeout(()=>{nr()},100)}},o.onerror=a=>{te.info("当前没有连接到 Terre 编辑器")}},nN={version:"WebGAL 4.5.11",contributors:[]},sse=navigator.userAgent,Hb=!!sse.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),use=()=>{te.info(nN.version),te.info("Github: https://github.com/OpenWebGAL/WebGAL "),te.info("Made with ❤ by OpenWebGAL"),Hb&&alert(`iOS 用户请横屏使用以获得最佳体验 +| Please use landscape mode on iOS for the best experience +| iOS ユーザーは横画面での使用をお勧めします`),lse("./game/userStyleSheet.css"),cse(),tse("./game/config.txt");const e=$r("start.txt",jr.scene);ii(e).then(t=>{C.sceneManager.sceneData.currentScene=On(t,"start.txt",e);const r=C.sceneManager.sceneData.currentScene.subSceneList;C.sceneManager.settledScenes.push(e);const n=rc(r);nc(n)}),C.gameplay.pixiStage=new Xn,ose(),ase()};function lse(e){const t=document.createElement("link");t.type="text/css",t.rel="stylesheet",t.href=e,document.getElementsByTagName("head")[0].appendChild(t)}function cse(){bl.get("./game/animation/animationTable.json").then(e=>{const t=e.data;for(const r of t)bl.get(`./game/animation/${r}.json`).then(n=>{if(n.data){const i={name:r,effects:n.data};C.animationManager.addAnimation(i)}})})}/*! + * @pixi/filter-old-film - v4.2.0 + * Compiled Fri, 05 Aug 2022 19:53:35 UTC + * + * @pixi/filter-old-film is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + *//*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var f_=function(e,t){return f_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},f_(e,t)};function fse(e,t){f_(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var hse=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,dse=`varying vec2 vTextureCoord; +uniform sampler2D uSampler; +uniform vec4 filterArea; +uniform vec2 dimensions; + +uniform float sepia; +uniform float noise; +uniform float noiseSize; +uniform float scratch; +uniform float scratchDensity; +uniform float scratchWidth; +uniform float vignetting; +uniform float vignettingAlpha; +uniform float vignettingBlur; +uniform float seed; + +const float SQRT_2 = 1.414213; +const vec3 SEPIA_RGB = vec3(112.0 / 255.0, 66.0 / 255.0, 20.0 / 255.0); + +float rand(vec2 co) { + return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453); +} + +vec3 Overlay(vec3 src, vec3 dst) +{ + // if (dst <= 0.5) then: 2 * src * dst + // if (dst > 0.5) then: 1 - 2 * (1 - dst) * (1 - src) + return vec3((dst.x <= 0.5) ? (2.0 * src.x * dst.x) : (1.0 - 2.0 * (1.0 - dst.x) * (1.0 - src.x)), + (dst.y <= 0.5) ? (2.0 * src.y * dst.y) : (1.0 - 2.0 * (1.0 - dst.y) * (1.0 - src.y)), + (dst.z <= 0.5) ? (2.0 * src.z * dst.z) : (1.0 - 2.0 * (1.0 - dst.z) * (1.0 - src.z))); +} + + +void main() +{ + gl_FragColor = texture2D(uSampler, vTextureCoord); + vec3 color = gl_FragColor.rgb; + + if (sepia > 0.0) + { + float gray = (color.x + color.y + color.z) / 3.0; + vec3 grayscale = vec3(gray); + + color = Overlay(SEPIA_RGB, grayscale); + + color = grayscale + sepia * (color - grayscale); + } + + vec2 coord = vTextureCoord * filterArea.xy / dimensions.xy; + + if (vignetting > 0.0) + { + float outter = SQRT_2 - vignetting * SQRT_2; + vec2 dir = vec2(vec2(0.5, 0.5) - coord); + dir.y *= dimensions.y / dimensions.x; + float darker = clamp((outter - length(dir) * SQRT_2) / ( 0.00001 + vignettingBlur * SQRT_2), 0.0, 1.0); + color.rgb *= darker + (1.0 - darker) * (1.0 - vignettingAlpha); + } + + if (scratchDensity > seed && scratch != 0.0) + { + float phase = seed * 256.0; + float s = mod(floor(phase), 2.0); + float dist = 1.0 / scratchDensity; + float d = distance(coord, vec2(seed * dist, abs(s - seed * dist))); + if (d < seed * 0.6 + 0.4) + { + highp float period = scratchDensity * 10.0; + + float xx = coord.x * period + phase; + float aa = abs(mod(xx, 0.5) * 4.0); + float bb = mod(floor(xx / 0.5), 2.0); + float yy = (1.0 - bb) * aa + bb * (2.0 - aa); + + float kk = 2.0 * period; + float dw = scratchWidth / dimensions.x * (0.75 + seed); + float dh = dw * kk; + + float tine = (yy - (2.0 - dh)); + + if (tine > 0.0) { + float _sign = sign(scratch); + + tine = s * tine / period + scratch + 0.1; + tine = clamp(tine + 1.0, 0.5 + _sign * 0.5, 1.5 + _sign * 0.5); + + color.rgb *= tine; + } + } + } + + if (noise > 0.0 && noiseSize > 0.0) + { + vec2 pixelCoord = vTextureCoord.xy * filterArea.xy; + pixelCoord.x = floor(pixelCoord.x / noiseSize); + pixelCoord.y = floor(pixelCoord.y / noiseSize); + // vec2 d = pixelCoord * noiseSize * vec2(1024.0 + seed * 512.0, 1024.0 - seed * 512.0); + // float _noise = snoise(d) * 0.5; + float _noise = rand(pixelCoord * noiseSize * seed) - 0.5; + color += _noise * noise; + } + + gl_FragColor.rgb = color; +} +`,pse=function(e){fse(t,e);function t(r,n){n===void 0&&(n=0);var i=e.call(this,hse,dse)||this;return i.seed=0,i.uniforms.dimensions=new Float32Array(2),typeof r=="number"?(i.seed=r,r=void 0):i.seed=n,Object.assign(i,t.defaults,r),i}return t.prototype.apply=function(r,n,i,o){var a,s;this.uniforms.dimensions[0]=(a=n.filterFrame)===null||a===void 0?void 0:a.width,this.uniforms.dimensions[1]=(s=n.filterFrame)===null||s===void 0?void 0:s.height,this.uniforms.seed=this.seed,r.applyFilter(this,n,i,o)},Object.defineProperty(t.prototype,"sepia",{get:function(){return this.uniforms.sepia},set:function(r){this.uniforms.sepia=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"noise",{get:function(){return this.uniforms.noise},set:function(r){this.uniforms.noise=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"noiseSize",{get:function(){return this.uniforms.noiseSize},set:function(r){this.uniforms.noiseSize=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scratch",{get:function(){return this.uniforms.scratch},set:function(r){this.uniforms.scratch=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scratchDensity",{get:function(){return this.uniforms.scratchDensity},set:function(r){this.uniforms.scratchDensity=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scratchWidth",{get:function(){return this.uniforms.scratchWidth},set:function(r){this.uniforms.scratchWidth=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignetting",{get:function(){return this.uniforms.vignetting},set:function(r){this.uniforms.vignetting=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignettingAlpha",{get:function(){return this.uniforms.vignettingAlpha},set:function(r){this.uniforms.vignettingAlpha=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignettingBlur",{get:function(){return this.uniforms.vignettingBlur},set:function(r){this.uniforms.vignettingBlur=r},enumerable:!1,configurable:!0}),t.defaults={sepia:.3,noise:.3,noiseSize:1,scratch:.5,scratchDensity:.3,scratchWidth:1,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3},t}(ge);/*! + * @pixi/filter-dot - v4.2.0 + * Compiled Fri, 05 Aug 2022 19:53:35 UTC + * + * @pixi/filter-dot is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + *//*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var h_=function(e,t){return h_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},h_(e,t)};function vse(e,t){h_(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var mse=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,gse=`precision mediump float; + +varying vec2 vTextureCoord; +varying vec4 vColor; + +uniform vec4 filterArea; +uniform sampler2D uSampler; + +uniform float angle; +uniform float scale; + +float pattern() +{ + float s = sin(angle), c = cos(angle); + vec2 tex = vTextureCoord * filterArea.xy; + vec2 point = vec2( + c * tex.x - s * tex.y, + s * tex.x + c * tex.y + ) * scale; + return (sin(point.x) * sin(point.y)) * 4.0; +} + +void main() +{ + vec4 color = texture2D(uSampler, vTextureCoord); + float average = (color.r + color.g + color.b) / 3.0; + gl_FragColor = vec4(vec3(average * 10.0 - 5.0 + pattern()), color.a); +} +`,yse=function(e){vse(t,e);function t(r,n){r===void 0&&(r=1),n===void 0&&(n=5);var i=e.call(this,mse,gse)||this;return i.scale=r,i.angle=n,i}return Object.defineProperty(t.prototype,"scale",{get:function(){return this.uniforms.scale},set:function(r){this.uniforms.scale=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"angle",{get:function(){return this.uniforms.angle},set:function(r){this.uniforms.angle=r},enumerable:!1,configurable:!0}),t}(ge);/*! + * @pixi/filter-reflection - v4.2.0 + * Compiled Fri, 05 Aug 2022 19:53:35 UTC + * + * @pixi/filter-reflection is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + *//*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var d_=function(e,t){return d_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},d_(e,t)};function _se(e,t){d_(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var xse=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,bse=`varying vec2 vTextureCoord; +uniform sampler2D uSampler; + +uniform vec4 filterArea; +uniform vec4 filterClamp; +uniform vec2 dimensions; + +uniform bool mirror; +uniform float boundary; +uniform vec2 amplitude; +uniform vec2 waveLength; +uniform vec2 alpha; +uniform float time; + +float rand(vec2 co) { + return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453); +} + +void main(void) +{ + vec2 pixelCoord = vTextureCoord.xy * filterArea.xy; + vec2 coord = pixelCoord / dimensions; + + if (coord.y < boundary) { + gl_FragColor = texture2D(uSampler, vTextureCoord); + return; + } + + float k = (coord.y - boundary) / (1. - boundary + 0.0001); + float areaY = boundary * dimensions.y / filterArea.y; + float v = areaY + areaY - vTextureCoord.y; + float y = mirror ? v : vTextureCoord.y; + + float _amplitude = ((amplitude.y - amplitude.x) * k + amplitude.x ) / filterArea.x; + float _waveLength = ((waveLength.y - waveLength.x) * k + waveLength.x) / filterArea.y; + float _alpha = (alpha.y - alpha.x) * k + alpha.x; + + float x = vTextureCoord.x + cos(v * 6.28 / _waveLength - time) * _amplitude; + x = clamp(x, filterClamp.x, filterClamp.z); + + vec4 color = texture2D(uSampler, vec2(x, y)); + + gl_FragColor = color * _alpha; +} +`,Sse=function(e){_se(t,e);function t(r){var n=e.call(this,xse,bse)||this;return n.time=0,n.uniforms.amplitude=new Float32Array(2),n.uniforms.waveLength=new Float32Array(2),n.uniforms.alpha=new Float32Array(2),n.uniforms.dimensions=new Float32Array(2),Object.assign(n,t.defaults,r),n}return t.prototype.apply=function(r,n,i,o){var a,s;this.uniforms.dimensions[0]=(a=n.filterFrame)===null||a===void 0?void 0:a.width,this.uniforms.dimensions[1]=(s=n.filterFrame)===null||s===void 0?void 0:s.height,this.uniforms.time=this.time,r.applyFilter(this,n,i,o)},Object.defineProperty(t.prototype,"mirror",{get:function(){return this.uniforms.mirror},set:function(r){this.uniforms.mirror=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"boundary",{get:function(){return this.uniforms.boundary},set:function(r){this.uniforms.boundary=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"amplitude",{get:function(){return this.uniforms.amplitude},set:function(r){this.uniforms.amplitude[0]=r[0],this.uniforms.amplitude[1]=r[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"waveLength",{get:function(){return this.uniforms.waveLength},set:function(r){this.uniforms.waveLength[0]=r[0],this.uniforms.waveLength[1]=r[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"alpha",{get:function(){return this.uniforms.alpha},set:function(r){this.uniforms.alpha[0]=r[0],this.uniforms.alpha[1]=r[1]},enumerable:!1,configurable:!0}),t.defaults={mirror:!0,boundary:.5,amplitude:[0,20],waveLength:[30,100],alpha:[1,1],time:0},t}(ge);/*! + * @pixi/filter-glitch - v4.2.0 + * Compiled Fri, 05 Aug 2022 19:53:35 UTC + * + * @pixi/filter-glitch is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + *//*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var p_=function(e,t){return p_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},p_(e,t)};function wse(e,t){p_(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Ese=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,Tse=`// precision highp float; + +varying vec2 vTextureCoord; +uniform sampler2D uSampler; + +uniform vec4 filterArea; +uniform vec4 filterClamp; +uniform vec2 dimensions; +uniform float aspect; + +uniform sampler2D displacementMap; +uniform float offset; +uniform float sinDir; +uniform float cosDir; +uniform int fillMode; + +uniform float seed; +uniform vec2 red; +uniform vec2 green; +uniform vec2 blue; + +const int TRANSPARENT = 0; +const int ORIGINAL = 1; +const int LOOP = 2; +const int CLAMP = 3; +const int MIRROR = 4; + +void main(void) +{ + vec2 coord = (vTextureCoord * filterArea.xy) / dimensions; + + if (coord.x > 1.0 || coord.y > 1.0) { + return; + } + + float cx = coord.x - 0.5; + float cy = (coord.y - 0.5) * aspect; + float ny = (-sinDir * cx + cosDir * cy) / aspect + 0.5; + + // displacementMap: repeat + // ny = ny > 1.0 ? ny - 1.0 : (ny < 0.0 ? 1.0 + ny : ny); + + // displacementMap: mirror + ny = ny > 1.0 ? 2.0 - ny : (ny < 0.0 ? -ny : ny); + + vec4 dc = texture2D(displacementMap, vec2(0.5, ny)); + + float displacement = (dc.r - dc.g) * (offset / filterArea.x); + + coord = vTextureCoord + vec2(cosDir * displacement, sinDir * displacement * aspect); + + if (fillMode == CLAMP) { + coord = clamp(coord, filterClamp.xy, filterClamp.zw); + } else { + if( coord.x > filterClamp.z ) { + if (fillMode == TRANSPARENT) { + discard; + } else if (fillMode == LOOP) { + coord.x -= filterClamp.z; + } else if (fillMode == MIRROR) { + coord.x = filterClamp.z * 2.0 - coord.x; + } + } else if( coord.x < filterClamp.x ) { + if (fillMode == TRANSPARENT) { + discard; + } else if (fillMode == LOOP) { + coord.x += filterClamp.z; + } else if (fillMode == MIRROR) { + coord.x *= -filterClamp.z; + } + } + + if( coord.y > filterClamp.w ) { + if (fillMode == TRANSPARENT) { + discard; + } else if (fillMode == LOOP) { + coord.y -= filterClamp.w; + } else if (fillMode == MIRROR) { + coord.y = filterClamp.w * 2.0 - coord.y; + } + } else if( coord.y < filterClamp.y ) { + if (fillMode == TRANSPARENT) { + discard; + } else if (fillMode == LOOP) { + coord.y += filterClamp.w; + } else if (fillMode == MIRROR) { + coord.y *= -filterClamp.w; + } + } + } + + gl_FragColor.r = texture2D(uSampler, coord + red * (1.0 - seed * 0.4) / filterArea.xy).r; + gl_FragColor.g = texture2D(uSampler, coord + green * (1.0 - seed * 0.3) / filterArea.xy).g; + gl_FragColor.b = texture2D(uSampler, coord + blue * (1.0 - seed * 0.2) / filterArea.xy).b; + gl_FragColor.a = texture2D(uSampler, coord).a; +} +`,Cse=function(e){wse(t,e);function t(r){var n=e.call(this,Ese,Tse)||this;return n.offset=100,n.fillMode=t.TRANSPARENT,n.average=!1,n.seed=0,n.minSize=8,n.sampleSize=512,n._slices=0,n._offsets=new Float32Array(1),n._sizes=new Float32Array(1),n._direction=-1,n.uniforms.dimensions=new Float32Array(2),n._canvas=document.createElement("canvas"),n._canvas.width=4,n._canvas.height=n.sampleSize,n.texture=ve.from(n._canvas,{scaleMode:Pr.NEAREST}),Object.assign(n,t.defaults,r),n}return t.prototype.apply=function(r,n,i,o){var a=n.filterFrame,s=a.width,u=a.height;this.uniforms.dimensions[0]=s,this.uniforms.dimensions[1]=u,this.uniforms.aspect=u/s,this.uniforms.seed=this.seed,this.uniforms.offset=this.offset,this.uniforms.fillMode=this.fillMode,r.applyFilter(this,n,i,o)},t.prototype._randomizeSizes=function(){var r=this._sizes,n=this._slices-1,i=this.sampleSize,o=Math.min(this.minSize/i,.9/this._slices);if(this.average){for(var a=this._slices,s=1,u=0;u0;i--){var o=Math.random()*i>>0,a=r[i];r[i]=r[o],r[o]=a}},t.prototype._randomizeOffsets=function(){for(var r=0;r0?o:0,c=o<0?-o:0;i.fillStyle="rgba("+l+", "+c+", 0, 1)",i.fillRect(0,a>>0,r,u+1>>0),a+=u}n.baseTexture.update(),this.uniforms.displacementMap=n},Object.defineProperty(t.prototype,"sizes",{get:function(){return this._sizes},set:function(r){for(var n=Math.min(this._slices,r.length),i=0;i 0.0) { + c.rgb /= c.a; + + vec3 rgb = pow(c.rgb, vec3(1. / gamma)); + rgb = mix(vec3(.5), mix(vec3(dot(vec3(.2125, .7154, .0721), rgb)), rgb, saturation), contrast); + rgb.r *= red; + rgb.g *= green; + rgb.b *= blue; + c.rgb = rgb * brightness; + + c.rgb *= c.a; + } + + gl_FragColor = c * alpha; +} +`;(function(e){Fse(t,e);function t(r){var n=e.call(this,Dse,Bse)||this;return n.gamma=1,n.saturation=1,n.contrast=1,n.brightness=1,n.red=1,n.green=1,n.blue=1,n.alpha=1,Object.assign(n,r),n}return t.prototype.apply=function(r,n,i,o){this.uniforms.gamma=Math.max(this.gamma,1e-4),this.uniforms.saturation=this.saturation,this.uniforms.contrast=this.contrast,this.uniforms.brightness=this.brightness,this.uniforms.red=this.red,this.uniforms.green=this.green,this.uniforms.blue=this.blue,this.uniforms.alpha=this.alpha,r.applyFilter(this,n,i,o)},t})(ge);/*! + * @pixi/filter-kawase-blur - v4.2.0 + * Compiled Fri, 05 Aug 2022 19:53:35 UTC + * + * @pixi/filter-kawase-blur is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + *//*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var y_=function(e,t){return y_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},y_(e,t)};function jse(e,t){y_(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var $se=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,Use=` +varying vec2 vTextureCoord; +uniform sampler2D uSampler; + +uniform vec2 uOffset; + +void main(void) +{ + vec4 color = vec4(0.0); + + // Sample top left pixel + color += texture2D(uSampler, vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y + uOffset.y)); + + // Sample top right pixel + color += texture2D(uSampler, vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y + uOffset.y)); + + // Sample bottom right pixel + color += texture2D(uSampler, vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y - uOffset.y)); + + // Sample bottom left pixel + color += texture2D(uSampler, vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y - uOffset.y)); + + // Average + color *= 0.25; + + gl_FragColor = color; +}`,Gse=` +varying vec2 vTextureCoord; +uniform sampler2D uSampler; + +uniform vec2 uOffset; +uniform vec4 filterClamp; + +void main(void) +{ + vec4 color = vec4(0.0); + + // Sample top left pixel + color += texture2D(uSampler, clamp(vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y + uOffset.y), filterClamp.xy, filterClamp.zw)); + + // Sample top right pixel + color += texture2D(uSampler, clamp(vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y + uOffset.y), filterClamp.xy, filterClamp.zw)); + + // Sample bottom right pixel + color += texture2D(uSampler, clamp(vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y - uOffset.y), filterClamp.xy, filterClamp.zw)); + + // Sample bottom left pixel + color += texture2D(uSampler, clamp(vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y - uOffset.y), filterClamp.xy, filterClamp.zw)); + + // Average + color *= 0.25; + + gl_FragColor = color; +} +`,Mh=function(e){jse(t,e);function t(r,n,i){r===void 0&&(r=4),n===void 0&&(n=3),i===void 0&&(i=!1);var o=e.call(this,$se,i?Gse:Use)||this;return o._kernels=[],o._blur=4,o._quality=3,o.uniforms.uOffset=new Float32Array(2),o._pixelSize=new Oe,o.pixelSize=1,o._clamp=i,Array.isArray(r)?o.kernels=r:(o._blur=r,o.quality=n),o}return t.prototype.apply=function(r,n,i,o){var a=this._pixelSize.x/n._frame.width,s=this._pixelSize.y/n._frame.height,u;if(this._quality===1||this._blur===0)u=this._kernels[0]+.5,this.uniforms.uOffset[0]=u*a,this.uniforms.uOffset[1]=u*s,r.applyFilter(this,n,i,o);else{for(var l=r.getFilterTexture(),c=n,f=l,h=void 0,d=this._quality-1,v=0;v0)for(var o=r,a=r/n,s=1;s0?(this._kernels=r,this._quality=r.length,this._blur=Math.max.apply(Math,r)):(this._kernels=[0],this._quality=1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clamp",{get:function(){return this._clamp},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pixelSize",{get:function(){return this._pixelSize},set:function(r){typeof r=="number"?(this._pixelSize.x=r,this._pixelSize.y=r):Array.isArray(r)?(this._pixelSize.x=r[0],this._pixelSize.y=r[1]):r instanceof Oe?(this._pixelSize.x=r.x,this._pixelSize.y=r.y):(this._pixelSize.x=1,this._pixelSize.y=1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"quality",{get:function(){return this._quality},set:function(r){this._quality=Math.max(1,Math.round(r)),this._generateKernels()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"blur",{get:function(){return this._blur},set:function(r){this._blur=r,this._generateKernels()},enumerable:!1,configurable:!0}),t}(ge);/*! + * @pixi/filter-advanced-bloom - v4.2.0 + * Compiled Fri, 05 Aug 2022 19:53:35 UTC + * + * @pixi/filter-advanced-bloom is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + *//*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var __=function(e,t){return __=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},__(e,t)};function iN(e,t){__(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var oN=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,zse=` +uniform sampler2D uSampler; +varying vec2 vTextureCoord; + +uniform float threshold; + +void main() { + vec4 color = texture2D(uSampler, vTextureCoord); + + // A simple & fast algorithm for getting brightness. + // It's inaccuracy , but good enought for this feature. + float _max = max(max(color.r, color.g), color.b); + float _min = min(min(color.r, color.g), color.b); + float brightness = (_max + _min) * 0.5; + + if(brightness > threshold) { + gl_FragColor = color; + } else { + gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); + } +} +`,Hse=function(e){iN(t,e);function t(r){r===void 0&&(r=.5);var n=e.call(this,oN,zse)||this;return n.threshold=r,n}return Object.defineProperty(t.prototype,"threshold",{get:function(){return this.uniforms.threshold},set:function(r){this.uniforms.threshold=r},enumerable:!1,configurable:!0}),t}(ge),Vse=`uniform sampler2D uSampler; +varying vec2 vTextureCoord; + +uniform sampler2D bloomTexture; +uniform float bloomScale; +uniform float brightness; + +void main() { + vec4 color = texture2D(uSampler, vTextureCoord); + color.rgb *= brightness; + vec4 bloomColor = vec4(texture2D(bloomTexture, vTextureCoord).rgb, 0.0); + bloomColor.rgb *= bloomScale; + gl_FragColor = color + bloomColor; +} +`;(function(e){iN(t,e);function t(r){var n=e.call(this,oN,Vse)||this;n.bloomScale=1,n.brightness=1,n._resolution=ne.FILTER_RESOLUTION,typeof r=="number"&&(r={threshold:r});var i=Object.assign(t.defaults,r);n.bloomScale=i.bloomScale,n.brightness=i.brightness;var o=i.kernels,a=i.blur,s=i.quality,u=i.pixelSize,l=i.resolution;return n._extractFilter=new Hse(i.threshold),n._extractFilter.resolution=l,n._blurFilter=o?new Mh(o):new Mh(a,s),n.pixelSize=u,n.resolution=l,n}return t.prototype.apply=function(r,n,i,o,a){var s=r.getFilterTexture();this._extractFilter.apply(r,n,s,1,a);var u=r.getFilterTexture();this._blurFilter.apply(r,s,u,1),this.uniforms.bloomScale=this.bloomScale,this.uniforms.brightness=this.brightness,this.uniforms.bloomTexture=u,r.applyFilter(this,n,i,o),r.returnFilterTexture(u),r.returnFilterTexture(s)},Object.defineProperty(t.prototype,"resolution",{get:function(){return this._resolution},set:function(r){this._resolution=r,this._extractFilter&&(this._extractFilter.resolution=r),this._blurFilter&&(this._blurFilter.resolution=r)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"threshold",{get:function(){return this._extractFilter.threshold},set:function(r){this._extractFilter.threshold=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"kernels",{get:function(){return this._blurFilter.kernels},set:function(r){this._blurFilter.kernels=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"blur",{get:function(){return this._blurFilter.blur},set:function(r){this._blurFilter.blur=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"quality",{get:function(){return this._blurFilter.quality},set:function(r){this._blurFilter.quality=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pixelSize",{get:function(){return this._blurFilter.pixelSize},set:function(r){this._blurFilter.pixelSize=r},enumerable:!1,configurable:!0}),t.defaults={threshold:.5,bloomScale:1,brightness:1,kernels:null,blur:8,quality:4,pixelSize:1,resolution:ne.FILTER_RESOLUTION},t})(ge);/*! + * @pixi/filter-ascii - v4.2.0 + * Compiled Fri, 05 Aug 2022 19:53:35 UTC + * + * @pixi/filter-ascii is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + *//*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var x_=function(e,t){return x_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},x_(e,t)};function Wse(e,t){x_(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var qse=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,Xse=`varying vec2 vTextureCoord; + +uniform vec4 filterArea; +uniform float pixelSize; +uniform sampler2D uSampler; + +vec2 mapCoord( vec2 coord ) +{ + coord *= filterArea.xy; + coord += filterArea.zw; + + return coord; +} + +vec2 unmapCoord( vec2 coord ) +{ + coord -= filterArea.zw; + coord /= filterArea.xy; + + return coord; +} + +vec2 pixelate(vec2 coord, vec2 size) +{ + return floor( coord / size ) * size; +} + +vec2 getMod(vec2 coord, vec2 size) +{ + return mod( coord , size) / size; +} + +float character(float n, vec2 p) +{ + p = floor(p*vec2(4.0, -4.0) + 2.5); + + if (clamp(p.x, 0.0, 4.0) == p.x) + { + if (clamp(p.y, 0.0, 4.0) == p.y) + { + if (int(mod(n/exp2(p.x + 5.0*p.y), 2.0)) == 1) return 1.0; + } + } + return 0.0; +} + +void main() +{ + vec2 coord = mapCoord(vTextureCoord); + + // get the rounded color.. + vec2 pixCoord = pixelate(coord, vec2(pixelSize)); + pixCoord = unmapCoord(pixCoord); + + vec4 color = texture2D(uSampler, pixCoord); + + // determine the character to use + float gray = (color.r + color.g + color.b) / 3.0; + + float n = 65536.0; // . + if (gray > 0.2) n = 65600.0; // : + if (gray > 0.3) n = 332772.0; // * + if (gray > 0.4) n = 15255086.0; // o + if (gray > 0.5) n = 23385164.0; // & + if (gray > 0.6) n = 15252014.0; // 8 + if (gray > 0.7) n = 13199452.0; // @ + if (gray > 0.8) n = 11512810.0; // # + + // get the mod.. + vec2 modd = getMod(coord, vec2(pixelSize)); + + gl_FragColor = color * character( n, vec2(-1.0) + modd * 2.0); + +} +`;(function(e){Wse(t,e);function t(r){r===void 0&&(r=8);var n=e.call(this,qse,Xse)||this;return n.size=r,n}return Object.defineProperty(t.prototype,"size",{get:function(){return this.uniforms.pixelSize},set:function(r){this.uniforms.pixelSize=r},enumerable:!1,configurable:!0}),t})(ge);/*! + * @pixi/filter-bevel - v4.2.0 + * Compiled Fri, 05 Aug 2022 19:53:35 UTC + * + * @pixi/filter-bevel is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + *//*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var b_=function(e,t){return b_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},b_(e,t)};function Yse(e,t){b_(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Kse=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,Zse=`precision mediump float; + +varying vec2 vTextureCoord; +uniform sampler2D uSampler; +uniform vec4 filterArea; + +uniform float transformX; +uniform float transformY; +uniform vec3 lightColor; +uniform float lightAlpha; +uniform vec3 shadowColor; +uniform float shadowAlpha; + +void main(void) { + vec2 transform = vec2(1.0 / filterArea) * vec2(transformX, transformY); + vec4 color = texture2D(uSampler, vTextureCoord); + float light = texture2D(uSampler, vTextureCoord - transform).a; + float shadow = texture2D(uSampler, vTextureCoord + transform).a; + + color.rgb = mix(color.rgb, lightColor, clamp((color.a - light) * lightAlpha, 0.0, 1.0)); + color.rgb = mix(color.rgb, shadowColor, clamp((color.a - shadow) * shadowAlpha, 0.0, 1.0)); + gl_FragColor = vec4(color.rgb * color.a, color.a); +} +`;(function(e){Yse(t,e);function t(r){var n=e.call(this,Kse,Zse)||this;return n._thickness=2,n._angle=0,n.uniforms.lightColor=new Float32Array(3),n.uniforms.shadowColor=new Float32Array(3),Object.assign(n,{rotation:45,thickness:2,lightColor:16777215,lightAlpha:.7,shadowColor:0,shadowAlpha:.7},r),n.padding=1,n}return t.prototype._updateTransform=function(){this.uniforms.transformX=this._thickness*Math.cos(this._angle),this.uniforms.transformY=this._thickness*Math.sin(this._angle)},Object.defineProperty(t.prototype,"rotation",{get:function(){return this._angle/uo},set:function(r){this._angle=r*uo,this._updateTransform()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"thickness",{get:function(){return this._thickness},set:function(r){this._thickness=r,this._updateTransform()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lightColor",{get:function(){return ln(this.uniforms.lightColor)},set:function(r){Xt(r,this.uniforms.lightColor)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lightAlpha",{get:function(){return this.uniforms.lightAlpha},set:function(r){this.uniforms.lightAlpha=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shadowColor",{get:function(){return ln(this.uniforms.shadowColor)},set:function(r){Xt(r,this.uniforms.shadowColor)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shadowAlpha",{get:function(){return this.uniforms.shadowAlpha},set:function(r){this.uniforms.shadowAlpha=r},enumerable:!1,configurable:!0}),t})(ge);/*! + * @pixi/filter-bloom - v4.2.0 + * Compiled Fri, 05 Aug 2022 19:53:35 UTC + * + * @pixi/filter-bloom is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + *//*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var S_=function(e,t){return S_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},S_(e,t)};function Qse(e,t){S_(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}(function(e){Qse(t,e);function t(r,n,i,o){r===void 0&&(r=2),n===void 0&&(n=4),i===void 0&&(i=ne.FILTER_RESOLUTION),o===void 0&&(o=5);var a=e.call(this)||this,s,u;return typeof r=="number"?(s=r,u=r):r instanceof Oe?(s=r.x,u=r.y):Array.isArray(r)&&(s=r[0],u=r[1]),a.blurXFilter=new $l(!0,s,n,i,o),a.blurYFilter=new $l(!1,u,n,i,o),a.blurYFilter.blendMode=ce.SCREEN,a.defaultFilter=new Vk,a}return t.prototype.apply=function(r,n,i,o){var a=r.getFilterTexture();this.defaultFilter.apply(r,n,i,o),this.blurXFilter.apply(r,n,a,1),this.blurYFilter.apply(r,a,i,0),r.returnFilterTexture(a)},Object.defineProperty(t.prototype,"blur",{get:function(){return this.blurXFilter.blur},set:function(r){this.blurXFilter.blur=this.blurYFilter.blur=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"blurX",{get:function(){return this.blurXFilter.blur},set:function(r){this.blurXFilter.blur=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"blurY",{get:function(){return this.blurYFilter.blur},set:function(r){this.blurYFilter.blur=r},enumerable:!1,configurable:!0}),t})(ge);/*! + * @pixi/filter-bulge-pinch - v4.2.0 + * Compiled Fri, 05 Aug 2022 19:53:35 UTC + * + * @pixi/filter-bulge-pinch is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + *//*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var w_=function(e,t){return w_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},w_(e,t)};function Jse(e,t){w_(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var eue=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,tue=`uniform float radius; +uniform float strength; +uniform vec2 center; +uniform sampler2D uSampler; +varying vec2 vTextureCoord; + +uniform vec4 filterArea; +uniform vec4 filterClamp; +uniform vec2 dimensions; + +void main() +{ + vec2 coord = vTextureCoord * filterArea.xy; + coord -= center * dimensions.xy; + float distance = length(coord); + if (distance < radius) { + float percent = distance / radius; + if (strength > 0.0) { + coord *= mix(1.0, smoothstep(0.0, radius / distance, percent), strength * 0.75); + } else { + coord *= mix(1.0, pow(percent, 1.0 + strength * 0.75) * radius / distance, 1.0 - percent); + } + } + coord += center * dimensions.xy; + coord /= filterArea.xy; + vec2 clampedCoord = clamp(coord, filterClamp.xy, filterClamp.zw); + vec4 color = texture2D(uSampler, clampedCoord); + if (coord != clampedCoord) { + color *= max(0.0, 1.0 - length(coord - clampedCoord)); + } + + gl_FragColor = color; +} +`;(function(e){Jse(t,e);function t(r){var n=e.call(this,eue,tue)||this;return n.uniforms.dimensions=new Float32Array(2),Object.assign(n,t.defaults,r),n}return t.prototype.apply=function(r,n,i,o){var a=n.filterFrame,s=a.width,u=a.height;this.uniforms.dimensions[0]=s,this.uniforms.dimensions[1]=u,r.applyFilter(this,n,i,o)},Object.defineProperty(t.prototype,"radius",{get:function(){return this.uniforms.radius},set:function(r){this.uniforms.radius=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"strength",{get:function(){return this.uniforms.strength},set:function(r){this.uniforms.strength=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"center",{get:function(){return this.uniforms.center},set:function(r){this.uniforms.center=r},enumerable:!1,configurable:!0}),t.defaults={center:[.5,.5],radius:100,strength:1},t})(ge);/*! + * @pixi/filter-color-map - v4.2.0 + * Compiled Fri, 05 Aug 2022 19:53:35 UTC + * + * @pixi/filter-color-map is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + *//*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var E_=function(e,t){return E_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},E_(e,t)};function rue(e,t){E_(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var nue=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,iue=`varying vec2 vTextureCoord; +uniform sampler2D uSampler; +uniform sampler2D colorMap; +uniform float _mix; +uniform float _size; +uniform float _sliceSize; +uniform float _slicePixelSize; +uniform float _sliceInnerSize; +void main() { + vec4 color = texture2D(uSampler, vTextureCoord.xy); + + vec4 adjusted; + if (color.a > 0.0) { + color.rgb /= color.a; + float innerWidth = _size - 1.0; + float zSlice0 = min(floor(color.b * innerWidth), innerWidth); + float zSlice1 = min(zSlice0 + 1.0, innerWidth); + float xOffset = _slicePixelSize * 0.5 + color.r * _sliceInnerSize; + float s0 = xOffset + (zSlice0 * _sliceSize); + float s1 = xOffset + (zSlice1 * _sliceSize); + float yOffset = _sliceSize * 0.5 + color.g * (1.0 - _sliceSize); + vec4 slice0Color = texture2D(colorMap, vec2(s0,yOffset)); + vec4 slice1Color = texture2D(colorMap, vec2(s1,yOffset)); + float zOffset = fract(color.b * innerWidth); + adjusted = mix(slice0Color, slice1Color, zOffset); + + color.rgb *= color.a; + } + gl_FragColor = vec4(mix(color, adjusted, _mix).rgb, color.a); + +}`;(function(e){rue(t,e);function t(r,n,i){n===void 0&&(n=!1),i===void 0&&(i=1);var o=e.call(this,nue,iue)||this;return o.mix=1,o._size=0,o._sliceSize=0,o._slicePixelSize=0,o._sliceInnerSize=0,o._nearest=!1,o._scaleMode=null,o._colorMap=null,o._scaleMode=null,o.nearest=n,o.mix=i,o.colorMap=r,o}return t.prototype.apply=function(r,n,i,o){this.uniforms._mix=this.mix,r.applyFilter(this,n,i,o)},Object.defineProperty(t.prototype,"colorSize",{get:function(){return this._size},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"colorMap",{get:function(){return this._colorMap},set:function(r){var n;r&&(r instanceof ve||(r=ve.from(r)),!((n=r)===null||n===void 0)&&n.baseTexture&&(r.baseTexture.scaleMode=this._scaleMode,r.baseTexture.mipmap=Lr.OFF,this._size=r.height,this._sliceSize=1/this._size,this._slicePixelSize=this._sliceSize/this._size,this._sliceInnerSize=this._slicePixelSize*(this._size-1),this.uniforms._size=this._size,this.uniforms._sliceSize=this._sliceSize,this.uniforms._slicePixelSize=this._slicePixelSize,this.uniforms._sliceInnerSize=this._sliceInnerSize,this.uniforms.colorMap=r),this._colorMap=r)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nearest",{get:function(){return this._nearest},set:function(r){this._nearest=r,this._scaleMode=r?Pr.NEAREST:Pr.LINEAR;var n=this._colorMap;n&&n.baseTexture&&(n.baseTexture._glTextures={},n.baseTexture.scaleMode=this._scaleMode,n.baseTexture.mipmap=Lr.OFF,n._updateID++,n.baseTexture.emit("update",n.baseTexture))},enumerable:!1,configurable:!0}),t.prototype.updateColorMap=function(){var r=this._colorMap;r&&r.baseTexture&&(r._updateID++,r.baseTexture.emit("update",r.baseTexture),this.colorMap=r)},t.prototype.destroy=function(r){r===void 0&&(r=!1),this._colorMap&&this._colorMap.destroy(r),e.prototype.destroy.call(this)},t})(ge);/*! + * @pixi/filter-color-overlay - v4.2.0 + * Compiled Fri, 05 Aug 2022 19:53:35 UTC + * + * @pixi/filter-color-overlay is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + *//*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var T_=function(e,t){return T_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},T_(e,t)};function oue(e,t){T_(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var aue=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,sue=`varying vec2 vTextureCoord; +uniform sampler2D uSampler; +uniform vec3 color; +uniform float alpha; + +void main(void) { + vec4 currentColor = texture2D(uSampler, vTextureCoord); + gl_FragColor = vec4(mix(currentColor.rgb, color.rgb, currentColor.a * alpha), currentColor.a); +} +`;(function(e){oue(t,e);function t(r,n){r===void 0&&(r=0),n===void 0&&(n=1);var i=e.call(this,aue,sue)||this;return i._color=0,i._alpha=1,i.uniforms.color=new Float32Array(3),i.color=r,i.alpha=n,i}return Object.defineProperty(t.prototype,"color",{get:function(){return this._color},set:function(r){var n=this.uniforms.color;typeof r=="number"?(Xt(r,n),this._color=r):(n[0]=r[0],n[1]=r[1],n[2]=r[2],this._color=ln(n))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"alpha",{get:function(){return this._alpha},set:function(r){this.uniforms.alpha=r,this._alpha=r},enumerable:!1,configurable:!0}),t})(ge);/*! + * @pixi/filter-color-replace - v4.2.0 + * Compiled Fri, 05 Aug 2022 19:53:35 UTC + * + * @pixi/filter-color-replace is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + *//*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var C_=function(e,t){return C_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},C_(e,t)};function uue(e,t){C_(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var lue=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,cue=`varying vec2 vTextureCoord; +uniform sampler2D uSampler; +uniform vec3 originalColor; +uniform vec3 newColor; +uniform float epsilon; +void main(void) { + vec4 currentColor = texture2D(uSampler, vTextureCoord); + vec3 colorDiff = originalColor - (currentColor.rgb / max(currentColor.a, 0.0000000001)); + float colorDistance = length(colorDiff); + float doReplace = step(colorDistance, epsilon); + gl_FragColor = vec4(mix(currentColor.rgb, (newColor + colorDiff) * currentColor.a, doReplace), currentColor.a); +} +`;(function(e){uue(t,e);function t(r,n,i){r===void 0&&(r=16711680),n===void 0&&(n=0),i===void 0&&(i=.4);var o=e.call(this,lue,cue)||this;return o._originalColor=16711680,o._newColor=0,o.uniforms.originalColor=new Float32Array(3),o.uniforms.newColor=new Float32Array(3),o.originalColor=r,o.newColor=n,o.epsilon=i,o}return Object.defineProperty(t.prototype,"originalColor",{get:function(){return this._originalColor},set:function(r){var n=this.uniforms.originalColor;typeof r=="number"?(Xt(r,n),this._originalColor=r):(n[0]=r[0],n[1]=r[1],n[2]=r[2],this._originalColor=ln(n))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"newColor",{get:function(){return this._newColor},set:function(r){var n=this.uniforms.newColor;typeof r=="number"?(Xt(r,n),this._newColor=r):(n[0]=r[0],n[1]=r[1],n[2]=r[2],this._newColor=ln(n))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"epsilon",{get:function(){return this.uniforms.epsilon},set:function(r){this.uniforms.epsilon=r},enumerable:!1,configurable:!0}),t})(ge);/*! + * @pixi/filter-convolution - v4.2.0 + * Compiled Fri, 05 Aug 2022 19:53:35 UTC + * + * @pixi/filter-convolution is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + *//*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var O_=function(e,t){return O_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},O_(e,t)};function fue(e,t){O_(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var hue=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,due=`precision mediump float; + +varying mediump vec2 vTextureCoord; + +uniform sampler2D uSampler; +uniform vec2 texelSize; +uniform float matrix[9]; + +void main(void) +{ + vec4 c11 = texture2D(uSampler, vTextureCoord - texelSize); // top left + vec4 c12 = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y - texelSize.y)); // top center + vec4 c13 = texture2D(uSampler, vec2(vTextureCoord.x + texelSize.x, vTextureCoord.y - texelSize.y)); // top right + + vec4 c21 = texture2D(uSampler, vec2(vTextureCoord.x - texelSize.x, vTextureCoord.y)); // mid left + vec4 c22 = texture2D(uSampler, vTextureCoord); // mid center + vec4 c23 = texture2D(uSampler, vec2(vTextureCoord.x + texelSize.x, vTextureCoord.y)); // mid right + + vec4 c31 = texture2D(uSampler, vec2(vTextureCoord.x - texelSize.x, vTextureCoord.y + texelSize.y)); // bottom left + vec4 c32 = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y + texelSize.y)); // bottom center + vec4 c33 = texture2D(uSampler, vTextureCoord + texelSize); // bottom right + + gl_FragColor = + c11 * matrix[0] + c12 * matrix[1] + c13 * matrix[2] + + c21 * matrix[3] + c22 * matrix[4] + c23 * matrix[5] + + c31 * matrix[6] + c32 * matrix[7] + c33 * matrix[8]; + + gl_FragColor.a = c22.a; +} +`;(function(e){fue(t,e);function t(r,n,i){n===void 0&&(n=200),i===void 0&&(i=200);var o=e.call(this,hue,due)||this;return o.uniforms.texelSize=new Float32Array(2),o.uniforms.matrix=new Float32Array(9),r!==void 0&&(o.matrix=r),o.width=n,o.height=i,o}return Object.defineProperty(t.prototype,"matrix",{get:function(){return this.uniforms.matrix},set:function(r){var n=this;r.forEach(function(i,o){n.uniforms.matrix[o]=i})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return 1/this.uniforms.texelSize[0]},set:function(r){this.uniforms.texelSize[0]=1/r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return 1/this.uniforms.texelSize[1]},set:function(r){this.uniforms.texelSize[1]=1/r},enumerable:!1,configurable:!0}),t})(ge);/*! + * @pixi/filter-cross-hatch - v4.2.0 + * Compiled Fri, 05 Aug 2022 19:53:35 UTC + * + * @pixi/filter-cross-hatch is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + *//*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var A_=function(e,t){return A_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},A_(e,t)};function pue(e,t){A_(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var vue=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,mue=`precision mediump float; + +varying vec2 vTextureCoord; + +uniform sampler2D uSampler; + +void main(void) +{ + float lum = length(texture2D(uSampler, vTextureCoord.xy).rgb); + + gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0); + + if (lum < 1.00) + { + if (mod(gl_FragCoord.x + gl_FragCoord.y, 10.0) == 0.0) + { + gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0); + } + } + + if (lum < 0.75) + { + if (mod(gl_FragCoord.x - gl_FragCoord.y, 10.0) == 0.0) + { + gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0); + } + } + + if (lum < 0.50) + { + if (mod(gl_FragCoord.x + gl_FragCoord.y - 5.0, 10.0) == 0.0) + { + gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0); + } + } + + if (lum < 0.3) + { + if (mod(gl_FragCoord.x - gl_FragCoord.y - 5.0, 10.0) == 0.0) + { + gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0); + } + } +} +`;(function(e){pue(t,e);function t(){return e.call(this,vue,mue)||this}return t})(ge);/*! + * @pixi/filter-crt - v4.2.0 + * Compiled Fri, 05 Aug 2022 19:53:35 UTC + * + * @pixi/filter-crt is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + *//*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var P_=function(e,t){return P_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},P_(e,t)};function gue(e,t){P_(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var yue=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,_ue=`varying vec2 vTextureCoord; +uniform sampler2D uSampler; + +uniform vec4 filterArea; +uniform vec2 dimensions; + +const float SQRT_2 = 1.414213; + +const float light = 1.0; + +uniform float curvature; +uniform float lineWidth; +uniform float lineContrast; +uniform bool verticalLine; +uniform float noise; +uniform float noiseSize; + +uniform float vignetting; +uniform float vignettingAlpha; +uniform float vignettingBlur; + +uniform float seed; +uniform float time; + +float rand(vec2 co) { + return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453); +} + +void main(void) +{ + vec2 pixelCoord = vTextureCoord.xy * filterArea.xy; + vec2 dir = vec2(vTextureCoord.xy * filterArea.xy / dimensions - vec2(0.5, 0.5)); + + gl_FragColor = texture2D(uSampler, vTextureCoord); + vec3 rgb = gl_FragColor.rgb; + + if (noise > 0.0 && noiseSize > 0.0) + { + pixelCoord.x = floor(pixelCoord.x / noiseSize); + pixelCoord.y = floor(pixelCoord.y / noiseSize); + float _noise = rand(pixelCoord * noiseSize * seed) - 0.5; + rgb += _noise * noise; + } + + if (lineWidth > 0.0) + { + float _c = curvature > 0. ? curvature : 1.; + float k = curvature > 0. ?(length(dir * dir) * 0.25 * _c * _c + 0.935 * _c) : 1.; + vec2 uv = dir * k; + + float v = (verticalLine ? uv.x * dimensions.x : uv.y * dimensions.y) * min(1.0, 2.0 / lineWidth ) / _c; + float j = 1. + cos(v * 1.2 - time) * 0.5 * lineContrast; + rgb *= j; + float segment = verticalLine ? mod((dir.x + .5) * dimensions.x, 4.) : mod((dir.y + .5) * dimensions.y, 4.); + rgb *= 0.99 + ceil(segment) * 0.015; + } + + if (vignetting > 0.0) + { + float outter = SQRT_2 - vignetting * SQRT_2; + float darker = clamp((outter - length(dir) * SQRT_2) / ( 0.00001 + vignettingBlur * SQRT_2), 0.0, 1.0); + rgb *= darker + (1.0 - darker) * (1.0 - vignettingAlpha); + } + + gl_FragColor.rgb = rgb; +} +`;(function(e){gue(t,e);function t(r){var n=e.call(this,yue,_ue)||this;return n.time=0,n.seed=0,n.uniforms.dimensions=new Float32Array(2),Object.assign(n,t.defaults,r),n}return t.prototype.apply=function(r,n,i,o){var a=n.filterFrame,s=a.width,u=a.height;this.uniforms.dimensions[0]=s,this.uniforms.dimensions[1]=u,this.uniforms.seed=this.seed,this.uniforms.time=this.time,r.applyFilter(this,n,i,o)},Object.defineProperty(t.prototype,"curvature",{get:function(){return this.uniforms.curvature},set:function(r){this.uniforms.curvature=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lineWidth",{get:function(){return this.uniforms.lineWidth},set:function(r){this.uniforms.lineWidth=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lineContrast",{get:function(){return this.uniforms.lineContrast},set:function(r){this.uniforms.lineContrast=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"verticalLine",{get:function(){return this.uniforms.verticalLine},set:function(r){this.uniforms.verticalLine=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"noise",{get:function(){return this.uniforms.noise},set:function(r){this.uniforms.noise=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"noiseSize",{get:function(){return this.uniforms.noiseSize},set:function(r){this.uniforms.noiseSize=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignetting",{get:function(){return this.uniforms.vignetting},set:function(r){this.uniforms.vignetting=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignettingAlpha",{get:function(){return this.uniforms.vignettingAlpha},set:function(r){this.uniforms.vignettingAlpha=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignettingBlur",{get:function(){return this.uniforms.vignettingBlur},set:function(r){this.uniforms.vignettingBlur=r},enumerable:!1,configurable:!0}),t.defaults={curvature:1,lineWidth:1,lineContrast:.25,verticalLine:!1,noise:0,noiseSize:1,seed:0,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3,time:0},t})(ge);/*! + * @pixi/filter-drop-shadow - v4.2.0 + * Compiled Fri, 05 Aug 2022 19:53:35 UTC + * + * @pixi/filter-drop-shadow is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + *//*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var R_=function(e,t){return R_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},R_(e,t)};function xue(e,t){R_(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Fh=function(){return Fh=Object.assign||function(t){for(var r=arguments,n,i=1,o=arguments.length;i>0)+1},Object.defineProperty(t.prototype,"offset",{get:function(){return this.uniforms.uOffset},set:function(r){this.uniforms.uOffset=r},enumerable:!1,configurable:!0}),t})(ge);/*! + * @pixi/filter-multi-color-replace - v4.2.0 + * Compiled Fri, 05 Aug 2022 19:53:35 UTC + * + * @pixi/filter-multi-color-replace is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + *//*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var L_=function(e,t){return L_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},L_(e,t)};function kue(e,t){L_(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Nue=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,Lue=`varying vec2 vTextureCoord; +uniform sampler2D uSampler; + +uniform float epsilon; + +const int MAX_COLORS = %maxColors%; + +uniform vec3 originalColors[MAX_COLORS]; +uniform vec3 targetColors[MAX_COLORS]; + +void main(void) +{ + gl_FragColor = texture2D(uSampler, vTextureCoord); + + float alpha = gl_FragColor.a; + if (alpha < 0.0001) + { + return; + } + + vec3 color = gl_FragColor.rgb / alpha; + + for(int i = 0; i < MAX_COLORS; i++) + { + vec3 origColor = originalColors[i]; + if (origColor.r < 0.0) + { + break; + } + vec3 colorDiff = origColor - color; + if (length(colorDiff) < epsilon) + { + vec3 targetColor = targetColors[i]; + gl_FragColor = vec4((targetColor + colorDiff) * alpha, alpha); + return; + } + } +} +`;(function(e){kue(t,e);function t(r,n,i){n===void 0&&(n=.05),i===void 0&&(i=r.length);var o=e.call(this,Nue,Lue.replace(/%maxColors%/g,i.toFixed(0)))||this;return o._replacements=[],o._maxColors=0,o.epsilon=n,o._maxColors=i,o.uniforms.originalColors=new Float32Array(i*3),o.uniforms.targetColors=new Float32Array(i*3),o.replacements=r,o}return Object.defineProperty(t.prototype,"replacements",{get:function(){return this._replacements},set:function(r){var n=this.uniforms.originalColors,i=this.uniforms.targetColors,o=r.length;if(o>this._maxColors)throw new Error("Length of replacements ("+o+") exceeds the maximum colors length ("+this._maxColors+")");n[o*3]=-1;for(var a=0;a= 0.0 && dist > radius) { + float delta = dist - radius; + float gap = gradient; + float scale = 1.0 - abs(delta / gap); + if (scale <= 0.0) { + gl_FragColor = color; + return; + } + radianStep *= scale; + } + radianStep /= float(k); + + float s = sin(radianStep); + float c = cos(radianStep); + mat2 rotationMatrix = mat2(vec2(c, -s), vec2(s, c)); + + for(int i = 0; i < MAX_KERNEL_SIZE - 1; i++) { + if (i == k) { + break; + } + + coord -= center; + coord.y *= aspect; + coord = rotationMatrix * coord; + coord.y /= aspect; + coord += center; + + vec4 sample = texture2D(uSampler, coord); + + // switch to pre-multiplied alpha to correctly blur transparent images + // sample.rgb *= sample.a; + + color += sample; + } + + gl_FragColor = color / float(uKernelSize); +} +`;(function(e){Uue(t,e);function t(r,n,i,o){r===void 0&&(r=0),n===void 0&&(n=[0,0]),i===void 0&&(i=5),o===void 0&&(o=-1);var a=e.call(this,Gue,zue)||this;return a._angle=0,a.angle=r,a.center=n,a.kernelSize=i,a.radius=o,a}return t.prototype.apply=function(r,n,i,o){this.uniforms.uKernelSize=this._angle!==0?this.kernelSize:0,r.applyFilter(this,n,i,o)},Object.defineProperty(t.prototype,"angle",{get:function(){return this._angle},set:function(r){this._angle=r,this.uniforms.uRadian=r*Math.PI/180},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"center",{get:function(){return this.uniforms.uCenter},set:function(r){this.uniforms.uCenter=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"radius",{get:function(){return this.uniforms.uRadius},set:function(r){(r<0||r===1/0)&&(r=-1),this.uniforms.uRadius=r},enumerable:!1,configurable:!0}),t})(ge);/*! + * @pixi/filter-shockwave - v4.2.0 + * Compiled Fri, 05 Aug 2022 19:53:35 UTC + * + * @pixi/filter-shockwave is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + *//*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var B_=function(e,t){return B_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},B_(e,t)};function Hue(e,t){B_(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Vue=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,Wue=`varying vec2 vTextureCoord; +uniform sampler2D uSampler; +uniform vec4 filterArea; +uniform vec4 filterClamp; + +uniform vec2 center; + +uniform float amplitude; +uniform float wavelength; +// uniform float power; +uniform float brightness; +uniform float speed; +uniform float radius; + +uniform float time; + +const float PI = 3.14159; + +void main() +{ + float halfWavelength = wavelength * 0.5 / filterArea.x; + float maxRadius = radius / filterArea.x; + float currentRadius = time * speed / filterArea.x; + + float fade = 1.0; + + if (maxRadius > 0.0) { + if (currentRadius > maxRadius) { + gl_FragColor = texture2D(uSampler, vTextureCoord); + return; + } + fade = 1.0 - pow(currentRadius / maxRadius, 2.0); + } + + vec2 dir = vec2(vTextureCoord - center / filterArea.xy); + dir.y *= filterArea.y / filterArea.x; + float dist = length(dir); + + if (dist <= 0.0 || dist < currentRadius - halfWavelength || dist > currentRadius + halfWavelength) { + gl_FragColor = texture2D(uSampler, vTextureCoord); + return; + } + + vec2 diffUV = normalize(dir); + + float diff = (dist - currentRadius) / halfWavelength; + + float p = 1.0 - pow(abs(diff), 2.0); + + // float powDiff = diff * pow(p, 2.0) * ( amplitude * fade ); + float powDiff = 1.25 * sin(diff * PI) * p * ( amplitude * fade ); + + vec2 offset = diffUV * powDiff / filterArea.xy; + + // Do clamp : + vec2 coord = vTextureCoord + offset; + vec2 clampedCoord = clamp(coord, filterClamp.xy, filterClamp.zw); + vec4 color = texture2D(uSampler, clampedCoord); + if (coord != clampedCoord) { + color *= max(0.0, 1.0 - length(coord - clampedCoord)); + } + + // No clamp : + // gl_FragColor = texture2D(uSampler, vTextureCoord + offset); + + color.rgb *= 1.0 + (brightness - 1.0) * p * fade; + + gl_FragColor = color; +} +`,que=function(e){Hue(t,e);function t(r,n,i){r===void 0&&(r=[0,0]),i===void 0&&(i=0);var o=e.call(this,Vue,Wue)||this;return o.center=r,Object.assign(o,t.defaults,n),o.time=i,o}return t.prototype.apply=function(r,n,i,o){this.uniforms.time=this.time,r.applyFilter(this,n,i,o)},Object.defineProperty(t.prototype,"center",{get:function(){return this.uniforms.center},set:function(r){this.uniforms.center=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"amplitude",{get:function(){return this.uniforms.amplitude},set:function(r){this.uniforms.amplitude=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wavelength",{get:function(){return this.uniforms.wavelength},set:function(r){this.uniforms.wavelength=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"brightness",{get:function(){return this.uniforms.brightness},set:function(r){this.uniforms.brightness=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"speed",{get:function(){return this.uniforms.speed},set:function(r){this.uniforms.speed=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"radius",{get:function(){return this.uniforms.radius},set:function(r){this.uniforms.radius=r},enumerable:!1,configurable:!0}),t.defaults={amplitude:30,wavelength:160,brightness:1,speed:500,radius:-1},t}(ge);/*! + * @pixi/filter-simple-lightmap - v4.2.0 + * Compiled Fri, 05 Aug 2022 19:53:35 UTC + * + * @pixi/filter-simple-lightmap is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + *//*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var j_=function(e,t){return j_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},j_(e,t)};function Xue(e,t){j_(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Yue=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,Kue=`varying vec2 vTextureCoord; +uniform sampler2D uSampler; +uniform sampler2D uLightmap; +uniform vec4 filterArea; +uniform vec2 dimensions; +uniform vec4 ambientColor; +void main() { + vec4 diffuseColor = texture2D(uSampler, vTextureCoord); + vec2 lightCoord = (vTextureCoord * filterArea.xy) / dimensions; + vec4 light = texture2D(uLightmap, lightCoord); + vec3 ambient = ambientColor.rgb * ambientColor.a; + vec3 intensity = ambient + light.rgb; + vec3 finalColor = diffuseColor.rgb * intensity; + gl_FragColor = vec4(finalColor, diffuseColor.a); +} +`;(function(e){Xue(t,e);function t(r,n,i){n===void 0&&(n=0),i===void 0&&(i=1);var o=e.call(this,Yue,Kue)||this;return o._color=0,o.uniforms.dimensions=new Float32Array(2),o.uniforms.ambientColor=new Float32Array([0,0,0,i]),o.texture=r,o.color=n,o}return t.prototype.apply=function(r,n,i,o){var a,s;this.uniforms.dimensions[0]=(a=n.filterFrame)===null||a===void 0?void 0:a.width,this.uniforms.dimensions[1]=(s=n.filterFrame)===null||s===void 0?void 0:s.height,r.applyFilter(this,n,i,o)},Object.defineProperty(t.prototype,"texture",{get:function(){return this.uniforms.uLightmap},set:function(r){this.uniforms.uLightmap=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){return this._color},set:function(r){var n=this.uniforms.ambientColor;typeof r=="number"?(Xt(r,n),this._color=r):(n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],this._color=ln(n))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"alpha",{get:function(){return this.uniforms.ambientColor[3]},set:function(r){this.uniforms.ambientColor[3]=r},enumerable:!1,configurable:!0}),t})(ge);/*! + * @pixi/filter-tilt-shift - v4.2.0 + * Compiled Fri, 05 Aug 2022 19:53:35 UTC + * + * @pixi/filter-tilt-shift is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + *//*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var $_=function(e,t){return $_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},$_(e,t)};function qd(e,t){$_(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Zue=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,Que=`varying vec2 vTextureCoord; + +uniform sampler2D uSampler; +uniform float blur; +uniform float gradientBlur; +uniform vec2 start; +uniform vec2 end; +uniform vec2 delta; +uniform vec2 texSize; + +float random(vec3 scale, float seed) +{ + return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed); +} + +void main(void) +{ + vec4 color = vec4(0.0); + float total = 0.0; + + float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0); + vec2 normal = normalize(vec2(start.y - end.y, end.x - start.x)); + float radius = smoothstep(0.0, 1.0, abs(dot(vTextureCoord * texSize - start, normal)) / gradientBlur) * blur; + + for (float t = -30.0; t <= 30.0; t++) + { + float percent = (t + offset - 0.5) / 30.0; + float weight = 1.0 - abs(percent); + vec4 sample = texture2D(uSampler, vTextureCoord + delta / texSize * percent * radius); + sample.rgb *= sample.a; + color += sample * weight; + total += weight; + } + + color /= total; + color.rgb /= color.a + 0.00001; + + gl_FragColor = color; +} +`,aN=function(e){qd(t,e);function t(r,n,i,o){r===void 0&&(r=100),n===void 0&&(n=600);var a=e.call(this,Zue,Que)||this;return a.uniforms.blur=r,a.uniforms.gradientBlur=n,a.uniforms.start=i||new Oe(0,window.innerHeight/2),a.uniforms.end=o||new Oe(600,window.innerHeight/2),a.uniforms.delta=new Oe(30,30),a.uniforms.texSize=new Oe(window.innerWidth,window.innerHeight),a.updateDelta(),a}return t.prototype.updateDelta=function(){this.uniforms.delta.x=0,this.uniforms.delta.y=0},Object.defineProperty(t.prototype,"blur",{get:function(){return this.uniforms.blur},set:function(r){this.uniforms.blur=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"gradientBlur",{get:function(){return this.uniforms.gradientBlur},set:function(r){this.uniforms.gradientBlur=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"start",{get:function(){return this.uniforms.start},set:function(r){this.uniforms.start=r,this.updateDelta()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"end",{get:function(){return this.uniforms.end},set:function(r){this.uniforms.end=r,this.updateDelta()},enumerable:!1,configurable:!0}),t}(ge),Jue=function(e){qd(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.updateDelta=function(){var r=this.uniforms.end.x-this.uniforms.start.x,n=this.uniforms.end.y-this.uniforms.start.y,i=Math.sqrt(r*r+n*n);this.uniforms.delta.x=r/i,this.uniforms.delta.y=n/i},t}(aN),ele=function(e){qd(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.updateDelta=function(){var r=this.uniforms.end.x-this.uniforms.start.x,n=this.uniforms.end.y-this.uniforms.start.y,i=Math.sqrt(r*r+n*n);this.uniforms.delta.x=-n/i,this.uniforms.delta.y=r/i},t}(aN);(function(e){qd(t,e);function t(r,n,i,o){r===void 0&&(r=100),n===void 0&&(n=600);var a=e.call(this)||this;return a.tiltShiftXFilter=new Jue(r,n,i,o),a.tiltShiftYFilter=new ele(r,n,i,o),a}return t.prototype.apply=function(r,n,i,o){var a=r.getFilterTexture();this.tiltShiftXFilter.apply(r,n,a,1),this.tiltShiftYFilter.apply(r,a,i,o),r.returnFilterTexture(a)},Object.defineProperty(t.prototype,"blur",{get:function(){return this.tiltShiftXFilter.blur},set:function(r){this.tiltShiftXFilter.blur=this.tiltShiftYFilter.blur=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"gradientBlur",{get:function(){return this.tiltShiftXFilter.gradientBlur},set:function(r){this.tiltShiftXFilter.gradientBlur=this.tiltShiftYFilter.gradientBlur=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"start",{get:function(){return this.tiltShiftXFilter.start},set:function(r){this.tiltShiftXFilter.start=this.tiltShiftYFilter.start=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"end",{get:function(){return this.tiltShiftXFilter.end},set:function(r){this.tiltShiftXFilter.end=this.tiltShiftYFilter.end=r},enumerable:!1,configurable:!0}),t})(ge);/*! + * @pixi/filter-twist - v4.2.0 + * Compiled Fri, 05 Aug 2022 19:53:35 UTC + * + * @pixi/filter-twist is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + *//*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var U_=function(e,t){return U_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},U_(e,t)};function tle(e,t){U_(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var rle=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,nle=`varying vec2 vTextureCoord; + +uniform sampler2D uSampler; +uniform float radius; +uniform float angle; +uniform vec2 offset; +uniform vec4 filterArea; + +vec2 mapCoord( vec2 coord ) +{ + coord *= filterArea.xy; + coord += filterArea.zw; + + return coord; +} + +vec2 unmapCoord( vec2 coord ) +{ + coord -= filterArea.zw; + coord /= filterArea.xy; + + return coord; +} + +vec2 twist(vec2 coord) +{ + coord -= offset; + + float dist = length(coord); + + if (dist < radius) + { + float ratioDist = (radius - dist) / radius; + float angleMod = ratioDist * ratioDist * angle; + float s = sin(angleMod); + float c = cos(angleMod); + coord = vec2(coord.x * c - coord.y * s, coord.x * s + coord.y * c); + } + + coord += offset; + + return coord; +} + +void main(void) +{ + + vec2 coord = mapCoord(vTextureCoord); + + coord = twist(coord); + + coord = unmapCoord(coord); + + gl_FragColor = texture2D(uSampler, coord ); + +} +`;(function(e){tle(t,e);function t(r){var n=e.call(this,rle,nle)||this;return Object.assign(n,t.defaults,r),n}return Object.defineProperty(t.prototype,"offset",{get:function(){return this.uniforms.offset},set:function(r){this.uniforms.offset=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"radius",{get:function(){return this.uniforms.radius},set:function(r){this.uniforms.radius=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"angle",{get:function(){return this.uniforms.angle},set:function(r){this.uniforms.angle=r},enumerable:!1,configurable:!0}),t.defaults={radius:200,angle:4,padding:20,offset:new Oe},t})(ge);/*! + * @pixi/filter-zoom-blur - v4.2.0 + * Compiled Fri, 05 Aug 2022 19:53:35 UTC + * + * @pixi/filter-zoom-blur is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + *//*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var G_=function(e,t){return G_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},G_(e,t)};function ile(e,t){G_(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function ole(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i= 0.0 && dist > radius) { // radius < 0 means it's infinity + delta = dist - radius; + gap = gradient; + } + + if (delta > 0.0) { + float normalCount = gap / filterArea.x; + delta = (normalCount - delta) / normalCount; + countLimit *= delta; + strength *= delta; + if (countLimit < 1.0) + { + gl_FragColor = texture2D(uSampler, vTextureCoord); + return; + } + } + + // randomize the lookup values to hide the fixed number of samples + float offset = rand(vTextureCoord, 0.0); + + float total = 0.0; + vec4 color = vec4(0.0); + + dir *= strength; + + for (float t = 0.0; t < MAX_KERNEL_SIZE; t++) { + float percent = (t + offset) / MAX_KERNEL_SIZE; + float weight = 4.0 * (percent - percent * percent); + vec2 p = vTextureCoord + dir * percent; + vec4 sample = texture2D(uSampler, p); + + // switch to pre-multiplied alpha to correctly blur transparent images + // sample.rgb *= sample.a; + + color += sample * weight; + total += weight; + + if (t > countLimit){ + break; + } + } + + color /= total; + // switch back from pre-multiplied alpha + // color.rgb /= color.a + 0.00001; + + gl_FragColor = color; +} +`;(function(e){ile(t,e);function t(r){var n=this,i=Object.assign(t.defaults,r),o=i.maxKernelSize,a=ole(i,["maxKernelSize"]);return n=e.call(this,ale,sle.replace("${maxKernelSize}",o.toFixed(1)))||this,Object.assign(n,a),n}return Object.defineProperty(t.prototype,"center",{get:function(){return this.uniforms.uCenter},set:function(r){this.uniforms.uCenter=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"strength",{get:function(){return this.uniforms.uStrength},set:function(r){this.uniforms.uStrength=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"innerRadius",{get:function(){return this.uniforms.uInnerRadius},set:function(r){this.uniforms.uInnerRadius=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"radius",{get:function(){return this.uniforms.uRadius},set:function(r){(r<0||r===1/0)&&(r=-1),this.uniforms.uRadius=r},enumerable:!1,configurable:!0}),t.defaults={strength:.1,center:[0,0],innerRadius:0,radius:-1,maxKernelSize:32},t})(ge);const z_="shockwaveFilter";function ule(e,t){const r=e.containerFilters.get(z_);if(r)return r;if(t){const n=new que([1280,720]);return n.time=0,e.addFilter(n),e.containerFilters.set(z_,n),n}}function lle(e){return e.getOrCreateShockwaveFilter(!1)?e.getOrCreateShockwaveFilter().time:0}function cle(e,t){if(t===0)e.removeFilter(z_);else{const r=e.getOrCreateShockwaveFilter();r&&(r.time=t)}}const H_=0,V_="radiusAlphaFilter";class fle extends ge{constructor(t,r){const n=` +// 半径透明度的fragment shader +precision mediump float; + +uniform sampler2D uSampler; // 输入纹理 +varying vec2 vTextureCoord; // 当前片元的纹理坐标 +uniform vec2 center; // 圆心坐标 +uniform float radius; // 圆的半径 + +void main(void) { + vec4 color = texture2D(uSampler, vTextureCoord); + + // 计算屏幕宽高比 + float aspect = 16.0 / 9.0; + + // 根据宽高比校正纹理坐标 + vec2 aspectCorrectCoord = vTextureCoord; + aspectCorrectCoord.x *= aspect; + + // 计算片元到圆心的距离 + float dist = distance(aspectCorrectCoord, center * vec2(aspect, 1.0)); + + // 使用smoothstep函数计算alpha值,实现边缘羽化效果 + float alpha = smoothstep(radius, radius + 0.05, dist); + + // 输出最终颜色 + gl_FragColor = color * (1.0 - alpha); +} + `;super(null,n),this.uniforms.center=[t.x,t.y],this.uniforms.radius=r}set center(t){this.uniforms.center=[t.x,t.y]}get center(){return new Oe(this.uniforms.center[0],this.uniforms.center[1])}set radius(t){this.uniforms.radius=t}get radius(){return this.uniforms.radius}}function hle(e,t){const r=e.containerFilters.get(V_);if(r)return r;if(t){const n=new fle(new Oe(.5,.5),H_);return n.radius=H_,e.addFilter(n),e.containerFilters.set(V_,n),n}}function dle(e){return e.getOrCreateShockwaveFilter(!1)?e.getOrCreateRadiusAlphaFilter().radius:H_}function ple(e,t){if(t===0)e.removeFilter(V_);else{const r=e.getOrCreateRadiusAlphaFilter();r&&(r.radius=t)}}class Dh extends br{constructor(){super();oe(this,"containerFilters",new Map);oe(this,"baseX",0);oe(this,"baseY",0);oe(this,"alphaFilter",new u_.AlphaFilter(1));this.addFilter(this.alphaFilter)}get alphaFilterVal(){return this.alphaFilter.alpha}set alphaFilterVal(r){this.alphaFilter.alpha=r}addFilter(r){this.filters?this.filters.push(r):this.filters=[r]}removeFilter(r){const n=this.containerFilters.get(r);if(n){const i=((this==null?void 0:this.filters)??[]).findIndex(o=>o===n);this.filters&&(this.filters.splice(i,1),this.containerFilters.delete(r))}}get blur(){return this.getOrCreateBlurFilter().blur}set blur(r){this.getOrCreateBlurFilter().blur=r}get x(){var n;return(((n=super.position)==null?void 0:n.x)??0)-this.baseX}set x(r){super.position&&(super.position.x=r+this.baseX)}get y(){var n;return(((n=super.position)==null?void 0:n.y)??0)-this.baseY}set y(r){super.position&&(super.position.y=r+this.baseY)}setBaseX(r){const n=this.x;this.baseX=r,this.x=n}setBaseY(r){const n=this.y;this.baseY=r,this.y=n}getOrCreateBlurFilter(){const r=this.containerFilters.get("blur");if(r)return r;{const n=new u_.BlurFilter;return n.blur=0,this.addFilter(n),this.containerFilters.set("blur",n),n}}getOrCreateOldFilmFilter(r=!0){const n=this.containerFilters.get("oldFilm");if(n)return n;if(r){const i=new pse;return this.addFilter(i),this.containerFilters.set("oldFilm",i),i}else return null}get oldFilm(){return this.getOrCreateOldFilmFilter(!1)?1:0}set oldFilm(r){r===0?this.removeFilter("oldFilm"):this.getOrCreateOldFilmFilter()}getOrCreateDotFilter(r=!0){const n=this.containerFilters.get("dotFilm");if(n)return n;if(r){const i=new yse;return this.addFilter(i),this.containerFilters.set("dotFilm",i),i}else return null}get dotFilm(){return this.getOrCreateDotFilter(!1)?1:0}set dotFilm(r){r===0?this.removeFilter("dotFilm"):this.getOrCreateDotFilter()}getOrCreateReflectionFilter(r=!0){const n=this.containerFilters.get("reflectionFilm");if(n)return n;if(r){const i=new Sse;return this.addFilter(i),this.containerFilters.set("reflectionFilm",i),i}else return null}get reflectionFilm(){return this.getOrCreateReflectionFilter(!1)?1:0}set reflectionFilm(r){r===0?this.removeFilter("reflectionFilm"):this.getOrCreateReflectionFilter()}getOrCreateGlitchFilter(r=!0){const n=this.containerFilters.get("glitchFilm");if(n)return n;if(r){const i=new Cse;return this.addFilter(i),this.containerFilters.set("glitchFilm",i),i}else return null}get glitchFilm(){return this.getOrCreateGlitchFilter(!1)?1:0}set glitchFilm(r){r===0?this.removeFilter("glitchFilm"):this.getOrCreateGlitchFilter()}getOrCreateRGBSplitFilter(r=!0){const n=this.containerFilters.get("rgbFilm");if(n)return n;if(r){const i=new Rse;return this.addFilter(i),this.containerFilters.set("rgbFilm",i),i}}get rgbFilm(){return this.getOrCreateRGBSplitFilter(!1)?1:0}set rgbFilm(r){r===0?this.removeFilter("rgbFilm"):this.getOrCreateRGBSplitFilter()}getOrCreateGodrayFilter(r=!0){const n=this.containerFilters.get("godrayFilm");if(n)return n;if(r){const i=new Mse;return this.addFilter(i),this.containerFilters.set("godrayFilm",i),i}}get godrayFilm(){return this.getOrCreateGodrayFilter(!1)?1:0}set godrayFilm(r){r===0?this.removeFilter("godrayFilm"):this.getOrCreateGodrayFilter()}getOrCreateShockwaveFilter(r=!0){return ule(this,r)}get shockwaveFilter(){return lle(this)}set shockwaveFilter(r){cle(this,r)}getOrCreateRadiusAlphaFilter(r=!0){return hle(this,r)}get radiusAlphaFilter(){return dle(this)}set radiusAlphaFilter(r){ple(this,r)}}const Bh={height:1440,width:2560};let vle=null,sN;async function uN(){return vle}async function mle(e,t,r="center"){const n=`spine-${t}`,i=await uN(),o=new Dh;this.figureObjects.findIndex(f=>f.key===e)>=0&&this.removeStageObjectByKey(e);const u=this.getFigureMetadataByKey(e);u&&u.zIndex&&(o.zIndex=u.zIndex),this.figureContainer.addChild(o);const l=ja();this.figureObjects.push({uuid:l,key:e,pixiContainer:o,sourceUrl:t,sourceType:"spine",sourceExt:this.getExtName(t)});const c=async()=>{if(!i){te.warn(`Spine module not loaded. Skipping Spine figure: ${e}`);return}};this.cacheGC(),sN.add(n,t).load(c)}async function gle(e,t){const r=`spine-${t}`,n=new Dh;this.backgroundObjects.findIndex(u=>u.key===e)>=0&&this.removeStageObjectByKey(e),this.backgroundContainer.addChild(n);const a=ja();this.backgroundObjects.push({uuid:a,key:e,pixiContainer:n,sourceUrl:t,sourceType:"spine",sourceExt:this.getExtName(t)});const s=async()=>{if(!await uN()){te.warn(`Spine module not loaded. Skipping Spine background: ${e}`);return}setTimeout(()=>{},0)};this.cacheGC(),sN.add(r,t).load(s)}window.PIXI=Hae;class Xn{constructor(){oe(this,"currentApp",null);oe(this,"effectsContainer");oe(this,"frameDuration",16.67);oe(this,"notUpdateBacklogEffects",!1);oe(this,"figureContainer");oe(this,"figureObjects",[]);oe(this,"stageWidth",Bh.width);oe(this,"stageHeight",Bh.height);oe(this,"assetLoader",new gs);oe(this,"backgroundContainer");oe(this,"backgroundObjects",[]);oe(this,"addSpineFigure",mle.bind(this));oe(this,"addSpineBg",gle.bind(this));oe(this,"stageAnimations",[]);oe(this,"loadQueue",[]);oe(this,"live2dFigureRecorder",[]);oe(this,"lockTransformTarget",[]);oe(this,"MAX_TEX_COUNT",10);const t=new jb({backgroundAlpha:0,preserveDrawingBuffer:!0});window.PIXIapp=this,window.__PIXI_APP__=t;const r=document.getElementById("pixiContianer");r&&(r.innerHTML="",r.appendChild(t.view)),t.renderer.view.style.position="absolute",t.renderer.view.style.display="block",t.renderer.view.id="pixiCanvas",t.renderer.autoResize=!0;const n=document.getElementById("root");n&&t.renderer.resize(n.clientWidth,n.clientHeight),Hb&&(t.renderer.view.style.zIndex="-5"),t.stage.sortableChildren=!0,this.effectsContainer=new br,this.effectsContainer.zIndex=3,this.figureContainer=new br,this.figureContainer.sortableChildren=!0,this.figureContainer.zIndex=2,this.backgroundContainer=new br,this.backgroundContainer.zIndex=0,t.stage.addChild(this.effectsContainer,this.figureContainer,this.backgroundContainer),this.currentApp=t;const i=()=>{this.updateFps(),setTimeout(i,1e4)};i();const o=()=>{setTimeout(o,500),this.callLoader()};o()}static assignTransform(t,r){if(!r)return;const n=t.scale,i=t.position;t.scale&&Object.assign(n,r.scale),t.position&&Object.assign(i,r.position),Object.assign(t,r),t.scale=n,t.position=i}getFigureObjects(){return this.figureObjects}getAllLockedObject(){return this.lockTransformTarget}registerAnimation(t,r,n="default"){var i;t&&(this.stageAnimations.push({uuid:ja(),animationObject:t,key:r,targetKey:n,type:"common"}),this.lockStageObject(n),t.setStartState(),(i=this.currentApp)==null||i.ticker.add(t.tickerFunc))}registerPresetAnimation(t,r,n="default",i){var a;if(!t)return;const o=i.find(s=>s.target===n);if(o){const s=this.getStageObjByKey(n);if(s){const u=s.pixiContainer;Xn.assignTransform(u,o.transform)}return}this.stageAnimations.push({uuid:ja(),animationObject:t,key:r,targetKey:n,type:"preset"}),this.lockStageObject(n),t.setStartState(),(a=this.currentApp)==null||a.ticker.add(t.tickerFunc)}stopPresetAnimationOnTarget(t){const r=this.stageAnimations.find(n=>n.targetKey===t&&n.type==="preset");r&&this.removeAnimation(r.key)}removeAnimation(t){var n;const r=this.stageAnimations.findIndex(i=>i.key===t);if(r>=0){const i=this.stageAnimations[r];(n=this.currentApp)==null||n.ticker.remove(i.animationObject.tickerFunc),i.animationObject.setEndState(),this.unlockStageObject(i.targetKey??"default"),this.stageAnimations.splice(r,1)}}removeAnimationWithSetEffects(t){var n,i,o;const r=this.stageAnimations.findIndex(a=>a.key===t);if(r>=0){const a=this.stageAnimations[r];(n=this.currentApp)==null||n.ticker.remove(a.animationObject.tickerFunc),a.animationObject.setEndState();const s=((o=(i=a.animationObject).getEndFilterEffect)==null?void 0:o.call(i))??{};if(this.unlockStageObject(a.targetKey??"default"),a.targetKey){const u=this.getStageObjByKey(a.targetKey);if(u){const l={alpha:u.pixiContainer.alphaFilterVal,scale:{x:u.pixiContainer.scale.x,y:u.pixiContainer.scale.y},position:{x:u.pixiContainer.x,y:u.pixiContainer.y},rotation:u.pixiContainer.rotation,blur:u.pixiContainer.blur,...s};let c={target:a.targetKey,transform:l};D.dispatch(Mt.updateEffect(c))}}this.stageAnimations.splice(r,1)}}performMouthSyncAnimation(t,r,n,i){var s;const o=(s=this.getStageObjByKey(t))==null?void 0:s.pixiContainer;if(!o)return;const a={open:r.mouthAnimation.open,half_open:r.mouthAnimation.halfOpen,closed:r.mouthAnimation.close};this.loadAsset(a[n],()=>{var c;const u=this.assetLoader.resources[a[n]].texture,l=(c=o==null?void 0:o.children)==null?void 0:c[0];!u||!l||(l.texture=u)})}performBlinkAnimation(t,r,n,i){var s;const o=(s=this.getStageObjByKey(t))==null?void 0:s.pixiContainer;if(!o)return;const a={open:r.blinkAnimation.open,closed:r.blinkAnimation.close};this.loadAsset(a[n],()=>{var c;const u=this.assetLoader.resources[a[n]].texture,l=(c=o==null?void 0:o.children)==null?void 0:c[0];!u||!l||(l.texture=u)})}addBg(t,r){var l,c;const n=this.assetLoader,i=new Dh;this.backgroundObjects.findIndex(f=>f.key===t)>=0&&this.removeStageObjectByKey(t),this.backgroundContainer.addChild(i);const s=ja();this.backgroundObjects.push({uuid:s,key:t,pixiContainer:i,sourceUrl:r,sourceType:"img",sourceExt:this.getExtName(r)});const u=()=>{setTimeout(()=>{var h,d;const f=(d=(h=n.resources)==null?void 0:h[r])==null?void 0:d.texture;if(f&&this.getStageObjByUuid(s)){const v=f.width,g=f.height,p=this.stageWidth/v,m=this.stageHeight/g,y=Math.max(p,m),_=new co(f);_.scale.x=y,_.scale.y=y,_.anchor.set(.5),_.position.y=this.stageHeight/2,i.setBaseX(this.stageWidth/2),i.setBaseY(this.stageHeight/2),i.pivot.set(0,this.stageHeight/2),i.addChild(_)}},0)};this.cacheGC(),(c=(l=n.resources)==null?void 0:l[r])!=null&&c.texture?u():this.loadAsset(r,u)}addFigure(t,r,n="center"){var f,h;const i=this.assetLoader,o=new Dh;this.figureObjects.findIndex(d=>d.key===t)>=0&&this.removeStageObjectByKey(t);const u=this.getFigureMetadataByKey(t);u&&u.zIndex&&(o.zIndex=u.zIndex),this.figureContainer.addChild(o);const l=ja();this.figureObjects.push({uuid:l,key:t,pixiContainer:o,sourceUrl:r,sourceType:"img",sourceExt:this.getExtName(r)});const c=()=>{setTimeout(()=>{var v,g;const d=(g=(v=i.resources)==null?void 0:v[r])==null?void 0:g.texture;if(d&&this.getStageObjByUuid(l)){const p=d.width,m=d.height,y=this.stageWidth/p,_=this.stageHeight/m,x=Math.min(y,_),S=new co(d);S.scale.x=x,S.scale.y=x,S.anchor.set(.5),S.position.y=this.stageHeight/2;const w=p*x,E=m*x;o.setBaseY(this.stageHeight/2),Es.key===t);if((n==null?void 0:n.sourceType)!=="live2d")return;const i=this.live2dFigureRecorder.find(s=>s.target===t);if(n&&(i==null?void 0:i.motion)!==r){const u=n.pixiContainer.children;for(const l of u){let c=r,f=0,h=3;const d=(l==null?void 0:l.internalModel)??void 0;(a=(o=d==null?void 0:d.motionManager)==null?void 0:o.stopAllMotions)==null||a.call(o),l.motion(c,f,h)}this.updateL2dMotionByKey(t,r)}}changeModelExpressionByKey(t,r){const n=this.figureObjects.find(o=>o.key===t);if((n==null?void 0:n.sourceType)!=="live2d")return;const i=this.live2dFigureRecorder.find(o=>o.target===t);if(n&&(i==null?void 0:i.expression)!==r){const a=n.pixiContainer.children;for(const s of a)s.expression(r);this.updateL2dExpressionByKey(t,r)}}setModelMouthY(t,r){var a,s,u,l,c,f,h,d,v;function n(g){return g<50?0:(g-50)/50}const i=n(r),o=this.figureObjects.find(g=>g.key===t);if(o&&o.sourceType==="live2d"){const p=o.pixiContainer.children;for(const m of p)m!=null&&m.internalModel&&((s=(a=m==null?void 0:m.internalModel)==null?void 0:a.coreModel)!=null&&s.setParamFloat&&((c=(l=(u=m==null?void 0:m.internalModel)==null?void 0:u.coreModel)==null?void 0:l.setParamFloat)==null||c.call(l,"PARAM_MOUTH_OPEN_Y",i)),(h=(f=m==null?void 0:m.internalModel)==null?void 0:f.coreModel)!=null&&h.setParameterValueById&&((v=(d=m==null?void 0:m.internalModel)==null?void 0:d.coreModel)==null||v.setParameterValueById("ParamMouthOpenY",i)))}}getStageObjByKey(t){return[...this.figureObjects,...this.backgroundObjects].find(r=>r.key===t)}getStageObjByUuid(t){return[...this.figureObjects,...this.backgroundObjects].find(r=>r.uuid===t)}getAllStageObj(){return[...this.figureObjects,...this.backgroundObjects]}removeStageObjectByKey(t){const r=this.figureObjects.findIndex(i=>i.key===t),n=this.backgroundObjects.findIndex(i=>i.key===t);if(r>=0){const i=this.figureObjects[r];for(const o of i.pixiContainer.children)o.destroy();i.pixiContainer.destroy(),this.figureContainer.removeChild(i.pixiContainer),this.figureObjects.splice(r,1)}if(n>=0){const i=this.backgroundObjects[n];for(const o of i.pixiContainer.children)o.destroy();i.pixiContainer.destroy(),this.backgroundContainer.removeChild(i.pixiContainer),this.backgroundObjects.splice(n,1)}}cacheGC(){_I()}getExtName(t){return t.split(".").pop()??"png"}getFigureMetadataByKey(t){return console.log(t,D.getState().stage.figureMetaData),D.getState().stage.figureMetaData[t]}loadAsset(t,r,n){this.loadQueue.unshift({url:t,callback:r,name:n}),this.callLoader()}updateL2dMotionByKey(t,r){const n=this.live2dFigureRecorder.findIndex(i=>i.target===t);n>=0?this.live2dFigureRecorder[n].motion=r:this.live2dFigureRecorder.push({target:t,motion:r,expression:""})}updateL2dExpressionByKey(t,r){const n=this.live2dFigureRecorder.findIndex(i=>i.target===t);n>=0?this.live2dFigureRecorder[n].expression=r:this.live2dFigureRecorder.push({target:t,motion:"",expression:r})}callLoader(){if(!this.assetLoader.loading){const t=this.loadQueue.shift();if(t)try{this.assetLoader.resources[t.url]?(t.callback(),this.callLoader()):t.name?this.assetLoader.add(t.name,t.url).load(()=>{t.callback(),this.callLoader()}):this.assetLoader.add(t.url).load(()=>{t.callback(),this.callLoader()})}catch(r){te.fatal("PIXI Loader 故障",r),t.callback(),this.callLoader()}}}updateFps(){Fm==null||Fm(120).then(t=>{this.frameDuration=1e3/t})}lockStageObject(t){this.lockTransformTarget.push(t)}unlockStageObject(t){const r=this.lockTransformTarget.findIndex(n=>n===t);r>=0&&this.lockTransformTarget.splice(r,1)}}const Fm=(()=>{const e=[window.requestAnimationFrame,window.webkitRequestAnimationFrame,window.mozRequestAnimationFrame].find(t=>t);if(!e){console.error("requestAnimationFrame is not supported!");return}return(t=60)=>{if(t<1)throw new Error("targetCount cannot be less than 1.");const r=Date.now();let n=0;return new Promise(i=>{(function o(){e(()=>{if(++n>=t){const a=Date.now()-r,s=n/a*1e3;return i(s)}o()})})()})}})();function lN(e,t,r){for(const m of e)m.alphaFilterVal=m.alpha,m.alpha=1;const n=C.gameplay.pixiStage.getStageObjByKey(t);let i=0;const o=[],a=[];for(const m of e){const y=m.duration;i+=y;const{position:_,scale:x,...S}=m;o.push({x:_.x,y:_.y,scaleX:x.x,scaleY:x.y,...S}),r!==0?a.push(i/r):a.push(0)}const s=n==null?void 0:n.pixiContainer;let u=null;r>0&&(u=OX({to:o,offset:a,duration:r,onUpdate:m=>{if(s){const{scaleX:y,scaleY:_,...x}=m;Xn.assignTransform(s,Kv(x,ai)),ai(y)||(s.scale.x=y),ai(_)||(s.scale.y=_)}}}));const{duration:l,...c}=g();D.dispatch(Mt.updateEffect({target:t,transform:c}));function f(){if(n!=null&&n.pixiContainer){const{position:m,scale:y,..._}=v(),x=Kv({x:m.x,y:m.y,..._},ai);Xn.assignTransform(n==null?void 0:n.pixiContainer,x),n!=null&&n.pixiContainer&&(ai(y.x)||(n.pixiContainer.scale.x=y.x),ai(y==null?void 0:y.y)||(n.pixiContainer.scale.y=y.y))}}function h(){if(u&&u.stop(),u=null,n!=null&&n.pixiContainer){const{position:m,scale:y,..._}=g(),x=Kv({x:m.x,y:m.y,..._},ai);Xn.assignTransform(n==null?void 0:n.pixiContainer,x),n!=null&&n.pixiContainer&&(ai(y.x)||(n.pixiContainer.scale.x=y.x),ai(y==null?void 0:y.y)||(n.pixiContainer.scale.y=y.y))}}function d(m){}function v(){return e[0]}function g(){return e[e.length-1]}function p(){const m=e[e.length-1],{alpha:y,rotation:_,blur:x,duration:S,scale:w,position:E,...R}=m;return R}return{setStartState:f,setEndState:h,tickerFunc:d,getEndFilterEffect:p}}function jh(e,t,r){const n=C.animationManager.getAnimations().find(i=>i.name===e);if(n){const i=n.effects.map(o=>{const a=D.getState().stage.effects.find(u=>u.target===t),s=bt({...(a==null?void 0:a.transform)??Mx,duration:0});return Xn.assignTransform(s,o),s.duration=o.duration,s});return te.debug("装载自定义动画",i),lN(i,t,r)}return null}function Ir(e){const t=C.animationManager.getAnimations().find(r=>r.name===e);if(t){let r=0;return t.effects.forEach(n=>{r+=n.duration}),r}return 0}function Li(e,t,r=!1,n){if(t==="enter"){let i=500;r&&(i=1500);let o=aR(n??e,i);const a=C.animationManager.nextEnterAnimationName.get(e);return a&&(te.debug("取代默认进入动画",e),o=jh(a,n??e,Ir(a)),i=Ir(a),C.animationManager.nextEnterAnimationName.delete(e)),{duration:i,animation:o}}else{let i=750;r&&(i=1500);let o=sR(n??e,i);const a=C.animationManager.nextExitAnimationName.get(e);return a&&(te.debug("取代默认退出动画",e),o=jh(a,n??e,Ir(a)),i=Ir(a),C.animationManager.nextExitAnimationName.delete(e)),{duration:i,animation:o}}}const yle=e=>{const t=e.content;let r="",n="default";e.args.forEach(l=>{l.key==="unlockname"&&(r=l.value.toString()),l.key==="series"&&(n=l.value.toString())});const i=D.dispatch;r!==""&&i(P2({name:r,url:t,series:n})),i(Mt.removeEffectByTargetId("bg-main"));const o=Pe(e,"transform");let a=Pe(e,"duration");(!a||typeof a!="number")&&(a=1e3);let s;if(o)try{const l=JSON.parse(o.toString());s=Sl("bg-main",l,a),s[0].alpha=0;const c=(Math.random()*10).toString(16),f={name:c,effects:s};C.animationManager.addAnimation(f),a=Ir(c),C.animationManager.nextEnterAnimationName.set("bg-main",c)}catch{u()}else u();function u(){s=Sl("bg-main",{},a),s[0].alpha=0;const c=(Math.random()*10).toString(16),f={name:c,effects:s};C.animationManager.addAnimation(f),a=Ir(c),C.animationManager.nextEnterAnimationName.set("bg-main",c)}return Pe(e,"enter")&&(C.animationManager.nextEnterAnimationName.set("bg-main",Pe(e,"enter").toString()),a=Ir(Pe(e,"enter").toString())),Pe(e,"exit")&&(C.animationManager.nextExitAnimationName.set("bg-main-off",Pe(e,"exit").toString()),a=Ir(Pe(e,"exit").toString())),i(Te({key:"bgName",value:e.content})),{performName:"none",duration:a,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function _le(e){let t="center",r=e.content,n=!1,i="",o="",a="",s=500,u="",l="",c="",f="",h="",d="",v="",g=-1;const p=D.dispatch;for(const E of e.args)switch(E.key){case"left":E.value===!0&&(t="left");break;case"right":E.value===!0&&(t="right");break;case"clear":E.value===!0&&(r="");break;case"id":n=!0,a=E.value.toString();break;case"motion":i=E.value.toString();break;case"bounds":v=String(E.value);break;case"expression":o=E.value.toString();break;case"mouthOpen":u=E.value.toString(),u=$r(u,jr.figure);break;case"mouthClose":l=E.value.toString(),l=$r(l,jr.figure);break;case"mouthHalfOpen":c=E.value.toString(),c=$r(c,jr.figure);break;case"eyesOpen":f=E.value.toString(),f=$r(f,jr.figure);break;case"eyesClose":h=E.value.toString(),h=$r(h,jr.figure);break;case"animationFlag":d=E.value.toString();break;case"none":r="";break;case"zIndex":g=Number(E.value);break}const m=a||`fig-${t}`,_=D.getState().stage.figureAssociatedAnimation.filter(E=>E.targetId!==m),x={targetId:m,animationFlag:d,mouthAnimation:{open:u,close:l,halfOpen:c},blinkAnimation:{open:f,close:h}};_.push(x),p(Te({key:"figureAssociatedAnimation",value:_}));let S=!0;if(a!==""){const E=D.getState().stage.freeFigure.find(R=>R.key===a);E&&E.name===e.content&&(S=!1)}else t==="center"&&D.getState().stage.figName===e.content&&(S=!1),t==="left"&&D.getState().stage.figNameLeft===e.content&&(S=!1),t==="right"&&D.getState().stage.figNameRight===e.content&&(S=!1);if(S){const E=`fig-${t}`,R=`${a}`;D.dispatch(Mt.removeEffectByTargetId(E)),D.dispatch(Mt.removeEffectByTargetId(R)),p(Mt.setFigureMetaData([E,"zIndex",0,!0])),p(Mt.setFigureMetaData([R,"zIndex",0,!0]))}const w=(E,R)=>{const A=Pe(R,"transform"),P=Pe(R,"duration");P&&typeof P=="number"&&(s=P);let F;if(A){console.log(A);try{const U=JSON.parse(A.toString());F=Sl(E,U,s),F[0].alpha=0;const z=(Math.random()*10).toString(16),ie={name:z,effects:F};C.animationManager.addAnimation(ie),s=Ir(z),C.animationManager.nextEnterAnimationName.set(E,z)}catch{B()}}else B();function B(){F=Sl(E,{},s),F[0].alpha=0;const z=(Math.random()*10).toString(16),ie={name:z,effects:F};C.animationManager.addAnimation(ie),s=Ir(z),C.animationManager.nextEnterAnimationName.set(E,z)}const $=Pe(R,"enter"),Y=Pe(R,"exit");$&&(C.animationManager.nextEnterAnimationName.set(E,$.toString()),s=Ir($.toString())),Y&&(C.animationManager.nextExitAnimationName.set(E+"-off",Y.toString()),s=Ir(Y.toString()))};if(n){const E={key:a,name:r,basePosition:t};w(a,e),(i||v)&&p(Mt.setLive2dMotion({target:a,motion:i,overrideBounds:RC(v)})),o&&p(Mt.setLive2dExpression({target:a,expression:o})),g>0&&p(Mt.setFigureMetaData([a,"zIndex",g,!1])),p(Mt.setFreeFigureByKey(E))}else{const E={center:"fig-center",left:"fig-left",right:"fig-right"},R={center:"figName",left:"figNameLeft",right:"figNameRight"};a=E[t],w(a,e),(i||v)&&p(Mt.setLive2dMotion({target:a,motion:i,overrideBounds:RC(v)})),o&&p(Mt.setLive2dExpression({target:a,expression:o})),g>0&&p(Mt.setFigureMetaData([a,"zIndex",g,!1])),p(Te({key:R[t],value:r}))}return{performName:"none",duration:s,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!1,stopTimeout:void 0}}function RC(e){const t=e.split(",").map(n=>Number(n));let r=!0;if(t.forEach(n=>{isNaN(n)&&(r=!1)}),r=r&&t.length===4,r)return t}const cN=(e,t)=>{C.sceneManager.lockSceneWrite||(C.sceneManager.lockSceneWrite=!0,ii(e).then(r=>{C.sceneManager.sceneData.currentScene=On(r,t,e),C.sceneManager.sceneData.currentSentenceId=0;const n=C.sceneManager.sceneData.currentScene.subSceneList;C.sceneManager.settledScenes.push(e);const i=rc(n);nc(i),te.debug("现在切换场景,切换后的结果:",C.sceneManager.sceneData),C.sceneManager.lockSceneWrite=!1,nr()}).catch(r=>{te.error("场景调用错误",r),C.sceneManager.lockSceneWrite=!1}))},xle=e=>{const t=e.content.split("/"),r=t[t.length-1];return cN(e.content,r),{performName:"none",duration:0,isHoldOn:!0,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}},fN=e=>{const t=C.sceneManager.sceneData.currentSentenceId;let r=t;C.sceneManager.sceneData.currentScene.sentenceList.forEach((n,i)=>{n.command===ke.label&&n.content===e&&i!==t&&(r=i)}),C.sceneManager.sceneData.currentSentenceId=r,setTimeout(nr,1)},ble="_Choose_Main_1kza1_1",Sle="_Choose_item_1kza1_13",wle="_Choose_item_disabled_1kza1_34",Ele="_Choose_item_outer_1kza1_50",sf={Choose_Main:ble,Choose_item:Sle,Choose_item_disabled:wle,Choose_item_outer:Ele},Tle=""+new URL("page-flip-1-7df32409.mp3",import.meta.url).href,Cle=""+new URL("switch-1-99b576bc.mp3",import.meta.url).href,hN="data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU3LjE0LjEwMAAAAAAAAAAAAAAA//OAAAAAAAAAAAAAAAAAAAAAAAAASW5mbwAAAA8AAAAHAAAGhgA/Pz8/Pz8/Pz8/Pz8/P19fX19fX19fX19fX19ff39/f39/f39/f39/f3+fn5+fn5+fn5+fn5+fn5+/v7+/v7+/v7+/v7+/v9/f39/f39/f39/f39/f//////////////////8AAAAATGF2YzU3LjE1AAAAAAAAAAAAAAAAJAAAAAAAAAAABoYV32R7AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/zgGQAAAABpAAAAAAAAANIAAAAACADH/+QtN3NAAAKF6IiVEl7hE0Sv/+XsgGgCgQDQFAgGg3D+yBShQzd+K0qXyBQyRQUp3hEkUMGn/8oCBQ5KOIf+sPl3//+Xf/+GP//6w+EgFgk/nOfWhA4Q4ABxjnQhDhCD3pgIQLAARlkyZ8Ew+Ud1AgUOfy7/4OeGOUORPD//wwUd/KHP//+GPykMA445BCHBIYg4ZC4AyGP+PuWtgyRb6quwuJvp+v8wQwDAKoXYMnpC0w6gAc0HLf/84JkuwnkuN6ioaAAD3CpsVVFMAAFQBkWjRnE4hYMOnIaT5sXEGFHCyMLPhfcDTHTUmRcgnQMuCfCKHjcDRlTchxFTcEHsKGiBNQ6mLhLkNImWi8PkY6s3kUWgaJmjd1igSfFzk+gLLIOcMi4gXyupR9A20G/4zAhOJ/PDgGYKI4y4LMEEBYhnUz1lpozrmZk3//lsky4s+TB4ul8ny6YOV0FmRx0ElHlMbNWYOr///1uZFQ3IGRNBRmfWlRUYkeV8mVhC5j/+UOiwF4DdcGgB//zgmTqHCnhQS/NUAGcStp6X4JQAARBgQCDIwGbMjrzxBIRk8s4+IS7mMEYN4elXLheFicbuxm88zzzHaw/G//9DCJ+eYRf8WGFtZp9ydCUvPMKGf/57ZjPRjzHtq+3//+YZ2U8817jxbb1vcn/1yAPkAgGUJuPiliw1FHilYbAAkIkV4CdGauxnChrTd+JTOW4BTlAB55YoeqaxWm7Wv8xLqLOiiZLUixqapJF5JNAcoviEoN2gAwAUcLiN5Mk6i3TRU+ikk++6KKKTqSKyBsx//OCZFMVigU/GuzMAIuQEq5fwxACNMZGRPKvoqXbR0UbJP11I0t9J/SqSrRZ0lXoqetSTnWoto0kl26LJGJqizoJmtJSSNSWk7WdTpXUkiigbVor9K6lpKSrdFNi8gnstA65dQVWxkXlGyTGRiRt9gUkBwgAggllBkQbKigffEMUfzqlL+6Ruli5Bv+4lPf//////X/////o0Wte9XLYBs4JbHGkwql7GrPNPMusqAJDUPzthoURwGi5eZyu+VuecNrURSYBU/p8//81Vf+Znkn/84JkNA4gwTcvDYYmF1lmTbAzByQpycp3ROJPn025p4SQJoSeFQoViUUAoiJFRL3c8JRUNETudLFn0MtLDwrM4lUeOiJtiztbvBk6xyPrctYdEkBpA09q2Xn9/TmkZxYMuXBUW17I4clP/nKrXbW/C6FI5G0z11z31L9fvGqoAzY1X86WwYUHIdWCvLEwkeEq3kQ7iI8MPM/ssO/8OnlHsFW1nWeCvyzwVOtEvHuyqv/8hOYSETL//NtNaySXOSsAqIiRrkS82UvXUvppbobMbv/zgmQhC0HzBAAEwpKVEO4JYAjTIJ/y/0egY3vXWaZv65cpZm36G/mMUpdalcpStzalb1KXUoUBf8pXKyGM5Sv/TRRPKoUSQMYKTJfSwiUDeW+ZhhmIXNYfiyfSbiqFFLNEQaajFVnrO9YLTodKvET9Z0FcSgq6s6eIz3uLcFQmCxJY06W/g0Cri31AqGrq56EgaXxLPCUNdBZ5USrBUse3BqpNF93yP//yMyMDWEJGQ01////MjMv//I1kcjJrLf/stlzL55SkyyOX5q0cjVrL//OCZC4KtfrOGgAjbodYBawMAEQAYf//+Rk1qGRqygo5GRq1sP/sln//cyNWCg0cj//ZZZZKh+asCHP8lAL////9n/////////GMYm3raaWKige/+sW+LesVTEFNRTMuOTkuNaqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqo=",Ole=""+new URL("dialog-d5b91235.mp3",import.meta.url).href,dN="data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjIzLjEwMQAAAAAAAAAAAAAA//OAAAAAAAAAAAAAAAAAAAAAAAAASW5mbwAAAA8AAAAHAAAGhgA/Pz8/Pz8/Pz8/Pz8/P19fX19fX19fX19fX19ff39/f39/f39/f39/f3+fn5+fn5+fn5+fn5+fn5+/v7+/v7+/v7+/v7+/v9/f39/f39/f39/f39/f//////////////////8AAAAATGF2YzU4LjQwAAAAAAAAAAAAAAAAJAL7AAAAAAAABobgvJxkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/zgGQADLH/PRigiACM0AZ+XUAQAoAVYA9AY3IAASAgeRjeQMhP0O/nec/1cn+Qnv/8n+RuhGUhPoQDPISc6HP1Oec7+pwAROeQikI3IT////z+p3Q56VOd/nOc5JzyAAhQAAI053QDFnoQjKACGvoQ7yThzoBgZ8ADMJQURtuNAkMH4P4P+XOZD4f5d/D/64f/3co7/8H8u/wQ5R3/+sPiN8TvB95SDgYT/yjgQf+mpbd5dJrdLkpewIOA5GsDQUQZnZzSB6Q1U50Guqy9OaH/84JkIg/hbXkux6gBEfpLBx+SKAZQvxWLwbxAAoJRbMJjWBoPcgIzjpzzz2clFsxj0ITlVELLXdjzyg8Q3UoM0PPct+QCw/6D5KMrNmLdXOUnPRjXJ3nMYVFVfnfdzf//q//MR+Q/8uwB0uyB/lVHlY6YhEIGR4cHYHAcAZwSQAJAcAocdAxoAMh6L1HV969TxECi7iHlYn7jW//an//+JXU5/9v4l//6EM3f83/41j3///+ozd63/9C2p2W2W22i0Mq2OVytAvxB06nWCVQIZP/zgmQXD4W5ey/HqAEQUkbOR4koAmYRklcoUe+Yd1AuC8AHmsVSoIxFCwPh6RI8ajdB8807yw/JxoLbsai/djzjScCv+Q/lARCSFyRC8hIFYZkF06Dv//MLs5zV+edqzv6krdvP9V/yO3p66H//n73UnMetFzzx4P/MNxBOVut0AFwIAARCgysYSXL+VO2TXhMWBADVCKKhQmjLmX/////0/P+rf7f///29++FO9LfYWYp//Z9n/yHlg30VsPil34MMSQVrYqfLAYVacpCtK1Oq//OCZBUPGaFC3+e0AA8ZVoZdyxAA2az68kOa28sO3puYoqNkUTUxnD6CKnSNlGTJJositaK2TdJSb2NWSX/SSScyDlAnQ6myTv/1X0aJePGZqjnT1FL6v9SRkXW/dVaKP6VaKLOv//+r//X/ZzF06dSFLuv/1B0aZUKwhImgCMAB2aHaUe7x55QPP/rp3zyZZf/VkdS3RFZ3m/9H//iSCn/1Qaev/0CVH3+oO1P///1t+j//9KoPL7QDcAaC4x+83dEEEvXL3vljkRVf5ZqiVpT/84JkGw5BSSx+MMpOEjoual7AxBzqOG5mzBJL6c7URxGtROS/Zu8vMwc2/naKcgTgLi5R79f/ZSUVjWOSaa1aHK5xM/apQnJHJUuTbXQ5VN09HRzSUNfirDtAVBYCwdfpJmYrjDVue/9pJZFMiSvSUMuMAg40uvlBXQECFUh3VKcOGoUBJAurXLsY3+xpv///1aZAwAP///yghpkdW/5qt8OMEMKKg7/pDn///h1/Ues6P/xLEaAkoyibeSeC8E+AuhymiEos8tLHJNRoThxKnP/zgmQcDD0TFAk8xToRuh4sCGgPKooy1Y8s/q2X/ZH//6tqJAEEQwRKxjI9y1KWWqPDw8awiKqQPPob/pRUDwAioCEtX9R7/9eGlncrLPLBVgKmRZ+GpD/tqEogdIXwLlNkUnUxiamSS0W/ooqUlrot//zUCIHRc05Zrqaabod86PDZv/+b/UamAIGjTP+W/879s9liLSrmCVxXgq7xL+RKoQZ+UAAwBYQh4Rig2ZaVmytcNUuiO5/zP8jP1/+VMy/1RygyCgEMDDLv4CCZF3/S//OCZC8JaK7qfiQiTgxILdAAYYYEEhVLrP///S1HoCosaCoCCYZrZUSBkQDwESH/WkJSAZjByJI0oE4Z/////4FCQeBkVZ/xX/zIsRd/6hf7X//4qSfqwEEiLv1ciEyISQKqTEFNRTMuMTAwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqo=";var pN={exports:{}},vN={};/** + * @license React + * use-sync-external-store-shim.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Ss=G;function Ale(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ple=typeof Object.is=="function"?Object.is:Ale,Rle=Ss.useState,Ile=Ss.useEffect,kle=Ss.useLayoutEffect,Nle=Ss.useDebugValue;function Lle(e,t){var r=t(),n=Rle({inst:{value:r,getSnapshot:t}}),i=n[0].inst,o=n[1];return kle(function(){i.value=r,i.getSnapshot=t,Dm(i)&&o({inst:i})},[e,r,t]),Ile(function(){return Dm(i)&&o({inst:i}),e(function(){Dm(i)&&o({inst:i})})},[e]),Nle(r),r}function Dm(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Ple(e,r)}catch{return!0}}function Mle(e,t){return t()}var Fle=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Mle:Lle;vN.useSyncExternalStore=Ss.useSyncExternalStore!==void 0?Ss.useSyncExternalStore:Fle;pN.exports=vN;var Dle=pN.exports,mN={exports:{}},gN={};/** + * @license React + * use-sync-external-store-shim/with-selector.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Xd=G,Ble=Dle;function jle(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var $le=typeof Object.is=="function"?Object.is:jle,Ule=Ble.useSyncExternalStore,Gle=Xd.useRef,zle=Xd.useEffect,Hle=Xd.useMemo,Vle=Xd.useDebugValue;gN.useSyncExternalStoreWithSelector=function(e,t,r,n,i){var o=Gle(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=Hle(function(){function u(d){if(!l){if(l=!0,c=d,d=n(d),i!==void 0&&a.hasValue){var v=a.value;if(i(v,d))return f=v}return f=d}if(v=f,$le(c,d))return v;var g=n(d);return i!==void 0&&i(v,g)?v:(c=d,f=g)}var l=!1,c,f,h=r===void 0?null:r;return[function(){return u(t())},h===null?void 0:function(){return u(h())}]},[t,r,n,i]);var s=Ule(e,o[0],o[1]);return zle(function(){a.hasValue=!0,a.value=s},[s]),Vle(s),s};mN.exports=gN;var Wle=mN.exports;function qle(e){e()}let yN=qle;const Xle=e=>yN=e,Yle=()=>yN,IC=Symbol.for("react-redux-context"),kC=typeof globalThis<"u"?globalThis:{};function Kle(){var e;if(!G.createContext)return{};const t=(e=kC[IC])!=null?e:kC[IC]=new Map;let r=t.get(G.createContext);return r||(r=G.createContext(null),t.set(G.createContext,r)),r}const fo=Kle();function Vb(e=fo){return function(){return G.useContext(e)}}const _N=Vb(),Zle=()=>{throw new Error("uSES not initialized!")};let xN=Zle;const Qle=e=>{xN=e},Jle=(e,t)=>e===t;function ece(e=fo){const t=e===fo?_N:Vb(e);return function(n,i={}){const{equalityFn:o=Jle,stabilityCheck:a=void 0,noopCheck:s=void 0}=typeof i=="function"?{equalityFn:i}:i,{store:u,subscription:l,getServerState:c,stabilityCheck:f,noopCheck:h}=t();G.useRef(!0);const d=G.useCallback({[n.name](g){return n(g)}}[n.name],[n,f,a]),v=xN(l.addNestedSub,u.getState,c||u.getState,d,o);return G.useDebugValue(v),v}}const pe=ece();function tce(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,o;for(o=0;o=0)&&(r[i]=e[i]);return r}var bN={exports:{}},Ye={};/** @license React v16.13.1 + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Yt=typeof Symbol=="function"&&Symbol.for,Wb=Yt?Symbol.for("react.element"):60103,qb=Yt?Symbol.for("react.portal"):60106,Yd=Yt?Symbol.for("react.fragment"):60107,Kd=Yt?Symbol.for("react.strict_mode"):60108,Zd=Yt?Symbol.for("react.profiler"):60114,Qd=Yt?Symbol.for("react.provider"):60109,Jd=Yt?Symbol.for("react.context"):60110,Xb=Yt?Symbol.for("react.async_mode"):60111,ep=Yt?Symbol.for("react.concurrent_mode"):60111,tp=Yt?Symbol.for("react.forward_ref"):60112,rp=Yt?Symbol.for("react.suspense"):60113,rce=Yt?Symbol.for("react.suspense_list"):60120,np=Yt?Symbol.for("react.memo"):60115,ip=Yt?Symbol.for("react.lazy"):60116,nce=Yt?Symbol.for("react.block"):60121,ice=Yt?Symbol.for("react.fundamental"):60117,oce=Yt?Symbol.for("react.responder"):60118,ace=Yt?Symbol.for("react.scope"):60119;function qr(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Wb:switch(e=e.type,e){case Xb:case ep:case Yd:case Zd:case Kd:case rp:return e;default:switch(e=e&&e.$$typeof,e){case Jd:case tp:case ip:case np:case Qd:return e;default:return t}}case qb:return t}}}function SN(e){return qr(e)===ep}Ye.AsyncMode=Xb;Ye.ConcurrentMode=ep;Ye.ContextConsumer=Jd;Ye.ContextProvider=Qd;Ye.Element=Wb;Ye.ForwardRef=tp;Ye.Fragment=Yd;Ye.Lazy=ip;Ye.Memo=np;Ye.Portal=qb;Ye.Profiler=Zd;Ye.StrictMode=Kd;Ye.Suspense=rp;Ye.isAsyncMode=function(e){return SN(e)||qr(e)===Xb};Ye.isConcurrentMode=SN;Ye.isContextConsumer=function(e){return qr(e)===Jd};Ye.isContextProvider=function(e){return qr(e)===Qd};Ye.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Wb};Ye.isForwardRef=function(e){return qr(e)===tp};Ye.isFragment=function(e){return qr(e)===Yd};Ye.isLazy=function(e){return qr(e)===ip};Ye.isMemo=function(e){return qr(e)===np};Ye.isPortal=function(e){return qr(e)===qb};Ye.isProfiler=function(e){return qr(e)===Zd};Ye.isStrictMode=function(e){return qr(e)===Kd};Ye.isSuspense=function(e){return qr(e)===rp};Ye.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Yd||e===ep||e===Zd||e===Kd||e===rp||e===rce||typeof e=="object"&&e!==null&&(e.$$typeof===ip||e.$$typeof===np||e.$$typeof===Qd||e.$$typeof===Jd||e.$$typeof===tp||e.$$typeof===ice||e.$$typeof===oce||e.$$typeof===ace||e.$$typeof===nce)};Ye.typeOf=qr;bN.exports=Ye;var sce=bN.exports,wN=sce,uce={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},lce={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},EN={};EN[wN.ForwardRef]=uce;EN[wN.Memo]=lce;var Ze={};/** + * @license React + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Yb=Symbol.for("react.element"),Kb=Symbol.for("react.portal"),op=Symbol.for("react.fragment"),ap=Symbol.for("react.strict_mode"),sp=Symbol.for("react.profiler"),up=Symbol.for("react.provider"),lp=Symbol.for("react.context"),cce=Symbol.for("react.server_context"),cp=Symbol.for("react.forward_ref"),fp=Symbol.for("react.suspense"),hp=Symbol.for("react.suspense_list"),dp=Symbol.for("react.memo"),pp=Symbol.for("react.lazy"),fce=Symbol.for("react.offscreen"),TN;TN=Symbol.for("react.module.reference");function fn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Yb:switch(e=e.type,e){case op:case sp:case ap:case fp:case hp:return e;default:switch(e=e&&e.$$typeof,e){case cce:case lp:case cp:case pp:case dp:case up:return e;default:return t}}case Kb:return t}}}Ze.ContextConsumer=lp;Ze.ContextProvider=up;Ze.Element=Yb;Ze.ForwardRef=cp;Ze.Fragment=op;Ze.Lazy=pp;Ze.Memo=dp;Ze.Portal=Kb;Ze.Profiler=sp;Ze.StrictMode=ap;Ze.Suspense=fp;Ze.SuspenseList=hp;Ze.isAsyncMode=function(){return!1};Ze.isConcurrentMode=function(){return!1};Ze.isContextConsumer=function(e){return fn(e)===lp};Ze.isContextProvider=function(e){return fn(e)===up};Ze.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Yb};Ze.isForwardRef=function(e){return fn(e)===cp};Ze.isFragment=function(e){return fn(e)===op};Ze.isLazy=function(e){return fn(e)===pp};Ze.isMemo=function(e){return fn(e)===dp};Ze.isPortal=function(e){return fn(e)===Kb};Ze.isProfiler=function(e){return fn(e)===sp};Ze.isStrictMode=function(e){return fn(e)===ap};Ze.isSuspense=function(e){return fn(e)===fp};Ze.isSuspenseList=function(e){return fn(e)===hp};Ze.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===op||e===sp||e===ap||e===fp||e===hp||e===fce||typeof e=="object"&&e!==null&&(e.$$typeof===pp||e.$$typeof===dp||e.$$typeof===up||e.$$typeof===lp||e.$$typeof===cp||e.$$typeof===TN||e.getModuleId!==void 0)};Ze.typeOf=fn;function hce(){const e=Yle();let t=null,r=null;return{clear(){t=null,r=null},notify(){e(()=>{let n=t;for(;n;)n.callback(),n=n.next})},get(){let n=[],i=t;for(;i;)n.push(i),i=i.next;return n},subscribe(n){let i=!0,o=r={callback:n,next:null,prev:r};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:r=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const NC={notify(){},get:()=>[]};function dce(e,t){let r,n=NC,i=0,o=!1;function a(g){c();const p=n.subscribe(g);let m=!1;return()=>{m||(m=!0,p(),f())}}function s(){n.notify()}function u(){v.onStateChange&&v.onStateChange()}function l(){return o}function c(){i++,r||(r=t?t.addNestedSub(u):e.subscribe(u),n=hce())}function f(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=NC)}function h(){o||(o=!0,c())}function d(){o&&(o=!1,f())}const v={addNestedSub:a,notifyNestedSubs:s,handleChangeWrapper:u,isSubscribed:l,trySubscribe:h,tryUnsubscribe:d,getListeners:()=>n};return v}const pce=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",vce=pce?G.useLayoutEffect:G.useEffect;function CN({store:e,context:t,children:r,serverState:n,stabilityCheck:i="once",noopCheck:o="once"}){const a=G.useMemo(()=>{const l=dce(e);return{store:e,subscription:l,getServerState:n?()=>n:void 0,stabilityCheck:i,noopCheck:o}},[e,n,i,o]),s=G.useMemo(()=>e.getState(),[e]);vce(()=>{const{subscription:l}=a;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),s!==e.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[a,s]);const u=t||fo;return G.createElement(u.Provider,{value:a},r)}function ON(e=fo){const t=e===fo?_N:Vb(e);return function(){const{store:n}=t();return n}}const mce=ON();function gce(e=fo){const t=e===fo?mce:ON(e);return function(){return t().dispatch}}const Kt=gce();Qle(Wle.useSyncExternalStoreWithSelector);Xle(AP.unstable_batchedUpdates);const Er=()=>{const e=Kt();return{playSeEnter:()=>{e(Te({key:"uiSe",value:hN}))},playSeClick:()=>{e(Te({key:"uiSe",value:dN}))},playSePageChange:()=>{e(Te({key:"uiSe",value:Tle}))},playSeDialogOpen:()=>{e(Te({key:"uiSe",value:Ole}))},playSeSwitch:()=>{e(Te({key:"uiSe",value:Cle}))}}},Zb=()=>({playSeEnter:()=>{D.dispatch(Te({key:"uiSe",value:hN}))},playSeClick:()=>{D.dispatch(Te({key:"uiSe",value:dN}))}}),yce=[{reg:/\\\\/g,val:"\\"},{reg:/\\\|/g,val:"|"},{reg:/\\:/g,val:":"},{reg:/\\,/g,val:","},{reg:/\\;/g,val:";"},{reg:/\\./g,val:"."}],Qb=e=>{let t=e;for(let r of yce)t=t.replaceAll(r.reg,r.val);return t};function _ce(e){return xp.parseScssToWebgalStyleObj(e)}function En(e){const[t,r]=G.useState(e);return{_value:t,set:function(n){this._value=n,r(n)},get value(){return this._value},set value(n){this.set(n)}}}function xce(e){if(e.sheet)return e.sheet;for(var t=0;t0?er(Ws,--Mr):0,ws--,It===10&&(ws=1,mp--),It}function Gr(){return It=Mr2||Gl(It)>3?"":" "}function Nce(e,t){for(;--t&&Gr()&&!(It<48||It>102||It>57&&It<65||It>70&&It<97););return hc(e,Df()+(t<6&&Yn()==32&&Gr()==32))}function q_(e){for(;Gr();)switch(It){case e:return Mr;case 34:case 39:e!==34&&e!==39&&q_(It);break;case 40:e===41&&q_(e);break;case 92:Gr();break}return Mr}function Lce(e,t){for(;Gr()&&e+It!==47+10;)if(e+It===42+42&&Yn()===47)break;return"/*"+hc(t,Mr-1)+"*"+vp(e===47?e:Gr())}function Mce(e){for(;!Gl(Yn());)Gr();return hc(e,Mr)}function Fce(e){return NN(jf("",null,null,null,[""],e=kN(e),0,[0],e))}function jf(e,t,r,n,i,o,a,s,u){for(var l=0,c=0,f=a,h=0,d=0,v=0,g=1,p=1,m=1,y=0,_="",x=i,S=o,w=n,E=_;p;)switch(v=y,y=Gr()){case 40:if(v!=108&&er(E,f-1)==58){W_(E+=$e(Bf(y),"&","&\f"),"&\f")!=-1&&(m=-1);break}case 34:case 39:case 91:E+=Bf(y);break;case 9:case 10:case 13:case 32:E+=kce(v);break;case 92:E+=Nce(Df()-1,7);continue;case 47:switch(Yn()){case 42:case 47:uf(Dce(Lce(Gr(),Df()),t,r),u);break;default:E+="/"}break;case 123*g:s[l++]=Fn(E)*m;case 125*g:case 59:case 0:switch(y){case 0:case 125:p=0;case 59+c:m==-1&&(E=$e(E,/\f/g,"")),d>0&&Fn(E)-f&&uf(d>32?MC(E+";",n,r,f-1):MC($e(E," ","")+";",n,r,f-2),u);break;case 59:E+=";";default:if(uf(w=LC(E,t,r,l,c,i,s,_,x=[],S=[],f),o),y===123)if(c===0)jf(E,t,w,w,x,o,f,s,S);else switch(h===99&&er(E,3)===110?100:h){case 100:case 108:case 109:case 115:jf(e,w,w,n&&uf(LC(e,w,w,0,0,i,s,_,i,x=[],f),S),i,S,f,s,n?x:S);break;default:jf(E,w,w,w,[""],S,0,s,S)}}l=c=d=0,g=m=1,_=E="",f=a;break;case 58:f=1+Fn(E),d=v;default:if(g<1){if(y==123)--g;else if(y==125&&g++==0&&Ice()==125)continue}switch(E+=vp(y),y*g){case 38:m=c>0?1:(E+="\f",-1);break;case 44:s[l++]=(Fn(E)-1)*m,m=1;break;case 64:Yn()===45&&(E+=Bf(Gr())),h=Yn(),c=f=Fn(_=E+=Mce(Df())),y++;break;case 45:v===45&&Fn(E)==2&&(g=0)}}return o}function LC(e,t,r,n,i,o,a,s,u,l,c){for(var f=i-1,h=i===0?o:[""],d=t1(h),v=0,g=0,p=0;v0?h[m]+" "+y:$e(y,/&\f/g,h[m])))&&(u[p++]=_);return gp(e,t,r,i===0?Jb:s,u,l,c)}function Dce(e,t,r){return gp(e,t,r,AN,vp(Rce()),Ul(e,2,-2),0)}function MC(e,t,r,n){return gp(e,t,r,e1,Ul(e,0,n),Ul(e,n+1,-1),n)}function is(e,t){for(var r="",n=t1(e),i=0;i6)switch(er(e,t+1)){case 109:if(er(e,t+4)!==45)break;case 102:return $e(e,/(.+:)(.+)-([^]+)/,"$1"+je+"$2-$3$1"+$h+(er(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~W_(e,"stretch")?LN($e(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(er(e,t+1)!==115)break;case 6444:switch(er(e,Fn(e)-3-(~W_(e,"!important")&&10))){case 107:return $e(e,":",":"+je)+e;case 101:return $e(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+je+(er(e,14)===45?"inline-":"")+"box$3$1"+je+"$2$3$1"+ar+"$2box$3")+e}break;case 5936:switch(er(e,t+11)){case 114:return je+e+ar+$e(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return je+e+ar+$e(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return je+e+ar+$e(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return je+e+ar+e+e}return e}var qce=function(t,r,n,i){if(t.length>-1&&!t.return)switch(t.type){case e1:t.return=LN(t.value,t.length);break;case PN:return is([wu(t,{value:$e(t.value,"@","@"+je)})],i);case Jb:if(t.length)return Pce(t.props,function(o){switch(Ace(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return is([wu(t,{props:[$e(o,/:(read-\w+)/,":"+$h+"$1")]})],i);case"::placeholder":return is([wu(t,{props:[$e(o,/:(plac\w+)/,":"+je+"input-$1")]}),wu(t,{props:[$e(o,/:(plac\w+)/,":"+$h+"$1")]}),wu(t,{props:[$e(o,/:(plac\w+)/,ar+"input-$1")]})],i)}return""})}},Xce=[qce],Yce=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(g){var p=g.getAttribute("data-emotion");p.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var i=t.stylisPlugins||Xce,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(g){for(var p=g.getAttribute("data-emotion").split(" "),m=1;m=4;++n,i-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Zce={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Qce=/[A-Z]|^ms/g,Jce=/_EMO_([^_]+?)_([^]*?)_EMO_/g,MN=function(t){return t.charCodeAt(1)===45},DC=function(t){return t!=null&&typeof t!="boolean"},Bm=Uce(function(e){return MN(e)?e:e.replace(Qce,"-$&").toLowerCase()}),BC=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Jce,function(n,i,o){return Dn={name:i,styles:o,next:Dn},i})}return Zce[t]!==1&&!MN(t)&&typeof r=="number"&&r!==0?r+"px":r};function zl(e,t,r){if(r==null)return"";if(r.__emotion_styles!==void 0)return r;switch(typeof r){case"boolean":return"";case"object":{if(r.anim===1)return Dn={name:r.name,styles:r.styles,next:Dn},r.name;if(r.styles!==void 0){var n=r.next;if(n!==void 0)for(;n!==void 0;)Dn={name:n.name,styles:n.styles,next:Dn},n=n.next;var i=r.styles+";";return i}return efe(e,t,r)}case"function":{if(e!==void 0){var o=Dn,a=r(e);return Dn=o,zl(e,t,a)}break}}if(t==null)return r;var s=t[r];return s!==void 0?s:r}function efe(e,t,r){var n="";if(Array.isArray(r))for(var i=0;io.stage.replacedUIlable),n=(o,a)=>{var u;const s=(r==null?void 0:r[o])??o;if(Object.keys(t.value.classNameStyles).includes(s)){const l=Mu(((u=t.value.classNameStyles)==null?void 0:u[s])??"");return`${a} ${l}`}return a},i=async()=>{te.debug("更新 Scss 文件",e);const a=(await bl.get(`game/template/${e}`)).data;t.set(_ce(a))};return G.useEffect(()=>{i()},[]),G.useEffect(()=>{afe(t.value.others)},[t.value.others]),sfe(i),n}function sfe(e){const t=()=>{e()};G.useEffect(()=>(C.events.styleUpdate.on(t),()=>C.events.styleUpdate.off(t)),[])}class n1{constructor(t,r){oe(this,"text");oe(this,"jump");oe(this,"jumpToScene");oe(this,"showCondition");oe(this,"enableCondition");this.text=Qb(t),this.jump=r,this.jumpToScene=r.match(new RegExp("(?"),n=r.length>1?r[0]:null,o=(r.length>1?r[1]:r[0]).split(new RegExp("(?{const r=e.content.split(new RegExp("(?n1.parse(n));return Kn.render(b.jsx(CN,{store:D,children:b.jsx(lfe,{chooseOptions:r})}),document.getElementById("chooseContainer")),{performName:"choose",duration:1e3*60*60*24,isHoldOn:!1,stopFunction:()=>{Kn.render(b.jsx("div",{}),document.getElementById("chooseContainer"))},blockingNext:()=>!0,blockingAuto:()=>!0,stopTimeout:void 0}};function lfe(e){const r=D.getState().userData.optionData.textboxFont===Wn.song?'"思源宋体", serif':'"WebgalUI", serif',{playSeEnter:n,playSeClick:i}=Zb(),o=r1("Stage/Choose/choose.scss"),a=s=>s.filter((u,l)=>Z_(u.showCondition)).map((u,l)=>{const c=Z_(u.enableCondition),f=c?o("Choose_item",sf.Choose_item):o("Choose_item_disabled",sf.Choose_item_disabled),h=c?()=>{i(),u.jumpToScene?cN(u.jump,u.text):fN(u.jump),C.gameplay.performController.unmountPerform("choose")}:()=>{};return b.jsx("div",{className:o("Choose_item_outer",sf.Choose_item_outer),children:b.jsx("div",{className:f,style:{fontFamily:r},onClick:h,onMouseEnter:n,children:u.text})},u.jump+l)});return b.jsx("div",{className:o("Choose_Main",sf.Choose_Main),children:a(e.chooseOptions)})}const cfe=e=>(te.debug(`脚本内注释${e.content}`),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),ffe=e=>(e.content!==""&&e.content!=="none"?D.dispatch(Te({key:"enableFilm",value:e.content})):D.dispatch(Te({key:"enableFilm",value:""})),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),hfe="_Choose_Main_4xkm5_1",dfe="_Choose_item_4xkm5_13",pfe="_glabalDialog_container_inner_4xkm5_28",vfe="_glabalDialog_container_4xkm5_28",mfe="_title_4xkm5_47",gfe="_button_4xkm5_59",Ca={Choose_Main:hfe,Choose_item:dfe,glabalDialog_container_inner:pfe,glabalDialog_container:vfe,title:mfe,button:gfe},yfe=e=>{const t=e.content.toString().trim(),r=Pe(e,"title"),n=(r===0?"Please Input":r)??"Please Input",i=Pe(e,"buttonText"),o=(i===0?"OK":i)??"OK",s=D.getState().userData.optionData.textboxFont===Wn.song?'"思源宋体", serif':'"WebgalUI", serif',{playSeEnter:u,playSeClick:l}=Zb(),c=b.jsx("div",{style:{fontFamily:s},className:Ca.glabalDialog_container,children:b.jsxs("div",{className:Ca.glabalDialog_container_inner,children:[b.jsx("div",{className:Ca.title,children:n}),b.jsx("input",{id:"user-input",className:Ca.Choose_item}),b.jsx("div",{onMouseEnter:u,onClick:()=>{const f=document.getElementById("user-input");f&&D.dispatch(h2({key:t,value:((f==null?void 0:f.value)??"")===""?" ":(f==null?void 0:f.value)??""})),l(),C.gameplay.performController.unmountPerform("userInput"),nr()},className:Ca.button,children:o})]})});return Kn.render(b.jsx("div",{className:Ca.Choose_Main,children:c}),document.getElementById("chooseContainer")),{performName:"userInput",duration:1e3*60*60*24,isHoldOn:!1,stopFunction:()=>{Kn.render(b.jsx("div",{}),document.getElementById("chooseContainer"))},blockingNext:()=>!0,blockingAuto:()=>!0,stopTimeout:void 0}},_fe="_FullScreenPerform_main_7er8a_2",xfe="_FullScreenPerform_element_7er8a_9",bfe="_fullScreen_video_7er8a_17",Sfe="_fadeIn_7er8a_74",wfe="_intro_showSoftly_7er8a_1",Efe="_slideIn_7er8a_80",Tfe="_typingEffect_7er8a_86",Cfe="_typing_7er8a_86",Ofe="_blinkCursor_7er8a_1",Afe="_pixelateEffect_7er8a_95",Pfe="_pixelateAnimation_7er8a_1",Rfe="_revealAnimation_7er8a_101",Ife="_videoContainer_7er8a_115",Ln={FullScreenPerform_main:_fe,FullScreenPerform_element:xfe,fullScreen_video:bfe,fadeIn:Sfe,intro_showSoftly:wfe,slideIn:Efe,typingEffect:Tfe,typing:Cfe,blinkCursor:Ofe,pixelateEffect:Afe,pixelateAnimation:Pfe,revealAnimation:Rfe,videoContainer:Ife},kfe=e=>{const t=`introPerform${Math.random().toString()}`;let r,n="rgba(0, 0, 0, 1)",i="rgba(255, 255, 255, 1)";const o=(w,E=0)=>{switch(w){case"fadeIn":return Ln.fadeIn;case"slideIn":return Ln.slideIn;case"typingEffect":return`${Ln.typingEffect} ${E}`;case"pixelateEffect":return Ln.pixelateEffect;case"revealAnimation":return Ln.revealAnimation;default:return Ln.fadeIn}};let a=Ln.fadeIn,s=1500,u=!1,l=!1;for(const w of e.args){if(w.key==="backgroundColor"&&(n=w.value||"rgba(0, 0, 0, 1)"),w.key==="fontColor"&&(i=w.value||"rgba(255, 255, 255, 1)"),w.key==="fontSize")switch(w.value){case"small":r="280%";break;case"medium":r="350%";break;case"large":r="420%";break}if(w.key==="animation"&&(a=o(w.value)),w.key==="delayTime"){const E=parseInt(w.value.toString(),10);s=isNaN(E)?s:E}w.key==="hold"&&w.value===!0&&(u=!0),w.key==="userForward"&&w.value===!0&&(l=!0,u=!0,s=99999999)}const c={background:n,color:i,fontSize:r||"350%",width:"100%",height:"100%"},f=e.content.split(new RegExp("(?Qb(w));let d=1e3+s*f.length;const v=u?1e3*60*60*24:1e3+s*f.length;let g=!0,p=setTimeout(()=>{g=!1},d),m=setTimeout(()=>{});const y=()=>{const w=document.getElementById("introContainer");if(d-=s,clearTimeout(p),p=setTimeout(()=>{g=!1},d),w){const E=w.childNodes[0].childNodes[0].childNodes,R=E.length;if(l){let A=!0;for(const P of E)if(Number(P.style.animationDelay.split("ms")[0])>0){A=!1;const B=P.getAnimations();P.style.animationDelay="0ms ";for(const $ of B)$.currentTime=0,$.play()}A&&(clearTimeout(m),clearTimeout(p),C.gameplay.performController.unmountPerform(t));return}E.forEach((A,P)=>{const F=Number(A.style.animationDelay.split("ms")[0]);F>0&&(A.style.animationDelay=`${F-s}ms`),P===R-1&&(F===0?(clearTimeout(m),C.gameplay.performController.unmountPerform(t)):(clearTimeout(m),u||(m=setTimeout(()=>{C.gameplay.performController.unmountPerform(t)},d))))})}};C.events.userInteractNext.on(y);const _=f.map((w,E)=>b.jsxs("div",{style:{animationDelay:`${s*E}ms`},className:a,children:[w,w===""?" ":""]},"introtext"+E+Math.random().toString())),x=b.jsx("div",{style:c,children:b.jsx("div",{style:{padding:"3em 4em 3em 4em"},children:_})});Kn.render(x,document.getElementById("introContainer"));const S=document.getElementById("introContainer");return S&&(S.style.display="block"),{performName:t,duration:v,isHoldOn:!1,stopFunction:()=>{const w=document.getElementById("introContainer");w&&(w.style.display="none"),C.events.userInteractNext.off(y)},blockingNext:()=>g,blockingAuto:()=>g,stopTimeout:void 0,goNextWhenOver:!0}},Nfe=e=>({performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),Lfe=e=>{let t=e.content;return(e.content==="none"||e.content==="")&&(t=""),D.dispatch(Te({key:"miniAvatar",value:t})),{performName:"none",duration:0,isHoldOn:!0,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}},Mfe="modulepreload",Ffe=function(e,t){return new URL(e,t).href},GC={},Dfe=function(t,r,n){if(!r||r.length===0)return t();const i=document.getElementsByTagName("link");return Promise.all(r.map(o=>{if(o=Ffe(o,n),o in GC)return;GC[o]=!0;const a=o.endsWith(".css"),s=a?'[rel="stylesheet"]':"";if(!!n)for(let c=i.length-1;c>=0;c--){const f=i[c];if(f.href===o&&(!a||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${s}`))return;const l=document.createElement("link");if(l.rel=a?"stylesheet":Mfe,a||(l.as="script",l.crossOrigin=""),l.href=o,document.head.appendChild(l),a)return new Promise((c,f)=>{l.addEventListener("load",c),l.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>t()).catch(o=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o})},BN=new Map;function Bfe(e){return e?typeof e=="string"?e:e():null}function jN(e){const t=Bfe(e);return t||(te.error("Get name of perform failed. There no name of the perform."),"")}function d0e(e,t){if(!t||typeof t!="function")throw new Error(`"${e}" is not a callback.`);BN.set(jN(e),t)}function jfe(e,t=[]){const r=BN.get(jN(e));if(!r||!(r instanceof Function))throw te.error(`Can't call the perform named "${e}"`),new Error(`"${e}" don't have the pixiPerform callback.`);return r(...t)}Dfe(()=>import("./initRegister-cc4c5fbe.js"),[],import.meta.url);const $fe=e=>{const t="PixiPerform"+e.content;C.gameplay.performController.performList.forEach(o=>{if(o.performName===t)return{performName:"none",duration:0,isOver:!1,isHoldOn:!0,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!1,stopTimeout:void 0}});const r=jfe(e.content),{container:n,tickerKey:i}=r;return{performName:t,duration:0,isHoldOn:!0,stopFunction:()=>{var o,a;te.warn("现在正在卸载pixi演出"),n.destroy({texture:!0,baseTexture:!0}),(o=C.gameplay.pixiStage)==null||o.effectsContainer.removeChild(n),(a=C.gameplay.pixiStage)==null||a.removeAnimation(i)},blockingNext:()=>!1,blockingAuto:()=>!1,stopTimeout:void 0}},Ufe=e=>{var o;te.debug("play SE");let t="effect-sound";C.gameplay.performController.unmountPerform(t,!0);let r=e.content,n=!1;Pe(e,"id")&&(t=`effect-sound-${((o=Pe(e,"id"))==null?void 0:o.toString())??""}`,C.gameplay.performController.unmountPerform(t,!0),n=!0);let i=!1;return!r||r===Yg?{performName:Yg,duration:0,isHoldOn:!1,blockingAuto(){return!1},blockingNext(){return!1},stopFunction(){},stopTimeout:void 0}:{performName:"none",blockingAuto(){return!1},blockingNext(){return!1},isHoldOn:!1,stopFunction(){},stopTimeout:void 0,duration:1e3*60*60,arrangePerformPromise:new Promise(a=>{setTimeout(()=>{var v;const s=Pe(e,"volume");let u=document.createElement("audio");u.src=r,n&&(u.loop=!0);const l=D.getState().userData,c=l.optionData.volumeMain,f=typeof s=="number"&&s>=0&&s<=100?s:100,h=c*.01*(((v=l.optionData)==null?void 0:v.seVolume)??100)*.01*f*.01;u.volume=h,u.currentTime=0;const d={performName:t,duration:1e3*60*60,isHoldOn:n,skipNextCollect:!0,stopFunction:()=>{u.pause(),u.remove()},blockingNext:()=>!1,blockingAuto:()=>n?!1:!i,stopTimeout:void 0};a(d),u==null||u.play(),u.onended=()=>{for(const g of C.gameplay.performController.performList)g.performName===t&&(i=!0,g.stopFunction(),C.gameplay.performController.unmountPerform(g.performName))}},1)})}},Gfe=e=>{const t=D.getState().userData,r=t.optionData.volumeMain,n=r*.01*t.optionData.vocalVolume*.01,i=r*.01*t.optionData.bgmVolume*.01,o=h1();let a=Pe(e,"skipOff"),s=!1;a&&(s=!0),Kn.render(b.jsx("div",{className:Ln.videoContainer,children:b.jsx("video",{className:Ln.fullScreen_video,id:"playVideoElement",src:e.content,autoPlay:!0})}),document.getElementById("videoContainer"));let u=!1;return{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>s,blockingAuto:()=>!0,stopTimeout:void 0,arrangePerformPromise:new Promise(l=>{setTimeout(()=>{let c=document.getElementById("playVideoElement");if(c!==null){c.currentTime=0,c.volume=i;const f=()=>{for(const y of C.gameplay.performController.performList)y.performName===o&&(u=!0,y.stopFunction(),C.gameplay.performController.unmountPerform(y.performName))},h=()=>{f()};C.events.fullscreenDbClick.on(h);const d={performName:o,duration:1e3*60*60,isOver:!1,isHoldOn:!1,stopFunction:()=>{C.events.fullscreenDbClick.off(h);const y=document.getElementById("currentBgm");y&&(y.volume=i.toString());const _=document.getElementById("currentVocal");y&&(_.volume=n.toString()),Kn.render(b.jsx("div",{}),document.getElementById("videoContainer"))},blockingNext:()=>s,blockingAuto:()=>!u,stopTimeout:void 0,goNextWhenOver:!0};l(d);const v=0,g=0,p=document.getElementById("currentBgm");p&&(p.volume=g.toString());const m=document.getElementById("currentVocal");p&&(m.volume=v.toString()),c==null||c.play(),c.onended=()=>{f()}}},1)})}},zfe=e=>{var a;D.getState().stage.currentDialogKey;const t=e.content,r=Ir(t),n=(((a=Pe(e,"target"))==null?void 0:a.toString())??"default_id").toString(),i=`${n}-${t}-${r}`;let o;return setTimeout(()=>{var u,l;(u=C.gameplay.pixiStage)==null||u.stopPresetAnimationOnTarget(n);const s=jh(t,n,r);s&&(te.debug(`动画${t}作用在${n}`,r),(l=C.gameplay.pixiStage)==null||l.registerAnimation(s,i,n))},0),o=()=>{setTimeout(()=>{var s;D.getState().stage.currentDialogKey,(s=C.gameplay.pixiStage)==null||s.removeAnimationWithSetEffects(i)},0)},{performName:i,duration:r,isHoldOn:!1,stopFunction:o,blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function Hfe(e,t){const r=C.gameplay.pixiStage.getStageObjByKey(e);function n(){r&&(r.pixiContainer.alpha=0,r.pixiContainer.blur=0)}function i(){r&&(r.pixiContainer.alpha=1,r.pixiContainer.blur=5)}function o(a){if(r){const s=r.pixiContainer,u=C.gameplay.pixiStage.frameDuration,l=t/u*a,c=1/l,f=5/l;s.alpha<1&&(s.alpha+=c),s.blur<5&&(s.blur+=f)}}return{setStartState:n,setEndState:i,tickerFunc:o}}const Vfe=[{name:"universalSoftIn",animationGenerateFunc:aR},{name:"universalSoftOff",animationGenerateFunc:sR},{name:"testblur",animationGenerateFunc:Hfe}],Wfe=e=>{var s,u,l;D.getState().stage.currentDialogKey;const t=e.content,r=Pe(e,"duration")??0,n=((s=Pe(e,"target"))==null?void 0:s.toString())??"0",i=`${n}-${t}-${r}`,o=qfe(t);let a=()=>{};if(o){te.debug(`动画${t}作用在${n}`,r);const c=o(n,r);(u=C.gameplay.pixiStage)==null||u.stopPresetAnimationOnTarget(n),(l=C.gameplay.pixiStage)==null||l.registerAnimation(c,i,n),a=()=>{var f;D.getState().stage.currentDialogKey,(f=C.gameplay.pixiStage)==null||f.removeAnimationWithSetEffects(i)}}return{performName:i,duration:r,isHoldOn:!1,stopFunction:a,blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function qfe(e){const t=Vfe.find(r=>r.name===e);return te.debug("装载动画",t),t?t.animationGenerateFunc:null}const Xfe=e=>({performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),Yfe=e=>{var l;D.getState().stage.currentDialogKey;const t=(Math.random()*10).toString(16),r=e.content;let n;try{n=JSON.parse(r)}catch{n=[]}const i={name:t,effects:n};C.animationManager.addAnimation(i);const o=Ir(t),a=((l=Pe(e,"target"))==null?void 0:l.toString())??"0",s=`${a}-${t}-${o}`;let u=()=>{};return setTimeout(()=>{var f,h;(f=C.gameplay.pixiStage)==null||f.stopPresetAnimationOnTarget(a);const c=jh(t,a,o);c&&(te.debug(`动画${t}作用在${a}`,o),(h=C.gameplay.pixiStage)==null||h.registerAnimation(c,s,a))},0),u=()=>{setTimeout(()=>{var c;D.getState().stage.currentDialogKey,(c=C.gameplay.pixiStage)==null||c.removeAnimationWithSetEffects(s)},0)},{performName:s,duration:o,isHoldOn:!1,stopFunction:u,blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function Kfe(e){return e.content==="hide"?D.dispatch(Te({key:"isDisableTextbox",value:!0})):D.dispatch(Te({key:"isDisableTextbox",value:!1})),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}}const Zfe=e=>{var c;D.getState().stage.currentDialogKey;const t=(Math.random()*10).toString(16),r=e.content;let n;const i=Pe(e,"duration"),o=((c=Pe(e,"target"))==null?void 0:c.toString())??"0";try{const f=JSON.parse(r);n=Sl(o,f,i),console.log("animationObj:",n)}catch{n=[]}const a={name:t,effects:n};C.animationManager.addAnimation(a);const s=Jfe(t),u=`${o}-${t}-${s}`;let l=()=>{};return setTimeout(()=>{var h,d;(h=C.gameplay.pixiStage)==null||h.stopPresetAnimationOnTarget(o);const f=Qfe(t,o,s);f&&(te.debug(`动画${t}作用在${o}`,s),(d=C.gameplay.pixiStage)==null||d.registerAnimation(f,u,o))},0),l=()=>{setTimeout(()=>{var f;D.getState().stage.currentDialogKey,(f=C.gameplay.pixiStage)==null||f.removeAnimationWithSetEffects(u)},0)},{performName:u,duration:s,isHoldOn:!1,stopFunction:l,blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function Qfe(e,t,r){const n=C.animationManager.getAnimations().find(i=>i.name===e);if(n){const i=n.effects.map(o=>{const a=bt({...Mx,duration:0});return Xn.assignTransform(a,o),a.duration=o.duration,a});return te.debug("装载自定义动画",i),lN(i,t,r)}return null}function Jfe(e){const t=C.animationManager.getAnimations().find(r=>r.name===e);if(t){let r=0;return t.effects.forEach(n=>{r+=n.duration}),r}return 0}const ehe=e=>{let t="0";for(const r of e.args)r.key==="target"&&(t=r.value.toString());return Pe(e,"enter")&&C.animationManager.nextEnterAnimationName.set(t,Pe(e,"enter").toString()),Pe(e,"exit")&&C.animationManager.nextExitAnimationName.set(t+"-off",Pe(e,"exit").toString()),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!1,stopTimeout:void 0}},the=e=>{const t=e.content;let r=e.content,n="default";e.args.forEach(o=>{o.key==="name"&&(r=o.value.toString()),o.key==="series"&&(n=o.value.toString())}),te.info(`解锁BGM:${r},路径:${t},所属系列:${n}`),D.dispatch(R2({name:r,url:t,series:n}));const i=D.getState().userData;return ca.setItem(C.gameKey,i).then(()=>{}),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}},rhe=e=>{const t=e.content;let r=e.content,n="default";e.args.forEach(o=>{o.key==="name"&&(r=o.value.toString()),o.key==="series"&&(n=o.value.toString())}),te.info(`解锁CG:${r},路径:${t},所属系列:${n}`),D.dispatch(P2({name:r,url:t,series:n}));const i=D.getState().userData;return ca.setItem(C.gameKey,i).then(()=>{}),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}},nhe=e=>{Wd(!0);const t=D.dispatch,r=$r("start.txt",jr.scene);return setTimeout(()=>{C.sceneManager.resetScene()},5),t(yi.resetFastSave()),zh(),ii(r).then(n=>{C.sceneManager.sceneData.currentScene=On(n,"start.txt",r)}),t(Ie({component:"showTitle",visibility:!0})),d1(D.getState().GUI.titleBgm),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}},ihe=e=>(fN(e.content),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),ohe=e=>(C.gameplay.performController.performList.forEach(t=>{if(t.performName.match(/PixiPerform/)){te.warn("pixi 被脚本重新初始化",t.performName);for(let r=0;r{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),ze={audioContext:new AudioContext,source:null,analyser:void 0,dataArray:void 0,audioLevelInterval:setInterval(()=>{},0),blinkTimerID:setTimeout(()=>{},0),maxAudioLevel:0},ahe=e=>(ze.maxAudioLevel=Math.max(e,ze.maxAudioLevel),{OPEN_THRESHOLD:ze.maxAudioLevel*.75,HALF_OPEN_THRESHOLD:ze.maxAudioLevel*.5}),she=e=>{let t=!1;function r(){var n;t||e.animationEndTime&&Date.now()>e.animationEndTime||(t=!0,(n=C.gameplay.pixiStage)==null||n.performBlinkAnimation(e.key,e.animationItem,"closed",e.pos),ze.blinkTimerID=setTimeout(()=>{var o;(o=C.gameplay.pixiStage)==null||o.performBlinkAnimation(e.key,e.animationItem,"open",e.pos),t=!1;const i=Math.random()*300+3500;ze.blinkTimerID=setTimeout(r,i)},200))}r()},uhe=(e,t,r)=>{e.getByteFrequencyData(t);let n=0;for(let i=0;i{var h,d;const{audioLevel:t,OPEN_THRESHOLD:r,HALF_OPEN_THRESHOLD:n,currentMouthValue:i,lerpSpeed:o,key:a,animationItem:s,pos:u}=e;let l;t>r?l=1:t>n?l=.5:l=0;const c=i+(l-i)*o;(h=C.gameplay.pixiStage)==null||h.setModelMouthY(a,t);let f;c>.75?f="open":c>.25?f="half_open":f="closed",s!==void 0&&((d=C.gameplay.pixiStage)==null||d.performMouthSyncAnimation(a,s,f,u))};class lhe{constructor(t){oe(this,"subject");oe(this,"result");oe(this,"isEnd",!1);this.subject=t}with(t,r){return!this.isEnd&&this.subject===t&&(this.result=r(),this.isEnd=!0),this}endsWith(t,r){return!this.isEnd&&this.subject===t&&(this.result=r(),this.isEnd=!0),this.evaluate()}default(t){return this.isEnd||(this.result=t()),this.evaluate()}evaluate(){return this.result}}function dc(e){return new lhe(e)}const che=e=>{te.debug("play vocal");const t="vocal-play",r=Pe(e,"vocal"),n=Pe(e,"volume");let i;i=D.getState().stage;let o="",a="";const s=i.freeFigure,u=i.figureAssociatedAnimation;let l=0,c=0;const f=1;let h=document.getElementById("currentVocal");C.gameplay.performController.unmountPerform("vocal-play",!0),h!==null&&(h.currentTime=0,h.pause());for(const v of e.args)v.value===!0&&dc(v.key).with("left",()=>{o="left"}).with("right",()=>{o="right"}).endsWith("center",()=>{o="center"}),v.key==="figureId"&&(a=`${v.value.toString()}`);D.dispatch(Te({key:"playVocal",value:r})),D.dispatch(Te({key:"vocal",value:r}));let d=!1;return{arrangePerformPromise:new Promise(v=>{setTimeout(()=>{let g=document.getElementById("currentVocal");if(typeof n=="number"&&n>=0&&n<=100?D.dispatch(Te({key:"vocalVolume",value:n})):D.dispatch(Te({key:"vocalVolume",value:100})),g!==null){g.currentTime=0;const p={performName:t,duration:1e3*60*60,isOver:!1,isHoldOn:!1,stopFunction:()=>{clearInterval(ze.audioLevelInterval),g.pause(),a=a||`fig-${o}`;const y=u.find(_=>_.targetId===a);X_({audioLevel:0,OPEN_THRESHOLD:1,HALF_OPEN_THRESHOLD:1,currentMouthValue:c,lerpSpeed:f,key:a,animationItem:y,pos:o}),clearTimeout(ze.blinkTimerID)},blockingNext:()=>!1,blockingAuto:()=>!d,skipNextCollect:!0,stopTimeout:void 0};C.gameplay.performController.arrangeNewPerform(p,e,!1),a=a||`fig-${o}`;const m=u.find(y=>y.targetId===a);if(m){const y=s.find(S=>S.key===a);if(y&&(o=y.basePosition),!ze.audioContext){let S;S=new AudioContext,ze.analyser=S.createAnalyser(),ze.analyser.fftSize=256,ze.dataArray=new Uint8Array(ze.analyser.frequencyBinCount)}ze.analyser||(ze.analyser=ze.audioContext.createAnalyser(),ze.analyser.fftSize=256),l=ze.analyser.frequencyBinCount,ze.dataArray=new Uint8Array(l);let _=document.getElementById("currentVocal");ze.source||(ze.source=ze.audioContext.createMediaElementSource(_),ze.source.connect(ze.analyser)),ze.analyser.connect(ze.audioContext.destination),ze.audioLevelInterval=setInterval(()=>{const S=uhe(ze.analyser,ze.dataArray,l),{OPEN_THRESHOLD:w,HALF_OPEN_THRESHOLD:E}=ahe(S);X_({audioLevel:S,OPEN_THRESHOLD:w,HALF_OPEN_THRESHOLD:E,currentMouthValue:c,lerpSpeed:f,key:a,animationItem:m,pos:o})},50);let x;x=Date.now()+1e4,she({key:a,animationItem:m,pos:o,animationEndTime:x}),setTimeout(()=>{clearTimeout(ze.blinkTimerID)},1e4)}g==null||g.play(),g.onended=()=>{for(const y of C.gameplay.performController.performList)y.performName===t&&(d=!0,y.stopFunction(),C.gameplay.performController.unmountPerform(y.performName))}}},1)})}};function i1(e){return 3+(100-e)*1.5}function o1(e){return 200+(100-e)*15}function $N(){const e=pe(r=>r.userData.optionData.textboxFont);function t(){return dc(e).with(Wn.song,()=>'"思源宋体", serif').with(Wn.lxgw,()=>'"LXGW", serif').with(Wn.hei,()=>'"WebgalUI", serif').default(()=>'"WebgalUI", serif')}return t()}function Y_(e){switch(e){case 0:return 155;case 1:return 205;case 2:return 230;default:return 205}}const fhe="_TextBox_EventHandler_1jt23_2",hhe="_TextBox_Container_1jt23_10",dhe="_showSoftly_1jt23_1",phe="_TextBox_main_1jt23_18",vhe="_TextBox_main_miniavatarOff_1jt23_39",mhe="_TextBox_Background_1jt23_43",ghe="_TextBox_textElement_start_1jt23_56",yhe="_TextDelayShow_1jt23_1",_he="_outer_1jt23_64",xhe="_inner_1jt23_78",bhe="_zhanwei_1jt23_89",She="_TextBox_textElement_Settled_1jt23_97",whe="_TextBox_showName_1jt23_104",Ehe="_TextBox_ShowName_Background_1jt23_117",The="_miniAvatarContainer_1jt23_132",Che="_miniAvatarImg_1jt23_142",Ohe="_nameContainer_1jt23_150",Ahe="_outerName_1jt23_156",Phe="_innerName_1jt23_167",Rhe="_text_1jt23_174",Je={TextBox_EventHandler:fhe,TextBox_Container:hhe,showSoftly:dhe,TextBox_main:phe,TextBox_main_miniavatarOff:vhe,TextBox_Background:mhe,TextBox_textElement_start:ghe,TextDelayShow:yhe,outer:_he,inner:xhe,zhanwei:bhe,TextBox_textElement_Settled:She,TextBox_showName:whe,TextBox_ShowName_Background:Ehe,miniAvatarContainer:The,miniAvatarImg:Che,nameContainer:Ohe,outerName:Ahe,innerName:Phe,text:Rhe};function UN(e){const{textArray:t,textDelay:r,currentConcatDialogPrev:n,currentDialogKey:i,isText:o,isSafari:a,isFirefox:s,fontSize:u,miniAvatar:l,isHasName:c,showName:f,font:h,textDuration:d,isUseStroke:v,textboxOpacity:g,textSizeState:p}=e,m=r1("Stage/TextBox/textbox.scss");G.useEffect(()=>{function S(){[...document.querySelectorAll(".Textelement_start")].forEach(R=>{R.className=m("TextBox_textElement_Settled",Je.TextBox_textElement_Settled)})}return C.events.textSettle.on(S),()=>{C.events.textSettle.off(S)}},[]);let y=0;const _=f.map((S,w)=>{const E=S.map((R,A)=>{const P=R.reactNode;let F="",B="",$=!1;if(R.enhancedValue){$=!0;const z=R.enhancedValue;for(const ie of z){const{key:be,value:de}=ie;switch(be){case"style":F=de;break;case"tips":break;case"style-alltext":B=de;break}}}const Y=" "+Mu(F,{label:"showname"}),U=" "+Mu(B,{label:"showname"});return $?b.jsx("span",{style:{position:"relative"},children:b.jsxs("span",{className:Je.zhanwei+U,children:[P,b.jsx("span",{className:m("outerName",Je.outerName)+Y+U,children:P}),v&&b.jsx("span",{className:m("innerName",Je.innerName)+U,children:P})]})},A):b.jsx("span",{style:{position:"relative"},children:b.jsxs("span",{className:Je.zhanwei+U,children:[P,b.jsx("span",{className:m("outerName",Je.outerName)+Y+U,children:P}),v&&b.jsx("span",{className:m("innerName",Je.innerName)+U,children:P})]})},A)});return b.jsx("div",{style:{wordBreak:a||e.isFirefox?"break-all":void 0,display:a?"flex":void 0,flexWrap:a?"wrap":void 0},children:E},`text-line-${w}`)}),x=t.map((S,w)=>{const E=S.map((R,A)=>{const P=R.reactNode;let F="",B="";if(R.enhancedValue){const ie=R.enhancedValue;for(const be of ie){const{key:de,value:W}=be;switch(de){case"style":F=W;break;case"tips":break;case"style-alltext":B=W;break}}}let $=y*r;y++;let Y=n.length;n!==""&&y>=Y&&($=$-Y*r);const U=" "+Mu(F),z=" "+Mu(B);return y{const[e,t]=G.useState(!0);G.useEffect(()=>{const _=()=>{const x=Bh.height,S=Bh.width,w=window.innerHeight,E=window.innerWidth,R=w/x,A=E/S,P=E/x,F=w/S;[R,A,P,F].forEach(B=>{B<=.2?t(!1):t(!0)})};return window.addEventListener("resize",_),_(),()=>{window.removeEventListener("resize",_)}},[]);const r=pe(_=>_.stage),n=pe(_=>_.userData),i=i1(n.optionData.textSpeed),o=o1(n.optionData.textSpeed);let a=Y_(n.optionData.textSize)+"%";const s=$N(),u=r.showText!==""||r.showName!=="";let l=n.optionData.textSize;u&&r.showTextSize!==-1&&(a=Y_(r.showTextSize)+"%",l=r.showTextSize);const c=dc(l).with(on.small,()=>3).with(on.medium,()=>2).with(on.large,()=>2).default(()=>2),f=na(r.showText,c),h=r.showName!=="",d=na(r.showName,c),v=r.currentConcatDialogPrev,g=r.currentDialogKey,p=r.miniAvatar,m=n.optionData.textboxOpacity,y=UN;return b.jsx(y,{textArray:f,isText:u,textDelay:i,showName:d,isHasName:h,currentConcatDialogPrev:v,fontSize:a,currentDialogKey:g,isSafari:khe,isFirefox:Ihe,miniAvatar:p,textDuration:o,font:s,textSizeState:l,lineLimit:c,isUseStroke:e,textboxOpacity:m})};function zC(e){return!!e.match(/[\u4e00-\u9fa5]|[\u0800-\u4e00]|[\uac00-\ud7ff]/)}function na(e,t,r,n=!0){return e.split(new RegExp("(?Qb(s)).map(s=>Mhe(s)).map(s=>{const u=[];return s.forEach((l,c)=>{dc(l.type).with("SegmentType.String",()=>{const f=Lhe(l.value,n);u.push(...f.map(h=>({reactNode:h})))}).endsWith("SegmentType.Link",()=>{const f=l.value,h=b.jsx("span",{className:"__enhanced_text",children:b.jsxs("ruby",{children:[f.text,b.jsx("rt",{children:f.ruby})]},c+f.text)},f.text+`${c}`);u.push({reactNode:h,enhancedValue:f.values})})}),u}).slice(0,r?void 0:t)}function Lhe(e,t=!0){if(!e)return[""];const r=[];let n="",i=zC(e[0]);const o=a=>/[!-\/:-@\[-`{-~\u2000-\u206F\u3000-\u303F\uff00-\uffef]/g.test(a);for(const a of e)if(a===" "||a===" ")n&&(r.push(n),n=""),t?r.push(" "):r.push(a),i=!1;else if(zC(a)&&!o(a))!i&&n&&(r.push(n),n=""),r.push(a),i=!0;else{if(o(a)){n?(n+=a,r.push(n),n=""):r.length>0?r[r.length-1]+=a:r.push(a);continue}i&&n&&(r.push(n),n=""),n+=a,i=!1}return n&&r.push(n),r}function Mhe(e){const t=/(\[(.*?)\]\((.*?)\))|([^\[\]]+)/g,r=[];let n;for(;(n=t.exec(e))!==null;)if(n[1]){const i=n[2],o=n[3];let a=[],s="";if(o.match(/style=|tips=|ruby=|style-alltext=/)){a=Fhe(o);const u=a.find(l=>l.key==="ruby");u&&(s=u.value)}else s=o;r.push({type:"SegmentType.Link",value:{text:i,ruby:s,values:a}})}else{const i=n[0];r.push({type:"SegmentType.String",value:i})}return r.unshift({type:"SegmentType.String",value:""}),r}function Fhe(e){const t=[],r=/(\S+)=(.*?)(?=\s+\S+=|\s*$)/g;let n;for(;(n=r.exec(e))!==null;)t.push({key:n[1],value:n[2].replace(/~/g,":").trim()});return t}const Dhe=e=>{const t=D.getState().stage,r=D.getState().userData,n=D.dispatch;let i=Math.random().toString(),o=e.content;o&&(o=String(o).replace(/ {2,}/g,R=>" ".repeat(R.length)));const a=Pe(e,"concat"),s=Pe(e,"notend"),u=Pe(e,"speaker"),l=Pe(e,"clear"),c=Pe(e,"vocal");a?(i=t.currentDialogKey,o=t.showText+o,n(Te({key:"currentConcatDialogPrev",value:t.showText}))):n(Te({key:"currentConcatDialogPrev",value:""})),n(Te({key:"showText",value:o})),n(Te({key:"vocal",value:""})),r.optionData.voiceInterruption===xl.no&&c===null||(n(Te({key:"playVocal",value:""})),C.gameplay.performController.unmountPerform("vocal-play",!0)),n(Te({key:"currentDialogKey",value:i}));const f=i1(r.optionData.textSpeed),d=na(e.content,3).reduce((R,A)=>R+A.length,0),v=f*d;for(const R of e.args)if(R.key==="fontSize")switch(R.value){case"default":n(Te({key:"showTextSize",value:-1}));break;case"small":n(Te({key:"showTextSize",value:on.small}));break;case"medium":n(Te({key:"showTextSize",value:on.medium}));break;case"large":n(Te({key:"showTextSize",value:on.large}));break}let g=t.showName;u!==null&&(g=u),l&&(g=""),n(Te({key:"showName",value:g}));let p=null,m=0,y="",_="";for(const R of e.args)R.value===!0&&dc(R.key).with("left",()=>{y="left"}).with("right",()=>{y="right"}).endsWith("center",()=>{y="center"}),R.key==="figureId"&&(_=`${R.value.toString()}`);let x=80;const S=(R=!1)=>{let A=x+(Math.random()*60-30);Math.abs(A-x)<5&&(A=x+Math.sign(A-x)*5),x=Math.max(15,Math.min(A,100));const B=D.getState().stage.figureAssociatedAnimation.find(Y=>Y.targetId===_),$=_||`fig-${y}`;R&&(x=0),X_({audioLevel:x,OPEN_THRESHOLD:50,HALF_OPEN_THRESHOLD:25,currentMouthValue:0,lerpSpeed:1,key:$,animationItem:B,pos:y}),R||(p=setTimeout(S,50))};c?che(e):(_||y)&&(m=d*250,S());const w=h1();let E=o1(r.optionData.textSpeed)/2;return s&&(E=0),{performName:w,duration:v+E+m,isHoldOn:!1,stopFunction:()=>{C.events.textSettle.emit(),p&&(S(!0),clearTimeout(p))},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0,goNextWhenOver:s}};var a1={},Bhe={document:{}},yp=Object.prototype.hasOwnProperty,zN=function(e){return _p(e)?e.toLowerCase():e},nl=Array.isArray,jhe=function(e){return _p(e)?e.replace(/[A-Z]/g,function(t){return String.fromCharCode(t.charCodeAt(0)|32)}):e};"I".toLowerCase()!=="i"&&(zN=jhe);function Uh(e){var t=Function.prototype.constructor;delete Function.prototype.constructor;var r=e();return Function.prototype.constructor=t,r}var $he,s1=Object.prototype.toString,HN=Object.getPrototypeOf,$m=KN("ng");function Uhe(e){if(e==null||l1(e))return!1;if(nl(e)||_p(e)||$he)return!0;var t="length"in Object(e)&&e.length;return u1(t)&&(t>=0&&(t-1 in e||e instanceof Array)||typeof e.item=="function")}function vt(e,t,r){var n,i;if(e)if(XN(e))for(n in e)n!=="prototype"&&n!=="length"&&n!=="name"&&e.hasOwnProperty(n)&&t.call(r,e[n],n,e);else if(nl(e)||Uhe(e)){var o=typeof e!="object";for(n=0,i=e.length;n"u"}function $a(e){return typeof e<"u"}function WN(e){return e!==null&&typeof e=="object"}function qN(e){return e!==null&&typeof e=="object"&&!HN(e)}function _p(e){return typeof e=="string"}function u1(e){return typeof e=="number"}function XN(e){return typeof e=="function"}function l1(e){return e&&e.window===e}function YN(e){return e&&e.$evalAsync&&e.$watch}var Hhe=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array\]$/;function Vhe(e){return e&&u1(e.length)&&Hhe.test(s1.call(e))}function Whe(e){return s1.call(e)==="[object ArrayBuffer]"}function qhe(e,t){var r=[],n=[];if(t){if(Vhe(t)||Whe(t))throw $m("cpta","Can't copy! TypedArray destination cannot be mutated.");if(e===t)throw $m("cpi","Can't copy! Source and destination are identical.");return nl(t)?t.length=0:vt(t,function(s,u){u!=="$$hashKey"&&delete t[u]}),r.push(e),n.push(t),i(e,t)}return o(e);function i(s,u){var l=u.$$hashKey,c;if(nl(s))for(var f=0,h=s.length;f=0)return"...";t.push(n)}return n})}function HC(e){return typeof e=="function"?e.toString().replace(/ \{[\s\S]*$/,""):zhe(e)?"undefined":typeof e!="string"?Khe(e):e}function KN(e,t){return t=t||Error,function(){var r=2,n=arguments,i=n[0],o="["+(e?e+":":"")+i+"] ",a=n[1],s,u;for(o+=a.replace(/\{\d+\}/g,function(l){var c=+l.slice(1,-1),f=c+r;return f <= >= && || ! = |".split(" "),function(e){$f[e]=!0});var Zhe={n:` +`,f:"\f",r:"\r",t:" ",v:"\v","'":"'",'"':'"'};function Uf(e){this.options=e||{}}Uf.prototype={constructor:Uf,lex:function(e){for(this.text=e,this.index=0,this.tokens=[];this.index="0"&&e<="9"&&typeof e=="string"},isWhitespace:function(e){return e===" "||e==="\r"||e===" "||e===` +`||e==="\v"||e===" "},isIdentifierStart:function(e){return this.options.isIdentifierStart?this.options.isIdentifierStart(e,this.codePointAt(e)):this.isValidIdentifierStart(e)},isValidIdentifierStart:function(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="_"||e==="$"},isIdentifierContinue:function(e){return this.options.isIdentifierContinue?this.options.isIdentifierContinue(e,this.codePointAt(e)):this.isValidIdentifierContinue(e)},isValidIdentifierContinue:function(e,t){return this.isValidIdentifierStart(e,t)||this.isNumber(e)},codePointAt:function(e){return e.length===1?e.charCodeAt(0):(e.charCodeAt(0)<<10)+e.charCodeAt(1)-56613888},peekMultichar:function(){var e=this.text.charAt(this.index),t=this.peek();if(!t)return e;var r=e.charCodeAt(0),n=t.charCodeAt(0);return r>=55296&&r<=56319&&n>=56320&&n<=57343?e+t:e},isExpOperator:function(e){return e==="-"||e==="+"||this.isNumber(e)},throwError:function(e,t,r){r=r||this.index;var n=$a(t)?"s "+t+"-"+this.index+" ["+this.text.substring(t,r)+"]":" "+r;throw Ua("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",e,n,this.text)},readNumber:function(){for(var e="",t=this.index;this.index0&&!this.peek("}",")",";","]")&&e.push(this.expressionStatement()),!this.expect(";"))return{type:V.Program,body:e}},expressionStatement:function(){return{type:V.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var e=this.expression();this.expect("|");)e=this.filter(e);return e},expression:function(){return this.assignment()},assignment:function(){var e=this.ternary();if(this.expect("=")){if(!eL(e))throw Ua("lval","Trying to assign a value to a non l-value");e={type:V.AssignmentExpression,left:e,right:this.assignment(),operator:"="}}return e},ternary:function(){var e=this.logicalOR(),t,r;return this.expect("?")&&(t=this.expression(),this.consume(":"))?(r=this.expression(),{type:V.ConditionalExpression,test:e,alternate:t,consequent:r}):e},logicalOR:function(){for(var e=this.logicalAND();this.expect("||");)e={type:V.LogicalExpression,operator:"||",left:e,right:this.logicalAND()};return e},logicalAND:function(){for(var e=this.equality();this.expect("&&");)e={type:V.LogicalExpression,operator:"&&",left:e,right:this.equality()};return e},equality:function(){for(var e=this.relational(),t;t=this.expect("==","!=","===","!==");)e={type:V.BinaryExpression,operator:t.text,left:e,right:this.relational()};return e},relational:function(){for(var e=this.additive(),t;t=this.expect("<",">","<=",">=");)e={type:V.BinaryExpression,operator:t.text,left:e,right:this.additive()};return e},additive:function(){for(var e=this.multiplicative(),t;t=this.expect("+","-");)e={type:V.BinaryExpression,operator:t.text,left:e,right:this.multiplicative()};return e},multiplicative:function(){for(var e=this.unary(),t;t=this.expect("*","/","%");)e={type:V.BinaryExpression,operator:t.text,left:e,right:this.unary()};return e},unary:function(){var e;return(e=this.expect("+","-","!"))?{type:V.UnaryExpression,operator:e.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var e;this.expect("(")?(e=this.filterChain(),this.consume(")")):this.expect("[")?e=this.arrayDeclaration():this.expect("{")?e=this.object():this.selfReferential.hasOwnProperty(this.peek().text)?e=qhe(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?e={type:V.Literal,value:this.options.literals[this.consume().text]}:this.peek().identifier?e=this.identifier():this.peek().constant?e=this.constant():this.throwError("not a primary expression",this.peek());for(var t;t=this.expect("(","[",".");)t.text==="("?(e={type:V.CallExpression,callee:e,arguments:this.parseArguments()},this.consume(")")):t.text==="["?(e={type:V.MemberExpression,object:e,property:this.expression(),computed:!0},this.consume("]")):t.text==="."?e={type:V.MemberExpression,object:e,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return e},filter:function(e){for(var t=[e],r={type:V.CallExpression,callee:this.identifier(),arguments:t,filter:!0};this.expect(":");)t.push(this.expression());return r},parseArguments:function(){var e=[];if(this.peekToken().text!==")")do e.push(this.filterChain());while(this.expect(","));return e},identifier:function(){var e=this.consume();return e.identifier||this.throwError("is not a valid identifier",e),{type:V.Identifier,name:e.text}},constant:function(){return{type:V.Literal,value:this.consume().value}},arrayDeclaration:function(){var e=[];if(this.peekToken().text!=="]")do{if(this.peek("]"))break;e.push(this.expression())}while(this.expect(","));return this.consume("]"),{type:V.ArrayExpression,elements:e}},object:function(){var e=[],t;if(this.peekToken().text!=="}")do{if(this.peek("}"))break;t={type:V.Property,kind:"init"},this.peek().constant?(t.key=this.constant(),t.computed=!1,this.consume(":"),t.value=this.expression()):this.peek().identifier?(t.key=this.identifier(),t.computed=!1,this.peek(":")?(this.consume(":"),t.value=this.expression()):t.value=t.key):this.peek("[")?(this.consume("["),t.key=this.expression(),this.consume("]"),t.computed=!0,this.consume(":"),t.value=this.expression()):this.throwError("invalid key",this.peek()),e.push(t)}while(this.expect(","));return this.consume("}"),{type:V.ObjectExpression,properties:e}},throwError:function(e,t){throw Ua("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",t.text,e,t.index+1,this.text,this.text.substring(t.index))},consume:function(e){if(this.tokens.length===0)throw Ua("ueoe","Unexpected end of expression: {0}",this.text);var t=this.expect(e);return t||this.throwError("is unexpected, expecting ["+e+"]",this.peek()),t},peekToken:function(){if(this.tokens.length===0)throw Ua("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(e,t,r,n){return this.peekAhead(0,e,t,r,n)},peekAhead:function(e,t,r,n,i){if(this.tokens.length>e){var o=this.tokens[e],a=o.text;if(a===t||a===r||a===n||a===i||!t&&!r&&!n&&!i)return o}return!1},expect:function(e,t,r,n){var i=this.peek(e,t,r,n);return i?(this.tokens.shift(),i):!1}};function Qhe(e,t){return typeof e<"u"?e:t}function QN(e,t){return typeof e>"u"?t:typeof t>"u"?e:e+t}function Jhe(e,t){var r=e(t);if(!r)throw new Error("Filter '"+t+"' is not defined");return!r.$stateful}function Gt(e,t){var r,n,i;switch(e.type){case V.Program:r=!0,vt(e.body,function(o){Gt(o.expression,t),r=r&&o.expression.constant}),e.constant=r;break;case V.Literal:e.constant=!0,e.toWatch=[];break;case V.UnaryExpression:Gt(e.argument,t),e.constant=e.argument.constant,e.toWatch=e.argument.toWatch;break;case V.BinaryExpression:Gt(e.left,t),Gt(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=e.left.toWatch.concat(e.right.toWatch);break;case V.LogicalExpression:Gt(e.left,t),Gt(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=e.constant?[]:[e];break;case V.ConditionalExpression:Gt(e.test,t),Gt(e.alternate,t),Gt(e.consequent,t),e.constant=e.test.constant&&e.alternate.constant&&e.consequent.constant,e.toWatch=e.constant?[]:[e];break;case V.Identifier:e.constant=!1,e.toWatch=[e];break;case V.MemberExpression:Gt(e.object,t),e.computed&&Gt(e.property,t),e.constant=e.object.constant&&(!e.computed||e.property.constant),e.toWatch=[e];break;case V.CallExpression:i=e.filter?Jhe(t,e.callee.name):!1,r=i,n=[],vt(e.arguments,function(o){Gt(o,t),r=r&&o.constant,o.constant||n.push.apply(n,o.toWatch)}),e.constant=r,e.toWatch=i?n:[e];break;case V.AssignmentExpression:Gt(e.left,t),Gt(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=[e];break;case V.ArrayExpression:r=!0,n=[],vt(e.elements,function(o){Gt(o,t),r=r&&o.constant,o.constant||n.push.apply(n,o.toWatch)}),e.constant=r,e.toWatch=n;break;case V.ObjectExpression:r=!0,n=[],vt(e.properties,function(o){Gt(o.value,t),r=r&&o.value.constant&&!o.computed,o.value.constant||n.push.apply(n,o.value.toWatch)}),e.constant=r,e.toWatch=n;break;case V.ThisExpression:e.constant=!1,e.toWatch=[];break;case V.LocalsExpression:e.constant=!1,e.toWatch=[];break}}function JN(e){if(e.length===1){var t=e[0].expression,r=t.toWatch;return r.length!==1||r[0]!==t?r:void 0}}function eL(e){return e.type===V.Identifier||e.type===V.MemberExpression}function tL(e){if(e.body.length===1&&eL(e.body[0].expression))return{type:V.AssignmentExpression,left:e.body[0].expression,right:{type:V.NGValueParameter},operator:"="}}function rL(e){return e.body.length===0||e.body.length===1&&(e.body[0].expression.type===V.Literal||e.body[0].expression.type===V.ArrayExpression||e.body[0].expression.type===V.ObjectExpression)}function nL(e){return e.constant}function iL(e,t){this.astBuilder=e,this.$filter=t}iL.prototype={compile:function(e){var t=this,r=this.astBuilder.ast(e);this.state={nextId:0,filters:{},fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]},Gt(r,t.$filter);var n="",i;if(this.stage="assign",i=tL(r)){this.state.computing="assign";var o=this.nextId();this.recurse(i,o),this.return_(o),n="fn.assign="+this.generateFunction("assign","s,v,l")}var a=JN(r.body);t.stage="inputs",vt(a,function(c,f){var h="fn"+f;t.state[h]={vars:[],body:[],own:{}},t.state.computing=h;var d=t.nextId();t.recurse(c,d),t.return_(d),t.state.inputs.push(h),c.watchId=f}),this.state.computing="fn",this.stage="main",this.recurse(r);var s='"'+this.USE+" "+this.STRICT+`"; +`+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+n+this.watchFns()+"return fn;",u=new Function("$filter","getStringValue","ifDefined","plus",s)(this.$filter,ZN,Qhe,QN),l=function(c,f,h,d){return Uh(function(){return u(c,f,h,d)})};return l.assign=function(c,f,h){return Uh(function(){return u.assign(c,f,h)})},l.inputs=u.inputs,this.state=this.stage=void 0,l.ast=r,l.literal=rL(r),l.constant=nL(r),l},USE:"use",STRICT:"strict",watchFns:function(){var e=[],t=this.state.inputs,r=this;return vt(t,function(n){e.push("var "+n+"="+r.generateFunction(n,"s"))}),t.length&&e.push("fn.inputs=["+t.join(",")+"];"),e.join("")},generateFunction:function(e,t){return"function("+t+"){"+this.varsPrefix(e)+this.body(e)+"};"},filterPrefix:function(){var e=[],t=this;return vt(this.state.filters,function(r,n){e.push(r+"=$filter("+t.escape(n)+")")}),e.length?"var "+e.join(",")+";":""},varsPrefix:function(e){return this.state[e].vars.length?"var "+this.state[e].vars.join(",")+";":""},body:function(e){return this.state[e].body.join("")},recurse:function(e,t,r,n,i,o){var a,s,u=this,l,c,f;if(n=n||VN,!o&&$a(e.watchId)){t=t||this.nextId(),this.if_("i",this.lazyAssign(t,this.unsafeComputedMember("i",e.watchId)),this.lazyRecurse(e,t,r,n,i,!0));return}switch(e.type){case V.Program:vt(e.body,function(d,v){u.recurse(d.expression,void 0,void 0,function(g){s=g}),v!==e.body.length-1?u.current().body.push(s,";"):u.return_(s)});break;case V.Literal:c=this.escape(e.value),this.assign(t,c),n(t||c);break;case V.UnaryExpression:this.recurse(e.argument,void 0,void 0,function(d){s=d}),c=e.operator+"("+this.ifDefined(s,0)+")",this.assign(t,c),n(c);break;case V.BinaryExpression:this.recurse(e.left,void 0,void 0,function(d){a=d}),this.recurse(e.right,void 0,void 0,function(d){s=d}),e.operator==="+"?c=this.plus(a,s):e.operator==="-"?c=this.ifDefined(a,0)+e.operator+this.ifDefined(s,0):c="("+a+")"+e.operator+"("+s+")",this.assign(t,c),n(c);break;case V.LogicalExpression:t=t||this.nextId(),u.recurse(e.left,t),u.if_(e.operator==="&&"?t:u.not(t),u.lazyRecurse(e.right,t)),n(t);break;case V.ConditionalExpression:t=t||this.nextId(),u.recurse(e.test,t),u.if_(t,u.lazyRecurse(e.alternate,t),u.lazyRecurse(e.consequent,t)),n(t);break;case V.Identifier:t=t||this.nextId();var h=u.current().inAssignment;r&&(h?r.context=this.assign(this.nextId(),"s"):r.context=u.stage==="inputs"?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",e.name)+"?l:s"),r.computed=!1,r.name=e.name),u.if_(u.stage==="inputs"||u.not(u.getHasOwnProperty("l",e.name)),function(){u.if_(u.stage==="inputs"||u.and_("s",u.or_(u.isNull(u.nonComputedMember("s",e.name)),u.hasOwnProperty_("s",e.name))),function(){i&&i!==1&&u.if_(u.isNull(u.nonComputedMember("s",e.name)),u.lazyAssign(u.nonComputedMember("s",e.name),"{}")),u.assign(t,u.nonComputedMember("s",e.name))})},t&&function(){u.if_(u.hasOwnProperty_("l",e.name),u.lazyAssign(t,u.nonComputedMember("l",e.name)))}),n(t);break;case V.MemberExpression:a=r&&(r.context=this.nextId())||this.nextId(),t=t||this.nextId(),u.recurse(e.object,a,void 0,function(){var d=null,v=u.current().inAssignment;e.computed?(s=u.nextId(),v||u.state.computing==="assign"?d=u.unsafeComputedMember(a,s):d=u.computedMember(a,s)):(v||u.state.computing==="assign"?d=u.unsafeNonComputedMember(a,e.property.name):d=u.nonComputedMember(a,e.property.name),s=e.property.name),e.computed&&e.property.type===V.Literal&&u.recurse(e.property,s),u.if_(u.and_(u.notNull(a),u.or_(u.isNull(d),u.hasOwnProperty_(a,s,e.computed))),function(){e.computed?(e.property.type!==V.Literal&&u.recurse(e.property,s),i&&i!==1&&u.if_(u.not(d),u.lazyAssign(d,"{}")),u.assign(t,d),r&&(r.computed=!0,r.name=s)):(i&&i!==1&&u.if_(u.isNull(d),u.lazyAssign(d,"{}")),u.assign(t,d),r&&(r.computed=!1,r.name=e.property.name))},function(){u.assign(t,"undefined")}),n(t)},!!i);break;case V.CallExpression:t=t||this.nextId(),e.filter?(s=u.filter(e.callee.name),l=[],vt(e.arguments,function(d){var v=u.nextId();u.recurse(d,v),l.push(v)}),c=s+".call("+s+","+l.join(",")+")",u.assign(t,c),n(t)):(s=u.nextId(),a={},l=[],u.recurse(e.callee,s,a,function(){u.if_(u.notNull(s),function(){if(vt(e.arguments,function(v){u.recurse(v,e.constant?void 0:u.nextId(),void 0,function(g){l.push(g)})}),a.name){var d=u.member(a.context,a.name,a.computed);c="("+d+" === null ? null : "+u.unsafeMember(a.context,a.name,a.computed)+".call("+[a.context].concat(l).join(",")+"))"}else c=s+"("+l.join(",")+")";u.assign(t,c)},function(){u.assign(t,"undefined")}),n(t)}));break;case V.AssignmentExpression:s=this.nextId(),a={},u.current().inAssignment=!0,this.recurse(e.left,void 0,a,function(){u.if_(u.and_(u.notNull(a.context),u.or_(u.hasOwnProperty_(a.context,a.name),u.isNull(u.member(a.context,a.name,a.computed)))),function(){u.recurse(e.right,s),c=u.member(a.context,a.name,a.computed)+e.operator+s,u.assign(t,c),n(t||c)}),u.current().inAssignment=!1,u.recurse(e.right,s),u.current().inAssignment=!0},1),u.current().inAssignment=!1;break;case V.ArrayExpression:l=[],vt(e.elements,function(d){u.recurse(d,e.constant?void 0:u.nextId(),void 0,function(v){l.push(v)})}),c="["+l.join(",")+"]",this.assign(t,c),n(t||c);break;case V.ObjectExpression:l=[],f=!1,vt(e.properties,function(d){d.computed&&(f=!0)}),f?(t=t||this.nextId(),this.assign(t,"{}"),vt(e.properties,function(d){d.computed?(a=u.nextId(),u.recurse(d.key,a)):a=d.key.type===V.Identifier?d.key.name:""+d.key.value,s=u.nextId(),u.recurse(d.value,s),u.assign(u.unsafeMember(t,a,d.computed),s)})):(vt(e.properties,function(d){u.recurse(d.value,e.constant?void 0:u.nextId(),void 0,function(v){l.push(u.escape(d.key.type===V.Identifier?d.key.name:""+d.key.value)+":"+v)})}),c="{"+l.join(",")+"}",this.assign(t,c)),n(t||c);break;case V.ThisExpression:this.assign(t,"s"),n(t||"s");break;case V.LocalsExpression:this.assign(t,"l"),n(t||"l");break;case V.NGValueParameter:this.assign(t,"v"),n(t||"v");break}},getHasOwnProperty:function(e,t){var r=e+"."+t,n=this.current().own;return n.hasOwnProperty(r)||(n[r]=this.nextId(!1,e+"&&("+this.escape(t)+" in "+e+")")),n[r]},assign:function(e,t){if(e)return this.current().body.push(e,"=",t,";"),e},filter:function(e){return yp.call(this.state.filters,e)||(this.state.filters[e]=this.nextId(!0)),this.state.filters[e]},ifDefined:function(e,t){return"ifDefined("+e+","+this.escape(t)+")"},plus:function(e,t){return"plus("+e+","+t+")"},return_:function(e){this.current().body.push("return ",e,";")},if_:function(e,t,r){if(e===!0)t();else{var n=this.current().body;n.push("if(",e,"){"),t(),n.push("}"),r&&(n.push("else{"),r(),n.push("}"))}},or_:function(e,t){return"("+e+") || ("+t+")"},hasOwnProperty_:function(e,t,r){return r?"(Object.prototype.hasOwnProperty.call("+e+","+t+"))":"(Object.prototype.hasOwnProperty.call("+e+",'"+t+"'))"},and_:function(e,t){return"("+e+") && ("+t+")"},not:function(e){return"!("+e+")"},isNull:function(e){return e+"==null"},notNull:function(e){return e+"!=null"},nonComputedMember:function(e,t){var r=/^[$_a-zA-Z][$_a-zA-Z0-9]*$/,n=/[^$_a-zA-Z0-9]/g,i="";return r.test(t)?i=e+"."+t:(t=t.replace(n,this.stringEscapeFn),i=e+'["'+t+'"]'),i},unsafeComputedMember:function(e,t){return e+"["+t+"]"},unsafeNonComputedMember:function(e,t){return this.nonComputedMember(e,t)},computedMember:function(e,t){return this.state.computing==="assign"?this.unsafeComputedMember(e,t):"("+e+".hasOwnProperty("+t+") ? "+e+"["+t+"] : undefined)"},unsafeMember:function(e,t,r){return r?this.unsafeComputedMember(e,t):this.unsafeNonComputedMember(e,t)},member:function(e,t,r){return r?this.computedMember(e,t):this.nonComputedMember(e,t)},getStringValue:function(e){this.assign(e,"getStringValue("+e+")")},lazyRecurse:function(e,t,r,n,i,o){var a=this;return function(){a.recurse(e,t,r,n,i,o)}},lazyAssign:function(e,t){var r=this;return function(){r.assign(e,t)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)},escape:function(e){if(_p(e))return"'"+e.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(u1(e))return e.toString();if(e===!0)return"true";if(e===!1)return"false";if(e===null)return"null";if(typeof e>"u")return"undefined";throw Ua("esc","IMPOSSIBLE")},nextId:function(e,t){var r="v"+this.state.nextId++;return e||this.current().vars.push(r+(t?"="+t:"")),r},current:function(){return this.state[this.state.computing]}};function oL(e,t){this.astBuilder=e,this.$filter=t}oL.prototype={compile:function(e){var t=this,r=this.astBuilder.ast(e);Gt(r,t.$filter);var n,i;(n=tL(r))&&(i=this.recurse(n));var o=JN(r.body),a;o&&(a=[],vt(o,function(c,f){var h=t.recurse(c);c.input=h,a.push(h),c.watchId=f}));var s=[];vt(r.body,function(c){s.push(t.recurse(c.expression))});var u=r.body.length===0?VN:r.body.length===1?s[0]:function(c,f){var h;return vt(s,function(d){h=d(c,f)}),h};i&&(u.assign=function(c,f,h){return i(c,h,f)});var l=function(c,f){return Uh(function(){return u(c,f)})};return l.assign=function(c,f,h){return Uh(function(){return u.assign(c,f,h)})},a&&(l.inputs=a),l.ast=r,l.literal=rL(r),l.constant=nL(r),l},recurse:function(e,t,r){var n,i,o=this,a;if(e.input)return this.inputs(e.input,e.watchId);switch(e.type){case V.Literal:return this.value(e.value,t);case V.UnaryExpression:return i=this.recurse(e.argument),this["unary"+e.operator](i,t);case V.BinaryExpression:return n=this.recurse(e.left),i=this.recurse(e.right),this["binary"+e.operator](n,i,t);case V.LogicalExpression:return n=this.recurse(e.left),i=this.recurse(e.right),this["binary"+e.operator](n,i,t);case V.ConditionalExpression:return this["ternary?:"](this.recurse(e.test),this.recurse(e.alternate),this.recurse(e.consequent),t);case V.Identifier:return o.identifier(e.name,t,r);case V.MemberExpression:return n=this.recurse(e.object,!1,!!r),e.computed||(i=e.property.name),e.computed&&(i=this.recurse(e.property)),e.computed?this.computedMember(n,i,t,r):this.nonComputedMember(n,i,t,r);case V.CallExpression:return a=[],vt(e.arguments,function(s){a.push(o.recurse(s))}),e.filter&&(i=this.$filter(e.callee.name)),e.filter||(i=this.recurse(e.callee,!0)),e.filter?function(s,u,l,c){for(var f=[],h=0;h":function(e,t,r){return function(n,i,o,a){var s=e(n,i,o,a)>t(n,i,o,a);return r?{value:s}:s}},"binary<=":function(e,t,r){return function(n,i,o,a){var s=e(n,i,o,a)<=t(n,i,o,a);return r?{value:s}:s}},"binary>=":function(e,t,r){return function(n,i,o,a){var s=e(n,i,o,a)>=t(n,i,o,a);return r?{value:s}:s}},"binary&&":function(e,t,r){return function(n,i,o,a){var s=e(n,i,o,a)&&t(n,i,o,a);return r?{value:s}:s}},"binary||":function(e,t,r){return function(n,i,o,a){var s=e(n,i,o,a)||t(n,i,o,a);return r?{value:s}:s}},"ternary?:":function(e,t,r,n){return function(i,o,a,s){var u=e(i,o,a,s)?t(i,o,a,s):r(i,o,a,s);return n?{value:u}:u}},value:function(e,t){return function(){return t?{context:void 0,name:void 0,value:e}:e}},identifier:function(e,t,r){return function(n,i){var o=i&&e in i?i:n;r&&r!==1&&o&&o[e]==null&&(o[e]={});var a;return o&&yp.call(o,e)&&(a=o?o[e]:void 0),t?{context:o,name:e,value:a}:a}},computedMember:function(e,t,r,n){return function(i,o,a,s){var u=e(i,o,a,s),l,c;return u!=null&&(l=t(i,o,a,s),l=ZN(l),n&&n!==1&&u&&!u[l]&&(u[l]={}),Object.prototype.hasOwnProperty.call(u,l)&&(c=u[l])),r?{context:u,name:l,value:c}:c}},nonComputedMember:function(e,t,r,n){return function(i,o,a,s){var u=e(i,o,a,s);n&&n!==1&&u&&u[t]==null&&(u[t]={});var l=void 0;return u!=null&&Object.prototype.hasOwnProperty.call(u,t)&&(l=u[t]),r?{context:u,name:t,value:l}:l}},inputs:function(e,t){return function(r,n,i,o){return o?o[t]:e(r,n,i)}}};var K_=function(t,r,n){this.lexer=t,this.$filter=r,n=n||{},n.handleThis=n.handleThis!=null?n.handleThis:!0,this.options=n,this.ast=new V(t,n),this.ast.selfReferential={$locals:{type:V.LocalsExpression}},n.handleThis&&(this.ast.selfReferential.this={type:V.ThisExpression}),this.astCompiler=n.csp?new oL(this.ast,r):new iL(this.ast,r)};K_.prototype={constructor:K_,parse:function(e){return this.astCompiler.compile(e)}};a1.Lexer=Uf;a1.Parser=K_;var aL=a1,ede={},tde=aL.Lexer,rde=aL.Parser;function nde(e){return e=e||{},e.filters&&(e.cache=e.cache||{}),e.cache=e.cache||c1.cache,e.filters=e.filters||ede,e}function ide(e){return{handleThis:e.handleThis!=null?e.handleThis:!0,csp:e.csp!=null?e.csp:!1,literals:e.literals!=null?e.literals:{true:!0,false:!1,null:null,undefined:void 0}}}function c1(e,t){if(typeof e!="string")throw new TypeError("src must be a string, instead saw '"+typeof e+"'");t=nde(t);var r=t,n=ide(t),i=new tde(r),o=new rde(i,function(l){return t.filters[l]},n);if(!t.cache)return o.parse(e);delete t.src;var a=JSON.stringify(Object.assign({src:e},t)),s=t.cache[a];return s||(s=t.cache[a]=o.parse(e)),s}c1.cache=Object.create(null);var sL=c1;const ode=e=>{let t=!1;e.args.forEach(n=>{n.key==="global"&&(t=!0)});let r;if(t?r=rz:r=h2,e.content.match(/\s*=\s*/)){const n=e.content.split(/\s*=\s*/)[0],i=e.content.split(/\s*=\s*/)[1];if(i==="random()")D.dispatch(r({key:n,value:Math.random()}));else if(i.match(/[+\-*\/()]/)){const a=i.split(/([+\-*\/()])/g).map(u=>{if(!u.trim().match(/^[a-zA-Z_$][a-zA-Z0-9_.]*$/))return u;const l=Gh(u.trim(),!0);return typeof l=="string"?`'${l}'`:l}).reduce((u,l)=>u+l,"");let s="";try{s=sL(a)()}catch(u){te.error("expression compile error",u)}D.dispatch(r({key:n,value:s}))}else i.match(/true|false/)?(i.match(/true/)&&D.dispatch(r({key:n,value:!0})),i.match(/false/)&&D.dispatch(r({key:n,value:!1}))):i.length===0?D.dispatch(r({key:n,value:""})):isNaN(Number(i))?D.dispatch(r({key:n,value:Gh(i,!0)})):D.dispatch(r({key:n,value:Number(i)}));t?(te.debug("设置全局变量:",{key:n,value:D.getState().userData.globalGameVar[n]}),zh()):te.debug("设置变量:",{key:n,value:D.getState().stage.GameVar[n]})}return{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function ade(e){let t;const r=D.getState().stage,n=D.getState().userData,i={stage:r,userData:n};if(r.GameVar.hasOwnProperty(e))t=r.GameVar[e];else if(n.globalGameVar.hasOwnProperty(e))t=n.globalGameVar[e];else if(e.startsWith("$")){const o=e.replace("$","");t=wK(i,o,void 0)}return t}function Gh(e,t=!1){const r=ade(e);return r??(te.warn("valueFromState result null, key = "+e),t?e:`{${e}}`)}const sde=e=>{const t=D.getState().stage,r=D.getState().userData,n=D.dispatch,i={stageGameVar:t.GameVar,globalGameVar:r.globalGameVar};n(Te({key:"showText",value:JSON.stringify(i)})),n(Te({key:"showName",value:"展示变量"})),te.debug("展示变量:",i),setTimeout(()=>{C.events.textSettle.emit()},0);const o=h1(),a=750-r.optionData.textSpeed*250;return{performName:o,duration:a,isHoldOn:!1,stopFunction:()=>{C.events.textSettle.emit()},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function Be(e,t,r){return{scriptType:e,scriptFunction:t,...r}}const uL={};function ude(e){const t={};for(const[r,n]of Object.entries(e))t[r]=uL[n.scriptType]={scriptString:r,...n};return t}const lde=e=>{const{content:t}=e,r=t.split(",");for(const n of r){const i=n.split("->");if(i.length>=2){const o=i[0],a=i[1];D.dispatch(Mt.replaceUIlable([o,a]))}}return{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}},lL=ude({intro:Be(ke.intro,kfe),changeBg:Be(ke.changeBg,yle),changeFigure:Be(ke.changeFigure,_le),miniAvatar:Be(ke.miniAvatar,Lfe,{next:!0}),changeScene:Be(ke.changeScene,xle),choose:Be(ke.choose,ufe),end:Be(ke.end,nhe),bgm:Be(ke.bgm,eW,{next:!0}),playVideo:Be(ke.video,Gfe),setComplexAnimation:Be(ke.setComplexAnimation,Wfe),setFilter:Be(ke.setFilter,Xfe),pixiInit:Be(ke.pixiInit,ohe,{next:!0}),pixiPerform:Be(ke.pixi,$fe,{next:!0}),label:Be(ke.label,Nfe,{next:!0}),jumpLabel:Be(ke.jumpLabel,ihe),setVar:Be(ke.setVar,ode,{next:!0}),showVars:Be(ke.showVars,sde),unlockCg:Be(ke.unlockCg,rhe,{next:!0}),unlockBgm:Be(ke.unlockBgm,the,{next:!0}),say:Be(ke.say,Dhe),filmMode:Be(ke.filmMode,ffe,{next:!0}),callScene:Be(ke.callScene,Oq),setTextbox:Be(ke.setTextbox,Kfe),setAnimation:Be(ke.setAnimation,zfe),playEffect:Be(ke.playEffect,Ufe,{next:!0}),setTempAnimation:Be(ke.setTempAnimation,Yfe),__commment:Be(ke.comment,cfe,{next:!0}),setTransform:Be(ke.setTransform,Zfe),setTransition:Be(ke.setTransition,ehe,{next:!0}),getUserInput:Be(ke.getUserInput,yfe),applyStyle:Be(ke.applyStyle,lde,{next:!0})}),cL=Object.values(lL),cde=cL.filter(e=>e.next).map(e=>e.scriptType),xp=new JV(fz,$r,cde,cL),On=(e,t,r)=>{const n=xp.parse(e,t,r);return te.info(`解析场景:${t},数据为:`,n),n},f1=e=>{var n;let t=cz;t=(((n=uL[e.command])==null?void 0:n.scriptFunction)??lL.say.scriptFunction)(e),t.arrangePerformPromise?t.arrangePerformPromise.then(i=>C.gameplay.performController.arrangeNewPerform(i,e)):C.gameplay.performController.arrangeNewPerform(t,e)},fde=e=>{C.sceneManager.lockSceneWrite||(C.sceneManager.lockSceneWrite=!0,ii(e.sceneUrl).then(t=>{C.sceneManager.sceneData.currentScene=On(t,e.sceneName,e.sceneUrl),C.sceneManager.sceneData.currentSentenceId=e.continueLine+1,te.debug("现在恢复场景,恢复后场景:",C.sceneManager.sceneData.currentScene),C.sceneManager.lockSceneWrite=!1,nr()}).catch(t=>{te.error("场景调用错误",t),C.sceneManager.lockSceneWrite=!1}))};function hde(e){try{return sL(e)()}catch{return!1}}const Z_=e=>{if(e===void 0)return!0;const r=e.split(/([+\-*\/()>=|<=|==|&&|\|\||!=)/g).map(n=>n.match(/[a-zA-Z]/)?n.match(/true/)||n.match(/false/)?n:Gh(n,!0):n).reduce((n,i)=>n+i,"");return!!hde(r)},fL=()=>{if(C.sceneManager.sceneData.currentSentenceId>C.sceneManager.sceneData.currentScene.sentenceList.length-1){if(C.sceneManager.sceneData.sceneStack.length!==0){const l=C.sceneManager.sceneData.sceneStack.pop();l!==void 0&&fde(l)}return}const e=C.sceneManager.sceneData.currentScene.sentenceList[C.sceneManager.sceneData.currentSentenceId],t=l=>{let c=l;const f=c.match(new RegExp("(?{const d=Gh(h.replace(new RegExp("(?{e.content=t(e.content),e.args.forEach(l=>{l.value&&typeof l.value=="string"&&(l.value=t(l.value))})})();let n=!0,i=!1,o="";if(e.args.forEach(l=>{l.key==="when"&&(i=!0,o=l.value.toString())}),i&&(n=Z_(o)),!n){te.warn("不满足条件,跳过本句!"),C.sceneManager.sceneData.currentSentenceId++,nr();return}f1(e);let a=!1;e.args.forEach(l=>{l.key==="next"&&l.value&&(a=!0)});let s=e.command===ke.say;e.args.forEach(l=>{l.key==="notend"&&l.value===!0&&(s=!1)});let u;if(a){C.sceneManager.sceneData.currentSentenceId++,fL();return}setTimeout(()=>{u=D.getState().stage;const l={currentStageState:u,globalGameVar:D.getState().userData.globalGameVar};te.debug("本条语句执行结果",l),s&&C.backlogManager.saveCurrentStateToBacklog()},0),C.sceneManager.sceneData.currentSentenceId++},nr=()=>{if(C.events.userInteractNext.emit(),D.getState().GUI.showTitle)return;let t=!1;if(C.gameplay.performController.performList.forEach(i=>{i.blockingNext()&&(t=!0)}),t){te.warn("next 被阻塞!");return}let r=!0;if(C.gameplay.performController.performList.forEach(i=>{!i.isHoldOn&&!i.skipNextCollect&&(r=!1)}),r){const i=D.getState().stage,o=bt(i);for(let a=0;aMath.random().toString().substring(0,10);class dde{constructor(){oe(this,"performList",[]);oe(this,"timeoutList",[])}arrangeNewPerform(t,r,n=!0){if(this.performList.findIndex(o=>o.performName===t.performName)>-1)for(let o=0;o{t.isHoldOn||this.unmountPerform(t.performName)},t.duration),r.args.find(o=>o.key==="continue"&&o.value===!0)&&(t.goNextWhenOver=!0),this.performList.push(t)}}unmountPerform(t,r=!1){if(r)for(let n=0;n{n.blockingAuto()&&(t=!0)}),t?setTimeout(this.goNextWhenOver,100):nr()}}class pde{constructor(){oe(this,"isAuto",!1);oe(this,"isFast",!1);oe(this,"autoInterval",null);oe(this,"fastInterval",null);oe(this,"autoTimeout",null);oe(this,"pixiStage",null);oe(this,"performController",new dde)}resetGamePlay(){this.performController.timeoutList=[],this.isAuto=!1,this.isFast=!1;const t=this.autoInterval;t!==null&&clearInterval(t),this.autoInterval=null;const r=this.fastInterval;r!==null&&clearInterval(r),this.fastInterval=null;const n=this.autoTimeout;n!==null&&clearInterval(n),this.autoTimeout=null}}function vde(e){return{all:e=e||new Map,on:function(t,r){var n=e.get(t);n?n.push(r):e.set(t,[r])},off:function(t,r){var n=e.get(t);n&&(r?n.splice(n.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var n=e.get(t);n&&n.slice().map(function(i){i(r)}),(n=e.get("*"))&&n.slice().map(function(i){i(t,r)})}}}class mde{constructor(){oe(this,"textSettle",lf("text-settle"));oe(this,"userInteractNext",lf("__NEXT"));oe(this,"fullscreenDbClick",lf("fullscreen-dbclick"));oe(this,"styleUpdate",lf("style-update"))}}const Um=vde();function lf(e){return{on:(t,r)=>{Um.on(`${e}-${r??""}`,t)},emit:(t,r)=>{Um.emit(`${e}-${r??""}`,t)},off:(t,r)=>{Um.off(`${e}-${r??""}`,t)}}}class gde{constructor(){oe(this,"sceneManager",new uz);oe(this,"backlogManager",new sz(this.sceneManager));oe(this,"animationManager",new lz);oe(this,"gameplay",new pde);oe(this,"gameName","");oe(this,"gameKey","");oe(this,"events",new mde)}}const C=new gde,et=hL(()=>{const e=D.getState().userData;Jo.setItem(C.gameKey,e).then(()=>{te.info("写入本地存储")})},100),Hl=hL(()=>{Jo.getItem(C.gameKey).then(e=>{if(!e||!dL(e)){te.warn("现在重置数据"),et();return}D.dispatch(wx(e))})},100);function hL(e,t){let r;function n(...i){clearTimeout(r);let o;return r=setTimeout(()=>{o=e.apply(n,i)},t),o}return n}const zh=()=>{const e=D.getState().userData;Jo.setItem(C.gameKey,e).then(()=>{Jo.getItem(C.gameKey).then(t=>{if(!t){et();return}D.dispatch(wx(t))}),te.info("同步本地存储")})};function dL(e){let t=!0;for(const r in Qg)e.hasOwnProperty(r)||(t=!1);return t}async function pL(){const e=await Jo.getItem(C.gameKey);if(!e||!dL(e)){const t=D.getState().userData;return te.warn("现在重置数据"),await Jo.setItem(C.gameKey,t)}else D.dispatch(wx(e))}var Ke=(e=>(e[e.Save=0]="Save",e[e.Load=1]="Load",e[e.Option=2]="Option",e))(Ke||{});const yde={showBacklog:!1,showStarter:!0,showTitle:!0,showMenuPanel:!1,showTextBox:!0,showControls:!0,controlsVisibility:!0,currentMenuTag:Ke.Option,titleBg:"",titleBgm:"",logoImage:[],showExtra:!1,showGlobalDialog:!1,showPanicOverlay:!1,isEnterGame:!1,isShowLogo:!0},vL=ld({name:"gui",initialState:yde,reducers:{setVisibility:(e,t)=>{Hl();const{component:r,visibility:n}=t.payload;e[r]=n},setMenuPanelTag:(e,t)=>{Hl(),e.currentMenuTag=t.payload},setGuiAsset:(e,t)=>{const{asset:r,value:n}=t.payload;e[r]=n},setLogoImage:(e,t)=>{e.logoImage=[...t.payload]}}}),{setVisibility:Ie,setMenuPanelTag:qo,setGuiAsset:Hh,setLogoImage:_de}=vL.actions,xde=vL.reducer,D=_3({reducer:{stage:KG,GUI:xde,userData:oz,saveData:Kae},middleware:jP({serializableCheck:!1})});let VC;function d1(e,t=0,r=100){if(te.debug("playing bgm"+e),e===""){VC=setTimeout(()=>{D.dispatch(Te({key:"bgm",value:{src:"",enter:0,volume:100}}))},t);const n=D.getState().stage.bgm.src;D.dispatch(Te({key:"bgm",value:{src:n,enter:-t,volume:r}}))}else clearTimeout(VC),D.dispatch(Te({key:"bgm",value:{src:e,enter:t,volume:r}}));setTimeout(()=>{const n=document.getElementById("currentBgm");n.src&&(n==null||n.play())},0)}const bde=()=>{Wd(!0);const e=$r("start.txt",jr.scene);ii(e).then(t=>{C.sceneManager.sceneData.currentScene=On(t,"start.txt",e),nr()}),D.dispatch(Ie({component:"showTitle",visibility:!1}))};async function Sde(){if(fc(D.getState().stage.bgName),await Jae()&&C.sceneManager.sceneData.currentSentenceId===0){await ese();return}C.sceneManager.sceneData.currentSentenceId===0&&C.sceneManager.sceneData.currentScene.sceneName==="start.txt"?nr():Ub()}function p1(e,t){if(e==null)return{};var r=tce(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var wde={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0};const Ede=pr(wde);var Tde=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function WC(e){var t={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},r=e.match(/<\/?([^\s]+?)[/\s>]/);if(r&&(t.name=r[1],(Ede[r[1]]||e.charAt(e.length-2)==="/")&&(t.voidElement=!0),t.name.startsWith("!--"))){var n=e.indexOf("-->");return{type:"comment",comment:n!==-1?e.slice(4,n):""}}for(var i=new RegExp(Tde),o=null;(o=i.exec(e))!==null;)if(o[0].trim())if(o[1]){var a=o[1].trim(),s=[a,""];a.indexOf("=")>-1&&(s=a.split("=")),t.attrs[s[0]]=s[1],i.lastIndex--}else o[2]&&(t.attrs[o[2]]=o[3].trim().substring(1,o[3].length-1));return t}var Cde=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,Ode=/^\s*$/,Ade=Object.create(null);function mL(e,t){switch(t.type){case"text":return e+t.content;case"tag":return e+="<"+t.name+(t.attrs?function(r){var n=[];for(var i in r)n.push(i+'="'+r[i]+'"');return n.length?" "+n.join(" "):""}(t.attrs):"")+(t.voidElement?"/>":">"),t.voidElement?e:e+t.children.reduce(mL,"")+"";case"comment":return e+""}}var Pde={parse:function(e,t){t||(t={}),t.components||(t.components=Ade);var r,n=[],i=[],o=-1,a=!1;if(e.indexOf("<")!==0){var s=e.indexOf("<");n.push({type:"text",content:s===-1?e:e.substring(0,s)})}return e.replace(Cde,function(u,l){if(a){if(u!=="")return;a=!1}var c,f=u.charAt(1)!=="/",h=u.startsWith("");return{type:"comment",comment:n!==-1?t.slice(4,n):""}}for(var i=new RegExp(roe),a=null;(a=i.exec(t))!==null;)if(a[0].trim())if(a[1]){var o=a[1].trim(),s=[o,""];o.indexOf("=")>-1&&(s=o.split("=")),e.attrs[s[0]]=s[1],i.lastIndex--}else a[2]&&(e.attrs[a[2]]=a[3].trim().substring(1,a[3].length-1));return e}var noe=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,ioe=/^\s*$/,aoe=Object.create(null);function vN(t,e){switch(e.type){case"text":return t+e.content;case"tag":return t+="<"+e.name+(e.attrs?function(r){var n=[];for(var i in r)n.push(i+'="'+r[i]+'"');return n.length?" "+n.join(" "):""}(e.attrs):"")+(e.voidElement?"/>":">"),e.voidElement?t:t+e.children.reduce(vN,"")+"";case"comment":return t+""}}var ooe={parse:function(t,e){e||(e={}),e.components||(e.components=aoe);var r,n=[],i=[],a=-1,o=!1;if(t.indexOf("<")!==0){var s=t.indexOf("<");n.push({type:"text",content:s===-1?t:t.substring(0,s)})}return t.replace(noe,function(u,l){if(o){if(u!=="")return;o=!1}var c,f=u.charAt(1)!=="/",h=u.startsWith(")]*-->)?\s*\]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i,e}(na),rw=function(t){wt(e,t);function e(r,n){var i=this;if(n=n||{},!(r instanceof HTMLVideoElement)){var a=document.createElement("video");a.setAttribute("preload","auto"),a.setAttribute("webkit-playsinline",""),a.setAttribute("playsinline",""),typeof r=="string"&&(r=[r]);var o=r[0].src||r[0];na.crossOrigin(a,o,n.crossorigin);for(var s=0;s2},e.prototype._onPlayStart=function(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(Or.shared.add(this.update,this),this._isConnectedToTicker=!0)},e.prototype._onPlayStop=function(){this._isConnectedToTicker&&(Or.shared.remove(this.update,this),this._isConnectedToTicker=!1)},e.prototype._onCanPlay=function(){var r=this.source;r.removeEventListener("canplay",this._onCanPlay),r.removeEventListener("canplaythrough",this._onCanPlay);var n=this.valid;this.resize(r.videoWidth,r.videoHeight),!n&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&r.play()},e.prototype.dispose=function(){this._isConnectedToTicker&&(Or.shared.remove(this.update,this),this._isConnectedToTicker=!1);var r=this.source;r&&(r.removeEventListener("error",this._onError,!0),r.pause(),r.src="",r.load()),t.prototype.dispose.call(this)},Object.defineProperty(e.prototype,"autoUpdate",{get:function(){return this._autoUpdate},set:function(r){r!==this._autoUpdate&&(this._autoUpdate=r,!this._autoUpdate&&this._isConnectedToTicker?(Or.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(Or.shared.add(this.update,this),this._isConnectedToTicker=!0))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"updateFPS",{get:function(){return this._updateFPS},set:function(r){r!==this._updateFPS&&(this._updateFPS=r)},enumerable:!1,configurable:!0}),e.test=function(r,n){return globalThis.HTMLVideoElement&&r instanceof HTMLVideoElement||e.TYPES.indexOf(n)>-1},e.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],e.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},e}(na),nw=function(t){wt(e,t);function e(r){return t.call(this,r)||this}return e.test=function(r){return!!globalThis.createImageBitmap&&typeof ImageBitmap<"u"&&r instanceof ImageBitmap},e}(na);hf.push(um,nw,JS,rw,tw,Ms,ew,QS);var SL={__proto__:null,Resource:_s,BaseImageResource:na,INSTALLED:hf,autoDetectResource:sm,AbstractMultiResource:lm,ArrayResource:QS,BufferResource:Ms,CanvasResource:JS,CubeResource:ew,ImageResource:um,SVGResource:tw,VideoResource:rw,ImageBitmapResource:nw},Ape=function(t){wt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.upload=function(r,n,i){var a=r.gl;a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.alphaMode===Rn.UNPACK);var o=n.realWidth,s=n.realHeight;return i.width===o&&i.height===s?a.texSubImage2D(n.target,0,0,0,o,s,n.format,i.type,this.data):(i.width=o,i.height=s,a.texImage2D(n.target,0,i.internalFormat,o,s,0,n.format,i.type,this.data)),!0},e}(Ms),xp=function(){function t(e,r){this.width=Math.round(e||100),this.height=Math.round(r||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new Cr("disposeFramebuffer"),this.multisample=Ot.NONE}return Object.defineProperty(t.prototype,"colorTexture",{get:function(){return this.colorTextures[0]},enumerable:!1,configurable:!0}),t.prototype.addColorTexture=function(e,r){return e===void 0&&(e=0),this.colorTextures[e]=r||new Je(null,{scaleMode:Ir.NEAREST,resolution:1,mipmap:mn.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this},t.prototype.addDepthTexture=function(e){return this.depthTexture=e||new Je(new Ape(null,{width:this.width,height:this.height}),{scaleMode:Ir.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:mn.OFF,format:ve.DEPTH_COMPONENT,type:Re.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this},t.prototype.enableDepth=function(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this},t.prototype.enableStencil=function(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this},t.prototype.resize=function(e,r){if(e=Math.round(e),r=Math.round(r),!(e===this.width&&r===this.height)){this.width=e,this.height=r,this.dirtyId++,this.dirtySize++;for(var n=0;n-1&&n.textureCacheIds.splice(i,1),delete wn[r],n}}else if(r&&r.textureCacheIds){for(var a=0;athis.baseTexture.width,u=i+o>this.baseTexture.height;if(s||u){var l=s&&u?"and":"or",c="X: "+n+" + "+a+" = "+(n+a)+" > "+this.baseTexture.width,f="Y: "+i+" + "+o+" = "+(i+o)+" > "+this.baseTexture.height;throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: "+(c+" "+l+" "+f))}this.valid=a&&o&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=r),this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rotate",{get:function(){return this._rotate},set:function(r){this._rotate=r,this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.orig.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.orig.height},enumerable:!1,configurable:!0}),e.prototype.castToBaseTexture=function(){return this.baseTexture},Object.defineProperty(e,"EMPTY",{get:function(){return e._EMPTY||(e._EMPTY=new e(new Je),Oh(e._EMPTY),Oh(e._EMPTY.baseTexture)),e._EMPTY},enumerable:!1,configurable:!0}),Object.defineProperty(e,"WHITE",{get:function(){if(!e._WHITE){var r=xe.ADAPTER.createCanvas(16,16),n=r.getContext("2d");r.width=16,r.height=16,n.fillStyle="white",n.fillRect(0,0,16,16),e._WHITE=new e(Je.from(r)),Oh(e._WHITE),Oh(e._WHITE.baseTexture)}return e._WHITE},enumerable:!1,configurable:!0}),e}(mu),Co=function(t){wt(e,t);function e(r,n){var i=t.call(this,r,n)||this;return i.valid=!0,i.filterFrame=null,i.filterPoolKey=null,i.updateUvs(),i}return Object.defineProperty(e.prototype,"framebuffer",{get:function(){return this.baseTexture.framebuffer},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"multisample",{get:function(){return this.framebuffer.multisample},set:function(r){this.framebuffer.multisample=r},enumerable:!1,configurable:!0}),e.prototype.resize=function(r,n,i){i===void 0&&(i=!0);var a=this.baseTexture.resolution,o=Math.round(r*a)/a,s=Math.round(n*a)/a;this.valid=o>0&&s>0,this._frame.width=this.orig.width=o,this._frame.height=this.orig.height=s,i&&this.baseTexture.resize(o,s),this.updateUvs()},e.prototype.setResolution=function(r){var n=this.baseTexture;n.resolution!==r&&(n.setResolution(r),this.resize(n.width,n.height,!1))},e.create=function(r){for(var n=arguments,i=[],a=1;a>>0,i>1&&(a+=i*4294967296)):a=i>1?-i:-1,this.texturePool[a]||(this.texturePool[a]=[]);var o=this.texturePool[a].pop();return o||(o=this.createTexture(e,r,i)),o.filterPoolKey=a,o.setResolution(n),o},t.prototype.getFilterTexture=function(e,r,n){var i=this.getOptimalTexture(e.width,e.height,r||e.resolution,n||Ot.NONE);return i.filterFrame=e.filterFrame,i},t.prototype.returnTexture=function(e){var r=e.filterPoolKey;e.filterFrame=null,this.texturePool[r].push(e)},t.prototype.returnFilterTexture=function(e){this.returnTexture(e)},t.prototype.clear=function(e){if(e=e!==!1,e)for(var r in this.texturePool){var n=this.texturePool[r];if(n)for(var i=0;i0&&e.height>0;for(var r in this.texturePool)if(Number(r)<0){var n=this.texturePool[r];if(n)for(var i=0;i1){for(var c=0;c1&&(f=this.getOptimalFilterTexture(c.width,c.height,r.resolution),f.filterFrame=c.filterFrame),n[h].apply(this,c,f,qn.CLEAR,r);var d=c;c=f,f=d}n[h].apply(this,c,l.renderTexture,qn.BLEND,r),h>1&&r.multisample>1&&this.returnFilterTexture(r.renderTexture),this.returnFilterTexture(c),this.returnFilterTexture(f)}r.clear(),this.statePool.push(r)},t.prototype.bindAndClear=function(e,r){r===void 0&&(r=qn.CLEAR);var n=this.renderer,i=n.renderTexture,a=n.state;if(e===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,e&&e.filterFrame){var o=this.tempRect;o.x=0,o.y=0,o.width=e.filterFrame.width,o.height=e.filterFrame.height,i.bind(e,e.filterFrame,o)}else e!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?i.bind(e):this.renderer.renderTexture.bind(e,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);var s=a.stateId&1||this.forceClear;(r===qn.CLEAR||r===qn.BLIT&&s)&&this.renderer.framebuffer.clear(0,0,0,0)},t.prototype.applyFilter=function(e,r,n,i){var a=this.renderer;a.state.set(e.state),this.bindAndClear(n,i),e.uniforms.uSampler=r,e.uniforms.filterGlobals=this.globalUniforms,a.shader.bind(e),e.legacy=!!e.program.attributeData.aTextureCoord,e.legacy?(this.quadUv.map(r._frame,r.filterFrame),a.geometry.bind(this.quadUv),a.geometry.draw(Ln.TRIANGLES)):(a.geometry.bind(this.quad),a.geometry.draw(Ln.TRIANGLE_STRIP))},t.prototype.calculateSpriteMatrix=function(e,r){var n=this.activeState,i=n.sourceFrame,a=n.destinationFrame,o=r._texture.orig,s=e.set(a.width,0,0,a.height,i.x,i.y),u=r.worldTransform.copyTo(Ut.TEMP_MATRIX);return u.invert(),s.prepend(u),s.scale(1/o.width,1/o.height),s.translate(r.anchor.x,r.anchor.y),s},t.prototype.destroy=function(){this.renderer=null,this.texturePool.clear(!1)},t.prototype.getOptimalFilterTexture=function(e,r,n,i){return n===void 0&&(n=1),i===void 0&&(i=Ot.NONE),this.texturePool.getOptimalTexture(e,r,n,i)},t.prototype.getFilterTexture=function(e,r,n){if(typeof e=="number"){var i=e;e=r,r=i}e=e||this.activeState.renderTexture;var a=this.texturePool.getOptimalTexture(e.width,e.height,r||e.resolution,n||Ot.NONE);return a.filterFrame=e.filterFrame,a},t.prototype.returnFilterTexture=function(e){this.texturePool.returnTexture(e)},t.prototype.emptyPool=function(){this.texturePool.clear(!0)},t.prototype.resize=function(){this.texturePool.setScreenSize(this.renderer.view)},t.prototype.transformAABB=function(e,r){var n=Rh[0],i=Rh[1],a=Rh[2],o=Rh[3];n.set(r.left,r.top),i.set(r.left,r.bottom),a.set(r.right,r.top),o.set(r.right,r.bottom),e.apply(n,n),e.apply(i,i),e.apply(a,a),e.apply(o,o);var s=Math.min(n.x,i.x,a.x,o.x),u=Math.min(n.y,i.y,a.y,o.y),l=Math.max(n.x,i.x,a.x,o.x),c=Math.max(n.y,i.y,a.y,o.y);r.x=s,r.y=u,r.width=l-s,r.height=c-u},t.prototype.roundFrame=function(e,r,n,i,a){if(!(e.width<=0||e.height<=0||n.width<=0||n.height<=0)){if(a){var o=a.a,s=a.b,u=a.c,l=a.d;if((Math.abs(s)>1e-4||Math.abs(u)>1e-4)&&(Math.abs(o)>1e-4||Math.abs(l)>1e-4))return}a=a?xy.copyFrom(a):xy.identity(),a.translate(-n.x,-n.y).scale(i.width/n.width,i.height/n.height).translate(i.x,i.y),this.transformAABB(a,e),e.ceil(r),this.transformAABB(a.invert(),e)}},t}(),qf=function(){function t(e){this.renderer=e}return t.prototype.flush=function(){},t.prototype.destroy=function(){this.renderer=null},t.prototype.start=function(){},t.prototype.stop=function(){this.flush()},t.prototype.render=function(e){},t}(),lw=function(){function t(e){this.renderer=e,this.emptyRenderer=new qf(e),this.currentRenderer=this.emptyRenderer}return t.prototype.setObjectRenderer=function(e){this.currentRenderer!==e&&(this.currentRenderer.stop(),this.currentRenderer=e,this.currentRenderer.start())},t.prototype.flush=function(){this.setObjectRenderer(this.emptyRenderer)},t.prototype.reset=function(){this.setObjectRenderer(this.emptyRenderer)},t.prototype.copyBoundTextures=function(e,r){for(var n=this.renderer.texture.boundTextures,i=r-1;i>=0;--i)e[i]=n[i]||null,e[i]&&(e[i]._batchLocation=i)},t.prototype.boundArray=function(e,r,n,i){for(var a=e.elements,o=e.ids,s=e.count,u=0,l=0;l=0&&f=ta.WEBGL2&&(n=e.getContext("webgl2",r)),n)this.webGLVersion=2;else if(this.webGLVersion=1,n=e.getContext("webgl",r)||e.getContext("experimental-webgl",r),!n)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=n,this.getExtensions(),this.gl},t.prototype.getExtensions=function(){var e=this.gl,r={loseContext:e.getExtension("WEBGL_lose_context"),anisotropicFiltering:e.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),s3tc:e.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:e.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:e.getExtension("WEBGL_compressed_texture_etc"),etc1:e.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:e.getExtension("WEBGL_compressed_texture_atc"),astc:e.getExtension("WEBGL_compressed_texture_astc")};this.webGLVersion===1?Object.assign(this.extensions,r,{drawBuffers:e.getExtension("WEBGL_draw_buffers"),depthTexture:e.getExtension("WEBGL_depth_texture"),vertexArrayObject:e.getExtension("OES_vertex_array_object")||e.getExtension("MOZ_OES_vertex_array_object")||e.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:e.getExtension("OES_element_index_uint"),floatTexture:e.getExtension("OES_texture_float"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),textureHalfFloat:e.getExtension("OES_texture_half_float"),textureHalfFloatLinear:e.getExtension("OES_texture_half_float_linear")}):this.webGLVersion===2&&Object.assign(this.extensions,r,{colorBufferFloat:e.getExtension("EXT_color_buffer_float")})},t.prototype.handleContextLost=function(e){var r=this;e.preventDefault(),setTimeout(function(){r.gl.isContextLost()&&r.extensions.loseContext&&r.extensions.loseContext.restoreContext()},0)},t.prototype.handleContextRestored=function(){this.renderer.runners.contextChange.emit(this.gl)},t.prototype.destroy=function(){var e=this.renderer.view;this.renderer=null,e.removeEventListener("webglcontextlost",this.handleContextLost),e.removeEventListener("webglcontextrestored",this.handleContextRestored),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()},t.prototype.postrender=function(){this.renderer.renderingToScreen&&this.gl.flush()},t.prototype.validateContext=function(e){var r=e.getContextAttributes(),n="WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext;n&&(this.webGLVersion=2),r&&!r.stencil&&console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");var i=n||!!e.getExtension("OES_element_index_uint");this.supports.uint32Indices=i,i||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")},t}(),AL=function(){function t(e){this.framebuffer=e,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=Ot.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}return t}(),Mpe=new Ye,cw=function(){function t(e){this.renderer=e,this.managedFramebuffers=[],this.unknownFramebuffer=new xp(10,10),this.msaaSamples=null}return t.prototype.contextChange=function(){this.disposeAll(!0);var e=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new Ye,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){var r=this.renderer.context.extensions.drawBuffers,n=this.renderer.context.extensions.depthTexture;xe.PREFER_ENV===ta.WEBGL_LEGACY&&(r=null,n=null),r?e.drawBuffers=function(i){return r.drawBuffersWEBGL(i)}:(this.hasMRT=!1,e.drawBuffers=function(){}),n||(this.writeDepthTexture=!1)}else this.msaaSamples=e.getInternalformatParameter(e.RENDERBUFFER,e.RGBA8,e.SAMPLES)},t.prototype.bind=function(e,r,n){n===void 0&&(n=0);var i=this.gl;if(e){var a=e.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(e);this.current!==e&&(this.current=e,i.bindFramebuffer(i.FRAMEBUFFER,a.framebuffer)),a.mipLevel!==n&&(e.dirtyId++,e.dirtyFormat++,a.mipLevel=n),a.dirtyId!==e.dirtyId&&(a.dirtyId=e.dirtyId,a.dirtyFormat!==e.dirtyFormat?(a.dirtyFormat=e.dirtyFormat,a.dirtySize=e.dirtySize,this.updateFramebuffer(e,n)):a.dirtySize!==e.dirtySize&&(a.dirtySize=e.dirtySize,this.resizeFramebuffer(e)));for(var o=0;o>n,l=r.height>>n,c=u/r.width;this.setViewport(r.x*c,r.y*c,u,l)}else{var u=e.width>>n,l=e.height>>n;this.setViewport(0,0,u,l)}}else this.current&&(this.current=null,i.bindFramebuffer(i.FRAMEBUFFER,null)),r?this.setViewport(r.x,r.y,r.width,r.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)},t.prototype.setViewport=function(e,r,n,i){var a=this.viewport;e=Math.round(e),r=Math.round(r),n=Math.round(n),i=Math.round(i),(a.width!==n||a.height!==i||a.x!==e||a.y!==r)&&(a.x=e,a.y=r,a.width=n,a.height=i,this.gl.viewport(e,r,n,i))},Object.defineProperty(t.prototype,"size",{get:function(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}},enumerable:!1,configurable:!0}),t.prototype.clear=function(e,r,n,i,a){a===void 0&&(a=tf.COLOR|tf.DEPTH);var o=this.gl;o.clearColor(e,r,n,i),o.clear(a)},t.prototype.initFramebuffer=function(e){var r=this.gl,n=new AL(r.createFramebuffer());return n.multisample=this.detectSamples(e.multisample),e.glFramebuffers[this.CONTEXT_UID]=n,this.managedFramebuffers.push(e),e.disposeRunner.add(this),n},t.prototype.resizeFramebuffer=function(e){var r=this.gl,n=e.glFramebuffers[this.CONTEXT_UID];n.msaaBuffer&&(r.bindRenderbuffer(r.RENDERBUFFER,n.msaaBuffer),r.renderbufferStorageMultisample(r.RENDERBUFFER,n.multisample,r.RGBA8,e.width,e.height)),n.stencil&&(r.bindRenderbuffer(r.RENDERBUFFER,n.stencil),n.msaaBuffer?r.renderbufferStorageMultisample(r.RENDERBUFFER,n.multisample,r.DEPTH24_STENCIL8,e.width,e.height):r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,e.width,e.height));var i=e.colorTextures,a=i.length;r.drawBuffers||(a=Math.min(a,1));for(var o=0;o1&&this.canMultisampleFramebuffer(e)?(i.msaaBuffer=i.msaaBuffer||n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,i.msaaBuffer),n.renderbufferStorageMultisample(n.RENDERBUFFER,i.multisample,n.RGBA8,e.width,e.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.RENDERBUFFER,i.msaaBuffer)):i.msaaBuffer&&(n.deleteRenderbuffer(i.msaaBuffer),i.msaaBuffer=null,i.blitFramebuffer&&(i.blitFramebuffer.dispose(),i.blitFramebuffer=null));for(var s=[],u=0;u1&&n.drawBuffers(s),e.depthTexture){var f=this.writeDepthTexture;if(f){var h=e.depthTexture;this.renderer.texture.bind(h,0),n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,h._glTextures[this.CONTEXT_UID].texture,r)}}(e.stencil||e.depth)&&!(e.depthTexture&&this.writeDepthTexture)?(i.stencil=i.stencil||n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,i.stencil),i.msaaBuffer?n.renderbufferStorageMultisample(n.RENDERBUFFER,i.multisample,n.DEPTH24_STENCIL8,e.width,e.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,e.width,e.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,i.stencil)):i.stencil&&(n.deleteRenderbuffer(i.stencil),i.stencil=null)},t.prototype.canMultisampleFramebuffer=function(e){return this.renderer.context.webGLVersion!==1&&e.colorTextures.length<=1&&!e.depthTexture},t.prototype.detectSamples=function(e){var r=this.msaaSamples,n=Ot.NONE;if(e<=1||r===null)return n;for(var i=0;i=0&&this.managedFramebuffers.splice(a,1),e.disposeRunner.remove(this),r||(i.deleteFramebuffer(n.framebuffer),n.msaaBuffer&&i.deleteRenderbuffer(n.msaaBuffer),n.stencil&&i.deleteRenderbuffer(n.stencil)),n.blitFramebuffer&&n.blitFramebuffer.dispose()}},t.prototype.disposeAll=function(e){var r=this.managedFramebuffers;this.managedFramebuffers=[];for(var n=0;n=ta.WEBGL2&&(e=t.getContext("webgl2",{})),e||(e=t.getContext("webgl",{})||t.getContext("experimental-webgl",{}),e?e.getExtension("WEBGL_draw_buffers"):e=null),Vu=e}return Vu}var Ih;function Npe(){if(!Ih){Ih=Tn.MEDIUM;var t=RL();if(t&&t.getShaderPrecisionFormat){var e=t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT);Ih=e.precision?Tn.HIGH:Tn.MEDIUM}}return Ih}function $2(t,e,r){if(t.substring(0,9)!=="precision"){var n=e;return e===Tn.HIGH&&r!==Tn.HIGH&&(n=Tn.MEDIUM),"precision "+n+` float; -`+t}else if(r!==Tn.HIGH&&t.substring(0,15)==="precision highp")return t.replace("precision highp","precision mediump");return t}var Lpe={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function IL(t){return Lpe[t]}var kh=null,V2={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function kL(t,e){if(!kh){var r=Object.keys(V2);kh={};for(var n=0;n0&&(e+=` -else `),r"u"?.5:r,this.isSimple=!1}return Object.defineProperty(t.prototype,"texture",{get:function(){return this._texture},set:function(e){this._texture=e,this._textureID=-1},enumerable:!1,configurable:!0}),t.prototype.multiplyUvs=function(e,r){r===void 0&&(r=e);for(var n=this.mapCoord,i=0;i0?this.maskStack[this.maskStack.length-1]._colorMask:15;n!==r&&this.renderer.gl.colorMask((n&1)!==0,(n&2)!==0,(n&4)!==0,(n&8)!==0)},t.prototype.destroy=function(){this.renderer=null},t}(),NL=function(){function t(e){this.renderer=e,this.maskStack=[],this.glConst=0}return t.prototype.getStackLength=function(){return this.maskStack.length},t.prototype.setMaskStack=function(e){var r=this.renderer.gl,n=this.getStackLength();this.maskStack=e;var i=this.getStackLength();i!==n&&(i===0?r.disable(this.glConst):(r.enable(this.glConst),this._useCurrent()))},t.prototype._useCurrent=function(){},t.prototype.destroy=function(){this.renderer=null,this.maskStack=null},t}(),X2=new Ut,z2=[],dw=function(t){wt(e,t);function e(r){var n=t.call(this,r)||this;return n.glConst=xe.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST,n}return e.prototype.getStackLength=function(){var r=this.maskStack[this.maskStack.length-1];return r?r._scissorCounter:0},e.prototype.calcScissorRect=function(r){var n;if(!r._scissorRectLocal){var i=r._scissorRect,a=r.maskObject,o=this.renderer,s=o.renderTexture,u=a.getBounds(!0,(n=z2.pop())!==null&&n!==void 0?n:new Ye);this.roundFrameToPixels(u,s.current?s.current.resolution:o.resolution,s.sourceFrame,s.destinationFrame,o.projection.transform),i&&u.fit(i),r._scissorRectLocal=u}},e.isMatrixRotated=function(r){if(!r)return!1;var n=r.a,i=r.b,a=r.c,o=r.d;return(Math.abs(i)>1e-4||Math.abs(a)>1e-4)&&(Math.abs(n)>1e-4||Math.abs(o)>1e-4)},e.prototype.testScissor=function(r){var n=r.maskObject;if(!n.isFastRect||!n.isFastRect()||e.isMatrixRotated(n.worldTransform)||e.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(r);var i=r._scissorRectLocal;return i.width>0&&i.height>0},e.prototype.roundFrameToPixels=function(r,n,i,a,o){e.isMatrixRotated(o)||(o=o?X2.copyFrom(o):X2.identity(),o.translate(-i.x,-i.y).scale(a.width/i.width,a.height/i.height).translate(a.x,a.y),this.renderer.filter.transformAABB(o,r),r.fit(a),r.x=Math.round(r.x*n),r.y=Math.round(r.y*n),r.width=Math.round(r.width*n),r.height=Math.round(r.height*n))},e.prototype.push=function(r){r._scissorRectLocal||this.calcScissorRect(r);var n=this.renderer.gl;r._scissorRect||n.enable(n.SCISSOR_TEST),r._scissorCounter++,r._scissorRect=r._scissorRectLocal,this._useCurrent()},e.prototype.pop=function(r){var n=this.renderer.gl;r&&z2.push(r._scissorRectLocal),this.getStackLength()>0?this._useCurrent():n.disable(n.SCISSOR_TEST)},e.prototype._useCurrent=function(){var r=this.maskStack[this.maskStack.length-1]._scissorRect,n;this.renderer.renderTexture.current?n=r.y:n=this.renderer.height-r.height-r.y,this.renderer.gl.scissor(r.x,n,r.width,r.height)},e}(NL),pw=function(t){wt(e,t);function e(r){var n=t.call(this,r)||this;return n.glConst=xe.ADAPTER.getWebGLRenderingContext().STENCIL_TEST,n}return e.prototype.getStackLength=function(){var r=this.maskStack[this.maskStack.length-1];return r?r._stencilCounter:0},e.prototype.push=function(r){var n=r.maskObject,i=this.renderer.gl,a=r._stencilCounter;a===0&&(this.renderer.framebuffer.forceStencil(),i.clearStencil(0),i.clear(i.STENCIL_BUFFER_BIT),i.enable(i.STENCIL_TEST)),r._stencilCounter++;var o=r._colorMask;o!==0&&(r._colorMask=0,i.colorMask(!1,!1,!1,!1)),i.stencilFunc(i.EQUAL,a,4294967295),i.stencilOp(i.KEEP,i.KEEP,i.INCR),n.renderable=!0,n.render(this.renderer),this.renderer.batch.flush(),n.renderable=!1,o!==0&&(r._colorMask=o,i.colorMask((o&1)!==0,(o&2)!==0,(o&4)!==0,(o&8)!==0)),this._useCurrent()},e.prototype.pop=function(r){var n=this.renderer.gl;if(this.getStackLength()===0)n.disable(n.STENCIL_TEST);else{var i=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null,a=i?i._colorMask:15;a!==0&&(i._colorMask=0,n.colorMask(!1,!1,!1,!1)),n.stencilOp(n.KEEP,n.KEEP,n.DECR),r.renderable=!0,r.render(this.renderer),this.renderer.batch.flush(),r.renderable=!1,a!==0&&(i._colorMask=a,n.colorMask((a&1)!==0,(a&2)!==0,(a&4)!==0,(a&8)!==0)),this._useCurrent()}},e.prototype._useCurrent=function(){var r=this.renderer.gl;r.stencilFunc(r.EQUAL,this.getStackLength(),4294967295),r.stencilOp(r.KEEP,r.KEEP,r.KEEP)},e}(NL),vw=function(){function t(e){this.renderer=e,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new Ut,this.transform=null}return t.prototype.update=function(e,r,n,i){this.destinationFrame=e||this.destinationFrame||this.defaultFrame,this.sourceFrame=r||this.sourceFrame||e,this.calculateProjection(this.destinationFrame,this.sourceFrame,n,i),this.transform&&this.projectionMatrix.append(this.transform);var a=this.renderer;a.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,a.globalUniforms.update(),a.shader.shader&&a.shader.syncUniformGroup(a.shader.shader.uniforms.globals)},t.prototype.calculateProjection=function(e,r,n,i){var a=this.projectionMatrix,o=i?-1:1;a.identity(),a.a=1/r.width*2,a.d=o*(1/r.height*2),a.tx=-1-r.x*a.a,a.ty=-o-r.y*a.d},t.prototype.setTransform=function(e){},t.prototype.destroy=function(){this.renderer=null},t}(),Lo=new Ye,Xu=new Ye,mw=function(){function t(e){this.renderer=e,this.clearColor=e._backgroundColorRgba,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new Ye,this.destinationFrame=new Ye,this.viewportFrame=new Ye}return t.prototype.bind=function(e,r,n){e===void 0&&(e=null);var i=this.renderer;this.current=e;var a,o,s;e?(a=e.baseTexture,s=a.resolution,r||(Lo.width=e.frame.width,Lo.height=e.frame.height,r=Lo),n||(Xu.x=e.frame.x,Xu.y=e.frame.y,Xu.width=r.width,Xu.height=r.height,n=Xu),o=a.framebuffer):(s=i.resolution,r||(Lo.width=i.screen.width,Lo.height=i.screen.height,r=Lo),n||(n=Lo,n.width=r.width,n.height=r.height));var u=this.viewportFrame;u.x=n.x*s,u.y=n.y*s,u.width=n.width*s,u.height=n.height*s,e||(u.y=i.view.height-(u.y+u.height)),u.ceil(),this.renderer.framebuffer.bind(o,u),this.renderer.projection.update(n,r,s,!o),e?this.renderer.mask.setMaskStack(a.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(r),this.destinationFrame.copyFrom(n)},t.prototype.clear=function(e,r){this.current?e=e||this.current.baseTexture.clearColor:e=e||this.clearColor;var n=this.destinationFrame,i=this.current?this.current.baseTexture:this.renderer.screen,a=n.width!==i.width||n.height!==i.height;if(a){var o=this.viewportFrame,s=o.x,u=o.y,l=o.width,c=o.height;s=Math.round(s),u=Math.round(u),l=Math.round(l),c=Math.round(c),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(s,u,l,c)}this.renderer.framebuffer.clear(e[0],e[1],e[2],e[3],r),a&&this.renderer.scissor.pop()},t.prototype.resize=function(){this.bind(null)},t.prototype.reset=function(){this.bind(null)},t.prototype.destroy=function(){this.renderer=null},t}();function Kpe(t,e,r,n,i){r.buffer.update(i)}var Zpe={float:` - data[offset] = v; - `,vec2:` - data[offset] = v[0]; - data[offset+1] = v[1]; - `,vec3:` - data[offset] = v[0]; - data[offset+1] = v[1]; - data[offset+2] = v[2]; - - `,vec4:` - data[offset] = v[0]; - data[offset+1] = v[1]; - data[offset+2] = v[2]; - data[offset+3] = v[3]; - `,mat2:` - data[offset] = v[0]; - data[offset+1] = v[1]; - - data[offset+4] = v[2]; - data[offset+5] = v[3]; - `,mat3:` - data[offset] = v[0]; - data[offset+1] = v[1]; - data[offset+2] = v[2]; - - data[offset + 4] = v[3]; - data[offset + 5] = v[4]; - data[offset + 6] = v[5]; - - data[offset + 8] = v[6]; - data[offset + 9] = v[7]; - data[offset + 10] = v[8]; - `,mat4:` - for(var i = 0; i < 16; i++) - { - data[offset + i] = v[i]; - } - `},LL={float:4,vec2:8,vec3:12,vec4:16,int:4,ivec2:8,ivec3:12,ivec4:16,uint:4,uvec2:8,uvec3:12,uvec4:16,bool:4,bvec2:8,bvec3:12,bvec4:16,mat2:16*2,mat3:16*3,mat4:16*4};function DL(t){for(var e=t.map(function(u){return{data:u,offset:0,dataLen:0,dirty:0}}),r=0,n=0,i=0,a=0;a1&&(r=Math.max(r,16)*o.data.size),o.dataLen=r,n%r!==0&&n<16){var s=n%r%16;n+=s,i+=s}n+r>16?(i=Math.ceil(i/16)*16,o.offset=i,i+=r,n=r):(o.offset=i,n+=r,i+=r)}return i=Math.ceil(i/16)*16,{uboElements:e,size:i}}function BL(t,e){var r=[];for(var n in t)e[n]&&r.push(e[n]);return r.sort(function(i,a){return i.index-a.index}),r}function jL(t,e){if(!t.autoManage)return{size:0,syncFunc:Kpe};for(var r=BL(t.uniforms,e),n=DL(r),i=n.uboElements,a=n.size,o=[` - var v = null; - var v2 = null; - var cv = null; - var t = 0; - var gl = renderer.gl - var index = 0; - var data = buffer.data; - `],s=0;s1){var p=IL(u.data.type),v=Math.max(LL[u.data.type]/16,1),g=p/v,m=(4-g%4)%4;o.push(` - cv = ud.`+c+`.value; - v = uv.`+c+`; - offset = `+u.offset/4+`; - - t = 0; - - for(var i=0; i < `+u.data.size*v+`; i++) - { - for(var j = 0; j < `+g+`; j++) - { - data[offset++] = v[t++]; - } - offset += `+m+`; - } - - `)}else{var y=Zpe[u.data.type];o.push(` - cv = ud.`+c+`.value; - v = uv.`+c+`; - offset = `+u.offset/4+`; - `+y+`; - `)}}return o.push(` - renderer.buffer.update(buffer); - `),{size:a,syncFunc:new Function("ud","uv","renderer","syncData","buffer",o.join(` -`))}}var Qpe=function(){function t(){}return t}(),UL=function(){function t(e,r){this.program=e,this.uniformData=r,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}return t.prototype.destroy=function(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null},t}();function Jpe(t,e){for(var r={},n=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES),i=0;if?1:-1});for(var o=0;o>1,n++;this.stateId=e.data}for(var n=0;nthis.checkCountMax&&(this.checkCount=0,this.run())))},t.prototype.run=function(){for(var e=this.renderer.texture,r=e.managedTextures,n=!1,i=0;ithis.maxIdle&&(e.destroyTexture(a,!0),r[i]=null,n=!0)}if(n){for(var o=0,i=0;i=0;i--)this.unload(e.children[i])},t.prototype.destroy=function(){this.renderer=null},t}();function uve(t){var e,r,n,i,a,o,s,u,l,c,f,h,d,p,v,g,m,y,_,x,b,S,w;return"WebGL2RenderingContext"in globalThis&&t instanceof globalThis.WebGL2RenderingContext?w=(e={},e[Re.UNSIGNED_BYTE]=(r={},r[ve.RGBA]=t.RGBA8,r[ve.RGB]=t.RGB8,r[ve.RG]=t.RG8,r[ve.RED]=t.R8,r[ve.RGBA_INTEGER]=t.RGBA8UI,r[ve.RGB_INTEGER]=t.RGB8UI,r[ve.RG_INTEGER]=t.RG8UI,r[ve.RED_INTEGER]=t.R8UI,r[ve.ALPHA]=t.ALPHA,r[ve.LUMINANCE]=t.LUMINANCE,r[ve.LUMINANCE_ALPHA]=t.LUMINANCE_ALPHA,r),e[Re.BYTE]=(n={},n[ve.RGBA]=t.RGBA8_SNORM,n[ve.RGB]=t.RGB8_SNORM,n[ve.RG]=t.RG8_SNORM,n[ve.RED]=t.R8_SNORM,n[ve.RGBA_INTEGER]=t.RGBA8I,n[ve.RGB_INTEGER]=t.RGB8I,n[ve.RG_INTEGER]=t.RG8I,n[ve.RED_INTEGER]=t.R8I,n),e[Re.UNSIGNED_SHORT]=(i={},i[ve.RGBA_INTEGER]=t.RGBA16UI,i[ve.RGB_INTEGER]=t.RGB16UI,i[ve.RG_INTEGER]=t.RG16UI,i[ve.RED_INTEGER]=t.R16UI,i[ve.DEPTH_COMPONENT]=t.DEPTH_COMPONENT16,i),e[Re.SHORT]=(a={},a[ve.RGBA_INTEGER]=t.RGBA16I,a[ve.RGB_INTEGER]=t.RGB16I,a[ve.RG_INTEGER]=t.RG16I,a[ve.RED_INTEGER]=t.R16I,a),e[Re.UNSIGNED_INT]=(o={},o[ve.RGBA_INTEGER]=t.RGBA32UI,o[ve.RGB_INTEGER]=t.RGB32UI,o[ve.RG_INTEGER]=t.RG32UI,o[ve.RED_INTEGER]=t.R32UI,o[ve.DEPTH_COMPONENT]=t.DEPTH_COMPONENT24,o),e[Re.INT]=(s={},s[ve.RGBA_INTEGER]=t.RGBA32I,s[ve.RGB_INTEGER]=t.RGB32I,s[ve.RG_INTEGER]=t.RG32I,s[ve.RED_INTEGER]=t.R32I,s),e[Re.FLOAT]=(u={},u[ve.RGBA]=t.RGBA32F,u[ve.RGB]=t.RGB32F,u[ve.RG]=t.RG32F,u[ve.RED]=t.R32F,u[ve.DEPTH_COMPONENT]=t.DEPTH_COMPONENT32F,u),e[Re.HALF_FLOAT]=(l={},l[ve.RGBA]=t.RGBA16F,l[ve.RGB]=t.RGB16F,l[ve.RG]=t.RG16F,l[ve.RED]=t.R16F,l),e[Re.UNSIGNED_SHORT_5_6_5]=(c={},c[ve.RGB]=t.RGB565,c),e[Re.UNSIGNED_SHORT_4_4_4_4]=(f={},f[ve.RGBA]=t.RGBA4,f),e[Re.UNSIGNED_SHORT_5_5_5_1]=(h={},h[ve.RGBA]=t.RGB5_A1,h),e[Re.UNSIGNED_INT_2_10_10_10_REV]=(d={},d[ve.RGBA]=t.RGB10_A2,d[ve.RGBA_INTEGER]=t.RGB10_A2UI,d),e[Re.UNSIGNED_INT_10F_11F_11F_REV]=(p={},p[ve.RGB]=t.R11F_G11F_B10F,p),e[Re.UNSIGNED_INT_5_9_9_9_REV]=(v={},v[ve.RGB]=t.RGB9_E5,v),e[Re.UNSIGNED_INT_24_8]=(g={},g[ve.DEPTH_STENCIL]=t.DEPTH24_STENCIL8,g),e[Re.FLOAT_32_UNSIGNED_INT_24_8_REV]=(m={},m[ve.DEPTH_STENCIL]=t.DEPTH32F_STENCIL8,m),e):w=(y={},y[Re.UNSIGNED_BYTE]=(_={},_[ve.RGBA]=t.RGBA,_[ve.RGB]=t.RGB,_[ve.ALPHA]=t.ALPHA,_[ve.LUMINANCE]=t.LUMINANCE,_[ve.LUMINANCE_ALPHA]=t.LUMINANCE_ALPHA,_),y[Re.UNSIGNED_SHORT_5_6_5]=(x={},x[ve.RGB]=t.RGB,x),y[Re.UNSIGNED_SHORT_4_4_4_4]=(b={},b[ve.RGBA]=t.RGBA,b),y[Re.UNSIGNED_SHORT_5_5_5_1]=(S={},S[ve.RGBA]=t.RGBA,S),y),w}var wd=function(){function t(e){this.texture=e,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=Re.UNSIGNED_BYTE,this.internalFormat=ve.RGBA,this.samplerType=0}return t}(),xw=function(){function t(e){this.renderer=e,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new Je,this.hasIntegerTextures=!1}return t.prototype.contextChange=function(){var e=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=uve(e);var r=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=r;for(var n=0;n=0;--o){var s=n[o];if(s){var u=s._glTextures[a];u.samplerType!==rf.FLOAT&&this.renderer.texture.unbind(s)}}},t.prototype.initTexture=function(e){var r=new wd(this.gl.createTexture());return r.dirtyId=-1,e._glTextures[this.CONTEXT_UID]=r,this.managedTextures.push(e),e.on("dispose",this.destroyTexture,this),r},t.prototype.initTextureType=function(e,r){var n,i;r.internalFormat=(i=(n=this.internalFormats[e.type])===null||n===void 0?void 0:n[e.format])!==null&&i!==void 0?i:e.format,this.webGLVersion===2&&e.type===Re.HALF_FLOAT?r.type=this.gl.HALF_FLOAT:r.type=e.type},t.prototype.updateTexture=function(e){var r=e._glTextures[this.CONTEXT_UID];if(r){var n=this.renderer;if(this.initTextureType(e,r),e.resource&&e.resource.upload(n,e,r))r.samplerType!==rf.FLOAT&&(this.hasIntegerTextures=!0);else{var i=e.realWidth,a=e.realHeight,o=n.gl;(r.width!==i||r.height!==a||r.dirtyId<0)&&(r.width=i,r.height=a,o.texImage2D(e.target,0,r.internalFormat,i,a,0,e.format,r.type,null))}e.dirtyStyleId!==r.dirtyStyleId&&this.updateTextureStyle(e),r.dirtyId=e.dirtyId}},t.prototype.destroyTexture=function(e,r){var n=this.gl;if(e=e.castToBaseTexture(),e._glTextures[this.CONTEXT_UID]&&(this.unbind(e),n.deleteTexture(e._glTextures[this.CONTEXT_UID].texture),e.off("dispose",this.destroyTexture,this),delete e._glTextures[this.CONTEXT_UID],!r)){var i=this.managedTextures.indexOf(e);i!==-1&&cs(this.managedTextures,i,1)}},t.prototype.updateTextureStyle=function(e){var r=e._glTextures[this.CONTEXT_UID];r&&((e.mipmap===mn.POW2||this.webGLVersion!==2)&&!e.isPowerOfTwo?r.mipmap=!1:r.mipmap=e.mipmap>=1,this.webGLVersion!==2&&!e.isPowerOfTwo?r.wrapMode=xi.CLAMP:r.wrapMode=e.wrapMode,e.resource&&e.resource.style(this.renderer,e,r)||this.setStyle(e,r),r.dirtyStyleId=e.dirtyStyleId)},t.prototype.setStyle=function(e,r){var n=this.gl;if(r.mipmap&&e.mipmap!==mn.ON_MANUAL&&n.generateMipmap(e.target),n.texParameteri(e.target,n.TEXTURE_WRAP_S,r.wrapMode),n.texParameteri(e.target,n.TEXTURE_WRAP_T,r.wrapMode),r.mipmap){n.texParameteri(e.target,n.TEXTURE_MIN_FILTER,e.scaleMode===Ir.LINEAR?n.LINEAR_MIPMAP_LINEAR:n.NEAREST_MIPMAP_NEAREST);var i=this.renderer.context.extensions.anisotropicFiltering;if(i&&e.anisotropicLevel>0&&e.scaleMode===Ir.LINEAR){var a=Math.min(e.anisotropicLevel,n.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT));n.texParameterf(e.target,i.TEXTURE_MAX_ANISOTROPY_EXT,a)}}else n.texParameteri(e.target,n.TEXTURE_MIN_FILTER,e.scaleMode===Ir.LINEAR?n.LINEAR:n.NEAREST);n.texParameteri(e.target,n.TEXTURE_MAG_FILTER,e.scaleMode===Ir.LINEAR?n.LINEAR:n.NEAREST)},t.prototype.destroy=function(){this.renderer=null},t}(),VL={__proto__:null,FilterSystem:sw,BatchSystem:lw,ContextSystem:uw,FramebufferSystem:cw,GeometrySystem:fw,MaskSystem:hw,ScissorSystem:dw,StencilSystem:pw,ProjectionSystem:vw,RenderTextureSystem:mw,ShaderSystem:gw,StateSystem:yw,TextureGCSystem:_w,TextureSystem:xw},Oy=new Ut,GL=function(t){wt(e,t);function e(r,n){r===void 0&&(r=Ul.UNKNOWN);var i=t.call(this)||this;return n=Object.assign({},xe.RENDER_OPTIONS,n),i.options=n,i.type=r,i.screen=new Ye(0,0,n.width,n.height),i.view=n.view||xe.ADAPTER.createCanvas(),i.resolution=n.resolution||xe.RESOLUTION,i.useContextAlpha=n.useContextAlpha,i.autoDensity=!!n.autoDensity,i.preserveDrawingBuffer=n.preserveDrawingBuffer,i.clearBeforeRender=n.clearBeforeRender,i._backgroundColor=0,i._backgroundColorRgba=[0,0,0,1],i._backgroundColorString="#000000",i.backgroundColor=n.backgroundColor||i._backgroundColor,i.backgroundAlpha=n.backgroundAlpha,n.transparent!==void 0&&(pn("6.0.0","Option transparent is deprecated, please use backgroundAlpha instead."),i.useContextAlpha=n.transparent,i.backgroundAlpha=n.transparent?0:1),i._lastObjectRendered=null,i.plugins={},i}return e.prototype.initPlugins=function(r){for(var n in r)this.plugins[n]=new r[n](this)},Object.defineProperty(e.prototype,"width",{get:function(){return this.view.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.view.height},enumerable:!1,configurable:!0}),e.prototype.resize=function(r,n){this.view.width=Math.round(r*this.resolution),this.view.height=Math.round(n*this.resolution);var i=this.view.width/this.resolution,a=this.view.height/this.resolution;this.screen.width=i,this.screen.height=a,this.autoDensity&&(this.view.style.width=i+"px",this.view.style.height=a+"px"),this.emit("resize",i,a)},e.prototype.generateTexture=function(r,n,i,a){n===void 0&&(n={}),typeof n=="number"&&(pn("6.1.0","generateTexture options (scaleMode, resolution, region) are now object options."),n={scaleMode:n,resolution:i,region:a});var o=n.region,s=Epe(n,["region"]);a=o||r.getLocalBounds(null,!0),a.width===0&&(a.width=1),a.height===0&&(a.height=1);var u=Co.create(V_({width:a.width,height:a.height},s));return Oy.tx=-a.x,Oy.ty=-a.y,this.render(r,{renderTexture:u,clear:!1,transform:Oy,skipUpdateTransform:!!r.parent}),u},e.prototype.destroy=function(r){for(var n in this.plugins)this.plugins[n].destroy(),this.plugins[n]=null;r&&this.view.parentNode&&this.view.parentNode.removeChild(this.view);var i=this;i.plugins=null,i.type=Ul.UNKNOWN,i.view=null,i.screen=null,i._tempDisplayObjectParent=null,i.options=null,this._backgroundColorRgba=null,this._backgroundColorString=null,this._lastObjectRendered=null},Object.defineProperty(e.prototype,"backgroundColor",{get:function(){return this._backgroundColor},set:function(r){this._backgroundColor=r,this._backgroundColorString=zS(r),yr(r,this._backgroundColorRgba)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backgroundAlpha",{get:function(){return this._backgroundColorRgba[3]},set:function(r){this._backgroundColorRgba[3]=r},enumerable:!1,configurable:!0}),e}(mu),cve=function(){function t(e){this.buffer=e||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}return t}(),fve=function(){function t(e){this.renderer=e,this.managedBuffers={},this.boundBufferBases={}}return t.prototype.destroy=function(){this.renderer=null},t.prototype.contextChange=function(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID},t.prototype.bind=function(e){var r=this,n=r.gl,i=r.CONTEXT_UID,a=e._glBuffers[i]||this.createGLBuffer(e);n.bindBuffer(e.type,a.buffer)},t.prototype.bindBufferBase=function(e,r){var n=this,i=n.gl,a=n.CONTEXT_UID;if(this.boundBufferBases[r]!==e){var o=e._glBuffers[a]||this.createGLBuffer(e);this.boundBufferBases[r]=e,i.bindBufferBase(i.UNIFORM_BUFFER,r,o.buffer)}},t.prototype.bindBufferRange=function(e,r,n){var i=this,a=i.gl,o=i.CONTEXT_UID;n=n||0;var s=e._glBuffers[o]||this.createGLBuffer(e);a.bindBufferRange(a.UNIFORM_BUFFER,r||0,s.buffer,n*256,256)},t.prototype.update=function(e){var r=this,n=r.gl,i=r.CONTEXT_UID,a=e._glBuffers[i];if(e._updateID!==a.updateID)if(a.updateID=e._updateID,n.bindBuffer(e.type,a.buffer),a.byteLength>=e.data.byteLength)n.bufferSubData(e.type,0,e.data);else{var o=e.static?n.STATIC_DRAW:n.DYNAMIC_DRAW;a.byteLength=e.data.byteLength,n.bufferData(e.type,e.data,o)}},t.prototype.dispose=function(e,r){if(this.managedBuffers[e.id]){delete this.managedBuffers[e.id];var n=e._glBuffers[this.CONTEXT_UID],i=this.gl;e.disposeRunner.remove(this),n&&(r||i.deleteBuffer(n.buffer),delete e._glBuffers[this.CONTEXT_UID])}},t.prototype.disposeAll=function(e){for(var r=Object.keys(this.managedBuffers),n=0;n=Ot.HIGH?this.multisample=Ot.HIGH:n>=Ot.MEDIUM?this.multisample=Ot.MEDIUM:n>=Ot.LOW?this.multisample=Ot.LOW:this.multisample=Ot.NONE},e.prototype.addSystem=function(r,n){var i=new r(this);if(this[n])throw new Error('Whoops! The name "'+n+'" is already in use');this[n]=i;for(var a in this.runners)this.runners[a].add(i);return this},e.prototype.render=function(r,n){var i,a,o,s;if(n&&(n instanceof Co?(pn("6.0.0","Renderer#render arguments changed, use options instead."),i=n,a=arguments[2],o=arguments[3],s=arguments[4]):(i=n.renderTexture,a=n.clear,o=n.transform,s=n.skipUpdateTransform)),this.renderingToScreen=!i,this.runners.prerender.emit(),this.emit("prerender"),this.projection.transform=o,!this.context.isLost){if(i||(this._lastObjectRendered=r),!s){var u=r.enableTempParent();r.updateTransform(),r.disableTempParent(u)}this.renderTexture.bind(i),this.batch.currentRenderer.start(),(a!==void 0?a:this.clearBeforeRender)&&this.renderTexture.clear(),r.render(this),this.batch.currentRenderer.flush(),i&&i.baseTexture.update(),this.runners.postrender.emit(),this.projection.transform=null,this.emit("postrender")}},e.prototype.generateTexture=function(r,n,i,a){n===void 0&&(n={});var o=t.prototype.generateTexture.call(this,r,n,i,a);return this.framebuffer.blit(),o},e.prototype.resize=function(r,n){t.prototype.resize.call(this,r,n),this.runners.resize.emit(this.screen.height,this.screen.width)},e.prototype.reset=function(){return this.runners.reset.emit(),this},e.prototype.clear=function(){this.renderTexture.bind(),this.renderTexture.clear()},e.prototype.destroy=function(r){this.runners.destroy.emit();for(var n in this.runners)this.runners[n].destroy();t.prototype.destroy.call(this,r),this.gl=null},Object.defineProperty(e.prototype,"extract",{get:function(){return pn("6.0.0","Renderer#extract has been deprecated, please use Renderer#plugins.extract instead."),this.plugins.extract},enumerable:!1,configurable:!0}),e.registerPlugin=function(r,n){pn("6.5.0","Renderer.registerPlugin() has been deprecated, please use extensions.add() instead."),fa.add({name:r,type:dt.RendererPlugin,ref:n})},e.__plugins={},e}(GL);fa.handleByMap(dt.RendererPlugin,bw.__plugins);function XL(t){return bw.create(t)}var hve=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,dve=`attribute vec2 aVertexPosition; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -uniform vec4 inputSize; -uniform vec4 outputFrame; - -vec4 filterVertexPosition( void ) -{ - vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy; - - return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0); -} - -vec2 filterTextureCoord( void ) -{ - return aVertexPosition * (outputFrame.zw * inputSize.zw); -} - -void main(void) -{ - gl_Position = filterVertexPosition(); - vTextureCoord = filterTextureCoord(); -} -`,zL=hve,Sw=dve,pve=function(){function t(e){pn("6.1.0","System class is deprecated, implemement ISystem interface instead."),this.renderer=e}return t.prototype.destroy=function(){this.renderer=null},t}(),bp=function(){function t(){this.texArray=null,this.blend=0,this.type=Ln.TRIANGLES,this.start=0,this.size=0,this.data=null}return t}(),Sp=function(){function t(){this.elements=[],this.ids=[],this.count=0}return t.prototype.clear=function(){for(var e=0;ethis.size&&this.flush(),this._vertexCount+=r.vertexData.length/2,this._indexCount+=r.indices.length,this._bufferedTextures[this._bufferSize]=r._texture.baseTexture,this._bufferedElements[this._bufferSize++]=r)},e.prototype.buildTexturesAndDrawCalls=function(){var r=this,n=r._bufferedTextures,i=r.MAX_TEXTURES,a=e._textureArrayPool,o=this.renderer.batch,s=this._tempBoundTextures,u=this.renderer.textureGC.count,l=++Je._globalBatch,c=0,f=a[0],h=0;o.copyBoundTextures(s,i);for(var d=0;d=i&&(o.boundArray(f,s,l,i),this.buildDrawCalls(f,h,d),h=d,f=a[++c],++l),p._batchEnabled=l,p.touched=u,f.elements[f.count++]=p)}f.count>0&&(o.boundArray(f,s,l,i),this.buildDrawCalls(f,h,this._bufferSize),++c,++l);for(var d=0;d0&&(r+=` -else `),n title : "+e.title+"
tabIndex: "+e.tabIndex},t.prototype.capHitArea=function(e){e.x<0&&(e.width+=e.x,e.x=0),e.y<0&&(e.height+=e.y,e.y=0);var r=this.renderer,n=r.width,i=r.height;e.x+e.width>n&&(e.width=n-e.x),e.y+e.height>i&&(e.height=i-e.y)},t.prototype.addChild=function(e){var r=this.pool.pop();r||(r=document.createElement("button"),r.style.width=Nh+"px",r.style.height=Nh+"px",r.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",r.style.position="absolute",r.style.zIndex=H2.toString(),r.style.borderStyle="none",navigator.userAgent.toLowerCase().indexOf("chrome")>-1?r.setAttribute("aria-live","off"):r.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?r.setAttribute("aria-relevant","additions"):r.setAttribute("aria-relevant","text"),r.addEventListener("click",this._onClick.bind(this)),r.addEventListener("focus",this._onFocus.bind(this)),r.addEventListener("focusout",this._onFocusOut.bind(this))),r.style.pointerEvents=e.accessiblePointerEvents,r.type=e.accessibleType,e.accessibleTitle&&e.accessibleTitle!==null?r.title=e.accessibleTitle:(!e.accessibleHint||e.accessibleHint===null)&&(r.title="displayObject "+e.tabIndex),e.accessibleHint&&e.accessibleHint!==null&&r.setAttribute("aria-label",e.accessibleHint),this.debug&&this.updateDebugHTML(r),e._accessibleActive=!0,e._accessibleDiv=r,r.displayObject=e,this.children.push(e),this.div.appendChild(e._accessibleDiv),e._accessibleDiv.tabIndex=e.tabIndex},t.prototype._onClick=function(e){var r=this.renderer.plugins.interaction,n=e.target.displayObject,i=r.eventData;r.dispatchEvent(n,"click",i),r.dispatchEvent(n,"pointertap",i),r.dispatchEvent(n,"tap",i)},t.prototype._onFocus=function(e){e.target.getAttribute("aria-live")||e.target.setAttribute("aria-live","assertive");var r=this.renderer.plugins.interaction,n=e.target.displayObject,i=r.eventData;r.dispatchEvent(n,"mouseover",i)},t.prototype._onFocusOut=function(e){e.target.getAttribute("aria-live")||e.target.setAttribute("aria-live","polite");var r=this.renderer.plugins.interaction,n=e.target.displayObject,i=r.eventData;r.dispatchEvent(n,"mouseout",i)},t.prototype._onKeyDown=function(e){e.keyCode===yve&&this.activate()},t.prototype._onMouseMove=function(e){e.movementX===0&&e.movementY===0||this.deactivate()},t.prototype.destroy=function(){this.destroyTouchHook(),this.div=null,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null},t.extension={name:"accessibility",type:[dt.RendererPlugin,dt.CanvasRendererPlugin]},t}();/*! - * @pixi/interaction - v6.5.10 - * Compiled Thu, 06 Jul 2023 15:25:11 UTC - * - * @pixi/interaction is licensed under the MIT License. - * http://www.opensource.org/licenses/mit-license - */var X_=function(){function t(){this.pressure=0,this.rotationAngle=0,this.twist=0,this.tangentialPressure=0,this.global=new We,this.target=null,this.originalEvent=null,this.identifier=null,this.isPrimary=!1,this.button=0,this.buttons=0,this.width=0,this.height=0,this.tiltX=0,this.tiltY=0,this.pointerType=null,this.pressure=0,this.rotationAngle=0,this.twist=0,this.tangentialPressure=0}return Object.defineProperty(t.prototype,"pointerId",{get:function(){return this.identifier},enumerable:!1,configurable:!0}),t.prototype.getLocalPosition=function(e,r,n){return e.worldTransform.applyInverse(n||this.global,r)},t.prototype.copyEvent=function(e){"isPrimary"in e&&e.isPrimary&&(this.isPrimary=!0),this.button="button"in e&&e.button;var r="buttons"in e&&e.buttons;this.buttons=Number.isInteger(r)?r:"which"in e&&e.which,this.width="width"in e&&e.width,this.height="height"in e&&e.height,this.tiltX="tiltX"in e&&e.tiltX,this.tiltY="tiltY"in e&&e.tiltY,this.pointerType="pointerType"in e&&e.pointerType,this.pressure="pressure"in e&&e.pressure,this.rotationAngle="rotationAngle"in e&&e.rotationAngle,this.twist="twist"in e&&e.twist||0,this.tangentialPressure="tangentialPressure"in e&&e.tangentialPressure||0},t.prototype.reset=function(){this.isPrimary=!1},t}();/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var z_=function(t,e){return z_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},z_(t,e)};function Eve(t,e){z_(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var JL=function(){function t(){this.stopped=!1,this.stopsPropagatingAt=null,this.stopPropagationHint=!1,this.target=null,this.currentTarget=null,this.type=null,this.data=null}return t.prototype.stopPropagation=function(){this.stopped=!0,this.stopPropagationHint=!0,this.stopsPropagatingAt=this.currentTarget},t.prototype.reset=function(){this.stopped=!1,this.stopsPropagatingAt=null,this.stopPropagationHint=!1,this.currentTarget=null,this.target=null},t}(),Ed=function(){function t(e){this._pointerId=e,this._flags=t.FLAGS.NONE}return t.prototype._doSet=function(e,r){r?this._flags=this._flags|e:this._flags=this._flags&~e},Object.defineProperty(t.prototype,"pointerId",{get:function(){return this._pointerId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"flags",{get:function(){return this._flags},set:function(e){this._flags=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"none",{get:function(){return this._flags===t.FLAGS.NONE},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"over",{get:function(){return(this._flags&t.FLAGS.OVER)!==0},set:function(e){this._doSet(t.FLAGS.OVER,e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rightDown",{get:function(){return(this._flags&t.FLAGS.RIGHT_DOWN)!==0},set:function(e){this._doSet(t.FLAGS.RIGHT_DOWN,e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"leftDown",{get:function(){return(this._flags&t.FLAGS.LEFT_DOWN)!==0},set:function(e){this._doSet(t.FLAGS.LEFT_DOWN,e)},enumerable:!1,configurable:!0}),t.FLAGS=Object.freeze({NONE:0,OVER:1,LEFT_DOWN:2,RIGHT_DOWN:4}),t}(),Tve=function(){function t(){this._tempPoint=new We}return t.prototype.recursiveFindHit=function(e,r,n,i,a){var o;if(!r||!r.visible)return!1;var s=e.data.global;a=r.interactive||a;var u=!1,l=a,c=!0;if(r.hitArea)i&&(r.worldTransform.applyInverse(s,this._tempPoint),r.hitArea.contains(this._tempPoint.x,this._tempPoint.y)?u=!0:(i=!1,c=!1)),l=!1;else if(r._mask&&i){var f=r._mask.isMaskData?r._mask.maskObject:r._mask;f&&!(!((o=f.containsPoint)===null||o===void 0)&&o.call(f,s))&&(i=!1)}if(c&&r.interactiveChildren&&r.children)for(var h=r.children,d=h.length-1;d>=0;d--){var p=h[d],v=this.recursiveFindHit(e,p,n,i,l);if(v){if(!p.parent)continue;l=!1,v&&(e.target&&(i=!1),u=!0)}}return a&&(i&&!e.target&&!r.hitArea&&r.containsPoint&&r.containsPoint(s)&&(u=!0),r.interactive&&(u&&!e.target&&(e.target=r),n&&n(e,r,!!u))),u},t.prototype.findHit=function(e,r,n,i){this.recursiveFindHit(e,r,n,i,!1)},t}(),eD={interactive:!1,interactiveChildren:!0,hitArea:null,get buttonMode(){return this.cursor==="pointer"},set buttonMode(t){t?this.cursor="pointer":this.cursor==="pointer"&&(this.cursor=null)},cursor:null,get trackedPointers(){return this._trackedPointers===void 0&&(this._trackedPointers={}),this._trackedPointers},_trackedPointers:void 0};Yt.mixin(eD);var Lh=1,Dh={target:null,data:{global:null}},tD=function(t){Eve(e,t);function e(r,n){var i=t.call(this)||this;return n=n||{},i.renderer=r,i.autoPreventDefault=n.autoPreventDefault!==void 0?n.autoPreventDefault:!0,i.interactionFrequency=n.interactionFrequency||10,i.mouse=new X_,i.mouse.identifier=Lh,i.mouse.global.set(-999999),i.activeInteractionData={},i.activeInteractionData[Lh]=i.mouse,i.interactionDataPool=[],i.eventData=new JL,i.interactionDOMElement=null,i.moveWhenInside=!1,i.eventsAdded=!1,i.tickerAdded=!1,i.mouseOverRenderer=!("PointerEvent"in globalThis),i.supportsTouchEvents="ontouchstart"in globalThis,i.supportsPointerEvents=!!globalThis.PointerEvent,i.onPointerUp=i.onPointerUp.bind(i),i.processPointerUp=i.processPointerUp.bind(i),i.onPointerCancel=i.onPointerCancel.bind(i),i.processPointerCancel=i.processPointerCancel.bind(i),i.onPointerDown=i.onPointerDown.bind(i),i.processPointerDown=i.processPointerDown.bind(i),i.onPointerMove=i.onPointerMove.bind(i),i.processPointerMove=i.processPointerMove.bind(i),i.onPointerOut=i.onPointerOut.bind(i),i.processPointerOverOut=i.processPointerOverOut.bind(i),i.onPointerOver=i.onPointerOver.bind(i),i.cursorStyles={default:"inherit",pointer:"pointer"},i.currentCursorMode=null,i.cursor=null,i.resolution=1,i.delayedEvents=[],i.search=new Tve,i._tempDisplayObject=new ZS,i._eventListenerOptions={capture:!0,passive:!1},i._useSystemTicker=n.useSystemTicker!==void 0?n.useSystemTicker:!0,i.setTargetElement(i.renderer.view,i.renderer.resolution),i}return Object.defineProperty(e.prototype,"useSystemTicker",{get:function(){return this._useSystemTicker},set:function(r){this._useSystemTicker=r,r?this.addTickerListener():this.removeTickerListener()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastObjectRendered",{get:function(){return this.renderer._lastObjectRendered||this._tempDisplayObject},enumerable:!1,configurable:!0}),e.prototype.hitTest=function(r,n){return Dh.target=null,Dh.data.global=r,n||(n=this.lastObjectRendered),this.processInteractive(Dh,n,null,!0),Dh.target},e.prototype.setTargetElement=function(r,n){n===void 0&&(n=1),this.removeTickerListener(),this.removeEvents(),this.interactionDOMElement=r,this.resolution=n,this.addEvents(),this.addTickerListener()},e.prototype.addTickerListener=function(){this.tickerAdded||!this.interactionDOMElement||!this._useSystemTicker||(Or.system.add(this.tickerUpdate,this,ra.INTERACTION),this.tickerAdded=!0)},e.prototype.removeTickerListener=function(){this.tickerAdded&&(Or.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)},e.prototype.addEvents=function(){if(!(this.eventsAdded||!this.interactionDOMElement)){var r=this.interactionDOMElement.style;globalThis.navigator.msPointerEnabled?(r.msContentZooming="none",r.msTouchAction="none"):this.supportsPointerEvents&&(r.touchAction="none"),this.supportsPointerEvents?(globalThis.document.addEventListener("pointermove",this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.addEventListener("pointerdown",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener("pointerleave",this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.addEventListener("pointerover",this.onPointerOver,this._eventListenerOptions),globalThis.addEventListener("pointercancel",this.onPointerCancel,this._eventListenerOptions),globalThis.addEventListener("pointerup",this.onPointerUp,this._eventListenerOptions)):(globalThis.document.addEventListener("mousemove",this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.addEventListener("mousedown",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener("mouseout",this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.addEventListener("mouseover",this.onPointerOver,this._eventListenerOptions),globalThis.addEventListener("mouseup",this.onPointerUp,this._eventListenerOptions)),this.supportsTouchEvents&&(this.interactionDOMElement.addEventListener("touchstart",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener("touchcancel",this.onPointerCancel,this._eventListenerOptions),this.interactionDOMElement.addEventListener("touchend",this.onPointerUp,this._eventListenerOptions),this.interactionDOMElement.addEventListener("touchmove",this.onPointerMove,this._eventListenerOptions)),this.eventsAdded=!0}},e.prototype.removeEvents=function(){if(!(!this.eventsAdded||!this.interactionDOMElement)){var r=this.interactionDOMElement.style;globalThis.navigator.msPointerEnabled?(r.msContentZooming="",r.msTouchAction=""):this.supportsPointerEvents&&(r.touchAction=""),this.supportsPointerEvents?(globalThis.document.removeEventListener("pointermove",this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("pointerdown",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("pointerleave",this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("pointerover",this.onPointerOver,this._eventListenerOptions),globalThis.removeEventListener("pointercancel",this.onPointerCancel,this._eventListenerOptions),globalThis.removeEventListener("pointerup",this.onPointerUp,this._eventListenerOptions)):(globalThis.document.removeEventListener("mousemove",this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("mousedown",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("mouseout",this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("mouseover",this.onPointerOver,this._eventListenerOptions),globalThis.removeEventListener("mouseup",this.onPointerUp,this._eventListenerOptions)),this.supportsTouchEvents&&(this.interactionDOMElement.removeEventListener("touchstart",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("touchcancel",this.onPointerCancel,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("touchend",this.onPointerUp,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("touchmove",this.onPointerMove,this._eventListenerOptions)),this.interactionDOMElement=null,this.eventsAdded=!1}},e.prototype.tickerUpdate=function(r){this._deltaTime+=r,!(this._deltaTime0&&(s=r.composedPath()[0]);for(var u=s!==this.interactionDOMElement?"outside":"",l=0;l"u"&&(o.button=r.touches.length?1:0),typeof o.buttons>"u"&&(o.buttons=r.touches.length?1:0),typeof o.isPrimary>"u"&&(o.isPrimary=r.touches.length===1&&r.type==="touchstart"),typeof o.width>"u"&&(o.width=o.radiusX||1),typeof o.height>"u"&&(o.height=o.radiusY||1),typeof o.tiltX>"u"&&(o.tiltX=0),typeof o.tiltY>"u"&&(o.tiltY=0),typeof o.pointerType>"u"&&(o.pointerType="touch"),typeof o.pointerId>"u"&&(o.pointerId=o.identifier||0),typeof o.pressure>"u"&&(o.pressure=o.force||.5),typeof o.twist>"u"&&(o.twist=0),typeof o.tangentialPressure>"u"&&(o.tangentialPressure=0),typeof o.layerX>"u"&&(o.layerX=o.offsetX=o.clientX),typeof o.layerY>"u"&&(o.layerY=o.offsetY=o.clientY),o.isNormalized=!0,n.push(o)}else if(!globalThis.MouseEvent||r instanceof MouseEvent&&(!this.supportsPointerEvents||!(r instanceof globalThis.PointerEvent))){var s=r;typeof s.isPrimary>"u"&&(s.isPrimary=!0),typeof s.width>"u"&&(s.width=1),typeof s.height>"u"&&(s.height=1),typeof s.tiltX>"u"&&(s.tiltX=0),typeof s.tiltY>"u"&&(s.tiltY=0),typeof s.pointerType>"u"&&(s.pointerType="mouse"),typeof s.pointerId>"u"&&(s.pointerId=Lh),typeof s.pressure>"u"&&(s.pressure=.5),typeof s.twist>"u"&&(s.twist=0),typeof s.tangentialPressure>"u"&&(s.tangentialPressure=0),s.isNormalized=!0,n.push(s)}else n.push(r);return n},e.prototype.destroy=function(){this.removeEvents(),this.removeTickerListener(),this.removeAllListeners(),this.renderer=null,this.mouse=null,this.eventData=null,this.interactionDOMElement=null,this.onPointerDown=null,this.processPointerDown=null,this.onPointerUp=null,this.processPointerUp=null,this.onPointerCancel=null,this.processPointerCancel=null,this.onPointerMove=null,this.processPointerMove=null,this.onPointerOut=null,this.processPointerOverOut=null,this.onPointerOver=null,this.search=null},e.extension={name:"interaction",type:[dt.RendererPlugin,dt.CanvasRendererPlugin]},e}(mu);/*! - * @pixi/extract - v6.5.10 - * Compiled Thu, 06 Jul 2023 15:25:11 UTC - * - * @pixi/extract is licensed under the MIT License. - * http://www.opensource.org/licenses/mit-license - */var Ave=new Ye,Cve=4,rD=function(){function t(e){this.renderer=e}return t.prototype.image=function(e,r,n){var i=new Image;return i.src=this.base64(e,r,n),i},t.prototype.base64=function(e,r,n){return this.canvas(e).toDataURL(r,n)},t.prototype.canvas=function(e,r){var n=this._rawPixels(e,r),i=n.pixels,a=n.width,o=n.height,s=n.flipY,u=new B_(a,o,1),l=u.context.getImageData(0,0,a,o);if(t.arrayPostDivide(i,l.data),u.context.putImageData(l,0,0),s){var c=new B_(u.width,u.height,1);c.context.scale(1,-1),c.context.drawImage(u.canvas,0,-o),u.destroy(),u=c}return u.canvas},t.prototype.pixels=function(e,r){var n=this._rawPixels(e,r).pixels;return t.arrayPostDivide(n,n),n},t.prototype._rawPixels=function(e,r){var n=this.renderer,i,a=!1,o,s=!1;if(e)if(e instanceof Co)o=e;else{var u=n.context.webGLVersion>=2?n.multisample:Ot.NONE;if(o=this.renderer.generateTexture(e,{multisample:u}),u!==Ot.NONE){var l=Co.create({width:o.width,height:o.height});n.framebuffer.bind(o.framebuffer),n.framebuffer.blit(l.framebuffer),n.framebuffer.bind(null),o.destroy(!0),o=l}s=!0}o?(i=o.baseTexture.resolution,r=r??o.frame,a=!1,n.renderTexture.bind(o)):(i=n.resolution,r||(r=Ave,r.width=n.width,r.height=n.height),a=!0,n.renderTexture.bind(null));var c=Math.round(r.width*i),f=Math.round(r.height*i),h=new Uint8Array(Cve*c*f),d=n.gl;return d.readPixels(Math.round(r.x*i),Math.round(r.y*i),c,f,d.RGBA,d.UNSIGNED_BYTE,h),s&&o.destroy(!0),{pixels:h,width:c,height:f,flipY:a}},t.prototype.destroy=function(){this.renderer=null},t.arrayPostDivide=function(e,r){for(var n=0;n"u"&&(Ry=!!(globalThis.XDomainRequest&&!("withCredentials"in new XMLHttpRequest))),Ry&&this.crossOrigin?this._loadXdr():this._loadXhr();break}}},t.prototype._hasFlag=function(e){return(this._flags&e)!==0},t.prototype._setFlag=function(e,r){this._flags=r?this._flags|e:this._flags&~e},t.prototype._clearEvents=function(){clearTimeout(this._elementTimer),this.data&&this.data.removeEventListener&&(this.data.removeEventListener("error",this._boundOnError,!1),this.data.removeEventListener("load",this._boundComplete,!1),this.data.removeEventListener("progress",this._boundOnProgress,!1),this.data.removeEventListener("canplaythrough",this._boundComplete,!1)),this.xhr&&(this.xhr.removeEventListener?(this.xhr.removeEventListener("error",this._boundXhrOnError,!1),this.xhr.removeEventListener("timeout",this._boundXhrOnTimeout,!1),this.xhr.removeEventListener("abort",this._boundXhrOnAbort,!1),this.xhr.removeEventListener("progress",this._boundOnProgress,!1),this.xhr.removeEventListener("load",this._boundXhrOnLoad,!1)):(this.xhr.onerror=null,this.xhr.ontimeout=null,this.xhr.onprogress=null,this.xhr.onload=null))},t.prototype._finish=function(){if(this.isComplete)throw new Error("Complete called again for an already completed resource.");this._setFlag(t.STATUS_FLAGS.COMPLETE,!0),this._setFlag(t.STATUS_FLAGS.LOADING,!1),this.onComplete.dispatch(this)},t.prototype._loadElement=function(e){this.metadata.loadElement?this.data=this.metadata.loadElement:e==="image"&&typeof globalThis.Image<"u"?this.data=new Image:this.data=document.createElement(e),this.crossOrigin&&(this.data.crossOrigin=this.crossOrigin),this.metadata.skipSource||(this.data.src=this.url),this.data.addEventListener("error",this._boundOnError,!1),this.data.addEventListener("load",this._boundComplete,!1),this.data.addEventListener("progress",this._boundOnProgress,!1),this.timeout&&(this._elementTimer=setTimeout(this._boundOnTimeout,this.timeout))},t.prototype._loadSourceElement=function(e){if(this.metadata.loadElement?this.data=this.metadata.loadElement:e==="audio"&&typeof globalThis.Audio<"u"?this.data=new Audio:this.data=document.createElement(e),this.data===null){this.abort("Unsupported element: "+e);return}if(this.crossOrigin&&(this.data.crossOrigin=this.crossOrigin),!this.metadata.skipSource)if(navigator.isCocoonJS)this.data.src=Array.isArray(this.url)?this.url[0]:this.url;else if(Array.isArray(this.url))for(var r=this.metadata.mimeType,n=0;n"u"?Z2:e.status;(e.responseType===""||e.responseType==="text"||typeof e.responseType>"u")&&(r=e.responseText),n===Pve&&(r.length>0||e.responseType===t.XHR_RESPONSE_TYPE.BUFFER)?n=Z2:n===Rve&&(n=Ove);var i=n/100|0;if(i===Ive)if(this.xhrType===t.XHR_RESPONSE_TYPE.TEXT)this.data=r,this.type=t.TYPE.TEXT;else if(this.xhrType===t.XHR_RESPONSE_TYPE.JSON)try{this.data=JSON.parse(r),this.type=t.TYPE.JSON}catch(s){this.abort("Error trying to parse loaded json: "+s);return}else if(this.xhrType===t.XHR_RESPONSE_TYPE.DOCUMENT)try{if(globalThis.DOMParser){var a=new DOMParser;this.data=a.parseFromString(r,"text/xml")}else{var o=document.createElement("div");o.innerHTML=r,this.data=o}this.type=t.TYPE.XML}catch(s){this.abort("Error trying to parse loaded xml: "+s);return}else this.data=e.response||r;else{this.abort("["+e.status+"] "+e.statusText+": "+e.responseURL);return}this.complete()},t.prototype._determineCrossOrigin=function(e,r){if(e.indexOf("data:")===0)return"";if(globalThis.origin!==globalThis.location.origin)return"anonymous";r=r||globalThis.location,jh||(jh=document.createElement("a")),jh.href=e;var n=nD(jh.href,{strictMode:!0}),i=!n.port&&r.port===""||n.port===r.port,a=n.protocol?n.protocol+":":"";return n.host!==r.hostname||!i||a!==r.protocol?"anonymous":""},t.prototype._determineXhrType=function(){return t._xhrTypeMap[this.extension]||t.XHR_RESPONSE_TYPE.TEXT},t.prototype._determineLoadType=function(){return t._loadTypeMap[this.extension]||t.LOAD_TYPE.XHR},t.prototype._getExtension=function(e){e===void 0&&(e=this.url);var r="";if(this.isDataUrl){var n=e.indexOf("/");r=e.substring(n+1,e.indexOf(";",n))}else{var i=e.indexOf("?"),a=e.indexOf("#"),o=Math.min(i>-1?i:e.length,a>-1?a:e.length);e=e.substring(0,o),r=e.substring(e.lastIndexOf(".")+1)}return r.toLowerCase()},t.prototype._getMimeFromXhrType=function(e){switch(e){case t.XHR_RESPONSE_TYPE.BUFFER:return"application/octet-binary";case t.XHR_RESPONSE_TYPE.BLOB:return"application/blob";case t.XHR_RESPONSE_TYPE.DOCUMENT:return"application/xml";case t.XHR_RESPONSE_TYPE.JSON:return"application/json";case t.XHR_RESPONSE_TYPE.DEFAULT:case t.XHR_RESPONSE_TYPE.TEXT:default:return"text/plain"}},t}();(function(t){(function(e){e[e.NONE=0]="NONE",e[e.DATA_URL=1]="DATA_URL",e[e.COMPLETE=2]="COMPLETE",e[e.LOADING=4]="LOADING"})(t.STATUS_FLAGS||(t.STATUS_FLAGS={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.JSON=1]="JSON",e[e.XML=2]="XML",e[e.IMAGE=3]="IMAGE",e[e.AUDIO=4]="AUDIO",e[e.VIDEO=5]="VIDEO",e[e.TEXT=6]="TEXT"}(t.TYPE||(t.TYPE={})),function(e){e[e.XHR=1]="XHR",e[e.IMAGE=2]="IMAGE",e[e.AUDIO=3]="AUDIO",e[e.VIDEO=4]="VIDEO"}(t.LOAD_TYPE||(t.LOAD_TYPE={})),function(e){e.DEFAULT="text",e.BUFFER="arraybuffer",e.BLOB="blob",e.DOCUMENT="document",e.JSON="json",e.TEXT="text"}(t.XHR_RESPONSE_TYPE||(t.XHR_RESPONSE_TYPE={})),t._loadTypeMap={gif:t.LOAD_TYPE.IMAGE,png:t.LOAD_TYPE.IMAGE,bmp:t.LOAD_TYPE.IMAGE,jpg:t.LOAD_TYPE.IMAGE,jpeg:t.LOAD_TYPE.IMAGE,tif:t.LOAD_TYPE.IMAGE,tiff:t.LOAD_TYPE.IMAGE,webp:t.LOAD_TYPE.IMAGE,tga:t.LOAD_TYPE.IMAGE,avif:t.LOAD_TYPE.IMAGE,svg:t.LOAD_TYPE.IMAGE,"svg+xml":t.LOAD_TYPE.IMAGE,mp3:t.LOAD_TYPE.AUDIO,ogg:t.LOAD_TYPE.AUDIO,wav:t.LOAD_TYPE.AUDIO,mp4:t.LOAD_TYPE.VIDEO,webm:t.LOAD_TYPE.VIDEO},t._xhrTypeMap={xhtml:t.XHR_RESPONSE_TYPE.DOCUMENT,html:t.XHR_RESPONSE_TYPE.DOCUMENT,htm:t.XHR_RESPONSE_TYPE.DOCUMENT,xml:t.XHR_RESPONSE_TYPE.DOCUMENT,tmx:t.XHR_RESPONSE_TYPE.DOCUMENT,svg:t.XHR_RESPONSE_TYPE.DOCUMENT,tsx:t.XHR_RESPONSE_TYPE.DOCUMENT,gif:t.XHR_RESPONSE_TYPE.BLOB,png:t.XHR_RESPONSE_TYPE.BLOB,bmp:t.XHR_RESPONSE_TYPE.BLOB,jpg:t.XHR_RESPONSE_TYPE.BLOB,jpeg:t.XHR_RESPONSE_TYPE.BLOB,tif:t.XHR_RESPONSE_TYPE.BLOB,tiff:t.XHR_RESPONSE_TYPE.BLOB,webp:t.XHR_RESPONSE_TYPE.BLOB,tga:t.XHR_RESPONSE_TYPE.BLOB,avif:t.XHR_RESPONSE_TYPE.BLOB,json:t.XHR_RESPONSE_TYPE.JSON,text:t.XHR_RESPONSE_TYPE.TEXT,txt:t.XHR_RESPONSE_TYPE.TEXT,ttf:t.XHR_RESPONSE_TYPE.BUFFER,otf:t.XHR_RESPONSE_TYPE.BUFFER},t.EMPTY_GIF="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="})(mt||(mt={}));function Do(){}function kve(t){return function(){for(var r=arguments,n=[],i=0;i>2,i[1]=(n[0]&3)<<4|n[1]>>4,i[2]=(n[1]&15)<<2|n[2]>>6,i[3]=n[2]&63;var o=r-(t.length-1);switch(o){case 2:i[3]=64,i[2]=64;break;case 1:i[3]=64;break}for(var a=0;a0&&a[a.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]=33776&&r<=33779)return"s3tc";if(r>=37488&&r<=37497)return"etc";if(r>=35840&&r<=35843)return"pvrtc";if(r>=36196)return"etc1";if(r>=35986&&r<=34798)return"atc";throw new Error("Invalid (compressed) texture format given!")},e._createLevelBuffers=function(r,n,i,a,o,s,u){for(var l=new Array(i),c=r.byteOffset,f=s,h=u,d=f+a-1&~(a-1),p=h+o-1&~(o-1),v=d*p*df[n],g=0;g1?f:d,levelHeight:i>1?h:p,levelBuffer:new Uint8Array(r.buffer,c,v)},c+=v,f=f>>1||1,h=h>>1||1,d=f+a-1&~(a-1),p=h+o-1&~(o-1),v=d*p*df[n];return l},e}(sD),lD=function(){function t(){}return t.use=function(e,r){var n=e.data,i=this;if(e.type===mt.TYPE.JSON&&n&&n.cacheID&&n.textures){for(var a=n.textures,o=void 0,s=void 0,u=0,l=a.length;u>>1,A=A>>>1}for(var B=S,O=0;O<_;O++)b.push(new Uint8Array(t,B,E)),B+=E}return b.map(function(j){return new Ep(j,{format:x,width:a,height:i,levels:o})})}throw u&Yve?new Error("DDSParser does not support uncompressed texture data."):u&Hve?new Error("DDSParser does not supported YUV uncompressed texture data."):u&qve?new Error("DDSParser does not support single-channel (lumninance) texture data!"):u&zve?new Error("DDSParser does not support single-channel (alpha) texture data!"):new Error("DDSParser failed to load a texture file due to an unknown reason!")}var Va,_a,Wu,tO=[171,75,84,88,32,49,49,187,13,10,26,10],nme=67305985,ci={FILE_IDENTIFIER:0,ENDIANNESS:12,GL_TYPE:16,GL_TYPE_SIZE:20,GL_FORMAT:24,GL_INTERNAL_FORMAT:28,GL_BASE_INTERNAL_FORMAT:32,PIXEL_WIDTH:36,PIXEL_HEIGHT:40,PIXEL_DEPTH:44,NUMBER_OF_ARRAY_ELEMENTS:48,NUMBER_OF_FACES:52,NUMBER_OF_MIPMAP_LEVELS:56,BYTES_OF_KEY_VALUE_DATA:60},H_=64,q_=(Va={},Va[Re.UNSIGNED_BYTE]=1,Va[Re.UNSIGNED_SHORT]=2,Va[Re.INT]=4,Va[Re.UNSIGNED_INT]=4,Va[Re.FLOAT]=4,Va[Re.HALF_FLOAT]=8,Va),fD=(_a={},_a[ve.RGBA]=4,_a[ve.RGB]=3,_a[ve.RG]=2,_a[ve.RED]=1,_a[ve.LUMINANCE]=1,_a[ve.LUMINANCE_ALPHA]=2,_a[ve.ALPHA]=1,_a),hD=(Wu={},Wu[Re.UNSIGNED_SHORT_4_4_4_4]=2,Wu[Re.UNSIGNED_SHORT_5_5_5_1]=2,Wu[Re.UNSIGNED_SHORT_5_6_5]=2,Wu);function dD(t,e,r){r===void 0&&(r=!1);var n=new DataView(e);if(!ime(t,n))return null;var i=n.getUint32(ci.ENDIANNESS,!0)===nme,a=n.getUint32(ci.GL_TYPE,i),o=n.getUint32(ci.GL_FORMAT,i),s=n.getUint32(ci.GL_INTERNAL_FORMAT,i),u=n.getUint32(ci.PIXEL_WIDTH,i),l=n.getUint32(ci.PIXEL_HEIGHT,i)||1,c=n.getUint32(ci.PIXEL_DEPTH,i)||1,f=n.getUint32(ci.NUMBER_OF_ARRAY_ELEMENTS,i)||1,h=n.getUint32(ci.NUMBER_OF_FACES,i),d=n.getUint32(ci.NUMBER_OF_MIPMAP_LEVELS,i),p=n.getUint32(ci.BYTES_OF_KEY_VALUE_DATA,i);if(l===0||c!==1)throw new Error("Only 2D textures are supported");if(h!==1)throw new Error("CubeTextures are not supported by KTXLoader yet!");if(f!==1)throw new Error("WebGL does not support array textures");var v=4,g=4,m=u+3&-4,y=l+3&-4,_=new Array(f),x=u*l;a===0&&(x=m*y);var b;if(a!==0?q_[a]?b=q_[a]*fD[o]:b=hD[a]:b=df[s],b===void 0)throw new Error("Unable to resolve the pixel format stored in the *.ktx file!");for(var S=r?ome(n,p,i):null,w=x*b,E=w,T=u,A=l,O=m,P=y,k=H_+p,M=0;M1||a!==0?T:O,levelHeight:d>1||a!==0?A:P,levelBuffer:new Uint8Array(e,j,E)},j+=E}k+=B+4,k=k%4!==0?k+4-k%4:k,T=T>>1||1,A=A>>1||1,O=T+v-1&~(v-1),P=A+g-1&~(g-1),E=O*P*b}return a!==0?{uncompressed:_.map(function(Z){var $=Z[0].levelBuffer,F=!1;return a===Re.FLOAT?$=new Float32Array(Z[0].levelBuffer.buffer,Z[0].levelBuffer.byteOffset,Z[0].levelBuffer.byteLength/4):a===Re.UNSIGNED_INT?(F=!0,$=new Uint32Array(Z[0].levelBuffer.buffer,Z[0].levelBuffer.byteOffset,Z[0].levelBuffer.byteLength/4)):a===Re.INT&&(F=!0,$=new Int32Array(Z[0].levelBuffer.buffer,Z[0].levelBuffer.byteOffset,Z[0].levelBuffer.byteLength/4)),{resource:new Ms($,{width:Z[0].levelWidth,height:Z[0].levelHeight}),type:a,format:F?ame(o):o}}),kvData:S}:{compressed:_.map(function(Z){return new Ep(null,{format:s,width:u,height:l,levels:d,levelBuffers:Z})}),kvData:S}}function ime(t,e){for(var r=0;re-i){console.error("KTXLoader: keyAndValueByteSize out of bounds");break}for(var u=0;us&&(i=s),o._properties=[!1,!0,!1,!1,!1],o._maxSize=r,o._batchSize=i,o._buffers=null,o._bufferUpdateIDs=[],o._updateID=0,o.interactiveChildren=!1,o.blendMode=Se.NORMAL,o.autoResize=a,o.roundPixels=!0,o.baseTexture=null,o.setProperties(n),o._tint=0,o.tintRgb=new Float32Array(4),o.tint=16777215,o}return e.prototype.setProperties=function(r){r&&(this._properties[0]="vertices"in r||"scale"in r?!!r.vertices||!!r.scale:this._properties[0],this._properties[1]="position"in r?!!r.position:this._properties[1],this._properties[2]="rotation"in r?!!r.rotation:this._properties[2],this._properties[3]="uvs"in r?!!r.uvs:this._properties[3],this._properties[4]="tint"in r||"alpha"in r?!!r.tint||!!r.alpha:this._properties[4])},e.prototype.updateTransform=function(){this.displayObjectUpdateTransform()},Object.defineProperty(e.prototype,"tint",{get:function(){return this._tint},set:function(r){this._tint=r,yr(r,this.tintRgb)},enumerable:!1,configurable:!0}),e.prototype.render=function(r){var n=this;!this.visible||this.worldAlpha<=0||!this.children.length||!this.renderable||(this.baseTexture||(this.baseTexture=this.children[0]._texture.baseTexture,this.baseTexture.valid||this.baseTexture.once("update",function(){return n.onChildrenChange(0)})),r.batch.setObjectRenderer(r.plugins.particle),r.plugins.particle.render(this))},e.prototype.onChildrenChange=function(r){for(var n=Math.floor(r/this._batchSize);this._bufferUpdateIDs.lengthi&&!r.autoResize&&(s=i);var u=r._buffers;u||(u=r._buffers=this.generateBuffers(r));var l=n[0]._texture.baseTexture,c=l.alphaMode>0;this.state.blendMode=HS(r.blendMode,c),o.state.set(this.state);var f=o.gl,h=r.worldTransform.copyTo(this.tempMatrix);h.prepend(o.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=h.toArray(!0),this.shader.uniforms.uColor=cL(r.tintRgb,r.worldAlpha,this.shader.uniforms.uColor,c),this.shader.uniforms.uSampler=l,this.renderer.shader.bind(this.shader);for(var d=!1,p=0,v=0;pa&&(g=a),v>=u.length&&u.push(this._generateOneMoreBuffer(r));var m=u[v];m.uploadDynamic(n,p,g);var y=r._bufferUpdateIDs[v]||0;d=d||m._updateID0,f=l.alpha,h=f<1&&c?im(l._tintRGB,f):l._tintRGB+(f*255<<24);a[s]=h,a[s+o]=h,a[s+o*2]=h,a[s+o*3]=h,s+=o*4}},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null},e.extension={name:"particle",type:dt.RendererPlugin},e}(qf);/*! - * @pixi/graphics - v6.5.10 - * Compiled Thu, 06 Jul 2023 15:25:11 UTC - * - * @pixi/graphics is licensed under the MIT License. - * http://www.opensource.org/licenses/mit-license - */var Gi;(function(t){t.MITER="miter",t.BEVEL="bevel",t.ROUND="round"})(Gi||(Gi={}));var Ra;(function(t){t.BUTT="butt",t.ROUND="round",t.SQUARE="square"})(Ra||(Ra={}));var Xl={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount:function(t,e){if(e===void 0&&(e=20),!this.adaptive||!t||isNaN(t))return e;var r=Math.ceil(t/this.maxLength);return rthis.maxSegments&&(r=this.maxSegments),r}},Aw=function(){function t(){this.color=16777215,this.alpha=1,this.texture=Fe.WHITE,this.matrix=null,this.visible=!1,this.reset()}return t.prototype.clone=function(){var e=new t;return e.color=this.color,e.alpha=this.alpha,e.texture=this.texture,e.matrix=this.matrix,e.visible=this.visible,e},t.prototype.reset=function(){this.color=16777215,this.alpha=1,this.texture=Fe.WHITE,this.matrix=null,this.visible=!1},t.prototype.destroy=function(){this.texture=null,this.matrix=null},t}();/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var Z_=function(t,e){return Z_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},Z_(t,e)};function Cw(t,e){Z_(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function nO(t,e){var r,n;e===void 0&&(e=!1);var i=t.length;if(!(i<6)){for(var a=0,o=0,s=t[i-2],u=t[i-1];o0||e&&a<=0)for(var f=i/2,o=f+f%2;o=6){nO(r,!1);for(var o=[],s=0;s=0&&s>=0&&i>=0&&a>=0)){e.length=0;return}var d=Math.ceil(2.3*Math.sqrt(o+s)),p=d*8+(i?4:0)+(a?4:0);if(e.length=p,p!==0){if(d===0){e.length=8,e[0]=e[6]=r+i,e[1]=e[3]=n+a,e[2]=e[4]=r-i,e[5]=e[7]=n-a;return}var v=0,g=d*4+(i?2:0)+2,m=g,y=p;{var _=i+o,x=a,b=r+_,S=r-_,w=n+x;if(e[v++]=b,e[v++]=w,e[--g]=w,e[--g]=S,a){var E=n-x;e[m++]=S,e[m++]=E,e[--y]=E,e[--y]=b}}for(var T=1;Tf&&(f+=Math.PI*2);var h=c,d=f-c,p=Math.abs(d),v=Math.sqrt(u*u+l*l),g=(15*p*Math.sqrt(v)/Math.PI>>0)+1,m=d/g;if(h+=m,s){o.push(t,e),o.push(r,n);for(var y=1,_=h;y=0&&(a.join===Gi.ROUND?p+=Bo(b,S,b-T*B,S-A*B,b-O*B,S-P*B,h,!1)+4:p+=2,h.push(b-O*j,S-P*j),h.push(b+O*B,S+P*B));continue}var H=(-T+_)*(-A+S)-(-T+b)*(-A+x),ee=(-O+w)*(-P+S)-(-O+b)*(-P+E),ie=(J*ee-$*H)/V,ae=(F*H-Z*ee)/V,pe=(ie-b)*(ie-b)+(ae-S)*(ae-S),ye=b+(ie-b)*B,oe=S+(ae-S)*B,_e=b-(ie-b)*j,Ce=S-(ae-S)*j,be=Math.min(J*J+Z*Z,$*$+F*F),Oe=U?B:j,ke=be+Oe*Oe*m,we=pe<=ke;we?a.join===Gi.BEVEL||pe/m>y?(U?(h.push(ye,oe),h.push(b+T*j,S+A*j),h.push(ye,oe),h.push(b+O*j,S+P*j)):(h.push(b-T*B,S-A*B),h.push(_e,Ce),h.push(b-O*B,S-P*B),h.push(_e,Ce)),p+=2):a.join===Gi.ROUND?U?(h.push(ye,oe),h.push(b+T*j,S+A*j),p+=Bo(b,S,b+T*j,S+A*j,b+O*j,S+P*j,h,!0)+4,h.push(ye,oe),h.push(b+O*j,S+P*j)):(h.push(b-T*B,S-A*B),h.push(_e,Ce),p+=Bo(b,S,b-T*B,S-A*B,b-O*B,S-P*B,h,!1)+4,h.push(b-O*B,S-P*B),h.push(_e,Ce)):(h.push(ye,oe),h.push(_e,Ce)):(h.push(b-T*B,S-A*B),h.push(b+T*j,S+A*j),a.join===Gi.ROUND?U?p+=Bo(b,S,b+T*j,S+A*j,b+O*j,S+P*j,h,!0)+2:p+=Bo(b,S,b-T*B,S-A*B,b-O*B,S-P*B,h,!1)+2:a.join===Gi.MITER&&pe/m<=y&&(U?(h.push(_e,Ce),h.push(_e,Ce)):(h.push(ye,oe),h.push(ye,oe)),p+=2),h.push(b-O*B,S-P*B),h.push(b+O*j,S+P*j),p+=2)}_=n[(d-2)*2],x=n[(d-2)*2+1],b=n[(d-1)*2],S=n[(d-1)*2+1],T=-(x-S),A=_-b,k=Math.sqrt(T*T+A*A),T/=k,A/=k,T*=g,A*=g,h.push(b-T*B,S-A*B),h.push(b+T*j,S+A*j),u||(a.cap===Ra.ROUND?p+=Bo(b-T*(B-j)*.5,S-A*(B-j)*.5,b-T*B,S-A*B,b+T*j,S+A*j,h,!1)+2:a.cap===Ra.SQUARE&&(p+=iO(b,S,T,A,B,j,!1,h)));for(var Xe=e.indices,tt=Xl.epsilon*Xl.epsilon,z=v;zh*l}},t.arc=function(e,r,n,i,a,o,s,u,l){for(var c=s-o,f=Xl._segmentsCount(Math.abs(c)*a,Math.ceil(Math.abs(c)/cf)*40),h=c/(f*2),d=h*2,p=Math.cos(h),v=Math.sin(h),g=f-1,m=g%1/g,y=0;y<=g;++y){var _=y+m*y,x=h+o+d*_,b=Math.cos(x),S=-Math.sin(x);l.push((p*b+v*S)*a+n,(p*-S+v*b)*a+i)}},t}(),xD=function(){function t(){}return t.curveLength=function(e,r,n,i,a,o,s,u){for(var l=10,c=0,f=0,h=0,d=0,p=0,v=0,g=0,m=0,y=0,_=0,x=0,b=e,S=r,w=1;w<=l;++w)f=w/l,h=f*f,d=h*f,p=1-f,v=p*p,g=v*p,m=g*e+3*v*f*n+3*p*h*a+d*s,y=g*r+3*v*f*i+3*p*h*o+d*u,_=b-m,x=S-y,b=m,S=y,c+=Math.sqrt(_*_+x*x);return c},t.curveTo=function(e,r,n,i,a,o,s){var u=s[s.length-2],l=s[s.length-1];s.length-=2;var c=Xl._segmentsCount(t.curveLength(u,l,e,r,n,i,a,o)),f=0,h=0,d=0,p=0,v=0;s.push(u,l);for(var g=1,m=0;g<=c;++g)m=g/c,f=1-m,h=f*f,d=h*f,p=m*m,v=p*m,s.push(d*u+3*h*m*e+3*f*p*n+v*a,d*l+3*h*m*r+3*f*p*i+v*o)},t}(),bD=function(){function t(){}return t.curveLength=function(e,r,n,i,a,o){var s=e-2*n+a,u=r-2*i+o,l=2*n-2*e,c=2*i-2*r,f=4*(s*s+u*u),h=4*(s*l+u*c),d=l*l+c*c,p=2*Math.sqrt(f+h+d),v=Math.sqrt(f),g=2*f*v,m=2*Math.sqrt(d),y=h/v;return(g*p+v*h*(p-m)+(4*d*f-h*h)*Math.log((2*v+y+p)/(y+m)))/(4*g)},t.curveTo=function(e,r,n,i,a){for(var o=a[a.length-2],s=a[a.length-1],u=Xl._segmentsCount(t.curveLength(o,s,e,r,n,i)),l=0,c=0,f=1;f<=u;++f){var h=f/u;l=o+(e-o)*h,c=s+(r-s)*h,a.push(l+(e+(n-e)*h-l)*h,c+(r+(i-r)*h-c)*h)}},t}(),SD=function(){function t(){this.reset()}return t.prototype.begin=function(e,r,n){this.reset(),this.style=e,this.start=r,this.attribStart=n},t.prototype.end=function(e,r){this.attribSize=r-this.attribStart,this.size=e-this.start},t.prototype.reset=function(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0},t}(),jo,Td=(jo={},jo[vr.POLY]=Pw,jo[vr.CIRC]=pf,jo[vr.ELIP]=pf,jo[vr.RECT]=yD,jo[vr.RREC]=_D,jo),ex=[],lc=[],tx=function(){function t(e,r,n,i){r===void 0&&(r=null),n===void 0&&(n=null),i===void 0&&(i=null),this.points=[],this.holes=[],this.shape=e,this.lineStyle=n,this.fillStyle=r,this.matrix=i,this.type=e.type}return t.prototype.clone=function(){return new t(this.shape,this.fillStyle,this.lineStyle,this.matrix)},t.prototype.destroy=function(){this.shape=null,this.holes.length=0,this.holes=null,this.points.length=0,this.points=null,this.lineStyle=null,this.fillStyle=null},t}(),Ys=new We,wD=function(t){Cw(e,t);function e(){var r=t.call(this)||this;return r.closePointEps=1e-4,r.boundsPadding=0,r.uvsFloat32=null,r.indicesUint16=null,r.batchable=!1,r.points=[],r.colors=[],r.uvs=[],r.indices=[],r.textureIds=[],r.graphicsData=[],r.drawCalls=[],r.batchDirty=-1,r.batches=[],r.dirty=0,r.cacheDirty=-1,r.clearDirty=0,r.shapeIndex=0,r._bounds=new ff,r.boundsDirty=-1,r}return Object.defineProperty(e.prototype,"bounds",{get:function(){return this.updateBatches(),this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.calculateBounds()),this._bounds},enumerable:!1,configurable:!0}),e.prototype.invalidate=function(){this.boundsDirty=-1,this.dirty++,this.batchDirty++,this.shapeIndex=0,this.points.length=0,this.colors.length=0,this.uvs.length=0,this.indices.length=0,this.textureIds.length=0;for(var r=0;r0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this},e.prototype.drawShape=function(r,n,i,a){n===void 0&&(n=null),i===void 0&&(i=null),a===void 0&&(a=null);var o=new tx(r,n,i,a);return this.graphicsData.push(o),this.dirty++,this},e.prototype.drawHole=function(r,n){if(n===void 0&&(n=null),!this.graphicsData.length)return null;var i=new tx(r,null,null,n),a=this.graphicsData[this.graphicsData.length-1];return i.lineStyle=a.lineStyle,a.holes.push(i),this.dirty++,this},e.prototype.destroy=function(){t.prototype.destroy.call(this);for(var r=0;r0&&(i=this.batches[this.batches.length-1],a=i.style);for(var o=this.shapeIndex;o65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&_===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=_?new Uint32Array(this.indices):new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}},e.prototype._compareStyles=function(r,n){return!(!r||!n||r.texture.baseTexture!==n.texture.baseTexture||r.color+r.alpha!==n.color+n.alpha||!!r.native!=!!n.native)},e.prototype.validateBatching=function(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(var r=0,n=this.graphicsData.length;r65535*2)return!1;for(var r=this.batches,n=0;n0&&(o=lc.pop(),o||(o=new bp,o.texArray=new Sp),this.drawCalls.push(o)),o.start=h,o.size=0,o.texArray.count=0,o.type=f),g.touched=1,g._batchEnabled=r,g._batchLocation=s,g.wrapMode=xi.REPEAT,o.texArray.elements[o.texArray.count++]=g,s++)),o.size+=d.size,h+=d.size,l=g._batchLocation,this.addColors(i,v.color,v.alpha,d.attribSize,d.attribStart),this.addTextureIds(a,l,d.attribSize,d.attribStart)}Je._globalBatch=r,this.packAttributes()},e.prototype.packAttributes=function(){for(var r=this.points,n=this.uvs,i=this.colors,a=this.textureIds,o=new ArrayBuffer(r.length*3*4),s=new Float32Array(o),u=new Uint32Array(o),l=0,c=0;c>16)+(n&65280)+((n&255)<<16),u=im(s,i);r.length=Math.max(r.length,o+a);for(var l=0;l0&&r.alpha>0;return n?(r.matrix&&(r.matrix=r.matrix.clone(),r.matrix.invert()),Object.assign(this._lineStyle,{visible:n},r)):this._lineStyle.reset(),this},e.prototype.startPoly=function(){if(this.currentPath){var r=this.currentPath.points,n=this.currentPath.points.length;n>2&&(this.drawShape(this.currentPath),this.currentPath=new Pl,this.currentPath.closeStroke=!1,this.currentPath.points.push(r[n-2],r[n-1]))}else this.currentPath=new Pl,this.currentPath.closeStroke=!1},e.prototype.finishPoly=function(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)},e.prototype.moveTo=function(r,n){return this.startPoly(),this.currentPath.points[0]=r,this.currentPath.points[1]=n,this},e.prototype.lineTo=function(r,n){this.currentPath||this.moveTo(0,0);var i=this.currentPath.points,a=i[i.length-2],o=i[i.length-1];return(a!==r||o!==n)&&i.push(r,n),this},e.prototype._initCurve=function(r,n){r===void 0&&(r=0),n===void 0&&(n=0),this.currentPath?this.currentPath.points.length===0&&(this.currentPath.points=[r,n]):this.moveTo(r,n)},e.prototype.quadraticCurveTo=function(r,n,i,a){this._initCurve();var o=this.currentPath.points;return o.length===0&&this.moveTo(0,0),bD.curveTo(r,n,i,a,o),this},e.prototype.bezierCurveTo=function(r,n,i,a,o,s){return this._initCurve(),xD.curveTo(r,n,i,a,o,s,this.currentPath.points),this},e.prototype.arcTo=function(r,n,i,a,o){this._initCurve(r,n);var s=this.currentPath.points,u=J_.curveTo(r,n,i,a,o,s);if(u){var l=u.cx,c=u.cy,f=u.radius,h=u.startAngle,d=u.endAngle,p=u.anticlockwise;this.arc(l,c,f,h,d,p)}return this},e.prototype.arc=function(r,n,i,a,o,s){if(s===void 0&&(s=!1),a===o)return this;!s&&o<=a?o+=cf:s&&a<=o&&(a+=cf);var u=o-a;if(u===0)return this;var l=r+Math.cos(a)*i,c=n+Math.sin(a)*i,f=this._geometry.closePointEps,h=this.currentPath?this.currentPath.points:null;if(h){var d=Math.abs(h[h.length-2]-l),p=Math.abs(h[h.length-1]-c);d0;return n?(r.matrix&&(r.matrix=r.matrix.clone(),r.matrix.invert()),Object.assign(this._fillStyle,{visible:n},r)):this._fillStyle.reset(),this},e.prototype.endFill=function(){return this.finishPoly(),this._fillStyle.reset(),this},e.prototype.drawRect=function(r,n,i,a){return this.drawShape(new Ye(r,n,i,a))},e.prototype.drawRoundedRect=function(r,n,i,a,o){return this.drawShape(new _L(r,n,i,a,o))},e.prototype.drawCircle=function(r,n,i){return this.drawShape(new gL(r,n,i))},e.prototype.drawEllipse=function(r,n,i,a){return this.drawShape(new yL(r,n,i,a))},e.prototype.drawPolygon=function(){for(var r=arguments,n=[],i=0;i>16&255)/255*o,s.tint[1]=(a>>8&255)/255*o,s.tint[2]=(a&255)/255*o,s.tint[3]=o,r.shader.bind(n),r.geometry.bind(i,n),r.state.set(this.state);for(var l=0,c=u.length;l>16)+(l&65280)+((l&255)<<16)}}},e.prototype.calculateVertices=function(){var r=this.transform._worldID;if(this._transformID!==r){this._transformID=r;for(var n=this.transform.worldTransform,i=n.a,a=n.b,o=n.c,s=n.d,u=n.tx,l=n.ty,c=this._geometry.points,f=this.vertexData,h=0,d=0;d=a&&Yu.x=o&&Yu.y>16)+(r&65280)+((r&255)<<16)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"texture",{get:function(){return this._texture},set:function(r){this._texture!==r&&(this._texture&&this._texture.off("update",this._onTextureUpdate,this),this._texture=r||Fe.EMPTY,this._cachedTint=16777215,this._textureID=-1,this._textureTrimmedID=-1,r&&(r.baseTexture.valid?this._onTextureUpdate():r.once("update",this._onTextureUpdate,this)))},enumerable:!1,configurable:!0}),e}(gr);/*! - * @pixi/text - v6.5.10 - * Compiled Thu, 06 Jul 2023 15:25:11 UTC - * - * @pixi/text is licensed under the MIT License. - * http://www.opensource.org/licenses/mit-license - *//*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var nx=function(t,e){return nx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},nx(t,e)};function mme(t,e){nx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Wl;(function(t){t[t.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",t[t.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL"})(Wl||(Wl={}));var Ly={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:Wl.LINEAR_VERTICAL,fillGradientStops:[],fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100,leading:0},gme=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],bs=function(){function t(e){this.styleID=0,this.reset(),By(this,e,e)}return t.prototype.clone=function(){var e={};return By(e,this,Ly),new t(e)},t.prototype.reset=function(){By(this,Ly,Ly)},Object.defineProperty(t.prototype,"align",{get:function(){return this._align},set:function(e){this._align!==e&&(this._align=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"breakWords",{get:function(){return this._breakWords},set:function(e){this._breakWords!==e&&(this._breakWords=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadow",{get:function(){return this._dropShadow},set:function(e){this._dropShadow!==e&&(this._dropShadow=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowAlpha",{get:function(){return this._dropShadowAlpha},set:function(e){this._dropShadowAlpha!==e&&(this._dropShadowAlpha=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowAngle",{get:function(){return this._dropShadowAngle},set:function(e){this._dropShadowAngle!==e&&(this._dropShadowAngle=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowBlur",{get:function(){return this._dropShadowBlur},set:function(e){this._dropShadowBlur!==e&&(this._dropShadowBlur=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowColor",{get:function(){return this._dropShadowColor},set:function(e){var r=Dy(e);this._dropShadowColor!==r&&(this._dropShadowColor=r,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowDistance",{get:function(){return this._dropShadowDistance},set:function(e){this._dropShadowDistance!==e&&(this._dropShadowDistance=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fill",{get:function(){return this._fill},set:function(e){var r=Dy(e);this._fill!==r&&(this._fill=r,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fillGradientType",{get:function(){return this._fillGradientType},set:function(e){this._fillGradientType!==e&&(this._fillGradientType=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fillGradientStops",{get:function(){return this._fillGradientStops},set:function(e){yme(this._fillGradientStops,e)||(this._fillGradientStops=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontFamily",{get:function(){return this._fontFamily},set:function(e){this.fontFamily!==e&&(this._fontFamily=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontSize",{get:function(){return this._fontSize},set:function(e){this._fontSize!==e&&(this._fontSize=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontStyle",{get:function(){return this._fontStyle},set:function(e){this._fontStyle!==e&&(this._fontStyle=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontVariant",{get:function(){return this._fontVariant},set:function(e){this._fontVariant!==e&&(this._fontVariant=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontWeight",{get:function(){return this._fontWeight},set:function(e){this._fontWeight!==e&&(this._fontWeight=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"letterSpacing",{get:function(){return this._letterSpacing},set:function(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lineHeight",{get:function(){return this._lineHeight},set:function(e){this._lineHeight!==e&&(this._lineHeight=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"leading",{get:function(){return this._leading},set:function(e){this._leading!==e&&(this._leading=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lineJoin",{get:function(){return this._lineJoin},set:function(e){this._lineJoin!==e&&(this._lineJoin=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"miterLimit",{get:function(){return this._miterLimit},set:function(e){this._miterLimit!==e&&(this._miterLimit=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"padding",{get:function(){return this._padding},set:function(e){this._padding!==e&&(this._padding=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"stroke",{get:function(){return this._stroke},set:function(e){var r=Dy(e);this._stroke!==r&&(this._stroke=r,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"strokeThickness",{get:function(){return this._strokeThickness},set:function(e){this._strokeThickness!==e&&(this._strokeThickness=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textBaseline",{get:function(){return this._textBaseline},set:function(e){this._textBaseline!==e&&(this._textBaseline=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"trim",{get:function(){return this._trim},set:function(e){this._trim!==e&&(this._trim=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"whiteSpace",{get:function(){return this._whiteSpace},set:function(e){this._whiteSpace!==e&&(this._whiteSpace=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wordWrap",{get:function(){return this._wordWrap},set:function(e){this._wordWrap!==e&&(this._wordWrap=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wordWrapWidth",{get:function(){return this._wordWrapWidth},set:function(e){this._wordWrapWidth!==e&&(this._wordWrapWidth=e,this.styleID++)},enumerable:!1,configurable:!0}),t.prototype.toFontString=function(){var e=typeof this.fontSize=="number"?this.fontSize+"px":this.fontSize,r=this.fontFamily;Array.isArray(this.fontFamily)||(r=this.fontFamily.split(","));for(var n=r.length-1;n>=0;n--){var i=r[n].trim();!/([\"\'])[^\'\"]+\1/.test(i)&&gme.indexOf(i)<0&&(i='"'+i+'"'),r[n]=i}return this.fontStyle+" "+this.fontVariant+" "+this.fontWeight+" "+e+" "+r.join(",")},t}();function aO(t){return typeof t=="number"?zS(t):(typeof t=="string"&&t.indexOf("0x")===0&&(t=t.replace("0x","#")),t)}function Dy(t){if(Array.isArray(t)){for(var e=0;ep)if(o!==""&&(s+=t.addLine(o),o="",a=0),t.canBreakWords(m,r.breakWords))for(var b=t.wordWrapSplit(m),S=0;Sp&&(s+=t.addLine(o),d=!1,o="",a=0),o+=w,a+=O}else{o.length>0&&(s+=t.addLine(o),o="",a=0);var P=g===v.length-1;s+=t.addLine(m,!P),d=!1,o="",a=0}else x+a>p&&(d=!1,s+=t.addLine(o),o="",a=0),(o.length>0||!t.isBreakingSpace(m)||d)&&(o+=m,a+=x)}return s+=t.addLine(o,!1),s},t.addLine=function(e,r){return r===void 0&&(r=!0),e=t.trimRight(e),e=r?e+` -`:e,e},t.getFromCache=function(e,r,n,i){var a=n[e];if(typeof a!="number"){var o=e.length*r;a=i.measureText(e).width+o,n[e]=a}return a},t.collapseSpaces=function(e){return e==="normal"||e==="pre-line"},t.collapseNewlines=function(e){return e==="normal"},t.trimRight=function(e){if(typeof e!="string")return"";for(var r=e.length-1;r>=0;r--){var n=e[r];if(!t.isBreakingSpace(n))break;e=e.slice(0,-1)}return e},t.isNewline=function(e){return typeof e!="string"?!1:t._newlines.indexOf(e.charCodeAt(0))>=0},t.isBreakingSpace=function(e,r){return typeof e!="string"?!1:t._breakingSpaces.indexOf(e.charCodeAt(0))>=0},t.tokenize=function(e){var r=[],n="";if(typeof e!="string")return r;for(var i=0;is;--h){for(var v=0;v0&&g>m&&(y=(m+g)/2);var _=m+v,x=i.lineHeight*(p+1),b=_;p+10},t}();function bme(t,e){var r=!1;if(t&&t._textures&&t._textures.length){for(var n=0;n=0;r--)this.add(e.children[r]);return this},t.prototype.destroy=function(){this.ticking&&Or.system.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null},t}();function CD(t,e){return e instanceof Je?(e._glTextures[t.CONTEXT_UID]||t.texture.bind(e),!0):!1}function Pme(t,e){if(!(e instanceof zl))return!1;var r=e.geometry;e.finishPoly(),r.updateBatches();for(var n=r.batches,i=0;i=a&&Hu.x=o&&Hu.y1?Ma.from(Fme,Nme,n):Ma.from(oO,Mme,n)},e.prototype.render=function(r){var n=this.renderer,i=this.quad,a=i.vertices;a[0]=a[6]=r._width*-r.anchor.x,a[1]=a[3]=r._height*-r.anchor.y,a[2]=a[4]=r._width*(1-r.anchor.x),a[5]=a[7]=r._height*(1-r.anchor.y);var o=r.uvRespectAnchor?r.anchor.x:0,s=r.uvRespectAnchor?r.anchor.y:0;a=i.uvs,a[0]=a[6]=-o,a[1]=a[3]=-s,a[2]=a[4]=1-o,a[5]=a[7]=1-s,i.invalidate();var u=r._texture,l=u.baseTexture,c=l.alphaMode>0,f=r.tileTransform.localTransform,h=r.uvMatrix,d=l.isPowerOfTwo&&u.frame.width===l.width&&u.frame.height===l.height;d&&(l._glTextures[n.CONTEXT_UID]?d=l.wrapMode!==xi.CLAMP:l.wrapMode===xi.CLAMP&&(l.wrapMode=xi.REPEAT));var p=d?this.simpleShader:this.shader,v=u.width,g=u.height,m=r._width,y=r._height;zh.set(f.a*v/m,f.b*v/y,f.c*g/m,f.d*g/y,f.tx/m,f.ty/y),zh.invert(),d?zh.prepend(h.mapCoord):(p.uniforms.uMapCoord=h.mapCoord.toArray(!0),p.uniforms.uClampFrame=h.uClampFrame,p.uniforms.uClampOffset=h.uClampOffset),p.uniforms.uTransform=zh.toArray(!0),p.uniforms.uColor=qS(r.tint,r.worldAlpha,p.uniforms.uColor,c),p.uniforms.translationMatrix=r.transform.worldTransform.toArray(!0),p.uniforms.uSampler=u,n.shader.bind(p),n.geometry.bind(i),this.state.blendMode=HS(r.blendMode,c),n.state.set(this.state),n.geometry.draw(this.renderer.gl.TRIANGLES,6,0)},e.extension={name:"tilingSprite",type:dt.RendererPlugin},e}(qf);/*! - * @pixi/mesh - v6.5.10 - * Compiled Thu, 06 Jul 2023 15:25:11 UTC - * - * @pixi/mesh is licensed under the MIT License. - * http://www.opensource.org/licenses/mit-license - *//*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var ox=function(t,e){return ox=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},ox(t,e)};function Rw(t,e){ox(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var MD=function(){function t(e,r){this.uvBuffer=e,this.uvMatrix=r,this.data=null,this._bufferUpdateId=-1,this._textureUpdateId=-1,this._updateID=0}return t.prototype.update=function(e){if(!(!e&&this._bufferUpdateId===this.uvBuffer._updateID&&this._textureUpdateId===this.uvMatrix._updateID)){this._bufferUpdateId=this.uvBuffer._updateID,this._textureUpdateId=this.uvMatrix._updateID;var r=this.uvBuffer.data;(!this.data||this.data.length!==r.length)&&(this.data=new Float32Array(r.length)),this.uvMatrix.multiplyUvs(r,this.data),this._updateID++}},t}(),jy=new We,sO=new Pl,Yl=function(t){Rw(e,t);function e(r,n,i,a){a===void 0&&(a=Ln.TRIANGLES);var o=t.call(this)||this;return o.geometry=r,o.shader=n,o.state=i||Mo.for2d(),o.drawMode=a,o.start=0,o.size=0,o.uvs=null,o.indices=null,o.vertexData=new Float32Array(1),o.vertexDirty=-1,o._transformID=-1,o._roundPixels=xe.ROUND_PIXELS,o.batchUvs=null,o}return Object.defineProperty(e.prototype,"geometry",{get:function(){return this._geometry},set:function(r){this._geometry!==r&&(this._geometry&&(this._geometry.refCount--,this._geometry.refCount===0&&this._geometry.dispose()),this._geometry=r,this._geometry&&this._geometry.refCount++,this.vertexDirty=-1)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"uvBuffer",{get:function(){return this.geometry.buffers[1]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"verticesBuffer",{get:function(){return this.geometry.buffers[0]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"material",{get:function(){return this.shader},set:function(r){this.shader=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blendMode",{get:function(){return this.state.blendMode},set:function(r){this.state.blendMode=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"roundPixels",{get:function(){return this._roundPixels},set:function(r){this._roundPixels!==r&&(this._transformID=-1),this._roundPixels=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tint",{get:function(){return"tint"in this.shader?this.shader.tint:null},set:function(r){this.shader.tint=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"texture",{get:function(){return"texture"in this.shader?this.shader.texture:null},set:function(r){this.shader.texture=r},enumerable:!1,configurable:!0}),e.prototype._render=function(r){var n=this.geometry.buffers[0].data,i=this.shader;i.batchable&&this.drawMode===Ln.TRIANGLES&&n.length>16)+(r&65280)+((r&255)<<16),this._colorDirty=!0)},enumerable:!1,configurable:!0}),e.prototype.update=function(){if(this._colorDirty){this._colorDirty=!1;var r=this.texture.baseTexture;qS(this._tint,this._alpha,this.uniforms.uColor,r.alphaMode)}this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)},e}(Ma),Kf=function(t){Rw(e,t);function e(r,n,i){var a=t.call(this)||this,o=new ir(r),s=new ir(n,!0),u=new ir(i,!0,!0);return a.addAttribute("aVertexPosition",o,2,!1,Re.FLOAT).addAttribute("aTextureCoord",s,2,!1,Re.FLOAT).addIndex(u),a._updateId=-1,a}return Object.defineProperty(e.prototype,"vertexDirtyId",{get:function(){return this.buffers[0]._updateID},enumerable:!1,configurable:!0}),e}(_u);/*! - * @pixi/text-bitmap - v6.5.10 - * Compiled Thu, 06 Jul 2023 15:25:11 UTC - * - * @pixi/text-bitmap is licensed under the MIT License. - * http://www.opensource.org/licenses/mit-license - *//*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var sx=function(t,e){return sx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},sx(t,e)};function Bme(t,e){sx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var vf=function(){function t(){this.info=[],this.common=[],this.page=[],this.char=[],this.kerning=[],this.distanceField=[]}return t}(),FD=function(){function t(){}return t.test=function(e){return typeof e=="string"&&e.indexOf("info face=")===0},t.parse=function(e){var r=e.match(/^[a-z]+\s+.+$/gm),n={info:[],common:[],page:[],char:[],chars:[],kerning:[],kernings:[],distanceField:[]};for(var i in r){var a=r[i].match(/^[a-z]+/gm)[0],o=r[i].match(/[a-zA-Z]+=([^\s"']+|"([^"]*)")/gm),s={};for(var u in o){var l=o[u].split("="),c=l[0],f=l[1].replace(/"/gm,""),h=parseFloat(f),d=isNaN(h)?f:h;s[c]=d}n[a].push(s)}var p=new vf;return n.info.forEach(function(v){return p.info.push({face:v.face,size:parseInt(v.size,10)})}),n.common.forEach(function(v){return p.common.push({lineHeight:parseInt(v.lineHeight,10)})}),n.page.forEach(function(v){return p.page.push({id:parseInt(v.id,10),file:v.file})}),n.char.forEach(function(v){return p.char.push({id:parseInt(v.id,10),page:parseInt(v.page,10),x:parseInt(v.x,10),y:parseInt(v.y,10),width:parseInt(v.width,10),height:parseInt(v.height,10),xoffset:parseInt(v.xoffset,10),yoffset:parseInt(v.yoffset,10),xadvance:parseInt(v.xadvance,10)})}),n.kerning.forEach(function(v){return p.kerning.push({first:parseInt(v.first,10),second:parseInt(v.second,10),amount:parseInt(v.amount,10)})}),n.distanceField.forEach(function(v){return p.distanceField.push({distanceRange:parseInt(v.distanceRange,10),fieldType:v.fieldType})}),p},t}(),Tp=function(){function t(){}return t.test=function(e){return e instanceof XMLDocument&&e.getElementsByTagName("page").length&&e.getElementsByTagName("info")[0].getAttribute("face")!==null},t.parse=function(e){for(var r=new vf,n=e.getElementsByTagName("info"),i=e.getElementsByTagName("common"),a=e.getElementsByTagName("page"),o=e.getElementsByTagName("char"),s=e.getElementsByTagName("kerning"),u=e.getElementsByTagName("distanceField"),l=0;l")>-1){var r=new globalThis.DOMParser().parseFromString(e,"text/xml");return Tp.test(r)}return!1},t.parse=function(e){var r=new globalThis.DOMParser().parseFromString(e,"text/xml");return Tp.parse(r)},t}(),Uy=[FD,Tp,ND];function Iw(t){for(var e=0;e=l-T*s){if(v===0)throw new Error("[BitmapFont] textureHeight "+l+"px is too small "+("(fontFamily: '"+f.fontFamily+"', fontSize: "+f.fontSize+"px, char: '"+S+"')"));--b,g=null,m=null,y=null,v=0,p=0,_=0;continue}if(_=Math.max(T+w.fontProperties.descent,_),A*s+p>=h){if(p===0)throw new Error("[BitmapFont] textureWidth "+u+"px is too small "+("(fontFamily: '"+f.fontFamily+"', fontSize: "+f.fontSize+"px, char: '"+S+"')"));--b,v+=_*s,v=Math.ceil(v),p=0,_=0;continue}Ume(g,m,w,p,v,s,f);var O=Ad(w.text);d.char.push({id:O,page:x.length-1,x:p/s,y:v/s,width:A,height:T,xoffset:0,yoffset:0,xadvance:Math.ceil(E-(f.dropShadow?f.dropShadowDistance:0)-(f.stroke?f.strokeThickness:0))}),p+=(A+2*o)*s,p=Math.ceil(p)}if(!(n!=null&&n.skipKerning))for(var b=0,P=c.length;b 0.99) {\r - alpha = 1.0;\r - }\r -\r - // NPM Textures, NPM outputs\r - gl_FragColor = vec4(uColor.rgb, uColor.a * alpha);\r -\r -}\r -`,Gme=`// Mesh material default fragment\r -attribute vec2 aVertexPosition;\r -attribute vec2 aTextureCoord;\r -\r -uniform mat3 projectionMatrix;\r -uniform mat3 translationMatrix;\r -uniform mat3 uTextureMatrix;\r -\r -varying vec2 vTextureCoord;\r -\r -void main(void)\r -{\r - gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\r -\r - vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;\r -}\r -`,lO=[],uO=[],cO=[],Xme=function(t){Bme(e,t);function e(r,n){n===void 0&&(n={});var i=t.call(this)||this;i._tint=16777215;var a=Object.assign({},e.styleDefaults,n),o=a.align,s=a.tint,u=a.maxWidth,l=a.letterSpacing,c=a.fontName,f=a.fontSize;if(!wa.available[c])throw new Error('Missing BitmapFont "'+c+'"');return i._activePagesMeshData=[],i._textWidth=0,i._textHeight=0,i._align=o,i._tint=s,i._font=void 0,i._fontName=c,i._fontSize=f,i.text=r,i._maxWidth=u,i._maxLineHeight=0,i._letterSpacing=l,i._anchor=new ro(function(){i.dirty=!0},i,0,0),i._roundPixels=xe.ROUND_PIXELS,i.dirty=!0,i._resolution=xe.RESOLUTION,i._autoResolution=!0,i._textureCache={},i}return e.prototype.updateText=function(){for(var r,n=wa.available[this._fontName],i=this.fontSize,a=i/n.size,o=new We,s=[],u=[],l=[],c=this._text.replace(/(?:\r\n|\r)/g,` -`)||" ",f=LD(c),h=this._maxWidth*n.size/i,d=n.distanceFieldType==="none"?lO:uO,p=null,v=0,g=0,m=0,y=-1,_=0,x=0,b=0,S=0,w=0;w0&&o.x>h&&(++x,cs(s,1+y-x,1+w-y),w=y,y=-1,u.push(_),l.push(s.length>0?s[s.length-1].prevSpaces:0),g=Math.max(g,_),m++,o.x=0,o.y+=n.lineHeight,p=null,S=0)}}var P=f[f.length-1];P!=="\r"&&P!==` -`&&(/(?:\s)/.test(P)&&(v=_),u.push(v),g=Math.max(g,v),l.push(-1));for(var k=[],w=0;w<=m;w++){var M=0;this._align==="right"?M=g-u[w]:this._align==="center"?M=(g-u[w])/2:this._align==="justify"&&(M=l[w]<0?0:(g-u[w])/l[w]),k.push(M)}var B=s.length,j={},z=[],J=this._activePagesMeshData;d.push.apply(d,J);for(var w=0;w6*ie)||F.vertices.length=r&&(o=t-s-1),u=u.replace("%value%",e[o].toString()),i+=u,i+=` -`}return n=n.replace("%blur%",i),n=n.replace("%size%",t.toString()),n}var mf=function(t){jD(e,t);function e(r,n,i,a,o){n===void 0&&(n=8),i===void 0&&(i=4),a===void 0&&(a=xe.FILTER_RESOLUTION),o===void 0&&(o=5);var s=this,u=Hme(o,r),l=Zme(o);return s=t.call(this,u,l)||this,s.horizontal=r,s.resolution=a,s._quality=0,s.quality=i,s.blur=n,s}return e.prototype.apply=function(r,n,i,a){if(i?this.horizontal?this.uniforms.strength=1/i.width*(i.width/n.width):this.uniforms.strength=1/i.height*(i.height/n.height):this.horizontal?this.uniforms.strength=1/r.renderer.width*(r.renderer.width/n.width):this.uniforms.strength=1/r.renderer.height*(r.renderer.height/n.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,this.passes===1)r.applyFilter(this,n,i,a);else{var o=r.getFilterTexture(),s=r.renderer,u=n,l=o;this.state.blend=!1,r.applyFilter(this,u,l,qn.CLEAR);for(var c=1;c 0.0) { - c.rgb /= c.a; - } - - vec4 result; - - result.r = (m[0] * c.r); - result.r += (m[1] * c.g); - result.r += (m[2] * c.b); - result.r += (m[3] * c.a); - result.r += m[4]; - - result.g = (m[5] * c.r); - result.g += (m[6] * c.g); - result.g += (m[7] * c.b); - result.g += (m[8] * c.a); - result.g += m[9]; - - result.b = (m[10] * c.r); - result.b += (m[11] * c.g); - result.b += (m[12] * c.b); - result.b += (m[13] * c.a); - result.b += m[14]; - - result.a = (m[15] * c.r); - result.a += (m[16] * c.g); - result.a += (m[17] * c.b); - result.a += (m[18] * c.a); - result.a += m[19]; - - vec3 rgb = mix(c.rgb, result.rgb, uAlpha); - - // Premultiply alpha again. - rgb *= result.a; - - gl_FragColor = vec4(rgb, result.a); -} -`,fx=function(t){Jme(e,t);function e(){var r=this,n={m:new Float32Array([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]),uAlpha:1};return r=t.call(this,Sw,ege,n)||this,r.alpha=1,r}return e.prototype._loadMatrix=function(r,n){n===void 0&&(n=!1);var i=r;n&&(this._multiply(i,this.uniforms.m,r),i=this._colorMatrix(i)),this.uniforms.m=i},e.prototype._multiply=function(r,n,i){return r[0]=n[0]*i[0]+n[1]*i[5]+n[2]*i[10]+n[3]*i[15],r[1]=n[0]*i[1]+n[1]*i[6]+n[2]*i[11]+n[3]*i[16],r[2]=n[0]*i[2]+n[1]*i[7]+n[2]*i[12]+n[3]*i[17],r[3]=n[0]*i[3]+n[1]*i[8]+n[2]*i[13]+n[3]*i[18],r[4]=n[0]*i[4]+n[1]*i[9]+n[2]*i[14]+n[3]*i[19]+n[4],r[5]=n[5]*i[0]+n[6]*i[5]+n[7]*i[10]+n[8]*i[15],r[6]=n[5]*i[1]+n[6]*i[6]+n[7]*i[11]+n[8]*i[16],r[7]=n[5]*i[2]+n[6]*i[7]+n[7]*i[12]+n[8]*i[17],r[8]=n[5]*i[3]+n[6]*i[8]+n[7]*i[13]+n[8]*i[18],r[9]=n[5]*i[4]+n[6]*i[9]+n[7]*i[14]+n[8]*i[19]+n[9],r[10]=n[10]*i[0]+n[11]*i[5]+n[12]*i[10]+n[13]*i[15],r[11]=n[10]*i[1]+n[11]*i[6]+n[12]*i[11]+n[13]*i[16],r[12]=n[10]*i[2]+n[11]*i[7]+n[12]*i[12]+n[13]*i[17],r[13]=n[10]*i[3]+n[11]*i[8]+n[12]*i[13]+n[13]*i[18],r[14]=n[10]*i[4]+n[11]*i[9]+n[12]*i[14]+n[13]*i[19]+n[14],r[15]=n[15]*i[0]+n[16]*i[5]+n[17]*i[10]+n[18]*i[15],r[16]=n[15]*i[1]+n[16]*i[6]+n[17]*i[11]+n[18]*i[16],r[17]=n[15]*i[2]+n[16]*i[7]+n[17]*i[12]+n[18]*i[17],r[18]=n[15]*i[3]+n[16]*i[8]+n[17]*i[13]+n[18]*i[18],r[19]=n[15]*i[4]+n[16]*i[9]+n[17]*i[14]+n[18]*i[19]+n[19],r},e.prototype._colorMatrix=function(r){var n=new Float32Array(r);return n[4]/=255,n[9]/=255,n[14]/=255,n[19]/=255,n},e.prototype.brightness=function(r,n){var i=[r,0,0,0,0,0,r,0,0,0,0,0,r,0,0,0,0,0,1,0];this._loadMatrix(i,n)},e.prototype.tint=function(r,n){var i=r>>16&255,a=r>>8&255,o=r&255,s=[i/255,0,0,0,0,0,a/255,0,0,0,0,0,o/255,0,0,0,0,0,1,0];this._loadMatrix(s,n)},e.prototype.greyscale=function(r,n){var i=[r,r,r,0,0,r,r,r,0,0,r,r,r,0,0,0,0,0,1,0];this._loadMatrix(i,n)},e.prototype.blackAndWhite=function(r){var n=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0];this._loadMatrix(n,r)},e.prototype.hue=function(r,n){r=(r||0)/180*Math.PI;var i=Math.cos(r),a=Math.sin(r),o=Math.sqrt,s=1/3,u=o(s),l=i+(1-i)*s,c=s*(1-i)-u*a,f=s*(1-i)+u*a,h=s*(1-i)+u*a,d=i+s*(1-i),p=s*(1-i)-u*a,v=s*(1-i)-u*a,g=s*(1-i)+u*a,m=i+s*(1-i),y=[l,c,f,0,0,h,d,p,0,0,v,g,m,0,0,0,0,0,1,0];this._loadMatrix(y,n)},e.prototype.contrast=function(r,n){var i=(r||0)+1,a=-.5*(i-1),o=[i,0,0,0,a,0,i,0,0,a,0,0,i,0,a,0,0,0,1,0];this._loadMatrix(o,n)},e.prototype.saturate=function(r,n){r===void 0&&(r=0);var i=r*2/3+1,a=(i-1)*-.5,o=[i,a,a,0,0,a,i,a,0,0,a,a,i,0,0,0,0,0,1,0];this._loadMatrix(o,n)},e.prototype.desaturate=function(){this.saturate(-1)},e.prototype.negative=function(r){var n=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0];this._loadMatrix(n,r)},e.prototype.sepia=function(r){var n=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0];this._loadMatrix(n,r)},e.prototype.technicolor=function(r){var n=[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0];this._loadMatrix(n,r)},e.prototype.polaroid=function(r){var n=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0];this._loadMatrix(n,r)},e.prototype.toBGR=function(r){var n=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0];this._loadMatrix(n,r)},e.prototype.kodachrome=function(r){var n=[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0];this._loadMatrix(n,r)},e.prototype.browni=function(r){var n=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0];this._loadMatrix(n,r)},e.prototype.vintage=function(r){var n=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0];this._loadMatrix(n,r)},e.prototype.colorTone=function(r,n,i,a,o){r=r||.2,n=n||.15,i=i||16770432,a=a||3375104;var s=(i>>16&255)/255,u=(i>>8&255)/255,l=(i&255)/255,c=(a>>16&255)/255,f=(a>>8&255)/255,h=(a&255)/255,d=[.3,.59,.11,0,0,s,u,l,r,0,c,f,h,n,0,s-c,u-f,l-h,0,0];this._loadMatrix(d,o)},e.prototype.night=function(r,n){r=r||.1;var i=[r*-2,-r,0,0,0,-r,0,r,0,0,0,r,r*2,0,0,0,0,0,1,0];this._loadMatrix(i,n)},e.prototype.predator=function(r,n){var i=[11.224130630493164*r,-4.794486999511719*r,-2.8746118545532227*r,0*r,.40342438220977783*r,-3.6330697536468506*r,9.193157196044922*r,-2.951810836791992*r,0*r,-1.316135048866272*r,-3.2184197902679443*r,-4.2375030517578125*r,7.476448059082031*r,0*r,.8044459223747253*r,0,0,0,1,0];this._loadMatrix(i,n)},e.prototype.lsd=function(r){var n=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0];this._loadMatrix(n,r)},e.prototype.reset=function(){var r=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];this._loadMatrix(r,!1)},Object.defineProperty(e.prototype,"matrix",{get:function(){return this.uniforms.m},set:function(r){this.uniforms.m=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"alpha",{get:function(){return this.uniforms.uAlpha},set:function(r){this.uniforms.uAlpha=r},enumerable:!1,configurable:!0}),e}(De);fx.prototype.grayscale=fx.prototype.greyscale;/*! - * @pixi/filter-displacement - v6.5.10 - * Compiled Thu, 06 Jul 2023 15:25:11 UTC - * - * @pixi/filter-displacement is licensed under the MIT License. - * http://www.opensource.org/licenses/mit-license - *//*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var hx=function(t,e){return hx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},hx(t,e)};function tge(t,e){hx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var rge=`varying vec2 vFilterCoord; -varying vec2 vTextureCoord; - -uniform vec2 scale; -uniform mat2 rotation; -uniform sampler2D uSampler; -uniform sampler2D mapSampler; - -uniform highp vec4 inputSize; -uniform vec4 inputClamp; - -void main(void) -{ - vec4 map = texture2D(mapSampler, vFilterCoord); - - map -= 0.5; - map.xy = scale * inputSize.zw * (rotation * map.xy); - - gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), inputClamp.xy, inputClamp.zw)); -} -`,nge=`attribute vec2 aVertexPosition; - -uniform mat3 projectionMatrix; -uniform mat3 filterMatrix; - -varying vec2 vTextureCoord; -varying vec2 vFilterCoord; - -uniform vec4 inputSize; -uniform vec4 outputFrame; - -vec4 filterVertexPosition( void ) -{ - vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy; - - return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0); -} - -vec2 filterTextureCoord( void ) -{ - return aVertexPosition * (outputFrame.zw * inputSize.zw); -} - -void main(void) -{ - gl_Position = filterVertexPosition(); - vTextureCoord = filterTextureCoord(); - vFilterCoord = ( filterMatrix * vec3( vTextureCoord, 1.0) ).xy; -} -`,ige=function(t){tge(e,t);function e(r,n){var i=this,a=new Ut;return r.renderable=!1,i=t.call(this,nge,rge,{mapSampler:r._texture,filterMatrix:a,scale:{x:1,y:1},rotation:new Float32Array([1,0,0,1])})||this,i.maskSprite=r,i.maskMatrix=a,n==null&&(n=20),i.scale=new We(n,n),i}return e.prototype.apply=function(r,n,i,a){this.uniforms.filterMatrix=r.calculateSpriteMatrix(this.maskMatrix,this.maskSprite),this.uniforms.scale.x=this.scale.x,this.uniforms.scale.y=this.scale.y;var o=this.maskSprite.worldTransform,s=Math.sqrt(o.a*o.a+o.b*o.b),u=Math.sqrt(o.c*o.c+o.d*o.d);s!==0&&u!==0&&(this.uniforms.rotation[0]=o.a/s,this.uniforms.rotation[1]=o.b/s,this.uniforms.rotation[2]=o.c/u,this.uniforms.rotation[3]=o.d/u),r.applyFilter(this,n,i,a)},Object.defineProperty(e.prototype,"map",{get:function(){return this.uniforms.mapSampler},set:function(r){this.uniforms.mapSampler=r},enumerable:!1,configurable:!0}),e}(De);/*! - * @pixi/filter-fxaa - v6.5.10 - * Compiled Thu, 06 Jul 2023 15:25:11 UTC - * - * @pixi/filter-fxaa is licensed under the MIT License. - * http://www.opensource.org/licenses/mit-license - *//*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var dx=function(t,e){return dx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},dx(t,e)};function age(t,e){dx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var oge=` -attribute vec2 aVertexPosition; - -uniform mat3 projectionMatrix; - -varying vec2 v_rgbNW; -varying vec2 v_rgbNE; -varying vec2 v_rgbSW; -varying vec2 v_rgbSE; -varying vec2 v_rgbM; - -varying vec2 vFragCoord; - -uniform vec4 inputSize; -uniform vec4 outputFrame; - -vec4 filterVertexPosition( void ) -{ - vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy; - - return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0); -} - -void texcoords(vec2 fragCoord, vec2 inverseVP, - out vec2 v_rgbNW, out vec2 v_rgbNE, - out vec2 v_rgbSW, out vec2 v_rgbSE, - out vec2 v_rgbM) { - v_rgbNW = (fragCoord + vec2(-1.0, -1.0)) * inverseVP; - v_rgbNE = (fragCoord + vec2(1.0, -1.0)) * inverseVP; - v_rgbSW = (fragCoord + vec2(-1.0, 1.0)) * inverseVP; - v_rgbSE = (fragCoord + vec2(1.0, 1.0)) * inverseVP; - v_rgbM = vec2(fragCoord * inverseVP); -} - -void main(void) { - - gl_Position = filterVertexPosition(); - - vFragCoord = aVertexPosition * outputFrame.zw; - - texcoords(vFragCoord, inputSize.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM); -} -`,sge=`varying vec2 v_rgbNW; -varying vec2 v_rgbNE; -varying vec2 v_rgbSW; -varying vec2 v_rgbSE; -varying vec2 v_rgbM; - -varying vec2 vFragCoord; -uniform sampler2D uSampler; -uniform highp vec4 inputSize; - - -/** - Basic FXAA implementation based on the code on geeks3d.com with the - modification that the texture2DLod stuff was removed since it's - unsupported by WebGL. - - -- - - From: - https://github.com/mitsuhiko/webgl-meincraft - - Copyright (c) 2011 by Armin Ronacher. - - Some rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * The names of the contributors may not be used to endorse or - promote products derived from this software without specific - prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef FXAA_REDUCE_MIN -#define FXAA_REDUCE_MIN (1.0/ 128.0) -#endif -#ifndef FXAA_REDUCE_MUL -#define FXAA_REDUCE_MUL (1.0 / 8.0) -#endif -#ifndef FXAA_SPAN_MAX -#define FXAA_SPAN_MAX 8.0 -#endif - -//optimized version for mobile, where dependent -//texture reads can be a bottleneck -vec4 fxaa(sampler2D tex, vec2 fragCoord, vec2 inverseVP, - vec2 v_rgbNW, vec2 v_rgbNE, - vec2 v_rgbSW, vec2 v_rgbSE, - vec2 v_rgbM) { - vec4 color; - vec3 rgbNW = texture2D(tex, v_rgbNW).xyz; - vec3 rgbNE = texture2D(tex, v_rgbNE).xyz; - vec3 rgbSW = texture2D(tex, v_rgbSW).xyz; - vec3 rgbSE = texture2D(tex, v_rgbSE).xyz; - vec4 texColor = texture2D(tex, v_rgbM); - vec3 rgbM = texColor.xyz; - vec3 luma = vec3(0.299, 0.587, 0.114); - float lumaNW = dot(rgbNW, luma); - float lumaNE = dot(rgbNE, luma); - float lumaSW = dot(rgbSW, luma); - float lumaSE = dot(rgbSE, luma); - float lumaM = dot(rgbM, luma); - float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE))); - float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE))); - - mediump vec2 dir; - dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE)); - dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE)); - - float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) * - (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN); - - float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce); - dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX), - max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX), - dir * rcpDirMin)) * inverseVP; - - vec3 rgbA = 0.5 * ( - texture2D(tex, fragCoord * inverseVP + dir * (1.0 / 3.0 - 0.5)).xyz + - texture2D(tex, fragCoord * inverseVP + dir * (2.0 / 3.0 - 0.5)).xyz); - vec3 rgbB = rgbA * 0.5 + 0.25 * ( - texture2D(tex, fragCoord * inverseVP + dir * -0.5).xyz + - texture2D(tex, fragCoord * inverseVP + dir * 0.5).xyz); - - float lumaB = dot(rgbB, luma); - if ((lumaB < lumaMin) || (lumaB > lumaMax)) - color = vec4(rgbA, texColor.a); - else - color = vec4(rgbB, texColor.a); - return color; -} - -void main() { - - vec4 color; - - color = fxaa(uSampler, vFragCoord, inputSize.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM); - - gl_FragColor = color; -} -`,lge=function(t){age(e,t);function e(){return t.call(this,oge,sge)||this}return e}(De);/*! - * @pixi/filter-noise - v6.5.10 - * Compiled Thu, 06 Jul 2023 15:25:11 UTC - * - * @pixi/filter-noise is licensed under the MIT License. - * http://www.opensource.org/licenses/mit-license - *//*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var px=function(t,e){return px=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},px(t,e)};function uge(t,e){px(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var cge=`precision highp float; - -varying vec2 vTextureCoord; -varying vec4 vColor; - -uniform float uNoise; -uniform float uSeed; -uniform sampler2D uSampler; - -float rand(vec2 co) -{ - return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453); -} - -void main() -{ - vec4 color = texture2D(uSampler, vTextureCoord); - float randomValue = rand(gl_FragCoord.xy * uSeed); - float diff = (randomValue - 0.5) * uNoise; - - // Un-premultiply alpha before applying the color matrix. See issue #3539. - if (color.a > 0.0) { - color.rgb /= color.a; - } - - color.r += diff; - color.g += diff; - color.b += diff; - - // Premultiply alpha again. - color.rgb *= color.a; - - gl_FragColor = color; -} -`,fge=function(t){uge(e,t);function e(r,n){r===void 0&&(r=.5),n===void 0&&(n=Math.random());var i=t.call(this,Sw,cge,{uNoise:0,uSeed:0})||this;return i.noise=r,i.seed=n,i}return Object.defineProperty(e.prototype,"noise",{get:function(){return this.uniforms.uNoise},set:function(r){this.uniforms.uNoise=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"seed",{get:function(){return this.uniforms.uSeed},set:function(r){this.uniforms.uSeed=r},enumerable:!1,configurable:!0}),e}(De);/*! - * @pixi/mixin-cache-as-bitmap - v6.5.10 - * Compiled Thu, 06 Jul 2023 15:25:11 UTC - * - * @pixi/mixin-cache-as-bitmap is licensed under the MIT License. - * http://www.opensource.org/licenses/mit-license - */var UD=new Ut;Yt.prototype._cacheAsBitmap=!1;Yt.prototype._cacheData=null;Yt.prototype._cacheAsBitmapResolution=null;Yt.prototype._cacheAsBitmapMultisample=Ot.NONE;var hge=function(){function t(){this.textureCacheId=null,this.originalRender=null,this.originalRenderCanvas=null,this.originalCalculateBounds=null,this.originalGetLocalBounds=null,this.originalUpdateTransform=null,this.originalDestroy=null,this.originalMask=null,this.originalFilterArea=null,this.originalContainsPoint=null,this.sprite=null}return t}();Object.defineProperties(Yt.prototype,{cacheAsBitmapResolution:{get:function(){return this._cacheAsBitmapResolution},set:function(t){t!==this._cacheAsBitmapResolution&&(this._cacheAsBitmapResolution=t,this.cacheAsBitmap&&(this.cacheAsBitmap=!1,this.cacheAsBitmap=!0))}},cacheAsBitmapMultisample:{get:function(){return this._cacheAsBitmapMultisample},set:function(t){t!==this._cacheAsBitmapMultisample&&(this._cacheAsBitmapMultisample=t,this.cacheAsBitmap&&(this.cacheAsBitmap=!1,this.cacheAsBitmap=!0))}},cacheAsBitmap:{get:function(){return this._cacheAsBitmap},set:function(t){if(this._cacheAsBitmap!==t){this._cacheAsBitmap=t;var e;t?(this._cacheData||(this._cacheData=new hge),e=this._cacheData,e.originalRender=this.render,e.originalRenderCanvas=this.renderCanvas,e.originalUpdateTransform=this.updateTransform,e.originalCalculateBounds=this.calculateBounds,e.originalGetLocalBounds=this.getLocalBounds,e.originalDestroy=this.destroy,e.originalContainsPoint=this.containsPoint,e.originalMask=this._mask,e.originalFilterArea=this.filterArea,this.render=this._renderCached,this.renderCanvas=this._renderCachedCanvas,this.destroy=this._cacheAsBitmapDestroy):(e=this._cacheData,e.sprite&&this._destroyCachedDisplayObject(),this.render=e.originalRender,this.renderCanvas=e.originalRenderCanvas,this.calculateBounds=e.originalCalculateBounds,this.getLocalBounds=e.originalGetLocalBounds,this.destroy=e.originalDestroy,this.updateTransform=e.originalUpdateTransform,this.containsPoint=e.originalContainsPoint,this._mask=e.originalMask,this.filterArea=e.originalFilterArea)}}}});Yt.prototype._renderCached=function(e){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObject(e),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._render(e))};Yt.prototype._initCachedDisplayObject=function(e){var r;if(!(this._cacheData&&this._cacheData.sprite)){var n=this.alpha;this.alpha=1,e.batch.flush();var i=this.getLocalBounds(null,!0).clone();if(this.filters&&this.filters.length){var a=this.filters[0].padding;i.pad(a)}i.ceil(xe.RESOLUTION);var o=e.renderTexture.current,s=e.renderTexture.sourceFrame.clone(),u=e.renderTexture.destinationFrame.clone(),l=e.projection.transform,c=Co.create({width:i.width,height:i.height,resolution:this.cacheAsBitmapResolution||e.resolution,multisample:(r=this.cacheAsBitmapMultisample)!==null&&r!==void 0?r:e.multisample}),f="cacheAsBitmap_"+To();this._cacheData.textureCacheId=f,Je.addToCache(c.baseTexture,f),Fe.addToCache(c,f);var h=this.transform.localTransform.copyTo(UD).invert().translate(-i.x,-i.y);this.render=this._cacheData.originalRender,e.render(this,{renderTexture:c,clear:!0,transform:h,skipUpdateTransform:!1}),e.framebuffer.blit(),e.projection.transform=l,e.renderTexture.bind(o,s,u),this.render=this._renderCached,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null,this.alpha=n;var d=new _i(c);d.transform.worldTransform=this.transform.worldTransform,d.anchor.x=-(i.x/i.width),d.anchor.y=-(i.y/i.height),d.alpha=n,d._bounds=this._bounds,this._cacheData.sprite=d,this.transform._parentID=-1,this.parent?this.updateTransform():(this.enableTempParent(),this.updateTransform(),this.disableTempParent(null)),this.containsPoint=d.containsPoint.bind(d)}};Yt.prototype._renderCachedCanvas=function(e){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObjectCanvas(e),this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._renderCanvas(e))};Yt.prototype._initCachedDisplayObjectCanvas=function(e){if(!(this._cacheData&&this._cacheData.sprite)){var r=this.getLocalBounds(null,!0),n=this.alpha;this.alpha=1;var i=e.context,a=e._projTransform;r.ceil(xe.RESOLUTION);var o=Co.create({width:r.width,height:r.height}),s="cacheAsBitmap_"+To();this._cacheData.textureCacheId=s,Je.addToCache(o.baseTexture,s),Fe.addToCache(o,s);var u=UD;this.transform.localTransform.copyTo(u),u.invert(),u.tx-=r.x,u.ty-=r.y,this.renderCanvas=this._cacheData.originalRenderCanvas,e.render(this,{renderTexture:o,clear:!0,transform:u,skipUpdateTransform:!1}),e.context=i,e._projTransform=a,this.renderCanvas=this._renderCachedCanvas,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null,this.alpha=n;var l=new _i(o);l.transform.worldTransform=this.transform.worldTransform,l.anchor.x=-(r.x/r.width),l.anchor.y=-(r.y/r.height),l.alpha=n,l._bounds=this._bounds,this._cacheData.sprite=l,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=e._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=l.containsPoint.bind(l)}};Yt.prototype._calculateCachedBounds=function(){this._bounds.clear(),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite._calculateBounds(),this._bounds.updateID=this._boundsID};Yt.prototype._getCachedLocalBounds=function(){return this._cacheData.sprite.getLocalBounds(null)};Yt.prototype._destroyCachedDisplayObject=function(){this._cacheData.sprite._texture.destroy(!0),this._cacheData.sprite=null,Je.removeFromCache(this._cacheData.textureCacheId),Fe.removeFromCache(this._cacheData.textureCacheId),this._cacheData.textureCacheId=null};Yt.prototype._cacheAsBitmapDestroy=function(e){this.cacheAsBitmap=!1,this.destroy(e)};/*! - * @pixi/mixin-get-child-by-name - v6.5.10 - * Compiled Thu, 06 Jul 2023 15:25:11 UTC - * - * @pixi/mixin-get-child-by-name is licensed under the MIT License. - * http://www.opensource.org/licenses/mit-license - */Yt.prototype.name=null;gr.prototype.getChildByName=function(e,r){for(var n=0,i=this.children.length;n0){var p=l.x-r[h].x,v=l.y-r[h].y,g=Math.sqrt(p*p+v*v);l=r[h],u+=g/c}else u=h/(f-1);o[d]=u,o[d+1]=0,o[d+2]=u,o[d+3]=1}for(var m=0,h=0;h0?this.textureScale*this._width/2:this._width/2;a/=h,o/=h,a*=d,o*=d,s[f]=c.x+a,s[f+1]=c.y+o,s[f+2]=c.x-a,s[f+3]=c.y-o,n=c}this.buffers[0].update()}},e.prototype.update=function(){this.textureScale>0?this.build():this.updateVertices()},e}(Kf),dge=function(t){bu(e,t);function e(r,n,i){i===void 0&&(i=0);var a=this,o=new GD(r.height,n,i),s=new Hl(r);return i>0&&(r.baseTexture.wrapMode=xi.REPEAT),a=t.call(this,o,s)||this,a.autoUpdate=!0,a}return e.prototype._render=function(r){var n=this.geometry;(this.autoUpdate||n._width!==this.shader.texture.height)&&(n._width=this.shader.texture.height,n.update()),t.prototype._render.call(this,r)},e}(Yl),XD=function(t){bu(e,t);function e(r,n,i){var a=this,o=new VD(r.width,r.height,n,i),s=new Hl(Fe.WHITE);return a=t.call(this,o,s)||this,a.texture=r,a.autoResize=!0,a}return e.prototype.textureUpdated=function(){this._textureID=this.shader.texture._updateID;var r=this.geometry,n=this.shader.texture,i=n.width,a=n.height;this.autoResize&&(r.width!==i||r.height!==a)&&(r.width=this.shader.texture.width,r.height=this.shader.texture.height,r.build())},Object.defineProperty(e.prototype,"texture",{get:function(){return this.shader.texture},set:function(r){this.shader.texture!==r&&(this.shader.texture=r,this._textureID=-1,r.baseTexture.valid?this.textureUpdated():r.once("update",this.textureUpdated,this))},enumerable:!1,configurable:!0}),e.prototype._render=function(r){this._textureID!==this.shader.texture._updateID&&this.textureUpdated(),t.prototype._render.call(this,r)},e.prototype.destroy=function(r){this.shader.texture.off("update",this.textureUpdated,this),t.prototype.destroy.call(this,r)},e}(Yl),zD=function(t){bu(e,t);function e(r,n,i,a,o){r===void 0&&(r=Fe.EMPTY);var s=this,u=new Kf(n,i,a);u.getBuffer("aVertexPosition").static=!1;var l=new Hl(r);return s=t.call(this,u,l,null,o)||this,s.autoUpdate=!0,s}return Object.defineProperty(e.prototype,"vertices",{get:function(){return this.geometry.getBuffer("aVertexPosition").data},set:function(r){this.geometry.getBuffer("aVertexPosition").data=r},enumerable:!1,configurable:!0}),e.prototype._render=function(r){this.autoUpdate&&this.geometry.getBuffer("aVertexPosition").update(),t.prototype._render.call(this,r)},e}(Yl),Wh=10,pge=function(t){bu(e,t);function e(r,n,i,a,o){n===void 0&&(n=Wh),i===void 0&&(i=Wh),a===void 0&&(a=Wh),o===void 0&&(o=Wh);var s=t.call(this,Fe.WHITE,4,4)||this;return s._origWidth=r.orig.width,s._origHeight=r.orig.height,s._width=s._origWidth,s._height=s._origHeight,s._leftWidth=n,s._rightWidth=a,s._topHeight=i,s._bottomHeight=o,s.texture=r,s}return e.prototype.textureUpdated=function(){this._textureID=this.shader.texture._updateID,this._refresh()},Object.defineProperty(e.prototype,"vertices",{get:function(){return this.geometry.getBuffer("aVertexPosition").data},set:function(r){this.geometry.getBuffer("aVertexPosition").data=r},enumerable:!1,configurable:!0}),e.prototype.updateHorizontalVertices=function(){var r=this.vertices,n=this._getMinScale();r[9]=r[11]=r[13]=r[15]=this._topHeight*n,r[17]=r[19]=r[21]=r[23]=this._height-this._bottomHeight*n,r[25]=r[27]=r[29]=r[31]=this._height},e.prototype.updateVerticalVertices=function(){var r=this.vertices,n=this._getMinScale();r[2]=r[10]=r[18]=r[26]=this._leftWidth*n,r[4]=r[12]=r[20]=r[28]=this._width-this._rightWidth*n,r[6]=r[14]=r[22]=r[30]=this._width},e.prototype._getMinScale=function(){var r=this._leftWidth+this._rightWidth,n=this._width>r?1:this._width/r,i=this._topHeight+this._bottomHeight,a=this._height>i?1:this._height/i,o=Math.min(n,a);return o},Object.defineProperty(e.prototype,"width",{get:function(){return this._width},set:function(r){this._width=r,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(r){this._height=r,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leftWidth",{get:function(){return this._leftWidth},set:function(r){this._leftWidth=r,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rightWidth",{get:function(){return this._rightWidth},set:function(r){this._rightWidth=r,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"topHeight",{get:function(){return this._topHeight},set:function(r){this._topHeight=r,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bottomHeight",{get:function(){return this._bottomHeight},set:function(r){this._bottomHeight=r,this._refresh()},enumerable:!1,configurable:!0}),e.prototype._refresh=function(){var r=this.texture,n=this.geometry.buffers[1].data;this._origWidth=r.orig.width,this._origHeight=r.orig.height;var i=1/this._origWidth,a=1/this._origHeight;n[0]=n[8]=n[16]=n[24]=0,n[1]=n[3]=n[5]=n[7]=0,n[6]=n[14]=n[22]=n[30]=1,n[25]=n[27]=n[29]=n[31]=1,n[2]=n[10]=n[18]=n[26]=i*this._leftWidth,n[4]=n[12]=n[20]=n[28]=1-i*this._rightWidth,n[9]=n[11]=n[13]=n[15]=a*this._topHeight,n[17]=n[19]=n[21]=n[23]=1-a*this._bottomHeight,this.updateHorizontalVertices(),this.updateVerticalVertices(),this.geometry.buffers[0].update(),this.geometry.buffers[1].update()},e}(XD);/*! - * @pixi/sprite-animated - v6.5.10 - * Compiled Thu, 06 Jul 2023 15:25:11 UTC - * - * @pixi/sprite-animated is licensed under the MIT License. - * http://www.opensource.org/licenses/mit-license - *//*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var mx=function(t,e){return mx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},mx(t,e)};function vge(t,e){mx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var mge=function(t){vge(e,t);function e(r,n){n===void 0&&(n=!0);var i=t.call(this,r[0]instanceof Fe?r[0]:r[0].texture)||this;return i._textures=null,i._durations=null,i._autoUpdate=n,i._isConnectedToTicker=!1,i.animationSpeed=1,i.loop=!0,i.updateAnchor=!1,i.onComplete=null,i.onFrameChange=null,i.onLoop=null,i._currentTime=0,i._playing=!1,i._previousFrame=null,i.textures=r,i}return e.prototype.stop=function(){this._playing&&(this._playing=!1,this._autoUpdate&&this._isConnectedToTicker&&(Or.shared.remove(this.update,this),this._isConnectedToTicker=!1))},e.prototype.play=function(){this._playing||(this._playing=!0,this._autoUpdate&&!this._isConnectedToTicker&&(Or.shared.add(this.update,this,ra.HIGH),this._isConnectedToTicker=!0))},e.prototype.gotoAndStop=function(r){this.stop();var n=this.currentFrame;this._currentTime=r,n!==this.currentFrame&&this.updateTexture()},e.prototype.gotoAndPlay=function(r){var n=this.currentFrame;this._currentTime=r,n!==this.currentFrame&&this.updateTexture(),this.play()},e.prototype.update=function(r){if(this._playing){var n=this.animationSpeed*r,i=this.currentFrame;if(this._durations!==null){var a=this._currentTime%1*this._durations[this.currentFrame];for(a+=n/60*1e3;a<0;)this._currentTime--,a+=this._durations[this.currentFrame];var o=Math.sign(this.animationSpeed*r);for(this._currentTime=Math.floor(this._currentTime);a>=this._durations[this.currentFrame];)a-=this._durations[this.currentFrame]*o,this._currentTime+=o;this._currentTime+=a/this._durations[this.currentFrame]}else this._currentTime+=n;this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete&&this.onComplete()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete&&this.onComplete()):i!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFramei&&this.onLoop()),this.updateTexture())}},e.prototype.updateTexture=function(){var r=this.currentFrame;this._previousFrame!==r&&(this._previousFrame=r,this._texture=this._textures[r],this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this.uvs=this._texture._uvs.uvsFloat32,this.updateAnchor&&this._anchor.copyFrom(this._texture.defaultAnchor),this.onFrameChange&&this.onFrameChange(this.currentFrame))},e.prototype.destroy=function(r){this.stop(),t.prototype.destroy.call(this,r),this.onComplete=null,this.onFrameChange=null,this.onLoop=null},e.fromFrames=function(r){for(var n=[],i=0;i 0.5) then: 1 - 2 * (1 - dst) * (1 - src) - return vec3((dst.x <= 0.5) ? (2.0 * src.x * dst.x) : (1.0 - 2.0 * (1.0 - dst.x) * (1.0 - src.x)), - (dst.y <= 0.5) ? (2.0 * src.y * dst.y) : (1.0 - 2.0 * (1.0 - dst.y) * (1.0 - src.y)), - (dst.z <= 0.5) ? (2.0 * src.z * dst.z) : (1.0 - 2.0 * (1.0 - dst.z) * (1.0 - src.z))); -} - - -void main() -{ - gl_FragColor = texture2D(uSampler, vTextureCoord); - vec3 color = gl_FragColor.rgb; - - if (sepia > 0.0) - { - float gray = (color.x + color.y + color.z) / 3.0; - vec3 grayscale = vec3(gray); - - color = Overlay(SEPIA_RGB, grayscale); - - color = grayscale + sepia * (color - grayscale); - } - - vec2 coord = vTextureCoord * filterArea.xy / dimensions.xy; - - if (vignetting > 0.0) - { - float outter = SQRT_2 - vignetting * SQRT_2; - vec2 dir = vec2(vec2(0.5, 0.5) - coord); - dir.y *= dimensions.y / dimensions.x; - float darker = clamp((outter - length(dir) * SQRT_2) / ( 0.00001 + vignettingBlur * SQRT_2), 0.0, 1.0); - color.rgb *= darker + (1.0 - darker) * (1.0 - vignettingAlpha); - } - - if (scratchDensity > seed && scratch != 0.0) - { - float phase = seed * 256.0; - float s = mod(floor(phase), 2.0); - float dist = 1.0 / scratchDensity; - float d = distance(coord, vec2(seed * dist, abs(s - seed * dist))); - if (d < seed * 0.6 + 0.4) - { - highp float period = scratchDensity * 10.0; - - float xx = coord.x * period + phase; - float aa = abs(mod(xx, 0.5) * 4.0); - float bb = mod(floor(xx / 0.5), 2.0); - float yy = (1.0 - bb) * aa + bb * (2.0 - aa); - - float kk = 2.0 * period; - float dw = scratchWidth / dimensions.x * (0.75 + seed); - float dh = dw * kk; - - float tine = (yy - (2.0 - dh)); - - if (tine > 0.0) { - float _sign = sign(scratch); - - tine = s * tine / period + scratch + 0.1; - tine = clamp(tine + 1.0, 0.5 + _sign * 0.5, 1.5 + _sign * 0.5); - - color.rgb *= tine; - } - } - } - - if (noise > 0.0 && noiseSize > 0.0) - { - vec2 pixelCoord = vTextureCoord.xy * filterArea.xy; - pixelCoord.x = floor(pixelCoord.x / noiseSize); - pixelCoord.y = floor(pixelCoord.y / noiseSize); - // vec2 d = pixelCoord * noiseSize * vec2(1024.0 + seed * 512.0, 1024.0 - seed * 512.0); - // float _noise = snoise(d) * 0.5; - float _noise = rand(pixelCoord * noiseSize * seed) - 0.5; - color += _noise * noise; - } - - gl_FragColor.rgb = color; -} -`,Tge=function(t){Sge(e,t);function e(r,n){n===void 0&&(n=0);var i=t.call(this,wge,Ege)||this;return i.seed=0,i.uniforms.dimensions=new Float32Array(2),typeof r=="number"?(i.seed=r,r=void 0):i.seed=n,Object.assign(i,e.defaults,r),i}return e.prototype.apply=function(r,n,i,a){var o,s;this.uniforms.dimensions[0]=(o=n.filterFrame)===null||o===void 0?void 0:o.width,this.uniforms.dimensions[1]=(s=n.filterFrame)===null||s===void 0?void 0:s.height,this.uniforms.seed=this.seed,r.applyFilter(this,n,i,a)},Object.defineProperty(e.prototype,"sepia",{get:function(){return this.uniforms.sepia},set:function(r){this.uniforms.sepia=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"noise",{get:function(){return this.uniforms.noise},set:function(r){this.uniforms.noise=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"noiseSize",{get:function(){return this.uniforms.noiseSize},set:function(r){this.uniforms.noiseSize=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scratch",{get:function(){return this.uniforms.scratch},set:function(r){this.uniforms.scratch=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scratchDensity",{get:function(){return this.uniforms.scratchDensity},set:function(r){this.uniforms.scratchDensity=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scratchWidth",{get:function(){return this.uniforms.scratchWidth},set:function(r){this.uniforms.scratchWidth=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"vignetting",{get:function(){return this.uniforms.vignetting},set:function(r){this.uniforms.vignetting=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"vignettingAlpha",{get:function(){return this.uniforms.vignettingAlpha},set:function(r){this.uniforms.vignettingAlpha=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"vignettingBlur",{get:function(){return this.uniforms.vignettingBlur},set:function(r){this.uniforms.vignettingBlur=r},enumerable:!1,configurable:!0}),e.defaults={sepia:.3,noise:.3,noiseSize:1,scratch:.5,scratchDensity:.3,scratchWidth:1,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3},e}(De);/*! - * @pixi/filter-dot - v4.2.0 - * Compiled Fri, 05 Aug 2022 19:53:35 UTC - * - * @pixi/filter-dot is licensed under the MIT License. - * http://www.opensource.org/licenses/mit-license - *//*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var _x=function(t,e){return _x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},_x(t,e)};function Age(t,e){_x(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Cge=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,Pge=`precision mediump float; - -varying vec2 vTextureCoord; -varying vec4 vColor; - -uniform vec4 filterArea; -uniform sampler2D uSampler; - -uniform float angle; -uniform float scale; - -float pattern() -{ - float s = sin(angle), c = cos(angle); - vec2 tex = vTextureCoord * filterArea.xy; - vec2 point = vec2( - c * tex.x - s * tex.y, - s * tex.x + c * tex.y - ) * scale; - return (sin(point.x) * sin(point.y)) * 4.0; -} - -void main() -{ - vec4 color = texture2D(uSampler, vTextureCoord); - float average = (color.r + color.g + color.b) / 3.0; - gl_FragColor = vec4(vec3(average * 10.0 - 5.0 + pattern()), color.a); -} -`,Oge=function(t){Age(e,t);function e(r,n){r===void 0&&(r=1),n===void 0&&(n=5);var i=t.call(this,Cge,Pge)||this;return i.scale=r,i.angle=n,i}return Object.defineProperty(e.prototype,"scale",{get:function(){return this.uniforms.scale},set:function(r){this.uniforms.scale=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"angle",{get:function(){return this.uniforms.angle},set:function(r){this.uniforms.angle=r},enumerable:!1,configurable:!0}),e}(De);/*! - * @pixi/filter-reflection - v4.2.0 - * Compiled Fri, 05 Aug 2022 19:53:35 UTC - * - * @pixi/filter-reflection is licensed under the MIT License. - * http://www.opensource.org/licenses/mit-license - *//*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var xx=function(t,e){return xx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},xx(t,e)};function Rge(t,e){xx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Ige=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,kge=`varying vec2 vTextureCoord; -uniform sampler2D uSampler; - -uniform vec4 filterArea; -uniform vec4 filterClamp; -uniform vec2 dimensions; - -uniform bool mirror; -uniform float boundary; -uniform vec2 amplitude; -uniform vec2 waveLength; -uniform vec2 alpha; -uniform float time; - -float rand(vec2 co) { - return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453); -} - -void main(void) -{ - vec2 pixelCoord = vTextureCoord.xy * filterArea.xy; - vec2 coord = pixelCoord / dimensions; - - if (coord.y < boundary) { - gl_FragColor = texture2D(uSampler, vTextureCoord); - return; - } - - float k = (coord.y - boundary) / (1. - boundary + 0.0001); - float areaY = boundary * dimensions.y / filterArea.y; - float v = areaY + areaY - vTextureCoord.y; - float y = mirror ? v : vTextureCoord.y; - - float _amplitude = ((amplitude.y - amplitude.x) * k + amplitude.x ) / filterArea.x; - float _waveLength = ((waveLength.y - waveLength.x) * k + waveLength.x) / filterArea.y; - float _alpha = (alpha.y - alpha.x) * k + alpha.x; - - float x = vTextureCoord.x + cos(v * 6.28 / _waveLength - time) * _amplitude; - x = clamp(x, filterClamp.x, filterClamp.z); - - vec4 color = texture2D(uSampler, vec2(x, y)); - - gl_FragColor = color * _alpha; -} -`,Mge=function(t){Rge(e,t);function e(r){var n=t.call(this,Ige,kge)||this;return n.time=0,n.uniforms.amplitude=new Float32Array(2),n.uniforms.waveLength=new Float32Array(2),n.uniforms.alpha=new Float32Array(2),n.uniforms.dimensions=new Float32Array(2),Object.assign(n,e.defaults,r),n}return e.prototype.apply=function(r,n,i,a){var o,s;this.uniforms.dimensions[0]=(o=n.filterFrame)===null||o===void 0?void 0:o.width,this.uniforms.dimensions[1]=(s=n.filterFrame)===null||s===void 0?void 0:s.height,this.uniforms.time=this.time,r.applyFilter(this,n,i,a)},Object.defineProperty(e.prototype,"mirror",{get:function(){return this.uniforms.mirror},set:function(r){this.uniforms.mirror=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"boundary",{get:function(){return this.uniforms.boundary},set:function(r){this.uniforms.boundary=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"amplitude",{get:function(){return this.uniforms.amplitude},set:function(r){this.uniforms.amplitude[0]=r[0],this.uniforms.amplitude[1]=r[1]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"waveLength",{get:function(){return this.uniforms.waveLength},set:function(r){this.uniforms.waveLength[0]=r[0],this.uniforms.waveLength[1]=r[1]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"alpha",{get:function(){return this.uniforms.alpha},set:function(r){this.uniforms.alpha[0]=r[0],this.uniforms.alpha[1]=r[1]},enumerable:!1,configurable:!0}),e.defaults={mirror:!0,boundary:.5,amplitude:[0,20],waveLength:[30,100],alpha:[1,1],time:0},e}(De);/*! - * @pixi/filter-glitch - v4.2.0 - * Compiled Fri, 05 Aug 2022 19:53:35 UTC - * - * @pixi/filter-glitch is licensed under the MIT License. - * http://www.opensource.org/licenses/mit-license - *//*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var bx=function(t,e){return bx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},bx(t,e)};function Fge(t,e){bx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Nge=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,Lge=`// precision highp float; - -varying vec2 vTextureCoord; -uniform sampler2D uSampler; - -uniform vec4 filterArea; -uniform vec4 filterClamp; -uniform vec2 dimensions; -uniform float aspect; - -uniform sampler2D displacementMap; -uniform float offset; -uniform float sinDir; -uniform float cosDir; -uniform int fillMode; - -uniform float seed; -uniform vec2 red; -uniform vec2 green; -uniform vec2 blue; - -const int TRANSPARENT = 0; -const int ORIGINAL = 1; -const int LOOP = 2; -const int CLAMP = 3; -const int MIRROR = 4; - -void main(void) -{ - vec2 coord = (vTextureCoord * filterArea.xy) / dimensions; - - if (coord.x > 1.0 || coord.y > 1.0) { - return; - } - - float cx = coord.x - 0.5; - float cy = (coord.y - 0.5) * aspect; - float ny = (-sinDir * cx + cosDir * cy) / aspect + 0.5; - - // displacementMap: repeat - // ny = ny > 1.0 ? ny - 1.0 : (ny < 0.0 ? 1.0 + ny : ny); - - // displacementMap: mirror - ny = ny > 1.0 ? 2.0 - ny : (ny < 0.0 ? -ny : ny); - - vec4 dc = texture2D(displacementMap, vec2(0.5, ny)); - - float displacement = (dc.r - dc.g) * (offset / filterArea.x); - - coord = vTextureCoord + vec2(cosDir * displacement, sinDir * displacement * aspect); - - if (fillMode == CLAMP) { - coord = clamp(coord, filterClamp.xy, filterClamp.zw); - } else { - if( coord.x > filterClamp.z ) { - if (fillMode == TRANSPARENT) { - discard; - } else if (fillMode == LOOP) { - coord.x -= filterClamp.z; - } else if (fillMode == MIRROR) { - coord.x = filterClamp.z * 2.0 - coord.x; - } - } else if( coord.x < filterClamp.x ) { - if (fillMode == TRANSPARENT) { - discard; - } else if (fillMode == LOOP) { - coord.x += filterClamp.z; - } else if (fillMode == MIRROR) { - coord.x *= -filterClamp.z; - } - } - - if( coord.y > filterClamp.w ) { - if (fillMode == TRANSPARENT) { - discard; - } else if (fillMode == LOOP) { - coord.y -= filterClamp.w; - } else if (fillMode == MIRROR) { - coord.y = filterClamp.w * 2.0 - coord.y; - } - } else if( coord.y < filterClamp.y ) { - if (fillMode == TRANSPARENT) { - discard; - } else if (fillMode == LOOP) { - coord.y += filterClamp.w; - } else if (fillMode == MIRROR) { - coord.y *= -filterClamp.w; - } - } - } - - gl_FragColor.r = texture2D(uSampler, coord + red * (1.0 - seed * 0.4) / filterArea.xy).r; - gl_FragColor.g = texture2D(uSampler, coord + green * (1.0 - seed * 0.3) / filterArea.xy).g; - gl_FragColor.b = texture2D(uSampler, coord + blue * (1.0 - seed * 0.2) / filterArea.xy).b; - gl_FragColor.a = texture2D(uSampler, coord).a; -} -`,Dge=function(t){Fge(e,t);function e(r){var n=t.call(this,Nge,Lge)||this;return n.offset=100,n.fillMode=e.TRANSPARENT,n.average=!1,n.seed=0,n.minSize=8,n.sampleSize=512,n._slices=0,n._offsets=new Float32Array(1),n._sizes=new Float32Array(1),n._direction=-1,n.uniforms.dimensions=new Float32Array(2),n._canvas=document.createElement("canvas"),n._canvas.width=4,n._canvas.height=n.sampleSize,n.texture=Fe.from(n._canvas,{scaleMode:Ir.NEAREST}),Object.assign(n,e.defaults,r),n}return e.prototype.apply=function(r,n,i,a){var o=n.filterFrame,s=o.width,u=o.height;this.uniforms.dimensions[0]=s,this.uniforms.dimensions[1]=u,this.uniforms.aspect=u/s,this.uniforms.seed=this.seed,this.uniforms.offset=this.offset,this.uniforms.fillMode=this.fillMode,r.applyFilter(this,n,i,a)},e.prototype._randomizeSizes=function(){var r=this._sizes,n=this._slices-1,i=this.sampleSize,a=Math.min(this.minSize/i,.9/this._slices);if(this.average){for(var o=this._slices,s=1,u=0;u0;i--){var a=Math.random()*i>>0,o=r[i];r[i]=r[a],r[a]=o}},e.prototype._randomizeOffsets=function(){for(var r=0;r0?a:0,c=a<0?-a:0;i.fillStyle="rgba("+l+", "+c+", 0, 1)",i.fillRect(0,o>>0,r,u+1>>0),o+=u}n.baseTexture.update(),this.uniforms.displacementMap=n},Object.defineProperty(e.prototype,"sizes",{get:function(){return this._sizes},set:function(r){for(var n=Math.min(this._slices,r.length),i=0;i 0.0) { - c.rgb /= c.a; - - vec3 rgb = pow(c.rgb, vec3(1. / gamma)); - rgb = mix(vec3(.5), mix(vec3(dot(vec3(.2125, .7154, .0721), rgb)), rgb, saturation), contrast); - rgb.r *= red; - rgb.g *= green; - rgb.b *= blue; - c.rgb = rgb * brightness; - - c.rgb *= c.a; - } - - gl_FragColor = c * alpha; -} -`;(function(t){Yge(e,t);function e(r){var n=t.call(this,Hge,qge)||this;return n.gamma=1,n.saturation=1,n.contrast=1,n.brightness=1,n.red=1,n.green=1,n.blue=1,n.alpha=1,Object.assign(n,r),n}return e.prototype.apply=function(r,n,i,a){this.uniforms.gamma=Math.max(this.gamma,1e-4),this.uniforms.saturation=this.saturation,this.uniforms.contrast=this.contrast,this.uniforms.brightness=this.brightness,this.uniforms.red=this.red,this.uniforms.green=this.green,this.uniforms.blue=this.blue,this.uniforms.alpha=this.alpha,r.applyFilter(this,n,i,a)},e})(De);/*! - * @pixi/filter-kawase-blur - v4.2.0 - * Compiled Fri, 05 Aug 2022 19:53:35 UTC - * - * @pixi/filter-kawase-blur is licensed under the MIT License. - * http://www.opensource.org/licenses/mit-license - *//*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var Tx=function(t,e){return Tx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Tx(t,e)};function Kge(t,e){Tx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Zge=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,Qge=` -varying vec2 vTextureCoord; -uniform sampler2D uSampler; - -uniform vec2 uOffset; - -void main(void) -{ - vec4 color = vec4(0.0); - - // Sample top left pixel - color += texture2D(uSampler, vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y + uOffset.y)); - - // Sample top right pixel - color += texture2D(uSampler, vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y + uOffset.y)); - - // Sample bottom right pixel - color += texture2D(uSampler, vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y - uOffset.y)); - - // Sample bottom left pixel - color += texture2D(uSampler, vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y - uOffset.y)); - - // Average - color *= 0.25; - - gl_FragColor = color; -}`,Jge=` -varying vec2 vTextureCoord; -uniform sampler2D uSampler; - -uniform vec2 uOffset; -uniform vec4 filterClamp; - -void main(void) -{ - vec4 color = vec4(0.0); - - // Sample top left pixel - color += texture2D(uSampler, clamp(vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y + uOffset.y), filterClamp.xy, filterClamp.zw)); - - // Sample top right pixel - color += texture2D(uSampler, clamp(vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y + uOffset.y), filterClamp.xy, filterClamp.zw)); - - // Sample bottom right pixel - color += texture2D(uSampler, clamp(vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y - uOffset.y), filterClamp.xy, filterClamp.zw)); - - // Sample bottom left pixel - color += texture2D(uSampler, clamp(vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y - uOffset.y), filterClamp.xy, filterClamp.zw)); - - // Average - color *= 0.25; - - gl_FragColor = color; -} -`,Ap=function(t){Kge(e,t);function e(r,n,i){r===void 0&&(r=4),n===void 0&&(n=3),i===void 0&&(i=!1);var a=t.call(this,Zge,i?Jge:Qge)||this;return a._kernels=[],a._blur=4,a._quality=3,a.uniforms.uOffset=new Float32Array(2),a._pixelSize=new We,a.pixelSize=1,a._clamp=i,Array.isArray(r)?a.kernels=r:(a._blur=r,a.quality=n),a}return e.prototype.apply=function(r,n,i,a){var o=this._pixelSize.x/n._frame.width,s=this._pixelSize.y/n._frame.height,u;if(this._quality===1||this._blur===0)u=this._kernels[0]+.5,this.uniforms.uOffset[0]=u*o,this.uniforms.uOffset[1]=u*s,r.applyFilter(this,n,i,a);else{for(var l=r.getFilterTexture(),c=n,f=l,h=void 0,d=this._quality-1,p=0;p0)for(var a=r,o=r/n,s=1;s0?(this._kernels=r,this._quality=r.length,this._blur=Math.max.apply(Math,r)):(this._kernels=[0],this._quality=1)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clamp",{get:function(){return this._clamp},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pixelSize",{get:function(){return this._pixelSize},set:function(r){typeof r=="number"?(this._pixelSize.x=r,this._pixelSize.y=r):Array.isArray(r)?(this._pixelSize.x=r[0],this._pixelSize.y=r[1]):r instanceof We?(this._pixelSize.x=r.x,this._pixelSize.y=r.y):(this._pixelSize.x=1,this._pixelSize.y=1)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"quality",{get:function(){return this._quality},set:function(r){this._quality=Math.max(1,Math.round(r)),this._generateKernels()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blur",{get:function(){return this._blur},set:function(r){this._blur=r,this._generateKernels()},enumerable:!1,configurable:!0}),e}(De);/*! - * @pixi/filter-advanced-bloom - v4.2.0 - * Compiled Fri, 05 Aug 2022 19:53:35 UTC - * - * @pixi/filter-advanced-bloom is licensed under the MIT License. - * http://www.opensource.org/licenses/mit-license - *//*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var Ax=function(t,e){return Ax=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Ax(t,e)};function WD(t,e){Ax(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var YD=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,eye=` -uniform sampler2D uSampler; -varying vec2 vTextureCoord; - -uniform float threshold; - -void main() { - vec4 color = texture2D(uSampler, vTextureCoord); - - // A simple & fast algorithm for getting brightness. - // It's inaccuracy , but good enought for this feature. - float _max = max(max(color.r, color.g), color.b); - float _min = min(min(color.r, color.g), color.b); - float brightness = (_max + _min) * 0.5; - - if(brightness > threshold) { - gl_FragColor = color; - } else { - gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); - } -} -`,tye=function(t){WD(e,t);function e(r){r===void 0&&(r=.5);var n=t.call(this,YD,eye)||this;return n.threshold=r,n}return Object.defineProperty(e.prototype,"threshold",{get:function(){return this.uniforms.threshold},set:function(r){this.uniforms.threshold=r},enumerable:!1,configurable:!0}),e}(De),rye=`uniform sampler2D uSampler; -varying vec2 vTextureCoord; - -uniform sampler2D bloomTexture; -uniform float bloomScale; -uniform float brightness; - -void main() { - vec4 color = texture2D(uSampler, vTextureCoord); - color.rgb *= brightness; - vec4 bloomColor = vec4(texture2D(bloomTexture, vTextureCoord).rgb, 0.0); - bloomColor.rgb *= bloomScale; - gl_FragColor = color + bloomColor; -} -`;(function(t){WD(e,t);function e(r){var n=t.call(this,YD,rye)||this;n.bloomScale=1,n.brightness=1,n._resolution=xe.FILTER_RESOLUTION,typeof r=="number"&&(r={threshold:r});var i=Object.assign(e.defaults,r);n.bloomScale=i.bloomScale,n.brightness=i.brightness;var a=i.kernels,o=i.blur,s=i.quality,u=i.pixelSize,l=i.resolution;return n._extractFilter=new tye(i.threshold),n._extractFilter.resolution=l,n._blurFilter=a?new Ap(a):new Ap(o,s),n.pixelSize=u,n.resolution=l,n}return e.prototype.apply=function(r,n,i,a,o){var s=r.getFilterTexture();this._extractFilter.apply(r,n,s,1,o);var u=r.getFilterTexture();this._blurFilter.apply(r,s,u,1),this.uniforms.bloomScale=this.bloomScale,this.uniforms.brightness=this.brightness,this.uniforms.bloomTexture=u,r.applyFilter(this,n,i,a),r.returnFilterTexture(u),r.returnFilterTexture(s)},Object.defineProperty(e.prototype,"resolution",{get:function(){return this._resolution},set:function(r){this._resolution=r,this._extractFilter&&(this._extractFilter.resolution=r),this._blurFilter&&(this._blurFilter.resolution=r)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"threshold",{get:function(){return this._extractFilter.threshold},set:function(r){this._extractFilter.threshold=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"kernels",{get:function(){return this._blurFilter.kernels},set:function(r){this._blurFilter.kernels=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blur",{get:function(){return this._blurFilter.blur},set:function(r){this._blurFilter.blur=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"quality",{get:function(){return this._blurFilter.quality},set:function(r){this._blurFilter.quality=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pixelSize",{get:function(){return this._blurFilter.pixelSize},set:function(r){this._blurFilter.pixelSize=r},enumerable:!1,configurable:!0}),e.defaults={threshold:.5,bloomScale:1,brightness:1,kernels:null,blur:8,quality:4,pixelSize:1,resolution:xe.FILTER_RESOLUTION},e})(De);/*! - * @pixi/filter-ascii - v4.2.0 - * Compiled Fri, 05 Aug 2022 19:53:35 UTC - * - * @pixi/filter-ascii is licensed under the MIT License. - * http://www.opensource.org/licenses/mit-license - *//*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var Cx=function(t,e){return Cx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Cx(t,e)};function nye(t,e){Cx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var iye=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,aye=`varying vec2 vTextureCoord; - -uniform vec4 filterArea; -uniform float pixelSize; -uniform sampler2D uSampler; - -vec2 mapCoord( vec2 coord ) -{ - coord *= filterArea.xy; - coord += filterArea.zw; - - return coord; -} - -vec2 unmapCoord( vec2 coord ) -{ - coord -= filterArea.zw; - coord /= filterArea.xy; - - return coord; -} - -vec2 pixelate(vec2 coord, vec2 size) -{ - return floor( coord / size ) * size; -} - -vec2 getMod(vec2 coord, vec2 size) -{ - return mod( coord , size) / size; -} - -float character(float n, vec2 p) -{ - p = floor(p*vec2(4.0, -4.0) + 2.5); - - if (clamp(p.x, 0.0, 4.0) == p.x) - { - if (clamp(p.y, 0.0, 4.0) == p.y) - { - if (int(mod(n/exp2(p.x + 5.0*p.y), 2.0)) == 1) return 1.0; - } - } - return 0.0; -} - -void main() -{ - vec2 coord = mapCoord(vTextureCoord); - - // get the rounded color.. - vec2 pixCoord = pixelate(coord, vec2(pixelSize)); - pixCoord = unmapCoord(pixCoord); - - vec4 color = texture2D(uSampler, pixCoord); - - // determine the character to use - float gray = (color.r + color.g + color.b) / 3.0; - - float n = 65536.0; // . - if (gray > 0.2) n = 65600.0; // : - if (gray > 0.3) n = 332772.0; // * - if (gray > 0.4) n = 15255086.0; // o - if (gray > 0.5) n = 23385164.0; // & - if (gray > 0.6) n = 15252014.0; // 8 - if (gray > 0.7) n = 13199452.0; // @ - if (gray > 0.8) n = 11512810.0; // # - - // get the mod.. - vec2 modd = getMod(coord, vec2(pixelSize)); - - gl_FragColor = color * character( n, vec2(-1.0) + modd * 2.0); - -} -`;(function(t){nye(e,t);function e(r){r===void 0&&(r=8);var n=t.call(this,iye,aye)||this;return n.size=r,n}return Object.defineProperty(e.prototype,"size",{get:function(){return this.uniforms.pixelSize},set:function(r){this.uniforms.pixelSize=r},enumerable:!1,configurable:!0}),e})(De);/*! - * @pixi/filter-bevel - v4.2.0 - * Compiled Fri, 05 Aug 2022 19:53:35 UTC - * - * @pixi/filter-bevel is licensed under the MIT License. - * http://www.opensource.org/licenses/mit-license - *//*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var Px=function(t,e){return Px=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Px(t,e)};function oye(t,e){Px(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var sye=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,lye=`precision mediump float; - -varying vec2 vTextureCoord; -uniform sampler2D uSampler; -uniform vec4 filterArea; - -uniform float transformX; -uniform float transformY; -uniform vec3 lightColor; -uniform float lightAlpha; -uniform vec3 shadowColor; -uniform float shadowAlpha; - -void main(void) { - vec2 transform = vec2(1.0 / filterArea) * vec2(transformX, transformY); - vec4 color = texture2D(uSampler, vTextureCoord); - float light = texture2D(uSampler, vTextureCoord - transform).a; - float shadow = texture2D(uSampler, vTextureCoord + transform).a; - - color.rgb = mix(color.rgb, lightColor, clamp((color.a - light) * lightAlpha, 0.0, 1.0)); - color.rgb = mix(color.rgb, shadowColor, clamp((color.a - shadow) * shadowAlpha, 0.0, 1.0)); - gl_FragColor = vec4(color.rgb * color.a, color.a); -} -`;(function(t){oye(e,t);function e(r){var n=t.call(this,sye,lye)||this;return n._thickness=2,n._angle=0,n.uniforms.lightColor=new Float32Array(3),n.uniforms.shadowColor=new Float32Array(3),Object.assign(n,{rotation:45,thickness:2,lightColor:16777215,lightAlpha:.7,shadowColor:0,shadowAlpha:.7},r),n.padding=1,n}return e.prototype._updateTransform=function(){this.uniforms.transformX=this._thickness*Math.cos(this._angle),this.uniforms.transformY=this._thickness*Math.sin(this._angle)},Object.defineProperty(e.prototype,"rotation",{get:function(){return this._angle/Ao},set:function(r){this._angle=r*Ao,this._updateTransform()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"thickness",{get:function(){return this._thickness},set:function(r){this._thickness=r,this._updateTransform()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lightColor",{get:function(){return dn(this.uniforms.lightColor)},set:function(r){yr(r,this.uniforms.lightColor)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lightAlpha",{get:function(){return this.uniforms.lightAlpha},set:function(r){this.uniforms.lightAlpha=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shadowColor",{get:function(){return dn(this.uniforms.shadowColor)},set:function(r){yr(r,this.uniforms.shadowColor)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shadowAlpha",{get:function(){return this.uniforms.shadowAlpha},set:function(r){this.uniforms.shadowAlpha=r},enumerable:!1,configurable:!0}),e})(De);/*! - * @pixi/filter-bloom - v4.2.0 - * Compiled Fri, 05 Aug 2022 19:53:35 UTC - * - * @pixi/filter-bloom is licensed under the MIT License. - * http://www.opensource.org/licenses/mit-license - *//*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var Ox=function(t,e){return Ox=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Ox(t,e)};function uye(t,e){Ox(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}(function(t){uye(e,t);function e(r,n,i,a){r===void 0&&(r=2),n===void 0&&(n=4),i===void 0&&(i=xe.FILTER_RESOLUTION),a===void 0&&(a=5);var o=t.call(this)||this,s,u;return typeof r=="number"?(s=r,u=r):r instanceof We?(s=r.x,u=r.y):Array.isArray(r)&&(s=r[0],u=r[1]),o.blurXFilter=new mf(!0,s,n,i,a),o.blurYFilter=new mf(!1,u,n,i,a),o.blurYFilter.blendMode=Se.SCREEN,o.defaultFilter=new BD,o}return e.prototype.apply=function(r,n,i,a){var o=r.getFilterTexture();this.defaultFilter.apply(r,n,i,a),this.blurXFilter.apply(r,n,o,1),this.blurYFilter.apply(r,o,i,0),r.returnFilterTexture(o)},Object.defineProperty(e.prototype,"blur",{get:function(){return this.blurXFilter.blur},set:function(r){this.blurXFilter.blur=this.blurYFilter.blur=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blurX",{get:function(){return this.blurXFilter.blur},set:function(r){this.blurXFilter.blur=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blurY",{get:function(){return this.blurYFilter.blur},set:function(r){this.blurYFilter.blur=r},enumerable:!1,configurable:!0}),e})(De);/*! - * @pixi/filter-bulge-pinch - v4.2.0 - * Compiled Fri, 05 Aug 2022 19:53:35 UTC - * - * @pixi/filter-bulge-pinch is licensed under the MIT License. - * http://www.opensource.org/licenses/mit-license - *//*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var Rx=function(t,e){return Rx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Rx(t,e)};function cye(t,e){Rx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var fye=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,hye=`uniform float radius; -uniform float strength; -uniform vec2 center; -uniform sampler2D uSampler; -varying vec2 vTextureCoord; - -uniform vec4 filterArea; -uniform vec4 filterClamp; -uniform vec2 dimensions; - -void main() -{ - vec2 coord = vTextureCoord * filterArea.xy; - coord -= center * dimensions.xy; - float distance = length(coord); - if (distance < radius) { - float percent = distance / radius; - if (strength > 0.0) { - coord *= mix(1.0, smoothstep(0.0, radius / distance, percent), strength * 0.75); - } else { - coord *= mix(1.0, pow(percent, 1.0 + strength * 0.75) * radius / distance, 1.0 - percent); - } - } - coord += center * dimensions.xy; - coord /= filterArea.xy; - vec2 clampedCoord = clamp(coord, filterClamp.xy, filterClamp.zw); - vec4 color = texture2D(uSampler, clampedCoord); - if (coord != clampedCoord) { - color *= max(0.0, 1.0 - length(coord - clampedCoord)); - } - - gl_FragColor = color; -} -`;(function(t){cye(e,t);function e(r){var n=t.call(this,fye,hye)||this;return n.uniforms.dimensions=new Float32Array(2),Object.assign(n,e.defaults,r),n}return e.prototype.apply=function(r,n,i,a){var o=n.filterFrame,s=o.width,u=o.height;this.uniforms.dimensions[0]=s,this.uniforms.dimensions[1]=u,r.applyFilter(this,n,i,a)},Object.defineProperty(e.prototype,"radius",{get:function(){return this.uniforms.radius},set:function(r){this.uniforms.radius=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"strength",{get:function(){return this.uniforms.strength},set:function(r){this.uniforms.strength=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"center",{get:function(){return this.uniforms.center},set:function(r){this.uniforms.center=r},enumerable:!1,configurable:!0}),e.defaults={center:[.5,.5],radius:100,strength:1},e})(De);/*! - * @pixi/filter-color-map - v4.2.0 - * Compiled Fri, 05 Aug 2022 19:53:35 UTC - * - * @pixi/filter-color-map is licensed under the MIT License. - * http://www.opensource.org/licenses/mit-license - *//*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var Ix=function(t,e){return Ix=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Ix(t,e)};function dye(t,e){Ix(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var pye=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,vye=`varying vec2 vTextureCoord; -uniform sampler2D uSampler; -uniform sampler2D colorMap; -uniform float _mix; -uniform float _size; -uniform float _sliceSize; -uniform float _slicePixelSize; -uniform float _sliceInnerSize; -void main() { - vec4 color = texture2D(uSampler, vTextureCoord.xy); - - vec4 adjusted; - if (color.a > 0.0) { - color.rgb /= color.a; - float innerWidth = _size - 1.0; - float zSlice0 = min(floor(color.b * innerWidth), innerWidth); - float zSlice1 = min(zSlice0 + 1.0, innerWidth); - float xOffset = _slicePixelSize * 0.5 + color.r * _sliceInnerSize; - float s0 = xOffset + (zSlice0 * _sliceSize); - float s1 = xOffset + (zSlice1 * _sliceSize); - float yOffset = _sliceSize * 0.5 + color.g * (1.0 - _sliceSize); - vec4 slice0Color = texture2D(colorMap, vec2(s0,yOffset)); - vec4 slice1Color = texture2D(colorMap, vec2(s1,yOffset)); - float zOffset = fract(color.b * innerWidth); - adjusted = mix(slice0Color, slice1Color, zOffset); - - color.rgb *= color.a; - } - gl_FragColor = vec4(mix(color, adjusted, _mix).rgb, color.a); - -}`;(function(t){dye(e,t);function e(r,n,i){n===void 0&&(n=!1),i===void 0&&(i=1);var a=t.call(this,pye,vye)||this;return a.mix=1,a._size=0,a._sliceSize=0,a._slicePixelSize=0,a._sliceInnerSize=0,a._nearest=!1,a._scaleMode=null,a._colorMap=null,a._scaleMode=null,a.nearest=n,a.mix=i,a.colorMap=r,a}return e.prototype.apply=function(r,n,i,a){this.uniforms._mix=this.mix,r.applyFilter(this,n,i,a)},Object.defineProperty(e.prototype,"colorSize",{get:function(){return this._size},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"colorMap",{get:function(){return this._colorMap},set:function(r){var n;r&&(r instanceof Fe||(r=Fe.from(r)),!((n=r)===null||n===void 0)&&n.baseTexture&&(r.baseTexture.scaleMode=this._scaleMode,r.baseTexture.mipmap=mn.OFF,this._size=r.height,this._sliceSize=1/this._size,this._slicePixelSize=this._sliceSize/this._size,this._sliceInnerSize=this._slicePixelSize*(this._size-1),this.uniforms._size=this._size,this.uniforms._sliceSize=this._sliceSize,this.uniforms._slicePixelSize=this._slicePixelSize,this.uniforms._sliceInnerSize=this._sliceInnerSize,this.uniforms.colorMap=r),this._colorMap=r)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nearest",{get:function(){return this._nearest},set:function(r){this._nearest=r,this._scaleMode=r?Ir.NEAREST:Ir.LINEAR;var n=this._colorMap;n&&n.baseTexture&&(n.baseTexture._glTextures={},n.baseTexture.scaleMode=this._scaleMode,n.baseTexture.mipmap=mn.OFF,n._updateID++,n.baseTexture.emit("update",n.baseTexture))},enumerable:!1,configurable:!0}),e.prototype.updateColorMap=function(){var r=this._colorMap;r&&r.baseTexture&&(r._updateID++,r.baseTexture.emit("update",r.baseTexture),this.colorMap=r)},e.prototype.destroy=function(r){r===void 0&&(r=!1),this._colorMap&&this._colorMap.destroy(r),t.prototype.destroy.call(this)},e})(De);/*! - * @pixi/filter-color-overlay - v4.2.0 - * Compiled Fri, 05 Aug 2022 19:53:35 UTC - * - * @pixi/filter-color-overlay is licensed under the MIT License. - * http://www.opensource.org/licenses/mit-license - *//*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var kx=function(t,e){return kx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},kx(t,e)};function mye(t,e){kx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var gye=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,yye=`varying vec2 vTextureCoord; -uniform sampler2D uSampler; -uniform vec3 color; -uniform float alpha; - -void main(void) { - vec4 currentColor = texture2D(uSampler, vTextureCoord); - gl_FragColor = vec4(mix(currentColor.rgb, color.rgb, currentColor.a * alpha), currentColor.a); -} -`;(function(t){mye(e,t);function e(r,n){r===void 0&&(r=0),n===void 0&&(n=1);var i=t.call(this,gye,yye)||this;return i._color=0,i._alpha=1,i.uniforms.color=new Float32Array(3),i.color=r,i.alpha=n,i}return Object.defineProperty(e.prototype,"color",{get:function(){return this._color},set:function(r){var n=this.uniforms.color;typeof r=="number"?(yr(r,n),this._color=r):(n[0]=r[0],n[1]=r[1],n[2]=r[2],this._color=dn(n))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"alpha",{get:function(){return this._alpha},set:function(r){this.uniforms.alpha=r,this._alpha=r},enumerable:!1,configurable:!0}),e})(De);/*! - * @pixi/filter-color-replace - v4.2.0 - * Compiled Fri, 05 Aug 2022 19:53:35 UTC - * - * @pixi/filter-color-replace is licensed under the MIT License. - * http://www.opensource.org/licenses/mit-license - *//*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var Mx=function(t,e){return Mx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Mx(t,e)};function _ye(t,e){Mx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var xye=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,bye=`varying vec2 vTextureCoord; -uniform sampler2D uSampler; -uniform vec3 originalColor; -uniform vec3 newColor; -uniform float epsilon; -void main(void) { - vec4 currentColor = texture2D(uSampler, vTextureCoord); - vec3 colorDiff = originalColor - (currentColor.rgb / max(currentColor.a, 0.0000000001)); - float colorDistance = length(colorDiff); - float doReplace = step(colorDistance, epsilon); - gl_FragColor = vec4(mix(currentColor.rgb, (newColor + colorDiff) * currentColor.a, doReplace), currentColor.a); -} -`;(function(t){_ye(e,t);function e(r,n,i){r===void 0&&(r=16711680),n===void 0&&(n=0),i===void 0&&(i=.4);var a=t.call(this,xye,bye)||this;return a._originalColor=16711680,a._newColor=0,a.uniforms.originalColor=new Float32Array(3),a.uniforms.newColor=new Float32Array(3),a.originalColor=r,a.newColor=n,a.epsilon=i,a}return Object.defineProperty(e.prototype,"originalColor",{get:function(){return this._originalColor},set:function(r){var n=this.uniforms.originalColor;typeof r=="number"?(yr(r,n),this._originalColor=r):(n[0]=r[0],n[1]=r[1],n[2]=r[2],this._originalColor=dn(n))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"newColor",{get:function(){return this._newColor},set:function(r){var n=this.uniforms.newColor;typeof r=="number"?(yr(r,n),this._newColor=r):(n[0]=r[0],n[1]=r[1],n[2]=r[2],this._newColor=dn(n))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"epsilon",{get:function(){return this.uniforms.epsilon},set:function(r){this.uniforms.epsilon=r},enumerable:!1,configurable:!0}),e})(De);/*! - * @pixi/filter-convolution - v4.2.0 - * Compiled Fri, 05 Aug 2022 19:53:35 UTC - * - * @pixi/filter-convolution is licensed under the MIT License. - * http://www.opensource.org/licenses/mit-license - *//*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var Fx=function(t,e){return Fx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Fx(t,e)};function Sye(t,e){Fx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var wye=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,Eye=`precision mediump float; - -varying mediump vec2 vTextureCoord; - -uniform sampler2D uSampler; -uniform vec2 texelSize; -uniform float matrix[9]; - -void main(void) -{ - vec4 c11 = texture2D(uSampler, vTextureCoord - texelSize); // top left - vec4 c12 = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y - texelSize.y)); // top center - vec4 c13 = texture2D(uSampler, vec2(vTextureCoord.x + texelSize.x, vTextureCoord.y - texelSize.y)); // top right - - vec4 c21 = texture2D(uSampler, vec2(vTextureCoord.x - texelSize.x, vTextureCoord.y)); // mid left - vec4 c22 = texture2D(uSampler, vTextureCoord); // mid center - vec4 c23 = texture2D(uSampler, vec2(vTextureCoord.x + texelSize.x, vTextureCoord.y)); // mid right - - vec4 c31 = texture2D(uSampler, vec2(vTextureCoord.x - texelSize.x, vTextureCoord.y + texelSize.y)); // bottom left - vec4 c32 = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y + texelSize.y)); // bottom center - vec4 c33 = texture2D(uSampler, vTextureCoord + texelSize); // bottom right - - gl_FragColor = - c11 * matrix[0] + c12 * matrix[1] + c13 * matrix[2] + - c21 * matrix[3] + c22 * matrix[4] + c23 * matrix[5] + - c31 * matrix[6] + c32 * matrix[7] + c33 * matrix[8]; - - gl_FragColor.a = c22.a; -} -`;(function(t){Sye(e,t);function e(r,n,i){n===void 0&&(n=200),i===void 0&&(i=200);var a=t.call(this,wye,Eye)||this;return a.uniforms.texelSize=new Float32Array(2),a.uniforms.matrix=new Float32Array(9),r!==void 0&&(a.matrix=r),a.width=n,a.height=i,a}return Object.defineProperty(e.prototype,"matrix",{get:function(){return this.uniforms.matrix},set:function(r){var n=this;r.forEach(function(i,a){n.uniforms.matrix[a]=i})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return 1/this.uniforms.texelSize[0]},set:function(r){this.uniforms.texelSize[0]=1/r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return 1/this.uniforms.texelSize[1]},set:function(r){this.uniforms.texelSize[1]=1/r},enumerable:!1,configurable:!0}),e})(De);/*! - * @pixi/filter-cross-hatch - v4.2.0 - * Compiled Fri, 05 Aug 2022 19:53:35 UTC - * - * @pixi/filter-cross-hatch is licensed under the MIT License. - * http://www.opensource.org/licenses/mit-license - *//*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var Nx=function(t,e){return Nx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Nx(t,e)};function Tye(t,e){Nx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Aye=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,Cye=`precision mediump float; - -varying vec2 vTextureCoord; - -uniform sampler2D uSampler; - -void main(void) -{ - float lum = length(texture2D(uSampler, vTextureCoord.xy).rgb); - - gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0); - - if (lum < 1.00) - { - if (mod(gl_FragCoord.x + gl_FragCoord.y, 10.0) == 0.0) - { - gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0); - } - } - - if (lum < 0.75) - { - if (mod(gl_FragCoord.x - gl_FragCoord.y, 10.0) == 0.0) - { - gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0); - } - } - - if (lum < 0.50) - { - if (mod(gl_FragCoord.x + gl_FragCoord.y - 5.0, 10.0) == 0.0) - { - gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0); - } - } - - if (lum < 0.3) - { - if (mod(gl_FragCoord.x - gl_FragCoord.y - 5.0, 10.0) == 0.0) - { - gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0); - } - } -} -`;(function(t){Tye(e,t);function e(){return t.call(this,Aye,Cye)||this}return e})(De);/*! - * @pixi/filter-crt - v4.2.0 - * Compiled Fri, 05 Aug 2022 19:53:35 UTC - * - * @pixi/filter-crt is licensed under the MIT License. - * http://www.opensource.org/licenses/mit-license - *//*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var Lx=function(t,e){return Lx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Lx(t,e)};function Pye(t,e){Lx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Oye=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,Rye=`varying vec2 vTextureCoord; -uniform sampler2D uSampler; - -uniform vec4 filterArea; -uniform vec2 dimensions; - -const float SQRT_2 = 1.414213; - -const float light = 1.0; - -uniform float curvature; -uniform float lineWidth; -uniform float lineContrast; -uniform bool verticalLine; -uniform float noise; -uniform float noiseSize; - -uniform float vignetting; -uniform float vignettingAlpha; -uniform float vignettingBlur; - -uniform float seed; -uniform float time; - -float rand(vec2 co) { - return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453); -} - -void main(void) -{ - vec2 pixelCoord = vTextureCoord.xy * filterArea.xy; - vec2 dir = vec2(vTextureCoord.xy * filterArea.xy / dimensions - vec2(0.5, 0.5)); - - gl_FragColor = texture2D(uSampler, vTextureCoord); - vec3 rgb = gl_FragColor.rgb; - - if (noise > 0.0 && noiseSize > 0.0) - { - pixelCoord.x = floor(pixelCoord.x / noiseSize); - pixelCoord.y = floor(pixelCoord.y / noiseSize); - float _noise = rand(pixelCoord * noiseSize * seed) - 0.5; - rgb += _noise * noise; - } - - if (lineWidth > 0.0) - { - float _c = curvature > 0. ? curvature : 1.; - float k = curvature > 0. ?(length(dir * dir) * 0.25 * _c * _c + 0.935 * _c) : 1.; - vec2 uv = dir * k; - - float v = (verticalLine ? uv.x * dimensions.x : uv.y * dimensions.y) * min(1.0, 2.0 / lineWidth ) / _c; - float j = 1. + cos(v * 1.2 - time) * 0.5 * lineContrast; - rgb *= j; - float segment = verticalLine ? mod((dir.x + .5) * dimensions.x, 4.) : mod((dir.y + .5) * dimensions.y, 4.); - rgb *= 0.99 + ceil(segment) * 0.015; - } - - if (vignetting > 0.0) - { - float outter = SQRT_2 - vignetting * SQRT_2; - float darker = clamp((outter - length(dir) * SQRT_2) / ( 0.00001 + vignettingBlur * SQRT_2), 0.0, 1.0); - rgb *= darker + (1.0 - darker) * (1.0 - vignettingAlpha); - } - - gl_FragColor.rgb = rgb; -} -`;(function(t){Pye(e,t);function e(r){var n=t.call(this,Oye,Rye)||this;return n.time=0,n.seed=0,n.uniforms.dimensions=new Float32Array(2),Object.assign(n,e.defaults,r),n}return e.prototype.apply=function(r,n,i,a){var o=n.filterFrame,s=o.width,u=o.height;this.uniforms.dimensions[0]=s,this.uniforms.dimensions[1]=u,this.uniforms.seed=this.seed,this.uniforms.time=this.time,r.applyFilter(this,n,i,a)},Object.defineProperty(e.prototype,"curvature",{get:function(){return this.uniforms.curvature},set:function(r){this.uniforms.curvature=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lineWidth",{get:function(){return this.uniforms.lineWidth},set:function(r){this.uniforms.lineWidth=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lineContrast",{get:function(){return this.uniforms.lineContrast},set:function(r){this.uniforms.lineContrast=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"verticalLine",{get:function(){return this.uniforms.verticalLine},set:function(r){this.uniforms.verticalLine=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"noise",{get:function(){return this.uniforms.noise},set:function(r){this.uniforms.noise=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"noiseSize",{get:function(){return this.uniforms.noiseSize},set:function(r){this.uniforms.noiseSize=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"vignetting",{get:function(){return this.uniforms.vignetting},set:function(r){this.uniforms.vignetting=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"vignettingAlpha",{get:function(){return this.uniforms.vignettingAlpha},set:function(r){this.uniforms.vignettingAlpha=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"vignettingBlur",{get:function(){return this.uniforms.vignettingBlur},set:function(r){this.uniforms.vignettingBlur=r},enumerable:!1,configurable:!0}),e.defaults={curvature:1,lineWidth:1,lineContrast:.25,verticalLine:!1,noise:0,noiseSize:1,seed:0,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3,time:0},e})(De);/*! - * @pixi/filter-drop-shadow - v4.2.0 - * Compiled Fri, 05 Aug 2022 19:53:35 UTC - * - * @pixi/filter-drop-shadow is licensed under the MIT License. - * http://www.opensource.org/licenses/mit-license - *//*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var Dx=function(t,e){return Dx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Dx(t,e)};function Iye(t,e){Dx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Cp=function(){return Cp=Object.assign||function(e){for(var r=arguments,n,i=1,a=arguments.length;i>0)+1},Object.defineProperty(e.prototype,"offset",{get:function(){return this.uniforms.uOffset},set:function(r){this.uniforms.uOffset=r},enumerable:!1,configurable:!0}),e})(De);/*! - * @pixi/filter-multi-color-replace - v4.2.0 - * Compiled Fri, 05 Aug 2022 19:53:35 UTC - * - * @pixi/filter-multi-color-replace is licensed under the MIT License. - * http://www.opensource.org/licenses/mit-license - *//*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var $x=function(t,e){return $x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},$x(t,e)};function Gye(t,e){$x(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Xye=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,zye=`varying vec2 vTextureCoord; -uniform sampler2D uSampler; - -uniform float epsilon; - -const int MAX_COLORS = %maxColors%; - -uniform vec3 originalColors[MAX_COLORS]; -uniform vec3 targetColors[MAX_COLORS]; - -void main(void) -{ - gl_FragColor = texture2D(uSampler, vTextureCoord); - - float alpha = gl_FragColor.a; - if (alpha < 0.0001) - { - return; - } - - vec3 color = gl_FragColor.rgb / alpha; - - for(int i = 0; i < MAX_COLORS; i++) - { - vec3 origColor = originalColors[i]; - if (origColor.r < 0.0) - { - break; - } - vec3 colorDiff = origColor - color; - if (length(colorDiff) < epsilon) - { - vec3 targetColor = targetColors[i]; - gl_FragColor = vec4((targetColor + colorDiff) * alpha, alpha); - return; - } - } -} -`;(function(t){Gye(e,t);function e(r,n,i){n===void 0&&(n=.05),i===void 0&&(i=r.length);var a=t.call(this,Xye,zye.replace(/%maxColors%/g,i.toFixed(0)))||this;return a._replacements=[],a._maxColors=0,a.epsilon=n,a._maxColors=i,a.uniforms.originalColors=new Float32Array(i*3),a.uniforms.targetColors=new Float32Array(i*3),a.replacements=r,a}return Object.defineProperty(e.prototype,"replacements",{get:function(){return this._replacements},set:function(r){var n=this.uniforms.originalColors,i=this.uniforms.targetColors,a=r.length;if(a>this._maxColors)throw new Error("Length of replacements ("+a+") exceeds the maximum colors length ("+this._maxColors+")");n[a*3]=-1;for(var o=0;o= 0.0 && dist > radius) { - float delta = dist - radius; - float gap = gradient; - float scale = 1.0 - abs(delta / gap); - if (scale <= 0.0) { - gl_FragColor = color; - return; - } - radianStep *= scale; - } - radianStep /= float(k); - - float s = sin(radianStep); - float c = cos(radianStep); - mat2 rotationMatrix = mat2(vec2(c, -s), vec2(s, c)); - - for(int i = 0; i < MAX_KERNEL_SIZE - 1; i++) { - if (i == k) { - break; - } - - coord -= center; - coord.y *= aspect; - coord = rotationMatrix * coord; - coord.y /= aspect; - coord += center; - - vec4 sample = texture2D(uSampler, coord); - - // switch to pre-multiplied alpha to correctly blur transparent images - // sample.rgb *= sample.a; - - color += sample; - } - - gl_FragColor = color / float(uKernelSize); -} -`;(function(t){Qye(e,t);function e(r,n,i,a){r===void 0&&(r=0),n===void 0&&(n=[0,0]),i===void 0&&(i=5),a===void 0&&(a=-1);var o=t.call(this,Jye,e0e)||this;return o._angle=0,o.angle=r,o.center=n,o.kernelSize=i,o.radius=a,o}return e.prototype.apply=function(r,n,i,a){this.uniforms.uKernelSize=this._angle!==0?this.kernelSize:0,r.applyFilter(this,n,i,a)},Object.defineProperty(e.prototype,"angle",{get:function(){return this._angle},set:function(r){this._angle=r,this.uniforms.uRadian=r*Math.PI/180},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"center",{get:function(){return this.uniforms.uCenter},set:function(r){this.uniforms.uCenter=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"radius",{get:function(){return this.uniforms.uRadius},set:function(r){(r<0||r===1/0)&&(r=-1),this.uniforms.uRadius=r},enumerable:!1,configurable:!0}),e})(De);/*! - * @pixi/filter-shockwave - v4.2.0 - * Compiled Fri, 05 Aug 2022 19:53:35 UTC - * - * @pixi/filter-shockwave is licensed under the MIT License. - * http://www.opensource.org/licenses/mit-license - *//*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var zx=function(t,e){return zx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},zx(t,e)};function t0e(t,e){zx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var r0e=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,n0e=`varying vec2 vTextureCoord; -uniform sampler2D uSampler; -uniform vec4 filterArea; -uniform vec4 filterClamp; - -uniform vec2 center; - -uniform float amplitude; -uniform float wavelength; -// uniform float power; -uniform float brightness; -uniform float speed; -uniform float radius; - -uniform float time; - -const float PI = 3.14159; - -void main() -{ - float halfWavelength = wavelength * 0.5 / filterArea.x; - float maxRadius = radius / filterArea.x; - float currentRadius = time * speed / filterArea.x; - - float fade = 1.0; - - if (maxRadius > 0.0) { - if (currentRadius > maxRadius) { - gl_FragColor = texture2D(uSampler, vTextureCoord); - return; - } - fade = 1.0 - pow(currentRadius / maxRadius, 2.0); - } - - vec2 dir = vec2(vTextureCoord - center / filterArea.xy); - dir.y *= filterArea.y / filterArea.x; - float dist = length(dir); - - if (dist <= 0.0 || dist < currentRadius - halfWavelength || dist > currentRadius + halfWavelength) { - gl_FragColor = texture2D(uSampler, vTextureCoord); - return; - } - - vec2 diffUV = normalize(dir); - - float diff = (dist - currentRadius) / halfWavelength; - - float p = 1.0 - pow(abs(diff), 2.0); - - // float powDiff = diff * pow(p, 2.0) * ( amplitude * fade ); - float powDiff = 1.25 * sin(diff * PI) * p * ( amplitude * fade ); - - vec2 offset = diffUV * powDiff / filterArea.xy; - - // Do clamp : - vec2 coord = vTextureCoord + offset; - vec2 clampedCoord = clamp(coord, filterClamp.xy, filterClamp.zw); - vec4 color = texture2D(uSampler, clampedCoord); - if (coord != clampedCoord) { - color *= max(0.0, 1.0 - length(coord - clampedCoord)); - } - - // No clamp : - // gl_FragColor = texture2D(uSampler, vTextureCoord + offset); - - color.rgb *= 1.0 + (brightness - 1.0) * p * fade; - - gl_FragColor = color; -} -`,i0e=function(t){t0e(e,t);function e(r,n,i){r===void 0&&(r=[0,0]),i===void 0&&(i=0);var a=t.call(this,r0e,n0e)||this;return a.center=r,Object.assign(a,e.defaults,n),a.time=i,a}return e.prototype.apply=function(r,n,i,a){this.uniforms.time=this.time,r.applyFilter(this,n,i,a)},Object.defineProperty(e.prototype,"center",{get:function(){return this.uniforms.center},set:function(r){this.uniforms.center=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"amplitude",{get:function(){return this.uniforms.amplitude},set:function(r){this.uniforms.amplitude=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"wavelength",{get:function(){return this.uniforms.wavelength},set:function(r){this.uniforms.wavelength=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"brightness",{get:function(){return this.uniforms.brightness},set:function(r){this.uniforms.brightness=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"speed",{get:function(){return this.uniforms.speed},set:function(r){this.uniforms.speed=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"radius",{get:function(){return this.uniforms.radius},set:function(r){this.uniforms.radius=r},enumerable:!1,configurable:!0}),e.defaults={amplitude:30,wavelength:160,brightness:1,speed:500,radius:-1},e}(De);/*! - * @pixi/filter-simple-lightmap - v4.2.0 - * Compiled Fri, 05 Aug 2022 19:53:35 UTC - * - * @pixi/filter-simple-lightmap is licensed under the MIT License. - * http://www.opensource.org/licenses/mit-license - *//*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var Wx=function(t,e){return Wx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Wx(t,e)};function a0e(t,e){Wx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var o0e=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,s0e=`varying vec2 vTextureCoord; -uniform sampler2D uSampler; -uniform sampler2D uLightmap; -uniform vec4 filterArea; -uniform vec2 dimensions; -uniform vec4 ambientColor; -void main() { - vec4 diffuseColor = texture2D(uSampler, vTextureCoord); - vec2 lightCoord = (vTextureCoord * filterArea.xy) / dimensions; - vec4 light = texture2D(uLightmap, lightCoord); - vec3 ambient = ambientColor.rgb * ambientColor.a; - vec3 intensity = ambient + light.rgb; - vec3 finalColor = diffuseColor.rgb * intensity; - gl_FragColor = vec4(finalColor, diffuseColor.a); -} -`;(function(t){a0e(e,t);function e(r,n,i){n===void 0&&(n=0),i===void 0&&(i=1);var a=t.call(this,o0e,s0e)||this;return a._color=0,a.uniforms.dimensions=new Float32Array(2),a.uniforms.ambientColor=new Float32Array([0,0,0,i]),a.texture=r,a.color=n,a}return e.prototype.apply=function(r,n,i,a){var o,s;this.uniforms.dimensions[0]=(o=n.filterFrame)===null||o===void 0?void 0:o.width,this.uniforms.dimensions[1]=(s=n.filterFrame)===null||s===void 0?void 0:s.height,r.applyFilter(this,n,i,a)},Object.defineProperty(e.prototype,"texture",{get:function(){return this.uniforms.uLightmap},set:function(r){this.uniforms.uLightmap=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){return this._color},set:function(r){var n=this.uniforms.ambientColor;typeof r=="number"?(yr(r,n),this._color=r):(n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],this._color=dn(n))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"alpha",{get:function(){return this.uniforms.ambientColor[3]},set:function(r){this.uniforms.ambientColor[3]=r},enumerable:!1,configurable:!0}),e})(De);/*! - * @pixi/filter-tilt-shift - v4.2.0 - * Compiled Fri, 05 Aug 2022 19:53:35 UTC - * - * @pixi/filter-tilt-shift is licensed under the MIT License. - * http://www.opensource.org/licenses/mit-license - *//*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var Yx=function(t,e){return Yx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Yx(t,e)};function fm(t,e){Yx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var l0e=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,u0e=`varying vec2 vTextureCoord; - -uniform sampler2D uSampler; -uniform float blur; -uniform float gradientBlur; -uniform vec2 start; -uniform vec2 end; -uniform vec2 delta; -uniform vec2 texSize; - -float random(vec3 scale, float seed) -{ - return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed); -} - -void main(void) -{ - vec4 color = vec4(0.0); - float total = 0.0; - - float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0); - vec2 normal = normalize(vec2(start.y - end.y, end.x - start.x)); - float radius = smoothstep(0.0, 1.0, abs(dot(vTextureCoord * texSize - start, normal)) / gradientBlur) * blur; - - for (float t = -30.0; t <= 30.0; t++) - { - float percent = (t + offset - 0.5) / 30.0; - float weight = 1.0 - abs(percent); - vec4 sample = texture2D(uSampler, vTextureCoord + delta / texSize * percent * radius); - sample.rgb *= sample.a; - color += sample * weight; - total += weight; - } - - color /= total; - color.rgb /= color.a + 0.00001; - - gl_FragColor = color; -} -`,HD=function(t){fm(e,t);function e(r,n,i,a){r===void 0&&(r=100),n===void 0&&(n=600);var o=t.call(this,l0e,u0e)||this;return o.uniforms.blur=r,o.uniforms.gradientBlur=n,o.uniforms.start=i||new We(0,window.innerHeight/2),o.uniforms.end=a||new We(600,window.innerHeight/2),o.uniforms.delta=new We(30,30),o.uniforms.texSize=new We(window.innerWidth,window.innerHeight),o.updateDelta(),o}return e.prototype.updateDelta=function(){this.uniforms.delta.x=0,this.uniforms.delta.y=0},Object.defineProperty(e.prototype,"blur",{get:function(){return this.uniforms.blur},set:function(r){this.uniforms.blur=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"gradientBlur",{get:function(){return this.uniforms.gradientBlur},set:function(r){this.uniforms.gradientBlur=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"start",{get:function(){return this.uniforms.start},set:function(r){this.uniforms.start=r,this.updateDelta()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"end",{get:function(){return this.uniforms.end},set:function(r){this.uniforms.end=r,this.updateDelta()},enumerable:!1,configurable:!0}),e}(De),c0e=function(t){fm(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.updateDelta=function(){var r=this.uniforms.end.x-this.uniforms.start.x,n=this.uniforms.end.y-this.uniforms.start.y,i=Math.sqrt(r*r+n*n);this.uniforms.delta.x=r/i,this.uniforms.delta.y=n/i},e}(HD),f0e=function(t){fm(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.updateDelta=function(){var r=this.uniforms.end.x-this.uniforms.start.x,n=this.uniforms.end.y-this.uniforms.start.y,i=Math.sqrt(r*r+n*n);this.uniforms.delta.x=-n/i,this.uniforms.delta.y=r/i},e}(HD);(function(t){fm(e,t);function e(r,n,i,a){r===void 0&&(r=100),n===void 0&&(n=600);var o=t.call(this)||this;return o.tiltShiftXFilter=new c0e(r,n,i,a),o.tiltShiftYFilter=new f0e(r,n,i,a),o}return e.prototype.apply=function(r,n,i,a){var o=r.getFilterTexture();this.tiltShiftXFilter.apply(r,n,o,1),this.tiltShiftYFilter.apply(r,o,i,a),r.returnFilterTexture(o)},Object.defineProperty(e.prototype,"blur",{get:function(){return this.tiltShiftXFilter.blur},set:function(r){this.tiltShiftXFilter.blur=this.tiltShiftYFilter.blur=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"gradientBlur",{get:function(){return this.tiltShiftXFilter.gradientBlur},set:function(r){this.tiltShiftXFilter.gradientBlur=this.tiltShiftYFilter.gradientBlur=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"start",{get:function(){return this.tiltShiftXFilter.start},set:function(r){this.tiltShiftXFilter.start=this.tiltShiftYFilter.start=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"end",{get:function(){return this.tiltShiftXFilter.end},set:function(r){this.tiltShiftXFilter.end=this.tiltShiftYFilter.end=r},enumerable:!1,configurable:!0}),e})(De);/*! - * @pixi/filter-twist - v4.2.0 - * Compiled Fri, 05 Aug 2022 19:53:35 UTC - * - * @pixi/filter-twist is licensed under the MIT License. - * http://www.opensource.org/licenses/mit-license - *//*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var Hx=function(t,e){return Hx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Hx(t,e)};function h0e(t,e){Hx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var d0e=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,p0e=`varying vec2 vTextureCoord; - -uniform sampler2D uSampler; -uniform float radius; -uniform float angle; -uniform vec2 offset; -uniform vec4 filterArea; - -vec2 mapCoord( vec2 coord ) -{ - coord *= filterArea.xy; - coord += filterArea.zw; - - return coord; -} - -vec2 unmapCoord( vec2 coord ) -{ - coord -= filterArea.zw; - coord /= filterArea.xy; - - return coord; -} - -vec2 twist(vec2 coord) -{ - coord -= offset; - - float dist = length(coord); - - if (dist < radius) - { - float ratioDist = (radius - dist) / radius; - float angleMod = ratioDist * ratioDist * angle; - float s = sin(angleMod); - float c = cos(angleMod); - coord = vec2(coord.x * c - coord.y * s, coord.x * s + coord.y * c); - } - - coord += offset; - - return coord; -} - -void main(void) -{ - - vec2 coord = mapCoord(vTextureCoord); - - coord = twist(coord); - - coord = unmapCoord(coord); - - gl_FragColor = texture2D(uSampler, coord ); - -} -`;(function(t){h0e(e,t);function e(r){var n=t.call(this,d0e,p0e)||this;return Object.assign(n,e.defaults,r),n}return Object.defineProperty(e.prototype,"offset",{get:function(){return this.uniforms.offset},set:function(r){this.uniforms.offset=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"radius",{get:function(){return this.uniforms.radius},set:function(r){this.uniforms.radius=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"angle",{get:function(){return this.uniforms.angle},set:function(r){this.uniforms.angle=r},enumerable:!1,configurable:!0}),e.defaults={radius:200,angle:4,padding:20,offset:new We},e})(De);/*! - * @pixi/filter-zoom-blur - v4.2.0 - * Compiled Fri, 05 Aug 2022 19:53:35 UTC - * - * @pixi/filter-zoom-blur is licensed under the MIT License. - * http://www.opensource.org/licenses/mit-license - *//*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var qx=function(t,e){return qx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},qx(t,e)};function v0e(t,e){qx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function m0e(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i= 0.0 && dist > radius) { // radius < 0 means it's infinity - delta = dist - radius; - gap = gradient; - } - - if (delta > 0.0) { - float normalCount = gap / filterArea.x; - delta = (normalCount - delta) / normalCount; - countLimit *= delta; - strength *= delta; - if (countLimit < 1.0) - { - gl_FragColor = texture2D(uSampler, vTextureCoord); - return; - } - } - - // randomize the lookup values to hide the fixed number of samples - float offset = rand(vTextureCoord, 0.0); - - float total = 0.0; - vec4 color = vec4(0.0); - - dir *= strength; - - for (float t = 0.0; t < MAX_KERNEL_SIZE; t++) { - float percent = (t + offset) / MAX_KERNEL_SIZE; - float weight = 4.0 * (percent - percent * percent); - vec2 p = vTextureCoord + dir * percent; - vec4 sample = texture2D(uSampler, p); - - // switch to pre-multiplied alpha to correctly blur transparent images - // sample.rgb *= sample.a; - - color += sample * weight; - total += weight; - - if (t > countLimit){ - break; - } - } - - color /= total; - // switch back from pre-multiplied alpha - // color.rgb /= color.a + 0.00001; - - gl_FragColor = color; -} -`;(function(t){v0e(e,t);function e(r){var n=this,i=Object.assign(e.defaults,r),a=i.maxKernelSize,o=m0e(i,["maxKernelSize"]);return n=t.call(this,g0e,y0e.replace("${maxKernelSize}",a.toFixed(1)))||this,Object.assign(n,o),n}return Object.defineProperty(e.prototype,"center",{get:function(){return this.uniforms.uCenter},set:function(r){this.uniforms.uCenter=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"strength",{get:function(){return this.uniforms.uStrength},set:function(r){this.uniforms.uStrength=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"innerRadius",{get:function(){return this.uniforms.uInnerRadius},set:function(r){this.uniforms.uInnerRadius=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"radius",{get:function(){return this.uniforms.uRadius},set:function(r){(r<0||r===1/0)&&(r=-1),this.uniforms.uRadius=r},enumerable:!1,configurable:!0}),e.defaults={strength:.1,center:[0,0],innerRadius:0,radius:-1,maxKernelSize:32},e})(De);const Kx="shockwaveFilter";function _0e(t,e){const r=t.containerFilters.get(Kx);if(r)return r;if(e){const n=new i0e([1280,720]);return n.time=0,t.addFilter(n),t.containerFilters.set(Kx,n),n}}function x0e(t){return t.getOrCreateShockwaveFilter(!1)?t.getOrCreateShockwaveFilter().time:0}function b0e(t,e){if(e===0)t.removeFilter(Kx);else{const r=t.getOrCreateShockwaveFilter();r&&(r.time=e)}}const Zx=0,Qx="radiusAlphaFilter";class S0e extends De{constructor(e,r){const n=` -// 半径透明度的fragment shader -precision mediump float; - -uniform sampler2D uSampler; // 输入纹理 -varying vec2 vTextureCoord; // 当前片元的纹理坐标 -uniform vec2 center; // 圆心坐标 -uniform float radius; // 圆的半径 - -void main(void) { - vec4 color = texture2D(uSampler, vTextureCoord); - - // 计算屏幕宽高比 - float aspect = 16.0 / 9.0; - - // 根据宽高比校正纹理坐标 - vec2 aspectCorrectCoord = vTextureCoord; - aspectCorrectCoord.x *= aspect; - - // 计算片元到圆心的距离 - float dist = distance(aspectCorrectCoord, center * vec2(aspect, 1.0)); - - // 使用smoothstep函数计算alpha值,实现边缘羽化效果 - float alpha = smoothstep(radius, radius + 0.05, dist); - - // 输出最终颜色 - gl_FragColor = color * (1.0 - alpha); -} - `;super(null,n),this.uniforms.center=[e.x,e.y],this.uniforms.radius=r}set center(e){this.uniforms.center=[e.x,e.y]}get center(){return new We(this.uniforms.center[0],this.uniforms.center[1])}set radius(e){this.uniforms.radius=e}get radius(){return this.uniforms.radius}}function w0e(t,e){const r=t.containerFilters.get(Qx);if(r)return r;if(e){const n=new S0e(new We(.5,.5),Zx);return n.radius=Zx,t.addFilter(n),t.containerFilters.set(Qx,n),n}}function E0e(t){return t.getOrCreateShockwaveFilter(!1)?t.getOrCreateRadiusAlphaFilter().radius:Zx}function T0e(t,e){if(e===0)t.removeFilter(Qx);else{const r=t.getOrCreateRadiusAlphaFilter();r&&(r.radius=e)}}class Hh extends gr{constructor(){super();Ae(this,"containerFilters",new Map);Ae(this,"baseX",0);Ae(this,"baseY",0);Ae(this,"alphaFilter",new gx.AlphaFilter(1));this.addFilter(this.alphaFilter)}get alphaFilterVal(){return this.alphaFilter.alpha}set alphaFilterVal(r){this.alphaFilter.alpha=r}addFilter(r){this.filters?this.filters.push(r):this.filters=[r]}removeFilter(r){const n=this.containerFilters.get(r);if(n){const i=((this==null?void 0:this.filters)??[]).findIndex(a=>a===n);this.filters&&(this.filters.splice(i,1),this.containerFilters.delete(r))}}get blur(){return this.getOrCreateBlurFilter().blur}set blur(r){this.getOrCreateBlurFilter().blur=r}get x(){var n;return(((n=super.position)==null?void 0:n.x)??0)-this.baseX}set x(r){super.position&&(super.position.x=r+this.baseX)}get y(){var n;return(((n=super.position)==null?void 0:n.y)??0)-this.baseY}set y(r){super.position&&(super.position.y=r+this.baseY)}setBaseX(r){const n=this.x;this.baseX=r,this.x=n}setBaseY(r){const n=this.y;this.baseY=r,this.y=n}getOrCreateBlurFilter(){const r=this.containerFilters.get("blur");if(r)return r;{const n=new gx.BlurFilter;return n.blur=0,this.addFilter(n),this.containerFilters.set("blur",n),n}}getOrCreateOldFilmFilter(r=!0){const n=this.containerFilters.get("oldFilm");if(n)return n;if(r){const i=new Tge;return this.addFilter(i),this.containerFilters.set("oldFilm",i),i}else return null}get oldFilm(){return this.getOrCreateOldFilmFilter(!1)?1:0}set oldFilm(r){r===0?this.removeFilter("oldFilm"):this.getOrCreateOldFilmFilter()}getOrCreateDotFilter(r=!0){const n=this.containerFilters.get("dotFilm");if(n)return n;if(r){const i=new Oge;return this.addFilter(i),this.containerFilters.set("dotFilm",i),i}else return null}get dotFilm(){return this.getOrCreateDotFilter(!1)?1:0}set dotFilm(r){r===0?this.removeFilter("dotFilm"):this.getOrCreateDotFilter()}getOrCreateReflectionFilter(r=!0){const n=this.containerFilters.get("reflectionFilm");if(n)return n;if(r){const i=new Mge;return this.addFilter(i),this.containerFilters.set("reflectionFilm",i),i}else return null}get reflectionFilm(){return this.getOrCreateReflectionFilter(!1)?1:0}set reflectionFilm(r){r===0?this.removeFilter("reflectionFilm"):this.getOrCreateReflectionFilter()}getOrCreateGlitchFilter(r=!0){const n=this.containerFilters.get("glitchFilm");if(n)return n;if(r){const i=new Dge;return this.addFilter(i),this.containerFilters.set("glitchFilm",i),i}else return null}get glitchFilm(){return this.getOrCreateGlitchFilter(!1)?1:0}set glitchFilm(r){r===0?this.removeFilter("glitchFilm"):this.getOrCreateGlitchFilter()}getOrCreateRGBSplitFilter(r=!0){const n=this.containerFilters.get("rgbFilm");if(n)return n;if(r){const i=new $ge;return this.addFilter(i),this.containerFilters.set("rgbFilm",i),i}}get rgbFilm(){return this.getOrCreateRGBSplitFilter(!1)?1:0}set rgbFilm(r){r===0?this.removeFilter("rgbFilm"):this.getOrCreateRGBSplitFilter()}getOrCreateGodrayFilter(r=!0){const n=this.containerFilters.get("godrayFilm");if(n)return n;if(r){const i=new Wge;return this.addFilter(i),this.containerFilters.set("godrayFilm",i),i}}get godrayFilm(){return this.getOrCreateGodrayFilter(!1)?1:0}set godrayFilm(r){r===0?this.removeFilter("godrayFilm"):this.getOrCreateGodrayFilter()}getOrCreateShockwaveFilter(r=!0){return _0e(this,r)}get shockwaveFilter(){return x0e(this)}set shockwaveFilter(r){b0e(this,r)}getOrCreateRadiusAlphaFilter(r=!0){return w0e(this,r)}get radiusAlphaFilter(){return E0e(this)}set radiusAlphaFilter(r){T0e(this,r)}}var $e;(function(t){t[t.Region=0]="Region",t[t.BoundingBox=1]="BoundingBox",t[t.Mesh=2]="Mesh",t[t.LinkedMesh=3]="LinkedMesh",t[t.Path=4]="Path",t[t.Point=5]="Point",t[t.Clipping=6]="Clipping"})($e||($e={}));var Pp=function(){function t(e,r,n,i){r===void 0&&(r=new Array),n===void 0&&(n=0),i===void 0&&(i=new DataView(e.buffer)),this.strings=r,this.index=n,this.buffer=i}return t.prototype.readByte=function(){return this.buffer.getInt8(this.index++)},t.prototype.readUnsignedByte=function(){return this.buffer.getUint8(this.index++)},t.prototype.readShort=function(){var e=this.buffer.getInt16(this.index);return this.index+=2,e},t.prototype.readInt32=function(){var e=this.buffer.getInt32(this.index);return this.index+=4,e},t.prototype.readInt=function(e){var r=this.readByte(),n=r&127;return r&128&&(r=this.readByte(),n|=(r&127)<<7,r&128&&(r=this.readByte(),n|=(r&127)<<14,r&128&&(r=this.readByte(),n|=(r&127)<<21,r&128&&(r=this.readByte(),n|=(r&127)<<28)))),e?n:n>>>1^-(n&1)},t.prototype.readStringRef=function(){var e=this.readInt(!0);return e==0?null:this.strings[e-1]},t.prototype.readString=function(){var e=this.readInt(!0);switch(e){case 0:return null;case 1:return""}e--;for(var r="",n=0;n>4){case 12:case 13:r+=String.fromCharCode((i&31)<<6|this.readByte()&63),n+=2;break;case 14:r+=String.fromCharCode((i&15)<<12|(this.readByte()&63)<<6|this.readByte()&63),n+=3;break;default:r+=String.fromCharCode(i),n++}}return r},t.prototype.readFloat=function(){var e=this.buffer.getFloat32(this.index);return this.index+=4,e},t.prototype.readBoolean=function(){return this.readByte()!=0},t}(),R;(function(t){t[t.setup=0]="setup",t[t.first=1]="first",t[t.replace=2]="replace",t[t.add=3]="add"})(R||(R={}));var je;(function(t){t[t.mixIn=0]="mixIn",t[t.mixOut=1]="mixOut"})(je||(je={}));var Mt;(function(t){t[t.Fixed=0]="Fixed",t[t.Percent=1]="Percent"})(Mt||(Mt={}));var Wt;(function(t){t[t.Tangent=0]="Tangent",t[t.Chain=1]="Chain",t[t.ChainScale=2]="ChainScale"})(Wt||(Wt={}));var Ne;(function(t){t[t.Normal=0]="Normal",t[t.OnlyTranslation=1]="OnlyTranslation",t[t.NoRotationOrReflection=2]="NoRotationOrReflection",t[t.NoScale=3]="NoScale",t[t.NoScaleOrReflection=4]="NoScaleOrReflection"})(Ne||(Ne={}));/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var Jx=function(t,e){return Jx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Jx(t,e)};function Su(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Jx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function hO(t){switch(t.toLowerCase()){case"nearest":return cn.Nearest;case"linear":return cn.Linear;case"mipmap":return cn.MipMap;case"mipmapnearestnearest":return cn.MipMapNearestNearest;case"mipmaplinearnearest":return cn.MipMapLinearNearest;case"mipmapnearestlinear":return cn.MipMapNearestLinear;case"mipmaplinearlinear":return cn.MipMapLinearLinear;default:throw new Error("Unknown texture filter "+t)}}var cn;(function(t){t[t.Nearest=9728]="Nearest",t[t.Linear=9729]="Linear",t[t.MipMap=9987]="MipMap",t[t.MipMapNearestNearest=9984]="MipMapNearestNearest",t[t.MipMapLinearNearest=9985]="MipMapLinearNearest",t[t.MipMapNearestLinear=9986]="MipMapNearestLinear",t[t.MipMapLinearLinear=9987]="MipMapLinearLinear"})(cn||(cn={}));var no;(function(t){t[t.MirroredRepeat=33648]="MirroredRepeat",t[t.ClampToEdge=33071]="ClampToEdge",t[t.Repeat=10497]="Repeat"})(no||(no={}));var e1=function(){function t(){this.size=null,this.names=null,this.values=null,this.renderObject=null}return Object.defineProperty(t.prototype,"width",{get:function(){var e=this.texture;return e.trim?e.trim.width:e.orig.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){var e=this.texture;return e.trim?e.trim.height:e.orig.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"u",{get:function(){return this.texture._uvs.x0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"v",{get:function(){return this.texture._uvs.y0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"u2",{get:function(){return this.texture._uvs.x2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"v2",{get:function(){return this.texture._uvs.y2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"offsetX",{get:function(){var e=this.texture;return e.trim?e.trim.x:0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"offsetY",{get:function(){return this.spineOffsetY},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pixiOffsetY",{get:function(){var e=this.texture;return e.trim?e.trim.y:0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"spineOffsetY",{get:function(){var e=this.texture;return this.originalHeight-this.height-(e.trim?e.trim.y:0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"originalWidth",{get:function(){return this.texture.orig.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"originalHeight",{get:function(){return this.texture.orig.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"x",{get:function(){return this.texture.frame.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this.texture.frame.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rotate",{get:function(){return this.texture.rotate!==0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"degrees",{get:function(){return(360-this.texture.rotate*45)%360},enumerable:!1,configurable:!0}),t}(),A0e=function(){function t(){this.x=0,this.y=0,this.width=0,this.height=0,this.offsetX=0,this.offsetY=0,this.originalWidth=0,this.originalHeight=0,this.rotate=0,this.index=0}return t}(),C0e=function(){function t(e,r,n){this.pages=new Array,this.regions=new Array,e&&this.addSpineAtlas(e,r,n)}return t.prototype.addTexture=function(e,r){for(var n=this.pages,i=null,a=0;a=this.lines.length?null:this.lines[this.index++]},t.prototype.readEntry=function(e,r){if(r==null||(r=r.trim(),r.length==0))return 0;var n=r.indexOf(":");if(n==-1)return 0;e[0]=r.substr(0,n).trim();for(var i=1,a=n+1;;i++){var o=r.indexOf(",",a);if(o==-1)return e[i]=r.substr(a).trim(),i;if(e[i]=r.substr(a,o-a).trim(),a=o+1,i==4)return 4}},t}(),dO=function(){function t(){this.minFilter=cn.Nearest,this.magFilter=cn.Nearest,this.uWrap=no.ClampToEdge,this.vWrap=no.ClampToEdge}return t.prototype.setFilters=function(){var e=this.baseTexture,r=this.minFilter;r==cn.Linear?e.scaleMode=Ir.LINEAR:this.minFilter==cn.Nearest?e.scaleMode=Ir.NEAREST:(e.mipmap=mn.POW2,r==cn.MipMapNearestNearest?e.scaleMode=Ir.NEAREST:e.scaleMode=Ir.LINEAR)},t}(),pO=function(t){Su(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(e1),O0e=function(t){return function(e){return t[0]=e,t[0]}}(new Float32Array(1)),R0e=Math.fround||O0e,qD=function(){function t(){this.array=new Array}return t.prototype.add=function(e){var r=this.contains(e);return this.array[e|0]=e|0,!r},t.prototype.contains=function(e){return this.array[e|0]!=null},t.prototype.remove=function(e){this.array[e|0]=void 0},t.prototype.clear=function(){this.array.length=0},t}(),KD=function(){function t(){this.entries={},this.size=0}return t.prototype.add=function(e){var r=this.entries[e];return this.entries[e]=!0,r?!1:(this.size++,!0)},t.prototype.addAll=function(e){for(var r=this.size,n=0,i=e.length;n1&&(this.r=1),this.g<0?this.g=0:this.g>1&&(this.g=1),this.b<0?this.b=0:this.b>1&&(this.b=1),this.a<0?this.a=0:this.a>1&&(this.a=1),this},t.rgba8888ToColor=function(e,r){e.r=((r&4278190080)>>>24)/255,e.g=((r&16711680)>>>16)/255,e.b=((r&65280)>>>8)/255,e.a=(r&255)/255},t.rgb888ToColor=function(e,r){e.r=((r&16711680)>>>16)/255,e.g=((r&65280)>>>8)/255,e.b=(r&255)/255},t.fromString=function(e){return new t().setFromString(e)},t.WHITE=new t(1,1,1,1),t.RED=new t(1,0,0,1),t.GREEN=new t(0,1,0,1),t.BLUE=new t(0,0,1,1),t.MAGENTA=new t(1,0,1,1),t}(),N=function(){function t(){}return t.clamp=function(e,r,n){return en?n:e},t.cosDeg=function(e){return Math.cos(e*t.degRad)},t.sinDeg=function(e){return Math.sin(e*t.degRad)},t.signum=function(e){return e>0?1:e<0?-1:0},t.toInt=function(e){return e>0?Math.floor(e):Math.ceil(e)},t.cbrt=function(e){var r=Math.pow(Math.abs(e),.3333333333333333);return e<0?-r:r},t.randomTriangular=function(e,r){return t.randomTriangularWith(e,r,(e+r)*.5)},t.randomTriangularWith=function(e,r,n){var i=Math.random(),a=r-e;return i<=(n-e)/a?e+Math.sqrt(i*a*(n-e)):r-Math.sqrt((1-i)*a*(r-n))},t.isPowerOfTwo=function(e){return e&&(e&e-1)===0},t.PI=3.1415927,t.PI2=t.PI*2,t.radiansToDegrees=180/t.PI,t.radDeg=t.radiansToDegrees,t.degreesToRadians=t.PI/180,t.degRad=t.degreesToRadians,t}(),I0e=function(){function t(){}return t.prototype.apply=function(e,r,n){return e+(r-e)*this.applyInternal(n)},t}(),k0e=function(t){Su(e,t);function e(r){var n=t.call(this)||this;return n.power=2,n.power=r,n}return e.prototype.applyInternal=function(r){return r<=.5?Math.pow(r*2,this.power)/2:Math.pow((r-1)*2,this.power)/(this.power%2==0?-2:2)+1},e}(I0e),ZD=function(t){Su(e,t);function e(r){return t.call(this,r)||this}return e.prototype.applyInternal=function(r){return Math.pow(r-1,this.power)*(this.power%2==0?-1:1)+1},e}(k0e),q=function(){function t(){}return t.arrayCopy=function(e,r,n,i,a){for(var o=r,s=i;o=r?e:t.setArraySize(e,r,n)},t.newArray=function(e,r){for(var n=new Array(e),i=0;i0?this.items.pop():this.instantiator()},t.prototype.free=function(e){e.reset&&e.reset(),this.items.push(e)},t.prototype.freeAll=function(e){for(var r=0;r=this.minX&&e<=this.maxX&&r>=this.minY&&r<=this.maxY},t.prototype.aabbIntersectsSegment=function(e,r,n,i){var a=this.minX,o=this.minY,s=this.maxX,u=this.maxY;if(e<=a&&n<=a||r<=o&&i<=o||e>=s&&n>=s||r>=u&&i>=u)return!1;var l=(i-r)/(n-e),c=l*(a-e)+r;if(c>o&&co&&ca&&fa&&fe.minX&&this.minYe.minY},t.prototype.containsPoint=function(e,r){for(var n=this.polygons,i=0,a=n.length;i=n||c=n){var f=i[u];f+(n-l)/(c-l)*(i[o]-f)=f&&x<=p||x>=p&&x<=f)&&(x>=r&&x<=i||x>=i&&x<=r)){var b=(c*y-l*g)/_;if((b>=h&&b<=v||b>=v&&b<=h)&&(b>=n&&b<=a||b>=a&&b<=n))return!0}f=p,h=v}return!1},t.prototype.getPolygon=function(e){if(!e)throw new Error("boundingBox cannot be null.");var r=this.boundingBoxes.indexOf(e);return r==-1?null:this.polygons[r]},t.prototype.getWidth=function(){return this.maxX-this.minX},t.prototype.getHeight=function(){return this.maxY-this.minY},t}(),M0e={yDown:!0,FAIL_ON_NON_EXISTING_SKIN:!1,GLOBAL_AUTO_UPDATE:!0,GLOBAL_DELAY_LIMIT:0},Ga=[0,0,0],F0e=function(t){Su(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.region=null,r.attachment=null,r}return e}(_i),N0e=function(t){Su(e,t);function e(r,n,i,a,o){var s=t.call(this,r,n,i,a,o)||this;return s.region=null,s.attachment=null,s}return e}(zD),Zf=function(t){Su(e,t);function e(r){var n=t.call(this)||this;if(!r)throw new Error("The spineData param is required.");if(typeof r=="string")throw new Error('spineData param cant be string. Please use spine.Spine.fromAtlas("YOUR_RESOURCE_NAME") from now on.');n.spineData=r,n.createSkeleton(r),n.slotContainers=[],n.tempClipContainers=[];for(var i=0,a=n.skeleton.slots.length;ii&&(r=i),this.state.update(r),this.state.apply(this.skeleton),!!this.skeleton){this.skeleton.updateWorldTransform();var a=this.skeleton.slots,o=this.color,s=null,u=null;o?(s=o.light,u=o.dark):s=this.tintRgb;for(var l=0,c=a.length;l0&&(h=h.substr(0,d)),h=h.substr(0,h.lastIndexOf("."))+f,u.spineAtlasFile&&(h=u.spineAtlasFile),h=h.replace(this.baseUrl,"");var p={crossOrigin:r.crossOrigin,xhrType:mt.XHR_RESPONSE_TYPE.TEXT,metadata:u.spineMetadata||null,parentResource:r},v={crossOrigin:r.crossOrigin,metadata:u.imageMetadata||null,parentResource:r},g=r.url.substr(0,r.url.lastIndexOf("/")+1);g=g.replace(this.baseUrl,"");var m=u.imageNamePrefix||r.name+"_atlas_page_",y=u.images?vO(u.images):u.image?vO({default:u.image}):u.imageLoader?u.imageLoader(this,m,g,v):j0e(this,m,g,v);function _(x){new C0e(x,y,function(b){b&&e.parseData(r,o,b,s),n()})}u.atlasRawData?_(u.atlasRawData):this.add(r.name+"_atlas",h,p,function(x){x.error?n():_(x.data)})}}},t}();function j0e(t,e,r,n){return r&&r.lastIndexOf("/")!==r.length-1&&(r+="/"),function(i,a){var o=e+i,s=r+i,u=t.resources[o];if(u){var l=function(){a(u.texture.baseTexture)};u.texture?l():u.onAfterMiddleware.add(l)}else t.add(o,s,n,function(c){c.error?a(null):(i.indexOf("-pma.")>=0&&(c.texture.baseTexture.alphaMode=Rn.PMA),a(c.texture.baseTexture))})}}function vO(t){return function(e,r){var n=t[e]||t.default;n&&n.baseTexture?r(n.baseTexture):r(n)}}/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var t1=function(t,e){return t1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},t1(t,e)};function Nt(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t1(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Fw=function(){function t(e){if(e==null)throw new Error("name cannot be null.");this.name=e}return t}(),Fs=function(t){Nt(e,t);function e(r){var n=t.call(this,r)||this;return n.id=(e.nextID++&65535)<<11,n.worldVerticesLength=0,n.deformAttachment=n,n}return e.prototype.computeWorldVerticesOld=function(r,n){this.computeWorldVertices(r,0,this.worldVerticesLength,n,0,2)},e.prototype.computeWorldVertices=function(r,n,i,a,o,s){i=o+(i>>1)*s;var u=r.bone.skeleton,l=r.deform,c=this.vertices,f=this.bones;if(f==null){l.length>0&&(c=l);for(var h=r.bone.matrix,d=h.tx,p=h.ty,v=h.a,g=h.c,m=h.b,y=h.d,_=n,x=o;x0&&(r%=this.duration));for(var l=this.timelines,c=0,f=l.length;c>>1;;){if(e[(o+1)*n]<=r?i=o+1:a=o,i==a)return(i+1)*n;o=i+a>>>1}},t.linearSearch=function(e,r,n){for(var i=0,a=e.length-n;i<=a;i+=n)if(e[i]>r)return i;return-1},t}(),Mr;(function(t){t[t.rotate=0]="rotate",t[t.translate=1]="translate",t[t.scale=2]="scale",t[t.shear=3]="shear",t[t.attachment=4]="attachment",t[t.color=5]="color",t[t.deform=6]="deform",t[t.event=7]="event",t[t.drawOrder=8]="drawOrder",t[t.ikConstraint=9]="ikConstraint",t[t.transformConstraint=10]="transformConstraint",t[t.pathConstraintPosition=11]="pathConstraintPosition",t[t.pathConstraintSpacing=12]="pathConstraintSpacing",t[t.pathConstraintMix=13]="pathConstraintMix",t[t.twoColor=14]="twoColor"})(Mr||(Mr={}));var ha=function(){function t(e){if(e<=0)throw new Error("frameCount must be > 0: "+e);this.curves=q.newFloatArray((e-1)*t.BEZIER_SIZE)}return t.prototype.getFrameCount=function(){return this.curves.length/t.BEZIER_SIZE+1},t.prototype.setLinear=function(e){this.curves[e*t.BEZIER_SIZE]=t.LINEAR},t.prototype.setStepped=function(e){this.curves[e*t.BEZIER_SIZE]=t.STEPPED},t.prototype.getCurveType=function(e){var r=e*t.BEZIER_SIZE;if(r==this.curves.length)return t.LINEAR;var n=this.curves[r];return n==t.LINEAR?t.LINEAR:n==t.STEPPED?t.STEPPED:t.BEZIER},t.prototype.setCurve=function(e,r,n,i,a){var o=(-r*2+i)*.03,s=(-n*2+a)*.03,u=((r-i)*3+1)*.006,l=((n-a)*3+1)*.006,c=o*2+u,f=s*2+l,h=r*.3+o+u*.16666667,d=n*.3+s+l*.16666667,p=e*t.BEZIER_SIZE,v=this.curves;v[p++]=t.BEZIER;for(var g=h,m=d,y=p+t.BEZIER_SIZE-1;p=r){var l=void 0,c=void 0;return i==s?(l=0,c=0):(l=n[i-2],c=n[i-1]),c+(n[i+1]-c)*(r-l)/(o-l)}var f=n[i-1];return f+(1-f)*(r-o)/(1-o)},t.LINEAR=0,t.STEPPED=1,t.BEZIER=2,t.BEZIER_SIZE=10*2-1,t}(),Mn=function(t){Nt(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r<<1),n}return e.prototype.getPropertyId=function(){return(Mr.rotate<<24)+this.boneIndex},e.prototype.setFrame=function(r,n,i){r<<=1,this.frames[r]=n,this.frames[r+e.ROTATION]=i},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.bones[this.boneIndex];if(c.active){if(i=l[l.length-e.ENTRIES]){var h=l[l.length+e.PREV_ROTATION];switch(s){case R.setup:c.rotation=c.data.rotation+h*o;break;case R.first:case R.replace:h+=c.data.rotation-c.rotation,h-=(16384-(16384.499999999996-h/360|0))*360;case R.add:c.rotation+=h*o}return}var d=er.binarySearch(l,i,e.ENTRIES),p=l[d+e.PREV_ROTATION],v=l[d],g=this.getCurvePercent((d>>1)-1,1-(i-v)/(l[d+e.PREV_TIME]-v)),m=l[d+e.ROTATION]-p;switch(m=p+(m-(16384-(16384.499999999996-m/360|0))*360)*g,s){case R.setup:c.rotation=c.data.rotation+(m-(16384-(16384.499999999996-m/360|0))*360)*o;break;case R.first:case R.replace:m+=c.data.rotation-c.rotation;case R.add:c.rotation+=(m-(16384-(16384.499999999996-m/360|0))*360)*o}}},e.ENTRIES=2,e.PREV_TIME=-2,e.PREV_ROTATION=-1,e.ROTATION=1,e}(ha),Ss=function(t){Nt(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r*e.ENTRIES),n}return e.prototype.getPropertyId=function(){return(Mr.translate<<24)+this.boneIndex},e.prototype.setFrame=function(r,n,i,a){r*=e.ENTRIES,this.frames[r]=n,this.frames[r+e.X]=i,this.frames[r+e.Y]=a},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.bones[this.boneIndex];if(c.active){if(i=l[l.length-e.ENTRIES])f=l[l.length+e.PREV_X],h=l[l.length+e.PREV_Y];else{var d=er.binarySearch(l,i,e.ENTRIES);f=l[d+e.PREV_X],h=l[d+e.PREV_Y];var p=l[d],v=this.getCurvePercent(d/e.ENTRIES-1,1-(i-p)/(l[d+e.PREV_TIME]-p));f+=(l[d+e.X]-f)*v,h+=(l[d+e.Y]-h)*v}switch(s){case R.setup:c.x=c.data.x+f*o,c.y=c.data.y+h*o;break;case R.first:case R.replace:c.x+=(c.data.x+f-c.x)*o,c.y+=(c.data.y+h-c.y)*o;break;case R.add:c.x+=f*o,c.y+=h*o}}},e.ENTRIES=3,e.PREV_TIME=-3,e.PREV_X=-2,e.PREV_Y=-1,e.X=1,e.Y=2,e}(ha),Dw=function(t){Nt(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getPropertyId=function(){return(Mr.scale<<24)+this.boneIndex},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.bones[this.boneIndex];if(c.active){if(i=l[l.length-e.ENTRIES])f=l[l.length+e.PREV_X]*c.data.scaleX,h=l[l.length+e.PREV_Y]*c.data.scaleY;else{var d=er.binarySearch(l,i,e.ENTRIES);f=l[d+e.PREV_X],h=l[d+e.PREV_Y];var p=l[d],v=this.getCurvePercent(d/e.ENTRIES-1,1-(i-p)/(l[d+e.PREV_TIME]-p));f=(f+(l[d+e.X]-f)*v)*c.data.scaleX,h=(h+(l[d+e.Y]-h)*v)*c.data.scaleY}if(o==1)s==R.add?(c.scaleX+=f-c.data.scaleX,c.scaleY+=h-c.data.scaleY):(c.scaleX=f,c.scaleY=h);else{var g=0,m=0;if(u==je.mixOut)switch(s){case R.setup:g=c.data.scaleX,m=c.data.scaleY,c.scaleX=g+(Math.abs(f)*N.signum(g)-g)*o,c.scaleY=m+(Math.abs(h)*N.signum(m)-m)*o;break;case R.first:case R.replace:g=c.scaleX,m=c.scaleY,c.scaleX=g+(Math.abs(f)*N.signum(g)-g)*o,c.scaleY=m+(Math.abs(h)*N.signum(m)-m)*o;break;case R.add:g=c.scaleX,m=c.scaleY,c.scaleX=g+(Math.abs(f)*N.signum(g)-c.data.scaleX)*o,c.scaleY=m+(Math.abs(h)*N.signum(m)-c.data.scaleY)*o}else switch(s){case R.setup:g=Math.abs(c.data.scaleX)*N.signum(f),m=Math.abs(c.data.scaleY)*N.signum(h),c.scaleX=g+(f-g)*o,c.scaleY=m+(h-m)*o;break;case R.first:case R.replace:g=Math.abs(c.scaleX)*N.signum(f),m=Math.abs(c.scaleY)*N.signum(h),c.scaleX=g+(f-g)*o,c.scaleY=m+(h-m)*o;break;case R.add:g=N.signum(f),m=N.signum(h),c.scaleX=Math.abs(c.scaleX)*g+(f-Math.abs(c.data.scaleX)*g)*o,c.scaleY=Math.abs(c.scaleY)*m+(h-Math.abs(c.data.scaleY)*m)*o}}}},e}(Ss),Bw=function(t){Nt(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getPropertyId=function(){return(Mr.shear<<24)+this.boneIndex},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.bones[this.boneIndex];if(c.active){if(i=l[l.length-e.ENTRIES])f=l[l.length+e.PREV_X],h=l[l.length+e.PREV_Y];else{var d=er.binarySearch(l,i,e.ENTRIES);f=l[d+e.PREV_X],h=l[d+e.PREV_Y];var p=l[d],v=this.getCurvePercent(d/e.ENTRIES-1,1-(i-p)/(l[d+e.PREV_TIME]-p));f=f+(l[d+e.X]-f)*v,h=h+(l[d+e.Y]-h)*v}switch(s){case R.setup:c.shearX=c.data.shearX+f*o,c.shearY=c.data.shearY+h*o;break;case R.first:case R.replace:c.shearX+=(c.data.shearX+f-c.shearX)*o,c.shearY+=(c.data.shearY+h-c.shearY)*o;break;case R.add:c.shearX+=f*o,c.shearY+=h*o}}},e}(Ss),_f=function(t){Nt(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r*e.ENTRIES),n}return e.prototype.getPropertyId=function(){return(Mr.color<<24)+this.slotIndex},e.prototype.setFrame=function(r,n,i,a,o,s){r*=e.ENTRIES,this.frames[r]=n,this.frames[r+e.R]=i,this.frames[r+e.G]=a,this.frames[r+e.B]=o,this.frames[r+e.A]=s},e.prototype.apply=function(r,n,i,a,o,s,u){var l=r.slots[this.slotIndex];if(l.bone.active){var c=this.frames;if(i=c[c.length-e.ENTRIES]){var m=c.length;d=c[m+e.PREV_R],p=c[m+e.PREV_G],v=c[m+e.PREV_B],g=c[m+e.PREV_A]}else{var y=er.binarySearch(c,i,e.ENTRIES);d=c[y+e.PREV_R],p=c[y+e.PREV_G],v=c[y+e.PREV_B],g=c[y+e.PREV_A];var _=c[y],x=this.getCurvePercent(y/e.ENTRIES-1,1-(i-_)/(c[y+e.PREV_TIME]-_));d+=(c[y+e.R]-d)*x,p+=(c[y+e.G]-p)*x,v+=(c[y+e.B]-v)*x,g+=(c[y+e.A]-g)*x}if(o==1)l.color.set(d,p,v,g);else{var f=l.color;s==R.setup&&f.setFromColor(l.data.color),f.add((d-f.r)*o,(p-f.g)*o,(v-f.b)*o,(g-f.a)*o)}}},e.ENTRIES=5,e.PREV_TIME=-5,e.PREV_R=-4,e.PREV_G=-3,e.PREV_B=-2,e.PREV_A=-1,e.R=1,e.G=2,e.B=3,e.A=4,e}(ha),xf=function(t){Nt(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r*e.ENTRIES),n}return e.prototype.getPropertyId=function(){return(Mr.twoColor<<24)+this.slotIndex},e.prototype.setFrame=function(r,n,i,a,o,s,u,l,c){r*=e.ENTRIES,this.frames[r]=n,this.frames[r+e.R]=i,this.frames[r+e.G]=a,this.frames[r+e.B]=o,this.frames[r+e.A]=s,this.frames[r+e.R2]=u,this.frames[r+e.G2]=l,this.frames[r+e.B2]=c},e.prototype.apply=function(r,n,i,a,o,s,u){var l=r.slots[this.slotIndex];if(l.bone.active){var c=this.frames;if(i=c[c.length-e.ENTRIES]){var S=c.length;v=c[S+e.PREV_R],g=c[S+e.PREV_G],m=c[S+e.PREV_B],y=c[S+e.PREV_A],_=c[S+e.PREV_R2],x=c[S+e.PREV_G2],b=c[S+e.PREV_B2]}else{var w=er.binarySearch(c,i,e.ENTRIES);v=c[w+e.PREV_R],g=c[w+e.PREV_G],m=c[w+e.PREV_B],y=c[w+e.PREV_A],_=c[w+e.PREV_R2],x=c[w+e.PREV_G2],b=c[w+e.PREV_B2];var E=c[w],T=this.getCurvePercent(w/e.ENTRIES-1,1-(i-E)/(c[w+e.PREV_TIME]-E));v+=(c[w+e.R]-v)*T,g+=(c[w+e.G]-g)*T,m+=(c[w+e.B]-m)*T,y+=(c[w+e.A]-y)*T,_+=(c[w+e.R2]-_)*T,x+=(c[w+e.G2]-x)*T,b+=(c[w+e.B2]-b)*T}if(o==1)l.color.set(v,g,m,y),l.darkColor.set(_,x,b,1);else{var f=l.color,h=l.darkColor;s==R.setup&&(f.setFromColor(l.data.color),h.setFromColor(l.data.darkColor)),f.add((v-f.r)*o,(g-f.g)*o,(m-f.b)*o,(y-f.a)*o),h.add((_-h.r)*o,(x-h.g)*o,(b-h.b)*o,0)}}},e.ENTRIES=8,e.PREV_TIME=-8,e.PREV_R=-7,e.PREV_G=-6,e.PREV_B=-5,e.PREV_A=-4,e.PREV_R2=-3,e.PREV_G2=-2,e.PREV_B2=-1,e.R=1,e.G=2,e.B=3,e.A=4,e.R2=5,e.G2=6,e.B2=7,e}(ha),ns=function(){function t(e){this.frames=q.newFloatArray(e),this.attachmentNames=new Array(e)}return t.prototype.getPropertyId=function(){return(Mr.attachment<<24)+this.slotIndex},t.prototype.getFrameCount=function(){return this.frames.length},t.prototype.setFrame=function(e,r,n){this.frames[e]=r,this.attachmentNames[e]=n},t.prototype.apply=function(e,r,n,i,a,o,s){var u=e.slots[this.slotIndex];if(u.bone.active){if(s==je.mixOut){o==R.setup&&this.setAttachment(e,u,u.data.attachmentName);return}var l=this.frames;if(n=l[l.length-1]?c=l.length-1:c=er.binarySearch(l,n,1)-1;var f=this.attachmentNames[c];e.slots[this.slotIndex].setAttachment(f==null?null:e.getAttachment(this.slotIndex,f))}},t.prototype.setAttachment=function(e,r,n){r.setAttachment(n==null?null:e.getAttachment(this.slotIndex,n))},t}(),mO=null,jw=function(t){Nt(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r),n.frameVertices=new Array(r),mO==null&&(mO=q.newFloatArray(64)),n}return e.prototype.getPropertyId=function(){return(Mr.deform<<27)+ +this.attachment.id+this.slotIndex},e.prototype.setFrame=function(r,n,i){this.frames[r]=n,this.frameVertices[r]=i},e.prototype.apply=function(r,n,i,a,o,s,u){var l=r.slots[this.slotIndex];if(l.bone.active){var c=l.getAttachment();if(!(!(c instanceof Fs)||c.deformAttachment!=this.attachment)){var f=l.deform;f.length==0&&(s=R.setup);var h=this.frameVertices,d=h[0].length,p=this.frames;if(i=p[p.length-1]){var x=h[p.length-1];if(o==1)if(s==R.add){var v=c;if(v.bones==null)for(var m=v.vertices,b=0;bn)this.apply(e,r,Number.MAX_VALUE,i,a,o,s),r=-1;else if(r>=u[l-1])return;if(!(n0&&u[c-1]==f;)c--}for(;c=u[c];c++)i.push(this.events[c])}}},t}(),Ol=function(){function t(e){this.frames=q.newFloatArray(e),this.drawOrders=new Array(e)}return t.prototype.getPropertyId=function(){return Mr.drawOrder<<24},t.prototype.getFrameCount=function(){return this.frames.length},t.prototype.setFrame=function(e,r,n){this.frames[e]=r,this.drawOrders[e]=n},t.prototype.apply=function(e,r,n,i,a,o,s){var u=e.drawOrder,l=e.slots;if(s==je.mixOut&&o==R.setup){q.arrayCopy(e.slots,0,e.drawOrder,0,e.slots.length);return}var c=this.frames;if(n=c[c.length-1]?f=c.length-1:f=er.binarySearch(c,n)-1;var h=this.drawOrders[f];if(h==null)q.arrayCopy(l,0,u,0,l.length);else for(var d=0,p=h.length;d=l[l.length-e.ENTRIES]){s==R.setup?(c.mix=c.data.mix+(l[l.length+e.PREV_MIX]-c.data.mix)*o,c.softness=c.data.softness+(l[l.length+e.PREV_SOFTNESS]-c.data.softness)*o,u==je.mixOut?(c.bendDirection=c.data.bendDirection,c.compress=c.data.compress,c.stretch=c.data.stretch):(c.bendDirection=l[l.length+e.PREV_BEND_DIRECTION],c.compress=l[l.length+e.PREV_COMPRESS]!=0,c.stretch=l[l.length+e.PREV_STRETCH]!=0)):(c.mix+=(l[l.length+e.PREV_MIX]-c.mix)*o,c.softness+=(l[l.length+e.PREV_SOFTNESS]-c.softness)*o,u==je.mixIn&&(c.bendDirection=l[l.length+e.PREV_BEND_DIRECTION],c.compress=l[l.length+e.PREV_COMPRESS]!=0,c.stretch=l[l.length+e.PREV_STRETCH]!=0));return}var f=er.binarySearch(l,i,e.ENTRIES),h=l[f+e.PREV_MIX],d=l[f+e.PREV_SOFTNESS],p=l[f],v=this.getCurvePercent(f/e.ENTRIES-1,1-(i-p)/(l[f+e.PREV_TIME]-p));s==R.setup?(c.mix=c.data.mix+(h+(l[f+e.MIX]-h)*v-c.data.mix)*o,c.softness=c.data.softness+(d+(l[f+e.SOFTNESS]-d)*v-c.data.softness)*o,u==je.mixOut?(c.bendDirection=c.data.bendDirection,c.compress=c.data.compress,c.stretch=c.data.stretch):(c.bendDirection=l[f+e.PREV_BEND_DIRECTION],c.compress=l[f+e.PREV_COMPRESS]!=0,c.stretch=l[f+e.PREV_STRETCH]!=0)):(c.mix+=(h+(l[f+e.MIX]-h)*v-c.mix)*o,c.softness+=(d+(l[f+e.SOFTNESS]-d)*v-c.softness)*o,u==je.mixIn&&(c.bendDirection=l[f+e.PREV_BEND_DIRECTION],c.compress=l[f+e.PREV_COMPRESS]!=0,c.stretch=l[f+e.PREV_STRETCH]!=0))}},e.ENTRIES=6,e.PREV_TIME=-6,e.PREV_MIX=-5,e.PREV_SOFTNESS=-4,e.PREV_BEND_DIRECTION=-3,e.PREV_COMPRESS=-2,e.PREV_STRETCH=-1,e.MIX=1,e.SOFTNESS=2,e.BEND_DIRECTION=3,e.COMPRESS=4,e.STRETCH=5,e}(ha),Sf=function(t){Nt(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r*e.ENTRIES),n}return e.prototype.getPropertyId=function(){return(Mr.transformConstraint<<24)+this.transformConstraintIndex},e.prototype.setFrame=function(r,n,i,a,o,s){r*=e.ENTRIES,this.frames[r]=n,this.frames[r+e.ROTATE]=i,this.frames[r+e.TRANSLATE]=a,this.frames[r+e.SCALE]=o,this.frames[r+e.SHEAR]=s},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.transformConstraints[this.transformConstraintIndex];if(c.active){if(i=l[l.length-e.ENTRIES]){var g=l.length;h=l[g+e.PREV_ROTATE],d=l[g+e.PREV_TRANSLATE],p=l[g+e.PREV_SCALE],v=l[g+e.PREV_SHEAR]}else{var m=er.binarySearch(l,i,e.ENTRIES);h=l[m+e.PREV_ROTATE],d=l[m+e.PREV_TRANSLATE],p=l[m+e.PREV_SCALE],v=l[m+e.PREV_SHEAR];var y=l[m],_=this.getCurvePercent(m/e.ENTRIES-1,1-(i-y)/(l[m+e.PREV_TIME]-y));h+=(l[m+e.ROTATE]-h)*_,d+=(l[m+e.TRANSLATE]-d)*_,p+=(l[m+e.SCALE]-p)*_,v+=(l[m+e.SHEAR]-v)*_}if(s==R.setup){var f=c.data;c.rotateMix=f.rotateMix+(h-f.rotateMix)*o,c.translateMix=f.translateMix+(d-f.translateMix)*o,c.scaleMix=f.scaleMix+(p-f.scaleMix)*o,c.shearMix=f.shearMix+(v-f.shearMix)*o}else c.rotateMix+=(h-c.rotateMix)*o,c.translateMix+=(d-c.translateMix)*o,c.scaleMix+=(p-c.scaleMix)*o,c.shearMix+=(v-c.shearMix)*o}},e.ENTRIES=5,e.PREV_TIME=-5,e.PREV_ROTATE=-4,e.PREV_TRANSLATE=-3,e.PREV_SCALE=-2,e.PREV_SHEAR=-1,e.ROTATE=1,e.TRANSLATE=2,e.SCALE=3,e.SHEAR=4,e}(ha),ql=function(t){Nt(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r*e.ENTRIES),n}return e.prototype.getPropertyId=function(){return(Mr.pathConstraintPosition<<24)+this.pathConstraintIndex},e.prototype.setFrame=function(r,n,i){r*=e.ENTRIES,this.frames[r]=n,this.frames[r+e.VALUE]=i},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.pathConstraints[this.pathConstraintIndex];if(c.active){if(i=l[l.length-e.ENTRIES])f=l[l.length+e.PREV_VALUE];else{var h=er.binarySearch(l,i,e.ENTRIES);f=l[h+e.PREV_VALUE];var d=l[h],p=this.getCurvePercent(h/e.ENTRIES-1,1-(i-d)/(l[h+e.PREV_TIME]-d));f+=(l[h+e.VALUE]-f)*p}s==R.setup?c.position=c.data.position+(f-c.data.position)*o:c.position+=(f-c.position)*o}},e.ENTRIES=2,e.PREV_TIME=-2,e.PREV_VALUE=-1,e.VALUE=1,e}(ha),Uw=function(t){Nt(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getPropertyId=function(){return(Mr.pathConstraintSpacing<<24)+this.pathConstraintIndex},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.pathConstraints[this.pathConstraintIndex];if(c.active){if(i=l[l.length-e.ENTRIES])f=l[l.length+e.PREV_VALUE];else{var h=er.binarySearch(l,i,e.ENTRIES);f=l[h+e.PREV_VALUE];var d=l[h],p=this.getCurvePercent(h/e.ENTRIES-1,1-(i-d)/(l[h+e.PREV_TIME]-d));f+=(l[h+e.VALUE]-f)*p}s==R.setup?c.spacing=c.data.spacing+(f-c.data.spacing)*o:c.spacing+=(f-c.spacing)*o}},e}(ql),wf=function(t){Nt(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r*e.ENTRIES),n}return e.prototype.getPropertyId=function(){return(Mr.pathConstraintMix<<24)+this.pathConstraintIndex},e.prototype.setFrame=function(r,n,i,a){r*=e.ENTRIES,this.frames[r]=n,this.frames[r+e.ROTATE]=i,this.frames[r+e.TRANSLATE]=a},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.pathConstraints[this.pathConstraintIndex];if(c.active){if(i=l[l.length-e.ENTRIES])f=l[l.length+e.PREV_ROTATE],h=l[l.length+e.PREV_TRANSLATE];else{var d=er.binarySearch(l,i,e.ENTRIES);f=l[d+e.PREV_ROTATE],h=l[d+e.PREV_TRANSLATE];var p=l[d],v=this.getCurvePercent(d/e.ENTRIES-1,1-(i-p)/(l[d+e.PREV_TIME]-p));f+=(l[d+e.ROTATE]-f)*v,h+=(l[d+e.TRANSLATE]-h)*v}s==R.setup?(c.rotateMix=c.data.rotateMix+(f-c.data.rotateMix)*o,c.translateMix=c.data.translateMix+(h-c.data.translateMix)*o):(c.rotateMix+=(f-c.rotateMix)*o,c.translateMix+=(h-c.translateMix)*o)}},e.ENTRIES=3,e.PREV_TIME=-3,e.PREV_ROTATE=-2,e.PREV_TRANSLATE=-1,e.ROTATE=1,e.TRANSLATE=2,e}(ha),t3=function(){function t(e){this.tracks=new Array,this.timeScale=1,this.unkeyedState=0,this.events=new Array,this.listeners=new Array,this.queue=new n3(this),this.propertyIDs=new qD,this.animationsChanged=!1,this.trackEntryPool=new hm(function(){return new r3}),this.data=e}return t.prototype.update=function(e){e*=this.timeScale;for(var r=this.tracks,n=0,i=r.length;n0){if(a.delay-=o,a.delay>0)continue;o=-a.delay,a.delay=0}var s=a.next;if(s!=null){var u=a.trackLast-s.delay;if(u>=0){for(s.delay=0,s.trackTime+=a.timeScale==0?0:(u/a.timeScale+e)*s.timeScale,a.trackTime+=o,this.setCurrent(n,s,!0);s.mixingFrom!=null;)s.mixTime+=e,s=s.mixingFrom;continue}}else if(a.trackLast>=a.trackEnd&&a.mixingFrom==null){r[n]=null,this.queue.end(a),this.disposeNext(a);continue}if(a.mixingFrom!=null&&this.updateMixingFrom(a,e)){var l=a.mixingFrom;for(a.mixingFrom=null,l!=null&&(l.mixingTo=null);l!=null;)this.queue.end(l),l=l.mixingFrom}a.trackTime+=o}}this.queue.drain()},t.prototype.updateMixingFrom=function(e,r){var n=e.mixingFrom;if(n==null)return!0;var i=this.updateMixingFrom(n,r);return n.animationLast=n.nextAnimationLast,n.trackLast=n.nextTrackLast,e.mixTime>0&&e.mixTime>=e.mixDuration?((n.totalAlpha==0||e.mixDuration==0)&&(e.mixingFrom=n.mixingFrom,n.mixingFrom!=null&&(n.mixingFrom.mixingTo=e),e.interruptAlpha=n.interruptAlpha,this.queue.end(n)),i):(n.trackTime+=r*n.timeScale,e.mixTime+=r,!1)},t.prototype.apply=function(e){if(e==null)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var r=this.events,n=this.tracks,i=!1,a=0,o=n.length;a0)){i=!0;var u=a==0?R.first:s.mixBlend,l=s.alpha;s.mixingFrom!=null?l*=this.applyMixingFrom(s,e,u):s.trackTime>=s.trackEnd&&s.next==null&&(l=0);var c=s.animationLast,f=s.getAnimationTime(),h=s.animation.timelines.length,d=s.animation.timelines;if(a==0&&l==1||u==R.add)for(var p=0;p1&&(a=1),n!=R.first&&(n=i.mixBlend));var o=a0&&this.queueEvents(i,c),this.events.length=0,i.nextAnimationLast=c,i.nextTrackLast=i.trackTime,a},t.prototype.applyAttachmentTimeline=function(e,r,n,i,a){var o=r.slots[e.slotIndex];if(o.bone.active){var s=e.frames;if(n=s[s.length-1]?u=s.length-1:u=er.binarySearch(s,n)-1,this.setAttachment(r,o,e.attachmentNames[u],a)}o.attachmentState<=this.unkeyedState&&(o.attachmentState=this.unkeyedState+t.SETUP)}},t.prototype.setAttachment=function(e,r,n,i){r.setAttachment(n==null?null:e.getAttachment(r.data.index,n)),i&&(r.attachmentState=this.unkeyedState+t.CURRENT)},t.prototype.applyRotateTimeline=function(e,r,n,i,a,o,s,u){if(u&&(o[s]=0),i==1){e.apply(r,0,n,null,1,a,je.mixIn);return}var l=e,c=l.frames,f=r.bones[l.boneIndex];if(f.active){var h=0,d=0;if(n=c[c.length-Mn.ENTRIES])d=f.data.rotation+c[c.length+Mn.PREV_ROTATION];else{var p=er.binarySearch(c,n,Mn.ENTRIES),v=c[p+Mn.PREV_ROTATION],g=c[p],m=l.getCurvePercent((p>>1)-1,1-(n-g)/(c[p+Mn.PREV_TIME]-g));d=c[p+Mn.ROTATION]-v,d-=(16384-(16384.499999999996-d/360|0))*360,d=v+d*m+f.data.rotation,d-=(16384-(16384.499999999996-d/360|0))*360}var y=0,_=d-h;if(_-=(16384-(16384.499999999996-_/360|0))*360,_==0)y=o[s];else{var x=0,b=0;u?(x=0,b=_):(x=o[s],b=o[s+1]);var S=_>0,w=x>=0;N.signum(b)!=N.signum(_)&&Math.abs(b)<=90&&(Math.abs(x)>180&&(x+=360*N.signum(x)),w=S),y=_+x-x%360,w!=S&&(y+=360*N.signum(x)),o[s]=y}o[s+1]=_,h+=y*i,f.rotation=h-(16384-(16384.499999999996-h/360|0))*360}},t.prototype.queueEvents=function(e,r){for(var n=e.animationStart,i=e.animationEnd,a=i-n,o=e.trackLast%a,s=this.events,u=0,l=s.length;ui||this.queue.event(e,c)}var f=!1;for(e.loop?f=a==0||o>e.trackTime%a:f=r>=i&&e.animationLast=this.tracks.length)){var r=this.tracks[e];if(r!=null){this.queue.end(r),this.disposeNext(r);for(var n=r;;){var i=n.mixingFrom;if(i==null)break;this.queue.end(i),n.mixingFrom=null,n.mixingTo=null,n=i}this.tracks[r.trackIndex]=null,this.queue.drain()}}},t.prototype.setCurrent=function(e,r,n){var i=this.expandToIndex(e);this.tracks[e]=r,i!=null&&(n&&this.queue.interrupt(i),r.mixingFrom=i,i.mixingTo=r,r.mixTime=0,i.mixingFrom!=null&&i.mixDuration>0&&(r.interruptAlpha*=Math.min(1,i.mixTime/i.mixDuration)),i.timelinesRotation.length=0),this.queue.start(r)},t.prototype.setAnimation=function(e,r,n){var i=this.data.skeletonData.findAnimation(r);if(i==null)throw new Error("Animation not found: "+r);return this.setAnimationWith(e,i,n)},t.prototype.setAnimationWith=function(e,r,n){if(r==null)throw new Error("animation cannot be null.");var i=!0,a=this.expandToIndex(e);a!=null&&(a.nextTrackLast==-1?(this.tracks[e]=a.mixingFrom,this.queue.interrupt(a),this.queue.end(a),this.disposeNext(a),a=a.mixingFrom,i=!1):this.disposeNext(a));var o=this.trackEntry(e,r,n,a);return this.setCurrent(e,o,i),this.queue.drain(),o},t.prototype.addAnimation=function(e,r,n,i){var a=this.data.skeletonData.findAnimation(r);if(a==null)throw new Error("Animation not found: "+r);return this.addAnimationWith(e,a,n,i)},t.prototype.addAnimationWith=function(e,r,n,i){if(r==null)throw new Error("animation cannot be null.");var a=this.expandToIndex(e);if(a!=null)for(;a.next!=null;)a=a.next;var o=this.trackEntry(e,r,n,a);if(a==null)this.setCurrent(e,o,!0),this.queue.drain();else if(a.next=o,i<=0){var s=a.animationEnd-a.animationStart;s!=0?(a.loop?i+=s*(1+(a.trackTime/s|0)):i+=Math.max(s,a.trackTime),i-=this.data.getMix(a.animation,r)):i=a.trackTime}return o.delay=i,o},t.prototype.setEmptyAnimation=function(e,r){var n=this.setAnimationWith(e,t.emptyAnimation,!1);return n.mixDuration=r,n.trackEnd=r,n},t.prototype.addEmptyAnimation=function(e,r,n){n<=0&&(n-=r);var i=this.addAnimationWith(e,t.emptyAnimation,!1,n);return i.mixDuration=r,i.trackEnd=r,i},t.prototype.setEmptyAnimations=function(e){var r=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var n=0,i=this.tracks.length;n0){a[u]=t.HOLD_MIX,o[u]=f;continue e}break}a[u]=t.HOLD_FIRST}}},t.prototype.getCurrent=function(e){return e>=this.tracks.length?null:this.tracks[e]},t.prototype.addListener=function(e){if(e==null)throw new Error("listener cannot be null.");this.listeners.push(e)},t.prototype.removeListener=function(e){var r=this.listeners.indexOf(e);r>=0&&this.listeners.splice(r,1)},t.prototype.clearListeners=function(){this.listeners.length=0},t.prototype.clearListenerNotifications=function(){this.queue.clear()},t.prototype.setAnimationByName=function(e,r,n){t.deprecatedWarning1||(t.deprecatedWarning1=!0,console.warn("Spine Deprecation Warning: AnimationState.setAnimationByName is deprecated, please use setAnimation from now on.")),this.setAnimation(e,r,n)},t.prototype.addAnimationByName=function(e,r,n,i){t.deprecatedWarning2||(t.deprecatedWarning2=!0,console.warn("Spine Deprecation Warning: AnimationState.addAnimationByName is deprecated, please use addAnimation from now on.")),this.addAnimation(e,r,n,i)},t.prototype.hasAnimation=function(e){var r=this.data.skeletonData.findAnimation(e);return r!==null},t.prototype.hasAnimationByName=function(e){return t.deprecatedWarning3||(t.deprecatedWarning3=!0,console.warn("Spine Deprecation Warning: AnimationState.hasAnimationByName is deprecated, please use hasAnimation from now on.")),this.hasAnimation(e)},t.emptyAnimation=new er("",[],0),t.SUBSEQUENT=0,t.FIRST=1,t.HOLD_SUBSEQUENT=2,t.HOLD_FIRST=3,t.HOLD_MIX=4,t.SETUP=1,t.CURRENT=2,t.deprecatedWarning1=!1,t.deprecatedWarning2=!1,t.deprecatedWarning3=!1,t}(),r3=function(){function t(){this.mixBlend=R.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}return t.prototype.reset=function(){this.next=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0},t.prototype.getAnimationTime=function(){if(this.loop){var e=this.animationEnd-this.animationStart;return e==0?this.animationStart:this.trackTime%e+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)},t.prototype.setAnimationLast=function(e){this.animationLast=e,this.nextAnimationLast=e},t.prototype.isComplete=function(){return this.trackTime>=this.animationEnd-this.animationStart},t.prototype.resetRotationDirections=function(){this.timelinesRotation.length=0},Object.defineProperty(t.prototype,"time",{get:function(){return t.deprecatedWarning1||(t.deprecatedWarning1=!0,console.warn("Spine Deprecation Warning: TrackEntry.time is deprecated, please use trackTime from now on.")),this.trackTime},set:function(e){t.deprecatedWarning1||(t.deprecatedWarning1=!0,console.warn("Spine Deprecation Warning: TrackEntry.time is deprecated, please use trackTime from now on.")),this.trackTime=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"endTime",{get:function(){return t.deprecatedWarning2||(t.deprecatedWarning2=!0,console.warn("Spine Deprecation Warning: TrackEntry.endTime is deprecated, please use trackEnd from now on.")),this.trackTime},set:function(e){t.deprecatedWarning2||(t.deprecatedWarning2=!0,console.warn("Spine Deprecation Warning: TrackEntry.endTime is deprecated, please use trackEnd from now on.")),this.trackTime=e},enumerable:!1,configurable:!0}),t.prototype.loopsCount=function(){return Math.floor(this.trackTime/this.trackEnd)},t.deprecatedWarning1=!1,t.deprecatedWarning2=!1,t}(),n3=function(){function t(e){this.objects=[],this.drainDisabled=!1,this.animState=e}return t.prototype.start=function(e){this.objects.push(on.start),this.objects.push(e),this.animState.animationsChanged=!0},t.prototype.interrupt=function(e){this.objects.push(on.interrupt),this.objects.push(e)},t.prototype.end=function(e){this.objects.push(on.end),this.objects.push(e),this.animState.animationsChanged=!0},t.prototype.dispose=function(e){this.objects.push(on.dispose),this.objects.push(e)},t.prototype.complete=function(e){this.objects.push(on.complete),this.objects.push(e)},t.prototype.event=function(e,r){this.objects.push(on.event),this.objects.push(e),this.objects.push(r)},t.prototype.deprecateStuff=function(){return t.deprecatedWarning1||(t.deprecatedWarning1=!0,console.warn("Spine Deprecation Warning: onComplete, onStart, onEnd, onEvent art deprecated, please use listeners from now on. 'state.addListener({ complete: function(track, event) { } })'")),!0},t.prototype.drain=function(){if(!this.drainDisabled){this.drainDisabled=!0;for(var e=this.objects,r=this.animState.listeners,n=0;n1e-4?(S=Math.abs(p*m-v*g)/S,p/=this.skeleton.scaleX,g/=this.skeleton.scaleY,v=g*S,m=p*S,w=Math.atan2(g,p)*N.radDeg):(p=0,g=0,w=90-Math.atan2(m,v)*N.radDeg);var E=n+o-w,T=n+s-w+90,y=N.cosDeg(E)*i,_=N.cosDeg(T)*a,x=N.sinDeg(E)*i,b=N.sinDeg(T)*a;l.a=p*y-v*x,l.c=p*_-v*b,l.b=g*y+m*x,l.d=g*_+m*b;break}case Ne.NoScale:case Ne.NoScaleOrReflection:{var A=N.cosDeg(n),O=N.sinDeg(n),P=(p*A+v*O)/c,k=(g*A+m*O)/f,S=Math.sqrt(P*P+k*k);S>1e-5&&(S=1/S),P*=S,k*=S,S=Math.sqrt(P*P+k*k),this.data.transformMode==Ne.NoScale&&p*m-v*g<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY>0)&&(S=-S);var M=Math.PI/2+Math.atan2(k,P),B=Math.cos(M)*S,j=Math.sin(M)*S,y=N.cosDeg(o)*i,_=N.cosDeg(90+s)*a,x=N.sinDeg(o)*i,b=N.sinDeg(90+s)*a;l.a=P*y+B*x,l.c=P*_+B*b,l.b=k*y+j*x,l.d=k*_+j*b;break}}l.a*=c,l.c*=c,l.b*=f,l.d*=f},t.prototype.setToSetupPose=function(){var e=this.data;this.x=e.x,this.y=e.y,this.rotation=e.rotation,this.scaleX=e.scaleX,this.scaleY=e.scaleY,this.shearX=e.shearX,this.shearY=e.shearY},t.prototype.getWorldRotationX=function(){return Math.atan2(this.matrix.b,this.matrix.a)*N.radDeg},t.prototype.getWorldRotationY=function(){return Math.atan2(this.matrix.d,this.matrix.c)*N.radDeg},t.prototype.getWorldScaleX=function(){var e=this.matrix;return Math.sqrt(e.a*e.a+e.c*e.c)},t.prototype.getWorldScaleY=function(){var e=this.matrix;return Math.sqrt(e.b*e.b+e.d*e.d)},t.prototype.updateAppliedTransform=function(){this.appliedValid=!0;var e=this.parent,r=this.matrix;if(e==null){this.ax=r.tx,this.ay=r.ty,this.arotation=Math.atan2(r.b,r.a)*N.radDeg,this.ascaleX=Math.sqrt(r.a*r.a+r.b*r.b),this.ascaleY=Math.sqrt(r.c*r.c+r.d*r.d),this.ashearX=0,this.ashearY=Math.atan2(r.a*r.c+r.b*r.d,r.a*r.d-r.b*r.c)*N.radDeg;return}var n=e.matrix,i=1/(n.a*n.d-n.b*n.c),a=r.tx-n.tx,o=r.ty-n.ty;this.ax=a*n.d*i-o*n.c*i,this.ay=o*n.a*i-a*n.b*i;var s=i*n.d,u=i*n.a,l=i*n.c,c=i*n.b,f=s*r.a-l*r.b,h=s*r.c-l*r.d,d=u*r.b-c*r.a,p=u*r.d-c*r.c;if(this.ashearX=0,this.ascaleX=Math.sqrt(f*f+d*d),this.ascaleX>1e-4){var v=f*p-h*d;this.ascaleY=v/this.ascaleX,this.ashearY=Math.atan2(f*h+d*p,v)*N.radDeg,this.arotation=Math.atan2(d,f)*N.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(h*h+p*p),this.ashearY=0,this.arotation=90-Math.atan2(p,h)*N.radDeg},t.prototype.worldToLocal=function(e){var r=this.matrix,n=r.a,i=r.c,a=r.b,o=r.d,s=1/(n*o-i*a),u=e.x-r.tx,l=e.y-r.ty;return e.x=u*o*s-l*i*s,e.y=l*n*s-u*a*s,e},t.prototype.localToWorld=function(e){var r=this.matrix,n=e.x,i=e.y;return e.x=n*r.a+i*r.c+r.tx,e.y=n*r.b+i*r.d+r.ty,e},t.prototype.worldToLocalRotation=function(e){var r=N.sinDeg(e),n=N.cosDeg(e),i=this.matrix;return Math.atan2(i.a*r-i.b*n,i.d*n-i.c*r)*N.radDeg},t.prototype.localToWorldRotation=function(e){var r=N.sinDeg(e),n=N.cosDeg(e),i=this.matrix;return Math.atan2(n*i.b+r*i.d,n*i.a+r*i.c)*N.radDeg},t.prototype.rotateWorld=function(e){var r=this.matrix,n=r.a,i=r.c,a=r.b,o=r.d,s=N.cosDeg(e),u=N.sinDeg(e);r.a=s*n-u*a,r.c=s*i-u*o,r.b=u*n+s*a,r.d=u*i+s*o,this.appliedValid=!1},t}(),Vw=function(){function t(e,r,n){if(this.x=0,this.y=0,this.rotation=0,this.scaleX=1,this.scaleY=1,this.shearX=0,this.shearY=0,this.transformMode=Ne.Normal,this.skinRequired=!1,this.color=new de,e<0)throw new Error("index must be >= 0.");if(r==null)throw new Error("name cannot be null.");this.index=e,this.name=r,this.parent=n}return t}(),vm=function(){function t(e,r,n){this.name=e,this.order=r,this.skinRequired=n}return t}(),Gw=function(){function t(e,r){if(r==null)throw new Error("data cannot be null.");this.time=e,this.data=r}return t}(),Xw=function(){function t(e){this.name=e}return t}(),a3=function(){function t(e,r){if(this.bendDirection=0,this.compress=!1,this.stretch=!1,this.mix=1,this.softness=0,this.active=!1,e==null)throw new Error("data cannot be null.");if(r==null)throw new Error("skeleton cannot be null.");this.data=e,this.mix=e.mix,this.softness=e.softness,this.bendDirection=e.bendDirection,this.compress=e.compress,this.stretch=e.stretch,this.bones=new Array;for(var n=0;n180?d-=360:d<-180&&(d+=360);var S=e.ascaleX,w=e.ascaleY;if(i||a){switch(e.data.transformMode){case Ne.NoScale:case Ne.NoScaleOrReflection:p=r-e.worldX,v=n-e.worldY}var E=e.data.length*S,T=Math.sqrt(p*p+v*v);if(i&&TE&&E>1e-4){var g=(T/E-1)*s+1;S*=g,o&&(w*=g)}}e.updateWorldTransformWith(e.ax,e.ay,e.arotation+d*s,S,w,e.ashearX,e.ashearY)},t.prototype.apply2=function(e,r,n,i,a,o,s,u){if(u==0){r.updateWorldTransform();return}e.appliedValid||e.updateAppliedTransform(),r.appliedValid||r.updateAppliedTransform();var l=e.ax,c=e.ay,f=e.ascaleX,h=f,d=e.ascaleY,p=r.ascaleX,v=e.matrix,g=0,m=0,y=0;f<0?(f=-f,g=180,y=-1):(g=0,y=1),d<0&&(d=-d,y=-y),p<0?(p=-p,m=180):m=0;var _=r.ax,x=0,b=0,S=0,w=v.a,E=v.c,T=v.b,A=v.d,O=Math.abs(f-d)<=1e-4;O?(x=r.ay,b=w*_+E*x+v.tx,S=T*_+A*x+v.ty):(x=0,b=w*_+v.tx,S=T*_+v.ty);var P=e.parent.matrix;w=P.a,E=P.c,T=P.b,A=P.d;var k=1/(w*A-E*T),M=b-P.tx,B=S-P.ty,j=(M*A-B*E)*k-l,z=(B*w-M*T)*k-c,J=Math.sqrt(j*j+z*z),Z=r.data.length*p,$,F;if(J<1e-4){this.apply1(e,n,i,!1,o,!1,u),r.updateWorldTransformWith(_,x,0,r.ascaleX,r.ascaleY,r.ashearX,r.ashearY);return}M=n-P.tx,B=i-P.ty;var G=(M*A-B*E)*k-l,V=(B*w-M*T)*k-c,U=G*G+V*V;if(s!=0){s*=f*(p+1)/2;var H=Math.sqrt(U),ee=H-J-Z*f+s;if(ee>0){var ie=Math.min(1,ee/(s*2))-1;ie=(ee-s*(1-ie*ie))/H,G-=ie*G,V-=ie*V,U=G*G+V*V}}e:if(O){Z*=f;var ae=(U-J*J-Z*Z)/(2*J*Z);ae<-1?ae=-1:ae>1&&(ae=1,o&&(h*=(Math.sqrt(U)/(J+Z)-1)*u+1)),F=Math.acos(ae)*a,w=J+Z*ae,E=Z*Math.sin(F),$=Math.atan2(V*w-G*E,G*w+V*E)}else{w=f*Z,E=d*Z;var pe=w*w,ye=E*E,oe=Math.atan2(V,G);T=ye*J*J+pe*U-pe*ye;var _e=-2*ye*J,Ce=ye-pe;if(A=_e*_e-4*Ce*T,A>=0){var be=Math.sqrt(A);_e<0&&(be=-be),be=-(_e+be)/2;var Oe=be/Ce,ke=T/be,we=Math.abs(Oe)=-1&&T<=1&&(T=Math.acos(T),M=w*Math.cos(T)+J,B=E*Math.sin(T),A=M*M+B*B,Alr&&(qt=T,lr=A,_t=M,Dr=B)),U<=(Et+lr)/2?($=oe-Math.atan2($t*a,tt),F=Xe*a):($=oe-Math.atan2(Dr*a,_t),F=qt*a)}var ur=Math.atan2(x,_)*y,br=e.arotation;$=($-ur)*N.radDeg+g-br,$>180?$-=360:$<-180&&($+=360),e.updateWorldTransformWith(l,c,br+$*u,h,e.ascaleY,0,0),br=r.arotation,F=((F+ur)*N.radDeg-r.ashearX)*y+m-br,F>180?F-=360:F<-180&&(F+=360),r.updateWorldTransformWith(_,x,br+F*u,r.ascaleX,r.ascaleY,r.ashearX,r.ashearY)},t}(),zw=function(t){Nt(e,t);function e(r){var n=t.call(this,r,0,!1)||this;return n.bones=new Array,n.bendDirection=1,n.compress=!1,n.stretch=!1,n.uniform=!1,n.mix=1,n.softness=0,n}return e}(vm),Ww=function(t){Nt(e,t);function e(r){var n=t.call(this,r,0,!1)||this;return n.bones=new Array,n}return e}(vm),pr;(function(t){t[t.Length=0]="Length",t[t.Fixed=1]="Fixed",t[t.Percent=2]="Percent"})(pr||(pr={}));var o3=function(){function t(e,r){if(this.position=0,this.spacing=0,this.rotateMix=0,this.translateMix=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,this.active=!1,e==null)throw new Error("data cannot be null.");if(r==null)throw new Error("skeleton cannot be null.");this.data=e,this.bones=new Array;for(var n=0,i=e.bones.length;n0,a=r>0;if(!(!i&&!a)){var o=this.data,s=o.spacingMode,u=s==pr.Length,l=o.rotateMode,c=l==Wt.Tangent,f=l==Wt.ChainScale,h=this.bones.length,d=c?h:h+1,p=this.bones,v=q.setArraySize(this.spaces,d),g=null,m=this.spacing;if(f||u){f&&(g=q.setArraySize(this.lengths,h));for(var y=0,_=d-1;y<_;){var x=p[y],b=x.data.length;if(b0?N.degRad:-N.degRad}for(var y=0,M=3;yN.PI?U-=N.PI2:U<-N.PI&&(U+=N.PI2),U*=r,H=Math.cos(U),ee=Math.sin(U),B.a=H*$-ee*G,B.c=H*F-ee*V,B.b=ee*$+H*G,B.d=ee*F+H*V}x.appliedValid=!1}}}},t.prototype.computeWorldPositions=function(e,r,n,i,a){var o=this.target,s=this.position,u=this.spaces,l=q.setArraySize(this.positions,r*3+2),c=null,f=e.closed,h=e.worldVerticesLength,d=h/6,p=t.NONE;if(!e.constantSpeed){var v=e.lengths;d-=f?1:2;var g=v[d];if(i&&(s*=g),a)for(var m=0;mg){p!=t.AFTER&&(p=t.AFTER,e.computeWorldVertices(o,h-6,4,c,0,2)),this.addAfterPosition(b-g,c,0,l,y);continue}for(;;_++){var S=v[_];if(!(b>S)){if(_==0)b/=S;else{var w=v[_-1];b=(b-w)/(S-w)}break}}_!=p&&(p=_,f&&_==d?(e.computeWorldVertices(o,h-4,4,c,0,2),e.computeWorldVertices(o,0,4,c,4,2)):e.computeWorldVertices(o,_*6+2,8,c,0,2)),this.addCurvePosition(b,c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],l,y,n||m>0&&x==0)}return l}f?(h+=2,c=q.setArraySize(this.world,h),e.computeWorldVertices(o,2,h-4,c,0,2),e.computeWorldVertices(o,0,2,c,h-4,2),c[h-2]=c[0],c[h-1]=c[1]):(d--,h-=4,c=q.setArraySize(this.world,h),e.computeWorldVertices(o,2,h,c,0,2));for(var E=q.setArraySize(this.curves,d),T=0,A=c[0],O=c[1],P=0,k=0,M=0,B=0,j=0,z=0,J=0,Z=0,$=0,F=0,G=0,V=0,U=0,H=0,m=0,ee=2;mT){this.addAfterPosition(b-T,c,h-4,l,y);continue}for(;;_++){var ye=E[_];if(!(b>ye)){if(_==0)b/=ye;else{var w=E[_-1];b=(b-w)/(ye-w)}break}}if(_!=p){p=_;var oe=_*6;for(A=c[oe],O=c[oe+1],P=c[oe+2],k=c[oe+3],M=c[oe+4],B=c[oe+5],j=c[oe+6],z=c[oe+7],J=(A-P*2+M)*.03,Z=(O-k*2+B)*.03,$=((P-M)*3-A+j)*.006,F=((k-B)*3-O+z)*.006,G=J*2+$,V=Z*2+F,U=(P-A)*.3+J+$*.16666667,H=(k-O)*.3+Z+F*.16666667,ae=Math.sqrt(U*U+H*H),ie[0]=ae,oe=1;oe<8;oe++)U+=G,H+=V,G+=$,V+=F,ae+=Math.sqrt(U*U+H*H),ie[oe]=ae;U+=G,H+=V,ae+=Math.sqrt(U*U+H*H),ie[8]=ae,U+=G+$,H+=V+F,ae+=Math.sqrt(U*U+H*H),ie[9]=ae,pe=0}for(b*=ae;;pe++){var _e=ie[pe];if(!(b>_e)){if(pe==0)b/=_e;else{var w=ie[pe-1];b=pe+(b-w)/(_e-w)}break}}this.addCurvePosition(b*.1,A,O,P,k,M,B,j,z,l,y,n||m>0&&x==0)}return l},t.prototype.addBeforePosition=function(e,r,n,i,a){var o=r[n],s=r[n+1],u=r[n+2]-o,l=r[n+3]-s,c=Math.atan2(l,u);i[a]=o+e*Math.cos(c),i[a+1]=s+e*Math.sin(c),i[a+2]=c},t.prototype.addAfterPosition=function(e,r,n,i,a){var o=r[n+2],s=r[n+3],u=o-r[n],l=s-r[n+1],c=Math.atan2(l,u);i[a]=o+e*Math.cos(c),i[a+1]=s+e*Math.sin(c),i[a+2]=c},t.prototype.addCurvePosition=function(e,r,n,i,a,o,s,u,l,c,f,h){(e==0||isNaN(e))&&(e=1e-4);var d=e*e,p=d*e,v=1-e,g=v*v,m=g*v,y=v*e,_=y*3,x=v*_,b=_*e,S=r*m+i*x+o*b+u*p,w=n*m+a*x+s*b+l*p;c[f]=S,c[f+1]=w,h&&(c[f+2]=Math.atan2(w-(n*g+a*y*2+s*d),S-(r*g+i*y*2+o*d)))},t.NONE=-1,t.BEFORE=-2,t.AFTER=-3,t.epsilon=1e-5,t}(),s3=function(){function t(e,r){if(this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.temp=new gf,this.active=!1,e==null)throw new Error("data cannot be null.");if(r==null)throw new Error("skeleton cannot be null.");this.data=e,this.rotateMix=e.rotateMix,this.translateMix=e.translateMix,this.scaleMix=e.scaleMix,this.shearMix=e.shearMix,this.bones=new Array;for(var n=0;n0?N.degRad:-N.degRad,h=this.data.offsetRotation*f,d=this.data.offsetShearY*f,p=this.bones,v=0,g=p.length;vN.PI?E-=N.PI2:E<-N.PI&&(E+=N.PI2),E*=e;var T=Math.cos(E),A=Math.sin(E);_.a=T*x-A*S,_.c=T*b-A*w,_.b=A*x+T*S,_.d=A*b+T*w,y=!0}if(r!=0){var O=this.temp;a.localToWorld(O.set(this.data.offsetX,this.data.offsetY)),_.tx+=(O.x-_.tx)*r,_.ty+=(O.y-_.ty)*r,y=!0}if(n>0){var P=Math.sqrt(_.a*_.a+_.b*_.b),k=Math.sqrt(s*s+l*l);P>1e-5&&(P=(P+(k-P+this.data.offsetScaleX)*n)/P),_.a*=P,_.b*=P,P=Math.sqrt(_.c*_.c+_.d*_.d),k=Math.sqrt(u*u+c*c),P>1e-5&&(P=(P+(k-P+this.data.offsetScaleY)*n)/P),_.c*=P,_.d*=P,y=!0}if(i>0){var b=_.c,w=_.d,M=Math.atan2(w,b),E=Math.atan2(c,u)-Math.atan2(l,s)-(M-Math.atan2(_.b,_.a));E>N.PI?E-=N.PI2:E<-N.PI&&(E+=N.PI2),E=M+(E+d)*i;var P=Math.sqrt(b*b+w*w);_.c=Math.cos(E)*P,_.d=Math.sin(E)*P,y=!0}y&&(m.appliedValid=!1)}},t.prototype.applyRelativeWorld=function(){for(var e=this.rotateMix,r=this.translateMix,n=this.scaleMix,i=this.shearMix,a=this.target,o=a.matrix,s=o.a,u=o.c,l=o.b,c=o.d,f=s*c-u*l>0?N.degRad:-N.degRad,h=this.data.offsetRotation*f,d=this.data.offsetShearY*f,p=this.bones,v=0,g=p.length;vN.PI?E-=N.PI2:E<-N.PI&&(E+=N.PI2),E*=e;var T=Math.cos(E),A=Math.sin(E);_.a=T*x-A*S,_.c=T*b-A*w,_.b=A*x+T*S,_.d=A*b+T*w,y=!0}if(r!=0){var O=this.temp;a.localToWorld(O.set(this.data.offsetX,this.data.offsetY)),_.tx+=O.x*r,_.ty+=O.y*r,y=!0}if(n>0){var P=(Math.sqrt(s*s+l*l)-1+this.data.offsetScaleX)*n+1;_.a*=P,_.b*=P,P=(Math.sqrt(u*u+c*c)-1+this.data.offsetScaleY)*n+1,_.c*=P,_.d*=P,y=!0}if(i>0){var E=Math.atan2(c,u)-Math.atan2(l,s);E>N.PI?E-=N.PI2:E<-N.PI&&(E+=N.PI2);var b=_.c,w=_.d;E=Math.atan2(w,b)+(E-N.PI/2+d)*i;var P=Math.sqrt(b*b+w*w);_.c=Math.cos(E)*P,_.d=Math.sin(E)*P,y=!0}y&&(m.appliedValid=!1)}},t.prototype.applyAbsoluteLocal=function(){var e=this.rotateMix,r=this.translateMix,n=this.scaleMix,i=this.shearMix,a=this.target;a.appliedValid||a.updateAppliedTransform();for(var o=this.bones,s=0,u=o.length;s0&&(p>1e-5&&(p=(p+(a.ascaleX-p+this.data.offsetScaleX)*n)/p),v>1e-5&&(v=(v+(a.ascaleY-v+this.data.offsetScaleY)*n)/v));var g=l.ashearY;if(i>0){var f=a.ashearY-g+this.data.offsetShearY;f-=(16384-(16384.499999999996-f/360|0))*360,l.shearY+=f*i}l.updateWorldTransformWith(h,d,c,p,v,l.ashearX,g)}},t.prototype.applyRelativeLocal=function(){var e=this.rotateMix,r=this.translateMix,n=this.scaleMix,i=this.shearMix,a=this.target;a.appliedValid||a.updateAppliedTransform();for(var o=this.bones,s=0,u=o.length;s0&&(d>1e-5&&(d*=(a.ascaleX-1+this.data.offsetScaleX)*n+1),p>1e-5&&(p*=(a.ascaleY-1+this.data.offsetScaleY)*n+1));var v=l.ashearY;i>0&&(v+=(a.ashearY+this.data.offsetShearY)*i),l.updateWorldTransformWith(f,h,c,d,p,l.ashearX,v)}},t}(),l3=function(){function t(e){if(this._updateCache=new Array,this.updateCacheReset=new Array,this.time=0,this.scaleX=1,this.scaleY=1,this.x=0,this.y=0,e==null)throw new Error("data cannot be null.");this.data=e,this.bones=new Array;for(var r=0;r1){var a=n[n.length-1];this._updateCache.indexOf(a)>-1||this.updateCacheReset.push(a)}this._updateCache.push(e),this.sortReset(i.children),n[n.length-1].sorted=!0}},t.prototype.sortPathConstraint=function(e){if(e.active=e.target.bone.isActive()&&(!e.data.skinRequired||this.skin!=null&&q.contains(this.skin.constraints,e.data,!0)),!!e.active){var r=e.target,n=r.data.index,i=r.bone;this.skin!=null&&this.sortPathConstraintAttachment(this.skin,n,i),this.data.defaultSkin!=null&&this.data.defaultSkin!=this.skin&&this.sortPathConstraintAttachment(this.data.defaultSkin,n,i);for(var a=0,o=this.data.skins.length;a-1||this.updateCacheReset.push(a)}else for(var i=0;i= 0.");if(r==null)throw new Error("name cannot be null.");if(n==null)throw new Error("boneData cannot be null.");this.index=e,this.name=r,this.boneData=n}return t}(),qw=function(t){Nt(e,t);function e(r){var n=t.call(this,r,0,!1)||this;return n.bones=new Array,n.rotateMix=0,n.translateMix=0,n.scaleMix=0,n.shearMix=0,n.offsetRotation=0,n.offsetX=0,n.offsetY=0,n.offsetScaleX=0,n.offsetScaleY=0,n.offsetShearY=0,n.relative=!1,n.local=!1,n}return e}(vm),n1=function(){function t(e,r,n){this.slotIndex=e,this.name=r,this.attachment=n}return t}(),Op=function(){function t(e){if(this.attachments=new Array,this.bones=Array(),this.constraints=new Array,e==null)throw new Error("name cannot be null.");this.name=e}return t.prototype.setAttachment=function(e,r,n){if(n==null)throw new Error("attachment cannot be null.");var i=this.attachments;e>=i.length&&(i.length=e+1),i[e]||(i[e]={}),i[e][r]=n},t.prototype.addSkin=function(e){for(var r=0;r0){for(var g=new Ol(Z),$=n.slots.length,l=0;l=0;h--)G[h]=-1;for(var V=q.newArray($-F,0),U=0,H=0,h=0;h=0;h--)G[h]==-1&&(G[h]=V[--H]);g.setFrame(l,y,G)}i.push(g),o=Math.max(o,g.frames[Z-1])}var ee=e.readInt(!0);if(ee>0){for(var g=new pm(ee),l=0;l=0;p--)ye[p]==-1&&(ye[p]=_e[--be])}h.setFrame(d++,this.getValue(pe,"time",0),ye)}a.push(h),o=Math.max(o,h.frames[h.getFrameCount()-1])}if(e.events){for(var h=new pm(e.events.length),d=0,p=0;p>1)*s;var u=r.bone.skeleton,l=r.attachmentVertices,c=this.vertices,f=this.bones;if(f==null){l.length>0&&(c=l);for(var h=r.bone.matrix,d=h.tx,p=h.ty,v=h.a,g=h.c,m=h.b,y=h.d,_=n,x=o;x0&&(r%=this.duration));for(var l=this.timelines,c=0,f=l.length;c>>1;;){if(e[(o+1)*n]<=r?i=o+1:a=o,i==a)return(i+1)*n;o=i+a>>>1}},t.linearSearch=function(e,r,n){for(var i=0,a=e.length-n;i<=a;i+=n)if(e[i]>r)return i;return-1},t}(),Fr;(function(t){t[t.rotate=0]="rotate",t[t.translate=1]="translate",t[t.scale=2]="scale",t[t.shear=3]="shear",t[t.attachment=4]="attachment",t[t.color=5]="color",t[t.deform=6]="deform",t[t.event=7]="event",t[t.drawOrder=8]="drawOrder",t[t.ikConstraint=9]="ikConstraint",t[t.transformConstraint=10]="transformConstraint",t[t.pathConstraintPosition=11]="pathConstraintPosition",t[t.pathConstraintSpacing=12]="pathConstraintSpacing",t[t.pathConstraintMix=13]="pathConstraintMix",t[t.twoColor=14]="twoColor"})(Fr||(Fr={}));var da=function(){function t(e){if(e<=0)throw new Error("frameCount must be > 0: "+e);this.curves=q.newFloatArray((e-1)*t.BEZIER_SIZE)}return t.prototype.getFrameCount=function(){return this.curves.length/t.BEZIER_SIZE+1},t.prototype.setLinear=function(e){this.curves[e*t.BEZIER_SIZE]=t.LINEAR},t.prototype.setStepped=function(e){this.curves[e*t.BEZIER_SIZE]=t.STEPPED},t.prototype.getCurveType=function(e){var r=e*t.BEZIER_SIZE;if(r==this.curves.length)return t.LINEAR;var n=this.curves[r];return n==t.LINEAR?t.LINEAR:n==t.STEPPED?t.STEPPED:t.BEZIER},t.prototype.setCurve=function(e,r,n,i,a){var o=(-r*2+i)*.03,s=(-n*2+a)*.03,u=((r-i)*3+1)*.006,l=((n-a)*3+1)*.006,c=o*2+u,f=s*2+l,h=r*.3+o+u*.16666667,d=n*.3+s+l*.16666667,p=e*t.BEZIER_SIZE,v=this.curves;v[p++]=t.BEZIER;for(var g=h,m=d,y=p+t.BEZIER_SIZE-1;p=r){var l=void 0,c=void 0;return i==s?(l=0,c=0):(l=n[i-2],c=n[i-1]),c+(n[i+1]-c)*(r-l)/(o-l)}var f=n[i-1];return f+(1-f)*(r-o)/(1-o)},t.LINEAR=0,t.STEPPED=1,t.BEZIER=2,t.BEZIER_SIZE=10*2-1,t}(),mi=function(t){tr(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r<<1),n}return e.prototype.getPropertyId=function(){return(Fr.rotate<<24)+this.boneIndex},e.prototype.setFrame=function(r,n,i){r<<=1,this.frames[r]=n,this.frames[r+e.ROTATION]=i},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.bones[this.boneIndex];if(i=l[l.length-e.ENTRIES]){var h=l[l.length+e.PREV_ROTATION];switch(s){case R.setup:c.rotation=c.data.rotation+h*o;break;case R.first:case R.replace:h+=c.data.rotation-c.rotation,h-=(16384-(16384.499999999996-h/360|0))*360;case R.add:c.rotation+=h*o}return}var d=_r.binarySearch(l,i,e.ENTRIES),p=l[d+e.PREV_ROTATION],v=l[d],g=this.getCurvePercent((d>>1)-1,1-(i-v)/(l[d+e.PREV_TIME]-v)),m=l[d+e.ROTATION]-p;switch(m=p+(m-(16384-(16384.499999999996-m/360|0))*360)*g,s){case R.setup:c.rotation=c.data.rotation+(m-(16384-(16384.499999999996-m/360|0))*360)*o;break;case R.first:case R.replace:m+=c.data.rotation-c.rotation;case R.add:c.rotation+=(m-(16384-(16384.499999999996-m/360|0))*360)*o}},e.ENTRIES=2,e.PREV_TIME=-2,e.PREV_ROTATION=-1,e.ROTATION=1,e}(da),Tf=function(t){tr(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r*e.ENTRIES),n}return e.prototype.getPropertyId=function(){return(Fr.translate<<24)+this.boneIndex},e.prototype.setFrame=function(r,n,i,a){r*=e.ENTRIES,this.frames[r]=n,this.frames[r+e.X]=i,this.frames[r+e.Y]=a},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.bones[this.boneIndex];if(i=l[l.length-e.ENTRIES])f=l[l.length+e.PREV_X],h=l[l.length+e.PREV_Y];else{var d=_r.binarySearch(l,i,e.ENTRIES);f=l[d+e.PREV_X],h=l[d+e.PREV_Y];var p=l[d],v=this.getCurvePercent(d/e.ENTRIES-1,1-(i-p)/(l[d+e.PREV_TIME]-p));f+=(l[d+e.X]-f)*v,h+=(l[d+e.Y]-h)*v}switch(s){case R.setup:c.x=c.data.x+f*o,c.y=c.data.y+h*o;break;case R.first:case R.replace:c.x+=(c.data.x+f-c.x)*o,c.y+=(c.data.y+h-c.y)*o;break;case R.add:c.x+=f*o,c.y+=h*o}},e.ENTRIES=3,e.PREV_TIME=-3,e.PREV_X=-2,e.PREV_Y=-1,e.X=1,e.Y=2,e}(da),p3=function(t){tr(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getPropertyId=function(){return(Fr.scale<<24)+this.boneIndex},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.bones[this.boneIndex];if(i=l[l.length-e.ENTRIES])f=l[l.length+e.PREV_X]*c.data.scaleX,h=l[l.length+e.PREV_Y]*c.data.scaleY;else{var d=_r.binarySearch(l,i,e.ENTRIES);f=l[d+e.PREV_X],h=l[d+e.PREV_Y];var p=l[d],v=this.getCurvePercent(d/e.ENTRIES-1,1-(i-p)/(l[d+e.PREV_TIME]-p));f=(f+(l[d+e.X]-f)*v)*c.data.scaleX,h=(h+(l[d+e.Y]-h)*v)*c.data.scaleY}if(o==1)s==R.add?(c.scaleX+=f-c.data.scaleX,c.scaleY+=h-c.data.scaleY):(c.scaleX=f,c.scaleY=h);else{var g=0,m=0;if(u==je.mixOut)switch(s){case R.setup:g=c.data.scaleX,m=c.data.scaleY,c.scaleX=g+(Math.abs(f)*N.signum(g)-g)*o,c.scaleY=m+(Math.abs(h)*N.signum(m)-m)*o;break;case R.first:case R.replace:g=c.scaleX,m=c.scaleY,c.scaleX=g+(Math.abs(f)*N.signum(g)-g)*o,c.scaleY=m+(Math.abs(h)*N.signum(m)-m)*o;break;case R.add:g=c.scaleX,m=c.scaleY,c.scaleX=g+(Math.abs(f)*N.signum(g)-c.data.scaleX)*o,c.scaleY=m+(Math.abs(h)*N.signum(m)-c.data.scaleY)*o}else switch(s){case R.setup:g=Math.abs(c.data.scaleX)*N.signum(f),m=Math.abs(c.data.scaleY)*N.signum(h),c.scaleX=g+(f-g)*o,c.scaleY=m+(h-m)*o;break;case R.first:case R.replace:g=Math.abs(c.scaleX)*N.signum(f),m=Math.abs(c.scaleY)*N.signum(h),c.scaleX=g+(f-g)*o,c.scaleY=m+(h-m)*o;break;case R.add:g=N.signum(f),m=N.signum(h),c.scaleX=Math.abs(c.scaleX)*g+(f-Math.abs(c.data.scaleX)*g)*o,c.scaleY=Math.abs(c.scaleY)*m+(h-Math.abs(c.data.scaleY)*m)*o}}},e}(Tf),v3=function(t){tr(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getPropertyId=function(){return(Fr.shear<<24)+this.boneIndex},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.bones[this.boneIndex];if(i=l[l.length-e.ENTRIES])f=l[l.length+e.PREV_X],h=l[l.length+e.PREV_Y];else{var d=_r.binarySearch(l,i,e.ENTRIES);f=l[d+e.PREV_X],h=l[d+e.PREV_Y];var p=l[d],v=this.getCurvePercent(d/e.ENTRIES-1,1-(i-p)/(l[d+e.PREV_TIME]-p));f=f+(l[d+e.X]-f)*v,h=h+(l[d+e.Y]-h)*v}switch(s){case R.setup:c.shearX=c.data.shearX+f*o,c.shearY=c.data.shearY+h*o;break;case R.first:case R.replace:c.shearX+=(c.data.shearX+f-c.shearX)*o,c.shearY+=(c.data.shearY+h-c.shearY)*o;break;case R.add:c.shearX+=f*o,c.shearY+=h*o}},e}(Tf),a1=function(t){tr(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r*e.ENTRIES),n}return e.prototype.getPropertyId=function(){return(Fr.color<<24)+this.slotIndex},e.prototype.setFrame=function(r,n,i,a,o,s){r*=e.ENTRIES,this.frames[r]=n,this.frames[r+e.R]=i,this.frames[r+e.G]=a,this.frames[r+e.B]=o,this.frames[r+e.A]=s},e.prototype.apply=function(r,n,i,a,o,s,u){var l=r.slots[this.slotIndex],c=this.frames;if(i=c[c.length-e.ENTRIES]){var m=c.length;d=c[m+e.PREV_R],p=c[m+e.PREV_G],v=c[m+e.PREV_B],g=c[m+e.PREV_A]}else{var y=_r.binarySearch(c,i,e.ENTRIES);d=c[y+e.PREV_R],p=c[y+e.PREV_G],v=c[y+e.PREV_B],g=c[y+e.PREV_A];var _=c[y],x=this.getCurvePercent(y/e.ENTRIES-1,1-(i-_)/(c[y+e.PREV_TIME]-_));d+=(c[y+e.R]-d)*x,p+=(c[y+e.G]-p)*x,v+=(c[y+e.B]-v)*x,g+=(c[y+e.A]-g)*x}if(o==1)l.color.set(d,p,v,g);else{var f=l.color;s==R.setup&&f.setFromColor(l.data.color),f.add((d-f.r)*o,(p-f.g)*o,(v-f.b)*o,(g-f.a)*o)}},e.ENTRIES=5,e.PREV_TIME=-5,e.PREV_R=-4,e.PREV_G=-3,e.PREV_B=-2,e.PREV_A=-1,e.R=1,e.G=2,e.B=3,e.A=4,e}(da),o1=function(t){tr(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r*e.ENTRIES),n}return e.prototype.getPropertyId=function(){return(Fr.twoColor<<24)+this.slotIndex},e.prototype.setFrame=function(r,n,i,a,o,s,u,l,c){r*=e.ENTRIES,this.frames[r]=n,this.frames[r+e.R]=i,this.frames[r+e.G]=a,this.frames[r+e.B]=o,this.frames[r+e.A]=s,this.frames[r+e.R2]=u,this.frames[r+e.G2]=l,this.frames[r+e.B2]=c},e.prototype.apply=function(r,n,i,a,o,s,u){var l=r.slots[this.slotIndex],c=this.frames;if(i=c[c.length-e.ENTRIES]){var S=c.length;v=c[S+e.PREV_R],g=c[S+e.PREV_G],m=c[S+e.PREV_B],y=c[S+e.PREV_A],_=c[S+e.PREV_R2],x=c[S+e.PREV_G2],b=c[S+e.PREV_B2]}else{var w=_r.binarySearch(c,i,e.ENTRIES);v=c[w+e.PREV_R],g=c[w+e.PREV_G],m=c[w+e.PREV_B],y=c[w+e.PREV_A],_=c[w+e.PREV_R2],x=c[w+e.PREV_G2],b=c[w+e.PREV_B2];var E=c[w],T=this.getCurvePercent(w/e.ENTRIES-1,1-(i-E)/(c[w+e.PREV_TIME]-E));v+=(c[w+e.R]-v)*T,g+=(c[w+e.G]-g)*T,m+=(c[w+e.B]-m)*T,y+=(c[w+e.A]-y)*T,_+=(c[w+e.R2]-_)*T,x+=(c[w+e.G2]-x)*T,b+=(c[w+e.B2]-b)*T}if(o==1)l.color.set(v,g,m,y),l.darkColor.set(_,x,b,1);else{var f=l.color,h=l.darkColor;s==R.setup&&(f.setFromColor(l.data.color),h.setFromColor(l.data.darkColor)),f.add((v-f.r)*o,(g-f.g)*o,(m-f.b)*o,(y-f.a)*o),h.add((_-h.r)*o,(x-h.g)*o,(b-h.b)*o,0)}},e.ENTRIES=8,e.PREV_TIME=-8,e.PREV_R=-7,e.PREV_G=-6,e.PREV_B=-5,e.PREV_A=-4,e.PREV_R2=-3,e.PREV_G2=-2,e.PREV_B2=-1,e.R=1,e.G=2,e.B=3,e.A=4,e.R2=5,e.G2=6,e.B2=7,e}(da),Rp=function(){function t(e){this.frames=q.newFloatArray(e),this.attachmentNames=new Array(e)}return t.prototype.getPropertyId=function(){return(Fr.attachment<<24)+this.slotIndex},t.prototype.getFrameCount=function(){return this.frames.length},t.prototype.setFrame=function(e,r,n){this.frames[e]=r,this.attachmentNames[e]=n},t.prototype.apply=function(e,r,n,i,a,o,s){var u=e.slots[this.slotIndex];if(s==je.mixOut&&o==R.setup){var l=u.data.attachmentName;u.setAttachment(l==null?null:e.getAttachment(this.slotIndex,l));return}var c=this.frames;if(n=c[c.length-1]?h=c.length-1:h=_r.binarySearch(c,n,1)-1;var d=this.attachmentNames[h];e.slots[this.slotIndex].setAttachment(d==null?null:e.getAttachment(this.slotIndex,d))},t}(),gO=null,m3=function(t){tr(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r),n.frameVertices=new Array(r),gO==null&&(gO=q.newFloatArray(64)),n}return e.prototype.getPropertyId=function(){return(Fr.deform<<27)+ +this.attachment.id+this.slotIndex},e.prototype.setFrame=function(r,n,i){this.frames[r]=n,this.frameVertices[r]=i},e.prototype.apply=function(r,n,i,a,o,s,u){var l=r.slots[this.slotIndex],c=l.getAttachment();if(!(!(c instanceof Ns)||!c.applyDeform(this.attachment))){var f=l.attachmentVertices;f.length==0&&(s=R.setup);var h=this.frameVertices,d=h[0].length,p=this.frames;if(i=p[p.length-1]){var x=h[p.length-1];if(o==1)if(s==R.add){var v=c;if(v.bones==null)for(var m=v.vertices,y=0;yn)this.apply(e,r,Number.MAX_VALUE,i,a,o,s),r=-1;else if(r>=u[l-1])return;if(!(n0&&u[c-1]==f;)c--}for(;c=u[c];c++)i.push(this.events[c])}}},t}(),Ip=function(){function t(e){this.frames=q.newFloatArray(e),this.drawOrders=new Array(e)}return t.prototype.getPropertyId=function(){return Fr.drawOrder<<24},t.prototype.getFrameCount=function(){return this.frames.length},t.prototype.setFrame=function(e,r,n){this.frames[e]=r,this.drawOrders[e]=n},t.prototype.apply=function(e,r,n,i,a,o,s){var u=e.drawOrder,l=e.slots;if(s==je.mixOut&&o==R.setup){q.arrayCopy(e.slots,0,e.drawOrder,0,e.slots.length);return}var c=this.frames;if(n=c[c.length-1]?f=c.length-1:f=_r.binarySearch(c,n)-1;var h=this.drawOrders[f];if(h==null)q.arrayCopy(l,0,u,0,l.length);else for(var d=0,p=h.length;d=l[l.length-e.ENTRIES]){s==R.setup?(c.mix=c.data.mix+(l[l.length+e.PREV_MIX]-c.data.mix)*o,u==je.mixOut?(c.bendDirection=c.data.bendDirection,c.compress=c.data.compress,c.stretch=c.data.stretch):(c.bendDirection=l[l.length+e.PREV_BEND_DIRECTION],c.compress=l[l.length+e.PREV_COMPRESS]!=0,c.stretch=l[l.length+e.PREV_STRETCH]!=0)):(c.mix+=(l[l.length+e.PREV_MIX]-c.mix)*o,u==je.mixIn&&(c.bendDirection=l[l.length+e.PREV_BEND_DIRECTION],c.compress=l[l.length+e.PREV_COMPRESS]!=0,c.stretch=l[l.length+e.PREV_STRETCH]!=0));return}var f=_r.binarySearch(l,i,e.ENTRIES),h=l[f+e.PREV_MIX],d=l[f],p=this.getCurvePercent(f/e.ENTRIES-1,1-(i-d)/(l[f+e.PREV_TIME]-d));s==R.setup?(c.mix=c.data.mix+(h+(l[f+e.MIX]-h)*p-c.data.mix)*o,u==je.mixOut?(c.bendDirection=c.data.bendDirection,c.compress=c.data.compress,c.stretch=c.data.stretch):(c.bendDirection=l[f+e.PREV_BEND_DIRECTION],c.compress=l[f+e.PREV_COMPRESS]!=0,c.stretch=l[f+e.PREV_STRETCH]!=0)):(c.mix+=(h+(l[f+e.MIX]-h)*p-c.mix)*o,u==je.mixIn&&(c.bendDirection=l[f+e.PREV_BEND_DIRECTION],c.compress=l[f+e.PREV_COMPRESS]!=0,c.stretch=l[f+e.PREV_STRETCH]!=0))},e.ENTRIES=5,e.PREV_TIME=-5,e.PREV_MIX=-4,e.PREV_BEND_DIRECTION=-3,e.PREV_COMPRESS=-2,e.PREV_STRETCH=-1,e.MIX=1,e.BEND_DIRECTION=2,e.COMPRESS=3,e.STRETCH=4,e}(da),l1=function(t){tr(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r*e.ENTRIES),n}return e.prototype.getPropertyId=function(){return(Fr.transformConstraint<<24)+this.transformConstraintIndex},e.prototype.setFrame=function(r,n,i,a,o,s){r*=e.ENTRIES,this.frames[r]=n,this.frames[r+e.ROTATE]=i,this.frames[r+e.TRANSLATE]=a,this.frames[r+e.SCALE]=o,this.frames[r+e.SHEAR]=s},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.transformConstraints[this.transformConstraintIndex];if(i=l[l.length-e.ENTRIES]){var g=l.length;h=l[g+e.PREV_ROTATE],d=l[g+e.PREV_TRANSLATE],p=l[g+e.PREV_SCALE],v=l[g+e.PREV_SHEAR]}else{var m=_r.binarySearch(l,i,e.ENTRIES);h=l[m+e.PREV_ROTATE],d=l[m+e.PREV_TRANSLATE],p=l[m+e.PREV_SCALE],v=l[m+e.PREV_SHEAR];var y=l[m],_=this.getCurvePercent(m/e.ENTRIES-1,1-(i-y)/(l[m+e.PREV_TIME]-y));h+=(l[m+e.ROTATE]-h)*_,d+=(l[m+e.TRANSLATE]-d)*_,p+=(l[m+e.SCALE]-p)*_,v+=(l[m+e.SHEAR]-v)*_}if(s==R.setup){var f=c.data;c.rotateMix=f.rotateMix+(h-f.rotateMix)*o,c.translateMix=f.translateMix+(d-f.translateMix)*o,c.scaleMix=f.scaleMix+(p-f.scaleMix)*o,c.shearMix=f.shearMix+(v-f.shearMix)*o}else c.rotateMix+=(h-c.rotateMix)*o,c.translateMix+=(d-c.translateMix)*o,c.scaleMix+=(p-c.scaleMix)*o,c.shearMix+=(v-c.shearMix)*o},e.ENTRIES=5,e.PREV_TIME=-5,e.PREV_ROTATE=-4,e.PREV_TRANSLATE=-3,e.PREV_SCALE=-2,e.PREV_SHEAR=-1,e.ROTATE=1,e.TRANSLATE=2,e.SCALE=3,e.SHEAR=4,e}(da),kp=function(t){tr(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r*e.ENTRIES),n}return e.prototype.getPropertyId=function(){return(Fr.pathConstraintPosition<<24)+this.pathConstraintIndex},e.prototype.setFrame=function(r,n,i){r*=e.ENTRIES,this.frames[r]=n,this.frames[r+e.VALUE]=i},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.pathConstraints[this.pathConstraintIndex];if(i=l[l.length-e.ENTRIES])f=l[l.length+e.PREV_VALUE];else{var h=_r.binarySearch(l,i,e.ENTRIES);f=l[h+e.PREV_VALUE];var d=l[h],p=this.getCurvePercent(h/e.ENTRIES-1,1-(i-d)/(l[h+e.PREV_TIME]-d));f+=(l[h+e.VALUE]-f)*p}s==R.setup?c.position=c.data.position+(f-c.data.position)*o:c.position+=(f-c.position)*o},e.ENTRIES=2,e.PREV_TIME=-2,e.PREV_VALUE=-1,e.VALUE=1,e}(da),y3=function(t){tr(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getPropertyId=function(){return(Fr.pathConstraintSpacing<<24)+this.pathConstraintIndex},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.pathConstraints[this.pathConstraintIndex];if(i=l[l.length-e.ENTRIES])f=l[l.length+e.PREV_VALUE];else{var h=_r.binarySearch(l,i,e.ENTRIES);f=l[h+e.PREV_VALUE];var d=l[h],p=this.getCurvePercent(h/e.ENTRIES-1,1-(i-d)/(l[h+e.PREV_TIME]-d));f+=(l[h+e.VALUE]-f)*p}s==R.setup?c.spacing=c.data.spacing+(f-c.data.spacing)*o:c.spacing+=(f-c.spacing)*o},e}(kp),u1=function(t){tr(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r*e.ENTRIES),n}return e.prototype.getPropertyId=function(){return(Fr.pathConstraintMix<<24)+this.pathConstraintIndex},e.prototype.setFrame=function(r,n,i,a){r*=e.ENTRIES,this.frames[r]=n,this.frames[r+e.ROTATE]=i,this.frames[r+e.TRANSLATE]=a},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.pathConstraints[this.pathConstraintIndex];if(i=l[l.length-e.ENTRIES])f=l[l.length+e.PREV_ROTATE],h=l[l.length+e.PREV_TRANSLATE];else{var d=_r.binarySearch(l,i,e.ENTRIES);f=l[d+e.PREV_ROTATE],h=l[d+e.PREV_TRANSLATE];var p=l[d],v=this.getCurvePercent(d/e.ENTRIES-1,1-(i-p)/(l[d+e.PREV_TIME]-p));f+=(l[d+e.ROTATE]-f)*v,h+=(l[d+e.TRANSLATE]-h)*v}s==R.setup?(c.rotateMix=c.data.rotateMix+(f-c.data.rotateMix)*o,c.translateMix=c.data.translateMix+(h-c.data.translateMix)*o):(c.rotateMix+=(f-c.rotateMix)*o,c.translateMix+=(h-c.translateMix)*o)},e.ENTRIES=3,e.PREV_TIME=-3,e.PREV_ROTATE=-2,e.PREV_TRANSLATE=-1,e.ROTATE=1,e.TRANSLATE=2,e}(da),_3=function(){function t(e){this.tracks=new Array,this.events=new Array,this.listeners=new Array,this.queue=new b3(this),this.propertyIDs=new qD,this.animationsChanged=!1,this.timeScale=1,this.trackEntryPool=new hm(function(){return new x3}),this.data=e}return t.prototype.update=function(e){e*=this.timeScale;for(var r=this.tracks,n=0,i=r.length;n0){if(a.delay-=o,a.delay>0)continue;o=-a.delay,a.delay=0}var s=a.next;if(s!=null){var u=a.trackLast-s.delay;if(u>=0){for(s.delay=0,s.trackTime=a.timeScale==0?0:(u/a.timeScale+e)*s.timeScale,a.trackTime+=o,this.setCurrent(n,s,!0);s.mixingFrom!=null;)s.mixTime+=e,s=s.mixingFrom;continue}}else if(a.trackLast>=a.trackEnd&&a.mixingFrom==null){r[n]=null,this.queue.end(a),this.disposeNext(a);continue}if(a.mixingFrom!=null&&this.updateMixingFrom(a,e)){var l=a.mixingFrom;for(a.mixingFrom=null,l!=null&&(l.mixingTo=null);l!=null;)this.queue.end(l),l=l.mixingFrom}a.trackTime+=o}}this.queue.drain()},t.prototype.updateMixingFrom=function(e,r){var n=e.mixingFrom;if(n==null)return!0;var i=this.updateMixingFrom(n,r);return n.animationLast=n.nextAnimationLast,n.trackLast=n.nextTrackLast,e.mixTime>0&&e.mixTime>=e.mixDuration?((n.totalAlpha==0||e.mixDuration==0)&&(e.mixingFrom=n.mixingFrom,n.mixingFrom!=null&&(n.mixingFrom.mixingTo=e),e.interruptAlpha=n.interruptAlpha,this.queue.end(n)),i):(n.trackTime+=r*n.timeScale,e.mixTime+=r,!1)},t.prototype.apply=function(e){if(e==null)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var r=this.events,n=this.tracks,i=!1,a=0,o=n.length;a0)){i=!0;var u=a==0?R.first:s.mixBlend,l=s.alpha;s.mixingFrom!=null?l*=this.applyMixingFrom(s,e,u):s.trackTime>=s.trackEnd&&s.next==null&&(l=0);var c=s.animationLast,f=s.getAnimationTime(),h=s.animation.timelines.length,d=s.animation.timelines;if(a==0&&l==1||u==R.add)for(var p=0;p1&&(a=1),n!=R.first&&(n=i.mixBlend));var o=a0&&this.queueEvents(i,c),this.events.length=0,i.nextAnimationLast=c,i.nextTrackLast=i.trackTime,a},t.prototype.applyRotateTimeline=function(e,r,n,i,a,o,s,u){if(u&&(o[s]=0),i==1){e.apply(r,0,n,null,1,a,je.mixIn);return}var l=e,c=l.frames,f=r.bones[l.boneIndex],h=0,d=0;if(n=c[c.length-mi.ENTRIES])d=f.data.rotation+c[c.length+mi.PREV_ROTATION];else{var p=_r.binarySearch(c,n,mi.ENTRIES),v=c[p+mi.PREV_ROTATION],g=c[p],m=l.getCurvePercent((p>>1)-1,1-(n-g)/(c[p+mi.PREV_TIME]-g));d=c[p+mi.ROTATION]-v,d-=(16384-(16384.499999999996-d/360|0))*360,d=v+d*m+f.data.rotation,d-=(16384-(16384.499999999996-d/360|0))*360}var y=0,_=d-h;if(_-=(16384-(16384.499999999996-_/360|0))*360,_==0)y=o[s];else{var x=0,b=0;u?(x=0,b=_):(x=o[s],b=o[s+1]);var S=_>0,w=x>=0;N.signum(b)!=N.signum(_)&&Math.abs(b)<=90&&(Math.abs(x)>180&&(x+=360*N.signum(x)),w=S),y=_+x-x%360,w!=S&&(y+=360*N.signum(x)),o[s]=y}o[s+1]=_,h+=y*i,f.rotation=h-(16384-(16384.499999999996-h/360|0))*360},t.prototype.queueEvents=function(e,r){for(var n=e.animationStart,i=e.animationEnd,a=i-n,o=e.trackLast%a,s=this.events,u=0,l=s.length;ui||this.queue.event(e,c)}var f=!1;for(e.loop?f=a==0||o>e.trackTime%a:f=r>=i&&e.animationLast=this.tracks.length)){var r=this.tracks[e];if(r!=null){this.queue.end(r),this.disposeNext(r);for(var n=r;;){var i=n.mixingFrom;if(i==null)break;this.queue.end(i),n.mixingFrom=null,n.mixingTo=null,n=i}this.tracks[r.trackIndex]=null,this.queue.drain()}}},t.prototype.setCurrent=function(e,r,n){var i=this.expandToIndex(e);this.tracks[e]=r,i!=null&&(n&&this.queue.interrupt(i),r.mixingFrom=i,i.mixingTo=r,r.mixTime=0,i.mixingFrom!=null&&i.mixDuration>0&&(r.interruptAlpha*=Math.min(1,i.mixTime/i.mixDuration)),i.timelinesRotation.length=0),this.queue.start(r)},t.prototype.setAnimation=function(e,r,n){var i=this.data.skeletonData.findAnimation(r);if(i==null)throw new Error("Animation not found: "+r);return this.setAnimationWith(e,i,n)},t.prototype.setAnimationWith=function(e,r,n){if(r==null)throw new Error("animation cannot be null.");var i=!0,a=this.expandToIndex(e);a!=null&&(a.nextTrackLast==-1?(this.tracks[e]=a.mixingFrom,this.queue.interrupt(a),this.queue.end(a),this.disposeNext(a),a=a.mixingFrom,i=!1):this.disposeNext(a));var o=this.trackEntry(e,r,n,a);return this.setCurrent(e,o,i),this.queue.drain(),o},t.prototype.addAnimation=function(e,r,n,i){var a=this.data.skeletonData.findAnimation(r);if(a==null)throw new Error("Animation not found: "+r);return this.addAnimationWith(e,a,n,i)},t.prototype.addAnimationWith=function(e,r,n,i){if(r==null)throw new Error("animation cannot be null.");var a=this.expandToIndex(e);if(a!=null)for(;a.next!=null;)a=a.next;var o=this.trackEntry(e,r,n,a);if(a==null)this.setCurrent(e,o,!0),this.queue.drain();else if(a.next=o,i<=0){var s=a.animationEnd-a.animationStart;s!=0?(a.loop?i+=s*(1+(a.trackTime/s|0)):i+=Math.max(s,a.trackTime),i-=this.data.getMix(a.animation,r)):i=a.trackTime}return o.delay=i,o},t.prototype.setEmptyAnimation=function(e,r){var n=this.setAnimationWith(e,t.emptyAnimation,!1);return n.mixDuration=r,n.trackEnd=r,n},t.prototype.addEmptyAnimation=function(e,r,n){n<=0&&(n-=r);var i=this.addAnimationWith(e,t.emptyAnimation,!1,n);return i.mixDuration=r,i.trackEnd=r,i},t.prototype.setEmptyAnimations=function(e){var r=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var n=0,i=this.tracks.length;n0){a[u]=t.HOLD_MIX,o[u]=c;continue e}break}a[u]=t.HOLD}}},t.prototype.hasTimeline=function(e,r){for(var n=e.animation.timelines,i=0,a=n.length;i=this.tracks.length?null:this.tracks[e]},t.prototype.addListener=function(e){if(e==null)throw new Error("listener cannot be null.");this.listeners.push(e)},t.prototype.removeListener=function(e){var r=this.listeners.indexOf(e);r>=0&&this.listeners.splice(r,1)},t.prototype.clearListeners=function(){this.listeners.length=0},t.prototype.clearListenerNotifications=function(){this.queue.clear()},t.prototype.setAnimationByName=function(e,r,n){t.deprecatedWarning1||(t.deprecatedWarning1=!0,console.warn("Spine Deprecation Warning: AnimationState.setAnimationByName is deprecated, please use setAnimation from now on.")),this.setAnimation(e,r,n)},t.prototype.addAnimationByName=function(e,r,n,i){t.deprecatedWarning2||(t.deprecatedWarning2=!0,console.warn("Spine Deprecation Warning: AnimationState.addAnimationByName is deprecated, please use addAnimation from now on.")),this.addAnimation(e,r,n,i)},t.prototype.hasAnimation=function(e){var r=this.data.skeletonData.findAnimation(e);return r!==null},t.prototype.hasAnimationByName=function(e){return t.deprecatedWarning3||(t.deprecatedWarning3=!0,console.warn("Spine Deprecation Warning: AnimationState.hasAnimationByName is deprecated, please use hasAnimation from now on.")),this.hasAnimation(e)},t.emptyAnimation=new _r("",[],0),t.SUBSEQUENT=0,t.FIRST=1,t.HOLD=2,t.HOLD_MIX=3,t.deprecatedWarning1=!1,t.deprecatedWarning2=!1,t.deprecatedWarning3=!1,t}(),x3=function(){function t(){this.mixBlend=R.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}return t.prototype.reset=function(){this.next=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0},t.prototype.getAnimationTime=function(){if(this.loop){var e=this.animationEnd-this.animationStart;return e==0?this.animationStart:this.trackTime%e+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)},t.prototype.setAnimationLast=function(e){this.animationLast=e,this.nextAnimationLast=e},t.prototype.isComplete=function(){return this.trackTime>=this.animationEnd-this.animationStart},t.prototype.resetRotationDirections=function(){this.timelinesRotation.length=0},Object.defineProperty(t.prototype,"time",{get:function(){return t.deprecatedWarning1||(t.deprecatedWarning1=!0,console.warn("Spine Deprecation Warning: TrackEntry.time is deprecated, please use trackTime from now on.")),this.trackTime},set:function(e){t.deprecatedWarning1||(t.deprecatedWarning1=!0,console.warn("Spine Deprecation Warning: TrackEntry.time is deprecated, please use trackTime from now on.")),this.trackTime=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"endTime",{get:function(){return t.deprecatedWarning2||(t.deprecatedWarning2=!0,console.warn("Spine Deprecation Warning: TrackEntry.endTime is deprecated, please use trackEnd from now on.")),this.trackTime},set:function(e){t.deprecatedWarning2||(t.deprecatedWarning2=!0,console.warn("Spine Deprecation Warning: TrackEntry.endTime is deprecated, please use trackEnd from now on.")),this.trackTime=e},enumerable:!1,configurable:!0}),t.prototype.loopsCount=function(){return Math.floor(this.trackTime/this.trackEnd)},t.deprecatedWarning1=!1,t.deprecatedWarning2=!1,t}(),b3=function(){function t(e){this.objects=[],this.drainDisabled=!1,this.animState=e}return t.prototype.start=function(e){this.objects.push(sn.start),this.objects.push(e),this.animState.animationsChanged=!0},t.prototype.interrupt=function(e){this.objects.push(sn.interrupt),this.objects.push(e)},t.prototype.end=function(e){this.objects.push(sn.end),this.objects.push(e),this.animState.animationsChanged=!0},t.prototype.dispose=function(e){this.objects.push(sn.dispose),this.objects.push(e)},t.prototype.complete=function(e){this.objects.push(sn.complete),this.objects.push(e)},t.prototype.event=function(e,r){this.objects.push(sn.event),this.objects.push(e),this.objects.push(r)},t.prototype.deprecateStuff=function(){return t.deprecatedWarning1||(t.deprecatedWarning1=!0,console.warn("Spine Deprecation Warning: onComplete, onStart, onEnd, onEvent art deprecated, please use listeners from now on. 'state.addListener({ complete: function(track, event) { } })'")),!0},t.prototype.drain=function(){if(!this.drainDisabled){this.drainDisabled=!0;for(var e=this.objects,r=this.animState.listeners,n=0;n1e-4?(S=Math.abs(p*m-v*g)/S,v=g*S,m=p*S,w=Math.atan2(g,p)*N.radDeg):(p=0,g=0,w=90-Math.atan2(m,v)*N.radDeg);var E=n+o-w,T=n+s-w+90,y=N.cosDeg(E)*i,_=N.cosDeg(T)*a,x=N.sinDeg(E)*i,b=N.sinDeg(T)*a;l.a=p*y-v*x,l.c=p*_-v*b,l.b=g*y+m*x,l.d=g*_+m*b;break}case Ne.NoScale:case Ne.NoScaleOrReflection:{var A=N.cosDeg(n),O=N.sinDeg(n),P=(p*A+v*O)/c,k=(g*A+m*O)/f,S=Math.sqrt(P*P+k*k);S>1e-5&&(S=1/S),P*=S,k*=S,S=Math.sqrt(P*P+k*k),this.data.transformMode==Ne.NoScale&&p*m-v*g<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY>0)&&(S=-S);var M=Math.PI/2+Math.atan2(k,P),B=Math.cos(M)*S,j=Math.sin(M)*S,y=N.cosDeg(o)*i,_=N.cosDeg(90+s)*a,x=N.sinDeg(o)*i,b=N.sinDeg(90+s)*a;l.a=P*y+B*x,l.c=P*_+B*b,l.b=k*y+j*x,l.d=k*_+j*b;break}}l.a*=c,l.c*=c,l.b*=f,l.d*=f},t.prototype.setToSetupPose=function(){var e=this.data;this.x=e.x,this.y=e.y,this.rotation=e.rotation,this.scaleX=e.scaleX,this.scaleY=e.scaleY,this.shearX=e.shearX,this.shearY=e.shearY},t.prototype.getWorldRotationX=function(){return Math.atan2(this.matrix.b,this.matrix.a)*N.radDeg},t.prototype.getWorldRotationY=function(){return Math.atan2(this.matrix.d,this.matrix.c)*N.radDeg},t.prototype.getWorldScaleX=function(){var e=this.matrix;return Math.sqrt(e.a*e.a+e.c*e.c)},t.prototype.getWorldScaleY=function(){var e=this.matrix;return Math.sqrt(e.b*e.b+e.d*e.d)},t.prototype.updateAppliedTransform=function(){this.appliedValid=!0;var e=this.parent,r=this.matrix;if(e==null){this.ax=r.tx,this.ay=r.ty,this.arotation=Math.atan2(r.b,r.a)*N.radDeg,this.ascaleX=Math.sqrt(r.a*r.a+r.b*r.b),this.ascaleY=Math.sqrt(r.c*r.c+r.d*r.d),this.ashearX=0,this.ashearY=Math.atan2(r.a*r.c+r.b*r.d,r.a*r.d-r.b*r.c)*N.radDeg;return}var n=e.matrix,i=1/(n.a*n.d-n.b*n.c),a=r.tx-n.tx,o=r.ty-n.ty;this.ax=a*n.d*i-o*n.c*i,this.ay=o*n.a*i-a*n.b*i;var s=i*n.d,u=i*n.a,l=i*n.c,c=i*n.b,f=s*r.a-l*r.b,h=s*r.c-l*r.d,d=u*r.b-c*r.a,p=u*r.d-c*r.c;if(this.ashearX=0,this.ascaleX=Math.sqrt(f*f+d*d),this.ascaleX>1e-4){var v=f*p-h*d;this.ascaleY=v/this.ascaleX,this.ashearY=Math.atan2(f*h+d*p,v)*N.radDeg,this.arotation=Math.atan2(d,f)*N.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(h*h+p*p),this.ashearY=0,this.arotation=90-Math.atan2(p,h)*N.radDeg},t.prototype.worldToLocal=function(e){var r=this.matrix,n=r.a,i=r.c,a=r.b,o=r.d,s=1/(n*o-i*a),u=e.x-r.tx,l=e.y-r.ty;return e.x=u*o*s-l*i*s,e.y=l*n*s-u*a*s,e},t.prototype.localToWorld=function(e){var r=this.matrix,n=e.x,i=e.y;return e.x=n*r.a+i*r.c+r.tx,e.y=n*r.b+i*r.d+r.ty,e},t.prototype.worldToLocalRotation=function(e){var r=N.sinDeg(e),n=N.cosDeg(e),i=this.matrix;return Math.atan2(i.a*r-i.b*n,i.d*n-i.c*r)*N.radDeg},t.prototype.localToWorldRotation=function(e){var r=N.sinDeg(e),n=N.cosDeg(e),i=this.matrix;return Math.atan2(n*i.b+r*i.d,n*i.a+r*i.c)*N.radDeg},t.prototype.rotateWorld=function(e){var r=this.matrix,n=r.a,i=r.c,a=r.b,o=r.d,s=N.cosDeg(e),u=N.sinDeg(e);r.a=s*n-u*a,r.c=s*i-u*o,r.b=u*n+s*a,r.d=u*i+s*o,this.appliedValid=!1},t}(),E3=function(){function t(e,r,n){if(this.x=0,this.y=0,this.rotation=0,this.scaleX=1,this.scaleY=1,this.shearX=0,this.shearY=0,this.transformMode=Ne.Normal,e<0)throw new Error("index must be >= 0.");if(r==null)throw new Error("name cannot be null.");this.index=e,this.name=r,this.parent=n}return t}(),T3=function(){function t(e,r){if(r==null)throw new Error("data cannot be null.");this.time=e,this.data=r}return t}(),A3=function(){function t(e){this.name=e}return t}(),C3=function(){function t(e,r){if(this.bendDirection=0,this.compress=!1,this.stretch=!1,this.mix=1,e==null)throw new Error("data cannot be null.");if(r==null)throw new Error("skeleton cannot be null.");this.data=e,this.mix=e.mix,this.bendDirection=e.bendDirection,this.compress=e.compress,this.stretch=e.stretch,this.bones=new Array;for(var n=0;n180?p-=360:p<-180&&(p+=360);var v=e.ascaleX,g=e.ascaleY;if(i||a){var m=e.data.length*v,y=Math.sqrt(h*h+d*d);if(i&&ym&&m>1e-4){var _=(y/m-1)*s+1;v*=_,o&&(g*=_)}}e.updateWorldTransformWith(e.ax,e.ay,e.arotation+p*s,v,g,e.ashearX,e.ashearY)},t.prototype.apply2=function(e,r,n,i,a,o,s){if(s==0){r.updateWorldTransform();return}e.appliedValid||e.updateAppliedTransform(),r.appliedValid||r.updateAppliedTransform();var u=e.ax,l=e.ay,c=e.ascaleX,f=c,h=e.ascaleY,d=r.ascaleX,p=e.matrix,v=0,g=0,m=0;c<0?(c=-c,v=180,m=-1):(v=0,m=1),h<0&&(h=-h,m=-m),d<0?(d=-d,g=180):g=0;var y=r.ax,_=0,x=0,b=0,S=p.a,w=p.c,E=p.b,T=p.d,A=Math.abs(c-h)<=1e-4;A?(_=r.ay,x=S*y+w*_+p.tx,b=E*y+T*_+p.ty):(_=0,x=S*y+p.tx,b=E*y+p.ty);var O=e.parent.matrix;S=O.a,w=O.c,E=O.b,T=O.d;var P=1/(S*T-w*E),k=n-O.tx,M=i-O.ty,B=(k*T-M*w)*P-u,j=(M*S-k*E)*P-l,z=B*B+j*j;k=x-O.tx,M=b-O.ty;var J=(k*T-M*w)*P-u,Z=(M*S-k*E)*P-l,$=Math.sqrt(J*J+Z*Z),F=r.data.length*d,G=0,V=0;e:if(A){F*=c;var U=(z-$*$-F*F)/(2*$*F);U<-1?U=-1:U>1&&(U=1,o&&$+F>1e-4&&(f*=(Math.sqrt(z)/($+F)-1)*s+1)),V=Math.acos(U)*a,S=$+F*U,w=F*Math.sin(V),G=Math.atan2(j*S-B*w,B*S+j*w)}else{S=c*F,w=h*F;var H=S*S,ee=w*w,ie=Math.atan2(j,B);E=ee*$*$+H*z-H*ee;var ae=-2*ee*$,pe=ee-H;if(T=ae*ae-4*pe*E,T>=0){var ye=Math.sqrt(T);ae<0&&(ye=-ye),ye=-(ae+ye)/2;var oe=ye/pe,_e=E/ye,Ce=Math.abs(oe)=-1&&E<=1&&(E=Math.acos(E),k=S*Math.cos(E)+$,M=w*Math.sin(E),T=k*k+M*M,TEt&&(Xe=E,Et=T,tt=k,$t=M)),z<=(ke+Et)/2?(G=ie-Math.atan2(we*a,Oe),V=be*a):(G=ie-Math.atan2($t*a,tt),V=Xe*a)}var qt=Math.atan2(_,y)*m,_t=e.arotation;G=(G-qt)*N.radDeg+v-_t,G>180?G-=360:G<-180&&(G+=360),e.updateWorldTransformWith(u,l,_t+G*s,f,e.ascaleY,0,0),_t=r.arotation,V=((V+qt)*N.radDeg-r.ashearX)*m+g-_t,V>180?V-=360:V<-180&&(V+=360),r.updateWorldTransformWith(y,_,_t+V*s,r.ascaleX,r.ascaleY,r.ashearX,r.ashearY)},t}(),P3=function(){function t(e){this.order=0,this.bones=new Array,this.bendDirection=1,this.compress=!1,this.stretch=!1,this.uniform=!1,this.mix=1,this.name=e}return t}(),O3=function(){function t(e){this.order=0,this.bones=new Array,this.name=e}return t}(),Hn;(function(t){t[t.Length=0]="Length",t[t.Fixed=1]="Fixed",t[t.Percent=2]="Percent"})(Hn||(Hn={}));var R3=function(){function t(e,r){if(this.position=0,this.spacing=0,this.rotateMix=0,this.translateMix=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,e==null)throw new Error("data cannot be null.");if(r==null)throw new Error("skeleton cannot be null.");this.data=e,this.bones=new Array;for(var n=0,i=e.bones.length;n0,a=r>0;if(!(!i&&!a)){var o=this.data,s=o.spacingMode,u=s==Hn.Length,l=o.rotateMode,c=l==Wt.Tangent,f=l==Wt.ChainScale,h=this.bones.length,d=c?h:h+1,p=this.bones,v=q.setArraySize(this.spaces,d),g=null,m=this.spacing;if(f||u){f&&(g=q.setArraySize(this.lengths,h));for(var y=0,_=d-1;y<_;){var x=p[y],b=x.data.length;if(b0?N.degRad:-N.degRad}for(var y=0,M=3;yN.PI?U-=N.PI2:U<-N.PI&&(U+=N.PI2),U*=r,H=Math.cos(U),ee=Math.sin(U),B.a=H*$-ee*G,B.c=H*F-ee*V,B.b=ee*$+H*G,B.d=ee*F+H*V}x.appliedValid=!1}}}},t.prototype.computeWorldPositions=function(e,r,n,i,a){var o=this.target,s=this.position,u=this.spaces,l=q.setArraySize(this.positions,r*3+2),c=null,f=e.closed,h=e.worldVerticesLength,d=h/6,p=t.NONE;if(!e.constantSpeed){var v=e.lengths;d-=f?1:2;var g=v[d];if(i&&(s*=g),a)for(var m=0;mg){p!=t.AFTER&&(p=t.AFTER,e.computeWorldVertices(o,h-6,4,c,0,2)),this.addAfterPosition(b-g,c,0,l,y);continue}for(;;_++){var S=v[_];if(!(b>S)){if(_==0)b/=S;else{var w=v[_-1];b=(b-w)/(S-w)}break}}_!=p&&(p=_,f&&_==d?(e.computeWorldVertices(o,h-4,4,c,0,2),e.computeWorldVertices(o,0,4,c,4,2)):e.computeWorldVertices(o,_*6+2,8,c,0,2)),this.addCurvePosition(b,c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],l,y,n||m>0&&x==0)}return l}f?(h+=2,c=q.setArraySize(this.world,h),e.computeWorldVertices(o,2,h-4,c,0,2),e.computeWorldVertices(o,0,2,c,h-4,2),c[h-2]=c[0],c[h-1]=c[1]):(d--,h-=4,c=q.setArraySize(this.world,h),e.computeWorldVertices(o,2,h,c,0,2));for(var E=q.setArraySize(this.curves,d),T=0,A=c[0],O=c[1],P=0,k=0,M=0,B=0,j=0,z=0,J=0,Z=0,$=0,F=0,G=0,V=0,U=0,H=0,m=0,ee=2;mT){this.addAfterPosition(b-T,c,h-4,l,y);continue}for(;;_++){var ye=E[_];if(!(b>ye)){if(_==0)b/=ye;else{var w=E[_-1];b=(b-w)/(ye-w)}break}}if(_!=p){p=_;var oe=_*6;for(A=c[oe],O=c[oe+1],P=c[oe+2],k=c[oe+3],M=c[oe+4],B=c[oe+5],j=c[oe+6],z=c[oe+7],J=(A-P*2+M)*.03,Z=(O-k*2+B)*.03,$=((P-M)*3-A+j)*.006,F=((k-B)*3-O+z)*.006,G=J*2+$,V=Z*2+F,U=(P-A)*.3+J+$*.16666667,H=(k-O)*.3+Z+F*.16666667,ae=Math.sqrt(U*U+H*H),ie[0]=ae,oe=1;oe<8;oe++)U+=G,H+=V,G+=$,V+=F,ae+=Math.sqrt(U*U+H*H),ie[oe]=ae;U+=G,H+=V,ae+=Math.sqrt(U*U+H*H),ie[8]=ae,U+=G+$,H+=V+F,ae+=Math.sqrt(U*U+H*H),ie[9]=ae,pe=0}for(b*=ae;;pe++){var _e=ie[pe];if(!(b>_e)){if(pe==0)b/=_e;else{var w=ie[pe-1];b=pe+(b-w)/(_e-w)}break}}this.addCurvePosition(b*.1,A,O,P,k,M,B,j,z,l,y,n||m>0&&x==0)}return l},t.prototype.addBeforePosition=function(e,r,n,i,a){var o=r[n],s=r[n+1],u=r[n+2]-o,l=r[n+3]-s,c=Math.atan2(l,u);i[a]=o+e*Math.cos(c),i[a+1]=s+e*Math.sin(c),i[a+2]=c},t.prototype.addAfterPosition=function(e,r,n,i,a){var o=r[n+2],s=r[n+3],u=o-r[n],l=s-r[n+1],c=Math.atan2(l,u);i[a]=o+e*Math.cos(c),i[a+1]=s+e*Math.sin(c),i[a+2]=c},t.prototype.addCurvePosition=function(e,r,n,i,a,o,s,u,l,c,f,h){(e==0||isNaN(e))&&(e=1e-4);var d=e*e,p=d*e,v=1-e,g=v*v,m=g*v,y=v*e,_=y*3,x=v*_,b=_*e,S=r*m+i*x+o*b+u*p,w=n*m+a*x+s*b+l*p;c[f]=S,c[f+1]=w,h&&(c[f+2]=Math.atan2(w-(n*g+a*y*2+s*d),S-(r*g+i*y*2+o*d)))},t.prototype.getOrder=function(){return this.data.order},t.NONE=-1,t.BEFORE=-2,t.AFTER=-3,t.epsilon=1e-5,t}(),I3=function(){function t(e,r){if(this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.temp=new gf,e==null)throw new Error("data cannot be null.");if(r==null)throw new Error("skeleton cannot be null.");this.data=e,this.rotateMix=e.rotateMix,this.translateMix=e.translateMix,this.scaleMix=e.scaleMix,this.shearMix=e.shearMix,this.bones=new Array;for(var n=0;n0?N.degRad:-N.degRad,h=this.data.offsetRotation*f,d=this.data.offsetShearY*f,p=this.bones,v=0,g=p.length;vN.PI?E-=N.PI2:E<-N.PI&&(E+=N.PI2),E*=e;var T=Math.cos(E),A=Math.sin(E);_.a=T*x-A*S,_.c=T*b-A*w,_.b=A*x+T*S,_.d=A*b+T*w,y=!0}if(r!=0){var O=this.temp;a.localToWorld(O.set(this.data.offsetX,this.data.offsetY)),_.tx+=(O.x-_.tx)*r,_.ty+=(O.y-_.ty)*r,y=!0}if(n>0){var P=Math.sqrt(_.a*_.a+_.b*_.b),k=Math.sqrt(s*s+l*l);P>1e-5&&(P=(P+(k-P+this.data.offsetScaleX)*n)/P),_.a*=P,_.b*=P,P=Math.sqrt(_.c*_.c+_.d*_.d),k=Math.sqrt(u*u+c*c),P>1e-5&&(P=(P+(k-P+this.data.offsetScaleY)*n)/P),_.c*=P,_.d*=P,y=!0}if(i>0){var b=_.c,w=_.d,M=Math.atan2(w,b),E=Math.atan2(c,u)-Math.atan2(l,s)-(M-Math.atan2(_.b,_.a));E>N.PI?E-=N.PI2:E<-N.PI&&(E+=N.PI2),E=M+(E+d)*i;var P=Math.sqrt(b*b+w*w);_.c=Math.cos(E)*P,_.d=Math.sin(E)*P,y=!0}y&&(m.appliedValid=!1)}},t.prototype.applyRelativeWorld=function(){for(var e=this.rotateMix,r=this.translateMix,n=this.scaleMix,i=this.shearMix,a=this.target,o=a.matrix,s=o.a,u=o.c,l=o.b,c=o.d,f=s*c-u*l>0?N.degRad:-N.degRad,h=this.data.offsetRotation*f,d=this.data.offsetShearY*f,p=this.bones,v=0,g=p.length;vN.PI?E-=N.PI2:E<-N.PI&&(E+=N.PI2),E*=e;var T=Math.cos(E),A=Math.sin(E);_.a=T*x-A*S,_.c=T*b-A*w,_.b=A*x+T*S,_.d=A*b+T*w,y=!0}if(r!=0){var O=this.temp;a.localToWorld(O.set(this.data.offsetX,this.data.offsetY)),_.tx+=O.x*r,_.ty+=O.y*r,y=!0}if(n>0){var P=(Math.sqrt(s*s+l*l)-1+this.data.offsetScaleX)*n+1;_.a*=P,_.b*=P,P=(Math.sqrt(u*u+c*c)-1+this.data.offsetScaleY)*n+1,_.c*=P,_.d*=P,y=!0}if(i>0){var E=Math.atan2(c,u)-Math.atan2(l,s);E>N.PI?E-=N.PI2:E<-N.PI&&(E+=N.PI2);var b=_.c,w=_.d;E=Math.atan2(w,b)+(E-N.PI/2+d)*i;var P=Math.sqrt(b*b+w*w);_.c=Math.cos(E)*P,_.d=Math.sin(E)*P,y=!0}y&&(m.appliedValid=!1)}},t.prototype.applyAbsoluteLocal=function(){var e=this.rotateMix,r=this.translateMix,n=this.scaleMix,i=this.shearMix,a=this.target;a.appliedValid||a.updateAppliedTransform();for(var o=this.bones,s=0,u=o.length;s0&&(p>1e-5&&(p=(p+(a.ascaleX-p+this.data.offsetScaleX)*n)/p),v>1e-5&&(v=(v+(a.ascaleY-v+this.data.offsetScaleY)*n)/v));var g=l.ashearY;if(i>0){var f=a.ashearY-g+this.data.offsetShearY;f-=(16384-(16384.499999999996-f/360|0))*360,l.shearY+=f*i}l.updateWorldTransformWith(h,d,c,p,v,l.ashearX,g)}},t.prototype.applyRelativeLocal=function(){var e=this.rotateMix,r=this.translateMix,n=this.scaleMix,i=this.shearMix,a=this.target;a.appliedValid||a.updateAppliedTransform();for(var o=this.bones,s=0,u=o.length;s0&&(d>1e-5&&(d*=(a.ascaleX-1+this.data.offsetScaleX)*n+1),p>1e-5&&(p*=(a.ascaleY-1+this.data.offsetScaleY)*n+1));var v=l.ashearY;i>0&&(v+=(a.ashearY+this.data.offsetShearY)*i),l.updateWorldTransformWith(f,h,c,d,p,l.ashearX,v)}},t.prototype.getOrder=function(){return this.data.order},t}(),k3=function(){function t(e){if(this._updateCache=new Array,this.updateCacheReset=new Array,this.time=0,this.scaleX=1,this.scaleY=1,this.x=0,this.y=0,e==null)throw new Error("data cannot be null.");this.data=e,this.bones=new Array;for(var r=0;r1){var a=n[n.length-1];this._updateCache.indexOf(a)>-1||this.updateCacheReset.push(a)}this._updateCache.push(e),this.sortReset(i.children),n[n.length-1].sorted=!0},t.prototype.sortPathConstraint=function(e){var r=e.target,n=r.data.index,i=r.bone;this.skin!=null&&this.sortPathConstraintAttachment(this.skin,n,i),this.data.defaultSkin!=null&&this.data.defaultSkin!=this.skin&&this.sortPathConstraintAttachment(this.data.defaultSkin,n,i);for(var a=0,o=this.data.skins.length;a-1||this.updateCacheReset.push(a)}else for(var i=0;i= 0.");if(r==null)throw new Error("name cannot be null.");if(n==null)throw new Error("boneData cannot be null.");this.index=e,this.name=r,this.boneData=n}return t}(),N3=function(){function t(e){if(this.order=0,this.bones=new Array,this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.offsetRotation=0,this.offsetX=0,this.offsetY=0,this.offsetScaleX=0,this.offsetScaleY=0,this.offsetShearY=0,this.relative=!1,this.local=!1,e==null)throw new Error("name cannot be null.");this.name=e}return t}(),L3=function(){function t(e){if(this.attachments=new Array,e==null)throw new Error("name cannot be null.");this.name=e}return t.prototype.addAttachment=function(e,r,n){if(n==null)throw new Error("attachment cannot be null.");var i=this.attachments;e>=i.length&&(i.length=e+1),i[e]||(i[e]={}),i[e][r]=n},t.prototype.getAttachment=function(e,r){var n=this.attachments[e];return n?n[r]:null},t.prototype.attachAll=function(e,r){for(var n=0,i=0;i=0;p--)pe[p]==-1&&(pe[p]=oe[--Ce])}h.setFrame(d++,ae.time,pe)}a.push(h),o=Math.max(o,h.frames[h.getFrameCount()-1])}if(e.events){for(var h=new g3(e.events.length),d=0,p=0;p>1)*s;var u=r.bone.skeleton,l=r.deform,c=this.vertices,f=this.bones;if(!f){l.length>0&&(c=l);for(var h=r.bone.matrix,d=h.tx,p=h.ty,v=h.a,g=h.c,m=h.b,y=h.d,_=n,x=o;x=this.regions.length&&(n=this.regions.length-1);var i=this.regions[n];r.region!=i&&(r.region=i)},t.prototype.getPath=function(e,r){for(var n=e,i=(this.start+r).toString(),a=this.digits-i.length;a>0;a--)n+="0";return n+=i,n},t.nextID=function(){return t._nextID++},t._nextID=0,t}(),Pr;(function(t){t[t.hold=0]="hold",t[t.once=1]="once",t[t.loop=2]="loop",t[t.pingpong=3]="pingpong",t[t.onceReverse=4]="onceReverse",t[t.loopReverse=5]="loopReverse",t[t.pingpongReverse=6]="pingpongReverse"})(Pr||(Pr={}));var nE=[Pr.hold,Pr.once,Pr.loop,Pr.pingpong,Pr.onceReverse,Pr.loopReverse,Pr.pingpongReverse],gm=function(){function t(e,r,n){if(this.timelines=[],this.timelineIds=new KD,!e)throw new Error("name cannot be null.");this.name=e,this.setTimelines(r),this.duration=n}return t.prototype.setTimelines=function(e){if(!e)throw new Error("timelines cannot be null.");this.timelines=e,this.timelineIds.clear();for(var r=0;r0&&(r%=this.duration));for(var l=this.timelines,c=0,f=l.length;cr)return i-1;return n-1},t.search=function(e,r,n){for(var i=e.length,a=n;ar)return a-n;return i-n},t}(),Pi=function(t){Ve(e,t);function e(r,n,i){var a=t.call(this,r,i)||this;return a.curves=q.newFloatArray(r+n*18),a.curves[r-1]=1,a}return e.prototype.setLinear=function(r){this.curves[r]=0},e.prototype.setStepped=function(r){this.curves[r]=1},e.prototype.shrink=function(r){var n=this.getFrameCount()+r*18;if(this.curves.length>n){var i=q.newFloatArray(n);q.arrayCopy(this.curves,0,i,0,n),this.curves=i}},e.prototype.setBezier=function(r,n,i,a,o,s,u,l,c,f,h){var d=this.curves,p=this.getFrameCount()+r*18;i==0&&(d[n]=2+p);for(var v=(a-s*2+l)*.03,g=(o-u*2+c)*.03,m=((s-l)*3-a+f)*.006,y=((u-c)*3-o+h)*.006,_=v*2+m,x=g*2+y,b=(s-a)*.3+v+m*.16666667,S=(u-o)*.3+g+y*.16666667,w=a+b,E=o+S,T=p+18;pr){var s=this.frames[n],u=this.frames[n+i];return u+(r-s)/(o[a]-s)*(o[a+1]-u)}var l=a+18;for(a+=2;a=r){var c=o[a-2],f=o[a-1];return f+(r-c)/(o[a]-c)*(o[a+1]-f)}n+=this.getFrameEntries();var h=o[l-2],d=o[l-1];return d+(r-h)/(this.frames[n]-h)*(this.frames[n+i]-d)},e}(Ht),Oi=function(t){Ve(e,t);function e(r,n,i){return t.call(this,r,n,[i])||this}return e.prototype.getFrameEntries=function(){return 2},e.prototype.setFrame=function(r,n,i){r<<=1,this.frames[r]=n,this.frames[r+1]=i},e.prototype.getCurveValue=function(r){for(var n=this.frames,i=n.length-2,a=2;a<=i;a+=2)if(n[a]>r){i=a-2;break}var o=this.curves[i>>1];switch(o){case 0:var s=n[i],u=n[i+1];return u+(r-s)/(n[i+2]-s)*(n[i+2+1]-u);case 1:return n[i+1]}return this.getBezierValue(r,i,1,o-2)},e}(Pi),ym=function(t){Ve(e,t);function e(r,n,i,a){return t.call(this,r,n,[i,a])||this}return e.prototype.getFrameEntries=function(){return 3},e.prototype.setFrame=function(r,n,i,a){r*=3,this.frames[r]=n,this.frames[r+1]=i,this.frames[r+2]=a},e}(Pi),Cf=function(t){Ve(e,t);function e(r,n,i){var a=t.call(this,r,n,nt.rotate+"|"+i)||this;return a.boneIndex=0,a.boneIndex=i,a}return e.prototype.apply=function(r,n,i,a,o,s,u){var l=r.bones[this.boneIndex];if(l.active){var c=this.frames;if(i>2];switch(m){case 0:var y=c[g];d=c[g+1],p=c[g+2],v=c[g+3];var _=(i-y)/(c[g+4]-y);d+=(c[g+4+1]-d)*_,p+=(c[g+4+2]-p)*_,v+=(c[g+4+3]-v)*_;break;case 1:d=c[g+1],p=c[g+2],v=c[g+3];break;default:d=this.getBezierValue(i,g,1,m-2),p=this.getBezierValue(i,g,2,m+18-2),v=this.getBezierValue(i,g,3,m+18*2-2)}if(o==1)f.r=d,f.g=p,f.b=v;else{if(s==R.setup){var h=l.data.color;f.r=h.r,f.g=h.g,f.b=h.b}f.r+=(d-f.r)*o,f.g+=(p-f.g)*o,f.b+=(v-f.b)*o}}},e}(Pi),vE=function(t){Ve(e,t);function e(r,n,i){var a=t.call(this,r,n,nt.alpha+"|"+i)||this;return a.slotIndex=0,a.slotIndex=i,a}return e.prototype.apply=function(r,n,i,a,o,s,u){var l=r.slots[this.slotIndex];if(l.bone.active){var c=l.color;if(i>3];switch(w){case 0:var E=c[S];v=c[S+1],g=c[S+2],m=c[S+3],y=c[S+4],_=c[S+5],x=c[S+6],b=c[S+7];var T=(i-E)/(c[S+8]-E);v+=(c[S+8+1]-v)*T,g+=(c[S+8+2]-g)*T,m+=(c[S+8+3]-m)*T,y+=(c[S+8+4]-y)*T,_+=(c[S+8+5]-_)*T,x+=(c[S+8+6]-x)*T,b+=(c[S+8+7]-b)*T;break;case 1:v=c[S+1],g=c[S+2],m=c[S+3],y=c[S+4],_=c[S+5],x=c[S+6],b=c[S+7];break;default:v=this.getBezierValue(i,S,1,w-2),g=this.getBezierValue(i,S,2,w+18-2),m=this.getBezierValue(i,S,3,w+18*2-2),y=this.getBezierValue(i,S,4,w+18*3-2),_=this.getBezierValue(i,S,5,w+18*4-2),x=this.getBezierValue(i,S,6,w+18*5-2),b=this.getBezierValue(i,S,7,w+18*6-2)}if(o==1)f.set(v,g,m,y),h.r=_,h.g=x,h.b=b;else{if(s==R.setup){f.setFromColor(l.data.color);var p=l.data.darkColor;h.r=p.r,h.g=p.g,h.b=p.b}f.add((v-f.r)*o,(g-f.g)*o,(m-f.b)*o,(y-f.a)*o),h.r+=(_-h.r)*o,h.g+=(x-h.g)*o,h.b+=(b-h.b)*o}}},e}(Pi),gE=function(t){Ve(e,t);function e(r,n,i){var a=t.call(this,r,n,[nt.rgb+"|"+i,nt.rgb2+"|"+i])||this;return a.slotIndex=0,a.slotIndex=i,a}return e.prototype.getFrameEntries=function(){return 7},e.prototype.setFrame=function(r,n,i,a,o,s,u,l){r*=7,this.frames[r]=n,this.frames[r+1]=i,this.frames[r+2]=a,this.frames[r+3]=o,this.frames[r+4]=s,this.frames[r+5]=u,this.frames[r+6]=l},e.prototype.apply=function(r,n,i,a,o,s,u){var l=r.slots[this.slotIndex];if(l.bone.active){var c=this.frames,f=l.color,h=l.darkColor;if(ir){var s=this.frames[n];return i[a+1]*(r-s)/(i[a]-s)}var u=a+18;for(a+=2;a=r){var l=i[a-2],c=i[a-1];return c+(r-l)/(i[a]-l)*(i[a+1]-c)}var f=i[u-2],h=i[u-1];return h+(1-h)*(r-f)/(this.frames[n+this.getFrameEntries()]-f)},e.prototype.apply=function(r,n,i,a,o,s,u){var l=r.slots[this.slotIndex];if(l.bone.active){var c=l.getAttachment();if(c&&!(!(c instanceof ia)||c.timelineAttachment!=this.attachment)){var f=l.deform;f.length==0&&(s=R.setup);var h=this.vertices,d=h[0].length,p=this.frames;if(i=p[p.length-1]){var y=h[p.length-1];if(o==1)if(s==R.add){var v=c;if(v.bones)for(var x=0;xi)this.apply(r,n,Number.MAX_VALUE,a,o,s,u),n=-1;else if(n>=l[c-1])return;if(!(i0&&l[f-1]==h;)f--}for(;f=l[f];f++)a.push(this.events[f])}}},e.propertyIds=[""+nt.event],e}(Ht),Rl=function(t){Ve(e,t);function e(r){var n=t.call(this,r,e.propertyIds)||this;return n.drawOrders=new Array(r),n}return e.prototype.getFrameCount=function(){return this.frames.length},e.prototype.setFrame=function(r,n,i){this.frames[r]=n,this.drawOrders[r]=i},e.prototype.apply=function(r,n,i,a,o,s,u){if(u==je.mixOut){s==R.setup&&q.arrayCopy(r.slots,0,r.drawOrder,0,r.slots.length);return}if(i>2];switch(v){case 0:var g=c[p];f=c[p+1],h=c[p+2],d=c[p+3];var m=(i-g)/(c[p+4]-g);f+=(c[p+4+1]-f)*m,h+=(c[p+4+2]-h)*m,d+=(c[p+4+3]-d)*m;break;case 1:f=c[p+1],h=c[p+2],d=c[p+3];break;default:f=this.getBezierValue(i,p,1,v-2),h=this.getBezierValue(i,p,2,v+18-2),d=this.getBezierValue(i,p,3,v+18*2-2)}if(s==R.setup){var y=l.data;l.mixRotate=y.mixRotate+(f-y.mixRotate)*o,l.mixX=y.mixX+(h-y.mixX)*o,l.mixY=y.mixY+(d-y.mixY)*o}else l.mixRotate+=(f-l.mixRotate)*o,l.mixX+=(h-l.mixX)*o,l.mixY+=(d-l.mixY)*o}},e}(Pi),EE=function(t){Ve(e,t);function e(r,n,i){var a=t.call(this,r,[nt.sequence+"|"+n+"|"+i.sequence.id])||this;return a.slotIndex=n,a.attachment=i,a}return e.prototype.getFrameEntries=function(){return e.ENTRIES},e.prototype.getSlotIndex=function(){return this.slotIndex},e.prototype.getAttachment=function(){return this.attachment},e.prototype.setFrame=function(r,n,i,a,o){var s=this.frames;r*=e.ENTRIES,s[r]=n,s[r+e.MODE]=i|a<<4,s[r+e.DELAY]=o},e.prototype.apply=function(r,n,i,a,o,s,u){var l=r.slots[this.slotIndex];if(l.bone.active){var c=l.attachment,f=this.attachment;if(!(c!=f&&(!(c instanceof ia)||c.timelineAttachment!=f))){var h=this.frames;if(i>4,y=this.attachment.sequence.regions.length,_=nE[v&15];if(_!=Pr.hold)switch(m+=(i-p)/g+1e-5|0,_){case Pr.once:m=Math.min(y-1,m);break;case Pr.loop:m%=y;break;case Pr.pingpong:{var x=(y<<1)-2;m=x==0?0:m%x,m>=y&&(m=x-m);break}case Pr.onceReverse:m=Math.max(y-1-m,0);break;case Pr.loopReverse:m=y-1-m%y;break;case Pr.pingpongReverse:{var x=(y<<1)-2;m=x==0?0:(m+y-1)%x,m>=y&&(m=x-m)}}l.sequenceIndex=m}}}},e.ENTRIES=3,e.MODE=1,e.DELAY=2,e}(Ht),$3=function(){function t(e){this.tracks=new Array,this.timeScale=1,this.unkeyedState=0,this.events=new Array,this.listeners=new Array,this.queue=new G3(this),this.propertyIDs=new KD,this.animationsChanged=!1,this.trackEntryPool=new hm(function(){return new V3}),this.data=e}return t.emptyAnimation=function(){return t._emptyAnimation},t.prototype.update=function(e){e*=this.timeScale;for(var r=this.tracks,n=0,i=r.length;n0){if(a.delay-=o,a.delay>0)continue;o=-a.delay,a.delay=0}var s=a.next;if(s){var u=a.trackLast-s.delay;if(u>=0){for(s.delay=0,s.trackTime+=a.timeScale==0?0:(u/a.timeScale+e)*s.timeScale,a.trackTime+=o,this.setCurrent(n,s,!0);s.mixingFrom;)s.mixTime+=e,s=s.mixingFrom;continue}}else if(a.trackLast>=a.trackEnd&&!a.mixingFrom){r[n]=null,this.queue.end(a),this.clearNext(a);continue}if(a.mixingFrom&&this.updateMixingFrom(a,e)){var l=a.mixingFrom;for(a.mixingFrom=null,l&&(l.mixingTo=null);l;)this.queue.end(l),l=l.mixingFrom}a.trackTime+=o}}this.queue.drain()},t.prototype.updateMixingFrom=function(e,r){var n=e.mixingFrom;if(!n)return!0;var i=this.updateMixingFrom(n,r);return n.animationLast=n.nextAnimationLast,n.trackLast=n.nextTrackLast,e.mixTime>0&&e.mixTime>=e.mixDuration?((n.totalAlpha==0||e.mixDuration==0)&&(e.mixingFrom=n.mixingFrom,n.mixingFrom&&(n.mixingFrom.mixingTo=e),e.interruptAlpha=n.interruptAlpha,this.queue.end(n)),i):(n.trackTime+=r*n.timeScale,e.mixTime+=r,!1)},t.prototype.apply=function(e){if(!e)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var r=this.events,n=this.tracks,i=!1,a=0,o=n.length;a0)){i=!0;var u=a==0?R.first:s.mixBlend,l=s.alpha;s.mixingFrom?l*=this.applyMixingFrom(s,e,u):s.trackTime>=s.trackEnd&&!s.next&&(l=0);var c=s.animationLast,f=s.getAnimationTime(),h=f,d=r;s.reverse&&(h=s.animation.duration-h,d=null);var p=s.animation.timelines,v=p.length;if(a==0&&l==1||u==R.add)for(var g=0;g1&&(a=1),n!=R.first&&(n=i.mixBlend));var o=a0&&this.queueEvents(i,d),this.events.length=0,i.nextAnimationLast=d,i.nextTrackLast=i.trackTime,a},t.prototype.applyAttachmentTimeline=function(e,r,n,i,a){var o=r.slots[e.slotIndex];o.bone.active&&(n0,y=v>=0;N.signum(g)!=N.signum(p)&&Math.abs(g)<=90&&(Math.abs(v)>180&&(v+=360*N.signum(v)),y=m),d=p+v-v%360,y!=m&&(d+=360*N.signum(v)),o[s]=d}o[s+1]=p,l.rotation=f+d*i}},t.prototype.queueEvents=function(e,r){for(var n=e.animationStart,i=e.animationEnd,a=i-n,o=e.trackLast%a,s=this.events,u=0,l=s.length;ui||this.queue.event(e,c)}var f=!1;for(e.loop?f=a==0||o>e.trackTime%a:f=r>=i&&e.animationLast=this.tracks.length)){var r=this.tracks[e];if(r){this.queue.end(r),this.clearNext(r);for(var n=r;;){var i=n.mixingFrom;if(!i)break;this.queue.end(i),n.mixingFrom=null,n.mixingTo=null,n=i}this.tracks[r.trackIndex]=null,this.queue.drain()}}},t.prototype.setCurrent=function(e,r,n){var i=this.expandToIndex(e);this.tracks[e]=r,r.previous=null,i&&(n&&this.queue.interrupt(i),r.mixingFrom=i,i.mixingTo=r,r.mixTime=0,i.mixingFrom&&i.mixDuration>0&&(r.interruptAlpha*=Math.min(1,i.mixTime/i.mixDuration)),i.timelinesRotation.length=0),this.queue.start(r)},t.prototype.setAnimation=function(e,r,n){n===void 0&&(n=!1);var i=this.data.skeletonData.findAnimation(r);if(!i)throw new Error("Animation not found: "+r);return this.setAnimationWith(e,i,n)},t.prototype.setAnimationWith=function(e,r,n){if(n===void 0&&(n=!1),!r)throw new Error("animation cannot be null.");var i=!0,a=this.expandToIndex(e);a&&(a.nextTrackLast==-1?(this.tracks[e]=a.mixingFrom,this.queue.interrupt(a),this.queue.end(a),this.clearNext(a),a=a.mixingFrom,i=!1):this.clearNext(a));var o=this.trackEntry(e,r,n,a);return this.setCurrent(e,o,i),this.queue.drain(),o},t.prototype.addAnimation=function(e,r,n,i){n===void 0&&(n=!1),i===void 0&&(i=0);var a=this.data.skeletonData.findAnimation(r);if(!a)throw new Error("Animation not found: "+r);return this.addAnimationWith(e,a,n,i)},t.prototype.addAnimationWith=function(e,r,n,i){if(n===void 0&&(n=!1),i===void 0&&(i=0),!r)throw new Error("animation cannot be null.");var a=this.expandToIndex(e);if(a)for(;a.next;)a=a.next;var o=this.trackEntry(e,r,n,a);return a?(a.next=o,o.previous=a,i<=0&&(i+=a.getTrackComplete()-o.mixDuration)):(this.setCurrent(e,o,!0),this.queue.drain()),o.delay=i,o},t.prototype.setEmptyAnimation=function(e,r){r===void 0&&(r=0);var n=this.setAnimationWith(e,t.emptyAnimation(),!1);return n.mixDuration=r,n.trackEnd=r,n},t.prototype.addEmptyAnimation=function(e,r,n){r===void 0&&(r=0),n===void 0&&(n=0);var i=this.addAnimationWith(e,t.emptyAnimation(),!1,n);return n<=0&&(i.delay+=i.mixDuration-r),i.mixDuration=r,i.trackEnd=r,i},t.prototype.setEmptyAnimations=function(e){e===void 0&&(e=0);var r=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var n=0,i=this.tracks.length;n0){a[u]=n_e,o[u]=f;continue e}break}a[u]=Vy}}},t.prototype.getCurrent=function(e){return e>=this.tracks.length?null:this.tracks[e]},t.prototype.addListener=function(e){if(!e)throw new Error("listener cannot be null.");this.listeners.push(e)},t.prototype.removeListener=function(e){var r=this.listeners.indexOf(e);r>=0&&this.listeners.splice(r,1)},t.prototype.clearListeners=function(){this.listeners.length=0},t.prototype.clearListenerNotifications=function(){this.queue.clear()},t.prototype.setAnimationByName=function(e,r,n){t.deprecatedWarning1||(t.deprecatedWarning1=!0,console.warn("Spine Deprecation Warning: AnimationState.setAnimationByName is deprecated, please use setAnimation from now on.")),this.setAnimation(e,r,n)},t.prototype.addAnimationByName=function(e,r,n,i){t.deprecatedWarning2||(t.deprecatedWarning2=!0,console.warn("Spine Deprecation Warning: AnimationState.addAnimationByName is deprecated, please use addAnimation from now on.")),this.addAnimation(e,r,n,i)},t.prototype.hasAnimation=function(e){var r=this.data.skeletonData.findAnimation(e);return r!==null},t.prototype.hasAnimationByName=function(e){return t.deprecatedWarning3||(t.deprecatedWarning3=!0,console.warn("Spine Deprecation Warning: AnimationState.hasAnimationByName is deprecated, please use hasAnimation from now on.")),this.hasAnimation(e)},t._emptyAnimation=new gm("",[],0),t.deprecatedWarning1=!1,t.deprecatedWarning2=!1,t.deprecatedWarning3=!1,t}(),V3=function(){function t(){this.animation=null,this.previous=null,this.next=null,this.mixingFrom=null,this.mixingTo=null,this.listener=null,this.trackIndex=0,this.loop=!1,this.holdPrevious=!1,this.reverse=!1,this.shortestRotation=!1,this.eventThreshold=0,this.attachmentThreshold=0,this.drawOrderThreshold=0,this.animationStart=0,this.animationEnd=0,this.animationLast=0,this.nextAnimationLast=0,this.delay=0,this.trackTime=0,this.trackLast=0,this.nextTrackLast=0,this.trackEnd=0,this.timeScale=0,this.alpha=0,this.mixTime=0,this.mixDuration=0,this.interruptAlpha=0,this.totalAlpha=0,this.mixBlend=R.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}return t.prototype.reset=function(){this.next=null,this.previous=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0},t.prototype.getAnimationTime=function(){if(this.loop){var e=this.animationEnd-this.animationStart;return e==0?this.animationStart:this.trackTime%e+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)},t.prototype.setAnimationLast=function(e){this.animationLast=e,this.nextAnimationLast=e},t.prototype.isComplete=function(){return this.trackTime>=this.animationEnd-this.animationStart},t.prototype.resetRotationDirections=function(){this.timelinesRotation.length=0},t.prototype.getTrackComplete=function(){var e=this.animationEnd-this.animationStart;if(e!=0){if(this.loop)return e*(1+(this.trackTime/e|0));if(this.trackTime1e-4?(S=Math.abs(p*m-v*g)/S,p/=c,g/=f,v=g*S,m=p*S,w=Math.atan2(g,p)*N.radDeg):(p=0,g=0,w=90-Math.atan2(m,v)*N.radDeg);var E=n+o-w,T=n+s-w+90,y=N.cosDeg(E)*i,_=N.cosDeg(T)*a,x=N.sinDeg(E)*i,b=N.sinDeg(T)*a;l.a=p*y-v*x,l.c=p*_-v*b,l.b=g*y+m*x,l.d=g*_+m*b;break}case Ne.NoScale:case Ne.NoScaleOrReflection:{var A=N.cosDeg(n),O=N.sinDeg(n),P=(p*A+v*O)/c,k=(g*A+m*O)/f,S=Math.sqrt(P*P+k*k);S>1e-5&&(S=1/S),P*=S,k*=S,S=Math.sqrt(P*P+k*k),this.data.transformMode==Ne.NoScale&&p*m-v*g<0!=(c<0!=f<0)&&(S=-S);var M=Math.PI/2+Math.atan2(k,P),B=Math.cos(M)*S,j=Math.sin(M)*S,y=N.cosDeg(o)*i,_=N.cosDeg(90+s)*a,x=N.sinDeg(o)*i,b=N.sinDeg(90+s)*a;l.a=P*y+B*x,l.c=P*_+B*b,l.b=k*y+j*x,l.d=k*_+j*b;break}}l.a*=c,l.c*=c,l.b*=f,l.d*=f},t.prototype.setToSetupPose=function(){var e=this.data;this.x=e.x,this.y=e.y,this.rotation=e.rotation,this.scaleX=e.scaleX,this.scaleY=e.scaleY,this.shearX=e.shearX,this.shearY=e.shearY},t.prototype.getWorldRotationX=function(){return Math.atan2(this.matrix.b,this.matrix.a)*N.radDeg},t.prototype.getWorldRotationY=function(){return Math.atan2(this.matrix.d,this.matrix.c)*N.radDeg},t.prototype.getWorldScaleX=function(){var e=this.matrix;return Math.sqrt(e.a*e.a+e.b*e.b)},t.prototype.getWorldScaleY=function(){var e=this.matrix;return Math.sqrt(e.c*e.c+e.d*e.d)},t.prototype.updateAppliedTransform=function(){var e=this.parent,r=this.matrix;if(!e){this.ax=r.tx-this.skeleton.x,this.ay=r.ty-this.skeleton.y,this.arotation=Math.atan2(r.b,r.a)*N.radDeg,this.ascaleX=Math.sqrt(r.a*r.a+r.b*r.b),this.ascaleY=Math.sqrt(r.c*r.c+r.d*r.d),this.ashearX=0,this.ashearY=Math.atan2(r.a*r.c+r.b*r.d,r.a*r.d-r.b*r.c)*N.radDeg;return}var n=e.matrix,i=1/(n.a*n.d-n.b*n.c),a=r.tx-n.tx,o=r.ty-n.ty;this.ax=a*n.d*i-o*n.c*i,this.ay=o*n.a*i-a*n.b*i;var s=i*n.d,u=i*n.a,l=i*n.c,c=i*n.b,f=s*r.a-l*r.b,h=s*r.c-l*r.d,d=u*r.b-c*r.a,p=u*r.d-c*r.c;if(this.ashearX=0,this.ascaleX=Math.sqrt(f*f+d*d),this.ascaleX>1e-4){var v=f*p-h*d;this.ascaleY=v/this.ascaleX,this.ashearY=Math.atan2(f*h+d*p,v)*N.radDeg,this.arotation=Math.atan2(d,f)*N.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(h*h+p*p),this.ashearY=0,this.arotation=90-Math.atan2(p,h)*N.radDeg},t.prototype.worldToLocal=function(e){var r=this.matrix,n=r.a,i=r.c,a=r.b,o=r.d,s=1/(n*o-i*a),u=e.x-r.tx,l=e.y-r.ty;return e.x=u*o*s-l*i*s,e.y=l*n*s-u*a*s,e},t.prototype.localToWorld=function(e){var r=this.matrix,n=e.x,i=e.y;return e.x=n*r.a+i*r.c+r.tx,e.y=n*r.b+i*r.d+r.ty,e},t.prototype.worldToLocalRotation=function(e){var r=N.sinDeg(e),n=N.cosDeg(e),i=this.matrix;return Math.atan2(i.a*r-i.b*n,i.d*n-i.c*r)*N.radDeg},t.prototype.localToWorldRotation=function(e){e-=this.rotation-this.shearX;var r=N.sinDeg(e),n=N.cosDeg(e),i=this.matrix;return Math.atan2(n*i.b+r*i.d,n*i.a+r*i.c)*N.radDeg},t.prototype.rotateWorld=function(e){var r=this.matrix,n=r.a,i=r.c,a=r.b,o=r.d,s=N.cosDeg(e),u=N.sinDeg(e);r.a=s*n-u*a,r.c=s*i-u*o,r.b=u*n+s*a,r.d=u*i+s*o},t}(),AE=function(){function t(e,r,n){if(this.index=0,this.parent=null,this.length=0,this.x=0,this.y=0,this.rotation=0,this.scaleX=1,this.scaleY=1,this.shearX=0,this.shearY=0,this.transformMode=Ne.Normal,this.skinRequired=!1,this.color=new de,e<0)throw new Error("index must be >= 0.");if(!r)throw new Error("name cannot be null.");this.index=e,this.name=r,this.parent=n}return t}(),xm=function(){function t(e,r,n){this.name=e,this.order=r,this.skinRequired=n}return t}(),CE=function(){function t(e,r){if(this.intValue=0,this.floatValue=0,this.stringValue=null,this.time=0,this.volume=0,this.balance=0,!r)throw new Error("data cannot be null.");this.time=e,this.data=r}return t}(),PE=function(){function t(e){this.intValue=0,this.floatValue=0,this.stringValue=null,this.audioPath=null,this.volume=0,this.balance=0,this.name=e}return t}(),z3=function(){function t(e,r){if(this.bendDirection=0,this.compress=!1,this.stretch=!1,this.mix=1,this.softness=0,this.active=!1,!e)throw new Error("data cannot be null.");if(!r)throw new Error("skeleton cannot be null.");this.data=e,this.mix=e.mix,this.softness=e.softness,this.bendDirection=e.bendDirection,this.compress=e.compress,this.stretch=e.stretch,this.bones=new Array;for(var n=0;n180?d-=360:d<-180&&(d+=360);var E=e.ascaleX,T=e.ascaleY;if(i||a){switch(e.data.transformMode){case Ne.NoScale:case Ne.NoScaleOrReflection:p=r-e.worldX,v=n-e.worldY}var A=e.data.length*E,O=Math.sqrt(p*p+v*v);if(i&&OA&&A>1e-4){var y=(O/A-1)*s+1;E*=y,o&&(T*=y)}}e.updateWorldTransformWith(e.ax,e.ay,e.arotation+d*s,E,T,e.ashearX,e.ashearY)},t.prototype.apply2=function(e,r,n,i,a,o,s,u,l){var c=e.ax,f=e.ay,h=e.ascaleX,d=e.ascaleY,p=h,v=d,g=r.ascaleX,m=e.matrix,y=0,_=0,x=0;h<0?(h=-h,y=180,x=-1):(y=0,x=1),d<0&&(d=-d,x=-x),g<0?(g=-g,_=180):_=0;var b=r.ax,S=0,w=0,E=0,T=m.a,A=m.c,O=m.b,P=m.d,k=Math.abs(h-d)<=1e-4;!k||o?(S=0,w=T*b+m.tx,E=O*b+m.ty):(S=r.ay,w=T*b+A*S+m.tx,E=O*b+P*S+m.ty);var M=e.parent.matrix;if(!M)throw new Error("IK parent must itself have a parent.");T=M.a,A=M.c,O=M.b,P=M.d;var B=1/(T*P-A*O),j=w-M.tx,z=E-M.ty,J=(j*P-z*A)*B-c,Z=(z*T-j*O)*B-f,$=Math.sqrt(J*J+Z*Z),F=r.data.length*g,G,V;if($<1e-4){this.apply1(e,n,i,!1,o,!1,l),r.updateWorldTransformWith(b,S,0,r.ascaleX,r.ascaleY,r.ashearX,r.ashearY);return}j=n-M.tx,z=i-M.ty;var U=(j*P-z*A)*B-c,H=(z*T-j*O)*B-f,ee=U*U+H*H;if(u!=0){u*=h*(g+1)*.5;var ie=Math.sqrt(ee),ae=ie-$-F*h+u;if(ae>0){var pe=Math.min(1,ae/(u*2))-1;pe=(ae-u*(1-pe*pe))/ie,U-=pe*U,H-=pe*H,ee=U*U+H*H}}e:if(k){F*=h;var ye=(ee-$*$-F*F)/(2*$*F);ye<-1?(ye=-1,V=Math.PI*a):ye>1?(ye=1,V=0,o&&(T=(Math.sqrt(ee)/($+F)-1)*l+1,p*=T,s&&(v*=T))):V=Math.acos(ye)*a,T=$+F*ye,A=F*Math.sin(V),G=Math.atan2(H*T-U*A,U*T+H*A)}else{T=h*F,A=d*F;var oe=T*T,_e=A*A,Ce=Math.atan2(H,U);O=_e*$*$+oe*ee-oe*_e;var be=-2*_e*$,Oe=_e-oe;if(P=be*be-4*Oe*O,P>=0){var ke=Math.sqrt(P);be<0&&(ke=-ke),ke=-(be+ke)*.5;var we=ke/Oe,Xe=O/ke,tt=Math.abs(we)=-1&&O<=1&&(O=Math.acos(O),j=T*Math.cos(O)+$,z=A*Math.sin(O),P=j*j+z*z,Pur&&(lr=O,ur=P,Dr=j,br=z)),ee<=(qt+ur)*.5?(G=Ce-Math.atan2(_t*a,$t),V=Et*a):(G=Ce-Math.atan2(br*a,Dr),V=lr*a)}var Br=Math.atan2(S,b)*x,Sr=e.arotation;G=(G-Br)*N.radDeg+y-Sr,G>180?G-=360:G<-180&&(G+=360),e.updateWorldTransformWith(c,f,Sr+G*l,p,v,0,0),Sr=r.arotation,V=((V+Br)*N.radDeg-r.ashearX)*x+_-Sr,V>180?V-=360:V<-180&&(V+=360),r.updateWorldTransformWith(b,S,Sr+V*l,r.ascaleX,r.ascaleY,r.ashearX,r.ashearY)},t}(),OE=function(t){Ve(e,t);function e(r){var n=t.call(this,r,0,!1)||this;return n.bones=new Array,n._target=null,n.bendDirection=1,n.compress=!1,n.stretch=!1,n.uniform=!1,n.mix=1,n.softness=0,n}return Object.defineProperty(e.prototype,"target",{get:function(){if(this._target)return this._target;throw new Error("BoneData not set.")},set:function(r){this._target=r},enumerable:!1,configurable:!0}),e}(xm),RE=function(t){Ve(e,t);function e(r){var n=t.call(this,r,0,!1)||this;return n.bones=new Array,n._target=null,n.positionMode=Mt.Fixed,n.spacingMode=ar.Fixed,n.rotateMode=Wt.Chain,n.offsetRotation=0,n.position=0,n.spacing=0,n.mixRotate=0,n.mixX=0,n.mixY=0,n}return Object.defineProperty(e.prototype,"target",{get:function(){if(this._target)return this._target;throw new Error("SlotData not set.")},set:function(r){this._target=r},enumerable:!1,configurable:!0}),e}(xm),ar;(function(t){t[t.Length=0]="Length",t[t.Fixed=1]="Fixed",t[t.Percent=2]="Percent",t[t.Proportional=3]="Proportional"})(ar||(ar={}));var W3=function(){function t(e,r){if(this.position=0,this.spacing=0,this.mixRotate=0,this.mixX=0,this.mixY=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,this.active=!1,!e)throw new Error("data cannot be null.");if(!r)throw new Error("skeleton cannot be null.");this.data=e,this.bones=new Array;for(var n=0,i=e.bones.length;n0){x=c/x*d;for(var p=1;p0?N.degRad:-N.degRad}for(var p=0,k=3;p0){var Z=M.a,$=M.c,F=M.b,G=M.d,V=0,U=0,H=0;if(o?V=E[k-1]:f[p+1]==0?V=E[k+2]:V=Math.atan2(j,B),V-=Math.atan2(F,Z),P){U=Math.cos(V),H=Math.sin(V);var ee=g.data.length;T+=(ee*(U*Z-H*F)-B)*r,A+=(ee*(H*Z+U*F)-j)*r}else V+=O;V>N.PI?V-=N.PI2:V<-N.PI&&(V+=N.PI2),V*=r,U=Math.cos(V),H=Math.sin(V),M.a=U*Z-H*F,M.c=U*$-H*G,M.b=H*Z+U*F,M.d=H*$+U*G}g.updateAppliedTransform()}}}},t.prototype.computeWorldPositions=function(e,r,n){var i=this.target,a=this.position,o=this.spaces,s=q.setArraySize(this.positions,r*3+2),u=this.world,l=e.closed,c=e.worldVerticesLength,f=c/6,h=t.NONE;if(!e.constantSpeed){var d=e.lengths;f-=l?1:2;var p=d[f];this.data.positionMode==Mt.Percent&&(a*=p);var v;switch(this.data.spacingMode){case ar.Percent:v=p;break;case ar.Proportional:v=p/r;break;default:v=1}u=q.setArraySize(this.world,8);for(var g=0,m=0,y=0;gp){h!=t.AFTER&&(h=t.AFTER,e.computeWorldVertices(i,c-6,4,u,0,2)),this.addAfterPosition(x-p,u,0,s,m);continue}for(;;y++){var b=d[y];if(!(x>b)){if(y==0)x/=b;else{var S=d[y-1];x=(x-S)/(b-S)}break}}y!=h&&(h=y,l&&y==f?(e.computeWorldVertices(i,c-4,4,u,0,2),e.computeWorldVertices(i,0,4,u,4,2)):e.computeWorldVertices(i,y*6+2,8,u,0,2)),this.addCurvePosition(x,u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],s,m,n||g>0&&_==0)}return s}l?(c+=2,u=q.setArraySize(this.world,c),e.computeWorldVertices(i,2,c-4,u,0,2),e.computeWorldVertices(i,0,2,u,c-4,2),u[c-2]=u[0],u[c-1]=u[1]):(f--,c-=4,u=q.setArraySize(this.world,c),e.computeWorldVertices(i,2,c,u,0,2));for(var w=q.setArraySize(this.curves,f),E=0,T=u[0],A=u[1],O=0,P=0,k=0,M=0,B=0,j=0,z=0,J=0,Z=0,$=0,F=0,G=0,V=0,U=0,g=0,H=2;gE){this.addAfterPosition(x-E,u,c-4,s,m);continue}for(;;y++){var ye=w[y];if(!(x>ye)){if(y==0)x/=ye;else{var S=w[y-1];x=(x-S)/(ye-S)}break}}if(y!=h){h=y;var oe=y*6;for(T=u[oe],A=u[oe+1],O=u[oe+2],P=u[oe+3],k=u[oe+4],M=u[oe+5],B=u[oe+6],j=u[oe+7],z=(T-O*2+k)*.03,J=(A-P*2+M)*.03,Z=((O-k)*3-T+B)*.006,$=((P-M)*3-A+j)*.006,F=z*2+Z,G=J*2+$,V=(O-T)*.3+z+Z*.16666667,U=(P-A)*.3+J+$*.16666667,ae=Math.sqrt(V*V+U*U),ie[0]=ae,oe=1;oe<8;oe++)V+=F,U+=G,F+=Z,G+=$,ae+=Math.sqrt(V*V+U*U),ie[oe]=ae;V+=F,U+=G,ae+=Math.sqrt(V*V+U*U),ie[8]=ae,V+=F+Z,U+=G+$,ae+=Math.sqrt(V*V+U*U),ie[9]=ae,pe=0}for(x*=ae;;pe++){var _e=ie[pe];if(!(x>_e)){if(pe==0)x/=_e;else{var S=ie[pe-1];x=pe+(x-S)/(_e-S)}break}}this.addCurvePosition(x*.1,T,A,O,P,k,M,B,j,s,m,n||g>0&&_==0)}return s},t.prototype.addBeforePosition=function(e,r,n,i,a){var o=r[n],s=r[n+1],u=r[n+2]-o,l=r[n+3]-s,c=Math.atan2(l,u);i[a]=o+e*Math.cos(c),i[a+1]=s+e*Math.sin(c),i[a+2]=c},t.prototype.addAfterPosition=function(e,r,n,i,a){var o=r[n+2],s=r[n+3],u=o-r[n],l=s-r[n+1],c=Math.atan2(l,u);i[a]=o+e*Math.cos(c),i[a+1]=s+e*Math.sin(c),i[a+2]=c},t.prototype.addCurvePosition=function(e,r,n,i,a,o,s,u,l,c,f,h){if(e==0||isNaN(e)){c[f]=r,c[f+1]=n,c[f+2]=Math.atan2(a-n,i-r);return}var d=e*e,p=d*e,v=1-e,g=v*v,m=g*v,y=v*e,_=y*3,x=v*_,b=_*e,S=r*m+i*x+o*b+u*p,w=n*m+a*x+s*b+l*p;c[f]=S,c[f+1]=w,h&&(e<.001?c[f+2]=Math.atan2(a-n,i-r):c[f+2]=Math.atan2(w-(n*g+a*y*2+s*d),S-(r*g+i*y*2+o*d)))},t.NONE=-1,t.BEFORE=-2,t.AFTER=-3,t.epsilon=1e-5,t}(),Y3=function(){function t(e,r){if(this.darkColor=null,this.attachment=null,this.attachmentState=0,this.sequenceIndex=-1,this.deform=new Array,!e)throw new Error("data cannot be null.");if(!r)throw new Error("bone cannot be null.");this.data=e,this.bone=r,this.color=new de,this.darkColor=e.darkColor?new de:null,this.setToSetupPose(),this.blendMode=this.data.blendMode}return t.prototype.getSkeleton=function(){return this.bone.skeleton},t.prototype.getAttachment=function(){return this.attachment},t.prototype.setAttachment=function(e){this.attachment!=e&&((!(e instanceof ia)||!(this.attachment instanceof ia)||e.timelineAttachment!=this.attachment.timelineAttachment)&&(this.deform.length=0),this.attachment=e,this.sequenceIndex=-1)},t.prototype.setToSetupPose=function(){this.color.setFromColor(this.data.color),this.darkColor&&this.darkColor.setFromColor(this.data.darkColor),this.data.attachmentName?(this.attachment=null,this.setAttachment(this.bone.skeleton.getAttachment(this.data.index,this.data.attachmentName))):this.attachment=null},t}(),H3=function(){function t(e,r){if(this.mixRotate=0,this.mixX=0,this.mixY=0,this.mixScaleX=0,this.mixScaleY=0,this.mixShearY=0,this.temp=new gf,this.active=!1,!e)throw new Error("data cannot be null.");if(!r)throw new Error("skeleton cannot be null.");this.data=e,this.mixRotate=e.mixRotate,this.mixX=e.mixX,this.mixY=e.mixY,this.mixScaleX=e.mixScaleX,this.mixScaleY=e.mixScaleY,this.mixShearY=e.mixShearY,this.bones=new Array;for(var n=0;n0?N.degRad:-N.degRad,v=this.data.offsetRotation*p,g=this.data.offsetShearY*p,m=this.bones,y=0,_=m.length;y<_;y++){var x=m[y],b=x.matrix;if(e!=0){var S=b.a,w=b.c,E=b.b,T=b.d,A=Math.atan2(h,c)-Math.atan2(E,S)+v;A>N.PI?A-=N.PI2:A<-N.PI&&(A+=N.PI2),A*=e;var O=Math.cos(A),P=Math.sin(A);b.a=O*S-P*E,b.c=O*w-P*T,b.b=P*S+O*E,b.d=P*w+O*T}if(s){var k=this.temp;u.localToWorld(k.set(this.data.offsetX,this.data.offsetY)),b.tx+=(k.x-b.tx)*r,b.ty+=(k.y-b.ty)*n}if(i!=0){var M=Math.sqrt(b.a*b.a+b.b*b.b);M!=0&&(M=(M+(Math.sqrt(c*c+h*h)-M+this.data.offsetScaleX)*i)/M),b.a*=M,b.b*=M}if(a!=0){var M=Math.sqrt(b.c*b.c+b.d*b.d);M!=0&&(M=(M+(Math.sqrt(f*f+d*d)-M+this.data.offsetScaleY)*a)/M),b.c*=M,b.d*=M}if(o>0){var w=b.c,T=b.d,B=Math.atan2(T,w),A=Math.atan2(d,f)-Math.atan2(h,c)-(B-Math.atan2(b.b,b.a));A>N.PI?A-=N.PI2:A<-N.PI&&(A+=N.PI2),A=B+(A+g)*o;var M=Math.sqrt(w*w+T*T);b.c=Math.cos(A)*M,b.d=Math.sin(A)*M}x.updateAppliedTransform()}},t.prototype.applyRelativeWorld=function(){for(var e=this.mixRotate,r=this.mixX,n=this.mixY,i=this.mixScaleX,a=this.mixScaleY,o=this.mixShearY,s=r!=0||n!=0,u=this.target,l=u.matrix,c=l.a,f=l.c,h=l.b,d=l.d,p=c*d-f*h>0?N.degRad:-N.degRad,v=this.data.offsetRotation*p,g=this.data.offsetShearY*p,m=this.bones,y=0,_=m.length;y<_;y++){var x=m[y],b=x.matrix;if(e!=0){var S=b.a,w=b.c,E=b.b,T=b.d,A=Math.atan2(h,c)+v;A>N.PI?A-=N.PI2:A<-N.PI&&(A+=N.PI2),A*=e;var O=Math.cos(A),P=Math.sin(A);b.a=O*S-P*E,b.c=O*w-P*T,b.b=P*S+O*E,b.d=P*w+O*T}if(s){var k=this.temp;u.localToWorld(k.set(this.data.offsetX,this.data.offsetY)),b.tx+=k.x*r,b.ty+=k.y*n}if(i!=0){var M=(Math.sqrt(c*c+h*h)-1+this.data.offsetScaleX)*i+1;b.a*=M,b.b*=M}if(a!=0){var M=(Math.sqrt(f*f+d*d)-1+this.data.offsetScaleY)*a+1;b.c*=M,b.d*=M}if(o>0){var A=Math.atan2(d,f)-Math.atan2(h,c);A>N.PI?A-=N.PI2:A<-N.PI&&(A+=N.PI2);var w=b.c,T=b.d;A=Math.atan2(T,w)+(A-N.PI/2+g)*o;var M=Math.sqrt(w*w+T*T);b.c=Math.cos(A)*M,b.d=Math.sin(A)*M}x.updateAppliedTransform()}},t.prototype.applyAbsoluteLocal=function(){for(var e=this.mixRotate,r=this.mixX,n=this.mixY,i=this.mixScaleX,a=this.mixScaleY,o=this.mixShearY,s=this.target,u=this.bones,l=0,c=u.length;l= 0.");if(!r)throw new Error("name cannot be null.");if(!n)throw new Error("boneData cannot be null.");this.index=e,this.name=r,this.boneData=n}return t}(),ME=function(t){Ve(e,t);function e(r){var n=t.call(this,r,0,!1)||this;return n.bones=new Array,n._target=null,n.mixRotate=0,n.mixX=0,n.mixY=0,n.mixScaleX=0,n.mixScaleY=0,n.mixShearY=0,n.offsetRotation=0,n.offsetX=0,n.offsetY=0,n.offsetScaleX=0,n.offsetScaleY=0,n.offsetShearY=0,n.relative=!1,n.local=!1,n}return Object.defineProperty(e.prototype,"target",{get:function(){if(this._target)return this._target;throw new Error("BoneData not set.")},set:function(r){this._target=r},enumerable:!1,configurable:!0}),e}(xm),d1=function(){function t(e,r,n){this.slotIndex=e,this.name=r,this.attachment=n}return t}(),Mp=function(){function t(e){if(this.attachments=new Array,this.bones=Array(),this.constraints=new Array,!e)throw new Error("name cannot be null.");this.name=e}return t.prototype.setAttachment=function(e,r,n){if(!n)throw new Error("attachment cannot be null.");var i=this.attachments;e>=i.length&&(i.length=e+1),i[e]||(i[e]={}),i[e][r]=n},t.prototype.addSkin=function(e){for(var r=0;r>4,e.readFloat())}i.push(p);break}}}var ct=e.readInt(!0);if(ct>0){for(var p=new Rl(ct),oi=n.slots.length,o=0;o=0;l--)Xn[l]=-1;for(var ja=q.newArray(oi-Fo,0),Ii=0,jr=0,l=0;l=0;l--)Xn[l]==-1&&(Xn[l]=ja[--jr]);p.setFrame(o,m,Xn)}i.push(p)}var Ua=e.readInt(!0);if(Ua>0){for(var p=new _m(Ua),o=0;o=0;Mi--)ki[Mi]==-1&&(ki[Mi]=va[--wu])}d.setFrame(p,Q(Ua,"time",0),ki)}a.push(d)}if(e.events){for(var d=new _m(e.events.length),p=0,ct=0;ct{this.updateFps(),setTimeout(i,1e4)};i();const a=()=>{setTimeout(a,500),this.callLoader()};a()}getFigureObjects(){return this.figureObjects}getAllLockedObject(){return this.lockTransformTarget}registerAnimation(e,r,n="default"){var i;e&&(this.stageAnimations.push({uuid:Hs(),animationObject:e,key:r,targetKey:n,type:"common"}),this.lockStageObject(n),e.setStartState(),(i=this.currentApp)==null||i.ticker.add(e.tickerFunc))}registerPresetAnimation(e,r,n="default",i){var o;if(!e)return;const a=i.find(s=>s.target===n);if(a){const s=this.getStageObjByKey(n);if(s){const u=s.pixiContainer;Object.assign(u,a.transform)}return}this.stageAnimations.push({uuid:Hs(),animationObject:e,key:r,targetKey:n,type:"preset"}),this.lockStageObject(n),e.setStartState(),(o=this.currentApp)==null||o.ticker.add(e.tickerFunc)}stopPresetAnimationOnTarget(e){const r=this.stageAnimations.find(n=>n.targetKey===e&&n.type==="preset");r&&this.removeAnimation(r.key)}removeAnimation(e){var n;const r=this.stageAnimations.findIndex(i=>i.key===e);if(r>=0){const i=this.stageAnimations[r];(n=this.currentApp)==null||n.ticker.remove(i.animationObject.tickerFunc),i.animationObject.setEndState(),this.unlockStageObject(i.targetKey??"default"),this.stageAnimations.splice(r,1)}}removeAnimationWithSetEffects(e){var n,i,a;const r=this.stageAnimations.findIndex(o=>o.key===e);if(r>=0){const o=this.stageAnimations[r];(n=this.currentApp)==null||n.ticker.remove(o.animationObject.tickerFunc),o.animationObject.setEndState();const s=((a=(i=o.animationObject).getEndFilterEffect)==null?void 0:a.call(i))??{};if(this.unlockStageObject(o.targetKey??"default"),o.targetKey){const u=this.getStageObjByKey(o.targetKey);if(u){const l={alpha:u.pixiContainer.alphaFilterVal,scale:{x:u.pixiContainer.scale.x,y:u.pixiContainer.scale.y},position:{x:u.pixiContainer.x,y:u.pixiContainer.y},rotation:u.pixiContainer.rotation,blur:u.pixiContainer.blur,...s};let c={target:o.targetKey,transform:l};te.dispatch(hr.updateEffect(c))}}this.stageAnimations.splice(r,1)}}performMouthSyncAnimation(e,r,n,i){var s;const a=(s=this.getStageObjByKey(e))==null?void 0:s.pixiContainer;if(!a)return;const o={open:r.mouthAnimation.open,half_open:r.mouthAnimation.halfOpen,closed:r.mouthAnimation.close};this.loadAsset(o[n],()=>{var c;const u=this.assetLoader.resources[o[n]].texture,l=(c=a==null?void 0:a.children)==null?void 0:c[0];!u||!l||(l.texture=u)})}performBlinkAnimation(e,r,n,i){var s;const a=(s=this.getStageObjByKey(e))==null?void 0:s.pixiContainer;if(!a)return;const o={open:r.blinkAnimation.open,closed:r.blinkAnimation.close};this.loadAsset(o[n],()=>{var c;const u=this.assetLoader.resources[o[n]].texture,l=(c=a==null?void 0:a.children)==null?void 0:c[0];!u||!l||(l.texture=u)})}addBg(e,r){var l,c;const n=this.assetLoader,i=new Hh;this.backgroundObjects.findIndex(f=>f.key===e)>=0&&this.removeStageObjectByKey(e),this.backgroundContainer.addChild(i);const s=Hs();this.backgroundObjects.push({uuid:s,key:e,pixiContainer:i,sourceUrl:r,sourceType:"img",sourceExt:this.getExtName(r)});const u=()=>{setTimeout(()=>{var h,d;const f=(d=(h=n.resources)==null?void 0:h[r])==null?void 0:d.texture;if(f&&this.getStageObjByUuid(s)){const p=f.width,v=f.height,g=this.stageWidth/p,m=this.stageHeight/v,y=Math.max(g,m),_=new _i(f);_.scale.x=y,_.scale.y=y,_.anchor.set(.5),_.position.y=this.stageHeight/2,i.setBaseX(this.stageWidth/2),i.setBaseY(this.stageHeight/2),i.pivot.set(0,this.stageHeight/2),i.addChild(_)}},0)};this.cacheGC(),(c=(l=n.resources)==null?void 0:l[r])!=null&&c.texture?u():this.loadAsset(r,u)}addSpineBg(e,r){var c;const n=`spine-${r}`,i=this.assetLoader,a=new Hh;this.backgroundObjects.findIndex(f=>f.key===e)>=0&&this.removeStageObjectByKey(e),this.backgroundContainer.addChild(a);const u=Hs();this.backgroundObjects.push({uuid:u,key:e,pixiContainer:a,sourceUrl:r,sourceType:"live2d",sourceExt:this.getExtName(r)});const l=()=>{var h;const f=(h=this.assetLoader.resources)==null?void 0:h[n];setTimeout(()=>{var d;if(f&&this.getStageObjByUuid(u)){const p=new SO(f.spineData);(d=f==null?void 0:f.spineData)==null||d.y;const v=p.width,g=p.height,m=this.stageWidth/v,y=this.stageHeight/g;ge.debug("bgSpine state",p.state),p.spineData.animations.length>0&&p.state.setAnimation(0,p.spineData.animations[0].name,!0);const _=Math.max(m,y),x=new _i;x.addChild(p),x.scale.x=_,x.scale.y=_,x.anchor.set(.5),x.position.y=this.stageHeight/2,a.setBaseX(this.stageWidth/2),a.setBaseY(this.stageHeight/2),a.pivot.set(0,this.stageHeight/2),a.addChild(x)}},0)};this.cacheGC(),(c=i.resources)!=null&&c[r]?l():this.loadAsset(r,l,n)}addFigure(e,r,n="center"){var f,h;const i=this.assetLoader,a=new Hh;this.figureObjects.findIndex(d=>d.key===e)>=0&&this.removeStageObjectByKey(e);const u=this.getFigureMetadataByKey(e);u&&u.zIndex&&(a.zIndex=u.zIndex),this.figureContainer.addChild(a);const l=Hs();this.figureObjects.push({uuid:l,key:e,pixiContainer:a,sourceUrl:r,sourceType:"img",sourceExt:this.getExtName(r)});const c=()=>{setTimeout(()=>{var p,v;const d=(v=(p=i.resources)==null?void 0:p[r])==null?void 0:v.texture;if(d&&this.getStageObjByUuid(l)){const g=d.width,m=d.height,y=this.stageWidth/g,_=this.stageHeight/m,x=Math.min(y,_),b=new _i(d);b.scale.x=x,b.scale.y=x,b.anchor.set(.5),b.position.y=this.stageHeight/2;const S=g*x,w=m*x;a.setBaseY(this.stageHeight/2),wd.key===e)>=0&&this.removeStageObjectByKey(e);const l=this.getFigureMetadataByKey(e);l&&l.zIndex&&(o.zIndex=l.zIndex),this.figureContainer.addChild(o);const c=Hs();this.figureObjects.push({uuid:c,key:e,pixiContainer:o,sourceUrl:r,sourceType:"live2d",sourceExt:this.getExtName(r)});const f=()=>{var p;const d=(p=this.assetLoader.resources)==null?void 0:p[i];setTimeout(()=>{var v;if(d&&this.getStageObjByUuid(c)){const g=new SO(d.spineData),m=((v=d==null?void 0:d.spineData)==null?void 0:v.y)??0,y=g.width,_=g.height,x=this.stageWidth/y,b=this.stageHeight/_;g.y=-(b*m)/2,g.state.setAnimation(0,"07",!0);const S=Math.min(x,b),w=new _i;w.addChild(g),w.scale.x=S,w.scale.y=S,w.anchor.set(.5),w.position.y=this.stageHeight/2;const E=y*S,T=_*S;o.setBaseY(this.stageHeight/2),Ts.key===e);if((n==null?void 0:n.sourceType)!=="live2d")return;const i=this.live2dFigureRecorder.find(s=>s.target===e);if(n&&(i==null?void 0:i.motion)!==r){const u=n.pixiContainer.children;for(const l of u){let c=r,f=0,h=3;const d=(l==null?void 0:l.internalModel)??void 0;(o=(a=d==null?void 0:d.motionManager)==null?void 0:a.stopAllMotions)==null||o.call(a),l.motion(c,f,h)}this.updateL2dMotionByKey(e,r)}}changeModelExpressionByKey(e,r){const n=this.figureObjects.find(a=>a.key===e);if((n==null?void 0:n.sourceType)!=="live2d")return;const i=this.live2dFigureRecorder.find(a=>a.target===e);if(n&&(i==null?void 0:i.expression)!==r){const o=n.pixiContainer.children;for(const s of o)s.expression(r);this.updateL2dExpressionByKey(e,r)}}setModelMouthY(e,r){var o,s,u,l,c,f,h,d,p;function n(v){return v<50?0:(v-50)/50}const i=n(r),a=this.figureObjects.find(v=>v.key===e);if(a&&a.sourceType==="live2d"){const g=a.pixiContainer.children;for(const m of g)m!=null&&m.internalModel&&((s=(o=m==null?void 0:m.internalModel)==null?void 0:o.coreModel)!=null&&s.setParamFloat&&((c=(l=(u=m==null?void 0:m.internalModel)==null?void 0:u.coreModel)==null?void 0:l.setParamFloat)==null||c.call(l,"PARAM_MOUTH_OPEN_Y",i)),(h=(f=m==null?void 0:m.internalModel)==null?void 0:f.coreModel)!=null&&h.setParameterValueById&&((p=(d=m==null?void 0:m.internalModel)==null?void 0:d.coreModel)==null||p.setParameterValueById("ParamMouthOpenY",i)))}}getStageObjByKey(e){return[...this.figureObjects,...this.backgroundObjects].find(r=>r.key===e)}getStageObjByUuid(e){return[...this.figureObjects,...this.backgroundObjects].find(r=>r.uuid===e)}getAllStageObj(){return[...this.figureObjects,...this.backgroundObjects]}removeStageObjectByKey(e){const r=this.figureObjects.findIndex(i=>i.key===e),n=this.backgroundObjects.findIndex(i=>i.key===e);if(r>=0){const i=this.figureObjects[r];for(const a of i.pixiContainer.children)a.destroy();i.pixiContainer.destroy(),this.figureContainer.removeChild(i.pixiContainer),this.figureObjects.splice(r,1)}if(n>=0){const i=this.backgroundObjects[n];for(const a of i.pixiContainer.children)a.destroy();i.pixiContainer.destroy(),this.backgroundContainer.removeChild(i.pixiContainer),this.backgroundObjects.splice(n,1)}}cacheGC(){hL()}updateL2dMotionByKey(e,r){const n=this.live2dFigureRecorder.findIndex(i=>i.target===e);n>=0?this.live2dFigureRecorder[n].motion=r:this.live2dFigureRecorder.push({target:e,motion:r,expression:""})}updateL2dExpressionByKey(e,r){const n=this.live2dFigureRecorder.findIndex(i=>i.target===e);n>=0?this.live2dFigureRecorder[n].expression=r:this.live2dFigureRecorder.push({target:e,motion:"",expression:r})}loadAsset(e,r,n){this.loadQueue.unshift({url:e,callback:r,name:n}),this.callLoader()}callLoader(){if(!this.assetLoader.loading){const e=this.loadQueue.shift();if(e)try{this.assetLoader.resources[e.url]?(e.callback(),this.callLoader()):e.name?this.assetLoader.add(e.name,e.url).load(()=>{e.callback(),this.callLoader()}):this.assetLoader.add(e.url).load(()=>{e.callback(),this.callLoader()})}catch(r){ge.fatal("PIXI Loader 故障",r),e.callback(),this.callLoader()}}}updateFps(){zy==null||zy(120).then(e=>{this.frameDuration=1e3/e})}lockStageObject(e){this.lockTransformTarget.push(e)}unlockStageObject(e){const r=this.lockTransformTarget.findIndex(n=>n===e);r>=0&&this.lockTransformTarget.splice(r,1)}getExtName(e){return e.split(".").pop()??"png"}getFigureMetadataByKey(e){return console.log(e,te.getState().stage.figureMetaData),te.getState().stage.figureMetaData[e]}}const zy=(()=>{const t=[window.requestAnimationFrame,window.webkitRequestAnimationFrame,window.mozRequestAnimationFrame].find(e=>e);if(!t){console.error("requestAnimationFrame is not supported!");return}return(e=60)=>{if(e<1)throw new Error("targetCount cannot be less than 1.");const r=Date.now();let n=0;return new Promise(i=>{(function a(){t(()=>{if(++n>=e){const o=Date.now()-r,s=n/o*1e3;return i(s)}a()})})()})}})(),J3={version:"WebGAL 4.5.10",contributors:[]},N_e=navigator.userAgent,FE=!!N_e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),L_e=()=>{ge.info(J3.version),ge.info("Github: https://github.com/OpenWebGAL/WebGAL "),ge.info("Made with ❤ by OpenWebGAL"),FE&&alert(`iOS 用户请横屏使用以获得最佳体验 -| Please use landscape mode on iOS for the best experience -| iOS ユーザーは横画面での使用をお勧めします`),D_e("./game/userStyleSheet.css"),B_e(),ule("./game/config.txt");const t=Nn("start.txt",Fn.scene);ua(t).then(e=>{L.sceneManager.sceneData.currentScene=ca(e,"start.txt",t);const r=L.sceneManager.sceneData.currentScene.subSceneList;L.sceneManager.settledScenes.push(t);const n=jf(r);Uf(n)}),L.gameplay.pixiStage=new F_e,dle(),ple()};function D_e(t){const e=document.createElement("link");e.type="text/css",e.rel="stylesheet",e.href=t,document.getElementsByTagName("head")[0].appendChild(e)}function B_e(){Wc.get("./game/animation/animationTable.json").then(t=>{const e=t.data;for(const r of e)Wc.get(`./game/animation/${r}.json`).then(n=>{if(n.data){const i={name:r,effects:n.data};L.animationManager.addAnimation(i)}})})}const j_e="_Menu_main_1a7i6_1",U_e="_Menu_ShowSoftly_1a7i6_1",$_e="_Menu_TagContent_1a7i6_10",wO={Menu_main:j_e,Menu_ShowSoftly:U_e,Menu_TagContent:$_e},V_e="_MenuPanel_main_1c9ky_1",G_e="_MenuPanel_button_1c9ky_10",X_e="_MenuPanel_button_icon_1c9ky_38",z_e="_MenuPanel_button_hl_1c9ky_44",fl={MenuPanel_main:V_e,MenuPanel_button:G_e,MenuPanel_button_icon:X_e,MenuPanel_button_hl:z_e};var W_e=["size","strokeWidth","strokeLinecap","strokeLinejoin","theme","fill","className","spin"];function EO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function TO(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function q_e(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,a;for(a=0;a=0)&&(r[i]=t[i]);return r}var K_e={size:"1em",strokeWidth:4,strokeLinecap:"round",strokeLinejoin:"round",rtl:!1,theme:"outline",colors:{outline:{fill:"#333",background:"transparent"},filled:{fill:"#333",background:"#FFF"},twoTone:{fill:"#333",twoTone:"#2F88FF"},multiColor:{outStrokeColor:"#333",outFillColor:"#2F88FF",innerStrokeColor:"#FFF",innerFillColor:"#43CCF8"}},prefix:"i"};function Z_e(){return"icon-"+((1+Math.random())*4294967296|0).toString(16).substring(1)}function Q_e(t,e,r){var n=typeof e.fill=="string"?[e.fill]:e.fill||[],i=[],a=e.theme||r.theme;switch(a){case"outline":i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push("none"),i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push("none");break;case"filled":i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push("#FFF"),i.push("#FFF");break;case"two-tone":i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push(typeof n[1]=="string"?n[1]:r.colors.twoTone.twoTone),i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push(typeof n[1]=="string"?n[1]:r.colors.twoTone.twoTone);break;case"multi-color":i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push(typeof n[1]=="string"?n[1]:r.colors.multiColor.outFillColor),i.push(typeof n[2]=="string"?n[2]:r.colors.multiColor.innerStrokeColor),i.push(typeof n[3]=="string"?n[3]:r.colors.multiColor.innerFillColor);break}return{size:e.size||r.size,strokeWidth:e.strokeWidth||r.strokeWidth,strokeLinecap:e.strokeLinecap||r.strokeLinecap,strokeLinejoin:e.strokeLinejoin||r.strokeLinejoin,colors:i,id:t}}var eB=ne.createContext(K_e);eB.Provider;function Lt(t,e,r){return function(n){var i=n.size,a=n.strokeWidth,o=n.strokeLinecap,s=n.strokeLinejoin,u=n.theme,l=n.fill,c=n.className,f=n.spin,h=H_e(n,W_e),d=ne.useContext(eB),p=ne.useMemo(Z_e,[]),v=Q_e(p,{size:i,strokeWidth:a,strokeLinecap:o,strokeLinejoin:s,theme:u,fill:l},d),g=[d.prefix+"-icon"];return g.push(d.prefix+"-icon-"+t),e&&d.rtl&&g.push(d.prefix+"-icon-rtl"),f&&g.push(d.prefix+"-icon-spin"),c&&g.push(c),fe.createElement("span",TO(TO({},h),{},{className:g.join(" ")}),r(v))}}const J_e=Lt("align-text-left-one",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M39 6H9C7.34315 6 6 7.34315 6 9V39C6 40.6569 7.34315 42 9 42H39C40.6569 42 42 40.6569 42 39V9C42 7.34315 40.6569 6 39 6Z",fill:t.colors[1],stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M26 24H14",stroke:t.colors[2],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M34 15H14",stroke:t.colors[2],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M32 33H14",stroke:t.colors[2],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),tB=Lt("close-small",!1,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M14 14L34 34",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M14 34L34 14",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),exe=Lt("double-down",!1,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M36 12L24 24L12 12",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M36 24L24 36L12 24",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),txe=Lt("double-right",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M12 12L24 24L12 36",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M24 12L36 24L24 36",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),rxe=Lt("double-up",!1,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M12 24L24 12L36 24",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M12 36L24 24L36 36",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),rB=Lt("folder-open",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M4 9V41L9 21H39.5V15C39.5 13.8954 38.6046 13 37.5 13H24L19 7H6C4.89543 7 4 7.89543 4 9Z",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M40 41L44 21H8.8125L4 41H40Z",fill:t.colors[1],stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),nxe=Lt("go-end",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M14 12L26 24L14 36",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M34 12V36",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),ixe=Lt("go-start",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M34 36L22 24L34 12",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M14 12V36",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),axe=Lt("hamburger-button",!1,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M7.94971 11.9497H39.9497",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M7.94971 23.9497H39.9497",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M7.94971 35.9497H39.9497",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),nB=Lt("home",!1,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M9 18V42H39V18L24 6L9 18Z",fill:t.colors[1],stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M19 29V42H29V29H19Z",fill:t.colors[3],stroke:t.colors[2],strokeWidth:t.strokeWidth,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M9 42H39",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap}))}),oxe=Lt("left",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M31 36L19 24L31 12",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),sxe=Lt("lock",!1,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("rect",{x:"6",y:"22",width:"36",height:"22",rx:"2",fill:t.colors[1],stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M14 22V14C14 8.47715 18.4772 4 24 4C29.5228 4 34 8.47715 34 14V22",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M24 30V36",stroke:t.colors[2],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),lxe=Lt("logout",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M23.9917 6H6V42H24",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M33 33L42 24L33 15",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M16 23.9917H42",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),uxe=Lt("music-list",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M24 19H40",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M24 10H40",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M8 38H40",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M8 28H40",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M8 10L16 15L8 20V10Z",fill:t.colors[1],stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinejoin:t.strokeLinejoin}))}),iB=Lt("play-one",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M15 24V11.8756L25.5 17.9378L36 24L25.5 30.0622L15 36.1244V24Z",fill:t.colors[1],stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinejoin:t.strokeLinejoin}))}),cxe=Lt("preview-close-one",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M9.85786 18C6.23858 21 4 24 4 24C4 24 12.9543 36 24 36C25.3699 36 26.7076 35.8154 28 35.4921M20.0318 12.5C21.3144 12.1816 22.6414 12 24 12C35.0457 12 44 24 44 24C44 24 41.7614 27 38.1421 30",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M20.3142 20.6211C19.4981 21.5109 19 22.6972 19 23.9998C19 26.7612 21.2386 28.9998 24 28.9998C25.3627 28.9998 26.5981 28.4546 27.5 27.5705",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M42 42L6 6",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),fxe=Lt("preview-open",!1,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M24 36C35.0457 36 44 24 44 24C44 24 35.0457 12 24 12C12.9543 12 4 24 4 24C4 24 12.9543 36 24 36Z",fill:t.colors[1],stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M24 29C26.7614 29 29 26.7614 29 24C29 21.2386 26.7614 19 24 19C21.2386 19 19 21.2386 19 24C19 26.7614 21.2386 29 24 29Z",fill:t.colors[3],stroke:t.colors[2],strokeWidth:t.strokeWidth,strokeLinejoin:t.strokeLinejoin}))}),hxe=Lt("replay-music",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M21 24V18L26 21L31 24L26 27L21 30V24Z",fill:t.colors[1],stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M11.2721 36.7279C14.5294 39.9853 19.0294 42 24 42C33.9411 42 42 33.9411 42 24C42 14.0589 33.9411 6 24 6C19.0294 6 14.5294 8.01472 11.2721 11.2721C9.6141 12.9301 6 17 6 17",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M6 9V17H14",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),dxe=Lt("return",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M12.9998 8L6 14L12.9998 21",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M6 14H28.9938C35.8768 14 41.7221 19.6204 41.9904 26.5C42.2739 33.7696 36.2671 40 28.9938 40H11.9984",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),aB=Lt("save",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M6 9C6 7.34315 7.34315 6 9 6H34.2814L42 13.2065V39C42 40.6569 40.6569 42 39 42H9C7.34315 42 6 40.6569 6 39V9Z",fill:t.colors[1],stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M24.0083 6L24 13.3846C24 13.7245 23.5523 14 23 14H15C14.4477 14 14 13.7245 14 13.3846L14 6",fill:t.colors[3]}),fe.createElement("path",{d:"M24.0083 6L24 13.3846C24 13.7245 23.5523 14 23 14H15C14.4477 14 14 13.7245 14 13.3846L14 6H24.0083Z",stroke:t.colors[2],strokeWidth:t.strokeWidth,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M9 6H34.2814",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M14 26H34",stroke:t.colors[2],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M14 34H24.0083",stroke:t.colors[2],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),oB=Lt("setting-two",!1,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M18.2838 43.1713C14.9327 42.1736 11.9498 40.3213 9.58787 37.867C10.469 36.8227 11 35.4734 11 34.0001C11 30.6864 8.31371 28.0001 5 28.0001C4.79955 28.0001 4.60139 28.01 4.40599 28.0292C4.13979 26.7277 4 25.3803 4 24.0001C4 21.9095 4.32077 19.8938 4.91579 17.9995C4.94381 17.9999 4.97188 18.0001 5 18.0001C8.31371 18.0001 11 15.3138 11 12.0001C11 11.0488 10.7786 10.1493 10.3846 9.35011C12.6975 7.1995 15.5205 5.59002 18.6521 4.72314C19.6444 6.66819 21.6667 8.00013 24 8.00013C26.3333 8.00013 28.3556 6.66819 29.3479 4.72314C32.4795 5.59002 35.3025 7.1995 37.6154 9.35011C37.2214 10.1493 37 11.0488 37 12.0001C37 15.3138 39.6863 18.0001 43 18.0001C43.0281 18.0001 43.0562 17.9999 43.0842 17.9995C43.6792 19.8938 44 21.9095 44 24.0001C44 25.3803 43.8602 26.7277 43.594 28.0292C43.3986 28.01 43.2005 28.0001 43 28.0001C39.6863 28.0001 37 30.6864 37 34.0001C37 35.4734 37.531 36.8227 38.4121 37.867C36.0502 40.3213 33.0673 42.1736 29.7162 43.1713C28.9428 40.752 26.676 39.0001 24 39.0001C21.324 39.0001 19.0572 40.752 18.2838 43.1713Z",fill:t.colors[1],stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M24 31C27.866 31 31 27.866 31 24C31 20.134 27.866 17 24 17C20.134 17 17 20.134 17 24C17 27.866 20.134 31 24 31Z",fill:t.colors[3],stroke:t.colors[2],strokeWidth:t.strokeWidth,strokeLinejoin:t.strokeLinejoin}))}),pxe=Lt("square-small",!1,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M34 12H14C12.8954 12 12 12.8954 12 14V34C12 35.1046 12.8954 36 14 36H34C35.1046 36 36 35.1046 36 34V14C36 12.8954 35.1046 12 34 12Z",fill:t.colors[1],stroke:t.colors[0],strokeWidth:t.strokeWidth}))}),vxe=Lt("unlock",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("rect",{x:"7",y:"22.0476",width:"34",height:"22",rx:"2",fill:t.colors[1],stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M14 22V14.0047C13.9948 8.87022 17.9227 4.56718 23.0859 4.05117C28.249 3.53516 32.9673 6.97408 34 12.0059",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M24 30V36",stroke:t.colors[2],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),mxe=Lt("volume-notice",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M24 6V42C17 42 11.7985 32.8391 11.7985 32.8391H6C4.89543 32.8391 4 31.9437 4 30.8391V17.0108C4 15.9062 4.89543 15.0108 6 15.0108H11.7985C11.7985 15.0108 17 6 24 6Z",fill:t.colors[1],stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M32 15L32 15C32.6232 15.5565 33.1881 16.1797 33.6841 16.8588C35.1387 18.8504 36 21.3223 36 24C36 26.6545 35.1535 29.1067 33.7218 31.0893C33.2168 31.7885 32.6391 32.4293 32 33",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M34.2359 41.1857C40.0836 37.6953 44 31.305 44 24C44 16.8085 40.2043 10.5035 34.507 6.97906",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap}))}),gxe=t=>{let e;switch(t.iconName){case"save":e=C.jsx(aB,{theme:"outline",size:"1.2em",fill:t.iconColor,strokeWidth:2});break;case"load":e=C.jsx(rB,{theme:"outline",size:"1.2em",fill:t.iconColor,strokeWidth:2});break;case"option":e=C.jsx(oB,{theme:"outline",size:"1.2em",fill:t.iconColor,strokeWidth:2});break;case"title":e=C.jsx(nB,{theme:"outline",size:"1.2em",fill:t.iconColor,strokeWidth:2});break;case"exit":e=C.jsx(lxe,{theme:"outline",size:"1.2em",fill:t.iconColor,strokeWidth:2});break;default:e=C.jsx("div",{})}return e},qu=t=>{const{playSePageChange:e,playSeEnter:r}=_n();let n=fl.MenuPanel_button;return t.hasOwnProperty("buttonOnClassName")&&(n=n+t.buttonOnClassName),C.jsxs("div",{className:n,onClick:()=>{t.clickFunc()},onMouseEnter:r,style:{...t.style,color:t.tagColor},children:[C.jsx("div",{className:fl.MenuPanel_button_icon,children:C.jsx(gxe,{iconName:t.iconName,iconColor:t.iconColor})}),t.tagName]})},NE=()=>{const t=te.dispatch;PS(),MS(),Tl(),t(Ge({key:"playVocal",value:""})),t(rt({component:"showTitle",visibility:!0})),Wf(te.getState().GUI.titleBg)},yxe="_GlobalDialog_main_101j8_2",_xe="_showGlobalDialog_101j8_1",xxe="_glabalDialog_container_inner_101j8_17",bxe="_glabalDialog_container_101j8_17",Sxe="_title_101j8_36",wxe="_button_list_101j8_41",Exe="_button_101j8_41",Uo={GlobalDialog_main:yxe,showGlobalDialog:_xe,glabalDialog_container_inner:xxe,glabalDialog_container:bxe,title:Sxe,button_list:wxe,button:Exe};function Txe(){const t=Me(e=>e.GUI.showGlobalDialog);return C.jsx(C.Fragment,{children:t&&C.jsx("div",{id:"globalDialogContainer"})})}function as(t){const{playSeClick:e,playSeEnter:r}=cS();te.dispatch(rt({component:"showGlobalDialog",visibility:!0}));const n=()=>{e(),t.leftFunc(),AO()},i=()=>{e(),t.rightFunc(),AO()},a=C.jsx("div",{className:Uo.GlobalDialog_main,children:C.jsx("div",{className:Uo.glabalDialog_container,children:C.jsxs("div",{className:Uo.glabalDialog_container_inner,children:[C.jsx("div",{className:Uo.title,children:t.title}),C.jsxs("div",{className:Uo.button_list,children:[C.jsx("div",{className:Uo.button,onClick:n,onMouseEnter:r,children:t.leftText}),C.jsx("div",{className:Uo.button,onClick:i,onMouseEnter:r,children:t.rightText})]})]})})});setTimeout(()=>{ea.render(a,document.getElementById("globalDialogContainer"))},100)}function AO(){te.dispatch(rt({component:"showGlobalDialog",visibility:!1}))}function Axe(){te.dispatch(rt({component:"showControls",visibility:!0}))}function Cxe(){te.dispatch(rt({component:"showControls",visibility:!1}))}function Pxe(){te.getState().GUI.showControls===!0?Cxe():Axe()}const Oxe=()=>{const t=On("menu."),{playSeClick:e,playSeDialogOpen:r,playSePageChange:n}=_n(),i=Me(v=>v.GUI),a=Lr(),o=i.currentMenuTag===vt.Save?` ${fl.MenuPanel_button_hl}`:"",s=i.currentMenuTag===vt.Load?` ${fl.MenuPanel_button_hl}`:"",u=i.currentMenuTag===vt.Option?` ${fl.MenuPanel_button_hl}`:"",l=i.currentMenuTag===vt.Save?"rgba(74, 34, 93, 0.9)":"rgba(123,144,169,1)",c=i.currentMenuTag===vt.Load?"rgba(11, 52, 110, 0.9)":"rgba(123,144,169,1)",f=i.currentMenuTag===vt.Option?"rgba(81, 110, 65, 0.9)":"rgba(123,144,169,1)",h=i.currentMenuTag===vt.Save?"rgba(74, 34, 93, 0.9)":"rgba(123,144,169,1)",d=i.currentMenuTag===vt.Load?"rgba(11, 52, 110, 0.9)":"rgba(123,144,169,1)",p=i.currentMenuTag===vt.Option?"rgba(81, 110, 65, 0.9)":"rgba(123,144,169,1)";return C.jsxs("div",{className:fl.MenuPanel_main,children:[C.jsx(qu,{iconName:"save",buttonOnClassName:o,iconColor:h,tagColor:l,clickFunc:()=>{n(),!i.showTitle&&a(ss(vt.Save))},tagName:t("saving.title")},"saveButton"),C.jsx(qu,{iconName:"load",buttonOnClassName:s,iconColor:d,tagColor:c,clickFunc:()=>{n(),a(ss(vt.Load))},tagName:t("loadSaving.title")},"loadButton"),C.jsx(qu,{iconName:"title",iconColor:"rgba(123,144,169,1)",tagColor:"rgba(123,144,169,1)",clickFunc:()=>{r(),as({title:t("$gaming.buttons.titleTips"),leftText:t("$common.yes"),rightText:t("$common.no"),leftFunc:()=>{NE(),a(rt({component:"showMenuPanel",visibility:!1}))},rightFunc:()=>{}})},tagName:t("title.title")},"titleIcon"),C.jsx(qu,{iconName:"option",style:{marginLeft:"auto"},buttonOnClassName:u,iconColor:p,tagColor:f,clickFunc:()=>{n(),a(ss(vt.Option))},tagName:t("options.title")},"optionButton"),C.jsx(qu,{iconName:"exit",iconColor:"rgba(123,144,169,1)",tagColor:"rgba(123,144,169,1)",clickFunc:()=>{e(),a(rt({component:"showMenuPanel",visibility:!1}))},tagName:t("exit.title")},"exitIcon")]})},Rxe="_Save_Load_main_a3o8b_2",Ixe="_Save_Load_top_a3o8b_9",kxe="_Elements_in_a3o8b_1",Mxe="_Save_Load_title_a3o8b_17",Fxe="_Save_title_text_a3o8b_35",Nxe="_Load_title_text_a3o8b_43",Lxe="_Save_Load_top_buttonList_a3o8b_51",Dxe="_Save_Load_top_button_a3o8b_51",Bxe="_Save_Load_top_button_text_a3o8b_69",jxe="_Save_Load_top_button_on_a3o8b_80",Uxe="_Load_top_button_on_a3o8b_93",$xe="_Load_top_button_a3o8b_93",Vxe="_Save_Load_content_a3o8b_106",Gxe="_Save_Load_content_element_a3o8b_115",Xxe="_Elements_in_transform_a3o8b_1",zxe="_Save_Load_content_element_top_a3o8b_131",Wxe="_Save_Load_content_element_top_index_a3o8b_138",Yxe="_Load_content_elememt_top_index_a3o8b_147",Hxe="_Save_Load_content_element_top_date_a3o8b_151",qxe="_Load_content_element_top_date_a3o8b_162",Kxe="_Save_Load_content_text_a3o8b_166",Zxe="_Save_Load_content_text_padding_a3o8b_180",Qxe="_Save_Load_content_speaker_a3o8b_184",Jxe="_Load_content_speaker_a3o8b_193",e1e="_Load_content_text_a3o8b_197",t1e="_Save_Load_content_miniRen_a3o8b_201",r1e="_Save_Load_content_miniRen_bg_a3o8b_208",n1e="_Save_Load_content_miniRen_figure_a3o8b_215",i1e="_Save_Load_content_miniRen_figLeft_a3o8b_223",a1e="_Save_Load_content_miniRen_figRight_a3o8b_228",Ue={Save_Load_main:Rxe,Save_Load_top:Ixe,Elements_in:kxe,Save_Load_title:Mxe,Save_title_text:Fxe,Load_title_text:Nxe,Save_Load_top_buttonList:Lxe,Save_Load_top_button:Dxe,Save_Load_top_button_text:Bxe,Save_Load_top_button_on:jxe,Load_top_button_on:Uxe,Load_top_button:$xe,Save_Load_content:Vxe,Save_Load_content_element:Gxe,Elements_in_transform:Xxe,Save_Load_content_element_top:zxe,Save_Load_content_element_top_index:Wxe,Load_content_elememt_top_index:Yxe,Save_Load_content_element_top_date:Hxe,Load_content_element_top_date:qxe,Save_Load_content_text:Kxe,Save_Load_content_text_padding:Zxe,Save_Load_content_speaker:Qxe,Load_content_speaker:Jxe,Load_content_text:e1e,Save_Load_content_miniRen:t1e,Save_Load_content_miniRen_bg:r1e,Save_Load_content_miniRen_figure:n1e,Save_Load_content_miniRen_figLeft:i1e,Save_Load_content_miniRen_figRight:a1e},o1e=()=>{const{playSePageChange:t,playSeEnter:e,playSeDialogOpen:r}=_n(),n=Me(d=>d.userData),i=Me(d=>d.saveData),a=Lr(),o=[];for(let d=1;d<=20;d++){let p=Ue.Save_Load_top_button;d===n.optionData.slPage&&(p=p+" "+Ue.Save_Load_top_button_on);const v=C.jsx("div",{onClick:()=>{a(zk(d)),st(),t()},onMouseEnter:e,className:p,children:C.jsx("div",{className:Ue.Save_Load_top_button_text,children:d})},"Save_element_page"+d);o.push(v)}const s=On("common."),u=[],l=(n.optionData.slPage-1)*10+1,c=l+9;ne.useEffect(()=>{Zv(l,c)},[l,c]);let f=0;for(let d=l;d<=c;d++){f++;const p=i.saveData[d];let v=C.jsx("div",{});if(p){const m=p.nowStageState.showName===""?" ":`${p.nowStageState.showName}`;v=C.jsxs(C.Fragment,{children:[C.jsxs("div",{className:Ue.Save_Load_content_element_top,children:[C.jsx("div",{className:Ue.Save_Load_content_element_top_index,children:p.index}),C.jsx("div",{className:Ue.Save_Load_content_element_top_date,children:p.saveTime})]}),C.jsx("div",{className:Ue.Save_Load_content_miniRen,children:C.jsx("img",{className:Ue.Save_Load_content_miniRen_bg,alt:"Save_img_preview",src:p.previewImage})}),C.jsxs("div",{className:Ue.Save_Load_content_text,children:[C.jsx("div",{className:Ue.Save_Load_content_speaker,children:m}),C.jsx("div",{className:Ue.Save_Load_content_text_padding,children:p.nowStageState.showText})]})]})}const g=C.jsx("div",{onClick:()=>{i.saveData[d]?(r(),as({title:h("saving.isOverwrite"),leftText:s("yes"),rightText:s("no"),leftFunc:()=>{v_(d),st()},rightFunc:()=>{}})):(t(),v_(d))},onMouseEnter:e,className:Ue.Save_Load_content_element,style:{animationDelay:`${f*30}ms`},children:v},"saveElement_"+d);u.push(g)}const h=On("menu.");return C.jsxs("div",{className:Ue.Save_Load_main,children:[C.jsxs("div",{className:Ue.Save_Load_top,children:[C.jsx("div",{className:Ue.Save_Load_title,children:C.jsx("div",{className:Ue.Save_title_text,children:h("saving.title")})}),C.jsx("div",{className:Ue.Save_Load_top_buttonList,children:o})]}),C.jsx("div",{className:Ue.Save_Load_content,id:"Save_content_page_"+n.optionData.slPage,children:u})]})},s1e=()=>{const{playSeClick:t,playSeEnter:e,playSePageChange:r}=_n(),n=Me(h=>h.userData),i=Me(h=>h.saveData),a=Lr(),o=[];for(let h=1;h<=20;h++){let d=Ue.Save_Load_top_button+" "+Ue.Load_top_button;h===n.optionData.slPage&&(d=d+" "+Ue.Save_Load_top_button_on+" "+Ue.Load_top_button_on);const p=C.jsx("div",{onClick:()=>{a(zk(h)),st(),r()},onMouseEnter:e,className:d,children:C.jsx("div",{className:Ue.Save_Load_top_button_text,children:h})},"Load_element_page"+h);o.push(p)}const s=[],u=(n.optionData.slPage-1)*10+1,l=u+9;ne.useEffect(()=>{Zv(u,l)},[u,l]);let c=0;for(let h=u;h<=l;h++){c++;const d=i.saveData[h];let p=C.jsx("div",{});if(d){const g=d.nowStageState.showName===""?" ":`${d.nowStageState.showName}`;p=C.jsxs(C.Fragment,{children:[C.jsxs("div",{className:Ue.Save_Load_content_element_top,children:[C.jsx("div",{className:Ue.Save_Load_content_element_top_index+" "+Ue.Load_content_elememt_top_index,children:d.index}),C.jsx("div",{className:Ue.Save_Load_content_element_top_date+" "+Ue.Load_content_element_top_date,children:d.saveTime})]}),C.jsx("div",{className:Ue.Save_Load_content_miniRen,children:C.jsx("img",{className:Ue.Save_Load_content_miniRen_bg,alt:"Save_img_preview",src:d.previewImage})}),C.jsxs("div",{className:Ue.Save_Load_content_text,children:[C.jsx("div",{className:Ue.Save_Load_content_speaker+" "+Ue.Load_content_speaker,children:g}),C.jsx("div",{className:Ue.Save_Load_content_text_padding,children:d.nowStageState.showText})]})]})}const v=C.jsx("div",{onClick:()=>{hN(h),t()},onMouseEnter:e,className:Ue.Save_Load_content_element,style:{animationDelay:`${c*30}ms`},children:p},"loadElement_"+h);s.push(v)}const f=On("menu.");return C.jsxs("div",{className:Ue.Save_Load_main,children:[C.jsxs("div",{className:Ue.Save_Load_top,children:[C.jsx("div",{className:Ue.Save_Load_title,children:C.jsx("div",{className:Ue.Load_title_text,children:f("loadSaving.title")})}),C.jsx("div",{className:Ue.Save_Load_top_buttonList,children:o})]}),C.jsx("div",{className:Ue.Save_Load_content,id:"Load_content_page_"+n.optionData.slPage,children:s})]})},l1e="_Options_main_u5orq_2",u1e="_Options_top_u5orq_9",c1e="_Options_title_u5orq_16",f1e="_Option_title_text_u5orq_25",h1e="_Elements_in_u5orq_1",d1e="_Option_title_text_shadow_u5orq_34",p1e="_Option_title_text_ts_u5orq_41",v1e="_Options_main_content_u5orq_48",m1e="_Options_main_content_half_u5orq_55",g1e="_About_title_text_u5orq_65",y1e="_About_text_u5orq_73",_1e="_Options_page_container_u5orq_92",x1e="_Options_button_list_u5orq_98",b1e="_Options_page_button_u5orq_102",S1e="_Options_page_button_active_u5orq_114",un={Options_main:l1e,Options_top:u1e,Options_title:c1e,Option_title_text:f1e,Elements_in:h1e,Option_title_text_shadow:d1e,Option_title_text_ts:p1e,Options_main_content:v1e,Options_main_content_half:m1e,About_title_text:g1e,About_text:y1e,Options_page_container:_1e,Options_button_list:x1e,Options_page_button:b1e,Options_page_button_active:S1e},w1e="_NormalOption_ogzuv_1",E1e="_Elements_in_ogzuv_1",T1e="_NormalOption_title_ogzuv_10",A1e="_NormalOption_title_bef_ogzuv_19",C1e="_NormalOption_title_sd_ogzuv_29",P1e="_NormalOption_buttonList_ogzuv_39",Wy={NormalOption:w1e,Elements_in:E1e,NormalOption_title:T1e,NormalOption_title_bef:A1e,NormalOption_title_sd:C1e,NormalOption_buttonList:P1e},Kr=t=>C.jsxs("div",{className:Wy.NormalOption,style:{width:t.full?"100%":"auto"},children:[C.jsx("div",{className:Wy.NormalOption_title,children:t.title}),C.jsx("div",{className:Wy.NormalOption_buttonList,style:{width:t.full?"100%":"auto"},children:t.children})]}),O1e="_NormalButton_1qk3b_1",R1e="_NormalButtonChecked_1qk3b_18",Yy={NormalButton:O1e,NormalButtonChecked:R1e},Ia=t=>{const e=t.textList.length,r=[],{playSeEnter:n,playSeSwitch:i}=_n();for(let a=0;a{i(),t.functionList[a]()},onMouseEnter:n,children:t.textList[a]},t.textList[a]+a+t);r.push(o)}else{const o=C.jsx("div",{className:Yy.NormalButton,onClick:()=>{i(),t.functionList[a]()},onMouseEnter:n,children:t.textList[a]},t.textList[a]+a);r.push(o)}return C.jsx(C.Fragment,{children:r})};function I1e(t){return Is[t]}function sB(){const{i18n:t}=Qv(),e=du(n=>n.userData),r=Lr();return(n,i=!0)=>{var s;const a=n??((s=e.current)==null?void 0:s.optionData.language)??Is.zhCn,o=I1e(a);t.changeLanguage(o),r(Ct({key:"language",value:a})),ge.info("设置语言: "+o),window==null||window.localStorage.setItem("lang",a.toString()),i&&st()}}const k1e="_backButton_qbk37_1",M1e="_about_qbk37_16",F1e="_icon_qbk37_20",N1e="_title_qbk37_24",L1e="_text_qbk37_34",D1e="_contributor_qbk37_43",Wn={backButton:k1e,about:M1e,icon:F1e,title:N1e,text:L1e,contributor:D1e};function B1e(t){const e=On("menu.options.pages.system.options.about.");return C.jsxs("div",{className:Wn.about,children:[C.jsx("div",{className:Wn.backButton,onClick:t.onClose,children:C.jsx(oxe,{className:Wn.icon,theme:"outline",size:"35",strokeWidth:3,fill:"#333"})}),C.jsx("div",{className:Wn.title,children:e("subTitle")}),C.jsx("div",{className:Wn.title,children:e("version")}),C.jsx("div",{className:Wn.text,children:J3.version}),C.jsx("div",{className:Wn.title,children:e("source")}),C.jsx("div",{className:Wn.text,children:C.jsx("a",{target:"_blank",href:"https://github.com/OpenWebGAL/WebGAL",children:"https://github.com/OpenWebGAL/WebGAL"})}),C.jsx("div",{className:Wn.title,children:e("contributors")}),C.jsx("div",{className:Wn.text,children:C.jsx("a",{target:"_blank",href:"https://github.com/OpenWebGAL/WebGAL/graphs/contributors",children:"https://github.com/OpenWebGAL/WebGAL/graphs/contributors"})}),C.jsx("div",{className:Wn.title,children:e("website")}),C.jsx("div",{className:Wn.text,children:C.jsx("a",{target:"_blank",href:"https://openwebgal.com/",children:"https://openwebgal.com/"})})]})}function j1e(){const t=Me(h=>h.userData),e=Me(h=>h.saveData),r=Lr(),n=sB(),i=On("menu.options.pages.system.options."),{playSeDialogOpen:a}=_n();function o(){const d=JSON.stringify({userData:t,saves:e});if(d!==null){const p=new Blob([d],{type:"application/json"}),v=URL.createObjectURL(p),g=document.createElement("a");g.href=v,g.download="saves.json",g.click(),g.remove()}}function s(h){const d=h.target.files[0],p=new FileReader;p.onload=v=>{const g=v.target.result;try{const m=JSON.parse(g);a(),as({title:i("gameSave.dialogs.import.title"),leftText:i("$common.yes"),rightText:i("$common.no"),leftFunc:async()=>{await Os.setItem(L.gameKey,m.userData).then(()=>{ge.info(i("gameSave.dialogs.import.tip"))}),Jc(),te.dispatch(Oa.replaceSaveGame(m.saves.saveData)),te.dispatch(Oa.setFastSave(m.saves.quickSaveData)),_d(),yd(0,200)},rightFunc:()=>{}})}catch(m){ge.error(i("gameSave.dialogs.import.error"),m)}},p.readAsText(d,"UTF-8")}function u(){const h=document.createElement("input");h.type="file",h.onchange=s,h.click()}const[l,c]=ne.useState(!1);function f(){c(!l)}return C.jsxs("div",{className:un.Options_main_content_half,children:[l&&C.jsx(B1e,{onClose:f}),!l&&C.jsxs(C.Fragment,{children:[C.jsx(Kr,{title:i("autoSpeed.title"),children:C.jsx(Ia,{textList:i("autoSpeed.options.slow","autoSpeed.options.medium","autoSpeed.options.fast"),functionList:[()=>{r(Ct({key:"autoSpeed",value:hn.slow})),st()},()=>{r(Ct({key:"autoSpeed",value:hn.normal})),st()},()=>{r(Ct({key:"autoSpeed",value:hn.fast})),st()}],currentChecked:t.optionData.autoSpeed})},"option1"),C.jsx(Kr,{title:i("language.title"),children:C.jsx(Ia,{currentChecked:t.optionData.language,textList:Object.values(ip),functionList:Object.keys(ip).map(h=>()=>n(Is[h]))})},"option7"),C.jsx(Kr,{title:i("resetData.title"),children:C.jsx(Ia,{textList:i("resetData.options.clearGameSave","resetData.options.resetSettings","resetData.options.clearAll"),functionList:[()=>{a(),as({title:i("resetData.dialogs.clearGameSave"),leftText:i("$common.yes"),rightText:i("$common.no"),leftFunc:()=>{r(Oa.resetSaves()),yd(0,200),_d()},rightFunc:()=>{}})},()=>{a(),as({title:i("resetData.dialogs.resetSettings"),leftText:i("$common.yes"),rightText:i("$common.no"),leftFunc:()=>{r(cW()),hp()},rightFunc:()=>{}})},()=>{a(),as({title:i("resetData.dialogs.clearAll"),leftText:i("$common.yes"),rightText:i("$common.no"),leftFunc:()=>{r(fW()),hp(),r(Oa.resetSaves()),yd(0,200),_d()},rightFunc:()=>{}})}],currentChecked:3})},"option2"),C.jsx(Kr,{title:i("gameSave.title"),children:C.jsx(Ia,{textList:i("gameSave.options.export","gameSave.options.import"),functionList:[o,u],currentChecked:2})},"option3"),C.jsx("div",{className:un.About_title_text,onClick:f,children:C.jsx("span",{className:un.About_text,children:i("about.title")})})]})]})}const U1e="_textPreviewMain_nolr3_1",$1e="_textbox_nolr3_8",CO={textPreviewMain:U1e,textbox:$1e},V1e=t=>{const e=On("menu.options.pages.display.options."),r=Me(x=>x.userData),i=Me(x=>x.stage).bgName,a=yS(r.optionData.textSpeed),o=FF(r.optionData.textSpeed),s=r.optionData.textboxOpacity,u=f_(r.optionData.textSize)+"%",l=NF(),c=navigator.userAgent,f=/firefox/i.test(c),h=/^((?!chrome|android).)*safari/i.test(c),d=e("textPreview.text"),p=gs(d,3),v=e("textPreview.title"),g=gs(v,3),m=v!=="",y=LF,_={textArray:p,isText:!0,textDelay:a,isHasName:m,showName:g,currentConcatDialogPrev:"",fontSize:u,currentDialogKey:"",isSafari:h,isFirefox:f,miniAvatar:"",textDuration:o,font:l,textSizeState:u,lineLimit:3,isUseStroke:!0,textboxOpacity:s};return C.jsx("div",{className:CO.textPreviewMain,style:{background:i?`bottom / cover no-repeat url(${i})`:"rgba(0, 0, 0, 0.1)"},children:C.jsx("div",{className:CO.textbox,children:C.jsx(y,{..._})},`previewTextbox-${a}`)})};const el=t=>{const{playSeEnter:e}=_n();return ne.useEffect(()=>{setTimeout(()=>{const r=document.getElementById(t.uniqueID);r!==null&&r.setAttribute("value",t.initValue.toString())},1)},[]),C.jsx("div",{className:"Option_WebGAL_slider",children:C.jsx("input",{id:t.uniqueID,type:"range",onChange:t.onChange,onFocus:e,onMouseEnter:e})})};function G1e(){const t=Me(n=>n.userData),e=Lr(),r=On("menu.options.pages.display.options.");return C.jsxs("div",{className:un.Options_main_content_half,children:[C.jsx(Kr,{title:r("fullScreen.title"),children:C.jsx(Ia,{textList:r("fullScreen.options.on","fullScreen.options.off"),functionList:[()=>{e(Ct({key:"fullScreen",value:Qi.on})),st()},()=>{e(Ct({key:"fullScreen",value:Qi.off})),st()}],currentChecked:t.optionData.fullScreen})},"fullScreen"),C.jsx(Kr,{title:r("textSpeed.title"),children:C.jsx(Ia,{textList:r("textSpeed.options.slow","textSpeed.options.medium","textSpeed.options.fast"),functionList:[()=>{e(Ct({key:"textSpeed",value:hn.slow})),st()},()=>{e(Ct({key:"textSpeed",value:hn.normal})),st()},()=>{e(Ct({key:"textSpeed",value:hn.fast})),st()}],currentChecked:t.optionData.textSpeed})},"textSpeed"),C.jsx(Kr,{title:r("textSize.title"),children:C.jsx(Ia,{textList:r("textSize.options.small","textSize.options.medium","textSize.options.large"),functionList:[()=>{e(Ct({key:"textSize",value:ti.small})),st()},()=>{e(Ct({key:"textSize",value:ti.medium})),st()},()=>{e(Ct({key:"textSize",value:ti.large})),st()}],currentChecked:t.optionData.textSize})},"textSize"),C.jsx(Kr,{title:r("textFont.title"),children:C.jsx(Ia,{textList:r("textFont.options.siYuanSimSun","textFont.options.SimHei","textFont.options.lxgw"),functionList:[()=>{e(Ct({key:"textboxFont",value:Zi.song})),st()},()=>{e(Ct({key:"textboxFont",value:Zi.hei})),st()},()=>{e(Ct({key:"textboxFont",value:Zi.lxgw})),st()}],currentChecked:t.optionData.textboxFont})},"textFont"),C.jsx(Kr,{title:r("textboxOpacity.title"),children:C.jsx(el,{initValue:t.optionData.textboxOpacity,uniqueID:r("textboxOpacity.title"),onChange:n=>{const i=n.target.value;e(Ct({key:"textboxOpacity",value:Number(i)})),st()}})},"textboxOpacity"),C.jsx(Kr,{full:!0,title:r("textPreview.title"),children:C.jsx(V1e,{})},"textPreview")]})}function X1e(){const t=Me(n=>n.userData),e=Lr(),r=On("menu.options.pages.sound.options.");return C.jsxs("div",{className:un.Options_main_content_half,children:[C.jsx(Kr,{title:r("volumeMain.title"),children:C.jsx(el,{initValue:t.optionData.volumeMain,uniqueID:r("volumeMain.title"),onChange:n=>{const i=n.target.value;e(Ct({key:"volumeMain",value:Number(i)})),st()}})},"option4"),C.jsx(Kr,{title:r("vocalVolume.title"),children:C.jsx(el,{initValue:t.optionData.vocalVolume,uniqueID:r("vocalVolume.title"),onChange:n=>{const i=n.target.value;e(Ct({key:"vocalVolume",value:Number(i)})),st()}})},"option5"),C.jsx(Kr,{title:r("bgmVolume.title"),children:C.jsx(el,{initValue:t.optionData.bgmVolume,uniqueID:r("bgmVolume.title"),onChange:n=>{const i=n.target.value;e(Ct({key:"bgmVolume",value:Number(i)})),st()}})},"option6"),C.jsx(Kr,{title:r("seVolume.title"),children:C.jsx(el,{initValue:t.optionData.seVolume,uniqueID:r("seVolume.title"),onChange:n=>{const i=n.target.value;e(Ct({key:"seVolume",value:Number(i)})),st()}})},"option7"),C.jsx(Kr,{title:r("uiSeVolume.title"),children:C.jsx(el,{initValue:t.optionData.uiSeVolume,uniqueID:r("uiSeVolume.title"),onChange:n=>{const i=n.target.value;e(Ct({key:"uiSeVolume",value:Number(i)})),st()}})},"option8"),C.jsx(Kr,{title:r("voiceOption.title"),children:C.jsx(Ia,{textList:r("voiceStop.title","voiceContinue.title"),functionList:[()=>{e(Ct({key:"voiceInterruption",value:zc.yes})),st()},()=>{e(Ct({key:"voiceInterruption",value:zc.no})),st()}],currentChecked:t.optionData.voiceInterruption})},"option9")]})}const z1e=()=>{const{playSeEnter:t,playSeSwitch:e}=_n(),r=wi(0);ne.useEffect(Jc,[]);function n(a){return a===r.value?un.Options_page_button+" "+un.Options_page_button_active:un.Options_page_button}const i=On("menu.options.");return C.jsxs("div",{className:un.Options_main,children:[C.jsx("div",{className:un.Options_top,children:C.jsx("div",{className:un.Options_title,children:C.jsx("div",{className:un.Option_title_text,children:i("title")})})}),C.jsxs("div",{className:un.Options_page_container,children:[C.jsxs("div",{className:un.Options_button_list,children:[C.jsx("div",{onClick:()=>{r.set(0),e()},className:n(0),onMouseEnter:t,children:i("pages.system.title")}),C.jsx("div",{onClick:()=>{r.set(1),e()},className:n(1),onMouseEnter:t,children:i("pages.display.title")}),C.jsx("div",{onClick:()=>{r.set(2),e()},className:n(2),onMouseEnter:t,children:i("pages.sound.title")})]}),C.jsxs("div",{className:un.Options_main_content,children:[r.value===1&&C.jsx(G1e,{}),r.value===0&&C.jsx(j1e,{}),r.value===2&&C.jsx(X1e,{})]})]})]})},W1e=()=>{const t=Me(r=>r.GUI);let e;switch(t.currentMenuTag){case vt.Save:e=C.jsx(o1e,{});break;case vt.Load:e=C.jsx(s1e,{});break;case vt.Option:e=C.jsx(z1e,{});break}return C.jsx(C.Fragment,{children:t.showMenuPanel&&C.jsxs("div",{className:wO.Menu_main,children:[C.jsx("div",{className:wO.Menu_TagContent,children:e}),C.jsx(Oxe,{})]})})},Y1e="_MainStage_main_9enex_1",H1e="_MainStage_main_container_9enex_10",q1e="_MainStage_bgContainer_9enex_17",K1e="_MainStage_showBgSoftly_9enex_1",Z1e="_MainStage_bgContainer_Settled_9enex_27",Q1e="_MainStage_oldBgContainer_9enex_37",J1e="_MainStage_oldBgFadeout_9enex_1",ebe="_MainStage_oldBgContainer_Settled_9enex_47",tbe="_pixiContainer_9enex_72",rbe="_chooseContainer_9enex_77",Hy={MainStage_main:Y1e,MainStage_main_container:H1e,MainStage_bgContainer:q1e,MainStage_showBgSoftly:K1e,MainStage_bgContainer_Settled:Z1e,MainStage_oldBgContainer:Q1e,MainStage_oldBgFadeout:J1e,MainStage_oldBgContainer_Settled:ebe,pixiContainer:tbe,chooseContainer:rbe},nbe=()=>{var v;const t=Me(g=>g.stage),e=Me(g=>g.GUI.titleBgm),r=Me(g=>g.GUI.showTitle),n=Me(g=>g.userData),i=n.optionData.volumeMain,a=i*.01*n.optionData.vocalVolume*.01*t.vocalVolume*.01,o=i*.01*n.optionData.bgmVolume*.01*t.bgm.volume*.01,s=t.bgm.enter,u=t.uiSe,l=i*.01*(((v=n.optionData)==null?void 0:v.seVolume)??100)*.01,c=i*.01*(n.optionData.uiSeVolume??50)*.01,f=Me(g=>g.GUI.isEnterGame),[h,d]=ne.useState(setTimeout(()=>{},0)),p=(g,m,y)=>{y>=0?g.volume=0:g.volume=m;const _=10,x=m/y*_,b=()=>{const S=setTimeout(()=>{g.volume+x>=m?g.volume=m:g.volume+x<=0?(g.volume=0,te.dispatch(Ge({key:"bgm",value:{src:"",enter:0,volume:100}}))):(g.volume+=x,b())},_);d(S)};b()};return ne.useEffect(()=>{clearTimeout(h);const g=document.getElementById("currentBgm");g&&(s===0?g.volume=o:p(g,o,s))},[r,e,t.bgm.src,o,s]),ne.useEffect(()=>{ge.debug(`设置背景音量:${o}`)},[o]),ne.useEffect(()=>{ge.debug(`设置背景音量淡入时间: ${s}`)},[s]),ne.useEffect(()=>{ge.debug(`设置语音音量:${a}`);const g=document.getElementById("currentVocal");g&&(g.volume=a.toString())},[a]),ne.useEffect(()=>{if(u==="")return;const g=document.createElement("audio");g.src=u,g.loop=!1,isNaN(c)?(ge.error("UI SE Vol is NaN"),g.volume=isNaN(l)?i/100:l/100):g.volume=c,g.play(),g.addEventListener("ended",()=>{g.remove()}),te.dispatch(Ge({key:"uiSe",value:""}))},[u]),ne.useEffect(()=>{ge.debug(`设置音效音量: ${l}`)},[l]),ne.useEffect(()=>{ge.debug(`设置用户界面音效音量: ${c}`)},[c]),C.jsxs("div",{children:[C.jsx("audio",{id:"currentBgm",src:r?e:t.bgm.src,loop:!0,autoPlay:f},r.toString()+e),C.jsx("audio",{id:"currentVocal",src:t.playVocal})]})},ibe=()=>{const t=Me(i=>i.stage);let e="100%",r="100%",n="0";return t.enableFilm!==""&&(r="76%",n="12%"),C.jsx("div",{className:Bi.FullScreenPerform_main,style:{width:e,height:r,top:n},children:C.jsx("div",{id:"videoContainer"})})},abe="_TextBox_EventHandler_449dq_2",obe="_TextBox_main_449dq_10",sbe="_showSoftly_449dq_1",lbe="_TextBox_textElement_449dq_38",ube="_TextBox_textElement_start_449dq_43",cbe="_TextDelayShow_449dq_1",fbe="_TextBox_textElement_Settled_449dq_48",hbe="_TextBox_showName_449dq_52",dbe="_miniAvatarContainer_449dq_68",pbe="_miniAvatarImg_449dq_76",qy={TextBox_EventHandler:abe,TextBox_main:obe,showSoftly:sbe,TextBox_textElement:lbe,TextBox_textElement_start:ube,TextDelayShow:cbe,TextBox_textElement_Settled:fbe,TextBox_showName:hbe,miniAvatarContainer:dbe,miniAvatarImg:pbe},vbe=()=>{const t=Me(o=>o.stage),e=Me(o=>o.userData);ne.useEffect(()=>{});const r=dW.textInitialDelay-20*e.optionData.textSpeed,n=e.optionData.textSize*50+200+"%",a=t.showText.split("").map((o,s)=>{let u=s*r,l=t.currentConcatDialogPrev.length;return t.currentConcatDialogPrev!==""&&s>=l&&(u=u-l*r),s{var n,i;const r="bg-main";if(e!==""){const a=(n=L.gameplay.pixiStage)==null?void 0:n.getStageObjByKey(r);a&&a.sourceUrl!==e&&PO(a),gbe(void 0,r,e),Wf(e),ge.debug("重设背景");const{duration:o,animation:s}=Ka("bg-main","enter",!0);L.gameplay.pixiStage.registerPresetAnimation(s,"bg-main-softin",r,t.effects),setTimeout(()=>L.gameplay.pixiStage.removeAnimationWithSetEffects("bg-main-softin"),o)}else{const a=(i=L.gameplay.pixiStage)==null?void 0:i.getStageObjByKey(r);a&&PO(a)}},[e])}function PO(t){var o,s;(o=L.gameplay.pixiStage)==null||o.removeAnimationWithSetEffects("bg-main-softin");const e=t.key;t.key="bg-main-off"+String(new Date().getTime());const r=t.key,n=t.key+"-softoff";(s=L.gameplay.pixiStage)==null||s.removeStageObjectByKey(e);const{duration:i,animation:a}=Ka("bg-main-off","exit",!0,r);L.gameplay.pixiStage.registerAnimation(a,n,r),setTimeout(()=>{var u,l;(u=L.gameplay.pixiStage)==null||u.removeAnimation(n),(l=L.gameplay.pixiStage)==null||l.removeStageObjectByKey(r)},i)}function gbe(t,...e){var n,i;return e[1].endsWith(".skel")?(n=L.gameplay.pixiStage)==null?void 0:n.addSpineBg(...e):(i=L.gameplay.pixiStage)==null?void 0:i.addBg(...e)}function ybe(t){const{figNameLeft:e,figName:r,figNameRight:n,freeFigure:i,live2dMotion:a,live2dExpression:o}=t;ne.useEffect(()=>{var s;for(const u of a)(s=L.gameplay.pixiStage)==null||s.changeModelMotionByKey(u.target,u.motion)},[a]),ne.useEffect(()=>{var s;for(const u of o)(s=L.gameplay.pixiStage)==null||s.changeModelExpressionByKey(u.target,u.expression)},[o]),ne.useEffect(()=>{var l,c;const s="fig-center",u="fig-center-softin";if(r!==""){const f=(l=L.gameplay.pixiStage)==null?void 0:l.getStageObjByKey(s);f&&f.sourceUrl!==r&&ba(f,u,t.effects),Ku(void 0,s,r,"center"),ge.debug("中立绘已重设");const{duration:h,animation:d}=Ka(s,"enter");L.gameplay.pixiStage.registerPresetAnimation(d,u,s,t.effects),setTimeout(()=>L.gameplay.pixiStage.removeAnimationWithSetEffects(u),h)}else{ge.debug("移除中立绘");const f=(c=L.gameplay.pixiStage)==null?void 0:c.getStageObjByKey(s);f&&f.sourceUrl!==r&&ba(f,u,t.effects)}},[r]),ne.useEffect(()=>{var l,c;const s="fig-left",u="fig-left-softin";if(e!==""){const f=(l=L.gameplay.pixiStage)==null?void 0:l.getStageObjByKey(s);f&&f.sourceUrl!==e&&ba(f,u,t.effects),Ku(void 0,s,e,"left"),ge.debug("左立绘已重设");const{duration:h,animation:d}=Ka(s,"enter");L.gameplay.pixiStage.registerPresetAnimation(d,u,s,t.effects),setTimeout(()=>L.gameplay.pixiStage.removeAnimationWithSetEffects(u),h)}else{ge.debug("移除左立绘");const f=(c=L.gameplay.pixiStage)==null?void 0:c.getStageObjByKey(s);f&&f.sourceUrl!==e&&ba(f,u,t.effects)}},[e]),ne.useEffect(()=>{var l,c;const s="fig-right",u="fig-right-softin";if(n!==""){const f=(l=L.gameplay.pixiStage)==null?void 0:l.getStageObjByKey(s);f&&f.sourceUrl!==n&&ba(f,u,t.effects),Ku(void 0,s,n,"right"),ge.debug("右立绘已重设");const{duration:h,animation:d}=Ka(s,"enter");L.gameplay.pixiStage.registerPresetAnimation(d,u,s,t.effects),setTimeout(()=>L.gameplay.pixiStage.removeAnimationWithSetEffects(u),h)}else{const f=(c=L.gameplay.pixiStage)==null?void 0:c.getStageObjByKey(s);f&&f.sourceUrl!==n&&ba(f,u,t.effects)}},[n]),ne.useEffect(()=>{var u,l,c;for(const f of i){const h=`${f.key}`,d=`${f.key}-softin`;if(f.name!==""){const p=(u=L.gameplay.pixiStage)==null?void 0:u.getStageObjByKey(h);if(p){if(p.sourceUrl!==f.name){ba(p,d,t.effects),Ku(void 0,h,f.name,f.basePosition),ge.debug(`${f.key}立绘已重设`);const{duration:v,animation:g}=Ka(h,"enter");L.gameplay.pixiStage.registerPresetAnimation(g,d,h,t.effects),setTimeout(()=>L.gameplay.pixiStage.removeAnimationWithSetEffects(d),v)}}else{Ku(void 0,h,f.name,f.basePosition),ge.debug(`${f.key}立绘已重设`);const{duration:v,animation:g}=Ka(h,"enter");L.gameplay.pixiStage.registerPresetAnimation(g,d,h,t.effects),setTimeout(()=>L.gameplay.pixiStage.removeAnimationWithSetEffects(d),v)}}else{const p=(l=L.gameplay.pixiStage)==null?void 0:l.getStageObjByKey(h);p&&p.sourceUrl!==f.name&&ba(p,d,t.effects)}}const s=(c=L.gameplay.pixiStage)==null?void 0:c.getFigureObjects();if(s){for(const f of s)if(!(f.key==="fig-left"||f.key==="fig-center"||f.key==="fig-right"||f.key.endsWith("-off"))){const h=f.key;if(i.findIndex(p=>p.key===h)<0){const p=`${f.key}-softin`;ba(f,p,t.effects)}}}},[i])}function ba(t,e,r){var l,c,f;if((l=L.gameplay.pixiStage)==null||l.removeAnimationWithSetEffects(e),L.gameplay.isFast){ge.debug("快速模式,立刻关闭立绘"),(c=L.gameplay.pixiStage)==null||c.removeStageObjectByKey(t.key);return}const n=t.key,i=n+"-off";t.key=n+String(new Date().getTime())+"-off";const a=t.key;(f=L.gameplay.pixiStage)==null||f.removeStageObjectByKey(n);const o=a+"-softoff",{duration:s,animation:u}=Ka(i,"exit",!1,a);L.gameplay.pixiStage.registerPresetAnimation(u,o,a,r),setTimeout(()=>{var h,d;(h=L.gameplay.pixiStage)==null||h.removeAnimation(o),(d=L.gameplay.pixiStage)==null||d.removeStageObjectByKey(a)},s)}function Ku(t,...e){var n,i;const r=e[1];return r.endsWith(".json")?_be(...e):r.endsWith(".skel")?(n=L.gameplay.pixiStage)==null?void 0:n.addSpineFigure(...e):(i=L.gameplay.pixiStage)==null?void 0:i.addFigure(...e)}function _be(...t){}function xbe(t){const e=t.effects;setTimeout(()=>{bbe(e)},10)}function bbe(t){var r,n,i,a;const e=((r=L.gameplay.pixiStage)==null?void 0:r.getAllStageObj())??[];for(const o of e){const s=o.key,u=t.find(c=>c.target===s);if(!(((n=L.gameplay.pixiStage)==null?void 0:n.getAllLockedObject())??[]).includes(s))if(u){const c=(i=L.gameplay.pixiStage)==null?void 0:i.getStageObjByKey(s);if(c){const f=c.pixiContainer;Object.assign(f,OO(u.transform))}}else{const c=(a=L.gameplay.pixiStage)==null?void 0:a.getStageObjByKey(s);if(c){const f=c.pixiContainer;Object.assign(f,OO(Zb))}}}}function OO(t){if(!t)return{};const{position:e,alpha:r,...n}=t;return{...n,x:e.x,y:e.y,alphaFilterVal:r}}function Sbe(){const t=Me(e=>e.stage);return mbe(t),ybe(t),xbe(t),C.jsx("div",{style:{display:"none"}})}const wbe="_introContainer_119k8_1",Ebe={introContainer:wbe};function Tbe(){return C.jsx("div",{className:Ebe.introContainer,id:"introContainer"})}function RO(t){const e=document.getElementById("textBoxMain");if(!e)return!1;let r=e.getBoundingClientRect();return t.clientX>r.left&&t.clientXr.top&&t.clientY{n(rt({component:"controlsVisibility",visibility:!1}))},1e3)):Abe(t,r,n)}const Obe=()=>{const t=Me(n=>n.stage),e=Me(n=>n.GUI),r=Lr();return Vse(),C.jsxs("div",{className:Hy.MainStage_main,children:[C.jsx(ibe,{}),C.jsx(Sbe,{}),C.jsx("div",{id:"pixiContianer",className:Hy.pixiContainer,style:{zIndex:FE?"-5":void 0}}),C.jsx("div",{id:"chooseContainer",className:Hy.chooseContainer}),e.showTextBox&&t.enableFilm===""&&!t.isDisableTextbox&&C.jsx(lae,{}),e.showTextBox&&t.enableFilm!==""&&C.jsx(vbe,{}),C.jsx(nbe,{}),C.jsx("div",{onClick:()=>{if(!e.showTextBox){r(rt({component:"showTextBox",visibility:!0}));return}FS(),tn()},onDoubleClick:()=>{L.events.fullscreenDbClick.emit()},id:"FullScreenClick",style:{width:"100%",height:"100%",position:"absolute",zIndex:"12",top:"0"},onMouseMove:n=>!e.showControls&&Pbe(n,t,e,r)}),C.jsx(Tbe,{})]})},Rbe=()=>{const t=On("gaming."),e=2.5,{i18n:r}=Qv(),{playSeEnter:n,playSeClick:i,playSeDialogOpen:a}=_n(),s=r.language==="fr";let u=42,l="150%";s&&(l="125%",u=40);const c=Me(m=>m.GUI),f=Me(m=>m.stage),h=Lr(),d=(m,y)=>{h(rt({component:m,visibility:y}))},p=m=>{h(ss(m))},v=Me(m=>m.saveData.saveData);let g=C.jsx("div",{style:{height:"100%",width:"100%",display:"flex",justifyContent:"center",alignItems:"center"},children:C.jsx("div",{style:{fontSize:"125%"},children:t("noSaving")})});if(v[0]){const m=v[0];g=C.jsxs("div",{className:Ie.slPreviewMain,children:[C.jsx("div",{className:Ie.imgContainer,children:C.jsx("img",{style:{height:"100%"},alt:"q-save-preview image",src:m.previewImage})}),C.jsxs("div",{className:Ie.textContainer,children:[C.jsx("div",{children:m.nowStageState.showName}),C.jsx("div",{style:{fontSize:"75%",color:"rgb(55,60,56)"},children:m.nowStageState.showText})]})]})}return C.jsx(C.Fragment,{children:c.showTextBox&&f.enableFilm===""&&C.jsxs("div",{className:Ie.main,style:{visibility:c.controlsVisibility?"visible":"hidden"},children:[c.showTextBox&&C.jsxs("span",{className:Ie.singleButton,style:{fontSize:l},onClick:()=>{d("showTextBox",!1),i()},onMouseEnter:n,children:[C.jsx(cxe,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e}),C.jsx("span",{className:Ie.button_text,children:t("buttons.hide")})]}),!c.showTextBox&&C.jsxs("span",{className:Ie.singleButton,style:{fontSize:l},onClick:()=>{d("showTextBox",!0),i()},onMouseEnter:n,children:[C.jsx(fxe,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e}),C.jsx("span",{className:Ie.button_text,children:t("buttons.show")})]}),C.jsxs("span",{className:Ie.singleButton,style:{fontSize:l},onClick:()=>{d("showBacklog",!0),d("showTextBox",!1),i()},onMouseEnter:n,children:[C.jsx(J_e,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e}),C.jsx("span",{className:Ie.button_text,children:t("buttons.backlog")})]}),C.jsxs("span",{className:Ie.singleButton,style:{fontSize:l},onClick:()=>{let m=document.getElementById("currentVocal");m!==null&&(m.currentTime=0,m.pause(),m==null||m.play()),i()},onMouseEnter:n,children:[C.jsx(hxe,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e}),C.jsx("span",{className:Ie.button_text,children:t("buttons.replay")})]}),C.jsxs("span",{id:"Button_ControlPanel_auto",className:Ie.singleButton,style:{fontSize:l},onClick:()=>{TN(),i()},onMouseEnter:n,children:[C.jsx(iB,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e}),C.jsx("span",{className:Ie.button_text,children:t("buttons.auto")})]}),C.jsxs("span",{id:"Button_ControlPanel_fast",className:Ie.singleButton,style:{fontSize:l},onClick:()=>{ON(),i()},onMouseEnter:n,children:[C.jsx(txe,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e}),C.jsx("span",{className:Ie.button_text,children:t("buttons.forward")})]}),C.jsxs("span",{className:Ie.singleButton+" "+Ie.fastsave,style:{fontSize:l},onClick:()=>{v_(0),i()},onMouseEnter:n,children:[C.jsx(exe,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e}),C.jsx("span",{className:Ie.button_text,children:t("buttons.quicklySave")}),C.jsx("div",{className:Ie.fastSlPreview+" "+Ie.fastSPreview,children:g})]}),C.jsxs("span",{className:Ie.singleButton+" "+Ie.fastload,style:{fontSize:l},onClick:()=>{hN(0),i()},onMouseEnter:n,children:[C.jsx(rxe,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e}),C.jsx("span",{className:Ie.button_text,children:t("buttons.quicklyLoad")}),C.jsx("div",{className:Ie.fastSlPreview+" "+Ie.fastLPreview,children:g})]}),C.jsxs("span",{className:Ie.singleButton,style:{fontSize:l},onClick:()=>{p(vt.Save),d("showMenuPanel",!0),i()},onMouseEnter:n,children:[C.jsx(aB,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e}),C.jsx("span",{className:Ie.button_text,children:t("buttons.save")})]}),C.jsxs("span",{className:Ie.singleButton,style:{fontSize:l},onClick:()=>{p(vt.Load),d("showMenuPanel",!0),i()},onMouseEnter:n,children:[C.jsx(rB,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e}),C.jsx("span",{className:Ie.button_text,children:t("buttons.load")})]}),C.jsxs("span",{className:Ie.singleButton,style:{fontSize:l},onClick:()=>{p(vt.Option),d("showMenuPanel",!0),i()},onMouseEnter:n,children:[C.jsx(oB,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e}),C.jsx("span",{className:Ie.button_text,children:t("buttons.options")})]}),C.jsxs("span",{className:Ie.singleButton,style:{fontSize:l},onClick:()=>{a(),as({title:t("buttons.titleTips"),leftText:t("$common.yes"),rightText:t("$common.no"),leftFunc:()=>{NE()},rightFunc:()=>{}})},onMouseEnter:n,children:[C.jsx(nB,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e}),C.jsx("span",{className:Ie.button_text,children:t("buttons.title")})]}),C.jsx("span",{className:Ie.singleButton,style:{fontSize:l},onClick:()=>{Pxe(),i()},onMouseEnter:n,children:c.showControls?C.jsx(sxe,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e}):C.jsx(vxe,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e})})]})})},Ibe=()=>{var h,d;const t=On("gaming."),{playSeEnter:e,playSeClick:r}=_n(),n=Me(p=>p.GUI),i=Lr(),a="0.8em",[o,s]=ne.useState(!1),[u,l]=ne.useState(!1);let c=ne.useRef();const f=ne.useMemo(()=>{let p=[];for(let v=0;vA.map(O=>O.reactNode)),x=IO(y).map((A,O)=>C.jsx("div",{children:A.map((P,k)=>P==="

"?C.jsx("br",{},`br${k}`):P)},`backlog-line-${O}`)),S=gs(g.currentStageState.showName,3,!0).map(A=>A.map(O=>O.reactNode)),E=IO(S).map((A,O)=>C.jsx("div",{children:A.map((P,k)=>P==="
"?C.jsx("br",{},`br${k}`):P)},`backlog-line-${O}`)),T=C.jsxs("div",{className:Ur.backlog_item,style:{animationDelay:`${20*(L.backlogManager.getBacklog().length-v)}ms`},children:[C.jsxs("div",{className:Ur.backlog_func_area,children:[C.jsxs("div",{className:Ur.backlog_item_button_list,children:[C.jsx("div",{onClick:A=>{r(),fN(v),A.preventDefault(),A.stopPropagation()},onMouseEnter:e,className:Ur.backlog_item_button_element,children:C.jsx(dxe,{theme:"outline",size:a,fill:"#ffffff",strokeWidth:3})}),g.currentStageState.vocal?C.jsx("div",{onClick:()=>{r();const A=document.getElementById("backlog_audio_play_element_"+v);if(A){A.currentTime=0;const O=te.getState().userData,P=O.optionData.volumeMain;A.volume=P*.01*O.optionData.vocalVolume*.01,A==null||A.play()}},onMouseEnter:e,className:Ur.backlog_item_button_element,children:C.jsx(mxe,{theme:"outline",size:a,fill:"#ffffff",strokeWidth:3})}):null]}),C.jsx("div",{className:Ur.backlog_item_content_name,children:E})]}),C.jsx("div",{className:Ur.backlog_item_content,children:C.jsx("span",{className:Ur.backlog_item_content_text,children:x})}),C.jsx("audio",{id:"backlog_audio_play_element_"+v,src:g.currentStageState.vocal})]},"backlogItem"+g.currentStageState.showText+g.saveScene.currentSentenceId);p.unshift(T)}return p},[((d=(h=L.backlogManager.getBacklog()[L.backlogManager.getBacklog().length-1])==null?void 0:h.saveScene)==null?void 0:d.currentSentenceId)??0]);return ne.useEffect(()=>{n.showBacklog?(c.current&&clearTimeout(c.current),s(!1),l(!0),setTimeout(()=>{l(!1)},0)):c.current=setTimeout(()=>{s(!0),c.current=void 0},700+80)},[n.showBacklog]),C.jsx(C.Fragment,{children:C.jsxs("div",{className:` - ${n.showBacklog?Ur.Backlog_main:Ur.Backlog_main_out} - ${o?Ur.Backlog_main_out_IndexHide:""} - `,children:[C.jsxs("div",{className:Ur.backlog_top,children:[C.jsx(tB,{className:Ur.backlog_top_icon,onClick:()=>{r(),i(rt({component:"showBacklog",visibility:!1})),i(rt({component:"showTextBox",visibility:!0}))},onMouseEnter:e,theme:"outline",size:"4em",fill:"#ffffff",strokeWidth:3}),C.jsx("div",{className:Ur.backlog_title,onClick:()=>{ge.info("Rua! Testing")},children:t("buttons.backlog")})]}),n.showBacklog&&C.jsx("div",{className:`${Ur.backlog_content} ${u?Ur.Backlog_main_DisableScroll:""}`,children:f})]})})};function IO(t){let e=[],r="";for(let n=0;nv.GUI.titleBgm),n=Me(v=>v.userData.appreciationData),i="Title_BGM",a=wi(!1);let o=i,s=-1;const u=39,l=a.value?"80%":"10%",c=n.bgm.length;n.bgm.forEach((v,g)=>{v.url===r&&(o=v.name,s=g)});const f=wi("");o!==i&&o!==f.value&&f.set(o);const h=Lr();function d(v){const g=n.bgm[v];f.set(g.name),h(dp({asset:"titleBgm",value:g.url}))}const p=n.bgm.map((v,g)=>{let m=Pt.bgmElement;return v.name===f.value&&(m=m+" "+Pt.bgmElement_active),C.jsx("div",{onClick:()=>{t(),f.set(v.name),h(dp({asset:"titleBgm",value:v.url}))},className:m,style:{animationDelay:`${g*150}ms`},onMouseEnter:e,children:v.name},v.name)});return C.jsxs("div",{className:Pt.bgmContainer,style:{maxHeight:l},children:[C.jsxs("div",{className:Pt.bgmPlayerMain,children:[C.jsx("div",{onClick:()=>{t(),s<=0?d(c-1):d(s-1)},onMouseEnter:e,className:Pt.bgmControlButton,children:C.jsx(ixe,{theme:"filled",size:u,fill:"#fff",strokeWidth:3,strokeLinejoin:"miter"})}),C.jsx("div",{onClick:()=>{t();const v=document.getElementById("currentBgm");v==null||v.play().then()},onMouseEnter:e,className:Pt.bgmControlButton,children:C.jsx(iB,{theme:"filled",size:u,fill:"#fff",strokeWidth:3,strokeLinejoin:"miter"})}),C.jsx("div",{onClick:()=>{t(),s>=c-1?d(0):d(s+1)},onMouseEnter:e,className:Pt.bgmControlButton,children:C.jsx(nxe,{theme:"filled",size:u,fill:"#fff",strokeWidth:3,strokeLinejoin:"miter"})}),C.jsx("div",{onClick:()=>{t(),document.getElementById("currentBgm").pause()},onMouseEnter:e,className:Pt.bgmControlButton,children:C.jsx(pxe,{theme:"filled",size:u,fill:"#fff",strokeWidth:3,strokeLinejoin:"miter"})}),C.jsx("div",{className:Pt.bgmName,children:o}),C.jsx("div",{onClick:()=>{t(),a.set(!a.value)},onMouseEnter:e,className:Pt.bgmControlButton,style:{marginLeft:"auto"},children:C.jsx(uxe,{theme:"filled",size:u,fill:"#fff",strokeWidth:3,strokeLinejoin:"miter"})})]}),a.value&&C.jsxs("div",{className:Pt.bgmListContainer,children:[" ",p]})]})}function nSe(t){const e=wi(!1),{playSeEnter:r,playSeClick:n}=_n();return C.jsxs(C.Fragment,{children:[e.value&&C.jsx("div",{onClick:()=>{e.set(!e.value),n()},className:Pt.showFullContainer,onMouseEnter:r,children:C.jsx("div",{className:Pt.showFullCgMain,children:C.jsx("div",{style:{backgroundImage:`url('${t.imgUrl}')`,backgroundSize:"cover",backgroundPosition:"center",width:"100%",height:"100%"}})})}),C.jsx("div",{onClick:()=>{e.set(!e.value),n()},onMouseEnter:r,style:{animation:`cg_softIn_${t.transformDeg} 1.5s ease-out ${100+t.index*100}ms forwards `},className:Pt.cgElement,children:C.jsx("div",{style:{backgroundImage:`url('${t.imgUrl}')`,backgroundSize:"cover",backgroundPosition:"center",width:"100%",height:"100%"}})},t.name)]})}function iSe(){const e=Me(l=>l.userData.appreciationData),r=Math.ceil(e.cg.length/8),n=wi(1),{playSeEnter:i,playSeClick:a}=_n(),o=[],s=e.cg.length;for(let l=(n.value-1)*8;l{n.set(l),a()},onMouseEnter:i,className:c,children:l},"nav"+l);u.push(f)}return C.jsxs("div",{className:Pt.cgMain,children:[C.jsx("div",{className:Pt.cgShowDiv,children:C.jsx("div",{className:Pt.cgShowDivWarpper,children:u})}),C.jsx("div",{className:Pt.cgContainer,children:o})]})}function aSe(t,e){return Math.round(Math.random()*(e-t))+t}function oSe(){const{playSeClick:t}=_n(),e=Me(i=>i.GUI.showExtra),r=Lr(),n=On("extra.");return C.jsx(C.Fragment,{children:e&&C.jsxs("div",{className:Pt.extra,children:[C.jsxs("div",{className:Pt.extra_top,children:[C.jsx(tB,{className:Pt.extra_top_icon,onClick:()=>{r(rt({component:"showExtra",visibility:!1})),t()},onMouseEnter:t,theme:"outline",size:"4em",fill:"#fff",strokeWidth:3}),C.jsx("div",{className:Pt.extra_title,children:n("title")})]}),C.jsxs("div",{className:Pt.mainContainer,children:[C.jsx(iSe,{}),C.jsx(rSe,{})]})]})})}const sSe="_tag_yghix_2",lSe="_container_yghix_17",uSe="_showContainer_yghix_1",cSe="_singleButton_yghix_33",fSe="_button_text_yghix_37",Er={tag:sSe,container:lSe,showContainer:uSe,singleButton:cSe,button_text:fSe},hSe=()=>{const t=wi(!1),e=Me(a=>a.stage),r=Lr(),n=(a,o)=>{r(rt({component:a,visibility:o}))},i=a=>{r(ss(a))};return C.jsx(C.Fragment,{children:e.enableFilm!==""&&C.jsxs(C.Fragment,{children:[C.jsx("div",{className:Er.tag,onClick:()=>{t.set(!t.value)},children:C.jsx(axe,{theme:"outline",size:"32",fill:"#fff"})}),t.value&&C.jsxs("div",{className:Er.container,children:[C.jsx("span",{className:Er.singleButton,onClick:()=>{n("showBacklog",!0),n("showTextBox",!1),t.set(!t.value)},children:C.jsx("span",{className:Er.button_text,children:"剧情回想 / BACKLOG"})}),C.jsx("span",{className:Er.singleButton,onClick:()=>{t.set(!t.value);let a=document.getElementById("currentVocal");a!==null&&(a.currentTime=0,a.pause(),a==null||a.play())},children:C.jsx("span",{className:Er.button_text,children:"重播语音 / REPLAY VOICE"})}),C.jsx("span",{id:"Button_ControlPanel_auto",className:Er.singleButton,onClick:()=>{TN(),t.set(!t.value)},children:C.jsx("span",{className:Er.button_text,children:"自动模式 / AUTO"})}),C.jsx("span",{id:"Button_ControlPanel_fast",className:Er.singleButton,onClick:()=>{ON(),t.set(!t.value)},children:C.jsx("span",{className:Er.button_text,children:"快进 / FAST"})}),C.jsx("span",{className:Er.singleButton,onClick:()=>{t.set(!t.value),i(vt.Save),n("showMenuPanel",!0)},children:C.jsx("span",{className:Er.button_text,children:"存档 / SAVE"})}),C.jsx("span",{className:Er.singleButton,onClick:()=>{t.set(!t.value),i(vt.Load),n("showMenuPanel",!0)},children:C.jsx("span",{className:Er.button_text,children:"读档 / LOAD"})}),C.jsx("span",{className:Er.singleButton,onClick:()=>{t.set(!t.value),i(vt.Option),n("showMenuPanel",!0)},children:C.jsx("span",{className:Er.button_text,children:"选项 / OPTIONS"})}),C.jsx("span",{className:Er.singleButton,onClick:()=>{t.set(!t.value),NE()},children:C.jsx("span",{className:Er.button_text,children:"标题 / TITLE"})})]})]})})},dSe="_devPanelMain_11x6i_1",pSe="_devPanelOpener_11x6i_13",kO={devPanelMain:dSe,devPanelOpener:pSe};function vSe(){document.getElementById("pixiCanvas").toBlob(e=>{if(e){const r=document.createElement("a");document.body.append(r),r.download="screenshot",r.href=URL.createObjectURL(e),r.click(),r.remove()}},"image/png")}function mSe(){function t(){return!!window.location.hash.match(/dev/)}const e=wi(!1),r=wi(window.location.hash),n=Me(u=>u.stage);ne.useEffect(()=>{window.onhashchange=()=>{r.set(window.location.hash)}},[]);const i=t(),{t:a,i18n:o}=Qv(),s=C.jsxs(C.Fragment,{children:[C.jsx("div",{onClick:()=>vSe(),children:"Save PIXI Screenshot"}),C.jsxs("div",{children:["Current Language:",o.language]}),C.jsx("div",{onClick:()=>{var u;return(u=L.gameplay.pixiStage)==null?void 0:u.removeAnimation("snow-Ticker")},children:"Remove Snow Ticker"}),C.jsx("div",{children:"Stage State"}),C.jsx("div",{children:JSON.stringify(n,null," ")})]});return C.jsxs(C.Fragment,{children:[i&&e.value&&C.jsxs("div",{className:kO.devPanelMain,children:[C.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[C.jsx("div",{onClick:()=>e.set(!1),style:{fontSize:"150%",padding:"0 0 0 15px",cursor:"pointer"},children:"×"}),C.jsx("div",{style:{padding:"0 0 0 15px",fontSize:"115%"},children:"WebGAL DEV PANEL"})]}),C.jsx("div",{style:{padding:"10px 10px 10px 10px",overflow:"auto"},children:s})]}),!e.value&&i&&C.jsx("div",{onClick:()=>e.set(!0),className:kO.devPanelOpener,children:"Open Dev Panel"})]})}const gSe="_trans_8uz61_2",ySe="_langWrapper_8uz61_10",_Se="_lang_8uz61_10",xSe="_langSelect_8uz61_29",bSe="_langSelectButton_8uz61_35",Zu={trans:gSe,langWrapper:ySe,lang:_Se,langSelect:xSe,langSelectButton:bSe};function SSe(){const t=sB(),[e,r]=ne.useState(!1);ne.useEffect(()=>{(window==null?void 0:window.localStorage.getItem("lang"))?t(Number(window==null?void 0:window.localStorage.getItem("lang")),!1):r(!0)},[]);const n=i=>{r(!1),t(i)};return C.jsx(C.Fragment,{children:e&&C.jsx("div",{className:Zu.trans,children:C.jsxs("div",{className:Zu.langWrapper,children:[C.jsx("div",{className:Zu.lang,children:"LANGUAGE SELECT"}),C.jsx("div",{className:Zu.langSelect,children:Object.keys(ip).map(i=>C.jsx("div",{className:Zu.langSelectButton,onClick:()=>n(Is[i]),children:ip[i]},i))})]})})})}const wSe="_panic_overlay_main_1ysz4_1",ESe={panic_overlay_main:wSe},TSe="_yoozle_blue_1r48o_1",ASe="_yoozle_red_1r48o_5",CSe="_yoozle_yellow_1r48o_9",PSe="_yoozle_green_1r48o_13",OSe="_yoozle_e_rotate_1r48o_17",RSe="_yoozle_container_1r48o_22",ISe="_yoozle_title_1r48o_28",kSe="_yoozle_search_1r48o_37",MSe="_yoozle_search_bar_1r48o_44",FSe="_yoozle_search_buttons_1r48o_51",NSe="_yoozle_button_1r48o_55",bn={yoozle_blue:TSe,yoozle_red:ASe,yoozle_yellow:CSe,yoozle_green:PSe,yoozle_e_rotate:OSe,yoozle_container:RSe,yoozle_title:ISe,yoozle_search:kSe,yoozle_search_bar:MSe,yoozle_search_buttons:FSe,yoozle_button:NSe},LSe=()=>(ne.useEffect(()=>{const t="Yoozle Search",e=document.title;return document.title=t,()=>{document.title=e}},[]),C.jsxs("div",{className:bn.yoozle_container,children:[C.jsx("div",{className:bn.yoozle_title,children:C.jsxs("span",{children:[C.jsx("span",{className:bn.yoozle_blue,style:{marginRight:"1px"},children:"Y"}),C.jsx("span",{className:bn.yoozle_red,children:"o"}),C.jsx("span",{className:bn.yoozle_yellow,children:"o"}),C.jsx("span",{className:bn.yoozle_blue,children:"z"}),C.jsx("span",{className:bn.yoozle_green,children:"l"}),C.jsx("span",{className:`${bn.yoozle_red} ${bn.yoozle_e_rotate}`,children:"e"})]})}),C.jsxs("div",{className:bn.yoozle_search,children:[C.jsx("input",{className:bn.yoozle_search_bar,type:"text",defaultValue:""}),C.jsxs("div",{className:bn.yoozle_search_buttons,children:[C.jsx("input",{className:bn.yoozle_button,type:"submit",value:"Yoozle Search"}),C.jsx("input",{className:bn.yoozle_button,type:"submit",value:"Feeling Lucky"})]})]})]})),DSe=()=>{const t=Me(o=>o.GUI),[e,r]=ne.useState(!1),a=Me(o=>o.userData.globalGameVar).Show_panic===!1;return ne.useEffect(()=>{const o=t.showPanicOverlay&&!a;r(o)},[t.showPanicOverlay,a]),ea.createPortal(C.jsx("div",{className:e?ESe.panic_overlay_main:"",children:e&&C.jsx(LSe,{})}),document.querySelector("div#panic-overlay"))};function BSe(){const t=Me(i=>i.userData),e=Me(i=>i.GUI);Lr();const r=t.optionData.fullScreen,n=e.isEnterGame;ne.useEffect(()=>{switch(r){case Qi.on:{n&&(document.documentElement.requestFullscreen(),ul&&ul.lock(["Escape","F11"]));break}case Qi.off:{document.fullscreenElement&&(document.exitFullscreen(),ul&&ul.unlock());break}}},[r])}function jSe(){return ne.useEffect(()=>{L_e()},[]),BSe(),C.jsxs("div",{className:"App",children:[C.jsx(SSe,{}),C.jsx(Obe,{}),C.jsx(Rbe,{}),C.jsx(hSe,{}),C.jsx(Ibe,{}),C.jsx(nle,{}),C.jsx(lle,{}),C.jsx(oSe,{}),C.jsx(W1e,{}),C.jsx(Txe,{}),C.jsx(DSe,{}),C.jsx(mSe,{})]})}function go(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function v1(t,e){return v1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},v1(t,e)}function bm(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&v1(t,e)}function Qf(t,e){if(e&&(Rr(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return go(t)}function aa(t){return aa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},aa(t)}function USe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function $Se(t){return bN(t)||USe(t)||SN(t)||wN()}function MO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function FO(t){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:{};Ti(this,t),this.init(e,r)}return Ai(t,[{key:"init",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=r||VSe,this.options=n,this.debug=n.debug}},{key:"setDebug",value:function(r){this.debug=r}},{key:"log",value:function(){for(var r=arguments.length,n=new Array(r),i=0;i1?n-1:0),a=1;a-1?s.replace(/###/g,"."):s}function i(){return!t||typeof t=="string"}for(var a=typeof e!="string"?[].concat(e):e.split(".");a.length>1;){if(i())return{};var o=n(a.shift());!t[o]&&r&&(t[o]=new r),Object.prototype.hasOwnProperty.call(t,o)?t=t[o]:t={}}return i()?{}:{obj:t,k:n(a.shift())}}function LO(t,e,r){var n=LE(t,e,Object),i=n.obj,a=n.k;i[a]=r}function zSe(t,e,r,n){var i=LE(t,e,Object),a=i.obj,o=i.k;a[o]=a[o]||[],n&&(a[o]=a[o].concat(r)),n||a[o].push(r)}function Np(t,e){var r=LE(t,e),n=r.obj,i=r.k;if(n)return n[i]}function WSe(t,e,r){var n=Np(t,r);return n!==void 0?n:Np(e,r)}function lB(t,e,r){for(var n in e)n!=="__proto__"&&n!=="constructor"&&(n in t?typeof t[n]=="string"||t[n]instanceof String||typeof e[n]=="string"||e[n]instanceof String?r&&(t[n]=e[n]):lB(t[n],e[n],r):t[n]=e[n]);return t}function qs(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var YSe={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function HSe(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,function(e){return YSe[e]}):t}var Sm=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,qSe=[" ",",","?","!",";"];function KSe(t,e,r){e=e||"",r=r||"";var n=qSe.filter(function(s){return e.indexOf(s)<0&&r.indexOf(s)<0});if(n.length===0)return!0;var i=new RegExp("(".concat(n.map(function(s){return s==="?"?"\\?":s}).join("|"),")")),a=!i.test(t);if(!a){var o=t.indexOf(r);o>0&&!i.test(t.substring(0,o))&&(a=!0)}return a}function Lp(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(t){if(t[e])return t[e];for(var n=e.split(r),i=t,a=0;aa+o;)o++,s=n.slice(a,a+o).join(r),u=i[s];if(u===void 0)return;if(u===null)return null;if(e.endsWith(s)){if(typeof u=="string")return u;if(s&&typeof u[s]=="string")return u[s]}var l=n.slice(a+o).join(r);return l?Lp(u,l,r):void 0}i=i[n[a]]}return i}}function DO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function qh(t){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var JSe=function(t){bm(r,t);var e=ZSe(r);function r(n){var i,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return Ti(this,r),i=e.call(this),Sm&&Po.call(go(i)),i.data=n||{},i.options=a,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.options.ignoreJSONStructure===void 0&&(i.options.ignoreJSONStructure=!0),i}return Ai(r,[{key:"addNamespaces",value:function(i){this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}},{key:"removeNamespaces",value:function(i){var a=this.options.ns.indexOf(i);a>-1&&this.options.ns.splice(a,1)}},{key:"getResource",value:function(i,a,o){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},u=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,l=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure,c=[i,a];o&&typeof o!="string"&&(c=c.concat(o)),o&&typeof o=="string"&&(c=c.concat(u?o.split(u):o)),i.indexOf(".")>-1&&(c=i.split("."));var f=Np(this.data,c);return f||!l||typeof o!="string"?f:Lp(this.data&&this.data[i]&&this.data[i][a],o,u)}},{key:"addResource",value:function(i,a,o,s){var u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},l=u.keySeparator!==void 0?u.keySeparator:this.options.keySeparator,c=[i,a];o&&(c=c.concat(l?o.split(l):o)),i.indexOf(".")>-1&&(c=i.split("."),s=a,a=c[1]),this.addNamespaces(a),LO(this.data,c,s),u.silent||this.emit("added",i,a,o,s)}},{key:"addResources",value:function(i,a,o){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var u in o)(typeof o[u]=="string"||Object.prototype.toString.apply(o[u])==="[object Array]")&&this.addResource(i,a,u,o[u],{silent:!0});s.silent||this.emit("added",i,a,o)}},{key:"addResourceBundle",value:function(i,a,o,s,u){var l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},c=[i,a];i.indexOf(".")>-1&&(c=i.split("."),s=o,o=a,a=c[1]),this.addNamespaces(a);var f=Np(this.data,c)||{};s?lB(f,o,u):f=qh(qh({},f),o),LO(this.data,c,f),l.silent||this.emit("added",i,a,o)}},{key:"removeResourceBundle",value:function(i,a){this.hasResourceBundle(i,a)&&delete this.data[i][a],this.removeNamespaces(a),this.emit("removed",i,a)}},{key:"hasResourceBundle",value:function(i,a){return this.getResource(i,a)!==void 0}},{key:"getResourceBundle",value:function(i,a){return a||(a=this.options.defaultNS),this.options.compatibilityAPI==="v1"?qh(qh({},{}),this.getResource(i,a)):this.getResource(i,a)}},{key:"getDataByLanguage",value:function(i){return this.data[i]}},{key:"hasLanguageSomeTranslations",value:function(i){var a=this.getDataByLanguage(i),o=a&&Object.keys(a)||[];return!!o.find(function(s){return a[s]&&Object.keys(a[s]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),r}(Po),uB={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,r,n,i,a){var o=this;return e.forEach(function(s){o.processors[s]&&(r=o.processors[s].process(r,n,i,a))}),r}};function BO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Wr(t){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var jO={},UO=function(t){bm(r,t);var e=ewe(r);function r(n){var i,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Ti(this,r),i=e.call(this),Sm&&Po.call(go(i)),XSe(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],n,go(i)),i.options=a,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.logger=Yi.create("translator"),i}return Ai(r,[{key:"changeLanguage",value:function(i){i&&(this.language=i)}},{key:"exists",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(i==null)return!1;var o=this.resolve(i,a);return o&&o.res!==void 0}},{key:"extractFromKey",value:function(i,a){var o=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;o===void 0&&(o=":");var s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,u=a.ns||this.options.defaultNS||[],l=o&&i.indexOf(o)>-1,c=!this.options.userDefinedKeySeparator&&!a.keySeparator&&!this.options.userDefinedNsSeparator&&!a.nsSeparator&&!KSe(i,o,s);if(l&&!c){var f=i.match(this.interpolator.nestingRegexp);if(f&&f.length>0)return{key:i,namespaces:u};var h=i.split(o);(o!==s||o===s&&this.options.ns.indexOf(h[0])>-1)&&(u=h.shift()),i=h.join(s)}return typeof u=="string"&&(u=[u]),{key:i,namespaces:u}}},{key:"translate",value:function(i,a,o){var s=this;if(Rr(a)!=="object"&&this.options.overloadTranslationOptionHandler&&(a=this.options.overloadTranslationOptionHandler(arguments)),Rr(a)==="object"&&(a=Wr({},a)),a||(a={}),i==null)return"";Array.isArray(i)||(i=[String(i)]);var u=a.returnDetails!==void 0?a.returnDetails:this.options.returnDetails,l=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,c=this.extractFromKey(i[i.length-1],a),f=c.key,h=c.namespaces,d=h[h.length-1],p=a.lng||this.language,v=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(p&&p.toLowerCase()==="cimode"){if(v){var g=a.nsSeparator||this.options.nsSeparator;return u?{res:"".concat(d).concat(g).concat(f),usedKey:f,exactUsedKey:f,usedLng:p,usedNS:d}:"".concat(d).concat(g).concat(f)}return u?{res:f,usedKey:f,exactUsedKey:f,usedLng:p,usedNS:d}:f}var m=this.resolve(i,a),y=m&&m.res,_=m&&m.usedKey||f,x=m&&m.exactUsedKey||f,b=Object.prototype.toString.apply(y),S=["[object Number]","[object Function]","[object RegExp]"],w=a.joinArrays!==void 0?a.joinArrays:this.options.joinArrays,E=!this.i18nFormat||this.i18nFormat.handleAsObject,T=typeof y!="string"&&typeof y!="boolean"&&typeof y!="number";if(E&&y&&T&&S.indexOf(b)<0&&!(typeof w=="string"&&b==="[object Array]")){if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var A=this.options.returnedObjectHandler?this.options.returnedObjectHandler(_,y,Wr(Wr({},a),{},{ns:h})):"key '".concat(f," (").concat(this.language,")' returned an object instead of string.");return u?(m.res=A,m):A}if(l){var O=b==="[object Array]",P=O?[]:{},k=O?x:_;for(var M in y)if(Object.prototype.hasOwnProperty.call(y,M)){var B="".concat(k).concat(l).concat(M);P[M]=this.translate(B,Wr(Wr({},a),{joinArrays:!1,ns:h})),P[M]===B&&(P[M]=y[M])}y=P}}else if(E&&typeof w=="string"&&b==="[object Array]")y=y.join(w),y&&(y=this.extendTranslation(y,i,a,o));else{var j=!1,z=!1,J=a.count!==void 0&&typeof a.count!="string",Z=r.hasDefaultValue(a),$=J?this.pluralResolver.getSuffix(p,a.count,a):"",F=a["defaultValue".concat($)]||a.defaultValue;!this.isValidLookup(y)&&Z&&(j=!0,y=F),this.isValidLookup(y)||(z=!0,y=f);var G=a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,V=G&&z?void 0:y,U=Z&&F!==y&&this.options.updateMissing;if(z||j||U){if(this.logger.log(U?"updateKey":"missingKey",p,d,f,U?F:y),l){var H=this.resolve(f,Wr(Wr({},a),{},{keySeparator:!1}));H&&H.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var ee=[],ie=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ie&&ie[0])for(var ae=0;ae1&&arguments[1]!==void 0?arguments[1]:{},s,u,l,c,f;return typeof i=="string"&&(i=[i]),i.forEach(function(h){if(!a.isValidLookup(s)){var d=a.extractFromKey(h,o),p=d.key;u=p;var v=d.namespaces;a.options.fallbackNS&&(v=v.concat(a.options.fallbackNS));var g=o.count!==void 0&&typeof o.count!="string",m=g&&!o.ordinal&&o.count===0&&a.pluralResolver.shouldUseIntlApi(),y=o.context!==void 0&&(typeof o.context=="string"||typeof o.context=="number")&&o.context!=="",_=o.lngs?o.lngs:a.languageUtils.toResolveHierarchy(o.lng||a.language,o.fallbackLng);v.forEach(function(x){a.isValidLookup(s)||(f=x,!jO["".concat(_[0],"-").concat(x)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(f)&&(jO["".concat(_[0],"-").concat(x)]=!0,a.logger.warn('key "'.concat(u,'" for languages "').concat(_.join(", "),`" won't get resolved as namespace "`).concat(f,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),_.forEach(function(b){if(!a.isValidLookup(s)){c=b;var S=[p];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(S,p,b,x,o);else{var w;g&&(w=a.pluralResolver.getSuffix(b,o.count,o));var E="".concat(a.options.pluralSeparator,"zero");if(g&&(S.push(p+w),m&&S.push(p+E)),y){var T="".concat(p).concat(a.options.contextSeparator).concat(o.context);S.push(T),g&&(S.push(T+w),m&&S.push(T+E))}}for(var A;A=S.pop();)a.isValidLookup(s)||(l=A,s=a.getResource(b,x,A,o))}}))})}}),{res:s,usedKey:u,exactUsedKey:l,usedLng:c,usedNS:f}}},{key:"isValidLookup",value:function(i){return i!==void 0&&!(!this.options.returnNull&&i===null)&&!(!this.options.returnEmptyString&&i==="")}},{key:"getResource",value:function(i,a,o){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(i,a,o,s):this.resourceStore.getResource(i,a,o,s)}}],[{key:"hasDefaultValue",value:function(i){var a="defaultValue";for(var o in i)if(Object.prototype.hasOwnProperty.call(i,o)&&a===o.substring(0,a.length)&&i[o]!==void 0)return!0;return!1}}]),r}(Po);function Zy(t){return t.charAt(0).toUpperCase()+t.slice(1)}var $O=function(){function t(e){Ti(this,t),this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Yi.create("languageUtils")}return Ai(t,[{key:"getScriptPartFromCode",value:function(r){if(!r||r.indexOf("-")<0)return null;var n=r.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}},{key:"getLanguagePartFromCode",value:function(r){if(!r||r.indexOf("-")<0)return r;var n=r.split("-");return this.formatLanguageCode(n[0])}},{key:"formatLanguageCode",value:function(r){if(typeof r=="string"&&r.indexOf("-")>-1){var n=["hans","hant","latn","cyrl","cans","mong","arab"],i=r.split("-");return this.options.lowerCaseLng?i=i.map(function(a){return a.toLowerCase()}):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=Zy(i[1].toLowerCase()))):i.length===3&&(i[0]=i[0].toLowerCase(),i[1].length===2&&(i[1]=i[1].toUpperCase()),i[0]!=="sgn"&&i[2].length===2&&(i[2]=i[2].toUpperCase()),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=Zy(i[1].toLowerCase())),n.indexOf(i[2].toLowerCase())>-1&&(i[2]=Zy(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?r.toLowerCase():r}},{key:"isSupportedCode",value:function(r){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(r=this.getLanguagePartFromCode(r)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(r)>-1}},{key:"getBestMatchFromCodes",value:function(r){var n=this;if(!r)return null;var i;return r.forEach(function(a){if(!i){var o=n.formatLanguageCode(a);(!n.options.supportedLngs||n.isSupportedCode(o))&&(i=o)}}),!i&&this.options.supportedLngs&&r.forEach(function(a){if(!i){var o=n.getLanguagePartFromCode(a);if(n.isSupportedCode(o))return i=o;i=n.options.supportedLngs.find(function(s){if(s===o)return s;if(!(s.indexOf("-")<0&&o.indexOf("-")<0)&&s.indexOf(o)===0)return s})}}),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i}},{key:"getFallbackCodes",value:function(r,n){if(!r)return[];if(typeof r=="function"&&(r=r(n)),typeof r=="string"&&(r=[r]),Object.prototype.toString.apply(r)==="[object Array]")return r;if(!n)return r.default||[];var i=r[n];return i||(i=r[this.getScriptPartFromCode(n)]),i||(i=r[this.formatLanguageCode(n)]),i||(i=r[this.getLanguagePartFromCode(n)]),i||(i=r.default),i||[]}},{key:"toResolveHierarchy",value:function(r,n){var i=this,a=this.getFallbackCodes(n||this.options.fallbackLng||[],r),o=[],s=function(l){l&&(i.isSupportedCode(l)?o.push(l):i.logger.warn("rejecting language code not found in supportedLngs: ".concat(l)))};return typeof r=="string"&&r.indexOf("-")>-1?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(r)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(r)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(r))):typeof r=="string"&&s(this.formatLanguageCode(r)),a.forEach(function(u){o.indexOf(u)<0&&s(i.formatLanguageCode(u))}),o}}]),t}(),rwe=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],nwe={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},5:function(e){return e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1&&e%100!=11?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e==0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3}},iwe=["v1","v2","v3"],VO={zero:0,one:1,two:2,few:3,many:4,other:5};function awe(){var t={};return rwe.forEach(function(e){e.lngs.forEach(function(r){t[r]={numbers:e.nr,plurals:nwe[e.fc]}})}),t}var owe=function(){function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Ti(this,t),this.languageUtils=e,this.options=r,this.logger=Yi.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=awe()}return Ai(t,[{key:"addRule",value:function(r,n){this.rules[r]=n}},{key:"getRule",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(r,{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[r]||this.rules[this.languageUtils.getLanguagePartFromCode(r)]}},{key:"needsPlural",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.getRule(r,n);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(r,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(r,i).map(function(a){return"".concat(n).concat(a)})}},{key:"getSuffixes",value:function(r){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=this.getRule(r,i);return a?this.shouldUseIntlApi()?a.resolvedOptions().pluralCategories.sort(function(o,s){return VO[o]-VO[s]}).map(function(o){return"".concat(n.options.prepend).concat(o)}):a.numbers.map(function(o){return n.getSuffix(r,o,i)}):[]}},{key:"getSuffix",value:function(r,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=this.getRule(r,i);return a?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(a.select(n)):this.getSuffixRetroCompatible(a,n):(this.logger.warn("no plural rule found for: ".concat(r)),"")}},{key:"getSuffixRetroCompatible",value:function(r,n){var i=this,a=r.noAbs?r.plurals(n):r.plurals(Math.abs(n)),o=r.numbers[a];this.options.simplifyPluralSuffix&&r.numbers.length===2&&r.numbers[0]===1&&(o===2?o="plural":o===1&&(o=""));var s=function(){return i.options.prepend&&o.toString()?i.options.prepend+o.toString():o.toString()};return this.options.compatibilityJSON==="v1"?o===1?"":typeof o=="number"?"_plural_".concat(o.toString()):s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&r.numbers.length===2&&r.numbers[0]===1?s():this.options.prepend&&a.toString()?this.options.prepend+a.toString():a.toString()}},{key:"shouldUseIntlApi",value:function(){return!iwe.includes(this.options.compatibilityJSON)}}]),t}();function GO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function fi(t){for(var e=1;e3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=WSe(t,e,r);return!a&&i&&typeof r=="string"&&(a=Lp(t,r,n),a===void 0&&(a=Lp(e,r,n))),a}var swe=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ti(this,t),this.logger=Yi.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||function(r){return r},this.init(e)}return Ai(t,[{key:"init",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};r.interpolation||(r.interpolation={escapeValue:!0});var n=r.interpolation;this.escape=n.escape!==void 0?n.escape:HSe,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?qs(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?qs(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?qs(n.nestingPrefix):n.nestingPrefixEscaped||qs("$t("),this.nestingSuffix=n.nestingSuffix?qs(n.nestingSuffix):n.nestingSuffixEscaped||qs(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=n.alwaysFormat!==void 0?n.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var r="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(r,"g");var n="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(n,"g");var i="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(i,"g")}},{key:"interpolate",value:function(r,n,i,a){var o=this,s,u,l,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function f(g){return g.replace(/\$/g,"$$$$")}var h=function(m){if(m.indexOf(o.formatSeparator)<0){var y=XO(n,c,m,o.options.keySeparator,o.options.ignoreJSONStructure);return o.alwaysFormat?o.format(y,void 0,i,fi(fi(fi({},a),n),{},{interpolationkey:m})):y}var _=m.split(o.formatSeparator),x=_.shift().trim(),b=_.join(o.formatSeparator).trim();return o.format(XO(n,c,x,o.options.keySeparator,o.options.ignoreJSONStructure),b,i,fi(fi(fi({},a),n),{},{interpolationkey:x}))};this.resetRegExp();var d=a&&a.missingInterpolationHandler||this.options.missingInterpolationHandler,p=a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,v=[{regex:this.regexpUnescape,safeValue:function(m){return f(m)}},{regex:this.regexp,safeValue:function(m){return o.escapeValue?f(o.escape(m)):f(m)}}];return v.forEach(function(g){for(l=0;s=g.regex.exec(r);){var m=s[1].trim();if(u=h(m),u===void 0)if(typeof d=="function"){var y=d(r,s,a);u=typeof y=="string"?y:""}else if(a&&Object.prototype.hasOwnProperty.call(a,m))u="";else if(p){u=s[0];continue}else o.logger.warn("missed to pass in variable ".concat(m," for interpolating ").concat(r)),u="";else typeof u!="string"&&!o.useRawValueToEscape&&(u=NO(u));var _=g.safeValue(u);if(r=r.replace(s[0],_),p?(g.regex.lastIndex+=u.length,g.regex.lastIndex-=s[0].length):g.regex.lastIndex=0,l++,l>=o.maxReplaces)break}}),r}},{key:"nest",value:function(r,n){var i=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,s,u;function l(d,p){var v=this.nestingOptionsSeparator;if(d.indexOf(v)<0)return d;var g=d.split(new RegExp("".concat(v,"[ ]*{"))),m="{".concat(g[1]);d=g[0],m=this.interpolate(m,u);var y=m.match(/'/g),_=m.match(/"/g);(y&&y.length%2===0&&!_||_.length%2!==0)&&(m=m.replace(/'/g,'"'));try{u=JSON.parse(m),p&&(u=fi(fi({},p),u))}catch(x){return this.logger.warn("failed parsing options string in nesting for key ".concat(d),x),"".concat(d).concat(v).concat(m)}return delete u.defaultValue,d}for(;o=this.nestingRegexp.exec(r);){var c=[];u=fi({},a),u=u.replace&&typeof u.replace!="string"?u.replace:u,u.applyPostProcessor=!1,delete u.defaultValue;var f=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){var h=o[1].split(this.formatSeparator).map(function(d){return d.trim()});o[1]=h.shift(),c=h,f=!0}if(s=n(l.call(this,o[1].trim(),u),u),s&&o[0]===r&&typeof s!="string")return s;typeof s!="string"&&(s=NO(s)),s||(this.logger.warn("missed to resolve ".concat(o[1]," for nesting ").concat(r)),s=""),f&&(s=c.reduce(function(d,p){return i.format(d,p,a.lng,fi(fi({},a),{},{interpolationkey:o[1].trim()}))},s.trim())),r=r.replace(o[0],s),this.regexp.lastIndex=0}return r}}]),t}();function zO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Sa(t){for(var e=1;e-1){var n=t.split("(");e=n[0].toLowerCase().trim();var i=n[1].substring(0,n[1].length-1);if(e==="currency"&&i.indexOf(":")<0)r.currency||(r.currency=i.trim());else if(e==="relativetime"&&i.indexOf(":")<0)r.range||(r.range=i.trim());else{var a=i.split(";");a.forEach(function(o){if(o){var s=o.split(":"),u=$Se(s),l=u[0],c=u.slice(1),f=c.join(":").trim().replace(/^'+|'+$/g,"");r[l.trim()]||(r[l.trim()]=f),f==="false"&&(r[l.trim()]=!1),f==="true"&&(r[l.trim()]=!0),isNaN(f)||(r[l.trim()]=parseInt(f,10))}})}}return{formatName:e,formatOptions:r}}function Ks(t){var e={};return function(n,i,a){var o=i+JSON.stringify(a),s=e[o];return s||(s=t(i,a),e[o]=s),s(n)}}var uwe=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ti(this,t),this.logger=Yi.create("formatter"),this.options=e,this.formats={number:Ks(function(r,n){var i=new Intl.NumberFormat(r,Sa({},n));return function(a){return i.format(a)}}),currency:Ks(function(r,n){var i=new Intl.NumberFormat(r,Sa(Sa({},n),{},{style:"currency"}));return function(a){return i.format(a)}}),datetime:Ks(function(r,n){var i=new Intl.DateTimeFormat(r,Sa({},n));return function(a){return i.format(a)}}),relativetime:Ks(function(r,n){var i=new Intl.RelativeTimeFormat(r,Sa({},n));return function(a){return i.format(a,n.range||"day")}}),list:Ks(function(r,n){var i=new Intl.ListFormat(r,Sa({},n));return function(a){return i.format(a)}})},this.init(e)}return Ai(t,[{key:"init",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},i=n.interpolation;this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||","}},{key:"add",value:function(r,n){this.formats[r.toLowerCase().trim()]=n}},{key:"addCached",value:function(r,n){this.formats[r.toLowerCase().trim()]=Ks(n)}},{key:"format",value:function(r,n,i){var a=this,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=n.split(this.formatSeparator),u=s.reduce(function(l,c){var f=lwe(c),h=f.formatName,d=f.formatOptions;if(a.formats[h]){var p=l;try{var v=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},g=v.locale||v.lng||o.locale||o.lng||i;p=a.formats[h](l,g,Sa(Sa(Sa({},d),o),v))}catch(m){a.logger.warn(m)}return p}else a.logger.warn("there was no format function for ".concat(h));return l},r);return u}}]),t}();function WO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function YO(t){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function hwe(t,e){t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)}var dwe=function(t){bm(r,t);var e=cwe(r);function r(n,i,a){var o,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return Ti(this,r),o=e.call(this),Sm&&Po.call(go(o)),o.backend=n,o.store=i,o.services=a,o.languageUtils=a.languageUtils,o.options=s,o.logger=Yi.create("backendConnector"),o.waitingReads=[],o.maxParallelReads=s.maxParallelReads||10,o.readingCalls=0,o.maxRetries=s.maxRetries>=0?s.maxRetries:5,o.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(a,s.backend,s),o}return Ai(r,[{key:"queueLoad",value:function(i,a,o,s){var u=this,l={},c={},f={},h={};return i.forEach(function(d){var p=!0;a.forEach(function(v){var g="".concat(d,"|").concat(v);!o.reload&&u.store.hasResourceBundle(d,v)?u.state[g]=2:u.state[g]<0||(u.state[g]===1?c[g]===void 0&&(c[g]=!0):(u.state[g]=1,p=!1,c[g]===void 0&&(c[g]=!0),l[g]===void 0&&(l[g]=!0),h[v]===void 0&&(h[v]=!0)))}),p||(f[d]=!0)}),(Object.keys(l).length||Object.keys(c).length)&&this.queue.push({pending:c,pendingCount:Object.keys(c).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(l),pending:Object.keys(c),toLoadLanguages:Object.keys(f),toLoadNamespaces:Object.keys(h)}}},{key:"loaded",value:function(i,a,o){var s=i.split("|"),u=s[0],l=s[1];a&&this.emit("failedLoading",u,l,a),o&&this.store.addResourceBundle(u,l,o),this.state[i]=a?-1:2;var c={};this.queue.forEach(function(f){zSe(f.loaded,[u],l),hwe(f,i),a&&f.errors.push(a),f.pendingCount===0&&!f.done&&(Object.keys(f.loaded).forEach(function(h){c[h]||(c[h]={});var d=f.loaded[h];d.length&&d.forEach(function(p){c[h][p]===void 0&&(c[h][p]=!0)})}),f.done=!0,f.errors.length?f.callback(f.errors):f.callback())}),this.emit("loaded",c),this.queue=this.queue.filter(function(f){return!f.done})}},{key:"read",value:function(i,a,o){var s=this,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,c=arguments.length>5?arguments[5]:void 0;if(!i.length)return c(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:i,ns:a,fcName:o,tried:u,wait:l,callback:c});return}this.readingCalls++;var f=function(v,g){if(s.readingCalls--,s.waitingReads.length>0){var m=s.waitingReads.shift();s.read(m.lng,m.ns,m.fcName,m.tried,m.wait,m.callback)}if(v&&g&&u2&&arguments[2]!==void 0?arguments[2]:{},u=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),u&&u();typeof i=="string"&&(i=this.languageUtils.toResolveHierarchy(i)),typeof a=="string"&&(a=[a]);var l=this.queueLoad(i,a,s,u);if(!l.toLoad.length)return l.pending.length||u(),null;l.toLoad.forEach(function(c){o.loadOne(c)})}},{key:"load",value:function(i,a,o){this.prepareLoading(i,a,{},o)}},{key:"reload",value:function(i,a,o){this.prepareLoading(i,a,{reload:!0},o)}},{key:"loadOne",value:function(i){var a=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",s=i.split("|"),u=s[0],l=s[1];this.read(u,l,"read",void 0,void 0,function(c,f){c&&a.logger.warn("".concat(o,"loading namespace ").concat(l," for language ").concat(u," failed"),c),!c&&f&&a.logger.log("".concat(o,"loaded namespace ").concat(l," for language ").concat(u),f),a.loaded(i,c,f)})}},{key:"saveMissing",value:function(i,a,o,s,u){var l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},c=arguments.length>6&&arguments[6]!==void 0?arguments[6]:function(){};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(a)){this.logger.warn('did not save key "'.concat(o,'" as the namespace "').concat(a,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(o==null||o==="")){if(this.backend&&this.backend.create){var f=YO(YO({},l),{},{isUpdate:u}),h=this.backend.create.bind(this.backend);if(h.length<6)try{var d;h.length===5?d=h(i,a,o,s,f):d=h(i,a,o,s),d&&typeof d.then=="function"?d.then(function(p){return c(null,p)}).catch(c):c(null,d)}catch(p){c(p)}else h(i,a,o,s,c,f)}!i||!i[0]||this.store.addResource(i[0],a,o,s)}}}]),r}(Po);function HO(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var r={};if(Rr(e[1])==="object"&&(r=e[1]),typeof e[1]=="string"&&(r.defaultValue=e[1]),typeof e[2]=="string"&&(r.tDescription=e[2]),Rr(e[2])==="object"||Rr(e[3])==="object"){var n=e[3]||e[2];Object.keys(n).forEach(function(i){r[i]=n[i]})}return r},interpolation:{escapeValue:!0,format:function(e,r,n,i){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function qO(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function KO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Di(t){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Kh(){}function mwe(t){var e=Object.getOwnPropertyNames(Object.getPrototypeOf(t));e.forEach(function(r){typeof t[r]=="function"&&(t[r]=t[r].bind(t))})}var Dp=function(t){bm(r,t);var e=pwe(r);function r(){var n,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;if(Ti(this,r),n=e.call(this),Sm&&Po.call(go(n)),n.options=qO(i),n.services={},n.logger=Yi,n.modules={external:[]},mwe(go(n)),a&&!n.isInitialized&&!i.isClone){if(!n.options.initImmediate)return n.init(i,a),Qf(n,go(n));setTimeout(function(){n.init(i,a)},0)}return n}return Ai(r,[{key:"init",value:function(){var i=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;typeof a=="function"&&(o=a,a={}),!a.defaultNS&&a.defaultNS!==!1&&a.ns&&(typeof a.ns=="string"?a.defaultNS=a.ns:a.ns.indexOf("translation")<0&&(a.defaultNS=a.ns[0]));var s=HO();this.options=Di(Di(Di({},s),this.options),qO(a)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=Di(Di({},s.interpolation),this.options.interpolation)),a.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=a.keySeparator),a.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=a.nsSeparator);function u(m){return m?typeof m=="function"?new m:m:null}if(!this.options.isClone){this.modules.logger?Yi.init(u(this.modules.logger),this.options):Yi.init(null,this.options);var l;this.modules.formatter?l=this.modules.formatter:typeof Intl<"u"&&(l=uwe);var c=new $O(this.options);this.store=new JSe(this.options.resources,this.options);var f=this.services;f.logger=Yi,f.resourceStore=this.store,f.languageUtils=c,f.pluralResolver=new owe(c,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),l&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(f.formatter=u(l),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new swe(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new dwe(u(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(m){for(var y=arguments.length,_=new Array(y>1?y-1:0),x=1;x1?y-1:0),x=1;x0&&h[0]!=="dev"&&(this.options.lng=h[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var d=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];d.forEach(function(m){i[m]=function(){var y;return(y=i.store)[m].apply(y,arguments)}});var p=["addResource","addResources","addResourceBundle","removeResourceBundle"];p.forEach(function(m){i[m]=function(){var y;return(y=i.store)[m].apply(y,arguments),i}});var v=Qu(),g=function(){var y=function(x,b){i.isInitialized&&!i.initializedStoreOnce&&i.logger.warn("init: i18next is already initialized. You should call init just once!"),i.isInitialized=!0,i.options.isClone||i.logger.log("initialized",i.options),i.emit("initialized",i.options),v.resolve(b),o(x,b)};if(i.languages&&i.options.compatibilityAPI!=="v1"&&!i.isInitialized)return y(null,i.t.bind(i));i.changeLanguage(i.options.lng,y)};return this.options.resources||!this.options.initImmediate?g():setTimeout(g,0),v}},{key:"loadResources",value:function(i){var a=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Kh,s=o,u=typeof i=="string"?i:this.language;if(typeof i=="function"&&(s=i),!this.options.resources||this.options.partialBundledLanguages){if(u&&u.toLowerCase()==="cimode")return s();var l=[],c=function(d){if(d){var p=a.services.languageUtils.toResolveHierarchy(d);p.forEach(function(v){l.indexOf(v)<0&&l.push(v)})}};if(u)c(u);else{var f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.forEach(function(h){return c(h)})}this.options.preload&&this.options.preload.forEach(function(h){return c(h)}),this.services.backendConnector.load(l,this.options.ns,function(h){!h&&!a.resolvedLanguage&&a.language&&a.setResolvedLanguage(a.language),s(h)})}else s(null)}},{key:"reloadResources",value:function(i,a,o){var s=Qu();return i||(i=this.languages),a||(a=this.options.ns),o||(o=Kh),this.services.backendConnector.reload(i,a,function(u){s.resolve(),o(u)}),s}},{key:"use",value:function(i){if(!i)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!i.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return i.type==="backend"&&(this.modules.backend=i),(i.type==="logger"||i.log&&i.warn&&i.error)&&(this.modules.logger=i),i.type==="languageDetector"&&(this.modules.languageDetector=i),i.type==="i18nFormat"&&(this.modules.i18nFormat=i),i.type==="postProcessor"&&uB.addPostProcessor(i),i.type==="formatter"&&(this.modules.formatter=i),i.type==="3rdParty"&&this.modules.external.push(i),this}},{key:"setResolvedLanguage",value:function(i){if(!(!i||!this.languages)&&!(["cimode","dev"].indexOf(i)>-1))for(var a=0;a-1)&&this.store.hasLanguageSomeTranslations(o)){this.resolvedLanguage=o;break}}}},{key:"changeLanguage",value:function(i,a){var o=this;this.isLanguageChangingTo=i;var s=Qu();this.emit("languageChanging",i);var u=function(h){o.language=h,o.languages=o.services.languageUtils.toResolveHierarchy(h),o.resolvedLanguage=void 0,o.setResolvedLanguage(h)},l=function(h,d){d?(u(d),o.translator.changeLanguage(d),o.isLanguageChangingTo=void 0,o.emit("languageChanged",d),o.logger.log("languageChanged",d)):o.isLanguageChangingTo=void 0,s.resolve(function(){return o.t.apply(o,arguments)}),a&&a(h,function(){return o.t.apply(o,arguments)})},c=function(h){!i&&!h&&o.services.languageDetector&&(h=[]);var d=typeof h=="string"?h:o.services.languageUtils.getBestMatchFromCodes(h);d&&(o.language||u(d),o.translator.language||o.translator.changeLanguage(d),o.services.languageDetector&&o.services.languageDetector.cacheUserLanguage&&o.services.languageDetector.cacheUserLanguage(d)),o.loadResources(d,function(p){l(p,d)})};return!i&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!i&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(c):this.services.languageDetector.detect(c):c(i),s}},{key:"getFixedT",value:function(i,a,o){var s=this,u=function l(c,f){var h;if(Rr(f)!=="object"){for(var d=arguments.length,p=new Array(d>2?d-2:0),v=2;v1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var s=o.lng||this.resolvedLanguage||this.languages[0],u=this.options?this.options.fallbackLng:!1,l=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;var c=function(d,p){var v=a.services.backendConnector.state["".concat(d,"|").concat(p)];return v===-1||v===2};if(o.precheck){var f=o.precheck(this,c);if(f!==void 0)return f}return!!(this.hasResourceBundle(s,i)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||c(s,i)&&(!u||c(l,i)))}},{key:"loadNamespaces",value:function(i,a){var o=this,s=Qu();return this.options.ns?(typeof i=="string"&&(i=[i]),i.forEach(function(u){o.options.ns.indexOf(u)<0&&o.options.ns.push(u)}),this.loadResources(function(u){s.resolve(),a&&a(u)}),s):(a&&a(),Promise.resolve())}},{key:"loadLanguages",value:function(i,a){var o=Qu();typeof i=="string"&&(i=[i]);var s=this.options.preload||[],u=i.filter(function(l){return s.indexOf(l)<0});return u.length?(this.options.preload=s.concat(u),this.loadResources(function(l){o.resolve(),a&&a(l)}),o):(a&&a(),Promise.resolve())}},{key:"dir",value:function(i){if(i||(i=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!i)return"rtl";var a=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],o=this.services&&this.services.languageUtils||new $O(HO());return a.indexOf(o.getLanguagePartFromCode(i))>-1||i.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var i=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Kh,s=Di(Di(Di({},this.options),a),{isClone:!0}),u=new r(s);(a.debug!==void 0||a.prefix!==void 0)&&(u.logger=u.logger.clone(a));var l=["store","services","language"];return l.forEach(function(c){u[c]=i[c]}),u.services=Di({},this.services),u.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},u.translator=new UO(u.services,u.options),u.translator.on("*",function(c){for(var f=arguments.length,h=new Array(f>1?f-1:0),d=1;d0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return new Dp(t,e)});var rn=Dp.createInstance();rn.createInstance=Dp.createInstance;rn.createInstance;rn.dir;rn.init;rn.loadResources;rn.reloadResources;rn.use;rn.changeLanguage;rn.getFixedT;rn.t;rn.exists;rn.setDefaultNamespace;rn.hasLoadedNamespace;rn.loadNamespaces;rn.loadLanguages;rn.use(boe).init({resources:sW||{},lng:Is[lW]||"zhCn",fallbackLng:"zhCn",interpolation:{escapeValue:!1}}).then(()=>console.log("WebGAL i18n Ready!"));ea.render(C.jsx(fe.StrictMode,{children:C.jsx(Toe,{children:C.jsx(_F,{store:te,children:C.jsx(jSe,{})})})}),document.getElementById("root"));export{gr as C,_i as S,Fe as T,L as W,cp as a,xwe as r}; diff --git a/assets/initRegister-a87d3aea.js b/assets/initRegister-cc4c5fbe.js similarity index 95% rename from assets/initRegister-a87d3aea.js rename to assets/initRegister-cc4c5fbe.js index 5d138cd51..dd2c77026 100644 --- a/assets/initRegister-a87d3aea.js +++ b/assets/initRegister-cc4c5fbe.js @@ -1 +1 @@ -import{r as w,W as p,C,T as k,S as M,a as y}from"./index-af3e24c2.js";const P=f=>{const S=p.gameplay.pixiStage.effectsContainer,g=p.gameplay.pixiStage.currentApp,e=new C;S.addChild(e);const n=k.from("./game/tex/cherryBlossoms.png");e.x=g.screen.width/2,e.y=g.screen.height/2,e.pivot.x=e.width/2,e.pivot.y=e.height/2,e.scale.x=1,e.scale.y=1;const i=[];function l(d){var o;const c=y.width,m=y.height,r=new M(n);let s=.25;r.scale.x=.15*s,r.scale.y=.15*s,r.anchor.set(.5),r.x=Math.random()*c-.5*c,r.y=0-.5*m,r.dropSpeed=Math.random()*5,r.acc=Math.random(),e.addChild(r),i.push(r);let h=0;for(const t of i){h++;const a=Math.random();t.dropSpeed=t.acc*.01+t.dropSpeed,t.y+=d*f*t.dropSpeed*.3+.7,h%2===0?(t.x+=d*a*.5,t.rotation+=d*a*.03):(t.x-=d*a*.5,t.rotation-=d*a*.03)}i.length>=200&&((o=i.shift())==null||o.destroy(),e.removeChild(e.children[0]))}return p.gameplay.pixiStage.registerAnimation({setStartState:()=>{},setEndState:()=>{},tickerFunc:l},"cherryBlossoms-Ticker"),{container:e,tickerKey:"cherryBlossoms-Ticker"}};w("cherryBlossoms",()=>P(3));const T=(f,u)=>{var c;const g=p.gameplay.pixiStage.effectsContainer,e=p.gameplay.pixiStage.currentApp,n=new C;g.addChild(n);const i=k.from("./game/tex/raindrop.png");n.x=e.screen.width/2,n.y=e.screen.height/2,n.pivot.x=n.width/2,n.pivot.y=n.height/2,n.scale.x=1,n.scale.y=1;const l=[];function d(m){var h;const r=y.width,s=y.height;for(let o=0;o=.5&&(t.alpha=.5),t.alpha<=.2&&(t.alpha=.2),n.addChild(t),l.push(t),l.length>=2500&&((h=l.shift())==null||h.destroy(),n.removeChild(n.children[0]))}for(const o of l)o.dropSpeed=o.acc*.01+o.dropSpeed,o.y+=m*f*o.dropSpeed*1.1+3}return(c=p.gameplay.pixiStage)==null||c.registerAnimation({setStartState:()=>{},setEndState:()=>{},tickerFunc:d},"rain-Ticker"),{container:n,tickerKey:"rain-Ticker"}};w("rain",()=>T(6,10));const b=f=>{var d;const S=p.gameplay.pixiStage.effectsContainer,g=p.gameplay.pixiStage.currentApp,e=new C;S.addChild(e);const n=k.from("./game/tex/snowFlake_min.png");e.x=g.screen.width/2,e.y=g.screen.height/2,e.pivot.x=e.width/2,e.pivot.y=e.height/2,e.scale.x=1,e.scale.y=1;const i=[];function l(c){var t;const m=y.width,r=y.height,s=new M(n);let h=Math.random();h<=.5&&(h=.5),s.scale.x=.144*h,s.scale.y=.144*h,s.anchor.set(.5),s.x=Math.random()*m-.5*m,s.y=0-.5*r,s.dropSpeed=Math.random()*2,s.acc=Math.random(),e.addChild(s),i.push(s);let o=0;for(const a of i){o++;const x=Math.random();a.dropSpeed=a.acc*.01+a.dropSpeed,a.y+=c*f*a.dropSpeed*.3+.7,o%2===0?(a.x+=c*x*.5,a.rotation+=c*x*.03):(a.x-=c*x*.5,a.rotation-=c*x*.03)}i.length>=500&&((t=i.shift())==null||t.destroy(),e.removeChild(e.children[0]))}return(d=p.gameplay.pixiStage)==null||d.registerAnimation({setStartState:()=>{},setEndState:()=>{},tickerFunc:l},"snow-Ticker"),{container:e,tickerKey:"snow-Ticker"}};w("snow",()=>b(3)); +import{r as w,W as p,C,T as k,S as M,a as y}from"./index-41daed13.js";const P=f=>{const S=p.gameplay.pixiStage.effectsContainer,g=p.gameplay.pixiStage.currentApp,e=new C;S.addChild(e);const n=k.from("./game/tex/cherryBlossoms.png");e.x=g.screen.width/2,e.y=g.screen.height/2,e.pivot.x=e.width/2,e.pivot.y=e.height/2,e.scale.x=1,e.scale.y=1;const i=[];function l(d){var o;const c=y.width,m=y.height,r=new M(n);let s=.25;r.scale.x=.15*s,r.scale.y=.15*s,r.anchor.set(.5),r.x=Math.random()*c-.5*c,r.y=0-.5*m,r.dropSpeed=Math.random()*5,r.acc=Math.random(),e.addChild(r),i.push(r);let h=0;for(const t of i){h++;const a=Math.random();t.dropSpeed=t.acc*.01+t.dropSpeed,t.y+=d*f*t.dropSpeed*.3+.7,h%2===0?(t.x+=d*a*.5,t.rotation+=d*a*.03):(t.x-=d*a*.5,t.rotation-=d*a*.03)}i.length>=200&&((o=i.shift())==null||o.destroy(),e.removeChild(e.children[0]))}return p.gameplay.pixiStage.registerAnimation({setStartState:()=>{},setEndState:()=>{},tickerFunc:l},"cherryBlossoms-Ticker"),{container:e,tickerKey:"cherryBlossoms-Ticker"}};w("cherryBlossoms",()=>P(3));const T=(f,u)=>{var c;const g=p.gameplay.pixiStage.effectsContainer,e=p.gameplay.pixiStage.currentApp,n=new C;g.addChild(n);const i=k.from("./game/tex/raindrop.png");n.x=e.screen.width/2,n.y=e.screen.height/2,n.pivot.x=n.width/2,n.pivot.y=n.height/2,n.scale.x=1,n.scale.y=1;const l=[];function d(m){var h;const r=y.width,s=y.height;for(let o=0;o=.5&&(t.alpha=.5),t.alpha<=.2&&(t.alpha=.2),n.addChild(t),l.push(t),l.length>=2500&&((h=l.shift())==null||h.destroy(),n.removeChild(n.children[0]))}for(const o of l)o.dropSpeed=o.acc*.01+o.dropSpeed,o.y+=m*f*o.dropSpeed*1.1+3}return(c=p.gameplay.pixiStage)==null||c.registerAnimation({setStartState:()=>{},setEndState:()=>{},tickerFunc:d},"rain-Ticker"),{container:n,tickerKey:"rain-Ticker"}};w("rain",()=>T(6,10));const b=f=>{var d;const S=p.gameplay.pixiStage.effectsContainer,g=p.gameplay.pixiStage.currentApp,e=new C;S.addChild(e);const n=k.from("./game/tex/snowFlake_min.png");e.x=g.screen.width/2,e.y=g.screen.height/2,e.pivot.x=e.width/2,e.pivot.y=e.height/2,e.scale.x=1,e.scale.y=1;const i=[];function l(c){var t;const m=y.width,r=y.height,s=new M(n);let h=Math.random();h<=.5&&(h=.5),s.scale.x=.144*h,s.scale.y=.144*h,s.anchor.set(.5),s.x=Math.random()*m-.5*m,s.y=0-.5*r,s.dropSpeed=Math.random()*2,s.acc=Math.random(),e.addChild(s),i.push(s);let o=0;for(const a of i){o++;const x=Math.random();a.dropSpeed=a.acc*.01+a.dropSpeed,a.y+=c*f*a.dropSpeed*.3+.7,o%2===0?(a.x+=c*x*.5,a.rotation+=c*x*.03):(a.x-=c*x*.5,a.rotation-=c*x*.03)}i.length>=500&&((t=i.shift())==null||t.destroy(),e.removeChild(e.children[0]))}return(d=p.gameplay.pixiStage)==null||d.registerAnimation({setStartState:()=>{},setEndState:()=>{},tickerFunc:l},"snow-Ticker"),{container:e,tickerKey:"snow-Ticker"}};w("snow",()=>b(3)); diff --git a/game/template/template.json b/game/template/template.json index 378821d2e..2799020c1 100644 --- a/game/template/template.json +++ b/game/template/template.json @@ -1,4 +1,4 @@ { "name":"Default Template", - "webgal-version":"4.5.10" + "webgal-version":"4.5.11" } diff --git a/index.html b/index.html index 1eaf2974d..fa1421f65 100644 --- a/index.html +++ b/index.html @@ -7,8 +7,8 @@ WebGAL - - + +