From fca7f21845acad77d2f2d9f70c33fb9d54aad76c Mon Sep 17 00:00:00 2001 From: Mahiru Date: Sun, 24 Mar 2024 19:32:25 +0800 Subject: [PATCH] update engine --- .../{index-d19e8019.js => index-99adfccc.js} | 150 +++++++++--------- ...r-f1733106.js => initRegister-ac7bb12e.js} | 2 +- .../templates/WebGAL_Template/index.html | 2 +- 3 files changed, 77 insertions(+), 77 deletions(-) rename packages/terre2/assets/templates/WebGAL_Template/assets/{index-d19e8019.js => index-99adfccc.js} (92%) rename packages/terre2/assets/templates/WebGAL_Template/assets/{initRegister-f1733106.js => initRegister-ac7bb12e.js} (97%) diff --git a/packages/terre2/assets/templates/WebGAL_Template/assets/index-d19e8019.js b/packages/terre2/assets/templates/WebGAL_Template/assets/index-99adfccc.js similarity index 92% rename from packages/terre2/assets/templates/WebGAL_Template/assets/index-d19e8019.js rename to packages/terre2/assets/templates/WebGAL_Template/assets/index-99adfccc.js index edde62999..3e88b45a4 100644 --- a/packages/terre2/assets/templates/WebGAL_Template/assets/index-d19e8019.js +++ b/packages/terre2/assets/templates/WebGAL_Template/assets/index-99adfccc.js @@ -1,54 +1,54 @@ -var yB=Object.defineProperty;var _B=(t,e,r)=>e in t?yB(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Ce=(t,e,r)=>(_B(t,typeof e!="symbol"?e+"":e,r),r);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var Jn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Rn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function xB(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var DO={exports:{}},Pf={};/* +var yB=Object.defineProperty;var _B=(t,e,r)=>e in t?yB(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Ce=(t,e,r)=>(_B(t,typeof e!="symbol"?e+"":e,r),r);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var Jn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Rn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function xB(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var BO={exports:{}},Pf={};/* object-assign (c) Sindre Sorhus @license MIT -*/var RE=Object.getOwnPropertySymbols,bB=Object.prototype.hasOwnProperty,SB=Object.prototype.propertyIsEnumerable;function wB(t){if(t==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function EB(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de",Object.getOwnPropertyNames(t)[0]==="5")return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;var n=Object.getOwnPropertyNames(e).map(function(a){return e[a]});if(n.join("")!=="0123456789")return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(a){i[a]=a}),Object.keys(Object.assign({},i)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}var a1=EB()?Object.assign:function(t,e){for(var r,n=wB(t),i,a=1;a"u"||typeof MessageChannel!="function"){var u=null,l=null,c=function(){if(u!==null)try{var M=t.unstable_now();u(!0,M),u=null}catch(G){throw setTimeout(c,0),G}};e=function(M){u!==null?setTimeout(e,0,M):(u=M,setTimeout(c,0))},r=function(M,G){l=setTimeout(M,G)},n=function(){clearTimeout(l)},t.unstable_shouldYield=function(){return!1},i=t.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 p=!1,v=null,g=-1,m=5,y=0;t.unstable_shouldYield=function(){return t.unstable_now()>=y},i=function(){},t.unstable_forceFrameRate=function(M){0>M||125>>1,H=M[j];if(H!==void 0&&0T(ie,V))pe!==void 0&&0>T(pe,ie)?(M[j]=pe,M[ae]=V,j=ae):(M[j]=ie,M[ee]=V,j=ee);else if(pe!==void 0&&0>T(pe,V))M[j]=pe,M[ae]=V,j=ae;else break e}}return G}return null}function T(M,G){var V=M.sortIndex-G.sortIndex;return V!==0?V:M.id-G.id}var E=[],A=[],O=1,P=null,F=3,k=!1,B=!1,U=!1;function z(M){for(var G=S(A);G!==null;){if(G.callback===null)w(A);else if(G.startTime<=M)w(A),G.sortIndex=G.expirationTime,x(E,G);else break;G=S(A)}}function J(M){if(U=!1,z(M),!B)if(S(E)!==null)B=!0,e(Q);else{var G=S(A);G!==null&&r(J,G.startTime-M)}}function Q(M,G){B=!1,U&&(U=!1,n()),k=!0;var V=F;try{for(z(G),P=S(E);P!==null&&(!(P.expirationTime>G)||M&&!t.unstable_shouldYield());){var j=P.callback;if(typeof j=="function"){P.callback=null,F=P.priorityLevel;var H=j(P.expirationTime<=G);G=t.unstable_now(),typeof H=="function"?P.callback=H:P===S(E)&&w(E),z(G)}else w(E);P=S(E)}if(P!==null)var ee=!0;else{var ie=S(A);ie!==null&&r(J,ie.startTime-G),ee=!1}return ee}finally{P=null,F=V,k=!1}}var $=i;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(M){M.callback=null},t.unstable_continueExecution=function(){B||k||(B=!0,e(Q))},t.unstable_getCurrentPriorityLevel=function(){return F},t.unstable_getFirstCallbackNode=function(){return S(E)},t.unstable_next=function(M){switch(F){case 1:case 2:case 3:var G=3;break;default:G=F}var V=F;F=G;try{return M()}finally{F=V}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=$,t.unstable_runWithPriority=function(M,G){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var V=F;F=M;try{return G()}finally{F=V}},t.unstable_scheduleCallback=function(M,G,V){var j=t.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0j?(M.sortIndex=V,x(A,M),S(E)===null&&M===S(A)&&(U?n():U=!0,r(J,V-j))):(M.sortIndex=H,x(E,M),B||k||(B=!0,e(Q))),M},t.unstable_wrapCallback=function(M){var G=F;return function(){var V=F;F=G;try{return M.apply(this,arguments)}finally{F=V}}}})(rR);tR.exports=rR;var NB=tR.exports;/** @license React v17.0.2 + */(function(t){var e,r,n,i;if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;t.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();t.unstable_now=function(){return o.now()-s}}if(typeof window>"u"||typeof MessageChannel!="function"){var u=null,l=null,c=function(){if(u!==null)try{var M=t.unstable_now();u(!0,M),u=null}catch(G){throw setTimeout(c,0),G}};e=function(M){u!==null?setTimeout(e,0,M):(u=M,setTimeout(c,0))},r=function(M,G){l=setTimeout(M,G)},n=function(){clearTimeout(l)},t.unstable_shouldYield=function(){return!1},i=t.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 p=!1,v=null,g=-1,m=5,y=0;t.unstable_shouldYield=function(){return t.unstable_now()>=y},i=function(){},t.unstable_forceFrameRate=function(M){0>M||125>>1,H=M[j];if(H!==void 0&&0T(ie,V))pe!==void 0&&0>T(pe,ie)?(M[j]=pe,M[ae]=V,j=ae):(M[j]=ie,M[ee]=V,j=ee);else if(pe!==void 0&&0>T(pe,V))M[j]=pe,M[ae]=V,j=ae;else break e}}return G}return null}function T(M,G){var V=M.sortIndex-G.sortIndex;return V!==0?V:M.id-G.id}var E=[],A=[],O=1,P=null,F=3,k=!1,B=!1,U=!1;function z(M){for(var G=S(A);G!==null;){if(G.callback===null)w(A);else if(G.startTime<=M)w(A),G.sortIndex=G.expirationTime,x(E,G);else break;G=S(A)}}function J(M){if(U=!1,z(M),!B)if(S(E)!==null)B=!0,e(Q);else{var G=S(A);G!==null&&r(J,G.startTime-M)}}function Q(M,G){B=!1,U&&(U=!1,n()),k=!0;var V=F;try{for(z(G),P=S(E);P!==null&&(!(P.expirationTime>G)||M&&!t.unstable_shouldYield());){var j=P.callback;if(typeof j=="function"){P.callback=null,F=P.priorityLevel;var H=j(P.expirationTime<=G);G=t.unstable_now(),typeof H=="function"?P.callback=H:P===S(E)&&w(E),z(G)}else w(E);P=S(E)}if(P!==null)var ee=!0;else{var ie=S(A);ie!==null&&r(J,ie.startTime-G),ee=!1}return ee}finally{P=null,F=V,k=!1}}var $=i;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(M){M.callback=null},t.unstable_continueExecution=function(){B||k||(B=!0,e(Q))},t.unstable_getCurrentPriorityLevel=function(){return F},t.unstable_getFirstCallbackNode=function(){return S(E)},t.unstable_next=function(M){switch(F){case 1:case 2:case 3:var G=3;break;default:G=F}var V=F;F=G;try{return M()}finally{F=V}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=$,t.unstable_runWithPriority=function(M,G){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var V=F;F=M;try{return G()}finally{F=V}},t.unstable_scheduleCallback=function(M,G,V){var j=t.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0j?(M.sortIndex=V,x(A,M),S(E)===null&&M===S(A)&&(U?n():U=!0,r(J,V-j))):(M.sortIndex=H,x(E,M),B||k||(B=!0,e(Q))),M},t.unstable_wrapCallback=function(M){var G=F;return function(){var V=F;F=G;try{return M.apply(this,arguments)}finally{F=V}}}})(nR);rR.exports=nR;var NB=rR.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 Ip=ne,Mt=a1,Or=NB;function he(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),LB=/^[: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]*$/,FE=Object.prototype.hasOwnProperty,NE={},LE={};function DB(t){return FE.call(LE,t)?!0:FE.call(NE,t)?!1:LB.test(t)?LE[t]=!0:(NE[t]=!0,!1)}function BB(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function jB(t,e,r,n){if(e===null||typeof e>"u"||BB(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function mn(t,e,r,n,i,a,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=a,this.removeEmptyString=o}var Xr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Xr[t]=new mn(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Xr[e]=new mn(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Xr[t]=new mn(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Xr[t]=new mn(t,2,!1,t,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(t){Xr[t]=new mn(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Xr[t]=new mn(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Xr[t]=new mn(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Xr[t]=new mn(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Xr[t]=new mn(t,5,!1,t.toLowerCase(),null,!1,!1)});var f1=/[\-:]([a-z])/g;function h1(t){return t[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(t){var e=t.replace(f1,h1);Xr[e]=new mn(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(f1,h1);Xr[e]=new mn(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(f1,h1);Xr[e]=new mn(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Xr[t]=new mn(t,1,!1,t.toLowerCase(),null,!1,!1)});Xr.xlinkHref=new mn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Xr[t]=new mn(t,1,!1,t.toLowerCase(),null,!0,!0)});function d1(t,e,r,n){var i=Xr.hasOwnProperty(e)?Xr[e]:null,a=i!==null?i.type===0:n?!1:!(!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),LB=/^[: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]*$/,NE=Object.prototype.hasOwnProperty,LE={},DE={};function DB(t){return NE.call(DE,t)?!0:NE.call(LE,t)?!1:LB.test(t)?DE[t]=!0:(LE[t]=!0,!1)}function BB(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function jB(t,e,r,n){if(e===null||typeof e>"u"||BB(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function mn(t,e,r,n,i,a,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=a,this.removeEmptyString=o}var Xr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Xr[t]=new mn(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Xr[e]=new mn(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Xr[t]=new mn(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Xr[t]=new mn(t,2,!1,t,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(t){Xr[t]=new mn(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Xr[t]=new mn(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Xr[t]=new mn(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Xr[t]=new mn(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Xr[t]=new mn(t,5,!1,t.toLowerCase(),null,!1,!1)});var f1=/[\-:]([a-z])/g;function h1(t){return t[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(t){var e=t.replace(f1,h1);Xr[e]=new mn(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(f1,h1);Xr[e]=new mn(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(f1,h1);Xr[e]=new mn(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Xr[t]=new mn(t,1,!1,t.toLowerCase(),null,!1,!1)});Xr.xlinkHref=new mn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Xr[t]=new mn(t,1,!1,t.toLowerCase(),null,!0,!0)});function d1(t,e,r,n){var i=Xr.hasOwnProperty(e)?Xr[e]:null,a=i!==null?i.type===0:n?!1:!(!(2s||i[o]!==a[s])return` -`+i[o].replace(" at new "," at ");while(1<=o&&0<=s);break}}}finally{bm=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?Ju(t):""}function UB(t){switch(t.tag){case 5:return Ju(t.type);case 16:return Ju("Lazy");case 13:return Ju("Suspense");case 19:return Ju("SuspenseList");case 0:case 2:case 15:return t=eh(t.type,!1),t;case 11:return t=eh(t.type.render,!1),t;case 22:return t=eh(t.type._render,!1),t;case 1:return t=eh(t.type,!0),t;default:return""}}function fl(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Ha:return"Fragment";case qo:return"Portal";case sc:return"Profiler";case p1:return"StrictMode";case lc:return"Suspense";case Sd:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case m1:return(t.displayName||"Context")+".Consumer";case v1:return(t._context.displayName||"Context")+".Provider";case kp:var e=t.render;return e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case Mp:return fl(t.type);case y1:return fl(t._render);case g1:e=t._payload,t=t._init;try{return fl(t(e))}catch{}}return null}function yo(t){switch(typeof t){case"boolean":case"number":case"object":case"string":case"undefined":return t;default:return""}}function aR(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function $B(t){var e=aR(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,a=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,a.call(this,o)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function th(t){t._valueTracker||(t._valueTracker=$B(t))}function oR(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=aR(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function wd(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function zy(t,e){var r=e.checked;return Mt({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function BE(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=yo(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function sR(t,e){e=e.checked,e!=null&&d1(t,"checked",e,!1)}function Wy(t,e){sR(t,e);var r=yo(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?Yy(t,e.type,r):e.hasOwnProperty("defaultValue")&&Yy(t,e.type,yo(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function jE(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function Yy(t,e,r){(e!=="number"||wd(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}function VB(t){var e="";return Ip.Children.forEach(t,function(r){r!=null&&(e+=r)}),e}function Hy(t,e){return t=Mt({children:void 0},e),(e=VB(e.children))&&(t.children=e),t}function hl(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i=r.length))throw Error(he(93));r=r[0]}e=r}e==null&&(e=""),r=e}t._wrapperState={initialValue:yo(r)}}function lR(t,e){var r=yo(e.value),n=yo(e.defaultValue);r!=null&&(r=""+r,r!==t.value&&(t.value=r),e.defaultValue==null&&t.defaultValue!==r&&(t.defaultValue=r)),n!=null&&(t.defaultValue=""+n)}function $E(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}var Ky={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function uR(t){switch(t){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 Zy(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?uR(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var rh,cR=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,r,n,i){MSApp.execUnsafeLocalFunction(function(){return t(e,r,n,i)})}:t}(function(t,e){if(t.namespaceURI!==Ky.svg||"innerHTML"in t)t.innerHTML=e;else{for(rh=rh||document.createElement("div"),rh.innerHTML=""+e.valueOf().toString()+"",e=rh.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Rc(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var uc={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},GB=["Webkit","ms","Moz","O"];Object.keys(uc).forEach(function(t){GB.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),uc[e]=uc[t]})});function fR(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||uc.hasOwnProperty(t)&&uc[t]?(""+e).trim():e+"px"}function hR(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=fR(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var XB=Mt({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 Qy(t,e){if(e){if(XB[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(he(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(he(60));if(!(typeof e.dangerouslySetInnerHTML=="object"&&"__html"in e.dangerouslySetInnerHTML))throw Error(he(61))}if(e.style!=null&&typeof e.style!="object")throw Error(he(62))}}function Jy(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 b1(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var e0=null,dl=null,pl=null;function VE(t){if(t=If(t)){if(typeof e0!="function")throw Error(he(280));var e=t.stateNode;e&&(e=jp(e),e0(t.stateNode,t.type,e))}}function dR(t){dl?pl?pl.push(t):pl=[t]:dl=t}function pR(){if(dl){var t=dl,e=pl;if(pl=dl=null,VE(t),e)for(t=0;tn?0:1<r;r++)e.push(t);return e}function Np(t,e,r){t.pendingLanes|=e;var n=e-1;t.suspendedLanes&=n,t.pingedLanes&=n,t=t.eventTimes,e=31-_o(e),t[e]=r}var _o=Math.clz32?Math.clz32:o4,i4=Math.log,a4=Math.LN2;function o4(t){return t===0?32:31-(i4(t)/a4|0)|0}var s4=Or.unstable_UserBlockingPriority,l4=Or.unstable_runWithPriority,Hh=!0;function u4(t,e,r,n){Ko||w1();var i=P1,a=Ko;Ko=!0;try{vR(i,t,e,r,n)}finally{(Ko=a)||E1()}}function c4(t,e,r,n){l4(s4,P1.bind(null,t,e,r,n))}function P1(t,e,r,n){if(Hh){var i;if((i=(e&4)===0)&&0=fc),QE=String.fromCharCode(32),JE=!1;function kR(t,e){switch(t){case"keyup":return M4.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function MR(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var tl=!1;function N4(t,e){switch(t){case"compositionend":return MR(e);case"keypress":return e.which!==32?null:(JE=!0,QE);case"textInput":return t=e.data,t===QE&&JE?null:t;default:return null}}function L4(t,e){if(tl)return t==="compositionend"||!M1&&kR(t,e)?(t=RR(),qh=R1=Za=null,tl=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=nT(r)}}function DR(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?DR(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function aT(){for(var t=window,e=wd();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=wd(t.document)}return e}function a0(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var W4=Fa&&"documentMode"in document&&11>=document.documentMode,rl=null,o0=null,dc=null,s0=!1;function oT(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;s0||rl==null||rl!==wd(n)||(n=rl,"selectionStart"in n&&a0(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}),dc&&Lc(dc,n)||(dc=n,n=Cd(o0,"onSelect"),0il||(t.current=u0[il],u0[il]=null,il--)}function Gt(t,e){il++,u0[il]=t.current,t.current=e}var xo={},Jr=Oo(xo),Tn=Oo(!1),hs=xo;function Il(t,e){var r=t.type.contextTypes;if(!r)return xo;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in r)i[a]=e[a];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function An(t){return t=t.childContextTypes,t!=null}function Rd(){Ot(Tn),Ot(Jr)}function vT(t,e,r){if(Jr.current!==xo)throw Error(he(168));Gt(Jr,e),Gt(Tn,r)}function zR(t,e,r){var n=t.stateNode;if(t=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(he(108,fl(e)||"Unknown",i));return Mt({},r,n)}function Zh(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||xo,hs=Jr.current,Gt(Jr,t),Gt(Tn,Tn.current),!0}function mT(t,e,r){var n=t.stateNode;if(!n)throw Error(he(169));r?(t=zR(t,e,hs),n.__reactInternalMemoizedMergedChildContext=t,Ot(Tn),Ot(Jr),Gt(Jr,t)):Ot(Tn),Gt(Tn,r)}var N1=null,os=null,q4=Or.unstable_runWithPriority,L1=Or.unstable_scheduleCallback,c0=Or.unstable_cancelCallback,K4=Or.unstable_shouldYield,gT=Or.unstable_requestPaint,f0=Or.unstable_now,Z4=Or.unstable_getCurrentPriorityLevel,Up=Or.unstable_ImmediatePriority,WR=Or.unstable_UserBlockingPriority,YR=Or.unstable_NormalPriority,HR=Or.unstable_LowPriority,qR=Or.unstable_IdlePriority,Fm={},Q4=gT!==void 0?gT:function(){},wa=null,Qh=null,Nm=!1,yT=f0(),Zr=1e4>yT?f0:function(){return f0()-yT};function kl(){switch(Z4()){case Up:return 99;case WR:return 98;case YR:return 97;case HR:return 96;case qR:return 95;default:throw Error(he(332))}}function KR(t){switch(t){case 99:return Up;case 98:return WR;case 97:return YR;case 96:return HR;case 95:return qR;default:throw Error(he(332))}}function ds(t,e){return t=KR(t),q4(t,e)}function Bc(t,e,r){return t=KR(t),L1(t,e,r)}function aa(){if(Qh!==null){var t=Qh;Qh=null,c0(t)}ZR()}function ZR(){if(!Nm&&wa!==null){Nm=!0;var t=0;try{var e=wa;ds(99,function(){for(;tw?(T=S,S=null):T=S.sibling;var E=h(g,S,y[w],_);if(E===null){S===null&&(S=T);break}t&&S&&E.alternate===null&&e(g,S),m=a(E,m,w),x===null?b=E:x.sibling=E,x=E,S=T}if(w===y.length)return r(g,S),b;if(S===null){for(;ww?(T=S,S=null):T=S.sibling;var A=h(g,S,E.value,_);if(A===null){S===null&&(S=T);break}t&&S&&A.alternate===null&&e(g,S),m=a(A,m,w),x===null?b=A:x.sibling=A,x=A,S=T}if(E.done)return r(g,S),b;if(S===null){for(;!E.done;w++,E=y.next())E=f(g,E.value,_),E!==null&&(m=a(E,m,w),x===null?b=E:x.sibling=E,x=E);return b}for(S=n(g,S);!E.done;w++,E=y.next())E=d(S,g,w,E.value,_),E!==null&&(t&&E.alternate!==null&&S.delete(E.key===null?w:E.key),m=a(E,m,w),x===null?b=E:x.sibling=E,x=E);return t&&S.forEach(function(O){return e(g,O)}),b}return function(g,m,y,_){var b=typeof y=="object"&&y!==null&&y.type===Ha&&y.key===null;b&&(y=y.props.children);var x=typeof y=="object"&&y!==null;if(x)switch(y.$$typeof){case Qu:e:{for(x=y.key,b=m;b!==null;){if(b.key===x){switch(b.tag){case 7:if(y.type===Ha){r(g,b.sibling),m=i(b,y.props.children),m.return=g,g=m;break e}break;default:if(b.elementType===y.type){r(g,b.sibling),m=i(b,y.props),m.ref=Ru(g,b,y),m.return=g,g=m;break e}}r(g,b);break}else e(g,b);b=b.sibling}y.type===Ha?(m=xl(y.props.children,g.mode,_,y.key),m.return=g,g=m):(_=rd(y.type,y.key,y.props,null,g.mode,_),_.ref=Ru(g,m,y),_.return=g,g=_)}return o(g);case qo:e:{for(b=y.key;m!==null;){if(m.key===b)if(m.tag===4&&m.stateNode.containerInfo===y.containerInfo&&m.stateNode.implementation===y.implementation){r(g,m.sibling),m=i(m,y.children||[]),m.return=g,g=m;break e}else{r(g,m);break}else e(g,m);m=m.sibling}m=$m(y,g.mode,_),m.return=g,g=m}return o(g)}if(typeof y=="string"||typeof y=="number")return y=""+y,m!==null&&m.tag===6?(r(g,m.sibling),m=i(m,y),m.return=g,g=m):(r(g,m),m=Um(y,g.mode,_),m.return=g,g=m),o(g);if(ah(y))return p(g,m,y,_);if(Eu(y))return v(g,m,y,_);if(x&&oh(g,y),typeof y>"u"&&!b)switch(g.tag){case 1:case 22:case 0:case 11:case 15:throw Error(he(152,fl(g.type)||"Component"))}return r(g,m)}}var Nd=rI(!0),nI=rI(!1),kf={},Yi=Oo(kf),Uc=Oo(kf),$c=Oo(kf);function Qo(t){if(t===kf)throw Error(he(174));return t}function d0(t,e){switch(Gt($c,e),Gt(Uc,t),Gt(Yi,kf),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Zy(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Zy(e,t)}Ot(Yi),Gt(Yi,e)}function Ml(){Ot(Yi),Ot(Uc),Ot($c)}function wT(t){Qo($c.current);var e=Qo(Yi.current),r=Zy(e,t.type);e!==r&&(Gt(Uc,t),Gt(Yi,r))}function U1(t){Uc.current===t&&(Ot(Yi),Ot(Uc))}var Vt=Oo(0);function Ld(t){for(var e=t;e!==null;){if(e.tag===13){var r=e.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&64)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Ca=null,Ja=null,Hi=!1;function iI(t,e){var r=Zn(5,null,null,0);r.elementType="DELETED",r.type="DELETED",r.stateNode=e,r.return=t,r.flags=8,t.lastEffect!==null?(t.lastEffect.nextEffect=r,t.lastEffect=r):t.firstEffect=t.lastEffect=r}function ET(t,e){switch(t.tag){case 5:var r=t.type;return e=e.nodeType!==1||r.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,!0):!1;case 13:return!1;default:return!1}}function p0(t){if(Hi){var e=Ja;if(e){var r=e;if(!ET(t,e)){if(e=vl(r.nextSibling),!e||!ET(t,e)){t.flags=t.flags&-1025|2,Hi=!1,Ca=t;return}iI(Ca,r)}Ca=t,Ja=vl(e.firstChild)}else t.flags=t.flags&-1025|2,Hi=!1,Ca=t}}function TT(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;Ca=t}function sh(t){if(t!==Ca)return!1;if(!Hi)return TT(t),Hi=!0,!1;var e=t.type;if(t.tag!==5||e!=="head"&&e!=="body"&&!l0(e,t.memoizedProps))for(e=Ja;e;)iI(t,e),e=vl(e.nextSibling);if(TT(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(he(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="/$"){if(e===0){Ja=vl(t.nextSibling);break e}e--}else r!=="$"&&r!=="$!"&&r!=="$?"||e++}t=t.nextSibling}Ja=null}}else Ja=Ca?vl(t.stateNode.nextSibling):null;return!0}function Lm(){Ja=Ca=null,Hi=!1}var gl=[];function $1(){for(var t=0;ta))throw Error(he(301));a+=1,$r=qr=null,e.updateQueue=null,pc.current=nj,t=r(n,i)}while(vc)}if(pc.current=$d,e=qr!==null&&qr.next!==null,Vc=0,$r=qr=Kt=null,Dd=!1,e)throw Error(he(300));return t}function Jo(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $r===null?Kt.memoizedState=$r=t:$r=$r.next=t,$r}function Ts(){if(qr===null){var t=Kt.alternate;t=t!==null?t.memoizedState:null}else t=qr.next;var e=$r===null?Kt.memoizedState:$r.next;if(e!==null)$r=e,qr=t;else{if(t===null)throw Error(he(310));qr=t,t={memoizedState:qr.memoizedState,baseState:qr.baseState,baseQueue:qr.baseQueue,queue:qr.queue,next:null},$r===null?Kt.memoizedState=$r=t:$r=$r.next=t}return $r}function Xi(t,e){return typeof e=="function"?e(t):e}function Iu(t){var e=Ts(),r=e.queue;if(r===null)throw Error(he(311));r.lastRenderedReducer=t;var n=qr,i=n.baseQueue,a=r.pending;if(a!==null){if(i!==null){var o=i.next;i.next=a.next,a.next=o}n.baseQueue=i=a,r.pending=null}if(i!==null){i=i.next,n=n.baseState;var s=o=a=null,u=i;do{var l=u.lane;if((Vc&l)===l)s!==null&&(s=s.next={lane:0,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null}),n=u.eagerReducer===t?u.eagerState:t(n,u.action);else{var c={lane:l,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null};s===null?(o=s=c,a=n):s=s.next=c,Kt.lanes|=l,Mf|=l}u=u.next}while(u!==null&&u!==i);s===null?a=n:s.next=o,Kn(n,e.memoizedState)||(yi=!0),e.memoizedState=n,e.baseState=a,e.baseQueue=s,r.lastRenderedState=n}return[e.memoizedState,r.dispatch]}function ku(t){var e=Ts(),r=e.queue;if(r===null)throw Error(he(311));r.lastRenderedReducer=t;var n=r.dispatch,i=r.pending,a=e.memoizedState;if(i!==null){r.pending=null;var o=i=i.next;do a=t(a,o.action),o=o.next;while(o!==i);Kn(a,e.memoizedState)||(yi=!0),e.memoizedState=a,e.baseQueue===null&&(e.baseState=a),r.lastRenderedState=a}return[a,n]}function AT(t,e,r){var n=e._getVersion;n=n(e._source);var i=e._workInProgressVersionPrimary;if(i!==null?t=i===n:(t=t.mutableReadLanes,(t=(Vc&t)===t)&&(e._workInProgressVersionPrimary=n,gl.push(e))),t)return r(e._source);throw gl.push(e),Error(he(350))}function aI(t,e,r,n){var i=cn;if(i===null)throw Error(he(349));var a=e._getVersion,o=a(e._source),s=pc.current,u=s.useState(function(){return AT(i,e,r)}),l=u[1],c=u[0];u=$r;var f=t.memoizedState,h=f.refs,d=h.getSnapshot,p=f.source;f=f.subscribe;var v=Kt;return t.memoizedState={refs:h,source:e,subscribe:n},s.useEffect(function(){h.getSnapshot=r,h.setSnapshot=l;var g=a(e._source);if(!Kn(o,g)){g=r(e._source),Kn(c,g)||(l(g),g=uo(v),i.mutableReadLanes|=g&i.pendingLanes),g=i.mutableReadLanes,i.entangledLanes|=g;for(var m=i.entanglements,y=g;0r?98:r,function(){t(!0)}),ds(97<\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=o.createElement(r,{is:n.is}):(t=o.createElement(r),r==="select"&&(o=t,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):t=o.createElementNS(t,r),t[Qa]=e,t[Od]=n,pI(t,e,!1,!1),e.stateNode=t,o=Jy(r,n),r){case"dialog":Et("cancel",t),Et("close",t),i=n;break;case"iframe":case"object":case"embed":Et("load",t),i=n;break;case"video":case"audio":for(i=0;iE0&&(e.flags|=64,a=!0,Fu(n,!1),e.lanes=33554432)}else{if(!a)if(t=Ld(o),t!==null){if(e.flags|=64,a=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),Fu(n,!0),n.tail===null&&n.tailMode==="hidden"&&!o.alternate&&!Hi)return e=e.lastEffect=n.lastEffect,e!==null&&(e.nextEffect=null),null}else 2*Zr()-n.renderingStartTime>E0&&r!==1073741824&&(e.flags|=64,a=!0,Fu(n,!1),e.lanes=33554432);n.isBackwards?(o.sibling=e.child,e.child=o):(r=n.last,r!==null?r.sibling=o:e.child=o,n.last=o)}return n.tail!==null?(r=n.tail,n.rendering=r,n.tail=r.sibling,n.lastEffect=e.lastEffect,n.renderingStartTime=Zr(),r.sibling=null,e=Vt.current,Gt(Vt,a?e&1|2:e&1),r):null;case 23:case 24:return Z1(),t!==null&&t.memoizedState!==null!=(e.memoizedState!==null)&&n.mode!=="unstable-defer-without-hiding"&&(e.flags|=4),null}throw Error(he(156,e.tag))}function oj(t){switch(t.tag){case 1:An(t.type)&&Rd();var e=t.flags;return e&4096?(t.flags=e&-4097|64,t):null;case 3:if(Ml(),Ot(Tn),Ot(Jr),$1(),e=t.flags,e&64)throw Error(he(285));return t.flags=e&-4097|64,t;case 5:return U1(t),null;case 13:return Ot(Vt),e=t.flags,e&4096?(t.flags=e&-4097|64,t):null;case 19:return Ot(Vt),null;case 4:return Ml(),null;case 10:return B1(t),null;case 23:case 24:return Z1(),null;default:return null}}function Y1(t,e){try{var r="",n=e;do r+=UB(n),n=n.return;while(n);var i=r}catch(a){i=` +`+i[o].replace(" at new "," at ");while(1<=o&&0<=s);break}}}finally{bm=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?Ju(t):""}function UB(t){switch(t.tag){case 5:return Ju(t.type);case 16:return Ju("Lazy");case 13:return Ju("Suspense");case 19:return Ju("SuspenseList");case 0:case 2:case 15:return t=eh(t.type,!1),t;case 11:return t=eh(t.type.render,!1),t;case 22:return t=eh(t.type._render,!1),t;case 1:return t=eh(t.type,!0),t;default:return""}}function fl(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Ha:return"Fragment";case qo:return"Portal";case sc:return"Profiler";case p1:return"StrictMode";case lc:return"Suspense";case Sd:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case m1:return(t.displayName||"Context")+".Consumer";case v1:return(t._context.displayName||"Context")+".Provider";case kp:var e=t.render;return e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case Mp:return fl(t.type);case y1:return fl(t._render);case g1:e=t._payload,t=t._init;try{return fl(t(e))}catch{}}return null}function yo(t){switch(typeof t){case"boolean":case"number":case"object":case"string":case"undefined":return t;default:return""}}function oR(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function $B(t){var e=oR(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,a=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,a.call(this,o)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function th(t){t._valueTracker||(t._valueTracker=$B(t))}function sR(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=oR(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function wd(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function zy(t,e){var r=e.checked;return Mt({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function jE(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=yo(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function lR(t,e){e=e.checked,e!=null&&d1(t,"checked",e,!1)}function Wy(t,e){lR(t,e);var r=yo(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?Yy(t,e.type,r):e.hasOwnProperty("defaultValue")&&Yy(t,e.type,yo(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function UE(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function Yy(t,e,r){(e!=="number"||wd(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}function VB(t){var e="";return Ip.Children.forEach(t,function(r){r!=null&&(e+=r)}),e}function Hy(t,e){return t=Mt({children:void 0},e),(e=VB(e.children))&&(t.children=e),t}function hl(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i=r.length))throw Error(he(93));r=r[0]}e=r}e==null&&(e=""),r=e}t._wrapperState={initialValue:yo(r)}}function uR(t,e){var r=yo(e.value),n=yo(e.defaultValue);r!=null&&(r=""+r,r!==t.value&&(t.value=r),e.defaultValue==null&&t.defaultValue!==r&&(t.defaultValue=r)),n!=null&&(t.defaultValue=""+n)}function VE(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}var Ky={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function cR(t){switch(t){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 Zy(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?cR(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var rh,fR=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,r,n,i){MSApp.execUnsafeLocalFunction(function(){return t(e,r,n,i)})}:t}(function(t,e){if(t.namespaceURI!==Ky.svg||"innerHTML"in t)t.innerHTML=e;else{for(rh=rh||document.createElement("div"),rh.innerHTML=""+e.valueOf().toString()+"",e=rh.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Rc(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var uc={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},GB=["Webkit","ms","Moz","O"];Object.keys(uc).forEach(function(t){GB.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),uc[e]=uc[t]})});function hR(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||uc.hasOwnProperty(t)&&uc[t]?(""+e).trim():e+"px"}function dR(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=hR(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var XB=Mt({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 Qy(t,e){if(e){if(XB[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(he(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(he(60));if(!(typeof e.dangerouslySetInnerHTML=="object"&&"__html"in e.dangerouslySetInnerHTML))throw Error(he(61))}if(e.style!=null&&typeof e.style!="object")throw Error(he(62))}}function Jy(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 b1(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var e0=null,dl=null,pl=null;function GE(t){if(t=If(t)){if(typeof e0!="function")throw Error(he(280));var e=t.stateNode;e&&(e=jp(e),e0(t.stateNode,t.type,e))}}function pR(t){dl?pl?pl.push(t):pl=[t]:dl=t}function vR(){if(dl){var t=dl,e=pl;if(pl=dl=null,GE(t),e)for(t=0;tn?0:1<r;r++)e.push(t);return e}function Np(t,e,r){t.pendingLanes|=e;var n=e-1;t.suspendedLanes&=n,t.pingedLanes&=n,t=t.eventTimes,e=31-_o(e),t[e]=r}var _o=Math.clz32?Math.clz32:o4,i4=Math.log,a4=Math.LN2;function o4(t){return t===0?32:31-(i4(t)/a4|0)|0}var s4=Or.unstable_UserBlockingPriority,l4=Or.unstable_runWithPriority,Hh=!0;function u4(t,e,r,n){Ko||w1();var i=P1,a=Ko;Ko=!0;try{mR(i,t,e,r,n)}finally{(Ko=a)||E1()}}function c4(t,e,r,n){l4(s4,P1.bind(null,t,e,r,n))}function P1(t,e,r,n){if(Hh){var i;if((i=(e&4)===0)&&0=fc),JE=String.fromCharCode(32),eT=!1;function MR(t,e){switch(t){case"keyup":return M4.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function FR(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var tl=!1;function N4(t,e){switch(t){case"compositionend":return FR(e);case"keypress":return e.which!==32?null:(eT=!0,JE);case"textInput":return t=e.data,t===JE&&eT?null:t;default:return null}}function L4(t,e){if(tl)return t==="compositionend"||!M1&&MR(t,e)?(t=IR(),qh=R1=Za=null,tl=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=iT(r)}}function BR(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?BR(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function oT(){for(var t=window,e=wd();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=wd(t.document)}return e}function a0(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var W4=Fa&&"documentMode"in document&&11>=document.documentMode,rl=null,o0=null,dc=null,s0=!1;function sT(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;s0||rl==null||rl!==wd(n)||(n=rl,"selectionStart"in n&&a0(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}),dc&&Lc(dc,n)||(dc=n,n=Cd(o0,"onSelect"),0il||(t.current=u0[il],u0[il]=null,il--)}function Gt(t,e){il++,u0[il]=t.current,t.current=e}var xo={},Jr=Oo(xo),Tn=Oo(!1),hs=xo;function Il(t,e){var r=t.type.contextTypes;if(!r)return xo;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in r)i[a]=e[a];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function An(t){return t=t.childContextTypes,t!=null}function Rd(){Ot(Tn),Ot(Jr)}function mT(t,e,r){if(Jr.current!==xo)throw Error(he(168));Gt(Jr,e),Gt(Tn,r)}function WR(t,e,r){var n=t.stateNode;if(t=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(he(108,fl(e)||"Unknown",i));return Mt({},r,n)}function Zh(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||xo,hs=Jr.current,Gt(Jr,t),Gt(Tn,Tn.current),!0}function gT(t,e,r){var n=t.stateNode;if(!n)throw Error(he(169));r?(t=WR(t,e,hs),n.__reactInternalMemoizedMergedChildContext=t,Ot(Tn),Ot(Jr),Gt(Jr,t)):Ot(Tn),Gt(Tn,r)}var N1=null,os=null,q4=Or.unstable_runWithPriority,L1=Or.unstable_scheduleCallback,c0=Or.unstable_cancelCallback,K4=Or.unstable_shouldYield,yT=Or.unstable_requestPaint,f0=Or.unstable_now,Z4=Or.unstable_getCurrentPriorityLevel,Up=Or.unstable_ImmediatePriority,YR=Or.unstable_UserBlockingPriority,HR=Or.unstable_NormalPriority,qR=Or.unstable_LowPriority,KR=Or.unstable_IdlePriority,Fm={},Q4=yT!==void 0?yT:function(){},wa=null,Qh=null,Nm=!1,_T=f0(),Zr=1e4>_T?f0:function(){return f0()-_T};function kl(){switch(Z4()){case Up:return 99;case YR:return 98;case HR:return 97;case qR:return 96;case KR:return 95;default:throw Error(he(332))}}function ZR(t){switch(t){case 99:return Up;case 98:return YR;case 97:return HR;case 96:return qR;case 95:return KR;default:throw Error(he(332))}}function ds(t,e){return t=ZR(t),q4(t,e)}function Bc(t,e,r){return t=ZR(t),L1(t,e,r)}function aa(){if(Qh!==null){var t=Qh;Qh=null,c0(t)}QR()}function QR(){if(!Nm&&wa!==null){Nm=!0;var t=0;try{var e=wa;ds(99,function(){for(;tw?(T=S,S=null):T=S.sibling;var E=h(g,S,y[w],_);if(E===null){S===null&&(S=T);break}t&&S&&E.alternate===null&&e(g,S),m=a(E,m,w),x===null?b=E:x.sibling=E,x=E,S=T}if(w===y.length)return r(g,S),b;if(S===null){for(;ww?(T=S,S=null):T=S.sibling;var A=h(g,S,E.value,_);if(A===null){S===null&&(S=T);break}t&&S&&A.alternate===null&&e(g,S),m=a(A,m,w),x===null?b=A:x.sibling=A,x=A,S=T}if(E.done)return r(g,S),b;if(S===null){for(;!E.done;w++,E=y.next())E=f(g,E.value,_),E!==null&&(m=a(E,m,w),x===null?b=E:x.sibling=E,x=E);return b}for(S=n(g,S);!E.done;w++,E=y.next())E=d(S,g,w,E.value,_),E!==null&&(t&&E.alternate!==null&&S.delete(E.key===null?w:E.key),m=a(E,m,w),x===null?b=E:x.sibling=E,x=E);return t&&S.forEach(function(O){return e(g,O)}),b}return function(g,m,y,_){var b=typeof y=="object"&&y!==null&&y.type===Ha&&y.key===null;b&&(y=y.props.children);var x=typeof y=="object"&&y!==null;if(x)switch(y.$$typeof){case Qu:e:{for(x=y.key,b=m;b!==null;){if(b.key===x){switch(b.tag){case 7:if(y.type===Ha){r(g,b.sibling),m=i(b,y.props.children),m.return=g,g=m;break e}break;default:if(b.elementType===y.type){r(g,b.sibling),m=i(b,y.props),m.ref=Ru(g,b,y),m.return=g,g=m;break e}}r(g,b);break}else e(g,b);b=b.sibling}y.type===Ha?(m=xl(y.props.children,g.mode,_,y.key),m.return=g,g=m):(_=rd(y.type,y.key,y.props,null,g.mode,_),_.ref=Ru(g,m,y),_.return=g,g=_)}return o(g);case qo:e:{for(b=y.key;m!==null;){if(m.key===b)if(m.tag===4&&m.stateNode.containerInfo===y.containerInfo&&m.stateNode.implementation===y.implementation){r(g,m.sibling),m=i(m,y.children||[]),m.return=g,g=m;break e}else{r(g,m);break}else e(g,m);m=m.sibling}m=$m(y,g.mode,_),m.return=g,g=m}return o(g)}if(typeof y=="string"||typeof y=="number")return y=""+y,m!==null&&m.tag===6?(r(g,m.sibling),m=i(m,y),m.return=g,g=m):(r(g,m),m=Um(y,g.mode,_),m.return=g,g=m),o(g);if(ah(y))return p(g,m,y,_);if(Eu(y))return v(g,m,y,_);if(x&&oh(g,y),typeof y>"u"&&!b)switch(g.tag){case 1:case 22:case 0:case 11:case 15:throw Error(he(152,fl(g.type)||"Component"))}return r(g,m)}}var Nd=nI(!0),iI=nI(!1),kf={},Yi=Oo(kf),Uc=Oo(kf),$c=Oo(kf);function Qo(t){if(t===kf)throw Error(he(174));return t}function d0(t,e){switch(Gt($c,e),Gt(Uc,t),Gt(Yi,kf),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Zy(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Zy(e,t)}Ot(Yi),Gt(Yi,e)}function Ml(){Ot(Yi),Ot(Uc),Ot($c)}function ET(t){Qo($c.current);var e=Qo(Yi.current),r=Zy(e,t.type);e!==r&&(Gt(Uc,t),Gt(Yi,r))}function U1(t){Uc.current===t&&(Ot(Yi),Ot(Uc))}var Vt=Oo(0);function Ld(t){for(var e=t;e!==null;){if(e.tag===13){var r=e.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&64)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Ca=null,Ja=null,Hi=!1;function aI(t,e){var r=Zn(5,null,null,0);r.elementType="DELETED",r.type="DELETED",r.stateNode=e,r.return=t,r.flags=8,t.lastEffect!==null?(t.lastEffect.nextEffect=r,t.lastEffect=r):t.firstEffect=t.lastEffect=r}function TT(t,e){switch(t.tag){case 5:var r=t.type;return e=e.nodeType!==1||r.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,!0):!1;case 13:return!1;default:return!1}}function p0(t){if(Hi){var e=Ja;if(e){var r=e;if(!TT(t,e)){if(e=vl(r.nextSibling),!e||!TT(t,e)){t.flags=t.flags&-1025|2,Hi=!1,Ca=t;return}aI(Ca,r)}Ca=t,Ja=vl(e.firstChild)}else t.flags=t.flags&-1025|2,Hi=!1,Ca=t}}function AT(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;Ca=t}function sh(t){if(t!==Ca)return!1;if(!Hi)return AT(t),Hi=!0,!1;var e=t.type;if(t.tag!==5||e!=="head"&&e!=="body"&&!l0(e,t.memoizedProps))for(e=Ja;e;)aI(t,e),e=vl(e.nextSibling);if(AT(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(he(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="/$"){if(e===0){Ja=vl(t.nextSibling);break e}e--}else r!=="$"&&r!=="$!"&&r!=="$?"||e++}t=t.nextSibling}Ja=null}}else Ja=Ca?vl(t.stateNode.nextSibling):null;return!0}function Lm(){Ja=Ca=null,Hi=!1}var gl=[];function $1(){for(var t=0;ta))throw Error(he(301));a+=1,$r=qr=null,e.updateQueue=null,pc.current=nj,t=r(n,i)}while(vc)}if(pc.current=$d,e=qr!==null&&qr.next!==null,Vc=0,$r=qr=Kt=null,Dd=!1,e)throw Error(he(300));return t}function Jo(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $r===null?Kt.memoizedState=$r=t:$r=$r.next=t,$r}function Ts(){if(qr===null){var t=Kt.alternate;t=t!==null?t.memoizedState:null}else t=qr.next;var e=$r===null?Kt.memoizedState:$r.next;if(e!==null)$r=e,qr=t;else{if(t===null)throw Error(he(310));qr=t,t={memoizedState:qr.memoizedState,baseState:qr.baseState,baseQueue:qr.baseQueue,queue:qr.queue,next:null},$r===null?Kt.memoizedState=$r=t:$r=$r.next=t}return $r}function Xi(t,e){return typeof e=="function"?e(t):e}function Iu(t){var e=Ts(),r=e.queue;if(r===null)throw Error(he(311));r.lastRenderedReducer=t;var n=qr,i=n.baseQueue,a=r.pending;if(a!==null){if(i!==null){var o=i.next;i.next=a.next,a.next=o}n.baseQueue=i=a,r.pending=null}if(i!==null){i=i.next,n=n.baseState;var s=o=a=null,u=i;do{var l=u.lane;if((Vc&l)===l)s!==null&&(s=s.next={lane:0,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null}),n=u.eagerReducer===t?u.eagerState:t(n,u.action);else{var c={lane:l,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null};s===null?(o=s=c,a=n):s=s.next=c,Kt.lanes|=l,Mf|=l}u=u.next}while(u!==null&&u!==i);s===null?a=n:s.next=o,Kn(n,e.memoizedState)||(yi=!0),e.memoizedState=n,e.baseState=a,e.baseQueue=s,r.lastRenderedState=n}return[e.memoizedState,r.dispatch]}function ku(t){var e=Ts(),r=e.queue;if(r===null)throw Error(he(311));r.lastRenderedReducer=t;var n=r.dispatch,i=r.pending,a=e.memoizedState;if(i!==null){r.pending=null;var o=i=i.next;do a=t(a,o.action),o=o.next;while(o!==i);Kn(a,e.memoizedState)||(yi=!0),e.memoizedState=a,e.baseQueue===null&&(e.baseState=a),r.lastRenderedState=a}return[a,n]}function CT(t,e,r){var n=e._getVersion;n=n(e._source);var i=e._workInProgressVersionPrimary;if(i!==null?t=i===n:(t=t.mutableReadLanes,(t=(Vc&t)===t)&&(e._workInProgressVersionPrimary=n,gl.push(e))),t)return r(e._source);throw gl.push(e),Error(he(350))}function oI(t,e,r,n){var i=cn;if(i===null)throw Error(he(349));var a=e._getVersion,o=a(e._source),s=pc.current,u=s.useState(function(){return CT(i,e,r)}),l=u[1],c=u[0];u=$r;var f=t.memoizedState,h=f.refs,d=h.getSnapshot,p=f.source;f=f.subscribe;var v=Kt;return t.memoizedState={refs:h,source:e,subscribe:n},s.useEffect(function(){h.getSnapshot=r,h.setSnapshot=l;var g=a(e._source);if(!Kn(o,g)){g=r(e._source),Kn(c,g)||(l(g),g=uo(v),i.mutableReadLanes|=g&i.pendingLanes),g=i.mutableReadLanes,i.entangledLanes|=g;for(var m=i.entanglements,y=g;0r?98:r,function(){t(!0)}),ds(97<\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=o.createElement(r,{is:n.is}):(t=o.createElement(r),r==="select"&&(o=t,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):t=o.createElementNS(t,r),t[Qa]=e,t[Od]=n,vI(t,e,!1,!1),e.stateNode=t,o=Jy(r,n),r){case"dialog":Et("cancel",t),Et("close",t),i=n;break;case"iframe":case"object":case"embed":Et("load",t),i=n;break;case"video":case"audio":for(i=0;iE0&&(e.flags|=64,a=!0,Fu(n,!1),e.lanes=33554432)}else{if(!a)if(t=Ld(o),t!==null){if(e.flags|=64,a=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),Fu(n,!0),n.tail===null&&n.tailMode==="hidden"&&!o.alternate&&!Hi)return e=e.lastEffect=n.lastEffect,e!==null&&(e.nextEffect=null),null}else 2*Zr()-n.renderingStartTime>E0&&r!==1073741824&&(e.flags|=64,a=!0,Fu(n,!1),e.lanes=33554432);n.isBackwards?(o.sibling=e.child,e.child=o):(r=n.last,r!==null?r.sibling=o:e.child=o,n.last=o)}return n.tail!==null?(r=n.tail,n.rendering=r,n.tail=r.sibling,n.lastEffect=e.lastEffect,n.renderingStartTime=Zr(),r.sibling=null,e=Vt.current,Gt(Vt,a?e&1|2:e&1),r):null;case 23:case 24:return Z1(),t!==null&&t.memoizedState!==null!=(e.memoizedState!==null)&&n.mode!=="unstable-defer-without-hiding"&&(e.flags|=4),null}throw Error(he(156,e.tag))}function oj(t){switch(t.tag){case 1:An(t.type)&&Rd();var e=t.flags;return e&4096?(t.flags=e&-4097|64,t):null;case 3:if(Ml(),Ot(Tn),Ot(Jr),$1(),e=t.flags,e&64)throw Error(he(285));return t.flags=e&-4097|64,t;case 5:return U1(t),null;case 13:return Ot(Vt),e=t.flags,e&4096?(t.flags=e&-4097|64,t):null;case 19:return Ot(Vt),null;case 4:return Ml(),null;case 10:return B1(t),null;case 23:case 24:return Z1(),null;default:return null}}function Y1(t,e){try{var r="",n=e;do r+=UB(n),n=n.return;while(n);var i=r}catch(a){i=` Error generating stack: `+a.message+` -`+a.stack}return{value:t,source:e,stack:i}}function _0(t,e){try{console.error(e.value)}catch(r){setTimeout(function(){throw r})}}var sj=typeof WeakMap=="function"?WeakMap:Map;function gI(t,e,r){r=so(-1,r),r.tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){Gd||(Gd=!0,T0=n),_0(t,e)},r}function yI(t,e,r){r=so(-1,r),r.tag=3;var n=t.type.getDerivedStateFromError;if(typeof n=="function"){var i=e.value;r.payload=function(){return _0(t,e),n(i)}}var a=t.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){typeof n!="function"&&(zi===null?zi=new Set([this]):zi.add(this),_0(t,e));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),r}var lj=typeof WeakSet=="function"?WeakSet:Set;function jT(t){var e=t.ref;if(e!==null)if(typeof e=="function")try{e(null)}catch(r){fo(t,r)}else e.current=null}function uj(t,e){switch(e.tag){case 0:case 11:case 15:case 22:return;case 1:if(e.flags&256&&t!==null){var r=t.memoizedProps,n=t.memoizedState;t=e.stateNode,e=t.getSnapshotBeforeUpdate(e.elementType===e.type?r:vi(e.type,r),n),t.__reactInternalSnapshotBeforeUpdate=e}return;case 3:e.flags&256&&F1(e.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(he(163))}function cj(t,e,r){switch(r.tag){case 0:case 11:case 15:case 22:if(e=r.updateQueue,e=e!==null?e.lastEffect:null,e!==null){t=e=e.next;do{if((t.tag&3)===3){var n=t.create;t.destroy=n()}t=t.next}while(t!==e)}if(e=r.updateQueue,e=e!==null?e.lastEffect:null,e!==null){t=e=e.next;do{var i=t;n=i.next,i=i.tag,i&4&&i&1&&(CI(r,t),yj(r,t)),t=n}while(t!==e)}return;case 1:t=r.stateNode,r.flags&4&&(e===null?t.componentDidMount():(n=r.elementType===r.type?e.memoizedProps:vi(r.type,e.memoizedProps),t.componentDidUpdate(n,e.memoizedState,t.__reactInternalSnapshotBeforeUpdate))),e=r.updateQueue,e!==null&&xT(r,e,t);return;case 3:if(e=r.updateQueue,e!==null){if(t=null,r.child!==null)switch(r.child.tag){case 5:t=r.child.stateNode;break;case 1:t=r.child.stateNode}xT(r,e,t)}return;case 5:t=r.stateNode,e===null&&r.flags&4&&GR(r.type,r.memoizedProps)&&t.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&&SR(r))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(he(163))}function UT(t,e){for(var r=t;;){if(r.tag===5){var n=r.stateNode;if(e)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=fR("display",i)}}else if(r.tag===6)r.stateNode.nodeValue=e?"":r.memoizedProps;else if((r.tag!==23&&r.tag!==24||r.memoizedState===null||r===t)&&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.sibling.return=r.return,r=r.sibling}}function $T(t,e){if(os&&typeof os.onCommitFiberUnmount=="function")try{os.onCommitFiberUnmount(N1,e)}catch{}switch(e.tag){case 0:case 11:case 14:case 15:case 22:if(t=e.updateQueue,t!==null&&(t=t.lastEffect,t!==null)){var r=t=t.next;do{var n=r,i=n.destroy;if(n=n.tag,i!==void 0)if(n&4)CI(e,r);else{n=e;try{i()}catch(a){fo(n,a)}}r=r.next}while(r!==t)}break;case 1:if(jT(e),t=e.stateNode,typeof t.componentWillUnmount=="function")try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(a){fo(e,a)}break;case 5:jT(e);break;case 4:_I(t,e)}}function VT(t){t.alternate=null,t.child=null,t.dependencies=null,t.firstEffect=null,t.lastEffect=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.return=null,t.updateQueue=null}function GT(t){return t.tag===5||t.tag===3||t.tag===4}function XT(t){e:{for(var e=t.return;e!==null;){if(GT(e))break e;e=e.return}throw Error(he(160))}var r=e;switch(e=r.stateNode,r.tag){case 5:var n=!1;break;case 3:e=e.containerInfo,n=!0;break;case 4:e=e.containerInfo,n=!0;break;default:throw Error(he(161))}r.flags&16&&(Rc(e,""),r.flags&=-17);e:t:for(r=t;;){for(;r.sibling===null;){if(r.return===null||GT(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?x0(t,r,e):b0(t,r,e)}function x0(t,e,r){var n=t.tag,i=n===5||n===6;if(i)t=i?t.stateNode:t.stateNode.instance,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=Pd));else if(n!==4&&(t=t.child,t!==null))for(x0(t,e,r),t=t.sibling;t!==null;)x0(t,e,r),t=t.sibling}function b0(t,e,r){var n=t.tag,i=n===5||n===6;if(i)t=i?t.stateNode:t.stateNode.instance,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(b0(t,e,r),t=t.sibling;t!==null;)b0(t,e,r),t=t.sibling}function _I(t,e){for(var r=e,n=!1,i,a;;){if(!n){n=r.return;e:for(;;){if(n===null)throw Error(he(160));switch(i=n.stateNode,n.tag){case 5:a=!1;break e;case 3:i=i.containerInfo,a=!0;break e;case 4:i=i.containerInfo,a=!0;break e}n=n.return}n=!0}if(r.tag===5||r.tag===6){e:for(var o=t,s=r,u=s;;)if($T(o,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}a?(o=i,s=r.stateNode,o.nodeType===8?o.parentNode.removeChild(s):o.removeChild(s)):i.removeChild(r.stateNode)}else if(r.tag===4){if(r.child!==null){i=r.stateNode.containerInfo,a=!0,r.child.return=r,r=r.child;continue}}else if($T(t,r),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.tag===4&&(n=!1)}r.sibling.return=r.return,r=r.sibling}}function jm(t,e){switch(e.tag){case 0:case 11:case 14:case 15:case 22:var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var n=r=r.next;do(n.tag&3)===3&&(t=n.destroy,n.destroy=void 0,t!==void 0&&t()),n=n.next;while(n!==r)}return;case 1:return;case 5:if(r=e.stateNode,r!=null){n=e.memoizedProps;var i=t!==null?t.memoizedProps:n;t=e.type;var a=e.updateQueue;if(e.updateQueue=null,a!==null){for(r[Od]=n,t==="input"&&n.type==="radio"&&n.name!=null&&sR(r,n),Jy(t,i),e=Jy(t,n),i=0;ii&&(i=o),r&=~a}if(r=i,r=Zr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*hj(r/1960))-r,10i&&(i=o),r&=~a}if(r=i,r=Zr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*hj(r/1960))-r,10 component higher in the tree to provide a loading indicator or placeholder to display.`)}Gr!==5&&(Gr=2),u=Y1(u,s),h=o;do{switch(h.tag){case 3:a=u,h.flags|=4096,e&=-e,h.lanes|=e;var x=gI(h,a,e);_T(h,x);break e;case 1:a=u;var S=h.type,w=h.stateNode;if(!(h.flags&64)&&(typeof S.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(zi===null||!zi.has(w)))){h.flags|=4096,e&=-e,h.lanes|=e;var T=yI(h,a,e);_T(h,T);break e}}h=h.return}while(h!==null)}AI(r)}catch(E){e=E,hr===r&&r!==null&&(hr=r=r.return);continue}break}while(1)}function EI(){var t=Vd.current;return Vd.current=$d,t===null?$d:t}function rc(t,e){var r=Ne;Ne|=16;var n=EI();cn===t&&Qr===e||_l(t,e);do try{pj();break}catch(i){wI(t,i)}while(1);if(D1(),Ne=r,Vd.current=n,hr!==null)throw Error(he(261));return cn=null,Qr=0,Gr}function pj(){for(;hr!==null;)TI(hr)}function vj(){for(;hr!==null&&!K4();)TI(hr)}function TI(t){var e=PI(t.alternate,t,ps);t.memoizedProps=t.pendingProps,e===null?AI(t):hr=e,H1.current=null}function AI(t){var e=t;do{var r=e.alternate;if(t=e.return,e.flags&2048){if(r=oj(e),r!==null){r.flags&=2047,hr=r;return}t!==null&&(t.firstEffect=t.lastEffect=null,t.flags|=2048)}else{if(r=aj(r,e,ps),r!==null){hr=r;return}if(r=e,r.tag!==24&&r.tag!==23||r.memoizedState===null||ps&1073741824||!(r.mode&4)){for(var n=0,i=r.child;i!==null;)n|=i.lanes|i.childLanes,i=i.sibling;r.childLanes=n}t!==null&&!(t.flags&2048)&&(t.firstEffect===null&&(t.firstEffect=e.firstEffect),e.lastEffect!==null&&(t.lastEffect!==null&&(t.lastEffect.nextEffect=e.firstEffect),t.lastEffect=e.lastEffect),1o&&(s=o,o=x,x=s),s=iT(y,x),a=iT(y,o),s&&a&&(b.rangeCount!==1||b.anchorNode!==s.node||b.anchorOffset!==s.offset||b.focusNode!==a.node||b.focusOffset!==a.offset)&&(_=_.createRange(),_.setStart(s.node,s.offset),b.removeAllRanges(),x>o?(b.addRange(_),b.extend(a.node,a.offset)):(_.setEnd(a.node,a.offset),b.addRange(_)))))),_=[],b=y;b=b.parentNode;)b.nodeType===1&&_.push({element:b,left:b.scrollLeft,top:b.scrollTop});for(typeof y.focus=="function"&&y.focus(),y=0;y<_.length;y++)b=_[y],b.element.scrollLeft=b.left,b.element.scrollTop=b.top}Hh=!!Im,km=Im=null,t.current=r,Ee=n;do try{for(y=t;Ee!==null;){var S=Ee.flags;if(S&36&&cj(y,Ee.alternate,Ee),S&128){_=void 0;var w=Ee.ref;if(w!==null){var T=Ee.stateNode;switch(Ee.tag){case 5:_=T;break;default:_=T}typeof w=="function"?w(_):w.current=_}}Ee=Ee.nextEffect}}catch(E){if(Ee===null)throw Error(he(330));fo(Ee,E),Ee=Ee.nextEffect}while(Ee!==null);Ee=null,Q4(),Ne=i}else t.current=r;if(bo)bo=!1,mc=t,tc=e;else for(Ee=n;Ee!==null;)e=Ee.nextEffect,Ee.nextEffect=null,Ee.flags&8&&(S=Ee,S.sibling=null,S.stateNode=null),Ee=e;if(n=t.pendingLanes,n===0&&(zi=null),n===1?t===P0?gc++:(gc=0,P0=t):gc=0,r=r.stateNode,os&&typeof os.onCommitFiberRoot=="function")try{os.onCommitFiberRoot(N1,r,void 0,(r.current.flags&64)===64)}catch{}if(ni(t,Zr()),Gd)throw Gd=!1,t=T0,T0=null,t;return Ne&8||aa(),null}function gj(){for(;Ee!==null;){var t=Ee.alternate;td||yc===null||(Ee.flags&8?XE(Ee,yc)&&(td=!0):Ee.tag===13&&fj(t,Ee)&&XE(Ee,yc)&&(td=!0));var e=Ee.flags;e&256&&uj(t,Ee),!(e&512)||bo||(bo=!0,Bc(97,function(){return Ro(),null})),Ee=Ee.nextEffect}}function Ro(){if(tc!==90){var t=97Zr()-K1?_l(t,0):q1|=r),ni(t,e)}function bj(t,e){var r=t.stateNode;r!==null&&r.delete(e),e=0,e===0&&(e=t.mode,e&2?e&4?(Ta===0&&(Ta=Jl),e=Zs(62914560&~Ta),e===0&&(e=4194304)):e=kl()===99?1:2:e=1),r=Dn(),t=Gp(t,e),t!==null&&(Np(t,e,r),ni(t,r))}var PI;PI=function(t,e,r){var n=e.lanes;if(t!==null)if(t.memoizedProps!==e.pendingProps||Tn.current)yi=!0;else if(r&n)yi=!!(t.flags&16384);else{switch(yi=!1,e.tag){case 3:kT(e),Lm();break;case 5:wT(e);break;case 1:An(e.type)&&Zh(e);break;case 4:d0(e,e.stateNode.containerInfo);break;case 10:n=e.memoizedProps.value;var i=e.type._context;Gt(Id,i._currentValue),i._currentValue=n;break;case 13:if(e.memoizedState!==null)return r&e.child.childLanes?MT(t,e,r):(Gt(Vt,Vt.current&1),e=Pa(t,e,r),e!==null?e.sibling:null);Gt(Vt,Vt.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&64){if(n)return BT(t,e,r);e.flags|=64}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Gt(Vt,Vt.current),n)break;return null;case 23:case 24:return e.lanes=0,Dm(t,e,r)}return Pa(t,e,r)}else yi=!1;switch(e.lanes=0,e.tag){case 2:if(n=e.type,t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2),t=e.pendingProps,i=Il(e,Jr.current),ml(e,r),i=G1(null,e,n,t,i,r),e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0){if(e.tag=1,e.memoizedState=null,e.updateQueue=null,An(n)){var a=!0;Zh(e)}else a=!1;e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,j1(e);var o=n.getDerivedStateFromProps;typeof o=="function"&&Fd(e,n,o,t),i.updater=$p,e.stateNode=i,i._reactInternals=e,h0(e,n,t,r),e=g0(null,e,n,!0,a,r)}else e.tag=0,xn(null,e,i,r),e=e.child;return e;case 16:i=e.elementType;e:{switch(t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2),t=e.pendingProps,a=i._init,i=a(i._payload),e.type=i,a=e.tag=wj(i),t=vi(i,t),a){case 0:e=m0(null,e,i,t,r);break e;case 1:e=IT(null,e,i,t,r);break e;case 11:e=OT(null,e,i,t,r);break e;case 14:e=RT(null,e,i,vi(i.type,t),n,r);break e}throw Error(he(306,i,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:vi(n,i),m0(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:vi(n,i),IT(t,e,n,i,r);case 3:if(kT(e),n=e.updateQueue,t===null||n===null)throw Error(he(282));if(n=e.pendingProps,i=e.memoizedState,i=i!==null?i.element:null,JR(t,e),jc(e,n,null,r),n=e.memoizedState.element,n===i)Lm(),e=Pa(t,e,r);else{if(i=e.stateNode,(a=i.hydrate)&&(Ja=vl(e.stateNode.containerInfo.firstChild),Ca=e,a=Hi=!0),a){if(t=i.mutableSourceEagerHydrationData,t!=null)for(i=0;i"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(RI)}catch(t){console.error(t)}}RI(),eR.exports=ii;var II=eR.exports;const Ji=Rn(II);const Rj="_Title_main_xpe81_1",Ij="_Title_buttonList_xpe81_8",kj="_Title_button_xpe81_8",Mj="_Title_button_text_xpe81_41",Fj="_Title_backup_background_xpe81_48",In={Title_main:Rj,Title_buttonList:Ij,Title_button:kj,Title_button_text:Mj,Title_backup_background:Fj};function gi(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n3?e.i-4:e.i:Array.isArray(t)?1:rb(t)?2:nb(t)?3:0}function bl(t,e){return ru(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Nj(t,e){return ru(t)===2?t.get(e):t[e]}function kI(t,e,r){var n=ru(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function MI(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function rb(t){return $j&&t instanceof Map}function nb(t){return Vj&&t instanceof Set}function Vo(t){return t.o||t.t}function ib(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=NI(t);delete e[It];for(var r=Sl(e),n=0;n1&&(t.set=t.add=t.clear=t.delete=Lj),Object.freeze(t),e&&vs(t,function(r,n){return ab(n,!0)},!0)),t}function Lj(){gi(2)}function ob(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function qi(t){var e=M0[t];return e||gi(18,t),e}function Dj(t,e){M0[t]||(M0[t]=e)}function R0(){return Gc}function Gm(t,e){e&&(qi("Patches"),t.u=[],t.s=[],t.v=e)}function zd(t){I0(t),t.p.forEach(Bj),t.p=null}function I0(t){t===Gc&&(Gc=t.l)}function HT(t){return Gc={p:[],l:Gc,h:t,m:!0,_:0}}function Bj(t){var e=t[It];e.i===0||e.i===1?e.j():e.g=!0}function Xm(t,e){e._=e.p.length;var r=e.p[0],n=t!==void 0&&t!==r;return e.h.O||qi("ES5").S(e,t,n),n?(r[It].P&&(zd(e),gi(4)),Na(t)&&(t=Wd(e,t),e.l||Yd(e,t)),e.u&&qi("Patches").M(r[It].t,t,e.u,e.s)):t=Wd(e,r,[]),zd(e),e.u&&e.v(e.u,e.s),t!==FI?t:void 0}function Wd(t,e,r){if(ob(e))return e;var n=e[It];if(!n)return vs(e,function(s,u){return qT(t,n,e,s,u,r)},!0),e;if(n.A!==t)return e;if(!n.P)return Yd(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=ib(n.k):n.o,a=i,o=!1;n.i===3&&(a=new Set(i),i.clear(),o=!0),vs(a,function(s,u){return qT(t,n,i,s,u,r,o)}),Yd(t,i,!1),r&&t.u&&qi("Patches").N(n,r,t.u,t.s)}return n.o}function qT(t,e,r,n,i,a,o){if(wo(i)){var s=Wd(t,i,a&&e&&e.i!==3&&!bl(e.R,n)?a.concat(n):void 0);if(kI(r,n,s),!wo(s))return;t.m=!1}else o&&r.add(i);if(Na(i)&&!ob(i)){if(!t.h.D&&t._<1)return;Wd(t,i),e&&e.A.l||Yd(t,i)}}function Yd(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&ab(e,r)}function zm(t,e){var r=t[It];return(r?Vo(r):t)[e]}function KT(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Object.getPrototypeOf(r)}}function qa(t){t.P||(t.P=!0,t.l&&qa(t.l))}function Wm(t){t.o||(t.o=ib(t.t))}function k0(t,e,r){var n=rb(e)?qi("MapSet").F(e,r):nb(e)?qi("MapSet").T(e,r):t.O?function(i,a){var o=Array.isArray(i),s={i:o?1:0,A:a?a.A:R0(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},u=s,l=Xc;o&&(u=[s],l=nc);var c=Proxy.revocable(u,l),f=c.revoke,h=c.proxy;return s.k=h,s.j=f,h}(e,r):qi("ES5").J(e,r);return(r?r.A:R0()).p.push(n),n}function jj(t){return wo(t)||gi(22,t),function e(r){if(!Na(r))return r;var n,i=r[It],a=ru(r);if(i){if(!i.P&&(i.i<4||!qi("ES5").K(i)))return i.t;i.I=!0,n=ZT(r,a),i.I=!1}else n=ZT(r,a);return vs(n,function(o,s){i&&Nj(i.t,o)===s||kI(n,o,e(s))}),a===3?new Set(n):n}(t)}function ZT(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return ib(t)}function Uj(){function t(a,o){var s=i[a];return s?s.enumerable=o:i[a]=s={configurable:!0,enumerable:o,get:function(){var u=this[It];return Xc.get(u,a)},set:function(u){var l=this[It];Xc.set(l,a,u)}},s}function e(a){for(var o=a.length-1;o>=0;o--){var s=a[o][It];if(!s.P)switch(s.i){case 5:n(s)&&qa(s);break;case 4:r(s)&&qa(s)}}}function r(a){for(var o=a.t,s=a.k,u=Sl(s),l=u.length-1;l>=0;l--){var c=u[l];if(c!==It){var f=o[c];if(f===void 0&&!bl(o,c))return!0;var h=s[c],d=h&&h[It];if(d?d.t!==f:!MI(h,f))return!0}}var p=!!o[It];return u.length!==Sl(o).length+(p?0:1)}function n(a){var o=a.k;if(o.length!==a.t.length)return!0;var s=Object.getOwnPropertyDescriptor(o,o.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 a=n[i];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}i>-1&&(n=n.slice(i+1));var o=qi("Patches").$;return wo(r)?o(r,n):this.produce(r,function(s){return o(s,n)})},t}(),jn=new Xj,LI=jn.produce;jn.produceWithPatches.bind(jn);jn.setAutoFreeze.bind(jn);jn.setUseProxies.bind(jn);jn.applyPatches.bind(jn);jn.createDraft.bind(jn);jn.finishDraft.bind(jn);function Cr(t){"@babel/helpers - typeof";return Cr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cr(t)}function zj(t,e){if(Cr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Cr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function DI(t){var e=zj(t,"string");return Cr(e)=="symbol"?e:String(e)}function $n(t,e,r){return e=DI(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function tA(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 rA(t){for(var e=1;e"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Hr(1));return r(BI)(t,e)}if(typeof t!="function")throw new Error(Hr(2));var i=t,a=e,o=[],s=o,u=!1;function l(){s===o&&(s=o.slice())}function c(){if(u)throw new Error(Hr(3));return a}function f(v){if(typeof v!="function")throw new Error(Hr(4));if(u)throw new Error(Hr(5));var g=!0;return l(),s.push(v),function(){if(g){if(u)throw new Error(Hr(6));g=!1,l();var y=s.indexOf(v);s.splice(y,1),o=null}}}function h(v){if(!Wj(v))throw new Error(Hr(7));if(typeof v.type>"u")throw new Error(Hr(8));if(u)throw new Error(Hr(9));try{u=!0,a=i(a,v)}finally{u=!1}for(var g=o=s,m=0;m"u")throw new Error(Hr(12));if(typeof r(void 0,{type:Hd.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Hr(13))})}function Hj(t){for(var e=Object.keys(t),r={},n=0;n"u")throw l&&l.type,new Error(Hr(14));f[d]=g,c=c||g!==v}return c=c||a.length!==Object.keys(u).length,c?f:u}}function qd(){for(var t=arguments.length,e=new Array(t),r=0;r0&&a[a.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]-1}var NU=FU,LU=Wp;function DU(t,e){var r=this.__data__,n=LU(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var BU=DU,jU=bU,UU=OU,$U=kU,VU=NU,GU=BU;function nu(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e-1&&t%1==0&&t-1&&t%1==0&&t<=G6}var mb=X6,z6=Lf,W6=mb,Y6=Cs,H6="[object Arguments]",q6="[object Array]",K6="[object Boolean]",Z6="[object Date]",Q6="[object Error]",J6="[object Function]",e5="[object Map]",t5="[object Number]",r5="[object Object]",n5="[object RegExp]",i5="[object Set]",a5="[object String]",o5="[object WeakMap]",s5="[object ArrayBuffer]",l5="[object DataView]",u5="[object Float32Array]",c5="[object Float64Array]",f5="[object Int8Array]",h5="[object Int16Array]",d5="[object Int32Array]",p5="[object Uint8Array]",v5="[object Uint8ClampedArray]",m5="[object Uint16Array]",g5="[object Uint32Array]",Tt={};Tt[u5]=Tt[c5]=Tt[f5]=Tt[h5]=Tt[d5]=Tt[p5]=Tt[v5]=Tt[m5]=Tt[g5]=!0;Tt[H6]=Tt[q6]=Tt[s5]=Tt[K6]=Tt[l5]=Tt[Z6]=Tt[Q6]=Tt[J6]=Tt[e5]=Tt[t5]=Tt[r5]=Tt[n5]=Tt[i5]=Tt[a5]=Tt[o5]=!1;function y5(t){return Y6(t)&&W6(t.length)&&!!Tt[z6(t)]}var _5=y5;function x5(t){return function(e){return t(e)}}var gb=x5,Zd={exports:{}};Zd.exports;(function(t,e){var r=XI,n=e&&!e.nodeType&&e,i=n&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===n,o=a&&r.process,s=function(){try{var u=i&&i.require&&i.require("util").types;return u||o&&o.binding&&o.binding("util")}catch{}}();t.exports=s})(Zd,Zd.exports);var yb=Zd.exports,b5=_5,S5=gb,gA=yb,yA=gA&&gA.isTypedArray,w5=yA?S5(yA):b5,ZI=w5,E5=A6,T5=KI,A5=Da,C5=pb,P5=vb,O5=ZI,R5=Object.prototype,I5=R5.hasOwnProperty;function k5(t,e){var r=A5(t),n=!r&&T5(t),i=!r&&!n&&C5(t),a=!r&&!n&&!i&&O5(t),o=r||n||i||a,s=o?E5(t.length,String):[],u=s.length;for(var l in t)(e||I5.call(t,l))&&!(o&&(l=="length"||i&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||P5(l,u)))&&s.push(l);return s}var QI=k5,M5=Object.prototype;function F5(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||M5;return t===r}var _b=F5;function N5(t,e){return function(r){return t(e(r))}}var JI=N5,L5=JI,D5=L5(Object.keys,Object),B5=D5,j5=_b,U5=B5,$5=Object.prototype,V5=$5.hasOwnProperty;function G5(t){if(!j5(t))return U5(t);var e=[];for(var r in Object(t))V5.call(t,r)&&r!="constructor"&&e.push(r);return e}var X5=G5,z5=WI,W5=mb;function Y5(t){return t!=null&&W5(t.length)&&!z5(t)}var ek=Y5,H5=QI,q5=X5,K5=ek;function Z5(t){return K5(t)?H5(t):q5(t)}var Zp=Z5,Q5=Kp,J5=Zp;function eV(t,e){return t&&Q5(e,J5(e),t)}var tV=eV;function rV(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var nV=rV,iV=oa,aV=_b,oV=nV,sV=Object.prototype,lV=sV.hasOwnProperty;function uV(t){if(!iV(t))return oV(t);var e=aV(t),r=[];for(var n in t)n=="constructor"&&(e||!lV.call(t,n))||r.push(n);return r}var cV=uV,fV=QI,hV=cV,dV=ek;function pV(t){return dV(t)?fV(t,!0):hV(t)}var xb=pV,vV=Kp,mV=xb;function gV(t,e){return t&&vV(e,mV(e),t)}var yV=gV,Qd={exports:{}};Qd.exports;(function(t,e){var r=Ei,n=e&&!e.nodeType&&e,i=n&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===n,o=a?r.Buffer:void 0,s=o?o.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}t.exports=u})(Qd,Qd.exports);var _V=Qd.exports;function xV(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r(t[t.say=0]="say",t[t.changeBg=1]="changeBg",t[t.changeFigure=2]="changeFigure",t[t.bgm=3]="bgm",t[t.video=4]="video",t[t.pixi=5]="pixi",t[t.pixiInit=6]="pixiInit",t[t.intro=7]="intro",t[t.miniAvatar=8]="miniAvatar",t[t.changeScene=9]="changeScene",t[t.choose=10]="choose",t[t.end=11]="end",t[t.setComplexAnimation=12]="setComplexAnimation",t[t.setFilter=13]="setFilter",t[t.label=14]="label",t[t.jumpLabel=15]="jumpLabel",t[t.chooseLabel=16]="chooseLabel",t[t.setVar=17]="setVar",t[t.if=18]="if",t[t.callScene=19]="callScene",t[t.showVars=20]="showVars",t[t.unlockCg=21]="unlockCg",t[t.unlockBgm=22]="unlockBgm",t[t.filmMode=23]="filmMode",t[t.setTextbox=24]="setTextbox",t[t.setAnimation=25]="setAnimation",t[t.playEffect=26]="playEffect",t[t.setTempAnimation=27]="setTempAnimation",t[t.comment=28]="comment",t[t.setTransform=29]="setTransform",t[t.setTransition=30]="setTransition",t[t.getUserInput=31]="getUserInput",t[t.applyStyle=32]="applyStyle",t))(Qe||{});const pk={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:{}},wb=zp({name:"stage",initialState:ar(pk),reducers:{resetStageState:(t,e)=>{Object.assign(t,e.payload)},setStage:(t,e)=>{t[e.payload.key]=e.payload.value},setStageVar:(t,e)=>{t.GameVar[e.payload.key]=e.payload.value},updateEffect:(t,e)=>{const{target:r,transform:n}=e.payload,i=t.effects.findIndex(a=>a.target===r);i>=0?t.effects[i].transform=n:t.effects.push({target:r,transform:n})},removeEffectByTargetId:(t,e)=>{const r=t.effects.findIndex(n=>n.target===e.payload);r>=0&&t.effects.splice(r,1)},addPerform:(t,e)=>{t.PerformList.push(e.payload)},removePerformByName:(t,e)=>{for(let r=0;r{for(let r=0;r{const r=t.freeFigure,n=e.payload,i=r.findIndex(a=>a.key===n.key);i>=0?(r[i].basePosition=n.basePosition,r[i].name=n.name):n.name!==""&&r.push(n)},setLive2dMotion:(t,e)=>{const{target:r,motion:n}=e.payload,i=t.live2dMotion.findIndex(a=>a.target===r);i<0?t.live2dMotion.push({target:r,motion:n}):t.live2dMotion[i].motion=n},setLive2dExpression:(t,e)=>{const{target:r,expression:n}=e.payload,i=t.live2dExpression.findIndex(a=>a.target===r);i<0?t.live2dExpression.push({target:r,expression:n}):t.live2dExpression[i].expression=n},replaceUIlable:(t,e)=>{t.replacedUIlable[e.payload[0]]=e.payload[1]}}}),{resetStageState:Jp,setStage:Ge,setStageVar:vk}=wb.actions,Sn=wb.actions,$X=wb.reducer;function fh(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var mk={exports:{}};/*! +Add a component higher in the tree to provide a loading indicator or placeholder to display.`)}Gr!==5&&(Gr=2),u=Y1(u,s),h=o;do{switch(h.tag){case 3:a=u,h.flags|=4096,e&=-e,h.lanes|=e;var x=yI(h,a,e);xT(h,x);break e;case 1:a=u;var S=h.type,w=h.stateNode;if(!(h.flags&64)&&(typeof S.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(zi===null||!zi.has(w)))){h.flags|=4096,e&=-e,h.lanes|=e;var T=_I(h,a,e);xT(h,T);break e}}h=h.return}while(h!==null)}CI(r)}catch(E){e=E,hr===r&&r!==null&&(hr=r=r.return);continue}break}while(1)}function TI(){var t=Vd.current;return Vd.current=$d,t===null?$d:t}function rc(t,e){var r=Ne;Ne|=16;var n=TI();cn===t&&Qr===e||_l(t,e);do try{pj();break}catch(i){EI(t,i)}while(1);if(D1(),Ne=r,Vd.current=n,hr!==null)throw Error(he(261));return cn=null,Qr=0,Gr}function pj(){for(;hr!==null;)AI(hr)}function vj(){for(;hr!==null&&!K4();)AI(hr)}function AI(t){var e=OI(t.alternate,t,ps);t.memoizedProps=t.pendingProps,e===null?CI(t):hr=e,H1.current=null}function CI(t){var e=t;do{var r=e.alternate;if(t=e.return,e.flags&2048){if(r=oj(e),r!==null){r.flags&=2047,hr=r;return}t!==null&&(t.firstEffect=t.lastEffect=null,t.flags|=2048)}else{if(r=aj(r,e,ps),r!==null){hr=r;return}if(r=e,r.tag!==24&&r.tag!==23||r.memoizedState===null||ps&1073741824||!(r.mode&4)){for(var n=0,i=r.child;i!==null;)n|=i.lanes|i.childLanes,i=i.sibling;r.childLanes=n}t!==null&&!(t.flags&2048)&&(t.firstEffect===null&&(t.firstEffect=e.firstEffect),e.lastEffect!==null&&(t.lastEffect!==null&&(t.lastEffect.nextEffect=e.firstEffect),t.lastEffect=e.lastEffect),1o&&(s=o,o=x,x=s),s=aT(y,x),a=aT(y,o),s&&a&&(b.rangeCount!==1||b.anchorNode!==s.node||b.anchorOffset!==s.offset||b.focusNode!==a.node||b.focusOffset!==a.offset)&&(_=_.createRange(),_.setStart(s.node,s.offset),b.removeAllRanges(),x>o?(b.addRange(_),b.extend(a.node,a.offset)):(_.setEnd(a.node,a.offset),b.addRange(_)))))),_=[],b=y;b=b.parentNode;)b.nodeType===1&&_.push({element:b,left:b.scrollLeft,top:b.scrollTop});for(typeof y.focus=="function"&&y.focus(),y=0;y<_.length;y++)b=_[y],b.element.scrollLeft=b.left,b.element.scrollTop=b.top}Hh=!!Im,km=Im=null,t.current=r,Ee=n;do try{for(y=t;Ee!==null;){var S=Ee.flags;if(S&36&&cj(y,Ee.alternate,Ee),S&128){_=void 0;var w=Ee.ref;if(w!==null){var T=Ee.stateNode;switch(Ee.tag){case 5:_=T;break;default:_=T}typeof w=="function"?w(_):w.current=_}}Ee=Ee.nextEffect}}catch(E){if(Ee===null)throw Error(he(330));fo(Ee,E),Ee=Ee.nextEffect}while(Ee!==null);Ee=null,Q4(),Ne=i}else t.current=r;if(bo)bo=!1,mc=t,tc=e;else for(Ee=n;Ee!==null;)e=Ee.nextEffect,Ee.nextEffect=null,Ee.flags&8&&(S=Ee,S.sibling=null,S.stateNode=null),Ee=e;if(n=t.pendingLanes,n===0&&(zi=null),n===1?t===P0?gc++:(gc=0,P0=t):gc=0,r=r.stateNode,os&&typeof os.onCommitFiberRoot=="function")try{os.onCommitFiberRoot(N1,r,void 0,(r.current.flags&64)===64)}catch{}if(ni(t,Zr()),Gd)throw Gd=!1,t=T0,T0=null,t;return Ne&8||aa(),null}function gj(){for(;Ee!==null;){var t=Ee.alternate;td||yc===null||(Ee.flags&8?zE(Ee,yc)&&(td=!0):Ee.tag===13&&fj(t,Ee)&&zE(Ee,yc)&&(td=!0));var e=Ee.flags;e&256&&uj(t,Ee),!(e&512)||bo||(bo=!0,Bc(97,function(){return Ro(),null})),Ee=Ee.nextEffect}}function Ro(){if(tc!==90){var t=97Zr()-K1?_l(t,0):q1|=r),ni(t,e)}function bj(t,e){var r=t.stateNode;r!==null&&r.delete(e),e=0,e===0&&(e=t.mode,e&2?e&4?(Ta===0&&(Ta=Jl),e=Zs(62914560&~Ta),e===0&&(e=4194304)):e=kl()===99?1:2:e=1),r=Dn(),t=Gp(t,e),t!==null&&(Np(t,e,r),ni(t,r))}var OI;OI=function(t,e,r){var n=e.lanes;if(t!==null)if(t.memoizedProps!==e.pendingProps||Tn.current)yi=!0;else if(r&n)yi=!!(t.flags&16384);else{switch(yi=!1,e.tag){case 3:MT(e),Lm();break;case 5:ET(e);break;case 1:An(e.type)&&Zh(e);break;case 4:d0(e,e.stateNode.containerInfo);break;case 10:n=e.memoizedProps.value;var i=e.type._context;Gt(Id,i._currentValue),i._currentValue=n;break;case 13:if(e.memoizedState!==null)return r&e.child.childLanes?FT(t,e,r):(Gt(Vt,Vt.current&1),e=Pa(t,e,r),e!==null?e.sibling:null);Gt(Vt,Vt.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&64){if(n)return jT(t,e,r);e.flags|=64}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Gt(Vt,Vt.current),n)break;return null;case 23:case 24:return e.lanes=0,Dm(t,e,r)}return Pa(t,e,r)}else yi=!1;switch(e.lanes=0,e.tag){case 2:if(n=e.type,t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2),t=e.pendingProps,i=Il(e,Jr.current),ml(e,r),i=G1(null,e,n,t,i,r),e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0){if(e.tag=1,e.memoizedState=null,e.updateQueue=null,An(n)){var a=!0;Zh(e)}else a=!1;e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,j1(e);var o=n.getDerivedStateFromProps;typeof o=="function"&&Fd(e,n,o,t),i.updater=$p,e.stateNode=i,i._reactInternals=e,h0(e,n,t,r),e=g0(null,e,n,!0,a,r)}else e.tag=0,xn(null,e,i,r),e=e.child;return e;case 16:i=e.elementType;e:{switch(t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2),t=e.pendingProps,a=i._init,i=a(i._payload),e.type=i,a=e.tag=wj(i),t=vi(i,t),a){case 0:e=m0(null,e,i,t,r);break e;case 1:e=kT(null,e,i,t,r);break e;case 11:e=RT(null,e,i,t,r);break e;case 14:e=IT(null,e,i,vi(i.type,t),n,r);break e}throw Error(he(306,i,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:vi(n,i),m0(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:vi(n,i),kT(t,e,n,i,r);case 3:if(MT(e),n=e.updateQueue,t===null||n===null)throw Error(he(282));if(n=e.pendingProps,i=e.memoizedState,i=i!==null?i.element:null,eI(t,e),jc(e,n,null,r),n=e.memoizedState.element,n===i)Lm(),e=Pa(t,e,r);else{if(i=e.stateNode,(a=i.hydrate)&&(Ja=vl(e.stateNode.containerInfo.firstChild),Ca=e,a=Hi=!0),a){if(t=i.mutableSourceEagerHydrationData,t!=null)for(i=0;i"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(II)}catch(t){console.error(t)}}II(),tR.exports=ii;var kI=tR.exports;const Ji=Rn(kI);const Rj="_Title_main_xpe81_1",Ij="_Title_buttonList_xpe81_8",kj="_Title_button_xpe81_8",Mj="_Title_button_text_xpe81_41",Fj="_Title_backup_background_xpe81_48",In={Title_main:Rj,Title_buttonList:Ij,Title_button:kj,Title_button_text:Mj,Title_backup_background:Fj};function gi(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n3?e.i-4:e.i:Array.isArray(t)?1:rb(t)?2:nb(t)?3:0}function bl(t,e){return ru(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Nj(t,e){return ru(t)===2?t.get(e):t[e]}function MI(t,e,r){var n=ru(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function FI(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function rb(t){return $j&&t instanceof Map}function nb(t){return Vj&&t instanceof Set}function Vo(t){return t.o||t.t}function ib(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=LI(t);delete e[It];for(var r=Sl(e),n=0;n1&&(t.set=t.add=t.clear=t.delete=Lj),Object.freeze(t),e&&vs(t,function(r,n){return ab(n,!0)},!0)),t}function Lj(){gi(2)}function ob(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function qi(t){var e=M0[t];return e||gi(18,t),e}function Dj(t,e){M0[t]||(M0[t]=e)}function R0(){return Gc}function Gm(t,e){e&&(qi("Patches"),t.u=[],t.s=[],t.v=e)}function zd(t){I0(t),t.p.forEach(Bj),t.p=null}function I0(t){t===Gc&&(Gc=t.l)}function qT(t){return Gc={p:[],l:Gc,h:t,m:!0,_:0}}function Bj(t){var e=t[It];e.i===0||e.i===1?e.j():e.g=!0}function Xm(t,e){e._=e.p.length;var r=e.p[0],n=t!==void 0&&t!==r;return e.h.O||qi("ES5").S(e,t,n),n?(r[It].P&&(zd(e),gi(4)),Na(t)&&(t=Wd(e,t),e.l||Yd(e,t)),e.u&&qi("Patches").M(r[It].t,t,e.u,e.s)):t=Wd(e,r,[]),zd(e),e.u&&e.v(e.u,e.s),t!==NI?t:void 0}function Wd(t,e,r){if(ob(e))return e;var n=e[It];if(!n)return vs(e,function(s,u){return KT(t,n,e,s,u,r)},!0),e;if(n.A!==t)return e;if(!n.P)return Yd(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=ib(n.k):n.o,a=i,o=!1;n.i===3&&(a=new Set(i),i.clear(),o=!0),vs(a,function(s,u){return KT(t,n,i,s,u,r,o)}),Yd(t,i,!1),r&&t.u&&qi("Patches").N(n,r,t.u,t.s)}return n.o}function KT(t,e,r,n,i,a,o){if(wo(i)){var s=Wd(t,i,a&&e&&e.i!==3&&!bl(e.R,n)?a.concat(n):void 0);if(MI(r,n,s),!wo(s))return;t.m=!1}else o&&r.add(i);if(Na(i)&&!ob(i)){if(!t.h.D&&t._<1)return;Wd(t,i),e&&e.A.l||Yd(t,i)}}function Yd(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&ab(e,r)}function zm(t,e){var r=t[It];return(r?Vo(r):t)[e]}function ZT(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Object.getPrototypeOf(r)}}function qa(t){t.P||(t.P=!0,t.l&&qa(t.l))}function Wm(t){t.o||(t.o=ib(t.t))}function k0(t,e,r){var n=rb(e)?qi("MapSet").F(e,r):nb(e)?qi("MapSet").T(e,r):t.O?function(i,a){var o=Array.isArray(i),s={i:o?1:0,A:a?a.A:R0(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},u=s,l=Xc;o&&(u=[s],l=nc);var c=Proxy.revocable(u,l),f=c.revoke,h=c.proxy;return s.k=h,s.j=f,h}(e,r):qi("ES5").J(e,r);return(r?r.A:R0()).p.push(n),n}function jj(t){return wo(t)||gi(22,t),function e(r){if(!Na(r))return r;var n,i=r[It],a=ru(r);if(i){if(!i.P&&(i.i<4||!qi("ES5").K(i)))return i.t;i.I=!0,n=QT(r,a),i.I=!1}else n=QT(r,a);return vs(n,function(o,s){i&&Nj(i.t,o)===s||MI(n,o,e(s))}),a===3?new Set(n):n}(t)}function QT(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return ib(t)}function Uj(){function t(a,o){var s=i[a];return s?s.enumerable=o:i[a]=s={configurable:!0,enumerable:o,get:function(){var u=this[It];return Xc.get(u,a)},set:function(u){var l=this[It];Xc.set(l,a,u)}},s}function e(a){for(var o=a.length-1;o>=0;o--){var s=a[o][It];if(!s.P)switch(s.i){case 5:n(s)&&qa(s);break;case 4:r(s)&&qa(s)}}}function r(a){for(var o=a.t,s=a.k,u=Sl(s),l=u.length-1;l>=0;l--){var c=u[l];if(c!==It){var f=o[c];if(f===void 0&&!bl(o,c))return!0;var h=s[c],d=h&&h[It];if(d?d.t!==f:!FI(h,f))return!0}}var p=!!o[It];return u.length!==Sl(o).length+(p?0:1)}function n(a){var o=a.k;if(o.length!==a.t.length)return!0;var s=Object.getOwnPropertyDescriptor(o,o.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 a=n[i];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}i>-1&&(n=n.slice(i+1));var o=qi("Patches").$;return wo(r)?o(r,n):this.produce(r,function(s){return o(s,n)})},t}(),jn=new Xj,DI=jn.produce;jn.produceWithPatches.bind(jn);jn.setAutoFreeze.bind(jn);jn.setUseProxies.bind(jn);jn.applyPatches.bind(jn);jn.createDraft.bind(jn);jn.finishDraft.bind(jn);function Cr(t){"@babel/helpers - typeof";return Cr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cr(t)}function zj(t,e){if(Cr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Cr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function BI(t){var e=zj(t,"string");return Cr(e)=="symbol"?e:String(e)}function $n(t,e,r){return e=BI(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function rA(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 nA(t){for(var e=1;e"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Hr(1));return r(jI)(t,e)}if(typeof t!="function")throw new Error(Hr(2));var i=t,a=e,o=[],s=o,u=!1;function l(){s===o&&(s=o.slice())}function c(){if(u)throw new Error(Hr(3));return a}function f(v){if(typeof v!="function")throw new Error(Hr(4));if(u)throw new Error(Hr(5));var g=!0;return l(),s.push(v),function(){if(g){if(u)throw new Error(Hr(6));g=!1,l();var y=s.indexOf(v);s.splice(y,1),o=null}}}function h(v){if(!Wj(v))throw new Error(Hr(7));if(typeof v.type>"u")throw new Error(Hr(8));if(u)throw new Error(Hr(9));try{u=!0,a=i(a,v)}finally{u=!1}for(var g=o=s,m=0;m"u")throw new Error(Hr(12));if(typeof r(void 0,{type:Hd.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Hr(13))})}function Hj(t){for(var e=Object.keys(t),r={},n=0;n"u")throw l&&l.type,new Error(Hr(14));f[d]=g,c=c||g!==v}return c=c||a.length!==Object.keys(u).length,c?f:u}}function qd(){for(var t=arguments.length,e=new Array(t),r=0;r0&&a[a.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]-1}var NU=FU,LU=Wp;function DU(t,e){var r=this.__data__,n=LU(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var BU=DU,jU=bU,UU=OU,$U=kU,VU=NU,GU=BU;function nu(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e-1&&t%1==0&&t-1&&t%1==0&&t<=G6}var mb=X6,z6=Lf,W6=mb,Y6=Cs,H6="[object Arguments]",q6="[object Array]",K6="[object Boolean]",Z6="[object Date]",Q6="[object Error]",J6="[object Function]",e5="[object Map]",t5="[object Number]",r5="[object Object]",n5="[object RegExp]",i5="[object Set]",a5="[object String]",o5="[object WeakMap]",s5="[object ArrayBuffer]",l5="[object DataView]",u5="[object Float32Array]",c5="[object Float64Array]",f5="[object Int8Array]",h5="[object Int16Array]",d5="[object Int32Array]",p5="[object Uint8Array]",v5="[object Uint8ClampedArray]",m5="[object Uint16Array]",g5="[object Uint32Array]",Tt={};Tt[u5]=Tt[c5]=Tt[f5]=Tt[h5]=Tt[d5]=Tt[p5]=Tt[v5]=Tt[m5]=Tt[g5]=!0;Tt[H6]=Tt[q6]=Tt[s5]=Tt[K6]=Tt[l5]=Tt[Z6]=Tt[Q6]=Tt[J6]=Tt[e5]=Tt[t5]=Tt[r5]=Tt[n5]=Tt[i5]=Tt[a5]=Tt[o5]=!1;function y5(t){return Y6(t)&&W6(t.length)&&!!Tt[z6(t)]}var _5=y5;function x5(t){return function(e){return t(e)}}var gb=x5,Zd={exports:{}};Zd.exports;(function(t,e){var r=zI,n=e&&!e.nodeType&&e,i=n&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===n,o=a&&r.process,s=function(){try{var u=i&&i.require&&i.require("util").types;return u||o&&o.binding&&o.binding("util")}catch{}}();t.exports=s})(Zd,Zd.exports);var yb=Zd.exports,b5=_5,S5=gb,yA=yb,_A=yA&&yA.isTypedArray,w5=_A?S5(_A):b5,QI=w5,E5=A6,T5=ZI,A5=Da,C5=pb,P5=vb,O5=QI,R5=Object.prototype,I5=R5.hasOwnProperty;function k5(t,e){var r=A5(t),n=!r&&T5(t),i=!r&&!n&&C5(t),a=!r&&!n&&!i&&O5(t),o=r||n||i||a,s=o?E5(t.length,String):[],u=s.length;for(var l in t)(e||I5.call(t,l))&&!(o&&(l=="length"||i&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||P5(l,u)))&&s.push(l);return s}var JI=k5,M5=Object.prototype;function F5(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||M5;return t===r}var _b=F5;function N5(t,e){return function(r){return t(e(r))}}var ek=N5,L5=ek,D5=L5(Object.keys,Object),B5=D5,j5=_b,U5=B5,$5=Object.prototype,V5=$5.hasOwnProperty;function G5(t){if(!j5(t))return U5(t);var e=[];for(var r in Object(t))V5.call(t,r)&&r!="constructor"&&e.push(r);return e}var X5=G5,z5=YI,W5=mb;function Y5(t){return t!=null&&W5(t.length)&&!z5(t)}var tk=Y5,H5=JI,q5=X5,K5=tk;function Z5(t){return K5(t)?H5(t):q5(t)}var Zp=Z5,Q5=Kp,J5=Zp;function eV(t,e){return t&&Q5(e,J5(e),t)}var tV=eV;function rV(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var nV=rV,iV=oa,aV=_b,oV=nV,sV=Object.prototype,lV=sV.hasOwnProperty;function uV(t){if(!iV(t))return oV(t);var e=aV(t),r=[];for(var n in t)n=="constructor"&&(e||!lV.call(t,n))||r.push(n);return r}var cV=uV,fV=JI,hV=cV,dV=tk;function pV(t){return dV(t)?fV(t,!0):hV(t)}var xb=pV,vV=Kp,mV=xb;function gV(t,e){return t&&vV(e,mV(e),t)}var yV=gV,Qd={exports:{}};Qd.exports;(function(t,e){var r=Ei,n=e&&!e.nodeType&&e,i=n&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===n,o=a?r.Buffer:void 0,s=o?o.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}t.exports=u})(Qd,Qd.exports);var _V=Qd.exports;function xV(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r(t[t.say=0]="say",t[t.changeBg=1]="changeBg",t[t.changeFigure=2]="changeFigure",t[t.bgm=3]="bgm",t[t.video=4]="video",t[t.pixi=5]="pixi",t[t.pixiInit=6]="pixiInit",t[t.intro=7]="intro",t[t.miniAvatar=8]="miniAvatar",t[t.changeScene=9]="changeScene",t[t.choose=10]="choose",t[t.end=11]="end",t[t.setComplexAnimation=12]="setComplexAnimation",t[t.setFilter=13]="setFilter",t[t.label=14]="label",t[t.jumpLabel=15]="jumpLabel",t[t.chooseLabel=16]="chooseLabel",t[t.setVar=17]="setVar",t[t.if=18]="if",t[t.callScene=19]="callScene",t[t.showVars=20]="showVars",t[t.unlockCg=21]="unlockCg",t[t.unlockBgm=22]="unlockBgm",t[t.filmMode=23]="filmMode",t[t.setTextbox=24]="setTextbox",t[t.setAnimation=25]="setAnimation",t[t.playEffect=26]="playEffect",t[t.setTempAnimation=27]="setTempAnimation",t[t.comment=28]="comment",t[t.setTransform=29]="setTransform",t[t.setTransition=30]="setTransition",t[t.getUserInput=31]="getUserInput",t[t.applyStyle=32]="applyStyle",t))(Qe||{});const vk={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:{}},wb=zp({name:"stage",initialState:ar(vk),reducers:{resetStageState:(t,e)=>{Object.assign(t,e.payload)},setStage:(t,e)=>{t[e.payload.key]=e.payload.value},setStageVar:(t,e)=>{t.GameVar[e.payload.key]=e.payload.value},updateEffect:(t,e)=>{const{target:r,transform:n}=e.payload,i=t.effects.findIndex(a=>a.target===r);i>=0?t.effects[i].transform=n:t.effects.push({target:r,transform:n})},removeEffectByTargetId:(t,e)=>{const r=t.effects.findIndex(n=>n.target===e.payload);r>=0&&t.effects.splice(r,1)},addPerform:(t,e)=>{t.PerformList.push(e.payload)},removePerformByName:(t,e)=>{for(let r=0;r{for(let r=0;r{const r=t.freeFigure,n=e.payload,i=r.findIndex(a=>a.key===n.key);i>=0?(r[i].basePosition=n.basePosition,r[i].name=n.name):n.name!==""&&r.push(n)},setLive2dMotion:(t,e)=>{const{target:r,motion:n}=e.payload,i=t.live2dMotion.findIndex(a=>a.target===r);i<0?t.live2dMotion.push({target:r,motion:n}):t.live2dMotion[i].motion=n},setLive2dExpression:(t,e)=>{const{target:r,expression:n}=e.payload,i=t.live2dExpression.findIndex(a=>a.target===r);i<0?t.live2dExpression.push({target:r,expression:n}):t.live2dExpression[i].expression=n},replaceUIlable:(t,e)=>{t.replacedUIlable[e.payload[0]]=e.payload[1]}}}),{resetStageState:Jp,setStage:Ge,setStageVar:mk}=wb.actions,Sn=wb.actions,$X=wb.reducer;function fh(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var gk={exports:{}};/*! localForage -- Offline Storage, Improved Version 1.10.0 https://localforage.github.io/localForage (c) 2013-2017 Mozilla, Apache License 2.0 -*/(function(t,e){(function(r){t.exports=r()})(function(){return function r(n,i,a){function o(l,c){if(!i[l]){if(!n[l]){var f=typeof fh=="function"&&fh;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(p){var v=n[l][1][p];return o(v||p)},d,d.exports,r,n,i,a)}return i[l].exports}for(var s=typeof fh=="function"&&fh,u=0;u"u"&&r(3);var f=Promise;function h(I,X){X&&I.then(function(L){X(null,L)},function(L){X(L)})}function d(I,X,L){typeof X=="function"&&I.then(X),typeof L=="function"&&I.catch(L)}function p(I){return typeof I!="string"&&(console.warn(I+" used as a key, but it is not a string."),I=String(I)),I}function v(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var g="local-forage-detect-blob-support",m=void 0,y={},_=Object.prototype.toString,b="readonly",x="readwrite";function S(I){for(var X=I.length,L=new ArrayBuffer(X),Y=new Uint8Array(L),K=0;K=43)}}).catch(function(){return!1})}function T(I){return typeof m=="boolean"?f.resolve(m):w(I).then(function(X){return m=X,m})}function E(I){var X=y[I.name],L={};L.promise=new f(function(Y,K){L.resolve=Y,L.reject=K}),X.deferredOperations.push(L),X.dbReady?X.dbReady=X.dbReady.then(function(){return L.promise}):X.dbReady=L.promise}function A(I){var X=y[I.name],L=X.deferredOperations.pop();if(L)return L.resolve(),L.promise}function O(I,X){var L=y[I.name],Y=L.deferredOperations.pop();if(Y)return Y.reject(X),Y.promise}function P(I,X){return new f(function(L,Y){if(y[I.name]=y[I.name]||G(),I.db)if(X)E(I),I.db.close();else return L(I.db);var K=[I.name];X&&K.push(I.version);var W=u.open.apply(u,K);X&&(W.onupgradeneeded=function(re){var se=W.result;try{se.createObjectStore(I.storeName),re.oldVersion<=1&&se.createObjectStore(g)}catch(ue){if(ue.name==="ConstraintError")console.warn('The database "'+I.name+'" has been upgraded from version '+re.oldVersion+" to version "+re.newVersion+', but the storage "'+I.storeName+'" already exists.');else throw ue}}),W.onerror=function(re){re.preventDefault(),Y(W.error)},W.onsuccess=function(){var re=W.result;re.onversionchange=function(se){se.target.close()},L(re),A(I)}})}function F(I){return P(I,!1)}function k(I){return P(I,!0)}function B(I,X){if(!I.db)return!0;var L=!I.db.objectStoreNames.contains(I.storeName),Y=I.versionI.db.version;if(Y&&(I.version!==X&&console.warn('The database "'+I.name+`" can't be downgraded from version `+I.db.version+" to version "+I.version+"."),I.version=I.db.version),K||L){if(L){var W=I.db.version+1;W>I.version&&(I.version=W)}return!0}return!1}function U(I){return new f(function(X,L){var Y=new FileReader;Y.onerror=L,Y.onloadend=function(K){var W=btoa(K.target.result||"");X({__local_forage_encoded_blob:!0,data:W,type:I.type})},Y.readAsBinaryString(I)})}function z(I){var X=S(atob(I.data));return c([X],{type:I.type})}function J(I){return I&&I.__local_forage_encoded_blob}function Q(I){var X=this,L=X._initReady().then(function(){var Y=y[X._dbInfo.name];if(Y&&Y.dbReady)return Y.dbReady});return d(L,I,I),L}function $(I){E(I);for(var X=y[I.name],L=X.forages,Y=0;Y0&&(!I.db||W.name==="InvalidStateError"||W.name==="NotFoundError"))return f.resolve().then(function(){if(!I.db||W.name==="NotFoundError"&&!I.db.objectStoreNames.contains(I.storeName)&&I.version<=I.db.version)return I.db&&(I.version=I.db.version+1),k(I)}).then(function(){return $(I).then(function(){M(I,X,L,Y-1)})}).catch(L);L(W)}}function G(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function V(I){var X=this,L={db:null};if(I)for(var Y in I)L[Y]=I[Y];var K=y[L.name];K||(K=G(),y[L.name]=K),K.forages.push(X),X._initReady||(X._initReady=X.ready,X.ready=Q);var W=[];function re(){return f.resolve()}for(var se=0;se>4,me[K++]=(re&15)<<4|se>>2,me[K++]=(se&3)<<6|ue&63;return ce}function ct(I){var X=new Uint8Array(I),L="",Y;for(Y=0;Y>2],L+=Oe[(X[Y]&3)<<4|X[Y+1]>>4],L+=Oe[(X[Y+1]&15)<<2|X[Y+2]>>6],L+=Oe[X[Y+2]&63];return X.length%3===2?L=L.substring(0,L.length-1)+"=":X.length%3===1&&(L=L.substring(0,L.length-2)+"=="),L}function oi(I,X){var L="";if(I&&(L=da.call(I)),I&&(L==="[object ArrayBuffer]"||I.buffer&&da.call(I.buffer)==="[object ArrayBuffer]")){var Y,K=Xe;I instanceof ArrayBuffer?(Y=I,K+=wt):(Y=I.buffer,L==="[object Int8Array]"?K+=Yt:L==="[object Uint8Array]"?K+=yt:L==="[object Uint8ClampedArray]"?K+=or:L==="[object Int16Array]"?K+=Nr:L==="[object Uint16Array]"?K+=gr:L==="[object Int32Array]"?K+=sr:L==="[object Uint32Array]"?K+=Lr:L==="[object Float32Array]"?K+=yr:L==="[object Float64Array]"?K+=Ri:X(new Error("Failed to get type for BinaryArray"))),X(K+ct(Y))}else if(L==="[object Blob]"){var W=new FileReader;W.onload=function(){var re=ke+I.type+"~"+ct(this.result);X(Xe+Ut+re)},W.readAsArrayBuffer(I)}else try{X(JSON.stringify(I))}catch(re){console.error("Couldn't convert value into a JSON string: ",I),X(null,re)}}function Fo(I){if(I.substring(0,tt)!==Xe)return JSON.parse(I);var X=I.substring($t),L=I.substring(tt,$t),Y;if(L===Ut&&we.test(X)){var K=X.match(we);Y=K[1],X=X.substring(K[0].length)}var W=Ba(X);switch(L){case wt:return W;case Ut:return c([W],{type:Y});case Yt:return new Int8Array(W);case yt:return new Uint8Array(W);case or:return new Uint8ClampedArray(W);case Nr:return new Int16Array(W);case gr:return new Uint16Array(W);case sr:return new Int32Array(W);case Lr:return new Uint32Array(W);case yr:return new Float32Array(W);case Ri:return new Float64Array(W);default:throw new Error("Unkown type: "+L)}}var Xn={serialize:oi,deserialize:Fo,stringToBuffer:Ba,bufferToString:ct};function ja(I,X,L,Y){I.executeSql("CREATE TABLE IF NOT EXISTS "+X.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],L,Y)}function Ii(I){var X=this,L={db:null};if(I)for(var Y in I)L[Y]=typeof I[Y]!="string"?I[Y].toString():I[Y];var K=new f(function(W,re){try{L.db=openDatabase(L.name,String(L.version),L.description,L.size)}catch(se){return re(se)}L.db.transaction(function(se){ja(se,L,function(){X._dbInfo=L,W()},function(ue,ce){re(ce)})},re)});return L.serializer=Xn,K}function Dr(I,X,L,Y,K,W){I.executeSql(L,Y,K,function(re,se){se.code===se.SYNTAX_ERR?re.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[X.storeName],function(ue,ce){ce.rows.length?W(ue,se):ja(ue,X,function(){ue.executeSql(L,Y,K,W)},W)},W):W(re,se)},W)}function Ua(I,X){var L=this;I=p(I);var Y=new f(function(K,W){L.ready().then(function(){var re=L._dbInfo;re.db.transaction(function(se){Dr(se,re,"SELECT * FROM "+re.storeName+" WHERE key = ? LIMIT 1",[I],function(ue,ce){var me=ce.rows.length?ce.rows.item(0).value:null;me&&(me=re.serializer.deserialize(me)),K(me)},function(ue,ce){W(ce)})})}).catch(W)});return h(Y,X),Y}function ki(I,X){var L=this,Y=new f(function(K,W){L.ready().then(function(){var re=L._dbInfo;re.db.transaction(function(se){Dr(se,re,"SELECT * FROM "+re.storeName,[],function(ue,ce){for(var me=ce.rows,Pe=me.length,ze=0;ze0){re(rn.apply(K,[I,ue,L,Y-1]));return}se(ze)}})})}).catch(se)});return h(W,L),W}function pa(I,X,L){return rn.apply(this,[I,X,L,1])}function $a(I,X){var L=this;I=p(I);var Y=new f(function(K,W){L.ready().then(function(){var re=L._dbInfo;re.db.transaction(function(se){Dr(se,re,"DELETE FROM "+re.storeName+" WHERE key = ?",[I],function(){K()},function(ue,ce){W(ce)})})}).catch(W)});return h(Y,X),Y}function bu(I){var X=this,L=new f(function(Y,K){X.ready().then(function(){var W=X._dbInfo;W.db.transaction(function(re){Dr(re,W,"DELETE FROM "+W.storeName,[],function(){Y()},function(se,ue){K(ue)})})}).catch(K)});return h(L,I),L}function Mi(I){var X=this,L=new f(function(Y,K){X.ready().then(function(){var W=X._dbInfo;W.db.transaction(function(re){Dr(re,W,"SELECT COUNT(key) as c FROM "+W.storeName,[],function(se,ue){var ce=ue.rows.item(0).c;Y(ce)},function(se,ue){K(ue)})})}).catch(K)});return h(L,I),L}function Zf(I,X){var L=this,Y=new f(function(K,W){L.ready().then(function(){var re=L._dbInfo;re.db.transaction(function(se){Dr(se,re,"SELECT key FROM "+re.storeName+" WHERE id = ? LIMIT 1",[I+1],function(ue,ce){var me=ce.rows.length?ce.rows.item(0).key:null;K(me)},function(ue,ce){W(ce)})})}).catch(W)});return h(Y,X),Y}function Fi(I){var X=this,L=new f(function(Y,K){X.ready().then(function(){var W=X._dbInfo;W.db.transaction(function(re){Dr(re,W,"SELECT key FROM "+W.storeName,[],function(se,ue){for(var ce=[],me=0;me '__WebKitDatabaseInfoTable__'",[],function(K,W){for(var re=[],se=0;se0}function Z3(I){var X=this,L={};if(I)for(var Y in I)L[Y]=I[Y];return L.keyPrefix=AE(I,X._defaultConfig),K3()?(X._dbInfo=L,L.serializer=Xn,f.resolve()):f.reject()}function Q3(I){var X=this,L=X.ready().then(function(){for(var Y=X._dbInfo.keyPrefix,K=localStorage.length-1;K>=0;K--){var W=localStorage.key(K);W.indexOf(Y)===0&&localStorage.removeItem(W)}});return h(L,I),L}function J3(I,X){var L=this;I=p(I);var Y=L.ready().then(function(){var K=L._dbInfo,W=localStorage.getItem(K.keyPrefix+I);return W&&(W=K.serializer.deserialize(W)),W});return h(Y,X),Y}function eB(I,X){var L=this,Y=L.ready().then(function(){for(var K=L._dbInfo,W=K.keyPrefix,re=W.length,se=localStorage.length,ue=1,ce=0;ce=0;re--){var se=localStorage.key(re);se.indexOf(W)===0&&localStorage.removeItem(se)}}):K=f.reject("Invalid arguments"),h(K,X),K}var sB={_driver:"localStorageWrapper",_initStorage:Z3,_support:H3(),iterate:eB,getItem:J3,setItem:aB,removeItem:iB,clear:Q3,length:nB,key:tB,keys:rB,dropInstance:oB},lB=function(X,L){return X===L||typeof X=="number"&&typeof L=="number"&&isNaN(X)&&isNaN(L)},uB=function(X,L){for(var Y=X.length,K=0;K"u"?"undefined":a(L))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var Y in L){if(Y==="storeName"&&(L[Y]=L[Y].replace(/\W/g,"_")),Y==="version"&&typeof L[Y]!="number")return new Error("Database version must be a number.");this._config[Y]=L[Y]}return"driver"in L&&L.driver?this.setDriver(this._config.driver):!0}else return typeof L=="string"?this._config[L]:this._config},I.prototype.defineDriver=function(L,Y,K){var W=new f(function(re,se){try{var ue=L._driver,ce=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!L._driver){se(ce);return}for(var me=vm.concat("_initStorage"),Pe=0,ze=me.length;Pe"u"}function GX(t){return t!==null&&!U0(t)&&t.constructor!==null&&!U0(t.constructor)&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function XX(t){return Os.call(t)==="[object ArrayBuffer]"}function zX(t){return typeof FormData<"u"&&t instanceof FormData}function WX(t){var e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&t.buffer instanceof ArrayBuffer,e}function YX(t){return typeof t=="string"}function HX(t){return typeof t=="number"}function yk(t){return t!==null&&typeof t=="object"}function id(t){if(Os.call(t)!=="[object Object]")return!1;var e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function qX(t){return Os.call(t)==="[object Date]"}function KX(t){return Os.call(t)==="[object File]"}function ZX(t){return Os.call(t)==="[object Blob]"}function _k(t){return Os.call(t)==="[object Function]"}function QX(t){return yk(t)&&_k(t.pipe)}function JX(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}function ez(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function tz(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function Ab(t,e){if(!(t===null||typeof t>"u"))if(typeof t!="object"&&(t=[t]),Tb(t))for(var r=0,n=t.length;r"u"||(js.isArray(u)?l=l+"[]":u=[u],js.forEach(u,function(f){js.isDate(f)?f=f.toISOString():js.isObject(f)&&(f=JSON.stringify(f)),a.push(FA(l)+"="+FA(f))}))}),i=a.join("&")}if(i){var o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e},iz=Vn;function ev(){this.handlers=[]}ev.prototype.use=function(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1};ev.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)};ev.prototype.forEach=function(e){iz.forEach(this.handlers,function(n){n!==null&&e(n)})};var az=ev,oz=Vn,sz=function(e,r){oz.forEach(e,function(i,a){a!==r&&a.toUpperCase()===r.toUpperCase()&&(e[r]=i,delete e[a])})},bk=function(e,r,n,i,a){return e.config=r,n&&(e.code=n),e.request=i,e.response=a,e.isAxiosError=!0,e.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}},e},Zm,NA;function Sk(){if(NA)return Zm;NA=1;var t=bk;return Zm=function(r,n,i,a,o){var s=new Error(r);return t(s,n,i,a,o)},Zm}var Qm,LA;function lz(){if(LA)return Qm;LA=1;var t=Sk();return Qm=function(r,n,i){var a=i.config.validateStatus;!i.status||!a||a(i.status)?r(i):n(t("Request failed with status code "+i.status,i.config,null,i.request,i))},Qm}var Jm,DA;function uz(){if(DA)return Jm;DA=1;var t=Vn;return Jm=t.isStandardBrowserEnv()?function(){return{write:function(n,i,a,o,s,u){var l=[];l.push(n+"="+encodeURIComponent(i)),t.isNumber(a)&&l.push("expires="+new Date(a).toGMTString()),t.isString(o)&&l.push("path="+o),t.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(){}}}(),Jm}var eg,BA;function cz(){return BA||(BA=1,eg=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}),eg}var tg,jA;function fz(){return jA||(jA=1,tg=function(e,r){return r?e.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):e}),tg}var rg,UA;function hz(){if(UA)return rg;UA=1;var t=cz(),e=fz();return rg=function(n,i){return n&&!t(i)?e(n,i):i},rg}var ng,$A;function dz(){if($A)return ng;$A=1;var t=Vn,e=["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 ng=function(n){var i={},a,o,s;return n&&t.forEach(n.split(` -`),function(l){if(s=l.indexOf(":"),a=t.trim(l.substr(0,s)).toLowerCase(),o=t.trim(l.substr(s+1)),a){if(i[a]&&e.indexOf(a)>=0)return;a==="set-cookie"?i[a]=(i[a]?i[a]:[]).concat([o]):i[a]=i[a]?i[a]+", "+o:o}}),i},ng}var ig,VA;function pz(){if(VA)return ig;VA=1;var t=Vn;return ig=t.isStandardBrowserEnv()?function(){var r=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),i;function a(o){var s=o;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=a(window.location.href),function(s){var u=t.isString(s)?a(s):s;return u.protocol===i.protocol&&u.host===i.host}}():function(){return function(){return!0}}(),ig}var ag,GA;function tv(){if(GA)return ag;GA=1;function t(e){this.message=e}return t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,ag=t,ag}var og,XA;function zA(){if(XA)return og;XA=1;var t=Vn,e=lz(),r=uz(),n=xk,i=hz(),a=dz(),o=pz(),s=Sk(),u=rv(),l=tv();return og=function(f){return new Promise(function(d,p){var v=f.data,g=f.headers,m=f.responseType,y;function _(){f.cancelToken&&f.cancelToken.unsubscribe(y),f.signal&&f.signal.removeEventListener("abort",y)}t.isFormData(v)&&delete g["Content-Type"];var b=new XMLHttpRequest;if(f.auth){var x=f.auth.username||"",S=f.auth.password?unescape(encodeURIComponent(f.auth.password)):"";g.Authorization="Basic "+btoa(x+":"+S)}var w=i(f.baseURL,f.url);b.open(f.method.toUpperCase(),n(w,f.params,f.paramsSerializer),!0),b.timeout=f.timeout;function T(){if(b){var A="getAllResponseHeaders"in b?a(b.getAllResponseHeaders()):null,O=!m||m==="text"||m==="json"?b.responseText:b.response,P={data:O,status:b.status,statusText:b.statusText,headers:A,config:f,request:b};e(function(k){d(k),_()},function(k){p(k),_()},P),b=null}}if("onloadend"in b?b.onloadend=T:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(T)},b.onabort=function(){b&&(p(s("Request aborted",f,"ECONNABORTED",b)),b=null)},b.onerror=function(){p(s("Network Error",f,null,b)),b=null},b.ontimeout=function(){var O=f.timeout?"timeout of "+f.timeout+"ms exceeded":"timeout exceeded",P=f.transitional||u.transitional;f.timeoutErrorMessage&&(O=f.timeoutErrorMessage),p(s(O,f,P.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",b)),b=null},t.isStandardBrowserEnv()){var E=(f.withCredentials||o(w))&&f.xsrfCookieName?r.read(f.xsrfCookieName):void 0;E&&(g[f.xsrfHeaderName]=E)}"setRequestHeader"in b&&t.forEach(g,function(O,P){typeof v>"u"&&P.toLowerCase()==="content-type"?delete g[P]:b.setRequestHeader(P,O)}),t.isUndefined(f.withCredentials)||(b.withCredentials=!!f.withCredentials),m&&m!=="json"&&(b.responseType=f.responseType),typeof f.onDownloadProgress=="function"&&b.addEventListener("progress",f.onDownloadProgress),typeof f.onUploadProgress=="function"&&b.upload&&b.upload.addEventListener("progress",f.onUploadProgress),(f.cancelToken||f.signal)&&(y=function(A){b&&(p(!A||A&&A.type?new l("canceled"):A),b.abort(),b=null)},f.cancelToken&&f.cancelToken.subscribe(y),f.signal&&(f.signal.aborted?y():f.signal.addEventListener("abort",y))),v||(v=null),b.send(v)})},og}var sg,WA;function rv(){if(WA)return sg;WA=1;var t=Vn,e=sz,r=bk,n={"Content-Type":"application/x-www-form-urlencoded"};function i(u,l){!t.isUndefined(u)&&t.isUndefined(u["Content-Type"])&&(u["Content-Type"]=l)}function a(){var u;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(u=zA()),u}function o(u,l,c){if(t.isString(u))try{return(l||JSON.parse)(u),t.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:a(),transformRequest:[function(l,c){return e(c,"Accept"),e(c,"Content-Type"),t.isFormData(l)||t.isArrayBuffer(l)||t.isBuffer(l)||t.isStream(l)||t.isFile(l)||t.isBlob(l)?l:t.isArrayBufferView(l)?l.buffer:t.isURLSearchParams(l)?(i(c,"application/x-www-form-urlencoded;charset=utf-8"),l.toString()):t.isObject(l)||c&&c["Content-Type"]==="application/json"?(i(c,"application/json"),o(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&&t.isString(l)&&l.length)try{return JSON.parse(l)}catch(p){if(d)throw p.name==="SyntaxError"?r(p,this,"E_JSON_PARSE"):p}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 t.forEach(["delete","get","head"],function(l){s.headers[l]={}}),t.forEach(["post","put","patch"],function(l){s.headers[l]=t.merge(n)}),sg=s,sg}var vz=Vn,mz=rv(),gz=function(e,r,n){var i=this||mz;return vz.forEach(n,function(o){e=o.call(i,e,r)}),e},lg,YA;function wk(){return YA||(YA=1,lg=function(e){return!!(e&&e.__CANCEL__)}),lg}var HA=Vn,ug=gz,yz=wk(),_z=rv(),xz=tv();function cg(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new xz("canceled")}var bz=function(e){cg(e),e.headers=e.headers||{},e.data=ug.call(e,e.data,e.headers,e.transformRequest),e.headers=HA.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),HA.forEach(["delete","get","head","post","put","patch","common"],function(i){delete e.headers[i]});var r=e.adapter||_z.adapter;return r(e).then(function(i){return cg(e),i.data=ug.call(e,i.data,i.headers,e.transformResponse),i},function(i){return yz(i)||(cg(e),i&&i.response&&(i.response.data=ug.call(e,i.response.data,i.response.headers,e.transformResponse))),Promise.reject(i)})},kn=Vn,Ek=function(e,r){r=r||{};var n={};function i(c,f){return kn.isPlainObject(c)&&kn.isPlainObject(f)?kn.merge(c,f):kn.isPlainObject(f)?kn.merge({},f):kn.isArray(f)?f.slice():f}function a(c){if(kn.isUndefined(r[c])){if(!kn.isUndefined(e[c]))return i(void 0,e[c])}else return i(e[c],r[c])}function o(c){if(!kn.isUndefined(r[c]))return i(void 0,r[c])}function s(c){if(kn.isUndefined(r[c])){if(!kn.isUndefined(e[c]))return i(void 0,e[c])}else return i(void 0,r[c])}function u(c){if(c in r)return i(e[c],r[c]);if(c in e)return i(void 0,e[c])}var l={url:o,method:o,data:o,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 kn.forEach(Object.keys(e).concat(Object.keys(r)),function(f){var h=l[f]||a,d=h(f);kn.isUndefined(d)&&h!==u||(n[f]=d)}),n},fg,qA;function Tk(){return qA||(qA=1,fg={version:"0.24.0"}),fg}var Sz=Tk().version,Cb={};["object","boolean","number","function","string","symbol"].forEach(function(t,e){Cb[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});var KA={};Cb.transitional=function(e,r,n){function i(a,o){return"[Axios v"+Sz+"] Transitional option '"+a+"'"+o+(n?". "+n:"")}return function(a,o,s){if(e===!1)throw new Error(i(o," has been removed"+(r?" in "+r:"")));return r&&!KA[o]&&(KA[o]=!0,console.warn(i(o," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(a,o,s):!0}};function wz(t,e,r){if(typeof t!="object")throw new TypeError("options must be an object");for(var n=Object.keys(t),i=n.length;i-- >0;){var a=n[i],o=e[a];if(o){var s=t[a],u=s===void 0||o(s,a,t);if(u!==!0)throw new TypeError("option "+a+" must be "+u);continue}if(r!==!0)throw Error("Unknown option "+a)}}var Ez={assertOptions:wz,validators:Cb},Ak=Vn,Tz=xk,ZA=az,QA=bz,nv=Ek,Ck=Ez,Us=Ck.validators;function Df(t){this.defaults=t,this.interceptors={request:new ZA,response:new ZA}}Df.prototype.request=function(e){typeof e=="string"?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=nv(this.defaults,e),e.method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var r=e.transitional;r!==void 0&&Ck.assertOptions(r,{silentJSONParsing:Us.transitional(Us.boolean),forcedJSONParsing:Us.transitional(Us.boolean),clarifyTimeoutError:Us.transitional(Us.boolean)},!1);var n=[],i=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(e)===!1||(i=i&&h.synchronous,n.unshift(h.fulfilled,h.rejected))});var a=[];this.interceptors.response.forEach(function(h){a.push(h.fulfilled,h.rejected)});var o;if(!i){var s=[QA,void 0];for(Array.prototype.unshift.apply(s,n),s=s.concat(a),o=Promise.resolve(e);s.length;)o=o.then(s.shift(),s.shift());return o}for(var u=e;n.length;){var l=n.shift(),c=n.shift();try{u=l(u)}catch(f){c(f);break}}try{o=QA(u)}catch(f){return Promise.reject(f)}for(;a.length;)o=o.then(a.shift(),a.shift());return o};Df.prototype.getUri=function(e){return e=nv(this.defaults,e),Tz(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")};Ak.forEach(["delete","get","head","options"],function(e){Df.prototype[e]=function(r,n){return this.request(nv(n||{},{method:e,url:r,data:(n||{}).data}))}});Ak.forEach(["post","put","patch"],function(e){Df.prototype[e]=function(r,n,i){return this.request(nv(i||{},{method:e,url:r,data:n}))}});var Az=Df,hg,JA;function Cz(){if(JA)return hg;JA=1;var t=tv();function e(r){if(typeof r!="function")throw new TypeError("executor must be a function.");var n;this.promise=new Promise(function(o){n=o});var i=this;this.promise.then(function(a){if(i._listeners){var o,s=i._listeners.length;for(o=0;o{o.trace("Logged to cloud.",void 0,!1)}).catch(s=>{o.error("Logging to cloud failed!",void 0,!1)})}clog(e,r,n,i,a,o){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,"["+a.toLocaleString()+"]","",e),r&&(console.log(r),console.log("------------------------"))),o===void 0&&this.upload(e,r,n,a),o!==void 0&&o&&this.upload(e,r,n,a)}trace(e,r,n){const i=new Date,a="TRACE",o="#005CAF";this.clog(e,r,a,o,i,n)}debug(e,r,n){const i=new Date,a="DEBUG",o="#0089A7";this.clog(e,r,a,o,i,n)}info(e,r,n){const i=new Date,a="INFO",o="#00896C";this.clog(e,r,a,o,i,n)}warn(e,r,n){const i=new Date,a="WARN",o="#DDA52D";this.clog(e,r,a,o,i,n)}error(e,r,n){const i=new Date,a="ERROR",o="#AB3B3A";this.clog(e,r,a,o,i,n)}fatal(e,r,n){const i=new Date,a="FATAL",o="#E16B8C";this.clog(e,r,a,o,i,n)}}var Dz=Lz;const Bz=Rn(Dz),Se=new Bz,jz={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 Save",save:"Save",load:"Load",options:"Options",title:"Title",titleTips:"Confirm return to the title screen"}},extra:{title:"EXTRA"}},Uz={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:{textSpeed:{title:"テキスト表示速度",options:{slow:"遅く",medium:"標準",fast:"速く"}},textSize:{title:"テキストサイズ",options:{small:"小",medium:"中",large:"大"}},textFont:{title:"フォント",options:{siYuanSimSun:"源ノ明朝",SimHei:"黒体",lxgw:"霞鴎文隷"}},textboxOpacity:{title:"Textbox Opacity"},textPreview:{title:"テキスト表示プレビュー",text:"プレビューはテキストボックスのテキストサイズとテキスト表示速度です。上記のオプションでフォントも変更できます。"}}},sound:{title:"サウンド",options:{volumeMain:{title:"MAIN 音量"},vocalVolume:{title:"VOICE 音量"},bgmVolume:{title:"BGM 音量"},seVolume:{title:"SE 音量"},uiSeVolume:{title:"UI 効果音音量"}}}}},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:"鑑賞モード"}},$z={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:"鉴赏模式"}},Vz={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"}},Gz={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"}},Xz={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:{textSpeed:{title:"文字顯示速度",options:{slow:"慢",medium:"中",fast:"快"}},textSize:{title:"文字大小",options:{small:"小",medium:"中",large:"大"}},textFont:{title:"文字字體",options:{siYuanSimSun:"霞鹜文楷",SimHei:"黑體"}},textboxOpacity:{title:"文本框不透明度"},textPreview:{title:"文字顯示預覽",text:"現在預覽的是文字框字體大小和播放速度的情況,您可以根據您的觀感調整上面的選項。"}}},sound:{title:"音量",options:{volumeMain:{title:"主音量"},vocalVolume:{title:"語音音量"},bgmVolume:{title:"背景音樂音量"},seVolume:{title:"音效音量"},uiSeVolume:{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 Rs=(t=>(t[t.zhCn=0]="zhCn",t[t.en=1]="en",t[t.jp=2]="jp",t[t.fr=3]="fr",t[t.de=4]="de",t[t.zhTw=5]="zhTw",t))(Rs||{});const Jd={zhCn:"中文",en:"English",jp:"日本語",fr:"Français",de:"Deutsch",zhTw:"繁體中文"},zz={en:{translation:jz},zhCn:{translation:$z},jp:{translation:Uz},fr:{translation:Vz},de:{translation:Gz},zhTw:{translation:Xz}},Wz=0;var fn=(t=>(t[t.slow=0]="slow",t[t.normal=1]="normal",t[t.fast=2]="fast",t))(fn||{}),_i=(t=>(t[t.small=0]="small",t[t.medium=1]="medium",t[t.large=2]="large",t))(_i||{}),Ki=(t=>(t[t.song=0]="song",t[t.hei=1]="hei",t[t.lxgw=2]="lxgw",t))(Ki||{}),zc=(t=>(t[t.yes=0]="yes",t[t.no=1]="no",t))(zc||{}),Zi=(t=>(t[t.on=0]="on",t[t.off=1]="off",t))(Zi||{});const Ok={slPage:1,volumeMain:100,textSpeed:fn.normal,autoSpeed:fn.normal,textSize:_i.medium,vocalVolume:100,bgmVolume:25,seVolume:100,uiSeVolume:50,textboxFont:Ki.song,textboxOpacity:75,language:Rs.zhCn,voiceInterruption:zc.yes,fullScreen:Zi.off},V0={optionData:Ok,globalGameVar:{},appreciationData:{bgm:[],cg:[]}},Rk=zp({name:"userData",initialState:ar(V0),reducers:{setUserData:(t,e)=>{const{key:r,value:n}=e.payload;t[r]=n},unlockCgInUserData:(t,e)=>{const{name:r,url:n,series:i}=e.payload;let a=!1;t.appreciationData.cg.forEach(o=>{n===o.url&&(a=!0,o.url=n,o.series=i)}),a||t.appreciationData.cg.push(e.payload)},unlockBgmInUserData:(t,e)=>{const{name:r,url:n,series:i}=e.payload;let a=!1;t.appreciationData.bgm.forEach(o=>{n===o.url&&(a=!0,o.url=n,o.series=i)}),a||t.appreciationData.bgm.push(e.payload)},resetUserData:(t,e)=>{Object.assign(t,e.payload)},setOptionData:(t,e)=>{const{key:r,value:n}=e.payload;t.optionData[r]=n},setGlobalVar:(t,e)=>{t.globalGameVar[e.payload.key]=e.payload.value},setSlPage:(t,e)=>{t.optionData.slPage=e.payload},resetOptionSet(t){Object.assign(t.optionData,Ok)},resetAllData(t){Object.assign(t,ar(V0))}}}),{setUserData:jSe,resetUserData:Pb,setOptionData:At,setGlobalVar:Yz,setSlPage:Ik,unlockCgInUserData:kk,unlockBgmInUserData:Mk,resetOptionSet:Hz,resetAllData:qz}=Rk.actions,Kz=Rk.reducer,Fk={backlog_size:200,fast_timeout:50},Zz={textInitialDelay:80};class Qz{constructor(e){Ce(this,"isSaveBacklogNext",!1);Ce(this,"backlog",[]);Ce(this,"sceneManager");this.sceneManager=e}getBacklog(){return this.backlog}editLastBacklogItemEffect(e){this.backlog[this.backlog.length-1].currentStageState.effects=e}makeBacklogEmpty(){this.backlog.splice(0,this.backlog.length)}insertBacklogItem(e){this.backlog.push(e)}saveCurrentStateToBacklog(){const e=te.getState().stage,r=ar(e);r.PerformList.forEach(i=>{i.script.args.forEach(a=>{a.key==="concat"&&(a.value=!1,i.script.content=r.showText)})});const n={currentStageState:r,saveScene:{currentSentenceId:this.sceneManager.sceneData.currentSentenceId,sceneStack:ar(this.sceneManager.sceneData.sceneStack),sceneName:this.sceneManager.sceneData.currentScene.sceneName,sceneUrl:this.sceneManager.sceneData.currentScene.sceneUrl}};for(this.getBacklog().push(n);this.getBacklog().length>Fk.backlog_size;)this.getBacklog().shift()}}const nC={currentSentenceId:0,sceneStack:[],currentScene:{sceneName:"",sceneUrl:"",sentenceList:[],assetsList:[],subSceneList:[]}};class Jz{constructor(){Ce(this,"settledScenes",[]);Ce(this,"settledAssets",[]);Ce(this,"sceneData",ar(nC))}resetScene(){this.sceneData.currentSentenceId=0,this.sceneData.sceneStack=[],this.sceneData.currentScene=ar(nC.currentScene)}}class eW{constructor(){Ce(this,"nextEnterAnimationName",new Map);Ce(this,"nextExitAnimationName",new Map);Ce(this,"animations",[])}addAnimation(e){this.animations.push(e)}getAnimations(){return this.animations}}const tW={performName:"",duration:100,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0};var Fn=(t=>(t[t.background=0]="background",t[t.bgm=1]="bgm",t[t.figure=2]="figure",t[t.scene=3]="scene",t[t.tex=4]="tex",t[t.vocal=5]="vocal",t[t.video=6]="video",t))(Fn||{});const Nn=(t,e)=>{if(t.match("http://")||t.match("https://"))return t;{let r;switch(e){case 0:r=`./game/background/${t}`;break;case 3:r=`./game/scene/${t}`;break;case 5:r=`./game/vocal/${t}`;break;case 2:r=`./game/figure/${t}`;break;case 1:r=`./game/bgm/${t}`;break;case 6:r=`./game/video/${t}`;break;default:r="";break}return r}},rW=t=>{for(const e of t){let r=!0;if(D.sceneManager.settledAssets.forEach(n=>{n===e.url&&(r=!1)}),!r)Se.warn("该资源已在预加载列表中,无需重复加载");else{const n=document.createElement("link");n.setAttribute("rel","prefetch"),n.setAttribute("href",e.url);const i=document.getElementsByTagName("head");i.length&&i[0].appendChild(n),D.sceneManager.settledAssets.push(e.url)}}};var Te;(function(t){t[t.say=0]="say",t[t.changeBg=1]="changeBg",t[t.changeFigure=2]="changeFigure",t[t.bgm=3]="bgm",t[t.video=4]="video",t[t.pixi=5]="pixi",t[t.pixiInit=6]="pixiInit",t[t.intro=7]="intro",t[t.miniAvatar=8]="miniAvatar",t[t.changeScene=9]="changeScene",t[t.choose=10]="choose",t[t.end=11]="end",t[t.setComplexAnimation=12]="setComplexAnimation",t[t.setFilter=13]="setFilter",t[t.label=14]="label",t[t.jumpLabel=15]="jumpLabel",t[t.chooseLabel=16]="chooseLabel",t[t.setVar=17]="setVar",t[t.if=18]="if",t[t.callScene=19]="callScene",t[t.showVars=20]="showVars",t[t.unlockCg=21]="unlockCg",t[t.unlockBgm=22]="unlockBgm",t[t.filmMode=23]="filmMode",t[t.setTextbox=24]="setTextbox",t[t.setAnimation=25]="setAnimation",t[t.playEffect=26]="playEffect",t[t.setTempAnimation=27]="setTempAnimation",t[t.comment=28]="comment",t[t.setTransform=29]="setTransform",t[t.setTransition=30]="setTransition",t[t.getUserInput=31]="getUserInput"})(Te||(Te={}));const iC=(t,e,r)=>{let n={type:Te.say,additionalArgs:[]};const i=nW(t,e,r);return n.type=i,i===Te.say&&t!=="say"&&n.additionalArgs.push({key:"speaker",value:t}),n=iW(n,i,e),n};function nW(t,e,r){const n=new Map;return r.forEach(i=>{n.set(i.scriptString,i.scriptType)}),n.has(t)?n.get(t):Te.say}function iW(t,e,r){return r.includes(e)&&t.additionalArgs.push({key:"next",value:!0}),t}var er;(function(t){t[t.background=0]="background",t[t.bgm=1]="bgm",t[t.figure=2]="figure",t[t.scene=3]="scene",t[t.tex=4]="tex",t[t.vocal=5]="vocal",t[t.video=6]="video"})(er||(er={}));function Nk(t,e){const r=[];let i=t.replace(/ /g," ").split(" -");return i=i.filter(a=>a!==""),i.forEach(a=>{const o=a.indexOf("=");let s=a.slice(0,o),u=a.slice(o+1);o<0&&(s=a,u=void 0),s.toLowerCase().match(/.ogg|.mp3|.wav/)?r.push({key:"vocal",value:e(a,er.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}const aW=(t,e,r)=>{if(t==="none"||t==="")return"";switch(e){case Te.playEffect:return r(t,er.vocal);case Te.changeBg:return r(t,er.background);case Te.changeFigure:return r(t,er.figure);case Te.bgm:return r(t,er.bgm);case Te.callScene:return r(t,er.scene);case Te.changeScene:return r(t,er.scene);case Te.miniAvatar:return r(t,er.figure);case Te.video:return r(t,er.video);case Te.choose:return oW(t,r);case Te.unlockBgm:return r(t,er.bgm);case Te.unlockCg:return r(t,er.background);default:return t}};function oW(t,e){const r=t.split("|"),n=[],i=[];for(const s of r)n.push(s.split(":")[0]??""),i.push(s.split(":")[1]??"");const a=i.map(s=>s.match(/\./)?e(s,er.scene):s);let o="";for(let s=0;s{const n=[];return t===Te.say&&r.forEach(i=>{i.key==="vocal"&&n.push({name:i.value,url:i.value,lineNumber:0,type:er.vocal})}),e==="none"||e===""||(t===Te.changeBg&&n.push({name:e,url:e,lineNumber:0,type:er.background}),t===Te.changeFigure&&n.push({name:e,url:e,lineNumber:0,type:er.figure}),t===Te.miniAvatar&&n.push({name:e,url:e,lineNumber:0,type:er.figure}),t===Te.video&&n.push({name:e,url:e,lineNumber:0,type:er.video}),t===Te.bgm&&n.push({name:e,url:e,lineNumber:0,type:er.bgm})),n},lW=(t,e)=>{const r=[];return(t===Te.changeScene||t===Te.callScene)&&r.push(e),t===Te.choose&&e.split("|").map(a=>a.split(":")[1]??"").forEach(a=>{a.match(/\./)&&r.push(a)}),r},uW=(t,e,r,n)=>{let i,a,o;const s=[];let u,l,c,f=t.split(";")[0];if(f==="")return{command:Te.comment,commandRaw:"comment",content:t.split(";")[1]??"",args:[{key:"next",value:!0}],sentenceAssets:[],subScene:[]};const h=/:/.exec(f);if(h===null){c=f,l=iC(c,r,n),i=l.type;for(const p of l.additionalArgs)i===Te.say&&p.key==="speaker"||s.push(p)}else{c=f.substring(0,h.index),f=f.substring(h.index+1,f.length),l=iC(c,r,n),i=l.type;for(const p of l.additionalArgs)s.push(p)}const d=/ -/.exec(f);if(d){const p=f.substring(d.index,t.length);f=f.substring(0,d.index);for(const v of Nk(p,e))s.push(v)}return a=aW(f,i,e),u=sW(i,a,s),o=lW(i,a),{command:i,commandRaw:c,content:a,args:s,sentenceAssets:u,subScene:o}};var hh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},cW=typeof hh=="object"&&hh&&hh.Object===Object&&hh,fW=cW,hW=fW,dW=typeof self=="object"&&self&&self.Object===Object&&self,pW=hW||dW||Function("return this")(),iv=pW,vW=iv,mW=vW.Symbol,Lk=mW,aC=Lk,Dk=Object.prototype,gW=Dk.hasOwnProperty,yW=Dk.toString,Du=aC?aC.toStringTag:void 0;function _W(t){var e=gW.call(t,Du),r=t[Du];try{t[Du]=void 0;var n=!0}catch{}var i=yW.call(t);return n&&(e?t[Du]=r:delete t[Du]),i}var xW=_W,bW=Object.prototype,SW=bW.toString;function wW(t){return SW.call(t)}var EW=wW,oC=Lk,TW=xW,AW=EW,CW="[object Null]",PW="[object Undefined]",sC=oC?oC.toStringTag:void 0;function OW(t){return t==null?t===void 0?PW:CW:sC&&sC in Object(t)?TW(t):AW(t)}var RW=OW;function IW(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Bk=IW,kW=RW,MW=Bk,FW="[object AsyncFunction]",NW="[object Function]",LW="[object GeneratorFunction]",DW="[object Proxy]";function BW(t){if(!MW(t))return!1;var e=kW(t);return e==NW||e==LW||e==FW||e==DW}var jW=BW,UW=iv,$W=UW["__core-js_shared__"],VW=$W,vg=VW,lC=function(){var t=/[^.]+$/.exec(vg&&vg.keys&&vg.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function GW(t){return!!lC&&lC in t}var XW=GW,zW=Function.prototype,WW=zW.toString;function YW(t){if(t!=null){try{return WW.call(t)}catch{}try{return t+""}catch{}}return""}var HW=YW,qW=jW,KW=XW,ZW=Bk,QW=HW,JW=/[\\^$.*+?()[\]{}|]/g,eY=/^\[object .+?Constructor\]$/,tY=Function.prototype,rY=Object.prototype,nY=tY.toString,iY=rY.hasOwnProperty,aY=RegExp("^"+nY.call(iY).replace(JW,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function oY(t){if(!ZW(t)||KW(t))return!1;var e=qW(t)?aY:eY;return e.test(QW(t))}var sY=oY;function lY(t,e){return t==null?void 0:t[e]}var uY=lY,cY=sY,fY=uY;function hY(t,e){var r=fY(t,e);return cY(r)?r:void 0}var Ob=hY,dY=Ob,pY=dY(Object,"create"),av=pY,uC=av;function vY(){this.__data__=uC?uC(null):{},this.size=0}var mY=vY;function gY(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var yY=gY,_Y=av,xY="__lodash_hash_undefined__",bY=Object.prototype,SY=bY.hasOwnProperty;function wY(t){var e=this.__data__;if(_Y){var r=e[t];return r===xY?void 0:r}return SY.call(e,t)?e[t]:void 0}var EY=wY,TY=av,AY=Object.prototype,CY=AY.hasOwnProperty;function PY(t){var e=this.__data__;return TY?e[t]!==void 0:CY.call(e,t)}var OY=PY,RY=av,IY="__lodash_hash_undefined__";function kY(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=RY&&e===void 0?IY:e,this}var MY=kY,FY=mY,NY=yY,LY=EY,DY=OY,BY=MY;function lu(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e-1}var rH=tH,nH=ov;function iH(t,e){var r=this.__data__,n=nH(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var aH=iH,oH=$Y,sH=KY,lH=JY,uH=rH,cH=aH;function uu(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e-1}var cq=uq;function fq(t,e,r){for(var n=-1,i=t==null?0:t.length;++n=Mq){var l=e?null:Iq(t);if(l)return kq(l);o=!1,i=Rq,u=new Cq}else u=e?[]:s;e:for(;++n{const u=t.split(` -`);let l=[],c=[];const f=u.map(h=>{const d=uW(h,i,a,o);return l=[...l,...d.sentenceAssets],c=[...c,...d.subScene],d});return l=Bq(l),n(l),{sceneName:e,sceneUrl:r,sentenceList:f,assetsList:l,subSceneList:c}};Te.intro,Te.changeBg,Te.changeFigure,Te.miniAvatar,Te.changeScene,Te.choose,Te.end,Te.bgm,Te.video,Te.setComplexAnimation,Te.setFilter,Te.pixiInit,Te.pixi,Te.label,Te.jumpLabel,Te.setVar,Te.callScene,Te.showVars,Te.unlockCg,Te.unlockBgm,Te.say,Te.filmMode,Te.callScene,Te.setTextbox,Te.setAnimation,Te.playEffect;Te.bgm,Te.pixi,Te.pixiInit,Te.label,Te.if,Te.miniAvatar,Te.setVar,Te.unlockBgm,Te.unlockCg,Te.filmMode,Te.playEffect;function Uq(t){const e=[];let r,n=t.split(";")[0];if(n==="")return{command:"",args:[],options:[]};const i=/:/.exec(n);i===null?r="":(r=n.substring(0,i.index),n=n.substring(i.index+1,n.length));const a=/ -/.exec(n);if(a){const o=n.substring(a.index,n.length);n=n.substring(0,a.index);for(const s of Nk(o,(u,l)=>u))e.push(s)}return{command:r,args:n.split("|").map(o=>o.trim()).filter(o=>o!==""),options:e}}function $q(t){return t.replaceAll("\r","").split(` +*/(function(t,e){(function(r){t.exports=r()})(function(){return function r(n,i,a){function o(l,c){if(!i[l]){if(!n[l]){var f=typeof fh=="function"&&fh;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(p){var v=n[l][1][p];return o(v||p)},d,d.exports,r,n,i,a)}return i[l].exports}for(var s=typeof fh=="function"&&fh,u=0;u"u"&&r(3);var f=Promise;function h(I,X){X&&I.then(function(L){X(null,L)},function(L){X(L)})}function d(I,X,L){typeof X=="function"&&I.then(X),typeof L=="function"&&I.catch(L)}function p(I){return typeof I!="string"&&(console.warn(I+" used as a key, but it is not a string."),I=String(I)),I}function v(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var g="local-forage-detect-blob-support",m=void 0,y={},_=Object.prototype.toString,b="readonly",x="readwrite";function S(I){for(var X=I.length,L=new ArrayBuffer(X),Y=new Uint8Array(L),K=0;K=43)}}).catch(function(){return!1})}function T(I){return typeof m=="boolean"?f.resolve(m):w(I).then(function(X){return m=X,m})}function E(I){var X=y[I.name],L={};L.promise=new f(function(Y,K){L.resolve=Y,L.reject=K}),X.deferredOperations.push(L),X.dbReady?X.dbReady=X.dbReady.then(function(){return L.promise}):X.dbReady=L.promise}function A(I){var X=y[I.name],L=X.deferredOperations.pop();if(L)return L.resolve(),L.promise}function O(I,X){var L=y[I.name],Y=L.deferredOperations.pop();if(Y)return Y.reject(X),Y.promise}function P(I,X){return new f(function(L,Y){if(y[I.name]=y[I.name]||G(),I.db)if(X)E(I),I.db.close();else return L(I.db);var K=[I.name];X&&K.push(I.version);var W=u.open.apply(u,K);X&&(W.onupgradeneeded=function(re){var se=W.result;try{se.createObjectStore(I.storeName),re.oldVersion<=1&&se.createObjectStore(g)}catch(ue){if(ue.name==="ConstraintError")console.warn('The database "'+I.name+'" has been upgraded from version '+re.oldVersion+" to version "+re.newVersion+', but the storage "'+I.storeName+'" already exists.');else throw ue}}),W.onerror=function(re){re.preventDefault(),Y(W.error)},W.onsuccess=function(){var re=W.result;re.onversionchange=function(se){se.target.close()},L(re),A(I)}})}function F(I){return P(I,!1)}function k(I){return P(I,!0)}function B(I,X){if(!I.db)return!0;var L=!I.db.objectStoreNames.contains(I.storeName),Y=I.versionI.db.version;if(Y&&(I.version!==X&&console.warn('The database "'+I.name+`" can't be downgraded from version `+I.db.version+" to version "+I.version+"."),I.version=I.db.version),K||L){if(L){var W=I.db.version+1;W>I.version&&(I.version=W)}return!0}return!1}function U(I){return new f(function(X,L){var Y=new FileReader;Y.onerror=L,Y.onloadend=function(K){var W=btoa(K.target.result||"");X({__local_forage_encoded_blob:!0,data:W,type:I.type})},Y.readAsBinaryString(I)})}function z(I){var X=S(atob(I.data));return c([X],{type:I.type})}function J(I){return I&&I.__local_forage_encoded_blob}function Q(I){var X=this,L=X._initReady().then(function(){var Y=y[X._dbInfo.name];if(Y&&Y.dbReady)return Y.dbReady});return d(L,I,I),L}function $(I){E(I);for(var X=y[I.name],L=X.forages,Y=0;Y0&&(!I.db||W.name==="InvalidStateError"||W.name==="NotFoundError"))return f.resolve().then(function(){if(!I.db||W.name==="NotFoundError"&&!I.db.objectStoreNames.contains(I.storeName)&&I.version<=I.db.version)return I.db&&(I.version=I.db.version+1),k(I)}).then(function(){return $(I).then(function(){M(I,X,L,Y-1)})}).catch(L);L(W)}}function G(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function V(I){var X=this,L={db:null};if(I)for(var Y in I)L[Y]=I[Y];var K=y[L.name];K||(K=G(),y[L.name]=K),K.forages.push(X),X._initReady||(X._initReady=X.ready,X.ready=Q);var W=[];function re(){return f.resolve()}for(var se=0;se>4,me[K++]=(re&15)<<4|se>>2,me[K++]=(se&3)<<6|ue&63;return ce}function ct(I){var X=new Uint8Array(I),L="",Y;for(Y=0;Y>2],L+=Oe[(X[Y]&3)<<4|X[Y+1]>>4],L+=Oe[(X[Y+1]&15)<<2|X[Y+2]>>6],L+=Oe[X[Y+2]&63];return X.length%3===2?L=L.substring(0,L.length-1)+"=":X.length%3===1&&(L=L.substring(0,L.length-2)+"=="),L}function oi(I,X){var L="";if(I&&(L=da.call(I)),I&&(L==="[object ArrayBuffer]"||I.buffer&&da.call(I.buffer)==="[object ArrayBuffer]")){var Y,K=Xe;I instanceof ArrayBuffer?(Y=I,K+=wt):(Y=I.buffer,L==="[object Int8Array]"?K+=Yt:L==="[object Uint8Array]"?K+=yt:L==="[object Uint8ClampedArray]"?K+=or:L==="[object Int16Array]"?K+=Nr:L==="[object Uint16Array]"?K+=gr:L==="[object Int32Array]"?K+=sr:L==="[object Uint32Array]"?K+=Lr:L==="[object Float32Array]"?K+=yr:L==="[object Float64Array]"?K+=Ri:X(new Error("Failed to get type for BinaryArray"))),X(K+ct(Y))}else if(L==="[object Blob]"){var W=new FileReader;W.onload=function(){var re=ke+I.type+"~"+ct(this.result);X(Xe+Ut+re)},W.readAsArrayBuffer(I)}else try{X(JSON.stringify(I))}catch(re){console.error("Couldn't convert value into a JSON string: ",I),X(null,re)}}function Fo(I){if(I.substring(0,tt)!==Xe)return JSON.parse(I);var X=I.substring($t),L=I.substring(tt,$t),Y;if(L===Ut&&we.test(X)){var K=X.match(we);Y=K[1],X=X.substring(K[0].length)}var W=Ba(X);switch(L){case wt:return W;case Ut:return c([W],{type:Y});case Yt:return new Int8Array(W);case yt:return new Uint8Array(W);case or:return new Uint8ClampedArray(W);case Nr:return new Int16Array(W);case gr:return new Uint16Array(W);case sr:return new Int32Array(W);case Lr:return new Uint32Array(W);case yr:return new Float32Array(W);case Ri:return new Float64Array(W);default:throw new Error("Unkown type: "+L)}}var Xn={serialize:oi,deserialize:Fo,stringToBuffer:Ba,bufferToString:ct};function ja(I,X,L,Y){I.executeSql("CREATE TABLE IF NOT EXISTS "+X.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],L,Y)}function Ii(I){var X=this,L={db:null};if(I)for(var Y in I)L[Y]=typeof I[Y]!="string"?I[Y].toString():I[Y];var K=new f(function(W,re){try{L.db=openDatabase(L.name,String(L.version),L.description,L.size)}catch(se){return re(se)}L.db.transaction(function(se){ja(se,L,function(){X._dbInfo=L,W()},function(ue,ce){re(ce)})},re)});return L.serializer=Xn,K}function Dr(I,X,L,Y,K,W){I.executeSql(L,Y,K,function(re,se){se.code===se.SYNTAX_ERR?re.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[X.storeName],function(ue,ce){ce.rows.length?W(ue,se):ja(ue,X,function(){ue.executeSql(L,Y,K,W)},W)},W):W(re,se)},W)}function Ua(I,X){var L=this;I=p(I);var Y=new f(function(K,W){L.ready().then(function(){var re=L._dbInfo;re.db.transaction(function(se){Dr(se,re,"SELECT * FROM "+re.storeName+" WHERE key = ? LIMIT 1",[I],function(ue,ce){var me=ce.rows.length?ce.rows.item(0).value:null;me&&(me=re.serializer.deserialize(me)),K(me)},function(ue,ce){W(ce)})})}).catch(W)});return h(Y,X),Y}function ki(I,X){var L=this,Y=new f(function(K,W){L.ready().then(function(){var re=L._dbInfo;re.db.transaction(function(se){Dr(se,re,"SELECT * FROM "+re.storeName,[],function(ue,ce){for(var me=ce.rows,Pe=me.length,ze=0;ze0){re(rn.apply(K,[I,ue,L,Y-1]));return}se(ze)}})})}).catch(se)});return h(W,L),W}function pa(I,X,L){return rn.apply(this,[I,X,L,1])}function $a(I,X){var L=this;I=p(I);var Y=new f(function(K,W){L.ready().then(function(){var re=L._dbInfo;re.db.transaction(function(se){Dr(se,re,"DELETE FROM "+re.storeName+" WHERE key = ?",[I],function(){K()},function(ue,ce){W(ce)})})}).catch(W)});return h(Y,X),Y}function bu(I){var X=this,L=new f(function(Y,K){X.ready().then(function(){var W=X._dbInfo;W.db.transaction(function(re){Dr(re,W,"DELETE FROM "+W.storeName,[],function(){Y()},function(se,ue){K(ue)})})}).catch(K)});return h(L,I),L}function Mi(I){var X=this,L=new f(function(Y,K){X.ready().then(function(){var W=X._dbInfo;W.db.transaction(function(re){Dr(re,W,"SELECT COUNT(key) as c FROM "+W.storeName,[],function(se,ue){var ce=ue.rows.item(0).c;Y(ce)},function(se,ue){K(ue)})})}).catch(K)});return h(L,I),L}function Zf(I,X){var L=this,Y=new f(function(K,W){L.ready().then(function(){var re=L._dbInfo;re.db.transaction(function(se){Dr(se,re,"SELECT key FROM "+re.storeName+" WHERE id = ? LIMIT 1",[I+1],function(ue,ce){var me=ce.rows.length?ce.rows.item(0).key:null;K(me)},function(ue,ce){W(ce)})})}).catch(W)});return h(Y,X),Y}function Fi(I){var X=this,L=new f(function(Y,K){X.ready().then(function(){var W=X._dbInfo;W.db.transaction(function(re){Dr(re,W,"SELECT key FROM "+W.storeName,[],function(se,ue){for(var ce=[],me=0;me '__WebKitDatabaseInfoTable__'",[],function(K,W){for(var re=[],se=0;se0}function Z3(I){var X=this,L={};if(I)for(var Y in I)L[Y]=I[Y];return L.keyPrefix=CE(I,X._defaultConfig),K3()?(X._dbInfo=L,L.serializer=Xn,f.resolve()):f.reject()}function Q3(I){var X=this,L=X.ready().then(function(){for(var Y=X._dbInfo.keyPrefix,K=localStorage.length-1;K>=0;K--){var W=localStorage.key(K);W.indexOf(Y)===0&&localStorage.removeItem(W)}});return h(L,I),L}function J3(I,X){var L=this;I=p(I);var Y=L.ready().then(function(){var K=L._dbInfo,W=localStorage.getItem(K.keyPrefix+I);return W&&(W=K.serializer.deserialize(W)),W});return h(Y,X),Y}function eB(I,X){var L=this,Y=L.ready().then(function(){for(var K=L._dbInfo,W=K.keyPrefix,re=W.length,se=localStorage.length,ue=1,ce=0;ce=0;re--){var se=localStorage.key(re);se.indexOf(W)===0&&localStorage.removeItem(se)}}):K=f.reject("Invalid arguments"),h(K,X),K}var sB={_driver:"localStorageWrapper",_initStorage:Z3,_support:H3(),iterate:eB,getItem:J3,setItem:aB,removeItem:iB,clear:Q3,length:nB,key:tB,keys:rB,dropInstance:oB},lB=function(X,L){return X===L||typeof X=="number"&&typeof L=="number"&&isNaN(X)&&isNaN(L)},uB=function(X,L){for(var Y=X.length,K=0;K"u"?"undefined":a(L))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var Y in L){if(Y==="storeName"&&(L[Y]=L[Y].replace(/\W/g,"_")),Y==="version"&&typeof L[Y]!="number")return new Error("Database version must be a number.");this._config[Y]=L[Y]}return"driver"in L&&L.driver?this.setDriver(this._config.driver):!0}else return typeof L=="string"?this._config[L]:this._config},I.prototype.defineDriver=function(L,Y,K){var W=new f(function(re,se){try{var ue=L._driver,ce=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!L._driver){se(ce);return}for(var me=vm.concat("_initStorage"),Pe=0,ze=me.length;Pe"u"}function GX(t){return t!==null&&!U0(t)&&t.constructor!==null&&!U0(t.constructor)&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function XX(t){return Os.call(t)==="[object ArrayBuffer]"}function zX(t){return typeof FormData<"u"&&t instanceof FormData}function WX(t){var e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&t.buffer instanceof ArrayBuffer,e}function YX(t){return typeof t=="string"}function HX(t){return typeof t=="number"}function _k(t){return t!==null&&typeof t=="object"}function id(t){if(Os.call(t)!=="[object Object]")return!1;var e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function qX(t){return Os.call(t)==="[object Date]"}function KX(t){return Os.call(t)==="[object File]"}function ZX(t){return Os.call(t)==="[object Blob]"}function xk(t){return Os.call(t)==="[object Function]"}function QX(t){return _k(t)&&xk(t.pipe)}function JX(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}function ez(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function tz(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function Ab(t,e){if(!(t===null||typeof t>"u"))if(typeof t!="object"&&(t=[t]),Tb(t))for(var r=0,n=t.length;r"u"||(js.isArray(u)?l=l+"[]":u=[u],js.forEach(u,function(f){js.isDate(f)?f=f.toISOString():js.isObject(f)&&(f=JSON.stringify(f)),a.push(NA(l)+"="+NA(f))}))}),i=a.join("&")}if(i){var o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e},iz=Vn;function ev(){this.handlers=[]}ev.prototype.use=function(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1};ev.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)};ev.prototype.forEach=function(e){iz.forEach(this.handlers,function(n){n!==null&&e(n)})};var az=ev,oz=Vn,sz=function(e,r){oz.forEach(e,function(i,a){a!==r&&a.toUpperCase()===r.toUpperCase()&&(e[r]=i,delete e[a])})},Sk=function(e,r,n,i,a){return e.config=r,n&&(e.code=n),e.request=i,e.response=a,e.isAxiosError=!0,e.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}},e},Zm,LA;function wk(){if(LA)return Zm;LA=1;var t=Sk;return Zm=function(r,n,i,a,o){var s=new Error(r);return t(s,n,i,a,o)},Zm}var Qm,DA;function lz(){if(DA)return Qm;DA=1;var t=wk();return Qm=function(r,n,i){var a=i.config.validateStatus;!i.status||!a||a(i.status)?r(i):n(t("Request failed with status code "+i.status,i.config,null,i.request,i))},Qm}var Jm,BA;function uz(){if(BA)return Jm;BA=1;var t=Vn;return Jm=t.isStandardBrowserEnv()?function(){return{write:function(n,i,a,o,s,u){var l=[];l.push(n+"="+encodeURIComponent(i)),t.isNumber(a)&&l.push("expires="+new Date(a).toGMTString()),t.isString(o)&&l.push("path="+o),t.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(){}}}(),Jm}var eg,jA;function cz(){return jA||(jA=1,eg=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}),eg}var tg,UA;function fz(){return UA||(UA=1,tg=function(e,r){return r?e.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):e}),tg}var rg,$A;function hz(){if($A)return rg;$A=1;var t=cz(),e=fz();return rg=function(n,i){return n&&!t(i)?e(n,i):i},rg}var ng,VA;function dz(){if(VA)return ng;VA=1;var t=Vn,e=["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 ng=function(n){var i={},a,o,s;return n&&t.forEach(n.split(` +`),function(l){if(s=l.indexOf(":"),a=t.trim(l.substr(0,s)).toLowerCase(),o=t.trim(l.substr(s+1)),a){if(i[a]&&e.indexOf(a)>=0)return;a==="set-cookie"?i[a]=(i[a]?i[a]:[]).concat([o]):i[a]=i[a]?i[a]+", "+o:o}}),i},ng}var ig,GA;function pz(){if(GA)return ig;GA=1;var t=Vn;return ig=t.isStandardBrowserEnv()?function(){var r=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),i;function a(o){var s=o;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=a(window.location.href),function(s){var u=t.isString(s)?a(s):s;return u.protocol===i.protocol&&u.host===i.host}}():function(){return function(){return!0}}(),ig}var ag,XA;function tv(){if(XA)return ag;XA=1;function t(e){this.message=e}return t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,ag=t,ag}var og,zA;function WA(){if(zA)return og;zA=1;var t=Vn,e=lz(),r=uz(),n=bk,i=hz(),a=dz(),o=pz(),s=wk(),u=rv(),l=tv();return og=function(f){return new Promise(function(d,p){var v=f.data,g=f.headers,m=f.responseType,y;function _(){f.cancelToken&&f.cancelToken.unsubscribe(y),f.signal&&f.signal.removeEventListener("abort",y)}t.isFormData(v)&&delete g["Content-Type"];var b=new XMLHttpRequest;if(f.auth){var x=f.auth.username||"",S=f.auth.password?unescape(encodeURIComponent(f.auth.password)):"";g.Authorization="Basic "+btoa(x+":"+S)}var w=i(f.baseURL,f.url);b.open(f.method.toUpperCase(),n(w,f.params,f.paramsSerializer),!0),b.timeout=f.timeout;function T(){if(b){var A="getAllResponseHeaders"in b?a(b.getAllResponseHeaders()):null,O=!m||m==="text"||m==="json"?b.responseText:b.response,P={data:O,status:b.status,statusText:b.statusText,headers:A,config:f,request:b};e(function(k){d(k),_()},function(k){p(k),_()},P),b=null}}if("onloadend"in b?b.onloadend=T:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(T)},b.onabort=function(){b&&(p(s("Request aborted",f,"ECONNABORTED",b)),b=null)},b.onerror=function(){p(s("Network Error",f,null,b)),b=null},b.ontimeout=function(){var O=f.timeout?"timeout of "+f.timeout+"ms exceeded":"timeout exceeded",P=f.transitional||u.transitional;f.timeoutErrorMessage&&(O=f.timeoutErrorMessage),p(s(O,f,P.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",b)),b=null},t.isStandardBrowserEnv()){var E=(f.withCredentials||o(w))&&f.xsrfCookieName?r.read(f.xsrfCookieName):void 0;E&&(g[f.xsrfHeaderName]=E)}"setRequestHeader"in b&&t.forEach(g,function(O,P){typeof v>"u"&&P.toLowerCase()==="content-type"?delete g[P]:b.setRequestHeader(P,O)}),t.isUndefined(f.withCredentials)||(b.withCredentials=!!f.withCredentials),m&&m!=="json"&&(b.responseType=f.responseType),typeof f.onDownloadProgress=="function"&&b.addEventListener("progress",f.onDownloadProgress),typeof f.onUploadProgress=="function"&&b.upload&&b.upload.addEventListener("progress",f.onUploadProgress),(f.cancelToken||f.signal)&&(y=function(A){b&&(p(!A||A&&A.type?new l("canceled"):A),b.abort(),b=null)},f.cancelToken&&f.cancelToken.subscribe(y),f.signal&&(f.signal.aborted?y():f.signal.addEventListener("abort",y))),v||(v=null),b.send(v)})},og}var sg,YA;function rv(){if(YA)return sg;YA=1;var t=Vn,e=sz,r=Sk,n={"Content-Type":"application/x-www-form-urlencoded"};function i(u,l){!t.isUndefined(u)&&t.isUndefined(u["Content-Type"])&&(u["Content-Type"]=l)}function a(){var u;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(u=WA()),u}function o(u,l,c){if(t.isString(u))try{return(l||JSON.parse)(u),t.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:a(),transformRequest:[function(l,c){return e(c,"Accept"),e(c,"Content-Type"),t.isFormData(l)||t.isArrayBuffer(l)||t.isBuffer(l)||t.isStream(l)||t.isFile(l)||t.isBlob(l)?l:t.isArrayBufferView(l)?l.buffer:t.isURLSearchParams(l)?(i(c,"application/x-www-form-urlencoded;charset=utf-8"),l.toString()):t.isObject(l)||c&&c["Content-Type"]==="application/json"?(i(c,"application/json"),o(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&&t.isString(l)&&l.length)try{return JSON.parse(l)}catch(p){if(d)throw p.name==="SyntaxError"?r(p,this,"E_JSON_PARSE"):p}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 t.forEach(["delete","get","head"],function(l){s.headers[l]={}}),t.forEach(["post","put","patch"],function(l){s.headers[l]=t.merge(n)}),sg=s,sg}var vz=Vn,mz=rv(),gz=function(e,r,n){var i=this||mz;return vz.forEach(n,function(o){e=o.call(i,e,r)}),e},lg,HA;function Ek(){return HA||(HA=1,lg=function(e){return!!(e&&e.__CANCEL__)}),lg}var qA=Vn,ug=gz,yz=Ek(),_z=rv(),xz=tv();function cg(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new xz("canceled")}var bz=function(e){cg(e),e.headers=e.headers||{},e.data=ug.call(e,e.data,e.headers,e.transformRequest),e.headers=qA.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),qA.forEach(["delete","get","head","post","put","patch","common"],function(i){delete e.headers[i]});var r=e.adapter||_z.adapter;return r(e).then(function(i){return cg(e),i.data=ug.call(e,i.data,i.headers,e.transformResponse),i},function(i){return yz(i)||(cg(e),i&&i.response&&(i.response.data=ug.call(e,i.response.data,i.response.headers,e.transformResponse))),Promise.reject(i)})},kn=Vn,Tk=function(e,r){r=r||{};var n={};function i(c,f){return kn.isPlainObject(c)&&kn.isPlainObject(f)?kn.merge(c,f):kn.isPlainObject(f)?kn.merge({},f):kn.isArray(f)?f.slice():f}function a(c){if(kn.isUndefined(r[c])){if(!kn.isUndefined(e[c]))return i(void 0,e[c])}else return i(e[c],r[c])}function o(c){if(!kn.isUndefined(r[c]))return i(void 0,r[c])}function s(c){if(kn.isUndefined(r[c])){if(!kn.isUndefined(e[c]))return i(void 0,e[c])}else return i(void 0,r[c])}function u(c){if(c in r)return i(e[c],r[c]);if(c in e)return i(void 0,e[c])}var l={url:o,method:o,data:o,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 kn.forEach(Object.keys(e).concat(Object.keys(r)),function(f){var h=l[f]||a,d=h(f);kn.isUndefined(d)&&h!==u||(n[f]=d)}),n},fg,KA;function Ak(){return KA||(KA=1,fg={version:"0.24.0"}),fg}var Sz=Ak().version,Cb={};["object","boolean","number","function","string","symbol"].forEach(function(t,e){Cb[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});var ZA={};Cb.transitional=function(e,r,n){function i(a,o){return"[Axios v"+Sz+"] Transitional option '"+a+"'"+o+(n?". "+n:"")}return function(a,o,s){if(e===!1)throw new Error(i(o," has been removed"+(r?" in "+r:"")));return r&&!ZA[o]&&(ZA[o]=!0,console.warn(i(o," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(a,o,s):!0}};function wz(t,e,r){if(typeof t!="object")throw new TypeError("options must be an object");for(var n=Object.keys(t),i=n.length;i-- >0;){var a=n[i],o=e[a];if(o){var s=t[a],u=s===void 0||o(s,a,t);if(u!==!0)throw new TypeError("option "+a+" must be "+u);continue}if(r!==!0)throw Error("Unknown option "+a)}}var Ez={assertOptions:wz,validators:Cb},Ck=Vn,Tz=bk,QA=az,JA=bz,nv=Tk,Pk=Ez,Us=Pk.validators;function Df(t){this.defaults=t,this.interceptors={request:new QA,response:new QA}}Df.prototype.request=function(e){typeof e=="string"?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=nv(this.defaults,e),e.method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var r=e.transitional;r!==void 0&&Pk.assertOptions(r,{silentJSONParsing:Us.transitional(Us.boolean),forcedJSONParsing:Us.transitional(Us.boolean),clarifyTimeoutError:Us.transitional(Us.boolean)},!1);var n=[],i=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(e)===!1||(i=i&&h.synchronous,n.unshift(h.fulfilled,h.rejected))});var a=[];this.interceptors.response.forEach(function(h){a.push(h.fulfilled,h.rejected)});var o;if(!i){var s=[JA,void 0];for(Array.prototype.unshift.apply(s,n),s=s.concat(a),o=Promise.resolve(e);s.length;)o=o.then(s.shift(),s.shift());return o}for(var u=e;n.length;){var l=n.shift(),c=n.shift();try{u=l(u)}catch(f){c(f);break}}try{o=JA(u)}catch(f){return Promise.reject(f)}for(;a.length;)o=o.then(a.shift(),a.shift());return o};Df.prototype.getUri=function(e){return e=nv(this.defaults,e),Tz(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")};Ck.forEach(["delete","get","head","options"],function(e){Df.prototype[e]=function(r,n){return this.request(nv(n||{},{method:e,url:r,data:(n||{}).data}))}});Ck.forEach(["post","put","patch"],function(e){Df.prototype[e]=function(r,n,i){return this.request(nv(i||{},{method:e,url:r,data:n}))}});var Az=Df,hg,eC;function Cz(){if(eC)return hg;eC=1;var t=tv();function e(r){if(typeof r!="function")throw new TypeError("executor must be a function.");var n;this.promise=new Promise(function(o){n=o});var i=this;this.promise.then(function(a){if(i._listeners){var o,s=i._listeners.length;for(o=0;o{o.trace("Logged to cloud.",void 0,!1)}).catch(s=>{o.error("Logging to cloud failed!",void 0,!1)})}clog(e,r,n,i,a,o){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,"["+a.toLocaleString()+"]","",e),r&&(console.log(r),console.log("------------------------"))),o===void 0&&this.upload(e,r,n,a),o!==void 0&&o&&this.upload(e,r,n,a)}trace(e,r,n){const i=new Date,a="TRACE",o="#005CAF";this.clog(e,r,a,o,i,n)}debug(e,r,n){const i=new Date,a="DEBUG",o="#0089A7";this.clog(e,r,a,o,i,n)}info(e,r,n){const i=new Date,a="INFO",o="#00896C";this.clog(e,r,a,o,i,n)}warn(e,r,n){const i=new Date,a="WARN",o="#DDA52D";this.clog(e,r,a,o,i,n)}error(e,r,n){const i=new Date,a="ERROR",o="#AB3B3A";this.clog(e,r,a,o,i,n)}fatal(e,r,n){const i=new Date,a="FATAL",o="#E16B8C";this.clog(e,r,a,o,i,n)}}var Dz=Lz;const Bz=Rn(Dz),Se=new Bz,jz={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 Save",save:"Save",load:"Load",options:"Options",title:"Title",titleTips:"Confirm return to the title screen"}},extra:{title:"EXTRA"}},Uz={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:{textSpeed:{title:"テキスト表示速度",options:{slow:"遅く",medium:"標準",fast:"速く"}},textSize:{title:"テキストサイズ",options:{small:"小",medium:"中",large:"大"}},textFont:{title:"フォント",options:{siYuanSimSun:"源ノ明朝",SimHei:"黒体",lxgw:"霞鴎文隷"}},textboxOpacity:{title:"Textbox Opacity"},textPreview:{title:"テキスト表示プレビュー",text:"プレビューはテキストボックスのテキストサイズとテキスト表示速度です。上記のオプションでフォントも変更できます。"}}},sound:{title:"サウンド",options:{volumeMain:{title:"MAIN 音量"},vocalVolume:{title:"VOICE 音量"},bgmVolume:{title:"BGM 音量"},seVolume:{title:"SE 音量"},uiSeVolume:{title:"UI 効果音音量"}}}}},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:"鑑賞モード"}},$z={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:"鉴赏模式"}},Vz={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"}},Gz={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"}},Xz={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:{textSpeed:{title:"文字顯示速度",options:{slow:"慢",medium:"中",fast:"快"}},textSize:{title:"文字大小",options:{small:"小",medium:"中",large:"大"}},textFont:{title:"文字字體",options:{siYuanSimSun:"霞鹜文楷",SimHei:"黑體"}},textboxOpacity:{title:"文本框不透明度"},textPreview:{title:"文字顯示預覽",text:"現在預覽的是文字框字體大小和播放速度的情況,您可以根據您的觀感調整上面的選項。"}}},sound:{title:"音量",options:{volumeMain:{title:"主音量"},vocalVolume:{title:"語音音量"},bgmVolume:{title:"背景音樂音量"},seVolume:{title:"音效音量"},uiSeVolume:{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 Rs=(t=>(t[t.zhCn=0]="zhCn",t[t.en=1]="en",t[t.jp=2]="jp",t[t.fr=3]="fr",t[t.de=4]="de",t[t.zhTw=5]="zhTw",t))(Rs||{});const Jd={zhCn:"中文",en:"English",jp:"日本語",fr:"Français",de:"Deutsch",zhTw:"繁體中文"},zz={en:{translation:jz},zhCn:{translation:$z},jp:{translation:Uz},fr:{translation:Vz},de:{translation:Gz},zhTw:{translation:Xz}},Wz=0;var fn=(t=>(t[t.slow=0]="slow",t[t.normal=1]="normal",t[t.fast=2]="fast",t))(fn||{}),_i=(t=>(t[t.small=0]="small",t[t.medium=1]="medium",t[t.large=2]="large",t))(_i||{}),Ki=(t=>(t[t.song=0]="song",t[t.hei=1]="hei",t[t.lxgw=2]="lxgw",t))(Ki||{}),zc=(t=>(t[t.yes=0]="yes",t[t.no=1]="no",t))(zc||{}),Zi=(t=>(t[t.on=0]="on",t[t.off=1]="off",t))(Zi||{});const Rk={slPage:1,volumeMain:100,textSpeed:fn.normal,autoSpeed:fn.normal,textSize:_i.medium,vocalVolume:100,bgmVolume:25,seVolume:100,uiSeVolume:50,textboxFont:Ki.song,textboxOpacity:75,language:Rs.zhCn,voiceInterruption:zc.yes,fullScreen:Zi.off},V0={optionData:Rk,globalGameVar:{},appreciationData:{bgm:[],cg:[]}},Ik=zp({name:"userData",initialState:ar(V0),reducers:{setUserData:(t,e)=>{const{key:r,value:n}=e.payload;t[r]=n},unlockCgInUserData:(t,e)=>{const{name:r,url:n,series:i}=e.payload;let a=!1;t.appreciationData.cg.forEach(o=>{n===o.url&&(a=!0,o.url=n,o.series=i)}),a||t.appreciationData.cg.push(e.payload)},unlockBgmInUserData:(t,e)=>{const{name:r,url:n,series:i}=e.payload;let a=!1;t.appreciationData.bgm.forEach(o=>{n===o.url&&(a=!0,o.url=n,o.series=i)}),a||t.appreciationData.bgm.push(e.payload)},resetUserData:(t,e)=>{Object.assign(t,e.payload)},setOptionData:(t,e)=>{const{key:r,value:n}=e.payload;t.optionData[r]=n},setGlobalVar:(t,e)=>{t.globalGameVar[e.payload.key]=e.payload.value},setSlPage:(t,e)=>{t.optionData.slPage=e.payload},resetOptionSet(t){Object.assign(t.optionData,Rk)},resetAllData(t){Object.assign(t,ar(V0))}}}),{setUserData:jSe,resetUserData:Pb,setOptionData:At,setGlobalVar:Yz,setSlPage:kk,unlockCgInUserData:Mk,unlockBgmInUserData:Fk,resetOptionSet:Hz,resetAllData:qz}=Ik.actions,Kz=Ik.reducer,Nk={backlog_size:200,fast_timeout:50},Zz={textInitialDelay:80};class Qz{constructor(e){Ce(this,"isSaveBacklogNext",!1);Ce(this,"backlog",[]);Ce(this,"sceneManager");this.sceneManager=e}getBacklog(){return this.backlog}editLastBacklogItemEffect(e){this.backlog[this.backlog.length-1].currentStageState.effects=e}makeBacklogEmpty(){this.backlog.splice(0,this.backlog.length)}insertBacklogItem(e){this.backlog.push(e)}saveCurrentStateToBacklog(){const e=te.getState().stage,r=ar(e);r.PerformList.forEach(i=>{i.script.args.forEach(a=>{a.key==="concat"&&(a.value=!1,i.script.content=r.showText)})});const n={currentStageState:r,saveScene:{currentSentenceId:this.sceneManager.sceneData.currentSentenceId,sceneStack:ar(this.sceneManager.sceneData.sceneStack),sceneName:this.sceneManager.sceneData.currentScene.sceneName,sceneUrl:this.sceneManager.sceneData.currentScene.sceneUrl}};for(this.getBacklog().push(n);this.getBacklog().length>Nk.backlog_size;)this.getBacklog().shift()}}const iC={currentSentenceId:0,sceneStack:[],currentScene:{sceneName:"",sceneUrl:"",sentenceList:[],assetsList:[],subSceneList:[]}};class Jz{constructor(){Ce(this,"settledScenes",[]);Ce(this,"settledAssets",[]);Ce(this,"sceneData",ar(iC))}resetScene(){this.sceneData.currentSentenceId=0,this.sceneData.sceneStack=[],this.sceneData.currentScene=ar(iC.currentScene)}}class eW{constructor(){Ce(this,"nextEnterAnimationName",new Map);Ce(this,"nextExitAnimationName",new Map);Ce(this,"animations",[])}addAnimation(e){this.animations.push(e)}getAnimations(){return this.animations}}const tW={performName:"",duration:100,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0};var Fn=(t=>(t[t.background=0]="background",t[t.bgm=1]="bgm",t[t.figure=2]="figure",t[t.scene=3]="scene",t[t.tex=4]="tex",t[t.vocal=5]="vocal",t[t.video=6]="video",t))(Fn||{});const Nn=(t,e)=>{if(t.match("http://")||t.match("https://"))return t;{let r;switch(e){case 0:r=`./game/background/${t}`;break;case 3:r=`./game/scene/${t}`;break;case 5:r=`./game/vocal/${t}`;break;case 2:r=`./game/figure/${t}`;break;case 1:r=`./game/bgm/${t}`;break;case 6:r=`./game/video/${t}`;break;default:r="";break}return r}},rW=t=>{for(const e of t){let r=!0;if(D.sceneManager.settledAssets.forEach(n=>{n===e.url&&(r=!1)}),!r)Se.warn("该资源已在预加载列表中,无需重复加载");else{const n=document.createElement("link");n.setAttribute("rel","prefetch"),n.setAttribute("href",e.url);const i=document.getElementsByTagName("head");i.length&&i[0].appendChild(n),D.sceneManager.settledAssets.push(e.url)}}};var Te;(function(t){t[t.say=0]="say",t[t.changeBg=1]="changeBg",t[t.changeFigure=2]="changeFigure",t[t.bgm=3]="bgm",t[t.video=4]="video",t[t.pixi=5]="pixi",t[t.pixiInit=6]="pixiInit",t[t.intro=7]="intro",t[t.miniAvatar=8]="miniAvatar",t[t.changeScene=9]="changeScene",t[t.choose=10]="choose",t[t.end=11]="end",t[t.setComplexAnimation=12]="setComplexAnimation",t[t.setFilter=13]="setFilter",t[t.label=14]="label",t[t.jumpLabel=15]="jumpLabel",t[t.chooseLabel=16]="chooseLabel",t[t.setVar=17]="setVar",t[t.if=18]="if",t[t.callScene=19]="callScene",t[t.showVars=20]="showVars",t[t.unlockCg=21]="unlockCg",t[t.unlockBgm=22]="unlockBgm",t[t.filmMode=23]="filmMode",t[t.setTextbox=24]="setTextbox",t[t.setAnimation=25]="setAnimation",t[t.playEffect=26]="playEffect",t[t.setTempAnimation=27]="setTempAnimation",t[t.comment=28]="comment",t[t.setTransform=29]="setTransform",t[t.setTransition=30]="setTransition",t[t.getUserInput=31]="getUserInput"})(Te||(Te={}));const aC=(t,e,r)=>{let n={type:Te.say,additionalArgs:[]};const i=nW(t,e,r);return n.type=i,i===Te.say&&t!=="say"&&n.additionalArgs.push({key:"speaker",value:t}),n=iW(n,i,e),n};function nW(t,e,r){const n=new Map;return r.forEach(i=>{n.set(i.scriptString,i.scriptType)}),n.has(t)?n.get(t):Te.say}function iW(t,e,r){return r.includes(e)&&t.additionalArgs.push({key:"next",value:!0}),t}var er;(function(t){t[t.background=0]="background",t[t.bgm=1]="bgm",t[t.figure=2]="figure",t[t.scene=3]="scene",t[t.tex=4]="tex",t[t.vocal=5]="vocal",t[t.video=6]="video"})(er||(er={}));function Lk(t,e){const r=[];let i=t.replace(/ /g," ").split(" -");return i=i.filter(a=>a!==""),i.forEach(a=>{const o=a.indexOf("=");let s=a.slice(0,o),u=a.slice(o+1);o<0&&(s=a,u=void 0),s.toLowerCase().match(/.ogg|.mp3|.wav/)?r.push({key:"vocal",value:e(a,er.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}const aW=(t,e,r)=>{if(t==="none"||t==="")return"";switch(e){case Te.playEffect:return r(t,er.vocal);case Te.changeBg:return r(t,er.background);case Te.changeFigure:return r(t,er.figure);case Te.bgm:return r(t,er.bgm);case Te.callScene:return r(t,er.scene);case Te.changeScene:return r(t,er.scene);case Te.miniAvatar:return r(t,er.figure);case Te.video:return r(t,er.video);case Te.choose:return oW(t,r);case Te.unlockBgm:return r(t,er.bgm);case Te.unlockCg:return r(t,er.background);default:return t}};function oW(t,e){const r=t.split("|"),n=[],i=[];for(const s of r)n.push(s.split(":")[0]??""),i.push(s.split(":")[1]??"");const a=i.map(s=>s.match(/\./)?e(s,er.scene):s);let o="";for(let s=0;s{const n=[];return t===Te.say&&r.forEach(i=>{i.key==="vocal"&&n.push({name:i.value,url:i.value,lineNumber:0,type:er.vocal})}),e==="none"||e===""||(t===Te.changeBg&&n.push({name:e,url:e,lineNumber:0,type:er.background}),t===Te.changeFigure&&n.push({name:e,url:e,lineNumber:0,type:er.figure}),t===Te.miniAvatar&&n.push({name:e,url:e,lineNumber:0,type:er.figure}),t===Te.video&&n.push({name:e,url:e,lineNumber:0,type:er.video}),t===Te.bgm&&n.push({name:e,url:e,lineNumber:0,type:er.bgm})),n},lW=(t,e)=>{const r=[];return(t===Te.changeScene||t===Te.callScene)&&r.push(e),t===Te.choose&&e.split("|").map(a=>a.split(":")[1]??"").forEach(a=>{a.match(/\./)&&r.push(a)}),r},uW=(t,e,r,n)=>{let i,a,o;const s=[];let u,l,c,f=t.split(";")[0];if(f==="")return{command:Te.comment,commandRaw:"comment",content:t.split(";")[1]??"",args:[{key:"next",value:!0}],sentenceAssets:[],subScene:[]};const h=/:/.exec(f);if(h===null){c=f,l=aC(c,r,n),i=l.type;for(const p of l.additionalArgs)i===Te.say&&p.key==="speaker"||s.push(p)}else{c=f.substring(0,h.index),f=f.substring(h.index+1,f.length),l=aC(c,r,n),i=l.type;for(const p of l.additionalArgs)s.push(p)}const d=/ -/.exec(f);if(d){const p=f.substring(d.index,t.length);f=f.substring(0,d.index);for(const v of Lk(p,e))s.push(v)}return a=aW(f,i,e),u=sW(i,a,s),o=lW(i,a),{command:i,commandRaw:c,content:a,args:s,sentenceAssets:u,subScene:o}};var hh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},cW=typeof hh=="object"&&hh&&hh.Object===Object&&hh,fW=cW,hW=fW,dW=typeof self=="object"&&self&&self.Object===Object&&self,pW=hW||dW||Function("return this")(),iv=pW,vW=iv,mW=vW.Symbol,Dk=mW,oC=Dk,Bk=Object.prototype,gW=Bk.hasOwnProperty,yW=Bk.toString,Du=oC?oC.toStringTag:void 0;function _W(t){var e=gW.call(t,Du),r=t[Du];try{t[Du]=void 0;var n=!0}catch{}var i=yW.call(t);return n&&(e?t[Du]=r:delete t[Du]),i}var xW=_W,bW=Object.prototype,SW=bW.toString;function wW(t){return SW.call(t)}var EW=wW,sC=Dk,TW=xW,AW=EW,CW="[object Null]",PW="[object Undefined]",lC=sC?sC.toStringTag:void 0;function OW(t){return t==null?t===void 0?PW:CW:lC&&lC in Object(t)?TW(t):AW(t)}var RW=OW;function IW(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var jk=IW,kW=RW,MW=jk,FW="[object AsyncFunction]",NW="[object Function]",LW="[object GeneratorFunction]",DW="[object Proxy]";function BW(t){if(!MW(t))return!1;var e=kW(t);return e==NW||e==LW||e==FW||e==DW}var jW=BW,UW=iv,$W=UW["__core-js_shared__"],VW=$W,vg=VW,uC=function(){var t=/[^.]+$/.exec(vg&&vg.keys&&vg.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function GW(t){return!!uC&&uC in t}var XW=GW,zW=Function.prototype,WW=zW.toString;function YW(t){if(t!=null){try{return WW.call(t)}catch{}try{return t+""}catch{}}return""}var HW=YW,qW=jW,KW=XW,ZW=jk,QW=HW,JW=/[\\^$.*+?()[\]{}|]/g,eY=/^\[object .+?Constructor\]$/,tY=Function.prototype,rY=Object.prototype,nY=tY.toString,iY=rY.hasOwnProperty,aY=RegExp("^"+nY.call(iY).replace(JW,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function oY(t){if(!ZW(t)||KW(t))return!1;var e=qW(t)?aY:eY;return e.test(QW(t))}var sY=oY;function lY(t,e){return t==null?void 0:t[e]}var uY=lY,cY=sY,fY=uY;function hY(t,e){var r=fY(t,e);return cY(r)?r:void 0}var Ob=hY,dY=Ob,pY=dY(Object,"create"),av=pY,cC=av;function vY(){this.__data__=cC?cC(null):{},this.size=0}var mY=vY;function gY(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var yY=gY,_Y=av,xY="__lodash_hash_undefined__",bY=Object.prototype,SY=bY.hasOwnProperty;function wY(t){var e=this.__data__;if(_Y){var r=e[t];return r===xY?void 0:r}return SY.call(e,t)?e[t]:void 0}var EY=wY,TY=av,AY=Object.prototype,CY=AY.hasOwnProperty;function PY(t){var e=this.__data__;return TY?e[t]!==void 0:CY.call(e,t)}var OY=PY,RY=av,IY="__lodash_hash_undefined__";function kY(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=RY&&e===void 0?IY:e,this}var MY=kY,FY=mY,NY=yY,LY=EY,DY=OY,BY=MY;function lu(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e-1}var rH=tH,nH=ov;function iH(t,e){var r=this.__data__,n=nH(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var aH=iH,oH=$Y,sH=KY,lH=JY,uH=rH,cH=aH;function uu(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e-1}var cq=uq;function fq(t,e,r){for(var n=-1,i=t==null?0:t.length;++n=Mq){var l=e?null:Iq(t);if(l)return kq(l);o=!1,i=Rq,u=new Cq}else u=e?[]:s;e:for(;++n{const u=t.split(` +`);let l=[],c=[];const f=u.map(h=>{const d=uW(h,i,a,o);return l=[...l,...d.sentenceAssets],c=[...c,...d.subScene],d});return l=Bq(l),n(l),{sceneName:e,sceneUrl:r,sentenceList:f,assetsList:l,subSceneList:c}};Te.intro,Te.changeBg,Te.changeFigure,Te.miniAvatar,Te.changeScene,Te.choose,Te.end,Te.bgm,Te.video,Te.setComplexAnimation,Te.setFilter,Te.pixiInit,Te.pixi,Te.label,Te.jumpLabel,Te.setVar,Te.callScene,Te.showVars,Te.unlockCg,Te.unlockBgm,Te.say,Te.filmMode,Te.callScene,Te.setTextbox,Te.setAnimation,Te.playEffect;Te.bgm,Te.pixi,Te.pixiInit,Te.label,Te.if,Te.miniAvatar,Te.setVar,Te.unlockBgm,Te.unlockCg,Te.filmMode,Te.playEffect;function Uq(t){const e=[];let r,n=t.split(";")[0];if(n==="")return{command:"",args:[],options:[]};const i=/:/.exec(n);i===null?r="":(r=n.substring(0,i.index),n=n.substring(i.index+1,n.length));const a=/ -/.exec(n);if(a){const o=n.substring(a.index,n.length);n=n.substring(0,a.index);for(const s of Lk(o,(u,l)=>u))e.push(s)}return{command:r,args:n.split("|").map(o=>o.trim()).filter(o=>o!==""),options:e}}function $q(t){return t.replaceAll("\r","").split(` `).map(r=>Uq(r)).filter(r=>r.command!=="")}class Vq{constructor(e,r,n,i){Ce(this,"assetsPrefetcher");Ce(this,"assetSetter");Ce(this,"ADD_NEXT_ARG_LIST");Ce(this,"SCRIPT_CONFIG");this.assetsPrefetcher=e,this.assetSetter=r,this.ADD_NEXT_ARG_LIST=n,this.SCRIPT_CONFIG=i}parse(e,r,n){return jq(e,r,n,this.assetsPrefetcher,this.assetSetter,this.ADD_NEXT_ARG_LIST,this.SCRIPT_CONFIG)}parseConfig(e){return $q(e)}stringifyConfig(e){return e.reduce((r,n)=>r+`${n.command}:${n.args.join("|")}${n.options.length<=0?"":n.options.reduce((i,a)=>i+" -"+a.key+"="+a.value,"")}; -`,"")}}function He(t,e){const n=t.args.find(i=>i.key===e);return n?n.value:null}const Gq=t=>{let e=t.content,r="",n="default";t.args.forEach(o=>{o.key==="unlockname"&&(r=o.value.toString()),o.key==="series"&&(n=o.value.toString())});const i=He(t,"enter"),a=He(t,"volume");return r!==""&&te.dispatch(Mk({name:r,url:e,series:n})),hS(e,typeof i=="number"&&i>=0?i:0,typeof a=="number"&&a>=0&&a<=100?a:100),{performName:"none",duration:0,isHoldOn:!0,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};var Rb={exports:{}},Uk=function(e,r){return function(){return e.apply(r,arguments)}},Xq=Uk,Ib=Object.prototype.toString,kb=function(t){return function(e){var r=Ib.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())}}(Object.create(null));function Io(t){return t=t.toLowerCase(),function(r){return kb(r)===t}}function lv(t){return Array.isArray(t)}function G0(t){return typeof t>"u"}function zq(t){return t!==null&&!G0(t)&&t.constructor!==null&&!G0(t.constructor)&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}var $k=Io("ArrayBuffer");function Wq(t){var e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&$k(t.buffer),e}function Yq(t){return typeof t=="string"}function Vk(t){return typeof t=="number"}function Gk(t){return t!==null&&typeof t=="object"}function od(t){if(kb(t)!=="object")return!1;var e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function Hq(t){return t&&Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}var qq=Io("Date"),Kq=Io("File"),Zq=Io("Blob"),Qq=Io("FileList");function Mb(t){return Ib.call(t)==="[object Function]"}function Jq(t){return Gk(t)&&Mb(t.pipe)}function e7(t){var e="[object FormData]";return t&&(typeof FormData=="function"&&t instanceof FormData||Ib.call(t)===e||Mb(t.toString)&&t.toString()===e)}var t7=Io("URLSearchParams");function r7(t){return t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}function n7(){var t;return typeof navigator<"u"&&((t=navigator.product)==="ReactNative"||t==="NativeScript"||t==="NS")?!1:typeof window<"u"&&typeof document<"u"}function Fb(t,e){if(!(t===null||typeof t>"u"))if(typeof t!="object"&&(t=[t]),lv(t))for(var r=0,n=t.length;r0;)o=i[a],(!n||n(o,t,e))&&!s[o]&&(e[o]=t[o],s[o]=!0);t=r!==!1&&Object.getPrototypeOf(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e}function l7(t,e,r){t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;var n=t.indexOf(e,r);return n!==-1&&n===r}function u7(t){if(!t)return null;if(lv(t))return t;var e=t.length;if(!Vk(e))return null;for(var r=new Array(e);e-- >0;)r[e]=t[e];return r}var c7=function(t){return function(e){return t&&e instanceof t}}(typeof Uint8Array<"u"&&Object.getPrototypeOf(Uint8Array));function f7(t,e){for(var r=t&&t[Symbol.iterator],n=r.call(t),i;(i=n.next())&&!i.done;){var a=i.value;e.call(t,a[0],a[1])}}function h7(t,e){for(var r,n=[];(r=t.exec(e))!==null;)n.push(r);return n}var d7=Io("HTMLFormElement"),p7=function(e){return function(r,n){return e.call(r,n)}}(Object.prototype.hasOwnProperty),mr={isArray:lv,isArrayBuffer:$k,isBuffer:zq,isFormData:e7,isArrayBufferView:Wq,isString:Yq,isNumber:Vk,isObject:Gk,isPlainObject:od,isEmptyObject:Hq,isUndefined:G0,isDate:qq,isFile:Kq,isBlob:Zq,isFunction:Mb,isStream:Jq,isURLSearchParams:t7,isStandardBrowserEnv:n7,forEach:Fb,merge:X0,extend:i7,trim:r7,stripBOM:a7,inherits:o7,toFlatObject:s7,kindOf:kb,kindOfTest:Io,endsWith:l7,toArray:u7,isTypedArray:c7,isFileList:Qq,forEachEntry:f7,matchAll:h7,isHTMLForm:d7,hasOwnProperty:p7},Xk=mr;function Nl(t,e,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i)}Xk.inherits(Nl,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 zk=Nl.prototype,Wk={};["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(t){Wk[t]={value:t}});Object.defineProperties(Nl,Wk);Object.defineProperty(zk,"isAxiosError",{value:!0});Nl.from=function(t,e,r,n,i,a){var o=Object.create(zk);return Xk.toFlatObject(t,o,function(u){return u!==Error.prototype}),Nl.call(o,t.message,e,r,n,i),o.cause=t,o.name=t.name,a&&Object.assign(o,a),o};var Is=Nl,v7=typeof self=="object"?self.FormData:window.FormData,m7=v7,xt=mr,g7=Is,y7=m7;function z0(t){return xt.isPlainObject(t)||xt.isArray(t)}function Yk(t){return xt.endsWith(t,"[]")?t.slice(0,-2):t}function fC(t,e,r){return t?t.concat(e).map(function(i,a){return i=Yk(i),!r&&a?"["+i+"]":i}).join(r?".":""):e}function _7(t){return xt.isArray(t)&&!t.some(z0)}var x7=xt.toFlatObject(xt,{},null,function(e){return/^is[A-Z]/.test(e)});function b7(t){return t&&xt.isFunction(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator]}function S7(t,e,r){if(!xt.isObject(t))throw new TypeError("target must be an object");e=e||new(y7||FormData),r=xt.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,g){return!xt.isUndefined(g[v])});var n=r.metaTokens,i=r.visitor||c,a=r.dots,o=r.indexes,s=r.Blob||typeof Blob<"u"&&Blob,u=s&&b7(e);if(!xt.isFunction(i))throw new TypeError("visitor must be a function");function l(p){if(p===null)return"";if(xt.isDate(p))return p.toISOString();if(!u&&xt.isBlob(p))throw new g7("Blob is not supported. Use a Buffer instead.");return xt.isArrayBuffer(p)||xt.isTypedArray(p)?u&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function c(p,v,g){var m=p;if(p&&!g&&typeof p=="object"){if(xt.endsWith(v,"{}"))v=n?v:v.slice(0,-2),p=JSON.stringify(p);else if(xt.isArray(p)&&_7(p)||xt.isFileList(p)||xt.endsWith(v,"[]")&&(m=xt.toArray(p)))return v=Yk(v),m.forEach(function(_,b){!xt.isUndefined(_)&&e.append(o===!0?fC([v],b,a):o===null?v:v+"[]",l(_))}),!1}return z0(p)?!0:(e.append(fC(g,v,a),l(p)),!1)}var f=[],h=Object.assign(x7,{defaultVisitor:c,convertValue:l,isVisitable:z0});function d(p,v){if(!xt.isUndefined(p)){if(f.indexOf(p)!==-1)throw Error("Circular reference detected in "+v.join("."));f.push(p),xt.forEach(p,function(m,y){var _=!xt.isUndefined(m)&&i.call(e,m,xt.isString(y)?y.trim():y,v,h);_===!0&&d(m,v?v.concat(y):[y])}),f.pop()}}if(!xt.isObject(t))throw new TypeError("data must be an object");return d(t),e}var uv=S7,w7=uv;function hC(t){var e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'\(\)~]|%20|%00/g,function(n){return e[n]})}function Hk(t,e){this._pairs=[],t&&w7(t,this,e)}var qk=Hk.prototype;qk.append=function(e,r){this._pairs.push([e,r])};qk.toString=function(e){var r=e?function(n){return e.call(this,n,hC)}:hC;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};var Kk=Hk,E7=mr,T7=Kk;function A7(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var Zk=function(e,r,n){if(!r)return e;var i=e.indexOf("#");i!==-1&&(e=e.slice(0,i));var a=n&&n.encode||A7,o=E7.isURLSearchParams(r)?r.toString():new T7(r,n).toString(a);return o&&(e+=(e.indexOf("?")===-1?"?":"&")+o),e},C7=mr;function Bf(){this.handlers=[]}Bf.prototype.use=function(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1};Bf.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)};Bf.prototype.clear=function(){this.handlers&&(this.handlers=[])};Bf.prototype.forEach=function(e){C7.forEach(this.handlers,function(n){n!==null&&e(n)})};var P7=Bf,O7=mr,Qk=function(e,r){O7.forEach(e,function(i,a){a!==r&&a.toUpperCase()===r.toUpperCase()&&(e[r]=i,delete e[a])})},Jk={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},R7=Kk,I7=typeof URLSearchParams<"u"?URLSearchParams:R7,k7=FormData,M7={isBrowser:!0,classes:{URLSearchParams:I7,FormData:k7,Blob},protocols:["http","https","file","blob","url","data"]},Nb=M7,F7=mr,N7=uv,dC=Nb,L7=function(e,r){return N7(e,new dC.classes.URLSearchParams,Object.assign({visitor:function(n,i,a,o){return dC.isNode&&F7.isBuffer(n)?(this.append(i,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},r))},Xa=mr;function D7(t){return Xa.matchAll(/\w+|\[(\w*)]/g,t).map(function(e){return e[0]==="[]"?"":e[1]||e[0]})}function B7(t){var e={},r=Object.keys(t),n,i=r.length,a;for(n=0;n=n.length;if(s=!s&&Xa.isArray(a)?a.length:s,l)return Xa.hasOwnProperty(a,s)?a[s]=[a[s],i]:a[s]=i,!u;(!a[s]||!Xa.isObject(a[s]))&&(a[s]=[]);var c=e(n,i,a[s],o);return c&&Xa.isArray(a[s])&&(a[s]=B7(a[s])),!u}if(Xa.isFormData(t)&&Xa.isFunction(t.entries)){var r={};return Xa.forEachEntry(t,function(n,i){e(D7(n),i,r,0)}),r}return null}var eM=j7,gg,pC;function U7(){if(pC)return gg;pC=1;var t=Is;return gg=function(r,n,i){var a=i.config.validateStatus;!i.status||!a||a(i.status)?r(i):n(new t("Request failed with status code "+i.status,[t.ERR_BAD_REQUEST,t.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i))},gg}var yg,vC;function $7(){if(vC)return yg;vC=1;var t=mr;return yg=t.isStandardBrowserEnv()?function(){return{write:function(n,i,a,o,s,u){var l=[];l.push(n+"="+encodeURIComponent(i)),t.isNumber(a)&&l.push("expires="+new Date(a).toGMTString()),t.isString(o)&&l.push("path="+o),t.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(){}}}(),yg}var V7=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)},G7=function(e,r){return r?e.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):e},X7=V7,z7=G7,tM=function(e,r){return e&&!X7(r)?z7(e,r):r},_g,mC;function W7(){if(mC)return _g;mC=1;var t=mr,e=["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 _g=function(n){var i={},a,o,s;return n&&t.forEach(n.split(` -`),function(l){if(s=l.indexOf(":"),a=t.trim(l.slice(0,s)).toLowerCase(),o=t.trim(l.slice(s+1)),a){if(i[a]&&e.indexOf(a)>=0)return;a==="set-cookie"?i[a]=(i[a]?i[a]:[]).concat([o]):i[a]=i[a]?i[a]+", "+o:o}}),i},_g}var xg,gC;function Y7(){if(gC)return xg;gC=1;var t=mr;return xg=t.isStandardBrowserEnv()?function(){var r=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),i;function a(o){var s=o;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=a(window.location.href),function(s){var u=t.isString(s)?a(s):s;return u.protocol===i.protocol&&u.host===i.host}}():function(){return function(){return!0}}(),xg}var bg,yC;function cv(){if(yC)return bg;yC=1;var t=Is,e=mr;function r(n,i,a){t.call(this,n??"canceled",t.ERR_CANCELED,i,a),this.name="CanceledError"}return e.inherits(r,t,{__CANCEL__:!0}),bg=r,bg}var Sg,_C;function H7(){return _C||(_C=1,Sg=function(e){var r=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return r&&r[1]||""}),Sg}var wg,xC;function bC(){if(xC)return wg;xC=1;var t=mr,e=U7(),r=$7(),n=Zk,i=tM,a=W7(),o=Y7(),s=Jk,u=Is,l=cv(),c=H7(),f=Nb;return wg=function(d){return new Promise(function(v,g){var m=d.data,y=d.headers,_=d.responseType,b=d.withXSRFToken,x;function S(){d.cancelToken&&d.cancelToken.unsubscribe(x),d.signal&&d.signal.removeEventListener("abort",x)}t.isFormData(m)&&t.isStandardBrowserEnv()&&delete y["Content-Type"];var w=new XMLHttpRequest;if(d.auth){var T=d.auth.username||"",E=d.auth.password?unescape(encodeURIComponent(d.auth.password)):"";y.Authorization="Basic "+btoa(T+":"+E)}var A=i(d.baseURL,d.url);w.open(d.method.toUpperCase(),n(A,d.params,d.paramsSerializer),!0),w.timeout=d.timeout;function O(){if(w){var k="getAllResponseHeaders"in w?a(w.getAllResponseHeaders()):null,B=!_||_==="text"||_==="json"?w.responseText:w.response,U={data:B,status:w.status,statusText:w.statusText,headers:k,config:d,request:w};e(function(J){v(J),S()},function(J){g(J),S()},U),w=null}}if("onloadend"in w?w.onloadend=O:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(O)},w.onabort=function(){w&&(g(new u("Request aborted",u.ECONNABORTED,d,w)),w=null)},w.onerror=function(){g(new u("Network Error",u.ERR_NETWORK,d,w)),w=null},w.ontimeout=function(){var B=d.timeout?"timeout of "+d.timeout+"ms exceeded":"timeout exceeded",U=d.transitional||s;d.timeoutErrorMessage&&(B=d.timeoutErrorMessage),g(new u(B,U.clarifyTimeoutError?u.ETIMEDOUT:u.ECONNABORTED,d,w)),w=null},t.isStandardBrowserEnv()&&(b&&t.isFunction(b)&&(b=b(d)),b||b!==!1&&o(A))){var P=d.xsrfHeaderName&&d.xsrfCookieName&&r.read(d.xsrfCookieName);P&&(y[d.xsrfHeaderName]=P)}"setRequestHeader"in w&&t.forEach(y,function(B,U){typeof m>"u"&&U.toLowerCase()==="content-type"?delete y[U]:w.setRequestHeader(U,B)}),t.isUndefined(d.withCredentials)||(w.withCredentials=!!d.withCredentials),_&&_!=="json"&&(w.responseType=d.responseType),typeof d.onDownloadProgress=="function"&&w.addEventListener("progress",d.onDownloadProgress),typeof d.onUploadProgress=="function"&&w.upload&&w.upload.addEventListener("progress",d.onUploadProgress),(d.cancelToken||d.signal)&&(x=function(k){w&&(g(!k||k.type?new l(null,d,req):k),w.abort(),w=null)},d.cancelToken&&d.cancelToken.subscribe(x),d.signal&&(d.signal.aborted?x():d.signal.addEventListener("abort",x))),!m&&m!==!1&&m!==0&&m!==""&&(m=null);var F=c(A);if(F&&f.protocols.indexOf(F)===-1){g(new u("Unsupported protocol "+F+":",u.ERR_BAD_REQUEST,d));return}w.send(m)})},wg}var lr=mr,SC=Qk,wC=Is,q7=Jk,K7=uv,Z7=L7,EC=Nb,Q7=eM,J7={"Content-Type":"application/x-www-form-urlencoded"};function TC(t,e){!lr.isUndefined(t)&&lr.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}function eK(){var t;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(t=bC()),t}function tK(t,e,r){if(lr.isString(t))try{return(e||JSON.parse)(t),lr.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}var fv={transitional:q7,adapter:eK(),transformRequest:[function(e,r){SC(r,"Accept"),SC(r,"Content-Type");var n=r&&r["Content-Type"]||"",i=n.indexOf("application/json")>-1,a=lr.isObject(e);a&&lr.isHTMLForm(e)&&(e=new FormData(e));var o=lr.isFormData(e);if(o)return i?JSON.stringify(Q7(e)):e;if(lr.isArrayBuffer(e)||lr.isBuffer(e)||lr.isStream(e)||lr.isFile(e)||lr.isBlob(e))return e;if(lr.isArrayBufferView(e))return e.buffer;if(lr.isURLSearchParams(e))return TC(r,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var s;if(a){if(n.indexOf("application/x-www-form-urlencoded")!==-1)return Z7(e,this.formSerializer).toString();if((s=lr.isFileList(e))||n.indexOf("multipart/form-data")>-1){var u=this.env&&this.env.FormData;return K7(s?{"files[]":e}:e,u&&new u,this.formSerializer)}}return a||i?(TC(r,"application/json"),tK(e)):e}],transformResponse:[function(e){var r=this.transitional||fv.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(e&&lr.isString(e)&&(n&&!this.responseType||i)){var a=r&&r.silentJSONParsing,o=!a&&i;try{return JSON.parse(e)}catch(s){if(o)throw s.name==="SyntaxError"?wC.from(s,wC.ERR_BAD_RESPONSE,this,null,this.response):s}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:EC.classes.FormData,Blob:EC.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};lr.forEach(["delete","get","head"],function(e){fv.headers[e]={}});lr.forEach(["post","put","patch"],function(e){fv.headers[e]=lr.merge(J7)});var Lb=fv,rK=mr,nK=Lb,iK=function(e,r,n,i){var a=this||nK;return rK.forEach(i,function(s){e=s.call(a,e,r,n)}),e},Eg,AC;function rM(){return AC||(AC=1,Eg=function(e){return!!(e&&e.__CANCEL__)}),Eg}var CC=mr,Tg=iK,aK=rM(),oK=Lb,sK=cv(),PC=Qk;function Ag(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new sK}var lK=function(e){Ag(e),e.headers=e.headers||{},e.data=Tg.call(e,e.data,e.headers,null,e.transformRequest),PC(e.headers,"Accept"),PC(e.headers,"Content-Type"),e.headers=CC.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),CC.forEach(["delete","get","head","post","put","patch","common"],function(i){delete e.headers[i]});var r=e.adapter||oK.adapter;return r(e).then(function(i){return Ag(e),i.data=Tg.call(e,i.data,i.headers,i.status,e.transformResponse),i},function(i){return aK(i)||(Ag(e),i&&i.response&&(i.response.data=Tg.call(e,i.response.data,i.response.headers,i.response.status,e.transformResponse))),Promise.reject(i)})},nn=mr,nM=function(e,r){r=r||{};var n={};function i(c,f){return nn.isPlainObject(c)&&nn.isPlainObject(f)?nn.merge(c,f):nn.isEmptyObject(f)?nn.merge({},c):nn.isPlainObject(f)?nn.merge({},f):nn.isArray(f)?f.slice():f}function a(c){if(nn.isUndefined(r[c])){if(!nn.isUndefined(e[c]))return i(void 0,e[c])}else return i(e[c],r[c])}function o(c){if(!nn.isUndefined(r[c]))return i(void 0,r[c])}function s(c){if(nn.isUndefined(r[c])){if(!nn.isUndefined(e[c]))return i(void 0,e[c])}else return i(void 0,r[c])}function u(c){if(c in r)return i(e[c],r[c]);if(c in e)return i(void 0,e[c])}var l={url:o,method:o,data:o,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 nn.forEach(Object.keys(e).concat(Object.keys(r)),function(f){var h=l[f]||a,d=h(f);nn.isUndefined(d)&&h!==u||(n[f]=d)}),n},Cg,OC;function iM(){return OC||(OC=1,Cg={version:"0.28.0"}),Cg}var uK=iM().version,Wa=Is,Db={};["object","boolean","number","function","string","symbol"].forEach(function(t,e){Db[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});var RC={};Db.transitional=function(e,r,n){function i(a,o){return"[Axios v"+uK+"] Transitional option '"+a+"'"+o+(n?". "+n:"")}return function(a,o,s){if(e===!1)throw new Wa(i(o," has been removed"+(r?" in "+r:"")),Wa.ERR_DEPRECATED);return r&&!RC[o]&&(RC[o]=!0,console.warn(i(o," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(a,o,s):!0}};function cK(t,e,r){if(typeof t!="object")throw new Wa("options must be an object",Wa.ERR_BAD_OPTION_VALUE);for(var n=Object.keys(t),i=n.length;i-- >0;){var a=n[i],o=e[a];if(o){var s=t[a],u=s===void 0||o(s,a,t);if(u!==!0)throw new Wa("option "+a+" must be "+u,Wa.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Wa("Unknown option "+a,Wa.ERR_BAD_OPTION)}}var fK={assertOptions:cK,validators:Db},Bb=mr,hK=Zk,IC=P7,kC=lK,hv=nM,dK=tM,aM=fK,$s=aM.validators;function Ll(t){this.defaults=t,this.interceptors={request:new IC,response:new IC}}Ll.prototype.request=function(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=hv(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&&aM.assertOptions(n,{silentJSONParsing:$s.transitional($s.boolean),forcedJSONParsing:$s.transitional($s.boolean),clarifyTimeoutError:$s.transitional($s.boolean)},!1);var i=r.paramsSerializer;Bb.isFunction(i)&&(r.paramsSerializer={serialize:i});var a=[],o=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(r)===!1||(o=o&&p.synchronous,a.unshift(p.fulfilled,p.rejected))});var s=[];this.interceptors.response.forEach(function(p){s.push(p.fulfilled,p.rejected)});var u;if(!o){var l=[kC,void 0];for(Array.prototype.unshift.apply(l,a),l=l.concat(s),u=Promise.resolve(r);l.length;)u=u.then(l.shift(),l.shift());return u}for(var c=r;a.length;){var f=a.shift(),h=a.shift();try{c=f(c)}catch(d){h(d);break}}try{u=kC(c)}catch(d){return Promise.reject(d)}for(;s.length;)u=u.then(s.shift(),s.shift());return u};Ll.prototype.getUri=function(e){e=hv(this.defaults,e);var r=dK(e.baseURL,e.url);return hK(r,e.params,e.paramsSerializer)};Bb.forEach(["delete","get","head","options"],function(e){Ll.prototype[e]=function(r,n){return this.request(hv(n||{},{method:e,url:r,data:(n||{}).data}))}});Bb.forEach(["post","put","patch"],function(e){function r(n){return function(a,o,s){return this.request(hv(s||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}Ll.prototype[e]=r(),Ll.prototype[e+"Form"]=r(!0)});var pK=Ll,Pg,MC;function vK(){if(MC)return Pg;MC=1;var t=cv();function e(r){if(typeof r!="function")throw new TypeError("executor must be a function.");var n;this.promise=new Promise(function(o){n=o});var i=this;this.promise.then(function(a){if(i._listeners){for(var o=i._listeners.length;o-- >0;)i._listeners[o](a);i._listeners=null}}),this.promise.then=function(a){var o,s=new Promise(function(u){i.subscribe(u),o=u}).then(a);return s.cancel=function(){i.unsubscribe(o)},s},r(function(o,s,u){i.reason||(i.reason=new t(o,s,u),n(i.reason))})}return e.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},e.prototype.subscribe=function(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]},e.prototype.unsubscribe=function(n){if(this._listeners){var i=this._listeners.indexOf(n);i!==-1&&this._listeners.splice(i,1)}},e.source=function(){var n,i=new e(function(o){n=o});return{token:i,cancel:n}},Pg=e,Pg}var Og,FC;function mK(){return FC||(FC=1,Og=function(e){return function(n){return e.apply(null,n)}}),Og}var Rg,NC;function gK(){if(NC)return Rg;NC=1;var t=mr;return Rg=function(r){return t.isObject(r)&&r.isAxiosError===!0},Rg}var W0=mr,yK=Uk,sd=pK,_K=nM,xK=Lb,bK=eM;function oM(t){var e=new sd(t),r=yK(sd.prototype.request,e);return W0.extend(r,sd.prototype,e),W0.extend(r,e),r.create=function(i){return oM(_K(t,i))},r}var pn=oM(xK);pn.Axios=sd;pn.CanceledError=cv();pn.CancelToken=vK();pn.isCancel=rM();pn.VERSION=iM().version;pn.toFormData=uv;pn.AxiosError=Is;pn.Cancel=pn.CanceledError;pn.all=function(e){return Promise.all(e)};pn.spread=mK();pn.isAxiosError=gK();pn.formToJSON=function(t){return bK(W0.isHTMLForm(t)?new FormData(t):t)};Rb.exports=pn;Rb.exports.default=pn;var SK=Rb.exports,wK=SK;const Wc=Rn(wK),la=t=>new Promise(e=>{Wc.get(t).then(r=>{const n=r.data.toString();e(n)})});var EK="__lodash_hash_undefined__";function TK(t){return this.__data__.set(t,EK),this}var AK=TK;function CK(t){return this.__data__.has(t)}var PK=CK,OK=fb,RK=AK,IK=PK;function tp(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new OK;++e-1}var zK=XK;function WK(t,e,r){for(var n=-1,i=t==null?0:t.length;++n=uZ){var l=e?null:sZ(t);if(l)return lZ(l);o=!1,i=oZ,u=new nZ}else u=e?[]:s;e:for(;++n{for(const e of t)D.sceneManager.settledScenes.includes(e)?Se.warn(`场景${e}已经加载过,无需再次加载`):(Se.info(`现在预加载场景${e}`),la(e).then(r=>{ua(r,e,e)}))},vZ=(t,e)=>{D.sceneManager.sceneData.sceneStack.push({sceneName:D.sceneManager.sceneData.currentScene.sceneName,sceneUrl:D.sceneManager.sceneData.currentScene.sceneUrl,continueLine:D.sceneManager.sceneData.currentSentenceId}),la(t).then(r=>{D.sceneManager.sceneData.currentScene=ua(r,e,t),D.sceneManager.sceneData.currentSentenceId=0;const n=D.sceneManager.sceneData.currentScene.subSceneList;D.sceneManager.settledScenes.push(t);const i=jf(n);Uf(i),Se.debug("现在调用场景,调用结果:",D.sceneManager.sceneData),Fr()})},mZ=t=>{const e=t.content.split("/"),r=e[e.length-1];return vZ(t.content,r),{performName:"none",duration:0,isHoldOn:!0,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function Yc(t,e,r){let n;const a=te.getState().stage.effects.find(o=>o.target===t);if(e.duration=500,r&&typeof r=="number"&&(e.duration=r),n=[e],a){const o={...a.transform,duration:0};n.unshift(o)}else{const o={...e,alpha:0,duration:0};n.unshift(o)}return n}function uM(t,e){const r=D.gameplay.pixiStage.getStageObjByKey(t);function n(){r&&(r.pixiContainer.alpha=0)}function i(){r&&(r.pixiContainer.alpha=1)}function a(o){if(r){const s=r.pixiContainer,u=D.gameplay.pixiStage.frameDuration,c=1/(e/u*o);s.alpha<1&&(s.alpha+=c)}}return{setStartState:n,setEndState:i,tickerFunc:a}}function cM(t,e){const r=D.gameplay.pixiStage.getStageObjByKey(t);function n(){}function i(){r&&(r.pixiContainer.alpha=0)}function a(o){if(r){const s=r.pixiContainer,u=D.gameplay.pixiStage.frameDuration,c=1/(e/u*o);s.alpha>0&&(s.alpha-=c)}}return{setStartState:n,setEndState:i,tickerFunc:a}}const Ub={alpha:1,scale:{x:1,y:1},position:{x:0,y:0},rotation:0,blur:0};function fM(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);iMath.min(Math.max(r,t),e),kg=.001,yZ=.01,DC=10,_Z=.05,xZ=1;function bZ({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let i,a;gZ(t<=DC*1e3);let o=1-e;o=Y0(_Z,xZ,o),t=Y0(yZ,DC,t/1e3),o<1?(i=l=>{const c=l*o,f=c*t,h=c-r,d=H0(l,o),p=Math.exp(-f);return kg-h/d*p},a=l=>{const f=l*o*t,h=f*r+r,d=Math.pow(o,2)*Math.pow(l,2)*t,p=Math.exp(-f),v=H0(Math.pow(l,2),o);return(-i(l)+kg>0?-1:1)*((h-d)*p)/v}):(i=l=>{const c=Math.exp(-l*t),f=(l-r)*t+1;return-kg+c*f},a=l=>{const c=Math.exp(-l*t),f=(r-l)*(t*t);return c*f});const s=5/t,u=wZ(i,a,s);if(t=t*1e3,isNaN(u))return{stiffness:100,damping:10,duration:t};{const l=Math.pow(u,2)*n;return{stiffness:l,damping:o*2*Math.sqrt(n*l),duration:t}}}const SZ=12;function wZ(t,e,r){let n=r;for(let i=1;it[r]!==void 0)}function AZ(t){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!BC(t,TZ)&&BC(t,EZ)){const r=bZ(t);e=Object.assign(Object.assign(Object.assign({},e),r),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}function $b(t){var{from:e=0,to:r=1,restSpeed:n=2,restDelta:i}=t,a=fM(t,["from","to","restSpeed","restDelta"]);const o={done:!1,value:e};let{stiffness:s,damping:u,mass:l,velocity:c,duration:f,isResolvedFromDuration:h}=AZ(a),d=jC,p=jC;function v(){const g=c?-(c/1e3):0,m=r-e,y=u/(2*Math.sqrt(s*l)),_=Math.sqrt(s/l)/1e3;if(i===void 0&&(i=Math.min(Math.abs(r-e)/100,.4)),y<1){const b=H0(_,y);d=x=>{const S=Math.exp(-y*_*x);return r-S*((g+y*_*m)/b*Math.sin(b*x)+m*Math.cos(b*x))},p=x=>{const S=Math.exp(-y*_*x);return y*_*S*(Math.sin(b*x)*(g+y*_*m)/b+m*Math.cos(b*x))-S*(Math.cos(b*x)*(g+y*_*m)-b*m*Math.sin(b*x))}}else if(y===1)d=b=>r-Math.exp(-_*b)*(m+(g+_*m)*b);else{const b=_*Math.sqrt(y*y-1);d=x=>{const S=Math.exp(-y*_*x),w=Math.min(b*x,300);return r-S*((g+y*_*m)*Math.sinh(w)+b*m*Math.cosh(w))/b}}}return v(),{next:g=>{const m=d(g);if(h)o.done=g>=f;else{const y=p(g)*1e3,_=Math.abs(y)<=n,b=Math.abs(r-m)<=i;o.done=_&&b}return o.value=o.done?r:m,o},flipTarget:()=>{c=-c,[e,r]=[r,e],v()}}}$b.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";const jC=t=>0,hM=(t,e,r)=>{const n=e-t;return n===0?1:(r-t)/n},Vb=(t,e,r)=>-r*t+r*e+t,dM=(t,e)=>r=>Math.max(Math.min(r,e),t),_c=t=>t%1?Number(t.toFixed(5)):t,rp=/(-)?([\d]*\.?[\d])+/g,q0=/(#[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,CZ=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function $f(t){return typeof t=="string"}const dv={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},pM=Object.assign(Object.assign({},dv),{transform:dM(0,1)});Object.assign(Object.assign({},dv),{default:1});const PZ=t=>({test:e=>$f(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),xc=PZ("%");Object.assign(Object.assign({},xc),{parse:t=>xc.parse(t)/100,transform:t=>xc.transform(t*100)});const Gb=(t,e)=>r=>!!($f(r)&&CZ.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),vM=(t,e,r)=>n=>{if(!$f(n))return n;const[i,a,o,s]=n.match(rp);return{[t]:parseFloat(i),[e]:parseFloat(a),[r]:parseFloat(o),alpha:s!==void 0?parseFloat(s):1}},es={test:Gb("hsl","hue"),parse:vM("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+xc.transform(_c(e))+", "+xc.transform(_c(r))+", "+_c(pM.transform(n))+")"},OZ=dM(0,255),Mg=Object.assign(Object.assign({},dv),{transform:t=>Math.round(OZ(t))}),eo={test:Gb("rgb","red"),parse:vM("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+Mg.transform(t)+", "+Mg.transform(e)+", "+Mg.transform(r)+", "+_c(pM.transform(n))+")"};function RZ(t){let e="",r="",n="",i="";return t.length>5?(e=t.substr(1,2),r=t.substr(3,2),n=t.substr(5,2),i=t.substr(7,2)):(e=t.substr(1,1),r=t.substr(2,1),n=t.substr(3,1),i=t.substr(4,1),e+=e,r+=r,n+=n,i+=i),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}const K0={test:Gb("#"),parse:RZ,transform:eo.transform},pv={test:t=>eo.test(t)||K0.test(t)||es.test(t),parse:t=>eo.test(t)?eo.parse(t):es.test(t)?es.parse(t):K0.parse(t),transform:t=>$f(t)?t:t.hasOwnProperty("red")?eo.transform(t):es.transform(t)},mM="${c}",gM="${n}";function IZ(t){var e,r,n,i;return isNaN(t)&&$f(t)&&((r=(e=t.match(rp))===null||e===void 0?void 0:e.length)!==null&&r!==void 0?r:0)+((i=(n=t.match(q0))===null||n===void 0?void 0:n.length)!==null&&i!==void 0?i:0)>0}function yM(t){typeof t=="number"&&(t=`${t}`);const e=[];let r=0;const n=t.match(q0);n&&(r=n.length,t=t.replace(q0,mM),e.push(...n.map(pv.parse)));const i=t.match(rp);return i&&(t=t.replace(rp,gM),e.push(...i.map(dv.parse))),{values:e,numColors:r,tokenised:t}}function _M(t){return yM(t).values}function xM(t){const{values:e,numColors:r,tokenised:n}=yM(t),i=e.length;return a=>{let o=n;for(let s=0;stypeof t=="number"?0:t;function MZ(t){const e=_M(t);return xM(t)(e.map(kZ))}const bM={test:IZ,parse:_M,createTransformer:xM,getAnimatableNone:MZ};function Fg(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function UC({hue:t,saturation:e,lightness:r,alpha:n}){t/=360,e/=100,r/=100;let i=0,a=0,o=0;if(!e)i=a=o=r;else{const s=r<.5?r*(1+e):r+e-r*e,u=2*r-s;i=Fg(u,s,t+1/3),a=Fg(u,s,t),o=Fg(u,s,t-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:n}}const FZ=(t,e,r)=>{const n=t*t,i=e*e;return Math.sqrt(Math.max(0,r*(i-n)+n))},NZ=[K0,eo,es],$C=t=>NZ.find(e=>e.test(t)),SM=(t,e)=>{let r=$C(t),n=$C(e),i=r.parse(t),a=n.parse(e);r===es&&(i=UC(i),r=eo),n===es&&(a=UC(a),n=eo);const o=Object.assign({},i);return s=>{for(const u in o)u!=="alpha"&&(o[u]=FZ(i[u],a[u],s));return o.alpha=Vb(i.alpha,a.alpha,s),r.transform(o)}},LZ=t=>typeof t=="number",DZ=(t,e)=>r=>e(t(r)),wM=(...t)=>t.reduce(DZ);function EM(t,e){return LZ(t)?r=>Vb(t,e,r):pv.test(t)?SM(t,e):AM(t,e)}const TM=(t,e)=>{const r=[...t],n=r.length,i=t.map((a,o)=>EM(a,e[o]));return a=>{for(let o=0;o{const r=Object.assign(Object.assign({},t),e),n={};for(const i in r)t[i]!==void 0&&e[i]!==void 0&&(n[i]=EM(t[i],e[i]));return i=>{for(const a in n)r[a]=n[a](i);return r}};function VC(t){const e=bM.parse(t),r=e.length;let n=0,i=0,a=0;for(let o=0;o{const r=bM.createTransformer(e),n=VC(t),i=VC(e);return n.numHSL===i.numHSL&&n.numRGB===i.numRGB&&n.numNumbers>=i.numNumbers?wM(TM(n.parsed,i.parsed),r):o=>`${o>0?e:t}`},jZ=(t,e)=>r=>Vb(t,e,r);function UZ(t){if(typeof t=="number")return jZ;if(typeof t=="string")return pv.test(t)?SM:AM;if(Array.isArray(t))return TM;if(typeof t=="object")return BZ}function $Z(t,e,r){const n=[],i=r||UZ(t[0]),a=t.length-1;for(let o=0;or(hM(t,e,n))}function GZ(t,e){const r=t.length,n=r-1;return i=>{let a=0,o=!1;if(i<=t[0]?o=!0:i>=t[n]&&(a=n-1,o=!0),!o){let u=1;for(;ui||u===n);u++);a=u-1}const s=hM(t[a],t[a+1],i);return e[a](s)}}function CM(t,e,{clamp:r=!0,ease:n,mixer:i}={}){const a=t.length;LC(a===e.length),LC(!n||!Array.isArray(n)||n.length===a-1),t[0]>t[a-1]&&(t=[].concat(t),e=[].concat(e),t.reverse(),e.reverse());const o=$Z(e,n,i),s=a===2?VZ(t,o):GZ(t,o);return r?u=>s(Y0(t[0],t[a-1],u)):s}const XZ=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,zZ=t=>e=>Math.pow(e,t),WZ=t=>e=>e*e*((t+1)*e-t),YZ=t=>{const e=WZ(t);return r=>(r*=2)<1?.5*e(r):.5*(2-Math.pow(2,-10*(r-1)))},HZ=1.525,qZ=zZ(2),KZ=XZ(qZ);YZ(HZ);function ZZ(t,e){return t.map(()=>e||KZ).splice(0,t.length-1)}function QZ(t){const e=t.length;return t.map((r,n)=>n!==0?n/(e-1):0)}function JZ(t,e){return t.map(r=>r*e)}function ld({from:t=0,to:e=1,ease:r,offset:n,duration:i=300}){const a={done:!1,value:t},o=Array.isArray(e)?e:[t,e],s=JZ(n&&n.length===o.length?n:QZ(o),i);function u(){return CM(s,o,{ease:Array.isArray(r)?r:ZZ(o,r)})}let l=u();return{next:c=>(a.value=l(c),a.done=c>=i,a),flipTarget:()=>{o.reverse(),l=u()}}}function eQ({velocity:t=0,from:e=0,power:r=.8,timeConstant:n=350,restDelta:i=.5,modifyTarget:a}){const o={done:!1,value:e};let s=r*t;const u=e+s,l=a===void 0?u:a(u);return l!==u&&(s=l-e),{next:c=>{const f=-s*Math.exp(-c/n);return o.done=!(f>i||f<-i),o.value=o.done?l:l+f,o},flipTarget:()=>{}}}const GC={keyframes:ld,spring:$b,decay:eQ};function tQ(t){if(Array.isArray(t.to))return ld;if(GC[t.type])return GC[t.type];const e=new Set(Object.keys(t));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?ld:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?$b:ld}const PM=1/60*1e3,rQ=typeof performance<"u"?()=>performance.now():()=>Date.now(),OM=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(rQ()),PM);function nQ(t){let e=[],r=[],n=0,i=!1,a=!1;const o=new WeakSet,s={schedule:(u,l=!1,c=!1)=>{const f=c&&i,h=f?e:r;return l&&o.add(u),h.indexOf(u)===-1&&(h.push(u),f&&i&&(n=e.length)),u},cancel:u=>{const l=r.indexOf(u);l!==-1&&r.splice(l,1),o.delete(u)},process:u=>{if(i){a=!0;return}if(i=!0,[e,r]=[r,e],r.length=0,n=e.length,n)for(let l=0;l(t[e]=nQ(()=>Hc=!0),t),{}),aQ=Vf.reduce((t,e)=>{const r=vv[e];return t[e]=(n,i=!1,a=!1)=>(Hc||lQ(),r.schedule(n,i,a)),t},{}),oQ=Vf.reduce((t,e)=>(t[e]=vv[e].cancel,t),{});Vf.reduce((t,e)=>(t[e]=()=>vv[e].process(bc),t),{});const sQ=t=>vv[t].process(bc),RM=t=>{Hc=!1,bc.delta=Z0?PM:Math.max(Math.min(t-bc.timestamp,iQ),1),bc.timestamp=t,Q0=!0,Vf.forEach(sQ),Q0=!1,Hc&&(Z0=!1,OM(RM))},lQ=()=>{Hc=!0,Z0=!0,Q0||OM(RM)},uQ=aQ;function IM(t,e,r=0){return t-e-r}function cQ(t,e,r=0,n=!0){return n?IM(e+-t,e,r):e-(t-e)+r}function fQ(t,e,r,n){return n?t>=e+r:t<=-r}const hQ=t=>{const e=({delta:r})=>t(r);return{start:()=>uQ.update(e,!0),stop:()=>oQ.update(e)}};function dQ(t){var e,r,{from:n,autoplay:i=!0,driver:a=hQ,elapsed:o=0,repeat:s=0,repeatType:u="loop",repeatDelay:l=0,onPlay:c,onStop:f,onComplete:h,onRepeat:d,onUpdate:p}=t,v=fM(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:g}=v,m,y=0,_=v.duration,b,x=!1,S=!0,w;const T=tQ(v);!((r=(e=T).needsInterpolation)===null||r===void 0)&&r.call(e,n,g)&&(w=CM([0,100],[n,g],{clamp:!1}),n=0,g=100);const E=T(Object.assign(Object.assign({},v),{from:n,to:g}));function A(){y++,u==="reverse"?(S=y%2===0,o=cQ(o,_,l,S)):(o=IM(o,_,l),u==="mirror"&&E.flipTarget()),x=!1,d&&d()}function O(){m.stop(),h&&h()}function P(k){if(S||(k=-k),o+=k,!x){const B=E.next(Math.max(0,o));b=B.value,w&&(b=w(b)),x=S?B.done:o<=0}p==null||p(b),x&&(y===0&&(_??(_=o)),y{f==null||f(),m.stop()}}}function pQ(t,e){for(var r=-1,n=t==null?0:t.length;++rs))return!1;var l=a.get(t),c=a.get(e);if(l&&c)return l==e&&c==t;var f=-1,h=!0,d=r&xQ?new mQ:void 0;for(a.set(t,e),a.set(e,t);++f0&&(u=dQ({to:a,offset:o,duration:r,onUpdate:m=>{if(s){const{scaleX:y,scaleY:_,...b}=m;Object.assign(s,Dg(b,ma)),ma(y)||(s.scale.x=y),ma(_)||(s.scale.y=_)}}}));const{duration:l,...c}=v();te.dispatch(Sn.updateEffect({target:e,transform:c}));function f(){if(n!=null&&n.pixiContainer){const{position:m,scale:y,..._}=p(),b=Dg({x:m.x,y:m.y,..._},ma);Object.assign(n==null?void 0:n.pixiContainer,b),n!=null&&n.pixiContainer&&(ma(y.x)||(n.pixiContainer.scale.x=y.x),ma(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,..._}=v(),b=Dg({x:m.x,y:m.y,..._},ma);Object.assign(n==null?void 0:n.pixiContainer,b),n!=null&&n.pixiContainer&&(ma(y.x)||(n.pixiContainer.scale.x=y.x),ma(y==null?void 0:y.y)||(n.pixiContainer.scale.y=y.y))}}function d(m){}function p(){return t[0]}function v(){return t[t.length-1]}function g(){const m=t[t.length-1],{alpha:y,rotation:_,blur:b,duration:x,scale:S,position:w,...T}=m;return T}return{setStartState:f,setEndState:h,tickerFunc:d,getEndFilterEffect:g}}function np(t,e,r){const n=D.animationManager.getAnimations().find(i=>i.name===t);if(n){const i=n.effects.map(a=>{const o=te.getState().stage.effects.find(u=>u.target===e),s=ar({...(o==null?void 0:o.transform)??Ub,duration:0});return Object.assign(s,a),s.duration=a.duration,s});return Se.debug("装载自定义动画",i),$M(i,e,r)}return null}function wn(t){const e=D.animationManager.getAnimations().find(r=>r.name===t);if(e){let r=0;return e.effects.forEach(n=>{r+=n.duration}),r}return 0}function Ka(t,e,r=!1){if(e==="enter"){let n=500;r&&(n=1500);let i=uM(t,n);const a=D.animationManager.nextEnterAnimationName.get(t);return a&&(Se.debug("取代默认进入动画",t),i=np(a,t,wn(a)),n=wn(a),D.animationManager.nextEnterAnimationName.delete(t)),{duration:n,animation:i}}else{let n=750;r&&(n=1500);let i=cM(t,n);const a=D.animationManager.nextExitAnimationName.get(t);return a&&(Se.debug("取代默认退出动画",t),i=np(a,t,wn(a)),n=wn(a),D.animationManager.nextExitAnimationName.delete(t)),{duration:n,animation:i}}}const Cte=t=>{const e=t.content;let r="",n="default";t.args.forEach(l=>{l.key==="unlockname"&&(r=l.value.toString()),l.key==="series"&&(n=l.value.toString())});const i=te.dispatch;r!==""&&i(kk({name:r,url:e,series:n})),i(Sn.removeEffectByTargetId("bg-main"));const a=He(t,"transform");let o=He(t,"duration");(!o||typeof o!="number")&&(o=1e3);let s;if(a)try{const l=JSON.parse(a.toString());s=Yc("bg-main",l,o),s[0].alpha=0;const c=(Math.random()*10).toString(16),f={name:c,effects:s};D.animationManager.addAnimation(f),o=wn(c),D.animationManager.nextEnterAnimationName.set("bg-main",c)}catch{u()}else u();function u(){s=Yc("bg-main",{},o),s[0].alpha=0;const c=(Math.random()*10).toString(16),f={name:c,effects:s};D.animationManager.addAnimation(f),o=wn(c),D.animationManager.nextEnterAnimationName.set("bg-main",c)}return He(t,"enter")&&(D.animationManager.nextEnterAnimationName.set("bg-main",He(t,"enter").toString()),o=wn(He(t,"enter").toString())),He(t,"exit")&&(D.animationManager.nextExitAnimationName.set("bg-main-off",He(t,"exit").toString()),o=wn(He(t,"exit").toString())),i(Ge({key:"bgName",value:t.content})),{performName:"none",duration:o,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function Pte(t){let e="center",r=t.content,n=!1,i="",a="",o="",s=500,u="",l="",c="",f="",h="",d="";const p=te.dispatch;for(const x of t.args)switch(x.key){case"left":x.value===!0&&(e="left");break;case"right":x.value===!0&&(e="right");break;case"clear":x.value===!0&&(r="");break;case"id":n=!0,o=x.value.toString();break;case"motion":i=x.value.toString();break;case"expression":a=x.value.toString();break;case"mouthOpen":u=x.value.toString(),u=Nn(u,Fn.figure);break;case"mouthClose":l=x.value.toString(),l=Nn(l,Fn.figure);break;case"mouthHalfOpen":c=x.value.toString(),c=Nn(c,Fn.figure);break;case"eyesOpen":f=x.value.toString(),f=Nn(f,Fn.figure);break;case"eyesClose":h=x.value.toString(),h=Nn(h,Fn.figure);break;case"animationFlag":d=x.value.toString();break;case"none":r="";break}const v=o||`fig-${e}`,m=te.getState().stage.figureAssociatedAnimation.filter(x=>x.targetId!==v),y={targetId:v,animationFlag:d,mouthAnimation:{open:u,close:l,halfOpen:c},blinkAnimation:{open:f,close:h}};m.push(y),p(Ge({key:"figureAssociatedAnimation",value:m}));let _=!0;if(o!==""){const x=te.getState().stage.freeFigure.find(S=>S.key===o);x&&x.name===t.content&&(_=!1)}else e==="center"&&te.getState().stage.figName===t.content&&(_=!1),e==="left"&&te.getState().stage.figNameLeft===t.content&&(_=!1),e==="right"&&te.getState().stage.figNameRight===t.content&&(_=!1);if(_){const x=`fig-${e}`,S=`${o}`;te.dispatch(Sn.removeEffectByTargetId(x)),te.dispatch(Sn.removeEffectByTargetId(S))}const b=(x,S)=>{const w=He(S,"transform"),T=He(S,"duration");T&&typeof T=="number"&&(s=T);let E;if(w){console.log(w);try{const F=JSON.parse(w.toString());E=Yc(x,F,s),E[0].alpha=0;const k=(Math.random()*10).toString(16),B={name:k,effects:E};D.animationManager.addAnimation(B),s=wn(k),D.animationManager.nextEnterAnimationName.set(x,k)}catch{A()}}else A();function A(){E=Yc(x,{},s),E[0].alpha=0;const k=(Math.random()*10).toString(16),B={name:k,effects:E};D.animationManager.addAnimation(B),s=wn(k),D.animationManager.nextEnterAnimationName.set(x,k)}const O=He(S,"enter"),P=He(S,"exit");O&&(D.animationManager.nextEnterAnimationName.set(x,O.toString()),s=wn(O.toString())),P&&(D.animationManager.nextExitAnimationName.set(x+"-off",P.toString()),s=wn(P.toString()))};if(n){te.getState().stage.freeFigure;const x={key:o,name:r,basePosition:e};b(o,t),i&&p(Sn.setLive2dMotion({target:o,motion:i})),a&&p(Sn.setLive2dExpression({target:o,expression:a})),p(Sn.setFreeFigureByKey(x))}else{const x={center:"fig-center",left:"fig-left",right:"fig-right"},S={center:"figName",left:"figNameLeft",right:"figNameRight"};o=x[e],b(o,t),i&&p(Sn.setLive2dMotion({target:o,motion:i})),a&&p(Sn.setLive2dExpression({target:o,expression:a})),p(Ge({key:S[e],value:r}))}return{performName:"none",duration:s,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!1,stopTimeout:void 0}}const VM=(t,e)=>{la(t).then(r=>{D.sceneManager.sceneData.currentScene=ua(r,e,t),D.sceneManager.sceneData.currentSentenceId=0;const n=D.sceneManager.sceneData.currentScene.subSceneList;D.sceneManager.settledScenes.push(t);const i=jf(n);Uf(i),Se.debug("现在切换场景,切换后的结果:",D.sceneManager.sceneData),Fr()})},Ote=t=>{const e=t.content.split("/"),r=e[e.length-1];return VM(t.content,r),{performName:"none",duration:0,isHoldOn:!0,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}},GM=t=>{const e=D.sceneManager.sceneData.currentSentenceId;let r=e;D.sceneManager.sceneData.currentScene.sentenceList.forEach((n,i)=>{n.command===Qe.label&&n.content===t&&i!==e&&(r=i)}),D.sceneManager.sceneData.currentSentenceId=r,setTimeout(Fr,1)},Rte="_Choose_Main_cegqk_1",Ite="_Choose_item_cegqk_13",kte="_Choose_item_disabled_cegqk_29",Bg={Choose_Main:Rte,Choose_item:Ite,Choose_item_disabled:kte},Mte=""+new URL("page-flip-1-7df32409.mp3",import.meta.url).href,Fte=""+new URL("switch-1-99b576bc.mp3",import.meta.url).href,XM="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=",Nte=""+new URL("dialog-d5b91235.mp3",import.meta.url).href,zM="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 WM={exports:{}},YM={};/** +`,"")}}function He(t,e){const n=t.args.find(i=>i.key===e);return n?n.value:null}const Gq=t=>{let e=t.content,r="",n="default";t.args.forEach(o=>{o.key==="unlockname"&&(r=o.value.toString()),o.key==="series"&&(n=o.value.toString())});const i=He(t,"enter"),a=He(t,"volume");return r!==""&&te.dispatch(Fk({name:r,url:e,series:n})),hS(e,typeof i=="number"&&i>=0?i:0,typeof a=="number"&&a>=0&&a<=100?a:100),{performName:"none",duration:0,isHoldOn:!0,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};var Rb={exports:{}},$k=function(e,r){return function(){return e.apply(r,arguments)}},Xq=$k,Ib=Object.prototype.toString,kb=function(t){return function(e){var r=Ib.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())}}(Object.create(null));function Io(t){return t=t.toLowerCase(),function(r){return kb(r)===t}}function lv(t){return Array.isArray(t)}function G0(t){return typeof t>"u"}function zq(t){return t!==null&&!G0(t)&&t.constructor!==null&&!G0(t.constructor)&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}var Vk=Io("ArrayBuffer");function Wq(t){var e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Vk(t.buffer),e}function Yq(t){return typeof t=="string"}function Gk(t){return typeof t=="number"}function Xk(t){return t!==null&&typeof t=="object"}function od(t){if(kb(t)!=="object")return!1;var e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function Hq(t){return t&&Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}var qq=Io("Date"),Kq=Io("File"),Zq=Io("Blob"),Qq=Io("FileList");function Mb(t){return Ib.call(t)==="[object Function]"}function Jq(t){return Xk(t)&&Mb(t.pipe)}function e7(t){var e="[object FormData]";return t&&(typeof FormData=="function"&&t instanceof FormData||Ib.call(t)===e||Mb(t.toString)&&t.toString()===e)}var t7=Io("URLSearchParams");function r7(t){return t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}function n7(){var t;return typeof navigator<"u"&&((t=navigator.product)==="ReactNative"||t==="NativeScript"||t==="NS")?!1:typeof window<"u"&&typeof document<"u"}function Fb(t,e){if(!(t===null||typeof t>"u"))if(typeof t!="object"&&(t=[t]),lv(t))for(var r=0,n=t.length;r0;)o=i[a],(!n||n(o,t,e))&&!s[o]&&(e[o]=t[o],s[o]=!0);t=r!==!1&&Object.getPrototypeOf(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e}function l7(t,e,r){t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;var n=t.indexOf(e,r);return n!==-1&&n===r}function u7(t){if(!t)return null;if(lv(t))return t;var e=t.length;if(!Gk(e))return null;for(var r=new Array(e);e-- >0;)r[e]=t[e];return r}var c7=function(t){return function(e){return t&&e instanceof t}}(typeof Uint8Array<"u"&&Object.getPrototypeOf(Uint8Array));function f7(t,e){for(var r=t&&t[Symbol.iterator],n=r.call(t),i;(i=n.next())&&!i.done;){var a=i.value;e.call(t,a[0],a[1])}}function h7(t,e){for(var r,n=[];(r=t.exec(e))!==null;)n.push(r);return n}var d7=Io("HTMLFormElement"),p7=function(e){return function(r,n){return e.call(r,n)}}(Object.prototype.hasOwnProperty),mr={isArray:lv,isArrayBuffer:Vk,isBuffer:zq,isFormData:e7,isArrayBufferView:Wq,isString:Yq,isNumber:Gk,isObject:Xk,isPlainObject:od,isEmptyObject:Hq,isUndefined:G0,isDate:qq,isFile:Kq,isBlob:Zq,isFunction:Mb,isStream:Jq,isURLSearchParams:t7,isStandardBrowserEnv:n7,forEach:Fb,merge:X0,extend:i7,trim:r7,stripBOM:a7,inherits:o7,toFlatObject:s7,kindOf:kb,kindOfTest:Io,endsWith:l7,toArray:u7,isTypedArray:c7,isFileList:Qq,forEachEntry:f7,matchAll:h7,isHTMLForm:d7,hasOwnProperty:p7},zk=mr;function Nl(t,e,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i)}zk.inherits(Nl,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 Wk=Nl.prototype,Yk={};["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(t){Yk[t]={value:t}});Object.defineProperties(Nl,Yk);Object.defineProperty(Wk,"isAxiosError",{value:!0});Nl.from=function(t,e,r,n,i,a){var o=Object.create(Wk);return zk.toFlatObject(t,o,function(u){return u!==Error.prototype}),Nl.call(o,t.message,e,r,n,i),o.cause=t,o.name=t.name,a&&Object.assign(o,a),o};var Is=Nl,v7=typeof self=="object"?self.FormData:window.FormData,m7=v7,xt=mr,g7=Is,y7=m7;function z0(t){return xt.isPlainObject(t)||xt.isArray(t)}function Hk(t){return xt.endsWith(t,"[]")?t.slice(0,-2):t}function hC(t,e,r){return t?t.concat(e).map(function(i,a){return i=Hk(i),!r&&a?"["+i+"]":i}).join(r?".":""):e}function _7(t){return xt.isArray(t)&&!t.some(z0)}var x7=xt.toFlatObject(xt,{},null,function(e){return/^is[A-Z]/.test(e)});function b7(t){return t&&xt.isFunction(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator]}function S7(t,e,r){if(!xt.isObject(t))throw new TypeError("target must be an object");e=e||new(y7||FormData),r=xt.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,g){return!xt.isUndefined(g[v])});var n=r.metaTokens,i=r.visitor||c,a=r.dots,o=r.indexes,s=r.Blob||typeof Blob<"u"&&Blob,u=s&&b7(e);if(!xt.isFunction(i))throw new TypeError("visitor must be a function");function l(p){if(p===null)return"";if(xt.isDate(p))return p.toISOString();if(!u&&xt.isBlob(p))throw new g7("Blob is not supported. Use a Buffer instead.");return xt.isArrayBuffer(p)||xt.isTypedArray(p)?u&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function c(p,v,g){var m=p;if(p&&!g&&typeof p=="object"){if(xt.endsWith(v,"{}"))v=n?v:v.slice(0,-2),p=JSON.stringify(p);else if(xt.isArray(p)&&_7(p)||xt.isFileList(p)||xt.endsWith(v,"[]")&&(m=xt.toArray(p)))return v=Hk(v),m.forEach(function(_,b){!xt.isUndefined(_)&&e.append(o===!0?hC([v],b,a):o===null?v:v+"[]",l(_))}),!1}return z0(p)?!0:(e.append(hC(g,v,a),l(p)),!1)}var f=[],h=Object.assign(x7,{defaultVisitor:c,convertValue:l,isVisitable:z0});function d(p,v){if(!xt.isUndefined(p)){if(f.indexOf(p)!==-1)throw Error("Circular reference detected in "+v.join("."));f.push(p),xt.forEach(p,function(m,y){var _=!xt.isUndefined(m)&&i.call(e,m,xt.isString(y)?y.trim():y,v,h);_===!0&&d(m,v?v.concat(y):[y])}),f.pop()}}if(!xt.isObject(t))throw new TypeError("data must be an object");return d(t),e}var uv=S7,w7=uv;function dC(t){var e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'\(\)~]|%20|%00/g,function(n){return e[n]})}function qk(t,e){this._pairs=[],t&&w7(t,this,e)}var Kk=qk.prototype;Kk.append=function(e,r){this._pairs.push([e,r])};Kk.toString=function(e){var r=e?function(n){return e.call(this,n,dC)}:dC;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};var Zk=qk,E7=mr,T7=Zk;function A7(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var Qk=function(e,r,n){if(!r)return e;var i=e.indexOf("#");i!==-1&&(e=e.slice(0,i));var a=n&&n.encode||A7,o=E7.isURLSearchParams(r)?r.toString():new T7(r,n).toString(a);return o&&(e+=(e.indexOf("?")===-1?"?":"&")+o),e},C7=mr;function Bf(){this.handlers=[]}Bf.prototype.use=function(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1};Bf.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)};Bf.prototype.clear=function(){this.handlers&&(this.handlers=[])};Bf.prototype.forEach=function(e){C7.forEach(this.handlers,function(n){n!==null&&e(n)})};var P7=Bf,O7=mr,Jk=function(e,r){O7.forEach(e,function(i,a){a!==r&&a.toUpperCase()===r.toUpperCase()&&(e[r]=i,delete e[a])})},eM={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},R7=Zk,I7=typeof URLSearchParams<"u"?URLSearchParams:R7,k7=FormData,M7={isBrowser:!0,classes:{URLSearchParams:I7,FormData:k7,Blob},protocols:["http","https","file","blob","url","data"]},Nb=M7,F7=mr,N7=uv,pC=Nb,L7=function(e,r){return N7(e,new pC.classes.URLSearchParams,Object.assign({visitor:function(n,i,a,o){return pC.isNode&&F7.isBuffer(n)?(this.append(i,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},r))},Xa=mr;function D7(t){return Xa.matchAll(/\w+|\[(\w*)]/g,t).map(function(e){return e[0]==="[]"?"":e[1]||e[0]})}function B7(t){var e={},r=Object.keys(t),n,i=r.length,a;for(n=0;n=n.length;if(s=!s&&Xa.isArray(a)?a.length:s,l)return Xa.hasOwnProperty(a,s)?a[s]=[a[s],i]:a[s]=i,!u;(!a[s]||!Xa.isObject(a[s]))&&(a[s]=[]);var c=e(n,i,a[s],o);return c&&Xa.isArray(a[s])&&(a[s]=B7(a[s])),!u}if(Xa.isFormData(t)&&Xa.isFunction(t.entries)){var r={};return Xa.forEachEntry(t,function(n,i){e(D7(n),i,r,0)}),r}return null}var tM=j7,gg,vC;function U7(){if(vC)return gg;vC=1;var t=Is;return gg=function(r,n,i){var a=i.config.validateStatus;!i.status||!a||a(i.status)?r(i):n(new t("Request failed with status code "+i.status,[t.ERR_BAD_REQUEST,t.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i))},gg}var yg,mC;function $7(){if(mC)return yg;mC=1;var t=mr;return yg=t.isStandardBrowserEnv()?function(){return{write:function(n,i,a,o,s,u){var l=[];l.push(n+"="+encodeURIComponent(i)),t.isNumber(a)&&l.push("expires="+new Date(a).toGMTString()),t.isString(o)&&l.push("path="+o),t.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(){}}}(),yg}var V7=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)},G7=function(e,r){return r?e.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):e},X7=V7,z7=G7,rM=function(e,r){return e&&!X7(r)?z7(e,r):r},_g,gC;function W7(){if(gC)return _g;gC=1;var t=mr,e=["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 _g=function(n){var i={},a,o,s;return n&&t.forEach(n.split(` +`),function(l){if(s=l.indexOf(":"),a=t.trim(l.slice(0,s)).toLowerCase(),o=t.trim(l.slice(s+1)),a){if(i[a]&&e.indexOf(a)>=0)return;a==="set-cookie"?i[a]=(i[a]?i[a]:[]).concat([o]):i[a]=i[a]?i[a]+", "+o:o}}),i},_g}var xg,yC;function Y7(){if(yC)return xg;yC=1;var t=mr;return xg=t.isStandardBrowserEnv()?function(){var r=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),i;function a(o){var s=o;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=a(window.location.href),function(s){var u=t.isString(s)?a(s):s;return u.protocol===i.protocol&&u.host===i.host}}():function(){return function(){return!0}}(),xg}var bg,_C;function cv(){if(_C)return bg;_C=1;var t=Is,e=mr;function r(n,i,a){t.call(this,n??"canceled",t.ERR_CANCELED,i,a),this.name="CanceledError"}return e.inherits(r,t,{__CANCEL__:!0}),bg=r,bg}var Sg,xC;function H7(){return xC||(xC=1,Sg=function(e){var r=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return r&&r[1]||""}),Sg}var wg,bC;function SC(){if(bC)return wg;bC=1;var t=mr,e=U7(),r=$7(),n=Qk,i=rM,a=W7(),o=Y7(),s=eM,u=Is,l=cv(),c=H7(),f=Nb;return wg=function(d){return new Promise(function(v,g){var m=d.data,y=d.headers,_=d.responseType,b=d.withXSRFToken,x;function S(){d.cancelToken&&d.cancelToken.unsubscribe(x),d.signal&&d.signal.removeEventListener("abort",x)}t.isFormData(m)&&t.isStandardBrowserEnv()&&delete y["Content-Type"];var w=new XMLHttpRequest;if(d.auth){var T=d.auth.username||"",E=d.auth.password?unescape(encodeURIComponent(d.auth.password)):"";y.Authorization="Basic "+btoa(T+":"+E)}var A=i(d.baseURL,d.url);w.open(d.method.toUpperCase(),n(A,d.params,d.paramsSerializer),!0),w.timeout=d.timeout;function O(){if(w){var k="getAllResponseHeaders"in w?a(w.getAllResponseHeaders()):null,B=!_||_==="text"||_==="json"?w.responseText:w.response,U={data:B,status:w.status,statusText:w.statusText,headers:k,config:d,request:w};e(function(J){v(J),S()},function(J){g(J),S()},U),w=null}}if("onloadend"in w?w.onloadend=O:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(O)},w.onabort=function(){w&&(g(new u("Request aborted",u.ECONNABORTED,d,w)),w=null)},w.onerror=function(){g(new u("Network Error",u.ERR_NETWORK,d,w)),w=null},w.ontimeout=function(){var B=d.timeout?"timeout of "+d.timeout+"ms exceeded":"timeout exceeded",U=d.transitional||s;d.timeoutErrorMessage&&(B=d.timeoutErrorMessage),g(new u(B,U.clarifyTimeoutError?u.ETIMEDOUT:u.ECONNABORTED,d,w)),w=null},t.isStandardBrowserEnv()&&(b&&t.isFunction(b)&&(b=b(d)),b||b!==!1&&o(A))){var P=d.xsrfHeaderName&&d.xsrfCookieName&&r.read(d.xsrfCookieName);P&&(y[d.xsrfHeaderName]=P)}"setRequestHeader"in w&&t.forEach(y,function(B,U){typeof m>"u"&&U.toLowerCase()==="content-type"?delete y[U]:w.setRequestHeader(U,B)}),t.isUndefined(d.withCredentials)||(w.withCredentials=!!d.withCredentials),_&&_!=="json"&&(w.responseType=d.responseType),typeof d.onDownloadProgress=="function"&&w.addEventListener("progress",d.onDownloadProgress),typeof d.onUploadProgress=="function"&&w.upload&&w.upload.addEventListener("progress",d.onUploadProgress),(d.cancelToken||d.signal)&&(x=function(k){w&&(g(!k||k.type?new l(null,d,req):k),w.abort(),w=null)},d.cancelToken&&d.cancelToken.subscribe(x),d.signal&&(d.signal.aborted?x():d.signal.addEventListener("abort",x))),!m&&m!==!1&&m!==0&&m!==""&&(m=null);var F=c(A);if(F&&f.protocols.indexOf(F)===-1){g(new u("Unsupported protocol "+F+":",u.ERR_BAD_REQUEST,d));return}w.send(m)})},wg}var lr=mr,wC=Jk,EC=Is,q7=eM,K7=uv,Z7=L7,TC=Nb,Q7=tM,J7={"Content-Type":"application/x-www-form-urlencoded"};function AC(t,e){!lr.isUndefined(t)&&lr.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}function eK(){var t;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(t=SC()),t}function tK(t,e,r){if(lr.isString(t))try{return(e||JSON.parse)(t),lr.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}var fv={transitional:q7,adapter:eK(),transformRequest:[function(e,r){wC(r,"Accept"),wC(r,"Content-Type");var n=r&&r["Content-Type"]||"",i=n.indexOf("application/json")>-1,a=lr.isObject(e);a&&lr.isHTMLForm(e)&&(e=new FormData(e));var o=lr.isFormData(e);if(o)return i?JSON.stringify(Q7(e)):e;if(lr.isArrayBuffer(e)||lr.isBuffer(e)||lr.isStream(e)||lr.isFile(e)||lr.isBlob(e))return e;if(lr.isArrayBufferView(e))return e.buffer;if(lr.isURLSearchParams(e))return AC(r,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var s;if(a){if(n.indexOf("application/x-www-form-urlencoded")!==-1)return Z7(e,this.formSerializer).toString();if((s=lr.isFileList(e))||n.indexOf("multipart/form-data")>-1){var u=this.env&&this.env.FormData;return K7(s?{"files[]":e}:e,u&&new u,this.formSerializer)}}return a||i?(AC(r,"application/json"),tK(e)):e}],transformResponse:[function(e){var r=this.transitional||fv.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(e&&lr.isString(e)&&(n&&!this.responseType||i)){var a=r&&r.silentJSONParsing,o=!a&&i;try{return JSON.parse(e)}catch(s){if(o)throw s.name==="SyntaxError"?EC.from(s,EC.ERR_BAD_RESPONSE,this,null,this.response):s}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:TC.classes.FormData,Blob:TC.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};lr.forEach(["delete","get","head"],function(e){fv.headers[e]={}});lr.forEach(["post","put","patch"],function(e){fv.headers[e]=lr.merge(J7)});var Lb=fv,rK=mr,nK=Lb,iK=function(e,r,n,i){var a=this||nK;return rK.forEach(i,function(s){e=s.call(a,e,r,n)}),e},Eg,CC;function nM(){return CC||(CC=1,Eg=function(e){return!!(e&&e.__CANCEL__)}),Eg}var PC=mr,Tg=iK,aK=nM(),oK=Lb,sK=cv(),OC=Jk;function Ag(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new sK}var lK=function(e){Ag(e),e.headers=e.headers||{},e.data=Tg.call(e,e.data,e.headers,null,e.transformRequest),OC(e.headers,"Accept"),OC(e.headers,"Content-Type"),e.headers=PC.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),PC.forEach(["delete","get","head","post","put","patch","common"],function(i){delete e.headers[i]});var r=e.adapter||oK.adapter;return r(e).then(function(i){return Ag(e),i.data=Tg.call(e,i.data,i.headers,i.status,e.transformResponse),i},function(i){return aK(i)||(Ag(e),i&&i.response&&(i.response.data=Tg.call(e,i.response.data,i.response.headers,i.response.status,e.transformResponse))),Promise.reject(i)})},nn=mr,iM=function(e,r){r=r||{};var n={};function i(c,f){return nn.isPlainObject(c)&&nn.isPlainObject(f)?nn.merge(c,f):nn.isEmptyObject(f)?nn.merge({},c):nn.isPlainObject(f)?nn.merge({},f):nn.isArray(f)?f.slice():f}function a(c){if(nn.isUndefined(r[c])){if(!nn.isUndefined(e[c]))return i(void 0,e[c])}else return i(e[c],r[c])}function o(c){if(!nn.isUndefined(r[c]))return i(void 0,r[c])}function s(c){if(nn.isUndefined(r[c])){if(!nn.isUndefined(e[c]))return i(void 0,e[c])}else return i(void 0,r[c])}function u(c){if(c in r)return i(e[c],r[c]);if(c in e)return i(void 0,e[c])}var l={url:o,method:o,data:o,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 nn.forEach(Object.keys(e).concat(Object.keys(r)),function(f){var h=l[f]||a,d=h(f);nn.isUndefined(d)&&h!==u||(n[f]=d)}),n},Cg,RC;function aM(){return RC||(RC=1,Cg={version:"0.28.0"}),Cg}var uK=aM().version,Wa=Is,Db={};["object","boolean","number","function","string","symbol"].forEach(function(t,e){Db[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});var IC={};Db.transitional=function(e,r,n){function i(a,o){return"[Axios v"+uK+"] Transitional option '"+a+"'"+o+(n?". "+n:"")}return function(a,o,s){if(e===!1)throw new Wa(i(o," has been removed"+(r?" in "+r:"")),Wa.ERR_DEPRECATED);return r&&!IC[o]&&(IC[o]=!0,console.warn(i(o," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(a,o,s):!0}};function cK(t,e,r){if(typeof t!="object")throw new Wa("options must be an object",Wa.ERR_BAD_OPTION_VALUE);for(var n=Object.keys(t),i=n.length;i-- >0;){var a=n[i],o=e[a];if(o){var s=t[a],u=s===void 0||o(s,a,t);if(u!==!0)throw new Wa("option "+a+" must be "+u,Wa.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Wa("Unknown option "+a,Wa.ERR_BAD_OPTION)}}var fK={assertOptions:cK,validators:Db},Bb=mr,hK=Qk,kC=P7,MC=lK,hv=iM,dK=rM,oM=fK,$s=oM.validators;function Ll(t){this.defaults=t,this.interceptors={request:new kC,response:new kC}}Ll.prototype.request=function(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=hv(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&&oM.assertOptions(n,{silentJSONParsing:$s.transitional($s.boolean),forcedJSONParsing:$s.transitional($s.boolean),clarifyTimeoutError:$s.transitional($s.boolean)},!1);var i=r.paramsSerializer;Bb.isFunction(i)&&(r.paramsSerializer={serialize:i});var a=[],o=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(r)===!1||(o=o&&p.synchronous,a.unshift(p.fulfilled,p.rejected))});var s=[];this.interceptors.response.forEach(function(p){s.push(p.fulfilled,p.rejected)});var u;if(!o){var l=[MC,void 0];for(Array.prototype.unshift.apply(l,a),l=l.concat(s),u=Promise.resolve(r);l.length;)u=u.then(l.shift(),l.shift());return u}for(var c=r;a.length;){var f=a.shift(),h=a.shift();try{c=f(c)}catch(d){h(d);break}}try{u=MC(c)}catch(d){return Promise.reject(d)}for(;s.length;)u=u.then(s.shift(),s.shift());return u};Ll.prototype.getUri=function(e){e=hv(this.defaults,e);var r=dK(e.baseURL,e.url);return hK(r,e.params,e.paramsSerializer)};Bb.forEach(["delete","get","head","options"],function(e){Ll.prototype[e]=function(r,n){return this.request(hv(n||{},{method:e,url:r,data:(n||{}).data}))}});Bb.forEach(["post","put","patch"],function(e){function r(n){return function(a,o,s){return this.request(hv(s||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}Ll.prototype[e]=r(),Ll.prototype[e+"Form"]=r(!0)});var pK=Ll,Pg,FC;function vK(){if(FC)return Pg;FC=1;var t=cv();function e(r){if(typeof r!="function")throw new TypeError("executor must be a function.");var n;this.promise=new Promise(function(o){n=o});var i=this;this.promise.then(function(a){if(i._listeners){for(var o=i._listeners.length;o-- >0;)i._listeners[o](a);i._listeners=null}}),this.promise.then=function(a){var o,s=new Promise(function(u){i.subscribe(u),o=u}).then(a);return s.cancel=function(){i.unsubscribe(o)},s},r(function(o,s,u){i.reason||(i.reason=new t(o,s,u),n(i.reason))})}return e.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},e.prototype.subscribe=function(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]},e.prototype.unsubscribe=function(n){if(this._listeners){var i=this._listeners.indexOf(n);i!==-1&&this._listeners.splice(i,1)}},e.source=function(){var n,i=new e(function(o){n=o});return{token:i,cancel:n}},Pg=e,Pg}var Og,NC;function mK(){return NC||(NC=1,Og=function(e){return function(n){return e.apply(null,n)}}),Og}var Rg,LC;function gK(){if(LC)return Rg;LC=1;var t=mr;return Rg=function(r){return t.isObject(r)&&r.isAxiosError===!0},Rg}var W0=mr,yK=$k,sd=pK,_K=iM,xK=Lb,bK=tM;function sM(t){var e=new sd(t),r=yK(sd.prototype.request,e);return W0.extend(r,sd.prototype,e),W0.extend(r,e),r.create=function(i){return sM(_K(t,i))},r}var pn=sM(xK);pn.Axios=sd;pn.CanceledError=cv();pn.CancelToken=vK();pn.isCancel=nM();pn.VERSION=aM().version;pn.toFormData=uv;pn.AxiosError=Is;pn.Cancel=pn.CanceledError;pn.all=function(e){return Promise.all(e)};pn.spread=mK();pn.isAxiosError=gK();pn.formToJSON=function(t){return bK(W0.isHTMLForm(t)?new FormData(t):t)};Rb.exports=pn;Rb.exports.default=pn;var SK=Rb.exports,wK=SK;const Wc=Rn(wK),la=t=>new Promise(e=>{Wc.get(t).then(r=>{const n=r.data.toString();e(n)})});var EK="__lodash_hash_undefined__";function TK(t){return this.__data__.set(t,EK),this}var AK=TK;function CK(t){return this.__data__.has(t)}var PK=CK,OK=fb,RK=AK,IK=PK;function tp(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new OK;++e-1}var zK=XK;function WK(t,e,r){for(var n=-1,i=t==null?0:t.length;++n=uZ){var l=e?null:sZ(t);if(l)return lZ(l);o=!1,i=oZ,u=new nZ}else u=e?[]:s;e:for(;++n{for(const e of t)D.sceneManager.settledScenes.includes(e)?Se.warn(`场景${e}已经加载过,无需再次加载`):(Se.info(`现在预加载场景${e}`),la(e).then(r=>{ua(r,e,e)}))},vZ=(t,e)=>{D.sceneManager.sceneData.sceneStack.push({sceneName:D.sceneManager.sceneData.currentScene.sceneName,sceneUrl:D.sceneManager.sceneData.currentScene.sceneUrl,continueLine:D.sceneManager.sceneData.currentSentenceId}),la(t).then(r=>{D.sceneManager.sceneData.currentScene=ua(r,e,t),D.sceneManager.sceneData.currentSentenceId=0;const n=D.sceneManager.sceneData.currentScene.subSceneList;D.sceneManager.settledScenes.push(t);const i=jf(n);Uf(i),Se.debug("现在调用场景,调用结果:",D.sceneManager.sceneData),Fr()})},mZ=t=>{const e=t.content.split("/"),r=e[e.length-1];return vZ(t.content,r),{performName:"none",duration:0,isHoldOn:!0,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function Yc(t,e,r){let n;const a=te.getState().stage.effects.find(o=>o.target===t);if(e.duration=500,r&&typeof r=="number"&&(e.duration=r),n=[e],a){const o={...a.transform,duration:0};n.unshift(o)}else{const o={...e,alpha:0,duration:0};n.unshift(o)}return n}function cM(t,e){const r=D.gameplay.pixiStage.getStageObjByKey(t);function n(){r&&(r.pixiContainer.alpha=0)}function i(){r&&(r.pixiContainer.alpha=1)}function a(o){if(r){const s=r.pixiContainer,u=D.gameplay.pixiStage.frameDuration,c=1/(e/u*o);s.alpha<1&&(s.alpha+=c)}}return{setStartState:n,setEndState:i,tickerFunc:a}}function fM(t,e){const r=D.gameplay.pixiStage.getStageObjByKey(t);function n(){}function i(){r&&(r.pixiContainer.alpha=0)}function a(o){if(r){const s=r.pixiContainer,u=D.gameplay.pixiStage.frameDuration,c=1/(e/u*o);s.alpha>0&&(s.alpha-=c)}}return{setStartState:n,setEndState:i,tickerFunc:a}}const Ub={alpha:1,scale:{x:1,y:1},position:{x:0,y:0},rotation:0,blur:0};function hM(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);iMath.min(Math.max(r,t),e),kg=.001,yZ=.01,BC=10,_Z=.05,xZ=1;function bZ({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let i,a;gZ(t<=BC*1e3);let o=1-e;o=Y0(_Z,xZ,o),t=Y0(yZ,BC,t/1e3),o<1?(i=l=>{const c=l*o,f=c*t,h=c-r,d=H0(l,o),p=Math.exp(-f);return kg-h/d*p},a=l=>{const f=l*o*t,h=f*r+r,d=Math.pow(o,2)*Math.pow(l,2)*t,p=Math.exp(-f),v=H0(Math.pow(l,2),o);return(-i(l)+kg>0?-1:1)*((h-d)*p)/v}):(i=l=>{const c=Math.exp(-l*t),f=(l-r)*t+1;return-kg+c*f},a=l=>{const c=Math.exp(-l*t),f=(r-l)*(t*t);return c*f});const s=5/t,u=wZ(i,a,s);if(t=t*1e3,isNaN(u))return{stiffness:100,damping:10,duration:t};{const l=Math.pow(u,2)*n;return{stiffness:l,damping:o*2*Math.sqrt(n*l),duration:t}}}const SZ=12;function wZ(t,e,r){let n=r;for(let i=1;it[r]!==void 0)}function AZ(t){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!jC(t,TZ)&&jC(t,EZ)){const r=bZ(t);e=Object.assign(Object.assign(Object.assign({},e),r),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}function $b(t){var{from:e=0,to:r=1,restSpeed:n=2,restDelta:i}=t,a=hM(t,["from","to","restSpeed","restDelta"]);const o={done:!1,value:e};let{stiffness:s,damping:u,mass:l,velocity:c,duration:f,isResolvedFromDuration:h}=AZ(a),d=UC,p=UC;function v(){const g=c?-(c/1e3):0,m=r-e,y=u/(2*Math.sqrt(s*l)),_=Math.sqrt(s/l)/1e3;if(i===void 0&&(i=Math.min(Math.abs(r-e)/100,.4)),y<1){const b=H0(_,y);d=x=>{const S=Math.exp(-y*_*x);return r-S*((g+y*_*m)/b*Math.sin(b*x)+m*Math.cos(b*x))},p=x=>{const S=Math.exp(-y*_*x);return y*_*S*(Math.sin(b*x)*(g+y*_*m)/b+m*Math.cos(b*x))-S*(Math.cos(b*x)*(g+y*_*m)-b*m*Math.sin(b*x))}}else if(y===1)d=b=>r-Math.exp(-_*b)*(m+(g+_*m)*b);else{const b=_*Math.sqrt(y*y-1);d=x=>{const S=Math.exp(-y*_*x),w=Math.min(b*x,300);return r-S*((g+y*_*m)*Math.sinh(w)+b*m*Math.cosh(w))/b}}}return v(),{next:g=>{const m=d(g);if(h)o.done=g>=f;else{const y=p(g)*1e3,_=Math.abs(y)<=n,b=Math.abs(r-m)<=i;o.done=_&&b}return o.value=o.done?r:m,o},flipTarget:()=>{c=-c,[e,r]=[r,e],v()}}}$b.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";const UC=t=>0,dM=(t,e,r)=>{const n=e-t;return n===0?1:(r-t)/n},Vb=(t,e,r)=>-r*t+r*e+t,pM=(t,e)=>r=>Math.max(Math.min(r,e),t),_c=t=>t%1?Number(t.toFixed(5)):t,rp=/(-)?([\d]*\.?[\d])+/g,q0=/(#[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,CZ=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function $f(t){return typeof t=="string"}const dv={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},vM=Object.assign(Object.assign({},dv),{transform:pM(0,1)});Object.assign(Object.assign({},dv),{default:1});const PZ=t=>({test:e=>$f(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),xc=PZ("%");Object.assign(Object.assign({},xc),{parse:t=>xc.parse(t)/100,transform:t=>xc.transform(t*100)});const Gb=(t,e)=>r=>!!($f(r)&&CZ.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),mM=(t,e,r)=>n=>{if(!$f(n))return n;const[i,a,o,s]=n.match(rp);return{[t]:parseFloat(i),[e]:parseFloat(a),[r]:parseFloat(o),alpha:s!==void 0?parseFloat(s):1}},es={test:Gb("hsl","hue"),parse:mM("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+xc.transform(_c(e))+", "+xc.transform(_c(r))+", "+_c(vM.transform(n))+")"},OZ=pM(0,255),Mg=Object.assign(Object.assign({},dv),{transform:t=>Math.round(OZ(t))}),eo={test:Gb("rgb","red"),parse:mM("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+Mg.transform(t)+", "+Mg.transform(e)+", "+Mg.transform(r)+", "+_c(vM.transform(n))+")"};function RZ(t){let e="",r="",n="",i="";return t.length>5?(e=t.substr(1,2),r=t.substr(3,2),n=t.substr(5,2),i=t.substr(7,2)):(e=t.substr(1,1),r=t.substr(2,1),n=t.substr(3,1),i=t.substr(4,1),e+=e,r+=r,n+=n,i+=i),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}const K0={test:Gb("#"),parse:RZ,transform:eo.transform},pv={test:t=>eo.test(t)||K0.test(t)||es.test(t),parse:t=>eo.test(t)?eo.parse(t):es.test(t)?es.parse(t):K0.parse(t),transform:t=>$f(t)?t:t.hasOwnProperty("red")?eo.transform(t):es.transform(t)},gM="${c}",yM="${n}";function IZ(t){var e,r,n,i;return isNaN(t)&&$f(t)&&((r=(e=t.match(rp))===null||e===void 0?void 0:e.length)!==null&&r!==void 0?r:0)+((i=(n=t.match(q0))===null||n===void 0?void 0:n.length)!==null&&i!==void 0?i:0)>0}function _M(t){typeof t=="number"&&(t=`${t}`);const e=[];let r=0;const n=t.match(q0);n&&(r=n.length,t=t.replace(q0,gM),e.push(...n.map(pv.parse)));const i=t.match(rp);return i&&(t=t.replace(rp,yM),e.push(...i.map(dv.parse))),{values:e,numColors:r,tokenised:t}}function xM(t){return _M(t).values}function bM(t){const{values:e,numColors:r,tokenised:n}=_M(t),i=e.length;return a=>{let o=n;for(let s=0;stypeof t=="number"?0:t;function MZ(t){const e=xM(t);return bM(t)(e.map(kZ))}const SM={test:IZ,parse:xM,createTransformer:bM,getAnimatableNone:MZ};function Fg(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function $C({hue:t,saturation:e,lightness:r,alpha:n}){t/=360,e/=100,r/=100;let i=0,a=0,o=0;if(!e)i=a=o=r;else{const s=r<.5?r*(1+e):r+e-r*e,u=2*r-s;i=Fg(u,s,t+1/3),a=Fg(u,s,t),o=Fg(u,s,t-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:n}}const FZ=(t,e,r)=>{const n=t*t,i=e*e;return Math.sqrt(Math.max(0,r*(i-n)+n))},NZ=[K0,eo,es],VC=t=>NZ.find(e=>e.test(t)),wM=(t,e)=>{let r=VC(t),n=VC(e),i=r.parse(t),a=n.parse(e);r===es&&(i=$C(i),r=eo),n===es&&(a=$C(a),n=eo);const o=Object.assign({},i);return s=>{for(const u in o)u!=="alpha"&&(o[u]=FZ(i[u],a[u],s));return o.alpha=Vb(i.alpha,a.alpha,s),r.transform(o)}},LZ=t=>typeof t=="number",DZ=(t,e)=>r=>e(t(r)),EM=(...t)=>t.reduce(DZ);function TM(t,e){return LZ(t)?r=>Vb(t,e,r):pv.test(t)?wM(t,e):CM(t,e)}const AM=(t,e)=>{const r=[...t],n=r.length,i=t.map((a,o)=>TM(a,e[o]));return a=>{for(let o=0;o{const r=Object.assign(Object.assign({},t),e),n={};for(const i in r)t[i]!==void 0&&e[i]!==void 0&&(n[i]=TM(t[i],e[i]));return i=>{for(const a in n)r[a]=n[a](i);return r}};function GC(t){const e=SM.parse(t),r=e.length;let n=0,i=0,a=0;for(let o=0;o{const r=SM.createTransformer(e),n=GC(t),i=GC(e);return n.numHSL===i.numHSL&&n.numRGB===i.numRGB&&n.numNumbers>=i.numNumbers?EM(AM(n.parsed,i.parsed),r):o=>`${o>0?e:t}`},jZ=(t,e)=>r=>Vb(t,e,r);function UZ(t){if(typeof t=="number")return jZ;if(typeof t=="string")return pv.test(t)?wM:CM;if(Array.isArray(t))return AM;if(typeof t=="object")return BZ}function $Z(t,e,r){const n=[],i=r||UZ(t[0]),a=t.length-1;for(let o=0;or(dM(t,e,n))}function GZ(t,e){const r=t.length,n=r-1;return i=>{let a=0,o=!1;if(i<=t[0]?o=!0:i>=t[n]&&(a=n-1,o=!0),!o){let u=1;for(;ui||u===n);u++);a=u-1}const s=dM(t[a],t[a+1],i);return e[a](s)}}function PM(t,e,{clamp:r=!0,ease:n,mixer:i}={}){const a=t.length;DC(a===e.length),DC(!n||!Array.isArray(n)||n.length===a-1),t[0]>t[a-1]&&(t=[].concat(t),e=[].concat(e),t.reverse(),e.reverse());const o=$Z(e,n,i),s=a===2?VZ(t,o):GZ(t,o);return r?u=>s(Y0(t[0],t[a-1],u)):s}const XZ=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,zZ=t=>e=>Math.pow(e,t),WZ=t=>e=>e*e*((t+1)*e-t),YZ=t=>{const e=WZ(t);return r=>(r*=2)<1?.5*e(r):.5*(2-Math.pow(2,-10*(r-1)))},HZ=1.525,qZ=zZ(2),KZ=XZ(qZ);YZ(HZ);function ZZ(t,e){return t.map(()=>e||KZ).splice(0,t.length-1)}function QZ(t){const e=t.length;return t.map((r,n)=>n!==0?n/(e-1):0)}function JZ(t,e){return t.map(r=>r*e)}function ld({from:t=0,to:e=1,ease:r,offset:n,duration:i=300}){const a={done:!1,value:t},o=Array.isArray(e)?e:[t,e],s=JZ(n&&n.length===o.length?n:QZ(o),i);function u(){return PM(s,o,{ease:Array.isArray(r)?r:ZZ(o,r)})}let l=u();return{next:c=>(a.value=l(c),a.done=c>=i,a),flipTarget:()=>{o.reverse(),l=u()}}}function eQ({velocity:t=0,from:e=0,power:r=.8,timeConstant:n=350,restDelta:i=.5,modifyTarget:a}){const o={done:!1,value:e};let s=r*t;const u=e+s,l=a===void 0?u:a(u);return l!==u&&(s=l-e),{next:c=>{const f=-s*Math.exp(-c/n);return o.done=!(f>i||f<-i),o.value=o.done?l:l+f,o},flipTarget:()=>{}}}const XC={keyframes:ld,spring:$b,decay:eQ};function tQ(t){if(Array.isArray(t.to))return ld;if(XC[t.type])return XC[t.type];const e=new Set(Object.keys(t));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?ld:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?$b:ld}const OM=1/60*1e3,rQ=typeof performance<"u"?()=>performance.now():()=>Date.now(),RM=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(rQ()),OM);function nQ(t){let e=[],r=[],n=0,i=!1,a=!1;const o=new WeakSet,s={schedule:(u,l=!1,c=!1)=>{const f=c&&i,h=f?e:r;return l&&o.add(u),h.indexOf(u)===-1&&(h.push(u),f&&i&&(n=e.length)),u},cancel:u=>{const l=r.indexOf(u);l!==-1&&r.splice(l,1),o.delete(u)},process:u=>{if(i){a=!0;return}if(i=!0,[e,r]=[r,e],r.length=0,n=e.length,n)for(let l=0;l(t[e]=nQ(()=>Hc=!0),t),{}),aQ=Vf.reduce((t,e)=>{const r=vv[e];return t[e]=(n,i=!1,a=!1)=>(Hc||lQ(),r.schedule(n,i,a)),t},{}),oQ=Vf.reduce((t,e)=>(t[e]=vv[e].cancel,t),{});Vf.reduce((t,e)=>(t[e]=()=>vv[e].process(bc),t),{});const sQ=t=>vv[t].process(bc),IM=t=>{Hc=!1,bc.delta=Z0?OM:Math.max(Math.min(t-bc.timestamp,iQ),1),bc.timestamp=t,Q0=!0,Vf.forEach(sQ),Q0=!1,Hc&&(Z0=!1,RM(IM))},lQ=()=>{Hc=!0,Z0=!0,Q0||RM(IM)},uQ=aQ;function kM(t,e,r=0){return t-e-r}function cQ(t,e,r=0,n=!0){return n?kM(e+-t,e,r):e-(t-e)+r}function fQ(t,e,r,n){return n?t>=e+r:t<=-r}const hQ=t=>{const e=({delta:r})=>t(r);return{start:()=>uQ.update(e,!0),stop:()=>oQ.update(e)}};function dQ(t){var e,r,{from:n,autoplay:i=!0,driver:a=hQ,elapsed:o=0,repeat:s=0,repeatType:u="loop",repeatDelay:l=0,onPlay:c,onStop:f,onComplete:h,onRepeat:d,onUpdate:p}=t,v=hM(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:g}=v,m,y=0,_=v.duration,b,x=!1,S=!0,w;const T=tQ(v);!((r=(e=T).needsInterpolation)===null||r===void 0)&&r.call(e,n,g)&&(w=PM([0,100],[n,g],{clamp:!1}),n=0,g=100);const E=T(Object.assign(Object.assign({},v),{from:n,to:g}));function A(){y++,u==="reverse"?(S=y%2===0,o=cQ(o,_,l,S)):(o=kM(o,_,l),u==="mirror"&&E.flipTarget()),x=!1,d&&d()}function O(){m.stop(),h&&h()}function P(k){if(S||(k=-k),o+=k,!x){const B=E.next(Math.max(0,o));b=B.value,w&&(b=w(b)),x=S?B.done:o<=0}p==null||p(b),x&&(y===0&&(_??(_=o)),y{f==null||f(),m.stop()}}}function pQ(t,e){for(var r=-1,n=t==null?0:t.length;++rs))return!1;var l=a.get(t),c=a.get(e);if(l&&c)return l==e&&c==t;var f=-1,h=!0,d=r&xQ?new mQ:void 0;for(a.set(t,e),a.set(e,t);++f0&&(u=dQ({to:a,offset:o,duration:r,onUpdate:m=>{if(s){const{scaleX:y,scaleY:_,...b}=m;Object.assign(s,Dg(b,ma)),ma(y)||(s.scale.x=y),ma(_)||(s.scale.y=_)}}}));const{duration:l,...c}=v();te.dispatch(Sn.updateEffect({target:e,transform:c}));function f(){if(n!=null&&n.pixiContainer){const{position:m,scale:y,..._}=p(),b=Dg({x:m.x,y:m.y,..._},ma);Object.assign(n==null?void 0:n.pixiContainer,b),n!=null&&n.pixiContainer&&(ma(y.x)||(n.pixiContainer.scale.x=y.x),ma(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,..._}=v(),b=Dg({x:m.x,y:m.y,..._},ma);Object.assign(n==null?void 0:n.pixiContainer,b),n!=null&&n.pixiContainer&&(ma(y.x)||(n.pixiContainer.scale.x=y.x),ma(y==null?void 0:y.y)||(n.pixiContainer.scale.y=y.y))}}function d(m){}function p(){return t[0]}function v(){return t[t.length-1]}function g(){const m=t[t.length-1],{alpha:y,rotation:_,blur:b,duration:x,scale:S,position:w,...T}=m;return T}return{setStartState:f,setEndState:h,tickerFunc:d,getEndFilterEffect:g}}function np(t,e,r){const n=D.animationManager.getAnimations().find(i=>i.name===t);if(n){const i=n.effects.map(a=>{const o=te.getState().stage.effects.find(u=>u.target===e),s=ar({...(o==null?void 0:o.transform)??Ub,duration:0});return Object.assign(s,a),s.duration=a.duration,s});return Se.debug("装载自定义动画",i),VM(i,e,r)}return null}function wn(t){const e=D.animationManager.getAnimations().find(r=>r.name===t);if(e){let r=0;return e.effects.forEach(n=>{r+=n.duration}),r}return 0}function Ka(t,e,r=!1){if(e==="enter"){let n=500;r&&(n=1500);let i=cM(t,n);const a=D.animationManager.nextEnterAnimationName.get(t);return a&&(Se.debug("取代默认进入动画",t),i=np(a,t,wn(a)),n=wn(a),D.animationManager.nextEnterAnimationName.delete(t)),{duration:n,animation:i}}else{let n=750;r&&(n=1500);let i=fM(t,n);const a=D.animationManager.nextExitAnimationName.get(t);return a&&(Se.debug("取代默认退出动画",t),i=np(a,t,wn(a)),n=wn(a),D.animationManager.nextExitAnimationName.delete(t)),{duration:n,animation:i}}}const Cte=t=>{const e=t.content;let r="",n="default";t.args.forEach(l=>{l.key==="unlockname"&&(r=l.value.toString()),l.key==="series"&&(n=l.value.toString())});const i=te.dispatch;r!==""&&i(Mk({name:r,url:e,series:n})),i(Sn.removeEffectByTargetId("bg-main"));const a=He(t,"transform");let o=He(t,"duration");(!o||typeof o!="number")&&(o=1e3);let s;if(a)try{const l=JSON.parse(a.toString());s=Yc("bg-main",l,o),s[0].alpha=0;const c=(Math.random()*10).toString(16),f={name:c,effects:s};D.animationManager.addAnimation(f),o=wn(c),D.animationManager.nextEnterAnimationName.set("bg-main",c)}catch{u()}else u();function u(){s=Yc("bg-main",{},o),s[0].alpha=0;const c=(Math.random()*10).toString(16),f={name:c,effects:s};D.animationManager.addAnimation(f),o=wn(c),D.animationManager.nextEnterAnimationName.set("bg-main",c)}return He(t,"enter")&&(D.animationManager.nextEnterAnimationName.set("bg-main",He(t,"enter").toString()),o=wn(He(t,"enter").toString())),He(t,"exit")&&(D.animationManager.nextExitAnimationName.set("bg-main-off",He(t,"exit").toString()),o=wn(He(t,"exit").toString())),i(Ge({key:"bgName",value:t.content})),{performName:"none",duration:o,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function Pte(t){let e="center",r=t.content,n=!1,i="",a="",o="",s=500,u="",l="",c="",f="",h="",d="";const p=te.dispatch;for(const x of t.args)switch(x.key){case"left":x.value===!0&&(e="left");break;case"right":x.value===!0&&(e="right");break;case"clear":x.value===!0&&(r="");break;case"id":n=!0,o=x.value.toString();break;case"motion":i=x.value.toString();break;case"expression":a=x.value.toString();break;case"mouthOpen":u=x.value.toString(),u=Nn(u,Fn.figure);break;case"mouthClose":l=x.value.toString(),l=Nn(l,Fn.figure);break;case"mouthHalfOpen":c=x.value.toString(),c=Nn(c,Fn.figure);break;case"eyesOpen":f=x.value.toString(),f=Nn(f,Fn.figure);break;case"eyesClose":h=x.value.toString(),h=Nn(h,Fn.figure);break;case"animationFlag":d=x.value.toString();break;case"none":r="";break}const v=o||`fig-${e}`,m=te.getState().stage.figureAssociatedAnimation.filter(x=>x.targetId!==v),y={targetId:v,animationFlag:d,mouthAnimation:{open:u,close:l,halfOpen:c},blinkAnimation:{open:f,close:h}};m.push(y),p(Ge({key:"figureAssociatedAnimation",value:m}));let _=!0;if(o!==""){const x=te.getState().stage.freeFigure.find(S=>S.key===o);x&&x.name===t.content&&(_=!1)}else e==="center"&&te.getState().stage.figName===t.content&&(_=!1),e==="left"&&te.getState().stage.figNameLeft===t.content&&(_=!1),e==="right"&&te.getState().stage.figNameRight===t.content&&(_=!1);if(_){const x=`fig-${e}`,S=`${o}`;te.dispatch(Sn.removeEffectByTargetId(x)),te.dispatch(Sn.removeEffectByTargetId(S))}const b=(x,S)=>{const w=He(S,"transform"),T=He(S,"duration");T&&typeof T=="number"&&(s=T);let E;if(w){console.log(w);try{const F=JSON.parse(w.toString());E=Yc(x,F,s),E[0].alpha=0;const k=(Math.random()*10).toString(16),B={name:k,effects:E};D.animationManager.addAnimation(B),s=wn(k),D.animationManager.nextEnterAnimationName.set(x,k)}catch{A()}}else A();function A(){E=Yc(x,{},s),E[0].alpha=0;const k=(Math.random()*10).toString(16),B={name:k,effects:E};D.animationManager.addAnimation(B),s=wn(k),D.animationManager.nextEnterAnimationName.set(x,k)}const O=He(S,"enter"),P=He(S,"exit");O&&(D.animationManager.nextEnterAnimationName.set(x,O.toString()),s=wn(O.toString())),P&&(D.animationManager.nextExitAnimationName.set(x+"-off",P.toString()),s=wn(P.toString()))};if(n){te.getState().stage.freeFigure;const x={key:o,name:r,basePosition:e};b(o,t),i&&p(Sn.setLive2dMotion({target:o,motion:i})),a&&p(Sn.setLive2dExpression({target:o,expression:a})),p(Sn.setFreeFigureByKey(x))}else{const x={center:"fig-center",left:"fig-left",right:"fig-right"},S={center:"figName",left:"figNameLeft",right:"figNameRight"};o=x[e],b(o,t),i&&p(Sn.setLive2dMotion({target:o,motion:i})),a&&p(Sn.setLive2dExpression({target:o,expression:a})),p(Ge({key:S[e],value:r}))}return{performName:"none",duration:s,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!1,stopTimeout:void 0}}const GM=(t,e)=>{la(t).then(r=>{D.sceneManager.sceneData.currentScene=ua(r,e,t),D.sceneManager.sceneData.currentSentenceId=0;const n=D.sceneManager.sceneData.currentScene.subSceneList;D.sceneManager.settledScenes.push(t);const i=jf(n);Uf(i),Se.debug("现在切换场景,切换后的结果:",D.sceneManager.sceneData),Fr()})},Ote=t=>{const e=t.content.split("/"),r=e[e.length-1];return GM(t.content,r),{performName:"none",duration:0,isHoldOn:!0,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}},XM=t=>{const e=D.sceneManager.sceneData.currentSentenceId;let r=e;D.sceneManager.sceneData.currentScene.sentenceList.forEach((n,i)=>{n.command===Qe.label&&n.content===t&&i!==e&&(r=i)}),D.sceneManager.sceneData.currentSentenceId=r,setTimeout(Fr,1)},Rte="_Choose_Main_cegqk_1",Ite="_Choose_item_cegqk_13",kte="_Choose_item_disabled_cegqk_29",Bg={Choose_Main:Rte,Choose_item:Ite,Choose_item_disabled:kte},Mte=""+new URL("page-flip-1-7df32409.mp3",import.meta.url).href,Fte=""+new URL("switch-1-99b576bc.mp3",import.meta.url).href,zM="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=",Nte=""+new URL("dialog-d5b91235.mp3",import.meta.url).href,WM="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 YM={exports:{}},HM={};/** * @license React * use-sync-external-store-shim.production.min.js * @@ -56,7 +56,7 @@ Add a component higher in the tree to provide a loading * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Dl=ne;function Lte(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Dte=typeof Object.is=="function"?Object.is:Lte,Bte=Dl.useState,jte=Dl.useEffect,Ute=Dl.useLayoutEffect,$te=Dl.useDebugValue;function Vte(t,e){var r=e(),n=Bte({inst:{value:r,getSnapshot:e}}),i=n[0].inst,a=n[1];return Ute(function(){i.value=r,i.getSnapshot=e,jg(i)&&a({inst:i})},[t,r,e]),jte(function(){return jg(i)&&a({inst:i}),t(function(){jg(i)&&a({inst:i})})},[t]),$te(r),r}function jg(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!Dte(t,r)}catch{return!0}}function Gte(t,e){return e()}var Xte=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Gte:Vte;YM.useSyncExternalStore=Dl.useSyncExternalStore!==void 0?Dl.useSyncExternalStore:Xte;WM.exports=YM;var zte=WM.exports,HM={exports:{}},qM={};/** + */var Dl=ne;function Lte(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Dte=typeof Object.is=="function"?Object.is:Lte,Bte=Dl.useState,jte=Dl.useEffect,Ute=Dl.useLayoutEffect,$te=Dl.useDebugValue;function Vte(t,e){var r=e(),n=Bte({inst:{value:r,getSnapshot:e}}),i=n[0].inst,a=n[1];return Ute(function(){i.value=r,i.getSnapshot=e,jg(i)&&a({inst:i})},[t,r,e]),jte(function(){return jg(i)&&a({inst:i}),t(function(){jg(i)&&a({inst:i})})},[t]),$te(r),r}function jg(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!Dte(t,r)}catch{return!0}}function Gte(t,e){return e()}var Xte=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Gte:Vte;HM.useSyncExternalStore=Dl.useSyncExternalStore!==void 0?Dl.useSyncExternalStore:Xte;YM.exports=HM;var zte=YM.exports,qM={exports:{}},KM={};/** * @license React * use-sync-external-store-shim/with-selector.production.min.js * @@ -64,14 +64,14 @@ Add a component higher in the tree to provide a loading * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var yv=ne,Wte=zte;function Yte(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Hte=typeof Object.is=="function"?Object.is:Yte,qte=Wte.useSyncExternalStore,Kte=yv.useRef,Zte=yv.useEffect,Qte=yv.useMemo,Jte=yv.useDebugValue;qM.useSyncExternalStoreWithSelector=function(t,e,r,n,i){var a=Kte(null);if(a.current===null){var o={hasValue:!1,value:null};a.current=o}else o=a.current;a=Qte(function(){function u(d){if(!l){if(l=!0,c=d,d=n(d),i!==void 0&&o.hasValue){var p=o.value;if(i(p,d))return f=p}return f=d}if(p=f,Hte(c,d))return p;var v=n(d);return i!==void 0&&i(p,v)?p:(c=d,f=v)}var l=!1,c,f,h=r===void 0?null:r;return[function(){return u(e())},h===null?void 0:function(){return u(h())}]},[e,r,n,i]);var s=qte(t,a[0],a[1]);return Zte(function(){o.hasValue=!0,o.value=s},[s]),Jte(s),s};HM.exports=qM;var ere=HM.exports;function tre(t){t()}let KM=tre;const rre=t=>KM=t,nre=()=>KM,aP=Symbol.for("react-redux-context"),oP=typeof globalThis<"u"?globalThis:{};function ire(){var t;if(!ne.createContext)return{};const e=(t=oP[aP])!=null?t:oP[aP]=new Map;let r=e.get(ne.createContext);return r||(r=ne.createContext(null),e.set(ne.createContext,r)),r}const Eo=ire();function Yb(t=Eo){return function(){return ne.useContext(t)}}const ZM=Yb(),are=()=>{throw new Error("uSES not initialized!")};let QM=are;const ore=t=>{QM=t},sre=(t,e)=>t===e;function lre(t=Eo){const e=t===Eo?ZM:Yb(t);return function(n,i={}){const{equalityFn:a=sre,stabilityCheck:o=void 0,noopCheck:s=void 0}=typeof i=="function"?{equalityFn:i}:i,{store:u,subscription:l,getServerState:c,stabilityCheck:f,noopCheck:h}=e();ne.useRef(!0);const d=ne.useCallback({[n.name](v){return n(v)}}[n.name],[n,f,o]),p=QM(l.addNestedSub,u.getState,c||u.getState,d,a);return ne.useDebugValue(p),p}}const Le=lre();function ure(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 JM={exports:{}},pt={};/** @license React v16.13.1 + */var yv=ne,Wte=zte;function Yte(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Hte=typeof Object.is=="function"?Object.is:Yte,qte=Wte.useSyncExternalStore,Kte=yv.useRef,Zte=yv.useEffect,Qte=yv.useMemo,Jte=yv.useDebugValue;KM.useSyncExternalStoreWithSelector=function(t,e,r,n,i){var a=Kte(null);if(a.current===null){var o={hasValue:!1,value:null};a.current=o}else o=a.current;a=Qte(function(){function u(d){if(!l){if(l=!0,c=d,d=n(d),i!==void 0&&o.hasValue){var p=o.value;if(i(p,d))return f=p}return f=d}if(p=f,Hte(c,d))return p;var v=n(d);return i!==void 0&&i(p,v)?p:(c=d,f=v)}var l=!1,c,f,h=r===void 0?null:r;return[function(){return u(e())},h===null?void 0:function(){return u(h())}]},[e,r,n,i]);var s=qte(t,a[0],a[1]);return Zte(function(){o.hasValue=!0,o.value=s},[s]),Jte(s),s};qM.exports=KM;var ere=qM.exports;function tre(t){t()}let ZM=tre;const rre=t=>ZM=t,nre=()=>ZM,oP=Symbol.for("react-redux-context"),sP=typeof globalThis<"u"?globalThis:{};function ire(){var t;if(!ne.createContext)return{};const e=(t=sP[oP])!=null?t:sP[oP]=new Map;let r=e.get(ne.createContext);return r||(r=ne.createContext(null),e.set(ne.createContext,r)),r}const Eo=ire();function Yb(t=Eo){return function(){return ne.useContext(t)}}const QM=Yb(),are=()=>{throw new Error("uSES not initialized!")};let JM=are;const ore=t=>{JM=t},sre=(t,e)=>t===e;function lre(t=Eo){const e=t===Eo?QM:Yb(t);return function(n,i={}){const{equalityFn:a=sre,stabilityCheck:o=void 0,noopCheck:s=void 0}=typeof i=="function"?{equalityFn:i}:i,{store:u,subscription:l,getServerState:c,stabilityCheck:f,noopCheck:h}=e();ne.useRef(!0);const d=ne.useCallback({[n.name](v){return n(v)}}[n.name],[n,f,o]),p=JM(l.addNestedSub,u.getState,c||u.getState,d,a);return ne.useDebugValue(p),p}}const Le=lre();function ure(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 eF={exports:{}},pt={};/** @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 kr=typeof Symbol=="function"&&Symbol.for,Hb=kr?Symbol.for("react.element"):60103,qb=kr?Symbol.for("react.portal"):60106,_v=kr?Symbol.for("react.fragment"):60107,xv=kr?Symbol.for("react.strict_mode"):60108,bv=kr?Symbol.for("react.profiler"):60114,Sv=kr?Symbol.for("react.provider"):60109,wv=kr?Symbol.for("react.context"):60110,Kb=kr?Symbol.for("react.async_mode"):60111,Ev=kr?Symbol.for("react.concurrent_mode"):60111,Tv=kr?Symbol.for("react.forward_ref"):60112,Av=kr?Symbol.for("react.suspense"):60113,cre=kr?Symbol.for("react.suspense_list"):60120,Cv=kr?Symbol.for("react.memo"):60115,Pv=kr?Symbol.for("react.lazy"):60116,fre=kr?Symbol.for("react.block"):60121,hre=kr?Symbol.for("react.fundamental"):60117,dre=kr?Symbol.for("react.responder"):60118,pre=kr?Symbol.for("react.scope"):60119;function Gn(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case Hb:switch(t=t.type,t){case Kb:case Ev:case _v:case bv:case xv:case Av:return t;default:switch(t=t&&t.$$typeof,t){case wv:case Tv:case Pv:case Cv:case Sv:return t;default:return e}}case qb:return e}}}function eF(t){return Gn(t)===Ev}pt.AsyncMode=Kb;pt.ConcurrentMode=Ev;pt.ContextConsumer=wv;pt.ContextProvider=Sv;pt.Element=Hb;pt.ForwardRef=Tv;pt.Fragment=_v;pt.Lazy=Pv;pt.Memo=Cv;pt.Portal=qb;pt.Profiler=bv;pt.StrictMode=xv;pt.Suspense=Av;pt.isAsyncMode=function(t){return eF(t)||Gn(t)===Kb};pt.isConcurrentMode=eF;pt.isContextConsumer=function(t){return Gn(t)===wv};pt.isContextProvider=function(t){return Gn(t)===Sv};pt.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===Hb};pt.isForwardRef=function(t){return Gn(t)===Tv};pt.isFragment=function(t){return Gn(t)===_v};pt.isLazy=function(t){return Gn(t)===Pv};pt.isMemo=function(t){return Gn(t)===Cv};pt.isPortal=function(t){return Gn(t)===qb};pt.isProfiler=function(t){return Gn(t)===bv};pt.isStrictMode=function(t){return Gn(t)===xv};pt.isSuspense=function(t){return Gn(t)===Av};pt.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===_v||t===Ev||t===bv||t===xv||t===Av||t===cre||typeof t=="object"&&t!==null&&(t.$$typeof===Pv||t.$$typeof===Cv||t.$$typeof===Sv||t.$$typeof===wv||t.$$typeof===Tv||t.$$typeof===hre||t.$$typeof===dre||t.$$typeof===pre||t.$$typeof===fre)};pt.typeOf=Gn;JM.exports=pt;var vre=JM.exports,tF=vre,mre={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},gre={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},rF={};rF[tF.ForwardRef]=mre;rF[tF.Memo]=gre;var gt={};/** + */var kr=typeof Symbol=="function"&&Symbol.for,Hb=kr?Symbol.for("react.element"):60103,qb=kr?Symbol.for("react.portal"):60106,_v=kr?Symbol.for("react.fragment"):60107,xv=kr?Symbol.for("react.strict_mode"):60108,bv=kr?Symbol.for("react.profiler"):60114,Sv=kr?Symbol.for("react.provider"):60109,wv=kr?Symbol.for("react.context"):60110,Kb=kr?Symbol.for("react.async_mode"):60111,Ev=kr?Symbol.for("react.concurrent_mode"):60111,Tv=kr?Symbol.for("react.forward_ref"):60112,Av=kr?Symbol.for("react.suspense"):60113,cre=kr?Symbol.for("react.suspense_list"):60120,Cv=kr?Symbol.for("react.memo"):60115,Pv=kr?Symbol.for("react.lazy"):60116,fre=kr?Symbol.for("react.block"):60121,hre=kr?Symbol.for("react.fundamental"):60117,dre=kr?Symbol.for("react.responder"):60118,pre=kr?Symbol.for("react.scope"):60119;function Gn(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case Hb:switch(t=t.type,t){case Kb:case Ev:case _v:case bv:case xv:case Av:return t;default:switch(t=t&&t.$$typeof,t){case wv:case Tv:case Pv:case Cv:case Sv:return t;default:return e}}case qb:return e}}}function tF(t){return Gn(t)===Ev}pt.AsyncMode=Kb;pt.ConcurrentMode=Ev;pt.ContextConsumer=wv;pt.ContextProvider=Sv;pt.Element=Hb;pt.ForwardRef=Tv;pt.Fragment=_v;pt.Lazy=Pv;pt.Memo=Cv;pt.Portal=qb;pt.Profiler=bv;pt.StrictMode=xv;pt.Suspense=Av;pt.isAsyncMode=function(t){return tF(t)||Gn(t)===Kb};pt.isConcurrentMode=tF;pt.isContextConsumer=function(t){return Gn(t)===wv};pt.isContextProvider=function(t){return Gn(t)===Sv};pt.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===Hb};pt.isForwardRef=function(t){return Gn(t)===Tv};pt.isFragment=function(t){return Gn(t)===_v};pt.isLazy=function(t){return Gn(t)===Pv};pt.isMemo=function(t){return Gn(t)===Cv};pt.isPortal=function(t){return Gn(t)===qb};pt.isProfiler=function(t){return Gn(t)===bv};pt.isStrictMode=function(t){return Gn(t)===xv};pt.isSuspense=function(t){return Gn(t)===Av};pt.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===_v||t===Ev||t===bv||t===xv||t===Av||t===cre||typeof t=="object"&&t!==null&&(t.$$typeof===Pv||t.$$typeof===Cv||t.$$typeof===Sv||t.$$typeof===wv||t.$$typeof===Tv||t.$$typeof===hre||t.$$typeof===dre||t.$$typeof===pre||t.$$typeof===fre)};pt.typeOf=Gn;eF.exports=pt;var vre=eF.exports,rF=vre,mre={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},gre={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},nF={};nF[rF.ForwardRef]=mre;nF[rF.Memo]=gre;var gt={};/** * @license React * react-is.production.min.js * @@ -79,20 +79,20 @@ Add a component higher in the tree to provide a loading * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Zb=Symbol.for("react.element"),Qb=Symbol.for("react.portal"),Ov=Symbol.for("react.fragment"),Rv=Symbol.for("react.strict_mode"),Iv=Symbol.for("react.profiler"),kv=Symbol.for("react.provider"),Mv=Symbol.for("react.context"),yre=Symbol.for("react.server_context"),Fv=Symbol.for("react.forward_ref"),Nv=Symbol.for("react.suspense"),Lv=Symbol.for("react.suspense_list"),Dv=Symbol.for("react.memo"),Bv=Symbol.for("react.lazy"),_re=Symbol.for("react.offscreen"),nF;nF=Symbol.for("react.module.reference");function ai(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case Zb:switch(t=t.type,t){case Ov:case Iv:case Rv:case Nv:case Lv:return t;default:switch(t=t&&t.$$typeof,t){case yre:case Mv:case Fv:case Bv:case Dv:case kv:return t;default:return e}}case Qb:return e}}}gt.ContextConsumer=Mv;gt.ContextProvider=kv;gt.Element=Zb;gt.ForwardRef=Fv;gt.Fragment=Ov;gt.Lazy=Bv;gt.Memo=Dv;gt.Portal=Qb;gt.Profiler=Iv;gt.StrictMode=Rv;gt.Suspense=Nv;gt.SuspenseList=Lv;gt.isAsyncMode=function(){return!1};gt.isConcurrentMode=function(){return!1};gt.isContextConsumer=function(t){return ai(t)===Mv};gt.isContextProvider=function(t){return ai(t)===kv};gt.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===Zb};gt.isForwardRef=function(t){return ai(t)===Fv};gt.isFragment=function(t){return ai(t)===Ov};gt.isLazy=function(t){return ai(t)===Bv};gt.isMemo=function(t){return ai(t)===Dv};gt.isPortal=function(t){return ai(t)===Qb};gt.isProfiler=function(t){return ai(t)===Iv};gt.isStrictMode=function(t){return ai(t)===Rv};gt.isSuspense=function(t){return ai(t)===Nv};gt.isSuspenseList=function(t){return ai(t)===Lv};gt.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===Ov||t===Iv||t===Rv||t===Nv||t===Lv||t===_re||typeof t=="object"&&t!==null&&(t.$$typeof===Bv||t.$$typeof===Dv||t.$$typeof===kv||t.$$typeof===Mv||t.$$typeof===Fv||t.$$typeof===nF||t.getModuleId!==void 0)};gt.typeOf=ai;function xre(){const t=nre();let e=null,r=null;return{clear(){e=null,r=null},notify(){t(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){let n=[],i=e;for(;i;)n.push(i),i=i.next;return n},subscribe(n){let i=!0,a=r={callback:n,next:null,prev:r};return a.prev?a.prev.next=a:e=a,function(){!i||e===null||(i=!1,a.next?a.next.prev=a.prev:r=a.prev,a.prev?a.prev.next=a.next:e=a.next)}}}}const sP={notify(){},get:()=>[]};function bre(t,e){let r,n=sP,i=0,a=!1;function o(v){c();const g=n.subscribe(v);let m=!1;return()=>{m||(m=!0,g(),f())}}function s(){n.notify()}function u(){p.onStateChange&&p.onStateChange()}function l(){return a}function c(){i++,r||(r=e?e.addNestedSub(u):t.subscribe(u),n=xre())}function f(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=sP)}function h(){a||(a=!0,c())}function d(){a&&(a=!1,f())}const p={addNestedSub:o,notifyNestedSubs:s,handleChangeWrapper:u,isSubscribed:l,trySubscribe:h,tryUnsubscribe:d,getListeners:()=>n};return p}const Sre=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",wre=Sre?ne.useLayoutEffect:ne.useEffect;function Ere({store:t,context:e,children:r,serverState:n,stabilityCheck:i="once",noopCheck:a="once"}){const o=ne.useMemo(()=>{const l=bre(t);return{store:t,subscription:l,getServerState:n?()=>n:void 0,stabilityCheck:i,noopCheck:a}},[t,n,i,a]),s=ne.useMemo(()=>t.getState(),[t]);wre(()=>{const{subscription:l}=o;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),s!==t.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[o,s]);const u=e||Eo;return ne.createElement(u.Provider,{value:o},r)}function iF(t=Eo){const e=t===Eo?ZM:Yb(t);return function(){const{store:n}=e();return n}}const Tre=iF();function Are(t=Eo){const e=t===Eo?Tre:iF(t);return function(){return e().dispatch}}const Mr=Are();ore(ere.useSyncExternalStoreWithSelector);rre(II.unstable_batchedUpdates);const gn=()=>{const t=Mr();return{playSeEnter:()=>{t(Ge({key:"uiSe",value:XM}))},playSeClick:()=>{t(Ge({key:"uiSe",value:zM}))},playSePageChange:()=>{t(Ge({key:"uiSe",value:Mte}))},playSeDialogOpen:()=>{t(Ge({key:"uiSe",value:Nte}))},playSeSwitch:()=>{t(Ge({key:"uiSe",value:Fte}))}}},Jb=()=>({playSeEnter:()=>{te.dispatch(Ge({key:"uiSe",value:XM}))},playSeClick:()=>{te.dispatch(Ge({key:"uiSe",value:zM}))}});class eS{constructor(e,r){Ce(this,"text");Ce(this,"jump");Ce(this,"jumpToScene");Ce(this,"showCondition");Ce(this,"enableCondition");this.text=e,this.jump=r,this.jumpToScene=r.match(/\./)!==null}static parse(e){const r=e.split("->"),n=r.length>1?r[0]:null,a=(r.length>1?r[1]:r[0]).split(":"),o=new eS(a[0],a[1]);if(n!==null){const s=n.match(/\((.*)\)/);s&&(o.showCondition=s[1]);const u=n.match(/\[(.*)\]/);u&&(o.enableCondition=u[1])}return o}}const Cre=t=>{const r=t.content.split("|").map(u=>eS.parse(u)),i=te.getState().userData.optionData.textboxFont===Ki.song?'"思源宋体", serif':'"WebgalUI", serif',{playSeEnter:a,playSeClick:o}=Jb(),s=u=>u.filter((l,c)=>t_(l.showCondition)).map((l,c)=>{const f=t_(l.enableCondition),h=f?Bg.Choose_item:Bg.Choose_item_disabled,d=f?()=>{o(),l.jumpToScene?VM(l.jump,l.text):GM(l.jump),D.gameplay.performController.unmountPerform("choose")}:()=>{};return C.jsx("div",{className:h,style:{fontFamily:i},onClick:d,onMouseEnter:a,children:l.text},l.jump+c)});return Ji.render(C.jsx("div",{className:Bg.Choose_Main,children:s(r)}),document.getElementById("chooseContainer")),{performName:"choose",duration:1e3*60*60*24,isHoldOn:!1,stopFunction:()=>{Ji.render(C.jsx("div",{}),document.getElementById("chooseContainer"))},blockingNext:()=>!0,blockingAuto:()=>!0,stopTimeout:void 0}},Pre=t=>(Se.debug(`脚本内注释${t.content}`),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),Ore=t=>(t.content!==""&&t.content!=="none"?te.dispatch(Ge({key:"enableFilm",value:t.content})):te.dispatch(Ge({key:"enableFilm",value:""})),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),Rre="_Choose_Main_4xkm5_1",Ire="_Choose_item_4xkm5_13",kre="_glabalDialog_container_inner_4xkm5_28",Mre="_glabalDialog_container_4xkm5_28",Fre="_title_4xkm5_47",Nre="_button_4xkm5_59",Vs={Choose_Main:Rre,Choose_item:Ire,glabalDialog_container_inner:kre,glabalDialog_container:Mre,title:Fre,button:Nre},Lre=t=>{const e=t.content.toString().trim(),r=He(t,"title"),n=(r===0?"Please Input":r)??"Please Input",i=He(t,"buttonText"),a=(i===0?"OK":i)??"OK",s=te.getState().userData.optionData.textboxFont===Ki.song?'"思源宋体", serif':'"WebgalUI", serif',{playSeEnter:u,playSeClick:l}=Jb(),c=C.jsx("div",{style:{fontFamily:s},className:Vs.glabalDialog_container,children:C.jsxs("div",{className:Vs.glabalDialog_container_inner,children:[C.jsx("div",{className:Vs.title,children:n}),C.jsx("input",{id:"user-input",className:Vs.Choose_item}),C.jsx("div",{onMouseEnter:u,onClick:()=>{const f=document.getElementById("user-input");f&&te.dispatch(vk({key:e,value:((f==null?void 0:f.value)??"")===""?" ":(f==null?void 0:f.value)??""})),l(),D.gameplay.performController.unmountPerform("userInput"),Fr()},className:Vs.button,children:a})]})});return Ji.render(C.jsx("div",{className:Vs.Choose_Main,children:c}),document.getElementById("chooseContainer")),{performName:"userInput",duration:1e3*60*60*24,isHoldOn:!1,stopFunction:()=>{Ji.render(C.jsx("div",{}),document.getElementById("chooseContainer"))},blockingNext:()=>!0,blockingAuto:()=>!0,stopTimeout:void 0}},Dre="_FullScreenPerform_main_7er8a_2",Bre="_FullScreenPerform_element_7er8a_9",jre="_fullScreen_video_7er8a_17",Ure="_fadeIn_7er8a_74",$re="_intro_showSoftly_7er8a_1",Vre="_slideIn_7er8a_80",Gre="_typingEffect_7er8a_86",Xre="_typing_7er8a_86",zre="_blinkCursor_7er8a_1",Wre="_pixelateEffect_7er8a_95",Yre="_pixelateAnimation_7er8a_1",Hre="_revealAnimation_7er8a_101",qre="_videoContainer_7er8a_115",Bi={FullScreenPerform_main:Dre,FullScreenPerform_element:Bre,fullScreen_video:jre,fadeIn:Ure,intro_showSoftly:$re,slideIn:Vre,typingEffect:Gre,typing:Xre,blinkCursor:zre,pixelateEffect:Wre,pixelateAnimation:Yre,revealAnimation:Hre,videoContainer:qre},Kre=t=>{const e=`introPerform${Math.random().toString()}`;let r,n="rgba(0, 0, 0, 1)",i="rgba(255, 255, 255, 1)";const a=(x,S=0)=>{switch(x){case"fadeIn":return Bi.fadeIn;case"slideIn":return Bi.slideIn;case"typingEffect":return`${Bi.typingEffect} ${S}`;case"pixelateEffect":return Bi.pixelateEffect;case"revealAnimation":return Bi.revealAnimation;default:return Bi.fadeIn}};let o=Bi.fadeIn,s=1500,u=!1;for(const x of t.args){if(x.key==="backgroundColor"&&(n=x.value||"rgba(0, 0, 0, 1)"),x.key==="fontColor"&&(i=x.value||"rgba(255, 255, 255, 1)"),x.key==="fontSize")switch(x.value){case"small":r="280%";break;case"medium":r="350%";break;case"large":r="420%";break}if(x.key==="animation"&&(o=a(x.value)),x.key==="delayTime"){const S=parseInt(x.value.toString(),10);s=isNaN(S)?s:S}x.key==="hold"&&x.value===!0&&(u=!0)}const l={background:n,color:i,fontSize:r||"350%",width:"100%",height:"100%"},c=t.content.split(/\|/);let h=1e3+s*c.length;const d=u?1e3*60*60*24:1e3+s*c.length;let p=!0,v=setTimeout(()=>{p=!1},h),g=setTimeout(()=>{});const m=()=>{const x=document.getElementById("introContainer");if(h-=s,clearTimeout(v),v=setTimeout(()=>{p=!1},h),x){const S=x.childNodes[0].childNodes[0].childNodes,w=S.length;S.forEach((T,E)=>{const A=Number(T.style.animationDelay.split("ms")[0]);A>0&&(T.style.animationDelay=`${A-s}ms`),E===w-1&&(A===0?(clearTimeout(g),D.gameplay.performController.unmountPerform(e)):(clearTimeout(g),u||(g=setTimeout(()=>{D.gameplay.performController.unmountPerform(e),setTimeout(Fr,0)},h))))})}};D.events.userInteractNext.on(m);const y=c.map((x,S)=>C.jsxs("div",{style:{animationDelay:`${s*S}ms`},className:o,children:[x,x===""?" ":""]},"introtext"+S+Math.random().toString())),_=C.jsx("div",{style:l,children:C.jsx("div",{style:{padding:"3em 4em 3em 4em"},children:y})});Ji.render(_,document.getElementById("introContainer"));const b=document.getElementById("introContainer");return b&&(b.style.display="block"),{performName:e,duration:d,isHoldOn:!1,stopFunction:()=>{const x=document.getElementById("introContainer");x&&(x.style.display="none"),D.events.userInteractNext.off(m)},blockingNext:()=>p,blockingAuto:()=>p,stopTimeout:void 0,goNextWhenOver:!0}},Zre=t=>({performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),Qre=t=>{let e=t.content;return(t.content==="none"||t.content==="")&&(e=""),te.dispatch(Ge({key:"miniAvatar",value:e})),{performName:"none",duration:0,isHoldOn:!0,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}},Jre="modulepreload",ene=function(t,e){return new URL(t,e).href},lP={},tne=function(e,r,n){if(!r||r.length===0)return e();const i=document.getElementsByTagName("link");return Promise.all(r.map(a=>{if(a=ene(a,n),a in lP)return;lP[a]=!0;const o=a.endsWith(".css"),s=o?'[rel="stylesheet"]':"";if(!!n)for(let c=i.length-1;c>=0;c--){const f=i[c];if(f.href===a&&(!o||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${s}`))return;const l=document.createElement("link");if(l.rel=o?"stylesheet":Jre,o||(l.as="script",l.crossOrigin=""),l.href=a,document.head.appendChild(l),o)return new Promise((c,f)=>{l.addEventListener("load",c),l.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${a}`)))})})).then(()=>e()).catch(a=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a})},aF=new Map;function rne(t){return t?typeof t=="string"?t:t():null}function oF(t){const e=rne(t);return e||(Se.error("Get name of perform failed. There no name of the perform."),"")}function USe(t,e){if(!e||typeof e!="function")throw new Error(`"${t}" is not a callback.`);aF.set(oF(t),e)}function nne(t,e=[]){const r=aF.get(oF(t));if(!r||!(r instanceof Function))throw Se.error(`Can't call the perform named "${t}"`),new Error(`"${t}" don't have the pixiPerform callback.`);return r(...e)}tne(()=>import("./initRegister-f1733106.js"),[],import.meta.url);const ine=t=>{const e="PixiPerform"+t.content;D.gameplay.performController.performList.forEach(a=>{if(a.performName===e)return{performName:"none",duration:0,isOver:!1,isHoldOn:!0,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!1,stopTimeout:void 0}});const r=nne(t.content),{container:n,tickerKey:i}=r;return{performName:e,duration:0,isHoldOn:!0,stopFunction:()=>{var a,o;Se.warn("现在正在卸载pixi演出"),n.destroy({texture:!0,baseTexture:!0}),(a=D.gameplay.pixiStage)==null||a.effectsContainer.removeChild(n),(o=D.gameplay.pixiStage)==null||o.removeAnimation(i)},blockingNext:()=>!1,blockingAuto:()=>!1,stopTimeout:void 0}},ane=t=>{var a;Se.debug("play SE");let e="effect-sound";D.gameplay.performController.unmountPerform(e,!0);let r=t.content,n=!1;He(t,"id")&&(e=`effect-sound-${((a=He(t,"id"))==null?void 0:a.toString())??""}`,D.gameplay.performController.unmountPerform(e,!0),n=!0);let i=!1;return{performName:"none",blockingAuto(){return!1},blockingNext(){return!1},isHoldOn:!1,stopFunction(){},stopTimeout:void 0,duration:1e3*60*60,arrangePerformPromise:new Promise(o=>{setTimeout(()=>{var p;const s=He(t,"volume");let u=document.createElement("audio");u.src=r,n&&(u.loop=!0);const l=te.getState().userData,c=l.optionData.volumeMain,f=typeof s=="number"&&s>=0&&s<=100?s:100,h=c*.01*(((p=l.optionData)==null?void 0:p.seVolume)??100)*.01*f*.01;u.volume=h,u.currentTime=0;const d={performName:e,duration:1e3*60*60,isHoldOn:n,skipNextCollect:!0,stopFunction:()=>{u.pause()},blockingNext:()=>!1,blockingAuto:()=>n?!1:!i,stopTimeout:void 0};o(d),u==null||u.play(),u.onended=()=>{for(const v of D.gameplay.performController.performList)v.performName===e&&(i=!0,v.stopFunction(),D.gameplay.performController.unmountPerform(v.performName))}},1)})}},one=t=>{const e=te.getState().userData,r=e.optionData.volumeMain,n=r*.01*e.optionData.vocalVolume*.01,i=r*.01*e.optionData.bgmVolume*.01,a=fS();let o=He(t,"skipOff"),s=!1;o&&(s=!0),Ji.render(C.jsx("div",{className:Bi.videoContainer,children:C.jsx("video",{className:Bi.fullScreen_video,id:"playVideoElement",src:t.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 D.gameplay.performController.performList)y.performName===a&&(u=!0,y.stopFunction(),D.gameplay.performController.unmountPerform(y.performName),Fr())},h=()=>{f()};D.events.fullscreenDbClick.on(h);const d={performName:a,duration:1e3*60*60,isOver:!1,isHoldOn:!1,stopFunction:()=>{D.events.fullscreenDbClick.off(h);const y=document.getElementById("currentBgm");y&&(y.volume=i.toString());const _=document.getElementById("currentVocal");y&&(_.volume=n.toString()),Ji.render(C.jsx("div",{}),document.getElementById("videoContainer"))},blockingNext:()=>s,blockingAuto:()=>!u,stopTimeout:void 0,goNextWhenOver:!0};l(d);const p=0,v=0,g=document.getElementById("currentBgm");g&&(g.volume=v.toString());const m=document.getElementById("currentVocal");g&&(m.volume=p.toString()),c==null||c.play(),c.onended=()=>{f()}}},1)})}},sne=t=>{var o;te.getState().stage.currentDialogKey;const e=t.content,r=wn(e),n=(((o=He(t,"target"))==null?void 0:o.toString())??"default_id").toString(),i=`${n}-${e}-${r}`;let a;return setTimeout(()=>{var u,l;(u=D.gameplay.pixiStage)==null||u.stopPresetAnimationOnTarget(n);const s=np(e,n,r);s&&(Se.debug(`动画${e}作用在${n}`,r),(l=D.gameplay.pixiStage)==null||l.registerAnimation(s,i,n))},0),a=()=>{setTimeout(()=>{var s;te.getState().stage.currentDialogKey,(s=D.gameplay.pixiStage)==null||s.removeAnimationWithSetEffects(i)},0)},{performName:i,duration:r,isHoldOn:!1,stopFunction:a,blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function lne(t,e){const r=D.gameplay.pixiStage.getStageObjByKey(t);function n(){r&&(r.pixiContainer.alpha=0,r.pixiContainer.blur=0)}function i(){r&&(r.pixiContainer.alpha=1,r.pixiContainer.blur=5)}function a(o){if(r){const s=r.pixiContainer,u=D.gameplay.pixiStage.frameDuration,l=e/u*o,c=1/l,f=5/l;s.alpha<1&&(s.alpha+=c),s.blur<5&&(s.blur+=f)}}return{setStartState:n,setEndState:i,tickerFunc:a}}const une=[{name:"universalSoftIn",animationGenerateFunc:uM},{name:"universalSoftOff",animationGenerateFunc:cM},{name:"testblur",animationGenerateFunc:lne}],cne=t=>{var s,u,l;te.getState().stage.currentDialogKey;const e=t.content,r=He(t,"duration")??0,n=((s=He(t,"target"))==null?void 0:s.toString())??"0",i=`${n}-${e}-${r}`,a=fne(e);let o=()=>{};if(a){Se.debug(`动画${e}作用在${n}`,r);const c=a(n,r);(u=D.gameplay.pixiStage)==null||u.stopPresetAnimationOnTarget(n),(l=D.gameplay.pixiStage)==null||l.registerAnimation(c,i,n),o=()=>{var f;te.getState().stage.currentDialogKey,(f=D.gameplay.pixiStage)==null||f.removeAnimationWithSetEffects(i)}}return{performName:i,duration:r,isHoldOn:!1,stopFunction:o,blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function fne(t){const e=une.find(r=>r.name===t);return Se.debug("装载动画",e),e?e.animationGenerateFunc:null}const hne=t=>({performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),dne=t=>{var l;te.getState().stage.currentDialogKey;const e=(Math.random()*10).toString(16),r=t.content;let n;try{n=JSON.parse(r)}catch{n=[]}const i={name:e,effects:n};D.animationManager.addAnimation(i);const a=wn(e),o=((l=He(t,"target"))==null?void 0:l.toString())??"0",s=`${o}-${e}-${a}`;let u=()=>{};return setTimeout(()=>{var f,h;(f=D.gameplay.pixiStage)==null||f.stopPresetAnimationOnTarget(o);const c=np(e,o,a);c&&(Se.debug(`动画${e}作用在${o}`,a),(h=D.gameplay.pixiStage)==null||h.registerAnimation(c,s,o))},0),u=()=>{setTimeout(()=>{var c;te.getState().stage.currentDialogKey,(c=D.gameplay.pixiStage)==null||c.removeAnimationWithSetEffects(s)},0)},{performName:s,duration:a,isHoldOn:!1,stopFunction:u,blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function pne(t){return t.content==="hide"?te.dispatch(Ge({key:"isDisableTextbox",value:!0})):te.dispatch(Ge({key:"isDisableTextbox",value:!1})),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}}const vne=t=>{var c;te.getState().stage.currentDialogKey;const e=(Math.random()*10).toString(16),r=t.content;let n;const i=He(t,"duration"),a=((c=He(t,"target"))==null?void 0:c.toString())??"0";try{const f=JSON.parse(r);n=Yc(a,f,i)}catch{n=[]}const o={name:e,effects:n};D.animationManager.addAnimation(o);const s=gne(e),u=`${a}-${e}-${s}`;let l=()=>{};return setTimeout(()=>{var h,d;(h=D.gameplay.pixiStage)==null||h.stopPresetAnimationOnTarget(a);const f=mne(e,a,s);f&&(Se.debug(`动画${e}作用在${a}`,s),(d=D.gameplay.pixiStage)==null||d.registerAnimation(f,u,a))},0),l=()=>{setTimeout(()=>{var f;te.getState().stage.currentDialogKey,(f=D.gameplay.pixiStage)==null||f.removeAnimationWithSetEffects(u)},0)},{performName:u,duration:s,isHoldOn:!1,stopFunction:l,blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function mne(t,e,r){const n=D.animationManager.getAnimations().find(i=>i.name===t);if(n){const i=n.effects.map(a=>{const o=ar({...Ub,duration:0});return Object.assign(o,a),o.duration=a.duration,o});return Se.debug("装载自定义动画",i),$M(i,e,r)}return null}function gne(t){const e=D.animationManager.getAnimations().find(r=>r.name===t);if(e){let r=0;return e.effects.forEach(n=>{r+=n.duration}),r}return 0}const yne=t=>{let e="0";for(const r of t.args)r.key==="target"&&(e=r.value.toString());return He(t,"enter")&&D.animationManager.nextEnterAnimationName.set(e,He(t,"enter").toString()),He(t,"exit")&&D.animationManager.nextExitAnimationName.set(e+"-off",He(t,"exit").toString()),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!1,stopTimeout:void 0}},_ne=t=>{const e=t.content;let r=t.content,n="default";t.args.forEach(a=>{a.key==="name"&&(r=a.value.toString()),a.key==="series"&&(n=a.value.toString())}),Se.info(`解锁BGM:${r},路径:${e},所属系列:${n}`),te.dispatch(Mk({name:r,url:e,series:n}));const i=te.getState().userData;return Ps.setItem(D.gameKey,i).then(()=>{}),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}},xne=t=>{const e=t.content;let r=t.content,n="default";t.args.forEach(a=>{a.key==="name"&&(r=a.value.toString()),a.key==="series"&&(n=a.value.toString())}),Se.info(`解锁CG:${r},路径:${e},所属系列:${n}`),te.dispatch(kk({name:r,url:e,series:n}));const i=te.getState().userData;return Ps.setItem(D.gameKey,i).then(()=>{}),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}},tS=(t,e=!0)=>{t&&D.backlogManager.makeBacklogEmpty(),e&&D.sceneManager.resetScene(),D.gameplay.performController.removeAllPerform(),D.gameplay.resetGamePlay();const r=ar(pk),n=te.getState().stage.GameVar;te.dispatch(Jp(r)),e||te.dispatch(Ge({key:"GameVar",value:n}))},bne={saveData:[],quickSaveData:null},sF=zp({name:"saveData",initialState:ar(bne),reducers:{setFastSave:(t,e)=>{t.quickSaveData=e.payload},resetFastSave:t=>{t.quickSaveData=null},resetSaves:t=>{t.quickSaveData=null,t.saveData=[]},saveGame:(t,e)=>{t.saveData[e.payload.index]=e.payload.saveData},replaceSaveGame:(t,e)=>{t.saveData=e.payload}}}),Oa=sF.actions,Sne=sF.reducer,wne=t=>{tS(!0);const e=te.dispatch,r=Nn("start.txt",Fn.scene);return setTimeout(()=>{D.sceneManager.resetScene()},5),e(Oa.resetFastSave()),ip(),la(r).then(n=>{D.sceneManager.sceneData.currentScene=ua(n,"start.txt",r)}),e(rt({component:"showTitle",visibility:!0})),hS(te.getState().GUI.titleBgm),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}},Ene=t=>(GM(t.content),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),Tne=t=>(D.gameplay.performController.performList.forEach(e=>{if(e.performName.match(/PixiPerform/)){Se.warn("pixi 被脚本重新初始化",e.performName);for(let r=0;r{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),lt={audioContext:new AudioContext,source:null,analyser:void 0,dataArray:void 0,audioLevelInterval:setInterval(()=>{},0),blinkTimerID:setTimeout(()=>{},0),maxAudioLevel:0},Ane=t=>(lt.maxAudioLevel=Math.max(t,lt.maxAudioLevel),{OPEN_THRESHOLD:lt.maxAudioLevel*.75,HALF_OPEN_THRESHOLD:lt.maxAudioLevel*.5}),Cne=t=>{let e=!1;function r(){var n;e||t.animationEndTime&&Date.now()>t.animationEndTime||(e=!0,(n=D.gameplay.pixiStage)==null||n.performBlinkAnimation(t.key,t.animationItem,"closed",t.pos),lt.blinkTimerID=setTimeout(()=>{var a;(a=D.gameplay.pixiStage)==null||a.performBlinkAnimation(t.key,t.animationItem,"open",t.pos),e=!1;const i=Math.random()*300+3500;lt.blinkTimerID=setTimeout(r,i)},200))}r()},Pne=(t,e,r)=>{t.getByteFrequencyData(e);let n=0;for(let i=0;i{var h,d;const{audioLevel:e,OPEN_THRESHOLD:r,HALF_OPEN_THRESHOLD:n,currentMouthValue:i,lerpSpeed:a,key:o,animationItem:s,pos:u}=t;let l;e>r?l=1:e>n?l=.5:l=0;const c=i+(l-i)*a;(h=D.gameplay.pixiStage)==null||h.setModelMouthY(o,e);let f;c>.75?f="open":c>.25?f="half_open":f="closed",s!==void 0&&((d=D.gameplay.pixiStage)==null||d.performMouthSyncAnimation(o,s,f,u))};class One{constructor(e){Ce(this,"subject");Ce(this,"result");Ce(this,"isEnd",!1);this.subject=e}with(e,r){return!this.isEnd&&this.subject===e&&(this.result=r(),this.isEnd=!0),this}endsWith(e,r){return!this.isEnd&&this.subject===e&&(this.result=r(),this.isEnd=!0),this.evaluate()}default(e){return this.isEnd||(this.result=e()),this.evaluate()}evaluate(){return this.result}}function jv(t){return new One(t)}const Rne=t=>{Se.debug("play vocal");const e="vocal-play",r=He(t,"vocal"),n=He(t,"volume");let i;i=te.getState().stage;let a="",o="";const s=i.freeFigure,u=i.figureAssociatedAnimation;let l=0,c=0;const f=1;let h=document.getElementById("currentVocal");D.gameplay.performController.unmountPerform("vocal-play",!0),h!==null&&(h.currentTime=0,h.pause());for(const p of t.args)p.value===!0&&jv(p.key).with("left",()=>{a="left"}).with("right",()=>{a="right"}).endsWith("center",()=>{a="center"}),p.key==="figureId"&&(o=`${p.value.toString()}`);te.dispatch(Ge({key:"playVocal",value:r})),te.dispatch(Ge({key:"vocal",value:r}));let d=!1;return{arrangePerformPromise:new Promise(p=>{setTimeout(()=>{let v=document.getElementById("currentVocal");if(typeof n=="number"&&n>=0&&n<=100?te.dispatch(Ge({key:"vocalVolume",value:n})):te.dispatch(Ge({key:"vocalVolume",value:100})),v!==null){v.currentTime=0;const g={performName:e,duration:1e3*60*60,isOver:!1,isHoldOn:!1,stopFunction:()=>{clearInterval(lt.audioLevelInterval),v.pause(),o=o||`fig-${a}`;const y=u.find(_=>_.targetId===o);uP({audioLevel:0,OPEN_THRESHOLD:1,HALF_OPEN_THRESHOLD:1,currentMouthValue:c,lerpSpeed:f,key:o,animationItem:y,pos:a}),clearTimeout(lt.blinkTimerID)},blockingNext:()=>!1,blockingAuto:()=>!d,skipNextCollect:!0,stopTimeout:void 0};D.gameplay.performController.arrangeNewPerform(g,t,!1),o=o||`fig-${a}`;const m=u.find(y=>y.targetId===o);if(m){const y=s.find(x=>x.key===o);if(y&&(a=y.basePosition),!lt.audioContext){let x;x=new AudioContext,lt.analyser=x.createAnalyser(),lt.analyser.fftSize=256,lt.dataArray=new Uint8Array(lt.analyser.frequencyBinCount)}lt.analyser||(lt.analyser=lt.audioContext.createAnalyser(),lt.analyser.fftSize=256),l=lt.analyser.frequencyBinCount,lt.dataArray=new Uint8Array(l);let _=document.getElementById("currentVocal");lt.source||(lt.source=lt.audioContext.createMediaElementSource(_),lt.source.connect(lt.analyser)),lt.analyser.connect(lt.audioContext.destination),lt.audioLevelInterval=setInterval(()=>{const x=Pne(lt.analyser,lt.dataArray,l),{OPEN_THRESHOLD:S,HALF_OPEN_THRESHOLD:w}=Ane(x);uP({audioLevel:x,OPEN_THRESHOLD:S,HALF_OPEN_THRESHOLD:w,currentMouthValue:c,lerpSpeed:f,key:o,animationItem:m,pos:a})},50);let b;b=Date.now()+1e4,Cne({key:o,animationItem:m,pos:a,animationEndTime:b}),setTimeout(()=>{clearTimeout(lt.blinkTimerID)},1e4)}v==null||v.play(),v.onended=()=>{for(const y of D.gameplay.performController.performList)y.performName===e&&(d=!0,y.stopFunction(),D.gameplay.performController.unmountPerform(y.performName))}}},1)})}};function rS(t){switch(t){case fn.slow:return 80;case fn.normal:return 35;case fn.fast:return 3}}function lF(t){switch(t){case fn.slow:return 800;case fn.normal:return 350;case fn.fast:return 200}}const Ine=t=>{const e=te.getState().stage,r=te.getState().userData,n=te.dispatch;let i=Math.random().toString(),a=t.content;const o=He(t,"concat"),s=He(t,"notend"),u=He(t,"speaker"),l=He(t,"clear"),c=He(t,"vocal");o?(i=e.currentDialogKey,a=e.showText+a,n(Ge({key:"currentConcatDialogPrev",value:e.showText}))):n(Ge({key:"currentConcatDialogPrev",value:""})),n(Ge({key:"showText",value:a})),n(Ge({key:"vocal",value:""})),r.optionData.voiceInterruption===zc.no&&c===null||(n(Ge({key:"playVocal",value:""})),D.gameplay.performController.unmountPerform("vocal-play",!0)),n(Ge({key:"currentDialogKey",value:i}));const h=rS(r.optionData.textSpeed)*t.content.length;for(const g of t.args)if(g.key==="fontSize")switch(g.value){case"default":n(Ge({key:"showTextSize",value:-1}));break;case"small":n(Ge({key:"showTextSize",value:_i.small}));break;case"medium":n(Ge({key:"showTextSize",value:_i.medium}));break;case"large":n(Ge({key:"showTextSize",value:_i.large}));break}let d=e.showName;u!==null&&(d=u),l&&(d=""),n(Ge({key:"showName",value:d})),c&&Rne(t);const p=fS();let v=750-r.optionData.textSpeed*250;return s&&(v=0),{performName:p,duration:h+v,isHoldOn:!1,stopFunction:()=>{D.events.textSettle.emit()},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0,goNextWhenOver:s}};var nS={},qc={document:{}},uF=Object.prototype.hasOwnProperty,cF=function(t){return Uv(t)?t.toLowerCase():t},Sc=Array.isArray,kne=function(t){return Uv(t)?t.replace(/[A-Z]/g,function(e){return String.fromCharCode(e.charCodeAt(0)|32)}):t};"I".toLowerCase()!=="i"&&(cF=kne);var Mne,iS=Object.prototype.toString,fF=Object.getPrototypeOf,Ug=mF("ng");qc.angular||(qc.angular={});qc.document.documentMode;function Fne(t){if(t==null||sS(t))return!1;if(Sc(t)||Uv(t)||Mne)return!0;var e="length"in Object(t)&&t.length;return oS(e)&&(e>=0&&(e-1 in t||t instanceof Array)||typeof t.item=="function")}function Lt(t,e,r){var n,i;if(t)if(pF(t))for(n in t)n!=="prototype"&&n!=="length"&&n!=="name"&&t.hasOwnProperty(n)&&e.call(r,t[n],n,t);else if(Sc(t)||Fne(t)){var a=typeof t!="object";for(n=0,i=t.length;n"u"}function ol(t){return typeof t<"u"}function hF(t){return t!==null&&typeof t=="object"}function dF(t){return t!==null&&typeof t=="object"&&!fF(t)}function Uv(t){return typeof t=="string"}function oS(t){return typeof t=="number"}function pF(t){return typeof t=="function"}function sS(t){return t&&t.window===t}function vF(t){return t&&t.$evalAsync&&t.$watch}var Dne=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array\]$/;function Bne(t){return t&&oS(t.length)&&Dne.test(iS.call(t))}function jne(t){return iS.call(t)==="[object ArrayBuffer]"}function Une(t,e){var r=[],n=[];if(e){if(Bne(e)||jne(e))throw Ug("cpta","Can't copy! TypedArray destination cannot be mutated.");if(t===e)throw Ug("cpi","Can't copy! Source and destination are identical.");return Sc(e)?e.length=0:Lt(e,function(s,u){u!=="$$hashKey"&&delete e[u]}),r.push(t),n.push(e),i(t,e)}return a(t);function i(s,u){var l=u.$$hashKey,c;if(Sc(s))for(var f=0,h=s.length;f=0)return"...";e.push(n)}return n})}function cP(t){return typeof t=="function"?t.toString().replace(/ \{[\s\S]*$/,""):Lne(t)?"undefined":typeof t!="string"?Xne(t):t}function mF(t,e){return e=e||Error,function(){var r=2,n=arguments,i=n[0],a="["+(t?t+":":"")+i+"] ",o=n[1],s,u;for(a+=o.replace(/\{\d+\}/g,function(l){var c=+l.slice(1,-1),f=c+r;return f <= >= && || ! = |".split(" "),function(t){ud[t]=!0});var zne={n:` + */var Zb=Symbol.for("react.element"),Qb=Symbol.for("react.portal"),Ov=Symbol.for("react.fragment"),Rv=Symbol.for("react.strict_mode"),Iv=Symbol.for("react.profiler"),kv=Symbol.for("react.provider"),Mv=Symbol.for("react.context"),yre=Symbol.for("react.server_context"),Fv=Symbol.for("react.forward_ref"),Nv=Symbol.for("react.suspense"),Lv=Symbol.for("react.suspense_list"),Dv=Symbol.for("react.memo"),Bv=Symbol.for("react.lazy"),_re=Symbol.for("react.offscreen"),iF;iF=Symbol.for("react.module.reference");function ai(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case Zb:switch(t=t.type,t){case Ov:case Iv:case Rv:case Nv:case Lv:return t;default:switch(t=t&&t.$$typeof,t){case yre:case Mv:case Fv:case Bv:case Dv:case kv:return t;default:return e}}case Qb:return e}}}gt.ContextConsumer=Mv;gt.ContextProvider=kv;gt.Element=Zb;gt.ForwardRef=Fv;gt.Fragment=Ov;gt.Lazy=Bv;gt.Memo=Dv;gt.Portal=Qb;gt.Profiler=Iv;gt.StrictMode=Rv;gt.Suspense=Nv;gt.SuspenseList=Lv;gt.isAsyncMode=function(){return!1};gt.isConcurrentMode=function(){return!1};gt.isContextConsumer=function(t){return ai(t)===Mv};gt.isContextProvider=function(t){return ai(t)===kv};gt.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===Zb};gt.isForwardRef=function(t){return ai(t)===Fv};gt.isFragment=function(t){return ai(t)===Ov};gt.isLazy=function(t){return ai(t)===Bv};gt.isMemo=function(t){return ai(t)===Dv};gt.isPortal=function(t){return ai(t)===Qb};gt.isProfiler=function(t){return ai(t)===Iv};gt.isStrictMode=function(t){return ai(t)===Rv};gt.isSuspense=function(t){return ai(t)===Nv};gt.isSuspenseList=function(t){return ai(t)===Lv};gt.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===Ov||t===Iv||t===Rv||t===Nv||t===Lv||t===_re||typeof t=="object"&&t!==null&&(t.$$typeof===Bv||t.$$typeof===Dv||t.$$typeof===kv||t.$$typeof===Mv||t.$$typeof===Fv||t.$$typeof===iF||t.getModuleId!==void 0)};gt.typeOf=ai;function xre(){const t=nre();let e=null,r=null;return{clear(){e=null,r=null},notify(){t(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){let n=[],i=e;for(;i;)n.push(i),i=i.next;return n},subscribe(n){let i=!0,a=r={callback:n,next:null,prev:r};return a.prev?a.prev.next=a:e=a,function(){!i||e===null||(i=!1,a.next?a.next.prev=a.prev:r=a.prev,a.prev?a.prev.next=a.next:e=a.next)}}}}const lP={notify(){},get:()=>[]};function bre(t,e){let r,n=lP,i=0,a=!1;function o(v){c();const g=n.subscribe(v);let m=!1;return()=>{m||(m=!0,g(),f())}}function s(){n.notify()}function u(){p.onStateChange&&p.onStateChange()}function l(){return a}function c(){i++,r||(r=e?e.addNestedSub(u):t.subscribe(u),n=xre())}function f(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=lP)}function h(){a||(a=!0,c())}function d(){a&&(a=!1,f())}const p={addNestedSub:o,notifyNestedSubs:s,handleChangeWrapper:u,isSubscribed:l,trySubscribe:h,tryUnsubscribe:d,getListeners:()=>n};return p}const Sre=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",wre=Sre?ne.useLayoutEffect:ne.useEffect;function Ere({store:t,context:e,children:r,serverState:n,stabilityCheck:i="once",noopCheck:a="once"}){const o=ne.useMemo(()=>{const l=bre(t);return{store:t,subscription:l,getServerState:n?()=>n:void 0,stabilityCheck:i,noopCheck:a}},[t,n,i,a]),s=ne.useMemo(()=>t.getState(),[t]);wre(()=>{const{subscription:l}=o;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),s!==t.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[o,s]);const u=e||Eo;return ne.createElement(u.Provider,{value:o},r)}function aF(t=Eo){const e=t===Eo?QM:Yb(t);return function(){const{store:n}=e();return n}}const Tre=aF();function Are(t=Eo){const e=t===Eo?Tre:aF(t);return function(){return e().dispatch}}const Mr=Are();ore(ere.useSyncExternalStoreWithSelector);rre(kI.unstable_batchedUpdates);const gn=()=>{const t=Mr();return{playSeEnter:()=>{t(Ge({key:"uiSe",value:zM}))},playSeClick:()=>{t(Ge({key:"uiSe",value:WM}))},playSePageChange:()=>{t(Ge({key:"uiSe",value:Mte}))},playSeDialogOpen:()=>{t(Ge({key:"uiSe",value:Nte}))},playSeSwitch:()=>{t(Ge({key:"uiSe",value:Fte}))}}},Jb=()=>({playSeEnter:()=>{te.dispatch(Ge({key:"uiSe",value:zM}))},playSeClick:()=>{te.dispatch(Ge({key:"uiSe",value:WM}))}});class eS{constructor(e,r){Ce(this,"text");Ce(this,"jump");Ce(this,"jumpToScene");Ce(this,"showCondition");Ce(this,"enableCondition");this.text=e,this.jump=r,this.jumpToScene=r.match(/\./)!==null}static parse(e){const r=e.split("->"),n=r.length>1?r[0]:null,a=(r.length>1?r[1]:r[0]).split(":"),o=new eS(a[0],a[1]);if(n!==null){const s=n.match(/\((.*)\)/);s&&(o.showCondition=s[1]);const u=n.match(/\[(.*)\]/);u&&(o.enableCondition=u[1])}return o}}const Cre=t=>{const r=t.content.split("|").map(u=>eS.parse(u)),i=te.getState().userData.optionData.textboxFont===Ki.song?'"思源宋体", serif':'"WebgalUI", serif',{playSeEnter:a,playSeClick:o}=Jb(),s=u=>u.filter((l,c)=>t_(l.showCondition)).map((l,c)=>{const f=t_(l.enableCondition),h=f?Bg.Choose_item:Bg.Choose_item_disabled,d=f?()=>{o(),l.jumpToScene?GM(l.jump,l.text):XM(l.jump),D.gameplay.performController.unmountPerform("choose")}:()=>{};return C.jsx("div",{className:h,style:{fontFamily:i},onClick:d,onMouseEnter:a,children:l.text},l.jump+c)});return Ji.render(C.jsx("div",{className:Bg.Choose_Main,children:s(r)}),document.getElementById("chooseContainer")),{performName:"choose",duration:1e3*60*60*24,isHoldOn:!1,stopFunction:()=>{Ji.render(C.jsx("div",{}),document.getElementById("chooseContainer"))},blockingNext:()=>!0,blockingAuto:()=>!0,stopTimeout:void 0}},Pre=t=>(Se.debug(`脚本内注释${t.content}`),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),Ore=t=>(t.content!==""&&t.content!=="none"?te.dispatch(Ge({key:"enableFilm",value:t.content})):te.dispatch(Ge({key:"enableFilm",value:""})),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),Rre="_Choose_Main_4xkm5_1",Ire="_Choose_item_4xkm5_13",kre="_glabalDialog_container_inner_4xkm5_28",Mre="_glabalDialog_container_4xkm5_28",Fre="_title_4xkm5_47",Nre="_button_4xkm5_59",Vs={Choose_Main:Rre,Choose_item:Ire,glabalDialog_container_inner:kre,glabalDialog_container:Mre,title:Fre,button:Nre},Lre=t=>{const e=t.content.toString().trim(),r=He(t,"title"),n=(r===0?"Please Input":r)??"Please Input",i=He(t,"buttonText"),a=(i===0?"OK":i)??"OK",s=te.getState().userData.optionData.textboxFont===Ki.song?'"思源宋体", serif':'"WebgalUI", serif',{playSeEnter:u,playSeClick:l}=Jb(),c=C.jsx("div",{style:{fontFamily:s},className:Vs.glabalDialog_container,children:C.jsxs("div",{className:Vs.glabalDialog_container_inner,children:[C.jsx("div",{className:Vs.title,children:n}),C.jsx("input",{id:"user-input",className:Vs.Choose_item}),C.jsx("div",{onMouseEnter:u,onClick:()=>{const f=document.getElementById("user-input");f&&te.dispatch(mk({key:e,value:((f==null?void 0:f.value)??"")===""?" ":(f==null?void 0:f.value)??""})),l(),D.gameplay.performController.unmountPerform("userInput"),Fr()},className:Vs.button,children:a})]})});return Ji.render(C.jsx("div",{className:Vs.Choose_Main,children:c}),document.getElementById("chooseContainer")),{performName:"userInput",duration:1e3*60*60*24,isHoldOn:!1,stopFunction:()=>{Ji.render(C.jsx("div",{}),document.getElementById("chooseContainer"))},blockingNext:()=>!0,blockingAuto:()=>!0,stopTimeout:void 0}},Dre="_FullScreenPerform_main_7er8a_2",Bre="_FullScreenPerform_element_7er8a_9",jre="_fullScreen_video_7er8a_17",Ure="_fadeIn_7er8a_74",$re="_intro_showSoftly_7er8a_1",Vre="_slideIn_7er8a_80",Gre="_typingEffect_7er8a_86",Xre="_typing_7er8a_86",zre="_blinkCursor_7er8a_1",Wre="_pixelateEffect_7er8a_95",Yre="_pixelateAnimation_7er8a_1",Hre="_revealAnimation_7er8a_101",qre="_videoContainer_7er8a_115",Bi={FullScreenPerform_main:Dre,FullScreenPerform_element:Bre,fullScreen_video:jre,fadeIn:Ure,intro_showSoftly:$re,slideIn:Vre,typingEffect:Gre,typing:Xre,blinkCursor:zre,pixelateEffect:Wre,pixelateAnimation:Yre,revealAnimation:Hre,videoContainer:qre},Kre=t=>{const e=`introPerform${Math.random().toString()}`;let r,n="rgba(0, 0, 0, 1)",i="rgba(255, 255, 255, 1)";const a=(x,S=0)=>{switch(x){case"fadeIn":return Bi.fadeIn;case"slideIn":return Bi.slideIn;case"typingEffect":return`${Bi.typingEffect} ${S}`;case"pixelateEffect":return Bi.pixelateEffect;case"revealAnimation":return Bi.revealAnimation;default:return Bi.fadeIn}};let o=Bi.fadeIn,s=1500,u=!1;for(const x of t.args){if(x.key==="backgroundColor"&&(n=x.value||"rgba(0, 0, 0, 1)"),x.key==="fontColor"&&(i=x.value||"rgba(255, 255, 255, 1)"),x.key==="fontSize")switch(x.value){case"small":r="280%";break;case"medium":r="350%";break;case"large":r="420%";break}if(x.key==="animation"&&(o=a(x.value)),x.key==="delayTime"){const S=parseInt(x.value.toString(),10);s=isNaN(S)?s:S}x.key==="hold"&&x.value===!0&&(u=!0)}const l={background:n,color:i,fontSize:r||"350%",width:"100%",height:"100%"},c=t.content.split(/\|/);let h=1e3+s*c.length;const d=u?1e3*60*60*24:1e3+s*c.length;let p=!0,v=setTimeout(()=>{p=!1},h),g=setTimeout(()=>{});const m=()=>{const x=document.getElementById("introContainer");if(h-=s,clearTimeout(v),v=setTimeout(()=>{p=!1},h),x){const S=x.childNodes[0].childNodes[0].childNodes,w=S.length;S.forEach((T,E)=>{const A=Number(T.style.animationDelay.split("ms")[0]);A>0&&(T.style.animationDelay=`${A-s}ms`),E===w-1&&(A===0?(clearTimeout(g),D.gameplay.performController.unmountPerform(e)):(clearTimeout(g),u||(g=setTimeout(()=>{D.gameplay.performController.unmountPerform(e),setTimeout(Fr,0)},h))))})}};D.events.userInteractNext.on(m);const y=c.map((x,S)=>C.jsxs("div",{style:{animationDelay:`${s*S}ms`},className:o,children:[x,x===""?" ":""]},"introtext"+S+Math.random().toString())),_=C.jsx("div",{style:l,children:C.jsx("div",{style:{padding:"3em 4em 3em 4em"},children:y})});Ji.render(_,document.getElementById("introContainer"));const b=document.getElementById("introContainer");return b&&(b.style.display="block"),{performName:e,duration:d,isHoldOn:!1,stopFunction:()=>{const x=document.getElementById("introContainer");x&&(x.style.display="none"),D.events.userInteractNext.off(m)},blockingNext:()=>p,blockingAuto:()=>p,stopTimeout:void 0,goNextWhenOver:!0}},Zre=t=>({performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),Qre=t=>{let e=t.content;return(t.content==="none"||t.content==="")&&(e=""),te.dispatch(Ge({key:"miniAvatar",value:e})),{performName:"none",duration:0,isHoldOn:!0,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}},Jre="modulepreload",ene=function(t,e){return new URL(t,e).href},uP={},tne=function(e,r,n){if(!r||r.length===0)return e();const i=document.getElementsByTagName("link");return Promise.all(r.map(a=>{if(a=ene(a,n),a in uP)return;uP[a]=!0;const o=a.endsWith(".css"),s=o?'[rel="stylesheet"]':"";if(!!n)for(let c=i.length-1;c>=0;c--){const f=i[c];if(f.href===a&&(!o||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${s}`))return;const l=document.createElement("link");if(l.rel=o?"stylesheet":Jre,o||(l.as="script",l.crossOrigin=""),l.href=a,document.head.appendChild(l),o)return new Promise((c,f)=>{l.addEventListener("load",c),l.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${a}`)))})})).then(()=>e()).catch(a=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a})},oF=new Map;function rne(t){return t?typeof t=="string"?t:t():null}function sF(t){const e=rne(t);return e||(Se.error("Get name of perform failed. There no name of the perform."),"")}function USe(t,e){if(!e||typeof e!="function")throw new Error(`"${t}" is not a callback.`);oF.set(sF(t),e)}function nne(t,e=[]){const r=oF.get(sF(t));if(!r||!(r instanceof Function))throw Se.error(`Can't call the perform named "${t}"`),new Error(`"${t}" don't have the pixiPerform callback.`);return r(...e)}tne(()=>import("./initRegister-ac7bb12e.js"),[],import.meta.url);const ine=t=>{const e="PixiPerform"+t.content;D.gameplay.performController.performList.forEach(a=>{if(a.performName===e)return{performName:"none",duration:0,isOver:!1,isHoldOn:!0,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!1,stopTimeout:void 0}});const r=nne(t.content),{container:n,tickerKey:i}=r;return{performName:e,duration:0,isHoldOn:!0,stopFunction:()=>{var a,o;Se.warn("现在正在卸载pixi演出"),n.destroy({texture:!0,baseTexture:!0}),(a=D.gameplay.pixiStage)==null||a.effectsContainer.removeChild(n),(o=D.gameplay.pixiStage)==null||o.removeAnimation(i)},blockingNext:()=>!1,blockingAuto:()=>!1,stopTimeout:void 0}},ane=t=>{var a;Se.debug("play SE");let e="effect-sound";D.gameplay.performController.unmountPerform(e,!0);let r=t.content,n=!1;He(t,"id")&&(e=`effect-sound-${((a=He(t,"id"))==null?void 0:a.toString())??""}`,D.gameplay.performController.unmountPerform(e,!0),n=!0);let i=!1;return{performName:"none",blockingAuto(){return!1},blockingNext(){return!1},isHoldOn:!1,stopFunction(){},stopTimeout:void 0,duration:1e3*60*60,arrangePerformPromise:new Promise(o=>{setTimeout(()=>{var p;const s=He(t,"volume");let u=document.createElement("audio");u.src=r,n&&(u.loop=!0);const l=te.getState().userData,c=l.optionData.volumeMain,f=typeof s=="number"&&s>=0&&s<=100?s:100,h=c*.01*(((p=l.optionData)==null?void 0:p.seVolume)??100)*.01*f*.01;u.volume=h,u.currentTime=0;const d={performName:e,duration:1e3*60*60,isHoldOn:n,skipNextCollect:!0,stopFunction:()=>{u.pause()},blockingNext:()=>!1,blockingAuto:()=>n?!1:!i,stopTimeout:void 0};o(d),u==null||u.play(),u.onended=()=>{for(const v of D.gameplay.performController.performList)v.performName===e&&(i=!0,v.stopFunction(),D.gameplay.performController.unmountPerform(v.performName))}},1)})}},one=t=>{const e=te.getState().userData,r=e.optionData.volumeMain,n=r*.01*e.optionData.vocalVolume*.01,i=r*.01*e.optionData.bgmVolume*.01,a=fS();let o=He(t,"skipOff"),s=!1;o&&(s=!0),Ji.render(C.jsx("div",{className:Bi.videoContainer,children:C.jsx("video",{className:Bi.fullScreen_video,id:"playVideoElement",src:t.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 D.gameplay.performController.performList)y.performName===a&&(u=!0,y.stopFunction(),D.gameplay.performController.unmountPerform(y.performName),Fr())},h=()=>{f()};D.events.fullscreenDbClick.on(h);const d={performName:a,duration:1e3*60*60,isOver:!1,isHoldOn:!1,stopFunction:()=>{D.events.fullscreenDbClick.off(h);const y=document.getElementById("currentBgm");y&&(y.volume=i.toString());const _=document.getElementById("currentVocal");y&&(_.volume=n.toString()),Ji.render(C.jsx("div",{}),document.getElementById("videoContainer"))},blockingNext:()=>s,blockingAuto:()=>!u,stopTimeout:void 0,goNextWhenOver:!0};l(d);const p=0,v=0,g=document.getElementById("currentBgm");g&&(g.volume=v.toString());const m=document.getElementById("currentVocal");g&&(m.volume=p.toString()),c==null||c.play(),c.onended=()=>{f()}}},1)})}},sne=t=>{var o;te.getState().stage.currentDialogKey;const e=t.content,r=wn(e),n=(((o=He(t,"target"))==null?void 0:o.toString())??"default_id").toString(),i=`${n}-${e}-${r}`;let a;return setTimeout(()=>{var u,l;(u=D.gameplay.pixiStage)==null||u.stopPresetAnimationOnTarget(n);const s=np(e,n,r);s&&(Se.debug(`动画${e}作用在${n}`,r),(l=D.gameplay.pixiStage)==null||l.registerAnimation(s,i,n))},0),a=()=>{setTimeout(()=>{var s;te.getState().stage.currentDialogKey,(s=D.gameplay.pixiStage)==null||s.removeAnimationWithSetEffects(i)},0)},{performName:i,duration:r,isHoldOn:!1,stopFunction:a,blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function lne(t,e){const r=D.gameplay.pixiStage.getStageObjByKey(t);function n(){r&&(r.pixiContainer.alpha=0,r.pixiContainer.blur=0)}function i(){r&&(r.pixiContainer.alpha=1,r.pixiContainer.blur=5)}function a(o){if(r){const s=r.pixiContainer,u=D.gameplay.pixiStage.frameDuration,l=e/u*o,c=1/l,f=5/l;s.alpha<1&&(s.alpha+=c),s.blur<5&&(s.blur+=f)}}return{setStartState:n,setEndState:i,tickerFunc:a}}const une=[{name:"universalSoftIn",animationGenerateFunc:cM},{name:"universalSoftOff",animationGenerateFunc:fM},{name:"testblur",animationGenerateFunc:lne}],cne=t=>{var s,u,l;te.getState().stage.currentDialogKey;const e=t.content,r=He(t,"duration")??0,n=((s=He(t,"target"))==null?void 0:s.toString())??"0",i=`${n}-${e}-${r}`,a=fne(e);let o=()=>{};if(a){Se.debug(`动画${e}作用在${n}`,r);const c=a(n,r);(u=D.gameplay.pixiStage)==null||u.stopPresetAnimationOnTarget(n),(l=D.gameplay.pixiStage)==null||l.registerAnimation(c,i,n),o=()=>{var f;te.getState().stage.currentDialogKey,(f=D.gameplay.pixiStage)==null||f.removeAnimationWithSetEffects(i)}}return{performName:i,duration:r,isHoldOn:!1,stopFunction:o,blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function fne(t){const e=une.find(r=>r.name===t);return Se.debug("装载动画",e),e?e.animationGenerateFunc:null}const hne=t=>({performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),dne=t=>{var l;te.getState().stage.currentDialogKey;const e=(Math.random()*10).toString(16),r=t.content;let n;try{n=JSON.parse(r)}catch{n=[]}const i={name:e,effects:n};D.animationManager.addAnimation(i);const a=wn(e),o=((l=He(t,"target"))==null?void 0:l.toString())??"0",s=`${o}-${e}-${a}`;let u=()=>{};return setTimeout(()=>{var f,h;(f=D.gameplay.pixiStage)==null||f.stopPresetAnimationOnTarget(o);const c=np(e,o,a);c&&(Se.debug(`动画${e}作用在${o}`,a),(h=D.gameplay.pixiStage)==null||h.registerAnimation(c,s,o))},0),u=()=>{setTimeout(()=>{var c;te.getState().stage.currentDialogKey,(c=D.gameplay.pixiStage)==null||c.removeAnimationWithSetEffects(s)},0)},{performName:s,duration:a,isHoldOn:!1,stopFunction:u,blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function pne(t){return t.content==="hide"?te.dispatch(Ge({key:"isDisableTextbox",value:!0})):te.dispatch(Ge({key:"isDisableTextbox",value:!1})),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}}const vne=t=>{var c;te.getState().stage.currentDialogKey;const e=(Math.random()*10).toString(16),r=t.content;let n;const i=He(t,"duration"),a=((c=He(t,"target"))==null?void 0:c.toString())??"0";try{const f=JSON.parse(r);n=Yc(a,f,i)}catch{n=[]}const o={name:e,effects:n};D.animationManager.addAnimation(o);const s=gne(e),u=`${a}-${e}-${s}`;let l=()=>{};return setTimeout(()=>{var h,d;(h=D.gameplay.pixiStage)==null||h.stopPresetAnimationOnTarget(a);const f=mne(e,a,s);f&&(Se.debug(`动画${e}作用在${a}`,s),(d=D.gameplay.pixiStage)==null||d.registerAnimation(f,u,a))},0),l=()=>{setTimeout(()=>{var f;te.getState().stage.currentDialogKey,(f=D.gameplay.pixiStage)==null||f.removeAnimationWithSetEffects(u)},0)},{performName:u,duration:s,isHoldOn:!1,stopFunction:l,blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function mne(t,e,r){const n=D.animationManager.getAnimations().find(i=>i.name===t);if(n){const i=n.effects.map(a=>{const o=ar({...Ub,duration:0});return Object.assign(o,a),o.duration=a.duration,o});return Se.debug("装载自定义动画",i),VM(i,e,r)}return null}function gne(t){const e=D.animationManager.getAnimations().find(r=>r.name===t);if(e){let r=0;return e.effects.forEach(n=>{r+=n.duration}),r}return 0}const yne=t=>{let e="0";for(const r of t.args)r.key==="target"&&(e=r.value.toString());return He(t,"enter")&&D.animationManager.nextEnterAnimationName.set(e,He(t,"enter").toString()),He(t,"exit")&&D.animationManager.nextExitAnimationName.set(e+"-off",He(t,"exit").toString()),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!1,stopTimeout:void 0}},_ne=t=>{const e=t.content;let r=t.content,n="default";t.args.forEach(a=>{a.key==="name"&&(r=a.value.toString()),a.key==="series"&&(n=a.value.toString())}),Se.info(`解锁BGM:${r},路径:${e},所属系列:${n}`),te.dispatch(Fk({name:r,url:e,series:n}));const i=te.getState().userData;return Ps.setItem(D.gameKey,i).then(()=>{}),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}},xne=t=>{const e=t.content;let r=t.content,n="default";t.args.forEach(a=>{a.key==="name"&&(r=a.value.toString()),a.key==="series"&&(n=a.value.toString())}),Se.info(`解锁CG:${r},路径:${e},所属系列:${n}`),te.dispatch(Mk({name:r,url:e,series:n}));const i=te.getState().userData;return Ps.setItem(D.gameKey,i).then(()=>{}),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}},tS=(t,e=!0)=>{t&&D.backlogManager.makeBacklogEmpty(),e&&D.sceneManager.resetScene(),D.gameplay.performController.removeAllPerform(),D.gameplay.resetGamePlay();const r=ar(vk),n=te.getState().stage.GameVar;te.dispatch(Jp(r)),e||te.dispatch(Ge({key:"GameVar",value:n}))},bne={saveData:[],quickSaveData:null},lF=zp({name:"saveData",initialState:ar(bne),reducers:{setFastSave:(t,e)=>{t.quickSaveData=e.payload},resetFastSave:t=>{t.quickSaveData=null},resetSaves:t=>{t.quickSaveData=null,t.saveData=[]},saveGame:(t,e)=>{t.saveData[e.payload.index]=e.payload.saveData},replaceSaveGame:(t,e)=>{t.saveData=e.payload}}}),Oa=lF.actions,Sne=lF.reducer,wne=t=>{tS(!0);const e=te.dispatch,r=Nn("start.txt",Fn.scene);return setTimeout(()=>{D.sceneManager.resetScene()},5),e(Oa.resetFastSave()),ip(),la(r).then(n=>{D.sceneManager.sceneData.currentScene=ua(n,"start.txt",r)}),e(rt({component:"showTitle",visibility:!0})),hS(te.getState().GUI.titleBgm),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}},Ene=t=>(XM(t.content),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),Tne=t=>(D.gameplay.performController.performList.forEach(e=>{if(e.performName.match(/PixiPerform/)){Se.warn("pixi 被脚本重新初始化",e.performName);for(let r=0;r{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),lt={audioContext:new AudioContext,source:null,analyser:void 0,dataArray:void 0,audioLevelInterval:setInterval(()=>{},0),blinkTimerID:setTimeout(()=>{},0),maxAudioLevel:0},Ane=t=>(lt.maxAudioLevel=Math.max(t,lt.maxAudioLevel),{OPEN_THRESHOLD:lt.maxAudioLevel*.75,HALF_OPEN_THRESHOLD:lt.maxAudioLevel*.5}),Cne=t=>{let e=!1;function r(){var n;e||t.animationEndTime&&Date.now()>t.animationEndTime||(e=!0,(n=D.gameplay.pixiStage)==null||n.performBlinkAnimation(t.key,t.animationItem,"closed",t.pos),lt.blinkTimerID=setTimeout(()=>{var a;(a=D.gameplay.pixiStage)==null||a.performBlinkAnimation(t.key,t.animationItem,"open",t.pos),e=!1;const i=Math.random()*300+3500;lt.blinkTimerID=setTimeout(r,i)},200))}r()},Pne=(t,e,r)=>{t.getByteFrequencyData(e);let n=0;for(let i=0;i{var h,d;const{audioLevel:e,OPEN_THRESHOLD:r,HALF_OPEN_THRESHOLD:n,currentMouthValue:i,lerpSpeed:a,key:o,animationItem:s,pos:u}=t;let l;e>r?l=1:e>n?l=.5:l=0;const c=i+(l-i)*a;(h=D.gameplay.pixiStage)==null||h.setModelMouthY(o,e);let f;c>.75?f="open":c>.25?f="half_open":f="closed",s!==void 0&&((d=D.gameplay.pixiStage)==null||d.performMouthSyncAnimation(o,s,f,u))};class One{constructor(e){Ce(this,"subject");Ce(this,"result");Ce(this,"isEnd",!1);this.subject=e}with(e,r){return!this.isEnd&&this.subject===e&&(this.result=r(),this.isEnd=!0),this}endsWith(e,r){return!this.isEnd&&this.subject===e&&(this.result=r(),this.isEnd=!0),this.evaluate()}default(e){return this.isEnd||(this.result=e()),this.evaluate()}evaluate(){return this.result}}function jv(t){return new One(t)}const Rne=t=>{Se.debug("play vocal");const e="vocal-play",r=He(t,"vocal"),n=He(t,"volume");let i;i=te.getState().stage;let a="",o="";const s=i.freeFigure,u=i.figureAssociatedAnimation;let l=0,c=0;const f=1;let h=document.getElementById("currentVocal");D.gameplay.performController.unmountPerform("vocal-play",!0),h!==null&&(h.currentTime=0,h.pause());for(const p of t.args)p.value===!0&&jv(p.key).with("left",()=>{a="left"}).with("right",()=>{a="right"}).endsWith("center",()=>{a="center"}),p.key==="figureId"&&(o=`${p.value.toString()}`);te.dispatch(Ge({key:"playVocal",value:r})),te.dispatch(Ge({key:"vocal",value:r}));let d=!1;return{arrangePerformPromise:new Promise(p=>{setTimeout(()=>{let v=document.getElementById("currentVocal");if(typeof n=="number"&&n>=0&&n<=100?te.dispatch(Ge({key:"vocalVolume",value:n})):te.dispatch(Ge({key:"vocalVolume",value:100})),v!==null){v.currentTime=0;const g={performName:e,duration:1e3*60*60,isOver:!1,isHoldOn:!1,stopFunction:()=>{clearInterval(lt.audioLevelInterval),v.pause(),o=o||`fig-${a}`;const y=u.find(_=>_.targetId===o);cP({audioLevel:0,OPEN_THRESHOLD:1,HALF_OPEN_THRESHOLD:1,currentMouthValue:c,lerpSpeed:f,key:o,animationItem:y,pos:a}),clearTimeout(lt.blinkTimerID)},blockingNext:()=>!1,blockingAuto:()=>!d,skipNextCollect:!0,stopTimeout:void 0};D.gameplay.performController.arrangeNewPerform(g,t,!1),o=o||`fig-${a}`;const m=u.find(y=>y.targetId===o);if(m){const y=s.find(x=>x.key===o);if(y&&(a=y.basePosition),!lt.audioContext){let x;x=new AudioContext,lt.analyser=x.createAnalyser(),lt.analyser.fftSize=256,lt.dataArray=new Uint8Array(lt.analyser.frequencyBinCount)}lt.analyser||(lt.analyser=lt.audioContext.createAnalyser(),lt.analyser.fftSize=256),l=lt.analyser.frequencyBinCount,lt.dataArray=new Uint8Array(l);let _=document.getElementById("currentVocal");lt.source||(lt.source=lt.audioContext.createMediaElementSource(_),lt.source.connect(lt.analyser)),lt.analyser.connect(lt.audioContext.destination),lt.audioLevelInterval=setInterval(()=>{const x=Pne(lt.analyser,lt.dataArray,l),{OPEN_THRESHOLD:S,HALF_OPEN_THRESHOLD:w}=Ane(x);cP({audioLevel:x,OPEN_THRESHOLD:S,HALF_OPEN_THRESHOLD:w,currentMouthValue:c,lerpSpeed:f,key:o,animationItem:m,pos:a})},50);let b;b=Date.now()+1e4,Cne({key:o,animationItem:m,pos:a,animationEndTime:b}),setTimeout(()=>{clearTimeout(lt.blinkTimerID)},1e4)}v==null||v.play(),v.onended=()=>{for(const y of D.gameplay.performController.performList)y.performName===e&&(d=!0,y.stopFunction(),D.gameplay.performController.unmountPerform(y.performName))}}},1)})}};function rS(t){switch(t){case fn.slow:return 80;case fn.normal:return 35;case fn.fast:return 3}}function uF(t){switch(t){case fn.slow:return 800;case fn.normal:return 350;case fn.fast:return 200}}const Ine=t=>{const e=te.getState().stage,r=te.getState().userData,n=te.dispatch;let i=Math.random().toString(),a=t.content;const o=He(t,"concat"),s=He(t,"notend"),u=He(t,"speaker"),l=He(t,"clear"),c=He(t,"vocal");o?(i=e.currentDialogKey,a=e.showText+a,n(Ge({key:"currentConcatDialogPrev",value:e.showText}))):n(Ge({key:"currentConcatDialogPrev",value:""})),n(Ge({key:"showText",value:a})),n(Ge({key:"vocal",value:""})),r.optionData.voiceInterruption===zc.no&&c===null||(n(Ge({key:"playVocal",value:""})),D.gameplay.performController.unmountPerform("vocal-play",!0)),n(Ge({key:"currentDialogKey",value:i}));const h=rS(r.optionData.textSpeed)*t.content.length;for(const g of t.args)if(g.key==="fontSize")switch(g.value){case"default":n(Ge({key:"showTextSize",value:-1}));break;case"small":n(Ge({key:"showTextSize",value:_i.small}));break;case"medium":n(Ge({key:"showTextSize",value:_i.medium}));break;case"large":n(Ge({key:"showTextSize",value:_i.large}));break}let d=e.showName;u!==null&&(d=u),l&&(d=""),n(Ge({key:"showName",value:d})),c&&Rne(t);const p=fS();let v=750-r.optionData.textSpeed*250;return s&&(v=0),{performName:p,duration:h+v,isHoldOn:!1,stopFunction:()=>{D.events.textSettle.emit()},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0,goNextWhenOver:s}};var nS={},qc={document:{}},cF=Object.prototype.hasOwnProperty,fF=function(t){return Uv(t)?t.toLowerCase():t},Sc=Array.isArray,kne=function(t){return Uv(t)?t.replace(/[A-Z]/g,function(e){return String.fromCharCode(e.charCodeAt(0)|32)}):t};"I".toLowerCase()!=="i"&&(fF=kne);var Mne,iS=Object.prototype.toString,hF=Object.getPrototypeOf,Ug=gF("ng");qc.angular||(qc.angular={});qc.document.documentMode;function Fne(t){if(t==null||sS(t))return!1;if(Sc(t)||Uv(t)||Mne)return!0;var e="length"in Object(t)&&t.length;return oS(e)&&(e>=0&&(e-1 in t||t instanceof Array)||typeof t.item=="function")}function Lt(t,e,r){var n,i;if(t)if(vF(t))for(n in t)n!=="prototype"&&n!=="length"&&n!=="name"&&t.hasOwnProperty(n)&&e.call(r,t[n],n,t);else if(Sc(t)||Fne(t)){var a=typeof t!="object";for(n=0,i=t.length;n"u"}function ol(t){return typeof t<"u"}function dF(t){return t!==null&&typeof t=="object"}function pF(t){return t!==null&&typeof t=="object"&&!hF(t)}function Uv(t){return typeof t=="string"}function oS(t){return typeof t=="number"}function vF(t){return typeof t=="function"}function sS(t){return t&&t.window===t}function mF(t){return t&&t.$evalAsync&&t.$watch}var Dne=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array\]$/;function Bne(t){return t&&oS(t.length)&&Dne.test(iS.call(t))}function jne(t){return iS.call(t)==="[object ArrayBuffer]"}function Une(t,e){var r=[],n=[];if(e){if(Bne(e)||jne(e))throw Ug("cpta","Can't copy! TypedArray destination cannot be mutated.");if(t===e)throw Ug("cpi","Can't copy! Source and destination are identical.");return Sc(e)?e.length=0:Lt(e,function(s,u){u!=="$$hashKey"&&delete e[u]}),r.push(t),n.push(e),i(t,e)}return a(t);function i(s,u){var l=u.$$hashKey,c;if(Sc(s))for(var f=0,h=s.length;f=0)return"...";e.push(n)}return n})}function fP(t){return typeof t=="function"?t.toString().replace(/ \{[\s\S]*$/,""):Lne(t)?"undefined":typeof t!="string"?Xne(t):t}function gF(t,e){return e=e||Error,function(){var r=2,n=arguments,i=n[0],a="["+(t?t+":":"")+i+"] ",o=n[1],s,u;for(a+=o.replace(/\{\d+\}/g,function(l){var c=+l.slice(1,-1),f=c+r;return f <= >= && || ! = |".split(" "),function(t){ud[t]=!0});var zne={n:` `,f:"\f",r:"\r",t:" ",v:"\v","'":"'",'"':'"'},J0=function(e){this.options=e};J0.prototype={constructor:J0,lex:function(t){for(this.text=t,this.index=0,this.tokens=[];this.index=55296&&r<=56319&&n>=56320&&n<=57343?t+e:t},isExpOperator:function(t){return t==="-"||t==="+"||this.isNumber(t)},throwError:function(t,e,r){r=r||this.index;var n=ol(e)?"s "+e+"-"+this.index+" ["+this.text.substring(e,r)+"]":" "+r;throw sl("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",t,n,this.text)},readNumber:function(){for(var t="",e=this.index;this.index0&&!this.peek("}",")",";","]")&&t.push(this.expressionStatement()),!this.expect(";"))return{type:le.Program,body:t}},expressionStatement:function(){return{type:le.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var t=this.expression();this.expect("|");)t=this.filter(t);return t},expression:function(){return this.assignment()},assignment:function(){var t=this.ternary();if(this.expect("=")){if(!xF(t))throw sl("lval","Trying to assign a value to a non l-value");t={type:le.AssignmentExpression,left:t,right:this.assignment(),operator:"="}}return t},ternary:function(){var t=this.logicalOR(),e,r;return this.expect("?")&&(e=this.expression(),this.consume(":"))?(r=this.expression(),{type:le.ConditionalExpression,test:t,alternate:e,consequent:r}):t},logicalOR:function(){for(var t=this.logicalAND();this.expect("||");)t={type:le.LogicalExpression,operator:"||",left:t,right:this.logicalAND()};return t},logicalAND:function(){for(var t=this.equality();this.expect("&&");)t={type:le.LogicalExpression,operator:"&&",left:t,right:this.equality()};return t},equality:function(){for(var t=this.relational(),e;e=this.expect("==","!=","===","!==");)t={type:le.BinaryExpression,operator:e.text,left:t,right:this.relational()};return t},relational:function(){for(var t=this.additive(),e;e=this.expect("<",">","<=",">=");)t={type:le.BinaryExpression,operator:e.text,left:t,right:this.additive()};return t},additive:function(){for(var t=this.multiplicative(),e;e=this.expect("+","-");)t={type:le.BinaryExpression,operator:e.text,left:t,right:this.multiplicative()};return t},multiplicative:function(){for(var t=this.unary(),e;e=this.expect("*","/","%");)t={type:le.BinaryExpression,operator:e.text,left:t,right:this.unary()};return t},unary:function(){var t;return(t=this.expect("+","-","!"))?{type:le.UnaryExpression,operator:t.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var t;this.expect("(")?(t=this.filterChain(),this.consume(")")):this.expect("[")?t=this.arrayDeclaration():this.expect("{")?t=this.object():this.selfReferential.hasOwnProperty(this.peek().text)?t=Une(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?t={type:le.Literal,value:this.options.literals[this.consume().text]}:this.peek().identifier?t=this.identifier():this.peek().constant?t=this.constant():this.throwError("not a primary expression",this.peek());for(var e;e=this.expect("(","[",".");)e.text==="("?(t={type:le.CallExpression,callee:t,arguments:this.parseArguments()},this.consume(")")):e.text==="["?(t={type:le.MemberExpression,object:t,property:this.expression(),computed:!0},this.consume("]")):e.text==="."?t={type:le.MemberExpression,object:t,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return t},filter:function(t){for(var e=[t],r={type:le.CallExpression,callee:this.identifier(),arguments:e,filter:!0};this.expect(":");)e.push(this.expression());return r},parseArguments:function(){var t=[];if(this.peekToken().text!==")")do t.push(this.filterChain());while(this.expect(","));return t},identifier:function(){var t=this.consume();return t.identifier||this.throwError("is not a valid identifier",t),{type:le.Identifier,name:t.text}},constant:function(){return{type:le.Literal,value:this.consume().value}},arrayDeclaration:function(){var t=[];if(this.peekToken().text!=="]")do{if(this.peek("]"))break;t.push(this.expression())}while(this.expect(","));return this.consume("]"),{type:le.ArrayExpression,elements:t}},object:function(){var t=[],e;if(this.peekToken().text!=="}")do{if(this.peek("}"))break;e={type:le.Property,kind:"init"},this.peek().constant?(e.key=this.constant(),e.computed=!1,this.consume(":"),e.value=this.expression()):this.peek().identifier?(e.key=this.identifier(),e.computed=!1,this.peek(":")?(this.consume(":"),e.value=this.expression()):e.value=e.key):this.peek("[")?(this.consume("["),e.key=this.expression(),this.consume("]"),e.computed=!0,this.consume(":"),e.value=this.expression()):this.throwError("invalid key",this.peek()),t.push(e)}while(this.expect(","));return this.consume("}"),{type:le.ObjectExpression,properties:t}},throwError:function(t,e){throw sl("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",e.text,t,e.index+1,this.text,this.text.substring(e.index))},consume:function(t){if(this.tokens.length===0)throw sl("ueoe","Unexpected end of expression: {0}",this.text);var e=this.expect(t);return e||this.throwError("is unexpected, expecting ["+t+"]",this.peek()),e},peekToken:function(){if(this.tokens.length===0)throw sl("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(t,e,r,n){return this.peekAhead(0,t,e,r,n)},peekAhead:function(t,e,r,n,i){if(this.tokens.length>t){var a=this.tokens[t],o=a.text;if(o===e||o===r||o===n||o===i||!e&&!r&&!n&&!i)return a}return!1},expect:function(t,e,r,n){var i=this.peek(t,e,r,n);return i?(this.tokens.shift(),i):!1},selfReferential:{this:{type:le.ThisExpression},$locals:{type:le.LocalsExpression}}};function Wne(t,e){return typeof t<"u"?t:e}function yF(t,e){return typeof t>"u"?e:typeof e>"u"?t:t+e}function Yne(t,e){var r=t(e);if(!r)throw new Error("Filter '"+e+"' is not defined");return!r.$stateful}function br(t,e){var r,n,i;switch(t.type){case le.Program:r=!0,Lt(t.body,function(a){br(a.expression,e),r=r&&a.expression.constant}),t.constant=r;break;case le.Literal:t.constant=!0,t.toWatch=[];break;case le.UnaryExpression:br(t.argument,e),t.constant=t.argument.constant,t.toWatch=t.argument.toWatch;break;case le.BinaryExpression:br(t.left,e),br(t.right,e),t.constant=t.left.constant&&t.right.constant,t.toWatch=t.left.toWatch.concat(t.right.toWatch);break;case le.LogicalExpression:br(t.left,e),br(t.right,e),t.constant=t.left.constant&&t.right.constant,t.toWatch=t.constant?[]:[t];break;case le.ConditionalExpression:br(t.test,e),br(t.alternate,e),br(t.consequent,e),t.constant=t.test.constant&&t.alternate.constant&&t.consequent.constant,t.toWatch=t.constant?[]:[t];break;case le.Identifier:t.constant=!1,t.toWatch=[t];break;case le.MemberExpression:br(t.object,e),t.computed&&br(t.property,e),t.constant=t.object.constant&&(!t.computed||t.property.constant),t.toWatch=[t];break;case le.CallExpression:i=t.filter?Yne(e,t.callee.name):!1,r=i,n=[],Lt(t.arguments,function(a){br(a,e),r=r&&a.constant,a.constant||n.push.apply(n,a.toWatch)}),t.constant=r,t.toWatch=i?n:[t];break;case le.AssignmentExpression:br(t.left,e),br(t.right,e),t.constant=t.left.constant&&t.right.constant,t.toWatch=[t];break;case le.ArrayExpression:r=!0,n=[],Lt(t.elements,function(a){br(a,e),r=r&&a.constant,a.constant||n.push.apply(n,a.toWatch)}),t.constant=r,t.toWatch=n;break;case le.ObjectExpression:r=!0,n=[],Lt(t.properties,function(a){br(a.value,e),r=r&&a.value.constant&&!a.computed,a.value.constant||n.push.apply(n,a.value.toWatch)}),t.constant=r,t.toWatch=n;break;case le.ThisExpression:t.constant=!1,t.toWatch=[];break;case le.LocalsExpression:t.constant=!1,t.toWatch=[];break}}function _F(t){if(t.length===1){var e=t[0].expression,r=e.toWatch;return r.length!==1||r[0]!==e?r:void 0}}function xF(t){return t.type===le.Identifier||t.type===le.MemberExpression}function bF(t){if(t.body.length===1&&xF(t.body[0].expression))return{type:le.AssignmentExpression,left:t.body[0].expression,right:{type:le.NGValueParameter},operator:"="}}function SF(t){return t.body.length===0||t.body.length===1&&(t.body[0].expression.type===le.Literal||t.body[0].expression.type===le.ArrayExpression||t.body[0].expression.type===le.ObjectExpression)}function wF(t){return t.constant}function EF(t,e){this.astBuilder=t,this.$filter=e}EF.prototype={compile:function(t){var e=this,r=this.astBuilder.ast(t);this.state={nextId:0,filters:{},fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]},br(r,e.$filter);var n="",i;if(this.stage="assign",i=bF(r)){this.state.computing="assign";var a=this.nextId();this.recurse(i,a),this.return_(a),n="fn.assign="+this.generateFunction("assign","s,v,l")}var o=_F(r.body);e.stage="inputs",Lt(o,function(l,c){var f="fn"+c;e.state[f]={vars:[],body:[],own:{}},e.state.computing=f;var h=e.nextId();e.recurse(l,h),e.return_(h),e.state.inputs.push(f),l.watchId=c}),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,gF,Wne,yF);return this.state=this.stage=void 0,u.ast=r,u.literal=SF(r),u.constant=wF(r),u},USE:"use",STRICT:"strict",watchFns:function(){var t=[],e=this.state.inputs,r=this;return Lt(e,function(n){t.push("var "+n+"="+r.generateFunction(n,"s"))}),e.length&&t.push("fn.inputs=["+e.join(",")+"];"),t.join("")},generateFunction:function(t,e){return"function("+e+"){"+this.varsPrefix(t)+this.body(t)+"};"},filterPrefix:function(){var t=[],e=this;return Lt(this.state.filters,function(r,n){t.push(r+"=$filter("+e.escape(n)+")")}),t.length?"var "+t.join(",")+";":""},varsPrefix:function(t){return this.state[t].vars.length?"var "+this.state[t].vars.join(",")+";":""},body:function(t){return this.state[t].body.join("")},recurse:function(t,e,r,n,i,a){var o,s,u=this,l,c,f;if(n=n||aS,!a&&ol(t.watchId)){e=e||this.nextId(),this.if_("i",this.lazyAssign(e,this.unsafeComputedMember("i",t.watchId)),this.lazyRecurse(t,e,r,n,i,!0));return}switch(t.type){case le.Program:Lt(t.body,function(d,p){u.recurse(d.expression,void 0,void 0,function(v){s=v}),p!==t.body.length-1?u.current().body.push(s,";"):u.return_(s)});break;case le.Literal:c=this.escape(t.value),this.assign(e,c),n(e||c);break;case le.UnaryExpression:this.recurse(t.argument,void 0,void 0,function(d){s=d}),c=t.operator+"("+this.ifDefined(s,0)+")",this.assign(e,c),n(c);break;case le.BinaryExpression:this.recurse(t.left,void 0,void 0,function(d){o=d}),this.recurse(t.right,void 0,void 0,function(d){s=d}),t.operator==="+"?c=this.plus(o,s):t.operator==="-"?c=this.ifDefined(o,0)+t.operator+this.ifDefined(s,0):c="("+o+")"+t.operator+"("+s+")",this.assign(e,c),n(c);break;case le.LogicalExpression:e=e||this.nextId(),u.recurse(t.left,e),u.if_(t.operator==="&&"?e:u.not(e),u.lazyRecurse(t.right,e)),n(e);break;case le.ConditionalExpression:e=e||this.nextId(),u.recurse(t.test,e),u.if_(e,u.lazyRecurse(t.alternate,e),u.lazyRecurse(t.consequent,e)),n(e);break;case le.Identifier:e=e||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",t.name)+"?l:s"),r.computed=!1,r.name=t.name),u.if_(u.stage==="inputs"||u.not(u.getHasOwnProperty("l",t.name)),function(){u.if_(u.stage==="inputs"||u.and_("s",u.or_(u.isNull(u.nonComputedMember("s",t.name)),u.hasOwnProperty_("s",t.name))),function(){i&&i!==1&&u.if_(u.isNull(u.nonComputedMember("s",t.name)),u.lazyAssign(u.nonComputedMember("s",t.name),"{}")),u.assign(e,u.nonComputedMember("s",t.name))})},e&&u.lazyAssign(e,u.nonComputedMember("l",t.name))),n(e);break;case le.MemberExpression:o=r&&(r.context=this.nextId())||this.nextId(),e=e||this.nextId(),u.recurse(t.object,o,void 0,function(){var d=null,p=u.current().inAssignment;t.computed?(s=u.nextId(),p||u.state.computing==="assign"?d=u.unsafeComputedMember(o,s):d=u.computedMember(o,s)):(p||u.state.computing==="assign"?d=u.unsafeNonComputedMember(o,t.property.name):d=u.nonComputedMember(o,t.property.name),s=t.property.name),t.computed&&t.property.type===le.Literal&&u.recurse(t.property,s),u.if_(u.and_(u.notNull(o),u.or_(u.isNull(d),u.hasOwnProperty_(o,s,t.computed))),function(){t.computed?(t.property.type!==le.Literal&&u.recurse(t.property,s),i&&i!==1&&u.if_(u.not(d),u.lazyAssign(d,"{}")),u.assign(e,d),r&&(r.computed=!0,r.name=s)):(i&&i!==1&&u.if_(u.isNull(d),u.lazyAssign(d,"{}")),u.assign(e,d),r&&(r.computed=!1,r.name=t.property.name))},function(){u.assign(e,"undefined")}),n(e)},!!i);break;case le.CallExpression:e=e||this.nextId(),t.filter?(s=u.filter(t.callee.name),l=[],Lt(t.arguments,function(d){var p=u.nextId();u.recurse(d,p),l.push(p)}),c=s+".call("+s+","+l.join(",")+")",u.assign(e,c),n(e)):(s=u.nextId(),o={},l=[],u.recurse(t.callee,s,o,function(){u.if_(u.notNull(s),function(){if(Lt(t.arguments,function(p){u.recurse(p,t.constant?void 0:u.nextId(),void 0,function(v){l.push(v)})}),o.name){var d=u.member(o.context,o.name,o.computed);c="("+d+" === null ? null : "+u.unsafeMember(o.context,o.name,o.computed)+".call("+[o.context].concat(l).join(",")+"))"}else c=s+"("+l.join(",")+")";u.assign(e,c)},function(){u.assign(e,"undefined")}),n(e)}));break;case le.AssignmentExpression:s=this.nextId(),o={},u.current().inAssignment=!0,this.recurse(t.left,void 0,o,function(){u.if_(u.and_(u.notNull(o.context),u.or_(u.hasOwnProperty_(o.context,o.name),u.isNull(u.member(o.context,o.name,o.computed)))),function(){u.recurse(t.right,s),c=u.member(o.context,o.name,o.computed)+t.operator+s,u.assign(e,c),n(e||c)}),u.current().inAssignment=!1,u.recurse(t.right,s),u.current().inAssignment=!0},1),u.current().inAssignment=!1;break;case le.ArrayExpression:l=[],Lt(t.elements,function(d){u.recurse(d,t.constant?void 0:u.nextId(),void 0,function(p){l.push(p)})}),c="["+l.join(",")+"]",this.assign(e,c),n(e||c);break;case le.ObjectExpression:l=[],f=!1,Lt(t.properties,function(d){d.computed&&(f=!0)}),f?(e=e||this.nextId(),this.assign(e,"{}"),Lt(t.properties,function(d){d.computed?(o=u.nextId(),u.recurse(d.key,o)):o=d.key.type===le.Identifier?d.key.name:""+d.key.value,s=u.nextId(),u.recurse(d.value,s),u.assign(u.unsafeMember(e,o,d.computed),s)})):(Lt(t.properties,function(d){u.recurse(d.value,t.constant?void 0:u.nextId(),void 0,function(p){l.push(u.escape(d.key.type===le.Identifier?d.key.name:""+d.key.value)+":"+p)})}),c="{"+l.join(",")+"}",this.assign(e,c)),n(e||c);break;case le.ThisExpression:this.assign(e,"s"),n(e||"s");break;case le.LocalsExpression:this.assign(e,"l"),n(e||"l");break;case le.NGValueParameter:this.assign(e,"v"),n(e||"v");break}},getHasOwnProperty:function(t,e){var r=t+"."+e,n=this.current().own;return n.hasOwnProperty(r)||(n[r]=this.nextId(!1,t+"&&("+this.escape(e)+" in "+t+")")),n[r]},assign:function(t,e){if(t)return this.current().body.push(t,"=",e,";"),t},filter:function(t){return this.state.filters.hasOwnProperty(t)||(this.state.filters[t]=this.nextId(!0)),this.state.filters[t]},ifDefined:function(t,e){return"ifDefined("+t+","+this.escape(e)+")"},plus:function(t,e){return"plus("+t+","+e+")"},return_:function(t){this.current().body.push("return ",t,";")},if_:function(t,e,r){if(t===!0)e();else{var n=this.current().body;n.push("if(",t,"){"),e(),n.push("}"),r&&(n.push("else{"),r(),n.push("}"))}},or_:function(t,e){return"("+t+") || ("+e+")"},hasOwnProperty_:function(t,e,r){return r?"(Object.prototype.hasOwnProperty.call("+t+","+e+"))":"(Object.prototype.hasOwnProperty.call("+t+",'"+e+"'))"},and_:function(t,e){return"("+t+") && ("+e+")"},not:function(t){return"!("+t+")"},isNull:function(t){return t+"==null"},notNull:function(t){return t+"!=null"},nonComputedMember:function(t,e){var r=/^[$_a-zA-Z][$_a-zA-Z0-9]*$/,n=/[^$_a-zA-Z0-9]/g,i="";return r.test(e)?i=t+"."+e:(e=e.replace(n,this.stringEscapeFn),i=t+'["'+e+'"]'),i},unsafeComputedMember:function(t,e){return t+"["+e+"]"},unsafeNonComputedMember:function(t,e){return this.nonComputedMember(t,e)},computedMember:function(t,e){return this.state.computing==="assign"?this.unsafeComputedMember(t,e):"("+t+".hasOwnProperty("+e+") ? "+t+"["+e+"] : null)"},unsafeMember:function(t,e,r){return r?this.unsafeComputedMember(t,e):this.unsafeNonComputedMember(t,e)},member:function(t,e,r){return r?this.computedMember(t,e):this.nonComputedMember(t,e)},getStringValue:function(t){this.assign(t,"getStringValue("+t+")")},lazyRecurse:function(t,e,r,n,i,a){var o=this;return function(){o.recurse(t,e,r,n,i,a)}},lazyAssign:function(t,e){var r=this;return function(){r.assign(t,e)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(t){return"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)},escape:function(t){if(Uv(t))return"'"+t.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(oS(t))return t.toString();if(t===!0)return"true";if(t===!1)return"false";if(t===null)return"null";if(typeof t>"u")return"undefined";throw sl("esc","IMPOSSIBLE")},nextId:function(t,e){var r="v"+this.state.nextId++;return t||this.current().vars.push(r+(e?"="+e:"")),r},current:function(){return this.state[this.state.computing]}};function TF(t,e){this.astBuilder=t,this.$filter=e}TF.prototype={compile:function(t){var e=this,r=this.astBuilder.ast(t);br(r,e.$filter);var n,i;(n=bF(r))&&(i=this.recurse(n));var a=_F(r.body),o;a&&(o=[],Lt(a,function(l,c){var f=e.recurse(l);l.input=f,o.push(f),l.watchId=c}));var s=[];Lt(r.body,function(l){s.push(e.recurse(l.expression))});var u=r.body.length===0?aS:r.body.length===1?s[0]:function(l,c){var f;return Lt(s,function(h){f=h(l,c)}),f};return i&&(u.assign=function(l,c,f){return i(l,f,c)}),o&&(u.inputs=o),u.ast=r,u.literal=SF(r),u.constant=wF(r),u},recurse:function(t,e,r){var n,i,a=this,o;if(t.input)return this.inputs(t.input,t.watchId);switch(t.type){case le.Literal:return this.value(t.value,e);case le.UnaryExpression:return i=this.recurse(t.argument),this["unary"+t.operator](i,e);case le.BinaryExpression:return n=this.recurse(t.left),i=this.recurse(t.right),this["binary"+t.operator](n,i,e);case le.LogicalExpression:return n=this.recurse(t.left),i=this.recurse(t.right),this["binary"+t.operator](n,i,e);case le.ConditionalExpression:return this["ternary?:"](this.recurse(t.test),this.recurse(t.alternate),this.recurse(t.consequent),e);case le.Identifier:return a.identifier(t.name,e,r);case le.MemberExpression:return n=this.recurse(t.object,!1,!!r),t.computed||(i=t.property.name),t.computed&&(i=this.recurse(t.property)),t.computed?this.computedMember(n,i,e,r):this.nonComputedMember(n,i,e,r);case le.CallExpression:return o=[],Lt(t.arguments,function(s){o.push(a.recurse(s))}),t.filter&&(i=this.$filter(t.callee.name)),t.filter||(i=this.recurse(t.callee,!0)),t.filter?function(s,u,l,c){for(var f=[],h=0;h":function(t,e,r){return function(n,i,a,o){var s=t(n,i,a,o)>e(n,i,a,o);return r?{value:s}:s}},"binary<=":function(t,e,r){return function(n,i,a,o){var s=t(n,i,a,o)<=e(n,i,a,o);return r?{value:s}:s}},"binary>=":function(t,e,r){return function(n,i,a,o){var s=t(n,i,a,o)>=e(n,i,a,o);return r?{value:s}:s}},"binary&&":function(t,e,r){return function(n,i,a,o){var s=t(n,i,a,o)&&e(n,i,a,o);return r?{value:s}:s}},"binary||":function(t,e,r){return function(n,i,a,o){var s=t(n,i,a,o)||e(n,i,a,o);return r?{value:s}:s}},"ternary?:":function(t,e,r,n){return function(i,a,o,s){var u=t(i,a,o,s)?e(i,a,o,s):r(i,a,o,s);return n?{value:u}:u}},value:function(t,e){return function(){return e?{context:void 0,name:void 0,value:t}:t}},identifier:function(t,e,r){return function(n,i,a,o){var s=i&&t in i?i:n;r&&r!==1&&s&&s[t]==null&&(s[t]={});var u=s?s[t]:void 0;return e?{context:s,name:t,value:u}:u}},computedMember:function(t,e,r,n){return function(i,a,o,s){var u=t(i,a,o,s),l,c;return u!=null&&(l=e(i,a,o,s),l=gF(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(t,e,r,n){return function(i,a,o,s){var u=t(i,a,o,s);n&&n!==1&&u&&u[e]==null&&(u[e]={});var l=void 0;return u!=null&&Object.prototype.hasOwnProperty.call(u,e)&&(l=u[e]),r?{context:u,name:e,value:l}:l}},inputs:function(t,e){return function(r,n,i,a){return a?a[e]:t(r,n,i)}}};var e_=function(e,r,n){this.lexer=e,this.$filter=r,this.options=n,this.ast=new le(e,n),this.astCompiler=n.csp?new TF(this.ast,r):new EF(this.ast,r)};e_.prototype={constructor:e_,parse:function(t){return this.astCompiler.compile(t)}};nS.Lexer=J0;nS.Parser=e_;var AF=nS,Hne={},qne=AF.Lexer,Kne=AF.Parser;function wc(t,e){e=e||{};var r;if(typeof t!="string")throw new TypeError("src must be a string, instead saw '"+typeof t+"'");var n={csp:!1,literals:{true:!0,false:!1,null:null,undefined:void 0}},i=new qne(e),a=new Kne(i,function(s){return Hne[s]},n);return wc.cache?(r=wc.cache[t],r||(r=wc.cache[t]=a.parse(t)),r):a.parse(t)}wc.cache=Object.create(null);var CF=wc;const Zne=t=>{let e=!1;t.args.forEach(n=>{n.key==="global"&&(e=!0)});let r;if(e?r=Yz:r=vk,t.content.match(/=/)){const n=t.content.split(/=/)[0],i=t.content.split(/=/)[1];if(i==="random()")te.dispatch(r({key:n,value:Math.random()}));else if(i.match(/[+\-*\/()]/)){const o=i.split(/([+\-*\/()])/g).map(l=>l.match(/[a-zA-Z]/)?lS(l).toString():l).reduce((l,c)=>l+c,""),u=CF(o)();te.dispatch(r({key:n,value:u}))}else i.match(/true|false/)?(i.match(/true/)&&te.dispatch(r({key:n,value:!0})),i.match(/false/)&&te.dispatch(r({key:n,value:!1}))):isNaN(Number(i))?te.dispatch(r({key:n,value:i})):te.dispatch(r({key:n,value:Number(i)}));e?(Se.debug("设置全局变量:",{key:n,value:te.getState().userData.globalGameVar[n]}),ip()):Se.debug("设置变量:",{key:n,value:te.getState().stage.GameVar[n]})}return{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function lS(t){let e=0;return te.getState().stage.GameVar.hasOwnProperty(t)?e=te.getState().stage.GameVar[t]:te.getState().userData.globalGameVar.hasOwnProperty(t)&&(e=te.getState().userData.globalGameVar[t]),e}const Qne=t=>{const e=te.getState().stage,r=te.getState().userData,n=te.dispatch,i={stageGameVar:e.GameVar,globalGameVar:r.globalGameVar};n(Ge({key:"showText",value:JSON.stringify(i)})),n(Ge({key:"showName",value:"展示变量"})),Se.debug("展示变量:",i),setTimeout(()=>{D.events.textSettle.emit()},0);const a=fS(),o=750-r.optionData.textSpeed*250;return{performName:a,duration:o,isHoldOn:!1,stopFunction:()=>{D.events.textSettle.emit()},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function it(t,e,r){return{scriptType:t,scriptFunction:e,...r}}const PF={};function Jne(t){const e={};for(const[r,n]of Object.entries(t))e[r]=PF[n.scriptType]={scriptString:r,...n};return e}const eie=t=>{const{content:e}=t,r=e.split(",");for(const n of r){const i=n.split("->");if(i.length>=2){const a=i[0],o=i[1];te.dispatch(Sn.replaceUIlable([a,o]))}}return{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}},OF=Jne({intro:it(Qe.intro,Kre),changeBg:it(Qe.changeBg,Cte),changeFigure:it(Qe.changeFigure,Pte),miniAvatar:it(Qe.miniAvatar,Qre,{next:!0}),changeScene:it(Qe.changeScene,Ote),choose:it(Qe.choose,Cre),end:it(Qe.end,wne),bgm:it(Qe.bgm,Gq,{next:!0}),playVideo:it(Qe.video,one),setComplexAnimation:it(Qe.setComplexAnimation,cne),setFilter:it(Qe.setFilter,hne),pixiInit:it(Qe.pixiInit,Tne,{next:!0}),pixiPerform:it(Qe.pixi,ine,{next:!0}),label:it(Qe.label,Zre,{next:!0}),jumpLabel:it(Qe.jumpLabel,Ene),setVar:it(Qe.setVar,Zne,{next:!0}),showVars:it(Qe.showVars,Qne),unlockCg:it(Qe.unlockCg,xne,{next:!0}),unlockBgm:it(Qe.unlockBgm,_ne,{next:!0}),say:it(Qe.say,Ine),filmMode:it(Qe.filmMode,Ore,{next:!0}),callScene:it(Qe.callScene,mZ),setTextbox:it(Qe.setTextbox,pne),setAnimation:it(Qe.setAnimation,sne),playEffect:it(Qe.playEffect,ane,{next:!0}),setTempAnimation:it(Qe.setTempAnimation,dne),__commment:it(Qe.comment,Pre,{next:!0}),setTransform:it(Qe.setTransform,vne),setTransition:it(Qe.setTransition,yne,{next:!0}),getUserInput:it(Qe.getUserInput,Lre),applyStyle:it(Qe.applyStyle,eie,{next:!0})}),RF=Object.values(OF),tie=RF.filter(t=>t.next).map(t=>t.scriptType),uS=new Vq(rW,Nn,tie,RF),ua=(t,e,r)=>{const n=uS.parse(t,e,r);return Se.info(`解析场景:${e},数据为:`,n),n},cS=t=>{var n;let e=tW;e=(((n=PF[t.command])==null?void 0:n.scriptFunction)??OF.say.scriptFunction)(t),e.arrangePerformPromise?e.arrangePerformPromise.then(i=>D.gameplay.performController.arrangeNewPerform(i,t)):D.gameplay.performController.arrangeNewPerform(e,t)},rie=t=>{la(t.sceneUrl).then(e=>{D.sceneManager.sceneData.currentScene=ua(e,t.sceneName,t.sceneUrl),D.sceneManager.sceneData.currentSentenceId=t.continueLine+1,Se.debug("现在恢复场景,恢复后场景:",D.sceneManager.sceneData.currentScene),Fr()})};function nie(t){return CF(t)()}const t_=t=>{if(t===void 0)return!0;const r=t.split(/([+\-*\/()>=|<=|==|&&|\|\||!=)/g).map(n=>n.match(/[a-zA-Z]/)?n.match(/true/)||n.match(/false/)?n:lS(n).toString():n).reduce((n,i)=>n+i,"");return!!nie(r)},IF=()=>{if(D.sceneManager.sceneData.currentSentenceId>D.sceneManager.sceneData.currentScene.sentenceList.length-1){if(D.sceneManager.sceneData.sceneStack.length!==0){const l=D.sceneManager.sceneData.sceneStack.pop();l!==void 0&&rie(l)}return}const t=D.sceneManager.sceneData.currentScene.sentenceList[D.sceneManager.sceneData.currentSentenceId],e=l=>{let c=l;const f=c.match(new RegExp("(?{const d=lS(h.replace(new RegExp("(?{t.content=e(t.content),t.args.forEach(l=>{l.value&&typeof l.value=="string"&&(l.value=e(l.value))})})();let n=!0,i=!1,a="";if(t.args.forEach(l=>{l.key==="when"&&(i=!0,a=l.value.toString())}),i&&(n=t_(a)),!n){Se.warn("不满足条件,跳过本句!"),D.sceneManager.sceneData.currentSentenceId++,Fr();return}cS(t);let o=!1;t.args.forEach(l=>{l.key==="next"&&l.value&&(o=!0)});let s=t.command===Qe.say;t.args.forEach(l=>{l.key==="notend"&&l.value===!0&&(s=!1)});let u;if(o){D.sceneManager.sceneData.currentSentenceId++,IF();return}setTimeout(()=>{u=te.getState().stage;const l={currentStageState:u,globalGameVar:te.getState().userData.globalGameVar};Se.debug("本条语句执行结果",l),s&&D.backlogManager.saveCurrentStateToBacklog()},0),D.sceneManager.sceneData.currentSentenceId++},Fr=()=>{if(D.events.userInteractNext.emit(),te.getState().GUI.showTitle)return;let e=!1;if(D.gameplay.performController.performList.forEach(i=>{i.blockingNext()&&(e=!0)}),e){Se.warn("next 被阻塞!");return}let r=!0;if(D.gameplay.performController.performList.forEach(i=>{!i.isHoldOn&&!i.skipNextCollect&&(r=!1)}),r){const i=te.getState().stage,a=ar(i);for(let o=0;oMath.random().toString().substring(0,10);class iie{constructor(){Ce(this,"performList",[]);Ce(this,"timeoutList",[])}arrangeNewPerform(e,r,n=!0){if(e.performName!=="none"){if(n){const i={id:e.performName,isHoldOn:e.isHoldOn,script:r};te.dispatch(Sn.addPerform(i))}e.stopTimeout=setTimeout(()=>{e.isHoldOn||(this.unmountPerform(e.performName),e.goNextWhenOver&&this.goNextWhenOver())},e.duration),this.performList.push(e)}}unmountPerform(e,r=!1){if(r)for(let n=0;n{r.blockingAuto()&&(e=!0)}),e?setTimeout(this.goNextWhenOver,100):Fr()}}class aie{constructor(){Ce(this,"isAuto",!1);Ce(this,"isFast",!1);Ce(this,"autoInterval",null);Ce(this,"fastInterval",null);Ce(this,"autoTimeout",null);Ce(this,"pixiStage",null);Ce(this,"performController",new iie)}resetGamePlay(){this.performController.timeoutList=[],this.isAuto=!1,this.isFast=!1;const e=this.autoInterval;e!==null&&clearInterval(e),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 oie(t){return{all:t=t||new Map,on:function(e,r){var n=t.get(e);n?n.push(r):t.set(e,[r])},off:function(e,r){var n=t.get(e);n&&(r?n.splice(n.indexOf(r)>>>0,1):t.set(e,[]))},emit:function(e,r){var n=t.get(e);n&&n.slice().map(function(i){i(r)}),(n=t.get("*"))&&n.slice().map(function(i){i(e,r)})}}}class sie{constructor(){Ce(this,"textSettle",ph("text-settle"));Ce(this,"userInteractNext",ph("__NEXT"));Ce(this,"fullscreenDbClick",ph("fullscreen-dbclick"));Ce(this,"styleUpdate",ph("style-update"))}}const $g=oie();function ph(t){return{on:(e,r)=>{$g.on(`${t}-${r??""}`,e)},emit:(e,r)=>{$g.emit(`${t}-${r??""}`,e)},off:(e,r)=>{$g.off(`${t}-${r??""}`,e)}}}class lie{constructor(){Ce(this,"sceneManager",new Jz);Ce(this,"backlogManager",new Qz(this.sceneManager));Ce(this,"animationManager",new eW);Ce(this,"gameplay",new aie);Ce(this,"gameName","");Ce(this,"gameKey","");Ce(this,"events",new sie)}}const D=new lie,ut=kF(()=>{const t=te.getState().userData;ms.setItem(D.gameKey,t).then(()=>{Se.info("写入本地存储")})},100),Kc=kF(()=>{ms.getItem(D.gameKey).then(t=>{if(!t||!MF(t)){Se.warn("现在重置数据"),ut();return}te.dispatch(Pb(t))})},100);function kF(t,e){let r;function n(...i){clearTimeout(r);let a;return r=setTimeout(()=>{a=t.apply(n,i)},e),a}return n}const ip=()=>{const t=te.getState().userData;ms.setItem(D.gameKey,t).then(()=>{ms.getItem(D.gameKey).then(e=>{if(!e){ut();return}te.dispatch(Pb(e))}),Se.info("同步本地存储")})};function MF(t){let e=!0;for(const r in V0)t.hasOwnProperty(r)||(e=!1);return e}async function uie(){const t=await ms.getItem(D.gameKey);if(!t||!MF(t)){const e=te.getState().userData;return Se.warn("现在重置数据"),await ms.setItem(D.gameKey,e)}else te.dispatch(Pb(t))}var vt=(t=>(t[t.Save=0]="Save",t[t.Load=1]="Load",t[t.Option=2]="Option",t))(vt||{});const cie={showBacklog:!1,showStarter:!0,showTitle:!0,showMenuPanel:!1,showTextBox:!0,showControls:!0,controlsVisibility:!0,currentMenuTag:vt.Option,titleBg:"",titleBgm:"",logoImage:[],showExtra:!1,showGlobalDialog:!1,showPanicOverlay:!1,isEnterGame:!1,isShowLogo:!0},FF=zp({name:"gui",initialState:cie,reducers:{setVisibility:(t,e)=>{Kc();const{component:r,visibility:n}=e.payload;t[r]=n},setMenuPanelTag:(t,e)=>{Kc(),t.currentMenuTag=e.payload},setGuiAsset:(t,e)=>{const{asset:r,value:n}=e.payload;t[r]=n},setLogoImage:(t,e)=>{t.logoImage=[...e.payload]}}}),{setVisibility:rt,setMenuPanelTag:ss,setGuiAsset:ap,setLogoImage:fie}=FF.actions,hie=FF.reducer,te=cU({reducer:{stage:$X,GUI:hie,userData:Kz,saveData:Sne},middleware:VI({serializableCheck:!1})});let fP;function hS(t,e=0,r=100){if(Se.info("playing bgm"+t),t===""){fP=setTimeout(()=>{te.dispatch(Ge({key:"bgm",value:{src:"",enter:0,volume:100}}))},e);const i=te.getState().stage.bgm.src;te.dispatch(Ge({key:"bgm",value:{src:i,enter:-e,volume:r}}))}else clearTimeout(fP),te.dispatch(Ge({key:"bgm",value:{src:t,enter:e,volume:r}}));const n=document.getElementById("currentBgm");n.src&&(n==null||n.play())}function Xf(t){const e=document.getElementById("ebg");e&&(e.style.backgroundImage=`url("${t}")`)}const dS=()=>{Se.warn("清除所有演出");for(let t=0;t{te.getState().stage.PerformList.forEach(e=>{cS(e.script)})},die=t=>{const e=te.dispatch,r=D.backlogManager.getBacklog()[t];Se.debug("读取的backlog数据",r),la(r.saveScene.sceneUrl).then(i=>{D.sceneManager.sceneData.currentScene=ua(i,r.saveScene.sceneName,r.saveScene.sceneUrl);const a=D.sceneManager.sceneData.currentScene.subSceneList;D.sceneManager.settledScenes.push(D.sceneManager.sceneData.currentScene.sceneUrl);const o=jf(a);Uf(o)}),D.sceneManager.sceneData.currentSentenceId=r.saveScene.currentSentenceId,D.sceneManager.sceneData.sceneStack=ar(r.saveScene.sceneStack),dS();for(let i=D.backlogManager.getBacklog().length-1;i>t;i--)D.backlogManager.getBacklog().pop();D.backlogManager.isSaveBacklogNext=!0;const n=ar(r.currentStageState);e(Jp(n)),setTimeout(pS,0),e(rt({component:"showBacklog",visibility:!1})),e(rt({component:"showTextBox",visibility:!0}))},NF=t=>{const r=te.getState().saveData.saveData[t];Se.debug("读取的存档数据",r),LF(r)};function LF(t){if(!t){Se.info("暂无存档");return}const e=t;la(e.sceneData.sceneUrl).then(a=>{D.sceneManager.sceneData.currentScene=ua(a,e.sceneData.sceneName,e.sceneData.sceneUrl);const o=D.sceneManager.sceneData.currentScene.subSceneList;D.sceneManager.settledScenes.push(D.sceneManager.sceneData.currentScene.sceneUrl);const s=jf(o);Uf(s)}),D.sceneManager.sceneData.currentSentenceId=e.sceneData.currentSentenceId,D.sceneManager.sceneData.sceneStack=ar(e.sceneData.sceneStack),dS();const r=e.backlog;D.backlogManager.getBacklog().splice(0,D.backlogManager.getBacklog().length);for(const a of r)D.backlogManager.getBacklog().push(a);const n=ar(e.nowStageState),i=te.dispatch;i(Jp(n)),setTimeout(pS,0),i(rt({component:"showTitle",visibility:!1})),i(rt({component:"showMenuPanel",visibility:!1})),Xf(te.getState().stage.bgName)}function cd(t,e){for(let r=t;r<=e;r++){const n=te.getState().saveData.saveData[r];Ps.setItem(`${D.gameKey}-saves${r}`,n).then(()=>{Se.info(`存档${r}写入本地存储`)})}}function DF(t,e){for(let r=t;r<=e;r++)Ps.getItem(`${D.gameKey}-saves${r}`).then(n=>{te.dispatch(Oa.saveGame({index:r,saveData:n})),Se.info(`存档${r}读取自本地存储`)})}async function fd(){const t=te.getState().saveData.quickSaveData;await Ps.setItem(`${D.gameKey}-saves-fast`,t),Se.info("快速存档写入本地存储")}async function BF(){const t=await Ps.getItem(`${D.gameKey}-saves-fast`);te.dispatch(Oa.setFastSave(t)),Se.info("快速存档读取自本地存储")}const r_=t=>{const e=jF(t);te.dispatch(Oa.saveGame({index:t,saveData:e})),cd(t,t)};function jF(t,e=!0){const r=te.getState().stage,n=ar(D.backlogManager.getBacklog());let i="";if(e){const o=document.getElementById("pixiCanvas"),s=document.createElement("canvas"),u=s.getContext("2d");s.width=480,s.height=270,u.drawImage(o,0,0,480,270),i=s.toDataURL("image/webp",.5),s.remove()}return{nowStageState:ar(r),backlog:n,index:t,saveTime:new Date().toLocaleDateString()+" "+new Date().toLocaleTimeString("chinese",{hour12:!1}),sceneData:{currentSentenceId:D.sceneManager.sceneData.currentSentenceId,sceneStack:ar(D.sceneManager.sceneData.sceneStack),sceneName:D.sceneManager.sceneData.currentScene.sceneName,sceneUrl:D.sceneManager.sceneData.currentScene.sceneUrl},previewImage:i}}function pie(){`${D.gameName}${D.gameKey}`,`${D.gameName}${D.gameKey}`}async function vie(){const t=jF(-1,!1),e=ar(t);te.dispatch(Oa.setFastSave(e)),await fd()}async function mie(){return await uie(),te.getState().saveData.quickSaveData!==null}async function gie(){await BF();const t=te.getState().saveData.quickSaveData;t&&LF(t)}const yie=()=>{tS(!0);const t=Nn("start.txt",Fn.scene);la(t).then(e=>{D.sceneManager.sceneData.currentScene=ua(e,"start.txt",t),Fr()}),te.dispatch(rt({component:"showTitle",visibility:!1}))};async function _ie(){if(Xf(te.getState().stage.bgName),await mie()&&D.sceneManager.sceneData.currentSentenceId===0){await gie();return}D.sceneManager.sceneData.currentSentenceId===0&&D.sceneManager.sceneData.currentScene.sceneName==="start.txt"?Fr():pS()}function vS(t,e){if(t==null)return{};var r=ure(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}var xie={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 bie=Rn(xie);var Sie=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function hP(t){var e={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},r=t.match(/<\/?([^\s]+?)[/\s>]/);if(r&&(e.name=r[1],(bie[r[1]]||t.charAt(t.length-2)==="/")&&(e.voidElement=!0),e.name.startsWith("!--"))){var n=t.indexOf("-->");return{type:"comment",comment:n!==-1?t.slice(4,n):""}}for(var i=new RegExp(Sie),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 wie=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,Eie=/^\s*$/,Tie=Object.create(null);function UF(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(UF,"")+"";case"comment":return t+""}}var Aie={parse:function(t,e){e||(e={}),e.components||(e.components=Tie);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(wie,function(u,l){if(o){if(u!=="")return;o=!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(Sie),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 wie=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,Eie=/^\s*$/,Tie=Object.create(null);function UF(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(UF,"")+"";case"comment":return t+""}}var Aie={parse:function(t,e){e||(e={}),e.components||(e.components=Tie);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(wie,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}(ra),XS=function(t){St(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];ra.crossOrigin(a,o,n.crossorigin);for(var s=0;s2},e.prototype._onPlayStart=function(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(Ar.shared.add(this.update,this),this._isConnectedToTicker=!0)},e.prototype._onPlayStop=function(){this._isConnectedToTicker&&(Ar.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&&(Ar.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?(Ar.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(Ar.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}(ra),zS=function(t){St(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}(ra);hf.push(tm,zS,$S,XS,GS,Ms,VS,US);var rL={__proto__:null,Resource:ys,BaseImageResource:ra,INSTALLED:hf,autoDetectResource:Jv,AbstractMultiResource:em,ArrayResource:US,BufferResource:Ms,CanvasResource:$S,CubeResource:VS,ImageResource:tm,SVGResource:GS,VideoResource:XS,ImageBitmapResource:zS},Ede=function(t){St(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===On.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),dp=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 Er("disposeFramebuffer"),this.multisample=Pt.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:Pr.NEAREST,resolution:1,mipmap:vn.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this},t.prototype.addDepthTexture=function(e){return this.depthTexture=e||new Je(new Ede(null,{width:this.width,height:this.height}),{scaleMode:Pr.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:vn.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 bn[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),Th(e._EMPTY),Th(e._EMPTY.baseTexture)),e._EMPTY},enumerable:!1,configurable:!0}),Object.defineProperty(e,"WHITE",{get:function(){if(!e._WHITE){var r=_e.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)),Th(e._WHITE),Th(e._WHITE.baseTexture)}return e._WHITE},enumerable:!1,configurable:!0}),e}(vu),Co=function(t){St(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||Pt.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(jt.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=Pt.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||Pt.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=Ah[0],i=Ah[1],a=Ah[2],o=Ah[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?fy.copyFrom(a):fy.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}(),Yf=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}(),KS=function(){function t(e){this.renderer=e,this.emptyRenderer=new Yf(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=ea.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}(),oL=function(){function t(e){this.framebuffer=e,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=Pt.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}return t}(),Ide=new Ye,QS=function(){function t(e){this.renderer=e,this.managedFramebuffers=[],this.unknownFramebuffer=new dp(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;_e.PREFER_ENV===ea.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 oL(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=Pt.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;n0&&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(e.prototype,"realWidth",{get:function(){return Math.round(this.width*this.resolution)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"realHeight",{get:function(){return Math.round(this.height*this.resolution)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mipmap",{get:function(){return this._mipmap},set:function(r){this._mipmap!==r&&(this._mipmap=r,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scaleMode",{get:function(){return this._scaleMode},set:function(r){this._scaleMode!==r&&(this._scaleMode=r,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"wrapMode",{get:function(){return this._wrapMode},set:function(r){this._wrapMode!==r&&(this._wrapMode=r,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),e.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},e.prototype.setSize=function(r,n,i){return i=i||this.resolution,this.setRealSize(r*i,n*i,i)},e.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},e.prototype._refreshPOT=function(){this.isPowerOfTwo=E_(this.realWidth)&&E_(this.realHeight)},e.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)},e.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},e.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))},e.prototype.onError=function(r){this.emit("error",this,r)},e.prototype.destroy=function(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete Yn[this.cacheId],delete bn[this.cacheId],this.cacheId=null),this.dispose(),e.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0},e.prototype.dispose=function(){this.emit("dispose",this)},e.prototype.castToBaseTexture=function(){return this},e.from=function(r,n,i){i===void 0&&(i=_e.STRICT_TEXTURE_CACHE);var a=typeof r=="string",o=null;if(a)o=r;else{if(!r._pixiId){var s=n&&n.pixiIdPrefix||"pixiid";r._pixiId=s+"_"+To()}o=r._pixiId}var u=Yn[o];if(a&&i&&!u)throw new Error('The cacheId "'+o+'" does not exist in BaseTextureCache.');return u||(u=new e(r,n),u.cacheId=o,e.addToCache(u,o)),u},e.fromBuffer=function(r,n,i,a){r=r||new Float32Array(n*i*4);var o=new Ms(r,{width:n,height:i}),s=r instanceof Float32Array?Re.FLOAT:Re.UNSIGNED_BYTE;return new e(o,Object.assign({},wde,a||{width:n,height:i,type:s}))},e.addToCache=function(r,n){n&&(r.textureCacheIds.indexOf(n)===-1&&r.textureCacheIds.push(n),Yn[n]&&console.warn("BaseTexture added to the cache with an id ["+n+"] that already had an entry"),Yn[n]=r)},e.removeFromCache=function(r){if(typeof r=="string"){var n=Yn[r];if(n){var i=n.textureCacheIds.indexOf(r);return i>-1&&n.textureCacheIds.splice(i,1),delete Yn[r],n}}else if(r&&r.textureCacheIds){for(var a=0;a0)if(r.resource)this.addResourceAt(r.resource,n);else throw new Error("CubeResource does not support copying of renderTexture.");else r.target=vo.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},e.prototype.upload=function(r,n,i){for(var a=this.itemDirtyIds,o=0;o)?\s*()]*-->)?\s*\]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i,e}(ra),zS=function(t){St(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];ra.crossOrigin(a,o,n.crossorigin);for(var s=0;s2},e.prototype._onPlayStart=function(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(Ar.shared.add(this.update,this),this._isConnectedToTicker=!0)},e.prototype._onPlayStop=function(){this._isConnectedToTicker&&(Ar.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&&(Ar.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?(Ar.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(Ar.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}(ra),WS=function(t){St(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}(ra);hf.push(tm,WS,VS,zS,XS,Ms,GS,$S);var rL={__proto__:null,Resource:ys,BaseImageResource:ra,INSTALLED:hf,autoDetectResource:Jv,AbstractMultiResource:em,ArrayResource:$S,BufferResource:Ms,CanvasResource:VS,CubeResource:GS,ImageResource:tm,SVGResource:XS,VideoResource:zS,ImageBitmapResource:WS},Ede=function(t){St(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===On.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),dp=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 Er("disposeFramebuffer"),this.multisample=Pt.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:Pr.NEAREST,resolution:1,mipmap:vn.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this},t.prototype.addDepthTexture=function(e){return this.depthTexture=e||new Je(new Ede(null,{width:this.width,height:this.height}),{scaleMode:Pr.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:vn.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 bn[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),Th(e._EMPTY),Th(e._EMPTY.baseTexture)),e._EMPTY},enumerable:!1,configurable:!0}),Object.defineProperty(e,"WHITE",{get:function(){if(!e._WHITE){var r=_e.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)),Th(e._WHITE),Th(e._WHITE.baseTexture)}return e._WHITE},enumerable:!1,configurable:!0}),e}(vu),Co=function(t){St(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||Pt.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(jt.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=Pt.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||Pt.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=Ah[0],i=Ah[1],a=Ah[2],o=Ah[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?fy.copyFrom(a):fy.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}(),Yf=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}(),ZS=function(){function t(e){this.renderer=e,this.emptyRenderer=new Yf(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=ea.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}(),oL=function(){function t(e){this.framebuffer=e,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=Pt.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}return t}(),Ide=new Ye,JS=function(){function t(e){this.renderer=e,this.managedFramebuffers=[],this.unknownFramebuffer=new dp(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;_e.PREFER_ENV===ea.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 oL(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=Pt.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=ea.WEBGL2&&(e=t.getContext("webgl2",{})),e||(e=t.getContext("webgl",{})||t.getContext("experimental-webgl",{}),e?e.getExtension("WEBGL_draw_buffers"):e=null),Uu=e}return Uu}var Ch;function Mde(){if(!Ch){Ch=En.MEDIUM;var t=cL();if(t&&t.getShaderPrecisionFormat){var e=t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT);Ch=e.precision?En.HIGH:En.MEDIUM}}return Ch}function P2(t,e,r){if(t.substring(0,9)!=="precision"){var n=e;return e===En.HIGH&&r!==En.HIGH&&(n=En.MEDIUM),"precision "+n+` float; -`+t}else if(r!==En.HIGH&&t.substring(0,15)==="precision highp")return t.replace("precision highp","precision mediump");return t}var Fde={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 fL(t){return Fde[t]}var Ph=null,O2={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 hL(t,e){if(!Ph){var r=Object.keys(O2);Ph={};for(var n=0;n=ea.WEBGL2&&(e=t.getContext("webgl2",{})),e||(e=t.getContext("webgl",{})||t.getContext("experimental-webgl",{}),e?e.getExtension("WEBGL_draw_buffers"):e=null),Uu=e}return Uu}var Ch;function Mde(){if(!Ch){Ch=En.MEDIUM;var t=cL();if(t&&t.getShaderPrecisionFormat){var e=t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT);Ch=e.precision?En.HIGH:En.MEDIUM}}return Ch}function O2(t,e,r){if(t.substring(0,9)!=="precision"){var n=e;return e===En.HIGH&&r!==En.HIGH&&(n=En.MEDIUM),"precision "+n+` float; +`+t}else if(r!==En.HIGH&&t.substring(0,15)==="precision highp")return t.replace("precision highp","precision mediump");return t}var Fde={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 fL(t){return Fde[t]}var Ph=null,R2={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 hL(t,e){if(!Ph){var r=Object.keys(R2);Ph={};for(var n=0;n"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}(),vL=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}(),I2=new jt,k2=[],tw=function(t){St(e,t);function e(r){var n=t.call(this,r)||this;return n.glConst=_e.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=k2.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?I2.copyFrom(o):I2.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&&k2.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}(vL),rw=function(t){St(e,t);function e(r){var n=t.call(this,r)||this;return n.glConst=_e.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}(vL),nw=function(){function t(e){this.renderer=e,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new jt,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,Vu=new Ye,iw=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||(Vu.x=e.frame.x,Vu.y=e.frame.y,Vu.width=r.width,Vu.height=r.height,n=Vu),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 Hde(t,e,r,n,i){r.buffer.update(i)}var qde={float:` +`,I2=new jt,rm=function(){function t(e,r){this._texture=e,this.mapCoord=new jt,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._textureID=-1,this._updateID=0,this.clampOffset=0,this.clampMargin=typeof 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}(),vL=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}(),k2=new jt,M2=[],rw=function(t){St(e,t);function e(r){var n=t.call(this,r)||this;return n.glConst=_e.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=M2.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?k2.copyFrom(o):k2.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&&M2.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}(vL),nw=function(t){St(e,t);function e(r){var n=t.call(this,r)||this;return n.glConst=_e.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}(vL),iw=function(){function t(e){this.renderer=e,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new jt,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,Vu=new Ye,aw=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||(Vu.x=e.frame.x,Vu.y=e.frame.y,Vu.width=r.width,Vu.height=r.height,n=Vu),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 Hde(t,e,r,n,i){r.buffer.update(i)}var qde={float:` data[offset] = v; `,vec2:` data[offset] = v[0]; @@ -602,7 +602,7 @@ void main(void) `)}}return o.push(` renderer.buffer.update(buffer); `),{size:a,syncFunc:new Function("ud","uv","renderer","syncData","buffer",o.join(` -`))}}var Kde=function(){function t(){}return t}(),xL=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 Zde(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 spe(t){var e,r,n,i,a,o,s,u,l,c,f,h,d,p,v,g,m,y,_,b,x,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]=(b={},b[ve.RGB]=t.RGB,b),y[Re.UNSIGNED_SHORT_4_4_4_4]=(x={},x[ve.RGBA]=t.RGBA,x),y[Re.UNSIGNED_SHORT_5_5_5_1]=(S={},S[ve.RGBA]=t.RGBA,S),y),w}var yd=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}(),lw=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=spe(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 yd(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===vn.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!==vn.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===Pr.LINEAR?n.LINEAR_MIPMAP_LINEAR:n.NEAREST_MIPMAP_NEAREST);var i=this.renderer.context.extensions.anisotropicFiltering;if(i&&e.anisotropicLevel>0&&e.scaleMode===Pr.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===Pr.LINEAR?n.LINEAR:n.NEAREST);n.texParameteri(e.target,n.TEXTURE_MAG_FILTER,e.scaleMode===Pr.LINEAR?n.LINEAR:n.NEAREST)},t.prototype.destroy=function(){this.renderer=null},t}(),SL={__proto__:null,FilterSystem:qS,BatchSystem:KS,ContextSystem:ZS,FramebufferSystem:QS,GeometrySystem:JS,MaskSystem:ew,ScissorSystem:tw,StencilSystem:rw,ProjectionSystem:nw,RenderTextureSystem:iw,ShaderSystem:aw,StateSystem:ow,TextureGCSystem:sw,TextureSystem:lw},xy=new jt,wL=function(t){St(e,t);function e(r,n){r===void 0&&(r=jl.UNKNOWN);var i=t.call(this)||this;return n=Object.assign({},_e.RENDER_OPTIONS,n),i.options=n,i.type=r,i.screen=new Ye(0,0,n.width,n.height),i.view=n.view||_e.ADAPTER.createCanvas(),i.resolution=n.resolution||_e.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&&(dn("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"&&(dn("6.1.0","generateTexture options (scaleMode, resolution, region) are now object options."),n={scaleMode:n,resolution:i,region:a});var o=n.region,s=Sde(n,["region"]);a=o||r.getLocalBounds(null,!0),a.width===0&&(a.width=1),a.height===0&&(a.height=1);var u=Co.create(I_({width:a.width,height:a.height},s));return xy.tx=-a.x,xy.ty=-a.y,this.render(r,{renderTexture:u,clear:!1,transform:xy,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=jl.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=MS(r),pr(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}(vu),lpe=function(){function t(e){this.buffer=e||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}return t}(),upe=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=Pt.HIGH?this.multisample=Pt.HIGH:n>=Pt.MEDIUM?this.multisample=Pt.MEDIUM:n>=Pt.LOW?this.multisample=Pt.LOW:this.multisample=Pt.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?(dn("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 dn("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){dn("6.5.0","Renderer.registerPlugin() has been deprecated, please use extensions.add() instead."),ca.add({name:r,type:dt.RendererPlugin,ref:n})},e.__plugins={},e}(wL);ca.handleByMap(dt.RendererPlugin,uw.__plugins);function EL(t){return uw.create(t)}var cpe=`attribute vec2 aVertexPosition; +`))}}var Kde=function(){function t(){}return t}(),xL=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 Zde(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 spe(t){var e,r,n,i,a,o,s,u,l,c,f,h,d,p,v,g,m,y,_,b,x,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]=(b={},b[ve.RGB]=t.RGB,b),y[Re.UNSIGNED_SHORT_4_4_4_4]=(x={},x[ve.RGBA]=t.RGBA,x),y[Re.UNSIGNED_SHORT_5_5_5_1]=(S={},S[ve.RGBA]=t.RGBA,S),y),w}var yd=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}(),uw=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=spe(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 yd(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===vn.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!==vn.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===Pr.LINEAR?n.LINEAR_MIPMAP_LINEAR:n.NEAREST_MIPMAP_NEAREST);var i=this.renderer.context.extensions.anisotropicFiltering;if(i&&e.anisotropicLevel>0&&e.scaleMode===Pr.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===Pr.LINEAR?n.LINEAR:n.NEAREST);n.texParameteri(e.target,n.TEXTURE_MAG_FILTER,e.scaleMode===Pr.LINEAR?n.LINEAR:n.NEAREST)},t.prototype.destroy=function(){this.renderer=null},t}(),SL={__proto__:null,FilterSystem:KS,BatchSystem:ZS,ContextSystem:QS,FramebufferSystem:JS,GeometrySystem:ew,MaskSystem:tw,ScissorSystem:rw,StencilSystem:nw,ProjectionSystem:iw,RenderTextureSystem:aw,ShaderSystem:ow,StateSystem:sw,TextureGCSystem:lw,TextureSystem:uw},xy=new jt,wL=function(t){St(e,t);function e(r,n){r===void 0&&(r=jl.UNKNOWN);var i=t.call(this)||this;return n=Object.assign({},_e.RENDER_OPTIONS,n),i.options=n,i.type=r,i.screen=new Ye(0,0,n.width,n.height),i.view=n.view||_e.ADAPTER.createCanvas(),i.resolution=n.resolution||_e.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&&(dn("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"&&(dn("6.1.0","generateTexture options (scaleMode, resolution, region) are now object options."),n={scaleMode:n,resolution:i,region:a});var o=n.region,s=Sde(n,["region"]);a=o||r.getLocalBounds(null,!0),a.width===0&&(a.width=1),a.height===0&&(a.height=1);var u=Co.create(I_({width:a.width,height:a.height},s));return xy.tx=-a.x,xy.ty=-a.y,this.render(r,{renderTexture:u,clear:!1,transform:xy,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=jl.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=FS(r),pr(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}(vu),lpe=function(){function t(e){this.buffer=e||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}return t}(),upe=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=Pt.HIGH?this.multisample=Pt.HIGH:n>=Pt.MEDIUM?this.multisample=Pt.MEDIUM:n>=Pt.LOW?this.multisample=Pt.LOW:this.multisample=Pt.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?(dn("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 dn("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){dn("6.5.0","Renderer.registerPlugin() has been deprecated, please use extensions.add() instead."),ca.add({name:r,type:dt.RendererPlugin,ref:n})},e.__plugins={},e}(wL);ca.handleByMap(dt.RendererPlugin,cw.__plugins);function EL(t){return cw.create(t)}var cpe=`attribute vec2 aVertexPosition; attribute vec2 aTextureCoord; uniform mat3 projectionMatrix; @@ -639,7 +639,7 @@ void main(void) gl_Position = filterVertexPosition(); vTextureCoord = filterTextureCoord(); } -`,TL=cpe,cw=fpe,hpe=function(){function t(e){dn("6.1.0","System class is deprecated, implemement ISystem interface instead."),this.renderer=e}return t.prototype.destroy=function(){this.renderer=null},t}(),pp=function(){function t(){this.texArray=null,this.blend=0,this.type=Ln.TRIANGLES,this.start=0,this.size=0,this.data=null}return t}(),vp=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;dthis.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=Ih+"px",r.style.height=Ih+"px",r.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",r.style.position="absolute",r.style.zIndex=N2.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===mpe&&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}();/*! + */var IL={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:null,accessibleType:"button",accessiblePointerEvents:"auto",accessibleChildren:!0,renderId:-1};zt.mixin(IL);var mpe=9,Ih=100,gpe=0,ype=0,L2=2,D2=1,_pe=-1e3,xpe=-1e3,bpe=2,kL=function(){function t(e){this.debug=!1,this._isActive=!1,this._isMobileAccessibility=!1,this.pool=[],this.renderId=0,this.children=[],this.androidUpdateCount=0,this.androidUpdateFrequency=500,this._hookDiv=null,(ei.tablet||ei.phone)&&this.createTouchHook();var r=document.createElement("div");r.style.width=Ih+"px",r.style.height=Ih+"px",r.style.position="absolute",r.style.top=gpe+"px",r.style.left=ype+"px",r.style.zIndex=L2.toString(),this.div=r,this.renderer=e,this._onKeyDown=this._onKeyDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),globalThis.addEventListener("keydown",this._onKeyDown,!1)}return Object.defineProperty(t.prototype,"isActive",{get:function(){return this._isActive},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isMobileAccessibility",{get:function(){return this._isMobileAccessibility},enumerable:!1,configurable:!0}),t.prototype.createTouchHook=function(){var e=this,r=document.createElement("button");r.style.width=D2+"px",r.style.height=D2+"px",r.style.position="absolute",r.style.top=_pe+"px",r.style.left=xpe+"px",r.style.zIndex=bpe.toString(),r.style.backgroundColor="#FF0000",r.title="select to enable accessibility for this content",r.addEventListener("focus",function(){e._isMobileAccessibility=!0,e.activate(),e.destroyTouchHook()}),document.body.appendChild(r),this._hookDiv=r},t.prototype.destroyTouchHook=function(){this._hookDiv&&(document.body.removeChild(this._hookDiv),this._hookDiv=null)},t.prototype.activate=function(){var e;this._isActive||(this._isActive=!0,globalThis.document.addEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown,!1),this.renderer.on("postrender",this.update,this),(e=this.renderer.view.parentNode)===null||e===void 0||e.appendChild(this.div))},t.prototype.deactivate=function(){var e;!this._isActive||this._isMobileAccessibility||(this._isActive=!1,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.addEventListener("keydown",this._onKeyDown,!1),this.renderer.off("postrender",this.update),(e=this.div.parentNode)===null||e===void 0||e.removeChild(this.div))},t.prototype.updateAccessibleObjects=function(e){if(!(!e.visible||!e.accessibleChildren)){e.accessible&&e.interactive&&(e._accessibleActive||this.addChild(e),e.renderId=this.renderId);var r=e.children;if(r)for(var n=0;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=Ih+"px",r.style.height=Ih+"px",r.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",r.style.position="absolute",r.style.zIndex=L2.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===mpe&&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 * @@ -703,7 +703,7 @@ 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(t,e){return F_=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])},F_(t,e)};function Spe(t,e){F_(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var ML=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}(),_d=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}(),wpe=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}(),FL={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};zt.mixin(FL);var kh=1,Mh={target:null,data:{global:null}},NL=function(t){Spe(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 M_,i.mouse.identifier=kh,i.mouse.global.set(-999999),i.activeInteractionData={},i.activeInteractionData[kh]=i.mouse,i.interactionDataPool=[],i.eventData=new ML,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 wpe,i._tempDisplayObject=new jS,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 Mh.target=null,Mh.data.global=r,n||(n=this.lastObjectRendered),this.processInteractive(Mh,n,null,!0),Mh.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||(Ar.system.add(this.tickerUpdate,this,ta.INTERACTION),this.tickerAdded=!0)},e.prototype.removeTickerListener=function(){this.tickerAdded&&(Ar.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=kh),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}(vu);/*! +***************************************************************************** */var F_=function(t,e){return F_=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])},F_(t,e)};function Spe(t,e){F_(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var ML=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}(),_d=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}(),wpe=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}(),FL={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};zt.mixin(FL);var kh=1,Mh={target:null,data:{global:null}},NL=function(t){Spe(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 M_,i.mouse.identifier=kh,i.mouse.global.set(-999999),i.activeInteractionData={},i.activeInteractionData[kh]=i.mouse,i.interactionDataPool=[],i.eventData=new ML,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 wpe,i._tempDisplayObject=new US,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 Mh.target=null,Mh.data.global=r,n||(n=this.lastObjectRendered),this.processInteractive(Mh,n,null,!0),Mh.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||(Ar.system.add(this.tickerUpdate,this,ta.INTERACTION),this.tickerAdded=!0)},e.prototype.removeTickerListener=function(){this.tickerAdded&&(Ar.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=kh),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}(vu);/*! * @pixi/extract - v6.5.10 * Compiled Thu, 06 Jul 2023 15:25:11 UTC * @@ -715,7 +715,7 @@ PERFORMANCE OF THIS SOFTWARE. * * @pixi/loaders is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license - */var Fh=function(){function t(e,r,n){r===void 0&&(r=!1),this._fn=e,this._once=r,this._thisArg=n,this._next=this._prev=this._owner=null}return t.prototype.detach=function(){return this._owner===null?!1:(this._owner.detach(this),!0)},t}();function D2(t,e){return t._head?(t._tail._next=e,e._prev=t._tail,t._tail=e):(t._head=e,t._tail=e),e._owner=t,e}var Aa=function(){function t(){this._head=this._tail=void 0}return t.prototype.handlers=function(e){e===void 0&&(e=!1);var r=this._head;if(e)return!!r;for(var n=[];r;)n.push(r),r=r._next;return n},t.prototype.has=function(e){if(!(e instanceof Fh))throw new Error("MiniSignal#has(): First arg must be a SignalBinding object.");return e._owner===this},t.prototype.dispatch=function(){for(var e=arguments,r=[],n=0;n"u"&&(by=!!(globalThis.XDomainRequest&&!("withCredentials"in new XMLHttpRequest))),by&&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"?B2:e.status;(e.responseType===""||e.responseType==="text"||typeof e.responseType>"u")&&(r=e.responseText),n===Ape&&(r.length>0||e.responseType===t.XHR_RESPONSE_TYPE.BUFFER)?n=B2:n===Ppe&&(n=Cpe);var i=n/100|0;if(i===Ope)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,Nh||(Nh=document.createElement("a")),Nh.href=e;var n=DL(Nh.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 Rpe(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;a"u"&&(by=!!(globalThis.XDomainRequest&&!("withCredentials"in new XMLHttpRequest))),by&&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"?j2:e.status;(e.responseType===""||e.responseType==="text"||typeof e.responseType>"u")&&(r=e.responseText),n===Ape&&(r.length>0||e.responseType===t.XHR_RESPONSE_TYPE.BUFFER)?n=j2:n===Ppe&&(n=Cpe);var i=n/100|0;if(i===Ope)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,Nh||(Nh=document.createElement("a")),Nh.href=e;var n=DL(Nh.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 Rpe(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}($L),VL=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++)x.push(new Uint8Array(t,B,T)),B+=T}return x.map(function(U){return new gp(U,{format:b,width:a,height:i,levels:o})})}throw u&zpe?new Error("DDSParser does not support uncompressed texture data."):u&Wpe?new Error("DDSParser does not supported YUV uncompressed texture data."):u&Ype?new Error("DDSParser does not support single-channel (lumninance) texture data!"):u&Gpe?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,ya,Xu,V2=[171,75,84,88,32,49,49,187,13,10,26,10],tve=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},D_=64,B_=(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),zL=(ya={},ya[ve.RGBA]=4,ya[ve.RGB]=3,ya[ve.RG]=2,ya[ve.RED]=1,ya[ve.LUMINANCE]=1,ya[ve.LUMINANCE_ALPHA]=2,ya[ve.ALPHA]=1,ya),WL=(Xu={},Xu[Re.UNSIGNED_SHORT_4_4_4_4]=2,Xu[Re.UNSIGNED_SHORT_5_5_5_1]=2,Xu[Re.UNSIGNED_SHORT_5_6_5]=2,Xu);function YL(t,e,r){r===void 0&&(r=!1);var n=new DataView(e);if(!rve(t,n))return null;var i=n.getUint32(ci.ENDIANNESS,!0)===tve,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),b=u*l;a===0&&(b=m*y);var x;if(a!==0?B_[a]?x=B_[a]*zL[o]:x=WL[a]:x=df[s],x===void 0)throw new Error("Unable to resolve the pixel format stored in the *.ktx file!");for(var S=r?ive(n,p,i):null,w=b*x,T=w,E=u,A=l,O=m,P=y,F=D_+p,k=0;k1||a!==0?E:O,levelHeight:d>1||a!==0?A:P,levelBuffer:new Uint8Array(e,U,T)},U+=T}F+=B+4,F=F%4!==0?F+4-F%4:F,E=E>>1||1,A=A>>1||1,O=E+v-1&~(v-1),P=A+g-1&~(g-1),T=O*P*x}return a!==0?{uncompressed:_.map(function(Q){var $=Q[0].levelBuffer,M=!1;return a===Re.FLOAT?$=new Float32Array(Q[0].levelBuffer.buffer,Q[0].levelBuffer.byteOffset,Q[0].levelBuffer.byteLength/4):a===Re.UNSIGNED_INT?(M=!0,$=new Uint32Array(Q[0].levelBuffer.buffer,Q[0].levelBuffer.byteOffset,Q[0].levelBuffer.byteLength/4)):a===Re.INT&&(M=!0,$=new Int32Array(Q[0].levelBuffer.buffer,Q[0].levelBuffer.byteOffset,Q[0].levelBuffer.byteLength/4)),{resource:new Ms($,{width:Q[0].levelWidth,height:Q[0].levelHeight}),type:a,format:M?nve(o):o}}),kvData:S}:{compressed:_.map(function(Q){return new gp(null,{format:s,width:u,height:l,levels:d,levelBuffers:Q})}),kvData:S}}function rve(t,e){for(var r=0;re-i){console.error("KTXLoader: keyAndValueByteSize out of bounds");break}for(var u=0;u0&&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}($L),VL=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++)x.push(new Uint8Array(t,B,T)),B+=T}return x.map(function(U){return new gp(U,{format:b,width:a,height:i,levels:o})})}throw u&zpe?new Error("DDSParser does not support uncompressed texture data."):u&Wpe?new Error("DDSParser does not supported YUV uncompressed texture data."):u&Ype?new Error("DDSParser does not support single-channel (lumninance) texture data!"):u&Gpe?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,ya,Xu,G2=[171,75,84,88,32,49,49,187,13,10,26,10],tve=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},D_=64,B_=(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),zL=(ya={},ya[ve.RGBA]=4,ya[ve.RGB]=3,ya[ve.RG]=2,ya[ve.RED]=1,ya[ve.LUMINANCE]=1,ya[ve.LUMINANCE_ALPHA]=2,ya[ve.ALPHA]=1,ya),WL=(Xu={},Xu[Re.UNSIGNED_SHORT_4_4_4_4]=2,Xu[Re.UNSIGNED_SHORT_5_5_5_1]=2,Xu[Re.UNSIGNED_SHORT_5_6_5]=2,Xu);function YL(t,e,r){r===void 0&&(r=!1);var n=new DataView(e);if(!rve(t,n))return null;var i=n.getUint32(ci.ENDIANNESS,!0)===tve,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),b=u*l;a===0&&(b=m*y);var x;if(a!==0?B_[a]?x=B_[a]*zL[o]:x=WL[a]:x=df[s],x===void 0)throw new Error("Unable to resolve the pixel format stored in the *.ktx file!");for(var S=r?ive(n,p,i):null,w=b*x,T=w,E=u,A=l,O=m,P=y,F=D_+p,k=0;k1||a!==0?E:O,levelHeight:d>1||a!==0?A:P,levelBuffer:new Uint8Array(e,U,T)},U+=T}F+=B+4,F=F%4!==0?F+4-F%4:F,E=E>>1||1,A=A>>1||1,O=E+v-1&~(v-1),P=A+g-1&~(g-1),T=O*P*x}return a!==0?{uncompressed:_.map(function(Q){var $=Q[0].levelBuffer,M=!1;return a===Re.FLOAT?$=new Float32Array(Q[0].levelBuffer.buffer,Q[0].levelBuffer.byteOffset,Q[0].levelBuffer.byteLength/4):a===Re.UNSIGNED_INT?(M=!0,$=new Uint32Array(Q[0].levelBuffer.buffer,Q[0].levelBuffer.byteOffset,Q[0].levelBuffer.byteLength/4)):a===Re.INT&&(M=!0,$=new Int32Array(Q[0].levelBuffer.buffer,Q[0].levelBuffer.byteOffset,Q[0].levelBuffer.byteLength/4)),{resource:new Ms($,{width:Q[0].levelWidth,height:Q[0].levelHeight}),type:a,format:M?nve(o):o}}),kvData:S}:{compressed:_.map(function(Q){return new gp(null,{format:s,width:u,height:l,levels:d,levelBuffers:Q})}),kvData:S}}function rve(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=be.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,pr(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.lengths&&(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=be.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,pr(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=LS(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=XN(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?Kv(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}(Yf);/*! +`,ZL=function(t){KL(e,t);function e(r){var n=t.call(this,r)||this;return n.shader=null,n.properties=null,n.tempMatrix=new jt,n.properties=[{attributeName:"aVertexPosition",size:2,uploadFunction:n.uploadVertices,offset:0},{attributeName:"aPositionCoord",size:2,uploadFunction:n.uploadPosition,offset:0},{attributeName:"aRotation",size:1,uploadFunction:n.uploadRotation,offset:0},{attributeName:"aTextureCoord",size:2,uploadFunction:n.uploadUvs,offset:0},{attributeName:"aColor",size:1,type:Re.UNSIGNED_BYTE,uploadFunction:n.uploadTint,offset:0}],n.shader=Ma.from(sve,ove,{}),n.state=Mo.for2d(),n}return e.prototype.render=function(r){var n=r.children,i=r._maxSize,a=r._batchSize,o=this.renderer,s=n.length;if(s!==0){s>i&&!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=DS(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=XN(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?Kv(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}(Yf);/*! * @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 Vi;(function(t){t.MITER="miter",t.BEVEL="bevel",t.ROUND="round"})(Vi||(Vi={}));var Ra;(function(t){t.BUTT="butt",t.ROUND="round",t.SQUARE="square"})(Ra||(Ra={}));var Gl={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}},pw=function(){function t(){this.color=16777215,this.alpha=1,this.texture=Me.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=Me.WHITE,this.matrix=null,this.visible=!1},t.prototype.destroy=function(){this.texture=null,this.matrix=null},t}();/*! ***************************************************************************** + */var Vi;(function(t){t.MITER="miter",t.BEVEL="bevel",t.ROUND="round"})(Vi||(Vi={}));var Ra;(function(t){t.BUTT="butt",t.ROUND="round",t.SQUARE="square"})(Ra||(Ra={}));var Gl={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}},vw=function(){function t(){this.color=16777215,this.alpha=1,this.texture=Me.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=Me.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 @@ -805,7 +805,7 @@ 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(t,e){return U_=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])},U_(t,e)};function vw(t,e){U_(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function X2(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){X2(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,b=a,x=r+_,S=r-_,w=n+b;if(e[v++]=x,e[v++]=w,e[--g]=w,e[--g]=S,a){var T=n-b;e[m++]=S,e[m++]=T,e[--y]=T,e[--y]=x}}for(var E=1;Ef&&(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===Vi.ROUND?p+=Bo(x,S,x-E*B,S-A*B,x-O*B,S-P*B,h,!1)+4:p+=2,h.push(x-O*U,S-P*U),h.push(x+O*B,S+P*B));continue}var H=(-E+_)*(-A+S)-(-E+x)*(-A+b),ee=(-O+w)*(-P+S)-(-O+x)*(-P+T),ie=(J*ee-$*H)/V,ae=(M*H-Q*ee)/V,pe=(ie-x)*(ie-x)+(ae-S)*(ae-S),ge=x+(ie-x)*B,oe=S+(ae-S)*B,ye=x-(ie-x)*U,Ae=S-(ae-S)*U,xe=Math.min(J*J+Q*Q,$*$+M*M),Oe=j?B:U,ke=xe+Oe*Oe*m,we=pe<=ke;we?a.join===Vi.BEVEL||pe/m>y?(j?(h.push(ge,oe),h.push(x+E*U,S+A*U),h.push(ge,oe),h.push(x+O*U,S+P*U)):(h.push(x-E*B,S-A*B),h.push(ye,Ae),h.push(x-O*B,S-P*B),h.push(ye,Ae)),p+=2):a.join===Vi.ROUND?j?(h.push(ge,oe),h.push(x+E*U,S+A*U),p+=Bo(x,S,x+E*U,S+A*U,x+O*U,S+P*U,h,!0)+4,h.push(ge,oe),h.push(x+O*U,S+P*U)):(h.push(x-E*B,S-A*B),h.push(ye,Ae),p+=Bo(x,S,x-E*B,S-A*B,x-O*B,S-P*B,h,!1)+4,h.push(x-O*B,S-P*B),h.push(ye,Ae)):(h.push(ge,oe),h.push(ye,Ae)):(h.push(x-E*B,S-A*B),h.push(x+E*U,S+A*U),a.join===Vi.ROUND?j?p+=Bo(x,S,x+E*U,S+A*U,x+O*U,S+P*U,h,!0)+2:p+=Bo(x,S,x-E*B,S-A*B,x-O*B,S-P*B,h,!1)+2:a.join===Vi.MITER&&pe/m<=y&&(j?(h.push(ye,Ae),h.push(ye,Ae)):(h.push(ge,oe),h.push(ge,oe)),p+=2),h.push(x-O*B,S-P*B),h.push(x+O*U,S+P*U),p+=2)}_=n[(d-2)*2],b=n[(d-2)*2+1],x=n[(d-1)*2],S=n[(d-1)*2+1],E=-(b-S),A=_-x,F=Math.sqrt(E*E+A*A),E/=F,A/=F,E*=g,A*=g,h.push(x-E*B,S-A*B),h.push(x+E*U,S+A*U),u||(a.cap===Ra.ROUND?p+=Bo(x-E*(B-U)*.5,S-A*(B-U)*.5,x-E*B,S-A*B,x+E*U,S+A*U,h,!1)+2:a.cap===Ra.SQUARE&&(p+=z2(x,S,E,A,B,U,!1,h)));for(var Xe=e.indices,tt=Gl.epsilon*Gl.epsilon,z=v;zh*l}},t.arc=function(e,r,n,i,a,o,s,u,l){for(var c=s-o,f=Gl._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,b=h+o+d*_,x=Math.cos(b),S=-Math.sin(b);l.push((p*x+v*S)*a+n,(p*-S+v*x)*a+i)}},t}(),eD=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,b=0,x=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,_=x-m,b=S-y,x=m,S=y,c+=Math.sqrt(_*_+b*b);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=Gl._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}(),tD=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=Gl._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}(),rD=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,xd=(jo={},jo[fr.POLY]=mw,jo[fr.CIRC]=pf,jo[fr.ELIP]=pf,jo[fr.RECT]=QL,jo[fr.RREC]=JL,jo),G_=[],oc=[],X_=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,nD=function(t){vw(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 X_(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 X_(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=oc.pop(),o||(o=new pp,o.texArray=new vp),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=Kv(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 Cl,this.currentPath.closeStroke=!1,this.currentPath.points.push(r[n-2],r[n-1]))}else this.currentPath=new Cl,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),tD.curveTo(r,n,i,a,o),this},e.prototype.bezierCurveTo=function(r,n,i,a,o,s){return this._initCurve(),eD.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=V_.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 JN(r,n,i,a,o))},e.prototype.drawCircle=function(r,n,i){return this.drawShape(new ZN(r,n,i))},e.prototype.drawEllipse=function(r,n,i,a){return this.drawShape(new QN(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;d0||e&&a<=0)for(var f=i/2,o=f+f%2;o=6){z2(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,b=a,x=r+_,S=r-_,w=n+b;if(e[v++]=x,e[v++]=w,e[--g]=w,e[--g]=S,a){var T=n-b;e[m++]=S,e[m++]=T,e[--y]=T,e[--y]=x}}for(var E=1;Ef&&(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===Vi.ROUND?p+=Bo(x,S,x-E*B,S-A*B,x-O*B,S-P*B,h,!1)+4:p+=2,h.push(x-O*U,S-P*U),h.push(x+O*B,S+P*B));continue}var H=(-E+_)*(-A+S)-(-E+x)*(-A+b),ee=(-O+w)*(-P+S)-(-O+x)*(-P+T),ie=(J*ee-$*H)/V,ae=(M*H-Q*ee)/V,pe=(ie-x)*(ie-x)+(ae-S)*(ae-S),ge=x+(ie-x)*B,oe=S+(ae-S)*B,ye=x-(ie-x)*U,Ae=S-(ae-S)*U,xe=Math.min(J*J+Q*Q,$*$+M*M),Oe=j?B:U,ke=xe+Oe*Oe*m,we=pe<=ke;we?a.join===Vi.BEVEL||pe/m>y?(j?(h.push(ge,oe),h.push(x+E*U,S+A*U),h.push(ge,oe),h.push(x+O*U,S+P*U)):(h.push(x-E*B,S-A*B),h.push(ye,Ae),h.push(x-O*B,S-P*B),h.push(ye,Ae)),p+=2):a.join===Vi.ROUND?j?(h.push(ge,oe),h.push(x+E*U,S+A*U),p+=Bo(x,S,x+E*U,S+A*U,x+O*U,S+P*U,h,!0)+4,h.push(ge,oe),h.push(x+O*U,S+P*U)):(h.push(x-E*B,S-A*B),h.push(ye,Ae),p+=Bo(x,S,x-E*B,S-A*B,x-O*B,S-P*B,h,!1)+4,h.push(x-O*B,S-P*B),h.push(ye,Ae)):(h.push(ge,oe),h.push(ye,Ae)):(h.push(x-E*B,S-A*B),h.push(x+E*U,S+A*U),a.join===Vi.ROUND?j?p+=Bo(x,S,x+E*U,S+A*U,x+O*U,S+P*U,h,!0)+2:p+=Bo(x,S,x-E*B,S-A*B,x-O*B,S-P*B,h,!1)+2:a.join===Vi.MITER&&pe/m<=y&&(j?(h.push(ye,Ae),h.push(ye,Ae)):(h.push(ge,oe),h.push(ge,oe)),p+=2),h.push(x-O*B,S-P*B),h.push(x+O*U,S+P*U),p+=2)}_=n[(d-2)*2],b=n[(d-2)*2+1],x=n[(d-1)*2],S=n[(d-1)*2+1],E=-(b-S),A=_-x,F=Math.sqrt(E*E+A*A),E/=F,A/=F,E*=g,A*=g,h.push(x-E*B,S-A*B),h.push(x+E*U,S+A*U),u||(a.cap===Ra.ROUND?p+=Bo(x-E*(B-U)*.5,S-A*(B-U)*.5,x-E*B,S-A*B,x+E*U,S+A*U,h,!1)+2:a.cap===Ra.SQUARE&&(p+=W2(x,S,E,A,B,U,!1,h)));for(var Xe=e.indices,tt=Gl.epsilon*Gl.epsilon,z=v;zh*l}},t.arc=function(e,r,n,i,a,o,s,u,l){for(var c=s-o,f=Gl._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,b=h+o+d*_,x=Math.cos(b),S=-Math.sin(b);l.push((p*x+v*S)*a+n,(p*-S+v*x)*a+i)}},t}(),eD=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,b=0,x=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,_=x-m,b=S-y,x=m,S=y,c+=Math.sqrt(_*_+b*b);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=Gl._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}(),tD=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=Gl._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}(),rD=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,xd=(jo={},jo[fr.POLY]=gw,jo[fr.CIRC]=pf,jo[fr.ELIP]=pf,jo[fr.RECT]=QL,jo[fr.RREC]=JL,jo),G_=[],oc=[],X_=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,nD=function(t){mw(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 X_(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 X_(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=oc.pop(),o||(o=new pp,o.texArray=new vp),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=Kv(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 Cl,this.currentPath.closeStroke=!1,this.currentPath.points.push(r[n-2],r[n-1]))}else this.currentPath=new Cl,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),tD.curveTo(r,n,i,a,o),this},e.prototype.bezierCurveTo=function(r,n,i,a,o,s){return this._initCurve(),eD.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=V_.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 JN(r,n,i,a,o))},e.prototype.drawCircle=function(r,n,i){return this.drawShape(new ZN(r,n,i))},e.prototype.drawEllipse=function(r,n,i,a){return this.drawShape(new QN(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=0;n--){var i=r[n].trim();!/([\"\'])[^\'\"]+\1/.test(i)&&vve.indexOf(i)<0&&(i='"'+i+'"'),r[n]=i}return this.fontStyle+" "+this.fontVariant+" "+this.fontWeight+" "+e+" "+r.join(",")},t}();function W2(t){return typeof t=="number"?MS(t):(typeof t=="string"&&t.indexOf("0x")===0&&(t=t.replace("0x","#")),t)}function Py(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 x=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 b+a>p&&(d=!1,s+=t.addLine(o),o="",a=0),(o.length>0||!t.isBreakingSpace(m)||d)&&(o+=m,a+=b)}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,b=i.lineHeight*(p+1),x=_;p+1=0;n--){var i=r[n].trim();!/([\"\'])[^\'\"]+\1/.test(i)&&vve.indexOf(i)<0&&(i='"'+i+'"'),r[n]=i}return this.fontStyle+" "+this.fontVariant+" "+this.fontWeight+" "+e+" "+r.join(",")},t}();function Y2(t){return typeof t=="number"?FS(t):(typeof t=="string"&&t.indexOf("0x")===0&&(t=t.replace("0x","#")),t)}function Py(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 x=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 b+a>p&&(d=!1,s+=t.addLine(o),o="",a=0),(o.length>0||!t.isBreakingSpace(m)||d)&&(o+=m,a+=b)}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,b=i.lineHeight*(p+1),x=_;p+10},t}();function _ve(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&&Ar.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 sD(t,e){return e instanceof Je?(e._glTextures[t.CONTEXT_UID]||t.texture.bind(e),!0):!1}function Ave(t,e){if(!(e instanceof Xl))return!1;var r=e.geometry;e.finishPoly(),r.updateBatches();for(var n=r.batches,i=0;i0},t}();function _ve(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&&Ar.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 sD(t,e){return e instanceof Je?(e._glTextures[t.CONTEXT_UID]||t.texture.bind(e),!0):!1}function Ave(t,e){if(!(e instanceof Xl))return!1;var r=e.geometry;e.finishPoly(),r.updateBatches();for(var n=r.batches,i=0;i1?Ma.from(kve,Mve,n):Ma.from(Y2,Ive,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;$h.set(f.a*v/m,f.b*v/y,f.c*g/m,f.d*g/y,f.tx/m,f.ty/y),$h.invert(),d?$h.prepend(h.mapCoord):(p.uniforms.uMapCoord=h.mapCoord.toArray(!0),p.uniforms.uClampFrame=h.uClampFrame,p.uniforms.uClampOffset=h.uClampOffset),p.uniforms.uTransform=$h.toArray(!0),p.uniforms.uColor=DS(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=LS(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}(Yf);/*! +`,$h=new jt,hD=function(t){fD(e,t);function e(r){var n=t.call(this,r)||this;return r.runners.contextChange.add(n),n.quad=new qS,n.state=Mo.for2d(),n}return e.prototype.contextChange=function(){var r=this.renderer,n={globals:r.globalUniforms};this.simpleShader=Ma.from(H2,Rve,n),this.shader=r.context.webGLVersion>1?Ma.from(kve,Mve,n):Ma.from(H2,Ive,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;$h.set(f.a*v/m,f.b*v/y,f.c*g/m,f.d*g/y,f.tx/m,f.ty/y),$h.invert(),d?$h.prepend(h.mapCoord):(p.uniforms.uMapCoord=h.mapCoord.toArray(!0),p.uniforms.uClampFrame=h.uClampFrame,p.uniforms.uClampOffset=h.uClampOffset),p.uniforms.uTransform=$h.toArray(!0),p.uniforms.uColor=BS(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=DS(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}(Yf);/*! * @pixi/mesh - v6.5.10 * Compiled Thu, 06 Jul 2023 15:25:11 UTC * @@ -1021,7 +1021,7 @@ 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 q_=function(t,e){return q_=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])},q_(t,e)};function yw(t,e){q_(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var dD=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}(),Ry=new We,H2=new Cl,Wl=function(t){yw(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=_e.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;DS(this._tint,this._alpha,this.uniforms.uColor,r.alphaMode)}this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)},e}(Ma),Hf=function(t){yw(e,t);function e(r,n,i){var a=t.call(this)||this,o=new tr(r),s=new tr(n,!0),u=new tr(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}(gu);/*! +`,Yl=function(t){_w(e,t);function e(r,n){var i=this,a={uSampler:r,alpha:1,uTextureMatrix:jt.IDENTITY,uColor:new Float32Array([1,1,1,1])};return n=Object.assign({tint:16777215,alpha:1,pluginName:"batch"},n),n.uniforms&&Object.assign(a,n.uniforms),i=t.call(this,n.program||yu.from(Nve,Fve),a)||this,i._colorDirty=!1,i.uvMatrix=new rm(r),i.batchable=n.program===void 0,i.pluginName=n.pluginName,i.tint=n.tint,i.alpha=n.alpha,i}return Object.defineProperty(e.prototype,"texture",{get:function(){return this.uniforms.uSampler},set:function(r){this.uniforms.uSampler!==r&&(!this.uniforms.uSampler.baseTexture.alphaMode!=!r.baseTexture.alphaMode&&(this._colorDirty=!0),this.uniforms.uSampler=r,this.uvMatrix.texture=r)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"alpha",{get:function(){return this._alpha},set:function(r){r!==this._alpha&&(this._alpha=r,this._colorDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tint",{get:function(){return this._tint},set:function(r){r!==this._tint&&(this._tint=r,this._tintRGB=(r>>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;BS(this._tint,this._alpha,this.uniforms.uColor,r.alphaMode)}this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)},e}(Ma),Hf=function(t){_w(e,t);function e(r,n,i){var a=t.call(this)||this,o=new tr(r),s=new tr(n,!0),u=new tr(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}(gu);/*! * @pixi/text-bitmap - v6.5.10 * Compiled Thu, 06 Jul 2023 15:25:11 UTC * @@ -1064,7 +1064,7 @@ 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 K_=function(t,e){return K_=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])},K_(t,e)};function Lve(t,e){K_(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}(),pD=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}(),yp=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 yp.test(r)}return!1},t.parse=function(e){var r=new globalThis.DOMParser().parseFromString(e,"text/xml");return yp.parse(r)},t}(),Iy=[pD,yp,vD];function _w(t){for(var e=0;e=l-E*s){if(v===0)throw new Error("[BitmapFont] textureHeight "+l+"px is too small "+("(fontFamily: '"+f.fontFamily+"', fontSize: "+f.fontSize+"px, char: '"+S+"')"));--x,g=null,m=null,y=null,v=0,p=0,_=0;continue}if(_=Math.max(E+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+"')"));--x,v+=_*s,v=Math.ceil(v),p=0,_=0;continue}Bve(g,m,w,p,v,s,f);var O=bd(w.text);d.char.push({id:O,page:b.length-1,x:p/s,y:v/s,width:A,height:E,xoffset:0,yoffset:0,xadvance:Math.ceil(T-(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 x=0,P=c.length;x")>-1){var r=new globalThis.DOMParser().parseFromString(e,"text/xml");return yp.test(r)}return!1},t.parse=function(e){var r=new globalThis.DOMParser().parseFromString(e,"text/xml");return yp.parse(r)},t}(),Iy=[pD,yp,vD];function xw(t){for(var e=0;e=l-E*s){if(v===0)throw new Error("[BitmapFont] textureHeight "+l+"px is too small "+("(fontFamily: '"+f.fontFamily+"', fontSize: "+f.fontSize+"px, char: '"+S+"')"));--x,g=null,m=null,y=null,v=0,p=0,_=0;continue}if(_=Math.max(E+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+"')"));--x,v+=_*s,v=Math.ceil(v),p=0,_=0;continue}Bve(g,m,w,p,v,s,f);var O=bd(w.text);d.char.push({id:O,page:b.length-1,x:p/s,y:v/s,width:A,height:E,xoffset:0,yoffset:0,xadvance:Math.ceil(T-(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 x=0,P=c.length;x0&&o.x>h&&(++b,cs(s,1+y-b,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 F=[],w=0;w<=m;w++){var k=0;this._align==="right"?k=g-u[w]:this._align==="center"?k=(g-u[w])/2:this._align==="justify"&&(k=l[w]<0?0:(g-u[w])/l[w]),F.push(k)}var B=s.length,U={},z=[],J=this._activePagesMeshData;d.push.apply(d,J);for(var w=0;w6*ie)||M.vertices.length0&&o.x>h&&(++b,cs(s,1+y-b,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 F=[],w=0;w<=m;w++){var k=0;this._align==="right"?k=g-u[w]:this._align==="center"?k=(g-u[w])/2:this._align==="justify"&&(k=l[w]<0?0:(g-u[w])/l[w]),F.push(k)}var B=s.length,U={},z=[],J=this._activePagesMeshData;d.push.apply(d,J);for(var w=0;w6*ie)||M.vertices.length>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);ex.prototype.grayscale=ex.prototype.greyscale;/*! +`,ex=function(t){Zve(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,fw,Qve,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);ex.prototype.grayscale=ex.prototype.greyscale;/*! * @pixi/filter-displacement - v6.5.10 * Compiled Thu, 06 Jul 2023 15:25:11 UTC * @@ -1571,7 +1571,7 @@ void main() gl_FragColor = color; } -`,ume=function(t){sme(e,t);function e(r,n){r===void 0&&(r=.5),n===void 0&&(n=Math.random());var i=t.call(this,cw,lme,{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);/*! +`,ume=function(t){sme(e,t);function e(r,n){r===void 0&&(r=.5),n===void 0&&(n=Math.random());var i=t.call(this,fw,lme,{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 * @@ -1595,7 +1595,7 @@ void main() * * @pixi/app is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license - */var bD=function(){function t(){}return t.init=function(e){var r=this;Object.defineProperty(this,"resizeTo",{set:function(n){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=n,n&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get:function(){return this._resizeTo}}),this.queueResize=function(){r._resizeTo&&(r.cancelResize(),r._resizeId=requestAnimationFrame(function(){return r.resize()}))},this.cancelResize=function(){r._resizeId&&(cancelAnimationFrame(r._resizeId),r._resizeId=null)},this.resize=function(){if(r._resizeTo){r.cancelResize();var n,i;if(r._resizeTo===globalThis.window)n=globalThis.innerWidth,i=globalThis.innerHeight;else{var a=r._resizeTo,o=a.clientWidth,s=a.clientHeight;n=o,i=s}r.renderer.resize(n,i)}},this._resizeId=null,this._resizeTo=null,this.resizeTo=e.resizeTo||null},t.destroy=function(){globalThis.removeEventListener("resize",this.queueResize),this.cancelResize(),this.cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null},t.extension=dt.Application,t}(),xw=function(){function t(e){var r=this;this.stage=new dr,e=Object.assign({forceCanvas:!1},e),this.renderer=EL(e),t._plugins.forEach(function(n){n.init.call(r,e)})}return t.registerPlugin=function(e){dn("6.5.0","Application.registerPlugin() is deprecated, use extensions.add()"),ca.add({type:dt.Application,ref:e})},t.prototype.render=function(){this.renderer.render(this.stage)},Object.defineProperty(t.prototype,"view",{get:function(){return this.renderer.view},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"screen",{get:function(){return this.renderer.screen},enumerable:!1,configurable:!0}),t.prototype.destroy=function(e,r){var n=this,i=t._plugins.slice(0);i.reverse(),i.forEach(function(a){a.destroy.call(n)}),this.stage.destroy(r),this.stage=null,this.renderer.destroy(e),this.renderer=null},t._plugins=[],t}();ca.handleByList(dt.Application,xw._plugins);ca.add(bD);/*! + */var bD=function(){function t(){}return t.init=function(e){var r=this;Object.defineProperty(this,"resizeTo",{set:function(n){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=n,n&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get:function(){return this._resizeTo}}),this.queueResize=function(){r._resizeTo&&(r.cancelResize(),r._resizeId=requestAnimationFrame(function(){return r.resize()}))},this.cancelResize=function(){r._resizeId&&(cancelAnimationFrame(r._resizeId),r._resizeId=null)},this.resize=function(){if(r._resizeTo){r.cancelResize();var n,i;if(r._resizeTo===globalThis.window)n=globalThis.innerWidth,i=globalThis.innerHeight;else{var a=r._resizeTo,o=a.clientWidth,s=a.clientHeight;n=o,i=s}r.renderer.resize(n,i)}},this._resizeId=null,this._resizeTo=null,this.resizeTo=e.resizeTo||null},t.destroy=function(){globalThis.removeEventListener("resize",this.queueResize),this.cancelResize(),this.cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null},t.extension=dt.Application,t}(),bw=function(){function t(e){var r=this;this.stage=new dr,e=Object.assign({forceCanvas:!1},e),this.renderer=EL(e),t._plugins.forEach(function(n){n.init.call(r,e)})}return t.registerPlugin=function(e){dn("6.5.0","Application.registerPlugin() is deprecated, use extensions.add()"),ca.add({type:dt.Application,ref:e})},t.prototype.render=function(){this.renderer.render(this.stage)},Object.defineProperty(t.prototype,"view",{get:function(){return this.renderer.view},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"screen",{get:function(){return this.renderer.screen},enumerable:!1,configurable:!0}),t.prototype.destroy=function(e,r){var n=this,i=t._plugins.slice(0);i.reverse(),i.forEach(function(a){a.destroy.call(n)}),this.stage.destroy(r),this.stage=null,this.renderer.destroy(e),this.renderer=null},t._plugins=[],t}();ca.handleByList(dt.Application,bw._plugins);ca.add(bD);/*! * @pixi/mesh-extras - v6.5.10 * Compiled Thu, 06 Jul 2023 15:25:11 UTC * @@ -1639,7 +1639,7 @@ PERFORMANCE OF THIS SOFTWARE. * * pixi.js is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license - */ca.add(kL,LL,NL,ZL,lD,hw,hD,gD,VL,HL,qL,cD,tL,BL);var AD={AlphaFilter:yD,BlurFilter:Kve,BlurFilterPass:mf,ColorMatrixFilter:ex,DisplacementFilter:rme,FXAAFilter:ome,NoiseFilter:ume};const vme=Object.freeze(Object.defineProperty({__proto__:null,get ALPHA_MODES(){return On},AbstractBatchRenderer:AL,AbstractMultiResource:em,AbstractRenderer:wL,AccessibilityManager:kL,AnimatedSprite:pme,AppLoaderPlugin:BL,Application:xw,ArrayResource:US,Attribute:k_,get BLEND_MODES(){return be},get BUFFER_BITS(){return tf},get BUFFER_TYPE(){return bi},BaseImageResource:ra,BasePrepare:oD,BaseRenderTexture:WS,BaseTexture:Je,BatchDrawCall:pp,BatchGeometry:fw,BatchPluginFactory:PL,BatchRenderer:hw,BatchShaderGenerator:CL,BatchSystem:KS,BatchTextureArray:vp,BitmapFont:Sa,BitmapFontData:vf,BitmapFontLoader:gD,BitmapText:Vve,BlobResource:$L,Bounds:ff,BrowserAdapter:yN,Buffer:tr,BufferResource:Ms,get CLEAR_MODES(){return qn},get COLOR_MASK_BITS(){return l_},CanvasResource:$S,Circle:ZN,CompressedTextureLoader:VL,CompressedTextureResource:gp,Container:dr,ContextSystem:ZS,CountLimiter:aD,CubeResource:VS,DDSLoader:HL,DEG_TO_RAD:Ao,get DRAW_MODES(){return Ln},DisplayObject:zt,get ENV(){return ea},Ellipse:QN,get ExtensionType(){return dt},Extract:LL,get FORMATS(){return ve},FORMATS_TO_COMPONENTS:zL,FillStyle:pw,Filter:De,FilterState:aL,FilterSystem:qS,Framebuffer:dp,FramebufferSystem:QS,get GC_MODES(){return nf},GLFramebuffer:oL,GLProgram:xL,GLTexture:yd,GRAPHICS_CURVES:Gl,Geometry:gu,GeometrySystem:JS,Graphics:Xl,GraphicsData:X_,GraphicsGeometry:nD,IGLUniformData:Kde,INSTALLED:hf,get INTERNAL_FORMATS(){return Be},INTERNAL_FORMAT_TO_BYTES_PER_PIXEL:df,ImageBitmapResource:zS,ImageResource:tm,InteractionData:M_,InteractionEvent:ML,InteractionManager:NL,InteractionTrackingData:_d,KTXLoader:qL,get LINE_CAP(){return Ra},get LINE_JOIN(){return Vi},LineStyle:iD,Loader:_s,get LoaderResource(){return mt},get MASK_TYPES(){return qt},get MIPMAP_MODES(){return vn},get MSAA_QUALITY(){return Pt},MaskData:sL,MaskSystem:ew,Matrix:jt,Mesh:Wl,MeshBatchUvs:dD,MeshGeometry:Hf,MeshMaterial:Yl,NineSlicePlane:hme,ObjectRenderer:Yf,ObservablePoint:ro,PI_2:cf,get PRECISION(){return En},ParticleContainer:ave,ParticleRenderer:ZL,PlaneGeometry:SD,Point:We,Polygon:Cl,Prepare:lD,Program:yu,ProjectionSystem:nw,Quad:iL,QuadUv:HS,RAD_TO_DEG:KN,get RENDERER_TYPE(){return jl},Rectangle:Ye,RenderTexture:Co,RenderTexturePool:nL,RenderTextureSystem:iw,Renderer:uw,ResizePlugin:bD,Resource:ys,RopeGeometry:wD,RoundedRectangle:JN,Runner:Er,get SAMPLER_TYPES(){return rf},get SCALE_MODES(){return Pr},get SHAPES(){return fr},SVGResource:GS,ScissorSystem:tw,Shader:Ma,ShaderSystem:aw,SimpleMesh:TD,SimplePlane:ED,SimpleRope:fme,Sprite:Qn,SpriteMaskFilter:pL,Spritesheet:uD,SpritesheetLoader:cD,State:Mo,StateSystem:ow,StencilSystem:rw,System:hpe,get TARGETS(){return vo},get TEXT_GRADIENT(){return zl},get TYPES(){return Re},TYPES_TO_BYTES_PER_COMPONENT:B_,TYPES_TO_BYTES_PER_PIXEL:WL,TemporaryDisplayObject:jS,Text:gw,TextFormat:pD,TextMetrics:Ci,TextStyle:xs,Texture:Me,TextureGCSystem:sw,TextureLoader:jL,TextureMatrix:rm,TextureSystem:lw,TextureUvs:YS,Ticker:Ar,TickerPlugin:tL,TilingSprite:Ove,TilingSpriteRenderer:hD,TimeLimiter:Pve,Transform:Qv,get UPDATE_PRIORITY(){return ta},UniformGroup:mo,VERSION:vpe,VideoResource:XS,ViewableBuffer:mp,get WRAP_MODES(){return xi},XMLFormat:yp,XMLStringFormat:vD,accessibleTarget:IL,autoDetectFormat:_w,autoDetectRenderer:EL,autoDetectResource:Jv,checkMaxIfStatementsInShader:dL,createUBOElements:gL,defaultFilterVertex:cw,defaultVertex:TL,extensions:ca,filters:AD,generateProgram:bL,generateUniformBufferSync:_L,getTestContext:cL,getUBOData:yL,graphicsUtils:fve,groupD8:Rt,interactiveTarget:FL,isMobile:ei,parseDDS:XL,parseKTX:YL,resources:OL,settings:_e,systems:RL,uniformParsers:fs,utils:_de},Symbol.toStringTag,{value:"Module"}));let Gh;const mme=new Uint8Array(16);function gme(){if(!Gh&&(Gh=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Gh))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Gh(mme)}const Ur=[];for(let t=0;t<256;++t)Ur.push((t+256).toString(16).slice(1));function yme(t,e=0){return Ur[t[e+0]]+Ur[t[e+1]]+Ur[t[e+2]]+Ur[t[e+3]]+"-"+Ur[t[e+4]]+Ur[t[e+5]]+"-"+Ur[t[e+6]]+Ur[t[e+7]]+"-"+Ur[t[e+8]]+Ur[t[e+9]]+"-"+Ur[t[e+10]]+Ur[t[e+11]]+Ur[t[e+12]]+Ur[t[e+13]]+Ur[t[e+14]]+Ur[t[e+15]]}const _me=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Q2={randomUUID:_me};function Yu(t,e,r){if(Q2.randomUUID&&!e&&!t)return Q2.randomUUID();t=t||{};const n=t.random||(t.rng||gme)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(let i=0;i<16;++i)e[r+i]=n[i];return e}return yme(n)}/*! + */ca.add(kL,LL,NL,ZL,lD,dw,hD,gD,VL,HL,qL,cD,tL,BL);var AD={AlphaFilter:yD,BlurFilter:Kve,BlurFilterPass:mf,ColorMatrixFilter:ex,DisplacementFilter:rme,FXAAFilter:ome,NoiseFilter:ume};const vme=Object.freeze(Object.defineProperty({__proto__:null,get ALPHA_MODES(){return On},AbstractBatchRenderer:AL,AbstractMultiResource:em,AbstractRenderer:wL,AccessibilityManager:kL,AnimatedSprite:pme,AppLoaderPlugin:BL,Application:bw,ArrayResource:$S,Attribute:k_,get BLEND_MODES(){return be},get BUFFER_BITS(){return tf},get BUFFER_TYPE(){return bi},BaseImageResource:ra,BasePrepare:oD,BaseRenderTexture:YS,BaseTexture:Je,BatchDrawCall:pp,BatchGeometry:hw,BatchPluginFactory:PL,BatchRenderer:dw,BatchShaderGenerator:CL,BatchSystem:ZS,BatchTextureArray:vp,BitmapFont:Sa,BitmapFontData:vf,BitmapFontLoader:gD,BitmapText:Vve,BlobResource:$L,Bounds:ff,BrowserAdapter:yN,Buffer:tr,BufferResource:Ms,get CLEAR_MODES(){return qn},get COLOR_MASK_BITS(){return l_},CanvasResource:VS,Circle:ZN,CompressedTextureLoader:VL,CompressedTextureResource:gp,Container:dr,ContextSystem:QS,CountLimiter:aD,CubeResource:GS,DDSLoader:HL,DEG_TO_RAD:Ao,get DRAW_MODES(){return Ln},DisplayObject:zt,get ENV(){return ea},Ellipse:QN,get ExtensionType(){return dt},Extract:LL,get FORMATS(){return ve},FORMATS_TO_COMPONENTS:zL,FillStyle:vw,Filter:De,FilterState:aL,FilterSystem:KS,Framebuffer:dp,FramebufferSystem:JS,get GC_MODES(){return nf},GLFramebuffer:oL,GLProgram:xL,GLTexture:yd,GRAPHICS_CURVES:Gl,Geometry:gu,GeometrySystem:ew,Graphics:Xl,GraphicsData:X_,GraphicsGeometry:nD,IGLUniformData:Kde,INSTALLED:hf,get INTERNAL_FORMATS(){return Be},INTERNAL_FORMAT_TO_BYTES_PER_PIXEL:df,ImageBitmapResource:WS,ImageResource:tm,InteractionData:M_,InteractionEvent:ML,InteractionManager:NL,InteractionTrackingData:_d,KTXLoader:qL,get LINE_CAP(){return Ra},get LINE_JOIN(){return Vi},LineStyle:iD,Loader:_s,get LoaderResource(){return mt},get MASK_TYPES(){return qt},get MIPMAP_MODES(){return vn},get MSAA_QUALITY(){return Pt},MaskData:sL,MaskSystem:tw,Matrix:jt,Mesh:Wl,MeshBatchUvs:dD,MeshGeometry:Hf,MeshMaterial:Yl,NineSlicePlane:hme,ObjectRenderer:Yf,ObservablePoint:ro,PI_2:cf,get PRECISION(){return En},ParticleContainer:ave,ParticleRenderer:ZL,PlaneGeometry:SD,Point:We,Polygon:Cl,Prepare:lD,Program:yu,ProjectionSystem:iw,Quad:iL,QuadUv:qS,RAD_TO_DEG:KN,get RENDERER_TYPE(){return jl},Rectangle:Ye,RenderTexture:Co,RenderTexturePool:nL,RenderTextureSystem:aw,Renderer:cw,ResizePlugin:bD,Resource:ys,RopeGeometry:wD,RoundedRectangle:JN,Runner:Er,get SAMPLER_TYPES(){return rf},get SCALE_MODES(){return Pr},get SHAPES(){return fr},SVGResource:XS,ScissorSystem:rw,Shader:Ma,ShaderSystem:ow,SimpleMesh:TD,SimplePlane:ED,SimpleRope:fme,Sprite:Qn,SpriteMaskFilter:pL,Spritesheet:uD,SpritesheetLoader:cD,State:Mo,StateSystem:sw,StencilSystem:nw,System:hpe,get TARGETS(){return vo},get TEXT_GRADIENT(){return zl},get TYPES(){return Re},TYPES_TO_BYTES_PER_COMPONENT:B_,TYPES_TO_BYTES_PER_PIXEL:WL,TemporaryDisplayObject:US,Text:yw,TextFormat:pD,TextMetrics:Ci,TextStyle:xs,Texture:Me,TextureGCSystem:lw,TextureLoader:jL,TextureMatrix:rm,TextureSystem:uw,TextureUvs:HS,Ticker:Ar,TickerPlugin:tL,TilingSprite:Ove,TilingSpriteRenderer:hD,TimeLimiter:Pve,Transform:Qv,get UPDATE_PRIORITY(){return ta},UniformGroup:mo,VERSION:vpe,VideoResource:zS,ViewableBuffer:mp,get WRAP_MODES(){return xi},XMLFormat:yp,XMLStringFormat:vD,accessibleTarget:IL,autoDetectFormat:xw,autoDetectRenderer:EL,autoDetectResource:Jv,checkMaxIfStatementsInShader:dL,createUBOElements:gL,defaultFilterVertex:fw,defaultVertex:TL,extensions:ca,filters:AD,generateProgram:bL,generateUniformBufferSync:_L,getTestContext:cL,getUBOData:yL,graphicsUtils:fve,groupD8:Rt,interactiveTarget:FL,isMobile:ei,parseDDS:XL,parseKTX:YL,resources:OL,settings:_e,systems:RL,uniformParsers:fs,utils:_de},Symbol.toStringTag,{value:"Module"}));let Gh;const mme=new Uint8Array(16);function gme(){if(!Gh&&(Gh=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Gh))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Gh(mme)}const Ur=[];for(let t=0;t<256;++t)Ur.push((t+256).toString(16).slice(1));function yme(t,e=0){return Ur[t[e+0]]+Ur[t[e+1]]+Ur[t[e+2]]+Ur[t[e+3]]+"-"+Ur[t[e+4]]+Ur[t[e+5]]+"-"+Ur[t[e+6]]+Ur[t[e+7]]+"-"+Ur[t[e+8]]+Ur[t[e+9]]+"-"+Ur[t[e+10]]+Ur[t[e+11]]+Ur[t[e+12]]+Ur[t[e+13]]+Ur[t[e+14]]+Ur[t[e+15]]}const _me=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),J2={randomUUID:_me};function Yu(t,e,r){if(J2.randomUUID&&!e&&!t)return J2.randomUUID();t=t||{};const n=t.random||(t.rng||gme)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(let i=0;i<16;++i)e[r+i]=n[i];return e}return yme(n)}/*! * @pixi/filter-old-film - v4.2.0 * Compiled Fri, 05 Aug 2022 19:53:35 UTC * @@ -4076,7 +4076,7 @@ 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 xu(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");$x(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function J2(t){switch(t.toLowerCase()){case"nearest":return un.Nearest;case"linear":return un.Linear;case"mipmap":return un.MipMap;case"mipmapnearestnearest":return un.MipMapNearestNearest;case"mipmaplinearnearest":return un.MipMapLinearNearest;case"mipmapnearestlinear":return un.MipMapNearestLinear;case"mipmaplinearlinear":return un.MipMapLinearLinear;default:throw new Error("Unknown texture filter "+t)}}var un;(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"})(un||(un={}));var no;(function(t){t[t.MirroredRepeat=33648]="MirroredRepeat",t[t.ClampToEdge=33071]="ClampToEdge",t[t.Repeat=10497]="Repeat"})(no||(no={}));var Vx=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}(),Eye=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}(),Tye=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}(),eO=function(){function t(){this.minFilter=un.Nearest,this.magFilter=un.Nearest,this.uWrap=no.ClampToEdge,this.vWrap=no.ClampToEdge}return t.prototype.setFilters=function(){var e=this.baseTexture,r=this.minFilter;r==un.Linear?e.scaleMode=Pr.LINEAR:this.minFilter==un.Nearest?e.scaleMode=Pr.NEAREST:(e.mipmap=vn.POW2,r==un.MipMapNearestNearest?e.scaleMode=Pr.NEAREST:e.scaleMode=Pr.LINEAR)},t}(),tO=function(t){xu(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Vx),Cye=function(t){return function(e){return t[0]=e,t[0]}}(new Float32Array(1)),Pye=Math.fround||Cye,RD=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}(),ID=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}(),Oye=function(){function t(){}return t.prototype.apply=function(e,r,n){return e+(r-e)*this.applyInternal(n)},t}(),Rye=function(t){xu(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}(Oye),kD=function(t){xu(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}(Rye),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&&b<=p||b>=p&&b<=f)&&(b>=r&&b<=i||b>=i&&b<=r)){var x=(c*y-l*g)/_;if((x>=h&&x<=v||x>=v&&x<=h)&&(x>=n&&x<=a||x>=a&&x<=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}(),Iye={yDown:!0,FAIL_ON_NON_EXISTING_SKIN:!1,GLOBAL_AUTO_UPDATE:!0,GLOBAL_DELAY_LIMIT:0},Ga=[0,0,0],kye=function(t){xu(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.region=null,r.attachment=null,r}return e}(Qn),Mye=function(t){xu(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}(TD),qf=function(t){xu(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?rO(u.images):u.image?rO({default:u.image}):u.imageLoader?u.imageLoader(this,m,g,v):Dye(this,m,g,v);function _(b){new Tye(b,y,function(x){x&&e.parseData(r,o,x,s),n()})}u.atlasRawData?_(u.atlasRawData):this.add(r.name+"_atlas",h,p,function(b){b.error?n():_(b.data)})}}},t}();function Dye(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=On.PMA),a(c.texture.baseTexture))})}}function rO(t){return function(e,r){var n=t[e]||t.default;n&&n.baseTexture?r(n.baseTexture):r(n)}}/*! ***************************************************************************** +***************************************************************************** */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 xu(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");$x(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function eO(t){switch(t.toLowerCase()){case"nearest":return un.Nearest;case"linear":return un.Linear;case"mipmap":return un.MipMap;case"mipmapnearestnearest":return un.MipMapNearestNearest;case"mipmaplinearnearest":return un.MipMapLinearNearest;case"mipmapnearestlinear":return un.MipMapNearestLinear;case"mipmaplinearlinear":return un.MipMapLinearLinear;default:throw new Error("Unknown texture filter "+t)}}var un;(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"})(un||(un={}));var no;(function(t){t[t.MirroredRepeat=33648]="MirroredRepeat",t[t.ClampToEdge=33071]="ClampToEdge",t[t.Repeat=10497]="Repeat"})(no||(no={}));var Vx=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}(),Eye=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}(),Tye=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}(),tO=function(){function t(){this.minFilter=un.Nearest,this.magFilter=un.Nearest,this.uWrap=no.ClampToEdge,this.vWrap=no.ClampToEdge}return t.prototype.setFilters=function(){var e=this.baseTexture,r=this.minFilter;r==un.Linear?e.scaleMode=Pr.LINEAR:this.minFilter==un.Nearest?e.scaleMode=Pr.NEAREST:(e.mipmap=vn.POW2,r==un.MipMapNearestNearest?e.scaleMode=Pr.NEAREST:e.scaleMode=Pr.LINEAR)},t}(),rO=function(t){xu(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Vx),Cye=function(t){return function(e){return t[0]=e,t[0]}}(new Float32Array(1)),Pye=Math.fround||Cye,RD=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}(),ID=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}(),Oye=function(){function t(){}return t.prototype.apply=function(e,r,n){return e+(r-e)*this.applyInternal(n)},t}(),Rye=function(t){xu(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}(Oye),kD=function(t){xu(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}(Rye),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&&b<=p||b>=p&&b<=f)&&(b>=r&&b<=i||b>=i&&b<=r)){var x=(c*y-l*g)/_;if((x>=h&&x<=v||x>=v&&x<=h)&&(x>=n&&x<=a||x>=a&&x<=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}(),Iye={yDown:!0,FAIL_ON_NON_EXISTING_SKIN:!1,GLOBAL_AUTO_UPDATE:!0,GLOBAL_DELAY_LIMIT:0},Ga=[0,0,0],kye=function(t){xu(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.region=null,r.attachment=null,r}return e}(Qn),Mye=function(t){xu(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}(TD),qf=function(t){xu(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?nO(u.images):u.image?nO({default:u.image}):u.imageLoader?u.imageLoader(this,m,g,v):Dye(this,m,g,v);function _(b){new Tye(b,y,function(x){x&&e.parseData(r,o,x,s),n()})}u.atlasRawData?_(u.atlasRawData):this.add(r.name+"_atlas",h,p,function(b){b.error?n():_(b.data)})}}},t}();function Dye(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=On.PMA),a(c.texture.baseTexture))})}}function nO(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 @@ -4089,7 +4089,7 @@ 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 Gx=function(t,e){return Gx=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])},Gx(t,e)};function Ft(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Gx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Sw=function(){function t(e){if(e==null)throw new Error("name cannot be null.");this.name=e}return t}(),Fs=function(t){Ft(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,b=o;b0&&(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}(),Rr;(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"})(Rr||(Rr={}));var fa=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){Ft(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(Rr.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=Zt.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}(fa),bs=function(t){Ft(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(Rr.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=Zt.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}(fa),Tw=function(t){Ft(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getPropertyId=function(){return(Rr.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=Zt.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}(bs),Aw=function(t){Ft(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getPropertyId=function(){return(Rr.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=Zt.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}(bs),_f=function(t){Ft(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(Rr.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=Zt.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],b=this.getCurvePercent(y/e.ENTRIES-1,1-(i-_)/(c[y+e.PREV_TIME]-_));d+=(c[y+e.R]-d)*b,p+=(c[y+e.G]-p)*b,v+=(c[y+e.B]-v)*b,g+=(c[y+e.A]-g)*b}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}(fa),xf=function(t){Ft(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(Rr.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],b=c[S+e.PREV_G2],x=c[S+e.PREV_B2]}else{var w=Zt.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],b=c[w+e.PREV_G2],x=c[w+e.PREV_B2];var T=c[w],E=this.getCurvePercent(w/e.ENTRIES-1,1-(i-T)/(c[w+e.PREV_TIME]-T));v+=(c[w+e.R]-v)*E,g+=(c[w+e.G]-g)*E,m+=(c[w+e.B]-m)*E,y+=(c[w+e.A]-y)*E,_+=(c[w+e.R2]-_)*E,b+=(c[w+e.G2]-b)*E,x+=(c[w+e.B2]-x)*E}if(o==1)l.color.set(v,g,m,y),l.darkColor.set(_,b,x,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,(b-h.g)*o,(x-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}(fa),ns=function(){function t(e){this.frames=q.newFloatArray(e),this.attachmentNames=new Array(e)}return t.prototype.getPropertyId=function(){return(Rr.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=Zt.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}(),nO=null,Cw=function(t){Ft(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r),n.frameVertices=new Array(r),nO==null&&(nO=q.newFloatArray(64)),n}return e.prototype.getPropertyId=function(){return(Rr.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 b=h[p.length-1];if(o==1)if(s==R.add){var v=c;if(v.bones==null)for(var m=v.vertices,x=0;xn)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}(),Pl=function(){function t(e){this.frames=q.newFloatArray(e),this.drawOrders=new Array(e)}return t.prototype.getPropertyId=function(){return Rr.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=Zt.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=Zt.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}(fa),Sf=function(t){Ft(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(Rr.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=Zt.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}(fa),Hl=function(t){Ft(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(Rr.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=Zt.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}(fa),Pw=function(t){Ft(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getPropertyId=function(){return(Rr.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=Zt.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}(Hl),wf=function(t){Ft(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(Rr.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=Zt.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}(fa),LD=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 BD(this),this.propertyIDs=new RD,this.animationsChanged=!1,this.trackEntryPool=new im(function(){return new DD}),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=Zt.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=Zt.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 b=0,x=0;u?(b=0,x=_):(b=o[s],x=o[s+1]);var S=_>0,w=b>=0;N.signum(x)!=N.signum(_)&&Math.abs(x)<=90&&(Math.abs(b)>180&&(b+=360*N.signum(b)),w=S),y=_+b-b%360,w!=S&&(y+=360*N.signum(b)),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 Zt("",[],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}(),DD=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}(),BD=function(){function t(e){this.objects=[],this.drainDisabled=!1,this.animState=e}return t.prototype.start=function(e){this.objects.push(an.start),this.objects.push(e),this.animState.animationsChanged=!0},t.prototype.interrupt=function(e){this.objects.push(an.interrupt),this.objects.push(e)},t.prototype.end=function(e){this.objects.push(an.end),this.objects.push(e),this.animState.animationsChanged=!0},t.prototype.dispose=function(e){this.objects.push(an.dispose),this.objects.push(e)},t.prototype.complete=function(e){this.objects.push(an.complete),this.objects.push(e)},t.prototype.event=function(e,r){this.objects.push(an.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 T=n+o-w,E=n+s-w+90,y=N.cosDeg(T)*i,_=N.cosDeg(E)*a,b=N.sinDeg(T)*i,x=N.sinDeg(E)*a;l.a=p*y-v*b,l.c=p*_-v*x,l.b=g*y+m*b,l.d=g*_+m*x;break}case Fe.NoScale:case Fe.NoScaleOrReflection:{var A=N.cosDeg(n),O=N.sinDeg(n),P=(p*A+v*O)/c,F=(g*A+m*O)/f,S=Math.sqrt(P*P+F*F);S>1e-5&&(S=1/S),P*=S,F*=S,S=Math.sqrt(P*P+F*F),this.data.transformMode==Fe.NoScale&&p*m-v*g<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY>0)&&(S=-S);var k=Math.PI/2+Math.atan2(F,P),B=Math.cos(k)*S,U=Math.sin(k)*S,y=N.cosDeg(o)*i,_=N.cosDeg(90+s)*a,b=N.sinDeg(o)*i,x=N.sinDeg(90+s)*a;l.a=P*y+B*b,l.c=P*_+B*x,l.b=F*y+U*b,l.d=F*_+U*x;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}(),Rw=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=Fe.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}(),sm=function(){function t(e,r,n){this.name=e,this.order=r,this.skinRequired=n}return t}(),Iw=function(){function t(e,r){if(r==null)throw new Error("data cannot be null.");this.time=e,this.data=r}return t}(),kw=function(){function t(e){this.name=e}return t}(),UD=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 Fe.NoScale:case Fe.NoScaleOrReflection:p=r-e.worldX,v=n-e.worldY}var T=e.data.length*S,E=Math.sqrt(p*p+v*v);if(i&&ET&&T>1e-4){var g=(E/T-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,b=0,x=0,S=0,w=v.a,T=v.c,E=v.b,A=v.d,O=Math.abs(f-d)<=1e-4;O?(b=r.ay,x=w*_+T*b+v.tx,S=E*_+A*b+v.ty):(b=0,x=w*_+v.tx,S=E*_+v.ty);var P=e.parent.matrix;w=P.a,T=P.c,E=P.b,A=P.d;var F=1/(w*A-T*E),k=x-P.tx,B=S-P.ty,U=(k*A-B*T)*F-l,z=(B*w-k*E)*F-c,J=Math.sqrt(U*U+z*z),Q=r.data.length*p,$,M;if(J<1e-4){this.apply1(e,n,i,!1,o,!1,u),r.updateWorldTransformWith(_,b,0,r.ascaleX,r.ascaleY,r.ashearX,r.ashearY);return}k=n-P.tx,B=i-P.ty;var G=(k*A-B*T)*F-l,V=(B*w-k*E)*F-c,j=G*G+V*V;if(s!=0){s*=f*(p+1)/2;var H=Math.sqrt(j),ee=H-J-Q*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,j=G*G+V*V}}e:if(O){Q*=f;var ae=(j-J*J-Q*Q)/(2*J*Q);ae<-1?ae=-1:ae>1&&(ae=1,o&&(h*=(Math.sqrt(j)/(J+Q)-1)*u+1)),M=Math.acos(ae)*a,w=J+Q*ae,T=Q*Math.sin(M),$=Math.atan2(V*w-G*T,G*w+V*T)}else{w=f*Q,T=d*Q;var pe=w*w,ge=T*T,oe=Math.atan2(V,G);E=ge*J*J+pe*j-pe*ge;var ye=-2*ge*J,Ae=ge-pe;if(A=ye*ye-4*Ae*E,A>=0){var xe=Math.sqrt(A);ye<0&&(xe=-xe),xe=-(ye+xe)/2;var Oe=xe/Ae,ke=E/xe,we=Math.abs(Oe)=-1&&E<=1&&(E=Math.acos(E),k=w*Math.cos(E)+J,B=T*Math.sin(E),A=k*k+B*B,Aor&&(Yt=E,or=A,yt=k,Nr=B)),j<=(wt+or)/2?($=oe-Math.atan2(Ut*a,tt),M=Xe*a):($=oe-Math.atan2(Nr*a,yt),M=Yt*a)}var sr=Math.atan2(b,_)*y,gr=e.arotation;$=($-sr)*N.radDeg+g-gr,$>180?$-=360:$<-180&&($+=360),e.updateWorldTransformWith(l,c,gr+$*u,h,e.ascaleY,0,0),gr=r.arotation,M=((M+sr)*N.radDeg-r.ashearX)*y+m-gr,M>180?M-=360:M<-180&&(M+=360),r.updateWorldTransformWith(_,b,gr+M*u,r.ascaleX,r.ascaleY,r.ashearX,r.ashearY)},t}(),Mw=function(t){Ft(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}(sm),Fw=function(t){Ft(e,t);function e(r){var n=t.call(this,r,0,!1)||this;return n.bones=new Array,n}return e}(sm),cr;(function(t){t[t.Length=0]="Length",t[t.Fixed=1]="Fixed",t[t.Percent=2]="Percent"})(cr||(cr={}));var $D=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==cr.Length,l=o.rotateMode,c=l==Xt.Tangent,f=l==Xt.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 b=p[y],x=b.data.length;if(x0?N.degRad:-N.degRad}for(var y=0,k=3;yN.PI?j-=N.PI2:j<-N.PI&&(j+=N.PI2),j*=r,H=Math.cos(j),ee=Math.sin(j),B.a=H*$-ee*G,B.c=H*M-ee*V,B.b=ee*$+H*G,B.d=ee*M+H*V}b.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(x-g,c,0,l,y);continue}for(;;_++){var S=v[_];if(!(x>S)){if(_==0)x/=S;else{var w=v[_-1];x=(x-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(x,c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],l,y,n||m>0&&b==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 T=q.setArraySize(this.curves,d),E=0,A=c[0],O=c[1],P=0,F=0,k=0,B=0,U=0,z=0,J=0,Q=0,$=0,M=0,G=0,V=0,j=0,H=0,m=0,ee=2;mE){this.addAfterPosition(x-E,c,h-4,l,y);continue}for(;;_++){var ge=T[_];if(!(x>ge)){if(_==0)x/=ge;else{var w=T[_-1];x=(x-w)/(ge-w)}break}}if(_!=p){p=_;var oe=_*6;for(A=c[oe],O=c[oe+1],P=c[oe+2],F=c[oe+3],k=c[oe+4],B=c[oe+5],U=c[oe+6],z=c[oe+7],J=(A-P*2+k)*.03,Q=(O-F*2+B)*.03,$=((P-k)*3-A+U)*.006,M=((F-B)*3-O+z)*.006,G=J*2+$,V=Q*2+M,j=(P-A)*.3+J+$*.16666667,H=(F-O)*.3+Q+M*.16666667,ae=Math.sqrt(j*j+H*H),ie[0]=ae,oe=1;oe<8;oe++)j+=G,H+=V,G+=$,V+=M,ae+=Math.sqrt(j*j+H*H),ie[oe]=ae;j+=G,H+=V,ae+=Math.sqrt(j*j+H*H),ie[8]=ae,j+=G+$,H+=V+M,ae+=Math.sqrt(j*j+H*H),ie[9]=ae,pe=0}for(x*=ae;;pe++){var ye=ie[pe];if(!(x>ye)){if(pe==0)x/=ye;else{var w=ie[pe-1];x=pe+(x-w)/(ye-w)}break}}this.addCurvePosition(x*.1,A,O,P,F,k,B,U,z,l,y,n||m>0&&b==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,b=v*_,x=_*e,S=r*m+i*b+o*x+u*p,w=n*m+a*b+s*x+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}(),VD=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?T-=N.PI2:T<-N.PI&&(T+=N.PI2),T*=e;var E=Math.cos(T),A=Math.sin(T);_.a=E*b-A*S,_.c=E*x-A*w,_.b=A*b+E*S,_.d=A*x+E*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),F=Math.sqrt(s*s+l*l);P>1e-5&&(P=(P+(F-P+this.data.offsetScaleX)*n)/P),_.a*=P,_.b*=P,P=Math.sqrt(_.c*_.c+_.d*_.d),F=Math.sqrt(u*u+c*c),P>1e-5&&(P=(P+(F-P+this.data.offsetScaleY)*n)/P),_.c*=P,_.d*=P,y=!0}if(i>0){var x=_.c,w=_.d,k=Math.atan2(w,x),T=Math.atan2(c,u)-Math.atan2(l,s)-(k-Math.atan2(_.b,_.a));T>N.PI?T-=N.PI2:T<-N.PI&&(T+=N.PI2),T=k+(T+d)*i;var P=Math.sqrt(x*x+w*w);_.c=Math.cos(T)*P,_.d=Math.sin(T)*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?T-=N.PI2:T<-N.PI&&(T+=N.PI2),T*=e;var E=Math.cos(T),A=Math.sin(T);_.a=E*b-A*S,_.c=E*x-A*w,_.b=A*b+E*S,_.d=A*x+E*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 T=Math.atan2(c,u)-Math.atan2(l,s);T>N.PI?T-=N.PI2:T<-N.PI&&(T+=N.PI2);var x=_.c,w=_.d;T=Math.atan2(w,x)+(T-N.PI/2+d)*i;var P=Math.sqrt(x*x+w*w);_.c=Math.cos(T)*P,_.d=Math.sin(T)*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}(),GD=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}(),Dw=function(t){Ft(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}(sm),zx=function(){function t(e,r,n){this.slotIndex=e,this.name=r,this.attachment=n}return t}(),Sp=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 Pl(Q),$=n.slots.length,l=0;l=0;h--)G[h]=-1;for(var V=q.newArray($-M,0),j=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[Q-1])}var ee=e.readInt(!0);if(ee>0){for(var g=new om(ee),l=0;l=0;p--)ge[p]==-1&&(ge[p]=ye[--xe])}h.setFrame(d++,this.getValue(pe,"time",0),ge)}a.push(h),o=Math.max(o,h.frames[h.getFrameCount()-1])}if(e.events){for(var h=new om(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==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,b=o;b0&&(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}(),Rr;(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"})(Rr||(Rr={}));var fa=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){Ft(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(Rr.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=Zt.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}(fa),bs=function(t){Ft(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(Rr.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=Zt.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}(fa),Aw=function(t){Ft(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getPropertyId=function(){return(Rr.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=Zt.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}(bs),Cw=function(t){Ft(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getPropertyId=function(){return(Rr.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=Zt.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}(bs),_f=function(t){Ft(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(Rr.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=Zt.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],b=this.getCurvePercent(y/e.ENTRIES-1,1-(i-_)/(c[y+e.PREV_TIME]-_));d+=(c[y+e.R]-d)*b,p+=(c[y+e.G]-p)*b,v+=(c[y+e.B]-v)*b,g+=(c[y+e.A]-g)*b}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}(fa),xf=function(t){Ft(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(Rr.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],b=c[S+e.PREV_G2],x=c[S+e.PREV_B2]}else{var w=Zt.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],b=c[w+e.PREV_G2],x=c[w+e.PREV_B2];var T=c[w],E=this.getCurvePercent(w/e.ENTRIES-1,1-(i-T)/(c[w+e.PREV_TIME]-T));v+=(c[w+e.R]-v)*E,g+=(c[w+e.G]-g)*E,m+=(c[w+e.B]-m)*E,y+=(c[w+e.A]-y)*E,_+=(c[w+e.R2]-_)*E,b+=(c[w+e.G2]-b)*E,x+=(c[w+e.B2]-x)*E}if(o==1)l.color.set(v,g,m,y),l.darkColor.set(_,b,x,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,(b-h.g)*o,(x-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}(fa),ns=function(){function t(e){this.frames=q.newFloatArray(e),this.attachmentNames=new Array(e)}return t.prototype.getPropertyId=function(){return(Rr.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=Zt.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}(),iO=null,Pw=function(t){Ft(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r),n.frameVertices=new Array(r),iO==null&&(iO=q.newFloatArray(64)),n}return e.prototype.getPropertyId=function(){return(Rr.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 b=h[p.length-1];if(o==1)if(s==R.add){var v=c;if(v.bones==null)for(var m=v.vertices,x=0;xn)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}(),Pl=function(){function t(e){this.frames=q.newFloatArray(e),this.drawOrders=new Array(e)}return t.prototype.getPropertyId=function(){return Rr.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=Zt.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=Zt.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}(fa),Sf=function(t){Ft(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(Rr.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=Zt.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}(fa),Hl=function(t){Ft(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(Rr.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=Zt.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}(fa),Ow=function(t){Ft(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getPropertyId=function(){return(Rr.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=Zt.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}(Hl),wf=function(t){Ft(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(Rr.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=Zt.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}(fa),LD=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 BD(this),this.propertyIDs=new RD,this.animationsChanged=!1,this.trackEntryPool=new im(function(){return new DD}),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=Zt.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=Zt.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 b=0,x=0;u?(b=0,x=_):(b=o[s],x=o[s+1]);var S=_>0,w=b>=0;N.signum(x)!=N.signum(_)&&Math.abs(x)<=90&&(Math.abs(b)>180&&(b+=360*N.signum(b)),w=S),y=_+b-b%360,w!=S&&(y+=360*N.signum(b)),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 Zt("",[],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}(),DD=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}(),BD=function(){function t(e){this.objects=[],this.drainDisabled=!1,this.animState=e}return t.prototype.start=function(e){this.objects.push(an.start),this.objects.push(e),this.animState.animationsChanged=!0},t.prototype.interrupt=function(e){this.objects.push(an.interrupt),this.objects.push(e)},t.prototype.end=function(e){this.objects.push(an.end),this.objects.push(e),this.animState.animationsChanged=!0},t.prototype.dispose=function(e){this.objects.push(an.dispose),this.objects.push(e)},t.prototype.complete=function(e){this.objects.push(an.complete),this.objects.push(e)},t.prototype.event=function(e,r){this.objects.push(an.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 T=n+o-w,E=n+s-w+90,y=N.cosDeg(T)*i,_=N.cosDeg(E)*a,b=N.sinDeg(T)*i,x=N.sinDeg(E)*a;l.a=p*y-v*b,l.c=p*_-v*x,l.b=g*y+m*b,l.d=g*_+m*x;break}case Fe.NoScale:case Fe.NoScaleOrReflection:{var A=N.cosDeg(n),O=N.sinDeg(n),P=(p*A+v*O)/c,F=(g*A+m*O)/f,S=Math.sqrt(P*P+F*F);S>1e-5&&(S=1/S),P*=S,F*=S,S=Math.sqrt(P*P+F*F),this.data.transformMode==Fe.NoScale&&p*m-v*g<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY>0)&&(S=-S);var k=Math.PI/2+Math.atan2(F,P),B=Math.cos(k)*S,U=Math.sin(k)*S,y=N.cosDeg(o)*i,_=N.cosDeg(90+s)*a,b=N.sinDeg(o)*i,x=N.sinDeg(90+s)*a;l.a=P*y+B*b,l.c=P*_+B*x,l.b=F*y+U*b,l.d=F*_+U*x;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}(),Iw=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=Fe.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}(),sm=function(){function t(e,r,n){this.name=e,this.order=r,this.skinRequired=n}return t}(),kw=function(){function t(e,r){if(r==null)throw new Error("data cannot be null.");this.time=e,this.data=r}return t}(),Mw=function(){function t(e){this.name=e}return t}(),UD=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 Fe.NoScale:case Fe.NoScaleOrReflection:p=r-e.worldX,v=n-e.worldY}var T=e.data.length*S,E=Math.sqrt(p*p+v*v);if(i&&ET&&T>1e-4){var g=(E/T-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,b=0,x=0,S=0,w=v.a,T=v.c,E=v.b,A=v.d,O=Math.abs(f-d)<=1e-4;O?(b=r.ay,x=w*_+T*b+v.tx,S=E*_+A*b+v.ty):(b=0,x=w*_+v.tx,S=E*_+v.ty);var P=e.parent.matrix;w=P.a,T=P.c,E=P.b,A=P.d;var F=1/(w*A-T*E),k=x-P.tx,B=S-P.ty,U=(k*A-B*T)*F-l,z=(B*w-k*E)*F-c,J=Math.sqrt(U*U+z*z),Q=r.data.length*p,$,M;if(J<1e-4){this.apply1(e,n,i,!1,o,!1,u),r.updateWorldTransformWith(_,b,0,r.ascaleX,r.ascaleY,r.ashearX,r.ashearY);return}k=n-P.tx,B=i-P.ty;var G=(k*A-B*T)*F-l,V=(B*w-k*E)*F-c,j=G*G+V*V;if(s!=0){s*=f*(p+1)/2;var H=Math.sqrt(j),ee=H-J-Q*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,j=G*G+V*V}}e:if(O){Q*=f;var ae=(j-J*J-Q*Q)/(2*J*Q);ae<-1?ae=-1:ae>1&&(ae=1,o&&(h*=(Math.sqrt(j)/(J+Q)-1)*u+1)),M=Math.acos(ae)*a,w=J+Q*ae,T=Q*Math.sin(M),$=Math.atan2(V*w-G*T,G*w+V*T)}else{w=f*Q,T=d*Q;var pe=w*w,ge=T*T,oe=Math.atan2(V,G);E=ge*J*J+pe*j-pe*ge;var ye=-2*ge*J,Ae=ge-pe;if(A=ye*ye-4*Ae*E,A>=0){var xe=Math.sqrt(A);ye<0&&(xe=-xe),xe=-(ye+xe)/2;var Oe=xe/Ae,ke=E/xe,we=Math.abs(Oe)=-1&&E<=1&&(E=Math.acos(E),k=w*Math.cos(E)+J,B=T*Math.sin(E),A=k*k+B*B,Aor&&(Yt=E,or=A,yt=k,Nr=B)),j<=(wt+or)/2?($=oe-Math.atan2(Ut*a,tt),M=Xe*a):($=oe-Math.atan2(Nr*a,yt),M=Yt*a)}var sr=Math.atan2(b,_)*y,gr=e.arotation;$=($-sr)*N.radDeg+g-gr,$>180?$-=360:$<-180&&($+=360),e.updateWorldTransformWith(l,c,gr+$*u,h,e.ascaleY,0,0),gr=r.arotation,M=((M+sr)*N.radDeg-r.ashearX)*y+m-gr,M>180?M-=360:M<-180&&(M+=360),r.updateWorldTransformWith(_,b,gr+M*u,r.ascaleX,r.ascaleY,r.ashearX,r.ashearY)},t}(),Fw=function(t){Ft(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}(sm),Nw=function(t){Ft(e,t);function e(r){var n=t.call(this,r,0,!1)||this;return n.bones=new Array,n}return e}(sm),cr;(function(t){t[t.Length=0]="Length",t[t.Fixed=1]="Fixed",t[t.Percent=2]="Percent"})(cr||(cr={}));var $D=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==cr.Length,l=o.rotateMode,c=l==Xt.Tangent,f=l==Xt.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 b=p[y],x=b.data.length;if(x0?N.degRad:-N.degRad}for(var y=0,k=3;yN.PI?j-=N.PI2:j<-N.PI&&(j+=N.PI2),j*=r,H=Math.cos(j),ee=Math.sin(j),B.a=H*$-ee*G,B.c=H*M-ee*V,B.b=ee*$+H*G,B.d=ee*M+H*V}b.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(x-g,c,0,l,y);continue}for(;;_++){var S=v[_];if(!(x>S)){if(_==0)x/=S;else{var w=v[_-1];x=(x-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(x,c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],l,y,n||m>0&&b==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 T=q.setArraySize(this.curves,d),E=0,A=c[0],O=c[1],P=0,F=0,k=0,B=0,U=0,z=0,J=0,Q=0,$=0,M=0,G=0,V=0,j=0,H=0,m=0,ee=2;mE){this.addAfterPosition(x-E,c,h-4,l,y);continue}for(;;_++){var ge=T[_];if(!(x>ge)){if(_==0)x/=ge;else{var w=T[_-1];x=(x-w)/(ge-w)}break}}if(_!=p){p=_;var oe=_*6;for(A=c[oe],O=c[oe+1],P=c[oe+2],F=c[oe+3],k=c[oe+4],B=c[oe+5],U=c[oe+6],z=c[oe+7],J=(A-P*2+k)*.03,Q=(O-F*2+B)*.03,$=((P-k)*3-A+U)*.006,M=((F-B)*3-O+z)*.006,G=J*2+$,V=Q*2+M,j=(P-A)*.3+J+$*.16666667,H=(F-O)*.3+Q+M*.16666667,ae=Math.sqrt(j*j+H*H),ie[0]=ae,oe=1;oe<8;oe++)j+=G,H+=V,G+=$,V+=M,ae+=Math.sqrt(j*j+H*H),ie[oe]=ae;j+=G,H+=V,ae+=Math.sqrt(j*j+H*H),ie[8]=ae,j+=G+$,H+=V+M,ae+=Math.sqrt(j*j+H*H),ie[9]=ae,pe=0}for(x*=ae;;pe++){var ye=ie[pe];if(!(x>ye)){if(pe==0)x/=ye;else{var w=ie[pe-1];x=pe+(x-w)/(ye-w)}break}}this.addCurvePosition(x*.1,A,O,P,F,k,B,U,z,l,y,n||m>0&&b==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,b=v*_,x=_*e,S=r*m+i*b+o*x+u*p,w=n*m+a*b+s*x+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}(),VD=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?T-=N.PI2:T<-N.PI&&(T+=N.PI2),T*=e;var E=Math.cos(T),A=Math.sin(T);_.a=E*b-A*S,_.c=E*x-A*w,_.b=A*b+E*S,_.d=A*x+E*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),F=Math.sqrt(s*s+l*l);P>1e-5&&(P=(P+(F-P+this.data.offsetScaleX)*n)/P),_.a*=P,_.b*=P,P=Math.sqrt(_.c*_.c+_.d*_.d),F=Math.sqrt(u*u+c*c),P>1e-5&&(P=(P+(F-P+this.data.offsetScaleY)*n)/P),_.c*=P,_.d*=P,y=!0}if(i>0){var x=_.c,w=_.d,k=Math.atan2(w,x),T=Math.atan2(c,u)-Math.atan2(l,s)-(k-Math.atan2(_.b,_.a));T>N.PI?T-=N.PI2:T<-N.PI&&(T+=N.PI2),T=k+(T+d)*i;var P=Math.sqrt(x*x+w*w);_.c=Math.cos(T)*P,_.d=Math.sin(T)*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?T-=N.PI2:T<-N.PI&&(T+=N.PI2),T*=e;var E=Math.cos(T),A=Math.sin(T);_.a=E*b-A*S,_.c=E*x-A*w,_.b=A*b+E*S,_.d=A*x+E*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 T=Math.atan2(c,u)-Math.atan2(l,s);T>N.PI?T-=N.PI2:T<-N.PI&&(T+=N.PI2);var x=_.c,w=_.d;T=Math.atan2(w,x)+(T-N.PI/2+d)*i;var P=Math.sqrt(x*x+w*w);_.c=Math.cos(T)*P,_.d=Math.sin(T)*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}(),GD=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}(),Bw=function(t){Ft(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}(sm),zx=function(){function t(e,r,n){this.slotIndex=e,this.name=r,this.attachment=n}return t}(),Sp=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 Pl(Q),$=n.slots.length,l=0;l=0;h--)G[h]=-1;for(var V=q.newArray($-M,0),j=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[Q-1])}var ee=e.readInt(!0);if(ee>0){for(var g=new om(ee),l=0;l=0;p--)ge[p]==-1&&(ge[p]=ye[--xe])}h.setFrame(d++,this.getValue(pe,"time",0),ge)}a.push(h),o=Math.max(o,h.frames[h.getFrameCount()-1])}if(e.events){for(var h=new om(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,b=o;b0&&(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}(),Ir;(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"})(Ir||(Ir={}));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}(),mi=function(t){Qt(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(Ir.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=vr.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),Tf=function(t){Qt(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(Ir.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=vr.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),qD=function(t){Qt(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getPropertyId=function(){return(Ir.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=vr.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),KD=function(t){Qt(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getPropertyId=function(){return(Ir.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=vr.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),Yx=function(t){Qt(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(Ir.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=vr.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],b=this.getCurvePercent(y/e.ENTRIES-1,1-(i-_)/(c[y+e.PREV_TIME]-_));d+=(c[y+e.R]-d)*b,p+=(c[y+e.G]-p)*b,v+=(c[y+e.B]-v)*b,g+=(c[y+e.A]-g)*b}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),Hx=function(t){Qt(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(Ir.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],b=c[S+e.PREV_G2],x=c[S+e.PREV_B2]}else{var w=vr.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],b=c[w+e.PREV_G2],x=c[w+e.PREV_B2];var T=c[w],E=this.getCurvePercent(w/e.ENTRIES-1,1-(i-T)/(c[w+e.PREV_TIME]-T));v+=(c[w+e.R]-v)*E,g+=(c[w+e.G]-g)*E,m+=(c[w+e.B]-m)*E,y+=(c[w+e.A]-y)*E,_+=(c[w+e.R2]-_)*E,b+=(c[w+e.G2]-b)*E,x+=(c[w+e.B2]-x)*E}if(o==1)l.color.set(v,g,m,y),l.darkColor.set(_,b,x,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,(b-h.g)*o,(x-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),wp=function(){function t(e){this.frames=q.newFloatArray(e),this.attachmentNames=new Array(e)}return t.prototype.getPropertyId=function(){return(Ir.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=vr.binarySearch(c,n,1)-1;var d=this.attachmentNames[h];e.slots[this.slotIndex].setAttachment(d==null?null:e.getAttachment(this.slotIndex,d))},t}(),iO=null,ZD=function(t){Qt(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r),n.frameVertices=new Array(r),iO==null&&(iO=q.newFloatArray(64)),n}return e.prototype.getPropertyId=function(){return(Ir.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 b=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}(),Ep=function(){function t(e){this.frames=q.newFloatArray(e),this.drawOrders=new Array(e)}return t.prototype.getPropertyId=function(){return Ir.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=vr.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=vr.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}(ha),Kx=function(t){Qt(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(Ir.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=vr.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),Tp=function(t){Qt(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(Ir.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=vr.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),JD=function(t){Qt(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getPropertyId=function(){return(Ir.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=vr.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}(Tp),Zx=function(t){Qt(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(Ir.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=vr.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),e3=function(){function t(e){this.tracks=new Array,this.events=new Array,this.listeners=new Array,this.queue=new r3(this),this.propertyIDs=new RD,this.animationsChanged=!1,this.timeScale=1,this.trackEntryPool=new im(function(){return new t3}),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=vr.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 b=0,x=0;u?(b=0,x=_):(b=o[s],x=o[s+1]);var S=_>0,w=b>=0;N.signum(x)!=N.signum(_)&&Math.abs(x)<=90&&(Math.abs(b)>180&&(b+=360*N.signum(b)),w=S),y=_+b-b%360,w!=S&&(y+=360*N.signum(b)),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 vr("",[],0),t.SUBSEQUENT=0,t.FIRST=1,t.HOLD=2,t.HOLD_MIX=3,t.deprecatedWarning1=!1,t.deprecatedWarning2=!1,t.deprecatedWarning3=!1,t}(),t3=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}(),r3=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,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 T=n+o-w,E=n+s-w+90,y=N.cosDeg(T)*i,_=N.cosDeg(E)*a,b=N.sinDeg(T)*i,x=N.sinDeg(E)*a;l.a=p*y-v*b,l.c=p*_-v*x,l.b=g*y+m*b,l.d=g*_+m*x;break}case Fe.NoScale:case Fe.NoScaleOrReflection:{var A=N.cosDeg(n),O=N.sinDeg(n),P=(p*A+v*O)/c,F=(g*A+m*O)/f,S=Math.sqrt(P*P+F*F);S>1e-5&&(S=1/S),P*=S,F*=S,S=Math.sqrt(P*P+F*F),this.data.transformMode==Fe.NoScale&&p*m-v*g<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY>0)&&(S=-S);var k=Math.PI/2+Math.atan2(F,P),B=Math.cos(k)*S,U=Math.sin(k)*S,y=N.cosDeg(o)*i,_=N.cosDeg(90+s)*a,b=N.sinDeg(o)*i,x=N.sinDeg(90+s)*a;l.a=P*y+B*b,l.c=P*_+B*x,l.b=F*y+U*b,l.d=F*_+U*x;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}(),a3=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=Fe.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}(),o3=function(){function t(e,r){if(r==null)throw new Error("data cannot be null.");this.time=e,this.data=r}return t}(),s3=function(){function t(e){this.name=e}return t}(),l3=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,b=0,x=0,S=p.a,w=p.c,T=p.b,E=p.d,A=Math.abs(c-h)<=1e-4;A?(_=r.ay,b=S*y+w*_+p.tx,x=T*y+E*_+p.ty):(_=0,b=S*y+p.tx,x=T*y+p.ty);var O=e.parent.matrix;S=O.a,w=O.c,T=O.b,E=O.d;var P=1/(S*E-w*T),F=n-O.tx,k=i-O.ty,B=(F*E-k*w)*P-u,U=(k*S-F*T)*P-l,z=B*B+U*U;F=b-O.tx,k=x-O.ty;var J=(F*E-k*w)*P-u,Q=(k*S-F*T)*P-l,$=Math.sqrt(J*J+Q*Q),M=r.data.length*d,G=0,V=0;e:if(A){M*=c;var j=(z-$*$-M*M)/(2*$*M);j<-1?j=-1:j>1&&(j=1,o&&$+M>1e-4&&(f*=(Math.sqrt(z)/($+M)-1)*s+1)),V=Math.acos(j)*a,S=$+M*j,w=M*Math.sin(V),G=Math.atan2(U*S-B*w,B*S+U*w)}else{S=c*M,w=h*M;var H=S*S,ee=w*w,ie=Math.atan2(U,B);T=ee*$*$+H*z-H*ee;var ae=-2*ee*$,pe=ee-H;if(E=ae*ae-4*pe*T,E>=0){var ge=Math.sqrt(E);ae<0&&(ge=-ge),ge=-(ae+ge)/2;var oe=ge/pe,ye=T/ge,Ae=Math.abs(oe)=-1&&T<=1&&(T=Math.acos(T),F=S*Math.cos(T)+$,k=w*Math.sin(T),E=F*F+k*k,Ewt&&(Xe=T,wt=E,tt=F,Ut=k)),z<=(ke+wt)/2?(G=ie-Math.atan2(we*a,Oe),V=xe*a):(G=ie-Math.atan2(Ut*a,tt),V=Xe*a)}var Yt=Math.atan2(_,y)*m,yt=e.arotation;G=(G-Yt)*N.radDeg+v-yt,G>180?G-=360:G<-180&&(G+=360),e.updateWorldTransformWith(u,l,yt+G*s,f,e.ascaleY,0,0),yt=r.arotation,V=((V+Yt)*N.radDeg-r.ashearX)*m+g-yt,V>180?V-=360:V<-180&&(V+=360),r.updateWorldTransformWith(y,_,yt+V*s,r.ascaleX,r.ascaleY,r.ashearX,r.ashearY)},t}(),u3=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}(),c3=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 f3=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==Xt.Tangent,f=l==Xt.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 b=p[y],x=b.data.length;if(x0?N.degRad:-N.degRad}for(var y=0,k=3;yN.PI?j-=N.PI2:j<-N.PI&&(j+=N.PI2),j*=r,H=Math.cos(j),ee=Math.sin(j),B.a=H*$-ee*G,B.c=H*M-ee*V,B.b=ee*$+H*G,B.d=ee*M+H*V}b.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(x-g,c,0,l,y);continue}for(;;_++){var S=v[_];if(!(x>S)){if(_==0)x/=S;else{var w=v[_-1];x=(x-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(x,c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],l,y,n||m>0&&b==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 T=q.setArraySize(this.curves,d),E=0,A=c[0],O=c[1],P=0,F=0,k=0,B=0,U=0,z=0,J=0,Q=0,$=0,M=0,G=0,V=0,j=0,H=0,m=0,ee=2;mE){this.addAfterPosition(x-E,c,h-4,l,y);continue}for(;;_++){var ge=T[_];if(!(x>ge)){if(_==0)x/=ge;else{var w=T[_-1];x=(x-w)/(ge-w)}break}}if(_!=p){p=_;var oe=_*6;for(A=c[oe],O=c[oe+1],P=c[oe+2],F=c[oe+3],k=c[oe+4],B=c[oe+5],U=c[oe+6],z=c[oe+7],J=(A-P*2+k)*.03,Q=(O-F*2+B)*.03,$=((P-k)*3-A+U)*.006,M=((F-B)*3-O+z)*.006,G=J*2+$,V=Q*2+M,j=(P-A)*.3+J+$*.16666667,H=(F-O)*.3+Q+M*.16666667,ae=Math.sqrt(j*j+H*H),ie[0]=ae,oe=1;oe<8;oe++)j+=G,H+=V,G+=$,V+=M,ae+=Math.sqrt(j*j+H*H),ie[oe]=ae;j+=G,H+=V,ae+=Math.sqrt(j*j+H*H),ie[8]=ae,j+=G+$,H+=V+M,ae+=Math.sqrt(j*j+H*H),ie[9]=ae,pe=0}for(x*=ae;;pe++){var ye=ie[pe];if(!(x>ye)){if(pe==0)x/=ye;else{var w=ie[pe-1];x=pe+(x-w)/(ye-w)}break}}this.addCurvePosition(x*.1,A,O,P,F,k,B,U,z,l,y,n||m>0&&b==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,b=v*_,x=_*e,S=r*m+i*b+o*x+u*p,w=n*m+a*b+s*x+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}(),h3=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?T-=N.PI2:T<-N.PI&&(T+=N.PI2),T*=e;var E=Math.cos(T),A=Math.sin(T);_.a=E*b-A*S,_.c=E*x-A*w,_.b=A*b+E*S,_.d=A*x+E*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),F=Math.sqrt(s*s+l*l);P>1e-5&&(P=(P+(F-P+this.data.offsetScaleX)*n)/P),_.a*=P,_.b*=P,P=Math.sqrt(_.c*_.c+_.d*_.d),F=Math.sqrt(u*u+c*c),P>1e-5&&(P=(P+(F-P+this.data.offsetScaleY)*n)/P),_.c*=P,_.d*=P,y=!0}if(i>0){var x=_.c,w=_.d,k=Math.atan2(w,x),T=Math.atan2(c,u)-Math.atan2(l,s)-(k-Math.atan2(_.b,_.a));T>N.PI?T-=N.PI2:T<-N.PI&&(T+=N.PI2),T=k+(T+d)*i;var P=Math.sqrt(x*x+w*w);_.c=Math.cos(T)*P,_.d=Math.sin(T)*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?T-=N.PI2:T<-N.PI&&(T+=N.PI2),T*=e;var E=Math.cos(T),A=Math.sin(T);_.a=E*b-A*S,_.c=E*x-A*w,_.b=A*b+E*S,_.d=A*x+E*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 T=Math.atan2(c,u)-Math.atan2(l,s);T>N.PI?T-=N.PI2:T<-N.PI&&(T+=N.PI2);var x=_.c,w=_.d;T=Math.atan2(w,x)+(T-N.PI/2+d)*i;var P=Math.sqrt(x*x+w*w);_.c=Math.cos(T)*P,_.d=Math.sin(T)*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}(),d3=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}(),m3=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}(),g3=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[--Ae])}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 QD(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,b=o;b0&&(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}(),Ir;(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"})(Ir||(Ir={}));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}(),mi=function(t){Qt(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(Ir.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=vr.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),Tf=function(t){Qt(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(Ir.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=vr.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),qD=function(t){Qt(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getPropertyId=function(){return(Ir.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=vr.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),KD=function(t){Qt(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getPropertyId=function(){return(Ir.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=vr.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),Yx=function(t){Qt(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(Ir.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=vr.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],b=this.getCurvePercent(y/e.ENTRIES-1,1-(i-_)/(c[y+e.PREV_TIME]-_));d+=(c[y+e.R]-d)*b,p+=(c[y+e.G]-p)*b,v+=(c[y+e.B]-v)*b,g+=(c[y+e.A]-g)*b}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),Hx=function(t){Qt(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(Ir.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],b=c[S+e.PREV_G2],x=c[S+e.PREV_B2]}else{var w=vr.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],b=c[w+e.PREV_G2],x=c[w+e.PREV_B2];var T=c[w],E=this.getCurvePercent(w/e.ENTRIES-1,1-(i-T)/(c[w+e.PREV_TIME]-T));v+=(c[w+e.R]-v)*E,g+=(c[w+e.G]-g)*E,m+=(c[w+e.B]-m)*E,y+=(c[w+e.A]-y)*E,_+=(c[w+e.R2]-_)*E,b+=(c[w+e.G2]-b)*E,x+=(c[w+e.B2]-x)*E}if(o==1)l.color.set(v,g,m,y),l.darkColor.set(_,b,x,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,(b-h.g)*o,(x-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),wp=function(){function t(e){this.frames=q.newFloatArray(e),this.attachmentNames=new Array(e)}return t.prototype.getPropertyId=function(){return(Ir.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=vr.binarySearch(c,n,1)-1;var d=this.attachmentNames[h];e.slots[this.slotIndex].setAttachment(d==null?null:e.getAttachment(this.slotIndex,d))},t}(),aO=null,ZD=function(t){Qt(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r),n.frameVertices=new Array(r),aO==null&&(aO=q.newFloatArray(64)),n}return e.prototype.getPropertyId=function(){return(Ir.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 b=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}(),Ep=function(){function t(e){this.frames=q.newFloatArray(e),this.drawOrders=new Array(e)}return t.prototype.getPropertyId=function(){return Ir.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=vr.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=vr.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}(ha),Kx=function(t){Qt(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(Ir.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=vr.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),Tp=function(t){Qt(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(Ir.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=vr.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),JD=function(t){Qt(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getPropertyId=function(){return(Ir.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=vr.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}(Tp),Zx=function(t){Qt(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(Ir.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=vr.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),e3=function(){function t(e){this.tracks=new Array,this.events=new Array,this.listeners=new Array,this.queue=new r3(this),this.propertyIDs=new RD,this.animationsChanged=!1,this.timeScale=1,this.trackEntryPool=new im(function(){return new t3}),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=vr.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 b=0,x=0;u?(b=0,x=_):(b=o[s],x=o[s+1]);var S=_>0,w=b>=0;N.signum(x)!=N.signum(_)&&Math.abs(x)<=90&&(Math.abs(b)>180&&(b+=360*N.signum(b)),w=S),y=_+b-b%360,w!=S&&(y+=360*N.signum(b)),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 vr("",[],0),t.SUBSEQUENT=0,t.FIRST=1,t.HOLD=2,t.HOLD_MIX=3,t.deprecatedWarning1=!1,t.deprecatedWarning2=!1,t.deprecatedWarning3=!1,t}(),t3=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}(),r3=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,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 T=n+o-w,E=n+s-w+90,y=N.cosDeg(T)*i,_=N.cosDeg(E)*a,b=N.sinDeg(T)*i,x=N.sinDeg(E)*a;l.a=p*y-v*b,l.c=p*_-v*x,l.b=g*y+m*b,l.d=g*_+m*x;break}case Fe.NoScale:case Fe.NoScaleOrReflection:{var A=N.cosDeg(n),O=N.sinDeg(n),P=(p*A+v*O)/c,F=(g*A+m*O)/f,S=Math.sqrt(P*P+F*F);S>1e-5&&(S=1/S),P*=S,F*=S,S=Math.sqrt(P*P+F*F),this.data.transformMode==Fe.NoScale&&p*m-v*g<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY>0)&&(S=-S);var k=Math.PI/2+Math.atan2(F,P),B=Math.cos(k)*S,U=Math.sin(k)*S,y=N.cosDeg(o)*i,_=N.cosDeg(90+s)*a,b=N.sinDeg(o)*i,x=N.sinDeg(90+s)*a;l.a=P*y+B*b,l.c=P*_+B*x,l.b=F*y+U*b,l.d=F*_+U*x;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}(),a3=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=Fe.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}(),o3=function(){function t(e,r){if(r==null)throw new Error("data cannot be null.");this.time=e,this.data=r}return t}(),s3=function(){function t(e){this.name=e}return t}(),l3=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,b=0,x=0,S=p.a,w=p.c,T=p.b,E=p.d,A=Math.abs(c-h)<=1e-4;A?(_=r.ay,b=S*y+w*_+p.tx,x=T*y+E*_+p.ty):(_=0,b=S*y+p.tx,x=T*y+p.ty);var O=e.parent.matrix;S=O.a,w=O.c,T=O.b,E=O.d;var P=1/(S*E-w*T),F=n-O.tx,k=i-O.ty,B=(F*E-k*w)*P-u,U=(k*S-F*T)*P-l,z=B*B+U*U;F=b-O.tx,k=x-O.ty;var J=(F*E-k*w)*P-u,Q=(k*S-F*T)*P-l,$=Math.sqrt(J*J+Q*Q),M=r.data.length*d,G=0,V=0;e:if(A){M*=c;var j=(z-$*$-M*M)/(2*$*M);j<-1?j=-1:j>1&&(j=1,o&&$+M>1e-4&&(f*=(Math.sqrt(z)/($+M)-1)*s+1)),V=Math.acos(j)*a,S=$+M*j,w=M*Math.sin(V),G=Math.atan2(U*S-B*w,B*S+U*w)}else{S=c*M,w=h*M;var H=S*S,ee=w*w,ie=Math.atan2(U,B);T=ee*$*$+H*z-H*ee;var ae=-2*ee*$,pe=ee-H;if(E=ae*ae-4*pe*T,E>=0){var ge=Math.sqrt(E);ae<0&&(ge=-ge),ge=-(ae+ge)/2;var oe=ge/pe,ye=T/ge,Ae=Math.abs(oe)=-1&&T<=1&&(T=Math.acos(T),F=S*Math.cos(T)+$,k=w*Math.sin(T),E=F*F+k*k,Ewt&&(Xe=T,wt=E,tt=F,Ut=k)),z<=(ke+wt)/2?(G=ie-Math.atan2(we*a,Oe),V=xe*a):(G=ie-Math.atan2(Ut*a,tt),V=Xe*a)}var Yt=Math.atan2(_,y)*m,yt=e.arotation;G=(G-Yt)*N.radDeg+v-yt,G>180?G-=360:G<-180&&(G+=360),e.updateWorldTransformWith(u,l,yt+G*s,f,e.ascaleY,0,0),yt=r.arotation,V=((V+Yt)*N.radDeg-r.ashearX)*m+g-yt,V>180?V-=360:V<-180&&(V+=360),r.updateWorldTransformWith(y,_,yt+V*s,r.ascaleX,r.ascaleY,r.ashearX,r.ashearY)},t}(),u3=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}(),c3=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 f3=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==Xt.Tangent,f=l==Xt.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 b=p[y],x=b.data.length;if(x0?N.degRad:-N.degRad}for(var y=0,k=3;yN.PI?j-=N.PI2:j<-N.PI&&(j+=N.PI2),j*=r,H=Math.cos(j),ee=Math.sin(j),B.a=H*$-ee*G,B.c=H*M-ee*V,B.b=ee*$+H*G,B.d=ee*M+H*V}b.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(x-g,c,0,l,y);continue}for(;;_++){var S=v[_];if(!(x>S)){if(_==0)x/=S;else{var w=v[_-1];x=(x-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(x,c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],l,y,n||m>0&&b==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 T=q.setArraySize(this.curves,d),E=0,A=c[0],O=c[1],P=0,F=0,k=0,B=0,U=0,z=0,J=0,Q=0,$=0,M=0,G=0,V=0,j=0,H=0,m=0,ee=2;mE){this.addAfterPosition(x-E,c,h-4,l,y);continue}for(;;_++){var ge=T[_];if(!(x>ge)){if(_==0)x/=ge;else{var w=T[_-1];x=(x-w)/(ge-w)}break}}if(_!=p){p=_;var oe=_*6;for(A=c[oe],O=c[oe+1],P=c[oe+2],F=c[oe+3],k=c[oe+4],B=c[oe+5],U=c[oe+6],z=c[oe+7],J=(A-P*2+k)*.03,Q=(O-F*2+B)*.03,$=((P-k)*3-A+U)*.006,M=((F-B)*3-O+z)*.006,G=J*2+$,V=Q*2+M,j=(P-A)*.3+J+$*.16666667,H=(F-O)*.3+Q+M*.16666667,ae=Math.sqrt(j*j+H*H),ie[0]=ae,oe=1;oe<8;oe++)j+=G,H+=V,G+=$,V+=M,ae+=Math.sqrt(j*j+H*H),ie[oe]=ae;j+=G,H+=V,ae+=Math.sqrt(j*j+H*H),ie[8]=ae,j+=G+$,H+=V+M,ae+=Math.sqrt(j*j+H*H),ie[9]=ae,pe=0}for(x*=ae;;pe++){var ye=ie[pe];if(!(x>ye)){if(pe==0)x/=ye;else{var w=ie[pe-1];x=pe+(x-w)/(ye-w)}break}}this.addCurvePosition(x*.1,A,O,P,F,k,B,U,z,l,y,n||m>0&&b==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,b=v*_,x=_*e,S=r*m+i*b+o*x+u*p,w=n*m+a*b+s*x+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}(),h3=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?T-=N.PI2:T<-N.PI&&(T+=N.PI2),T*=e;var E=Math.cos(T),A=Math.sin(T);_.a=E*b-A*S,_.c=E*x-A*w,_.b=A*b+E*S,_.d=A*x+E*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),F=Math.sqrt(s*s+l*l);P>1e-5&&(P=(P+(F-P+this.data.offsetScaleX)*n)/P),_.a*=P,_.b*=P,P=Math.sqrt(_.c*_.c+_.d*_.d),F=Math.sqrt(u*u+c*c),P>1e-5&&(P=(P+(F-P+this.data.offsetScaleY)*n)/P),_.c*=P,_.d*=P,y=!0}if(i>0){var x=_.c,w=_.d,k=Math.atan2(w,x),T=Math.atan2(c,u)-Math.atan2(l,s)-(k-Math.atan2(_.b,_.a));T>N.PI?T-=N.PI2:T<-N.PI&&(T+=N.PI2),T=k+(T+d)*i;var P=Math.sqrt(x*x+w*w);_.c=Math.cos(T)*P,_.d=Math.sin(T)*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?T-=N.PI2:T<-N.PI&&(T+=N.PI2),T*=e;var E=Math.cos(T),A=Math.sin(T);_.a=E*b-A*S,_.c=E*x-A*w,_.b=A*b+E*S,_.d=A*x+E*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 T=Math.atan2(c,u)-Math.atan2(l,s);T>N.PI?T-=N.PI2:T<-N.PI&&(T+=N.PI2);var x=_.c,w=_.d;T=Math.atan2(w,x)+(T-N.PI/2+d)*i;var P=Math.sqrt(x*x+w*w);_.c=Math.cos(T)*P,_.d=Math.sin(T)*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}(),d3=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}(),m3=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}(),g3=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[--Ae])}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 QD(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,b=o;b=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}(),Tr;(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"})(Tr||(Tr={}));var zw=[Tr.hold,Tr.once,Tr.loop,Tr.pingpong,Tr.onceReverse,Tr.loopReverse,Tr.pingpongReverse],um=function(){function t(e,r,n){if(this.timelines=[],this.timelineIds=new ID,!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,b=g*2+y,x=(s-a)*.3+v+m*.16666667,S=(u-o)*.3+g+y*.16666667,w=a+x,T=o+S,E=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}(Wt),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),cm=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),nE=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 T=c[S];v=c[S+1],g=c[S+2],m=c[S+3],y=c[S+4],_=c[S+5],b=c[S+6],x=c[S+7];var E=(i-T)/(c[S+8]-T);v+=(c[S+8+1]-v)*E,g+=(c[S+8+2]-g)*E,m+=(c[S+8+3]-m)*E,y+=(c[S+8+4]-y)*E,_+=(c[S+8+5]-_)*E,b+=(c[S+8+6]-b)*E,x+=(c[S+8+7]-x)*E;break;case 1:v=c[S+1],g=c[S+2],m=c[S+3],y=c[S+4],_=c[S+5],b=c[S+6],x=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),b=this.getBezierValue(i,S,6,w+18*5-2),x=this.getBezierValue(i,S,7,w+18*6-2)}if(o==1)f.set(v,g,m,y),h.r=_,h.g=b,h.b=x;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+=(b-h.g)*o,h.b+=(x-h.b)*o}}},e}(Pi),aE=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 na)||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 b=0;bi)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}(Wt),Ol=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),hE=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 na)||c.timelineAttachment!=f))){var h=this.frames;if(i>4,y=this.attachment.sequence.regions.length,_=zw[v&15];if(_!=Tr.hold)switch(m+=(i-p)/g+1e-5|0,_){case Tr.once:m=Math.min(y-1,m);break;case Tr.loop:m%=y;break;case Tr.pingpong:{var b=(y<<1)-2;m=b==0?0:m%b,m>=y&&(m=b-m);break}case Tr.onceReverse:m=Math.max(y-1-m,0);break;case Tr.loopReverse:m=y-1-m%y;break;case Tr.pingpongReverse:{var b=(y<<1)-2;m=b==0?0:(m+y-1)%b,m>=y&&(m=b-m)}}l.sequenceIndex=m}}}},e.ENTRIES=3,e.MODE=1,e.DELAY=2,e}(Wt),S3=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 E3(this),this.propertyIDs=new ID,this.animationsChanged=!1,this.trackEntryPool=new im(function(){return new w3}),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]=t0e,o[u]=f;continue e}break}a[u]=Fy}}},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 um("",[],0),t.deprecatedWarning1=!1,t.deprecatedWarning2=!1,t.deprecatedWarning3=!1,t}(),w3=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 T=n+o-w,E=n+s-w+90,y=N.cosDeg(T)*i,_=N.cosDeg(E)*a,b=N.sinDeg(T)*i,x=N.sinDeg(E)*a;l.a=p*y-v*b,l.c=p*_-v*x,l.b=g*y+m*b,l.d=g*_+m*x;break}case Fe.NoScale:case Fe.NoScaleOrReflection:{var A=N.cosDeg(n),O=N.sinDeg(n),P=(p*A+v*O)/c,F=(g*A+m*O)/f,S=Math.sqrt(P*P+F*F);S>1e-5&&(S=1/S),P*=S,F*=S,S=Math.sqrt(P*P+F*F),this.data.transformMode==Fe.NoScale&&p*m-v*g<0!=(c<0!=f<0)&&(S=-S);var k=Math.PI/2+Math.atan2(F,P),B=Math.cos(k)*S,U=Math.sin(k)*S,y=N.cosDeg(o)*i,_=N.cosDeg(90+s)*a,b=N.sinDeg(o)*i,x=N.sinDeg(90+s)*a;l.a=P*y+B*b,l.c=P*_+B*x,l.b=F*y+U*b,l.d=F*_+U*x;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}(),pE=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=Fe.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}(),hm=function(){function t(e,r,n){this.name=e,this.order=r,this.skinRequired=n}return t}(),vE=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}(),mE=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}(),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)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 T=e.ascaleX,E=e.ascaleY;if(i||a){switch(e.data.transformMode){case Fe.NoScale:case Fe.NoScaleOrReflection:p=r-e.worldX,v=n-e.worldY}var A=e.data.length*T,O=Math.sqrt(p*p+v*v);if(i&&OA&&A>1e-4){var y=(O/A-1)*s+1;T*=y,o&&(E*=y)}}e.updateWorldTransformWith(e.ax,e.ay,e.arotation+d*s,T,E,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,b=0;h<0?(h=-h,y=180,b=-1):(y=0,b=1),d<0&&(d=-d,b=-b),g<0?(g=-g,_=180):_=0;var x=r.ax,S=0,w=0,T=0,E=m.a,A=m.c,O=m.b,P=m.d,F=Math.abs(h-d)<=1e-4;!F||o?(S=0,w=E*x+m.tx,T=O*x+m.ty):(S=r.ay,w=E*x+A*S+m.tx,T=O*x+P*S+m.ty);var k=e.parent.matrix;if(!k)throw new Error("IK parent must itself have a parent.");E=k.a,A=k.c,O=k.b,P=k.d;var B=1/(E*P-A*O),U=w-k.tx,z=T-k.ty,J=(U*P-z*A)*B-c,Q=(z*E-U*O)*B-f,$=Math.sqrt(J*J+Q*Q),M=r.data.length*g,G,V;if($<1e-4){this.apply1(e,n,i,!1,o,!1,l),r.updateWorldTransformWith(x,S,0,r.ascaleX,r.ascaleY,r.ashearX,r.ashearY);return}U=n-k.tx,z=i-k.ty;var j=(U*P-z*A)*B-c,H=(z*E-U*O)*B-f,ee=j*j+H*H;if(u!=0){u*=h*(g+1)*.5;var ie=Math.sqrt(ee),ae=ie-$-M*h+u;if(ae>0){var pe=Math.min(1,ae/(u*2))-1;pe=(ae-u*(1-pe*pe))/ie,j-=pe*j,H-=pe*H,ee=j*j+H*H}}e:if(F){M*=h;var ge=(ee-$*$-M*M)/(2*$*M);ge<-1?(ge=-1,V=Math.PI*a):ge>1?(ge=1,V=0,o&&(E=(Math.sqrt(ee)/($+M)-1)*l+1,p*=E,s&&(v*=E))):V=Math.acos(ge)*a,E=$+M*ge,A=M*Math.sin(V),G=Math.atan2(H*E-j*A,j*E+H*A)}else{E=h*M,A=d*M;var oe=E*E,ye=A*A,Ae=Math.atan2(H,j);O=ye*$*$+oe*ee-oe*ye;var xe=-2*ye*$,Oe=ye-oe;if(P=xe*xe-4*Oe*O,P>=0){var ke=Math.sqrt(P);xe<0&&(ke=-ke),ke=-(xe+ke)*.5;var we=ke/Oe,Xe=O/ke,tt=Math.abs(we)=-1&&O<=1&&(O=Math.acos(O),U=E*Math.cos(O)+$,z=A*Math.sin(O),P=U*U+z*z,Psr&&(or=O,sr=P,Nr=U,gr=z)),ee<=(Yt+sr)*.5?(G=Ae-Math.atan2(yt*a,Ut),V=wt*a):(G=Ae-Math.atan2(gr*a,Nr),V=or*a)}var Lr=Math.atan2(S,x)*b,yr=e.arotation;G=(G-Lr)*N.radDeg+y-yr,G>180?G-=360:G<-180&&(G+=360),e.updateWorldTransformWith(c,f,yr+G*l,p,v,0,0),yr=r.arotation,V=((V+Lr)*N.radDeg-r.ashearX)*b+_-yr,V>180?V-=360:V<-180&&(V+=360),r.updateWorldTransformWith(x,S,yr+V*l,r.ascaleX,r.ascaleY,r.ashearX,r.ashearY)},t}(),gE=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}(hm),yE=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=kt.Fixed,n.spacingMode=rr.Fixed,n.rotateMode=Xt.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}(hm),rr;(function(t){t[t.Length=0]="Length",t[t.Fixed=1]="Fixed",t[t.Percent=2]="Percent",t[t.Proportional=3]="Proportional"})(rr||(rr={}));var C3=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){b=c/b*d;for(var p=1;p0?N.degRad:-N.degRad}for(var p=0,F=3;p0){var Q=k.a,$=k.c,M=k.b,G=k.d,V=0,j=0,H=0;if(o?V=T[F-1]:f[p+1]==0?V=T[F+2]:V=Math.atan2(U,B),V-=Math.atan2(M,Q),P){j=Math.cos(V),H=Math.sin(V);var ee=g.data.length;E+=(ee*(j*Q-H*M)-B)*r,A+=(ee*(H*Q+j*M)-U)*r}else V+=O;V>N.PI?V-=N.PI2:V<-N.PI&&(V+=N.PI2),V*=r,j=Math.cos(V),H=Math.sin(V),k.a=j*Q-H*M,k.c=j*$-H*G,k.b=H*Q+j*M,k.d=H*$+j*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==kt.Percent&&(a*=p);var v;switch(this.data.spacingMode){case rr.Percent:v=p;break;case rr.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(b-p,u,0,s,m);continue}for(;;y++){var x=d[y];if(!(b>x)){if(y==0)b/=x;else{var S=d[y-1];b=(b-S)/(x-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(b,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),T=0,E=u[0],A=u[1],O=0,P=0,F=0,k=0,B=0,U=0,z=0,J=0,Q=0,$=0,M=0,G=0,V=0,j=0,g=0,H=2;gT){this.addAfterPosition(b-T,u,c-4,s,m);continue}for(;;y++){var ge=w[y];if(!(b>ge)){if(y==0)b/=ge;else{var S=w[y-1];b=(b-S)/(ge-S)}break}}if(y!=h){h=y;var oe=y*6;for(E=u[oe],A=u[oe+1],O=u[oe+2],P=u[oe+3],F=u[oe+4],k=u[oe+5],B=u[oe+6],U=u[oe+7],z=(E-O*2+F)*.03,J=(A-P*2+k)*.03,Q=((O-F)*3-E+B)*.006,$=((P-k)*3-A+U)*.006,M=z*2+Q,G=J*2+$,V=(O-E)*.3+z+Q*.16666667,j=(P-A)*.3+J+$*.16666667,ae=Math.sqrt(V*V+j*j),ie[0]=ae,oe=1;oe<8;oe++)V+=M,j+=G,M+=Q,G+=$,ae+=Math.sqrt(V*V+j*j),ie[oe]=ae;V+=M,j+=G,ae+=Math.sqrt(V*V+j*j),ie[8]=ae,V+=M+Q,j+=G+$,ae+=Math.sqrt(V*V+j*j),ie[9]=ae,pe=0}for(b*=ae;;pe++){var ye=ie[pe];if(!(b>ye)){if(pe==0)b/=ye;else{var S=ie[pe-1];b=pe+(b-S)/(ye-S)}break}}this.addCurvePosition(b*.1,E,A,O,P,F,k,B,U,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,b=v*_,x=_*e,S=r*m+i*b+o*x+u*p,w=n*m+a*b+s*x+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}(),P3=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 na)||!(this.attachment instanceof na)||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}(),O3=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 b=m[y],x=b.matrix;if(e!=0){var S=x.a,w=x.c,T=x.b,E=x.d,A=Math.atan2(h,c)-Math.atan2(T,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);x.a=O*S-P*T,x.c=O*w-P*E,x.b=P*S+O*T,x.d=P*w+O*E}if(s){var F=this.temp;u.localToWorld(F.set(this.data.offsetX,this.data.offsetY)),x.tx+=(F.x-x.tx)*r,x.ty+=(F.y-x.ty)*n}if(i!=0){var k=Math.sqrt(x.a*x.a+x.b*x.b);k!=0&&(k=(k+(Math.sqrt(c*c+h*h)-k+this.data.offsetScaleX)*i)/k),x.a*=k,x.b*=k}if(a!=0){var k=Math.sqrt(x.c*x.c+x.d*x.d);k!=0&&(k=(k+(Math.sqrt(f*f+d*d)-k+this.data.offsetScaleY)*a)/k),x.c*=k,x.d*=k}if(o>0){var w=x.c,E=x.d,B=Math.atan2(E,w),A=Math.atan2(d,f)-Math.atan2(h,c)-(B-Math.atan2(x.b,x.a));A>N.PI?A-=N.PI2:A<-N.PI&&(A+=N.PI2),A=B+(A+g)*o;var k=Math.sqrt(w*w+E*E);x.c=Math.cos(A)*k,x.d=Math.sin(A)*k}b.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 b=m[y],x=b.matrix;if(e!=0){var S=x.a,w=x.c,T=x.b,E=x.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);x.a=O*S-P*T,x.c=O*w-P*E,x.b=P*S+O*T,x.d=P*w+O*E}if(s){var F=this.temp;u.localToWorld(F.set(this.data.offsetX,this.data.offsetY)),x.tx+=F.x*r,x.ty+=F.y*n}if(i!=0){var k=(Math.sqrt(c*c+h*h)-1+this.data.offsetScaleX)*i+1;x.a*=k,x.b*=k}if(a!=0){var k=(Math.sqrt(f*f+d*d)-1+this.data.offsetScaleY)*a+1;x.c*=k,x.d*=k}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=x.c,E=x.d;A=Math.atan2(E,w)+(A-N.PI/2+g)*o;var k=Math.sqrt(w*w+E*E);x.c=Math.cos(A)*k,x.d=Math.sin(A)*k}b.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}(),bE=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}(hm),t1=function(){function t(e,r,n){this.slotIndex=e,this.name=r,this.attachment=n}return t}(),Ap=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 Ol(ct),oi=n.slots.length,o=0;o=0;l--)Xn[l]=-1;for(var ja=q.newArray(oi-Fo,0),Ii=0,Dr=0,l=0;l=0;l--)Xn[l]==-1&&(Xn[l]=ja[--Dr]);p.setFrame(o,m,Xn)}i.push(p)}var Ua=e.readInt(!0);if(Ua>0){for(var p=new fm(Ua),o=0;o=0;Mi--)ki[Mi]==-1&&(ki[Mi]=pa[--bu])}d.setFrame(p,Z(Ua,"time",0),ki)}a.push(d)}if(e.events){for(var d=new fm(e.events.length),p=0,ct=0;ct>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,b=o;b=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}(),Tr;(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"})(Tr||(Tr={}));var Ww=[Tr.hold,Tr.once,Tr.loop,Tr.pingpong,Tr.onceReverse,Tr.loopReverse,Tr.pingpongReverse],um=function(){function t(e,r,n){if(this.timelines=[],this.timelineIds=new ID,!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,b=g*2+y,x=(s-a)*.3+v+m*.16666667,S=(u-o)*.3+g+y*.16666667,w=a+x,T=o+S,E=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}(Wt),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),cm=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),iE=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 T=c[S];v=c[S+1],g=c[S+2],m=c[S+3],y=c[S+4],_=c[S+5],b=c[S+6],x=c[S+7];var E=(i-T)/(c[S+8]-T);v+=(c[S+8+1]-v)*E,g+=(c[S+8+2]-g)*E,m+=(c[S+8+3]-m)*E,y+=(c[S+8+4]-y)*E,_+=(c[S+8+5]-_)*E,b+=(c[S+8+6]-b)*E,x+=(c[S+8+7]-x)*E;break;case 1:v=c[S+1],g=c[S+2],m=c[S+3],y=c[S+4],_=c[S+5],b=c[S+6],x=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),b=this.getBezierValue(i,S,6,w+18*5-2),x=this.getBezierValue(i,S,7,w+18*6-2)}if(o==1)f.set(v,g,m,y),h.r=_,h.g=b,h.b=x;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+=(b-h.g)*o,h.b+=(x-h.b)*o}}},e}(Pi),oE=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 na)||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 b=0;bi)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}(Wt),Ol=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),dE=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 na)||c.timelineAttachment!=f))){var h=this.frames;if(i>4,y=this.attachment.sequence.regions.length,_=Ww[v&15];if(_!=Tr.hold)switch(m+=(i-p)/g+1e-5|0,_){case Tr.once:m=Math.min(y-1,m);break;case Tr.loop:m%=y;break;case Tr.pingpong:{var b=(y<<1)-2;m=b==0?0:m%b,m>=y&&(m=b-m);break}case Tr.onceReverse:m=Math.max(y-1-m,0);break;case Tr.loopReverse:m=y-1-m%y;break;case Tr.pingpongReverse:{var b=(y<<1)-2;m=b==0?0:(m+y-1)%b,m>=y&&(m=b-m)}}l.sequenceIndex=m}}}},e.ENTRIES=3,e.MODE=1,e.DELAY=2,e}(Wt),S3=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 E3(this),this.propertyIDs=new ID,this.animationsChanged=!1,this.trackEntryPool=new im(function(){return new w3}),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]=t0e,o[u]=f;continue e}break}a[u]=Fy}}},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 um("",[],0),t.deprecatedWarning1=!1,t.deprecatedWarning2=!1,t.deprecatedWarning3=!1,t}(),w3=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 T=n+o-w,E=n+s-w+90,y=N.cosDeg(T)*i,_=N.cosDeg(E)*a,b=N.sinDeg(T)*i,x=N.sinDeg(E)*a;l.a=p*y-v*b,l.c=p*_-v*x,l.b=g*y+m*b,l.d=g*_+m*x;break}case Fe.NoScale:case Fe.NoScaleOrReflection:{var A=N.cosDeg(n),O=N.sinDeg(n),P=(p*A+v*O)/c,F=(g*A+m*O)/f,S=Math.sqrt(P*P+F*F);S>1e-5&&(S=1/S),P*=S,F*=S,S=Math.sqrt(P*P+F*F),this.data.transformMode==Fe.NoScale&&p*m-v*g<0!=(c<0!=f<0)&&(S=-S);var k=Math.PI/2+Math.atan2(F,P),B=Math.cos(k)*S,U=Math.sin(k)*S,y=N.cosDeg(o)*i,_=N.cosDeg(90+s)*a,b=N.sinDeg(o)*i,x=N.sinDeg(90+s)*a;l.a=P*y+B*b,l.c=P*_+B*x,l.b=F*y+U*b,l.d=F*_+U*x;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}(),vE=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=Fe.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}(),hm=function(){function t(e,r,n){this.name=e,this.order=r,this.skinRequired=n}return t}(),mE=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}(),gE=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}(),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)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 T=e.ascaleX,E=e.ascaleY;if(i||a){switch(e.data.transformMode){case Fe.NoScale:case Fe.NoScaleOrReflection:p=r-e.worldX,v=n-e.worldY}var A=e.data.length*T,O=Math.sqrt(p*p+v*v);if(i&&OA&&A>1e-4){var y=(O/A-1)*s+1;T*=y,o&&(E*=y)}}e.updateWorldTransformWith(e.ax,e.ay,e.arotation+d*s,T,E,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,b=0;h<0?(h=-h,y=180,b=-1):(y=0,b=1),d<0&&(d=-d,b=-b),g<0?(g=-g,_=180):_=0;var x=r.ax,S=0,w=0,T=0,E=m.a,A=m.c,O=m.b,P=m.d,F=Math.abs(h-d)<=1e-4;!F||o?(S=0,w=E*x+m.tx,T=O*x+m.ty):(S=r.ay,w=E*x+A*S+m.tx,T=O*x+P*S+m.ty);var k=e.parent.matrix;if(!k)throw new Error("IK parent must itself have a parent.");E=k.a,A=k.c,O=k.b,P=k.d;var B=1/(E*P-A*O),U=w-k.tx,z=T-k.ty,J=(U*P-z*A)*B-c,Q=(z*E-U*O)*B-f,$=Math.sqrt(J*J+Q*Q),M=r.data.length*g,G,V;if($<1e-4){this.apply1(e,n,i,!1,o,!1,l),r.updateWorldTransformWith(x,S,0,r.ascaleX,r.ascaleY,r.ashearX,r.ashearY);return}U=n-k.tx,z=i-k.ty;var j=(U*P-z*A)*B-c,H=(z*E-U*O)*B-f,ee=j*j+H*H;if(u!=0){u*=h*(g+1)*.5;var ie=Math.sqrt(ee),ae=ie-$-M*h+u;if(ae>0){var pe=Math.min(1,ae/(u*2))-1;pe=(ae-u*(1-pe*pe))/ie,j-=pe*j,H-=pe*H,ee=j*j+H*H}}e:if(F){M*=h;var ge=(ee-$*$-M*M)/(2*$*M);ge<-1?(ge=-1,V=Math.PI*a):ge>1?(ge=1,V=0,o&&(E=(Math.sqrt(ee)/($+M)-1)*l+1,p*=E,s&&(v*=E))):V=Math.acos(ge)*a,E=$+M*ge,A=M*Math.sin(V),G=Math.atan2(H*E-j*A,j*E+H*A)}else{E=h*M,A=d*M;var oe=E*E,ye=A*A,Ae=Math.atan2(H,j);O=ye*$*$+oe*ee-oe*ye;var xe=-2*ye*$,Oe=ye-oe;if(P=xe*xe-4*Oe*O,P>=0){var ke=Math.sqrt(P);xe<0&&(ke=-ke),ke=-(xe+ke)*.5;var we=ke/Oe,Xe=O/ke,tt=Math.abs(we)=-1&&O<=1&&(O=Math.acos(O),U=E*Math.cos(O)+$,z=A*Math.sin(O),P=U*U+z*z,Psr&&(or=O,sr=P,Nr=U,gr=z)),ee<=(Yt+sr)*.5?(G=Ae-Math.atan2(yt*a,Ut),V=wt*a):(G=Ae-Math.atan2(gr*a,Nr),V=or*a)}var Lr=Math.atan2(S,x)*b,yr=e.arotation;G=(G-Lr)*N.radDeg+y-yr,G>180?G-=360:G<-180&&(G+=360),e.updateWorldTransformWith(c,f,yr+G*l,p,v,0,0),yr=r.arotation,V=((V+Lr)*N.radDeg-r.ashearX)*b+_-yr,V>180?V-=360:V<-180&&(V+=360),r.updateWorldTransformWith(x,S,yr+V*l,r.ascaleX,r.ascaleY,r.ashearX,r.ashearY)},t}(),yE=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}(hm),_E=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=kt.Fixed,n.spacingMode=rr.Fixed,n.rotateMode=Xt.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}(hm),rr;(function(t){t[t.Length=0]="Length",t[t.Fixed=1]="Fixed",t[t.Percent=2]="Percent",t[t.Proportional=3]="Proportional"})(rr||(rr={}));var C3=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){b=c/b*d;for(var p=1;p0?N.degRad:-N.degRad}for(var p=0,F=3;p0){var Q=k.a,$=k.c,M=k.b,G=k.d,V=0,j=0,H=0;if(o?V=T[F-1]:f[p+1]==0?V=T[F+2]:V=Math.atan2(U,B),V-=Math.atan2(M,Q),P){j=Math.cos(V),H=Math.sin(V);var ee=g.data.length;E+=(ee*(j*Q-H*M)-B)*r,A+=(ee*(H*Q+j*M)-U)*r}else V+=O;V>N.PI?V-=N.PI2:V<-N.PI&&(V+=N.PI2),V*=r,j=Math.cos(V),H=Math.sin(V),k.a=j*Q-H*M,k.c=j*$-H*G,k.b=H*Q+j*M,k.d=H*$+j*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==kt.Percent&&(a*=p);var v;switch(this.data.spacingMode){case rr.Percent:v=p;break;case rr.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(b-p,u,0,s,m);continue}for(;;y++){var x=d[y];if(!(b>x)){if(y==0)b/=x;else{var S=d[y-1];b=(b-S)/(x-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(b,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),T=0,E=u[0],A=u[1],O=0,P=0,F=0,k=0,B=0,U=0,z=0,J=0,Q=0,$=0,M=0,G=0,V=0,j=0,g=0,H=2;gT){this.addAfterPosition(b-T,u,c-4,s,m);continue}for(;;y++){var ge=w[y];if(!(b>ge)){if(y==0)b/=ge;else{var S=w[y-1];b=(b-S)/(ge-S)}break}}if(y!=h){h=y;var oe=y*6;for(E=u[oe],A=u[oe+1],O=u[oe+2],P=u[oe+3],F=u[oe+4],k=u[oe+5],B=u[oe+6],U=u[oe+7],z=(E-O*2+F)*.03,J=(A-P*2+k)*.03,Q=((O-F)*3-E+B)*.006,$=((P-k)*3-A+U)*.006,M=z*2+Q,G=J*2+$,V=(O-E)*.3+z+Q*.16666667,j=(P-A)*.3+J+$*.16666667,ae=Math.sqrt(V*V+j*j),ie[0]=ae,oe=1;oe<8;oe++)V+=M,j+=G,M+=Q,G+=$,ae+=Math.sqrt(V*V+j*j),ie[oe]=ae;V+=M,j+=G,ae+=Math.sqrt(V*V+j*j),ie[8]=ae,V+=M+Q,j+=G+$,ae+=Math.sqrt(V*V+j*j),ie[9]=ae,pe=0}for(b*=ae;;pe++){var ye=ie[pe];if(!(b>ye)){if(pe==0)b/=ye;else{var S=ie[pe-1];b=pe+(b-S)/(ye-S)}break}}this.addCurvePosition(b*.1,E,A,O,P,F,k,B,U,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,b=v*_,x=_*e,S=r*m+i*b+o*x+u*p,w=n*m+a*b+s*x+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}(),P3=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 na)||!(this.attachment instanceof na)||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}(),O3=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 b=m[y],x=b.matrix;if(e!=0){var S=x.a,w=x.c,T=x.b,E=x.d,A=Math.atan2(h,c)-Math.atan2(T,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);x.a=O*S-P*T,x.c=O*w-P*E,x.b=P*S+O*T,x.d=P*w+O*E}if(s){var F=this.temp;u.localToWorld(F.set(this.data.offsetX,this.data.offsetY)),x.tx+=(F.x-x.tx)*r,x.ty+=(F.y-x.ty)*n}if(i!=0){var k=Math.sqrt(x.a*x.a+x.b*x.b);k!=0&&(k=(k+(Math.sqrt(c*c+h*h)-k+this.data.offsetScaleX)*i)/k),x.a*=k,x.b*=k}if(a!=0){var k=Math.sqrt(x.c*x.c+x.d*x.d);k!=0&&(k=(k+(Math.sqrt(f*f+d*d)-k+this.data.offsetScaleY)*a)/k),x.c*=k,x.d*=k}if(o>0){var w=x.c,E=x.d,B=Math.atan2(E,w),A=Math.atan2(d,f)-Math.atan2(h,c)-(B-Math.atan2(x.b,x.a));A>N.PI?A-=N.PI2:A<-N.PI&&(A+=N.PI2),A=B+(A+g)*o;var k=Math.sqrt(w*w+E*E);x.c=Math.cos(A)*k,x.d=Math.sin(A)*k}b.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 b=m[y],x=b.matrix;if(e!=0){var S=x.a,w=x.c,T=x.b,E=x.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);x.a=O*S-P*T,x.c=O*w-P*E,x.b=P*S+O*T,x.d=P*w+O*E}if(s){var F=this.temp;u.localToWorld(F.set(this.data.offsetX,this.data.offsetY)),x.tx+=F.x*r,x.ty+=F.y*n}if(i!=0){var k=(Math.sqrt(c*c+h*h)-1+this.data.offsetScaleX)*i+1;x.a*=k,x.b*=k}if(a!=0){var k=(Math.sqrt(f*f+d*d)-1+this.data.offsetScaleY)*a+1;x.c*=k,x.d*=k}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=x.c,E=x.d;A=Math.atan2(E,w)+(A-N.PI/2+g)*o;var k=Math.sqrt(w*w+E*E);x.c=Math.cos(A)*k,x.d=Math.sin(A)*k}b.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}(),SE=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}(hm),t1=function(){function t(e,r,n){this.slotIndex=e,this.name=r,this.attachment=n}return t}(),Ap=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 Ol(ct),oi=n.slots.length,o=0;o=0;l--)Xn[l]=-1;for(var ja=q.newArray(oi-Fo,0),Ii=0,Dr=0,l=0;l=0;l--)Xn[l]==-1&&(Xn[l]=ja[--Dr]);p.setFrame(o,m,Xn)}i.push(p)}var Ua=e.readInt(!0);if(Ua>0){for(var p=new fm(Ua),o=0;o=0;Mi--)ki[Mi]==-1&&(ki[Mi]=pa[--bu])}d.setFrame(p,Z(Ua,"time",0),ki)}a.push(d)}if(e.events){for(var d=new fm(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:Yu(),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:Yu(),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.alpha,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(Sn.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],()=>{const u=this.assetLoader.resources[o[n]].texture;if(!u)return;const l=u.width,c=u.height,f=this.stageWidth/l,h=this.stageHeight/c,d=Math.min(f,h),p=new Qn(u);p.scale.x=d,p.scale.y=d,p.anchor.set(.5),p.position.y=this.stageHeight/2;const v=l*d,g=c*d;a.setBaseY(this.stageHeight/2),g{const u=this.assetLoader.resources[o[n]].texture;if(!u)return;const l=u.width,c=u.height,f=this.stageWidth/l,h=this.stageHeight/c,d=Math.min(f,h),p=new Qn(u);p.scale.x=d,p.scale.y=d,p.anchor.set(.5),p.position.y=this.stageHeight/2;const v=l*d,g=c*d;a.setBaseY(this.stageHeight/2),gf.key===e)>=0&&this.removeStageObjectByKey(e),this.backgroundContainer.addChild(i);const s=Yu();this.backgroundObjects.push({uuid:s,key:e,pixiContainer:i,sourceUrl: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 Qn(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(e,r,n="center"){var c,f;const i=this.assetLoader,a=new ky;this.figureObjects.findIndex(h=>h.key===e)>=0&&this.removeStageObjectByKey(e),this.figureContainer.addChild(a);const u=Yu();this.figureObjects.push({uuid:u,key:e,pixiContainer:a,sourceUrl:r});const l=()=>{setTimeout(()=>{var d,p;const h=(p=(d=i.resources)==null?void 0:d[r])==null?void 0:p.texture;if(h&&this.getStageObjByUuid(u)){const v=h.width,g=h.height,m=this.stageWidth/v,y=this.stageHeight/g,_=Math.min(m,y),b=new Qn(h);b.scale.x=_,b.scale.y=_,b.anchor.set(.5),b.position.y=this.stageHeight/2;const x=v*_,S=g*_;a.setBaseY(this.stageHeight/2),Sh.key===e)>=0&&this.removeStageObjectByKey(e),this.figureContainer.addChild(o);const l=Yu();this.figureObjects.push({uuid:l,key:e,pixiContainer:o,sourceUrl:r});const c=()=>{var d;console.log(this.assetLoader.resources);const h=(d=this.assetLoader.resources)==null?void 0:d[i];setTimeout(()=>{var p;if(h&&this.getStageObjByUuid(l)){const v=new k0e(h.spineData),g=((p=h==null?void 0:h.spineData)==null?void 0:p.y)??0;console.log(v);const m=v.width,y=v.height,_=this.stageWidth/m,b=this.stageHeight/y;v.y=-(b*g)/2,console.log(v.state),v.state.setAnimation(0,"07",!0);const x=Math.min(_,b),S=new Qn;S.addChild(v),S.scale.x=x,S.scale.y=x,S.anchor.set(.5),S.position.y=this.stageHeight/2;const w=m*x,T=y*x;o.setBaseY(this.stageHeight/2),Ts.key===e),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),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){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(){WN()}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){Se.fatal("PIXI Loader 故障",r),e.callback(),this.callLoader()}}}updateFps(){Dy==null||Dy(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)}}const Dy=(()=>{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()})})()})}})(),F3={version:"WebGAL 4.4.13",contributors:[{username:"Mahiru",link:"https://github.com/MakinoharaShoko"},{username:"Hoshinokinya",link:"https://github.com/hshqwq"},{username:"Junbo Xiong",link:"https://github.com/C6H5-NO2"},{username:"lykl",link:"https://github.com/lykl"},{username:"SakuraSnow",link:"https://github.com/sliyoxn"},{username:"bcqsd",link:"https://github.com/bcqsd"},{username:"Yuji Sakai",link:"https://github.com/generalfreed"},{username:"Iara",link:"https://github.com/labiker"},{username:"22",link:"https://github.com/nini22P"},{username:"德布罗煜",link:"https://github.com/ch1ny"},{username:"Mike Zhou",link:"https://github.com/mikezzb"},{username:"Murasame0721",link:"https://github.com/Murasame0721"},{username:"loliko",link:"https://github.com/loliko114514"},{username:"IdrilK",link:"https://github.com/IdrilK"},{username:"callofblood",link:"https://github.com/callofblood"},{username:"lyle",link:"https://github.com/lylelove"}]},F0e=navigator.userAgent,SE=!!F0e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),N0e=()=>{Se.info(F3.version),Se.info("Github: https://github.com/OpenWebGAL/WebGAL "),Se.info("Made with ❤ by OpenWebGAL"),SE&&alert(`iOS 用户请横屏使用以获得最佳体验 +***************************************************************************** */var r1=function(t,e){return r1=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])},r1(t,e)};function M3(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r1(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var nr;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.VER37=37]="VER37",t[t.VER38=38]="VER38",t[t.VER40=40]="VER40",t[t.VER41=41]="VER41"})(nr||(nr={}));function Cp(t){var e=t.substr(0,3),r=Math.floor(+e*10+.001);return e==="3.7"?nr.VER37:e==="3.8"?nr.VER38:e==="4.0"?nr.VER40:e==="4.1"?nr.VER41:r{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:Yu(),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:Yu(),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.alpha,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(Sn.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],()=>{const u=this.assetLoader.resources[o[n]].texture;if(!u)return;const l=u.width,c=u.height,f=this.stageWidth/l,h=this.stageHeight/c,d=Math.min(f,h),p=new Qn(u);p.scale.x=d,p.scale.y=d,p.anchor.set(.5),p.position.y=this.stageHeight/2;const v=l*d,g=c*d;a.setBaseY(this.stageHeight/2),g{const u=this.assetLoader.resources[o[n]].texture;if(!u)return;const l=u.width,c=u.height,f=this.stageWidth/l,h=this.stageHeight/c,d=Math.min(f,h),p=new Qn(u);p.scale.x=d,p.scale.y=d,p.anchor.set(.5),p.position.y=this.stageHeight/2;const v=l*d,g=c*d;a.setBaseY(this.stageHeight/2),gf.key===e)>=0&&this.removeStageObjectByKey(e),this.backgroundContainer.addChild(i);const s=Yu();this.backgroundObjects.push({uuid:s,key:e,pixiContainer:i,sourceUrl: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 Qn(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(e,r,n="center"){var c,f;const i=this.assetLoader,a=new ky;this.figureObjects.findIndex(h=>h.key===e)>=0&&this.removeStageObjectByKey(e),this.figureContainer.addChild(a);const u=Yu();this.figureObjects.push({uuid:u,key:e,pixiContainer:a,sourceUrl:r});const l=()=>{setTimeout(()=>{var d,p;const h=(p=(d=i.resources)==null?void 0:d[r])==null?void 0:p.texture;if(h&&this.getStageObjByUuid(u)){const v=h.width,g=h.height,m=this.stageWidth/v,y=this.stageHeight/g,_=Math.min(m,y),b=new Qn(h);b.scale.x=_,b.scale.y=_,b.anchor.set(.5),b.position.y=this.stageHeight/2;const x=v*_,S=g*_;a.setBaseY(this.stageHeight/2),Sh.key===e)>=0&&this.removeStageObjectByKey(e),this.figureContainer.addChild(o);const l=Yu();this.figureObjects.push({uuid:l,key:e,pixiContainer:o,sourceUrl:r});const c=()=>{var d;console.log(this.assetLoader.resources);const h=(d=this.assetLoader.resources)==null?void 0:d[i];setTimeout(()=>{var p;if(h&&this.getStageObjByUuid(l)){const v=new k0e(h.spineData),g=((p=h==null?void 0:h.spineData)==null?void 0:p.y)??0;console.log(v);const m=v.width,y=v.height,_=this.stageWidth/m,b=this.stageHeight/y;v.y=-(b*g)/2,console.log(v.state),v.state.setAnimation(0,"07",!0);const x=Math.min(_,b),S=new Qn;S.addChild(v),S.scale.x=x,S.scale.y=x,S.anchor.set(.5),S.position.y=this.stageHeight/2;const w=m*x,T=y*x;o.setBaseY(this.stageHeight/2),Ts.key===e),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),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){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(){WN()}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){Se.fatal("PIXI Loader 故障",r),e.callback(),this.callLoader()}}}updateFps(){Dy==null||Dy(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)}}const Dy=(()=>{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()})})()})}})(),F3={version:"WebGAL 4.4.13",contributors:[{username:"Mahiru",link:"https://github.com/MakinoharaShoko"},{username:"Hoshinokinya",link:"https://github.com/hshqwq"},{username:"Junbo Xiong",link:"https://github.com/C6H5-NO2"},{username:"lykl",link:"https://github.com/lykl"},{username:"SakuraSnow",link:"https://github.com/sliyoxn"},{username:"bcqsd",link:"https://github.com/bcqsd"},{username:"Yuji Sakai",link:"https://github.com/generalfreed"},{username:"Iara",link:"https://github.com/labiker"},{username:"22",link:"https://github.com/nini22P"},{username:"德布罗煜",link:"https://github.com/ch1ny"},{username:"Mike Zhou",link:"https://github.com/mikezzb"},{username:"Murasame0721",link:"https://github.com/Murasame0721"},{username:"loliko",link:"https://github.com/loliko114514"},{username:"IdrilK",link:"https://github.com/IdrilK"},{username:"callofblood",link:"https://github.com/callofblood"},{username:"lyle",link:"https://github.com/lylelove"}]},F0e=navigator.userAgent,wE=!!F0e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),N0e=()=>{Se.info(F3.version),Se.info("Github: https://github.com/OpenWebGAL/WebGAL "),Se.info("Made with ❤ by OpenWebGAL"),wE&&alert(`iOS 用户请横屏使用以获得最佳体验 | Please use landscape mode on iOS for the best experience -| iOS ユーザーは横画面での使用をお勧めします`),L0e("./game/userStyleSheet.css"),D0e(),_se("./game/config.txt");const t=Nn("start.txt",Fn.scene);la(t).then(e=>{D.sceneManager.sceneData.currentScene=ua(e,"start.txt",t);const r=D.sceneManager.sceneData.currentScene.subSceneList;D.sceneManager.settledScenes.push(t);const n=jf(r);Uf(n)}),D.gameplay.pixiStage=new M0e,bse(),Sse()};function L0e(t){const e=document.createElement("link");e.type="text/css",e.rel="stylesheet",e.href=t,document.getElementsByTagName("head")[0].appendChild(e)}function D0e(){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};D.animationManager.addAnimation(i)}})})}const B0e="_Menu_main_1a7i6_1",j0e="_Menu_ShowSoftly_1a7i6_1",U0e="_Menu_TagContent_1a7i6_10",uO={Menu_main:B0e,Menu_ShowSoftly:j0e,Menu_TagContent:U0e},$0e="_MenuPanel_main_1c9ky_1",V0e="_MenuPanel_button_1c9ky_10",G0e="_MenuPanel_button_icon_1c9ky_38",X0e="_MenuPanel_button_hl_1c9ky_44",cl={MenuPanel_main:$0e,MenuPanel_button:V0e,MenuPanel_button_icon:G0e,MenuPanel_button_hl:X0e};var z0e=["size","strokeWidth","strokeLinecap","strokeLinejoin","theme","fill","className","spin"];function cO(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;e=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function H0e(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 q0e={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 K0e(){return"icon-"+((1+Math.random())*4294967296|0).toString(16).substring(1)}function Z0e(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 N3=ne.createContext(q0e);N3.Provider;function Nt(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=Y0e(n,z0e),d=ne.useContext(N3),p=ne.useMemo(K0e,[]),v=Z0e(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",fO(fO({},h),{},{className:g.join(" ")}),r(v))}}const Q0e=Nt("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}))}),L3=Nt("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}))}),J0e=Nt("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}))}),e_e=Nt("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}))}),t_e=Nt("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}))}),D3=Nt("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}))}),r_e=Nt("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}))}),n_e=Nt("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}))}),i_e=Nt("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}))}),B3=Nt("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}))}),a_e=Nt("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}))}),o_e=Nt("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}))}),s_e=Nt("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}))}),l_e=Nt("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}))}),j3=Nt("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}))}),u_e=Nt("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}))}),c_e=Nt("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}))}),f_e=Nt("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}))}),h_e=Nt("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}))}),U3=Nt("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}))}),$3=Nt("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}))}),d_e=Nt("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}))}),p_e=Nt("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}))}),v_e=Nt("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}))}),m_e=t=>{let e;switch(t.iconName){case"save":e=C.jsx(U3,{theme:"outline",size:"1.2em",fill:t.iconColor,strokeWidth:2});break;case"load":e=C.jsx(D3,{theme:"outline",size:"1.2em",fill:t.iconColor,strokeWidth:2});break;case"option":e=C.jsx($3,{theme:"outline",size:"1.2em",fill:t.iconColor,strokeWidth:2});break;case"title":e=C.jsx(B3,{theme:"outline",size:"1.2em",fill:t.iconColor,strokeWidth:2});break;case"exit":e=C.jsx(s_e,{theme:"outline",size:"1.2em",fill:t.iconColor,strokeWidth:2});break;default:e=C.jsx("div",{})}return e},Hu=t=>{const{playSePageChange:e,playSeEnter:r}=gn();let n=cl.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:cl.MenuPanel_button_icon,children:C.jsx(m_e,{iconName:t.iconName,iconColor:t.iconColor})}),t.tagName]})},wE=()=>{const t=te.dispatch;dS(),xS(),El(),t(Ge({key:"playVocal",value:""})),t(rt({component:"showTitle",visibility:!0})),Xf(te.getState().GUI.titleBg)},g_e="_GlobalDialog_main_101j8_2",y_e="_showGlobalDialog_101j8_1",__e="_glabalDialog_container_inner_101j8_17",x_e="_glabalDialog_container_101j8_17",b_e="_title_101j8_36",S_e="_button_list_101j8_41",w_e="_button_101j8_41",Uo={GlobalDialog_main:g_e,showGlobalDialog:y_e,glabalDialog_container_inner:__e,glabalDialog_container:x_e,title:b_e,button_list:S_e,button:w_e};function E_e(){const t=Le(e=>e.GUI.showGlobalDialog);return C.jsx(C.Fragment,{children:t&&C.jsx("div",{id:"globalDialogContainer"})})}function as(t){const{playSeClick:e,playSeEnter:r}=Jb();te.dispatch(rt({component:"showGlobalDialog",visibility:!0}));const n=()=>{e(),t.leftFunc(),hO()},i=()=>{e(),t.rightFunc(),hO()},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(()=>{Ji.render(a,document.getElementById("globalDialogContainer"))},100)}function hO(){te.dispatch(rt({component:"showGlobalDialog",visibility:!1}))}function T_e(){te.dispatch(rt({component:"showControls",visibility:!0}))}function A_e(){te.dispatch(rt({component:"showControls",visibility:!1}))}function C_e(){te.getState().GUI.showControls===!0?A_e():T_e()}const P_e=()=>{const t=Cn("menu."),{playSeClick:e,playSeDialogOpen:r,playSePageChange:n}=gn(),i=Le(v=>v.GUI),a=Mr(),o=i.currentMenuTag===vt.Save?` ${cl.MenuPanel_button_hl}`:"",s=i.currentMenuTag===vt.Load?` ${cl.MenuPanel_button_hl}`:"",u=i.currentMenuTag===vt.Option?` ${cl.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:cl.MenuPanel_main,children:[C.jsx(Hu,{iconName:"save",buttonOnClassName:o,iconColor:h,tagColor:l,clickFunc:()=>{n(),!i.showTitle&&a(ss(vt.Save))},tagName:t("saving.title")},"saveButton"),C.jsx(Hu,{iconName:"load",buttonOnClassName:s,iconColor:d,tagColor:c,clickFunc:()=>{n(),a(ss(vt.Load))},tagName:t("loadSaving.title")},"loadButton"),C.jsx(Hu,{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:()=>{wE(),a(rt({component:"showMenuPanel",visibility:!1}))},rightFunc:()=>{}})},tagName:t("title.title")},"titleIcon"),C.jsx(Hu,{iconName:"option",style:{marginLeft:"auto"},buttonOnClassName:u,iconColor:p,tagColor:f,clickFunc:()=>{n(),a(ss(vt.Option))},tagName:t("options.title")},"optionButton"),C.jsx(Hu,{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")]})},O_e="_Save_Load_main_a3o8b_2",R_e="_Save_Load_top_a3o8b_9",I_e="_Elements_in_a3o8b_1",k_e="_Save_Load_title_a3o8b_17",M_e="_Save_title_text_a3o8b_35",F_e="_Load_title_text_a3o8b_43",N_e="_Save_Load_top_buttonList_a3o8b_51",L_e="_Save_Load_top_button_a3o8b_51",D_e="_Save_Load_top_button_text_a3o8b_69",B_e="_Save_Load_top_button_on_a3o8b_80",j_e="_Load_top_button_on_a3o8b_93",U_e="_Load_top_button_a3o8b_93",$_e="_Save_Load_content_a3o8b_106",V_e="_Save_Load_content_element_a3o8b_115",G_e="_Elements_in_transform_a3o8b_1",X_e="_Save_Load_content_element_top_a3o8b_131",z_e="_Save_Load_content_element_top_index_a3o8b_138",W_e="_Load_content_elememt_top_index_a3o8b_147",Y_e="_Save_Load_content_element_top_date_a3o8b_151",H_e="_Load_content_element_top_date_a3o8b_162",q_e="_Save_Load_content_text_a3o8b_166",K_e="_Save_Load_content_text_padding_a3o8b_180",Z_e="_Save_Load_content_speaker_a3o8b_184",Q_e="_Load_content_speaker_a3o8b_193",J_e="_Load_content_text_a3o8b_197",exe="_Save_Load_content_miniRen_a3o8b_201",txe="_Save_Load_content_miniRen_bg_a3o8b_208",rxe="_Save_Load_content_miniRen_figure_a3o8b_215",nxe="_Save_Load_content_miniRen_figLeft_a3o8b_223",ixe="_Save_Load_content_miniRen_figRight_a3o8b_228",Ue={Save_Load_main:O_e,Save_Load_top:R_e,Elements_in:I_e,Save_Load_title:k_e,Save_title_text:M_e,Load_title_text:F_e,Save_Load_top_buttonList:N_e,Save_Load_top_button:L_e,Save_Load_top_button_text:D_e,Save_Load_top_button_on:B_e,Load_top_button_on:j_e,Load_top_button:U_e,Save_Load_content:$_e,Save_Load_content_element:V_e,Elements_in_transform:G_e,Save_Load_content_element_top:X_e,Save_Load_content_element_top_index:z_e,Load_content_elememt_top_index:W_e,Save_Load_content_element_top_date:Y_e,Load_content_element_top_date:H_e,Save_Load_content_text:q_e,Save_Load_content_text_padding:K_e,Save_Load_content_speaker:Z_e,Load_content_speaker:Q_e,Load_content_text:J_e,Save_Load_content_miniRen:exe,Save_Load_content_miniRen_bg:txe,Save_Load_content_miniRen_figure:rxe,Save_Load_content_miniRen_figLeft:nxe,Save_Load_content_miniRen_figRight:ixe},axe=()=>{const{playSePageChange:t,playSeEnter:e,playSeDialogOpen:r}=gn(),n=Le(d=>d.userData),i=Le(d=>d.saveData),a=Mr(),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(Ik(d)),ut(),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=Cn("common."),u=[],l=(n.optionData.slPage-1)*10+1,c=l+9;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:()=>{r_(d),ut()},rightFunc:()=>{}})):(t(),r_(d))},onMouseEnter:e,className:Ue.Save_Load_content_element,style:{animationDelay:`${f*30}ms`},children:v},"saveElement_"+d);u.push(g)}const h=Cn("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})]})},oxe=()=>{const{playSeClick:t,playSeEnter:e,playSePageChange:r}=gn(),n=Le(h=>h.userData),i=Le(h=>h.saveData),a=Mr(),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(Ik(h)),ut(),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(()=>{DF(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:()=>{NF(h),t()},onMouseEnter:e,className:Ue.Save_Load_content_element,style:{animationDelay:`${c*30}ms`},children:p},"loadElement_"+h);s.push(v)}const f=Cn("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})]})},sxe="_Options_main_u5orq_2",lxe="_Options_top_u5orq_9",uxe="_Options_title_u5orq_16",cxe="_Option_title_text_u5orq_25",fxe="_Elements_in_u5orq_1",hxe="_Option_title_text_shadow_u5orq_34",dxe="_Option_title_text_ts_u5orq_41",pxe="_Options_main_content_u5orq_48",vxe="_Options_main_content_half_u5orq_55",mxe="_About_title_text_u5orq_65",gxe="_About_text_u5orq_73",yxe="_Options_page_container_u5orq_92",_xe="_Options_button_list_u5orq_98",xxe="_Options_page_button_u5orq_102",bxe="_Options_page_button_active_u5orq_114",ln={Options_main:sxe,Options_top:lxe,Options_title:uxe,Option_title_text:cxe,Elements_in:fxe,Option_title_text_shadow:hxe,Option_title_text_ts:dxe,Options_main_content:pxe,Options_main_content_half:vxe,About_title_text:mxe,About_text:gxe,Options_page_container:yxe,Options_button_list:_xe,Options_page_button:xxe,Options_page_button_active:bxe},Sxe="_NormalOption_ogzuv_1",wxe="_Elements_in_ogzuv_1",Exe="_NormalOption_title_ogzuv_10",Txe="_NormalOption_title_bef_ogzuv_19",Axe="_NormalOption_title_sd_ogzuv_29",Cxe="_NormalOption_buttonList_ogzuv_39",By={NormalOption:Sxe,Elements_in:wxe,NormalOption_title:Exe,NormalOption_title_bef:Txe,NormalOption_title_sd:Axe,NormalOption_buttonList:Cxe},Kr=t=>C.jsxs("div",{className:By.NormalOption,style:{width:t.full?"100%":"auto"},children:[C.jsx("div",{className:By.NormalOption_title,children:t.title}),C.jsx("div",{className:By.NormalOption_buttonList,style:{width:t.full?"100%":"auto"},children:t.children})]}),Pxe="_NormalButton_1qk3b_1",Oxe="_NormalButtonChecked_1qk3b_18",jy={NormalButton:Pxe,NormalButtonChecked:Oxe},Ia=t=>{const e=t.textList.length,r=[],{playSeEnter:n,playSeSwitch:i}=gn();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:jy.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 Rxe(t){return Rs[t]}function V3(){const{i18n:t}=$v(),e=hu(n=>n.userData),r=Mr();return(n,i=!0)=>{var s;const a=n??((s=e.current)==null?void 0:s.optionData.language)??Rs.zhCn,o=Rxe(a);t.changeLanguage(o),r(At({key:"language",value:a})),Se.info("设置语言: "+o),window==null||window.localStorage.setItem("lang",a.toString()),i&&ut()}}const Ixe="_backButton_qbk37_1",kxe="_about_qbk37_16",Mxe="_icon_qbk37_20",Fxe="_title_qbk37_24",Nxe="_text_qbk37_34",Lxe="_contributor_qbk37_43",Wn={backButton:Ixe,about:kxe,icon:Mxe,title:Fxe,text:Nxe,contributor:Lxe};function Dxe(t){const e=Cn("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(a_e,{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:F3.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 Bxe(){const t=Le(h=>h.userData),e=Le(h=>h.saveData),r=Mr(),n=V3(),i=Cn("menu.options.pages.system.options."),{playSeDialogOpen:a}=gn();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 Ps.setItem(D.gameKey,m.userData).then(()=>{Se.info(i("gameSave.dialogs.import.tip"))}),Kc(),te.dispatch(Oa.replaceSaveGame(m.saves.saveData)),te.dispatch(Oa.setFastSave(m.saves.quickSaveData)),fd(),cd(0,200)},rightFunc:()=>{}})}catch(m){Se.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:ln.Options_main_content_half,children:[l&&C.jsx(Dxe,{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(At({key:"autoSpeed",value:fn.slow})),ut()},()=>{r(At({key:"autoSpeed",value:fn.normal})),ut()},()=>{r(At({key:"autoSpeed",value:fn.fast})),ut()}],currentChecked:t.optionData.autoSpeed})},"option1"),C.jsx(Kr,{title:i("language.title"),children:C.jsx(Ia,{currentChecked:t.optionData.language,textList:Object.values(Jd),functionList:Object.keys(Jd).map(h=>()=>n(Rs[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()),cd(0,200),fd()},rightFunc:()=>{}})},()=>{a(),as({title:i("resetData.dialogs.resetSettings"),leftText:i("$common.yes"),rightText:i("$common.no"),leftFunc:()=>{r(Hz()),ip()},rightFunc:()=>{}})},()=>{a(),as({title:i("resetData.dialogs.clearAll"),leftText:i("$common.yes"),rightText:i("$common.no"),leftFunc:()=>{r(qz()),ip(),r(Oa.resetSaves()),cd(0,200),fd()},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:ln.About_title_text,onClick:f,children:C.jsx("span",{className:ln.About_text,children:i("about.title")})})]})]})}const jxe="_textPreviewMain_nolr3_1",Uxe="_textbox_nolr3_8",dO={textPreviewMain:jxe,textbox:Uxe};function G3(){const t=Le(r=>r.userData.optionData.textboxFont);function e(){return jv(t).with(Ki.song,()=>'"思源宋体", serif').with(Ki.lxgw,()=>'"LXGW", serif').with(Ki.hei,()=>'"WebgalUI", serif').default(()=>'"WebgalUI", serif')}return e()}function n1(t){switch(t){case 0:return 150;case 1:return 205;case 2:return 240;default:return 205}}const $xe="_TextBox_EventHandler_eezpc_1",Vxe="_TextBox_main_eezpc_9",Gxe="_showSoftly_eezpc_1",Xxe="_TextBox_textElement_start_eezpc_39",zxe="_TextDelayShow_eezpc_1",Wxe="_outer_eezpc_45",Yxe="_inner_eezpc_57",Hxe="_zhanwei_eezpc_66",qxe="_TextBox_textElement_Settled_eezpc_71",Kxe="_TextBox_showName_eezpc_76",Zxe="_miniAvatarContainer_eezpc_95",Qxe="_miniAvatarImg_eezpc_105",Jxe="_nameContainer_eezpc_113",e1e="_outerName_eezpc_119",t1e="_innerName_eezpc_130",r1e="_text_eezpc_137",Br={TextBox_EventHandler:$xe,TextBox_main:Vxe,showSoftly:Gxe,TextBox_textElement_start:Xxe,TextDelayShow:zxe,outer:Wxe,inner:Yxe,zhanwei:Hxe,TextBox_textElement_Settled:qxe,TextBox_showName:Kxe,miniAvatarContainer:Zxe,miniAvatarImg:Qxe,nameContainer:Jxe,outerName:e1e,innerName:t1e,text:r1e};function X3(t){const{textArray:e,textDelay:r,currentConcatDialogPrev:n,currentDialogKey:i,isText:a,isSafari:o,isFirefox:s,fontSize:u,miniAvatar:l,showName:c,font:f,textDuration:h,isUseStroke:d,textboxOpacity:p}=t,v=aN("Stage/TextBox/textbox.scss");ne.useEffect(()=>{function y(){[...document.querySelectorAll(".Textelement_start")].forEach(x=>{x.className=v("TextBox_textElement_Settled",Br.TextBox_textElement_Settled)})}return D.events.textSettle.on(y),()=>{D.events.textSettle.off(y)}},[]);let g=0;const m=e.map((y,_)=>{const b=y.map((x,S)=>{let w=g*r;g++;let T=n.length;return n!==""&&S>=T&&(w=w-T*r),S{D.sceneManager.sceneData.currentScene=ua(e,"start.txt",t);const r=D.sceneManager.sceneData.currentScene.subSceneList;D.sceneManager.settledScenes.push(t);const n=jf(r);Uf(n)}),D.gameplay.pixiStage=new M0e,bse(),Sse()};function L0e(t){const e=document.createElement("link");e.type="text/css",e.rel="stylesheet",e.href=t,document.getElementsByTagName("head")[0].appendChild(e)}function D0e(){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};D.animationManager.addAnimation(i)}})})}const B0e="_Menu_main_1a7i6_1",j0e="_Menu_ShowSoftly_1a7i6_1",U0e="_Menu_TagContent_1a7i6_10",cO={Menu_main:B0e,Menu_ShowSoftly:j0e,Menu_TagContent:U0e},$0e="_MenuPanel_main_1c9ky_1",V0e="_MenuPanel_button_1c9ky_10",G0e="_MenuPanel_button_icon_1c9ky_38",X0e="_MenuPanel_button_hl_1c9ky_44",cl={MenuPanel_main:$0e,MenuPanel_button:V0e,MenuPanel_button_icon:G0e,MenuPanel_button_hl:X0e};var z0e=["size","strokeWidth","strokeLinecap","strokeLinejoin","theme","fill","className","spin"];function fO(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 hO(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function H0e(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 q0e={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 K0e(){return"icon-"+((1+Math.random())*4294967296|0).toString(16).substring(1)}function Z0e(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 N3=ne.createContext(q0e);N3.Provider;function Nt(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=Y0e(n,z0e),d=ne.useContext(N3),p=ne.useMemo(K0e,[]),v=Z0e(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",hO(hO({},h),{},{className:g.join(" ")}),r(v))}}const Q0e=Nt("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}))}),L3=Nt("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}))}),J0e=Nt("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}))}),e_e=Nt("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}))}),t_e=Nt("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}))}),D3=Nt("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}))}),r_e=Nt("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}))}),n_e=Nt("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}))}),i_e=Nt("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}))}),B3=Nt("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}))}),a_e=Nt("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}))}),o_e=Nt("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}))}),s_e=Nt("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}))}),l_e=Nt("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}))}),j3=Nt("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}))}),u_e=Nt("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}))}),c_e=Nt("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}))}),f_e=Nt("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}))}),h_e=Nt("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}))}),U3=Nt("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}))}),$3=Nt("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}))}),d_e=Nt("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}))}),p_e=Nt("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}))}),v_e=Nt("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}))}),m_e=t=>{let e;switch(t.iconName){case"save":e=C.jsx(U3,{theme:"outline",size:"1.2em",fill:t.iconColor,strokeWidth:2});break;case"load":e=C.jsx(D3,{theme:"outline",size:"1.2em",fill:t.iconColor,strokeWidth:2});break;case"option":e=C.jsx($3,{theme:"outline",size:"1.2em",fill:t.iconColor,strokeWidth:2});break;case"title":e=C.jsx(B3,{theme:"outline",size:"1.2em",fill:t.iconColor,strokeWidth:2});break;case"exit":e=C.jsx(s_e,{theme:"outline",size:"1.2em",fill:t.iconColor,strokeWidth:2});break;default:e=C.jsx("div",{})}return e},Hu=t=>{const{playSePageChange:e,playSeEnter:r}=gn();let n=cl.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:cl.MenuPanel_button_icon,children:C.jsx(m_e,{iconName:t.iconName,iconColor:t.iconColor})}),t.tagName]})},EE=()=>{const t=te.dispatch;dS(),bS(),El(),t(Ge({key:"playVocal",value:""})),t(rt({component:"showTitle",visibility:!0})),Xf(te.getState().GUI.titleBg)},g_e="_GlobalDialog_main_101j8_2",y_e="_showGlobalDialog_101j8_1",__e="_glabalDialog_container_inner_101j8_17",x_e="_glabalDialog_container_101j8_17",b_e="_title_101j8_36",S_e="_button_list_101j8_41",w_e="_button_101j8_41",Uo={GlobalDialog_main:g_e,showGlobalDialog:y_e,glabalDialog_container_inner:__e,glabalDialog_container:x_e,title:b_e,button_list:S_e,button:w_e};function E_e(){const t=Le(e=>e.GUI.showGlobalDialog);return C.jsx(C.Fragment,{children:t&&C.jsx("div",{id:"globalDialogContainer"})})}function as(t){const{playSeClick:e,playSeEnter:r}=Jb();te.dispatch(rt({component:"showGlobalDialog",visibility:!0}));const n=()=>{e(),t.leftFunc(),dO()},i=()=>{e(),t.rightFunc(),dO()},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(()=>{Ji.render(a,document.getElementById("globalDialogContainer"))},100)}function dO(){te.dispatch(rt({component:"showGlobalDialog",visibility:!1}))}function T_e(){te.dispatch(rt({component:"showControls",visibility:!0}))}function A_e(){te.dispatch(rt({component:"showControls",visibility:!1}))}function C_e(){te.getState().GUI.showControls===!0?A_e():T_e()}const P_e=()=>{const t=Cn("menu."),{playSeClick:e,playSeDialogOpen:r,playSePageChange:n}=gn(),i=Le(v=>v.GUI),a=Mr(),o=i.currentMenuTag===vt.Save?` ${cl.MenuPanel_button_hl}`:"",s=i.currentMenuTag===vt.Load?` ${cl.MenuPanel_button_hl}`:"",u=i.currentMenuTag===vt.Option?` ${cl.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:cl.MenuPanel_main,children:[C.jsx(Hu,{iconName:"save",buttonOnClassName:o,iconColor:h,tagColor:l,clickFunc:()=>{n(),!i.showTitle&&a(ss(vt.Save))},tagName:t("saving.title")},"saveButton"),C.jsx(Hu,{iconName:"load",buttonOnClassName:s,iconColor:d,tagColor:c,clickFunc:()=>{n(),a(ss(vt.Load))},tagName:t("loadSaving.title")},"loadButton"),C.jsx(Hu,{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:()=>{EE(),a(rt({component:"showMenuPanel",visibility:!1}))},rightFunc:()=>{}})},tagName:t("title.title")},"titleIcon"),C.jsx(Hu,{iconName:"option",style:{marginLeft:"auto"},buttonOnClassName:u,iconColor:p,tagColor:f,clickFunc:()=>{n(),a(ss(vt.Option))},tagName:t("options.title")},"optionButton"),C.jsx(Hu,{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")]})},O_e="_Save_Load_main_a3o8b_2",R_e="_Save_Load_top_a3o8b_9",I_e="_Elements_in_a3o8b_1",k_e="_Save_Load_title_a3o8b_17",M_e="_Save_title_text_a3o8b_35",F_e="_Load_title_text_a3o8b_43",N_e="_Save_Load_top_buttonList_a3o8b_51",L_e="_Save_Load_top_button_a3o8b_51",D_e="_Save_Load_top_button_text_a3o8b_69",B_e="_Save_Load_top_button_on_a3o8b_80",j_e="_Load_top_button_on_a3o8b_93",U_e="_Load_top_button_a3o8b_93",$_e="_Save_Load_content_a3o8b_106",V_e="_Save_Load_content_element_a3o8b_115",G_e="_Elements_in_transform_a3o8b_1",X_e="_Save_Load_content_element_top_a3o8b_131",z_e="_Save_Load_content_element_top_index_a3o8b_138",W_e="_Load_content_elememt_top_index_a3o8b_147",Y_e="_Save_Load_content_element_top_date_a3o8b_151",H_e="_Load_content_element_top_date_a3o8b_162",q_e="_Save_Load_content_text_a3o8b_166",K_e="_Save_Load_content_text_padding_a3o8b_180",Z_e="_Save_Load_content_speaker_a3o8b_184",Q_e="_Load_content_speaker_a3o8b_193",J_e="_Load_content_text_a3o8b_197",exe="_Save_Load_content_miniRen_a3o8b_201",txe="_Save_Load_content_miniRen_bg_a3o8b_208",rxe="_Save_Load_content_miniRen_figure_a3o8b_215",nxe="_Save_Load_content_miniRen_figLeft_a3o8b_223",ixe="_Save_Load_content_miniRen_figRight_a3o8b_228",Ue={Save_Load_main:O_e,Save_Load_top:R_e,Elements_in:I_e,Save_Load_title:k_e,Save_title_text:M_e,Load_title_text:F_e,Save_Load_top_buttonList:N_e,Save_Load_top_button:L_e,Save_Load_top_button_text:D_e,Save_Load_top_button_on:B_e,Load_top_button_on:j_e,Load_top_button:U_e,Save_Load_content:$_e,Save_Load_content_element:V_e,Elements_in_transform:G_e,Save_Load_content_element_top:X_e,Save_Load_content_element_top_index:z_e,Load_content_elememt_top_index:W_e,Save_Load_content_element_top_date:Y_e,Load_content_element_top_date:H_e,Save_Load_content_text:q_e,Save_Load_content_text_padding:K_e,Save_Load_content_speaker:Z_e,Load_content_speaker:Q_e,Load_content_text:J_e,Save_Load_content_miniRen:exe,Save_Load_content_miniRen_bg:txe,Save_Load_content_miniRen_figure:rxe,Save_Load_content_miniRen_figLeft:nxe,Save_Load_content_miniRen_figRight:ixe},axe=()=>{const{playSePageChange:t,playSeEnter:e,playSeDialogOpen:r}=gn(),n=Le(d=>d.userData),i=Le(d=>d.saveData),a=Mr(),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(kk(d)),ut(),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=Cn("common."),u=[],l=(n.optionData.slPage-1)*10+1,c=l+9;ne.useEffect(()=>{vS(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:()=>{r_(d),ut()},rightFunc:()=>{}})):(t(),r_(d))},onMouseEnter:e,className:Ue.Save_Load_content_element,style:{animationDelay:`${f*30}ms`},children:v},"saveElement_"+d);u.push(g)}const h=Cn("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})]})},oxe=()=>{const{playSeClick:t,playSeEnter:e,playSePageChange:r}=gn(),n=Le(h=>h.userData),i=Le(h=>h.saveData),a=Mr(),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(kk(h)),ut(),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(()=>{vS(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:()=>{LF(h),t()},onMouseEnter:e,className:Ue.Save_Load_content_element,style:{animationDelay:`${c*30}ms`},children:p},"loadElement_"+h);s.push(v)}const f=Cn("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})]})},sxe="_Options_main_u5orq_2",lxe="_Options_top_u5orq_9",uxe="_Options_title_u5orq_16",cxe="_Option_title_text_u5orq_25",fxe="_Elements_in_u5orq_1",hxe="_Option_title_text_shadow_u5orq_34",dxe="_Option_title_text_ts_u5orq_41",pxe="_Options_main_content_u5orq_48",vxe="_Options_main_content_half_u5orq_55",mxe="_About_title_text_u5orq_65",gxe="_About_text_u5orq_73",yxe="_Options_page_container_u5orq_92",_xe="_Options_button_list_u5orq_98",xxe="_Options_page_button_u5orq_102",bxe="_Options_page_button_active_u5orq_114",ln={Options_main:sxe,Options_top:lxe,Options_title:uxe,Option_title_text:cxe,Elements_in:fxe,Option_title_text_shadow:hxe,Option_title_text_ts:dxe,Options_main_content:pxe,Options_main_content_half:vxe,About_title_text:mxe,About_text:gxe,Options_page_container:yxe,Options_button_list:_xe,Options_page_button:xxe,Options_page_button_active:bxe},Sxe="_NormalOption_ogzuv_1",wxe="_Elements_in_ogzuv_1",Exe="_NormalOption_title_ogzuv_10",Txe="_NormalOption_title_bef_ogzuv_19",Axe="_NormalOption_title_sd_ogzuv_29",Cxe="_NormalOption_buttonList_ogzuv_39",By={NormalOption:Sxe,Elements_in:wxe,NormalOption_title:Exe,NormalOption_title_bef:Txe,NormalOption_title_sd:Axe,NormalOption_buttonList:Cxe},Kr=t=>C.jsxs("div",{className:By.NormalOption,style:{width:t.full?"100%":"auto"},children:[C.jsx("div",{className:By.NormalOption_title,children:t.title}),C.jsx("div",{className:By.NormalOption_buttonList,style:{width:t.full?"100%":"auto"},children:t.children})]}),Pxe="_NormalButton_1qk3b_1",Oxe="_NormalButtonChecked_1qk3b_18",jy={NormalButton:Pxe,NormalButtonChecked:Oxe},Ia=t=>{const e=t.textList.length,r=[],{playSeEnter:n,playSeSwitch:i}=gn();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:jy.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 Rxe(t){return Rs[t]}function V3(){const{i18n:t}=$v(),e=hu(n=>n.userData),r=Mr();return(n,i=!0)=>{var s;const a=n??((s=e.current)==null?void 0:s.optionData.language)??Rs.zhCn,o=Rxe(a);t.changeLanguage(o),r(At({key:"language",value:a})),Se.info("设置语言: "+o),window==null||window.localStorage.setItem("lang",a.toString()),i&&ut()}}const Ixe="_backButton_qbk37_1",kxe="_about_qbk37_16",Mxe="_icon_qbk37_20",Fxe="_title_qbk37_24",Nxe="_text_qbk37_34",Lxe="_contributor_qbk37_43",Wn={backButton:Ixe,about:kxe,icon:Mxe,title:Fxe,text:Nxe,contributor:Lxe};function Dxe(t){const e=Cn("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(a_e,{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:F3.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 Bxe(){const t=Le(h=>h.userData),e=Le(h=>h.saveData),r=Mr(),n=V3(),i=Cn("menu.options.pages.system.options."),{playSeDialogOpen:a}=gn();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 Ps.setItem(D.gameKey,m.userData).then(()=>{Se.info(i("gameSave.dialogs.import.tip"))}),Kc(),te.dispatch(Oa.replaceSaveGame(m.saves.saveData)),te.dispatch(Oa.setFastSave(m.saves.quickSaveData)),fd(),cd(0,200)},rightFunc:()=>{}})}catch(m){Se.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:ln.Options_main_content_half,children:[l&&C.jsx(Dxe,{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(At({key:"autoSpeed",value:fn.slow})),ut()},()=>{r(At({key:"autoSpeed",value:fn.normal})),ut()},()=>{r(At({key:"autoSpeed",value:fn.fast})),ut()}],currentChecked:t.optionData.autoSpeed})},"option1"),C.jsx(Kr,{title:i("language.title"),children:C.jsx(Ia,{currentChecked:t.optionData.language,textList:Object.values(Jd),functionList:Object.keys(Jd).map(h=>()=>n(Rs[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()),cd(0,200),fd()},rightFunc:()=>{}})},()=>{a(),as({title:i("resetData.dialogs.resetSettings"),leftText:i("$common.yes"),rightText:i("$common.no"),leftFunc:()=>{r(Hz()),ip()},rightFunc:()=>{}})},()=>{a(),as({title:i("resetData.dialogs.clearAll"),leftText:i("$common.yes"),rightText:i("$common.no"),leftFunc:()=>{r(qz()),ip(),r(Oa.resetSaves()),cd(0,200),fd()},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:ln.About_title_text,onClick:f,children:C.jsx("span",{className:ln.About_text,children:i("about.title")})})]})]})}const jxe="_textPreviewMain_nolr3_1",Uxe="_textbox_nolr3_8",pO={textPreviewMain:jxe,textbox:Uxe};function G3(){const t=Le(r=>r.userData.optionData.textboxFont);function e(){return jv(t).with(Ki.song,()=>'"思源宋体", serif').with(Ki.lxgw,()=>'"LXGW", serif').with(Ki.hei,()=>'"WebgalUI", serif').default(()=>'"WebgalUI", serif')}return e()}function n1(t){switch(t){case 0:return 150;case 1:return 205;case 2:return 240;default:return 205}}const $xe="_TextBox_EventHandler_eezpc_1",Vxe="_TextBox_main_eezpc_9",Gxe="_showSoftly_eezpc_1",Xxe="_TextBox_textElement_start_eezpc_39",zxe="_TextDelayShow_eezpc_1",Wxe="_outer_eezpc_45",Yxe="_inner_eezpc_57",Hxe="_zhanwei_eezpc_66",qxe="_TextBox_textElement_Settled_eezpc_71",Kxe="_TextBox_showName_eezpc_76",Zxe="_miniAvatarContainer_eezpc_95",Qxe="_miniAvatarImg_eezpc_105",Jxe="_nameContainer_eezpc_113",e1e="_outerName_eezpc_119",t1e="_innerName_eezpc_130",r1e="_text_eezpc_137",Br={TextBox_EventHandler:$xe,TextBox_main:Vxe,showSoftly:Gxe,TextBox_textElement_start:Xxe,TextDelayShow:zxe,outer:Wxe,inner:Yxe,zhanwei:Hxe,TextBox_textElement_Settled:qxe,TextBox_showName:Kxe,miniAvatarContainer:Zxe,miniAvatarImg:Qxe,nameContainer:Jxe,outerName:e1e,innerName:t1e,text:r1e};function X3(t){const{textArray:e,textDelay:r,currentConcatDialogPrev:n,currentDialogKey:i,isText:a,isSafari:o,isFirefox:s,fontSize:u,miniAvatar:l,showName:c,font:f,textDuration:h,isUseStroke:d,textboxOpacity:p}=t,v=aN("Stage/TextBox/textbox.scss");ne.useEffect(()=>{function y(){[...document.querySelectorAll(".Textelement_start")].forEach(x=>{x.className=v("TextBox_textElement_Settled",Br.TextBox_textElement_Settled)})}return D.events.textSettle.on(y),()=>{D.events.textSettle.off(y)}},[]);let g=0;const m=e.map((y,_)=>{const b=y.map((x,S)=>{let w=g*r;g++;let T=n.length;return n!==""&&S>=T&&(w=w-T*r),SC.jsx("span",{style:{position:"relative"},children:C.jsxs("span",{className:Br.zhanwei,children:[y,C.jsx("span",{className:v("outerName",Br.outerName),children:y}),d&&C.jsx("span",{className:v("innerName",Br.innerName),children:y})]})},y+_))},c),C.jsx("div",{className:v("text",Br.text),style:{fontSize:u,flexFlow:"column",overflow:"hidden",paddingLeft:"0.1em"},children:m})]})})}const z3=navigator.userAgent,n1e=/firefox/i.test(z3),i1e=/^((?!chrome|android).)*safari/i.test(z3),a1e=()=>{const[t,e]=ne.useState(!0);ne.useEffect(()=>{const y=()=>{const x=window.innerHeight,S=window.innerWidth,w=x/1440,T=S/2560,E=S/1440,A=x/2560;[w,T,E,A].forEach(O=>{O<=.2?e(!1):e(!0)})};return window.addEventListener("resize",y),y(),()=>{window.removeEventListener("resize",y)}},[]);const r=Le(y=>y.stage),n=Le(y=>y.userData),i=rS(n.optionData.textSpeed),a=lF(n.optionData.textSpeed);let o=n1(n.optionData.textSize)+"%";const s=G3(),u=r.showText!==""||r.showName!=="";let l=n.optionData.textSize;u&&r.showTextSize!==-1&&(o=n1(r.showTextSize)+"%",l=r.showTextSize);const c=jv(n.optionData.textSize).with(_i.small,()=>3).with(_i.medium,()=>2).with(_i.large,()=>2).default(()=>2),f=EE(r.showText,c),h=r.showName,d=r.currentConcatDialogPrev,p=r.currentDialogKey,v=r.miniAvatar,g=n.optionData.textboxOpacity,m=X3;return C.jsx(m,{textArray:f,isText:u,textDelay:i,showName:h,currentConcatDialogPrev:d,fontSize:o,currentDialogKey:p,isSafari:i1e,isFirefox:n1e,miniAvatar:v,textDuration:a,font:s,textSizeState:l,lineLimit:c,isUseStroke:t,textboxOpacity:g})};function pO(t){return!!t.match(/[\u4e00-\u9fa5]|[\u0800-\u4e00]|[\uac00-\ud7ff]/)}function EE(t,e,r){return t.split("|").map(o=>s1e(o)).map(o=>{const s=[];return o.forEach((u,l)=>{jv(u.type).with("SegmentType.String",()=>{const c=o1e(u.value);s.push(...c)}).endsWith("SegmentType.Link",()=>{const c=u.value,f=C.jsxs("ruby",{children:[c.text,C.jsx("rt",{children:c.link})]},l+c.text);s.push(f)})}),s}).slice(0,r?void 0:e)}function o1e(t){if(!t)return[];const e=[];let r="",n=pO(t[0]);const i=a=>/[!-\/:-@\[-`{-~\u2000-\u206F\u3000-\u303F\uff00-\uffef]/g.test(a);for(const a of t)if(a===" ")r&&(e.push(r),r=""),e.push(" "),n=!1;else if(pO(a)&&!i(a))!n&&r&&(e.push(r),r=""),e.push(a),n=!0;else{if(i(a)){r?(r+=a,e.push(r),r=""):e.length>0?e[e.length-1]+=a:e.push(a);continue}n&&r&&(e.push(r),r=""),r+=a,n=!1}return r&&e.push(r),e}function s1e(t){const e=/(\[(.*?)\]\((.*?)\))|([^\[\]]+)/g,r=[];let n;for(;(n=e.exec(t))!==null;)if(n[1]){const i=n[2],a=n[3];r.push({type:"SegmentType.Link",value:{text:i,link:a}})}else{const i=n[0];r.push({type:"SegmentType.String",value:i})}return r}const l1e=t=>{const e=Cn("menu.options.pages.display.options."),r=Le(m=>m.userData),i=Le(m=>m.stage).bgName,a=rS(r.optionData.textSpeed),o=lF(r.optionData.textSpeed),s=r.optionData.textboxOpacity,u=n1(r.optionData.textSize)+"%",l=G3(),c=navigator.userAgent,f=/firefox/i.test(c),h=/^((?!chrome|android).)*safari/i.test(c),d=e("textPreview.text"),p=EE(d,3),v=X3,g={textArray:p,isText:!0,textDelay:a,showName:e("textPreview.title"),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:dO.textPreviewMain,style:{background:i?`bottom / cover no-repeat url(${i})`:"rgba(0, 0, 0, 0.1)"},children:C.jsx("div",{className:dO.textbox,children:C.jsx(v,{...g})},`previewTextbox-${a}`)})};const Js=t=>{const{playSeEnter:e}=gn();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 u1e(){const t=Le(n=>n.userData),e=Mr(),r=Cn("menu.options.pages.display.options.");return C.jsxs("div",{className:ln.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(At({key:"fullScreen",value:Zi.on})),ut()},()=>{e(At({key:"fullScreen",value:Zi.off})),ut()}],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(At({key:"textSpeed",value:fn.slow})),ut()},()=>{e(At({key:"textSpeed",value:fn.normal})),ut()},()=>{e(At({key:"textSpeed",value:fn.fast})),ut()}],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(At({key:"textSize",value:_i.small})),ut()},()=>{e(At({key:"textSize",value:_i.medium})),ut()},()=>{e(At({key:"textSize",value:_i.large})),ut()}],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(At({key:"textboxFont",value:Ki.song})),ut()},()=>{e(At({key:"textboxFont",value:Ki.hei})),ut()},()=>{e(At({key:"textboxFont",value:Ki.lxgw})),ut()}],currentChecked:t.optionData.textboxFont})},"textFont"),C.jsx(Kr,{title:r("textboxOpacity.title"),children:C.jsx(Js,{initValue:t.optionData.textboxOpacity,uniqueID:r("textboxOpacity.title"),onChange:n=>{const i=n.target.value;e(At({key:"textboxOpacity",value:Number(i)})),ut()}})},"textboxOpacity"),C.jsx(Kr,{full:!0,title:r("textPreview.title"),children:C.jsx(l1e,{})},"textPreview")]})}function c1e(){const t=Le(n=>n.userData),e=Mr(),r=Cn("menu.options.pages.sound.options.");return C.jsxs("div",{className:ln.Options_main_content_half,children:[C.jsx(Kr,{title:r("volumeMain.title"),children:C.jsx(Js,{initValue:t.optionData.volumeMain,uniqueID:r("volumeMain.title"),onChange:n=>{const i=n.target.value;e(At({key:"volumeMain",value:Number(i)})),ut()}})},"option4"),C.jsx(Kr,{title:r("vocalVolume.title"),children:C.jsx(Js,{initValue:t.optionData.vocalVolume,uniqueID:r("vocalVolume.title"),onChange:n=>{const i=n.target.value;e(At({key:"vocalVolume",value:Number(i)})),ut()}})},"option5"),C.jsx(Kr,{title:r("bgmVolume.title"),children:C.jsx(Js,{initValue:t.optionData.bgmVolume,uniqueID:r("bgmVolume.title"),onChange:n=>{const i=n.target.value;e(At({key:"bgmVolume",value:Number(i)})),ut()}})},"option6"),C.jsx(Kr,{title:r("seVolume.title"),children:C.jsx(Js,{initValue:t.optionData.seVolume,uniqueID:r("seVolume.title"),onChange:n=>{const i=n.target.value;e(At({key:"seVolume",value:Number(i)})),ut()}})},"option7"),C.jsx(Kr,{title:r("uiSeVolume.title"),children:C.jsx(Js,{initValue:t.optionData.uiSeVolume,uniqueID:r("uiSeVolume.title"),onChange:n=>{const i=n.target.value;e(At({key:"uiSeVolume",value:Number(i)})),ut()}})},"option8"),C.jsx(Kr,{title:r("voiceOption.title"),children:C.jsx(Ia,{textList:r("voiceStop.title","voiceContinue.title"),functionList:[()=>{e(At({key:"voiceInterruption",value:zc.yes})),ut()},()=>{e(At({key:"voiceInterruption",value:zc.no})),ut()}],currentChecked:t.optionData.voiceInterruption})},"option9")]})}const f1e=()=>{const{playSeEnter:t,playSeSwitch:e}=gn(),r=wi(0);ne.useEffect(Kc,[]);function n(a){return a===r.value?ln.Options_page_button+" "+ln.Options_page_button_active:ln.Options_page_button}const i=Cn("menu.options.");return C.jsxs("div",{className:ln.Options_main,children:[C.jsx("div",{className:ln.Options_top,children:C.jsx("div",{className:ln.Options_title,children:C.jsx("div",{className:ln.Option_title_text,children:i("title")})})}),C.jsxs("div",{className:ln.Options_page_container,children:[C.jsxs("div",{className:ln.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:ln.Options_main_content,children:[r.value===1&&C.jsx(u1e,{}),r.value===0&&C.jsx(Bxe,{}),r.value===2&&C.jsx(c1e,{})]})]})]})},h1e=()=>{const t=Le(r=>r.GUI);let e;switch(t.currentMenuTag){case vt.Save:e=C.jsx(axe,{});break;case vt.Load:e=C.jsx(oxe,{});break;case vt.Option:e=C.jsx(f1e,{});break}return C.jsx(C.Fragment,{children:t.showMenuPanel&&C.jsxs("div",{className:uO.Menu_main,children:[C.jsx("div",{className:uO.Menu_TagContent,children:e}),C.jsx(P_e,{})]})})},d1e="_MainStage_main_9enex_1",p1e="_MainStage_main_container_9enex_10",v1e="_MainStage_bgContainer_9enex_17",m1e="_MainStage_showBgSoftly_9enex_1",g1e="_MainStage_bgContainer_Settled_9enex_27",y1e="_MainStage_oldBgContainer_9enex_37",_1e="_MainStage_oldBgFadeout_9enex_1",x1e="_MainStage_oldBgContainer_Settled_9enex_47",b1e="_pixiContainer_9enex_72",S1e="_chooseContainer_9enex_77",Uy={MainStage_main:d1e,MainStage_main_container:p1e,MainStage_bgContainer:v1e,MainStage_showBgSoftly:m1e,MainStage_bgContainer_Settled:g1e,MainStage_oldBgContainer:y1e,MainStage_oldBgFadeout:_1e,MainStage_oldBgContainer_Settled:x1e,pixiContainer:b1e,chooseContainer:S1e},w1e=()=>{var v;const t=Le(g=>g.stage),e=Le(g=>g.GUI.titleBgm),r=Le(g=>g.GUI.showTitle),n=Le(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=Le(g=>g.GUI.isEnterGame),[h,d]=ne.useState(setTimeout(()=>{},0)),p=(g,m,y)=>{y>=0?g.volume=0:g.volume=m;const _=10,b=m/y*_,x=()=>{const S=setTimeout(()=>{g.volume+b>=m?g.volume=m:g.volume+b<=0?(g.volume=0,te.dispatch(Ge({key:"bgm",value:{src:"",enter:0,volume:100}}))):(g.volume+=b,x())},_);d(S)};x()};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(()=>{Se.debug(`设置背景音量:${o}`)},[o]),ne.useEffect(()=>{Se.debug(`设置背景音量淡入时间: ${s}`)},[s]),ne.useEffect(()=>{Se.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)?(Se.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(()=>{Se.debug(`设置音效音量: ${l}`)},[l]),ne.useEffect(()=>{Se.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})]})},E1e=()=>{const t=Le(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"})})},T1e="_TextBox_EventHandler_449dq_2",A1e="_TextBox_main_449dq_10",C1e="_showSoftly_449dq_1",P1e="_TextBox_textElement_449dq_38",O1e="_TextBox_textElement_start_449dq_43",R1e="_TextDelayShow_449dq_1",I1e="_TextBox_textElement_Settled_449dq_48",k1e="_TextBox_showName_449dq_52",M1e="_miniAvatarContainer_449dq_68",F1e="_miniAvatarImg_449dq_76",$y={TextBox_EventHandler:T1e,TextBox_main:A1e,showSoftly:C1e,TextBox_textElement:P1e,TextBox_textElement_start:O1e,TextDelayShow:R1e,TextBox_textElement_Settled:I1e,TextBox_showName:k1e,miniAvatarContainer:M1e,miniAvatarImg:F1e},N1e=()=>{const t=Le(o=>o.stage),e=Le(o=>o.userData);ne.useEffect(()=>{});const r=Zz.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,a;const r="bg-main";if(e!==""){const o=(n=D.gameplay.pixiStage)==null?void 0:n.getStageObjByKey(r);o&&o.sourceUrl!==e&&vO(o),(i=D.gameplay.pixiStage)==null||i.addBg(r,e),Xf(e),Se.debug("重设背景");const{duration:s,animation:u}=Ka("bg-main","enter",!0);D.gameplay.pixiStage.registerPresetAnimation(u,"bg-main-softin",r,t.effects),setTimeout(()=>D.gameplay.pixiStage.removeAnimationWithSetEffects("bg-main-softin"),s)}else{const o=(a=D.gameplay.pixiStage)==null?void 0:a.getStageObjByKey(r);o&&vO(o)}},[e])}function vO(t){var i,a;(i=D.gameplay.pixiStage)==null||i.removeAnimationWithSetEffects("bg-main-softin");const e=t.key;t.key="bg-main-off",(a=D.gameplay.pixiStage)==null||a.removeStageObjectByKey(e);const{duration:r,animation:n}=Ka("bg-main-off","exit",!0);D.gameplay.pixiStage.registerAnimation(n,"bg-main-softoff","bg-main-off"),setTimeout(()=>{var o,s;(o=D.gameplay.pixiStage)==null||o.removeAnimation("bg-main-softoff"),(s=D.gameplay.pixiStage)==null||s.removeStageObjectByKey("bg-main-off")},r)}function D1e(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=D.gameplay.pixiStage)==null||s.changeModelMotionByKey(u.target,u.motion)},[a]),ne.useEffect(()=>{var s;for(const u of o)(s=D.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=D.gameplay.pixiStage)==null?void 0:l.getStageObjByKey(s);f&&f.sourceUrl!==r&&xa(f,u,t.effects),qu(void 0,s,r,"center"),Se.debug("中立绘已重设");const{duration:h,animation:d}=Ka(s,"enter");D.gameplay.pixiStage.registerPresetAnimation(d,u,s,t.effects),setTimeout(()=>D.gameplay.pixiStage.removeAnimationWithSetEffects(u),h)}else{Se.debug("移除中立绘");const f=(c=D.gameplay.pixiStage)==null?void 0:c.getStageObjByKey(s);f&&f.sourceUrl!==r&&xa(f,u,t.effects)}},[r]),ne.useEffect(()=>{var l,c;const s="fig-left",u="fig-left-softin";if(e!==""){const f=(l=D.gameplay.pixiStage)==null?void 0:l.getStageObjByKey(s);f&&f.sourceUrl!==e&&xa(f,u,t.effects),qu(void 0,s,e,"left"),Se.debug("左立绘已重设");const{duration:h,animation:d}=Ka(s,"enter");D.gameplay.pixiStage.registerPresetAnimation(d,u,s,t.effects),setTimeout(()=>D.gameplay.pixiStage.removeAnimationWithSetEffects(u),h)}else{Se.debug("移除左立绘");const f=(c=D.gameplay.pixiStage)==null?void 0:c.getStageObjByKey(s);f&&f.sourceUrl!==e&&xa(f,u,t.effects)}},[e]),ne.useEffect(()=>{var l,c;const s="fig-right",u="fig-right-softin";if(n!==""){const f=(l=D.gameplay.pixiStage)==null?void 0:l.getStageObjByKey(s);f&&f.sourceUrl!==n&&xa(f,u,t.effects),qu(void 0,s,n,"right"),Se.debug("右立绘已重设");const{duration:h,animation:d}=Ka(s,"enter");D.gameplay.pixiStage.registerPresetAnimation(d,u,s,t.effects),setTimeout(()=>D.gameplay.pixiStage.removeAnimationWithSetEffects(u),h)}else{const f=(c=D.gameplay.pixiStage)==null?void 0:c.getStageObjByKey(s);f&&f.sourceUrl!==n&&xa(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=D.gameplay.pixiStage)==null?void 0:u.getStageObjByKey(h);if(p){if(p.sourceUrl!==f.name){xa(p,d,t.effects),qu(void 0,h,f.name,f.basePosition),Se.debug(`${f.key}立绘已重设`);const{duration:v,animation:g}=Ka(h,"enter");D.gameplay.pixiStage.registerPresetAnimation(g,d,h,t.effects),setTimeout(()=>D.gameplay.pixiStage.removeAnimationWithSetEffects(d),v)}}else{qu(void 0,h,f.name,f.basePosition),Se.debug(`${f.key}立绘已重设`);const{duration:v,animation:g}=Ka(h,"enter");D.gameplay.pixiStage.registerPresetAnimation(g,d,h,t.effects),setTimeout(()=>D.gameplay.pixiStage.removeAnimationWithSetEffects(d),v)}}else{const p=(l=D.gameplay.pixiStage)==null?void 0:l.getStageObjByKey(h);p&&p.sourceUrl!==f.name&&xa(p,d,t.effects)}}const s=(c=D.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`;xa(f,p,t.effects)}}}},[i])}function xa(t,e,r){var u,l,c;if((u=D.gameplay.pixiStage)==null||u.removeAnimationWithSetEffects(e),D.gameplay.isFast){Se.info("快速模式,立刻关闭立绘"),(l=D.gameplay.pixiStage)==null||l.removeStageObjectByKey(t.key);return}const n=t.key;t.key=t.key+"-off",(c=D.gameplay.pixiStage)==null||c.removeStageObjectByKey(n);const i=t.key,a=i+"-softoff",{duration:o,animation:s}=Ka(i,"exit");D.gameplay.pixiStage.registerPresetAnimation(s,a,i,r),setTimeout(()=>{var f,h;(f=D.gameplay.pixiStage)==null||f.removeAnimation(a),(h=D.gameplay.pixiStage)==null||h.removeStageObjectByKey(i)},o)}function qu(t,...e){var n,i;const r=e[1];return r.endsWith(".json")?B1e(...e):r.endsWith(".skel")?(n=D.gameplay.pixiStage)==null?void 0:n.addSpineFigure(...e):(i=D.gameplay.pixiStage)==null?void 0:i.addFigure(...e)}function B1e(...t){}function j1e(t){const e=t.effects;setTimeout(()=>{U1e(e)},10)}function U1e(t){var r,n,i,a;const e=((r=D.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=D.gameplay.pixiStage)==null?void 0:n.getAllLockedObject())??[]).includes(s))if(u){const c=(i=D.gameplay.pixiStage)==null?void 0:i.getStageObjByKey(s);if(c){const f=c.pixiContainer;Object.assign(f,mO(u.transform))}}else{const c=(a=D.gameplay.pixiStage)==null?void 0:a.getStageObjByKey(s);if(c){const f=c.pixiContainer;Object.assign(f,mO(Ub))}}}}function mO(t){if(!t)return{};const{position:e,...r}=t;return{...r,x:e.x,y:e.y}}function $1e(){const t=Le(e=>e.stage);return L1e(t),D1e(t),j1e(t),C.jsx("div",{style:{display:"none"}})}const V1e="_introContainer_119k8_1",G1e={introContainer:V1e};function X1e(){return C.jsx("div",{className:G1e.introContainer,id:"introContainer"})}function gO(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)):z1e(t,r,n)}const H1e=()=>{const t=Le(n=>n.stage),e=Le(n=>n.GUI),r=Mr();return Joe(),C.jsxs("div",{className:Uy.MainStage_main,children:[C.jsx(E1e,{}),C.jsx($1e,{}),C.jsx("div",{id:"pixiContianer",className:Uy.pixiContainer,style:{zIndex:SE?"-5":void 0}}),C.jsx("div",{id:"chooseContainer",className:Uy.chooseContainer}),e.showTextBox&&t.enableFilm===""&&!t.isDisableTextbox&&C.jsx(a1e,{}),e.showTextBox&&t.enableFilm!==""&&C.jsx(N1e,{}),C.jsx(w1e,{}),C.jsx("div",{onClick:()=>{if(!e.showTextBox){r(rt({component:"showTextBox",visibility:!0}));return}bS(),Fr()},onDoubleClick:()=>{D.events.fullscreenDbClick.emit()},id:"FullScreenClick",style:{width:"100%",height:"100%",position:"absolute",zIndex:"12",top:"0"},onMouseMove:n=>!e.showControls&&Y1e(n,t,e,r)}),C.jsx(X1e,{})]})},q1e=()=>{const t=Cn("gaming."),e=2.5,{i18n:r}=$v(),{playSeEnter:n,playSeClick:i,playSeDialogOpen:a}=gn(),s=r.language==="fr";let u=42,l="150%";s&&(l="125%",u=40);const c=Le(m=>m.GUI),f=Le(m=>m.stage),h=Mr(),d=(m,y)=>{h(rt({component:m,visibility:y}))},p=m=>{h(ss(m))},v=Le(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(u_e,{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(c_e,{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(Q0e,{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(f_e,{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:()=>{sN(),i()},onMouseEnter:n,children:[C.jsx(j3,{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:()=>{fN(),i()},onMouseEnter:n,children:[C.jsx(e_e,{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:()=>{r_(0),i()},onMouseEnter:n,children:[C.jsx(J0e,{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:()=>{NF(0),i()},onMouseEnter:n,children:[C.jsx(t_e,{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(U3,{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(D3,{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($3,{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:()=>{wE()},rightFunc:()=>{}})},onMouseEnter:n,children:[C.jsx(B3,{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:()=>{C_e(),i()},onMouseEnter:n,children:c.showControls?C.jsx(o_e,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e}):C.jsx(p_e,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e})})]})})},K1e=()=>{var h,d;const t=Cn("gaming."),{playSeEnter:e,playSeClick:r}=gn(),n=Le(p=>p.GUI),i=Mr(),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;vC.jsx("div",{children:x.map((w,T)=>w==="

"?C.jsx("br",{},`br${T}`):w)},`backlog-line-${S}`)),b=C.jsxs("div",{className:jr.backlog_item,style:{animationDelay:`${20*(D.backlogManager.getBacklog().length-v)}ms`},children:[C.jsxs("div",{className:jr.backlog_func_area,children:[C.jsxs("div",{className:jr.backlog_item_button_list,children:[C.jsx("div",{onClick:x=>{r(),die(v),x.preventDefault(),x.stopPropagation()},onMouseEnter:e,className:jr.backlog_item_button_element,children:C.jsx(h_e,{theme:"outline",size:a,fill:"#ffffff",strokeWidth:3})}),g.currentStageState.vocal?C.jsx("div",{onClick:()=>{r();const x=document.getElementById("backlog_audio_play_element_"+v);if(x){x.currentTime=0;const S=te.getState().userData,w=S.optionData.volumeMain;x.volume=w*.01*S.optionData.vocalVolume*.01,x==null||x.play()}},onMouseEnter:e,className:jr.backlog_item_button_element,children:C.jsx(v_e,{theme:"outline",size:a,fill:"#ffffff",strokeWidth:3})}):null]}),C.jsx("div",{className:jr.backlog_item_content_name,children:g.currentStageState.showName})]}),C.jsx("div",{className:jr.backlog_item_content,children:C.jsx("span",{className:jr.backlog_item_content_text,children:_})}),C.jsx("audio",{id:"backlog_audio_play_element_"+v,src:g.currentStageState.vocal})]},"backlogItem"+g.currentStageState.showText+g.saveScene.currentSentenceId);p.unshift(b)}return p},[((d=(h=D.backlogManager.getBacklog()[D.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:` + )`},children:[C.jsx("div",{id:"miniAvatar",className:v("miniAvatarContainer",Br.miniAvatarContainer),children:l!==""&&C.jsx("img",{className:v("miniAvatarImg",Br.miniAvatarImg),alt:"miniAvatar",src:l})}),c!==""&&C.jsx("div",{className:v("TextBox_showName",Br.TextBox_showName),style:{fontSize:"200%",background:`rgba(11, 52, 110, ${p/100*.9})`,border:`4px solid rgba(255, 255, 255, ${p/100*.75})`,boxShadow:`3px 3px 10px rgba(100, 100, 100, ${p/100*.5})`},children:c.split("").map((y,_)=>C.jsx("span",{style:{position:"relative"},children:C.jsxs("span",{className:Br.zhanwei,children:[y,C.jsx("span",{className:v("outerName",Br.outerName),children:y}),d&&C.jsx("span",{className:v("innerName",Br.innerName),children:y})]})},y+_))},c),C.jsx("div",{className:v("text",Br.text),style:{fontSize:u,flexFlow:"column",overflow:"hidden",paddingLeft:"0.1em"},children:m})]})})}const z3=navigator.userAgent,n1e=/firefox/i.test(z3),i1e=/^((?!chrome|android).)*safari/i.test(z3),a1e=()=>{const[t,e]=ne.useState(!0);ne.useEffect(()=>{const y=()=>{const x=window.innerHeight,S=window.innerWidth,w=x/1440,T=S/2560,E=S/1440,A=x/2560;[w,T,E,A].forEach(O=>{O<=.2?e(!1):e(!0)})};return window.addEventListener("resize",y),y(),()=>{window.removeEventListener("resize",y)}},[]);const r=Le(y=>y.stage),n=Le(y=>y.userData),i=rS(n.optionData.textSpeed),a=uF(n.optionData.textSpeed);let o=n1(n.optionData.textSize)+"%";const s=G3(),u=r.showText!==""||r.showName!=="";let l=n.optionData.textSize;u&&r.showTextSize!==-1&&(o=n1(r.showTextSize)+"%",l=r.showTextSize);const c=jv(n.optionData.textSize).with(_i.small,()=>3).with(_i.medium,()=>2).with(_i.large,()=>2).default(()=>2),f=TE(r.showText,c),h=r.showName,d=r.currentConcatDialogPrev,p=r.currentDialogKey,v=r.miniAvatar,g=n.optionData.textboxOpacity,m=X3;return C.jsx(m,{textArray:f,isText:u,textDelay:i,showName:h,currentConcatDialogPrev:d,fontSize:o,currentDialogKey:p,isSafari:i1e,isFirefox:n1e,miniAvatar:v,textDuration:a,font:s,textSizeState:l,lineLimit:c,isUseStroke:t,textboxOpacity:g})};function vO(t){return!!t.match(/[\u4e00-\u9fa5]|[\u0800-\u4e00]|[\uac00-\ud7ff]/)}function TE(t,e,r){return t.split("|").map(o=>s1e(o)).map(o=>{const s=[];return o.forEach((u,l)=>{jv(u.type).with("SegmentType.String",()=>{const c=o1e(u.value);s.push(...c)}).endsWith("SegmentType.Link",()=>{const c=u.value,f=C.jsxs("ruby",{children:[c.text,C.jsx("rt",{children:c.link})]},l+c.text);s.push(f)})}),s}).slice(0,r?void 0:e)}function o1e(t){if(!t)return[];const e=[];let r="",n=vO(t[0]);const i=a=>/[!-\/:-@\[-`{-~\u2000-\u206F\u3000-\u303F\uff00-\uffef]/g.test(a);for(const a of t)if(a===" ")r&&(e.push(r),r=""),e.push(" "),n=!1;else if(vO(a)&&!i(a))!n&&r&&(e.push(r),r=""),e.push(a),n=!0;else{if(i(a)){r?(r+=a,e.push(r),r=""):e.length>0?e[e.length-1]+=a:e.push(a);continue}n&&r&&(e.push(r),r=""),r+=a,n=!1}return r&&e.push(r),e}function s1e(t){const e=/(\[(.*?)\]\((.*?)\))|([^\[\]]+)/g,r=[];let n;for(;(n=e.exec(t))!==null;)if(n[1]){const i=n[2],a=n[3];r.push({type:"SegmentType.Link",value:{text:i,link:a}})}else{const i=n[0];r.push({type:"SegmentType.String",value:i})}return r}const l1e=t=>{const e=Cn("menu.options.pages.display.options."),r=Le(m=>m.userData),i=Le(m=>m.stage).bgName,a=rS(r.optionData.textSpeed),o=uF(r.optionData.textSpeed),s=r.optionData.textboxOpacity,u=n1(r.optionData.textSize)+"%",l=G3(),c=navigator.userAgent,f=/firefox/i.test(c),h=/^((?!chrome|android).)*safari/i.test(c),d=e("textPreview.text"),p=TE(d,3),v=X3,g={textArray:p,isText:!0,textDelay:a,showName:e("textPreview.title"),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:pO.textPreviewMain,style:{background:i?`bottom / cover no-repeat url(${i})`:"rgba(0, 0, 0, 0.1)"},children:C.jsx("div",{className:pO.textbox,children:C.jsx(v,{...g})},`previewTextbox-${a}`)})};const Js=t=>{const{playSeEnter:e}=gn();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 u1e(){const t=Le(n=>n.userData),e=Mr(),r=Cn("menu.options.pages.display.options.");return C.jsxs("div",{className:ln.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(At({key:"fullScreen",value:Zi.on})),ut()},()=>{e(At({key:"fullScreen",value:Zi.off})),ut()}],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(At({key:"textSpeed",value:fn.slow})),ut()},()=>{e(At({key:"textSpeed",value:fn.normal})),ut()},()=>{e(At({key:"textSpeed",value:fn.fast})),ut()}],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(At({key:"textSize",value:_i.small})),ut()},()=>{e(At({key:"textSize",value:_i.medium})),ut()},()=>{e(At({key:"textSize",value:_i.large})),ut()}],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(At({key:"textboxFont",value:Ki.song})),ut()},()=>{e(At({key:"textboxFont",value:Ki.hei})),ut()},()=>{e(At({key:"textboxFont",value:Ki.lxgw})),ut()}],currentChecked:t.optionData.textboxFont})},"textFont"),C.jsx(Kr,{title:r("textboxOpacity.title"),children:C.jsx(Js,{initValue:t.optionData.textboxOpacity,uniqueID:r("textboxOpacity.title"),onChange:n=>{const i=n.target.value;e(At({key:"textboxOpacity",value:Number(i)})),ut()}})},"textboxOpacity"),C.jsx(Kr,{full:!0,title:r("textPreview.title"),children:C.jsx(l1e,{})},"textPreview")]})}function c1e(){const t=Le(n=>n.userData),e=Mr(),r=Cn("menu.options.pages.sound.options.");return C.jsxs("div",{className:ln.Options_main_content_half,children:[C.jsx(Kr,{title:r("volumeMain.title"),children:C.jsx(Js,{initValue:t.optionData.volumeMain,uniqueID:r("volumeMain.title"),onChange:n=>{const i=n.target.value;e(At({key:"volumeMain",value:Number(i)})),ut()}})},"option4"),C.jsx(Kr,{title:r("vocalVolume.title"),children:C.jsx(Js,{initValue:t.optionData.vocalVolume,uniqueID:r("vocalVolume.title"),onChange:n=>{const i=n.target.value;e(At({key:"vocalVolume",value:Number(i)})),ut()}})},"option5"),C.jsx(Kr,{title:r("bgmVolume.title"),children:C.jsx(Js,{initValue:t.optionData.bgmVolume,uniqueID:r("bgmVolume.title"),onChange:n=>{const i=n.target.value;e(At({key:"bgmVolume",value:Number(i)})),ut()}})},"option6"),C.jsx(Kr,{title:r("seVolume.title"),children:C.jsx(Js,{initValue:t.optionData.seVolume,uniqueID:r("seVolume.title"),onChange:n=>{const i=n.target.value;e(At({key:"seVolume",value:Number(i)})),ut()}})},"option7"),C.jsx(Kr,{title:r("uiSeVolume.title"),children:C.jsx(Js,{initValue:t.optionData.uiSeVolume,uniqueID:r("uiSeVolume.title"),onChange:n=>{const i=n.target.value;e(At({key:"uiSeVolume",value:Number(i)})),ut()}})},"option8"),C.jsx(Kr,{title:r("voiceOption.title"),children:C.jsx(Ia,{textList:r("voiceStop.title","voiceContinue.title"),functionList:[()=>{e(At({key:"voiceInterruption",value:zc.yes})),ut()},()=>{e(At({key:"voiceInterruption",value:zc.no})),ut()}],currentChecked:t.optionData.voiceInterruption})},"option9")]})}const f1e=()=>{const{playSeEnter:t,playSeSwitch:e}=gn(),r=wi(0);ne.useEffect(Kc,[]);function n(a){return a===r.value?ln.Options_page_button+" "+ln.Options_page_button_active:ln.Options_page_button}const i=Cn("menu.options.");return C.jsxs("div",{className:ln.Options_main,children:[C.jsx("div",{className:ln.Options_top,children:C.jsx("div",{className:ln.Options_title,children:C.jsx("div",{className:ln.Option_title_text,children:i("title")})})}),C.jsxs("div",{className:ln.Options_page_container,children:[C.jsxs("div",{className:ln.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:ln.Options_main_content,children:[r.value===1&&C.jsx(u1e,{}),r.value===0&&C.jsx(Bxe,{}),r.value===2&&C.jsx(c1e,{})]})]})]})},h1e=()=>{const t=Le(r=>r.GUI);let e;switch(t.currentMenuTag){case vt.Save:e=C.jsx(axe,{});break;case vt.Load:e=C.jsx(oxe,{});break;case vt.Option:e=C.jsx(f1e,{});break}return C.jsx(C.Fragment,{children:t.showMenuPanel&&C.jsxs("div",{className:cO.Menu_main,children:[C.jsx("div",{className:cO.Menu_TagContent,children:e}),C.jsx(P_e,{})]})})},d1e="_MainStage_main_9enex_1",p1e="_MainStage_main_container_9enex_10",v1e="_MainStage_bgContainer_9enex_17",m1e="_MainStage_showBgSoftly_9enex_1",g1e="_MainStage_bgContainer_Settled_9enex_27",y1e="_MainStage_oldBgContainer_9enex_37",_1e="_MainStage_oldBgFadeout_9enex_1",x1e="_MainStage_oldBgContainer_Settled_9enex_47",b1e="_pixiContainer_9enex_72",S1e="_chooseContainer_9enex_77",Uy={MainStage_main:d1e,MainStage_main_container:p1e,MainStage_bgContainer:v1e,MainStage_showBgSoftly:m1e,MainStage_bgContainer_Settled:g1e,MainStage_oldBgContainer:y1e,MainStage_oldBgFadeout:_1e,MainStage_oldBgContainer_Settled:x1e,pixiContainer:b1e,chooseContainer:S1e},w1e=()=>{var v;const t=Le(g=>g.stage),e=Le(g=>g.GUI.titleBgm),r=Le(g=>g.GUI.showTitle),n=Le(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=Le(g=>g.GUI.isEnterGame),[h,d]=ne.useState(setTimeout(()=>{},0)),p=(g,m,y)=>{y>=0?g.volume=0:g.volume=m;const _=10,b=m/y*_,x=()=>{const S=setTimeout(()=>{g.volume+b>=m?g.volume=m:g.volume+b<=0?(g.volume=0,te.dispatch(Ge({key:"bgm",value:{src:"",enter:0,volume:100}}))):(g.volume+=b,x())},_);d(S)};x()};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(()=>{Se.debug(`设置背景音量:${o}`)},[o]),ne.useEffect(()=>{Se.debug(`设置背景音量淡入时间: ${s}`)},[s]),ne.useEffect(()=>{Se.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)?(Se.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(()=>{Se.debug(`设置音效音量: ${l}`)},[l]),ne.useEffect(()=>{Se.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})]})},E1e=()=>{const t=Le(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"})})},T1e="_TextBox_EventHandler_449dq_2",A1e="_TextBox_main_449dq_10",C1e="_showSoftly_449dq_1",P1e="_TextBox_textElement_449dq_38",O1e="_TextBox_textElement_start_449dq_43",R1e="_TextDelayShow_449dq_1",I1e="_TextBox_textElement_Settled_449dq_48",k1e="_TextBox_showName_449dq_52",M1e="_miniAvatarContainer_449dq_68",F1e="_miniAvatarImg_449dq_76",$y={TextBox_EventHandler:T1e,TextBox_main:A1e,showSoftly:C1e,TextBox_textElement:P1e,TextBox_textElement_start:O1e,TextDelayShow:R1e,TextBox_textElement_Settled:I1e,TextBox_showName:k1e,miniAvatarContainer:M1e,miniAvatarImg:F1e},N1e=()=>{const t=Le(o=>o.stage),e=Le(o=>o.userData);ne.useEffect(()=>{});const r=Zz.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,a;const r="bg-main";if(e!==""){const o=(n=D.gameplay.pixiStage)==null?void 0:n.getStageObjByKey(r);o&&o.sourceUrl!==e&&mO(o),(i=D.gameplay.pixiStage)==null||i.addBg(r,e),Xf(e),Se.debug("重设背景");const{duration:s,animation:u}=Ka("bg-main","enter",!0);D.gameplay.pixiStage.registerPresetAnimation(u,"bg-main-softin",r,t.effects),setTimeout(()=>D.gameplay.pixiStage.removeAnimationWithSetEffects("bg-main-softin"),s)}else{const o=(a=D.gameplay.pixiStage)==null?void 0:a.getStageObjByKey(r);o&&mO(o)}},[e])}function mO(t){var i,a;(i=D.gameplay.pixiStage)==null||i.removeAnimationWithSetEffects("bg-main-softin");const e=t.key;t.key="bg-main-off",(a=D.gameplay.pixiStage)==null||a.removeStageObjectByKey(e);const{duration:r,animation:n}=Ka("bg-main-off","exit",!0);D.gameplay.pixiStage.registerAnimation(n,"bg-main-softoff","bg-main-off"),setTimeout(()=>{var o,s;(o=D.gameplay.pixiStage)==null||o.removeAnimation("bg-main-softoff"),(s=D.gameplay.pixiStage)==null||s.removeStageObjectByKey("bg-main-off")},r)}function D1e(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=D.gameplay.pixiStage)==null||s.changeModelMotionByKey(u.target,u.motion)},[a]),ne.useEffect(()=>{var s;for(const u of o)(s=D.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=D.gameplay.pixiStage)==null?void 0:l.getStageObjByKey(s);f&&f.sourceUrl!==r&&xa(f,u,t.effects),qu(void 0,s,r,"center"),Se.debug("中立绘已重设");const{duration:h,animation:d}=Ka(s,"enter");D.gameplay.pixiStage.registerPresetAnimation(d,u,s,t.effects),setTimeout(()=>D.gameplay.pixiStage.removeAnimationWithSetEffects(u),h)}else{Se.debug("移除中立绘");const f=(c=D.gameplay.pixiStage)==null?void 0:c.getStageObjByKey(s);f&&f.sourceUrl!==r&&xa(f,u,t.effects)}},[r]),ne.useEffect(()=>{var l,c;const s="fig-left",u="fig-left-softin";if(e!==""){const f=(l=D.gameplay.pixiStage)==null?void 0:l.getStageObjByKey(s);f&&f.sourceUrl!==e&&xa(f,u,t.effects),qu(void 0,s,e,"left"),Se.debug("左立绘已重设");const{duration:h,animation:d}=Ka(s,"enter");D.gameplay.pixiStage.registerPresetAnimation(d,u,s,t.effects),setTimeout(()=>D.gameplay.pixiStage.removeAnimationWithSetEffects(u),h)}else{Se.debug("移除左立绘");const f=(c=D.gameplay.pixiStage)==null?void 0:c.getStageObjByKey(s);f&&f.sourceUrl!==e&&xa(f,u,t.effects)}},[e]),ne.useEffect(()=>{var l,c;const s="fig-right",u="fig-right-softin";if(n!==""){const f=(l=D.gameplay.pixiStage)==null?void 0:l.getStageObjByKey(s);f&&f.sourceUrl!==n&&xa(f,u,t.effects),qu(void 0,s,n,"right"),Se.debug("右立绘已重设");const{duration:h,animation:d}=Ka(s,"enter");D.gameplay.pixiStage.registerPresetAnimation(d,u,s,t.effects),setTimeout(()=>D.gameplay.pixiStage.removeAnimationWithSetEffects(u),h)}else{const f=(c=D.gameplay.pixiStage)==null?void 0:c.getStageObjByKey(s);f&&f.sourceUrl!==n&&xa(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=D.gameplay.pixiStage)==null?void 0:u.getStageObjByKey(h);if(p){if(p.sourceUrl!==f.name){xa(p,d,t.effects),qu(void 0,h,f.name,f.basePosition),Se.debug(`${f.key}立绘已重设`);const{duration:v,animation:g}=Ka(h,"enter");D.gameplay.pixiStage.registerPresetAnimation(g,d,h,t.effects),setTimeout(()=>D.gameplay.pixiStage.removeAnimationWithSetEffects(d),v)}}else{qu(void 0,h,f.name,f.basePosition),Se.debug(`${f.key}立绘已重设`);const{duration:v,animation:g}=Ka(h,"enter");D.gameplay.pixiStage.registerPresetAnimation(g,d,h,t.effects),setTimeout(()=>D.gameplay.pixiStage.removeAnimationWithSetEffects(d),v)}}else{const p=(l=D.gameplay.pixiStage)==null?void 0:l.getStageObjByKey(h);p&&p.sourceUrl!==f.name&&xa(p,d,t.effects)}}const s=(c=D.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`;xa(f,p,t.effects)}}}},[i])}function xa(t,e,r){var u,l,c;if((u=D.gameplay.pixiStage)==null||u.removeAnimationWithSetEffects(e),D.gameplay.isFast){Se.info("快速模式,立刻关闭立绘"),(l=D.gameplay.pixiStage)==null||l.removeStageObjectByKey(t.key);return}const n=t.key;t.key=t.key+"-off",(c=D.gameplay.pixiStage)==null||c.removeStageObjectByKey(n);const i=t.key,a=i+"-softoff",{duration:o,animation:s}=Ka(i,"exit");D.gameplay.pixiStage.registerPresetAnimation(s,a,i,r),setTimeout(()=>{var f,h;(f=D.gameplay.pixiStage)==null||f.removeAnimation(a),(h=D.gameplay.pixiStage)==null||h.removeStageObjectByKey(i)},o)}function qu(t,...e){var n,i;const r=e[1];return r.endsWith(".json")?B1e(...e):r.endsWith(".skel")?(n=D.gameplay.pixiStage)==null?void 0:n.addSpineFigure(...e):(i=D.gameplay.pixiStage)==null?void 0:i.addFigure(...e)}function B1e(...t){}function j1e(t){const e=t.effects;setTimeout(()=>{U1e(e)},10)}function U1e(t){var r,n,i,a;const e=((r=D.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=D.gameplay.pixiStage)==null?void 0:n.getAllLockedObject())??[]).includes(s))if(u){const c=(i=D.gameplay.pixiStage)==null?void 0:i.getStageObjByKey(s);if(c){const f=c.pixiContainer;Object.assign(f,gO(u.transform))}}else{const c=(a=D.gameplay.pixiStage)==null?void 0:a.getStageObjByKey(s);if(c){const f=c.pixiContainer;Object.assign(f,gO(Ub))}}}}function gO(t){if(!t)return{};const{position:e,...r}=t;return{...r,x:e.x,y:e.y}}function $1e(){const t=Le(e=>e.stage);return L1e(t),D1e(t),j1e(t),C.jsx("div",{style:{display:"none"}})}const V1e="_introContainer_119k8_1",G1e={introContainer:V1e};function X1e(){return C.jsx("div",{className:G1e.introContainer,id:"introContainer"})}function yO(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)):z1e(t,r,n)}const H1e=()=>{const t=Le(n=>n.stage),e=Le(n=>n.GUI),r=Mr();return Joe(),C.jsxs("div",{className:Uy.MainStage_main,children:[C.jsx(E1e,{}),C.jsx($1e,{}),C.jsx("div",{id:"pixiContianer",className:Uy.pixiContainer,style:{zIndex:wE?"-5":void 0}}),C.jsx("div",{id:"chooseContainer",className:Uy.chooseContainer}),e.showTextBox&&t.enableFilm===""&&!t.isDisableTextbox&&C.jsx(a1e,{}),e.showTextBox&&t.enableFilm!==""&&C.jsx(N1e,{}),C.jsx(w1e,{}),C.jsx("div",{onClick:()=>{if(!e.showTextBox){r(rt({component:"showTextBox",visibility:!0}));return}SS(),Fr()},onDoubleClick:()=>{D.events.fullscreenDbClick.emit()},id:"FullScreenClick",style:{width:"100%",height:"100%",position:"absolute",zIndex:"12",top:"0"},onMouseMove:n=>!e.showControls&&Y1e(n,t,e,r)}),C.jsx(X1e,{})]})},q1e=()=>{const t=Cn("gaming."),e=2.5,{i18n:r}=$v(),{playSeEnter:n,playSeClick:i,playSeDialogOpen:a}=gn(),s=r.language==="fr";let u=42,l="150%";s&&(l="125%",u=40);const c=Le(m=>m.GUI),f=Le(m=>m.stage),h=Mr(),d=(m,y)=>{h(rt({component:m,visibility:y}))},p=m=>{h(ss(m))},v=Le(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(u_e,{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(c_e,{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(Q0e,{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(f_e,{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:()=>{sN(),i()},onMouseEnter:n,children:[C.jsx(j3,{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:()=>{fN(),i()},onMouseEnter:n,children:[C.jsx(e_e,{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:()=>{r_(0),i()},onMouseEnter:n,children:[C.jsx(J0e,{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:()=>{LF(0),i()},onMouseEnter:n,children:[C.jsx(t_e,{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(U3,{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(D3,{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($3,{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:()=>{EE()},rightFunc:()=>{}})},onMouseEnter:n,children:[C.jsx(B3,{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:()=>{C_e(),i()},onMouseEnter:n,children:c.showControls?C.jsx(o_e,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e}):C.jsx(p_e,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e})})]})})},K1e=()=>{var h,d;const t=Cn("gaming."),{playSeEnter:e,playSeClick:r}=gn(),n=Le(p=>p.GUI),i=Mr(),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;vC.jsx("div",{children:x.map((w,T)=>w==="
"?C.jsx("br",{},`br${T}`):w)},`backlog-line-${S}`)),b=C.jsxs("div",{className:jr.backlog_item,style:{animationDelay:`${20*(D.backlogManager.getBacklog().length-v)}ms`},children:[C.jsxs("div",{className:jr.backlog_func_area,children:[C.jsxs("div",{className:jr.backlog_item_button_list,children:[C.jsx("div",{onClick:x=>{r(),die(v),x.preventDefault(),x.stopPropagation()},onMouseEnter:e,className:jr.backlog_item_button_element,children:C.jsx(h_e,{theme:"outline",size:a,fill:"#ffffff",strokeWidth:3})}),g.currentStageState.vocal?C.jsx("div",{onClick:()=>{r();const x=document.getElementById("backlog_audio_play_element_"+v);if(x){x.currentTime=0;const S=te.getState().userData,w=S.optionData.volumeMain;x.volume=w*.01*S.optionData.vocalVolume*.01,x==null||x.play()}},onMouseEnter:e,className:jr.backlog_item_button_element,children:C.jsx(v_e,{theme:"outline",size:a,fill:"#ffffff",strokeWidth:3})}):null]}),C.jsx("div",{className:jr.backlog_item_content_name,children:g.currentStageState.showName})]}),C.jsx("div",{className:jr.backlog_item_content,children:C.jsx("span",{className:jr.backlog_item_content_text,children:_})}),C.jsx("audio",{id:"backlog_audio_play_element_"+v,src:g.currentStageState.vocal})]},"backlogItem"+g.currentStageState.showText+g.saveScene.currentSentenceId);p.unshift(b)}return p},[((d=(h=D.backlogManager.getBacklog()[D.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?jr.Backlog_main:jr.Backlog_main_out} ${o?jr.Backlog_main_out_IndexHide:""} - `,children:[C.jsxs("div",{className:jr.backlog_top,children:[C.jsx(L3,{className:jr.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:jr.backlog_title,onClick:()=>{Se.info("Rua! Testing")},children:t("buttons.backlog")})]}),n.showBacklog&&C.jsx("div",{className:`${jr.backlog_content} ${u?jr.Backlog_main_DisableScroll:""}`,children:f})]})})};function Z1e(t){let e=[],r="";for(let n=0;nv.GUI.titleBgm),n=Le(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=Mr();function d(v){const g=n.bgm[v];f.set(g.name),h(ap({asset:"titleBgm",value:g.url}))}const p=n.bgm.map((v,g)=>{let m=Ct.bgmElement;return v.name===f.value&&(m=m+" "+Ct.bgmElement_active),C.jsx("div",{onClick:()=>{t(),f.set(v.name),h(ap({asset:"titleBgm",value:v.url}))},className:m,style:{animationDelay:`${g*150}ms`},onMouseEnter:e,children:v.name},v.name)});return C.jsxs("div",{className:Ct.bgmContainer,style:{maxHeight:l},children:[C.jsxs("div",{className:Ct.bgmPlayerMain,children:[C.jsx("div",{onClick:()=>{t(),s<=0?d(c-1):d(s-1)},onMouseEnter:e,className:Ct.bgmControlButton,children:C.jsx(n_e,{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:Ct.bgmControlButton,children:C.jsx(j3,{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:Ct.bgmControlButton,children:C.jsx(r_e,{theme:"filled",size:u,fill:"#fff",strokeWidth:3,strokeLinejoin:"miter"})}),C.jsx("div",{onClick:()=>{t(),document.getElementById("currentBgm").pause()},onMouseEnter:e,className:Ct.bgmControlButton,children:C.jsx(d_e,{theme:"filled",size:u,fill:"#fff",strokeWidth:3,strokeLinejoin:"miter"})}),C.jsx("div",{className:Ct.bgmName,children:o}),C.jsx("div",{onClick:()=>{t(),a.set(!a.value)},onMouseEnter:e,className:Ct.bgmControlButton,style:{marginLeft:"auto"},children:C.jsx(l_e,{theme:"filled",size:u,fill:"#fff",strokeWidth:3,strokeLinejoin:"miter"})})]}),a.value&&C.jsxs("div",{className:Ct.bgmListContainer,children:[" ",p]})]})}function wbe(t){const e=wi(!1),{playSeEnter:r,playSeClick:n}=gn();return C.jsxs(C.Fragment,{children:[e.value&&C.jsx("div",{onClick:()=>{e.set(!e.value),n()},className:Ct.showFullContainer,onMouseEnter:r,children:C.jsx("div",{className:Ct.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:Ct.cgElement,children:C.jsx("div",{style:{backgroundImage:`url('${t.imgUrl}')`,backgroundSize:"cover",backgroundPosition:"center",width:"100%",height:"100%"}})},t.name)]})}function Ebe(){const e=Le(l=>l.userData.appreciationData),r=Math.ceil(e.cg.length/8),n=wi(1),{playSeEnter:i,playSeClick:a}=gn(),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:Ct.cgMain,children:[C.jsx("div",{className:Ct.cgShowDiv,children:C.jsx("div",{className:Ct.cgShowDivWarpper,children:u})}),C.jsx("div",{className:Ct.cgContainer,children:o})]})}function Tbe(t,e){return Math.round(Math.random()*(e-t))+t}function Abe(){const{playSeClick:t}=gn(),e=Le(i=>i.GUI.showExtra),r=Mr(),n=Cn("extra.");return C.jsx(C.Fragment,{children:e&&C.jsxs("div",{className:Ct.extra,children:[C.jsxs("div",{className:Ct.extra_top,children:[C.jsx(L3,{className:Ct.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:Ct.extra_title,children:n("title")})]}),C.jsxs("div",{className:Ct.mainContainer,children:[C.jsx(Ebe,{}),C.jsx(Sbe,{})]})]})})}const Cbe="_tag_yghix_2",Pbe="_container_yghix_17",Obe="_showContainer_yghix_1",Rbe="_singleButton_yghix_33",Ibe="_button_text_yghix_37",xr={tag:Cbe,container:Pbe,showContainer:Obe,singleButton:Rbe,button_text:Ibe},kbe=()=>{const t=wi(!1),e=Le(a=>a.stage),r=Mr(),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:xr.tag,onClick:()=>{t.set(!t.value)},children:C.jsx(i_e,{theme:"outline",size:"32",fill:"#fff"})}),t.value&&C.jsxs("div",{className:xr.container,children:[C.jsx("span",{className:xr.singleButton,onClick:()=>{n("showBacklog",!0),n("showTextBox",!1),t.set(!t.value)},children:C.jsx("span",{className:xr.button_text,children:"剧情回想 / BACKLOG"})}),C.jsx("span",{className:xr.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:xr.button_text,children:"重播语音 / REPLAY VOICE"})}),C.jsx("span",{id:"Button_ControlPanel_auto",className:xr.singleButton,onClick:()=>{sN(),t.set(!t.value)},children:C.jsx("span",{className:xr.button_text,children:"自动模式 / AUTO"})}),C.jsx("span",{id:"Button_ControlPanel_fast",className:xr.singleButton,onClick:()=>{fN(),t.set(!t.value)},children:C.jsx("span",{className:xr.button_text,children:"快进 / FAST"})}),C.jsx("span",{className:xr.singleButton,onClick:()=>{t.set(!t.value),i(vt.Save),n("showMenuPanel",!0)},children:C.jsx("span",{className:xr.button_text,children:"存档 / SAVE"})}),C.jsx("span",{className:xr.singleButton,onClick:()=>{t.set(!t.value),i(vt.Load),n("showMenuPanel",!0)},children:C.jsx("span",{className:xr.button_text,children:"读档 / LOAD"})}),C.jsx("span",{className:xr.singleButton,onClick:()=>{t.set(!t.value),i(vt.Option),n("showMenuPanel",!0)},children:C.jsx("span",{className:xr.button_text,children:"选项 / OPTIONS"})}),C.jsx("span",{className:xr.singleButton,onClick:()=>{t.set(!t.value),wE()},children:C.jsx("span",{className:xr.button_text,children:"标题 / TITLE"})})]})]})})},Mbe="_devPanelMain_11x6i_1",Fbe="_devPanelOpener_11x6i_13",yO={devPanelMain:Mbe,devPanelOpener:Fbe};function Nbe(){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 Lbe(){function t(){return!!window.location.hash.match(/dev/)}const e=wi(!1),r=wi(window.location.hash),n=Le(u=>u.stage);ne.useEffect(()=>{window.onhashchange=()=>{r.set(window.location.hash)}},[]);const i=t(),{t:a,i18n:o}=$v(),s=C.jsxs(C.Fragment,{children:[C.jsx("div",{onClick:()=>Nbe(),children:"Save PIXI Screenshot"}),C.jsxs("div",{children:["Current Language:",o.language]}),C.jsx("div",{onClick:()=>{var u;return(u=D.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:yO.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:yO.devPanelOpener,children:"Open Dev Panel"})]})}const Dbe="_trans_8uz61_2",Bbe="_langWrapper_8uz61_10",jbe="_lang_8uz61_10",Ube="_langSelect_8uz61_29",$be="_langSelectButton_8uz61_35",Ku={trans:Dbe,langWrapper:Bbe,lang:jbe,langSelect:Ube,langSelectButton:$be};function Vbe(){const t=V3(),[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:Ku.trans,children:C.jsxs("div",{className:Ku.langWrapper,children:[C.jsx("div",{className:Ku.lang,children:"LANGUAGE SELECT"}),C.jsx("div",{className:Ku.langSelect,children:Object.keys(Jd).map(i=>C.jsx("div",{className:Ku.langSelectButton,onClick:()=>n(Rs[i]),children:Jd[i]},i))})]})})})}const Gbe="_panic_overlay_main_1ysz4_1",Xbe={panic_overlay_main:Gbe},zbe="_yoozle_blue_1r48o_1",Wbe="_yoozle_red_1r48o_5",Ybe="_yoozle_yellow_1r48o_9",Hbe="_yoozle_green_1r48o_13",qbe="_yoozle_e_rotate_1r48o_17",Kbe="_yoozle_container_1r48o_22",Zbe="_yoozle_title_1r48o_28",Qbe="_yoozle_search_1r48o_37",Jbe="_yoozle_search_bar_1r48o_44",eSe="_yoozle_search_buttons_1r48o_51",tSe="_yoozle_button_1r48o_55",_n={yoozle_blue:zbe,yoozle_red:Wbe,yoozle_yellow:Ybe,yoozle_green:Hbe,yoozle_e_rotate:qbe,yoozle_container:Kbe,yoozle_title:Zbe,yoozle_search:Qbe,yoozle_search_bar:Jbe,yoozle_search_buttons:eSe,yoozle_button:tSe},rSe=()=>(ne.useEffect(()=>{const t="Yoozle Search",e=document.title;return document.title=t,()=>{document.title=e}},[]),C.jsxs("div",{className:_n.yoozle_container,children:[C.jsx("div",{className:_n.yoozle_title,children:C.jsxs("span",{children:[C.jsx("span",{className:_n.yoozle_blue,style:{marginRight:"1px"},children:"Y"}),C.jsx("span",{className:_n.yoozle_red,children:"o"}),C.jsx("span",{className:_n.yoozle_yellow,children:"o"}),C.jsx("span",{className:_n.yoozle_blue,children:"z"}),C.jsx("span",{className:_n.yoozle_green,children:"l"}),C.jsx("span",{className:`${_n.yoozle_red} ${_n.yoozle_e_rotate}`,children:"e"})]})}),C.jsxs("div",{className:_n.yoozle_search,children:[C.jsx("input",{className:_n.yoozle_search_bar,type:"text",defaultValue:""}),C.jsxs("div",{className:_n.yoozle_search_buttons,children:[C.jsx("input",{className:_n.yoozle_button,type:"submit",value:"Yoozle Search"}),C.jsx("input",{className:_n.yoozle_button,type:"submit",value:"Feeling Lucky"})]})]})]})),nSe=()=>{const t=Le(n=>n.GUI),[e,r]=ne.useState(!1);return ne.useEffect(()=>{r(t.showPanicOverlay)},[t.showPanicOverlay]),Ji.createPortal(C.jsx("div",{className:e?Xbe.panic_overlay_main:"",children:e&&C.jsx(rSe,{})}),document.querySelector("div#panic-overlay"))};function iSe(){const t=Le(i=>i.userData),e=Le(i=>i.GUI);Mr();const r=t.optionData.fullScreen,n=e.isEnterGame;ne.useEffect(()=>{switch(r){case Zi.on:{n&&(document.documentElement.requestFullscreen(),ll&&ll.lock(["Escape","F11"]));break}case Zi.off:{document.fullscreenElement&&(document.exitFullscreen(),ll&&ll.unlock());break}}},[r])}function aSe(){return ne.useEffect(()=>{N0e()},[]),iSe(),C.jsxs("div",{className:"App",children:[C.jsx(Vbe,{}),C.jsx(H1e,{}),C.jsx(q1e,{}),C.jsx(kbe,{}),C.jsx(K1e,{}),C.jsx(dse,{}),C.jsx(yse,{}),C.jsx(Abe,{}),C.jsx(h1e,{}),C.jsx(E_e,{}),C.jsx(nSe,{}),C.jsx(Lbe,{})]})}function go(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function i1(t,e){return i1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},i1(t,e)}function dm(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&&i1(t,e)}function Kf(t,e){if(e&&(Cr(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 ia(t){return ia=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ia(t)}function oSe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function sSe(t){return WF(t)||oSe(t)||YF(t)||HF()}function _O(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 xO(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||lSe,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 SO(t,e,r){var n=TE(t,e,Object),i=n.obj,a=n.k;i[a]=r}function fSe(t,e,r,n){var i=TE(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 Pp(t,e){var r=TE(t,e),n=r.obj,i=r.k;if(n)return n[i]}function hSe(t,e,r){var n=Pp(t,r);return n!==void 0?n:Pp(e,r)}function W3(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]):W3(t[n],e[n],r):t[n]=e[n]);return t}function Hs(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var dSe={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function pSe(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,function(e){return dSe[e]}):t}var pm=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,vSe=[" ",",","?","!",";"];function mSe(t,e,r){e=e||"",r=r||"";var n=vSe.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 Op(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?Op(u,l,r):void 0}i=i[n[a]]}return i}}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 Xh(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 _Se=function(t){dm(r,t);var e=gSe(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),pm&&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=Pp(this.data,c);return f||!l||typeof o!="string"?f:Op(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),SO(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=Pp(this.data,c)||{};s?W3(f,o,u):f=Xh(Xh({},f),o),SO(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"?Xh(Xh({},{}),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),Y3={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 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 zr(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 TO={},AO=function(t){dm(r,t);var e=xSe(r);function r(n){var i,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Ti(this,r),i=e.call(this),pm&&Po.call(go(i)),cSe(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],n,go(i)),i.options=a,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.logger=Wi.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&&!mSe(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(Cr(a)!=="object"&&this.options.overloadTranslationOptionHandler&&(a=this.options.overloadTranslationOptionHandler(arguments)),Cr(a)==="object"&&(a=zr({},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,b=m&&m.exactUsedKey||f,x=Object.prototype.toString.apply(y),S=["[object Number]","[object Function]","[object RegExp]"],w=a.joinArrays!==void 0?a.joinArrays:this.options.joinArrays,T=!this.i18nFormat||this.i18nFormat.handleAsObject,E=typeof y!="string"&&typeof y!="boolean"&&typeof y!="number";if(T&&y&&E&&S.indexOf(x)<0&&!(typeof w=="string"&&x==="[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,zr(zr({},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=x==="[object Array]",P=O?[]:{},F=O?b:_;for(var k in y)if(Object.prototype.hasOwnProperty.call(y,k)){var B="".concat(F).concat(l).concat(k);P[k]=this.translate(B,zr(zr({},a),{joinArrays:!1,ns:h})),P[k]===B&&(P[k]=y[k])}y=P}}else if(T&&typeof w=="string"&&x==="[object Array]")y=y.join(w),y&&(y=this.extendTranslation(y,i,a,o));else{var U=!1,z=!1,J=a.count!==void 0&&typeof a.count!="string",Q=r.hasDefaultValue(a),$=J?this.pluralResolver.getSuffix(p,a.count,a):"",M=a["defaultValue".concat($)]||a.defaultValue;!this.isValidLookup(y)&&Q&&(U=!0,y=M),this.isValidLookup(y)||(z=!0,y=f);var G=a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,V=G&&z?void 0:y,j=Q&&M!==y&&this.options.updateMissing;if(z||U||j){if(this.logger.log(j?"updateKey":"missingKey",p,d,f,j?M:y),l){var H=this.resolve(f,zr(zr({},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(b){a.isValidLookup(s)||(f=b,!TO["".concat(_[0],"-").concat(b)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(f)&&(TO["".concat(_[0],"-").concat(b)]=!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(x){if(!a.isValidLookup(s)){c=x;var S=[p];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(S,p,x,b,o);else{var w;g&&(w=a.pluralResolver.getSuffix(x,o.count,o));var T="".concat(a.options.pluralSeparator,"zero");if(g&&(S.push(p+w),m&&S.push(p+T)),y){var E="".concat(p).concat(a.options.contextSeparator).concat(o.context);S.push(E),g&&(S.push(E+w),m&&S.push(E+T))}}for(var A;A=S.pop();)a.isValidLookup(s)||(l=A,s=a.getResource(x,b,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 Gy(t){return t.charAt(0).toUpperCase()+t.slice(1)}var CO=function(){function t(e){Ti(this,t),this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Wi.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]=Gy(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]=Gy(i[1].toLowerCase())),n.indexOf(i[2].toLowerCase())>-1&&(i[2]=Gy(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}(),SSe=[{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}],wSe={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}},ESe=["v1","v2","v3"],PO={zero:0,one:1,two:2,few:3,many:4,other:5};function TSe(){var t={};return SSe.forEach(function(e){e.lngs.forEach(function(r){t[r]={numbers:e.nr,plurals:wSe[e.fc]}})}),t}var ASe=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=Wi.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=TSe()}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 PO[o]-PO[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!ESe.includes(this.options.compatibilityJSON)}}]),t}();function OO(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=hSe(t,e,r);return!a&&i&&typeof r=="string"&&(a=Op(t,r,n),a===void 0&&(a=Op(e,r,n))),a}var CSe=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ti(this,t),this.logger=Wi.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:pSe,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?Hs(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?Hs(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?Hs(n.nestingPrefix):n.nestingPrefixEscaped||Hs("$t("),this.nestingSuffix=n.nestingSuffix?Hs(n.nestingSuffix):n.nestingSuffixEscaped||Hs(")"),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=RO(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),b=_.shift().trim(),x=_.join(o.formatSeparator).trim();return o.format(RO(n,c,b,o.options.keySeparator,o.options.ignoreJSONStructure),x,i,fi(fi(fi({},a),n),{},{interpolationkey:b}))};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=bO(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(b){return this.logger.warn("failed parsing options string in nesting for key ".concat(d),b),"".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=bO(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 IO(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 ba(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=sSe(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 qs(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 OSe=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ti(this,t),this.logger=Wi.create("formatter"),this.options=e,this.formats={number:qs(function(r,n){var i=new Intl.NumberFormat(r,ba({},n));return function(a){return i.format(a)}}),currency:qs(function(r,n){var i=new Intl.NumberFormat(r,ba(ba({},n),{},{style:"currency"}));return function(a){return i.format(a)}}),datetime:qs(function(r,n){var i=new Intl.DateTimeFormat(r,ba({},n));return function(a){return i.format(a)}}),relativetime:qs(function(r,n){var i=new Intl.RelativeTimeFormat(r,ba({},n));return function(a){return i.format(a,n.range||"day")}}),list:qs(function(r,n){var i=new Intl.ListFormat(r,ba({},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()]=qs(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=PSe(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,ba(ba(ba({},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 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 MO(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 kSe(t,e){t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)}var MSe=function(t){dm(r,t);var e=RSe(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),pm&&Po.call(go(o)),o.backend=n,o.store=i,o.services=a,o.languageUtils=a.languageUtils,o.options=s,o.logger=Wi.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){fSe(f.loaded,[u],l),kSe(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=MO(MO({},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 FO(){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(Cr(e[1])==="object"&&(r=e[1]),typeof e[1]=="string"&&(r.defaultValue=e[1]),typeof e[2]=="string"&&(r.tDescription=e[2]),Cr(e[2])==="object"||Cr(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 NO(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 LO(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 zh(){}function LSe(t){var e=Object.getOwnPropertyNames(Object.getPrototypeOf(t));e.forEach(function(r){typeof t[r]=="function"&&(t[r]=t[r].bind(t))})}var Rp=function(t){dm(r,t);var e=FSe(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),pm&&Po.call(go(n)),n.options=NO(i),n.services={},n.logger=Wi,n.modules={external:[]},LSe(go(n)),a&&!n.isInitialized&&!i.isClone){if(!n.options.initImmediate)return n.init(i,a),Kf(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=FO();this.options=Di(Di(Di({},s),this.options),NO(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?Wi.init(u(this.modules.logger),this.options):Wi.init(null,this.options);var l;this.modules.formatter?l=this.modules.formatter:typeof Intl<"u"&&(l=OSe);var c=new CO(this.options);this.store=new _Se(this.options.resources,this.options);var f=this.services;f.logger=Wi,f.resourceStore=this.store,f.languageUtils=c,f.pluralResolver=new ASe(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 CSe(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new MSe(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),b=1;b1?y-1:0),b=1;b0&&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=Zu(),g=function(){var y=function(b,x){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(x),o(b,x)};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]:zh,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=Zu();return i||(i=this.languages),a||(a=this.options.ns),o||(o=zh),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"&&Y3.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=Zu();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(Cr(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=Zu();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=Zu();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 CO(FO());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]:zh,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 AO(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 Rp(t,e)});var tn=Rp.createInstance();tn.createInstance=Rp.createInstance;tn.createInstance;tn.dir;tn.init;tn.loadResources;tn.reloadResources;tn.use;tn.changeLanguage;tn.getFixedT;tn.t;tn.exists;tn.setDefaultNamespace;tn.hasLoadedNamespace;tn.loadNamespaces;tn.loadLanguages;tn.use($ie).init({resources:zz||{},lng:Rs[Wz]||"zhCn",fallbackLng:"zhCn",interpolation:{escapeValue:!1}}).then(()=>console.log("WebGAL i18n Ready!"));Ji.render(C.jsx(fe.StrictMode,{children:C.jsx(zie,{children:C.jsx(Ere,{store:te,children:C.jsx(aSe,{})})})}),document.getElementById("root"));export{dr as C,Qn as S,Me as T,D as W,USe as r}; + `,children:[C.jsxs("div",{className:jr.backlog_top,children:[C.jsx(L3,{className:jr.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:jr.backlog_title,onClick:()=>{Se.info("Rua! Testing")},children:t("buttons.backlog")})]}),n.showBacklog&&C.jsx("div",{className:`${jr.backlog_content} ${u?jr.Backlog_main_DisableScroll:""}`,children:f})]})})};function Z1e(t){let e=[],r="";for(let n=0;nv.GUI.titleBgm),n=Le(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=Mr();function d(v){const g=n.bgm[v];f.set(g.name),h(ap({asset:"titleBgm",value:g.url}))}const p=n.bgm.map((v,g)=>{let m=Ct.bgmElement;return v.name===f.value&&(m=m+" "+Ct.bgmElement_active),C.jsx("div",{onClick:()=>{t(),f.set(v.name),h(ap({asset:"titleBgm",value:v.url}))},className:m,style:{animationDelay:`${g*150}ms`},onMouseEnter:e,children:v.name},v.name)});return C.jsxs("div",{className:Ct.bgmContainer,style:{maxHeight:l},children:[C.jsxs("div",{className:Ct.bgmPlayerMain,children:[C.jsx("div",{onClick:()=>{t(),s<=0?d(c-1):d(s-1)},onMouseEnter:e,className:Ct.bgmControlButton,children:C.jsx(n_e,{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:Ct.bgmControlButton,children:C.jsx(j3,{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:Ct.bgmControlButton,children:C.jsx(r_e,{theme:"filled",size:u,fill:"#fff",strokeWidth:3,strokeLinejoin:"miter"})}),C.jsx("div",{onClick:()=>{t(),document.getElementById("currentBgm").pause()},onMouseEnter:e,className:Ct.bgmControlButton,children:C.jsx(d_e,{theme:"filled",size:u,fill:"#fff",strokeWidth:3,strokeLinejoin:"miter"})}),C.jsx("div",{className:Ct.bgmName,children:o}),C.jsx("div",{onClick:()=>{t(),a.set(!a.value)},onMouseEnter:e,className:Ct.bgmControlButton,style:{marginLeft:"auto"},children:C.jsx(l_e,{theme:"filled",size:u,fill:"#fff",strokeWidth:3,strokeLinejoin:"miter"})})]}),a.value&&C.jsxs("div",{className:Ct.bgmListContainer,children:[" ",p]})]})}function wbe(t){const e=wi(!1),{playSeEnter:r,playSeClick:n}=gn();return C.jsxs(C.Fragment,{children:[e.value&&C.jsx("div",{onClick:()=>{e.set(!e.value),n()},className:Ct.showFullContainer,onMouseEnter:r,children:C.jsx("div",{className:Ct.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:Ct.cgElement,children:C.jsx("div",{style:{backgroundImage:`url('${t.imgUrl}')`,backgroundSize:"cover",backgroundPosition:"center",width:"100%",height:"100%"}})},t.name)]})}function Ebe(){const e=Le(l=>l.userData.appreciationData),r=Math.ceil(e.cg.length/8),n=wi(1),{playSeEnter:i,playSeClick:a}=gn(),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:Ct.cgMain,children:[C.jsx("div",{className:Ct.cgShowDiv,children:C.jsx("div",{className:Ct.cgShowDivWarpper,children:u})}),C.jsx("div",{className:Ct.cgContainer,children:o})]})}function Tbe(t,e){return Math.round(Math.random()*(e-t))+t}function Abe(){const{playSeClick:t}=gn(),e=Le(i=>i.GUI.showExtra),r=Mr(),n=Cn("extra.");return C.jsx(C.Fragment,{children:e&&C.jsxs("div",{className:Ct.extra,children:[C.jsxs("div",{className:Ct.extra_top,children:[C.jsx(L3,{className:Ct.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:Ct.extra_title,children:n("title")})]}),C.jsxs("div",{className:Ct.mainContainer,children:[C.jsx(Ebe,{}),C.jsx(Sbe,{})]})]})})}const Cbe="_tag_yghix_2",Pbe="_container_yghix_17",Obe="_showContainer_yghix_1",Rbe="_singleButton_yghix_33",Ibe="_button_text_yghix_37",xr={tag:Cbe,container:Pbe,showContainer:Obe,singleButton:Rbe,button_text:Ibe},kbe=()=>{const t=wi(!1),e=Le(a=>a.stage),r=Mr(),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:xr.tag,onClick:()=>{t.set(!t.value)},children:C.jsx(i_e,{theme:"outline",size:"32",fill:"#fff"})}),t.value&&C.jsxs("div",{className:xr.container,children:[C.jsx("span",{className:xr.singleButton,onClick:()=>{n("showBacklog",!0),n("showTextBox",!1),t.set(!t.value)},children:C.jsx("span",{className:xr.button_text,children:"剧情回想 / BACKLOG"})}),C.jsx("span",{className:xr.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:xr.button_text,children:"重播语音 / REPLAY VOICE"})}),C.jsx("span",{id:"Button_ControlPanel_auto",className:xr.singleButton,onClick:()=>{sN(),t.set(!t.value)},children:C.jsx("span",{className:xr.button_text,children:"自动模式 / AUTO"})}),C.jsx("span",{id:"Button_ControlPanel_fast",className:xr.singleButton,onClick:()=>{fN(),t.set(!t.value)},children:C.jsx("span",{className:xr.button_text,children:"快进 / FAST"})}),C.jsx("span",{className:xr.singleButton,onClick:()=>{t.set(!t.value),i(vt.Save),n("showMenuPanel",!0)},children:C.jsx("span",{className:xr.button_text,children:"存档 / SAVE"})}),C.jsx("span",{className:xr.singleButton,onClick:()=>{t.set(!t.value),i(vt.Load),n("showMenuPanel",!0)},children:C.jsx("span",{className:xr.button_text,children:"读档 / LOAD"})}),C.jsx("span",{className:xr.singleButton,onClick:()=>{t.set(!t.value),i(vt.Option),n("showMenuPanel",!0)},children:C.jsx("span",{className:xr.button_text,children:"选项 / OPTIONS"})}),C.jsx("span",{className:xr.singleButton,onClick:()=>{t.set(!t.value),EE()},children:C.jsx("span",{className:xr.button_text,children:"标题 / TITLE"})})]})]})})},Mbe="_devPanelMain_11x6i_1",Fbe="_devPanelOpener_11x6i_13",_O={devPanelMain:Mbe,devPanelOpener:Fbe};function Nbe(){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 Lbe(){function t(){return!!window.location.hash.match(/dev/)}const e=wi(!1),r=wi(window.location.hash),n=Le(u=>u.stage);ne.useEffect(()=>{window.onhashchange=()=>{r.set(window.location.hash)}},[]);const i=t(),{t:a,i18n:o}=$v(),s=C.jsxs(C.Fragment,{children:[C.jsx("div",{onClick:()=>Nbe(),children:"Save PIXI Screenshot"}),C.jsxs("div",{children:["Current Language:",o.language]}),C.jsx("div",{onClick:()=>{var u;return(u=D.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:_O.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:_O.devPanelOpener,children:"Open Dev Panel"})]})}const Dbe="_trans_8uz61_2",Bbe="_langWrapper_8uz61_10",jbe="_lang_8uz61_10",Ube="_langSelect_8uz61_29",$be="_langSelectButton_8uz61_35",Ku={trans:Dbe,langWrapper:Bbe,lang:jbe,langSelect:Ube,langSelectButton:$be};function Vbe(){const t=V3(),[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:Ku.trans,children:C.jsxs("div",{className:Ku.langWrapper,children:[C.jsx("div",{className:Ku.lang,children:"LANGUAGE SELECT"}),C.jsx("div",{className:Ku.langSelect,children:Object.keys(Jd).map(i=>C.jsx("div",{className:Ku.langSelectButton,onClick:()=>n(Rs[i]),children:Jd[i]},i))})]})})})}const Gbe="_panic_overlay_main_1ysz4_1",Xbe={panic_overlay_main:Gbe},zbe="_yoozle_blue_1r48o_1",Wbe="_yoozle_red_1r48o_5",Ybe="_yoozle_yellow_1r48o_9",Hbe="_yoozle_green_1r48o_13",qbe="_yoozle_e_rotate_1r48o_17",Kbe="_yoozle_container_1r48o_22",Zbe="_yoozle_title_1r48o_28",Qbe="_yoozle_search_1r48o_37",Jbe="_yoozle_search_bar_1r48o_44",eSe="_yoozle_search_buttons_1r48o_51",tSe="_yoozle_button_1r48o_55",_n={yoozle_blue:zbe,yoozle_red:Wbe,yoozle_yellow:Ybe,yoozle_green:Hbe,yoozle_e_rotate:qbe,yoozle_container:Kbe,yoozle_title:Zbe,yoozle_search:Qbe,yoozle_search_bar:Jbe,yoozle_search_buttons:eSe,yoozle_button:tSe},rSe=()=>(ne.useEffect(()=>{const t="Yoozle Search",e=document.title;return document.title=t,()=>{document.title=e}},[]),C.jsxs("div",{className:_n.yoozle_container,children:[C.jsx("div",{className:_n.yoozle_title,children:C.jsxs("span",{children:[C.jsx("span",{className:_n.yoozle_blue,style:{marginRight:"1px"},children:"Y"}),C.jsx("span",{className:_n.yoozle_red,children:"o"}),C.jsx("span",{className:_n.yoozle_yellow,children:"o"}),C.jsx("span",{className:_n.yoozle_blue,children:"z"}),C.jsx("span",{className:_n.yoozle_green,children:"l"}),C.jsx("span",{className:`${_n.yoozle_red} ${_n.yoozle_e_rotate}`,children:"e"})]})}),C.jsxs("div",{className:_n.yoozle_search,children:[C.jsx("input",{className:_n.yoozle_search_bar,type:"text",defaultValue:""}),C.jsxs("div",{className:_n.yoozle_search_buttons,children:[C.jsx("input",{className:_n.yoozle_button,type:"submit",value:"Yoozle Search"}),C.jsx("input",{className:_n.yoozle_button,type:"submit",value:"Feeling Lucky"})]})]})]})),nSe=()=>{const t=Le(n=>n.GUI),[e,r]=ne.useState(!1);return ne.useEffect(()=>{r(t.showPanicOverlay)},[t.showPanicOverlay]),Ji.createPortal(C.jsx("div",{className:e?Xbe.panic_overlay_main:"",children:e&&C.jsx(rSe,{})}),document.querySelector("div#panic-overlay"))};function iSe(){const t=Le(i=>i.userData),e=Le(i=>i.GUI);Mr();const r=t.optionData.fullScreen,n=e.isEnterGame;ne.useEffect(()=>{switch(r){case Zi.on:{n&&(document.documentElement.requestFullscreen(),ll&&ll.lock(["Escape","F11"]));break}case Zi.off:{document.fullscreenElement&&(document.exitFullscreen(),ll&&ll.unlock());break}}},[r])}function aSe(){return ne.useEffect(()=>{N0e()},[]),iSe(),C.jsxs("div",{className:"App",children:[C.jsx(Vbe,{}),C.jsx(H1e,{}),C.jsx(q1e,{}),C.jsx(kbe,{}),C.jsx(K1e,{}),C.jsx(dse,{}),C.jsx(yse,{}),C.jsx(Abe,{}),C.jsx(h1e,{}),C.jsx(E_e,{}),C.jsx(nSe,{}),C.jsx(Lbe,{})]})}function go(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function i1(t,e){return i1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},i1(t,e)}function dm(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&&i1(t,e)}function Kf(t,e){if(e&&(Cr(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 ia(t){return ia=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ia(t)}function oSe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function sSe(t){return WF(t)||oSe(t)||YF(t)||HF()}function xO(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 bO(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||lSe,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 wO(t,e,r){var n=AE(t,e,Object),i=n.obj,a=n.k;i[a]=r}function fSe(t,e,r,n){var i=AE(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 Pp(t,e){var r=AE(t,e),n=r.obj,i=r.k;if(n)return n[i]}function hSe(t,e,r){var n=Pp(t,r);return n!==void 0?n:Pp(e,r)}function W3(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]):W3(t[n],e[n],r):t[n]=e[n]);return t}function Hs(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var dSe={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function pSe(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,function(e){return dSe[e]}):t}var pm=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,vSe=[" ",",","?","!",";"];function mSe(t,e,r){e=e||"",r=r||"";var n=vSe.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 Op(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?Op(u,l,r):void 0}i=i[n[a]]}return i}}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 Xh(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 _Se=function(t){dm(r,t);var e=gSe(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),pm&&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=Pp(this.data,c);return f||!l||typeof o!="string"?f:Op(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),wO(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=Pp(this.data,c)||{};s?W3(f,o,u):f=Xh(Xh({},f),o),wO(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"?Xh(Xh({},{}),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),Y3={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 TO(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 zr(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 AO={},CO=function(t){dm(r,t);var e=xSe(r);function r(n){var i,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Ti(this,r),i=e.call(this),pm&&Po.call(go(i)),cSe(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],n,go(i)),i.options=a,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.logger=Wi.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&&!mSe(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(Cr(a)!=="object"&&this.options.overloadTranslationOptionHandler&&(a=this.options.overloadTranslationOptionHandler(arguments)),Cr(a)==="object"&&(a=zr({},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,b=m&&m.exactUsedKey||f,x=Object.prototype.toString.apply(y),S=["[object Number]","[object Function]","[object RegExp]"],w=a.joinArrays!==void 0?a.joinArrays:this.options.joinArrays,T=!this.i18nFormat||this.i18nFormat.handleAsObject,E=typeof y!="string"&&typeof y!="boolean"&&typeof y!="number";if(T&&y&&E&&S.indexOf(x)<0&&!(typeof w=="string"&&x==="[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,zr(zr({},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=x==="[object Array]",P=O?[]:{},F=O?b:_;for(var k in y)if(Object.prototype.hasOwnProperty.call(y,k)){var B="".concat(F).concat(l).concat(k);P[k]=this.translate(B,zr(zr({},a),{joinArrays:!1,ns:h})),P[k]===B&&(P[k]=y[k])}y=P}}else if(T&&typeof w=="string"&&x==="[object Array]")y=y.join(w),y&&(y=this.extendTranslation(y,i,a,o));else{var U=!1,z=!1,J=a.count!==void 0&&typeof a.count!="string",Q=r.hasDefaultValue(a),$=J?this.pluralResolver.getSuffix(p,a.count,a):"",M=a["defaultValue".concat($)]||a.defaultValue;!this.isValidLookup(y)&&Q&&(U=!0,y=M),this.isValidLookup(y)||(z=!0,y=f);var G=a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,V=G&&z?void 0:y,j=Q&&M!==y&&this.options.updateMissing;if(z||U||j){if(this.logger.log(j?"updateKey":"missingKey",p,d,f,j?M:y),l){var H=this.resolve(f,zr(zr({},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(b){a.isValidLookup(s)||(f=b,!AO["".concat(_[0],"-").concat(b)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(f)&&(AO["".concat(_[0],"-").concat(b)]=!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(x){if(!a.isValidLookup(s)){c=x;var S=[p];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(S,p,x,b,o);else{var w;g&&(w=a.pluralResolver.getSuffix(x,o.count,o));var T="".concat(a.options.pluralSeparator,"zero");if(g&&(S.push(p+w),m&&S.push(p+T)),y){var E="".concat(p).concat(a.options.contextSeparator).concat(o.context);S.push(E),g&&(S.push(E+w),m&&S.push(E+T))}}for(var A;A=S.pop();)a.isValidLookup(s)||(l=A,s=a.getResource(x,b,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 Gy(t){return t.charAt(0).toUpperCase()+t.slice(1)}var PO=function(){function t(e){Ti(this,t),this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Wi.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]=Gy(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]=Gy(i[1].toLowerCase())),n.indexOf(i[2].toLowerCase())>-1&&(i[2]=Gy(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}(),SSe=[{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}],wSe={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}},ESe=["v1","v2","v3"],OO={zero:0,one:1,two:2,few:3,many:4,other:5};function TSe(){var t={};return SSe.forEach(function(e){e.lngs.forEach(function(r){t[r]={numbers:e.nr,plurals:wSe[e.fc]}})}),t}var ASe=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=Wi.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=TSe()}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 OO[o]-OO[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!ESe.includes(this.options.compatibilityJSON)}}]),t}();function RO(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=hSe(t,e,r);return!a&&i&&typeof r=="string"&&(a=Op(t,r,n),a===void 0&&(a=Op(e,r,n))),a}var CSe=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ti(this,t),this.logger=Wi.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:pSe,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?Hs(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?Hs(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?Hs(n.nestingPrefix):n.nestingPrefixEscaped||Hs("$t("),this.nestingSuffix=n.nestingSuffix?Hs(n.nestingSuffix):n.nestingSuffixEscaped||Hs(")"),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=IO(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),b=_.shift().trim(),x=_.join(o.formatSeparator).trim();return o.format(IO(n,c,b,o.options.keySeparator,o.options.ignoreJSONStructure),x,i,fi(fi(fi({},a),n),{},{interpolationkey:b}))};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=SO(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(b){return this.logger.warn("failed parsing options string in nesting for key ".concat(d),b),"".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=SO(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 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 ba(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=sSe(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 qs(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 OSe=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ti(this,t),this.logger=Wi.create("formatter"),this.options=e,this.formats={number:qs(function(r,n){var i=new Intl.NumberFormat(r,ba({},n));return function(a){return i.format(a)}}),currency:qs(function(r,n){var i=new Intl.NumberFormat(r,ba(ba({},n),{},{style:"currency"}));return function(a){return i.format(a)}}),datetime:qs(function(r,n){var i=new Intl.DateTimeFormat(r,ba({},n));return function(a){return i.format(a)}}),relativetime:qs(function(r,n){var i=new Intl.RelativeTimeFormat(r,ba({},n));return function(a){return i.format(a,n.range||"day")}}),list:qs(function(r,n){var i=new Intl.ListFormat(r,ba({},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()]=qs(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=PSe(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,ba(ba(ba({},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 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;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 kSe(t,e){t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)}var MSe=function(t){dm(r,t);var e=RSe(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),pm&&Po.call(go(o)),o.backend=n,o.store=i,o.services=a,o.languageUtils=a.languageUtils,o.options=s,o.logger=Wi.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){fSe(f.loaded,[u],l),kSe(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=FO(FO({},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 NO(){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(Cr(e[1])==="object"&&(r=e[1]),typeof e[1]=="string"&&(r.defaultValue=e[1]),typeof e[2]=="string"&&(r.tDescription=e[2]),Cr(e[2])==="object"||Cr(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 LO(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 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 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 zh(){}function LSe(t){var e=Object.getOwnPropertyNames(Object.getPrototypeOf(t));e.forEach(function(r){typeof t[r]=="function"&&(t[r]=t[r].bind(t))})}var Rp=function(t){dm(r,t);var e=FSe(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),pm&&Po.call(go(n)),n.options=LO(i),n.services={},n.logger=Wi,n.modules={external:[]},LSe(go(n)),a&&!n.isInitialized&&!i.isClone){if(!n.options.initImmediate)return n.init(i,a),Kf(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=NO();this.options=Di(Di(Di({},s),this.options),LO(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?Wi.init(u(this.modules.logger),this.options):Wi.init(null,this.options);var l;this.modules.formatter?l=this.modules.formatter:typeof Intl<"u"&&(l=OSe);var c=new PO(this.options);this.store=new _Se(this.options.resources,this.options);var f=this.services;f.logger=Wi,f.resourceStore=this.store,f.languageUtils=c,f.pluralResolver=new ASe(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 CSe(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new MSe(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),b=1;b1?y-1:0),b=1;b0&&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=Zu(),g=function(){var y=function(b,x){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(x),o(b,x)};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]:zh,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=Zu();return i||(i=this.languages),a||(a=this.options.ns),o||(o=zh),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"&&Y3.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=Zu();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(Cr(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=Zu();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=Zu();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 PO(NO());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]:zh,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 CO(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 Rp(t,e)});var tn=Rp.createInstance();tn.createInstance=Rp.createInstance;tn.createInstance;tn.dir;tn.init;tn.loadResources;tn.reloadResources;tn.use;tn.changeLanguage;tn.getFixedT;tn.t;tn.exists;tn.setDefaultNamespace;tn.hasLoadedNamespace;tn.loadNamespaces;tn.loadLanguages;tn.use($ie).init({resources:zz||{},lng:Rs[Wz]||"zhCn",fallbackLng:"zhCn",interpolation:{escapeValue:!1}}).then(()=>console.log("WebGAL i18n Ready!"));Ji.render(C.jsx(fe.StrictMode,{children:C.jsx(zie,{children:C.jsx(Ere,{store:te,children:C.jsx(aSe,{})})})}),document.getElementById("root"));export{dr as C,Qn as S,Me as T,D as W,USe as r}; diff --git a/packages/terre2/assets/templates/WebGAL_Template/assets/initRegister-f1733106.js b/packages/terre2/assets/templates/WebGAL_Template/assets/initRegister-ac7bb12e.js similarity index 97% rename from packages/terre2/assets/templates/WebGAL_Template/assets/initRegister-f1733106.js rename to packages/terre2/assets/templates/WebGAL_Template/assets/initRegister-ac7bb12e.js index 3aa127eb5..0fdf9e4e6 100644 --- a/packages/terre2/assets/templates/WebGAL_Template/assets/initRegister-f1733106.js +++ b/packages/terre2/assets/templates/WebGAL_Template/assets/initRegister-ac7bb12e.js @@ -1 +1 @@ -import{r as S,W as h,C as u,T as w,S as C}from"./index-d19e8019.js";const k=g=>{const y=h.gameplay.pixiStage.effectsContainer,l=h.gameplay.pixiStage.currentApp,e=new u;y.addChild(e);const n=w.from("./game/tex/cherryBlossoms.png");e.x=l.screen.width/2,e.y=l.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 p(c){const o=new C(n);let r=.25;o.scale.x=.15*r,o.scale.y=.15*r,o.anchor.set(.5),o.x=Math.random()*2560-.5*2560,o.y=0-.5*1440,o.dropSpeed=Math.random()*5,o.acc=Math.random(),e.addChild(o),i.push(o);let s=0;for(const t of i){s++;const a=Math.random();t.dropSpeed=t.acc*.01+t.dropSpeed,t.y+=c*g*t.dropSpeed*.3+.7,s%2===0?(t.x+=c*a*.5,t.rotation+=c*a*.03):(t.x-=c*a*.5,t.rotation-=c*a*.03)}i.length>=200&&(i.unshift(),e.removeChild(e.children[0]))}return h.gameplay.pixiStage.registerAnimation({setStartState:()=>{},setEndState:()=>{},tickerFunc:p},"cherryBlossoms-Ticker"),{container:e,tickerKey:"cherryBlossoms-Ticker"}};S("cherryBlossoms",()=>k(3));const M=(g,f)=>{var d;const l=h.gameplay.pixiStage.effectsContainer,e=h.gameplay.pixiStage.currentApp,n=new u;l.addChild(n);const i=w.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 p=[];function c(x){for(let s=0;s=.5&&(t.alpha=.5),t.alpha<=.2&&(t.alpha=.2),n.addChild(t),p.push(t)}for(const s of p)s.dropSpeed=s.acc*.01+s.dropSpeed,s.y+=x*g*s.dropSpeed*1.1+3;p.length>=2500&&(p.unshift(),n.removeChild(n.children[0]))}return(d=h.gameplay.pixiStage)==null||d.registerAnimation({setStartState:()=>{},setEndState:()=>{},tickerFunc:c},"rain-Ticker"),{container:n,tickerKey:"rain-Ticker"}};S("rain",()=>M(6,10));const W=g=>{var c;const y=h.gameplay.pixiStage.effectsContainer,l=h.gameplay.pixiStage.currentApp,e=new u;y.addChild(e);const n=w.from("./game/tex/snowFlake_min.png");e.x=l.screen.width/2,e.y=l.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 p(d){const r=new C(n);let s=Math.random();s<=.5&&(s=.5),r.scale.x=.144*s,r.scale.y=.144*s,r.anchor.set(.5),r.x=Math.random()*2560-.5*2560,r.y=0-.5*1440,r.dropSpeed=Math.random()*2,r.acc=Math.random(),e.addChild(r),i.push(r);let t=0;for(const a of i){t++;const m=Math.random();a.dropSpeed=a.acc*.01+a.dropSpeed,a.y+=d*g*a.dropSpeed*.3+.7,t%2===0?(a.x+=d*m*.5,a.rotation+=d*m*.03):(a.x-=d*m*.5,a.rotation-=d*m*.03)}i.length>=500&&(i.unshift(),e.removeChild(e.children[0]))}return(c=h.gameplay.pixiStage)==null||c.registerAnimation({setStartState:()=>{},setEndState:()=>{},tickerFunc:p},"snow-Ticker"),{container:e,tickerKey:"snow-Ticker"}};S("snow",()=>W(3)); +import{r as S,W as h,C as u,T as w,S as C}from"./index-99adfccc.js";const k=g=>{const y=h.gameplay.pixiStage.effectsContainer,l=h.gameplay.pixiStage.currentApp,e=new u;y.addChild(e);const n=w.from("./game/tex/cherryBlossoms.png");e.x=l.screen.width/2,e.y=l.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 p(c){const o=new C(n);let r=.25;o.scale.x=.15*r,o.scale.y=.15*r,o.anchor.set(.5),o.x=Math.random()*2560-.5*2560,o.y=0-.5*1440,o.dropSpeed=Math.random()*5,o.acc=Math.random(),e.addChild(o),i.push(o);let s=0;for(const t of i){s++;const a=Math.random();t.dropSpeed=t.acc*.01+t.dropSpeed,t.y+=c*g*t.dropSpeed*.3+.7,s%2===0?(t.x+=c*a*.5,t.rotation+=c*a*.03):(t.x-=c*a*.5,t.rotation-=c*a*.03)}i.length>=200&&(i.unshift(),e.removeChild(e.children[0]))}return h.gameplay.pixiStage.registerAnimation({setStartState:()=>{},setEndState:()=>{},tickerFunc:p},"cherryBlossoms-Ticker"),{container:e,tickerKey:"cherryBlossoms-Ticker"}};S("cherryBlossoms",()=>k(3));const M=(g,f)=>{var d;const l=h.gameplay.pixiStage.effectsContainer,e=h.gameplay.pixiStage.currentApp,n=new u;l.addChild(n);const i=w.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 p=[];function c(x){for(let s=0;s=.5&&(t.alpha=.5),t.alpha<=.2&&(t.alpha=.2),n.addChild(t),p.push(t)}for(const s of p)s.dropSpeed=s.acc*.01+s.dropSpeed,s.y+=x*g*s.dropSpeed*1.1+3;p.length>=2500&&(p.unshift(),n.removeChild(n.children[0]))}return(d=h.gameplay.pixiStage)==null||d.registerAnimation({setStartState:()=>{},setEndState:()=>{},tickerFunc:c},"rain-Ticker"),{container:n,tickerKey:"rain-Ticker"}};S("rain",()=>M(6,10));const W=g=>{var c;const y=h.gameplay.pixiStage.effectsContainer,l=h.gameplay.pixiStage.currentApp,e=new u;y.addChild(e);const n=w.from("./game/tex/snowFlake_min.png");e.x=l.screen.width/2,e.y=l.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 p(d){const r=new C(n);let s=Math.random();s<=.5&&(s=.5),r.scale.x=.144*s,r.scale.y=.144*s,r.anchor.set(.5),r.x=Math.random()*2560-.5*2560,r.y=0-.5*1440,r.dropSpeed=Math.random()*2,r.acc=Math.random(),e.addChild(r),i.push(r);let t=0;for(const a of i){t++;const m=Math.random();a.dropSpeed=a.acc*.01+a.dropSpeed,a.y+=d*g*a.dropSpeed*.3+.7,t%2===0?(a.x+=d*m*.5,a.rotation+=d*m*.03):(a.x-=d*m*.5,a.rotation-=d*m*.03)}i.length>=500&&(i.unshift(),e.removeChild(e.children[0]))}return(c=h.gameplay.pixiStage)==null||c.registerAnimation({setStartState:()=>{},setEndState:()=>{},tickerFunc:p},"snow-Ticker"),{container:e,tickerKey:"snow-Ticker"}};S("snow",()=>W(3)); diff --git a/packages/terre2/assets/templates/WebGAL_Template/index.html b/packages/terre2/assets/templates/WebGAL_Template/index.html index d3c4f0750..84ade2f99 100644 --- a/packages/terre2/assets/templates/WebGAL_Template/index.html +++ b/packages/terre2/assets/templates/WebGAL_Template/index.html @@ -7,7 +7,7 @@ WebGAL - +