var Zi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function nr(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function RG(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function i(){return this instanceof i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(i){var n=Object.getOwnPropertyDescriptor(s,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return s[i]}})}),t}var kD={exports:{}},qE={},xD={exports:{}},$e={};/** * @license React * react.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 cg=Symbol.for("react.element"),SG=Symbol.for("react.portal"),bG=Symbol.for("react.fragment"),AG=Symbol.for("react.strict_mode"),OG=Symbol.for("react.profiler"),wG=Symbol.for("react.provider"),CG=Symbol.for("react.context"),MG=Symbol.for("react.forward_ref"),NG=Symbol.for("react.suspense"),PG=Symbol.for("react.memo"),kG=Symbol.for("react.lazy"),TC=Symbol.iterator;function xG(s){return s===null||typeof s!="object"?null:(s=TC&&s[TC]||s["@@iterator"],typeof s=="function"?s:null)}var DD={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},LD=Object.assign,UD={};function ff(s,e,t){this.props=s,this.context=e,this.refs=UD,this.updater=t||DD}ff.prototype.isReactComponent={};ff.prototype.setState=function(s,e){if(typeof s!="object"&&typeof s!="function"&&s!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,s,e,"setState")};ff.prototype.forceUpdate=function(s){this.updater.enqueueForceUpdate(this,s,"forceUpdate")};function FD(){}FD.prototype=ff.prototype;function vO(s,e,t){this.props=s,this.context=e,this.refs=UD,this.updater=t||DD}var EO=vO.prototype=new FD;EO.constructor=vO;LD(EO,ff.prototype);EO.isPureReactComponent=!0;var IC=Array.isArray,BD=Object.prototype.hasOwnProperty,yO={current:null},GD={key:!0,ref:!0,__self:!0,__source:!0};function VD(s,e,t){var i,n={},r=null,a=null;if(e!=null)for(i in e.ref!==void 0&&(a=e.ref),e.key!==void 0&&(r=""+e.key),e)BD.call(e,i)&&!GD.hasOwnProperty(i)&&(n[i]=e[i]);var o=arguments.length-2;if(o===1)n.children=t;else if(1>>1,fe=H[$];if(0>>1;$n(De,B))wen(it,De)?(H[$]=it,H[we]=B,$=we):(H[$]=De,H[me]=B,$=me);else if(wen(it,B))H[$]=it,H[we]=B,$=we;else break e}}return J}function n(H,J){var B=H.sortIndex-J.sortIndex;return B!==0?B:H.id-J.id}if(typeof performance=="object"&&typeof performance.now=="function"){var r=performance;s.unstable_now=function(){return r.now()}}else{var a=Date,o=a.now();s.unstable_now=function(){return a.now()-o}}var l=[],u=[],c=1,h=null,f=3,d=!1,_=!1,g=!1,p=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function E(H){for(var J=t(u);J!==null;){if(J.callback===null)i(u);else if(J.startTime<=H)i(u),J.sortIndex=J.expirationTime,e(l,J);else break;J=t(u)}}function y(H){if(g=!1,E(H),!_)if(t(l)!==null)_=!0,Y(T);else{var J=t(u);J!==null&&K(y,J.startTime-H)}}function T(H,J){_=!1,g&&(g=!1,m(N),N=-1),d=!0;var B=f;try{for(E(J),h=t(l);h!==null&&(!(h.expirationTime>J)||H&&!L());){var $=h.callback;if(typeof $=="function"){h.callback=null,f=h.priorityLevel;var fe=$(h.expirationTime<=J);J=s.unstable_now(),typeof fe=="function"?h.callback=fe:h===t(l)&&i(l),E(J)}else i(l);h=t(l)}if(h!==null)var xe=!0;else{var me=t(u);me!==null&&K(y,me.startTime-J),xe=!1}return xe}finally{h=null,f=B,d=!1}}var w=!1,C=null,N=-1,P=5,k=-1;function L(){return!(s.unstable_now()-kH||125$?(H.sortIndex=B,e(u,H),t(l)===null&&H===t(u)&&(g?(m(N),N=-1):g=!0,K(y,B-$))):(H.sortIndex=fe,e(l,H),_||d||(_=!0,Y(T))),H},s.unstable_shouldYield=L,s.unstable_wrapCallback=function(H){var J=f;return function(){var B=f;f=J;try{return H.apply(this,arguments)}finally{f=B}}}})(YD);WD.exports=YD;var WG=WD.exports;/** * @license React * 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 YG=D,on=WG;function W(s){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+s,t=1;t"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),jT=Object.prototype.hasOwnProperty,XG=/^[: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]*$/,SC={},bC={};function KG(s){return jT.call(bC,s)?!0:jT.call(SC,s)?!1:XG.test(s)?bC[s]=!0:(SC[s]=!0,!1)}function qG(s,e,t,i){if(t!==null&&t.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return i?!1:t!==null?!t.acceptsBooleans:(s=s.toLowerCase().slice(0,5),s!=="data-"&&s!=="aria-");default:return!1}}function $G(s,e,t,i){if(e===null||typeof e>"u"||qG(s,e,t,i))return!0;if(i)return!1;if(t!==null)switch(t.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 vs(s,e,t,i,n,r,a){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=i,this.attributeNamespace=n,this.mustUseProperty=t,this.propertyName=s,this.type=e,this.sanitizeURL=r,this.removeEmptyString=a}var zi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(s){zi[s]=new vs(s,0,!1,s,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(s){var e=s[0];zi[e]=new vs(e,1,!1,s[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(s){zi[s]=new vs(s,2,!1,s.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(s){zi[s]=new vs(s,2,!1,s,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(s){zi[s]=new vs(s,3,!1,s.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(s){zi[s]=new vs(s,3,!0,s,null,!1,!1)});["capture","download"].forEach(function(s){zi[s]=new vs(s,4,!1,s,null,!1,!1)});["cols","rows","size","span"].forEach(function(s){zi[s]=new vs(s,6,!1,s,null,!1,!1)});["rowSpan","start"].forEach(function(s){zi[s]=new vs(s,5,!1,s.toLowerCase(),null,!1,!1)});var IO=/[\-:]([a-z])/g;function RO(s){return s[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(s){var e=s.replace(IO,RO);zi[e]=new vs(e,1,!1,s,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(s){var e=s.replace(IO,RO);zi[e]=new vs(e,1,!1,s,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(s){var e=s.replace(IO,RO);zi[e]=new vs(e,1,!1,s,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(s){zi[s]=new vs(s,1,!1,s.toLowerCase(),null,!1,!1)});zi.xlinkHref=new vs("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(s){zi[s]=new vs(s,1,!1,s.toLowerCase(),null,!0,!0)});function SO(s,e,t,i){var n=zi.hasOwnProperty(e)?zi[e]:null;(n!==null?n.type!==0:i||!(2o||n[a]!==r[o]){var l=` `+n[a].replace(" at new "," at ");return s.displayName&&l.includes("")&&(l=l.replace("",s.displayName)),l}while(1<=a&&0<=o);break}}}finally{H0=!1,Error.prepareStackTrace=t}return(s=s?s.displayName||s.name:"")?Ff(s):""}function QG(s){switch(s.tag){case 5:return Ff(s.type);case 16:return Ff("Lazy");case 13:return Ff("Suspense");case 19:return Ff("SuspenseList");case 0:case 2:case 15:return s=W0(s.type,!1),s;case 11:return s=W0(s.type.render,!1),s;case 1:return s=W0(s.type,!0),s;default:return""}}function YT(s){if(s==null)return null;if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case dh:return"Fragment";case fh:return"Portal";case zT:return"Profiler";case bO:return"StrictMode";case HT:return"Suspense";case WT:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case qD:return(s.displayName||"Context")+".Consumer";case KD:return(s._context.displayName||"Context")+".Provider";case AO:var e=s.render;return s=s.displayName,s||(s=e.displayName||e.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case OO:return e=s.displayName||null,e!==null?e:YT(s.type)||"Memo";case Za:e=s._payload,s=s._init;try{return YT(s(e))}catch{}}return null}function ZG(s){var e=s.type;switch(s.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return s=e.render,s=s.displayName||s.name||"",e.displayName||(s!==""?"ForwardRef("+s+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return YT(e);case 8:return e===bO?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Qo(s){switch(typeof s){case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function QD(s){var e=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function JG(s){var e=QD(s)?"checked":"value",t=Object.getOwnPropertyDescriptor(s.constructor.prototype,e),i=""+s[e];if(!s.hasOwnProperty(e)&&typeof t<"u"&&typeof t.get=="function"&&typeof t.set=="function"){var n=t.get,r=t.set;return Object.defineProperty(s,e,{configurable:!0,get:function(){return n.call(this)},set:function(a){i=""+a,r.call(this,a)}}),Object.defineProperty(s,e,{enumerable:t.enumerable}),{getValue:function(){return i},setValue:function(a){i=""+a},stopTracking:function(){s._valueTracker=null,delete s[e]}}}}function Ng(s){s._valueTracker||(s._valueTracker=JG(s))}function ZD(s){if(!s)return!1;var e=s._valueTracker;if(!e)return!0;var t=e.getValue(),i="";return s&&(i=QD(s)?s.checked?"true":"false":s.value),s=i,s!==t?(e.setValue(s),!0):!1}function tm(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}function XT(s,e){var t=e.checked;return Xt({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:t??s._wrapperState.initialChecked})}function OC(s,e){var t=e.defaultValue==null?"":e.defaultValue,i=e.checked!=null?e.checked:e.defaultChecked;t=Qo(e.value!=null?e.value:t),s._wrapperState={initialChecked:i,initialValue:t,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function JD(s,e){e=e.checked,e!=null&&SO(s,"checked",e,!1)}function KT(s,e){JD(s,e);var t=Qo(e.value),i=e.type;if(t!=null)i==="number"?(t===0&&s.value===""||s.value!=t)&&(s.value=""+t):s.value!==""+t&&(s.value=""+t);else if(i==="submit"||i==="reset"){s.removeAttribute("value");return}e.hasOwnProperty("value")?qT(s,e.type,t):e.hasOwnProperty("defaultValue")&&qT(s,e.type,Qo(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(s.defaultChecked=!!e.defaultChecked)}function wC(s,e,t){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var i=e.type;if(!(i!=="submit"&&i!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+s._wrapperState.initialValue,t||e===s.value||(s.value=e),s.defaultValue=e}t=s.name,t!==""&&(s.name=""),s.defaultChecked=!!s._wrapperState.initialChecked,t!==""&&(s.name=t)}function qT(s,e,t){(e!=="number"||tm(s.ownerDocument)!==s)&&(t==null?s.defaultValue=""+s._wrapperState.initialValue:s.defaultValue!==""+t&&(s.defaultValue=""+t))}var Bf=Array.isArray;function Rc(s,e,t,i){if(s=s.options,e){e={};for(var n=0;n"+e.valueOf().toString()+"",e=Pg.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;e.firstChild;)s.appendChild(e.firstChild)}});function c_(s,e){if(e){var t=s.firstChild;if(t&&t===s.lastChild&&t.nodeType===3){t.nodeValue=e;return}}s.textContent=e}var Kf={animationIterationCount:!0,aspectRatio:!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},e8=["Webkit","ms","Moz","O"];Object.keys(Kf).forEach(function(s){e8.forEach(function(e){e=e+s.charAt(0).toUpperCase()+s.substring(1),Kf[e]=Kf[s]})});function sL(s,e,t){return e==null||typeof e=="boolean"||e===""?"":t||typeof e!="number"||e===0||Kf.hasOwnProperty(s)&&Kf[s]?(""+e).trim():e+"px"}function nL(s,e){s=s.style;for(var t in e)if(e.hasOwnProperty(t)){var i=t.indexOf("--")===0,n=sL(t,e[t],i);t==="float"&&(t="cssFloat"),i?s.setProperty(t,n):s[t]=n}}var t8=Xt({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 ZT(s,e){if(e){if(t8[s]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(W(137,s));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(W(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(W(61))}if(e.style!=null&&typeof e.style!="object")throw Error(W(62))}}function JT(s,e){if(s.indexOf("-")===-1)return typeof e.is=="string";switch(s){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}}var eI=null;function wO(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var tI=null,Sc=null,bc=null;function NC(s){if(s=_g(s)){if(typeof tI!="function")throw Error(W(280));var e=s.stateNode;e&&(e=e0(e),tI(s.stateNode,s.type,e))}}function rL(s){Sc?bc?bc.push(s):bc=[s]:Sc=s}function aL(){if(Sc){var s=Sc,e=bc;if(bc=Sc=null,NC(s),e)for(s=0;s>>=0,s===0?32:31-(f8(s)/d8|0)|0}var kg=64,xg=4194304;function Gf(s){switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return s&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return s}}function rm(s,e){var t=s.pendingLanes;if(t===0)return 0;var i=0,n=s.suspendedLanes,r=s.pingedLanes,a=t&268435455;if(a!==0){var o=a&~n;o!==0?i=Gf(o):(r&=a,r!==0&&(i=Gf(r)))}else a=t&~n,a!==0?i=Gf(a):r!==0&&(i=Gf(r));if(i===0)return 0;if(e!==0&&e!==i&&!(e&n)&&(n=i&-i,r=e&-e,n>=r||n===16&&(r&4194240)!==0))return e;if(i&4&&(i|=t&16),e=s.entangledLanes,e!==0)for(s=s.entanglements,e&=i;0t;t++)e.push(s);return e}function fg(s,e,t){s.pendingLanes|=e,e!==536870912&&(s.suspendedLanes=0,s.pingedLanes=0),s=s.eventTimes,e=31-Zn(e),s[e]=t}function m8(s,e){var t=s.pendingLanes&~e;s.pendingLanes=e,s.suspendedLanes=0,s.pingedLanes=0,s.expiredLanes&=e,s.mutableReadLanes&=e,s.entangledLanes&=e,e=s.entanglements;var i=s.eventTimes;for(s=s.expirationTimes;0=$f),GC=" ",VC=!1;function AL(s,e){switch(s){case"keyup":return W8.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function OL(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var _h=!1;function X8(s,e){switch(s){case"compositionend":return OL(e);case"keypress":return e.which!==32?null:(VC=!0,GC);case"textInput":return s=e.data,s===GC&&VC?null:s;default:return null}}function K8(s,e){if(_h)return s==="compositionend"||!LO&&AL(s,e)?(s=SL(),Mp=kO=Oo=null,_h=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:t,offset:e-s};s=i}e:{for(;t;){if(t.nextSibling){t=t.nextSibling;break e}t=t.parentNode}t=void 0}t=WC(t)}}function NL(s,e){return s&&e?s===e?!0:s&&s.nodeType===3?!1:e&&e.nodeType===3?NL(s,e.parentNode):"contains"in s?s.contains(e):s.compareDocumentPosition?!!(s.compareDocumentPosition(e)&16):!1:!1}function PL(){for(var s=window,e=tm();e instanceof s.HTMLIFrameElement;){try{var t=typeof e.contentWindow.location.href=="string"}catch{t=!1}if(t)s=e.contentWindow;else break;e=tm(s.document)}return e}function UO(s){var e=s&&s.nodeName&&s.nodeName.toLowerCase();return e&&(e==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||e==="textarea"||s.contentEditable==="true")}function s7(s){var e=PL(),t=s.focusedElem,i=s.selectionRange;if(e!==t&&t&&t.ownerDocument&&NL(t.ownerDocument.documentElement,t)){if(i!==null&&UO(t)){if(e=i.start,s=i.end,s===void 0&&(s=e),"selectionStart"in t)t.selectionStart=e,t.selectionEnd=Math.min(s,t.value.length);else if(s=(e=t.ownerDocument||document)&&e.defaultView||window,s.getSelection){s=s.getSelection();var n=t.textContent.length,r=Math.min(i.start,n);i=i.end===void 0?r:Math.min(i.end,n),!s.extend&&r>i&&(n=i,i=r,r=n),n=YC(t,r);var a=YC(t,i);n&&a&&(s.rangeCount!==1||s.anchorNode!==n.node||s.anchorOffset!==n.offset||s.focusNode!==a.node||s.focusOffset!==a.offset)&&(e=e.createRange(),e.setStart(n.node,n.offset),s.removeAllRanges(),r>i?(s.addRange(e),s.extend(a.node,a.offset)):(e.setEnd(a.node,a.offset),s.addRange(e)))}}for(e=[],s=t;s=s.parentNode;)s.nodeType===1&&e.push({element:s,left:s.scrollLeft,top:s.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t=document.documentMode,gh=null,oI=null,Zf=null,lI=!1;function XC(s,e,t){var i=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;lI||gh==null||gh!==tm(i)||(i=gh,"selectionStart"in i&&UO(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),Zf&&m_(Zf,i)||(Zf=i,i=lm(oI,"onSelect"),0vh||(s.current=_I[vh],_I[vh]=null,vh--)}function wt(s,e){vh++,_I[vh]=s.current,s.current=e}var Zo={},is=ol(Zo),ks=ol(!1),Cu=Zo;function Uc(s,e){var t=s.type.contextTypes;if(!t)return Zo;var i=s.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===e)return i.__reactInternalMemoizedMaskedChildContext;var n={},r;for(r in t)n[r]=e[r];return i&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=e,s.__reactInternalMemoizedMaskedChildContext=n),n}function xs(s){return s=s.childContextTypes,s!=null}function hm(){Pt(ks),Pt(is)}function eM(s,e,t){if(is.current!==Zo)throw Error(W(168));wt(is,e),wt(ks,t)}function VL(s,e,t){var i=s.stateNode;if(e=e.childContextTypes,typeof i.getChildContext!="function")return t;i=i.getChildContext();for(var n in i)if(!(n in e))throw Error(W(108,ZG(s)||"Unknown",n));return Xt({},t,i)}function cm(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMergedChildContext||Zo,Cu=is.current,wt(is,s),wt(ks,ks.current),!0}function tM(s,e,t){var i=s.stateNode;if(!i)throw Error(W(169));t?(s=VL(s,e,Cu),i.__reactInternalMemoizedMergedChildContext=s,Pt(ks),Pt(is),wt(is,s)):Pt(ks),wt(ks,t)}var fa=null,t0=!1,ry=!1;function jL(s){fa===null?fa=[s]:fa.push(s)}function g7(s){t0=!0,jL(s)}function ll(){if(!ry&&fa!==null){ry=!0;var s=0,e=Et;try{var t=fa;for(Et=1;s>=a,n-=a,ya=1<<32-Zn(e)+n|t<N?(P=C,C=null):P=C.sibling;var k=f(m,C,E[N],y);if(k===null){C===null&&(C=P);break}s&&C&&k.alternate===null&&e(m,C),v=r(k,v,N),w===null?T=k:w.sibling=k,w=k,C=P}if(N===E.length)return t(m,C),Ft&&Rl(m,N),T;if(C===null){for(;NN?(P=C,C=null):P=C.sibling;var L=f(m,C,k.value,y);if(L===null){C===null&&(C=P);break}s&&C&&L.alternate===null&&e(m,C),v=r(L,v,N),w===null?T=L:w.sibling=L,w=L,C=P}if(k.done)return t(m,C),Ft&&Rl(m,N),T;if(C===null){for(;!k.done;N++,k=E.next())k=h(m,k.value,y),k!==null&&(v=r(k,v,N),w===null?T=k:w.sibling=k,w=k);return Ft&&Rl(m,N),T}for(C=i(m,C);!k.done;N++,k=E.next())k=d(C,m,N,k.value,y),k!==null&&(s&&k.alternate!==null&&C.delete(k.key===null?N:k.key),v=r(k,v,N),w===null?T=k:w.sibling=k,w=k);return s&&C.forEach(function(j){return e(m,j)}),Ft&&Rl(m,N),T}function p(m,v,E,y){if(typeof E=="object"&&E!==null&&E.type===dh&&E.key===null&&(E=E.props.children),typeof E=="object"&&E!==null){switch(E.$$typeof){case Mg:e:{for(var T=E.key,w=v;w!==null;){if(w.key===T){if(T=E.type,T===dh){if(w.tag===7){t(m,w.sibling),v=n(w,E.props.children),v.return=m,m=v;break e}}else if(w.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Za&&nM(T)===w.type){t(m,w.sibling),v=n(w,E.props),v.ref=Af(m,w,E),v.return=m,m=v;break e}t(m,w);break}else e(m,w);w=w.sibling}E.type===dh?(v=yu(E.props.children,m.mode,y,E.key),v.return=m,m=v):(y=Fp(E.type,E.key,E.props,null,m.mode,y),y.ref=Af(m,v,E),y.return=m,m=y)}return a(m);case fh:e:{for(w=E.key;v!==null;){if(v.key===w)if(v.tag===4&&v.stateNode.containerInfo===E.containerInfo&&v.stateNode.implementation===E.implementation){t(m,v.sibling),v=n(v,E.children||[]),v.return=m,m=v;break e}else{t(m,v);break}else e(m,v);v=v.sibling}v=dy(E,m.mode,y),v.return=m,m=v}return a(m);case Za:return w=E._init,p(m,v,w(E._payload),y)}if(Bf(E))return _(m,v,E,y);if(Tf(E))return g(m,v,E,y);Vg(m,E)}return typeof E=="string"&&E!==""||typeof E=="number"?(E=""+E,v!==null&&v.tag===6?(t(m,v.sibling),v=n(v,E),v.return=m,m=v):(t(m,v),v=fy(E,m.mode,y),v.return=m,m=v),a(m)):t(m,v)}return p}var Bc=YL(!0),XL=YL(!1),_m=ol(null),gm=null,Th=null,VO=null;function jO(){VO=Th=gm=null}function zO(s){var e=_m.current;Pt(_m),s._currentValue=e}function mI(s,e,t){for(;s!==null;){var i=s.alternate;if((s.childLanes&e)!==e?(s.childLanes|=e,i!==null&&(i.childLanes|=e)):i!==null&&(i.childLanes&e)!==e&&(i.childLanes|=e),s===t)break;s=s.return}}function Oc(s,e){gm=s,VO=Th=null,s=s.dependencies,s!==null&&s.firstContext!==null&&(s.lanes&e&&(Ps=!0),s.firstContext=null)}function kn(s){var e=s._currentValue;if(VO!==s)if(s={context:s,memoizedValue:e,next:null},Th===null){if(gm===null)throw Error(W(308));Th=s,gm.dependencies={lanes:0,firstContext:s}}else Th=Th.next=s;return e}var hu=null;function HO(s){hu===null?hu=[s]:hu.push(s)}function KL(s,e,t,i){var n=e.interleaved;return n===null?(t.next=t,HO(e)):(t.next=n.next,n.next=t),e.interleaved=t,Fa(s,i)}function Fa(s,e){s.lanes|=e;var t=s.alternate;for(t!==null&&(t.lanes|=e),t=s,s=s.return;s!==null;)s.childLanes|=e,t=s.alternate,t!==null&&(t.childLanes|=e),t=s,s=s.return;return t.tag===3?t.stateNode:null}var Ja=!1;function WO(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function qL(s,e){s=s.updateQueue,e.updateQueue===s&&(e.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,effects:s.effects})}function Na(s,e){return{eventTime:s,lane:e,tag:0,payload:null,callback:null,next:null}}function jo(s,e,t){var i=s.updateQueue;if(i===null)return null;if(i=i.shared,ut&2){var n=i.pending;return n===null?e.next=e:(e.next=n.next,n.next=e),i.pending=e,Fa(s,t)}return n=i.interleaved,n===null?(e.next=e,HO(i)):(e.next=n.next,n.next=e),i.interleaved=e,Fa(s,t)}function Pp(s,e,t){if(e=e.updateQueue,e!==null&&(e=e.shared,(t&4194240)!==0)){var i=e.lanes;i&=s.pendingLanes,t|=i,e.lanes=t,MO(s,t)}}function rM(s,e){var t=s.updateQueue,i=s.alternate;if(i!==null&&(i=i.updateQueue,t===i)){var n=null,r=null;if(t=t.firstBaseUpdate,t!==null){do{var a={eventTime:t.eventTime,lane:t.lane,tag:t.tag,payload:t.payload,callback:t.callback,next:null};r===null?n=r=a:r=r.next=a,t=t.next}while(t!==null);r===null?n=r=e:r=r.next=e}else n=r=e;t={baseState:i.baseState,firstBaseUpdate:n,lastBaseUpdate:r,shared:i.shared,effects:i.effects},s.updateQueue=t;return}s=t.lastBaseUpdate,s===null?t.firstBaseUpdate=e:s.next=e,t.lastBaseUpdate=e}function pm(s,e,t,i){var n=s.updateQueue;Ja=!1;var r=n.firstBaseUpdate,a=n.lastBaseUpdate,o=n.shared.pending;if(o!==null){n.shared.pending=null;var l=o,u=l.next;l.next=null,a===null?r=u:a.next=u,a=l;var c=s.alternate;c!==null&&(c=c.updateQueue,o=c.lastBaseUpdate,o!==a&&(o===null?c.firstBaseUpdate=u:o.next=u,c.lastBaseUpdate=l))}if(r!==null){var h=n.baseState;a=0,c=u=l=null,o=r;do{var f=o.lane,d=o.eventTime;if((i&f)===f){c!==null&&(c=c.next={eventTime:d,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var _=s,g=o;switch(f=e,d=t,g.tag){case 1:if(_=g.payload,typeof _=="function"){h=_.call(d,h,f);break e}h=_;break e;case 3:_.flags=_.flags&-65537|128;case 0:if(_=g.payload,f=typeof _=="function"?_.call(d,h,f):_,f==null)break e;h=Xt({},h,f);break e;case 2:Ja=!0}}o.callback!==null&&o.lane!==0&&(s.flags|=64,f=n.effects,f===null?n.effects=[o]:f.push(o))}else d={eventTime:d,lane:f,tag:o.tag,payload:o.payload,callback:o.callback,next:null},c===null?(u=c=d,l=h):c=c.next=d,a|=f;if(o=o.next,o===null){if(o=n.shared.pending,o===null)break;f=o,o=f.next,f.next=null,n.lastBaseUpdate=f,n.shared.pending=null}}while(!0);if(c===null&&(l=h),n.baseState=l,n.firstBaseUpdate=u,n.lastBaseUpdate=c,e=n.shared.interleaved,e!==null){n=e;do a|=n.lane,n=n.next;while(n!==e)}else r===null&&(n.shared.lanes=0);Pu|=a,s.lanes=a,s.memoizedState=h}}function aM(s,e,t){if(s=e.effects,e.effects=null,s!==null)for(e=0;et?t:4,s(!0);var i=oy.transition;oy.transition={};try{s(!1),e()}finally{Et=t,oy.transition=i}}function f3(){return xn().memoizedState}function E7(s,e,t){var i=Ho(s);if(t={lane:i,action:t,hasEagerState:!1,eagerState:null,next:null},d3(s))_3(e,t);else if(t=KL(s,e,t,i),t!==null){var n=gs();Jn(t,s,i,n),g3(t,e,i)}}function y7(s,e,t){var i=Ho(s),n={lane:i,action:t,hasEagerState:!1,eagerState:null,next:null};if(d3(s))_3(e,n);else{var r=s.alternate;if(s.lanes===0&&(r===null||r.lanes===0)&&(r=e.lastRenderedReducer,r!==null))try{var a=e.lastRenderedState,o=r(a,t);if(n.hasEagerState=!0,n.eagerState=o,sr(o,a)){var l=e.interleaved;l===null?(n.next=n,HO(e)):(n.next=l.next,l.next=n),e.interleaved=n;return}}catch{}finally{}t=KL(s,e,n,i),t!==null&&(n=gs(),Jn(t,s,i,n),g3(t,e,i))}}function d3(s){var e=s.alternate;return s===Wt||e!==null&&e===Wt}function _3(s,e){Jf=vm=!0;var t=s.pending;t===null?e.next=e:(e.next=t.next,t.next=e),s.pending=e}function g3(s,e,t){if(t&4194240){var i=e.lanes;i&=s.pendingLanes,t|=i,e.lanes=t,MO(s,t)}}var Em={readContext:kn,useCallback:Wi,useContext:Wi,useEffect:Wi,useImperativeHandle:Wi,useInsertionEffect:Wi,useLayoutEffect:Wi,useMemo:Wi,useReducer:Wi,useRef:Wi,useState:Wi,useDebugValue:Wi,useDeferredValue:Wi,useTransition:Wi,useMutableSource:Wi,useSyncExternalStore:Wi,useId:Wi,unstable_isNewReconciler:!1},T7={readContext:kn,useCallback:function(s,e){return ur().memoizedState=[s,e===void 0?null:e],s},useContext:kn,useEffect:lM,useImperativeHandle:function(s,e,t){return t=t!=null?t.concat([s]):null,xp(4194308,4,o3.bind(null,e,s),t)},useLayoutEffect:function(s,e){return xp(4194308,4,s,e)},useInsertionEffect:function(s,e){return xp(4,2,s,e)},useMemo:function(s,e){var t=ur();return e=e===void 0?null:e,s=s(),t.memoizedState=[s,e],s},useReducer:function(s,e,t){var i=ur();return e=t!==void 0?t(e):e,i.memoizedState=i.baseState=e,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:e},i.queue=s,s=s.dispatch=E7.bind(null,Wt,s),[i.memoizedState,s]},useRef:function(s){var e=ur();return s={current:s},e.memoizedState=s},useState:oM,useDebugValue:JO,useDeferredValue:function(s){return ur().memoizedState=s},useTransition:function(){var s=oM(!1),e=s[0];return s=v7.bind(null,s[1]),ur().memoizedState=s,[e,s]},useMutableSource:function(){},useSyncExternalStore:function(s,e,t){var i=Wt,n=ur();if(Ft){if(t===void 0)throw Error(W(407));t=t()}else{if(t=e(),Mi===null)throw Error(W(349));Nu&30||JL(i,e,t)}n.memoizedState=t;var r={value:t,getSnapshot:e};return n.queue=r,lM(t3.bind(null,i,r,s),[s]),i.flags|=2048,b_(9,e3.bind(null,i,r,t,e),void 0,null),t},useId:function(){var s=ur(),e=Mi.identifierPrefix;if(Ft){var t=Ta,i=ya;t=(i&~(1<<32-Zn(i)-1)).toString(32)+t,e=":"+e+"R"+t,t=R_++,0<\/script>",s=s.removeChild(s.firstChild)):typeof i.is=="string"?s=a.createElement(t,{is:i.is}):(s=a.createElement(t),t==="select"&&(a=s,i.multiple?a.multiple=!0:i.size&&(a.size=i.size))):s=a.createElementNS(s,t),s[Nr]=e,s[y_]=i,b3(s,e,!1,!1),e.stateNode=s;e:{switch(a=JT(t,i),t){case"dialog":Mt("cancel",s),Mt("close",s),n=i;break;case"iframe":case"object":case"embed":Mt("load",s),n=i;break;case"video":case"audio":for(n=0;njc&&(e.flags|=128,i=!0,Of(r,!1),e.lanes=4194304)}else{if(!i)if(s=mm(a),s!==null){if(e.flags|=128,i=!0,t=s.updateQueue,t!==null&&(e.updateQueue=t,e.flags|=4),Of(r,!0),r.tail===null&&r.tailMode==="hidden"&&!a.alternate&&!Ft)return Yi(e),null}else 2*ai()-r.renderingStartTime>jc&&t!==1073741824&&(e.flags|=128,i=!0,Of(r,!1),e.lanes=4194304);r.isBackwards?(a.sibling=e.child,e.child=a):(t=r.last,t!==null?t.sibling=a:e.child=a,r.last=a)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ai(),e.sibling=null,t=jt.current,wt(jt,i?t&1|2:t&1),e):(Yi(e),null);case 22:case 23:return rw(),i=e.memoizedState!==null,s!==null&&s.memoizedState!==null!==i&&(e.flags|=8192),i&&e.mode&1?qs&1073741824&&(Yi(e),e.subtreeFlags&6&&(e.flags|=8192)):Yi(e),null;case 24:return null;case 25:return null}throw Error(W(156,e.tag))}function C7(s,e){switch(BO(e),e.tag){case 1:return xs(e.type)&&hm(),s=e.flags,s&65536?(e.flags=s&-65537|128,e):null;case 3:return Gc(),Pt(ks),Pt(is),KO(),s=e.flags,s&65536&&!(s&128)?(e.flags=s&-65537|128,e):null;case 5:return XO(e),null;case 13:if(Pt(jt),s=e.memoizedState,s!==null&&s.dehydrated!==null){if(e.alternate===null)throw Error(W(340));Fc()}return s=e.flags,s&65536?(e.flags=s&-65537|128,e):null;case 19:return Pt(jt),null;case 4:return Gc(),null;case 10:return zO(e.type._context),null;case 22:case 23:return rw(),null;case 24:return null;default:return null}}var zg=!1,Ji=!1,M7=typeof WeakSet=="function"?WeakSet:Set,he=null;function Ih(s,e){var t=s.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(i){ei(s,e,i)}else t.current=null}function AI(s,e,t){try{t()}catch(i){ei(s,e,i)}}var EM=!1;function N7(s,e){if(uI=am,s=PL(),UO(s)){if("selectionStart"in s)var t={start:s.selectionStart,end:s.selectionEnd};else e:{t=(t=s.ownerDocument)&&t.defaultView||window;var i=t.getSelection&&t.getSelection();if(i&&i.rangeCount!==0){t=i.anchorNode;var n=i.anchorOffset,r=i.focusNode;i=i.focusOffset;try{t.nodeType,r.nodeType}catch{t=null;break e}var a=0,o=-1,l=-1,u=0,c=0,h=s,f=null;t:for(;;){for(var d;h!==t||n!==0&&h.nodeType!==3||(o=a+n),h!==r||i!==0&&h.nodeType!==3||(l=a+i),h.nodeType===3&&(a+=h.nodeValue.length),(d=h.firstChild)!==null;)f=h,h=d;for(;;){if(h===s)break t;if(f===t&&++u===n&&(o=a),f===r&&++c===i&&(l=a),(d=h.nextSibling)!==null)break;h=f,f=h.parentNode}h=d}t=o===-1||l===-1?null:{start:o,end:l}}else t=null}t=t||{start:0,end:0}}else t=null;for(hI={focusedElem:s,selectionRange:t},am=!1,he=e;he!==null;)if(e=he,s=e.child,(e.subtreeFlags&1028)!==0&&s!==null)s.return=e,he=s;else for(;he!==null;){e=he;try{var _=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(_!==null){var g=_.memoizedProps,p=_.memoizedState,m=e.stateNode,v=m.getSnapshotBeforeUpdate(e.elementType===e.type?g:Xn(e.type,g),p);m.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var E=e.stateNode.containerInfo;E.nodeType===1?E.textContent="":E.nodeType===9&&E.documentElement&&E.removeChild(E.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(W(163))}}catch(y){ei(e,e.return,y)}if(s=e.sibling,s!==null){s.return=e.return,he=s;break}he=e.return}return _=EM,EM=!1,_}function ed(s,e,t){var i=e.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var n=i=i.next;do{if((n.tag&s)===s){var r=n.destroy;n.destroy=void 0,r!==void 0&&AI(e,t,r)}n=n.next}while(n!==i)}}function n0(s,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var t=e=e.next;do{if((t.tag&s)===s){var i=t.create;t.destroy=i()}t=t.next}while(t!==e)}}function OI(s){var e=s.ref;if(e!==null){var t=s.stateNode;switch(s.tag){case 5:s=t;break;default:s=t}typeof e=="function"?e(s):e.current=s}}function w3(s){var e=s.alternate;e!==null&&(s.alternate=null,w3(e)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(e=s.stateNode,e!==null&&(delete e[Nr],delete e[y_],delete e[dI],delete e[d7],delete e[_7])),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function C3(s){return s.tag===5||s.tag===3||s.tag===4}function yM(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||C3(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function wI(s,e,t){var i=s.tag;if(i===5||i===6)s=s.stateNode,e?t.nodeType===8?t.parentNode.insertBefore(s,e):t.insertBefore(s,e):(t.nodeType===8?(e=t.parentNode,e.insertBefore(s,t)):(e=t,e.appendChild(s)),t=t._reactRootContainer,t!=null||e.onclick!==null||(e.onclick=um));else if(i!==4&&(s=s.child,s!==null))for(wI(s,e,t),s=s.sibling;s!==null;)wI(s,e,t),s=s.sibling}function CI(s,e,t){var i=s.tag;if(i===5||i===6)s=s.stateNode,e?t.insertBefore(s,e):t.appendChild(s);else if(i!==4&&(s=s.child,s!==null))for(CI(s,e,t),s=s.sibling;s!==null;)CI(s,e,t),s=s.sibling}var Fi=null,Kn=!1;function qa(s,e,t){for(t=t.child;t!==null;)M3(s,e,t),t=t.sibling}function M3(s,e,t){if(xr&&typeof xr.onCommitFiberUnmount=="function")try{xr.onCommitFiberUnmount($E,t)}catch{}switch(t.tag){case 5:Ji||Ih(t,e);case 6:var i=Fi,n=Kn;Fi=null,qa(s,e,t),Fi=i,Kn=n,Fi!==null&&(Kn?(s=Fi,t=t.stateNode,s.nodeType===8?s.parentNode.removeChild(t):s.removeChild(t)):Fi.removeChild(t.stateNode));break;case 18:Fi!==null&&(Kn?(s=Fi,t=t.stateNode,s.nodeType===8?ny(s.parentNode,t):s.nodeType===1&&ny(s,t),g_(s)):ny(Fi,t.stateNode));break;case 4:i=Fi,n=Kn,Fi=t.stateNode.containerInfo,Kn=!0,qa(s,e,t),Fi=i,Kn=n;break;case 0:case 11:case 14:case 15:if(!Ji&&(i=t.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){n=i=i.next;do{var r=n,a=r.destroy;r=r.tag,a!==void 0&&(r&2||r&4)&&AI(t,e,a),n=n.next}while(n!==i)}qa(s,e,t);break;case 1:if(!Ji&&(Ih(t,e),i=t.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=t.memoizedProps,i.state=t.memoizedState,i.componentWillUnmount()}catch(o){ei(t,e,o)}qa(s,e,t);break;case 21:qa(s,e,t);break;case 22:t.mode&1?(Ji=(i=Ji)||t.memoizedState!==null,qa(s,e,t),Ji=i):qa(s,e,t);break;default:qa(s,e,t)}}function TM(s){var e=s.updateQueue;if(e!==null){s.updateQueue=null;var t=s.stateNode;t===null&&(t=s.stateNode=new M7),e.forEach(function(i){var n=G7.bind(null,s,i);t.has(i)||(t.add(i),i.then(n,n))})}}function Bn(s,e){var t=e.deletions;if(t!==null)for(var i=0;in&&(n=a),i&=~r}if(i=n,i=ai()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*k7(i/1960))-i,10s?16:s,wo===null)var i=!1;else{if(s=wo,wo=null,Im=0,ut&6)throw Error(W(331));var n=ut;for(ut|=4,he=s.current;he!==null;){var r=he,a=r.child;if(he.flags&16){var o=r.deletions;if(o!==null){for(var l=0;lai()-sw?Eu(s,0):iw|=t),Ds(s,e)}function F3(s,e){e===0&&(s.mode&1?(e=xg,xg<<=1,!(xg&130023424)&&(xg=4194304)):e=1);var t=gs();s=Fa(s,e),s!==null&&(fg(s,e,t),Ds(s,t))}function B7(s){var e=s.memoizedState,t=0;e!==null&&(t=e.retryLane),F3(s,t)}function G7(s,e){var t=0;switch(s.tag){case 13:var i=s.stateNode,n=s.memoizedState;n!==null&&(t=n.retryLane);break;case 19:i=s.stateNode;break;default:throw Error(W(314))}i!==null&&i.delete(e),F3(s,t)}var B3;B3=function(s,e,t){if(s!==null)if(s.memoizedProps!==e.pendingProps||ks.current)Ps=!0;else{if(!(s.lanes&t)&&!(e.flags&128))return Ps=!1,O7(s,e,t);Ps=!!(s.flags&131072)}else Ps=!1,Ft&&e.flags&1048576&&zL(e,dm,e.index);switch(e.lanes=0,e.tag){case 2:var i=e.type;Dp(s,e),s=e.pendingProps;var n=Uc(e,is.current);Oc(e,t),n=$O(null,e,i,s,n,t);var r=QO();return e.flags|=1,typeof n=="object"&&n!==null&&typeof n.render=="function"&&n.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,xs(i)?(r=!0,cm(e)):r=!1,e.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,WO(e),n.updater=s0,e.stateNode=n,n._reactInternals=e,EI(e,i,s,t),e=II(null,e,i,!0,r,t)):(e.tag=0,Ft&&r&&FO(e),ds(null,e,n,t),e=e.child),e;case 16:i=e.elementType;e:{switch(Dp(s,e),s=e.pendingProps,n=i._init,i=n(i._payload),e.type=i,n=e.tag=j7(i),s=Xn(i,s),n){case 0:e=TI(null,e,i,s,t);break e;case 1:e=pM(null,e,i,s,t);break e;case 11:e=_M(null,e,i,s,t);break e;case 14:e=gM(null,e,i,Xn(i.type,s),t);break e}throw Error(W(306,i,""))}return e;case 0:return i=e.type,n=e.pendingProps,n=e.elementType===i?n:Xn(i,n),TI(s,e,i,n,t);case 1:return i=e.type,n=e.pendingProps,n=e.elementType===i?n:Xn(i,n),pM(s,e,i,n,t);case 3:e:{if(I3(e),s===null)throw Error(W(387));i=e.pendingProps,r=e.memoizedState,n=r.element,qL(s,e),pm(e,i,null,t);var a=e.memoizedState;if(i=a.element,r.isDehydrated)if(r={element:i,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},e.updateQueue.baseState=r,e.memoizedState=r,e.flags&256){n=Vc(Error(W(423)),e),e=mM(s,e,i,t,n);break e}else if(i!==n){n=Vc(Error(W(424)),e),e=mM(s,e,i,t,n);break e}else for(en=Vo(e.stateNode.containerInfo.firstChild),nn=e,Ft=!0,$n=null,t=XL(e,null,i,t),e.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(Fc(),i===n){e=Ba(s,e,t);break e}ds(s,e,i,t)}e=e.child}return e;case 5:return $L(e),s===null&&pI(e),i=e.type,n=e.pendingProps,r=s!==null?s.memoizedProps:null,a=n.children,cI(i,n)?a=null:r!==null&&cI(i,r)&&(e.flags|=32),T3(s,e),ds(s,e,a,t),e.child;case 6:return s===null&&pI(e),null;case 13:return R3(s,e,t);case 4:return YO(e,e.stateNode.containerInfo),i=e.pendingProps,s===null?e.child=Bc(e,null,i,t):ds(s,e,i,t),e.child;case 11:return i=e.type,n=e.pendingProps,n=e.elementType===i?n:Xn(i,n),_M(s,e,i,n,t);case 7:return ds(s,e,e.pendingProps,t),e.child;case 8:return ds(s,e,e.pendingProps.children,t),e.child;case 12:return ds(s,e,e.pendingProps.children,t),e.child;case 10:e:{if(i=e.type._context,n=e.pendingProps,r=e.memoizedProps,a=n.value,wt(_m,i._currentValue),i._currentValue=a,r!==null)if(sr(r.value,a)){if(r.children===n.children&&!ks.current){e=Ba(s,e,t);break e}}else for(r=e.child,r!==null&&(r.return=e);r!==null;){var o=r.dependencies;if(o!==null){a=r.child;for(var l=o.firstContext;l!==null;){if(l.context===i){if(r.tag===1){l=Na(-1,t&-t),l.tag=2;var u=r.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}r.lanes|=t,l=r.alternate,l!==null&&(l.lanes|=t),mI(r.return,t,e),o.lanes|=t;break}l=l.next}}else if(r.tag===10)a=r.type===e.type?null:r.child;else if(r.tag===18){if(a=r.return,a===null)throw Error(W(341));a.lanes|=t,o=a.alternate,o!==null&&(o.lanes|=t),mI(a,t,e),a=r.sibling}else a=r.child;if(a!==null)a.return=r;else for(a=r;a!==null;){if(a===e){a=null;break}if(r=a.sibling,r!==null){r.return=a.return,a=r;break}a=a.return}r=a}ds(s,e,n.children,t),e=e.child}return e;case 9:return n=e.type,i=e.pendingProps.children,Oc(e,t),n=kn(n),i=i(n),e.flags|=1,ds(s,e,i,t),e.child;case 14:return i=e.type,n=Xn(i,e.pendingProps),n=Xn(i.type,n),gM(s,e,i,n,t);case 15:return E3(s,e,e.type,e.pendingProps,t);case 17:return i=e.type,n=e.pendingProps,n=e.elementType===i?n:Xn(i,n),Dp(s,e),e.tag=1,xs(i)?(s=!0,cm(e)):s=!1,Oc(e,t),p3(e,i,n),EI(e,i,n,t),II(null,e,i,!0,s,t);case 19:return S3(s,e,t);case 22:return y3(s,e,t)}throw Error(W(156,e.tag))};function G3(s,e){return dL(s,e)}function V7(s,e,t,i){this.tag=s,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Cn(s,e,t,i){return new V7(s,e,t,i)}function ow(s){return s=s.prototype,!(!s||!s.isReactComponent)}function j7(s){if(typeof s=="function")return ow(s)?1:0;if(s!=null){if(s=s.$$typeof,s===AO)return 11;if(s===OO)return 14}return 2}function Wo(s,e){var t=s.alternate;return t===null?(t=Cn(s.tag,e,s.key,s.mode),t.elementType=s.elementType,t.type=s.type,t.stateNode=s.stateNode,t.alternate=s,s.alternate=t):(t.pendingProps=e,t.type=s.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=s.flags&14680064,t.childLanes=s.childLanes,t.lanes=s.lanes,t.child=s.child,t.memoizedProps=s.memoizedProps,t.memoizedState=s.memoizedState,t.updateQueue=s.updateQueue,e=s.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},t.sibling=s.sibling,t.index=s.index,t.ref=s.ref,t}function Fp(s,e,t,i,n,r){var a=2;if(i=s,typeof s=="function")ow(s)&&(a=1);else if(typeof s=="string")a=5;else e:switch(s){case dh:return yu(t.children,n,r,e);case bO:a=8,n|=8;break;case zT:return s=Cn(12,t,e,n|2),s.elementType=zT,s.lanes=r,s;case HT:return s=Cn(13,t,e,n),s.elementType=HT,s.lanes=r,s;case WT:return s=Cn(19,t,e,n),s.elementType=WT,s.lanes=r,s;case $D:return a0(t,n,r,e);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case KD:a=10;break e;case qD:a=9;break e;case AO:a=11;break e;case OO:a=14;break e;case Za:a=16,i=null;break e}throw Error(W(130,s==null?s:typeof s,""))}return e=Cn(a,t,e,n),e.elementType=s,e.type=i,e.lanes=r,e}function yu(s,e,t,i){return s=Cn(7,s,i,e),s.lanes=t,s}function a0(s,e,t,i){return s=Cn(22,s,i,e),s.elementType=$D,s.lanes=t,s.stateNode={isHidden:!1},s}function fy(s,e,t){return s=Cn(6,s,null,e),s.lanes=t,s}function dy(s,e,t){return e=Cn(4,s.children!==null?s.children:[],s.key,e),e.lanes=t,e.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},e}function z7(s,e,t,i,n){this.tag=e,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=X0(0),this.expirationTimes=X0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=X0(0),this.identifierPrefix=i,this.onRecoverableError=n,this.mutableSourceEagerHydrationData=null}function lw(s,e,t,i,n,r,a,o,l){return s=new z7(s,e,t,o,l),e===1?(e=1,r===!0&&(e|=8)):e=0,r=Cn(3,null,null,e),s.current=r,r.stateNode=s,r.memoizedState={element:i,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},WO(r),s}function H7(s,e,t){var i=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(H3)}catch(s){console.error(s)}}H3(),HD.exports=hn;var fw=HD.exports;const Sh=nr(fw);var q7,CM=fw;q7=CM.createRoot,CM.hydrateRoot;/*! * @pixi/constants - v6.5.10 * Compiled Thu, 06 Jul 2023 15:25:11 UTC * * @pixi/constants is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license */var Ga;(function(s){s[s.WEBGL_LEGACY=0]="WEBGL_LEGACY",s[s.WEBGL=1]="WEBGL",s[s.WEBGL2=2]="WEBGL2"})(Ga||(Ga={}));var O_;(function(s){s[s.UNKNOWN=0]="UNKNOWN",s[s.WEBGL=1]="WEBGL",s[s.CANVAS=2]="CANVAS"})(O_||(O_={}));var bm;(function(s){s[s.COLOR=16384]="COLOR",s[s.DEPTH=256]="DEPTH",s[s.STENCIL=1024]="STENCIL"})(bm||(bm={}));var ge;(function(s){s[s.NORMAL=0]="NORMAL",s[s.ADD=1]="ADD",s[s.MULTIPLY=2]="MULTIPLY",s[s.SCREEN=3]="SCREEN",s[s.OVERLAY=4]="OVERLAY",s[s.DARKEN=5]="DARKEN",s[s.LIGHTEN=6]="LIGHTEN",s[s.COLOR_DODGE=7]="COLOR_DODGE",s[s.COLOR_BURN=8]="COLOR_BURN",s[s.HARD_LIGHT=9]="HARD_LIGHT",s[s.SOFT_LIGHT=10]="SOFT_LIGHT",s[s.DIFFERENCE=11]="DIFFERENCE",s[s.EXCLUSION=12]="EXCLUSION",s[s.HUE=13]="HUE",s[s.SATURATION=14]="SATURATION",s[s.COLOR=15]="COLOR",s[s.LUMINOSITY=16]="LUMINOSITY",s[s.NORMAL_NPM=17]="NORMAL_NPM",s[s.ADD_NPM=18]="ADD_NPM",s[s.SCREEN_NPM=19]="SCREEN_NPM",s[s.NONE=20]="NONE",s[s.SRC_OVER=0]="SRC_OVER",s[s.SRC_IN=21]="SRC_IN",s[s.SRC_OUT=22]="SRC_OUT",s[s.SRC_ATOP=23]="SRC_ATOP",s[s.DST_OVER=24]="DST_OVER",s[s.DST_IN=25]="DST_IN",s[s.DST_OUT=26]="DST_OUT",s[s.DST_ATOP=27]="DST_ATOP",s[s.ERASE=26]="ERASE",s[s.SUBTRACT=28]="SUBTRACT",s[s.XOR=29]="XOR"})(ge||(ge={}));var Ia;(function(s){s[s.POINTS=0]="POINTS",s[s.LINES=1]="LINES",s[s.LINE_LOOP=2]="LINE_LOOP",s[s.LINE_STRIP=3]="LINE_STRIP",s[s.TRIANGLES=4]="TRIANGLES",s[s.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",s[s.TRIANGLE_FAN=6]="TRIANGLE_FAN"})(Ia||(Ia={}));var ae;(function(s){s[s.RGBA=6408]="RGBA",s[s.RGB=6407]="RGB",s[s.RG=33319]="RG",s[s.RED=6403]="RED",s[s.RGBA_INTEGER=36249]="RGBA_INTEGER",s[s.RGB_INTEGER=36248]="RGB_INTEGER",s[s.RG_INTEGER=33320]="RG_INTEGER",s[s.RED_INTEGER=36244]="RED_INTEGER",s[s.ALPHA=6406]="ALPHA",s[s.LUMINANCE=6409]="LUMINANCE",s[s.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",s[s.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",s[s.DEPTH_STENCIL=34041]="DEPTH_STENCIL"})(ae||(ae={}));var Tu;(function(s){s[s.TEXTURE_2D=3553]="TEXTURE_2D",s[s.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",s[s.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",s[s.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",s[s.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",s[s.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",s[s.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",s[s.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",s[s.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"})(Tu||(Tu={}));var lt;(function(s){s[s.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",s[s.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",s[s.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",s[s.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",s[s.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",s[s.UNSIGNED_INT=5125]="UNSIGNED_INT",s[s.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",s[s.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",s[s.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",s[s.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",s[s.BYTE=5120]="BYTE",s[s.SHORT=5122]="SHORT",s[s.INT=5124]="INT",s[s.FLOAT=5126]="FLOAT",s[s.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",s[s.HALF_FLOAT=36193]="HALF_FLOAT"})(lt||(lt={}));var Am;(function(s){s[s.FLOAT=0]="FLOAT",s[s.INT=1]="INT",s[s.UINT=2]="UINT"})(Am||(Am={}));var tn;(function(s){s[s.NEAREST=0]="NEAREST",s[s.LINEAR=1]="LINEAR"})(tn||(tn={}));var Pa;(function(s){s[s.CLAMP=33071]="CLAMP",s[s.REPEAT=10497]="REPEAT",s[s.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"})(Pa||(Pa={}));var Jo;(function(s){s[s.OFF=0]="OFF",s[s.POW2=1]="POW2",s[s.ON=2]="ON",s[s.ON_MANUAL=3]="ON_MANUAL"})(Jo||(Jo={}));var el;(function(s){s[s.NPM=0]="NPM",s[s.UNPACK=1]="UNPACK",s[s.PMA=2]="PMA",s[s.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",s[s.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",s[s.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA",s[s.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA"})(el||(el={}));var eo;(function(s){s[s.NO=0]="NO",s[s.YES=1]="YES",s[s.AUTO=2]="AUTO",s[s.BLEND=0]="BLEND",s[s.CLEAR=1]="CLEAR",s[s.BLIT=2]="BLIT"})(eo||(eo={}));var Om;(function(s){s[s.AUTO=0]="AUTO",s[s.MANUAL=1]="MANUAL"})(Om||(Om={}));var sn;(function(s){s.LOW="lowp",s.MEDIUM="mediump",s.HIGH="highp"})(sn||(sn={}));var ci;(function(s){s[s.NONE=0]="NONE",s[s.SCISSOR=1]="SCISSOR",s[s.STENCIL=2]="STENCIL",s[s.SPRITE=3]="SPRITE",s[s.COLOR=4]="COLOR"})(ci||(ci={}));var MM;(function(s){s[s.RED=1]="RED",s[s.GREEN=2]="GREEN",s[s.BLUE=4]="BLUE",s[s.ALPHA=8]="ALPHA"})(MM||(MM={}));var Ut;(function(s){s[s.NONE=0]="NONE",s[s.LOW=2]="LOW",s[s.MEDIUM=4]="MEDIUM",s[s.HIGH=8]="HIGH"})(Ut||(Ut={}));var Lr;(function(s){s[s.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",s[s.ARRAY_BUFFER=34962]="ARRAY_BUFFER",s[s.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER"})(Lr||(Lr={}));/*! * @pixi/settings - v6.5.10 * Compiled Thu, 06 Jul 2023 15:25:11 UTC * * @pixi/settings is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license */var $7={createCanvas:function(s,e){var t=document.createElement("canvas");return t.width=s,t.height=e,t},getWebGLRenderingContext:function(){return WebGLRenderingContext},getNavigator:function(){return navigator},getBaseUrl:function(){var s;return(s=document.baseURI)!==null&&s!==void 0?s:window.location.href},fetch:function(s,e){return fetch(s,e)}},_y=/iPhone/i,NM=/iPod/i,PM=/iPad/i,kM=/\biOS-universal(?:.+)Mac\b/i,gy=/\bAndroid(?:.+)Mobile\b/i,xM=/Android/i,th=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,Yg=/Silk/i,Xr=/Windows Phone/i,DM=/\bWindows(?:.+)ARM\b/i,LM=/BlackBerry/i,UM=/BB10/i,FM=/Opera Mini/i,BM=/\b(CriOS|Chrome)(?:.+)Mobile/i,GM=/Mobile(?:.+)Firefox\b/i,VM=function(s){return typeof s<"u"&&s.platform==="MacIntel"&&typeof s.maxTouchPoints=="number"&&s.maxTouchPoints>1&&typeof MSStream>"u"};function Q7(s){return function(e){return e.test(s)}}function Z7(s){var e={userAgent:"",platform:"",maxTouchPoints:0};!s&&typeof navigator<"u"?e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof s=="string"?e.userAgent=s:s&&s.userAgent&&(e={userAgent:s.userAgent,platform:s.platform,maxTouchPoints:s.maxTouchPoints||0});var t=e.userAgent,i=t.split("[FBAN");typeof i[1]<"u"&&(t=i[0]),i=t.split("Twitter"),typeof i[1]<"u"&&(t=i[0]);var n=Q7(t),r={apple:{phone:n(_y)&&!n(Xr),ipod:n(NM),tablet:!n(_y)&&(n(PM)||VM(e))&&!n(Xr),universal:n(kM),device:(n(_y)||n(NM)||n(PM)||n(kM)||VM(e))&&!n(Xr)},amazon:{phone:n(th),tablet:!n(th)&&n(Yg),device:n(th)||n(Yg)},android:{phone:!n(Xr)&&n(th)||!n(Xr)&&n(gy),tablet:!n(Xr)&&!n(th)&&!n(gy)&&(n(Yg)||n(xM)),device:!n(Xr)&&(n(th)||n(Yg)||n(gy)||n(xM))||n(/\bokhttp\b/i)},windows:{phone:n(Xr),tablet:n(DM),device:n(Xr)||n(DM)},other:{blackberry:n(LM),blackberry10:n(UM),opera:n(FM),firefox:n(GM),chrome:n(BM),device:n(LM)||n(UM)||n(FM)||n(GM)||n(BM)},any:!1,phone:!1,tablet:!1};return r.any=r.apple.device||r.android.device||r.windows.device||r.other.device,r.phone=r.apple.phone||r.android.phone||r.windows.phone,r.tablet=r.apple.tablet||r.android.tablet||r.windows.tablet,r}var fu=Z7(globalThis.navigator);function J7(){return!fu.apple.device}function eV(s){var e=!0;if(fu.tablet||fu.phone){if(fu.apple.device){var t=navigator.userAgent.match(/OS (\d+)_(\d+)?/);if(t){var i=parseInt(t[1],10);i<11&&(e=!1)}}if(fu.android.device){var t=navigator.userAgent.match(/Android\s([0-9.]*)/);if(t){var i=parseInt(t[1],10);i<7&&(e=!1)}}}return e?s:4}var de={ADAPTER:$7,MIPMAP_TEXTURES:Jo.POW2,ANISOTROPIC_LEVEL:0,RESOLUTION:1,FILTER_RESOLUTION:1,FILTER_MULTISAMPLE:Ut.NONE,SPRITE_MAX_TEXTURES:eV(32),SPRITE_BATCH_SIZE:4096,RENDER_OPTIONS:{view:null,width:800,height:600,autoDensity:!1,backgroundColor:0,backgroundAlpha:1,useContextAlpha:!0,clearBeforeRender:!0,antialias:!1,preserveDrawingBuffer:!1},GC_MODE:Om.AUTO,GC_MAX_IDLE:60*60,GC_MAX_CHECK_COUNT:60*10,WRAP_MODE:Pa.CLAMP,SCALE_MODE:tn.LINEAR,PRECISION_VERTEX:sn.HIGH,PRECISION_FRAGMENT:fu.apple.device?sn.HIGH:sn.MEDIUM,CAN_UPLOAD_SAME_BUFFER:J7(),CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1},W3={exports:{}};(function(s){var e=Object.prototype.hasOwnProperty,t="~";function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(t=!1));function n(l,u,c){this.fn=l,this.context=u,this.once=c||!1}function r(l,u,c,h,f){if(typeof c!="function")throw new TypeError("The listener must be a function");var d=new n(c,h||l,f),_=t?t+u:u;return l._events[_]?l._events[_].fn?l._events[_]=[l._events[_],d]:l._events[_].push(d):(l._events[_]=d,l._eventsCount++),l}function a(l,u){--l._eventsCount===0?l._events=new i:delete l._events[u]}function o(){this._events=new i,this._eventsCount=0}o.prototype.eventNames=function(){var u=[],c,h;if(this._eventsCount===0)return u;for(h in c=this._events)e.call(c,h)&&u.push(t?h.slice(1):h);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(c)):u},o.prototype.listeners=function(u){var c=t?t+u:u,h=this._events[c];if(!h)return[];if(h.fn)return[h.fn];for(var f=0,d=h.length,_=new Array(d);f80*t){o=u=s[0],l=c=s[1];for(var _=t;_u&&(u=h),f>c&&(c=f);d=Math.max(u-o,c-l),d=d!==0?32767/d:0}return w_(r,a,t,o,l,d,0),a}function Y3(s,e,t,i,n){var r,a;if(n===LI(s,e,t,i)>0)for(r=e;r=e;r-=i)a=jM(r,s[r],s[r+1],a);return a&&d0(a,a.next)&&(M_(a),a=a.next),a}function xu(s,e){if(!s)return s;e||(e=s);var t=s,i;do if(i=!1,!t.steiner&&(d0(t,t.next)||zt(t.prev,t,t.next)===0)){if(M_(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function w_(s,e,t,i,n,r,a){if(s){!a&&r&&cV(s,i,n,r);for(var o=s,l,u;s.prev!==s.next;){if(l=s.prev,u=s.next,r?sV(s,i,n,r):iV(s)){e.push(l.i/t|0),e.push(s.i/t|0),e.push(u.i/t|0),M_(s),s=u.next,o=u.next;continue}if(s=u,s===o){a?a===1?(s=nV(xu(s),e,t),w_(s,e,t,i,n,r,2)):a===2&&rV(s,e,t,i,n,r):w_(xu(s),e,t,i,n,r,1);break}}}}function iV(s){var e=s.prev,t=s,i=s.next;if(zt(e,t,i)>=0)return!1;for(var n=e.x,r=t.x,a=i.x,o=e.y,l=t.y,u=i.y,c=nr?n>a?n:a:r>a?r:a,d=o>l?o>u?o:u:l>u?l:u,_=i.next;_!==e;){if(_.x>=c&&_.x<=f&&_.y>=h&&_.y<=d&&bh(n,o,r,l,a,u,_.x,_.y)&&zt(_.prev,_,_.next)>=0)return!1;_=_.next}return!0}function sV(s,e,t,i){var n=s.prev,r=s,a=s.next;if(zt(n,r,a)>=0)return!1;for(var o=n.x,l=r.x,u=a.x,c=n.y,h=r.y,f=a.y,d=ol?o>u?o:u:l>u?l:u,p=c>h?c>f?c:f:h>f?h:f,m=xI(d,_,e,t,i),v=xI(g,p,e,t,i),E=s.prevZ,y=s.nextZ;E&&E.z>=m&&y&&y.z<=v;){if(E.x>=d&&E.x<=g&&E.y>=_&&E.y<=p&&E!==n&&E!==a&&bh(o,c,l,h,u,f,E.x,E.y)&&zt(E.prev,E,E.next)>=0||(E=E.prevZ,y.x>=d&&y.x<=g&&y.y>=_&&y.y<=p&&y!==n&&y!==a&&bh(o,c,l,h,u,f,y.x,y.y)&&zt(y.prev,y,y.next)>=0))return!1;y=y.nextZ}for(;E&&E.z>=m;){if(E.x>=d&&E.x<=g&&E.y>=_&&E.y<=p&&E!==n&&E!==a&&bh(o,c,l,h,u,f,E.x,E.y)&&zt(E.prev,E,E.next)>=0)return!1;E=E.prevZ}for(;y&&y.z<=v;){if(y.x>=d&&y.x<=g&&y.y>=_&&y.y<=p&&y!==n&&y!==a&&bh(o,c,l,h,u,f,y.x,y.y)&&zt(y.prev,y,y.next)>=0)return!1;y=y.nextZ}return!0}function nV(s,e,t){var i=s;do{var n=i.prev,r=i.next.next;!d0(n,r)&&X3(n,i,i.next,r)&&C_(n,r)&&C_(r,n)&&(e.push(n.i/t|0),e.push(i.i/t|0),e.push(r.i/t|0),M_(i),M_(i.next),i=s=r),i=i.next}while(i!==s);return xu(i)}function rV(s,e,t,i,n,r){var a=s;do{for(var o=a.next.next;o!==a.prev;){if(a.i!==o.i&&_V(a,o)){var l=K3(a,o);a=xu(a,a.next),l=xu(l,l.next),w_(a,e,t,i,n,r,0),w_(l,e,t,i,n,r,0);return}o=o.next}a=a.next}while(a!==s)}function aV(s,e,t,i){var n=[],r,a,o,l,u;for(r=0,a=e.length;r=t.next.y&&t.next.y!==t.y){var o=t.x+(n-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(o<=i&&o>r&&(r=o,a=t.x=t.x&&t.x>=u&&i!==t.x&&bh(na.x||t.x===a.x&&hV(a,t)))&&(a=t,h=f)),t=t.next;while(t!==l);return a}function hV(s,e){return zt(s.prev,s,e.prev)<0&&zt(e.next,s,s.next)<0}function cV(s,e,t,i){var n=s;do n.z===0&&(n.z=xI(n.x,n.y,e,t,i)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next;while(n!==s);n.prevZ.nextZ=null,n.prevZ=null,fV(n)}function fV(s){var e,t,i,n,r,a,o,l,u=1;do{for(t=s,s=null,r=null,a=0;t;){for(a++,i=t,o=0,e=0;e0||l>0&&i;)o!==0&&(l===0||!i||t.z<=i.z)?(n=t,t=t.nextZ,o--):(n=i,i=i.nextZ,l--),r?r.nextZ=n:s=n,n.prevZ=r,r=n;t=i}r.nextZ=null,u*=2}while(a>1);return s}function xI(s,e,t,i,n){return s=(s-t)*n|0,e=(e-i)*n|0,s=(s|s<<8)&16711935,s=(s|s<<4)&252645135,s=(s|s<<2)&858993459,s=(s|s<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,s|e<<1}function dV(s){var e=s,t=s;do(e.x=(s-a)*(r-o)&&(s-a)*(i-o)>=(t-a)*(e-o)&&(t-a)*(r-o)>=(n-a)*(i-o)}function _V(s,e){return s.next.i!==e.i&&s.prev.i!==e.i&&!gV(s,e)&&(C_(s,e)&&C_(e,s)&&pV(s,e)&&(zt(s.prev,s,e.prev)||zt(s,e.prev,e))||d0(s,e)&&zt(s.prev,s,s.next)>0&&zt(e.prev,e,e.next)>0)}function zt(s,e,t){return(e.y-s.y)*(t.x-e.x)-(e.x-s.x)*(t.y-e.y)}function d0(s,e){return s.x===e.x&&s.y===e.y}function X3(s,e,t,i){var n=Kg(zt(s,e,t)),r=Kg(zt(s,e,i)),a=Kg(zt(t,i,s)),o=Kg(zt(t,i,e));return!!(n!==r&&a!==o||n===0&&Xg(s,t,e)||r===0&&Xg(s,i,e)||a===0&&Xg(t,s,i)||o===0&&Xg(t,e,i))}function Xg(s,e,t){return e.x<=Math.max(s.x,t.x)&&e.x>=Math.min(s.x,t.x)&&e.y<=Math.max(s.y,t.y)&&e.y>=Math.min(s.y,t.y)}function Kg(s){return s>0?1:s<0?-1:0}function gV(s,e){var t=s;do{if(t.i!==s.i&&t.next.i!==s.i&&t.i!==e.i&&t.next.i!==e.i&&X3(t,t.next,s,e))return!0;t=t.next}while(t!==s);return!1}function C_(s,e){return zt(s.prev,s,s.next)<0?zt(s,e,s.next)>=0&&zt(s,s.prev,e)>=0:zt(s,e,s.prev)<0||zt(s,s.next,e)<0}function pV(s,e){var t=s,i=!1,n=(s.x+e.x)/2,r=(s.y+e.y)/2;do t.y>r!=t.next.y>r&&t.next.y!==t.y&&n<(t.next.x-t.x)*(r-t.y)/(t.next.y-t.y)+t.x&&(i=!i),t=t.next;while(t!==s);return i}function K3(s,e){var t=new DI(s.i,s.x,s.y),i=new DI(e.i,e.x,e.y),n=s.next,r=e.prev;return s.next=e,e.prev=s,t.next=n,n.prev=t,i.next=t,t.prev=i,r.next=i,i.prev=r,i}function jM(s,e,t,i){var n=new DI(s,e,t);return i?(n.next=i.next,n.prev=i,i.next.prev=n,i.next=n):(n.prev=n,n.next=n),n}function M_(s){s.next.prev=s.prev,s.prev.next=s.next,s.prevZ&&(s.prevZ.nextZ=s.nextZ),s.nextZ&&(s.nextZ.prevZ=s.prevZ)}function DI(s,e,t){this.i=s,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}f0.deviation=function(s,e,t,i){var n=e&&e.length,r=n?e[0]*t:s.length,a=Math.abs(LI(s,0,r,t));if(n)for(var o=0,l=e.length;o0&&(i+=s[n-1].length,t.holes.push(i))}return t};var mV=dw.exports;const q3=nr(mV);var wm={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */wm.exports;(function(s,e){(function(t){var i=e&&!e.nodeType&&e,n=s&&!s.nodeType&&s,r=typeof Zi=="object"&&Zi;(r.global===r||r.window===r||r.self===r)&&(t=r);var a,o=2147483647,l=36,u=1,c=26,h=38,f=700,d=72,_=128,g="-",p=/^xn--/,m=/[^\x20-\x7E]/,v=/[\x2E\u3002\uFF0E\uFF61]/g,E={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},y=l-u,T=Math.floor,w=String.fromCharCode,C;function N(B){throw new RangeError(E[B])}function P(B,$){for(var fe=B.length,xe=[];fe--;)xe[fe]=$(B[fe]);return xe}function k(B,$){var fe=B.split("@"),xe="";fe.length>1&&(xe=fe[0]+"@",B=fe[1]),B=B.replace(v,".");var me=B.split("."),De=P(me,$).join(".");return xe+De}function L(B){for(var $=[],fe=0,xe=B.length,me,De;fe=55296&&me<=56319&&fe65535&&($-=65536,fe+=w($>>>10&1023|55296),$=56320|$&1023),fe+=w($),fe}).join("")}function z(B){return B-48<10?B-22:B-65<26?B-65:B-97<26?B-97:l}function ne(B,$){return B+22+75*(B<26)-(($!=0)<<5)}function G(B,$,fe){var xe=0;for(B=fe?T(B/f):B>>1,B+=T(B/$);B>y*c>>1;xe+=l)B=T(B/y);return T(xe+(y+1)*B/(B+h))}function Y(B){var $=[],fe=B.length,xe,me=0,De=_,we=d,it,at,bt,At,ct,Qe,gt,ki,Ue;for(it=B.lastIndexOf(g),it<0&&(it=0),at=0;at=128&&N("not-basic"),$.push(B.charCodeAt(at));for(bt=it>0?it+1:0;bt=fe&&N("invalid-input"),gt=z(B.charCodeAt(bt++)),(gt>=l||gt>T((o-me)/ct))&&N("overflow"),me+=gt*ct,ki=Qe<=we?u:Qe>=we+c?c:Qe-we,!(gtT(o/Ue)&&N("overflow"),ct*=Ue;xe=$.length+1,we=G(me-At,xe,At==0),T(me/xe)>o-De&&N("overflow"),De+=T(me/xe),me%=xe,$.splice(me++,0,De)}return j($)}function K(B){var $,fe,xe,me,De,we,it,at,bt,At,ct,Qe=[],gt,ki,Ue,st;for(B=L(B),gt=B.length,$=_,fe=0,De=d,we=0;we=$&&ctT((o-fe)/ki)&&N("overflow"),fe+=(it-$)*ki,$=it,we=0;weo&&N("overflow"),ct==$){for(at=fe,bt=l;At=bt<=De?u:bt>=De+c?c:bt-De,!(at-1e3&&s<1e3||$3.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof s=="number"){var i=s<0?-KM(-s):KM(s);if(i!==s){var n=String(i),r=pw.call(e,n.length+1);return Co.call(n,t,"$&_")+"."+Co.call(Co.call(r,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Co.call(e,t,"$&_")}var BI=TV,QM=BI.custom,ZM=eU(QM)?QM:null,Z3={__proto__:null,double:'"',single:"'"},NV={__proto__:null,double:/(["\\])/g,single:/(['\\])/g},_0=function s(e,t,i,n){var r=t||{};if(Jr(r,"quoteStyle")&&!Jr(Z3,r.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Jr(r,"maxStringLength")&&(typeof r.maxStringLength=="number"?r.maxStringLength<0&&r.maxStringLength!==1/0:r.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=Jr(r,"customInspect")?r.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Jr(r,"indent")&&r.indent!==null&&r.indent!==" "&&!(parseInt(r.indent,10)===r.indent&&r.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Jr(r,"numericSeparator")&&typeof r.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var o=r.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return iU(e,r);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var l=String(e);return o?$M(e,l):l}if(typeof e=="bigint"){var u=String(e)+"n";return o?$M(e,u):u}var c=typeof r.depth>"u"?5:r.depth;if(typeof i>"u"&&(i=0),i>=c&&c>0&&typeof e=="object")return GI(e)?"[Array]":"[Object]";var h=qV(r,i);if(typeof n>"u")n=[];else if(tU(n,e)>=0)return"[Circular]";function f(z,ne,G){if(ne&&(n=MV.call(n),n.push(ne)),G){var Y={depth:r.depth};return Jr(r,"quoteStyle")&&(Y.quoteStyle=r.quoteStyle),s(z,Y,i+1,n)}return s(z,r,i+1,n)}if(typeof e=="function"&&!JM(e)){var d=GV(e),_=qg(e,f);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(_.length>0?" { "+Cr.call(_,", ")+" }":"")}if(eU(e)){var g=zc?Co.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):FI.call(e);return typeof e=="object"&&!zc?Cf(g):g}if(YV(e)){for(var p="<"+YM.call(String(e.nodeName)),m=e.attributes||[],v=0;v",p}if(GI(e)){if(e.length===0)return"[]";var E=qg(e,f);return h&&!KV(E)?"["+VI(E,h)+"]":"[ "+Cr.call(E,", ")+" ]"}if(xV(e)){var y=qg(e,f);return!("cause"in Error.prototype)&&"cause"in e&&!Q3.call(e,"cause")?"{ ["+String(e)+"] "+Cr.call(XM.call("[cause]: "+f(e.cause),y),", ")+" }":y.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Cr.call(y,", ")+" }"}if(typeof e=="object"&&a){if(ZM&&typeof e[ZM]=="function"&&BI)return BI(e,{depth:c-i});if(a!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(VV(e)){var T=[];return zM&&zM.call(e,function(z,ne){T.push(f(ne,e,!0)+" => "+f(z,e))}),eN("Map",Cm.call(e),T,h)}if(HV(e)){var w=[];return HM&&HM.call(e,function(z){w.push(f(z,e))}),eN("Set",Mm.call(e),w,h)}if(jV(e))return Ey("WeakMap");if(WV(e))return Ey("WeakSet");if(zV(e))return Ey("WeakRef");if(LV(e))return Cf(f(Number(e)));if(FV(e))return Cf(f(UI.call(e)));if(UV(e))return Cf(bV.call(e));if(DV(e))return Cf(f(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(typeof globalThis<"u"&&e===globalThis||typeof Zi<"u"&&e===Zi)return"{ [object globalThis] }";if(!kV(e)&&!JM(e)){var C=qg(e,f),N=qM?qM(e)===Object.prototype:e instanceof Object||e.constructor===Object,P=e instanceof Object?"":"null prototype",k=!N&&rd&&Object(e)===e&&rd in e?pw.call(ul(e),8,-1):P?"Object":"",L=N||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",j=L+(k||P?"["+Cr.call(XM.call([],k||[],P||[]),": ")+"] ":"");return C.length===0?j+"{}":h?j+"{"+VI(C,h)+"}":j+"{ "+Cr.call(C,", ")+" }"}return String(e)};function J3(s,e,t){var i=t.quoteStyle||e,n=Z3[i];return n+s+n}function PV(s){return Co.call(String(s),/"/g,""")}function Ku(s){return!rd||!(typeof s=="object"&&(rd in s||typeof s[rd]<"u"))}function GI(s){return ul(s)==="[object Array]"&&Ku(s)}function kV(s){return ul(s)==="[object Date]"&&Ku(s)}function JM(s){return ul(s)==="[object RegExp]"&&Ku(s)}function xV(s){return ul(s)==="[object Error]"&&Ku(s)}function DV(s){return ul(s)==="[object String]"&&Ku(s)}function LV(s){return ul(s)==="[object Number]"&&Ku(s)}function UV(s){return ul(s)==="[object Boolean]"&&Ku(s)}function eU(s){if(zc)return s&&typeof s=="object"&&s instanceof Symbol;if(typeof s=="symbol")return!0;if(!s||typeof s!="object"||!FI)return!1;try{return FI.call(s),!0}catch{}return!1}function FV(s){if(!s||typeof s!="object"||!UI)return!1;try{return UI.call(s),!0}catch{}return!1}var BV=Object.prototype.hasOwnProperty||function(s){return s in this};function Jr(s,e){return BV.call(s,e)}function ul(s){return AV.call(s)}function GV(s){if(s.name)return s.name;var e=wV.call(OV.call(s),/^function\s*([\w$]+)/);return e?e[1]:null}function tU(s,e){if(s.indexOf)return s.indexOf(e);for(var t=0,i=s.length;te.maxStringLength){var t=s.length-e.maxStringLength,i="... "+t+" more character"+(t>1?"s":"");return iU(pw.call(s,0,e.maxStringLength),e)+i}var n=NV[e.quoteStyle||"single"];n.lastIndex=0;var r=Co.call(Co.call(s,n,"\\$1"),/[\x00-\x1f]/g,XV);return J3(r,"single",e)}function XV(s){var e=s.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+CV.call(e.toString(16))}function Cf(s){return"Object("+s+")"}function Ey(s){return s+" { ? }"}function eN(s,e,t,i){var n=i?VI(t,i):Cr.call(t,", ");return s+" ("+e+") {"+n+"}"}function KV(s){for(var e=0;e=0)return!1;return!0}function qV(s,e){var t;if(s.indent===" ")t=" ";else if(typeof s.indent=="number"&&s.indent>0)t=Cr.call(Array(s.indent+1)," ");else return null;return{base:t,prev:Cr.call(Array(e+1),t)}}function VI(s,e){if(s.length===0)return"";var t=` `+e.prev+e.base;return t+Cr.call(s,","+t)+` `+e.prev}function qg(s,e){var t=GI(s),i=[];if(t){i.length=s.length;for(var n=0;n"u"||!Ai?Ze:Ai(Uint8Array),Iu={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Ze:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Ze:ArrayBuffer,"%ArrayIteratorPrototype%":ih&&Ai?Ai([][Symbol.iterator]()):Ze,"%AsyncFromSyncIteratorPrototype%":Ze,"%AsyncFunction%":uh,"%AsyncGenerator%":uh,"%AsyncGeneratorFunction%":uh,"%AsyncIteratorPrototype%":uh,"%Atomics%":typeof Atomics>"u"?Ze:Atomics,"%BigInt%":typeof BigInt>"u"?Ze:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Ze:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Ze:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Ze:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Hj,"%eval%":eval,"%EvalError%":Wj,"%Float16Array%":typeof Float16Array>"u"?Ze:Float16Array,"%Float32Array%":typeof Float32Array>"u"?Ze:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Ze:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Ze:FinalizationRegistry,"%Function%":uU,"%GeneratorFunction%":uh,"%Int8Array%":typeof Int8Array>"u"?Ze:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Ze:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Ze:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ih&&Ai?Ai(Ai([][Symbol.iterator]())):Ze,"%JSON%":typeof JSON=="object"?JSON:Ze,"%Map%":typeof Map>"u"?Ze:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ih||!Ai?Ze:Ai(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":zj,"%Object.getOwnPropertyDescriptor%":N_,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Ze:Promise,"%Proxy%":typeof Proxy>"u"?Ze:Proxy,"%RangeError%":Yj,"%ReferenceError%":Xj,"%Reflect%":typeof Reflect>"u"?Ze:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Ze:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ih||!Ai?Ze:Ai(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Ze:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ih&&Ai?Ai(""[Symbol.iterator]()):Ze,"%Symbol%":ih?Symbol:Ze,"%SyntaxError%":Hc,"%ThrowTypeError%":sz,"%TypedArray%":az,"%TypeError%":Cc,"%Uint8Array%":typeof Uint8Array>"u"?Ze:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Ze:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Ze:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Ze:Uint32Array,"%URIError%":Kj,"%WeakMap%":typeof WeakMap>"u"?Ze:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Ze:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Ze:WeakSet,"%Function.prototype.call%":pg,"%Function.prototype.apply%":hU,"%Object.defineProperty%":iz,"%Object.getPrototypeOf%":nz,"%Math.abs%":qj,"%Math.floor%":$j,"%Math.max%":Qj,"%Math.min%":Zj,"%Math.pow%":Jj,"%Math.round%":ez,"%Math.sign%":tz,"%Reflect.getPrototypeOf%":rz};if(Ai)try{null.error}catch(s){var oz=Ai(Ai(s));Iu["%Error.prototype%"]=oz}var lz=function s(e){var t;if(e==="%AsyncFunction%")t=wy("async function () {}");else if(e==="%GeneratorFunction%")t=wy("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=wy("async function* () {}");else if(e==="%AsyncGenerator%"){var i=s("%AsyncGeneratorFunction%");i&&(t=i.prototype)}else if(e==="%AsyncIteratorPrototype%"){var n=s("%AsyncGenerator%");n&&Ai&&(t=Ai(n.prototype))}return Iu[e]=t,t},hN={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},mg=p0,Nm=jj(),uz=mg.call(pg,Array.prototype.concat),hz=mg.call(hU,Array.prototype.splice),cN=mg.call(pg,String.prototype.replace),Pm=mg.call(pg,String.prototype.slice),cz=mg.call(pg,RegExp.prototype.exec),fz=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,dz=/\\(\\)?/g,_z=function(e){var t=Pm(e,0,1),i=Pm(e,-1);if(t==="%"&&i!=="%")throw new Hc("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&t!=="%")throw new Hc("invalid intrinsic syntax, expected opening `%`");var n=[];return cN(e,fz,function(r,a,o,l){n[n.length]=o?cN(l,dz,"$1"):a||r}),n},gz=function(e,t){var i=e,n;if(Nm(hN,i)&&(n=hN[i],i="%"+n[0]+"%"),Nm(Iu,i)){var r=Iu[i];if(r===uh&&(r=lz(i)),typeof r>"u"&&!t)throw new Cc("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:r}}throw new Hc("intrinsic "+e+" does not exist!")},vw=function(e,t){if(typeof e!="string"||e.length===0)throw new Cc("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new Cc('"allowMissing" argument must be a boolean');if(cz(/^%?[^%]*%?$/,e)===null)throw new Hc("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=_z(e),n=i.length>0?i[0]:"",r=gz("%"+n+"%",t),a=r.name,o=r.value,l=!1,u=r.alias;u&&(n=u[0],hz(i,uz([0,1],u)));for(var c=1,h=!0;c=i.length){var g=N_(o,f);h=!!g,h&&"get"in g&&!("originalValue"in g.get)?o=g.get:o=o[f]}else h=Nm(o,f),o=o[f];h&&!l&&(Iu[a]=o)}}return o},cU=vw,fU=lU,pz=fU([cU("%String.prototype.indexOf%")]),dU=function(e,t){var i=cU(e,!!t);return typeof i=="function"&&pz(e,".prototype.")>-1?fU([i]):i},mz=vw,vg=dU,vz=_0,Ez=gf,fN=mz("%Map%",!0),yz=vg("Map.prototype.get",!0),Tz=vg("Map.prototype.set",!0),Iz=vg("Map.prototype.has",!0),Rz=vg("Map.prototype.delete",!0),Sz=vg("Map.prototype.size",!0),_U=!!fN&&function(){var e,t={assert:function(i){if(!t.has(i))throw new Ez("Side channel does not contain "+vz(i))},delete:function(i){if(e){var n=Rz(e,i);return Sz(e)===0&&(e=void 0),n}return!1},get:function(i){if(e)return yz(e,i)},has:function(i){return e?Iz(e,i):!1},set:function(i,n){e||(e=new fN),Tz(e,i,n)}};return t},bz=vw,m0=dU,Az=_0,$g=_U,Oz=gf,sh=bz("%WeakMap%",!0),wz=m0("WeakMap.prototype.get",!0),Cz=m0("WeakMap.prototype.set",!0),Mz=m0("WeakMap.prototype.has",!0),Nz=m0("WeakMap.prototype.delete",!0),Pz=sh?function(){var e,t,i={assert:function(n){if(!i.has(n))throw new Oz("Side channel does not contain "+Az(n))},delete:function(n){if(sh&&n&&(typeof n=="object"||typeof n=="function")){if(e)return Nz(e,n)}else if($g&&t)return t.delete(n);return!1},get:function(n){return sh&&n&&(typeof n=="object"||typeof n=="function")&&e?wz(e,n):t&&t.get(n)},has:function(n){return sh&&n&&(typeof n=="object"||typeof n=="function")&&e?Mz(e,n):!!t&&t.has(n)},set:function(n,r){sh&&n&&(typeof n=="object"||typeof n=="function")?(e||(e=new sh),Cz(e,n,r)):$g&&(t||(t=$g()),t.set(n,r))}};return i}:$g,kz=gf,xz=_0,Dz=ij,Lz=_U,Uz=Pz,Fz=Uz||Lz||Dz,Bz=function(){var e,t={assert:function(i){if(!t.has(i))throw new kz("Side channel does not contain "+xz(i))},delete:function(i){return!!e&&e.delete(i)},get:function(i){return e&&e.get(i)},has:function(i){return!!e&&e.has(i)},set:function(i,n){e||(e=Fz()),e.set(i,n)}};return t},Gz=String.prototype.replace,Vz=/%20/g,My={RFC1738:"RFC1738",RFC3986:"RFC3986"},Ew={default:My.RFC3986,formatters:{RFC1738:function(s){return Gz.call(s,Vz,"+")},RFC3986:function(s){return String(s)}},RFC1738:My.RFC1738,RFC3986:My.RFC3986},jz=Ew,Ny=Object.prototype.hasOwnProperty,kl=Array.isArray,or=function(){for(var s=[],e=0;e<256;++e)s.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return s}(),zz=function(e){for(;e.length>1;){var t=e.pop(),i=t.obj[t.prop];if(kl(i)){for(var n=[],r=0;r=Py?a.slice(l,l+Py):a,c=[],h=0;h=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||r===jz.RFC1738&&(f===40||f===41)){c[c.length]=u.charAt(h);continue}if(f<128){c[c.length]=or[f];continue}if(f<2048){c[c.length]=or[192|f>>6]+or[128|f&63];continue}if(f<55296||f>=57344){c[c.length]=or[224|f>>12]+or[128|f>>6&63]+or[128|f&63];continue}h+=1,f=65536+((f&1023)<<10|u.charCodeAt(h)&1023),c[c.length]=or[240|f>>18]+or[128|f>>12&63]+or[128|f>>6&63]+or[128|f&63]}o+=c.join("")}return o},Kz=function(e){for(var t=[{obj:{o:e},prop:"o"}],i=[],n=0;n"u"&&(T=0)}if(typeof c=="function"?E=c(t,E):E instanceof Date?E=d(E):i==="comma"&&Or(E)&&(E=Vp.maybeMap(E,function(B){return B instanceof Date?d(B):B})),E===null){if(a)return u&&!p?u(t,vi.encoder,m,"key",_):t;E=""}if(iH(E)||Vp.isBuffer(E)){if(u){var N=p?t:u(t,vi.encoder,m,"key",_);return[g(N)+"="+g(u(E,vi.encoder,m,"value",_))]}return[g(t)+"="+g(String(E))]}var P=[];if(typeof E>"u")return P;var k;if(i==="comma"&&Or(E))p&&u&&(E=Vp.maybeMap(E,u)),k=[{value:E.length>0?E.join(",")||null:void 0}];else if(Or(c))k=c;else{var L=Object.keys(E);k=h?L.sort(h):L}var j=l?String(t).replace(/\./g,"%2E"):String(t),z=n&&Or(E)&&E.length===1?j+"[]":j;if(r&&Or(E)&&E.length===0)return z+"[]";for(var ne=0;ne"u"?e.encodeDotInKeys===!0?!0:vi.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:vi.addQueryPrefix,allowDots:o,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:vi.allowEmptyArrays,arrayFormat:a,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:vi.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?vi.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:vi.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:vi.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:vi.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:vi.encodeValuesOnly,filter:r,format:i,formatter:n,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:vi.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:vi.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:vi.strictNullHandling}},rH=function(s,e){var t=s,i=nH(e),n,r;typeof i.filter=="function"?(r=i.filter,t=r("",t)):Or(i.filter)&&(r=i.filter,n=r);var a=[];if(typeof t!="object"||t===null)return"";var o=vU[i.arrayFormat],l=o==="comma"&&i.commaRoundTrip;n||(n=Object.keys(t)),i.sort&&n.sort(i.sort);for(var u=mU(),c=0;c0?_+d:""},Du=pU,jI=Object.prototype.hasOwnProperty,_N=Array.isArray,$t={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Du.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},aH=function(s){return s.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},yU=function(s,e,t){if(s&&typeof s=="string"&&e.comma&&s.indexOf(",")>-1)return s.split(",");if(e.throwOnLimitExceeded&&t>=e.arrayLimit)throw new RangeError("Array limit exceeded. Only "+e.arrayLimit+" element"+(e.arrayLimit===1?"":"s")+" allowed in an array.");return s},oH="utf8=%26%2310003%3B",lH="utf8=%E2%9C%93",uH=function(e,t){var i={__proto__:null},n=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;n=n.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var r=t.parameterLimit===1/0?void 0:t.parameterLimit,a=n.split(t.delimiter,t.throwOnLimitExceeded?r+1:r);if(t.throwOnLimitExceeded&&a.length>r)throw new RangeError("Parameter limit exceeded. Only "+r+" parameter"+(r===1?"":"s")+" allowed.");var o=-1,l,u=t.charset;if(t.charsetSentinel)for(l=0;l-1&&(_=_N(_)?[_]:_);var g=jI.call(i,d);g&&t.duplicates==="combine"?i[d]=Du.combine(i[d],_):(!g||t.duplicates==="last")&&(i[d]=_)}return i},hH=function(s,e,t,i){var n=0;if(s.length>0&&s[s.length-1]==="[]"){var r=s.slice(0,-1).join("");n=Array.isArray(e)&&e[r]?e[r].length:0}for(var a=i?e:yU(e,t,n),o=s.length-1;o>=0;--o){var l,u=s[o];if(u==="[]"&&t.parseArrays)l=t.allowEmptyArrays&&(a===""||t.strictNullHandling&&a===null)?[]:Du.combine([],a);else{l=t.plainObjects?{__proto__:null}:{};var c=u.charAt(0)==="["&&u.charAt(u.length-1)==="]"?u.slice(1,-1):u,h=t.decodeDotInKeys?c.replace(/%2E/g,"."):c,f=parseInt(h,10);!t.parseArrays&&h===""?l={0:a}:!isNaN(f)&&u!==h&&String(f)===h&&f>=0&&t.parseArrays&&f<=t.arrayLimit?(l=[],l[f]=a):h!=="__proto__"&&(l[h]=a)}a=l}return a},cH=function(e,t,i,n){if(e){var r=i.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/,o=/(\[[^[\]]*])/g,l=i.depth>0&&a.exec(r),u=l?r.slice(0,l.index):r,c=[];if(u){if(!i.plainObjects&&jI.call(Object.prototype,u)&&!i.allowPrototypes)return;c.push(u)}for(var h=0;i.depth>0&&(l=o.exec(r))!==null&&h"u"?$t.charset:e.charset,i=typeof e.duplicates>"u"?$t.duplicates:e.duplicates;if(i!=="combine"&&i!=="first"&&i!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var n=typeof e.allowDots>"u"?e.decodeDotInKeys===!0?!0:$t.allowDots:!!e.allowDots;return{allowDots:n,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:$t.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:$t.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:$t.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:$t.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:$t.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:$t.comma,decodeDotInKeys:typeof e.decodeDotInKeys=="boolean"?e.decodeDotInKeys:$t.decodeDotInKeys,decoder:typeof e.decoder=="function"?e.decoder:$t.decoder,delimiter:typeof e.delimiter=="string"||Du.isRegExp(e.delimiter)?e.delimiter:$t.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:$t.depth,duplicates:i,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:$t.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:$t.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:$t.plainObjects,strictDepth:typeof e.strictDepth=="boolean"?!!e.strictDepth:$t.strictDepth,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:$t.strictNullHandling,throwOnLimitExceeded:typeof e.throwOnLimitExceeded=="boolean"?e.throwOnLimitExceeded:!1}},dH=function(s,e){var t=fH(e);if(s===""||s===null||typeof s>"u")return t.plainObjects?{__proto__:null}:{};for(var i=typeof s=="string"?uH(s,t):s,n=t.plainObjects?{__proto__:null}:{},r=Object.keys(i),a=0;a",'"',"`"," ","\r",` `," "],RH=["{","}","|","\\","^","`"].concat(IH),zI=["'"].concat(RH),gN=["%","/","?",";","#"].concat(zI),pN=["/","?","#"],SH=255,mN=/^[+a-z0-9A-Z_-]{0,63}$/,bH=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,AH={javascript:!0,"javascript:":!0},HI={javascript:!0,"javascript:":!0},Mc={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},WI=mH;function v0(s,e,t){if(s&&typeof s=="object"&&s instanceof er)return s;var i=new er;return i.parse(s,e,t),i}er.prototype.parse=function(s,e,t){if(typeof s!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof s);var i=s.indexOf("?"),n=i!==-1&&i127?T+="x":T+=y[w];if(!T.match(mN)){var N=v.slice(0,d),P=v.slice(d+1),k=y.match(bH);k&&(N.push(k[1]),P.unshift(k[2])),P.length&&(o="/"+P.join(".")+o),this.hostname=N.join(".");break}}}this.hostname.length>SH?this.hostname="":this.hostname=this.hostname.toLowerCase(),m||(this.hostname=vH.toASCII(this.hostname));var L=this.port?":"+this.port:"",j=this.hostname||"";this.host=j+L,this.href+=this.host,m&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),o[0]!=="/"&&(o="/"+o))}if(!AH[c])for(var d=0,E=zI.length;d0?t.host.split("@"):!1;T&&(t.auth=T.shift(),t.hostname=T.shift(),t.host=t.hostname)}return t.search=s.search,t.query=s.query,(t.pathname!==null||t.search!==null)&&(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.href=t.format(),t}if(!v.length)return t.pathname=null,t.search?t.path="/"+t.search:t.path=null,t.href=t.format(),t;for(var w=v.slice(-1)[0],C=(t.host||s.host||v.length>1)&&(w==="."||w==="..")||w==="",N=0,P=v.length;P>=0;P--)w=v[P],w==="."?v.splice(P,1):w===".."?(v.splice(P,1),N++):N&&(v.splice(P,1),N--);if(!p&&!m)for(;N--;N)v.unshift("..");p&&v[0]!==""&&(!v[0]||v[0].charAt(0)!=="/")&&v.unshift(""),C&&v.join("/").substr(-1)!=="/"&&v.push("");var k=v[0]===""||v[0]&&v[0].charAt(0)==="/";if(y){t.hostname=k?"":v.length?v.shift():"",t.host=t.hostname;var T=t.host&&t.host.indexOf("@")>0?t.host.split("@"):!1;T&&(t.auth=T.shift(),t.hostname=T.shift(),t.host=t.hostname)}return p=p||t.host&&v.length,p&&!k&&v.unshift(""),v.length>0?t.pathname=v.join("/"):(t.pathname=null,t.path=null),(t.pathname!==null||t.search!==null)&&(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.auth=s.auth||t.auth,t.slashes=t.slashes||s.slashes,t.href=t.format(),t};er.prototype.parseHost=function(){var s=this.host,e=yH.exec(s);e&&(e=e[0],e!==":"&&(this.port=e.substr(1)),s=s.substr(0,s.length-e.length)),s&&(this.hostname=s)};var CH=v0,MH=wH,NH=OH;/*! * @pixi/utils - v6.5.10 * Compiled Thu, 06 Jul 2023 15:25:11 UTC * * @pixi/utils is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license */var jf={parse:CH,format:NH,resolve:MH};de.RETINA_PREFIX=/@([0-9\.]+)x/;de.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var vN=!1,EN="6.5.10";function PH(s){var e;if(!vN){if(de.ADAPTER.getNavigator().userAgent.toLowerCase().indexOf("chrome")>-1){var t=[` %c %c %c PixiJS `+EN+" - ✰ "+s+` ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥ `,"background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];(e=globalThis.console).log.apply(e,t)}else globalThis.console&&globalThis.console.log("PixiJS "+EN+" - "+s+" - http://www.pixijs.com/");vN=!0}}var xy;function kH(){return typeof xy>"u"&&(xy=function(){var e={stencil:!0,failIfMajorPerformanceCaveat:de.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!de.ADAPTER.getWebGLRenderingContext())return!1;var t=de.ADAPTER.createCanvas(),i=t.getContext("webgl",e)||t.getContext("experimental-webgl",e),n=!!(i&&i.getContextAttributes().stencil);if(i){var r=i.getExtension("WEBGL_lose_context");r&&r.loseContext()}return i=null,n}catch{return!1}}()),xy}var xH="#f0f8ff",DH="#faebd7",LH="#00ffff",UH="#7fffd4",FH="#f0ffff",BH="#f5f5dc",GH="#ffe4c4",VH="#000000",jH="#ffebcd",zH="#0000ff",HH="#8a2be2",WH="#a52a2a",YH="#deb887",XH="#5f9ea0",KH="#7fff00",qH="#d2691e",$H="#ff7f50",QH="#6495ed",ZH="#fff8dc",JH="#dc143c",eW="#00ffff",tW="#00008b",iW="#008b8b",sW="#b8860b",nW="#a9a9a9",rW="#006400",aW="#a9a9a9",oW="#bdb76b",lW="#8b008b",uW="#556b2f",hW="#ff8c00",cW="#9932cc",fW="#8b0000",dW="#e9967a",_W="#8fbc8f",gW="#483d8b",pW="#2f4f4f",mW="#2f4f4f",vW="#00ced1",EW="#9400d3",yW="#ff1493",TW="#00bfff",IW="#696969",RW="#696969",SW="#1e90ff",bW="#b22222",AW="#fffaf0",OW="#228b22",wW="#ff00ff",CW="#dcdcdc",MW="#f8f8ff",NW="#daa520",PW="#ffd700",kW="#808080",xW="#008000",DW="#adff2f",LW="#808080",UW="#f0fff0",FW="#ff69b4",BW="#cd5c5c",GW="#4b0082",VW="#fffff0",jW="#f0e68c",zW="#fff0f5",HW="#e6e6fa",WW="#7cfc00",YW="#fffacd",XW="#add8e6",KW="#f08080",qW="#e0ffff",$W="#fafad2",QW="#d3d3d3",ZW="#90ee90",JW="#d3d3d3",eY="#ffb6c1",tY="#ffa07a",iY="#20b2aa",sY="#87cefa",nY="#778899",rY="#778899",aY="#b0c4de",oY="#ffffe0",lY="#00ff00",uY="#32cd32",hY="#faf0e6",cY="#ff00ff",fY="#800000",dY="#66cdaa",_Y="#0000cd",gY="#ba55d3",pY="#9370db",mY="#3cb371",vY="#7b68ee",EY="#00fa9a",yY="#48d1cc",TY="#c71585",IY="#191970",RY="#f5fffa",SY="#ffe4e1",bY="#ffe4b5",AY="#ffdead",OY="#000080",wY="#fdf5e6",CY="#808000",MY="#6b8e23",NY="#ffa500",PY="#ff4500",kY="#da70d6",xY="#eee8aa",DY="#98fb98",LY="#afeeee",UY="#db7093",FY="#ffefd5",BY="#ffdab9",GY="#cd853f",VY="#ffc0cb",jY="#dda0dd",zY="#b0e0e6",HY="#800080",WY="#663399",YY="#ff0000",XY="#bc8f8f",KY="#4169e1",qY="#8b4513",$Y="#fa8072",QY="#f4a460",ZY="#2e8b57",JY="#fff5ee",eX="#a0522d",tX="#c0c0c0",iX="#87ceeb",sX="#6a5acd",nX="#708090",rX="#708090",aX="#fffafa",oX="#00ff7f",lX="#4682b4",uX="#d2b48c",hX="#008080",cX="#d8bfd8",fX="#ff6347",dX="#40e0d0",_X="#ee82ee",gX="#f5deb3",pX="#ffffff",mX="#f5f5f5",vX="#ffff00",EX="#9acd32",yX={aliceblue:xH,antiquewhite:DH,aqua:LH,aquamarine:UH,azure:FH,beige:BH,bisque:GH,black:VH,blanchedalmond:jH,blue:zH,blueviolet:HH,brown:WH,burlywood:YH,cadetblue:XH,chartreuse:KH,chocolate:qH,coral:$H,cornflowerblue:QH,cornsilk:ZH,crimson:JH,cyan:eW,darkblue:tW,darkcyan:iW,darkgoldenrod:sW,darkgray:nW,darkgreen:rW,darkgrey:aW,darkkhaki:oW,darkmagenta:lW,darkolivegreen:uW,darkorange:hW,darkorchid:cW,darkred:fW,darksalmon:dW,darkseagreen:_W,darkslateblue:gW,darkslategray:pW,darkslategrey:mW,darkturquoise:vW,darkviolet:EW,deeppink:yW,deepskyblue:TW,dimgray:IW,dimgrey:RW,dodgerblue:SW,firebrick:bW,floralwhite:AW,forestgreen:OW,fuchsia:wW,gainsboro:CW,ghostwhite:MW,goldenrod:NW,gold:PW,gray:kW,green:xW,greenyellow:DW,grey:LW,honeydew:UW,hotpink:FW,indianred:BW,indigo:GW,ivory:VW,khaki:jW,lavenderblush:zW,lavender:HW,lawngreen:WW,lemonchiffon:YW,lightblue:XW,lightcoral:KW,lightcyan:qW,lightgoldenrodyellow:$W,lightgray:QW,lightgreen:ZW,lightgrey:JW,lightpink:eY,lightsalmon:tY,lightseagreen:iY,lightskyblue:sY,lightslategray:nY,lightslategrey:rY,lightsteelblue:aY,lightyellow:oY,lime:lY,limegreen:uY,linen:hY,magenta:cY,maroon:fY,mediumaquamarine:dY,mediumblue:_Y,mediumorchid:gY,mediumpurple:pY,mediumseagreen:mY,mediumslateblue:vY,mediumspringgreen:EY,mediumturquoise:yY,mediumvioletred:TY,midnightblue:IY,mintcream:RY,mistyrose:SY,moccasin:bY,navajowhite:AY,navy:OY,oldlace:wY,olive:CY,olivedrab:MY,orange:NY,orangered:PY,orchid:kY,palegoldenrod:xY,palegreen:DY,paleturquoise:LY,palevioletred:UY,papayawhip:FY,peachpuff:BY,peru:GY,pink:VY,plum:jY,powderblue:zY,purple:HY,rebeccapurple:WY,red:YY,rosybrown:XY,royalblue:KY,saddlebrown:qY,salmon:$Y,sandybrown:QY,seagreen:ZY,seashell:JY,sienna:eX,silver:tX,skyblue:iX,slateblue:sX,slategray:nX,slategrey:rX,snow:aX,springgreen:oX,steelblue:lX,tan:uX,teal:hX,thistle:cX,tomato:fX,turquoise:dX,violet:_X,wheat:gX,white:pX,whitesmoke:mX,yellow:vX,yellowgreen:EX};function km(s,e){return e===void 0&&(e=[]),e[0]=(s>>16&255)/255,e[1]=(s>>8&255)/255,e[2]=(s&255)/255,e}function TU(s){var e=s.toString(16);return e="000000".substring(0,6-e.length)+e,"#"+e}function TX(s){return typeof s=="string"&&(s=yX[s.toLowerCase()]||s,s[0]==="#"&&(s=s.slice(1))),parseInt(s,16)}function IX(){for(var s=[],e=[],t=0;t<32;t++)s[t]=t,e[t]=t;s[ge.NORMAL_NPM]=ge.NORMAL,s[ge.ADD_NPM]=ge.ADD,s[ge.SCREEN_NPM]=ge.SCREEN,e[ge.NORMAL]=ge.NORMAL_NPM,e[ge.ADD]=ge.ADD_NPM,e[ge.SCREEN]=ge.SCREEN_NPM;var i=[];return i.push(e),i.push(s),i}var IU=IX();function RX(s,e){return IU[e?1:0][s]}function RU(s,e){if(e===1)return(e*255<<24)+s;if(e===0)return 0;var t=s>>16&255,i=s>>8&255,n=s&255;return t=t*e+.5|0,i=i*e+.5|0,n=n*e+.5|0,(e*255<<24)+(t<<16)+(i<<8)+n}function SX(s,e,t,i){return t=t||new Float32Array(4),t[0]=(s>>16&255)/255,t[1]=(s>>8&255)/255,t[2]=(s&255)/255,(i||i===void 0)&&(t[0]*=e,t[1]*=e,t[2]*=e),t[3]=e,t}function SU(s){if(s.BYTES_PER_ELEMENT===4)return s instanceof Float32Array?"Float32Array":s instanceof Uint32Array?"Uint32Array":"Int32Array";if(s.BYTES_PER_ELEMENT===2){if(s instanceof Uint16Array)return"Uint16Array"}else if(s.BYTES_PER_ELEMENT===1&&s instanceof Uint8Array)return"Uint8Array";return null}function xm(s){return s+=s===0?1:0,--s,s|=s>>>1,s|=s>>>2,s|=s>>>4,s|=s>>>8,s|=s>>>16,s+1}function yN(s){return!(s&s-1)&&!!s}function TN(s){var e=(s>65535?1:0)<<4;s>>>=e;var t=(s>255?1:0)<<3;return s>>>=t,e|=t,t=(s>15?1:0)<<2,s>>>=t,e|=t,t=(s>3?1:0)<<1,s>>>=t,e|=t,e|s>>1}function jp(s,e,t){var i=s.length,n;if(!(e>=i||t===0)){t=e+t>i?i-e:t;var r=i-t;for(n=e;n"u"?console.warn("PixiJS Deprecation Warning: ",e+` Deprecated since v`+s):(i=i.split(` `).splice(t).join(` `),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",e+` Deprecated since v`+s),console.warn(i),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",e+` Deprecated since v`+s),console.warn(i))),IN[e]=!0}}var RN={},$r=Object.create(null),pl=Object.create(null),SN=function(){function s(e,t,i){this.canvas=de.ADAPTER.createCanvas(),this.context=this.canvas.getContext("2d"),this.resolution=i||de.RESOLUTION,this.resize(e,t)}return s.prototype.clear=function(){this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.canvas.width,this.canvas.height)},s.prototype.resize=function(e,t){this.canvas.width=Math.round(e*this.resolution),this.canvas.height=Math.round(t*this.resolution)},s.prototype.destroy=function(){this.context=null,this.canvas=null},Object.defineProperty(s.prototype,"width",{get:function(){return this.canvas.width},set:function(e){this.canvas.width=Math.round(e)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"height",{get:function(){return this.canvas.height},set:function(e){this.canvas.height=Math.round(e)},enumerable:!1,configurable:!0}),s}();function AX(s){var e=s.width,t=s.height,i=s.getContext("2d",{willReadFrequently:!0}),n=i.getImageData(0,0,e,t),r=n.data,a=r.length,o={top:null,left:null,right:null,bottom:null},l=null,u,c,h;for(u=0;u8)throw new Error("max arguments reached");var u=this,c=u.name,h=u.items;this._aliasCount++;for(var f=0,d=h.length;f0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))},s.prototype.add=function(e){return e[this._name]&&(this.ensureNonAliasedItems(),this.remove(e),this.items.push(e)),this},s.prototype.remove=function(e){var t=this.items.indexOf(e);return t!==-1&&(this.ensureNonAliasedItems(),this.items.splice(t,1)),this},s.prototype.contains=function(e){return this.items.indexOf(e)!==-1},s.prototype.removeAll=function(){return this.ensureNonAliasedItems(),this.items.length=0,this},s.prototype.destroy=function(){this.removeAll(),this.items=null,this._name=null},Object.defineProperty(s.prototype,"empty",{get:function(){return this.items.length===0},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),s}();Object.defineProperties(Vi.prototype,{dispatch:{value:Vi.prototype.emit},run:{value:Vi.prototype.emit}});/*! * @pixi/ticker - v6.5.10 * Compiled Thu, 06 Jul 2023 15:25:11 UTC * * @pixi/ticker is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license */de.TARGET_FPMS=.06;var P_;(function(s){s[s.INTERACTION=50]="INTERACTION",s[s.HIGH=25]="HIGH",s[s.NORMAL=0]="NORMAL",s[s.LOW=-25]="LOW",s[s.UTILITY=-50]="UTILITY"})(P_||(P_={}));var Dy=function(){function s(e,t,i,n){t===void 0&&(t=null),i===void 0&&(i=0),n===void 0&&(n=!1),this.next=null,this.previous=null,this._destroyed=!1,this.fn=e,this.context=t,this.priority=i,this.once=n}return s.prototype.match=function(e,t){return t===void 0&&(t=null),this.fn===e&&this.context===t},s.prototype.emit=function(e){this.fn&&(this.context?this.fn.call(this.context,e):this.fn(e));var t=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),t},s.prototype.connect=function(e){this.previous=e,e.next&&(e.next.previous=this),this.next=e.next,e.next=this},s.prototype.destroy=function(e){e===void 0&&(e=!1),this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);var t=this.next;return this.next=e?null:t,this.previous=null,t},s}(),to=function(){function s(){var e=this;this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new Dy(null,null,1/0),this.deltaMS=1/de.TARGET_FPMS,this.elapsedMS=1/de.TARGET_FPMS,this._tick=function(t){e._requestId=null,e.started&&(e.update(t),e.started&&e._requestId===null&&e._head.next&&(e._requestId=requestAnimationFrame(e._tick)))}}return s.prototype._requestIfNeeded=function(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))},s.prototype._cancelIfNeeded=function(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)},s.prototype._startIfPossible=function(){this.started?this._requestIfNeeded():this.autoStart&&this.start()},s.prototype.add=function(e,t,i){return i===void 0&&(i=P_.NORMAL),this._addListener(new Dy(e,t,i))},s.prototype.addOnce=function(e,t,i){return i===void 0&&(i=P_.NORMAL),this._addListener(new Dy(e,t,i,!0))},s.prototype._addListener=function(e){var t=this._head.next,i=this._head;if(!t)e.connect(i);else{for(;t;){if(e.priority>t.priority){e.connect(i);break}i=t,t=t.next}e.previous||e.connect(i)}return this._startIfPossible(),this},s.prototype.remove=function(e,t){for(var i=this._head.next;i;)i.match(e,t)?i=i.destroy():i=i.next;return this._head.next||this._cancelIfNeeded(),this},Object.defineProperty(s.prototype,"count",{get:function(){if(!this._head)return 0;for(var e=0,t=this._head;t=t.next;)e++;return e},enumerable:!1,configurable:!0}),s.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},s.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},s.prototype.destroy=function(){if(!this._protected){this.stop();for(var e=this._head.next;e;)e=e.destroy(!0);this._head.destroy(),this._head=null}},s.prototype.update=function(e){e===void 0&&(e=performance.now());var t;if(e>this.lastTime){if(t=this.elapsedMS=e-this.lastTime,t>this._maxElapsedMS&&(t=this._maxElapsedMS),t*=this.speed,this._minElapsedMS){var i=e-this._lastFrame|0;if(i=this.x&&e=this.y&&te.right?e.right:this.right;if(n<=i)return!1;var r=this.ye.bottom?e.bottom:this.bottom;return a>r}var o=this.left,l=this.right,u=this.top,c=this.bottom;if(l<=o||c<=u)return!1;var h=Zg[0].set(e.left,e.top),f=Zg[1].set(e.left,e.bottom),d=Zg[2].set(e.right,e.top),_=Zg[3].set(e.right,e.bottom);if(d.x<=h.x||f.y<=h.y)return!1;var g=Math.sign(t.a*t.d-t.b*t.c);if(g===0||(t.apply(h,h),t.apply(f,f),t.apply(d,d),t.apply(_,_),Math.max(h.x,f.x,d.x,_.x)<=o||Math.min(h.x,f.x,d.x,_.x)>=l||Math.max(h.y,f.y,d.y,_.y)<=u||Math.min(h.y,f.y,d.y,_.y)>=c))return!1;var p=g*(f.y-h.y),m=g*(h.x-f.x),v=p*o+m*u,E=p*l+m*u,y=p*o+m*c,T=p*l+m*c;if(Math.max(v,E,y,T)<=p*h.x+m*h.y||Math.min(v,E,y,T)>=p*_.x+m*_.y)return!1;var w=g*(h.y-d.y),C=g*(d.x-h.x),N=w*o+C*u,P=w*l+C*u,k=w*o+C*c,L=w*l+C*c;return!(Math.max(N,P,k,L)<=w*h.x+C*h.y||Math.min(N,P,k,L)>=w*_.x+C*_.y)},s.prototype.pad=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=e),this.x-=e,this.y-=t,this.width+=e*2,this.height+=t*2,this},s.prototype.fit=function(e){var t=Math.max(this.x,e.x),i=Math.min(this.x+this.width,e.x+e.width),n=Math.max(this.y,e.y),r=Math.min(this.y+this.height,e.y+e.height);return this.x=t,this.width=Math.max(i-t,0),this.y=n,this.height=Math.max(r-n,0),this},s.prototype.ceil=function(e,t){e===void 0&&(e=1),t===void 0&&(t=.001);var i=Math.ceil((this.x+this.width-t)*e)/e,n=Math.ceil((this.y+this.height-t)*e)/e;return this.x=Math.floor((this.x+t)*e)/e,this.y=Math.floor((this.y+t)*e)/e,this.width=i-this.x,this.height=n-this.y,this},s.prototype.enlarge=function(e){var t=Math.min(this.x,e.x),i=Math.max(this.x+this.width,e.x+e.width),n=Math.min(this.y,e.y),r=Math.max(this.y+this.height,e.y+e.height);return this.x=t,this.width=i-t,this.y=n,this.height=r-n,this},s.prototype.toString=function(){return"[@pixi/math:Rectangle x="+this.x+" y="+this.y+" width="+this.width+" height="+this.height+"]"},s}(),NX=function(){function s(e,t,i){e===void 0&&(e=0),t===void 0&&(t=0),i===void 0&&(i=0),this.x=e,this.y=t,this.radius=i,this.type=Ci.CIRC}return s.prototype.clone=function(){return new s(this.x,this.y,this.radius)},s.prototype.contains=function(e,t){if(this.radius<=0)return!1;var i=this.radius*this.radius,n=this.x-e,r=this.y-t;return n*=n,r*=r,n+r<=i},s.prototype.getBounds=function(){return new ve(this.x-this.radius,this.y-this.radius,this.radius*2,this.radius*2)},s.prototype.toString=function(){return"[@pixi/math:Circle x="+this.x+" y="+this.y+" radius="+this.radius+"]"},s}(),PX=function(){function s(e,t,i,n){e===void 0&&(e=0),t===void 0&&(t=0),i===void 0&&(i=0),n===void 0&&(n=0),this.x=e,this.y=t,this.width=i,this.height=n,this.type=Ci.ELIP}return s.prototype.clone=function(){return new s(this.x,this.y,this.width,this.height)},s.prototype.contains=function(e,t){if(this.width<=0||this.height<=0)return!1;var i=(e-this.x)/this.width,n=(t-this.y)/this.height;return i*=i,n*=n,i+n<=1},s.prototype.getBounds=function(){return new ve(this.x-this.width,this.y-this.height,this.width,this.height)},s.prototype.toString=function(){return"[@pixi/math:Ellipse x="+this.x+" y="+this.y+" width="+this.width+" height="+this.height+"]"},s}(),zp=function(){function s(){for(var e=arguments,t=[],i=0;it!=c>t&&e<(u-o)*((t-l)/(c-l))+o;h&&(i=!i)}return i},s.prototype.toString=function(){return"[@pixi/math:Polygon"+("closeStroke="+this.closeStroke)+("points="+this.points.reduce(function(e,t){return e+", "+t},"")+"]")},s}(),kX=function(){function s(e,t,i,n,r){e===void 0&&(e=0),t===void 0&&(t=0),i===void 0&&(i=0),n===void 0&&(n=0),r===void 0&&(r=20),this.x=e,this.y=t,this.width=i,this.height=n,this.radius=r,this.type=Ci.RREC}return s.prototype.clone=function(){return new s(this.x,this.y,this.width,this.height,this.radius)},s.prototype.contains=function(e,t){if(this.width<=0||this.height<=0)return!1;if(e>=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height){var i=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(t>=this.y+i&&t<=this.y+this.height-i||e>=this.x+i&&e<=this.x+this.width-i)return!0;var n=e-(this.x+i),r=t-(this.y+i),a=i*i;if(n*n+r*r<=a||(n=e-(this.x+this.width-i),n*n+r*r<=a)||(r=t-(this.y+this.height-i),n*n+r*r<=a)||(n=e-(this.x+i),n*n+r*r<=a))return!0}return!1},s.prototype.toString=function(){return"[@pixi/math:RoundedRectangle x="+this.x+" y="+this.y+("width="+this.width+" height="+this.height+" radius="+this.radius+"]")},s}(),Oh=function(){function s(e,t,i,n){i===void 0&&(i=0),n===void 0&&(n=0),this._x=i,this._y=n,this.cb=e,this.scope=t}return s.prototype.clone=function(e,t){return e===void 0&&(e=this.cb),t===void 0&&(t=this.scope),new s(e,t,this._x,this._y)},s.prototype.set=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=e),(this._x!==e||this._y!==t)&&(this._x=e,this._y=t,this.cb.call(this.scope)),this},s.prototype.copyFrom=function(e){return(this._x!==e.x||this._y!==e.y)&&(this._x=e.x,this._y=e.y,this.cb.call(this.scope)),this},s.prototype.copyTo=function(e){return e.set(this._x,this._y),e},s.prototype.equals=function(e){return e.x===this._x&&e.y===this._y},s.prototype.toString=function(){return"[@pixi/math:ObservablePoint x=0 y=0 scope="+this.scope+"]"},Object.defineProperty(s.prototype,"x",{get:function(){return this._x},set:function(e){this._x!==e&&(this._x=e,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"y",{get:function(){return this._y},set:function(e){this._y!==e&&(this._y=e,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),s}(),dt=function(){function s(e,t,i,n,r,a){e===void 0&&(e=1),t===void 0&&(t=0),i===void 0&&(i=0),n===void 0&&(n=1),r===void 0&&(r=0),a===void 0&&(a=0),this.array=null,this.a=e,this.b=t,this.c=i,this.d=n,this.tx=r,this.ty=a}return s.prototype.fromArray=function(e){this.a=e[0],this.b=e[1],this.c=e[3],this.d=e[4],this.tx=e[2],this.ty=e[5]},s.prototype.set=function(e,t,i,n,r,a){return this.a=e,this.b=t,this.c=i,this.d=n,this.tx=r,this.ty=a,this},s.prototype.toArray=function(e,t){this.array||(this.array=new Float32Array(9));var i=t||this.array;return e?(i[0]=this.a,i[1]=this.b,i[2]=0,i[3]=this.c,i[4]=this.d,i[5]=0,i[6]=this.tx,i[7]=this.ty,i[8]=1):(i[0]=this.a,i[1]=this.c,i[2]=this.tx,i[3]=this.b,i[4]=this.d,i[5]=this.ty,i[6]=0,i[7]=0,i[8]=1),i},s.prototype.apply=function(e,t){t=t||new Q;var i=e.x,n=e.y;return t.x=this.a*i+this.c*n+this.tx,t.y=this.b*i+this.d*n+this.ty,t},s.prototype.applyInverse=function(e,t){t=t||new Q;var i=1/(this.a*this.d+this.c*-this.b),n=e.x,r=e.y;return t.x=this.d*i*n+-this.c*i*r+(this.ty*this.c-this.tx*this.d)*i,t.y=this.a*i*r+-this.b*i*n+(-this.ty*this.a+this.tx*this.b)*i,t},s.prototype.translate=function(e,t){return this.tx+=e,this.ty+=t,this},s.prototype.scale=function(e,t){return this.a*=e,this.d*=t,this.c*=e,this.b*=t,this.tx*=e,this.ty*=t,this},s.prototype.rotate=function(e){var t=Math.cos(e),i=Math.sin(e),n=this.a,r=this.c,a=this.tx;return this.a=n*t-this.b*i,this.b=n*i+this.b*t,this.c=r*t-this.d*i,this.d=r*i+this.d*t,this.tx=a*t-this.ty*i,this.ty=a*i+this.ty*t,this},s.prototype.append=function(e){var t=this.a,i=this.b,n=this.c,r=this.d;return this.a=e.a*t+e.b*n,this.b=e.a*i+e.b*r,this.c=e.c*t+e.d*n,this.d=e.c*i+e.d*r,this.tx=e.tx*t+e.ty*n+this.tx,this.ty=e.tx*i+e.ty*r+this.ty,this},s.prototype.setTransform=function(e,t,i,n,r,a,o,l,u){return this.a=Math.cos(o+u)*r,this.b=Math.sin(o+u)*r,this.c=-Math.sin(o-l)*a,this.d=Math.cos(o-l)*a,this.tx=e-(i*this.a+n*this.c),this.ty=t-(i*this.b+n*this.d),this},s.prototype.prepend=function(e){var t=this.tx;if(e.a!==1||e.b!==0||e.c!==0||e.d!==1){var i=this.a,n=this.c;this.a=i*e.a+this.b*e.c,this.b=i*e.b+this.b*e.d,this.c=n*e.a+this.d*e.c,this.d=n*e.b+this.d*e.d}return this.tx=t*e.a+this.ty*e.c+e.tx,this.ty=t*e.b+this.ty*e.d+e.ty,this},s.prototype.decompose=function(e){var t=this.a,i=this.b,n=this.c,r=this.d,a=e.pivot,o=-Math.atan2(-n,r),l=Math.atan2(i,t),u=Math.abs(o+l);return u<1e-5||Math.abs(k_-u)<1e-5?(e.rotation=l,e.skew.x=e.skew.y=0):(e.rotation=0,e.skew.x=o,e.skew.y=l),e.scale.x=Math.sqrt(t*t+i*i),e.scale.y=Math.sqrt(n*n+r*r),e.position.x=this.tx+(a.x*t+a.y*n),e.position.y=this.ty+(a.x*i+a.y*r),e},s.prototype.invert=function(){var e=this.a,t=this.b,i=this.c,n=this.d,r=this.tx,a=e*n-t*i;return this.a=n/a,this.b=-t/a,this.c=-i/a,this.d=e/a,this.tx=(i*this.ty-n*r)/a,this.ty=-(e*this.ty-t*r)/a,this},s.prototype.identity=function(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this},s.prototype.clone=function(){var e=new s;return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e},s.prototype.copyTo=function(e){return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e},s.prototype.copyFrom=function(e){return this.a=e.a,this.b=e.b,this.c=e.c,this.d=e.d,this.tx=e.tx,this.ty=e.ty,this},s.prototype.toString=function(){return"[@pixi/math:Matrix a="+this.a+" b="+this.b+" c="+this.c+" d="+this.d+" tx="+this.tx+" ty="+this.ty+"]"},Object.defineProperty(s,"IDENTITY",{get:function(){return new s},enumerable:!1,configurable:!0}),Object.defineProperty(s,"TEMP_MATRIX",{get:function(){return new s},enumerable:!1,configurable:!0}),s}(),bl=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],Al=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Ol=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],wl=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],XI=[],bU=[],Jg=Math.sign;function xX(){for(var s=0;s<16;s++){var e=[];XI.push(e);for(var t=0;t<16;t++)for(var i=Jg(bl[s]*bl[t]+Ol[s]*Al[t]),n=Jg(Al[s]*bl[t]+wl[s]*Al[t]),r=Jg(bl[s]*Ol[t]+Ol[s]*wl[t]),a=Jg(Al[s]*Ol[t]+wl[s]*wl[t]),o=0;o<16;o++)if(bl[o]===i&&Al[o]===n&&Ol[o]===r&&wl[o]===a){e.push(o);break}}for(var s=0;s<16;s++){var l=new dt;l.set(bl[s],Al[s],Ol[s],wl[s],0,0),bU.push(l)}}xX();var Vt={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:function(s){return bl[s]},uY:function(s){return Al[s]},vX:function(s){return Ol[s]},vY:function(s){return wl[s]},inv:function(s){return s&8?s&15:-s&7},add:function(s,e){return XI[s][e]},sub:function(s,e){return XI[s][Vt.inv(e)]},rotate180:function(s){return s^4},isVertical:function(s){return(s&3)===2},byDirection:function(s,e){return Math.abs(s)*2<=Math.abs(e)?e>=0?Vt.S:Vt.N:Math.abs(e)*2<=Math.abs(s)?s>0?Vt.E:Vt.W:e>0?s>0?Vt.SE:Vt.SW:s>0?Vt.NE:Vt.NW},matrixAppendRotationInv:function(s,e,t,i){t===void 0&&(t=0),i===void 0&&(i=0);var n=bU[Vt.inv(e)];n.tx=t,n.ty=i,s.append(n)}},AU=function(){function s(){this.worldTransform=new dt,this.localTransform=new dt,this.position=new Oh(this.onChange,this,0,0),this.scale=new Oh(this.onChange,this,1,1),this.pivot=new Oh(this.onChange,this,0,0),this.skew=new Oh(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}return s.prototype.onChange=function(){this._localID++},s.prototype.updateSkew=function(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++},s.prototype.toString=function(){return"[@pixi/math:Transform "+("position=("+this.position.x+", "+this.position.y+") ")+("rotation="+this.rotation+" ")+("scale=("+this.scale.x+", "+this.scale.y+") ")+("skew=("+this.skew.x+", "+this.skew.y+") ")+"]"},s.prototype.updateLocalTransform=function(){var e=this.localTransform;this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1)},s.prototype.updateTransform=function(e){var t=this.localTransform;if(this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==e._worldID){var i=e.worldTransform,n=this.worldTransform;n.a=t.a*i.a+t.b*i.c,n.b=t.a*i.b+t.b*i.d,n.c=t.c*i.a+t.d*i.c,n.d=t.c*i.b+t.d*i.d,n.tx=t.tx*i.a+t.ty*i.c+i.tx,n.ty=t.tx*i.b+t.ty*i.d+i.ty,this._parentID=e._worldID,this._worldID++}},s.prototype.setFromMatrix=function(e){e.decompose(this),this._localID++},Object.defineProperty(s.prototype,"rotation",{get:function(){return this._rotation},set:function(e){this._rotation!==e&&(this._rotation=e,this.updateSkew())},enumerable:!1,configurable:!0}),s.IDENTITY=new s,s}();/*! * @pixi/core - v6.5.10 * Compiled Thu, 06 Jul 2023 15:25:11 UTC * * @pixi/core is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license */de.PREFER_ENV=fu.any?Ga.WEBGL:Ga.WEBGL2;de.STRICT_TEXTURE_CACHE=!1;var KI=[];function OU(s,e){if(!s)return null;var t="";if(typeof s=="string"){var i=/\.(\w{3,4})(?:$|\?|#)/i.exec(s);i&&(t=i[1].toLowerCase())}for(var n=KI.length-1;n>=0;--n){var r=KI[n];if(r.test&&r.test(s,t))return new r(s,e)}throw new Error("Unrecognized source type to auto-detect Resource")}/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var qI=function(s,e){return qI=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])},qI(s,e)};function Ct(s,e){qI(s,e);function t(){this.constructor=s}s.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var $I=function(){return $I=Object.assign||function(e){for(var t=arguments,i,n=1,r=arguments.length;n0&&c>0,n.textureCacheIds=[],n.destroyed=!1,n.resource=null,n._batchEnabled=0,n._batchLocation=0,n.parentTextureArray=null,n.setResource(t),n}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(t){this._mipmap!==t&&(this._mipmap=t,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scaleMode",{get:function(){return this._scaleMode},set:function(t){this._scaleMode!==t&&(this._scaleMode=t,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"wrapMode",{get:function(){return this._wrapMode},set:function(t){this._wrapMode!==t&&(this._wrapMode=t,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),e.prototype.setStyle=function(t,i){var n;return t!==void 0&&t!==this.scaleMode&&(this.scaleMode=t,n=!0),i!==void 0&&i!==this.mipmap&&(this.mipmap=i,n=!0),n&&this.dirtyStyleId++,this},e.prototype.setSize=function(t,i,n){return n=n||this.resolution,this.setRealSize(t*n,i*n,n)},e.prototype.setRealSize=function(t,i,n){return this.resolution=n||this.resolution,this.width=Math.round(t)/this.resolution,this.height=Math.round(i)/this.resolution,this._refreshPOT(),this.update(),this},e.prototype._refreshPOT=function(){this.isPowerOfTwo=yN(this.realWidth)&&yN(this.realHeight)},e.prototype.setResolution=function(t){var i=this.resolution;return i===t?this:(this.resolution=t,this.valid&&(this.width=Math.round(this.width*i)/t,this.height=Math.round(this.height*i)/t,this.emit("update",this)),this._refreshPOT(),this)},e.prototype.setResource=function(t){if(this.resource===t)return this;if(this.resource)throw new Error("Resource can be set only once");return t.bind(this),this.resource=t,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(t){this.emit("error",this,t)},e.prototype.destroy=function(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete pl[this.cacheId],delete $r[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(t,i,n){n===void 0&&(n=de.STRICT_TEXTURE_CACHE);var r=typeof t=="string",a=null;if(r)a=t;else{if(!t._pixiId){var o=i&&i.pixiIdPrefix||"pixiid";t._pixiId=o+"_"+Lu()}a=t._pixiId}var l=pl[a];if(r&&n&&!l)throw new Error('The cacheId "'+a+'" does not exist in BaseTextureCache.');return l||(l=new e(t,i),l.cacheId=a,e.addToCache(l,a)),l},e.fromBuffer=function(t,i,n,r){t=t||new Float32Array(i*n*4);var a=new yw(t,{width:i,height:n}),o=t instanceof Float32Array?lt.FLOAT:lt.UNSIGNED_BYTE;return new e(a,Object.assign({},LX,r||{width:i,height:n,type:o}))},e.addToCache=function(t,i){i&&(t.textureCacheIds.indexOf(i)===-1&&t.textureCacheIds.push(i),pl[i]&&console.warn("BaseTexture added to the cache with an id ["+i+"] that already had an entry"),pl[i]=t)},e.removeFromCache=function(t){if(typeof t=="string"){var i=pl[t];if(i){var n=i.textureCacheIds.indexOf(t);return n>-1&&i.textureCacheIds.splice(n,1),delete pl[t],i}}else if(t&&t.textureCacheIds){for(var r=0;r0)if(t.resource)this.addResourceAt(t.resource,i);else throw new Error("CubeResource does not support copying of renderTexture.");else t.target=Tu.TEXTURE_CUBE_MAP_POSITIVE_X+i,t.parentTextureArray=this.baseTexture,this.items[i]=t;return t.valid&&!this.valid&&this.resize(t.realWidth,t.realHeight),this.items[i]=t,this},e.prototype.upload=function(t,i,n){for(var r=this.itemDirtyIds,a=0;a)?\s*()]*-->)?\s*\]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i,e}(tl),VX=function(s){Ct(e,s);function e(t,i){var n=this;if(i=i||{},!(t instanceof HTMLVideoElement)){var r=document.createElement("video");r.setAttribute("preload","auto"),r.setAttribute("webkit-playsinline",""),r.setAttribute("playsinline",""),typeof t=="string"&&(t=[t]);var a=t[0].src||t[0];tl.crossOrigin(r,a,i.crossorigin);for(var o=0;o2},e.prototype._onPlayStart=function(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(to.shared.add(this.update,this),this._isConnectedToTicker=!0)},e.prototype._onPlayStop=function(){this._isConnectedToTicker&&(to.shared.remove(this.update,this),this._isConnectedToTicker=!1)},e.prototype._onCanPlay=function(){var t=this.source;t.removeEventListener("canplay",this._onCanPlay),t.removeEventListener("canplaythrough",this._onCanPlay);var i=this.valid;this.resize(t.videoWidth,t.videoHeight),!i&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&t.play()},e.prototype.dispose=function(){this._isConnectedToTicker&&(to.shared.remove(this.update,this),this._isConnectedToTicker=!1);var t=this.source;t&&(t.removeEventListener("error",this._onError,!0),t.pause(),t.src="",t.load()),s.prototype.dispose.call(this)},Object.defineProperty(e.prototype,"autoUpdate",{get:function(){return this._autoUpdate},set:function(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isConnectedToTicker?(to.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(to.shared.add(this.update,this),this._isConnectedToTicker=!0))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"updateFPS",{get:function(){return this._updateFPS},set:function(t){t!==this._updateFPS&&(this._updateFPS=t)},enumerable:!1,configurable:!0}),e.test=function(t,i){return globalThis.HTMLVideoElement&&t instanceof HTMLVideoElement||e.TYPES.indexOf(i)>-1},e.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],e.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},e}(tl),jX=function(s){Ct(e,s);function e(t){return s.call(this,t)||this}return e.test=function(t){return!!globalThis.createImageBitmap&&typeof ImageBitmap<"u"&&t instanceof ImageBitmap},e}(tl);KI.push(CU,jX,FX,VX,GX,yw,BX,UX);var zX=function(s){Ct(e,s);function e(){return s!==null&&s.apply(this,arguments)||this}return e.prototype.upload=function(t,i,n){var r=t.gl;r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i.alphaMode===el.UNPACK);var a=i.realWidth,o=i.realHeight;return n.width===a&&n.height===o?r.texSubImage2D(i.target,0,0,0,a,o,i.format,n.type,this.data):(n.width=a,n.height=o,r.texImage2D(i.target,0,n.internalFormat,a,o,0,i.format,n.type,this.data)),!0},e}(yw),QI=function(){function s(e,t){this.width=Math.round(e||100),this.height=Math.round(t||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 Vi("disposeFramebuffer"),this.multisample=Ut.NONE}return Object.defineProperty(s.prototype,"colorTexture",{get:function(){return this.colorTextures[0]},enumerable:!1,configurable:!0}),s.prototype.addColorTexture=function(e,t){return e===void 0&&(e=0),this.colorTextures[e]=t||new pt(null,{scaleMode:tn.NEAREST,resolution:1,mipmap:Jo.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this},s.prototype.addDepthTexture=function(e){return this.depthTexture=e||new pt(new zX(null,{width:this.width,height:this.height}),{scaleMode:tn.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:Jo.OFF,format:ae.DEPTH_COMPONENT,type:lt.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this},s.prototype.enableDepth=function(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this},s.prototype.enableStencil=function(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this},s.prototype.resize=function(e,t){if(e=Math.round(e),t=Math.round(t),!(e===this.width&&t===this.height)){this.width=e,this.height=t,this.dirtyId++,this.dirtySize++;for(var i=0;i-1&&i.textureCacheIds.splice(n,1),delete $r[t],i}}else if(t&&t.textureCacheIds){for(var r=0;rthis.baseTexture.width,l=n+a>this.baseTexture.height;if(o||l){var u=o&&l?"and":"or",c="X: "+i+" + "+r+" = "+(i+r)+" > "+this.baseTexture.width,h="Y: "+n+" + "+a+" = "+(n+a)+" > "+this.baseTexture.height;throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: "+(c+" "+u+" "+h))}this.valid=r&&a&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=t),this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rotate",{get:function(){return this._rotate},set:function(t){this._rotate=t,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 pt),ep(e._EMPTY),ep(e._EMPTY.baseTexture)),e._EMPTY},enumerable:!1,configurable:!0}),Object.defineProperty(e,"WHITE",{get:function(){if(!e._WHITE){var t=de.ADAPTER.createCanvas(16,16),i=t.getContext("2d");t.width=16,t.height=16,i.fillStyle="white",i.fillRect(0,0,16,16),e._WHITE=new e(pt.from(t)),ep(e._WHITE),ep(e._WHITE.baseTexture)}return e._WHITE},enumerable:!1,configurable:!0}),e}(c0),Pi=function(s){Ct(e,s);function e(t,i){var n=s.call(this,t,i)||this;return n.valid=!0,n.filterFrame=null,n.filterPoolKey=null,n.updateUvs(),n}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(t){this.framebuffer.multisample=t},enumerable:!1,configurable:!0}),e.prototype.resize=function(t,i,n){n===void 0&&(n=!0);var r=this.baseTexture.resolution,a=Math.round(t*r)/r,o=Math.round(i*r)/r;this.valid=a>0&&o>0,this._frame.width=this.orig.width=a,this._frame.height=this.orig.height=o,n&&this.baseTexture.resize(a,o),this.updateUvs()},e.prototype.setResolution=function(t){var i=this.baseTexture;i.resolution!==t&&(i.setResolution(t),this.resize(i.width,i.height,!1))},e.create=function(t){for(var i=arguments,n=[],r=1;r>>0,n>1&&(r+=n*4294967296)):r=n>1?-n:-1,this.texturePool[r]||(this.texturePool[r]=[]);var a=this.texturePool[r].pop();return a||(a=this.createTexture(e,t,n)),a.filterPoolKey=r,a.setResolution(i),a},s.prototype.getFilterTexture=function(e,t,i){var n=this.getOptimalTexture(e.width,e.height,t||e.resolution,i||Ut.NONE);return n.filterFrame=e.filterFrame,n},s.prototype.returnTexture=function(e){var t=e.filterPoolKey;e.filterFrame=null,this.texturePool[t].push(e)},s.prototype.returnFilterTexture=function(e){this.returnTexture(e)},s.prototype.clear=function(e){if(e=e!==!1,e)for(var t in this.texturePool){var i=this.texturePool[t];if(i)for(var n=0;n0&&e.height>0;for(var t in this.texturePool)if(Number(t)<0){var i=this.texturePool[t];if(i)for(var n=0;n1){for(var c=0;c1&&(h=this.getOptimalFilterTexture(c.width,c.height,t.resolution),h.filterFrame=c.filterFrame),i[f].apply(this,c,h,eo.CLEAR,t);var d=c;c=h,h=d}i[f].apply(this,c,u.renderTexture,eo.BLEND,t),f>1&&t.multisample>1&&this.returnFilterTexture(t.renderTexture),this.returnFilterTexture(c),this.returnFilterTexture(h)}t.clear(),this.statePool.push(t)},s.prototype.bindAndClear=function(e,t){t===void 0&&(t=eo.CLEAR);var i=this.renderer,n=i.renderTexture,r=i.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 a=this.tempRect;a.x=0,a.y=0,a.width=e.filterFrame.width,a.height=e.filterFrame.height,n.bind(e,e.filterFrame,a)}else e!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?n.bind(e):this.renderer.renderTexture.bind(e,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);var o=r.stateId&1||this.forceClear;(t===eo.CLEAR||t===eo.BLIT&&o)&&this.renderer.framebuffer.clear(0,0,0,0)},s.prototype.applyFilter=function(e,t,i,n){var r=this.renderer;r.state.set(e.state),this.bindAndClear(i,n),e.uniforms.uSampler=t,e.uniforms.filterGlobals=this.globalUniforms,r.shader.bind(e),e.legacy=!!e.program.attributeData.aTextureCoord,e.legacy?(this.quadUv.map(t._frame,t.filterFrame),r.geometry.bind(this.quadUv),r.geometry.draw(Ia.TRIANGLES)):(r.geometry.bind(this.quad),r.geometry.draw(Ia.TRIANGLE_STRIP))},s.prototype.calculateSpriteMatrix=function(e,t){var i=this.activeState,n=i.sourceFrame,r=i.destinationFrame,a=t._texture.orig,o=e.set(r.width,0,0,r.height,n.x,n.y),l=t.worldTransform.copyTo(dt.TEMP_MATRIX);return l.invert(),o.prepend(l),o.scale(1/a.width,1/a.height),o.translate(t.anchor.x,t.anchor.y),o},s.prototype.destroy=function(){this.renderer=null,this.texturePool.clear(!1)},s.prototype.getOptimalFilterTexture=function(e,t,i,n){return i===void 0&&(i=1),n===void 0&&(n=Ut.NONE),this.texturePool.getOptimalTexture(e,t,i,n)},s.prototype.getFilterTexture=function(e,t,i){if(typeof e=="number"){var n=e;e=t,t=n}e=e||this.activeState.renderTexture;var r=this.texturePool.getOptimalTexture(e.width,e.height,t||e.resolution,i||Ut.NONE);return r.filterFrame=e.filterFrame,r},s.prototype.returnFilterTexture=function(e){this.texturePool.returnTexture(e)},s.prototype.emptyPool=function(){this.texturePool.clear(!0)},s.prototype.resize=function(){this.texturePool.setScreenSize(this.renderer.view)},s.prototype.transformAABB=function(e,t){var i=tp[0],n=tp[1],r=tp[2],a=tp[3];i.set(t.left,t.top),n.set(t.left,t.bottom),r.set(t.right,t.top),a.set(t.right,t.bottom),e.apply(i,i),e.apply(n,n),e.apply(r,r),e.apply(a,a);var o=Math.min(i.x,n.x,r.x,a.x),l=Math.min(i.y,n.y,r.y,a.y),u=Math.max(i.x,n.x,r.x,a.x),c=Math.max(i.y,n.y,r.y,a.y);t.x=o,t.y=l,t.width=u-o,t.height=c-l},s.prototype.roundFrame=function(e,t,i,n,r){if(!(e.width<=0||e.height<=0||i.width<=0||i.height<=0)){if(r){var a=r.a,o=r.b,l=r.c,u=r.d;if((Math.abs(o)>1e-4||Math.abs(l)>1e-4)&&(Math.abs(a)>1e-4||Math.abs(u)>1e-4))return}r=r?Ly.copyFrom(r):Ly.identity(),r.translate(-i.x,-i.y).scale(n.width/i.width,n.height/i.height).translate(n.x,n.y),this.transformAABB(r,e),e.ceil(t),this.transformAABB(r.invert(),e)}},s}(),Iw=function(){function s(e){this.renderer=e}return s.prototype.flush=function(){},s.prototype.destroy=function(){this.renderer=null},s.prototype.start=function(){},s.prototype.stop=function(){this.flush()},s.prototype.render=function(e){},s}(),eK=function(){function s(e){this.renderer=e,this.emptyRenderer=new Iw(e),this.currentRenderer=this.emptyRenderer}return s.prototype.setObjectRenderer=function(e){this.currentRenderer!==e&&(this.currentRenderer.stop(),this.currentRenderer=e,this.currentRenderer.start())},s.prototype.flush=function(){this.setObjectRenderer(this.emptyRenderer)},s.prototype.reset=function(){this.setObjectRenderer(this.emptyRenderer)},s.prototype.copyBoundTextures=function(e,t){for(var i=this.renderer.texture.boundTextures,n=t-1;n>=0;--n)e[n]=i[n]||null,e[n]&&(e[n]._batchLocation=n)},s.prototype.boundArray=function(e,t,i,n){for(var r=e.elements,a=e.ids,o=e.count,l=0,u=0;u=0&&h=Ga.WEBGL2&&(i=e.getContext("webgl2",t)),i)this.webGLVersion=2;else if(this.webGLVersion=1,i=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),!i)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=i,this.getExtensions(),this.gl},s.prototype.getExtensions=function(){var e=this.gl,t={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,t,{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,t,{colorBufferFloat:e.getExtension("EXT_color_buffer_float")})},s.prototype.handleContextLost=function(e){var t=this;e.preventDefault(),setTimeout(function(){t.gl.isContextLost()&&t.extensions.loseContext&&t.extensions.loseContext.restoreContext()},0)},s.prototype.handleContextRestored=function(){this.renderer.runners.contextChange.emit(this.gl)},s.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()},s.prototype.postrender=function(){this.renderer.renderingToScreen&&this.gl.flush()},s.prototype.validateContext=function(e){var t=e.getContextAttributes(),i="WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext;i&&(this.webGLVersion=2),t&&!t.stencil&&console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");var n=i||!!e.getExtension("OES_element_index_uint");this.supports.uint32Indices=n,n||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")},s}(),iK=function(){function s(e){this.framebuffer=e,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=Ut.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}return s}(),sK=new ve,nK=function(){function s(e){this.renderer=e,this.managedFramebuffers=[],this.unknownFramebuffer=new QI(10,10),this.msaaSamples=null}return s.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 ve,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){var t=this.renderer.context.extensions.drawBuffers,i=this.renderer.context.extensions.depthTexture;de.PREFER_ENV===Ga.WEBGL_LEGACY&&(t=null,i=null),t?e.drawBuffers=function(n){return t.drawBuffersWEBGL(n)}:(this.hasMRT=!1,e.drawBuffers=function(){}),i||(this.writeDepthTexture=!1)}else this.msaaSamples=e.getInternalformatParameter(e.RENDERBUFFER,e.RGBA8,e.SAMPLES)},s.prototype.bind=function(e,t,i){i===void 0&&(i=0);var n=this.gl;if(e){var r=e.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(e);this.current!==e&&(this.current=e,n.bindFramebuffer(n.FRAMEBUFFER,r.framebuffer)),r.mipLevel!==i&&(e.dirtyId++,e.dirtyFormat++,r.mipLevel=i),r.dirtyId!==e.dirtyId&&(r.dirtyId=e.dirtyId,r.dirtyFormat!==e.dirtyFormat?(r.dirtyFormat=e.dirtyFormat,r.dirtySize=e.dirtySize,this.updateFramebuffer(e,i)):r.dirtySize!==e.dirtySize&&(r.dirtySize=e.dirtySize,this.resizeFramebuffer(e)));for(var a=0;a>i,u=t.height>>i,c=l/t.width;this.setViewport(t.x*c,t.y*c,l,u)}else{var l=e.width>>i,u=e.height>>i;this.setViewport(0,0,l,u)}}else this.current&&(this.current=null,n.bindFramebuffer(n.FRAMEBUFFER,null)),t?this.setViewport(t.x,t.y,t.width,t.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)},s.prototype.setViewport=function(e,t,i,n){var r=this.viewport;e=Math.round(e),t=Math.round(t),i=Math.round(i),n=Math.round(n),(r.width!==i||r.height!==n||r.x!==e||r.y!==t)&&(r.x=e,r.y=t,r.width=i,r.height=n,this.gl.viewport(e,t,i,n))},Object.defineProperty(s.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}),s.prototype.clear=function(e,t,i,n,r){r===void 0&&(r=bm.COLOR|bm.DEPTH);var a=this.gl;a.clearColor(e,t,i,n),a.clear(r)},s.prototype.initFramebuffer=function(e){var t=this.gl,i=new iK(t.createFramebuffer());return i.multisample=this.detectSamples(e.multisample),e.glFramebuffers[this.CONTEXT_UID]=i,this.managedFramebuffers.push(e),e.disposeRunner.add(this),i},s.prototype.resizeFramebuffer=function(e){var t=this.gl,i=e.glFramebuffers[this.CONTEXT_UID];i.msaaBuffer&&(t.bindRenderbuffer(t.RENDERBUFFER,i.msaaBuffer),t.renderbufferStorageMultisample(t.RENDERBUFFER,i.multisample,t.RGBA8,e.width,e.height)),i.stencil&&(t.bindRenderbuffer(t.RENDERBUFFER,i.stencil),i.msaaBuffer?t.renderbufferStorageMultisample(t.RENDERBUFFER,i.multisample,t.DEPTH24_STENCIL8,e.width,e.height):t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,e.width,e.height));var n=e.colorTextures,r=n.length;t.drawBuffers||(r=Math.min(r,1));for(var a=0;a1&&this.canMultisampleFramebuffer(e)?(n.msaaBuffer=n.msaaBuffer||i.createRenderbuffer(),i.bindRenderbuffer(i.RENDERBUFFER,n.msaaBuffer),i.renderbufferStorageMultisample(i.RENDERBUFFER,n.multisample,i.RGBA8,e.width,e.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.RENDERBUFFER,n.msaaBuffer)):n.msaaBuffer&&(i.deleteRenderbuffer(n.msaaBuffer),n.msaaBuffer=null,n.blitFramebuffer&&(n.blitFramebuffer.dispose(),n.blitFramebuffer=null));for(var o=[],l=0;l1&&i.drawBuffers(o),e.depthTexture){var h=this.writeDepthTexture;if(h){var f=e.depthTexture;this.renderer.texture.bind(f,0),i.framebufferTexture2D(i.FRAMEBUFFER,i.DEPTH_ATTACHMENT,i.TEXTURE_2D,f._glTextures[this.CONTEXT_UID].texture,t)}}(e.stencil||e.depth)&&!(e.depthTexture&&this.writeDepthTexture)?(n.stencil=n.stencil||i.createRenderbuffer(),i.bindRenderbuffer(i.RENDERBUFFER,n.stencil),n.msaaBuffer?i.renderbufferStorageMultisample(i.RENDERBUFFER,n.multisample,i.DEPTH24_STENCIL8,e.width,e.height):i.renderbufferStorage(i.RENDERBUFFER,i.DEPTH_STENCIL,e.width,e.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.DEPTH_STENCIL_ATTACHMENT,i.RENDERBUFFER,n.stencil)):n.stencil&&(i.deleteRenderbuffer(n.stencil),n.stencil=null)},s.prototype.canMultisampleFramebuffer=function(e){return this.renderer.context.webGLVersion!==1&&e.colorTextures.length<=1&&!e.depthTexture},s.prototype.detectSamples=function(e){var t=this.msaaSamples,i=Ut.NONE;if(e<=1||t===null)return i;for(var n=0;n=0&&this.managedFramebuffers.splice(r,1),e.disposeRunner.remove(this),t||(n.deleteFramebuffer(i.framebuffer),i.msaaBuffer&&n.deleteRenderbuffer(i.msaaBuffer),i.stencil&&n.deleteRenderbuffer(i.stencil)),i.blitFramebuffer&&i.blitFramebuffer.dispose()}},s.prototype.disposeAll=function(e){var t=this.managedFramebuffers;this.managedFramebuffers=[];for(var i=0;i=Ga.WEBGL2&&(e=s.getContext("webgl2",{})),e||(e=s.getContext("webgl",{})||s.getContext("experimental-webgl",{}),e?e.getExtension("WEBGL_draw_buffers"):e=null),Mf=e}return Mf}var ip;function uK(){if(!ip){ip=sn.MEDIUM;var s=lK();if(s&&s.getShaderPrecisionFormat){var e=s.getShaderPrecisionFormat(s.FRAGMENT_SHADER,s.HIGH_FLOAT);ip=e.precision?sn.HIGH:sn.MEDIUM}}return ip}function PN(s,e,t){if(s.substring(0,9)!=="precision"){var i=e;return e===sn.HIGH&&t!==sn.HIGH&&(i=sn.MEDIUM),"precision "+i+` float; `+s}else if(t!==sn.HIGH&&s.substring(0,15)==="precision highp")return s.replace("precision highp","precision mediump");return s}var hK={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 DU(s){return hK[s]}var sp=null,kN={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 LU(s,e){if(!sp){var t=Object.keys(kN);sp={};for(var i=0;i0&&(e+=` else `),t"u"?.5:t,this.isSimple=!1}return Object.defineProperty(s.prototype,"texture",{get:function(){return this._texture},set:function(e){this._texture=e,this._textureID=-1},enumerable:!1,configurable:!0}),s.prototype.multiplyUvs=function(e,t){t===void 0&&(t=e);for(var i=this.mapCoord,n=0;n0?this.maskStack[this.maskStack.length-1]._colorMask:15;i!==t&&this.renderer.gl.colorMask((i&1)!==0,(i&2)!==0,(i&4)!==0,(i&8)!==0)},s.prototype.destroy=function(){this.renderer=null},s}(),FU=function(){function s(e){this.renderer=e,this.maskStack=[],this.glConst=0}return s.prototype.getStackLength=function(){return this.maskStack.length},s.prototype.setMaskStack=function(e){var t=this.renderer.gl,i=this.getStackLength();this.maskStack=e;var n=this.getStackLength();n!==i&&(n===0?t.disable(this.glConst):(t.enable(this.glConst),this._useCurrent()))},s.prototype._useCurrent=function(){},s.prototype.destroy=function(){this.renderer=null,this.maskStack=null},s}(),DN=new dt,LN=[],OK=function(s){Ct(e,s);function e(t){var i=s.call(this,t)||this;return i.glConst=de.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST,i}return e.prototype.getStackLength=function(){var t=this.maskStack[this.maskStack.length-1];return t?t._scissorCounter:0},e.prototype.calcScissorRect=function(t){var i;if(!t._scissorRectLocal){var n=t._scissorRect,r=t.maskObject,a=this.renderer,o=a.renderTexture,l=r.getBounds(!0,(i=LN.pop())!==null&&i!==void 0?i:new ve);this.roundFrameToPixels(l,o.current?o.current.resolution:a.resolution,o.sourceFrame,o.destinationFrame,a.projection.transform),n&&l.fit(n),t._scissorRectLocal=l}},e.isMatrixRotated=function(t){if(!t)return!1;var i=t.a,n=t.b,r=t.c,a=t.d;return(Math.abs(n)>1e-4||Math.abs(r)>1e-4)&&(Math.abs(i)>1e-4||Math.abs(a)>1e-4)},e.prototype.testScissor=function(t){var i=t.maskObject;if(!i.isFastRect||!i.isFastRect()||e.isMatrixRotated(i.worldTransform)||e.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(t);var n=t._scissorRectLocal;return n.width>0&&n.height>0},e.prototype.roundFrameToPixels=function(t,i,n,r,a){e.isMatrixRotated(a)||(a=a?DN.copyFrom(a):DN.identity(),a.translate(-n.x,-n.y).scale(r.width/n.width,r.height/n.height).translate(r.x,r.y),this.renderer.filter.transformAABB(a,t),t.fit(r),t.x=Math.round(t.x*i),t.y=Math.round(t.y*i),t.width=Math.round(t.width*i),t.height=Math.round(t.height*i))},e.prototype.push=function(t){t._scissorRectLocal||this.calcScissorRect(t);var i=this.renderer.gl;t._scissorRect||i.enable(i.SCISSOR_TEST),t._scissorCounter++,t._scissorRect=t._scissorRectLocal,this._useCurrent()},e.prototype.pop=function(t){var i=this.renderer.gl;t&&LN.push(t._scissorRectLocal),this.getStackLength()>0?this._useCurrent():i.disable(i.SCISSOR_TEST)},e.prototype._useCurrent=function(){var t=this.maskStack[this.maskStack.length-1]._scissorRect,i;this.renderer.renderTexture.current?i=t.y:i=this.renderer.height-t.height-t.y,this.renderer.gl.scissor(t.x,i,t.width,t.height)},e}(FU),wK=function(s){Ct(e,s);function e(t){var i=s.call(this,t)||this;return i.glConst=de.ADAPTER.getWebGLRenderingContext().STENCIL_TEST,i}return e.prototype.getStackLength=function(){var t=this.maskStack[this.maskStack.length-1];return t?t._stencilCounter:0},e.prototype.push=function(t){var i=t.maskObject,n=this.renderer.gl,r=t._stencilCounter;r===0&&(this.renderer.framebuffer.forceStencil(),n.clearStencil(0),n.clear(n.STENCIL_BUFFER_BIT),n.enable(n.STENCIL_TEST)),t._stencilCounter++;var a=t._colorMask;a!==0&&(t._colorMask=0,n.colorMask(!1,!1,!1,!1)),n.stencilFunc(n.EQUAL,r,4294967295),n.stencilOp(n.KEEP,n.KEEP,n.INCR),i.renderable=!0,i.render(this.renderer),this.renderer.batch.flush(),i.renderable=!1,a!==0&&(t._colorMask=a,n.colorMask((a&1)!==0,(a&2)!==0,(a&4)!==0,(a&8)!==0)),this._useCurrent()},e.prototype.pop=function(t){var i=this.renderer.gl;if(this.getStackLength()===0)i.disable(i.STENCIL_TEST);else{var n=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null,r=n?n._colorMask:15;r!==0&&(n._colorMask=0,i.colorMask(!1,!1,!1,!1)),i.stencilOp(i.KEEP,i.KEEP,i.DECR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,r!==0&&(n._colorMask=r,i.colorMask((r&1)!==0,(r&2)!==0,(r&4)!==0,(r&8)!==0)),this._useCurrent()}},e.prototype._useCurrent=function(){var t=this.renderer.gl;t.stencilFunc(t.EQUAL,this.getStackLength(),4294967295),t.stencilOp(t.KEEP,t.KEEP,t.KEEP)},e}(FU),CK=function(){function s(e){this.renderer=e,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new dt,this.transform=null}return s.prototype.update=function(e,t,i,n){this.destinationFrame=e||this.destinationFrame||this.defaultFrame,this.sourceFrame=t||this.sourceFrame||e,this.calculateProjection(this.destinationFrame,this.sourceFrame,i,n),this.transform&&this.projectionMatrix.append(this.transform);var r=this.renderer;r.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,r.globalUniforms.update(),r.shader.shader&&r.shader.syncUniformGroup(r.shader.shader.uniforms.globals)},s.prototype.calculateProjection=function(e,t,i,n){var r=this.projectionMatrix,a=n?-1:1;r.identity(),r.a=1/t.width*2,r.d=a*(1/t.height*2),r.tx=-1-t.x*r.a,r.ty=-a-t.y*r.d},s.prototype.setTransform=function(e){},s.prototype.destroy=function(){this.renderer=null},s}(),ml=new ve,Pf=new ve,MK=function(){function s(e){this.renderer=e,this.clearColor=e._backgroundColorRgba,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new ve,this.destinationFrame=new ve,this.viewportFrame=new ve}return s.prototype.bind=function(e,t,i){e===void 0&&(e=null);var n=this.renderer;this.current=e;var r,a,o;e?(r=e.baseTexture,o=r.resolution,t||(ml.width=e.frame.width,ml.height=e.frame.height,t=ml),i||(Pf.x=e.frame.x,Pf.y=e.frame.y,Pf.width=t.width,Pf.height=t.height,i=Pf),a=r.framebuffer):(o=n.resolution,t||(ml.width=n.screen.width,ml.height=n.screen.height,t=ml),i||(i=ml,i.width=t.width,i.height=t.height));var l=this.viewportFrame;l.x=i.x*o,l.y=i.y*o,l.width=i.width*o,l.height=i.height*o,e||(l.y=n.view.height-(l.y+l.height)),l.ceil(),this.renderer.framebuffer.bind(a,l),this.renderer.projection.update(i,t,o,!a),e?this.renderer.mask.setMaskStack(r.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(t),this.destinationFrame.copyFrom(i)},s.prototype.clear=function(e,t){this.current?e=e||this.current.baseTexture.clearColor:e=e||this.clearColor;var i=this.destinationFrame,n=this.current?this.current.baseTexture:this.renderer.screen,r=i.width!==n.width||i.height!==n.height;if(r){var a=this.viewportFrame,o=a.x,l=a.y,u=a.width,c=a.height;o=Math.round(o),l=Math.round(l),u=Math.round(u),c=Math.round(c),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(o,l,u,c)}this.renderer.framebuffer.clear(e[0],e[1],e[2],e[3],t),r&&this.renderer.scissor.pop()},s.prototype.resize=function(){this.bind(null)},s.prototype.reset=function(){this.bind(null)},s.prototype.destroy=function(){this.renderer=null},s}();function NK(s,e,t,i,n){t.buffer.update(n)}var PK={float:` data[offset] = v; `,vec2:` data[offset] = v[0]; data[offset+1] = v[1]; `,vec3:` data[offset] = v[0]; data[offset+1] = v[1]; data[offset+2] = v[2]; `,vec4:` data[offset] = v[0]; data[offset+1] = v[1]; data[offset+2] = v[2]; data[offset+3] = v[3]; `,mat2:` data[offset] = v[0]; data[offset+1] = v[1]; data[offset+4] = v[2]; data[offset+5] = v[3]; `,mat3:` data[offset] = v[0]; data[offset+1] = v[1]; data[offset+2] = v[2]; data[offset + 4] = v[3]; data[offset + 5] = v[4]; data[offset + 6] = v[5]; data[offset + 8] = v[6]; data[offset + 9] = v[7]; data[offset + 10] = v[8]; `,mat4:` for(var i = 0; i < 16; i++) { data[offset + i] = v[i]; } `},BU={float:4,vec2:8,vec3:12,vec4:16,int:4,ivec2:8,ivec3:12,ivec4:16,uint:4,uvec2:8,uvec3:12,uvec4:16,bool:4,bvec2:8,bvec3:12,bvec4:16,mat2:16*2,mat3:16*3,mat4:16*4};function kK(s){for(var e=s.map(function(l){return{data:l,offset:0,dataLen:0,dirty:0}}),t=0,i=0,n=0,r=0;r1&&(t=Math.max(t,16)*a.data.size),a.dataLen=t,i%t!==0&&i<16){var o=i%t%16;i+=o,n+=o}i+t>16?(n=Math.ceil(n/16)*16,a.offset=n,n+=t,i=t):(a.offset=n,i+=t,n+=t)}return n=Math.ceil(n/16)*16,{uboElements:e,size:n}}function xK(s,e){var t=[];for(var i in s)e[i]&&t.push(e[i]);return t.sort(function(n,r){return n.index-r.index}),t}function DK(s,e){if(!s.autoManage)return{size:0,syncFunc:NK};for(var t=xK(s.uniforms,e),i=kK(t),n=i.uboElements,r=i.size,a=[` var v = null; var v2 = null; var cv = null; var t = 0; var gl = renderer.gl var index = 0; var data = buffer.data; `],o=0;o1){var _=DU(l.data.type),g=Math.max(BU[l.data.type]/16,1),p=_/g,m=(4-p%4)%4;a.push(` cv = ud.`+c+`.value; v = uv.`+c+`; offset = `+l.offset/4+`; t = 0; for(var i=0; i < `+l.data.size*g+`; i++) { for(var j = 0; j < `+p+`; j++) { data[offset++] = v[t++]; } offset += `+m+`; } `)}else{var v=PK[l.data.type];a.push(` cv = ud.`+c+`.value; v = uv.`+c+`; offset = `+l.offset/4+`; `+v+`; `)}}return a.push(` renderer.buffer.update(buffer); `),{size:r,syncFunc:new Function("ud","uv","renderer","syncData","buffer",a.join(` `))}}var LK=function(){function s(e,t){this.program=e,this.uniformData=t,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}return s.prototype.destroy=function(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null},s}();function UK(s,e){for(var t={},i=e.getProgramParameter(s,e.ACTIVE_ATTRIBUTES),n=0;nh?1:-1});for(var a=0;a>1,i++;this.stateId=e.data}for(var i=0;ithis.checkCountMax&&(this.checkCount=0,this.run())))},s.prototype.run=function(){for(var e=this.renderer.texture,t=e.managedTextures,i=!1,n=0;nthis.maxIdle&&(e.destroyTexture(r,!0),t[n]=null,i=!0)}if(i){for(var a=0,n=0;n=0;n--)this.unload(e.children[n])},s.prototype.destroy=function(){this.renderer=null},s}();function QK(s){var e,t,i,n,r,a,o,l,u,c,h,f,d,_,g,p,m,v,E,y,T,w,C;return"WebGL2RenderingContext"in globalThis&&s instanceof globalThis.WebGL2RenderingContext?C=(e={},e[lt.UNSIGNED_BYTE]=(t={},t[ae.RGBA]=s.RGBA8,t[ae.RGB]=s.RGB8,t[ae.RG]=s.RG8,t[ae.RED]=s.R8,t[ae.RGBA_INTEGER]=s.RGBA8UI,t[ae.RGB_INTEGER]=s.RGB8UI,t[ae.RG_INTEGER]=s.RG8UI,t[ae.RED_INTEGER]=s.R8UI,t[ae.ALPHA]=s.ALPHA,t[ae.LUMINANCE]=s.LUMINANCE,t[ae.LUMINANCE_ALPHA]=s.LUMINANCE_ALPHA,t),e[lt.BYTE]=(i={},i[ae.RGBA]=s.RGBA8_SNORM,i[ae.RGB]=s.RGB8_SNORM,i[ae.RG]=s.RG8_SNORM,i[ae.RED]=s.R8_SNORM,i[ae.RGBA_INTEGER]=s.RGBA8I,i[ae.RGB_INTEGER]=s.RGB8I,i[ae.RG_INTEGER]=s.RG8I,i[ae.RED_INTEGER]=s.R8I,i),e[lt.UNSIGNED_SHORT]=(n={},n[ae.RGBA_INTEGER]=s.RGBA16UI,n[ae.RGB_INTEGER]=s.RGB16UI,n[ae.RG_INTEGER]=s.RG16UI,n[ae.RED_INTEGER]=s.R16UI,n[ae.DEPTH_COMPONENT]=s.DEPTH_COMPONENT16,n),e[lt.SHORT]=(r={},r[ae.RGBA_INTEGER]=s.RGBA16I,r[ae.RGB_INTEGER]=s.RGB16I,r[ae.RG_INTEGER]=s.RG16I,r[ae.RED_INTEGER]=s.R16I,r),e[lt.UNSIGNED_INT]=(a={},a[ae.RGBA_INTEGER]=s.RGBA32UI,a[ae.RGB_INTEGER]=s.RGB32UI,a[ae.RG_INTEGER]=s.RG32UI,a[ae.RED_INTEGER]=s.R32UI,a[ae.DEPTH_COMPONENT]=s.DEPTH_COMPONENT24,a),e[lt.INT]=(o={},o[ae.RGBA_INTEGER]=s.RGBA32I,o[ae.RGB_INTEGER]=s.RGB32I,o[ae.RG_INTEGER]=s.RG32I,o[ae.RED_INTEGER]=s.R32I,o),e[lt.FLOAT]=(l={},l[ae.RGBA]=s.RGBA32F,l[ae.RGB]=s.RGB32F,l[ae.RG]=s.RG32F,l[ae.RED]=s.R32F,l[ae.DEPTH_COMPONENT]=s.DEPTH_COMPONENT32F,l),e[lt.HALF_FLOAT]=(u={},u[ae.RGBA]=s.RGBA16F,u[ae.RGB]=s.RGB16F,u[ae.RG]=s.RG16F,u[ae.RED]=s.R16F,u),e[lt.UNSIGNED_SHORT_5_6_5]=(c={},c[ae.RGB]=s.RGB565,c),e[lt.UNSIGNED_SHORT_4_4_4_4]=(h={},h[ae.RGBA]=s.RGBA4,h),e[lt.UNSIGNED_SHORT_5_5_5_1]=(f={},f[ae.RGBA]=s.RGB5_A1,f),e[lt.UNSIGNED_INT_2_10_10_10_REV]=(d={},d[ae.RGBA]=s.RGB10_A2,d[ae.RGBA_INTEGER]=s.RGB10_A2UI,d),e[lt.UNSIGNED_INT_10F_11F_11F_REV]=(_={},_[ae.RGB]=s.R11F_G11F_B10F,_),e[lt.UNSIGNED_INT_5_9_9_9_REV]=(g={},g[ae.RGB]=s.RGB9_E5,g),e[lt.UNSIGNED_INT_24_8]=(p={},p[ae.DEPTH_STENCIL]=s.DEPTH24_STENCIL8,p),e[lt.FLOAT_32_UNSIGNED_INT_24_8_REV]=(m={},m[ae.DEPTH_STENCIL]=s.DEPTH32F_STENCIL8,m),e):C=(v={},v[lt.UNSIGNED_BYTE]=(E={},E[ae.RGBA]=s.RGBA,E[ae.RGB]=s.RGB,E[ae.ALPHA]=s.ALPHA,E[ae.LUMINANCE]=s.LUMINANCE,E[ae.LUMINANCE_ALPHA]=s.LUMINANCE_ALPHA,E),v[lt.UNSIGNED_SHORT_5_6_5]=(y={},y[ae.RGB]=s.RGB,y),v[lt.UNSIGNED_SHORT_4_4_4_4]=(T={},T[ae.RGBA]=s.RGBA,T),v[lt.UNSIGNED_SHORT_5_5_5_1]=(w={},w[ae.RGBA]=s.RGBA,w),v),C}var Wy=function(){function s(e){this.texture=e,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=lt.UNSIGNED_BYTE,this.internalFormat=ae.RGBA,this.samplerType=0}return s}(),ZK=function(){function s(e){this.renderer=e,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new pt,this.hasIntegerTextures=!1}return s.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=QK(e);var t=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=t;for(var i=0;i=0;--a){var o=i[a];if(o){var l=o._glTextures[r];l.samplerType!==Am.FLOAT&&this.renderer.texture.unbind(o)}}},s.prototype.initTexture=function(e){var t=new Wy(this.gl.createTexture());return t.dirtyId=-1,e._glTextures[this.CONTEXT_UID]=t,this.managedTextures.push(e),e.on("dispose",this.destroyTexture,this),t},s.prototype.initTextureType=function(e,t){var i,n;t.internalFormat=(n=(i=this.internalFormats[e.type])===null||i===void 0?void 0:i[e.format])!==null&&n!==void 0?n:e.format,this.webGLVersion===2&&e.type===lt.HALF_FLOAT?t.type=this.gl.HALF_FLOAT:t.type=e.type},s.prototype.updateTexture=function(e){var t=e._glTextures[this.CONTEXT_UID];if(t){var i=this.renderer;if(this.initTextureType(e,t),e.resource&&e.resource.upload(i,e,t))t.samplerType!==Am.FLOAT&&(this.hasIntegerTextures=!0);else{var n=e.realWidth,r=e.realHeight,a=i.gl;(t.width!==n||t.height!==r||t.dirtyId<0)&&(t.width=n,t.height=r,a.texImage2D(e.target,0,t.internalFormat,n,r,0,e.format,t.type,null))}e.dirtyStyleId!==t.dirtyStyleId&&this.updateTextureStyle(e),t.dirtyId=e.dirtyId}},s.prototype.destroyTexture=function(e,t){var i=this.gl;if(e=e.castToBaseTexture(),e._glTextures[this.CONTEXT_UID]&&(this.unbind(e),i.deleteTexture(e._glTextures[this.CONTEXT_UID].texture),e.off("dispose",this.destroyTexture,this),delete e._glTextures[this.CONTEXT_UID],!t)){var n=this.managedTextures.indexOf(e);n!==-1&&jp(this.managedTextures,n,1)}},s.prototype.updateTextureStyle=function(e){var t=e._glTextures[this.CONTEXT_UID];t&&((e.mipmap===Jo.POW2||this.webGLVersion!==2)&&!e.isPowerOfTwo?t.mipmap=!1:t.mipmap=e.mipmap>=1,this.webGLVersion!==2&&!e.isPowerOfTwo?t.wrapMode=Pa.CLAMP:t.wrapMode=e.wrapMode,e.resource&&e.resource.style(this.renderer,e,t)||this.setStyle(e,t),t.dirtyStyleId=e.dirtyStyleId)},s.prototype.setStyle=function(e,t){var i=this.gl;if(t.mipmap&&e.mipmap!==Jo.ON_MANUAL&&i.generateMipmap(e.target),i.texParameteri(e.target,i.TEXTURE_WRAP_S,t.wrapMode),i.texParameteri(e.target,i.TEXTURE_WRAP_T,t.wrapMode),t.mipmap){i.texParameteri(e.target,i.TEXTURE_MIN_FILTER,e.scaleMode===tn.LINEAR?i.LINEAR_MIPMAP_LINEAR:i.NEAREST_MIPMAP_NEAREST);var n=this.renderer.context.extensions.anisotropicFiltering;if(n&&e.anisotropicLevel>0&&e.scaleMode===tn.LINEAR){var r=Math.min(e.anisotropicLevel,i.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT));i.texParameterf(e.target,n.TEXTURE_MAX_ANISOTROPY_EXT,r)}}else i.texParameteri(e.target,i.TEXTURE_MIN_FILTER,e.scaleMode===tn.LINEAR?i.LINEAR:i.NEAREST);i.texParameteri(e.target,i.TEXTURE_MAG_FILTER,e.scaleMode===tn.LINEAR?i.LINEAR:i.NEAREST)},s.prototype.destroy=function(){this.renderer=null},s}(),Yy=new dt,JK=function(s){Ct(e,s);function e(t,i){t===void 0&&(t=O_.UNKNOWN);var n=s.call(this)||this;return i=Object.assign({},de.RENDER_OPTIONS,i),n.options=i,n.type=t,n.screen=new ve(0,0,i.width,i.height),n.view=i.view||de.ADAPTER.createCanvas(),n.resolution=i.resolution||de.RESOLUTION,n.useContextAlpha=i.useContextAlpha,n.autoDensity=!!i.autoDensity,n.preserveDrawingBuffer=i.preserveDrawingBuffer,n.clearBeforeRender=i.clearBeforeRender,n._backgroundColor=0,n._backgroundColorRgba=[0,0,0,1],n._backgroundColorString="#000000",n.backgroundColor=i.backgroundColor||n._backgroundColor,n.backgroundAlpha=i.backgroundAlpha,i.transparent!==void 0&&(Ur("6.0.0","Option transparent is deprecated, please use backgroundAlpha instead."),n.useContextAlpha=i.transparent,n.backgroundAlpha=i.transparent?0:1),n._lastObjectRendered=null,n.plugins={},n}return e.prototype.initPlugins=function(t){for(var i in t)this.plugins[i]=new t[i](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(t,i){this.view.width=Math.round(t*this.resolution),this.view.height=Math.round(i*this.resolution);var n=this.view.width/this.resolution,r=this.view.height/this.resolution;this.screen.width=n,this.screen.height=r,this.autoDensity&&(this.view.style.width=n+"px",this.view.style.height=r+"px"),this.emit("resize",n,r)},e.prototype.generateTexture=function(t,i,n,r){i===void 0&&(i={}),typeof i=="number"&&(Ur("6.1.0","generateTexture options (scaleMode, resolution, region) are now object options."),i={scaleMode:i,resolution:n,region:r});var a=i.region,o=DX(i,["region"]);r=a||t.getLocalBounds(null,!0),r.width===0&&(r.width=1),r.height===0&&(r.height=1);var l=Pi.create($I({width:r.width,height:r.height},o));return Yy.tx=-r.x,Yy.ty=-r.y,this.render(t,{renderTexture:l,clear:!1,transform:Yy,skipUpdateTransform:!!t.parent}),l},e.prototype.destroy=function(t){for(var i in this.plugins)this.plugins[i].destroy(),this.plugins[i]=null;t&&this.view.parentNode&&this.view.parentNode.removeChild(this.view);var n=this;n.plugins=null,n.type=O_.UNKNOWN,n.view=null,n.screen=null,n._tempDisplayObjectParent=null,n.options=null,this._backgroundColorRgba=null,this._backgroundColorString=null,this._lastObjectRendered=null},Object.defineProperty(e.prototype,"backgroundColor",{get:function(){return this._backgroundColor},set:function(t){this._backgroundColor=t,this._backgroundColorString=TU(t),km(t,this._backgroundColorRgba)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backgroundAlpha",{get:function(){return this._backgroundColorRgba[3]},set:function(t){this._backgroundColorRgba[3]=t},enumerable:!1,configurable:!0}),e}(c0),eq=function(){function s(e){this.buffer=e||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}return s}(),tq=function(){function s(e){this.renderer=e,this.managedBuffers={},this.boundBufferBases={}}return s.prototype.destroy=function(){this.renderer=null},s.prototype.contextChange=function(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID},s.prototype.bind=function(e){var t=this,i=t.gl,n=t.CONTEXT_UID,r=e._glBuffers[n]||this.createGLBuffer(e);i.bindBuffer(e.type,r.buffer)},s.prototype.bindBufferBase=function(e,t){var i=this,n=i.gl,r=i.CONTEXT_UID;if(this.boundBufferBases[t]!==e){var a=e._glBuffers[r]||this.createGLBuffer(e);this.boundBufferBases[t]=e,n.bindBufferBase(n.UNIFORM_BUFFER,t,a.buffer)}},s.prototype.bindBufferRange=function(e,t,i){var n=this,r=n.gl,a=n.CONTEXT_UID;i=i||0;var o=e._glBuffers[a]||this.createGLBuffer(e);r.bindBufferRange(r.UNIFORM_BUFFER,t||0,o.buffer,i*256,256)},s.prototype.update=function(e){var t=this,i=t.gl,n=t.CONTEXT_UID,r=e._glBuffers[n];if(e._updateID!==r.updateID)if(r.updateID=e._updateID,i.bindBuffer(e.type,r.buffer),r.byteLength>=e.data.byteLength)i.bufferSubData(e.type,0,e.data);else{var a=e.static?i.STATIC_DRAW:i.DYNAMIC_DRAW;r.byteLength=e.data.byteLength,i.bufferData(e.type,e.data,a)}},s.prototype.dispose=function(e,t){if(this.managedBuffers[e.id]){delete this.managedBuffers[e.id];var i=e._glBuffers[this.CONTEXT_UID],n=this.gl;e.disposeRunner.remove(this),i&&(t||n.deleteBuffer(i.buffer),delete e._glBuffers[this.CONTEXT_UID])}},s.prototype.disposeAll=function(e){for(var t=Object.keys(this.managedBuffers),i=0;i=Ut.HIGH?this.multisample=Ut.HIGH:i>=Ut.MEDIUM?this.multisample=Ut.MEDIUM:i>=Ut.LOW?this.multisample=Ut.LOW:this.multisample=Ut.NONE},e.prototype.addSystem=function(t,i){var n=new t(this);if(this[i])throw new Error('Whoops! The name "'+i+'" is already in use');this[i]=n;for(var r in this.runners)this.runners[r].add(n);return this},e.prototype.render=function(t,i){var n,r,a,o;if(i&&(i instanceof Pi?(Ur("6.0.0","Renderer#render arguments changed, use options instead."),n=i,r=arguments[2],a=arguments[3],o=arguments[4]):(n=i.renderTexture,r=i.clear,a=i.transform,o=i.skipUpdateTransform)),this.renderingToScreen=!n,this.runners.prerender.emit(),this.emit("prerender"),this.projection.transform=a,!this.context.isLost){if(n||(this._lastObjectRendered=t),!o){var l=t.enableTempParent();t.updateTransform(),t.disableTempParent(l)}this.renderTexture.bind(n),this.batch.currentRenderer.start(),(r!==void 0?r:this.clearBeforeRender)&&this.renderTexture.clear(),t.render(this),this.batch.currentRenderer.flush(),n&&n.baseTexture.update(),this.runners.postrender.emit(),this.projection.transform=null,this.emit("postrender")}},e.prototype.generateTexture=function(t,i,n,r){i===void 0&&(i={});var a=s.prototype.generateTexture.call(this,t,i,n,r);return this.framebuffer.blit(),a},e.prototype.resize=function(t,i){s.prototype.resize.call(this,t,i),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(t){this.runners.destroy.emit();for(var i in this.runners)this.runners[i].destroy();s.prototype.destroy.call(this,t),this.gl=null},Object.defineProperty(e.prototype,"extract",{get:function(){return Ur("6.0.0","Renderer#extract has been deprecated, please use Renderer#plugins.extract instead."),this.plugins.extract},enumerable:!1,configurable:!0}),e.registerPlugin=function(t,i){Ur("6.5.0","Renderer.registerPlugin() has been deprecated, please use extensions.add() instead."),Xa.add({name:t,type:Ni.RendererPlugin,ref:i})},e.__plugins={},e}(JK);Xa.handleByMap(Ni.RendererPlugin,GU.__plugins);function iq(s){return GU.create(s)}var sq=`attribute vec2 aVertexPosition; attribute vec2 aTextureCoord; uniform mat3 projectionMatrix; varying vec2 vTextureCoord; void main(void) { gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); vTextureCoord = aTextureCoord; }`,nq=`attribute vec2 aVertexPosition; uniform mat3 projectionMatrix; varying vec2 vTextureCoord; uniform vec4 inputSize; uniform vec4 outputFrame; vec4 filterVertexPosition( void ) { vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy; return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0); } vec2 filterTextureCoord( void ) { return aVertexPosition * (outputFrame.zw * inputSize.zw); } void main(void) { gl_Position = filterVertexPosition(); vTextureCoord = filterTextureCoord(); } `,rq=sq,aq=nq,ZI=function(){function s(){this.texArray=null,this.blend=0,this.type=Ia.TRIANGLES,this.start=0,this.size=0,this.data=null}return s}(),JI=function(){function s(){this.elements=[],this.ids=[],this.count=0}return s.prototype.clear=function(){for(var e=0;ethis.size&&this.flush(),this._vertexCount+=t.vertexData.length/2,this._indexCount+=t.indices.length,this._bufferedTextures[this._bufferSize]=t._texture.baseTexture,this._bufferedElements[this._bufferSize++]=t)},e.prototype.buildTexturesAndDrawCalls=function(){var t=this,i=t._bufferedTextures,n=t.MAX_TEXTURES,r=e._textureArrayPool,a=this.renderer.batch,o=this._tempBoundTextures,l=this.renderer.textureGC.count,u=++pt._globalBatch,c=0,h=r[0],f=0;a.copyBoundTextures(o,n);for(var d=0;d=n&&(a.boundArray(h,o,u,n),this.buildDrawCalls(h,f,d),f=d,h=r[++c],++u),_._batchEnabled=u,_.touched=l,h.elements[h.count++]=_)}h.count>0&&(a.boundArray(h,o,u,n),this.buildDrawCalls(h,f,this._bufferSize),++c,++u);for(var d=0;d0&&(t+=` else `),i"u"&&(Xy=!!(globalThis.XDomainRequest&&!("withCredentials"in new XMLHttpRequest))),Xy&&this.crossOrigin?this._loadXdr():this._loadXhr();break}}},s.prototype._hasFlag=function(e){return(this._flags&e)!==0},s.prototype._setFlag=function(e,t){this._flags=t?this._flags|e:this._flags&~e},s.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))},s.prototype._finish=function(){if(this.isComplete)throw new Error("Complete called again for an already completed resource.");this._setFlag(s.STATUS_FLAGS.COMPLETE,!0),this._setFlag(s.STATUS_FLAGS.LOADING,!1),this.onComplete.dispatch(this)},s.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))},s.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 t=this.metadata.mimeType,i=0;i"u"?GN:e.status;(e.responseType===""||e.responseType==="text"||typeof e.responseType>"u")&&(t=e.responseText),i===cq&&(t.length>0||e.responseType===s.XHR_RESPONSE_TYPE.BUFFER)?i=GN:i===dq&&(i=fq);var n=i/100|0;if(n===_q)if(this.xhrType===s.XHR_RESPONSE_TYPE.TEXT)this.data=t,this.type=s.TYPE.TEXT;else if(this.xhrType===s.XHR_RESPONSE_TYPE.JSON)try{this.data=JSON.parse(t),this.type=s.TYPE.JSON}catch(o){this.abort("Error trying to parse loaded json: "+o);return}else if(this.xhrType===s.XHR_RESPONSE_TYPE.DOCUMENT)try{if(globalThis.DOMParser){var r=new DOMParser;this.data=r.parseFromString(t,"text/xml")}else{var a=document.createElement("div");a.innerHTML=t,this.data=a}this.type=s.TYPE.XML}catch(o){this.abort("Error trying to parse loaded xml: "+o);return}else this.data=e.response||t;else{this.abort("["+e.status+"] "+e.statusText+": "+e.responseURL);return}this.complete()},s.prototype._determineCrossOrigin=function(e,t){if(e.indexOf("data:")===0)return"";if(globalThis.origin!==globalThis.location.origin)return"anonymous";t=t||globalThis.location,op||(op=document.createElement("a")),op.href=e;var i=zU(op.href,{strictMode:!0}),n=!i.port&&t.port===""||i.port===t.port,r=i.protocol?i.protocol+":":"";return i.host!==t.hostname||!n||r!==t.protocol?"anonymous":""},s.prototype._determineXhrType=function(){return s._xhrTypeMap[this.extension]||s.XHR_RESPONSE_TYPE.TEXT},s.prototype._determineLoadType=function(){return s._loadTypeMap[this.extension]||s.LOAD_TYPE.XHR},s.prototype._getExtension=function(e){e===void 0&&(e=this.url);var t="";if(this.isDataUrl){var i=e.indexOf("/");t=e.substring(i+1,e.indexOf(";",i))}else{var n=e.indexOf("?"),r=e.indexOf("#"),a=Math.min(n>-1?n:e.length,r>-1?r:e.length);e=e.substring(0,a),t=e.substring(e.lastIndexOf(".")+1)}return t.toLowerCase()},s.prototype._getMimeFromXhrType=function(e){switch(e){case s.XHR_RESPONSE_TYPE.BUFFER:return"application/octet-binary";case s.XHR_RESPONSE_TYPE.BLOB:return"application/blob";case s.XHR_RESPONSE_TYPE.DOCUMENT:return"application/xml";case s.XHR_RESPONSE_TYPE.JSON:return"application/json";case s.XHR_RESPONSE_TYPE.DEFAULT:case s.XHR_RESPONSE_TYPE.TEXT:default:return"text/plain"}},s}();(function(s){(function(e){e[e.NONE=0]="NONE",e[e.DATA_URL=1]="DATA_URL",e[e.COMPLETE=2]="COMPLETE",e[e.LOADING=4]="LOADING"})(s.STATUS_FLAGS||(s.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"}(s.TYPE||(s.TYPE={})),function(e){e[e.XHR=1]="XHR",e[e.IMAGE=2]="IMAGE",e[e.AUDIO=3]="AUDIO",e[e.VIDEO=4]="VIDEO"}(s.LOAD_TYPE||(s.LOAD_TYPE={})),function(e){e.DEFAULT="text",e.BUFFER="arraybuffer",e.BLOB="blob",e.DOCUMENT="document",e.JSON="json",e.TEXT="text"}(s.XHR_RESPONSE_TYPE||(s.XHR_RESPONSE_TYPE={})),s._loadTypeMap={gif:s.LOAD_TYPE.IMAGE,png:s.LOAD_TYPE.IMAGE,bmp:s.LOAD_TYPE.IMAGE,jpg:s.LOAD_TYPE.IMAGE,jpeg:s.LOAD_TYPE.IMAGE,tif:s.LOAD_TYPE.IMAGE,tiff:s.LOAD_TYPE.IMAGE,webp:s.LOAD_TYPE.IMAGE,tga:s.LOAD_TYPE.IMAGE,avif:s.LOAD_TYPE.IMAGE,svg:s.LOAD_TYPE.IMAGE,"svg+xml":s.LOAD_TYPE.IMAGE,mp3:s.LOAD_TYPE.AUDIO,ogg:s.LOAD_TYPE.AUDIO,wav:s.LOAD_TYPE.AUDIO,mp4:s.LOAD_TYPE.VIDEO,webm:s.LOAD_TYPE.VIDEO},s._xhrTypeMap={xhtml:s.XHR_RESPONSE_TYPE.DOCUMENT,html:s.XHR_RESPONSE_TYPE.DOCUMENT,htm:s.XHR_RESPONSE_TYPE.DOCUMENT,xml:s.XHR_RESPONSE_TYPE.DOCUMENT,tmx:s.XHR_RESPONSE_TYPE.DOCUMENT,svg:s.XHR_RESPONSE_TYPE.DOCUMENT,tsx:s.XHR_RESPONSE_TYPE.DOCUMENT,gif:s.XHR_RESPONSE_TYPE.BLOB,png:s.XHR_RESPONSE_TYPE.BLOB,bmp:s.XHR_RESPONSE_TYPE.BLOB,jpg:s.XHR_RESPONSE_TYPE.BLOB,jpeg:s.XHR_RESPONSE_TYPE.BLOB,tif:s.XHR_RESPONSE_TYPE.BLOB,tiff:s.XHR_RESPONSE_TYPE.BLOB,webp:s.XHR_RESPONSE_TYPE.BLOB,tga:s.XHR_RESPONSE_TYPE.BLOB,avif:s.XHR_RESPONSE_TYPE.BLOB,json:s.XHR_RESPONSE_TYPE.JSON,text:s.XHR_RESPONSE_TYPE.TEXT,txt:s.XHR_RESPONSE_TYPE.TEXT,ttf:s.XHR_RESPONSE_TYPE.BUFFER,otf:s.XHR_RESPONSE_TYPE.BUFFER},s.EMPTY_GIF="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="})(Ns||(Ns={}));function vl(){}function gq(s){return function(){for(var t=arguments,i=[],n=0;n>2,n[1]=(i[0]&3)<<4|i[1]>>4,n[2]=(i[1]&15)<<2|i[2]>>6,n[3]=i[2]&63;var a=t-(s.length-1);switch(a){case 2:n[3]=64,n[2]=64;break;case 1:n[3]=64;break}for(var r=0;r=0&&(this._array.splice(i,1),this._keys.splice(i,1),this._length--),this._dictionary.delete(e),t}getWithIndex(e){return e<0||e>=this._length?null:this._array[e]}getKey(e){return e<0||e>=this._length?null:this._keys[e]}getKeys(){return this._keys.slice()}hasKey(e){return this._keys.indexOf(e)>-1}getValue(e){return this._dictionary.get(e)}getValues(){return this._array.slice()}hasValue(e){return this._array.indexOf(e)>-1}indexOf(e){return this._array.indexOf(e)}concatenate(e){for(const t of e._keys)this.add(t,e.getValue(t))}clone(){const e=new li;return e.concatenate(this),e}}const HU=s=>{let e="";const t=new Uint8Array(s),i=t.byteLength;for(let n=0;n>8,t[1]=e&255,this.appendArray(t),this}writeInt(e){const t=new Uint8Array(4);return t[0]=e>>24,t[1]=e>>16,t[2]=e>>8,t[3]=e&255,this.appendArray(t),this}writeString(e,t=!0){const i=new TextEncoder().encode(e);return t?(this.writeShort(i.length),this.appendArray(i)):this.appendArray(i),this}appendArray(e){if(!e)return;const t=new Uint8Array(this.position+e.length>this._buffer.length?this.position+e.length:this._buffer.length);t.set(this._buffer),t.set(e,this.position),this._buffer=t,this.position+=e.length}getBuffer(){return this._buffer.buffer}get position(){return this._position}set position(e){this._position=e}toString(e){return new TextDecoder(e).decode(this._buffer)}}function mf(s){let e=s.length;for(;--e>=0;)s[e]=0}const bq=3,Aq=258,WU=29,Oq=256,wq=Oq+1+WU,YU=30,Cq=512,Mq=new Array((wq+2)*2);mf(Mq);const Nq=new Array(YU*2);mf(Nq);const Pq=new Array(Cq);mf(Pq);const kq=new Array(Aq-bq+1);mf(kq);const xq=new Array(WU);mf(xq);const Dq=new Array(YU);mf(Dq);const Lq=(s,e,t,i)=>{let n=s&65535|0,r=s>>>16&65535|0,a=0;for(;t!==0;){a=t>2e3?2e3:t,t-=a;do n=n+e[i++]|0,r=r+n|0;while(--a);n%=65521,r%=65521}return n|r<<16|0};var eR=Lq;const Uq=()=>{let s,e=[];for(var t=0;t<256;t++){s=t;for(var i=0;i<8;i++)s=s&1?3988292384^s>>>1:s>>>1;e[t]=s}return e},Fq=new Uint32Array(Uq()),Bq=(s,e,t,i)=>{const n=Fq,r=i+t;s^=-1;for(let a=i;a>>8^n[(s^e[a])&255];return s^-1};var lr=Bq,tR={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},XU={Z_NO_FLUSH:0,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_DEFLATED:8};const Gq=(s,e)=>Object.prototype.hasOwnProperty.call(s,e);var Vq=function(s){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const t=e.shift();if(t){if(typeof t!="object")throw new TypeError(t+"must be non-object");for(const i in t)Gq(t,i)&&(s[i]=t[i])}}return s},jq=s=>{let e=0;for(let i=0,n=s.length;i=252?6:s>=248?5:s>=240?4:s>=224?3:s>=192?2:1;D_[254]=D_[254]=1;var zq=s=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(s);let e,t,i,n,r,a=s.length,o=0;for(n=0;n>>6,e[r++]=128|t&63):t<65536?(e[r++]=224|t>>>12,e[r++]=128|t>>>6&63,e[r++]=128|t&63):(e[r++]=240|t>>>18,e[r++]=128|t>>>12&63,e[r++]=128|t>>>6&63,e[r++]=128|t&63);return e};const Hq=(s,e)=>{if(e<65534&&s.subarray&&qU)return String.fromCharCode.apply(null,s.length===e?s:s.subarray(0,e));let t="";for(let i=0;i{const t=e||s.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(s.subarray(0,e));let i,n;const r=new Array(t*2);for(n=0,i=0;i4){r[n++]=65533,i+=o-1;continue}for(a&=o===2?31:o===3?15:7;o>1&&i1){r[n++]=65533;continue}a<65536?r[n++]=a:(a-=65536,r[n++]=55296|a>>10&1023,r[n++]=56320|a&1023)}return Hq(r,n)},Yq=(s,e)=>{e=e||s.length,e>s.length&&(e=s.length);let t=e-1;for(;t>=0&&(s[t]&192)===128;)t--;return t<0||t===0?e:t+D_[s[t]]>e?t:e},iR={string2buf:zq,buf2string:Wq,utf8border:Yq};function Xq(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var Kq=Xq;const lp=16209,qq=16191;var $q=function(e,t){let i,n,r,a,o,l,u,c,h,f,d,_,g,p,m,v,E,y,T,w,C,N,P,k;const L=e.state;i=e.next_in,P=e.input,n=i+(e.avail_in-5),r=e.next_out,k=e.output,a=r-(t-e.avail_out),o=r+(e.avail_out-257),l=L.dmax,u=L.wsize,c=L.whave,h=L.wnext,f=L.window,d=L.hold,_=L.bits,g=L.lencode,p=L.distcode,m=(1<>>24,d>>>=y,_-=y,y=E>>>16&255,y===0)k[r++]=E&65535;else if(y&16){T=E&65535,y&=15,y&&(_>>=y,_-=y),_<15&&(d+=P[i++]<<_,_+=8,d+=P[i++]<<_,_+=8),E=p[d&v];i:for(;;){if(y=E>>>24,d>>>=y,_-=y,y=E>>>16&255,y&16){if(w=E&65535,y&=15,_l){e.msg="invalid distance too far back",L.mode=lp;break e}if(d>>>=y,_-=y,y=r-a,w>y){if(y=w-y,y>c&&L.sane){e.msg="invalid distance too far back",L.mode=lp;break e}if(C=0,N=f,h===0){if(C+=u-y,y2;)k[r++]=N[C++],k[r++]=N[C++],k[r++]=N[C++],T-=3;T&&(k[r++]=N[C++],T>1&&(k[r++]=N[C++]))}else{C=r-w;do k[r++]=k[C++],k[r++]=k[C++],k[r++]=k[C++],T-=3;while(T>2);T&&(k[r++]=k[C++],T>1&&(k[r++]=k[C++]))}}else if(y&64){e.msg="invalid distance code",L.mode=lp;break e}else{E=p[(E&65535)+(d&(1<>3,i-=T,_-=T<<3,d&=(1<<_)-1,e.next_in=i,e.next_out=r,e.avail_in=i{const l=o.bits;let u=0,c=0,h=0,f=0,d=0,_=0,g=0,p=0,m=0,v=0,E,y,T,w,C,N=null,P;const k=new Uint16Array(nh+1),L=new Uint16Array(nh+1);let j=null,z,ne,G;for(u=0;u<=nh;u++)k[u]=0;for(c=0;c=1&&k[f]===0;f--);if(d>f&&(d=f),f===0)return n[r++]=1<<24|64<<16|0,n[r++]=1<<24|64<<16|0,o.bits=1,0;for(h=1;h0&&(s===YN||f!==1))return-1;for(L[1]=0,u=1;uHN||s===XN&&m>WN)return 1;for(;;){z=u-g,a[c]+1=P?(ne=j[a[c]-P],G=N[a[c]-P]):(ne=96,G=0),E=1<>g)+y]=z<<24|ne<<16|G|0;while(y!==0);for(E=1<>=1;if(E!==0?(v&=E-1,v+=E):v=0,c++,--k[u]===0){if(u===f)break;u=e[t+a[c]]}if(u>d&&(v&w)!==T){for(g===0&&(g=d),C+=h,_=u-g,p=1<<_;_+gHN||s===XN&&m>WN)return 1;T=v&w,n[T]=d<<24|_<<16|C-r|0}}return v!==0&&(n[C+v]=u-g<<24|64<<16|0),o.bits=d,0};var ld=t$;const i$=0,$U=1,QU=2,{Z_FINISH:KN,Z_BLOCK:s$,Z_TREES:up,Z_OK:Uu,Z_STREAM_END:n$,Z_NEED_DICT:r$,Z_STREAM_ERROR:Dn,Z_DATA_ERROR:ZU,Z_MEM_ERROR:JU,Z_BUF_ERROR:a$,Z_DEFLATED:qN}=XU,y0=16180,$N=16181,QN=16182,ZN=16183,JN=16184,eP=16185,tP=16186,iP=16187,sP=16188,nP=16189,Lm=16190,Kr=16191,Zy=16192,rP=16193,Jy=16194,aP=16195,oP=16196,lP=16197,uP=16198,hp=16199,cp=16200,hP=16201,cP=16202,fP=16203,dP=16204,_P=16205,eT=16206,gP=16207,pP=16208,Dt=16209,e4=16210,t4=16211,o$=852,l$=592,u$=15,h$=u$,mP=s=>(s>>>24&255)+(s>>>8&65280)+((s&65280)<<8)+((s&255)<<24);function c$(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const qu=s=>{if(!s)return 1;const e=s.state;return!e||e.strm!==s||e.modet4?1:0},i4=s=>{if(qu(s))return Dn;const e=s.state;return s.total_in=s.total_out=e.total=0,s.msg="",e.wrap&&(s.adler=e.wrap&1),e.mode=y0,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(o$),e.distcode=e.distdyn=new Int32Array(l$),e.sane=1,e.back=-1,Uu},s4=s=>{if(qu(s))return Dn;const e=s.state;return e.wsize=0,e.whave=0,e.wnext=0,i4(s)},n4=(s,e)=>{let t;if(qu(s))return Dn;const i=s.state;return e<0?(t=0,e=-e):(t=(e>>4)+5,e<48&&(e&=15)),e&&(e<8||e>15)?Dn:(i.window!==null&&i.wbits!==e&&(i.window=null),i.wrap=t,i.wbits=e,s4(s))},r4=(s,e)=>{if(!s)return Dn;const t=new c$;s.state=t,t.strm=s,t.window=null,t.mode=y0;const i=n4(s,e);return i!==Uu&&(s.state=null),i},f$=s=>r4(s,h$);let vP=!0,tT,iT;const d$=s=>{if(vP){tT=new Int32Array(512),iT=new Int32Array(32);let e=0;for(;e<144;)s.lens[e++]=8;for(;e<256;)s.lens[e++]=9;for(;e<280;)s.lens[e++]=7;for(;e<288;)s.lens[e++]=8;for(ld($U,s.lens,0,288,tT,0,s.work,{bits:9}),e=0;e<32;)s.lens[e++]=5;ld(QU,s.lens,0,32,iT,0,s.work,{bits:5}),vP=!1}s.lencode=tT,s.lenbits=9,s.distcode=iT,s.distbits=5},a4=(s,e,t,i)=>{let n;const r=s.state;return r.window===null&&(r.wsize=1<=r.wsize?(r.window.set(e.subarray(t-r.wsize,t),0),r.wnext=0,r.whave=r.wsize):(n=r.wsize-r.wnext,n>i&&(n=i),r.window.set(e.subarray(t-i,t-i+n),r.wnext),i-=n,i?(r.window.set(e.subarray(t-i,t),0),r.wnext=i,r.whave=r.wsize):(r.wnext+=n,r.wnext===r.wsize&&(r.wnext=0),r.whave{let t,i,n,r,a,o,l,u,c,h,f,d,_,g,p=0,m,v,E,y,T,w,C,N;const P=new Uint8Array(4);let k,L;const j=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(qu(s)||!s.output||!s.input&&s.avail_in!==0)return Dn;t=s.state,t.mode===Kr&&(t.mode=Zy),a=s.next_out,n=s.output,l=s.avail_out,r=s.next_in,i=s.input,o=s.avail_in,u=t.hold,c=t.bits,h=o,f=l,N=Uu;e:for(;;)switch(t.mode){case y0:if(t.wrap===0){t.mode=Zy;break}for(;c<16;){if(o===0)break e;o--,u+=i[r++]<>>8&255,t.check=lr(t.check,P,2,0),u=0,c=0,t.mode=$N;break}if(t.head&&(t.head.done=!1),!(t.wrap&1)||(((u&255)<<8)+(u>>8))%31){s.msg="incorrect header check",t.mode=Dt;break}if((u&15)!==qN){s.msg="unknown compression method",t.mode=Dt;break}if(u>>>=4,c-=4,C=(u&15)+8,t.wbits===0&&(t.wbits=C),C>15||C>t.wbits){s.msg="invalid window size",t.mode=Dt;break}t.dmax=1<>8&1),t.flags&512&&t.wrap&4&&(P[0]=u&255,P[1]=u>>>8&255,t.check=lr(t.check,P,2,0)),u=0,c=0,t.mode=QN;case QN:for(;c<32;){if(o===0)break e;o--,u+=i[r++]<>>8&255,P[2]=u>>>16&255,P[3]=u>>>24&255,t.check=lr(t.check,P,4,0)),u=0,c=0,t.mode=ZN;case ZN:for(;c<16;){if(o===0)break e;o--,u+=i[r++]<>8),t.flags&512&&t.wrap&4&&(P[0]=u&255,P[1]=u>>>8&255,t.check=lr(t.check,P,2,0)),u=0,c=0,t.mode=JN;case JN:if(t.flags&1024){for(;c<16;){if(o===0)break e;o--,u+=i[r++]<>>8&255,t.check=lr(t.check,P,2,0)),u=0,c=0}else t.head&&(t.head.extra=null);t.mode=eP;case eP:if(t.flags&1024&&(d=t.length,d>o&&(d=o),d&&(t.head&&(C=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Uint8Array(t.head.extra_len)),t.head.extra.set(i.subarray(r,r+d),C)),t.flags&512&&t.wrap&4&&(t.check=lr(t.check,i,d,r)),o-=d,r+=d,t.length-=d),t.length))break e;t.length=0,t.mode=tP;case tP:if(t.flags&2048){if(o===0)break e;d=0;do C=i[r+d++],t.head&&C&&t.length<65536&&(t.head.name+=String.fromCharCode(C));while(C&&d>9&1,t.head.done=!0),s.adler=t.check=0,t.mode=Kr;break;case nP:for(;c<32;){if(o===0)break e;o--,u+=i[r++]<>>=c&7,c-=c&7,t.mode=eT;break}for(;c<3;){if(o===0)break e;o--,u+=i[r++]<>>=1,c-=1,u&3){case 0:t.mode=rP;break;case 1:if(d$(t),t.mode=hp,e===up){u>>>=2,c-=2;break e}break;case 2:t.mode=oP;break;case 3:s.msg="invalid block type",t.mode=Dt}u>>>=2,c-=2;break;case rP:for(u>>>=c&7,c-=c&7;c<32;){if(o===0)break e;o--,u+=i[r++]<>>16^65535)){s.msg="invalid stored block lengths",t.mode=Dt;break}if(t.length=u&65535,u=0,c=0,t.mode=Jy,e===up)break e;case Jy:t.mode=aP;case aP:if(d=t.length,d){if(d>o&&(d=o),d>l&&(d=l),d===0)break e;n.set(i.subarray(r,r+d),a),o-=d,r+=d,l-=d,a+=d,t.length-=d;break}t.mode=Kr;break;case oP:for(;c<14;){if(o===0)break e;o--,u+=i[r++]<>>=5,c-=5,t.ndist=(u&31)+1,u>>>=5,c-=5,t.ncode=(u&15)+4,u>>>=4,c-=4,t.nlen>286||t.ndist>30){s.msg="too many length or distance symbols",t.mode=Dt;break}t.have=0,t.mode=lP;case lP:for(;t.have>>=3,c-=3}for(;t.have<19;)t.lens[j[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,k={bits:t.lenbits},N=ld(i$,t.lens,0,19,t.lencode,0,t.work,k),t.lenbits=k.bits,N){s.msg="invalid code lengths set",t.mode=Dt;break}t.have=0,t.mode=uP;case uP:for(;t.have>>24,v=p>>>16&255,E=p&65535,!(m<=c);){if(o===0)break e;o--,u+=i[r++]<>>=m,c-=m,t.lens[t.have++]=E;else{if(E===16){for(L=m+2;c>>=m,c-=m,t.have===0){s.msg="invalid bit length repeat",t.mode=Dt;break}C=t.lens[t.have-1],d=3+(u&3),u>>>=2,c-=2}else if(E===17){for(L=m+3;c>>=m,c-=m,C=0,d=3+(u&7),u>>>=3,c-=3}else{for(L=m+7;c>>=m,c-=m,C=0,d=11+(u&127),u>>>=7,c-=7}if(t.have+d>t.nlen+t.ndist){s.msg="invalid bit length repeat",t.mode=Dt;break}for(;d--;)t.lens[t.have++]=C}}if(t.mode===Dt)break;if(t.lens[256]===0){s.msg="invalid code -- missing end-of-block",t.mode=Dt;break}if(t.lenbits=9,k={bits:t.lenbits},N=ld($U,t.lens,0,t.nlen,t.lencode,0,t.work,k),t.lenbits=k.bits,N){s.msg="invalid literal/lengths set",t.mode=Dt;break}if(t.distbits=6,t.distcode=t.distdyn,k={bits:t.distbits},N=ld(QU,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,k),t.distbits=k.bits,N){s.msg="invalid distances set",t.mode=Dt;break}if(t.mode=hp,e===up)break e;case hp:t.mode=cp;case cp:if(o>=6&&l>=258){s.next_out=a,s.avail_out=l,s.next_in=r,s.avail_in=o,t.hold=u,t.bits=c,$q(s,f),a=s.next_out,n=s.output,l=s.avail_out,r=s.next_in,i=s.input,o=s.avail_in,u=t.hold,c=t.bits,t.mode===Kr&&(t.back=-1);break}for(t.back=0;p=t.lencode[u&(1<>>24,v=p>>>16&255,E=p&65535,!(m<=c);){if(o===0)break e;o--,u+=i[r++]<>y)],m=p>>>24,v=p>>>16&255,E=p&65535,!(y+m<=c);){if(o===0)break e;o--,u+=i[r++]<>>=y,c-=y,t.back+=y}if(u>>>=m,c-=m,t.back+=m,t.length=E,v===0){t.mode=_P;break}if(v&32){t.back=-1,t.mode=Kr;break}if(v&64){s.msg="invalid literal/length code",t.mode=Dt;break}t.extra=v&15,t.mode=hP;case hP:if(t.extra){for(L=t.extra;c>>=t.extra,c-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=cP;case cP:for(;p=t.distcode[u&(1<>>24,v=p>>>16&255,E=p&65535,!(m<=c);){if(o===0)break e;o--,u+=i[r++]<>y)],m=p>>>24,v=p>>>16&255,E=p&65535,!(y+m<=c);){if(o===0)break e;o--,u+=i[r++]<>>=y,c-=y,t.back+=y}if(u>>>=m,c-=m,t.back+=m,v&64){s.msg="invalid distance code",t.mode=Dt;break}t.offset=E,t.extra=v&15,t.mode=fP;case fP:if(t.extra){for(L=t.extra;c>>=t.extra,c-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){s.msg="invalid distance too far back",t.mode=Dt;break}t.mode=dP;case dP:if(l===0)break e;if(d=f-l,t.offset>d){if(d=t.offset-d,d>t.whave&&t.sane){s.msg="invalid distance too far back",t.mode=Dt;break}d>t.wnext?(d-=t.wnext,_=t.wsize-d):_=t.wnext-d,d>t.length&&(d=t.length),g=t.window}else g=n,_=a-t.offset,d=t.length;d>l&&(d=l),l-=d,t.length-=d;do n[a++]=g[_++];while(--d);t.length===0&&(t.mode=cp);break;case _P:if(l===0)break e;n[a++]=t.length,l--,t.mode=cp;break;case eT:if(t.wrap){for(;c<32;){if(o===0)break e;o--,u|=i[r++]<{if(qu(s))return Dn;let e=s.state;return e.window&&(e.window=null),s.state=null,Uu},p$=(s,e)=>{if(qu(s))return Dn;const t=s.state;return t.wrap&2?(t.head=e,e.done=!1,Uu):Dn},m$=(s,e)=>{const t=e.length;let i,n,r;return qu(s)||(i=s.state,i.wrap!==0&&i.mode!==Lm)?Dn:i.mode===Lm&&(n=1,n=eR(n,e,t,0),n!==i.check)?ZU:(r=a4(s,e,t,t),r?(i.mode=e4,JU):(i.havedict=1,Uu))};var v$=s4,E$=n4,y$=i4,T$=f$,I$=r4,R$=_$,S$=g$,b$=p$,A$=m$,O$="pako inflate (from Nodeca project)",da={inflateReset:v$,inflateReset2:E$,inflateResetKeep:y$,inflateInit:T$,inflateInit2:I$,inflate:R$,inflateEnd:S$,inflateGetHeader:b$,inflateSetDictionary:A$,inflateInfo:O$};function w$(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var C$=w$;const o4=Object.prototype.toString,{Z_NO_FLUSH:M$,Z_FINISH:N$,Z_OK:L_,Z_STREAM_END:sT,Z_NEED_DICT:nT,Z_STREAM_ERROR:P$,Z_DATA_ERROR:EP,Z_MEM_ERROR:k$}=XU;function T0(s){this.options=KU.assign({chunkSize:1024*64,windowBits:15,to:""},s||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,e.windowBits===0&&(e.windowBits=-15)),e.windowBits>=0&&e.windowBits<16&&!(s&&s.windowBits)&&(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(e.windowBits&15||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Kq,this.strm.avail_out=0;let t=da.inflateInit2(this.strm,e.windowBits);if(t!==L_)throw new Error(tR[t]);if(this.header=new C$,da.inflateGetHeader(this.strm,this.header),e.dictionary&&(typeof e.dictionary=="string"?e.dictionary=iR.string2buf(e.dictionary):o4.call(e.dictionary)==="[object ArrayBuffer]"&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(t=da.inflateSetDictionary(this.strm,e.dictionary),t!==L_)))throw new Error(tR[t])}T0.prototype.push=function(s,e){const t=this.strm,i=this.options.chunkSize,n=this.options.dictionary;let r,a,o;if(this.ended)return!1;for(e===~~e?a=e:a=e===!0?N$:M$,o4.call(s)==="[object ArrayBuffer]"?t.input=new Uint8Array(s):t.input=s,t.next_in=0,t.avail_in=t.input.length;;){for(t.avail_out===0&&(t.output=new Uint8Array(i),t.next_out=0,t.avail_out=i),r=da.inflate(t,a),r===nT&&n&&(r=da.inflateSetDictionary(t,n),r===L_?r=da.inflate(t,a):r===EP&&(r=nT));t.avail_in>0&&r===sT&&t.state.wrap>0&&s[t.next_in]!==0;)da.inflateReset(t),r=da.inflate(t,a);switch(r){case P$:case EP:case nT:case k$:return this.onEnd(r),this.ended=!0,!1}if(o=t.avail_out,t.next_out&&(t.avail_out===0||r===sT))if(this.options.to==="string"){let l=iR.utf8border(t.output,t.next_out),u=t.next_out-l,c=iR.buf2string(t.output,l);t.next_out=u,t.avail_out=i-u,u&&t.output.set(t.output.subarray(l,l+u),0),this.onData(c)}else this.onData(t.output.length===t.next_out?t.output:t.output.subarray(0,t.next_out));if(!(r===L_&&o===0)){if(r===sT)return r=da.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,!0;if(t.avail_in===0)break}}return!0};T0.prototype.onData=function(s){this.chunks.push(s)};T0.prototype.onEnd=function(s){s===L_&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=KU.flattenChunks(this.chunks)),this.chunks=[],this.err=s,this.msg=this.strm.msg};function x$(s,e){const t=new T0(e);if(t.push(s),t.err)throw t.msg||tR[t.err];return t.result}var D$=x$,L$={inflate:D$};const{inflate:U$}=L$;var yP=U$;const u1=class u1{constructor(e){this._jsonFile=null,this._image=null,this._imageData=null,this._baseTexture=null,this.parse(e)}parse(e){const t=new E0(e);let i=t.readShort();for(;i>0;){const n=t.readShort(),r=t.readBytes(n).toString(),a=t.readInt(),o=t.readBytes(a);if(r.endsWith(".json")){const l=yP(o.toArrayBuffer());this._jsonFile=JSON.parse(u1.TEXT_DECODER.decode(l))}else{const l=yP(o.toArrayBuffer()),u=HU(l);this._baseTexture=new pt("data:image/png;base64,"+u)}i--}}get jsonFile(){return this._jsonFile}get baseTexture(){return this._baseTexture}};u1.TEXT_DECODER=new TextDecoder("utf-8");let Um=u1;class F$ extends pf{constructor(e){super(`attribute vec2 aVertexPosition; attribute vec2 aTextureCoord; uniform mat3 projectionMatrix; varying vec2 vTextureCoord; void main(void) { gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); vTextureCoord = aTextureCoord; }`,`varying vec2 vTextureCoord; uniform sampler2D uSampler; uniform float gamma; uniform float contrast; uniform float saturation; uniform float brightness; uniform float red; uniform float green; uniform float blue; uniform float alpha; void main(void) { vec4 c = texture2D(uSampler, vTextureCoord); if (c.a > 0.0) { c.rgb /= c.a; vec3 rgb = pow(c.rgb, vec3(1. / gamma)); rgb = mix(vec3(.5), mix(vec3(dot(vec3(.2125, .7154, .0721), rgb)), rgb, saturation), contrast); rgb.r *= red; rgb.g *= green; rgb.b *= blue; c.rgb = rgb * brightness; c.rgb *= c.a; } gl_FragColor = c * alpha; }`),this.gamma=1,this.saturation=1,this.contrast=1,this.brightness=1,this.red=1,this.green=1,this.blue=1,this.alpha=1,Object.assign(this,e)}apply(e,t,i,n){this.uniforms.gamma=Math.max(this.gamma,1e-4),this.uniforms.saturation=this.saturation,this.uniforms.contrast=this.contrast,this.uniforms.brightness=this.brightness,this.uniforms.red=this.red,this.uniforms.green=this.green,this.uniforms.blue=this.blue,this.uniforms.alpha=this.alpha,e.applyFilter(this,t,i,n)}}const B$=` attribute vec2 aVertexPosition; attribute vec2 aTextureCoord; uniform mat3 projectionMatrix; varying vec2 vTextureCoord; void main(void) { gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); vTextureCoord = aTextureCoord; }`,G$=` varying vec2 vTextureCoord; uniform sampler2D uSampler; uniform sampler2D mask; uniform int fromChannel; uniform int toChannel; void main(void) { vec4 maskColor = texture2D(mask, vTextureCoord); vec4 currentColor = texture2D(uSampler, vTextureCoord); vec4 adjusted = currentColor; if(maskColor.r == 0.0 && maskColor.g == 0.0 && maskColor.b == 0.0) { adjusted.a = 0.0; } gl_FragColor = vec4(adjusted.r, adjusted.g, adjusted.b, adjusted.a); }`,Wh=class Wh extends pf{constructor(e,t,i){super(B$,G$,{mask:e.castToBaseTexture(),fromChannel:t,toChannel:i})}};Wh.CHANNEL_RED=0,Wh.CHANNEL_GREEN=1,Wh.CHANNEL_BLUE=2,Wh.CHANNEL_ALPHA=3;let TP=Wh;/*! * @pixi/display - v6.5.10 * Compiled Thu, 06 Jul 2023 15:25:11 UTC * * @pixi/display is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license */de.SORTABLE_CHILDREN=!1;var Fm=function(){function s(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}return s.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},s.prototype.clear=function(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},s.prototype.getRectangle=function(e){return this.minX>this.maxX||this.minY>this.maxY?ve.EMPTY:(e=e||new ve(0,0,1,1),e.x=this.minX,e.y=this.minY,e.width=this.maxX-this.minX,e.height=this.maxY-this.minY,e)},s.prototype.addPoint=function(e){this.minX=Math.min(this.minX,e.x),this.maxX=Math.max(this.maxX,e.x),this.minY=Math.min(this.minY,e.y),this.maxY=Math.max(this.maxY,e.y)},s.prototype.addPointMatrix=function(e,t){var i=e.a,n=e.b,r=e.c,a=e.d,o=e.tx,l=e.ty,u=i*t.x+r*t.y+o,c=n*t.x+a*t.y+l;this.minX=Math.min(this.minX,u),this.maxX=Math.max(this.maxX,u),this.minY=Math.min(this.minY,c),this.maxY=Math.max(this.maxY,c)},s.prototype.addQuad=function(e){var t=this.minX,i=this.minY,n=this.maxX,r=this.maxY,a=e[0],o=e[1];t=an?a:n,r=o>r?o:r,a=e[2],o=e[3],t=an?a:n,r=o>r?o:r,a=e[4],o=e[5],t=an?a:n,r=o>r?o:r,a=e[6],o=e[7],t=an?a:n,r=o>r?o:r,this.minX=t,this.minY=i,this.maxX=n,this.maxY=r},s.prototype.addFrame=function(e,t,i,n,r){this.addFrameMatrix(e.worldTransform,t,i,n,r)},s.prototype.addFrameMatrix=function(e,t,i,n,r){var a=e.a,o=e.b,l=e.c,u=e.d,c=e.tx,h=e.ty,f=this.minX,d=this.minY,_=this.maxX,g=this.maxY,p=a*t+l*i+c,m=o*t+u*i+h;f=p_?p:_,g=m>g?m:g,p=a*n+l*i+c,m=o*n+u*i+h,f=p_?p:_,g=m>g?m:g,p=a*t+l*r+c,m=o*t+u*r+h,f=p_?p:_,g=m>g?m:g,p=a*n+l*r+c,m=o*n+u*r+h,f=p_?p:_,g=m>g?m:g,this.minX=f,this.minY=d,this.maxX=_,this.maxY=g},s.prototype.addVertexData=function(e,t,i){for(var n=this.minX,r=this.minY,a=this.maxX,o=this.maxY,l=t;la?u:a,o=c>o?c:o}this.minX=n,this.minY=r,this.maxX=a,this.maxY=o},s.prototype.addVertices=function(e,t,i,n){this.addVerticesMatrix(e.worldTransform,t,i,n)},s.prototype.addVerticesMatrix=function(e,t,i,n,r,a){r===void 0&&(r=0),a===void 0&&(a=r);for(var o=e.a,l=e.b,u=e.c,c=e.d,h=e.tx,f=e.ty,d=this.minX,_=this.minY,g=this.maxX,p=this.maxY,m=i;mn?e.maxX:n,this.maxY=e.maxY>r?e.maxY:r},s.prototype.addBoundsMask=function(e,t){var i=e.minX>t.minX?e.minX:t.minX,n=e.minY>t.minY?e.minY:t.minY,r=e.maxXu?r:u,this.maxY=a>c?a:c}},s.prototype.addBoundsMatrix=function(e,t){this.addFrameMatrix(t,e.minX,e.minY,e.maxX,e.maxY)},s.prototype.addBoundsArea=function(e,t){var i=e.minX>t.x?e.minX:t.x,n=e.minY>t.y?e.minY:t.y,r=e.maxXu?r:u,this.maxY=a>c?a:c}},s.prototype.pad=function(e,t){e===void 0&&(e=0),t===void 0&&(t=e),this.isEmpty()||(this.minX-=e,this.maxX+=e,this.minY-=t,this.maxY+=t)},s.prototype.addFramePad=function(e,t,i,n,r,a){e-=r,t-=a,i+=r,n+=a,this.minX=this.minXi?this.maxX:i,this.minY=this.minYn?this.maxY:n},s}();/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var sR=function(s,e){return sR=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])},sR(s,e)};function bw(s,e){sR(s,e);function t(){this.constructor=s}s.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var _i=function(s){bw(e,s);function e(){var t=s.call(this)||this;return t.tempDisplayObjectParent=null,t.transform=new AU,t.alpha=1,t.visible=!0,t.renderable=!0,t.cullable=!1,t.cullArea=null,t.parent=null,t.worldAlpha=1,t._lastSortedIndex=0,t._zIndex=0,t.filterArea=null,t.filters=null,t._enabledFilters=null,t._bounds=new Fm,t._localBounds=null,t._boundsID=0,t._boundsRect=null,t._localBoundsRect=null,t._mask=null,t._maskRefCount=0,t._destroyed=!1,t.isSprite=!1,t.isMask=!1,t}return e.mixin=function(t){for(var i=Object.keys(t),n=0;n1)for(var r=0;rthis.children.length)throw new Error(t+"addChildAt: The index "+i+" supplied is out of bounds "+this.children.length);return t.parent&&t.parent.removeChild(t),t.parent=this,this.sortDirty=!0,t.transform._parentID=-1,this.children.splice(i,0,t),this._boundsID++,this.onChildrenChange(i),t.emit("added",this),this.emit("childAdded",t,this,i),t},e.prototype.swapChildren=function(t,i){if(t!==i){var n=this.getChildIndex(t),r=this.getChildIndex(i);this.children[n]=i,this.children[r]=t,this.onChildrenChange(n=this.children.length)throw new Error("The index "+i+" supplied is out of bounds "+this.children.length);var n=this.getChildIndex(t);jp(this.children,n,1),this.children.splice(i,0,t),this.onChildrenChange(i)},e.prototype.getChildAt=function(t){if(t<0||t>=this.children.length)throw new Error("getChildAt: Index ("+t+") does not exist.");return this.children[t]},e.prototype.removeChild=function(){for(var t=arguments,i=[],n=0;n1)for(var r=0;r0&&a<=r){o=this.children.splice(n,a);for(var l=0;l1&&this.children.sort(j$),this.sortDirty=!1},e.prototype.updateTransform=function(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var t=0,i=this.children.length;t0&&i.height>0){var n,r;if(this.cullArea?(n=this.cullArea,r=this.worldTransform):this._render!==e.prototype._render&&(n=this.getBounds(!0)),n&&i.intersects(n,r))this._render(t);else if(this.cullArea)return;for(var a=0,o=this.children.length;a{var s;return((s=oi.instance)==null?void 0:s.ticker)||null},H$=()=>{var s;return((s=ga())==null?void 0:s.FPS)||0},Pe=()=>{var s;return((s=ga())==null?void 0:s.lastTime)||0};/*! * @pixi/filter-alpha - v6.5.10 * Compiled Thu, 06 Jul 2023 15:25:11 UTC * * @pixi/filter-alpha is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license *//*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var nR=function(s,e){return nR=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])},nR(s,e)};function W$(s,e){nR(s,e);function t(){this.constructor=s}s.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var Y$=`varying vec2 vTextureCoord; uniform sampler2D uSampler; uniform float uAlpha; void main(void) { gl_FragColor = texture2D(uSampler, vTextureCoord) * uAlpha; } `,rR=function(s){W$(e,s);function e(t){t===void 0&&(t=1);var i=s.call(this,rq,Y$,{uAlpha:1})||this;return i.alpha=t,i}return Object.defineProperty(e.prototype,"alpha",{get:function(){return this.uniforms.uAlpha},set:function(t){this.uniforms.uAlpha=t},enumerable:!1,configurable:!0}),e}(pf);class WCe extends rR{}class X$ extends pt{}class Qn extends Va{}class K$ extends pf{}class Bm extends Q{}class YCe extends ve{}/*! * @pixi/sprite - v6.5.10 * Compiled Thu, 06 Jul 2023 15:25:11 UTC * * @pixi/sprite is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license *//*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var aR=function(s,e){return aR=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])},aR(s,e)};function q$(s,e){aR(s,e);function t(){this.constructor=s}s.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var kf=new Q,$$=new Uint16Array([0,1,2,0,2,3]),mt=function(s){q$(e,s);function e(t){var i=s.call(this)||this;return i._anchor=new Oh(i._onAnchorUpdate,i,t?t.defaultAnchor.x:0,t?t.defaultAnchor.y:0),i._texture=null,i._width=0,i._height=0,i._tint=null,i._tintRGB=null,i.tint=16777215,i.blendMode=ge.NORMAL,i._cachedTint=16777215,i.uvs=null,i.texture=t||Ne.EMPTY,i.vertexData=new Float32Array(8),i.vertexTrimmedData=null,i._transformID=-1,i._textureID=-1,i._transformTrimmedID=-1,i._textureTrimmedID=-1,i.indices=$$,i.pluginName="batch",i.isSprite=!0,i._roundPixels=de.ROUND_PIXELS,i}return e.prototype._onTextureUpdate=function(){this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this._width&&(this.scale.x=Ah(this.scale.x)*this._width/this._texture.orig.width),this._height&&(this.scale.y=Ah(this.scale.y)*this._height/this._texture.orig.height)},e.prototype._onAnchorUpdate=function(){this._transformID=-1,this._transformTrimmedID=-1},e.prototype.calculateVertices=function(){var t=this._texture;if(!(this._transformID===this.transform._worldID&&this._textureID===t._updateID)){this._textureID!==t._updateID&&(this.uvs=this._texture._uvs.uvsFloat32),this._transformID=this.transform._worldID,this._textureID=t._updateID;var i=this.transform.worldTransform,n=i.a,r=i.b,a=i.c,o=i.d,l=i.tx,u=i.ty,c=this.vertexData,h=t.trim,f=t.orig,d=this._anchor,_=0,g=0,p=0,m=0;if(h?(g=h.x-d._x*f.width,_=g+h.width,m=h.y-d._y*f.height,p=m+h.height):(g=-d._x*f.width,_=g+f.width,m=-d._y*f.height,p=m+f.height),c[0]=n*g+a*m+l,c[1]=o*m+r*g+u,c[2]=n*_+a*m+l,c[3]=o*m+r*_+u,c[4]=n*_+a*p+l,c[5]=o*p+r*_+u,c[6]=n*g+a*p+l,c[7]=o*p+r*g+u,this._roundPixels)for(var v=de.RESOLUTION,E=0;E=r&&kf.x=a&&kf.y>16)+(t&65280)+((t&255)<<16)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"texture",{get:function(){return this._texture},set:function(t){this._texture!==t&&(this._texture&&this._texture.off("update",this._onTextureUpdate,this),this._texture=t||Ne.EMPTY,this._cachedTint=16777215,this._textureID=-1,this._textureTrimmedID=-1,t&&(t.baseTexture.valid?this._onTextureUpdate():t.once("update",this._onTextureUpdate,this)))},enumerable:!1,configurable:!0}),e}(Va);class kt extends mt{}class u4 extends Ne{}const Q$=` attribute vec2 aVertexPosition; attribute vec2 aTextureCoord; uniform mat3 projectionMatrix; varying vec2 vTextureCoord; void main(void) { gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); vTextureCoord = aTextureCoord; }`,Z$=` varying vec2 vTextureCoord; uniform sampler2D uSampler; uniform sampler2D lut; uniform int channel; void main(void) { vec4 currentColor = texture2D(uSampler, vTextureCoord); vec4 adjusted = currentColor; if(currentColor.a > 0.0) { if(channel == 0) { adjusted = texture2D(lut, vec2((currentColor.r * 255.0 + 0.5) / 256.0, 0.5)); } else if(channel == 1) { adjusted = texture2D(lut, vec2((currentColor.g * 255.0 + 0.5) / 256.0, 0.5)); } else if(channel == 2) { adjusted = texture2D(lut, vec2((currentColor.b * 255.0 + 0.5) / 256.0, 0.5)); } else if(channel == 3) { adjusted = texture2D(lut, vec2((currentColor.a * 255.0 + 0.5) / 256.0, 0.5)); } } gl_FragColor = vec4(adjusted.r, adjusted.g, adjusted.b, currentColor.a); }`,Vn=class Vn extends K${constructor(e,t=Vn.CHANNEL_RED){super(Q$,Z$),this._channel=t;let i=[];i=this.getLutForPalette(e),this._lut=X$.fromBuffer(Uint8Array.from(i),i.length/4,1,{mipmap:0,scaleMode:0}),this.uniforms.lut=this._lut,this.uniforms.channel=this._channel}getLutForPalette(e){const t=[];for(let i=0;i>16&255,t[i*4+Vn.CHANNEL_GREEN]=e[i]>>8&255,t[i*4+Vn.CHANNEL_BLUE]=e[i]&255,t[i*4+Vn.CHANNEL_ALPHA]=e[i]>>24&255;return t}get lut(){return this._lut}get channel(){return this._channel}};Vn.CHANNEL_RED=0,Vn.CHANNEL_GREEN=1,Vn.CHANNEL_BLUE=2,Vn.CHANNEL_ALPHA=3;let Gm=Vn;const h1=class h1{constructor(){this.RENDER_TEXTURE_POOL=new Map,this.RENDER_TEXTURE_CACHE=[]}clearCache(){this.RENDER_TEXTURE_POOL.forEach(e=>e==null?void 0:e.destroy(!0)),this.RENDER_TEXTURE_POOL.clear(),this.RENDER_TEXTURE_CACHE=[]}clearRenderTexture(e){return e?this.writeToRenderTexture(new mt(Ne.EMPTY),e):null}getTextureIdentifier(e,t,i){return`${i??h1.DEFAULT_PLANE_ID}:${e}:${t}`}createRenderTexture(e,t,i=null){if(e<0||t<0)return null;if(!i){const r=Pi.create({width:e,height:t});return this.RENDER_TEXTURE_CACHE.push(r),r}i=this.getTextureIdentifier(e,t,i);let n=this.RENDER_TEXTURE_POOL.get(i);return n||(n=Pi.create({width:e,height:t}),this.RENDER_TEXTURE_CACHE.push(n),this.RENDER_TEXTURE_POOL.set(i,n)),n}createAndFillRenderTexture(e,t,i=null,n=16777215){if(e<0||t<0)return null;const r=this.createRenderTexture(e,t,i);return this.clearAndFillRenderTexture(r,n)}createAndWriteRenderTexture(e,t,i,n=null,r=null){if(e<0||t<0)return null;const a=this.createRenderTexture(e,t,n);return this.writeToRenderTexture(i,a,!0,r)}clearAndFillRenderTexture(e,t=16777215){if(!e)return null;const i=new mt(Ne.WHITE);return i.tint=t,i.width=e.width,i.height=e.height,this.writeToRenderTexture(i,e)}writeToRenderTexture(e,t,i=!0,n=null){return!e||!t?null:(this.getRenderer().render(e,{renderTexture:t,clear:i,transform:n}),t)}getPixels(e,t=null){return this.getExtractor().pixels(e)}getRenderer(){return oi.instance.renderer}getExtractor(){return this.getRenderer().plugins.extract}};h1.DEFAULT_PLANE_ID="DEFAULT";let oR=h1;class St{static generateTexture(e,t=null,i=null,n=1){return e?(i===null&&(i=de.SCALE_MODE),this.getRenderer().generateTexture(e,{scaleMode:i,resolution:n,region:t})):null}static generateTextureFromImage(e){return e?Ne.from(e):null}static generateImage(e){return e?this.getExtractor().image(e):null}static generateImageUrl(e){return e?this.getExtractor().base64(e):null}static generateCanvas(e){return e?this.getExtractor().canvas(e):null}static clearRenderTexture(e){return e?this.writeToRenderTexture(new mt(Ne.EMPTY),e):null}static createRenderTexture(e,t){return e<0||t<0?null:Pi.create({width:e,height:t})}static createAndFillRenderTexture(e,t,i=16777215){if(e<0||t<0)return null;const n=this.createRenderTexture(e,t);return this.clearAndFillRenderTexture(n,i)}static createAndWriteRenderTexture(e,t,i,n=null){if(e<0||t<0)return null;const r=this.createRenderTexture(e,t);return this.writeToRenderTexture(i,r,!0,n)}static clearAndFillRenderTexture(e,t=16777215){if(!e)return null;const i=new mt(Ne.WHITE);return i.tint=t,i.width=e.width,i.height=e.height,this.writeToRenderTexture(i,e)}static writeToRenderTexture(e,t,i=!0,n=null){return!e||!t?null:(this.getRenderer().render(e,{renderTexture:t,clear:i,transform:n}),t)}static getPixels(e,t=null){return this.getExtractor().pixels(e)}static getRenderer(){return oi.instance.renderer}static getExtractor(){return this.getRenderer().plugins.extract}}const Vl=class Vl{static createAsset(e,t,i,n,r,a=!1,o=!1,l=!1){const u=Vl.GRAPHIC_POOL.length?Vl.GRAPHIC_POOL.pop():new Vl;return u._name=e,u._source=t||null,i?(u._texture=i,u._initialized=!1):(u._texture=null,u._initialized=!0),u._usesPalette=l,u._x=n,u._y=r,u._flipH=a,u._flipV=o,u._rectangle=null,u}recycle(){this._texture=null,Vl.GRAPHIC_POOL.push(this)}initialize(){this._initialized||!this._texture||(this._width=this._texture.width,this._height=this._texture.height,this._initialized=!0)}getImageUrl(){return St.generateImageUrl(new mt(this._texture))}get name(){return this._name}get source(){return this._source}get texture(){return this._texture}get usesPalette(){return this._usesPalette}get x(){return this._x}get y(){return this._y}get width(){return this.initialize(),this._width}get height(){return this.initialize(),this._height}get offsetX(){return this._flipH?-this._x:this._x}get offsetY(){return this._flipV?-this._y:this._y}get flipH(){return this._flipH}get flipV(){return this._flipV}get rectangle(){return this._rectangle||(this._rectangle=new ve(0,0,this.width,this.height)),this._rectangle}};Vl.GRAPHIC_POOL=[];let lR=Vl;class J${constructor(e,t,i){for(this._palette=e;this._palette.length<256;)this._palette.push([0,0,0]);this._primaryColor=t,this._secondaryColor=i}dispose(){}applyPalette(e){var a,o;const t=St.createAndWriteRenderTexture(e.width,e.height,new mt(e)),i=St.getPixels(t);for(let l=0;l0&&(r=parseInt(o,16)),o=i.color2,o&&o.length>0&&(a=parseInt(o,16)),this._palettes.set(n,new J$(i.rgb,r,a))}}createAsset(e,t,i,n,r,a,o,l){if(this._assets.get(e))return!1;const u=lR.createAsset(e,t,i,a,o,n,r,l);return this._assets.set(e,u),!0}replaceAsset(e,t,i,n,r,a,o,l){const u=this._assets.get(e);return u&&(this._assets.delete(e),u.recycle()),this.createAsset(e,t,i,n,r,a,o,l)}getAsset(e){if(!e)return null;const t=this._assets.get(e);return t||null}getAssetWithPalette(e,t){const i=e+"@"+t;let n=this.getAsset(i);if(!n){if(n=this.getAsset(e),!n||!n.usesPalette)return n;const r=this.getPalette(t);if(r){const a=r.applyPalette(n.texture);a&&(this._paletteAssetNames.push(i),this.createAsset(i,n.source+"@"+t,a,n.flipH,n.flipV,n.x,n.y,!1),n=this.getAsset(i))}}return n}getTexture(e){return this._textures.get(e)}getPaletteNames(){return Array.from(this._palettes.keys())}getPaletteColors(e){const t=this.getPalette(e);return t?[t.primaryColor,t.secondaryColor]:null}getPalette(e){if(!e)return null;const t=this._palettes.get(e);return t||null}addAsset(e,t,i,n=0,r=0,a=!1,o=!1){if(!e||!t)return!1;const l=this.getLibraryAsset(e);return l?i?(l.baseTexture=t.baseTexture,l.frame=t.frame,l.trim=t.trim,l.updateUvs(),!0):!1:(this._textures.set(e,t),this.createAsset(e,e,t,a,o,n,r,!1))}disposeAsset(e){const t=this._assets.get(e);if(!t)return;this._assets.delete(e);const i=this.getLibraryAsset(t.source);i&&(this._textures.delete(t.source),i.destroy(!0)),t.recycle()}getLibraryAsset(e){if(!e)return null;e=this._name+"_"+e;const t=this._textures.get(e);return t||null}addLibraryAsset(e){if(e)for(const t in e){const i=e[t];i&&this._textures.set(Od.removeFileExtension(t),i)}}disposePaletteAssets(e=!0){if(this._paletteAssetNames&&(e||this._paletteAssetNames.length>Od.PALETTE_ASSET_DISPOSE_THRESHOLD)){for(const t of this._paletteAssetNames)this.disposeAsset(t);this._paletteAssetNames=[]}}get referenceCount(){return this._referenceCount}get referenceTimestamp(){return this._referenceTimestamp}get name(){return this._name}get baseTexture(){return this._baseTexture}get data(){return this._data}get textures(){return this._textures}get assets(){return this._assets}};Od.PALETTE_ASSET_DISPOSE_THRESHOLD=10;let Vm=Od;const c1=class c1{constructor(){this._textures=new Map,this._collections=new Map}getTexture(e){if(!e)return null;const t=this._textures.get(e);return t||null}setTexture(e,t){!e||!t||this._textures.set(e,t)}getAsset(e){if(!e)return null;for(const t of this._collections.values()){if(!t)continue;const i=t.getAsset(e);if(i)return i}return null}getCollection(e){if(!e)return null;const t=this._collections.get(e);return t||null}createCollection(e,t){if(!e)return null;const i=new Vm(e,t);if(i){for(const[n,r]of i.textures.entries())this.setTexture(n,r);this._collections.set(i.name,i)}return i}async downloadAsset(e){const t=await fetch(e);if(t.status!==200)return!1;let i="application/octet-stream";switch(t.headers.has("Content-Type")&&(i=t.headers.get("Content-Type")),i){case"application/octet-stream":{const n=await t.arrayBuffer(),r=new Um(n);await this.processAsset(r.baseTexture,r.jsonFile);break}case"image/png":case"image/jpeg":case"image/gif":{const n=await t.arrayBuffer(),r=HU(n),a=pt.from(`data:${i};base64,${r}`),o=async()=>{const l=new Ne(a);this.setTexture(e,l)};a.valid?await o():await new Promise((l,u)=>{a.once("update",async()=>(await o(),l()))});break}}return!0}async downloadAssets(e){if(!e||!e.length)return Promise.resolve(!0);try{return await Promise.all(e.map(async t=>await this.downloadAsset(t))),Promise.resolve(!0)}catch(t){return le.error(t),Promise.resolve(!1)}}async processAsset(e,t){const i=t.spritesheet;if(!e||!i||!Object.keys(i).length){this.createCollection(t,null);return}const n=async()=>{const r=new Sw(e,i);await r.parse(),this.createCollection(t,r)};e.valid?await n():await new Promise((r,a)=>{e.once("update",async()=>(await n(),r()))})}get collections(){return this._collections}};c1._INSTANCE=new c1;let uR=c1;const wn=()=>uR._INSTANCE;class eQ{constructor(e,t,i){this.name=e,this.textures=t,this.durations=i}}const f1=class f1{};f1.UNKNOWN=0,f1.BROWSER=1;let hR=f1;const wd=class wd{};wd.UNKNOWN=0,wd.FLASH=1,wd.HTML5=2;let cR=wd;const Yh=class Yh{};Yh.CONNECTION_OPENED="open",Yh.CONNECTION_CLOSED="close",Yh.CONNECTION_ERROR="error",Yh.CONNECTION_MESSAGE="message";let hr=Yh;const Cd=class Cd{static parseConfiguration(e,t=!1){if(!e)return!1;try{const i=new RegExp(/\${(.*?)}/g);for(const n in e){let r=e[n];typeof r=="string"&&(r=this.interpolate(r,i)),this._definitions.has(n)?t&&this.setValue(n,r):this.setValue(n,r)}return!0}catch(i){return le.error(i.stack),!1}}static interpolate(e,t=null){t||(t=new RegExp(/\${(.*?)}/g));const i=e.match(t);if(i&&i.length)for(const n of i){const r=this._definitions.get(this.removeInterpolateKey(n));r&&(e=e.replace(n,r))}return e}static removeInterpolateKey(e){return e.replace("${","").replace("}","")}static getValue(e,t=null){let i=this._definitions.get(e);if(i===void 0){if(this._missingKeys.indexOf(e)>=0)return t;this._missingKeys.push(e),le.warn(`Missing configuration key: ${e}`),i=t}return i}static setValue(e,t){const i=e.split(".");let n=this._config;for(let r=0;ree.EXPRESSION_MAP.length?null:ee.EXPRESSION_MAP[e]}static getGestureId(e){return ee.GESTURE_MAP.indexOf(e)}static getGesture(e){return e>ee.GESTURE_MAP.length?null:ee.GESTURE_MAP[e]}static idToAvatarActionState(e){return e==="Lay"?"lay":e==="Float"?"float":e==="Swim"?"swim":e==="Sit"?"sit":e==="Respect"?"respect":e==="Wave"?"wave":e==="Idle"?"idle":e==="Dance"?"dance":e==="UseItem"?"usei":e==="CarryItem"?"cri":e==="Talk"?"talk":e==="Sleep"?"Sleep":e==="Move"?"mv":"std"}};ee.CARRY_OBJECT="cri",ee.DANCE="dance",ee.EFFECT="fx",ee.EXPRESSION="expression",ee.EXPRESSION_BLOW_A_KISS="blow",ee.EXPRESSION_CRY="cry",ee.EXPRESSION_IDLE="idle",ee.EXPRESSION_LAUGH="laugh",ee.EXPRESSION_RESPECT="respect",ee.EXPRESSION_RIDE_JUMP="ridejump",ee.EXPRESSION_SNOWBOARD_OLLIE="sbollie",ee.EXPRESSION_SNOWBORD_360="sb360",ee.EXPRESSION_WAVE="wave",ee.GESTURE="gest",ee.GESTURE_AGGRAVATED="agr",ee.GESTURE_SAD="sad",ee.GESTURE_SMILE="sml",ee.GESTURE_SURPRISED="srp",ee.GUIDE_STATUS="guide",ee.MUTED="muted",ee.PET_GESTURE_BLINK="eyb",ee.PET_GESTURE_CRAZY="crz",ee.PET_GESTURE_JOY="joy",ee.PET_GESTURE_MISERABLE="mis",ee.PET_GESTURE_PUZZLED="puz",ee.PET_GESTURE_TONGUE="tng",ee.PLAYING_GAME="playing_game",ee.POSTURE="posture",ee.POSTURE_FLOAT="float",ee.POSTURE_LAY="lay",ee.POSTURE_SIT="sit",ee.POSTURE_STAND="std",ee.POSTURE_SWIM="swim",ee.POSTURE_WALK="mv",ee.SIGN="sign",ee.SLEEP="sleep",ee.SNOWWAR_DIE_BACK="swdieback",ee.SNOWWAR_DIE_FRONT="swdiefront",ee.SNOWWAR_PICK="swpick",ee.SNOWWAR_RUN="swrun",ee.SNOWWAR_THROW="swthrow",ee.TALK="talk",ee.BLINK="blink",ee.TYPING="typing",ee.USE_OBJECT="usei",ee.VOTE="vote",ee.GESTURE_MAP=["",ee.GESTURE_SMILE,ee.GESTURE_AGGRAVATED,ee.GESTURE_SURPRISED,ee.GESTURE_SAD,ee.PET_GESTURE_JOY,ee.PET_GESTURE_CRAZY,ee.PET_GESTURE_TONGUE,ee.PET_GESTURE_BLINK,ee.PET_GESTURE_MISERABLE,ee.PET_GESTURE_PUZZLED],ee.EXPRESSION_MAP=["",ee.EXPRESSION_WAVE,ee.EXPRESSION_BLOW_A_KISS,ee.EXPRESSION_LAUGH,ee.EXPRESSION_CRY,ee.EXPRESSION_IDLE,ee.DANCE,ee.EXPRESSION_RESPECT,ee.EXPRESSION_SNOWBOARD_OLLIE,ee.EXPRESSION_SNOWBORD_360,ee.EXPRESSION_RIDE_JUMP];let oe=ee;const Xh=class Xh{};Xh.DIRECTION_TO_ANGLE=[45,90,135,180,225,270,315,0],Xh.DIRECTION_IS_FLIPPED=[!1,!1,!1,!1,!0,!0,!0,!1],Xh.MIN_DIRECTION=0,Xh.MAX_DIRECTION=7;let Mo=Xh;const ea=class ea{};ea.GENERIC="hd",ea.HEAD="head",ea.TORSO="torso",ea.LEGS="legs",ea.HOTLOOKS="hotlooks",ea.WARDROBE="wardrobe",ea.EFFECTS="effects";let IP=ea;const Kh=class Kh{};Kh.OWN_AVATAR_EDITOR=0,Kh.FURNITURE_AVATAR_EDITOR=1,Kh.BOT_EDITOR=2,Kh.DEV_TOOL_EDITOR=3;let RP=Kh;const Fe=class Fe{};Fe.BODY="bd",Fe.SHOES="sh",Fe.LEGS="lg",Fe.CHEST="ch",Fe.WAIST_ACCESSORY="wa",Fe.CHEST_ACCESSORY="ca",Fe.HEAD="hd",Fe.HAIR="hr",Fe.FACE_ACCESSORY="fa",Fe.EYE_ACCESSORY="ea",Fe.HEAD_ACCESSORY="ha",Fe.HEAD_ACCESSORY_EXTRA="he",Fe.COAT_CHEST="cc",Fe.CHEST_PRINT="cp",Fe.LEFT_HAND_ITEM="li",Fe.LEFT_HAND="lh",Fe.LEFT_SLEEVE="ls",Fe.RIGHT_HAND="rh",Fe.RIGHT_SLEEVE="rs",Fe.FACE="fc",Fe.EYES="ey",Fe.HAIR_BIG="hrb",Fe.RIGHT_HAND_ITEM="ri",Fe.LEFT_COAT_SLEEVE="lc",Fe.RIGHT_COAT_SLEEVE="rc",Fe.FIGURE_SETS=[Fe.SHOES,Fe.LEGS,Fe.CHEST,Fe.WAIST_ACCESSORY,Fe.CHEST_ACCESSORY,Fe.HEAD,Fe.HAIR,Fe.FACE_ACCESSORY,Fe.EYE_ACCESSORY,Fe.HEAD_ACCESSORY,Fe.HEAD_ACCESSORY_EXTRA,Fe.COAT_CHEST,Fe.CHEST_PRINT];let Es=Fe;const Md=class Md{};Md.NONE=0,Md.GUIDE=1,Md.REQUESTER=2;let Mr=Md;const d1=class d1{};d1.LARGE="h",d1.SMALL="sh";let kr=d1;const Nd=class Nd{};Nd.FULL="full",Nd.HEAD="head",Nd.BODY="body";let _s=Nd;const jl=class jl{};jl.VERTICAL="vertical",jl.SITTING="sitting",jl.HORIZONTAL="horizontal",jl.SWIM="swim",jl.SNOWWARS_HORIZONTAL="swhorizontal";let io=jl;const qh=class qh{};qh.TOOL="tool",qh.COMPONENT="component",qh.ONLINE_TOOL="online_tool",qh.LOCAL_ONLY="local_only";let SP=qh;const Xe=class Xe{};Xe.DOG=0,Xe.CAT=1,Xe.CROCODILE=2,Xe.TERRIER=3,Xe.BEAR=4,Xe.PIG=5,Xe.LION=6,Xe.RHINO=7,Xe.SPIDER=8,Xe.TURTLE=9,Xe.CHICKEN=10,Xe.FROG=11,Xe.DRAGON=12,Xe.MONSTER=13,Xe.MONKEY=14,Xe.HORSE=15,Xe.MONSTERPLANT=16,Xe.BUNNY=17,Xe.BUNNYEVIL=18,Xe.BUNNYDEPRESSED=19,Xe.BUNNYLOVE=20,Xe.PIGEONGOOD=21,Xe.PIGEONEVIL=22,Xe.DEMONMONKEY=23,Xe.BABYBEAR=24,Xe.BABYTERRIER=25,Xe.GNOME=26,Xe.LEPRECHAUN=27,Xe.KITTENBABY=28,Xe.PUPPYBABY=29,Xe.PIGLETNBABY=30,Xe.HALOOMPA=31,Xe.FOOLS=32,Xe.PTEROSAUR=33,Xe.VELOCIRAPTOR=34;let U_=Xe;const oo=class oo{};oo.NONE=0,oo.HEART=1,oo.SMILE=2,oo.BOBBA=3,oo.RELATIONSHIP_TYPES=[0,1,2,3],oo.RELATIONSHIP_NAMES=["None","Heart","Smile","Bobba"];let fR=oo;const ta=class ta{};ta.HOTEL_VIEW="hotel_view",ta.HOME_ROOM="home_room",ta.NAVIGATOR="navigator",ta.CATALOG="catalog",ta.INVENTORY="inventory",ta.ME_MENU="me_menu",ta.FRIEND_LIST="friendlist";let jm=ta;const zl=class zl{};zl.LOVE_LOCK=0,zl.CARVE_A_TREE=1,zl.FRIENDS_PORTRAIT=2,zl.WILD_WEST_WANTED=3,zl.HABBOWEEN=4;let zm=zl;const _1=class _1{};_1.CATALOG="catalog",_1.INVENTORY="inventory";let dR=_1;const F=class F{};F.OBJECT_ROOM_ID="object_room_id",F.OBJECT_ACCURATE_Z_VALUE="object_accurate_z_value",F.TILE_CURSOR_HEIGHT="tile_cursor_height",F.FIGURE="figure",F.GENDER="gender",F.OWN_USER="own_user",F.FIGURE_CAN_STAND_UP="figure_can_stand_up",F.FIGURE_VERTICAL_OFFSET="figure_vertical_offset",F.FIGURE_TALK="figure_talk",F.FIGURE_DANCE="figure_dance",F.FIGURE_SLEEP="figure_sleep",F.FIGURE_BLINK="figure_blink",F.FIGURE_EFFECT="figure_effect",F.FIGURE_CARRY_OBJECT="figure_carry_object",F.FIGURE_USE_OBJECT="figure_use_object",F.FIGURE_GESTURE="figure_gesture",F.FIGURE_POSTURE="figure_posture",F.FIGURE_POSTURE_PARAMETER="figure_posture_parameter",F.FIGURE_HIGHLIGHT_ENABLE="figure_highlight_enable",F.FIGURE_HIGHLIGHT="figure_highlight",F.FURNITURE_PURCHASER_NAME="furniture_purchaser_name",F.FURNITURE_PURCHASER_FIGURE="furniture_purchaser_figure",F.STD="std",F.FIGURE_SIGN="figure_sign",F.FIGURE_FLAT_CONTROL="figure_flat_control",F.FIGURE_IS_TYPING="figure_is_typing",F.FIGURE_IS_MUTED="figure_is_muted",F.FIGURE_GAINED_EXPERIENCE="figure_gained_experience",F.FIGURE_EXPERIENCE_TIMESTAMP="figure_experience_timestamp",F.FIGURE_NUMBER_VALUE="figure_number_value",F.FIGURE_IS_PLAYING_GAME="figure_is_playing_game",F.FIGURE_GUIDE_STATUS="figure_guide_status",F.FIGURE_EXPRESSION="figure_expression",F.HEAD_DIRECTION="head_direction",F.FURNITURE_CUSTOM_VARIABLES="furniture_custom_variables",F.FURNITURE_AUTOMATIC_STATE_INDEX="furniture_automatic_state_index",F.FURNITURE_ALWAYS_STACKABLE="furniture_always_stackable",F.FURNITURE_DISABLE_PICKING_ANIMATION="furniture_disable_picking_animation",F.FURNITURE_DATA_FORMAT="furniture_data_format",F.FURNITURE_UNIQUE_SERIAL_NUMBER="furniture_unique_serial_number",F.FURNITURE_UNIQUE_EDITION_SIZE="furniture_unique_edition_size",F.FURNITURE_CRACKABLE_STATE="furniture_crackable_state",F.FURNITURE_CRACKABLE_HITS="furniture_crackable_hits",F.FURNITURE_CRACKABLE_TARGET="furniture_crackable_target",F.FURNITURE_CREDIT_VALUE="furniture_credit_value",F.FURNITURE_DATA="furniture_data",F.FURNITURE_ITEMDATA="furniture_itemdata",F.FURNITURE_COLOR="furniture_color",F.FURNITURE_LIFT_AMOUNT="furniure_lift_amount",F.FURNITURE_GUILD_CUSTOMIZED_GUILD_ID="furniture_guild_customized_guild_id",F.FURNITURE_GUILD_CUSTOMIZED_ASSET_NAME="furniture_guild_customized_asset_name",F.FURNITURE_GUILD_CUSTOMIZED_COLOR_1="furniture_guild_customized_color_1",F.FURNITURE_GUILD_CUSTOMIZED_COLOR_2="furniture_guild_customized_color_2",F.FURNITURE_STATE_UPDATE_TIME="furniture_state_update_time",F.FURNITURE_SELECTION_DISABLED="furniture_selection_disabled",F.FURNITURE_SIZE_X="furniture_size_x",F.FURNITURE_SIZE_Y="furniture_size_y",F.FURNITURE_SIZE_Z="furniture_size_z",F.FURNITURE_CENTER_X="furniture_center_x",F.FURNITURE_CENTER_Y="furniture_center_y",F.FURNITURE_CENTER_Z="furniture_center_z",F.FURNITURE_ALLOWED_DIRECTIONS="furniture_allowed_directions",F.FURNITURE_AD_URL="furniture_ad_url",F.FURNITURE_TYPE_ID="furniture_type_id",F.FURNITURE_EXTRAS="furniture_extras",F.FURNITURE_EXPIRY_TIME="furniture_expiry_time",F.FURNITURE_EXPIRTY_TIMESTAMP="furniture_expiry_timestamp",F.FURNITURE_REAL_ROOM_OBJECT="furniture_real_room_object",F.FURNITURE_IS_STICKIE="furniture_is_stickie",F.FURNITURE_BRANDING_IMAGE_STATUS="furniture_branding_image_status",F.FURNITURE_BRANDING_IMAGE_URL="furniture_branding_image_url",F.FURNITURE_BRANDING_URL="furniture_branding_url",F.FURNITURE_BRANDING_OFFSET_X="furniture_branding_offset_x",F.FURNITURE_BRANDING_OFFSET_Y="furniture_branding_offset_y",F.FURNITURE_BRANDING_OFFSET_Z="furniture_branding_offset_z",F.FURNITURE_BRANDING_IS_ANIMATED="furniture_branding_is_animated",F.FURNITURE_BADGE_IMAGE_STATUS="furniture_badge_image_status",F.FURNITURE_BADGE_ASSET_NAME="furniture_badge_asset_name",F.FURNITURE_BADGE_VISIBLE_IN_STATE="furniture_badge_visible_in_state",F.FURNITURE_ALPHA_MULTIPLIER="furniture_alpha_multiplier",F.FURNITURE_USAGE_POLICY="furniture_usage_policy",F.FURNITURE_OWNER_ID="furniture_owner_id",F.FURNITURE_OWNER_NAME="furniture_owner_name",F.FURNITURE_ROOM_BACKGROUND_COLOR_HUE="furniture_room_background_color_hue",F.FURNITURE_ROOM_BACKGROUND_COLOR_SATURATION="furniture_room_background_color_saturation",F.FURNITURE_ROOM_BACKGROUND_COLOR_LIGHTNESS="furniture_room_background_color_lightness",F.FURNITURE_USES_PLANE_MASK="furniture_uses_plane_mask",F.FURNITURE_PLANE_MASK_TYPE="furniture_plane_mask_type",F.FURNITURE_IS_VARIABLE_HEIGHT="furniture_is_variable_height",F.FURNITURE_VOTE_MAJORITY_RESULT="furniture_vote_majority_result",F.FURNITURE_VOTE_COUNTER_COUNT="furniture_vote_counter_count",F.FURNITURE_SOUNDBLOCK_RELATIVE_ANIMATION_SPEED="furniture_soundblock_relative_animation_speed",F.FURNITURE_MANNEQUIN_NAME="furniture_mannequin_name",F.FURNITURE_MANNEQUIN_GENDER="furniture_mannequin_gender",F.FURNITURE_MANNEQUIN_FIGURE="furniture_mannequin_figure",F.FURNITURE_HIGHSCORE_SCORE_TYPE="furniture_highscore_score_type",F.FURNITURE_HIGHSCORE_CLEAR_TYPE="furniture_highscore_clear_type",F.FURNITURE_HIGHSCORE_DATA_ENTRY_COUNT="furniture_highscore_data_entry_count",F.FURNITURE_HIGHSCORE_DATA_ENTRY_BASE_USERS_="furniture_highscore_data_entry_base_users_",F.FURNITURE_HIGHSCORE_DATA_ENTRY_BASE_SCORE_="furniture_highscore_data_entry_base_score_",F.FURNITURE_INTERNAL_LINK="furniture_internal_link",F.FURNITURE_CLOTHING_BOY="furniture_clothing_boy",F.FURNITURE_CLOTHING_GIRL="furniture_clothing_girl",F.FURNITURE_PLANETSYSTEM_DATA="furniture_planetsystem_data",F.FURNITURE_FIREWORKS_DATA="furniture_fireworks_data",F.PET_PALETTE_INDEX="pet_palette_index",F.PET_COLOR="pet_color",F.PET_HEAD_ONLY="pet_head_only",F.PET_CUSTOM_LAYER_IDS="pet_custom_layer_ids",F.PET_CUSTOM_PARTS_IDS="pet_custom_part_ids",F.PET_CUSTOM_PALETTE_IDS="pet_custom_palette_ids",F.PET_IS_RIDING="pet_is_riding",F.PET_TYPE="pet_type",F.PET_ALLOWED_DIRECTIONS="pet_allowed_directions",F.RACE="race",F.ROOM_MAP_DATA="room_map_data",F.ROOM_PLANE_MASK_XML="room_plane_mask_xml",F.ROOM_FLOOR_TYPE="room_floor_type",F.ROOM_WALL_TYPE="room_wall_type",F.ROOM_LANDSCAPE_TYPE="room_landscape_type",F.ROOM_WALL_THICKNESS="room_wall_thickness",F.ROOM_FLOOR_THICKNESS="room_floor_thickness",F.ROOM_FLOOR_HOLE_UPDATE_TIME="room_floor_hole_update_time",F.ROOM_FLOOR_VISIBILITY="room_floor_visibility",F.ROOM_WALL_VISIBILITY="room_wall_visibility",F.ROOM_LANDSCAPE_VISIBILITY="room_landscape_visibility",F.ROOM_DOOR_X="room_door_x",F.ROOM_DOOR_Y="room_door_y",F.ROOM_DOOR_Z="room_door_z",F.ROOM_DOOR_DIR="room_door_dir",F.ROOM_BACKGROUND_COLOR="room_background_color",F.ROOM_COLORIZE_BG_ONLY="room_colorize_bg_only",F.ROOM_RANDOM_SEED="room_random_seed",F.ROOM_WORLD_TYPE="room_world_type",F.ROOM_SELECTED_X="room_selected_x",F.ROOM_SELECTED_Y="room_selected_y",F.ROOM_SELECTED_Z="room_selected_z",F.ROOM_SELECTED_PLANE="room_selected_plane",F.IMAGE_QUERY_SCALE="image_query_scale",F.FURNITURE_FRIENDFURNI_ENGRAVING="furniture_friendfurni_engraving_type",F.SESSION_URL_PREFIX="session_url_prefix",F.SESSION_CURRENT_USER_ID="session_current_user_id";let b=F;const z2=class z2{};z2.UNIQUE_SET=256;let _R=z2;class hl{constructor(){this._flags=0,this._uniqueNumber=0,this._uniqueSeries=0}parseWrapper(e){(this._flags&_R.UNIQUE_SET)>0&&(this._uniqueNumber=e.readInt(),this._uniqueSeries=e.readInt())}initializeFromRoomObjectModel(e){this._uniqueNumber=e.getValue(b.FURNITURE_UNIQUE_SERIAL_NUMBER),this._uniqueSeries=e.getValue(b.FURNITURE_UNIQUE_EDITION_SIZE)}writeRoomObjectModel(e){e&&(e.setValue(b.FURNITURE_UNIQUE_SERIAL_NUMBER,this._uniqueNumber),e.setValue(b.FURNITURE_UNIQUE_EDITION_SIZE,this._uniqueSeries))}getLegacyString(){return""}compare(e){return!1}get state(){const e=parseInt(this.getLegacyString());return isNaN(e)?0:e}get isUnique(){return this._uniqueSeries>0}get uniqueNumber(){return this._uniqueNumber}set uniqueNumber(e){this._uniqueNumber=e}get uniqueSeries(){return this._uniqueSeries}set uniqueSeries(e){this._uniqueSeries=e}get rarityLevel(){return-1}get flags(){return this._flags}set flags(e){this._flags=e}}const fr=class fr{};fr.LEGACY_KEY=0,fr.MAP_KEY=1,fr.STRING_KEY=2,fr.VOTE_KEY=3,fr.EMPTY_KEY=4,fr.NUMBER_KEY=5,fr.HIGHSCORE_KEY=6,fr.CRACKABLE_KEY=7;let Hr=fr;const g1=class g1 extends hl{constructor(){super(),this._state="",this._hits=0,this._target=0}parseWrapper(e){e&&(this._state=e.readString(),this._hits=e.readInt(),this._target=e.readInt(),super.parseWrapper(e))}initializeFromRoomObjectModel(e){super.initializeFromRoomObjectModel(e),this._state=e.getValue(b.FURNITURE_CRACKABLE_STATE),this._hits=e.getValue(b.FURNITURE_CRACKABLE_HITS),this._target=e.getValue(b.FURNITURE_CRACKABLE_TARGET)}writeRoomObjectModel(e){super.writeRoomObjectModel(e),e.setValue(b.FURNITURE_DATA_FORMAT,g1.FORMAT_KEY),e.setValue(b.FURNITURE_CRACKABLE_STATE,this._state),e.setValue(b.FURNITURE_CRACKABLE_HITS,this._hits),e.setValue(b.FURNITURE_CRACKABLE_TARGET,this._target)}getLegacyString(){return this._state}compare(e){return!0}get hits(){return this._hits}get target(){return this._target}};g1.FORMAT_KEY=Hr.CRACKABLE_KEY;let Hm=g1;const p1=class p1 extends hl{parseWrapper(e){e&&(this._state="",super.parseWrapper(e))}writeRoomObjectModel(e){super.writeRoomObjectModel(e),e.setValue(b.FURNITURE_DATA_FORMAT,p1.FORMAT_KEY)}getLegacyString(){return this._state}compare(e){return super.compare(e)}};p1.FORMAT_KEY=Hr.EMPTY_KEY;let Wm=p1;class bP{constructor(){this._score=-1,this._users=[]}get score(){return this._score}set score(e){this._score=e}get users(){return this._users}set users(e){this._users=e}addUsername(e){this._users.push(e)}}const m1=class m1 extends hl{constructor(){super(),this._state="",this._scoreType=-1,this._clearType=-1,this._entries=[]}parseWrapper(e){if(!e)return;this._state=e.readString(),this._scoreType=e.readInt(),this._clearType=e.readInt();let t=e.readInt();for(;t>0;){const i=new bP;i.score=e.readInt();let n=e.readInt();for(;n>0;)i.addUsername(e.readString()),n--;this._entries.push(i),t--}super.parseWrapper(e)}initializeFromRoomObjectModel(e){this._scoreType=e.getValue(b.FURNITURE_HIGHSCORE_SCORE_TYPE),this._clearType=e.getValue(b.FURNITURE_HIGHSCORE_CLEAR_TYPE),this._entries=[];const t=e.getValue(b.FURNITURE_HIGHSCORE_DATA_ENTRY_COUNT);let i=0;for(;i(s.FLOOR="S",s.WALL="I",s.EFFECT="E",s.BADGE="B",s.ROBOT="R",s.HABBO_CLUB="H",s.PET="P",s))(du||{});const kd=class kd{};kd.MATCH_ALL_PIXELS=-1,kd.MATCH_OPAQUE_PIXELS=128,kd.MATCH_NOTHING=256;let tr=kd;const Qh=class Qh{};Qh.DEFAULT=1,Qh.ROOM_PLANE=2,Qh.AVATAR=3,Qh.AVATAR_OWN=4;let Js=Qh;class h4{}class M{constructor(e=0,t=0,i=0){this._x=e,this._y=t,this._z=i,this._length=NaN}static sum(e,t){return!e||!t?null:new M(e.x+t.x,e.y+t.y,e.z+t.z)}static dif(e,t){return!e||!t?null:new M(e.x-t.x,e.y-t.y,e.z-t.z)}static product(e,t){return e?new M(e.x*t,e.y*t,e.z*t):null}static dotProduct(e,t){return!e||!t?0:e.x*t.x+e.y*t.y+e.z*t.z}static crossProduct(e,t){return!e||!t?null:new M(e.y*t.z-e.z*t.y,e.z*t.x-e.x*t.z,e.x*t.y-e.y*t.x)}static scalarProjection(e,t){if(!e||!t)return-1;const i=t.length;return i>0?(e.x*t.x+e.y*t.y+e.z*t.z)/i:-1}static cosAngle(e,t){if(!e||!t)return 0;const i=e.length*t.length;return i?M.dotProduct(e,t)/i:0}static isEqual(e,t){return!(!e||!t||e.x!==t.x||e.y!==t.y||e.z!==t.z)}negate(){this._x=-this._x,this._y=-this._y,this._z=-this._z}add(e){e&&(this._x+=e.x,this._y+=e.y,this._z+=e.z,this._length=NaN)}subtract(e){e&&(this._x-=e.x,this._y-=e.y,this._z-=e.z,this._length=NaN)}multiply(e){this._x*=e,this._y*=e,this._z*=e,this._length=NaN}divide(e){e&&(this._x/=e,this._y/=e,this._z/=e,this._length=NaN)}assign(e){e&&(this._x=e.x,this._y=e.y,this._z=e.z,this._length=NaN)}get x(){return this._x}set x(e){this._x=e,this._length=NaN}get y(){return this._y}set y(e){this._y=e,this._length=NaN}get z(){return this._z}set z(e){this._z=e,this._length=NaN}get length(){return isNaN(this._length)&&(this._length=Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z)),this._length}toString(){return`[Vector3d: ${this._x}, ${this._y}, ${this._z}]`}}const jn=class jn{};jn.MOUSE_CLICK="click",jn.DOUBLE_CLICK="double_click",jn.MOUSE_MOVE="mousemove",jn.MOUSE_DOWN="mousedown",jn.MOUSE_DOWN_LONG="mousedown_long",jn.MOUSE_UP="mouseup",jn.ROLL_OVER="mouseover",jn.ROLL_OUT="mouseout",jn.RIGHT_CLICK="contextmenu";let ue=jn;const Yl=class Yl{};Yl.TOUCH_START="touchstart",Yl.TOUCH_MOVE="touchmove",Yl.TOUCH_CANCEL="touchcancel",Yl.TOUCH_END="touchend",Yl.TOUCH_LONG="touchlong";let AP=Yl;const Ti=class Ti{constructor(e){this._ordinal=e}get ordinal(){return this._ordinal}equals(e){return e&&e._ordinal==this._ordinal}};Ti.NONE=new Ti(0),Ti.WAVE=new Ti(1),Ti.BLOW=new Ti(2),Ti.LAUGH=new Ti(3),Ti.CRY=new Ti(4),Ti.IDLE=new Ti(5),Ti.JUMP=new Ti(6),Ti.RESPECT=new Ti(7);let OP=Ti;const zn=class zn{};zn.DUMMY="DUMMY",zn.FRIEND_FURNITURE="FRIEND_FURNITURE",zn.MONSTERPLANT_SEED="MONSTERPLANT_SEED",zn.MYSTERY_BOX="MYSTERY_BOX",zn.EFFECT_BOX="EFFECT_BOX",zn.MYSTERY_TROPHY="MYSTERY_TROPHY",zn.RANDOM_TELEPORT="RANDOM_TELEPORT",zn.PURCHASABLE_CLOTHING="PURCHASABLE_CLOTHING",zn.GENERIC_USABLE="GENERIC_USABLE";let Wr=zn;const Xl=class Xl{};Xl.LOVE_LOCK=0,Xl.CARVE_A_TREE=1,Xl.FRIENDS_PORTRAIT=2,Xl.WILD_WEST_WANTED=3,Xl.HABBOWEEN=4;let wP=Xl;const pe=class pe{};pe.CHAT_WIDGET="RWE_CHAT_WIDGET",pe.INFOSTAND="RWE_INFOSTAND",pe.ME_MENU="RWE_ME_MENU",pe.CHAT_INPUT_WIDGET="RWE_CHAT_INPUT_WIDGET",pe.FURNI_PLACEHOLDER="RWE_FURNI_PLACEHOLDER",pe.FURNI_CREDIT_WIDGET="RWE_FURNI_CREDIT_WIDGET",pe.FURNI_STICKIE_WIDGET="RWE_FURNI_STICKIE_WIDGET",pe.FURNI_TROPHY_WIDGET="RWE_FURNI_TROPHY_WIDGET",pe.FURNI_LOVELOCK_WIDGET="RWE_FURNI_LOVELOCK_WIDGET",pe.FURNI_PRESENT_WIDGET="RWE_FURNI_PRESENT_WIDGET",pe.FURNI_ECOTRONBOX_WIDGET="RWE_FURNI_ECOTRONBOX_WIDGET",pe.FURNI_PET_PACKAGE_WIDGET="RWE_FURNI_PET_PACKAGE_WIDGET",pe.PLAYLIST_EDITOR_WIDGET="RWE_PLAYLIST_EDITOR_WIDGET",pe.DOORBELL="RWE_DOORBELL",pe.LOADINGBAR="RWE_LOADINGBAR",pe.ROOM_QUEUE="RWE_ROOM_QUEUE",pe.ROOM_POLL="RWE_ROOM_POLL",pe.ROOM_VOTE="RWE_ROOM_VOTE",pe.USER_CHOOSER="RWE_USER_CHOOSER",pe.FURNI_CHOOSER="RWE_FURNI_CHOOSER",pe.ROOM_DIMMER="RWE_ROOM_DIMMER",pe.FRIEND_REQUEST="RWE_FRIEND_REQUEST",pe.CLOTHING_CHANGE="RWE_CLOTHING_CHANGE",pe.CONVERSION_TRACKING="RWE_CONVERSION_TRACKING",pe.USER_NOTIFICATION="RWE_USER_NOTIFICATION",pe.FRIENDS_BAR="RWE_FRIENDS_BAR",pe.PURSE_WIDGET="RWE_PURSE_WIDGET",pe.AVATAR_INFO="RWE_AVATAR_INFO",pe.WELCOME_GIFT="RWE_WELCOME_GIFT",pe.SPAMWALL_POSTIT_WIDGET="RWE_SPAMWALL_POSTIT_WIDGET",pe.EFFECTS="RWE_EFFECTS",pe.MANNEQUIN="RWE_MANNEQUIN",pe.FURNITURE_CONTEXT_MENU="RWE_FURNITURE_CONTEXT_MENU",pe.LOCATION_WIDGET="RWE_LOCATION_WIDGET",pe.CAMERA="RWE_CAMERA",pe.ROOM_THUMBNAIL_CAMERA="RWE_ROOM_THUMBNAIL_CAMERA",pe.ROOM_BACKGROUND_COLOR="RWE_ROOM_BACKGROUND_COLOR",pe.CUSTOM_USER_NOTIFICATION="RWE_CUSTOM_USER_NOTIFICATION",pe.FURNI_ACHIEVEMENT_RESOLUTION_ENGRAVING="RWE_FURNI_ACHIEVEMENT_RESOLUTION_ENGRAVING",pe.FRIEND_FURNI_CONFIRM="RWE_FRIEND_FURNI_CONFIRM",pe.FRIEND_FURNI_ENGRAVING="RWE_FRIEND_FURNI_ENGRAVING",pe.HIGH_SCORE_DISPLAY="RWE_HIGH_SCORE_DISPLAY",pe.INTERNAL_LINK="RWE_INTERNAL_LINK",pe.CUSTOM_STACK_HEIGHT="RWE_CUSTOM_STACK_HEIGHT",pe.YOUTUBE="RWE_YOUTUBE",pe.RENTABLESPACE="RWE_RENTABLESPACE",pe.VIMEO="RWE_VIMEO",pe.ROOM_TOOLS="RWE_ROOM_TOOLS",pe.EXTERNAL_IMAGE="RWE_EXTERNAL_IMAGE",pe.WORD_QUIZZ="RWE_WORD_QUIZZ",pe.UI_HELP_BUBBLE="RWE_UI_HELP_BUBBLE",pe.ROOM_LINK="RWE_ROOM_LINK",pe.CRAFTING="RWE_CRAFTING",pe.ROOMGAME_CHECKERS="RWE_GAME_CHECKERS";let Xm=pe;const ia=class ia{};ia.INFOSTAND_EXTRA_PARAM="RWEIEP_INFOSTAND_EXTRA_PARAM",ia.JUKEBOX="RWEIEP_JUKEBOX",ia.USABLE_PRODUCT="RWEIEP_USABLE_PRODUCT",ia.SONGDISK="RWEIEP_SONGDISK",ia.CRACKABLE_FURNI="RWEIEP_CRACKABLE_FURNI",ia.BRANDING_OPTIONS="RWEIEP_BRANDING_OPTIONS",ia.USABLE="RWEIEP_USABLE";let Fs=ia;const xd=class xd{};xd.NOBODY=0,xd.CONTROLLER=1,xd.EVERYBODY=2;let CP=xd;const Dd=class Dd{};Dd.NORMAL=0,Dd.GENERIC=1,Dd.BOT=2;let xl=Dd;class Bs{constructor(){this._isDisposed=!1,this._isDisposing=!1}dispose(){this._isDisposed||this._isDisposing||(this._isDisposing=!0,this.onDispose(),this._isDisposed=!0,this._isDisposing=!1)}onDispose(){}get disposed(){return this._isDisposed}get isDisposing(){return this._isDisposing}}class fn extends Bs{constructor(){super(),this._listeners=new Map}onDispose(){this.removeAllListeners(),super.onDispose()}addEventListener(e,t){if(!e||!t)return;const i=this._listeners.get(e);if(!i){this._listeners.set(e,[t]);return}i.push(t)}removeEventListener(e,t){if(!e||!t)return;const i=this._listeners.get(e);if(!(!i||!i.length)){for(const[n,r]of i.entries())if(!(!r||r!==t)){i.splice(n,1),i.length||this._listeners.delete(e);return}}}dispatchEvent(e){return e?(le.events("Dispatched Event",e.type),this.processEvent(e),!0):!1}processEvent(e){const t=this._listeners.get(e.type);if(!t||!t.length)return;const i=[];for(const n of t)n&&i.push(n);for(;i.length;){const n=i.shift();try{n(e)}catch(r){le.error(r.stack);return}}}removeAllListeners(){this._listeners.clear()}}class Yr extends Bs{constructor(){super(),this._events=new fn,this._isLoaded=!1,this._isLoading=!1}init(){this._isLoaded||this._isLoading||this.isDisposing||(this._isLoading=!0,this.onInit(),this._isLoaded=!0,this._isLoading=!1)}onInit(){}onDispose(){this._events&&this._events.dispose(),super.onDispose()}reload(){this.dispose(),this.init()}get events(){return this._events}get isLoaded(){return this._isLoaded}get isLoading(){return this._isLoading}}class tQ{constructor(e){this._value=e}get value(){return this._value}}class iQ{constructor(e,t){this._header=e,this._buffer=t}readBytes(e){return this._buffer?this._buffer.readBytes(e):null}readByte(){return this._buffer?this._buffer.readByte():-1}readBoolean(){return this.readByte()===1}readShort(){return this._buffer?this._buffer.readShort():-1}readInt(){return this._buffer?this._buffer.readInt():-1}readFloat(){return this._buffer?this._buffer.readFloat():-1}readDouble(){return this._buffer?this._buffer.readDouble():-1}readString(){const e=this.readShort();return this._buffer.readBytes(e).toString("utf8")}get header(){return this._header}get bytesAvailable(){return this._buffer&&this._buffer.remaining()>0}}class sQ{constructor(e){this._value=e}get value(){return this._value}}class nQ{encode(e,t){const i=new zN;i.writeShort(e);for(const r of t){let a=typeof r;switch(a==="object"&&(r===null?a="null":r instanceof tQ?a="byte":r instanceof sQ?a="short":r instanceof ArrayBuffer&&(a="arraybuffer")),a){case"undefined":case"null":i.writeShort(0);break;case"byte":i.writeByte(r.value);break;case"short":i.writeShort(r.value);break;case"number":i.writeInt(r);break;case"boolean":i.writeByte(r?1:0);break;case"string":r?i.writeString(r,!0):i.writeShort(0);break;case"arraybuffer":i.writeBytes(r);break}}const n=i.getBuffer();return n?new zN().writeInt(n.byteLength).writeBytes(n):null}decode(e){if(!e||!e.dataBuffer||!e.dataBuffer.byteLength)return null;const t=[];for(;e.dataBuffer.byteLength&&!(e.dataBuffer.byteLength<4);){const i=new E0(e.dataBuffer),n=i.readInt();if(n>e.dataBuffer.byteLength-4)break;const r=i.readBytes(n);t.push(new iQ(r.readShort(),r)),e.dataBuffer=e.dataBuffer.slice(n+4)}return t}}class A{constructor(e,t){this._callBack=e,this._parserClass=t,this._parser=null,this._connection=null}dispose(){this._callBack=null,this._parserClass=null,this._parser=null,this._connection=null}get callBack(){return this._callBack}get parserClass(){return this._parserClass}get parser(){return this._parser}set parser(e){this._parser=e}get connection(){return this._connection}set connection(e){this._connection=e}}class Ye{constructor(e){this._type=e}get type(){return this._type}}const Zh=class Zh extends Ye{constructor(e,t,i){super(e),this._connection=t,this._originalEvent=event}get connection(){return this._connection}get originalEvent(){return this._originalEvent}};Zh.CONNECTION_OPENED="SCE_OPEN",Zh.CONNECTION_CLOSED="SCE_CLOSED",Zh.CONNECTION_ERROR="SCE_ERROR",Zh.CONNECTION_MESSAGE="SCE_MESSAGE";let wi=Zh;const H2=class H2 extends Ye{constructor(e,t){super(e),this._library=t}get library(){return this._library}};H2.DOWNLOAD_COMPLETE="ARELE_DOWNLOAD_COMPLETE";let _u=H2;const W2=class W2{};W2.AVATAR_RENDER_READY="AVATAR_RENDER_READY";let G_=W2;const Y2=class Y2 extends Ye{constructor(e,t){super(e),this._library=t}get library(){return this._library}};Y2.DOWNLOAD_COMPLETE="ARLE_DOWNLOAD_COMPLETE";let gu=Y2;const X2=class X2 extends Ye{constructor(e){super(e)}};X2.INITIALIZED="RCWM_INITIALIZED";let Km=X2;const sa=class sa extends Ye{constructor(e,t){super(e),this._connection=t}get connection(){return this._connection}};sa.CONNECTION_ESTABLISHED="NCE_ESTABLISHED",sa.CONNECTION_CLOSED="NCE_CLOSED",sa.CONNECTION_ERROR="NCE_ERROR",sa.CONNECTION_HANDSHAKING="NCE_HANDSHAKING",sa.CONNECTION_HANDSHAKED="NCE_HANDSHAKED",sa.CONNECTION_HANDSHAKE_FAILED="NCE_HANDSHAKE_FAILED",sa.CONNECTION_AUTHENTICATED="NCE_AUTHENTICATED";let bn=sa;const I1=class I1 extends Ye{constructor(e){super(e)}};I1.LOADED="NLE_LOADED",I1.FAILED="NLE_FAILED";let wh=I1;const Ld=class Ld extends Ye{constructor(){super(Ld.SETTINGS_UPDATED)}clone(){const e=new Ld;return e._volumeSystem=this._volumeSystem,e._volumeFurni=this._volumeFurni,e._volumeTrax=this._volumeTrax,e._oldChat=this._oldChat,e._roomInvites=this._roomInvites,e._cameraFollow=this._cameraFollow,e._flags=this._flags,e._chatType=this._chatType,e}get volumeSystem(){return this._volumeSystem}set volumeSystem(e){this._volumeSystem=e}get volumeFurni(){return this._volumeFurni}set volumeFurni(e){this._volumeFurni=e}get volumeTrax(){return this._volumeTrax}set volumeTrax(e){this._volumeTrax=e}get oldChat(){return this._oldChat}set oldChat(e){this._oldChat=e}get roomInvites(){return this._roomInvites}set roomInvites(e){this._roomInvites=e}get cameraFollow(){return this._cameraFollow}set cameraFollow(e){this._cameraFollow=e}get flags(){return this._flags}set flags(e){this._flags=e}get chatType(){return this._chatType}set chatType(e){this._chatType=e}};Ld.SETTINGS_UPDATED="NSE_SETTINGS_UPDATED";let Su=Ld;const K2=class K2 extends Ye{constructor(e,t){super(e),this._sampleCode=t}get sampleCode(){return this._sampleCode}};K2.PLAY_SOUND="NSOE_PLAY_SOUND";let hd=K2;const R1=class R1 extends Ye{constructor(e){super(e)}get iconId(){return this._iconId}set iconId(e){this._iconId=e}get iconName(){return this._iconName}set iconName(e){this._iconName=e}};R1.TOOLBAR_CLICK="NTE_TOOLBAR_CLICK",R1.SELECT_OWN_AVATAR="NTE_SELECT_OWN_AVATAR";let vR=R1;const S1=class S1 extends vR{constructor(e,t,i){super(S1.ANIMATE_ICON),this._image=e,this._x=t,this._y=i}get image(){return this._image}get x(){return this._x}get y(){return this._y}};S1.ANIMATE_ICON="NTAIE_ANIMATE_ICON";let qm=S1;const na=class na extends Ye{constructor(e,t){super(e),this._roomId=t}get roomId(){return this._roomId}};na.INITIALIZED="REE_INITIALIZED",na.ENGINE_INITIALIZED="REE_ENGINE_INITIALIZED",na.OBJECTS_INITIALIZED="REE_OBJECTS_INITIALIZED",na.NORMAL_MODE="REE_NORMAL_MODE",na.GAME_MODE="REE_GAME_MODE",na.ROOM_ZOOMED="REE_ROOM_ZOOMED",na.DISPOSED="REE_DISPOSED";let ft=na;const b1=class b1 extends ft{constructor(e,t,i,n){super(b1.ROOM_COLOR,e),this._color=t,this._brightness=i,this._bgOnly=n}get color(){return this._color}get brightness(){return this._brightness}get bgOnly(){return this._bgOnly}};b1.ROOM_COLOR="REE_ROOM_COLOR";let ER=b1;const Ud=class Ud extends Ye{constructor(e,t){super(e),this._contentType=t}get contentType(){return this._contentType}};Ud.RCLE_SUCCESS="RCLE_SUCCESS",Ud.RCLE_FAILURE="RCLE_FAILURE",Ud.RCLE_CANCEL="RCLE_CANCEL";let ba=Ud;const A1=class A1 extends ft{constructor(e,t,i){super(A1.ROOM_DRAG,e),this._offsetX=t,this._offsetY=i}get offsetX(){return this._offsetX}get offsetY(){return this._offsetY}};A1.ROOM_DRAG="RDE_ROOM_DRAG";let yR=A1;const O1=class O1 extends ft{constructor(e,t,i,n,r,a){super(O1.ROOM_COLOR,e),this._state=t,this._presetId=i,this._effectId=n,this._color=r,this._brightness=a}get state(){return this._state}get presetId(){return this._presetId}get effectId(){return this._effectId}get color(){return this._color}get brightness(){return this._brightness}};O1.ROOM_COLOR="REDSE_ROOM_COLOR";let TR=O1;const ns=class ns extends ft{constructor(e,t,i,n){super(e,t),this._objectId=i,this._category=n}get objectId(){return this._objectId}get category(){return this._category}};ns.SELECTED="REOE_SELECTED",ns.DESELECTED="REOE_DESELECTED",ns.ADDED="REOE_ADDED",ns.REMOVED="REOE_REMOVED",ns.PLACED="REOE_PLACED",ns.PLACED_ON_USER="REOE_PLACED_ON_USER",ns.CONTENT_UPDATED="REOE_CONTENT_UPDATED",ns.REQUEST_MOVE="REOE_REQUEST_MOVE",ns.REQUEST_ROTATE="REOE_REQUEST_ROTATE",ns.REQUEST_MANIPULATION="REOE_REQUEST_MANIPULATION",ns.MOUSE_ENTER="REOE_MOUSE_ENTER",ns.MOUSE_LEAVE="REOE_MOUSE_LEAVE",ns.DOUBLE_CLICK="REOE_DOUBLE_CLICK";let Se=ns;class rQ extends Se{constructor(e,t,i,n,r,a,o,l,u,c,h,f,d){super(e,t,i,n),this._wallLocation="",this._x=0,this._y=0,this._z=0,this._direction=0,this._placedInRoom=!1,this._placedOnFloor=!1,this._placedOnWall=!1,this._instanceData=null,this._wallLocation=r,this._x=a,this._y=o,this._z=l,this._direction=u,this._placedInRoom=c,this._placedOnFloor=h,this._placedOnWall=f,this._instanceData=d}get wallLocation(){return this._wallLocation}get x(){return this._x}get y(){return this._y}get z(){return this._z}get direction(){return this._direction}get placedInRoom(){return this._placedInRoom}get placedOnFloor(){return this._placedOnFloor}get placedOnWall(){return this._placedOnWall}get instanceData(){return this._instanceData}}class aQ extends Se{constructor(e,t,i,n,r,a){super(e,t,i,n),this._droppedObjectId=r,this._droppedObjectCategory=a}get droppedObjectId(){return this._droppedObjectId}get droppedObjectCategory(){return this._droppedObjectCategory}}const w1=class w1 extends Se{constructor(e,t,i,n,r,a=1){super(e,t,i,n),this._soundId=r,this._pitch=a}get soundId(){return this._soundId}get pitch(){return this._pitch}};w1.PLAY_SOUND="REOPSE_PLAY_SOUND",w1.PLAY_SOUND_AT_PITCH="REOPSE_PLAY_SOUND_AT_PITCH";let Ch=w1;const Jh=class Jh extends Se{};Jh.FURNI_CLICK="RERAE_FURNI_CLICK",Jh.FURNI_DOUBLE_CLICK="RERAE_FURNI_DOUBLE_CLICK",Jh.TOOLTIP_SHOW="RERAE_TOOLTIP_SHOW",Jh.TOOLTIP_HIDE="RERAE_TOOLTIP_HIDE";let Mh=Jh;const ec=class ec extends Se{constructor(e,t,i,n,r,a=1){super(e,t,i,n),this._sampleId=r,this._pitch=a}get sampleId(){return this._sampleId}get pitch(){return this._pitch}};ec.ROOM_OBJECT_INITIALIZED="ROPSPE_ROOM_OBJECT_INITIALIZED",ec.ROOM_OBJECT_DISPOSED="ROPSPE_ROOM_OBJECT_DISPOSED",ec.PLAY_SAMPLE="ROPSPE_PLAY_SAMPLE",ec.CHANGE_PITCH="ROPSPE_CHANGE_PITCH";let $s=ec;const Je=class Je extends Se{constructor(e,t,i,n,r=null){super(e,t,i,n),this._widget=r}get widget(){return this._widget}get contextMenu(){return this._widget}};Je.OPEN_WIDGET="RETWE_OPEN_WIDGET",Je.CLOSE_WIDGET="RETWE_CLOSE_WIDGET",Je.OPEN_FURNI_CONTEXT_MENU="RETWE_OPEN_FURNI_CONTEXT_MENU",Je.CLOSE_FURNI_CONTEXT_MENU="RETWE_CLOSE_FURNI_CONTEXT_MENU",Je.REQUEST_PLACEHOLDER="RETWE_REQUEST_PLACEHOLDER",Je.REQUEST_CREDITFURNI="RETWE_REQUEST_CREDITFURNI",Je.REQUEST_STACK_HEIGHT="RETWE_REQUEST_STACK_HEIGHT",Je.REQUEST_EXTERNAL_IMAGE="RETWE_REQUEST_EXTERNAL_IMAGE",Je.REQUEST_STICKIE="RETWE_REQUEST_STICKIE",Je.REQUEST_PRESENT="RETWE_REQUEST_PRESENT",Je.REQUEST_TROPHY="RETWE_REQUEST_TROPHY",Je.REQUEST_TEASER="RETWE_REQUEST_TEASER",Je.REQUEST_ECOTRONBOX="RETWE_REQUEST_ECOTRONBOX",Je.REQUEST_DIMMER="RETWE_REQUEST_DIMMER",Je.REMOVE_DIMMER="RETWE_REMOVE_DIMMER",Je.REQUEST_CLOTHING_CHANGE="RETWE_REQUEST_CLOTHING_CHANGE",Je.REQUEST_PLAYLIST_EDITOR="RETWE_REQUEST_PLAYLIST_EDITOR",Je.REQUEST_MANNEQUIN="RETWE_REQUEST_MANNEQUIN",Je.REQUEST_MONSTERPLANT_SEED_PLANT_CONFIRMATION_DIALOG="ROWRE_REQUEST_MONSTERPLANT_SEED_PLANT_CONFIRMATION_DIALOG",Je.REQUEST_PURCHASABLE_CLOTHING_CONFIRMATION_DIALOG="ROWRE_REQUEST_PURCHASABLE_CLOTHING_CONFIRMATION_DIALOG",Je.REQUEST_BACKGROUND_COLOR="RETWE_REQUEST_BACKGROUND_COLOR",Je.REQUEST_MYSTERYBOX_OPEN_DIALOG="RETWE_REQUEST_MYSTERYBOX_OPEN_DIALOG",Je.REQUEST_EFFECTBOX_OPEN_DIALOG="RETWE_REQUEST_EFFECTBOX_OPEN_DIALOG",Je.REQUEST_MYSTERYTROPHY_OPEN_DIALOG="RETWE_REQUEST_MYSTERYTROPHY_OPEN_DIALOG",Je.REQUEST_ACHIEVEMENT_RESOLUTION_ENGRAVING="RETWE_REQUEST_ACHIEVEMENT_RESOLUTION_ENGRAVING",Je.REQUEST_ACHIEVEMENT_RESOLUTION_FAILED="RETWE_REQUEST_ACHIEVEMENT_RESOLUTION_FAILED",Je.REQUEST_FRIEND_FURNITURE_CONFIRM="RETWE_REQUEST_FRIEND_FURNITURE_CONFIRM",Je.REQUEST_FRIEND_FURNITURE_ENGRAVING="RETWE_REQUEST_FRIEND_FURNITURE_ENGRAVING",Je.REQUEST_BADGE_DISPLAY_ENGRAVING="RETWE_REQUEST_BADGE_DISPLAY_ENGRAVING",Je.REQUEST_HIGH_SCORE_DISPLAY="RETWE_REQUEST_HIGH_SCORE_DISPLAY",Je.REQUEST_HIDE_HIGH_SCORE_DISPLAY="RETWE_REQUEST_HIDE_HIGH_SCORE_DISPLAY",Je.REQUEST_INTERNAL_LINK="RETWE_REQUEST_INTERNAL_LINK",Je.REQUEST_ROOM_LINK="RETWE_REQUEST_ROOM_LINK",Je.REQUEST_YOUTUBE="RETWE_REQUEST_YOUTUBE";let se=Je;const C1=class C1 extends Se{constructor(e,t,i,n,r=-1,a=-1){super(e,t,i,n),this._inventoryStripId=r,this._furnitureTypeId=a}get inventoryStripId(){return this._inventoryStripId}get furnitureTypeId(){return this._furnitureTypeId}};C1.USE_PRODUCT_FROM_ROOM="REUPE_USE_PRODUCT_FROM_ROOM",C1.USE_PRODUCT_FROM_INVENTORY="REUPE_USE_PRODUCT_FROM_INVENTORY";let $m=C1;class Fn extends Ye{constructor(e,t){super(e),this._object=t}get object(){return this._object}get objectId(){return this._object?this._object.id:-1}get objectType(){return this._object?this._object.type:null}}const q2=class q2 extends Fn{constructor(e,t,i,n=!0){super(e,t),this._badgeId=i,this._groupBadge=n}get badgeId(){return this._badgeId}get groupBadge(){return this._groupBadge}};q2.LOAD_BADGE="ROBAE_LOAD_BADGE";let ir=q2;const M1=class M1 extends Fn{constructor(e,t){super(e,t)}};M1.RODRE_CURRENT_USER_ID="RODRE_CURRENT_USER_ID",M1.RODRE_URL_PREFIX="RODRE_URL_PREFIX";let Mn=M1;const N1=class N1 extends Fn{constructor(e,t,i,n,r,a){super(N1.DIMMER_STATE,e),this._state=t,this._presetId=i,this._effectId=n,this._color=r,this._brightness=a}get state(){return this._state}get presetId(){return this._presetId}get effectId(){return this._effectId}get color(){return this._color}get brightness(){return this._brightness}};N1.DIMMER_STATE="RODSUE_DIMMER_STATE";let bu=N1;const P1=class P1 extends Fn{constructor(e,t){super(e,t)}};P1.ADD_HOLE="ROFHO_ADD_HOLE",P1.REMOVE_HOLE="ROFHO_REMOVE_HOLE";let qi=P1;const xi=class xi extends Fn{};xi.DICE_OFF="ROFCAE_DICE_OFF",xi.DICE_ACTIVATE="ROFCAE_DICE_ACTIVATE",xi.USE_HABBOWHEEL="ROFCAE_USE_HABBOWHEEL",xi.STICKIE="ROFCAE_STICKIE",xi.ENTER_ONEWAYDOOR="ROFCAE_ENTER_ONEWAYDOOR",xi.SOUND_MACHINE_INIT="ROFCAE_SOUND_MACHINE_INIT",xi.SOUND_MACHINE_START="ROFCAE_SOUND_MACHINE_START",xi.SOUND_MACHINE_STOP="ROFCAE_SOUND_MACHINE_STOP",xi.SOUND_MACHINE_DISPOSE="ROFCAE_SOUND_MACHINE_DISPOSE",xi.JUKEBOX_INIT="ROFCAE_JUKEBOX_INIT",xi.JUKEBOX_START="ROFCAE_JUKEBOX_START",xi.JUKEBOX_MACHINE_STOP="ROFCAE_JUKEBOX_MACHINE_STOP",xi.JUKEBOX_DISPOSE="ROFCAE_JUKEBOX_DISPOSE",xi.MOUSE_BUTTON="ROFCAE_MOUSE_BUTTON",xi.MOUSE_ARROW="ROFCAE_MOUSE_ARROW";let X=xi;const $2=class $2 extends ft{constructor(e,t,i,n,r,a){super(e,t),this._enable=i,this._hue=n,this._saturation=r,this._lightness=a}get enable(){return this._enable}get hue(){return this._hue}get saturation(){return this._saturation}get lightness(){return this._lightness}};$2.ROOM_BACKGROUND_COLOR="ROHSLCEE_ROOM_BACKGROUND_COLOR";let Qm=$2;const Q2=class Q2 extends Fn{constructor(e,t,i,n,r,a){super(e,t),this._enable=i,this._hue=n,this._saturation=r,this._lightness=a}get enable(){return this._enable}get hue(){return this._hue}get saturation(){return this._saturation}get lightness(){return this._lightness}};Q2.ROOM_BACKGROUND_COLOR="ROHSLCEE_ROOM_BACKGROUND_COLOR";let ma=Q2;const dr=class dr extends Fn{constructor(e,t,i,n=!1,r=!1,a=!1,o=!1){super(e,t),this._eventId="",this._eventId=i,this._altKey=n,this._ctrlKey=r,this._shiftKey=a,this._buttonDown=o}get eventId(){return this._eventId}get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get shiftKey(){return this._shiftKey}get buttonDown(){return this._buttonDown}get localX(){return this._localX}set localX(e){this._localX=e}get localY(){return this._localY}set localY(e){this._localY=e}get spriteOffsetX(){return this._spriteOffsetX}set spriteOffsetX(e){this._spriteOffsetX=e}get spriteOffsetY(){return this._spriteOffsetY}set spriteOffsetY(e){this._spriteOffsetY=e}};dr.CLICK="ROE_MOUSE_CLICK",dr.DOUBLE_CLICK="ROE_MOUSE_DOUBLE_CLICK",dr.MOUSE_MOVE="ROE_MOUSE_MOVE",dr.MOUSE_DOWN="ROE_MOUSE_DOWN",dr.MOUSE_DOWN_LONG="ROE_MOUSE_DOWN_LONG",dr.MOUSE_UP="ROE_MOUSE_UP",dr.MOUSE_ENTER="ROE_MOUSE_ENTER",dr.MOUSE_LEAVE="ROE_MOUSE_LEAVE";let Ee=dr;const k1=class k1 extends Fn{constructor(e,t){super(e,t)}};k1.POSITION_CHANGED="ROME_POSITION_CHANGED",k1.OBJECT_REMOVED="ROME_OBJECT_REMOVED";let es=k1;const x1=class x1 extends X{constructor(e,t,i,n=1){super(e,t),this._soundId=i,this._pitch=n}get soundId(){return this._soundId}get pitch(){return this._pitch}};x1.PLAY_SOUND="ROPSIE_PLAY_SOUND",x1.PLAY_SOUND_AT_PITCH="ROPSIE_PLAY_SOUND_AT_PITCH";let Aa=x1;const Kl=class Kl extends Fn{constructor(e,t,i="",n=""){super(e,t),this._imageUrl="",this._clickUrl="",this._imageUrl=i,this._clickUrl=n}get imageUrl(){return this._imageUrl}get clickUrl(){return this._clickUrl}};Kl.ROOM_AD_LOAD_IMAGE="RORAE_ROOM_AD_LOAD_IMAGE",Kl.ROOM_AD_FURNI_CLICK="RORAE_ROOM_AD_FURNI_CLICK",Kl.ROOM_AD_FURNI_DOUBLE_CLICK="RORAE_ROOM_AD_FURNI_DOUBLE_CLICK",Kl.ROOM_AD_TOOLTIP_SHOW="RORAE_ROOM_AD_TOOLTIP_SHOW",Kl.ROOM_AD_TOOLTIP_HIDE="RORAE_ROOM_AD_TOOLTIP_HIDE";let Rt=Kl;const tc=class tc extends Fn{constructor(e,t,i,n=1){super(e,t),this._sampleId=i,this._pitch=n}get sampleId(){return this._sampleId}get pitch(){return this._pitch}};tc.ROOM_OBJECT_INITIALIZED="ROPSPE_ROOM_OBJECT_INITIALIZED",tc.ROOM_OBJECT_DISPOSED="ROPSPE_ROOM_OBJECT_DISPOSED",tc.PLAY_SAMPLE="ROPSPE_PLAY_SAMPLE",tc.CHANGE_PITCH="ROPSPE_CHANGE_PITCH";let Zt=tc;const _r=class _r extends Se{};_r.SOUND_MACHINE_INIT="ROSM_SOUND_MACHINE_INIT",_r.SOUND_MACHINE_SWITCHED_ON="ROSM_SOUND_MACHINE_SWITCHED_ON",_r.SOUND_MACHINE_SWITCHED_OFF="ROSM_SOUND_MACHINE_SWITCHED_OFF",_r.SOUND_MACHINE_DISPOSE="ROSM_SOUND_MACHINE_DISPOSE",_r.JUKEBOX_INIT="ROSM_JUKEBOX_INIT",_r.JUKEBOX_SWITCHED_ON="ROSM_JUKEBOX_SWITCHED_ON",_r.JUKEBOX_SWITCHED_OFF="ROSM_JUKEBOX_SWITCHED_OFF",_r.JUKEBOX_DISPOSE="ROSM_JUKEBOX_DISPOSE";let Ot=_r;const D1=class D1 extends Fn{constructor(e,t,i=0){super(e,t),this._state=i}get state(){return this._state}};D1.STATE_CHANGE="ROSCE_STATE_CHANGE",D1.STATE_RANDOM="ROSCE_STATE_RANDOM";let We=D1;class Qr extends Ee{constructor(e,t,i,n,r,a,o=!1,l=!1,u=!1,c=!1){super(e,t,i,o,l,u,c),this._tileX=n,this._tileY=r,this._tileZ=a}get tileX(){return this._tileX}get tileY(){return this._tileY}get tileZ(){return this._tileZ}get tileXAsInt(){return Math.trunc(this._tileX+.499)}get tileYAsInt(){return Math.trunc(this._tileY+.499)}get tileZAsInt(){return Math.trunc(this._tileZ+.499)}}class hh extends Ee{constructor(e,t,i,n,r,a,o,l,u,c=!1,h=!1,f=!1,d=!1){super(e,t,i,c,h,f,d),this._wallLocation=new M,this._wallWd=new M,this._wallHt=new M,this._wallLocation.assign(n),this._wallWd.assign(r),this._wallHt.assign(a),this._x=o,this._y=l,this._direction=u}get wallLocation(){return this._wallLocation}get wallWidth(){return this._wallWd}get wallHeight(){return this._wallHt}get x(){return this._x}get y(){return this._y}get direction(){return this._direction}}const ze=class ze extends Fn{constructor(e,t){super(e,t)}};ze.OPEN_WIDGET="ROWRE_OPEN_WIDGET",ze.CLOSE_WIDGET="ROWRE_CLOSE_WIDGET",ze.OPEN_FURNI_CONTEXT_MENU="ROWRE_OPEN_FURNI_CONTEXT_MENU",ze.CLOSE_FURNI_CONTEXT_MENU="ROWRE_CLOSE_FURNI_CONTEXT_MENU",ze.PLACEHOLDER="ROWRE_PLACEHOLDER",ze.CREDITFURNI="ROWRE_CREDITFURNI",ze.STACK_HEIGHT="ROWRE_STACK_HEIGHT",ze.EXTERNAL_IMAGE="ROWRE_EXTERNAL_IMAGE",ze.STICKIE="ROWRE_STICKIE",ze.PRESENT="ROWRE_PRESENT",ze.TROPHY="ROWRE_TROPHY",ze.TEASER="ROWRE_TEASER",ze.ECOTRONBOX="ROWRE_ECOTRONBOX",ze.DIMMER="ROWRE_DIMMER",ze.WIDGET_REMOVE_DIMMER="ROWRE_WIDGET_REMOVE_DIMMER",ze.CLOTHING_CHANGE="ROWRE_CLOTHING_CHANGE",ze.JUKEBOX_PLAYLIST_EDITOR="ROWRE_JUKEBOX_PLAYLIST_EDITOR",ze.MANNEQUIN="ROWRE_MANNEQUIN",ze.PET_PRODUCT_MENU="ROWRE_PET_PRODUCT_MENU",ze.GUILD_FURNI_CONTEXT_MENU="ROWRE_GUILD_FURNI_CONTEXT_MENU",ze.MONSTERPLANT_SEED_PLANT_CONFIRMATION_DIALOG="ROWRE_MONSTERPLANT_SEED_PLANT_CONFIRMATION_DIALOG",ze.PURCHASABLE_CLOTHING_CONFIRMATION_DIALOG="ROWRE_PURCHASABLE_CLOTHING_CONFIRMATION_DIALOG",ze.BACKGROUND_COLOR="ROWRE_BACKGROUND_COLOR",ze.MYSTERYBOX_OPEN_DIALOG="ROWRE_MYSTERYBOX_OPEN_DIALOG",ze.EFFECTBOX_OPEN_DIALOG="ROWRE_EFFECTBOX_OPEN_DIALOG",ze.MYSTERYTROPHY_OPEN_DIALOG="ROWRE_MYSTERYTROPHY_OPEN_DIALOG",ze.ACHIEVEMENT_RESOLUTION_OPEN="ROWRE_ACHIEVEMENT_RESOLUTION_OPEN",ze.ACHIEVEMENT_RESOLUTION_ENGRAVING="ROWRE_ACHIEVEMENT_RESOLUTION_ENGRAVING",ze.ACHIEVEMENT_RESOLUTION_FAILED="ROWRE_ACHIEVEMENT_RESOLUTION_FAILED",ze.FRIEND_FURNITURE_CONFIRM="ROWRE_FRIEND_FURNITURE_CONFIRM",ze.FRIEND_FURNITURE_ENGRAVING="ROWRE_FRIEND_FURNITURE_ENGRAVING",ze.BADGE_DISPLAY_ENGRAVING="ROWRE_BADGE_DISPLAY_ENGRAVING",ze.HIGH_SCORE_DISPLAY="ROWRE_HIGH_SCORE_DISPLAY",ze.HIDE_HIGH_SCORE_DISPLAY="ROWRE_HIDE_HIGH_SCORE_DISPLAY",ze.INERNAL_LINK="ROWRE_INTERNAL_LINK",ze.ROOM_LINK="ROWRE_ROOM_LINK",ze.YOUTUBE="ROWRE_YOUTUBE";let x=ze;class oQ{constructor(e,t,i,n,r,a,o=0,l=0,u=!1,c=!1,h=!1,f=!1){this._type=e,this._eventId=t,this._canvasId=i,this._spriteTag=n,this._screenX=r,this._screenY=a,this._localX=o,this._localY=l,this._ctrlKey=u,this._altKey=c,this._shiftKey=h,this._buttonDown=f,this._spriteOffsetX=0,this._spriteOffsetY=0}get type(){return this._type}get eventId(){return this._eventId}get canvasId(){return this._canvasId}get spriteTag(){return this._spriteTag}get screenX(){return this._screenX}get screenY(){return this._screenY}get localX(){return this._localX}get localY(){return this._localY}get ctrlKey(){return this._ctrlKey}get altKey(){return this._altKey}get shiftKey(){return this._shiftKey}get buttonDown(){return this._buttonDown}get spriteOffsetX(){return this._spriteOffsetX}set spriteOffsetX(e){this._spriteOffsetX=e}get spriteOffsetY(){return this._spriteOffsetY}set spriteOffsetY(e){this._spriteOffsetY=e}}class lQ extends Ye{constructor(e){super(e)}}const Z2=class Z2 extends lQ{constructor(e,t){super(e),this._targetLocation=t}get targetLocation(){return this._targetLocation}};Z2.ROAME_MOVE_TO="ROAME_MOVE_TO";let Yc=Z2;const L1=class L1 extends ft{constructor(e,t,i=!1,n=!1){super(L1.ROOM_ZOOM,e),this._level=t,this._forceFlip=i,this._asDelta=n}get level(){return this._level}get forceFlip(){return this._forceFlip}get asDelta(){return this._asDelta}};L1.ROOM_ZOOM="REE_ROOM_ZOOM";let MP=L1;const U1=class U1 extends Ye{constructor(e,t){super(U1.IMAGE_READY),this._badgeId=e,this._image=t}get badgeId(){return this._badgeId}get image(){return this._image}};U1.IMAGE_READY="BIME_BADGE_IMAGE_READY";let Xc=U1;const F1=class F1 extends Ye{constructor(e,t){super(F1.MYSTERY_BOX_KEYS_UPDATE),this._boxColor=e,this._keyColor=t}get boxColor(){return this._boxColor}get keyColor(){return this._keyColor}};F1.MYSTERY_BOX_KEYS_UPDATE="mbke_update";let IR=F1;const B1=class B1 extends Ye{constructor(){super(B1.PERKS_UPDATED)}};B1.PERKS_UPDATED="PUE_perks_updated";let NP=B1;const ic=class ic extends Ye{constructor(e,t,i=!0){super(e),this._session=t,this._openLandingView=i}get session(){return this._session}get openLandingView(){return this._openLandingView}};ic.CREATED="RSE_CREATED",ic.STARTED="RSE_STARTED",ic.ENDED="RSE_ENDED",ic.ROOM_DATA="RSE_ROOM_DATA";let Ae=ic;const rs=class rs extends Ae{constructor(e,t,i,n,r,a=0,o,l=null,u=-1){super(e,t),this._objectId=i,this._message=n,this._chatType=r,this._chatColours=o,this._links=l,this._extraParam=u,this._style=a}get objectId(){return this._objectId}get message(){return this._message}get chatType(){return this._chatType}get links(){return this._links}get extraParam(){return this._extraParam}get style(){return this._style}get chatColours(){return this._chatColours}};rs.CHAT_EVENT="RSCE_CHAT_EVENT",rs.FLOOD_EVENT="RSCE_FLOOD_EVENT",rs.CHAT_TYPE_SPEAK=0,rs.CHAT_TYPE_WHISPER=1,rs.CHAT_TYPE_SHOUT=2,rs.CHAT_TYPE_RESPECT=3,rs.CHAT_TYPE_PETRESPECT=4,rs.CHAT_TYPE_HAND_ITEM_RECEIVED=5,rs.CHAT_TYPE_PETTREAT=6,rs.CHAT_TYPE_PETREVIVE=7,rs.CHAT_TYPE_PET_REBREED_FERTILIZE=8,rs.CHAT_TYPE_PET_SPEED_FERTILIZE=9,rs.CHAT_TYPE_MUTE_REMAINING=10;let yt=rs;const G1=class G1 extends Ae{constructor(e,t,i,n,r,a){super(G1.CONFIRM_PET_BREEDING,e),this._nestId=t,this._pet1=i,this._pet2=n,this._rarityCategories=r,this._resultPetTypeId=a}get nestId(){return this._nestId}get pet1(){return this._pet1}get pet2(){return this._pet2}get rarityCategories(){return this._rarityCategories}get resultPetTypeId(){return this._resultPetTypeId}};G1.CONFIRM_PET_BREEDING="RSPFUE_CONFIRM_PET_BREEDING";let RR=G1;const V1=class V1 extends Ae{constructor(e,t,i){super(V1.RSPFUE_CONFIRM_PET_BREEDING_RESULT,e),this._breedingNestStuffId=t,this._result=i}get breedingNestStuffId(){return this._breedingNestStuffId}get result(){return this._result}};V1.RSPFUE_CONFIRM_PET_BREEDING_RESULT="RSPFUE_CONFIRM_PET_BREEDING_RESULT";let SR=V1;const j1=class j1 extends Ae{constructor(e,t,i){super(j1.RSDE_DANCE,e),this._roomIndex=t,this._danceId=i}get roomIndex(){return this._roomIndex}get danceId(){return this._danceId}};j1.RSDE_DANCE="RSDE_DANCE";let bR=j1;class uQ{constructor(e,t,i,n){this._id=e,this._type=t,this._color=i,this._brightness=n}get id(){return this._id}get type(){return this._type}get color(){return this._color}get brightness(){return this._brightness}}const J2=class J2 extends Ae{constructor(e,t){super(e,t),this._selectedPresetId=0,this._presets=[]}storePreset(e,t,i,n){this._presets[e-1]=new uQ(e,t,i,n)}getPreset(e){return e<0||e>=this._presets.length?null:this._presets[e]}get presetCount(){return this._presets.length}get selectedPresetId(){return this._selectedPresetId}set selectedPresetId(e){this._selectedPresetId=e}};J2.ROOM_DIMMER_PRESETS="RSDPE_PRESETS";let Zm=J2;const Fd=class Fd extends Ae{constructor(e,t,i){super(e,t),this._userName="",this._userName=i}get userName(){return this._userName}};Fd.DOORBELL="RSDE_DOORBELL",Fd.RSDE_REJECTED="RSDE_REJECTED",Fd.RSDE_ACCEPTED="RSDE_ACCEPTED";let Po=Fd;const Is=class Is extends Ae{constructor(e,t,i=null){super(e,t),this._message=i}get message(){return this._message}};Is.RSEME_KICKED="RSEME_KICKED",Is.RSEME_PETS_FORBIDDEN_IN_HOTEL="RSEME_PETS_FORBIDDEN_IN_HOTEL",Is.RSEME_PETS_FORBIDDEN_IN_FLAT="RSEME_PETS_FORBIDDEN_IN_FLAT",Is.RSEME_MAX_PETS="RSEME_MAX_PETS",Is.RSEME_MAX_NUMBER_OF_OWN_PETS="RSEME_MAX_NUMBER_OF_OWN_PETS",Is.RSEME_NO_FREE_TILES_FOR_PET="RSEME_NO_FREE_TILES_FOR_PET",Is.RSEME_SELECTED_TILE_NOT_FREE_FOR_PET="RSEME_SELECTED_TILE_NOT_FREE_FOR_PET",Is.RSEME_BOTS_FORBIDDEN_IN_HOTEL="RSEME_BOTS_FORBIDDEN_IN_HOTEL",Is.RSEME_BOTS_FORBIDDEN_IN_FLAT="RSEME_BOTS_FORBIDDEN_IN_FLAT",Is.RSEME_BOT_LIMIT_REACHED="RSEME_BOT_LIMIT_REACHED",Is.RSEME_SELECTED_TILE_NOT_FREE_FOR_BOT="RSEME_SELECTED_TILE_NOT_FREE_FOR_BOT",Is.RSEME_BOT_NAME_NOT_ACCEPTED="RSEME_BOT_NAME_NOT_ACCEPTED";let Ui=Is;const z1=class z1 extends Ae{constructor(e,t,i,n,r){super(z1.FAVOURITE_GROUP_UPDATE,e),this._roomIndex=t,this._habboGroupId=i,this._habboGroupName=r,this._status=n}get roomIndex(){return this._roomIndex}get habboGroupId(){return this._habboGroupId}get habboGroupName(){return this._habboGroupName}get status(){return this._status}};z1.FAVOURITE_GROUP_UPDATE="RSFGUE_FAVOURITE_GROUP_UPDATE";let AR=z1;const H1=class H1 extends Ae{constructor(e,t,i,n){super(H1.RSFRE_FRIEND_REQUEST,e),this._requestId=0,this._userId=0,this._requestId=t,this._userId=i,this._userName=n}get requestId(){return this._requestId}get userId(){return this._userId}get userName(){return this._userName}};H1.RSFRE_FRIEND_REQUEST="RSFRE_FRIEND_REQUEST";let OR=H1;const W1=class W1 extends Ae{constructor(e,t,i){super(W1.NEST_BREEDING_SUCCESS,e),this._petId=t,this._rarityCategory=i}get rarityCategory(){return this._rarityCategory}get petId(){return this._petId}};W1.NEST_BREEDING_SUCCESS="RSPFUE_NEST_BREEDING_SUCCESS";let wR=W1;const Y1=class Y1 extends Ae{constructor(e,t,i,n){super(Y1.PET_BREEDING,e),this._state=t,this._ownPetId=i,this._otherPetId=n}get state(){return this._state}get ownPetId(){return this._ownPetId}get otherPetId(){return this._otherPetId}};Y1.PET_BREEDING="RSPFUE_PET_BREEDING";let CR=Y1;const X1=class X1 extends Ae{constructor(e,t,i){super(X1.PET_BREEDING_RESULT,e),this._resultData=t,this._otherResultData=i}get resultData(){return this._resultData}get otherResultData(){return this._otherResultData}};X1.PET_BREEDING_RESULT="RSPFUE_PET_BREEDING_RESULT";let MR=X1;const K1=class K1 extends Ae{constructor(e,t,i,n){super(K1.PET_COMMANDS,e),this._petId=t,this._allCommandIds=i,this._enabledCommandIds=n}get id(){return this._petId}get commands(){return this._allCommandIds}get enabledCommands(){return this._enabledCommandIds}};K1.PET_COMMANDS="RSPIUE_ENABLED_PET_COMMANDS";let PP=K1;const q1=class q1 extends Ae{constructor(e,t,i){super(q1.PET_FIGURE_UPDATE,e),this._petId=t,this._figure=i}get id(){return this._petId}get figure(){return this._figure}};q1.PET_FIGURE_UPDATE="RSPFUE_PET_FIGURE_UPDATE";let NR=q1;const $1=class $1 extends Ae{constructor(e,t){super($1.PET_INFO,e),this._petInfo=t}get petInfo(){return this._petInfo}};$1.PET_INFO="RSPIUE_PET_INFO";let PR=$1;const Q1=class Q1 extends Ae{constructor(e,t,i){super(Q1.PET_LEVEL_UPDATE,e),this._petId=t,this._level=i}get petId(){return this._petId}get level(){return this._level}};Q1.PET_LEVEL_UPDATE="RSPLUE_PET_LEVEL_UPDATE";let kR=Q1;const Z1=class Z1 extends Ae{constructor(e,t,i,n,r,a){super(e,t),this._objectId=-1,this._nameValidationStatus=0,this._nameValidationInfo=null,this._objectId=i,this._figureData=n,this._nameValidationStatus=r,this._nameValidationInfo=a}get objectId(){return this._objectId}get figureData(){return this._figureData}get nameValidationStatus(){return this._nameValidationStatus}get nameValidationInfo(){return this._nameValidationInfo}};Z1.RSOPPE_OPEN_PET_PACKAGE_REQUESTED="RSOPPE_OPEN_PET_PACKAGE_REQUESTED",Z1.RSOPPE_OPEN_PET_PACKAGE_RESULT="RSOPPE_OPEN_PET_PACKAGE_RESULT";let Nh=Z1;const J1=class J1 extends Ae{constructor(e,t,i,n,r,a){super(J1.PET_STATUS_UPDATE,e),this._petId=t,this._canBreed=i,this._canHarvest=n,this._canRevive=r,this._hasBreedingPermission=a}get petId(){return this._petId}get canBreed(){return this._canBreed}get canHarvest(){return this._canHarvest}get canRevive(){return this._canRevive}get hasBreedingPermission(){return this._hasBreedingPermission}};J1.PET_STATUS_UPDATE="RSPFUE_PET_STATUS_UPDATE";let xR=J1;const Bd=class Bd extends Ae{constructor(e,t,i){super(e,t),this._id=-1,this._numQuestions=0,this._startMessage="",this._endMessage="",this._questionArray=null,this._npsPoll=!1,this._id=i}get id(){return this._id}get headline(){return this._headline}set headline(e){this._headline=e}get summary(){return this._summary}set summary(e){this._summary=e}get numQuestions(){return this._numQuestions}set numQuestions(e){this._numQuestions=e}get startMessage(){return this._startMessage}set startMessage(e){this._startMessage=e}get endMessage(){return this._endMessage}set endMessage(e){this._endMessage=e}get questionArray(){return this._questionArray}set questionArray(e){this._questionArray=e}get npsPoll(){return this._npsPoll}set npsPoll(e){this._npsPoll=e}};Bd.OFFER="RSPE_POLL_OFFER",Bd.ERROR="RSPE_POLL_ERROR",Bd.CONTENT="RSPE_POLL_CONTENT";let so=Bd;const eC=class eC extends Ae{constructor(e,t,i,n,r,a,o,l,u){super(e,t),this._classId=0,this._itemType="",this._placedItemId=0,this._placedItemType="",this._classId=i,this._itemType=n,this._productCode=r,this._placedItemId=a,this._placedItemType=o,this._placedInRoom=l,this._petFigureString=u}get classId(){return this._classId}get itemType(){return this._itemType}get productCode(){return this._productCode}get placedItemId(){return this._placedItemId}get placedInRoom(){return this._placedInRoom}get placedItemType(){return this._placedItemType}get petFigureString(){return this._petFigureString}};eC.RSPE_PRESENT_OPENED="RSPE_PRESENT_OPENED";let Jm=eC;const tC=class tC extends Ae{constructor(e,t){super(e,t)}};tC.RSDUE_ALLOW_PETS="RSDUE_ALLOW_PETS";let ev=tC;const fo=class fo extends Ae{constructor(e,t,i,n=!1){super(fo.QUEUE_STATUS,e),this._name=t,this._target=i,this._queues=new Map,this._isActive=n}get isActive(){return this._isActive}get queueSetName(){return this._name}get queueSetTarget(){return this._target}get queueTypes(){return Array.from(this._queues.keys())}getQueueSize(e){return this._queues.get(e)}addQueue(e,t){this._queues.set(e,t)}};fo.QUEUE_STATUS="RSQE_QUEUE_STATUS",fo.QUEUE_TYPE_CLUB="c",fo.QUEUE_TYPE_NORMAL="d",fo.QUEUE_TARGET_VISITOR=2,fo.QUEUE_TARGET_SPECTATOR=1;let kP=fo;const iC=class iC extends Ae{constructor(e,t){super(e,t)}};iC.SPECTATOR_MODE="RSSME_SPECTATOR_MODE";let tv=iC;const eE=class eE extends Ae{constructor(e,t,i){super(eE.RSUBE_BADGES,e),this._userId=0,this._badges=[],this._userId=t,this._badges=i}get userId(){return this._userId}get badges(){return this._badges}};eE.RSUBE_BADGES="RSUBE_BADGES";let DR=eE;const tE=class tE extends Ae{constructor(e,t){super(tE.USER_DATA_UPDATED,e),this._addedUsers=t}get addedUsers(){return this._addedUsers}};tE.USER_DATA_UPDATED="RMUDUE_USER_DATA_UPDATED";let LR=tE;const iE=class iE extends Ae{constructor(e,t,i,n,r,a,o,l,u){super(iE.USER_FIGURE,e),this._roomIndex=0,this._figure="",this._gender="",this._customInfo="",this._roomIndex=t,this._figure=i,this._gender=n,this._customInfo=r,this._achievementScore=a,this._backgroundId=o,this._standId=l,this._overlayId=u}get roomIndex(){return this._roomIndex}get figure(){return this._figure}get gender(){return this._gender}get customInfo(){return this._customInfo}get activityPoints(){return this._achievementScore}get backgroundId(){return this._backgroundId}get standId(){return this._standId}get overlayId(){return this._overlayId}};iE.USER_FIGURE="RSUBE_FIGURE";let UR=iE;const sE=class sE extends Ye{constructor(e,t){super(sE.UTRE_USER_TAGS_RECEIVED),this._userId=e,this._tags=t}get userId(){return this._userId}get tags(){return this._tags}};sE.UTRE_USER_TAGS_RECEIVED="UTRE_USER_TAGS_RECEIVED";let xP=sE;const nE=class nE extends Ae{constructor(e,t,i,n,r=null,a=0){super(e,t),this._question="",this._SafeStr_7654=0,this._choices=[],this._SafeStr_7651=[],this._question=i,this._choices=n,this._SafeStr_7651=r,this._SafeStr_7651==null&&(this._SafeStr_7651=[]),this._SafeStr_7654=a}get question(){return this._question}get choices(){return this._choices.slice()}get _SafeStr_4173(){return this._SafeStr_7651.slice()}get _SafeStr_4174(){return this._SafeStr_7654}};nE.VOTE_QUESTION="RSPE_VOTE_QUESTION",nE.VOTE_RESULT="RSPE_VOTE_RESULT";let iv=nE;const Gd=class Gd extends Ae{constructor(e,t,i=-1){super(e,t),this._id=-1,this._pollType=null,this._pollId=-1,this._questionId=-1,this._duration=-1,this._question=null,this._userId=-1,this._id=i}get id(){return this._id}get pollType(){return this._pollType}set pollType(e){this._pollType=e}get pollId(){return this._pollId}set pollId(e){this._pollId=e}get questionId(){return this._questionId}set questionId(e){this._questionId=e}get duration(){return this._duration}set duration(e){this._duration=e}get question(){return this._question}set question(e){this._question=e}get userId(){return this._userId}set userId(e){this._userId=e}get value(){return this._value}set value(e){this._value=e}get answerCounts(){return this._answerCounts}set answerCounts(e){this._answerCounts=e}};Gd.QUESTION="RWPUW_NEW_QUESTION",Gd.FINISHED="RWPUW_QUESION_FINSIHED",Gd.ANSWERED="RWPUW_QUESTION_ANSWERED";let no=Gd;const rE=class rE extends Ye{constructor(e){super(rE.UPDATED),this._uiFlags=e}get uiFlags(){return this._uiFlags}};rE.UPDATED="APUE_UPDATED";let FR=rE;const aE=class aE extends Ye{constructor(e){super(aE.UNUE_NAME_UPDATED),this._name=e}get name(){return this._name}};aE.UNUE_NAME_UPDATED="unue_name_updated";let sv=aE;class hQ{constructor(){this._messageIdByEvent=new Map,this._messageIdByComposer=new Map,this._messageInstancesById=new Map}dispose(){this._messageIdByEvent.clear(),this._messageIdByComposer.clear(),this._messageInstancesById.clear()}registerMessages(e){for(const[t,i]of e.events)this.registerMessageEventClass(t,i);for(const[t,i]of e.composers)this.registerMessageComposerClass(t,i)}registerMessageEventClass(e,t){!e||!t||this._messageIdByEvent.set(t,e)}registerMessageComposerClass(e,t){!e||!t||this._messageIdByComposer.set(t,e)}registerMessageEvent(e){if(!e)return;const t=this.getEventId(e);if(!t)return;let i=this._messageInstancesById.get(t);(!i||!i.length)&&(i=[],this._messageInstancesById.set(t,i)),i.push(e)}removeMessageEvent(e){if(!e)return;const t=this.getEventId(e);if(!t)return;const i=this._messageInstancesById.get(t);if(i){for(const[n,r]of i.entries())if(r&&r===e){i.splice(n,1),i.length===0&&this._messageInstancesById.delete(t),r.dispose();return}}}getEvents(e){if(!e)return;const t=this._messageInstancesById.get(e);if(t)return t}getEventId(e){if(!e)return-1;const t=e instanceof A?e.constructor:e,i=this._messageIdByEvent.get(t);return i||-1}getComposerId(e){if(!e)return-1;const t=this._messageIdByComposer.get(e.constructor);return t||-1}}class cQ extends fn{constructor(e,t){super(),this._communicationManager=e,this._stateListener=t,this._socket=null,this._messages=new hQ,this._codec=new nQ,this._dataBuffer=null,this._isReady=!1,this._pendingClientMessages=[],this._pendingServerMessages=[],this._isAuthenticated=!1,this.onOpen=this.onOpen.bind(this),this.onClose=this.onClose.bind(this),this.onError=this.onError.bind(this),this.onMessage=this.onMessage.bind(this)}init(e){this._stateListener&&this._stateListener.connectionInit(e),this.createSocket(e)}onDispose(){super.onDispose(),this.destroySocket(),this._communicationManager=null,this._stateListener=null,this._messages=null,this._codec=null,this._dataBuffer=null}onReady(){this._isReady||(this._isReady=!0,this._pendingServerMessages&&this._pendingServerMessages.length&&this.processWrappers(...this._pendingServerMessages),this._pendingClientMessages&&this._pendingClientMessages.length&&this.send(...this._pendingClientMessages),this._pendingServerMessages=[],this._pendingClientMessages=[])}createSocket(e){e&&(this.destroySocket(),this._dataBuffer=new ArrayBuffer(0),this._socket=new WebSocket(e),this._socket.binaryType="arraybuffer",this._socket.addEventListener(hr.CONNECTION_OPENED,this.onOpen),this._socket.addEventListener(hr.CONNECTION_CLOSED,this.onClose),this._socket.addEventListener(hr.CONNECTION_ERROR,this.onError),this._socket.addEventListener(hr.CONNECTION_MESSAGE,this.onMessage))}destroySocket(){this._socket&&(this._socket.removeEventListener(hr.CONNECTION_OPENED,this.onOpen),this._socket.removeEventListener(hr.CONNECTION_CLOSED,this.onClose),this._socket.removeEventListener(hr.CONNECTION_ERROR,this.onError),this._socket.removeEventListener(hr.CONNECTION_MESSAGE,this.onMessage),this._socket.readyState===WebSocket.OPEN&&this._socket.close(),le.error("Bye Bye connection."),this._socket=null)}onOpen(e){this.dispatchConnectionEvent(wi.CONNECTION_OPENED,e)}onClose(e){this.dispatchConnectionEvent(wi.CONNECTION_CLOSED,e)}onError(e){this.dispatchConnectionEvent(wi.CONNECTION_ERROR,e)}onMessage(e){e&&(this._dataBuffer=this.concatArrayBuffers(this._dataBuffer,e.data),this.processReceivedData())}dispatchConnectionEvent(e,t){this.dispatchEvent(new wi(e,this,t))}authenticated(){this._isAuthenticated=!0}send(...e){if(this.disposed||!e)return!1;if(e=[...e],this._isAuthenticated&&!this._isReady)return this._pendingClientMessages||(this._pendingClientMessages=[]),this._pendingClientMessages.push(...e),!1;for(const t of e){if(!t)continue;const i=this._messages.getComposerId(t);if(i===-1){le.packets("Unknown Composer",t.constructor.name);continue}const n=t.getMessageArray(),r=this._codec.encode(i,n);if(!r){le.packets("Encoding Failed",t.constructor.name);continue}le.packets("OutgoingComposer",i,t.constructor.name,n),this.write(r.getBuffer())}return!0}write(e){this._socket.readyState===WebSocket.OPEN&&this._socket.send(e)}processReceivedData(){try{this.processData()}catch(e){le.error(e)}}processData(){const e=this.splitReceivedMessages();if(!(!e||!e.length)){if(this._isAuthenticated&&!this._isReady){this._pendingServerMessages||(this._pendingServerMessages=[]),this._pendingServerMessages.push(...e);return}this.processWrappers(...e)}}processWrappers(...e){if(!(!e||!e.length))for(const t of e){if(!t)continue;const i=this.getMessagesForWrapper(t);!i||!i.length||(le.packets("IncomingMessage",t.header,i[0].constructor.name,i[0].parser),this.handleMessages(...i))}}splitReceivedMessages(){return!this._dataBuffer||!this._dataBuffer.byteLength?null:this._codec.decode(this)}concatArrayBuffers(e,t){const i=new Uint8Array(e.byteLength+t.byteLength);return i.set(new Uint8Array(e),0),i.set(new Uint8Array(t),e.byteLength),i.buffer}getMessagesForWrapper(e){if(!e)return null;const t=this._messages.getEvents(e.header);if(!t||!t.length){le.packets("IncomingMessage",e.header,"UNREGISTERED",e);return}try{const i=new t[0].parserClass;if(!i||!i.flush()||!i.parse(e))return null;for(const n of t)n.parser=i}catch(i){return le.error("Error parsing message",i,t[0].constructor.name),null}return t}handleMessages(...e){e=[...e];for(const t of e)t&&(t.connection=this,t.callBack&&t.callBack(t))}registerMessages(e){e&&this._messages.registerMessages(e)}addMessageEvent(e){!e||!this._messages||this._messages.registerMessageEvent(e)}removeMessageEvent(e){!e||!this._messages||this._messages.removeMessageEvent(e)}get isAuthenticated(){return this._isAuthenticated}get dataBuffer(){return this._dataBuffer}set dataBuffer(e){this._dataBuffer=e}}class fQ extends Bs{constructor(){super(),this._connections=[]}onDispose(){if(!(!this._connections||!this._connections.length))for(const e of this._connections.values())e&&e.dispose()}createConnection(e=null){const t=new cQ(this,e);if(t)return this._connections.push(t),t}update(e){let t=0;for(;tt.json()).then(t=>this.onConfigurationLoaded(t,e)).catch(t=>this.onConfigurationFailed(t))}onConfigurationLoaded(e,t){if(e){if(Te.parseConfiguration(e)){const i=this._pendingUrls.indexOf(t);i>=0&&this._pendingUrls.splice(i,1),this.loadNextConfiguration();return}this.dispatchConfigurationEvent(Ao.FAILED)}}onConfigurationFailed(e){this.dispatchConfigurationEvent(Ao.FAILED)}dispatchConfigurationEvent(e){this.events&&this.events.dispatchEvent(new Ao(e))}getDefaultConfig(){return NitroConfig}}const _o=class _o{static sayHello(){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){const e=[` %c %c %c Nitro ${_o.UI_VERSION} - Renderer ${_o.RENDERER_VERSION} %c %c %c https://discord.nitrodev.co %c %c `,"background: #ffffff; padding:5px 0;","background: #ffffff; padding:5px 0;","color: #ffffff; background: #000000; padding:5px 0;","background: #ffffff; padding:5px 0;","background: #ffffff; padding:5px 0;","background: #000000; padding:5px 0;","background: #ffffff; padding:5px 0;","background: #ffffff; padding:5px 0;"];self.console.log(...e)}else self.console&&self.console.log(`Nitro ${_o.UI_VERSION} - Renderer ${_o.RENDERER_VERSION} `)}};_o.RENDERER_VERSION="1.6.6",_o.UI_VERSION="";let nv=_o;class _Q extends Bs{constructor(){super(),nv.sayHello(),this._configuration=new dQ,this._communication=new fQ}onDispose(){this._communication&&(this._communication.dispose(),this._communication=null)}get configuration(){return this._configuration}get communication(){return this._communication}}class gQ{constructor(e){this._id=parseInt(e.id),this._value=parseInt(e.id),this._prevents=e.prevents||[],this._preventHeadTurn=e.preventHeadTurn||!1,this._isAnimated=!0,e.animated!==void 0&&e.animated===!1&&(this._isAnimated=!1)}get id(){return this._id}get value(){return this._value}get prevents(){return this._prevents}get preventHeadTurn(){return this._preventHeadTurn}get isAnimated(){return this._isAnimated}}class pQ{constructor(e){if(this._id=e.id,this._state=e.state,this._precedence=e.precedence,this._activePartSet=e.activePartSet,this._assetPartDefinition=e.assetPartDefinition,this._lay=e.lay,this._geometryType=e.geometryType,this._isMain=e.main||!1,this._isDefault=e.isDefault||!1,this._isAnimation=e.animation||!1,this._startFromFrameZero=e.startFromFrameZero||!1,this._prevents=e.prevents||[],this._preventHeadTurn=e.preventHeadTurn||!1,this._types=new Map,this._params=new Map,this._defaultParameterValue="",this._canvasOffsets=null,e.params&&e.params.length>0)for(const t of e.params)t&&(t.id==="default"?this._defaultParameterValue=t.value:this._params.set(t.id,t.value));if(e.types&&e.types.length>0)for(const t of e.types){if(!t)continue;const i=new gQ(t);this._types.set(i.id,i)}}setOffsets(e,t,i){this._canvasOffsets||(this._canvasOffsets=new Map);let n=this._canvasOffsets.get(e);n||(n=new Map,this._canvasOffsets.set(e,n)),n.set(t,i)}getOffsets(e,t){if(!this._canvasOffsets)return null;const i=this._canvasOffsets.get(e);return i?i.get(t):null}getType(e){if(!e)return null;const t=this._types.get(parseInt(e));return t||null}getParameterValue(e){if(!e)return"";const t=this._params.get(e);return t||this._defaultParameterValue}getPrevents(e){return this._prevents.concat(this.getTypePrevents(e))}getTypePrevents(e){if(!e)return[];const t=this._types.get(parseInt(e));return t?t.prevents:[]}getPreventHeadTurn(e){if(!e)return this._preventHeadTurn;const t=this.getType(e);return t?t.preventHeadTurn:this._preventHeadTurn}isAnimated(e){if(!e)return!0;const t=this.getType(e);return t?t.isAnimated:!0}get id(){return this._id}get state(){return this._state}get precedence(){return this._precedence}get activePartSet(){return this._activePartSet}get assetPartDefinition(){return this._assetPartDefinition}get lay(){return this._lay}get geometryType(){return this._geometryType}get isMain(){return this._isMain}get isDefault(){return this._isDefault}get isAnimation(){return this._isAnimation}get startFromFrameZero(){return this._startFromFrameZero}get prevents(){return this._prevents}get preventHeadTurn(){return this._preventHeadTurn}get params(){return this._params}}class BR{constructor(e,t="",i=0){this._actionType=e||"",this._actionParameter=t||"",this._definition=null,this._startFrame=i||0,this._overridingAction=null}dispose(){this._actionType=null,this._actionParameter=null,this._definition=null}get id(){return this._definition?this._definition.id+"_"+this._actionParameter:""}get actionType(){return this._actionType}get actionParameter(){return this._actionParameter}set actionParameter(e){this._actionParameter=e}get definition(){return this._definition}set definition(e){this._definition=e}get startFrame(){return this._startFrame}get overridingAction(){return this._overridingAction}set overridingAction(e){this._overridingAction=e}}class mQ{constructor(e,t){this._assets=e,this._actions=new Map,this._defaultAction=null,this.updateActions(t)}updateActions(e){if(e){for(const t of e.actions){if(!t||!t.state)continue;const i=new pQ(t);this._actions.set(i.state,i)}e.actionOffsets&&this.parseActionOffsets(e.actionOffsets)}}parseActionOffsets(e){if(!(!e||!e.length))for(const t of e){const i=this._actions.get(t.action);if(i)for(const n of t.offsets){const r=n.size||"",a=n.direction;if(r===""||a===void 0)continue;const o=n.x||0,l=n.y||0,u=n.z||0;i.setOffsets(r,a,[o,l,u])}}}getActionDefinition(e){if(!e)return null;for(const t of this._actions.values())if(!(!t||t.id!==e))return t;return null}getActionDefinitionWithState(e){const t=this._actions.get(e);return t||null}getDefaultAction(){if(this._defaultAction)return this._defaultAction;for(const e of this._actions.values())if(!(!e||!e.isDefault))return this._defaultAction=e,e;return null}getCanvasOffsets(e,t,i){let n=[];for(const r of e){if(!r)continue;const a=this._actions.get(r.actionType),o=a&&a.getOffsets(t,i);o&&(n=o)}return n}sortActions(e){if(!e)return null;e=this.filterActions(e);const t=[];for(const i of e){if(!i)continue;const n=this._actions.get(i.actionType);n&&(i.definition=n,t.push(i))}return t.sort(this.sortByPrecedence),t}filterActions(e){let t=[];const i=[];for(const n of e){if(!n)continue;const r=this._actions.get(n.actionType);r&&(t=t.concat(r.getPrevents(n.actionParameter)))}for(const n of e){if(!n)continue;let r=n.actionType;n.actionType==="fx"&&(r=r+("."+n.actionParameter)),!(t.indexOf(r)>=0)&&i.push(n)}return i}sortByPrecedence(e,t){if(!e||!t)return 0;const i=e.definition.precedence,n=t.definition.precedence;return in?-1:0}}class vQ{constructor(e,t){this._name=e,this._link=t.link,this._flipH=t.flipH,this._flipV=t.flipV}get name(){return this._name}get link(){return this._link}get flipH(){return this._flipH}get flipV(){return this._flipV}}class EQ{constructor(e,t){this._avatarRenderManager=e,this._aliases=new Map,this._assets=t,this._missingAssetNames=[]}dispose(){this._assets=null,this._aliases=null}reset(){this.init()}init(){for(const e of this._assets.collections.values()){if(!e)continue;const t=e.data&&e.data.aliases;if(t)for(const i in t){const n=t[i];n&&this._aliases.set(i,new vQ(i,n))}}}hasAlias(e){return!!this._aliases.get(e)}getAssetName(e){let t=e,i=5;for(;this.hasAlias(t)&&i>=0;)t=this._aliases.get(t).link,i--;return t}getAsset(e){if(!this._assets)return null;e=this.getAssetName(e);const t=this._assets.getAsset(e);return t||null}}class yQ{constructor(e){this._id=e.id||"",this._align=e.align||"",this._base=e.base||"",this._ink=e.ink||0,this._blend=0;const t=e.blend;t&&t.length>0&&(this._blend=parseInt(t),this._blend>1&&(this._blend=this._blend/100))}get id(){return this._id}get align(){return this._align}get base(){return this._base}get ink(){return this._ink}get blend(){return this._blend}get isBlended(){return this._blend!==1}}const lE=class lE{constructor(e,t,i){if(this._id=e.id,this._animationFrame=e.frame||0,this._dx=e.dx||0,this._dy=e.dy||0,this._dz=e.dz||0,this._directionOffset=e.dd||0,this._type=t,this._base=e.base||"",this._items=new Map,e.items)for(const n of e.items)this._items.set(n.id,n.base);this._base!==""&&this.baseAsInt().toString(),i&&(this._action=new BR(i.state,this.base),this._action.definition=i)}get items(){return this._items}baseAsInt(){let e=0,t=0;for(;t>16&255,this._g=this._rgb>>8&255,this._b=this._rgb>>0&255,this._redMultiplier=this._r/255*1,this._greenMultiplier=this._g/255*1,this._blueMultiplier=this._b/255*1,this._alphaMultiplier=1,this._paletteIsGrayscale=!0,this._ink===37&&(this._alphaMultiplier=.5,this._paletteIsGrayscale=!1),this._colorTransform=new F$({red:this._r/255,green:this._g/255,blue:this._b/255,alpha:this._alphaMultiplier}),this._colorMap=this.generatePaletteMapForGrayscale(this._backGround,this._foreGround)}get ink(){return this._ink}get colorTransform(){return this._colorTransform}get reds(){return this._colorMap.get("reds")}get greens(){return this._colorMap.get("greens")}get blues(){return this._colorMap.get("blues")}get alphas(){return this._colorMap.get("alphas")}get paletteIsGrayscale(){return this._paletteIsGrayscale}generatePaletteMapForGrayscale(e,t){const i=e>>24&255,n=e>>16&255,r=e>>8&255,a=e>>0&255,o=t>>24&255,l=t>>16&255,u=t>>8&255,c=t>>0&255,h=(o-i)/255,f=(l-n)/255,d=(u-r)/255,_=(c-a)/255,g=new Map,p=[],m=[],v=[];let E=i,y=n,T=r,w=a;for(let C=0;C<256;C++)y==n&&T==r&&w==a&&(E=0),E=E+h,y=y+f,T=T+d,w=w+_,p.push(E<<24|y<<16|T<<8|w),m.push(E<<24|y<<16|T<<8|w),v.push(E<<24|y<<16|T<<8|w);return g.set("alphas",p),g.set("reds",p),g.set("greens",m),g.set("blues",v),g}}class IQ{constructor(e){this._offset=e.offset}get offset(){return this._offset}}class RQ{constructor(e,t){this._animation=e,this._id=t.id,this._ink=t.ink,this._member=t.member,this._hasStaticY=!!t.staticY,this._hasDirections=!!t.directions,this._dx=[],this._dy=[],this._dz=[];const i=t.directionList;if(i&&i.length)for(const n of i){const r=n.id;r!==void 0&&(this._dx[r]=n.dx||0,this._dy[r]=n.dy||0,this._dz[r]=n.dz||0)}}getDirectionOffsetX(e){return e1&&(r=n.repeats);let a=0;for(;a0:!1}overriddenActionNames(){if(!this._overriddenActions)return null;const e=[];for(const t of this._overriddenActions.keys())e.push(t);return e}overridingAction(e){return this._overriddenActions?this._overriddenActions.get(e):null}getFrame(e,t=null){e<0&&(e=0);let i=[];if(!t)this._frames.length>0&&(i=this._frames[e%this._frames.length]);else{const n=this._overrideFrames.get(t);n&&n.length>0&&(i=n[e%n.length])}return i}getAnimatedBodyPartIds(e,t=null){const i=[];for(const n of this.getFrame(e,t))if(n.type===qn.BODYPART)i.push(n.id);else if(n.type===qn.FX&&this._addData&&this._addData.length)for(const r of this._addData)r.id===n.id&&i.push(r.align);return i}getLayerData(e,t,i=null){for(const n of this.getFrame(e,i)){if(n.id===t)return n;if(n.type===qn.FX&&this._addData&&this._addData.length){for(const r of this._addData)if(r.align===t&&r.id===n.id)return n}}return null}hasAvatarData(){return this._avatarData!==null}hasDirectionData(){return this._directionData!==null}hasAddData(){return this._addData!==null}getAddData(e){if(this._addData){for(const t of this._addData)if(t.id===e)return t}return null}get id(){return this._id}get spriteData(){return this._spriteData||sc.EMPTY_ARRAY}get avatarData(){return this._avatarData}get directionData(){return this._directionData}get removeData(){return this._removeData||sc.EMPTY_ARRAY}get addData(){return this._addData||sc.EMPTY_ARRAY}toString(){return this._description}get resetOnToggle(){return this._resetOnToggle}};sc.EMPTY_ARRAY=[];let GR=sc;class SQ{constructor(){this._animations=new Map}registerAnimation(e,t){if(!t)return!1;const i=t[Object.keys(t)[0]],n=new GR(e,i);return this._animations.set(i.name,n),!0}getAnimation(e){const t=this._animations.get(e);return t||null}getLayerData(e,t,i){const n=this.getAnimation(e);return n?n.getLayerData(t,i):null}get animations(){return this._animations}}const Rs=class Rs extends fn{constructor(e,t,i,n){super(),this._state=Rs.NOT_LOADED,this._libraryName=e,this._revision=t,this._downloadUrl=n,this._assets=i,this._downloadUrl=this._downloadUrl.replace(/%libname%/gi,this._libraryName),this._downloadUrl=this._downloadUrl.replace(/%revision%/gi,this._revision),this._assets.getCollection(this._libraryName)&&(this._state=Rs.LOADED)}async downloadAsset(){if(!this._assets||this._state===Rs.LOADING||this._state===Rs.LOADED)return;if(this._assets.getCollection(this._libraryName)){this._state=Rs.LOADED,this.dispatchEvent(new gu(gu.DOWNLOAD_COMPLETE,this));return}this._state=Rs.LOADING,await this._assets.downloadAsset(this._downloadUrl)&&(this._state=Rs.LOADED,this.dispatchEvent(new gu(gu.DOWNLOAD_COMPLETE,this)))}get libraryName(){return this._libraryName}get isLoaded(){return this._state===Rs.LOADED}};Rs.DOWNLOAD_COMPLETE="AADL_DOWNLOAD_COMPLETE",Rs.NOT_LOADED=0,Rs.LOADING=1,Rs.LOADED=2;let VR=Rs;const ql=class ql extends fn{constructor(e,t){super(),this._assets=e,this._structure=t,this._missingMandatoryLibs=Te.getValue("avatar.mandatory.libraries"),this._figureMap=new Map,this._pendingContainers=[],this._figureListeners=new Map,this._incompleteFigures=new Map,this._pendingDownloadQueue=[],this._currentDownloads=[],this._libraryNames=[],this._isReady=!1,this.onLibraryLoaded=this.onLibraryLoaded.bind(this),this.onAvatarRenderReady=this.onAvatarRenderReady.bind(this),this.loadFigureMap(),this._structure.renderManager.events.addEventListener(G_.AVATAR_RENDER_READY,this.onAvatarRenderReady)}loadFigureMap(){const e=Te.getValue("avatar.figuremap.url");fetch(e).then(t=>t.json()).then(t=>{this.processFigureMap(t.libraries),this.processMissingLibraries(),this._isReady=!0,this.dispatchEvent(new Ye(ql.DOWNLOADER_READY))}).catch(t=>le.error(t))}processFigureMap(e){if(e)for(const t of e){if(!t)continue;const i=t.id,n=t.revision||"";if(this._libraryNames.indexOf(i)>=0)continue;this._libraryNames.push(i);const r=new VR(i,n,this._assets,Te.getValue("avatar.asset.url"));if(r.addEventListener(gu.DOWNLOAD_COMPLETE,this.onLibraryLoaded),t.parts==null){console.error("Missing parts for "+i,t);continue}for(const a of t.parts){const o=a.id,u=a.type+":"+o;let c=this._figureMap.get(u);c||(c=[]),c.push(r),this._figureMap.set(u,c)}}}onAvatarRenderReady(e){if(e){for(const[t,i]of this._pendingContainers)this.downloadAvatarFigure(t,i);this._pendingContainers=[]}}onLibraryLoaded(e){if(!e||!e.library)return;const t=[];for(const[n,r]of this._incompleteFigures.entries()){let a=!0;for(const o of r)if(!(!o||o.isLoaded)){a=!1;break}if(a){t.push(n);const o=this._figureListeners.get(n);if(o)for(const l of o)!l||l.disposed||l.resetFigure(n);this._figureListeners.delete(n),this.dispatchEvent(new Ye(ql.LIBRARY_LOADED))}}for(const n of t)n&&this._incompleteFigures.delete(n);let i=0;for(;i=0||t.push(h)}}return t}downloadAvatarFigure(e,t){if(!this._isReady||!this._structure.renderManager.isReady){this._pendingContainers.push([e,t]);return}const i=e.getFigureString(),n=this.getAvatarFigurePendingLibraries(e);if(n&&n.length){if(t&&!t.disposed){let r=this._figureListeners.get(i);r||(r=[],this._figureListeners.set(i,r)),r.push(t)}this._incompleteFigures.set(i,n);for(const r of n)r&&this.downloadLibrary(r)}else t&&!t.disposed&&t.resetFigure(i)}downloadLibrary(e){!e||e.isLoaded||this._pendingDownloadQueue.indexOf(e)>=0||this._currentDownloads.indexOf(e)>=0||(this._pendingDownloadQueue.push(e),this.processDownloadQueue())}processDownloadQueue(){for(;this._pendingDownloadQueue.length;)this._pendingDownloadQueue[0].downloadAsset(),this._currentDownloads.push(this._pendingDownloadQueue.shift())}};ql.DOWNLOADER_READY="AADM_DOWNLOADER_READY",ql.LIBRARY_LOADED="AADM_LIBRARY_LOADED",ql.MAX_DOWNLOADS=2;let Dl=ql;class Hp{constructor(e){this._parts=new Map,this.parseFigure(e)}getPartTypeIds(){return this.partSets().keys()}hasPartType(e){return!!this.partSets().get(e)}getPartSetId(e){const t=this.partSets().get(e);return t?t.get("setid"):0}getPartColorIds(e){const t=this.partSets().get(e);return t?t.get("colorids"):null}updatePart(e,t,i){const n=new Map;n.set("type",e),n.set("setid",t),n.set("colorids",i);const r=this.partSets();r.delete(e),r.set(e,n)}removePart(e){this.partSets().delete(e)}getFigureString(){const e=[];for(const t of this.partSets().keys()){if(!t)continue;let i=[];i.push(t),i.push(this.getPartSetId(t)),i=i.concat(this.getPartColorIds(t)),e.push(i.join("-"))}return e.join(".")}partSets(){return this._parts||(this._parts=new Map),this._parts}parseFigure(e){e||(e="");for(const t of e.split(".")){const i=t.split("-");if(i.length>=2){const n=i[0],r=parseInt(i[1]),a=[];let o=2;for(;o 0.0) { c.rgb /= c.a; } vec4 result; result.r = (m[0] * c.r); result.r += (m[1] * c.g); result.r += (m[2] * c.b); result.r += (m[3] * c.a); result.r += m[4]; result.g = (m[5] * c.r); result.g += (m[6] * c.g); result.g += (m[7] * c.b); result.g += (m[8] * c.a); result.g += m[9]; result.b = (m[10] * c.r); result.b += (m[11] * c.g); result.b += (m[12] * c.b); result.b += (m[13] * c.a); result.b += m[14]; result.a = (m[15] * c.r); result.a += (m[16] * c.g); result.a += (m[17] * c.b); result.a += (m[18] * c.a); result.a += m[19]; vec3 rgb = mix(c.rgb, result.rgb, uAlpha); // Premultiply alpha again. rgb *= result.a; gl_FragColor = vec4(rgb, result.a); } `,rv=function(s){bQ(e,s);function e(){var t=this,i={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 t=s.call(this,aq,AQ,i)||this,t.alpha=1,t}return e.prototype._loadMatrix=function(t,i){i===void 0&&(i=!1);var n=t;i&&(this._multiply(n,this.uniforms.m,t),n=this._colorMatrix(n)),this.uniforms.m=n},e.prototype._multiply=function(t,i,n){return t[0]=i[0]*n[0]+i[1]*n[5]+i[2]*n[10]+i[3]*n[15],t[1]=i[0]*n[1]+i[1]*n[6]+i[2]*n[11]+i[3]*n[16],t[2]=i[0]*n[2]+i[1]*n[7]+i[2]*n[12]+i[3]*n[17],t[3]=i[0]*n[3]+i[1]*n[8]+i[2]*n[13]+i[3]*n[18],t[4]=i[0]*n[4]+i[1]*n[9]+i[2]*n[14]+i[3]*n[19]+i[4],t[5]=i[5]*n[0]+i[6]*n[5]+i[7]*n[10]+i[8]*n[15],t[6]=i[5]*n[1]+i[6]*n[6]+i[7]*n[11]+i[8]*n[16],t[7]=i[5]*n[2]+i[6]*n[7]+i[7]*n[12]+i[8]*n[17],t[8]=i[5]*n[3]+i[6]*n[8]+i[7]*n[13]+i[8]*n[18],t[9]=i[5]*n[4]+i[6]*n[9]+i[7]*n[14]+i[8]*n[19]+i[9],t[10]=i[10]*n[0]+i[11]*n[5]+i[12]*n[10]+i[13]*n[15],t[11]=i[10]*n[1]+i[11]*n[6]+i[12]*n[11]+i[13]*n[16],t[12]=i[10]*n[2]+i[11]*n[7]+i[12]*n[12]+i[13]*n[17],t[13]=i[10]*n[3]+i[11]*n[8]+i[12]*n[13]+i[13]*n[18],t[14]=i[10]*n[4]+i[11]*n[9]+i[12]*n[14]+i[13]*n[19]+i[14],t[15]=i[15]*n[0]+i[16]*n[5]+i[17]*n[10]+i[18]*n[15],t[16]=i[15]*n[1]+i[16]*n[6]+i[17]*n[11]+i[18]*n[16],t[17]=i[15]*n[2]+i[16]*n[7]+i[17]*n[12]+i[18]*n[17],t[18]=i[15]*n[3]+i[16]*n[8]+i[17]*n[13]+i[18]*n[18],t[19]=i[15]*n[4]+i[16]*n[9]+i[17]*n[14]+i[18]*n[19]+i[19],t},e.prototype._colorMatrix=function(t){var i=new Float32Array(t);return i[4]/=255,i[9]/=255,i[14]/=255,i[19]/=255,i},e.prototype.brightness=function(t,i){var n=[t,0,0,0,0,0,t,0,0,0,0,0,t,0,0,0,0,0,1,0];this._loadMatrix(n,i)},e.prototype.tint=function(t,i){var n=t>>16&255,r=t>>8&255,a=t&255,o=[n/255,0,0,0,0,0,r/255,0,0,0,0,0,a/255,0,0,0,0,0,1,0];this._loadMatrix(o,i)},e.prototype.greyscale=function(t,i){var n=[t,t,t,0,0,t,t,t,0,0,t,t,t,0,0,0,0,0,1,0];this._loadMatrix(n,i)},e.prototype.blackAndWhite=function(t){var i=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0];this._loadMatrix(i,t)},e.prototype.hue=function(t,i){t=(t||0)/180*Math.PI;var n=Math.cos(t),r=Math.sin(t),a=Math.sqrt,o=1/3,l=a(o),u=n+(1-n)*o,c=o*(1-n)-l*r,h=o*(1-n)+l*r,f=o*(1-n)+l*r,d=n+o*(1-n),_=o*(1-n)-l*r,g=o*(1-n)-l*r,p=o*(1-n)+l*r,m=n+o*(1-n),v=[u,c,h,0,0,f,d,_,0,0,g,p,m,0,0,0,0,0,1,0];this._loadMatrix(v,i)},e.prototype.contrast=function(t,i){var n=(t||0)+1,r=-.5*(n-1),a=[n,0,0,0,r,0,n,0,0,r,0,0,n,0,r,0,0,0,1,0];this._loadMatrix(a,i)},e.prototype.saturate=function(t,i){t===void 0&&(t=0);var n=t*2/3+1,r=(n-1)*-.5,a=[n,r,r,0,0,r,n,r,0,0,r,r,n,0,0,0,0,0,1,0];this._loadMatrix(a,i)},e.prototype.desaturate=function(){this.saturate(-1)},e.prototype.negative=function(t){var i=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0];this._loadMatrix(i,t)},e.prototype.sepia=function(t){var i=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0];this._loadMatrix(i,t)},e.prototype.technicolor=function(t){var i=[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(i,t)},e.prototype.polaroid=function(t){var i=[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(i,t)},e.prototype.toBGR=function(t){var i=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0];this._loadMatrix(i,t)},e.prototype.kodachrome=function(t){var i=[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(i,t)},e.prototype.browni=function(t){var i=[.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(i,t)},e.prototype.vintage=function(t){var i=[.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(i,t)},e.prototype.colorTone=function(t,i,n,r,a){t=t||.2,i=i||.15,n=n||16770432,r=r||3375104;var o=(n>>16&255)/255,l=(n>>8&255)/255,u=(n&255)/255,c=(r>>16&255)/255,h=(r>>8&255)/255,f=(r&255)/255,d=[.3,.59,.11,0,0,o,l,u,t,0,c,h,f,i,0,o-c,l-h,u-f,0,0];this._loadMatrix(d,a)},e.prototype.night=function(t,i){t=t||.1;var n=[t*-2,-t,0,0,0,-t,0,t,0,0,0,t,t*2,0,0,0,0,0,1,0];this._loadMatrix(n,i)},e.prototype.predator=function(t,i){var n=[11.224130630493164*t,-4.794486999511719*t,-2.8746118545532227*t,0*t,.40342438220977783*t,-3.6330697536468506*t,9.193157196044922*t,-2.951810836791992*t,0*t,-1.316135048866272*t,-3.2184197902679443*t,-4.2375030517578125*t,7.476448059082031*t,0*t,.8044459223747253*t,0,0,0,1,0];this._loadMatrix(n,i)},e.prototype.lsd=function(t){var i=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0];this._loadMatrix(i,t)},e.prototype.reset=function(){var t=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];this._loadMatrix(t,!1)},Object.defineProperty(e.prototype,"matrix",{get:function(){return this.uniforms.m},set:function(t){this.uniforms.m=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"alpha",{get:function(){return this.uniforms.uAlpha},set:function(t){this.uniforms.uAlpha=t},enumerable:!1,configurable:!0}),e}(pf);rv.prototype.grayscale=rv.prototype.greyscale;class OQ{constructor(){this._cache=new Map,this.setLastAccessTime(Pe())}dispose(){if(this.debugInfo("[dispose]"),!!this._cache){for(const e of this._cache.values())e&&e.dispose();this._cache.clear()}}getDirectionCache(e){const t=this._cache.get(e.toString());return t||null}updateDirectionCache(e,t){this._cache.set(e.toString(),t)}setLastAccessTime(e){this._lastAccessTime=e}getLastAccessTime(){return this._lastAccessTime}debugInfo(e){}}class DP{constructor(){this._cache=new Map}setAction(e,t){this._currentAction||(this._currentAction=e);const i=this.getActionCache(this._currentAction);i&&i.setLastAccessTime(t),this._currentAction=e}dispose(){if(!this._disposed){if(!this._cache)return;this.disposeActions(0,2147483647),this._cache.clear(),this._cache=null,this._disposed=!0}}disposeActions(e,t){if(!(!this._cache||this._disposed))for(const[i,n]of this._cache.entries()){if(!n)continue;const r=n.getLastAccessTime();t-r>=e&&(n.dispose(),this._cache.delete(i))}}getAction(){return this._currentAction}setDirection(e){this._currentDirection=e}getDirection(){return this._currentDirection}getActionCache(e=null){return this._currentAction?(e||(e=this._currentAction),e.overridingAction?this._cache.get(e.overridingAction):this._cache.get(e.id)):null}updateActionCache(e,t){e.overridingAction?this._cache.set(e.overridingAction,t):this._cache.set(e.id,t)}debugInfo(e){}}class wQ{constructor(e,t,i){this._image=e,this._regPoint=t,this._offset=new Q(0,0),this._regPoint=t,this._isCacheable=i,this.cleanPoints()}dispose(){this._image&&this._image.destroy({children:!0}),this._image=null,this._regPoint=null,this._offset=null}cleanPoints(){}setRegPoint(e){this._regPoint=e,this.cleanPoints()}get image(){return this._image}set image(e){this._image&&this._image!==e&&this._image.destroy({children:!0}),this._image=e}get regPoint(){const e=this._regPoint.clone();return e.x+=this._offset.x,e.y+=this._offset.y,e}set offset(e){this._offset=e,this.cleanPoints()}get isCacheable(){return this._isCacheable}}class CQ{constructor(e){this._partList=e,this._images=new Map}dispose(){for(const e of this._images.values())e&&e.dispose();this._images=null}getPartList(){return this._partList}getImageContainer(e){const t=this._images.get(this.getCacheKey(e));return t||null}updateImageContainer(e,t){const i=this.getCacheKey(t),n=this._images.get(i);n&&n.dispose(),this._images.set(i,e)}getCacheKey(e){let t="";for(const i of this._partList)t+=i.getCacheableKey(e)+"/";return t}debugInfo(e){}}class LP{constructor(e,t,i,n,r,a=null){this._texture=e,this._container=a,this._rect=t,this._regPoint=i,this._flipH=n,this._colorTransform=r,n&&(this._regPoint.x=-this._regPoint.x+t.width)}dispose(){this._texture=null,this._regPoint=null,this._colorTransform=null}get texture(){return this._texture}get container(){return this._container}get rect(){return this._rect}get regPoint(){return this._regPoint}get flipH(){return this._flipH}get colorTransform(){return this._colorTransform}get offsetRect(){return new ve(-this._regPoint.x,-this._regPoint.y,this._rect.width,this._rect.height)}}const sC=class sC{constructor(e,t,i,n){this._structure=e,this._avatar=t,this._assets=i,this._scale=n,this._cache=new Map,this._canvas=null,this._disposed=!1,this._unionImages=[],this._matrix=new dt,this._serverRenderData=[]}dispose(){if(!this._disposed){if(this._structure=null,this._avatar=null,this._assets=null,this._canvas=null,this._disposed=!0,this._cache){for(const e of this._cache.values())e&&e.dispose();this._cache=null}if(this._unionImages){for(const e of this._unionImages)e&&e.dispose();this._unionImages=[]}}}disposeInactiveActions(e=6e4){const t=Pe();if(this._cache)for(const i of this._cache.values())i&&i.disposeActions(e,t)}resetBodyPartCache(e){if(this._cache)for(const t of this._cache.values())t&&t.setAction(e,0)}setDirection(e,t){const i=this._structure.getBodyPartsUnordered(e);if(i)for(const n of i){const r=this.getBodyPartCache(n);r&&r.setDirection(t)}}setAction(e,t){const i=this._structure.getActiveBodyPartIds(e,this._avatar);for(const n of i){const r=this.getBodyPartCache(n);r&&r.setAction(e,t)}}setGeometryType(e){if(this._geometryType!==e){if(this._geometryType===io.SITTING&&e===io.VERTICAL||this._geometryType===io.VERTICAL&&e===io.SITTING||this._geometryType===io.SNOWWARS_HORIZONTAL&&(e=io.SNOWWARS_HORIZONTAL)){this._geometryType=e,this._canvas=null;return}this.disposeInactiveActions(0),this._geometryType=e,this._canvas=null}}getImageContainer(e,t,i=!1){let n=this.getBodyPartCache(e);n||(n=new DP,this._cache.set(e,n));let r=n.getDirection(),a=n.getAction(),o=t;a.definition.startFromFrameZero&&(o-=a.startFrame);let l=a,u=[],c=new Map;const h=new Q;if(!(!a||!a.definition)&&a.definition.isAnimation){let p=r;const m=this._structure.getAnimation(a.definition.state+"."+a.actionParameter),v=t-a.startFrame;if(m){const E=m.getLayerData(v,e,a.overridingAction);E&&(p=r+E.dd,E.dd<0?p<0?p=8+p:p>7&&(p=8-p):p<0?p=p+8:p>7&&(p=p-8),this._scale===kr.LARGE?(h.x=E.dx,h.y=E.dy):(h.x=E.dx/2,h.y=E.dy/2),o=E.animationFrame,E.action&&(a=E.action),E.type===qn.BODYPART?(E.action!=null&&(l=E.action),r=p):E.type===qn.FX&&(r=p),c=E.items),u=m.removeData}}let f=n.getActionCache(l);(!f||i)&&(f=new OQ,n.updateActionCache(l,f));let d=f.getDirectionCache(r);if(!d||i){const p=this._structure.getParts(e,this._avatar.getFigure(),l,this._geometryType,r,u,this._avatar,c);d=new CQ(p),f.updateDirectionCache(r,d)}let _=d.getImageContainer(o);if(!_||i){const p=d.getPartList();if(_=this.renderBodyPart(r,p,o,a,i),_&&!i)_.isCacheable&&d.updateImageContainer(_,o);else return null}const g=this._structure.getFrameBodyPartOffset(l,r,o,e);return h.x+=g.x,h.y+=g.y,_.offset=h,_}getServerRenderData(){return this._serverRenderData=[],this._serverRenderData}getBodyPartCache(e){let t=this._cache.get(e);return t||(t=new DP,this._cache.set(e,t)),t}renderBodyPart(e,t,i,n,r=!1){if(!t||!t.length||!this._canvas&&(this._canvas=this._structure.getCanvas(this._scale,this._geometryType),!this._canvas))return null;const a=Mo.DIRECTION_IS_FLIPPED[e]||!1;let o=n.definition.assetPartDefinition,l=!0,u=t.length-1;for(;u>=0;){const _=t[u];let g=16777215;if(!(e==7&&(_.partType==="fc"||_.partType==="ey"))&&!(_.partType==="ri"&&!_.partId)){const p=_.partId,m=_.getFrameDefinition(i);let v=_.partType,E=0;m?(E=m.number,m.assetPartDefinition&&m.assetPartDefinition!==""&&(o=m.assetPartDefinition)):E=_.getFrameIndex(i);let y=e,T=!1;a&&(o==="wav"&&(v===Es.LEFT_HAND||v===Es.LEFT_SLEEVE||v===Es.LEFT_COAT_SLEEVE)||o==="drk"&&(v===Es.RIGHT_HAND||v===Es.RIGHT_SLEEVE||v===Es.RIGHT_COAT_SLEEVE)||o==="blw"&&v===Es.RIGHT_HAND||o==="sig"&&v===Es.LEFT_HAND||o==="respect"&&v===Es.LEFT_HAND||v===Es.RIGHT_HAND_ITEM||v===Es.LEFT_HAND_ITEM||v===Es.CHEST_PRINT?T=!0:(e===4?y=2:e===5?y=1:e===6&&(y=0),_.flippedPartType!==v&&(v=_.flippedPartType)));let w=this._scale+"_"+o+"_"+v+"_"+p+"_"+y+"_"+E,C=this._assets.getAsset(w);if(C||(w=this._scale+"_std_"+v+"_"+p+"_"+y+"_0",C=this._assets.getAsset(w)),C){const N=C.texture;if(!N||!N.valid||!N.baseTexture)l=!1;else{_.isColorable&&_.color&&(g=_.color.rgb);const P=new Q(-C.x,-C.y);if(T&&(P.x=P.x+(this._scale===kr.LARGE?65:31)),r){const k=new h4;k.name=this._assets.getAssetName(w),k.x=-P.x-33,k.y=-P.y,k.z=this._serverRenderData.length*-1e-4,k.width=C.rectangle.width,k.height=C.rectangle.height,k.flipH=T,o==="lay"&&(k.x=k.x+53),a&&(k.flipH=!k.flipH,k.flipH?k.x=-k.x-N.width:k.x=k.x+65),_.isColorable&&(k.color=`${g}`),this._serverRenderData.push(k)}this._unionImages.push(new LP(N,C.rectangle,P,T,g))}}}u--}if(!this._unionImages.length)return null;const c=this.createUnionImage(this._unionImages,a),h=this._scale===kr.LARGE?this._canvas.height-16:this._canvas.height-8,f=new Q(-c.regPoint.x,h-c.regPoint.y);a&&o!=="lay"&&(f.x=f.x+(this._scale===kr.LARGE?67:31));let d=this._unionImages.length-1;for(;d>=0;){const _=this._unionImages.pop();_&&_.dispose(),d--}return new wQ(c.container,f,l)}convertColorToHex(e){let t=(e*255).toString(16);return t.length<2&&(t="0"+t),t}createUnionImage(e,t){const i=new ve;for(const o of e)o&&i.enlarge(o.offsetRect);const n=new Q(-i.x,-i.y),r=new Qn,a=new kt(Ne.EMPTY);a.width=i.width,a.height=i.height,r.addChild(a);for(const o of e){if(!o)continue;const l=o.texture,u=o.colorTransform,c=!(t&&o.flipH)&&(t||o.flipH),h=n.clone();h.x-=o.regPoint.x,h.y-=o.regPoint.y,t&&(h.x=r.width-(h.x+o.rect.width)),c?(this._matrix.a=-1,this._matrix.tx=o.rect.x+o.rect.width+h.x,this._matrix.ty=h.y-o.rect.y):(this._matrix.a=1,this._matrix.tx=h.x-o.rect.x,this._matrix.ty=h.y-o.rect.y);const f=new kt(l);f.tint=u,f.transform.setFromMatrix(this._matrix),r.addChild(f)}return new LP(null,r.getLocalBounds(),n,t,null,r)}};sC.DEFAULT_MAX_CACHE_STORAGE_TIME_MS=6e4;let zR=sC;const gi=class gi{constructor(e,t,i,n,r,a=null){this._frameCounter=0,this._directionOffset=0,this._isAnimating=!1,this._animationHasResetOnToggle=!1,this._actionsSorted=!1,this._fullImageCacheSize=5,this._isCachedImage=!1,this._useFullImageCache=!1,this._effectIdInUse=-1,this._cachedBodyPartsDirection=-1,this._cachedBodyPartsGeometryType=null,this._cachedBodyPartsAvatarSet=null,this._canvasOffsets=[],this._actions=[],this._cachedBodyParts=[],this._changes=!0,this._disposed=!1,this._effectManager=r,this._structure=e,this._assets=t,this._scale=n,this._effectListener=a,this._scale==null&&(this._scale=kr.LARGE),i==null&&(i=new Hp("hr-893-45.hd-180-2.ch-210-66.lg-270-82.sh-300-91.wa-2007-.ri-1-")),this._figure=i,this._cache=new zR(this._structure,this,this._assets,this._scale),this.setDirection(gi.DEFAULT_AVATAR_SET,gi.DEFAULT_DIRECTION),this._actions=[],this._defaultAction=new BR(oe.POSTURE_STAND),this._defaultAction.definition=this._structure.getActionDefinition(gi.DEFAULT_ACTION),this.resetActions(),this._fullImageCache=new li,this._animationFrameCount=0}getServerRenderData(){return this.getAvatarPartsForCamera(_s.FULL),this._cache.getServerRenderData()}dispose(){if(!this._disposed){if(this._structure=null,this._assets=null,this._mainAction=null,this._figure=null,this._avatarSpriteData=null,this._actions=null,this._image&&(this._image.destroy(),this._image=null),this._cache&&(this._cache.dispose(),this._cache=null),this._fullImageCache){for(const e of this._fullImageCache.getValues())e&&e.destroy();this._fullImageCache=null}this._image=null,this._canvasOffsets=null,this._disposed=!0}}get disposed(){return this._disposed}getFigure(){return this._figure}getScale(){return this._scale}getPartColor(e){return this._structure.getPartColor(this._figure,e)}setDirection(e,t){t=t+this._directionOffset,tMo.MAX_DIRECTION&&(t=t-(Mo.MAX_DIRECTION+1)),this._structure.isMainAvatarSet(e)&&(this._mainDirection=t),(e===_s.HEAD||e===_s.FULL)&&(e===_s.HEAD&&this.isHeadTurnPreventedByAction()&&(t=this._mainDirection),this._headDirection=t),this._cache.setDirection(e,t),this._changes=!0}setDirectionAngle(e,t){this.setDirection(e,Math.floor(t/45))}getSprites(){return this._sprites}getCanvasOffsets(){return this._canvasOffsets}getLayerData(e){return this._structure.getBodyPartData(e.animation.id,this._frameCounter,e.id)}updateAnimationByFrames(e=1){this._frameCounter+=e,this._changes=!0}resetAnimationFrameCounter(){this._frameCounter=0,this._changes=!0}getBodyParts(e,t,i){return(i!=this._cachedBodyPartsDirection||t!=this._cachedBodyPartsGeometryType||e!=this._cachedBodyPartsAvatarSet)&&(this._cachedBodyPartsDirection=i,this._cachedBodyPartsGeometryType=t,this._cachedBodyPartsAvatarSet=e,this._cachedBodyParts=this._structure.getBodyParts(e,t,i)),this._cachedBodyParts}getAvatarPartsForCamera(e){if(this._mainAction===null||this._structure.getCanvas(this._scale,this._mainAction.definition.geometryType)===null)return;const i=this.getBodyParts(e,this._mainAction.definition.geometryType,this._mainDirection);for(let n=i.length-1;n>=0;n--){const r=i[n];this._cache.getImageContainer(r,this._frameCounter,!0)}}getImage(e,t,i=1,n=!0){if(!this._changes)return this._image;if(!this._mainAction)return null;this._actionsSorted||this.endActionAppends();const r=this._structure.getCanvas(this._scale,this._mainAction.definition.geometryType);if(!r)return null;this._image&&(this._image.width!==r.width||this._image.height!==r.height)&&(this._reusableTexture&&(this._reusableTexture.destroy(!0),this._reusableTexture=null),this._image=null,this._isCachedImage=!1);const a=this.getBodyParts(e,this._mainAction.definition.geometryType,this._mainDirection);this._image=null;const o=new Qn;let l=!0,u=a.length-1;for(;u>=0;){const c=a[u],h=this._cache.getImageContainer(c,this._frameCounter);if(h){const f=h.image;if(!f)return o.destroy({children:!0}),null;l=l&&h.isCacheable;const d=h.regPoint.clone();if(d){d.x+=r.offset.x,d.y+=r.offset.y,d.x+=r.regPoint.x,d.y+=r.regPoint.y;const _=new Qn;_.addChild(f),_&&(_.position.set(d.x,d.y),o.addChild(_))}}u--}return this._avatarSpriteData&&(o.filters||(o.filters=[]),this._avatarSpriteData.colorTransform&&o.filters.push(this._avatarSpriteData.colorTransform),this._avatarSpriteData.paletteIsGrayscale&&(this.convertToGrayscale(o),o.filters.push(new Gm(this._avatarSpriteData.reds,Gm.CHANNEL_RED)))),n?(this._reusableTexture?(oi.instance.renderer.render(o,{renderTexture:this._reusableTexture,clear:!0}),this._reusableTexture.baseTexture.hitMap=null):this._reusableTexture=St.generateTexture(o,new ve(0,0,r.width,r.height)),this._reusableTexture?(this._image=this._reusableTexture,this._changes=!1,this._image):null):St.generateTexture(o,new ve(0,0,r.width,r.height))}applyPalette(e,t=[],i=[],n=[]){const r=St.generateCanvas(e),a=r.getContext("2d"),o=a.getImageData(0,0,r.width,r.height),l=o.data;for(let c=0;c>16&255,l[c+1]=h>>8&255,l[c+2]=h&255}if(i.length==256){let h=i[l[c+1]];h===void 0&&(h=0),l[c]=h>>16&255,l[c+1]=h>>8&255,l[c+2]=h&255}if(n.length==256){let h=i[l[c+2]];h===void 0&&(h=0),l[c]=h>>16&255,l[c+1]=h>>8&255,l[c+2]=h&255}}a.putImageData(o,0,0);const u=new mt(Ne.from(r));return oi.instance.renderer.render(u,{renderTexture:e,clear:!0}),e}getImageAsSprite(e,t=1){if(!this._mainAction)return null;this._actionsSorted||this.endActionAppends();const i=this._structure.getCanvas(this._scale,this._mainAction.definition.geometryType);if(!i)return null;const n=this.getBodyParts(e,this._mainAction.definition.geometryType,this._mainDirection),r=new kt,a=new kt(Ne.EMPTY);a.width=i.width,a.height=i.height,r.addChild(a);let o=n.length-1;for(;o>=0;){const l=n[o],u=this._cache.getImageContainer(l,this._frameCounter);if(u){const c=u.image;if(!c)return r.destroy({children:!0}),null;const h=u.regPoint.clone();if(h){h.x+=i.offset.x,h.y+=i.offset.y,h.x+=i.regPoint.x,h.y+=i.regPoint.y;const f=new Qn;f.addChild(c),f.position.set(h.x,h.y),r.addChild(f)}}o--}return r}getCroppedImage(e,t=1){if(!this._mainAction)return null;this._actionsSorted||this.endActionAppends();const i=this._structure.getCanvas(this._scale,this._mainAction.definition.geometryType);if(!i)return null;const n=this.getBodyParts(e,this._mainAction.definition.geometryType,this._mainDirection),r=new Qn;let a=n.length-1;for(;a>=0;){const u=n[a],c=this._cache.getImageContainer(u,this._frameCounter);if(c){const h=c.image;if(!h)return r.destroy({children:!0}),null;const f=c.regPoint.clone();if(f){f.x+=i.offset.x,f.y+=i.offset.y,f.x+=i.regPoint.x,f.y+=i.regPoint.y;const d=new Qn;d.addChild(h),d&&(d.position.set(f.x,f.y),r.addChild(d))}}a--}const o=St.generateTexture(r,new ve(0,0,i.width,i.height)),l=St.generateImage(o);return l||null}getFullImage(e){const t=this._fullImageCache.getValue(e);return t?(t.valid||(this._fullImageCache.remove(e),t.destroy(!0)),t):null}cacheFullImage(e,t){const i=this._fullImageCache.getValue(e);if(i&&(this._fullImageCache.remove(e),i.destroy(!0)),this._fullImageCache.length===this._fullImageCacheSize){const n=this._fullImageCache.getKey(0);n&&this._fullImageCache.remove(n).destroy(!0)}this._fullImageCache.add(e,t)}getAsset(e){return this._assets.getAsset(e)}getDirection(){return this._mainDirection}initActionAppends(){this._actions=[],this._actionsSorted=!1,this._currentActionsString="",this._useFullImageCache=!1}endActionAppends(){if(this.sortActions()){for(const e of this._sortedActions)e.actionType===oe.EFFECT&&(this._effectManager.isAvatarEffectReady(parseInt(e.actionParameter))||this._effectManager.downloadAvatarEffect(parseInt(e.actionParameter),this));this.resetActions(),this.setActionsToParts()}}appendAction(e,...t){let i="";switch(this._actionsSorted=!1,t&&t.length>0&&(i=t[0]),i!=null&&(i=i.toString()),e){case oe.POSTURE:switch(i){case oe.POSTURE_LAY:case oe.POSTURE_WALK:case oe.POSTURE_STAND:case oe.POSTURE_SWIM:case oe.POSTURE_FLOAT:case oe.POSTURE_SIT:case oe.SNOWWAR_RUN:case oe.SNOWWAR_DIE_FRONT:case oe.SNOWWAR_DIE_BACK:case oe.SNOWWAR_PICK:case oe.SNOWWAR_THROW:(i===oe.POSTURE_LAY||i===oe.POSTURE_LAY||i===oe.POSTURE_LAY)&&(i===oe.POSTURE_LAY&&(this._mainDirection==0?this.setDirection(_s.FULL,4):this.setDirection(_s.FULL,2)),this._useFullImageCache=!0,this._useFullImageCache=!0),this.addActionData(i);break}break;case oe.GESTURE:switch(i){case oe.GESTURE_AGGRAVATED:case oe.GESTURE_SAD:case oe.GESTURE_SMILE:case oe.GESTURE_SURPRISED:this.addActionData(i);break}break;case oe.EFFECT:case oe.DANCE:case oe.TALK:case oe.EXPRESSION_WAVE:case oe.SLEEP:case oe.SIGN:case oe.EXPRESSION_RESPECT:case oe.EXPRESSION_BLOW_A_KISS:case oe.EXPRESSION_LAUGH:case oe.EXPRESSION_CRY:case oe.EXPRESSION_IDLE:case oe.EXPRESSION_SNOWBOARD_OLLIE:case oe.EXPRESSION_SNOWBORD_360:case oe.EXPRESSION_RIDE_JUMP:i===oe.EFFECT&&(i==="33"||i==="34"||i==="35"||i==="36"||i==="38"||i==="39")&&(this._useFullImageCache=!0),this.addActionData(e,i);break;case oe.CARRY_OBJECT:case oe.USE_OBJECT:{const n=this._structure.getActionDefinitionWithState(e);n&&(i=n.getParameterValue(i)),this.addActionData(e,i);break}}return!0}addActionData(e,t=""){let i;this._actions||(this._actions=[]);let n=0;for(;n1}resetActions(){return this._animationHasResetOnToggle=!1,this._isAnimating=!1,this._sprites=[],this._avatarSpriteData=null,this._directionOffset=0,this._structure.removeDynamicItems(this),this._mainAction=this._defaultAction,this._mainAction.definition=this._defaultAction.definition,this.resetBodyPartCache(this._defaultAction),!0}isHeadTurnPreventedByAction(){let e,t;if(this._sortedActions==null)return!1;for(const i of this._sortedActions)e=this._structure.getActionDefinitionWithState(i.actionType),e!=null&&e.getPreventHeadTurn(i.actionParameter)&&(t=!0);return t}sortActions(){let e,t,i;if(this._currentActionsString="",this._sortedActions=this._structure.sortActions(this._actions),this._animationFrameCount=this._structure.maxFrames(this._sortedActions),!this._sortedActions)this._canvasOffsets=[0,0,0],this._lastActionsString!==""&&(i=!0,this._lastActionsString="");else{this._canvasOffsets=this._structure.getCanvasOffsets(this._sortedActions,this._scale,this._mainDirection);for(const n of this._sortedActions)if(this._currentActionsString=this._currentActionsString+(n.actionType+n.actionParameter),n.actionType===oe.EFFECT){const r=parseInt(n.actionParameter);this._effectIdInUse!==r&&(e=!0),this._effectIdInUse=r,t=!0}t||(this._effectIdInUse>-1&&(e=!0),this._effectIdInUse=-1),e&&this._cache.disposeInactiveActions(0),this._lastActionsString!=this._currentActionsString&&(i=!0,this._lastActionsString=this._currentActionsString)}return this._actionsSorted=!0,i}setActionsToParts(){if(!this._sortedActions==null)return;const e=Pe(),t=[];for(const i of this._sortedActions)t.push(i.actionType);for(const i of this._sortedActions)if(i&&i.definition&&i.definition.isAnimation){const n=this._structure.getAnimation(i.definition.state+"."+i.actionParameter);if(n&&n.hasOverriddenActions()){const r=n.overriddenActionNames();if(r)for(const a of r)t.indexOf(a)>=0&&(i.overridingAction=n.overridingAction(a))}n&&n.resetOnToggle&&(this._animationHasResetOnToggle=!0)}for(const i of this._sortedActions)if(!(!i||!i.definition)&&(i.definition.isAnimation&&i.actionParameter===""&&(i.actionParameter="1"),this.setActionToParts(i,e),i.definition.isAnimation)){this._isAnimating=i.definition.isAnimated(i.actionParameter);const n=this._structure.getAnimation(i.definition.state+"."+i.actionParameter);n&&(this._sprites=this._sprites.concat(n.spriteData),n.hasDirectionData()&&(this._directionOffset=n.directionData.offset),n.hasAvatarData()&&(this._avatarSpriteData=n.avatarData))}}setActionToParts(e,t){e==null||e.definition==null||e.definition.assetPartDefinition!=""&&(e.definition.isMain&&(this._mainAction=e,this._cache.setGeometryType(e.definition.geometryType)),this._cache.setAction(e,t),this._changes=!0)}resetBodyPartCache(e){e&&e.definition.assetPartDefinition!==""&&(e.definition.isMain&&(this._mainAction=e,this._cache.setGeometryType(e.definition.geometryType)),this._cache.resetBodyPartCache(e),this._changes=!0)}get avatarSpriteData(){return this._avatarSpriteData}convertToGrayscale(e,t="CHANNELS_EQUAL"){let i=.33,n=.33,r=.33;switch(t){case gi.CHANNELS_UNIQUE:i=.3,n=.59,r=.11;break;case gi.CHANNELS_RED:i=1,n=0,r=0;break;case gi.CHANNELS_GREEN:i=0,n=1,r=0;break;case gi.CHANNELS_BLUE:i=0,n=0,r=1;break;case gi.CHANNELS_DESATURATED:i=.3086,n=.6094,r=.082;break}const a=new rv;return a.matrix=[i,n,r,0,0,i,n,r,0,0,i,n,r,0,0,0,0,0,1,0],e.filters.push(a),e}errorThis(e){}logThis(e){}isPlaceholder(){return!1}forceActionUpdate(){this._lastActionsString=""}get animationHasResetOnToggle(){return this._animationHasResetOnToggle}get mainAction(){return this._mainAction.actionType}resetEffect(e){e===this._effectIdInUse&&(this.resetActions(),this.setActionsToParts(),this._animationHasResetOnToggle=!0,this._changes=!0,this._effectListener&&this._effectListener.resetEffect(e))}};gi.CHANNELS_EQUAL="CHANNELS_EQUAL",gi.CHANNELS_UNIQUE="CHANNELS_UNIQUE",gi.CHANNELS_RED="CHANNELS_RED",gi.CHANNELS_GREEN="CHANNELS_GREEN",gi.CHANNELS_BLUE="CHANNELS_BLUE",gi.CHANNELS_DESATURATED="CHANNELS_DESATURATED",gi.DEFAULT_ACTION="Default",gi.DEFAULT_DIRECTION=2,gi.DEFAULT_AVATAR_SET=_s.FULL;let av=gi;class Wp{constructor(e){this._number=e.number,this._assetPartDefinition=e.assetPartDefinition||null}get number(){return this._number}get assetPartDefinition(){return this._assetPartDefinition}}class MQ{constructor(e){if(this._frames=[],e.frames&&e.frames.length>0)for(const t of e.frames){if(!t)continue;this._frames.push(new Wp(t));let i=t.repeats||0;if(i>1)for(;--i>0;)this._frames.push(this._frames[this._frames.length-1])}}get frames(){return this._frames}}const nc=class nc{constructor(e){if(this._id=e.id,this._actionParts=new Map,this._bodyPartOffsets=new Map,this._frameCount=0,this._frameIndexes=[],e.parts&&e.parts.length>0)for(const t of e.parts){if(!t)continue;const i=new MQ(t);this._actionParts.set(t.setType,i),this._frameCount=Math.max(this._frameCount,i.frames.length)}if(e.offsets&&e.offsets.frames&&e.offsets.frames.length>0)for(const t of e.offsets.frames){if(!t)continue;const i=t.id;this._frameCount=Math.max(this._frameCount,i);const n=new Map;if(this._bodyPartOffsets.set(i,n),t.directions&&t.directions.length>0)for(const r of t.directions){if(!r)continue;const a=r.id,o=new Map;if(n.set(a,o),r.bodyParts&&r.bodyParts.length>0)for(const l of r.bodyParts){if(!l)continue;const u=l.id;let c=0,h=0;l.dx!==void 0&&(c=l.dx),l.dy!==void 0&&(h=l.dy),o.set(u,new Q(c,h))}}if(this._frameIndexes.push(i),t.repeats!==void 0){let r=t.repeats||0;if(r>1)for(;--r>0;)this._frameIndexes.push(i)}}}getPart(e){if(!e)return null;const t=this._actionParts.get(e);return t||null}getFrameBodyPartOffset(e,t,i){const n=t%this._frameIndexes.length,r=this._frameIndexes[n],a=this._bodyPartOffsets.get(r);if(!a)return nc.DEFAULT_OFFSET;const o=a.get(e);if(!o)return nc.DEFAULT_OFFSET;const l=o.get(i);return l||nc.DEFAULT_OFFSET}get id(){return this._id}get parts(){return this._actionParts}get frameCount(){return this._frameCount}};nc.DEFAULT_OFFSET=new Q(0,0);let V_=nc;class NQ{constructor(){this._actions=new Map}parse(e){if(e&&e.length>0)for(const t of e){if(!t)continue;const i=new V_(t);this._actions.set(i.id,i)}return!0}appendJSON(e){for(const t of e.action)this._actions.set(t.id,new V_(t));return!0}getAction(e){const t=this._actions.get(e.id);return t||null}getFrameCount(e){const t=this.getAction(e);return t?t.frameCount:0}}class PQ{constructor(e,t){this._id=e.id,this._width=e.width,this._height=e.height,this._offset=new Q(e.dx,e.dy),t==kr.LARGE?this._regPoint=new Q((this._width-64)/2,0):this._regPoint=new Q((this._width-32)/2,0)}get width(){return this._width}get height(){return this._height}get offset(){return this._offset}get id(){return this._id}get regPoint(){return this._regPoint}}const uE=class uE extends fn{constructor(e,t){super(),this._dataReceiver=t,this.download(e)}download(e){fetch(e).then(t=>t.json()).then(t=>{this._dataReceiver&&this._dataReceiver.appendJSON(t),this.dispatchEvent(new Ye(uE.AVATAR_STRUCTURE_DONE))}).catch(t=>le.error(t))}};uE.AVATAR_STRUCTURE_DONE="AVATAR_STRUCTURE_DONE";let ov=uE;class kQ{constructor(e){if(!e)throw new Error("invalid_data");this._id=e.id,this._type=e.type,this._index=e.index,this._colorLayerIndex=e.colorindex,this._paletteMapId=-1,this._breed=-1}dispose(){}get id(){return this._id}get type(){return this._type}get breed(){return this._breed}get index(){return this._index}get colorLayerIndex(){return this._colorLayerIndex}get paletteMap(){return this._paletteMapId}}class xQ{constructor(e,t){if(!e||!t)throw new Error("invalid_data");this._id=t.id,this._type=e,this._gender=t.gender,this._clubLevel=t.club,this._isColorable=t.colorable,this._isSelectable=t.selectable,this._parts=[],this._hiddenLayers=[],this._isPreSelectable=t.preselectable,this._isSellable=t.sellable;for(const i of t.parts){const n=new kQ(i),r=this.getPartIndex(n);r!==-1?this._parts.splice(r,0,n):this._parts.push(n)}if(t.hiddenLayers)for(const i of t.hiddenLayers)this._hiddenLayers.push(i.partType)}dispose(){for(const e of this._parts)e.dispose();this._parts=null,this._hiddenLayers=null}getPartIndex(e){const t=this._parts.length;if(!t)return-1;for(let i=0;ie.index))return i}return-1}getPart(e,t){for(const i of this._parts)if(!(i.type!==e||i.id!==t))return i;return null}get id(){return this._id}get type(){return this._type}get gender(){return this._gender}get clubLevel(){return this._clubLevel}get isColorable(){return this._isColorable}get isSelectable(){return this._isSelectable}get parts(){return this._parts}get hiddenLayers(){return this._hiddenLayers}get isPreSelectable(){return this._isPreSelectable}get isSellable(){return this._isSellable}}class DQ{constructor(e){if(!e)throw new Error("invalid_data");this._id=e.id,this._index=e.index,this._clubLevel=e.club||0,this._isSelectable=e.selectable,this._rgb=parseInt("0x"+e.hexCode,16)}get id(){return this._id}get index(){return this._index}get clubLevel(){return this._clubLevel}get isSelectable(){return this._isSelectable}get rgb(){return this._rgb}}class UP{constructor(e){if(!e)throw new Error("invalid_data");this._id=e.id,this._colors=new li,this.append(e)}append(e){for(const t of e.colors){const i=new DQ(t);this._colors.add(t.id.toString(),i)}}getColor(e){return e===void 0||e<0?null:this._colors.getValue(e.toString())||null}get id(){return this._id}get colors(){return this._colors}}class rT{constructor(e){if(!e)throw new Error("invalid_data");this._type=e.type,this._paletteId=e.paletteId,this._isMandatory={},this._isMandatory.F=[e.mandatory_f_0,e.mandatory_f_1],this._isMandatory.M=[e.mandatory_m_0,e.mandatory_m_1],this._partSets=new li,this.append(e)}dispose(){for(const e of this._partSets.getValues())e.dispose();this._partSets=null}cleanUp(e){for(const t of e.sets){const i=t.id.toString(),n=this._partSets.getValue(i);n&&(n.dispose(),this._partSets.remove(i))}}append(e){if(!(!e||!e.sets))for(const t of e.sets)this._partSets.add(t.id.toString(),new xQ(this._type,t))}getDefaultPartSet(e){for(const t of this._partSets.getValues())if(t&&t.clubLevel===0&&(t.gender===e||t.gender==="U"))return t;return null}getPartSet(e){return this._partSets.getValue(e.toString())}get type(){return this._type}get paletteID(){return this._paletteId}isMandatory(e,t){return this._isMandatory[e.toUpperCase()][Math.min(t,1)]}optionalFromClubLevel(e){return this._isMandatory[e.toUpperCase()].indexOf(!1)}get partSets(){return this._partSets}}class LQ{constructor(){this._palettes=new Map,this._setTypes=new Map}dispose(){}parse(e){if(!e)return!1;for(const t of e.palettes){const i=new UP(t);i&&this._palettes.set(i.id.toString(),i)}for(const t of e.setTypes){const i=new rT(t);i&&this._setTypes.set(i.type,i)}return!0}injectJSON(e){for(const t of e.setTypes){const i=this._setTypes.get(t.type);i?i.cleanUp(t):this._setTypes.set(t.type,new rT(t))}this.appendJSON(e)}appendJSON(e){if(!e)return!1;for(const t of e.palettes){const i=t.id.toString(),n=this._palettes.get(i);n?n.append(t):this._palettes.set(i,new UP(t))}for(const t of e.setTypes){const i=t.type,n=this._setTypes.get(i);n?n.append(t):this._setTypes.set(i,new rT(t))}return!1}getMandatorySetTypeIds(e,t){const i=[];for(const n of this._setTypes.values())!n||!n.isMandatory(e,t)||i.push(n.type);return i}getDefaultPartSet(e,t){const i=this._setTypes.get(e);return i?i.getDefaultPartSet(t):null}getSetType(e){return this._setTypes.get(e)||null}getPalette(e){return this._palettes.get(e.toString())||null}getFigurePartSet(e){for(const t of this._setTypes.values()){const i=t.getPartSet(e);if(i)return i}return null}}class FP{constructor(e){if(this._id=e.id,this._parts=[],e.activeParts&&e.activeParts.length>0)for(const t of e.activeParts)t&&this._parts.push(t.setType)}get parts(){return this._parts}}class aT{constructor(e){if(!e)throw new Error("invalid_data");this._setType=e.setType,this._flippedSetType=e.flippedSetType||null,this._removeSetType=e.removeSetType||null,this._appendToFigure=!1,this._staticId=-1}hasStaticId(){return this._staticId>=0}get staticId(){return this._staticId}set staticId(e){this._staticId=e}get setType(){return this._setType}get flippedSetType(){return this._flippedSetType}set flippedSetType(e){this._flippedSetType=e}get removeSetType(){return this._removeSetType}get appendToFigure(){return this._appendToFigure}set appendToFigure(e){this._appendToFigure=e}}class UQ{constructor(){this._parts=new Map,this._activePartSets=new Map}parse(e){if(e.partSet&&e.partSet.length>0)for(const t of e.partSet)t&&this._parts.set(t.setType,new aT(t));if(e.activePartSets&&e.activePartSets.length>0)for(const t of e.activePartSets)t&&this._activePartSets.set(t.id,new FP(t));return!0}appendJSON(e){if(e.partSet&&e.partSet.length>0)for(const t of e.partSet)t&&this._parts.set(t.setType,new aT(t));if(e.activePartSets&&e.activePartSets.length>0)for(const t of e.activePartSets)t&&this._activePartSets.set(t.id,new FP(t));return!1}getActiveParts(e){const t=this._activePartSets.get(e.activePartSet);return t?t.parts:[]}getPartDefinition(e){const t=this._parts.get(e);return t||null}addPartDefinition(e){const t=e.setType;let i=this._parts.get(t);return i||(i=new aT(e),this._parts.set(t,i)),i}getActivePartSet(e){const t=this._activePartSets.get(e.activePartSet);return t||null}get parts(){return this._parts}get activePartSets(){return this._activePartSets}}class oT{constructor(e,t,i,n,r,a,o,l,u="",c=!1,h=1){this._bodyPartId=e,this._partType=t,this._partId=i,this._color=n,this._frames=r,this._action=a,this._isColorable=o,this._paletteMapId=l,this._flippedPartType=u,this._isBlendable=c,this._blendTransform=null,this._partType==="ey"&&(this._isColorable=!1)}getFrameIndex(e){if(!this._frames||!this._frames.length)return 0;const t=e%this._frames.length;return this._frames[t]instanceof Wp?this._frames[t].number:t}getFrameDefinition(e){const t=e%this._frames.length;return this._frames&&this._frames.length>t&&this._frames[t]instanceof Wp?this._frames[t]:null}getCacheableKey(e){const t=e%this._frames.length;if(this._frames&&this._frames.length>t&&this._frames[t]instanceof Wp){const i=this._frames[t];return this.partId+":"+i.assetPartDefinition+":"+i.number}return this.partId+":"+t}get bodyPartId(){return this._bodyPartId}get partType(){return this._partType}get partId(){return this._partId}get color(){return this._color}get action(){return this._action}get isColorable(){return this._isColorable}set isColorable(e){this._isColorable=e}get paletteMapId(){return this._paletteMapId}get flippedPartType(){return this._flippedPartType}get isBlendable(){return this._isBlendable}toString(){return[this._bodyPartId,this._partType,this._partId].join(":")}}const _e=class _e{constructor(){this._gender="M",this._avatarEffectType=-1}loadAvatarData(e,t){this._data=new Map,this._colors=new Map,this._gender=t,this.parseFigureString(e)}dispose(){this._data=null,this._colors=null,this._isDisposed=!0}get disposed(){return this._isDisposed}parseFigureString(e){if(e)for(const t of e.split(".")){const i=t.split("-");if(i.length>0){const n=i[0],r=parseInt(i[1]),a=[];let o=2;for(;o=0?this._data.set(e,t):this._data.delete(e)}}savePartSetColourId(e,t,i=!0){switch(e){case _e.HD:case _e.HAIR:case _e.HAT:case _e.HEAD_ACCESSORIES:case _e.EARRINGS:case _e.EYE_ACCESSORIES:case _e.FACE_ACCESSORIES:case _e.SHIRT:case _e.JACKET:case _e.CHEST_ACCESSORIES:case _e.PURSES:case _e.BACKPACKS:case _e.CHEST_PRINTS:case _e.TROUSERS:case _e.SHOES:case _e.TROUSER_ACCESSORIES:this._colors.set(e,t);return}}getFigureStringWithFace(e){const t=[_e.HD];let i="";const n=[];for(const a of t){const o=this._colors.get(a);if(o){let l=this._data.get(a);a===_e.HD&&(l=e);let u=a+"-"+l;if(l>=0){let c=0;for(;ce&&(e=this._data[t]),t++;return e}getMin(){let e=Number.MAX_VALUE,t=0;for(;t=0||i.push(n);return i}mouseEvent(e,t){}useObject(){}setObject(e){if(this._object!==e){if(this._object&&this._object.setLogic(null),!e){this.dispose(),this._object=null;return}this._object=e,this._object.setLogic(this)}}tearDown(){}get object(){return this._object}get eventDispatcher(){return this._events}set eventDispatcher(e){this._events=e}get widget(){return null}get contextMenu(){return null}get time(){return this._time}}class c4{constructor(){this._map=new Map,this._updateCounter=0}dispose(){this._map.clear(),this._updateCounter=0}getValue(e){return this._map.get(e)}setValue(e,t){this._map.has(e)&&this._map.get(e)===t||(this._map.set(e,t),this._updateCounter++)}removeKey(e){e&&(this._map.delete(e),this._updateCounter++)}get updateCounter(){return this._updateCounter}}const hE=class hE extends Bs{constructor(e,t,i){super(),this._id=e,this._instanceId=hE.OBJECT_COUNTER++,this._type=i,this._model=new c4,this._location=new M,this._direction=new M,this._states=[],this._visualization=null,this._logic=null,this._pendingLogicMessages=[],this._updateCounter=0,this._isReady=!1;let n=t-1;for(;n>=0;)this._states[n]=0,n--}onDispose(){this._pendingLogicMessages=[],this.setVisualization(null),this.setLogic(null),this._model&&this._model.dispose(),super.onDispose()}getLocation(){return this._location}setLocation(e){e&&(e.x===this._location.x&&e.y===this._location.y&&e.z===this._location.z||(this._location.x=e.x,this._location.y=e.y,this._location.z=e.z,this._updateCounter++))}getDirection(){return this._direction}setDirection(e){e&&(e.x===this._direction.x&&e.y===this._direction.y&&e.z===this._direction.z||(this._direction.x=(e.x%360+360)%360,this._direction.y=(e.y%360+360)%360,this._direction.z=(e.z%360+360)%360,this._updateCounter++))}getState(e=0){return e>=0&&e=0&&t=0&&e=this._sprites.length?this._sprites.push(t):this._sprites.splice(e,0,t),t}createSprites(e){for(;this._sprites.length>e;){const t=this._sprites[this._sprites.length-1];t&&t.dispose(),this._sprites.pop()}for(;this._sprites.lengthc.relativeDepth-u.relativeDepth);const o=new Qn;for(a=0;at.right&&(t.width=o.x+n.width-t.x),o.y+n.height>t.bottom&&(t.height=o.y+n.height-t.y))}i++}return t}get instanceId(){return this._id}get object(){return this._object}set object(e){this._object=e}get asset(){return this._asset}set asset(e){this._asset&&this._asset.removeReference(),this._asset=e,this._asset&&this._asset.addReference()}get sprites(){return this._sprites}get totalSprites(){return this._sprites.length}get updateObjectCounter(){return this._updateObjectCounter}set updateObjectCounter(e){this._updateObjectCounter=e}get updateModelCounter(){return this._updateModelCounter}set updateModelCounter(e){this._updateModelCounter=e}get updateSpriteCounter(){return this._updateSpriteCounter}set updateSpriteCounter(e){this._updateSpriteCounter=e}get spriteCount(){return this._sprites.length}};fE.VISUALIZATION_COUNTER=0;let Kc=fE;class FQ{constructor(e){this._roomObjectVariableAccurateZ=e||"",this._location=new M,this._screenLocation=new M,this._locationChanged=!1,this._geometryUpdateId=-1,this._objectUpdateId=-1}dispose(){this._screenLocation=null}updateLocation(e,t){if(!e||!t)return null;let i=!1;const n=e.getLocation();if((t.updateId!==this._geometryUpdateId||e.updateCounter!==this._objectUpdateId)&&(this._objectUpdateId=e.updateCounter,(t.updateId!==this._geometryUpdateId||n.x!==this._location.x||n.y!==this._location.y||n.z!==this._location.z)&&(this._geometryUpdateId=t.updateId,this._location.assign(n),i=!0)),this._locationChanged=i,this._locationChanged){const r=t.getScreenPosition(n);if(!r)return null;const a=e.model.getValue(this._roomObjectVariableAccurateZ);if(isNaN(a)||a===0){const o=new M(Math.round(n.x),Math.round(n.y),n.z);if(o.x!==n.x||o.y!==n.y){const l=t.getScreenPosition(o);this._screenLocation.assign(r),l&&(this._screenLocation.z=l.z)}else this._screenLocation.assign(r)}else this._screenLocation.assign(r);this._screenLocation.x=Math.round(this._screenLocation.x),this._screenLocation.y=Math.round(this._screenLocation.y)}return this._screenLocation}get locationChanged(){return this._locationChanged}}class BQ{constructor(){this._sprites=[],this._updateId1=-1,this._updateId2=-1,this._isEmpty=!1}get spriteCount(){return this._sprites.length}get isEmpty(){return this._isEmpty}dispose(){this.setSpriteCount(0)}addSprite(e){this._sprites.push(e)}getSprite(e){return this._sprites[e]}get sprites(){return this._sprites}needsUpdate(e,t){return e===this._updateId1&&t===this._updateId2?!1:(this._updateId1=e,this._updateId2=t,!0)}setSpriteCount(e){if(e=0||n.name.indexOf("%group.badge.url%")>=0)&&r.width<=Vd.MAX_SIZE_FOR_AVG_COLOR&&r.height<=Vd.MAX_SIZE_FOR_AVG_COLOR&&n.sprite.name.indexOf("external_image_wallitem")===0&&(r.frame=!0),e.push(r)}}}return!e||!e.length?null:e}isSkewedSprite(e){return e.type?e.type.indexOf("external_image_wallitem")===0&&e.tag==="THUMBNAIL"||e.type.indexOf("guild_forum")===0&&e.tag==="THUMBNAIL":!1}getPlaneSortableSprites(){const e=[];for(const t of this._data.values())for(const i of t.sprites.sprites)i.sprite.spriteType===Js.ROOM_PLANE&&e.push(i);return e}};Vd.MAX_SIZE_FOR_AVG_COLOR=200;let YR=Vd;/*! * @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 va;(function(s){s.MITER="miter",s.BEVEL="bevel",s.ROUND="round"})(va||(va={}));var ko;(function(s){s.BUTT="butt",s.ROUND="round",s.SQUARE="square"})(ko||(ko={}));var j_={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount:function(s,e){if(e===void 0&&(e=20),!this.adaptive||!s||isNaN(s))return e;var t=Math.ceil(s/this.maxLength);return tthis.maxSegments&&(t=this.maxSegments),t}},f4=function(){function s(){this.color=16777215,this.alpha=1,this.texture=Ne.WHITE,this.matrix=null,this.visible=!1,this.reset()}return s.prototype.clone=function(){var e=new s;return e.color=this.color,e.alpha=this.alpha,e.texture=this.texture,e.matrix=this.matrix,e.visible=this.visible,e},s.prototype.reset=function(){this.color=16777215,this.alpha=1,this.texture=Ne.WHITE,this.matrix=null,this.visible=!1},s.prototype.destroy=function(){this.texture=null,this.matrix=null},s}();/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var XR=function(s,e){return XR=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])},XR(s,e)};function Aw(s,e){XR(s,e);function t(){this.constructor=s}s.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function BP(s,e){var t,i;e===void 0&&(e=!1);var n=s.length;if(!(n<6)){for(var r=0,a=0,o=s[n-2],l=s[n-1];a0||e&&r<=0)for(var h=n/2,a=h+h%2;a=6){BP(t,!1);for(var a=[],o=0;o=0&&o>=0&&n>=0&&r>=0)){e.length=0;return}var d=Math.ceil(2.3*Math.sqrt(a+o)),_=d*8+(n?4:0)+(r?4:0);if(e.length=_,_!==0){if(d===0){e.length=8,e[0]=e[6]=t+n,e[1]=e[3]=i+r,e[2]=e[4]=t-n,e[5]=e[7]=i-r;return}var g=0,p=d*4+(n?2:0)+2,m=p,v=_;{var E=n+a,y=r,T=t+E,w=t-E,C=i+y;if(e[g++]=T,e[g++]=C,e[--p]=C,e[--p]=w,r){var N=i-y;e[m++]=w,e[m++]=N,e[--v]=N,e[--v]=T}}for(var P=1;Ph&&(h+=Math.PI*2);var f=c,d=h-c,_=Math.abs(d),g=Math.sqrt(l*l+u*u),p=(15*_*Math.sqrt(g)/Math.PI>>0)+1,m=d/p;if(f+=m,o){a.push(s,e),a.push(t,i);for(var v=1,E=f;v=0&&(r.join===va.ROUND?_+=El(T,w,T-P*G,w-k*G,T-L*G,w-j*G,f,!1)+4:_+=2,f.push(T-L*Y,w-j*Y),f.push(T+L*G,w+j*G));continue}var De=(-P+E)*(-k+w)-(-P+T)*(-k+y),we=(-L+C)*(-j+w)-(-L+T)*(-j+N),it=(H*we-B*De)/xe,at=($*De-J*we)/xe,bt=(it-T)*(it-T)+(at-w)*(at-w),At=T+(it-T)*G,ct=w+(at-w)*G,Qe=T-(it-T)*Y,gt=w-(at-w)*Y,ki=Math.min(H*H+J*J,B*B+$*$),Ue=me?G:Y,st=ki+Ue*Ue*m,ot=bt<=st;ot?r.join===va.BEVEL||bt/m>v?(me?(f.push(At,ct),f.push(T+P*Y,w+k*Y),f.push(At,ct),f.push(T+L*Y,w+j*Y)):(f.push(T-P*G,w-k*G),f.push(Qe,gt),f.push(T-L*G,w-j*G),f.push(Qe,gt)),_+=2):r.join===va.ROUND?me?(f.push(At,ct),f.push(T+P*Y,w+k*Y),_+=El(T,w,T+P*Y,w+k*Y,T+L*Y,w+j*Y,f,!0)+4,f.push(At,ct),f.push(T+L*Y,w+j*Y)):(f.push(T-P*G,w-k*G),f.push(Qe,gt),_+=El(T,w,T-P*G,w-k*G,T-L*G,w-j*G,f,!1)+4,f.push(T-L*G,w-j*G),f.push(Qe,gt)):(f.push(At,ct),f.push(Qe,gt)):(f.push(T-P*G,w-k*G),f.push(T+P*Y,w+k*Y),r.join===va.ROUND?me?_+=El(T,w,T+P*Y,w+k*Y,T+L*Y,w+j*Y,f,!0)+2:_+=El(T,w,T-P*G,w-k*G,T-L*G,w-j*G,f,!1)+2:r.join===va.MITER&&bt/m<=v&&(me?(f.push(Qe,gt),f.push(Qe,gt)):(f.push(At,ct),f.push(At,ct)),_+=2),f.push(T-L*G,w-j*G),f.push(T+L*Y,w+j*Y),_+=2)}E=i[(d-2)*2],y=i[(d-2)*2+1],T=i[(d-1)*2],w=i[(d-1)*2+1],P=-(y-w),k=E-T,z=Math.sqrt(P*P+k*k),P/=z,k/=z,P*=p,k*=p,f.push(T-P*G,w-k*G),f.push(T+P*Y,w+k*Y),l||(r.cap===ko.ROUND?_+=El(T-P*(G-Y)*.5,w-k*(G-Y)*.5,T-P*G,w-k*G,T+P*Y,w+k*Y,f,!1)+2:r.cap===ko.SQUARE&&(_+=GP(T,w,P,k,G,Y,!1,f)));for(var Hi=e.indices,Ge=j_.epsilon*j_.epsilon,K=g;K<_+g-2;++K)E=f[K*2],y=f[K*2+1],T=f[(K+1)*2],w=f[(K+1)*2+1],C=f[(K+2)*2],N=f[(K+2)*2+1],!(Math.abs(E*(w-N)+T*(N-y)+C*(y-w))f*u}},s.arc=function(e,t,i,n,r,a,o,l,u){for(var c=o-a,h=j_._segmentsCount(Math.abs(c)*r,Math.ceil(Math.abs(c)/k_)*40),f=c/(h*2),d=f*2,_=Math.cos(f),g=Math.sin(f),p=h-1,m=p%1/p,v=0;v<=p;++v){var E=v+m*v,y=f+a+d*E,T=Math.cos(y),w=-Math.sin(y);u.push((_*T+g*w)*r+i,(_*-w+g*T)*r+n)}},s}(),WQ=function(){function s(){}return s.curveLength=function(e,t,i,n,r,a,o,l){for(var u=10,c=0,h=0,f=0,d=0,_=0,g=0,p=0,m=0,v=0,E=0,y=0,T=e,w=t,C=1;C<=u;++C)h=C/u,f=h*h,d=f*h,_=1-h,g=_*_,p=g*_,m=p*e+3*g*h*i+3*_*f*r+d*o,v=p*t+3*g*h*n+3*_*f*a+d*l,E=T-m,y=w-v,T=m,w=v,c+=Math.sqrt(E*E+y*y);return c},s.curveTo=function(e,t,i,n,r,a,o){var l=o[o.length-2],u=o[o.length-1];o.length-=2;var c=j_._segmentsCount(s.curveLength(l,u,e,t,i,n,r,a)),h=0,f=0,d=0,_=0,g=0;o.push(l,u);for(var p=1,m=0;p<=c;++p)m=p/c,h=1-m,f=h*h,d=f*h,_=m*m,g=_*m,o.push(d*l+3*f*m*e+3*h*_*i+g*r,d*u+3*f*m*t+3*h*_*n+g*a)},s}(),YQ=function(){function s(){}return s.curveLength=function(e,t,i,n,r,a){var o=e-2*i+r,l=t-2*n+a,u=2*i-2*e,c=2*n-2*t,h=4*(o*o+l*l),f=4*(o*u+l*c),d=u*u+c*c,_=2*Math.sqrt(h+f+d),g=Math.sqrt(h),p=2*h*g,m=2*Math.sqrt(d),v=f/g;return(p*_+g*f*(_-m)+(4*d*h-f*f)*Math.log((2*g+v+_)/(v+m)))/(4*p)},s.curveTo=function(e,t,i,n,r){for(var a=r[r.length-2],o=r[r.length-1],l=j_._segmentsCount(s.curveLength(a,o,e,t,i,n)),u=0,c=0,h=1;h<=l;++h){var f=h/l;u=a+(e-a)*f,c=o+(t-o)*f,r.push(u+(e+(i-e)*f-u)*f,c+(t+(n-t)*f-c)*f)}},s}(),XQ=function(){function s(){this.reset()}return s.prototype.begin=function(e,t,i){this.reset(),this.style=e,this.start=t,this.attribStart=i},s.prototype.end=function(e,t){this.attribSize=t-this.attribStart,this.size=e-this.start},s.prototype.reset=function(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0},s}(),yl,lT=(yl={},yl[Ci.POLY]=d4,yl[Ci.CIRC]=uv,yl[Ci.ELIP]=uv,yl[Ci.RECT]=VQ,yl[Ci.RREC]=jQ,yl),zP=[],dp=[],HP=function(){function s(e,t,i,n){t===void 0&&(t=null),i===void 0&&(i=null),n===void 0&&(n=null),this.points=[],this.holes=[],this.shape=e,this.lineStyle=i,this.fillStyle=t,this.matrix=n,this.type=e.type}return s.prototype.clone=function(){return new s(this.shape,this.fillStyle,this.lineStyle,this.matrix)},s.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},s}(),ah=new Q,KQ=function(s){Aw(e,s);function e(){var t=s.call(this)||this;return t.closePointEps=1e-4,t.boundsPadding=0,t.uvsFloat32=null,t.indicesUint16=null,t.batchable=!1,t.points=[],t.colors=[],t.uvs=[],t.indices=[],t.textureIds=[],t.graphicsData=[],t.drawCalls=[],t.batchDirty=-1,t.batches=[],t.dirty=0,t.cacheDirty=-1,t.clearDirty=0,t.shapeIndex=0,t._bounds=new Fm,t.boundsDirty=-1,t}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 t=0;t0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this},e.prototype.drawShape=function(t,i,n,r){i===void 0&&(i=null),n===void 0&&(n=null),r===void 0&&(r=null);var a=new HP(t,i,n,r);return this.graphicsData.push(a),this.dirty++,this},e.prototype.drawHole=function(t,i){if(i===void 0&&(i=null),!this.graphicsData.length)return null;var n=new HP(t,null,null,i),r=this.graphicsData[this.graphicsData.length-1];return n.lineStyle=r.lineStyle,r.holes.push(n),this.dirty++,this},e.prototype.destroy=function(){s.prototype.destroy.call(this);for(var t=0;t0&&(n=this.batches[this.batches.length-1],r=n.style);for(var a=this.shapeIndex;a65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&E===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=E?new Uint32Array(this.indices):new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}},e.prototype._compareStyles=function(t,i){return!(!t||!i||t.texture.baseTexture!==i.texture.baseTexture||t.color+t.alpha!==i.color+i.alpha||!!t.native!=!!i.native)},e.prototype.validateBatching=function(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(var t=0,i=this.graphicsData.length;t65535*2)return!1;for(var t=this.batches,i=0;i0&&(a=dp.pop(),a||(a=new ZI,a.texArray=new JI),this.drawCalls.push(a)),a.start=f,a.size=0,a.texArray.count=0,a.type=h),p.touched=1,p._batchEnabled=t,p._batchLocation=o,p.wrapMode=Pa.REPEAT,a.texArray.elements[a.texArray.count++]=p,o++)),a.size+=d.size,f+=d.size,u=p._batchLocation,this.addColors(n,g.color,g.alpha,d.attribSize,d.attribStart),this.addTextureIds(r,u,d.attribSize,d.attribStart)}pt._globalBatch=t,this.packAttributes()},e.prototype.packAttributes=function(){for(var t=this.points,i=this.uvs,n=this.colors,r=this.textureIds,a=new ArrayBuffer(t.length*3*4),o=new Float32Array(a),l=new Uint32Array(a),u=0,c=0;c>16)+(i&65280)+((i&255)<<16),l=RU(o,n);t.length=Math.max(t.length,a+r);for(var u=0;u0&&t.alpha>0;return i?(t.matrix&&(t.matrix=t.matrix.clone(),t.matrix.invert()),Object.assign(this._lineStyle,{visible:i},t)):this._lineStyle.reset(),this},e.prototype.startPoly=function(){if(this.currentPath){var t=this.currentPath.points,i=this.currentPath.points.length;i>2&&(this.drawShape(this.currentPath),this.currentPath=new zp,this.currentPath.closeStroke=!1,this.currentPath.points.push(t[i-2],t[i-1]))}else this.currentPath=new zp,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(t,i){return this.startPoly(),this.currentPath.points[0]=t,this.currentPath.points[1]=i,this},e.prototype.lineTo=function(t,i){this.currentPath||this.moveTo(0,0);var n=this.currentPath.points,r=n[n.length-2],a=n[n.length-1];return(r!==t||a!==i)&&n.push(t,i),this},e.prototype._initCurve=function(t,i){t===void 0&&(t=0),i===void 0&&(i=0),this.currentPath?this.currentPath.points.length===0&&(this.currentPath.points=[t,i]):this.moveTo(t,i)},e.prototype.quadraticCurveTo=function(t,i,n,r){this._initCurve();var a=this.currentPath.points;return a.length===0&&this.moveTo(0,0),YQ.curveTo(t,i,n,r,a),this},e.prototype.bezierCurveTo=function(t,i,n,r,a,o){return this._initCurve(),WQ.curveTo(t,i,n,r,a,o,this.currentPath.points),this},e.prototype.arcTo=function(t,i,n,r,a){this._initCurve(t,i);var o=this.currentPath.points,l=jP.curveTo(t,i,n,r,a,o);if(l){var u=l.cx,c=l.cy,h=l.radius,f=l.startAngle,d=l.endAngle,_=l.anticlockwise;this.arc(u,c,h,f,d,_)}return this},e.prototype.arc=function(t,i,n,r,a,o){if(o===void 0&&(o=!1),r===a)return this;!o&&a<=r?a+=k_:o&&r<=a&&(r+=k_);var l=a-r;if(l===0)return this;var u=t+Math.cos(r)*n,c=i+Math.sin(r)*n,h=this._geometry.closePointEps,f=this.currentPath?this.currentPath.points:null;if(f){var d=Math.abs(f[f.length-2]-u),_=Math.abs(f[f.length-1]-c);d0;return i?(t.matrix&&(t.matrix=t.matrix.clone(),t.matrix.invert()),Object.assign(this._fillStyle,{visible:i},t)):this._fillStyle.reset(),this},e.prototype.endFill=function(){return this.finishPoly(),this._fillStyle.reset(),this},e.prototype.drawRect=function(t,i,n,r){return this.drawShape(new ve(t,i,n,r))},e.prototype.drawRoundedRect=function(t,i,n,r,a){return this.drawShape(new kX(t,i,n,r,a))},e.prototype.drawCircle=function(t,i,n){return this.drawShape(new NX(t,i,n))},e.prototype.drawEllipse=function(t,i,n,r){return this.drawShape(new PX(t,i,n,r))},e.prototype.drawPolygon=function(){for(var t=arguments,i=[],n=0;n>16&255)/255*a,o.tint[1]=(r>>8&255)/255*a,o.tint[2]=(r&255)/255*a,o.tint[3]=a,t.shader.bind(i),t.geometry.bind(n,i),t.state.set(this.state);for(var u=0,c=l.length;u>16)+(u&65280)+((u&255)<<16)}}},e.prototype.calculateVertices=function(){var t=this.transform._worldID;if(this._transformID!==t){this._transformID=t;for(var i=this.transform.worldTransform,n=i.a,r=i.b,a=i.c,o=i.d,l=i.tx,u=i.ty,c=this._geometry.points,h=this.vertexData,f=0,d=0;d>16&255)/255,t[1]=(e>>8&255)/255,t[2]=(e&255)/255,t}static hex2rgba(e,t=[]){return t[0]=(e>>16&255)/255,t[1]=(e>>8&255)/255,t[2]=(e&255)/255,t[3]=e&255,t}static rgb2hex(e){return(e[0]*255<<16)+(e[1]*255<<8)+(e[2]*255|0)}static rgba2hex(e){return(e[0]*255<<16)+(e[1]*255<<8)+(e[2]*255|0)+(e[3]|0)}static rgbStringToHex(e){const t=e.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);return"#"+gr.getHex(t[1])+gr.getHex(t[2])+gr.getHex(t[3])}static getHex(e){return isNaN(e)?"00":gr.HEX_DIGITS[(e-e%16)/16]+gr.HEX_DIGITS[e%16]}static int2rgb(e){e>>>=0;const t=e&255,i=(e&65280)>>>8;return"rgba("+[(e&16711680)>>>16,i,t,1].join(",")+")"}static rgbToHSL(e){const t=(e>>16&255)/255,i=(e>>8&255)/255,n=(e&255)/255,r=Math.max(t,i,n),a=Math.min(t,i,n),o=r-a;let l=0,u=0,c=0;o==0?l=0:r==t?i>n?l=60*(i-n)/o:l=60*(i-n)/o+360:r==i?l=60*(n-t)/o+120:r==n&&(l=60*(t-i)/o+240),u=.5*(r+a),o==0?c=0:u<=.5?c=o/u*.5:c=o/(1-u)*.5;const h=Math.round(l/360*255),f=Math.round(c*255),d=Math.round(u*255);return(h<<16)+(f<<8)+d}static hslToRGB(e){let t,i,n,r,a;const o=(e>>16&255)/255,l=(e>>8&255)/255,u=(e&255)/255;let c=0,h=0,f=0;l>0?(t=0,i=0,u<.5?t=u*(1+l):t=u+l-u*l,i=2*u-t,n=o+1/3,r=o,a=o-1/3,n<0?n=n+1:n>1&&n--,r<0?r=r+1:r>1&&r--,a<0?a=a+1:a>1&&a--,n*6<1?c=i+(t-i)*6*n:n*2<1?c=t:n*3<2?c=i+(t-i)*6*(2/3-n):c=i,r*6<1?h=i+(t-i)*6*r:r*2<1?h=t:r*3<2?h=i+(t-i)*6*(2/3-r):h=i,a*6<1?f=i+(t-i)*6*a:a*2<1?f=t:a*3<2?f=i+(t-i)*6*(2/3-a):f=i):(c=u,h=u,f=u);const d=Math.round(c*255),_=Math.round(h*255),g=Math.round(f*255);return(d<<16)+(_<<8)+g}static rgb2xyz(e){let t=(e>>16&255)/255,i=(e>>8&255)/255,n=(e>>0&255)/255;return t>.04045?t=Math.pow((t+.055)/1.055,2.4):t=t/12.92,i>.04045?i=Math.pow((i+.055)/1.055,2.4):i=i/12.92,n>.04045?n=Math.pow((n+.055)/1.055,2.4):n=n/12.92,t=t*100,i=i*100,n=n*100,new M(t*.4124+i*.3576+n*.1805,t*.2126+i*.7152+n*.0722,t*.0193+i*.1192+n*.9505)}static xyz2CieLab(e){let t=e.x/95.047,i=e.y/100,n=e.z/108.883;return t>.008856?t=Math.pow(t,1/3):t=7.787*t+16/116,i>.008856?i=Math.pow(i,1/3):i=7.787*i+16/116,n>.008856?n=Math.pow(n,1/3):n=7.787*n+16/116,new M(116*i-16,500*(t-i),200*(i-n))}static rgb2CieLab(e){return gr.xyz2CieLab(gr.rgb2xyz(e))}static colorize(e,t){if(t===4294967295)return e;let i=t>>16&255,n=t>>8&255,r=t&255;return i=(e>>16&255)*i/255,n=(e>>8&255)*n/255,r=(e&255)*r/255,(e&&4278190080)|i<<16|n<<8|r}};gr.HEX_DIGITS=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];let z_=gr;class WP{constructor(e){e<0&&(e=0),this._reservedNumbers=[],this._freeNumbers=[];let t=0;for(;t0){const e=this._freeNumbers.pop();return this._reservedNumbers.push(e),e}return-1}freeNumber(e){const t=this._reservedNumbers.indexOf(e);t>=0&&(this._reservedNumbers.splice(t,1),this._freeNumbers.push(e))}}class QQ{static getFlipHBitmapData(e){if(!e)return null;const t=St.createRenderTexture(e.width,e.height),i=new dt;return i.scale(-1,1),i.translate(e.width,0),oi.instance.renderer.render(new mt(e),{renderTexture:t,clear:!0,transform:i}),t}static getFlipVBitmapData(e){if(!e)return null;const t=new dt;t.scale(1,-1),t.translate(0,e.height);const i=new qc;return i.beginTextureFill({texture:e,matrix:t}).drawRect(0,0,e.width,e.height).endFill(),St.generateTexture(i)}static getFlipHVBitmapData(e){if(!e)return null;const t=new dt;t.scale(-1,-1),t.translate(e.width,e.height);const i=new qc;return i.beginTextureFill({texture:e,matrix:t}).drawRect(0,0,e.width,e.height).endFill(),St.generateTexture(i)}}const Oe=class Oe{static init(e,t){Oe._currentDelta=0,Oe._startDelayMs=e,Oe._effectDurationMs=t,Oe._initializationTimeMs=Pe(),Oe._state=Oe.STATE_START_DELAY}static turnVisualizationOn(){if(Oe._state===Oe.STATE_NOT_INITIALIZED||Oe._state===Oe.STATE_OVER)return;const e=Pe()-Oe._initializationTimeMs;if(e>Oe._startDelayMs+Oe._effectDurationMs){Oe._state=Oe.STATE_OVER;return}if(Oe._visualizationOn=!0,ethis._clipFar)return null;let n=M.scalarProjection(t,this._x),r=-M.scalarProjection(t,this._y);n=n*this._scale,r=r*this._scale;const a=this.getDisplacenent(e);return a!=null&&(t=M.dif(e,this._loc),t.add(a),t.x=t.x*this._x_scale,t.y=t.y*this._y_scale,t.z=t.z*this._z_scale,i=M.scalarProjection(t,this._depth)),t.x=n,t.y=r,t.z=i,t}getScreenPoint(e){const t=this.getScreenPosition(e);return t==null?null:new Q(t.x,t.y)}getPlanePosition(e,t,i,n){let r,a;const o=e.x/this._scale,l=-e.y/this._scale,u=M.product(this._x,o);u.add(M.product(this._y,l));const c=new M(this._loc.x*this._x_scale,this._loc.y*this._y_scale,this._loc.z*this._z_scale);c.add(u);const h=this._z,f=new M(t.x*this._x_scale,t.y*this._y_scale,t.z*this._z_scale),d=new M(i.x*this._x_scale,i.y*this._y_scale,i.z*this._z_scale),_=new M(n.x*this._x_scale,n.y*this._y_scale,n.z*this._z_scale),g=M.crossProduct(d,_),p=new M;return p.assign(pr.getIntersectionVector(c,h,f,g)),p!=null?(p.subtract(f),r=M.scalarProjection(p,i)/d.length*i.length,a=M.scalarProjection(p,n)/_.length*n.length,new Q(r,a)):null}performZoom(){this.isZoomedIn()?this.scale=pr.SCALE_ZOOMED_OUT:this.scale=pr.SCALE_ZOOMED_IN}isZoomedIn(){return this.scale==pr.SCALE_ZOOMED_IN}performZoomOut(){this.scale=pr.SCALE_ZOOMED_OUT}performZoomIn(){this.scale=pr.SCALE_ZOOMED_IN}};pr.SCALE_ZOOMED_IN=64,pr.SCALE_ZOOMED_OUT=32;let Bu=pr;const jd=class jd{static makeRoomPreviewerId(e){return(e&65535)+jd.PREVIEW_ROOM_ID_BASE}static isRoomPreviewerId(e){return e>=jd.PREVIEW_ROOM_ID_BASE}};jd.PREVIEW_ROOM_ID_BASE=2147418112;let hv=jd;const vn=class vn{static init(e,t){this._SafeStr_4513=0,this._SafeStr_4515=e,this._SafeStr_4516=t,this._SafeStr_4514=Pe(),this._SafeStr_448=1}static turnVisualizationOn(){if(this._SafeStr_448===0||this._SafeStr_448===3)return;this._SafeStr_4524||(this._SafeStr_4524=setTimeout(()=>this.turnVisualizationOff(),this._SafeStr_4516));const e=Pe()-this._SafeStr_4514;if(e>this._SafeStr_4515+this._SafeStr_4516){this._SafeStr_448=3;return}if(this._SafeStr_4512=!0,ethis.turnVisualizationOff(),this._SafeStr_4516));const e=Pe()-this._SafeStr_4514;if(e>this._SafeStr_4515+this._SafeStr_4516){this._SafeStr_448=3;return}if(this._SafeStr_4512=!0,e255||!(e instanceof mt))return!1;if(e.texture===Ne.EMPTY||e.blendMode!==ge.NORMAL)return;const i=e.texture,n=i.baseTexture;if(!i||!n||!n.valid)return!1;const r=t.x*e.scale.x,a=t.y*e.scale.y;if(!e.getLocalBounds().contains(r,a)||!n.hitMap&&!fv.generateHitMap(n))return!1;const o=n.hitMap;let l=r+i.frame.x,u=a+i.frame.y;i.trim&&(l-=i.trim.x,u-=i.trim.y),l=Math.round(l)*n.resolution,u=Math.round(u)*n.resolution;const c=l+u*n.realWidth,h=c%32,f=c/32|0;return(o[f]&1<=l&&(o[h]=o[h]|1<u.z-l.z),r0?_=_+f*12e-8:_=_+-f*12e-8,f=f+Math.trunc(this._width/2),d=d+Math.trunc(this._height/2);let g=0;for(const p of o.sprites.values()){if(!p||!p.visible)continue;const m=p.texture,v=m&&m.baseTexture;if(!m||!v)continue;const E=f+p.offsetX+this._screenOffsetX,y=d+p.offsetY+this._screenOffsetY;if(p.flipH){const w=f+-(m.width+-p.offsetX)+this._screenOffsetX;if(!this.isSpriteVisible(w,y,m.width,m.height))continue}else if(p.flipV){const w=d+-(m.height+-p.offsetY)+this._screenOffsetY;if(!this.isSpriteVisible(E,w,m.width,m.height))continue}else if(!this.isSpriteVisible(E,y,m.width,m.height))continue;let T=c.getSprite(g);T||(T=new qR,c.addSprite(T),this._sortableSprites.push(T),T.name=t),T.sprite=p,(p.spriteType===Js.AVATAR||p.spriteType===Js.AVATAR_OWN)&&(T.sprite.libraryAssetName="avatar_"+e.id),T.x=E-this._screenOffsetX,T.y=y-this._screenOffsetY,T.z=_+p.relativeDepth+37e-12*a,g++,a++}return c.setSpriteCount(g),this._canvasUpdated=!0,g}getExtendedSprite(e){if(e<0||e>=this._spriteCount)return null;const t=this._display.getChildAt(e);return t||null}getExtendedSpriteIdentifier(e){return e?e.name:""}renderSprite(e,t){if(e>=this._spriteCount)return this.createAndAddSprite(t),!0;if(!t)return!1;const i=t.sprite,n=this.getExtendedSprite(e);if(!i||!n)return!1;if(n.varyingDepth!==i.varyingDepth)return n.varyingDepth&&!i.varyingDepth?(this._display.removeChildAt(e),this._spritePool.push(n),this.renderSprite(e,t)):(this.createAndAddSprite(t,e),!0);if(n.needsUpdate(i.id,i.updateCounter)||Pr.isVisualizationOn()){n.tag=i.tag,n.alphaTolerance=i.alphaTolerance,n.name=t.name,n.varyingDepth=i.varyingDepth,n.clickHandling=i.clickHandling,n.filters=i.filters;const r=i.alpha/255;n.alpha!==r&&(n.alpha=r),n.tint!==i.color&&(n.tint=i.color),n.blendMode!==i.blendMode&&(n.blendMode=i.blendMode),n.texture!==i.texture&&n.setTexture(i.texture),i.updateContainer&&(n.children.length===1&&n.removeChildAt(0),n.addChild(i.container),i.updateContainer=!1),i.flipH?n.scale.x!==-1&&(n.scale.x=-1):n.scale.x!==1&&(n.scale.x=1),i.flipV?n.scale.y!==-1&&(n.scale.y=-1):n.scale.y!==1&&(n.scale.y=1),this.updateEnterRoomEffect(n,i)}return n.x!==t.x&&(n.x=t.x),n.y!==t.y&&(n.y=t.y),n.offsetX=i.offsetX,n.offsetY=i.offsetY,!0}createAndAddSprite(e,t=-1){const i=e.sprite;if(!i)return;let n=null;this._spritePool.length>0&&(n=this._spritePool.pop()),n||(n=new fv),n.children.length&&n.removeChildren(),n.tag=i.tag,n.alphaTolerance=i.alphaTolerance,n.alpha=i.alpha/255,n.tint=i.color,n.x=e.x,n.y=e.y,n.offsetX=i.offsetX,n.offsetY=i.offsetY,n.name=i.name,n.varyingDepth=i.varyingDepth,n.clickHandling=i.clickHandling,n.blendMode=i.blendMode,n.filters=i.filters,n.setTexture(i.texture),i.updateContainer&&(n.addChild(i.container),i.updateContainer=!1),i.flipH&&(n.scale.x=-1),i.flipV&&(n.scale.y=-1),this.updateEnterRoomEffect(n,i),t<0||t>=this._spriteCount?(this._display.addChild(n),this._spriteCount++):this._display.addChildAt(n,t),this._activeSpriteCount++}cleanSprites(e,t=!1){if(this._display){if(e<0&&(e=0),e=e;)this.cleanSprite(this.getExtendedSprite(i),t),i--}this._activeSpriteCount=e}}updateEnterRoomEffect(e,t){if(!(!Pr.isVisualizationOn()||!t))switch(t.spriteType){case Js.AVATAR_OWN:return;case Js.ROOM_PLANE:e.alpha=Pr.getDelta(.9);return;case Js.AVATAR:e.alpha=Pr.getDelta(.5);return;default:e.alpha=Pr.getDelta(.1)}}cleanSprite(e,t){e&&(t?(e.parent&&e.parent.removeChild(e),e.destroy({children:!0})):e.setTexture(null))}update(){this._mouseCheckCount,this._mouseCheckCount=0,this._eventId++}setMouseListener(e){this._mouseListener=e}getCacheItem(e){return this._objectCache.getObjectCache(e)}isSpriteVisible(e,t,i,n){return!!(this._noSpriteVisibilityChecking||(e=(e-this._screenOffsetX)*this._scale+this._screenOffsetX,t=(t-this._screenOffsetY)*this._scale+this._screenOffsetY,i=i*this._scale,n=n*this._scale,e=0&&t=0&&!this._usesExclusionRectangles))}handleMouseEvent(e,t,i,n,r,a,o){return e=e-this._screenOffsetX,t=t-this._screenOffsetY,this._mouseLocation.x=e/this._scale,this._mouseLocation.y=t/this._scale,this._mouseCheckCount>0&&i==ue.MOUSE_MOVE?this._mouseSpriteWasHit:(this._mouseSpriteWasHit=this.checkMouseHits(Math.trunc(e/this._scale),Math.trunc(t/this._scale),i,n,r,a,o),this._mouseCheckCount++,this._mouseSpriteWasHit)}checkMouseHits(e,t,i,n=!1,r=!1,a=!1,o=!1){const l=[];let u=!1,c=null,h=this._activeSpriteCount-1;for(;h>=0;){const _=this.getExtendedSprite(h);if(_&&_.containsPoint(new Q(e-_.x,t-_.y))&&!(_.clickHandling&&(i===ue.MOUSE_CLICK||i===ue.DOUBLE_CLICK))){const g=this.getExtendedSpriteIdentifier(_);if(l.indexOf(g)===-1){const p=_.tag;let m=this._mouseActiveObjects.get(g);m&&m.spriteTag!==p&&(c=this.createMouseEvent(0,0,0,0,ue.ROLL_OUT,m.spriteTag,n,r,a,o),this.bufferMouseEvent(c,g)),i===ue.MOUSE_MOVE&&(!m||m.spriteTag!==p)?c=this.createMouseEvent(e,t,e-_.x,t-_.y,ue.ROLL_OVER,p,n,r,a,o):(c=this.createMouseEvent(e,t,e-_.x,t-_.y,i,p,n,r,a,o),c.spriteOffsetX=_.offsetX,c.spriteOffsetY=_.offsetY),m||(m=new JQ,m.objectId=g,this._mouseActiveObjects.set(g,m)),m.spriteTag=p,(i!==ue.MOUSE_MOVE||e!==this._mouseOldX||t!==this._mouseOldY)&&this.bufferMouseEvent(c,g),l.push(g)}u=!0}h--}const f=[];for(const _ of this._mouseActiveObjects.keys())_&&f.push(_);let d=0;for(;d=0&&(f[d]=null),d++}for(d=0;d=0||this._updateCategories.push(e)}removeUpdateCategory(e){const t=this._updateCategories.indexOf(e);t!==-1&&this._updateCategories.splice(t,1)}update(e,t=!1){for(const i of this._updateCategories){const n=this.getManager(i);if(!n)continue;const r=n.objects;if(r.length)for(const a of r.getValues()){if(!a)continue;const o=a.logic;o&&o.update(e)}}this._renderer&&this._renderer.update(e,t)}hasUninitializedObjects(){for(const e of this._managers.values())if(e){for(const t of e.objects.getValues())if(t&&!t.isReady)return!0}return!1}get id(){return this._id}get container(){return this._container}get renderer(){return this._renderer}get managers(){return this._managers}get model(){return this._model}}const zd=class zd{constructor(e,t,i,n,r,a,o){this._layerTags=[],this._primaryColor=e&16777215,this._secondaryColor=t&16777215,this._breed=i,this._tag=n>-1&&n0&&this._objectTypeAdUrls.set(n,a);let o=t.className;t.type===du.FLOOR?(this._activeObjectTypes.set(i,n),this._activeObjectTypeIds.set(n,i),this._activeObjects[o]||(this._activeObjects[o]=1)):t.type===du.WALL&&(o==="post.it"&&(n="post_it",o="post_it"),o==="post.it.vd"&&(n="post_it_vd",o="post_id_vd"),this._wallItemTypes.set(i,n),this._wallItemTypeIds.set(n,i),this._wallItems[o]||(this._wallItems[o]=1));const l=this._furniRevisions.get(o);r>l&&(this._furniRevisions.delete(o),this._furniRevisions.set(o,r))}}getFurnitureFloorNameForTypeId(e){const t=this._activeObjectTypes.get(e);return this.removeColorIndex(t)}getFurnitureWallNameForTypeId(e,t=null){let i=this._wallItemTypes.get(e);return i==="poster"&&t!==null&&(i=i+t),this.removeColorIndex(i)}getFurnitureFloorColorIndex(e){const t=this._activeObjectTypes.get(e);return t?this.getColorIndexFromName(t):-1}getFurnitureWallColorIndex(e){const t=this._wallItemTypes.get(e);return t?this.getColorIndexFromName(t):-1}getColorIndexFromName(e){if(!e)return-1;const t=e.indexOf("*");return t===-1?0:parseInt(e.substr(t+1))}removeColorIndex(e){if(!e)return null;const t=e.indexOf("*");return t===-1?e:e.substr(0,t)}getRoomObjectAdUrl(e){const t=this._objectTypeAdUrls.get(e);return t||""}getPetColorResult(e,t){const i=this._petColors.get(e);return i?i.get(t):null}getPetColorResultsForTag(e,t){const i=this._petColors.get(e),n=[];if(i)for(const r of i.values())r.tag===t&&n.push(r);return n}getCollection(e){if(!e)return null;const t=this._collections.get(e);if(!t){const i=wn().getCollection(e);return i?(this._collections.set(e,i),i):null}return t}getGifCollection(e){return e&&this._gifCollections.get(e)||null}getImage(e){if(!e)return null;const t=this._images.get(e);if(!t)return null;const i=new Image;return i.src=t.src,i}addAssetToCollection(e,t,i,n=!0){const r=this.getCollection(e);return r?r.addAsset(t,i,n,0,0,!1,!1):!1}createGifCollection(e,t,i){if(!e||!t||!i)return null;const n=new eQ(e,t,i);return this._gifCollections.set(e,n),n}createCollection(e,t){if(!e||!t)return null;const i=new Vm(e,t);this._collections.set(i.name,i);const n=this._pets[i.name];if(n!==void 0){const r=i.getPaletteNames(),a=new Map;for(const o of r){const l=i.getPalette(o),u=e.palettes[o],c=l.primaryColor,h=l.secondaryColor,f=u.breed!==void 0?u.breed:0,d=u.colorTag!==void 0?u.colorTag:-1,_=u.master!==void 0?u.master:!1,g=u.tags!==void 0?u.tags:[];a.set(parseInt(o),new $R(c,h,f,d,o,_,g))}this._petColors.set(n,a)}}getPlaceholderName(e){switch(this.getCategoryForType(e)){case U.FLOOR:return et.PLACE_HOLDER;case U.WALL:return et.PLACE_HOLDER_WALL;default:return this._pets[e]!==void 0?et.PLACE_HOLDER_PET:et.PLACE_HOLDER_DEFAULT}}getCategoryForType(e){return e?this._activeObjects[e]!==void 0?U.FLOOR:this._wallItems[e]!==void 0?U.WALL:this._pets[e]!==void 0?U.UNIT:e.indexOf("poster")===0?U.WALL:e==="room"?U.ROOM:e===tt.USER||e===tt.PET||e===tt.BOT||e===tt.RENTABLE_BOT?U.UNIT:e===et.TILE_CURSOR||e===et.SELECTION_ARROW?U.CURSOR:U.MINIMUM:U.MINIMUM}getPetNameForType(e){return Te.getValue("pet.types")[e]||null}isLoaderType(e){return e=tt.getRealType(e),e!==Z.USER}downloadImage(e,t,i,n=null){let r=null,a=[];if(t&&t.indexOf(",")>=0&&(r=t,t=r.split(",")[0]),r?a=this.getAssetUrls(r,i,!0):a=this.getAssetUrls(t,i,!0),a&&a.length){const o=a[0],l=new Image;return l.src=o,l.onload=()=>{l.onerror=null,this._images.set([t,i].join("_"),l),this._iconListener.onRoomContentLoaded(e,[t,i].join("_"),!0)},l.onerror=()=>{l.onload=null,le.error("Failed to download asset",o),this._iconListener.onRoomContentLoaded(e,[t,i].join("_"),!1)},!0}return!1}async downloadAsset(e,t){var n;const i=(n=this.getAssetUrls(e))==null?void 0:n[0];if(!(!i||!i.length)&&!(this._pendingContentTypes.indexOf(e)>=0||this.getOrRemoveEventDispatcher(e))){this._pendingContentTypes.push(e),this._events.set(e,t);try{const r=await fetch(i);let a="application/octet-stream";switch(r.headers.has("Content-Type")&&(a=r.headers.get("Content-Type")),a){case"application/octet-stream":{const o=new Um(await r.arrayBuffer());await this.processAsset(o.baseTexture,o.jsonFile);const l=this._events.get(e);if(!l)return;l.dispatchEvent(new ba(ba.RCLE_SUCCESS,e));break}default:throw new Error}}catch{t.dispatchEvent(new ba(ba.RCLE_FAILURE,e))}}}async processAsset(e,t){const i=t.spritesheet;if(!e||!i||!Object.keys(i).length){this.createCollection(t,null);return}const n=async()=>{const r=new Sw(e,i);await r.parse(),this.createCollection(t,r)};e.valid?await n():await new Promise((r,a)=>{e.once("update",async()=>(await n(),r()))})}setAssetAliasName(e,t){this._objectAliases.set(e,t),this._objectOriginalNames.set(t,e)}getAssetAliasName(e){const t=this._objectAliases.get(e);return t||e}getAssetOriginalName(e){const t=this._objectOriginalNames.get(e);return t||e}getAssetUrls(e,t=null,i=!1){switch(e){case et.PLACE_HOLDER:return[this.getAssetUrlWithGenericBase(et.PLACE_HOLDER)];case et.PLACE_HOLDER_WALL:return[this.getAssetUrlWithGenericBase(et.PLACE_HOLDER_WALL)];case et.PLACE_HOLDER_PET:return[this.getAssetUrlWithGenericBase(et.PLACE_HOLDER_PET)];case et.ROOM:return[this.getAssetUrlWithGenericBase("room")];case et.TILE_CURSOR:return[this.getAssetUrlWithGenericBase(et.TILE_CURSOR)];case et.SELECTION_ARROW:return[this.getAssetUrlWithGenericBase(et.SELECTION_ARROW)];default:{const n=this.getCategoryForType(e);if(n===U.FLOOR||n===U.WALL){const r=this.getAssetAliasName(e);let a=i?this.getAssetUrlWithFurniIconBase(r):this.getAssetUrlWithFurniBase(e);if(i){const o=t&&t!==""&&this._activeObjectTypeIds.has(r+"*"+t);a=a.replace(/%param%/gi,o?"_"+t:"")}return[a]}return n===U.UNIT?[this.getAssetUrlWithPetBase(e)]:null}}}getAssetIconUrl(e,t){let i=null,n=[];return e&&e.indexOf(",")>=0&&(i=e,e=i.split(",")[0]),i?n=this.getAssetUrls(i,t,!0):n=this.getAssetUrls(e,t,!0),n&&n.length?n[0]:null}getAssetUrlWithGenericBase(e){return Te.getValue("generic.asset.url").replace(/%libname%/gi,e)}getAssetUrlWithFurniBase(e){return Te.getValue("furni.asset.url").replace(/%libname%/gi,e)}getAssetUrlWithFurniIconBase(e){return Te.getValue("furni.asset.icon.url").replace(/%libname%/gi,e)}getAssetUrlWithPetBase(e){return Te.getValue("pet.asset.url").replace(/%libname%/gi,e)}setRoomObjectRoomId(e,t){const i=e&&e.model;i&&i.setValue(b.OBJECT_ROOM_ID,t)}getOrRemoveEventDispatcher(e,t=!1){const i=this._events.get(e);return t&&this._events.delete(e),i}setIconListener(e){this._iconListener=e}};et.PLACE_HOLDER="place_holder",et.PLACE_HOLDER_WALL="place_holder_wall",et.PLACE_HOLDER_PET="place_holder_pet",et.PLACE_HOLDER_DEFAULT=et.PLACE_HOLDER,et.ROOM="room",et.TILE_CURSOR="tile_cursor",et.SELECTION_ARROW="selection_arrow",et.LOADER_READY="RCL_LOADER_READY",et.MANDATORY_LIBRARIES=[et.PLACE_HOLDER,et.PLACE_HOLDER_WALL,et.PLACE_HOLDER_PET,et.ROOM,et.TILE_CURSOR,et.SELECTION_ARROW];let kc=et;class nZ{constructor(){this._objects=new li,this._objectsPerType=new li}dispose(){this.removeAllObjects()}getObject(e){const t=this._objects.getValue(e);return t||null}getObjectByIndex(e){const t=this._objects.getWithIndex(e);return t||null}createObject(e,t,i){const n=new WR(e,t,i);return this.addObject(e,i,n)}addObject(e,t,i){if(this._objects.getValue(e))return i.dispose(),null;this._objects.add(e,i);const n=this.getTypeMap(t);return n&&n.add(e,i),i}removeObject(e){const t=this._objects.remove(e);if(t){const i=this.getTypeMap(t.type);i&&i.remove(t.id),t.dispose()}}removeAllObjects(){let e=0;for(;e=as.ROOM_MANAGER_INITIALIZING||!this._contentLoader)return;const e=kc.MANDATORY_LIBRARIES;for(const t of e)t&&this._initialLoadList.indexOf(t)===-1&&(this._contentLoader.downloadAsset(t,this.events),this._initialLoadList.push(t));this._state=as.ROOM_MANAGER_INITIALIZING}getRoomInstance(e){const t=this._rooms.get(e);return t||null}createRoomInstance(e){if(this._rooms.get(e))return null;const t=new sZ(e,this);if(this._rooms.set(t.id,t),this._updateCategories.length)for(const i of this._updateCategories)t.addUpdateCategory(i);return t}removeRoomInstance(e){const t=this._rooms.get(e);return t?(this._rooms.delete(e),t.dispose(),!0):!1}createRoomObjectAndInitalize(e,t,i,n){const r=this.getRoomInstance(e);if(!r)return null;let a=i,o=i,l=i,u=null,c=!1;if(this._contentLoader.isLoaderType(i)){if(u=this._contentLoader.getCollection(i),!u&&(c=!0,this._contentLoader.downloadAsset(i,this.events),l=this._contentLoader.getPlaceholderName(i),u=this._contentLoader.getCollection(l),!u))return null;a=u.data.visualizationType,o=u.data.logicType}const h=r.createRoomObject(t,1,i,n);if(!h)return null;if(this._visualizationFactory){const f=this._visualizationFactory.getVisualization(a);if(!f)return r.removeRoomObject(t,n),null;f.asset=u;const d=this._visualizationFactory.getVisualizationData(l,a,u&&u.data||null);if(!d||!f.initialize(d))return r.removeRoomObject(t,n),null;h.setVisualization(f)}if(this._logicFactory){const f=this._logicFactory.getLogic(o);h.setLogic(f),f&&f.initialize(u&&u.data||null)}return c||(h.isReady=!0),this._contentLoader.setRoomObjectRoomId(h,e),h}reinitializeRoomObjectsByType(e){if(!e||!this._contentLoader||!this._visualizationFactory||!this._logicFactory)return;const t=this._contentLoader.getCollection(e);if(!t)return;const i=t.data.visualizationType,n=t.data.logicType,r=this._visualizationFactory.getVisualizationData(e,i,t.data);for(const a of this._rooms.values())if(a){for(const[o,l]of a.managers.entries())if(l)for(const u of l.objects.getValues()){if(!u||u.type!==e)continue;const c=this._visualizationFactory.getVisualization(i);if(c)if(c.asset=t,!r||!c.initialize(r))l.removeObject(u.id);else{u.setVisualization(c);const h=this._logicFactory.getLogic(n);u.setLogic(h),h&&h.initialize(t.data),u.isReady=!0,this._listener&&this._listener.objectInitialized(a.id,u.id,o)}else l.removeObject(u.id)}}}addUpdateCategory(e){if(!(this._updateCategories.indexOf(e)>=0)&&(this._updateCategories.push(e),!!this._rooms.size))for(const i of this._rooms.values())i&&i.addUpdateCategory(e)}removeUpdateCategory(e){const t=this._updateCategories.indexOf(e);if(t!==-1&&(this._updateCategories.splice(t,1),!!this._rooms.size))for(const i of this._rooms.values())i&&i.removeUpdateCategory(e)}setContentLoader(e){this._contentLoader&&this._contentLoader.dispose(),this._contentLoader=e}processPendingContentTypes(e){if(this._skipContentProcessing){this._skipContentProcessing=!1;return}for(;this._pendingContentTypes.length;){const t=this._pendingContentTypes.shift();if(!this._contentLoader.getCollection(t)){this._listener&&this._listener.initalizeTemporaryObjectsByType(t,!1),le.log("Invalid Collection",t);continue}this.reinitializeRoomObjectsByType(t),this._listener&&this._listener.initalizeTemporaryObjectsByType(t,!0),this._initialLoadList.length>0&&this.removeFromInitialLoad(t)}}removeFromInitialLoad(e){if(!(!e||this._state===as.ROOM_MANAGER_ERROR))if(this._contentLoader||(this._state=as.ROOM_MANAGER_ERROR),this._contentLoader.getCollection(e)){const t=this._initialLoadList.indexOf(e);t>=0&&this._initialLoadList.splice(t,1),this._initialLoadList.length||(this._state=as.ROOM_MANAGER_INITIALIZED,this._listener&&this._listener.onRoomEngineInitalized(!0))}else this._state=as.ROOM_MANAGER_ERROR,this._listener&&this._listener.onRoomEngineInitalized(!1)}onRoomContentLoadedEvent(e){if(!this._contentLoader)return;const t=e.contentType;this._pendingContentTypes.indexOf(t)>=0||this._pendingContentTypes.push(t)}update(e,t=!1){if(this.processPendingContentTypes(e),!!this._rooms.size)for(const i of this._rooms.values())i&&i.update(e,t)}createRoomObjectManager(e){return new nZ}get rooms(){return this._rooms}get disposed(){return this._disposed}};as.ROOM_MANAGER_ERROR=-1,as.ROOM_MANAGER_LOADING=0,as.ROOM_MANAGER_LOADED=1,as.ROOM_MANAGER_INITIALIZING=2,as.ROOM_MANAGER_INITIALIZED=3,as.CONTENT_PROCESSING_TIME_LIMIT_MILLISECONDS=40;let QR=as;class rZ{constructor(e,t=-1,i=null,n=null,r=null){this._minLevel=-1,this._texture=null,this._colorMatrix=null,this._blendMode=null,this._name=e,this._minLevel=t,this._texture=i,this._colorMatrix=n,this._blendMode=r}get name(){return this._name}get texture(){return this._texture}set texture(e){this._texture=e}get colorMatrix(){return this._colorMatrix}set colorMatrix(e){this._colorMatrix=e}get blendMode(){return this._blendMode}set blendMode(e){this._blendMode=e}get minLevel(){return this._minLevel}}class aZ{constructor(){this._effects=new Map,this._events=new fn,this._isLoaded=!1}init(){if(this._isLoaded)return;this._isLoaded=!0;const e=Te.getValue("image.library.url")+"Habbo-Stories/",t=Te.getValue("camera.available.effects");for(const i of t){if(!i.enabled)continue;const n=new rZ(i.name,i.minLevel);i.colorMatrix.length?n.colorMatrix=i.colorMatrix:(n.texture=Ne.from(e+i.name+".png"),n.blendMode=i.blendMode),this._effects.set(n.name,n)}this.events.dispatchEvent(new Km(Km.INITIALIZED))}applyEffects(e,t,i){const n=new Qn,r=new kt(e);n.addChild(r),i&&r.scale.set(2);for(const a of t){const o=a.effect;if(o)if(o.colorMatrix){const l=new rv;l.matrix=o.colorMatrix,l.alpha=a.alpha,r.filters||(r.filters=[]),r.filters.push(l)}else{const l=new kt(o.texture);l.alpha=a.alpha,l.blendMode=o.blendMode,n.addChild(l)}}return St.generateImage(n)}get effects(){return this._effects}get events(){return this._events}get isLoaded(){return this._isLoaded}}class KCe{constructor(e,t){this._effect=e,this._alpha=t}get effect(){return this._effect}get alpha(){return this._alpha}}class oZ{flush(){return this._canShowInterstitial=!1,!0}parse(e){return e?(this._canShowInterstitial=e.readBoolean(),!0):!1}get canShowInterstitial(){return this._canShowInterstitial}}class lZ{flush(){return this._errorCode=0,this._filteredText=null,!0}parse(e){return e?(this._errorCode=e.readInt(),this._filteredText=e.readString(),!0):!1}get errorCode(){return this._errorCode}get filteredText(){return this._filteredText}}class uZ{flush(){return this._isOpen=!1,this._onShutdown=!1,this._isAuthenticUser=!1,!0}parse(e){return e?(this._isOpen=e.readBoolean(),this._onShutdown=e.readBoolean(),e.bytesAvailable&&(this._isAuthenticUser=e.readBoolean()),!0):!1}get isOpen(){return this._isOpen}get onShutdown(){return this._onShutdown}get isAuthenticUser(){return this._isAuthenticUser}}class hZ{flush(){return this._isOpen=!1,this._minutesUntilChange=0,!0}parse(e){return e?(this._isOpen=e.readInt()>0,this._minutesUntilChange=e.readInt(),!0):!1}get isOpen(){return this._isOpen}get minutesUntilChange(){return this._minutesUntilChange}}class cZ{flush(){return this._openHour=0,this._openMinute=0,!0}parse(e){return e?(this._openHour=e.readInt(),this._openMinute=e.readInt(),!0):!1}get openHour(){return this._openHour}get openMinute(){return this._openMinute}}class fZ{flush(){return this._openHour=0,this._openMinute=0,this._userThrownOutAtClose=!1,!0}parse(e){return e?(this._openHour=e.readInt(),this._openMinute=e.readInt(),this._userThrownOutAtClose=e.readBoolean(),!0):!1}get openHour(){return this._openHour}get openMinute(){return this._openMinute}get userThrowOutAtClose(){return this._userThrownOutAtClose}}class dZ{flush(){return this._minutes=0,!0}parse(e){return e?(this._minutes=e.readInt(),!0):!1}get openMinute(){return this._minutes}}class _Z{flush(){return this._isInMaintenance=!1,this._minutesUntilMaintenance=0,this._duration=15,!0}parse(e){return e?(this._isInMaintenance=e.readBoolean(),this._minutesUntilMaintenance=e.readInt(),e.bytesAvailable&&(this._duration=e.readInt()),!0):!1}get isInMaintenance(){return this._isInMaintenance}get minutesUntilMaintenance(){return this._minutesUntilMaintenance}get duration(){return this._duration}}class gZ{flush(){return this._resultCode=-1,this._name="",this._nameSuggestions=[],!0}parse(e){if(!e)return!1;this._resultCode=e.readInt(),this._name=e.readString();let t=e.readInt();for(;t>0;)this._nameSuggestions.push(e.readString()),t--;return!0}get resultCode(){return this._resultCode}get name(){return this._name}get nameSuggestions(){return this._nameSuggestions}}class pZ{flush(){return this._resultCode=-1,this._name="",this._nameSuggestions=[],!0}parse(e){if(!e)return!1;this._resultCode=e.readInt(),this._name=e.readString();let t=e.readInt();for(;t>0;)this._nameSuggestions.push(e.readString()),t--;return!0}get resultCode(){return this._resultCode}get name(){return this._name}get nameSuggestions(){return this._nameSuggestions}}class mZ{flush(){return this._figure="",this._gender="",!0}parse(e){return e?(this._figure=e.readString(),this._gender=e.readString(),this._gender&&(this._gender=this._gender.toUpperCase()),!0):!1}get figure(){return this._figure}get gender(){return this._gender}}class vZ{constructor(e){this._slotId=e.readInt(),this._figureString=e.readString(),this._gender=e.readString()}get slotId(){return this._slotId}get figureString(){return this._figureString}get gender(){return this._gender}}class EZ{flush(){return this._state=0,this._outfits=[],!0}parse(e){if(!e)return!1;this._state=e.readInt();let t=e.readInt();for(;t>0;)this._outfits.push(new vZ(e)),t--;return!0}get state(){return this._state}get outfits(){return this._outfits}}class Ow{constructor(e){if(!e)throw new Error("invalid_parser");this._id=e.readInt(),this._name=e.readString(),this._motto=e.readString(),this._gender=e.readString(),this._figure=e.readString()}get id(){return this._id}get name(){return this._name}get motto(){return this._motto}get figure(){return this._figure}get gender(){return this._gender}}class yZ{flush(){return this._item=null,this._openInventory=!1,!0}parse(e){return e?(this._item=new Ow(e),this._openInventory=e.readBoolean(),!0):!1}get item(){return this._item}openInventory(){return this._openInventory}}class TZ{flush(){return this._items=null,!0}parse(e){this._items=new Map;let t=e.readInt();for(;t>0;){const i=new Ow(e);this._items.set(i.id,i),t--}return!0}get items(){return this._items}}class IZ{flush(){return this._boughtAsGift=!1,this._item=null,!0}parse(e){return e?(this._boughtAsGift=e.readBoolean(),this._item=new Ow(e),!0):!1}get boughtAsGift(){return this._boughtAsGift}get item(){return this._item}}class RZ{flush(){return this._itemId=0,!0}parse(e){return e?(this._itemId=e.readInt(),!0):!1}get itemId(){return this._itemId}}class SZ{constructor(e){this._name=e.readString(),this._id=e.readInt(),this._consequence=e.readString()}get name(){return this._name}get id(){return this._id}get consequence(){return this._consequence}}class bZ{constructor(e){this._topics=[],this._name=e.readString();let t=e.readInt();for(;t>0;)this._topics.push(new SZ(e)),t--}dispose(){this._disposed||(this._disposed=!0,this._topics=null)}get disposed(){return this._disposed}get name(){return this._name}get topics(){return this._topics}}class AZ{constructor(e){this._tradeLockInfo="",this._machineBanInfo="",this._name=e.readString(),this._sanctionLengthInHours=e.readInt(),this._probationDays=e.readInt(),this._avatarOnly=e.readBoolean(),e.bytesAvailable&&(this._tradeLockInfo=e.readString()),e.bytesAvailable&&(this._machineBanInfo=e.readString())}get name(){return this._name}get sanctionLengthInHours(){return this._sanctionLengthInHours}get avatarOnly(){return this._avatarOnly}get tradeLockInfo(){return this._tradeLockInfo}get machineBanInfo(){return this._machineBanInfo}}class OZ{flush(){return this._issueId=-1,this._accountId=1,this._sanctionType=null,!0}parse(e){return e?(this._issueId=e.readInt(),this._accountId=e.readInt(),this._sanctionType=new AZ(e),!0):!1}get issueId(){return this._issueId}get accountId(){return this._accountId}get sanctionType(){return this._sanctionType}}class wZ{flush(){return this._callForHelpCategories=null,!0}parse(e){if(!e)return!1;this._callForHelpCategories=[];let t=e.readInt();for(;t>0;)this._callForHelpCategories.push(new bZ(e)),t--;return!0}get callForHelpCategories(){return this._callForHelpCategories}}class CZ{flush(){return this._isSanctionNew=!1,this._isSanctionActive=!1,this._sanctionName=null,this._sanctionLengthHours=0,this._sanctionReason=null,this._sanctionCreationTime=null,this._probationHoursLeft=0,this._nextSanctionName=null,this._nextSanctionLengthHours=0,this._hasCustomMute=!1,this._tradeLockExpiryTime=null,!0}parse(e){return e?(this._isSanctionNew=e.readBoolean(),this._isSanctionActive=e.readBoolean(),this._sanctionName=e.readString(),this._sanctionLengthHours=e.readInt(),e.readInt(),this._sanctionReason=e.readString(),this._sanctionCreationTime=e.readString(),this._probationHoursLeft=e.readInt(),this._nextSanctionName=e.readString(),this._nextSanctionLengthHours=e.readInt(),e.readInt(),this._hasCustomMute=e.readBoolean(),e.bytesAvailable&&(this._tradeLockExpiryTime=e.readString()),!0):!1}get isSanctionNew(){return this._isSanctionNew}get isSanctionActive(){return this._isSanctionActive}get sanctionName(){return this._sanctionName}get sanctionLengthHours(){return this._sanctionLengthHours}get sanctionReason(){return this._sanctionReason}get sanctionCreationTime(){return this._sanctionCreationTime}get probationHoursLeft(){return this._probationHoursLeft}get nextSanctionName(){return this._nextSanctionName}get nextSanctionLengthHours(){return this._nextSanctionLengthHours}get hasCustomMute(){return this._hasCustomMute}get tradeLockExpiryTime(){return this._tradeLockExpiryTime}}class MZ{constructor(){this._ok=!1,this._secondsToWait=0}flush(){return this._ok=!1,this._secondsToWait=0,this._extraDataId=null,!0}parse(e){return e?(this._ok=e.readBoolean(),this._secondsToWait=e.readInt(),this._ok&&e.bytesAvailable&&(this._extraDataId=e.readString()),!0):!1}get ok(){return this._ok}get secondsToWait(){return this._secondsToWait}get extraDataId(){return this._extraDataId}}class NZ{flush(){return!0}parse(e){return!!e}}class PZ{flush(){return this._roomType=null,this._roomId=-1,!0}parse(e){return e?(this._roomType=e.readString(),this._roomId=e.readInt(),!0):!1}get roomType(){return this._roomType}get roomId(){return this._roomId}}class kZ{flush(){return this._url="",!0}parse(e){return e?(this._url=e.readString(),!0):!1}get url(){return this._url}}class xZ{constructor(){this._ok=!1,this._errorReason=null}flush(){return this._ok=!1,this._errorReason=null,!0}parse(e){return e?(this._ok=e.readBoolean(),this._errorReason=e.readString(),!0):!1}get ok(){return this._ok}get errorReason(){return this._errorReason}}class DZ{constructor(){this._creditPrice=0,this._ducketPrice=0,this._publishDucketPrice=0}flush(){return this._creditPrice=0,this._ducketPrice=0,this._publishDucketPrice=0,!0}parse(e){return e?(this._creditPrice=e.readInt(),this._ducketPrice=e.readInt(),e.bytesAvailable&&(this._publishDucketPrice=e.readInt()),!0):!1}get creditPrice(){return this._creditPrice}get ducketPrice(){return this._ducketPrice}get publishDucketPrice(){return this._publishDucketPrice}}class LZ{constructor(){this._ok=!0,this._renderLimitHit=!1}flush(){return this._ok=!0,this._renderLimitHit=!1,!0}parse(e){return e?(e.bytesAvailable&&(this._ok=e.readBoolean(),this._renderLimitHit=e.readBoolean()),!0):!1}get ok(){return this._ok}get isRenderLimitHit(){return this._renderLimitHit}}class ww{parse(e){if(!e)return!1;this._campaignName=e.readString(),this._campaignImage=e.readString(),this._currentDay=e.readInt(),this._campaignDays=e.readInt(),this._openedDays=[];let t=e.readInt();for(let i=0;i0;)this._additionalBonusDiscountThresholdQuantities.push(e.readInt()),t--}get maxPurchaseSize(){return this._maxPurchaseSize}get bundleSize(){return this._bundleSize}get bundleDiscountSize(){return this._bundleDiscountSize}get bonusThreshold(){return this._bonusThreshold}get additionalBonusDiscountThresholdQuantities(){return this._additionalBonusDiscountThresholdQuantities}}class zZ{flush(){return this._bundleDiscountRuleset=null,!0}parse(e){return e?(this._bundleDiscountRuleset=new jZ(e),!0):!1}get bundleDiscountRuleset(){return this._bundleDiscountRuleset}}class Cw{constructor(e){if(!e)throw new Error("invalid_wrapper");this.flush(),this.parse(e)}flush(){return this._visible=!1,this._icon=0,this._pageId=-1,this._pageName=null,this._localization=null,this._children=[],this._offerIds=[],!0}parse(e){if(!e)return!1;this._visible=e.readBoolean(),this._icon=e.readInt(),this._pageId=e.readInt(),this._pageName=e.readString(),this._localization=e.readString();let t=e.readInt();for(;t>0;)this._offerIds.push(e.readInt()),t--;let i=e.readInt();for(;i>0;)this._children.push(new Cw(e)),i--;return!0}get visible(){return this._visible}get icon(){return this._icon}get pageId(){return this._pageId}get pageName(){return this._pageName}get localization(){return this._localization}get children(){return this._children}get offerIds(){return this._offerIds}}class HZ{flush(){return this._root=null,!0}parse(e){return e?(this._root=new Cw(e),this._newAdditionsAvailable=e.readBoolean(),this._catalogType=e.readString(),!0):!1}get root(){return this._root}get newAdditionsAvailable(){return this._newAdditionsAvailable}get catalogType(){return this._catalogType}}class WZ{constructor(e){this._images=[],this._texts=[];let t=e.readInt();for(;t>0;)this._images.push(e.readString()),t--;let i=e.readInt();for(;i>0;)this._texts.push(e.readString()),i--}get images(){return this._images}get texts(){return this._texts}}class YZ{flush(){return this._pageName=null,this._pageId=0,this._secondsToExpiry=0,this._image=null,!0}parse(e){return e?(this._pageId=e.readInt(),this._pageName=e.readString(),this._secondsToExpiry=e.readInt(),this._image=e.readString(),!0):!1}get pageName(){return this._pageName}get pageId(){return this._pageId}get secondsToExpiry(){return this._secondsToExpiry}get image(){return this._image}}const $l=class $l{constructor(e){if(!e)throw new Error("invalid_wrapper");this.flush(),this.parse(e)}flush(){return this._productType=null,this._furniClassId=-1,this._extraParam=null,this._productCount=0,this._uniqueLimitedItem=!1,this._uniqueLimitedItemSeriesSize=0,this._uniqueLimitedItemsLeft=0,!0}parse(e){switch(this._productType=e.readString(),this._productType){case $l.B:return this._extraParam=e.readString(),this._productCount=1,!0;default:return this._furniClassId=e.readInt(),this._extraParam=e.readString(),this._productCount=e.readInt(),this._uniqueLimitedItem=e.readBoolean(),this._uniqueLimitedItem&&(this._uniqueLimitedItemSeriesSize=e.readInt(),this._uniqueLimitedItemsLeft=e.readInt()),!0}}get productType(){return this._productType}get furniClassId(){return this._furniClassId}get extraParam(){return this._extraParam}get productCount(){return this._productCount}get uniqueLimitedItem(){return this._uniqueLimitedItem}get uniqueLimitedSeriesSize(){return this._uniqueLimitedItemSeriesSize}get uniqueLimitedItemsLeft(){return this._uniqueLimitedItemsLeft}};$l.I="i",$l.S="s",$l.E="e",$l.B="b";let $c=$l;class R0{constructor(e){this._offerId=e.readInt(),this._localizationId=e.readString(),this._rent=e.readBoolean(),this._priceCredits=e.readInt(),this._priceActivityPoints=e.readInt(),this._priceActivityPointsType=e.readInt(),this._giftable=e.readBoolean(),this._products=[];let t=e.readInt();for(;t>0;)this._products.push(new $c(e)),t--;this._clubLevel=e.readInt(),this._bundlePurchaseAllowed=e.readBoolean(),this._isPet=e.readBoolean(),this._previewImage=e.readString()}get offerId(){return this._offerId}get localizationId(){return this._localizationId}get rent(){return this._rent}get priceCredits(){return this._priceCredits}get priceActivityPoints(){return this._priceActivityPoints}get priceActivityPointsType(){return this._priceActivityPointsType}get clubLevel(){return this._clubLevel}get giftable(){return this._giftable}get bundlePurchaseAllowed(){return this._bundlePurchaseAllowed}get isPet(){return this._isPet}get previewImage(){return this._previewImage}get products(){return this._products}}const go=class go{constructor(e){if(!e)throw new Error("invalid_wrapper");this.flush(),this.parse(e)}flush(){return this._type=-1,this._position=null,this._itemName=null,this._itemPromoImage=null,this._catalogPageLocation=null,this._productCode=null,this._productOfferId=0,this._expirationTime=0,!0}parse(e){if(!e)return!1;switch(this._position=e.readInt(),this._itemName=e.readString(),this._itemPromoImage=e.readString(),this._type=e.readInt(),this._type){case go.ITEM_CATALOGUE_PAGE:this._catalogPageLocation=e.readString();break;case go.ITEM_PRODUCT_OFFER:this._productOfferId=e.readInt();break;case go.ITEM_IAP:this._productCode=e.readString();break}const t=e.readInt();return this._expirationTime=t>0?t*1e3+Pe():0,!0}get type(){return this._type}get position(){return this._position}get itemName(){return this._itemName}get itemPromoImage(){return this._itemPromoImage}get catalogPageLocation(){return this._catalogPageLocation}get productCode(){return this._productCode}get productOfferId(){return this._productOfferId}get expirationTime(){return this._expirationTime}};go.ITEM_CATALOGUE_PAGE=0,go.ITEM_PRODUCT_OFFER=1,go.ITEM_IAP=2;let ZR=go;class XZ{flush(){return this._pageId=-1,this._catalogType=null,this._layoutCode=null,this._localization=null,this._offers=[],this._offerId=-1,this._acceptSeasonCurrencyAsCredits=!1,this._frontPageItems=[],!0}parse(e){if(!e)return!1;this._pageId=e.readInt(),this._catalogType=e.readString(),this._layoutCode=e.readString(),this._localization=new WZ(e);let t=e.readInt();for(;t>0;)this._offers.push(new R0(e)),t--;if(this._offerId=e.readInt(),this._acceptSeasonCurrencyAsCredits=e.readBoolean(),e.bytesAvailable){let i=e.readInt();for(;i>0;)this._frontPageItems.push(new ZR(e)),i--}return!0}get pageId(){return this._pageId}get catalogType(){return this._catalogType}get layoutCode(){return this._layoutCode}get localization(){return this._localization}get offers(){return this._offers}get offerId(){return this._offerId}get acceptSeasonCurrencyAsCredits(){return this._acceptSeasonCurrencyAsCredits}get frontPageItems(){return this._frontPageItems}}class KZ{flush(){return this._pageName=null,this._secondsToExpiry=0,this._image=null,!0}parse(e){return e?(this._pageName=e.readString(),this._secondsToExpiry=e.readInt(),this._image=e.readString(),!0):!1}get pageName(){return this._pageName}get secondsToExpiry(){return this._secondsToExpiry}get image(){return this._image}}class qZ{flush(){return this._instantlyRefreshCatalogue=!1,this._newFurniDataHash=null,!0}parse(e){return e?(this._instantlyRefreshCatalogue=e.readBoolean(),e.bytesAvailable&&(this._newFurniDataHash=e.readString()),!0):!1}get instantlyRefreshCatalogue(){return this._instantlyRefreshCatalogue}get newFurniDataHash(){return this._newFurniDataHash}}class $Z{constructor(e){this._offerId=e.readInt(),this._isVip=e.readBoolean(),this._daysRequired=e.readInt(),this._isSelectable=e.readBoolean()}get offerId(){return this._offerId}get isVip(){return this._isVip}get isSelectable(){return this._isSelectable}get daysRequired(){return this._daysRequired}}class QZ{flush(){return!0}parse(e){if(!e)return!1;this._offers=[],this._giftData=new Map,this._daysUntilNextGift=e.readInt(),this._giftsAvailable=e.readInt();const t=e.readInt();for(let n=0;n0;)this._products.push(new $c(e)),t--;return!0}get productCode(){return this._productCode}get products(){return this._products}}class _4{constructor(e){if(!e)throw new Error("invalid_wrapper");this._offerId=e.readInt(),this._productCode=e.readString(),e.readBoolean(),this._priceCredits=e.readInt(),this._priceActivityPoints=e.readInt(),this._priceActivityPointsType=e.readInt(),this._vip=e.readBoolean(),this._months=e.readInt(),this._extraDays=e.readInt(),this._giftable=e.readBoolean(),this._daysLeftAfterPurchase=e.readInt(),this._year=e.readInt(),this._month=e.readInt(),this._day=e.readInt()}get offerId(){return this._offerId}get productCode(){return this._productCode}get priceCredits(){return this._priceCredits}get priceActivityPoints(){return this._priceActivityPoints}get priceActivityPointsType(){return this._priceActivityPointsType}get vip(){return this._vip}get months(){return this._months}get extraDays(){return this._extraDays}get daysLeftAfterPurchase(){return this._daysLeftAfterPurchase}get year(){return this._year}get month(){return this._month}get day(){return this._day}get giftable(){return this._giftable}}class JZ extends _4{constructor(e){super(e),this._originalPrice=e.readInt(),this._originalActivityPointPrice=e.readInt(),this._originalActivityPointType=e.readInt(),this._subscriptionDaysLeft=e.readInt()}get originalPrice(){return this._originalPrice*this.months}get originalActivityPointPrice(){return this._originalActivityPointPrice*this.months}get originalActivityPointType(){return this._originalActivityPointType}get discountCreditAmount(){return this._originalPrice*this.months-this.priceCredits}get discountActivityPointAmount(){return this.originalActivityPointPrice*this.months-this.priceActivityPoints}get subscriptionDaysLeft(){return this._subscriptionDaysLeft}}class eJ{flush(){return this._available=!1,this._pricePointUrl=null,this._market=null,this._lengthInDays=0,!0}parse(e){return e?(this._pricePointUrl=e.readString(),this._pricePointUrl!==""&&(this._available=!0),this._market=e.readString(),this._lengthInDays=e.readInt(),!0):!1}get available(){return this._available}get pricePointUrl(){return this._pricePointUrl}get market(){return this._market}get lengthInDays(){return this._lengthInDays}}class tJ{constructor(e){this._stuffId=e.readInt(),this._charges=e.readInt(),this._SafeStr_6935=e.readInt(),this._SafeStr_6936=e.readInt(),this._SafeStr_6518=e.readInt(),this._SafeStr_7875=e.readInt()}get stuffId(){return this._stuffId}get charges(){return this._charges}get _SafeStr_5946(){return this._SafeStr_6935}get _SafeStr_5944(){return this._SafeStr_6936}get _SafeStr_7876(){return this._SafeStr_7875}get _SafeStr_5945(){return this._SafeStr_6518}}class iJ{flush(){return this._fireworkChargeData=null,!0}parse(e){return e?(this._fireworkChargeData=new tJ(e),!0):!1}get fireworkChargeData(){return this._fireworkChargeData}}class sJ{flush(){return!0}parse(e){return!!e}}class nJ{constructor(){this._isEnabled=!1,this._price=null,this._giftWrappers=null,this._boxTypes=null,this._ribbonTypes=null,this._giftFurnis=null}flush(){return this._boxTypes=null,this._giftFurnis=null,this._giftWrappers=null,this._ribbonTypes=null,this._isEnabled=null,this._price=null,!0}parse(e){if(!e)return!1;const t=[],i=[],n=[],r=[];this._isEnabled=e.readBoolean(),this._price=e.readInt();let a=e.readInt(),o=0;for(;o0;)this._offers.push(new _4(e)),t--;return!0}get offers(){return this._offers}}class oJ{flush(){return this._offerId=0,this._isGiftable=!1,!0}parse(e){return e?(this._offerId=e.readInt(),this._isGiftable=e.readBoolean(),!0):!1}get offerId(){return this._offerId}get isGiftable(){return this._isGiftable}}class lJ{flush(){return!0}parse(e){return!!e}}class uJ{flush(){return this._appearsInSeconds=-1,this._pageId=-1,this._offerId=-1,this._productType="",!0}parse(e){return e?(this._appearsInSeconds=e.readInt(),this._pageId=e.readInt(),this._offerId=e.readInt(),this._productType=e.readString(),!0):!1}get appearsInSeconds(){return this._appearsInSeconds}get pageId(){return this._pageId}get offerId(){return this._offerId}get productType(){return this._productType}}class hJ{constructor(){this._notEnoughCredits=!1,this._notEnoughActivityPoints=!1,this._activityPointType=0}flush(){return this._notEnoughCredits=!1,this._notEnoughActivityPoints=!1,this._activityPointType=0,!0}parse(e){return e?(this._notEnoughCredits=e.readBoolean(),this._notEnoughActivityPoints=e.readBoolean(),e.bytesAvailable&&(this._activityPointType=e.readInt()),!0):!1}get notEnoughCredits(){return this._notEnoughCredits}get notEnoughActivityPoints(){return this._notEnoughActivityPoints}get activityPointType(){return this._activityPointType}}class cJ{flush(){return this._offer=null,!0}parse(e){return e?(this._offer=new R0(e),!0):!1}get offer(){return this._offer}}class fJ{flush(){return this._code=0,!0}parse(e){return e?(this._code=e.readInt(),!0):!1}get code(){return this._code}}class dJ{flush(){return this._code=0,!0}parse(e){return e?(this._code=e.readInt(),!0):!1}get code(){return this._code}}class _J{constructor(e){if(!e)throw new Error("invalid_wrapper");this.flush(),this.parse(e)}flush(){return this._offerId=-1,this._localizationId=null,this._rent=!1,this._priceCredits=0,this._priceActivityPoints=0,this._priceActivityPointsType=0,this._clubLevel=0,this._giftable=!1,this._bundlePurchaseAllowed=!1,this._products=[],!0}parse(e){if(!e)return!1;this._offerId=e.readInt(),this._localizationId=e.readString(),this._rent=e.readBoolean(),this._priceCredits=e.readInt(),this._priceActivityPoints=e.readInt(),this._priceActivityPointsType=e.readInt(),this._giftable=e.readBoolean();let t=e.readInt();for(;t>0;)this._products.push(new $c(e)),t--;return this._clubLevel=e.readInt(),this._bundlePurchaseAllowed=e.readBoolean(),!0}get offerId(){return this._offerId}get localizationId(){return this._localizationId}get rent(){return this._rent}get priceCredits(){return this._priceCredits}get priceActivityPoints(){return this._priceActivityPoints}get priceActivityPointsType(){return this._priceActivityPointsType}get clubLevel(){return this._clubLevel}get giftable(){return this._giftable}get bundlePurchaseAllowed(){return this._bundlePurchaseAllowed}get products(){return this._products}}class gJ{flush(){return this._offer=null,!0}parse(e){return e?(this._offer=new _J(e),!0):!1}get offer(){return this._offer}}class pJ{flush(){return this._clubLevel=0,this._securityLevel=0,this._isAmbassador=!1,!0}parse(e){return e?(this._clubLevel=e.readInt(),this._securityLevel=e.readInt(),this._isAmbassador=e.readBoolean(),!0):!1}get clubLevel(){return this._clubLevel}get securityLevel(){return this._securityLevel}get isAmbassador(){return this._isAmbassador}}const _E=class _E{flush(){return!0}parse(e){return e?(this._status=e.readInt(),!0):!1}get status(){return this._status}};_E.SAFETY_LOCK_STATUS_LOCKED=0,_E.SAFETY_LOCK_STATUS_UNLOCKED=1;let dv=_E;class mJ{flush(){return this._result=-1,this._validationInfo="",!0}parse(e){return e?(this._result=e.readInt(),this._validationInfo=e.readString(),!0):!1}get result(){return this._result}get validationInfo(){return this._validationInfo}}const nC=class nC{flush(){return this._result=-1,!0}parse(e){return e?(this._result=e.readInt(),!0):!1}get result(){return this._result}};nC.EMAIL_STATUS_OK=0;let JR=nC;class vJ{constructor(e){if(!e)throw new Error("invalid_wrapper");this.flush(),this.parse(e)}flush(){return this._relationshipStatusType=fR.NONE,this._friendCount=0,this._randomFriendId=0,this._randomFriendFigure=null,this._randomFriendName=null,!0}parse(e){return e?(this._relationshipStatusType=e.readInt(),this._friendCount=e.readInt(),this._randomFriendId=e.readInt(),this._randomFriendName=e.readString(),this._randomFriendFigure=e.readString(),!0):!1}get relationshipStatusType(){return this._relationshipStatusType}get friendCount(){return this._friendCount}get randomFriendId(){return this._randomFriendId}get randomFriendName(){return this._randomFriendName}get randomFriendFigure(){return this._randomFriendFigure}}class EJ{flush(){return this._userId=0,this._relationshipStatusMap=null,!0}parse(e){if(!e)return!1;this._userId=e.readInt(),this._relationshipStatusMap=new li;const t=e.readInt();for(let i=0;i0;){e.readInt();const i=e.readString();this._badges.push(i),t--}return!0}get userId(){return this._userId}get badges(){return this._badges}}class TJ{constructor(e){if(!e)throw new Error("invalid_wrapper");this.flush(),this.parse(e)}flush(){return this._userId=0,this._username=null,this._figure=null,this._gender=null,this._motto=null,this._realName=null,this._directMail=!1,this._respectsReceived=0,this._respectsRemaining=0,this._respectsPetRemaining=0,this._streamPublishingAllowed=!1,this._lastAccessDate=null,this._canChangeName=!1,this._safetyLocked=!1,!0}parse(e){return e?(this._userId=e.readInt(),this._username=e.readString(),this._figure=e.readString(),this._gender=e.readString(),this._motto=e.readString(),this._realName=e.readString(),this._directMail=e.readBoolean(),this._respectsReceived=e.readInt(),this._respectsRemaining=e.readInt(),this._respectsPetRemaining=e.readInt(),this._streamPublishingAllowed=e.readBoolean(),this._lastAccessDate=e.readString(),this._canChangeName=e.readBoolean(),this._safetyLocked=e.readBoolean(),!0):!1}get userId(){return this._userId}get username(){return this._username}get figure(){return this._figure}get gender(){return this._gender}get motto(){return this._motto}get realName(){return this._realName}get directMail(){return this._directMail}get respectsReceived(){return this._respectsReceived}get respectsRemaining(){return this._respectsRemaining}get respectsPetRemaining(){return this._respectsPetRemaining}get streamPublishingAllowed(){return this._streamPublishingAllowed}get lastAccessedDate(){return this._lastAccessDate}get canChangeName(){return this._canChangeName}get safetyLocked(){return this._safetyLocked}}class IJ{flush(){return this._userInfo=null,!0}parse(e){return!(!e||(this._userInfo=new TJ(e),!this._userInfo))}get userInfo(){return this._userInfo}}class RJ{flush(){return this._webId=-1,this._id=-1,this._newName="",!0}parse(e){return e?(this._webId=e.readInt(),this._id=e.readInt(),this._newName=e.readString(),!0):!1}get webId(){return this._webId}get id(){return this._id}get newName(){return this._newName}}class g4{constructor(e){this._groupId=e.readInt(),this._groupName=e.readString(),this._badgeCode=e.readString(),this._colorA=e.readString(),this._colorB=e.readString(),this._favourite=e.readBoolean(),this._ownerId=e.readInt(),this._hasForum=e.readBoolean()}get groupId(){return this._groupId}get groupName(){return this._groupName}get badgeCode(){return this._badgeCode}get colorA(){return this._colorA}get colorB(){return this._colorB}get favourite(){return this._favourite}get ownerId(){return this._ownerId}get hasForum(){return this._hasForum}}class SJ{flush(){return this._id=0,this._username=null,this._figure=null,this._motto=null,this._registration=null,this._achievementPoints=0,this._friendsCount=0,this._isMyFriend=!1,this._requestSent=!1,this._isOnline=!1,this._groups=[],this._secondsSinceLastVisit=0,this._openProfileWindow=!1,!0}parse(e){if(!e)return!1;this._id=e.readInt(),this._username=e.readString(),this._figure=e.readString(),this._motto=e.readString(),this._registration=e.readString(),this._achievementPoints=e.readInt(),this._friendsCount=e.readInt(),this._isMyFriend=e.readBoolean(),this._requestSent=e.readBoolean(),this._isOnline=e.readBoolean();const t=e.readInt();for(let i=0;i0;)this._tags.push(e.readString()),t--;return!0}get roomUnitId(){return this._roomUnitId}get tags(){return this._tags}}class OJ{flush(){return this._email=null,this._isVerified=!1,this._allowChange=!1,!0}parse(e){return e?(this._email=e.readString(),this._isVerified=e.readBoolean(),this._allowChange=e.readBoolean(),!0):!1}get email(){return this._email}get isVerified(){return this._isVerified}get allowChange(){return this._allowChange}}class wJ{flush(){return this._userId=-1,!0}parse(e){return e?(this._userId=e.readInt(),!0):!1}get userId(){return this._userId}}class CJ{flush(){return this._groupId=-1,!0}parse(e){return e?(this._groupId=e.readInt(),!0):!1}get groupId(){return this._groupId}}class MJ{flush(){return this._groupId=-1,this._requester=null,!0}parse(e){return e?(this._groupId=e.readInt(),this._requester=new gb(e),!0):!1}get groupId(){return this._groupId}get requester(){return this._requester}}const rC=class rC{flush(){return this._reason=-1,!0}parse(e){return e?(this._reason=e.readInt(),!0):!1}get reason(){return this._reason}};rC.INSUFFICIENT_SUBSCRIPTION_LEVEL=2;let eS=rC;class NJ{flush(){return this._guildId=-1,this._reason=-1,!0}parse(e){return e?(this._guildId=e.readInt(),this._reason=e.readInt(),!0):!1}get guildId(){return this._guildId}get reason(){return this._reason}}class PJ{flush(){return this._groups=[],!0}parse(e){if(!e)return!1;let t=e.readInt();for(;t>0;)this._groups.push(new g4(e)),t--;return!0}get groups(){return this._groups}}class kJ{flush(){return this._badges=new Map,!0}parse(e){if(!e)return!1;let t=e.readInt();for(;t>0;){const i=e.readInt(),n=e.readString();this._badges.set(i,n),t--}return!0}get badges(){return this._badges}}const aC=class aC{flush(){return this._reason=-1,!0}parse(e){return e?(this._reason=e.readInt(),!0):!1}get reason(){return this._reason}};aC.INSUFFICIENT_SUBSCRIPTION_LEVEL=4;let tS=aC;class xJ{flush(){return this._ignoredUsers=[],!0}parse(e){if(!e)return!1;this._ignoredUsers=[];let t=e.readInt();for(;t>0;)this._ignoredUsers.push(e.readString()),t--;return!0}get ignoredUsers(){return this._ignoredUsers}}class DJ{flush(){return this._result=-1,this._name=null,!0}parse(e){return e?(this._result=e.readInt(),this._name=e.readString(),!0):!1}get result(){return this._result}get name(){return this._name}}class LJ{flush(){return this._link=null,!0}parse(e){return e?(this._link=e.readString(),!0):!1}get link(){return this._link}}class UJ{flush(){return this._credits=null,!0}parse(e){return e?(this._credits=e.readString(),!0):!1}get credits(){return this._credits}}class FJ{flush(){return this._currencies=new Map,!0}parse(e){if(!e)return!1;let t=e.readInt();for(;t>0;)this._currencies.set(e.readInt(),e.readInt()),t--;return!0}get currencies(){return this._currencies}}const rc=class rc{flush(){return this._productName=null,this._daysToPeriodEnd=0,this._memberPeriods=0,this._periodsSubscribedAhead=0,this._responseType=0,this._hasEverBeenMember=!1,this._isVip=!1,this._pastClubDays=0,this._pastVipDays=0,this._minutesUntilExpiration=0,this._minutesSinceLastModified=0,!0}parse(e){return e?(this._productName=e.readString(),this._daysToPeriodEnd=e.readInt(),this._memberPeriods=e.readInt(),this._periodsSubscribedAhead=e.readInt(),this._responseType=e.readInt(),this._hasEverBeenMember=e.readBoolean(),this._isVip=e.readBoolean(),this._pastClubDays=e.readInt(),this._pastVipDays=e.readInt(),this._minutesUntilExpiration=e.readInt(),e.bytesAvailable&&(this._minutesSinceLastModified=e.readInt()),!0):!1}get productName(){return this._productName}get daysToPeriodEnd(){return this._daysToPeriodEnd}get memberPeriods(){return this._memberPeriods}get periodsSubscribedAhead(){return this._periodsSubscribedAhead}get responseType(){return this._responseType}get hasEverBeenMember(){return this._hasEverBeenMember}get isVip(){return this._isVip}get pastClubDays(){return this._pastClubDays}get pastVipDays(){return this._pastVipDays}get minutesUntilExpiration(){return this._minutesUntilExpiration}get minutesSinceLastModified(){return this._minutesSinceLastModified}};rc.RESPONSE_TYPE_LOGIN=1,rc.RESPONSE_TYPE_PURCHASE=2,rc.RESPONSE_TYPE_DISCOUNT_AVAILABLE=3,rc.RESPONSE_TYPE_CITIZENSHIP_DISCOUNT=4;let iS=rc;const ac=class ac{constructor(e){if(this._unseen=0,!e)throw new Error("invalid_parser");this._achievementId=e.readInt(),this._level=e.readInt(),this._badgeId=e.readString(),this._scoreAtStartOfLevel=e.readInt(),this._scoreLimit=Math.max(1,e.readInt()),this._levelRewardPoints=e.readInt(),this._levelRewardPointType=e.readInt(),this._currentPoints=e.readInt(),this._finalLevel=e.readBoolean(),this._category=e.readString(),this._subCategory=e.readString(),this._levelCount=e.readInt(),this._displayMethod=e.readInt()}get achievementId(){return this._achievementId}get badgeId(){return this._badgeId}get level(){return this._level}get scoreAtStartOfLevel(){return this._scoreAtStartOfLevel}get scoreLimit(){return this._scoreLimit-this._scoreAtStartOfLevel}get levelRewardPoints(){return this._levelRewardPoints}get levelRewardPointType(){return this._levelRewardPointType}get currentPoints(){return this._currentPoints-this._scoreAtStartOfLevel}get finalLevel(){return this._finalLevel}get category(){return this._category}get subCategory(){return this._subCategory}get levelCount(){return this._levelCount}get firstLevelAchieved(){return this._level>1||this._finalLevel}setMaxProgress(){this._currentPoints=this._scoreLimit}get displayMethod(){return this._displayMethod}get progress(){return this._currentPoints}get toNextProgress(){return this._scoreLimit}set unseen(e){this._unseen=e}get unseen(){return this._unseen}reset(e){this._achievementId=e._achievementId,this._level=e._level,this._badgeId=e._badgeId,this._scoreAtStartOfLevel=e._scoreAtStartOfLevel,this._scoreLimit=e._scoreLimit,this._levelRewardPoints=e._levelRewardPoints,this._levelRewardPointType=e._levelRewardPointType,this._currentPoints=e._currentPoints,this._finalLevel=e._finalLevel,this._category=e.category,this._subCategory=e._subCategory,this._levelCount=e._levelCount,this._displayMethod=e._displayMethod}};ac.DISPLAY_METHOD_OBSOLETE=-1,ac.DISPLAY_METHOD_SHOW_LEVEL_PROGRESS=0,ac.DISPLAY_METHOD_NEVER_SHOW_PROGRESS=1,ac.DISPLAY_METHOD_SHOW_TOTAL_PROGRESS=2;let _v=ac;class BJ{flush(){return this._achievement=null,!0}parse(e){return e?(this._achievement=new _v(e),!0):!1}get achievement(){return this._achievement}}const gE=class gE{constructor(e){this._achievementId=e.readInt(),this._level=e.readInt(),this._badgeId=e.readString(),this._requiredLevel=e.readInt(),this._state=e.readInt()}dispose(){this._achievementId=0,this._level=0,this._badgeId="",this._requiredLevel=0}get achievementId(){return this._achievementId}get level(){return this._level}get badgeId(){return this._badgeId}get requiredLevel(){return this._requiredLevel}get enabled(){return this._state===gE.STATE_SELECTABLE}get state(){return this._state}};gE.STATE_SELECTABLE=0;let sS=gE;class GJ{flush(){return this._achievements=[],this._defaultCategory=null,!0}parse(e){if(!e)return!1;this._achievements=[];let t=e.readInt();for(;t>0;)this._achievements.push(new _v(e)),t--;return this._defaultCategory=e.readString(),!0}get achievements(){return this._achievements}get defaultCategory(){return this._defaultCategory}}class VJ{flush(){return this._score=0,!0}parse(e){return e?(this._score=e.readInt(),!0):!1}get score(){return this._score}}class jJ{get type(){return this._type}set type(e){this._type=e}get subType(){return this._subType}set subType(e){this._subType=e}get duration(){return this._duration}set duration(e){this._duration=e}get inactiveEffectsInInventory(){return this._inactiveEffectsInInventory}set inactiveEffectsInInventory(e){this._inactiveEffectsInInventory=e}get secondsLeftIfActive(){return this._secondsLeftIfActive}set secondsLeftIfActive(e){this._secondsLeftIfActive=e}get isPermanent(){return this._permanent}set isPermanent(e){this._permanent=e}}class zJ{flush(){return this._type=0,this._duration=0,this._isPermanent=!1,!0}parse(e){return e?(this._type=e.readInt(),this._duration=e.readInt(),this._isPermanent=e.readBoolean(),!0):!1}get type(){return this._type}get duration(){return this._duration}get isPermanent(){return this._isPermanent}}class HJ{flush(){return this._type=0,this._subType=0,this._duration=0,this._permanent=!1,!0}parse(e){return e?(this._type=e.readInt(),this._subType=e.readInt(),this._duration=e.readInt(),this._permanent=e.readBoolean(),!0):!1}get type(){return this._type}get subType(){return this._subType}get duration(){return this._duration}get isPermanent(){return this._permanent}}class WJ{flush(){return this._type=0,!0}parse(e){return e?(this._type=e.readInt(),!0):!1}get type(){return this._type}}class YJ{flush(){return this._type=0,!0}parse(e){return e?(this._type=e.readInt(),!0):!1}get type(){return this._type}}class XJ{flush(){return this._effects=[],!0}parse(e){if(!e)return!1;let t=e.readInt();for(;t>0;){const i=new jJ;i.type=e.readInt(),i.subType=e.readInt(),i.duration=e.readInt(),i.inactiveEffectsInInventory=e.readInt(),i.secondsLeftIfActive=e.readInt(),i.isPermanent=e.readBoolean(),this._effects.push(i),t--}return!0}get effects(){return this._effects}}class KJ{constructor(e,t){if(!t)throw new Error("invalid_parser");this._badgeId="ACH_"+e+t.readInt(),this._limit=t.readInt()}get badgeId(){return this._badgeId}get limit(){return this._limit}}class qJ{flush(){return this._data=[],!0}parse(e){if(!e)return!1;let t=e.readInt();for(;t>0;){const i=e.readString(),n=e.readInt();let r=0;for(;r0;){const i=e.readInt(),n=e.readString();this._badgeIds.add(n,i),this._allBadgeCodes.push(n),t--}for(t=e.readInt();t>0;){e.readInt();const i=e.readString();this._activeBadgeCodes.push(i),t--}return!0}getBadgeId(e){return this._badgeIds.getValue(e)}getAllBadgeCodes(){return this._allBadgeCodes}getActiveBadgeCodes(){return this._activeBadgeCodes}}class ZJ{flush(){return!0}parse(e){return e?(this._requestCode=e.readString(),this._fulfilled=e.readBoolean(),!0):!1}get requestCode(){return this._requestCode}get fulfilled(){return this._fulfilled}}class JJ{flush(){return this._figureSetIds=[],this._boundFurnitureNames=[],!0}parse(e){if(!e)return!1;let t=e.readInt();for(;t>0;)this._figureSetIds.push(e.readInt()),t--;let i=e.readInt();for(;i>0;)this._boundFurnitureNames.push(e.readString()),i--;return!0}get figureSetIds(){return this._figureSetIds}get boundsFurnitureNames(){return this._boundFurnitureNames}}const oc=class oc{flush(){return this._reason=0,this._parameter="",!0}parse(e){return e?(this._reason=e.readInt(),this._parameter=e.readString(),!0):!1}get reason(){return this._reason}get parameter(){return this._parameter}};oc.REASON_FULL=1,oc.REASON_CLOSED=2,oc.REASON_QUEUE_ERROR=3,oc.REASON_BANNED=4;let nS=oc;class eee{flush(){return this._userName=null,!0}parse(e){return e?(this._userName=e.readString(),!0):!1}get userName(){return this._userName}}class tee{flush(){return!0}parse(e){return!!e}}class iee{flush(){return!0}parse(e){return!!e}}class see{flush(){return this._controllerLevel=Sa.NONE,!0}parse(e){return e?(this._controllerLevel=e.readInt(),!0):!1}get controllerLevel(){return this._controllerLevel}}class nee{flush(){return!0}parse(e){return!!e}}class ree{flush(){return this._roomId=0,!0}parse(e){return e?(this._roomId=e.readInt(),!0):!1}get roomId(){return this._roomId}}class aee{flush(){return this._botId=-1,this._commandId=-1,this._data="",!0}parse(e){return e?(this._botId=e.readInt(),this._commandId=e.readInt(),this._data=e.readString(),!0):!1}get botId(){return this._botId}get commandId(){return this._commandId}get data(){return this._data}}class oee{flush(){return this._botId=-1,!0}parse(e){return e?(this._botId=e.readInt(),!0):!1}get botId(){return this._botId}}class lee{constructor(e){this._id=e.readInt(),this._data=e.readString()}get id(){return this._id}get data(){return this._data}}class uee{flush(){return this._botId=-1,this._skillList=[],!0}parse(e){if(!e)return!1;this._botId=e.readInt();let t=e.readInt();for(;t>0;)this._skillList.push(new lee(e)),t--;return!0}get botId(){return this._botId}get skillList(){return this._skillList}}class hee{constructor(e){this._userId=e.readInt(),this._userName=e.readString()}get userId(){return this._userId}get userName(){return this._userName}}class cee{flush(){return this._roomId=0,this._bannedUsers=[],!0}parse(e){if(!e)return!1;this._roomId=e.readInt();let t=e.readInt();for(;t>0;)this._bannedUsers.push(new hee(e)),t--;return!0}get roomId(){return this._roomId}get bannedUsers(){return this._bannedUsers}}class fee{constructor(e){this._userId=e.readInt(),this._userName=e.readString()}get userId(){return this._userId}get userName(){return this._userName}get selected(){return this._selected}set selected(e){this._selected=e}}class dee{flush(){return this._roomId=0,this._data=null,!0}parse(e){return e?(this._roomId=e.readInt(),this._data=new fee(e),!0):!1}get roomId(){return this._roomId}get data(){return this._data}}class _ee{flush(){return this._roomId=0,this._userId=0,!0}parse(e){return e?(this._roomId=e.readInt(),this._userId=e.readInt(),!0):!1}get roomId(){return this._roomId}get userId(){return this._userId}}class gee{flush(){return this._roomId=0,this._users=new Map,!0}parse(e){if(!e)return!1;this._roomId=e.readInt();let t=e.readInt();for(;t>0;){const i=e.readInt(),n=e.readString();this._users.set(i,n),t--}return!0}get roomId(){return this._roomId}get users(){return this._users}}class pee{flush(){return!0}parse(e){return e?(this._isMuted=e.readBoolean(),!0):!1}get isMuted(){return this._isMuted}}class mee{flush(){return this._roomId=0,!0}parse(e){return e?(this._roomId=e.readInt(),!0):!1}get roomId(){return this._roomId}}const js=class js{constructor(e){if(!e)throw new Error("invalid_wrapper");this._mode=e.readInt(),this._weight=e.readInt(),this._speed=e.readInt(),this._distance=e.readInt(),this._protection=e.readInt()}get mode(){return this._mode}get weight(){return this._weight}get speed(){return this._speed}get distance(){return this._distance}get protection(){return this._protection}};js.CHAT_MODE_FREE_FLOW=0,js.CHAT_MODE_LINE_BY_LINE=1,js.CHAT_BUBBLE_WIDTH_WIDE=0,js.CHAT_BUBBLE_WIDTH_NORMAL=1,js.CHAT_BUBBLE_WIDTH_THIN=2,js.CHAT_SCROLL_SPEED_FAST=0,js.CHAT_SCROLL_SPEED_NORMAL=1,js.CHAT_SCROLL_SPEED_SLOW=2,js.FLOOD_FILTER_STRICT=0,js.FLOOD_FILTER_NORMAL=1,js.FLOOD_FILTER_LOOSE=2;let H_=js;const Hd=class Hd{constructor(e){this._allowMute=e.readInt(),this._allowKick=e.readInt(),this._allowBan=e.readInt()}get allowMute(){return this._allowMute}get allowKick(){return this._allowKick}get allowBan(){return this._allowBan}};Hd.MODERATION_LEVEL_NONE=0,Hd.MODERATION_LEVEL_USER_WITH_RIGHTS=1,Hd.MODERATION_LEVEL_ALL=2;let gv=Hd;const Ii=class Ii{constructor(){this._roomId=-1,this._name=null,this._description=null,this._doorMode=Ii.DOORMODE_OPEN,this._categoryId=-1,this._maximumVisitors=0,this._maximumVisitorsLimit=0,this._tags=[],this._tradeMode=Ii.TRADEMODE_NOT_ALLOWED,this._allowPets=!1,this._allowFoodConsume=!1,this._allowWalkThrough=!1,this._hideWalls=!1,this._wallThickness=0,this._floorThickness=0,this._controllersById=new Map,this._controllerList=null,this._highlightedUserId=-1,this._bannedUsersById=new Map,this._bannedUsersList=null,this._roomModerationSettings=null,this._chatSettings=null,this._allowNavigatorDynamicCats=!1}static from(e){const t=new Ii;return t._roomId=e._roomId,t._name=e._name,t._description=e._description,t._doorMode=e._doorMode,t._categoryId=e._categoryId,t._maximumVisitors=e._maximumVisitors,t._maximumVisitorsLimit=e._maximumVisitorsLimit,t._tags=e._tags,t._tradeMode=e._tradeMode,t._allowPets=e._allowPets,t._allowFoodConsume=e._allowFoodConsume,t._allowWalkThrough=e._allowWalkThrough,t._hideWalls=e._hideWalls,t._wallThickness=e._wallThickness,t._floorThickness=e._floorThickness,t._controllersById=e._controllersById,t._controllerList=e._controllerList,t._highlightedUserId=e._highlightedUserId,t._bannedUsersById=e._bannedUsersById,t._bannedUsersList=e._bannedUsersList,t._roomModerationSettings=e._roomModerationSettings,t._chatSettings=e._chatSettings,t._allowNavigatorDynamicCats=e._allowNavigatorDynamicCats,t}static getDoorModeLocalizationKey(e){switch(e){case Ii.DOORMODE_OPEN:return"${navigator.door.mode.open}";case Ii.DOORMODE_CLOSED:return"${navigator.door.mode.closed}";case Ii.DOORMODE_PASSWORD:return"${navigator.door.mode.password}";case Ii.DOORMODE_INVISIBLE:return"${navigator.door.mode.invisible}";case Ii.DOORMODE_NOOBS_ONLY:return"${navigator.door.mode.noobs_only}"}return""}get tradeMode(){return this._tradeMode}set tradeMode(e){this._tradeMode=e}get allowPets(){return this._allowPets}set allowPets(e){this._allowPets=e}get allowFoodConsume(){return this._allowFoodConsume}set allowFoodConsume(e){this._allowFoodConsume=e}get allowWalkThrough(){return this._allowWalkThrough}set allowWalkThrough(e){this._allowWalkThrough=e}get hideWalls(){return this._hideWalls}set hideWalls(e){this._hideWalls=e}get wallThickness(){return this._wallThickness}set wallThickness(e){this._wallThickness=e}get floorThickness(){return this._floorThickness}set floorThickness(e){this._floorThickness=e}get roomId(){return this._roomId}set roomId(e){this._roomId=e}get name(){return this._name}set name(e){this._name=e}get description(){return this._description}set description(e){this._description=e}get doorMode(){return this._doorMode}set doorMode(e){this._doorMode=e}get categoryId(){return this._categoryId}set categoryId(e){this._categoryId=e}get maximumVisitors(){return this._maximumVisitors}set maximumVisitors(e){this._maximumVisitors=e}get maximumVisitorsLimit(){return this._maximumVisitorsLimit}set maximumVisitorsLimit(e){this._maximumVisitorsLimit=e}get tags(){return this._tags}set tags(e){this._tags=e}setFlatController(e,t){this._controllersById.set(e,t),this._controllerList=null,this._highlightedUserId=e}get roomModerationSettings(){return this._roomModerationSettings}set roomModerationSettings(e){this._roomModerationSettings=e}get controllersById(){return this._controllersById}set controllersById(e){this._controllersById=e}get controllerList(){if(!this._controllerList){this._controllerList=[];for(const e of this._controllersById.values())this._controllerList.push(e);this._controllerList.sort((e,t)=>e.userName.localeCompare(t.userName))}return this._controllerList}get highlightedUserId(){return this._highlightedUserId}setBannedUser(e,t){this._bannedUsersById.set(e,t),this._bannedUsersList=null}get bannedUsersById(){return this._bannedUsersById}get bannedUsersList(){if(!this._bannedUsersList){this._bannedUsersList=[];for(const e of this._bannedUsersById.values())this._bannedUsersList.push(e);this._bannedUsersList.sort((e,t)=>e.userName.localeCompare(t.userName))}return this._bannedUsersList}get chatSettings(){return this._chatSettings}set chatSettings(e){this._chatSettings=e}get allowNavigatorDynamicCats(){return this._allowNavigatorDynamicCats}set allowNavigatorDynamicCats(e){this._allowNavigatorDynamicCats=e}};Ii.DOORMODE_OPEN=0,Ii.DOORMODE_CLOSED=1,Ii.DOORMODE_PASSWORD=2,Ii.DOORMODE_INVISIBLE=3,Ii.DOORMODE_NOOBS_ONLY=4,Ii.TRADEMODE_NOT_ALLOWED=0,Ii.TRADEMODE_WITH_CONTROLLER=1,Ii.TRADEMODE_ALLOWED=2;let rS=Ii;class vee{flush(){return this._roomSettingsData=null,!0}parse(e){if(!e)return!1;this._roomSettingsData=new rS,this._roomSettingsData.roomId=e.readInt(),this._roomSettingsData.name=e.readString(),this._roomSettingsData.description=e.readString(),this._roomSettingsData.doorMode=e.readInt(),this._roomSettingsData.categoryId=e.readInt(),this._roomSettingsData.maximumVisitors=e.readInt(),this._roomSettingsData.maximumVisitorsLimit=e.readInt(),this._roomSettingsData.tags=[];let t=e.readInt();for(;t>0;)this._roomSettingsData.tags.push(e.readString()),t--;return this._roomSettingsData.tradeMode=e.readInt(),this._roomSettingsData.allowPets=e.readInt()===1,this._roomSettingsData.allowFoodConsume=e.readInt()===1,this._roomSettingsData.allowWalkThrough=e.readInt()===1,this._roomSettingsData.hideWalls=e.readInt()===1,this._roomSettingsData.wallThickness=e.readInt(),this._roomSettingsData.floorThickness=e.readInt(),this._roomSettingsData.chatSettings=new H_(e),this._roomSettingsData.allowNavigatorDynamicCats=e.readBoolean(),this._roomSettingsData.roomModerationSettings=new gv(e),!0}get data(){return this._roomSettingsData}}class Eee{flush(){return this._roomId=0,this._code=0,!0}parse(e){return e?(this._roomId=e.readInt(),this._code=e.readInt(),!0):!1}get roomId(){return this._roomId}get code(){return this._code}}class yee{flush(){return this._roomId=0,!0}parse(e){return e?(this._roomId=e.readInt(),!0):!1}get roomId(){return this._roomId}}const os=class os{flush(){return this._roomId=0,this._code=0,this._message=null,!0}parse(e){return e?(this._roomId=e.readInt(),this._code=e.readInt(),this._message=e.readString(),!0):!1}get roomId(){return this._roomId}get code(){return this._code}get message(){return this._message}};os.ERROR_ROOM_NOT_FOUND=1,os.ERROR_NOT_OWNER=2,os.ERROR_INVALID_DOOR_MODE=3,os.ERROR_INVALID_USER_LIMIT=4,os.ERROR_INVALID_PASSWORD=5,os.ERROR_INVALID_CATEGORY=6,os.ERROR_INVALID_NAME=7,os.ERROR_UNACCEPTABLE_NAME=8,os.ERROR_INVALID_DESCRIPTION=9,os.ERROR_UNACCEPTABLE_DESCRIPTION=10,os.ERROR_INVALID_TAG=11,os.ERROR_NON_USER_CHOOSABLE_TAG=12,os.ERROR_TOO_MANY_CHARACTERS_IN_TAG=13;let aS=os;class Tee{flush(){return this._selectionType=0,!0}parse(e){return e?(this._selectionType=e.readInt(),!0):!1}get selectionType(){return this._selectionType}}class Iee{flush(){return this._roomId=0,this._userId=0,!0}parse(e){return e?(this._roomId=e.readInt(),this._userId=e.readInt(),!0):!1}get roomId(){return this._roomId}get userId(){return this._userId}}class Ree{flush(){return this._chat=null,!0}parse(e){return e?(this._chat=new H_(e),!0):!1}get chat(){return this._chat}}const pi=class pi{constructor(e){if(!e)throw new Error("invalid_wrapper");this.flush(),this.parse(e)}flush(){return this._roomId=0,this._roomName=null,this._ownerId=0,this._ownerName=null,this._doorMode=0,this._userCount=0,this._maxUserCount=0,this._description=null,this._tradeMode=2,this._score=0,this._ranking=0,this._categoryId=0,this._totalStars=0,this._groupId=0,this._groupName=null,this._groupBadge=null,this._tags=[],this._bitMask=0,this._thumbnail=null,this._allowPets=!1,this._showOwner=!0,this._displayAd=!1,this._adName=null,this._adDescription=null,this._adExpiresIn=0,this._allInRoomMuted=!1,this._canMute=!1,this._officialRoomPicRef=null,!0}parse(e){return e?(this._roomId=e.readInt(),this._roomName=e.readString(),this._ownerId=e.readInt(),this._ownerName=e.readString(),this._doorMode=e.readInt(),this._userCount=e.readInt(),this._maxUserCount=e.readInt(),this._description=e.readString(),this._tradeMode=e.readInt(),this._score=e.readInt(),this._ranking=e.readInt(),this._categoryId=e.readInt(),this.parseTags(e),this.parseBitMask(e),!0):!1}parseTags(e){if(!e)return!1;this._tags=[];let t=e.readInt();for(;t>0;)this._tags.push(e.readString()),t--;return!0}parseBitMask(e){return e?(this._bitMask=e.readInt(),this._bitMask&pi.THUMBNAIL_BITMASK&&(this._officialRoomPicRef=e.readString()),this._bitMask&pi.GROUPDATA_BITMASK&&(this._groupId=e.readInt(),this._groupName=e.readString(),this._groupBadge=e.readString()),this._bitMask&pi.ROOMAD_BITMASK&&(this._adName=e.readString(),this._adDescription=e.readString(),this._adExpiresIn=e.readInt()),this._showOwner=(this._bitMask&pi.SHOWOWNER_BITMASK)>0,this._allowPets=(this._bitMask&pi.ALLOW_PETS_BITMASK)>0,this._displayAd=(this._bitMask&pi.DISPLAY_ROOMAD_BITMASK)>0,this._thumbnail=null,!0):!1}get roomId(){return this._roomId}get roomName(){return this._roomName}set roomName(e){this._roomName=e}get ownerId(){return this._ownerId}get ownerName(){return this._ownerName}get doorMode(){return this._doorMode}get userCount(){return this._userCount}get maxUserCount(){return this._maxUserCount}get description(){return this._description}get tradeMode(){return this._tradeMode}get score(){return this._score}get ranking(){return this._ranking}get categoryId(){return this._categoryId}get tags(){return this._tags}get officialRoomPicRef(){return this._officialRoomPicRef}get habboGroupId(){return this._groupId}get groupName(){return this._groupName}get groupBadgeCode(){return this._groupBadge}get roomAdName(){return this._adName}get roomAdDescription(){return this._adDescription}get roomAdExpiresInMin(){return this._adExpiresIn}get showOwner(){return this._showOwner}get allowPets(){return this._allowPets}get displayRoomEntryAd(){return this._displayAd}get canMute(){return this._canMute}set canMute(e){this._canMute=e}get allInRoomMuted(){return this._allInRoomMuted}set allInRoomMuted(e){this._allInRoomMuted=e}};pi.THUMBNAIL_BITMASK=1,pi.GROUPDATA_BITMASK=2,pi.ROOMAD_BITMASK=4,pi.SHOWOWNER_BITMASK=8,pi.ALLOW_PETS_BITMASK=16,pi.DISPLAY_ROOMAD_BITMASK=32,pi.OPEN_STATE=0,pi.DOORBELL_STATE=1,pi.PASSWORD_STATE=2,pi.INVISIBLE_STATE=3,pi.NOOB_STATE=4;let Qc=pi;class See{flush(){return this._roomId=0,this._isOwner=!1,!0}parse(e){return e?(this._roomId=e.readInt(),this._isOwner=e.readBoolean(),!0):!1}get roomId(){return this._roomId}get isOwner(){return this._isOwner}}class bee{flush(){return this._totalLikes=0,this._canLike=!1,!0}parse(e){return e?(this._totalLikes=e.readInt(),this._canLike=e.readBoolean(),!0):!1}get totalLikes(){return this._totalLikes}get canLike(){return this._canLike}}class Aee{flush(){return this._roomIndex=-1,this._groupId=-1,this._status=0,this._groupName=null,!0}parse(e){return e?(this._roomIndex=e.readInt(),this._groupId=e.readInt(),this._status=e.readInt(),this._groupName=e.readString(),!0):!1}get roomIndex(){return this._roomIndex}get groupId(){return this._groupId}get status(){return this._status}get groupName(){return this._groupName}}class Oee{constructor(e,t,i){this._id=0,this._state=0,this._id=e,this._state=t,this._data=i}get id(){return this._id}get state(){return this._state}get data(){return this._data}}class wee{flush(){return this._code=0,!0}parse(e){return e?(this._code=e.readInt(),!0):!1}get count(){return this._code}}class Cee{flush(){return this._itemId=0,this._value=0,!0}parse(e){return e?(this._itemId=e.readInt(),this._value=e.readInt(),!0):!1}get itemId(){return this._itemId}get value(){return this._value}}class cl{flush(){return this._itemId=0,this._data=null,!0}parse(e){return e?(this._itemId=parseInt(e.readString()),this._data=cl.parseObjectData(e),!0):!1}static parseObjectData(e){if(!e)return null;const t=No.getData(e.readInt());return t?(t.parseWrapper(e),t):null}get furnitureId(){return this._itemId}get objectData(){return this._data}}class Mw{constructor(e){if(!e)throw new Error("invalid_wrapper");this.flush(),this.parse(e)}flush(){return this._itemId=0,this._spriteId=0,this._spriteName=null,this._x=0,this._y=0,this._direction=0,this._z=0,this._stackHeight=0,this._extra=0,this._data=null,this._state=0,this._expires=0,this._usagePolicy=0,this._userId=0,this._username=null,!0}parse(e){return e?(this._itemId=e.readInt(),this._spriteId=e.readInt(),this._x=e.readInt(),this._y=e.readInt(),this._direction=e.readInt()%8*45,this._z=parseFloat(e.readString()),this._stackHeight=parseFloat(e.readString()),this._extra=e.readInt(),this._data=cl.parseObjectData(e),this._state=parseFloat(this._data&&this._data.getLegacyString())||0,this._expires=e.readInt(),this._usagePolicy=e.readInt(),this._userId=e.readInt(),this._username=null,this._spriteId<0&&(this._spriteName=e.readString()),!0):!1}get itemId(){return this._itemId}get spriteId(){return this._spriteId}get x(){return this._x}get y(){return this._y}get direction(){return this._direction}get z(){return isNaN(this._z)?0:this._z}get stackHeight(){return isNaN(this._stackHeight)?0:this._stackHeight}get extra(){return this._extra}get data(){return this._data}get state(){return this._state}get expires(){return this._expires}get usagePolicy(){return this._usagePolicy}get userId(){return this._userId}get username(){return this._username}set username(e){this._username=e}get spriteName(){return this._spriteName}set spriteName(e){this._spriteName=e}}class Mee{flush(){return this._item=null,!0}parse(e){return e?(this._item=new Mw(e),this._item.username=e.readString(),!0):!1}get item(){return this._item}}class Nee{flush(){return this._owners=new Map,this._items=[],!0}parse(e){if(!e||!this.parseOwners(e))return!1;let t=e.readInt();for(;t>0;){const i=new Mw(e);if(!i)continue;const n=this._owners.get(i.userId);n&&(i.username=n),this._items.push(i),t--}return!0}parseOwners(e){if(!e)return!1;let t=e.readInt();for(;t>0;)this._owners.set(e.readInt(),e.readString()),t--;return!0}get owners(){return this._owners}get items(){return this._items}}class Pee{flush(){return this._itemId=0,this._isExpired=!0,this._userId=0,this._delay=0,!0}parse(e){return e?(this._itemId=parseInt(e.readString()),this._isExpired=e.readBoolean(),this._userId=e.readInt(),this._delay=e.readInt(),!0):!1}get itemId(){return this._itemId}get isExpired(){return this._isExpired}get userId(){return this._userId}get delay(){return this._delay}}class kee{flush(){return this._item=null,!0}parse(e){return e?(this._item=new Mw(e),!0):!1}get item(){return this._item}}class xee{flush(){return this._isWallItem=!1,this._furniTypeName=null,this._buyout=!1,this._priceInCredits=-1,this._priceInActivityPoints=-1,this._activityPointType=-1,!0}parse(e){return e?(this._isWallItem=e.readBoolean(),this._furniTypeName=e.readString(),this._buyout=e.readBoolean(),this._priceInCredits=e.readInt(),this._priceInActivityPoints=e.readInt(),this._activityPointType=e.readInt(),!0):!1}get isWallItem(){return this._isWallItem}get furniTypeName(){return this._furniTypeName}get buyout(){return this._buyout}get priceInCredits(){return this._priceInCredits}get priceInActivityPoints(){return this._priceInActivityPoints}get activityPointType(){return this._activityPointType}}class Dee{flush(){return this._aliases=new Map,!0}parse(e){if(!e)return!1;let t=e.readInt();for(;t>0;)this._aliases.set(e.readString(),e.readString()),t--;return!0}get aliases(){return this._aliases}}class Lee{flush(){return this._furniId=-1,this._height=0,!0}parse(e){return e?(this._furniId=e.readInt(),this._height=e.readInt()/100,!0):!1}get furniId(){return this._furniId}get height(){return this._height}}class Uee{flush(){return this._objectId=0,this._guildId=0,this._guildName=null,this._guildHomeRoomId=0,this._userIsMember=!1,this._guildHasReadableForum=!1,!0}parse(e){return e?(this._objectId=e.readInt(),this._guildId=e.readInt(),this._guildName=e.readString(),this._guildHomeRoomId=e.readInt(),this._userIsMember=e.readBoolean(),this._guildHasReadableForum=e.readBoolean(),!0):!1}get objectId(){return this._objectId}get guildId(){return this._guildId}get guildName(){return this._guildName}get guildHomeRoomId(){return this._guildHomeRoomId}get userIsMember(){return this._userIsMember}get guildHasReadableForum(){return this._guildHasReadableForum}}class Fee{flush(){return this._itemId=0,this._data="",!0}parse(e){return e?(this._itemId=parseInt(e.readString()),this._data=e.readString(),!0):!1}get furnitureId(){return this._itemId}get data(){return this._data}}class Bee{get furniId(){return this._furniId}flush(){return this._furniId=-1,!0}parse(e){return this._furniId=e.readInt(),!0}}class Gee{get furniId(){return this._furniId}flush(){return this._furniId=-1,!0}parse(e){return this._furniId=e.readInt(),!0}}class Vee{get furniId(){return this._furniId}get start(){return this._start}flush(){return this._furniId=-1,this._start=!1,!0}parse(e){return this._furniId=e.readInt(),this._start=e.readBoolean(),!0}}class jee{flush(){return this._itemId=0,this._state=0,!0}parse(e){return e?(this._itemId=e.readInt(),this._state=e.readInt(),!0):!1}get itemId(){return this._itemId}get state(){return this._state}}class zee{flush(){return!0}parse(e){return e?(this._reason=e.readInt(),!0):!1}get reason(){return this._reason}}class Hee{flush(){return!0}parse(e){return e?(this._expiryTime=e.readInt(),!0):!1}get expiryTime(){return this._expiryTime}}const En=class En{flush(){return this._rented=!1,this._renterId=-1,this._renterName=null,this._canRent=!1,this._canRentErrorCode=-1,this._timeRemaining=-1,this._price=-1,!0}parse(e){return e?(this._rented=e.readBoolean(),this._canRentErrorCode=e.readInt(),this._canRent=this._canRentErrorCode===0,this._renterId=e.readInt(),this._renterName=e.readString(),this._timeRemaining=e.readInt(),this._price=e.readInt(),this._rented||(this._renterId=-1,this._renterName=""),!0):!1}get rented(){return this._rented}get renterId(){return this._renterId}get renterName(){return this._renterName}get canRent(){return this._canRent}get price(){return this._price}get timeRemaining(){return this._timeRemaining}get canRentErrorCode(){return this._canRentErrorCode}};En.SPACE_ALREADY_RENTED=100,En.SPACE_EXTEND_NOT_RENTED=101,En.SPACE_EXTEND_NOT_RENTED_BY_YOU=102,En.CAN_RENT_ONLY_ONE_SPACE=103,En.NOT_ENOUGH_CREDITS=200,En.NOT_ENOUGH_PIXELS=201,En.CANT_RENT_NO_PERMISSION=202,En.CANT_RENT_NO_HABBO_CLUB=203,En.CANT_RENT=300,En.CANT_RENT_GENERIC=400;let oS=En;class Wee{flush(){return this._itemId=-1,this._location="",!0}parse(e){return e?(this._itemId=e.readInt(),this._location=e.readString(),!0):!1}get itemId(){return this._itemId}get location(){return this._location}}class Yee{constructor(e,t,i,n){this.id=e,this.type=t,this.color=i,this.brightness=n}}class Xee{constructor(){this._selectedPresetId=0,this._presets=[]}flush(){return this._presets=[],!0}parse(e){const t=e.readInt();this._selectedPresetId=e.readInt();for(let i=0;i=this.presetCount?null:this._presets[e]}get presetCount(){return this._presets.length}get selectedPresetId(){return this._selectedPresetId}}class Kee{flush(){return this._roomId=-1,this._roomName=null,this._messageCount=-1,!0}parse(e){return e?(this._roomId=e.readInt(),this._roomName=e.readString(),this._messageCount=e.readInt(),!0):!1}get roomId(){return this._roomId}get roomName(){return this._roomName}get messageCount(){return this._messageCount}}class Nw{constructor(e){if(!e)throw new Error("invalid_wrapper");this.flush(),this.parse(e)}flush(){return this._itemId=0,this._spriteId=0,this._location=null,this._stuffData=null,this._state=0,this._secondsToExpiration=0,this._usagePolicy=-1,this._userId=0,this._username=null,this._width=0,this._height=0,this._localX=0,this._localY=0,this._y=0,this._z=0,this._direction=null,this._isOldFormat=!1,!0}parse(e){if(!e)return!1;this._itemId=parseInt(e.readString()),this._spriteId=e.readInt(),this._location=e.readString(),this._stuffData=e.readString(),this._secondsToExpiration=e.readInt(),this._usagePolicy=e.readInt(),this._userId=e.readInt(),this._username=null;const t=parseFloat(this._stuffData);if(isNaN(t)||(this._state=Math.trunc(t)),this._location.indexOf(":")===0){this._isOldFormat=!1;let i=this._location.split(" ");if(i.length>=3){let n=i[0],r=i[1];const a=i[2];if(n.length>3&&r.length>2&&(n=n.substr(3),r=r.substr(2),i=n.split(","),i.length>=2)){const o=parseInt(i[0]),l=parseInt(i[1]);if(i=r.split(","),i.length>=2){const u=parseInt(i[0]),c=parseInt(i[1]);this._width=o,this._height=l,this._localX=u,this._localY=c,this._direction=a}}}}else this._isOldFormat=!0;return!0}get itemId(){return this._itemId}get spriteId(){return this._spriteId}get wallPosition(){return this._location}get stuffData(){return this._stuffData}get state(){return this._state}get secondsToExpiration(){return this._secondsToExpiration}get usagePolicy(){return this._usagePolicy}get userId(){return this._userId}get username(){return this._username}set username(e){this._username=e}get width(){return this._width}get height(){return this._height}get localX(){return this._localX}get localY(){return this._localY}get direction(){return this._direction}get isOldFormat(){return this._isOldFormat}}class qee{flush(){return this._item=null,!0}parse(e){return e?(this._item=new Nw(e),this._item.username=e.readString(),!0):!1}get item(){return this._item}}class $ee{flush(){return this._owners=new Map,this._items=[],!0}parse(e){if(!e||!this.parseOwners(e))return!1;let t=e.readInt();for(;t>0;){const i=new Nw(e);if(!i)continue;const n=this._owners.get(i.userId);n&&(i.username=n),this._items.push(i),t--}return!0}parseOwners(e){if(!e)return!1;let t=e.readInt();for(;t>0;)this._owners.set(e.readInt(),e.readString()),t--;return!0}get owners(){return this._owners}get items(){return this._items}}class Qee{flush(){return this._itemId=0,this._userId=0,!0}parse(e){return e?(this._itemId=parseInt(e.readString()),this._userId=e.readInt(),!0):!1}get itemId(){return this._itemId}get userId(){return this._userId}}class Zee{flush(){return this._item=null,!0}parse(e){return e?(this._item=new Nw(e),!0):!1}get item(){return this._item}}class Jee{flush(){return this._email=null,this._isVerified=!1,this._allowChange=!1,this._furniId=-1,this._requestedByUser=!1,!0}parse(e){return e?(this._email=e.readString(),this._isVerified=e.readBoolean(),this._allowChange=e.readBoolean(),this._furniId=e.readInt(),this._requestedByUser=e.readBoolean(),!0):!1}get email(){return this._email}get isVerified(){return this._isVerified}get allowChange(){return this._allowChange}get furniId(){return this._furniId}get requestedByUser(){return this._requestedByUser}}class ete{parse(e){return this._furniId=e.readInt(),this._commandId=e.readInt(),!0}flush(){return this._furniId=-1,this._commandId=-1,!0}get furniId(){return this._furniId}get commandId(){return this._commandId}}class tte{constructor(e,t,i){this._video=e,this._title=t,this._description=i}get video(){return this._video}get title(){return this._title}get description(){return this._description}}class ite{flush(){return this._furniId=-1,this._playlists=null,this._selectedPlaylistId=null,!0}parse(e){this._furniId=e.readInt();const t=e.readInt();this._playlists=[];for(let i=0;i0;){const i=e.readInt(),n=cl.parseObjectData(e),r=parseFloat(n.getLegacyString());this._objects.push(new Oee(i,r,n)),t--}return!0}get objects(){return this._objects}}class rte{flush(){return this._rollerId=0,this._itemsRolling=[],this._unitRolling=null,!0}parse(e){if(!e)return!1;const t=e.readInt(),i=e.readInt(),n=e.readInt(),r=e.readInt();let a=e.readInt();for(;a>0;){const h=e.readInt(),f=parseFloat(e.readString()),d=parseFloat(e.readString()),_=new pa(h,new M(t,i,f),new M(n,r,d));this._itemsRolling.push(_),a--}if(this._rollerId=e.readInt(),!e.bytesAvailable)return!0;const o=e.readInt(),l=e.readInt(),u=parseFloat(e.readString()),c=parseFloat(e.readString());switch(o){case 0:break;case 1:this._unitRolling=new pa(l,new M(t,i,u),new M(n,r,c),pa.MOVE);break;case 2:this._unitRolling=new pa(l,new M(t,i,u),new M(n,r,c),pa.SLIDE);break}return!0}get rollerId(){return this._rollerId}get itemsRolling(){return this._itemsRolling}get unitRolling(){return this._unitRolling}}const Wd=class Wd{flush(){return this._model=null,this._width=0,this._height=0,this._wallHeight=-1,this._heightMap=[],this._scale=64,this._model=null,!0}parse(e){if(!e)return!1;const t=e.readBoolean(),i=e.readInt(),n=e.readString();return this.parseExplicitly(n,i,t)}parseModel(e,t,i=!0){return this.parseExplicitly(e,t,i)}parseExplicitly(e,t,i=!0){this._scale=i?32:64,this._wallHeight=t,this._model=e;const n=this._model.split("\r"),r=n.length;let a=0,o=0;for(;oa&&(a=l.length),o++}for(this._heightMap=[],o=0;o0){let c=0;for(;c=this._width||t<0||t>=this._height)return-110;const i=this._heightMap[t];if(i===void 0)return-110;const n=i[e];return n===void 0?-110:n}get model(){return this._model}get width(){return this._width}get height(){return this._height}get heightMap(){return this._heightMap}get wallHeight(){return this._wallHeight}get scale(){return this._scale}};Wd.TILE_BLOCKED=-110;let pv=Wd;class ate{flush(){return this._x=0,this._y=0,this._direction=0,!0}parse(e){return e?(this._x=e.readInt(),this._y=e.readInt(),this._direction=e.readInt(),!0):!1}get x(){return this._x}get y(){return this._y}get direction(){return this._direction}}class Yo{static decodeTileHeight(e){return e<0?-1:(e&16383)/256}static decodeIsStackingBlocked(e){return!!(e&16384)}static decodeIsRoomTile(e){return e>=0}getTileHeight(e,t){return e<0||e>=this._width||t<0||t>=this._height?-1:Yo.decodeTileHeight(this._heights[t*this._width+e])}getStackingBlocked(e,t){return e<0||e>=this._width||t<0||t>=this._height?!0:Yo.decodeIsStackingBlocked(this._heights[t*this._width+e])}isRoomTile(e,t){return e<0||e>=this._width||t<0||t>=this._height?!1:Yo.decodeIsRoomTile(this._heights[t*this._width+e])}flush(){return this._width=0,this._height=0,this._heights=[],!0}parse(e){if(!e)return!1;this._width=e.readInt();const t=e.readInt();this._height=t/this._width;let i=0;for(;i0;){const i=e.readInt(),n=e.readInt();this._blockedTilesMap[n]||(this._blockedTilesMap[n]=[]),this._blockedTilesMap[n][i]=!0,t--}return!0}get blockedTilesMap(){return this._blockedTilesMap}}class ute{flush(){return this._floorType=null,this._wallType=null,this._landscapeType=null,this._landscapeAnimation=null,!0}parse(e){if(!e)return!1;const t=e.readString(),i=e.readString();switch(t){case"floor":this._floorType=i;break;case"wallpaper":this._wallType=i;break;case"landscape":this._landscapeType=i;break;case"landscapeanim":this._landscapeAnimation=i;break}return!0}get floorType(){return this._floorType}get wallType(){return this._wallType}get landscapeType(){return this._landscapeType}get landscapeAnimation(){return this._landscapeAnimation}}class hte{flush(){return this._name=null,this._roomId=0,!0}parse(e){return e?(this._name=e.readString(),this._roomId=e.readInt(),!0):!1}get name(){return this._name}get roomId(){return this._roomId}}class cte{flush(){return this._hideWalls=!1,this._thicknessWall=0,this._thicknessFloor=0,!0}parse(e){if(!e)return!1;this._hideWalls=e.readBoolean();let t=e.readInt(),i=e.readInt();return t=t<-2?-2:t>1?1:t,i=i<-2?-2:i>1?1:i,this._thicknessWall=Math.pow(2,t),this._thicknessFloor=Math.pow(2,i),!0}get hideWalls(){return this._hideWalls}get thicknessWall(){return this._thicknessWall}get thicknessFloor(){return this._thicknessFloor}}class YP{constructor(e){if(!e)throw new Error("invalid_wrapper");this._webId=e.readInt(),this._name=e.readString(),this._level=e.readInt(),this._figure=e.readString(),this._owner=e.readString()}dispose(){this._webId=0,this._name="",this._level=0,this._figure="",this._owner=""}get webId(){return this._webId}get name(){return this._name}get level(){return this._level}get figure(){return this._figure}get owner(){return this._owner}}class XP{constructor(e){this._stuffId=e.readInt(),this._classId=e.readInt(),this._productCode=e.readString(),this._userId=e.readInt(),this._userName=e.readString(),this._rarityLevel=e.readInt(),this._hasMutation=e.readBoolean()}get stuffId(){return this._stuffId}get classId(){return this._classId}get productCode(){return this._productCode}get userId(){return this._userId}get userName(){return this._userName}get rarityLevel(){return this._rarityLevel}get hasMutation(){return this._hasMutation}}class fte{flush(){return this._resultData=null,this._otherResultData=null,!0}parse(e){return e?(this._resultData=new XP(e),this._otherResultData=new XP(e),!0):!1}get resultData(){return this._resultData}get otherResultData(){return this._otherResultData}}class dte{flush(){return this._petId=-1,this._roomIndex=-1,this._gainedExperience=0,!0}parse(e){return e?(this._petId=e.readInt(),this._roomIndex=e.readInt(),this._gainedExperience=e.readInt(),!0):!1}get petId(){return this._petId}get roomIndex(){return this._roomIndex}get gainedExperience(){return this._gainedExperience}}class _te{flush(){return!0}parse(e){return e?(this._roomIndex=e.readInt(),this._petId=e.readInt(),this._figureData=new kw(e),this._hasSaddle=e.readBoolean(),this._isRiding=e.readBoolean(),!0):!1}get roomIndex(){return this._roomIndex}get petId(){return this._petId}get figureData(){return this._figureData}get hasSaddle(){return this._hasSaddle}get isRiding(){return this._isRiding}}class gte{flush(){return this._id=-1,this._skillThresholds=[],!0}parse(e){if(!e)return!1;this._id=e.readInt(),this._name=e.readString(),this._level=e.readInt(),this._maximumLevel=e.readInt(),this._experience=e.readInt(),this._levelExperienceGoal=e.readInt(),this._energy=e.readInt(),this._maximumEnergy=e.readInt(),this._happyness=e.readInt(),this._maximumHappyness=e.readInt(),this._respect=e.readInt(),this._ownerId=e.readInt(),this._age=e.readInt(),this._ownerName=e.readString(),this._rarityLevel=e.readInt(),this._saddle=e.readBoolean(),this._rider=e.readBoolean();let t=e.readInt();for(;t>0;)this._skillThresholds.push(e.readInt()),t--;return this._skillThresholds.sort(),this._publiclyRideable=e.readInt(),this._breedable=e.readBoolean(),this._fullyGrown=e.readBoolean(),this._dead=e.readBoolean(),this._unknownRarity=e.readInt(),this._maximumTimeToLive=e.readInt(),this._remainingTimeToLive=e.readInt(),this._remainingGrowTime=e.readInt(),this._publiclyBreedable=e.readBoolean(),!0}get id(){return this._id}get name(){return this._name}get level(){return this._level}get maximumLevel(){return this._maximumLevel}get experience(){return this._experience}get energy(){return this._energy}get happyness(){return this._happyness}get levelExperienceGoal(){return this._levelExperienceGoal}get maximumEnergy(){return this._maximumEnergy}get maximumHappyness(){return this._maximumHappyness}get respect(){return this._respect}get ownerId(){return this._ownerId}get ownerName(){return this._ownerName}get age(){return this._age}get rarityLevel(){return this._rarityLevel}get saddle(){return this._saddle}get rider(){return this._rider}get breedable(){return this._breedable}get fullyGrown(){return this._fullyGrown}get dead(){return this._dead}get maximumTimeToLive(){return this._maximumTimeToLive}get remainingTimeToLive(){return this._remainingTimeToLive}get remainingGrowTime(){return this._remainingGrowTime}get skillTresholds(){return this._skillThresholds}get publiclyRideable(){return this._publiclyRideable}get unknownRarity(){return this._unknownRarity}get publiclyBreedable(){return this._publiclyBreedable}}class pte{flush(){return this._roomIndex=-1,this._petId=-1,this._canBreed=!1,this._canHarvest=!1,this._canRevive=!1,this._hasBreedingPermission=!1,!0}parse(e){return e?(this._roomIndex=e.readInt(),this._petId=e.readInt(),this._canBreed=e.readBoolean(),this._canHarvest=e.readBoolean(),this._canRevive=e.readBoolean(),this._hasBreedingPermission=e.readBoolean(),!0):!1}get roomIndex(){return this._roomIndex}get petId(){return this._petId}get canBreed(){return this._canBreed}get canHarvest(){return this._canHarvest}get canRevive(){return this._canRevive}get hasBreedingPermission(){return this._hasBreedingPermission}}class mte{constructor(e){if(!e)throw new Error("invalid_wrapper");this._chance=e.readInt(),this._breeds=[];let t=e.readInt();for(;t>0;)this._breeds.push(e.readInt()),t--}dispose(){this._chance=-1,this._breeds=[]}get chance(){return this._chance}get breeds(){return this._breeds}}class vte{flush(){return this._isPlaying=!1,!0}parse(e){return e?(this._isPlaying=e.readBoolean(),!0):!1}get isPlaying(){return this._isPlaying}}class Ete{flush(){return!0}parse(e){return!0}}class yte{flush(){return this._seconds=0,!0}parse(e){return e?(this._seconds=e.readInt(),!0):!1}get seconds(){return this._seconds}}class Tte{flush(){return this._seconds=0,!0}parse(e){return e?(this._seconds=e.readInt(),!0):!1}get seconds(){return this._seconds}}class Pw{flush(){return this._roomIndex=null,this._message=null,this._gesture=0,this._bubble=0,this._urls=[],this._chatColours=null,this._messageLength=0,!0}parse(e){return e?(this._roomIndex=e.readInt(),this._message=e.readString(),this._gesture=e.readInt(),this._bubble=e.readInt(),this.parseUrls(e),this._chatColours=e.readString(),this._messageLength=e.readInt(),!0):!1}parseUrls(e){if(!e)return!1;this._urls=[];let t=e.readInt();for(;t>0;)this._urls.push(e.readString()),t--;return!0}get roomIndex(){return this._roomIndex}get message(){return this._message}get gesture(){return this._gesture}get bubble(){return this._bubble}get urls(){return this._urls}get chatColours(){return this._chatColours}get messageLength(){return this._messageLength}}class Ite{flush(){return this._unitId=null,this._isTyping=!1,!0}parse(e){return e?(this._unitId=e.readInt(),this._isTyping=e.readInt()===1,!0):!1}get unitId(){return this._unitId}get isTyping(){return this._isTyping}}class Rte{flush(){return this._unitId=null,this._danceId=0,!0}parse(e){return e?(this._unitId=e.readInt(),this._danceId=e.readInt(),!0):!1}get unitId(){return this._unitId}get danceId(){return this._danceId}}class Ste{flush(){return this._unitId=null,this._effectId=0,this._delay=0,!0}parse(e){return e?(this._unitId=e.readInt(),this._effectId=e.readInt(),this._delay=e.readInt(),!0):!1}get unitId(){return this._unitId}get effectId(){return this._effectId}get delay(){return this._delay}}class bte{flush(){return this._unitId=null,this._expression=0,!0}parse(e){return e?(this._unitId=e.readInt(),this._expression=e.readInt(),!0):!1}get unitId(){return this._unitId}get expression(){return this._expression}}class Ate{flush(){return this._unitId=null,this._handId=0,!0}parse(e){return e?(this._unitId=e.readInt(),this._handId=e.readInt(),!0):!1}get unitId(){return this._unitId}get handId(){return this._handId}}class Ote{flush(){return this._giverUserId=-1,this._handItemType=-1,!0}parse(e){return e?(this._giverUserId=e.readInt(),this._handItemType=e.readInt(),!0):!1}get giverUserId(){return this._giverUserId}get handItemType(){return this._handItemType}}class wte{flush(){return this._unitId=null,this._isIdle=!1,!0}parse(e){return e?(this._unitId=e.readInt(),this._isIdle=e.readBoolean(),!0):!1}get unitId(){return this._unitId}get isIdle(){return this._isIdle}}class Cte{flush(){return this._unitId=null,this._figure=null,this._gender="M",this._motto=null,this._achievementScore=0,this._backgroundId=0,this._standId=0,this._overlayId=0,!0}parse(e){return e?(this._unitId=e.readInt(),this._figure=e.readString(),this._gender=e.readString().toLocaleUpperCase(),this._motto=e.readString(),this._achievementScore=e.readInt(),this._backgroundId=e.readInt(),this._standId=e.readInt(),this._overlayId=e.readInt(),!0):!1}get unitId(){return this._unitId}get figure(){return this._figure}get gender(){return this._gender}get motto(){return this._motto}get achievementScore(){return this._achievementScore}get backgroundId(){return this._backgroundId}get standId(){return this._standId}get overlayId(){return this._overlayId}}class Mte{flush(){return this._unitId=null,this._value=0,!0}parse(e){return e?(this._unitId=e.readInt(),this._value=e.readInt(),!0):!1}get unitId(){return this._unitId}get value(){return this._value}}const pE=class pE{constructor(e){this._roomIndex=0,this._x=0,this._y=0,this._z=0,this._dir=0,this._name="",this._userType=0,this._sex="",this._figure="",this._custom="",this._activityPoints=0,this._background=0,this._stand=0,this._overlay=0,this._webID=0,this._groupID=0,this._groupStatus=0,this._groupName="",this._subType="",this._ownerId=0,this._ownerName="",this._rarityLevel=0,this._hasSaddle=!1,this._isRiding=!1,this._canBreed=!1,this._canHarvest=!1,this._canRevive=!1,this._hasBreedingPermission=!1,this._petLevel=0,this._petPosture="",this._botSkills=[],this._isModerator=!1,this._isReadOnly=!1,this._roomIndex=e}setReadOnly(){this._isReadOnly=!0}get roomIndex(){return this._roomIndex}get x(){return this._x}set x(e){this._isReadOnly||(this._x=e)}get y(){return this._y}set y(e){this._isReadOnly||(this._y=e)}get z(){return this._z}set z(e){this._isReadOnly||(this._z=e)}get dir(){return this._dir}set dir(e){this._isReadOnly||(this._dir=e)}get name(){return this._name}set name(e){this._isReadOnly||(this._name=e)}get userType(){return this._userType}set userType(e){this._isReadOnly||(this._userType=e)}get sex(){return this._sex}set sex(e){this._isReadOnly||(this._sex=e)}get figure(){return this._figure}set figure(e){this._isReadOnly||(this._figure=e)}get custom(){return this._custom}set custom(e){this._isReadOnly||(this._custom=e)}get activityPoints(){return this._activityPoints}set activityPoints(e){this._isReadOnly||(this._activityPoints=e)}get background(){return this._background}set background(e){this._background=e}get stand(){return this._stand}set stand(e){this._stand=e}get overlay(){return this._overlay}set overlay(e){this._overlay=e}get webID(){return this._webID}set webID(e){this._isReadOnly||(this._webID=e)}get groupID(){return this._groupID}set groupID(e){this._isReadOnly||(this._groupID=e)}get groupName(){return this._groupName}set groupName(e){this._isReadOnly||(this._groupName=e)}get groupStatus(){return this._groupStatus}set groupStatus(e){this._isReadOnly||(this._groupStatus=e)}get subType(){return this._subType}set subType(e){this._isReadOnly||(this._subType=e)}get ownerId(){return this._ownerId}set ownerId(e){this._isReadOnly||(this._ownerId=e)}get ownerName(){return this._ownerName}set ownerName(e){this._isReadOnly||(this._ownerName=e)}get rarityLevel(){return this._rarityLevel}set rarityLevel(e){this._isReadOnly||(this._rarityLevel=e)}get hasSaddle(){return this._hasSaddle}set hasSaddle(e){this._isReadOnly||(this._hasSaddle=e)}get isRiding(){return this._isRiding}set isRiding(e){this._isReadOnly||(this._isRiding=e)}get canBreed(){return this._canBreed}set canBreed(e){this._isReadOnly||(this._canBreed=e)}get canHarvest(){return this._canHarvest}set canHarvest(e){this._isReadOnly||(this._canHarvest=e)}get canRevive(){return this._canRevive}set canRevive(e){this._isReadOnly||(this._canRevive=e)}get hasBreedingPermission(){return this._hasBreedingPermission}set hasBreedingPermission(e){this._isReadOnly||(this._hasBreedingPermission=e)}get petLevel(){return this._petLevel}set petLevel(e){this._isReadOnly||(this._petLevel=e)}get petPosture(){return this._petPosture}set petPosture(e){this._isReadOnly||(this._petPosture=e)}get botSkills(){return this._botSkills}set botSkills(e){this._botSkills=e}get isModerator(){return this._isModerator}set isModerator(e){this._isReadOnly||(this._isModerator=e)}};pE.M="M",pE.F="F";let Ph=pE;class Nte{flush(){return this._users=[],!0}parse(e){if(!e)return!1;this._users=[];const t=e.readInt();let i=0;for(;i2&&d[0]==="hd"&&(r=parseInt(d[2])),u++}const c=["238,238,238","250,56,49","253,146,160","42,199,210","53,51,44","239,255,146","198,255,152","255,146,90","157,89,126","182,243,255","109,255,51","51,120,201","255,182,49","223,161,233","249,251,50","202,175,143","197,198,197","71,98,61","138,131,97","255,140,51","84,198,39","30,108,153","152,79,136","119,200,255","255,192,142","60,75,135","124,44,71","215,255,227","143,63,28","255,99,147","31,155,121","253,255,51"],h=e.split("=");if(h.length>1){const f=h[1].split("/");f[0];const d=f[1];i==="F"?o=10010:o=10011;const _=c.indexOf(d);a=l+_+1}return t+(".bds-10001-"+r+".ss-"+o+"-"+a)}get users(){return this._users}}class Pte{flush(){return this._unitId=null,!0}parse(e){return e?(this._unitId=parseInt(e.readString()),!0):!1}get unitId(){return this._unitId}}class kte{constructor(e,t){this._action=e,this._value=t}get action(){return this._action}get value(){return this._value}}class xte{constructor(e,t,i,n,r,a,o,l=0,u=0,c=0,h,f,d){this._id=e,this._x=t,this._y=i,this._z=n,this._height=r,this._headDirection=a,this._direction=o,this._targetX=l,this._targetY=u,this._targetZ=c,this._didMove=h,this._canStandUp=f,this._actions=d||[]}get id(){return this._id}get x(){return this._x}get y(){return this._y}get z(){return this._z}get height(){return this._height}get headDirection(){return this._headDirection}get direction(){return this._direction}get targetX(){return this._targetX}get targetY(){return this._targetY}get targetZ(){return this._targetZ}get didMove(){return this._didMove}get canStandUp(){return this._canStandUp}get actions(){return this._actions}}class Dte{flush(){return this._statuses=[],!0}parse(e){if(!e)return!1;let t=e.readInt();for(;t>0;){const i=this.parseStatus(e);if(!i){t--;continue}this._statuses.push(i),t--}return!0}parseStatus(e){if(!e)return null;const t=e.readInt(),i=e.readInt(),n=e.readInt(),r=parseFloat(e.readString()),a=e.readInt()%8*45,o=e.readInt()%8*45,l=e.readString();let u=0,c=0,h=0,f=0,d=!1,_=!1;if(l){const g=l.split("/"),p=[];for(const m of g){const v=m.split(" ");if(v[0]!==""&&v.length>=2){switch(v[0]){case"mv":{const E=v[1].split(",");E.length>=3&&(u=parseInt(E[0]),c=parseInt(E[1]),h=parseFloat(E[2]),_=!0);break}case"sit":{const E=parseFloat(v[1]);v.length>=3&&(d=v[2]==="1"),f=E;break}case"lay":{const E=parseFloat(v[1]);f=Math.abs(E);break}}p.push(new kte(v[0],v[1]))}}this._statuses.push(new xte(t,i,n,r,f,a,o,u,c,h,_,d,p))}}get statuses(){return this._statuses}}const lc=class lc{constructor(e){if(!e)throw new Error("invalid_wrapper");this.flush(),this.parse(e)}flush(){return this._rentable=!1,this._itemId=0,this._furniType=null,this._ref=0,this._spriteId=0,this._category=0,this._stuffData=null,this._isGroupable=!1,this._isRecyclable=!1,this._tradable=!1,this._sellable=!1,this._secondsToExpiration=0,this._extra=0,this._flatId=0,this._isWallItem=!1,this._hasRentPeriodStarted=!1,this._expirationTimeStamp=0,this._slotId="",this._songId=-1,!0}parse(e){return e?(this._itemId=e.readInt(),this._furniType=e.readString(),this._ref=e.readInt(),this._spriteId=e.readInt(),this._category=e.readInt(),this._stuffData=cl.parseObjectData(e),this._isRecyclable=e.readBoolean(),this._tradable=e.readBoolean(),this._isGroupable=e.readBoolean(),this._sellable=e.readBoolean(),this._secondsToExpiration=e.readInt(),this._expirationTimeStamp=Pe(),this.secondsToExpiration>-1?this._rentable=!0:(this._rentable=!1,this._secondsToExpiration=-1),this._hasRentPeriodStarted=e.readBoolean(),this._flatId=e.readInt(),this._isWallItem=this._furniType===lc.WALL_ITEM,this._furniType===lc.FLOOR_ITEM&&(this._slotId=e.readString(),this._extra=e.readInt()),!0):!1}get itemId(){return this._itemId}get furniType(){return this._furniType}get ref(){return this._ref}get spriteId(){return this._spriteId}get category(){return this._category}get stuffData(){return this._stuffData}get isGroupable(){return this._isGroupable}get isRecycleable(){return this._isRecyclable}get tradable(){return this._tradable}get sellable(){return this._sellable}get secondsToExpiration(){return this._secondsToExpiration}get flatId(){return this._flatId}get slotId(){return this._slotId}get songId(){return this._songId}get extra(){return this._extra}get rentable(){return this._rentable}get isWallItem(){return this._isWallItem}get hasRentPeriodStarted(){return this._hasRentPeriodStarted}get expirationTimeStamp(){return this._expirationTimeStamp}get creationDay(){return 0}get creationMonth(){return 0}get creationYear(){return 0}get isExternalImageFurni(){return this._furniType.indexOf("external_image")!==-1}};lc.WALL_ITEM="I",lc.FLOOR_ITEM="S";let mv=lc;class Lte{flush(){return this._items=[],!0}parse(e){return e?(this._items.push(new mv(e)),!0):!1}get items(){return this._items}}class Ute{flush(){return!0}parse(e){return!!e}}class Fte{flush(){return this._totalFragments=0,this._fragmentNumber=0,this._fragment=new Map,!0}parse(e){if(!e)return!1;this._totalFragments=e.readInt(),this._fragmentNumber=e.readInt();let t=e.readInt();for(;t>0;){const i=new mv(e);i&&this._fragment.set(i.itemId,i),t--}return!0}get totalFragments(){return this._totalFragments}get fragmentNumber(){return this._fragmentNumber}get fragment(){return this._fragment}}class Bte{flush(){return this._itemId=0,!0}parse(e){return e?(this._itemId=e.readInt(),!0):!1}get itemId(){return this._itemId}}class Gte{flush(){return this._itemId=0,this._itemsLeft=0,!0}parse(e){return e?(this._itemId=e.readInt(),this._itemsLeft=e.readInt(),!0):!1}get itemId(){return this._itemId}get itemsLeft(){return this._itemsLeft}}class Vte{flush(){return this._itemType="",this._classId=0,this._productCode="",!0}parse(e){return e?(this._itemType=e.readString(),this._classId=e.readInt(),this._productCode=e.readString(),this._placedItemId=e.readInt(),this._placedItemType=e.readString(),this._placedInRoom=e.readBoolean(),this._petFigureString=e.readString(),!0):!1}get itemType(){return this._itemType}get classId(){return this._classId}get productCode(){return this._productCode}get placedItemId(){return this._placedItemId}get placedItemType(){return this._placedItemType}get placedInRoom(){return this._placedInRoom}get petFigureString(){return this._petFigureString}}class jte{flush(){this._nestId=0,this._pet1&&(this._pet1.dispose(),this._pet1=null),this._pet2&&(this._pet2.dispose(),this._pet2=null);for(const e of this._rarityCategories)e&&e.dispose();return this._rarityCategories=[],!0}parse(e){if(!e)return!1;this._nestId=e.readInt(),this._pet1=new YP(e),this._pet2=new YP(e);let t=e.readInt();for(;t>0;)this._rarityCategories.push(new mte(e)),t--;return this._resultPetType=e.readInt(),!0}get nestId(){return this._nestId}get pet1(){return this._pet1}get pet2(){return this._pet2}get rarityCategories(){return this._rarityCategories}get resultPetType(){return this._resultPetType}}class zte{flush(){return this._breedingNestStuffId=0,this._result=0,!0}parse(e){return e?(this._breedingNestStuffId=e.readInt(),this._result=e.readInt(),!0):!1}get breedingNestStuffId(){return this._breedingNestStuffId}get result(){return this._result}}class Hte{flush(){return this._petId=-1,this._rarityCategory=-1,!0}parse(e){return this._petId=e.readInt(),this._rarityCategory=e.readInt(),!0}get rarityCategory(){return this._rarityCategory}get petId(){return this._petId}}class kw{constructor(e){this._typeId=e.readInt(),this._paletteId=e.readInt(),this._color=e.readString(),this._breedId=e.readInt(),this._customParts=[],this._customPartCount=e.readInt();let t=0;for(;t0;){const i=new S0(e);this._fragment.set(i.id,i),t--}return!0}get totalFragments(){return this._totalFragments}get fragmentNumber(){return this._fragmentNumber}get fragment(){return this._fragment}}class Xte{flush(){return this._boughtAsGift=!1,this._pet=null,!0}parse(e){return this._boughtAsGift=e.readBoolean(),this._pet=new S0(e),!0}get boughtAsGift(){return this._boughtAsGift}get pet(){return this._pet}}class Kte{flush(){return!0}parse(e){return e?(this._petId=e.readInt(),!0):!1}get petId(){return this._petId}}class qte{constructor(e){this._itemId=e.readInt(),this._furniType=e.readString().toUpperCase(),this._ref=e.readInt(),this._spriteId=e.readInt(),this._category=e.readInt(),this._isGroupable=e.readBoolean(),this._stuffData=cl.parseObjectData(e),this._secondsToExpiration=-1,this._expirationTimeStamp=Pe(),this._hasRentPeriodStarted=!1,this._creationDay=e.readInt(),this._creationMonth=e.readInt(),this._creationYear=e.readInt(),this._extra=this.furniType==="S"?e.readInt():-1,this._flatId=-1,this._rentable=!1,this._isWallItem=this._furniType==="I"}get itemId(){return this._itemId}get furniType(){return this._furniType}get ref(){return this._ref}get spriteId(){return this._spriteId}get category(){return this._category}get stuffData(){return this._stuffData}get extra(){return this._extra}get secondsToExpiration(){return this._secondsToExpiration}get creationDay(){return this._creationDay}get creationMonth(){return this._creationMonth}get creationYear(){return this._creationYear}get isGroupable(){return this._isGroupable}get songId(){return this._extra}get flatId(){return this._flatId}get rentable(){return this._rentable}get isWallItem(){return this._isWallItem}get hasRentPeriodStarted(){return this._hasRentPeriodStarted}get expirationTimeStamp(){return this._expirationTimeStamp}get isRecycleable(){return!0}get tradable(){return!0}get sellable(){return!0}get slotId(){return null}get isExternalImageFurni(){return this._furniType.indexOf("external_image")!==-1}}class $te{flush(){return this._userID=-1,this._userAccepts=!1,!0}parse(e){return e?(this._userID=e.readInt(),this._userAccepts=e.readInt()>0,!0):!1}get userID(){return this._userID}get userAccepts(){return this._userAccepts}}const oC=class oC{flush(){return!0}parse(e){return e?(this._userId=e.readInt(),this._reason=e.readInt(),!0):!1}get userID(){return this._userId}get reason(){return this._reason}};oC.ERROR_WHILE_COMMIT=1;let uS=oC;class Qte{flush(){return!0}parse(e){return!!e}}class Zte{flush(){return!0}parse(e){return!!e}}class Jte{flush(){return this._firstUserID=-1,this._firstUserItemArray=null,this._firstUserNumItems=0,this._firstUserNumCredits=0,this._secondUserID=-1,this._secondUserItemArray=null,this._secondUserNumItems=0,this._secondUserNumCredits=0,!0}parse(e){return!e||(this._firstUserID=e.readInt(),this._firstUserItemArray=[],!this.parseItems(e,this._firstUserItemArray))||(this._firstUserNumItems=e.readInt(),this._firstUserNumCredits=e.readInt(),this._secondUserID=e.readInt(),this._secondUserItemArray=[],!this.parseItems(e,this._secondUserItemArray))?!1:(this._secondUserNumItems=e.readInt(),this._secondUserNumCredits=e.readInt(),!0)}parseItems(e,t){let i=e.readInt();for(;i>0;)t.push(new qte(e)),i--;return!0}get firstUserID(){return this._firstUserID}get firstUserItemArray(){return this._firstUserItemArray}get firstUserNumItems(){return this._firstUserNumItems}get firstUserNumCredits(){return this._firstUserNumCredits}get secondUserID(){return this._secondUserID}get secondUserItemArray(){return this._secondUserItemArray}get secondUserNumItems(){return this._secondUserNumItems}get secondUserNumCredits(){return this._secondUserNumCredits}}class eie{flush(){return!0}parse(e){return!!e}}class tie{flush(){return!0}parse(e){return!!e}}const mE=class mE{flush(){return!0}parse(e){return e?(this._reason=e.readInt(),this._otherUserName=e.readString(),!0):!1}get reason(){return this._reason}get otherUserName(){return this._otherUserName}};mE.REASON_YOU_ARE_ALREADY_TRADING=7,mE.REASON_OTHER_USER_ALREADY_TRADING=8;let hS=mE;class iie{flush(){return this._userId=-1,this._userCanTrade=!1,this._otherUserId=-1,this._otherUserCanTrade=!1,!0}parse(e){return e?(this._userId=e.readInt(),this._userCanTrade=e.readInt()===1,this._otherUserId=e.readInt(),this._otherUserCanTrade=e.readInt()===1,!0):!1}get userID(){return this._userId}get userCanTrade(){return this._userCanTrade}get otherUserID(){return this._otherUserId}get otherUserCanTrade(){return this._otherUserCanTrade}}class sie{flush(){return!0}parse(e){return!!e}}class nie{flush(){return!0}parse(e){return!!e}}class rie{flush(){return this._respect=0,this._petOwnerId=0,this._petData=null,!0}parse(e){return e?(this._respect=e.readInt(),this._petOwnerId=e.readInt(),this._petData=new S0(e),!0):!1}get respect(){return this._respect}get petOwnerId(){return this._petOwnerId}get petData(){return this._petData}get isTreat(){return this._petData.typeId===U_.MONSTERPLANT}}class aie{flush(){return this._petId=0,this._userId=0,this._supplementType=0,!0}parse(e){return e?(this._petId=e.readInt(),this._userId=e.readInt(),this._supplementType=e.readInt(),!0):!1}get petId(){return this._petId}get userId(){return this._userId}get supplementType(){return this._supplementType}}const Ql=class Ql{};Ql.WATER=0,Ql.LIGHT=1,Ql.REVIVE=2,Ql.REBREED_FERTILIZER=3,Ql.SPEED_FERTILIZER=4;let cd=Ql;class oie{flush(){return this._userId=0,this._respectsReceived=0,!0}parse(e){return e?(this._userId=e.readInt(),this._respectsReceived=e.readInt(),!0):!1}get userId(){return this._userId}get respectsReceived(){return this._respectsReceived}}class lie{constructor(e,t,i){this._hasControllers=!1,this._roomId=e,this._roomName=t,this._hasControllers=i}get roomId(){return this._roomId}get roomName(){return this._roomName}get hasControllers(){return this._hasControllers}}class uie{constructor(e){this._currentHcStreak=e.readInt(),this._firstSubscriptionDate=e.readString(),this._kickbackPercentage=e.readDouble(),this._totalCreditsMissed=e.readInt(),this._totalCreditsRewarded=e.readInt(),this._totalCreditsSpent=e.readInt(),this._creditRewardForStreakBonus=e.readInt(),this._creditRewardForMonthlySpent=e.readInt(),this._timeUntilPayday=e.readInt()}get currentHcStreak(){return this._currentHcStreak}get firstSubscriptionDate(){return this._firstSubscriptionDate}get kickbackPercentage(){return this._kickbackPercentage}get totalCreditsMissed(){return this._totalCreditsMissed}get totalCreditsRewarded(){return this._totalCreditsRewarded}get totalCreditsSpent(){return this._totalCreditsSpent}get creditRewardForStreakBonus(){return this._creditRewardForStreakBonus}get creditRewardForMonthlySpent(){return this._creditRewardForMonthlySpent}get timeUntilPayday(){return this._timeUntilPayday}}class hie{flush(){return this._data=null,!0}parse(e){return this._data=new uie(e),!0}get data(){return this._data}}class cie{flush(){return this._looks=new Map,!0}parse(e){if(!e)return!1;e.readInt();let t=e.readInt();for(;t>0;){const i=e.readInt(),n=e.readString(),r=e.readString();this._looks.set(i,[n,r]),t--}return!0}get looks(){return this._looks}}class fie{flush(){return this._result=-1,!0}parse(e){return e?(this._result=e.readInt(),!0):!1}get result(){return this._result}}class die{flush(){return this._isVip=!1,this._rooms=[],!0}parse(e){if(!e)return!1;this._isVip=e.readBoolean();let t=e.readInt();for(;t>0;)this._rooms.push(new lie(e.readInt(),e.readString(),e.readBoolean())),t--;return!0}get isVip(){return this._isVip}get rooms(){return this._rooms}}class _ie{flush(){return this._pageId=-1,this._data=null,!0}parse(e){return e?(this._pageId=e.readInt(),this._data=new R0(e),!0):!1}get pageId(){return this._pageId}get data(){return this._data}}class gie{constructor(e){if(!e)throw new Error("invalid_wrapper");this.flush(),this.parse(e)}flush(){return this._type=-1,this._breedId=-1,this._paletteId=-1,this._sellable=!1,this._rare=!1,!0}parse(e){return e?(this._type=e.readInt(),this._breedId=e.readInt(),this._paletteId=e.readInt(),this._sellable=e.readBoolean(),this._rare=e.readBoolean(),!0):!1}get type(){return this._type}get breedId(){return this._breedId}get paletteId(){return this._paletteId}get sellable(){return this._sellable}get rare(){return this._rare}}class pie{flush(){return this._productCode="",this._palettes=[],!0}parse(e){if(!e)return!1;this._productCode=e.readString();let t=e.readInt();for(;t>0;)this._palettes.push(new gie(e)),t--;return!0}get productCode(){return this._productCode}get palettes(){return this._palettes}}class mie{constructor(e){this._trackingState=e.readInt(),this._id=e.readInt(),this._identifier=e.readString(),this._productCode=e.readString(),this._priceInCredits=e.readInt(),this._priceInActivityPoints=e.readInt(),this._activityPointType=e.readInt(),this._purchaseLimit=e.readInt();const t=e.readInt();this._expirationTime=t>0?t*1e3+Date.now():0,this._title=e.readString(),this._description=e.readString(),this._imageUrl=e.readString(),this._iconImageUrl=e.readString(),this._type=e.readInt(),this._subProductCodes=[];let i=e.readInt();for(;i>0;)this._subProductCodes.push(e.readString()),i--;return this}populate(e){e&&(this._id=e.id,this._identifier=e.identifier,this._type=e.type,this._title=e.title,this._description=e.description,this._imageUrl=e.imageUrl,this._iconImageUrl=e.iconImageUrl,this._productCode=e.productCode,this._purchaseLimit=e.purchaseLimit,this._expirationTime=e.expirationTime,this._priceInCredits=e.priceInCredits,this._priceInActivityPoints=e.priceInActivityPoints,this._activityPointType=e.activityPointType,this._subProductCodes=e.subProductCodes,this._trackingState=e.trackingState)}purchase(e){this._purchaseLimit=this._purchaseLimit-e}get id(){return this._id}get identifier(){return this._identifier}get type(){return this._type}get title(){return this._title}get description(){return this._description}get imageUrl(){return this._imageUrl}get iconImageUrl(){return this._iconImageUrl}get productCode(){return this._productCode}get purchaseLimit(){return this._purchaseLimit}get expirationTime(){return this._expirationTime}get priceInCredits(){return this._priceInCredits}get priceInActivityPoints(){return this._priceInActivityPoints}get activityPointType(){return this._activityPointType}get subProductCodes(){return this._subProductCodes}get trackingState(){return this._trackingState}}class vie{flush(){return!0}parse(e){return!!e}}class Eie{flush(){return this._data=null,!0}parse(e){return e?(this._data=new mie(e),!0):!1}get data(){return this._data}}class yie{constructor(){this._errorCode=""}flush(){return this._errorCode="",!0}parse(e){return e?(this._errorCode=e.readString(),!0):!1}get errorCode(){return this._errorCode}}class Tie{constructor(){this._productName="",this._productDescription=""}flush(){return this._productDescription="",this._productName="",!0}parse(e){return e?(this._productDescription=e.readString(),this._productName=e.readString(),!0):!1}get productName(){return this._productName}get productDescription(){return this._productDescription}}class Iie{flush(){return!0}parse(e){return!!e}}const ra=class ra{flush(){return this._goalId=0,this._goalCode=null,this._result=0,this._requiredFurnis=null,this._missingFurnis=null,!0}parse(e){this._goalId=e.readInt(),this._goalCode=e.readString(),this._result=e.readInt(),this._requiredFurnis=[];let t=e.readInt();for(;t>0;)this._requiredFurnis.push(e.readString()),t--;for(t=e.readInt();t>0;)this._missingFurnis[e.readString()]="",t--;return!0}get goalId(){return this._goalId}get goalCode(){return this._goalCode}get result(){return this._result}get requiredFurnis(){return this._requiredFurnis}isMissing(e){return!!this._missingFurnis[e]}};ra.SUBMITTED=0,ra.ASK_FOR_SUBMIT=1,ra.ASK_FOR_CONFIRM=2,ra.PREREQUISITES_NOT_MET=3,ra.ROOM_DOOR_NOT_OPEN=4,ra.ROOM_TOO_OLD=5,ra.ASK_FOR_ACCEPT_RULES=6;let cS=ra;const Xd=class Xd{};Xd.ALLOWED=0,Xd.REQUIRED_PERK_MISSING=1,Xd.REQUIRED_BADGE_MISSING=2;let fS=Xd;class Rie{flush(){return this._goalId=0,this._goalCode=null,this._resultCode=0,this._votesRemaining=0,!0}parse(e){return this._goalId=e.readInt(),this._goalCode=e.readString(),this._resultCode=e.readInt(),this._votesRemaining=e.readInt(),!0}get goalId(){return this._goalId}get goalCode(){return this._goalCode}get isVotingAllowedForUser(){return this._resultCode===fS.ALLOWED}get votesRemaining(){return this._votesRemaining}get resultCode(){return this._resultCode}}class Sie{flush(){return this._schedulingStr=null,this._code=null,!0}parse(e){return this._schedulingStr=e.readString(),this._code=e.readString(),!0}get schedulingStr(){return this._schedulingStr}get code(){return this._code}}class bie{flush(){return this._isPartOf=!1,this._targetId=0,!0}parse(e){return this._isPartOf=e.readBoolean(),this._targetId=e.readInt(),!0}get isPartOf(){return this._isPartOf}get targetId(){return this._targetId}}class Aie{flush(){return!0}parse(e){return!0}}class Oie{flush(){return this._timeStr=null,this._secondsUntil=0,!0}parse(e){return this._timeStr=e.readString(),this._secondsUntil=e.readInt(),!0}get timeStr(){return this._timeStr}get secondsUntil(){return this._secondsUntil}}class p4{constructor(e){this._recipeName=e.readString(),this._itemName=e.readString()}get recipeName(){return this._recipeName}get itemName(){return this._itemName}}class wie{constructor(){this._recipes=[],this._ingredients=[]}flush(){return this._recipes=[],this._ingredients=[],!0}parse(e){if(!e)return!1;const t=e.readInt();for(let n=0;n0||this._ingredients.length>0}}class Cie{constructor(e){this._count=e.readInt(),this._itemName=e.readString()}get count(){return this._count}get itemName(){return this._itemName}}class Mie{constructor(){this._ingredients=[]}parse(e){if(!e)return!1;const t=e.readInt();for(let i=0;i0;)this._failuers.push(new xie(e)),t--;return!0}get failures(){return this._failuers}}class Lie{flush(){return this._success=!1,!0}parse(e){return e?(this._success=e.readBoolean(),!0):!1}get success(){return this._success}}class Uie{flush(){return this._errorCode=0,!0}parse(e){return e?(this._errorCode=e.readInt(),!0):!1}get errorCode(){return this._errorCode}}class m4{constructor(e){if(!e)throw new Error("invalid_wrapper");this._id=e.readInt(),this._name=e.readString()}get id(){return this._id}get name(){return this._name}}class dS{constructor(e){if(!e)throw new Error("invalid_wrapper");this._id=e.readInt(),this._name=e.readString(),this._gender=e.readInt(),this._online=e.readBoolean(),this._followingAllowed=e.readBoolean(),this._figure=e.readString(),this._categoryId=e.readInt(),this._motto=e.readString(),this._realName=e.readString(),this._lastAccess=e.readString(),this._persistedMessageUser=e.readBoolean(),this._vipMember=e.readBoolean(),this._pocketHabboUser=e.readBoolean(),this._relationshipStatus=e.readShort()}get id(){return this._id}get name(){return this._name}get gender(){return this._gender}get online(){return this._online}get followingAllowed(){return this._followingAllowed}get figure(){return this._figure}get categoryId(){return this._categoryId}get motto(){return this._motto}get lastAccess(){return this._lastAccess}get realName(){return this._realName}get persistedMessageUser(){return this._persistedMessageUser}get vipMember(){return this._vipMember}get pocketHabboUser(){return this._pocketHabboUser}get relationshipStatus(){return this._relationshipStatus}}class Fie{flush(){return this._totalFragments=0,this._fragmentNumber=0,this._fragment=[],!0}parse(e){if(!e)return!1;this._totalFragments=e.readInt(),this._fragmentNumber=e.readInt();let t=e.readInt();for(;t>0;)this._fragment.push(new dS(e)),t--;return!0}get totalFragments(){return this._totalFragments}get fragmentNumber(){return this._fragmentNumber}get fragment(){return this._fragment}}class Bie{flush(){return this._categories=[],this._removedFriendIds=[],this._addedFriends=[],this._updatedFriends=[],!0}parse(e){if(!e)return!1;let t=e.readInt();for(;t>0;)this._categories.push(new m4(e)),t--;let i=e.readInt();for(;i>0;){const n=e.readInt();n===-1?this._removedFriendIds.push(e.readInt()):n===0?this._updatedFriends.push(new dS(e)):n===1&&this._addedFriends.push(new dS(e)),i--}return!0}get categories(){return this._categories}get removedFriendIds(){return this._removedFriendIds}get addedFriends(){return this._addedFriends}get updatedFriends(){return this._updatedFriends}}class Gie{flush(){return this._typeCode=-1,this._avatarId=0,this._message=null,!0}parse(e){return e?(this._typeCode=e.readInt(),this._avatarId=e.readInt(),this._message=e.readString(),!0):!1}get typeCode(){return this._typeCode}get avatarId(){return this._avatarId}get message(){return this._message}}class v4{constructor(e){if(!e)throw new Error("invalid_wrapper");this._requestId=e.readInt(),this._requesterName=e.readString(),this._figureString=e.readString(),this._requesterUserId=this._requestId}get requestId(){return this._requestId}get requesterName(){return this._requesterName}get requesterUserId(){return this._requesterUserId}get figureString(){return this._figureString}}class Vie{flush(){return this._totalRequests=0,this._requests=[],!0}parse(e){if(!e)return!1;this._totalRequests=e.readInt();let t=e.readInt();for(;t>0;)this._requests.push(new v4(e)),t--;return!0}get totalRequests(){return this._totalRequests}get requests(){return this._requests}}class KP{constructor(e){if(!e)throw new Error("invalid_wrapper");this._avatarId=e.readInt(),this._avatarName=e.readString(),this._avatarMotto=e.readString(),this._isAvatarOnline=e.readBoolean(),this._canFollow=e.readBoolean(),this._lastOnlineData=e.readString(),this._avatarGender=e.readInt(),this._avatarFigure=e.readString(),this._realName=e.readString()}get avatarId(){return this._avatarId}get avatarName(){return this._avatarName}get avatarMotto(){return this._avatarMotto}get isAvatarOnline(){return this._isAvatarOnline}get canFollow(){return this._canFollow}get avatarGender(){return this._avatarGender}get avatarFigure(){return this._avatarFigure}get lastOnlineData(){return this._lastOnlineData}get realName(){return this._realName}}class jie{flush(){return this._friends=[],this._others=[],!0}parse(e){if(!e)return!1;let t=e.readInt();for(;t>0;)this._friends.push(new KP(e)),t--;let i=e.readInt();for(;i>0;)this._others.push(new KP(e)),i--;return!0}get friends(){return this._friends}get others(){return this._others}}class zie{flush(){return this._errorCode=0,this._userId=0,this._message=null,!0}parse(e){return e?(this._errorCode=e.readInt(),this._userId=e.readInt(),this._message=e.readString(),!0):!1}get errorCode(){return this._errorCode}get userId(){return this._userId}get message(){return this._message}}class Hie{flush(){return this._clientMessageId=0,this._errorCode=0,!0}parse(e){return e?(this._clientMessageId=e.readInt(),this._errorCode=e.readInt(),!0):!1}get clientMessageId(){return this._clientMessageId}get errorCode(){return this._errorCode}}class Wie{flush(){return this._userFriendLimit=0,this._normalFriendLimit=0,this._extendedFriendLimit=0,this._categories=[],!0}parse(e){if(!e)return!1;this._userFriendLimit=e.readInt(),this._normalFriendLimit=e.readInt(),this._extendedFriendLimit=e.readInt();let t=e.readInt();for(;t>0;)this._categories.push(new m4(e)),t--;return!0}get userFriendLimit(){return this._userFriendLimit}get normalFriendLimit(){return this._normalFriendLimit}get extendedFriendLimit(){return this._extendedFriendLimit}get categories(){return this._categories}}class Yie{flush(){return!0}parse(e){return!!e}}class Xie{flush(){return this._count=0,!0}parse(e){return e?(this._count=e.readInt(),!0):!1}get count(){return this._count}}class Kie{flush(){return this._senderId=0,this._messageText=null,this._secondsSinceSent=0,this._extraData=null,!0}parse(e){return e?(this._senderId=e.readInt(),this._messageText=e.readString(),this._secondsSinceSent=e.readInt(),e.bytesAvailable&&(this._extraData=e.readString()),!0):!1}get senderId(){return this._senderId}get messageText(){return this._messageText}get secondsSinceSent(){return this._secondsSinceSent}get extraData(){return this._extraData}}class qie{flush(){return this._request=null,!0}parse(e){return e?(this._request=new v4(e),!0):!1}get request(){return this._request}}class $ie{flush(){return this._errorCode=0,this._failedRecipients=[],!0}parse(e){if(!e)return!1;this._errorCode=e.readInt();let t=e.readInt();for(;t>0;)this._failedRecipients.push(e.readInt()),t--;return!0}get errorCode(){return this._errorCode}get failedRecipients(){return this._failedRecipients}}class Qie{flush(){return this._senderId=0,this._messageText=null,!0}parse(e){return e?(this._senderId=e.readInt(),this._messageText=e.readString(),!0):!1}get senderId(){return this._senderId}get messageText(){return this._messageText}}class Zie{flush(){return!0}parse(e){return e?(this._gameTypeId=e.readInt(),this._freeGamesLeft=e.readInt(),this._gamesPlayedTotal=e.readInt(),!0):!1}get gameTypeId(){return this._gameTypeId}get freeGamesLeft(){return this._freeGamesLeft}get gamesPlayedTotal(){return this._gamesPlayedTotal}get hasUnlimitedGames(){return this._freeGamesLeft==-1}}const uc=class uc{flush(){return this._status=-1,this._blockLength=-1,this._gamesPlayed=-1,this._freeGamesLeft=-1,!0}parse(e){return e?(this._status=e.readInt(),this._blockLength=e.readInt(),this._gamesPlayed=e.readInt(),this._freeGamesLeft=e.readInt(),!0):!1}get status(){return this._status}get blockLength(){return this._blockLength}get gamesPlayed(){return this._gamesPlayed}get freeGamesLeft(){return this._freeGamesLeft}get hasUnlimitedGames(){return this._freeGamesLeft==-1}};uc.STATUS_OK=0,uc.STATUS_FAILED_REASON_UNKNOWN=1,uc.STATUS_FAILED_REASON_GAME_DIRECTORY_IS_NOT_AVAILABLE=2,uc.STATUS_FAILED_REASON_HOTEL_IS_CLOSED=3;let _S=uc;class Jie{flush(){return this._position=-1,!0}parse(e){return e?(this._position=e.readInt(),!0):!1}get position(){return this._position}}const mr=class mr{flush(){return this._reason=-1,!0}parse(e){return e?(this._reason=e.readInt(),!0):!1}get reason(){return this._reason}};mr.KICKED=1,mr.DUPLICATE_MACHINEID=2,mr.INVITATION_REQUIRED=3,mr.NO_SPACE_IN_TEAM=4,mr.TEAM_NOT_FOUND=5,mr.USER_HAS_ACTIVE_INSTANCE=6,mr.USER_HAS_PENDING_INSTANCE_REQUEST=7,mr.USER_HAS_NO_FREE_GAMES_LEFT=8;let gS=mr;const vE=class vE{flush(){return this._reason=-1,!0}parse(e){return e?(this._reason=e.readInt(),!0):!1}get reason(){return this._reason}};vE.NOT_ENOUGH_PLAYERS=1,vE.GAME_HAS_NO_OWNER=2;let pS=vE;class ese{flush(){return!0}parse(e){return!!e}}class tse{flush(){return this._userId=-1,!0}parse(e){return e?(this._userId=e.readInt(),!0):!1}get userId(){return this._userId}}class ise{flush(){return!0}parse(e){return e?(this._stuffCode=e.readString(),this._badgeCode=e.readString(),!0):!1}get stuffCode(){return this._stuffCode}get badgeCode(){return this._badgeCode}}class sse{flush(){return this._stuffId=-1,this._achievementId=0,this._requiredLevelBadgeCode="",this._userProgress=0,this._totalProgress=0,this._endTime=0,!0}parse(e){return e?(this._stuffId=e.readInt(),this._achievementId=e.readInt(),this._requiredLevelBadgeCode=e.readString(),this._userProgress=e.readInt(),this._totalProgress=e.readInt(),this._endTime=e.readInt(),!0):!1}get stuffId(){return this._stuffId}get achievementId(){return this._achievementId}get requiredLevelBadgeCode(){return this._requiredLevelBadgeCode}get userProgress(){return this._userProgress}get totalProgress(){return this._totalProgress}get endTime(){return this._endTime}}class nse{flush(){return!0}parse(e){if(!e)return!1;this._stuffId=e.readInt();const t=e.readInt();let i=0;for(;i0;)this._products.push(new $c(e)),t--;return this._minutesUntilNextWeek=e.readInt(),this._rewardingOn=e.readBoolean(),!0}get gameTypeId(){return this._gameTypeId}get products(){return this._products}get minutesUntilNextWeek(){return this._minutesUntilNextWeek}get rewardingOn(){return this._rewardingOn}}class vse{flush(){return this._gameTypeId=-1,this._winners=[],!0}parse(e){if(!e)return!1;this._gameTypeId=e.readInt();let t=e.readInt();for(;t>0;)this._winners.push(new pse(e)),t--;return!0}get gameTypeId(){return this._gameTypeId}get winners(){return this._winners}}class Ese{flush(){return this._errorCode=0,!0}parse(e){return e?(this._errorCode=e.readInt(),!0):!1}get errorCode(){return this._errorCode}}class yse{flush(){return this._phoneStatusCode=-1,this._millisecondsToAllowProcessReset=-1,!0}parse(e){return e?(this._phoneStatusCode=e.readInt(),this._collectionStatusCode=e.readInt(),this._millisecondsToAllowProcessReset=e.readInt(),!0):!1}get phoneStatusCode(){return this._phoneStatusCode}get collectionStatusCode(){return this._collectionStatusCode}get millisecondsToAllowProcessReset(){return this._millisecondsToAllowProcessReset}}class Tse{flush(){return this._resultCode=-1,!0}parse(e){return e?(this._resultCode=e.readInt(),this._millisToAllowProcessReset=e.readInt(),!0):!1}get resultCode(){return this._resultCode}get millisToAllowProcessReset(){return this._millisToAllowProcessReset}}class Ise{flush(){return this._resultCode=-1,this._millisecondsToAllowProcessReset=-1,!0}parse(e){return e?(this._resultCode=e.readInt(),this._millisecondsToAllowProcessReset=e.readInt(),!0):!1}get resultCode(){return this._resultCode}get millisToAllowProcessReset(){return this._millisecondsToAllowProcessReset}}class Rse{flush(){return this._bases=new Map,this._symbols=new Map,this._partColors=new Map,this._colorsA=new Map,this._colorsB=new Map,!0}parse(e){if(!e)return!1;let t=e.readInt();for(;t>0;){const o=e.readInt(),l=e.readString(),u=e.readString();this._bases.set(o,[l,u]),t--}let i=e.readInt();for(;i>0;){const o=e.readInt(),l=e.readString(),u=e.readString();this._symbols.set(o,[l,u]),i--}let n=e.readInt();for(;n>0;){const o=e.readInt(),l=e.readString();this._partColors.set(o,l),n--}let r=e.readInt();for(;r>0;){const o=e.readInt(),l=e.readString();this._colorsA.set(o,l),r--}let a=e.readInt();for(;a>0;){const o=e.readInt(),l=e.readString();this._colorsB.set(o,l),a--}return!0}get bases(){return this._bases}get symbols(){return this._symbols}get partColors(){return this._partColors}get colorsA(){return this._colorsA}get colorsB(){return this._colorsB}}class Sse{flush(){return this._groupCost=0,this._availableRooms=new Map,!0}parse(e){if(!e)return!1;this._groupCost=e.readInt();let t=e.readInt();for(;t>0;){const i=e.readInt(),n=e.readString();e.readBoolean(),this._availableRooms.set(i,n),t--}return!0}get groupCost(){return this._groupCost}get availableRooms(){return this._availableRooms}}class bse{flush(){return this._userId=0,this._furnitureCount=0,!0}parse(e){return e?(this._userId=e.readInt(),this._furnitureCount=e.readInt(),!0):!1}get userId(){return this._userId}get furnitureCount(){return this._furnitureCount}}class Ase{flush(){return this._id=0,this._type=0,this._title=null,this._description=null,this._badge=null,this._roomId=0,this._roomName=null,this._membershipType=0,this._membersCount=0,this._isFavorite=!1,this._createdAt=null,this._isOwner=!1,this._isAdmin=!1,this._ownerName=null,this._flag=!1,this._canMembersDecorate=!1,this._pendingRequestsCount=0,!0}parse(e){return e?(this._id=e.readInt(),e.readBoolean(),this._type=e.readInt(),this._title=e.readString(),this._description=e.readString(),this._badge=e.readString(),this._roomId=e.readInt(),this._roomName=e.readString(),this._membershipType=e.readInt(),this._membersCount=e.readInt(),this._isFavorite=e.readBoolean(),this._createdAt=e.readString(),this._isOwner=e.readBoolean(),this._isAdmin=e.readBoolean(),this._ownerName=e.readString(),this._flag=e.readBoolean(),this._canMembersDecorate=e.readBoolean(),this._pendingRequestsCount=e.readInt(),!0):!1}get id(){return this._id}get type(){return this._type}get title(){return this._title}get description(){return this._description}get badge(){return this._badge}get roomId(){return this._roomId}get roomName(){return this._roomName}get membershipType(){return this._membershipType}get membersCount(){return this._membersCount}get isFavorite(){return this._isFavorite}get createdAt(){return this._createdAt}get isOwner(){return this._isOwner}get isAdmin(){return this._isAdmin}get ownerName(){return this._ownerName}get flag(){return this._flag}get canMembersDecorate(){return this._canMembersDecorate}get pendingRequestsCount(){return this._pendingRequestsCount}}class Ose{constructor(e){this.isBase=e,this.key=0,this.color=0,this.position=4}get code(){return this.key===0?null:(this.isBase?"b":"s")+(this.key<100?"0":"")+(this.key<10?"0":"")+this.key+(this.color<10?"0":"")+this.color+this.position}}const Zl=class Zl{};Zl.OWNER=0,Zl.ADMIN=1,Zl.MEMBER=2,Zl.REQUESTED=3,Zl.DELETED=4;let qP=Zl;class wse{constructor(e){if(!e)throw new Error("invalid_wrapper");this.flush(),this.parse(e)}flush(){return this._rank=-1,this._id=0,this._name=null,this._figure=null,this._joinedAt=null,!0}parse(e){return e?(this._rank=e.readInt(),this._id=e.readInt(),this._name=e.readString(),this._figure=e.readString(),this._joinedAt=e.readString(),!0):!1}get id(){return this._id}get name(){return this._name}get figure(){return this._figure}get rank(){return this._rank}get joinedAt(){return this._joinedAt}}class Cse{flush(){return this._groupId=0,this._groupTitle=null,this._roomId=0,this._badge=null,this._totalMembersCount=0,this._result=[],this._admin=!1,this._pageSize=0,this._pageIndex=0,this._level=0,this._query=null,!0}parse(e){if(!e)return!1;this._groupId=e.readInt(),this._groupTitle=e.readString(),this._roomId=e.readInt(),this._badge=e.readString(),this._totalMembersCount=e.readInt();let t=e.readInt();for(;t>0;)this._result.push(new wse(e)),t--;return this._admin=e.readBoolean(),this._pageSize=e.readInt(),this._pageIndex=e.readInt(),this._level=e.readInt(),this._query=e.readString(),!0}get groupId(){return this._groupId}get groupTitle(){return this._groupTitle}get roomId(){return this._roomId}get badge(){return this._badge}get totalMembersCount(){return this._totalMembersCount}get result(){return this._result}get admin(){return this._admin}get pageSize(){return this._pageSize}get pageIndex(){return this._pageIndex}get level(){return this._level}get query(){return this._query}}class Mse{flush(){return this._roomId=0,this._groupId=0,!0}parse(e){return e?(this._roomId=e.readInt(),this._groupId=e.readInt(),!0):!1}get roomId(){return this._roomId}get guildId(){return this._groupId}}class Nse{flush(){return this._roomId=0,this._roomName=null,this._id=0,this._title=null,this._description=null,this._colorA=0,this._colorB=0,this._state=0,this._canMembersDecorate=!1,this._badgeParts=new Map,this._badgeCode=null,this._membersCount=0,!0}parse(e){if(!e)return!1;e.readInt()===1&&(this._roomId=e.readInt(),this._roomName=e.readString(),e.readBoolean()),e.readBoolean(),this._id=e.readInt(),this._title=e.readString(),this._description=e.readString(),e.readInt(),this._colorA=e.readInt(),this._colorB=e.readInt(),this._state=e.readInt(),this._canMembersDecorate=e.readInt()===0,e.readBoolean(),e.readString();const i=e.readInt();for(let n=0;n0;)this._accounts.set(e.readInt(),e.readString()),t--;return!0}get accounts(){return this._accounts}}class Wse{flush(){return!0}parse(e){return e?(this._encryptedPrime=e.readString(),this._encryptedGenerator=e.readString(),!0):!1}get encryptedPrime(){return this._encryptedPrime}get encryptedGenerator(){return this._encryptedGenerator}}class Yse{flush(){return this._noobnessLevel=0,!0}parse(e){return e?(this._noobnessLevel=e.readInt(),!0):!1}get noobnessLevel(){return this._noobnessLevel}}class Xse{flush(){return!0}parse(e){return e?(this._infoUrl=e.readString(),!0):!1}get infoUrl(){return this._infoUrl}}class Kse{flush(){return!0}parse(e){return!0}}class qse{flush(){return this._calls=[],!0}parse(e){this._calls=[];const t=e.readInt();for(let i=0;i0;)this._dayOffsets.push(e.readInt()),this._averagePrices.push(e.readInt()),this._soldAmounts.push(e.readInt()),t--;return this._furniCategoryId=e.readInt(),this._furniTypeId=e.readInt(),!0}get averagePrice(){return this._averagePrice}get offerCount(){return this._currentOfferCount}get historyLength(){return this._historyLength}get dayOffsets(){return this._dayOffsets}get averagePrices(){return this._averagePrices}get soldAmounts(){return this._soldAmounts}get furniTypeId(){return this._furniTypeId}get furniCategoryId(){return this._furniCategoryId}}class E4{constructor(e,t,i,n,r,a,o,l,u,c=-1){this._timeLeftMinutes=-1,this._offerId=e,this._furniId=t,this._furniType=i,this._extraData=n,this._stuffData=r,this._price=a,this._status=o,this._timeLeftMinutes=l,this._averagePrice=u,this._offerCount=c}get offerId(){return this._offerId}get furniId(){return this._furniId}get furniType(){return this._furniType}get extraData(){return this._extraData}get stuffData(){return this._stuffData}get price(){return this._price}get status(){return this._status}get timeLeftMinutes(){return this._timeLeftMinutes}get averagePrice(){return this._averagePrice}get offerCount(){return this._offerCount}get isUniqueLimitedItem(){return this.stuffData!=null&&this.stuffData.uniqueSeries>0}}const EE=class EE{constructor(e,t,i,n,r,a,o,l,u=-1){this._timeLeftMinutes=-1,this._offerId=e,this._furniId=t,this._furniType=i,this._extraData=n,this._stuffData=r,this._price=a,this._status=o,this._averagePrice=l,this._offerCount=u}get offerId(){return this._offerId}set offerId(e){this._offerId=e}get furniId(){return this._furniId}get furniType(){return this._furniType}get extraData(){return this._extraData}get stuffData(){return this._stuffData}get price(){return this._price}set price(e){this._price=e}get averagePrice(){return this._averagePrice}get image(){return this._image}set image(e){this._image=e}get imageCallback(){return this._imageCallback}set imageCallback(e){this._imageCallback=e}get status(){return this._status}get timeLeftMinutes(){return this._timeLeftMinutes}set timeLeftMinutes(e){this._timeLeftMinutes=e}get offerCount(){return this._offerCount}set offerCount(e){this._offerCount=e}get isUniqueLimitedItem(){return this.stuffData&&this.stuffData.uniqueSeries>0}};EE.TYPE_LANDSCAPE=1,EE.TYPE_FLOOR=2;let $P=EE;const aa=class aa{constructor(){this.MAX_LIST_LENGTH=500}flush(){return this._offers=[],this._totalItemsFound=0,!0}parse(e){if(!e)return!1;const t=e.readInt();let i=0;for(;i0;)this._rooms.push(new Qc(e)),t--;return!0}get code(){return this._code}get data(){return this._data}get action(){return this._action}get closed(){return this._closed}get mode(){return this._mode}get rooms(){return this._rooms}}class sre{constructor(e){if(!e)throw new Error("invalid_wrapper");this.flush(),this.parse(e)}flush(){return this._code=null,this._data=null,this._results=[],!0}parse(e){if(!e)return!1;this._code=e.readString(),this._data=e.readString();let t=e.readInt();for(;t>0;)this._results.push(new ire(e)),t--;return!0}get code(){return this._code}get data(){return this._data}get results(){return this._results}}class nre{constructor(e){if(!e)throw new Error("invalid_wrapper");this.flush(),this.parse(e)}flush(){return this._code=null,this._savedSearches=[],!0}parse(e){if(!e)return!1;this._code=e.readString();let t=e.readInt();for(;t>0;)this._savedSearches.push(new T4(e)),t--;return!0}get code(){return this._code}get savedSearches(){return this._savedSearches}}class rre{constructor(e){this._adId=e.readInt(),this._ownerAvatarId=e.readInt(),this._ownerAvatarName=e.readString(),this._flatId=e.readInt(),this._eventType=e.readInt(),this._eventName=e.readString(),this._eventDescription=e.readString();const t=e.readInt(),i=e.readInt(),n=new Date;let r=n.getTime();const a=t*60*1e3;r=r-a;const o=new Date(r);this._creationTime=o.getDate()+"-"+o.getMonth()+"-"+o.getFullYear()+" "+o.getHours()+":"+o.getMinutes();let l=n.getTime();const u=i*60*1e3;l=l+u,this._expirationDate=new Date(l),this._categoryId=e.readInt()}dispose(){this._disposed||(this._disposed=!0)}get disposed(){return this._disposed}get adId(){return this._adId}get ownerAvatarId(){return this._ownerAvatarId}get ownerAvatarName(){return this._ownerAvatarName}get flatId(){return this._flatId}get categoryId(){return this._categoryId}get eventType(){return this._eventType}get eventName(){return this._eventName}get eventDescription(){return this._eventDescription}get creationTime(){return this._creationTime}get expirationDate(){return this._expirationDate}}class are{flush(){return!0}parse(e){return e?(this._data=new Jne(e),!0):!1}get data(){return this._data}}class ore{flush(){return!0}parse(e){return e?(this._data=new ere(e),!0):!1}get data(){return this._data}}class lre{flush(){return!0}parse(e){return e?(this._globalId=e.readString(),this._convertedId=e.readInt(),!0):!1}get globalId(){return this._globalId}get convertedId(){return this._convertedId}}class ure{flush(){return this._userName=null,!0}parse(e){return e?(this._userName=e.readString(),!0):!1}get userName(){return this._userName}}class hre{flush(){return!0}parse(e){return e?(this._flatId=e.readInt(),this._added=e.readBoolean(),!0):!1}get flatId(){return this._flatId}get added(){return this._added}}class cre{flush(){return!0}parse(e){if(!e)return!1;this._favouriteRoomIds=[],this._limit=e.readInt();const t=e.readInt();for(let i=0;i0;)this._categories.push(e.readString()),t--;return!0}get categories(){return this._categories}}class vre{constructor(e){if(!e)throw new Error("invalid_wrapper");this.flush(),this.parse(e)}flush(){return this._id=-1,this._name=null,this._visible=!1,!0}parse(e){return e?(this._id=e.readInt(),this._name=e.readString(),this._visible=e.readBoolean(),!0):!1}get id(){return this._id}get name(){return this._name}get visible(){return this._visible}}class Ere{flush(){return this._homeRoomId=-1,this._roomIdToEnter=-1,!0}parse(e){return e?(this._homeRoomId=e.readInt(),this._roomIdToEnter=e.readInt(),!0):!1}get homeRoomId(){return this._homeRoomId}get roomIdToEnter(){return this._roomIdToEnter}}class yre{constructor(e){if(!e)throw new Error("invalid_wrapper");this.flush(),this.parse(e)}flush(){return this._roomId=-1,this._areaId=-1,this._image=null,this._caption=null,!0}parse(e){return e?(this._roomId=e.readInt(),this._areaId=e.readInt(),this._image=e.readString(),this._caption=e.readString(),!0):!1}get roomId(){return this._roomId}get areaId(){return this._areaId}get image(){return this._image}get caption(){return this._caption}}class Tre{flush(){return this._rooms=[],!0}parse(e){if(!e)return!1;let t=e.readInt();for(;t>0;)this._rooms.push(new yre(e)),t--;return!0}get rooms(){return this._rooms}}class Ire{flush(){return this._topLevelContexts=[],!0}parse(e){if(!e)return!1;let t=e.readInt();for(;t>0;)this._topLevelContexts.push(new nre(e)),t--;return!0}get topLevelContexts(){return this._topLevelContexts}}class Rre{flush(){return!0}parse(e){return!!e}}class Sre{flush(){return this._searches=[],!0}parse(e){if(!e)return!1;let t=e.readInt();for(;t>0;)this._searches.push(new T4(e)),t--;return!0}get searches(){return this._searches}}class bre{flush(){return this._result=null,!0}parse(e){return e?(this._result=new sre(e),!0):!1}get result(){return this._result}}class Are{flush(){return this._windowX=0,this._windowY=0,this._windowWidth=0,this._windowHeight=0,this._leftPanelHidden=!1,this._resultsMode=0,!0}parse(e){return e?(this._windowX=e.readInt(),this._windowY=e.readInt(),this._windowWidth=e.readInt(),this._windowHeight=e.readInt(),this._leftPanelHidden=e.readBoolean(),this._resultsMode=e.readInt(),!0):!1}get windowX(){return this._windowX}get windowY(){return this._windowY}get windowWidth(){return this._windowWidth}get windowHeight(){return this._windowHeight}get leftPanelHidden(){return this._leftPanelHidden}get resultsMode(){return this._resultsMode}}class Ore{constructor(e){this._tagName=e.readString(),this._userCount=e.readInt()}get tagName(){return this._tagName}get userCount(){return this._userCount}}class wre{constructor(e){if(!e)throw new Error("invalid_wrapper");this.flush(),this.parse(e)}flush(){return this._tags=[],!0}parse(e){if(!e)return!1;this._tags=[];const t=e.readInt();let i=0;for(;i0;)this._words.push(e.readString()),t--;return!0}get words(){return this._words}}class kre{flush(){return this._roomId=0,!0}parse(e){return e?(this._roomId=e.readInt(),!0):!1}get roomId(){return this._roomId}}class xre{flush(){return!0}parse(e){return this._flatId=e.readInt(),this._resultCode=e.readInt(),!0}get flatId(){return this._flatId}get resultCode(){return this._resultCode}}class Dre{flush(){return this._categories=[],!0}parse(e){if(!e)return!1;let t=e.readInt();for(;t>0;)this._categories.push(new vre(e)),t--;return!0}get categories(){return this._categories}}class Lre{flush(){return this._categories=[],!0}parse(e){if(!e)return!1;let t=e.readInt();for(;t>0;)this._categories.push(new pre(e)),t--;return!0}get categories(){return this._categories}}class Ure{constructor(e){this._badgeCode="",this._removedBadgeCode="",this._type=e.readInt(),this._level=e.readInt(),this._badgeId=e.readInt(),this._badgeCode=e.readString(),this._points=e.readInt(),this._levelRewardPoints=e.readInt(),this._levelRewardPointType=e.readInt(),this._bonusPoints=e.readInt(),this._achievementID=e.readInt(),this._removedBadgeCode=e.readString(),this._category=e.readString(),this._showDialogToUser=e.readBoolean()}get type(){return this._type}get level(){return this._level}get points(){return this._points}get levelRewardPoints(){return this._levelRewardPoints}get levelRewardPointType(){return this._levelRewardPointType}get bonusPoints(){return this._bonusPoints}get badgeId(){return this._badgeId}get badgeCode(){return this._badgeCode}get removedBadgeCode(){return this._removedBadgeCode}get achievementID(){return this._achievementID}get category(){return this._category}get showDialogToUser(){return this._showDialogToUser}}class Fre{flush(){return this._data=null,!0}parse(e){return e?(this._data=new Ure(e),!0):!1}get data(){return this._data}}class Bre{flush(){return this._amount=0,this._amountChanged=0,this._type=-1,!0}parse(e){return e?(this._amount=e.readInt(),this._amountChanged=e.readInt(),this._type=e.readInt(),!0):!1}get amount(){return this._amount}get amountChanged(){return this._amountChanged}get type(){return this._type}}class Gre{flush(){return this._errorCode=-1,!0}parse(e){return e?(this._errorCode=e.readInt(),!0):!1}get errorCode(){return this._errorCode}}class Vre{flush(){return this._numGifts=0,!0}parse(e){return e?(this._numGifts=e.readInt(),!0):!1}get numGifts(){return this._numGifts}}class jre{flush(){return this._errorCode=0,this._messageId=0,this._timestamp=null,!0}parse(e){return e?(this._messageId=e.readInt(),this._errorCode=e.readInt(),this._timestamp=e.readString(),!0):!1}get errorCode(){return this._errorCode}get messageId(){return this._messageId}get timestamp(){return this._timestamp}}class zre{flush(){return this._key=null,!0}parse(e){return e?(this._key=e.readString(),!0):!1}get key(){return this._key}}class Hre{flush(){return this._message=null,!0}parse(e){return e?(this._message=e.readString(),!0):!1}get message(){return this._message}}class Wre{flush(){return this._enabled=!1,!0}parse(e){return e?(this._enabled=e.readBoolean(),!0):!1}get enabled(){return this._enabled}}class Yre{flush(){return this._messages=[],!0}parse(e){if(!e)return!1;let t=e.readInt();for(;t>0;)this._messages.push(e.readString()),t--;return!0}get messages(){return this._messages}}class Xre{flush(){return this._type=null,this._parameters=new Map,!0}parse(e){if(!e)return!1;this._type=e.readString();let t=e.readInt();for(;t>0;)this._parameters.set(e.readString(),e.readString()),t--;return!0}get type(){return this._type}get parameters(){return this._parameters}}class Kre{flush(){return this._contentType=null,this._classId=0,this._name=null,this._description=null,!0}parse(e){return e?(this._contentType=e.readString(),this._classId=e.readInt(),this._name=e.readString(),this._description=e.readString(),!0):!1}get contentType(){return this._contentType}get classId(){return this._classId}get name(){return this._name}get description(){return this._description}}class qre{flush(){return this._petId=-1,this._petName=null,this._level=0,this._figureData=null,!0}parse(e){return e?(this._petId=e.readInt(),this._petName=e.readString(),this._level=e.readInt(),this._figureData=new kw(e),!0):!1}get petId(){return this._petId}get petName(){return this._petName}get level(){return this._level}get figureData(){return this._figureData}}class $re{flush(){return this._errorCode=-1,!0}parse(e){return e?(this._errorCode=e.readInt(),!0):!1}get errorCode(){return this._errorCode}}class Qre{flush(){return!0}parse(e){return!0}}class Zre{flush(){return this._alertMessage=null,!0}parse(e){return e?(this._alertMessage=e.readString(),e.bytesAvailable&&(this._titleMessage=e.readString()),!0):!1}get alertMessage(){return this._alertMessage}get titleMessage(){return this._titleMessage}}class Jre{flush(){return this._items=new li,!0}parse(e){if(!e)return!1;let t=e.readInt();for(;t>0;){const i=e.readInt();let n=e.readInt();const r=[];for(;n>0;)r.push(e.readInt()),n--;this._items.add(i,r),t--}return!0}getItemsByCategory(e){return this._items.getValue(e)}get categories(){return this._items.getKeys()}}class eae{constructor(e,t,i){this._code=e,this._errorMessage=t,this._isAllowed=i}get code(){return this._code}get errorMessage(){return this._errorMessage}get isAllowed(){return this._isAllowed}}const Ss=class Ss{};Ss.USE_GUIDE_TOOL="USE_GUIDE_TOOL",Ss.GIVE_GUIDE_TOUR="GIVE_GUIDE_TOUR",Ss.JUDGE_CHAT_REVIEWS="JUDGE_CHAT_REVIEWS",Ss.VOTE_IN_COMPETITIONS="VOTE_IN_COMPETITIONS",Ss.CALL_ON_HELPERS="CALL_ON_HELPERS",Ss.CITIZEN="CITIZEN",Ss.TRADE="TRADE",Ss.HEIGHTMAP_EDITOR_BETA="HEIGHTMAP_EDITOR_BETA",Ss.BUILDER_AT_WORK="BUILDER_AT_WORK",Ss.NAVIGATOR_ROOM_THUMBNAIL_CAMERA="NAVIGATOR_ROOM_THUMBNAIL_CAMERA",Ss.CAMERA="CAMERA",Ss.MOUSE_ZOOM="MOUSE_ZOOM";let QP=Ss;class tae{flush(){return this._perks=[],!0}parse(e){if(!e)return!1;this._perks=[];const t=e.readInt();for(let i=0;i0;)this._commands.push(e.readInt()),t--;let i=e.readInt();for(;i>0;)this._enabledCommands.push(e.readInt()),i--;return!0}get petId(){return this._petId}get commands(){return this._commands}get enabledCommands(){return this._enabledCommands}}class oae{constructor(e,t,i){this._value=e,this._choiceText=t,this._choiceType=i}get value(){return this._value}set value(e){this._value=e}get choiceText(){return this._choiceText}set choiceText(e){this._choiceText=e}get choiceType(){return this._choiceType}set choiceType(e){this._choiceType=e}}class lae{constructor(){this._children=[],this._questionChoices=[]}get questionId(){return this._questionId}set questionId(e){this._questionId=e}get questionType(){return this._questionType}set questionType(e){this._questionType=e}get sortOrder(){return this._sortOrder}set sortOrder(e){this._sortOrder=e}get questionText(){return this._questionText}set questionText(e){this._questionText=e}get questionCategory(){return this._questionCategory}set questionCategory(e){this._questionCategory=e}get questionAnswerType(){return this._questionAnswerType}set questionAnswerType(e){this._questionAnswerType=e}get questionAnswerCount(){return this._questionAnswerCount}set questionAnswerCount(e){this._questionAnswerCount=e}get children(){return this._children}set children(e){this._children=e}get questionChoices(){return this._questionChoices}set questionChoices(e){this._questionChoices=e}}class uae{constructor(){this._id=-1,this._startMessage="",this._endMessage="",this._numQuestions=0,this._questionArray=[],this._npsPoll=!1}flush(){return this._id=-1,this._startMessage="",this._endMessage="",this._numQuestions=0,this._questionArray=[],!0}parse(e){this._id=e.readInt(),this._startMessage=e.readString(),this._endMessage=e.readString(),this._numQuestions=e.readInt();for(let t=0;t=this._questCountInCampaign}get receiveTime(){return this._receiveTime}get sortOrder(){return this._sortOrder}get catalogPageName(){return this._catalogPageName}get chainCode(){return this._chainCode}get easy(){return this._easy}}class Aae{flush(){return this._questData=null,!0}parse(e){return e?(this._questData=new $u(e),this._showDialog=e.readBoolean(),!0):!1}get questData(){return this._questData}get showDialog(){return this._showDialog}}class Oae{flush(){return this._quest=null,!0}parse(e){return e?(e.readBoolean()&&(this._quest=new $u(e),this._easyQuestCount=e.readInt(),this._hardQuestCount=e.readInt()),!0):!1}get quest(){return this._quest}get easyQuestCount(){return this._easyQuestCount}get hardQuestCount(){return this._hardQuestCount}}class wae{flush(){return this._quest=null,!0}parse(e){return e?(this._quest=new $u(e),!0):!1}get quest(){return this._quest}}class Cae{flush(){return this._quests=[],!0}parse(e){if(!e)return!1;const t=e.readInt();for(let i=0;i0;)this._stuffIds.push(e.readInt()),t--;for(this._stuffTypeId=e.readInt(),this._id=e.readInt(),this._stringParam=e.readString(),t=e.readInt();t>0;)this._intParams.push(e.readInt()),t--;this._stuffTypeSelectionCode=e.readInt()}getBoolean(e){return this._intParams[e]===1}get stuffTypeSelectionEnabled(){return this._stuffTypeSelectionEnabled}get stuffTypeSelectionCode(){return this._stuffTypeSelectionCode}set stuffTypeSelectionCode(e){this._stuffTypeSelectionCode=e}get maximumItemSelectionCount(){return this._furniLimit}get selectedItems(){return this._stuffIds}get id(){return this._id}get stringData(){return this._stringParam}get intData(){return this._intParams}get code(){return 0}get spriteId(){return this._stuffTypeId}}class kae extends Dw{constructor(e){super(e),this._type=e.readInt()}get type(){return this._type}get code(){return this._type}}class xae extends Dw{constructor(e){super(e),this._conflictingActions=[],this._triggerConf=e.readInt();let t=e.readInt();for(;t>0;)this._conflictingActions.push(e.readInt()),t--}get code(){return this._triggerConf}get conflictingActions(){return this._conflictingActions}}class Dae extends Dw{constructor(e){super(e),this._conflictingTriggers=[],this._type=e.readInt(),this._delayInPulses=e.readInt();let t=e.readInt();for(;t>0;)this._conflictingTriggers.push(e.readInt()),t--}get type(){return this._type}get code(){return this._type}get delayInPulses(){return this._delayInPulses}get conflictingTriggers(){return this._conflictingTriggers}}class Lae{flush(){return this._definition=null,!0}parse(e){return e?(this._definition=new Dae(e),!0):!1}get definition(){return this._definition}}class Uae{flush(){return this._definition=null,!0}parse(e){return e?(this._definition=new kae(e),!0):!1}get definition(){return this._definition}}class Fae{flush(){return this._definition=null,!0}parse(e){return e?(this._definition=new xae(e),!0):!1}get definition(){return this._definition}}class Bae{flush(){return this._stuffId=0,!0}parse(e){return e?(this._stuffId=e.readInt(),!0):!1}get stuffId(){return this._stuffId}}class Gae{flush(){return this._reason=0,!0}parse(e){return e?(this._reason=e.readInt(),!0):!1}get reason(){return this._reason}}class Vae{flush(){return!0}parse(e){return!!e}}class jae{flush(){return this._info=null,!0}parse(e){return e?(this._info=e.readString(),!0):!1}get info(){return this._info}}class zae{flush(){return!0}parse(e){return!!e}}class Hae{flush(){return!0}parse(e){return!0}}class Wae{constructor(){this._songDisks=new li}flush(){return this._songDisks.reset(),this._maxLength=0,!0}parse(e){this._maxLength=e.readInt();const t=e.readInt();for(let i=0;i=0&&e=0&&e0;)t=e.readInt(),i=e.readString(),n=e.readString(),this._classifiedUsersNames.set(t,i),this._classifiedUsersClass.set(t,n),r--;return!0}get classifiedUsernameMap(){return this._classifiedUsersNames}get classifiedUserTypeMap(){return this._classifiedUsersClass}}class aoe extends A{constructor(e){super(e,oZ)}getParser(){return this.parser}}class ooe extends A{constructor(e){super(e,lZ)}getParser(){return this.parser}}class R4 extends A{constructor(e){super(e,uZ)}getParser(){return this.parser}}class loe extends A{constructor(e){super(e,hZ)}getParser(){return this.parser}}class uoe extends A{constructor(e){super(e,cZ)}getParser(){return this.parser}}class hoe extends A{constructor(e){super(e,fZ)}getParser(){return this.parser}}class coe extends A{constructor(e){super(e,dZ)}getParser(){return this.parser}}class foe extends A{constructor(e){super(e,_Z)}getParser(){return this.parser}}const vr=class vr extends A{constructor(e){super(e,gZ)}getParser(){return this.parser}};vr.NAME_OK=0,vr.ERROR_NAME_REQUIRED=1,vr.ERROR_NAME_TOO_SHORT=2,vr.ERROR_NAME_TOO_LONG=3,vr.ERROR_NAME_NOT_VALID=4,vr.ERROR_NAME_IN_USE=5,vr.ERROR_NAME_CHANGE_NOT_ALLOWED=6,vr.ERROR_MERGE_HOTEL_DOWN=7;let X_=vr;class doe extends A{constructor(e){super(e,pZ)}getParser(){return this.parser}}class S4 extends A{constructor(e){super(e,mZ)}getParser(){return this.parser}}class _oe extends A{constructor(e){super(e,EZ)}getParser(){return this.parser}}class goe extends A{constructor(e){super(e,yZ)}getParser(){return this.parser}}class poe extends A{constructor(e){super(e,TZ)}getParser(){return this.parser}}class moe extends A{constructor(e){super(e,IZ)}getParser(){return this.parser}}class voe extends A{constructor(e){super(e,RZ)}getParser(){return this.parser}}class Eoe extends A{constructor(e){super(e,OZ)}getParser(){return this.parser}}class yoe extends A{constructor(e){super(e,wZ)}getParser(){return this.parser}}class Toe extends A{constructor(e){super(e,CZ)}getParser(){return this.parser}}class Ioe extends A{constructor(e){super(e,MZ)}getParser(){return this.parser}}class Roe extends A{constructor(e){super(e,NZ)}getParser(){return this.parser}}class Soe extends A{constructor(e){super(e,PZ)}getParser(){return this.parser}}class boe extends A{constructor(e){super(e,kZ)}getParser(){return this.parser}}class Aoe extends A{constructor(e){super(e,xZ)}getParser(){return this.parser}}class Ooe extends A{constructor(e){super(e,DZ)}getParser(){return this.parser}}class woe extends A{constructor(e){super(e,LZ)}getParser(){return this.parser}}class Coe extends A{constructor(e){super(e,UZ)}getParser(){return this.parser}}class Moe extends A{constructor(e){super(e,FZ)}getParser(){return this.parser}}class Noe extends A{constructor(e){super(e,BZ)}getParser(){return this.parser}}class Poe extends A{constructor(e){super(e,GZ)}getParser(){return this.parser}}class koe extends A{constructor(e){super(e,VZ)}getParser(){return this.parser}}class xoe extends A{constructor(e){super(e,zZ)}getParser(){return this.parser}}class Doe extends A{constructor(e){super(e,YZ)}getParser(){return this.parser}}class Loe extends A{constructor(e){super(e,XZ)}getParser(){return this.parser}}class Uoe extends A{constructor(e){super(e,HZ)}getParser(){return this.parser}}class Foe extends A{constructor(e){super(e,KZ)}getParser(){return this.parser}}class Boe extends A{constructor(e){super(e,qZ)}getParser(){return this.parser}}class Goe extends A{constructor(e){super(e,QZ)}getParser(){return this.parser}}class Voe extends A{constructor(e){super(e,ZZ)}getParser(){return this.parser}}class joe extends A{constructor(e){super(e,eJ)}getParser(){return this.parser}}class zoe extends A{constructor(e){super(e,iJ)}getParser(){return this.parser}}class Hoe extends A{constructor(e){super(e,sJ)}getParser(){return this.parser}}class Woe extends A{constructor(e){super(e,nJ)}getParser(){return this.parser}}class Yoe extends A{constructor(e){super(e,rJ)}getParser(){return this.parser}}class Xoe extends A{constructor(e){super(e,aJ)}getParser(){return this.parser}}class Koe extends A{constructor(e){super(e,oJ)}getParser(){return this.parser}}class qoe extends A{constructor(e){super(e,lJ)}getParser(){return this.parser}}class $oe extends A{constructor(e){super(e,uJ)}getParser(){return this.parser}}class Qoe extends A{constructor(e){super(e,hJ)}getParser(){return this.parser}}class Zoe extends A{constructor(e){super(e,cJ)}getParser(){return this.parser}}class Joe extends A{constructor(e){super(e,fJ)}getParser(){return this.parser}}class ele extends A{constructor(e){super(e,dJ)}getParser(){return this.parser}}class tle extends A{constructor(e){super(e,gJ)}getParser(){return this.parser}}class ile extends A{constructor(e){super(e,die)}getParser(){return this.parser}}class sle extends A{constructor(e){super(e,_ie)}getParser(){return this.parser}}class nle extends A{constructor(e){super(e,pie)}getParser(){return this.parser}}class rle extends A{constructor(e){super(e,Eie)}getParser(){return this.parser}}class ale extends A{constructor(e){super(e,vie)}getParser(){return this.parser}}class ole extends A{constructor(e){super(e,yie)}getParser(){return this.parser}}class lle extends A{constructor(e){super(e,Tie)}getParser(){return this.parser}}class b4 extends A{constructor(e){super(e,Iie)}getParser(){return this.parser}}class ule extends A{constructor(e){super(e,cS)}getParser(){return this.parser}}class hle extends A{constructor(e){super(e,Rie)}getParser(){return this.parser}}class cle extends A{constructor(e){super(e,Sie)}getParser(){return this.parser}}class fle extends A{constructor(e){super(e,bie)}getParser(){return this.parser}}class dle extends A{constructor(e){super(e,Aie)}getParser(){return this.parser}}class _le extends A{constructor(e){super(e,Oie)}getParser(){return this.parser}}class gle extends A{constructor(e){super(e,wie)}getParser(){return this.parser}}class ple extends A{constructor(e){super(e,Mie)}getParser(){return this.parser}}class mle extends A{constructor(e){super(e,Nie)}getParser(){return this.parser}}class vle extends A{constructor(e){super(e,Pie)}getParser(){return this.parser}}class CS extends A{constructor(e){super(e,kie)}getParser(){return this.parser}}class Ele extends A{constructor(e){super(e,Die)}getParser(){return this.parser}}class yle extends A{constructor(e){super(e,Lie)}getParser(){return this.parser}}class Tle extends A{constructor(e){super(e,Uie)}getParser(){return this.parser}}class Ile extends A{constructor(e){super(e,Fie)}getParser(){return this.parser}}class Rle extends A{constructor(e){super(e,Bie)}getParser(){return this.parser}}class Sle extends A{constructor(e){super(e,Gie)}getParser(){return this.parser}}class ble extends A{constructor(e){super(e,Vie)}getParser(){return this.parser}}class Ale extends A{constructor(e){super(e,jie)}getParser(){return this.parser}}class Ole extends A{constructor(e){super(e,zie)}getParser(){return this.parser}}class wle extends A{constructor(e){super(e,Hie)}getParser(){return this.parser}}class Cle extends A{constructor(e){super(e,Wie)}getParser(){return this.parser}}class Mle extends A{constructor(e){super(e,Yie)}getParser(){return this.parser}}class Nle extends A{constructor(e){super(e,Xie)}getParser(){return this.parser}}class Ple extends A{constructor(e){super(e,Kie)}getParser(){return this.parser}}class A4 extends A{constructor(e){super(e,qie)}getParser(){return this.parser}}class kle extends A{constructor(e){super(e,$ie)}getParser(){return this.parser}}class xle extends A{constructor(e){super(e,Qie)}getParser(){return this.parser}}class Dle extends A{constructor(e){super(e,Zie)}getParser(){return this.parser}}class Lle extends A{constructor(e){super(e,_S)}getParser(){return this.parser}}class Ule extends A{constructor(e){super(e,Jie)}getParser(){return this.parser}}class Fle extends A{constructor(e){super(e,gS)}getParser(){return this.parser}}class Ble extends A{constructor(e){super(e,pS)}getParser(){return this.parser}}class Gle extends A{constructor(e){super(e,ese)}getParser(){return this.parser}}class Vle extends A{constructor(e){super(e,tse)}getParser(){return this.parser}}class jle extends A{constructor(e){super(e,ise)}getParser(){return this.parser}}class zle extends A{constructor(e){super(e,sse)}getParser(){return this.parser}}class Hle extends A{constructor(e){super(e,nse)}getParser(){return this.parser}}class Wle extends A{constructor(e){super(e,ase)}getParser(){return this.parser}}class Yle extends A{constructor(e){super(e,lse)}getParser(){return this.parser}}class Xle extends A{constructor(e){super(e,use)}getParser(){return this.parser}}class Kle extends A{constructor(e){super(e,mS)}getParser(){return this.parser}}class qle extends A{constructor(e){super(e,hse)}getParser(){return this.parser}}class $le extends A{constructor(e){super(e,vS)}getParser(){return this.parser}}class Qle extends A{constructor(e){super(e,cse)}getParser(){return this.parser}}class Zle extends A{constructor(e){super(e,fse)}getParser(){return this.parser}}class O4 extends A{constructor(e){super(e,dse)}getParser(){return this.parser}}class Jle extends A{constructor(e){super(e,_se)}getParser(){return this.parser}}class eue extends A{constructor(e){super(e,gse)}getParser(){return this.parser}}class tue extends A{constructor(e){super(e,b0)}getParser(){return this.parser}}class iue extends A{constructor(e){super(e,b0)}getParser(){return this.parser}}class sue extends A{constructor(e){super(e,b0)}getParser(){return this.parser}}class nue extends A{constructor(e){super(e,b0)}getParser(){return this.parser}}class rue extends A{constructor(e){super(e,mse)}getParser(){return this.parser}}class aue extends A{constructor(e){super(e,vse)}getParser(){return this.parser}}class MS extends A{constructor(e){super(e,Ese)}getParser(){return this.parser}}class oue extends A{constructor(e){super(e,yse)}getParser(){return this.parser}}class lue extends A{constructor(e){super(e,Tse)}getParser(){return this.parser}}class uue extends A{constructor(e){super(e,Ise)}getParser(){return this.parser}}class w4 extends A{constructor(e){super(e,Rse)}getParser(){return this.parser}}class hue extends A{constructor(e){super(e,Sse)}getParser(){return this.parser}}class cue extends A{constructor(e){super(e,bse)}getParser(){return this.parser}}class fue extends A{constructor(e){super(e,Ase)}getParser(){return this.parser}}class due extends A{constructor(e){super(e,Cse)}getParser(){return this.parser}}class _ue extends A{constructor(e){super(e,Mse)}getParser(){return this.parser}}class gue extends A{constructor(e){super(e,Nse)}getParser(){return this.parser}}class pue extends A{constructor(e){super(e,Pse)}getParser(){return this.parser}}class mue extends A{constructor(e){super(e,kse)}getParser(){return this.parser}}class vue extends A{constructor(e){super(e,xse)}getParser(){return this.parser}}class Eue extends A{constructor(e){super(e,Dse)}getParser(){return this.parser}}class yue extends A{constructor(e){super(e,Lse)}getParser(){return this.parser}}class Tue extends A{constructor(e){super(e,Use)}getParser(){return this.parser}}class Iue extends A{constructor(e){super(e,Fse)}getParser(){return this.parser}}class Rue extends A{constructor(e){super(e,Bse)}getParser(){return this.parser}}class Sue extends A{constructor(e){super(e,Gse)}getParser(){return this.parser}}class bue extends A{constructor(e){super(e,Vse)}getParser(){return this.parser}}class Aue extends A{constructor(e){super(e,jse)}getParser(){return this.parser}}const Ce=class Ce{};Ce.LOGOUT=0,Ce.JUST_BANNED=1,Ce.CONCURRENT_LOGIN=2,Ce.CONNECTION_LOST_TO_PEER=3,Ce.AVATAR_IDENTITY_CHANGE=4,Ce.REMOVE_FURNITURE_TOOL=5,Ce.STILL_BANNED=10,Ce.DUAL_LOGIN_BY_USERID=11,Ce.HOTEL_CLOSED=12,Ce.DUAL_LOGIN_BY_IP=13,Ce.PEER_CONNECTION_MISSING=16,Ce.NO_LOGIN_PERMISSION=17,Ce.DUPLICATE_CONNECTION=18,Ce.HOTEL_CLOSING=19,Ce.INCORRECT_PASSWORD=20,Ce.INVALID_LOGIN_TICKET=22,Ce.VERSION_CHECK_URL=23,Ce.VERSION_CHECK_PROPERTY=24,Ce.VERSION_CHECK_MACHINE_ID=25,Ce.NO_MESSENGER_SESSION=26,Ce.USER_NOT_FOUND=27,Ce.CRYPTO_NOT_INITIALIZED=28,Ce.DEV_CRYPTO_NOT_ALLOWED=29,Ce.DUPLICATE_UUID_DETECTED=100,Ce.OLD_SESSION_IN_PROXY=101,Ce.PUBLIC_KEY_NOT_NUMERIC=102,Ce.PUBLIC_KEY_TOO_SHORT=103,Ce.SOCKET_READ_GENERIC=104,Ce.SOCKET_READ_FIRST_BYTE=105,Ce.SOCKET_READ_LENGTH=106,Ce.SOCKET_READ_BODY=107,Ce.SOCKET_READ_POLICY=108,Ce.SOCKET_IO_EXCEPTION=109,Ce.SOCKET_WRONG_CRYPTO=110,Ce.PROXY_RUNTIME_EXCEPTION=111,Ce.IDLE_CONNECTION=112,Ce.PONG_TIMEOUT=113,Ce.IDLE_CONNECTION_NOT_AUTH=114,Ce.IDLE_CONNECTION_NO_USER_ID=115,Ce.WRITE_CLOSED_CHANNEL=116,Ce.SOCKET_WRITE_EXCEPTION_1=117,Ce.SOCKET_WRITE_EXCEPTION_2=118,Ce.SOCKET_WRITE_EXCEPTION_3=119;let kh=Ce;class Oue extends A{constructor(e){super(e,zse)}getParser(){return this.parser}get reasonString(){switch(this.getParser().reason){case kh.JUST_BANNED:case kh.STILL_BANNED:return"banned";case kh.CONCURRENT_LOGIN:return"concurrentlogin";case kh.INCORRECT_PASSWORD:return"incorrectpassword";default:return"logout"}}}class wue extends A{constructor(e){super(e,Hse)}getParser(){return this.parser}}class Cue extends A{constructor(e){super(e,Wse)}getParser(){return this.parser}}class C4 extends A{constructor(e){super(e,Yse)}getParser(){return this.parser}}class Mue extends A{constructor(e){super(e,Xse)}getParser(){return this.parser}}class Nue extends A{constructor(e){super(e,Kse)}getParser(){return this.parser}}class Pue extends A{constructor(e){super(e,qse)}getParser(){return this.parser}}class kue extends A{constructor(e){super(e,$se)}getParser(){return this.parser}}class xue extends A{constructor(e){super(e,Qse)}getParser(){return this.parser}}class Due extends A{constructor(e){super(e,Zse)}getParser(){return this.parser}}class Lue extends A{constructor(e){super(e,Jse)}getParser(){return this.parser}}class Uue extends A{constructor(e){super(e,ene)}getParser(){return this.parser}}class Fue extends A{constructor(e){super(e,tne)}getParser(){return this.parser}}class Bue extends A{constructor(e){super(e,ES)}getParser(){return this.parser}}class Gue extends A{constructor(e){super(e,ine)}getParser(){return this.parser}}class Vue extends A{constructor(e){super(e,yS)}getParser(){return this.parser}}class jue extends A{constructor(e){super(e,nne)}getParser(){return this.parser}}class zue extends A{constructor(e){super(e,rne)}getParser(){return this.parser}}class M4 extends A{constructor(e){super(e,ane)}getParser(){return this.parser}}class N4 extends A{constructor(e){super(e,TS)}getParser(){return this.parser}}class Hue extends A{constructor(e){super(e,one)}getParser(){return this.parser}}class Wue extends A{constructor(e){super(e,lne)}getParser(){return this.parser}}class Yue extends A{constructor(e){super(e,une)}getParser(){return this.parser}}class Xue extends A{constructor(e){super(e,hne)}getParser(){return this.parser}}class P4 extends A{constructor(e){super(e,cne)}getParser(){return this.parser}}class Kue extends A{constructor(e){super(e,IS)}getParser(){return this.parser}}class que extends A{constructor(e){super(e,RS)}getParser(){return this.parser}}class $ue extends A{constructor(e){super(e,fne)}getParser(){return this.parser}}class Que extends A{constructor(e){super(e,dne)}getParser(){return this.parser}}class Zue extends A{constructor(e){super(e,_ne)}getParser(){return this.parser}}class Jue extends A{constructor(e){super(e,gne)}getParser(){return this.parser}}const R=class R{};R.ACHIEVEMENT_LIST=305,R.AUTHENTICATED=2491,R.AUTHENTICATION=-1,R.AVAILABILITY_STATUS=2033,R.BUILDERS_CLUB_EXPIRED=1452,R.CLUB_OFFERS=2405,R.CATALOG_PAGE=804,R.CATALOG_PAGE_LIST=1032,R.CATALOG_PURCHASE_OK=869,R.CATALOG_PURCHASE_ERROR=1404,R.CATALOG_PURCHASE_NOT_ALLOWED=3770,R.PRODUCT_OFFER=3388,R.LIMITED_SOLD_OUT=377,R.CATALOG_PUBLISHED=1866,R.CFH_RESULT_MESSAGE=3635,R.CLIENT_LATENCY=10,R.CLIENT_PING=3928,R.DESKTOP_CAMPAIGN=1745,R.DESKTOP_NEWS=286,R.DESKTOP_VIEW=122,R.BUNDLE_DISCOUNT_RULESET=2347,R.FIRST_LOGIN_OF_DAY=793,R.FURNITURE_ALIASES=1723,R.FURNITURE_DATA=2547,R.FURNITURE_FLOOR=1778,R.FURNITURE_FLOOR_ADD=1534,R.FURNITURE_FLOOR_REMOVE=2703,R.FURNITURE_FLOOR_UPDATE=3776,R.FURNITURE_ITEMDATA=2202,R.FURNITURE_STATE=2376,R.FURNITURE_GROUP_CONTEXT_MENU_INFO=3293,R.FURNITURE_POSTIT_STICKY_POLE_OPEN=2366,R.GAME_CENTER_ACHIEVEMENTS=2265,R.GAME_CENTER_GAME_LIST=222,R.GAME_CENTER_STATUS=2893,R.GAME_CENTER_IN_ARENA_QUEUE=872,R.GAME_CENTER_STOP_COUNTER=3191,R.GAME_CENTER_USER_LEFT_GAME=3138,R.GAME_CENTER_DIRECTORY_STATUS=2246,R.GAME_CENTER_STARTING_GAME_FAILED=2142,R.GAME_CENTER_JOINING_FAILED=1730,R.GAMESTATUSMESSAGE=3805,R.GAMEACHIEVEMENTS=1689,R.GAMEINVITE=904,R.JOININGQUEUEFAILED=3035,R.JOINEDQUEUEMESSAGE=2260,R.LEFTQUEUE=1477,R.LOAD_GAME_URL=2624,R.LOADGAME=3654,R.UNLOADGAME=1715,R.ACHIEVEMENTRESOLUTIONCOMPLETED=740,R.ACHIEVEMENTRESOLUTIONPROGRESS=3370,R.ACHIEVEMENTRESOLUTIONS=66,R.GENERIC_ALERT=3801,R.MODERATOR_MESSAGE=2030,R.GENERIC_ERROR=1600,R.GIFT_WRAPPER_CONFIG=2234,R.GROUP_BADGES=2402,R.GROUP_CREATE_OPTIONS=2159,R.GROUP_FORUM_DATA=3011,R.GROUP_FORUM_LIST=3001,R.GROUP_FORUM_THREADS=1073,R.GROUP_FORUM_POST=2049,R.GROUP_FORUM_POST_THREAD=1862,R.GROUP_FORUM_THREAD_MESSAGES=509,R.GROUP_FORUM_UNREAD_COUNT=2379,R.GROUP_FORUM_UPDATE_MESSAGE=324,R.GROUP_FORUM_UPDATE_THREAD=2528,R.GROUP_INFO=1702,R.GROUP_LIST=420,R.GROUP_MEMBER=265,R.GROUP_MEMBERS=1200,R.GROUP_MEMBERS_REFRESH=2445,R.GROUP_MEMBER_REMOVE_CONFIRM=1876,R.GROUP_PURCHASED=2808,R.GROUP_SETTINGS=3965,R.GROUP_BADGE_PARTS=2238,R.GROUP_MEMBERSHIP_REQUESTED=1180,R.GROUP_DETAILS_CHANGED=1459,R.GROUP_HABBO_JOIN_FAILED=762,R.GUILD_EDIT_FAILED=3988,R.GUILD_MEMBER_MGMT_FAILED=818,R.ITEM_DIMMER_SETTINGS=2710,R.ITEM_STACK_HELPER=2816,R.ITEM_WALL=1369,R.ITEM_WALL_ADD=2187,R.ITEM_WALL_REMOVE=3208,R.ITEM_WALL_UPDATE=2009,R.MARKETPLACE_CONFIG=1823,R.MESSENGER_ACCEPT_FRIENDS=896,R.MESSENGER_CHAT=1587,R.MESSENGER_FIND_FRIENDS=1210,R.MESSENGER_FOLLOW_FAILED=3048,R.MESSENGER_FRIEND_NOTIFICATION=3082,R.MESSENGER_FRIENDS=3130,R.MESSENGER_INIT=1605,R.MESSENGER_INSTANCE_MESSAGE_ERROR=3359,R.MESSENGER_INVITE=3870,R.MESSENGER_INVITE_ERROR=462,R.MESSENGER_MESSAGE_ERROR=892,R.MESSENGER_MINIMAIL_COUNT=2803,R.MESSENGER_MINIMAIL_NEW=1911,R.MESSENGER_RELATIONSHIPS=2016,R.MESSENGER_REQUEST=2219,R.MESSENGER_REQUEST_ERROR=892,R.MESSENGER_REQUESTS=280,R.MESSENGER_SEARCH=973,R.MESSENGER_UPDATE=2800,R.MODERATION_REPORT_DISABLED=1651,R.MODERATION_TOOL=2696,R.MODERATION_USER_INFO=2866,R.MOTD_MESSAGES=2035,R.NAVIGATOR_CATEGORIES=1562,R.NAVIGATOR_COLLAPSED=1543,R.NAVIGATOR_EVENT_CATEGORIES=3244,R.NAVIGATOR_LIFTED=3104,R.NAVIGATOR_METADATA=3052,R.NAVIGATOR_OPEN_ROOM_CREATOR=2064,R.NAVIGATOR_SEARCH=2690,R.NAVIGATOR_SEARCHES=3984,R.NAVIGATOR_SETTINGS=518,R.THUMBNAIL_UPDATE_RESULT=1927,R.CAN_CREATE_ROOM=378,R.CATEGORIES_WITH_VISITOR_COUNT=1455,R.COMPETITION_ROOMS_DATA=3954,R.CONVERTED_ROOM_ID=1331,R.GUEST_ROOM_SEARCH_RESULT=52,R.NOTIFICATION_LIST=1992,R.NOTIFICATION_OFFER_REWARD_DELIVERED=2125,R.NOTIFICATION_SIMPLE_ALERT=5100,R.NOTIFICATION_ELEMENT_POINTER=1787,R.PET_FIGURE_UPDATE=1924,R.PET_INFO=2901,R.PET_TRAINING_PANEL=1164,R.PET_LEVEL_UPDATE=2824,R.PET_SCRATCH_FAILED=1130,R.PET_OPEN_PACKAGE_REQUESTED=2380,R.PET_OPEN_PACKAGE_RESULT=546,R.PET_BREEDING=1746,R.PET_CONFIRM_BREEDING_RESULT=1625,R.PET_GO_TO_BREEDING_NEST_FAILURE=2621,R.PET_NEST_BREEDING_SUCCESS=2527,R.PET_CONFIRM_BREEDING_REQUEST=634,R.PET_BREEDING_RESULT=1553,R.RECYCLER_PRIZES=3164,R.RECYCLER_STATUS=3433,R.RECYCLER_FINISHED=468,R.ROOM_BAN_LIST=1869,R.ROOM_BAN_REMOVE=3429,R.ROOM_CREATED=1304,R.ROOM_DOORBELL=2309,R.ROOM_DOORBELL_ACCEPTED=3783,R.ROOM_DOORBELL_REJECTED=878,R.ROOM_ENTER=758,R.ROOM_ENTER_ERROR=899,R.ROOM_FORWARD=160,R.ROOM_HEIGHT_MAP=2753,R.ROOM_HEIGHT_MAP_UPDATE=558,R.ROOM_INFO=687,R.ROOM_INFO_OWNER=749,R.ROOM_MODEL=1301,R.ROOM_MODEL_BLOCKED_TILES=3990,R.ROOM_MODEL_DOOR=1664,R.ROOM_MODEL_NAME=2031,R.ROOM_MUTED=2533,R.ROOM_MUTE_USER=826,R.ROOM_PAINT=2454,R.ROOM_PROMOTION=2274,R.ROOM_QUEUE_STATUS=2208,R.ROOM_RIGHTS=780,R.ROOM_RIGHTS_CLEAR=2392,R.ROOM_RIGHTS_LIST=1284,R.ROOM_RIGHTS_LIST_ADD=2088,R.ROOM_RIGHTS_LIST_REMOVE=1327,R.ROOM_RIGHTS_OWNER=339,R.ROOM_ROLLING=3207,R.ROOM_SCORE=482,R.ROOM_SETTINGS=1498,R.ROOM_SETTINGS_CHAT=1191,R.ROOM_SETTINGS_SAVE=948,R.ROOM_SETTINGS_SAVE_ERROR=1555,R.ROOM_INFO_UPDATED=3297,R.ROOM_SPECTATOR=1033,R.ROOM_THICKNESS=3547,R.ROOM_GET_FILTER_WORDS=2937,R.ROOM_MESSAGE_NOTIFICATION=1634,R.ROOM_POPULAR_TAGS_RESULT=2012,R.INFO_FEED_ENABLE=3284,R.SECURITY_MACHINE=1488,R.MYSTERY_BOX_KEYS=2833,R.GOTMYSTERYBOXPRIZEMESSAGE=3712,R.CANCELMYSTERYBOXWAITMESSAGE=596,R.SHOWMYSTERYBOXWAITMESSAGE=3201,R.TRADE_ACCEPTED=2568,R.TRADE_CLOSED=1373,R.TRADE_COMPLETED=1001,R.TRADE_CONFIRMATION=2720,R.TRADE_LIST_ITEM=2024,R.TRADE_NOT_OPEN=3128,R.TRADE_OPEN=2505,R.TRADE_OPEN_FAILED=217,R.TRADE_OTHER_NOT_ALLOWED=1254,R.TRADE_YOU_NOT_ALLOWED=3058,R.TRADE_NO_SUCH_ITEM=2873,R.UNIT=374,R.UNIT_CHANGE_NAME=2182,R.UNIT_CHAT=1446,R.UNIT_CHAT_SHOUT=1036,R.UNIT_CHAT_WHISPER=2704,R.UNIT_DANCE=2233,R.UNIT_EFFECT=1167,R.UNIT_EXPRESSION=1631,R.UNIT_HAND_ITEM=1474,R.UNIT_IDLE=1797,R.UNIT_INFO=3920,R.UNIT_NUMBER=2324,R.UNIT_REMOVE=2661,R.UNIT_STATUS=1640,R.UNIT_TYPING=1717,R.UNSEEN_ITEMS=2103,R.USER_ACHIEVEMENT_SCORE=1968,R.USER_BADGES=717,R.USER_BADGES_ADD=2493,R.USER_BADGES_CURRENT=1087,R.USER_BOT_REMOVE=233,R.USER_BOTS=3086,R.USER_CHANGE_NAME=118,R.USER_CLOTHING=1450,R.USER_CREDITS=3475,R.USER_CURRENCY=2018,R.ACTIVITY_POINT_NOTIFICATION=2275,R.USER_EFFECTS=340,R.USER_FAVORITE_ROOM=2524,R.USER_FAVORITE_ROOM_COUNT=151,R.USER_FIGURE=2429,R.USER_FURNITURE=994,R.USER_FURNITURE_ADD=104,R.USER_FURNITURE_POSTIT_PLACED=1501,R.USER_FURNITURE_REFRESH=3151,R.USER_FURNITURE_REMOVE=159,R.USER_HOME_ROOM=2875,R.ROOM_EVENT_CANCEL=3479,R.ROOM_EVENT=1840,R.USER_IGNORED=126,R.USER_IGNORED_RESULT=207,R.USER_INFO=2725,R.USER_OUTFITS=3315,R.USER_PERKS=2586,R.USER_PERMISSIONS=411,R.USER_PET_ADD=2101,R.USER_PET_REMOVE=3253,R.USER_PETS=3522,R.USER_PROFILE=3898,R.USER_RESPECT=2815,R.USER_SANCTION_STATUS=3679,R.USER_SETTINGS=513,R.USER_SUBSCRIPTION=954,R.USER_WARDROBE_PAGE=3315,R.USER_CLASSIFICATION=966,R.GET_USER_TAGS=1255,R.WIRED_ACTION=1434,R.WIRED_CONDITION=1108,R.WIRED_ERROR=156,R.WIRED_OPEN=1830,R.WIRED_REWARD=178,R.WIRED_SAVE=1155,R.WIRED_TRIGGER=383,R.PLAYING_GAME=448,R.FURNITURE_STATE_2=3431,R.REMOVE_BOT_FROM_INVENTORY=233,R.ADD_BOT_TO_INVENTORY=1352,R.ACHIEVEMENT_PROGRESSED=2107,R.MODTOOL_ROOM_INFO=1333,R.MODTOOL_USER_CHATLOG=3377,R.MODTOOL_ROOM_CHATLOG=3434,R.MODTOOL_VISITED_ROOMS_USER=1752,R.MODERATOR_ACTION_RESULT=2335,R.ISSUE_DELETED=3192,R.ISSUE_INFO=3609,R.ISSUE_PICK_FAILED=3150,R.CFH_CHATLOG=607,R.MODERATOR_TOOL_PREFERENCES=1576,R.LOVELOCK_FURNI_START=3753,R.LOVELOCK_FURNI_FRIEND_COMFIRMED=382,R.LOVELOCK_FURNI_FINISHED=770,R.GIFT_RECEIVER_NOT_FOUND=1517,R.GIFT_OPENED=56,R.FLOOD_CONTROL=566,R.REMAINING_MUTE=826,R.USER_EFFECT_LIST=340,R.USER_EFFECT_LIST_ADD=2867,R.USER_EFFECT_LIST_REMOVE=2228,R.USER_EFFECT_ACTIVATE=1959,R.AVATAR_EFFECT_SELECTED=3473,R.CLUB_GIFT_INFO=619,R.REDEEM_VOUCHER_ERROR=714,R.REDEEM_VOUCHER_OK=3336,R.IN_CLIENT_LINK=2023,R.BOT_COMMAND_CONFIGURATION=1618,R.BOT_SKILL_LIST_UPDATE=69,R.BOT_FORCE_OPEN_CONTEXT_MENU=296,R.HAND_ITEM_RECEIVED=354,R.PET_PLACING_ERROR=2913,R.BOT_ERROR=639,R.MARKETPLACE_SELL_ITEM=54,R.MARKETPLACE_ITEM_STATS=725,R.MARKETPLACE_OWN_ITEMS=3884,R.MARKETPLACE_CANCEL_SALE=3264,R.MARKETPLACE_ITEM_POSTED=1359,R.MARKETPLACE_ITEMS_SEARCHED=680,R.MARKETPLACE_AFTER_ORDER_STATUS=2032,R.CATALOG_RECEIVE_PET_BREEDS=3331,R.CATALOG_APPROVE_NAME_RESULT=1503,R.OBJECTS_DATA_UPDATE=1453,R.PET_EXPERIENCE=2156,R.COMMUNITY_GOAL_VOTE_EVENT=1435,R.PROMO_ARTICLES=286,R.COMMUNITY_GOAL_EARNED_PRIZES=3319,R.COMMUNITY_GOAL_PROGRESS=2525,R.CONCURRENT_USERS_GOAL_PROGRESS=2737,R.QUEST_DAILY=1878,R.QUEST_CANCELLED=3027,R.QUEST_COMPLETED=949,R.COMMUNITY_GOAL_HALL_OF_FAME=3005,R.EPIC_POPUP=3945,R.SEASONAL_QUESTS=1122,R.QUESTS=3625,R.QUEST=230,R.BONUS_RARE_INFO=1533,R.CRAFTABLE_PRODUCTS=1e3,R.CRAFTING_RECIPE=2774,R.CRAFTING_RECIPES_AVAILABLE=2124,R.CRAFTING_RESULT=618,R.CAMERA_PUBLISH_STATUS=2057,R.CAMERA_PURCHASE_OK=2783,R.CAMERA_STORAGE_URL=3696,R.CAMERA_SNAPSHOT=463,R.COMPETITION_STATUS=133,R.INIT_CAMERA=3878,R.THUMBNAIL_STATUS=3595,R.ACHIEVEMENT_NOTIFICATION=806,R.CLUB_GIFT_NOTIFICATION=2188,R.INTERSTITIAL_MESSAGE=1808,R.ROOM_AD_ERROR=1759,R.AVAILABILITY_TIME=600,R.HOTEL_CLOSED_AND_OPENS=3728,R.HOTEL_CLOSES_AND_OPENS_AT=2771,R.HOTEL_WILL_CLOSE_MINUTES=1050,R.HOTEL_MAINTENANCE=1350,R.JUKEBOX_PLAYLIST_FULL=105,R.JUKEBOX_SONG_DISKS=34,R.NOW_PLAYING=469,R.OFFICIAL_SONG_ID=1381,R.PLAYLIST=1748,R.PLAYLIST_SONG_ADDED=1140,R.TRAX_SONG_INFO=3365,R.USER_SONG_DISKS_INVENTORY=2602,R.CHECK_USER_NAME=563,R.CFH_SANCTION=2782,R.CFH_TOPICS=325,R.CFH_SANCTION_STATUS=2221,R.CAMPAIGN_CALENDAR_DATA=2531,R.CAMPAIGN_CALENDAR_DOOR_OPENED=2551,R.BUILDERS_CLUB_FURNI_COUNT=3828,R.BUILDERS_CLUB_SUBSCRIPTION=1452,R.CATALOG_PAGE_EXPIRATION=2668,R.CATALOG_EARLIEST_EXPIRY=2515,R.CLUB_GIFT_SELECTED=659,R.TARGET_OFFER_NOT_FOUND=1237,R.TARGET_OFFER=119,R.DIRECT_SMS_CLUB_BUY=195,R.ROOM_AD_PURCHASE=2468,R.NOT_ENOUGH_BALANCE=3914,R.LIMITED_OFFER_APPEARING_NEXT=44,R.IS_OFFER_GIFTABLE=761,R.CLUB_EXTENDED_OFFER=3964,R.SEASONAL_CALENDAR_OFFER=1889,R.COMPETITION_ENTRY_SUBMIT=1177,R.COMPETITION_VOTING_INFO=3506,R.COMPETITION_TIMING_CODE=1745,R.COMPETITION_USER_PART_OF=3841,R.COMPETITION_NO_OWNED_ROOMS=2064,R.COMPETITION_SECONDS_UNTIL=3926,R.BADGE_POINT_LIMITS=2501,R.BADGE_REQUEST_FULFILLED=2998,R.HELPER_TALENT_TRACK=3406,R.TALENT_TRACK_LEVEL=1203,R.TALENT_TRACK_LEVEL_UP=638,R.USER_BANNED=1683,R.BOT_RECEIVED=3684,R.PET_LEVEL_NOTIFICATION=859,R.PET_RECEIVED=1111,R.MODERATION_CAUTION=1890,R.YOUTUBE_CONTROL_VIDEO=1554,R.YOUTUBE_DISPLAY_PLAYLISTS=1112,R.YOUTUBE_DISPLAY_VIDEO=1411,R.CFH_DISABLED_NOTIFY=1651,R.QUESTION=2665,R.POLL_CONTENTS=2997,R.POLL_ERROR=662,R.POLL_OFFER=3785,R.POLL_START_ROOM=5200,R.QUESTION_ANSWERED=2589,R.QUESTION_FINISHED=1066,R.CFH_PENDING_CALLS=1121,R.GUIDE_ON_DUTY_STATUS=1548,R.GUIDE_SESSION_ATTACHED=1591,R.GUIDE_SESSION_DETACHED=138,R.GUIDE_SESSION_ENDED=1456,R.GUIDE_SESSION_ERROR=673,R.GUIDE_SESSION_INVITED_TO_GUIDE_ROOM=219,R.GUIDE_SESSION_MESSAGE=841,R.GUIDE_SESSION_PARTNER_IS_TYPING=1016,R.GUIDE_SESSION_REQUESTER_ROOM=1847,R.GUIDE_SESSION_STARTED=3209,R.GUIDE_TICKET_CREATION_RESULT=3285,R.GUIDE_TICKET_RESOLUTION=2674,R.GUIDE_REPORTING_STATUS=3463,R.HOTEL_MERGE_NAME_CHANGE=1663,R.ISSUE_CLOSE_NOTIFICATION=934,R.QUIZ_DATA=2927,R.QUIZ_RESULTS=2772,R.CFH_PENDING_CALLS_DELETED=77,R.CFH_REPLY=3796,R.CHAT_REVIEW_SESSION_DETACHED=30,R.CHAT_REVIEW_SESSION_OFFERED_TO_GUIDE=735,R.CHAT_REVIEW_SESSION_RESULTS=3276,R.CHAT_REVIEW_SESSION_STARTED=143,R.CHAT_REVIEW_SESSION_VOTING_STATUS=1829,R.SCR_SEND_KICKBACK_INFO=3277,R.PET_STATUS=1907,R.GROUP_DEACTIVATE=3129,R.PET_RESPECTED=2788,R.PET_SUPPLEMENT=3441,R.NOOBNESS_LEVEL=3738,R.DISCONNECT_REASON=4e3,R.CAN_CREATE_ROOM_EVENT=2599,R.FAVORITE_GROUP_UDPATE=3403,R.NO_SUCH_FLAT=84,R.ROOM_SETTINGS_ERROR=2897,R.SHOW_ENFORCE_ROOM_CATEGORY=3896,R.CUSTOM_USER_NOTIFICATION=909,R.NEW_USER_EXPERIENCE_GIFT_OFFER=3575,R.RESTORE_CLIENT=426,R.FIREWORK_CHARGE_DATA=5210,R.NEW_USER_EXPERIENCE_NOT_COMPLETE=3639,R.CONNECTION_ERROR=1004,R.ACCOUNT_SAFETY_LOCK_STATUS_CHANGE=1243,R.PHONE_COLLECTION_STATE=2890,R.PHONE_TRY_NUMBER_RESULT=800,R.PHONE_TRY_VERIFICATION_CODE_RESULT=91,R.EXTENDED_PROFILE_CHANGED=876,R.WELCOME_GIFT_CHANGE_EMAIL_RESULT=2293,R.WELCOME_GIFT_STATUS=2707,R.HANDSHAKE_INIT_DIFFIE=1347,R.HANDSHAKE_COMPLETE_DIFFIE=3885,R.RENTABLE_SPACE_RENT_OK=2046,R.RENTABLE_SPACE_STATUS=3559,R.RENTABLE_SPACE_RENT_FAILED=1868,R.EMAIL_STATUS=612,R.CHANGE_EMAIL_RESULT=1815,R.WEEKLY_GAME_REWARD=2641,R.WEEKLY_GAME_REWARD_WINNERS=3097,R.WEEKLY_COMPETITIVE_LEADERBOARD=3512,R.WEEKLY_COMPETITIVE_FRIENDS_LEADERBOARD=3560,R.WEEKLY_GAME2_FRIENDS_LEADERBOARD=2270,R.WEEKLY_GAME2_LEADERBOARD=2196,R.RENTABLE_FURNI_RENT_OR_BUYOUT_OFFER=35,R.HANDSHAKE_IDENTITY_ACCOUNT=3523;let O=R;class ehe extends A{constructor(e){super(e,BJ)}getParser(){return this.parser}}class the extends A{constructor(e){super(e,GJ)}getParser(){return this.parser}}class ihe extends A{constructor(e){super(e,VJ)}getParser(){return this.parser}}class she extends A{constructor(e){super(e,zJ)}getParser(){return this.parser}}class nhe extends A{constructor(e){super(e,HJ)}getParser(){return this.parser}}class rhe extends A{constructor(e){super(e,WJ)}getParser(){return this.parser}}class ahe extends A{constructor(e){super(e,YJ)}getParser(){return this.parser}}class ohe extends A{constructor(e){super(e,XJ)}getParser(){return this.parser}}class k4 extends A{constructor(e){super(e,qJ)}getParser(){return this.parser}}class lhe extends A{constructor(e){super(e,$J)}getParser(){return this.parser}}class uhe extends A{constructor(e){super(e,QJ)}getParser(){return this.parser}}class hhe extends A{constructor(e){super(e,ZJ)}getParser(){return this.parser}}class che extends A{constructor(e){super(e,JJ)}getParser(){return this.parser}}class fhe extends A{constructor(e){super(e,Lte)}getParser(){return this.parser}}class dhe extends A{constructor(e){super(e,Fte)}getParser(){return this.parser}}class _he extends A{constructor(e){super(e,Ute)}getParser(){return this.parser}}class ghe extends A{constructor(e){super(e,Bte)}getParser(){return this.parser}}class phe extends A{constructor(e){super(e,Gte)}getParser(){return this.parser}}class x4 extends A{constructor(e){super(e,Vte)}getParser(){return this.parser}}class mhe extends A{constructor(e){super(e,jte)}getParser(){return this.parser}}class vhe extends A{constructor(e){super(e,zte)}getParser(){return this.parser}}class Ehe extends A{constructor(e){super(e,Hte)}getParser(){return this.parser}}class yhe extends A{constructor(e){super(e,Wte)}getParser(){return this.parser}}class The extends A{constructor(e){super(e,Yte)}getParser(){return this.parser}}class Ihe extends A{constructor(e){super(e,Xte)}getParser(){return this.parser}}class Rhe extends A{constructor(e){super(e,Kte)}getParser(){return this.parser}}class She extends A{constructor(e){super(e,$te)}get userID(){return this.getParser().userID}get userAccepts(){return this.getParser().userAccepts}getParser(){return this.parser}}class bhe extends A{constructor(e){super(e,uS)}get userID(){return this.getParser().userID}getParser(){return this.parser}}class Ahe extends A{constructor(e){super(e,Qte)}getParser(){return this.parser}}class Ohe extends A{constructor(e){super(e,Zte)}getParser(){return this.parser}}class whe extends A{constructor(e){super(e,Jte)}get firstUserID(){return this.getParser().firstUserID}get secondUserID(){return this.getParser().secondUserID}get firstUserNumItems(){return this.getParser().firstUserNumItems}get secondUserNumItems(){return this.getParser().secondUserNumItems}get firstUserNumCredits(){return this.getParser().firstUserNumCredits}get secondUserNumCredits(){return this.getParser().secondUserNumCredits}get firstUserItemArray(){return this.getParser().firstUserItemArray}get secondUserItemArray(){return this.getParser().secondUserItemArray}getParser(){return this.parser}}class Che extends A{constructor(e){super(e,eie)}getParser(){return this.parser}}class Mhe extends A{constructor(e){super(e,tie)}getParser(){return this.parser}}class Nhe extends A{constructor(e){super(e,iie)}get userID(){return this.getParser().userID}get userCanTrade(){return this.getParser().userCanTrade}get otherUserID(){return this.getParser().otherUserID}get otherUserCanTrade(){return this.getParser().otherUserCanTrade}getParser(){return this.parser}}class Phe extends A{constructor(e){super(e,hS)}getParser(){return this.parser}}class khe extends A{constructor(e){super(e,sie)}getParser(){return this.parser}}class xhe extends A{constructor(e){super(e,nie)}getParser(){return this.parser}}class Dhe extends A{constructor(e){super(e,pne)}getParser(){return this.parser}}class Lhe extends A{constructor(e){super(e,mne)}getParser(){return this.parser}}class Uhe extends A{constructor(e){super(e,vne)}getParser(){return this.parser}}class Fhe extends A{constructor(e){super(e,Ene)}getParser(){return this.parser}}class Bhe extends A{constructor(e){super(e,yne)}getParser(){return this.parser}}class Ghe extends A{constructor(e){super(e,Tne)}getParser(){return this.parser}}class Vhe extends A{constructor(e){super(e,Rne)}getParser(){return this.parser}}class jhe extends A{constructor(e){super(e,Ine)}getParser(){return this.parser}}class zhe extends A{constructor(e){super(e,bS)}getParser(){return this.parser}}class Hhe extends A{constructor(e){super(e,AS)}getParser(){return this.parser}}class Whe extends A{constructor(e){super(e,Ane)}getParser(){return this.parser}}class Yhe extends A{constructor(e){super(e,One)}getParser(){return this.parser}}class Xhe extends A{constructor(e){super(e,y4)}getParser(){return this.parser}}class Khe extends A{constructor(e){super(e,Cne)}getParser(){return this.parser}}class qhe extends A{constructor(e){super(e,Nne)}getParser(){return this.parser}}class $he extends A{constructor(e){super(e,Mne)}getParser(){return this.parser}}class Qhe extends A{constructor(e){super(e,kne)}getParser(){return this.parser}}class Zhe extends A{constructor(e){super(e,xne)}getParser(){return this.parser}}class Jhe extends A{constructor(e){super(e,Une)}getParser(){return this.parser}}class ece extends A{constructor(e){super(e,Fne)}getParser(){return this.parser}}class tce extends A{constructor(e){super(e,Gne)}getParser(){return this.parser}}class ice extends A{constructor(e){super(e,Vne)}getParser(){return this.parser}}class sce extends A{constructor(e){super(e,Hne)}getParser(){return this.parser}}class nce extends A{constructor(e){super(e,Wne)}getParser(){return this.parser}}class rce extends A{constructor(e){super(e,Xne)}getParser(){return this.parser}}class ace extends A{constructor(e){super(e,Kne)}getParser(){return this.parser}}class oce extends A{constructor(e){super(e,qne)}getParser(){return this.parser}}class D4 extends A{constructor(e){super(e,$ne)}getParser(){return this.parser}}class lce extends A{constructor(e){super(e,Qne)}getParser(){return this.parser}}class uce extends A{constructor(e){super(e,OS)}getParser(){return this.parser}}class hce extends A{constructor(e){super(e,Zne)}getParser(){return this.parser}}class cce extends A{constructor(e){super(e,are)}getParser(){return this.parser}}class fce extends A{constructor(e){super(e,ore)}getParser(){return this.parser}}class dce extends A{constructor(e){super(e,lre)}getParser(){return this.parser}}class L4 extends A{constructor(e){super(e,ure)}getParser(){return this.parser}get userName(){return this.getParser().userName}}class _ce extends A{constructor(e){super(e,hre)}getParser(){return this.parser}}class gce extends A{constructor(e){super(e,cre)}getParser(){return this.parser}}class NS extends A{constructor(e){super(e,fre)}getParser(){return this.parser}}class pce extends A{constructor(e){super(e,dre)}getParser(){return this.parser}}class PS extends A{constructor(e){super(e,_re)}getParser(){return this.parser}}class mce extends A{constructor(e){super(e,gre)}getParser(){return this.parser}}class vce extends A{constructor(e){super(e,mre)}getParser(){return this.parser}}class Ece extends A{constructor(e){super(e,Ere)}getParser(){return this.parser}}class yce extends A{constructor(e){super(e,Tre)}getParser(){return this.parser}}class Tce extends A{constructor(e){super(e,Ire)}getParser(){return this.parser}}class Ice extends A{constructor(e){super(e,Rre)}getParser(){return this.parser}}class Rce extends A{constructor(e){super(e,Sre)}getParser(){return this.parser}}class Sce extends A{constructor(e){super(e,bre)}getParser(){return this.parser}}class bce extends A{constructor(e){super(e,Are)}getParser(){return this.parser}}class Ace extends A{constructor(e){super(e,Cre)}getParser(){return this.parser}}class Oce extends A{constructor(e){super(e,Mre)}getParser(){return this.parser}}class wce extends A{constructor(e){super(e,Nre)}getParser(){return this.parser}}class Cce extends A{constructor(e){super(e,Pre)}getParser(){return this.parser}}class Mce extends A{constructor(e){super(e,kre)}getParser(){return this.parser}}class Nce extends A{constructor(e){super(e,xre)}getParser(){return this.parser}}class Pce extends A{constructor(e){super(e,Dre)}getParser(){return this.parser}}class kce extends A{constructor(e){super(e,Lre)}getParser(){return this.parser}}class xce extends A{constructor(e){super(e,Fre)}getParser(){return this.parser}}class Dce extends A{constructor(e){super(e,Bre)}getParser(){return this.parser}}class U4 extends A{constructor(e){super(e,Gre)}getParser(){return this.parser}}class Lce extends A{constructor(e){super(e,Vre)}getParser(){return this.parser}}class Uce extends A{constructor(e){super(e,jre)}getParser(){return this.parser}}class Fce extends A{constructor(e){super(e,zre)}getParser(){return this.parser}}class Bce extends A{constructor(e){super(e,Hre)}getParser(){return this.parser}}class Gce extends A{constructor(e){super(e,Wre)}getParser(){return this.parser}}class Vce extends A{constructor(e){super(e,Yre)}getParser(){return this.parser}}class jce extends A{constructor(e){super(e,Xre)}getParser(){return this.parser}}class zce extends A{constructor(e){super(e,Kre)}getParser(){return this.parser}}class Hce extends A{constructor(e){super(e,qre)}getParser(){return this.parser}}class F4 extends A{constructor(e){super(e,$re)}getParser(){return this.parser}}class Wce extends A{constructor(e){super(e,Qre)}getParser(){return this.parser}}class Yce extends A{constructor(e){super(e,Zre)}getParser(){return this.parser}}class Xce extends A{constructor(e){super(e,Jre)}getParser(){return this.parser}}class Kce{constructor(e){this._itemName=e.readString(),this._extraInfo=e.readString(),this._extraInfo==""&&(this._extraInfo=null)}get itemName(){return this._itemName}get extraInfo(){return this._extraInfo}}class qce{constructor(e){this._thumbnailUrl=e.readString(),this._thumbnailUrl==""&&(this._thumbnailUrl=null),this._productOfferList=[];const t=e.readInt();let i=0;for(;ir.charCodeAt(0));this._data.push(n.byteLength,n.buffer)}assignBase64(e){const t=e.split(",")[1],i=Uint8Array.from(atob(t),n=>n.charCodeAt(0));this._data.push(i.byteLength,i.buffer)}}class pb extends Ov{constructor(e="",t="",i="",n=-1,r=-1){super(e,t,i,n,r)}}class Bde{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class Gde{constructor(e,t){this._data=[e,t]}dispose(){this._data=null}getMessageArray(){return this._data}}class Vde{constructor(e,t){this._data=[e,t]}dispose(){this._data=null}getMessageArray(){return this._data}}class jde{constructor(e,t,i,n,r,a){this._data=[e,t,i,n,r,a]}dispose(){this._data=null}getMessageArray(){return this._data}}class zde{constructor(e,t,i,n){this._data=[e,t,i,n]}dispose(){this._data=null}getMessageArray(){return this._data}}class Hde{constructor(){this._data=[]}dispose(){this._data=null}getMessageArray(){return this._data}}class Wde{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class Yde{constructor(){this._data=[]}dispose(){this._data=null}getMessageArray(){return this._data}}class Xde{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class Kde{constructor(e,t,i){this._data=[e,t,i]}getMessageArray(){return this._data}dispose(){}}class qde{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class $de{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class Qde{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){this._data=null}}class Zde{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){this._data=null}}class Jde{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){this._data=null}}class e_e{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class t_e{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){this._data=null}}class i_e{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){this._data=null}}class s_e{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){this._data=null}}class n_e{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){this._data=null}}class r_e{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){this._data=null}}class a_e{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class o_e{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){this._data=null}}class l_e{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){this._data=null}}class u_e{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class h_e{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class c_e{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class f_e{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){this._data=null}}class d_e{constructor(e,t,i,n,r,a,o,l,u){this._data=[e,t,i,n,r,a,o,l,u]}getMessageArray(){return this._data}dispose(){}}class __e{constructor(e,t,i,n){this._data=[e,t,i,n]}getMessageArray(){return this._data}dispose(){}}class g_e{constructor(e,t,i,n,r,a,o){this._data=[e,t,i,n,r,a,o]}getMessageArray(){return this._data}dispose(){}}class p_e{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class m_e{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class v_e{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class E_e{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class y_e{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class T_e{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class I_e{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class R_e{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class S_e{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class b_e{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class A_e{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class O_e{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class w_e{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class C_e{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}const dc=class dc{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}};dc.CONFIRM_LEVEL_NOT_ACCEPTED=0,dc.CONFIRM_LEVEL_NOT_SUBMITTED=1,dc.CONFIRM_LEVEL_NOT_CONFIRMED=2,dc.CONFIRM_LEVEL_COMMIT=3;let mb=dc;class M_e{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class N_e{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class P_e{constructor(e,t){this._data=[e,t.length].concat(t)}getMessageArray(){return this._data}dispose(){}}class k_e{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class x_e{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class D_e{constructor(e,t){this._data=[e,t.length].concat(t)}getMessageArray(){return this._data}dispose(){}}class L_e{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class U_e{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class F_e{constructor(...e){this._data=[e.length,...e]}getMessageArray(){return this._data}dispose(){}}class B_e{constructor(e,...t){this._data=[e,t.length,...t]}getMessageArray(){return this._data}dispose(){}}class G_e{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class V_e{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class j_e{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class z_e{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class H_e{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class W_e{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class Y_e{constructor(...e){this._data=[e.length,...e]}getMessageArray(){return this._data}dispose(){}}class X_e{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class K_e{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class q_e{constructor(e,t){this._data=[t.length,...t,e]}getMessageArray(){return this._data}dispose(){}}class $_e{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class Q_e{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class Z_e{constructor(e=!0){this._data=[e]}dispose(){this._data=null}getMessageArray(){return this._data}}class J_e{constructor(e){this._data=[e]}dispose(){this._data=null}getMessageArray(){return this._data}}class ege{constructor(e){this._data=[e]}dispose(){this._data=null}getMessageArray(){return this._data}}class tge{constructor(){this._data=[]}dispose(){this._data=null}getMessageArray(){return this._data}}class ige{constructor(){this._data=[]}dispose(){this._data=null}getMessageArray(){return this._data}}class sge{constructor(e){this._data=[e]}dispose(){this._data=null}getMessageArray(){return this._data}}class nge{constructor(e){this._data=[e]}dispose(){this._data=null}getMessageArray(){return this._data}}class rge{constructor(e,t){this._data=[e,t]}dispose(){this._data=null}getMessageArray(){return this._data}}class age{constructor(e){this._data=[e]}dispose(){this._data=null}getMessageArray(){return this._data}}class oge{constructor(){this._data=[]}dispose(){this._data=null}getMessageArray(){return this._data}}class lge{constructor(){this._data=[]}dispose(){this._data=null}getMessageArray(){return this._data}}class uge{constructor(e){this._data=[e]}dispose(){this._data=null}getMessageArray(){return this._data}}class SF{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class hge{constructor(e){this._data=[e]}dispose(){this._data=null}getMessageArray(){return this._data}}class cge{constructor(e){this._data=[e]}dispose(){this._data=null}getMessageArray(){return this._data}}class fge{constructor(e){this._data=[e]}dispose(){this._data=null}getMessageArray(){return this._data}}class dge{constructor(e){this._data=[e]}dispose(){this._data=null}getMessageArray(){return this._data}}class _ge{constructor(e,t,i,n,r,a){this._data=[e,t,i,n,r,a]}dispose(){this._data=null}getMessageArray(){return this._data}}class gge{constructor(e,t,i,n,r,a){this._data=[e,t,i,n,r,a]}dispose(){this._data=null}getMessageArray(){return this._data}}class pge{constructor(e){this._data=[e]}dispose(){this._data=null}getMessageArray(){return this._data}}class mge{constructor(e){this._data=[e]}dispose(){this._data=null}getMessageArray(){return this._data}}const uC=class uC{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}};uC.NO_ISSUE_ID=-1;let vb=uC;class vge{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}const hC=class hC{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}};hC.NO_ISSUE_ID=-1;let Eb=hC;class Ege{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class yge{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class Tge{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class Ige{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class Rge{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class Sge{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class bge{constructor(e,t,i,n,r,a){this._data=[e,t,i,n,r,a.length,...a]}getMessageArray(){return this._data}dispose(){}}class Age{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class Oge{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class wge{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class Cge{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class Mge{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class Nge{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class Pge{constructor(e,t,i,n){this._data=[e,t,i,n]}getMessageArray(){return this._data}dispose(){}}class kge{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class xge{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class Dge{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class Lge{constructor(e,t){this._data=[e,t.length,...t]}getMessageArray(){return this._data}dispose(){}}class Uge{constructor(e,t,i){this._data=[e,t,i]}getMessageArray(){return this._data}dispose(){}}class Fge{constructor(e,t,i){this._data=[e,t,i]}getMessageArray(){return this._data}dispose(){}}class Bge{constructor(e,t,i){this._data=[e,t,i]}getMessageArray(){return this._data}dispose(){}}class Gge{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class Vge{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class jge{constructor(e,t,i){this._data=[e,t,i]}getMessageArray(){return this._data}dispose(){}}class zge{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class Hge{constructor(e,t,i,n){this._data=[e,t,i,n]}getMessageArray(){return this._data}dispose(){}}class Wge{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class Yge{constructor(e,t,i){this._data=[e,t,i]}getMessageArray(){return this._data}dispose(){}}class Xge{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class Kge{constructor(e,t,i,n){this._data=[e,t,i,n]}getMessageArray(){return this._data}dispose(){}}class qge{constructor(e,t,i){this._data=[e,t,i]}getMessageArray(){return this._data}dispose(){}}class $ge{constructor(e,t,i,n){this._data=[e,t,i,n]}getMessageArray(){return this._data}dispose(){}}class Qge{constructor(...e){this._data=[e.length],e.forEach(t=>{this._data.push(t.k),this._data.push(t._arg_2),this._data.push(t._arg_3)})}getMessageArray(){return this._data}dispose(){}}class Zge{constructor(e,t,i,n,r){this._data=[e,t,i,n,r]}getMessageArray(){return this._data}dispose(){}}class Jge{constructor(e,t,i,n){this._data=[e,t,n,i]}getMessageArray(){return this._data}dispose(){}}class epe{constructor(e,t,i){if(this._type=e,t.length===i.length){this._data=[];for(let n=0;n{this._data.push(t.dayIndex),this._data.push(t.stepIndex),this._data.push(t.giftIndex)})}dispose(){this._data=null}getMessageArray(){return this._data}}class MF{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}const I=class I{};I.ACHIEVEMENT_LIST=219,I.AUTHENTICATION=-1,I.BOT_CONFIGURATION=1986,I.BOT_PICKUP=3323,I.BOT_PLACE=1592,I.BOT_SKILL_SAVE=2624,I.GET_CLUB_OFFERS=3285,I.GET_CLUB_GIFT_INFO=487,I.GET_CATALOG_INDEX=1195,I.GET_CATALOG_PAGE=412,I.CATALOG_PURCHASE=3492,I.CATALOG_PURCHASE_GIFT=1411,I.GET_PRODUCT_OFFER=2594,I.CLIENT_LATENCY=295,I.CLIENT_LATENCY_MEASURE=96,I.CLIENT_POLICY=26979,I.CLIENT_PONG=2596,I.CLIENT_TOOLBAR_TOGGLE=2313,I.CLIENT_VARIABLES=1053,I.GET_CURRENT_TIMING_CODE=2912,I.DESKTOP_NEWS=1827,I.DESKTOP_VIEW=105,I.GET_BUNDLE_DISCOUNT_RULESET=223,I.EVENT_TRACKER=3457,I.FIND_NEW_FRIENDS=516,I.FURNITURE_ALIASES=3898,I.FURNITURE_FLOOR_UPDATE=248,I.FURNITURE_MULTISTATE=99,I.FURNITURE_PICKUP=3456,I.FURNITURE_PLACE=1258,I.FURNITURE_POSTIT_PLACE=2248,I.FURNITURE_POSTIT_SAVE_STICKY_POLE=3283,I.FURNITURE_RANDOMSTATE=3617,I.FURNITURE_WALL_MULTISTATE=210,I.FURNITURE_WALL_UPDATE=168,I.GAMES_INIT=2914,I.GAMES_LIST=741,I.ACCEPTGAMEINVITE=3802,I.GAMEUNLOADEDMESSAGE=3207,I.GETGAMEACHIEVEMENTSMESSAGE=2399,I.GETGAMESTATUSMESSAGE=3171,I.GETUSERGAMEACHIEVEMENTSMESSAGE=389,I.JOINQUEUEMESSAGE=1458,I.LEAVEQUEUEMESSAGE=2384,I.RESETRESOLUTIONACHIEVEMENTMESSAGE=3144,I.GETWEEKLYGAMEREWARDWINNERS=1054,I.GAME2GETACCOUNTGAMESTATUSMESSAGE=11,I.GAME2CHECKGAMEDIRECTORYSTATUSMESSAGE=3259,I.GAME2EXITGAMEMESSAGE=1445,I.GAME2GAMECHATMESSAGE=2502,I.GAME2LOADSTAGEREADYMESSAGE=2415,I.GAME2PLAYAGAINMESSAGE=3196,I.GAME2REQUESTFULLSTATUSUPDATEMESSAGE=1598,I.GAME2GETWEEKLYFRIENDSLEADERBOARD=1232,I.GAME2GETWEEKLYLEADERBOARD=2565,I.GET_GIFT_WRAPPING_CONFIG=418,I.GROUP_ADMIN_ADD=2894,I.GROUP_ADMIN_REMOVE=722,I.GROUP_CREATE_OPTIONS=798,I.GROUP_FAVORITE=3549,I.GET_FORUM_STATS=3149,I.GET_FORUM_THREADS=873,I.GET_FORUMS_LIST=436,I.GET_FORUM_MESSAGES=232,I.GET_FORUM_THREAD=3900,I.GET_UNREAD_FORUMS_COUNT=2908,I.FORUM_MODERATE_MESSAGE=286,I.FORUM_MODERATE_THREAD=1397,I.FORUM_POST_MESSAGE=3529,I.UPDATE_FORUM_READ_MARKER=1855,I.UPDATE_FORUM_SETTINGS=2214,I.FORUM_UPDATE_THREAD=3045,I.GROUP_INFO=2991,I.GROUP_DELETE=1134,I.GROUP_MEMBER_REMOVE_CONFIRM=3593,I.GROUP_MEMBER_REMOVE=593,I.GROUP_MEMBERS=312,I.GROUP_MEMBERSHIPS=367,I.GROUP_REQUEST=998,I.GROUP_REQUEST_ACCEPT=3386,I.GROUP_REQUEST_DECLINE=1894,I.GROUP_SETTINGS=1004,I.GROUP_PARTS=813,I.GROUP_BUY=230,I.GROUP_SAVE_INFORMATION=3137,I.GROUP_SAVE_BADGE=1991,I.GROUP_SAVE_COLORS=1764,I.GROUP_SAVE_PREFERENCES=3435,I.GROUP_BADGES=21,I.GROUP_UNBLOCK_MEMBER=2864,I.GET_BADGE_POINTS_LIMITS=1371,I.REQUESTABADGE=3077,I.GETISBADGEREQUESTFULFILLED=1364,I.ITEM_CLOTHING_REDEEM=3374,I.ITEM_COLOR_WHEEL_CLICK=2144,I.ITEM_DICE_CLICK=1990,I.ITEM_DICE_CLOSE=1533,I.ITEM_DIMMER_SAVE=1648,I.ITEM_DIMMER_SETTINGS=2813,I.ITEM_DIMMER_TOGGLE=2296,I.ITEM_EXCHANGE_REDEEM=3115,I.ITEM_PAINT=711,I.SET_OBJECT_DATA=3608,I.ITEM_STACK_HELPER=3839,I.ITEM_WALL_CLICK=210,I.ITEM_WALL_UPDATE=168,I.MARKETPLACE_CONFIG=2597,I.ACCEPT_FRIEND=137,I.MESSENGER_CHAT=3567,I.DECLINE_FRIEND=2890,I.FOLLOW_FRIEND=3997,I.MESSENGER_FRIENDS=1523,I.MESSENGER_INIT=2781,I.MESSENGER_RELATIONSHIPS=2138,I.SET_RELATIONSHIP_STATUS=3768,I.REMOVE_FRIEND=1689,I.REQUEST_FRIEND=3157,I.GET_FRIEND_REQUESTS=2448,I.SEND_ROOM_INVITE=1276,I.HABBO_SEARCH=1210,I.FRIEND_LIST_UPDATE=1419,I.MOD_TOOL_USER_INFO=3295,I.GET_USER_FLAT_CATS=3027,I.NAVIGATOR_INIT=2110,I.NAVIGATOR_SEARCH=249,I.NAVIGATOR_SEARCH_CLOSE=1834,I.NAVIGATOR_SEARCH_OPEN=637,I.NAVIGATOR_SEARCH_SAVE=2226,I.GET_USER_EVENT_CATS=1782,I.NAVIGATOR_SETTINGS_SAVE=3159,I.NAVIGATOR_CATEGORY_LIST_MODE=1202,I.NAVIGATOR_DELETE_SAVED_SEARCH=1954,I.PET_INFO=2934,I.PET_PICKUP=1581,I.PET_PLACE=2647,I.PET_RESPECT=3202,I.PET_RIDE=1036,I.PET_MOVE=3449,I.PET_OPEN_PACKAGE=3698,I.PET_SELECTED=549,I.PETS_BREED=1638,I.PET_CANCEL_BREEDING=2713,I.PET_CONFIRM_BREEDING=3382,I.GET_PET_TRAINING_PANEL=2161,I.RECYCLER_PRIZES=398,I.RECYCLER_STATUS=1342,I.RECYCLER_ITEMS=2771,I.RELEASE_VERSION=4e3,I.CALL_FOR_HELP=1691,I.ROOM_AMBASSADOR_ALERT=2996,I.ROOM_BAN_GIVE=1477,I.ROOM_BAN_LIST=2267,I.ROOM_BAN_REMOVE=992,I.ROOM_CREATE=2752,I.ROOM_DELETE=532,I.ROOM_DOORBELL=1644,I.ROOM_ENTER=2312,I.ROOM_FAVORITE=3817,I.ROOM_FAVORITE_REMOVE=309,I.CAN_CREATE_ROOM=2128,I.CANCEL_ROOM_EVENT=2725,I.EDIT_ROOM_EVENT=3991,I.COMPETITION_ROOM_SEARCH=433,I.FORWARD_TO_RANDOM_PROMOTED_ROOM=10,I.FORWARD_TO_SOME_ROOM=1703,I.GET_CATEGORIES_WITH_USER_COUNT=3782,I.GET_GUEST_ROOM=2230,I.GET_OFFICIAL_ROOMS=1229,I.GET_POPULAR_ROOM_TAGS=826,I.GUILD_BASE_SEARCH=2930,I.MY_FAVOURITE_ROOMS_SEARCH=2578,I.MY_FREQUENT_ROOM_HISTORY_SEARCH=1002,I.MY_FRIENDS_ROOM_SEARCH=2266,I.MY_GUILD_BASES_SEARCH=39,I.MY_RECOMMENDED_ROOMS=2537,I.MY_ROOM_HISTORY_SEARCH=2264,I.MY_ROOM_RIGHTS_SEARCH=272,I.MY_ROOMS_SEARCH=2277,I.POPULAR_ROOMS_SEARCH=2758,I.ROOM_AD_EVENT_TAB_CLICKED=2412,I.ROOM_AD_EVENT_TAB_VIEWED=2668,I.ROOM_AD_SEARCH=2809,I.ROOM_TEXT_SEARCH=3943,I.ROOMS_WHERE_MY_FRIENDS_ARE=1786,I.ROOMS_WITH_HIGHEST_SCORE_SEARCH=2939,I.SET_ROOM_SESSION_TAGS=3305,I.UPDATE_ROOM_THUMBNAIL=2468,I.ROOM_KICK=1320,I.ROOM_LIKE=3582,I.ROOM_MODEL=2300,I.GET_OCCUPIED_TILES=1687,I.GET_ROOM_ENTRY_TILE=3559,I.ROOM_MODEL_SAVE=875,I.ROOM_MUTE=3637,I.ROOM_MUTE_USER=3485,I.ROOM_RIGHTS_GIVE=808,I.ROOM_RIGHTS_LIST=3385,I.ROOM_RIGHTS_REMOVE=2064,I.ROOM_RIGHTS_REMOVE_ALL=2683,I.ROOM_RIGHTS_REMOVE_OWN=3182,I.ROOM_SETTINGS=3129,I.ROOM_SETTINGS_SAVE=1969,I.ROOM_SETTINGS_UPDATE_ROOM_CATEGORY_AND_TRADE=1265,I.ROOM_STAFF_PICK=1918,I.ROOM_FILTER_WORDS=1911,I.ROOM_FILTER_WORDS_MODIFY=3001,I.MYSTERYBOXWAITINGCANCELEDMESSAGE=2012,I.MYSTERYBOX_OPEN_TROPHY=3074,I.SECURITY_MACHINE=2490,I.SECURITY_TICKET=2419,I.TRADE=1481,I.TRADE_ACCEPT=3863,I.TRADE_CANCEL=2341,I.TRADE_CLOSE=2551,I.TRADE_CONFIRM=2760,I.TRADE_ITEM=3107,I.TRADE_ITEM_REMOVE=3845,I.TRADE_ITEMS=1263,I.TRADE_UNACCEPT=1444,I.UNIT_ACTION=2456,I.UNIT_CHAT=1314,I.UNIT_CHAT_SHOUT=2085,I.UNIT_CHAT_WHISPER=1543,I.UNIT_DANCE=2080,I.UNIT_DROP_HAND_ITEM=2814,I.UNIT_GIVE_HANDITEM=2941,I.UNIT_LOOK=3301,I.UNIT_POSTURE=2235,I.UNIT_SIGN=1975,I.UNIT_TYPING=1597,I.UNIT_TYPING_STOP=1474,I.UNIT_WALK=3320,I.USER_BADGES=2769,I.USER_BADGES_CURRENT=2091,I.USER_BADGES_CURRENT_UPDATE=644,I.USER_BOTS=3848,I.USER_CURRENCY=273,I.USER_EFFECT_ACTIVATE=2959,I.USER_EFFECT_ENABLE=1752,I.USER_FIGURE=2730,I.USER_FURNITURE=3150,I.REQUESTFURNIINVENTORYWHENNOTINROOM=3500,I.USER_HOME_ROOM=1740,I.USER_INFO=357,I.USER_MOTTO=2228,I.USER_IGNORED=3878,I.USER_PETS=3095,I.USER_PROFILE=3265,I.USER_PROFILE_BY_NAME=2249,I.USER_RESPECT=2694,I.GET_SOUND_SETTINGS=2388,I.USER_SETTINGS_CAMERA=1461,I.USER_SETTINGS_CHAT_STYLE=1030,I.USER_SETTINGS_INFOSTAND_BACKGROUND=1031,I.USER_SETTINGS_INVITES=1086,I.USER_SETTINGS_OLD_CHAT=1262,I.USER_SETTINGS_VOLUME=1367,I.USER_SUBSCRIPTION=3166,I.GET_WARDROBE=2742,I.SAVE_WARDROBE_OUTFIT=800,I.USER_TAGS=17,I.PEER_USERS_CLASSIFICATION=1160,I.USER_CLASSIFICATION=2285,I.VISIT_USER=2970,I.WIRED_ACTION_SAVE=2281,I.WIRED_APPLY_SNAPSHOT=3373,I.WIRED_CONDITION_SAVE=3203,I.WIRED_OPEN=768,I.WIRED_TRIGGER_SAVE=1520,I.GET_ITEM_DATA=3964,I.ONE_WAY_DOOR_CLICK=2765,I.REMOVE_WALL_ITEM=3336,I.SET_ITEM_DATA=3666,I.CATALOG_REDEEM_VOUCHER=339,I.ROOM_TONER_APPLY=2880,I.FRIEND_FURNI_CONFIRM_LOCK=3775,I.MANNEQUIN_SAVE_NAME=2850,I.MANNEQUIN_SAVE_LOOK=2209,I.PRESENT_OPEN_PRESENT=3558,I.CATALOG_SELECT_VIP_GIFT=2276,I.USER_IGNORE_ID=3314,I.USER_IGNORE=1117,I.USER_UNIGNORE=2061,I.MODTOOL_REQUEST_ROOM_INFO=707,I.MODTOOL_CHANGE_ROOM_SETTINGS=3260,I.MODTOOL_REQUEST_USER_CHATLOG=1391,I.MODTOOL_REQUEST_ROOM_CHATLOG=2587,I.MODTOOL_SANCTION_ALERT=229,I.MODTOOL_SANCTION_BAN=2766,I.MODTOOL_SANCTION_KICK=2582,I.MODTOOL_SANCTION_TRADELOCK=3742,I.MODTOOL_ALERTEVENT=1840,I.MODTOOL_SANCTION_MUTE=1945,I.MODTOOL_REQUEST_USER_ROOMS=3526,I.MODTOOL_ROOM_ALERT=3842,I.MODTOOL_PREFERENCES=31,I.CLOSE_ISSUE_DEFAULT_ACTION=2717,I.CLOSE_ISSUES=2067,I.DEFAULT_SANCTION=1681,I.GET_CFH_CHATLOG=211,I.MODTOOL_SANCTION=1392,I.PICK_ISSUES=15,I.RELEASE_ISSUES=1572,I.CONVERT_GLOBAL_ROOM_ID=314,I.REQUEST_SELL_ITEM=848,I.REQUEST_MARKETPLACE_ITEM_STATS=3288,I.MARKETPLACE_SELL_ITEM=3447,I.MARKETPLACE_REQUEST_OWN_ITEMS=2105,I.MARKETPLACE_TAKE_BACK_ITEM=434,I.MARKETPLACE_REDEEM_CREDITS=2650,I.MARKETPLACE_REQUEST_OFFERS=2407,I.MARKETPLACE_BUY_OFFER=1603,I.MARKETPLACE_BUY_TOKENS=1866,I.CATALOG_REQUESET_PET_BREEDS=1756,I.APPROVE_NAME=2109,I.UNIT_GIVE_HANDITEM_PET=2768,I.PET_MOUNT=1036,I.PET_SUPPLEMENT=749,I.FURNITURE_GROUP_INFO=2651,I.ACHIEVEMENT_RESOLUTION_OPEN=359,I.USE_PET_PRODUCT=1328,I.REMOVE_PET_SADDLE=186,I.TOGGLE_PET_RIDING=1472,I.TOGGLE_PET_BREEDING=3379,I.UNSEEN_RESET_CATEGORY=3493,I.UNSEEN_RESET_ITEMS=2343,I.COMMUNITY_GOAL_VOTE_COMPOSER=3536,I.GET_PROMO_ARTICLES=1827,I.ACCEPT_QUEST=3604,I.ACTIVATE_QUEST=793,I.CANCEL_QUEST=3133,I.FRIEND_REQUEST_QUEST_COMPLETE=1148,I.GET_COMMUNITY_GOAL_EARNED_PRIZES=2688,I.GET_COMMUNITY_GOAL_HALL_OF_FAME=2167,I.GET_COMMUNITY_GOAL_PROGRESS=1145,I.GET_CONCURRENT_USERS_GOAL_PROGRESS=1343,I.GET_CONCURRENT_USERS_REWARD=3872,I.GET_DAILY_QUEST=2486,I.GET_QUESTS=3333,I.GET_SEASONAL_QUESTS_ONLY=1190,I.OPEN_QUEST_TRACKER=2750,I.REDEEM_COMMUNITY_GOAL_PRIZE=90,I.REJECT_QUEST=2397,I.START_CAMPAIGN=1697,I.GET_BONUS_RARE_INFO=957,I.CRAFT=3591,I.CRAFT_SECRET=1251,I.GET_CRAFTABLE_PRODUCTS=633,I.GET_CRAFTING_RECIPE=1173,I.GET_CRAFTING_RECIPES_AVAILABLE=3086,I.PHOTO_COMPETITION=3959,I.PUBLISH_PHOTO=2068,I.PURCHASE_PHOTO=2408,I.RENDER_ROOM=3226,I.RENDER_ROOM_THUMBNAIL=1982,I.REQUEST_CAMERA_CONFIGURATION=796,I.ADD_JUKEBOX_DISK=753,I.GET_JUKEBOX_PLAYLIST=1435,I.GET_NOW_PLAYING=1325,I.GET_OFFICIAL_SONG_ID=3189,I.GET_SONG_INFO=3082,I.GET_SOUND_MACHINE_PLAYLIST=3498,I.GET_USER_SONG_DISKS=2304,I.REMOVE_JUKEBOX_DISK=3050,I.INTERSTITIAL_SHOWN=1109,I.GET_INTERSTITIAL=2519,I.CHANGE_USERNAME=2977,I.CHECK_USERNAME=3950,I.OPEN_CAMPAIGN_CALENDAR_DOOR_STAFF=3889,I.OPEN_CAMPAIGN_CALENDAR_DOOR=2257,I.BUILDERS_CLUB_PLACE_ROOM_ITEM=1051,I.BUILDERS_CLUB_PLACE_WALL_ITEM=462,I.BUILDERS_CLUB_QUERY_FURNI_COUNT=2529,I.GET_CATALOG_PAGE_EXPIRATION=742,I.GET_CATALOG_PAGE_WITH_EARLIEST_EXP=3135,I.GET_DIRECT_CLUB_BUY_AVAILABLE=801,I.GET_HABBO_BASIC_MEMBERSHIP_EXTEND_OFFER=603,I.GET_HABBO_CLUB_EXTEND_OFFER=2462,I.GET_IS_OFFER_GIFTABLE=1347,I.GET_LIMITED_OFFER_APPEARING_NEXT=410,I.GET_NEXT_TARGETED_OFFER=596,I.GET_ROOM_AD_PURCHASE_INFO=1075,I.GET_SEASONAL_CALENDAR_DAILY_OFFER=3257,I.GET_TARGETED_OFFER=2487,I.MARK_CATALOG_NEW_ADDITIONS_PAGE_OPENED=2150,I.PURCHASE_BASIC_MEMBERSHIP_EXTENSION=2735,I.PURCHASE_ROOM_AD=777,I.PURCHASE_TARGETED_OFFER=1826,I.PURCHASE_VIP_MEMBERSHIP_EXTENSION=3407,I.ROOM_AD_PURCHASE_INITIATED=2283,I.SET_TARGETTED_OFFER_STATE=2041,I.SHOP_TARGETED_OFFER_VIEWED=3483,I.HELPER_TALENT_TRACK=196,I.TALENT_TRACK_GET_LEVEL=2127,I.FORWARD_TO_A_COMPETITION_ROOM=172,I.FORWARD_TO_A_SUBMITTABLE_ROOM=1450,I.FORWARD_TO_RANDOM_COMPETITION_ROOM=865,I.GET_IS_USER_PART_OF_COMPETITION=2077,I.GET_SECONDS_UNTIL=271,I.ROOM_COMPETITION_INIT=1334,I.SUBMIT_ROOM_TO_COMPETITION=2595,I.VOTE_FOR_ROOM=143,I.GET_GIFT=2436,I.RESET_PHONE_NUMBER_STATE=2741,I.SET_PHONE_NUMBER_VERIFICATION_STATUS=1379,I.TRY_PHONE_NUMBER=790,I.VERIFY_CODE=2721,I.CONTROL_YOUTUBE_DISPLAY_PLAYBACK=3005,I.GET_YOUTUBE_DISPLAY_STATUS=336,I.SET_YOUTUBE_DISPLAY_PLAYLIST=2069,I.GO_TO_FLAT=685,I.CHANGE_QUEUE=3093,I.CALL_FOR_HELP_FROM_FORUM_MESSAGE=1412,I.CALL_FOR_HELP_FROM_FORUM_THREAD=534,I.CALL_FOR_HELP_FROM_IM=2950,I.CALL_FOR_HELP_FROM_PHOTO=2492,I.CALL_FOR_HELP_FROM_SELFIE=2755,I.CHAT_REVIEW_GUIDE_DECIDES=3365,I.CHAT_REVIEW_GUIDE_DETACHED=2501,I.CHAT_REVIEW_GUIDE_VOTE=3961,I.CHAT_REVIEW_SESSION_CREATE=3060,I.DELETE_PENDING_CALLS_FOR_HELP=3605,I.GET_CFH_STATUS=2746,I.GET_FAQ_CATEGORY=3445,I.GET_FAQ_TEXT=1849,I.GET_GUIDE_REPORTING_STATUS=3786,I.GET_PENDING_CALLS_FOR_HELP=3267,I.GET_QUIZ_QUESTIONS=1296,I.GUIDE_SESSION_CREATE=3338,I.GUIDE_SESSION_FEEDBACK=477,I.GUIDE_SESSION_GET_REQUESTER_ROOM=1052,I.GUIDE_SESSION_GUIDE_DECIDES=1424,I.GUIDE_SESSION_INVITE_REQUESTER=234,I.GUIDE_SESSION_IS_TYPING=519,I.GUIDE_SESSION_MESSAGE=3899,I.GUIDE_SESSION_ON_DUTY_UPDATE=1922,I.GUIDE_SESSION_REPORT=3969,I.GUIDE_SESSION_REQUESTER_CANCELS=291,I.GUIDE_SESSION_RESOLVED=887,I.POST_QUIZ_ANSWERS=3720,I.SEARCH_FAQS=2031,I.POLL_ANSWER=3505,I.POLL_REJECT=1773,I.POLL_START=109,I.DISCONNECT=2445,I.SCR_GET_KICKBACK_INFO=869,I.COMPOST_PLANT=3835,I.HARVEST_PET=1521,I.SET_CLOTHING_CHANGE_DATA=924,I.GROUP_UNFAVORITE=1820,I.NEW_USER_EXPERIENCE_GET_GIFTS=1822,I.NEW_USER_EXPERIENCE_SCRIPT_PROCEED=1299,I.HANDSHAKE_INIT_DIFFIE=3110,I.HANDSHAKE_COMPLETE_DIFFIE=773,I.WELCOME_OPEN_GIFT=2638,I.WELCOME_GIFT_CHANGE_EMAIL=66,I.EMAIL_GET_STATUS=2557,I.EMAIL_CHANGE=3965,I.APPROVE_ALL_MEMBERSHIP_REQUESTS=882,I.RENTABLE_SPACE_CANCEL_RENT=1667,I.RENTABLE_SPACE_RENT=2946,I.RENTABLE_SPACE_STATUS=872,I.TRACKING_PERFORMANCE_LOG=3230,I.TRACKING_LAG_WARNING_REPORT=3847,I.ROOM_DIRECTORY_ROOM_NETWORK_OPEN_CONNECTION=3736,I.RENTABLE_EXTEND_RENT_OR_BUYOUT_STRIP_ITEM=2115,I.RENTABLE_EXTEND_RENT_OR_BUYOUT_FURNI=1071,I.RENTABLE_GET_RENT_OR_BUYOUT_OFFER=2518,I.FURNITURE_PICKUP_ALL=10017,I.DELETE_ITEM=10018,I.FURNITURE_FLOOR_POSITION_UPDATE=10019;let S=I;class NF{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class Ib{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class PF{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class Mve{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class kF{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class xF{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class DF{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class LF{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class UF{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class FF{constructor(e,t,i){this._data=[e,t,i.length,...i]}getMessageArray(){return this._data}dispose(){}}class BF{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class GF{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class Nve{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class Pve{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class kve{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class xve{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class Dve{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class Lve{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class Uve{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class Fve{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class Bve{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class Gve{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class Vve{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class jve{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class zve{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class Hve{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class Wve{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class Yve{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class Xve{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class Kve{constructor(...e){this._data=[e.length],e.forEach(t=>{this._data.push(t.itemId)})}getMessageArray(){return this._data}dispose(){}}class VF{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class jF{constructor(e,t=null){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class qve{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class zF{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class HF{constructor(e,t=0,i){this._data=[e,t,i]}getMessageArray(){return this._data}dispose(){}}class $ve{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class WF{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class YF{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class XF{constructor(e,t,i=0){this._data=[e,i,t]}getMessageArray(){return this._data}dispose(){}}class KF{constructor(...e){this._data=[e.length,...e]}getMessageArray(){return this._data}dispose(){}}class Qve{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class Zve{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class Jve{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class e1e{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class t1e{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class i1e{constructor(e,t,i,n,r,a,o,l,u,c,h,f,d,_,g,p,m,v,E,y,T,w,C,N){this._data=[],this._data.push(e,t,i,n,r,a,o),this._data.push(u.length,...u),this._data.push(c,h,f,d,_,g,p,m,v,E,y,T,w,C,N)}getMessageArray(){return this._data}dispose(){}}class qF{constructor(e,t,i){this._data=[e,t,i]}getMessageArray(){return this._data}dispose(){}}class $F{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class s1e{constructor(e,t,i){this._data=[e,t,i]}getMessageArray(){return this._data}dispose(){}}class QF{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class ZF extends QF{constructor(e){super(e)}}class JF{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class e6 extends QF{constructor(e){super(e)}}class Rb{constructor(e,t,i,n){this._data=[e,t,i,n]}getMessageArray(){return this._data}dispose(){}}class t6{constructor(e,t,i){this._data=[e,t,i]}getMessageArray(){return this._data}dispose(){}}class i6{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class s6{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class n6{constructor(e,t,i=""){this._data=[e,t,i]}getMessageArray(){return this._data}dispose(){}}class r6{constructor(e,t,i){this._data=[e,t,i]}getMessageArray(){return this._data}dispose(){}}class a6{constructor(e,t){this._data=[e,t.size*2];for(const[i,n]of t.entries())this._data.push(i,n)}getMessageArray(){return this._data}dispose(){}}class n1e{constructor(e,t,i,n){this._data=[e,t,i,n]}getMessageArray(){return this._data}dispose(){}}class o6{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class l6{constructor(e,t,i,n,r){this._data=[e,t,i,n,r]}getMessageArray(){return this._data}dispose(){}}class u6{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class r1e{constructor(e,t,i){this._data=[e,t,i]}getMessageArray(){return this._data}dispose(){}}class a1e{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class Sb{constructor(e,t,i,n){this._data=[e,t,i,n]}getMessageArray(){return this._data}dispose(){}}class o1e{constructor(e,t,i,n,r){this._data=[e,t,i,n,r]}getMessageArray(){return this._data}dispose(){}}class h6{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class c6{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class l1e{constructor(...e){this._data=[e.length,...e]}getMessageArray(){return this._data}dispose(){}}class f6{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class d6{constructor(e,t,i,n,r,a){this._itemId=e,this._category=t,this._wallLocation=i,this._x=n,this._y=r,this._direction=a}getMessageArray(){switch(this._category){case U.FLOOR:return[`${this._itemId} ${this._x} ${this._y} ${this._direction}`];case U.WALL:return[`${this._itemId} ${this._wallLocation} `];default:return[]}}dispose(){}}class u1e{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class _6{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class h1e{constructor(e,t,i){this._data=[e,t,i]}getMessageArray(){return this._data}dispose(){}}class g6{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class p6{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class m6{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class c1e{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class Bw{constructor(e,t=0){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class v6{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class E6{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class f1e{constructor(e,t=-100){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class y6{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class d1e{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class _1e{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class g1e{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class T6{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class p1e{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class I6{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class m1e{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class v1e{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class E1e{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class y1e{constructor(e,t,i,n){this._data=[e,t,i,n]}getMessageArray(){return this._data}dispose(){}}class R6{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class T1e{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class I1e{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class R1e{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class S1e{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class bb{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class b1e{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class A1e{constructor(e,t,i,n,r,a,o){this._data=[e,t,i,n,r,a,o]}getMessageArray(){return this._data}dispose(){}}class O1e{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class S6{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class b6{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class Gw{constructor(e,t=0,i=""){this._data=[e,t,i]}getMessageArray(){return this._data}dispose(){}}class A6{constructor(e,t,i){this._data=[e,t,i]}getMessageArray(){return this._data}dispose(){}}class w1e{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class O6{constructor(e,t,i){this._data=[e+" "+t,i]}getMessageArray(){return this._data}dispose(){}}class w6{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class C6{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class M6{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class N6{constructor(e,t,i){this._data=[e,t,i]}getMessageArray(){return this._data}dispose(){}}class P6{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class C1e{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class M1e{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class N1e{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class k6{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class x6{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class D6{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class L6{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}const Jd=class Jd{constructor(e,t,i){this._data=[e,t,i]}getMessageArray(){return this._data}dispose(){}};Jd.STATE_START=0,Jd.STATE_CANCEL=1,Jd.STATE_ACCEPT=2;let Ab=Jd;class P1e{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class k1e{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class x1e{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class D1e{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class L1e{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class U1e{constructor(e,t,i,n,r,a){this._data=[e,t.length,...t,i,n.length,...n,r,a]}getMessageArray(){return this._data}dispose(){}}class F1e{constructor(e,t,i,n,r){this._data=[e,t.length,...t,i,n.length,...n,r]}getMessageArray(){return this._data}dispose(){}}class B1e{constructor(e,t,i,n,r){this._data=[e,t.length,...t,i,n.length,...n,r]}getMessageArray(){return this._data}dispose(){}}class G1e{constructor(e,t,i){this._data=[e,t,i]}getMessageArray(){return this._data}dispose(){}}class V1e{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class U6{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class F6{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class j1e{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class B6{constructor(...e){this._data=[e.length].concat(e)}getMessageArray(){return this._data}dispose(){}}class z1e{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class H1e{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class G6{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class W1e{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class Y1e{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class X1e{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class K1e{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class q1e{constructor(e,t,i,n,r,a,o,l,u,c,h){this._data=[e,t,i,n,r,a,o,l,u,c,h]}getMessageArray(){return this._data}dispose(){}}class $1e{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class Q1e{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class Z1e{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class J1e{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class V6{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class j6{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class z6{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class H6{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class W6{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class Y6{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class eEe{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class X6{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class tEe{constructor(e,t=!0){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class iEe{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class sEe{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class K6{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class nEe{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class rEe{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class aEe{constructor(){this._data=[]}getMessageArray(){return this._data}dispose(){}}class oEe{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class lEe{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class uEe{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class hEe{constructor(e,t,i){this._data=[e,t,i]}getMessageArray(){return this._data}dispose(){}}class cEe{constructor(e,t){this._data=[e,t]}getMessageArray(){return this._data}dispose(){}}class q6{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class fEe{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class $6{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}class Q6{constructor(e){this._data=[e]}getMessageArray(){return this._data}dispose(){}}var Z6={exports:{}};(function(s,e){(function(t,i){s.exports=i()})(Zi,function(){return function(t){var i={};function n(r){if(i[r])return i[r].exports;var a=i[r]={i:r,l:!1,exports:{}};return t[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=t,n.c=i,n.d=function(r,a,o){n.o(r,a)||Object.defineProperty(r,a,{enumerable:!0,get:o})},n.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,a){if(1&a&&(r=n(r)),8&a||4&a&&typeof r=="object"&&r&&r.__esModule)return r;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:r}),2&a&&typeof r!="string")for(var l in r)n.d(o,l,(function(u){return r[u]}).bind(null,l));return o},n.n=function(r){var a=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(a,"a",a),a},n.o=function(r,a){return Object.prototype.hasOwnProperty.call(r,a)},n.p="",n(n.s=0)}([function(t,i,n){var r,a,o=n(1)(),l=n(3),u=n(4),c=n(6),h=function(){var f=new u;return r=f.getResult(),a=new c,this};h.prototype={getSoftwareVersion:function(){return"0.1.11"},getBrowserData:function(){return r},getFingerprint:function(){var f="|",d=r.ua,_=this.getScreenPrint(),g=this.getPlugins(),p=this.getFonts(),m=this.isLocalStorage(),v=this.isSessionStorage(),E=this.getTimeZone(),y=this.getLanguage(),T=this.getSystemLanguage(),w=this.isCookie(),C=this.getCanvasPrint();return l(d+f+_+f+g+f+p+f+m+f+v+f+E+f+y+f+T+f+w+f+C,256)},getCustomFingerprint:function(){for(var f="|",d="",_=0;_>>16)*h&65535)<<16)&4294967295)<<15|d>>>17))*f+(((d>>>16)*f&65535)<<16)&4294967295)<<13|u>>>19))+((5*(u>>>16)&65535)<<16)&4294967295))+((58964+(c>>>16)&65535)<<16);switch(d=0,o){case 3:d^=(255&r.charCodeAt(_+2))<<16;case 2:d^=(255&r.charCodeAt(_+1))<<8;case 1:u^=d=(65535&(d=(d=(65535&(d^=255&r.charCodeAt(_)))*h+(((d>>>16)*h&65535)<<16)&4294967295)<<15|d>>>17))*f+(((d>>>16)*f&65535)<<16)&4294967295}return u^=r.length,u=2246822507*(65535&(u^=u>>>16))+((2246822507*(u>>>16)&65535)<<16)&4294967295,u=3266489909*(65535&(u^=u>>>13))+((3266489909*(u>>>16)&65535)<<16)&4294967295,(u^=u>>>16)>>>0}},function(t,i,n){var r;(function(a,o){var l="function",u="undefined",c="object",h="string",f="model",d="name",_="type",g="vendor",p="version",m="architecture",v="console",E="mobile",y="tablet",T="smarttv",w="wearable",C="embedded",N="Amazon",P="Apple",k="ASUS",L="BlackBerry",j="Firefox",z="Google",ne="Huawei",G="LG",Y="Microsoft",K="Motorola",H="Opera",J="Samsung",B="Sony",$="Xiaomi",fe="Zebra",xe="Facebook",me=function(Ue){var st={};for(var ot in Ue)st[Ue[ot].toUpperCase()]=Ue[ot];return st},De=function(Ue,st){return typeof Ue===h&&we(st).indexOf(we(Ue))!==-1},we=function(Ue){return Ue.toLowerCase()},it=function(Ue,st){if(typeof Ue===h)return Ue=Ue.replace(/^\s\s*/,"").replace(/\s\s*$/,""),typeof st===u?Ue:Ue.substring(0,255)},at=function(Ue,st){for(var ot,Hi,Ge,ke,Gs,hi,gl=0;gl0?ke.length==2?typeof ke[1]==l?this[ke[0]]=ke[1].call(this,hi):this[ke[0]]=ke[1]:ke.length==3?typeof ke[1]!==l||ke[1].exec&&ke[1].test?this[ke[0]]=hi?hi.replace(ke[1],ke[2]):o:this[ke[0]]=hi?ke[1].call(this,hi,ke[2]):o:ke.length==4&&(this[ke[0]]=hi?ke[3].call(this,hi.replace(ke[1],ke[2])):o):this[ke]=hi||o;gl+=2}},bt=function(Ue,st){for(var ot in st)if(typeof st[ot]===c&&st[ot].length>0){for(var Hi=0;Hi255?it(Ge,255):Ge,this},this.setUA(ot),this};Qe.VERSION="0.7.30",Qe.BROWSER=me([d,p,"major"]),Qe.CPU=me([m]),Qe.DEVICE=me([f,g,_,v,E,T,y,w,C]),Qe.ENGINE=Qe.OS=me([d,p]),typeof i!==u?(typeof t!==u&&t.exports&&(i=t.exports=Qe),i.UAParser=Qe):n(5)?(r=(function(){return Qe}).call(i,n,i,t))===o||(t.exports=r):typeof a!==u&&(a.UAParser=Qe);var gt=typeof a!==u&&(a.jQuery||a.Zepto);if(gt&&!gt.ua){var ki=new Qe;gt.ua=ki.getResult(),gt.ua.get=function(){return ki.getUA()},gt.ua.set=function(Ue){ki.setUA(Ue);var st=ki.getResult();for(var ot in st)gt.ua[ot]=st[ot]}}})(typeof window=="object"?window:this)},function(t,i){(function(n){t.exports=n}).call(this,{})},function(t,i){t.exports=function(){var n=["monospace","sans-serif","serif"],r=document.getElementsByTagName("body")[0],a=document.createElement("span");a.style.fontSize="72px",a.innerHTML="mmmmmmmmmmlli";var o={},l={};for(var u in n)a.style.fontFamily=n[u],r.appendChild(a),o[n[u]]=a.offsetWidth,l[n[u]]=a.offsetHeight,r.removeChild(a);this.detect=function(c){var h=!1;for(var f in n){a.style.fontFamily=c+","+n[f],r.appendChild(a);var d=a.offsetWidth!=o[n[f]]||a.offsetHeight!=l[n[f]];r.removeChild(a),h=h||d}return h}}}])})})(Z6);var dEe=Z6.exports;class _Ee extends Yr{constructor(e){super(),this._communication=e,this._handShaking=!1,this._didConnect=!1,this._pongInterval=null,this.onConnectionOpenedEvent=this.onConnectionOpenedEvent.bind(this),this.onConnectionClosedEvent=this.onConnectionClosedEvent.bind(this),this.onConnectionErrorEvent=this.onConnectionErrorEvent.bind(this),this.sendPong=this.sendPong.bind(this)}onInit(){const e=this._communication.connection;e&&(e.addEventListener(wi.CONNECTION_OPENED,this.onConnectionOpenedEvent),e.addEventListener(wi.CONNECTION_CLOSED,this.onConnectionClosedEvent),e.addEventListener(wi.CONNECTION_ERROR,this.onConnectionErrorEvent)),this._communication.registerMessageEvent(new b4(this.onClientPingEvent.bind(this))),this._communication.registerMessageEvent(new oF(this.onAuthenticatedEvent.bind(this)))}onDispose(){const e=this._communication.connection;e&&(e.removeEventListener(wi.CONNECTION_OPENED,this.onConnectionOpenedEvent),e.removeEventListener(wi.CONNECTION_CLOSED,this.onConnectionClosedEvent),e.removeEventListener(wi.CONNECTION_ERROR,this.onConnectionErrorEvent)),this._handShaking=!1,this.stopPonging(),super.onDispose()}onConnectionOpenedEvent(e){const t=this._communication.connection;t&&(this._didConnect=!0,this.dispatchCommunicationDemoEvent(bn.CONNECTION_ESTABLISHED,t),Te.getValue("system.pong.manually",!1)&&this.startPonging(),this.startHandshake(t),t.send(new bF(null,null,null,null)),this.tryAuthentication(t))}onConnectionClosedEvent(e){const t=this._communication.connection;t&&(this.stopPonging(),this._didConnect&&this.dispatchCommunicationDemoEvent(bn.CONNECTION_CLOSED,t))}onConnectionErrorEvent(e){const t=this._communication.connection;t&&(this.stopPonging(),this.dispatchCommunicationDemoEvent(bn.CONNECTION_ERROR,t))}getGpu(){const e=document.createElement("canvas");let t,i,n,r;try{if(t=e.getContext("webgl")||e.getContext("experimental-webgl"),i=t.getExtension("WEBGL_debug_renderer_info"),t===null||i===null)return""}catch{return""}return n=t.getParameter(i.UNMASKED_VENDOR_WEBGL),r=t.getParameter(i.UNMASKED_RENDERER_WEBGL),n+"|"+r}getMathResult(){let e;e="";try{return e=""+(Math.exp(10)+1/Math.exp(10))/2+"|"+Math.tan(-1e300)+"",e}catch{return"Error"}}getCanvas(){const e=document.createElement("canvas"),t=e.getContext("2d");new Date().toString();const i="ThiosIsVerrySeCuRe02938883721##@@@_moreStuff! | ${userAgent} | ${screenInfo} | ${currentDate}";t.textBaseline="top",t.font="16px 'Arial'",t.textBaseline="alphabetic",t.rotate(.05),t.fillStyle="#f60",t.fillRect(125,1,62,20),t.fillStyle="#069",t.fillText(i,2,15),t.fillStyle="rgba(102, 200, 0, 0.7)",t.fillText(i,4,17),t.shadowBlur=10,t.shadowColor="blue",t.fillRect(-20,10,234,5);const n=e.toDataURL();document.body.appendChild(e);let r=0;if(n.length===0)return"nothing!";for(let a=0;a{if(typeof e.data=="string"&&e.data.startsWith(eu.MESSAGE_KEY)){const{method:t,params:i}=JSON.parse(e.data.substr(eu.MESSAGE_KEY.length)),n=window[t];if(!n)return;n(...i);return}})),!0}static call(e,...t){if(window.top!==window&&window.top.postMessage(eu.MESSAGE_KEY+JSON.stringify({method:e,params:t}),"*"),!("FlashExternalInterface"in window))return;const i=window.FlashExternalInterface[e];return typeof i<"u"?i(...t):void 0}static callGame(e,...t){if(window.top!==window&&window.top.postMessage("Nitro_LegacyExternalGameInterface"+JSON.stringify({method:e,params:t}),"*"),!("FlashExternalGameInterface"in window))return;const i=window.FlashExternalGameInterface[e];return typeof i<"u"?i(...t):void 0}static addCallback(e,t){window[e]=t}};eu.MESSAGE_KEY="Nitro_LegacyExternalInterface",eu._isListeningForPostMessages=!1;let He=eu;class mEe{constructor(e){e.addMessageEvent(new O4(this.onLoadGameUrl.bind(this)))}onLoadGameUrl(e){if(!e)return;const t=e.getParser();t&&He.callGame("showGame",t.url)}}class hT{constructor(e){this._badgeId="",this._level=1,this._base="",this._badgeId=e,this.parseText()}parseText(){let e=this._badgeId.length-1;for(;e>0&&this.isNumber(this._badgeId.charAt(e));)e--;this._base=this._badgeId.substr(0,e+1);const t=this._badgeId.substr(e+1,this._badgeId.length);t&&t!==""&&(this._level=Number.parseInt(t))}isNumber(e){const t=e.charCodeAt(0);return t>=48&&t<=57}get level(){return this._level}set level(e){this._level=Math.max(1,e)}get getBadgeId(){return this._base+this._level}get base(){return this._base}}class vEe extends Yr{constructor(e){super(),this._communication=e,this._definitions=new Map,this._parameters=new Map,this._badgePointLimits=new Map,this._romanNumerals=["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII","XIII","XIV","XV","XVI","XVII","XVIII","XIX","XX","XXI","XXII","XXIII","XXIV","XXV","XXVI","XXVII","XXVIII","XXIX","XXX"],this._pendingUrls=[]}onInit(){this._communication.registerMessageEvent(new k4(this.onBadgePointLimitsEvent.bind(this)));let e=Te.getValue("external.texts.url");Array.isArray(e)||(e=[Te.getValue("external.texts.url")]);for(let t=0;tt.json()).then(t=>this.onLocalizationLoaded(t,e)).catch(t=>this.onLocalizationFailed(t))}onLocalizationLoaded(e,t){if(!e)return;if(!this.parseLocalization(e))throw new Error(`Invalid json data for file ${t}`);const i=this._pendingUrls.indexOf(t);i>=0&&this._pendingUrls.splice(i,1),this.loadNextLocalization()}onLocalizationFailed(e){this.events&&this.events.dispatchEvent(new wh(wh.FAILED))}parseLocalization(e){if(!e)return!1;for(const t in e)this._definitions.set(t,e[t]);return!0}onBadgePointLimitsEvent(e){const t=e.getParser();for(const i of t.data)this.setBadgePointLimit(i.badgeId,i.limit)}getBadgePointLimit(e){return this._badgePointLimits.get(e)||-1}setBadgePointLimit(e,t){this._badgePointLimits.set(e,t)}getRomanNumeral(e){return this._romanNumerals[Math.max(0,e-1)]}getPreviousLevelBadgeId(e){const t=new hT(e);return t.level--,t.getBadgeId}hasValue(e){return this._definitions.has(e)}getValue(e,t=!0){if(!e||!e.length)return null;const i=e.match(/\$\{.[^}]*\}/g);if(i&&i.length)for(const r of i)e=e.replace(r,this.getValue(r.slice(2,-1),t));let n=this._definitions.get(e)||null;if(!n&&(n=Te.definitions.get(e),n))return n;if(n&&t){const r=this._parameters.get(e);if(r)for(const[a,o]of r)n=n.replace("%"+a+"%",o)}return n||e}getValueWithParameter(e,t,i){const n=this.getValue(e,!1),r=n.replace("%"+t+"%",i);if(n.startsWith("%{")){const a=new RegExp("%{"+t.toUpperCase()+"\\|([^|]*)\\|([^|]*)\\|([^|]*)}"),o=n.match(a);if(!o)return r;let l=-1;switch(Number.parseInt(i)){case 0:l=1;break;case 1:l=2;break;default:case 2:l=3;break}if(l==-1||typeof o[l]>"u")return r;const c=o[l];if(c)return c.replace("%%",i)}return r}getValueWithParameters(e,t,i){let n=this.getValue(e,!1);if(t)for(let r=0;r"u")continue;const f=u[h];f&&(n=f.replace("%%",o))}}return n}setValue(e,t){this._definitions.set(e,t)}registerParameter(e,t,i){if(!e||e.length===0||!t||t.length===0)return;let n=this._parameters.get(e);n||(n=new Map,this._parameters.set(e,n)),n.set(t,i)}getBadgeName(e){const t=new hT(e),i=["badge_name_"+e,"badge_name_"+t.base];let n=this.fixBadLocalization(this.getExistingKey(i));return n=n.replace("%roman%",this.getRomanNumeral(t.level)),n}getBadgeDesc(e){const t=new hT(e),i=["badge_desc_"+e,"badge_desc_"+t.base];let n=this.fixBadLocalization(this.getExistingKey(i));const r=this.getBadgePointLimit(e);return r>-1&&(n=n.replace("%limit%",r.toString())),n=n.replace("%roman%",this.getRomanNumeral(t.level)),n}getExistingKey(e){for(const t of e){const i=this.getValue(t);if(i!=t)return i}return""}fixBadLocalization(e){return e.replace("${","$").replace("{","$").replace("}","$")}}/*! * @pixi/canvas-display - v6.5.10 * Compiled Thu, 06 Jul 2023 15:25:11 UTC * * @pixi/canvas-display is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license */Va.prototype._renderCanvas=function(e){};Va.prototype.renderCanvas=function(e){if(!(!this.visible||this.worldAlpha<=0||!this.renderable)){this._mask&&e.maskManager.pushMask(this._mask),this._renderCanvas(e);for(var t=0,i=this.children.length;t=2?i.multisample:Ut.NONE;if(a=this.renderer.generateTexture(e,{multisample:l}),l!==Ut.NONE){var u=Pi.create({width:a.width,height:a.height});i.framebuffer.bind(a.framebuffer),i.framebuffer.blit(u.framebuffer),i.framebuffer.bind(null),a.destroy(!0),a=u}o=!0}a?(n=a.baseTexture.resolution,t=t??a.frame,r=!1,i.renderTexture.bind(a)):(n=i.resolution,t||(t=EEe,t.width=i.width,t.height=i.height),r=!0,i.renderTexture.bind(null));var c=Math.round(t.width*n),h=Math.round(t.height*n),f=new Uint8Array(yEe*c*h),d=i.gl;return d.readPixels(Math.round(t.x*n),Math.round(t.y*n),c,h,d.RGBA,d.UNSIGNED_BYTE,f),o&&a.destroy(!0),{pixels:f,width:c,height:h,flipY:r}},s.prototype.destroy=function(){this.renderer=null},s.arrayPostDivide=function(e,t){for(var i=0;i=Math.PI*2?this.drawCircle(s,e,i).beginHole().drawCircle(s,e,t).endHole():(this.finishPoly(),this.arc(s,e,t,r,n,!0).arc(s,e,i,n,r,!1).finishPoly(),this)}function REe(s,e,t,i,n){if(n<=0)return this.drawRect(s,e,t,i);for(var r=Math.min(n,Math.min(t,i)/2),a=s+t,o=e+i,l=[s+r,e,a-r,e,a,e+r,a,o-r,a-r,o,s+r,o,s,o-r,s,e+r],u=l.length-1;u>=2;u-=2)l[u]===l[u-2]&&l[u-1]===l[u-3]&&l.splice(u-1,2);return this.drawPolygon(l)}function SEe(s,e,t,i,n){if(n===0)return this.drawRect(s,e,t,i);var r=Math.min(t,i)/2,a=Math.min(r,Math.max(-r,n)),o=s+t,l=e+i,u=a<0?-a:0,c=Math.abs(a);return this.moveTo(s,e+c).arcTo(s+u,e+u,s+c,e,c).lineTo(o-c,e).arcTo(o-u,e+u,o,e+c,c).lineTo(o,l-c).arcTo(o-u,l-u,s+t-c,l,c).lineTo(s+c,l).arcTo(s+u,l-u,s,l-c,c).closePath()}function bEe(s,e,t,i,n){n===void 0&&(n=0),i=Math.max(i|0,3);for(var r=-1*Math.PI/2+n,a=Math.PI*2/i,o=[],l=0;lthis.x&&e.y>this.y&&e.right=this.x&&e.y>=this.y&&e.right<=this.right&&e.bottom<=this.bottom};ve.prototype.equals=function(e){return e===this?!0:e&&this.x===e.x&&this.y===e.y&&this.width===e.width&&this.height===e.height};ve.prototype.intersection=function(e,t){t||(t=new ve);var i=this.xe.right?e.right:this.right;if(n<=i)return t.x=t.y=t.width=t.height=0,t;var r=this.ye.bottom?e.bottom:this.bottom;return a<=r?(t.x=t.y=t.width=t.height=0,t):(t.x=i,t.y=r,t.width=n-i,t.height=a-r,t)};ve.prototype.union=function(e,t){t||(t=new ve);var i=Math.min(this.x,e.x),n=Math.max(this.x+this.width,e.x+e.width),r=Math.min(this.y,e.y),a=Math.max(this.y+this.height,e.y+e.height);return t.x=i,t.y=r,t.width=n-i,t.height=a-r,t};/*! * @pixi/mixin-cache-as-bitmap - v6.5.10 * Compiled Thu, 06 Jul 2023 15:25:11 UTC * * @pixi/mixin-cache-as-bitmap is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license */var e5=new dt;_i.prototype._cacheAsBitmap=!1;_i.prototype._cacheData=null;_i.prototype._cacheAsBitmapResolution=null;_i.prototype._cacheAsBitmapMultisample=Ut.NONE;var MEe=function(){function s(){this.textureCacheId=null,this.originalRender=null,this.originalRenderCanvas=null,this.originalCalculateBounds=null,this.originalGetLocalBounds=null,this.originalUpdateTransform=null,this.originalDestroy=null,this.originalMask=null,this.originalFilterArea=null,this.originalContainsPoint=null,this.sprite=null}return s}();Object.defineProperties(_i.prototype,{cacheAsBitmapResolution:{get:function(){return this._cacheAsBitmapResolution},set:function(s){s!==this._cacheAsBitmapResolution&&(this._cacheAsBitmapResolution=s,this.cacheAsBitmap&&(this.cacheAsBitmap=!1,this.cacheAsBitmap=!0))}},cacheAsBitmapMultisample:{get:function(){return this._cacheAsBitmapMultisample},set:function(s){s!==this._cacheAsBitmapMultisample&&(this._cacheAsBitmapMultisample=s,this.cacheAsBitmap&&(this.cacheAsBitmap=!1,this.cacheAsBitmap=!0))}},cacheAsBitmap:{get:function(){return this._cacheAsBitmap},set:function(s){if(this._cacheAsBitmap!==s){this._cacheAsBitmap=s;var e;s?(this._cacheData||(this._cacheData=new MEe),e=this._cacheData,e.originalRender=this.render,e.originalRenderCanvas=this.renderCanvas,e.originalUpdateTransform=this.updateTransform,e.originalCalculateBounds=this.calculateBounds,e.originalGetLocalBounds=this.getLocalBounds,e.originalDestroy=this.destroy,e.originalContainsPoint=this.containsPoint,e.originalMask=this._mask,e.originalFilterArea=this.filterArea,this.render=this._renderCached,this.renderCanvas=this._renderCachedCanvas,this.destroy=this._cacheAsBitmapDestroy):(e=this._cacheData,e.sprite&&this._destroyCachedDisplayObject(),this.render=e.originalRender,this.renderCanvas=e.originalRenderCanvas,this.calculateBounds=e.originalCalculateBounds,this.getLocalBounds=e.originalGetLocalBounds,this.destroy=e.originalDestroy,this.updateTransform=e.originalUpdateTransform,this.containsPoint=e.originalContainsPoint,this._mask=e.originalMask,this.filterArea=e.originalFilterArea)}}}});_i.prototype._renderCached=function(e){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObject(e),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._render(e))};_i.prototype._initCachedDisplayObject=function(e){var t;if(!(this._cacheData&&this._cacheData.sprite)){var i=this.alpha;this.alpha=1,e.batch.flush();var n=this.getLocalBounds(null,!0).clone();if(this.filters&&this.filters.length){var r=this.filters[0].padding;n.pad(r)}n.ceil(de.RESOLUTION);var a=e.renderTexture.current,o=e.renderTexture.sourceFrame.clone(),l=e.renderTexture.destinationFrame.clone(),u=e.projection.transform,c=Pi.create({width:n.width,height:n.height,resolution:this.cacheAsBitmapResolution||e.resolution,multisample:(t=this.cacheAsBitmapMultisample)!==null&&t!==void 0?t:e.multisample}),h="cacheAsBitmap_"+Lu();this._cacheData.textureCacheId=h,pt.addToCache(c.baseTexture,h),Ne.addToCache(c,h);var f=this.transform.localTransform.copyTo(e5).invert().translate(-n.x,-n.y);this.render=this._cacheData.originalRender,e.render(this,{renderTexture:c,clear:!0,transform:f,skipUpdateTransform:!1}),e.framebuffer.blit(),e.projection.transform=u,e.renderTexture.bind(a,o,l),this.render=this._renderCached,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null,this.alpha=i;var d=new mt(c);d.transform.worldTransform=this.transform.worldTransform,d.anchor.x=-(n.x/n.width),d.anchor.y=-(n.y/n.height),d.alpha=i,d._bounds=this._bounds,this._cacheData.sprite=d,this.transform._parentID=-1,this.parent?this.updateTransform():(this.enableTempParent(),this.updateTransform(),this.disableTempParent(null)),this.containsPoint=d.containsPoint.bind(d)}};_i.prototype._renderCachedCanvas=function(e){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObjectCanvas(e),this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._renderCanvas(e))};_i.prototype._initCachedDisplayObjectCanvas=function(e){if(!(this._cacheData&&this._cacheData.sprite)){var t=this.getLocalBounds(null,!0),i=this.alpha;this.alpha=1;var n=e.context,r=e._projTransform;t.ceil(de.RESOLUTION);var a=Pi.create({width:t.width,height:t.height}),o="cacheAsBitmap_"+Lu();this._cacheData.textureCacheId=o,pt.addToCache(a.baseTexture,o),Ne.addToCache(a,o);var l=e5;this.transform.localTransform.copyTo(l),l.invert(),l.tx-=t.x,l.ty-=t.y,this.renderCanvas=this._cacheData.originalRenderCanvas,e.render(this,{renderTexture:a,clear:!0,transform:l,skipUpdateTransform:!1}),e.context=n,e._projTransform=r,this.renderCanvas=this._renderCachedCanvas,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null,this.alpha=i;var u=new mt(a);u.transform.worldTransform=this.transform.worldTransform,u.anchor.x=-(t.x/t.width),u.anchor.y=-(t.y/t.height),u.alpha=i,u._bounds=this._bounds,this._cacheData.sprite=u,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=e._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=u.containsPoint.bind(u)}};_i.prototype._calculateCachedBounds=function(){this._bounds.clear(),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite._calculateBounds(),this._bounds.updateID=this._boundsID};_i.prototype._getCachedLocalBounds=function(){return this._cacheData.sprite.getLocalBounds(null)};_i.prototype._destroyCachedDisplayObject=function(){this._cacheData.sprite._texture.destroy(!0),this._cacheData.sprite=null,pt.removeFromCache(this._cacheData.textureCacheId),Ne.removeFromCache(this._cacheData.textureCacheId),this._cacheData.textureCacheId=null};_i.prototype._cacheAsBitmapDestroy=function(e){this.cacheAsBitmap=!1,this.destroy(e)};/*! * @pixi/mixin-get-child-by-name - v6.5.10 * Compiled Thu, 06 Jul 2023 15:25:11 UTC * * @pixi/mixin-get-child-by-name is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license */_i.prototype.name=null;Va.prototype.getChildByName=function(e,t){for(var i=0,n=this.children.length;i"u"&&(typeof self<"u"?self.globalThis=self:typeof global<"u"&&(global.globalThis=global));globalThis.Promise||(globalThis.Promise=Yt);Object.assign||(Object.assign=zEe);var HEe=16;Date.now&&Date.prototype.getTime||(Date.now=function(){return new Date().getTime()});if(!(globalThis.performance&&globalThis.performance.now)){var WEe=Date.now();globalThis.performance||(globalThis.performance={}),globalThis.performance.now=function(){return Date.now()-WEe}}var cT=Date.now(),tk=["ms","moz","webkit","o"];for(var fT=0;fT0?1:-1});Number.isInteger||(Number.isInteger=function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e});globalThis.ArrayBuffer||(globalThis.ArrayBuffer=Array);globalThis.Float32Array||(globalThis.Float32Array=Array);globalThis.Uint32Array||(globalThis.Uint32Array=Array);globalThis.Uint16Array||(globalThis.Uint16Array=Array);globalThis.Uint8Array||(globalThis.Uint8Array=Array);globalThis.Int32Array||(globalThis.Int32Array=Array);/*! * @pixi/sprite-tiling - v6.5.10 * Compiled Thu, 06 Jul 2023 15:25:11 UTC * * @pixi/sprite-tiling is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license *//*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var Mb=function(s,e){return Mb=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])},Mb(s,e)};function r5(s,e){Mb(s,e);function t(){this.constructor=s}s.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var xf=new Q,YEe=function(s){r5(e,s);function e(t,i,n){i===void 0&&(i=100),n===void 0&&(n=100);var r=s.call(this,t)||this;return r.tileTransform=new AU,r._width=i,r._height=n,r.uvMatrix=r.texture.uvMatrix||new UU(t),r.pluginName="tilingSprite",r.uvRespectAnchor=!1,r}return Object.defineProperty(e.prototype,"clampMargin",{get:function(){return this.uvMatrix.clampMargin},set:function(t){this.uvMatrix.clampMargin=t,this.uvMatrix.update(!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tileScale",{get:function(){return this.tileTransform.scale},set:function(t){this.tileTransform.scale.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tilePosition",{get:function(){return this.tileTransform.position},set:function(t){this.tileTransform.position.copyFrom(t)},enumerable:!1,configurable:!0}),e.prototype._onTextureUpdate=function(){this.uvMatrix&&(this.uvMatrix.texture=this._texture),this._cachedTint=16777215},e.prototype._render=function(t){var i=this._texture;!i||!i.valid||(this.tileTransform.updateLocalTransform(),this.uvMatrix.update(),t.batch.setObjectRenderer(t.plugins[this.pluginName]),t.plugins[this.pluginName].render(this))},e.prototype._calculateBounds=function(){var t=this._width*-this._anchor._x,i=this._height*-this._anchor._y,n=this._width*(1-this._anchor._x),r=this._height*(1-this._anchor._y);this._bounds.addFrame(this.transform,t,i,n,r)},e.prototype.getLocalBounds=function(t){return this.children.length===0?(this._bounds.minX=this._width*-this._anchor._x,this._bounds.minY=this._height*-this._anchor._y,this._bounds.maxX=this._width*(1-this._anchor._x),this._bounds.maxY=this._height*(1-this._anchor._y),t||(this._localBoundsRect||(this._localBoundsRect=new ve),t=this._localBoundsRect),this._bounds.getRectangle(t)):s.prototype.getLocalBounds.call(this,t)},e.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,xf);var i=this._width,n=this._height,r=-i*this.anchor._x;if(xf.x>=r&&xf.x=a&&xf.y1?Pc.from(qEe,$Ee,i):Pc.from(ik,KEe,i)},e.prototype.render=function(t){var i=this.renderer,n=this.quad,r=n.vertices;r[0]=r[6]=t._width*-t.anchor.x,r[1]=r[3]=t._height*-t.anchor.y,r[2]=r[4]=t._width*(1-t.anchor.x),r[5]=r[7]=t._height*(1-t.anchor.y);var a=t.uvRespectAnchor?t.anchor.x:0,o=t.uvRespectAnchor?t.anchor.y:0;r=n.uvs,r[0]=r[6]=-a,r[1]=r[3]=-o,r[2]=r[4]=1-a,r[5]=r[7]=1-o,n.invalidate();var l=t._texture,u=l.baseTexture,c=u.alphaMode>0,h=t.tileTransform.localTransform,f=t.uvMatrix,d=u.isPowerOfTwo&&l.frame.width===u.width&&l.frame.height===u.height;d&&(u._glTextures[i.CONTEXT_UID]?d=u.wrapMode!==Pa.CLAMP:u.wrapMode===Pa.CLAMP&&(u.wrapMode=Pa.REPEAT));var _=d?this.simpleShader:this.shader,g=l.width,p=l.height,m=t._width,v=t._height;_p.set(h.a*g/m,h.b*g/v,h.c*p/m,h.d*p/v,h.tx/m,h.ty/v),_p.invert(),d?_p.prepend(f.mapCoord):(_.uniforms.uMapCoord=f.mapCoord.toArray(!0),_.uniforms.uClampFrame=f.uClampFrame,_.uniforms.uClampOffset=f.uClampOffset),_.uniforms.uTransform=_p.toArray(!0),_.uniforms.uColor=SX(t.tint,t.worldAlpha,_.uniforms.uColor,c),_.uniforms.translationMatrix=t.transform.worldTransform.toArray(!0),_.uniforms.uSampler=l,i.shader.bind(_),i.geometry.bind(n),this.state.blendMode=RX(t.blendMode,c),i.state.set(this.state),i.geometry.draw(this.renderer.gl.TRIANGLES,6,0)},e.extension={name:"tilingSprite",type:Ni.RendererPlugin},e}(Iw);Xa.add(jU,TEe,QEe,Sq,vq,wX);class sk{constructor(){this.id=0,this.data=null,this.image=null}getImage(){return this.image?this.image:this.data?St.generateImage(this.data):null}}const bE=class bE extends ui{constructor(e){super(null,null),this._type=e}get type(){return this._type}};bE.IMAGE_LOADED="ROAUM_IMAGE_LOADED",bE.IMAGE_LOADING_FAILED="ROAUM_IMAGE_FAILED";let ss=bE;class ti extends ui{constructor(){super(null,null)}}class a5 extends ti{constructor(e,t){super(),this._itemType=e,this._itemName=t}get itemType(){return this._itemType}get itemName(){return this._itemName}}class Vw extends ti{constructor(e=0){super(),this._numberOfWords=e}get numberOfWords(){return this._numberOfWords}}class o5 extends ti{constructor(e=0){super(),this._danceStyle=e}get danceStyle(){return this._danceStyle}}class l5 extends ti{constructor(e,t=0){super(),this._effect=e,this._delayMilliseconds=t}get effect(){return this._effect}get delayMilliseconds(){return this._delayMilliseconds}}class u5 extends ti{constructor(e){super(),this._gainedExperience=e}get gainedExperience(){return this._gainedExperience}}class h5 extends ti{constructor(e=0){super(),this._expressionType=e}get expressionType(){return this._expressionType}}class wv extends ti{constructor(e,t=null,i=null,n=!1){super(),this._figure=e,this._gender=t,this._subType=i,this._isRiding=n}get figure(){return this._figure}get gender(){return this._gender}get subType(){return this._subType}get isRiding(){return this._isRiding}}class c5 extends ti{constructor(e=0){super(),this._level=e}get level(){return this._level}}class f5 extends ti{constructor(e=0){super(),this._gesture=e}get gesture(){return this._gesture}}class ZEe extends ti{constructor(e){super(),this._guideStatus=e}get guideStatus(){return this._guideStatus}}class d5 extends ti{constructor(e=!1){super(),this._isMuted=e}get isMuted(){return this._isMuted}}class _5 extends ti{}class g5 extends ti{constructor(e){super(),this._gesture=e}get gesture(){return this._gesture}}class p5 extends ti{constructor(e){super(),this._value=e}get value(){return this._value}}class m5 extends ti{constructor(e){super(),this._isPlayingGame=e}get isPlayingGame(){return this._isPlayingGame}}class jw extends ti{constructor(e,t=""){super(),this._postureType=e,this._parameter=t}get postureType(){return this._postureType}get parameter(){return this._parameter}}class Cv extends ti{constructor(e){super(),this._selected=e}get selected(){return this._selected}}class v5 extends ti{constructor(e=0){super(),this._signType=e}get signType(){return this._signType}}class zw extends ti{constructor(e=!1){super(),this._isSleeping=e}get isSleeping(){return this._isSleeping}}class E5 extends ti{constructor(e=!1){super(),this._isTyping=e}get isTyping(){return this._isTyping}}class Xo extends ui{constructor(e,t,i,n=!1){super(e,i),this._targetLocation=t,this._isSlide=n}get targetLocation(){return this._targetLocation?this._targetLocation:this.location}get isSlide(){return this._isSlide}}class Mv extends Xo{constructor(e,t,i,n,r,a){super(e,t,i),this._headDirection=n,this._canStandUp=r,this._baseY=a}get headDirection(){return this._headDirection}get canStandUp(){return this._canStandUp}get baseY(){return this._baseY}}class y5 extends ti{constructor(e){super(),this._itemType=e}get itemType(){return this._itemType}}class ht extends ui{constructor(e,t,i=null){super(null,null),this._state=e,this._data=t,this._extra=i}get state(){return this._state}get data(){return this._data}get extra(){return this._extra}}const cC=class cC extends ui{constructor(e,t){super(null,null),this._badgeId=e,this._assetName=t}get badgeId(){return this._badgeId}get assetName(){return this._assetName}};cC.BADGE_LOADED="ROGBUM_BADGE_LOADED";let Gu=cC;class T5 extends ui{constructor(e,t,i){super(e,t),this._height=i}get height(){return this._height}}class Hw extends ui{constructor(e){super(null,null),this._data=e}get data(){return this._data}}class I5 extends ui{constructor(e,t){super(null,null),this._numberKey=e,this._numberValue=t}get numberKey(){return this._numberKey}get numberValue(){return this._numberValue}}const fC=class fC extends ui{constructor(e,t,i,n){super(null,null),this._type=e,this._color=t,this._light=i,this._backgroundOnly=n}get type(){return this._type}get color(){return this._color}get light(){return this._light}get backgroundOnly(){return this._backgroundOnly}};fC.BACKGROUND_COLOR="RORCUM_BACKGROUND_COLOR";let q_=fC;const AE=class AE extends ui{constructor(e,t,i=0,n=0,r=0,a=0){super(null,null),this._type=e,this._id=t,this._x=i,this._y=n,this._width=r,this._height=a}get type(){return this._type}get id(){return this._id}get x(){return this._x}get y(){return this._y}get width(){return this._width}get height(){return this._height}};AE.ADD="ORPFHUM_ADD",AE.REMOVE="ORPFHUM_REMOVE";let Oa=AE;const OE=class OE extends ui{constructor(e){super(null,null),this._type=OE.UPDATE_MAP,this._mapData=e}get type(){return this._type}get mapData(){return this._mapData}};OE.UPDATE_MAP="RORMUM_UPDATE_MAP";let Nv=OE;const tu=class tu extends ui{constructor(e,t,i=null,n=null,r="window"){super(null,null),this._type=e,this._maskId=t,this._maskType=i,this._maskLocation=n?new M(n.x,n.y,n.z):null,this._maskCategory=r}get type(){return this._type}get maskId(){return this._maskId}get maskType(){return this._maskType}get maskLocation(){return this._maskLocation}get maskCategory(){return this._maskCategory}};tu.ADD_MASK="RORMUM_ADD_MASK",tu.REMOVE_MASK="RORMUM_ADD_MASK",tu.DOOR="door",tu.WINDOW="window",tu.HOLE="hole";let $i=tu;const wE=class wE extends ui{constructor(e,t){super(null,null),this._type=e,this._value=t}get type(){return this._type}get value(){return this._value}};wE.WALL_THICKNESS="RORPPUM_WALL_THICKNESS",wE.FLOOR_THICKNESS="RORPVUM_FLOOR_THICKNESS";let wa=wE;const CE=class CE extends ui{constructor(e,t){super(null,null),this._type=e,this._visible=t}get type(){return this._type}get visible(){return this._visible}};CE.WALL_VISIBILITY="RORPVUM_WALL_VISIBILITY",CE.FLOOR_VISIBILITY="RORPVUM_FLOOR_VISIBILITY";let Ca=CE;const e_=class e_ extends ui{constructor(e,t){super(null,null),this._type=e,this._value=t}get type(){return this._type}get value(){return this._value}};e_.ROOM_WALL_UPDATE="RORUM_ROOM_WALL_UPDATE",e_.ROOM_FLOOR_UPDATE="RORUM_ROOM_FLOOR_UPDATE",e_.ROOM_LANDSCAPE_UPDATE="RORUM_ROOM_LANDSCAPE_UPDATE";let bi=e_;class $_ extends ti{constructor(e){super(),this._selected=e}get selected(){return this._selected}}class ch extends ui{constructor(e,t,i,n,r=!1){super(e,null),this._height=t,this._visible=i,this._sourceEventId=n,this._toggleVisibility=r}get height(){return this._height}get visible(){return this._visible}get sourceEventId(){return this._sourceEventId}get toggleVisibility(){return this._toggleVisibility}}const ME=class ME extends ui{constructor(e){super(null,null),this._type=e}get type(){return this._type}};ME.ENABLED="ROVUM_ENABLED",ME.DISABLED="ROVUM_DISABLED";let Ma=ME;const gc=class gc extends I0{constructor(){super(),this._liftAmount=0,this._location=new M,this._locationDelta=new M,this._lastUpdateTime=0,this._changeTime=0,this._updateInterval=gc.DEFAULT_UPDATE_INTERVAL}onDispose(){this._liftAmount=0,super.onDispose()}update(e){super.update(e);const t=this.getLocationOffset(),i=this.object&&this.object.model;if(i&&(t?this._liftAmount!==t.z&&(this._liftAmount=t.z,i.setValue(b.FURNITURE_LIFT_AMOUNT,this._liftAmount)):this._liftAmount!==0&&(this._liftAmount=0,i.setValue(b.FURNITURE_LIFT_AMOUNT,this._liftAmount))),this._locationDelta.length>0||t){const n=gc.TEMP_VECTOR;let r=this.time-this._changeTime;r===this._updateInterval>>1&&r++,r>this._updateInterval&&(r=this._updateInterval),this._locationDelta.length>0?(n.assign(this._locationDelta),n.multiply(r/this._updateInterval),n.add(this._location)):n.assign(this._location),t&&n.add(t),this.object.setLocation(n),r===this._updateInterval&&(this._locationDelta.x=0,this._locationDelta.y=0,this._locationDelta.z=0)}this._lastUpdateTime=this.time}setObject(e){super.setObject(e),e&&this._location.assign(e.getLocation())}processUpdateMessage(e){if(e&&(super.processUpdateMessage(e),e.location&&this._location.assign(e.location),e instanceof Xo))return this.processMoveMessage(e)}processMoveMessage(e){!e||!this.object||!e.location||(this._changeTime=this._lastUpdateTime,this._locationDelta.assign(e.targetLocation),this._locationDelta.subtract(this._location))}getLocationOffset(){return null}get lastUpdateTime(){return this._lastUpdateTime}set updateInterval(e){e<=0&&(e=1),this._updateInterval=e}};gc.DEFAULT_UPDATE_INTERVAL=500,gc.TEMP_VECTOR=new M;let Ko=gc;const Gt=class Gt extends Ko{constructor(){super(),this._selected=!1,this._reportedLocation=null,this._effectChangeTimeStamp=0,this._newEffect=0,this._blinkingStartTimestamp=Pe()+this.randomBlinkStartTimestamp(),this._blinkingEndTimestamp=0,this._talkingEndTimestamp=0,this._talkingPauseStartTimestamp=0,this._talkingPauseEndTimestamp=0,this._carryObjectStartTimestamp=0,this._carryObjectEndTimestamp=0,this._allowUseCarryObject=!1,this._animationEndTimestamp=0,this._signEndTimestamp=0,this._gestureEndTimestamp=0,this._numberValueEndTimestamp=0}getEventTypes(){const e=[Ee.CLICK,Ee.DOUBLE_CLICK,es.POSITION_CHANGED,Ee.MOUSE_ENTER,Ee.MOUSE_LEAVE,X.MOUSE_BUTTON,X.MOUSE_ARROW];return this.mergeTypes(super.getEventTypes(),e)}dispose(){this._selected&&this.object&&this.eventDispatcher&&this.eventDispatcher.dispatchEvent(new es(es.OBJECT_REMOVED,this.object)),super.dispose(),this._reportedLocation=null}update(e){if(super.update(e),this._selected&&this.object&&this.eventDispatcher){const i=this.object.getLocation();(!this._reportedLocation||this._reportedLocation.x!==i.x||this._reportedLocation.y!==i.y||this._reportedLocation.z!==i.z)&&(this._reportedLocation||(this._reportedLocation=new M),this._reportedLocation.assign(i),this.eventDispatcher.dispatchEvent(new es(es.POSITION_CHANGED,this.object)))}const t=this.object&&this.object.model;t&&this.updateModel(this.time,t)}updateModel(e,t){this._talkingEndTimestamp>0&&(e>this._talkingEndTimestamp?(t.setValue(b.FIGURE_TALK,0),this._talkingEndTimestamp=0,this._talkingPauseStartTimestamp=0,this._talkingPauseEndTimestamp=0):!this._talkingPauseEndTimestamp&&!this._talkingPauseStartTimestamp?(this._talkingPauseStartTimestamp=e+this.randomTalkingPauseStartTimestamp(),this._talkingPauseEndTimestamp=this._talkingPauseStartTimestamp+this.randomTalkingPauseEndTimestamp()):this._talkingPauseStartTimestamp>0&&e>this._talkingPauseStartTimestamp?(t.setValue(b.FIGURE_TALK,0),this._talkingPauseStartTimestamp=0):this._talkingPauseEndTimestamp>0&&e>this._talkingPauseEndTimestamp&&(t.setValue(b.FIGURE_TALK,1),this._talkingPauseEndTimestamp=0)),this._animationEndTimestamp>0&&e>this._animationEndTimestamp&&(t.setValue(b.FIGURE_EXPRESSION,0),this._animationEndTimestamp=0),this._gestureEndTimestamp>0&&e>this._gestureEndTimestamp&&(t.setValue(b.FIGURE_GESTURE,0),this._gestureEndTimestamp=0),this._signEndTimestamp>0&&e>this._signEndTimestamp&&(t.setValue(b.FIGURE_SIGN,-1),this._signEndTimestamp=0),this._carryObjectEndTimestamp>0&&e>this._carryObjectEndTimestamp&&(t.setValue(b.FIGURE_CARRY_OBJECT,0),t.setValue(b.FIGURE_USE_OBJECT,0),this._carryObjectStartTimestamp=0,this._carryObjectEndTimestamp=0,this._allowUseCarryObject=!1),this._allowUseCarryObject&&e-this._carryObjectStartTimestamp>5e3&&((e-this._carryObjectStartTimestamp)%1e4<1e3?t.setValue(b.FIGURE_USE_OBJECT,1):t.setValue(b.FIGURE_USE_OBJECT,0)),this._blinkingStartTimestamp>-1&&e>this._blinkingStartTimestamp&&(t.setValue(b.FIGURE_BLINK,1),this._blinkingStartTimestamp=e+this.randomBlinkStartTimestamp(),this._blinkingEndTimestamp=e+this.randomBlinkEndTimestamp()),this._blinkingEndTimestamp>0&&e>this._blinkingEndTimestamp&&(t.setValue(b.FIGURE_BLINK,0),this._blinkingEndTimestamp=0),this._effectChangeTimeStamp>0&&e>this._effectChangeTimeStamp&&(t.setValue(b.FIGURE_EFFECT,this._newEffect),this._effectChangeTimeStamp=0),this._numberValueEndTimestamp>0&&e>this._numberValueEndTimestamp&&(t.setValue(b.FIGURE_NUMBER_VALUE,0),this._numberValueEndTimestamp=0)}processUpdateMessage(e){if(!e||!this.object)return;super.processUpdateMessage(e);const t=this.object&&this.object.model;if(t){if(e instanceof jw){t.setValue(b.FIGURE_POSTURE,e.postureType),t.setValue(b.FIGURE_POSTURE_PARAMETER,e.parameter);return}if(e instanceof Vw){t.setValue(b.FIGURE_TALK,1),this._talkingEndTimestamp=this.time+e.numberOfWords*1e3;return}if(e instanceof E5){t.setValue(b.FIGURE_IS_TYPING,e.isTyping?1:0);return}if(e instanceof d5){t.setValue(b.FIGURE_IS_MUTED,e.isMuted?1:0);return}if(e instanceof m5){t.setValue(b.FIGURE_IS_PLAYING_GAME,e.isPlayingGame?1:0);return}if(e instanceof Mv){t.setValue(b.HEAD_DIRECTION,e.headDirection),t.setValue(b.FIGURE_CAN_STAND_UP,e.canStandUp),t.setValue(b.FIGURE_VERTICAL_OFFSET,e.baseY);return}if(e instanceof f5){t.setValue(b.FIGURE_GESTURE,e.gesture),this._gestureEndTimestamp=this.time+3e3;return}if(e instanceof h5){t.setValue(b.FIGURE_EXPRESSION,e.expressionType),this._animationEndTimestamp=oe.getExpressionTimeout(t.getValue(b.FIGURE_EXPRESSION)),this._animationEndTimestamp>-1&&(this._animationEndTimestamp+=this.time);return}if(e instanceof o5){t.setValue(b.FIGURE_DANCE,e.danceStyle);return}if(e instanceof zw){t.setValue(b.FIGURE_SLEEP,e.isSleeping?1:0),e.isSleeping?this._blinkingStartTimestamp=-1:this._blinkingStartTimestamp=this.time+this.randomBlinkStartTimestamp();return}if(e instanceof p5){t.setValue(b.FIGURE_NUMBER_VALUE,e.value),this._numberValueEndTimestamp=this.time+3e3;return}if(e instanceof l5){this.updateAvatarEffect(e.effect,e.delayMilliseconds,t);return}if(e instanceof a5){t.setValue(b.FIGURE_CARRY_OBJECT,e.itemType),t.setValue(b.FIGURE_USE_OBJECT,0),e.itemType===0?(this._carryObjectStartTimestamp=0,this._carryObjectEndTimestamp=0,this._allowUseCarryObject=!1):(this._carryObjectStartTimestamp=this.time,e.itemTyper-a)}}if(e.logic.customVars){const i=e.logic.customVars.variables;i&&i.length&&t.setValue(b.FURNITURE_CUSTOM_VARIABLES,i)}}t.setValue(b.FURNITURE_SIZE_X,this._sizeX),t.setValue(b.FURNITURE_SIZE_Y,this._sizeY),t.setValue(b.FURNITURE_SIZE_Z,this._sizeZ),t.setValue(b.FURNITURE_CENTER_X,this._centerX),t.setValue(b.FURNITURE_CENTER_Y,this._centerY),t.setValue(b.FURNITURE_CENTER_Z,this._centerZ),t.setValue(b.FURNITURE_ALLOWED_DIRECTIONS,this._directions),t.setValue(b.FURNITURE_ALPHA_MULTIPLIER,1)}}onDispose(){this._storedRotateMessage=null,this._directions=null,super.onDispose()}setObject(e){super.setObject(e),e&&e.getLocation().length&&(this._directionInitialized=!0)}getAdClickUrl(e){return e.getValue(b.FURNITURE_AD_URL)}handleAdClick(e,t,i){this.eventDispatcher&&this.eventDispatcher.dispatchEvent(new Rt(Rt.ROOM_AD_FURNI_CLICK,this.object))}update(e){super.update(e),this._bouncingStep>0&&(this._bouncingStep++,this._bouncingStep>bs.BOUNCING_STEPS&&(this._bouncingStep=0))}processUpdateMessage(e){if(e instanceof ht){this.processDataUpdateMessage(e);return}if(e instanceof T5){this.processObjectHeightUpdateMessage(e);return}if(e instanceof Hw){this.processItemDataUpdateMessage(e);return}if(this._mouseOver=!1,e.location&&e.direction){if(!(e instanceof Xo)){const t=this.object.getDirection(),i=this.object.getLocation();t.x!==e.direction.x&&this._directionInitialized&&i.x===e.location.x&&i.y===e.location.y&&i.z===e.location.z&&(this._bouncingStep=1,this._storedRotateMessage=new ui(e.location,e.direction),e=null)}this._directionInitialized=!0}if(e instanceof $_&&this.contextMenu&&this.eventDispatcher&&this.object){const t=e.selected?x.OPEN_FURNI_CONTEXT_MENU:x.CLOSE_FURNI_CONTEXT_MENU;this.eventDispatcher.dispatchEvent(new x(t,this.object))}super.processUpdateMessage(e)}processDataUpdateMessage(e){e&&(this.object.setState(e.state,0),e.data&&e.data.writeRoomObjectModel(this.object.model),e.extra!==null&&this.object.model.setValue(b.FURNITURE_EXTRAS,e.extra.toString()),this.object.model.setValue(b.FURNITURE_STATE_UPDATE_TIME,this.lastUpdateTime))}processObjectHeightUpdateMessage(e){e&&this.object.model.setValue(b.FURNITURE_SIZE_Z,e.height)}processItemDataUpdateMessage(e){e&&this.object.model.setValue(b.FURNITURE_ITEMDATA,e.data)}mouseEvent(e,t){const i=this.getAdClickUrl(this.object.model);switch(e.type){case ue.MOUSE_MOVE:if(this.eventDispatcher){const n=new Ee(Ee.MOUSE_MOVE,this.object,e.eventId,e.altKey,e.ctrlKey,e.shiftKey,e.buttonDown);n.localX=e.localX,n.localY=e.localY,n.spriteOffsetX=e.spriteOffsetX,n.spriteOffsetY=e.spriteOffsetY,this.eventDispatcher.dispatchEvent(n)}return;case ue.ROLL_OVER:if(!this._mouseOver){if(this.eventDispatcher){i&&i.indexOf("http")===0&&this.eventDispatcher.dispatchEvent(new Rt(Rt.ROOM_AD_TOOLTIP_SHOW,this.object));const n=new Ee(Ee.MOUSE_ENTER,this.object,e.eventId,e.altKey,e.ctrlKey,e.shiftKey,e.buttonDown);n.localX=e.localX,n.localY=e.localY,n.spriteOffsetX=e.spriteOffsetX,n.spriteOffsetY=e.spriteOffsetY,this.eventDispatcher.dispatchEvent(n)}this._mouseOver=!0}return;case ue.ROLL_OUT:if(this._mouseOver){if(this.eventDispatcher){i&&i.indexOf("http")===0&&this.eventDispatcher.dispatchEvent(new Rt(Rt.ROOM_AD_TOOLTIP_HIDE,this.object));const n=new Ee(Ee.MOUSE_LEAVE,this.object,e.eventId,e.altKey,e.ctrlKey,e.shiftKey,e.buttonDown);n.localX=e.localX,n.localY=e.localY,n.spriteOffsetX=e.spriteOffsetX,n.spriteOffsetY=e.spriteOffsetY,this.eventDispatcher.dispatchEvent(n)}this._mouseOver=!1}return;case ue.DOUBLE_CLICK:this.useObject();return;case ue.MOUSE_CLICK:if(this.eventDispatcher){const n=new Ee(Ee.CLICK,this.object,e.eventId,e.altKey,e.ctrlKey,e.shiftKey,e.buttonDown);n.localX=e.localX,n.localY=e.localY,n.spriteOffsetX=e.spriteOffsetX,n.spriteOffsetY=e.spriteOffsetY,this.eventDispatcher.dispatchEvent(n),i&&i.indexOf("http")===0&&this.eventDispatcher.dispatchEvent(new Rt(Rt.ROOM_AD_TOOLTIP_HIDE,this.object)),i&&i.length&&this.handleAdClick(this.object.id,this.object.type,i)}return;case ue.MOUSE_DOWN:if(this.eventDispatcher){const n=new Ee(Ee.MOUSE_DOWN,this.object,e.eventId,e.altKey,e.ctrlKey,e.shiftKey,e.buttonDown);this.eventDispatcher.dispatchEvent(n)}return;case ue.MOUSE_DOWN_LONG:if(this.eventDispatcher){const n=new Ee(Ee.MOUSE_DOWN_LONG,this.object,e.eventId,e.altKey,e.ctrlKey,e.shiftKey,e.buttonDown);this.eventDispatcher.dispatchEvent(n)}return}}getLocationOffset(){return this._bouncingStep<=0?null:(this._locationOffset.x=0,this._locationOffset.y=0,this._bouncingStep<=bs.BOUNCING_STEPS/2?this._locationOffset.z=bs.BOUNCING_Z*this._bouncingStep:this._bouncingStep<=bs.BOUNCING_STEPS&&(this._storedRotateMessage&&(super.processUpdateMessage(this._storedRotateMessage),this._storedRotateMessage=null),this._locationOffset.z=bs.BOUNCING_Z*(bs.BOUNCING_STEPS-this._bouncingStep)),this._locationOffset)}useObject(){if(!this.object||!this.eventDispatcher)return;const e=this.getAdClickUrl(this.object.model);e&&e.length&&this.eventDispatcher.dispatchEvent(new Rt(Rt.ROOM_AD_FURNI_DOUBLE_CLICK,this.object,null,e)),this.widget&&this.eventDispatcher.dispatchEvent(new x(x.OPEN_WIDGET,this.object)),this.eventDispatcher.dispatchEvent(new We(We.STATE_CHANGE,this.object))}tearDown(){this.object.model.getValue(b.FURNITURE_REAL_ROOM_OBJECT)===1&&(this.widget&&this.eventDispatcher.dispatchEvent(new x(x.CLOSE_WIDGET,this.object)),this.contextMenu&&this.eventDispatcher.dispatchEvent(new x(x.CLOSE_FURNI_CONTEXT_MENU,this.object))),super.tearDown()}};bs.BOUNCING_STEPS=-1,bs.BOUNCING_Z=-1;let qe=bs;class R5 extends qe{getEventTypes(){const e=[x.BADGE_DISPLAY_ENGRAVING,ir.LOAD_BADGE];return this.mergeTypes(super.getEventTypes(),e)}processUpdateMessage(e){if(super.processUpdateMessage(e),!!this.object){if(e instanceof ht){const t=e.data;t instanceof Wc&&this.updateBadge(t.getValue(1));return}if(e instanceof Gu){e.assetName!=="loading_icon"&&(this.object.model.setValue(b.FURNITURE_BADGE_ASSET_NAME,e.assetName),this.object.model.setValue(b.FURNITURE_BADGE_IMAGE_STATUS,1),this.update(Pe()));return}}}useObject(){!this.object||!this.eventDispatcher||this.eventDispatcher.dispatchEvent(new x(x.BADGE_DISPLAY_ENGRAVING,this.object))}updateBadge(e){e!==""&&this.eventDispatcher&&(this.object.model.setValue(b.FURNITURE_BADGE_IMAGE_STATUS,-1),this.eventDispatcher.dispatchEvent(new ir(ir.LOAD_BADGE,this.object,e,!1)))}}const As=class As extends R5{getEventTypes(){const e=[x.ACHIEVEMENT_RESOLUTION_OPEN,x.ACHIEVEMENT_RESOLUTION_ENGRAVING,x.ACHIEVEMENT_RESOLUTION_FAILED,ir.LOAD_BADGE];return this.mergeTypes(super.getEventTypes(),e)}processUpdateMessage(e){if(super.processUpdateMessage(e),e instanceof Gu&&e.assetName!=="loading_icon"&&this.object.model.setValue(b.FURNITURE_BADGE_VISIBLE_IN_STATE,As.BADGE_VISIBLE_IN_STATE),e instanceof $_){if(!this.eventDispatcher||!this.object)return;this.eventDispatcher.dispatchEvent(new x(x.CLOSE_FURNI_CONTEXT_MENU,this.object))}}useObject(){if(!this.object||!this.eventDispatcher)return;let e=null;switch(this.object.getState(0)){case As.STATE_RESOLUTION_NOT_STARTED:case As.STATE_RESOLUTION_IN_PROGRESS:e=new x(x.ACHIEVEMENT_RESOLUTION_OPEN,this.object);break;case As.STATE_RESOLUTION_ACHIEVED:e=new x(x.ACHIEVEMENT_RESOLUTION_ENGRAVING,this.object);break;case As.STATE_RESOLUTION_FAILED:e=new x(x.ACHIEVEMENT_RESOLUTION_FAILED,this.object);break}e&&this.eventDispatcher.dispatchEvent(e)}updateBadge(e){e!==As.ACH_NOT_SET&&super.updateBadge(e)}};As.STATE_RESOLUTION_NOT_STARTED=0,As.STATE_RESOLUTION_IN_PROGRESS=1,As.STATE_RESOLUTION_ACHIEVED=2,As.STATE_RESOLUTION_FAILED=3,As.ACH_NOT_SET="ach_0",As.BADGE_VISIBLE_IN_STATE=2;let Pb=As;class JEe extends qe{constructor(){super(),this.onRoomToObjectOwnAvatarMoveEvent=this.onRoomToObjectOwnAvatarMoveEvent.bind(this)}initialize(e){super.initialize(e),this.eventDispatcher&&this.eventDispatcher.addEventListener(Yc.ROAME_MOVE_TO,this.onRoomToObjectOwnAvatarMoveEvent)}tearDown(){this.eventDispatcher&&this.eventDispatcher.removeEventListener(Yc.ROAME_MOVE_TO,this.onRoomToObjectOwnAvatarMoveEvent),super.tearDown()}onRoomToObjectOwnAvatarMoveEvent(e){if(!e||!this.object)return;const t=this.object.getLocation(),i=e.targetLocation;if(!i)return;let n=this.object.model.getValue(b.FURNITURE_SIZE_X),r=this.object.model.getValue(b.FURNITURE_SIZE_Y);const a=(Math.floor(this.object.getDirection().x)+45)%360/90;(a===1||a===3)&&([n,r]=[r,n]),i.x>=t.x&&i.x=t.y&&i.y0&&(t=parseInt(e.logic.credits)),this.object.model.setValue(b.FURNITURE_CREDIT_VALUE,t)}useObject(){!this.object||!this.eventDispatcher||(this.eventDispatcher.dispatchEvent(new x(x.CREDITFURNI,this.object)),super.useObject())}}class qt extends qe{getEventTypes(){const e=[X.MOUSE_BUTTON,X.MOUSE_ARROW];return this.mergeTypes(super.getEventTypes(),e)}mouseEvent(e,t){if(!(!e||!t||!this.object)){switch(e.type){case ue.ROLL_OVER:this.eventDispatcher&&this.eventDispatcher.dispatchEvent(new X(X.MOUSE_BUTTON,this.object));break;case ue.ROLL_OUT:this.eventDispatcher&&this.eventDispatcher.dispatchEvent(new X(X.MOUSE_ARROW,this.object));break}super.mouseEvent(e,t)}}}class r0e extends qt{constructor(){super(...arguments),this._state=1}getEventTypes(){const e=[Aa.PLAY_SOUND_AT_PITCH];return this.mergeTypes(super.getEventTypes(),e)}processUpdateMessage(e){super.processUpdateMessage(e),e instanceof ht&&(this._state!==-1&&e.state!==this._state&&this.dispatchSoundEvent(this.object.location.z),this._state=e.state)}dispatchSoundEvent(e){const t=Math.pow(2,e-1.2);this.eventDispatcher.dispatchEvent(new Aa(Aa.PLAY_SOUND_AT_PITCH,this.object,"FURNITURE_cuckoo_clock",t))}}class a0e extends qt{getEventTypes(){const e=[x.STACK_HEIGHT];return this.mergeTypes(super.getEventTypes(),e)}initialize(e){super.initialize(e),this.object&&this.object.model&&this.object.model.setValue(b.FURNITURE_ALWAYS_STACKABLE,1)}useObject(){!this.object||!this.eventDispatcher||(this.eventDispatcher.dispatchEvent(new x(x.STACK_HEIGHT,this.object)),super.useObject())}}class o0e extends qe{constructor(){super(),this._noTags=!1,this._noTagsLastStateActivate=!1}getEventTypes(){const e=[X.DICE_ACTIVATE,X.DICE_OFF];return this.mergeTypes(super.getEventTypes(),e)}mouseEvent(e,t){if(!e||!t||!this.object)return;let i=null;switch(e.type){case ue.DOUBLE_CLICK:this._noTags?!this._noTagsLastStateActivate||this.object.getState(0)===0||this.object.getState(0)===100?(i=new X(X.DICE_ACTIVATE,this.object),this._noTagsLastStateActivate=!0):(i=new X(X.DICE_OFF,this.object),this._noTagsLastStateActivate=!1):e.spriteTag==="activate"||this.object.getState(0)===0||this.object.getState(0)===100?i=new X(X.DICE_ACTIVATE,this.object):e.spriteTag==="deactivate"&&(i=new X(X.DICE_OFF,this.object)),i&&this.eventDispatcher&&this.eventDispatcher.dispatchEvent(i);return}super.mouseEvent(e,t)}}class l0e extends qe{getEventTypes(){const e=[x.ECOTRONBOX];return this.mergeTypes(super.getEventTypes(),e)}useObject(){!this.object||!this.eventDispatcher||this.eventDispatcher.dispatchEvent(new x(x.ECOTRONBOX,this.object))}}class u0e extends qe{constructor(){super(),this._showStateOnceRendered=!1,this._updateCount=0}getEventTypes(){const e=[x.INERNAL_LINK];return this.mergeTypes(super.getEventTypes(),e)}initialize(e){super.initialize(e),e.logic&&e.logic.action&&e.logic.action.startState===1&&(this._showStateOnceRendered=!0)}update(e){super.update(e),this._showStateOnceRendered&&(this._updateCount++,this._showStateOnceRendered&&this._updateCount>20&&(this.setAutomaticStateIndex(1),this._showStateOnceRendered=!1))}setAutomaticStateIndex(e){this.object&&this.object.model&&this.object.model.setValue(b.FURNITURE_AUTOMATIC_STATE_INDEX,e)}mouseEvent(e,t){!e||!t||(e.type===ue.DOUBLE_CLICK&&this.setAutomaticStateIndex(0),super.mouseEvent(e,t))}useObject(){!this.object||!this.eventDispatcher||this.eventDispatcher.dispatchEvent(new x(x.INERNAL_LINK,this.object))}}class h0e extends qe{getEventTypes(){const e=[x.ROOM_LINK];return this.mergeTypes(super.getEventTypes(),e)}initialize(e){super.initialize(e),e.logic&&e.logic.action&&e.logic.action.link&&e.logic.action.link!==""&&e.logic.action.link.length>0&&this.object&&this.object.model&&this.object.model.setValue(b.FURNITURE_INTERNAL_LINK,e.logic.action.link)}onDispose(){this._timer&&(clearTimeout(this._timer),this._timer=null),super.onDispose()}setAutomaticStateIndex(e){this.object&&this.object.model&&this.object.model.setValue(b.FURNITURE_AUTOMATIC_STATE_INDEX,e)}useObject(){this.setAutomaticStateIndex(1),this._timer&&(clearTimeout(this._timer),this._timer=null),this._timer=setTimeout(()=>{this.setAutomaticStateIndex(0),this._timer=null},2500),!(!this.object||!this.eventDispatcher)&&this.eventDispatcher.dispatchEvent(new x(x.ROOM_LINK,this.object))}}class c0e extends qe{getEventTypes(){const e=[x.EFFECTBOX_OPEN_DIALOG];return this.mergeTypes(super.getEventTypes(),e)}useObject(){!this.object||!this.eventDispatcher||this.eventDispatcher.dispatchEvent(new x(x.EFFECTBOX_OPEN_DIALOG,this.object))}get contextMenu(){return Wr.EFFECT_BOX}}class f0e extends qt{getEventTypes(){const e=[x.EXTERNAL_IMAGE];return this.mergeTypes(super.getEventTypes(),e)}initialize(e){if(super.initialize(e),!!e&&this.object&&this.object.model){let t="";e.logic&&e.logic.maskType&&e.logic.maskType!==""&&e.logic.maskType.length>0&&(t=e.logic.maskType),this.object.model.setValue(b.FURNITURE_USES_PLANE_MASK,0),this.object.model.setValue(b.FURNITURE_PLANE_MASK_TYPE,t)}}useObject(){!this.object||!this.eventDispatcher||(this.eventDispatcher.dispatchEvent(new x(x.EXTERNAL_IMAGE,this.object)),super.useObject())}}class d0e extends qe{getEventTypes(){const e=[We.STATE_CHANGE];return this.mergeTypes(super.getEventTypes(),e)}initialize(e){super.initialize(e),e.logic&&e.logic.particleSystems&&e.logic.particleSystems.length&&this.object.model.setValue(b.FURNITURE_FIREWORKS_DATA,e.logic.particleSystems)}mouseEvent(e,t){if(!e||!t||!this.object)return;let i=null;switch(e.type){case ue.DOUBLE_CLICK:switch(e.spriteTag){case"start_stop":i=new We(We.STATE_CHANGE,this.object,1);break;case"reset":i=new We(We.STATE_CHANGE,this.object,2);break}if(this.eventDispatcher&&i){this.eventDispatcher.dispatchEvent(i);return}break}super.mouseEvent(e,t)}useObject(){!this.object||!this.eventDispatcher||this.eventDispatcher.dispatchEvent(new We(We.STATE_CHANGE,this.object,0))}}const iu=class iu extends qt{constructor(){super(),this._currentState=-1,this._currentLocation=null}getEventTypes(){const e=[qi.ADD_HOLE,qi.REMOVE_HOLE];return this.mergeTypes(super.getEventTypes(),e)}onDispose(){this._currentState===iu.STATE_HOLE&&this.eventDispatcher.dispatchEvent(new qi(qi.REMOVE_HOLE,this.object)),super.onDispose()}update(e){super.update(e),this.handleAutomaticStateUpdate()}processUpdateMessage(e){if(super.processUpdateMessage(e),!this.object)return;e instanceof ht&&this.handleStateUpdate(this.object.getState(0));const t=this.object.getLocation();this._currentLocation?(t.x!==this._currentLocation.x||t.y!==this._currentLocation.y)&&this._currentState===iu.STATE_HOLE&&this.eventDispatcher&&this.eventDispatcher.dispatchEvent(new qi(qi.ADD_HOLE,this.object)):this._currentLocation=new M,this._currentLocation.assign(t)}handleStateUpdate(e){e!==this._currentState&&(this.eventDispatcher&&(e===iu.STATE_HOLE?this.eventDispatcher.dispatchEvent(new qi(qi.ADD_HOLE,this.object)):this._currentState===iu.STATE_HOLE&&this.eventDispatcher.dispatchEvent(new qi(qi.REMOVE_HOLE,this.object))),this._currentState=e)}handleAutomaticStateUpdate(){if(!this.object)return;const e=this.object.model;if(!e)return;const t=e.getValue(b.FURNITURE_AUTOMATIC_STATE_INDEX);isNaN(t)||this.handleStateUpdate(t%2)}};iu.STATE_HOLE=0;let kb=iu;const su=class su extends qt{constructor(){super(...arguments),this._state=-1}initialize(e){super.initialize(e),this.object&&this.object.model.setValue(b.FURNITURE_FRIENDFURNI_ENGRAVING,this.engravingDialogType)}processUpdateMessage(e){if(e instanceof ht){const t=e.data;t?this._state=t.state:this._state=e.state}super.processUpdateMessage(e)}getEventTypes(){const e=[x.FRIEND_FURNITURE_ENGRAVING];return this.mergeTypes(super.getEventTypes(),e)}useObject(){!this.object||!this.eventDispatcher||(this._state===su.STATE_LOCKED?this.eventDispatcher.dispatchEvent(new x(x.FRIEND_FURNITURE_ENGRAVING,this.object)):super.useObject())}get engravingDialogType(){return 0}get contextMenu(){return this._state===su.STATE_UNLOCKED?Wr.FRIEND_FURNITURE:Wr.DUMMY}};su.STATE_UNINITIALIZED=-1,su.STATE_UNLOCKED=0,su.STATE_LOCKED=1;let Pv=su;const Er=class Er extends qt{getEventTypes(){const e=[ir.LOAD_BADGE,x.GUILD_FURNI_CONTEXT_MENU,x.CLOSE_FURNI_CONTEXT_MENU];return this.mergeTypes(super.getEventTypes(),e)}processUpdateMessage(e){if(super.processUpdateMessage(e),e instanceof ht){const t=e.data;t instanceof Wc&&(this.updateGroupId(t.getValue(Er.GROUPID_KEY)),this.updateBadge(t.getValue(Er.BADGE_KEY)),this.updateColors(t.getValue(Er.COLOR1_KEY),t.getValue(Er.COLOR2_KEY)))}else e instanceof Gu?e.assetName!=="loading_icon"&&(this.object.model.setValue(b.FURNITURE_GUILD_CUSTOMIZED_ASSET_NAME,e.assetName),this.update(Pe())):e instanceof $_&&(e.selected||this.eventDispatcher.dispatchEvent(new x(x.CLOSE_FURNI_CONTEXT_MENU,this.object)))}updateGroupId(e){this.object.model.setValue(b.FURNITURE_GUILD_CUSTOMIZED_GUILD_ID,parseInt(e))}updateBadge(e){this.eventDispatcher.dispatchEvent(new ir(ir.LOAD_BADGE,this.object,e,!0))}updateColors(e,t){this.object.model.setValue(b.FURNITURE_GUILD_CUSTOMIZED_COLOR_1,parseInt(e,16)),this.object.model.setValue(b.FURNITURE_GUILD_CUSTOMIZED_COLOR_2,parseInt(t,16))}mouseEvent(e,t){if(!(!e||!t||!this.object)){switch(e.type){case ue.MOUSE_CLICK:this.openContextMenu()}super.mouseEvent(e,t)}}openContextMenu(){this.eventDispatcher.dispatchEvent(new x(x.GUILD_FURNI_CONTEXT_MENU,this.object))}};Er.GROUPID_KEY=1,Er.BADGE_KEY=2,Er.COLOR1_KEY=3,Er.COLOR2_KEY=4;let kv=Er;class _0e extends kv{getEventTypes(){const e=[x.INERNAL_LINK];return this.mergeTypes(super.getEventTypes(),e)}updateGroupId(e){super.updateGroupId(e),this.object.model.setValue(b.FURNITURE_INTERNAL_LINK,`groupforum/${e}`)}useObject(){!this.object||!this.eventDispatcher||(this.eventDispatcher.dispatchEvent(new x(x.INERNAL_LINK,this.object)),super.useObject())}}class g0e extends qe{getEventTypes(){const e=[X.USE_HABBOWHEEL];return this.mergeTypes(super.getEventTypes(),e)}useObject(){!this.object||!this.eventDispatcher||this.eventDispatcher.dispatchEvent(new X(X.USE_HABBOWHEEL,this.object))}}const NE=class NE extends qe{constructor(){super(...arguments),this._state=-1}getEventTypes(){return[x.HIGH_SCORE_DISPLAY,x.HIDE_HIGH_SCORE_DISPLAY]}tearDown(){this.object.model.getValue(b.FURNITURE_REAL_ROOM_OBJECT)===1&&this.eventDispatcher.dispatchEvent(new x(x.HIDE_HIGH_SCORE_DISPLAY,this.object)),super.tearDown()}processUpdateMessage(e){super.processUpdateMessage(e),this.object.model.getValue(b.FURNITURE_REAL_ROOM_OBJECT)===1&&e instanceof ht&&(e.state===NE.SHOW_WIDGET_IN_STATE?this.eventDispatcher.dispatchEvent(new x(x.HIGH_SCORE_DISPLAY,this.object)):this.eventDispatcher.dispatchEvent(new x(x.HIDE_HIGH_SCORE_DISPLAY,this.object)),this._state=e.state)}};NE.SHOW_WIDGET_IN_STATE=1;let xb=NE;class p0e extends qe{getEventTypes(){const e=[We.STATE_CHANGE];return this.mergeTypes(super.getEventTypes(),e)}mouseEvent(e,t){if(!e||!t||!this.object)return;let i=null;switch(e.type){case ue.DOUBLE_CLICK:switch(e.spriteTag){case"off":i=new We(We.STATE_CHANGE,this.object,3);break}break;case ue.MOUSE_CLICK:switch(e.spriteTag){case"inc":i=new We(We.STATE_CHANGE,this.object,2);break;case"dec":i=new We(We.STATE_CHANGE,this.object,1);break}break}if(this.eventDispatcher&&i){this.eventDispatcher.dispatchEvent(i);return}super.mouseEvent(e,t)}useObject(){!this.object||!this.eventDispatcher||this.eventDispatcher.dispatchEvent(new We(We.STATE_CHANGE,this.object,3))}}class m0e extends Pv{get engravingDialogType(){return zm.HABBOWEEN}}class v0e extends qt{constructor(){super(),this._nextState=0,this._nextStateTimestamp=0}update(e){if(this._nextStateTimestamp>0&&e>=this._nextStateTimestamp){this._nextStateTimestamp=0;const t=new ps;t.setString(this._nextState.toString()),super.processUpdateMessage(new ht(this._nextState,t,this._nextStateExtra))}super.update(e)}processUpdateMessage(e){if(e instanceof ht){this.processUpdate(e);return}super.processUpdateMessage(e)}processUpdate(e){if(!e)return;const t=~~(e.state/1e3),i=~~(e.state%1e3);if(i)this._nextState=t,this._nextStateExtra=e.extra,this._nextStateTimestamp=this.time+i;else{this._nextStateTimestamp=0;const n=new ps;n.setString(t.toString()),super.processUpdateMessage(new ht(t,n,e.extra))}}}class E0e extends qe{constructor(){super(...arguments),this._showStateOnceRendered=!1,this._updateCount=0}getEventTypes(){const e=[x.INERNAL_LINK];return this.mergeTypes(super.getEventTypes(),e)}initialize(e){super.initialize(e),e.logic&&e.logic.action&&(this.object.model.setValue(b.FURNITURE_INTERNAL_LINK,e.logic.action.link),e.logic.action.startState===1&&(this._showStateOnceRendered=!0))}update(e){super.update(e),this._showStateOnceRendered&&(this._updateCount++,this._showStateOnceRendered&&this._updateCount===20&&(this.setAutomaticStateIndex(1),this._showStateOnceRendered=!1))}setAutomaticStateIndex(e){this.object&&this.object.model&&this.object.model.setValue(b.FURNITURE_AUTOMATIC_STATE_INDEX,e)}mouseEvent(e,t){!e||!t||(e.type===ue.DOUBLE_CLICK&&this._showStateOnceRendered&&this.setAutomaticStateIndex(0),super.mouseEvent(e,t))}useObject(){!this.object||!this.eventDispatcher||this.eventDispatcher.dispatchEvent(new x(x.INERNAL_LINK,this.object))}}class y0e extends qt{constructor(){super(...arguments),this._disposeEventsAllowed=!1,this._isInitialized=!1,this._currentState=-1}getEventTypes(){const e=[X.JUKEBOX_START,X.JUKEBOX_MACHINE_STOP,X.JUKEBOX_DISPOSE,X.JUKEBOX_INIT,x.JUKEBOX_PLAYLIST_EDITOR];return this.mergeTypes(super.getEventTypes(),e)}onDispose(){this.requestDispose(),super.onDispose()}processUpdateMessage(e){if(super.processUpdateMessage(e),this.object.model.getValue(b.FURNITURE_REAL_ROOM_OBJECT)===1&&(this._isInitialized||this.requestInit(),this.object.model.setValue(Fs.INFOSTAND_EXTRA_PARAM,Fs.JUKEBOX),e instanceof ht)){const t=this.object.getState(0);t!==this._currentState&&(this._currentState=t,t===1?this.requestPlayList():t===0&&this.requestStopPlaying())}}requestInit(){!this.object||!this.eventDispatcher||(this._disposeEventsAllowed=!0,this.eventDispatcher.dispatchEvent(new X(X.JUKEBOX_INIT,this.object)),this._isInitialized=!0)}requestPlayList(){!this.object||!this.eventDispatcher||(this._disposeEventsAllowed=!0,this.eventDispatcher.dispatchEvent(new X(X.JUKEBOX_START,this.object)))}requestStopPlaying(){!this.object||!this.eventDispatcher||this.eventDispatcher.dispatchEvent(new X(X.JUKEBOX_MACHINE_STOP,this.object))}requestDispose(){!this._disposeEventsAllowed||!this.object||!this.eventDispatcher||this.eventDispatcher.dispatchEvent(new X(X.JUKEBOX_DISPOSE,this.object))}useObject(){!this.object||!this.eventDispatcher||(this.eventDispatcher.dispatchEvent(new x(x.JUKEBOX_PLAYLIST_EDITOR,this.object)),this.eventDispatcher.dispatchEvent(new We(We.STATE_CHANGE,this.object,-1)))}}class T0e extends Pv{get engravingDialogType(){return zm.LOVE_LOCK}}const mo=class mo extends qe{getEventTypes(){const e=[x.MANNEQUIN];return this.mergeTypes(super.getEventTypes(),e)}processUpdateMessage(e){super.processUpdateMessage(e),e instanceof ht&&(e.data.writeRoomObjectModel(this.object.model),this.processObjectData())}processObjectData(){if(!this.object||!this.object.model)return;const e=new Fu;e.initializeFromRoomObjectModel(this.object.model),this.object.model.setValue(b.FURNITURE_MANNEQUIN_GENDER,e.getValue(mo.GENDER)),this.object.model.setValue(b.FURNITURE_MANNEQUIN_FIGURE,e.getValue(mo.FIGURE)),this.object.model.setValue(b.FURNITURE_MANNEQUIN_NAME,e.getValue(mo.OUTFIT_NAME))}useObject(){!this.object||!this.eventDispatcher||this.eventDispatcher.dispatchEvent(new x(x.MANNEQUIN,this.object))}};mo.GENDER="GENDER",mo.FIGURE="FIGURE",mo.OUTFIT_NAME="OUTFIT_NAME";let Db=mo;class I0e extends qt{getEventTypes(){const e=[x.MONSTERPLANT_SEED_PLANT_CONFIRMATION_DIALOG];return this.mergeTypes(super.getEventTypes(),e)}useObject(){!this.object||!this.eventDispatcher||this.eventDispatcher.dispatchEvent(new x(x.MONSTERPLANT_SEED_PLANT_CONFIRMATION_DIALOG,this.object))}get contextMenu(){return Wr.MONSTERPLANT_SEED}}class R0e extends qt{initialize(e){super.initialize(e),this.object&&this.object.model&&this.object.model.setValue(b.FURNITURE_IS_VARIABLE_HEIGHT,1)}}class S0e extends qt{getEventTypes(){const e=[x.MYSTERYBOX_OPEN_DIALOG];return this.mergeTypes(super.getEventTypes(),e)}useObject(){!this.object||!this.eventDispatcher||this.eventDispatcher.dispatchEvent(new x(x.MYSTERYBOX_OPEN_DIALOG,this.object))}get contextMenu(){return Wr.MYSTERY_BOX}}class b0e extends qt{getEventTypes(){const e=[x.MYSTERYTROPHY_OPEN_DIALOG];return this.mergeTypes(super.getEventTypes(),e)}useObject(){!this.object||!this.eventDispatcher||this.eventDispatcher.dispatchEvent(new x(x.MYSTERYTROPHY_OPEN_DIALOG,this.object))}get contextMenu(){return Wr.MYSTERY_TROPHY}}class A0e extends qe{getEventTypes(){const e=[X.ENTER_ONEWAYDOOR];return this.mergeTypes(super.getEventTypes(),e)}useObject(){!this.object||!this.eventDispatcher||this.eventDispatcher.dispatchEvent(new X(X.ENTER_ONEWAYDOOR,this.object))}}class O0e extends qe{getEventTypes(){const e=[x.PET_PRODUCT_MENU];return this.mergeTypes(super.getEventTypes(),e)}processUpdateMessage(e){super.processUpdateMessage(e),this.object&&this.object.model.getValue(b.FURNITURE_REAL_ROOM_OBJECT)===1&&this.object.model.setValue(Fs.INFOSTAND_EXTRA_PARAM,Fs.USABLE_PRODUCT)}useObject(){!this.object||!this.eventDispatcher||this.eventDispatcher.dispatchEvent(new x(x.PET_PRODUCT_MENU,this.object))}}class w0e extends qe{getEventTypes(){const e=[x.PLACEHOLDER];return this.mergeTypes(super.getEventTypes(),e)}useObject(){!this.object||!this.eventDispatcher||this.eventDispatcher.dispatchEvent(new x(x.PLACEHOLDER,this.object))}}class C0e extends qe{initialize(e){super.initialize(e),e.logic&&e.logic.planetSystems&&this.object.model.setValue(b.FURNITURE_PLANETSYSTEM_DATA,e.logic.planetSystems)}}const Tn=class Tn extends qe{getEventTypes(){const e=[x.PRESENT];return this.mergeTypes(super.getEventTypes(),e)}initialize(e){super.initialize(e),e.logic&&e.logic.particleSystems&&e.logic.particleSystems.length&&this.object.model.setValue(b.FURNITURE_FIREWORKS_DATA,e.logic.particleSystems)}processUpdateMessage(e){super.processUpdateMessage(e),e instanceof ht&&(e.data.writeRoomObjectModel(this.object.model),this.updateStuffData()),e instanceof I5&&e.numberKey===b.FURNITURE_DISABLE_PICKING_ANIMATION&&this.object.model.setValue(b.FURNITURE_DISABLE_PICKING_ANIMATION,e.numberValue)}updateStuffData(){if(!this.object||!this.object.model)return;const e=new Fu;e.initializeFromRoomObjectModel(this.object.model);const t=e.getValue(Tn.MESSAGE),i=this.object.model.getValue(b.FURNITURE_DATA);!t&&typeof i=="string"?this.object.model.setValue(b.FURNITURE_DATA,i.substr(1)):this.object.model.setValue(b.FURNITURE_DATA,e.getValue(Tn.MESSAGE)),this.writeToModel(b.FURNITURE_TYPE_ID,e.getValue(Tn.PRODUCT_CODE)),this.writeToModel(b.FURNITURE_PURCHASER_NAME,e.getValue(Tn.PURCHASER_NAME)),this.writeToModel(b.FURNITURE_PURCHASER_FIGURE,e.getValue(Tn.PURCHASER_FIGURE))}writeToModel(e,t){t&&this.object.model.setValue(e,t)}mouseEvent(e,t){if(!(!e||!t||!this.object)){switch(e.type){case ue.ROLL_OVER:this.eventDispatcher.dispatchEvent(new X(X.MOUSE_BUTTON,this.object));break;case ue.ROLL_OUT:this.eventDispatcher.dispatchEvent(new X(X.MOUSE_ARROW,this.object));break}super.mouseEvent(e,t)}}useObject(){!this.object||!this.eventDispatcher||this.eventDispatcher.dispatchEvent(new x(x.PRESENT,this.object))}};Tn.MESSAGE="MESSAGE",Tn.PRODUCT_CODE="PRODUCT_CODE",Tn.EXTRA_PARAM="EXTRA_PARAM",Tn.PURCHASER_NAME="PURCHASER_NAME",Tn.PURCHASER_FIGURE="PURCHASER_FIGURE";let Lb=Tn;class M0e extends qt{getEventTypes(){const e=[x.PURCHASABLE_CLOTHING_CONFIRMATION_DIALOG];return this.mergeTypes(super.getEventTypes(),e)}useObject(){!this.object||!this.eventDispatcher||this.eventDispatcher.dispatchEvent(new x(x.PURCHASABLE_CLOTHING_CONFIRMATION_DIALOG,this.object))}get contextMenu(){return Wr.PURCHASABLE_CLOTHING}}const ua=class ua extends qt{constructor(){super(),this.updateInterval=Ko.DEFAULT_UPDATE_INTERVAL,this._oldLocation=new M}processUpdateMessage(e){if(!e)return;const t=e instanceof Xo;if(this.object&&!t&&e.location){const i=this.object.getLocation(),n=M.dif(e.location,i);if(n&&Math.abs(n.x)<2&&Math.abs(n.y)<2){let r=i;(Math.abs(n.x)>1||Math.abs(n.y)>1)&&(r=M.sum(i,M.product(n,.5))),super.processUpdateMessage(new Xo(r,e.location,e.direction));return}}if(e.location&&!t&&super.processUpdateMessage(new Xo(e.location,e.location,e.direction)),e instanceof ht){e.state>0?this.updateInterval=Ko.DEFAULT_UPDATE_INTERVAL/this.getUpdateIntervalValue(e.state):this.updateInterval=1,this.handleDataUpdate(e);return}t&&e.isSlide&&(this.updateInterval=Ko.DEFAULT_UPDATE_INTERVAL),super.processUpdateMessage(e)}getUpdateIntervalValue(e){return e/ua.MAX_ANIMATION_COUNT}getAnimationValue(e){return e%ua.MAX_ANIMATION_COUNT}handleDataUpdate(e){const t=this.getAnimationValue(e.state);if(t!==e.state){const i=new ps;i.setString(t.toString()),e=new ht(t,i,e.extra)}super.processUpdateMessage(e)}update(e){this.object&&(this._oldLocation.assign(this.object.getLocation()),super.update(e),M.dif(this.object.getLocation(),this._oldLocation).length===0&&this.object.getState(0)!==ua.ANIMATION_NOT_MOVING&&this.object.setState(ua.ANIMATION_NOT_MOVING,0))}};ua.ANIMATION_NOT_MOVING=0,ua.ANIMATION_MOVING=1,ua.MAX_ANIMATION_COUNT=10;let Ub=ua;class N0e extends qe{getEventTypes(){const e=[We.STATE_RANDOM];return this.mergeTypes(super.getEventTypes(),e)}useObject(){!this.object||!this.eventDispatcher||this.eventDispatcher.dispatchEvent(new We(We.STATE_RANDOM,this.object))}}class P0e extends qt{get contextMenu(){return Wr.RANDOM_TELEPORT}}class k0e extends qe{getEventTypes(){const e=[Mn.RODRE_CURRENT_USER_ID];return this.mergeTypes(super.getEventTypes(),e)}update(e){if(super.update(e),this.object&&this.object.model){this.object.model.getValue(b.SESSION_CURRENT_USER_ID)||this.eventDispatcher.dispatchEvent(new Mn(Mn.RODRE_CURRENT_USER_ID,this.object));const t=this.object.model.getValue(b.FURNITURE_DATA).renterId,i=this.object.model.getValue(b.SESSION_CURRENT_USER_ID);t?parseInt(t)===i?this.object.setState(2,0):this.object.setState(1,0):this.object.setState(0,0)}}get widget(){return Xm.RENTABLESPACE}}class x0e extends qt{constructor(){super(),this._roomColorUpdated=!1}getEventTypes(){const e=[x.BACKGROUND_COLOR,ma.ROOM_BACKGROUND_COLOR];return this.mergeTypes(super.getEventTypes(),e)}onDispose(){this._roomColorUpdated&&(this.eventDispatcher&&this.object&&this.object.model.getValue(b.FURNITURE_REAL_ROOM_OBJECT)===1&&this.eventDispatcher.dispatchEvent(new ma(ma.ROOM_BACKGROUND_COLOR,this.object,!1,0,0,0)),this._roomColorUpdated=!1),super.onDispose()}processUpdateMessage(e){super.processUpdateMessage(e),e instanceof ht&&(e.data.writeRoomObjectModel(this.object.model),this.object.model.getValue(b.FURNITURE_REAL_ROOM_OBJECT)===1&&this.processColorUpdate())}processColorUpdate(){if(!this.object||!this.object.model)return;const e=new F_;e.initializeFromRoomObjectModel(this.object.model);const t=e.getValue(0),i=e.getValue(1),n=e.getValue(2),r=e.getValue(3);t>-1&&i>-1&&n>-1&&r>-1&&(this.object.model.setValue(b.FURNITURE_ROOM_BACKGROUND_COLOR_HUE,i),this.object.model.setValue(b.FURNITURE_ROOM_BACKGROUND_COLOR_SATURATION,n),this.object.model.setValue(b.FURNITURE_ROOM_BACKGROUND_COLOR_LIGHTNESS,r),this.object.setState(t,0),this.eventDispatcher&&this.eventDispatcher.dispatchEvent(new ma(ma.ROOM_BACKGROUND_COLOR,this.object,t===1,i,n,r)),this._roomColorUpdated=!0)}mouseEvent(e,t){if(!(!e||!t||!this.object)){switch(e.type){case ue.DOUBLE_CLICK:this.eventDispatcher&&this.eventDispatcher.dispatchEvent(new x(x.BACKGROUND_COLOR,this.object));return}super.mouseEvent(e,t)}}}var Au={},S5={},ka={};Object.defineProperty(ka,"__esModule",{value:!0});ka.loop=ka.conditional=ka.parse=void 0;var D0e=function s(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:i;if(Array.isArray(t))t.forEach(function(a){return s(e,a,i,n)});else if(typeof t=="function")t(e,i,n,s);else{var r=Object.keys(t)[0];Array.isArray(t[r])?(n[r]={},s(e,t[r],i,n[r])):n[r]=t[r](e,i,n,s)}return i};ka.parse=D0e;var L0e=function(e,t){return function(i,n,r,a){t(i,n,r)&&a(i,e,n,r)}};ka.conditional=L0e;var U0e=function(e,t){return function(i,n,r,a){for(var o=[],l=i.pos;t(i,n,r);){var u={};if(a(i,e,n,u),i.pos===l)break;l=i.pos,o.push(u)}return o}};ka.loop=U0e;var ni={};Object.defineProperty(ni,"__esModule",{value:!0});ni.readBits=ni.readArray=ni.readUnsigned=ni.readString=ni.peekBytes=ni.readBytes=ni.peekByte=ni.readByte=ni.buildStream=void 0;var F0e=function(e){return{data:e,pos:0}};ni.buildStream=F0e;var b5=function(){return function(e){return e.data[e.pos++]}};ni.readByte=b5;var B0e=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(t){return t.data[t.pos+e]}};ni.peekByte=B0e;var O0=function(e){return function(t){return t.data.subarray(t.pos,t.pos+=e)}};ni.readBytes=O0;var G0e=function(e){return function(t){return t.data.subarray(t.pos,t.pos+e)}};ni.peekBytes=G0e;var V0e=function(e){return function(t){return Array.from(O0(e)(t)).map(function(i){return String.fromCharCode(i)}).join("")}};ni.readString=V0e;var j0e=function(e){return function(t){var i=O0(2)(t);return e?(i[1]<<8)+i[0]:(i[0]<<8)+i[1]}};ni.readUnsigned=j0e;var z0e=function(e,t){return function(i,n,r){for(var a=typeof t=="function"?t(i,n,r):t,o=O0(e),l=new Array(a),u=0;u=g){var v=g-f.pos;_.push((0,t.readBytes)(v)(f)),p+=v;break}_.push((0,t.readBytes)(m)(f)),p+=m}for(var E=new Uint8Array(p),y=0,T=0;T<_.length;T++)E.set(_[T],y),y+=_[T].length;return E}},n=(0,e.conditional)({gce:[{codes:(0,t.readBytes)(2)},{byteSize:(0,t.readByte)()},{extras:(0,t.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,t.readUnsigned)(!0)},{transparentColorIndex:(0,t.readByte)()},{terminator:(0,t.readByte)()}]},function(h){var f=(0,t.peekBytes)(2)(h);return f[0]===33&&f[1]===249}),r=(0,e.conditional)({image:[{code:(0,t.readByte)()},{descriptor:[{left:(0,t.readUnsigned)(!0)},{top:(0,t.readUnsigned)(!0)},{width:(0,t.readUnsigned)(!0)},{height:(0,t.readUnsigned)(!0)},{lct:(0,t.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,e.conditional)({lct:(0,t.readArray)(3,function(h,f,d){return Math.pow(2,d.descriptor.lct.size+1)})},function(h,f,d){return d.descriptor.lct.exists}),{data:[{minCodeSize:(0,t.readByte)()},i]}]},function(h){return(0,t.peekByte)()(h)===44}),a=(0,e.conditional)({text:[{codes:(0,t.readBytes)(2)},{blockSize:(0,t.readByte)()},{preData:function(f,d,_){return(0,t.readBytes)(_.text.blockSize)(f)}},i]},function(h){var f=(0,t.peekBytes)(2)(h);return f[0]===33&&f[1]===1}),o=(0,e.conditional)({application:[{codes:(0,t.readBytes)(2)},{blockSize:(0,t.readByte)()},{id:function(f,d,_){return(0,t.readString)(_.blockSize)(f)}},i]},function(h){var f=(0,t.peekBytes)(2)(h);return f[0]===33&&f[1]===255}),l=(0,e.conditional)({comment:[{codes:(0,t.readBytes)(2)},i]},function(h){var f=(0,t.peekBytes)(2)(h);return f[0]===33&&f[1]===254}),u=[{header:[{signature:(0,t.readString)(3)},{version:(0,t.readString)(3)}]},{lsd:[{width:(0,t.readUnsigned)(!0)},{height:(0,t.readUnsigned)(!0)},{gct:(0,t.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,t.readByte)()},{pixelAspectRatio:(0,t.readByte)()}]},(0,e.conditional)({gct:(0,t.readArray)(3,function(h,f){return Math.pow(2,f.lsd.gct.size+1)})},function(h,f){return f.lsd.gct.exists}),{frames:(0,e.loop)([n,o,l,r,a],function(h){var f=(0,t.peekByte)()(h);return f===33||f===44})}],c=u;s.default=c})(S5);var w0={};Object.defineProperty(w0,"__esModule",{value:!0});w0.deinterlace=void 0;var Y0e=function(e,t){for(var i=new Array(e.length),n=e.length/t,r=function(f,d){var _=e.slice(d*t,(d+1)*t);i.splice.apply(i,[f*t,t].concat(_))},a=[0,4,2,1],o=[8,8,4,2],l=0,u=0;u<4;u++)for(var c=a[u];c>=c,w-=c,_>o||_==h)break;if(_==l){c=p+1,u=(1<l;)y[N++]=E[_],_=v[_];C=E[_]&255,y[N++]=C,on.arrayBuffer()).then(n=>O5(n)).then(n=>{const r=n.lsd.width,a=n.lsd.height,o=r*a,l=A5(n,!1),u=[],c=[];let h=new Uint8Array(o*4);for(let f=0;f0&&(h=h.slice(0));const d=l[f].pixels,_=l[f].colorTable,g=l[f].transparentIndex,p=l[f].dims;for(let v=0;v{this.processUpdateMessage(new ss(ss.IMAGE_LOADING_FAILED))});else{const n=wn();if(!n)return;if(!n.getTexture(t)){await n.downloadAsset(t)?this.processUpdateMessage(new ss(ss.IMAGE_LOADED)):this.processUpdateMessage(new ss(ss.IMAGE_LOADING_FAILED));return}this.processUpdateMessage(new ss(ss.IMAGE_LOADED))}}};mi.STATE="state",mi.IMAGEURL_KEY="imageUrl",mi.CLICKURL_KEY="clickUrl",mi.OFFSETX_KEY="offsetX",mi.OFFSETY_KEY="offsetY",mi.OFFSETZ_KEY="offsetZ";let xv=mi;class sye extends xv{getAdClickUrl(e){return null}}class nye extends xv{constructor(){super(),this._hasClickUrl=!0}getAdClickUrl(e){return e.getValue(b.FURNITURE_BRANDING_URL)}handleAdClick(e,t,i){if(i.indexOf("http")===0){Jc.openWebPage(i);return}this.eventDispatcher&&this.eventDispatcher.dispatchEvent(new Rt(Rt.ROOM_AD_FURNI_CLICK,this.object,"",i))}}class rye extends qe{constructor(){super(),this._roomColorUpdated=!1}getEventTypes(){const e=[x.DIMMER,x.WIDGET_REMOVE_DIMMER,bu.DIMMER_STATE];return this.mergeTypes(super.getEventTypes(),e)}onDispose(){this._roomColorUpdated&&this.eventDispatcher&&this.object&&(this.object.model.getValue(b.FURNITURE_REAL_ROOM_OBJECT)===1&&(this.eventDispatcher.dispatchEvent(new bu(this.object,0,1,1,16777215,255)),this.eventDispatcher.dispatchEvent(new x(x.WIDGET_REMOVE_DIMMER,this.object))),this._roomColorUpdated=!1),super.onDispose()}processUpdateMessage(e){if(e instanceof ht){if(e.data){const t=e.data.getLegacyString();this.object.model.getValue(b.FURNITURE_REAL_ROOM_OBJECT)===1&&this.processDimmerData(t),super.processUpdateMessage(new ht(this.getStateFromDimmerData(t),e.data))}return}super.processUpdateMessage(e)}getStateFromDimmerData(e){if(!e)return 0;const t=e.split(",");return t.length>=5?parseInt(t[0])-1:0}processDimmerData(e){if(!e)return;const t=e.split(",");if(t.length>=5){const i=this.getStateFromDimmerData(e),n=parseInt(t[1]),r=parseInt(t[2]),a=t[3];let o=parseInt(a.substr(1),16),l=parseInt(t[4]);i||(o=16777215,l=255),this.eventDispatcher&&this.object&&(this.eventDispatcher.dispatchEvent(new bu(this.object,i,n,r,o,l)),this._roomColorUpdated=!0)}}useObject(){!this.object||!this.eventDispatcher||this.eventDispatcher.dispatchEvent(new x(x.DIMMER,this.object))}update(e){super.update(e)}}const vo=class vo extends qe{constructor(){super(),this._score=0,this._scoreIncreaser=50,this._scoreTimer=0}processUpdateMessage(e){if(e instanceof ht)return this.updateScore(e.state);super.processUpdateMessage(e)}updateScore(e){this._score=e;const t=this.object.getState(0);if(this._score!==t){let i=this._score-t;i<0&&(i=-i),i*vo.UPDATE_INTERVAL>vo.MAX_UPDATE_TIME?this._scoreIncreaser=vo.MAX_UPDATE_TIME/i:this._scoreIncreaser=vo.UPDATE_INTERVAL,this._scoreTimer=Pe()}}update(e){super.update(e);const t=this.object.getState(0);if(t!==this._score&&e>=this._scoreTimer+this._scoreIncreaser){const i=e-this._scoreTimer;let n=i/this._scoreIncreaser,r=1;this._scorer*(this._score-t)&&(n=r*(this._score-t)),this.object.setState(t+r*n,0),this._scoreTimer=e-(i-n*this._scoreIncreaser)}}};vo.UPDATE_INTERVAL=50,vo.MAX_UPDATE_TIME=3e3;let Fb=vo;class aye extends qe{processUpdateMessage(e){if(super.processUpdateMessage(e),this.object.model.getValue(b.FURNITURE_REAL_ROOM_OBJECT)===1){const t=this.object.model.getValue(b.FURNITURE_EXTRAS),i=parseInt(t);this.object.model.setValue(Fs.INFOSTAND_EXTRA_PARAM,Fs.SONGDISK+i)}}}const In=class In extends qt{constructor(){super(...arguments),this._state=-1,this._sampleId=-1,this._noPitch=!1,this._lastLocZ=0}getEventTypes(){const e=[Zt.ROOM_OBJECT_INITIALIZED,Zt.ROOM_OBJECT_DISPOSED,Zt.PLAY_SAMPLE,Zt.CHANGE_PITCH];return this.mergeTypes(super.getEventTypes(),e)}initialize(e){super.initialize(e),e.logic&&e.logic.soundSample&&(this._sampleId=e.logic.soundSample.id,this._noPitch=e.logic.soundSample.noPitch),this.object.model.setValue(b.FURNITURE_SOUNDBLOCK_RELATIVE_ANIMATION_SPEED,1)}onDispose(){this._state!==In.STATE_UNINITIALIZED&&this.eventDispatcher.dispatchEvent(new Zt(Zt.ROOM_OBJECT_DISPOSED,this.object,this._sampleId)),super.onDispose()}processUpdateMessage(e){super.processUpdateMessage(e),e instanceof ht&&this.updateSoundBlockMessage(e)}updateSoundBlockMessage(e){if(!e)return;const t=this.object&&this.object.model,i=this.object&&this.object.location;!t||!i||(this._state===In.STATE_UNINITIALIZED&&t.getValue(b.FURNITURE_REAL_ROOM_OBJECT)===1&&(this._lastLocZ=i.z,this.eventDispatcher.dispatchEvent(new Zt(Zt.ROOM_OBJECT_INITIALIZED,this.object,this._sampleId,this.getPitchForHeight(i.z)))),this._state!==In.STATE_UNINITIALIZED&&t.getValue(b.FURNITURE_REAL_ROOM_OBJECT)===1&&this._lastLocZ!==i.z&&(this._lastLocZ=i.z,this.eventDispatcher.dispatchEvent(new Zt(Zt.CHANGE_PITCH,this.object,this._sampleId,this.getPitchForHeight(i.z)))),this._state!==In.STATE_UNINITIALIZED&&e.state!==this._state&&this.playSoundAt(i.z),this._state=e.state)}playSoundAt(e){if(!this.object)return;const t=this.getPitchForHeight(e);this.object.model.setValue(b.FURNITURE_SOUNDBLOCK_RELATIVE_ANIMATION_SPEED,t),this.eventDispatcher.dispatchEvent(new Zt(Zt.PLAY_SAMPLE,this.object,this._sampleId,t))}getPitchForHeight(e){if(this._noPitch)return 1;let t=e*2;return t>In.HIGHEST_SEMITONE&&(t=Math.min(0,In.LOWEST_SEMITONE+(t-In.HIGHEST_SEMITONE-1))),Math.pow(2,t/12)}};In.HIGHEST_SEMITONE=12,In.LOWEST_SEMITONE=-12,In.STATE_UNINITIALIZED=-1;let Bb=In;class oye extends qt{constructor(){super(...arguments),this._disposeEventsAllowed=!1,this._isInitialized=!1,this._currentState=-1}getEventTypes(){const e=[X.SOUND_MACHINE_START,X.SOUND_MACHINE_STOP,X.SOUND_MACHINE_DISPOSE,X.SOUND_MACHINE_INIT];return this.mergeTypes(super.getEventTypes(),e)}onDispose(){this.requestDispose(),super.onDispose()}processUpdateMessage(e){if(super.processUpdateMessage(e),this.object.model.getValue(b.FURNITURE_REAL_ROOM_OBJECT)===1&&(this._isInitialized||this.requestInit(),this.object.model.setValue(Fs.INFOSTAND_EXTRA_PARAM,Fs.JUKEBOX),e instanceof ht)){const t=this.object.getState(0);t!==this._currentState&&(this._currentState=t,t===1?this.requestPlayList():t===0&&this.requestStopPlaying())}}requestInit(){!this.object||!this.eventDispatcher||(this._disposeEventsAllowed=!0,this.eventDispatcher.dispatchEvent(new X(X.SOUND_MACHINE_INIT,this.object)),this._isInitialized=!0)}requestPlayList(){!this.object||!this.eventDispatcher||(this._disposeEventsAllowed=!0,this.eventDispatcher.dispatchEvent(new X(X.SOUND_MACHINE_START,this.object)))}requestStopPlaying(){!this.object||!this.eventDispatcher||this.eventDispatcher.dispatchEvent(new X(X.SOUND_MACHINE_STOP,this.object))}requestDispose(){!this._disposeEventsAllowed||!this.object||!this.eventDispatcher||this.eventDispatcher.dispatchEvent(new X(X.SOUND_MACHINE_DISPOSE,this.object))}}const PE=class PE extends qe{getEventTypes(){const e=[x.STICKIE,X.STICKIE];return this.mergeTypes(super.getEventTypes(),e)}initialize(e){super.initialize(e),this.updateColor(),this.object&&this.object.model.setValue(b.FURNITURE_IS_STICKIE,"")}processUpdateMessage(e){super.processUpdateMessage(e),e instanceof Hw&&this.eventDispatcher&&this.eventDispatcher.dispatchEvent(new x(x.STICKIE,this.object)),this.updateColor()}updateColor(){if(!this.object)return;const e=this.object.model.getValue(b.FURNITURE_DATA);let t=PE.STICKIE_COLORS.indexOf(e);t<0&&(t=3),this.object.model.setValue(b.FURNITURE_COLOR,t+1)}useObject(){!this.object||!this.eventDispatcher||this.eventDispatcher.dispatchEvent(new X(X.STICKIE,this.object))}};PE.STICKIE_COLORS=["9CCEFF","FF9CFF","9CFF9C","FFFF33","FF9C9D","FFCD9C","C3B1E1","DBDEFB","FFFFFF","282828"];let Gb=PE;class lye extends qe{getEventTypes(){const e=[x.TROPHY];return this.mergeTypes(super.getEventTypes(),e)}useObject(){!this.object||!this.eventDispatcher||this.eventDispatcher.dispatchEvent(new x(x.TROPHY,this.object))}}const Eo=class Eo extends qt{constructor(){super(),this._total=0,this._lastUpdate=0,this._interval=33}processUpdateMessage(e){if(super.processUpdateMessage(e),e instanceof ht){const t=e.data;if(!t)return;this.updateTotal(t.result)}}updateTotal(e){if(this._total=e,!this._lastUpdate){this.object.model.setValue(b.FURNITURE_VOTE_COUNTER_COUNT,e),this._lastUpdate=Pe();return}if(this._total!==this.currentTotal){const t=Math.abs(this._total-this.currentTotal);t*Eo.UPDATE_INTERVAL>Eo.MAX_UPDATE_TIME?this._interval=Eo.MAX_UPDATE_TIME/t:this._interval=Eo.UPDATE_INTERVAL,this._lastUpdate=Pe()}}update(e){if(super.update(e),this.object&&this.currentTotal!==this._total&&e>=this._lastUpdate+this._interval){const t=e-this._lastUpdate;let i=t/this._interval,n=1;this._totaln*(this._total-this.currentTotal)&&(i=n*(this._total-this.currentTotal)),this.object.model.setValue(b.FURNITURE_VOTE_COUNTER_COUNT,this.currentTotal+n*i),this._lastUpdate=e-(t-i*this._interval)}}get currentTotal(){return this.object.model.getValue(b.FURNITURE_VOTE_COUNTER_COUNT)}};Eo.UPDATE_INTERVAL=33,Eo.MAX_UPDATE_TIME=1e3;let Vb=Eo;class uye extends qt{processUpdateMessage(e){if(super.processUpdateMessage(e),!!this.object&&e instanceof ht){const t=e.data;t instanceof B_&&this.object.model.setValue(b.FURNITURE_VOTE_MAJORITY_RESULT,t.result)}}}class hye extends qt{mouseEvent(e,t){!e||!t||(e.type===ue.DOUBLE_CLICK&&this.eventDispatcher&&this.eventDispatcher.dispatchEvent(new We(We.STATE_CHANGE,this.object)),super.mouseEvent(e,t))}}class cye extends qt{initialize(e){super.initialize(e);let t="";e.logic&&e.logic.maskType&&e.logic.maskType!==""&&e.logic.maskType.length>0&&(t=e.logic.maskType),this.object.model.setValue(b.FURNITURE_USES_PLANE_MASK,1),this.object.model.setValue(b.FURNITURE_PLANE_MASK_TYPE,t)}}class fye extends qe{getEventTypes(){const e=[x.YOUTUBE,Mn.RODRE_URL_PREFIX];return this.mergeTypes(super.getEventTypes(),e)}update(e){super.update(e),this.object.model.getValue(b.SESSION_URL_PREFIX)||this.eventDispatcher.dispatchEvent(new Mn(Mn.RODRE_URL_PREFIX,this.object))}useObject(){!this.object||!this.eventDispatcher||this.eventDispatcher.dispatchEvent(new x(x.YOUTUBE,this.object))}}class dye extends Ko{constructor(){super(),this._selected=!1,this._reportedLocation=null,this._postureIndex=0,this._gestureIndex=0,this._headDirectionDelta=0,this._directions=[],this._talkingEndTimestamp=0,this._gestureEndTimestamp=0,this._expressionEndTimestamp=0}getEventTypes(){const e=[Ee.CLICK,es.POSITION_CHANGED];return this.mergeTypes(super.getEventTypes(),e)}initialize(e){if(!e)return;const t=this.object&&this.object.model;if(t){if(e.logic&&e.logic.model){const i=e.logic.model.directions;if(i&&i.length){for(const n of i)this._directions.push(n);this._directions.sort()}}t.setValue(b.PET_ALLOWED_DIRECTIONS,this._directions)}}dispose(){this._selected&&this.object&&this.eventDispatcher&&this.eventDispatcher.dispatchEvent(new es(es.OBJECT_REMOVED,this.object)),this._directions=null,this._reportedLocation=null}update(e){if(super.update(e),this._selected&&this.object&&this.eventDispatcher){const t=this.object.getLocation();(!this._reportedLocation||this._reportedLocation.x!==t.x||this._reportedLocation.y!==t.y||this._reportedLocation.z!==t.z)&&(this._reportedLocation||(this._reportedLocation=new M),this._reportedLocation.assign(t),this.eventDispatcher.dispatchEvent(new es(es.POSITION_CHANGED,this.object)))}this.object&&this.object.model&&this.updateModel(e,this.object.model)}updateModel(e,t){this._gestureEndTimestamp>0&&e>this._gestureEndTimestamp&&(t.setValue(b.FIGURE_GESTURE,null),this._gestureEndTimestamp=0),this._talkingEndTimestamp>0&&e>this._talkingEndTimestamp&&(t.setValue(b.FIGURE_TALK,0),this._talkingEndTimestamp=0),this._expressionEndTimestamp>0&&e>this._expressionEndTimestamp&&(t.setValue(b.FIGURE_EXPRESSION,0),this._expressionEndTimestamp=0)}processUpdateMessage(e){if(!e||!this.object)return;super.processUpdateMessage(e);const t=this.object&&this.object.model;if(t){if(e instanceof Mv){t.setValue(b.HEAD_DIRECTION,e.headDirection);return}if(e instanceof wv){const i=new Hv(e.figure);t.setValue(b.FIGURE,e.figure),t.setValue(b.RACE,e.subType),t.setValue(b.PET_PALETTE_INDEX,i.paletteId),t.setValue(b.PET_COLOR,i.color),t.setValue(b.PET_TYPE,i.typeId),t.setValue(b.PET_CUSTOM_LAYER_IDS,i.customLayerIds),t.setValue(b.PET_CUSTOM_PARTS_IDS,i.customPartIds),t.setValue(b.PET_CUSTOM_PALETTE_IDS,i.customPaletteIds),t.setValue(b.PET_IS_RIDING,e.isRiding?1:0);return}if(e instanceof jw){t.setValue(b.FIGURE_POSTURE,e.postureType);return}if(e instanceof Vw){t.setValue(b.FIGURE_TALK,1),this._talkingEndTimestamp=this.time+e.numberOfWords*1e3;return}if(e instanceof zw){t.setValue(b.FIGURE_SLEEP,e.isSleeping?1:0);return}if(e instanceof g5){t.setValue(b.FIGURE_GESTURE,e.gesture),this._gestureEndTimestamp=this.time+3e3;return}if(e instanceof Cv){this._selected=e.selected,this._reportedLocation=null;return}if(e instanceof u5){t.setValue(b.FIGURE_EXPERIENCE_TIMESTAMP,this.time),t.setValue(b.FIGURE_GAINED_EXPERIENCE,e.gainedExperience);return}}}mouseEvent(e,t){let i=null;switch(e.type){case ue.MOUSE_CLICK:i=Ee.CLICK;break;case ue.DOUBLE_CLICK:break;case ue.MOUSE_DOWN:{this.object.model.getValue(b.PET_TYPE)===U_.MONSTERPLANT&&this.eventDispatcher&&this.eventDispatcher.dispatchEvent(new Ee(Ee.MOUSE_DOWN,this.object,e.eventId,e.altKey,e.ctrlKey,e.shiftKey,e.buttonDown));break}}i&&this.eventDispatcher&&this.eventDispatcher.dispatchEvent(new Ee(i,this.object,e.eventId,e.altKey,e.ctrlKey,e.shiftKey,e.buttonDown))}}class C5{constructor(){this._width=0,this._height=0,this._wallHeight=0,this._fixedWallsHeight=0,this._tileMap=[],this._holeMap=[],this._doors=[],this._dimensions={minX:0,maxX:0,minY:0,maxY:0},this._restrictsDragging=!1,this._restrictedScale=1,this._restrictsScaling=!1}get width(){return this._width}set width(e){this._width=e}get height(){return this._height}set height(e){this._height=e}get wallHeight(){return this._wallHeight}set wallHeight(e){this._wallHeight=e}get fixedWallsHeight(){return this._fixedWallsHeight}set fixedWallsHeight(e){this._fixedWallsHeight=e}get tileMap(){return this._tileMap}get holeMap(){return this._holeMap}get doors(){return this._doors}get dimensions(){return this._dimensions}get restrictsDragging(){return this._restrictsDragging}set restrictsDragging(e){this._restrictsDragging=e}get restrictsScaling(){return this._restrictsScaling}set restrictsScaling(e){this._restrictsScaling=e}get restrictedScale(){return this._restrictedScale}set restrictedScale(e){this._restrictedScale=e}}const kE=class kE{constructor(e,t,i){this.type=e,this.loc=t,this.category=i}get loc(){return this._loc}set loc(e){this._loc||(this._loc=new M),this._loc.assign(e)}get type(){return this._type}set type(e){this._type=e}get category(){return this._category}set category(e){this._category=e}dispose(){this._loc=null}};kE.WINDOW="window",kE.HOLE="hole";let Vu=kE;class _ye{constructor(){this._masks=[]}get masks(){return this._masks}}class M5{constructor(){this._masks=new Map}get maskCount(){return this._masks.size}dispose(){this._masks&&(this.reset(),this._masks=null)}initialize(e){if(!e)return!1;if(this._masks.clear(),e.masks.length)for(const t of e.masks){if(!t)continue;const i=t.locations.length?t.locations[0]:null;i&&this._masks.set(t.id,new Vu(t.type,i,t.category))}return!0}reset(){for(const e of this._masks.values())e&&e.dispose();this._masks.clear()}addMask(e,t,i,n){const r=new Vu(t,i,n);this._masks.delete(e),this._masks.set(e,r)}removeMask(e){const t=this._masks.get(e);return t?(this._masks.delete(e),t.dispose(),!0):!1}getXML(){const e=new _ye;for(const[t,i]of this._masks.entries()){if(!i)continue;const n=this.getMaskType(i),r=this.getMaskCategory(i),a=this.getMaskLocation(i);if(n&&r&&a){const o={id:t,type:n,category:r,locations:[{x:a.x,y:a.y,z:a.z}]};e.masks.push(o)}}return e}getMaskLocation(e){return e?e.loc:null}getMaskType(e){return e?e.type:null}getMaskCategory(e){return e?e.category:null}get masks(){return this._masks}}class gye{constructor(e,t,i,n){this._leftSideLoc=0,this._rightSideLoc=0,this._leftSideLength=0,this._rightSideLength=0,this._leftSideLoc=e,this._rightSideLoc=t,this._leftSideLength=i,this._rightSideLength=n}get leftSideLoc(){return this._leftSideLoc}get rightSideLoc(){return this._rightSideLoc}get leftSideLength(){return this._leftSideLength}get rightSideLength(){return this._rightSideLength}}const nu=class nu{constructor(e,t,i,n,r){this._type=0,this._loc=null,this._leftSide=null,this._rightSide=null,this._normal=null,this._normalDirection=null;let a,o,l,u,c,h,f,d;if(this._secondaryNormals=[],this._masks=[],this._loc=new M,this._loc.assign(t),this._leftSide=new M,this._leftSide.assign(i),this._rightSide=new M,this._rightSide.assign(n),this._type=e,i!=null&&n!=null&&(this._normal=M.crossProduct(i,n),a=0,o=0,l=0,u=0,c=0,this.normal.x!=0||this.normal.y!=0?(u=this.normal.x,c=this.normal.y,a=360+Math.atan2(c,u)/Math.PI*180,a>=360&&(a=a-360),u=Math.sqrt(this.normal.x*this.normal.x+this.normal.y*this.normal.y),c=this.normal.z,o=360+Math.atan2(c,u)/Math.PI*180,o>=360&&(o=o-360)):this.normal.z<0?o=90:o=270,this._normalDirection=new M(a,o,l)),r!=null&&r.length>0)for(h=0;h0&&(d=new M,d.assign(f),d.multiply(1/d.length),this._secondaryNormals.push(d)),h++}get type(){return this._type}get loc(){return this._loc}get leftSide(){return this._leftSide}get rightSide(){return this._rightSide}get normal(){return this._normal}get normalDirection(){return this._normalDirection}get secondaryNormalCount(){return this._secondaryNormals.length}get maskCount(){return this._masks.length}getSecondaryNormal(e){if(e<0||e>=this.secondaryNormalCount)return null;const t=new M;return t.assign(this._secondaryNormals[e]),t}addMask(e,t,i,n){const r=new gye(e,t,i,n);this._masks.push(r)}getMask(e){return e<0||e>=this.maskCount?null:this._masks[e]}getMaskLeftSideLoc(e){const t=this.getMask(e);return t!=null?t.leftSideLoc:-1}getMaskRightSideLoc(e){const t=this.getMask(e);return t!=null?t.rightSideLoc:-1}getMaskLeftSideLength(e){const t=this.getMask(e);return t!=null?t.leftSideLength:-1}getMaskRightSideLength(e){const t=this.getMask(e);return t!=null?t.rightSideLength:-1}};nu.PLANE_UNDEFINED=0,nu.PLANE_FLOOR=1,nu.PLANE_WALL=2,nu.PLANE_LANDSCAPE=3,nu.PLANE_BILLBOARD=4;let Nt=nu;class pye{constructor(e,t,i,n){this._x=e,this._y=t,this._width=i,this._height=n}get x(){return this._x}get y(){return this._y}get width(){return this._width}get height(){return this._height}}const pc=class pc{constructor(){this._corners=[],this._endPoints=[],this._directions=[],this._lengths=[],this._leftTurns=[],this._borders=[],this._hideWalls=[],this._manuallyLeftCut=[],this._manuallyRightCut=[],this._addDuplicates=!1,this._count=0}addWall(e,t,i,n,r){(this._addDuplicates||this.checkIsNotDuplicate(e,t,i,n,r))&&(this._corners.push(e),this._directions.push(t),this._lengths.push(i),this._borders.push(n),this._leftTurns.push(r),this._hideWalls.push(!1),this._manuallyLeftCut.push(!1),this._manuallyRightCut.push(!1),this._count++)}checkIsNotDuplicate(e,t,i,n,r){let a=0;for(;a0&&ti&&(i=o),a++}n++}return i}static findEntranceTile(e){if(!e)return null;const t=e.length;if(!t)return null;const i=[];let n=0;for(;n=0){i.push(a);break}a++}i.length>11&1)*3,c=l+(o>>10&1)*3,h=l+(o>>9&1)*3,f=l+(o>>8&1)*3,n=0;n<3;)d=n+1,p[m][a+n]=(u*(3-n)+c*n)/3,p[m+3][a+d]=(h*(3-d)+f*d)/3,p[m+d][a]=(u*(3-d)+h*d)/3,p[m+n][a+3]=(c*(3-n)+f*n)/3,n++;p[m+1][a+1]=u>l?l+2:l+1,p[m+1][a+2]=c>l?l+2:l+1,p[m+2][a+1]=h>l?l+2:l+1,p[m+2][a+2]=f>l?l+2:l+1}a=a+4,t++}m=m+4,i++}return p}static addTileTypes(e){let t,i,n,r,a,o,l,u,c,h,f,d,_;const g=e.length-1,p=e[0].length-1;for(i=1;i=0&&e=0&&t=0)ethis._maxX&&(this._maxX=e),tthis._maxY&&(this._maxY=t);else{if(e==this._minX||e==this._maxX){for(r=!1,a=this._minY;a=0){r=!0;break}a++}r||(e==this._minX&&this._minX++,e==this._maxX&&this._maxX--)}if(t==this._minY||t==this._maxY){for(o=!1,l=this._minX;l=0){o=!0;break}l++}o||(t==this._minY&&this._minY++,t==this._maxY&&this._maxY--)}}return!0}return!1}getTileHeight(e,t){if(e<0||e>=this._width||t<0||t>=this._height)return Be.TILE_BLOCKED;const i=this._tileMatrix[t];return i[e]===void 0?0:Math.abs(i[e])}getTileHeightOriginal(e,t){return e<0||e>=this._width||t<0||t>=this._height?Be.TILE_BLOCKED:this._floorHoleMatrix[t][e]?Be.TILE_HOLE:this._tileMatrixOriginal[t][e]}getTileHeightInternal(e,t){return e<0||e>=this._width||t<0||t>=this._height?Be.TILE_BLOCKED:this._tileMatrix[t][e]}initializeFromTileData(e=-1){let t,i;for(this._fixedWallHeight=e,i=0;ithis.maxX||h.ythis.maxY)&&(i=!0),a=u[c](h,t),a==null)return null;if(o=Math.abs(a.x-h.x)+Math.abs(a.y-h.y),h.x==a.x||h.y==a.y?(c=(c-1+u.length)%u.length,o=o+1,n=!0):(c=(c+1)%u.length,o--),l.addWall(h,r,o,i,n),a.x==e.x&&a.y==e.y&&(a.x!=h.x||a.y!=h.y))break;h=a}return l.count==0?null:l}hidePeninsulaWallChains(e){let t,i,n,r,a=0;const o=e.count;for(;a0&&i--,i>1&&(n=!0),t=a,a++;if(n)for(r=l;r<=t;)e.setHideWall(r,!0),r++;a++}}updateWallsNextToHoles(e){let t,i,n,r,a,o,l;const u=e.count;let c=0;for(;c0&&o==0){e.setLength(c,l);break}o++}else if(o>0){e.moveCorner(c,o);break}l++}o==n&&e.setHideWall(c,!0)}c++}}resolveOriginalWallIndex(e,t,i){let n,r,a,o,l,u;const c=Math.min(e.y,t.y),h=Math.max(e.y,t.y),f=Math.min(e.x,t.x),d=Math.max(e.x,t.x),_=i.count;let g=0;for(;g<_;){if(n=i.getCorner(g),r=i.getEndPoint(g),e.x==t.x){if(n.x==e.x&&r.x==e.x&&(a=Math.min(n.y,r.y),o=Math.max(n.y,r.y),a<=c&&h<=o))return g}else if(e.y==t.y&&n.y==e.y&&r.y==e.y&&(l=Math.min(n.x,r.x),u=Math.max(n.x,r.x),l<=f&&d<=u))return g;g++}return-1}hideOriginallyHiddenWalls(e,t){let i,n,r,a,o;const l=e.count;let u=0;for(;u=0?t.getHideWall(o)&&e.setHideWall(u,!0):e.setHideWall(u,!0)),u++}checkWallHiding(e,t){this.hidePeninsulaWallChains(t),this.updateWallsNextToHoles(e),this.hideOriginallyHiddenWalls(e,t)}addWalls(e,t){const i=e.count,n=t.count;let r=0;for(;r=0&&(L=0?(E=t.getDirection((v+1)%n),y=t.getDirection((v-1+n)%n)):(E=e.getDirection((r+1)%i),y=e.getDirection((r-1+i)%i));let T=null;(E-o+4)%4==3?T=cr.WALL_NORMAL_VECTORS[E]:(o-y+4)%4==3&&(T=cr.WALL_NORMAL_VECTORS[y]);const w=e.getLeftTurn(r),C=e.getLeftTurn((r-1+i)%i),N=e.getHideWall((r+1)%i),P=e.getManuallyLeftCut(r),k=e.getManuallyRightCut(r);this.addWall(_,p,m,T,!C||P,!w||k,!N)}r++}}createWallPlanes(){const e=this._tileMatrix;if(e==null)return!1;let t,i,n;const r=e.length;let a=0;if(r==0)return!1;for(t=0;t0?a=Math.min(a,n.length):a=n.length,t++}const o=Math.min(Be.MAX_WALL_ADDITIONAL_HEIGHT,this._fixedWallHeight!=-1?this._fixedWallHeight:Be.getFloorHeight(e)),l=this.minX;let u=this.minY;for(u=this.minY;u<=this.maxY;){if(this.getTileHeightInternal(l,u)>Be.TILE_HOLE){u--;break}u++}if(u>this.maxY)return!1;const c=new Q(l,u),h=this.generateWallData(c,!0),f=this.generateWallData(c,!1);for(h!=null&&(h.count,f.count,this.checkWallHiding(h,f),this.addWalls(h,f)),i=0;in)return new Q(e.x+i-1,e.y);if(this.getTileHeightInternal(e.x+i,e.y+1)<=n)return new Q(e.x+i,e.y+1);i++}return null}extractRightWall(e,t){if(e==null)return null;let i=1,n=Be.TILE_HOLE;for(t||(n=Be.TILE_BLOCKED);i<1e3;){if(this.getTileHeightInternal(e.x,e.y+i)>n)return new Q(e.x,e.y+(i-1));if(this.getTileHeightInternal(e.x-1,e.y+i)<=n)return new Q(e.x-1,e.y+i);i++}return null}extractBottomWall(e,t){if(e==null)return null;let i=1,n=Be.TILE_HOLE;for(t||(n=Be.TILE_BLOCKED);i<1e3;){if(this.getTileHeightInternal(e.x-i,e.y)>n)return new Q(e.x-(i-1),e.y);if(this.getTileHeightInternal(e.x-i,e.y-1)<=n)return new Q(e.x-i,e.y-1);i++}return null}extractLeftWall(e,t){if(e==null)return null;let i=1,n=Be.TILE_HOLE;for(t||(n=Be.TILE_BLOCKED);i<1e3;){if(this.getTileHeightInternal(e.x,e.y-i)>n)return new Q(e.x,e.y-(i-1));if(this.getTileHeightInternal(e.x+1,e.y-i)<=n)return new Q(e.x+1,e.y-i);i++}return null}addWall(e,t,i,n,r,a,o){this.addPlane(Nt.PLANE_WALL,e,t,i,[n]),this.addPlane(Nt.PLANE_LANDSCAPE,e,t,i,[n]);const l=Be.WALL_THICKNESS*this._wallThicknessMultiplier,u=Be.FLOOR_THICKNESS*this._floorThicknessMultiplier,c=M.crossProduct(t,i),h=M.product(c,1/c.length*-l);if(this.addPlane(Nt.PLANE_WALL,M.sum(e,i),t,h,[c,n]),r&&this.addPlane(Nt.PLANE_WALL,M.sum(M.sum(e,t),i),M.product(i,-(i.length+u)/i.length),h,[c,n]),a&&(this.addPlane(Nt.PLANE_WALL,M.sum(e,M.product(i,-u/i.length)),M.product(i,(i.length+u)/i.length),h,[c,n]),o)){const f=M.product(t,l/t.length);this.addPlane(Nt.PLANE_WALL,M.sum(M.sum(e,i),M.product(f,-1)),f,h,[c,t,n])}}addFloor(e,t,i,n,r,a,o){let l,u,c;this.addPlane(Nt.PLANE_FLOOR,e,t,i)!=null&&(l=Be.FLOOR_THICKNESS*this._floorThicknessMultiplier,u=new M(0,0,l),c=M.dif(e,u),a&&this.addPlane(Nt.PLANE_FLOOR,c,t,u),o&&this.addPlane(Nt.PLANE_FLOOR,M.sum(c,M.sum(t,i)),M.product(t,-1),u),n&&this.addPlane(Nt.PLANE_FLOOR,M.sum(c,i),M.product(i,-1),u),r&&this.addPlane(Nt.PLANE_FLOOR,M.sum(c,t),i,u))}initializeFromMapData(e){if(!e)return!1;this.reset(),this.resetFloorHoles();const t=e.width,i=e.height,n=e.wallHeight,r=e.fixedWallsHeight;if(this.initializeTileMap(t,i),e.tileMap){let a=0;for(;a=this.planeCount)return null;const t=this._planes[e];return t?t.loc:null}getPlaneNormal(e){if(e<0||e>=this.planeCount)return null;const t=this._planes[e];return t?t.normal:null}getPlaneLeftSide(e){if(e<0||e>=this.planeCount)return null;const t=this._planes[e];return t?t.leftSide:null}getPlaneRightSide(e){if(e<0||e>=this.planeCount)return null;const t=this._planes[e];return t?t.rightSide:null}getPlaneNormalDirection(e){if(e<0||e>=this.planeCount)return null;const t=this._planes[e];return t?t.normalDirection:null}getPlaneSecondaryNormals(e){let t,i;if(e<0||e>=this.planeCount)return null;const n=this._planes[e];if(n!=null){for(t=[],i=0;i=this.planeCount)return Nt.PLANE_UNDEFINED;const t=this._planes[e];return t?t.type:Nt.PLANE_UNDEFINED}getPlaneMaskCount(e){if(e<0||e>=this.planeCount)return 0;const t=this._planes[e];return t?t.maskCount:0}getPlaneMaskLeftSideLoc(e,t){if(e<0||e>=this.planeCount)return-1;const i=this._planes[e];return i?i.getMaskLeftSideLoc(t):-1}getPlaneMaskRightSideLoc(e,t){if(e<0||e>=this.planeCount)return-1;const i=this._planes[e];return i?i.getMaskRightSideLoc(t):-1}getPlaneMaskLeftSideLength(e,t){if(e<0||e>=this.planeCount)return-1;const i=this._planes[e];return i?i.getMaskLeftSideLength(t):-1}getPlaneMaskRightSideLength(e,t){if(e<0||e>=this.planeCount)return-1;const i=this._planes[e];return i?i.getMaskRightSideLength(t):-1}addFloorHole(e,t,i,n,r){this.removeFloorHole(e),this._floorHoles.set(e,new pye(t,i,n,r))}removeFloorHole(e){this._floorHoles.delete(e)}resetFloorHoles(){this._floorHoles.clear()}initializeHoleMap(){let e,t,i,n,r,a,o,l;for(t=0;t=this._width?this._width-1:a,o=o<0?0:o,l=l>=this._height?this._height-1:l,t=o;t<=l;){for(i=this._floorHoleMatrix[t],e=r;e<=a;)i[e]=!0,e++;t++}}extractPlanes(e){let t,i,n,r,a,o,l,u,c,h,f,d,_,g,p;const m=e.length,v=e[0].length,E=[];let y=0;for(;y0&&e[T-1][n]==i==o);)n++;for(l=n==v||e[T][n]!=i,f=!1,r=T+1;r0&&e[r][t-1]==i==a||n=this._colorTransitionLength)t=this._targetColor,i=this._targetLight,this._colorChangedTime=0;else{let r=this._originalColor>>16&255,a=this._originalColor>>8&255,o=this._originalColor&255;const l=this._targetColor>>16&255,u=this._targetColor>>8&255,c=this._targetColor&255,h=(e-this._colorChangedTime)/this._colorTransitionLength;r=r+(l-r)*h,a=a+(u-a)*h,o=o+(c-o)*h,t=(r<<16)+(a<<8)+o,i=this._originalLight+(this._targetLight-this._originalLight)*h,this._color=t,this._light=i}let n=z_.rgbToHSL(t);n=(n&16776960)+i,t=z_.hslToRGB(n),this.object.model&&this.object.model.setValue(b.ROOM_BACKGROUND_COLOR,t)}processUpdateMessage(e){if(!e||!this.object)return;const t=this.object.model;if(t){if(e instanceof bi){this.onObjectRoomUpdateMessage(e,t);return}if(e instanceof $i){this.onObjectRoomMaskUpdateMessage(e,t);return}if(e instanceof Ca){this.onObjectRoomPlaneVisibilityUpdateMessage(e,t);return}if(e instanceof wa){this.onObjectRoomPlanePropertyUpdateMessage(e,t);return}if(e instanceof Oa){this.onObjectRoomFloorHoleUpdateMessage(e,t);return}if(e instanceof q_){this.onObjectRoomColorUpdateMessage(e,t);return}e instanceof Nv&&this.onObjectRoomMapUpdateMessage(e)}}onObjectRoomUpdateMessage(e,t){switch(e.type){case bi.ROOM_FLOOR_UPDATE:t.setValue(b.ROOM_FLOOR_TYPE,e.value);return;case bi.ROOM_WALL_UPDATE:t.setValue(b.ROOM_WALL_TYPE,e.value);return;case bi.ROOM_LANDSCAPE_UPDATE:t.setValue(b.ROOM_LANDSCAPE_TYPE,e.value);return}}onObjectRoomMaskUpdateMessage(e,t){let i=null,n=!1;switch(e.type){case $i.ADD_MASK:i=Vu.WINDOW,e.maskCategory===$i.HOLE&&(i=Vu.HOLE),this._planeBitmapMaskParser.addMask(e.maskId,e.maskType,e.maskLocation,i),n=!0;break;case $i.REMOVE_MASK:n=this._planeBitmapMaskParser.removeMask(e.maskId);break}n&&t.setValue(b.ROOM_PLANE_MASK_XML,this._planeBitmapMaskParser.getXML())}onObjectRoomPlaneVisibilityUpdateMessage(e,t){let i=0;switch(e.visible&&(i=1),e.type){case Ca.FLOOR_VISIBILITY:t.setValue(b.ROOM_FLOOR_VISIBILITY,i);return;case Ca.WALL_VISIBILITY:t.setValue(b.ROOM_WALL_VISIBILITY,i),t.setValue(b.ROOM_LANDSCAPE_VISIBILITY,i);return}}onObjectRoomPlanePropertyUpdateMessage(e,t){switch(e.type){case wa.FLOOR_THICKNESS:t.setValue(b.ROOM_FLOOR_THICKNESS,e.value);return;case wa.WALL_THICKNESS:t.setValue(b.ROOM_WALL_THICKNESS,e.value);return}}onObjectRoomFloorHoleUpdateMessage(e,t){switch(e.type){case Oa.ADD:this._planeParser.addFloorHole(e.id,e.x,e.y,e.width,e.height),this._needsMapUpdate=!0;return;case Oa.REMOVE:this._planeParser.removeFloorHole(e.id),this._needsMapUpdate=!0;return}this._lastHoleUpdate=this.time}onObjectRoomColorUpdateMessage(e,t){!e||!t||(this._originalColor=this._color,this._originalLight=this._light,this._targetColor=e.color,this._targetLight=e.light,this._colorChangedTime=this.time,this._skipColorTransition?this._colorTransitionLength=0:this._colorTransitionLength=1500,t.setValue(b.ROOM_COLORIZE_BG_ONLY,e.backgroundOnly))}onObjectRoomMapUpdateMessage(e){!e||!e.mapData||(this.object.model.setValue(b.ROOM_MAP_DATA,e.mapData),this.object.model.setValue(b.ROOM_FLOOR_HOLE_UPDATE_TIME,this.time),this._planeParser.initializeFromMapData(e.mapData))}mouseEvent(e,t){if(!e||!t||!this.object||!this.object.model)return;const i=e.spriteTag;let n=0;if(i&&i.indexOf("@")>=0&&(n=parseInt(i.substr(i.indexOf("@")+1))),n<1||n>this._planeParser.planeCount){e.type===ue.ROLL_OUT&&this.object.model.setValue(b.ROOM_SELECTED_PLANE,0);return}n--;let r=null;const a=this._planeParser.getPlaneLocation(n),o=this._planeParser.getPlaneLeftSide(n),l=this._planeParser.getPlaneRightSide(n),u=this._planeParser.getPlaneNormalDirection(n),c=this._planeParser.getPlaneType(n);if(a==null||o==null||l==null||u==null)return;const h=o.length,f=l.length;if(h==0||f==0)return;const d=e.screenX,_=e.screenY,g=new Q(d,_);if(r=t.getPlanePosition(g,a,o,l),!r){this.object.model.setValue(b.ROOM_SELECTED_PLANE,0);return}const p=M.product(o,r.x/h);p.add(M.product(l,r.y/f)),p.add(a);const m=p.x,v=p.y,E=p.z;if(r.x>=0&&r.x=0&&r.y360&&(w-=360));const C=o.length*r.x/h,N=l.length*r.y/f;T=new hh(y,this.object,e.eventId,a,o,l,C,N,w,e.altKey,e.ctrlKey,e.shiftKey,e.buttonDown)}this.eventDispatcher&&this.eventDispatcher.dispatchEvent(T);return}}}}class vye extends I0{initialize(e){this.object&&(this.object.model.setValue(b.FURNITURE_ALPHA_MULTIPLIER,1),this.object.setState(1,0))}processUpdateMessage(e){if(super.processUpdateMessage(e),e instanceof Ma&&this.object)switch(e.type){case Ma.ENABLED:this.object.setState(0,0);return;case Ma.DISABLED:this.object.setState(1,0);return}}}const yr=class yr extends I0{constructor(){super(),this._lastEventId=null,this._isHidden=!1}initialize(e){this.object&&(this.object.model.setValue(b.FURNITURE_ALPHA_MULTIPLIER,1),this.object.setState(yr.CURSOR_HIDDEN_STATE,0))}processUpdateMessage(e){e instanceof ch&&(this._lastEventId&&this._lastEventId===e.sourceEventId||(e.toggleVisibility&&(this._isHidden=!this._isHidden),super.processUpdateMessage(e),this.object&&(this._isHidden?this.object.setState(yr.CURSOR_HIDDEN_STATE,0):e.visible?(this.object.model.setValue(b.TILE_CURSOR_HEIGHT,e.height),this.object.setState(e.height>.8?yr.CURSOR_HEIGHT_STATE:yr.CURSOR_VISIBLE_STATE)):this.object.setState(yr.CURSOR_HIDDEN_STATE,0)),this._lastEventId=e.sourceEventId))}};yr.CURSOR_VISIBLE_STATE=0,yr.CURSOR_HIDDEN_STATE=1,yr.CURSOR_HEIGHT_STATE=6;let jb=yr;class N5{constructor(e,t,i){this._id=e,this._type=t,this._visualization=i}dispose(){this._visualization=null}update(e,t){}animate(e){return!1}get id(){return this._id}get type(){return this._type}get visualization(){return this._visualization}}const Os=class Os extends N5{constructor(e,t,i){super(e,t,i),this._asset=null,this._startTime=Pe(),this._delta=0,this._offsetY=0,this._scale=0,this._state=0}update(e,t){if(!e)return;this._scale=t;let i=64,n=0;if(t<48?(this._asset=this.visualization.getAvatarRenderAsset("avatar_addition_user_blowkiss_small"),this.visualization.angle===90||this.visualization.angle===270?n=0:this.visualization.angle===135||this.visualization.angle===180||this.visualization.angle===225?n=6:n=-6,this._offsetY=-38,i=32):(this._asset=this.visualization.getAvatarRenderAsset("avatar_addition_user_blowkiss"),this.visualization.angle===90||this.visualization.angle===270?n=-3:this.visualization.angle===135||this.visualization.angle===180||this.visualization.angle===225?n=22:n=-30,this._offsetY=-70),this.visualization.posture===oe.POSTURE_SIT?this._offsetY+=i/2:this.visualization.posture===oe.POSTURE_LAY&&(this._offsetY+=i),this._asset){e.texture=this._asset,e.offsetX=n,e.offsetY=this._offsetY,e.relativeDepth=-.02,e.alpha=0;const r=this._delta;this.animate(e),this._delta=r}}animate(e){if(!e)return!1;if(this._asset&&(e.texture=this._asset),this._state===Os.STATE_DELAY)return Pe()-this._startTime=1&&(e.alpha=255,this._delta=0,this._state=Os.STATE_FLOAT),!0;if(this._state===Os.STATE_FLOAT){const t=Math.pow(this._delta,.9);this._delta+=.05;const i=this._scale<48?-30:-40;return e.offsetY=this._offsetY+(this._delta<1?t:1)*i,e.alpha=(1-t)*255,e.alpha<=0&&(e.visible=!1,this._state=Os.STATE_COMPLETE),!0}return!1}};Os.DELAY_BEFORE_ANIMATION=300,Os.STATE_DELAY=0,Os.STATE_FADE_IN=1,Os.STATE_FLOAT=2,Os.STATE_COMPLETE=3;let zb=Os;const ru=class ru{static getExpressionAddition(e,t,i){switch(t){case this.BLOW:return new zb(e,this.BLOW,i);default:return new N5(e,t,i)}}};ru.WAVE=1,ru.BLOW=2,ru.LAUGH=3,ru.CRY=4,ru.IDLE=5;let Hb=ru;const Di=class Di{constructor(e,t){this._id=e,this._visualization=t,this._asset=null,this._startTime=Pe(),this._offsetY=0,this._scale=0,this._state=0}dispose(){this._visualization=null,this._asset=null}getSpriteAssetName(e){let t="left";return(this._visualization.angle===135||this._visualization.angle===180||this._visualization.angle===225||this._visualization.angle===270)&&(t="right"),"avatar_addition_user_idle_"+t+"_"+e+(this._scale<48?"_small":"")}update(e,t){if(!e)return;this._scale=t,this._asset=this._visualization.getAvatarRenderAsset(this.getSpriteAssetName(this._state===Di.STATE_FRAME_A?1:2));let i=64,n=0;t<48?(this._visualization.angle===135||this._visualization.angle===180||this._visualization.angle===225||this._visualization.angle===270?n=10:n=-16,this._offsetY=-38,i=32):(this._visualization.angle===135||this._visualization.angle===180||this._visualization.angle===225||this._visualization.angle===270?n=22:n=-30,this._offsetY=-70),this._visualization.posture===oe.POSTURE_SIT?this._offsetY+=i/2:this._visualization.posture===oe.POSTURE_LAY&&(this._offsetY+=i-.3*i),this._asset&&(e.texture=this._asset,e.offsetX=n,e.offsetY=this._offsetY,e.relativeDepth=-.02,e.alpha=0)}animate(e){if(!e)return!1;const t=Pe();return this._state===Di.STATE_DELAY&&t-this._startTime>=Di.DELAY_BEFORE_ANIMATION&&(this._state=Di.STATE_FRAME_A,this._startTime=t,this._asset=this._visualization.getAvatarRenderAsset(this.getSpriteAssetName(1))),this._state===Di.STATE_FRAME_A&&t-this._startTime>=Di.DELAY_PER_FRAME&&(this._state=Di.STATE_FRAME_B,this._startTime=t,this._asset=this._visualization.getAvatarRenderAsset(this.getSpriteAssetName(2))),this._state===Di.STATE_FRAME_B&&t-this._startTime>=Di.DELAY_PER_FRAME&&(this._state=Di.STATE_FRAME_A,this._startTime=t,this._asset=this._visualization.getAvatarRenderAsset(this.getSpriteAssetName(1))),this._asset?(e.texture=this._asset,e.alpha=255,e.visible=!0):e.visible=!1,!1}get id(){return this._id}};Di.DELAY_BEFORE_ANIMATION=2e3,Di.DELAY_PER_FRAME=2e3,Di.STATE_DELAY=0,Di.STATE_FRAME_A=1,Di.STATE_FRAME_B=2;let Wb=Di;const Tr=class Tr{constructor(e){this._id=e,this._asset=null,this._disposed=!1}dispose(){this._asset=null}update(e,t){if(e){if(!this._asset){const i=new mt(Ne.WHITE);i.alpha=0,i.width=Tr.WIDTH,i.height=Tr.HEIGHT,this._asset=St.generateTexture(i)}e.visible=!0,e.texture=this._asset,e.offsetX=Tr.OFFSET_X,e.offsetY=Tr.OFFSET_Y,e.alphaTolerance=tr.MATCH_ALL_PIXELS}}animate(e){return!1}get id(){return this._id}};Tr.WIDTH=46,Tr.HEIGHT=60,Tr.OFFSET_X=-23,Tr.OFFSET_Y=-48;let Yb=Tr;class Eye{constructor(e,t,i){this._id=e,this._visualization=t,this._asset=null,this._relativeDepth=0,this._status=i}dispose(){this._visualization=null,this._asset=null}update(e,t){if(!e)return;e.visible=!0,e.relativeDepth=this._relativeDepth,e.alpha=255;let i=64,n=0,r=0;this._asset=this._visualization.getAvatarRenderAsset(this._status===Mr.GUIDE?"avatar_addition_user_guide_bubble":"avatar_addition_user_guide_requester_bubble"),t<48?(n=-19,r=-80,i=32):(n=-19,r=-120),this._visualization.posture===oe.POSTURE_SIT?r+=i/2:this._visualization.posture===oe.POSTURE_LAY&&(r+=t),this._asset&&(e.texture=this._asset,e.offsetX=n,e.offsetY=r,e.relativeDepth=-.02+0)}animate(e){return this._asset&&e&&(e.texture=this._asset),!1}get id(){return this._id}get relativeDepth(){return this._relativeDepth}set relativeDepth(e){this._relativeDepth=e}}class yye{constructor(e,t){this._id=e,this._visualization=t,this._asset=null}dispose(){this._visualization=null,this._asset=null}update(e,t){if(!e)return;let i=64,n=0,r=0;t<48?(this._asset=this._visualization.getAvatarRenderAsset("avatar_addition_user_muted_small"),i=32,n=-12,r=-66):(this._asset=this._visualization.getAvatarRenderAsset("avatar_addition_user_muted"),n=-15,r=-110),this._visualization.posture===oe.POSTURE_SIT?r+=i/2:this._visualization.posture===oe.POSTURE_LAY&&(r+=t),this._asset?(e.visible=!0,e.texture=this._asset,e.offsetX=n,e.offsetY=r,e.relativeDepth=-.02):e.visible=!1}animate(e){return this._asset&&e&&(e.texture=this._asset),!1}get id(){return this._id}}class Tye{constructor(e,t,i){this._id=e,this._visualization=i,this._asset=null,this._scale=0,this._number=t,this._numberValueFadeDirection=0,this._numberValueMoving=!1,this._numberValueMoveCounter=0}dispose(){this._visualization=null,this._asset=null}update(e,t){if(!e)return;this._scale=t;let i=64,n=0,r=0;this._number>0?(t<48?(this._asset=this._visualization.getAvatarRenderAsset("avatar_addition_number_"+this._number+"_small"),i=32,n=-6,r=-52):(this._asset=this._visualization.getAvatarRenderAsset("avatar_addition_number_"+this._number),n=-8,r=-105),this._visualization.posture===oe.POSTURE_SIT?r+=i/2:this._visualization.posture===oe.POSTURE_LAY&&(r+=t),this._asset?(e.visible=!0,e.texture=this._asset,e.offsetX=n,e.offsetY=r,e.relativeDepth=-.01,e.alpha=0,this._numberValueFadeDirection=1,this._numberValueMoving=!0,this._numberValueMoveCounter=0):e.visible=!1):e.visible&&(this._numberValueFadeDirection=-1)}animate(e){if(!e)return!1;this._asset&&(e.texture=this._asset);let t=e.alpha,i=!1;if(this._numberValueMoving){if(this._numberValueMoveCounter++,this._numberValueMoveCounter<10)return!1;if(this._numberValueFadeDirection<0)this._scale<48?e.offsetY-=2:e.offsetY-=4;else{let n=4;this._scale<48&&(n=8),this._numberValueMoveCounter%n||(e.offsetY--,i=!0)}}return this._numberValueFadeDirection>0?(t<255&&(t+=32),t>=255&&(t=255,this._numberValueFadeDirection=0),e.alpha=t,!0):this._numberValueFadeDirection<0?(t>=0&&(t-=32),t<=0&&(this._numberValueFadeDirection=0,this._numberValueMoving=!1,t=0,e.visible=!1),e.alpha=t,!0):i}get id(){return this._id}}class Iye{constructor(e,t){this._id=e,this._visualization=t,this._asset=null,this._relativeDepth=0}dispose(){this._visualization=null,this._asset=null}update(e,t){if(!e)return;e.visible=!0,e.relativeDepth=this._relativeDepth,e.alpha=255;let i=64,n=0,r=0;t<48?(this._asset=this._visualization.getAvatarRenderAsset("avatar_addition_user_typing_small"),n=3,r=-42,i=32):(this._asset=this._visualization.getAvatarRenderAsset("avatar_addition_user_typing"),n=14,r=-83),this._visualization.posture===oe.POSTURE_SIT?r+=i/2:this._visualization.posture===oe.POSTURE_LAY&&(r+=t),this._asset&&(e.texture=this._asset,e.offsetX=n,e.offsetY=r,e.relativeDepth=-.02+0)}animate(e){return this._asset&&e&&(e.texture=this._asset),!1}get id(){return this._id}get relativeDepth(){return this._relativeDepth}set relativeDepth(e){this._relativeDepth=e}}class Dv extends Bs{constructor(){super()}initialize(e){return!0}onDispose(){this._avatarRenderer=null}createAvatarImage(e,t,i=null,n=null,r=null){let a=null;return t>48?a=this._avatarRenderer.createAvatarImage(e,kr.LARGE,i,n,r):a=this._avatarRenderer.createAvatarImage(e,kr.SMALL,i,n,r),a}getAvatarRendererAsset(e){return this._avatarRenderer?this._avatarRenderer.assets.getTexture(e):null}get avatarManager(){return this._avatarRenderer}set avatarManager(e){this._avatarRenderer=e}get layerCount(){return 0}}const te=class te extends Kc{constructor(){super(),this._data=null,this._avatarImage=null,this._cachedAvatars=new li,this._cachedAvatarEffects=new li,this._shadow=null,this._lastUpdate=-1e3,this._disposed=!1,this._figure=null,this._gender=null,this._direction=-1,this._headDirection=-1,this._posture="",this._postureParameter="",this._canStandUp=!1,this._postureOffset=0,this._verticalOffset=0,this._angle=-1,this._headAngle=-1,this._talk=!1,this._expression=0,this._sleep=!1,this._blink=!1,this._gesture=0,this._sign=-1,this._highlightEnabled=!1,this._highlight=!1,this._dance=0,this._effect=0,this._carryObject=0,this._useObject=0,this._ownUser=!1,this._isLaying=!1,this._layInside=!1,this._isAnimating=!1,this._extraSpritesStartIndex=2,this._forcedAnimFrames=0,this._updatesUntilFrameUpdate=0,this._isAvatarReady=!1,this._needsUpdate=!1,this._geometryUpdateCounter=-1,this._additions=new Map}initialize(e){return e instanceof Dv?(this._data=e,this.createSprites(te.INITIAL_RESERVED_SPRITES),super.initialize(e),!0):!1}dispose(){this._disposed||(super.dispose(),this._avatarImage&&this._avatarImage.dispose(),this._shadow=null,this._disposed=!0)}update(e,t,i,n){if(!this.object||!e||!this._data||t0)&&i;if(d&&(this._forcedAnimFrames=te.ANIMATION_FRAME_UPDATE_INTERVAL),d||_){if(this.updateSpriteCounter++,this._forcedAnimFrames--,this._updatesUntilFrameUpdate--,this._updatesUntilFrameUpdate<=0||l||f||c)this._avatarImage.updateAnimationByFrames(1),this._updatesUntilFrameUpdate=te.ANIMATION_FRAME_UPDATE_INTERVAL;else return;let g=this._avatarImage.getCanvasOffsets();(!g||g.length<3)&&(g=te.DEFAULT_CANVAS_OFFSETS);const p=this.getSprite(te.SPRITE_INDEX_AVATAR);if(p){const y=this.object.model.getValue(b.FIGURE_HIGHLIGHT_ENABLE)===1&&this.object.model.getValue(b.FIGURE_HIGHLIGHT)===1,T=this._avatarImage.getImage(_s.FULL,y);T&&(p.texture=T,y||(p.filters=[])),p.texture&&(p.offsetX=-1*a/2+g[0]-(p.texture.width-a)/2,p.offsetY=-p.texture.height+a/4+g[1]+this._postureOffset),this._isLaying?this._layInside?p.relativeDepth=-.5:p.relativeDepth=te.AVATAR_SPRITE_LAYING_DEPTH+g[2]:p.relativeDepth=te.AVATAR_SPRITE_DEFAULT_DEPTH+g[2],this._ownUser?(p.relativeDepth-=te.AVATAR_OWN_DEPTH_ADJUST,p.spriteType=Js.AVATAR_OWN):p.spriteType=Js.AVATAR}const m=this.getAddition(te.TYPING_BUBBLE_ID);m&&(this._isLaying?m.relativeDepth=te.AVATAR_SPRITE_LAYING_DEPTH-.01+g[2]:m.relativeDepth=te.AVATAR_SPRITE_DEFAULT_DEPTH-.01+g[2]),this._isAnimating=this._avatarImage.isAnimating();let v=te.INITIAL_RESERVED_SPRITES;const E=this._avatarImage.getDirection();for(const y of this._avatarImage.getSprites())if(y.id===te.AVATAR){const T=this.getSprite(te.SPRITE_INDEX_AVATAR);if(T){const w=this._avatarImage.getLayerData(y);let C=y.getDirectionOffsetX(E),N=y.getDirectionOffsetY(E);w&&(C+=w.dx,N+=w.dy),a<48&&(C/=2,N/=2),this._canStandUp||(T.offsetX+=C,T.offsetY+=N)}}else{const T=this.getSprite(v);if(T){T.alphaTolerance=tr.MATCH_NOTHING,T.visible=!0;const w=this._avatarImage.getLayerData(y);let C=0,N=y.getDirectionOffsetX(E),P=y.getDirectionOffsetY(E);const k=y.getDirectionOffsetZ(E);let L=0;y.hasDirections&&(L=E),w&&(C=w.animationFrame,N+=w.dx,P+=w.dy,L+=w.dd),a<48&&(N/=2,P/=2),L<0?L+=8:L>7&&(L-=8);const j=this._avatarImage.getScale()+"_"+y.member+"_"+L+"_"+C,z=this._avatarImage.getAsset(j);if(!z)continue;T.texture=z.texture,T.offsetX=z.offsetX-a/2+N,T.offsetY=z.offsetY+P,T.flipH=z.flipH,y.hasStaticY?T.offsetY+=this._verticalOffset*a/(2*te.BASE_Y_SCALE):T.offsetY+=this._postureOffset,this._isLaying?T.relativeDepth=te.AVATAR_SPRITE_LAYING_DEPTH-.001*this.totalSprites*k:T.relativeDepth=te.AVATAR_SPRITE_DEFAULT_DEPTH-.001*this.totalSprites*k,y.ink===33?T.blendMode=ge.ADD:T.blendMode=ge.NORMAL}v++}}}createAvatarImage(e,t){let i=null,n="avatarImage"+e.toString();if(t?(n+="-"+t,i=this._cachedAvatarEffects.getValue(n)):i=this._cachedAvatars.getValue(n),!i&&(i=this._data.createAvatarImage(this._figure,e,this._gender,this,this),i))if(!t)this._cachedAvatars.add(n,i);else{if(this._cachedAvatarEffects.length>=te.MAX_EFFECT_CACHE){const r=this._cachedAvatarEffects.remove(this._cachedAvatarEffects.getKey(0));r&&r.dispose()}this._cachedAvatarEffects.add(n,i)}return i}updateObject(e,t,i,n=!1){if(!n&&this.updateObjectCounter===e.updateCounter&&this._geometryUpdateCounter===t.updateId)return!1;let r=e.getDirection().x-t.direction.x,a=this._headDirection-t.direction.x;return this._posture==="float"&&(a=r),r=(r%360+360)%360,a=(a%360+360)%360,this._posture==="sit"&&this._canStandUp&&(r-=r%90-45,a-=a%90-45),(r!==this._angle||n)&&(i=!0,this._angle=r,r=r-(135-22.5),r=(r+360)%360,this._avatarImage.setDirectionAngle(_s.FULL,r)),(a!==this._headAngle||n)&&(i=!0,this._headAngle=a,this._headAngle!==this._angle&&(a=a-(135-22.5),a=(a+360)%360,this._avatarImage.setDirectionAngle(_s.HEAD,a))),this._geometryUpdateCounter=t.updateId,this.updateObjectCounter=this.object.updateCounter,i}updateModel(e,t){if(!e||this.updateModelCounter===e.updateCounter)return!1;let i=!1;const n=e.getValue(b.FIGURE_TALK)>0;n!==this._talk&&(this._talk=n,i=!0);const r=e.getValue(b.FIGURE_EXPRESSION);r!==this._expression&&(this._expression=r,i=!0);const a=e.getValue(b.FIGURE_SLEEP)>0;a!==this._sleep&&(this._sleep=a,i=!0);const o=e.getValue(b.FIGURE_BLINK)>0;o!==this._blink&&(this._blink=o,i=!0);const l=e.getValue(b.FIGURE_GESTURE)||0;l!==this._gesture&&(this._gesture=l,i=!0);const u=e.getValue(b.FIGURE_POSTURE);u!==this._posture&&(this._posture=u,i=!0);const c=e.getValue(b.FIGURE_POSTURE_PARAMETER);c!==this._postureParameter&&(this._postureParameter=c,i=!0);const h=e.getValue(b.FIGURE_CAN_STAND_UP);h!==this._canStandUp&&(this._canStandUp=h,i=!0);const f=e.getValue(b.FIGURE_VERTICAL_OFFSET)*te.BASE_Y_SCALE;f!==this._verticalOffset&&(this._verticalOffset=f,i=!0);const d=e.getValue(b.FIGURE_DANCE)||0;d!==this._dance&&(this._dance=d,i=!0);const _=e.getValue(b.FIGURE_EFFECT)||0;_!==this._effect&&(this._effect=_,i=!0);const g=e.getValue(b.FIGURE_CARRY_OBJECT)||0;g!==this._carryObject&&(this._carryObject=g,i=!0);const p=e.getValue(b.FIGURE_USE_OBJECT)||0;p!==this._useObject&&(this._useObject=p,i=!0);const m=e.getValue(b.HEAD_DIRECTION);m!==this._headDirection&&(this._headDirection=m,i=!0),this._carryObject>0&&p>0?this._useObject!==this._carryObject&&(this._useObject=this._carryObject,i=!0):this._useObject!==0&&(this._useObject=0,i=!0);let v=this.getAddition(te.FLOATING_IDLE_Z_ID);this._sleep?(v||(v=this.addAddition(new Wb(te.FLOATING_IDLE_Z_ID,this))),i=!0):v&&this.removeAddition(te.FLOATING_IDLE_Z_ID);const E=e.getValue(b.FIGURE_IS_MUTED)>0;let y=this.getAddition(te.MUTED_BUBBLE_ID);if(E)y||(y=this.addAddition(new yye(te.MUTED_BUBBLE_ID,this))),i=!0;else{y&&(this.removeAddition(te.MUTED_BUBBLE_ID),i=!0);const G=e.getValue(b.FIGURE_IS_TYPING)>0;let Y=this.getAddition(te.TYPING_BUBBLE_ID);G?(Y||(Y=this.addAddition(new Iye(te.TYPING_BUBBLE_ID,this))),i=!0):Y&&(this.removeAddition(te.TYPING_BUBBLE_ID),i=!0)}const T=e.getValue(b.FIGURE_GUIDE_STATUS)||0;T!==Mr.NONE?(this.removeAddition(te.GUIDE_BUBBLE_ID),this.addAddition(new Eye(te.GUIDE_BUBBLE_ID,this,T)),i=!0):this.getAddition(te.GUIDE_BUBBLE_ID)&&(this.removeAddition(te.GUIDE_BUBBLE_ID),i=!0);const w=e.getValue(b.FIGURE_IS_PLAYING_GAME)>0;let C=this.getAddition(te.GAME_CLICK_TARGET_ID);w?(C||(C=this.addAddition(new Yb(te.GAME_CLICK_TARGET_ID))),i=!0):C&&this.removeAddition(te.GAME_CLICK_TARGET_ID);const N=e.getValue(b.FIGURE_NUMBER_VALUE);let P=this.getAddition(te.NUMBER_BUBBLE_ID);N>0?(P||(P=this.addAddition(new Tye(te.NUMBER_BUBBLE_ID,N,this))),i=!0):P&&this.removeAddition(te.NUMBER_BUBBLE_ID);let k=this.getAddition(te.EXPRESSION_ID);this._expression>0?k||(k=Hb.getExpressionAddition(te.EXPRESSION_ID,this._expression,this),k&&this.addAddition(k)):k&&this.removeAddition(te.EXPRESSION_ID),this.updateScale(t);const L=e.getValue(b.GENDER);L!==this._gender&&(this._gender=L,i=!0),this.updateFigure(e.getValue(b.FIGURE))&&(i=!0);let j=e.getValue(b.FIGURE_SIGN);j===null&&(j=-1),this._sign!==j&&(this._sign=j,i=!0);const z=e.getValue(b.FIGURE_HIGHLIGHT_ENABLE)>0;if(z!==this._highlightEnabled&&(this._highlightEnabled=z,i=!0),this._highlightEnabled){const G=e.getValue(b.FIGURE_HIGHLIGHT)>0;G!==this._highlight&&(this._highlight=G,i=!0)}const ne=e.getValue(b.OWN_USER)>0;return ne!==this._ownUser&&(this._ownUser=ne,i=!0),this.updateModelCounter=e.updateCounter,i}setDirection(e){this._direction!==e&&(this._direction=e,this._needsUpdate=!0)}updateScale(e){e<48&&(this._blink=!1),this._posture==="sit"||this._posture==="lay"?this._postureOffset=e/2:this._postureOffset=0,this._layInside=!1,this._isLaying=!1,this._posture==="lay"&&(this._isLaying=!0,parseInt(this._postureParameter)<0&&(this._layInside=!0))}processActionsForAvatar(e){if(!e)return;if(e.initActionAppends(),e.appendAction(oe.POSTURE,this._posture,this._postureParameter),this._gesture>0&&this._avatarImage.appendAction(oe.GESTURE,oe.getGesture(this._gesture)),this._dance>0&&this._avatarImage.appendAction(oe.DANCE,this._dance),this._sign>-1&&this._avatarImage.appendAction(oe.SIGN,this._sign),this._carryObject>0&&this._avatarImage.appendAction(oe.CARRY_OBJECT,this._carryObject),this._useObject>0&&this._avatarImage.appendAction(oe.USE_OBJECT,this._useObject),this._talk&&this._avatarImage.appendAction(oe.TALK),(this._sleep||this._blink)&&this._avatarImage.appendAction(oe.SLEEP),this._expression>0){const i=oe.getExpression(this._expression);if(i!=="")switch(i){case oe.DANCE:this._avatarImage.appendAction(oe.DANCE,2);break;default:this._avatarImage.appendAction(i);break}}this._effect>0&&this._avatarImage.appendAction(oe.EFFECT,this._effect),e.endActionAppends(),this._isAnimating=e.isAnimating();let t=te.INITIAL_RESERVED_SPRITES;for(const i of this._avatarImage.getSprites())i.id!==te.AVATAR&&t++;if(t!==this.totalSprites&&this.createSprites(t),this._extraSpritesStartIndex=t,this._additions)for(const i of this._additions.values())this.createSprite()}updateFigure(e){return this._figure===e?!1:(this._figure=e,this.clearAvatar(),!0)}resetFigure(e){this.clearAvatar()}resetEffect(e){this.clearAvatar()}clearAvatar(){for(const t of this._cachedAvatars.getValues())t&&t.dispose();for(const t of this._cachedAvatarEffects.getValues())t&&t.dispose();this._cachedAvatars.reset(),this._cachedAvatarEffects.reset(),this._avatarImage=null;const e=this.getSprite(te.AVATAR_LAYER_ID);e&&(e.texture=Ne.EMPTY,e.alpha=255)}getAddition(e){if(!this._additions)return null;const t=this._additions.get(e);return t||null}addAddition(e){if(!this.getAddition(e.id))return this._additions.set(e.id,e),e}removeAddition(e){const t=this.getAddition(e);t&&(this._additions.delete(t.id),t.dispose())}updateShadow(e){this._shadow=null;const t=this.getSprite(te.SHADOW_LAYER_ID);if(!t)return;let i=this._posture==="mv"||this._posture==="std"||this._posture==="sit"&&this._canStandUp;if(this._effect===te.SNOWBOARDING_EFFECT&&(i=!1),i){if(t.visible=!0,!this._shadow||e!==this._scale){let n=0,r=0;e<48?(t.libraryAssetName="sh_std_sd_1_0_0",this._shadow=this._avatarImage.getAsset(t.libraryAssetName),n=-8,r=this._canStandUp?6:-3):(t.libraryAssetName="h_std_sd_1_0_0",this._shadow=this._avatarImage.getAsset(t.libraryAssetName),n=-17,r=this._canStandUp?10:-7),this._shadow?(t.texture=this._shadow.texture,t.offsetX=n,t.offsetY=r,t.alpha=50,t.relativeDepth=1):t.visible=!1}}else this._shadow=null,t.visible=!1}getAvatarRenderAsset(e){return this._data?this._data.getAvatarRendererAsset(e):null}get direction(){return this._direction}get posture(){return this._posture}get angle(){return this._angle}get disposed(){return this._disposed}};te.AVATAR="avatar",te.FLOATING_IDLE_Z_ID=1,te.TYPING_BUBBLE_ID=2,te.EXPRESSION_ID=3,te.NUMBER_BUBBLE_ID=4,te.GAME_CLICK_TARGET_ID=5,te.MUTED_BUBBLE_ID=6,te.GUIDE_BUBBLE_ID=7,te.OWN_USER_ID=4,te.UPDATE_TIME_INCREASER=41,te.AVATAR_LAYER_ID=0,te.SHADOW_LAYER_ID=1,te.SNOWBOARDING_EFFECT=97,te.INITIAL_RESERVED_SPRITES=2,te.ANIMATION_FRAME_UPDATE_INTERVAL=2,te.DEFAULT_CANVAS_OFFSETS=[0,0,0],te.MAX_EFFECT_CACHE=2,te.SPRITE_INDEX_AVATAR=0,te.BASE_Y_SCALE=1e3,te.AVATAR_SPRITE_DEFAULT_DEPTH=-.01,te.AVATAR_OWN_DEPTH_ADJUST=.001,te.AVATAR_SPRITE_LAYING_DEPTH=-.409;let Xb=te;const ws=class ws{static allocate(e,t,i,n,r,a,o=-1,l=0){const u=ws.POOL.length?ws.POOL.pop():new ws;return n<1&&(n=1),r<0&&(r=ws.FRAME_REPEAT_FOREVER),u._id=e,u._x=t||0,u._y=i||0,u._repeats=n,u._frameRepeats=r,u._remainingFrameRepeats=r,u._isLastFrame=a,u._isRecycled=!1,o>=0?(u._activeSequence=o,u._activeSequenceOffset=l):(u._activeSequence=-1,u._activeSequenceOffset=0),u}get id(){return this._id>=0?this._id:-this._id*Math.random()}get x(){return this._x}get y(){return this._y}get repeats(){return this._repeats}get frameRepeats(){return this._frameRepeats}get isLastFrame(){return this._isLastFrame}get remainingFrameRepeats(){return this._frameRepeats<0?ws.FRAME_REPEAT_FOREVER:this._remainingFrameRepeats}set remainingFrameRepeats(e){e<0&&(e=0),this._frameRepeats>0&&e>this._frameRepeats&&(e=this._frameRepeats),this._remainingFrameRepeats=e}get activeSequence(){return this._activeSequence}get activeSequenceOffset(){return this._activeSequenceOffset}recycle(){this._isRecycled||(this._isRecycled=!0,ws.POOL.length=0;)this._frameIndexes[e]===t?i++:(t=this._frameIndexes[e],i=1),this._frameRepeats[e]=i,e--}addFrame(e,t,i,n,r,a){let o=1;if(this._frames.length>0){const u=this._frames[this._frames.length-1];u.id===e&&!u.hasDirectionalOffsets()&&u.x===t&&u.y===i&&u.randomX===n&&n===0&&u.randomY===r&&r===0&&(o+=u.repeats,this._frames.pop())}const l=a?new Rye(e,t,i,n,r,a,o):new P5(e,t,i,n,r,o);this._frames.push(l),this._frameIndexes.push(this._frames.length-1),this._frameRepeats.push(1)}getFrame(e){return!this._frames.length||e<0||e>=this.frameCount?null:this._frames[this._frameIndexes[e%this._frameIndexes.length]]}getFrameIndex(e){return e<0||e>=this.frameCount?-1:(this._isRandom&&(e=Math.round(Math.random()*this._frameIndexes.length),e===this._frameIndexes.length&&e--),e)}getRepeats(e){return e<0||e>=this.frameCount?0:this._frameRepeats[e%this._frameRepeats.length]}}class bye{constructor(e,t,i){this._frameSequences=[],this._frameCount=-1,this._loopCount=e<0?0:e,this._frameRepeat=t<1?1:t,this._isRandom=i}get frameCount(){return this._frameCount<0&&this.calculateLength(),this._frameCount}dispose(){if(!(!this._frameSequences||!this._frameSequences.length)){for(const e of this._frameSequences)e&&e.dispose();this._frameSequences=[]}}addFrameSequence(e,t){const i=new Sye(e,t);return this._frameSequences.push(i),i}calculateLength(){this._frameCount=0;for(const e of this._frameSequences)e&&(this._frameCount+=e.frameCount)}getFrame(e,t){if(this._frameCount<1)return null;if(t=t/this._frameRepeat,!this._isRandom){const r=Math.floor(t/this._frameCount);t=Math.floor(t%this._frameCount);let a=!1,o=null;(this._loopCount>0&&r>=this._loopCount||this._loopCount<=0&&this._frameCount===1)&&(t=this._frameCount-1,a=!0);let l=0,u=0;for(;u=this._frameSequences.length)return null;const r=this._frameSequences[t];return r?i>=r.frameCount?this.getFrame(e,n):this.getFrameFromSpecificSequence(e,r,t,i,!1):null}getFrameFromSpecificSequence(e,t,i,n,r){if(!t)return null;const a=t.getFrameIndex(n),o=t.getFrame(a);if(!o)return null;let l=o.getX(e),u=o.getY(e);const c=o.randomX,h=o.randomY;let f=o.repeats,d=!1;c&&(l=Math.trunc(l+c*Math.random())),h&&(u=Math.trunc(u+h*Math.random())),f>1&&(f=t.getRepeats(a));let _=this._frameRepeat*f;return r&&(_=qo.FRAME_REPEAT_FOREVER),!this._isRandom&&!t.isRandom&&i===this._frameSequences.length-1&&n===t.frameCount-1&&(d=!0),qo.allocate(o.id,l,u,f,_,d,i,n)}}class k5{constructor(){this._offsetX=new Map,this._offsetY=new Map}getXOffset(e,t){const i=this._offsetX.get(e);return i??t}getYOffset(e,t){const i=this._offsetY.get(e);return i??t}setDirection(e,t,i){this._offsetX.set(e,t),this._offsetY.set(e,i)}}const Ir=class Ir{constructor(){this._layers=new Map,this._frameCount=-1,this._randomStart=!1,this._immediateChanges=null}static getTransitionToAnimationId(e){return Ir.TRANSITION_TO_ANIMATION_OFFSET+e}static getTransitionFromAnimationId(e){return Ir.TRANSITION_FROM_ANIMATION_OFFSET+e}static isTransitionToAnimation(e){return e>=Ir.TRANSITION_TO_ANIMATION_OFFSET&&e=Ir.TRANSITION_FROM_ANIMATION_OFFSET}dispose(){for(const e of this._layers.values())e&&e.dispose();this._layers.clear(),this._immediateChanges=null}setImmediateChanges(e){this._immediateChanges=e}isImmediateChange(e){return!(!this._immediateChanges||this._immediateChanges.indexOf(e)===-1)}getStartFrame(e){return this._randomStart?Math.random()*this._frameCount:0}initialize(e){if(e.randomStart&&(this._randomStart=!0),e.layers)for(const t in e.layers){const i=e.layers[t];if(!i)return!1;const n=parseInt(t),r=i.loopCount!==void 0?i.loopCount:1,a=i.frameRepeat!==void 0?i.frameRepeat:1,o=i.random!==void 0&&i.random!==0;if(!this.addLayer(n,r,a,o,i))return!1}return!0}addLayer(e,t,i,n,r){const a=new bye(t,i,n);if(r.frameSequences)for(const l in r.frameSequences){const u=r.frameSequences[l];if(!u)continue;const c=u.loopCount!==void 0?u.loopCount:1,h=u.random!==void 0&&u.random!==0,f=a.addFrameSequence(c,h);if(u.frames)for(const d in u.frames){const _=u.frames[d];if(!_)return a.dispose(),!1;f.addFrame(_.id,_.x||0,_.y||0,_.randomX||0,_.randomY||0,this.readDirectionalOffsets(_))}f.initialize()}a.calculateLength(),this._layers.set(e,a);const o=a.frameCount;return o>this._frameCount&&(this._frameCount=o),!0}readDirectionalOffsets(e){let t=null;if(e&&e.offsets)for(const i in e.offsets){const n=e.offsets[i];n&&(t||(t=new k5),t.setDirection(n.direction,n.x,n.y))}return t}getFrame(e,t,i){const n=this._layers.get(t);return n?n.getFrame(e,i):null}getFrameFromSequence(e,t,i,n,r){const a=this._layers.get(t);return a?a.getFrameFromSequence(e,i,n,r):null}};Ir.TRANSITION_TO_ANIMATION_OFFSET=1e6,Ir.TRANSITION_FROM_ANIMATION_OFFSET=2e6,Ir.DEFAULT_FRAME_NUMBER=0;let fi=Ir;const t_=class t_{constructor(e){this._colors=[],this.createColors(e)}createColors(e){if(e)for(let t=0;ti_.MAX_LAYERS?i_.MAX_LAYERS:e,this._angle=t<1?1:t>360?360:t,this._defaultDirection=new xo(this._layerCount),this._directions=new Map,this._colors=[],this._lastDirectionData=null,this._lastDirection=-1}dispose(){this._defaultDirection&&this._defaultDirection.dispose();for(const e of this._directions.values())e&&e.dispose();for(const e of this._colors)e&&e.dispose();this.reset()}reset(){this._defaultDirection=null,this._colors=[],this._lastDirectionData=null,this._lastDirection=-1,this._directions.clear()}processLayers(e){return e?this.setDirectionLayers(this._defaultDirection,e):!1}processDirections(e){if(!e)return!1;for(const t in e){const i=e[t];if(!i)continue;const n=parseInt(t);if(this._directions.get(n))return!1;const r=new xo(this._layerCount);r.setFromDirection(this._defaultDirection),this.setDirectionLayers(r,i.layers),this._directions.set(n,r),this._lastDirectionData=null,this._lastDirection=-1}return!0}processColors(e){if(!e)return!1;for(const t in e){const i=e[t];if(!i)continue;const n=parseInt(t);if(this._colors[n])return!1;const r=new ju(this._layerCount);for(const a in i.layers){const o=i.layers[a];if(!o)continue;const l=parseInt(a),u=o.color;r.setColorLayer(l,u)}this._colors[n]=r}return!0}setDirectionLayers(e,t){if(!e||!t)return!1;for(const i in t){const n=t[i];if(!n)continue;const r=parseInt(i);if(r<0||r>=this._layerCount)return!1;n.ink!==void 0&&e.setLayerInk(r,ZQ.inkToBlendMode(n.ink)),n.tag!==void 0&&e.setLayerTag(r,n.tag),n.alpha!==void 0&&e.setLayerAlpha(r,n.alpha),n.ignoreMouse!==void 0&&e.setLayerIgnoreMouse(r,n.ignoreMouse),n.x!==void 0&&e.setLayerXOffset(r,n.x),n.y!==void 0&&e.setLayerYOffset(r,n.y),n.z!==void 0&&e.setLayerZOffset(r,n.z/-1e3)}return!0}getValidDirection(e){if(this._directions.get(e))return e;e=(e%360+360)%360;let i=-1,n=-1;for(const r of this._directions.keys()){let a=(r*this._angle-e+360)%360;a>180&&(a=360-a),(a=0?Math.trunc(n):0}getDirectionData(e){if(e===this._lastDirection&&this._lastDirectionData)return this._lastDirectionData;let t=this._directions.get(e);return t||(t=this._defaultDirection),this._lastDirection=e,this._lastDirectionData=t,this._lastDirectionData}getLayerTag(e,t){const i=this.getDirectionData(e);return i?i.getLayerTag(t):rt.DEFAULT_TAG}getLayerInk(e,t){const i=this.getDirectionData(e);return i?i.getLayerInk(t):rt.DEFAULT_INK}getLayerAlpha(e,t){const i=this.getDirectionData(e);return i?i.getLayerAlpha(t):rt.DEFAULT_ALPHA}getLayerColor(e,t){const i=this._colors[t];return i?i.getLayerColor(e):ju.DEFAULT_COLOR}getLayerIgnoreMouse(e,t){const i=this.getDirectionData(e);return i?i.getLayerIgnoreMouse(t):rt.DEFAULT_IGNORE_MOUSE}getLayerXOffset(e,t){const i=this.getDirectionData(e);return i?i.getLayerXOffset(t):rt.DEFAULT_XOFFSET}getLayerYOffset(e,t){const i=this.getDirectionData(e);return i?i.getLayerYOffset(t):rt.DEFAULT_YOFFSET}getLayerZOffset(e,t){const i=this.getDirectionData(e);return i?i.getLayerZOffset(t):rt.DEFAULT_ZOFFSET}get layerCount(){return this._layerCount}};i_.MAX_LAYERS=26;let Lv=i_;class Uv extends Lv{constructor(e,t){super(e,t),this._animations=new Map,this._animationIds=[]}dispose(){super.dispose();for(const e of this._animations.values())e&&e.dispose();this._animations.clear(),this._animationIds=[]}defineAnimations(e){if(!e)return!0;for(const t in e){const i=e[t];if(!i)return!1;let n=parseInt(t.split("_")[0]),r=!1;const a=i.transitionTo,o=i.transitionFrom;a!==void 0&&(n=fi.getTransitionToAnimationId(a),r=!0),o!==void 0&&(n=fi.getTransitionFromAnimationId(o),r=!0);const l=this.createAnimationData();if(!l.initialize(i))return l.dispose(),!1;const u=i.immediateChangeFrom;if(u!==void 0){const c=u.split(","),h=[];for(const f of c){const d=parseInt(f);h.indexOf(d)===-1&&h.push(d)}l.setImmediateChanges(h)}this._animations.set(n,l),r||this._animationIds.push(n)}return!0}createAnimationData(){return new fi}hasAnimation(e){return!!this._animations.get(e)}getAnimationCount(){return this._animationIds.length||0}getAnimationId(e){const t=this.getAnimationCount();return e<0||t<=0?0:this._animationIds[e%t]}isImmediateChange(e,t){const i=this._animations.get(e);return i?i.isImmediateChange(t):!1}getStartFrame(e,t){const i=this._animations.get(e);return i?i.getStartFrame(t):0}getFrame(e,t,i,n){const r=this._animations.get(e);return r?r.getFrame(t,i,n):null}getFrameFromSequence(e,t,i,n,r,a){const o=this._animations.get(e);return o?o.getFrameFromSequence(t,i,n,r,a):null}}class x5{constructor(){this._animationId=-1,this._animationAfterTransitionId=0,this._animationOver=!1,this._frameCounter=0,this._frames=[],this._lastFramePlayed=[],this._animationPlayed=[],this._layerCount=0}get animationOver(){return this._animationOver}set animationOver(e){this._animationOver=e}get frameCounter(){return this._frameCounter}set frameCounter(e){this._frameCounter=e}get animationId(){return this._animationId}set animationId(e){e!==this._animationId&&(this._animationId=e,this.resetAnimationFrames(!1))}get animationAfterTransitionId(){return this._animationAfterTransitionId}set animationAfterTransitionId(e){this._animationAfterTransitionId=e}dispose(){this.recycleFrames(),this._frames=null,this._lastFramePlayed=null,this._animationPlayed=null}setLayerCount(e){this._layerCount=e,this.resetAnimationFrames()}resetAnimationFrames(e=!0){(e||!this._frames)&&(this.recycleFrames(),this._frames=[]),this._lastFramePlayed=[],this._animationPlayed=[],this._animationOver=!1,this._frameCounter=0;let t=0;for(;t=this._layerCount?null:this._frames[e]}setFrame(e,t){if(e<0||e>=this._layerCount)return;const i=this._frames[e];i&&i.recycle(),this._frames[e]=t}getAnimationPlayed(e){return e<0||e>=this._layerCount?!0:this._animationPlayed[e]}setAnimationPlayed(e,t){e<0||e>=this._layerCount||(this._animationPlayed[e]=t)}getLastFramePlayed(e){return e<0||e>=this._layerCount?!0:this._lastFramePlayed[e]}setLastFramePlayed(e,t){e<0||e>=this._layerCount||(this._lastFramePlayed[e]=t)}}const xE=class xE extends Uv{constructor(e,t){super(e,t),this._posturesToAnimations=new Map,this._gesturesToAnimations=new Map,this._defaultPosture=null}processPostures(e){if(!e||(e.defaultPosture&&e.defaultPosture.length&&(this._defaultPosture=e.defaultPosture),!e.postures))return!1;for(const t of e.postures)this._posturesToAnimations.get(t.id)||(this._defaultPosture===null&&(this._defaultPosture=t.id),this._posturesToAnimations.set(t.id,t.animationId));return this._posturesToAnimations.get(this._defaultPosture)!==void 0}processGestures(e){if(!e)return!1;for(const t of e)this._gesturesToAnimations.get(t.id)||this._gesturesToAnimations.set(t.id,t.animationId);return!0}postureToAnimation(e){return this._posturesToAnimations.get(e)||(e=this._defaultPosture),this._posturesToAnimations.get(e)}getGestureDisabled(e){return e==="ded"}gestureToAnimation(e){return this._gesturesToAnimations.get(e)?this._gesturesToAnimations.get(e):xE.DEFAULT}animationToPosture(e,t){if(e>=0&&e=0&&ee){this._sizes[i]/e=0;)this.updateSprite(e,n),n--}else{let n=0;for(;i>0;)i&&this.updateSprite(e,n),n++,i=i>>1}this._alphaChanged=!1}updateSprite(e,t){const i=this.getSpriteAssetName(e,t),n=this.getSprite(t);if(i&&n){const r=this.getAsset(i,t);if(r&&r.texture){n.visible=!0,n.type=this._type,n.texture=r.texture,n.flipH=r.flipH,n.flipV=r.flipV,n.direction=this._direction;let a=0;t!==this._shadowLayerIndex?(n.tag=this.getLayerTag(e,this._direction,t),n.alpha=this.getLayerAlpha(e,this._direction,t),n.color=this.getLayerColor(e,t,this._selectedColor),n.offsetX=r.offsetX+this.getLayerXOffset(e,this._direction,t),n.offsetY=r.offsetY+this.getLayerYOffset(e,this._direction,t),n.blendMode=this.getLayerInk(e,this._direction,t),n.alphaTolerance=this.getLayerIgnoreMouse(e,this._direction,t)?tr.MATCH_NOTHING:tr.MATCH_OPAQUE_PIXELS,a=this.getLayerZOffset(e,this._direction,t),a=a-t*.001):(n.offsetX=r.offsetX,n.offsetY=r.offsetY+this.getLayerYOffset(e,this._direction,t),n.alpha=48*this._alphaMultiplier,n.alphaTolerance=tr.MATCH_NOTHING,a=1),n.relativeDepth=a*s_.DEPTH_MULTIPLIER,n.name=i,n.libraryAssetName=this.getLibraryAssetNameForSprite(r,n),n.posture=this.getPostureForAsset(e,r.source),n.clickHandling=this._clickHandling}else this.resetSprite(n)}else n&&this.resetSprite(n)}getLibraryAssetNameForSprite(e,t){return e.source}getPostureForAssetFile(e,t){return null}resetSprite(e){e&&(e.texture=null,e.libraryAssetName="",e.posture="",e.tag="",e.offsetX=0,e.offsetY=0,e.flipH=!1,e.flipV=!1,e.relativeDepth=0,e.clickHandling=!1)}getSpriteAssetName(e,t){if(!this._data||t>=Fr.LAYER_LETTERS.length)return"";let i=this._assetNames[t],n=this._updatedLayers[t];return(!i||!i.length)&&(i=this.cacheSpriteAssetName(e,t,!0),n=this._cacheSize!==1),n&&(i+=this.getFrameNumber(e,t)),i}cacheSpriteAssetName(e,t,i){this._type;const n=i?this._cacheSize:this.getValidSize(e);let r="";const a=n!==1;if(t!==this._shadowLayerIndex?r=Fr.LAYER_LETTERS[t]||"":r="sd",r==="")return null;const o=this._type+(a?"_"+n+"_"+r+"_"+this._direction+"_":"_icon_"+r);return i&&(this._assetNames[t]=o,this._updatedLayers[t]=a),o}getLayerTag(e,t,i){const n=this._spriteTags[i];if(n!==void 0)return n;if(!this._data)return rt.DEFAULT_TAG;const r=this._data.getLayerTag(e,t,i);return this._spriteTags[i]=r,r}getLayerInk(e,t,i){const n=this._spriteInks[i];if(n!==void 0)return n;if(!this._data)return rt.DEFAULT_INK;const r=this._data.getLayerInk(e,t,i);return this._spriteInks[i]=r,r}getLayerAlpha(e,t,i){if(!this._alphaChanged){const r=this._spriteAlphas[i];if(r!==void 0)return r}if(!this._data)return rt.DEFAULT_ALPHA;let n=this._data.getLayerAlpha(e,t,i);return this._alphaMultiplier!==null&&(n=n*this._alphaMultiplier),this._spriteAlphas[i]=n,n}getLayerColor(e,t,i){const n=this._spriteColors[t];if(n!==void 0)return n;if(!this._data)return ju.DEFAULT_COLOR;const r=this._data.getLayerColor(e,t,i);return this._spriteColors[t]=r,r}getLayerIgnoreMouse(e,t,i){const n=this._spriteMouseCaptures[i];if(n!==void 0)return n;if(!this._data)return rt.DEFAULT_IGNORE_MOUSE;const r=this._data.getLayerIgnoreMouse(e,t,i);return this._spriteMouseCaptures[i]=r,r}getLayerXOffset(e,t,i){const n=this._spriteXOffsets[i];if(n!==void 0)return n;if(!this._data)return rt.DEFAULT_XOFFSET;const r=this._data.getLayerXOffset(e,t,i);return this._spriteXOffsets[i]=r,r}getLayerYOffset(e,t,i){if(i===this._shadowLayerIndex)return Math.ceil(this._furnitureLift*(e/2));const n=this._spriteYOffsets[i];if(n!==void 0)return n;if(!this._data)return rt.DEFAULT_YOFFSET;const r=this._data.getLayerYOffset(e,t,i);return this._spriteYOffsets[i]=r,r}getLayerZOffset(e,t,i){const n=this._spriteZOffsets[i];if(n!==void 0)return n;if(!this._data)return rt.DEFAULT_ZOFFSET;const r=this._data.getLayerZOffset(e,t,i);return this._spriteZOffsets[i]=r,r}getValidSize(e){return this._data?this._data.getValidSize(e):e}setLayerCount(e){this._layerCount=e,this._shadowLayerIndex=e-this.getAdditionalLayerCount()}setDirection(e){this._direction!==e&&(this._direction=e)}getAdditionalLayerCount(){return 1}updateAnimation(e){return 0}getFrameNumber(e,t){return 0}getPostureForAsset(e,t){return null}getAsset(e,t=-1){return this.asset?this.asset.getAsset(e):null}get direction(){return this._direction}get data(){return this._data}};s_.DEPTH_MULTIPLIER=Math.sqrt(.5),s_.TYPE=Z.FURNITURE_STATIC;let za=s_;const mc=class mc extends za{constructor(){super(),this._state=-1,this._frameIncrease=1,this._animationData=new x5,this._animationScale=0,this._animationChangeTime=0,this._animatedLayerCount=0,this._directionChanged=!1}initialize(e){return e instanceof Ww?super.initialize(e):!1}dispose(){super.dispose(),this._animationData&&(this._animationData.dispose(),this._animationData=null)}get animatedLayerCount(){return this._animatedLayerCount}get animationId(){return this._animationData.animationId}getAnimationId(e){return this.animationId!==mc.DEFAULT_ANIMATION_ID&&this.data.hasAnimation(this._animationScale,this.animationId)?this.animationId:mc.DEFAULT_ANIMATION_ID}updateObject(e,t){if(super.updateObject(e,t)){const i=this.object.getState(0);return i!==this._state&&(this.setAnimation(i),this._state=i,this._animationChangeTime=this.object.model.getValue(b.FURNITURE_STATE_UPDATE_TIME)||0),!0}return!1}updateModel(e){if(super.updateModel(e)){if(this.usesAnimationResetting()){const i=this.object.model.getValue(b.FURNITURE_STATE_UPDATE_TIME);i>this._animationChangeTime&&(this._animationChangeTime=i,this.setAnimation(this._state))}const t=this.object.model.getValue(b.FURNITURE_AUTOMATIC_STATE_INDEX);if(!isNaN(t)){const i=this.data.getAnimationId(this._animationScale,t);this.setAnimation(i)}return!0}return!1}isPlayingTransition(e,t){return!(!fi.isTransitionFromAnimation(e.animationId)&&!fi.isTransitionToAnimation(e.animationId)||t!==e.animationAfterTransitionId||e.animationOver)}getCurrentState(e){const t=e.animationId;return!fi.isTransitionFromAnimation(t)&&!fi.isTransitionToAnimation(t)?t:e.animationAfterTransitionId}setAnimation(e){this.data&&this.setSubAnimation(this._animationData,e,this._state>=0)}setSubAnimation(e,t,i=!0){const n=e.animationId;if(i){if(this.isPlayingTransition(e,t))return!1;const r=this.getCurrentState(e);if(t!==r){if(!this.data.isImmediateChange(this._animationScale,t,r)){let a=fi.getTransitionFromAnimationId(r);this.data.hasAnimation(this._animationScale,a)?(e.animationAfterTransitionId=t,t=a):(a=fi.getTransitionToAnimationId(t),this.data.hasAnimation(this._animationScale,a)&&(e.animationAfterTransitionId=t,t=a))}}else if(fi.isTransitionFromAnimation(e.animationId)){const a=fi.getTransitionToAnimationId(t);this.data.hasAnimation(this._animationScale,a)&&(e.animationAfterTransitionId=t,t=a)}else if(!fi.isTransitionToAnimation(e.animationId)&&this.usesAnimationResetting()){const a=fi.getTransitionFromAnimationId(r);if(this.data.hasAnimation(this._animationScale,a))e.animationAfterTransitionId=t,t=a;else{const o=fi.getTransitionToAnimationId(t);this.data.hasAnimation(this._animationScale,o)&&(e.animationAfterTransitionId=t,t=o)}}}return n!==t?(e.animationId=t,!0):!1}getLastFramePlayed(e){return this._animationData.getLastFramePlayed(e)}resetAllAnimationFrames(){this._animationData&&this._animationData.setLayerCount(this._animatedLayerCount)}updateAnimation(e){if(!this.data)return 0;e!==this._animationScale&&(this._animationScale=e,this._animatedLayerCount=this.data.getLayerCount(e),this.resetAllAnimationFrames());const t=this.updateAnimations(e);return this._directionChanged=!1,t}updateAnimations(e){if(this._animationData.animationOver&&!this._directionChanged)return 0;const t=this.updateFramesForAnimation(this._animationData,e);return this._animationData.animationOver&&(fi.isTransitionFromAnimation(this._animationData.animationId)||fi.isTransitionToAnimation(this._animationData.animationId))&&(this.setAnimation(this._animationData.animationAfterTransitionId),this._animationData.animationOver=!1),t}updateFramesForAnimation(e,t){if(e.animationOver&&!this._directionChanged)return 0;const i=this.getAnimationId(e);let n=e.frameCounter;n||(n=this.data.getStartFrame(t,i,this._direction)),n+=this.frameIncrease,e.frameCounter=n,e.animationOver=!0;let r=!1,a=this._animatedLayerCount-1,o=0,l=1<=0;){let u=0;if(r=e.getAnimationPlayed(a),!r||this._directionChanged){let c=e.getLastFramePlayed(a),h=e.getFrame(a);h&&h.isLastFrame&&h.remainingFrameRepeats<=this.frameIncrease&&(c=!0),(this._directionChanged||!h||h.remainingFrameRepeats>=0&&(h.remainingFrameRepeats=h.remainingFrameRepeats-this.frameIncrease)<=0)&&(u=qo.SEQUENCE_NOT_DEFINED,h&&(u=h.activeSequence),u===qo.SEQUENCE_NOT_DEFINED?h=this.data.getFrame(t,i,this._direction,a,n):h=this.data.getFrameFromSequence(t,i,this._direction,a,u,h.activeSequenceOffset+h.repeats,n),e.setFrame(a,h),o=o|l),!h||h.remainingFrameRepeats==qo.FRAME_REPEAT_FOREVER?(c=!0,r=!0):e.animationOver=!1,e.setLastFramePlayed(a,c),e.setAnimationPlayed(a,r)}l=l>>1,a--}return o}getFrameNumber(e,t){const i=this._animationData.getFrame(t);return i?i.id:super.getFrameNumber(e,t)}getLayerXOffset(e,t,i){const n=super.getLayerXOffset(e,t,i),r=this._animationData.getFrame(i);return r?n+r.x:n}getLayerYOffset(e,t,i){const n=super.getLayerYOffset(e,t,i),r=this._animationData.getFrame(i);return r?n+r.y:n}usesAnimationResetting(){return!1}setDirection(e){this._direction!==e&&(super.setDirection(e),this._directionChanged=!0)}get frameIncrease(){return this._frameIncrease}get data(){return this._data}};mc.TYPE=Z.FURNITURE_ANIMATED,mc.DEFAULT_ANIMATION_ID=0;let Kt=mc;const vc=class vc extends Kt{constructor(){super(),this._badgeId="",this._badgeAssetNameNormalScale="",this._badgeAssetNameSmallScale="",this._badgeVisibleInState=-1}updateModel(e){let t=super.updateModel(e);const i=this.object.model.getValue(b.FURNITURE_BADGE_IMAGE_STATUS),n=this.object.model.getValue(b.FURNITURE_BADGE_ASSET_NAME);if(i===-1)this._badgeAssetNameNormalScale="",this._badgeAssetNameSmallScale="";else if(i===1&&n!==this._badgeId){this._badgeId=n,this._badgeAssetNameNormalScale=this._badgeId,this._badgeAssetNameSmallScale===""&&(this._badgeAssetNameSmallScale=this._badgeAssetNameNormalScale+"_32");const r=this.object.model.getValue(b.FURNITURE_BADGE_VISIBLE_IN_STATE);isNaN(r)||(this._badgeVisibleInState=r),t=!0}return t}getSpriteAssetName(e,t){return this.getLayerTag(e,this.direction,t)!==vc.BADGE||this._badgeVisibleInState!==-1&&this.object.getState(0)!==this._badgeVisibleInState?super.getSpriteAssetName(e,t):e===32?this._badgeAssetNameSmallScale:this._badgeAssetNameNormalScale}getLayerXOffset(e,t,i){let n=super.getLayerXOffset(e,t,i);if(this.getLayerTag(e,t,i)===vc.BADGE){const r=this.getAsset(e===32?this._badgeAssetNameSmallScale:this._badgeAssetNameNormalScale,i);r&&(e===64?n+=(40-r.width)/2:n+=(20-r.width)/2)}return n}getLayerYOffset(e,t,i){let n=super.getLayerYOffset(e,t,i);if(this.getLayerTag(e,t,i)===vc.BADGE){const r=this.getAsset(e===32?this._badgeAssetNameSmallScale:this._badgeAssetNameNormalScale,i);r&&(e===64?n+=(40-r.height)/2:n+=(20-r.height)/2)}return n}};vc.BADGE="BADGE";let Kb=vc;const zs=class zs extends za{constructor(){super(),this._imageUrl=null,this._shortUrl=null,this._imageReady=!1,this._isAnimated=!1,this._gifCollection=null,this._offsetX=0,this._offsetY=0,this._offsetZ=0,this._currentFrame=-1,this._totalFrames=-1}dispose(){super.dispose(),this._imageUrl&&this.asset&&this.asset.disposeAsset(this._imageUrl)}updateObject(e,t){return super.updateObject(e,t)?(this._imageReady&&this.checkAndCreateImageForCurrentState(),!0):!1}updateModel(e){const t=super.updateModel(e);if(t&&(this._offsetX=this.object.model.getValue(b.FURNITURE_BRANDING_OFFSET_X)||0,this._offsetY=this.object.model.getValue(b.FURNITURE_BRANDING_OFFSET_Y)||0,this._offsetZ=this.object.model.getValue(b.FURNITURE_BRANDING_OFFSET_Z)||0,this._isAnimated=this.object.model.getValue(b.FURNITURE_BRANDING_IS_ANIMATED)||!1),this._imageReady){if(this.checkIfImageChanged())return this._imageReady=!1,this._imageUrl=null,!0}else if(this._imageReady=this.checkIfImageReady(),this._imageReady)return this.checkAndCreateImageForCurrentState(),!0;return t}checkIfImageChanged(){const e=this.object.model.getValue(b.FURNITURE_BRANDING_IMAGE_URL);return e&&e===this._imageUrl?!1:(this._gifCollection,this.asset&&this.asset.disposeAsset(this._imageUrl),!0)}checkIfImageReady(){if(!(this.object&&this.object.model))return!1;const t=this.object.model.getValue(b.FURNITURE_BRANDING_IMAGE_URL);if(!t||this._imageUrl&&this._imageUrl===t)return!1;if(this.object.model.getValue(b.FURNITURE_BRANDING_IMAGE_STATUS)===1){let n=null;if(this._isAnimated){const r=ce.instance.roomEngine.roomContentLoader.getGifCollection(t);r&&(this._gifCollection=r,n=r.textures[0])}else n=wn().getTexture(t);return n?(this.imageReady(n,t),!0):!1}return!1}imageReady(e,t){if(!e){this._imageUrl=null;return}this._imageUrl=t}checkAndCreateImageForCurrentState(){if(this._isAnimated){this.buildAssetsForGif();return}if(!this._imageUrl)return;const e=wn().getTexture(this._imageUrl);if(!e)return;const t=this.object.getState(0);this.addBackgroundAsset(e,t,0)}buildAssetsForGif(){if(!this._gifCollection)return;const e=this._gifCollection.textures,t=this._gifCollection.durations;if(!e.length||!t.length||e.length!==t.length)return;const i=this.object.getState(0);for(let n=0;n=0&&e<=7){if(this._running){this._running=!1,this._stateQueue=[],this._stateQueue.push(yo.ANIMATION_ID_OFFSET_SLOW1),this._stateQueue.push(yo.ANIMATION_ID_OFFSET_SLOW2+e),this._stateQueue.push(e);return}super.setAnimation(e)}}updateAnimation(e){return this.getLastFramePlayed(0)&&this._stateQueue.length&&super.setAnimation(this._stateQueue.shift()),super.updateAnimation(e)}};yo.ANIMATION_ID_OFFSET_SLOW1=20,yo.ANIMATION_ID_OFFSET_SLOW2=9,yo.ANIMATION_ID_ROLL=-1;let qb=yo;class Aye extends za{}const Rr=class Rr extends Kt{getFrameNumber(e,t){const i=this.getLayerTag(e,this.direction,t),n=this.object.getState(0);switch(i){case Rr.SECONDS_SPRITE:return Math.floor(n%60%10);case Rr.TEN_SECONDS_SPRITE:return Math.floor(n%60/10);case Rr.MINUTES_SPRITE:return Math.floor(n/60%10);case Rr.TEN_MINUTES_SPRITE:return Math.floor(n/60/10%10);default:return super.getFrameNumber(e,t)}}get animationId(){return 0}};Rr.SECONDS_SPRITE="seconds_sprite",Rr.TEN_SECONDS_SPRITE="ten_seconds_sprite",Rr.MINUTES_SPRITE="minutes_sprite",Rr.TEN_MINUTES_SPRITE="ten_minutes_sprite";let $b=Rr;class Oye extends Kc{}const n_=class n_ extends Kt{constructor(){super(),this._thumbnailAssetNameNormal=null,this._thumbnailImageNormal=null,this._thumbnailDirection=-1,this._thumbnailChanged=!1,this._hasOutline=!1}get hasThumbnailImage(){return this._thumbnailImageNormal!=null}setThumbnailImages(e){this._thumbnailImageNormal=e,this._thumbnailChanged=!0}updateModel(e){const t=super.updateModel(e);return!this._thumbnailChanged&&this._thumbnailDirection===this.direction?t:(this.refreshThumbnail(),!0)}refreshThumbnail(){this.asset!=null&&(this._thumbnailImageNormal?this.addThumbnailAsset(this._thumbnailImageNormal,64):this.asset.disposeAsset(this.getThumbnailAssetName(64)),this._thumbnailChanged=!1,this._thumbnailDirection=this.direction)}addThumbnailAsset(e,t){let i=0;for(;i{const n=Ne.from(i);n.baseTexture.scaleMode=tn.LINEAR,this.setThumbnailImages(n)}}else this.setThumbnailImages(null)}return super.updateModel(e)}getThumbnailURL(){throw new Error("This method must be overridden!")}}class wye extends L5{constructor(){super(),this._url=null,this._typePrefix=null}getThumbnailURL(){if(!this.object)return null;if(this._url)return this._url;const e=this.object.model.getValue(b.FURNITURE_DATA);if(!e||e==="")return null;this.object.type.indexOf("")>=0&&(this._typePrefix=this.object.type.indexOf("")>=0?"":"postcards/selfie/");let i=JSON.parse(e).w||"";return i=this.buildThumbnailUrl(i),this._url=i,this._url}buildThumbnailUrl(e){return e=e.replace(".png","_small.png"),e.indexOf(".png")===-1&&(e=e+"_small.png"),e}}class nk{constructor(){this._hasMoved=!1,this._age=0,this._isEmitter=!1,this._fade=!1,this._alphaMultiplier=1}init(e,t,i,n,r,a,o,l=!1,u=null,c=!1){this._x=e,this._y=t,this._z=i,this._particleDirection=new rn(n.x,n.y,n.z),this._particleDirection.scaleBy(r),this._lastX=this._x-this._particleDirection.x*a,this._lastY=this._y-this._particleDirection.y*a,this._lastZ=this._z-this._particleDirection.z*a,this._age=0,this._hasMoved=!1,this._lifeTime=o,this._isEmitter=l,this._frames=u,this._fade=c,this._alphaMultiplier=1,this._fadeTime=.5+Math.random()*.5}dispose(){this._particleDirection=null}update(){this._age++,this._age===this._lifeTime&&this.ignite(),this._fade&&this._age/this._lifeTime>this._fadeTime&&(this._alphaMultiplier=(this._lifeTime-this._age)/(this._lifeTime*(1-this._fadeTime)))}getAsset(){return this._frames&&this._frames.length>0?this._frames[this._age%this._frames.length]:null}ignite(){}get fade(){return this._fade}get alphaMultiplier(){return this._alphaMultiplier}get direction(){return this._particleDirection}get age(){return this._age}get isEmitter(){return this._isEmitter}get isAlive(){return this._age<=this._lifeTime}get x(){return this._x}set x(e){this._x=e}get y(){return this._y}set y(e){this._y=e}get z(){return this._z}set z(e){this._z=e}get lastX(){return this._lastX}set lastX(e){this._hasMoved=!0,this._lastX=e}get lastY(){return this._lastY}set lastY(e){this._hasMoved=!0,this._lastY=e}get lastZ(){return this._lastZ}set lastZ(e){this._hasMoved=!0,this._lastZ=e}get hasMoved(){return this._hasMoved}toString(){return[this._x,this._y,this._z].toString()}copy(e,t){this._x=e._x*t,this._y=e._y*t,this._z=e._z*t,this._lastX=e._lastX*t,this._lastY=e._lastY*t,this._lastZ=e._lastZ*t,this._hasMoved=e.hasMoved,this._particleDirection=e._particleDirection,this._age=e._age,this._lifeTime=e._lifeTime,this._isEmitter=e._isEmitter,this._fade=e._fade,this._fadeTime=e._fadeTime,this._alphaMultiplier=e._alphaMultiplier}}const To=class To extends nk{constructor(e="",t=-1){super(),this._roomObjectSpriteId=-1,this._timeStep=.1,this._fuseTime=10,this._energy=1,this._hasIgnited=!1,this._burstPulse=1,this._particles=[],this._name=e,this._roomObjectSpriteId=t,this._particleConfigurations=[]}dispose(){for(const e of this._particles)e.dispose();this._particles=null,this._particleConfigurations=null,super.dispose()}setup(e,t,i,n,r,a,o,l,u,c){this._maxNumberOfParticles=e,this._particlesPerFrame=t,this._force=i,this._emitterDirection=n,this._emitterDirection.normalize(),this._gravity=r,this._airFriction=a,this._explosionShape=o,this._fuseTime=u,this._energy=l,this._burstPulse=c,this.reset()}reset(){for(const e of this._particles)e.dispose();this._particles=[],this._emittedParticles=0,this._hasIgnited=!1,this.init(0,0,0,this._emitterDirection,this._force,this._timeStep,this._fuseTime,!0)}copyStateFrom(e,t){super.copy(e,t),this._force=e._force,this._emitterDirection=e._emitterDirection,this._gravity=e._gravity,this._airFriction=e._airFriction,this._explosionShape=e._explosionShape,this._fuseTime=e._fuseTime,this._energy=e._energy,this._burstPulse=e._burstPulse,this._timeStep=e._timeStep,this._hasIgnited=e._hasIgnited}configureParticle(e,t,i,n){const r={};r.lifeTime=e,r.isEmitter=t,r.frames=i,r.fade=n,this._particleConfigurations.push(r)}ignite(){this._hasIgnited=!0,this._emittedParticles1&&this.releaseParticles(this,this.direction)}releaseParticles(e,t=null){t||(t=new rn);const i=new rn,n=this.getRandomParticleConfiguration();let r=0;for(;r10||!t.isAlive)&&e.push(t)}for(const t of e)t.isEmitter,this._particles.splice(this._particles.indexOf(t),1),t.dispose()}satisfyConstraints(){}accumulateForces(){for(const e of this._particles);}get particles(){return this._particles}get hasIgnited(){return this._hasIgnited}randomBoolean(e){return Math.random()=0&&(this._visualization.getSprite(this._currentEmitter.roomObjectSpriteId).visible=!1))}updateAnimation(){if(!this._currentEmitter||!this._roomSprite||this._isDone)return;const e=10;!this._hasIgnited&&this._currentEmitter.hasIgnited&&(this._hasIgnited=!0);const t=this._offsetY*this._scaleMultiplier;if(this._currentEmitter.update(),this._hasIgnited){this._currentEmitter.roomObjectSpriteId>=0&&(this._visualization.getSprite(this._currentEmitter.roomObjectSpriteId).visible=!1),this._canvasTexture||this.updateCanvas(),this.clearCanvas();for(const i of this._currentEmitter.particles){const n=this._centerX+(i.x-i.z)*e/10*this._scaleMultiplier,r=this._centerY-t+(i.y+(i.x+i.z)/2)*e/10*this._scaleMultiplier,a=i.getAsset();if(a&&a.texture)if(i.fade&&i.alphaMultiplier<1){this._translationMatrix.identity(),this._translationMatrix.translate(n+a.offsetX,r+a.offsetY);const o=new kt(a.texture);this._particleColorTransform.alpha=i.alphaMultiplier,o.filters=[this._particleColorTransform],oi.instance.renderer.render(o,{renderTexture:this._canvasTexture,transform:this._translationMatrix,clear:!1})}else{const o=new Bm(n+a.offsetX,r+a.offsetY),l=new kt(a.texture);l.x=o.x,l.y=o.y,oi.instance.renderer.render(l,{renderTexture:this._canvasTexture,clear:!1})}else{const o=new kt(Ne.WHITE);o.tint=16777215,o.x=n-1,o.y=r-1,o.width=2,o.height=2,oi.instance.renderer.render(o,{renderTexture:this._canvasTexture,clear:!1})}}if(!this._currentEmitter.particles.length){this._isDone=!0;return}}}parseData(e){this._size=e.size,this._canvasId=e.canvasId!==void 0?e.canvasId:-1,this._offsetY=e.offsetY!==void 0?e.offsetY:10,this._scaleMultiplier=this._size/64,this._blend=e.blend!==void 0?e.blend:1,this._blend=Math.min(this._blend,1),this._blackOverlayAlphaTransform.alpha=this._blend;const t=e.bgColor!==void 0?e.bgColor:"0";if(this._bgColor=parseInt(t,16)||0,!(!e.emitters||!e.emitters.length))for(const i of e.emitters){const n=i.id,r=i.name,a=i.spriteId,o=new Qb(r,a);this._emitters.add(n,o);const l=i.maxNumParticles,u=i.particlesPerFrame,c=i.burstPulse!==void 0?i.burstPulse:1,h=i.fuseTime,f=i.simulation.force,d=i.simulation.direction,_=i.simulation.gravity,g=i.simulation.airFriction,p=i.simulation.shape,m=i.simulation.energy;for(const v of i.particles){const E=v.lifeTime,y=v.isEmitter||!1,T=v.fade||!1,w=[];for(const C of v.frames)w.push(this._visualization.asset.getAsset(C));o.configureParticle(E,y,w,T)}o.setup(l,u,f,new rn(0,d,0),_,g,p,m,h,c)}}copyStateFrom(e){let t=0;e._emitters&&e._currentEmitter&&(t=e._emitters.getKey(e._emitters.getValues().indexOf(e._currentEmitter))),this.setAnimation(t),this._currentEmitter&&this._currentEmitter.copyStateFrom(e._currentEmitter,e._size/this._size),this._canvasTexture=null}clearCanvas(){this._emptySprite||(this._emptySprite=new kt(Ne.EMPTY),this._emptySprite.alpha=0),this._canvasTexture?oi.instance.renderer.render(this._emptySprite,{renderTexture:this._canvasTexture,clear:!0}):this._canvasTexture=Pi.create({width:this._roomSprite.width,height:this._roomSprite.height})}}class U5 extends Kt{dispose(){if(super.dispose(),this._currentParticleSystem=null,this._particleSystems){for(const e of this._particleSystems.getValues())e.dispose();this._particleSystems=null}}updateObject(e,t){if(super.updateObject(e,t)){if(!this._particleSystems)this.readDefinition(),this._particleSystems?this._currentParticleSystem=this._particleSystems.getValue(e):le.log("ERROR Particle systems could not be read!",this.object.type);else if(e!==this._scale||this._particleSystems.getValue(e)!==this._currentParticleSystem){const i=this._particleSystems.getValue(e);i.copyStateFrom(this._currentParticleSystem),this._currentParticleSystem&&this._currentParticleSystem.reset(),this._currentParticleSystem=i}return!0}return!1}updateSprites(e,t,i){super.updateSprites(e,t,i),this._currentParticleSystem&&this._currentParticleSystem.updateSprites()}updateAnimation(e){return this._currentParticleSystem&&this._currentParticleSystem.updateAnimation(),super.updateAnimation(e)}setAnimation(e){this._currentParticleSystem&&this._currentParticleSystem.setAnimation(e),super.setAnimation(e)}getLayerYOffset(e,t,i){return this._currentParticleSystem&&this._currentParticleSystem.controlsSprite(i)?this._currentParticleSystem.getLayerYOffset(e,t,i):super.getLayerYOffset(e,t,i)}readDefinition(){if(!this.object||!this.object.model)return!1;const e=this.object.model.getValue(b.FURNITURE_FIREWORKS_DATA);if(!e||!e.length)return!1;this._particleSystems=new li;for(const t of e){const i=t.size,n=new Cye(this);n.parseData(t),this._particleSystems.add(i,n)}return!0}}const Io=class Io extends U5{constructor(){super(...arguments),this._packetType=0,this._ribbonType=0,this._lastAnimationId=0}update(e,t,i,n){this.updatePresentWrap(),super.update(e,t,i,n)}updatePresentWrap(){if(!this.object)return;const e=1e3,t=this.object.model.getValue(b.FURNITURE_EXTRAS),i=parseInt(t),n=Math.floor(i/e),r=i%e;this._packetType=n>Io.MAX_PACKET_TYPE_VALUE?0:n,this._ribbonType=r>Io.MAX_RIBBON_TYPE_VALUE?0:r}getFrameNumber(e,t){if(this._lastAnimationId===Io.PRESENT_DEFAULT_STATE){if(t<=1)return this._packetType;if(t===2)return this._ribbonType}return super.getFrameNumber(e,t)}getSpriteAssetName(e,t){const i=this.getValidSize(e);let n=this._type,r="";t0&&e<=Yn.ANIMATION_ID_OFFSET_SLOW1){if(this._running){this._running=!1,this._stateQueue=[],this._stateQueue.push(Yn.ANIMATION_ID_OFFSET_SLOW1+e),this._stateQueue.push(Yn.ANIMATION_ID_OFFSET_SLOW2+e),this._stateQueue.push(e);return}super.setAnimation(e)}}updateAnimation(e){return this.getLastFramePlayed(1)&&this.getLastFramePlayed(2)&&this.getLastFramePlayed(3)&&this._stateQueue.length&&super.setAnimation(this._stateQueue.shift()),super.updateAnimation(e)}};Yn.ANIMATION_ID_OFFSET_SLOW1=10,Yn.ANIMATION_ID_OFFSET_SLOW2=20,Yn.ANIMATION_ID_START_ROLL=31,Yn.ANIMATION_ID_ROLL=32;let tA=Yn;class Nye extends D5{constructor(){super(...arguments),this._needsTransform=!0}transformGifTextures(e){if(!this._gifCollection)return;const t=this._gifCollection.textures;if(t.length){for(let i=0;i=i&&(r>0?n=n-(u-i):n=n+(-i-u),r=-r,this._animDirectionIndex[t]=r);const c=(i-Math.abs(n))*o;let h=r*Math.sin(Math.abs(n/4))*c;return r>0?h=h-c:h=h+c,n=n+r*a*l,this._animPhaseIndex[t]=n,Math.trunc(h)==0&&(this._animFactorIndex[t]=this.getRandomAmplitudeFactor()),new Bm(n,h)}initItems(e){let t;e===32?t=Hs.AREA_DIAMETER_SMALL:t=Hs.AREA_DIAMETER_LARGE,this._animPhaseIndex=[],this._animPhaseIndex.push(Math.random()*t*1.5),this._animPhaseIndex.push(Math.random()*t*1.5),this._animDirectionIndex=[],this._animDirectionIndex.push(1),this._animDirectionIndex.push(-1),this._animSpeedIndex=[],this._animSpeedIndex.push(Hs.ANIM_SPEED_FAST),this._animSpeedIndex.push(Hs.ANIM_SPEED_SLOW),this._animFactorIndex=[],this._animFactorIndex.push(this.getRandomAmplitudeFactor()),this._animFactorIndex.push(this.getRandomAmplitudeFactor())}getLayerXOffset(e,t,i){return(i===2||i===3)&&this._animOffsetIndex.length==2?this._animOffsetIndex[i-2].x:super.getLayerXOffset(e,t,i)}getLayerYOffset(e,t,i){return(i===2||i===3)&&this._animOffsetIndex.length==2?this._animOffsetIndex[i-2].y:super.getLayerYOffset(e,t,i)}getRandomAmplitudeFactor(){return Math.random()*30/100+.15}};Hs.UPDATE_INTERVAL=2,Hs.AREA_DIAMETER_SMALL=15,Hs.AREA_DIAMETER_LARGE=31,Hs.ANIM_SPEED_FAST=2,Hs.ANIM_SPEED_SLOW=1;let nA=Hs;const DE=class DE{constructor(e,t,i,n,r,a){this._name=e,this._index=t,this._radius=i,this._arcSpeed=n*Math.PI*2/360,this._arcOffset=r*Math.PI*2/360,this._height=a,this._position=0,this._positionVector=new M(0,0,0),this._children=[]}dispose(){for(;this._children.length>0;)this._children.shift().dispose()}update(e,t,i){this._position=this._position+this._arcSpeed/DE.SYSTEM_TEMPO,e[this._index]=this.getPositionVector(t,i);for(const n of this._children)n.update(e,this._positionVector,i)}getPositionVector(e,t){const i=this._radius*Math.cos(this._position+this._arcOffset),n=this._radius*Math.sin(this._position+this._arcOffset);return this._positionVector.x=(i-n)*(t/2),this._positionVector.y=(n+i)*(t/2)*.5-this._height*(t/2),this._positionVector.z=-Math.trunc(4*(i+n)-.7),e&&this._positionVector.add(e),this._positionVector}addChild(e){this._children.indexOf(e)>=0||this._children.push(e)}hasChild(e){return!!this.getChild(e)}getChild(e){for(const t of this._children){if(t.name===e)return t;if(t.hasChild(e))return t.getChild(e)}return null}get name(){return this._name}};DE.SYSTEM_TEMPO=30;let rA=DE;class Pye extends Kt{constructor(){super(),this._offsetArray=[],this._rootPosition=new M}dispose(){if(this._planetIndex)for(;this._planetIndex.length>0;)this._planetIndex.shift().dispose();this._planetIndex=null,this._planetNameIndex=null}updateAnimation(e){if(!this._planetIndex&&this.spriteCount>0&&!this.processPlanets())return 0;if(this._planetIndex){for(const t of this._planetIndex)t.update(this._offsetArray,this._rootPosition,e);return super.updateAnimation(e)}return 0}getLayerXOffset(e,t,i){return this._offsetArray[i]?this._offsetArray[i].x:super.getLayerXOffset(e,t,i)}getLayerYOffset(e,t,i){return this._offsetArray[i]?this._offsetArray[i].y:super.getLayerYOffset(e,t,i)}getLayerZOffset(e,t,i){return this._offsetArray[i]?this._offsetArray[i].z:super.getLayerZOffset(e,t,i)}processPlanets(){if(!this.object||!this.object.model)return;const e=this.object.model.getValue(b.FURNITURE_PLANETSYSTEM_DATA);if(!e)return!1;this._planetIndex=[],this._planetNameIndex=[];for(const t of e)this.getSprite(t.id)&&this.addPlanet(t.name,t.id,t.parent,t.radius||0,t.arcSpeed||0,t.arcOffset||0,t.height||0);return!0}addPlanet(e,t,i,n,r,a,o){if(!this._planetIndex)return;const l=new rA(e,t,n,r,a,o),u=this.getPlanet(i);u?u.addChild(l):(this._planetIndex.push(l),this._planetNameIndex.push(e))}getPlanet(e){for(const t of this._planetIndex){if(t.name===e)return t;if(t.hasChild(e))return t.getChild(e)}return null}}class kye extends Kt{}const ha=class ha extends Kt{constructor(){super(),this._stateQueue=[],this._animationCounter=-1}setAnimation(e){return e===ha.ANIMATION_ID_ROLL_ONCE&&(this._stateQueue=[],this._stateQueue.push(ha.ANIMATION_ID_NORMAL),this._animationCounter=ha.ANIMATION_DURATION),super.setAnimation(e)}updateAnimation(e){return this._animationCounter>0&&this._animationCounter--,this._animationCounter||this._stateQueue.length&&super.setAnimation(this._stateQueue.shift()),super.updateAnimation(e)}usesAnimationResetting(){return!0}};ha.ANIMATION_ID_ROLL=3,ha.ANIMATION_ID_ROLL_ONCE=2,ha.ANIMATION_ID_NORMAL=1,ha.ANIMATION_DURATION=15;let aA=ha;class xye extends Kt{usesAnimationResetting(){return!0}}class Dye extends Q_{imageReady(e,t){super.imageReady(e,t),e&&this.setImageOffset(e.width,e.height)}setImageOffset(e,t){const i=new k5;i.setDirection(1,0,-t),i.setDirection(3,0,0),i.setDirection(5,-e,0),i.setDirection(7,-e,-t),i.setDirection(4,-e/2,-t/2),this._imageOffset=i}getLayerXOffset(e,t,i){if(this._imageOffset){const n=this._imageOffset.getXOffset(t,0);if(n!==void 0)return n+this._offsetX}return super.getLayerXOffset(e,t,i)+this._offsetX}getLayerYOffset(e,t,i){if(this._imageOffset){const n=this._imageOffset.getYOffset(t,0);if(n!==void 0)return n+this._offsetY}return super.getLayerYOffset(e,t,i)+this._offsetY}getLayerZOffset(e,t,i){return super.getLayerZOffset(e,t,i)+-this._offsetZ}getLayerIgnoreMouse(e,t,i){return!0}}const Sr=class Sr extends Kt{getFrameNumber(e,t){const i=this.getLayerTag(e,this.direction,t),n=this.object.getState(0);switch(i){case Sr.ONES_SPRITE:return Math.floor(n%10);case Sr.TENS_SPRITE:return Math.floor(n/10%10);case Sr.HUNDREDS_SPRITE:return Math.floor(n/100%10);case Sr.THOUSANDS_SPRITE:return Math.floor(n/1e3%10);default:return super.getFrameNumber(e,t)}}};Sr.ONES_SPRITE="ones_sprite",Sr.TENS_SPRITE="tens_sprite",Sr.HUNDREDS_SPRITE="hundreds_sprite",Sr.THOUSANDS_SPRITE="thousands_sprite";let oA=Sr;class Lye extends Kt{constructor(){super(...arguments),this._internalFrameIncreaseCounter=0}updateAnimations(e){return this._internalFrameIncreaseCounter=this._internalFrameIncreaseCounter+this.object.model.getValue(b.FURNITURE_SOUNDBLOCK_RELATIVE_ANIMATION_SPEED),this._frameIncrease=this._internalFrameIncreaseCounter,this._internalFrameIncreaseCounter=this._internalFrameIncreaseCounter-this._frameIncrease,super.updateAnimations(e)}}class Uye extends za{getLayerColor(e,t,i){return this._data?this._data.getLayerColor(e,t,i):ju.DEFAULT_COLOR}}const Li=class Li extends Kt{constructor(){super(),this._stateQueue=[],this._running=!1,super.setAnimation(Li.ANIMATION_ID_OFF)}setAnimation(e){if(e===0&&!this._running){this._running=!0,this._stateQueue=[],this._stateQueue.push(Li.ANIMATION_ID_START_ROLL),this._stateQueue.push(Li.ANIMATION_ID_ROLL);return}if(e>0&&e<=Li.ANIMATION_ID_OFFSET_SLOW2){if(this._running){this._running=!1,this._stateQueue=[],this.direction===2?(this._stateQueue.push(Li.ANIMATION_ID_OFFSET_SLOW1+5),this._stateQueue.push(Li.ANIMATION_ID_OFFSET_SLOW2+5)):(this._stateQueue.push(Li.ANIMATION_ID_OFFSET_SLOW1+e),this._stateQueue.push(Li.ANIMATION_ID_OFFSET_SLOW2+e)),this._stateQueue.push(Li.ANIMATION_ID_OFF);return}super.setAnimation(Li.ANIMATION_ID_OFF)}}updateAnimation(e){return this.getLastFramePlayed(11)&&this._stateQueue.length&&super.setAnimation(this._stateQueue.shift()),super.updateAnimation(e)}};Li.ANIMATION_ID_OFFSET_SLOW1=20,Li.ANIMATION_ID_OFFSET_SLOW2=10,Li.ANIMATION_ID_START_ROLL=31,Li.ANIMATION_ID_ROLL=32,Li.ANIMATION_ID_OFF=30;let lA=Li;const Ws=class Ws extends Kt{updateObject(e,t){return super.updateObject(e,t),!0}getFrameNumber(e,t){const i=this.object.model.getValue(b.FURNITURE_VOTE_COUNTER_COUNT);switch(this.getLayerTag(e,this.direction,t)){case Ws.ONES_SPRITE:return i%10;case Ws.TENS_SPRITE:return i/10%10;case Ws.HUNDREDS_SPRITE:return i/100%10;default:return super.getFrameNumber(e,t)}}getLayerAlpha(e,t,i){if(this.object.model.getValue(b.FURNITURE_VOTE_COUNTER_COUNT)===Ws.HIDE_COUNTER_SCORE)switch(this.getLayerTag(e,t,i)){case Ws.ONES_SPRITE:case Ws.TENS_SPRITE:case Ws.HUNDREDS_SPRITE:return 0}return super.getLayerAlpha(e,t,i)}};Ws.ONES_SPRITE="ones_sprite",Ws.TENS_SPRITE="tens_sprite",Ws.HUNDREDS_SPRITE="hundreds_sprite",Ws.HIDE_COUNTER_SCORE=-1;let uA=Ws;const us=class us extends Kt{getFrameNumber(e,t){const i=this.object.model.getValue(b.FURNITURE_VOTE_MAJORITY_RESULT);switch(this.getLayerTag(e,this.direction,t)){case us.ONES_SPRITE:return i%10;case us.TENS_SPRITE:return i/10%10;case us.HUNDREDS_SPRITE:return i/100%10;default:return super.getFrameNumber(e,t)}}getLayerAlpha(e,t,i){const n=this.object.model.getValue(b.FURNITURE_VOTE_MAJORITY_RESULT);if(us.HIDE_RESULTS_STATES.indexOf(this.object.getState(0))!==-1||n===us.HIDE_RESULTS_VALUE)switch(this.getLayerTag(e,t,i)){case us.ONES_SPRITE:case us.TENS_SPRITE:case us.HUNDREDS_SPRITE:return 0}return super.getLayerAlpha(e,t,i)}};us.ONES_SPRITE="ones_sprite",us.TENS_SPRITE="tens_sprite",us.HUNDREDS_SPRITE="hundreds_sprite",us.HIDE_RESULTS_STATES=[-1,1],us.HIDE_RESULTS_VALUE=-1;let hA=us;class Fye extends Kt{}const LE=class LE extends L5{getThumbnailURL(){if(!this.object)return null;const e=this.object.model.getValue(b.FURNITURE_DATA);return e&&e[LE.THUMBNAIL_URL]||null}};LE.THUMBNAIL_URL="THUMBNAIL_URL";let cA=LE;/*! * @pixi/text - v6.5.10 * Compiled Thu, 06 Jul 2023 15:25:11 UTC * * @pixi/text is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license *//*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var fA=function(s,e){return fA=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])},fA(s,e)};function Bye(s,e){fA(s,e);function t(){this.constructor=s}s.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var Bv;(function(s){s[s.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",s[s.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL"})(Bv||(Bv={}));var _T={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:Bv.LINEAR_VERTICAL,fillGradientStops:[],fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100,leading:0},Gye=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],rk=function(){function s(e){this.styleID=0,this.reset(),pT(this,e,e)}return s.prototype.clone=function(){var e={};return pT(e,this,_T),new s(e)},s.prototype.reset=function(){pT(this,_T,_T)},Object.defineProperty(s.prototype,"align",{get:function(){return this._align},set:function(e){this._align!==e&&(this._align=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"breakWords",{get:function(){return this._breakWords},set:function(e){this._breakWords!==e&&(this._breakWords=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"dropShadow",{get:function(){return this._dropShadow},set:function(e){this._dropShadow!==e&&(this._dropShadow=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"dropShadowAlpha",{get:function(){return this._dropShadowAlpha},set:function(e){this._dropShadowAlpha!==e&&(this._dropShadowAlpha=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"dropShadowAngle",{get:function(){return this._dropShadowAngle},set:function(e){this._dropShadowAngle!==e&&(this._dropShadowAngle=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"dropShadowBlur",{get:function(){return this._dropShadowBlur},set:function(e){this._dropShadowBlur!==e&&(this._dropShadowBlur=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"dropShadowColor",{get:function(){return this._dropShadowColor},set:function(e){var t=gT(e);this._dropShadowColor!==t&&(this._dropShadowColor=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"dropShadowDistance",{get:function(){return this._dropShadowDistance},set:function(e){this._dropShadowDistance!==e&&(this._dropShadowDistance=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"fill",{get:function(){return this._fill},set:function(e){var t=gT(e);this._fill!==t&&(this._fill=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"fillGradientType",{get:function(){return this._fillGradientType},set:function(e){this._fillGradientType!==e&&(this._fillGradientType=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"fillGradientStops",{get:function(){return this._fillGradientStops},set:function(e){Vye(this._fillGradientStops,e)||(this._fillGradientStops=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"fontFamily",{get:function(){return this._fontFamily},set:function(e){this.fontFamily!==e&&(this._fontFamily=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"fontSize",{get:function(){return this._fontSize},set:function(e){this._fontSize!==e&&(this._fontSize=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"fontStyle",{get:function(){return this._fontStyle},set:function(e){this._fontStyle!==e&&(this._fontStyle=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"fontVariant",{get:function(){return this._fontVariant},set:function(e){this._fontVariant!==e&&(this._fontVariant=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"fontWeight",{get:function(){return this._fontWeight},set:function(e){this._fontWeight!==e&&(this._fontWeight=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"letterSpacing",{get:function(){return this._letterSpacing},set:function(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"lineHeight",{get:function(){return this._lineHeight},set:function(e){this._lineHeight!==e&&(this._lineHeight=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"leading",{get:function(){return this._leading},set:function(e){this._leading!==e&&(this._leading=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"lineJoin",{get:function(){return this._lineJoin},set:function(e){this._lineJoin!==e&&(this._lineJoin=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"miterLimit",{get:function(){return this._miterLimit},set:function(e){this._miterLimit!==e&&(this._miterLimit=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"padding",{get:function(){return this._padding},set:function(e){this._padding!==e&&(this._padding=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"stroke",{get:function(){return this._stroke},set:function(e){var t=gT(e);this._stroke!==t&&(this._stroke=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"strokeThickness",{get:function(){return this._strokeThickness},set:function(e){this._strokeThickness!==e&&(this._strokeThickness=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"textBaseline",{get:function(){return this._textBaseline},set:function(e){this._textBaseline!==e&&(this._textBaseline=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"trim",{get:function(){return this._trim},set:function(e){this._trim!==e&&(this._trim=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"whiteSpace",{get:function(){return this._whiteSpace},set:function(e){this._whiteSpace!==e&&(this._whiteSpace=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"wordWrap",{get:function(){return this._wordWrap},set:function(e){this._wordWrap!==e&&(this._wordWrap=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"wordWrapWidth",{get:function(){return this._wordWrapWidth},set:function(e){this._wordWrapWidth!==e&&(this._wordWrapWidth=e,this.styleID++)},enumerable:!1,configurable:!0}),s.prototype.toFontString=function(){var e=typeof this.fontSize=="number"?this.fontSize+"px":this.fontSize,t=this.fontFamily;Array.isArray(this.fontFamily)||(t=this.fontFamily.split(","));for(var i=t.length-1;i>=0;i--){var n=t[i].trim();!/([\"\'])[^\'\"]+\1/.test(n)&&Gye.indexOf(n)<0&&(n='"'+n+'"'),t[i]=n}return this.fontStyle+" "+this.fontVariant+" "+this.fontWeight+" "+e+" "+t.join(",")},s}();function ak(s){return typeof s=="number"?TU(s):(typeof s=="string"&&s.indexOf("0x")===0&&(s=s.replace("0x","#")),s)}function gT(s){if(Array.isArray(s)){for(var e=0;e_)if(a!==""&&(o+=s.addLine(a),a="",r=0),s.canBreakWords(m,t.breakWords))for(var T=s.wordWrapSplit(m),w=0;w_&&(o+=s.addLine(a),d=!1,a="",r=0),a+=C,r+=L}else{a.length>0&&(o+=s.addLine(a),a="",r=0);var j=p===g.length-1;o+=s.addLine(m,!j),d=!1,a="",r=0}else y+r>_&&(d=!1,o+=s.addLine(a),a="",r=0),(a.length>0||!s.isBreakingSpace(m)||d)&&(a+=m,r+=y)}return o+=s.addLine(a,!1),o},s.addLine=function(e,t){return t===void 0&&(t=!0),e=s.trimRight(e),e=t?e+` `:e,e},s.getFromCache=function(e,t,i,n){var r=i[e];if(typeof r!="number"){var a=e.length*t;r=n.measureText(e).width+a,i[e]=r}return r},s.collapseSpaces=function(e){return e==="normal"||e==="pre-line"},s.collapseNewlines=function(e){return e==="normal"},s.trimRight=function(e){if(typeof e!="string")return"";for(var t=e.length-1;t>=0;t--){var i=e[t];if(!s.isBreakingSpace(i))break;e=e.slice(0,-1)}return e},s.isNewline=function(e){return typeof e!="string"?!1:s._newlines.indexOf(e.charCodeAt(0))>=0},s.isBreakingSpace=function(e,t){return typeof e!="string"?!1:s._breakingSpaces.indexOf(e.charCodeAt(0))>=0},s.tokenize=function(e){var t=[],i="";if(typeof e!="string")return t;for(var n=0;no;--f){for(var g=0;g0&&p>m&&(v=(m+p)/2);var E=m+g,y=n.lineHeight*(_+1),T=E;_+11?new Ll(t,i):new Uv(t,i)}defineVisualizations(e){return this._isAllowedToTurnHead=!0,super.defineVisualizations(e)}processVisualElement(e,t,i){if(!e||!t||!i)return!1;switch(t){case"postures":if(!(e instanceof Ll)||!e.processPostures(i))return!1;break;case"gestures":if(!(e instanceof Ll)||!e.processGestures(i))return!1;break;default:if(!super.processVisualElement(e,t,i))return!1;break}return!0}postureToAnimation(e,t){const i=this.getSizeData(e);return i?i.postureToAnimation(t):Ll.DEFAULT}getGestureDisabled(e,t){const i=this.getSizeData(e);return i?i.getGestureDisabled(t):!1}gestureToAnimation(e,t){const i=this.getSizeData(e);return i?i.gestureToAnimation(t):Ll.DEFAULT}animationToPosture(e,t,i){const n=this.getSizeData(e);return n?n.animationToPosture(t,i):null}animationToGesture(e,t){const i=this.getSizeData(e);return i?i.animationToGesture(t):null}getGestureForAnimationId(e,t){const i=this.getSizeData(e);return i?i.getGestureForAnimationId(t):null}totalPostures(e){const t=this.getSizeData(e);return t?t.totalPostures:0}totalGestures(e){const t=this.getSizeData(e);return t?t.totalGestures:0}get isAllowedToTurnHead(){return this._isAllowedToTurnHead}}const Tt=class Tt extends Kt{constructor(){for(super(),this._posture="",this._gesture="",this._isSleeping=!1,this._headDirection=-1,this._headOnly=!1,this._nonHeadSprites=[],this._headSprites=[],this._saddleSprites=[],this._animationOver=!1,this._paletteIndex=-1,this._paletteName="",this._customLayerIds=[],this._customPartIds=[],this._customPaletteIds=[],this._isRiding=!1,this._color=16777215,this._experience=0,this._experienceTimestamp=0,this._experienceData=null,this._previousAnimationDirection=-1,this._animationStates=[];this._animationStates.length0){const n=this._experienceData.renderBubble(this._experience);if(n){i.texture=n,i.offsetX=-20,i.offsetY=-80,i.alpha=this._experienceData.alpha,i.visible=!0,i.relativeDepth=-.2;return}}i.texture=null,i.visible=!1}}}updateModel(e){const t=this.object&&this.object.model;if(!t||this.updateModelCounter===t.updateCounter)return!1;const i=t.getValue(b.FIGURE_POSTURE),n=t.getValue(b.FIGURE_GESTURE);this.setPostureAndGesture(i,n);let r=t.getValue(b.FURNITURE_ALPHA_MULTIPLIER)||null;(r===null||isNaN(r))&&(r=1),this._alphaMultiplier!==r&&(this._alphaMultiplier=r,this._alphaChanged=!0),this._isSleeping=t.getValue(b.FIGURE_SLEEP)>0;const a=t.getValue(b.HEAD_DIRECTION);!isNaN(a)&&this.data.isAllowedToTurnHead?this._headDirection=a:this._headDirection=this.object.getDirection().x,this._experience=t.getValue(b.FIGURE_GAINED_EXPERIENCE),this._experienceTimestamp=t.getValue(b.FIGURE_EXPERIENCE_TIMESTAMP);const o=t.getValue(b.PET_PALETTE_INDEX),l=t.getValue(b.PET_CUSTOM_LAYER_IDS),u=t.getValue(b.PET_CUSTOM_PARTS_IDS),c=t.getValue(b.PET_CUSTOM_PALETTE_IDS),h=t.getValue(b.PET_IS_RIDING),f=t.getValue(b.PET_HEAD_ONLY),d=t.getValue(b.PET_COLOR);return o!==this._paletteIndex&&(this._paletteIndex=o,this._paletteName=this._paletteIndex.toString()),this._customLayerIds=l||[],this._customPartIds=u||[],this._customPaletteIds=c||[],this._isRiding=!isNaN(h)&&h>0,this._headOnly=!isNaN(f)&&f>0,!isNaN(d)&&this._color!==d&&(this._color=d),this.updateModelCounter=t.updateCounter,!0}updateAnimation(e){if(this.object){const t=this.object.getDirection().x;t!==this._previousAnimationDirection&&(this._previousAnimationDirection=t,this.resetAllAnimationFrames())}return super.updateAnimation(e)}setPostureAndGesture(e,t){this.data&&(e!==this._posture&&(this._posture=e,this.setAnimationForIndex(Tt.POSTURE_ANIMATION_INDEX,this.data.postureToAnimation(this._scale,e))),this.data.getGestureDisabled(this._scale,e)&&(t=null),t!==this._gesture&&(this._gesture=t,this.setAnimationForIndex(Tt.GESTURE_ANIMATION_INDEX,this.data.gestureToAnimation(this._scale,t))))}getAnimationStateData(e){return e>=0&&e=0;){const t=this._animationStates[e];t&&t.setLayerCount(this.animatedLayerCount),e--}}updateAnimations(e){if(this._animationOver)return 0;let t=!0,i=0,n=0;for(;n=Fr.LAYER_LETTERS.length)return null;const r=Fr.LAYER_LETTERS[t];return n===1?this._type+"_icon_"+r:this._type+"_"+n+"_"+r+"_"+this.getDirection(e,t)+"_"+this.getFrameNumber(n,t)}return this._type+"_"+n+"_sd_"+this.getDirection(e,t)+"_0"}return null}getLayerColor(e,t,i){return t=0;){const a=this._animationStates[r];if(a){const o=a.getFrame(i);o&&(n+=o.x)}r--}return n}getLayerYOffset(e,t,i){let n=super.getLayerYOffset(e,t,i),r=this._animationStates.length-1;for(;r>=0;){const a=this._animationStates[r];if(a){const o=a.getFrame(i);o&&(n+=o.y)}r--}return n}getLayerZOffset(e,t,i){return this.data?this.data.getLayerZOffset(e,this.getDirection(e,i),i):rt.DEFAULT_ZOFFSET}getDirection(e,t){return this.isHeadSprite(t)?this.data.getValidDirection(e,this._headDirection):this._direction}getFrameNumber(e,t){let i=this._animationStates.length-1;for(;i>=0;){const n=this._animationStates[i];if(n){const r=n.getFrame(t);if(r)return r.id}i--}return super.getFrameNumber(e,t)}isHeadSprite(e){if(this._headSprites[e]===void 0){const t=this.data.getLayerTag(this._scale,xo.USE_DEFAULT_DIRECTION,e)===Tt.HEAD,i=this.data.getLayerTag(this._scale,xo.USE_DEFAULT_DIRECTION,e)===Tt.HAIR;t||i?this._headSprites[e]=!0:this._headSprites[e]=!1}return this._headSprites[e]}isNonHeadSprite(e){if(this._nonHeadSprites[e]===void 0)if(e0&&t!==Tt.HEAD&&t!==Tt.HAIR?this._nonHeadSprites[e]=!0:this._nonHeadSprites[e]=!1}else this._nonHeadSprites[e]=!0;return this._nonHeadSprites[e]}_parser3(e){return this._saddleSprites[e]===void 0&&(this.data.getLayerTag(this._scale,xo.USE_DEFAULT_DIRECTION,e)===Tt.SADDLE?this._saddleSprites[e]=!0:this._saddleSprites[e]=!1),this._saddleSprites[e]}getAsset(e,t=-1){if(!this.asset)return null;const i=this._customLayerIds.indexOf(t);let n=this._paletteName,r=-1,a=-1;return i>-1&&(r=this._customPartIds[i],a=this._customPaletteIds[i],n=a>-1?a.toString():this._paletteName),!isNaN(r)&&r>-1&&(e=e+"_"+r),this.asset.getAssetWithPalette(e,n)}getAdditionalLayerCount(){return super.getAdditionalLayerCount()+Tt.ADDITIONAL_SPRITE_COUNT}setLayerCount(e){super.setLayerCount(e),this._headSprites=[]}getPostureForAsset(e,t){const i=t.split("_");let n=i.length,r=0;for(;r=t.normalMinX&&e.x<=t.normalMaxX&&e.y>=t.normalMinY&&e.y<=t.normalMaxY)return t.asset;return null}};FE.MIN_NORMAL_COORDINATE_VALUE=-1,FE.MAX_NORMAL_COORDINATE_VALUE=1;let pu=FE;class Wye{constructor(){this._sizes=[],this._maskVisualizations=new Map,this._assetNames=new Map,this._lastMaskVisualization=null,this._lastSize=-1}dispose(){if(this._maskVisualizations){for(const e of this._maskVisualizations.values())e&&e.dispose();this._maskVisualizations=null}this._lastMaskVisualization=null,this._sizes=null}createMaskVisualization(e){if(this._maskVisualizations.get(e))return null;const i=new pu;return this._maskVisualizations.set(e,i),this._sizes.push(e),this._sizes.sort(),i}getSizeIndex(e){let t=0,i=1;for(;ie){this._sizes[i]-e0&&(a=a+this._speedX/i*r/1e3),n>0&&(o=o+this._speedY/n*r/1e3);const l=Math.trunc(a%1*e),u=Math.trunc(o%1*t);return new Q(l,u)}}const Ro=class Ro{constructor(e,t,i,n=0){this._material=e,this._offset=n,this._align=i,this._color=t,this._isDisposed=!1}get offset(){return this._offset}get align(){return this._align}get disposed(){return this._isDisposed}dispose(){this._isDisposed=!0,this._material=null,this.clearCache()}clearCache(){}render(e,t,i,n,r,a,o,l,u){const c=this._color>>16,h=this._color>>8&255,f=this._color&255,d=c<255||h<255||f<255;if(this._material){const _=this._material.render(e,t,d?null:i,n,r,a,o,l,u+this.offset,this.align===Ro.ALIGN_TOP);if(_&&d){const g=new mt(_);d&&(g.tint=this._color),t.writeToRenderTexture(g,i,!1)}}else{const _=t.createAndFillRenderTexture(n,r,e,this._color);t.writeToRenderTexture(new mt(_),i,!1)}return i}getMaterial(){return this._material}getColor(){return this._color}};Ro.DEFAULT_OFFSET=0,Ro.ALIGN_TOP=1,Ro.ALIGN_BOTTOM=2,Ro.ALIGN_DEFAULT=Ro.ALIGN_TOP;let Nn=Ro;class Kye{constructor(e,t,i){this._layers=[],this._geometry=i,this._cachedBitmapNormal=new M,this._isCached=!1,this._hasAnimationLayers=!1,t<0&&(t=0);let n=0;for(;nthis._layers.length)return!1;let a=this._layers[e];return a&&a.dispose(),a=new Nn(t,i,n,r),this._layers[e]=a,!0}setAnimationLayer(e,t,i){if(e<0||e>this._layers.length)return!1;let n=this._layers[e];return n&&n.dispose(),n=new ok(t,i),this._layers[e]=n,this._hasAnimationLayers=!0,!0}getLayers(){return this._layers}render(e,t,i,n,r,a,o,l=0,u=0,c=0,h=0,f=0,d=0,_=0){n<1&&(n=1),r<1&&(r=1),(!i||i.width!==n||i.height!==r)&&(i=null),this._isCached=!0;const g=t.createAndFillRenderTexture(n,r,e);if(this._cachedBitmapNormal.assign(a),this._layers&&this._layers.length)for(const p of this._layers)p&&(p instanceof Nn?p.render(`${e}:${this._layers.indexOf(p)}`,t,g,n,r,a,o,l,u):p instanceof ok&&p.render(t,g,n,r,a,l,u,c,h,f,d,_));return g}}class Yw{constructor(){this._planeVisualizations=new Map,this._sizes=[],this._lastPlaneVisualization=null,this._lastSize=-1}isStatic(e){return!0}dispose(){for(const e of this._planeVisualizations.values())e&&e.dispose();this._planeVisualizations=null,this._lastPlaneVisualization=null,this._sizes=null,this._lastSize=-1}clearCache(){for(const e of this._planeVisualizations.values())e&&e.clearCache()}createPlaneVisualization(e,t,i){if(this._planeVisualizations.get(e.toString()))return null;const r=new Kye(e,t,i);return this._planeVisualizations.set(e.toString(),r),this._sizes.push(e),this._sizes.sort(),r}getSizeIndex(e){let t=0,i=1;for(;ie){this._sizes[i]-et||t>1e3)return null;const i=[];let n=0;for(;n<=t;)i.push(n),n++;const r=[];let a=0;for(;a=this._cachedBitmapData.height||!i&&t<=0))return t}o++}return t}renderRepeatNone(e){!this._cells.length||!this._cachedBitmapData||this.renderCells(this._cells,0,!0,e)}renderRepeatAll(e,t,i){if(!this._cells.length||!this._cachedBitmapData)return;let n=0;for(;n0&&(i=i+u,t.push(l))}n++}if(this._cells.length==1){const l=this._cells[0];if(l){const u=l.getHeight(e);u>0&&(i=i+u,t.push(l))}}let r=this._cachedBitmapData.height-i>>1,a=this.renderCells(t,r,!0,e),o=this._cells[0];if(o){const l=[o];for(;r>=0;)r=this.renderCells(l,r,!1,e)}if(o=this._cells[this._cells.length-1],o){const l=[o];for(;a>1;){const u=this._cells[a];if(u){const c=u.getHeight(e);c>0&&(n=n+c,t.push(u))}a++}for(a=(this._cells.length>>1)+1;a0&&(r=r+c,i.push(u))}a++}let o=0,l=this._cachedBitmapData.height;if(n+r>this._cachedBitmapData.height&&(o=n+r-this._cachedBitmapData.height,l=l+(o-(o>>1))),o==0){const u=this._cells[this._cells.length>>1];if(u){const c=u.getHeight(e);if(c>0){const h=this._cachedBitmapData.height-(n+r),f=Math.ceil(h/c)*c;let d=n-(f-h>>1);const _=d+f,g=[u];for(;d<_;)d=this.renderCells(g,d,!0,e)}}}this.renderCells(t,0,!0,e),this.renderCells(i,l,!1,e)}renderRepeatFirst(e){if(!this._cells.length||!this._cachedBitmapData)return;let t=this.renderCells(this._cells,this._cachedBitmapData.height,!1,e);const i=this._cells[0];if(!i)return;const n=[i];for(;t>=0;)t=this.renderCells(n,t,!1,e)}renderRepeatLast(e){if(!this._cells.length||!this._cachedBitmapData)return;let t=this.renderCells(this._cells,0,!0,e);const i=this._cells[this._cells.length-1];if(!i)return;const n=[i];for(;t=this._columns.length)return!1;const r=new wr(t,i,n),a=this._columns[e];return a&&a.dispose(),this._columns[e]=r,r&&!r.isStatic&&(this._isStatic=!1),!0}render(e,t,i,n,r,a,o,l,u,c){if(n<1&&(n=1),r<1&&(r=1),this._cachedBitmapNormal||(this._cachedBitmapNormal=new M),this.isStatic){if(this._cachedBitmapData){if(this._cachedBitmapData.baseTexture&&this._cachedBitmapData.width===n&&this._cachedBitmapData.height===r&&M.isEqual(this._cachedBitmapNormal,a))return i?(this.copyCachedBitmapOnCanvas(i,this._cachedBitmapHeight,u,c),i):this._cachedBitmapData;this._cachedBitmapData=null}}else this._cachedBitmapData=null;if(this._isCached=!0,this._cachedBitmapNormal.assign(a),!o)return this._cachedBitmapHeight=r,this._cachedBitmapData?t.clearAndFillRenderTexture(this._cachedBitmapData):this._cachedBitmapData=t.createAndFillRenderTexture(n,r,`${e}:matrix`),this._cachedBitmapData;this._cachedBitmapData||(this._cachedBitmapHeight=r,this._cachedBitmapData=t.createRenderTexture(n,r,`${e}:matrix`),t.clearRenderTexture(this._cachedBitmapData));const h=[];let f=0;for(;fr&&(r=o.height),n&&(i=i+o.width),n&&i>=e.width||!n&&i<=0)return new Q(i,r)}a++}return new Q(i,r)}renderRepeatAll(e,t){if(!e||!t||!t.length)return 0;this.getColumnsWidth(t);let i=0,n=0;for(;in&&(n=r.y),!r.x)return n}return n}renderRepeatRandom(e,t){if(!e||!t||!t.length)return 0;let i=0,n=0;for(;ni&&(i=a.y)}else return i}return i}getColumns(e){if(this._repeatMode===It.REPEAT_MODE_RANDOM){const t=[];let i=0;for(;i1)i+=n.width;else break;else break}return t}return this._columns}};It.REPEAT_MODE_ALL=1,It.REPEAT_MODE_BORDERS=2,It.REPEAT_MODE_CENTER=3,It.REPEAT_MODE_FIRST=4,It.REPEAT_MODE_LAST=5,It.REPEAT_MODE_RANDOM=6,It.REPEAT_MODE_DEFAULT=It.REPEAT_MODE_ALL,It.MIN_NORMAL_COORDINATE_VALUE=-1,It.MAX_NORMAL_COORDINATE_VALUE=1,It.ALIGN_TOP=1,It.ALIGN_BOTTOM=2,It.ALIGN_DEFAULT=It.ALIGN_TOP;let Si=It;const BE=class BE{constructor(){this._planeMaterialItems=[],this._isCached=!1}dispose(){if(this._planeMaterialItems&&this._planeMaterialItems.length){for(const e of this._planeMaterialItems)e&&e.dispose();this._planeMaterialItems=null}this._isCached=!1}clearCache(){if(this._isCached){if(this._planeMaterialItems&&this._planeMaterialItems.length)for(const e of this._planeMaterialItems)e&&e.clearCache();this._isCached=!1}}addMaterialCellMatrix(e,t,i,n=-1,r=1,a=-1,o=1){const l=new Si(e,t,i,n,r,a,o);return this._planeMaterialItems.push(l),l}getMaterialCellMatrix(e){if(!e)return null;if(this._planeMaterialItems&&this._planeMaterialItems.length){for(const t of this._planeMaterialItems)if(t&&e.x>=t.normalMinX&&e.x<=t.normalMaxX&&e.y>=t.normalMinY&&e.y<=t.normalMaxY)return t}return null}render(e,t,i,n,r,a,o,l,u,c){n<1&&(n=1),r<1&&(r=1);const h=this.getMaterialCellMatrix(a);return h?(this._isCached=!0,h.render(e,t,i,n,r,a,o,l,u,c)):null}};BE.MIN_NORMAL_COORDINATE_VALUE=-1,BE.MAX_NORMAL_COORDINATE_VALUE=1;let gA=BE;class qye{constructor(e,t=null,i=null,n=0){if(this._extraItemCount=0,this._texture=e,this._extraItemOffsets=[],this._extraItemAssets=[],this._extraItemCount=0,t&&t.length&&n>0){let r=0;for(;r>1<<1,y.scale(g,p),y.translate(T,E.y+v);const w=new mt(f);w.transform.setFromMatrix(y),r.addChild(w)}}u++}}return r}getAssetName(e){return this._texture==null?null:this._texture.getAssetName(e)}}const GE=class GE{constructor(e,t=-1,i=1,n=-1,r=1,a=null){this._bitmap=e,this._normalMinX=t,this._normalMaxX=i,this._normalMinY=n,this._normalMaxY=r,this._assetName=a}get bitmap(){return this._bitmap}get normalMinX(){return this._normalMinX}get normalMaxX(){return this._normalMaxX}get normalMinY(){return this._normalMinY}get normalMaxY(){return this._normalMaxY}get assetName(){return this._assetName}dispose(){this._bitmap=null}};GE.MIN_NORMAL_COORDINATE_VALUE=-1,GE.MAX_NORMAL_COORDINATE_VALUE=1;let pA=GE;const VE=class VE{constructor(){this._bitmaps=[]}dispose(){if(this._bitmaps){for(const e of this._bitmaps)e&&e.dispose();this._bitmaps=null}}addBitmap(e,t=-1,i=1,n=-1,r=1,a=null){this._bitmaps.push(new pA(e,t,i,n,r,a))}getBitmap(e){const t=this.getPlaneTextureBitmap(e);return t?t.bitmap:null}getPlaneTextureBitmap(e){if(!e)return null;for(const t of this._bitmaps)if(t&&e.x>=t.normalMinX&&e.x<=t.normalMaxX&&e.y>=t.normalMinY&&e.y<=t.normalMaxY)return t;return null}getAssetName(e){const t=this.getPlaneTextureBitmap(e);return t?t.assetName:null}};VE.MIN_NORMAL_COORDINATE_VALUE=-1,VE.MAX_NORMAL_COORDINATE_VALUE=1;let Ul=VE;const jE=class jE{constructor(){this._assetCollection=null,this._textures=new Map,this._materials=new Map,this._planes=new Map,this._geometries=new Map,this._data=null}get data(){return this._data}get assetCollection(){return this._assetCollection}initializeDimensions(e,t){return!0}dispose(){if(this._planes){for(const e of this._planes.values())e&&e.dispose();this._planes=null}if(this._materials&&(this.resetMaterials(),this._materials=null),this._textures&&(this.resetTextures(),this._textures=null),this._geometries){for(const e of this._geometries.values())e&&e.dispose();this._geometries=null}this._data=null,this._assetCollection=null}clearCache(){for(const e of this._planes.values())e&&e.clearCache();for(const e of this._materials.values())e&&e.clearCache()}initialize(e){this._data=e}reinitialize(){this.resetTextures(),this.resetMaterials(),this.initializeAll()}resetMaterials(){for(const e of this._materials.values())e&&e.dispose();this._materials.clear()}resetTextures(){for(const e of this._textures.values())e&&e.dispose();this._textures.clear()}getTexture(e){return this._textures.get(e)}getMaterial(e){return this._materials.get(e)}getPlane(e){return this._planes.get(e)}addPlane(e,t){return t?this._planes.get(e)?!1:(this._planes.set(e,t),!0):!1}initializeAssetCollection(e){this._data&&(this._assetCollection=e,this.initializeAll())}initializeAll(){this._data&&(this.initializeTexturesAndMaterials(),this.initializePlanes())}initializeTexturesAndMaterials(){this._data.textures&&this._data.textures.length&&this.parseTextures(this._data.textures,this.assetCollection),this._data.materials&&this._data.materials.length&&this.parsePlaneMaterials(this._data.materials)}initializePlanes(){}parseTextures(e,t){if(!(!e||!t)&&e.length)for(const i of e){if(!i)continue;const n=i.id;if(!this._textures.get(n)){const r=new Ul;if(i.bitmaps&&i.bitmaps.length)for(const a of i.bitmaps){if(!a)continue;const o=a.assetName;let l=Ul.MIN_NORMAL_COORDINATE_VALUE,u=Ul.MAX_NORMAL_COORDINATE_VALUE,c=Ul.MIN_NORMAL_COORDINATE_VALUE,h=Ul.MAX_NORMAL_COORDINATE_VALUE;a.normalMinX!==void 0&&(l=a.normalMinX),a.normalMaxX!==void 0&&(u=a.normalMaxX),a.normalMinY!==void 0&&(c=a.normalMinY),a.normalMaxY!==void 0&&(h=a.normalMaxY);const f=t.getAsset(o);if(f){const d=f.texture;if(d){let _=d;f.flipH?_=QQ.getFlipHBitmapData(d):_=_.clone(),r.addBitmap(_,l,u,c,h,o)}}}this._textures.set(n,r)}}}parsePlaneMaterials(e){if(!(!e||!e.length))for(const t of e){if(!t)continue;const i=t.id,n=new gA;if(t.matrices&&t.matrices.length)for(const r of t.matrices){if(!r)continue;let a=Si.REPEAT_MODE_DEFAULT,o=Si.ALIGN_DEFAULT,l=Si.MIN_NORMAL_COORDINATE_VALUE,u=Si.MAX_NORMAL_COORDINATE_VALUE,c=Si.MIN_NORMAL_COORDINATE_VALUE,h=Si.MAX_NORMAL_COORDINATE_VALUE;switch(r.normalMinX!==void 0&&(l=r.normalMinX),r.normalMaxX!==void 0&&(u=r.normalMaxX),r.normalMinY!==void 0&&(c=r.normalMinY),r.normalMaxY!==void 0&&(h=r.normalMaxY),r.repeatMode){case"borders":a=Si.REPEAT_MODE_BORDERS;break;case"center":a=Si.REPEAT_MODE_CENTER;break;case"first":a=Si.REPEAT_MODE_FIRST;break;case"last":a=Si.REPEAT_MODE_LAST;break;case"random":a=Si.REPEAT_MODE_RANDOM;break;default:a=Si.REPEAT_MODE_DEFAULT;break}switch(r.align){case"top":o=Si.ALIGN_TOP;break;case"bottom":o=Si.ALIGN_BOTTOM;break;default:o=Si.ALIGN_DEFAULT;break}if(r.columns&&r.columns.length){const f=n.addMaterialCellMatrix(r.columns.length,a,o,l,u,c,h);let d=0;for(;d90&&(t=90),i=Math.abs(i),i>90&&(i=90);const n=`${e}_${Math.round(t)}_${Math.round(i)}`;let r=this._geometries.get(n);return r||(r=new Bu(e,new M(t,i),new M(-10,0,0)),this._geometries.set(n,r),r)}parseVisualizations(e,t){if(!(!e||!t)&&t&&t.length)for(const i of t){if(!i)continue;const n=i.size;let r=xc.HORIZONTAL_ANGLE_DEFAULT,a=xc.VERTICAL_ANGLE_DEFAULT;i.horizontalAngle!==void 0&&(r=i.horizontalAngle),i.verticalAngle!==void 0&&(a=i.verticalAngle);const o=i.allLayers,l=e.createPlaneVisualization(n,o&&o.length||0,this.getGeometry(n,r,a));if(l&&o&&o.length){let u=0;for(;u0&&e.charAt(e.length-1)==="%"&&(e=e.substr(0,e.length-1),i=parseFloat(e)/100),t.length>0){const a=il.getValues(1,0,1e4)[0]/1e4;t.charAt(t.length-1)==="%"&&(t=t.substr(0,t.length-1),i=i+a*parseFloat(t)/100)}return i}render(e,t,i,n,r,a,o,l,u,c=0,h=0,f=0,d=0,_=0){let g=this.getPlane(n);if(g||(g=this.getPlane(br.DEFAULT)),!g)return null;i&&t.clearRenderTexture(i);let p=g.render(e,t,i,r,a,o,l,u,c,h,f,d,_);if(p&&p!==i&&(p=new Pi(p.baseTexture),!p))return null;let m=null;return!g.isStatic(o)&&br.UPDATE_INTERVAL>0?m=new Gv(p,Math.round(_/br.UPDATE_INTERVAL)*br.UPDATE_INTERVAL+br.UPDATE_INTERVAL):m=new Gv(p,-1),m}getTextureIdentifier(e,t){return t?t.x<0?e+"_0":e+"_1":super.getTextureIdentifier(e,t)}};br.LANDSCAPES_ENABLED=!0,br.LANDSCAPE_DEFAULT_COLOR=8828617,br.UPDATE_INTERVAL=500;let Vv=br;class ok{constructor(e,t){if(this._color=0,this._isDisposed=!1,this._color=0,this._isDisposed=!1,this._items=[],e&&t)for(const i of e){if(!i)continue;const n=i.asset;if(n){const r=t.getAsset(n);r&&this._items.push(new Xye(i.x,i.y,i.speedX,i.speedY,r))}}}get disposed(){return this._isDisposed}dispose(){if(this._isDisposed=!0,this._items){for(const e of this._items)e&&e.dispose();this._items=[]}}clearCache(){}render(e,t,i,n,r,a,o,l,u,c,h,f){if(l>0&&u>0){let d=0;for(;d-_.bitmapData.width&&g.x-_.bitmapData.height&&g.y-_.bitmapData.width&&g.x-l-_.bitmapData.height&&g.y-_.bitmapData.width&&g.x-_.bitmapData.height&&g.y-u-_.bitmapData.width&&g.x-l-_.bitmapData.height&&g.y-u0&&this._normal.multiply(1/this._normal.length),l!=null)for(const _ of l){if(!_)continue;const g=new M;g.assign(_),this._secondaryNormals.push(g)}this._disposed=!1,this._isVisible=!1,this._id=null,this._hasTexture=!0,this._geometryUpdateId=-1,this._offset=new Q,this._relativeDepth=0,this._type=a,this._color=0,this._rasterizer=null,this._canBeVisible=!0,this._cornerA=new M,this._cornerB=new M,this._cornerC=new M,this._cornerD=new M,this._width=0,this._height=0,this._textureOffsetX=c,this._textureOffsetY=h,this._textureMaxX=f,this._textureMaxY=d,this._useMask=o,this._uniqueId=++cs._uniqueIdCounter}static blend(e,t){return z_.colorize(t,e|4278190080)&16777215}set canBeVisible(e){e!==this._canBeVisible&&(this._canBeVisible||this.resetTextureCache(),this._canBeVisible=e)}get canBeVisible(){return this._canBeVisible}get bitmapData(){return!this.visible||!this._bitmapData?null:this._bitmapData}get maskBitmapData(){return!this.visible||!this._maskBitmapData?null:this._maskBitmapData}get visible(){return this._isVisible&&this._canBeVisible}get offset(){return this._offset}get relativeDepth(){return this._relativeDepth}get color(){return this._color}set color(e){this._color=e}get type(){return this._type}get leftSide(){return this._leftSide}get rightSide(){return this._rightSide}get location(){return this._location}get normal(){return this._normal}get hasTexture(){return this._hasTexture}set hasTexture(e){this._hasTexture=e}set rasterizer(e){this._rasterizer=e}set maskManager(e){this._maskManager=e}set id(e){e!==this._id&&(this.resetTextureCache(),this._id=e)}get uniqueId(){return this._uniqueId}dispose(){this._activeTexture=null,this._location=null,this._origin=null,this._leftSide=null,this._rightSide=null,this._normal=null,this._rasterizer=null,this._cornerA=null,this._cornerB=null,this._cornerC=null,this._cornerD=null,this._bitmapMasks=null,this._rectangleMasks=null,this._maskPixels=null,this._disposed=!0}copyBitmapData(e){return!this.visible||!this._bitmapData||!e||this._bitmapData.width!==e.width||this._bitmapData.height!==e.height?null:e}resetTextureCache(e=null){this._activeTexture=null}getTextureIdentifier(e){return this._rasterizer?this._rasterizer.getTextureIdentifier(e,this.normal):e.toString()}needsNewTexture(e,t){if(!e)return!1;const i=this._activeTexture;return this.updateMaskChangeStatus(),!!(this._canBeVisible&&(!i||i.timeStamp>=0&&t>i.timeStamp||this._maskChanged))}getTexture(e,t){if(!e)return null;let i=null;if(this.needsNewTexture(e,t)){this.getTextureIdentifier(e.scale);const n=this._leftSide.length*e.scale,r=this._rightSide.length*e.scale,a=e.getCoordinatePosition(this._normal);i=this._rasterizer.render(this._uniqueId.toString(),this._textureCache,null,this._id,n,r,e.scale,a,this._hasTexture,this._textureOffsetX,this._textureOffsetY,this._textureMaxX,this._textureMaxY,t),i&&this.updateMask(i.texture,e)}else this._activeTexture&&(i=this._activeTexture);return i?(this._activeTexture=i,i.texture):null}resolveMasks(e){if(!this._useMask)return null;const t=new zf,i=0;for(;i0&&(u.isRepeated()||c.push(""),l.addAssetColumn(c))}l.assetNameColumns.length>0&&t.push(l)}else{const a=new zf(i,cs.blend(this._color,r.getColor()));t.push(a)}t.length||t.push(new zf(i,this._color))}return t}update(e,t){if(!e||this._disposed)return!1;let i=!1;if(this._geometryUpdateId!=e.updateId&&(i=!0),(!i||!this._canBeVisible)&&!this.visible)return!1;if(i){this._activeTexture=null;let n=0;if(n=M.cosAngle(e.directionAxis,this.normal),n>-.001)return this._isVisible?(this._isVisible=!1,!0):!1;let r=0;for(;r-.001)return this._isVisible?(this._isVisible=!1,!0):!1;r++}this.updateCorners(e);const o=e.getScreenPosition(this._origin).z;let l=Math.max(this._cornerA.z,this._cornerB.z,this._cornerC.z,this._cornerD.z)-o;this._type===cs.TYPE_FLOOR&&(l=l-(this._location.z+Math.min(0,this._leftSide.z,this._rightSide.z))*8),this._type===cs.TYPE_LANDSCAPE&&(l=l+.02),this._relativeDepth=l,this._isVisible=!0,this._geometryUpdateId=e.updateId}if(i||this.needsNewTexture(e,t)){if(!this._bitmapData||this._width!==this._bitmapData.width||this._height!==this._bitmapData.height){if(this._bitmapData)if(this._width!==this._bitmapData.width||this._height!==this._bitmapData.height){if(this._bitmapData.destroy(),this._bitmapData=null,this._width<1||this._height<1)return!0;this._bitmapData=this._textureCache.createAndFillRenderTexture(this._width,this._height)}else{if(this._width<1||this._height<1)return this._bitmapData.destroy(),this._bitmapData=null,!0;this._textureCache.clearAndFillRenderTexture(this._bitmapData)}else{if(this._width<1||this._height<1)return!1;this._bitmapData=this._textureCache.createAndFillRenderTexture(this._width,this._height)}if(!this._bitmapData)return!1}else this._textureCache.clearAndFillRenderTexture(this._bitmapData);il.setSeed(this._randomSeed);const n=this.getTexture(e,t);if(n)this.renderTexture(e,n);else return this.dispose(),!1;return n!==null||i}return!1}updateCorners(e){this._cornerA.assign(e.getScreenPosition(this._location)),this._cornerB.assign(e.getScreenPosition(M.sum(this._location,this._rightSide))),this._cornerC.assign(e.getScreenPosition(M.sum(M.sum(this._location,this._leftSide),this._rightSide))),this._cornerD.assign(e.getScreenPosition(M.sum(this._location,this._leftSide))),this._offset=e.getScreenPoint(this._origin),this._cornerA.x=Math.round(this._cornerA.x),this._cornerA.y=Math.round(this._cornerA.y),this._cornerB.x=Math.round(this._cornerB.x),this._cornerB.y=Math.round(this._cornerB.y),this._cornerC.x=Math.round(this._cornerC.x),this._cornerC.y=Math.round(this._cornerC.y),this._cornerD.x=Math.round(this._cornerD.x),this._cornerD.y=Math.round(this._cornerD.y),this._offset.x=Math.round(this._offset.x),this._offset.y=Math.round(this._offset.y);const t=Math.min(this._cornerA.x,this._cornerB.x,this._cornerC.x,this._cornerD.x),i=Math.max(this._cornerA.x,this._cornerB.x,this._cornerC.x,this._cornerD.x)-t,n=Math.min(this._cornerA.y,this._cornerB.y,this._cornerC.y,this._cornerD.y),r=Math.max(this._cornerA.y,this._cornerB.y,this._cornerC.y,this._cornerD.y)-n;this._offset.x=this._offset.x-t,this._cornerA.x=this._cornerA.x-t,this._cornerB.x=this._cornerB.x-t,this._cornerC.x=this._cornerC.x-t,this._cornerD.x=this._cornerD.x-t,this._offset.y=this._offset.y-n,this._cornerA.y=this._cornerA.y-n,this._cornerB.y=this._cornerB.y-n,this._cornerC.y=this._cornerC.y-n,this._cornerD.y=this._cornerD.y-n,this._width=i,this._height=r}getMatrixForDimensions(e,t){let i=this._cornerD.x-this._cornerC.x,n=this._cornerD.y-this._cornerC.y,r=this._cornerB.x-this._cornerC.x,a=this._cornerB.y-this._cornerC.y;(this._type===cs.TYPE_WALL||this._type===cs.TYPE_LANDSCAPE)&&(Math.abs(r-e)<=1&&(r=e),Math.abs(a-e)<=1&&(a=e),Math.abs(i-t)<=1&&(i=t),Math.abs(n-t)<=1&&(n=t));const o=r/e,l=a/e,u=i/t,c=n/t,h=new dt(o,l,u,c);return h.translate(this._cornerC.x,this._cornerC.y),h}renderTexture(e,t){this._cornerA==null||this._cornerB==null||this._cornerC==null||this._cornerD==null||t==null||this._bitmapData==null||this.draw(t,this.getMatrixForDimensions(t.width,t.height))}draw(e,t){this._textureCache.writeToRenderTexture(new mt(e),this._bitmapData,!0,t)}resetBitmapMasks(){this._disposed||!this._useMask||!this._bitmapMasks.length||(this._maskChanged=!0,this._bitmapMasks=[])}addBitmapMask(e,t,i){if(!this._useMask)return!1;for(const r of this._bitmapMasks)if(r&&r.type===e&&r.leftSideLoc===t&&r.rightSideLoc===i)return!1;const n=new lk(e,t,i);return this._bitmapMasks.push(n),this._maskChanged=!0,!0}resetRectangleMasks(){!this._useMask||!this._rectangleMasks.length||(this._maskChanged=!0,this._rectangleMasks=[])}addRectangleMask(e,t,i,n){if(this._useMask){for(const a of this._rectangleMasks)if(a&&a.leftSideLoc===e&&a.rightSideLoc===t&&a.leftSideLength===i&&a.rightSideLength===n)return!1;const r=new uk(e,t,i,n);return this._rectangleMasks.push(r),this._maskChanged=!0,!0}return!1}updateMaskChangeStatus(){if(!this._maskChanged)return;let e=!0;if(this._bitmapMasks.length===this._bitmapMasksOld.length)for(const t of this._bitmapMasks){if(!t)continue;let i=!1;for(const n of this._bitmapMasksOld)if(n&&n.type===t.type&&n.leftSideLoc===t.leftSideLoc&&n.rightSideLoc===t.rightSideLoc){i=!0;break}if(!i){e=!1;break}}else e=!1;this._rectangleMasks.length>this._rectangleMasksOld.length&&(e=!1),e&&(this._maskChanged=!1)}updateMask(e,t){if(!e||!t||!this._useMask||!this._bitmapMasks.length&&!this._rectangleMasks.length&&!this._maskChanged||!this._maskManager)return;const i=e.width,n=e.height;if(this.updateMaskChangeStatus(),(!this._maskBitmapData||this._maskBitmapData.width!==i||this._maskBitmapData.height!==n)&&(this._maskBitmapData=this._textureCache.createAndFillRenderTexture(i,n,"mask"),this._maskChanged=!0),this._maskChanged){this._bitmapMasksOld=[],this._rectangleMasksOld=[],this._maskBitmapData&&this._textureCache.clearAndFillRenderTexture(this._maskBitmapData),this.resetTextureCache(e);const r=t.getCoordinatePosition(this._normal);let a=null,o=0,l=0,u=0;for(;u>8&255)*this._greenColor/255,g=(f>>16&255)*this._blueColor/255;f=(f>>24<<24)+(g<<16)+(_<<8)+d,c.color=f}else c.color=h.color;l++}this.updateSpriteCounter++}this.updateModelCounter=a.updateCounter,this._lastUpdateTime=t}}updateGeometry(e){if(!e||this._geometryUpdateId===e.updateId)return!1;this._geometryUpdateId=e.updateId,this._boundingRectangle=null;const t=e.direction;return t&&(t.x!==this._directionX||t.y!==this._directionY||t.z!==this._directionZ||e.scale!==this._roomScale)?(this._directionX=t.x,this._directionY=t.y,this._directionZ=t.z,this._roomScale=e.scale,!0):!1}updateThickness(e){if(this.updateModelCounter===e.updateCounter)return!1;const t=e.getValue(b.ROOM_FLOOR_THICKNESS),i=e.getValue(b.ROOM_WALL_THICKNESS);return!isNaN(t)&&!isNaN(i)&&(t!==this._floorThickness||i!==this._wallThickness)?(this._floorThickness=t,this._wallThickness=i,this.clearPlanes(),!0):!1}updateHole(e){if(this.updateModelCounter===e.updateCounter)return!1;const t=e.getValue(b.ROOM_FLOOR_HOLE_UPDATE_TIME);return!isNaN(t)&&t!==this._holeUpdateTime?(this._holeUpdateTime=t,this.clearPlanes(),!0):!1}updateMasks(e){if(this.updateModelCounter===e.updateCounter)return!1;let t=!1;const i=e.getValue(b.ROOM_PLANE_MASK_XML);i!==this._maskData&&(this.updatePlaneMasks(i),this._maskData=i,t=!0);const n=e.getValue(b.ROOM_BACKGROUND_COLOR);n!==this._color&&(this._color=n,this._redColor=this._color&255,this._greenColor=this._color>>8&255,this._blueColor=this._color>>16&255,t=!0);const r=e.getValue(b.ROOM_COLORIZE_BG_ONLY)||!1;return r!==this._colorBackgroundOnly&&(this._colorBackgroundOnly=r,t=!0),t}updatePlaneTexturesAndVisibilities(e){if(this.updateModelCounter===e.updateCounter)return!1;const t=e.getValue(b.ROOM_FLOOR_TYPE),i=e.getValue(b.ROOM_WALL_TYPE),n=e.getValue(b.ROOM_LANDSCAPE_TYPE),r=e.getValue(b.ROOM_FLOOR_VISIBILITY)===1,a=e.getValue(b.ROOM_WALL_VISIBILITY)===1,o=e.getValue(b.ROOM_LANDSCAPE_VISIBILITY)===1;return this.updatePlaneTypes(t,i,n)||this.updatePlaneVisibility(r,a,o)}clearPlanes(){if(this._planes){for(;this._planes.length;){const e=this._planes[0];e&&e.dispose(),this._planes.pop()}this._planes=[],this._planes=[]}this._isPlaneSet=!1,this._assetUpdateCounter=this._assetUpdateCounter+1,this.reset()}initializeRoomPlanes(){if(!this.object||this._isPlaneSet)return;isNaN(this._floorThickness)||(this._roomPlaneParser.floorThicknessMultiplier=this._floorThickness),isNaN(this._wallThickness)||(this._roomPlaneParser.wallThicknessMultiplier=this._wallThickness);const e=this.object.model.getValue(b.ROOM_MAP_DATA);if(!this._roomPlaneParser.initializeFromMapData(e))return;const t=this.getLandscapeWidth(),i=this.getLandscapeHeight();let n=0,r=this.object.model.getValue(b.ROOM_RANDOM_SEED),a=0;for(;a>>0),f=null,h===Nt.PLANE_FLOOR){const _=o.x+l.x+.5,g=o.y+u.y+.5,p=Math.trunc(_)-_,m=Math.trunc(g)-g;f=new nt(this._textureCache,this.object.getLocation(),o,l,u,nt.TYPE_FLOOR,!0,c,r,-p,-m),d.z!==0?f.color=_t.FLOOR_COLOR:f.color=d.x!==0?_t.FLOOR_COLOR_RIGHT:_t.FLOOR_COLOR_LEFT,this._data&&(f.rasterizer=this._data.floorRasterizer)}else h===Nt.PLANE_WALL?(f=new nt(this._textureCache,this.object.getLocation(),o,l,u,nt.TYPE_WALL,!0,c,r),(l.length<1||u.length<1)&&(f.hasTexture=!1),d.x===0&&d.y===0?f.color=_t.WALL_COLOR_BORDER:d.y>0?f.color=_t.WALL_COLOR_TOP:d.y===0?f.color=_t.WALL_COLOR_SIDE:f.color=_t.WALL_COLOR_BOTTOM,this._data&&(f.rasterizer=this._data.wallRasterizer)):h===Nt.PLANE_LANDSCAPE?(f=new nt(this._textureCache,this.object.getLocation(),o,l,u,nt.TYPE_LANDSCAPE,!0,c,r,n,0,t,i),d.y>0?f.color=_t.LANDSCAPE_COLOR_TOP:d.y==0?f.color=_t.LANDSCAPE_COLOR_SIDE:f.color=_t.LANDSCAPE_COLOR_BOTTOM,this._data&&(f.rasterizer=this._data.landscapeRasterizer),n=n+l.length):h==Nt.PLANE_BILLBOARD&&(f=new nt(this._textureCache,this.object.getLocation(),o,l,u,nt.TYPE_WALL,!0,c,r),(l.length<1||u.length<1)&&(f.hasTexture=!1),d.x==0&&d.y==0?f.color=_t.WALL_COLOR_BORDER:d.y>0?f.color=_t.WALL_COLOR_TOP:d.y==0?f.color=_t.WALL_COLOR_SIDE:f.color=_t.WALL_COLOR_BOTTOM);if(f){f.maskManager=this._data.maskManager;let _=0;for(;_e&&(e=n.length)}t++}return e>5&&(e=5),e}updatePlaneTypes(e,t,i){if(e!==this._floorType?this._floorType=e:e=null,t!==this._wallType?this._wallType=t:t=null,i!==this._landscapeType?this._landscapeType=i:i=null,!e&&!t&&!i)return!1;let n=0;for(;n0;let r=this._visiblePlanes;this._visiblePlanes.length||(r=this._planes);let a=0,o=!1,l=0;for(;l0;)this._heights.push(0),this._isNotStackable.push(!1),this._isRoomTile.push(!1),i--}dispose(){this._width=0,this._height=0,this._height=null,this._isNotStackable=null,this._isRoomTile=null}validPosition(e,t){return e>=0&&e=0&&t=this._width)&&(r=0),(a<0||a>=this._height)&&(a=0),o=Math.min(o,this._width-r),l=Math.min(l,this._height-a),c===-1&&(c=this.getTileHeight(e,t));let d=t;for(;d=r+o||d=a+l){if(f=d*this._width+h,u){if(!this._isRoomTile[f])return!1}else if(this._isNotStackable[f]||!this._isRoomTile[f]||Math.abs(this._heights[f]-c)>.01)return!1}h++}d++}return!0}get width(){return this._width}get height(){return this._height}}const Xs=class Xs{constructor(){this._isDisposed=!1,this._scale=64,this._heightMap=[],this._width=0,this._height=0,this._floorHeight=0}get disposed(){return this._isDisposed}get scale(){return this._scale}set scale(e){this._scale=e}dispose(){this.reset(),this._isDisposed=!0}initialize(e,t,i){if(e<=this._width&&t<=this._height){this._width=e,this._height=t,this._floorHeight=i;return}this.reset();let n=0;for(;n=this._width||t<0||t>=this._height)return!1;const n=this._heightMap[t];return n?(n[e]=i,!0):!1}getHeight(e,t){if(e<0||e>=this._width||t<0||t>=this._height)return 0;const i=this._heightMap[t];return i?i[e]:0}getLocation(e,t,i,n,r){if(e==0&&t==0){e=this._width,t=this._height;const c=Math.round(this.scale/10);if(r==Xs.R){let h=this._width-1;for(;h>=0;){let f=1;for(;f=0;){let f=1;for(;f=0&&r=0&&e=0&&t=0}};Xs.DEFAULT_SCALE=32,Xs.L="l",Xs.R="r";let jv=Xs;const HE=class HE{constructor(){this._targetId=-1,this._targetCategory=-2,this._targetLoc=null,this._moveDistance=0,this._previousMoveSpeed=0,this._maintainPreviousMoveSpeed=!1,this._currentLoc=null,this._limitedLocX=!1,this._limitedLocY=!1,this._centeredLocX=!1,this._centeredLocY=!1,this._screenWd=0,this._screenHt=0,this._scale=0,this._roomWd=0,this._roomHt=0,this._geometryUpdateId=-1,this._scaleChanged=!1,this._targetObjectLoc=new M}get location(){return this._currentLoc}get targetId(){return this._targetId}set targetId(e){this._targetId=e}get targetCategory(){return this._targetCategory}set targetCategory(e){this._targetCategory=e}get targetObjectLoc(){return this._targetObjectLoc}set targetObjectLoc(e){this._targetObjectLoc.assign(e)}get limitedLocationX(){return this._limitedLocX}set limitedLocationX(e){this._limitedLocX=e}get limitedLocationY(){return this._limitedLocY}set limitedLocationY(e){this._limitedLocY=e}get centeredLocX(){return this._centeredLocX}set centeredLocX(e){this._centeredLocX=e}get centeredLocY(){return this._centeredLocY}set centeredLocY(e){this._centeredLocY=e}get screenWd(){return this._screenWd}set screenWd(e){this._screenWd=e}get screenHt(){return this._screenHt}set screenHt(e){this._screenHt=e}get scale(){return this._scale}set scale(e){this._scale!=e&&(this._scale=e,this._scaleChanged=!0)}get roomWd(){return this._roomWd}set roomWd(e){this._roomWd=e}get roomHt(){return this._roomHt}set roomHt(e){this._roomHt=e}get geometryUpdateId(){return this._geometryUpdateId}set geometryUpdateId(e){this._geometryUpdateId=e}get isMoving(){return this._targetLoc!=null&&this._currentLoc!=null}set target(e){let t;this._targetLoc==null&&(this._targetLoc=new M),(this._targetLoc.x!=e.x||this._targetLoc.y!=e.y||this._targetLoc.z!=e.z)&&(this._targetLoc.assign(e),t=M.dif(this._targetLoc,this._currentLoc),this._moveDistance=t.length,this._maintainPreviousMoveSpeed=!0)}dispose(){this._targetLoc=null,this._currentLoc=null}initializeLocation(e){this._currentLoc==null&&(this._currentLoc=new M,this._currentLoc.assign(e))}resetLocation(e){this._currentLoc==null&&(this._currentLoc=new M),this._currentLoc.assign(e)}update(e,t){let i,n,r,a,o;if(this._followDuration>0&&this._targetLoc!=null&&this._currentLoc!=null){if(this._scaleChanged){this._scaleChanged=!1,this._currentLoc=this._targetLoc,this._targetLoc=null;return}i=M.dif(this._targetLoc,this._currentLoc),i.length>this._moveDistance&&(this._moveDistance=i.length),i.length<=t?(this._currentLoc=this._targetLoc,this._targetLoc=null,this._previousMoveSpeed=0):(n=Math.sin(Math.PI*i.length/this._moveDistance),r=t*.5,a=this._moveDistance/HE.MOVE_SPEED_DENOMINATOR,o=r+(a-r)*n,this._maintainPreviousMoveSpeed&&(oi.length&&(o=i.length)):this._maintainPreviousMoveSpeed=!1),this._previousMoveSpeed=o,i.divide(i.length),i.multiply(o),this._currentLoc=M.sum(this._currentLoc,i))}}reset(){this._geometryUpdateId=-1}activateFollowing(e){this._followDuration=e}};HE.MOVE_SPEED_DENOMINATOR=12;let yA=HE;class hk{constructor(e,t){this._roomId=e,this._data=t,this._floorType=null,this._wallType=null,this._landscapeType=null}get roomId(){return this._roomId}get data(){return this._data}get floorType(){return this._floorType}set floorType(e){this._floorType=e}get wallType(){return this._wallType}set wallType(e){this._wallType=e}get landscapeType(){return this._landscapeType}set landscapeType(e){this._landscapeType=e}}class mT{constructor(e,t,i,n,r,a,o,l=NaN,u=-1,c=0,h=0,f="",d=!0,_=!0,g=-1){this._id=e,this._typeId=t,this._type=i,this._state=a,this._data=o,this._extra=l,this._expiryTime=u,this._usagePolicy=c,this._ownerId=h,this._ownerName=f,this._synchronized=d,this._realRoomObject=_,this._sizeZ=g,this._location=new M,this._direction=new M,this._location.assign(n),this._direction.assign(r)}get id(){return this._id}get typeId(){return this._typeId}get type(){return this._type}get location(){return this._location}get direction(){return this._direction}get state(){return this._state}get data(){return this._data}get extra(){return this._extra}get expiryTime(){return this._expiryTime}get usagePolicy(){return this._usagePolicy}get ownerId(){return this._ownerId}get ownerName(){return this._ownerName}get synchronized(){return this._synchronized}get realRoomObject(){return this._realRoomObject}get sizeZ(){return this._sizeZ}}class eTe{constructor(e,t){this._tileObjectMap=new Map;let i=0;for(;i=0&&e=0&&t=0&&e=0&&t-1?(this._mouseButtonCursorOwners.splice(t,1),!0):!1}hasButtonMouseCursorOwners(){return this._mouseButtonCursorOwners.length>0}get roomId(){return this._roomId}get modelName(){return this._modelName}get legacyGeometry(){return this._legacyGeometry}get tileObjectMap(){return this._tileObjectMap}get roomCamera(){return this._roomCamera}get selectedObject(){return this._selectedObject}get placedObject(){return this._placedObject}get furnitureStackingHeightMap(){return this._furnitureStackingHeightMap}}class iTe{constructor(e,t){this._object=e,this._groupBadge=t}get object(){return this._object}get groupBadge(){return this._groupBadge}}class vT{constructor(e,t,i,n,r,a=0,o=null,l=null,u=-1,c=-1,h=null){this._id=0,this._category=0,this._operation="",this._loc=null,this._dir=null,this._typeId=0,this._instanceData=null,this._stuffData=null,this._state=-1,this._animFrame=-1,this._posture=null,this._id=e,this._category=t,this._operation=i,this._loc=new M,this._loc.assign(n),this._dir=new M,this._dir.assign(r),this._typeId=a,this._instanceData=o,this._stuffData=l,this._state=u,this._animFrame=c,this._posture=h}get id(){return this._id}get category(){return this._category}get operation(){return this._operation}get loc(){return this._loc}get dir(){return this._dir}get typeId(){return this._typeId}get instanceData(){return this._instanceData}get stuffData(){return this._stuffData}get state(){return this._state}get animFrame(){return this._animFrame}get posture(){return this._posture}dispose(){this._loc=null,this._dir=null}}const fs=class fs{constructor(){this.spriteCount=0,this.externalImageCount=0}static addMannequinSprites(e,t){const i=[];for(const n of e)if(n)if(n.type==="boutique_mannequin1"&&n.name.indexOf("mannequin_")===0){const r=t.getRoomObject(t.activeRoomId,n.objectId,U.FLOOR);if(r){const a=r.visualization.getSpriteList();if(a)for(const o of a)o.x=o.x+(n.x+n.width/2+fs.MANNEQUIN_MAGIC_X_OFFSET),o.y=o.y+(n.y+n.height+fs.MANNEQUIN_MAGIC_Y_OFFSET),o.z=o.z+n.z,i.push(o)}}else i.push(n);return i}static sortSpriteDataObjects(e,t){return e.zt.z,-1)}static isSpriteInViewPort(e,t,i){return!0}static sortQuadPoints(e,t,i,n){const r=[];if(e.x==t.x?r.push(e,i,t,n):e.x==i.x?r.push(e,t,i,n):t.xe.y||t.x>e.x&&t.y0&&l.name.indexOf("tile_cursor_")!==0&&fs.isSpriteInViewPort(l,e,t)&&(n<0||l.objectId!=n)&&(r.push(this.getSpriteDataObject(l,e,t,i)),this.maxZ||(this.maxZ=l.z),this.spriteCount++);return JSON.stringify(r)}getRoomRenderingModifiers(e){return JSON.stringify(new Object)}getSpriteDataObject(e,t,i,n){let r=[];const a={};let o=e.name;return e.name.indexOf("@")!==-1&&(r=e.name.split("@"),o=r[0],r[1]),a.name=o,a.x=e.x-t.x,a.y=e.y-t.y,a.x=a.x+i.screenOffsetX,a.y=a.y+i.screenOffsetY,a.z=e.z,e.alpha&&e.alpha.toString()!=="255"&&(a.alpha=e.alpha),e.flipH&&(a.flipH=e.flipH),e.skew&&(a.skew=e.skew),e.frame&&(a.frame=e.frame),e.color&&e.color.length>0&&(a.color=parseInt(e.color)),e.blendMode&&e.blendMode!=="normal"&&(a.blendMode=e.blendMode),o.indexOf("http")===0&&(a.width=e.width,a.height=e.height,this.externalImageCount++,this.externalImageCount>fs.MAX_EXTERNAL_IMAGE_COUNT&&(a.name="box")),e.posture&&(a.posture=e.posture),a}makeBackgroundPlane(e,t,i){const n=new Q(0,0),r=new Q(e.width,0),a=new Q(0,e.height),o=new Q(e.width,e.height),l=fs.sortQuadPoints(n,r,a,o);let u=0;i.length>0?(u=i[0].z,this.maxZ&&(u=Math.max(this.maxZ,u))):u=this.maxZ?this.maxZ:0,u=u+(this.spriteCount*1.776104+i.length*2.31743);const c=new zf(null,t);return c.cornerPoints=l,c.z=u,c}sortRoomPlanes(e,t,i){const n=new Map;let r=1;this.maxZ&&(r=r+this.maxZ);for(const l of e){const u={plane:l,z:r};n.set(l.uniqueId,u)}const a=t.getPlaneSortableSprites();a.sort((l,u)=>u.z-l.z),a.reverse();let o=[];for(const l of a){const u=l.sprite;if(u){const c=n.get(u.id);c&&(n.delete(u.id),c.z=l.z,o.push(c))}}return o=o.concat(Array.from(n.values())),o}getRoomPlanes(e,t,i,n){const r=[],o=i.getRoomObject(i.activeRoomId,Z_.ROOM_OBJECT_ID,U.ROOM).visualization;if(o){const l=t.geometry,u=this.sortRoomPlanes(o.planes,t,i),c=oi.instance.stage;for(const h of u){const f=h.plane,d=[],_=M.sum(f.location,f.leftSide),g=l.getScreenPoint(f.location),p=l.getScreenPoint(_),m=l.getScreenPoint(M.sum(f.location,f.rightSide)),v=l.getScreenPoint(M.sum(_,f.rightSide));d.push(g,p,m,v);let E=0,y=0;for(const T of d)T.x+=c.width/2,T.y+=c.height/2,T.x+=t.screenOffsetX,T.y+=t.screenOffsetY,T.x+=-e.x,T.y+=-e.y,T.x<0?E--:T.x>=e.width&&E++,T.y<0?y--:T.y>=e.height&&y++;if(!(Math.abs(E)===4||Math.abs(y)===4)){const T=fs.sortQuadPoints(g,p,m,v);for(const w of f.getDrawingDatas(l))w.cornerPoints=T,w.z=h.z,r.push(w)}}r.unshift(this.makeBackgroundPlane(e,n,r))}return r}};fs.MANNEQUIN_MAGIC_X_OFFSET=1,fs.MANNEQUIN_MAGIC_Y_OFFSET=-16,fs.AVATAR_WATER_EFFECT_MAGIC_Y_OFFSET=-52,fs.MAX_EXTERNAL_IMAGE_COUNT=30;let TA=fs;class sTe extends Bs{constructor(e){super(),this._connection=null,this._roomCreator=e,this._planeParser=new ri,this._latestEntryTileEvent=null,this._currentRoomId=0,this._ownUserId=0,this._initialConnection=!0,this._guideId=-1,this._requesterId=-1}onDispose(){super.onDispose(),this._connection=null,this._roomCreator=null,this._latestEntryTileEvent=null,this._planeParser&&(this._planeParser.dispose(),this._planeParser=null)}setConnection(e){this._connection||!e||(this._connection=e,this._connection.addMessageEvent(new Av(this.onUserInfoEvent.bind(this))),this._connection.addMessageEvent(new Zc(this.onRoomReadyMessageEvent.bind(this))),this._connection.addMessageEvent(new rb(this.onRoomPaintEvent.bind(this))),this._connection.addMessageEvent(new tb(this.onRoomModelEvent.bind(this))),this._connection.addMessageEvent(new sb(this.onRoomHeightMapEvent.bind(this))),this._connection.addMessageEvent(new nb(this.onRoomHeightMapUpdateEvent.bind(this))),this._connection.addMessageEvent(new ab(this.onRoomThicknessEvent.bind(this))),this._connection.addMessageEvent(new ib(this.onRoomDoorEvent.bind(this))),this._connection.addMessageEvent(new VS(this.onRoomRollingEvent.bind(this))),this._connection.addMessageEvent(new GS(this.onObjectsDataUpdateEvent.bind(this))),this._connection.addMessageEvent(new XS(this.onFurnitureAliasesEvent.bind(this))),this._connection.addMessageEvent(new zS(this.onFurnitureFloorAddEvent.bind(this))),this._connection.addMessageEvent(new HS(this.onFurnitureFloorEvent.bind(this))),this._connection.addMessageEvent(new WS(this.onFurnitureFloorRemoveEvent.bind(this))),this._connection.addMessageEvent(new YS(this.onFurnitureFloorUpdateEvent.bind(this))),this._connection.addMessageEvent(new QS(this.onFurnitureWallAddEvent.bind(this))),this._connection.addMessageEvent(new ZS(this.onFurnitureWallEvent.bind(this))),this._connection.addMessageEvent(new JS(this.onFurnitureWallRemoveEvent.bind(this))),this._connection.addMessageEvent(new eb(this.onFurnitureWallUpdateEvent.bind(this))),this._connection.addMessageEvent(new KS(this.onFurnitureDataEvent.bind(this))),this._connection.addMessageEvent(new qS(this.onItemDataUpdateMessageEvent.bind(this))),this._connection.addMessageEvent(new $S(this.onOneWayDoorStatusMessageEvent.bind(this))),this._connection.addMessageEvent(new Iv(this.onRoomUnitDanceEvent.bind(this))),this._connection.addMessageEvent(new lb(this.onRoomUnitEffectEvent.bind(this))),this._connection.addMessageEvent(new Rv(this.onRoomUnitEvent.bind(this))),this._connection.addMessageEvent(new ub(this.onRoomUnitExpressionEvent.bind(this))),this._connection.addMessageEvent(new hb(this.onRoomUnitHandItemEvent.bind(this))),this._connection.addMessageEvent(new cb(this.onRoomUnitIdleEvent.bind(this))),this._connection.addMessageEvent(new Sv(this.onRoomUnitInfoEvent.bind(this))),this._connection.addMessageEvent(new fb(this.onRoomUnitNumberEvent.bind(this))),this._connection.addMessageEvent(new bv(this.onRoomUnitRemoveEvent.bind(this))),this._connection.addMessageEvent(new db(this.onRoomUnitStatusEvent.bind(this))),this._connection.addMessageEvent(new Lw(this.onRoomUnitChatEvent.bind(this))),this._connection.addMessageEvent(new yv(this.onRoomUnitChatEvent.bind(this))),this._connection.addMessageEvent(new Tv(this.onRoomUnitChatEvent.bind(this))),this._connection.addMessageEvent(new ob(this.onRoomUnitTypingEvent.bind(this))),this._connection.addMessageEvent(new Ev(this.onPetFigureUpdateEvent.bind(this))),this._connection.addMessageEvent(new J4(this.onPetExperienceEvent.bind(this))),this._connection.addMessageEvent(new iF(this.onYouArePlayingGameEvent.bind(this))),this._connection.addMessageEvent(new jS(this.onDiceValueMessageEvent.bind(this))),this._connection.addMessageEvent(new Fw(this.onIgnoreResultEvent.bind(this))),this._connection.addMessageEvent(new P4(this.onGuideSessionStartedMessageEvent.bind(this))),this._connection.addMessageEvent(new M4(this.onGuideSessionEndedMessageEvent.bind(this))),this._connection.addMessageEvent(new N4(this.onGuideSessionErrorMessageEvent.bind(this))))}setRoomId(e){this._currentRoomId!==0&&this._roomCreator&&this._roomCreator.destroyRoom(this._currentRoomId),this._currentRoomId=e,this._latestEntryTileEvent=null}clearRoomId(){this._currentRoomId=0,this._latestEntryTileEvent=null}onUserInfoEvent(e){if(!(e instanceof Av)||!e.connection)return;const t=e.getParser();t&&(this._ownUserId=t.userInfo.userId)}onRoomReadyMessageEvent(e){const t=e.getParser();if(this._currentRoomId!==t.roomId&&this.setRoomId(t.roomId),this._roomCreator&&this._roomCreator.setRoomInstanceModelName(t.roomId,t.name),this._initialConnection){e.connection.send(new h6),this._initialConnection=!1;return}e.connection.send(new bb)}onRoomPaintEvent(e){if(!(e instanceof rb))return;const t=e.getParser();if(!t)return;const i=t.floorType,n=t.wallType,r=t.landscapeType;this._roomCreator&&this._roomCreator.updateRoomInstancePlaneType(this._currentRoomId,i,n,r)}onRoomModelEvent(e){if(!(e instanceof tb)||!e.connection||!this._roomCreator)return;const t=e.getParser();if(!t)return;const i=this._roomCreator.getLegacyWallGeometry(this._currentRoomId);if(!i)return;this._planeParser.reset();const n=t.width,r=t.height;this._planeParser.initializeTileMap(n,r);let a=null;this._latestEntryTileEvent&&(a=this._latestEntryTileEvent.getParser());let o=-1,l=-1,u=0,c=0,h=0;for(;h0&&h0&&_=0;){let _=t.width-1;for(;_>=0;)i.setHeight(_,f,this._planeParser.getTileHeight(_,f)),_--;f--}const d=this._planeParser.getMapData();d.doors.push({x:o,y:l,z:u,dir:c}),this._roomCreator.createRoomInstance(this._currentRoomId,d)}onRoomHeightMapEvent(e){if(!(e instanceof sb)||!e.connection||!this._roomCreator)return;const t=e.getParser();if(!t)return;const i=t.width,n=t.height,r=new Jye(i,n);let a=0;for(;a0?setTimeout(()=>{this._roomCreator.removeRoomObjectFloor(this._currentRoomId,t.itemId,t.isExpired?-1:t.userId,!0)},t.delay):this._roomCreator.removeRoomObjectFloor(this._currentRoomId,t.itemId,t.isExpired?-1:t.userId,!0))}onFurnitureFloorUpdateEvent(e){if(!(e instanceof YS)||!e.connection||!this._roomCreator)return;const t=e.getParser().item;if(!t)return;const i=new M(t.x,t.y,t.z),n=new M(t.direction);this._roomCreator.updateRoomObjectFloor(this._currentRoomId,t.itemId,i,n,t.data.state,t.data,t.extra),this._roomCreator.updateRoomObjectFloorHeight(this._currentRoomId,t.itemId,t.stackHeight),this._roomCreator.updateRoomObjectFloorExpiration(this._currentRoomId,t.itemId,t.expires)}onFurnitureWallAddEvent(e){if(!(e instanceof QS)||!e.connection||!this._roomCreator)return;const t=e.getParser().item;t&&this.addRoomObjectFurnitureWall(this._currentRoomId,t)}onFurnitureWallEvent(e){if(!(e instanceof ZS)||!e.connection||!this._roomCreator)return;const t=e.getParser();if(!t)return;const i=t.items.length;let n=0;for(;n0&&ce.instance.createLinkEvent(e.clickUrl),i=Mh.FURNI_CLICK;break;case Rt.ROOM_AD_FURNI_DOUBLE_CLICK:if(e.clickUrl&&e.clickUrl.length>0){const n="CATALOG_PAGE";e.clickUrl.indexOf(n)===0&&ce.instance.createLinkEvent(e.clickUrl.substr(n.length))}i=Mh.FURNI_DOUBLE_CLICK;break;case Rt.ROOM_AD_TOOLTIP_SHOW:i=Mh.TOOLTIP_SHOW;break;case Rt.ROOM_AD_TOOLTIP_HIDE:i=Mh.TOOLTIP_HIDE;break}i&&this._roomEngine.events.dispatchEvent(new Se(i,t,e.objectId,this._roomEngine.getRoomObjectCategoryForType(e.objectType)))}onRoomObjectBadgeAssetEvent(e,t){if(!(!e||!this._roomEngine))switch(e.type){case ir.LOAD_BADGE:{const i=e.objectId,n=e.objectType,r=this._roomEngine.getRoomObjectCategoryForType(n);this._roomEngine.loadRoomObjectBadgeImage(t,i,r,e.badgeId,e.groupBadge);return}}}handleMousePointer(e,t){e&&this._roomEngine.updateMousePointer(e.type,e.objectId,e.objectType)}handleRoomObjectPlaySoundEvent(e,t){const i=this._roomEngine.getRoomObjectCategoryForType(e.objectType);switch(e.type){case Aa.PLAY_SOUND:this._roomEngine.events.dispatchEvent(new Ch(Ch.PLAY_SOUND,t,e.objectId,i,e.soundId,e.pitch));return;case Aa.PLAY_SOUND_AT_PITCH:this._roomEngine.events.dispatchEvent(new Ch(Ch.PLAY_SOUND_AT_PITCH,t,e.objectId,i,e.soundId,e.pitch));return}}handleRoomObjectSamplePlaybackEvent(e,t){if(!e)return;const i=this._roomEngine.getRoomObjectCategoryForType(e.objectType);switch(e.type){case Zt.ROOM_OBJECT_INITIALIZED:this._roomEngine.events.dispatchEvent(new $s($s.ROOM_OBJECT_INITIALIZED,t,e.objectId,i,e.sampleId,e.pitch));break;case Zt.ROOM_OBJECT_DISPOSED:this._roomEngine.events.dispatchEvent(new $s($s.ROOM_OBJECT_DISPOSED,t,e.objectId,i,e.sampleId,e.pitch));break;case Zt.PLAY_SAMPLE:this._roomEngine.events.dispatchEvent(new $s($s.PLAY_SAMPLE,t,e.objectId,i,e.sampleId,e.pitch));break;case Zt.CHANGE_PITCH:this._roomEngine.events.dispatchEvent(new $s($s.CHANGE_PITCH,t,e.objectId,i,e.sampleId,e.pitch));break}}onHSLColorEnableEvent(e,t){if(!(!e||!this._roomEngine))switch(e.type){case ma.ROOM_BACKGROUND_COLOR:this._roomEngine.events.dispatchEvent(new Qm(Qm.ROOM_BACKGROUND_COLOR,t,e.enable,e.hue,e.saturation,e.lightness));return}}onRoomObjectDataRequestEvent(e,t){if(!(!e||!this._roomEngine||!e.object))switch(e.type){case Mn.RODRE_CURRENT_USER_ID:e.object.model.setValue(b.SESSION_CURRENT_USER_ID,this._roomEngine.sessionDataManager.userId);return;case Mn.RODRE_URL_PREFIX:e.object.model.setValue(b.SESSION_URL_PREFIX,Te.getValue("url.prefix"));return}}onRoomObjectTileMouseEvent(e,t){if(!this._roomEngine||this._roomEngine.isDecorating||!this._roomEngine.roomSessionManager)return;const i=this._roomEngine.roomSessionManager.getSession(e);!i||i.isSpectator||this.sendWalkUpdate(t.tileXAsInt,t.tileYAsInt)}handleObjectMove(e,t){if(!e||!this._roomEngine||!this._roomEngine.events)return;const n=this.getSelectedRoomObjectData(t);if(!n)return;const r=this._roomEngine.getRoomObject(t,n.id,n.category);if(!r)return;let a=!0;if(n.category===U.FLOOR||n.category===U.UNIT){const o=this._roomEngine.getFurnitureStackingHeightMap(t);e instanceof Qr&&this.handleFurnitureMove(r,n,Math.trunc(e.tileX+.5),Math.trunc(e.tileY+.5),o)||(this.handleFurnitureMove(r,n,n.loc.x,n.loc.y,o),a=!1)}else if(n.category===U.WALL){if(a=!1,e instanceof hh){const o=e.wallLocation,l=e.wallWidth,u=e.wallHeight,c=e.x,h=e.y,f=e.direction;this.handleWallItemMove(r,n,o,l,u,c,h,f)&&(a=!0)}a||(r.setLocation(n.loc),r.setDirection(n.dir)),this._roomEngine.updateRoomObjectMask(t,n.id,a)}a?(this.setFurnitureAlphaMultiplier(r,.5),this._roomEngine.setObjectMoverIconSpriteVisible(!1)):(this.setFurnitureAlphaMultiplier(r,0),this._roomEngine.setObjectMoverIconSpriteVisible(!0))}handleObjectPlace(e,t){if(!e||!this._roomEngine||!this._roomEngine.events)return;let n=this.getSelectedRoomObjectData(t);if(!n)return;let r=this._roomEngine.getRoomObject(t,n.id,n.category);if(!r){if(e instanceof Qr){if(n.category===U.FLOOR)this._roomEngine.addFurnitureFloor(t,n.id,n.typeId,n.loc,n.dir,0,n.stuffData,parseFloat(n.instanceData),-1,0,0,"",!1);else if(n.category===U.UNIT){this._roomEngine.addRoomObjectUser(t,n.id,new M,new M(180),180,n.typeId,n.instanceData);const a=this._roomEngine.getRoomObject(t,n.id,n.category);a&&n.posture&&a.model.setValue(b.FIGURE_POSTURE,n.posture)}}else e instanceof hh&&n.category===U.WALL&&this._roomEngine.addFurnitureWall(t,n.id,n.typeId,n.loc,n.dir,0,n.instanceData,0);if(r=this._roomEngine.getRoomObject(t,n.id,n.category),r&&n.category===U.FLOOR){const a=r.model.getValue(b.FURNITURE_ALLOWED_DIRECTIONS);if(a&&a.length){const o=new M(a[0]);if(r.setDirection(o),this.updateSelectedObjectData(t,n.id,n.category,n.loc,o,n.operation,n.typeId,n.instanceData,n.stuffData,n.state,n.animFrame,n.posture),n=this.getSelectedRoomObjectData(t),!n)return}}this.setFurnitureAlphaMultiplier(r,.5),this._roomEngine.setObjectMoverIconSpriteVisible(!0)}if(r){let a=!0;const o=this._roomEngine.getFurnitureStackingHeightMap(t);if(n.category===U.FLOOR)e instanceof Qr&&this.handleFurnitureMove(r,n,Math.trunc(e.tileX+.5),Math.trunc(e.tileY+.5),o)||(this._roomEngine.removeRoomObjectFloor(t,n.id),a=!1);else if(n.category===U.WALL){if(a=!1,e instanceof hh){const l=e.wallLocation,u=e.wallWidth,c=e.wallHeight,h=e.x,f=e.y,d=e.direction;this.handleWallItemMove(r,n,l,u,c,h,f,d)&&(a=!0)}a||this._roomEngine.removeRoomObjectWall(t,n.id),this._roomEngine.updateRoomObjectMask(t,n.id,a)}else n.category===U.UNIT&&(e instanceof Qr&&this.handleUserPlace(r,Math.trunc(e.tileX+.5),Math.trunc(e.tileY+.5),this._roomEngine.getLegacyWallGeometry(t))||(this._roomEngine.removeRoomObjectUser(t,n.id),a=!1));this._roomEngine.setObjectMoverIconSpriteVisible(!a)}}handleFurnitureMove(e,t,i,n,r){if(!e||!t)return!1;const a=new M;a.assign(e.getDirection()),e.setDirection(t.dir);const o=new M(i,n,0),l=new M;l.assign(e.getDirection());let u=this.validateFurnitureLocation(e,o,t.loc,t.dir,r);return u||(l.x=this.getValidRoomObjectDirection(e,!0),e.setDirection(l),u=this.validateFurnitureLocation(e,o,t.loc,t.dir,r)),u?(e.setLocation(u),l&&e.setDirection(l),!0):(e.setDirection(a),!1)}handleWallItemMove(e,t,i,n,r,a,o,l){if(!e||!t)return!1;const u=new M(l),c=this.validateWallItemLocation(e,i,n,r,a,o,t);return c?(e.setLocation(c),e.setDirection(u),!0):!1}validateFurnitureLocation(e,t,i,n,r){if(!e||!e.model||!t)return null;let a=null;const o=e.getDirection();if(!o||!i||!n)return null;if(t.x===i.x&&t.y===i.y&&o.x===n.x)return a=new M,a.assign(i),a;let l=e.model.getValue(b.FURNITURE_SIZE_X),u=e.model.getValue(b.FURNITURE_SIZE_Y);l<1&&(l=1),u<1&&(u=1);const c=i.x,h=i.y;let f=l,d=u,_=0,g=Math.trunc(Math.trunc(o.x+45)%360/90);if((g===1||g===3)&&(_=l,l=u,u=_),g=Math.trunc(Math.trunc(n.x+45)%360/90),(g===1||g===3)&&(_=f,f=d,d=_),r&&t){const p=e.model.getValue(b.FURNITURE_ALWAYS_STACKABLE)===1;return r.validateLocation(t.x,t.y,l,u,c,h,f,d,p)?new M(t.x,t.y,r.getTileHeight(t.x,t.y)):null}return null}validateWallItemLocation(e,t,i,n,r,a,o){if(e==null||e.model==null||t==null||i==null||n==null||o==null)return null;const l=e.model.getValue(b.FURNITURE_SIZE_X),u=e.model.getValue(b.FURNITURE_SIZE_Z),c=e.model.getValue(b.FURNITURE_CENTER_Z);if((ri.length-l/2||an.length-(u-c))&&(r=l/2&&r>i.length-l/2&&(r=i.length-l/2),a=c&&a>n.length-(u-c)&&(a=n.length-(u-c))),ri.length-l/2||an.length-(u-c))return null;let h=M.sum(M.product(i,r/i.length),M.product(n,a/n.length));return h=M.sum(t,h),h}changeObjectState(e,t,i,n,r){const a=this._roomEngine.getRoomObjectCategoryForType(i);this.changeRoomObjectState(e,t,a,n,r)}useObject(e,t,i,n){if(!(!this._roomEngine||!this._roomEngine.connection))switch(n){case X.DICE_ACTIVATE:this._roomEngine.connection.send(new p6(t));return;case X.DICE_OFF:this._roomEngine.connection.send(new m6(t));return;case X.USE_HABBOWHEEL:this._roomEngine.connection.send(new g6(t));return;case X.STICKIE:this._roomEngine.connection.send(new JF(t));return;case X.ENTER_ONEWAYDOOR:this._roomEngine.connection.send(new v6(t));return}}changeRoomObjectState(e,t,i,n,r){return!this._roomEngine||!this._roomEngine.connection||(i===U.FLOOR?r?this._roomEngine.connection.send(new E6(t,n)):this._roomEngine.connection.send(new Bw(t,n)):i===U.WALL&&this._roomEngine.connection.send(new y6(t,n))),!0}sendWalkUpdate(e,t){!this._roomEngine||!this._roomEngine.connection||this._roomEngine.connection.send(new L6(e,t))}handleMouseOverObject(e,t,i){if(e!==U.FLOOR)return null;const n=this._roomEngine.getRoomObject(t,i.objectId,U.FLOOR);if(!n)return null;const r=this.getActiveSurfaceLocation(n,i);if(!r||!this._roomEngine.getFurnitureStackingHeightMap(t))return null;const o=r.x,l=r.y,u=r.z;return new ch(new M(o,l,n.getLocation().z),u,!0,i.eventId)}handleMoveTargetFurni(e,t){if(t.objectType===tt.USER||t.objectType===tt.PET||t.objectType===tt.BOT||t.objectType===tt.RENTABLE_BOT||t.objectType===tt.MONSTER_PLANT)return;const i=this._roomEngine.getRoomObject(e,t.objectId,U.FLOOR),n=this.getActiveSurfaceLocation(i,t);return n?(this.sendWalkUpdate(n.x,n.y),!0):!1}getActiveSurfaceLocation(e,t){if(!e||!t)return null;const i=this._roomEngine.sessionDataManager.getFloorItemDataByName(e.type);if(!i||!i.canStandOn&&!i.canSitOn&&!i.canLayOn)return null;const n=e.model;if(!n)return null;const r=e.getLocation(),a=e.getDirection();let o=n.getValue(b.FURNITURE_SIZE_X),l=n.getValue(b.FURNITURE_SIZE_Y);const u=n.getValue(b.FURNITURE_SIZE_Z);(a.x===90||a.x===270)&&([o,l]=[l,o]),o<1&&(o=1),l<1&&(l=1);const c=this._roomEngine.getActiveRoomInstanceRenderingCanvas();if(!c)return null;const h=c.geometry.scale,f=i.canSitOn?.5:0,d=(h/2+t.spriteOffsetX+t.localX)/(h/4),_=(t.spriteOffsetY+t.localY+(u-f)*h/2)/(h/4),g=(d+2*_)/4,p=(d-2*_)/4,m=Math.floor(r.x+g),v=Math.floor(r.y-p+1);let E=!1;(m=r.x+o||v=r.y+l)&&(E=!0);const y=i.canSitOn?u-.5:u;return E?null:new M(m,v,y)}handleMouseOverTile(e,t){if(this._whereYouClickIsWhereYouGo)return new ch(new M(e.tileXAsInt,e.tileYAsInt,e.tileZAsInt),0,!0,e.eventId);const i=this._roomEngine.getRoomObjectCursor(t);if(i&&i.visualization){const n=e.tileXAsInt,r=e.tileYAsInt,a=e.tileZAsInt;if(this._roomEngine.getRoomInstance(t)){const l=this._roomEngine.getRoomTileObjectMap(t);if(l){const u=l.getObjectIntTile(n,r),c=this._roomEngine.getFurnitureStackingHeightMap(t);if(c){if(u&&u.model&&u.model.getValue(b.FURNITURE_IS_VARIABLE_HEIGHT)>0){const h=c.getTileHeight(n,r),f=this._roomEngine.getLegacyWallGeometry(t).getHeight(n,r);return new ch(new M(n,r,a),h-f,!0,e.eventId)}return new ch(new M(n,r,a),0,!0,e.eventId)}}}}return null}placeObject(e,t,i){const n=this.getSelectedRoomObjectData(e);if(!n)return;let r=null,a=n.id;const o=n.category;let l=0,u=0,c=0,h=0,f="";if(this._roomEngine&&this._roomEngine.connection&&(r=this._roomEngine.getRoomObject(e,a,o),r)){const d=r.getLocation();if(h=r.getDirection().x,o===U.FLOOR||o===U.UNIT)l=d.x,u=d.y,c=d.z;else if(o===U.WALL){l=d.x,u=d.y,c=d.z;const _=this._roomEngine.getLegacyWallGeometry(e);_&&(f=_.getOldLocationString(d,h))}h=(h/45%8+8)%8,a<0&&o===U.UNIT&&(a=a*-1),this._objectPlacementSource!==dR.CATALOG&&(o===U.UNIT?n.typeId===Ra.PET?this._roomEngine.connection.send(new t6(a,Math.trunc(l),Math.trunc(u))):n.typeId===Ra.RENTABLE_BOT&&this._roomEngine.connection.send(new qF(a,Math.trunc(l),Math.trunc(u))):r.model.getValue(b.FURNITURE_IS_STICKIE)!==void 0?this._roomEngine.connection.send(new _6(a,f)):this._roomEngine.connection.send(new d6(a,o,f,Math.trunc(l),Math.trunc(u),h)))}if(this._roomEngine.setPlacedRoomObjectData(e,new vT(n.id,n.category,null,n.dir,null)),this.resetSelectedObjectData(e),this._roomEngine&&this._roomEngine.events){const d=r&&r.id===n.id;this._roomEngine.events.dispatchEvent(new rQ(Se.PLACED,e,a,o,f,l,u,c,h,d,t,i,n.instanceData))}}modifyRoomObject(e,t,i,n){if(!this._roomEngine)return!1;const r=this._roomEngine.getRoomObject(e,t,i);if(!r)return!1;let a=!0;switch(n){case Ve.OBJECT_ROTATE_POSITIVE:case Ve.OBJECT_ROTATE_NEGATIVE:if(this._roomEngine.connection){let o=0;n==Ve.OBJECT_ROTATE_NEGATIVE?o=this.getValidRoomObjectDirection(r,!1):o=this.getValidRoomObjectDirection(r,!0);const l=r.getLocation().x,u=r.getLocation().y;if(this.isValidLocation(r,new M(o),this._roomEngine.getFurnitureStackingHeightMap(e)))if(o=Math.trunc(o/45),r.type===tt.MONSTER_PLANT){const c=this._roomEngine.roomSessionManager.getSession(e);if(c){const h=c.userDataManager.getUserDataByIndex(t);h&&this._roomEngine.connection.send(new Rb(h.webID,Math.trunc(l),Math.trunc(u),o))}}else this._roomEngine.connection.send(new Sb(t,l,u,o))}break;case Ve.OBJECT_EJECT:case Ve.OBJECT_PICKUP:this._roomEngine.connection&&this._roomEngine.connection.send(new f6(i,t));break;case Ve.OBJECT_PICKUP_PET:if(this._roomEngine.connection){const o=this._roomEngine.roomSessionManager.getSession(e);if(o){const l=o.userDataManager.getUserDataByIndex(t);o.pickupPet(l.webID)}}break;case Ve.OBJECT_PICKUP_BOT:if(this._roomEngine.connection){const o=this._roomEngine.roomSessionManager.getSession(e);if(o){const l=o.userDataManager.getUserDataByIndex(t);o.pickupBot(l.webID)}}break;case Ve.OBJECT_MOVE:a=!1,this.setFurnitureAlphaMultiplier(r,.5),this.setSelectedRoomObjectData(e,r.id,i,r.getLocation(),r.getDirection(),n),this._roomEngine.setObjectMoverIconSprite(r.id,i,!0),this._roomEngine.setObjectMoverIconSpriteVisible(!1);break;case Ve.OBJECT_MOVE_TO:{const o=this.getSelectedRoomObjectData(e);if(this.updateSelectedObjectData(e,o.id,o.category,o.loc,o.dir,Ve.OBJECT_MOVE_TO,o.typeId,o.instanceData,o.stuffData,o.state,o.animFrame,o.posture),this.setFurnitureAlphaMultiplier(r,1),this._roomEngine.removeObjectMoverIconSprite(),this._roomEngine.connection){if(i===U.FLOOR){const l=r.getDirection().x%360,u=r.getLocation(),c=l/45;this._roomEngine.connection.send(new Sb(t,u.x,u.y,c))}else if(i===U.WALL){const l=r.getDirection().x%360,u=this._roomEngine.getLegacyWallGeometry(e);if(u){const c=u.getOldLocationString(r.getLocation(),l);c&&this._roomEngine.connection.send(new R6(t,c))}}else if(i===U.UNIT){const l=r.getDirection().x%360,u=r.getLocation(),c=l/45;parseInt(r.model.getValue(b.RACE));const h=this._roomEngine.roomSessionManager.getSession(e);if(h){const f=h.userDataManager.getUserDataByIndex(t);f&&this._roomEngine.connection.send(new Rb(f.webID,u.x,u.y,c))}}}break}}return a&&this.resetSelectedObjectData(e),!0}modifyRoomObjectDataWithMap(e,t,i,n,r){if(!this._roomEngine||!this._roomEngine.getRoomObject(e,t,i))return!1;switch(n){case Ve.OBJECT_SAVE_STUFF_DATA:this._roomEngine.connection&&this._roomEngine.connection.send(new a6(t,r));break}return!0}modifyWallItemData(e,t,i,n){return!this._roomEngine||!this._roomEngine.connection?!1:(this._roomEngine.connection.send(new r6(t,i,n)),!0)}deleteWallItem(e,t){return!this._roomEngine||!this._roomEngine.connection?!1:(this._roomEngine.connection.send(new s6(t)),!0)}getValidRoomObjectDirection(e,t){if(!e||!e.model)return 0;let i=0,n=0,r=[];e.type===tt.MONSTER_PLANT?r=e.model.getValue(b.PET_ALLOWED_DIRECTIONS):r=e.model.getValue(b.FURNITURE_ALLOWED_DIRECTIONS);let a=e.getDirection().x;if(r&&r.length){if(i=r.indexOf(a),i<0){for(i=0,n=0;n=0)){this._functions.push(e);for(const t of this._registeredEvents.keys())t&&this._events.addEventListener(t,e)}}removeEventFunction(e){if(!e)return;const t=this._functions.indexOf(e);if(t!==-1){this._functions.splice(t,1);for(const i of this._registeredEvents.keys())i&&this._events.removeEventListener(i,e)}}getLogicType(e){if(!e)return null;let t=null;switch(e){case re.ROOM:t=mye;break;case re.TILE_CURSOR:t=jb;break;case re.SELECTION_ARROW:t=vye;break;case re.USER:case re.BOT:case re.RENTABLE_BOT:t=Nb;break;case re.PET:t=dye;break;case re.FURNITURE_BASIC:t=qe;break;case re.FURNITURE_BADGE_DISPLAY:t=R5;break;case re.FURNITURE_CHANGE_STATE_WHEN_STEP_ON:t=JEe;break;case re.FURNITURE_COUNTER_CLOCK:t=t0e;break;case re.FURNITURE_CRACKABLE:t=i0e;break;case re.FURNITURE_CREDIT:t=n0e;break;case re.FURNITURE_CUSTOM_STACK_HEIGHT:t=a0e;break;case re.FURNITURE_DICE:t=o0e;break;case re.FURNITURE_EDITABLE_INTERNAL_LINK:t=u0e;break;case re.FURNITURE_EDITABLE_ROOM_LINK:t=h0e;break;case re.FURNITURE_EXTERNAL_IMAGE_WALLITEM:t=f0e;break;case re.FURNITURE_FIREWORKS:t=d0e;break;case re.FURNITURE_FLOOR_HOLE:t=kb;break;case re.FURNITURE_GUILD_CUSTOMIZED:t=kv;break;case re.FURNITURE_HIGH_SCORE:t=xb;break;case re.FURNITURE_HOCKEY_SCORE:t=p0e;break;case re.FURNITURE_ES:t=v0e;break;case re.FURNITURE_MANNEQUIN:t=Db;break;case re.FURNITURE_MULTIHEIGHT:t=R0e;break;case re.FURNITURE_MULTISTATE:t=qt;break;case re.FURNITURE_ONE_WAY_DOOR:t=A0e;break;case re.FURNITURE_PET_CUSTOMIZATION:t=O0e;break;case re.FURNITURE_PRESENT:t=Lb;break;case re.FURNITURE_PURCHASABLE_CLOTHING:t=M0e;break;case re.FURNITURE_PUSHABLE:t=Ub;break;case re.FURNITURE_BACKGROUND_COLOR:t=x0e;break;case re.FURNITURE_BG:t=sye;break;case re.FURNITURE_BB:t=nye;break;case re.FURNITURE_ROOMDIMMER:t=rye;break;case re.FURNITURE_SCORE:t=Fb;break;case re.FURNITURE_SOUNDBLOCK:t=Bb;break;case re.FURNITURE_STICKIE:t=Gb;break;case re.FURNITURE_TROPHY:t=lye;break;case re.FURNITURE_VOTE_COUNTER:t=Vb;break;case re.FURNITURE_VOTE_MAJORITY:t=uye;break;case re.FURNITURE_WINDOW:t=cye;break;case re.FURNITURE_LOVELOCK:t=T0e;break;case re.FURNITURE_YOUTUBE:t=fye;break;case re.FURNITURE_CRAFTING_GIZMO:t=s0e;break;case re.FURNITURE_RENTABLE_SPACE:t=k0e;break;case re.FURNITURE_EFFECTBOX:t=c0e;break;case re.FURNITURE_MONSTERPLANT_SEED:t=I0e;break;case re.FURNITURE_MYSTERYBOX:t=S0e;break;case re.FURNITURE_MYSTERYTROPHY:t=b0e;break;case re.FURNITURE_RANDOM_TELEPORT:t=P0e;break;case re.FURNITURE_CLOTHING_CHANGE:t=e0e;break;case re.FURNITURE_CUCKOO_CLOCK:t=r0e;break;case re.FURNITURE_ECOTRON_BOX:t=l0e;break;case re.FURNITURE_GROUP_FORUM_TERMINAL:t=_0e;break;case re.FURNITURE_HWEEN_LOVELOCK:t=m0e;break;case re.FURNITURE_INTERNAL_LINK:t=E0e;break;case re.FURNITURE_JUKEBOX:t=y0e;break;case re.FURNITURE_PLACEHOLDER:t=w0e;break;case re.FURNITURE_PLANET_SYSTEM:t=C0e;break;case re.FURNITURE_RANDOMSTATE:t=N0e;break;case re.FURNITURE_SONG_DISK:t=aye;break;case re.FURNITURE_SOUND_MACHINE:t=oye;break;case re.FURNITURE_WELCOME_GIFT:t=hye;break;case re.FURNITURE_ACHIEVEMENT_RESOLUTION:t=Pb;break;case re.FURNITURE_HABBOWHEEL:t=g0e;break;default:t=qe;break}return t||(le.warn("Unknown Logic",e),null)}get events(){return this._events}}const Le=class Le extends Yr{constructor(e){super(),this._communication=e,this._sessionDataManager=null,this._roomSessionManager=null,this._roomManager=null,this._roomObjectEventHandler=new nTe(this),this._roomMessageHandler=new sTe(this),this._roomContentLoader=new kc,this._ready=!1,this._roomContentLoaderReady=!1,this._activeRoomId=-1,this._activeRoomActiveCanvas=-1,this._roomInstanceDatas=new Map,this._roomDatas=new Map,this._roomRendererFactory=new iZ,this._visualizationFactory=new EA,this._logicFactory=new rTe,this._activeRoomActiveCanvasMouseX=0,this._activeRoomActiveCanvasMouseY=0,this._activeRoomIsDragged=!1,this._activeRoomWasDragged=!1,this._activeRoomDragStartX=0,this._activeRoomDragStartY=0,this._activeRoomDragX=0,this._activeRoomDragY=0,this._skipFurnitureCreationForNextFrame=!1,this._mouseCursorUpdate=!1,this._imageObjectIdBank=null,this._imageCallbacks=new Map,this._thumbnailCallbacks=new Map,this._roomDraggingAlwaysCenters=!1,this._roomAllowsDragging=!0,this._badgeListenerObjects=new Map,this.runVisibilityUpdate=this.runVisibilityUpdate.bind(this),this.processRoomObjectEvent=this.processRoomObjectEvent.bind(this),this.onRoomSessionEvent=this.onRoomSessionEvent.bind(this),this.onRoomContentLoaderReadyEvent=this.onRoomContentLoaderReadyEvent.bind(this),this.onBadgeImageReadyEvent=this.onBadgeImageReadyEvent.bind(this)}onInit(){this._ready||(this._imageObjectIdBank=new WP(1e3),this._thumbnailObjectIdBank=new WP(1e3),this._logicFactory.registerEventFunction(this.processRoomObjectEvent),this._roomManager&&(this._roomManager.setContentLoader(this._roomContentLoader),this._roomManager.addUpdateCategory(U.FLOOR),this._roomManager.addUpdateCategory(U.WALL),this._roomManager.addUpdateCategory(U.UNIT),this._roomManager.addUpdateCategory(U.CURSOR),this._roomManager.addUpdateCategory(U.ROOM)),this._roomMessageHandler.setConnection(this._communication.connection),this._roomContentLoader.initialize(this.events),this._roomContentLoader.setSessionDataManager(this._sessionDataManager),this._roomContentLoader.setIconListener(this),this._roomSessionManager&&(this._roomSessionManager.events.addEventListener(Ae.STARTED,this.onRoomSessionEvent),this._roomSessionManager.events.addEventListener(Ae.ENDED,this.onRoomSessionEvent)),this.events.addEventListener(kc.LOADER_READY,this.onRoomContentLoaderReadyEvent),ga().add(this.update,this),document.addEventListener("visibilitychange",this.runVisibilityUpdate))}onDispose(){if(this._ready){for(const[e,t]of this._roomInstanceDatas)this.removeRoomInstance(e);document.removeEventListener("visibilitychange",this.runVisibilityUpdate),ga().remove(this.update,this),this._roomObjectEventHandler&&this._roomObjectEventHandler.dispose(),this._roomMessageHandler&&this._roomMessageHandler.dispose(),this._roomContentLoader&&this._roomContentLoader.dispose(),this.events.removeEventListener(kc.LOADER_READY,this.onRoomContentLoaderReadyEvent),this._roomSessionManager&&(this._roomSessionManager.events.removeEventListener(Ae.STARTED,this.onRoomSessionEvent),this._roomSessionManager.events.removeEventListener(Ae.ENDED,this.onRoomSessionEvent)),super.onDispose()}}onRoomSessionEvent(e){if(e instanceof Ae)switch(e.type){case Ae.STARTED:this._roomMessageHandler&&this._roomMessageHandler.setRoomId(e.session.roomId);return;case Ae.ENDED:this._roomMessageHandler&&(this._roomMessageHandler.clearRoomId(),this.removeRoomInstance(e.session.roomId));return}}onRoomContentLoaderReadyEvent(e){this._roomContentLoaderReady=!0,this._roomManager.init()}setActiveRoomId(e){this._activeRoomId=e}destroyRoom(e){this.removeRoomInstance(e)}getRoomInstance(e){return this._roomManager&&this._roomManager.getRoomInstance(this.getRoomId(e))||null}removeRoomInstance(e){this.getRoomInstance(e)&&this._roomManager&&this._roomManager.removeRoomInstance(this.getRoomId(e));const i=this._roomInstanceDatas.get(e);i&&(this._roomInstanceDatas.delete(i.roomId),i.dispose()),this.events.dispatchEvent(new ft(ft.DISPOSED,e))}createRoomInstance(e,t){let i="111",n="201",r="1";if(!this._ready){let l=this._roomDatas.get(e);l&&(this._roomDatas.delete(e),i=l.floorType,n=l.wallType,r=l.landscapeType),l=new hk(e,t),l.floorType=i,l.wallType=n,l.landscapeType=r,this._roomDatas.set(e,l),le.warn("Room Engine not initilized yet, can not create room. Room data stored for later initialization.");return}if(!t){le.warn("Room property messages");return}const a=this._roomDatas.get(e);a&&(this._roomDatas.delete(e),a.floorType&&(i=a.floorType),a.wallType&&(n=a.wallType),a.landscapeType&&(r=a.landscapeType)),this.setupRoomInstance(e,t,i,n,r,this.getRoomInstanceModelName(e))&&(t.restrictsDragging?this._roomAllowsDragging=!1:this._roomAllowsDragging=!0,this.events.dispatchEvent(new ft(ft.INITIALIZED,e)))}setupRoomInstance(e,t,i,n,r,a){if(!this._ready||!this._roomManager)return;const o=this._roomManager.createRoomInstance(this.getRoomId(e));if(!o)return null;const l=U.ROOM,u=o.createRoomObjectAndInitalize(Le.ROOM_OBJECT_ID,Le.ROOM_OBJECT_TYPE,l);if(o.model.setValue(Qt.ROOM_IS_PUBLIC,0),o.model.setValue(Qt.ROOM_Z_SCALE,1),t&&(o.model.setValue(Qt.RESTRICTS_DRAGGING,t.restrictsDragging),o.model.setValue(Qt.RESTRICTS_SCALING,t.restrictsScaling),o.model.setValue(Qt.RESTRICTED_SCALE,t.restrictedScale),t.dimensions)){const f=t.dimensions.minX,d=t.dimensions.maxX,_=t.dimensions.minY,g=t.dimensions.maxY;o.model.setValue(Qt.ROOM_MIN_X,f),o.model.setValue(Qt.ROOM_MAX_X,d),o.model.setValue(Qt.ROOM_MIN_Y,_),o.model.setValue(Qt.ROOM_MAX_Y,g);const p=Math.trunc(f*423+d*671+_*913+g*7509);u&&u.model&&u.model.setValue(b.ROOM_RANDOM_SEED,p)}const c=u&&u.logic||null;if(c&&(c.initialize(t),i&&(c.processUpdateMessage(new bi(bi.ROOM_FLOOR_UPDATE,i)),o.model.setValue(b.ROOM_FLOOR_TYPE,i)),n&&(c.processUpdateMessage(new bi(bi.ROOM_WALL_UPDATE,n)),o.model.setValue(b.ROOM_WALL_TYPE,n)),r&&(c.processUpdateMessage(new bi(bi.ROOM_LANDSCAPE_UPDATE,r)),o.model.setValue(b.ROOM_LANDSCAPE_TYPE,r))),t&&t.doors.length){let h=0;for(;h0:!1}isPlayingGame(){return this.isRoomIdPlayingGame(this._activeRoomId)}disableUpdate(e){e?ga().remove(this.update,this):(ga().remove(this.update,this),ga().add(this.update,this))}runUpdate(){this.update(1)}runVisibilityUpdate(){document.hidden||this.update(1,!0)}update(e,t=!1){this._roomManager&&(e=Pe(),Pr.turnVisualizationOn(),this.processPendingFurniture(),this._roomManager.update(e,t),this.updateRoomCameras(e),this._mouseCursorUpdate&&this.setPointer(),Pr.turnVisualizationOff())}setPointer(){this._mouseCursorUpdate=!1;const e=this.getRoomInstanceData(this._activeRoomId);e&&e.hasButtonMouseCursorOwners()?document.body.style.cursor="pointer":document.body.style.cursor="auto"}processPendingFurniture(){if(this._skipFurnitureCreationForNextFrame){this._skipFurnitureCreationForNextFrame=!1;return}const e=new Date().valueOf(),t=5;for(const i of this._roomInstanceDatas.values()){if(!i)continue;let n=null,r=0,a=!1;for(;n=i.getNextPendingFurnitureFloor();)if(a=this.processPendingFurnitureFloor(i.roomId,n.id,n),!(++r%t)&&new Date().valueOf()-e>=40){this._skipFurnitureCreationForNextFrame=!0;break}for(;!this._skipFurnitureCreationForNextFrame&&(n=i.getNextPendingFurnitureWall());)if(a=this.processPendingFurnitureWall(i.roomId,n.id,n),!(++r%t)&&new Date().valueOf()-e>=40){this._skipFurnitureCreationForNextFrame=!0;break}if(a&&this._roomManager&&(this._roomManager.getRoomInstance(this.getRoomId(i.roomId)).hasUninitializedObjects()||this.objectsInitialized(i.roomId.toString())),this._skipFurnitureCreationForNextFrame)return}}onRoomEngineInitalized(e){if(e){this._ready=!0,this.events.dispatchEvent(new ft(ft.ENGINE_INITIALIZED,0));for(const t of this._roomDatas.values())t&&this.createRoomInstance(t.roomId,t.data)}}processPendingFurnitureFloor(e,t,i){if(!i){const l=this.getRoomInstanceData(e);if(l&&(i=l.getPendingFurnitureFloor(t)),!i)return!1}let n=i.type;n||(n=this.getFurnitureFloorName(i.typeId));const r=this.createRoomObjectFloor(e,t,n);if(!r)return!1;const a=r.model;if(a&&(a.setValue(b.FURNITURE_COLOR,this.getFurnitureFloorColorIndex(i.typeId)),a.setValue(b.FURNITURE_TYPE_ID,i.typeId),a.setValue(b.FURNITURE_AD_URL,this.getRoomObjectAdUrl(i.type)),a.setValue(b.FURNITURE_REAL_ROOM_OBJECT,i.realRoomObject?1:0),a.setValue(b.FURNITURE_EXPIRY_TIME,i.expiryTime),a.setValue(b.FURNITURE_EXPIRTY_TIMESTAMP,Pe()),a.setValue(b.FURNITURE_USAGE_POLICY,i.usagePolicy),a.setValue(b.FURNITURE_OWNER_ID,i.ownerId),a.setValue(b.FURNITURE_OWNER_NAME,i.ownerName)),!this.updateRoomObjectFloor(e,t,i.location,i.direction,i.state,i.data,i.extra)||i.sizeZ>=0&&!this.updateRoomObjectFloorHeight(e,t,i.sizeZ))return!1;this.events&&this.events.dispatchEvent(new Se(Se.ADDED,e,t,U.FLOOR));const o=this.getPlacedRoomObjectData(e);return o&&o.id===t&&o.category===U.FLOOR&&this.selectRoomObject(e,t,U.FLOOR),r.isReady&&i.synchronized&&this.addObjectToTileMap(e,r),!0}processPendingFurnitureWall(e,t,i){if(!i){const u=this.getRoomInstanceData(e);if(u&&(i=u.getPendingFurnitureWall(t)),!i)return!1}let n="";i.data&&(n=i.data.getLegacyString());let r=this.getFurnitureWallName(i.typeId,n);r||(r="");const a=this.createRoomObjectWall(e,t,r);if(!a)return!1;const o=a.model;if(o&&(o.setValue(b.FURNITURE_COLOR,this.getFurnitureWallColorIndex(i.typeId)),o.setValue(b.FURNITURE_TYPE_ID,i.typeId),o.setValue(b.FURNITURE_AD_URL,this.getRoomObjectAdUrl(i.type)),o.setValue(b.FURNITURE_REAL_ROOM_OBJECT,i.realRoomObject?1:0),o.setValue(b.OBJECT_ACCURATE_Z_VALUE,1),o.setValue(b.FURNITURE_EXPIRY_TIME,i.expiryTime),o.setValue(b.FURNITURE_EXPIRTY_TIMESTAMP,Pe()),o.setValue(b.FURNITURE_USAGE_POLICY,i.usagePolicy),o.setValue(b.FURNITURE_OWNER_ID,i.ownerId),o.setValue(b.FURNITURE_OWNER_NAME,i.ownerName)),!this.updateRoomObjectWall(e,t,i.location,i.direction,i.state,n))return!1;this.events&&this.events.dispatchEvent(new Se(Se.ADDED,e,t,U.WALL));const l=this.getPlacedRoomObjectData(e);return l&&Math.abs(l.id)===t&&l.category===U.WALL&&this.selectRoomObject(e,t,U.WALL),!0}setRoomSessionOwnUser(e,t){if(!this._roomSessionManager)return;const i=this._roomSessionManager.getSession(e);i&&i.setOwnRoomIndex(t);const n=this.getRoomCamera(e);n&&(n.targetId=t,n.targetCategory=U.UNIT,n.activateFollowing(this.cameraFollowDuration))}get cameraFollowDuration(){return 1e3}updateRoomCameras(e){for(const t of this._roomInstanceDatas.values()){if(!t)continue;const i=t.roomCamera;if(!i)continue;let n=null;const r=this.getRoomObject(t.roomId,i.targetId,i.targetCategory);r&&(n=r.getLocation()),n&&(t.roomId!==this._activeRoomId||!this._activeRoomIsDragged)&&this.updateRoomCamera(t.roomId,1,n,e)}if(this._activeRoomWasDragged){const t=this.getRoomInstanceRenderingCanvas(this._activeRoomId,1);t&&this.setRoomInstanceRenderingCanvasOffset(this._activeRoomId,1,new Q(t.screenOffsetX+this._activeRoomDragX,t.screenOffsetY+this._activeRoomDragY)),this._activeRoomDragX=0,this._activeRoomDragY=0}}updateRoomCamera(e,t,i,n){const r=this.getRoomInstanceRenderingCanvas(e,t),a=this.getRoomInstanceData(e);if(!r||!a||r.scale!==1)return;const o=r.geometry,l=a.roomCamera,u=this.getRoomInstance(e);if(!o||!l||!u)return;const c=this.getRoomCanvasRectangle(e,t);if(!c)return;let h=Math.floor(i.z)+1;const f=Math.round(c.width),d=Math.round(c.height),_=this.getCanvasBoundingRectangle(t);if(_&&(_.right<0||_.bottom<0||_.left>=f||_.top>=d)&&l.reset(),l.screenWd!==f||l.screenHt!==d||l.scale!==o.scale||l.geometryUpdateId!==o.updateId||!M.isEqual(i,l.targetObjectLoc)||l.isMoving){l.targetObjectLoc=i;const g=new M;g.assign(i),g.x=Math.round(g.x),g.y=Math.round(g.y);const p=u.model.getValue(Qt.ROOM_MIN_X)-.5,m=u.model.getValue(Qt.ROOM_MIN_Y)-.5,v=u.model.getValue(Qt.ROOM_MAX_X)+.5,E=u.model.getValue(Qt.ROOM_MAX_Y)+.5,y=Math.round((p+v)/2),T=Math.round((m+E)/2),w=2;let C=new Q(g.x-y,g.y-T);const N=o.scale/Math.sqrt(2),P=N/2,k=new dt;k.rotate(-(o.direction.x+90)/180*Math.PI),C=k.apply(C),C.y=C.y*(P/N);const L=c.width/2/N-1,j=c.height/2/P-1;let z=0,ne=0,G=0,Y=0,K=o.getScreenPoint(new M(y,T,w));if(!K)return;if(K.x=K.x+Math.round(c.width/2),K.y=K.y+Math.round(c.height/2),_)if(_.x+=-r.screenOffsetX,_.y+=-r.screenOffsetY,_.width>1&&_.height>1)z=(_.left-K.x-o.scale*.25)/N,G=(_.right-K.x+o.scale*.25)/N,ne=(_.top-K.y-o.scale*.5)/P,Y=(_.bottom-K.y+o.scale*.5)/P;else{o.adjustLocation(new M(-30,-30),25);return}else{o.adjustLocation(new M(0,0),25);return}let H=!1,J=!1,B=!1,$=!1;Math.round((G-z)*N)G-L&&(C.x=G-L,H=!0),C.xY-j&&(C.y=Y-j,J=!0),C.y100&&(we=100/f),me*d>150&&(me=150/d),De*d>150&&(De=150/d),l.limitedLocationX&&l.screenWd==f&&l.screenHt==d&&(we=0),l.limitedLocationY&&l.screenWd==f&&l.screenHt==d&&(me=0,De=0),c.width=c.width*(1-we*2),c.height=c.height*(1-(me+De)),c.width0?(c.x+=-c.width/2,c.y+=-c.height*(De/(me+De))):(c.x+=-c.width/2,c.y+=-c.height/2),K=o.getScreenPoint(g),!K)return;if(K){K.x=K.x+r.screenOffsetX,K.y=K.y+r.screenOffsetY,g.z=h,g.x=Math.round(C.x*2)/2,g.y=Math.round(C.y*2)/2,l.location||(o.location=g,this.useOffsetScrolling?l.initializeLocation(new M(0,0,0)):l.initializeLocation(g));const bt=o.getScreenPoint(g),At=new M(0,0,0);bt&&(At.x=bt.x,At.y=bt.y),(K.xc.right)&&!l.centeredLocX||(K.yc.bottom)&&!l.centeredLocY||B&&!l.centeredLocX&&l.screenWd!=f||$&&!l.centeredLocY&&l.screenHt!=d||l.roomWd!=_.width||l.roomHt!=_.height||l.screenWd!=f||l.screenHt!=d?(l.limitedLocationX=H,l.limitedLocationY=J,this.useOffsetScrolling?l.target=At:l.target=g):(H||(l.limitedLocationX=!1),J||(l.limitedLocationY=!1))}l.centeredLocX=B,l.centeredLocY=$,l.screenWd=f,l.screenHt=d,l.scale=o.scale,l.geometryUpdateId=o.updateId,l.roomWd=_.width,l.roomHt=_.height,this._sessionDataManager.isCameraFollowDisabled||(this.useOffsetScrolling?l.update(n,8):l.update(n,.5)),this.useOffsetScrolling?this.setRoomInstanceRenderingCanvasOffset(this.activeRoomId,1,new Q(-l.location.x,-l.location.y)):o.adjustLocation(l.location,25)}else l.limitedLocationX=!1,l.limitedLocationY=!1,l.centeredLocX=!1,l.centeredLocY=!1}getRoomCanvasRectangle(e,t){const i=this.getRoomInstanceRenderingCanvas(e,t);return i?new ve(0,0,i.width,i.height):null}getRoomObjectBoundingRectangle(e,t,i,n){const r=this.getRoomInstanceGeometry(e,n);if(!r)return null;const a=this.getRoomObject(e,t,i);if(!a)return null;const o=a.visualization;if(!o)return null;const l=o.getBoundingRectangle(),u=this.getRoomInstanceRenderingCanvas(e,n),c=u?u.scale:1,h=r.getScreenPoint(a.getLocation());return!h||(h.x=Math.round(h.x),h.y=Math.round(h.y),l.x=l.x*c,l.y=l.y*c,l.width=l.width*c,l.height=l.height*c,h.x=h.x*c,h.y=h.y*c,l.x+=h.x,l.y+=h.y,!u)?null:(l.x+=Math.round(u.width/2)+u.screenOffsetX,l.y+=Math.round(u.height/2)+u.screenOffsetY,l)}getCanvasBoundingRectangle(e){return this.getRoomObjectBoundingRectangle(this._activeRoomId,Le.ROOM_OBJECT_ID,U.ROOM,e)}getFurnitureFloorName(e){return this._roomContentLoader?this._roomContentLoader.getFurnitureFloorNameForTypeId(e):null}getFurnitureWallName(e,t=null){return this._roomContentLoader?this._roomContentLoader.getFurnitureWallNameForTypeId(e,t):null}getFurnitureFloorColorIndex(e){return this._roomContentLoader?this._roomContentLoader.getFurnitureFloorColorIndex(e):null}getFurnitureWallColorIndex(e){return this._roomContentLoader?this._roomContentLoader.getFurnitureWallColorIndex(e):null}getRoomInstanceData(e){const t=this._roomInstanceDatas.get(e);if(t)return t;const i=new tTe(e);return this._roomInstanceDatas.set(i.roomId,i),i}getRoomInstanceModelName(e){const t=this.getRoomInstanceData(e);return t?t.modelName:null}setRoomInstanceModelName(e,t){const i=this.getRoomInstanceData(e);i&&i.setModelName(t)}getRoomTileObjectMap(e){const t=this.getRoomInstanceData(e);return t?t.tileObjectMap:null}getCurrentRoomCamera(){return this.getRoomCamera(this._activeRoomId)}getRoomCamera(e){const t=this.getRoomInstanceData(e);return t?t.roomCamera:null}getSelectedRoomObjectData(e){const t=this.getRoomInstanceData(e);return t?t.selectedObject:null}setSelectedRoomObjectData(e,t){const i=this.getRoomInstanceData(e);if(!i)return null;i.setSelectedObject(t),t&&i.setPlacedObject(null)}getPlacedRoomObjectData(e){const t=this.getRoomInstanceData(e);return t?t.placedObject:null}setPlacedRoomObjectData(e,t){const i=this.getRoomInstanceData(e);if(!i)return null;i.setPlacedObject(t)}cancelRoomObjectPlacement(){this._roomObjectEventHandler&&this._roomObjectEventHandler.cancelRoomObjectPlacement(this._activeRoomId)}getFurnitureStackingHeightMap(e){const t=this.getRoomInstanceData(e);return t?t.furnitureStackingHeightMap:null}setFurnitureStackingHeightMap(e,t){const i=this.getRoomInstanceData(e);if(!i)return null;i.setFurnitureStackingHeightMap(t)}getLegacyWallGeometry(e){const t=this.getRoomInstanceData(e);return t?t.legacyGeometry:null}createRoomObjectAndInitialize(e,t,i,n){const r=this.getRoomInstance(e);return r?r.createRoomObjectAndInitalize(t,i,n):null}getTotalObjectsForManager(e,t){const i=this.getRoomInstance(e);return i?i.getTotalObjectsForManager(t):0}getRoomObject(e,t,i){if(!this._ready)return null;let n=this.getRoomId(e);return e===0&&(n=Le.TEMPORARY_ROOM),this.getObject(n,t,i)}getObject(e,t,i){let n=null;if(this._roomManager&&(n=this._roomManager.getRoomInstance(e)),!n)return null;let r=n.getRoomObject(t,i);if(!r)switch(i){case U.FLOOR:this.processPendingFurnitureFloor(this.getRoomIdFromString(e),t,null),r=n.getRoomObject(t,i);break;case U.WALL:this.processPendingFurnitureWall(this.getRoomIdFromString(e),t,null),r=n.getRoomObject(t,i);break}return r}getRoomObjectByIndex(e,t,i){const n=this.getRoomInstance(e);return n?n.getRoomObjectByIndex(t,i):null}getRoomObjectCategoryForType(e){return!e||!this._roomContentLoader?U.MINIMUM:this._roomContentLoader.getCategoryForType(e)}getRoomObjectCursor(e){return this.getObject(this.getRoomId(e),Le.CURSOR_OBJECT_ID,U.CURSOR)}getRoomObjectSelectionArrow(e){return this.getObject(this.getRoomId(e),Le.ARROW_OBJECT_ID,U.CURSOR)}getRoomOwnObject(e){return this.getObject(this.getRoomId(e),Le.ROOM_OBJECT_ID,U.ROOM)}getRoomObjectUser(e,t){return this.getObject(this.getRoomId(e),t,U.UNIT)}removeRoomObjectUser(e,t){return this.removeRoomObject(e,t,U.UNIT)}createRoomObjectUser(e,t,i){return this.createRoomObjectAndInitialize(e,t,i,U.UNIT)}getRoomObjectFloor(e,t){return this.getObject(this.getRoomId(e),t,U.FLOOR)}createRoomObjectFloor(e,t,i){return this.createRoomObjectAndInitialize(e,t,i,U.FLOOR)}removeRoomObjectFloor(e,t,i=-1,n=!1){const r=this.getRoomInstanceData(e);if(r&&r.removePendingFunitureFloor(t),this._sessionDataManager&&i===this._sessionDataManager.userId&&!zv.isBuilderClubId(t)){const a=this.getRoomObject(e,t,U.FLOOR);if(a){const o=this.getRoomObjectScreenLocation(e,t,U.FLOOR,this._activeRoomActiveCanvas);if(o&&!(a.model.getValue(b.FURNITURE_DISABLE_PICKING_ANIMATION)===1)){const u=a.model.getValue(b.FURNITURE_TYPE_ID),c=a.model.getValue(b.FURNITURE_EXTRAS),h=a.model.getValue(b.FURNITURE_DATA_FORMAT),f=No.getData(h),d=this.getFurnitureFloorIcon(u,null,c,f).data;if(d){const _=St.generateImage(d);if(this.events){const g=new qm(_,o.x,o.y);g.iconName=jm.INVENTORY,this.events.dispatchEvent(g)}}}}}this.removeRoomObject(e,t,U.FLOOR),this.setMouseDefault(e,U.FLOOR,t),n&&this.refreshTileObjectMap(e,"RoomEngine.disposeObjectFurniture()")}getRoomObjectWall(e,t){return this.getObject(this.getRoomId(e),t,U.WALL)}removeRoomObjectWall(e,t,i=-1){if(this._sessionDataManager&&i===this._sessionDataManager.userId&&!zv.isBuilderClubId(t)){const n=this.getRoomObject(e,t,U.WALL);if(n&&n.type.indexOf("post_it")===-1&&n.type.indexOf("external_image_wallitem")===-1){const r=this.getRoomObjectScreenLocation(e,t,U.WALL,this._activeRoomActiveCanvas);if(r){const a=n.model.getValue(b.FURNITURE_TYPE_ID),o=n.model.getValue(b.FURNITURE_DATA),l=this.getFurnitureWallIcon(a,null,o).data;if(l){const u=St.generateImage(l);if(this.events){const c=new qm(u,r.x,r.y);c.iconName=jm.INVENTORY,this.events.dispatchEvent(c)}}}}}this.removeRoomObject(e,t,U.WALL),this.updateRoomObjectMask(e,t,!1),this.setMouseDefault(e,U.WALL,t)}createRoomObjectWall(e,t,i){return this.createRoomObjectAndInitialize(e,t,i,U.WALL)}removeRoomObject(e,t,i){const n=this.getRoomInstance(e);if(!n)return null;n.removeRoomObject(t,i),this.events&&this.events.dispatchEvent(new Se(Se.REMOVED,e,t,i))}addFurnitureFloor(e,t,i,n,r,a,o,l=NaN,u=-1,c=0,h=0,f="",d=!0,_=!0,g=-1){const p=this.getRoomInstanceData(e);if(!p)return!1;const m=new mT(t,i,null,n,r,a,o,l,u,c,h,f,d,_,g);return p.addPendingFurnitureFloor(m),!0}addFurnitureFloorByTypeName(e,t,i,n,r,a,o,l=NaN,u=-1,c=0,h=0,f="",d=!0,_=!0,g=-1){const p=this.getRoomInstanceData(e);if(!p)return!1;const m=new mT(t,0,i,n,r,a,o,l,u,c,h,f,d,_,g);return p.addPendingFurnitureFloor(m),!0}addFurnitureWall(e,t,i,n,r,a,o,l=-1,u=0,c=0,h="",f=!0){const d=this.getRoomInstanceData(e);if(!d)return!1;const _=new ps;_.setString(o);const g=new mT(t,i,null,n,r,a,_,NaN,l,u,c,h,!0,f);return d.addPendingFurnitureWall(g),!0}updateRoomObjectFloor(e,t,i,n,r,a,o=null){const l=this.getRoomObjectFloor(e,t);return l?(l.processUpdateMessage(new ui(i,n)),l.processUpdateMessage(new ht(r,a,o)),!0):!1}updateRoomObjectWall(e,t,i,n,r,a=null){const o=this.getRoomObjectWall(e,t);if(!o||!o.logic)return!1;const l=new ui(i,n),u=new ps,c=new ht(r,u);return u.setString(a),o.logic.processUpdateMessage(l),o.logic.processUpdateMessage(c),this.updateRoomObjectMask(e,t),!0}updateRoomObjectWallItemData(e,t,i){const n=this.getRoomObjectWall(e,t);return!n||!n.logic?!1:(n.logic.processUpdateMessage(new Hw(i)),!0)}updateRoomObjectFloorHeight(e,t,i){const n=this.getRoomObjectFloor(e,t);return n?(n.processUpdateMessage(new T5(null,null,i)),!0):!1}updateRoomObjectFloorExpiration(e,t,i){const n=this.getRoomObjectFloor(e,t);return n?(n.model.setValue(b.FURNITURE_EXPIRY_TIME,i),n.model.setValue(b.FURNITURE_EXPIRTY_TIMESTAMP,Pe()),!0):!1}updateRoomObjectWallExpiration(e,t,i){const n=this.getRoomObjectWall(e,t);return n?(n.model.setValue(b.FURNITURE_EXPIRY_TIME,i),n.model.setValue(b.FURNITURE_EXPIRTY_TIMESTAMP,Pe()),!0):!1}updateRoomObjectMask(e,t,i=!0){const n=U.WALL+"_"+t,r=this.getRoomObjectWall(e,t);let a=null;if(r&&r.model){if(r.model.getValue(b.FURNITURE_USES_PLANE_MASK)>0){const l=r.model.getValue(b.FURNITURE_PLANE_MASK_TYPE),u=r.getLocation();i?a=new $i($i.ADD_MASK,n,l,u):a=new $i($i.REMOVE_MASK,n)}}else a=new $i($i.REMOVE_MASK,n);const o=this.getRoomOwnObject(e);o&&o.logic&&a&&o.logic.processUpdateMessage(a)}rollRoomObjectFloor(e,t,i,n){const r=this.getRoomObjectFloor(e,t);r&&r.processUpdateMessage(new Xo(i,n,null,!!n))}updateRoomObjectWallLocation(e,t,i){const n=this.getRoomObjectWall(e,t);return n?(n.logic&&n.logic.processUpdateMessage(new Xo(i,null,null)),this.updateRoomObjectMask(e,t),!0):!1}getFurniLocation(e,t,i){return i?this.getRoomObjectWall(e,t).getLocation().toString():this.getRoomObjectFloor(e,t).getLocation().toString()}getFurniDirection(e,t,i){return i?this.getRoomObjectWall(e,t).getDirection().toString():this.getRoomObjectFloor(e,t).getDirection().toString()}getFurniState(e,t,i){return i?this.getRoomObjectWall(e,t).getState():this.getRoomObjectFloor(e,t).getState()}addRoomObjectUser(e,t,i,n,r,a,o){if(this.getRoomObjectUser(e,t))return!1;let u=tt.getTypeString(a);u===tt.PET&&(u=this.getPetType(o));const c=this.createRoomObjectUser(e,t,u);return c?(c.processUpdateMessage(new Mv(this.fixedUserLocation(e,i),null,n,r,!1,0)),o&&c.processUpdateMessage(new wv(o)),this.events&&this.events.dispatchEvent(new Se(Se.ADDED,e,t,U.UNIT)),!0):!1}updateRoomObjectUserLocation(e,t,i,n,r=!1,a=0,o=null,l=NaN){const u=this.getRoomObjectUser(e,t);if(!u)return!1;i||(i=u.getLocation()),o||(o=u.getDirection()),isNaN(l)&&(l=u.model.getValue(b.HEAD_DIRECTION)),u.processUpdateMessage(new Mv(this.fixedUserLocation(e,i),this.fixedUserLocation(e,n),o,l,r,a));const c=this._roomSessionManager&&this._roomSessionManager.getSession(e)||null;return c&&c.ownRoomIndex===t&&this._logicFactory.events.dispatchEvent(new Yc(Yc.ROAME_MOVE_TO,n)),!0}fixedUserLocation(e,t){if(!t)return null;const i=this.getFurnitureStackingHeightMap(e),n=this.getLegacyWallGeometry(e);if(!i||!n)return t;let r=t.z;const a=i.getTileHeight(t.x,t.y),o=n.getHeight(t.x,t.y);return Math.abs(r-a)<.1&&Math.abs(a-o)<.1&&(r=n.getFloorAltitude(t.x,t.y)),new M(t.x,t.y,r)}updateRoomObjectUserAction(e,t,i,n,r=null){const a=this.getRoomObjectUser(e,t);if(!a)return!1;let o=null;switch(i){case b.FIGURE_TALK:o=new Vw(n);break;case b.FIGURE_SLEEP:o=new zw(n===1);break;case b.FIGURE_IS_TYPING:o=new E5(n===1);break;case b.FIGURE_IS_MUTED:o=new d5(n===1);break;case b.FIGURE_CARRY_OBJECT:o=new a5(n,r);break;case b.FIGURE_USE_OBJECT:o=new y5(n);break;case b.FIGURE_DANCE:o=new o5(n);break;case b.FIGURE_GAINED_EXPERIENCE:o=new u5(n);break;case b.FIGURE_NUMBER_VALUE:o=new p5(n);break;case b.FIGURE_SIGN:o=new v5(n);break;case b.FIGURE_EXPRESSION:o=new h5(n);break;case b.FIGURE_IS_PLAYING_GAME:o=new m5(n===1);break;case b.FIGURE_GUIDE_STATUS:o=new ZEe(n);break}return o?(a.processUpdateMessage(o),!0):!1}updateRoomObjectUserFigure(e,t,i,n=null,r=null,a=!1){const o=this.getRoomObjectUser(e,t);return o?(o.processUpdateMessage(new wv(i,n,r,a)),!0):!1}updateRoomObjectUserFlatControl(e,t,i){const n=this.getRoomObjectUser(e,t);return n?(n.processUpdateMessage(new c5(parseInt(i))),!0):!1}updateRoomObjectUserEffect(e,t,i,n=0){const r=this.getRoomObjectUser(e,t);return r?(r.processUpdateMessage(new l5(i,n)),!0):!1}updateRoomObjectUserGesture(e,t,i){const n=this.getRoomObjectUser(e,t);return n?(n.processUpdateMessage(new f5(i)),!0):!1}updateRoomObjectUserPetGesture(e,t,i){const n=this.getRoomObjectUser(e,t);return n?(n.processUpdateMessage(new g5(i)),!0):!1}updateRoomObjectUserPosture(e,t,i,n=null){const r=this.getRoomObjectUser(e,t);return r?(r.processUpdateMessage(new jw(i,n)),!0):!1}updateRoomObjectUserOwn(e,t){const i=this.getRoomObjectUser(e,t);i&&i.processUpdateMessage(new _5)}useRoomObject(e,t){const i=this.getRoomObject(this._activeRoomId,e,t);if(i){const n=i.logic;if(n)return n.useObject(),!0}return!1}objectInitialized(e,t,i){const n=this.getRoomIdFromString(e);i===U.WALL&&this.updateRoomObjectMask(n,t);const r=this.getRoomObject(n,t,i);if(r&&r.model&&r.logic){const a=r.model.getValue(b.FURNITURE_DATA_FORMAT);if(!isNaN(a)){const o=No.getData(a);o.initializeFromRoomObjectModel(r.model),r.processUpdateMessage(new ht(r.getState(0),o))}this.events.dispatchEvent(new Se(Se.CONTENT_UPDATED,n,t,i))}e!==Le.TEMPORARY_ROOM&&this.addObjectToTileMap(n,r)}changeObjectModelData(e,t,i,n,r){const a=this.getObject(this.getRoomId(e),t,i);if(!a||!a.logic)return!1;const o=new I5(n,r);return a.processUpdateMessage(o),!0}changeObjectState(e,t,i){const n=this.getObject(this.getRoomId(e),t,i);if(!n||!n.model)return;let r=n.model.getValue(b.FURNITURE_AUTOMATIC_STATE_INDEX);isNaN(r)?r=1:r=r+1,n.model.setValue(b.FURNITURE_AUTOMATIC_STATE_INDEX,r);const a=n.model.getValue(b.FURNITURE_DATA_FORMAT),o=No.getData(a);o.initializeFromRoomObjectModel(n.model),n.logic&&n.logic.processUpdateMessage(new ht(r,o))}loadRoomObjectBadgeImage(e,t,i,n,r=!0){if(!this._sessionDataManager)return;let a=null;if(e===0){const l=this._roomManager.getRoomInstance(Le.TEMPORARY_ROOM);l&&(a=l.getRoomObject(t,i))}else a=this.getRoomObjectFloor(e,t);if(!a||!a.logic)return;let o=r?this._sessionDataManager.loadGroupBadgeImage(n):this._sessionDataManager.loadBadgeImage(n);if(o)this.putBadgeInObjectAssets(a,n,r);else{o="loading_icon",this._badgeListenerObjects||(this._badgeListenerObjects=new Map),this._badgeListenerObjects.size||this._sessionDataManager.events.addEventListener(Xc.IMAGE_READY,this.onBadgeImageReadyEvent);let l=this._badgeListenerObjects.get(n);l||(l=[]),l.push(new iTe(a,r)),this._badgeListenerObjects.set(n,l)}a.logic.processUpdateMessage(new Gu(n,o))}onBadgeImageReadyEvent(e){if(!this._sessionDataManager)return;const t=this._badgeListenerObjects&&this._badgeListenerObjects.get(e.badgeId);if(t){for(const i of t){if(!i)continue;this.putBadgeInObjectAssets(i.object,e.badgeId,i.groupBadge);const n=i.groupBadge?this._sessionDataManager.loadGroupBadgeImage(e.badgeId):this._sessionDataManager.loadBadgeImage(e.badgeId);i.object&&i.object.logic&&i.object.logic.processUpdateMessage(new Gu(e.badgeId,n))}this._badgeListenerObjects.delete(e.badgeId),this._badgeListenerObjects.size||this._sessionDataManager.events.removeEventListener(Xc.IMAGE_READY,this.onBadgeImageReadyEvent)}}putBadgeInObjectAssets(e,t,i=!1){if(!this._roomContentLoader||!this._sessionDataManager)return;const n=i?this._sessionDataManager.loadGroupBadgeImage(t):this._sessionDataManager.loadBadgeImage(t),r=i?this._sessionDataManager.getGroupBadgeImage(t):this._sessionDataManager.getBadgeImage(t);r&&this._roomContentLoader.addAssetToCollection(e.type,n,r,!1)}dispatchMouseEvent(e,t,i,n,r,a,o,l){const u=this.getRoomInstanceRenderingCanvas(this._activeRoomId,e);if(!u)return;const c=this.getRenderingCanvasOverlay(u),h=this.getOverlayIconSprite(c,Le.OBJECT_ICON_SPRITE);if(h){const f=h.getLocalBounds();h.x=t-f.width/2,h.y=i-f.height/2}if(!this.handleRoomDragging(u,t,i,n,r,a,o)&&!u.handleMouseEvent(t,i,n,r,a,o,l)){let f=null;n===ue.MOUSE_CLICK?(this.events&&this.events.dispatchEvent(new Se(Se.DESELECTED,this._activeRoomId,-1,U.MINIMUM)),f=Ee.CLICK):n===ue.MOUSE_MOVE?f=Ee.MOUSE_MOVE:n===ue.MOUSE_DOWN?f=Ee.MOUSE_DOWN:n===ue.MOUSE_DOWN_LONG?f=Ee.MOUSE_DOWN_LONG:n===ue.MOUSE_UP&&(f=Ee.MOUSE_UP),this._roomObjectEventHandler.handleRoomObjectEvent(new Ee(f,this.getRoomObject(this._activeRoomId,Le.ROOM_OBJECT_ID,U.ROOM),null,r),this._activeRoomId)}this._activeRoomActiveCanvas=e,this._activeRoomActiveCanvasMouseX=t,this._activeRoomActiveCanvasMouseY=i}handleRoomDragging(e,t,i,n,r,a,o){let l=t-this._activeRoomActiveCanvasMouseX,u=i-this._activeRoomActiveCanvasMouseY;if(n===ue.MOUSE_DOWN)!r&&!a&&!o&&!this.isDecorating&&this._roomAllowsDragging&&(this._activeRoomIsDragged=!0,this._activeRoomWasDragged=!1,this._activeRoomDragStartX=this._activeRoomActiveCanvasMouseX,this._activeRoomDragStartY=this._activeRoomActiveCanvasMouseY);else if(n===ue.MOUSE_UP){if(this._activeRoomIsDragged&&(this._activeRoomIsDragged=!1,this._activeRoomWasDragged)){const c=this.getRoomInstanceData(this._activeRoomId);if(c){const h=c.roomCamera;h&&(this.useOffsetScrolling&&(h.isMoving||(h.centeredLocX=!1,h.centeredLocY=!1),h.resetLocation(new M(-e.screenOffsetX,-e.screenOffsetY))),this._roomDraggingAlwaysCenters&&h.reset())}}}else if(n===ue.MOUSE_MOVE)this._activeRoomIsDragged&&(this._activeRoomWasDragged||(l=t-this._activeRoomDragStartX,u=i-this._activeRoomDragStartY,(l<=-Le.DRAG_THRESHOLD||l>=Le.DRAG_THRESHOLD||u<=-Le.DRAG_THRESHOLD||u>=Le.DRAG_THRESHOLD)&&(this._activeRoomWasDragged=!0),l=0,u=0),(l!=0||u!=0)&&(this._activeRoomDragX+=l,this._activeRoomDragY+=u,this._activeRoomWasDragged=!0));else if((n===ue.MOUSE_CLICK||n===ue.DOUBLE_CLICK)&&(this._activeRoomIsDragged=!1,this._activeRoomWasDragged))return this._activeRoomWasDragged=!1,!0;return!1}updateMousePointer(e,t,i){const n=this.getRoomObjectCategoryForType(i);switch(e){case X.MOUSE_BUTTON:this.setMouseButton(this._activeRoomId,n,t);return;default:this.setMouseDefault(this._activeRoomId,n,t);return}}setMouseButton(e,t,i){if(!this._roomSessionManager)return;const n=this._roomSessionManager.getSession(e);if(n&&(t!==U.FLOOR&&t!==U.WALL||n.controllerLevel>=Sa.GUEST)){const r=this.getRoomInstanceData(e);r&&r.addButtonMouseCursorOwner(t+"_"+i)&&(this._mouseCursorUpdate=!0)}}setMouseDefault(e,t,i){if(!this._roomSessionManager)return;const n=this.getRoomInstanceData(e);n&&n.removeButtonMouseCursorOwner(t+"_"+i)&&(this._mouseCursorUpdate=!0)}processRoomObjectOperation(e,t,i){if(!this._roomObjectEventHandler)return!1;this._roomObjectEventHandler.modifyRoomObject(this._activeRoomId,e,t,i)}modifyRoomObjectDataWithMap(e,t,i,n){if(!this._roomObjectEventHandler)return!1;t===U.FLOOR&&this._roomObjectEventHandler.modifyRoomObjectDataWithMap(this._activeRoomId,e,t,i,n)}modifyRoomObjectData(e,t,i,n){if(!this._roomObjectEventHandler)return!1;t===U.WALL&&this._roomObjectEventHandler.modifyWallItemData(this._activeRoomId,e,i,n)}processRoomObjectEvent(e){if(!this._roomObjectEventHandler)return;const t=this.getRoomObjectRoomId(e.object);if(!t)return;const i=this.getRoomIdFromString(t);this._roomObjectEventHandler.handleRoomObjectEvent(e,i)}processRoomObjectPlacement(e,t,i,n,r=null,a=null,o=-1,l=-1,u=null){const c=this.getRoomInstance(this._activeRoomId);return!c||c.model.getValue(Qt.ROOM_IS_PUBLIC)!==0||!this._roomObjectEventHandler?!1:this._roomObjectEventHandler.processRoomObjectPlacement(e,this._activeRoomId,t,i,n,r,a,o,l,u)}getRoomObjectScreenLocation(e,t,i,n=-1){n==-1&&(n=this._activeRoomActiveCanvas);const r=this.getRoomInstanceGeometry(e,n);if(!r)return null;const a=this.getRoomObject(e,t,i);if(!a)return null;const o=r.getScreenPoint(a.getLocation());if(!o)return null;const l=this.getRoomInstanceRenderingCanvas(e,n);return l?(o.x=o.x*l.scale,o.y=o.y*l.scale,o.x+=l.width/2+l.screenOffsetX,o.y+=l.height/2+l.screenOffsetY,o.x=Math.round(o.x),o.y=Math.round(o.y),o):null}selectRoomObject(e,t,i){this._roomObjectEventHandler&&this._roomObjectEventHandler.setSelectedObject(e,t,i)}setSelectedAvatar(e,t){this._roomObjectEventHandler||this._roomObjectEventHandler.setSelectedAvatar(e,t,!0)}cancelRoomObjectInsert(){this._roomObjectEventHandler&&this._roomObjectEventHandler.cancelRoomObjectInsert(this._activeRoomId)}addOverlayIconSprite(e,t,i,n=1){if(!e||!i)return;let r=this.getOverlayIconSprite(e,t);return r?null:(r=new kt(i),r.name=t,r.scale.set(n),e.addChild(r),r)}onRoomContentLoaded(e,t,i){if(!this._roomContentLoader||e===-1)return;this._thumbnailObjectIdBank.freeNumber(e-1);const n=this._thumbnailCallbacks.get(t);if(n){this._thumbnailCallbacks.delete(t);const r=this._roomContentLoader.getImage(t);if(r)for(const a of n)a&&a.imageReady(e,null,r)}}setObjectMoverIconSprite(e,t,i,n=null,r=null,a=-1,o=-1,l=null){let u=null,c=0,h=null;const f=1;if(i)h=this.getRoomObjectImage(this._activeRoomId,e,t,new M,1,null);else if(this._roomContentLoader)if(t===U.FLOOR?(u=this._roomContentLoader.getFurnitureFloorNameForTypeId(e),c=this._roomContentLoader.getFurnitureFloorColorIndex(e)):t===U.WALL&&(u=this._roomContentLoader.getFurnitureWallNameForTypeId(e,n),c=this._roomContentLoader.getFurnitureWallColorIndex(e)),t===U.UNIT)if(u=tt.getTypeString(e),u==="pet"){u=this.getPetType(n);const p=new Hv(n);h=this.getRoomObjectPetImage(p.typeId,p.paletteId,p.color,new M(180),64,null,!0,0,p.customParts,l)}else h=this.getGenericRoomObjectImage(u,n,new M(180),64,null,0,null,r,a,o,l);else h=this.getGenericRoomObjectImage(u,c.toString(),new M,1,null,0,n,r,a,o,l);if(!h||!h.data)return;const d=this.getActiveRoomInstanceRenderingCanvas();if(!d)return;const _=this.getRenderingCanvasOverlay(d);this.removeOverlayIconSprite(_,Le.OBJECT_ICON_SPRITE);const g=this.addOverlayIconSprite(_,Le.OBJECT_ICON_SPRITE,h.data,f);g&&(g.x=this._activeRoomActiveCanvasMouseX-h.data.width/2,g.y=this._activeRoomActiveCanvasMouseY-h.data.height/2)}getRoomObjectImage(e,t,i,n,r,a,o=0){if(!this._roomManager)return null;let l=-1,u=null,c=null,h="",f=null;const d=this.getRoomId(e),_=this._roomManager.getRoomInstance(d);if(_){const g=_.getRoomObject(t,i);if(g&&g.model)switch(l=g.id,u=g.type,i){case U.FLOOR:case U.WALL:{h=g.model.getValue(b.FURNITURE_COLOR).toString(),f=g.model.getValue(b.FURNITURE_EXTRAS);const p=g.model.getValue(b.FURNITURE_DATA_FORMAT);p!==ps.FORMAT_KEY&&(c=No.getData(p),c.initializeFromRoomObjectModel(g.model));break}case U.UNIT:h=g.model.getValue(b.FIGURE);break}}return this.getGenericRoomObjectImage(u,h,n,r,a,o,f,c,-1,-1,null,l)}getFurnitureFloorIconUrl(e){let t=null,i="";return this._roomContentLoader?(t=this._roomContentLoader.getFurnitureFloorNameForTypeId(e),i=this._roomContentLoader.getFurnitureFloorColorIndex(e).toString(),this._roomContentLoader.getAssetIconUrl(t,i)):null}getFurnitureFloorIcon(e,t,i=null,n=null){return this.getFurnitureFloorImage(e,new M,1,t,0,i,-1,-1,n)}getFurnitureWallIconUrl(e,t=null){let i=null,n="";return this._roomContentLoader?(i=this._roomContentLoader.getFurnitureWallNameForTypeId(e,t),n=this._roomContentLoader.getFurnitureWallColorIndex(e).toString(),this._roomContentLoader.getAssetIconUrl(i,n)):null}getFurnitureWallIcon(e,t,i=null){return this.getFurnitureWallImage(e,new M,1,t,0,i)}getFurnitureFloorImage(e,t,i,n,r=0,a=null,o=-1,l=-1,u=null){let c=null,h="";return this._roomContentLoader&&(c=this._roomContentLoader.getFurnitureFloorNameForTypeId(e),h=this._roomContentLoader.getFurnitureFloorColorIndex(e).toString()),i===1&&n?this.getGenericRoomObjectThumbnail(c,h,n,a,u):this.getGenericRoomObjectImage(c,h,t,i,n,r,a,u,o,l)}getFurnitureWallImage(e,t,i,n,r=0,a=null,o=-1,l=-1){let u=null,c="";return this._roomContentLoader&&(u=this._roomContentLoader.getFurnitureWallNameForTypeId(e),c=this._roomContentLoader.getFurnitureWallColorIndex(e).toString()),i===1&&n?this.getGenericRoomObjectThumbnail(u,c,n,a,null):this.getGenericRoomObjectImage(u,c,t,i,n,r,a,null,o,l)}getRoomObjectPetImage(e,t,i,n,r,a,o=!1,l=0,u=null,c=null){let h=null,f=e+" "+t+" "+i.toString(16);if(o&&(f=f+" head"),u){f=f+(" "+u.length);for(const d of u)f=f+(" "+d.layerId+" "+d.partId+" "+d.paletteId)}return this._roomContentLoader&&(h=this._roomContentLoader.getPetNameForType(e)),this.getGenericRoomObjectImage(h,f,n,r,a,l,null,null,-1,-1,c)}getGenericRoomObjectImage(e,t,i,n,r,a=0,o=null,l=null,u=-1,c=-1,h=null,f=-1){if(!this._roomManager)return null;const d=new sk;if(d.id=-1,!this._ready||!e)return d;let _=this._roomManager.getRoomInstance(Le.TEMPORARY_ROOM);if(!_&&(_=this._roomManager.createRoomInstance(Le.TEMPORARY_ROOM),!_))return d;let g=this._imageObjectIdBank.reserveNumber();const p=this.getRoomObjectCategoryForType(e);if(g<0)return d;g++;const m=_.createRoomObjectAndInitalize(g,e,p);if(!m||!m.model||!m.logic)return d;const v=m.model;switch(p){case U.FLOOR:case U.WALL:v.setValue(b.FURNITURE_COLOR,parseInt(t)),v.setValue(b.FURNITURE_EXTRAS,o);break;case U.UNIT:if(e===tt.USER||e===tt.BOT||e===tt.RENTABLE_BOT||e===tt.PET)v.setValue(b.FIGURE,t);else{const w=new Hv(t);v.setValue(b.PET_PALETTE_INDEX,w.paletteId),v.setValue(b.PET_COLOR,w.color),w.headOnly&&v.setValue(b.PET_HEAD_ONLY,1),w.hasCustomParts&&(v.setValue(b.PET_CUSTOM_LAYER_IDS,w.customLayerIds),v.setValue(b.PET_CUSTOM_PARTS_IDS,w.customPartIds),v.setValue(b.PET_CUSTOM_PALETTE_IDS,w.customPaletteIds)),h&&v.setValue(b.FIGURE_POSTURE,h)}break}m.setDirection(i);const E=m.visualization;if(!E)return _.removeRoomObject(g,p),d;(u>-1||l)&&(l&&l.getLegacyString()!==""?m.logic.processUpdateMessage(new ht(parseInt(l.getLegacyString()),l)):m.logic.processUpdateMessage(new ht(u,l)));const y=new Bu(n,new M(-135,30,0),new M(11,11,5));if(E.update(y,0,!0,!1),c>0){let w=0;for(;w=0;){const n=e.getChildAt(i);if(n&&n.name===t){if(e.removeChildAt(i),n.children.length){const r=n.getChildAt(0);r.parent.removeChild(r),r.destroy()}return!0}i--}return!1}getOverlayIconSprite(e,t){if(!e)return null;let i=e.children.length-1;for(;i>=0;){const n=e.getChildAt(i);if(n&&n.name===t)return n;i--}return null}getRoomObjects(e,t){if(this._ready){const i=this.getRoomId(e),n=this._roomManager.getRoomInstance(i);if(n)return n.getRoomObjectsForCategory(t)}return[]}addObjectToTileMap(e,t){const i=this.getRoomInstanceData(e).tileObjectMap;i&&i.addRoomObject(t)}refreshTileObjectMap(e,t){const i=this.getRoomInstanceData(e).tileObjectMap;i&&i.populate(this.getRoomObjects(e,U.FLOOR))}getRenderRoomMessage(e,t,i=!1,n=!0,r=!1,a=-1){let o=null;if(a>-1?o=this.getRoomInstanceRenderingCanvas(this._activeRoomId,a):o=this.getActiveRoomInstanceRenderingCanvas(),!o)return null;r&&o.skipSpriteVisibilityChecking();let l=-1;!n&&this._roomSessionManager.getSession(this._activeRoomId)!=null&&(l=this._roomSessionManager.getSession(this._activeRoomId).ownRoomIndex);const u=new TA,c=u.getFurniData(e,o,this,l),h=u.getRoomRenderingModifiers(this),f=u.getRoomPlanes(e,o,this,t);return r&&o.resumeSpriteVisibilityChecking(),le.log(c,h,f),null}createTextureFromRoom(e,t=-1,i=null){let n=null;t>-1?n=this.getRoomInstanceRenderingCanvas(this._activeRoomId,t):n=this.getActiveRoomInstanceRenderingCanvas();let r=null;return i?r=St.generateTexture(n.master,i):r=n.getDisplayAsTexture(),r}saveTextureAsScreenshot(e,t=!1){let i=null;t?i=new pb:i=new Ov,i.assignBitmap(e),this._communication.connection.send(i)}saveBase64AsScreenshot(e,t=!1){let i=null;t?i=new pb:i=new Ov,i.assignBase64(e),this._communication.connection.send(i)}objectsInitialized(e){const t=this.getRoomIdFromString(e);this.events.dispatchEvent(new ft(ft.OBJECTS_INITIALIZED,t))}getRoomId(e){return e.toString()}getRoomIdFromString(e){if(!e)return-1;const t=e.split("_");return t.length<=0?-1:parseInt(t[0])||0}getRoomObjectRoomId(e){return!e||!e.model?null:e.model.getValue(b.OBJECT_ROOM_ID)}getRoomObjectAdUrl(e){return this._roomContentLoader.getRoomObjectAdUrl(e)}getPetTypeId(e){let t=-1;if(e){const i=e.split(" ");i.length>1&&(t=parseInt(i[0]))}return t}getPetType(e){if(!e)return null;const t=e.split(" ");if(t.length>1){const i=parseInt(t[0]);return this._roomContentLoader?this._roomContentLoader.getPetNameForType(i):"pet"}return null}isRoomContentTypeLoaded(e){return this._roomContentLoader?this._roomContentLoader.getCollection(e)!==null:!1}getPetColorResult(e,t){return this._roomContentLoader?this._roomContentLoader.getPetColorResult(e,t):null}getPetColorResultsForTag(e,t){return this._roomContentLoader?this._roomContentLoader.getPetColorResultsForTag(e,t):null}deleteRoomObject(e,t){return!this._roomObjectEventHandler||t!==U.WALL?!1:this._roomObjectEventHandler.deleteWallItem(this._activeRoomId,e)}get connection(){return this._communication.connection}get sessionDataManager(){return this._sessionDataManager}set sessionDataManager(e){this._sessionDataManager=e}get roomSessionManager(){return this._roomSessionManager}set roomSessionManager(e){this._roomSessionManager=e}get roomManager(){return this._roomManager}set roomManager(e){this._roomManager=e}get objectEventHandler(){return this._roomObjectEventHandler}get roomRendererFactory(){return this._roomRendererFactory}get visualizationFactory(){return this._visualizationFactory}get logicFactory(){return this._logicFactory}get activeRoomId(){return this._activeRoomId}get ready(){return this._ready}get roomContentLoader(){return this._roomContentLoader}get isDecorating(){if(!this._roomSessionManager)return!1;const e=this._roomSessionManager.getSession(this._activeRoomId);return e&&e.isDecorating||!1}get useOffsetScrolling(){return!0}get selectedAvatarId(){return this._roomObjectEventHandler?this._roomObjectEventHandler.selectedAvatarId:-1}getRoomObjectCount(e,t){return this._roomManager==null?0:this._roomManager.getRoomInstance(e.toString()).getRoomObjectsForCategory(t).length}};Le.ROOM_OBJECT_ID=-1,Le.ROOM_OBJECT_TYPE="room",Le.CURSOR_OBJECT_ID=-2,Le.CURSOR_OBJECT_TYPE="tile_cursor",Le.ARROW_OBJECT_ID=-3,Le.ARROW_OBJECT_TYPE="selection_arrow",Le.OVERLAY="overlay",Le.OBJECT_ICON_SPRITE="object_icon_sprite",Le.DRAG_THRESHOLD=15,Le.TEMPORARY_ROOM="temporary_room";let Z_=Le;const q=class q{constructor(e,t=1){this._previewRoomId=1,this._currentPreviewObjectType=0,this._currentPreviewObjectCategory=0,this._currentPreviewObjectData="",this._currentPreviewRectangle=null,this._currentPreviewCanvasWidth=0,this._currentPreviewCanvasHeight=0,this._currentPreviewScale=64,this._backgroundColor=305148561,this._backgroundSprite=null,this._disableUpdate=!1,this._roomEngine=e,this._planeParser=new ri,this._previewRoomId=hv.makeRoomPreviewerId(t),this._addViewOffset=new Q(0,0),this.onRoomObjectAdded=this.onRoomObjectAdded.bind(this),this.onRoomInitializedonRoomInitialized=this.onRoomInitializedonRoomInitialized.bind(this),this.isRoomEngineReady&&this._roomEngine.events&&(this._roomEngine.events.addEventListener(Se.ADDED,this.onRoomObjectAdded),this._roomEngine.events.addEventListener(Se.CONTENT_UPDATED,this.onRoomObjectAdded),this._roomEngine.events.addEventListener(ft.INITIALIZED,this.onRoomInitializedonRoomInitialized)),this.createRoomForPreview()}dispose(){this.reset(!0),this.isRoomEngineReady&&this._roomEngine.events&&(this._roomEngine.events.removeEventListener(Se.ADDED,this.onRoomObjectAdded),this._roomEngine.events.removeEventListener(Se.CONTENT_UPDATED,this.onRoomObjectAdded),this._roomEngine.events.removeEventListener(ft.INITIALIZED,this.onRoomInitializedonRoomInitialized)),this._backgroundSprite&&(this._backgroundSprite.destroy(),this._backgroundSprite=null),this._planeParser&&(this._planeParser.dispose(),this._planeParser=null)}createRoomForPreview(){if(this.isRoomEngineReady){const t=new ri;t.initializeTileMap(9,9);let i=1;for(;i<8;){let n=1;for(;n<8;)t.setTileHeight(n,i,0),n++;i++}t.initializeFromTileData(),this._roomEngine.createRoomInstance(this._previewRoomId,t.getMapData()),t.dispose()}}reset(e){this.isRoomEngineReady&&(this._roomEngine.removeRoomObjectFloor(this._previewRoomId,q.PREVIEW_OBJECT_ID),this._roomEngine.removeRoomObjectWall(this._previewRoomId,q.PREVIEW_OBJECT_ID),this._roomEngine.removeRoomObjectUser(this._previewRoomId,q.PREVIEW_OBJECT_ID),e||this.updatePreviewRoomView()),this._currentPreviewObjectCategory=U.MINIMUM}updatePreviewModel(e,t,i=!0){const n=new pv;n.flush(),n.parseModel(e,t,i);const r=this._roomEngine.getLegacyWallGeometry(this._previewRoomId);if(!r)return;this._planeParser.reset();const a=n.width,o=n.height;this._planeParser.initializeTileMap(a,o);const l=null;let u=-1,c=-1,h=0,f=0,d=0;for(;d0&&d0&&m=0;){let m=n.width-1;for(;m>=0;)r.setHeight(m,_,this._planeParser.getTileHeight(m,_)),m--;_--}const g=this._planeParser.getMapData();g.doors.push({x:u,y:c,z:h,dir:f});const p=this.getRoomPreviewOwnRoomObject();p&&p.processUpdateMessage(new Nv(g))}addFurnitureIntoRoom(e,t,i=null,n=null){if(i||(i=new ps),this.isRoomEngineReady&&(this.reset(!1),this._currentPreviewObjectType=e,this._currentPreviewObjectCategory=U.FLOOR,this._currentPreviewObjectData="",this._roomEngine.addFurnitureFloor(this._previewRoomId,q.PREVIEW_OBJECT_ID,e,new M(q.PREVIEW_OBJECT_LOCATION_X,q.PREVIEW_OBJECT_LOCATION_Y,0),t,0,i,NaN,-1,0,-1,"",!0,!1))){this._previousAutomaticStateChangeTime=Pe(),this._automaticStateChange=!0;const r=this._roomEngine.getRoomObject(this._previewRoomId,q.PREVIEW_OBJECT_ID,this._currentPreviewObjectCategory);return r&&n&&r.model.setValue(b.FURNITURE_EXTRAS,n),this.updatePreviewRoomView(),q.PREVIEW_OBJECT_ID}return-1}addWallItemIntoRoom(e,t,i){if(this.isRoomEngineReady){if(this._currentPreviewObjectCategory===U.WALL&&this._currentPreviewObjectType===e&&this._currentPreviewObjectData===i)return q.PREVIEW_OBJECT_ID;if(this.reset(!1),this._currentPreviewObjectType=e,this._currentPreviewObjectCategory=U.WALL,this._currentPreviewObjectData=i,this._roomEngine.addFurnitureWall(this._previewRoomId,q.PREVIEW_OBJECT_ID,e,new M(.5,2.3,1.8),t,0,i,0,0,-1,"",!1))return this._previousAutomaticStateChangeTime=Pe(),this._automaticStateChange=!0,this.updatePreviewRoomView(),q.PREVIEW_OBJECT_ID}return-1}addAvatarIntoRoom(e,t){return this.isRoomEngineReady?(this.reset(!1),this._currentPreviewObjectType=1,this._currentPreviewObjectCategory=U.UNIT,this._currentPreviewObjectData=e,this._roomEngine.addRoomObjectUser(this._previewRoomId,q.PREVIEW_OBJECT_ID,new M(q.PREVIEW_OBJECT_LOCATION_X,q.PREVIEW_OBJECT_LOCATION_Y,0),new M(90,0,0),135,tt.getTypeNumber(tt.USER),e)&&(this._previousAutomaticStateChangeTime=Pe(),this._automaticStateChange=!0,this.updateUserGesture(1),this.updateUserEffect(t),this.updateUserPosture("std")),this.updatePreviewRoomView(),q.PREVIEW_OBJECT_ID):-1}addPetIntoRoom(e){return this.isRoomEngineReady?(this.reset(!1),this._currentPreviewObjectType=1,this._currentPreviewObjectCategory=U.UNIT,this._currentPreviewObjectData=e,this._roomEngine.addRoomObjectUser(this._previewRoomId,q.PREVIEW_OBJECT_ID,new M(q.PREVIEW_OBJECT_LOCATION_X,q.PREVIEW_OBJECT_LOCATION_Y,0),new M(90,0,0),90,tt.getTypeNumber(tt.PET),e)&&(this._previousAutomaticStateChangeTime=Pe(),this._automaticStateChange=!1,this.updateUserGesture(1),this.updateUserPosture("std")),this.updatePreviewRoomView(),q.PREVIEW_OBJECT_ID):-1}updateUserPosture(e,t=""){this.isRoomEngineReady&&this._roomEngine.updateRoomObjectUserPosture(this._previewRoomId,q.PREVIEW_OBJECT_ID,e,t)}updateUserGesture(e){this.isRoomEngineReady&&this._roomEngine.updateRoomObjectUserGesture(this._previewRoomId,q.PREVIEW_OBJECT_ID,e)}updateUserEffect(e){this.isRoomEngineReady&&this._roomEngine.updateRoomObjectUserEffect(this._previewRoomId,q.PREVIEW_OBJECT_ID,e)}updateObjectUserFigure(e,t=null,i=null,n=!1){return this.isRoomEngineReady?this._roomEngine.updateRoomObjectUserFigure(this._previewRoomId,q.PREVIEW_OBJECT_ID,e,t,i,n):!1}updateObjectUserAction(e,t,i=null){this.isRoomEngineReady&&this._roomEngine.updateRoomObjectUserAction(this._previewRoomId,q.PREVIEW_OBJECT_ID,e,t,i)}updateObjectStuffData(e){this.isRoomEngineReady&&this._roomEngine.updateRoomObjectFloor(this._previewRoomId,q.PREVIEW_OBJECT_ID,null,null,e.state,e)}changeRoomObjectState(){this.isRoomEngineReady&&(this._automaticStateChange=!1,this._currentPreviewObjectCategory!==U.UNIT&&this._roomEngine.changeObjectState(this._previewRoomId,q.PREVIEW_OBJECT_ID,this._currentPreviewObjectCategory))}changeRoomObjectDirection(){if(this.isRoomEngineReady){const e=this._roomEngine.getRoomObject(this._previewRoomId,q.PREVIEW_OBJECT_ID,this._currentPreviewObjectCategory);if(!e)return;const t=this._roomEngine.objectEventHandler.getValidRoomObjectDirection(e,!0);switch(this._currentPreviewObjectCategory){case U.FLOOR:{const i=new M(q.PREVIEW_OBJECT_LOCATION_X,q.PREVIEW_OBJECT_LOCATION_Y),n=new M(t,t,t);this._roomEngine.updateRoomObjectFloor(this._previewRoomId,q.PREVIEW_OBJECT_ID,i,n,null,null);return}case U.WALL:return}}}checkAutomaticRoomObjectStateChange(){if(this._automaticStateChange){const e=Pe();e>this._previousAutomaticStateChangeTime+q.AUTOMATIC_STATE_CHANGE_INTERVAL&&(this._previousAutomaticStateChangeTime=e,this.isRoomEngineReady&&this._roomEngine.changeObjectState(this._previewRoomId,q.PREVIEW_OBJECT_ID,this._currentPreviewObjectCategory))}}getRoomCanvas(e,t){if(this.isRoomEngineReady){const i=this._roomEngine.getRoomInstanceDisplay(this._previewRoomId,q.PREVIEW_CANVAS_ID,e,t,this._currentPreviewScale);if(i&&this._backgroundColor!==null){let r=this._backgroundSprite;r||(r=new kt(Ne.WHITE),i.addChildAt(r,0)),r.width=e,r.height=t,r.tint=this._backgroundColor}this._roomEngine.setRoomInstanceRenderingCanvasMask(this._previewRoomId,q.PREVIEW_CANVAS_ID,!0);const n=this._roomEngine.getRoomInstanceGeometry(this._previewRoomId,q.PREVIEW_CANVAS_ID);return n&&n.adjustLocation(new M(q.PREVIEW_OBJECT_LOCATION_X,q.PREVIEW_OBJECT_LOCATION_Y,0),30),this._currentPreviewCanvasWidth=e,this._currentPreviewCanvasHeight=t,i}return null}modifyRoomCanvas(e,t){this.isRoomEngineReady&&(this._currentPreviewCanvasWidth=e,this._currentPreviewCanvasHeight=t,this._backgroundSprite&&(this._backgroundSprite.width=e,this._backgroundSprite.height=t),this._roomEngine.initializeRoomInstanceRenderingCanvas(this._previewRoomId,q.PREVIEW_CANVAS_ID,e,t))}set addViewOffset(e){this._addViewOffset=e}get addViewOffset(){return this._addViewOffset}updatePreviewObjectBoundingRectangle(e){const t=this._roomEngine.getRoomObjectBoundingRectangle(this._previewRoomId,q.PREVIEW_OBJECT_ID,this._currentPreviewObjectCategory,q.PREVIEW_CANVAS_ID);if(t&&e)if(t.x+=-(this._currentPreviewCanvasWidth>>1),t.y+=-(this._currentPreviewCanvasHeight>>1),t.x+=-e.x,t.y+=-e.y,!this._currentPreviewRectangle)this._currentPreviewRectangle=t;else{const i=this._currentPreviewRectangle.clone().enlarge(t);(i.width-this._currentPreviewRectangle.width>this._currentPreviewCanvasWidth-this._currentPreviewRectangle.width>>1||i.height-this._currentPreviewRectangle.height>this._currentPreviewCanvasHeight-this._currentPreviewRectangle.height>>1||this._currentPreviewRectangle.width<1||this._currentPreviewRectangle.height<1)&&(this._currentPreviewRectangle=i)}}validatePreviewSize(e){if(this._currentPreviewRectangle.width<1||this._currentPreviewRectangle.height<1)return e;if(this.isRoomEngineReady){const t=this._roomEngine.getRoomInstanceGeometry(this._previewRoomId,q.PREVIEW_CANVAS_ID);this._currentPreviewRectangle.width>this._currentPreviewCanvasWidth*(1+q.ALLOWED_IMAGE_CUT)||this._currentPreviewRectangle.height>this._currentPreviewCanvasHeight*(1+q.ALLOWED_IMAGE_CUT)?q.ZOOM_ENABLED?this._roomEngine.getRoomInstanceRenderingCanvasScale(this._previewRoomId,q.PREVIEW_CANVAS_ID)!==.5&&(this._roomEngine.setRoomInstanceRenderingCanvasScale(this._previewRoomId,q.PREVIEW_CANVAS_ID,.5,null,null),this._currentPreviewScale=q.SCALE_SMALL,this._currentPreviewNeedsZoomOut=!0,e.x=e.x>>1,e.y=e.y>>1,this._currentPreviewRectangle.x=this._currentPreviewRectangle.x>>2,this._currentPreviewRectangle.y=this._currentPreviewRectangle.y>>2,this._currentPreviewRectangle.width=this._currentPreviewRectangle.width>>2,this._currentPreviewRectangle.height=this._currentPreviewRectangle.height>>2):t.isZoomedIn()&&(t.performZoomOut(),this._currentPreviewScale=q.SCALE_SMALL,this._currentPreviewNeedsZoomOut=!0):this._currentPreviewNeedsZoomOut||(q.ZOOM_ENABLED?this._roomEngine.getRoomInstanceRenderingCanvasScale(this._previewRoomId,q.PREVIEW_CANVAS_ID)!==1&&(this._roomEngine.setRoomInstanceRenderingCanvasScale(this._previewRoomId,q.PREVIEW_CANVAS_ID,1,null,null),this._currentPreviewScale=q.SCALE_NORMAL):t.isZoomedIn()||(t.performZoomIn(),this._currentPreviewScale=q.SCALE_NORMAL))}return e}zoomIn(){this.isRoomEngineReady&&(q.ZOOM_ENABLED?this._roomEngine.setRoomInstanceRenderingCanvasScale(this._previewRoomId,q.PREVIEW_CANVAS_ID,1):this._roomEngine.getRoomInstanceGeometry(this._previewRoomId,q.PREVIEW_CANVAS_ID).performZoomIn()),this._currentPreviewScale=q.SCALE_NORMAL}zoomOut(){this.isRoomEngineReady&&(q.ZOOM_ENABLED?this._roomEngine.setRoomInstanceRenderingCanvasScale(this._previewRoomId,q.PREVIEW_CANVAS_ID,.5):this._roomEngine.getRoomInstanceGeometry(this._previewRoomId,q.PREVIEW_CANVAS_ID).performZoomOut()),this._currentPreviewScale=q.SCALE_SMALL}updateAvatarDirection(e,t){this.isRoomEngineReady&&this._roomEngine.updateRoomObjectUserLocation(this._previewRoomId,q.PREVIEW_OBJECT_ID,new M(q.PREVIEW_OBJECT_LOCATION_X,q.PREVIEW_OBJECT_LOCATION_Y,0),new M(q.PREVIEW_OBJECT_LOCATION_X,q.PREVIEW_OBJECT_LOCATION_Y,0),!1,0,new M(e*45,0,0),t*45)}updateObjectRoom(e=null,t=null,i=null,n=!1){return this.isRoomEngineReady?this._roomEngine.updateRoomInstancePlaneType(this._previewRoomId,e,t,i,n):!1}updateRoomWallsAndFloorVisibility(e,t=!0){this.isRoomEngineReady&&this._roomEngine.updateRoomInstancePlaneVisibility(this._previewRoomId,e,t)}getCanvasOffset(e){if(this._currentPreviewRectangle.width<1||this._currentPreviewRectangle.height<1)return e;let t=-(this._currentPreviewRectangle.left+this._currentPreviewRectangle.right)>>1,i=-(this._currentPreviewRectangle.top+this._currentPreviewRectangle.bottom)>>1;const n=this._currentPreviewCanvasHeight-this._currentPreviewRectangle.height>>1;n>10?i=i+Math.min(15,n-10):this._currentPreviewObjectCategory!==U.UNIT?i=i+(5-Math.max(0,n/2)):i=i-(5-Math.min(0,n/2)),i=i+this._addViewOffset.y,t=t+this._addViewOffset.x;const r=t-e.x,a=i-e.y;if(r!==0||a!==0){const o=Math.sqrt(r*r+a*a);return o>10&&(t=e.x+r*10/o,i=e.y+a*10/o),new Q(t,i)}return null}updatePreviewRoomView(e=!1){if(!(this._disableUpdate&&!e)&&(this.checkAutomaticRoomObjectStateChange(),this.isRoomEngineReady)){let t=this._roomEngine.getRoomInstanceRenderingCanvasOffset(this._previewRoomId,q.PREVIEW_CANVAS_ID);if(t&&(this.updatePreviewObjectBoundingRectangle(t),this._currentPreviewRectangle)){const i=this._currentPreviewScale;t=this.validatePreviewSize(t);const n=this.getCanvasOffset(t);n&&this._roomEngine.setRoomInstanceRenderingCanvasOffset(this._previewRoomId,q.PREVIEW_CANVAS_ID,n),this._currentPreviewScale!==i&&(this._currentPreviewRectangle=null)}}}set disableUpdate(e){this._disableUpdate=e}set disableRoomEngineUpdate(e){this.isRoomEngineReady&&this._roomEngine.disableUpdate(e)}onRoomInitializedonRoomInitialized(e){if(e)switch(e.type){case ft.INITIALIZED:e.roomId===this._previewRoomId&&this.isRoomEngineReady&&this._roomEngine.updateRoomInstancePlaneType(this._previewRoomId,"110","99999");return}}onRoomObjectAdded(e){if(e.roomId===this._previewRoomId&&e.objectId===q.PREVIEW_OBJECT_ID&&e.category===this._currentPreviewObjectCategory){this._currentPreviewRectangle=null,this._currentPreviewNeedsZoomOut=!1;const t=this._roomEngine.getRoomObject(e.roomId,e.objectId,e.category);if(t&&t.model&&e.category===U.WALL){const i=t.model.getValue(b.FURNITURE_SIZE_Z),n=t.model.getValue(b.FURNITURE_CENTER_Z);(i!==null||n!==null)&&this._roomEngine.updateRoomObjectWallLocation(e.roomId,e.objectId,new M(.5,2.3,(3.6-i)/2+n))}}}updateRoomEngine(){this.isRoomEngineReady&&this._roomEngine.runUpdate()}getRenderingCanvas(){const e=this._roomEngine.getRoomInstanceRenderingCanvas(this._previewRoomId,q.PREVIEW_CANVAS_ID);return e||null}getGenericRoomObjectImage(e,t,i,n,r,a=0,o=null,l=null,u=-1,c=-1,h=null){return this.isRoomEngineReady?this._roomEngine.getGenericRoomObjectImage(e,t,i,n,r,a,o,l,u,c,h):null}getRoomObjectImage(e,t,i,n=0){return this.isRoomEngineReady?this._roomEngine.getRoomObjectImage(this._previewRoomId,q.PREVIEW_OBJECT_ID,this._currentPreviewObjectCategory,e,t,i,n):null}getRoomObjectCurrentImage(){if(this.isRoomEngineReady){const e=this._roomEngine.getRoomObject(this._previewRoomId,q.PREVIEW_OBJECT_ID,this._currentPreviewObjectCategory);if(e&&e.visualization)return e.visualization.getImage(16777215,-1)}return null}getRoomPreviewObject(){if(this.isRoomEngineReady){const e=this._roomEngine.getRoomObject(this._previewRoomId,q.PREVIEW_OBJECT_ID,this._currentPreviewObjectCategory);if(e)return e}return null}getRoomPreviewOwnRoomObject(){if(this.isRoomEngineReady){const e=this._roomEngine.getRoomObject(this._previewRoomId,Z_.ROOM_OBJECT_ID,U.ROOM);if(e)return e}return null}get isRoomEngineReady(){return this._roomEngine&&this._roomEngine.ready}get roomId(){return this._previewRoomId}get backgroundColor(){return this._backgroundColor}set backgroundColor(e){this._backgroundColor=e}get width(){return this._currentPreviewCanvasWidth}get height(){return this._currentPreviewCanvasHeight}};q.SCALE_NORMAL=64,q.SCALE_SMALL=32,q.PREVIEW_COUNTER=0,q.PREVIEW_CANVAS_ID=1,q.PREVIEW_OBJECT_ID=1,q.PREVIEW_OBJECT_LOCATION_X=2,q.PREVIEW_OBJECT_LOCATION_Y=2,q.ALLOWED_IMAGE_CUT=.25,q.AUTOMATIC_STATE_CHANGE_INTERVAL=2500,q.ZOOM_ENABLED=!0;let ck=q;class fk{constructor(e,t){this._image=e,this._placeHolder=t}get image(){return this._image}get placeHolder(){return this._placeHolder}}class aTe{constructor(e){this._code=e,this._parts=[]}get code(){return this._code}get parts(){return this._parts}}const Lt=class Lt{constructor(e,t=0,i=0,n=0){this.type=e,this.key=t,this.color=i,this.position=n}get code(){return this.key===0?null:Lt.getCode(this.type,this.key,this.color,this.position)}static getCode(e,t,i,n){return(e===Lt.BASE?e:t>=100?Lt.SYMBOL_ALT:Lt.SYMBOL)+(t<10?"0":"")+(e===Lt.BASE?t:t>=100?t-100:t)+(i<10?"0":"")+i+n}calculatePosition(e){const t=this.calculateGridPos(this.position);let i=Lt.CELL_WIDTH*t.x+Lt.CELL_WIDTH/2-e.width/2,n=Lt.CELL_HEIGHT*t.y+Lt.CELL_HEIGHT/2-e.height/2;return i<0&&(i=0),i+e.width>Lt.IMAGE_WIDTH&&(i=Lt.IMAGE_WIDTH-e.width),n<0&&(n=0),n+e.height>Lt.IMAGE_HEIGHT&&(n=Lt.IMAGE_HEIGHT-e.height),new Bm(Math.floor(i),Math.floor(n))}calculateGridPos(e){const t=new Bm;return t.x=Math.floor(e%3),t.y=Math.floor(e/3),t}};Lt.BASE="b",Lt.SYMBOL="s",Lt.SYMBOL_ALT="t",Lt.BASE_PART=0,Lt.LAYER_PART=1,Lt.IMAGE_WIDTH=39,Lt.IMAGE_HEIGHT=39,Lt.CELL_WIDTH=13,Lt.CELL_HEIGHT=13;let fd=Lt;const Rn=class Rn{constructor(e,t){this._assets=e,this._sessionDataManager=t,this._groupBases=new Map,this._groupSymbols=new Map,this._groupPartColors=new Map,this._requestedBadges=new Map,this._groupBadgesQueue=new Map,this._readyToGenerateGroupBadges=!1}init(){if(this._sessionDataManager&&this._sessionDataManager.communication){this._messages=[new w4(this.onGroupBadgePartsEvent.bind(this))];for(const e of this._messages)this._sessionDataManager.communication.registerMessageEvent(e)}}dispose(){if(this._messages&&this._messages.length){for(const e of this._messages)this._sessionDataManager.communication.removeMessageEvent(e);this._messages=null}this._sessionDataManager=null}getBadgeImage(e,t=Rn.NORMAL_BADGE,i=!0){let n=this.getBadgeTexture(e,t);return!n&&i&&(n=this.getBadgePlaceholder()),n}getBadgeInfo(e){const t=this.getBadgeTexture(e);return t?new fk(t,!1):new fk(this.getBadgePlaceholder(),!0)}loadBadgeImage(e,t=Rn.NORMAL_BADGE){return this._assets.getTexture(this.getBadgeUrl(e,t))?e:(this.getBadgeTexture(e,t),null)}getBadgeTexture(e,t=Rn.NORMAL_BADGE){const i=this.getBadgeUrl(e,t);if(!i||!i.length)return null;const n=this._assets.getTexture(i);if(n)return n.clone();if(t===Rn.NORMAL_BADGE){if(this._requestedBadges.get(e))return null;this._requestedBadges.set(e,!0),this._assets.downloadAsset(i).then(r=>{if(!r)return;this._requestedBadges.delete(e);const a=this._assets.getTexture(i);a&&this._sessionDataManager&&this._sessionDataManager.events.dispatchEvent(new Xc(e,a.clone()))}).catch(r=>{})}else if(t===Rn.GROUP_BADGE){if(this._groupBadgesQueue.get(e))return;this._groupBadgesQueue.set(e,!0),this._readyToGenerateGroupBadges&&this.loadGroupBadge(e)}return null}getBadgePlaceholder(){const e=Te.getValue("images.url")+"/loading_icon.png",t=this._assets.getTexture(e);return t?t.clone():null}getBadgeUrl(e,t=Rn.NORMAL_BADGE){let i=null;switch(t){case Rn.NORMAL_BADGE:i=Te.getValue("badge.asset.url").replace("%badgename%",e);break;case Rn.GROUP_BADGE:i=e;break}return i}loadGroupBadge(e){const t=new aTe(e),i=[...e.matchAll(/[b|s][0-9]{4,6}/g)];for(const n of i){const r=n[0],a=r.length===6,o=r[0],l=parseInt(r.slice(1,a?3:4)),u=parseInt(r.slice(a?3:4,a?5:6)),c=r.length<6?0:parseInt(r.slice(a?5:6,a?6:7)),h=new fd(o,l,u,c);t.parts.push(h)}this.renderGroupBadge(t)}renderGroupBadge(e){const t=new Qn,i=new kt(u4.EMPTY);i.width=fd.IMAGE_WIDTH,i.height=fd.IMAGE_HEIGHT,t.addChild(i);for(const r of e.parts){let a=!0;const o=r.type==="b"?this._groupBases.get(r.key):this._groupSymbols.get(r.key);if(o)for(const l of o){if(!l||!l.length)continue;const u=this._assets.getTexture(`badgepart_${l}`);if(!u)continue;const{x:c,y:h}=r.calculatePosition(u),f=new kt(u);f.position.set(c,h),a&&(f.tint=parseInt(this._groupPartColors.get(r.color),16)),a=!1,t.addChild(f)}}this._requestedBadges.delete(e.code),this._groupBadgesQueue.delete(e.code);const n=St.generateTexture(t);this._assets.setTexture(e.code,n),this._sessionDataManager&&this._sessionDataManager.events.dispatchEvent(new Xc(e.code,n))}onGroupBadgePartsEvent(e){if(!e)return;const t=e.getParser();if(t){t.bases.forEach((i,n)=>this._groupBases.set(n,i.map(r=>r.replace(".png","").replace(".gif","")))),t.symbols.forEach((i,n)=>this._groupSymbols.set(n,i.map(r=>r.replace(".png","").replace(".gif","")))),this._groupPartColors=t.partColors,this._readyToGenerateGroupBadges=!0;for(const i of this._groupBadgesQueue.keys())this.loadGroupBadge(i)}}get disposed(){return!!this._sessionDataManager}};Rn.GROUP_BADGE="group_badge",Rn.NORMAL_BADGE="normal_badge";let Dh=Rn;class dk{constructor(e,t,i,n,r,a,o,l,u,c,h,f,d,_,g,p,m,v,E,y,T,w,C,N,P,k,L,j,z){this._type=e,this._id=t,this._fullName=i,this._className=n,this._category=r,this._revision=l,this._tileSizeX=u,this._tileSizeY=c,this._tileSizeZ=h,this._colors=f,this._hasIndexedColor=d,this._colourIndex=_,this._localizedName=a,this._description=o,this._adUrl=g,this._purchaseOfferId=p,this._purchaseCouldBeUsedForBuyout=m,this._rentOfferId=v,this._rentCouldBeUsedForBuyout=E,this._customParams=T,this._specialType=w,this._availableForBuildersClub=y,this._canStandOn=C,this._canSitOn=N,this._canLayOn=P,this._excludedFromDynamic=k,this._furniLine=L,this._environment=j,this._rare=z}get type(){return this._type}get id(){return this._id}get className(){return this._className}set className(e){this._className=e}get fullName(){return this._fullName}get category(){return this._category}get hasIndexedColor(){return this._hasIndexedColor}get colorIndex(){return this._colourIndex}get revision(){return this._revision}get tileSizeX(){return this._tileSizeX}get tileSizeY(){return this._tileSizeY}get tileSizeZ(){return this._tileSizeZ}get colors(){return this._colors}get name(){return this._localizedName}get description(){return this._description}get adUrl(){return this._adUrl}get purchaseOfferId(){return this._purchaseOfferId}get customParams(){return this._customParams}get specialType(){return this._specialType}get rentOfferId(){return this._rentOfferId}get purchaseCouldBeUsedForBuyout(){return this._purchaseCouldBeUsedForBuyout}get rentCouldBeUsedForBuyout(){return this._rentCouldBeUsedForBuyout}get availableForBuildersClub(){return this._availableForBuildersClub}get canStandOn(){return this._canStandOn}get canSitOn(){return this._canSitOn}get canLayOn(){return this._canLayOn}get isExternalImage(){return this._className.indexOf("external_image")!==-1}get excludeDynamic(){return this._excludedFromDynamic}get furniLine(){return this._furniLine}get environment(){return this._environment}get rare(){return this._rare}}const yc=class yc extends fn{constructor(e,t,i){super(),this._floorItems=e,this._wallItems=t,this._localization=i}loadFurnitureData(e){e&&fetch(e).then(t=>t.json()).then(t=>this.onFurnitureDataLoaded(t)).catch(t=>this.onFurnitureDataError(t))}onFurnitureDataLoaded(e){e&&((typeof e.roomitemtypes>"u"||typeof e.wallitemtypes>"u")&&le.warn("Could not find `roomitemtypes` or `wallitemtypes` in furnidata."),e.roomitemtypes&&this.parseFloorItems(e.roomitemtypes),e.wallitemtypes&&this.parseWallItems(e.wallitemtypes),this.dispatchEvent(new Ye(yc.FURNITURE_DATA_READY)))}onFurnitureDataError(e){e&&(le.error(e),this.dispatchEvent(new Ye(yc.FURNITURE_DATA_ERROR)))}parseFloorItems(e){if(!(!e||!e.furnitype))for(const t of e.furnitype){if(!t)continue;const i=[];if(t.partcolors)for(const u of t.partcolors.color){let c=u;c.charAt(0)==="#"&&(c=c.replace("#","")),i.push(parseInt(c,16))}const n=t.classname.split("*"),r=n[0],a=n.length>1?parseInt(n[1]):0,o=n.length>1,l=new dk(du.FLOOR,t.id,t.classname,r,t.category,t.name,t.description,t.revision,t.xdim,t.ydim,0,i,o,a,t.adurl,t.offerid,t.buyout,t.rentofferid,t.rentbuyout,t.bc,t.customparams,t.specialtype,t.canstandon,t.cansiton,t.canlayon,t.excludeddynamic,t.furniline,t.environment,t.rare);this._floorItems.set(l.id,l),this.updateLocalizations(l)}}parseWallItems(e){if(!(!e||!e.furnitype))for(const t of e.furnitype){if(!t)continue;const i=new dk(du.WALL,t.id,t.classname,t.classname,t.category,t.name,t.description,t.revision,0,0,0,null,!1,0,t.adurl,t.offerid,t.buyout,t.rentofferid,t.rentbuyout,t.bc,null,t.specialtype,!1,!1,!1,t.excludeddynamic,t.furniline,t.environment,t.rare);this._wallItems.set(i.id,i),this.updateLocalizations(i)}}updateLocalizations(e){if(this._localization)switch(e.type){case du.FLOOR:this._localization.setValue("roomItem.name."+e.id,e.name),this._localization.setValue("roomItem.desc."+e.id,e.description);return;case du.WALL:this._localization.setValue("wallItem.name."+e.id,e.name),this._localization.setValue("wallItem.desc."+e.id,e.description);return}}};yc.FURNITURE_DATA_READY="FDP_FURNITURE_DATA_READY",yc.FURNITURE_DATA_ERROR="FDP_FURNITURE_DATA_ERROR";let dd=yc;class oTe{constructor(e){this._sessionDataManager=e,this._groupBadges=new Map}init(){if(this._sessionDataManager&&this._sessionDataManager.communication){this._messages=[new Zc(this.onRoomReadyMessageEvent.bind(this)),new vF(this.onGroupBadgesEvent.bind(this))];for(const e of this._messages)this._sessionDataManager.communication.registerMessageEvent(e)}}dispose(){if(!this.disposed){if(this._messages&&this._messages.length){for(const e of this._messages)this._sessionDataManager.communication.removeMessageEvent(e);this._messages=null}this._groupBadges=null,this._sessionDataManager=null}}onRoomReadyMessageEvent(e){this._sessionDataManager.send(new K6)}onGroupBadgesEvent(e){const t=e.getParser();for(const[i,n]of t.badges.entries())this._groupBadges.set(i,n)}getGroupBadge(e){return this._groupBadges.get(e)}get disposed(){return!!this._sessionDataManager}}const l_=class l_{};l_.NO_CLUB=0,l_.CLUB=1,l_.VIP=2;let _k=l_;class rr extends Bs{constructor(e,t){super(),this._connection=e,this._listener=t,this._roomId=0}onDispose(){this._connection=null,this._listener=null}setRoomId(e){this._roomId=e}get connection(){return this._connection}get listener(){return this._listener}get roomId(){return this._roomId}}class lTe extends rr{constructor(e,t){super(e,t),e.addMessageEvent(new MS(this.onRoomGenericError.bind(this)))}onRoomGenericError(e){if(!(e instanceof MS))return;const t=e.getParser();if(!t)return;const i=this.listener.getSession(this.roomId);if(!i)return;let n=null;switch(t.errorCode){case gR.KICKED_OUT_OF_ROOM:n=Ui.RSEME_KICKED;break;default:return}!n||n.length==0||this.listener.events.dispatchEvent(new Ui(n,i))}}class uTe extends rr{constructor(e,t){super(e,t),e.addMessageEvent(new B4(this.onOpenPetPackageRequested.bind(this))),e.addMessageEvent(new G4(this.onOpenPetPackageResult.bind(this)))}onOpenPetPackageRequested(e){if(!this.listener)return;const t=e.getParser();if(!t)return;const i=this.listener.getSession(this.roomId);i&&this.listener.events.dispatchEvent(new Nh(Nh.RSOPPE_OPEN_PET_PACKAGE_REQUESTED,i,t.objectId,t.figureData,0,null))}onOpenPetPackageResult(e){if(!this.listener)return;const t=e.getParser();if(!t)return;const i=this.listener.getSession(this.roomId);i&&this.listener.events.dispatchEvent(new Nh(Nh.RSOPPE_OPEN_PET_PACKAGE_RESULT,i,t.objectId,null,t.nameValidationStatus,t.nameValidationInfo))}}class hTe extends rr{constructor(e,t){super(e,t),e.addMessageEvent(new z4(this.onPollContentsEvent.bind(this))),e.addMessageEvent(new W4(this.onPollOfferEvent.bind(this))),e.addMessageEvent(new H4(this.onPollErrorEvent.bind(this))),e.addMessageEvent(new q4(this.onStartRoomPollEvent.bind(this)))}onPollContentsEvent(e){if(!this.listener)return;const t=this.listener.getSession(this.roomId);if(!t)return;const i=e.getParser();if(!i)return;const n=new so(so.CONTENT,t,i.id);n.startMessage=i.startMessage,n.endMessage=i.endMessage,n.numQuestions=i.numQuestions,n.questionArray=i.questionArray,n.npsPoll=i.npsPoll,this.listener.events.dispatchEvent(n)}onPollOfferEvent(e){if(!this.listener)return;const t=this.listener.getSession(this.roomId);if(!t)return;const i=e.getParser();if(!i)return;const n=new so(so.OFFER,t,i.id);n.summary=i.headline,n.summary=i.summary,this.listener.events.dispatchEvent(n)}onPollErrorEvent(e){if(!this.listener)return;const t=this.listener.getSession(this.roomId);if(!t||!e.getParser())return;const n=new so(so.ERROR,t,-1);n.headline="???",n.summary="???",this.listener.events.dispatchEvent(n)}onStartRoomPollEvent(e){if(!this.listener)return;const t=this.listener.getSession(this.roomId);if(!t)return;const i=e.getParser();if(!i)return;const n=new iv(iv.VOTE_QUESTION,t,i.question,i.choices);this.listener.events.dispatchEvent(n)}}class cTe extends rr{constructor(e,t){super(e,t),e.addMessageEvent(new Lw(this.onRoomUnitChatEvent.bind(this))),e.addMessageEvent(new yv(this.onRoomUnitChatEvent.bind(this))),e.addMessageEvent(new Tv(this.onRoomUnitChatEvent.bind(this))),e.addMessageEvent(new aF(this.onRoomUnitHandItemReceivedEvent.bind(this))),e.addMessageEvent(new RF(this.onRespectReceivedEvent.bind(this))),e.addMessageEvent(new TF(this.onPetRespectNoficationEvent.bind(this))),e.addMessageEvent(new IF(this.onPetSupplementedNotificationEvent.bind(this))),e.addMessageEvent(new nF(this.onFloodControlEvent.bind(this))),e.addMessageEvent(new rF(this.onRemainingMuteEvent.bind(this)))}onRoomUnitChatEvent(e){if(!this.listener)return;const t=this.listener.getSession(this.roomId);if(!t)return;const i=e.getParser();if(!i)return;let n=yt.CHAT_TYPE_SPEAK;e instanceof yv?n=yt.CHAT_TYPE_SHOUT:e instanceof Tv&&(n=yt.CHAT_TYPE_WHISPER);const r=new yt(yt.CHAT_EVENT,t,i.roomIndex,i.message,n,i.bubble,i.chatColours);this.listener.events.dispatchEvent(r)}onRoomUnitHandItemReceivedEvent(e){if(!this.listener)return;const t=this.listener.getSession(this.roomId);if(!t)return;const i=e.getParser();i&&this.listener.events.dispatchEvent(new yt(yt.CHAT_EVENT,t,i.giverUserId,"",yt.CHAT_TYPE_HAND_ITEM_RECEIVED,xl.GENERIC,null,i.handItemType))}onRespectReceivedEvent(e){if(!this.listener)return;const t=this.listener.getSession(this.roomId);if(!t)return;const i=e.getParser();if(!i)return;const n=t.userDataManager.getUserData(i.userId);n&&this.listener.events.dispatchEvent(new yt(yt.CHAT_EVENT,t,n.roomIndex,"",yt.CHAT_TYPE_RESPECT,xl.GENERIC))}onPetRespectNoficationEvent(e){if(!this.listener)return;const t=this.listener.getSession(this.roomId);if(!t)return;const i=e.getParser();if(!i)return;const n=t.userDataManager.getPetData(i.petData.id);if(!n)return;let r=yt.CHAT_TYPE_PETRESPECT;i.isTreat&&(r=yt.CHAT_TYPE_PETTREAT),this.listener.events.dispatchEvent(new yt(yt.CHAT_EVENT,t,n.roomIndex,"",r,xl.GENERIC))}onPetSupplementedNotificationEvent(e){if(!this.listener)return;const t=this.listener.getSession(this.roomId);if(!t)return;const i=e.getParser();if(!i)return;const n=t.userDataManager.getPetData(i.petId);if(!n)return;let r=-1;const a=t.userDataManager.getUserData(i.userId);a&&(r=a.roomIndex);let o=yt.CHAT_TYPE_PETREVIVE;switch(i.supplementType){case cd.REVIVE:o=yt.CHAT_TYPE_PETREVIVE;break;case cd.REBREED_FERTILIZER:o=yt.CHAT_TYPE_PET_REBREED_FERTILIZE;break;case cd.SPEED_FERTILIZER:o=yt.CHAT_TYPE_PET_SPEED_FERTILIZE;break}this.listener.events.dispatchEvent(new yt(yt.CHAT_EVENT,t,n.roomIndex,"",o,xl.GENERIC,null,r))}onFloodControlEvent(e){if(!this.listener)return;const t=this.listener.getSession(this.roomId);if(!t)return;const i=e.getParser();if(!i)return;const n=i.seconds;this.listener.events.dispatchEvent(new yt(yt.FLOOD_EVENT,t,-1,n.toString(),0,0))}onRemainingMuteEvent(e){if(!this.listener)return;const t=this.listener.getSession(this.roomId);if(!t)return;const i=e.getParser();i&&this.listener.events.dispatchEvent(new yt(yt.CHAT_EVENT,t,t.ownRoomIndex,"",yt.CHAT_TYPE_MUTE_REMAINING,xl.GENERIC,null,i.seconds))}}class fTe extends rr{constructor(e,t){super(e,t),e.addMessageEvent(new PS(this.onGetGuestRoomResultEvent.bind(this)))}onGetGuestRoomResultEvent(e){if(!(e instanceof PS))return;const t=e.getParser();if(!t||t.roomForward)return;const i=this.listener.getSession(this.roomId);if(!i)return;const n=t.data;i.tradeMode=n.tradeMode,i.isGuildRoom=n.habboGroupId!==0,i.doorMode=n.doorMode,i.allowPets=n.allowPets,i.moderationSettings=t.moderation,this.listener.events.dispatchEvent(new ev(ev.RSDUE_ALLOW_PETS,i)),this.listener.events.dispatchEvent(new Ae(Ae.ROOM_DATA,i))}}class dTe extends rr{constructor(e,t){super(e,t),e.addMessageEvent(new Q4(this.onRoomDimmerPresets.bind(this)))}onRoomDimmerPresets(e){if(!e)return;const t=e.getParser();if(!t)return;const i=this.listener.getSession(this.roomId);if(!i)return;const n=new Zm(Zm.ROOM_DIMMER_PRESETS,i);n.selectedPresetId=t.selectedPresetId;let r=0;for(;r=0&&this._ignoredUsers.splice(t,1)}ignoreUserId(e){this._sessionDataManager.send(new H6(e))}ignoreUser(e){this._sessionDataManager.send(new z6(e))}unignoreUser(e){this._sessionDataManager.send(new W6(e))}isIgnored(e){return this._ignoredUsers.indexOf(e)>=0}get disposed(){return!!this._sessionDataManager}}class TTe{constructor(e,t,i){this._type=e,this._name=t,this._description=i}get type(){return this._type}get name(){return this._name}get description(){return this._description}}const Tc=class Tc extends fn{constructor(e){super(),this._products=e}dispose(){this._products=null}loadProductData(e){e&&fetch(e).then(t=>t.json()).then(t=>this.onProductDataLoadedEvent(t)).catch(t=>this.onProductDataError(t))}onProductDataLoadedEvent(e){e&&(this.parseProducts(e.productdata),this.dispatchEvent(new Ye(Tc.PDP_PRODUCT_DATA_READY)))}onProductDataError(e){e&&this.dispatchEvent(new Ye(Tc.PDP_PRODUCT_DATA_FAILED))}parseProducts(e){if(e)for(const t of e.product)t&&this._products.set(t.code,new TTe(t.code,t.name,t.description))}};Tc.PDP_PRODUCT_DATA_READY="PDP_PRODUCT_DATA_READY",Tc.PDP_PRODUCT_DATA_FAILED="PDP_PRODUCT_DATA_FAILED";let _d=Tc;const Ar=class Ar extends Bs{constructor(){super(),this._connection=null,this._userDataByType=new Map,this._userDataByRoomIndex=new Map,this._userBadges=new Map}onDispose(){this._connection=null}setConnection(e){this._connection=e}getUserData(e){return this.getDataByType(e,Ar.TYPE_USER)}getPetData(e){return this.getDataByType(e,Ar.TYPE_PET)}getBotData(e){return this.getDataByType(e,Ar.TYPE_BOT)}getRentableBotData(e){return this.getDataByType(e,Ar.TYPE_RENTABLE_BOT)}getDataByType(e,t){const i=this._userDataByType.get(t);if(!i)return null;const n=i.get(e);return n||null}getUserDataByIndex(e){const t=this._userDataByRoomIndex.get(e);return t||null}getUserDataByName(e){for(const t of this._userDataByRoomIndex.values())if(!(!t||t.name!==e))return t;return null}updateUserData(e){if(!e)return;this.removeUserData(e.roomIndex);let t=this._userDataByType.get(e.type);t||(t=new Map,this._userDataByType.set(e.type,t)),t.set(e.webID,e),this._userDataByRoomIndex.set(e.roomIndex,e)}removeUserData(e){const t=this.getUserDataByIndex(e);if(!t)return;this._userDataByRoomIndex.delete(e);const i=this._userDataByType.get(t.type);i&&i.delete(t.webID)}getUserBadges(e){this._connection&&this._connection.send(new Y6(e));const t=this._userBadges.get(e);return t||[]}setUserBadges(e,t){this._userBadges.set(e,t)}updateFigure(e,t,i,n,r){const a=this.getUserDataByIndex(e);a&&(a.figure=t,a.sex=i,a.hasSaddle=n,a.isRiding=r)}updateName(e,t){const i=this.getUserDataByIndex(e);i&&(i.name=t)}updateMotto(e,t){const i=this.getUserDataByIndex(e);i&&(i.custom=t)}updateBackground(e,t,i,n){const r=this.getUserDataByIndex(e);r&&(r.background=t,r.stand=i,r.overlay=n)}updateAchievementScore(e,t){const i=this.getUserDataByIndex(e);i&&(i.activityPoints=t)}updatePetLevel(e,t){const i=this.getUserDataByIndex(e);i&&(i.petLevel=t)}updatePetBreedingStatus(e,t,i,n,r){const a=this.getUserDataByIndex(e);a&&(a.canBreed=t,a.canHarvest=i,a.canRevive=n,a.hasBreedingPermission=r)}requestPetInfo(e){!this._connection||!this.getPetData(e)||this._connection.send(new xF(e))}get connection(){return this._connection}};Ar.TYPE_USER=1,Ar.TYPE_PET=2,Ar.TYPE_BOT=3,Ar.TYPE_RENTABLE_BOT=4;let IA=Ar;class ITe extends Bs{constructor(){super(),this._connection=null,this._userData=new IA,this._roomId=0,this._password=null,this._state=Ae.CREATED,this._tradeMode=pR.NO_TRADING,this._doorMode=0,this._controllerLevel=Sa.NONE,this._ownRoomIndex=-1,this._isGuildRoom=!1,this._isRoomOwner=!1,this._isDecorating=!1,this._isSpectator=!1,this._moderationSettings=null}onDispose(){this._userData&&(this._userData.dispose(),this._userData=null),this._connection=null}setConnection(e){this._connection||!e||(this._connection=e,this._userData&&this._userData.setConnection(e))}setControllerLevel(e){if(e>=Sa.NONE&&e<=Sa.MODERATOR){this._controllerLevel=e;return}this._controllerLevel=Sa.NONE}setOwnRoomIndex(e){this._ownRoomIndex=e}setRoomOwner(){this._isRoomOwner=!0}start(){return this._state!==Ae.CREATED||!this._connection?!1:(this._state=Ae.STARTED,this.enterRoom())}enterRoom(){return this._connection?(this._connection.send(new jF(this._roomId,this._password)),!0):!1}reset(e){e!==this._roomId&&(this._roomId=e)}sendChatMessage(e,t,i){this._connection.send(new Gw(e,t,i))}sendShoutMessage(e,t,i){this._connection.send(new A6(e,t,i))}sendWhisperMessage(e,t,i){this._connection.send(new O6(e,t,i))}sendChatTypingMessage(e){e?this._connection.send(new w6):this._connection.send(new C6)}sendMottoMessage(e){this._connection.send(new X6(e))}sendBackgroundMessage(e,t,i){this._connection.send(new N6(e,t,i))}sendDanceMessage(e){this._connection.send(new P6(e))}sendExpressionMessage(e){this._connection.send(new M6(e))}sendSignMessage(e){e<0||e>17||this._connection.send(new D6(e))}sendPostureMessage(e){this._connection.send(new x6(e))}sendDoorbellApprovalMessage(e,t){this._connection.send(new VF(e,t))}sendAmbassadorAlertMessage(e){this._connection.send(new zF(e))}sendWhisperGroupMessage(e){this._connection.send(new ChatWhisperGroupComposer(e))}sendKickMessage(e){this._connection.send(new YF(e))}sendMuteMessage(e,t){this._connection.send(new XF(e,t,this._roomId))}sendBanMessage(e,t){this._connection.send(new HF(e,this._roomId,t))}sendGiveRightsMessage(e){this._connection.send(new WF(e))}sendTakeRightsMessage(e){this._connection.send(new KF(e))}sendPollStartMessage(e){this._connection.send(new GF(e))}sendPollRejectMessage(e){this._connection.send(new BF(e))}sendPollAnswerMessage(e,t,i){this._connection.send(new FF(e,t,i))}sendPeerUsersClassificationMessage(e){this._connection.send(new $6(e))}sendOpenPetPackageMessage(e,t){this._connection.send(new T6(e,t))}sendRoomUsersClassificationMessage(e){this._connection.send(new Q6(e))}updateMoodlightData(e,t,i,n,r){let a="000000"+i.toString(16).toUpperCase();a="#"+a.substring(a.length-6),this.connection.send(new l6(e,t,a,n,r))}toggleMoodlightState(){this.connection.send(new u6)}pickupPet(e){this._connection&&this._connection.send(new i6(e))}pickupBot(e){this._connection&&this._connection.send(new $F(e))}requestMoodlightSettings(){this._connection&&this._connection.send(new o6)}openGift(e){this._connection.send(new I6(e))}mountPet(e){this._connection.send(new Ib(e,!0))}dismountPet(e){this._connection.send(new Ib(e,!1))}usePetProduct(e,t){this._connection.send(new UF(e,t))}removePetSaddle(e){this._connection.send(new kF(e))}togglePetBreeding(e){this._connection.send(new DF(e))}togglePetRiding(e){this._connection.send(new LF(e))}useMultistateItem(e){this._connection.send(new Bw(e))}harvestPet(e){this._connection.send(new e6(e))}compostPlant(e){this._connection.send(new ZF(e))}requestPetCommands(e){this._connection.send(new NF(e))}sendScriptProceed(){this._connection.send(new MF)}sendUpdateClothingChangeFurniture(e,t,i){this._connection.send(new n6(e,t,i))}changeQueue(e){this._connection.send(new S6(e))}votePoll(e){this._connection.send(new VotePollCounterMessageComposer(e))}get connection(){return this._connection}get userDataManager(){return this._userData}get roomId(){return this._roomId}set roomId(e){this._roomId=e}get password(){return this._password}set password(e){this._password=e}get state(){return this._state}get isPrivateRoom(){return!0}get tradeMode(){return this._tradeMode}set tradeMode(e){this._tradeMode=e}get doorMode(){return this._doorMode}set doorMode(e){this._doorMode=e}get allowPets(){return this._allowPets}set allowPets(e){this._allowPets=e}get controllerLevel(){return this._controllerLevel}get ownRoomIndex(){return this._ownRoomIndex}get isGuildRoom(){return this._isGuildRoom}set isGuildRoom(e){this._isGuildRoom=e}get isRoomOwner(){return this._isRoomOwner}get isDecorating(){return this._isDecorating}set isDecorating(e){this._isDecorating=e}get isSpectator(){return this._isSpectator}set isSpectator(e){this._isSpectator=e}get moderationSettings(){return this._moderationSettings}set moderationSettings(e){this._moderationSettings=e}}class RTe extends Yr{constructor(e,t){super(),this._communication=e,this._roomEngine=t,this._handlers=[],this._sessions=new Map,this._pendingSession=null,this._sessionStarting=!1,this._viewerSession=null,this.onRoomEngineEvent=this.onRoomEngineEvent.bind(this)}onInit(){this.createHandlers(),this.processPendingSession(),this._roomEngine.events.addEventListener(ft.ENGINE_INITIALIZED,this.onRoomEngineEvent)}onDispose(){this._roomEngine.events.removeEventListener(ft.ENGINE_INITIALIZED,this.onRoomEngineEvent),super.onDispose()}createHandlers(){const e=this._communication&&this._communication.connection;e&&this._handlers.push(new cTe(e,this),new fTe(e,this),new dTe(e,this),new _Te(e,this),new Lh(e,this),new vTe(e,this),new gTe(e,this),new lTe(e,this),new ETe(e,this),new hTe(e,this),new uTe(e,this))}setHandlers(e){if(!(!this._handlers||!this._handlers.length))for(const t of this._handlers)t&&t.setRoomId(e.roomId)}onRoomEngineEvent(e){this.processPendingSession()}processPendingSession(){!this._pendingSession||!this._roomEngine.ready||(this.addSession(this._pendingSession),this._pendingSession=null)}getSession(e){const t=this._sessions.get(this.getRoomId(e));return t||null}createSession(e,t=null){const i=new ITe;return i.roomId=e,i.password=t,this.addSession(i)}addSession(e){return this._roomEngine.ready?(this._sessionStarting=!0,this._sessions.get(this.getRoomId(e.roomId))&&this.removeSession(e.roomId,!1),e.setConnection(this._communication.connection),this._sessions.set(this.getRoomId(e.roomId),e),this.events.dispatchEvent(new Ae(Ae.CREATED,e)),this._viewerSession=e,this.startSession(this._viewerSession),!0):(this._pendingSession=e,!1)}startSession(e){return e.state===Ae.STARTED?!1:(this._sessionStarting=!1,e.start()?(this.events.dispatchEvent(new Ae(Ae.STARTED,e)),this.setHandlers(e),!0):(this.removeSession(e.roomId),!1))}removeSession(e,t=!0){const i=this.getSession(e);i&&(this._sessions.delete(this.getRoomId(e)),this.events.dispatchEvent(new Ae(Ae.ENDED,i,t)),i.dispose())}sessionUpdate(e,t){if(this.getSession(e))switch(t){case Lh.RS_CONNECTED:return;case Lh.RS_READY:return;case Lh.RS_DISCONNECTED:this.removeSession(e);return}}sessionReinitialize(e,t){const i=this.getSession(e);i&&(this._sessions.delete(this.getRoomId(e)),i.reset(t),this._sessions.set(this.getRoomId(t),i),this.setHandlers(i))}getRoomId(e){return"hard_coded_room_id"}get communication(){return this._communication}get roomEngine(){return this._roomEngine}get viewerSession(){return this._viewerSession}}const Ic=class Ic{static logEventLog(e){try{He.available&&He.call("logEventLog",e)}catch{le.log("External interface not working, failed to log event log.")}}static openPage(e){try{He.available&&He.call("openPage",e)}catch{le.log("Failed to open web page",e)}}static openWebPage(e){window.open(e)}static sendHeartBeat(){try{He.available&&He.call("heartBeat")}catch{le.log("Failed to send heartbeat")}}static openWebPageAndMinimizeClient(e){try{He.available&&Ic.openPage(e)}catch{le.log("Failed to open web page",e)}}static closeWebPageAndRestoreClient(){try{He.available&&He.call("closeWebPageAndRestoreClient")}catch{le.log("Failed to close web page and restore client!")}}static openHabblet(e,t=null){try{He.available&&He.call("openHabblet",e,t)}catch{le.log("Failed to open Habblet",e)}}static closeHabblet(e,t=null){try{He.available&&He.call("closeHabblet",e,t)}catch{le.log("Failed to close Habblet",e)}}static send(e,t){try{He.available&&He.call("disconnect",e,t)}catch{le.log("Failed to close send ")}}static showGame(e){try{He.available&&He.callGame("showGame",e)}catch(t){le.log("Failed to open game",t)}}static hideGame(){try{He.available&&He.callGame("hideGame")}catch{le.log("Failed to hide game")}}static open(e){try{He.available&&He.call("openExternalLink",escape(e))}catch{le.log("External interface not working. Could not request to open: "+e)}}static roomVisited(e){try{He.available&&He.call("roomVisited",e)}catch{le.log("External interface not working. Could not store last room visit.")}}static openMinimail(e){try{He.available&&He.call("openMinimail",e)}catch{le.log("External interface not working. Could not open minimail.")}}static openNews(){try{He.available&&He.call("openNews")}catch{le.log("External interface not working. Could not open news.")}}static closeNews(){try{He.available&&He.call("closeNews")}catch{le.log("External interface not working. Could not close news.")}}static openAvatars(){try{He.available&&He.call("openAvatars")}catch{le.log("External interface not working. Could not open avatars.")}}static openRoomEnterAd(){try{He.available&&He.call("openRoomEnterAd")}catch{le.log("External interface not working. Could not open roomenterad.")}}static updateFigure(e){try{He.available&&He.call("updateFigure",e)}catch{le.log("External interface not working. Could not update figure.")}}};Ic.ADVERTISEMENT="advertisement",Ic.OPENLINK="openlink",Ic.OPENROOM="openroom";let Jc=Ic;class STe extends Yr{constructor(e){super(),this._communication=e,this.resetUserInfo(),this._ignoredUsersManager=new yTe(this),this._groupInformationManager=new oTe(this),this._clubLevel=0,this._securityLevel=0,this._isAmbassador=!1,this._noobnessLevel=-1,this._isEmailVerified=!1,this._systemOpen=!1,this._systemShutdown=!1,this._isAuthenticHabbo=!1,this._isRoomCameraFollowDisabled=!1,this._uiFlags=0,this._floorItems=new Map,this._wallItems=new Map,this._products=new Map,this._furnitureData=null,this._furnitureReady=!1,this._productsReady=!1,this._furnitureListenersNotified=!1,this._pendingFurnitureListeners=[],this._pendingProductListeners=[],this._tags=[],this._badgeImageManager=null,this.onFurnitureDataReadyEvent=this.onFurnitureDataReadyEvent.bind(this),this.onProductDataReadyEvent=this.onProductDataReadyEvent.bind(this),this.onNitroSettingsEvent=this.onNitroSettingsEvent.bind(this)}onInit(){this.loadFurnitureData(),this.loadProductData(),this.loadBadgeImageManager(),this._ignoredUsersManager&&this._ignoredUsersManager.init(),this._groupInformationManager&&this._groupInformationManager.init(),this._communication.registerMessageEvent(new S4(this.onUserFigureEvent.bind(this))),this._communication.registerMessageEvent(new Av(this.onUserInfoEvent.bind(this))),this._communication.registerMessageEvent(new dF(this.onUserPermissionsEvent.bind(this))),this._communication.registerMessageEvent(new R4(this.onAvailabilityStatusMessageEvent.bind(this))),this._communication.registerMessageEvent(new j4(this.onPetRespectFailed.bind(this))),this._communication.registerMessageEvent(new X_(this.onChangeNameUpdateEvent.bind(this))),this._communication.registerMessageEvent(new Uw(this.onUserNameChangeMessageEvent.bind(this))),this._communication.registerMessageEvent(new pF(this.onUserTags.bind(this))),this._communication.registerMessageEvent(new Zc(this.onRoomModelNameEvent.bind(this))),this._communication.registerMessageEvent(new yF(this.onInClientLinkEvent.bind(this))),this._communication.registerMessageEvent(new D4(this.onMysteryBoxKeysEvent.bind(this))),this._communication.registerMessageEvent(new C4(this.onNoobnessLevelMessageEvent.bind(this))),this._communication.registerMessageEvent(new _F(this.onAccountSafetyLockStatusChangeMessageEvent.bind(this))),this._communication.registerMessageEvent(new mF(this.onEmailStatus.bind(this))),ce.instance.events.addEventListener(Su.SETTINGS_UPDATED,this.onNitroSettingsEvent)}onDispose(){this.destroyFurnitureData(),this._ignoredUsersManager&&(this._ignoredUsersManager.dispose(),this._ignoredUsersManager=null),this._groupInformationManager&&(this._groupInformationManager.dispose(),this._groupInformationManager=null),ce.instance.events.removeEventListener(Su.SETTINGS_UPDATED,this.onNitroSettingsEvent),super.onDispose()}resetUserInfo(){this._userId=0,this._name=null,this._figure=null,this._gender=null,this._realName=null,this._canChangeName=!1,this._safetyLocked=!1}loadFurnitureData(){this.destroyFurnitureData(),this._furnitureData=new dd(this._floorItems,this._wallItems,ce.instance.localization),this._furnitureData.addEventListener(dd.FURNITURE_DATA_READY,this.onFurnitureDataReadyEvent),this._furnitureData.loadFurnitureData(Te.getValue("furnidata.url"))}loadProductData(){this.destroyProductData(),this._productData=new _d(this._products),this._productData.addEventListener(_d.PDP_PRODUCT_DATA_READY,this.onProductDataReadyEvent),this._productData.loadProductData(Te.getValue("productdata.url"))}loadBadgeImageManager(){this._badgeImageManager||(this._badgeImageManager=new Dh(wn(),this),this._badgeImageManager.init())}hasProductData(e){return this._productsReady?!0:(e&&this._pendingProductListeners.indexOf(e)===-1&&this._pendingProductListeners.push(e),!1)}getAllFurnitureData(e){if(!this._furnitureReady)return this._pendingFurnitureListeners.indexOf(e)===-1&&this._pendingFurnitureListeners.push(e),null;const t=[];for(const i of this._floorItems.values())i&&t.push(i);for(const i of this._wallItems.values())i&&t.push(i);return t}removePendingFurniDataListener(e){if(!this._pendingFurnitureListeners)return;const t=this._pendingFurnitureListeners.indexOf(e);t!==-1&&this._pendingFurnitureListeners.splice(t,1)}onUserFigureEvent(e){!e||!e.connection||(this._figure=e.getParser().figure,this._gender=e.getParser().gender,Jc.updateFigure(this._figure))}onUserInfoEvent(e){if(!e||!e.connection)return;this.resetUserInfo();const t=e.getParser().userInfo;t&&(this._userId=t.userId,this._name=t.username,this._figure=t.figure,this._gender=t.gender,this._realName=t.realName,this._respectsReceived=t.respectsReceived,this._respectsLeft=t.respectsRemaining,this._respectsPetLeft=t.respectsPetRemaining,this._canChangeName=t.canChangeName,this._safetyLocked=t.safetyLocked,this._ignoredUsersManager&&this._ignoredUsersManager.requestIgnoredUsers())}onUserPermissionsEvent(e){!e||!e.connection||(this._clubLevel=e.getParser().clubLevel,this._securityLevel=e.getParser().securityLevel,this._isAmbassador=e.getParser().isAmbassador)}onAvailabilityStatusMessageEvent(e){if(!e||!e.connection)return;const t=e.getParser();t&&(this._systemOpen=t.isOpen,this._systemShutdown=t.onShutdown,this._isAuthenticHabbo=t.isAuthenticUser)}onPetRespectFailed(e){!e||!e.connection||this._respectsPetLeft++}onChangeNameUpdateEvent(e){if(!e||!e.connection)return;const t=e.getParser();t&&t.resultCode===X_.NAME_OK&&(this._canChangeName=!1,this.events.dispatchEvent(new sv(t.name)))}onUserNameChangeMessageEvent(e){if(!e||!e.connection)return;const t=e.getParser();t&&t.webId===this.userId&&(this._name=t.newName,this._canChangeName=!1,this.events.dispatchEvent(new sv(this._name)))}onUserTags(e){if(!e||!e.connection)return;const t=e.getParser();t&&(this._tags=t.tags)}onRoomModelNameEvent(e){if(!e)return;const t=e.getParser();t&&Jc.roomVisited(t.roomId)}onFurnitureDataReadyEvent(e){if(this._furnitureData.removeEventListener(dd.FURNITURE_DATA_READY,this.onFurnitureDataReadyEvent),this._furnitureReady=!0,!this._furnitureListenersNotified&&(this._furnitureListenersNotified=!0,this._pendingFurnitureListeners&&this._pendingFurnitureListeners.length))for(const t of this._pendingFurnitureListeners)t&&t.loadFurnitureData();this._pendingProductListeners=[]}onProductDataReadyEvent(e){this._productData.removeEventListener(_d.PDP_PRODUCT_DATA_READY,this.onProductDataReadyEvent),this._productsReady=!0;for(const t of this._pendingProductListeners)t&&t.loadProductData();this._pendingProductListeners=[]}onInClientLinkEvent(e){if(!e)return;const t=e.getParser();t&&ce.instance.createLinkEvent(t.link)}onMysteryBoxKeysEvent(e){if(!e)return;const t=e.getParser();t&&this.events.dispatchEvent(new IR(t.boxColor,t.keyColor))}onNoobnessLevelMessageEvent(e){this._noobnessLevel=e.getParser().noobnessLevel,this._noobnessLevel!==ud.OLD_IDENTITY&&Te.setValue("new.identity",1)}onAccountSafetyLockStatusChangeMessageEvent(e){if(!e)return;const t=e.getParser();t&&(this._safetyLocked=t.status==dv.SAFETY_LOCK_STATUS_LOCKED)}onEmailStatus(e){if(!e)return;const t=e.getParser();t&&(this._isEmailVerified=t.isVerified)}onNitroSettingsEvent(e){this._isRoomCameraFollowDisabled=e.cameraFollow,this._uiFlags=e.flags,this.events.dispatchEvent(new FR(this._uiFlags))}destroyFurnitureData(){this._furnitureData&&(this._furnitureData.dispose(),this._furnitureData=null)}destroyProductData(){this._productData&&(this._productData.dispose(),this._productData=null)}getFloorItemData(e){const t=this._floorItems.get(e);return t||null}getFloorItemDataByName(e){if(!e||!this._floorItems||!this._floorItems.size)return null;for(const t of this._floorItems.values())if(!(!t||t.className!==e))return t}getWallItemData(e){const t=this._wallItems.get(e);return t||null}getWallItemDataByName(e){if(!e||!this._wallItems||!this._wallItems.size)return null;for(const t of this._wallItems.values())if(!(!t||t.className!==e))return t}getProductData(e){return this._productsReady||this.loadProductData(),this._products.get(e)}getBadgeUrl(e){return this._badgeImageManager.getBadgeUrl(e)}getGroupBadgeUrl(e){return this._badgeImageManager.getBadgeUrl(e,Dh.GROUP_BADGE)}getBadgeImage(e){return this._badgeImageManager.getBadgeImage(e)}getGroupBadgeImage(e){return this._badgeImageManager.getBadgeImage(e,Dh.GROUP_BADGE)}getUserTags(e){e<0||this.send(new j6(e))}loadBadgeImage(e){return this._badgeImageManager.loadBadgeImage(e)}loadGroupBadgeImage(e){return this._badgeImageManager.loadBadgeImage(e,Dh.GROUP_BADGE)}hasSecurity(e){return this._securityLevel>=e}giveRespect(e){e<0||this._respectsLeft<=0||(this.send(new q6(e)),this._respectsLeft--)}givePetRespect(e){e<0||this._respectsPetLeft<=0||(this.send(new PF(e)),this._respectsPetLeft--)}sendSpecialCommandMessage(e,t=0){this.send(new Gw(e))}ignoreUser(e){this._ignoredUsersManager&&this._ignoredUsersManager.ignoreUser(e)}unignoreUser(e){this._ignoredUsersManager&&this._ignoredUsersManager.unignoreUser(e)}isUserIgnored(e){return this._ignoredUsersManager&&this._ignoredUsersManager.isIgnored(e)}getGroupBadge(e){return this._groupInformationManager&&this._groupInformationManager.getGroupBadge(e)}send(e){this._communication.connection.send(e)}get communication(){return this._communication}get userId(){return this._userId}get userName(){return this._name}get figure(){return this._figure}get gender(){return this._gender}get realName(){return this._realName}get ignoredUsersManager(){return this._ignoredUsersManager}get groupInformationManager(){return this._groupInformationManager}get respectsReceived(){return this._respectsReceived}get respectsLeft(){return this._respectsLeft}get respectsPetLeft(){return this._respectsPetLeft}get canChangeName(){return this._canChangeName}get clubLevel(){return this._clubLevel}get securityLevel(){return this._securityLevel}get isAmbassador(){return this._isAmbassador}get isEmailVerified(){return this._isEmailVerified}get isNoob(){return this._noobnessLevel!==ud.OLD_IDENTITY}get isRealNoob(){return this._noobnessLevel===ud.REAL_NOOB}get isSystemOpen(){return this._systemOpen}get isSystemShutdown(){return this._systemShutdown}get isAuthenticHabbo(){return this._isAuthenticHabbo}get isModerator(){return this._securityLevel>=mR.MODERATOR}get isCameraFollowDisabled(){return this._isRoomCameraFollowDisabled}get uiFlags(){return this._uiFlags}get tags(){return this._tags}}class G5 extends A0{constructor(e,t,i,n,r=""){super(e,t,i,n),this._jukeboxDiskId=-1,this._songData=r}get id(){return this._id}get length(){return this._length}get name(){return this._name}get creator(){return this._creator}get songData(){return this._songData}set songData(e){this._songData=e}get diskId(){return this._jukeboxDiskId}set diskId(e){this._jukeboxDiskId=e}}class bTe{constructor(e,t,i,n,r){this._songId=e,this._startPos=t,this._playLength=i,this._fadeInSeconds=n,this._fadeOutSeconds=r,this._playRequestTime=Date.now()}get songId(){return this._songId}get startPos(){return this._startPos<0?0:this._startPos+(Date.now()-this._playRequestTime)/1e3}get playLength(){return this._playLength}get playRequestTime(){return this._playRequestTime}get fadeInSeconds(){return this._fadeInSeconds}get fadeOutSeconds(){return this._fadeOutSeconds}}const WE=class WE extends Ye{constructor(e,t){super(WE.NOTIFY_PLAYED_SONG),this._name=e,this._creator=t}get name(){return this._name}get creator(){return this._creator}};WE.NOTIFY_PLAYED_SONG="UIEW_NOTIFY_PLAYED_SONG";let RA=WE;const u_=class u_ extends Ye{constructor(e,t,i,n){super(e),this._id=i,this._position=n,this._priority=t}get id(){return this._id}get position(){return this._position}get priority(){return this._priority}};u_.NPE_USER_PLAY_SONG="NPE_USER_PLAY_SONG",u_.NPW_USER_STOP_SONG="NPW_USER_STOP_SONG",u_.NPE_SONG_CHANGED="NPE_SONG_CHANGED";let Do=u_;const YE=class YE extends Ye{constructor(e){super(e)}};YE.PLUE_PLAY_LIST_UPDATED="PLUE_PLAY_LIST_UPDATED",YE.PLUE_PLAY_LIST_FULL="PLUE_PLAY_LIST_FULL";let ro=YE;const gC=class gC extends Ye{constructor(e){super(e)}};gC.SDIR_SONG_DISK_INVENTORY_RECEIVENT_EVENT="SDIR_SONG_DISK_INVENTORY_RECEIVENT_EVENT";let Uh=gC;const pC=class pC extends Ye{constructor(e,t){super(e),this._id=t}get id(){return this._id}};pC.SIR_TRAX_SONG_INFO_RECEIVED="SIR_TRAX_SONG_INFO_RECEIVED";let ef=pC;const mC=class mC extends Ye{constructor(e,t){super(e),this._id=t}get id(){return this._id}};mC.TRAX_SONG_COMPLETE="SME_TRAX_SONG_COMPLETE";let tf=mC;const au=class au{};au.PRIORITY_ROOM_PLAYLIST=0,au.PRIORITY_USER_PLAYLIST=1,au.PRIORITY_SONG_PLAY=2,au.PRIORITY_PURCHASE_PREVIEW=3,au.PRIORITY_COUNT=4;let Qs=au;class ATe{constructor(){this._isPlaying=!1,this._disposed=!1,this._entries=[],this._missingSongInfo=[],this._messageEvents=[new hF(this.onNowPlayingMessageEvent.bind(this)),new uF(this.onJukeboxSongDisksMessageEvent.bind(this)),new lF(this.onJukeboxPlayListFullMessageEvent.bind(this))],this.onSongInfoReceivedEvent=this.onSongInfoReceivedEvent.bind(this)}init(){this._messageEvents.forEach(e=>ce.instance.communication.connection.addMessageEvent(e)),ce.instance.soundManager.events.addEventListener(ef.SIR_TRAX_SONG_INFO_RECEIVED,this.onSongInfoReceivedEvent)}get priority(){return Qs.PRIORITY_ROOM_PLAYLIST}onNowPlayingMessageEvent(e){const t=e.getParser();this._isPlaying=t.currentSongId!==-1,t.currentSongId>=0?(ce.instance.soundManager.musicController.playSong(t.currentSongId,Qs.PRIORITY_ROOM_PLAYLIST,t.syncCount/1e3,0,1,1),this._currentEntryId=t.currentSongId):this.stopPlaying(),t.nextSongId>=0&&ce.instance.soundManager.musicController.addSongInfoRequest(t.nextSongId),this._playPosition=t.currentPosition,ce.instance.soundManager.events.dispatchEvent(new Do(Do.NPE_SONG_CHANGED,Qs.PRIORITY_ROOM_PLAYLIST,t.currentSongId,t.currentPosition))}onJukeboxSongDisksMessageEvent(e){const t=e.getParser();this._entries=[];for(let i=0;i=0&&this._missingSongInfo.splice(t,1),this._missingSongInfo.length==0&&ce.instance.soundManager.events.dispatchEvent(new ro(ro.PLUE_PLAY_LIST_UPDATED))}stopPlaying(){ce.instance.soundManager.musicController.stop(this.priority),this._currentEntryId=-1,this._playPosition=-1,this._isPlaying=!1}get length(){return this._entries?this._entries.length:0}get playPosition(){return this._playPosition}get nowPlayingSongId(){return this._currentEntryId}get isPlaying(){return this._isPlaying}get entries(){return this._entries}getEntry(e){return e<0||e>=this._entries.length?null:this._entries[e]}requestPlayList(){ce.instance.communication.connection.send(new U6)}dispose(){this._disposed||(this._disposed=!0,this.stopPlaying(),ce.instance.soundManager.events&&ce.instance.soundManager.events.removeEventListener(ef.SIR_TRAX_SONG_INFO_RECEIVED,this.onSongInfoReceivedEvent),this._messageEvents.forEach(e=>ce.instance.communication.connection.removeMessageEvent(e)),this._messageEvents=null)}}class OTe{constructor(e){this._id=e,this._items=[]}addChannelItem(e){this._items.push(e)}get items(){return this._items}}class wTe{constructor(e,t){this._id=e,this._length=t}get id(){return this._id}get length(){return this._length}}class SA{constructor(e){this._channels=[],this._metaData=new Map;let t=[];const i=e.split(":"),n=i[i.length-1];if(n.indexOf("meta")>-1){const r=n.split(";");for(const a of r){const o=a.split(",");this._metaData.set(o[0],o[1])}t=i.slice(0,i.length-1)}else t=i;for(let r=0;r0){const a=parseInt(t[r*2]),o=t[r*2+1].split(";"),l=new OTe(a);for(const u of o){const c=u.split(",");if(c.length!==2)return;l.addChannelItem(new wTe(parseInt(c[0]),parseInt(c[1])))}this._channels.push(l)}}get channels(){return this._channels}getSampleIds(){const e=[];for(const t of this._channels)for(const i of t.items)e.indexOf(i.id)===-1&&e.push(i.id);return e}get hasMetaData(){return this._metaData.has("meta")}get metaCutMode(){return this._metaData.has("c")}get metaTempo(){const e=this._metaData.get("t");return e?parseInt(e):null}}var Cl={};/*! * howler.js v2.2.4 * howlerjs.com * * (c) 2013-2020, James Simpson of GoldFire Studios * goldfirestudios.com * * MIT License */(function(s){(function(){var e=function(){this.init()};e.prototype={init:function(){var h=this||t;return h._counter=1e3,h._html5AudioPool=[],h.html5PoolSize=10,h._codecs={},h._howls=[],h._muted=!1,h._volume=1,h._canPlayEvent="canplaythrough",h._navigator=typeof window<"u"&&window.navigator?window.navigator:null,h.masterGain=null,h.noAudio=!1,h.usingWebAudio=!0,h.autoSuspend=!0,h.ctx=null,h.autoUnlock=!0,h._setup(),h},volume:function(h){var f=this||t;if(h=parseFloat(h),f.ctx||c(),typeof h<"u"&&h>=0&&h<=1){if(f._volume=h,f._muted)return f;f.usingWebAudio&&f.masterGain.gain.setValueAtTime(h,t.ctx.currentTime);for(var d=0;d=0;f--)h._howls[f].unload();return h.usingWebAudio&&h.ctx&&typeof h.ctx.close<"u"&&(h.ctx.close(),h.ctx=null,c()),h},codecs:function(h){return(this||t)._codecs[h.replace(/^x-/,"")]},_setup:function(){var h=this||t;if(h.state=h.ctx&&h.ctx.state||"suspended",h._autoSuspend(),!h.usingWebAudio)if(typeof Audio<"u")try{var f=new Audio;typeof f.oncanplaythrough>"u"&&(h._canPlayEvent="canplay")}catch{h.noAudio=!0}else h.noAudio=!0;try{var f=new Audio;f.muted&&(h.noAudio=!0)}catch{}return h.noAudio||h._setupCodecs(),h},_setupCodecs:function(){var h=this||t,f=null;try{f=typeof Audio<"u"?new Audio:null}catch{return h}if(!f||typeof f.canPlayType!="function")return h;var d=f.canPlayType("audio/mpeg;").replace(/^no$/,""),_=h._navigator?h._navigator.userAgent:"",g=_.match(/OPR\/(\d+)/g),p=g&&parseInt(g[0].split("/")[1],10)<33,m=_.indexOf("Safari")!==-1&&_.indexOf("Chrome")===-1,v=_.match(/Version\/(.*?) /),E=m&&v&&parseInt(v[1],10)<15;return h._codecs={mp3:!!(!p&&(d||f.canPlayType("audio/mp3;").replace(/^no$/,""))),mpeg:!!d,opus:!!f.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!f.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!f.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!(f.canPlayType('audio/wav; codecs="1"')||f.canPlayType("audio/wav")).replace(/^no$/,""),aac:!!f.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!f.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(f.canPlayType("audio/x-m4a;")||f.canPlayType("audio/m4a;")||f.canPlayType("audio/aac;")).replace(/^no$/,""),m4b:!!(f.canPlayType("audio/x-m4b;")||f.canPlayType("audio/m4b;")||f.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(f.canPlayType("audio/x-mp4;")||f.canPlayType("audio/mp4;")||f.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!!(!E&&f.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!!(!E&&f.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),dolby:!!f.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(f.canPlayType("audio/x-flac;")||f.canPlayType("audio/flac;")).replace(/^no$/,"")},h},_unlockAudio:function(){var h=this||t;if(!(h._audioUnlocked||!h.ctx)){h._audioUnlocked=!1,h.autoUnlock=!1,!h._mobileUnloaded&&h.ctx.sampleRate!==44100&&(h._mobileUnloaded=!0,h.unload()),h._scratchBuffer=h.ctx.createBuffer(1,1,22050);var f=function(d){for(;h._html5AudioPool.length"u"?E.noteOn(0):E.start(0),typeof h.ctx.resume=="function"&&h.ctx.resume(),E.onended=function(){E.disconnect(0),h._audioUnlocked=!0,document.removeEventListener("touchstart",f,!0),document.removeEventListener("touchend",f,!0),document.removeEventListener("click",f,!0),document.removeEventListener("keydown",f,!0);for(var y=0;y"u"||!t.usingWebAudio)){for(var f=0;f"u"||!t.usingWebAudio))return h.state==="running"&&h.ctx.state!=="interrupted"&&h._suspendTimer?(clearTimeout(h._suspendTimer),h._suspendTimer=null):h.state==="suspended"||h.state==="running"&&h.ctx.state==="interrupted"?(h.ctx.resume().then(function(){h.state="running";for(var f=0;f"u"&&(h="__default",!d._playLock)){for(var g=0,p=0;p0?m._seek:d._sprite[h][0]/1e3),y=Math.max(0,(d._sprite[h][0]+d._sprite[h][1])/1e3-E),T=y*1e3/Math.abs(m._rate),w=d._sprite[h][0]/1e3,C=(d._sprite[h][0]+d._sprite[h][1])/1e3;m._sprite=h,m._ended=!1;var N=function(){m._paused=!1,m._seek=E,m._start=w,m._stop=C,m._loop=!!(m._loop||d._sprite[h][2])};if(E>=C){d._ended(m);return}var P=m._node;if(d._webAudio){var k=function(){d._playLock=!1,N(),d._refreshBuffer(m);var ne=m._muted||d._muted?0:m._volume;P.gain.setValueAtTime(ne,t.ctx.currentTime),m._playStart=t.ctx.currentTime,typeof P.bufferSource.start>"u"?m._loop?P.bufferSource.noteGrainOn(0,E,86400):P.bufferSource.noteGrainOn(0,E,y):m._loop?P.bufferSource.start(0,E,86400):P.bufferSource.start(0,E,y),T!==1/0&&(d._endTimers[m._id]=setTimeout(d._ended.bind(d,m),T)),f||setTimeout(function(){d._emit("play",m._id),d._loadQueue()},0)};t.state==="running"&&t.ctx.state!=="interrupted"?k():(d._playLock=!0,d.once("resume",k),d._clearTimer(m._id))}else{var L=function(){P.currentTime=E,P.muted=m._muted||d._muted||t._muted||P.muted,P.volume=m._volume*t.volume(),P.playbackRate=m._rate;try{var ne=P.play();if(ne&&typeof Promise<"u"&&(ne instanceof Promise||typeof ne.then=="function")?(d._playLock=!0,N(),ne.then(function(){d._playLock=!1,P._unlocked=!0,f?d._loadQueue():d._emit("play",m._id)}).catch(function(){d._playLock=!1,d._emit("playerror",m._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."),m._ended=!0,m._paused=!0})):f||(d._playLock=!1,N(),d._emit("play",m._id)),P.playbackRate=m._rate,P.paused){d._emit("playerror",m._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");return}h!=="__default"||m._loop?d._endTimers[m._id]=setTimeout(d._ended.bind(d,m),T):(d._endTimers[m._id]=function(){d._ended(m),P.removeEventListener("ended",d._endTimers[m._id],!1)},P.addEventListener("ended",d._endTimers[m._id],!1))}catch(G){d._emit("playerror",m._id,G)}};P.src==="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"&&(P.src=d._src,P.load());var j=window&&window.ejecta||!P.readyState&&t._navigator.isCocoonJS;if(P.readyState>=3||j)L();else{d._playLock=!0,d._state="loading";var z=function(){d._state="loaded",L(),P.removeEventListener(t._canPlayEvent,z,!1)};P.addEventListener(t._canPlayEvent,z,!1),d._clearTimer(m._id)}}return m._id},pause:function(h){var f=this;if(f._state!=="loaded"||f._playLock)return f._queue.push({event:"pause",action:function(){f.pause(h)}}),f;for(var d=f._getSoundIds(h),_=0;_"u"?g._node.bufferSource.noteOff(0):g._node.bufferSource.stop(0),f._cleanBuffer(g._node)}else(!isNaN(g._node.duration)||g._node.duration===1/0)&&g._node.pause();arguments[1]||f._emit("pause",g?g._id:null)}return f},stop:function(h,f){var d=this;if(d._state!=="loaded"||d._playLock)return d._queue.push({event:"stop",action:function(){d.stop(h)}}),d;for(var _=d._getSoundIds(h),g=0;g<_.length;g++){d._clearTimer(_[g]);var p=d._soundById(_[g]);p&&(p._seek=p._start||0,p._rateSeek=0,p._paused=!0,p._ended=!0,d._stopFade(_[g]),p._node&&(d._webAudio?p._node.bufferSource&&(typeof p._node.bufferSource.stop>"u"?p._node.bufferSource.noteOff(0):p._node.bufferSource.stop(0),d._cleanBuffer(p._node)):(!isNaN(p._node.duration)||p._node.duration===1/0)&&(p._node.currentTime=p._start||0,p._node.pause(),p._node.duration===1/0&&d._clearSound(p._node))),f||d._emit("stop",p._id))}return d},mute:function(h,f){var d=this;if(d._state!=="loaded"||d._playLock)return d._queue.push({event:"mute",action:function(){d.mute(h,f)}}),d;if(typeof f>"u")if(typeof h=="boolean")d._muted=h;else return d._muted;for(var _=d._getSoundIds(f),g=0;g<_.length;g++){var p=d._soundById(_[g]);p&&(p._muted=h,p._interval&&d._stopFade(p._id),d._webAudio&&p._node?p._node.gain.setValueAtTime(h?0:p._volume,t.ctx.currentTime):p._node&&(p._node.muted=t._muted?!0:h),d._emit("mute",p._id))}return d},volume:function(){var h=this,f=arguments,d,_;if(f.length===0)return h._volume;if(f.length===1||f.length===2&&typeof f[1]>"u"){var g=h._getSoundIds(),p=g.indexOf(f[0]);p>=0?_=parseInt(f[0],10):d=parseFloat(f[0])}else f.length>=2&&(d=parseFloat(f[0]),_=parseInt(f[1],10));var m;if(typeof d<"u"&&d>=0&&d<=1){if(h._state!=="loaded"||h._playLock)return h._queue.push({event:"volume",action:function(){h.volume.apply(h,f)}}),h;typeof _>"u"&&(h._volume=d),_=h._getSoundIds(_);for(var v=0;v<_.length;v++)m=h._soundById(_[v]),m&&(m._volume=d,f[2]||h._stopFade(_[v]),h._webAudio&&m._node&&!m._muted?m._node.gain.setValueAtTime(d,t.ctx.currentTime):m._node&&!m._muted&&(m._node.volume=d*t.volume()),h._emit("volume",m._id))}else return m=_?h._soundById(_):h._sounds[0],m?m._volume:0;return h},fade:function(h,f,d,_){var g=this;if(g._state!=="loaded"||g._playLock)return g._queue.push({event:"fade",action:function(){g.fade(h,f,d,_)}}),g;h=Math.min(Math.max(0,parseFloat(h)),1),f=Math.min(Math.max(0,parseFloat(f)),1),d=parseFloat(d),g.volume(h,_);for(var p=g._getSoundIds(_),m=0;m"u")}}return g},_startFadeInterval:function(h,f,d,_,g,p){var m=this,v=f,E=d-f,y=Math.abs(E/.01),T=Math.max(4,y>0?_/y:_),w=Date.now();h._fadeTo=d,h._interval=setInterval(function(){var C=(Date.now()-w)/_;w=Date.now(),v+=E*C,v=Math.round(v*100)/100,E<0?v=Math.max(d,v):v=Math.min(d,v),m._webAudio?h._volume=v:m.volume(v,h._id,!0),p&&(m._volume=v),(df&&v>=d)&&(clearInterval(h._interval),h._interval=null,h._fadeTo=null,m.volume(d,h._id),m._emit("fade",h._id))},T)},_stopFade:function(h){var f=this,d=f._soundById(h);return d&&d._interval&&(f._webAudio&&d._node.gain.cancelScheduledValues(t.ctx.currentTime),clearInterval(d._interval),d._interval=null,f.volume(d._fadeTo,h),d._fadeTo=null,f._emit("fade",h)),f},loop:function(){var h=this,f=arguments,d,_,g;if(f.length===0)return h._loop;if(f.length===1)if(typeof f[0]=="boolean")d=f[0],h._loop=d;else return g=h._soundById(parseInt(f[0],10)),g?g._loop:!1;else f.length===2&&(d=f[0],_=parseInt(f[1],10));for(var p=h._getSoundIds(_),m=0;m=0?_=parseInt(f[0],10):d=parseFloat(f[0])}else f.length===2&&(d=parseFloat(f[0]),_=parseInt(f[1],10));var m;if(typeof d=="number"){if(h._state!=="loaded"||h._playLock)return h._queue.push({event:"rate",action:function(){h.rate.apply(h,f)}}),h;typeof _>"u"&&(h._rate=d),_=h._getSoundIds(_);for(var v=0;v<_.length;v++)if(m=h._soundById(_[v]),m){h.playing(_[v])&&(m._rateSeek=h.seek(_[v]),m._playStart=h._webAudio?t.ctx.currentTime:m._playStart),m._rate=d,h._webAudio&&m._node&&m._node.bufferSource?m._node.bufferSource.playbackRate.setValueAtTime(d,t.ctx.currentTime):m._node&&(m._node.playbackRate=d);var E=h.seek(_[v]),y=(h._sprite[m._sprite][0]+h._sprite[m._sprite][1])/1e3-E,T=y*1e3/Math.abs(m._rate);(h._endTimers[_[v]]||!m._paused)&&(h._clearTimer(_[v]),h._endTimers[_[v]]=setTimeout(h._ended.bind(h,m),T)),h._emit("rate",m._id)}}else return m=h._soundById(_),m?m._rate:h._rate;return h},seek:function(){var h=this,f=arguments,d,_;if(f.length===0)h._sounds.length&&(_=h._sounds[0]._id);else if(f.length===1){var g=h._getSoundIds(),p=g.indexOf(f[0]);p>=0?_=parseInt(f[0],10):h._sounds.length&&(_=h._sounds[0]._id,d=parseFloat(f[0]))}else f.length===2&&(d=parseFloat(f[0]),_=parseInt(f[1],10));if(typeof _>"u")return 0;if(typeof d=="number"&&(h._state!=="loaded"||h._playLock))return h._queue.push({event:"seek",action:function(){h.seek.apply(h,f)}}),h;var m=h._soundById(_);if(m)if(typeof d=="number"&&d>=0){var v=h.playing(_);v&&h.pause(_,!0),m._seek=d,m._ended=!1,h._clearTimer(_),!h._webAudio&&m._node&&!isNaN(m._node.duration)&&(m._node.currentTime=d);var E=function(){v&&h.play(_,!0),h._emit("seek",_)};if(v&&!h._webAudio){var y=function(){h._playLock?setTimeout(y,0):E()};setTimeout(y,0)}else E()}else if(h._webAudio){var T=h.playing(_)?t.ctx.currentTime-m._playStart:0,w=m._rateSeek?m._rateSeek-m._seek:0;return m._seek+(w+T*Math.abs(m._rate))}else return m._node.currentTime;return h},playing:function(h){var f=this;if(typeof h=="number"){var d=f._soundById(h);return d?!d._paused:!1}for(var _=0;_=0&&t._howls.splice(_,1);var g=!0;for(d=0;d=0){g=!1;break}return r&&g&&delete r[h._src],t.noAudio=!1,h._state="unloaded",h._sounds=[],h=null,null},on:function(h,f,d,_){var g=this,p=g["_on"+h];return typeof f=="function"&&p.push(_?{id:d,fn:f,once:_}:{id:d,fn:f}),g},off:function(h,f,d){var _=this,g=_["_on"+h],p=0;if(typeof f=="number"&&(d=f,f=null),f||d)for(p=0;p=0;p--)(!g[p].id||g[p].id===f||h==="load")&&(setTimeout((function(m){m.call(this,f,d)}).bind(_,g[p].fn),0),g[p].once&&_.off(h,g[p].fn,g[p].id));return _._loadQueue(h),_},_loadQueue:function(h){var f=this;if(f._queue.length>0){var d=f._queue[0];d.event===h&&(f._queue.shift(),f._loadQueue()),h||d.action()}return f},_ended:function(h){var f=this,d=h._sprite;if(!f._webAudio&&h._node&&!h._node.paused&&!h._node.ended&&h._node.currentTime=0;_--){if(d<=f)return;h._sounds[_]._ended&&(h._webAudio&&h._sounds[_]._node&&h._sounds[_]._node.disconnect(0),h._sounds.splice(_,1),d--)}}},_getSoundIds:function(h){var f=this;if(typeof h>"u"){for(var d=[],_=0;_=0;if(!h.bufferSource)return f;if(t._scratchBuffer&&h.bufferSource&&(h.bufferSource.onended=null,h.bufferSource.disconnect(0),d))try{h.bufferSource.buffer=t._scratchBuffer}catch{}return h.bufferSource=null,f},_clearSound:function(h){var f=/MSIE |Trident\//.test(t._navigator&&t._navigator.userAgent);f||(h.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA")}};var n=function(h){this._parent=h,this.init()};n.prototype={init:function(){var h=this,f=h._parent;return h._muted=f._muted,h._loop=f._loop,h._volume=f._volume,h._rate=f._rate,h._seek=0,h._paused=!0,h._ended=!0,h._sprite="__default",h._id=++t._counter,f._sounds.push(h),h.create(),h},create:function(){var h=this,f=h._parent,d=t._muted||h._muted||h._parent._muted?0:h._volume;return f._webAudio?(h._node=typeof t.ctx.createGain>"u"?t.ctx.createGainNode():t.ctx.createGain(),h._node.gain.setValueAtTime(d,t.ctx.currentTime),h._node.paused=!0,h._node.connect(t.masterGain)):t.noAudio||(h._node=t._obtainHtml5Audio(),h._errorFn=h._errorListener.bind(h),h._node.addEventListener("error",h._errorFn,!1),h._loadFn=h._loadListener.bind(h),h._node.addEventListener(t._canPlayEvent,h._loadFn,!1),h._endFn=h._endListener.bind(h),h._node.addEventListener("ended",h._endFn,!1),h._node.src=f._src,h._node.preload=f._preload===!0?"auto":f._preload,h._node.volume=d*t.volume(),h._node.load()),h},reset:function(){var h=this,f=h._parent;return h._muted=f._muted,h._loop=f._loop,h._volume=f._volume,h._rate=f._rate,h._seek=0,h._rateSeek=0,h._paused=!0,h._ended=!0,h._sprite="__default",h._id=++t._counter,h},_errorListener:function(){var h=this;h._parent._emit("loaderror",h._id,h._node.error?h._node.error.code:0),h._node.removeEventListener("error",h._errorFn,!1)},_loadListener:function(){var h=this,f=h._parent;f._duration=Math.ceil(h._node.duration*10)/10,Object.keys(f._sprite).length===0&&(f._sprite={__default:[0,f._duration*1e3]}),f._state!=="loaded"&&(f._state="loaded",f._emit("load"),f._loadQueue()),h._node.removeEventListener(t._canPlayEvent,h._loadFn,!1)},_endListener:function(){var h=this,f=h._parent;f._duration===1/0&&(f._duration=Math.ceil(h._node.duration*10)/10,f._sprite.__default[1]===1/0&&(f._sprite.__default[1]=f._duration*1e3),f._ended(h)),h._node.removeEventListener("ended",h._endFn,!1)}};var r={},a=function(h){var f=h._src;if(r[f]){h._duration=r[f].duration,u(h);return}if(/^data:[^;]+;base64,/.test(f)){for(var d=atob(f.split(",")[1]),_=new Uint8Array(d.length),g=0;g0?(r[f._src]=g,u(f,g)):d()};typeof Promise<"u"&&t.ctx.decodeAudioData.length===1?t.ctx.decodeAudioData(h).then(_).catch(d):t.ctx.decodeAudioData(h,_,d)},u=function(h,f){f&&!h._duration&&(h._duration=f.duration),Object.keys(h._sprite).length===0&&(h._sprite={__default:[0,h._duration*1e3]}),h._state!=="loaded"&&(h._state="loaded",h._emit("load"),h._loadQueue())},c=function(){if(t.usingWebAudio){try{typeof AudioContext<"u"?t.ctx=new AudioContext:typeof webkitAudioContext<"u"?t.ctx=new webkitAudioContext:t.usingWebAudio=!1}catch{t.usingWebAudio=!1}t.ctx||(t.usingWebAudio=!1);var h=/iP(hone|od|ad)/.test(t._navigator&&t._navigator.platform),f=t._navigator&&t._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),d=f?parseInt(f[1],10):null;if(h&&d&&d<9){var _=/safari/.test(t._navigator&&t._navigator.userAgent.toLowerCase());t._navigator&&!_&&(t.usingWebAudio=!1)}t.usingWebAudio&&(t.masterGain=typeof t.ctx.createGain>"u"?t.ctx.createGainNode():t.ctx.createGain(),t.masterGain.gain.setValueAtTime(t._muted?0:t._volume,t.ctx.currentTime),t.masterGain.connect(t.ctx.destination)),t._setup()}};s.Howler=t,s.Howl=i,typeof Zi<"u"?(Zi.HowlerGlobal=e,Zi.Howler=t,Zi.Howl=i,Zi.Sound=n):typeof window<"u"&&(window.HowlerGlobal=e,window.Howler=t,window.Howl=i,window.Sound=n)})();/*! * Spatial Plugin - Adds support for stereo and 3D audio where Web Audio is supported. * * howler.js v2.2.4 * howlerjs.com * * (c) 2013-2020, James Simpson of GoldFire Studios * goldfirestudios.com * * MIT License */(function(){HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(t){var i=this;if(!i.ctx||!i.ctx.listener)return i;for(var n=i._howls.length-1;n>=0;n--)i._howls[n].stereo(t);return i},HowlerGlobal.prototype.pos=function(t,i,n){var r=this;if(!r.ctx||!r.ctx.listener)return r;if(i=typeof i!="number"?r._pos[1]:i,n=typeof n!="number"?r._pos[2]:n,typeof t=="number")r._pos=[t,i,n],typeof r.ctx.listener.positionX<"u"?(r.ctx.listener.positionX.setTargetAtTime(r._pos[0],Howler.ctx.currentTime,.1),r.ctx.listener.positionY.setTargetAtTime(r._pos[1],Howler.ctx.currentTime,.1),r.ctx.listener.positionZ.setTargetAtTime(r._pos[2],Howler.ctx.currentTime,.1)):r.ctx.listener.setPosition(r._pos[0],r._pos[1],r._pos[2]);else return r._pos;return r},HowlerGlobal.prototype.orientation=function(t,i,n,r,a,o){var l=this;if(!l.ctx||!l.ctx.listener)return l;var u=l._orientation;if(i=typeof i!="number"?u[1]:i,n=typeof n!="number"?u[2]:n,r=typeof r!="number"?u[3]:r,a=typeof a!="number"?u[4]:a,o=typeof o!="number"?u[5]:o,typeof t=="number")l._orientation=[t,i,n,r,a,o],typeof l.ctx.listener.forwardX<"u"?(l.ctx.listener.forwardX.setTargetAtTime(t,Howler.ctx.currentTime,.1),l.ctx.listener.forwardY.setTargetAtTime(i,Howler.ctx.currentTime,.1),l.ctx.listener.forwardZ.setTargetAtTime(n,Howler.ctx.currentTime,.1),l.ctx.listener.upX.setTargetAtTime(r,Howler.ctx.currentTime,.1),l.ctx.listener.upY.setTargetAtTime(a,Howler.ctx.currentTime,.1),l.ctx.listener.upZ.setTargetAtTime(o,Howler.ctx.currentTime,.1)):l.ctx.listener.setOrientation(t,i,n,r,a,o);else return u;return l},Howl.prototype.init=function(t){return function(i){var n=this;return n._orientation=i.orientation||[1,0,0],n._stereo=i.stereo||null,n._pos=i.pos||null,n._pannerAttr={coneInnerAngle:typeof i.coneInnerAngle<"u"?i.coneInnerAngle:360,coneOuterAngle:typeof i.coneOuterAngle<"u"?i.coneOuterAngle:360,coneOuterGain:typeof i.coneOuterGain<"u"?i.coneOuterGain:0,distanceModel:typeof i.distanceModel<"u"?i.distanceModel:"inverse",maxDistance:typeof i.maxDistance<"u"?i.maxDistance:1e4,panningModel:typeof i.panningModel<"u"?i.panningModel:"HRTF",refDistance:typeof i.refDistance<"u"?i.refDistance:1,rolloffFactor:typeof i.rolloffFactor<"u"?i.rolloffFactor:1},n._onstereo=i.onstereo?[{fn:i.onstereo}]:[],n._onpos=i.onpos?[{fn:i.onpos}]:[],n._onorientation=i.onorientation?[{fn:i.onorientation}]:[],t.call(this,i)}}(Howl.prototype.init),Howl.prototype.stereo=function(t,i){var n=this;if(!n._webAudio)return n;if(n._state!=="loaded")return n._queue.push({event:"stereo",action:function(){n.stereo(t,i)}}),n;var r=typeof Howler.ctx.createStereoPanner>"u"?"spatial":"stereo";if(typeof i>"u")if(typeof t=="number")n._stereo=t,n._pos=[t,0,0];else return n._stereo;for(var a=n._getSoundIds(i),o=0;o"u")if(typeof t=="number")a._pos=[t,i,n];else return a._pos;for(var o=a._getSoundIds(r),l=0;l"u")if(typeof t=="number")a._orientation=[t,i,n];else return a._orientation;for(var o=a._getSoundIds(r),l=0;l"u"&&(n.pannerAttr||(n.pannerAttr={coneInnerAngle:n.coneInnerAngle,coneOuterAngle:n.coneOuterAngle,coneOuterGain:n.coneOuterGain,distanceModel:n.distanceModel,maxDistance:n.maxDistance,refDistance:n.refDistance,rolloffFactor:n.rolloffFactor,panningModel:n.panningModel}),t._pannerAttr={coneInnerAngle:typeof n.pannerAttr.coneInnerAngle<"u"?n.pannerAttr.coneInnerAngle:t._coneInnerAngle,coneOuterAngle:typeof n.pannerAttr.coneOuterAngle<"u"?n.pannerAttr.coneOuterAngle:t._coneOuterAngle,coneOuterGain:typeof n.pannerAttr.coneOuterGain<"u"?n.pannerAttr.coneOuterGain:t._coneOuterGain,distanceModel:typeof n.pannerAttr.distanceModel<"u"?n.pannerAttr.distanceModel:t._distanceModel,maxDistance:typeof n.pannerAttr.maxDistance<"u"?n.pannerAttr.maxDistance:t._maxDistance,refDistance:typeof n.pannerAttr.refDistance<"u"?n.pannerAttr.refDistance:t._refDistance,rolloffFactor:typeof n.pannerAttr.rolloffFactor<"u"?n.pannerAttr.rolloffFactor:t._rolloffFactor,panningModel:typeof n.pannerAttr.panningModel<"u"?n.pannerAttr.panningModel:t._panningModel});else return a=t._soundById(parseInt(i[0],10)),a?a._pannerAttr:t._pannerAttr;else i.length===2&&(n=i[0],r=parseInt(i[1],10));for(var o=t._getSoundIds(r),l=0;lthis.tick(),1e3)}reset(){this._isPlaying=!1,window.clearInterval(this._tickerInterval),Cl.Howler.stop(),this._currentSongId=-1,this._currentSong=void 0,this._tickerInterval=void 0,this._startPos=0,this._playLength=0,this._sequence=[],this._currentPos=0}pause(){this._isPlaying=!1,Cl.Howler.stop()}resume(){this._isPlaying=!0}stop(){const e=this._currentSongId;this.reset(),ce.instance.soundManager.events.dispatchEvent(new tf(tf.TRAX_SONG_COMPLETE,e))}setVolume(e){Cl.Howler.volume(e)}getVolume(){return Cl.Howler.volume()}async getSample(e){let t=this._cache.get(e);return t||(t=await this.loadSong(e)),Promise.resolve(t)}async preload(){if(this._sequence=[],!!this._currentSong){for(const e of this._currentSong.channels){const t=[];for(const i of e.items){const n=await this.getSample(i.id),r=Math.ceil(i.length*2/Math.ceil(n.duration()));for(let a=0;ae.length)))}}async preloadSamplesForSong(e){const t=new SA(e);await Promise.all(t.getSampleIds().map(i=>this.getSample(i)))}async loadSong(e){return new Promise((t,i)=>{const n=new Cl.Howl({src:[this._sampleUrl.replace("%sample%",e.toString())],preload:!0});n.once("load",()=>{this._cache.set(e,n),t(n)}),n.once("loaderror",()=>{le.error("failed to load sample "+e),i("failed to load sample "+e)})})}tick(){this._currentPos>this._playLength-1&&this.stop(),this._isPlaying&&(this._currentSong&&this.playPosition(this._currentPos),this._currentPos++)}playPosition(e){if(!(!this._currentSong||!this._sequence)&&Cl.Howler._audioUnlocked)for(const t of this._sequence){const i=t[e];if(!i||i.sampleId===-1||i.sampleId===0)continue;const n=this._cache.get(i.sampleId);n&&(i.offset===0?n.play():n.playing()||(n.seek(i.offset),n.play()))}}}const ou=class ou{constructor(){this._priorityPlaying=-1,this._requestNumberPlaying=-1,this._previousNotificationTime=-1,this._timerInstance=-1,this._songRequestList=[],this._requestedSongs=new Map,this._availableSongs=new Map,this._songDiskInventory=new li,this._songRequestsPerPriority=[],this._songRequestCountsPerPriority=[],this._diskInventoryMissingData=[],this._songIdPlaying=-1,this._previousNotifiedSongId=-1,this._messageEvents=[new cF(this.onTraxSongInfoMessageEvent.bind(this)),new fF(this.onSongDiskInventoryMessage.bind(this))],this.onJukeboxInit=this.onJukeboxInit.bind(this),this.onJukeboxDispose=this.onJukeboxDispose.bind(this),this.onSoundMachineInit=this.onSoundMachineInit.bind(this),this.onSoundMachineDispose=this.onSoundMachineDispose.bind(this),this.onTraxSongComplete=this.onTraxSongComplete.bind(this)}init(){this._timerInstance=window.setInterval(this.onTick.bind(this),1e3),this._musicPlayer=new CTe(ce.instance.getConfiguration("external.samples.url")),this._messageEvents.forEach(e=>ce.instance.communication.connection.addMessageEvent(e)),ce.instance.roomEngine.events.addEventListener(Ot.JUKEBOX_INIT,this.onJukeboxInit),ce.instance.roomEngine.events.addEventListener(Ot.JUKEBOX_DISPOSE,this.onJukeboxDispose),ce.instance.roomEngine.events.addEventListener(Ot.SOUND_MACHINE_INIT,this.onSoundMachineInit),ce.instance.roomEngine.events.addEventListener(Ot.SOUND_MACHINE_DISPOSE,this.onSoundMachineDispose),ce.instance.soundManager.events.addEventListener(tf.TRAX_SONG_COMPLETE,this.onTraxSongComplete)}getRoomItemPlaylist(e){return this._roomItemPlaylist}get songDiskInventory(){return this._songDiskInventory}getSongDiskInventorySize(){return this._songDiskInventory.length}getSongDiskInventoryDiskId(e){return e>=0&&e=0&&ece.instance.communication.connection.removeMessageEvent(e)),ce.instance.roomEngine.events.removeEventListener(Ot.JUKEBOX_INIT,this.onJukeboxInit),ce.instance.roomEngine.events.removeEventListener(Ot.JUKEBOX_DISPOSE,this.onJukeboxDispose),ce.instance.roomEngine.events.removeEventListener(Ot.SOUND_MACHINE_INIT,this.onSoundMachineInit),ce.instance.roomEngine.events.removeEventListener(Ot.SOUND_MACHINE_DISPOSE,this.onSoundMachineDispose),ce.instance.soundManager.events.removeEventListener(tf.TRAX_SONG_COMPLETE,this.onTraxSongComplete)}get samplesIdsInUse(){let e,t,i=[];for(let n=0;n0){const a=new SA(r);i=i.concat(a.getSampleIds())}}return i}onSongLoaded(e){const t=this.getTopRequestPriority();if(t>=0){const i=this.getSongIdRequestedAtPriority(t);e===i&&this.playSongObject(t,e)}}samplesUnloaded(e){throw new Error("Method not implemented.")}onTraxSongComplete(e){if(this.getSongIdPlayingAtPriority(this._priorityPlaying)===e.id){this.getTopRequestPriority()===this._priorityPlaying&&this.getSongRequestCountAtPriority(this._priorityPlaying)==this._requestNumberPlaying&&this.resetSongStartRequest(this._priorityPlaying);const t=this._priorityPlaying;this.playSongWithHighestPriority(),t>=Qs.PRIORITY_SONG_PLAY&&ce.instance.soundManager.events.dispatchEvent(new Do(Do.NPW_USER_STOP_SONG,t,e.id,-1))}}onTraxSongInfoMessageEvent(e){const t=e.getParser();for(const i of t.songs){const n=!!this.getSongDataEntry(i.id);if(this.areSamplesRequested(i.id),!n){const r=new G5(i.id,i.length,i.name,i.creator,i.data);this._availableSongs.set(i.id,r);const a=this.getTopRequestPriority(),o=this.getSongIdRequestedAtPriority(a);for(i.id===o&&this.playSongObject(a,o),ce.instance.soundManager.events.dispatchEvent(new ef(ef.SIR_TRAX_SONG_INFO_RECEIVED,i.id));this._diskInventoryMissingData.indexOf(i.id)!=-1;)this._diskInventoryMissingData.splice(this._diskInventoryMissingData.indexOf(i.id),1),this._diskInventoryMissingData.length===0&&ce.instance.soundManager.events.dispatchEvent(new Uh(Uh.SDIR_SONG_DISK_INVENTORY_RECEIVENT_EVENT))}}}onSongDiskInventoryMessage(e){const t=e.getParser();this._songDiskInventory.reset();for(let i=0;i=this._priorityPlaying&&this.playSongObject(t,e),!0)}playSongObject(e,t){if(t===-1||e<0||e>=Qs.PRIORITY_COUNT)return!1;let i=!1;this.stopSongAtPriority(this._priorityPlaying)&&(i=!0);const n=this.getSongDataEntry(t);if(!n)return!1;if(i)return!0;this._musicPlayer.setVolume(ce.instance.soundManager.traxVolume);let r=ou.SKIP_POSITION_SET,a=0;const o=this.getSongStartRequest(e);return o&&(r=o.startPos,a=o.playLength,o.fadeInSeconds,o.fadeOutSeconds),r>=n.length/1e3?!1:(r<=ou.SKIP_POSITION_SET&&(r=0),r=Math.trunc(r),this._priorityPlaying=e,this._requestNumberPlaying=this.getSongRequestCountAtPriority(e),this._songIdPlaying=t,this._priorityPlaying<=ou.MAXIMUM_NOTIFY_PRIORITY&&this.notifySongPlaying(n),this._musicPlayer.preloadSamplesForSong(n.songData).then(()=>this._musicPlayer.play(n.songData,n.id,r,a)),e>Qs.PRIORITY_ROOM_PLAYLIST&&ce.instance.soundManager.events.dispatchEvent(new Do(Do.NPE_USER_PLAY_SONG,e,n.id,-1)),!0)}notifySongPlaying(e){const i=Date.now();e.length>=8e3&&(this._previousNotifiedSongId!=e.id||i>this._previousNotificationTime+8e3)&&(ce.instance.soundManager.events.dispatchEvent(new RA(e.name,e.creator)),this._previousNotifiedSongId=e.id,this._previousNotificationTime=i)}addSongStartRequest(e,t,i,n,r,a){if(e<0||e>=Qs.PRIORITY_COUNT)return!1;const o=new bTe(t,i,n,r,a);return this._songRequestsPerPriority[e]=o,this._songRequestCountsPerPriority[e]=this._songRequestCountsPerPriority[e]+1,!0}getSongDataEntry(e){let t;return this._availableSongs&&(t=this._availableSongs.get(e)),t}getSongStartRequest(e){return this._songRequestsPerPriority[e]}getTopRequestPriority(){return this._songRequestsPerPriority.length-1}getSongIdRequestedAtPriority(e){return e<0||e>=Qs.PRIORITY_COUNT||!this._songRequestsPerPriority[e]?-1:this._songRequestsPerPriority[e].songId}getSongRequestCountAtPriority(e){return e<0||e>=Qs.PRIORITY_COUNT?-1:this._songRequestCountsPerPriority[e]}playSongWithHighestPriority(){let e;this._priorityPlaying=-1,this._songIdPlaying=-1,this._requestNumberPlaying=-1;let i=this.getTopRequestPriority();for(;i>=0;){if(e=this.getSongIdRequestedAtPriority(i),e>=0&&this.playSongObject(i,e))return;i--}}resetSongStartRequest(e){e>=0&&e=0){const t=this.getSongIdPlayingAtPriority(e);if(t>=0)return this.getSongDataEntry(t),this._musicPlayer.stop(),!0}return!1}onSoundMachineInit(e){this.disposeRoomPlaylist()}onSoundMachineDispose(e){this.disposeRoomPlaylist()}onJukeboxInit(e){this.disposeRoomPlaylist(),this._roomItemPlaylist=new ATe,this._roomItemPlaylist.init(),ce.instance.communication.connection.send(new F6)}onJukeboxDispose(e){this.disposeRoomPlaylist()}disposeRoomPlaylist(){this._roomItemPlaylist&&(this._roomItemPlaylist.dispose(),this._roomItemPlaylist=void 0)}};ou.SKIP_POSITION_SET=-1,ou.MAXIMUM_NOTIFY_PRIORITY=Qs.PRIORITY_ROOM_PLAYLIST;let bA=ou;class MTe extends Yr{constructor(){super(),this._volumeSystem=.5,this._volumeFurni=.5,this._volumeTrax=.5,this._internalSamples=new li,this._furniSamples=new li,this._furnitureBeingPlayed=new li,this._musicController=new bA,this.onEvent=this.onEvent.bind(this)}onInit(){this._musicController.init(),ce.instance.roomEngine.events.addEventListener($s.PLAY_SAMPLE,this.onEvent),ce.instance.roomEngine.events.addEventListener(Se.REMOVED,this.onEvent),ce.instance.roomEngine.events.addEventListener(ft.DISPOSED,this.onEvent),ce.instance.events.addEventListener(Su.SETTINGS_UPDATED,this.onEvent),ce.instance.events.addEventListener(hd.PLAY_SOUND,this.onEvent)}onDispose(){this._musicController&&(this._musicController.dispose(),this._musicController=null),ce.instance.roomEngine.events.removeEventListener($s.PLAY_SAMPLE,this.onEvent),ce.instance.roomEngine.events.removeEventListener(Se.REMOVED,this.onEvent),ce.instance.roomEngine.events.removeEventListener(ft.DISPOSED,this.onEvent),ce.instance.events.removeEventListener(Su.SETTINGS_UPDATED,this.onEvent),ce.instance.events.removeEventListener(hd.PLAY_SOUND,this.onEvent)}onEvent(e){var t;switch(e.type){case $s.PLAY_SAMPLE:{const i=e;this.playFurniSample(i.objectId,i.sampleId,i.pitch);return}case Se.REMOVED:{const i=e;this.stopFurniSample(i.objectId);return}case ft.DISPOSED:{this._furnitureBeingPlayed.getKeys().forEach(i=>{this.stopFurniSample(i)});return}case Su.SETTINGS_UPDATED:{const i=e,n=i.volumeFurni!==this._volumeFurni,r=i.volumeTrax!==this._volumeTrax;this._volumeSystem=i.volumeSystem/100,this._volumeFurni=i.volumeFurni/100,this._volumeTrax=i.volumeTrax/100,n&&this.updateFurniSamplesVolume(this._volumeFurni),r&&((t=this._musicController)==null||t.updateVolume(this._volumeTrax));return}case hd.PLAY_SOUND:{const i=e;this.playInternalSample(i.sampleCode);return}}}playSample(e,t,i=1){e.volume=t,e.currentTime=0;try{e.play()}catch(n){le.error(n)}}playInternalSample(e){let t=this._internalSamples.getValue(e);if(!t){const i=Te.getValue("sounds.url");t=new Audio(i.replace("%sample%",e)),this._internalSamples.add(e,t)}this.playSample(t,this._volumeSystem)}playFurniSample(e,t,i){let n=this._furniSamples.getValue(t);if(!n){const r=Te.getValue("external.samples.url");n=new Audio(r.replace("%sample%",t.toString())),this._furniSamples.add(t,n)}this._furnitureBeingPlayed.hasKey(e)||this._furnitureBeingPlayed.add(e,t),n.onended=r=>{this.stopFurniSample(e)},n.onpause=r=>{this.stopFurniSample(e)},n.onerror=r=>{this.stopFurniSample(e)},this.playSample(n,this._volumeFurni,i)}stopInternalSample(e){const t=this._internalSamples.getValue(e);if(t)try{t.pause()}catch(i){le.error(i)}}stopFurniSample(e){const t=this._furnitureBeingPlayed.getValue(e);if(!t)return;const i=this._furniSamples.getValue(t);if(this._furnitureBeingPlayed.remove(e),!!i)try{i.pause()}catch(n){le.error(n)}}updateInternalSamplesVolume(e){this._internalSamples.getValues().forEach(t=>{t.volume=e})}updateFurniSamplesVolume(e){this._furniSamples.getValues().forEach(t=>{t.volume=e})}get traxVolume(){return this._volumeTrax}get musicController(){return this._musicController}}He.available;de.SCALE_MODE=window.devicePixelRatio%1?tn.LINEAR:tn.NEAREST;de.ROUND_PIXELS=!0;de.GC_MAX_IDLE=120;const Sn=class Sn{constructor(e,t){Sn.INSTANCE||(Sn.INSTANCE=this),this._application=new oi(t),this._core=e,this._events=new fn,this._communication=new pEe(e.communication),this._localization=new vEe(this._communication),this._avatar=new OA,this._roomEngine=new Z_(this._communication),this._sessionDataManager=new STe(this._communication),this._roomSessionManager=new RTe(this._communication,this._roomEngine),this._roomManager=new QR(this._roomEngine,this._roomEngine.visualizationFactory,this._roomEngine.logicFactory),this._cameraManager=new aZ,this._soundManager=new MTe,this._linkTrackers=[],this._isReady=!1,this._isDisposed=!1,this._core.configuration.events.addEventListener(Ao.LOADED,this.onConfigurationLoadedEvent.bind(this)),this._roomEngine.events.addEventListener(ft.ENGINE_INITIALIZED,this.onRoomEngineReady.bind(this))}static bootstrap(){Sn.INSTANCE&&(Sn.INSTANCE.dispose(),Sn.INSTANCE=null);const e=document.createElement("canvas"),t=new this(new _Q,{autoDensity:!1,width:window.innerWidth,height:window.innerHeight,resolution:window.devicePixelRatio,view:e});e.addEventListener("webglcontextlost",()=>t.events.dispatchEvent(new Ye(Sn.WEBGL_CONTEXT_LOST)))}init(){if(!(this._isReady||this._isDisposed)){if(this._avatar&&this._avatar.init(),this._soundManager&&this._soundManager.init(),this._roomEngine&&(this._roomEngine.sessionDataManager=this._sessionDataManager,this._roomEngine.roomSessionManager=this._roomSessionManager,this._roomEngine.roomManager=this._roomManager,this._sessionDataManager&&this._sessionDataManager.init(),this._roomSessionManager&&this._roomSessionManager.init(),this._roomEngine.init()),!this._communication.connection)throw new Error("No connection found");new mEe(this._communication.connection),this._isReady=!0}}dispose(){this._isDisposed||(this._roomManager&&(this._roomManager.dispose(),this._roomManager=null),this._roomSessionManager&&(this._roomSessionManager.dispose(),this._roomSessionManager=null),this._sessionDataManager&&(this._sessionDataManager.dispose(),this._sessionDataManager=null),this._roomEngine&&(this._roomEngine.dispose(),this._roomEngine=null),this._avatar&&(this._avatar.dispose(),this._avatar=null),this._soundManager&&(this._soundManager.dispose(),this._soundManager=null),this._communication&&(this._communication.dispose(),this._communication=null),this._application&&(this._application.destroy(),this._application=null),this._isDisposed=!0,this._isReady=!1)}onConfigurationLoadedEvent(e){ga().maxFPS=Te.getValue("system.fps.max",24),le.LOG_DEBUG=Te.getValue("system.log.debug",!0),le.LOG_WARN=Te.getValue("system.log.warn",!1),le.LOG_ERROR=Te.getValue("system.log.error",!1),le.LOG_EVENTS=Te.getValue("system.log.events",!1),le.LOG_PACKETS=Te.getValue("system.log.packets",!1),Vv.LANDSCAPES_ENABLED=Te.getValue("room.landscapes.enabled",!0)}onRoomEngineReady(e){this.startSendingHeartBeat()}getConfiguration(e,t=null){return Te.getValue(e,t)}getLocalization(e){return this._localization.getValue(e)}getLocalizationWithParameter(e,t,i){return this._localization.getValueWithParameter(e,t,i)}getLocalizationWithParameters(e,t,i){return this._localization.getValueWithParameters(e,t,i)}addLinkEventTracker(e){this._linkTrackers.indexOf(e)>=0||this._linkTrackers.push(e)}removeLinkEventTracker(e){const t=this._linkTrackers.indexOf(e);t!==-1&&this._linkTrackers.splice(t,1)}createLinkEvent(e){if(!(!e||e===""))for(const t of this._linkTrackers){if(!t)continue;const i=t.eventUrlPrefix;i.length>0?e.substr(0,i.length)===i&&t.linkReceived(e):t.linkReceived(e)}}startSendingHeartBeat(){this.sendHeartBeat(),window.setInterval(this.sendHeartBeat,1e4)}sendHeartBeat(){Jc.sendHeartBeat()}get application(){return this._application}get core(){return this._core}get events(){return this._events}get localization(){return this._localization}get communication(){return this._communication}get avatar(){return this._avatar}get roomEngine(){return this._roomEngine}get sessionDataManager(){return this._sessionDataManager}get roomSessionManager(){return this._roomSessionManager}get roomManager(){return this._roomManager}get cameraManager(){return this._cameraManager}get soundManager(){return this._soundManager}get width(){return this._application.renderer.width}get height(){return this._application.renderer.height}get isReady(){return this._isReady}get isDisposed(){return this._isDisposed}static get instance(){return this.INSTANCE||null}};Sn.WEBGL_CONTEXT_LOST="NE_WEBGL_CONTEXT_LOST",Sn.WEBGL_UNAVAILABLE="NE_WEBGL_UNAVAILABLE",Sn.READY="NE_READY!",Sn.INSTANCE=null;let ce=Sn;const Me=class Me{static format(e,t="",i=3){return e>i*Me.YEAR?Me.getLocalization("friendlytime.years"+t,Math.round(e/Me.YEAR)):e>i*Me.MONTH?Me.getLocalization("friendlytime.months"+t,Math.round(e/Me.MONTH)):e>i*Me.DAY?Me.getLocalization("friendlytime.days"+t,Math.round(e/Me.DAY)):e>i*Me.HOUR?Me.getLocalization("friendlytime.hours"+t,Math.round(e/Me.HOUR)):e>i*Me.MINUTE?Me.getLocalization("friendlytime.minutes"+t,Math.round(e/Me.MINUTE)):Me.getLocalization("friendlytime.seconds"+t,Math.round(e))}static shortFormat(e,t="",i=3){return e>i*Me.YEAR?Me.getLocalization("friendlytime.years.short"+t,Math.round(e/Me.YEAR)):e>i*Me.MONTH?Me.getLocalization("friendlytime.months.short"+t,Math.round(e/Me.MONTH)):e>i*Me.DAY?Me.getLocalization("friendlytime.days.short"+t,Math.round(e/Me.DAY)):e>i*Me.HOUR?Me.getLocalization("friendlytime.hours.short"+t,Math.round(e/Me.HOUR)):e>i*Me.MINUTE?Me.getLocalization("friendlytime.minutes.short"+t,Math.round(e/Me.MINUTE)):Me.getLocalization("friendlytime.seconds.short"+t,Math.round(e))}static getLocalization(e,t){return ce.instance.getLocalizationWithParameter(e,"amount",t.toString())}};Me.MINUTE=60,Me.HOUR=60*Me.MINUTE,Me.DAY=24*Me.HOUR,Me.WEEK=7*Me.DAY,Me.MONTH=30*Me.DAY,Me.YEAR=365*Me.DAY;let gk=Me;const XE=class XE{static isBuilderClubId(e){return e>=XE.BUILDER_CLUB_FURNI_ID_BASE}};XE.BUILDER_CLUB_FURNI_ID_BASE=2147418112;let zv=XE;const NTe=s=>s>>>0,V5=s=>{const e=NTe(s);return e>=Math.pow(2,31)?e-Math.pow(2,32):e};class Xw{constructor(e){if(this._id=e.id,this._isMain=e.main||!1,this._avatarSets=new Map,this._bodyParts=[],this._allBodyParts=[],e.avatarSets&&e.avatarSets.length>0)for(const i of e.avatarSets){if(!i)continue;const n=new Xw(i);this._avatarSets.set(n.id,n)}if(e.bodyParts&&e.bodyParts.length>0)for(const i of e.bodyParts)i&&this._bodyParts.push(i.id);let t=this._bodyParts.concat();for(const i of this._avatarSets.values())i&&(t=t.concat(i.getBodyParts()));this._allBodyParts=t}findAvatarSet(e){if(e===this._id)return this;for(const t of this._avatarSets.values())if(t&&t.findAvatarSet(e))return t;return null}getBodyParts(){return this._allBodyParts.concat()}get id(){return this._id}get isMain(){if(this._isMain)return!0;for(const e of this._avatarSets.values())if(e&&e.isMain)return!0;return!1}}class rn{constructor(e=0,t=0,i=0){this._x=e,this._y=t,this._z=i}static dot(e,t){return e.x*t.x+e.y*t.y+e.z*t.z}static cross(e,t){const i=new rn;return i.x=e.y*t.z-e.z*t.y,i.y=e.z*t.x-e.x*t.z,i.z=e.x*t.y-e.y*t.x,i}static subtract(e,t){return new rn(e.x-t.x,e.y-t.y,e.z-t.z)}dot(e){return this._x*e.x+this._y*e.y+this._z*e.z}cross(e){const t=new rn;return t.x=this._y*e.z-this._z*e.y,t.y=this._z*e.x-this._x*e.z,t.z=this._x*e.y-this._y*e.x,t}subtract(e){this._x=this._x-e.x,this._y=this._y-e.y,this._z=this._z-e.z}add(e){this._x=this._x+e.x,this._y=this._y+e.y,this._z=this._z+e.z}normalize(){const e=1/this.length();this._x=this._x*e,this._y=this._y*e,this._z=this._z*e}scaleBy(e){this._x*=e,this._y*=e,this._z*=e}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z)}toString(){return"Vector3D: ("+this._x+","+this._y+","+this._z+")"}get x(){return this._x}set x(e){this._x=e}get y(){return this._y}set y(e){this._y=e}get z(){return this._z}set z(e){this._z=e}}class j5{constructor(e,t,i){this._location=new rn(e,t,i),this._transformedLocation=new rn,this._needsTransformation=!1,(e!=0||t!=0||i!=0)&&(this._needsTransformation=!0)}get location(){return this._location}get transformedLocation(){return this._transformedLocation}applyTransform(e){this._needsTransformation&&(this._transformedLocation=e.vectorMultiplication(this._location))}}class pk extends j5{constructor(e,t=!1){super(parseFloat(e.x),parseFloat(e.y),parseFloat(e.z)),this._id=e.id,this._radius=parseFloat(e.radius),this._normal=new rn(parseFloat(e.nx),parseFloat(e.ny),parseFloat(e.nz)),this._isDoubleSided=e.double||!1,this._isDynamic=t}getDistance(e){const t=Math.abs(e.z-this.transformedLocation.z-this._radius),i=Math.abs(e.z-this.transformedLocation.z+this._radius);return Math.min(t,i)}get id(){return this._id}get normal(){return this._normal}get isDoubleSided(){return this._isDoubleSided}toString(){return this._id+": "+this.location+" - "+this.transformedLocation}get isDynamic(){return this._isDynamic}}class PTe extends j5{constructor(e){if(super(parseFloat(e.x),parseFloat(e.y),parseFloat(e.z)),this._id=e.id,this._radius=parseFloat(e.radius),this._parts=new Map,this._dynamicParts=new Map,e.items&&e.items.length>0)for(const t of e.items){if(!t)continue;const i=new pk(t);this._parts.set(i.id,i)}}getDynamicParts(e){const t=this._dynamicParts.get(e),i=[];if(t)for(const n in t){const r=t[n];r&&i.push(r)}return i}getPartIds(e){const t=[];for(const i of this._parts.values())i&&t.push(i.id);if(e){const i=this._dynamicParts.get(e);if(i)for(const n in i){const r=i[n];r&&t.push(r.id)}}return t}removeDynamicParts(e){return this._dynamicParts.delete(e),!0}addPart(e,t){if(this.hasPart(e.id,t))return!1;let i=this._dynamicParts.get(t);return i||(i={},this._dynamicParts.set(t,i)),i[e.id]=new pk(e,!0),!0}hasPart(e,t){let i=this._parts.get(e)||null;return!i&&this._dynamicParts.get(t)!==void 0&&(i=this._dynamicParts.get(t)[e]||null),i!==null}getParts(e,t,i,n){const r=[];for(const l of this._parts.values())l&&(l.applyTransform(e),r.push([l.getDistance(t),l]));const a=this._dynamicParts.get(n);if(a)for(const l in a){const u=a[l];u&&(u.applyTransform(e),r.push([u.getDistance(t),u]))}r.sort((l,u)=>{const c=l[0],h=u[0];return ch?1:0});const o=[];for(const l of r)l&&o.push(l[1].id);return o}getDistance(e){const t=Math.abs(e.z-this.transformedLocation.z-this._radius),i=Math.abs(e.z-this.transformedLocation.z+this._radius);return Math.min(t,i)}get id(){return this._id}get radius(){return this._radius}}const Ks=class Ks{constructor(e=0,t=0,i=0,n=0,r=0,a=0,o=0,l=0,u=0){this._data=[e,t,i,n,r,a,o,l,u]}static getXRotationMatrix(e){const t=e*Math.PI/180,i=Math.cos(t),n=Math.sin(t);return new Ks(1,0,0,0,i,-n,0,n,i)}static getYRotationMatrix(e){const t=e*Math.PI/180,i=Math.cos(t),n=Math.sin(t);return new Ks(i,0,n,0,1,0,-n,0,i)}static getZRotationMatrix(e){const t=e*Math.PI/180,i=Math.cos(t),n=Math.sin(t);return new Ks(i,-n,0,n,i,0,0,0,1)}identity(){return this._data=[1,0,0,0,1,0,0,0,1],this}vectorMultiplication(e){const t=e.x*this._data[0]+e.y*this._data[3]+e.z*this._data[6],i=e.x*this._data[1]+e.y*this._data[4]+e.z*this._data[7],n=e.x*this._data[2]+e.y*this._data[5]+e.z*this._data[8];return new rn(t,i,n)}multiply(e){const t=this._data[0]*e.data[0]+this._data[1]*e.data[3]+this._data[2]*e.data[6],i=this._data[0]*e.data[1]+this._data[1]*e.data[4]+this._data[2]*e.data[7],n=this._data[0]*e.data[2]+this._data[1]*e.data[5]+this._data[2]*e.data[8],r=this._data[3]*e.data[0]+this._data[4]*e.data[3]+this._data[5]*e.data[6],a=this._data[3]*e.data[1]+this._data[4]*e.data[4]+this._data[5]*e.data[7],o=this._data[3]*e.data[2]+this._data[4]*e.data[5]+this._data[5]*e.data[8],l=this._data[6]*e.data[0]+this._data[7]*e.data[3]+this._data[8]*e.data[6],u=this._data[6]*e.data[1]+this._data[7]*e.data[4]+this._data[8]*e.data[7],c=this._data[6]*e.data[2]+this._data[7]*e.data[5]+this._data[8]*e.data[8];return new Ks(t,i,n,r,a,o,l,u,c)}scalarMultiply(e){let t=0;for(;t0)for(const i of e.canvases){if(!i)continue;const n=i.scale,r=new Map;if(i.geometries&&i.geometries.length>0)for(const a of i.geometries){if(!a)continue;const o=new PQ(a,n);r.set(o.id,o)}this._canvases.set(n,r)}if(e.types&&e.types.length>0)for(const i of e.types){if(!i)continue;const n=new Map,r=new Map;if(i.bodyParts&&i.bodyParts.length>0)for(const a of i.bodyParts){if(!a)continue;const o=new PTe(a);n.set(o.id,o);for(const l of o.getPartIds(null))r.set(l,o)}this._geometryTypes.set(i.id,n),this._itemIdToBodyPartMap.set(i.id,r)}}removeDynamicItems(e){for(const t of this._geometryTypes.values())if(t)for(const i of t.values())i&&i.removeDynamicParts(e)}getBodyPartIdsInAvatarSet(e){const t=this._avatarSet.findAvatarSet(e);return t?t.getBodyParts():[]}isMainAvatarSet(e){const t=this._avatarSet.findAvatarSet(e);return t?t.isMain:!1}getCanvas(e,t){const i=this._canvases.get(e);return i&&i.get(t)||null}typeExists(e){return!!this._geometryTypes.get(e)}hasBodyPart(e,t){if(this.typeExists(e)){const i=this._geometryTypes.get(e);if(i&&i.get(t))return!0}return!1}getBodyPartIDs(e){const t=this.getBodyPartsOfType(e),i=[];if(t)for(const n of t.values())n&&i.push(n.id);return i}getBodyPartsOfType(e){return this.typeExists(e)?this._geometryTypes.get(e):new Map}getBodyPart(e,t){return this.getBodyPartsOfType(e).get(t)||null}getBodyPartOfItem(e,t,i){const n=this._itemIdToBodyPartMap.get(e);if(n){const r=n.get(t);if(r)return r;const a=this.getBodyPartsOfType(e);if(a){for(const o of a.values())if(o&&o.hasPart(t,i))return o}}return null}getBodyPartsInAvatarSet(e,t){const i=this.getBodyPartIdsInAvatarSet(t),n=[];for(const r of i){if(!r)continue;const a=e.get(r);a&&n.push(a)}return n}getBodyPartsAtAngle(e,t,i){if(!i)return[];const n=this.getBodyPartsOfType(i),r=this.getBodyPartsInAvatarSet(n,e),a=[],o=[];this._transformation=gd.getYRotationMatrix(t);for(const l of r.values())l&&(l.applyTransform(this._transformation),a.push([l.getDistance(this._camera),l]));a.sort((l,u)=>{const c=l[0],h=u[0];return ch?1:0});for(const l of a)l&&o.push(l[1].id);return o}getParts(e,t,i,n,r){if(this.hasBodyPart(e,t)){const a=this.getBodyPartsOfType(e).get(t);return this._transformation=gd.getYRotationMatrix(i),a.getParts(this._transformation,this._camera,n,r)}return[]}}class xTe extends fn{constructor(e){super(),this._renderManager=e,this._geometry=null,this._figureData=new LQ,this._partSetsData=new UQ,this._animationData=new NQ,this._animationManager=new SQ,this._mandatorySetTypeIds={},this._actionManager=null,this._defaultAction=null}init(){}dispose(){this.disposed||(super.dispose(),this._renderManager=null,this._figureData=null,this._partSetsData=null,this._animationData=null,this._mandatorySetTypeIds=null)}initGeometry(e){e&&(this._geometry=new kTe(e))}initActions(e,t){t&&(this._actionManager=new mQ(e,t),this._defaultAction=this._actionManager.getDefaultAction())}updateActions(e){this._actionManager.updateActions(e),this._defaultAction=this._actionManager.getDefaultAction()}initPartSets(e){return e&&this._partSetsData.parse(e)?(this._partSetsData.getPartDefinition("ri").appendToFigure=!0,this._partSetsData.getPartDefinition("li").appendToFigure=!0,!0):!1}initAnimation(e){return e?this._animationData.parse(e):!1}initFigureData(e){return e?this._figureData.parse(e):!1}injectFigureData(e){this._figureData.injectJSON(e)}registerAnimations(e,t="fx",i=200){let n=0;for(;n-1){if(g){const ne=g.getPart(P.type);ne?c=ne.frames:c=_}else c=_;u=i.definition,f.indexOf(P.type)===-1&&(u=this._defaultAction);const k=this._partSetsData.getPartDefinition(P.type);let L=k?k.flippedSetType:P.type;(!L||L==="")&&(L=P.type),T&&T.length>P.colorLayerIndex-1&&(h=C.getColor(T[P.colorLayerIndex-1]));const j=P.colorLayerIndex>0,z=new oT(e,P.type,P.id.toString(),h,c,u,j,P.paletteMap,L);d.push(z)}}}}}const v=[];for(const E of p){let y=null,T=!1;const w=l&&l.get(E);for(const C of d)C.partType===E&&(w?y=C.color:(T=!0,a.indexOf(E)===-1&&v.push(C)));if(!T){if(w){const C=l.get(E);let N=0,P=0;for(;P-1){const C=this._geometry.getBodyPartOfItem(n,E,o);if(e===C.id){const N=this._partSetsData.getPartDefinition(E);let P=!1,k=1;if(N.appendToFigure){let L="1";if(i.actionParameter!==""&&(L=i.actionParameter),N.hasStaticId()&&(L=N.staticId.toString()),g){const z=g.getPart(E);z?c=z.frames:c=_}else c=_;const j=new oT(e,E,L,null,c,i.definition,!1,-1,E,P,k);v.push(j)}}}}}return v}getPopulatedArray(e){const t=[];let i=0;for(;i{if(e.responseText){const i=JSON.parse(e.responseText);this.processEffectMap(i.effects),this.processMissingLibraries(),this._isReady=!0,this.dispatchEvent(new Ye(lu.DOWNLOADER_READY))}},e.onerror=t=>{throw new Error("invalid_avatar_effect_map")}}catch(t){le.error(t)}}processEffectMap(e){if(e)for(const t of e){if(!t)continue;const i=t.id,n=t.lib,r=t.revision||"";if(this._libraryNames.indexOf(n)>=0)continue;this._libraryNames.push(n);const a=new AA(n,r,this._assets,Te.getValue("avatar.asset.effect.url"));a.addEventListener(_u.DOWNLOAD_COMPLETE,this.onLibraryLoaded);let o=this._effectMap.get(i);o||(o=[]),o.push(a),this._effectMap.set(i,o)}}downloadAvatarEffect(e,t){if(!this._isReady||!this._structure.renderManager.isReady){this._initDownloadBuffer.push([e,t]);return}const i=this.getAvatarEffectPendingLibraries(e);if(i&&i.length){if(t&&!t.disposed){let n=this._effectListeners.get(e.toString());n||(n=[]),n.push(t),this._effectListeners.set(e.toString(),n)}this._incompleteEffects.set(e.toString(),i);for(const n of i)n&&this.downloadLibrary(n)}else t&&!t.disposed&&t.resetEffect(e)}onAvatarRenderReady(e){if(e){for(const[t,i]of this._initDownloadBuffer)this.downloadAvatarEffect(t,i);this._initDownloadBuffer=[]}}onLibraryLoaded(e){if(!e||!e.library)return;const t=[];this._structure.registerAnimation(e.library.animation);for(const[n,r]of this._incompleteEffects.entries()){let a=!0;for(const o of r)if(!(!o||o.isLoaded)){a=!1;break}if(a){t.push(n);const o=this._effectListeners.get(n);for(const l of o)!l||l.disposed||l.resetEffect(parseInt(n));this._effectListeners.delete(n),this.dispatchEvent(new Ye(lu.LIBRARY_LOADED))}}for(const n of t)this._incompleteEffects.delete(n);let i=0;for(;i=0||this._currentDownloads.indexOf(e)>=0||(this._pendingDownloadQueue.push(e),this.processDownloadQueue())}processDownloadQueue(){for(;this._pendingDownloadQueue.length;)this._pendingDownloadQueue[0].downloadAsset(),this._currentDownloads.push(this._pendingDownloadQueue.shift())}};lu.DOWNLOADER_READY="EADM_DOWNLOADER_READY",lu.LIBRARY_LOADED="EADM_LIBRARY_LOADED",lu.MAX_DOWNLOADS=2;let Fl=lu;class FTe extends av{constructor(e,t,i,n,r){super(e,t,i,n,r,null)}isPlaceholder(){return!0}}const KE=class KE extends Yr{constructor(){super(),this._structure=null,this._avatarAssetDownloadManager=null,this._placeHolderFigure=null,this._figureMapReady=!1,this._effectMapReady=!1,this._actionsReady=!1,this._geometryReady=!1,this._partSetsReady=!1,this._animationsReady=!1,this._isReady=!1,this.onAvatarAssetDownloaderReady=this.onAvatarAssetDownloaderReady.bind(this),this.onAvatarAssetDownloaded=this.onAvatarAssetDownloaded.bind(this),this.onEffectAssetDownloaderReady=this.onEffectAssetDownloaderReady.bind(this),this.onEffectAssetDownloaded=this.onEffectAssetDownloaded.bind(this),this.onAvatarStructureDownloadDone=this.onAvatarStructureDownloadDone.bind(this)}onInit(){this._structure=new xTe(this),this.loadGeometry(),this.loadPartSets(),this.loadActions(),this.loadAnimations(),this.loadFigureData(),this._aliasCollection=new EQ(this,wn()),this._aliasCollection.init(),this._avatarAssetDownloadManager||(this._avatarAssetDownloadManager=new Dl(wn(),this._structure),this._avatarAssetDownloadManager.addEventListener(Dl.DOWNLOADER_READY,this.onAvatarAssetDownloaderReady),this._avatarAssetDownloadManager.addEventListener(Dl.LIBRARY_LOADED,this.onAvatarAssetDownloaded)),this._effectAssetDownloadManager||(this._effectAssetDownloadManager=new Fl(wn(),this._structure),this._effectAssetDownloadManager.addEventListener(Fl.DOWNLOADER_READY,this.onEffectAssetDownloaderReady),this._effectAssetDownloadManager.addEventListener(Fl.LIBRARY_LOADED,this.onEffectAssetDownloaded)),this.checkReady()}onDispose(){this._avatarAssetDownloadManager&&(this._avatarAssetDownloadManager.removeEventListener(Dl.DOWNLOADER_READY,this.onAvatarAssetDownloaderReady),this._avatarAssetDownloadManager.removeEventListener(Dl.LIBRARY_LOADED,this.onAvatarAssetDownloaded)),this._effectAssetDownloadManager&&(this._effectAssetDownloadManager.removeEventListener(Fl.DOWNLOADER_READY,this.onEffectAssetDownloaderReady),this._effectAssetDownloadManager.removeEventListener(Fl.LIBRARY_LOADED,this.onEffectAssetDownloaded))}loadGeometry(){this._structure&&(this._structure.initGeometry(LTe.geometry),this._geometryReady=!0,this.checkReady())}loadPartSets(){this._structure&&(this._structure.initPartSets(UTe.partSets),this._partSetsReady=!0,this.checkReady())}loadActions(){const e=Te.getValue("avatar.default.actions");e&&this._structure.initActions(wn(),e);const t=Te.getValue("avatar.actions.url");fetch(t).then(i=>i.json()).then(i=>{this._structure&&(this._structure.updateActions(i),this._actionsReady=!0,this.checkReady())}).catch(i=>le.error(i))}loadAnimations(){this._structure&&(this._structure.initAnimation(DTe.animations),this._animationsReady=!0,this.checkReady())}loadFigureData(){const e=Te.getValue("avatar.default.figuredata");if(!e||typeof e=="string"){le.error("XML figuredata is no longer supported");return}this._structure&&this._structure.initFigureData(e),new ov(Te.getValue("avatar.figuredata.url"),this._structure.figureData).addEventListener(ov.AVATAR_STRUCTURE_DONE,this.onAvatarStructureDownloadDone)}onAvatarStructureDownloadDone(e){this._structureReady=!0,this._structure.init(),this.checkReady()}onAvatarAssetDownloaderReady(e){e&&(this._figureMapReady=!0,this.checkReady())}onAvatarAssetDownloaded(e){e&&this._aliasCollection.reset()}onEffectAssetDownloaderReady(e){e&&(this._effectMapReady=!0,this.checkReady())}onEffectAssetDownloaded(e){e&&this._aliasCollection.reset()}checkReady(){this._isReady||!this._geometryReady||!this._partSetsReady||!this._actionsReady||!this._animationsReady||!this._figureMapReady||!this._effectMapReady||!this._structureReady||(this._isReady=!0,this.events&&this.events.dispatchEvent(new Ye(G_.AVATAR_RENDER_READY)))}createFigureContainer(e){return new Hp(e)}isFigureContainerReady(e){return this._avatarAssetDownloadManager?this._avatarAssetDownloadManager.isAvatarFigureContainerReady(e):!1}createAvatarImage(e,t,i,n=null,r=null){if(!this._structure||!this._avatarAssetDownloadManager)return null;const a=new Hp(e);return i&&this.validateAvatarFigure(a,i),this._avatarAssetDownloadManager.isAvatarFigureContainerReady(a)?new av(this._structure,this._aliasCollection,a,t,this._effectAssetDownloadManager,r):(this._placeHolderFigure||(this._placeHolderFigure=new Hp(KE.DEFAULT_FIGURE)),this._avatarAssetDownloadManager.downloadAvatarFigure(a,n),new FTe(this._structure,this._aliasCollection,this._placeHolderFigure,t,this._effectAssetDownloadManager))}downloadAvatarFigure(e,t){this._avatarAssetDownloadManager&&this._avatarAssetDownloadManager.downloadAvatarFigure(e,t)}validateAvatarFigure(e,t){let i=!1;const n=this._structure.getMandatorySetTypeIds(t,2);if(n){const r=this._structure.figureData;for(const a of n)if(e.hasPartType(a)){const o=r.getSetType(a);if(o&&!o.getPartSet(e.getPartSetId(a))){const u=this._structure.getDefaultPartSet(a,t);u&&(e.updatePart(a,u.id,[0]),i=!0)}}else{const o=this._structure.getDefaultPartSet(a,t);o&&(e.updatePart(a,o.id,[0]),i=!0)}}return!i}getFigureClubLevel(e,t,i=null){if(!this._structure)return 0;const n=this._structure.figureData,r=Array.from(e.getPartTypeIds());let a=0;for(const o of r){const l=n.getSetType(o);if(!l)continue;const u=e.getPartSetId(o),c=l.getPartSet(u);if(c){a=Math.max(c.clubLevel,a);const h=n.getPalette(l.paletteID),f=e.getPartColorIds(o);for(const d of f){const _=h.getColor(d);_&&(a=Math.max(_.clubLevel,a))}}}i||(i=this._structure.getBodyPartsUnordered(_s.FULL));for(const o of i){const l=n.getSetType(o);l&&r.indexOf(o)===-1&&(a=Math.max(l.optionalFromClubLevel(t),a))}return a}isValidFigureSetForGender(e,t){const n=this.structureData.getFigurePartSet(e);return!!(n&&(n.gender.toUpperCase()==="U"||n.gender.toUpperCase()===t.toUpperCase()))}getFigureStringWithFigureIds(e,t,i){const n=new HR;n.loadAvatarData(e,t);const r=this.resolveFigureSets(i);for(const a of r)n.savePartData(a.type,a.id,n.getColourIds(a.type));return n.getFigureString()}resolveFigureSets(e){const t=this.structureData,i=[];for(const n of e){const r=t.getFigurePartSet(n);r&&i.push(r)}return i}getMandatoryAvatarPartSetIds(e,t){return this._structure?this._structure.getMandatorySetTypeIds(e,t):null}getAssetByName(e){return this._aliasCollection.getAsset(e)}get assets(){return wn()}get isReady(){return this._isReady}get structure(){return this._structure}get structureData(){return this._structure?this._structure.figureData:null}get downloadManager(){return this._avatarAssetDownloadManager}};KE.DEFAULT_FIGURE="hd-99999-99999";let OA=KE;class BTe{constructor(e,t,i){this._layerId=e,this._partId=t,this._paletteId=i}get layerId(){return this._layerId}set layerId(e){this._layerId=e}get partId(){return this._partId}set partId(e){this._partId=e}get paletteId(){return this._paletteId}set paletteId(e){this._paletteId=e}}class Hv{constructor(e){this._typeId=this.getTypeId(e),this._paletteId=this.getPaletteId(e),this._color=this.getColor(e),this._headOnly=this.getHeadOnly(e);const t=this.getCustomData(e);this._customLayerIds=this.getCustomLayerIds(t),this._customPartIds=this.getCustomPartIds(t),this._customPaletteIds=this.getCustomPaletteIds(t),this._customParts=[];let i=0;for(;i0}get headOnly(){return this._headOnly}get figureString(){let e=this.typeId+" "+this.paletteId+" "+this.color.toString(16);e=e+(" "+this.customParts.length);for(const t of this.customParts)e=e+(" "+t.layerId+" "+t.partId+" "+t.paletteId);return e}getCustomData(e){let t=[];if(e){const i=e.split(" "),n=this._headOnly?1:0,r=4+n;if(i.length>r){const a=3+n,o=parseInt(i[a]);t=i.slice(r,r+o*3)}}return t}getCustomLayerIds(e){const t=[];let i=0;for(;i=1)return parseInt(t[0])}return 0}getPaletteId(e){if(e){const t=e.split(" ");if(t.length>=2)return parseInt(t[1])}return 0}getColor(e){if(e){const t=e.split(" ");if(t.length>=3)return parseInt(t[2],16)}return 16777215}getHeadOnly(e){if(e){const t=e.split(" ");if(t.length>=4)return t[3]==="head"}return!1}}class M0{constructor(e){this._complete=!0,this._target=e}get running(){return this._running&&!!this._target}get complete(){return this._complete}set target(e){this._target=e}get target(){return this._target}set tag(e){this._tag=e}get tag(){return this._tag}start(){this._running=!0}update(e){}stop(){this._target=null,this._running=!1}tick(e){}}class qCe extends M0{constructor(e){super(e)}tick(e){super.tick(e),this.target&&(this.target.remove(),this.target=null)}}class Kw extends M0{constructor(e,t){super(e),this._complete=!1,this._duration=t}get duration(){return this._duration}start(){super.start(),this._complete=!1,this._startTimeMs=Pe()}tick(e){super.tick(e);const t=(e-this._startTimeMs)/this._duration;t<1?this.update(t):(this.update(1),this._complete=!0)}}class $Ce extends Kw{constructor(e,t,i){super(e,t),this._height=i}start(){super.start(),this._offset=0,this.target.style.top=this._offset-this._height+"px"}update(e){super.update(e),this.target.style.top=this._offset-this._height+this.getBounceOffset(e)*this._height+"px"}getBounceOffset(e){return e<.364?7.5625*e*e:e<.727?(e=e-.545,7.5625*e*e+.75):e<.909?(e=e-.9091,7.5625*e*e+.9375):(e=e-.955,7.5625*e*e+.984375)}stop(){this.target.style.top=this._offset+"px",super.stop()}}class GTe extends Kw{constructor(e){super(e.target,e.duration),this._interval=e}start(){super.start(),this._interval.start()}update(e){super.update(e),this._interval.update(e)}stop(){super.stop(),this._interval.stop()}}class VTe extends GTe{constructor(e,t){super(e),this._rate=t}}class QCe extends VTe{constructor(e,t){super(e,t)}update(e){this._interval.update(Math.pow(e,1/this._rate))}}class ZCe extends Kw{constructor(e,t,i,n,r,a){super(e,t),this._deltaX=i,this._deltaY=n,this._height=-r,this._numJumps=a}start(){super.start(),this._startX=this.target.offsetLeft,this._startY=this.target.offsetTop}update(e){super.update(e),this.target.style.left=this._startX+this._deltaX*e+"px",this.target.style.top=this._startY+this._height*Math.abs(Math.sin(e*Math.PI*this._numJumps))+this._deltaY*e+"px"}}const Ie=class Ie{static get TIMER_TIME(){return 1e3/H$()}static runMotion(e){return Ie._RUNNING_MOTIONS.indexOf(e)===-1&&Ie._QUEUED_MOTIONS.indexOf(e)===-1&&(Ie._IS_UPDATING?Ie._QUEUED_MOTIONS.push(e):(Ie._RUNNING_MOTIONS.push(e),e.start()),Ie.startTimer()),e}static removeMotion(e){let t=Ie._RUNNING_MOTIONS.indexOf(e);t>-1?Ie._IS_UPDATING?(t=Ie._REMOVED_MOTIONS.indexOf(e),t==-1&&Ie._REMOVED_MOTIONS.push(e)):(Ie._RUNNING_MOTIONS.splice(t,1),e.running&&e.stop(),Ie._RUNNING_MOTIONS.length||Ie.stopTimer()):(t=Ie._QUEUED_MOTIONS.indexOf(e),t>-1&&Ie._QUEUED_MOTIONS.splice(t,1))}static getMotionByTag(e){for(const t of Ie._RUNNING_MOTIONS)if(t.tag==e)return t;for(const t of Ie._QUEUED_MOTIONS)if(t.tag==e)return t;return null}static getMotionByTarget(e){for(const t of Ie._RUNNING_MOTIONS)if(t.target==e)return t;for(const t of Ie._QUEUED_MOTIONS)if(t.target==e)return t;return null}static getMotionByTagAndTarget(e,t){for(const i of Ie._RUNNING_MOTIONS)if(i.tag==e&&i.target==t)return i;for(const i of Ie._QUEUED_MOTIONS)if(i.tag==e&&i.target==t)return i;return null}static get isRunning(){return!!Ie._TIMER}static get isUpdating(){return Ie._IS_UPDATING}static onTick(){Ie._IS_UPDATING=!0;const e=Pe();let t=null;for(;t=Ie._QUEUED_MOTIONS.pop();)Ie._RUNNING_MOTIONS.push(t);for(;t=Ie._REMOVED_MOTIONS.pop();)Ie._RUNNING_MOTIONS.splice(Ie._RUNNING_MOTIONS.indexOf(t),1),t.running&&t.stop();for(t of Ie._RUNNING_MOTIONS)t.running?(t.tick(e),t.complete&&Ie.removeMotion(t)):Ie.removeMotion(t);Ie._RUNNING_MOTIONS.length||Ie.stopTimer(),Ie._IS_UPDATING=!1}static startTimer(){Ie._TIMER||(Ie._TIMER=window.setInterval(Ie.onTick,Ie.TIMER_TIME))}static stopTimer(){Ie._TIMER&&(clearInterval(Ie._TIMER),Ie._TIMER=null)}getNumRunningMotions(e){let t=0;for(const i of Ie._RUNNING_MOTIONS)i.target===e&&t++;return t}};Ie._QUEUED_MOTIONS=[],Ie._RUNNING_MOTIONS=[],Ie._REMOVED_MOTIONS=[],Ie._TIMER=null,Ie._IS_UPDATING=!1;let mk=Ie;class JCe extends M0{constructor(...e){super(e?e[0].target:null),this._queue=[];for(const t of e)this._queue.push(t);this._motion=e[0],this._complete=!this._motion}get running(){return this._running&&this._motion?this._motion.running:!1}start(){super.start(),this._motion.start()}update(e){super.update(e),this._motion.running&&this._motion.update(e)}stop(){super.stop(),this._motion.stop()}tick(e){if(super.tick(e),this._motion.tick(e),this._motion.complete){this._motion.stop();const t=this._queue.indexOf(this._motion);t=this._waitTimeMs,this._complete&&this.stop()}}const qw=D.createContext({});function $w(s){const e=D.useRef(null);return e.current===null&&(e.current=s()),e.current}const N0=D.createContext(null),Qw=D.createContext({transformPagePoint:s=>s,isStatic:!1,reducedMotion:"never"});class jTe extends D.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const i=this.props.sizeRef.current;i.height=t.offsetHeight||0,i.width=t.offsetWidth||0,i.top=t.offsetTop,i.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function zTe({children:s,isPresent:e}){const t=D.useId(),i=D.useRef(null),n=D.useRef({width:0,height:0,top:0,left:0}),{nonce:r}=D.useContext(Qw);return D.useInsertionEffect(()=>{const{width:a,height:o,top:l,left:u}=n.current;if(e||!i.current||!a||!o)return;i.current.dataset.motionPopId=t;const c=document.createElement("style");return r&&(c.nonce=r),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(` [data-motion-pop-id="${t}"] { position: absolute !important; width: ${a}px !important; height: ${o}px !important; top: ${l}px !important; left: ${u}px !important; } `),()=>{document.head.removeChild(c)}},[e]),vt.jsx(jTe,{isPresent:e,childRef:i,sizeRef:n,children:D.cloneElement(s,{ref:i})})}const HTe=({children:s,initial:e,isPresent:t,onExitComplete:i,custom:n,presenceAffectsLayout:r,mode:a})=>{const o=$w(WTe),l=D.useId(),u=D.useCallback(h=>{o.set(h,!0);for(const f of o.values())if(!f)return;i&&i()},[o,i]),c=D.useMemo(()=>({id:l,initial:e,isPresent:t,custom:n,onExitComplete:u,register:h=>(o.set(h,!1),()=>o.delete(h))}),r?[Math.random(),u]:[t,u]);return D.useMemo(()=>{o.forEach((h,f)=>o.set(f,!1))},[t]),D.useEffect(()=>{!t&&!o.size&&i&&i()},[t]),a==="popLayout"&&(s=vt.jsx(zTe,{isPresent:t,children:s})),vt.jsx(N0.Provider,{value:c,children:s})};function WTe(){return new Map}function z5(s=!0){const e=D.useContext(N0);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:i,register:n}=e,r=D.useId();D.useEffect(()=>{s&&n(r)},[s]);const a=D.useCallback(()=>s&&i&&i(r),[r,i,s]);return!t&&i?[!1,a]:[!0]}const pp=s=>s.key||"";function vk(s){const e=[];return D.Children.forEach(s,t=>{D.isValidElement(t)&&e.push(t)}),e}const Zw=typeof window<"u",H5=Zw?D.useLayoutEffect:D.useEffect,tMe=({children:s,custom:e,initial:t=!0,onExitComplete:i,presenceAffectsLayout:n=!0,mode:r="sync",propagate:a=!1})=>{const[o,l]=z5(a),u=D.useMemo(()=>vk(s),[s]),c=a&&!o?[]:u.map(pp),h=D.useRef(!0),f=D.useRef(u),d=$w(()=>new Map),[_,g]=D.useState(u),[p,m]=D.useState(u);H5(()=>{h.current=!1,f.current=u;for(let y=0;y{const T=pp(y),w=a&&!o?!1:u===p||c.includes(T),C=()=>{if(d.has(T))d.set(T,!0);else return;let N=!0;d.forEach(P=>{P||(N=!1)}),N&&(E==null||E(),m(f.current),a&&(l==null||l()),i&&i())};return vt.jsx(HTe,{isPresent:w,initial:!h.current||t?void 0:!1,custom:w?void 0:e,presenceAffectsLayout:n,mode:r,onExitComplete:w?void 0:C,children:y},T)})})},an=s=>s;let W5=an;function Jw(s){let e;return()=>(e===void 0&&(e=s()),e)}const sf=(s,e,t)=>{const i=e-s;return i===0?1:(t-s)/i},xa=s=>s*1e3,Da=s=>s/1e3,YTe={useManualTiming:!1};function XTe(s){let e=new Set,t=new Set,i=!1,n=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function o(u){r.has(u)&&(l.schedule(u),s()),u(a)}const l={schedule:(u,c=!1,h=!1)=>{const d=h&&i?e:t;return c&&r.add(u),d.has(u)||d.add(u),u},cancel:u=>{t.delete(u),r.delete(u)},process:u=>{if(a=u,i){n=!0;return}i=!0,[e,t]=[t,e],e.forEach(o),e.clear(),i=!1,n&&(n=!1,l.process(u))}};return l}const mp=["read","resolveKeyframes","update","preRender","render","postRender"],KTe=40;function Y5(s,e){let t=!1,i=!0;const n={delta:0,timestamp:0,isProcessing:!1},r=()=>t=!0,a=mp.reduce((m,v)=>(m[v]=XTe(r),m),{}),{read:o,resolveKeyframes:l,update:u,preRender:c,render:h,postRender:f}=a,d=()=>{const m=performance.now();t=!1,n.delta=i?1e3/60:Math.max(Math.min(m-n.timestamp,KTe),1),n.timestamp=m,n.isProcessing=!0,o.process(n),l.process(n),u.process(n),c.process(n),h.process(n),f.process(n),n.isProcessing=!1,t&&e&&(i=!1,s(d))},_=()=>{t=!0,i=!0,n.isProcessing||s(d)};return{schedule:mp.reduce((m,v)=>{const E=a[v];return m[v]=(y,T=!1,w=!1)=>(t||_(),E.schedule(y,T,w)),m},{}),cancel:m=>{for(let v=0;vEk[s].some(t=>!!e[t])};function qTe(s){for(const e in s)nf[e]={...nf[e],...s[e]}}const $Te=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Wv(s){return s.startsWith("while")||s.startsWith("drag")&&s!=="draggable"||s.startsWith("layout")||s.startsWith("onTap")||s.startsWith("onPan")||s.startsWith("onLayout")||$Te.has(s)}let K5=s=>!Wv(s);function QTe(s){s&&(K5=e=>e.startsWith("on")?!Wv(e):s(e))}try{QTe(require("@emotion/is-prop-valid").default)}catch{}function ZTe(s,e,t){const i={};for(const n in s)n==="values"&&typeof s.values=="object"||(K5(n)||t===!0&&Wv(n)||!e&&!Wv(n)||s.draggable&&n.startsWith("onDrag"))&&(i[n]=s[n]);return i}function JTe(s){if(typeof Proxy>"u")return s;const e=new Map,t=(...i)=>s(...i);return new Proxy(t,{get:(i,n)=>n==="create"?s:(e.has(n)||e.set(n,s(n)),e.get(n))})}const P0=D.createContext({});function J_(s){return typeof s=="string"||Array.isArray(s)}function k0(s){return s!==null&&typeof s=="object"&&typeof s.start=="function"}const e2=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],t2=["initial",...e2];function x0(s){return k0(s.animate)||t2.some(e=>J_(s[e]))}function q5(s){return!!(x0(s)||s.variants)}function eIe(s,e){if(x0(s)){const{initial:t,animate:i}=s;return{initial:t===!1||J_(t)?t:void 0,animate:J_(i)?i:void 0}}return s.inherit!==!1?e:{}}function tIe(s){const{initial:e,animate:t}=eIe(s,D.useContext(P0));return D.useMemo(()=>({initial:e,animate:t}),[yk(e),yk(t)])}function yk(s){return Array.isArray(s)?s.join(" "):s}const iIe=Symbol.for("motionComponentSymbol");function Fh(s){return s&&typeof s=="object"&&Object.prototype.hasOwnProperty.call(s,"current")}function sIe(s,e,t){return D.useCallback(i=>{i&&s.onMount&&s.onMount(i),e&&(i?e.mount(i):e.unmount()),t&&(typeof t=="function"?t(i):Fh(t)&&(t.current=i))},[e])}const i2=s=>s.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),nIe="framerAppearId",$5="data-"+i2(nIe),{schedule:s2}=Y5(queueMicrotask,!1),Q5=D.createContext({});function rIe(s,e,t,i,n){var r,a;const{visualElement:o}=D.useContext(P0),l=D.useContext(X5),u=D.useContext(N0),c=D.useContext(Qw).reducedMotion,h=D.useRef(null);i=i||l.renderer,!h.current&&i&&(h.current=i(s,{visualState:e,parent:o,props:t,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:c}));const f=h.current,d=D.useContext(Q5);f&&!f.projection&&n&&(f.type==="html"||f.type==="svg")&&aIe(h.current,t,n,d);const _=D.useRef(!1);D.useInsertionEffect(()=>{f&&_.current&&f.update(t,u)});const g=t[$5],p=D.useRef(!!g&&!(!((r=window.MotionHandoffIsComplete)===null||r===void 0)&&r.call(window,g))&&((a=window.MotionHasOptimisedAnimation)===null||a===void 0?void 0:a.call(window,g)));return H5(()=>{f&&(_.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),s2.render(f.render),p.current&&f.animationState&&f.animationState.animateChanges())}),D.useEffect(()=>{f&&(!p.current&&f.animationState&&f.animationState.animateChanges(),p.current&&(queueMicrotask(()=>{var m;(m=window.MotionHandoffMarkAsComplete)===null||m===void 0||m.call(window,g)}),p.current=!1))}),f}function aIe(s,e,t,i){const{layoutId:n,layout:r,drag:a,dragConstraints:o,layoutScroll:l,layoutRoot:u}=e;s.projection=new t(s.latestValues,e["data-framer-portal-id"]?void 0:Z5(s.parent)),s.projection.setOptions({layoutId:n,layout:r,alwaysMeasureLayout:!!a||o&&Fh(o),visualElement:s,animationType:typeof r=="string"?r:"both",initialPromotionConfig:i,layoutScroll:l,layoutRoot:u})}function Z5(s){if(s)return s.options.allowProjection!==!1?s.projection:Z5(s.parent)}function oIe({preloadedFeatures:s,createVisualElement:e,useRender:t,useVisualState:i,Component:n}){var r,a;s&&qTe(s);function o(u,c){let h;const f={...D.useContext(Qw),...u,layoutId:lIe(u)},{isStatic:d}=f,_=tIe(u),g=i(u,d);if(!d&&Zw){uIe();const p=hIe(f);h=p.MeasureLayout,_.visualElement=rIe(n,g,f,e,p.ProjectionNode)}return vt.jsxs(P0.Provider,{value:_,children:[h&&_.visualElement?vt.jsx(h,{visualElement:_.visualElement,...f}):null,t(n,u,sIe(g,_.visualElement,c),g,d,_.visualElement)]})}o.displayName=`motion.${typeof n=="string"?n:`create(${(a=(r=n.displayName)!==null&&r!==void 0?r:n.name)!==null&&a!==void 0?a:""})`}`;const l=D.forwardRef(o);return l[iIe]=n,l}function lIe({layoutId:s}){const e=D.useContext(qw).id;return e&&s!==void 0?e+"-"+s:s}function uIe(s,e){D.useContext(X5).strict}function hIe(s){const{drag:e,layout:t}=nf;if(!e&&!t)return{};const i={...e,...t};return{MeasureLayout:e!=null&&e.isEnabled(s)||t!=null&&t.isEnabled(s)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}const cIe=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function n2(s){return typeof s!="string"||s.includes("-")?!1:!!(cIe.indexOf(s)>-1||/[A-Z]/u.test(s))}function Tk(s){const e=[{},{}];return s==null||s.values.forEach((t,i)=>{e[0][i]=t.get(),e[1][i]=t.getVelocity()}),e}function r2(s,e,t,i){if(typeof e=="function"){const[n,r]=Tk(i);e=e(t!==void 0?t:s.custom,n,r)}if(typeof e=="string"&&(e=s.variants&&s.variants[e]),typeof e=="function"){const[n,r]=Tk(i);e=e(t!==void 0?t:s.custom,n,r)}return e}const wA=s=>Array.isArray(s),fIe=s=>!!(s&&typeof s=="object"&&s.mix&&s.toValue),dIe=s=>wA(s)?s[s.length-1]||0:s,ts=s=>!!(s&&s.getVelocity);function Yp(s){const e=ts(s)?s.get():s;return fIe(e)?e.toValue():e}function _Ie({scrapeMotionValuesFromProps:s,createRenderState:e,onUpdate:t},i,n,r){const a={latestValues:gIe(i,n,r,s),renderState:e()};return t&&(a.onMount=o=>t({props:i,current:o,...a}),a.onUpdate=o=>t(o)),a}const J5=s=>(e,t)=>{const i=D.useContext(P0),n=D.useContext(N0),r=()=>_Ie(s,e,i,n);return t?r():$w(r)};function gIe(s,e,t,i){const n={},r=i(s,{});for(const f in r)n[f]=Yp(r[f]);let{initial:a,animate:o}=s;const l=x0(s),u=q5(s);e&&u&&!l&&s.inherit!==!1&&(a===void 0&&(a=e.initial),o===void 0&&(o=e.animate));let c=t?t.initial===!1:!1;c=c||a===!1;const h=c?o:a;if(h&&typeof h!="boolean"&&!k0(h)){const f=Array.isArray(h)?h:[h];for(let d=0;de=>typeof e=="string"&&e.startsWith(s),tB=eB("--"),pIe=eB("var(--"),a2=s=>pIe(s)?mIe.test(s.split("/*")[0].trim()):!1,mIe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,iB=(s,e)=>e&&typeof s=="number"?e.transform(s):s,Ha=(s,e,t)=>t>e?e:ttypeof s=="number",parse:parseFloat,transform:s=>s},eg={...Ef,transform:s=>Ha(0,1,s)},vp={...Ef,default:1},Ig=s=>({test:e=>typeof e=="string"&&e.endsWith(s)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${s}`}),Qa=Ig("deg"),Br=Ig("%"),Re=Ig("px"),vIe=Ig("vh"),EIe=Ig("vw"),Ik={...Br,parse:s=>Br.parse(s)/100,transform:s=>Br.transform(s*100)},yIe={borderWidth:Re,borderTopWidth:Re,borderRightWidth:Re,borderBottomWidth:Re,borderLeftWidth:Re,borderRadius:Re,radius:Re,borderTopLeftRadius:Re,borderTopRightRadius:Re,borderBottomRightRadius:Re,borderBottomLeftRadius:Re,width:Re,maxWidth:Re,height:Re,maxHeight:Re,top:Re,right:Re,bottom:Re,left:Re,padding:Re,paddingTop:Re,paddingRight:Re,paddingBottom:Re,paddingLeft:Re,margin:Re,marginTop:Re,marginRight:Re,marginBottom:Re,marginLeft:Re,backgroundPositionX:Re,backgroundPositionY:Re},TIe={rotate:Qa,rotateX:Qa,rotateY:Qa,rotateZ:Qa,scale:vp,scaleX:vp,scaleY:vp,scaleZ:vp,skew:Qa,skewX:Qa,skewY:Qa,distance:Re,translateX:Re,translateY:Re,translateZ:Re,x:Re,y:Re,z:Re,perspective:Re,transformPerspective:Re,opacity:eg,originX:Ik,originY:Ik,originZ:Re},Rk={...Ef,transform:Math.round},o2={...yIe,...TIe,zIndex:Rk,size:Re,fillOpacity:eg,strokeOpacity:eg,numOctaves:Rk},IIe={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},RIe=vf.length;function SIe(s,e,t){let i="",n=!0;for(let r=0;r({style:{},transform:{},transformOrigin:{},vars:{}}),sB=()=>({...h2(),attrs:{}}),c2=s=>typeof s=="string"&&s.toLowerCase()==="svg";function nB(s,{style:e,vars:t},i,n){Object.assign(s.style,e,n&&n.getProjectionStyles(i));for(const r in t)s.style.setProperty(r,t[r])}const rB=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function aB(s,e,t,i){nB(s,e,void 0,i);for(const n in e.attrs)s.setAttribute(rB.has(n)?n:i2(n),e.attrs[n])}const Yv={};function CIe(s){Object.assign(Yv,s)}function oB(s,{layout:e,layoutId:t}){return Qu.has(s)||s.startsWith("origin")||(e||t!==void 0)&&(!!Yv[s]||s==="opacity")}function f2(s,e,t){var i;const{style:n}=s,r={};for(const a in n)(ts(n[a])||e.style&&ts(e.style[a])||oB(a,s)||((i=t==null?void 0:t.getValue(a))===null||i===void 0?void 0:i.liveStyle)!==void 0)&&(r[a]=n[a]);return r}function lB(s,e,t){const i=f2(s,e,t);for(const n in s)if(ts(s[n])||ts(e[n])){const r=vf.indexOf(n)!==-1?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n;i[r]=s[n]}return i}function MIe(s,e){try{e.dimensions=typeof s.getBBox=="function"?s.getBBox():s.getBoundingClientRect()}catch{e.dimensions={x:0,y:0,width:0,height:0}}}const bk=["x","y","width","height","cx","cy","r"],NIe={useVisualState:J5({scrapeMotionValuesFromProps:lB,createRenderState:sB,onUpdate:({props:s,prevProps:e,current:t,renderState:i,latestValues:n})=>{if(!t)return;let r=!!s.drag;if(!r){for(const o in n)if(Qu.has(o)){r=!0;break}}if(!r)return;let a=!e;if(e)for(let o=0;o{MIe(t,i),xt.render(()=>{u2(i,n,c2(t.tagName),s.transformTemplate),aB(t,i)})})}})},PIe={useVisualState:J5({scrapeMotionValuesFromProps:f2,createRenderState:h2})};function uB(s,e,t){for(const i in e)!ts(e[i])&&!oB(i,t)&&(s[i]=e[i])}function kIe({transformTemplate:s},e){return D.useMemo(()=>{const t=h2();return l2(t,e,s),Object.assign({},t.vars,t.style)},[e])}function xIe(s,e){const t=s.style||{},i={};return uB(i,t,s),Object.assign(i,kIe(s,e)),i}function DIe(s,e){const t={},i=xIe(s,e);return s.drag&&s.dragListener!==!1&&(t.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=s.drag===!0?"none":`pan-${s.drag==="x"?"y":"x"}`),s.tabIndex===void 0&&(s.onTap||s.onTapStart||s.whileTap)&&(t.tabIndex=0),t.style=i,t}function LIe(s,e,t,i){const n=D.useMemo(()=>{const r=sB();return u2(r,e,c2(i),s.transformTemplate),{...r.attrs,style:{...r.style}}},[e]);if(s.style){const r={};uB(r,s.style,s),n.style={...r,...n.style}}return n}function UIe(s=!1){return(t,i,n,{latestValues:r},a)=>{const l=(n2(t)?LIe:DIe)(i,r,a,t),u=ZTe(i,typeof t=="string",s),c=t!==D.Fragment?{...u,...l,ref:n}:{},{children:h}=i,f=D.useMemo(()=>ts(h)?h.get():h,[h]);return D.createElement(t,{...c,children:f})}}function FIe(s,e){return function(i,{forwardMotionProps:n}={forwardMotionProps:!1}){const a={...n2(i)?NIe:PIe,preloadedFeatures:s,useRender:UIe(n),createVisualElement:e,Component:i};return oIe(a)}}function hB(s,e){if(!Array.isArray(e))return!1;const t=e.length;if(t!==s.length)return!1;for(let i=0;iwindow.ScrollTimeline!==void 0);class GIe{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>"finished"in e?e.finished:e))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let i=0;i{if(BIe()&&n.attachTimeline)return n.attachTimeline(e);if(typeof t=="function")return t(n)});return()=>{i.forEach((n,r)=>{n&&n(),this.animations[r].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let t=0;tt[e]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class VIe extends GIe{then(e,t){return Promise.all(this.animations).then(e).catch(t)}}function d2(s,e){return s?s[e]||s.default||s:void 0}const CA=2e4;function cB(s){let e=0;const t=50;let i=s.next(e);for(;!i.done&&e=CA?1/0:e}function _2(s){return typeof s=="function"}function Ak(s,e){s.timeline=e,s.onfinish=null}const g2=s=>Array.isArray(s)&&typeof s[0]=="number",jIe={linearEasing:void 0};function zIe(s,e){const t=Jw(s);return()=>{var i;return(i=jIe[e])!==null&&i!==void 0?i:t()}}const Xv=zIe(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),fB=(s,e,t=10)=>{let i="";const n=Math.max(Math.round(e/t),2);for(let r=0;r`cubic-bezier(${s}, ${e}, ${t}, ${i})`,MA={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Hf([0,.65,.55,1]),circOut:Hf([.55,0,1,.45]),backIn:Hf([.31,.01,.66,-.59]),backOut:Hf([.33,1.53,.69,.99])};function _B(s,e){if(s)return typeof s=="function"&&Xv()?fB(s,e):g2(s)?Hf(s):Array.isArray(s)?s.map(t=>_B(t,e)||MA.easeOut):MA[s]}const Gn={x:!1,y:!1};function gB(){return Gn.x||Gn.y}function HIe(s,e,t){var i;if(s instanceof Element)return[s];if(typeof s=="string"){let n=document;const r=(i=void 0)!==null&&i!==void 0?i:n.querySelectorAll(s);return r?Array.from(r):[]}return Array.from(s)}function pB(s,e){const t=HIe(s),i=new AbortController,n={passive:!0,...e,signal:i.signal};return[t,n,()=>i.abort()]}function Ok(s){return e=>{e.pointerType==="touch"||gB()||s(e)}}function WIe(s,e,t={}){const[i,n,r]=pB(s,t),a=Ok(o=>{const{target:l}=o,u=e(o);if(typeof u!="function"||!l)return;const c=Ok(h=>{u(h),l.removeEventListener("pointerleave",c)});l.addEventListener("pointerleave",c,n)});return i.forEach(o=>{o.addEventListener("pointerenter",a,n)}),r}const mB=(s,e)=>e?s===e?!0:mB(s,e.parentElement):!1,p2=s=>s.pointerType==="mouse"?typeof s.button!="number"||s.button<=0:s.isPrimary!==!1,YIe=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function XIe(s){return YIe.has(s.tagName)||s.tabIndex!==-1}const Wf=new WeakSet;function wk(s){return e=>{e.key==="Enter"&&s(e)}}function yT(s,e){s.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const KIe=(s,e)=>{const t=s.currentTarget;if(!t)return;const i=wk(()=>{if(Wf.has(t))return;yT(t,"down");const n=wk(()=>{yT(t,"up")}),r=()=>yT(t,"cancel");t.addEventListener("keyup",n,e),t.addEventListener("blur",r,e)});t.addEventListener("keydown",i,e),t.addEventListener("blur",()=>t.removeEventListener("keydown",i),e)};function Ck(s){return p2(s)&&!gB()}function qIe(s,e,t={}){const[i,n,r]=pB(s,t),a=o=>{const l=o.currentTarget;if(!Ck(o)||Wf.has(l))return;Wf.add(l);const u=e(o),c=(d,_)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),!(!Ck(d)||!Wf.has(l))&&(Wf.delete(l),typeof u=="function"&&u(d,{success:_}))},h=d=>{c(d,t.useGlobalTarget||mB(l,d.target))},f=d=>{c(d,!1)};window.addEventListener("pointerup",h,n),window.addEventListener("pointercancel",f,n)};return i.forEach(o=>{!XIe(o)&&o.getAttribute("tabindex")===null&&(o.tabIndex=0),(t.useGlobalTarget?window:o).addEventListener("pointerdown",a,n),o.addEventListener("focus",u=>KIe(u,n),n)}),r}function $Ie(s){return s==="x"||s==="y"?Gn[s]?null:(Gn[s]=!0,()=>{Gn[s]=!1}):Gn.x||Gn.y?null:(Gn.x=Gn.y=!0,()=>{Gn.x=Gn.y=!1})}const vB=new Set(["width","height","top","left","right","bottom",...vf]);let Xp;function QIe(){Xp=void 0}const Gr={now:()=>(Xp===void 0&&Gr.set(Bi.isProcessing||YTe.useManualTiming?Bi.timestamp:performance.now()),Xp),set:s=>{Xp=s,queueMicrotask(QIe)}};function m2(s,e){s.indexOf(e)===-1&&s.push(e)}function v2(s,e){const t=s.indexOf(e);t>-1&&s.splice(t,1)}class E2{constructor(){this.subscriptions=[]}add(e){return m2(this.subscriptions,e),()=>v2(this.subscriptions,e)}notify(e,t,i){const n=this.subscriptions.length;if(n)if(n===1)this.subscriptions[0](e,t,i);else for(let r=0;r!isNaN(parseFloat(s));class JIe{constructor(e,t={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(i,n=!0)=>{const r=Gr.now();this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),n&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=Gr.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=ZIe(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new E2);const i=this.events[e].add(t);return e==="change"?()=>{i(),xt.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){!t||!this.passiveEffect?this.updateAndNotify(e,t):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,t,i){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-i}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=Gr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Mk)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,Mk);return EB(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function tg(s,e){return new JIe(s,e)}function eRe(s,e,t){s.hasValue(e)?s.getValue(e).set(t):s.addValue(e,tg(t))}function tRe(s,e){const t=D0(s,e);let{transitionEnd:i={},transition:n={},...r}=t||{};r={...r,...i};for(const a in r){const o=dIe(r[a]);eRe(s,a,o)}}function iRe(s){return!!(ts(s)&&s.add)}function NA(s,e){const t=s.getValue("willChange");if(iRe(t))return t.add(e)}function yB(s){return s.props[$5]}const TB=(s,e,t)=>(((1-3*t+3*e)*s+(3*t-6*e))*s+3*e)*s,sRe=1e-7,nRe=12;function rRe(s,e,t,i,n){let r,a,o=0;do a=e+(t-e)/2,r=TB(a,i,n)-s,r>0?t=a:e=a;while(Math.abs(r)>sRe&&++orRe(r,0,1,s,t);return r=>r===0||r===1?r:TB(n(r),e,i)}const IB=s=>e=>e<=.5?s(2*e)/2:(2-s(2*(1-e)))/2,RB=s=>e=>1-s(1-e),SB=Rg(.33,1.53,.69,.99),y2=RB(SB),bB=IB(y2),AB=s=>(s*=2)<1?.5*y2(s):.5*(2-Math.pow(2,-10*(s-1))),T2=s=>1-Math.sin(Math.acos(s)),OB=RB(T2),wB=IB(T2),CB=s=>/^0[^.\s]+$/u.test(s);function aRe(s){return typeof s=="number"?s===0:s!==null?s==="none"||s==="0"||CB(s):!0}const pd=s=>Math.round(s*1e5)/1e5,I2=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function oRe(s){return s==null}const lRe=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,R2=(s,e)=>t=>!!(typeof t=="string"&&lRe.test(t)&&t.startsWith(s)||e&&!oRe(t)&&Object.prototype.hasOwnProperty.call(t,e)),MB=(s,e,t)=>i=>{if(typeof i!="string")return i;const[n,r,a,o]=i.match(I2);return{[s]:parseFloat(n),[e]:parseFloat(r),[t]:parseFloat(a),alpha:o!==void 0?parseFloat(o):1}},uRe=s=>Ha(0,255,s),TT={...Ef,transform:s=>Math.round(uRe(s))},mu={test:R2("rgb","red"),parse:MB("red","green","blue"),transform:({red:s,green:e,blue:t,alpha:i=1})=>"rgba("+TT.transform(s)+", "+TT.transform(e)+", "+TT.transform(t)+", "+pd(eg.transform(i))+")"};function hRe(s){let e="",t="",i="",n="";return s.length>5?(e=s.substring(1,3),t=s.substring(3,5),i=s.substring(5,7),n=s.substring(7,9)):(e=s.substring(1,2),t=s.substring(2,3),i=s.substring(3,4),n=s.substring(4,5),e+=e,t+=t,i+=i,n+=n),{red:parseInt(e,16),green:parseInt(t,16),blue:parseInt(i,16),alpha:n?parseInt(n,16)/255:1}}const PA={test:R2("#"),parse:hRe,transform:mu.transform},Bh={test:R2("hsl","hue"),parse:MB("hue","saturation","lightness"),transform:({hue:s,saturation:e,lightness:t,alpha:i=1})=>"hsla("+Math.round(s)+", "+Br.transform(pd(e))+", "+Br.transform(pd(t))+", "+pd(eg.transform(i))+")"},Qi={test:s=>mu.test(s)||PA.test(s)||Bh.test(s),parse:s=>mu.test(s)?mu.parse(s):Bh.test(s)?Bh.parse(s):PA.parse(s),transform:s=>typeof s=="string"?s:s.hasOwnProperty("red")?mu.transform(s):Bh.transform(s)},cRe=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function fRe(s){var e,t;return isNaN(s)&&typeof s=="string"&&(((e=s.match(I2))===null||e===void 0?void 0:e.length)||0)+(((t=s.match(cRe))===null||t===void 0?void 0:t.length)||0)>0}const NB="number",PB="color",dRe="var",_Re="var(",Nk="${}",gRe=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ig(s){const e=s.toString(),t=[],i={color:[],number:[],var:[]},n=[];let r=0;const o=e.replace(gRe,l=>(Qi.test(l)?(i.color.push(r),n.push(PB),t.push(Qi.parse(l))):l.startsWith(_Re)?(i.var.push(r),n.push(dRe),t.push(l)):(i.number.push(r),n.push(NB),t.push(parseFloat(l))),++r,Nk)).split(Nk);return{values:t,split:o,indexes:i,types:n}}function kB(s){return ig(s).values}function xB(s){const{split:e,types:t}=ig(s),i=e.length;return n=>{let r="";for(let a=0;atypeof s=="number"?0:s;function mRe(s){const e=kB(s);return xB(s)(e.map(pRe))}const nl={test:fRe,parse:kB,createTransformer:xB,getAnimatableNone:mRe},vRe=new Set(["brightness","contrast","saturate","opacity"]);function ERe(s){const[e,t]=s.slice(0,-1).split("(");if(e==="drop-shadow")return s;const[i]=t.match(I2)||[];if(!i)return s;const n=t.replace(i,"");let r=vRe.has(e)?1:0;return i!==t&&(r*=100),e+"("+r+n+")"}const yRe=/\b([a-z-]*)\(.*?\)/gu,kA={...nl,getAnimatableNone:s=>{const e=s.match(yRe);return e?e.map(ERe).join(" "):s}},TRe={...o2,color:Qi,backgroundColor:Qi,outlineColor:Qi,fill:Qi,stroke:Qi,borderColor:Qi,borderTopColor:Qi,borderRightColor:Qi,borderBottomColor:Qi,borderLeftColor:Qi,filter:kA,WebkitFilter:kA},S2=s=>TRe[s];function DB(s,e){let t=S2(s);return t!==kA&&(t=nl),t.getAnimatableNone?t.getAnimatableNone(e):void 0}const IRe=new Set(["auto","none","0"]);function RRe(s,e,t){let i=0,n;for(;is===Ef||s===Re,kk=(s,e)=>parseFloat(s.split(", ")[e]),xk=(s,e)=>(t,{transform:i})=>{if(i==="none"||!i)return 0;const n=i.match(/^matrix3d\((.+)\)$/u);if(n)return kk(n[1],e);{const r=i.match(/^matrix\((.+)\)$/u);return r?kk(r[1],s):0}},SRe=new Set(["x","y","z"]),bRe=vf.filter(s=>!SRe.has(s));function ARe(s){const e=[];return bRe.forEach(t=>{const i=s.getValue(t);i!==void 0&&(e.push([t,i.get()]),i.set(t.startsWith("scale")?1:0))}),e}const rf={width:({x:s},{paddingLeft:e="0",paddingRight:t="0"})=>s.max-s.min-parseFloat(e)-parseFloat(t),height:({y:s},{paddingTop:e="0",paddingBottom:t="0"})=>s.max-s.min-parseFloat(e)-parseFloat(t),top:(s,{top:e})=>parseFloat(e),left:(s,{left:e})=>parseFloat(e),bottom:({y:s},{top:e})=>parseFloat(e)+(s.max-s.min),right:({x:s},{left:e})=>parseFloat(e)+(s.max-s.min),x:xk(4,13),y:xk(5,14)};rf.translateX=rf.x;rf.translateY=rf.y;const Ou=new Set;let xA=!1,DA=!1;function LB(){if(DA){const s=Array.from(Ou).filter(i=>i.needsMeasurement),e=new Set(s.map(i=>i.element)),t=new Map;e.forEach(i=>{const n=ARe(i);n.length&&(t.set(i,n),i.render())}),s.forEach(i=>i.measureInitialState()),e.forEach(i=>{i.render();const n=t.get(i);n&&n.forEach(([r,a])=>{var o;(o=i.getValue(r))===null||o===void 0||o.set(a)})}),s.forEach(i=>i.measureEndState()),s.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}DA=!1,xA=!1,Ou.forEach(s=>s.complete()),Ou.clear()}function UB(){Ou.forEach(s=>{s.readKeyframes(),s.needsMeasurement&&(DA=!0)})}function ORe(){UB(),LB()}class b2{constructor(e,t,i,n,r,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=i,this.motionValue=n,this.element=r,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Ou.add(this),xA||(xA=!0,xt.read(UB),xt.resolveKeyframes(LB))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:i,motionValue:n}=this;for(let r=0;r/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(s),wRe=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function CRe(s){const e=wRe.exec(s);if(!e)return[,];const[,t,i,n]=e;return[`--${t??i}`,n]}function BB(s,e,t=1){const[i,n]=CRe(s);if(!i)return;const r=window.getComputedStyle(e).getPropertyValue(i);if(r){const a=r.trim();return FB(a)?parseFloat(a):a}return a2(n)?BB(n,e,t+1):n}const GB=s=>e=>e.test(s),MRe={test:s=>s==="auto",parse:s=>s},VB=[Ef,Re,Br,Qa,EIe,vIe,MRe],Dk=s=>VB.find(GB(s));class jB extends b2{constructor(e,t,i,n,r){super(e,t,i,n,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:i}=this;if(!t||!t.current)return;super.readKeyframes();for(let l=0;l{t.getValue(l).set(u)}),this.resolveNoneKeyframes()}}const Lk=(s,e)=>e==="zIndex"?!1:!!(typeof s=="number"||Array.isArray(s)||typeof s=="string"&&(nl.test(s)||s==="0")&&!s.startsWith("url("));function NRe(s){const e=s[0];if(s.length===1)return!0;for(let t=0;ts!==null;function L0(s,{repeat:e,repeatType:t="loop"},i){const n=s.filter(kRe),r=e&&t!=="loop"&&e%2===1?0:n.length-1;return!r||i===void 0?n[r]:i}const xRe=40;class zB{constructor({autoplay:e=!0,delay:t=0,type:i="keyframes",repeat:n=0,repeatDelay:r=0,repeatType:a="loop",...o}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Gr.now(),this.options={autoplay:e,delay:t,type:i,repeat:n,repeatDelay:r,repeatType:a,...o},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>xRe?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&ORe(),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=Gr.now(),this.hasAttemptedResolve=!0;const{name:i,type:n,velocity:r,delay:a,onComplete:o,onUpdate:l,isGenerator:u}=this.options;if(!u&&!PRe(e,i,n,r))if(a)this.options.duration=0;else{l&&l(L0(e,this.options,t)),o&&o(),this.resolveFinishedPromise();return}const c=this.initPlayback(e,t);c!==!1&&(this._resolved={keyframes:e,finalKeyframe:t,...c},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}const Ht=(s,e,t)=>s+(e-s)*t;function IT(s,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?s+(e-s)*6*t:t<1/2?e:t<2/3?s+(e-s)*(2/3-t)*6:s}function DRe({hue:s,saturation:e,lightness:t,alpha:i}){s/=360,e/=100,t/=100;let n=0,r=0,a=0;if(!e)n=r=a=t;else{const o=t<.5?t*(1+e):t+e-t*e,l=2*t-o;n=IT(l,o,s+1/3),r=IT(l,o,s),a=IT(l,o,s-1/3)}return{red:Math.round(n*255),green:Math.round(r*255),blue:Math.round(a*255),alpha:i}}function Kv(s,e){return t=>t>0?e:s}const RT=(s,e,t)=>{const i=s*s,n=t*(e*e-i)+i;return n<0?0:Math.sqrt(n)},LRe=[PA,mu,Bh],URe=s=>LRe.find(e=>e.test(s));function Uk(s){const e=URe(s);if(!e)return!1;let t=e.parse(s);return e===Bh&&(t=DRe(t)),t}const Fk=(s,e)=>{const t=Uk(s),i=Uk(e);if(!t||!i)return Kv(s,e);const n={...t};return r=>(n.red=RT(t.red,i.red,r),n.green=RT(t.green,i.green,r),n.blue=RT(t.blue,i.blue,r),n.alpha=Ht(t.alpha,i.alpha,r),mu.transform(n))},FRe=(s,e)=>t=>e(s(t)),Sg=(...s)=>s.reduce(FRe),LA=new Set(["none","hidden"]);function BRe(s,e){return LA.has(s)?t=>t<=0?s:e:t=>t>=1?e:s}function GRe(s,e){return t=>Ht(s,e,t)}function A2(s){return typeof s=="number"?GRe:typeof s=="string"?a2(s)?Kv:Qi.test(s)?Fk:zRe:Array.isArray(s)?HB:typeof s=="object"?Qi.test(s)?Fk:VRe:Kv}function HB(s,e){const t=[...s],i=t.length,n=s.map((r,a)=>A2(r)(r,e[a]));return r=>{for(let a=0;a{for(const r in i)t[r]=i[r](n);return t}}function jRe(s,e){var t;const i=[],n={color:0,var:0,number:0};for(let r=0;r{const t=nl.createTransformer(e),i=ig(s),n=ig(e);return i.indexes.var.length===n.indexes.var.length&&i.indexes.color.length===n.indexes.color.length&&i.indexes.number.length>=n.indexes.number.length?LA.has(s)&&!n.values.length||LA.has(e)&&!i.values.length?BRe(s,e):Sg(HB(jRe(i,n),n.values),t):Kv(s,e)};function WB(s,e,t){return typeof s=="number"&&typeof e=="number"&&typeof t=="number"?Ht(s,e,t):A2(s)(s,e)}const HRe=5;function YB(s,e,t){const i=Math.max(e-HRe,0);return EB(t-s(i),e-i)}const Jt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Bk=.001;function WRe({duration:s=Jt.duration,bounce:e=Jt.bounce,velocity:t=Jt.velocity,mass:i=Jt.mass}){let n,r,a=1-e;a=Ha(Jt.minDamping,Jt.maxDamping,a),s=Ha(Jt.minDuration,Jt.maxDuration,Da(s)),a<1?(n=u=>{const c=u*a,h=c*s,f=c-t,d=UA(u,a),_=Math.exp(-h);return Bk-f/d*_},r=u=>{const h=u*a*s,f=h*t+t,d=Math.pow(a,2)*Math.pow(u,2)*s,_=Math.exp(-h),g=UA(Math.pow(u,2),a);return(-n(u)+Bk>0?-1:1)*((f-d)*_)/g}):(n=u=>{const c=Math.exp(-u*s),h=(u-t)*s+1;return-.001+c*h},r=u=>{const c=Math.exp(-u*s),h=(t-u)*(s*s);return c*h});const o=5/s,l=XRe(n,r,o);if(s=xa(s),isNaN(l))return{stiffness:Jt.stiffness,damping:Jt.damping,duration:s};{const u=Math.pow(l,2)*i;return{stiffness:u,damping:a*2*Math.sqrt(i*u),duration:s}}}const YRe=12;function XRe(s,e,t){let i=t;for(let n=1;ns[t]!==void 0)}function $Re(s){let e={velocity:Jt.velocity,stiffness:Jt.stiffness,damping:Jt.damping,mass:Jt.mass,isResolvedFromDuration:!1,...s};if(!Gk(s,qRe)&&Gk(s,KRe))if(s.visualDuration){const t=s.visualDuration,i=2*Math.PI/(t*1.2),n=i*i,r=2*Ha(.05,1,1-(s.bounce||0))*Math.sqrt(n);e={...e,mass:Jt.mass,stiffness:n,damping:r}}else{const t=WRe(s);e={...e,...t,mass:Jt.mass},e.isResolvedFromDuration=!0}return e}function XB(s=Jt.visualDuration,e=Jt.bounce){const t=typeof s!="object"?{visualDuration:s,keyframes:[0,1],bounce:e}:s;let{restSpeed:i,restDelta:n}=t;const r=t.keyframes[0],a=t.keyframes[t.keyframes.length-1],o={done:!1,value:r},{stiffness:l,damping:u,mass:c,duration:h,velocity:f,isResolvedFromDuration:d}=$Re({...t,velocity:-Da(t.velocity||0)}),_=f||0,g=u/(2*Math.sqrt(l*c)),p=a-r,m=Da(Math.sqrt(l/c)),v=Math.abs(p)<5;i||(i=v?Jt.restSpeed.granular:Jt.restSpeed.default),n||(n=v?Jt.restDelta.granular:Jt.restDelta.default);let E;if(g<1){const T=UA(m,g);E=w=>{const C=Math.exp(-g*m*w);return a-C*((_+g*m*p)/T*Math.sin(T*w)+p*Math.cos(T*w))}}else if(g===1)E=T=>a-Math.exp(-m*T)*(p+(_+m*p)*T);else{const T=m*Math.sqrt(g*g-1);E=w=>{const C=Math.exp(-g*m*w),N=Math.min(T*w,300);return a-C*((_+g*m*p)*Math.sinh(N)+T*p*Math.cosh(N))/T}}const y={calculatedDuration:d&&h||null,next:T=>{const w=E(T);if(d)o.done=T>=h;else{let C=0;g<1&&(C=T===0?xa(_):YB(E,T,w));const N=Math.abs(C)<=i,P=Math.abs(a-w)<=n;o.done=N&&P}return o.value=o.done?a:w,o},toString:()=>{const T=Math.min(cB(y),CA),w=fB(C=>y.next(T*C).value,T,30);return T+"ms "+w}};return y}function Vk({keyframes:s,velocity:e=0,power:t=.8,timeConstant:i=325,bounceDamping:n=10,bounceStiffness:r=500,modifyTarget:a,min:o,max:l,restDelta:u=.5,restSpeed:c}){const h=s[0],f={done:!1,value:h},d=N=>o!==void 0&&Nl,_=N=>o===void 0?l:l===void 0||Math.abs(o-N)-g*Math.exp(-N/i),E=N=>m+v(N),y=N=>{const P=v(N),k=E(N);f.done=Math.abs(P)<=u,f.value=f.done?m:k};let T,w;const C=N=>{d(f.value)&&(T=N,w=XB({keyframes:[f.value,_(f.value)],velocity:YB(E,N,f.value),damping:n,stiffness:r,restDelta:u,restSpeed:c}))};return C(0),{calculatedDuration:null,next:N=>{let P=!1;return!w&&T===void 0&&(P=!0,y(N),C(N)),T!==void 0&&N>=T?w.next(N-T):(!P&&y(N),f)}}}const QRe=Rg(.42,0,1,1),ZRe=Rg(0,0,.58,1),KB=Rg(.42,0,.58,1),JRe=s=>Array.isArray(s)&&typeof s[0]!="number",eSe={linear:an,easeIn:QRe,easeInOut:KB,easeOut:ZRe,circIn:T2,circInOut:wB,circOut:OB,backIn:y2,backInOut:bB,backOut:SB,anticipate:AB},jk=s=>{if(g2(s)){W5(s.length===4);const[e,t,i,n]=s;return Rg(e,t,i,n)}else if(typeof s=="string")return eSe[s];return s};function tSe(s,e,t){const i=[],n=t||WB,r=s.length-1;for(let a=0;ae[0];if(r===2&&e[0]===e[1])return()=>e[1];const a=s[0]===s[1];s[0]>s[r-1]&&(s=[...s].reverse(),e=[...e].reverse());const o=tSe(e,i,n),l=o.length,u=c=>{if(a&&c1)for(;hu(Ha(s[0],s[r-1],c)):u}function sSe(s,e){const t=s[s.length-1];for(let i=1;i<=e;i++){const n=sf(0,e,i);s.push(Ht(t,1,n))}}function nSe(s){const e=[0];return sSe(e,s.length-1),e}function rSe(s,e){return s.map(t=>t*e)}function aSe(s,e){return s.map(()=>e||KB).splice(0,s.length-1)}function qv({duration:s=300,keyframes:e,times:t,ease:i="easeInOut"}){const n=JRe(i)?i.map(jk):jk(i),r={done:!1,value:e[0]},a=rSe(t&&t.length===e.length?t:nSe(e),s),o=iSe(a,e,{ease:Array.isArray(n)?n:aSe(e,n)});return{calculatedDuration:s,next:l=>(r.value=o(l),r.done=l>=s,r)}}const oSe=s=>{const e=({timestamp:t})=>s(t);return{start:()=>xt.update(e,!0),stop:()=>sl(e),now:()=>Bi.isProcessing?Bi.timestamp:Gr.now()}},lSe={decay:Vk,inertia:Vk,tween:qv,keyframes:qv,spring:XB},uSe=s=>s/100;class O2 extends zB{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:t,motionValue:i,element:n,keyframes:r}=this.options,a=(n==null?void 0:n.KeyframeResolver)||b2,o=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new a(r,o,t,i,n),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){const{type:t="keyframes",repeat:i=0,repeatDelay:n=0,repeatType:r,velocity:a=0}=this.options,o=_2(t)?t:lSe[t]||qv;let l,u;o!==qv&&typeof e[0]!="number"&&(l=Sg(uSe,WB(e[0],e[1])),e=[0,100]);const c=o({...this.options,keyframes:e});r==="mirror"&&(u=o({...this.options,keyframes:[...e].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=cB(c));const{calculatedDuration:h}=c,f=h+n,d=f*(i+1)-n;return{generator:c,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:h,resolvedDuration:f,totalDuration:d}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,t=!1){const{resolved:i}=this;if(!i){const{keyframes:N}=this.options;return{done:!0,value:N[N.length-1]}}const{finalKeyframe:n,generator:r,mirroredGenerator:a,mapPercentToKeyframes:o,keyframes:l,calculatedDuration:u,totalDuration:c,resolvedDuration:h}=i;if(this.startTime===null)return r.next(0);const{delay:f,repeat:d,repeatType:_,repeatDelay:g,onUpdate:p}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-c/this.speed,this.startTime)),t?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const m=this.currentTime-f*(this.speed>=0?1:-1),v=this.speed>=0?m<0:m>c;this.currentTime=Math.max(m,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let E=this.currentTime,y=r;if(d){const N=Math.min(this.currentTime,c)/h;let P=Math.floor(N),k=N%1;!k&&N>=1&&(k=1),k===1&&P--,P=Math.min(P,d+1),!!(P%2)&&(_==="reverse"?(k=1-k,g&&(k-=g/h)):_==="mirror"&&(y=a)),E=Ha(0,1,k)*h}const T=v?{done:!1,value:l[0]}:y.next(E);o&&(T.value=o(T.value));let{done:w}=T;!v&&u!==null&&(w=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&w);return C&&n!==void 0&&(T.value=L0(l,this.options,n)),p&&p(T.value),C&&this.finish(),T}get duration(){const{resolved:e}=this;return e?Da(e.calculatedDuration):0}get time(){return Da(this.currentTime)}set time(e){e=xa(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=Da(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=oSe,onPlay:t,startTime:i}=this.options;this.driver||(this.driver=e(r=>this.tick(r))),t&&t();const n=this.driver.now();this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=n):this.startTime=i??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(e=this.currentTime)!==null&&e!==void 0?e:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const hSe=new Set(["opacity","clipPath","filter","transform"]);function cSe(s,e,t,{delay:i=0,duration:n=300,repeat:r=0,repeatType:a="loop",ease:o="easeInOut",times:l}={}){const u={[e]:t};l&&(u.offset=l);const c=_B(o,n);return Array.isArray(c)&&(u.easing=c),s.animate(u,{delay:i,duration:n,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:r+1,direction:a==="reverse"?"alternate":"normal"})}const fSe=Jw(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),$v=10,dSe=2e4;function _Se(s){return _2(s.type)||s.type==="spring"||!dB(s.ease)}function gSe(s,e){const t=new O2({...e,keyframes:s,repeat:0,delay:0,isGenerator:!0});let i={done:!1,value:s[0]};const n=[];let r=0;for(;!i.done&&rthis.onKeyframesResolved(a,o),t,i,n),this.resolver.scheduleResolve()}initPlayback(e,t){let{duration:i=300,times:n,ease:r,type:a,motionValue:o,name:l,startTime:u}=this.options;if(!o.owner||!o.owner.current)return!1;if(typeof r=="string"&&Xv()&&pSe(r)&&(r=qB[r]),_Se(this.options)){const{onComplete:h,onUpdate:f,motionValue:d,element:_,...g}=this.options,p=gSe(e,g);e=p.keyframes,e.length===1&&(e[1]=e[0]),i=p.duration,n=p.times,r=p.ease,a="keyframes"}const c=cSe(o.owner.current,l,e,{...this.options,duration:i,times:n,ease:r});return c.startTime=u??this.calcStartTime(),this.pendingTimeline?(Ak(c,this.pendingTimeline),this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:h}=this.options;o.set(L0(e,this.options,t)),h&&h(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:i,times:n,type:a,ease:r,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:t}=e;return Da(t)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:t}=e;return Da(t.currentTime||0)}set time(e){const{resolved:t}=this;if(!t)return;const{animation:i}=t;i.currentTime=xa(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:t}=e;return t.playbackRate}set speed(e){const{resolved:t}=this;if(!t)return;const{animation:i}=t;i.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:t}=e;return t.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:t}=e;return t.startTime}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:t}=this;if(!t)return an;const{animation:i}=t;Ak(i,e)}return an}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:t}=e;t.playState==="finished"&&this.updateFinishedPromise(),t.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:t,keyframes:i,duration:n,type:r,ease:a,times:o}=e;if(t.playState==="idle"||t.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:c,onComplete:h,element:f,...d}=this.options,_=new O2({...d,keyframes:i,duration:n,type:r,ease:a,times:o,isGenerator:!0}),g=xa(this.time);u.setWithVelocity(_.sample(g-$v).value,_.sample(g).value,$v)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:t,name:i,repeatDelay:n,repeatType:r,damping:a,type:o}=e;if(!t||!t.owner||!(t.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=t.owner.getProps();return fSe()&&i&&hSe.has(i)&&!l&&!u&&!n&&r!=="mirror"&&a!==0&&o!=="inertia"}}const mSe={type:"spring",stiffness:500,damping:25,restSpeed:10},vSe=s=>({type:"spring",stiffness:550,damping:s===0?2*Math.sqrt(550):30,restSpeed:10}),ESe={type:"keyframes",duration:.8},ySe={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},TSe=(s,{keyframes:e})=>e.length>2?ESe:Qu.has(s)?s.startsWith("scale")?vSe(e[1]):mSe:ySe;function ISe({when:s,delay:e,delayChildren:t,staggerChildren:i,staggerDirection:n,repeat:r,repeatType:a,repeatDelay:o,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const w2=(s,e,t,i={},n,r)=>a=>{const o=d2(i,s)||{},l=o.delay||i.delay||0;let{elapsed:u=0}=i;u=u-xa(l);let c={keyframes:Array.isArray(t)?t:[null,t],ease:"easeOut",velocity:e.getVelocity(),...o,delay:-u,onUpdate:f=>{e.set(f),o.onUpdate&&o.onUpdate(f)},onComplete:()=>{a(),o.onComplete&&o.onComplete()},name:s,motionValue:e,element:r?void 0:n};ISe(o)||(c={...c,...TSe(s,c)}),c.duration&&(c.duration=xa(c.duration)),c.repeatDelay&&(c.repeatDelay=xa(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let h=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(h=!0)),h&&!r&&e.get()!==void 0){const f=L0(c.keyframes,o);if(f!==void 0)return xt.update(()=>{c.onUpdate(f),c.onComplete()}),new VIe([])}return!r&&zk.supports(c)?new zk(c):new O2(c)};function RSe({protectedKeys:s,needsAnimating:e},t){const i=s.hasOwnProperty(t)&&e[t]!==!0;return e[t]=!1,i}function $B(s,e,{delay:t=0,transitionOverride:i,type:n}={}){var r;let{transition:a=s.getDefaultTransition(),transitionEnd:o,...l}=e;i&&(a=i);const u=[],c=n&&s.animationState&&s.animationState.getState()[n];for(const h in l){const f=s.getValue(h,(r=s.latestValues[h])!==null&&r!==void 0?r:null),d=l[h];if(d===void 0||c&&RSe(c,h))continue;const _={delay:t,...d2(a||{},h)};let g=!1;if(window.MotionHandoffAnimation){const m=yB(s);if(m){const v=window.MotionHandoffAnimation(m,h,xt);v!==null&&(_.startTime=v,g=!0)}}NA(s,h),f.start(w2(h,f,d,s.shouldReduceMotion&&vB.has(h)?{type:!1}:_,s,g));const p=f.animation;p&&u.push(p)}return o&&Promise.all(u).then(()=>{xt.update(()=>{o&&tRe(s,o)})}),u}function FA(s,e,t={}){var i;const n=D0(s,e,t.type==="exit"?(i=s.presenceContext)===null||i===void 0?void 0:i.custom:void 0);let{transition:r=s.getDefaultTransition()||{}}=n||{};t.transitionOverride&&(r=t.transitionOverride);const a=n?()=>Promise.all($B(s,n,t)):()=>Promise.resolve(),o=s.variantChildren&&s.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:h,staggerDirection:f}=r;return SSe(s,e,c+u,h,f,t)}:()=>Promise.resolve(),{when:l}=r;if(l){const[u,c]=l==="beforeChildren"?[a,o]:[o,a];return u().then(()=>c())}else return Promise.all([a(),o(t.delay)])}function SSe(s,e,t=0,i=0,n=1,r){const a=[],o=(s.variantChildren.size-1)*i,l=n===1?(u=0)=>u*i:(u=0)=>o-u*i;return Array.from(s.variantChildren).sort(bSe).forEach((u,c)=>{u.notify("AnimationStart",e),a.push(FA(u,e,{...r,delay:t+l(c)}).then(()=>u.notify("AnimationComplete",e)))}),Promise.all(a)}function bSe(s,e){return s.sortNodePosition(e)}function ASe(s,e,t={}){s.notify("AnimationStart",e);let i;if(Array.isArray(e)){const n=e.map(r=>FA(s,r,t));i=Promise.all(n)}else if(typeof e=="string")i=FA(s,e,t);else{const n=typeof e=="function"?D0(s,e,t.custom):e;i=Promise.all($B(s,n,t))}return i.then(()=>{s.notify("AnimationComplete",e)})}const OSe=t2.length;function QB(s){if(!s)return;if(!s.isControllingVariants){const t=s.parent?QB(s.parent)||{}:{};return s.props.initial!==void 0&&(t.initial=s.props.initial),t}const e={};for(let t=0;tPromise.all(e.map(({animation:t,options:i})=>ASe(s,t,i)))}function NSe(s){let e=MSe(s),t=Hk(),i=!0;const n=l=>(u,c)=>{var h;const f=D0(s,c,l==="exit"?(h=s.presenceContext)===null||h===void 0?void 0:h.custom:void 0);if(f){const{transition:d,transitionEnd:_,...g}=f;u={...u,...g,..._}}return u};function r(l){e=l(s)}function a(l){const{props:u}=s,c=QB(s.parent)||{},h=[],f=new Set;let d={},_=1/0;for(let p=0;p_&&y,P=!1;const k=Array.isArray(E)?E:[E];let L=k.reduce(n(m),{});T===!1&&(L={});const{prevResolvedValues:j={}}=v,z={...j,...L},ne=K=>{N=!0,f.has(K)&&(P=!0,f.delete(K)),v.needsAnimating[K]=!0;const H=s.getValue(K);H&&(H.liveStyle=!1)};for(const K in z){const H=L[K],J=j[K];if(d.hasOwnProperty(K))continue;let B=!1;wA(H)&&wA(J)?B=!hB(H,J):B=H!==J,B?H!=null?ne(K):f.add(K):H!==void 0&&f.has(K)?ne(K):v.protectedKeys[K]=!0}v.prevProp=E,v.prevResolvedValues=L,v.isActive&&(d={...d,...L}),i&&s.blockInitialAnimation&&(N=!1),N&&(!(w&&C)||P)&&h.push(...k.map(K=>({animation:K,options:{type:m}})))}if(f.size){const p={};f.forEach(m=>{const v=s.getBaseTarget(m),E=s.getValue(m);E&&(E.liveStyle=!0),p[m]=v??null}),h.push({animation:p})}let g=!!h.length;return i&&(u.initial===!1||u.initial===u.animate)&&!s.manuallyAnimateOnMount&&(g=!1),i=!1,g?e(h):Promise.resolve()}function o(l,u){var c;if(t[l].isActive===u)return Promise.resolve();(c=s.variantChildren)===null||c===void 0||c.forEach(f=>{var d;return(d=f.animationState)===null||d===void 0?void 0:d.setActive(l,u)}),t[l].isActive=u;const h=a(l);for(const f in t)t[f].protectedKeys={};return h}return{animateChanges:a,setActive:o,setAnimateFunction:r,getState:()=>t,reset:()=>{t=Hk(),i=!0}}}function PSe(s,e){return typeof e=="string"?e!==s:Array.isArray(e)?!hB(e,s):!1}function Tl(s=!1){return{isActive:s,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Hk(){return{animate:Tl(!0),whileInView:Tl(),whileHover:Tl(),whileTap:Tl(),whileDrag:Tl(),whileFocus:Tl(),exit:Tl()}}class dl{constructor(e){this.isMounted=!1,this.node=e}update(){}}class kSe extends dl{constructor(e){super(e),e.animationState||(e.animationState=NSe(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();k0(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)===null||e===void 0||e.call(this)}}let xSe=0;class DSe extends dl{constructor(){super(...arguments),this.id=xSe++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===i)return;const n=this.node.animationState.setActive("exit",!e);t&&!e&&n.then(()=>t(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const LSe={animation:{Feature:kSe},exit:{Feature:DSe}};function sg(s,e,t,i={passive:!0}){return s.addEventListener(e,t,i),()=>s.removeEventListener(e,t)}function bg(s){return{point:{x:s.pageX,y:s.pageY}}}const USe=s=>e=>p2(e)&&s(e,bg(e));function md(s,e,t,i){return sg(s,e,USe(t),i)}const Wk=(s,e)=>Math.abs(s-e);function FSe(s,e){const t=Wk(s.x,e.x),i=Wk(s.y,e.y);return Math.sqrt(t**2+i**2)}class ZB{constructor(e,t,{transformPagePoint:i,contextWindow:n,dragSnapToOrigin:r=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=bT(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,d=FSe(h.offset,{x:0,y:0})>=3;if(!f&&!d)return;const{point:_}=h,{timestamp:g}=Bi;this.history.push({..._,timestamp:g});const{onStart:p,onMove:m}=this.handlers;f||(p&&p(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),m&&m(this.lastMoveEvent,h)},this.handlePointerMove=(h,f)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=ST(f,this.transformPagePoint),xt.update(this.updatePoint,!0)},this.handlePointerUp=(h,f)=>{this.end();const{onEnd:d,onSessionEnd:_,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=bT(h.type==="pointercancel"?this.lastMoveEventInfo:ST(f,this.transformPagePoint),this.history);this.startEvent&&d&&d(h,p),_&&_(h,p)},!p2(e))return;this.dragSnapToOrigin=r,this.handlers=t,this.transformPagePoint=i,this.contextWindow=n||window;const a=bg(e),o=ST(a,this.transformPagePoint),{point:l}=o,{timestamp:u}=Bi;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=t;c&&c(e,bT(o,this.history)),this.removeListeners=Sg(md(this.contextWindow,"pointermove",this.handlePointerMove),md(this.contextWindow,"pointerup",this.handlePointerUp),md(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),sl(this.updatePoint)}}function ST(s,e){return e?{point:e(s.point)}:s}function Yk(s,e){return{x:s.x-e.x,y:s.y-e.y}}function bT({point:s},e){return{point:s,delta:Yk(s,JB(e)),offset:Yk(s,BSe(e)),velocity:GSe(e,.1)}}function BSe(s){return s[0]}function JB(s){return s[s.length-1]}function GSe(s,e){if(s.length<2)return{x:0,y:0};let t=s.length-1,i=null;const n=JB(s);for(;t>=0&&(i=s[t],!(n.timestamp-i.timestamp>xa(e)));)t--;if(!i)return{x:0,y:0};const r=Da(n.timestamp-i.timestamp);if(r===0)return{x:0,y:0};const a={x:(n.x-i.x)/r,y:(n.y-i.y)/r};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}const e9=1e-4,VSe=1-e9,jSe=1+e9,t9=.01,zSe=0-t9,HSe=0+t9;function ln(s){return s.max-s.min}function WSe(s,e,t){return Math.abs(s-e)<=t}function Xk(s,e,t,i=.5){s.origin=i,s.originPoint=Ht(e.min,e.max,s.origin),s.scale=ln(t)/ln(e),s.translate=Ht(t.min,t.max,s.origin)-s.originPoint,(s.scale>=VSe&&s.scale<=jSe||isNaN(s.scale))&&(s.scale=1),(s.translate>=zSe&&s.translate<=HSe||isNaN(s.translate))&&(s.translate=0)}function vd(s,e,t,i){Xk(s.x,e.x,t.x,i?i.originX:void 0),Xk(s.y,e.y,t.y,i?i.originY:void 0)}function Kk(s,e,t){s.min=t.min+e.min,s.max=s.min+ln(e)}function YSe(s,e,t){Kk(s.x,e.x,t.x),Kk(s.y,e.y,t.y)}function qk(s,e,t){s.min=e.min-t.min,s.max=s.min+ln(e)}function Ed(s,e,t){qk(s.x,e.x,t.x),qk(s.y,e.y,t.y)}function XSe(s,{min:e,max:t},i){return e!==void 0&&st&&(s=i?Ht(t,s,i.max):Math.min(s,t)),s}function $k(s,e,t){return{min:e!==void 0?s.min+e:void 0,max:t!==void 0?s.max+t-(s.max-s.min):void 0}}function KSe(s,{top:e,left:t,bottom:i,right:n}){return{x:$k(s.x,t,n),y:$k(s.y,e,i)}}function Qk(s,e){let t=e.min-s.min,i=e.max-s.max;return e.max-e.mini?t=sf(e.min,e.max-i,s.min):i>n&&(t=sf(s.min,s.max-n,e.min)),Ha(0,1,t)}function QSe(s,e){const t={};return e.min!==void 0&&(t.min=e.min-s.min),e.max!==void 0&&(t.max=e.max-s.min),t}const BA=.35;function ZSe(s=BA){return s===!1?s=0:s===!0&&(s=BA),{x:Zk(s,"left","right"),y:Zk(s,"top","bottom")}}function Zk(s,e,t){return{min:Jk(s,e),max:Jk(s,t)}}function Jk(s,e){return typeof s=="number"?s:s[e]||0}const ex=()=>({translate:0,scale:1,origin:0,originPoint:0}),Gh=()=>({x:ex(),y:ex()}),tx=()=>({min:0,max:0}),si=()=>({x:tx(),y:tx()});function gn(s){return[s("x"),s("y")]}function i9({top:s,left:e,right:t,bottom:i}){return{x:{min:e,max:t},y:{min:s,max:i}}}function JSe({x:s,y:e}){return{top:e.min,right:s.max,bottom:e.max,left:s.min}}function ebe(s,e){if(!e)return s;const t=e({x:s.left,y:s.top}),i=e({x:s.right,y:s.bottom});return{top:t.y,left:t.x,bottom:i.y,right:i.x}}function AT(s){return s===void 0||s===1}function GA({scale:s,scaleX:e,scaleY:t}){return!AT(s)||!AT(e)||!AT(t)}function Ml(s){return GA(s)||s9(s)||s.z||s.rotate||s.rotateX||s.rotateY||s.skewX||s.skewY}function s9(s){return ix(s.x)||ix(s.y)}function ix(s){return s&&s!=="0%"}function Qv(s,e,t){const i=s-t,n=e*i;return t+n}function sx(s,e,t,i,n){return n!==void 0&&(s=Qv(s,n,i)),Qv(s,t,i)+e}function VA(s,e=0,t=1,i,n){s.min=sx(s.min,e,t,i,n),s.max=sx(s.max,e,t,i,n)}function n9(s,{x:e,y:t}){VA(s.x,e.translate,e.scale,e.originPoint),VA(s.y,t.translate,t.scale,t.originPoint)}const nx=.999999999999,rx=1.0000000000001;function tbe(s,e,t,i=!1){const n=t.length;if(!n)return;e.x=e.y=1;let r,a;for(let o=0;onx&&(e.x=1),e.ynx&&(e.y=1)}function Vh(s,e){s.min=s.min+e,s.max=s.max+e}function ax(s,e,t,i,n=.5){const r=Ht(s.min,s.max,n);VA(s,e,t,r,i)}function jh(s,e){ax(s.x,e.x,e.scaleX,e.scale,e.originX),ax(s.y,e.y,e.scaleY,e.scale,e.originY)}function r9(s,e){return i9(ebe(s.getBoundingClientRect(),e))}function ibe(s,e,t){const i=r9(s,t),{scroll:n}=e;return n&&(Vh(i.x,n.offset.x),Vh(i.y,n.offset.y)),i}const a9=({current:s})=>s?s.ownerDocument.defaultView:null,sbe=new WeakMap;class nbe{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=si(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const n=c=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(bg(c).point)},r=(c,h)=>{const{drag:f,dragPropagation:d,onDragStart:_}=this.getProps();if(f&&!d&&(this.openDragLock&&this.openDragLock(),this.openDragLock=$Ie(f),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),gn(p=>{let m=this.getAxisMotionValue(p).get()||0;if(Br.test(m)){const{projection:v}=this.visualElement;if(v&&v.layout){const E=v.layout.layoutBox[p];E&&(m=ln(E)*(parseFloat(m)/100))}}this.originPoint[p]=m}),_&&xt.postRender(()=>_(c,h)),NA(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},a=(c,h)=>{const{dragPropagation:f,dragDirectionLock:d,onDirectionLock:_,onDrag:g}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:p}=h;if(d&&this.currentDirection===null){this.currentDirection=rbe(p),this.currentDirection!==null&&_&&_(this.currentDirection);return}this.updateAxis("x",h.point,p),this.updateAxis("y",h.point,p),this.visualElement.render(),g&&g(c,h)},o=(c,h)=>this.stop(c,h),l=()=>gn(c=>{var h;return this.getAnimationState(c)==="paused"&&((h=this.getAxisMotionValue(c).animation)===null||h===void 0?void 0:h.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new ZB(e,{onSessionStart:n,onStart:r,onMove:a,onSessionEnd:o,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:a9(this.visualElement)})}stop(e,t){const i=this.isDragging;if(this.cancel(),!i)return;const{velocity:n}=t;this.startAnimation(n);const{onDragEnd:r}=this.getProps();r&&xt.postRender(()=>r(e,t))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,i){const{drag:n}=this.getProps();if(!i||!Ep(e,n,this.currentDirection))return;const r=this.getAxisMotionValue(e);let a=this.originPoint[e]+i[e];this.constraints&&this.constraints[e]&&(a=XSe(a,this.constraints[e],this.elastic[e])),r.set(a)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:i}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,r=this.constraints;t&&Fh(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&n?this.constraints=KSe(n.layoutBox,t):this.constraints=!1,this.elastic=ZSe(i),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&gn(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=QSe(n.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Fh(e))return!1;const i=e.current,{projection:n}=this.visualElement;if(!n||!n.layout)return!1;const r=ibe(i,n.root,this.visualElement.getTransformPagePoint());let a=qSe(n.layout.layoutBox,r);if(t){const o=t(JSe(a));this.hasMutatedConstraints=!!o,o&&(a=i9(o))}return a}startAnimation(e){const{drag:t,dragMomentum:i,dragElastic:n,dragTransition:r,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),l=this.constraints||{},u=gn(c=>{if(!Ep(c,t,this.currentDirection))return;let h=l&&l[c]||{};a&&(h={min:0,max:0});const f=n?200:1e6,d=n?40:1e7,_={type:"inertia",velocity:i?e[c]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...r,...h};return this.startAxisValueAnimation(c,_)});return Promise.all(u).then(o)}startAxisValueAnimation(e,t){const i=this.getAxisMotionValue(e);return NA(this.visualElement,e),i.start(w2(e,i,0,t,this.visualElement,!1))}stopAnimation(){gn(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){gn(e=>{var t;return(t=this.getAxisMotionValue(e).animation)===null||t===void 0?void 0:t.pause()})}getAnimationState(e){var t;return(t=this.getAxisMotionValue(e).animation)===null||t===void 0?void 0:t.state}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,i=this.visualElement.getProps(),n=i[t];return n||this.visualElement.getValue(e,(i.initial?i.initial[e]:void 0)||0)}snapToCursor(e){gn(t=>{const{drag:i}=this.getProps();if(!Ep(t,i,this.currentDirection))return;const{projection:n}=this.visualElement,r=this.getAxisMotionValue(t);if(n&&n.layout){const{min:a,max:o}=n.layout.layoutBox[t];r.set(e[t]-Ht(a,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:i}=this.visualElement;if(!Fh(t)||!i||!this.constraints)return;this.stopAnimation();const n={x:0,y:0};gn(a=>{const o=this.getAxisMotionValue(a);if(o&&this.constraints!==!1){const l=o.get();n[a]=$Se({min:l,max:l},this.constraints[a])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),gn(a=>{if(!Ep(a,e,null))return;const o=this.getAxisMotionValue(a),{min:l,max:u}=this.constraints[a];o.set(Ht(l,u,n[a]))})}addListeners(){if(!this.visualElement.current)return;sbe.set(this.visualElement,this);const e=this.visualElement.current,t=md(e,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),i=()=>{const{dragConstraints:l}=this.getProps();Fh(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",i);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),xt.read(i);const a=sg(window,"resize",()=>this.scalePositionWithinConstraints()),o=n.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(gn(c=>{const h=this.getAxisMotionValue(c);h&&(this.originPoint[c]+=l[c].translate,h.set(h.get()+l[c].translate))}),this.visualElement.render())});return()=>{a(),t(),r(),o&&o()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:i=!1,dragPropagation:n=!1,dragConstraints:r=!1,dragElastic:a=BA,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:i,dragPropagation:n,dragConstraints:r,dragElastic:a,dragMomentum:o}}}function Ep(s,e,t){return(e===!0||e===s)&&(t===null||t===s)}function rbe(s,e=10){let t=null;return Math.abs(s.y)>e?t="y":Math.abs(s.x)>e&&(t="x"),t}class abe extends dl{constructor(e){super(e),this.removeGroupControls=an,this.removeListeners=an,this.controls=new nbe(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||an}unmount(){this.removeGroupControls(),this.removeListeners()}}const ox=s=>(e,t)=>{s&&xt.postRender(()=>s(e,t))};class obe extends dl{constructor(){super(...arguments),this.removePointerDownListener=an}onPointerDown(e){this.session=new ZB(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:a9(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:i,onPanEnd:n}=this.node.getProps();return{onSessionStart:ox(e),onStart:ox(t),onMove:i,onEnd:(r,a)=>{delete this.session,n&&xt.postRender(()=>n(r,a))}}}mount(){this.removePointerDownListener=md(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Kp={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function lx(s,e){return e.max===e.min?0:s/(e.max-e.min)*100}const Df={correct:(s,e)=>{if(!e.target)return s;if(typeof s=="string")if(Re.test(s))s=parseFloat(s);else return s;const t=lx(s,e.target.x),i=lx(s,e.target.y);return`${t}% ${i}%`}},lbe={correct:(s,{treeScale:e,projectionDelta:t})=>{const i=s,n=nl.parse(s);if(n.length>5)return i;const r=nl.createTransformer(s),a=typeof n[0]!="number"?1:0,o=t.x.scale*e.x,l=t.y.scale*e.y;n[0+a]/=o,n[1+a]/=l;const u=Ht(o,l,.5);return typeof n[2+a]=="number"&&(n[2+a]/=u),typeof n[3+a]=="number"&&(n[3+a]/=u),r(n)}};class ube extends D.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:i,layoutId:n}=this.props,{projection:r}=e;CIe(hbe),r&&(t.group&&t.group.add(r),i&&i.register&&n&&i.register(r),r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,onExitComplete:()=>this.safeToRemove()})),Kp.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:i,drag:n,isPresent:r}=this.props,a=i.projection;return a&&(a.isPresent=r,n||e.layoutDependency!==t||t===void 0?a.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?a.promote():a.relegate()||xt.postRender(()=>{const o=a.getStack();(!o||!o.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),s2.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:i}=this.props,{projection:n}=e;n&&(n.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(n),i&&i.deregister&&i.deregister(n))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function o9(s){const[e,t]=z5(),i=D.useContext(qw);return vt.jsx(ube,{...s,layoutGroup:i,switchLayoutGroup:D.useContext(Q5),isPresent:e,safeToRemove:t})}const hbe={borderRadius:{...Df,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Df,borderTopRightRadius:Df,borderBottomLeftRadius:Df,borderBottomRightRadius:Df,boxShadow:lbe};function cbe(s,e,t){const i=ts(s)?s:tg(s);return i.start(w2("",i,e,t)),i.animation}function fbe(s){return s instanceof SVGElement&&s.tagName!=="svg"}const dbe=(s,e)=>s.depth-e.depth;class _be{constructor(){this.children=[],this.isDirty=!1}add(e){m2(this.children,e),this.isDirty=!0}remove(e){v2(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(dbe),this.isDirty=!1,this.children.forEach(e)}}function gbe(s,e){const t=Gr.now(),i=({timestamp:n})=>{const r=n-t;r>=e&&(sl(i),s(r-e))};return xt.read(i,!0),()=>sl(i)}const l9=["TopLeft","TopRight","BottomLeft","BottomRight"],pbe=l9.length,ux=s=>typeof s=="string"?parseFloat(s):s,hx=s=>typeof s=="number"||Re.test(s);function mbe(s,e,t,i,n,r){n?(s.opacity=Ht(0,t.opacity!==void 0?t.opacity:1,vbe(i)),s.opacityExit=Ht(e.opacity!==void 0?e.opacity:1,0,Ebe(i))):r&&(s.opacity=Ht(e.opacity!==void 0?e.opacity:1,t.opacity!==void 0?t.opacity:1,i));for(let a=0;aie?1:t(sf(s,e,i))}function fx(s,e){s.min=e.min,s.max=e.max}function dn(s,e){fx(s.x,e.x),fx(s.y,e.y)}function dx(s,e){s.translate=e.translate,s.scale=e.scale,s.originPoint=e.originPoint,s.origin=e.origin}function _x(s,e,t,i,n){return s-=e,s=Qv(s,1/t,i),n!==void 0&&(s=Qv(s,1/n,i)),s}function ybe(s,e=0,t=1,i=.5,n,r=s,a=s){if(Br.test(e)&&(e=parseFloat(e),e=Ht(a.min,a.max,e/100)-a.min),typeof e!="number")return;let o=Ht(r.min,r.max,i);s===r&&(o-=e),s.min=_x(s.min,e,t,o,n),s.max=_x(s.max,e,t,o,n)}function gx(s,e,[t,i,n],r,a){ybe(s,e[t],e[i],e[n],e.scale,r,a)}const Tbe=["x","scaleX","originX"],Ibe=["y","scaleY","originY"];function px(s,e,t,i){gx(s.x,e,Tbe,t?t.x:void 0,i?i.x:void 0),gx(s.y,e,Ibe,t?t.y:void 0,i?i.y:void 0)}function mx(s){return s.translate===0&&s.scale===1}function h9(s){return mx(s.x)&&mx(s.y)}function vx(s,e){return s.min===e.min&&s.max===e.max}function Rbe(s,e){return vx(s.x,e.x)&&vx(s.y,e.y)}function Ex(s,e){return Math.round(s.min)===Math.round(e.min)&&Math.round(s.max)===Math.round(e.max)}function c9(s,e){return Ex(s.x,e.x)&&Ex(s.y,e.y)}function yx(s){return ln(s.x)/ln(s.y)}function Tx(s,e){return s.translate===e.translate&&s.scale===e.scale&&s.originPoint===e.originPoint}class Sbe{constructor(){this.members=[]}add(e){m2(this.members,e),e.scheduleRender()}remove(e){if(v2(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(e){const t=this.members.findIndex(n=>e===n);if(t===0)return!1;let i;for(let n=t;n>=0;n--){const r=this.members[n];if(r.isPresent!==!1){i=r;break}}return i?(this.promote(i),!0):!1}promote(e,t){const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.instance&&i.scheduleRender(),e.scheduleRender(),e.resumeFrom=i,t&&(e.resumeFrom.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:n}=e.options;n===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:t,resumingFrom:i}=e;t.onExitComplete&&t.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function bbe(s,e,t){let i="";const n=s.x.translate/e.x,r=s.y.translate/e.y,a=(t==null?void 0:t.z)||0;if((n||r||a)&&(i=`translate3d(${n}px, ${r}px, ${a}px) `),(e.x!==1||e.y!==1)&&(i+=`scale(${1/e.x}, ${1/e.y}) `),t){const{transformPerspective:u,rotate:c,rotateX:h,rotateY:f,skewX:d,skewY:_}=t;u&&(i=`perspective(${u}px) ${i}`),c&&(i+=`rotate(${c}deg) `),h&&(i+=`rotateX(${h}deg) `),f&&(i+=`rotateY(${f}deg) `),d&&(i+=`skewX(${d}deg) `),_&&(i+=`skewY(${_}deg) `)}const o=s.x.scale*e.x,l=s.y.scale*e.y;return(o!==1||l!==1)&&(i+=`scale(${o}, ${l})`),i||"none"}const Nl={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Yf=typeof window<"u"&&window.MotionDebug!==void 0,OT=["","X","Y","Z"],Abe={visibility:"hidden"},Ix=1e3;let Obe=0;function wT(s,e,t,i){const{latestValues:n}=e;n[s]&&(t[s]=n[s],e.setStaticValue(s,0),i&&(i[s]=0))}function f9(s){if(s.hasCheckedOptimisedAppear=!0,s.root===s)return;const{visualElement:e}=s.options;if(!e)return;const t=yB(e);if(window.MotionHasOptimisedAnimation(t,"transform")){const{layout:n,layoutId:r}=s.options;window.MotionCancelOptimisedAnimation(t,"transform",xt,!(n||r))}const{parent:i}=s;i&&!i.hasCheckedOptimisedAppear&&f9(i)}function d9({attachResizeListener:s,defaultParent:e,measureScroll:t,checkIsScrollRoot:i,resetTransform:n}){return class{constructor(a={},o=e==null?void 0:e()){this.id=Obe++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Yf&&(Nl.totalNodes=Nl.resolvedTargetDeltas=Nl.recalculatedProjection=0),this.nodes.forEach(Mbe),this.nodes.forEach(Dbe),this.nodes.forEach(Lbe),this.nodes.forEach(Nbe),Yf&&window.MotionDebug.record(Nl)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=o?o.root||o:this,this.path=o?[...o.path,o]:[],this.parent=o,this.depth=o?o.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;s(a,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=gbe(f,250),Kp.hasAnimatedSinceResize&&(Kp.hasAnimatedSinceResize=!1,this.nodes.forEach(Sx))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:f,hasRelativeTargetChanged:d,layout:_})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||c.getDefaultTransition()||Vbe,{onLayoutAnimationStart:p,onLayoutAnimationComplete:m}=c.getProps(),v=!this.targetLayout||!c9(this.targetLayout,_)||d,E=!f&&d;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||E||f&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,E);const y={...d2(g,"layout"),onPlay:p,onComplete:m};(c.shouldReduceMotion||this.options.layoutRoot)&&(y.delay=0,y.type=!1),this.startAnimation(y)}else f||Sx(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=_})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,sl(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Ube),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&f9(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const T=y/1e3;bx(h.x,a.x,T),bx(h.y,a.y,T),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ed(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Bbe(this.relativeTarget,this.relativeTargetOrigin,f,T),E&&Rbe(this.relativeTarget,E)&&(this.isProjectionDirty=!1),E||(E=si()),dn(E,this.relativeTarget)),g&&(this.animationValues=c,mbe(c,u,this.latestValues,T,v,m)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(sl(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=xt.update(()=>{Kp.hasAnimatedSinceResize=!0,this.currentAnimation=cbe(0,Ix,{...a,onUpdate:o=>{this.mixTargetDelta(o),a.onUpdate&&a.onUpdate(o)},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Ix),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:o,target:l,layout:u,latestValues:c}=a;if(!(!o||!l||!u)){if(this!==a&&this.layout&&u&&_9(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||si();const h=ln(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+h;const f=ln(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+f}dn(o,l),jh(o,c),vd(this.projectionDeltaWithTransform,this.layoutCorrected,o,c)}}registerSharedNode(a,o){this.sharedNodes.has(a)||this.sharedNodes.set(a,new Sbe),this.sharedNodes.get(a).add(o);const u=o.options.initialPromotionConfig;o.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(o):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:o,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),o&&this.setOptions({transition:o})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let o=!1;const{latestValues:l}=a;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(o=!0),!o)return;const u={};l.z&&wT("z",a,u,this.animationValues);for(let c=0;c{var o;return(o=a.currentAnimation)===null||o===void 0?void 0:o.stop()}),this.root.nodes.forEach(Rx),this.root.sharedNodes.clear()}}}function wbe(s){s.updateLayout()}function Cbe(s){var e;const t=((e=s.resumeFrom)===null||e===void 0?void 0:e.snapshot)||s.snapshot;if(s.isLead()&&s.layout&&t&&s.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:n}=s.layout,{animationType:r}=s.options,a=t.source!==s.layout.source;r==="size"?gn(h=>{const f=a?t.measuredBox[h]:t.layoutBox[h],d=ln(f);f.min=i[h].min,f.max=f.min+d}):_9(r,t.layoutBox,i)&&gn(h=>{const f=a?t.measuredBox[h]:t.layoutBox[h],d=ln(i[h]);f.max=f.min+d,s.relativeTarget&&!s.currentAnimation&&(s.isProjectionDirty=!0,s.relativeTarget[h].max=s.relativeTarget[h].min+d)});const o=Gh();vd(o,i,t.layoutBox);const l=Gh();a?vd(l,s.applyTransform(n,!0),t.measuredBox):vd(l,i,t.layoutBox);const u=!h9(o);let c=!1;if(!s.resumeFrom){const h=s.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:d}=h;if(f&&d){const _=si();Ed(_,t.layoutBox,f.layoutBox);const g=si();Ed(g,i,d.layoutBox),c9(_,g)||(c=!0),h.options.layoutRoot&&(s.relativeTarget=g,s.relativeTargetOrigin=_,s.relativeParent=h)}}}s.notifyListeners("didUpdate",{layout:i,snapshot:t,delta:l,layoutDelta:o,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(s.isLead()){const{onExitComplete:i}=s.options;i&&i()}s.options.transition=void 0}function Mbe(s){Yf&&Nl.totalNodes++,s.parent&&(s.isProjecting()||(s.isProjectionDirty=s.parent.isProjectionDirty),s.isSharedProjectionDirty||(s.isSharedProjectionDirty=!!(s.isProjectionDirty||s.parent.isProjectionDirty||s.parent.isSharedProjectionDirty)),s.isTransformDirty||(s.isTransformDirty=s.parent.isTransformDirty))}function Nbe(s){s.isProjectionDirty=s.isSharedProjectionDirty=s.isTransformDirty=!1}function Pbe(s){s.clearSnapshot()}function Rx(s){s.clearMeasurements()}function kbe(s){s.isLayoutDirty=!1}function xbe(s){const{visualElement:e}=s.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),s.resetTransform()}function Sx(s){s.finishAnimation(),s.targetDelta=s.relativeTarget=s.target=void 0,s.isProjectionDirty=!0}function Dbe(s){s.resolveTargetDelta()}function Lbe(s){s.calcProjection()}function Ube(s){s.resetSkewAndRotation()}function Fbe(s){s.removeLeadSnapshot()}function bx(s,e,t){s.translate=Ht(e.translate,0,t),s.scale=Ht(e.scale,1,t),s.origin=e.origin,s.originPoint=e.originPoint}function Ax(s,e,t,i){s.min=Ht(e.min,t.min,i),s.max=Ht(e.max,t.max,i)}function Bbe(s,e,t,i){Ax(s.x,e.x,t.x,i),Ax(s.y,e.y,t.y,i)}function Gbe(s){return s.animationValues&&s.animationValues.opacityExit!==void 0}const Vbe={duration:.45,ease:[.4,0,.1,1]},Ox=s=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(s),wx=Ox("applewebkit/")&&!Ox("chrome/")?Math.round:an;function Cx(s){s.min=wx(s.min),s.max=wx(s.max)}function jbe(s){Cx(s.x),Cx(s.y)}function _9(s,e,t){return s==="position"||s==="preserve-aspect"&&!WSe(yx(e),yx(t),.2)}function zbe(s){var e;return s!==s.root&&((e=s.scroll)===null||e===void 0?void 0:e.wasRoot)}const Hbe=d9({attachResizeListener:(s,e)=>sg(s,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),CT={current:void 0},g9=d9({measureScroll:s=>({x:s.scrollLeft,y:s.scrollTop}),defaultParent:()=>{if(!CT.current){const s=new Hbe({});s.mount(window),s.setOptions({layoutScroll:!0}),CT.current=s}return CT.current},resetTransform:(s,e)=>{s.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:s=>window.getComputedStyle(s).position==="fixed"}),Wbe={pan:{Feature:obe},drag:{Feature:abe,ProjectionNode:g9,MeasureLayout:o9}};function Mx(s,e,t){const{props:i}=s;s.animationState&&i.whileHover&&s.animationState.setActive("whileHover",t==="Start");const n="onHover"+t,r=i[n];r&&xt.postRender(()=>r(e,bg(e)))}class Ybe extends dl{mount(){const{current:e}=this.node;e&&(this.unmount=WIe(e,t=>(Mx(this.node,t,"Start"),i=>Mx(this.node,i,"End"))))}unmount(){}}class Xbe extends dl{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Sg(sg(this.node.current,"focus",()=>this.onFocus()),sg(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Nx(s,e,t){const{props:i}=s;s.animationState&&i.whileTap&&s.animationState.setActive("whileTap",t==="Start");const n="onTap"+(t==="End"?"":t),r=i[n];r&&xt.postRender(()=>r(e,bg(e)))}class Kbe extends dl{mount(){const{current:e}=this.node;e&&(this.unmount=qIe(e,t=>(Nx(this.node,t,"Start"),(i,{success:n})=>Nx(this.node,i,n?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const jA=new WeakMap,MT=new WeakMap,qbe=s=>{const e=jA.get(s.target);e&&e(s)},$be=s=>{s.forEach(qbe)};function Qbe({root:s,...e}){const t=s||document;MT.has(t)||MT.set(t,{});const i=MT.get(t),n=JSON.stringify(e);return i[n]||(i[n]=new IntersectionObserver($be,{root:s,...e})),i[n]}function Zbe(s,e,t){const i=Qbe(e);return jA.set(s,t),i.observe(s),()=>{jA.delete(s),i.unobserve(s)}}const Jbe={some:0,all:1};class eAe extends dl{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:i,amount:n="some",once:r}=e,a={root:t?t.current:void 0,rootMargin:i,threshold:typeof n=="number"?n:Jbe[n]},o=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,r&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:h}=this.node.getProps(),f=u?c:h;f&&f(l)};return Zbe(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(tAe(e,t))&&this.startObserver()}unmount(){}}function tAe({viewport:s={}},{viewport:e={}}={}){return t=>s[t]!==e[t]}const iAe={inView:{Feature:eAe},tap:{Feature:Kbe},focus:{Feature:Xbe},hover:{Feature:Ybe}},sAe={layout:{ProjectionNode:g9,MeasureLayout:o9}},zA={current:null},p9={current:!1};function nAe(){if(p9.current=!0,!!Zw)if(window.matchMedia){const s=window.matchMedia("(prefers-reduced-motion)"),e=()=>zA.current=s.matches;s.addListener(e),e()}else zA.current=!1}const rAe=[...VB,Qi,nl],aAe=s=>rAe.find(GB(s)),Px=new WeakMap;function oAe(s,e,t){for(const i in e){const n=e[i],r=t[i];if(ts(n))s.addValue(i,n);else if(ts(r))s.addValue(i,tg(n,{owner:s}));else if(r!==n)if(s.hasValue(i)){const a=s.getValue(i);a.liveStyle===!0?a.jump(n):a.hasAnimated||a.set(n)}else{const a=s.getStaticValue(i);s.addValue(i,tg(a!==void 0?a:n,{owner:s}))}}for(const i in t)e[i]===void 0&&s.removeValue(i);return e}const kx=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class lAe{scrapeMotionValuesFromProps(e,t,i){return{}}constructor({parent:e,props:t,presenceContext:i,reducedMotionConfig:n,blockInitialAnimation:r,visualState:a},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=b2,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=Gr.now();this.renderScheduledAtthis.bindToMotionValue(i,t)),p9.current||nAe(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:zA.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Px.delete(this.current),this.projection&&this.projection.unmount(),sl(this.notifyUpdate),sl(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const i=Qu.has(e),n=t.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&xt.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0)}),r=t.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{n(),r(),a&&a(),t.owner&&t.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in nf){const t=nf[e];if(!t)continue;const{isEnabled:i,Feature:n}=t;if(!this.features[e]&&n&&i(this.props)&&(this.features[e]=new n(this)),this.features[e]){const r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):si()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let i=0;it.variantChildren.delete(e)}addValue(e,t){const i=this.values.get(e);t!==i&&(i&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let i=this.values.get(e);return i===void 0&&t!==void 0&&(i=tg(t===null?void 0:t,{owner:this}),this.addValue(e,i)),i}readValue(e,t){var i;let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(i=this.getBaseTargetFromProps(this.props,e))!==null&&i!==void 0?i:this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n=="string"&&(FB(n)||CB(n))?n=parseFloat(n):!aAe(n)&&nl.test(t)&&(n=DB(e,t)),this.setBaseTarget(e,ts(n)?n.get():n)),ts(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:i}=this.props;let n;if(typeof i=="string"||typeof i=="object"){const a=r2(this.props,i,(t=this.presenceContext)===null||t===void 0?void 0:t.custom);a&&(n=a[e])}if(i&&n!==void 0)return n;const r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!ts(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new E2),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class m9 extends lAe{constructor(){super(...arguments),this.KeyframeResolver=jB}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:i}){delete t[e],delete i[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;ts(e)&&(this.childSubscription=e.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function uAe(s){return window.getComputedStyle(s)}class hAe extends m9{constructor(){super(...arguments),this.type="html",this.renderInstance=nB}readValueFromInstance(e,t){if(Qu.has(t)){const i=S2(t);return i&&i.default||0}else{const i=uAe(e),n=(tB(t)?i.getPropertyValue(t):i[t])||0;return typeof n=="string"?n.trim():n}}measureInstanceViewportBox(e,{transformPagePoint:t}){return r9(e,t)}build(e,t,i){l2(e,t,i.transformTemplate)}scrapeMotionValuesFromProps(e,t,i){return f2(e,t,i)}}class cAe extends m9{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=si}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Qu.has(t)){const i=S2(t);return i&&i.default||0}return t=rB.has(t)?t:i2(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,i){return lB(e,t,i)}build(e,t,i){u2(e,t,this.isSVGTag,i.transformTemplate)}renderInstance(e,t,i,n){aB(e,t,i,n)}mount(e){this.isSVGTag=c2(e.tagName),super.mount(e)}}const fAe=(s,e)=>n2(s)?new cAe(e):new hAe(e,{allowProjection:s!==D.Fragment}),dAe=FIe({...LSe,...iAe,...Wbe,...sAe},fAe),sMe=JTe(dAe);var v9={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},xx=Bt.createContext&&Bt.createContext(v9),_Ae=["attr","size","title"];function gAe(s,e){if(s==null)return{};var t=pAe(s,e),i,n;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(s);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(s,i)&&(t[i]=s[i])}return t}function pAe(s,e){if(s==null)return{};var t={};for(var i in s)if(Object.prototype.hasOwnProperty.call(s,i)){if(e.indexOf(i)>=0)continue;t[i]=s[i]}return t}function Zv(){return Zv=Object.assign?Object.assign.bind():function(s){for(var e=1;eBt.createElement(e.tag,Jv({key:t},e.attr),E9(e.child)))}function be(s){return e=>Bt.createElement(yAe,Zv({attr:Jv({},s.attr)},e),E9(s.child))}function yAe(s){var e=t=>{var{attr:i,size:n,title:r}=s,a=gAe(s,_Ae),o=n||t.size||"1em",l;return t.className&&(l=t.className),s.className&&(l=(l?l+" ":"")+s.className),Bt.createElement("svg",Zv({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,i,a,{className:l,style:Jv(Jv({color:s.color||t.color},t.style),s.style),height:o,width:o,xmlns:"http://www.w3.org/2000/svg"}),r&&Bt.createElement("title",null,r),s.children)};return xx!==void 0?Bt.createElement(xx.Consumer,null,t=>e(t)):e(v9)}function nMe(s){return be({attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"},child:[]}]})(s)}function rMe(s){return be({attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"},child:[]}]})(s)}function aMe(s){return be({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M413.1 222.5l22.2 22.2c9.4 9.4 9.4 24.6 0 33.9L241 473c-9.4 9.4-24.6 9.4-33.9 0L12.7 278.6c-9.4-9.4-9.4-24.6 0-33.9l22.2-22.2c9.5-9.5 25-9.3 34.3.4L184 343.4V56c0-13.3 10.7-24 24-24h32c13.3 0 24 10.7 24 24v287.4l114.8-120.5c9.3-9.8 24.8-10 34.3-.4z"},child:[]}]})(s)}function oMe(s){return be({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"},child:[]}]})(s)}function lMe(s){return be({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"},child:[]}]})(s)}function uMe(s){return be({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M34.9 289.5l-22.2-22.2c-9.4-9.4-9.4-24.6 0-33.9L207 39c9.4-9.4 24.6-9.4 33.9 0l194.3 194.3c9.4 9.4 9.4 24.6 0 33.9L413 289.4c-9.5 9.5-25 9.3-34.3-.4L264 168.6V456c0 13.3-10.7 24-24 24h-32c-13.3 0-24-10.7-24-24V168.6L69.2 289.1c-9.3 9.8-24.8 10-34.3.4z"},child:[]}]})(s)}function hMe(s){return be({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"},child:[]}]})(s)}function cMe(s){return be({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"},child:[]}]})(s)}function fMe(s){return be({attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M296 160H180.6l42.6-129.8C227.2 15 215.7 0 200 0H56C44 0 33.8 8.9 32.2 20.8l-32 240C-1.7 275.2 9.5 288 24 288h118.7L96.6 482.5c-3.6 15.2 8 29.5 23.3 29.5 8.4 0 16.4-4.4 20.8-12l176-304c9.3-15.9-2.2-36-20.7-36z"},child:[]}]})(s)}function dMe(s){return be({attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"},child:[]}]})(s)}function _Me(s){return be({attr:{viewBox:"0 0 192 512"},child:[{tag:"path",attr:{d:"M192 127.338v257.324c0 17.818-21.543 26.741-34.142 14.142L29.196 270.142c-7.81-7.81-7.81-20.474 0-28.284l128.662-128.662c12.599-12.6 34.142-3.676 34.142 14.142z"},child:[]}]})(s)}function gMe(s){return be({attr:{viewBox:"0 0 192 512"},child:[{tag:"path",attr:{d:"M0 384.662V127.338c0-17.818 21.543-26.741 34.142-14.142l128.662 128.662c7.81 7.81 7.81 20.474 0 28.284L34.142 398.804C21.543 411.404 0 402.48 0 384.662z"},child:[]}]})(s)}function pMe(s){return be({attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M288.662 352H31.338c-17.818 0-26.741-21.543-14.142-34.142l128.662-128.662c7.81-7.81 20.474-7.81 28.284 0l128.662 128.662c12.6 12.599 3.676 34.142-14.142 34.142z"},child:[]}]})(s)}function mMe(s){return be({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z"},child:[]}]})(s)}function vMe(s){return be({attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z"},child:[]}]})(s)}function EMe(s){return be({attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"},child:[]}]})(s)}function yMe(s){return be({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M240.971 130.524l194.343 194.343c9.373 9.373 9.373 24.569 0 33.941l-22.667 22.667c-9.357 9.357-24.522 9.375-33.901.04L224 227.495 69.255 381.516c-9.379 9.335-24.544 9.317-33.901-.04l-22.667-22.667c-9.373-9.373-9.373-24.569 0-33.941L207.03 130.525c9.372-9.373 24.568-9.373 33.941-.001z"},child:[]}]})(s)}function TMe(s){return be({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M592 192H473.26c12.69 29.59 7.12 65.2-17 89.32L320 417.58V464c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48V240c0-26.51-21.49-48-48-48zM480 376c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24zm-46.37-186.7L258.7 14.37c-19.16-19.16-50.23-19.16-69.39 0L14.37 189.3c-19.16 19.16-19.16 50.23 0 69.39L189.3 433.63c19.16 19.16 50.23 19.16 69.39 0L433.63 258.7c19.16-19.17 19.16-50.24 0-69.4zM96 248c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24zm128 128c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24zm0-128c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24zm0-128c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24zm128 128c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"},child:[]}]})(s)}function IMe(s){return be({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm80 248c0 44.112-35.888 80-80 80s-80-35.888-80-80 35.888-80 80-80 80 35.888 80 80z"},child:[]}]})(s)}function RMe(s){return be({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M512 320s-64 92.65-64 128c0 35.35 28.66 64 64 64s64-28.65 64-64-64-128-64-128zm-9.37-102.94L294.94 9.37C288.69 3.12 280.5 0 272.31 0s-16.38 3.12-22.62 9.37l-81.58 81.58L81.93 4.76c-6.25-6.25-16.38-6.25-22.62 0L36.69 27.38c-6.24 6.25-6.24 16.38 0 22.62l86.19 86.18-94.76 94.76c-37.49 37.48-37.49 98.26 0 135.75l117.19 117.19c18.74 18.74 43.31 28.12 67.87 28.12 24.57 0 49.13-9.37 67.87-28.12l221.57-221.57c12.5-12.5 12.5-32.75.01-45.25zm-116.22 70.97H65.93c1.36-3.84 3.57-7.98 7.43-11.83l13.15-13.15 81.61-81.61 58.6 58.6c12.49 12.49 32.75 12.49 45.24 0s12.49-32.75 0-45.24l-58.6-58.6 58.95-58.95 162.44 162.44-48.34 48.34z"},child:[]}]})(s)}function SMe(s){return be({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M349.565 98.783C295.978 98.783 251.721 64 184.348 64c-24.955 0-47.309 4.384-68.045 12.013a55.947 55.947 0 0 0 3.586-23.562C118.117 24.015 94.806 1.206 66.338.048 34.345-1.254 8 24.296 8 56c0 19.026 9.497 35.825 24 45.945V488c0 13.255 10.745 24 24 24h16c13.255 0 24-10.745 24-24v-94.4c28.311-12.064 63.582-22.122 114.435-22.122 53.588 0 97.844 34.783 165.217 34.783 48.169 0 86.667-16.294 122.505-40.858C506.84 359.452 512 349.571 512 339.045v-243.1c0-23.393-24.269-38.87-45.485-29.016-34.338 15.948-76.454 31.854-116.95 31.854z"},child:[]}]})(s)}function bMe(s){return be({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z"},child:[]}]})(s)}function AMe(s){return be({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"},child:[]}]})(s)}function OMe(s){return be({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z"},child:[]}]})(s)}function wMe(s){return be({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"},child:[]}]})(s)}function CMe(s){return be({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"},child:[]}]})(s)}function MMe(s){return be({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M304 192v32c0 6.6-5.4 12-12 12H124c-6.6 0-12-5.4-12-12v-32c0-6.6 5.4-12 12-12h168c6.6 0 12 5.4 12 12zm201 284.7L476.7 505c-9.4 9.4-24.6 9.4-33.9 0L343 405.3c-4.5-4.5-7-10.6-7-17V372c-35.3 27.6-79.7 44-128 44C93.1 416 0 322.9 0 208S93.1 0 208 0s208 93.1 208 208c0 48.3-16.4 92.7-44 128h16.3c6.4 0 12.5 2.5 17 7l99.7 99.7c9.3 9.4 9.3 24.6 0 34zM344 208c0-75.2-60.8-136-136-136S72 132.8 72 208s60.8 136 136 136 136-60.8 136-136z"},child:[]}]})(s)}function NMe(s){return be({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M304 192v32c0 6.6-5.4 12-12 12h-56v56c0 6.6-5.4 12-12 12h-32c-6.6 0-12-5.4-12-12v-56h-56c-6.6 0-12-5.4-12-12v-32c0-6.6 5.4-12 12-12h56v-56c0-6.6 5.4-12 12-12h32c6.6 0 12 5.4 12 12v56h56c6.6 0 12 5.4 12 12zm201 284.7L476.7 505c-9.4 9.4-24.6 9.4-33.9 0L343 405.3c-4.5-4.5-7-10.6-7-17V372c-35.3 27.6-79.7 44-128 44C93.1 416 0 322.9 0 208S93.1 0 208 0s208 93.1 208 208c0 48.3-16.4 92.7-44 128h16.3c6.4 0 12.5 2.5 17 7l99.7 99.7c9.3 9.4 9.3 24.6 0 34zM344 208c0-75.2-60.8-136-136-136S72 132.8 72 208s60.8 136 136 136 136-60.8 136-136z"},child:[]}]})(s)}function PMe(s){return be({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"},child:[]}]})(s)}function kMe(s){return be({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497 273L329 441c-15 15-41 4.5-41-17v-96H152c-13.3 0-24-10.7-24-24v-96c0-13.3 10.7-24 24-24h136V88c0-21.4 25.9-32 41-17l168 168c9.3 9.4 9.3 24.6 0 34zM192 436v-40c0-6.6-5.4-12-12-12H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h84c6.6 0 12-5.4 12-12V76c0-6.6-5.4-12-12-12H96c-53 0-96 43-96 96v192c0 53 43 96 96 96h84c6.6 0 12-5.4 12-12z"},child:[]}]})(s)}function xMe(s){return be({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M370.72 133.28C339.458 104.008 298.888 87.962 255.848 88c-77.458.068-144.328 53.178-162.791 126.85-1.344 5.363-6.122 9.15-11.651 9.15H24.103c-7.498 0-13.194-6.807-11.807-14.176C33.933 94.924 134.813 8 256 8c66.448 0 126.791 26.136 171.315 68.685L463.03 40.97C478.149 25.851 504 36.559 504 57.941V192c0 13.255-10.745 24-24 24H345.941c-21.382 0-32.09-25.851-16.971-40.971l41.75-41.749zM32 296h134.059c21.382 0 32.09 25.851 16.971 40.971l-41.75 41.75c31.262 29.273 71.835 45.319 114.876 45.28 77.418-.07 144.315-53.144 162.787-126.849 1.344-5.363 6.122-9.15 11.651-9.15h57.304c7.498 0 13.194 6.807 11.807 14.176C478.067 417.076 377.187 504 256 504c-66.448 0-126.791-26.136-171.315-68.685L48.97 471.03C33.851 486.149 8 475.441 8 454.059V320c0-13.255 10.745-24 24-24z"},child:[]}]})(s)}function DMe(s){return be({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M0 252.118V48C0 21.49 21.49 0 48 0h204.118a48 48 0 0 1 33.941 14.059l211.882 211.882c18.745 18.745 18.745 49.137 0 67.882L293.823 497.941c-18.745 18.745-49.137 18.745-67.882 0L14.059 286.059A48 48 0 0 1 0 252.118zM112 64c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48z"},child:[]}]})(s)}function LMe(s){return be({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M149.333 56v80c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V56c0-13.255 10.745-24 24-24h101.333c13.255 0 24 10.745 24 24zm181.334 240v-80c0-13.255-10.745-24-24-24H205.333c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24h101.333c13.256 0 24.001-10.745 24.001-24zm32-240v80c0 13.255 10.745 24 24 24H488c13.255 0 24-10.745 24-24V56c0-13.255-10.745-24-24-24H386.667c-13.255 0-24 10.745-24 24zm-32 80V56c0-13.255-10.745-24-24-24H205.333c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24h101.333c13.256 0 24.001-10.745 24.001-24zm-205.334 56H24c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24h101.333c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24zM0 376v80c0 13.255 10.745 24 24 24h101.333c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H24c-13.255 0-24 10.745-24 24zm386.667-56H488c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H386.667c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24zm0 160H488c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H386.667c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24zM181.333 376v80c0 13.255 10.745 24 24 24h101.333c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H205.333c-13.255 0-24 10.745-24 24z"},child:[]}]})(s)}function UMe(s){return be({attr:{viewBox:"0 0 352 512"},child:[{tag:"path",attr:{d:"M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"},child:[]}]})(s)}function FMe(s){return be({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"},child:[]}]})(s)}function BMe(s){return be({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32zm70.11-175.8l89.38-94.26a15.41 15.41 0 0 1 22.62 0l89.38 94.26c10.08 10.62 2.94 28.8-11.32 28.8H256v112a16 16 0 0 1-16 16h-32a16 16 0 0 1-16-16V320h-57.37c-14.26 0-21.4-18.18-11.32-28.8zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"},child:[]}]})(s)}function GMe(s){return be({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"},child:[]}]})(s)}function VMe(s){return be({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"},child:[]}]})(s)}function jMe(s){return be({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"},child:[]}]})(s)}function zMe(s){return be({attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M215.03 72.04L126.06 161H24c-13.26 0-24 10.74-24 24v144c0 13.25 10.74 24 24 24h102.06l88.97 88.95c15.03 15.03 40.97 4.47 40.97-16.97V89.02c0-21.47-25.96-31.98-40.97-16.98zm123.2 108.08c-11.58-6.33-26.19-2.16-32.61 9.45-6.39 11.61-2.16 26.2 9.45 32.61C327.98 229.28 336 242.62 336 257c0 14.38-8.02 27.72-20.92 34.81-11.61 6.41-15.84 21-9.45 32.61 6.43 11.66 21.05 15.8 32.61 9.45 28.23-15.55 45.77-45 45.77-76.88s-17.54-61.32-45.78-76.87z"},child:[]}]})(s)}function HMe(s){return be({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M215.03 71.05L126.06 160H24c-13.26 0-24 10.74-24 24v144c0 13.25 10.74 24 24 24h102.06l88.97 88.95c15.03 15.03 40.97 4.47 40.97-16.97V88.02c0-21.46-25.96-31.98-40.97-16.97zM461.64 256l45.64-45.64c6.3-6.3 6.3-16.52 0-22.82l-22.82-22.82c-6.3-6.3-16.52-6.3-22.82 0L416 210.36l-45.64-45.64c-6.3-6.3-16.52-6.3-22.82 0l-22.82 22.82c-6.3 6.3-6.3 16.52 0 22.82L370.36 256l-45.63 45.63c-6.3 6.3-6.3 16.52 0 22.82l22.82 22.82c6.3 6.3 16.52 6.3 22.82 0L416 301.64l45.64 45.64c6.3 6.3 16.52 6.3 22.82 0l22.82-22.82c6.3-6.3 6.3-16.52 0-22.82L461.64 256z"},child:[]}]})(s)}function WMe(s){return be({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M215.03 71.05L126.06 160H24c-13.26 0-24 10.74-24 24v144c0 13.25 10.74 24 24 24h102.06l88.97 88.95c15.03 15.03 40.97 4.47 40.97-16.97V88.02c0-21.46-25.96-31.98-40.97-16.97zm233.32-51.08c-11.17-7.33-26.18-4.24-33.51 6.95-7.34 11.17-4.22 26.18 6.95 33.51 66.27 43.49 105.82 116.6 105.82 195.58 0 78.98-39.55 152.09-105.82 195.58-11.17 7.32-14.29 22.34-6.95 33.5 7.04 10.71 21.93 14.56 33.51 6.95C528.27 439.58 576 351.33 576 256S528.27 72.43 448.35 19.97zM480 256c0-63.53-32.06-121.94-85.77-156.24-11.19-7.14-26.03-3.82-33.12 7.46s-3.78 26.21 7.41 33.36C408.27 165.97 432 209.11 432 256s-23.73 90.03-63.48 115.42c-11.19 7.14-14.5 22.07-7.41 33.36 6.51 10.36 21.12 15.14 33.12 7.46C447.94 377.94 480 319.54 480 256zm-141.77-76.87c-11.58-6.33-26.19-2.16-32.61 9.45-6.39 11.61-2.16 26.2 9.45 32.61C327.98 228.28 336 241.63 336 256c0 14.38-8.02 27.72-20.92 34.81-11.61 6.41-15.84 21-9.45 32.61 6.43 11.66 21.05 15.8 32.61 9.45 28.23-15.55 45.77-45 45.77-76.88s-17.54-61.32-45.78-76.86z"},child:[]}]})(s)}function YMe(s){return be({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-16 160H64v-84c0-6.6 5.4-12 12-12h360c6.6 0 12 5.4 12 12v84z"},child:[]}]})(s)}function XMe(s){return be({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M512 48v288c0 26.5-21.5 48-48 48h-48V176c0-44.1-35.9-80-80-80H128V48c0-26.5 21.5-48 48-48h288c26.5 0 48 21.5 48 48zM384 176v288c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V176c0-26.5 21.5-48 48-48h288c26.5 0 48 21.5 48 48zm-68 28c0-6.6-5.4-12-12-12H76c-6.6 0-12 5.4-12 12v52h252v-52z"},child:[]}]})(s)}function oh(s,e,t){let i=t.initialDeps??[],n;function r(){var a,o,l,u;let c;t.key&&((a=t.debug)!=null&&a.call(t))&&(c=Date.now());const h=s();if(!(h.length!==i.length||h.some((_,g)=>i[g]!==_)))return n;i=h;let d;if(t.key&&((o=t.debug)!=null&&o.call(t))&&(d=Date.now()),n=e(...h),t.key&&((l=t.debug)!=null&&l.call(t))){const _=Math.round((Date.now()-c)*100)/100,g=Math.round((Date.now()-d)*100)/100,p=g/16,m=(v,E)=>{for(v=String(v);v.length{i=a},r}function NT(s,e){if(s===void 0)throw new Error("Unexpected undefined");return s}const TAe=(s,e)=>Math.abs(s-e)<1,IAe=(s,e,t)=>{let i;return function(...n){s.clearTimeout(i),i=s.setTimeout(()=>e.apply(this,n),t)}},RAe=s=>s,SAe=s=>{const e=Math.max(s.startIndex-s.overscan,0),t=Math.min(s.endIndex+s.overscan,s.count-1),i=[];for(let n=e;n<=t;n++)i.push(n);return i},bAe=(s,e)=>{const t=s.scrollElement;if(!t)return;const i=s.targetWindow;if(!i)return;const n=a=>{const{width:o,height:l}=a;e({width:Math.round(o),height:Math.round(l)})};if(n(t.getBoundingClientRect()),!i.ResizeObserver)return()=>{};const r=new i.ResizeObserver(a=>{const o=()=>{const l=a[0];if(l!=null&&l.borderBoxSize){const u=l.borderBoxSize[0];if(u){n({width:u.inlineSize,height:u.blockSize});return}}n(t.getBoundingClientRect())};s.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()});return r.observe(t,{box:"border-box"}),()=>{r.unobserve(t)}},Lx={passive:!0},Ux=typeof window>"u"?!0:"onscrollend"in window,AAe=(s,e)=>{const t=s.scrollElement;if(!t)return;const i=s.targetWindow;if(!i)return;let n=0;const r=s.options.useScrollendEvent&&Ux?()=>{}:IAe(i,()=>{e(n,!1)},s.options.isScrollingResetDelay),a=c=>()=>{const{horizontal:h,isRtl:f}=s.options;n=h?t.scrollLeft*(f&&-1||1):t.scrollTop,r(),e(n,c)},o=a(!0),l=a(!1);l(),t.addEventListener("scroll",o,Lx);const u=s.options.useScrollendEvent&&Ux;return u&&t.addEventListener("scrollend",l,Lx),()=>{t.removeEventListener("scroll",o),u&&t.removeEventListener("scrollend",l)}},OAe=(s,e,t)=>{if(e!=null&&e.borderBoxSize){const i=e.borderBoxSize[0];if(i)return Math.round(i[t.options.horizontal?"inlineSize":"blockSize"])}return Math.round(s.getBoundingClientRect()[t.options.horizontal?"width":"height"])},wAe=(s,{adjustments:e=0,behavior:t},i)=>{var n,r;const a=s+e;(r=(n=i.scrollElement)==null?void 0:n.scrollTo)==null||r.call(n,{[i.options.horizontal?"left":"top"]:a,behavior:t})};class CAe{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let t=null;const i=()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(n=>{n.forEach(r=>{const a=()=>{this._measureElement(r.target,r)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()})}));return{disconnect:()=>{var n;(n=i())==null||n.disconnect(),t=null},observe:n=>{var r;return(r=i())==null?void 0:r.observe(n,{box:"border-box"})},unobserve:n=>{var r;return(r=i())==null?void 0:r.unobserve(n)}}})(),this.range=null,this.setOptions=t=>{Object.entries(t).forEach(([i,n])=>{typeof n>"u"&&delete t[i]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:RAe,rangeExtractor:SAe,onChange:()=>{},measureElement:OAe,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...t}},this.notify=t=>{var i,n;(n=(i=this.options).onChange)==null||n.call(i,this,t)},this.maybeNotify=oh(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),t=>{this.notify(t)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const i=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==i){if(this.cleanup(),!i){this.maybeNotify();return}this.scrollElement=i,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this.elementsCache.forEach(n=>{this.observer.observe(n)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,n=>{this.scrollRect=n,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(n,r)=>{this.scrollAdjustments=0,this.scrollDirection=r?this.getScrollOffset()this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(t,i)=>{const n=new Map,r=new Map;for(let a=i-1;a>=0;a--){const o=t[a];if(n.has(o.lane))continue;const l=r.get(o.lane);if(l==null||o.end>l.end?r.set(o.lane,o):o.enda.end===o.end?a.index-o.index:a.end-o.end)[0]:void 0},this.getMeasurementOptions=oh(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(t,i,n,r,a)=>(this.pendingMeasuredCacheIndexes=[],{count:t,paddingStart:i,scrollMargin:n,getItemKey:r,enabled:a}),{key:!1}),this.getMeasurements=oh(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:t,paddingStart:i,scrollMargin:n,getItemKey:r,enabled:a},o)=>{if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(c=>{this.itemSizeCache.set(c.key,c.size)}));const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const u=this.measurementsCache.slice(0,l);for(let c=l;cthis.options.debug}),this.calculateRange=oh(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(t,i,n,r)=>this.range=t.length>0&&i>0?MAe({measurements:t,outerSize:i,scrollOffset:n,lanes:r}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=oh(()=>{let t=null,i=null;const n=this.calculateRange();return n&&(t=n.startIndex,i=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,t,i]),[this.options.rangeExtractor,this.options.overscan,this.options.count,t,i]},(t,i,n,r,a)=>r===null||a===null?[]:t({startIndex:r,endIndex:a,overscan:i,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=t=>{const i=this.options.indexAttribute,n=t.getAttribute(i);return n?parseInt(n,10):(console.warn(`Missing attribute name '${i}={index}' on measured element.`),-1)},this._measureElement=(t,i)=>{const n=this.indexFromElement(t),r=this.measurementsCache[n];if(!r)return;const a=r.key,o=this.elementsCache.get(a);o!==t&&(o&&this.observer.unobserve(o),this.observer.observe(t),this.elementsCache.set(a,t)),t.isConnected&&this.resizeItem(n,this.options.measureElement(t,i,this))},this.resizeItem=(t,i)=>{const n=this.measurementsCache[t];if(!n)return;const r=this.itemSizeCache.get(n.key)??n.size,a=i-r;a!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(n,a,this):n.start{if(!t){this.elementsCache.forEach((i,n)=>{i.isConnected||(this.observer.unobserve(i),this.elementsCache.delete(n))});return}this._measureElement(t,void 0)},this.getVirtualItems=oh(()=>[this.getVirtualIndexes(),this.getMeasurements()],(t,i)=>{const n=[];for(let r=0,a=t.length;rthis.options.debug}),this.getVirtualItemForOffset=t=>{const i=this.getMeasurements();if(i.length!==0)return NT(i[y9(0,i.length-1,n=>NT(i[n]).start,t)])},this.getOffsetForAlignment=(t,i,n=0)=>{const r=this.getSize(),a=this.getScrollOffset();i==="auto"&&(i=t>=a+r?"end":"start"),i==="center"?t+=(n-r)/2:i==="end"&&(t-=r);const o=this.options.horizontal?"scrollWidth":"scrollHeight",u=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[o]:this.scrollElement[o]:0)-r;return Math.max(Math.min(u,t),0)},this.getOffsetForIndex=(t,i="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const n=this.measurementsCache[t];if(!n)return;const r=this.getSize(),a=this.getScrollOffset();if(i==="auto")if(n.end>=a+r-this.options.scrollPaddingEnd)i="end";else if(n.start<=a+this.options.scrollPaddingStart)i="start";else return[a,i];const o=i==="end"?n.end+this.options.scrollPaddingEnd:n.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(o,i,n.size),i]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(t,{align:i="start",behavior:n}={})=>{this.cancelScrollToIndex(),n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(t,i),{adjustments:void 0,behavior:n})},this.scrollToIndex=(t,{align:i="auto",behavior:n}={})=>{t=Math.max(0,Math.min(t,this.options.count-1)),this.cancelScrollToIndex(),n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const r=this.getOffsetForIndex(t,i);if(!r)return;const[a,o]=r;this._scrollToOffset(a,{adjustments:void 0,behavior:n}),n!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(t))){const[u]=NT(this.getOffsetForIndex(t,o));TAe(u,this.getScrollOffset())||this.scrollToIndex(t,{align:o,behavior:n})}else this.scrollToIndex(t,{align:o,behavior:n})}))},this.scrollBy=(t,{behavior:i}={})=>{this.cancelScrollToIndex(),i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+t,{adjustments:void 0,behavior:i})},this.getTotalSize=()=>{var t;const i=this.getMeasurements();let n;if(i.length===0)n=this.options.paddingStart;else if(this.options.lanes===1)n=((t=i[i.length-1])==null?void 0:t.end)??0;else{const r=Array(this.options.lanes).fill(null);let a=i.length-1;for(;a>=0&&r.some(o=>o===null);){const o=i[a];r[o.lane]===null&&(r[o.lane]=o.end),a--}n=Math.max(...r.filter(o=>o!==null))}return Math.max(n-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(t,{adjustments:i,behavior:n})=>{this.options.scrollToFn(t,{behavior:n,adjustments:i},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(e)}}const y9=(s,e,t,i)=>{for(;s<=e;){const n=(s+e)/2|0,r=t(n);if(ri)e=n-1;else return n}return s>0?s-1:0};function MAe({measurements:s,outerSize:e,scrollOffset:t,lanes:i}){const n=s.length-1,r=l=>s[l].start;if(s.length<=i)return{startIndex:0,endIndex:n};let a=y9(0,n,r,t),o=a;if(i===1)for(;o1){const l=Array(i).fill(0);for(;oc=0&&u.some(c=>c>=t);){const c=s[a];u[c.lane]=c.start,a--}a=Math.max(0,a-a%i),o=Math.min(n,o+(i-1-o%i))}return{startIndex:a,endIndex:o}}const Fx=typeof document<"u"?D.useLayoutEffect:D.useEffect;function NAe(s){const e=D.useReducer(()=>({}),{})[1],t={...s,onChange:(n,r)=>{var a;r?fw.flushSync(e):e(),(a=s.onChange)==null||a.call(s,n,r)}},[i]=D.useState(()=>new CAe(t));return i.setOptions(t),Fx(()=>i._didMount(),[]),Fx(()=>i._willUpdate()),i}function KMe(s){return NAe({observeElementRect:bAe,observeElementOffset:AAe,scrollToFn:wAe,...s})}const PAe=D.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,PT=PAe.ReactCurrentDispatcher,kAe=()=>D.useReducer(()=>({}))[1],xAe=s=>()=>{const e=`Hook "${s}" no possible to using inside useBetween scope.`;throw console.error(e),new Error(e)},HA=(s,e)=>Object.is(s,e),Lf=(s,e)=>!s||!e||s.length!==e.length||s.some((t,i)=>!HA(t,e[i])),DAe=()=>typeof window>"u",Bx=new Map;let yd=[],qp=0,zh=[],Lo=[],Td=()=>{},kT=DAe(),LAe;const $a=()=>{const s=qp++;return yd[s]=yd[s]||{}},T9={useState(s){const e=$a(),t=Td;return e.initialized||(e.state=typeof s=="function"?s():s,e.set=i=>{if(typeof i=="function")return e.set(i(e.state));HA(i,e.state)||(e.state=i,t())},e.initialized=!0),[e.state,e.set]},useReducer(s,e,t){const i=$a(),n=Td;return i.initialized||(i.state=t?t(e):e,i.dispatch=r=>{const a=s(i.state,r);HA(a,i.state)||(i.state=a,n())},i.initialized=!0),[i.state,i.dispatch]},useEffect(s,e){if(kT)return;const t=$a();t.initialized?Lf(t.deps,e)&&(t.deps=e,zh.push([t,e,s])):(t.deps=e,t.initialized=!0,zh.push([t,e,s]))},useLayoutEffect(s,e){if(kT)return;const t=$a();t.initialized?Lf(t.deps,e)&&(t.deps=e,Lo.push([t,e,s])):(t.deps=e,t.initialized=!0,Lo.push([t,e,s]))},useCallback(s,e){const t=$a();return t.initialized?Lf(t.deps,e)&&(t.deps=e,t.fn=s):(t.fn=s,t.deps=e,t.initialized=!0),t.fn},useMemo(s,e){const t=$a();return t.initialized?Lf(t.deps,e)&&(t.deps=e,t.state=s()):(t.deps=e,t.state=s(),t.initialized=!0),t.state},useRef(s){const e=$a();return e.initialized||(e.state={current:s},e.initialized=!0),e.state},useImperativeHandle(s,e,t){if(kT)return;const i=$a();i.initialized?Lf(i.deps,t)&&(i.deps=t,Lo.push([i,t,()=>{typeof s=="function"?s(e()):s.current=e()}])):(i.deps=t,i.initialized=!0,Lo.push([i,t,()=>{typeof s=="function"?s(e()):s.current=e()}]))}};["readContext","useContext","useDebugValue","useResponder","useDeferredValue","useTransition"].forEach(s=>T9[s]=xAe(s));const UAe=(s,e)=>{const t=[];let i=[],n,r=[],a=!1;const o=()=>{i.slice().forEach(d=>d())},l=()=>{if(a)return;const d=PT.current,_=[qp,zh,Lo,yd,Td];let g=!1,p=!0;if(qp=0,zh=[],Lo=[],yd=t,Td=()=>{p?g=!0:l()},PT.current=T9,n=s(LAe),[Lo,zh].forEach(m=>m.forEach(([v,E,y])=>{if(v.deps=E,v.unsub){const w=v.unsub;r=r.filter(C=>C!==w),w()}const T=y();typeof T=="function"?(r.push(T),v.unsub=T):v.unsub=null})),[qp,zh,Lo,yd,Td]=_,PT.current=d,p=!1,!g){o();return}l()};return{init:()=>l(),get:()=>n,sub:d=>{i.indexOf(d)===-1&&i.push(d)},unsub:d=>{i=i.filter(_=>_!==d)},unsubs:()=>r,mock:d=>{a=!0,n=d,o()},unmock:()=>{a=!1,l()}}},FAe=s=>{let e=Bx.get(s);return e||(e=UAe(s),Bx.set(s,e),e.init()),e},qMe=s=>{const e=kAe();let t=FAe(s);return t.sub(e),D.useEffect(()=>(t.sub(e),()=>t.unsub(e)),[t,e]),t.get()};function WA(s,e){return WA=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t},WA(s,e)}function I9(s,e){s.prototype=Object.create(e.prototype),s.prototype.constructor=s,WA(s,e)}function xT(s){return s&&s.stopPropagation&&s.stopPropagation(),s&&s.preventDefault&&s.preventDefault(),!1}function DT(s){return s==null?[]:Array.isArray(s)?s.slice():[s]}function yp(s){return s!==null&&s.length===1?s[0]:s.slice()}function Tp(s){Object.keys(s).forEach(e=>{typeof document<"u"&&document.addEventListener(e,s[e],!1)})}function Il(s,e){return YA(function(t,i){let n=t;return n<=i.min&&(n=i.min),n>=i.max&&(n=i.max),n}(s,e),e)}function YA(s,e){const t=(s-e.min)%e.step;let i=s-t;return 2*Math.abs(t)>=e.step&&(i+=t>0?e.step:-e.step),parseFloat(i.toFixed(5))}let XA=function(s){function e(i){var n;(n=s.call(this,i)||this).onKeyUp=()=>{n.onEnd()},n.onMouseUp=()=>{n.onEnd(n.getMouseEventMap())},n.onTouchEnd=o=>{o.preventDefault(),n.onEnd(n.getTouchEventMap())},n.onBlur=()=>{n.setState({index:-1},n.onEnd(n.getKeyDownEventMap()))},n.onMouseMove=o=>{n.setState({pending:!0});const l=n.getMousePosition(o),u=n.getDiffPosition(l[0]),c=n.getValueFromPosition(u);n.move(c)},n.onTouchMove=o=>{if(o.touches.length>1)return;n.setState({pending:!0});const l=n.getTouchPosition(o);if(n.isScrolling===void 0){const h=l[0]-n.startPosition[0],f=l[1]-n.startPosition[1];n.isScrolling=Math.abs(f)>Math.abs(h)}if(n.isScrolling)return void n.setState({index:-1});const u=n.getDiffPosition(l[0]),c=n.getValueFromPosition(u);n.move(c)},n.onKeyDown=o=>{if(!(o.ctrlKey||o.shiftKey||o.altKey||o.metaKey))switch(n.setState({pending:!0}),o.key){case"ArrowLeft":case"ArrowDown":case"Left":case"Down":o.preventDefault(),n.moveDownByStep();break;case"ArrowRight":case"ArrowUp":case"Right":case"Up":o.preventDefault(),n.moveUpByStep();break;case"Home":o.preventDefault(),n.move(n.props.min);break;case"End":o.preventDefault(),n.move(n.props.max);break;case"PageDown":o.preventDefault(),n.moveDownByStep(n.props.pageFn(n.props.step));break;case"PageUp":o.preventDefault(),n.moveUpByStep(n.props.pageFn(n.props.step))}},n.onSliderMouseDown=o=>{if(!n.props.disabled&&o.button!==2){if(n.setState({pending:!0}),!n.props.snapDragDisabled){const l=n.getMousePosition(o);n.forceValueFromPosition(l[0],u=>{n.start(u,l[0]),Tp(n.getMouseEventMap())})}xT(o)}},n.onSliderClick=o=>{if(!n.props.disabled&&n.props.onSliderClick&&!n.hasMoved){const l=n.getMousePosition(o),u=Il(n.calcValue(n.calcOffsetFromPosition(l[0])),n.props);n.props.onSliderClick(u)}},n.createOnKeyDown=o=>l=>{n.props.disabled||(n.start(o),Tp(n.getKeyDownEventMap()),xT(l))},n.createOnMouseDown=o=>l=>{if(n.props.disabled||l.button===2)return;n.setState({pending:!0});const u=n.getMousePosition(l);n.start(o,u[0]),Tp(n.getMouseEventMap()),xT(l)},n.createOnTouchStart=o=>l=>{if(n.props.disabled||l.touches.length>1)return;n.setState({pending:!0});const u=n.getTouchPosition(l);n.startPosition=u,n.isScrolling=void 0,n.start(o,u[0]),Tp(n.getTouchEventMap()),function(c){c.stopPropagation&&c.stopPropagation()}(l)},n.handleResize=()=>{const o=window.setTimeout(()=>{n.pendingResizeTimeouts.shift(),n.resize()},0);n.pendingResizeTimeouts.push(o)},n.renderThumb=(o,l)=>{const u=n.props.thumbClassName+" "+n.props.thumbClassName+"-"+l+" "+(n.state.index===l?n.props.thumbActiveClassName:""),c={ref:f=>{n["thumb"+l]=f},key:n.props.thumbClassName+"-"+l,className:u,style:o,onMouseDown:n.createOnMouseDown(l),onTouchStart:n.createOnTouchStart(l),onFocus:n.createOnKeyDown(l),tabIndex:0,role:"slider","aria-orientation":n.props.orientation,"aria-valuenow":n.state.value[l],"aria-valuemin":n.props.min,"aria-valuemax":n.props.max,"aria-label":Array.isArray(n.props.ariaLabel)?n.props.ariaLabel[l]:n.props.ariaLabel,"aria-labelledby":Array.isArray(n.props.ariaLabelledby)?n.props.ariaLabelledby[l]:n.props.ariaLabelledby,"aria-disabled":n.props.disabled},h={index:l,value:yp(n.state.value),valueNow:n.state.value[l]};return n.props.ariaValuetext&&(c["aria-valuetext"]=typeof n.props.ariaValuetext=="string"?n.props.ariaValuetext:n.props.ariaValuetext(h)),n.props.renderThumb(c,h)},n.renderTrack=(o,l,u)=>{const c={key:n.props.trackClassName+"-"+o,className:n.props.trackClassName+" "+n.props.trackClassName+"-"+o,style:n.buildTrackStyle(l,n.state.upperBound-u)},h={index:o,value:yp(n.state.value)};return n.props.renderTrack(c,h)};let r=DT(i.value);r.length||(r=DT(i.defaultValue)),n.pendingResizeTimeouts=[];const a=[];for(let o=0;oIl(a,i))}:null},t.componentDidUpdate=function(){this.state.upperBound===0&&this.resize()},t.componentWillUnmount=function(){this.clearPendingResizeTimeouts(),this.resizeObserver&&this.resizeObserver.disconnect()},t.onEnd=function(i){i&&function(n){Object.keys(n).forEach(r=>{typeof document<"u"&&document.removeEventListener(r,n[r],!1)})}(i),this.hasMoved&&this.fireChangeEvent("onAfterChange"),this.setState({pending:!1}),this.hasMoved=!1},t.getValue=function(){return yp(this.state.value)},t.getClosestIndex=function(i){let n=Number.MAX_VALUE,r=-1;const{value:a}=this.state,o=a.length;for(let l=0;l{n(a),this.fireChangeEvent("onChange")})},t.clearPendingResizeTimeouts=function(){do{const i=this.pendingResizeTimeouts.shift();clearTimeout(i)}while(this.pendingResizeTimeouts.length)},t.start=function(i,n){const r=this["thumb"+i];r&&r.focus();const{zIndices:a}=this.state;a.splice(a.indexOf(i),1),a.push(i),this.setState(o=>({startValue:o.value[i],startPosition:n!==void 0?n:o.startPosition,index:i,zIndices:a}))},t.moveUpByStep=function(i){i===void 0&&(i=this.props.step);const n=this.state.value[this.state.index],r=Il(this.props.invert&&this.props.orientation==="horizontal"?n-i:n+i,this.props);this.move(Math.min(r,this.props.max))},t.moveDownByStep=function(i){i===void 0&&(i=this.props.step);const n=this.state.value[this.state.index],r=Il(this.props.invert&&this.props.orientation==="horizontal"?n+i:n-i,this.props);this.move(Math.max(r,this.props.min))},t.move=function(i){const n=this.state.value.slice(),{index:r}=this.state,{length:a}=n,o=n[r];if(i===o)return;this.hasMoved||this.fireChangeEvent("onBeforeChange"),this.hasMoved=!0;const{pearling:l,max:u,min:c,minDistance:h}=this.props;if(!l){if(r>0){const f=n[r-1];if-h&&(i=f-h)}}n[r]=i,l&&a>1&&(i>o?(this.pushSucceeding(n,h,r),function(f,d,_,g){for(let p=0;pm&&(d[f-1-p]=m)}}(a,n,h,u)):ii[a+1];a+=1,o=i[a]+n)i[a+1]=YA(o,this.props)},t.pushPreceding=function(i,n,r){for(let a=r,o=i[a]-n;i[a-1]!==null&&o=0?this.posMinKey():void 0,zIndex:this.state.zIndices.indexOf(n)+1};return r[this.posMinKey()]=i+"px",r},t.buildTrackStyle=function(i,n){const r={position:"absolute",willChange:this.state.index>=0?this.posMinKey()+","+this.posMaxKey():void 0};return r[this.posMinKey()]=i,r[this.posMaxKey()]=n,r},t.buildMarkStyle=function(i){var n;return(n={position:"absolute"})[this.posMinKey()]=i,n},t.renderThumbs=function(i){const{length:n}=i,r=[];for(let o=0;oa):typeof i=="number"&&(i=Array.from({length:n}).map((r,a)=>a).filter(r=>r%i==0)),i.map(parseFloat).sort((r,a)=>r-a).map(r=>{const a=this.calcOffset(r),o={key:r,className:this.props.markClassName,style:this.buildMarkStyle(a)};return this.props.renderMark(o)})},t.render=function(){const i=[],{value:n}=this.state,r=n.length;for(let u=0;u{this.slider=u,this.resizeElementRef.current=u},style:{position:"relative"},className:this.props.className+(this.props.disabled?" disabled":""),onMouseDown:this.onSliderMouseDown,onClick:this.onSliderClick},a,o,l)},e}(Bt.Component);XA.displayName="ReactSlider",XA.defaultProps={min:0,max:100,step:1,pageFn:s=>10*s,minDistance:0,defaultValue:0,orientation:"horizontal",className:"slider",thumbClassName:"thumb",thumbActiveClassName:"active",trackClassName:"track",markClassName:"mark",withTracks:!0,pearling:!1,disabled:!1,snapDragDisabled:!1,invert:!1,marks:[],renderThumb:s=>Bt.createElement("div",s),renderTrack:s=>Bt.createElement("div",s),renderMark:s=>Bt.createElement("span",s)};var $Me=XA;function QMe(s){return be({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M2 20h20v4H2v-4zm3.49-3h2.42l1.27-3.58h5.65L16.09 17h2.42L13.25 3h-2.5L5.49 17zm4.42-5.61 2.03-5.79h.12l2.03 5.79H9.91z"},child:[]}]})(s)}function ZMe(s){return be({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"},child:[]}]})(s)}function JMe(s){return be({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"},child:[]}]})(s)}var R9={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */(function(s){(function(){var e={}.hasOwnProperty;function t(){for(var r="",a=0;a1?c-1:0),f=1;f=19?s.props.ref:s.ref}const M2=!!(typeof window<"u"&&window.document&&window.document.createElement);var qA=!1,$A=!1;try{var LT={get passive(){return qA=!0},get once(){return $A=qA=!0}};M2&&(window.addEventListener("test",LT,LT),window.removeEventListener("test",LT,!0))}catch{}function aOe(s,e,t,i){if(i&&typeof i!="boolean"&&!$A){var n=i.once,r=i.capture,a=t;!$A&&n&&(a=t.__once||function o(l){this.removeEventListener(e,o,r),t.call(this,l)},t.__once=a),s.addEventListener(e,a,qA?i:r)}s.addEventListener(e,t,i)}function oOe(s,e,t,i){var n=i&&typeof i!="boolean"?i.capture:i;s.removeEventListener(e,t,n),t.__once&&s.removeEventListener(e,t.__once,n)}function vu(s,e,t,i){return aOe(s,e,t,i),function(){oOe(s,e,t,i)}}function lOe(s,e,t,i){if(i===void 0&&(i=!0),s){var n=document.createEvent("HTMLEvents");n.initEvent(e,t,i),s.dispatchEvent(n)}}function uOe(s){var e=b9(s,"transitionDuration")||"",t=e.indexOf("ms")===-1?1e3:1;return parseFloat(e)*t}function hOe(s,e,t){t===void 0&&(t=5);var i=!1,n=setTimeout(function(){i||lOe(s,"transitionend",!0)},e+t),r=vu(s,"transitionend",function(){i=!0},{once:!0});return function(){clearTimeout(n),r()}}function cOe(s,e,t,i){t==null&&(t=uOe(s)||0);var n=hOe(s,t,i),r=vu(s,"transitionend",e);return function(){n(),r()}}function Vx(s,e){const t=b9(s,e)||"",i=t.indexOf("ms")===-1?1e3:1;return parseFloat(t)*i}function fOe(s,e){const t=Vx(s,"transitionDuration"),i=Vx(s,"transitionDelay"),n=cOe(s,r=>{r.target===s&&(n(),e(r))},t+i)}function dOe(s){s.offsetHeight}const jx=s=>!s||typeof s=="function"?s:e=>{s.current=e};function _Oe(s,e){const t=jx(s),i=jx(e);return n=>{t&&t(n),i&&i(n)}}function N2(s,e){return D.useMemo(()=>_Oe(s,e),[s,e])}function e1(s){return s&&"setState"in s?Sh.findDOMNode(s):s??null}const gOe=Bt.forwardRef(({onEnter:s,onEntering:e,onEntered:t,onExit:i,onExiting:n,onExited:r,addEndListener:a,children:o,childRef:l,...u},c)=>{const h=D.useRef(null),f=N2(h,l),d=w=>{f(e1(w))},_=w=>C=>{w&&h.current&&w(h.current,C)},g=D.useCallback(_(s),[s]),p=D.useCallback(_(e),[e]),m=D.useCallback(_(t),[t]),v=D.useCallback(_(i),[i]),E=D.useCallback(_(n),[n]),y=D.useCallback(_(r),[r]),T=D.useCallback(_(a),[a]);return vt.jsx(Ka,{ref:c,...u,onEnter:g,onEntered:m,onEntering:p,onExit:v,onExited:y,onExiting:E,addEndListener:T,nodeRef:h,children:typeof o=="function"?(w,C)=>o(w,{...C,ref:d}):Bt.cloneElement(o,{ref:d})})});function pOe(s){const e=D.useRef(s);return D.useEffect(()=>{e.current=s},[s]),e}function mOe(s){const e=pOe(s);return D.useCallback(function(...t){return e.current&&e.current(...t)},[e])}function zx(){return D.useState(null)}function vOe(s){const e=D.useRef(s);return D.useEffect(()=>{e.current=s},[s]),e}function ng(s){const e=vOe(s);return D.useCallback(function(...t){return e.current&&e.current(...t)},[e])}function EOe(){const s=D.useRef(!0),e=D.useRef(()=>s.current);return D.useEffect(()=>(s.current=!0,()=>{s.current=!1}),[]),e.current}const yOe=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",TOe=typeof document<"u",Hx=TOe||yOe?D.useLayoutEffect:D.useEffect,IOe=["as","disabled"];function ROe(s,e){if(s==null)return{};var t={};for(var i in s)if({}.hasOwnProperty.call(s,i)){if(e.indexOf(i)>=0)continue;t[i]=s[i]}return t}function SOe(s){return!s||s.trim()==="#"}function M9({tagName:s,disabled:e,href:t,target:i,rel:n,role:r,onClick:a,tabIndex:o=0,type:l}){s||(t!=null||i!=null||n!=null?s="a":s="button");const u={tagName:s};if(s==="button")return[{type:l||"button",disabled:e},u];const c=f=>{if((e||s==="a"&&SOe(t))&&f.preventDefault(),e){f.stopPropagation();return}a==null||a(f)},h=f=>{f.key===" "&&(f.preventDefault(),c(f))};return s==="a"&&(t||(t="#"),e&&(t=void 0)),[{role:r??"button",disabled:void 0,tabIndex:e?void 0:o,href:t,target:s==="a"?i:void 0,"aria-disabled":e||void 0,rel:s==="a"?n:void 0,onClick:c,onKeyDown:h},u]}const bOe=D.forwardRef((s,e)=>{let{as:t,disabled:i}=s,n=ROe(s,IOe);const[r,{tagName:a}]=M9(Object.assign({tagName:t,disabled:i},n));return vt.jsx(a,Object.assign({},n,r,{ref:e}))});bOe.displayName="Button";const AOe={[ao]:"show",[Bl]:"show"},QA=D.forwardRef(({className:s,children:e,transitionClasses:t={},onEnter:i,...n},r)=>{const a={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...n},o=D.useCallback((l,u)=>{dOe(l),i==null||i(l,u)},[i]);return vt.jsx(gOe,{ref:r,addEndListener:fOe,...a,onEnter:o,childRef:Ag(e),children:(l,u)=>D.cloneElement(e,{...u,className:Zu("fade",s,e.props.className,AOe[l],t[l])})})});QA.displayName="Fade";const OOe=D.forwardRef(({as:s,bsPrefix:e,variant:t="primary",size:i,active:n=!1,disabled:r=!1,className:a,...o},l)=>{const u=Hu(e,"btn"),[c,{tagName:h}]=M9({tagName:s,disabled:r,...o}),f=h;return vt.jsx(f,{...c,...o,ref:l,disabled:r,className:Zu(a,u,n&&"active",t&&`${u}-${t}`,i&&`${u}-${i}`,o.href&&r&&"disabled")})});OOe.displayName="Button";function wOe(){const s=D.useRef(!0),e=D.useRef(()=>s.current);return D.useEffect(()=>(s.current=!0,()=>{s.current=!1}),[]),e.current}function COe(s){const e=D.useRef(s);return e.current=s,e}function MOe(s){const e=COe(s);D.useEffect(()=>()=>e.current(),[])}const ZA=2**31-1;function N9(s,e,t){const i=t-Date.now();s.current=i<=ZA?setTimeout(e,i):setTimeout(()=>N9(s,e,t),ZA)}function NOe(){const s=wOe(),e=D.useRef();return MOe(()=>clearTimeout(e.current)),D.useMemo(()=>{const t=()=>clearTimeout(e.current);function i(n,r=0){s()&&(t(),r<=ZA?e.current=setTimeout(n,r):N9(e,n,Date.now()+r))}return{set:i,clear:t,handleRef:e}},[])}var Wx=Object.prototype.hasOwnProperty;function Yx(s,e,t){for(t of s.keys())if(Id(t,e))return t}function Id(s,e){var t,i,n;if(s===e)return!0;if(s&&e&&(t=s.constructor)===e.constructor){if(t===Date)return s.getTime()===e.getTime();if(t===RegExp)return s.toString()===e.toString();if(t===Array){if((i=s.length)===e.length)for(;i--&&Id(s[i],e[i]););return i===-1}if(t===Set){if(s.size!==e.size)return!1;for(i of s)if(n=i,n&&typeof n=="object"&&(n=Yx(e,n),!n)||!e.has(n))return!1;return!0}if(t===Map){if(s.size!==e.size)return!1;for(i of s)if(n=i[0],n&&typeof n=="object"&&(n=Yx(e,n),!n)||!Id(i[1],e.get(n)))return!1;return!0}if(t===ArrayBuffer)s=new Uint8Array(s),e=new Uint8Array(e);else if(t===DataView){if((i=s.byteLength)===e.byteLength)for(;i--&&s.getInt8(i)===e.getInt8(i););return i===-1}if(ArrayBuffer.isView(s)){if((i=s.byteLength)===e.byteLength)for(;i--&&s[i]===e[i];);return i===-1}if(!t||typeof s=="object"){i=0;for(t in s)if(Wx.call(s,t)&&++i&&!Wx.call(e,t)||!(t in e)||!Id(s[t],e[t]))return!1;return Object.keys(e).length===i}}return s!==s&&e!==e}function POe(s){const e=EOe();return[s[0],D.useCallback(t=>{if(e())return s[1](t)},[e,s[1]])]}var Ls="top",Ln="bottom",Un="right",Us="left",P2="auto",Og=[Ls,Ln,Un,Us],af="start",rg="end",kOe="clippingParents",P9="viewport",Uf="popper",xOe="reference",Xx=Og.reduce(function(s,e){return s.concat([e+"-"+af,e+"-"+rg])},[]),k9=[].concat(Og,[P2]).reduce(function(s,e){return s.concat([e,e+"-"+af,e+"-"+rg])},[]),DOe="beforeRead",LOe="read",UOe="afterRead",FOe="beforeMain",BOe="main",GOe="afterMain",VOe="beforeWrite",jOe="write",zOe="afterWrite",HOe=[DOe,LOe,UOe,FOe,BOe,GOe,VOe,jOe,zOe];function Vr(s){return s.split("-")[0]}function un(s){if(s==null)return window;if(s.toString()!=="[object Window]"){var e=s.ownerDocument;return e&&e.defaultView||window}return s}function Wu(s){var e=un(s).Element;return s instanceof e||s instanceof Element}function jr(s){var e=un(s).HTMLElement;return s instanceof e||s instanceof HTMLElement}function k2(s){if(typeof ShadowRoot>"u")return!1;var e=un(s).ShadowRoot;return s instanceof e||s instanceof ShadowRoot}var wu=Math.max,t1=Math.min,of=Math.round;function JA(){var s=navigator.userAgentData;return s!=null&&s.brands&&Array.isArray(s.brands)?s.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function x9(){return!/^((?!chrome|android).)*safari/i.test(JA())}function lf(s,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var i=s.getBoundingClientRect(),n=1,r=1;e&&jr(s)&&(n=s.offsetWidth>0&&of(i.width)/s.offsetWidth||1,r=s.offsetHeight>0&&of(i.height)/s.offsetHeight||1);var a=Wu(s)?un(s):window,o=a.visualViewport,l=!x9()&&t,u=(i.left+(l&&o?o.offsetLeft:0))/n,c=(i.top+(l&&o?o.offsetTop:0))/r,h=i.width/n,f=i.height/r;return{width:h,height:f,top:c,right:u+h,bottom:c+f,left:u,x:u,y:c}}function x2(s){var e=lf(s),t=s.offsetWidth,i=s.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:s.offsetLeft,y:s.offsetTop,width:t,height:i}}function D9(s,e){var t=e.getRootNode&&e.getRootNode();if(s.contains(e))return!0;if(t&&k2(t)){var i=e;do{if(i&&s.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function rl(s){return s?(s.nodeName||"").toLowerCase():null}function Wa(s){return un(s).getComputedStyle(s)}function WOe(s){return["table","td","th"].indexOf(rl(s))>=0}function _l(s){return((Wu(s)?s.ownerDocument:s.document)||window.document).documentElement}function F0(s){return rl(s)==="html"?s:s.assignedSlot||s.parentNode||(k2(s)?s.host:null)||_l(s)}function Kx(s){return!jr(s)||Wa(s).position==="fixed"?null:s.offsetParent}function YOe(s){var e=/firefox/i.test(JA()),t=/Trident/i.test(JA());if(t&&jr(s)){var i=Wa(s);if(i.position==="fixed")return null}var n=F0(s);for(k2(n)&&(n=n.host);jr(n)&&["html","body"].indexOf(rl(n))<0;){var r=Wa(n);if(r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].indexOf(r.willChange)!==-1||e&&r.willChange==="filter"||e&&r.filter&&r.filter!=="none")return n;n=n.parentNode}return null}function wg(s){for(var e=un(s),t=Kx(s);t&&WOe(t)&&Wa(t).position==="static";)t=Kx(t);return t&&(rl(t)==="html"||rl(t)==="body"&&Wa(t).position==="static")?e:t||YOe(s)||e}function D2(s){return["top","bottom"].indexOf(s)>=0?"x":"y"}function Rd(s,e,t){return wu(s,t1(e,t))}function XOe(s,e,t){var i=Rd(s,e,t);return i>t?t:i}function L9(){return{top:0,right:0,bottom:0,left:0}}function U9(s){return Object.assign({},L9(),s)}function F9(s,e){return e.reduce(function(t,i){return t[i]=s,t},{})}var KOe=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,U9(typeof e!="number"?e:F9(e,Og))};function qOe(s){var e,t=s.state,i=s.name,n=s.options,r=t.elements.arrow,a=t.modifiersData.popperOffsets,o=Vr(t.placement),l=D2(o),u=[Us,Un].indexOf(o)>=0,c=u?"height":"width";if(!(!r||!a)){var h=KOe(n.padding,t),f=x2(r),d=l==="y"?Ls:Us,_=l==="y"?Ln:Un,g=t.rects.reference[c]+t.rects.reference[l]-a[l]-t.rects.popper[c],p=a[l]-t.rects.reference[l],m=wg(r),v=m?l==="y"?m.clientHeight||0:m.clientWidth||0:0,E=g/2-p/2,y=h[d],T=v-f[c]-h[_],w=v/2-f[c]/2+E,C=Rd(y,w,T),N=l;t.modifiersData[i]=(e={},e[N]=C,e.centerOffset=C-w,e)}}function $Oe(s){var e=s.state,t=s.options,i=t.element,n=i===void 0?"[data-popper-arrow]":i;n!=null&&(typeof n=="string"&&(n=e.elements.popper.querySelector(n),!n)||D9(e.elements.popper,n)&&(e.elements.arrow=n))}const QOe={name:"arrow",enabled:!0,phase:"main",fn:qOe,effect:$Oe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function uf(s){return s.split("-")[1]}var ZOe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function JOe(s,e){var t=s.x,i=s.y,n=e.devicePixelRatio||1;return{x:of(t*n)/n||0,y:of(i*n)/n||0}}function qx(s){var e,t=s.popper,i=s.popperRect,n=s.placement,r=s.variation,a=s.offsets,o=s.position,l=s.gpuAcceleration,u=s.adaptive,c=s.roundOffsets,h=s.isFixed,f=a.x,d=f===void 0?0:f,_=a.y,g=_===void 0?0:_,p=typeof c=="function"?c({x:d,y:g}):{x:d,y:g};d=p.x,g=p.y;var m=a.hasOwnProperty("x"),v=a.hasOwnProperty("y"),E=Us,y=Ls,T=window;if(u){var w=wg(t),C="clientHeight",N="clientWidth";if(w===un(t)&&(w=_l(t),Wa(w).position!=="static"&&o==="absolute"&&(C="scrollHeight",N="scrollWidth")),w=w,n===Ls||(n===Us||n===Un)&&r===rg){y=Ln;var P=h&&w===T&&T.visualViewport?T.visualViewport.height:w[C];g-=P-i.height,g*=l?1:-1}if(n===Us||(n===Ls||n===Ln)&&r===rg){E=Un;var k=h&&w===T&&T.visualViewport?T.visualViewport.width:w[N];d-=k-i.width,d*=l?1:-1}}var L=Object.assign({position:o},u&&ZOe),j=c===!0?JOe({x:d,y:g},un(t)):{x:d,y:g};if(d=j.x,g=j.y,l){var z;return Object.assign({},L,(z={},z[y]=v?"0":"",z[E]=m?"0":"",z.transform=(T.devicePixelRatio||1)<=1?"translate("+d+"px, "+g+"px)":"translate3d("+d+"px, "+g+"px, 0)",z))}return Object.assign({},L,(e={},e[y]=v?g+"px":"",e[E]=m?d+"px":"",e.transform="",e))}function ewe(s){var e=s.state,t=s.options,i=t.gpuAcceleration,n=i===void 0?!0:i,r=t.adaptive,a=r===void 0?!0:r,o=t.roundOffsets,l=o===void 0?!0:o,u={placement:Vr(e.placement),variation:uf(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:n,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,qx(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,qx(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const twe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:ewe,data:{}};var Rp={passive:!0};function iwe(s){var e=s.state,t=s.instance,i=s.options,n=i.scroll,r=n===void 0?!0:n,a=i.resize,o=a===void 0?!0:a,l=un(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return r&&u.forEach(function(c){c.addEventListener("scroll",t.update,Rp)}),o&&l.addEventListener("resize",t.update,Rp),function(){r&&u.forEach(function(c){c.removeEventListener("scroll",t.update,Rp)}),o&&l.removeEventListener("resize",t.update,Rp)}}const swe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:iwe,data:{}};var nwe={left:"right",right:"left",bottom:"top",top:"bottom"};function $p(s){return s.replace(/left|right|bottom|top/g,function(e){return nwe[e]})}var rwe={start:"end",end:"start"};function $x(s){return s.replace(/start|end/g,function(e){return rwe[e]})}function L2(s){var e=un(s),t=e.pageXOffset,i=e.pageYOffset;return{scrollLeft:t,scrollTop:i}}function U2(s){return lf(_l(s)).left+L2(s).scrollLeft}function awe(s,e){var t=un(s),i=_l(s),n=t.visualViewport,r=i.clientWidth,a=i.clientHeight,o=0,l=0;if(n){r=n.width,a=n.height;var u=x9();(u||!u&&e==="fixed")&&(o=n.offsetLeft,l=n.offsetTop)}return{width:r,height:a,x:o+U2(s),y:l}}function owe(s){var e,t=_l(s),i=L2(s),n=(e=s.ownerDocument)==null?void 0:e.body,r=wu(t.scrollWidth,t.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),a=wu(t.scrollHeight,t.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),o=-i.scrollLeft+U2(s),l=-i.scrollTop;return Wa(n||t).direction==="rtl"&&(o+=wu(t.clientWidth,n?n.clientWidth:0)-r),{width:r,height:a,x:o,y:l}}function F2(s){var e=Wa(s),t=e.overflow,i=e.overflowX,n=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+n+i)}function B9(s){return["html","body","#document"].indexOf(rl(s))>=0?s.ownerDocument.body:jr(s)&&F2(s)?s:B9(F0(s))}function Sd(s,e){var t;e===void 0&&(e=[]);var i=B9(s),n=i===((t=s.ownerDocument)==null?void 0:t.body),r=un(i),a=n?[r].concat(r.visualViewport||[],F2(i)?i:[]):i,o=e.concat(a);return n?o:o.concat(Sd(F0(a)))}function eO(s){return Object.assign({},s,{left:s.x,top:s.y,right:s.x+s.width,bottom:s.y+s.height})}function lwe(s,e){var t=lf(s,!1,e==="fixed");return t.top=t.top+s.clientTop,t.left=t.left+s.clientLeft,t.bottom=t.top+s.clientHeight,t.right=t.left+s.clientWidth,t.width=s.clientWidth,t.height=s.clientHeight,t.x=t.left,t.y=t.top,t}function Qx(s,e,t){return e===P9?eO(awe(s,t)):Wu(e)?lwe(e,t):eO(owe(_l(s)))}function uwe(s){var e=Sd(F0(s)),t=["absolute","fixed"].indexOf(Wa(s).position)>=0,i=t&&jr(s)?wg(s):s;return Wu(i)?e.filter(function(n){return Wu(n)&&D9(n,i)&&rl(n)!=="body"}):[]}function hwe(s,e,t,i){var n=e==="clippingParents"?uwe(s):[].concat(e),r=[].concat(n,[t]),a=r[0],o=r.reduce(function(l,u){var c=Qx(s,u,i);return l.top=wu(c.top,l.top),l.right=t1(c.right,l.right),l.bottom=t1(c.bottom,l.bottom),l.left=wu(c.left,l.left),l},Qx(s,a,i));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function G9(s){var e=s.reference,t=s.element,i=s.placement,n=i?Vr(i):null,r=i?uf(i):null,a=e.x+e.width/2-t.width/2,o=e.y+e.height/2-t.height/2,l;switch(n){case Ls:l={x:a,y:e.y-t.height};break;case Ln:l={x:a,y:e.y+e.height};break;case Un:l={x:e.x+e.width,y:o};break;case Us:l={x:e.x-t.width,y:o};break;default:l={x:e.x,y:e.y}}var u=n?D2(n):null;if(u!=null){var c=u==="y"?"height":"width";switch(r){case af:l[u]=l[u]-(e[c]/2-t[c]/2);break;case rg:l[u]=l[u]+(e[c]/2-t[c]/2);break}}return l}function ag(s,e){e===void 0&&(e={});var t=e,i=t.placement,n=i===void 0?s.placement:i,r=t.strategy,a=r===void 0?s.strategy:r,o=t.boundary,l=o===void 0?kOe:o,u=t.rootBoundary,c=u===void 0?P9:u,h=t.elementContext,f=h===void 0?Uf:h,d=t.altBoundary,_=d===void 0?!1:d,g=t.padding,p=g===void 0?0:g,m=U9(typeof p!="number"?p:F9(p,Og)),v=f===Uf?xOe:Uf,E=s.rects.popper,y=s.elements[_?v:f],T=hwe(Wu(y)?y:y.contextElement||_l(s.elements.popper),l,c,a),w=lf(s.elements.reference),C=G9({reference:w,element:E,placement:n}),N=eO(Object.assign({},E,C)),P=f===Uf?N:w,k={top:T.top-P.top+m.top,bottom:P.bottom-T.bottom+m.bottom,left:T.left-P.left+m.left,right:P.right-T.right+m.right},L=s.modifiersData.offset;if(f===Uf&&L){var j=L[n];Object.keys(k).forEach(function(z){var ne=[Un,Ln].indexOf(z)>=0?1:-1,G=[Ls,Ln].indexOf(z)>=0?"y":"x";k[z]+=j[G]*ne})}return k}function cwe(s,e){e===void 0&&(e={});var t=e,i=t.placement,n=t.boundary,r=t.rootBoundary,a=t.padding,o=t.flipVariations,l=t.allowedAutoPlacements,u=l===void 0?k9:l,c=uf(i),h=c?o?Xx:Xx.filter(function(_){return uf(_)===c}):Og,f=h.filter(function(_){return u.indexOf(_)>=0});f.length===0&&(f=h);var d=f.reduce(function(_,g){return _[g]=ag(s,{placement:g,boundary:n,rootBoundary:r,padding:a})[Vr(g)],_},{});return Object.keys(d).sort(function(_,g){return d[_]-d[g]})}function fwe(s){if(Vr(s)===P2)return[];var e=$p(s);return[$x(s),e,$x(e)]}function dwe(s){var e=s.state,t=s.options,i=s.name;if(!e.modifiersData[i]._skip){for(var n=t.mainAxis,r=n===void 0?!0:n,a=t.altAxis,o=a===void 0?!0:a,l=t.fallbackPlacements,u=t.padding,c=t.boundary,h=t.rootBoundary,f=t.altBoundary,d=t.flipVariations,_=d===void 0?!0:d,g=t.allowedAutoPlacements,p=e.options.placement,m=Vr(p),v=m===p,E=l||(v||!_?[$p(p)]:fwe(p)),y=[p].concat(E).reduce(function(me,De){return me.concat(Vr(De)===P2?cwe(e,{placement:De,boundary:c,rootBoundary:h,padding:u,flipVariations:_,allowedAutoPlacements:g}):De)},[]),T=e.rects.reference,w=e.rects.popper,C=new Map,N=!0,P=y[0],k=0;k=0,G=ne?"width":"height",Y=ag(e,{placement:L,boundary:c,rootBoundary:h,altBoundary:f,padding:u}),K=ne?z?Un:Us:z?Ln:Ls;T[G]>w[G]&&(K=$p(K));var H=$p(K),J=[];if(r&&J.push(Y[j]<=0),o&&J.push(Y[K]<=0,Y[H]<=0),J.every(function(me){return me})){P=L,N=!1;break}C.set(L,J)}if(N)for(var B=_?3:1,$=function(De){var we=y.find(function(it){var at=C.get(it);if(at)return at.slice(0,De).every(function(bt){return bt})});if(we)return P=we,"break"},fe=B;fe>0;fe--){var xe=$(fe);if(xe==="break")break}e.placement!==P&&(e.modifiersData[i]._skip=!0,e.placement=P,e.reset=!0)}}const _we={name:"flip",enabled:!0,phase:"main",fn:dwe,requiresIfExists:["offset"],data:{_skip:!1}};function Zx(s,e,t){return t===void 0&&(t={x:0,y:0}),{top:s.top-e.height-t.y,right:s.right-e.width+t.x,bottom:s.bottom-e.height+t.y,left:s.left-e.width-t.x}}function Jx(s){return[Ls,Un,Ln,Us].some(function(e){return s[e]>=0})}function gwe(s){var e=s.state,t=s.name,i=e.rects.reference,n=e.rects.popper,r=e.modifiersData.preventOverflow,a=ag(e,{elementContext:"reference"}),o=ag(e,{altBoundary:!0}),l=Zx(a,i),u=Zx(o,n,r),c=Jx(l),h=Jx(u);e.modifiersData[t]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:h},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":h})}const pwe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:gwe};function mwe(s,e,t){var i=Vr(s),n=[Us,Ls].indexOf(i)>=0?-1:1,r=typeof t=="function"?t(Object.assign({},e,{placement:s})):t,a=r[0],o=r[1];return a=a||0,o=(o||0)*n,[Us,Un].indexOf(i)>=0?{x:o,y:a}:{x:a,y:o}}function vwe(s){var e=s.state,t=s.options,i=s.name,n=t.offset,r=n===void 0?[0,0]:n,a=k9.reduce(function(c,h){return c[h]=mwe(h,e.rects,r),c},{}),o=a[e.placement],l=o.x,u=o.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=u),e.modifiersData[i]=a}const Ewe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:vwe};function ywe(s){var e=s.state,t=s.name;e.modifiersData[t]=G9({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}const Twe={name:"popperOffsets",enabled:!0,phase:"read",fn:ywe,data:{}};function Iwe(s){return s==="x"?"y":"x"}function Rwe(s){var e=s.state,t=s.options,i=s.name,n=t.mainAxis,r=n===void 0?!0:n,a=t.altAxis,o=a===void 0?!1:a,l=t.boundary,u=t.rootBoundary,c=t.altBoundary,h=t.padding,f=t.tether,d=f===void 0?!0:f,_=t.tetherOffset,g=_===void 0?0:_,p=ag(e,{boundary:l,rootBoundary:u,padding:h,altBoundary:c}),m=Vr(e.placement),v=uf(e.placement),E=!v,y=D2(m),T=Iwe(y),w=e.modifiersData.popperOffsets,C=e.rects.reference,N=e.rects.popper,P=typeof g=="function"?g(Object.assign({},e.rects,{placement:e.placement})):g,k=typeof P=="number"?{mainAxis:P,altAxis:P}:Object.assign({mainAxis:0,altAxis:0},P),L=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,j={x:0,y:0};if(w){if(r){var z,ne=y==="y"?Ls:Us,G=y==="y"?Ln:Un,Y=y==="y"?"height":"width",K=w[y],H=K+p[ne],J=K-p[G],B=d?-N[Y]/2:0,$=v===af?C[Y]:N[Y],fe=v===af?-N[Y]:-C[Y],xe=e.elements.arrow,me=d&&xe?x2(xe):{width:0,height:0},De=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:L9(),we=De[ne],it=De[G],at=Rd(0,C[Y],me[Y]),bt=E?C[Y]/2-B-at-we-k.mainAxis:$-at-we-k.mainAxis,At=E?-C[Y]/2+B+at+it+k.mainAxis:fe+at+it+k.mainAxis,ct=e.elements.arrow&&wg(e.elements.arrow),Qe=ct?y==="y"?ct.clientTop||0:ct.clientLeft||0:0,gt=(z=L==null?void 0:L[y])!=null?z:0,ki=K+bt-gt-Qe,Ue=K+At-gt,st=Rd(d?t1(H,ki):H,K,d?wu(J,Ue):J);w[y]=st,j[y]=st-K}if(o){var ot,Hi=y==="x"?Ls:Us,Ge=y==="x"?Ln:Un,ke=w[T],Gs=T==="y"?"height":"width",hi=ke+p[Hi],gl=ke-p[Ge],Ju=[Ls,Us].indexOf(m)!==-1,yf=(ot=L==null?void 0:L[T])!=null?ot:0,vC=Ju?hi:ke-C[Gs]-N[Gs]-yf+k.altAxis,EC=Ju?ke+C[Gs]+N[Gs]-yf-k.altAxis:gl,yC=d&&Ju?XOe(vC,ke,EC):Rd(d?vC:hi,ke,d?EC:gl);w[T]=yC,j[T]=yC-ke}e.modifiersData[i]=j}}const Swe={name:"preventOverflow",enabled:!0,phase:"main",fn:Rwe,requiresIfExists:["offset"]};function bwe(s){return{scrollLeft:s.scrollLeft,scrollTop:s.scrollTop}}function Awe(s){return s===un(s)||!jr(s)?L2(s):bwe(s)}function Owe(s){var e=s.getBoundingClientRect(),t=of(e.width)/s.offsetWidth||1,i=of(e.height)/s.offsetHeight||1;return t!==1||i!==1}function wwe(s,e,t){t===void 0&&(t=!1);var i=jr(e),n=jr(e)&&Owe(e),r=_l(e),a=lf(s,n,t),o={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!t)&&((rl(e)!=="body"||F2(r))&&(o=Awe(e)),jr(e)?(l=lf(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):r&&(l.x=U2(r))),{x:a.left+o.scrollLeft-l.x,y:a.top+o.scrollTop-l.y,width:a.width,height:a.height}}function Cwe(s){var e=new Map,t=new Set,i=[];s.forEach(function(r){e.set(r.name,r)});function n(r){t.add(r.name);var a=[].concat(r.requires||[],r.requiresIfExists||[]);a.forEach(function(o){if(!t.has(o)){var l=e.get(o);l&&n(l)}}),i.push(r)}return s.forEach(function(r){t.has(r.name)||n(r)}),i}function Mwe(s){var e=Cwe(s);return HOe.reduce(function(t,i){return t.concat(e.filter(function(n){return n.phase===i}))},[])}function Nwe(s){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(s())})})),e}}function Pwe(s){var e=s.reduce(function(t,i){var n=t[i.name];return t[i.name]=n?Object.assign({},n,i,{options:Object.assign({},n.options,i.options),data:Object.assign({},n.data,i.data)}):i,t},{});return Object.keys(e).map(function(t){return e[t]})}var eD={placement:"bottom",modifiers:[],strategy:"absolute"};function tD(){for(var s=arguments.length,e=new Array(s),t=0;t=0)continue;t[i]=s[i]}return t}const Uwe={name:"applyStyles",enabled:!1,phase:"afterWrite",fn:()=>{}},Fwe={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:({state:s})=>()=>{const{reference:e,popper:t}=s.elements;if("removeAttribute"in e){const i=(e.getAttribute("aria-describedby")||"").split(",").filter(n=>n.trim()!==t.id);i.length?e.setAttribute("aria-describedby",i.join(",")):e.removeAttribute("aria-describedby")}},fn:({state:s})=>{var e;const{popper:t,reference:i}=s.elements,n=(e=t.getAttribute("role"))==null?void 0:e.toLowerCase();if(t.id&&n==="tooltip"&&"setAttribute"in i){const r=i.getAttribute("aria-describedby");if(r&&r.split(",").indexOf(t.id)!==-1)return;i.setAttribute("aria-describedby",r?`${r},${t.id}`:t.id)}}},Bwe=[];function Gwe(s,e,t={}){let{enabled:i=!0,placement:n="bottom",strategy:r="absolute",modifiers:a=Bwe}=t,o=Lwe(t,Dwe);const l=D.useRef(a),u=D.useRef(),c=D.useCallback(()=>{var p;(p=u.current)==null||p.update()},[]),h=D.useCallback(()=>{var p;(p=u.current)==null||p.forceUpdate()},[]),[f,d]=POe(D.useState({placement:n,update:c,forceUpdate:h,attributes:{},styles:{popper:{},arrow:{}}})),_=D.useMemo(()=>({name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:({state:p})=>{const m={},v={};Object.keys(p.elements).forEach(E=>{m[E]=p.styles[E],v[E]=p.attributes[E]}),d({state:p,styles:m,attributes:v,update:c,forceUpdate:h,placement:p.placement})}}),[c,h,d]),g=D.useMemo(()=>(Id(l.current,a)||(l.current=a),l.current),[a]);return D.useEffect(()=>{!u.current||!i||u.current.setOptions({placement:n,strategy:r,modifiers:[...g,_,Uwe]})},[r,n,_,i,g]),D.useEffect(()=>{if(!(!i||s==null||e==null))return u.current=xwe(s,e,Object.assign({},o,{placement:n,strategy:r,modifiers:[...g,Fwe,_]})),()=>{u.current!=null&&(u.current.destroy(),u.current=void 0,d(p=>Object.assign({},p,{attributes:{},styles:{popper:{}}})))}},[i,s,e]),f}function tO(s,e){if(s.contains)return s.contains(e);if(s.compareDocumentPosition)return s===e||!!(s.compareDocumentPosition(e)&16)}var Vwe=function(){},jwe=Vwe;const zwe=nr(jwe),iD=()=>{};function Hwe(s){return s.button===0}function Wwe(s){return!!(s.metaKey||s.altKey||s.ctrlKey||s.shiftKey)}const Qp=s=>s&&("current"in s?s.current:s),sD={click:"mousedown",mouseup:"mousedown",pointerup:"pointerdown"};function Ywe(s,e=iD,{disabled:t,clickTrigger:i="click"}={}){const n=D.useRef(!1),r=D.useRef(!1),a=D.useCallback(u=>{const c=Qp(s);zwe(!!c,"ClickOutside captured a close event but does not have a ref to compare it to. useClickOutside(), should be passed a ref that resolves to a DOM node"),n.current=!c||Wwe(u)||!Hwe(u)||!!tO(c,u.target)||r.current,r.current=!1},[s]),o=ng(u=>{const c=Qp(s);c&&tO(c,u.target)?r.current=!0:r.current=!1}),l=ng(u=>{n.current||e(u)});D.useEffect(()=>{var u,c;if(t||s==null)return;const h=U0(Qp(s)),f=h.defaultView||window;let d=(u=f.event)!=null?u:(c=f.parent)==null?void 0:c.event,_=null;sD[i]&&(_=vu(h,sD[i],o,!0));const g=vu(h,i,a,!0),p=vu(h,i,v=>{if(v===d){d=void 0;return}l(v)});let m=[];return"ontouchstart"in h.documentElement&&(m=[].slice.call(h.body.children).map(v=>vu(v,"mousemove",iD))),()=>{_==null||_(),g(),p(),m.forEach(v=>v())}},[s,t,i,a,o,l])}function Xwe(s){const e={};return Array.isArray(s)?(s==null||s.forEach(t=>{e[t.name]=t}),e):s||e}function Kwe(s={}){return Array.isArray(s)?s:Object.keys(s).map(e=>(s[e].name=e,s[e]))}function qwe({enabled:s,enableEvents:e,placement:t,flip:i,offset:n,fixed:r,containerPadding:a,arrowElement:o,popperConfig:l={}}){var u,c,h,f;const d=Xwe(l.modifiers);return Object.assign({},l,{placement:t,enabled:s,strategy:r?"fixed":l.strategy,modifiers:Kwe(Object.assign({},d,{eventListeners:{enabled:e,options:(u=d.eventListeners)==null?void 0:u.options},preventOverflow:Object.assign({},d.preventOverflow,{options:Object.assign({padding:a},(c=d.preventOverflow)==null?void 0:c.options)}),offset:{options:Object.assign({offset:n},(h=d.offset)==null?void 0:h.options)},arrow:Object.assign({},d.arrow,{enabled:!!o,options:Object.assign({},(f=d.arrow)==null?void 0:f.options,{element:o})}),flip:Object.assign({enabled:!!i},d.flip)}))})}const V9=D.createContext(M2?window:void 0);V9.Provider;function $we(){return D.useContext(V9)}const Qwe=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",Zwe=typeof document<"u",Jwe=Zwe||Qwe?D.useLayoutEffect:D.useEffect,nD=s=>!s||typeof s=="function"?s:e=>{s.current=e};function e2e(s,e){const t=nD(s),i=nD(e);return n=>{t&&t(n),i&&i(n)}}function B0(s,e){return D.useMemo(()=>e2e(s,e),[s,e])}const UT=(s,e)=>M2?s==null?(e||U0()).body:(typeof s=="function"&&(s=s()),s&&"current"in s&&(s=s.current),s&&("nodeType"in s||s.getBoundingClientRect)?s:null):null;function rD(s,e){const t=$we(),[i,n]=D.useState(()=>UT(s,t==null?void 0:t.document));if(!i){const r=UT(s);r&&n(r)}return D.useEffect(()=>{},[e,i]),D.useEffect(()=>{const r=UT(s);r!==i&&n(r)},[s,i]),i}function t2e({children:s,in:e,onExited:t,mountOnEnter:i,unmountOnExit:n}){const r=D.useRef(null),a=D.useRef(e),o=ng(t);D.useEffect(()=>{e?a.current=!0:o(r.current)},[e,o]);const l=B0(r,Ag(s)),u=D.cloneElement(s,{ref:l});return e?u:n||!a.current&&i?null:u}const i2e=["onEnter","onEntering","onEntered","onExit","onExiting","onExited","addEndListener","children"];function s2e(s,e){if(s==null)return{};var t={};for(var i in s)if({}.hasOwnProperty.call(s,i)){if(e.indexOf(i)>=0)continue;t[i]=s[i]}return t}function n2e(s){let{onEnter:e,onEntering:t,onEntered:i,onExit:n,onExiting:r,onExited:a,addEndListener:o,children:l}=s,u=s2e(s,i2e);const c=D.useRef(null),h=B0(c,Ag(l)),f=y=>T=>{y&&c.current&&y(c.current,T)},d=D.useCallback(f(e),[e]),_=D.useCallback(f(t),[t]),g=D.useCallback(f(i),[i]),p=D.useCallback(f(n),[n]),m=D.useCallback(f(r),[r]),v=D.useCallback(f(a),[a]),E=D.useCallback(f(o),[o]);return Object.assign({},u,{nodeRef:c},e&&{onEnter:d},t&&{onEntering:_},i&&{onEntered:g},n&&{onExit:p},r&&{onExiting:m},a&&{onExited:v},o&&{addEndListener:E},{children:typeof l=="function"?(y,T)=>l(y,Object.assign({},T,{ref:h})):D.cloneElement(l,{ref:h})})}const r2e=["component"];function a2e(s,e){if(s==null)return{};var t={};for(var i in s)if({}.hasOwnProperty.call(s,i)){if(e.indexOf(i)>=0)continue;t[i]=s[i]}return t}const o2e=D.forwardRef((s,e)=>{let{component:t}=s,i=a2e(s,r2e);const n=n2e(i);return vt.jsx(t,Object.assign({ref:e},n))});function l2e({in:s,onTransition:e}){const t=D.useRef(null),i=D.useRef(!0),n=ng(e);return Hx(()=>{if(!t.current)return;let r=!1;return n({in:s,element:t.current,initial:i.current,isStale:()=>r}),()=>{r=!0}},[s,n]),Hx(()=>(i.current=!1,()=>{i.current=!0}),[]),t}function u2e({children:s,in:e,onExited:t,onEntered:i,transition:n}){const[r,a]=D.useState(!e);e&&r&&a(!1);const o=l2e({in:!!e,onTransition:u=>{const c=()=>{u.isStale()||(u.in?i==null||i(u.element,u.initial):(a(!0),t==null||t(u.element)))};Promise.resolve(n(u)).then(c,h=>{throw u.in||a(!0),h})}}),l=B0(o,Ag(s));return r&&!e?null:D.cloneElement(s,{ref:l})}function h2e(s,e,t){return s?vt.jsx(o2e,Object.assign({},t,{component:s})):e?vt.jsx(u2e,Object.assign({},t,{transition:e})):vt.jsx(t2e,Object.assign({},t))}function aD(s,e){return s.classList?!!e&&s.classList.contains(e):(" "+(s.className.baseVal||s.className)+" ").indexOf(" "+e+" ")!==-1}const c2e=()=>{};function f2e(s,e,{disabled:t,clickTrigger:i}={}){const n=e||c2e;Ywe(s,n,{disabled:t,clickTrigger:i});const r=ng(a=>{nOe(a)&&n(a)});D.useEffect(()=>{if(t||s==null)return;const a=U0(Qp(s));let o=(a.defaultView||window).event;const l=vu(a,"keyup",u=>{if(u===o){o=void 0;return}r(u)});return()=>{l()}},[s,t,r])}const j9=D.forwardRef((s,e)=>{const{flip:t,offset:i,placement:n,containerPadding:r,popperConfig:a={},transition:o,runTransition:l}=s,[u,c]=zx(),[h,f]=zx(),d=B0(c,e),_=rD(s.container),g=rD(s.target),[p,m]=D.useState(!s.show),v=Gwe(g,u,qwe({placement:n,enableEvents:!!s.show,containerPadding:r||5,flip:t,offset:i,arrowElement:h,popperConfig:a}));s.show&&p&&m(!1);const E=(...L)=>{m(!0),s.onExited&&s.onExited(...L)},y=s.show||!p;if(f2e(u,s.onHide,{disabled:!s.rootClose||s.rootCloseDisabled,clickTrigger:s.rootCloseEvent}),!y)return null;const{onExit:T,onExiting:w,onEnter:C,onEntering:N,onEntered:P}=s;let k=s.children(Object.assign({},v.attributes.popper,{style:v.styles.popper,ref:d}),{popper:v,placement:n,show:!!s.show,arrowProps:Object.assign({},v.attributes.arrow,{style:v.styles.arrow,ref:f})});return k=h2e(o,l,{in:!!s.show,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:k,onExit:T,onExiting:w,onExited:E,onEnter:C,onEntering:N,onEntered:P}),_?Sh.createPortal(k,_):null});j9.displayName="Overlay";const z9=D.forwardRef(({className:s,bsPrefix:e,as:t="div",...i},n)=>(e=Hu(e,"popover-header"),vt.jsx(t,{ref:n,className:Zu(s,e),...i})));z9.displayName="PopoverHeader";const B2=D.forwardRef(({className:s,bsPrefix:e,as:t="div",...i},n)=>(e=Hu(e,"popover-body"),vt.jsx(t,{ref:n,className:Zu(s,e),...i})));B2.displayName="PopoverBody";function H9(s,e){let t=s;return s==="left"?t=e?"end":"start":s==="right"&&(t=e?"start":"end"),t}function W9(s="absolute"){return{position:s,top:"0",left:"0",opacity:"0",pointerEvents:"none"}}const d2e=D.forwardRef(({bsPrefix:s,placement:e="right",className:t,style:i,children:n,body:r,arrowProps:a,hasDoneInitialMeasure:o,popper:l,show:u,...c},h)=>{const f=Hu(s,"popover"),d=S9(),[_]=(e==null?void 0:e.split("-"))||[],g=H9(_,d);let p=i;return u&&!o&&(p={...i,...W9(l==null?void 0:l.strategy)}),vt.jsxs("div",{ref:h,role:"tooltip",style:p,"x-placement":_,className:Zu(t,f,_&&`bs-popover-${g}`),...c,children:[vt.jsx("div",{className:"popover-arrow",...a}),r?vt.jsx(B2,{children:n}):n]})}),_2e=Object.assign(d2e,{Header:z9,Body:B2,POPPER_OFFSET:[0,8]}),Y9=D.forwardRef(({bsPrefix:s,placement:e="right",className:t,style:i,children:n,arrowProps:r,hasDoneInitialMeasure:a,popper:o,show:l,...u},c)=>{s=Hu(s,"tooltip");const h=S9(),[f]=(e==null?void 0:e.split("-"))||[],d=H9(f,h);let _=i;return l&&!a&&(_={...i,...W9(o==null?void 0:o.strategy)}),vt.jsxs("div",{ref:c,style:_,role:"tooltip","x-placement":f,className:Zu(t,s,`bs-tooltip-${d}`),...u,children:[vt.jsx("div",{className:"tooltip-arrow",...r}),vt.jsx("div",{className:`${s}-inner`,children:n})]})});Y9.displayName="Tooltip";const g2e=Object.assign(Y9,{TOOLTIP_OFFSET:[0,6]});function p2e(s){const e=D.useRef(null),t=Hu(void 0,"popover"),i=Hu(void 0,"tooltip"),n=D.useMemo(()=>({name:"offset",options:{offset:()=>{if(s)return s;if(e.current){if(aD(e.current,t))return _2e.POPPER_OFFSET;if(aD(e.current,i))return g2e.TOOLTIP_OFFSET}return[0,0]}}}),[s,t,i]);return[e,[n]]}function m2e(s,e){const{ref:t}=s,{ref:i}=e;s.ref=t.__wrapped||(t.__wrapped=n=>t(e1(n))),e.ref=i.__wrapped||(i.__wrapped=n=>i(e1(n)))}const X9=D.forwardRef(({children:s,transition:e=QA,popperConfig:t={},rootClose:i=!1,placement:n="top",show:r=!1,...a},o)=>{const l=D.useRef({}),[u,c]=D.useState(null),[h,f]=p2e(a.offset),d=N2(o,h),_=e===!0?QA:e||void 0,g=mOe(p=>{c(p),t==null||t.onFirstUpdate==null||t.onFirstUpdate(p)});return Jwe(()=>{u&&a.target&&(l.current.scheduleUpdate==null||l.current.scheduleUpdate())},[u,a.target]),D.useEffect(()=>{r||c(null)},[r]),vt.jsx(j9,{...a,ref:d,popperConfig:{...t,modifiers:f.concat(t.modifiers||[]),onFirstUpdate:g},transition:_,rootClose:i,placement:n,show:r,children:(p,{arrowProps:m,popper:v,show:E})=>{var y;m2e(p,m);const T=v==null?void 0:v.placement,w=Object.assign(l.current,{state:v==null?void 0:v.state,scheduleUpdate:v==null?void 0:v.update,placement:T,outOfBoundaries:(v==null||(y=v.state)==null||(y=y.modifiersData.hide)==null?void 0:y.isReferenceHidden)||!1,strategy:t.strategy}),C=!!u;return typeof s=="function"?s({...p,placement:T,show:E,...!e&&E&&{className:"show"},popper:w,arrowProps:m,hasDoneInitialMeasure:C}):D.cloneElement(s,{...p,placement:T,arrowProps:m,popper:w,hasDoneInitialMeasure:C,className:Zu(s.props.className,!e&&E&&"show"),style:{...s.props.style,...p.style}})}})});X9.displayName="Overlay";function v2e(s){return s&&typeof s=="object"?s:{show:s,hide:s}}function oD(s,e,t){const[i]=e,n=i.currentTarget,r=i.relatedTarget||i.nativeEvent[t];(!r||r!==n)&&!tO(n,r)&&s(...e)}iOe.oneOf(["click","hover","focus"]);const iNe=({trigger:s=["hover","focus"],overlay:e,children:t,popperConfig:i={},show:n,defaultShow:r=!1,onToggle:a,delay:o,placement:l,flip:u=l&&l.indexOf("auto")!==-1,...c})=>{const h=D.useRef(null),f=N2(h,Ag(t)),d=NOe(),_=D.useRef(""),[g,p]=VAe(n,r,a),m=v2e(o),{onFocus:v,onBlur:E,onClick:y}=typeof t!="function"?D.Children.only(t).props:{},T=G=>{f(e1(G))},w=D.useCallback(()=>{if(d.clear(),_.current="show",!m.show){p(!0);return}d.set(()=>{_.current==="show"&&p(!0)},m.show)},[m.show,p,d]),C=D.useCallback(()=>{if(d.clear(),_.current="hide",!m.hide){p(!1);return}d.set(()=>{_.current==="hide"&&p(!1)},m.hide)},[m.hide,p,d]),N=D.useCallback((...G)=>{w(),v==null||v(...G)},[w,v]),P=D.useCallback((...G)=>{C(),E==null||E(...G)},[C,E]),k=D.useCallback((...G)=>{p(!g),y==null||y(...G)},[y,p,g]),L=D.useCallback((...G)=>{oD(w,G,"fromElement")},[w]),j=D.useCallback((...G)=>{oD(C,G,"toElement")},[C]),z=s==null?[]:[].concat(s),ne={ref:T};return z.indexOf("click")!==-1&&(ne.onClick=k),z.indexOf("focus")!==-1&&(ne.onFocus=N,ne.onBlur=P),z.indexOf("hover")!==-1&&(ne.onMouseOver=L,ne.onMouseOut=j),vt.jsxs(vt.Fragment,{children:[typeof t=="function"?t(ne):D.cloneElement(t,ne),vt.jsx(X9,{...c,show:g,onHide:C,flip:u,placement:l,popperConfig:i,target:h.current,children:e})]})};function sNe(s){return be({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",strokeWidth:"2",d:"M6,12.4 L18,12.4 M12.6,7 L18,12.4 L12.6,17.8"},child:[]}]})(s)}function nNe(s){return be({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M11.52,3.43A9.09,9.09,0,0,0,5.7,5.55V2.35H4.07v6.5h6.5V7.21H6.3a7.46,7.46,0,1,1-1.47,8.65l-1.46.73A9.11,9.11,0,1,0,11.52,3.43Z"},child:[]}]})(s)}function rNe(s){return be({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12.48,3.43A9.09,9.09,0,0,1,18.3,5.55V2.35h1.64v6.5h-6.5V7.21H17.7a7.46,7.46,0,1,0,1.47,8.65l1.46.73A9.11,9.11,0,1,1,12.48,3.43Z"},child:[]}]})(s)}const E2e=[{id:"people",emojis:["grinning","smiley","smile","grin","laughing","sweat_smile","rolling_on_the_floor_laughing","joy","slightly_smiling_face","upside_down_face","melting_face","wink","blush","innocent","smiling_face_with_3_hearts","heart_eyes","star-struck","kissing_heart","kissing","relaxed","kissing_closed_eyes","kissing_smiling_eyes","smiling_face_with_tear","yum","stuck_out_tongue","stuck_out_tongue_winking_eye","zany_face","stuck_out_tongue_closed_eyes","money_mouth_face","hugging_face","face_with_hand_over_mouth","face_with_open_eyes_and_hand_over_mouth","face_with_peeking_eye","shushing_face","thinking_face","saluting_face","zipper_mouth_face","face_with_raised_eyebrow","neutral_face","expressionless","no_mouth","dotted_line_face","face_in_clouds","smirk","unamused","face_with_rolling_eyes","grimacing","face_exhaling","lying_face","shaking_face","relieved","pensive","sleepy","drooling_face","sleeping","mask","face_with_thermometer","face_with_head_bandage","nauseated_face","face_vomiting","sneezing_face","hot_face","cold_face","woozy_face","dizzy_face","face_with_spiral_eyes","exploding_head","face_with_cowboy_hat","partying_face","disguised_face","sunglasses","nerd_face","face_with_monocle","confused","face_with_diagonal_mouth","worried","slightly_frowning_face","white_frowning_face","open_mouth","hushed","astonished","flushed","pleading_face","face_holding_back_tears","frowning","anguished","fearful","cold_sweat","disappointed_relieved","cry","sob","scream","confounded","persevere","disappointed","sweat","weary","tired_face","yawning_face","triumph","rage","angry","face_with_symbols_on_mouth","smiling_imp","imp","skull","skull_and_crossbones","hankey","clown_face","japanese_ogre","japanese_goblin","ghost","alien","space_invader","wave","raised_back_of_hand","raised_hand_with_fingers_splayed","hand","spock-hand","rightwards_hand","leftwards_hand","palm_down_hand","palm_up_hand","leftwards_pushing_hand","rightwards_pushing_hand","ok_hand","pinched_fingers","pinching_hand","v","crossed_fingers","hand_with_index_finger_and_thumb_crossed","i_love_you_hand_sign","the_horns","call_me_hand","point_left","point_right","point_up_2","middle_finger","point_down","point_up","index_pointing_at_the_viewer","+1","-1","fist","facepunch","left-facing_fist","right-facing_fist","clap","raised_hands","heart_hands","open_hands","palms_up_together","handshake","pray","writing_hand","nail_care","selfie","muscle","mechanical_arm","mechanical_leg","leg","foot","ear","ear_with_hearing_aid","nose","brain","anatomical_heart","lungs","tooth","bone","eyes","eye","tongue","lips","biting_lip","baby","child","boy","girl","adult","person_with_blond_hair","man","bearded_person","man_with_beard","woman_with_beard","red_haired_man","curly_haired_man","white_haired_man","bald_man","woman","red_haired_woman","red_haired_person","curly_haired_woman","curly_haired_person","white_haired_woman","white_haired_person","bald_woman","bald_person","blond-haired-woman","blond-haired-man","older_adult","older_man","older_woman","person_frowning","man-frowning","woman-frowning","person_with_pouting_face","man-pouting","woman-pouting","no_good","man-gesturing-no","woman-gesturing-no","ok_woman","man-gesturing-ok","woman-gesturing-ok","information_desk_person","man-tipping-hand","woman-tipping-hand","raising_hand","man-raising-hand","woman-raising-hand","deaf_person","deaf_man","deaf_woman","bow","man-bowing","woman-bowing","face_palm","man-facepalming","woman-facepalming","shrug","man-shrugging","woman-shrugging","health_worker","male-doctor","female-doctor","student","male-student","female-student","teacher","male-teacher","female-teacher","judge","male-judge","female-judge","farmer","male-farmer","female-farmer","cook","male-cook","female-cook","mechanic","male-mechanic","female-mechanic","factory_worker","male-factory-worker","female-factory-worker","office_worker","male-office-worker","female-office-worker","scientist","male-scientist","female-scientist","technologist","male-technologist","female-technologist","singer","male-singer","female-singer","artist","male-artist","female-artist","pilot","male-pilot","female-pilot","astronaut","male-astronaut","female-astronaut","firefighter","male-firefighter","female-firefighter","cop","male-police-officer","female-police-officer","sleuth_or_spy","male-detective","female-detective","guardsman","male-guard","female-guard","ninja","construction_worker","male-construction-worker","female-construction-worker","person_with_crown","prince","princess","man_with_turban","man-wearing-turban","woman-wearing-turban","man_with_gua_pi_mao","person_with_headscarf","person_in_tuxedo","man_in_tuxedo","woman_in_tuxedo","bride_with_veil","man_with_veil","woman_with_veil","pregnant_woman","pregnant_man","pregnant_person","breast-feeding","woman_feeding_baby","man_feeding_baby","person_feeding_baby","angel","santa","mrs_claus","mx_claus","superhero","male_superhero","female_superhero","supervillain","male_supervillain","female_supervillain","mage","male_mage","female_mage","fairy","male_fairy","female_fairy","vampire","male_vampire","female_vampire","merperson","merman","mermaid","elf","male_elf","female_elf","genie","male_genie","female_genie","zombie","male_zombie","female_zombie","troll","massage","man-getting-massage","woman-getting-massage","haircut","man-getting-haircut","woman-getting-haircut","walking","man-walking","woman-walking","standing_person","man_standing","woman_standing","kneeling_person","man_kneeling","woman_kneeling","person_with_probing_cane","man_with_probing_cane","woman_with_probing_cane","person_in_motorized_wheelchair","man_in_motorized_wheelchair","woman_in_motorized_wheelchair","person_in_manual_wheelchair","man_in_manual_wheelchair","woman_in_manual_wheelchair","runner","man-running","woman-running","dancer","man_dancing","man_in_business_suit_levitating","dancers","men-with-bunny-ears-partying","women-with-bunny-ears-partying","person_in_steamy_room","man_in_steamy_room","woman_in_steamy_room","person_climbing","man_climbing","woman_climbing","fencer","horse_racing","skier","snowboarder","golfer","man-golfing","woman-golfing","surfer","man-surfing","woman-surfing","rowboat","man-rowing-boat","woman-rowing-boat","swimmer","man-swimming","woman-swimming","person_with_ball","man-bouncing-ball","woman-bouncing-ball","weight_lifter","man-lifting-weights","woman-lifting-weights","bicyclist","man-biking","woman-biking","mountain_bicyclist","man-mountain-biking","woman-mountain-biking","person_doing_cartwheel","man-cartwheeling","woman-cartwheeling","wrestlers","man-wrestling","woman-wrestling","water_polo","man-playing-water-polo","woman-playing-water-polo","handball","man-playing-handball","woman-playing-handball","juggling","man-juggling","woman-juggling","person_in_lotus_position","man_in_lotus_position","woman_in_lotus_position","bath","sleeping_accommodation","people_holding_hands","two_women_holding_hands","man_and_woman_holding_hands","two_men_holding_hands","couplekiss","woman-kiss-man","man-kiss-man","woman-kiss-woman","couple_with_heart","woman-heart-man","man-heart-man","woman-heart-woman","family","man-woman-boy","man-woman-girl","man-woman-girl-boy","man-woman-boy-boy","man-woman-girl-girl","man-man-boy","man-man-girl","man-man-girl-boy","man-man-boy-boy","man-man-girl-girl","woman-woman-boy","woman-woman-girl","woman-woman-girl-boy","woman-woman-boy-boy","woman-woman-girl-girl","man-boy","man-boy-boy","man-girl","man-girl-boy","man-girl-girl","woman-boy","woman-boy-boy","woman-girl","woman-girl-boy","woman-girl-girl","speaking_head_in_silhouette","bust_in_silhouette","busts_in_silhouette","people_hugging","footprints","robot_face","smiley_cat","smile_cat","joy_cat","heart_eyes_cat","smirk_cat","kissing_cat","scream_cat","crying_cat_face","pouting_cat","see_no_evil","hear_no_evil","speak_no_evil","love_letter","cupid","gift_heart","sparkling_heart","heartpulse","heartbeat","revolving_hearts","two_hearts","heart_decoration","heavy_heart_exclamation_mark_ornament","broken_heart","heart_on_fire","mending_heart","heart","pink_heart","orange_heart","yellow_heart","green_heart","blue_heart","light_blue_heart","purple_heart","brown_heart","black_heart","grey_heart","white_heart","kiss","100","anger","boom","dizzy","sweat_drops","dash","hole","speech_balloon","eye-in-speech-bubble","left_speech_bubble","right_anger_bubble","thought_balloon","zzz"]},{id:"nature",emojis:["monkey_face","monkey","gorilla","orangutan","dog","dog2","guide_dog","service_dog","poodle","wolf","fox_face","raccoon","cat","cat2","black_cat","lion_face","tiger","tiger2","leopard","horse","moose","donkey","racehorse","unicorn_face","zebra_face","deer","bison","cow","ox","water_buffalo","cow2","pig","pig2","boar","pig_nose","ram","sheep","goat","dromedary_camel","camel","llama","giraffe_face","elephant","mammoth","rhinoceros","hippopotamus","mouse","mouse2","rat","hamster","rabbit","rabbit2","chipmunk","beaver","hedgehog","bat","bear","polar_bear","koala","panda_face","sloth","otter","skunk","kangaroo","badger","feet","turkey","chicken","rooster","hatching_chick","baby_chick","hatched_chick","bird","penguin","dove_of_peace","eagle","duck","swan","owl","dodo","feather","flamingo","peacock","parrot","wing","black_bird","goose","frog","crocodile","turtle","lizard","snake","dragon_face","dragon","sauropod","t-rex","whale","whale2","dolphin","seal","fish","tropical_fish","blowfish","shark","octopus","shell","coral","jellyfish","snail","butterfly","bug","ant","bee","beetle","ladybug","cricket","cockroach","spider","spider_web","scorpion","mosquito","fly","worm","microbe","bouquet","cherry_blossom","white_flower","lotus","rosette","rose","wilted_flower","hibiscus","sunflower","blossom","tulip","hyacinth","seedling","potted_plant","evergreen_tree","deciduous_tree","palm_tree","cactus","ear_of_rice","herb","shamrock","four_leaf_clover","maple_leaf","fallen_leaf","leaves","empty_nest","nest_with_eggs","mushroom"]},{id:"foods",emojis:["grapes","melon","watermelon","tangerine","lemon","banana","pineapple","mango","apple","green_apple","pear","peach","cherries","strawberry","blueberries","kiwifruit","tomato","olive","coconut","avocado","eggplant","potato","carrot","corn","hot_pepper","bell_pepper","cucumber","leafy_green","broccoli","garlic","onion","peanuts","beans","chestnut","ginger_root","pea_pod","bread","croissant","baguette_bread","flatbread","pretzel","bagel","pancakes","waffle","cheese_wedge","meat_on_bone","poultry_leg","cut_of_meat","bacon","hamburger","fries","pizza","hotdog","sandwich","taco","burrito","tamale","stuffed_flatbread","falafel","egg","fried_egg","shallow_pan_of_food","stew","fondue","bowl_with_spoon","green_salad","popcorn","butter","salt","canned_food","bento","rice_cracker","rice_ball","rice","curry","ramen","spaghetti","sweet_potato","oden","sushi","fried_shrimp","fish_cake","moon_cake","dango","dumpling","fortune_cookie","takeout_box","crab","lobster","shrimp","squid","oyster","icecream","shaved_ice","ice_cream","doughnut","cookie","birthday","cake","cupcake","pie","chocolate_bar","candy","lollipop","custard","honey_pot","baby_bottle","glass_of_milk","coffee","teapot","tea","sake","champagne","wine_glass","cocktail","tropical_drink","beer","beers","clinking_glasses","tumbler_glass","pouring_liquid","cup_with_straw","bubble_tea","beverage_box","mate_drink","ice_cube","chopsticks","knife_fork_plate","fork_and_knife","spoon","hocho","jar","amphora"]},{id:"activity",emojis:["jack_o_lantern","christmas_tree","fireworks","sparkler","firecracker","sparkles","balloon","tada","confetti_ball","tanabata_tree","bamboo","dolls","flags","wind_chime","rice_scene","red_envelope","ribbon","gift","reminder_ribbon","admission_tickets","ticket","medal","trophy","sports_medal","first_place_medal","second_place_medal","third_place_medal","soccer","baseball","softball","basketball","volleyball","football","rugby_football","tennis","flying_disc","bowling","cricket_bat_and_ball","field_hockey_stick_and_ball","ice_hockey_stick_and_puck","lacrosse","table_tennis_paddle_and_ball","badminton_racquet_and_shuttlecock","boxing_glove","martial_arts_uniform","goal_net","golf","ice_skate","fishing_pole_and_fish","diving_mask","running_shirt_with_sash","ski","sled","curling_stone","dart","yo-yo","kite","gun","8ball","crystal_ball","magic_wand","video_game","joystick","slot_machine","game_die","jigsaw","teddy_bear","pinata","mirror_ball","nesting_dolls","spades","hearts","diamonds","clubs","chess_pawn","black_joker","mahjong","flower_playing_cards","performing_arts","frame_with_picture","art","thread","sewing_needle","yarn","knot"]},{id:"places",emojis:["earth_africa","earth_americas","earth_asia","globe_with_meridians","world_map","japan","compass","snow_capped_mountain","mountain","volcano","mount_fuji","camping","beach_with_umbrella","desert","desert_island","national_park","stadium","classical_building","building_construction","bricks","rock","wood","hut","house_buildings","derelict_house_building","house","house_with_garden","office","post_office","european_post_office","hospital","bank","hotel","love_hotel","convenience_store","school","department_store","factory","japanese_castle","european_castle","wedding","tokyo_tower","statue_of_liberty","church","mosque","hindu_temple","synagogue","shinto_shrine","kaaba","fountain","tent","foggy","night_with_stars","cityscape","sunrise_over_mountains","sunrise","city_sunset","city_sunrise","bridge_at_night","hotsprings","carousel_horse","playground_slide","ferris_wheel","roller_coaster","barber","circus_tent","steam_locomotive","railway_car","bullettrain_side","bullettrain_front","train2","metro","light_rail","station","tram","monorail","mountain_railway","train","bus","oncoming_bus","trolleybus","minibus","ambulance","fire_engine","police_car","oncoming_police_car","taxi","oncoming_taxi","car","oncoming_automobile","blue_car","pickup_truck","truck","articulated_lorry","tractor","racing_car","racing_motorcycle","motor_scooter","manual_wheelchair","motorized_wheelchair","auto_rickshaw","bike","scooter","skateboard","roller_skate","busstop","motorway","railway_track","oil_drum","fuelpump","wheel","rotating_light","traffic_light","vertical_traffic_light","octagonal_sign","construction","anchor","ring_buoy","boat","canoe","speedboat","passenger_ship","ferry","motor_boat","ship","airplane","small_airplane","airplane_departure","airplane_arriving","parachute","seat","helicopter","suspension_railway","mountain_cableway","aerial_tramway","satellite","rocket","flying_saucer","bellhop_bell","luggage","hourglass","hourglass_flowing_sand","watch","alarm_clock","stopwatch","timer_clock","mantelpiece_clock","clock12","clock1230","clock1","clock130","clock2","clock230","clock3","clock330","clock4","clock430","clock5","clock530","clock6","clock630","clock7","clock730","clock8","clock830","clock9","clock930","clock10","clock1030","clock11","clock1130","new_moon","waxing_crescent_moon","first_quarter_moon","moon","full_moon","waning_gibbous_moon","last_quarter_moon","waning_crescent_moon","crescent_moon","new_moon_with_face","first_quarter_moon_with_face","last_quarter_moon_with_face","thermometer","sunny","full_moon_with_face","sun_with_face","ringed_planet","star","star2","stars","milky_way","cloud","partly_sunny","thunder_cloud_and_rain","mostly_sunny","barely_sunny","partly_sunny_rain","rain_cloud","snow_cloud","lightning","tornado","fog","wind_blowing_face","cyclone","rainbow","closed_umbrella","umbrella","umbrella_with_rain_drops","umbrella_on_ground","zap","snowflake","snowman","snowman_without_snow","comet","fire","droplet","ocean"]},{id:"objects",emojis:["eyeglasses","dark_sunglasses","goggles","lab_coat","safety_vest","necktie","shirt","jeans","scarf","gloves","coat","socks","dress","kimono","sari","one-piece_swimsuit","briefs","shorts","bikini","womans_clothes","folding_hand_fan","purse","handbag","pouch","shopping_bags","school_satchel","thong_sandal","mans_shoe","athletic_shoe","hiking_boot","womans_flat_shoe","high_heel","sandal","ballet_shoes","boot","hair_pick","crown","womans_hat","tophat","mortar_board","billed_cap","military_helmet","helmet_with_white_cross","prayer_beads","lipstick","ring","gem","mute","speaker","sound","loud_sound","loudspeaker","mega","postal_horn","bell","no_bell","musical_score","musical_note","notes","studio_microphone","level_slider","control_knobs","microphone","headphones","radio","saxophone","accordion","guitar","musical_keyboard","trumpet","violin","banjo","drum_with_drumsticks","long_drum","maracas","flute","iphone","calling","phone","telephone_receiver","pager","fax","battery","low_battery","electric_plug","computer","desktop_computer","printer","keyboard","three_button_mouse","trackball","minidisc","floppy_disk","cd","dvd","abacus","movie_camera","film_frames","film_projector","clapper","tv","camera","camera_with_flash","video_camera","vhs","mag","mag_right","candle","bulb","flashlight","izakaya_lantern","diya_lamp","notebook_with_decorative_cover","closed_book","book","green_book","blue_book","orange_book","books","notebook","ledger","page_with_curl","scroll","page_facing_up","newspaper","rolled_up_newspaper","bookmark_tabs","bookmark","label","moneybag","coin","yen","dollar","euro","pound","money_with_wings","credit_card","receipt","chart","email","e-mail","incoming_envelope","envelope_with_arrow","outbox_tray","inbox_tray","package","mailbox","mailbox_closed","mailbox_with_mail","mailbox_with_no_mail","postbox","ballot_box_with_ballot","pencil2","black_nib","lower_left_fountain_pen","lower_left_ballpoint_pen","lower_left_paintbrush","lower_left_crayon","memo","briefcase","file_folder","open_file_folder","card_index_dividers","date","calendar","spiral_note_pad","spiral_calendar_pad","card_index","chart_with_upwards_trend","chart_with_downwards_trend","bar_chart","clipboard","pushpin","round_pushpin","paperclip","linked_paperclips","straight_ruler","triangular_ruler","scissors","card_file_box","file_cabinet","wastebasket","lock","unlock","lock_with_ink_pen","closed_lock_with_key","key","old_key","hammer","axe","pick","hammer_and_pick","hammer_and_wrench","dagger_knife","crossed_swords","bomb","boomerang","bow_and_arrow","shield","carpentry_saw","wrench","screwdriver","nut_and_bolt","gear","compression","scales","probing_cane","link","chains","hook","toolbox","magnet","ladder","alembic","test_tube","petri_dish","dna","microscope","telescope","satellite_antenna","syringe","drop_of_blood","pill","adhesive_bandage","crutch","stethoscope","x-ray","door","elevator","mirror","window","bed","couch_and_lamp","chair","toilet","plunger","shower","bathtub","mouse_trap","razor","lotion_bottle","safety_pin","broom","basket","roll_of_paper","bucket","soap","bubbles","toothbrush","sponge","fire_extinguisher","shopping_trolley","smoking","coffin","headstone","funeral_urn","nazar_amulet","hamsa","moyai","placard","identification_card"]},{id:"symbols",emojis:["atm","put_litter_in_its_place","potable_water","wheelchair","mens","womens","restroom","baby_symbol","wc","passport_control","customs","baggage_claim","left_luggage","warning","children_crossing","no_entry","no_entry_sign","no_bicycles","no_smoking","do_not_litter","non-potable_water","no_pedestrians","no_mobile_phones","underage","radioactive_sign","biohazard_sign","arrow_up","arrow_upper_right","arrow_right","arrow_lower_right","arrow_down","arrow_lower_left","arrow_left","arrow_upper_left","arrow_up_down","left_right_arrow","leftwards_arrow_with_hook","arrow_right_hook","arrow_heading_up","arrow_heading_down","arrows_clockwise","arrows_counterclockwise","back","end","on","soon","top","place_of_worship","atom_symbol","om_symbol","star_of_david","wheel_of_dharma","yin_yang","latin_cross","orthodox_cross","star_and_crescent","peace_symbol","menorah_with_nine_branches","six_pointed_star","khanda","aries","taurus","gemini","cancer","leo","virgo","libra","scorpius","sagittarius","capricorn","aquarius","pisces","ophiuchus","twisted_rightwards_arrows","repeat","repeat_one","arrow_forward","fast_forward","black_right_pointing_double_triangle_with_vertical_bar","black_right_pointing_triangle_with_double_vertical_bar","arrow_backward","rewind","black_left_pointing_double_triangle_with_vertical_bar","arrow_up_small","arrow_double_up","arrow_down_small","arrow_double_down","double_vertical_bar","black_square_for_stop","black_circle_for_record","eject","cinema","low_brightness","high_brightness","signal_strength","wireless","vibration_mode","mobile_phone_off","female_sign","male_sign","transgender_symbol","heavy_multiplication_x","heavy_plus_sign","heavy_minus_sign","heavy_division_sign","heavy_equals_sign","infinity","bangbang","interrobang","question","grey_question","grey_exclamation","exclamation","wavy_dash","currency_exchange","heavy_dollar_sign","medical_symbol","recycle","fleur_de_lis","trident","name_badge","beginner","o","white_check_mark","ballot_box_with_check","heavy_check_mark","x","negative_squared_cross_mark","curly_loop","loop","part_alternation_mark","eight_spoked_asterisk","eight_pointed_black_star","sparkle","copyright","registered","tm","hash","keycap_star","zero","one","two","three","four","five","six","seven","eight","nine","keycap_ten","capital_abcd","abcd","1234","symbols","abc","a","ab","b","cl","cool","free","information_source","id","m","new","ng","o2","ok","parking","sos","up","vs","koko","sa","u6708","u6709","u6307","ideograph_advantage","u5272","u7121","u7981","accept","u7533","u5408","u7a7a","congratulations","secret","u55b6","u6e80","red_circle","large_orange_circle","large_yellow_circle","large_green_circle","large_blue_circle","large_purple_circle","large_brown_circle","black_circle","white_circle","large_red_square","large_orange_square","large_yellow_square","large_green_square","large_blue_square","large_purple_square","large_brown_square","black_large_square","white_large_square","black_medium_square","white_medium_square","black_medium_small_square","white_medium_small_square","black_small_square","white_small_square","large_orange_diamond","large_blue_diamond","small_orange_diamond","small_blue_diamond","small_red_triangle","small_red_triangle_down","diamond_shape_with_a_dot_inside","radio_button","white_square_button","black_square_button"]},{id:"flags",emojis:["checkered_flag","cn","crossed_flags","de","es","flag-ac","flag-ad","flag-ae","flag-af","flag-ag","flag-ai","flag-al","flag-am","flag-ao","flag-aq","flag-ar","flag-as","flag-at","flag-au","flag-aw","flag-ax","flag-az","flag-ba","flag-bb","flag-bd","flag-be","flag-bf","flag-bg","flag-bh","flag-bi","flag-bj","flag-bl","flag-bm","flag-bn","flag-bo","flag-bq","flag-br","flag-bs","flag-bt","flag-bv","flag-bw","flag-by","flag-bz","flag-ca","flag-cc","flag-cd","flag-cf","flag-cg","flag-ch","flag-ci","flag-ck","flag-cl","flag-cm","flag-co","flag-cp","flag-cr","flag-cu","flag-cv","flag-cw","flag-cx","flag-cy","flag-cz","flag-dg","flag-dj","flag-dk","flag-dm","flag-do","flag-dz","flag-ea","flag-ec","flag-ee","flag-eg","flag-eh","flag-england","flag-er","flag-et","flag-eu","flag-fi","flag-fj","flag-fk","flag-fm","flag-fo","flag-ga","flag-gd","flag-ge","flag-gf","flag-gg","flag-gh","flag-gi","flag-gl","flag-gm","flag-gn","flag-gp","flag-gq","flag-gr","flag-gs","flag-gt","flag-gu","flag-gw","flag-gy","flag-hk","flag-hm","flag-hn","flag-hr","flag-ht","flag-hu","flag-ic","flag-id","flag-ie","flag-il","flag-im","flag-in","flag-io","flag-iq","flag-ir","flag-is","flag-je","flag-jm","flag-jo","flag-ke","flag-kg","flag-kh","flag-ki","flag-km","flag-kn","flag-kp","flag-kw","flag-ky","flag-kz","flag-la","flag-lb","flag-lc","flag-li","flag-lk","flag-lr","flag-ls","flag-lt","flag-lu","flag-lv","flag-ly","flag-ma","flag-mc","flag-md","flag-me","flag-mf","flag-mg","flag-mh","flag-mk","flag-ml","flag-mm","flag-mn","flag-mo","flag-mp","flag-mq","flag-mr","flag-ms","flag-mt","flag-mu","flag-mv","flag-mw","flag-mx","flag-my","flag-mz","flag-na","flag-nc","flag-ne","flag-nf","flag-ng","flag-ni","flag-nl","flag-no","flag-np","flag-nr","flag-nu","flag-nz","flag-om","flag-pa","flag-pe","flag-pf","flag-pg","flag-ph","flag-pk","flag-pl","flag-pm","flag-pn","flag-pr","flag-ps","flag-pt","flag-pw","flag-py","flag-qa","flag-re","flag-ro","flag-rs","flag-rw","flag-sa","flag-sb","flag-sc","flag-scotland","flag-sd","flag-se","flag-sg","flag-sh","flag-si","flag-sj","flag-sk","flag-sl","flag-sm","flag-sn","flag-so","flag-sr","flag-ss","flag-st","flag-sv","flag-sx","flag-sy","flag-sz","flag-ta","flag-tc","flag-td","flag-tf","flag-tg","flag-th","flag-tj","flag-tk","flag-tl","flag-tm","flag-tn","flag-to","flag-tr","flag-tt","flag-tv","flag-tw","flag-tz","flag-ua","flag-ug","flag-um","flag-un","flag-uy","flag-uz","flag-va","flag-vc","flag-ve","flag-vg","flag-vi","flag-vn","flag-vu","flag-wales","flag-wf","flag-ws","flag-xk","flag-ye","flag-yt","flag-za","flag-zm","flag-zw","fr","gb","it","jp","kr","pirate_flag","rainbow-flag","ru","transgender_flag","triangular_flag_on_post","us","waving_black_flag","waving_white_flag"]}],y2e={100:{id:"100",name:"Hundred Points",keywords:["100","score","perfect","numbers","century","exam","quiz","test","pass"],skins:[{unified:"1f4af",native:"💯"}],version:1},1234:{id:"1234",name:"Input Numbers",keywords:["1234","blue","square","1","2","3","4"],skins:[{unified:"1f522",native:"🔢"}],version:1},grinning:{id:"grinning",name:"Grinning Face",emoticons:[":D"],keywords:["smile","happy","joy",":D","grin"],skins:[{unified:"1f600",native:"😀"}],version:1},smiley:{id:"smiley",name:"Grinning Face with Big Eyes",emoticons:[":)","=)","=-)"],keywords:["smiley","happy","joy","haha",":D",":)","smile","funny"],skins:[{unified:"1f603",native:"😃"}],version:1},smile:{id:"smile",name:"Grinning Face with Smiling Eyes",emoticons:[":)","C:","c:",":D",":-D"],keywords:["smile","happy","joy","funny","haha","laugh","like",":D",":)"],skins:[{unified:"1f604",native:"😄"}],version:1},grin:{id:"grin",name:"Beaming Face with Smiling Eyes",keywords:["grin","happy","smile","joy","kawaii"],skins:[{unified:"1f601",native:"😁"}],version:1},laughing:{id:"laughing",name:"Grinning Squinting Face",emoticons:[":>",":->"],keywords:["laughing","satisfied","happy","joy","lol","haha","glad","XD","laugh"],skins:[{unified:"1f606",native:"😆"}],version:1},sweat_smile:{id:"sweat_smile",name:"Grinning Face with Sweat",keywords:["smile","hot","happy","laugh","relief"],skins:[{unified:"1f605",native:"😅"}],version:1},rolling_on_the_floor_laughing:{id:"rolling_on_the_floor_laughing",name:"Rolling on the Floor Laughing",keywords:["face","lol","haha","rofl"],skins:[{unified:"1f923",native:"🤣"}],version:3},joy:{id:"joy",name:"Face with Tears of Joy",keywords:["cry","weep","happy","happytears","haha"],skins:[{unified:"1f602",native:"😂"}],version:1},slightly_smiling_face:{id:"slightly_smiling_face",name:"Slightly Smiling Face",emoticons:[":)","(:",":-)"],keywords:["smile"],skins:[{unified:"1f642",native:"🙂"}],version:1},upside_down_face:{id:"upside_down_face",name:"Upside-Down Face",keywords:["upside","down","flipped","silly","smile"],skins:[{unified:"1f643",native:"🙃"}],version:1},melting_face:{id:"melting_face",name:"Melting Face",keywords:["hot","heat"],skins:[{unified:"1fae0",native:"🫠"}],version:14},wink:{id:"wink",name:"Winking Face",emoticons:[";)",";-)"],keywords:["wink","happy","mischievous","secret",";)","smile","eye"],skins:[{unified:"1f609",native:"😉"}],version:1},blush:{id:"blush",name:"Smiling Face with Smiling Eyes",emoticons:[":)"],keywords:["blush","smile","happy","flushed","crush","embarrassed","shy","joy"],skins:[{unified:"1f60a",native:"😊"}],version:1},innocent:{id:"innocent",name:"Smiling Face with Halo",keywords:["innocent","angel","heaven"],skins:[{unified:"1f607",native:"😇"}],version:1},smiling_face_with_3_hearts:{id:"smiling_face_with_3_hearts",name:"Smiling Face with Hearts",keywords:["3","love","like","affection","valentines","infatuation","crush","adore"],skins:[{unified:"1f970",native:"🥰"}],version:11},heart_eyes:{id:"heart_eyes",name:"Smiling Face with Heart-Eyes",keywords:["heart","eyes","love","like","affection","valentines","infatuation","crush"],skins:[{unified:"1f60d",native:"😍"}],version:1},"star-struck":{id:"star-struck",name:"Star-Struck",keywords:["star","struck","grinning","face","with","eyes","smile","starry"],skins:[{unified:"1f929",native:"🤩"}],version:5},kissing_heart:{id:"kissing_heart",name:"Face Blowing a Kiss",emoticons:[":*",":-*"],keywords:["kissing","heart","love","like","affection","valentines","infatuation"],skins:[{unified:"1f618",native:"😘"}],version:1},kissing:{id:"kissing",name:"Kissing Face",keywords:["love","like","3","valentines","infatuation","kiss"],skins:[{unified:"1f617",native:"😗"}],version:1},relaxed:{id:"relaxed",name:"Smiling Face",keywords:["relaxed","blush","massage","happiness"],skins:[{unified:"263a-fe0f",native:"☺️"}],version:1},kissing_closed_eyes:{id:"kissing_closed_eyes",name:"Kissing Face with Closed Eyes",keywords:["love","like","affection","valentines","infatuation","kiss"],skins:[{unified:"1f61a",native:"😚"}],version:1},kissing_smiling_eyes:{id:"kissing_smiling_eyes",name:"Kissing Face with Smiling Eyes",keywords:["affection","valentines","infatuation","kiss"],skins:[{unified:"1f619",native:"😙"}],version:1},smiling_face_with_tear:{id:"smiling_face_with_tear",name:"Smiling Face with Tear",keywords:["sad","cry","pretend"],skins:[{unified:"1f972",native:"🥲"}],version:13},yum:{id:"yum",name:"Face Savoring Food",keywords:["yum","happy","joy","tongue","smile","silly","yummy","nom","delicious","savouring"],skins:[{unified:"1f60b",native:"😋"}],version:1},stuck_out_tongue:{id:"stuck_out_tongue",name:"Face with Tongue",emoticons:[":p",":-p",":P",":-P",":b",":-b"],keywords:["stuck","out","prank","childish","playful","mischievous","smile"],skins:[{unified:"1f61b",native:"😛"}],version:1},stuck_out_tongue_winking_eye:{id:"stuck_out_tongue_winking_eye",name:"Winking Face with Tongue",emoticons:[";p",";-p",";b",";-b",";P",";-P"],keywords:["stuck","out","eye","prank","childish","playful","mischievous","smile","wink"],skins:[{unified:"1f61c",native:"😜"}],version:1},zany_face:{id:"zany_face",name:"Zany Face",keywords:["grinning","with","one","large","and","small","eye","goofy","crazy"],skins:[{unified:"1f92a",native:"🤪"}],version:5},stuck_out_tongue_closed_eyes:{id:"stuck_out_tongue_closed_eyes",name:"Squinting Face with Tongue",keywords:["stuck","out","closed","eyes","prank","playful","mischievous","smile"],skins:[{unified:"1f61d",native:"😝"}],version:1},money_mouth_face:{id:"money_mouth_face",name:"Money-Mouth Face",keywords:["money","mouth","rich","dollar"],skins:[{unified:"1f911",native:"🤑"}],version:1},hugging_face:{id:"hugging_face",name:"Hugging Face",keywords:["smile","hug"],skins:[{unified:"1f917",native:"🤗"}],version:1},face_with_hand_over_mouth:{id:"face_with_hand_over_mouth",name:"Face with Hand over Mouth",keywords:["smiling","eyes","and","covering","whoops","shock","surprise"],skins:[{unified:"1f92d",native:"🤭"}],version:5},face_with_open_eyes_and_hand_over_mouth:{id:"face_with_open_eyes_and_hand_over_mouth",name:"Face with Open Eyes and Hand over Mouth",keywords:["silence","secret","shock","surprise"],skins:[{unified:"1fae2",native:"🫢"}],version:14},face_with_peeking_eye:{id:"face_with_peeking_eye",name:"Face with Peeking Eye",keywords:["scared","frightening","embarrassing","shy"],skins:[{unified:"1fae3",native:"🫣"}],version:14},shushing_face:{id:"shushing_face",name:"Shushing Face",keywords:["with","finger","covering","closed","lips","quiet","shhh"],skins:[{unified:"1f92b",native:"🤫"}],version:5},thinking_face:{id:"thinking_face",name:"Thinking Face",keywords:["hmmm","think","consider"],skins:[{unified:"1f914",native:"🤔"}],version:1},saluting_face:{id:"saluting_face",name:"Saluting Face",keywords:["respect","salute"],skins:[{unified:"1fae1",native:"🫡"}],version:14},zipper_mouth_face:{id:"zipper_mouth_face",name:"Zipper-Mouth Face",keywords:["zipper","mouth","sealed","secret"],skins:[{unified:"1f910",native:"🤐"}],version:1},face_with_raised_eyebrow:{id:"face_with_raised_eyebrow",name:"Face with Raised Eyebrow",keywords:["one","distrust","scepticism","disapproval","disbelief","surprise"],skins:[{unified:"1f928",native:"🤨"}],version:5},neutral_face:{id:"neutral_face",name:"Neutral Face",emoticons:[":|",":-|"],keywords:["indifference","meh",":",""],skins:[{unified:"1f610",native:"😐"}],version:1},expressionless:{id:"expressionless",name:"Expressionless Face",emoticons:["-_-"],keywords:["indifferent","-","","meh","deadpan"],skins:[{unified:"1f611",native:"😑"}],version:1},no_mouth:{id:"no_mouth",name:"Face Without Mouth",keywords:["no","hellokitty"],skins:[{unified:"1f636",native:"😶"}],version:1},dotted_line_face:{id:"dotted_line_face",name:"Dotted Line Face",keywords:["invisible","lonely","isolation","depression"],skins:[{unified:"1fae5",native:"🫥"}],version:14},face_in_clouds:{id:"face_in_clouds",name:"Face in Clouds",keywords:["shower","steam","dream"],skins:[{unified:"1f636-200d-1f32b-fe0f",native:"😶‍🌫️"}],version:13.1},smirk:{id:"smirk",name:"Smirking Face",keywords:["smirk","smile","mean","prank","smug","sarcasm"],skins:[{unified:"1f60f",native:"😏"}],version:1},unamused:{id:"unamused",name:"Unamused Face",emoticons:[":("],keywords:["indifference","bored","straight","serious","sarcasm","unimpressed","skeptical","dubious","side","eye"],skins:[{unified:"1f612",native:"😒"}],version:1},face_with_rolling_eyes:{id:"face_with_rolling_eyes",name:"Face with Rolling Eyes",keywords:["eyeroll","frustrated"],skins:[{unified:"1f644",native:"🙄"}],version:1},grimacing:{id:"grimacing",name:"Grimacing Face",keywords:["grimace","teeth"],skins:[{unified:"1f62c",native:"😬"}],version:1},face_exhaling:{id:"face_exhaling",name:"Face Exhaling",keywords:["relieve","relief","tired","sigh"],skins:[{unified:"1f62e-200d-1f4a8",native:"😮‍💨"}],version:13.1},lying_face:{id:"lying_face",name:"Lying Face",keywords:["lie","pinocchio"],skins:[{unified:"1f925",native:"🤥"}],version:3},shaking_face:{id:"shaking_face",name:"Shaking Face",keywords:["dizzy","shock","blurry","earthquake"],skins:[{unified:"1fae8",native:"🫨"}],version:15},relieved:{id:"relieved",name:"Relieved Face",keywords:["relaxed","phew","massage","happiness"],skins:[{unified:"1f60c",native:"😌"}],version:1},pensive:{id:"pensive",name:"Pensive Face",keywords:["sad","depressed","upset"],skins:[{unified:"1f614",native:"😔"}],version:1},sleepy:{id:"sleepy",name:"Sleepy Face",keywords:["tired","rest","nap"],skins:[{unified:"1f62a",native:"😪"}],version:1},drooling_face:{id:"drooling_face",name:"Drooling Face",keywords:[],skins:[{unified:"1f924",native:"🤤"}],version:3},sleeping:{id:"sleeping",name:"Sleeping Face",keywords:["tired","sleepy","night","zzz"],skins:[{unified:"1f634",native:"😴"}],version:1},mask:{id:"mask",name:"Face with Medical Mask",keywords:["sick","ill","disease","covid"],skins:[{unified:"1f637",native:"😷"}],version:1},face_with_thermometer:{id:"face_with_thermometer",name:"Face with Thermometer",keywords:["sick","temperature","cold","fever","covid"],skins:[{unified:"1f912",native:"🤒"}],version:1},face_with_head_bandage:{id:"face_with_head_bandage",name:"Face with Head-Bandage",keywords:["head","bandage","injured","clumsy","hurt"],skins:[{unified:"1f915",native:"🤕"}],version:1},nauseated_face:{id:"nauseated_face",name:"Nauseated Face",keywords:["vomit","gross","green","sick","throw","up","ill"],skins:[{unified:"1f922",native:"🤢"}],version:3},face_vomiting:{id:"face_vomiting",name:"Face Vomiting",keywords:["with","open","mouth","sick"],skins:[{unified:"1f92e",native:"🤮"}],version:5},sneezing_face:{id:"sneezing_face",name:"Sneezing Face",keywords:["gesundheit","sneeze","sick","allergy"],skins:[{unified:"1f927",native:"🤧"}],version:3},hot_face:{id:"hot_face",name:"Hot Face",keywords:["feverish","heat","red","sweating"],skins:[{unified:"1f975",native:"🥵"}],version:11},cold_face:{id:"cold_face",name:"Cold Face",keywords:["blue","freezing","frozen","frostbite","icicles"],skins:[{unified:"1f976",native:"🥶"}],version:11},woozy_face:{id:"woozy_face",name:"Woozy Face",keywords:["dizzy","intoxicated","tipsy","wavy"],skins:[{unified:"1f974",native:"🥴"}],version:11},dizzy_face:{id:"dizzy_face",name:"Dizzy Face",keywords:["spent","unconscious","xox"],skins:[{unified:"1f635",native:"😵"}],version:1},face_with_spiral_eyes:{id:"face_with_spiral_eyes",name:"Face with Spiral Eyes",keywords:["sick","ill","confused","nauseous","nausea"],skins:[{unified:"1f635-200d-1f4ab",native:"😵‍💫"}],version:13.1},exploding_head:{id:"exploding_head",name:"Exploding Head",keywords:["shocked","face","with","mind","blown"],skins:[{unified:"1f92f",native:"🤯"}],version:5},face_with_cowboy_hat:{id:"face_with_cowboy_hat",name:"Cowboy Hat Face",keywords:["with","cowgirl"],skins:[{unified:"1f920",native:"🤠"}],version:3},partying_face:{id:"partying_face",name:"Partying Face",keywords:["celebration","woohoo"],skins:[{unified:"1f973",native:"🥳"}],version:11},disguised_face:{id:"disguised_face",name:"Disguised Face",keywords:["pretent","brows","glasses","moustache"],skins:[{unified:"1f978",native:"🥸"}],version:13},sunglasses:{id:"sunglasses",name:"Smiling Face with Sunglasses",emoticons:["8)"],keywords:["cool","smile","summer","beach","sunglass"],skins:[{unified:"1f60e",native:"😎"}],version:1},nerd_face:{id:"nerd_face",name:"Nerd Face",keywords:["nerdy","geek","dork"],skins:[{unified:"1f913",native:"🤓"}],version:1},face_with_monocle:{id:"face_with_monocle",name:"Face with Monocle",keywords:["stuffy","wealthy"],skins:[{unified:"1f9d0",native:"🧐"}],version:5},confused:{id:"confused",name:"Confused Face",emoticons:[":\\",":-\\",":/",":-/"],keywords:["indifference","huh","weird","hmmm",":/"],skins:[{unified:"1f615",native:"😕"}],version:1},face_with_diagonal_mouth:{id:"face_with_diagonal_mouth",name:"Face with Diagonal Mouth",keywords:["skeptic","confuse","frustrated","indifferent"],skins:[{unified:"1fae4",native:"🫤"}],version:14},worried:{id:"worried",name:"Worried Face",keywords:["concern","nervous",":("],skins:[{unified:"1f61f",native:"😟"}],version:1},slightly_frowning_face:{id:"slightly_frowning_face",name:"Slightly Frowning Face",keywords:["disappointed","sad","upset"],skins:[{unified:"1f641",native:"🙁"}],version:1},white_frowning_face:{id:"white_frowning_face",name:"Frowning Face",keywords:["white","sad","upset","frown"],skins:[{unified:"2639-fe0f",native:"☹️"}],version:1},open_mouth:{id:"open_mouth",name:"Face with Open Mouth",emoticons:[":o",":-o",":O",":-O"],keywords:["surprise","impressed","wow","whoa",":O"],skins:[{unified:"1f62e",native:"😮"}],version:1},hushed:{id:"hushed",name:"Hushed Face",keywords:["woo","shh"],skins:[{unified:"1f62f",native:"😯"}],version:1},astonished:{id:"astonished",name:"Astonished Face",keywords:["xox","surprised","poisoned"],skins:[{unified:"1f632",native:"😲"}],version:1},flushed:{id:"flushed",name:"Flushed Face",keywords:["blush","shy","flattered"],skins:[{unified:"1f633",native:"😳"}],version:1},pleading_face:{id:"pleading_face",name:"Pleading Face",keywords:["begging","mercy","cry","tears","sad","grievance"],skins:[{unified:"1f97a",native:"🥺"}],version:11},face_holding_back_tears:{id:"face_holding_back_tears",name:"Face Holding Back Tears",keywords:["touched","gratitude","cry"],skins:[{unified:"1f979",native:"🥹"}],version:14},frowning:{id:"frowning",name:"Frowning Face with Open Mouth",keywords:["aw","what"],skins:[{unified:"1f626",native:"😦"}],version:1},anguished:{id:"anguished",name:"Anguished Face",emoticons:["D:"],keywords:["stunned","nervous"],skins:[{unified:"1f627",native:"😧"}],version:1},fearful:{id:"fearful",name:"Fearful Face",keywords:["scared","terrified","nervous"],skins:[{unified:"1f628",native:"😨"}],version:1},cold_sweat:{id:"cold_sweat",name:"Anxious Face with Sweat",keywords:["cold","nervous"],skins:[{unified:"1f630",native:"😰"}],version:1},disappointed_relieved:{id:"disappointed_relieved",name:"Sad but Relieved Face",keywords:["disappointed","phew","sweat","nervous"],skins:[{unified:"1f625",native:"😥"}],version:1},cry:{id:"cry",name:"Crying Face",emoticons:[":'("],keywords:["cry","tears","sad","depressed","upset",":'("],skins:[{unified:"1f622",native:"😢"}],version:1},sob:{id:"sob",name:"Loudly Crying Face",emoticons:[":'("],keywords:["sob","cry","tears","sad","upset","depressed"],skins:[{unified:"1f62d",native:"😭"}],version:1},scream:{id:"scream",name:"Face Screaming in Fear",keywords:["scream","munch","scared","omg"],skins:[{unified:"1f631",native:"😱"}],version:1},confounded:{id:"confounded",name:"Confounded Face",keywords:["confused","sick","unwell","oops",":S"],skins:[{unified:"1f616",native:"😖"}],version:1},persevere:{id:"persevere",name:"Persevering Face",keywords:["persevere","sick","no","upset","oops"],skins:[{unified:"1f623",native:"😣"}],version:1},disappointed:{id:"disappointed",name:"Disappointed Face",emoticons:["):",":(",":-("],keywords:["sad","upset","depressed",":("],skins:[{unified:"1f61e",native:"😞"}],version:1},sweat:{id:"sweat",name:"Face with Cold Sweat",keywords:["downcast","hot","sad","tired","exercise"],skins:[{unified:"1f613",native:"😓"}],version:1},weary:{id:"weary",name:"Weary Face",keywords:["tired","sleepy","sad","frustrated","upset"],skins:[{unified:"1f629",native:"😩"}],version:1},tired_face:{id:"tired_face",name:"Tired Face",keywords:["sick","whine","upset","frustrated"],skins:[{unified:"1f62b",native:"😫"}],version:1},yawning_face:{id:"yawning_face",name:"Yawning Face",keywords:["tired","sleepy"],skins:[{unified:"1f971",native:"🥱"}],version:12},triumph:{id:"triumph",name:"Face with Look of Triumph",keywords:["steam","from","nose","gas","phew","proud","pride"],skins:[{unified:"1f624",native:"😤"}],version:1},rage:{id:"rage",name:"Pouting Face",keywords:["rage","angry","mad","hate","despise"],skins:[{unified:"1f621",native:"😡"}],version:1},angry:{id:"angry",name:"Angry Face",emoticons:[">:(",">:-("],keywords:["mad","annoyed","frustrated"],skins:[{unified:"1f620",native:"😠"}],version:1},face_with_symbols_on_mouth:{id:"face_with_symbols_on_mouth",name:"Face with Symbols on Mouth",keywords:["serious","covering","swearing","cursing","cussing","profanity","expletive"],skins:[{unified:"1f92c",native:"🤬"}],version:5},smiling_imp:{id:"smiling_imp",name:"Smiling Face with Horns",keywords:["imp","devil"],skins:[{unified:"1f608",native:"😈"}],version:1},imp:{id:"imp",name:"Imp",keywords:["angry","face","with","horns","devil"],skins:[{unified:"1f47f",native:"👿"}],version:1},skull:{id:"skull",name:"Skull",keywords:["dead","skeleton","creepy","death"],skins:[{unified:"1f480",native:"💀"}],version:1},skull_and_crossbones:{id:"skull_and_crossbones",name:"Skull and Crossbones",keywords:["poison","danger","deadly","scary","death","pirate","evil"],skins:[{unified:"2620-fe0f",native:"☠️"}],version:1},hankey:{id:"hankey",name:"Pile of Poo",keywords:["hankey","poop","shit","shitface","fail","turd"],skins:[{unified:"1f4a9",native:"💩"}],version:1},clown_face:{id:"clown_face",name:"Clown Face",keywords:[],skins:[{unified:"1f921",native:"🤡"}],version:3},japanese_ogre:{id:"japanese_ogre",name:"Ogre",keywords:["japanese","monster","red","mask","halloween","scary","creepy","devil","demon"],skins:[{unified:"1f479",native:"👹"}],version:1},japanese_goblin:{id:"japanese_goblin",name:"Goblin",keywords:["japanese","red","evil","mask","monster","scary","creepy"],skins:[{unified:"1f47a",native:"👺"}],version:1},ghost:{id:"ghost",name:"Ghost",keywords:["halloween","spooky","scary"],skins:[{unified:"1f47b",native:"👻"}],version:1},alien:{id:"alien",name:"Alien",keywords:["UFO","paul","weird","outer","space"],skins:[{unified:"1f47d",native:"👽"}],version:1},space_invader:{id:"space_invader",name:"Alien Monster",keywords:["space","invader","game","arcade","play"],skins:[{unified:"1f47e",native:"👾"}],version:1},robot_face:{id:"robot_face",name:"Robot",keywords:["face","computer","machine","bot"],skins:[{unified:"1f916",native:"🤖"}],version:1},smiley_cat:{id:"smiley_cat",name:"Grinning Cat",keywords:["smiley","animal","cats","happy","smile"],skins:[{unified:"1f63a",native:"😺"}],version:1},smile_cat:{id:"smile_cat",name:"Grinning Cat with Smiling Eyes",keywords:["smile","animal","cats"],skins:[{unified:"1f638",native:"😸"}],version:1},joy_cat:{id:"joy_cat",name:"Cat with Tears of Joy",keywords:["animal","cats","haha","happy"],skins:[{unified:"1f639",native:"😹"}],version:1},heart_eyes_cat:{id:"heart_eyes_cat",name:"Smiling Cat with Heart-Eyes",keywords:["heart","eyes","animal","love","like","affection","cats","valentines"],skins:[{unified:"1f63b",native:"😻"}],version:1},smirk_cat:{id:"smirk_cat",name:"Cat with Wry Smile",keywords:["smirk","animal","cats"],skins:[{unified:"1f63c",native:"😼"}],version:1},kissing_cat:{id:"kissing_cat",name:"Kissing Cat",keywords:["animal","cats","kiss"],skins:[{unified:"1f63d",native:"😽"}],version:1},scream_cat:{id:"scream_cat",name:"Weary Cat",keywords:["scream","animal","cats","munch","scared"],skins:[{unified:"1f640",native:"🙀"}],version:1},crying_cat_face:{id:"crying_cat_face",name:"Crying Cat",keywords:["face","animal","tears","weep","sad","cats","upset","cry"],skins:[{unified:"1f63f",native:"😿"}],version:1},pouting_cat:{id:"pouting_cat",name:"Pouting Cat",keywords:["animal","cats"],skins:[{unified:"1f63e",native:"😾"}],version:1},see_no_evil:{id:"see_no_evil",name:"See-No-Evil Monkey",keywords:["see","no","evil","animal","nature","haha"],skins:[{unified:"1f648",native:"🙈"}],version:1},hear_no_evil:{id:"hear_no_evil",name:"Hear-No-Evil Monkey",keywords:["hear","no","evil","animal","nature"],skins:[{unified:"1f649",native:"🙉"}],version:1},speak_no_evil:{id:"speak_no_evil",name:"Speak-No-Evil Monkey",keywords:["speak","no","evil","animal","nature","omg"],skins:[{unified:"1f64a",native:"🙊"}],version:1},love_letter:{id:"love_letter",name:"Love Letter",keywords:["email","like","affection","envelope","valentines"],skins:[{unified:"1f48c",native:"💌"}],version:1},cupid:{id:"cupid",name:"Heart with Arrow",keywords:["cupid","love","like","affection","valentines"],skins:[{unified:"1f498",native:"💘"}],version:1},gift_heart:{id:"gift_heart",name:"Heart with Ribbon",keywords:["gift","love","valentines"],skins:[{unified:"1f49d",native:"💝"}],version:1},sparkling_heart:{id:"sparkling_heart",name:"Sparkling Heart",keywords:["love","like","affection","valentines"],skins:[{unified:"1f496",native:"💖"}],version:1},heartpulse:{id:"heartpulse",name:"Growing Heart",keywords:["heartpulse","like","love","affection","valentines","pink"],skins:[{unified:"1f497",native:"💗"}],version:1},heartbeat:{id:"heartbeat",name:"Beating Heart",keywords:["heartbeat","love","like","affection","valentines","pink"],skins:[{unified:"1f493",native:"💓"}],version:1},revolving_hearts:{id:"revolving_hearts",name:"Revolving Hearts",keywords:["love","like","affection","valentines"],skins:[{unified:"1f49e",native:"💞"}],version:1},two_hearts:{id:"two_hearts",name:"Two Hearts",keywords:["love","like","affection","valentines","heart"],skins:[{unified:"1f495",native:"💕"}],version:1},heart_decoration:{id:"heart_decoration",name:"Heart Decoration",keywords:["purple","square","love","like"],skins:[{unified:"1f49f",native:"💟"}],version:1},heavy_heart_exclamation_mark_ornament:{id:"heavy_heart_exclamation_mark_ornament",name:"Heart Exclamation",keywords:["heavy","mark","ornament","decoration","love"],skins:[{unified:"2763-fe0f",native:"❣️"}],version:1},broken_heart:{id:"broken_heart",name:"Broken Heart",emoticons:["2&&(a.children=arguments.length>3?G0.call(arguments,2):t),typeof s=="function"&&s.defaultProps!=null)for(r in s.defaultProps)a[r]===void 0&&(a[r]=s.defaultProps[r]);return Zp(s,a,i,n,null)}function Zp(s,e,t,i,n){var r={type:s,props:e,key:t,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:n??++q9};return n==null&&ye.vnode!=null&&ye.vnode(r),r}function qr(){return{current:null}}function hf(s){return s.children}function zr(s,e){this.props=s,this.context=e}function cf(s,e){if(e==null)return s.__?cf(s.__,s.__.__k.indexOf(s)+1):null;for(var t;e0?Zp(d.type,d.props,d.key,null,d.__v):d)!=null){if(d.__=t,d.__b=t.__b+1,(f=m[c])===null||f&&d.key==f.key&&d.type===f.type)m[c]=void 0;else for(h=0;h{let s=null;try{navigator.userAgent.includes("jsdom")||(s=document.createElement("canvas").getContext("2d",{willReadFrequently:!0}))}catch{}if(!s)return()=>!1;const e=25,t=20,i=Math.floor(e/2);return s.font=i+"px Arial, Sans-Serif",s.textBaseline="top",s.canvas.width=t*2,s.canvas.height=e,n=>{s.clearRect(0,0,t*2,e),s.fillStyle="#FF0000",s.fillText(n,0,22),s.fillStyle="#0000FF",s.fillText(n,t,22);const r=s.getImageData(0,0,t,e).data,a=r.length;let o=0;for(;o=a)return!1;const l=t+o/4%t,u=Math.floor(o/4/t),c=s.getImageData(l,u,1,1).data;return!(r[o]!==c[0]||r[o+2]!==c[2]||s.measureText(n).width>=t)}})();var dD={latestVersion:N2e,noCountryFlags:P2e};const sO=["+1","grinning","kissing_heart","heart_eyes","laughing","stuck_out_tongue_winking_eye","sweat_smile","joy","scream","disappointed","unamused","weary","sob","sunglasses","heart"];let Gi=null;function x2e(s){Gi||(Gi=$o.get("frequently")||{});const e=s.id||s;e&&(Gi[e]||(Gi[e]=0),Gi[e]+=1,$o.set("last",e),$o.set("frequently",Gi))}function D2e({maxFrequentRows:s,perLine:e}){if(!s)return[];Gi||(Gi=$o.get("frequently"));let t=[];if(!Gi){Gi={};for(let r in sO.slice(0,e)){const a=sO[r];Gi[a]=e-r,t.push(a)}return t}const i=s*e,n=$o.get("last");for(let r in Gi)t.push(r);if(t.sort((r,a)=>{const o=Gi[a],l=Gi[r];return o==l?r.localeCompare(a):o-l}),t.length>i){const r=t.slice(i);t=t.slice(0,i);for(let a of r)a!=n&&delete Gi[a];n&&t.indexOf(n)==-1&&(delete Gi[t[t.length-1]],t.splice(-1,1,n)),$o.set("frequently",Gi)}return t}var lG={add:x2e,get:D2e,DEFAULTS:sO},uG={};uG=JSON.parse('{"search":"Search","search_no_results_1":"Oh no!","search_no_results_2":"That emoji couldn’t be found","pick":"Pick an emoji…","add_custom":"Add custom emoji","categories":{"activity":"Activity","custom":"Custom","flags":"Flags","foods":"Food & Drink","frequent":"Frequently used","nature":"Animals & Nature","objects":"Objects","people":"Smileys & People","places":"Travel & Places","search":"Search Results","symbols":"Symbols"},"skins":{"1":"Default","2":"Light","3":"Medium-Light","4":"Medium","5":"Medium-Dark","6":"Dark","choose":"Choose default skin tone"}}');var Ea={autoFocus:{value:!1},dynamicWidth:{value:!1},emojiButtonColors:{value:null},emojiButtonRadius:{value:"100%"},emojiButtonSize:{value:36},emojiSize:{value:24},emojiVersion:{value:15,choices:[1,2,3,4,5,11,12,12.1,13,13.1,14,15]},exceptEmojis:{value:[]},icons:{value:"auto",choices:["auto","outline","solid"]},locale:{value:"en",choices:["en","ar","be","cs","de","es","fa","fi","fr","hi","it","ja","ko","nl","pl","pt","ru","sa","tr","uk","vi","zh"]},maxFrequentRows:{value:4},navPosition:{value:"top",choices:["top","bottom","none"]},noCountryFlags:{value:!1},noResultsEmoji:{value:null},perLine:{value:9},previewEmoji:{value:null},previewPosition:{value:"bottom",choices:["top","bottom","none"]},searchPosition:{value:"sticky",choices:["sticky","static","none"]},set:{value:"native",choices:["native","apple","facebook","google","twitter"]},skin:{value:1,choices:[1,2,3,4,5,6]},skinTonePosition:{value:"preview",choices:["preview","search","none"]},theme:{value:"auto",choices:["auto","light","dark"]},categories:null,categoryIcons:null,custom:null,data:null,i18n:null,getImageURL:null,getSpritesheetURL:null,onAddCustomEmoji:null,onClickOutside:null,onEmojiSelect:null,stickySearch:{deprecated:!0,value:!0}};let Ki=null,Ke=null;const BT={};async function _D(s){if(BT[s])return BT[s];const t=await(await fetch(s)).json();return BT[s]=t,t}let GT=null,hG=null,cG=!1;function V0(s,{caller:e}={}){return GT||(GT=new Promise(t=>{hG=t})),s?L2e(s):e&&!cG&&console.warn(`\`${e}\` requires data to be initialized first. Promise will be pending until \`init\` is called.`),GT}async function L2e(s){cG=!0;let{emojiVersion:e,set:t,locale:i}=s;if(e||(e=Ea.emojiVersion.value),t||(t=Ea.set.value),i||(i=Ea.locale.value),Ke)Ke.categories=Ke.categories.filter(l=>!l.name);else{Ke=(typeof s.data=="function"?await s.data():s.data)||await _D(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/sets/${e}/${t}.json`),Ke.emoticons={},Ke.natives={},Ke.categories.unshift({id:"frequent",emojis:[]});for(const l in Ke.aliases){const u=Ke.aliases[l],c=Ke.emojis[u];c&&(c.aliases||(c.aliases=[]),c.aliases.push(l))}Ke.originalCategories=Ke.categories}if(Ki=(typeof s.i18n=="function"?await s.i18n():s.i18n)||(i=="en"?K9(uG):await _D(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/i18n/${i}.json`)),s.custom)for(let l in s.custom){l=parseInt(l);const u=s.custom[l],c=s.custom[l-1];if(!(!u.emojis||!u.emojis.length)){u.id||(u.id=`custom_${l+1}`),u.name||(u.name=Ki.categories.custom),c&&!u.icon&&(u.target=c.target||c),Ke.categories.push(u);for(const h of u.emojis)Ke.emojis[h.id]=h}}s.categories&&(Ke.categories=Ke.originalCategories.filter(l=>s.categories.indexOf(l.id)!=-1).sort((l,u)=>{const c=s.categories.indexOf(l.id),h=s.categories.indexOf(u.id);return c-h}));let n=null,r=null;t=="native"&&(n=dD.latestVersion(),r=s.noCountryFlags||dD.noCountryFlags());let a=Ke.categories.length,o=!1;for(;a--;){const l=Ke.categories[a];if(l.id=="frequent"){let{maxFrequentRows:h,perLine:f}=s;h=h>=0?h:Ea.maxFrequentRows.value,f||(f=Ea.perLine.value),l.emojis=lG.get({maxFrequentRows:h,perLine:f})}if(!l.emojis||!l.emojis.length){Ke.categories.splice(a,1);continue}const{categoryIcons:u}=s;if(u){const h=u[l.id];h&&!l.icon&&(l.icon=h)}let c=l.emojis.length;for(;c--;){const h=l.emojis[c],f=h.id?h:Ke.emojis[h],d=()=>{l.emojis.splice(c,1)};if(!f||s.exceptEmojis&&s.exceptEmojis.includes(f.id)){d();continue}if(n&&f.version>n){d();continue}if(r&&l.id=="flags"&&!V2e.includes(f.id)){d();continue}if(!f.search){if(o=!0,f.search=","+[[f.id,!1],[f.name,!0],[f.keywords,!1],[f.emoticons,!1]].map(([g,p])=>{if(g)return(Array.isArray(g)?g:[g]).map(m=>(p?m.split(/[-|_|\s]+/):[m]).map(v=>v.toLowerCase())).flat()}).flat().filter(g=>g&&g.trim()).join(","),f.emoticons)for(const g of f.emoticons)Ke.emoticons[g]||(Ke.emoticons[g]=f.id);let _=0;for(const g of f.skins){if(!g)continue;_++;const{native:p}=g;p&&(Ke.natives[p]=f.id,f.search+=`,${p}`);const m=_==1?"":`:skin-tone-${_}:`;g.shortcodes=`:${f.id}:${m}`}}}}o&&Dc.reset(),hG()}function fG(s,e,t){s||(s={});const i={};for(let n in e)i[n]=dG(n,s,e,t);return i}function dG(s,e,t,i){const n=t[s];let r=i&&i.getAttribute(s)||(e[s]!=null&&e[s]!=null?e[s]:null);return n&&(r!=null&&n.value&&typeof n.value!=typeof r&&(typeof n.value=="boolean"?r=r!="false":r=n.value.constructor(r)),n.transform&&r&&(r=n.transform(r)),(r==null||n.choices&&n.choices.indexOf(r)==-1)&&(r=n.value)),r}const U2e=/^(?:\:([^\:]+)\:)(?:\:skin-tone-(\d)\:)?$/;let nO=null;function F2e(s){return s.id?s:Ke.emojis[s]||Ke.emojis[Ke.aliases[s]]||Ke.emojis[Ke.natives[s]]}function B2e(){nO=null}async function G2e(s,{maxResults:e,caller:t}={}){if(!s||!s.trim().length)return null;e||(e=90),await V0(null,{caller:t||"SearchIndex.search"});const i=s.toLowerCase().replace(/(\w)-/,"$1 ").split(/[\s|,]+/).filter((o,l,u)=>o.trim()&&u.indexOf(o)==l);if(!i.length)return;let n=nO||(nO=Object.values(Ke.emojis)),r,a;for(const o of i){if(!n.length)break;r=[],a={};for(const l of n){if(!l.search)continue;const u=l.search.indexOf(`,${o}`);u!=-1&&(r.push(l),a[l.id]||(a[l.id]=0),a[l.id]+=l.id==o?0:u+1)}n=r}return r.length<2||(r.sort((o,l)=>{const u=a[o.id],c=a[l.id];return u==c?o.id.localeCompare(l.id):u-c}),r.length>e&&(r=r.slice(0,e))),r}var Dc={search:G2e,get:F2e,reset:B2e,SHORTCODES_REGEX:U2e};const V2e=["checkered_flag","crossed_flags","pirate_flag","rainbow-flag","transgender_flag","triangular_flag_on_post","waving_black_flag","waving_white_flag"];function j2e(s,e){return Array.isArray(s)&&Array.isArray(e)&&s.length===e.length&&s.every((t,i)=>t==e[i])}async function z2e(s=1){for(let e in[...Array(s).keys()])await new Promise(requestAnimationFrame)}function H2e(s,{skinIndex:e=0}={}){const t=s.skins[e]||(e=0,s.skins[e]),i={id:s.id,name:s.name,native:t.native,unified:t.unified,keywords:s.keywords,shortcodes:t.shortcodes||s.shortcodes};return s.skins.length>1&&(i.skin=e+1),t.src&&(i.src=t.src),s.aliases&&s.aliases.length&&(i.aliases=s.aliases),s.emoticons&&s.emoticons.length&&(i.emoticons=s.emoticons),i}const W2e={activity:{outline:V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:V("path",{d:"M12 0C5.373 0 0 5.372 0 12c0 6.627 5.373 12 12 12 6.628 0 12-5.373 12-12 0-6.628-5.372-12-12-12m9.949 11H17.05c.224-2.527 1.232-4.773 1.968-6.113A9.966 9.966 0 0 1 21.949 11M13 11V2.051a9.945 9.945 0 0 1 4.432 1.564c-.858 1.491-2.156 4.22-2.392 7.385H13zm-2 0H8.961c-.238-3.165-1.536-5.894-2.393-7.385A9.95 9.95 0 0 1 11 2.051V11zm0 2v8.949a9.937 9.937 0 0 1-4.432-1.564c.857-1.492 2.155-4.221 2.393-7.385H11zm4.04 0c.236 3.164 1.534 5.893 2.392 7.385A9.92 9.92 0 0 1 13 21.949V13h2.04zM4.982 4.887C5.718 6.227 6.726 8.473 6.951 11h-4.9a9.977 9.977 0 0 1 2.931-6.113M2.051 13h4.9c-.226 2.527-1.233 4.771-1.969 6.113A9.972 9.972 0 0 1 2.051 13m16.967 6.113c-.735-1.342-1.744-3.586-1.968-6.113h4.899a9.961 9.961 0 0 1-2.931 6.113"})}),solid:V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:V("path",{d:"M16.17 337.5c0 44.98 7.565 83.54 13.98 107.9C35.22 464.3 50.46 496 174.9 496c9.566 0 19.59-.4707 29.84-1.271L17.33 307.3C16.53 317.6 16.17 327.7 16.17 337.5zM495.8 174.5c0-44.98-7.565-83.53-13.98-107.9c-4.688-17.54-18.34-31.23-36.04-35.95C435.5 27.91 392.9 16 337 16c-9.564 0-19.59 .4707-29.84 1.271l187.5 187.5C495.5 194.4 495.8 184.3 495.8 174.5zM26.77 248.8l236.3 236.3c142-36.1 203.9-150.4 222.2-221.1L248.9 26.87C106.9 62.96 45.07 177.2 26.77 248.8zM256 335.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L164.7 283.3C161.6 280.2 160 276.1 160 271.1c0-8.529 6.865-16 16-16c4.095 0 8.189 1.562 11.31 4.688l64.01 64C254.4 327.8 256 331.9 256 335.1zM304 287.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L212.7 235.3C209.6 232.2 208 228.1 208 223.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01C302.5 279.8 304 283.9 304 287.1zM256 175.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01c3.125 3.125 4.688 7.219 4.688 11.31c0 9.133-7.468 16-16 16c-4.094 0-8.189-1.562-11.31-4.688l-64.01-64.01C257.6 184.2 256 180.1 256 175.1z"})})},custom:V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",children:V("path",{d:"M417.1 368c-5.937 10.27-16.69 16-27.75 16c-5.422 0-10.92-1.375-15.97-4.281L256 311.4V448c0 17.67-14.33 32-31.1 32S192 465.7 192 448V311.4l-118.3 68.29C68.67 382.6 63.17 384 57.75 384c-11.06 0-21.81-5.734-27.75-16c-8.828-15.31-3.594-34.88 11.72-43.72L159.1 256L41.72 187.7C26.41 178.9 21.17 159.3 29.1 144C36.63 132.5 49.26 126.7 61.65 128.2C65.78 128.7 69.88 130.1 73.72 132.3L192 200.6V64c0-17.67 14.33-32 32-32S256 46.33 256 64v136.6l118.3-68.29c3.838-2.213 7.939-3.539 12.07-4.051C398.7 126.7 411.4 132.5 417.1 144c8.828 15.31 3.594 34.88-11.72 43.72L288 256l118.3 68.28C421.6 333.1 426.8 352.7 417.1 368z"})}),flags:{outline:V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:V("path",{d:"M0 0l6.084 24H8L1.916 0zM21 5h-4l-1-4H4l3 12h3l1 4h13L21 5zM6.563 3h7.875l2 8H8.563l-2-8zm8.832 10l-2.856 1.904L12.063 13h3.332zM19 13l-1.5-6h1.938l2 8H16l3-2z"})}),solid:V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:V("path",{d:"M64 496C64 504.8 56.75 512 48 512h-32C7.25 512 0 504.8 0 496V32c0-17.75 14.25-32 32-32s32 14.25 32 32V496zM476.3 0c-6.365 0-13.01 1.35-19.34 4.233c-45.69 20.86-79.56 27.94-107.8 27.94c-59.96 0-94.81-31.86-163.9-31.87C160.9 .3055 131.6 4.867 96 15.75v350.5c32-9.984 59.87-14.1 84.85-14.1c73.63 0 124.9 31.78 198.6 31.78c31.91 0 68.02-5.971 111.1-23.09C504.1 355.9 512 344.4 512 332.1V30.73C512 11.1 495.3 0 476.3 0z"})})},foods:{outline:V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:V("path",{d:"M17 4.978c-1.838 0-2.876.396-3.68.934.513-1.172 1.768-2.934 4.68-2.934a1 1 0 0 0 0-2c-2.921 0-4.629 1.365-5.547 2.512-.064.078-.119.162-.18.244C11.73 1.838 10.798.023 9.207.023 8.579.022 7.85.306 7 .978 5.027 2.54 5.329 3.902 6.492 4.999 3.609 5.222 0 7.352 0 12.969c0 4.582 4.961 11.009 9 11.009 1.975 0 2.371-.486 3-1 .629.514 1.025 1 3 1 4.039 0 9-6.418 9-11 0-5.953-4.055-8-7-8M8.242 2.546c.641-.508.943-.523.965-.523.426.169.975 1.405 1.357 3.055-1.527-.629-2.741-1.352-2.98-1.846.059-.112.241-.356.658-.686M15 21.978c-1.08 0-1.21-.109-1.559-.402l-.176-.146c-.367-.302-.816-.452-1.266-.452s-.898.15-1.266.452l-.176.146c-.347.292-.477.402-1.557.402-2.813 0-7-5.389-7-9.009 0-5.823 4.488-5.991 5-5.991 1.939 0 2.484.471 3.387 1.251l.323.276a1.995 1.995 0 0 0 2.58 0l.323-.276c.902-.78 1.447-1.251 3.387-1.251.512 0 5 .168 5 6 0 3.617-4.187 9-7 9"})}),solid:V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:V("path",{d:"M481.9 270.1C490.9 279.1 496 291.3 496 304C496 316.7 490.9 328.9 481.9 337.9C472.9 346.9 460.7 352 448 352H64C51.27 352 39.06 346.9 30.06 337.9C21.06 328.9 16 316.7 16 304C16 291.3 21.06 279.1 30.06 270.1C39.06 261.1 51.27 256 64 256H448C460.7 256 472.9 261.1 481.9 270.1zM475.3 388.7C478.3 391.7 480 395.8 480 400V416C480 432.1 473.3 449.3 461.3 461.3C449.3 473.3 432.1 480 416 480H96C79.03 480 62.75 473.3 50.75 461.3C38.74 449.3 32 432.1 32 416V400C32 395.8 33.69 391.7 36.69 388.7C39.69 385.7 43.76 384 48 384H464C468.2 384 472.3 385.7 475.3 388.7zM50.39 220.8C45.93 218.6 42.03 215.5 38.97 211.6C35.91 207.7 33.79 203.2 32.75 198.4C31.71 193.5 31.8 188.5 32.99 183.7C54.98 97.02 146.5 32 256 32C365.5 32 457 97.02 479 183.7C480.2 188.5 480.3 193.5 479.2 198.4C478.2 203.2 476.1 207.7 473 211.6C469.1 215.5 466.1 218.6 461.6 220.8C457.2 222.9 452.3 224 447.3 224H64.67C59.73 224 54.84 222.9 50.39 220.8zM372.7 116.7C369.7 119.7 368 123.8 368 128C368 131.2 368.9 134.3 370.7 136.9C372.5 139.5 374.1 141.6 377.9 142.8C380.8 143.1 384 144.3 387.1 143.7C390.2 143.1 393.1 141.6 395.3 139.3C397.6 137.1 399.1 134.2 399.7 131.1C400.3 128 399.1 124.8 398.8 121.9C397.6 118.1 395.5 116.5 392.9 114.7C390.3 112.9 387.2 111.1 384 111.1C379.8 111.1 375.7 113.7 372.7 116.7V116.7zM244.7 84.69C241.7 87.69 240 91.76 240 96C240 99.16 240.9 102.3 242.7 104.9C244.5 107.5 246.1 109.6 249.9 110.8C252.8 111.1 256 112.3 259.1 111.7C262.2 111.1 265.1 109.6 267.3 107.3C269.6 105.1 271.1 102.2 271.7 99.12C272.3 96.02 271.1 92.8 270.8 89.88C269.6 86.95 267.5 84.45 264.9 82.7C262.3 80.94 259.2 79.1 256 79.1C251.8 79.1 247.7 81.69 244.7 84.69V84.69zM116.7 116.7C113.7 119.7 112 123.8 112 128C112 131.2 112.9 134.3 114.7 136.9C116.5 139.5 118.1 141.6 121.9 142.8C124.8 143.1 128 144.3 131.1 143.7C134.2 143.1 137.1 141.6 139.3 139.3C141.6 137.1 143.1 134.2 143.7 131.1C144.3 128 143.1 124.8 142.8 121.9C141.6 118.1 139.5 116.5 136.9 114.7C134.3 112.9 131.2 111.1 128 111.1C123.8 111.1 119.7 113.7 116.7 116.7L116.7 116.7z"})})},frequent:{outline:V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[V("path",{d:"M13 4h-2l-.001 7H9v2h2v2h2v-2h4v-2h-4z"}),V("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"})]}),solid:V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:V("path",{d:"M256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512zM232 256C232 264 236 271.5 242.7 275.1L338.7 339.1C349.7 347.3 364.6 344.3 371.1 333.3C379.3 322.3 376.3 307.4 365.3 300L280 243.2V120C280 106.7 269.3 96 255.1 96C242.7 96 231.1 106.7 231.1 120L232 256z"})})},nature:{outline:V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[V("path",{d:"M15.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 15.5 8M8.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 8.5 8"}),V("path",{d:"M18.933 0h-.027c-.97 0-2.138.787-3.018 1.497-1.274-.374-2.612-.51-3.887-.51-1.285 0-2.616.133-3.874.517C7.245.79 6.069 0 5.093 0h-.027C3.352 0 .07 2.67.002 7.026c-.039 2.479.276 4.238 1.04 5.013.254.258.882.677 1.295.882.191 3.177.922 5.238 2.536 6.38.897.637 2.187.949 3.2 1.102C8.04 20.6 8 20.795 8 21c0 1.773 2.35 3 4 3 1.648 0 4-1.227 4-3 0-.201-.038-.393-.072-.586 2.573-.385 5.435-1.877 5.925-7.587.396-.22.887-.568 1.104-.788.763-.774 1.079-2.534 1.04-5.013C23.929 2.67 20.646 0 18.933 0M3.223 9.135c-.237.281-.837 1.155-.884 1.238-.15-.41-.368-1.349-.337-3.291.051-3.281 2.478-4.972 3.091-5.031.256.015.731.27 1.265.646-1.11 1.171-2.275 2.915-2.352 5.125-.133.546-.398.858-.783 1.313M12 22c-.901 0-1.954-.693-2-1 0-.654.475-1.236 1-1.602V20a1 1 0 1 0 2 0v-.602c.524.365 1 .947 1 1.602-.046.307-1.099 1-2 1m3-3.48v.02a4.752 4.752 0 0 0-1.262-1.02c1.092-.516 2.239-1.334 2.239-2.217 0-1.842-1.781-2.195-3.977-2.195-2.196 0-3.978.354-3.978 2.195 0 .883 1.148 1.701 2.238 2.217A4.8 4.8 0 0 0 9 18.539v-.025c-1-.076-2.182-.281-2.973-.842-1.301-.92-1.838-3.045-1.853-6.478l.023-.041c.496-.826 1.49-1.45 1.804-3.102 0-2.047 1.357-3.631 2.362-4.522C9.37 3.178 10.555 3 11.948 3c1.447 0 2.685.192 3.733.57 1 .9 2.316 2.465 2.316 4.48.313 1.651 1.307 2.275 1.803 3.102.035.058.068.117.102.178-.059 5.967-1.949 7.01-4.902 7.19m6.628-8.202c-.037-.065-.074-.13-.113-.195a7.587 7.587 0 0 0-.739-.987c-.385-.455-.648-.768-.782-1.313-.076-2.209-1.241-3.954-2.353-5.124.531-.376 1.004-.63 1.261-.647.636.071 3.044 1.764 3.096 5.031.027 1.81-.347 3.218-.37 3.235"})]}),solid:V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:V("path",{d:"M332.7 19.85C334.6 8.395 344.5 0 356.1 0C363.6 0 370.6 3.52 375.1 9.502L392 32H444.1C456.8 32 469.1 37.06 478.1 46.06L496 64H552C565.3 64 576 74.75 576 88V112C576 156.2 540.2 192 496 192H426.7L421.6 222.5L309.6 158.5L332.7 19.85zM448 64C439.2 64 432 71.16 432 80C432 88.84 439.2 96 448 96C456.8 96 464 88.84 464 80C464 71.16 456.8 64 448 64zM416 256.1V480C416 497.7 401.7 512 384 512H352C334.3 512 320 497.7 320 480V364.8C295.1 377.1 268.8 384 240 384C211.2 384 184 377.1 160 364.8V480C160 497.7 145.7 512 128 512H96C78.33 512 64 497.7 64 480V249.8C35.23 238.9 12.64 214.5 4.836 183.3L.9558 167.8C-3.331 150.6 7.094 133.2 24.24 128.1C41.38 124.7 58.76 135.1 63.05 152.2L66.93 167.8C70.49 182 83.29 191.1 97.97 191.1H303.8L416 256.1z"})})},objects:{outline:V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[V("path",{d:"M12 0a9 9 0 0 0-5 16.482V21s2.035 3 5 3 5-3 5-3v-4.518A9 9 0 0 0 12 0zm0 2c3.86 0 7 3.141 7 7s-3.14 7-7 7-7-3.141-7-7 3.14-7 7-7zM9 17.477c.94.332 1.946.523 3 .523s2.06-.19 3-.523v.834c-.91.436-1.925.689-3 .689a6.924 6.924 0 0 1-3-.69v-.833zm.236 3.07A8.854 8.854 0 0 0 12 21c.965 0 1.888-.167 2.758-.451C14.155 21.173 13.153 22 12 22c-1.102 0-2.117-.789-2.764-1.453z"}),V("path",{d:"M14.745 12.449h-.004c-.852-.024-1.188-.858-1.577-1.824-.421-1.061-.703-1.561-1.182-1.566h-.009c-.481 0-.783.497-1.235 1.537-.436.982-.801 1.811-1.636 1.791l-.276-.043c-.565-.171-.853-.691-1.284-1.794-.125-.313-.202-.632-.27-.913-.051-.213-.127-.53-.195-.634C7.067 9.004 7.039 9 6.99 9A1 1 0 0 1 7 7h.01c1.662.017 2.015 1.373 2.198 2.134.486-.981 1.304-2.058 2.797-2.075 1.531.018 2.28 1.153 2.731 2.141l.002-.008C14.944 8.424 15.327 7 16.979 7h.032A1 1 0 1 1 17 9h-.011c-.149.076-.256.474-.319.709a6.484 6.484 0 0 1-.311.951c-.429.973-.79 1.789-1.614 1.789"})]}),solid:V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",children:V("path",{d:"M112.1 454.3c0 6.297 1.816 12.44 5.284 17.69l17.14 25.69c5.25 7.875 17.17 14.28 26.64 14.28h61.67c9.438 0 21.36-6.401 26.61-14.28l17.08-25.68c2.938-4.438 5.348-12.37 5.348-17.7L272 415.1h-160L112.1 454.3zM191.4 .0132C89.44 .3257 16 82.97 16 175.1c0 44.38 16.44 84.84 43.56 115.8c16.53 18.84 42.34 58.23 52.22 91.45c.0313 .25 .0938 .5166 .125 .7823h160.2c.0313-.2656 .0938-.5166 .125-.7823c9.875-33.22 35.69-72.61 52.22-91.45C351.6 260.8 368 220.4 368 175.1C368 78.61 288.9-.2837 191.4 .0132zM192 96.01c-44.13 0-80 35.89-80 79.1C112 184.8 104.8 192 96 192S80 184.8 80 176c0-61.76 50.25-111.1 112-111.1c8.844 0 16 7.159 16 16S200.8 96.01 192 96.01z"})})},people:{outline:V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[V("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"}),V("path",{d:"M8 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 8 7M16 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 16 7M15.232 15c-.693 1.195-1.87 2-3.349 2-1.477 0-2.655-.805-3.347-2H15m3-2H6a6 6 0 1 0 12 0"})]}),solid:V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:V("path",{d:"M0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256zM256 432C332.1 432 396.2 382 415.2 314.1C419.1 300.4 407.8 288 393.6 288H118.4C104.2 288 92.92 300.4 96.76 314.1C115.8 382 179.9 432 256 432V432zM176.4 160C158.7 160 144.4 174.3 144.4 192C144.4 209.7 158.7 224 176.4 224C194 224 208.4 209.7 208.4 192C208.4 174.3 194 160 176.4 160zM336.4 224C354 224 368.4 209.7 368.4 192C368.4 174.3 354 160 336.4 160C318.7 160 304.4 174.3 304.4 192C304.4 209.7 318.7 224 336.4 224z"})})},places:{outline:V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[V("path",{d:"M6.5 12C5.122 12 4 13.121 4 14.5S5.122 17 6.5 17 9 15.879 9 14.5 7.878 12 6.5 12m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5M17.5 12c-1.378 0-2.5 1.121-2.5 2.5s1.122 2.5 2.5 2.5 2.5-1.121 2.5-2.5-1.122-2.5-2.5-2.5m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5"}),V("path",{d:"M22.482 9.494l-1.039-.346L21.4 9h.6c.552 0 1-.439 1-.992 0-.006-.003-.008-.003-.008H23c0-1-.889-2-1.984-2h-.642l-.731-1.717C19.262 3.012 18.091 2 16.764 2H7.236C5.909 2 4.738 3.012 4.357 4.283L3.626 6h-.642C1.889 6 1 7 1 8h.003S1 8.002 1 8.008C1 8.561 1.448 9 2 9h.6l-.043.148-1.039.346a2.001 2.001 0 0 0-1.359 2.097l.751 7.508a1 1 0 0 0 .994.901H3v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h6v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h1.096a.999.999 0 0 0 .994-.901l.751-7.508a2.001 2.001 0 0 0-1.359-2.097M6.273 4.857C6.402 4.43 6.788 4 7.236 4h9.527c.448 0 .834.43.963.857L19.313 9H4.688l1.585-4.143zM7 21H5v-1h2v1zm12 0h-2v-1h2v1zm2.189-3H2.811l-.662-6.607L3 11h18l.852.393L21.189 18z"})]}),solid:V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:V("path",{d:"M39.61 196.8L74.8 96.29C88.27 57.78 124.6 32 165.4 32H346.6C387.4 32 423.7 57.78 437.2 96.29L472.4 196.8C495.6 206.4 512 229.3 512 256V448C512 465.7 497.7 480 480 480H448C430.3 480 416 465.7 416 448V400H96V448C96 465.7 81.67 480 64 480H32C14.33 480 0 465.7 0 448V256C0 229.3 16.36 206.4 39.61 196.8V196.8zM109.1 192H402.9L376.8 117.4C372.3 104.6 360.2 96 346.6 96H165.4C151.8 96 139.7 104.6 135.2 117.4L109.1 192zM96 256C78.33 256 64 270.3 64 288C64 305.7 78.33 320 96 320C113.7 320 128 305.7 128 288C128 270.3 113.7 256 96 256zM416 320C433.7 320 448 305.7 448 288C448 270.3 433.7 256 416 256C398.3 256 384 270.3 384 288C384 305.7 398.3 320 416 320z"})})},symbols:{outline:V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:V("path",{d:"M0 0h11v2H0zM4 11h3V6h4V4H0v2h4zM15.5 17c1.381 0 2.5-1.116 2.5-2.493s-1.119-2.493-2.5-2.493S13 13.13 13 14.507 14.119 17 15.5 17m0-2.986c.276 0 .5.222.5.493 0 .272-.224.493-.5.493s-.5-.221-.5-.493.224-.493.5-.493M21.5 19.014c-1.381 0-2.5 1.116-2.5 2.493S20.119 24 21.5 24s2.5-1.116 2.5-2.493-1.119-2.493-2.5-2.493m0 2.986a.497.497 0 0 1-.5-.493c0-.271.224-.493.5-.493s.5.222.5.493a.497.497 0 0 1-.5.493M22 13l-9 9 1.513 1.5 8.99-9.009zM17 11c2.209 0 4-1.119 4-2.5V2s.985-.161 1.498.949C23.01 4.055 23 6 23 6s1-1.119 1-3.135C24-.02 21 0 21 0h-2v6.347A5.853 5.853 0 0 0 17 6c-2.209 0-4 1.119-4 2.5s1.791 2.5 4 2.5M10.297 20.482l-1.475-1.585a47.54 47.54 0 0 1-1.442 1.129c-.307-.288-.989-1.016-2.045-2.183.902-.836 1.479-1.466 1.729-1.892s.376-.871.376-1.336c0-.592-.273-1.178-.818-1.759-.546-.581-1.329-.871-2.349-.871-1.008 0-1.79.293-2.344.879-.556.587-.832 1.181-.832 1.784 0 .813.419 1.748 1.256 2.805-.847.614-1.444 1.208-1.794 1.784a3.465 3.465 0 0 0-.523 1.833c0 .857.308 1.56.924 2.107.616.549 1.423.823 2.42.823 1.173 0 2.444-.379 3.813-1.137L8.235 24h2.819l-2.09-2.383 1.333-1.135zm-6.736-6.389a1.02 1.02 0 0 1 .73-.286c.31 0 .559.085.747.254a.849.849 0 0 1 .283.659c0 .518-.419 1.112-1.257 1.784-.536-.651-.805-1.231-.805-1.742a.901.901 0 0 1 .302-.669M3.74 22c-.427 0-.778-.116-1.057-.349-.279-.232-.418-.487-.418-.766 0-.594.509-1.288 1.527-2.083.968 1.134 1.717 1.946 2.248 2.438-.921.507-1.686.76-2.3.76"})}),solid:V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:V("path",{d:"M500.3 7.251C507.7 13.33 512 22.41 512 31.1V175.1C512 202.5 483.3 223.1 447.1 223.1C412.7 223.1 383.1 202.5 383.1 175.1C383.1 149.5 412.7 127.1 447.1 127.1V71.03L351.1 90.23V207.1C351.1 234.5 323.3 255.1 287.1 255.1C252.7 255.1 223.1 234.5 223.1 207.1C223.1 181.5 252.7 159.1 287.1 159.1V63.1C287.1 48.74 298.8 35.61 313.7 32.62L473.7 .6198C483.1-1.261 492.9 1.173 500.3 7.251H500.3zM74.66 303.1L86.5 286.2C92.43 277.3 102.4 271.1 113.1 271.1H174.9C185.6 271.1 195.6 277.3 201.5 286.2L213.3 303.1H239.1C266.5 303.1 287.1 325.5 287.1 351.1V463.1C287.1 490.5 266.5 511.1 239.1 511.1H47.1C21.49 511.1-.0019 490.5-.0019 463.1V351.1C-.0019 325.5 21.49 303.1 47.1 303.1H74.66zM143.1 359.1C117.5 359.1 95.1 381.5 95.1 407.1C95.1 434.5 117.5 455.1 143.1 455.1C170.5 455.1 191.1 434.5 191.1 407.1C191.1 381.5 170.5 359.1 143.1 359.1zM440.3 367.1H496C502.7 367.1 508.6 372.1 510.1 378.4C513.3 384.6 511.6 391.7 506.5 396L378.5 508C372.9 512.1 364.6 513.3 358.6 508.9C352.6 504.6 350.3 496.6 353.3 489.7L391.7 399.1H336C329.3 399.1 323.4 395.9 321 389.6C318.7 383.4 320.4 376.3 325.5 371.1L453.5 259.1C459.1 255 467.4 254.7 473.4 259.1C479.4 263.4 481.6 271.4 478.7 278.3L440.3 367.1zM116.7 219.1L19.85 119.2C-8.112 90.26-6.614 42.31 24.85 15.34C51.82-8.137 93.26-3.642 118.2 21.83L128.2 32.32L137.7 21.83C162.7-3.642 203.6-8.137 231.6 15.34C262.6 42.31 264.1 90.26 236.1 119.2L139.7 219.1C133.2 225.6 122.7 225.6 116.7 219.1H116.7z"})})}},Y2e={loupe:V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:V("path",{d:"M12.9 14.32a8 8 0 1 1 1.41-1.41l5.35 5.33-1.42 1.42-5.33-5.34zM8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12z"})}),delete:V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:V("path",{d:"M10 8.586L2.929 1.515 1.515 2.929 8.586 10l-7.071 7.071 1.414 1.414L10 11.414l7.071 7.071 1.414-1.414L11.414 10l7.071-7.071-1.414-1.414L10 8.586z"})})};var a1={categories:W2e,search:Y2e};function rO(s){let{id:e,skin:t,emoji:i}=s;if(s.shortcodes){const o=s.shortcodes.match(Dc.SHORTCODES_REGEX);o&&(e=o[1],o[2]&&(t=o[2]))}if(i||(i=Dc.get(e||s.native)),!i)return s.fallback;const n=i.skins[t-1]||i.skins[0],r=n.src||(s.set!="native"&&!s.spritesheet?typeof s.getImageURL=="function"?s.getImageURL(s.set,n.unified):`https://cdn.jsdelivr.net/npm/emoji-datasource-${s.set}@15.0.1/img/${s.set}/64/${n.unified}.png`:void 0),a=typeof s.getSpritesheetURL=="function"?s.getSpritesheetURL(s.set):`https://cdn.jsdelivr.net/npm/emoji-datasource-${s.set}@15.0.1/img/${s.set}/sheets-256/64.png`;return V("span",{class:"emoji-mart-emoji","data-emoji-set":s.set,children:r?V("img",{style:{maxWidth:s.size||"1em",maxHeight:s.size||"1em",display:"inline-block"},alt:n.native||n.shortcodes,src:r}):s.set=="native"?V("span",{style:{fontSize:s.size,fontFamily:'"EmojiMart", "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "Android Emoji"'},children:n.native}):V("span",{style:{display:"block",width:s.size,height:s.size,backgroundImage:`url(${a})`,backgroundSize:`${100*Ke.sheet.cols}% ${100*Ke.sheet.rows}%`,backgroundPosition:`${100/(Ke.sheet.cols-1)*n.x}% ${100/(Ke.sheet.rows-1)*n.y}%`}})})}const X2e=typeof window<"u"&&window.HTMLElement?window.HTMLElement:Object;class _G extends X2e{static get observedAttributes(){return Object.keys(this.Props)}update(e={}){for(let t in e)this.attributeChangedCallback(t,null,e[t])}attributeChangedCallback(e,t,i){if(!this.component)return;const n=dG(e,{[e]:i},this.constructor.Props,this);this.component.componentWillReceiveProps?this.component.componentWillReceiveProps({[e]:n}):(this.component.props[e]=n,this.component.forceUpdate())}disconnectedCallback(){this.disconnected=!0,this.component&&this.component.unregister&&this.component.unregister()}constructor(e={}){if(super(),this.props=e,e.parent||e.ref){let t=null;const i=e.parent||(t=e.ref&&e.ref.current);t&&(t.innerHTML=""),i&&i.appendChild(this)}}}class K2e extends _G{setShadow(){this.attachShadow({mode:"open"})}injectStyles(e){if(!e)return;const t=document.createElement("style");t.textContent=e,this.shadowRoot.insertBefore(t,this.shadowRoot.firstChild)}constructor(e,{styles:t}={}){super(e),this.setShadow(),this.injectStyles(t)}}var gG={fallback:"",id:"",native:"",shortcodes:"",size:{value:"",transform:s=>/\D/.test(s)?s:`${s}px`},set:Ea.set,skin:Ea.skin};class pG extends _G{async connectedCallback(){const e=fG(this.props,gG,this);e.element=this,e.ref=t=>{this.component=t},await V0(),!this.disconnected&&aG(V(rO,{...e}),this)}constructor(e){super(e)}}pn(pG,"Props",gG);typeof customElements<"u"&&!customElements.get("em-emoji")&&customElements.define("em-emoji",pG);var gD,aO=[],pD=ye.__b,mD=ye.__r,vD=ye.diffed,ED=ye.__c,yD=ye.unmount;function q2e(){var s;for(aO.sort(function(e,t){return e.__v.__b-t.__v.__b});s=aO.pop();)if(s.__P)try{s.__H.__h.forEach(Jp),s.__H.__h.forEach(oO),s.__H.__h=[]}catch(e){s.__H.__h=[],ye.__e(e,s.__v)}}ye.__b=function(s){pD&&pD(s)},ye.__r=function(s){mD&&mD(s);var e=s.__c.__H;e&&(e.__h.forEach(Jp),e.__h.forEach(oO),e.__h=[])},ye.diffed=function(s){vD&&vD(s);var e=s.__c;e&&e.__H&&e.__H.__h.length&&(aO.push(e)!==1&&gD===ye.requestAnimationFrame||((gD=ye.requestAnimationFrame)||function(t){var i,n=function(){clearTimeout(r),TD&&cancelAnimationFrame(i),setTimeout(t)},r=setTimeout(n,100);TD&&(i=requestAnimationFrame(n))})(q2e))},ye.__c=function(s,e){e.some(function(t){try{t.__h.forEach(Jp),t.__h=t.__h.filter(function(i){return!i.__||oO(i)})}catch(i){e.some(function(n){n.__h&&(n.__h=[])}),e=[],ye.__e(i,t.__v)}}),ED&&ED(s,e)},ye.unmount=function(s){yD&&yD(s);var e,t=s.__c;t&&t.__H&&(t.__H.__.forEach(function(i){try{Jp(i)}catch(n){e=n}}),e&&ye.__e(e,t.__v))};var TD=typeof requestAnimationFrame=="function";function Jp(s){var e=s.__c;typeof e=="function"&&(s.__c=void 0,e())}function oO(s){s.__c=s.__()}function $2e(s,e){for(var t in e)s[t]=e[t];return s}function ID(s,e){for(var t in s)if(t!=="__source"&&!(t in e))return!0;for(var i in e)if(i!=="__source"&&s[i]!==e[i])return!0;return!1}function o1(s){this.props=s}(o1.prototype=new zr).isPureReactComponent=!0,o1.prototype.shouldComponentUpdate=function(s,e){return ID(this.props,s)||ID(this.state,e)};var RD=ye.__b;ye.__b=function(s){s.type&&s.type.__f&&s.ref&&(s.props.ref=s.ref,s.ref=null),RD&&RD(s)};var Q2e=ye.__e;ye.__e=function(s,e,t){if(s.then){for(var i,n=e;n=n.__;)if((i=n.__c)&&i.__c)return e.__e==null&&(e.__e=t.__e,e.__k=t.__k),i.__c(s,e)}Q2e(s,e,t)};var SD=ye.unmount;function VT(){this.__u=0,this.t=null,this.__b=null}function mG(s){var e=s.__.__c;return e&&e.__e&&e.__e(s)}function Sp(){this.u=null,this.o=null}ye.unmount=function(s){var e=s.__c;e&&e.__R&&e.__R(),e&&s.__h===!0&&(s.type=null),SD&&SD(s)},(VT.prototype=new zr).__c=function(s,e){var t=e.__c,i=this;i.t==null&&(i.t=[]),i.t.push(t);var n=mG(i.__v),r=!1,a=function(){r||(r=!0,t.__R=null,n?n(o):o())};t.__R=a;var o=function(){if(!--i.__u){if(i.state.__e){var u=i.state.__e;i.__v.__k[0]=function h(f,d,_){return f&&(f.__v=null,f.__k=f.__k&&f.__k.map(function(g){return h(g,d,_)}),f.__c&&f.__c.__P===d&&(f.__e&&_.insertBefore(f.__e,f.__d),f.__c.__e=!0,f.__c.__P=_)),f}(u,u.__c.__P,u.__c.__O)}var c;for(i.setState({__e:i.__b=null});c=i.t.pop();)c.forceUpdate()}},l=e.__h===!0;i.__u++||l||i.setState({__e:i.__b=i.__v.__k[0]}),s.then(a,a)},VT.prototype.componentWillUnmount=function(){this.t=[]},VT.prototype.render=function(s,e){if(this.__b){if(this.__v.__k){var t=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=function r(a,o,l){return a&&(a.__c&&a.__c.__H&&(a.__c.__H.__.forEach(function(u){typeof u.__c=="function"&&u.__c()}),a.__c.__H=null),(a=$2e({},a)).__c!=null&&(a.__c.__P===l&&(a.__c.__P=o),a.__c=null),a.__k=a.__k&&a.__k.map(function(u){return r(u,o,l)})),a}(this.__b,t,i.__O=i.__P)}this.__b=null}var n=e.__e&&iO(hf,null,s.fallback);return n&&(n.__h=null),[iO(hf,null,e.__e?null:s.children),n]};var bD=function(s,e,t){if(++t[1]===t[0]&&s.o.delete(e),s.props.revealOrder&&(s.props.revealOrder[0]!=="t"||!s.o.size))for(t=s.u;t;){for(;t.length>3;)t.pop()();if(t[1]{const n=t.name||Ki.categories[t.id],r=!this.props.unfocused&&t.id==this.state.categoryId;return r&&(e=i),V("button",{"aria-label":n,"aria-selected":r||void 0,title:n,type:"button",class:"flex flex-grow flex-center",onMouseDown:a=>a.preventDefault(),onClick:()=>{this.props.onClick({category:t,i})},children:this.renderIcon(t)})}),V("div",{class:"bar",style:{width:`${100/this.categories.length}%`,opacity:e==null?0:1,transform:this.props.dir==="rtl"?`scaleX(-1) translateX(${e*100}%)`:`translateX(${e*100}%)`}})]})})}constructor(){super(),this.categories=Ke.categories.filter(e=>!e.target),this.state={categoryId:this.categories[0].id}}}class oCe extends o1{shouldComponentUpdate(e){for(let t in e)if(t!="children"&&e[t]!=this.props[t])return!0;return!1}render(){return this.props.children}}const bp={rowsPerRender:10};class lCe extends zr{getInitialState(e=this.props){return{skin:$o.get("skin")||e.skin,theme:this.initTheme(e.theme)}}componentWillMount(){this.dir=Ki.rtl?"rtl":"ltr",this.refs={menu:qr(),navigation:qr(),scroll:qr(),search:qr(),searchInput:qr(),skinToneButton:qr(),skinToneRadio:qr()},this.initGrid(),this.props.stickySearch==!1&&this.props.searchPosition=="sticky"&&(console.warn("[EmojiMart] Deprecation warning: `stickySearch` has been renamed `searchPosition`."),this.props.searchPosition="static")}componentDidMount(){if(this.register(),this.shadowRoot=this.base.parentNode,this.props.autoFocus){const{searchInput:e}=this.refs;e.current&&e.current.focus()}}componentWillReceiveProps(e){this.nextState||(this.nextState={});for(const t in e)this.nextState[t]=e[t];clearTimeout(this.nextStateTimer),this.nextStateTimer=setTimeout(()=>{let t=!1;for(const n in this.nextState)this.props[n]=this.nextState[n],(n==="custom"||n==="categories")&&(t=!0);delete this.nextState;const i=this.getInitialState();if(t)return this.reset(i);this.setState(i)})}componentWillUnmount(){this.unregister()}async reset(e={}){await V0(this.props),this.initGrid(),this.unobserve(),this.setState(e,()=>{this.observeCategories(),this.observeRows()})}register(){document.addEventListener("click",this.handleClickOutside),this.observe()}unregister(){var e;document.removeEventListener("click",this.handleClickOutside),(e=this.darkMedia)==null||e.removeEventListener("change",this.darkMediaCallback),this.unobserve()}observe(){this.observeCategories(),this.observeRows()}unobserve({except:e=[]}={}){Array.isArray(e)||(e=[e]);for(const t of this.observers)e.includes(t)||t.disconnect();this.observers=[].concat(e)}initGrid(){const{categories:e}=Ke;this.refs.categories=new Map;const t=Ke.categories.map(n=>n.id).join(",");this.navKey&&this.navKey!=t&&this.refs.scroll.current&&(this.refs.scroll.current.scrollTop=0),this.navKey=t,this.grid=[],this.grid.setsize=0;const i=(n,r)=>{const a=[];a.__categoryId=r.id,a.__index=n.length,this.grid.push(a);const o=this.grid.length-1,l=o%bp.rowsPerRender?{}:qr();return l.index=o,l.posinset=this.grid.setsize+1,n.push(l),a};for(let n of e){const r=[];let a=i(r,n);for(let o of n.emojis)a.length==this.getPerLine()&&(a=i(r,n)),this.grid.setsize+=1,a.push(o);this.refs.categories.set(n.id,{root:qr(),rows:r})}}initTheme(e){if(e!="auto")return e;if(!this.darkMedia){if(this.darkMedia=matchMedia("(prefers-color-scheme: dark)"),this.darkMedia.media.match(/^not/))return"light";this.darkMedia.addEventListener("change",this.darkMediaCallback)}return this.darkMedia.matches?"dark":"light"}initDynamicPerLine(e=this.props){if(!e.dynamicWidth)return;const{element:t,emojiButtonSize:i}=e,n=()=>{const{width:a}=t.getBoundingClientRect();return Math.floor(a/i)},r=new ResizeObserver(()=>{this.unobserve({except:r}),this.setState({perLine:n()},()=>{this.initGrid(),this.forceUpdate(()=>{this.observeCategories(),this.observeRows()})})});return r.observe(t),this.observers.push(r),n()}getPerLine(){return this.state.perLine||this.props.perLine}getEmojiByPos([e,t]){const i=this.state.searchResults||this.grid,n=i[e]&&i[e][t];if(n)return Dc.get(n)}observeCategories(){const e=this.refs.navigation.current;if(!e)return;const t=new Map,i=a=>{a!=e.state.categoryId&&e.setState({categoryId:a})},n={root:this.refs.scroll.current,threshold:[0,1]},r=new IntersectionObserver(a=>{for(const l of a){const u=l.target.dataset.id;t.set(u,l.intersectionRatio)}const o=[...t];for(const[l,u]of o)if(u){i(l);break}},n);for(const{root:a}of this.refs.categories.values())r.observe(a.current);this.observers.push(r)}observeRows(){const e={...this.state.visibleRows},t=new IntersectionObserver(i=>{for(const n of i){const r=parseInt(n.target.dataset.index);n.isIntersecting?e[r]=!0:delete e[r]}this.setState({visibleRows:e})},{root:this.refs.scroll.current,rootMargin:`${this.props.emojiButtonSize*(bp.rowsPerRender+5)}px 0px ${this.props.emojiButtonSize*bp.rowsPerRender}px`});for(const{rows:i}of this.refs.categories.values())for(const n of i)n.current&&t.observe(n.current);this.observers.push(t)}preventDefault(e){e.preventDefault()}unfocusSearch(){const e=this.refs.searchInput.current;e&&e.blur()}navigate({e,input:t,left:i,right:n,up:r,down:a}){const o=this.state.searchResults||this.grid;if(!o.length)return;let[l,u]=this.state.pos;const c=(()=>{if(l==0&&u==0&&!e.repeat&&(i||r))return null;if(l==-1)return!e.repeat&&(n||a)&&t.selectionStart==t.value.length?[0,0]:null;if(i||n){let h=o[l];const f=i?-1:1;if(u+=f,!h[u]){if(l+=f,h=o[l],!h)return l=i?0:o.length-1,u=i?0:o[l].length-1,[l,u];u=i?h.length-1:0}return[l,u]}if(r||a){l+=r?-1:1;const h=o[l];return h?(h[u]||(u=h.length-1),[l,u]):(l=r?0:o.length-1,u=r?0:o[l].length-1,[l,u])}})();if(c)e.preventDefault();else{this.state.pos[0]>-1&&this.setState({pos:[-1,-1]});return}this.setState({pos:c,keyboard:!0},()=>{this.scrollTo({row:c[0]})})}scrollTo({categoryId:e,row:t}){const i=this.state.searchResults||this.grid;if(!i.length)return;const n=this.refs.scroll.current,r=n.getBoundingClientRect();let a=0;if(t>=0&&(e=i[t].__categoryId),e&&(a=(this.refs[e]||this.refs.categories.get(e).root).current.getBoundingClientRect().top-(r.top-n.scrollTop)+1),t>=0)if(!t)a=0;else{const o=i[t].__index,l=a+o*this.props.emojiButtonSize,u=l+this.props.emojiButtonSize+this.props.emojiButtonSize*.88;if(ln.scrollTop+r.height)a=u-r.height;else return}this.ignoreMouse(),n.scrollTop=a}ignoreMouse(){this.mouseIsIgnored=!0,clearTimeout(this.ignoreMouseTimer),this.ignoreMouseTimer=setTimeout(()=>{delete this.mouseIsIgnored},100)}handleEmojiOver(e){this.mouseIsIgnored||this.state.showSkins||this.setState({pos:e||[-1,-1],keyboard:!1})}handleEmojiClick({e,emoji:t,pos:i}){if(this.props.onEmojiSelect&&(!t&&i&&(t=this.getEmojiByPos(i)),t)){const n=H2e(t,{skinIndex:this.state.skin-1});this.props.maxFrequentRows&&lG.add(n,this.props),this.props.onEmojiSelect(n,e)}}closeSkins(){this.state.showSkins&&(this.setState({showSkins:null,tempSkin:null}),this.base.removeEventListener("click",this.handleBaseClick),this.base.removeEventListener("keydown",this.handleBaseKeydown))}handleSkinMouseOver(e){this.setState({tempSkin:e})}handleSkinClick(e){this.ignoreMouse(),this.closeSkins(),this.setState({skin:e,tempSkin:null}),$o.set("skin",e)}renderNav(){return V(aCe,{ref:this.refs.navigation,icons:this.props.icons,theme:this.state.theme,dir:this.dir,unfocused:!!this.state.searchResults,position:this.props.navPosition,onClick:this.handleCategoryClick},this.navKey)}renderPreview(){const e=this.getEmojiByPos(this.state.pos),t=this.state.searchResults&&!this.state.searchResults.length;return V("div",{id:"preview",class:"flex flex-middle",dir:this.dir,"data-position":this.props.previewPosition,children:[V("div",{class:"flex flex-middle flex-grow",children:[V("div",{class:"flex flex-auto flex-middle flex-center",style:{height:this.props.emojiButtonSize,fontSize:this.props.emojiButtonSize},children:V(rO,{emoji:e,id:t?this.props.noResultsEmoji||"cry":this.props.previewEmoji||(this.props.previewPosition=="top"?"point_down":"point_up"),set:this.props.set,size:this.props.emojiButtonSize,skin:this.state.tempSkin||this.state.skin,spritesheet:!0,getSpritesheetURL:this.props.getSpritesheetURL})}),V("div",{class:`margin-${this.dir[0]}`,children:e||t?V("div",{class:`padding-${this.dir[2]} align-${this.dir[0]}`,children:[V("div",{class:"preview-title ellipsis",children:e?e.name:Ki.search_no_results_1}),V("div",{class:"preview-subtitle ellipsis color-c",children:e?e.skins[0].shortcodes:Ki.search_no_results_2})]}):V("div",{class:"preview-placeholder color-c",children:Ki.pick})})]}),!e&&this.props.skinTonePosition=="preview"&&this.renderSkinToneButton()]})}renderEmojiButton(e,{pos:t,posinset:i,grid:n}){const r=this.props.emojiButtonSize,a=this.state.tempSkin||this.state.skin,l=(e.skins[a-1]||e.skins[0]).native,u=j2e(this.state.pos,t),c=t.concat(e.id).join("");return V(oCe,{selected:u,skin:a,size:r,children:V("button",{"aria-label":l,"aria-selected":u||void 0,"aria-posinset":i,"aria-setsize":n.setsize,"data-keyboard":this.state.keyboard,title:this.props.previewPosition=="none"?e.name:void 0,type:"button",class:"flex flex-center flex-middle",tabindex:"-1",onClick:h=>this.handleEmojiClick({e:h,emoji:e}),onMouseEnter:()=>this.handleEmojiOver(t),onMouseLeave:()=>this.handleEmojiOver(),style:{width:this.props.emojiButtonSize,height:this.props.emojiButtonSize,fontSize:this.props.emojiSize,lineHeight:0},children:[V("div",{"aria-hidden":"true",class:"background",style:{borderRadius:this.props.emojiButtonRadius,backgroundColor:this.props.emojiButtonColors?this.props.emojiButtonColors[(i-1)%this.props.emojiButtonColors.length]:void 0}}),V(rO,{emoji:e,set:this.props.set,size:this.props.emojiSize,skin:a,spritesheet:!0,getSpritesheetURL:this.props.getSpritesheetURL})]})},c)}renderSearch(){const e=this.props.previewPosition=="none"||this.props.skinTonePosition=="search";return V("div",{children:[V("div",{class:"spacer"}),V("div",{class:"flex flex-middle",children:[V("div",{class:"search relative flex-grow",children:[V("input",{type:"search",ref:this.refs.searchInput,placeholder:Ki.search,onClick:this.handleSearchClick,onInput:this.handleSearchInput,onKeyDown:this.handleSearchKeyDown,autoComplete:"off"}),V("span",{class:"icon loupe flex",children:a1.search.loupe}),this.state.searchResults&&V("button",{title:"Clear","aria-label":"Clear",type:"button",class:"icon delete flex",onClick:this.clearSearch,onMouseDown:this.preventDefault,children:a1.search.delete})]}),e&&this.renderSkinToneButton()]})]})}renderSearchResults(){const{searchResults:e}=this.state;return e?V("div",{class:"category",ref:this.refs.search,children:[V("div",{class:`sticky padding-small align-${this.dir[0]}`,children:Ki.categories.search}),V("div",{children:e.length?e.map((t,i)=>V("div",{class:"flex",children:t.map((n,r)=>this.renderEmojiButton(n,{pos:[i,r],posinset:i*this.props.perLine+r+1,grid:e}))})):V("div",{class:`padding-small align-${this.dir[0]}`,children:this.props.onAddCustomEmoji&&V("a",{onClick:this.props.onAddCustomEmoji,children:Ki.add_custom})})})]}):null}renderCategories(){const{categories:e}=Ke,t=!!this.state.searchResults,i=this.getPerLine();return V("div",{style:{visibility:t?"hidden":void 0,display:t?"none":void 0,height:"100%"},children:e.map(n=>{const{root:r,rows:a}=this.refs.categories.get(n.id);return V("div",{"data-id":n.target?n.target.id:n.id,class:"category",ref:r,children:[V("div",{class:`sticky padding-small align-${this.dir[0]}`,children:n.name||Ki.categories[n.id]}),V("div",{class:"relative",style:{height:a.length*this.props.emojiButtonSize},children:a.map((o,l)=>{const u=o.index-o.index%bp.rowsPerRender,c=this.state.visibleRows[u],h="current"in o?o:void 0;if(!c&&!h)return null;const f=l*i,d=f+i,_=n.emojis.slice(f,d);return _.length{if(!g)return V("div",{style:{width:this.props.emojiButtonSize,height:this.props.emojiButtonSize}});const m=Dc.get(g);return this.renderEmojiButton(m,{pos:[o.index,p],posinset:o.posinset+p,grid:this.grid})})},o.index)})})]})})})}renderSkinToneButton(){return this.props.skinTonePosition=="none"?null:V("div",{class:"flex flex-auto flex-center flex-middle",style:{position:"relative",width:this.props.emojiButtonSize,height:this.props.emojiButtonSize},children:V("button",{type:"button",ref:this.refs.skinToneButton,class:"skin-tone-button flex flex-auto flex-center flex-middle","aria-selected":this.state.showSkins?"":void 0,"aria-label":Ki.skins.choose,title:Ki.skins.choose,onClick:this.openSkins,style:{width:this.props.emojiSize,height:this.props.emojiSize},children:V("span",{class:`skin-tone skin-tone-${this.state.skin}`})})})}renderLiveRegion(){const e=this.getEmojiByPos(this.state.pos),t=e?e.name:"";return V("div",{"aria-live":"polite",class:"sr-only",children:t})}renderSkins(){const t=this.refs.skinToneButton.current.getBoundingClientRect(),i=this.base.getBoundingClientRect(),n={};return this.dir=="ltr"?n.right=i.right-t.right-3:n.left=t.left-i.left-3,this.props.previewPosition=="bottom"&&this.props.skinTonePosition=="preview"?n.bottom=i.bottom-t.top+6:(n.top=t.bottom-i.top+3,n.bottom="auto"),V("div",{ref:this.refs.menu,role:"radiogroup",dir:this.dir,"aria-label":Ki.skins.choose,class:"menu hidden","data-position":n.top?"top":"bottom",style:n,children:[...Array(6).keys()].map(r=>{const a=r+1,o=this.state.skin==a;return V("div",{children:[V("input",{type:"radio",name:"skin-tone",value:a,"aria-label":Ki.skins[a],ref:o?this.refs.skinToneRadio:null,defaultChecked:o,onChange:()=>this.handleSkinMouseOver(a),onKeyDown:l=>{(l.code=="Enter"||l.code=="Space"||l.code=="Tab")&&(l.preventDefault(),this.handleSkinClick(a))}}),V("button",{"aria-hidden":"true",tabindex:"-1",onClick:()=>this.handleSkinClick(a),onMouseEnter:()=>this.handleSkinMouseOver(a),onMouseLeave:()=>this.handleSkinMouseOver(),class:"option flex flex-grow flex-middle",children:[V("span",{class:`skin-tone skin-tone-${a}`}),V("span",{class:"margin-small-lr",children:Ki.skins[a]})]})]})})})}render(){const e=this.props.perLine*this.props.emojiButtonSize;return V("section",{id:"root",class:"flex flex-column",dir:this.dir,style:{width:this.props.dynamicWidth?"100%":`calc(${e}px + (var(--padding) + var(--sidebar-width)))`},"data-emoji-set":this.props.set,"data-theme":this.state.theme,"data-menu":this.state.showSkins?"":void 0,children:[this.props.previewPosition=="top"&&this.renderPreview(),this.props.navPosition=="top"&&this.renderNav(),this.props.searchPosition=="sticky"&&V("div",{class:"padding-lr",children:this.renderSearch()}),V("div",{ref:this.refs.scroll,class:"scroll flex-grow padding-lr",children:V("div",{style:{width:this.props.dynamicWidth?"100%":e,height:"100%"},children:[this.props.searchPosition=="static"&&this.renderSearch(),this.renderSearchResults(),this.renderCategories()]})}),this.props.navPosition=="bottom"&&this.renderNav(),this.props.previewPosition=="bottom"&&this.renderPreview(),this.state.showSkins&&this.renderSkins(),this.renderLiveRegion()]})}constructor(e){super(),pn(this,"darkMediaCallback",()=>{this.props.theme=="auto"&&this.setState({theme:this.darkMedia.matches?"dark":"light"})}),pn(this,"handleClickOutside",t=>{const{element:i}=this.props;t.target!=i&&(this.state.showSkins&&this.closeSkins(),this.props.onClickOutside&&this.props.onClickOutside(t))}),pn(this,"handleBaseClick",t=>{this.state.showSkins&&(t.target.closest(".menu")||(t.preventDefault(),t.stopImmediatePropagation(),this.closeSkins()))}),pn(this,"handleBaseKeydown",t=>{this.state.showSkins&&t.key=="Escape"&&(t.preventDefault(),t.stopImmediatePropagation(),this.closeSkins())}),pn(this,"handleSearchClick",()=>{this.getEmojiByPos(this.state.pos)&&this.setState({pos:[-1,-1]})}),pn(this,"handleSearchInput",async()=>{const t=this.refs.searchInput.current;if(!t)return;const{value:i}=t,n=await Dc.search(i),r=()=>{this.refs.scroll.current&&(this.refs.scroll.current.scrollTop=0)};if(!n)return this.setState({searchResults:n,pos:[-1,-1]},r);const a=t.selectionStart==t.value.length?[0,0]:[-1,-1],o=[];o.setsize=n.length;let l=null;for(let u of n)(!o.length||l.length==this.getPerLine())&&(l=[],l.__categoryId="search",l.__index=o.length,o.push(l)),l.push(u);this.ignoreMouse(),this.setState({searchResults:o,pos:a},r)}),pn(this,"handleSearchKeyDown",t=>{const i=t.currentTarget;switch(t.stopImmediatePropagation(),t.key){case"ArrowLeft":this.navigate({e:t,input:i,left:!0});break;case"ArrowRight":this.navigate({e:t,input:i,right:!0});break;case"ArrowUp":this.navigate({e:t,input:i,up:!0});break;case"ArrowDown":this.navigate({e:t,input:i,down:!0});break;case"Enter":t.preventDefault(),this.handleEmojiClick({e:t,pos:this.state.pos});break;case"Escape":t.preventDefault(),this.state.searchResults?this.clearSearch():this.unfocusSearch();break}}),pn(this,"clearSearch",()=>{const t=this.refs.searchInput.current;t&&(t.value="",t.focus(),this.handleSearchInput())}),pn(this,"handleCategoryClick",({category:t,i})=>{this.scrollTo(i==0?{row:-1}:{categoryId:t.id})}),pn(this,"openSkins",t=>{const{currentTarget:i}=t,n=i.getBoundingClientRect();this.setState({showSkins:n},async()=>{await z2e(2);const r=this.refs.menu.current;r&&(r.classList.remove("hidden"),this.refs.skinToneRadio.current.focus(),this.base.addEventListener("click",this.handleBaseClick,!0),this.base.addEventListener("keydown",this.handleBaseKeydown,!0))})}),this.observers=[],this.state={pos:[-1,-1],perLine:this.initDynamicPerLine(e),visibleRows:{0:!0},...this.getInitialState(e)}}}class V2 extends K2e{async connectedCallback(){const e=fG(this.props,Ea,this);e.element=this,e.ref=t=>{this.component=t},await V0(e),!this.disconnected&&aG(V(lCe,{...e}),this.shadowRoot)}constructor(e){super(e,{styles:K9(vG)})}}pn(V2,"Props",Ea);typeof customElements<"u"&&!customElements.get("em-emoji-picker")&&customElements.define("em-emoji-picker",V2);var vG={};vG=`:host { width: min-content; height: 435px; min-height: 230px; border-radius: var(--border-radius); box-shadow: var(--shadow); --border-radius: 10px; --category-icon-size: 18px; --font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif; --font-size: 15px; --preview-placeholder-size: 21px; --preview-title-size: 1.1em; --preview-subtitle-size: .9em; --shadow-color: 0deg 0% 0%; --shadow: .3px .5px 2.7px hsl(var(--shadow-color) / .14), .4px .8px 1px -3.2px hsl(var(--shadow-color) / .14), 1px 2px 2.5px -4.5px hsl(var(--shadow-color) / .14); display: flex; } [data-theme="light"] { --em-rgb-color: var(--rgb-color, 34, 36, 39); --em-rgb-accent: var(--rgb-accent, 34, 102, 237); --em-rgb-background: var(--rgb-background, 255, 255, 255); --em-rgb-input: var(--rgb-input, 255, 255, 255); --em-color-border: var(--color-border, rgba(0, 0, 0, .05)); --em-color-border-over: var(--color-border-over, rgba(0, 0, 0, .1)); } [data-theme="dark"] { --em-rgb-color: var(--rgb-color, 222, 222, 221); --em-rgb-accent: var(--rgb-accent, 58, 130, 247); --em-rgb-background: var(--rgb-background, 21, 22, 23); --em-rgb-input: var(--rgb-input, 0, 0, 0); --em-color-border: var(--color-border, rgba(255, 255, 255, .1)); --em-color-border-over: var(--color-border-over, rgba(255, 255, 255, .2)); } #root { --color-a: rgb(var(--em-rgb-color)); --color-b: rgba(var(--em-rgb-color), .65); --color-c: rgba(var(--em-rgb-color), .45); --padding: 12px; --padding-small: calc(var(--padding) / 2); --sidebar-width: 16px; --duration: 225ms; --duration-fast: 125ms; --duration-instant: 50ms; --easing: cubic-bezier(.4, 0, .2, 1); width: 100%; text-align: left; border-radius: var(--border-radius); background-color: rgb(var(--em-rgb-background)); position: relative; } @media (prefers-reduced-motion) { #root { --duration: 0; --duration-fast: 0; --duration-instant: 0; } } #root[data-menu] button { cursor: auto; } #root[data-menu] .menu button { cursor: pointer; } :host, #root, input, button { color: rgb(var(--em-rgb-color)); font-family: var(--font-family); font-size: var(--font-size); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; line-height: normal; } *, :before, :after { box-sizing: border-box; min-width: 0; margin: 0; padding: 0; } .relative { position: relative; } .flex { display: flex; } .flex-auto { flex: none; } .flex-center { justify-content: center; } .flex-column { flex-direction: column; } .flex-grow { flex: auto; } .flex-middle { align-items: center; } .flex-wrap { flex-wrap: wrap; } .padding { padding: var(--padding); } .padding-t { padding-top: var(--padding); } .padding-lr { padding-left: var(--padding); padding-right: var(--padding); } .padding-r { padding-right: var(--padding); } .padding-small { padding: var(--padding-small); } .padding-small-b { padding-bottom: var(--padding-small); } .padding-small-lr { padding-left: var(--padding-small); padding-right: var(--padding-small); } .margin { margin: var(--padding); } .margin-r { margin-right: var(--padding); } .margin-l { margin-left: var(--padding); } .margin-small-l { margin-left: var(--padding-small); } .margin-small-lr { margin-left: var(--padding-small); margin-right: var(--padding-small); } .align-l { text-align: left; } .align-r { text-align: right; } .color-a { color: var(--color-a); } .color-b { color: var(--color-b); } .color-c { color: var(--color-c); } .ellipsis { white-space: nowrap; max-width: 100%; width: auto; text-overflow: ellipsis; overflow: hidden; } .sr-only { width: 1px; height: 1px; position: absolute; top: auto; left: -10000px; overflow: hidden; } a { cursor: pointer; color: rgb(var(--em-rgb-accent)); } a:hover { text-decoration: underline; } .spacer { height: 10px; } [dir="rtl"] .scroll { padding-left: 0; padding-right: var(--padding); } .scroll { padding-right: 0; overflow-x: hidden; overflow-y: auto; } .scroll::-webkit-scrollbar { width: var(--sidebar-width); height: var(--sidebar-width); } .scroll::-webkit-scrollbar-track { border: 0; } .scroll::-webkit-scrollbar-button { width: 0; height: 0; display: none; } .scroll::-webkit-scrollbar-corner { background-color: rgba(0, 0, 0, 0); } .scroll::-webkit-scrollbar-thumb { min-height: 20%; min-height: 65px; border: 4px solid rgb(var(--em-rgb-background)); border-radius: 8px; } .scroll::-webkit-scrollbar-thumb:hover { background-color: var(--em-color-border-over) !important; } .scroll:hover::-webkit-scrollbar-thumb { background-color: var(--em-color-border); } .sticky { z-index: 1; background-color: rgba(var(--em-rgb-background), .9); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); font-weight: 500; position: sticky; top: -1px; } [dir="rtl"] .search input[type="search"] { padding: 10px 2.2em 10px 2em; } [dir="rtl"] .search .loupe { left: auto; right: .7em; } [dir="rtl"] .search .delete { left: .7em; right: auto; } .search { z-index: 2; position: relative; } .search input, .search button { font-size: calc(var(--font-size) - 1px); } .search input[type="search"] { width: 100%; background-color: var(--em-color-border); transition-duration: var(--duration); transition-property: background-color, box-shadow; transition-timing-function: var(--easing); border: 0; border-radius: 10px; outline: 0; padding: 10px 2em 10px 2.2em; display: block; } .search input[type="search"]::-ms-input-placeholder { color: inherit; opacity: .6; } .search input[type="search"]::placeholder { color: inherit; opacity: .6; } .search input[type="search"], .search input[type="search"]::-webkit-search-decoration, .search input[type="search"]::-webkit-search-cancel-button, .search input[type="search"]::-webkit-search-results-button, .search input[type="search"]::-webkit-search-results-decoration { -webkit-appearance: none; -ms-appearance: none; appearance: none; } .search input[type="search"]:focus { background-color: rgb(var(--em-rgb-input)); box-shadow: inset 0 0 0 1px rgb(var(--em-rgb-accent)), 0 1px 3px rgba(65, 69, 73, .2); } .search .icon { z-index: 1; color: rgba(var(--em-rgb-color), .7); position: absolute; top: 50%; transform: translateY(-50%); } .search .loupe { pointer-events: none; left: .7em; } .search .delete { right: .7em; } svg { fill: currentColor; width: 1em; height: 1em; } button { -webkit-appearance: none; -ms-appearance: none; appearance: none; cursor: pointer; color: currentColor; background-color: rgba(0, 0, 0, 0); border: 0; } #nav { z-index: 2; padding-top: 12px; padding-bottom: 12px; padding-right: var(--sidebar-width); position: relative; } #nav button { color: var(--color-b); transition: color var(--duration) var(--easing); } #nav button:hover { color: var(--color-a); } #nav svg, #nav img { width: var(--category-icon-size); height: var(--category-icon-size); } #nav[dir="rtl"] .bar { left: auto; right: 0; } #nav .bar { width: 100%; height: 3px; background-color: rgb(var(--em-rgb-accent)); transition: transform var(--duration) var(--easing); border-radius: 3px 3px 0 0; position: absolute; bottom: -12px; left: 0; } #nav button[aria-selected] { color: rgb(var(--em-rgb-accent)); } #preview { z-index: 2; padding: calc(var(--padding) + 4px) var(--padding); padding-right: var(--sidebar-width); position: relative; } #preview .preview-placeholder { font-size: var(--preview-placeholder-size); } #preview .preview-title { font-size: var(--preview-title-size); } #preview .preview-subtitle { font-size: var(--preview-subtitle-size); } #nav:before, #preview:before { content: ""; height: 2px; position: absolute; left: 0; right: 0; } #nav[data-position="top"]:before, #preview[data-position="top"]:before { background: linear-gradient(to bottom, var(--em-color-border), transparent); top: 100%; } #nav[data-position="bottom"]:before, #preview[data-position="bottom"]:before { background: linear-gradient(to top, var(--em-color-border), transparent); bottom: 100%; } .category:last-child { min-height: calc(100% + 1px); } .category button { font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, sans-serif; position: relative; } .category button > * { position: relative; } .category button .background { opacity: 0; background-color: var(--em-color-border); transition: opacity var(--duration-fast) var(--easing) var(--duration-instant); position: absolute; top: 0; bottom: 0; left: 0; right: 0; } .category button:hover .background { transition-duration: var(--duration-instant); transition-delay: 0s; } .category button[aria-selected] .background { opacity: 1; } .category button[data-keyboard] .background { transition: none; } .row { width: 100%; position: absolute; top: 0; left: 0; } .skin-tone-button { border: 1px solid rgba(0, 0, 0, 0); border-radius: 100%; } .skin-tone-button:hover { border-color: var(--em-color-border); } .skin-tone-button:active .skin-tone { transform: scale(.85) !important; } .skin-tone-button .skin-tone { transition: transform var(--duration) var(--easing); } .skin-tone-button[aria-selected] { background-color: var(--em-color-border); border-top-color: rgba(0, 0, 0, .05); border-bottom-color: rgba(0, 0, 0, 0); border-left-width: 0; border-right-width: 0; } .skin-tone-button[aria-selected] .skin-tone { transform: scale(.9); } .menu { z-index: 2; white-space: nowrap; border: 1px solid var(--em-color-border); background-color: rgba(var(--em-rgb-background), .9); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); transition-property: opacity, transform; transition-duration: var(--duration); transition-timing-function: var(--easing); border-radius: 10px; padding: 4px; position: absolute; box-shadow: 1px 1px 5px rgba(0, 0, 0, .05); } .menu.hidden { opacity: 0; } .menu[data-position="bottom"] { transform-origin: 100% 100%; } .menu[data-position="bottom"].hidden { transform: scale(.9)rotate(-3deg)translateY(5%); } .menu[data-position="top"] { transform-origin: 100% 0; } .menu[data-position="top"].hidden { transform: scale(.9)rotate(3deg)translateY(-5%); } .menu input[type="radio"] { clip: rect(0 0 0 0); width: 1px; height: 1px; border: 0; margin: 0; padding: 0; position: absolute; overflow: hidden; } .menu input[type="radio"]:checked + .option { box-shadow: 0 0 0 2px rgb(var(--em-rgb-accent)); } .option { width: 100%; border-radius: 6px; padding: 4px 6px; } .option:hover { color: #fff; background-color: rgb(var(--em-rgb-accent)); } .skin-tone { width: 16px; height: 16px; border-radius: 100%; display: inline-block; position: relative; overflow: hidden; } .skin-tone:after { content: ""; mix-blend-mode: overlay; background: linear-gradient(rgba(255, 255, 255, .2), rgba(0, 0, 0, 0)); border: 1px solid rgba(0, 0, 0, .8); border-radius: 100%; position: absolute; top: 0; bottom: 0; left: 0; right: 0; box-shadow: inset 0 -2px 3px #000, inset 0 1px 2px #fff; } .skin-tone-1 { background-color: #ffc93a; } .skin-tone-2 { background-color: #ffdab7; } .skin-tone-3 { background-color: #e7b98f; } .skin-tone-4 { background-color: #c88c61; } .skin-tone-5 { background-color: #a46134; } .skin-tone-6 { background-color: #5d4437; } [data-index] { justify-content: space-between; } [data-emoji-set="twitter"] .skin-tone:after { box-shadow: none; border-color: rgba(0, 0, 0, .5); } [data-emoji-set="twitter"] .skin-tone-1 { background-color: #fade72; } [data-emoji-set="twitter"] .skin-tone-2 { background-color: #f3dfd0; } [data-emoji-set="twitter"] .skin-tone-3 { background-color: #eed3a8; } [data-emoji-set="twitter"] .skin-tone-4 { background-color: #cfad8d; } [data-emoji-set="twitter"] .skin-tone-5 { background-color: #a8805d; } [data-emoji-set="twitter"] .skin-tone-6 { background-color: #765542; } [data-emoji-set="google"] .skin-tone:after { box-shadow: inset 0 0 2px 2px rgba(0, 0, 0, .4); } [data-emoji-set="google"] .skin-tone-1 { background-color: #f5c748; } [data-emoji-set="google"] .skin-tone-2 { background-color: #f1d5aa; } [data-emoji-set="google"] .skin-tone-3 { background-color: #d4b48d; } [data-emoji-set="google"] .skin-tone-4 { background-color: #aa876b; } [data-emoji-set="google"] .skin-tone-5 { background-color: #916544; } [data-emoji-set="google"] .skin-tone-6 { background-color: #61493f; } [data-emoji-set="facebook"] .skin-tone:after { border-color: rgba(0, 0, 0, .4); box-shadow: inset 0 -2px 3px #000, inset 0 1px 4px #fff; } [data-emoji-set="facebook"] .skin-tone-1 { background-color: #f5c748; } [data-emoji-set="facebook"] .skin-tone-2 { background-color: #f1d5aa; } [data-emoji-set="facebook"] .skin-tone-3 { background-color: #d4b48d; } [data-emoji-set="facebook"] .skin-tone-4 { background-color: #aa876b; } [data-emoji-set="facebook"] .skin-tone-5 { background-color: #916544; } [data-emoji-set="facebook"] .skin-tone-6 { background-color: #61493f; } `;function oNe(s){const e=D.useRef(null),t=D.useRef(null);return t.current&&t.current.update(s),D.useEffect(()=>(t.current=new V2({...s,ref:e}),()=>{t.current=null}),[]),Bt.createElement("div",{ref:e})}var EG={exports:{}},uCe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",hCe=uCe,cCe=hCe;function yG(){}function TG(){}TG.resetWarningCache=yG;var fCe=function(){function s(i,n,r,a,o,l){if(l!==cCe){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}s.isRequired=s;function e(){return s}var t={array:s,bool:s,func:s,number:s,object:s,string:s,symbol:s,any:s,arrayOf:e,element:s,elementType:s,instanceOf:e,node:s,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:TG,resetWarningCache:yG};return t.PropTypes=t,t};EG.exports=fCe();var dCe=EG.exports;const Xi=nr(dCe);var _Ce=function s(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var i,n,r;if(Array.isArray(e)){if(i=e.length,i!=t.length)return!1;for(n=i;n--!==0;)if(!s(e[n],t[n]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(r=Object.keys(e),i=r.length,i!==Object.keys(t).length)return!1;for(n=i;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,r[n]))return!1;for(n=i;n--!==0;){var a=r[n];if(!s(e[a],t[a]))return!1}return!0}return e!==e&&t!==t};const gCe=nr(_Ce);var lO={exports:{}},IG;/** * @link https://github.com/gajus/sister for the canonical source repository * @license https://github.com/gajus/sister/blob/master/LICENSE BSD 3-Clause */IG=function(){var s={},e={};return s.on=function(t,i){var n={name:t,handler:i};return e[t]=e[t]||[],e[t].unshift(n),n},s.off=function(t){var i=e[t.name].indexOf(t);i!==-1&&e[t.name].splice(i,1)},s.trigger=function(t,i){var n=e[t],r;if(n)for(r=n.length;r--;)n[r].handler(i)},s};var pCe=IG,uO={exports:{}},mCe=function(e,t,i){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("script");typeof t=="function"&&(i=t,t={}),t=t||{},i=i||function(){},r.type=t.type||"text/javascript",r.charset=t.charset||"utf8",r.async="async"in t?!!t.async:!0,r.src=e,t.attrs&&vCe(r,t.attrs),t.text&&(r.text=""+t.text);var a="onload"in r?MD:ECe;a(r,i),r.onload||MD(r,i),n.appendChild(r)};function vCe(s,e){for(var t in e)s.setAttribute(t,e[t])}function MD(s,e){s.onload=function(){this.onerror=this.onload=null,e(null,s)},s.onerror=function(){this.onerror=this.onload=null,e(new Error("Failed to load "+this.src),s)}}function ECe(s,e){s.onreadystatechange=function(){this.readyState!="complete"&&this.readyState!="loaded"||(this.onreadystatechange=null,e(null,s))}}(function(s,e){Object.defineProperty(e,"__esModule",{value:!0});var t=mCe,i=n(t);function n(r){return r&&r.__esModule?r:{default:r}}e.default=function(r){var a=new Promise(function(o){if(window.YT&&window.YT.Player&&window.YT.Player instanceof Function){o(window.YT);return}else{var l=window.location.protocol==="http:"?"http:":"https:";(0,i.default)(l+"//www.youtube.com/iframe_api",function(c){c&&r.trigger("error",c)})}var u=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=function(){u&&u(),o(window.YT)}});return a},s.exports=e.default})(uO,uO.exports);var yCe=uO.exports,hO={exports:{}},cO={exports:{}},fO={exports:{}},og=1e3,lg=og*60,ug=lg*60,hg=ug*24,TCe=hg*365.25,ICe=function(s,e){e=e||{};var t=typeof s;if(t==="string"&&s.length>0)return RCe(s);if(t==="number"&&isNaN(s)===!1)return e.long?bCe(s):SCe(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))};function RCe(s){if(s=String(s),!(s.length>100)){var e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(s);if(e){var t=parseFloat(e[1]),i=(e[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return t*TCe;case"days":case"day":case"d":return t*hg;case"hours":case"hour":case"hrs":case"hr":case"h":return t*ug;case"minutes":case"minute":case"mins":case"min":case"m":return t*lg;case"seconds":case"second":case"secs":case"sec":case"s":return t*og;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}function SCe(s){return s>=hg?Math.round(s/hg)+"d":s>=ug?Math.round(s/ug)+"h":s>=lg?Math.round(s/lg)+"m":s>=og?Math.round(s/og)+"s":s+"ms"}function bCe(s){return Ap(s,hg,"day")||Ap(s,ug,"hour")||Ap(s,lg,"minute")||Ap(s,og,"second")||s+" ms"}function Ap(s,e,t){if(!(s=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}e.formatters.j=function(u){try{return JSON.stringify(u)}catch(c){return"[UnexpectedJSONParseError]: "+c.message}};function n(u){var c=this.useColors;if(u[0]=(c?"%c":"")+this.namespace+(c?" %c":" ")+u[0]+(c?"%c ":" ")+"+"+e.humanize(this.diff),!!c){var h="color: "+this.color;u.splice(1,0,h,"color: inherit");var f=0,d=0;u[0].replace(/%[a-zA-Z%]/g,function(_){_!=="%%"&&(f++,_==="%c"&&(d=f))}),u.splice(d,0,h)}}function r(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function a(u){try{u==null?e.storage.removeItem("debug"):e.storage.debug=u}catch{}}function o(){var u;try{u=e.storage.debug}catch{}return!u&&typeof process<"u"&&"env"in process&&(u=t.DEBUG),u}e.enable(o());function l(){try{return window.localStorage}catch{}}})(cO,cO.exports);var OCe=cO.exports,dO={exports:{}};(function(s,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=["cueVideoById","loadVideoById","cueVideoByUrl","loadVideoByUrl","playVideo","pauseVideo","stopVideo","getVideoLoadedFraction","cuePlaylist","loadPlaylist","nextVideo","previousVideo","playVideoAt","setShuffle","setLoop","getPlaylist","getPlaylistIndex","setOption","mute","unMute","isMuted","setVolume","getVolume","seekTo","getPlayerState","getPlaybackRate","setPlaybackRate","getAvailablePlaybackRates","getPlaybackQuality","setPlaybackQuality","getAvailableQualityLevels","getCurrentTime","getDuration","removeEventListener","getVideoUrl","getVideoEmbedCode","getOptions","getOption","addEventListener","destroy","setSize","getIframe"],s.exports=e.default})(dO,dO.exports);var wCe=dO.exports,_O={exports:{}};(function(s,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=["ready","stateChange","playbackQualityChange","playbackRateChange","error","apiChange","volumeChange"],s.exports=e.default})(_O,_O.exports);var CCe=_O.exports,gO={exports:{}},pO={exports:{}};(function(s,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={BUFFERING:3,ENDED:0,PAUSED:2,PLAYING:1,UNSTARTED:-1,VIDEO_CUED:5},s.exports=e.default})(pO,pO.exports);var MCe=pO.exports;(function(s,e){Object.defineProperty(e,"__esModule",{value:!0});var t=MCe,i=n(t);function n(r){return r&&r.__esModule?r:{default:r}}e.default={pauseVideo:{acceptableStates:[i.default.ENDED,i.default.PAUSED],stateChangeRequired:!1},playVideo:{acceptableStates:[i.default.ENDED,i.default.PLAYING],stateChangeRequired:!1},seekTo:{acceptableStates:[i.default.ENDED,i.default.PLAYING,i.default.PAUSED],stateChangeRequired:!0,timeout:3e3}},s.exports=e.default})(gO,gO.exports);var NCe=gO.exports;(function(s,e){Object.defineProperty(e,"__esModule",{value:!0});var t=OCe,i=c(t),n=wCe,r=c(n),a=CCe,o=c(a),l=NCe,u=c(l);function c(d){return d&&d.__esModule?d:{default:d}}var h=(0,i.default)("youtube-player"),f={};f.proxyEvents=function(d){var _={},g=function(C){var N="on"+C.slice(0,1).toUpperCase()+C.slice(1);_[N]=function(P){h('event "%s"',N,P),d.trigger(C,P)}},p=!0,m=!1,v=void 0;try{for(var E=o.default[Symbol.iterator](),y;!(p=(y=E.next()).done);p=!0){var T=y.value;g(T)}}catch(w){m=!0,v=w}finally{try{!p&&E.return&&E.return()}finally{if(m)throw v}}return _},f.promisifyPlayer=function(d){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,g={},p=function(N){_&&u.default[N]?g[N]=function(){for(var P=arguments.length,k=Array(P),L=0;L1&&arguments[1]!==void 0?arguments[1]:{},d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,_=(0,n.default)();if(c||(c=(0,a.default)(_)),f.events)throw new Error("Event handlers cannot be overwritten.");if(typeof h=="string"&&!document.getElementById(h))throw new Error('Element "'+h+'" does not exist.');f.events=l.default.proxyEvents(_);var g=new Promise(function(m){if((typeof h>"u"?"undefined":t(h))==="object"&&h.playVideo instanceof Function){var v=h;m(v)}else c.then(function(E){var y=new E.Player(h,f);return _.on("ready",function(){m(y)}),null})}),p=l.default.promisifyPlayer(g,d);return p.on=_.on,p.off=_.off,p},s.exports=e.default})(lO,lO.exports);var kCe=lO.exports;const xCe=nr(kCe);function em(s){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?em=function(t){return typeof t}:em=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},em(s)}function DCe(s,e){if(!(s instanceof e))throw new TypeError("Cannot call a class as a function")}function LCe(s,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function l1(s){return l1=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},l1(s)}function ND(s,e){var t=Object.keys(s);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(s);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(s,n).enumerable})),t.push.apply(t,i)}return t}function Hh(s){for(var e=1;e"u")){var r=Hh(Hh({},n.props.opts),{},{videoId:n.props.videoId});n.internalPlayer=xCe(n.container,r),n.internalPlayer.on("ready",n.onPlayerReady),n.internalPlayer.on("error",n.onPlayerError),n.internalPlayer.on("stateChange",n.onPlayerStateChange),n.internalPlayer.on("playbackRateChange",n.onPlayerPlaybackRateChange),n.internalPlayer.on("playbackQualityChange",n.onPlayerPlaybackQualityChange)}}),Vs(_n(n),"resetPlayer",function(){return n.internalPlayer.destroy().then(n.createPlayer)}),Vs(_n(n),"updatePlayer",function(){n.internalPlayer.getIframe().then(function(r){n.props.id?r.setAttribute("id",n.props.id):r.removeAttribute("id"),n.props.className?r.setAttribute("class",n.props.className):r.removeAttribute("class"),n.props.opts&&n.props.opts.width?r.setAttribute("width",n.props.opts.width):r.removeAttribute("width"),n.props.opts&&n.props.opts.height?r.setAttribute("height",n.props.opts.height):r.removeAttribute("height"),typeof n.props.title=="string"?r.setAttribute("title",n.props.title):r.setAttribute("title","YouTube video player")})}),Vs(_n(n),"getInternalPlayer",function(){return n.internalPlayer}),Vs(_n(n),"updateVideo",function(){if(typeof n.props.videoId>"u"||n.props.videoId===null){n.internalPlayer.stopVideo();return}var r=!1,a={videoId:n.props.videoId};if("playerVars"in n.props.opts&&(r=n.props.opts.playerVars.autoplay===1,"start"in n.props.opts.playerVars&&(a.startSeconds=n.props.opts.playerVars.start),"end"in n.props.opts.playerVars&&(a.endSeconds=n.props.opts.playerVars.end)),r){n.internalPlayer.loadVideoById(a);return}n.internalPlayer.cueVideoById(a)}),Vs(_n(n),"refContainer",function(r){n.container=r}),n.container=null,n.internalPlayer=null,n}return UCe(t,[{key:"componentDidMount",value:function(){this.createPlayer()}},{key:"componentDidUpdate",value:function(n){HCe(n,this.props)&&this.updatePlayer(),zCe(n,this.props)&&this.resetPlayer(),jCe(n,this.props)&&this.updateVideo()}},{key:"componentWillUnmount",value:function(){this.internalPlayer.destroy()}},{key:"render",value:function(){return Bt.createElement("div",{className:this.props.containerClassName},Bt.createElement("div",{id:this.props.id,className:this.props.className,ref:this.refContainer,loading:this.props.loading}))}}]),t}(Bt.Component);Vs(j2,"PlayerState",{UNSTARTED:-1,ENDED:0,PLAYING:1,PAUSED:2,BUFFERING:3,CUED:5});j2.propTypes={videoId:Xi.string,id:Xi.string,className:Xi.string,containerClassName:Xi.string,title:Xi.string,loading:Xi.oneOf(["lazy","eager","auto"]),opts:Xi.objectOf(Xi.any),onReady:Xi.func,onError:Xi.func,onPlay:Xi.func,onPause:Xi.func,onEnd:Xi.func,onStateChange:Xi.func,onPlaybackRateChange:Xi.func,onPlaybackQualityChange:Xi.func};j2.defaultProps={videoId:null,id:null,className:null,loading:null,opts:{},containerClassName:"",onReady:function(){},onError:function(){},onPlay:function(){},onPause:function(){},onEnd:function(){},onStateChange:function(){},onPlaybackRateChange:function(){},onPlaybackQualityChange:function(){},title:null};export{fw as $,oe as A,Mge as B,z_ as C,L_e as D,fn as E,pMe as F,a_e as G,Jc as H,Vge as I,Cge as J,Nge as K,Xme as L,ue as M,ce as N,Ye as O,Fs as P,No as Q,b as R,Wc as S,AP as T,pR as U,M as V,Hv as W,U_ as X,gv as Y,tEe as Z,K$ as _,dMe as a,Hde as a$,Xc as a0,YCe as a1,tMe as a2,sMe as a3,ga as a4,fMe as a5,qMe as a6,ehe as a7,the as a8,ihe as a9,le as aA,Kde as aB,Uoe as aC,Loe as aD,tle as aE,Joe as aF,ele as aG,qoe as aH,Zoe as aI,nle as aJ,Xoe as aK,yde as aL,Woe as aM,jhe as aN,Goe as aO,Boe as aP,Poe as aQ,koe as aR,rQ as aS,zde as aT,jde as aU,ps as aV,__e as aW,d6 as aX,e_e as aY,Qde as aZ,Xde as a_,Nde as aa,Ooe as ab,Bde as ac,Km as ad,RF as ae,Bce as af,xce as ag,Lce as ah,Zhe as ai,Dce as aj,nce as ak,hoe as al,Ihe as am,Vce as an,Hce as ao,Gce as ap,Voe as aq,foe as ar,$he as as,jce as at,coe as au,uoe as av,Uce as aw,Yce as ax,Pr as ay,BS as az,SMe as b,whe as b$,ck as b0,Ae as b1,PS as b2,Ple as b3,xle as b4,z_e as b5,Cle as b6,Ile as b7,Rle as b8,ble as b9,Toe as bA,Xce as bB,ime as bC,sme as bD,uhe as bE,lhe as bF,Gpe as bG,Vpe as bH,poe as bI,goe as bJ,voe as bK,ZP as bL,fhe as bM,dhe as bN,_he as bO,ghe as bP,phe as bQ,zpe as bR,The as bS,yhe as bT,Rhe as bU,JP as bV,She as bW,uS as bX,bhe as bY,Ahe as bZ,Ohe as b_,A4 as ba,yle as bb,W_e as bc,j_e as bd,$_e as be,V_e as bf,B_e as bg,F_e as bh,X_e as bi,kle as bj,K_e as bk,Xle as bl,Dle as bm,Kle as bn,O4 as bo,lge as bp,w4 as bq,Sge as br,ype as bs,xue as bt,Que as bu,gpe as bv,Pue as bw,Nue as bx,kue as by,Mue as bz,UMe as c,y1e as c$,Mhe as c0,Nhe as c1,Phe as c2,khe as c3,xhe as c4,Kpe as c5,qpe as c6,Jpe as c7,$pe as c8,tme as c9,Sce as cA,kce as cB,Pce as cC,pce as cD,Ece as cE,nS as cF,gfe as cG,Ice as cH,Rce as cI,Ide as cJ,Rde as cK,iS as cL,Sde as cM,rEe as cN,nEe as cO,wce as cP,hv as cQ,Qm as cR,ER as cS,ft as cT,Se as cU,Ve as cV,Bu as cW,u4 as cX,F$ as cY,Qt as cZ,se as c_,Xpe as ca,Qhe as cb,Xhe as cc,ece as cd,Khe as ce,Yhe as cf,qhe as cg,yoe as ch,Eoe as ci,Mce as cj,hce as ck,Qme as cl,$me as cm,Av as cn,mR as co,dF as cp,pfe as cq,He as cr,Tfe as cs,Qc as ct,Ife as cu,L4 as cv,DS as cw,NS as cx,MS as cy,Tce as cz,Te as d,yfe as d$,Wr as d0,Afe as d1,Xm as d2,k_e as d3,gle as d4,ple as d5,vle as d6,mle as d7,N_e as d8,x_e as d9,R1e as dA,T1e as dB,Hfe as dC,Gfe as dD,Vfe as dE,jfe as dF,Dae as dG,U1e as dH,xae as dI,B1e as dJ,kae as dK,F1e as dL,LR as dM,PR as dN,xR as dO,$m as dP,yt as dQ,e1e as dR,MP as dS,OP as dT,KR as dU,cv as dV,H_ as dW,Bm as dX,mTe as dY,xl as dZ,yR as d_,Zm as da,TR as db,c1e as dc,Cfe as dd,Ofe as de,wfe as df,U_e as dg,_1e as dh,Bw as di,d1e as dj,V1e as dk,W1e as dl,Do as dm,RA as dn,Uh as dp,ro as dq,Jm as dr,kfe as ds,n1e as dt,bfe as du,f1e as dv,I1e as dw,Ffe as dx,Ufe as dy,Lfe as dz,Sa as e,Fhe as e$,Po as e0,Cce as e1,tt as e2,Nh as e3,T6 as e4,so as e5,no as e6,S4 as e7,w1e as e8,KMe as e9,Gde as eA,Vde as eB,Coe as eC,Moe as eD,d_e as eE,Hoe as eF,vMe as eG,EMe as eH,PMe as eI,wMe as eJ,_Me as eK,gMe as eL,RMe as eM,Q1e as eN,ile as eO,o_e as eP,g_e as eQ,nde as eR,j1e as eS,Qs as eT,Zde as eU,lle as eV,ole as eW,DMe as eX,v_e as eY,ZR as eZ,Hhe as e_,nMe as ea,$Me as eb,rMe as ec,Mo as ed,Dde as ee,JMe as ef,ZMe as eg,eEe as eh,n6 as ei,VMe as ej,GMe as ek,TMe as el,che as em,Ade as en,xde as eo,Roe as ep,Ioe as eq,boe as er,Qoe as es,Ude as et,Fde as eu,bMe as ev,KCe as ew,CMe as ex,MMe as ey,NMe as ez,_k as f,wpe as f$,gme as f0,dme as f1,lme as f2,fme as f3,ame as f4,zhe as f5,Uhe as f6,$1e as f7,hde as f8,u_e as f9,Uge as fA,Fge as fB,wge as fC,hue as fD,Age as fE,bge as fF,Dge as fG,fue as fH,Bge as fI,fd as fJ,gue as fK,Pge as fL,due as fM,cue as fN,qP as fO,Ige as fP,Rge as fQ,kge as fR,xge as fS,Oge as fT,Gge as fU,_ue as fV,bpe as fW,Spe as fX,Ape as fY,Ppe as fZ,Xue as f_,y_e as fa,Ghe as fb,hme as fc,_me as fd,Bfe as fe,ib as ff,b1e as fg,S1e as fh,oMe as fi,IMe as fj,uMe as fk,aMe as fl,lMe as fm,A1e as fn,tb as fo,ab as fp,G_e as fq,Ale as fr,H_e as fs,q_e as ft,Y_e as fu,Z_e as fv,uge as fw,sge as fx,cge as fy,Lge as fz,U as g,Ime as g$,Ipe as g0,Rpe as g1,Npe as g2,Cpe as g3,QP as g4,tfe as g5,Gue as g6,jue as g7,P4 as g8,Yue as g9,FMe as gA,Qpe as gB,Zpe as gC,jpe as gD,k4 as gE,ice as gF,Tme as gG,Jhe as gH,Tb as gI,bme as gJ,Eme as gK,Whe as gL,vme as gM,yb as gN,kme as gO,Pme as gP,vv as gQ,rce as gR,Rme as gS,mme as gT,Ome as gU,Nme as gV,Ame as gW,ja as gX,wme as gY,Sme as gZ,sce as g_,Wue as ga,Hue as gb,M4 as gc,N4 as gd,zue as ge,_2e as gf,gk as gg,iNe as gh,bde as gi,aEe as gj,ppe as gk,Uw as gl,Pde as gm,doe as gn,kde as go,lpe as gp,rpe as gq,ape as gr,ope as gs,hpe as gt,Noe as gu,Wde as gv,rfe as gw,Lve as gx,Dhe as gy,nme as gz,WCe as h,AR as h$,tce as h0,yme as h1,Gme as h2,kMe as h3,mve as h4,Yme as h5,L1e as h6,bve as h7,cve as h8,Ave as h9,p_e as hA,h_e as hB,rle as hC,CS as hD,pue as hE,yMe as hF,mMe as hG,g2e as hH,IR as hI,jme as hJ,sfe as hK,s1e as hL,BTe as hM,XCe as hN,o1e as hO,YS as hP,CP as hQ,a6 as hR,sNe as hS,nNe as hT,rNe as hU,ef as hV,PF as hW,$F as hX,fR as hY,DR as hZ,UR as h_,aS as ha,tde as hb,$ve as hc,Yfe as hd,Jve as he,Qve as hf,qfe as hg,Xfe as hh,Kfe as hi,t1e as hj,KF as hk,qve as hl,WF as hm,Zfe as hn,i1e as ho,X9 as hp,jMe as hq,AMe as hr,LMe as hs,cMe as ht,YMe as hu,XMe as hv,dve as hw,lve as hx,uve as hy,Bme as hz,Es as i,fde as i0,iEe as i1,OMe as i2,M1e as i3,eme as i4,hMe as i5,xMe as i6,BMe as i7,C1e as i8,N1e as i9,$Ce as iA,QCe as iB,ZCe as iC,qCe as iD,qm as iE,gF as iF,Y6 as iG,dde as iH,gde as iI,HMe as iJ,zMe as iK,WMe as iL,oEe as iM,uEe as iN,lEe as iO,hEe as iP,Su as iQ,_de as iR,wh as iS,wn as iT,bn as iU,Ao as iV,q7 as iW,mfe as ia,Zve as ib,bR as ic,oNe as id,aNe as ie,QMe as ig,l1e as ih,lce as ii,ace as ij,oce as ik,xme as il,g1e as im,O1e as io,Rfe as ip,j2 as iq,OOe as ir,Ove as is,pve as it,Mh as iu,Ui as iv,ITe as iw,mk as ix,JCe as iy,eMe as iz,vt as j,Qn as k,kt as l,St as m,IP as n,kr as o,_s as p,hd as q,D as r,Pe as s,u1e as t,dR as u,Ra as v,li as w,$c as x,Hp as y,nv as z};