swf2es 0.1.25 → 0.1.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/worker.js CHANGED
@@ -12,5 +12,5 @@ ${A}
12
12
  `)();i=BM(A).includes(wy)}catch{i=!0}return i}()||"refused"===wp||"u"<typeof document)return{factory:wF(t,e),script:e};if(wM)return wM.then(()=>A(t,e));let g=async function(A,t){let e=await async function(A){let t,e=`"use strict";document.currentScript.${wJ}=${wR(A)}
13
13
  `,g=URL.createObjectURL(new Blob([e],{type:"text/javascript"})),i=document.createElement("script");try{t=await new Promise(A=>{let t=setTimeout(()=>A(!1),5e3),e=e=>{clearTimeout(t),A(e)};i.onload=()=>e(!0),i.onerror=()=>e(!1);try{i.src=g,(document.head??document.documentElement).append(i)}catch{e(!1)}})}finally{i.remove(),URL.revokeObjectURL(g)}let I=i[wJ];return t&&"function"==typeof I?{factory:I,script:g}:null}(A);if(e)return wp="allowed",e;let g=wF(A,t);return wp="refused",{factory:g,script:t}}(t,e);return"untried"===wp&&(wM=g.then(()=>{wM=null},()=>{wM=null})),g}(Q,I),r=A=>({...A,lazy:g,epoch:B});return C instanceof Promise?C.then(r):r(C)};if(!e){let e=!t&&this.s.lazyCompilation&&FM()?null:this.handover?.take(A,this.hashes);if(e){if(void 0!==e.url)return this.importHanded(e);let A=e.module;return"string"==typeof A||void 0===A?g(A??"",!1):A.text().then(A=>g(A,!1))}}if(!e?.cached)return g(e?.module,e?.lazy??(!t&&this.s.lazyCompilation&&FM()));if(e.imported)return{factory:e.imported.factory,script:e.imported.url,cached:!0};let I=()=>(this.refused(A),this.discard(e.key,e.entry),g());try{let A=g(e.module,!1);return A instanceof Promise?A.then(A=>({...A,cached:!0}),I):{...A,cached:!0}}catch{return I()}}loadAt(A,t,e,g,i,I){var B,Q,C;let r,s=g.script,o=g.lazy?(B=this.s,Q=s,C=g.epoch,(e,g)=>{if(B.codegen.epoch!==C)throw Error("the compiler was reset before a deferred method was compiled");let i=B.codegen.compileMethods([e],A).get(e);if(void 0===i)throw Error(`a deferred method has no compiled entry: ${e}`);let I=Function("rt","nn","ac","ns","cls","N","S","M","V","F","A",`"use strict"; return ${i}
14
14
  //# sourceURL=${Q}/$f${e}.js
15
- `),r=B.rt.loadInto(t,()=>I(...g));return(...A)=>{let t=r(...A);return Fp.set(t,g[10]),t}}):void 0,n=A=>this.s.rt.loadInto(t,()=>A(this.s.rt,o),e);if(g.cached&&i){let e=t.own.length;try{r=n(g.factory)}catch(g){if(this.discard(i.key,i.entry),t.own.length!==e)throw g;this.refused(A),s=`swf2es-${++this.modules}.js`,r=n(wF(this.s.codegen.compileModule(this.hashes,A),s))}}else r=n(g.factory);if(e&&this.libraryScripts.add(s),I){let A=r;this.moduleAbcs.set(s,new WeakRef(A)),this.origins.set(A,I),this.loadedUrls.add(I.url),this.moduleGone.register(A,s)}return r}compileNow(A,t){let e=this.s.codegen;if(t){let t=e.compileLazyModule(this.hashes,A);return this.journal(`lazy ${A}`),t}if(this.recorder?.open){let{module:t,log:g}=e.compileModuleLogged(this.hashes,A);return this.recorded(A,{text:t},g),t}let g=e.compileModule(this.hashes,A);return this.journal(`compile ${A}`),g}async importHanded(A){let t=this.uniqueUrl(A.url),e=(await import(t)).default;if("function"!=typeof e)throw Error(`swf2es: ${A.url} is no module the player wrote`);return{factory:e,script:t,cached:!0}}cache(){return null===this.s.codegen.identity?null:this.s.moduleCache}async prepare(A){let t=this.cache(),e=[];await this.digestLibraries(A[0]);let g=t?.minBytes??FN;for(let i of A){let A,I=!this.builtins[i]&&this.s.lazyCompilation&&FM();if(this.sizes[i]<g){let A=this.compileNow(i,I);e.push({module:A,key:null,cached:!1,lazy:I});continue}let B=this.moduleKey(i);for(let e=0;t&&null!==B&&e<3;e++){let e=this.s.codegen.revision(),g=B;try{A=await async function(A,t,e){for(let g=0;g<2;g++){let g=await A.get(t);if(void 0===g)break;if("string"==typeof g.log&&Array.isArray(g.lengths)&&g.lengths[1]===g.log.length&&(void 0===g.url?"string"==typeof g.module&&g.lengths[0]===g.module.length:"string"==typeof g.url)){if(void 0===g.url)return{entry:g};try{let A=e(g.url),t=(await import(A)).default;if("function"==typeof t)return{entry:g,imported:{factory:t,url:A}}}catch{}}try{await A.delete(t,g)}catch{break}}}(t,await FS(g),A=>this.uniqueUrl(A))}catch{A=void 0}if(this.s.codegen.revision()===e||(B=this.moduleKey(i))===g)break;A=void 0}let Q=!1;if(null!==B&&void 0!==A){let{entry:t,imported:g}=A;if(this.s.codegen.replay(t.log,i)){this.recorded(i,void 0===t.url?{text:t.module}:{url:t.url},t.log),e.push({module:t.module,key:B,cached:!0,entry:t,imported:g});continue}this.unmodelled(),Q=!0,this.discard(B,t)}if(I){e.push({module:this.compileNow(i,!0),key:B,cached:!1,lazy:!0});continue}let{module:C,log:r}=this.s.codegen.compileModuleLogged(this.hashes,i);this.recorded(i,{text:C},r),null===r||Q||this.store(B,C,r),e.push({module:C,key:B,cached:!1})}return e}store(A,t,e){let g=this.cache();if(g&&null!==A){let i={module:t,log:e,lengths:[t.length,e.length]};FS(A).then(A=>g.put(A,i)).catch(()=>{})}}discard(A,t){let e=this.cache();e&&null!==A&&FS(A).then(A=>e.delete(A,t)).catch(()=>{})}async digestLibraries(A){var t;let e=this.libraryCount,g=this.s.codegen.epoch;if(null===e||void 0===A||this.libraryLog?.epoch===g)return;let i=await FS((t=this.s.codegen,t.context(A,0,e)?.log??""));this.libraryLog={epoch:g,digest:i}}moduleKey(A){var t,e;let g,i=null!==this.libraryCount&&this.libraryLog?.epoch===this.s.codegen.epoch?{count:this.libraryCount,digest:this.libraryLog.digest}:null;return t=this.s.codegen,e={hashes:this.hashes,builtins:this.builtins},(g=t.context(A,i?.count??0))?JSON.stringify({compiler:t.identity,api:t.apiVersion,abcs:g.abcs.map(A=>`${e.builtins[A]?"builtin ":""}${e.hashes[A]}`),own:g.own,libraries:i,log:g.log}):null}applicationDomainOf(A){let t=this.s.rt.classNamed("flash.system::ApplicationDomain").$it.instance();return t.$domain=A,t}codeDomain(){let A=this.s.rt.codeDomain();return A===this.s.rt.root?this.s.mainDomain:A}codeUrl(){return this.codeOrigin(Error().stack)?.url??this.s.url}callerUrl(A){let t=Fb(),e=null===t?null:function(A,t,e,g){if(!A.split("\n").some(A=>/^\s*at /.test(A)))return null;let i=BR(A),I=i.map(A=>null===A?null:By(A)),B=A=>null!=A&&e.isModule(A)&&!e.isLibrary(A);if(I.length<=t||I.slice(0,t).some(A=>null===A||e.isModule(A)))return null;let Q=t;for(;Q<I.length&&e.isLibrary(I[Q]??"");)Q++;if(B(I[Q]))return I[Q];if(Q>t&&g?.every((A,t)=>i[Q+t]===A)){let A=I[Q+g.length];return B(A)?A:null}return null}(t,2+A,{isModule:A=>this.isModule(A),isLibrary:A=>this.libraryScripts.has(A)},this.byNameChain());if(null===e)return null;let g=this.moduleAbcs.get(e)?.deref();return(g&&this.origins.get(g)?.url)??null}byName;byNameChain(){if(void 0!==this.byName)return this.byName;let A=null,t={proto:{[Bd(0)]:()=>{A=Fb()}}};this.s.rt.call(this.s.rt.methodClosure(void 0,t,0),null);let e=null===A?[]:BR(A),g=void 0===e[0]||null===e[0]?null:By(e[0]),i=e.slice(2,5),I=null!==g&&3===i.length&&i.every(A=>null!==A&&!this.isModule(By(A)??""))&&null!==e[1]&&By(e[1]??"")===g&&By(e[5]??"")===g;return this.byName=I?i:null,this.byName}isModule(A){return this.libraryScripts.has(A)||this.moduleAbcs.has(A)}everUrls(){return[...new Set([this.s.url,...this.loadedUrls])]}securityUrls(A){let t=this.callerUrl(A+1);return null===t?this.everUrls():[t]}codeLibrary(){return this.codeOrigin(Error().stack)?.library??this.s.library}runningLibrary(){let A=Error,t=A.stackTraceLimit;A.stackTraceLimit=48;let e=Error().stack;return A.stackTraceLimit=t,this.codeOrigin(e)?.library??null}calledLibrary(A,t){let e=this.s.rt.moduleOf(A),g=e&&this.origins.get(e);if(g)return g.library;let i=t?.$jsError,I=null;for(let A of i instanceof Error?BM(i.stack):[]){let t=this.moduleAbcs.get(A)?.deref();I=(t&&this.origins.get(t)?.library)??I}return I}codeOrigin(A){for(let t of BM(A)){let A=this.moduleAbcs.get(t)?.deref(),e=A&&this.origins.get(A);if(e)return e}}}let FN=8192;function FS(A){return G7(FJ.encode(A))}function Fb(){let A=Error,t=A.stackTraceLimit;try{A.stackTraceLimit=1/0}catch{return null}try{return 1/0===A.stackTraceLimit?Error().stack??null:null}finally{A.stackTraceLimit=t}}class FU{s;host;state="normal";sourceRect=null;drawn=null;mouseLock=!1;asked=0;constructor(A,t){this.s=A,this.host=t}get active(){return"normal"!==this.state}get rect(){return this.active?this.drawn:null}set(A){let t=this.host;if(A===this.state||!t)return;if("normal"===A){this.asked++,t.exit(),this.change(A);return}let e="fullScreenInteractive"===A;if(this.active){if(!t.allowed(e))throw this.s.rt.error("SecurityError",2152);this.state=A;return}if(!t.allowed(e)||!t.request(e))throw this.s.rt.error("SecurityError",2152);this.asked++,this.change(A)}setSourceRect(A){this.sourceRect=A,(!A||A.width>0&&A.height>0)&&(this.drawn=A),this.active&&this.s.onStageLayout?.()}hostChanged(A){A!==this.active&&this.change(A?"fullScreen":"normal")}change(A){let t=this.s;t.onStageLayout?.(),this.state=A,this.active||(this.mouseLock=!1);let e=t.stage?.object;if(e&&cH(e,"fullScreen")){let g=!t.air&&"fullScreenInteractive"===A;cL(t,e,t.rt.construct(t.rt.classNamed("flash.events::FullScreenEvent"),"fullScreen",!1,!1,this.active,g))}t.onStageLayout?.()}}class FY{s;orphans=new Map;madeThisFrame=[];leaving=new Map;constructor(A){this.s=A}get fresh(){return this.madeThisFrame}onStage(A){for(let t=A;t;t=t.parent)if(t===this.s.stage)return!0;return!1}added(A){this.dropOrphan(A.serial),this.dispatch(A.object,"added",!0),this.onStage(A)&&this.eachObject(A,A=>this.dispatch(A,"addedToStage",!1))}rootConstructed(A){this.dispatch(A.object,"added",!0),this.onStage(A)&&this.dispatch(A.object,"addedToStage",!1)}removing(A,t=!1){let e=A.parent?.object;if(this.orphan(A,!t),t?this.telling(A,2025):this.tell(A),t&&e&&A.timelineNamed){let t=iV(iY,A.name);this.s.rt.getProperty(e,t)===A.object&&this.s.rt.setProperty(e,t,null)}}remove(A){let t=this.leaving.get(A);if(void 0!==t)throw this.s.rt.error(2025===t?"ArgumentError":"Error",t);this.telling(A,2094),this.orphan(A),A.parent?.removeChild(A)}telling(A,t){if(this.leaving.has(A))return void this.tell(A);this.leaving.set(A,t);try{this.tell(A)}finally{this.leaving.delete(A)}}tell(A){this.dispatch(A.object,"removed",!0),this.onStage(A)&&this.eachObject(A,A=>this.dispatch(A,"removedFromStage",!1))}orphan(A,t=!0){if(A.object&&!this.orphans.has(A.serial)){let e=A.serial,g={serial:e,ref:A.ref,keep:t,since:this.s.frames,due:A.scriptsDue,advances:A.advanceDue};this.orphans.set(e,g),A.orphanEntry=g,this.sortedOrphans=null,oq.changes++,o$.watch?.orphaned(A)}}made(A){this.madeThisFrame.push(A),oq.changes++,A instanceof EN&&(A.fresh=!0)}sortedOrphans=null;dropOrphan(A){let t=this.orphans.get(A);if(void 0!==t){this.orphans.delete(A),this.sortedOrphans=null;let e=null!==o$.watch?t.ref.deref():void 0;void 0!==e&&o$.watch?.unorphaned(e)}}eachOrphanRoot(A,t=!1,e=!1){let g=this.sortedOrphans;g||((g=[...this.orphans.values()]).sort((A,t)=>t.serial-A.serial),this.sortedOrphans=g);for(let i=0;i<g.length;i++){if(t&&!g[i].due||e&&!g[i].advances)continue;let I=g[i].ref.deref();if(!I){this.dropOrphan(g[i].serial);continue}A(I)}}hearsFrames(A){if(A.object){let t=this.s.broadcastSets;for(let e=0;e<t.length;e++)if(t[e].has(A.object))return!0}let t=A.frameChildren;for(let A=0;A<t.length;A++)if(this.hearsFrames(t[A]))return!0;return!1}stopAll(A){this.dropOrphan(A.serial),we(this.s,A);let t=A=>{if(A instanceof EN&&(A.playing=!1),A.object)for(let t of this.s.broadcasts.values())t.delete(A.object);if(A instanceof ng)for(let e of A.children)t(e)};t(A)}dispatch(A,t,e){A&&cH(A,t)&&cK(this.s,A,this.s.event(t,e))}eachObject(A,t){if(A.object&&t(A.object),A instanceof ng)for(let e of[...A.children])this.eachObject(e,t)}afterScripts(){this.orphans.forEach((A,t)=>{if(!A.keep)return void this.dropOrphan(t);if(this.s.frames-A.since<FH)return;let e=A.ref.deref();if(e&&this.hearsFrames(e)){A.since=this.s.frames;return}this.dropOrphan(t),e&&we(this.s,e)});let A=this.madeThisFrame.splice(0);for(let t of(A.length>0&&oq.changes++,A))t.parent||this.orphan(t)}}let FH=120;class FL{s;audioEntries=new WeakMap;sharedAudio=new Map;sharedAudioGone=new FinalizationRegistry(({hash:A,entry:t,serial:e})=>{t.serial!==e||t.definition.deref()||this.removeSharedAudio(A,t)});symbols=new WeakMap;unbound=new Map;fontSets=new Set;fontSetsSeen=new WeakSet;registeredFonts=new Map;constructor(A){this.s=A}bind(A,t){let e=t.domain??this.s.mainDomain;for(let g of A.tags)if(76===g.code)for(let[i,I]of function(A,t){let e=new H(A,t.offset,t.offset+t.length),g=e.u16(),i=[];for(let A=0;A<g&&!e.overrun;A++){let A=e.u16();i.push([A,Ae(e)])}return i}(A.bytes,g)){let A=FZ(I);t.classes.set(i,A);let g=t.characters.get(i);if(g){let i=this.s.rt.definingAbc(A,e),I=i?this.symbols.get(i):this.unbound;I||(I=new Map,this.symbols.set(i,I)),I.has(A)||I.set(A,{character:g,library:t})}}}bitmapSymbol(A){for(let t=A;t;t=t.base){let A=this.symbolOf(t);if(A)return"bitmap"===A.character.type?A.character:null}return null}binarySymbol(A){for(let t=A;t;t=t.base){let A=this.symbolOf(t);if(A){let t=A.character;if("binary"!==t.type)return null;return t.shared??=new Uint8Array(t.data),t.shared}}return null}soundSymbol(A){for(let t=A;t;t=t.base){let A=this.symbolOf(t);if(A)return"sound"===A.character.type?A.character:null}return null}fontSymbol(A){for(let t=A;t;t=t.base){let A=this.symbolOf(t);if(A)return"font"===A.character.type||"fontCff"===A.character.type?A.character:null}return null}placedSymbol(A,t){let e=FZ(A);if(!this.s.rt.definingAbc(e,t))return null;let g=this.s.rt.classNamed(e,t);for(let A=g.$it;A;A=A.base){let t=this.symbolOf(A);if(t){let A=t.character;return"binary"===A.type||"font"===A.type||"fontCff"===A.type||"sound"===A.type?null:{character:A,library:t.library}}}return null}addFontLibrary(A){if(!this.fontSetsSeen.has(A.fonts)){for(let A of this.fontSets)A.deref()||this.fontSets.delete(A);for(let t of(this.fontSetsSeen.add(A.fonts),this.fontSets.add(new WeakRef(A.fonts)),this.registeredFonts.values()))"font"===t.type&&A.fonts.add(t.font)}}registerFont(A,t){if(!(this.registeredFonts.has(A)||[...this.registeredFonts.values()].some(A=>A.name.toLowerCase()===t.name.toLowerCase()&&A.type===t.type&&A.bold===t.bold&&A.italic===t.italic)))for(let e of(this.registeredFonts.set(A,t),this.fontSets)){let A=e.deref();A?"font"===t.type&&A.add(t.font):this.fontSets.delete(e)}}soundClip(A){if(!this.s.audio)return null;let t=this.audioEntries.get(A);if(t?.pending)return t.pending;let e=t?.decoded;if(e)return Promise.resolve(e);let g=A.definition,i=function(A){let t=0x811c9dc5;for(let e of[A.format,A.sampleRate,A.sampleSize,A.channels,A.sampleCount,A.seekSamples])t=Math.imul(t^e,0x1000193);let e=A.data;for(let A=0;A<e.length;A++)t=Math.imul(t^e[A],0x1000193);return t>>>0}(g);for(let t of this.sharedAudio.get(i)??[]){let e=t.definition.deref();if(!e||!function(A,t){if(A.format!==t.format||A.sampleRate!==t.sampleRate||A.sampleSize!==t.sampleSize||A.channels!==t.channels||A.sampleCount!==t.sampleCount||A.seekSamples!==t.seekSamples||A.data.length!==t.data.length)return!1;for(let e=0;e<A.data.length;e++)if(A.data[e]!==t.data[e])return!1;return!0}(e,g))continue;let I=t.decoded,B=t.pending??(I?Promise.resolve(I):null);if(B)return t.definition=new WeakRef(g),this.sharedAudioGone.register(g,{hash:i,entry:t,serial:++t.serial}),this.audioEntries.set(A,t),B}let I={definition:new WeakRef(g),decoded:null,pending:null,serial:1},B=this.s.audio,Q=Promise.resolve().then(()=>B.decode(g));I.pending=Q;let C=this.sharedAudio.get(i)??[];return C.push(I),this.sharedAudio.set(i,C),this.sharedAudioGone.register(g,{hash:i,entry:I,serial:1}),Q.then(A=>{I.decoded=A,I.pending=null},()=>this.removeSharedAudio(i,I)),this.audioEntries.set(A,I),Q}removeSharedAudio(A,t){let e=this.sharedAudio.get(A)?.filter(A=>A!==t)??[];e.length>0?this.sharedAudio.set(A,e):this.sharedAudio.delete(A)}symbolOf(A){let t=A.abc;return(t&&this.symbols.get(t)?.get(A.name))??this.unbound.get(A.name)}bitmapDataOf(A){let t=this.s.rt.construct(this.s.rt.classNamed("flash.display::BitmapData"),1,1);return t.$store=nK.of(A.pixels??EY),t}displayFor(A){let t=this.s.library??{characters:new Map,root:EU,classes:new Map,construct:null,constructLater:null,constructPlaced:null,uncaught:null,removing:null,fonts:new EI};for(let e=A;e;e=e.base){let A=this.symbolOf(e);if(A&&"binary"!==A.character.type&&"font"!==A.character.type&&"fontCff"!==A.character.type&&"sound"!==A.character.type){if("text"===A.character.type){let t=new EM(A.character,!1);return t.fonts=A.library.fonts,t}let t=EV(A.character,A.library);return t instanceof Eq&&"button"===A.character.type&&this.s.makeButtonStates(t,A.character,A.library),t}switch(e.name){case"flash.display::SimpleButton":return new Eq;case"flash.display::MovieClip":return new EN(EU,t);case"flash.display::Shape":return new Ee(null);case"flash.display::MorphShape":throw this.s.rt.error("ArgumentError",2012,"MorphShape$");case"flash.text::StaticText":throw this.s.rt.error("ArgumentError",2012,"StaticText$");case"flash.display::AVM1Movie":throw this.s.rt.error("ArgumentError",2012,"AVM1Movie$");case"flash.display::Bitmap":return new ne(null);case"flash.media::Video":return new EO;case"flash.text::TextField":{let A=new EM(null);return A.fonts=(this.s.code.codeLibrary()??t).fonts,A}}}return new ng}}function FZ(A){let t=A.lastIndexOf(".");return t<0?A:`${A.slice(0,t)}::${A.slice(t+1)}`}class FK{s;clock=0;now=0;realTime;running=new Map;timers=new Fv;starts=0;renderAsked=!1;host=0/0;hostReal=0;at=0/0;grid=0/0;cap=1/0;lastPass=-1/0;lastRaw=0/0;sum=0;spin;constructor(A,t){this.s=A,this.realTime=void 0===t.realTime?"u">typeof performance?()=>performance.now():null:t.realTime,this.spin=new dS(()=>this.elapsed()),this.realTime&&this.elapsed()}timer(){return this.realTime?Math.floor(this.spin.read()):Math.round(this.now)}ahead(){return this.realTime?this.spin.ahead():0}lead(A){return this.spin.lead(A)}elapsed(){let A=this.realTime();return Number.isFinite(A)&&(A>this.lastRaw&&(this.sum+=A-this.lastRaw),this.lastRaw=A),this.sum}current(){let A=this.elapsed();return(Number.isNaN(this.host)?A:this.host+(A-this.hostReal))+this.lead(A)}hostPassed(A){if(!this.realTime)return;let t=this.elapsed();this.host=Number.isNaN(this.host)?t:this.host+A,this.hostReal=t}frameAt(A,t){let e=Number.isNaN(A)||Number.isNaN(this.host),g=e?0:this.lead(this.elapsed());this.at=e?0/0:this.host-A+g,this.grid=e?0/0:this.host-A-t+g}holdAfter(A){this.realTime&&1/0===this.cap&&!Number.isNaN(this.host)&&(this.cap=this.host+this.lead(this.elapsed())+A)}release(){this.cap=1/0}beginFrame(A){this.realTime&&this.spin.settle(),this.clock+=A,this.now=this.clock}fireByClock(){try{for(;;){let A=this.timers.pop(this.clock);if(!A)break;this.now=A.due,A.due+=A.delay;try{this.s.rt.call(A.closure,A.object)}catch(t){this.s.reportUncaught(t,A.closure)}finally{A.stopped||this.timers.push(A)}}}finally{this.now=this.clock}}frameTimers(){if(this.realTime){let A=Number.isNaN(this.at)?this.current():this.at,t=Number.isNaN(this.grid)?A:this.grid;this.fireDue(A,t,1e3/this.s.frameRate,!1)}else this.fireByClock()}betweenFrames(A){if(!this.realTime)return;this.spin.settle();let t=this.elapsed();this.at=(Number.isNaN(this.host)?t:this.host)+this.lead(t);try{this.fireDue(this.at,0/0,A,!0)}finally{this.at=0/0}}fireDue(A,t,e,g){let i=Math.max(Math.min(A,this.cap),this.lastPass),I=Math.min(t,this.cap);this.lastPass=i;let B=[],Q=[];for(;;){let A=this.timers.pop(i+Fx);if(!A)break;let t=A.delay<e;(!g||A.fired+A.delay<=i+Fx)&&A.due<=(t?i:I)+Fx?(A.due=Number.isNaN(I)?i:I,A.fired=i,B.push(A)):Q.push(A)}for(let A of Q)this.timers.push(A);if(B.length){B.sort((A,t)=>A.order-t.order);try{for(let A of B)if(!A.stopped){A.due+=A.delay,this.renderAsked=!1;try{this.s.rt.call(A.closure,A.object)}catch(t){this.s.reportUncaught(t,A.closure)}finally{A.stopped||this.timers.push(A)}g&&this.renderAsked&&this.s.render()}}finally{this.renderAsked=!1}}}startTimer(A,t,e){this.stopTimer(A);let g=Math.max(Math.trunc(t)||0,1),i=this.now;this.realTime&&(i=g>=1e3/this.s.frameRate&&!Number.isNaN(this.grid)?this.grid:Number.isNaN(this.at)?this.current():this.at);let I={object:A,delay:g,closure:e,due:i+g,fired:-1/0,seq:0,order:this.starts++,stopped:!1};this.running.set(A,I),this.timers.push(I)}stopTimer(A){let t=this.running.get(A);t&&(t.stopped=!0,this.running.delete(A),this.timers.stopped())}timerRunning(A){return this.running.has(A)}}let Fx=1e-6;class Fv{heap=[];seq=0;stoppedCount=0;push(A){A.seq=this.seq++,this.insert(A)}insert(A){let t=this.heap;t.push(A);let e=t.length-1;for(;e>0;){let A=e-1>>1;if(!FV(t[e],t[A]))break;[t[e],t[A]]=[t[A],t[e]],e=A}}pop(A){for(;;){let t=this.heap[0];if(!t||t.due>A)return null;if(this.remove(),t.stopped){this.stoppedCount--;continue}return t}}stopped(){if(this.stoppedCount++,this.stoppedCount>this.heap.length/2){let A=this.heap.filter(A=>!A.stopped);for(let t of(this.heap=[],this.stoppedCount=0,A))this.insert(t)}}remove(){let A=this.heap,t=A.pop();if(!A.length)return;A[0]=t;let e=0;for(;;){let t=2*e+1,g=t+1,i=e;if(t<A.length&&FV(A[t],A[i])&&(i=t),g<A.length&&FV(A[g],A[i])&&(i=g),i===e)break;[A[e],A[i]]=[A[i],A[e]],e=i}}}function FV(A,t){return A.due<t.due||A.due===t.due&&A.seq<t.seq}class FX{s;infos=new WeakMap;main=null;telling=!1;errorEvent=null;asked=null;constructor(A){this.s=A}owns(A,t){this.infos.set(A,t),this.main??=t}report(A,t=null){let e;if(A instanceof QE)return void this.s.tellHost(A);try{e=this.s.rt.caught(A)}catch{this.s.tellHost(A);return}let g=t;this.infos.has(t)||(g=this.telling?null:this.s.code.calledLibrary(t,e)),this.tell(e,g)&&this.s.tellHost(e)}mustBeHeard(A){try{this.errorEvent??=this.s.rt.classNamed("flash.events::ErrorEvent")}catch{return!1}return this.s.rt.isInstanceOf(A,this.errorEvent.$it)}asCaller(A){let t=this.s.code.runningLibrary();return(...e)=>{let g=this.asked;this.asked=t;try{A(...e)}finally{this.asked=g}}}unheard(A){if(this.tell(A,this.s.code.runningLibrary()??this.asked)){let t=this.s.rt,e=t.toString(t.prop(A,"text")),g=t.toString(t.prop(A,"type")),i=t.construct(t.classNamed("Error"),`Error #2044: Unhandled ${g}:. text=${e}`,2044);this.s.tellHost(i)}}tell(A,t){if(this.telling)return!1;let e=(t&&this.infos.get(t))??this.main;if(!e)return!0;let g=[];for(let A=e;A;){g.push([A,A.$uncaught]);let t=A.$loader;if(!t)break;g.push([t,t.$uncaught]),A=nt(t.$display)?.loaderInfo??null}if(!g.some(([,A])=>A))return!0;this.telling=!0;try{let t=this.s.rt.construct(this.s.rt.classNamed("flash.events::UncaughtErrorEvent"),"uncaughtError",!0,!0,A);return cZ(this.s,t,g)}finally{this.telling=!1}}}let FW=new TextEncoder,Fq=new TextDecoder;function FT(A,t){let e=new Uint8Array(1+t);return e[0]=A,{out:e,view:new DataView(e.buffer)}}function FP(A,t){let{out:e}=FT(A,t.length);return e.set(t,1),e}function FO(A){switch(A.kind){case"value":{let t=A.value;if(null===t)return FT(4,0).out;if("boolean"==typeof t)return FT(t?1:2,0).out;if("string"==typeof t)return FP(3,FW.encode(t));let{out:e,view:g}=FT(0,8);return g.setFloat64(1,t,!0),e}case"amf":return FP(5,A.bytes);case"bytes":return FP(6,A.bytes);case"shared":{let{out:t,view:e}=FT(7,8);return e.setFloat64(1,A.memory.id,!0),t}case"channel":{let{out:t,view:e}=FT(8,20);return e.setFloat64(1,A.channel.id,!0),e.setInt32(9,A.channel.sender,!0),e.setInt32(13,A.channel.receiver,!0),e.setInt32(17,A.channel.queue,!0),t}case"sync":{let{out:t,view:e}=FT("mutex"===A.ref.kind?9:10,4);return e.setInt32(1,A.ref.address,!0),t}}}function Fj(A){let t=new DataView(A.buffer,A.byteOffset,A.byteLength);switch(A[0]){case 0:return{kind:"value",value:t.getFloat64(1,!0)};case 1:case 2:return{kind:"value",value:1===A[0]};case 3:return{kind:"value",value:Fq.decode(A.subarray(1))};case 4:return{kind:"value",value:null};case 5:return{kind:"amf",bytes:A.slice(1)};case 6:return{kind:"bytes",bytes:A.slice(1)};case 7:return{kind:"shared",id:t.getFloat64(1,!0)};case 8:return{kind:"channel",channel:{id:t.getFloat64(1,!0),sender:t.getInt32(9,!0),receiver:t.getInt32(13,!0),queue:t.getInt32(17,!0)}};default:return{kind:"sync",ref:{kind:9===A[0]?"mutex":"condition",address:t.getInt32(1,!0)}}}}function Fz(A){let t=[];for(let e of A){let A=null===e.key?null:FW.encode(e.key),g=new DataView(new ArrayBuffer(16));g.setInt32(0,e.worker,!0),g.setInt32(4,null===A?-1:A.length,!0),g.setInt32(8,e.token,!0),g.setUint32(12,e.value.length,!0),t.push(new Uint8Array(g.buffer),A??new Uint8Array(0),e.value)}let e=new Uint8Array(t.reduce((A,t)=>A+t.length,0)),g=0;for(let A of t)e.set(A,g),g+=A.length;return e}function F$(A){let t=new DataView(A.buffer,A.byteOffset,A.byteLength),e=[],g=0;for(;g<A.length;){let i=t.getInt32(g,!0),I=t.getInt32(g+4,!0),B=t.getInt32(g+8,!0),Q=t.getUint32(g+12,!0);g+=16;let C=I<0?null:Fq.decode(A.subarray(g,g+I));g+=Math.max(I,0),e.push({worker:i,key:C,token:B,value:A.slice(g,g+Q)}),g+=Q}return e}let F_=(A,t)=>`${A}${null===t?"":`:${t}`}`,F0={new:"new",starting:"new",running:"running",terminated:"terminated"};class F1{s;id;host;parent;backgrounds=new Map;ended=new Set;objects=new Map;shared=new Map;channels=new Map;memories=new Map;nextChannel=1;table=null;servicing=!1;libraries=[];constructor(A,t){if(this.s=A,this.parent=t.workerParent??null,this.host=this.parent?null:t.workerHost??null,this.id=this.parent?.id??0,this.parent)for(let A of this.parent.shared)this.applyShared(A)}get supported(){return null!==this.parent||null!==this.host}objectOf(A,t){let e=this.objects.get(A);if(!e){let g=this.s.rt;(e=g.constructClass(t??g.classNamed("flash.system::Worker"),[])).$worker=A,this.objects.set(A,e)}return e}create(A){let t=this.s.rt;if(null==A)throw t.error("TypeError",2007,"swf");if(!this.parent&&!this.host)throw t.unsupported("creating a Worker without a worker host");let e=Ca(t);if(this.parent&&!e.shared)throw iP("a Worker a background worker makes");let g=i3(t,A),i=e.newThread();return this.backgrounds.set(i,{id:i,creator:this.parent?this.id:null,swf:g.buffer.slice(0,g.length),state:"new",thread:null,pending:[],sent:0,waits:[]}),this.objectOf(i)}start(A){let t=this.s.rt,e=this.backgrounds.get(A);if(!e)throw t.error("flash.errors::IllegalOperationError",A===this.id||0===A||this.ended.has(A)?1511:1521);if("new"!==e.state)throw t.error("flash.errors::IllegalOperationError",1511);if(this.parent){if(0===Ca(t).requests)throw t.unsupported("starting a Worker from a background worker the primordial did not start");e.state="starting";let g=[...this.propertiesOf(A)].map(([t,e])=>({worker:A,key:t,value:e.wire}));this.request(function(A,t,e,g){let i=new DataView(new ArrayBuffer(16));i.setInt32(0,A,!0),i.setInt32(4,t,!0),i.setUint32(8,e.length,!0),i.setUint32(12,g.length,!0);let I=[new Uint8Array([0]),new Uint8Array(i.buffer),e];for(let A of g){let t=null===A.key?null:FW.encode(A.key),e=FO(A.value),g=new DataView(new ArrayBuffer(12));g.setInt32(0,A.worker,!0),g.setInt32(4,null===t?-1:t.length,!0),g.setUint32(8,e.length,!0),I.push(new Uint8Array(g.buffer),t??new Uint8Array(0),e)}let B=new Uint8Array(I.reduce((A,t)=>A+t.length,0)),Q=0;for(let A of I)B.set(A,Q),Q+=A.length;return B}(A,this.id,e.swf,g)),e.swf=new Uint8Array(0);return}this.takeRequests();let g=this.host;e.state="starting";let i=[A,0].flatMap(A=>[...this.propertiesOf(A)].map(([t,e])=>({type:"shared",worker:A,key:t,value:e.wire}))),I=e.swf;e.swf=new Uint8Array(0),e.sent=1,this.wait(e,1);try{e.thread=g.start({type:"init",id:A,swf:I,url:this.s.url,sandboxType:this.s.sandboxType,air:this.s.air,libraries:this.libraries,shared:i,sync:Ca(t).memory,modules:this.s.code.handedModules()},A=>this.fromBackground(e,A),A=>{"terminated"!==e.state&&(this.s.reportUncaught(A),this.end(e))})}catch{throw this.end(e),t.error("flash.errors::IllegalOperationError",3807)}for(let A of e.pending.splice(0))this.post(e,A)}terminate(A){var t;let e;if(0===A)throw this.s.rt.error("flash.errors::IllegalOperationError",3732);if(this.parent&&A===this.id)return Ca(this.s.rt).stop(A),this.parent.post({type:"terminate"}),!0;let g=this.backgrounds.get(A);return!!g&&"new"!==g.state&&"terminated"!==g.state&&(this.parent&&this.request((t=this.id,(e=new DataView(new ArrayBuffer(9))).setUint8(0,1),e.setInt32(1,A,!0),e.setInt32(5,t,!0),new Uint8Array(e.buffer))),this.end(g),!0)}request(A){let t=Ca(this.s.rt);this.inShared(()=>t.push(t.requests,A)),this.parent?.post({type:"requests"})}inShared(A){try{return A()}catch(A){throw Cw(this.s.rt,A)}}state(A){if(A===this.id||0===A)return"running";let t=this.backgrounds.get(A);return t?.state==="starting"&&Ca(this.s.rt).running(A)?"running":F0[t?.state??"terminated"]}list(){if(this.parent)return[this.objectOf(0),this.objectOf(this.id)];let A=[...this.backgrounds.values()].filter(A=>"running"===A.state);return[this.objectOf(0),...A.map(A=>this.objectOf(A.id))]}setShared(A,t,e){if(this.ended.has(A))return;let g=this.propertiesOf(A);if(void 0===e)g.delete(t);else{let A=this.encode(e);g.set(t,{wire:A,local:"bytes"===A.kind?e:void 0})}let i=Ca(this.s.rt);if(i.shared){let e=g.get(t);e&&(e.token=i.nextToken()),this.inShared(()=>i.updateTable(g=>{let i=F$(g).filter(e=>e.worker!==A||e.key!==t);return e?.token!==void 0&&i.push({worker:A,key:t,token:e.token,value:FO(e.wire)}),Fz(i)}))}let I={type:"shared",worker:A,key:t,value:void 0===e?null:g.get(t).wire};this.parent?this.parent.post(I):this.share(I,0)}share(A,t){for(let e of this.backgrounds.values()){let g=e.id,i=this.backgrounds.get(A.worker)?.creator===g;g!==t&&(0===A.worker||A.worker===g||i)&&"new"!==e.state&&this.post(e,A)}}getShared(A,t){let e=this.shared.get(A)?.get(t);if(Ca(this.s.rt).shared){let g=this.tableEntries().get(F_(A,t));if(!g)return;if(e?.token!==g.token)return this.decode(this.unpacked(Fj(g.value)))}if(e)return void 0!==e.local?e.local:this.decode(e.wire)}tableEntries(){let A=Ca(this.s.rt);if(this.table?.version!==A.tableVersion()){let{version:t,bytes:e}=A.readTable(),g=new Map;for(let A of F$(e))g.set(F_(A.worker,A.key),A);this.table={version:t,entries:g}}return this.table.entries}createChannel(A,t){let e=1048576*this.id+this.nextChannel++,g=Ca(this.s.rt),i=g.shared?this.inShared(()=>g.newQueue()):0;return this.channelObject({id:e,sender:A,receiver:t,queue:i})}send(A,t){let e=this.s.rt,g=this.channelOf(A);if(g.ref.sender!==this.id)throw e.error("ArgumentError",3736);if("open"!==g.state)throw e.error("flash.errors::IOError",3738);let i=this.encode(t);if(0!==g.ref.queue){let A=Ca(this.s.rt);this.inShared(()=>A.push(g.ref.queue,FO(i)));let t="shared"===i.kind?i:null;this.route({type:"message",channel:g.ref,value:t},this.id);return}this.route({type:"message",channel:g.ref,value:i},this.id)}receive(A,t){let e=this.s.rt,g=this.channelOf(A);if(g.ref.receiver!==this.id)throw e.error("ArgumentError",3737);if(0!==g.ref.queue)return this.receiveShared(g,t);let i=g.queue.shift();if(void 0===i){if("closed"===g.state)throw e.error("flash.errors::IOError",3738);if(t)throw e.unsupported("MessageChannel.receive(true) with no message queued");return}return"closing"===g.state&&0===g.queue.length&&(g.state="closed",this.drained(g)),this.decode(i)}receiveShared(A,t){let e=this.s.rt,g=Ca(e),i=A.ref.queue,I=g.shift(i);if(null===I&&t&&"open"===A.state){try{g.waitFor(i)}catch(A){throw Cw(e,A)}I=g.shift(i)}if(null===I){if("closed"===A.state||t&&g.closed(i))throw e.error("flash.errors::IOError",3738);return}return"closing"===A.state&&0===g.queued(i)&&(A.state="closed",this.drained(A)),this.decode(this.unpacked(Fj(I)))}unpacked(A){if("shared"!==A.kind)return A;let t=this.memories.get(A.id);if(!t)throw this.s.rt.unsupported("reading a shareable ByteArray another worker shared before its memory reached this one");return{kind:"shared",memory:t}}messageAvailable(A){let t=this.channelOf(A);return 0!==t.ref.queue?Ca(this.s.rt).queued(t.ref.queue)>0:t.ref.receiver===this.id?t.queue.length>0:t.undelivered>0}channelState(A){return this.channelOf(A).state}close(A){let t=this.channelOf(A);"open"===t.state&&(0!==t.ref.queue&&Ca(this.s.rt).close(t.ref.queue),this.route({type:"close",channel:t.ref,drained:!1},this.id),this.closed(t))}stopAll(){if(!this.parent||!Ca(this.s.rt).terminated){for(let A of this.backgrounds.values())"new"!==A.state&&"terminated"!==A.state&&this.end(A);this.host?.release?.()}}fromParent(A){switch(A.type){case"shared":this.applyShared(A);break;case"message":case"close":this.arrive(A);break;case"state":{let t=this.backgrounds.get(A.worker);t&&"running"===A.state&&"starting"===t.state?(t.state="running",this.stateChanged(t.id)):t&&"terminated"===A.state&&this.end(t)}}}fromBackground(A,t){if("terminated"!==A.state)switch(t.type){case"running":A.state="running",this.stateChanged(A.id),this.toCreator(A,"running");break;case"requests":this.serviceRequests();break;case"idle":for(let e of A.waits.filter(A=>A.upTo<=t.received))e.done();for(let e of(A.waits=A.waits.filter(A=>A.upTo>t.received),this.channels.values()))e.ref.receiver===A.id&&(e.undelivered=0);break;case"trace":this.s.rt.print(t.line);break;case"uncaught":this.s.reportUncaught(Error(`a background worker: ${t.text}`));break;case"terminate":this.end(A);break;case"shared":this.applyShared(t),this.share(t,A.id);break;case"message":case"close":this.route(t,A.id)}}route(A,t){let e=A.channel;if(!this.parent&&"close"===A.type&&e.sender!==this.id&&e.receiver!==this.id){let t=this.channels.get(e.id),g=A.drained?"closed":"closing";t&&t.state!==g&&"closed"!==t.state&&(t.state=g,this.stateEvent(t))}let g="close"===A.type?[e.sender,e.receiver]:[e.receiver],i=!1;for(let I of new Set(g))if(I!==t||"close"!==A.type)if(I===this.id)this.arrive(A);else if(this.parent)i||(this.parent.post(A),i=!0);else{let t=this.backgrounds.get(I);t&&("message"===A.type&&0===e.queue&&this.channel(e).undelivered++,this.post(t,A))}}arrive(A){let t=this.channel(A.channel);"close"===A.type?A.drained?"closed"!==t.state&&(t.state="closed",this.stateEvent(t)):"open"===t.state&&this.closed(t):(A.value?.kind==="shared"&&this.memories.set(A.value.memory.id,A.value.memory),0===A.channel.queue&&A.value&&t.queue.push(A.value),this.s.loads.deferHostEvent(()=>this.dispatch(t,"channelMessage")))}closed(A){let t=A.ref.receiver===this.id;A.state=t&&0===this.queued(A)?"closed":"closing",this.stateEvent(A),t&&this.drained(A)}drained(A){"closed"===A.state&&A.ref.sender!==this.id&&this.route({type:"close",channel:A.ref,drained:!0},this.id)}queued(A){return 0!==A.ref.queue?Ca(this.s.rt).queued(A.ref.queue):A.queue.length}stateEvent(A){this.s.loads.deferHostEvent(()=>this.dispatch(A,"channelState"))}dispatch(A,t){A.object&&cK(this.s,A.object,this.s.event(t))}stateChanged(A,t=!1){this.s.loads.deferHostEvent(()=>{let e=this.objects.get(A);e&&cK(this.s,e,this.s.event("workerState")),t&&this.objects.delete(A)})}takeRequests(){let A=Ca(this.s.rt);A.shared&&0===A.requests&&(A.requests=A.newQueue(),A.poll=()=>{A.queued(A.requests)>0&&this.serviceRequests()})}serviceRequests(){let A=Ca(this.s.rt);if(!this.servicing&&0!==A.requests){this.servicing=!0;try{for(let t=A.shift(A.requests);t;t=A.shift(A.requests)){let A=function(A){if(1===A[0]){let t=new DataView(A.buffer,A.byteOffset,A.byteLength);return{type:"end",id:t.getInt32(1,!0),creator:t.getInt32(5,!0)}}return{type:"start",job:function(A){let t=new DataView(A.buffer,A.byteOffset,A.byteLength),e=t.getUint32(8,!0),g=t.getUint32(12,!0),i=16+e,I=[];for(let e=0;e<g;e++){let e=t.getInt32(i,!0),g=t.getInt32(i+4,!0),B=t.getUint32(i+8,!0);i+=12;let Q=g<0?null:Fq.decode(A.subarray(i,i+g));i+=Math.max(g,0),I.push({worker:e,key:Q,value:Fj(A.slice(i,i+B))}),i+=B}return{id:t.getInt32(0,!0),creator:t.getInt32(4,!0),swf:A.slice(16,16+e),shared:I}}(A.subarray(1))}}(t);if("end"===A.type){let t=this.backgrounds.get(A.id);t?.creator===A.creator&&this.end(t);continue}let{job:e}=A,g=this.backgrounds.get(e.creator);if(g){for(let A of e.shared)try{let t=this.unpacked(A.value);this.applyShared({type:"shared",worker:A.worker,key:A.key,value:t})}catch(A){this.s.reportUncaught(A)}this.createFor(g,e.id,e.swf)}}}finally{this.servicing=!1}}}createFor(A,t,e){Ca(this.s.rt).addThread(t);let g={id:t,creator:A.id,swf:e,state:"new",thread:null,pending:[],sent:0,waits:[]};this.backgrounds.set(t,g);try{this.start(t)}catch(A){this.s.reportUncaught(A)}}toCreator(A,t){let e=null===A.creator?null:this.backgrounds.get(A.creator);e&&!this.parent&&this.post(e,{type:"state",worker:A.id,state:t})}end(A){let t=A.id;if("terminated"===A.state)return;this.toCreator(A,"terminated"),A.state="terminated";let e=A.thread;for(let t of(A.thread=null,A.pending.length=0,A.swf=new Uint8Array(0),A.waits.splice(0)))t.done();this.backgrounds.delete(t),this.ended.add(t);let g=Ca(this.s.rt);if(g.shared&&!this.parent&&g.updateTable(A=>Fz(F$(A).filter(A=>A.worker!==t))),g.stop(t),!this.parent)if(e){let A,i;A=Date.now(),setTimeout(i=()=>{g.stopped(t)?e.terminate():Date.now()-A>=1e3?Promise.resolve(e.terminate()).then(()=>g.end(t)):setTimeout(i,10)},10)}else g.end(t);for(let[A,e]of(this.shared.delete(t),this.channels))if(e.ref.sender===t||e.ref.receiver===t){if(e.undelivered=0,0!==e.ref.queue&&!g.terminated)for(g.close(e.ref.queue);null!==g.shift(e.ref.queue););this.channels.delete(A)}this.stateChanged(t,!0)}post(A,t){if("terminated"!==A.state){if(!A.thread)return void A.pending.push(t);A.thread.post(t),A.sent++,this.wait(A,A.sent)}}wait(A,t){let e=Ca(this.s.rt);this.s.loads.trackRequest(new Promise(g=>{let i=null,I=()=>{null!==i&&clearInterval(i),g()};e.shared&&(i=setInterval(()=>{e.blocked(A.id)&&I()},5)),A.waits.push({upTo:t,done:I})}))}applyShared(A){A.value?.kind==="shared"&&this.memories.set(A.value.memory.id,A.value.memory);let t=this.propertiesOf(A.worker);null===A.value?t.delete(A.key):t.set(A.key,{wire:A.value,local:void 0})}propertiesOf(A){let t=this.shared.get(A);return t||(t=new Map,this.shared.set(A,t)),t}channel(A){let t=this.channels.get(A.id);return t||(t={ref:A,state:"open",queue:[],undelivered:0,object:null},this.channels.set(A.id,t)),t}channelObject(A){let t=this.channel(A);if(!t.object){let A=this.s.rt,e=A.constructClass(A.classNamed("flash.system::MessageChannel"),[]);e.$channel=t,t.object=e}return t.object}channelOf(A){return A.$channel}encode(A){let t=this.s.rt;if(null===A||"object"!=typeof A)return{kind:"value",value:A};if(A.$channel)return{kind:"channel",channel:A.$channel.ref};if(t.isInstance(A,t.classNamed("flash.utils::ByteArray"))){let e=i3(t,A);if(e.shareable){let A=e.share();return this.memories.set(A.id,A),{kind:"shared",memory:A}}return{kind:"bytes",bytes:e.buffer.slice(0,e.length)}}let e=Cl(A);if(e){if(!Ca(t).shared)throw iP("mutex"===e.kind?"a Mutex":"a Condition");return{kind:"sync",ref:e}}let g=t.construct(t.classNamed("flash.utils::ByteArray")),i=i3(t,g);return new I0(t,i).value(A),{kind:"amf",bytes:i.buffer.slice(0,i.length)}}decode(A){let t=this.s.rt;switch(A.kind){case"value":return A.value;case"channel":return this.channelObject(A.channel);case"sync":return Ch(t,A.ref);case"shared":return this.memories.set(A.memory.id,A.memory),iz(t,A.memory);case"bytes":case"amf":{let e=t.construct(t.classNamed("flash.utils::ByteArray")),g=i3(t,e);return g.write(A.bytes),g.position=0,"bytes"===A.kind?e:new I1(t,g).value()}}}}let F2={shape:"flash.display::Shape",morph:"flash.display::MorphShape",sprite:"flash.display::MovieClip",button:"flash.display::SimpleButton",bitmap:"flash.display::Bitmap",text:"flash.text::TextField",static:"flash.text::StaticText"};class F3{codegen;rt;mainDomain;code=new Fk(this);uncaughtErrors=new FX(this);symbols=new FL(this);lifecycle=new FY(this);loads;timers;clipboard;workers;screenCapabilities;externalInterface;hostCalls=0;updates=0;renderedUpdates=0;cycles=0;scriptPhase=!1;framesMarked=0;static get checkRounds(){return uz.on}static set checkRounds(A){uz.on=A}static get checkPicks(){return u4.on}static set checkPicks(A){u4.on=A}overflowed=!1;scriptQueues=[];scriptDepth=0;openClip=[];openEnd=[];openDue=[];alsoAt=0;onUncaught;uncaught=[];toConstruct=[];placing=[];socket;webSocket;audio;navigate;fileHost;fileLifetime=new AbortController;moduleCache;lazyCompilation;connections=new Set;stopped=new AbortController;destroyed=!1;localConnections;sendToUrl;fsCommand;timelineSounds=wg(cO(this));fetch=null;decodeImage;drawer=null;showMenu=null;url="file:///";sandboxType;air;application;fileSystem;encryptedStore;loadPolicyFile;base;storage;flushSharedObjects=null;platform;maxTouchPoints;inputMode;mapTouchToMouse=!0;eventFields=null;pending=null;stage=null;focus=null;root=null;library=null;invalidated=!1;scrolled=new Set;afterExitFrame=[];inFrameScript=null;broadcasts=new Map;broadcastSets=[];activation=new Map;stageWidth=0;stageHeight=0;stageScaleMode="showAll";stageAlign="";stageScaleModeSet=!1;stageAlignSet=!1;onStageLayout=null;fullScreen;stageColor=null;stageViewportX=0;stageViewportY=0;stageViewportWidth=0;stageViewportHeight=0;contentsScaleFactor=1;contentsScaleListeners=new Set;mouseStageX=0;mouseStageY=0;frameRate=24;frames=0;quality="HIGH";showDefaultContextMenu=!0;instances=0;statusClass=null;mouseVisible=!0;mouseCursor="auto";cursors=new Map;pointer=null;touch=null;avm1Input=null;trimTrailingHtmlBreak;constructor(A,t={}){var e,g,i,I,B,Q,C;let r,s,o;this.codegen=A,this.localConnections=t.localConnections??new cw,this.screenCapabilities={screenResolutionX:t.screenCapabilities?.screenResolutionX??("u"<typeof screen?0:screen.width),screenResolutionY:t.screenCapabilities?.screenResolutionY??("u"<typeof screen?0:screen.height),pixelAspectRatio:t.screenCapabilities?.pixelAspectRatio??1,screenDPI:t.screenCapabilities?.screenDPI??72},this.fullScreen=new FU(this,t.fullScreen??null),this.trimTrailingHtmlBreak=t.trimTrailingHtmlBreak??!1,this.timers=new FK(this,t),this.decodeImage=void 0===t.decodeImage?cA:t.decodeImage,this.externalInterface=t.externalInterface??null;let n=t.socket;this.socket=n?{connect:(A,t,e,g)=>this.track(e,e=>n.connect(A,t,e,g))}:null;let E=void 0===t.webSocket?"function"!=typeof(r=globalThis.WebSocket)?null:{connect(A,t,e){let g=new r(A,t);return g.binaryType="arraybuffer",g.addEventListener("open",()=>e.open(g.protocol)),g.addEventListener("message",({data:A})=>{e.message("string"==typeof A?A:new Uint8Array(A))}),g.addEventListener("close",({code:A})=>e.close(A)),g.addEventListener("error",()=>e.error()),{send:A=>g.send(A),close:A=>g.close(A)}}}:t.webSocket;if(this.webSocket=E?{connect:(A,t,e)=>this.track(e,e=>E.connect(A,t,e))}:null,this.onUncaught=t.onUncaught??null,this.audio=void 0===t.audio?cM():t.audio,this.fileHost=void 0===t.fileHost?cC():t.fileHost,this.navigate=void 0===t.navigate?cn():t.navigate,this.clipboard=new Ds(void 0===t.clipboard?function(){let A=globalThis.navigator?.clipboard;if(!A||"function"!=typeof A.writeText)return null;let t=globalThis.ClipboardItem;return{write:({text:e,html:g})=>{(void 0!==g&&t&&"function"==typeof A.write?A.write([new t({"text/plain":new Blob([e],{type:"text/plain"}),"text/html":new Blob([g],{type:"text/html"})})]):A.writeText(e)).catch(()=>{})}}}():t.clipboard),this.fsCommand=t.fsCommand??null,this.workers=new F1(this,t),t.handedModules){let e=new FR(t.handedModules);this.code.handover=e,this.codegen=e.guard(A)}else t.workerHost&&!t.workerParent&&(this.code.recorder=new FF);this.sendToUrl=t.sendToUrl??!0,this.moduleCache=t.moduleCache??null,this.lazyCompilation=t.lazyCompilation??!1;let a=t.fetch;this.fetch=a?(A,t)=>a(A,AbortSignal.any([t,this.stopped.signal])):null,this.url=t.url??this.url,this.air=t.air??!1,this.application=this.air?t.application??null:null,this.fileSystem=this.air?t.fileSystem??null:null,this.encryptedStore=this.air?t.encryptedStore??(s=new Map,{getItem:A=>s.get(A)??null,setItem:(A,t)=>{s.set(A,t)},removeItem:A=>{s.delete(A)},reset:()=>s.clear()}):null,this.sandboxType=t.sandboxType??(this.air?"application":"remote"),this.loadPolicyFile=t.loadPolicyFile??null,this.base=t.base??null,this.loads=new dj(this,t),this.storage=t.storage??cE(),this.platform={...function(){let A=globalThis.navigator,t=A?.userAgent??"",e=/Mac OS X (\d+)[._](\d+)(?:[._](\d+))?/.exec(t),[g,i,I]=/Windows/.test(t)?["Windows 10","Adobe Windows","WIN"]:e?[`Mac OS ${e[1]}.${e[2]}${e[3]?`.${e[3]}`:""}`,"Adobe Macintosh","MAC"]:["Linux","Adobe Linux","LNX"],B=A?.language??new Intl.DateTimeFormat().resolvedOptions().locale,[Q,C]=B.split("-");return{os:g,manufacturer:i,version:`${I} 32,0,0,465`,language:("zh"===Q||"pt"===Q)&&C?`${Q}-${C}`:Q,locale:B,playerType:"PlugIn"}}(),...t.platform},this.maxTouchPoints=Math.max(0,Math.floor(t.maxTouchPoints??(o=globalThis.navigator,o?.maxTouchPoints??0))||0),this.inputMode=this.maxTouchPoints>0?"gesture":"none",this.rt=new QR(A=>{let t,e,g,i,I,B;return{...{...rl,...Q6,...r$,...function(A){let t={};class e{get source(){return this.$source}get global(){return this.$re.global}get ignoreCase(){return this.$re.ignoreCase}get multiline(){return this.$re.multiline}get dotall(){return this.$re.dotAll}get extended(){return this.$extended}get lastIndex(){return this.$re.lastIndex}set lastIndex(t){this.$re.lastIndex=A.toInt(t)}[`${Qp}::exec`](t=""){let e=this.$re;if(e.global&&e.lastIndex<0)return e.lastIndex=0,null;let g=e.exec(A.toString(t));return g?rR(A,g):null}}return QS(t,"RegExp",e),t}(A),...rg,...ro,...r3,...C8,...rF,...I2,...(t={},e=t=>{if(null==t)throw A.error("ArgumentError",1507,"filename");return A.toString(t)},g=t=>{let e=A.files.read(t);if(null===e)throw A.error("Error",1500,t);return e},i=(t,e)=>{if(!A.files.write(t,e))throw A.error("Error",1501,t)},QS(t,"avmplus::System",class{static trace(t){A.print(QU(t).map(t=>A.toString(t)).join(" ").replaceAll("\0",""))}static write(t){A.print(A.toString(t).replaceAll("\0",""))}static"avmplus:System::getArgv"(){return A.array([])}static getAvmplusVersion(){return"swf2es"}static get swfVersion(){return A.swfVersion}static get apiVersion(){return A.apiVersion}static getTimer(){return Date.now()-rx}static getRunmode(){return"jit"}static isDebugger(){return A.debugger}static exit(){}static sleep(t){let{workers:e}=rX(A),g=()=>{if(e.terminated)throw new rL};g();for(let e=A.toInt(t);e>0;e-=50)!function(A){if(A<=0)return;let t=Date.now()+A;if("function"==typeof SharedArrayBuffer){let t=new Int32Array(new SharedArrayBuffer(4));try{Atomics.wait(t,0,0,A);return}catch{}}for(;Date.now()<t;);}(Math.min(e,50)),g()}static exec(t){if(null==t)throw A.error("ArgumentError",1507,"command");return -1}static canonicalizeNumber(A){return A}static isGlobal(t){return null!==t&&"object"==typeof t&&A.traitsOf(t).isGlobal}static getFeatures(){return rv}static forceFullCollection(){}static queueCollection(){}static pauseForGCIfCollectionImminent(A){}static get totalMemory(){return 1347584+i0(A)}static get freeMemory(){return 753664}static get privateMemory(){return 6557696+i0(A)}}),QS(t,"avmplus::File",class{static exists(t){return null!==A.files.read(e(t))}static read(A){return function(A){if(A.length>=3){if(239===A[0]&&187===A[1]&&191===A[2])return Iq(A.subarray(3));let t=254===A[0]&&255===A[1];if(t||255===A[0]&&254===A[1]){let e=[];for(let g=2;g+1<A.length;g+=2){let i=t?A[g]<<8|A[g+1]:A[g]|A[g+1]<<8;e.push(String.fromCharCode(i))}return e.join("")}}return Iq(A)}(g(e(A)))}static write(t,g){let I=e(t);if(null==g)throw A.error("ArgumentError",1507,"data");i(I,IW(A.toString(g)))}static readByteArray(t){let i=g(e(t)),I=A.construct(A.classNamed("flash.utils::ByteArray")),B=i3(A,I);return B.write(i),B.position=0,I}static writeByteArray(t,g){let I=e(t),B=i3(A,g);return i(I,B.buffer.subarray(0,B.length)),!0}}),QS(t,"avmplus::Domain",class{static get currentDomain(){return A.currentDomain()}static get MIN_DOMAIN_MEMORY_LENGTH(){return 1024}"avmplus:Domain::init"(t){this.$domain=A.childDomain(t?t.$domain??A.root:A.root)}loadBytes(t,e){if(null==t)throw A.error("TypeError",1507,"bytes");let g=A.toUint(e??0);if(0!==g&&(g<9||g>31))throw A.error("TypeError",1508,"swfVersion");if(!A.compileAbc)throw A.unsupported("Domain.loadBytes without RuntimeOptions.compileAbc");let i=this.$domain??A.root,I=i3(A,t),B=A.compileAbc(I.buffer.slice(0,I.length),A.compileUnit(i));if("number"==typeof B)throw A.error("VerifyError",B);A.run(A.loadInto(i,()=>B(A)))}getClass(t){if(null==t)throw A.error("ArgumentError",1507,"name");let e=A.toString(t),g=e.lastIndexOf("."),i=g<0?e:`${e.slice(0,g)}::${e.slice(g+1)}`,I=A.classNamedByCode(i,this.$domain??A.root);if(null===I||"object"!=typeof I||void 0===I.$it)throw A.error("TypeError",1034,A.toString(I),"Class");return I}get domainMemory(){return A.memoryProvider}set domainMemory(t){Ci(A,t)}}),QS(t,"flash.system::Worker",class{static pr(t){A.print(A.toString(t))}"flash.system:Worker::internalGetState"(){return rU[rX(A).workers.state(this.$id)]||"aborted"}get isPrimordial(){return 0===this.$id}isParentOf(t){if(null==t)throw A.error("TypeError",2007,"worker");return rX(A).workers.parent(t.$id)===this.$id}setSharedProperty(t,e){let{workers:g}=rX(A),i=rP(A,t);if(void 0===e){g.set(this.$id,i,null),g.objects.delete(rK(this.$id,i));return}let I=function(A,t){if("number"==typeof t){let A=new Uint8Array(8);return new DataView(A.buffer).setFloat64(0,t,!0),{kind:3,bytes:A}}if(null!==t&&"object"==typeof t){if(A.isInstance(t,A.classNamed("flash.utils::ByteArray"))){let e=i3(A,t);if(!e.shareable)return{kind:1,bytes:rT(A,t)};let g=e.share();A.workerHost?.share?.(g);let i=new Uint8Array(8);return new DataView(i.buffer).setFloat64(0,g.id,!0),{kind:4,bytes:i}}let e=Cl(t);if(e){let A=new Uint8Array(5);return A[0]=+("mutex"!==e.kind),new DataView(A.buffer).setInt32(1,e.address,!0),{kind:2,bytes:A}}}let e=rq(A,new Uint8Array(0)),g=i3(A,e);return new I0(A,g).value(t),{kind:0,bytes:g.buffer.slice(0,g.length)}}(A,e),B=g.set(this.$id,i,I);(1===I.kind||4===I.kind)&&g.objects.set(rK(this.$id,i),{token:B,value:e})}getSharedProperty(t){let{workers:e}=rX(A),g=rP(A,t),i=e.get(this.$id,g);if(!i)return;switch(i.kind){case 3:return new DataView(i.bytes.buffer).getFloat64(0,!0);case 0:var I;return new I1(I=A,i3(I,rq(I,i.bytes))).value();case 2:{let t=new DataView(i.bytes.buffer).getInt32(1,!0);return Ch(A,{kind:0===i.bytes[0]?"mutex":"condition",address:t})}}let B=e.objects.get(rK(this.$id,g));if(B?.token===i.token)return B.value;if(4===i.kind){let t=new DataView(i.bytes.buffer).getFloat64(0,!0),e=ij(A).get(t)?.deref();if(e)return e;let g=A.workerHost?.shared?.(t);if(!g)throw A.unsupported("a shareable ByteArray from a worker whose host does not share it");return iz(A,g)}let Q=rq(A,i.bytes);return e.objects.set(rK(this.$id,g),{token:i.token,value:Q}),Q}start(){let{workers:t,threads:e}=rX(A);if(1!==t.state(this.$id))throw A.error("flash.errors::IllegalOperationError",1511);if(t.parent(this.$id)!==t.self)throw A.error("flash.errors::IllegalOperationError",1521);if(!A.workerHost)throw A.unsupported("starting a Worker without RuntimeOptions.workers");let g=null===this.$code||void 0===this.$code?null:rT(A,this.$code);this.$code=null,t.setState(this.$id,2);try{e.set(this.$id,A.workerHost.start({id:this.$id,memory:t.memory,code:g}))}catch(A){throw t.setState(this.$id,7),A}}terminate(){var t,e,g,i;let I,{workers:B,threads:Q}=rX(A);if(0!==this.$id&&this.$id===B.self)throw B.terminateSelf(),new rL;if(0===this.$id)throw A.error("Error",1513);let C=B.terminate(this.$id);if(0===C.size)return!1;let r=Q.get(this.$id);return Q.delete(this.$id),r&&(t=A,e=this.$id,g=r,i=C,(I=Ca(t)).waitStopped(e,100),Promise.resolve(g.terminate()).then(()=>{for(let A of i)I.end(A)})),!0}}),QS(t,"flash.system::WorkerDomain",class{listWorkers(){let{workers:t}=rX(A),e=[];for(let g=0;g<t.count();g++)4===t.state(g)&&e.push(rW(A,g));let g=A.applyType(A.classNamed("__AS3__.vec::Vector"),[A.classNamed("flash.system::Worker")]).$it.instance();return g.$a=e,g.$fixed=!1,g}"flash.system:WorkerDomain::createWorkerFromByteArrayInternal"(t){let e=rW(A,rX(A).workers.create());return e.$code=t,e}}),t),...re,...r6,...function(A){let t="flash.utils:ByteArray",e={},g=(A,t,e)=>{if(null==t)throw A.error("TypeError",2007,e)},i=(A,t,e)=>{var g;let i;if(t.available<e)throw A.error("flash.errors::EOFError",2030);if(e<=24){let A=t.buffer,g=t.position,i="",I=0;for(;I<e;I++){let t=A[g+I];if(0===t||t>=128)break;i+=String.fromCharCode(t)}if(I===e||0===A[g+I])return t.position=g+e>>>0,i}let I=t.buffer.subarray(t.position,t.position+e);Ct(I)&&(I=I.subarray(3));let B=Iq((i=(g=I).indexOf(0))<0?g:g.subarray(0,i));return t.position=t.position+e>>>0,B};class I{static get defaultObjectEncoding(){return A.defaultObjectEncoding}static set defaultObjectEncoding(t){A.defaultObjectEncoding=A.toUint(t)}get length(){return i3(A,this).length}set length(t){i3(A,this).setLength(A.toUint(t),!0)}get position(){return i3(A,this).position}set position(t){i3(A,this).position=A.toUint(t)>>>0}get bytesAvailable(){return i3(A,this).available}get endian(){return i3(A,this).littleEndian?"littleEndian":"bigEndian"}set endian(t){let e=i3(A,this);g(A,t,"endian");let i=A.toString(t);if("bigEndian"===i||"littleEndian"===i)e.littleEndian="littleEndian"===i;else throw A.error("ArgumentError",2008,"type")}get objectEncoding(){return i3(A,this).objectEncoding}set objectEncoding(t){let e=i3(A,this),g=A.toUint(t);if(0!==g&&3!==g)throw A.error("ArgumentError",2008,"objectEncoding");e.objectEncoding=g}get shareable(){return i3(A,this).shareable}set shareable(t){A.toBoolean(t)&&(i3(A,this).shareable=!0)}clear(){i3(A,this).clear()}atomicCompareAndSwapIntAt(t,e,g){let i=i3(A,this),I=A.toInt(t)>>>0;if(i.length<4||I>i.length-4||I%4!=0)throw A.error("RangeError",1506);return i.compareAndSwapInt(I,A.toInt(e),A.toInt(g))}atomicCompareAndSwapLength(t,e){let g=i3(A,this),i=A.toInt(e);if(g.subscribed&&i<1024)throw A.error("RangeError",1506);return g.compareAndSwapLength(A.toInt(t),i>>>0)}readBoolean(){let t=i3(A,this),e=t.shortRead(1);return 0!==t.buffer[e]}readByte(){let t=i3(A,this),e=t.shortRead(1);return t.view.getInt8(e)}readUnsignedByte(){let t=i3(A,this),e=t.shortRead(1);return t.buffer[e]}readShort(){let t=i3(A,this),e=t.shortRead(2);return t.view.getInt16(e,t.littleEndian)}readUnsignedShort(){let t=i3(A,this),e=t.shortRead(2);return t.view.getUint16(e,t.littleEndian)}readInt(){let t=i3(A,this),e=t.shortRead(4);return t.view.getInt32(e,t.littleEndian)}readUnsignedInt(){let t=i3(A,this),e=t.shortRead(4);return t.view.getUint32(e,t.littleEndian)}readFloat(){let t=i3(A,this),e=t.shortRead(4);return t.view.getFloat32(e,t.littleEndian)}readDouble(){let t=i3(A,this),e=t.shortRead(8);return t.view.getFloat64(e,t.littleEndian)}readUTFBytes(t){let e=i3(A,this);return i(A,e,A.toUint(t))}readUTF(){let t=i3(A,this),e=t.shortRead(2);return i(A,t,t.view.getUint16(e,t.littleEndian))}readMultiByte(t,e){let i=i3(A,this);return g(A,e,"charSet"),i.checkEOF(A.toUint(t)),""}readBytes(t,e=0,i=0){let I=i3(A,this);g(A,t,"bytes");let B=A.toUint(e),Q=A.toUint(i),C=I.available;if(0===Q&&(Q=C),Q>C)throw A.error("flash.errors::EOFError",2030);if(B+Q>0xffffffff)throw A.error("RangeError",2006);let r=i3(A,t),s=I.buffer,o=I.position;B+Q>=r.length&&r.extend(B+Q),I.position=o+Q>>>0,i2(r.buffer,B,s,o,Q)}writeBoolean(t){let e=i3(A,this),g=e.shortWrite(1);e.buffer[g]=+!!t}writeByte(t){let e=i3(A,this),g=e.shortWrite(1);e.buffer[g]=255&A.toInt(t)}writeShort(t){let e=i3(A,this),g=e.shortWrite(2);e.view.setInt16(g,A.toInt(t),e.littleEndian)}writeInt(t){let e=i3(A,this),g=e.shortWrite(4);e.view.setInt32(g,A.toInt(t),e.littleEndian)}writeUnsignedInt(t){let e=i3(A,this),g=e.shortWrite(4);e.view.setUint32(g,A.toUint(t),e.littleEndian)}writeFloat(t){let e=i3(A,this),g=e.shortWrite(4);e.view.setFloat32(g,A.toNumber(t),e.littleEndian)}writeDouble(t){let e=i3(A,this),g=e.shortWrite(8);e.view.setFloat64(g,A.toNumber(t),e.littleEndian)}writeUTFBytes(t){let e=i3(A,this);g(A,t,"value"),e.write(IW(A.toString(t)))}writeUTF(t){let e=i3(A,this);g(A,t,"value");let i=IW(A.toString(t));if(i.length>65535)throw A.error("RangeError",2006);let I=e.shortWrite(2);e.view.setUint16(I,i.length,e.littleEndian),e.write(i)}writeMultiByte(t,e){g(A,t,"value"),g(A,e,"charSet")}writeBytes(t,e=0,i=0){let I=i3(A,this);g(A,t,"bytes");let B=i3(A,t),Q=A.toUint(e),C=A.toUint(i);0===C&&(C=B.length-Q>>>0);let r=B.length;if(Q>r&&(Q=r),0===C&&(C=r-Q),C>r-Q)throw A.error("RangeError",2006);C>0&&I.write(B.buffer,Q,C)}[`${t}::_compress`](t){let e=Ce(A,t),g=i3(A,this);if(0===g.length)return;let i=g.buffer.subarray(0,g.length),I="zlib"===e?function(A,t=9){return J(A,t,!1)}(i):"deflate"===e?J(i,9,!0):F(A=>{let t=R(A,i),e=0===t||0!==A.lzmaEncode(t,i.length)?null:y(A,0);if(null===e)throw RangeError(`no memory to compress ${i.length} bytes`);return e});Cg(g,I,I.length)}[`${t}::_uncompress`](t){let e,g=Ce(A,t),i=i3(A,this);if(0===i.length)return;let I=i.buffer.subarray(0,i.length);if("lzma"===g){if(i.length<13)return;if(I[9]|I[10]|I[11]|I[12])throw A.error("flash.errors::MemoryError",1e3)}try{e="lzma"===g?function(A){let t=(A[5]|A[6]<<8|A[7]<<16|A[8]<<24)>>>0;if(t>8192*(A.length-13)+4096)throw new N(`${t} bytes in a stream of ${A.length}`);let e=k(A,0,13,t);if(0!==e.status)throw b(e);if(e.bytes.length!==t)throw new N("length mismatch");return e.bytes}(I):U(I,"deflate"===g)}catch(t){if(t instanceof S)throw A.error("flash.errors::MemoryError",1e3);if(t instanceof N)throw A.error("flash.errors::IOError",2058);throw t}Cg(i,e,0)}[`${t}::_toString`](){let t=i3(A,this),e=t.buffer.subarray(0,t.length);if(e.length>=3){if(Ct(e))return Iq(e.subarray(3));if(254===e[0]&&255===e[1]||255===e[0]&&254===e[1]){let A=255===e[0],t=[],g=new DataView(e.buffer,e.byteOffset,e.length);for(let i=2;i+1<e.length;i+=2)t.push(g.getUint16(i,A));return IT(t)}}return Iq(e)}}QS(e,"flash.utils::ByteArray",I);let B=(A,t)=>{let e=I.prototype;for(let g of t){let t=e[g];Object.defineProperty(A,g,{value(...A){let e=this.$amf,g=e.bytes,i=g.littleEndian;g.littleEndian=e.littleEndian;try{return t.apply(g.owner,A)}finally{g.littleEndian=i}}})}},Q={get endian(){return this.$amf.littleEndian?"littleEndian":"bigEndian"},set endian(t){if(g(A,t,"endian"),"bigEndian"!==t&&"littleEndian"!==t)throw A.error("ArgumentError",2008,"type");this.$amf.littleEndian="littleEndian"===t},get objectEncoding(){return this.$amf.objectEncoding},set objectEncoding(t){let e=A.toUint(t);if(0!==e&&3!==e)throw A.error("ArgumentError",2008,"objectEncoding");this.$amf.objectEncoding=e}};class C{writeObject(A){this.$amf.value(A)}}class r{readObject(){return this.$amf.value()}get bytesAvailable(){return this.$amf.bytes.available}}for(let A of[C,r])Object.defineProperties(A.prototype,Object.getOwnPropertyDescriptors(Q));return B(C.prototype,["writeBytes","writeBoolean","writeByte","writeShort","writeInt","writeUnsignedInt","writeFloat","writeDouble","writeMultiByte","writeUTF","writeUTFBytes"]),B(r.prototype,["readBytes","readBoolean","readByte","readUnsignedByte","readShort","readUnsignedShort","readInt","readUnsignedInt","readFloat","readDouble","readMultiByte","readUTF","readUTFBytes"]),QS(e,"flash.utils::ObjectOutput",C),QS(e,"flash.utils::ObjectInput",r),e}(A),...(I={},B=t=>{try{return t()}catch(t){throw Cw(A,t)}},I["avm2.intrinsics.memory::casi32"]=QJ((t,e,g)=>{let i=A.toInt(t),I=()=>i%4!=0||A.memoryLength<4||i>>>0>A.memoryLength-4;if(I()&&(A.refreshMemory?.(),I()))throw A.error("RangeError",1506);if(A.refreshMemory&&A.memoryProvider)return i3(A,A.memoryProvider).compareAndSwapInt(i,A.toInt(e),A.toInt(g));let B=A.memory.getInt32(i,!0);return B===A.toInt(e)&&A.memory.setInt32(i,A.toInt(g),!0),B}),I["avm2.intrinsics.memory::mfence"]=QJ(()=>{}),QS(I,"flash.concurrent::Mutex",class{static get isSupported(){return!0}"flash.concurrent:Mutex::ctor"(){let t=CE(A);this.$mutex=B(()=>t.sync.newMutex()),t.objects.set(this.$mutex,new WeakRef(this))}lock(){B(()=>Ca(A).lock(this.$mutex))}tryLock(){return B(()=>Ca(A).tryLock(this.$mutex))}unlock(){if(!Ca(A).unlock(this.$mutex))throw A.error("flash.errors::IllegalOperationError",1514)}}),QS(I,"flash.concurrent::Condition",class{static get isSupported(){return!0}"flash.concurrent:Condition::ctor"(t){if(null==t)throw A.error("ArgumentError",2007,"mutex");let e=CE(A);this.$mutexObject=t,this.$condition=B(()=>e.sync.newCondition(t.$mutex)),e.objects.set(this.$condition,new WeakRef(this))}get mutex(){if(!this.$mutexObject){let t=Ca(A).conditionMutex(this.$condition);this.$mutexObject=Ch(A,{kind:"mutex",address:t})}return this.$mutexObject}wait(t){let e=void 0===t?-1:A.toNumber(t);if(e<0&&-1!==e)throw A.error("ArgumentError",1515);let g=Ca(A);if(!g.holds(g.conditionMutex(this.$condition)))throw A.error("flash.errors::IllegalOperationError",1518);let i=-1===e?-1:Number.isNaN(e)?0:Math.min(Math.ceil(e),0x7fffffff);return B(()=>g.wait(this.$condition,i))}notify(){let t=Ca(A);if(!t.holds(t.conditionMutex(this.$condition)))throw A.error("flash.errors::IllegalOperationError",1516);B(()=>t.notify(this.$condition,!1))}notifyAll(){let t=Ca(A);if(!t.holds(t.conditionMutex(this.$condition)))throw A.error("flash.errors::IllegalOperationError",1517);B(()=>t.notify(this.$condition,!0))}}),I),...function(){let A={"Date.parse":A=>t=>C2(A.toString(t)),"Date.UTC":A=>(...t)=>{let e=t.map(t=>A.toNumber(t));return Cz([e[0],e[1],e[2]??1,e[3]??0,e[4]??0,e[5]??0,e[6]??0],!1)},"Date#Date::_get":()=>function(A){return C0(C1(this),A)},"Date#Date::_toString":()=>function(A){return C_(C1(this),A)},"Date#Date::_setTime":A=>function(t){return this.$time=Cf(A.toNumber(t)),this.$time},[`Date#${Cd}::getTime`]:()=>function(){return C1(this)},[`Date#${Cd}::valueOf`]:()=>function(){return C1(this)},[`Date#${Cd}::getTimezoneOffset`]:()=>function(){return C0(C1(this),16)}};for(let[t,e]of[["getUTCFullYear",0],["getUTCMonth",1],["getUTCDate",2],["getUTCDay",3],["getUTCHours",4],["getUTCMinutes",5],["getUTCSeconds",6],["getUTCMilliseconds",7],["getFullYear",8],["getMonth",9],["getDate",10],["getDay",11],["getHours",12],["getMinutes",13],["getSeconds",14],["getMilliseconds",15]])A[`Date#${Cd}::${t}`]=()=>function(){return C0(C1(this),e)};let t=["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"];for(let e=0;e<t.length;e++)for(let[g,i]of[["",e+1],["UTC",-(e+1)]])A[`Date#Date::_set${g}${t[e]}`]=A=>function(...t){return this.$time=function(A,t,e,g){let i=[0/0,0/0,0/0,0/0,0/0,0/0,0/0],I=e>0,B=Math.abs(e)-1;for(let t=0;t<g.length&&B+t<7;t++)if(i[B+t]=A.toNumber(g[t]),Number.isNaN(i[B+t]))return 0/0;let Q=I?CO(t):t;if(B<3){let A;if(Number.isNaN(t)){if(Number.isNaN(i[0]))return t;Q=0}Q=CZ(CH(Number.isNaN(i[0])?Cp(Q):i[0],Number.isNaN(i[1])?CJ(Q):i[1],Number.isNaN(i[2])?Ck(Q):i[2]),(A=Q%864e5)<0?A+864e5:A)}else{let A=Number.isNaN(i[3])?Cb(Q):i[3],t=Number.isNaN(i[4])?CU(Q):i[4],e=Number.isNaN(i[5])?CY(Q):i[5],g=Number.isNaN(i[6])?CN(Q%1e3,1e3):i[6];Q=CZ(CG(Q),CL(A,t,e,g))}return Cf(I?Cj(Q):Q)}(A,C1(this),i,t),this.$time};return A}(),"JSON.JSON::parseCore":A=>t=>(function(A,t){let e;try{e=JSON.parse(t)}catch{var g,i;let e,I,B,Q,C,r,s,o,n;return g=A,i=t,I=0,B="",Q=()=>B,C=()=>{throw g.error("SyntaxError",1132)},r=()=>{let A=I;for(;I<i.length&&i.charCodeAt(I)>=48&&57>=i.charCodeAt(I);)I++;I<=A&&C()},s=()=>{for(B="";I<i.length;){let A=i[I];switch(A){case" ":case"\n":case"\r":case" ":I++;continue;case",":case":":case"{":case"}":case"[":case"]":I++,B=A;return;case'"':{let A="",t=++I;for(;I<i.length;){let e=i.charCodeAt(I);if(e<32&&C(),34===e)break;if(92===e){A+=i.slice(t,I),++I===i.length&&C();let e=i[I],g={'"':'"',"/":"/","\\":"\\",b:"\b",f:"\f",n:"\n",r:"\r",t:" "};if(e in g)A+=g[e];else if("u"===e){let t=i.slice(I+1,I+5);/^[0-9a-fA-F]{4}$/.test(t)||C(),A+=String.fromCharCode(Number.parseInt(t,16)),I+=4}else C();t=++I}else I++}I===i.length&&C(),e=A+i.slice(t,I),I++,B='"';return}case"-":case".":case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{let A=I;"-"===i[I]&&I++,r(),"."===i[I]&&(I++,r()),("e"===i[I]||"E"===i[I])&&(("-"===i[++I]||"+"===i[I])&&I++,r()),e=i.slice(A,I),B="0";return}default:for(let A of rE)if(i.startsWith(A,I)){I+=A.length,B=A[0];return}C()}}},o=()=>{switch(Q()){case"n":return s(),null;case"t":return s(),!0;case"f":return s(),!1;case'"':{let A=e;return s(),A}case"0":{let A=Number(e);return s(),A}case"[":{s();let A=[];if("]"!==Q())for(;A.push(o()),","===Q();)s();return"]"!==Q()&&C(),s(),g.array(A)}case"{":{s();let A=g.newObject([]);if("}"!==Q())for(;;){'"'!==Q()&&C();let t=o();if(":"!==Q()&&C(),s(),g.setProperty(A,iX(t,g.userVersions),o()),","!==Q())break;s()}return"}"!==Q()&&C(),s(),A}default:return C()}},s(),n=o(),""!==Q()&&C(),n}return function A(t,e,g=0){if("object"!=typeof e||null===e)return e;if(g>500)return function(A,t){let e=[],g=t=>{if("object"!=typeof t||null===t)return t;let g=Array.isArray(t)?A.array(t):A.newObject([]);return e.push([t,g]),g},i=g(t);for(let A=e.pop();A;A=e.pop()){let[t,e]=A;if(Array.isArray(t))for(let A=0;A<t.length;A++)t[A]=g(t[A]);else{let A=e.$d;for(let e in t)A.set(e,g(t[e]))}}return i}(t,e);if(Array.isArray(e)){for(let i=0;i<e.length;i++)e[i]=A(t,e[i],g+1);return t.array(e)}let i=t.newObject([]),I=i.$d;for(let i in e)I.set(i,A(t,e[i],g+1));return i}(A,e)})(A,A.toString(t)),"JSON.JSON::stringifySpecializedToString":A=>(t,e,g,i)=>new ra(A,e?.$a?e.$a.map(t=>A.toString(t)):null,g?.$f?g:null,null==i?"":A.toString(i)).stringify(t),...s6},...function(A){let t,e,g,i,I,B,Q,C,r,s,o,n,E,a,l,h,c,w,d,u,D,f,m,G,p,M,J,k,N,S,b,U,Y,H,L,Z,K,x,v,V,X,W,q,T,P,O,j,z,$,_,AA,At,Ae,Ag,Ai,AI,AB,AQ,AC,Ar,As,Ao,An,AE,Aa,Al,Ah,Ac,Aw,Ad,AG,AF,AR,Ay,Ab,AU,AY,AH,AL,AZ,AK,Ax,Av,AV,AX,AW,Aq,AT,AP,AO,Aj,Az,A$,A_,A0,A1,A2,A3,A8,A9,A4,A5,A6,A7,tA,tt,te,tg,ti,tI,tB,tQ,tC,tr,ts,to,tn,tE,ta,tl,th,tc,tw,td,tu,tD,tf,tm,tG,tF,tR,ty,tp,tM,tJ,tk,tN,tS,tb,tU,tY,tH,tL,tZ,tK,tx,tv,tV,tX,tW,tq,tT,tP,tO,tj,tz,t$,t_,t0,t1,t2,t3,t8,t9,t4,t5,t6,t7,eA,et,ee,eg,ei,eI,eB,eQ,eC,er,es,eo,en,eE,ea,el,eh,ec,ew,ed,eu,eD,ef,em,eG,eF,eR,ey,ep,eM,eJ,ek,eN,eS,eb,eU,eY,eH,eL,eZ,eK,ex,ev,eV,eX,eW,eq,eT,eP,eO,ej,ez,e$,e_,e0,e1,e2,e3,e8,e9,e4,e5,e6,e7,gA,gt,ge,gg,gi,gI,gB,gQ,gC,gr,gs,go,gn,gE,ga,gl,gh,gc,gw,gd,gu,gD;return{...(QS(t={},"flash.accessibility::Accessibility",class{static get active(){return!1}static sendEvent(t,e,g,i){if(null==t)throw A.rt.error("TypeError",2007,"source")}static updateProperties(){}}),t),trace:A=>(...t)=>{A.print(t.map(t=>A.toString(t)).join(" "))},"flash.utils::getDefinitionByName":t=>e=>G9(t,t.toString(e),e=>t.definitionNamed(e,A.code.codeDomain())),"flash.utils::getAliasName":A=>t=>{if(null==t)return null;let e=A.aliasOf(t.$it?t.$it:A.traitsOf(t));return""===e?null:e},"flash.utils::getTimer":()=>()=>A.timers.timer(),"flash.utils::escapeMultiByte":A=>t=>(function(A){let t=A.indexOf("\0"),e=G4.encode(t<0?A:A.slice(0,t)),g="";for(let A=0;A<e.length;A++){let t=e[A];g+=t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122?String.fromCharCode(t):`%${t.toString(16).toUpperCase().padStart(2,"0")}`}return g})(A.toString(t)),"flash.utils::unescapeMultiByte":A=>t=>(function(A){let t=[];for(let e=0;e<A.length;){let g=A[e++];if("\0"===g)break;if("%"!==g){for(let A of G4.encode(g))t.push(A);continue}let i=A[e++];if(void 0===i||!G5.test(i))continue;let I=A[e++];void 0!==I&&G5.test(I)&&t.push(Number.parseInt(i+I,16))}let e="";for(let A=0;A<t.length;){let g=t[A],i=g<128?1:g>=192&&g<224?2:g>=224&&g<240?3:4*(g>=240&&g<248),I=1===i?g:2===i?31&g:3===i?15&g:7&g,B=i>0&&A+i<=t.length;for(let e=1;B&&e<i;e++){let g=t[A+e];B=(192&g)==128,I=I<<6|63&g}if(!B){e+=String.fromCharCode(g),A++;continue}e+=String.fromCodePoint(I),A+=i}return e})(A.toString(t)),"flash.crypto::generateRandomBytes":A=>t=>{let e=A.toUint(t);if(0===e)return null;if(e>1024)throw A.error("Error",2004);let g=globalThis.crypto;if(!g?.getRandomValues)throw A.error("Error",0);let i=A.construct(A.classNamed("flash.utils::ByteArray")),I=i3(A,i);I.setLength(e);try{g.getRandomValues(I.buffer.subarray(0,e))}catch{throw A.error("Error",0)}return i},...(e=(t,e,g)=>{let i=A.rt;if(null==e)throw i.error("TypeError",2007,"value");if(null==g)throw i.error("TypeError",2007,"charSet");t.write(function(A,t){switch(t){case"utf-8":return Fc.encode(A);case"utf-16":case"utf-16le":case"unicode":return Fm(A,!0);case"utf-16be":case"unicodefffe":return Fm(A,!1)}let e="iso-8859-1"===t||"iso_8859-1"===t||"latin1"===t,g="ascii"===t||"us-ascii"===t,i=e||g?null:function(A){let t=FD.get(A.encoding);if(t)return t;t=new Map;let e=new Uint8Array(1);for(let g=0;g<256;g++){e[0]=g;let i=A.decode(e);1!==i.length||"�"===i||t.has(i)||t.set(i,g)}if(Ff.has(A.encoding)){let e=new Uint8Array(2);for(let g=129;g<255;g++){e[0]=g;for(let i=64;i<255;i++){e[1]=i;let I=A.decode(e);1!==I.length||"�"===I||t.has(I)||t.set(I,65536|g<<8|i)}}}return FD.set(A.encoding,t),t}(Fw(t)),I=[];for(let t of A){let A,B=t.charCodeAt(0);void 0===(A=e||g?1===t.length&&B<(g?128:256)?B:void 0:i.get(t))?I.push(63):A>65535?I.push(A>>8&255,255&A):I.push(A)}return new Uint8Array(I)}(i.toString(e),i.toString(g).toLowerCase()))},g=(t,e,g)=>{let i=A.rt;if(null==g)throw i.error("TypeError",2007,"charSet");let I=i.toUint(e);t.checkEOF(I);let B=i.toString(g).toLowerCase();switch(B){case"utf-16":case"utf-16le":case"unicode":return Fu(t.readView(I-I%2),!0);case"utf-16be":case"unicodefffe":return Fu(t.readView(I-I%2),!1)}let Q=t.readView(I),C=Q.indexOf(0);switch(C>=0&&(Q=Q.subarray(0,C)),B){case"iso-8859-1":case"iso_8859-1":case"latin1":return Fd(Q,!1);case"ascii":case"us-ascii":return Fd(Q,!0)}let r=Fw(B),s=r.decode(Q);return"shift_jis"===r.encoding&&s.includes("�")?function(A,t){let e=[];for(let g=0;g<A.length;g++){let i=A[g];if(i>=129&&i<=159||i>=224&&i<=252){let i=A[++g];void 0===i||i<64||127===i||i>252?e.push("・"):e.push(t.decode(A.subarray(g-1,g+1)).replaceAll("�","・"))}else 128===i?e.push("€"):160===i||i>=253?e.push(String.fromCharCode(160===i?63728:63729+i-253)):e.push(t.decode(A.subarray(g,g+1)))}return e.join("")}(Q,r):s},{"flash.utils::ByteArray#readMultiByte":QJ(function(t,e){return g(i3(A.rt,this),t,e)}),"flash.utils::ByteArray#writeMultiByte":QJ(function(t,g){e(i3(A.rt,this),t,g)}),"flash.utils::ObjectOutput#writeMultiByte":QJ(function(A,t){e(this.$amf.bytes,A,t)}),"flash.utils::ByteArray#writeObject":QJ(function(t){let e=i3(A.rt,this);(0|e.objectEncoding)<3?new GP(A.rt,e).value(t):new I0(A.rt,e).value(t)}),"flash.utils::ByteArray#readObject":QJ(function(){let t=i3(A.rt,this);return(0|t.objectEncoding)<3?new GO(A.rt,t).value():new I1(A.rt,t).value()}),"flash.utils::ObjectInput#readMultiByte":QJ(function(A,t){return g(this.$amf.bytes,A,t)})}),...(i={},I=()=>{if(!A.clipboard.writable)throw A.rt.error("SecurityError",2191)},B=t=>(t&&(i3(A.rt,t).position=0),t??null),QS(i,"flash.desktop::Clipboard",class{static get generalClipboard(){var t=A;let e=DN.get(t);if(!e){DS=!0;try{e=t.rt.constructClass(t.rt.classNamed("flash.desktop::Clipboard"),[])}finally{DS=!1}DN.set(t,e)}return e}get formats(){let t=A.clipboard.formats.map(A=>A.startsWith(DJ)?A.slice(DJ.length):A.startsWith(Dk)?A.slice(Dk.length):A);return A.rt.array([...new Set(t)])}clear(){I(),A.clipboard.clear()}clearData(t){I();let e=A.rt.toString(t);e.startsWith("air:")||e.startsWith("flash:")?A.clipboard.delete(e):(A.clipboard.delete(DJ+e),A.clipboard.delete(Dk+e))}get"flash.desktop:Clipboard::alive"(){return!0}get"flash.desktop:Clipboard::canReadContents"(){return A.clipboard.readable}get"flash.desktop:Clipboard::canWriteContents"(){return A.clipboard.writable}"flash.desktop:Clipboard::nativeSetHandler"(t,e){A.clipboard.setHandler(A.rt.toString(t),()=>{A.rt.call(e,null)})}"flash.desktop:Clipboard::setHandlerStoringData"(t){A.clipboard.storing=!!t}"flash.desktop:Clipboard::getObjectReference"(t){return A.clipboard.get(A.rt.toString(t))}"flash.desktop:Clipboard::putObjectReference"(t,e){A.clipboard.set(A.rt.toString(t),e)}"flash.desktop:Clipboard::getString"(){return A.clipboard.get(DC)??null}"flash.desktop:Clipboard::putString"(t){A.clipboard.set(DC,A.rt.toString(t))}"flash.desktop:Clipboard::getHTML"(){return A.clipboard.get(Dr)??null}"flash.desktop:Clipboard::putHTML"(t){A.clipboard.set(Dr,A.rt.toString(t))}"flash.desktop:Clipboard::getRTF"(){return B(A.clipboard.get(Dp))}"flash.desktop:Clipboard::putRTF"(t){A.clipboard.set(Dp,t)}"flash.desktop:Clipboard::getByteArray"(t){return B(A.clipboard.get(A.rt.toString(t)))}"flash.desktop:Clipboard::putByteArray"(t,e){A.clipboard.set(A.rt.toString(t),e)}get"flash.desktop:Clipboard::swfVersion"(){return A.rt.swfVersion}get supportsFilePromise(){return!1}"flash.desktop:Clipboard::getURL"(){return A.clipboard.get(DM)??null}"flash.desktop:Clipboard::putURL"(t){A.clipboard.set(DM,A.rt.toString(t))}"flash.desktop:Clipboard::getBitmapData"(){return null}"flash.desktop:Clipboard::putBitmapData"(){}"flash.desktop:Clipboard::getFileList"(){return null}"flash.desktop:Clipboard::nativePutFileList"(){}"flash.desktop:Clipboard::nativeGetFilePromiseList"(){return null}"flash.desktop:Clipboard::nativePutFilePromiseList"(){}}),i),...(Q={},C=null,r=[],s=!0,o=300,n="normal",E=!1,a=()=>{let t=C,e=t.$listeners?.get(D0)??[];for(let g of r.splice(0)){if(!e.some(A=>A.fn===g&&!A.capture))continue;let i=A.rt.construct(A.rt.classNamed("flash.events::InvokeEvent"),D0,!1,!1,A.application?.currentDirectory?function(A,t){let e=A.rt.construct(A.rt.classNamed("flash.filesystem::File"));return e.$fileLocation={root:"file",path:t},e}(A,A.application.currentDirectory):null,A.rt.array([...A.application?.arguments??[]]),"standard");!function(A,t,e,g){let i=cb(A);e[i.target]=t.$target??t,e[i.currentTarget]=t,e[i.phase]=2;try{A.rt.call(g,null,e)}catch(t){A.reportUncaught(t,g)}}(A,t,i,g)}},QS(Q,"flash.desktop::NativeApplication",class{static get nativeApplication(){return C??=A.rt.construct(A.rt.classNamed("flash.desktop::NativeApplication"))}static get supportsMenu(){return!1}static get supportsDockIcon(){return!1}static get supportsSystemTrayIcon(){return!1}static get supportsDefaultApplication(){return!1}static get supportsStartAtLogin(){return!1}addEventListener(t,e,g,i){DK(A,this,t,e,g,i)&&t===D0&&!g&&(0===r.length&&A.afterExitFrame.push(a),r.push(e))}removeEventListener(t,e,g){Dx(A,this,t,e,g)}dispatchEvent(t){return cK(A,this,t)}exit(t){A.application?.exit?.(0|Number(t))}get runtimeVersion(){return D_}get runtimePatchLevel(){return 2}get applicationID(){return A.application?.id??""}get publisherID(){return""}get applicationDescriptor(){let t=A.application?.descriptor;return t?A.rt.constructClass(A.rt.builtinClass("XML"),[t]):null}get menu(){return null}set menu(A){}get icon(){return null}get autoExit(){return s}set autoExit(A){s=!!A}get idleThreshold(){return o}set idleThreshold(A){o=0|Number(A)}get timeSinceLastUserInput(){return 0}get systemIdleMode(){return n}set systemIdleMode(A){n=String(A)}get executeInBackground(){return E}set executeInBackground(A){E=!!A}get startAtLogin(){throw A.rt.error("Error",2014)}set startAtLogin(t){throw A.rt.error("Error",2014)}get activeWindow(){let t=DU(A);return t&&A.application?.window?.active()?t:null}get openedWindows(){let t=DU(A);return A.rt.array(t?[t]:[])}activate(t){A.application?.window?.activate?.()}copy(){return!1}cut(){return!1}paste(){return!1}clear(){return!1}selectAll(){return!1}getDefaultApplication(A){return null}isSetAsDefaultApplication(A){return!1}setAsDefaultApplication(t){throw A.rt.error("Error",2014)}removeAsDefaultApplication(t){throw A.rt.error("Error",2014)}}),Q),...(l={},h=A.fileSystem,c=new DV(h?.separator??"/"),w=A=>{switch(A){case"app":return h?.directories.application??null;case"app-storage":return h?.directories.applicationStorage??null;default:return null}},d=t=>{let e=A.rt.construct(A.rt.classNamed("flash.filesystem::File"));return e.$fileLocation=t,e},u=(t,e)=>{if(!e)throw A.rt.error("Error",2014);return d({root:t,path:c.normalize(e)??e})},D=t=>{let e=D$(t);if(!e)throw A.rt.error("Error",2037);return e},f=()=>{throw A.rt.error("ArgumentError",2004)},m=A=>{let t=/^(app|app-storage):(.*)$/i.exec(A);if(t){let A=t[1].toLowerCase(),e=w(A),g=c.urlSegments(t[2]);return e&&g?{root:A,path:c.resolve(e,g.join(c.separator),e)}:null}if(/^file:/i.test(A)){let t=c.fromFileUrl(A);return t?{root:"file",path:t}:null}if(/^[a-z][a-z0-9+.-]*:\/\//i.test(A))return null;let e=c.normalize(A);return e?{root:"file",path:e}:null},G=t=>{if(t)throw A.rt.error("flash.errors::IOError",t)},p=t=>{if(null==t)throw A.rt.error("TypeError",2007,"newLocation");let e=D(t);return DW(A,e),e},M=(t,e)=>{A.loads.deferHostEvent(()=>{let g=e();cK(A,t,g?Dz(A,g):A.event("complete"))})},J=t=>{let e=function(A,t){let e=A.fileSystem,g=e?.directories.cache;if(!e||!g)return null;let i=Dq(A),I=new DV(e.separator),B=Math.floor(65535*Math.random());for(let A=0;A<65535;A++){let Q=(B+A)%65535+1,C=I.resolve(g,`fla${Q.toString(16)}.tmp`,null);if(e.stat(C))continue;let r=t?!!i?.createDirectory(C):!!i?.write(C,new Uint8Array(0),0,0);return{path:C,made:r}}return null}(A,t);if(!e||t&&!e.made)throw A.rt.error("flash.errors::IllegalOperationError",2014);return d({root:"file",path:e.path})},QS(l,"flash.filesystem::File",class{static get systemCharset(){return"utf-8"}static get separator(){return c.separator}static get lineEnding(){return"\\"===c.separator?"\r\n":"\n"}static get applicationDirectory(){return u("app",h?.directories.application)}static get applicationStorageDirectory(){return u("app-storage",h?.directories.applicationStorage)}static get userDirectory(){return u("file",h?.directories.user)}static get documentsDirectory(){return u("file",h?.directories.documents)}static get desktopDirectory(){return u("file",h?.directories.desktop)}static get cacheDirectory(){return u("file",h?.directories.cache)}static getRootDirectories(){let t=new Set;for(let A of Object.values(h?.directories??{})){let e=A?c.normalize(A):null;for(;e&&null!==c.parent(e);)e=c.parent(e);e&&t.add(e)}return A.rt.array([...t].map(A=>d({root:"file",path:A})))}static createTempFile(){return J(!1)}static createTempDirectory(){return J(!0)}"flash.filesystem:File::_init"(A){this.$fileLocation=m(String(A))??f()}toString(){return"[object File]"}get exists(){return!!h?.stat(D(this).path)}get isDirectory(){return h?.stat(D(this).path)?.directory??!1}get isHidden(){return h?.stat(D(this).path)?.hidden??!1}get isSymbolicLink(){return h?.stat(D(this).path)?.symbolicLink??!1}get isPackage(){return D(this),!1}resolvePath(A){let t=D(this),e=String(A??"");return/^(file|app|app-storage):/i.test(e)&&!c.isAbsolute(e)?d(m(e)??f()):c.isAbsolute(e)?d({root:"file",path:c.normalize(e)}):d({root:t.root,path:c.resolve(t.path,e,w(t.root))})}getRelativePath(A,t){let e=D(this).path,g=D(A).path,i=c.under(g,e);if(i)return i.join("/");if(!t)return null;let I=e,B=0;for(;null!==I&&!c.under(g,I);)I=c.parent(I),B++;return null===I?null:[...Array(B).fill(".."),...c.under(g,I)].join("/")}get parent(){let A=D(this),t=w(A.root);if(null!==t&&c.under(t,A.path))return null;let e=c.parent(A.path);return null===e?null:d({root:A.root,path:e})}get nativePath(){return D(this).path}set nativePath(A){let t=c.normalize(String(A??""));this.$fileLocation=t?{root:"file",path:t}:f()}canonicalize(){D(this)}get url(){let A=D(this),t=w(A.root);if(null!==t){let e=c.under(A.path,t)??[];return`${A.root}:/${e.map(encodeURIComponent).join("/")}`}return c.fileUrl(A.path)}set url(A){let t=String(A??""),e=/^(file|app|app-storage):/i.test(t)?m(t):null;this.$fileLocation=e??f()}getDirectoryListing(){let t=D(this);if(!(t=>{let e=h?.stat(t.path);if(!e)throw A.rt.error("Error",3003);return e})(t).directory)throw A.rt.error("Error",3007);let e=h?.list(t.path)??[];return A.rt.array(e.map(A=>d({root:t.root,path:c.resolve(t.path,A,null)})))}getDirectoryListingAsync(){let t=D(this);A.loads.deferHostEvent(()=>{let e=h?.stat(t.path);if(!e?.directory)return void cK(A,this,Dz(A,e?3007:3003));let g=(h?.list(t.path)??[]).map(A=>d({root:t.root,path:c.resolve(t.path,A,null)}));cK(A,this,A.rt.construct(A.rt.classNamed("flash.events::FileListEvent"),"directoryListing",!1,!1,A.rt.array(g)))})}createDirectory(){var t;let e;G((t=p(this).path,(e=A.fileSystem?.stat(t))?3002*!e.directory:3001*!Dq(A)?.createDirectory(t)))}deleteFile(){G(DP(A,p(this).path))}deleteFileAsync(){let t=p(this);M(this,()=>DP(A,t.path))}deleteDirectory(t=!1){G(DO(A,p(this).path,!!t))}deleteDirectoryAsync(t=!1){let e=p(this);M(this,()=>DO(A,e.path,!!t))}copyTo(t,e=!1){G(Dj(A,D(this).path,p(t).path,!!e,!1))}copyToAsync(t,e=!1){let g=D(this),i=p(t);M(this,()=>Dj(A,g.path,i.path,!!e,!1))}moveTo(t,e=!1){G(Dj(A,p(this).path,p(t).path,!!e,!0))}moveToAsync(t,e=!1){let g=p(this),i=p(t);M(this,()=>Dj(A,g.path,i.path,!!e,!0))}clone(){return d({...D(this)})}cancel(){}get icon(){return null}get downloaded(){return!1}set downloaded(A){}get preventBackup(){return!1}set preventBackup(A){}}),l),...(k={},N=A.fileSystem,S=()=>{throw A.rt.error("flash.errors::IOError",2029)},b=A=>{let t=A.$buffer??S();return"write"===A.$mode||"append"===A.$mode?S():t},U=A=>{let t=A.$buffer??S();return"read"===A.$mode?S():t},Y=(t,e,...g)=>A.rt.callProp(b(t),e,...g),H=(t,e,...g)=>{let i=i3(A.rt,U(t)),I=i.position;A.rt.callProp(t.$buffer,e,...g),t.$written=(t.$written??0)+(i.position-I),Z(t,I,i.position)},L=t=>{let e;return e=A.rt.construct(A.rt.classNamed("flash.events::OutputProgressEvent"),"outputProgress",!1,!1,0,t.$written??0),cK(A,t,e)},Z=(t,e,g)=>{if(t.$from=Math.min(t.$from??e,e),t.$to=Math.max(t.$to??g,g),t.$flushing)return;t.$flushing=!0;let i=t.$generation;A.loads.deferHostEvent(()=>{t.$generation===i&&(t.$flushing=!1,K(t)&&t.$async&&L(t))})},K=t=>{if(void 0===t.$from||!t.$buffer||!t.$made)return!1;let e=i3(A.rt,t.$buffer),g=Math.min(t.$from,e.length),i=Math.max(g,Math.min(t.$to??g,e.length));return t.$from=void 0,t.$to=void 0,DT(A,t.$path,e.buffer.subarray(g,i),g,e.length),!0},x=(t,e)=>{if(null==t)throw A.rt.error("TypeError",2007,"file");let g=D$(t);if(!g)throw A.rt.error("flash.errors::IllegalOperationError",2037);let i=A.rt.toString(e);if(!mk.includes(i))throw A.rt.error("ArgumentError",2004);return"read"!==i&&DW(A,g),{path:g.path,mode:i}},v=A=>{let t=N?.stat(A);return t?t.directory?3006:N?.read?.(A)??3003:3003},V=(t,e)=>{let g=function(A,t){let e=A.fileSystem;if(e?.stat(t)?.directory)return 3006;let g=new DV(e?.separator??"/");for(let A=g.parent(t);null!==A;A=g.parent(A)){let t=e?.stat(A);if(t){if(!t.directory)return 3003;break}}return 3001*!Dq(A)}(A,t);if(g)return g;let i=!!N?.stat(t),I="write"!==e&&i?N?.read?.(t):mN;return I&&DT(A,t,mN,I.length,I.length)?I:3001},X=(t,e,g,i)=>{K(t),t.$generation=(t.$generation??0)+1;let I=A.rt.construct(A.rt.classNamed("flash.utils::ByteArray"));return A.rt.setProp(I,"endian",t.$endian??"bigEndian"),A.rt.setProp(I,"objectEncoding",t.$objectEncoding??3),t.$buffer=I,t.$async=e,t.$path=g,t.$mode=i,t.$made=!e,t.$from=void 0,t.$to=void 0,t.$flushing=!1,t.$written=0,I},W=A=>{let t=K(A);return A.$buffer=null,A.$generation=(A.$generation??0)+1,t},q=(t,e,g)=>{let i=i3(A.rt,t.$buffer),I=i.position,B=Math.max(g,t.$from??1/0),Q=Math.min(g+e.length,t.$to??0,i.length),C=B<Q?i.buffer.slice(B,Q):null;i.position=g,i.write(e),C&&(i.position=B,i.write(C)),i.position=I},T=(t,e)=>{let g=i3(A.rt,t.$buffer);g.write(e),g.position="append"===t.$mode?g.length:0},P=(t,e,g,i)=>{let I=0,B=()=>{let Q;if(t.$generation!==g)return;let C=Math.min(I+40960,e.length);if(q(t,e.subarray(I,C),I),I=C,Q=A.rt.construct(A.rt.classNamed("flash.events::ProgressEvent"),"progress",!1,!1,I,e.length),cK(A,t,Q),t.$generation===g)if(I<e.length)A.loads.deferHostEvent(B);else{let e;i(),e=A.event("complete"),cK(A,t,e)}};A.loads.deferHostEvent(B)},QS(k,"flash.filesystem::FileStream",class{open(t,e){let g=x(t,e),i="read"===g.mode?v(g.path):V(g.path,g.mode);if("number"==typeof i)throw W(this),A.rt.error("flash.errors::IOError",i);X(this,!1,g.path,g.mode),T(this,i)}openAsync(t,e){let g=x(t,e);X(this,!0,g.path,g.mode);let i=this.$generation,I=t=>{let e;W(this),e=Dz(A,t,` file: ${g.path}`),cK(A,this,e)};if("read"===g.mode){let t=v(g.path);A.loads.deferHostEvent(()=>{this.$generation===i&&("number"==typeof t?I(t):P(this,t,i,()=>{}))});return}"append"===g.mode&&T(this,N?.read?.(g.path)??mN),A.loads.deferHostEvent(()=>{if(this.$generation!==i)return;let A=V(g.path,g.mode);"number"==typeof A?I(A):"update"===g.mode?P(this,A,i,()=>{this.$made=!0,K(this)&&L(this)}):(this.$made=!0,K(this)&&L(this))})}close(){if(!this.$buffer)return;if(!this.$made&&"read"!==this.$mode){let A=V(this.$path,this.$mode);"number"!=typeof A&&("update"===this.$mode&&q(this,A,0),this.$made=!0)}let t=W(this);if(this.$async){let e=this.$generation;A.loads.deferHostEvent(()=>{if(this.$generation===e){let e;t&&L(this),e=A.event("close"),cK(A,this,e)}})}}truncate(){let t=U(this),e=i3(A.rt,t).position;A.rt.setProp(t,"length",e),Z(this,e,e),K(this)}get position(){return i3(A.rt,this.$buffer??S()).position}set position(t){let e=i3(A.rt,this.$buffer??S());if("append"===this.$mode)throw A.rt.error("flash.errors::IllegalOperationError",2037);e.position=A.rt.toUint(t)>>>0}get bytesAvailable(){return i3(A.rt,b(this)).available}get readAhead(){return this.$readAhead??1/0}set readAhead(t){this.$readAhead=A.rt.toNumber(t)}get endian(){return this.$buffer?A.rt.prop(this.$buffer,"endian"):this.$endian??"bigEndian"}set endian(t){this.$buffer&&A.rt.setProp(this.$buffer,"endian",t),this.$endian=this.$buffer?A.rt.prop(this.$buffer,"endian"):t}get objectEncoding(){return this.$buffer?A.rt.prop(this.$buffer,"objectEncoding"):this.$objectEncoding??3}set objectEncoding(t){this.$buffer&&A.rt.setProp(this.$buffer,"objectEncoding",t),this.$objectEncoding=this.$buffer?A.rt.prop(this.$buffer,"objectEncoding"):t}readBytes(A,t=0,e=0){Y(this,"readBytes",A,t,e)}readBoolean(){return Y(this,"readBoolean")}readByte(){return Y(this,"readByte")}readUnsignedByte(){return Y(this,"readUnsignedByte")}readShort(){return Y(this,"readShort")}readUnsignedShort(){return Y(this,"readUnsignedShort")}readInt(){return Y(this,"readInt")}readUnsignedInt(){return Y(this,"readUnsignedInt")}readFloat(){return Y(this,"readFloat")}readDouble(){return Y(this,"readDouble")}readUTF(){return Y(this,"readUTF")}readUTFBytes(A){return Y(this,"readUTFBytes",A)}readMultiByte(A,t){return Y(this,"readMultiByte",A,t)}readObject(){return Y(this,"readObject")}writeBoolean(...A){H(this,"writeBoolean",...A)}writeByte(...A){H(this,"writeByte",...A)}writeBytes(...A){H(this,"writeBytes",...A)}writeDouble(...A){H(this,"writeDouble",...A)}writeFloat(...A){H(this,"writeFloat",...A)}writeInt(...A){H(this,"writeInt",...A)}writeMultiByte(...A){H(this,"writeMultiByte",...A)}writeObject(...A){H(this,"writeObject",...A)}writeShort(...A){H(this,"writeShort",...A)}writeUnsignedInt(...A){H(this,"writeUnsignedInt",...A)}writeUTF(...A){H(this,"writeUTF",...A)}writeUTFBytes(...A){H(this,"writeUTFBytes",...A)}}),k),...(O={},j=t=>{if(null==t)throw A.rt.error("ArgumentError",2007,"name");let e=A.rt.toString(t);if(""===e)throw A.rt.error("ArgumentError",2085,"name");return e},QS(O,"flash.data::EncryptedLocalStore",class{static get isSupported(){return null!==A.encryptedStore}static setItem(t,e,g=!1){let i=j(t);if(null==e)throw A.rt.error("ArgumentError",2007,"data");let I=i3(A.rt,e),B=I.buffer.slice(0,I.length);0===B.length?A.encryptedStore?.removeItem(i):A.encryptedStore?.setItem(i,B)}static getItem(t){let e=A.encryptedStore?.getItem(j(t));if(!e||0===e.length)return null;let g=A.rt.construct(A.rt.classNamed("flash.utils::ByteArray")),i=i3(A.rt,g);return i.write(e),i.position=0,g}static removeItem(t){A.encryptedStore?.removeItem(j(t))}static reset(){A.encryptedStore?.reset()}}),O),...(QS(z={},"flash.display::NativeMenu",class{static get isSupported(){return A.air}"flash.display:NativeMenu::show"(t,e,g){let i=A.showMenu;if(!i||A.destroyed)return;let I=function(A,t,e){let g=A.rt,i=(A,t)=>g.getProperty(A,g.publicName(String(t))),I=g.toUint(g.prop(e,"length")),B=g.classNamed("flash.ui::ContextMenuItem"),Q=[],C=!1,r=!1;for(let s=0;s<I;s++){let I=i(e,s);if(g.prop(I,"isSeparator")){C=Q.length>0;continue}let o=g.isInstance(I,B),n=g.prop(I,"submenu"),E=!n&&g.prop(I,"enabled"),a=o&&g.prop(I,"separatorBefore");Q.push({caption:`${g.prop(I,"label")??""}${n?" ▸":""}`,enabled:E,separatorBefore:C||a,checked:g.prop(I,"checked")||void 0,select:()=>{E&&!r&&!A.destroyed&&(r=!0,A.clipboard.gesture(()=>{if(o)return void cL(A,I,g.construct(g.classNamed("flash.events::ContextMenuEvent"),"menuItemSelect",!1,!1,null,null));let e=[[I,I]],i=new Set;for(let A=t;A&&!i.has(A);A=g.prop(A,"parent"))i.add(A),e.push([A,A]);cZ(A,g.construct(g.classNamed("flash.events::Event"),"select",!0,!1),e)}),A.updates++)}}),C=!1}return Q}(A,this,t);I.length>0&&i(I,A.rt.toNumber(e),A.rt.toNumber(g))}}),z),...($={},_=(t,e)=>A.rt.construct(A.rt.classNamed("flash.geom::Point"),t,e),AA=!1,At=!1,Ae=null,Ag=null,Ai=t=>{let e=A.application?.window;if(!e||t!==Db.get(A))throw A.rt.unsupported("a NativeWindow a script opens");return e},AI=(A,t)=>{let e=Ai(A);e.setBounds?.({...e.bounds(),...t})},QS($,"flash.display::NativeWindow",class{static get isSupported(){return A.air}static get supportsMenu(){return!1}static get supportsNotification(){return!1}static get supportsTransparency(){return!1}static get systemMinSize(){return _(1,1)}static get systemMaxSize(){return _(0x6666666,0x6666666)}get stage(){return Ai(this),A.stage?.object??null}get title(){return Ai(this).title()}set title(A){Ai(this).setTitle?.(String(A))}get bounds(){let t=Ai(this).bounds();return A.rt.construct(A.rt.classNamed("flash.geom::Rectangle"),t.x,t.y,t.width,t.height)}set bounds(t){if(null===t)throw A.rt.error("TypeError",2007,"bounds");AI(this,{x:Number(A.rt.prop(t,"x")),y:Number(A.rt.prop(t,"y")),width:Number(A.rt.prop(t,"width")),height:Number(A.rt.prop(t,"height"))})}get x(){return Ai(this).bounds().x}set x(A){AI(this,{x:Number(A)})}get y(){return Ai(this).bounds().y}set y(A){AI(this,{y:Number(A)})}get width(){return Ai(this).bounds().width}set width(A){AI(this,{width:Number(A)})}get height(){return Ai(this).bounds().height}set height(A){AI(this,{height:Number(A)})}get displayState(){return Ai(this).displayState()}minimize(){A.fullScreen.set("normal"),Ai(this).minimize?.()}maximize(){Ai(this).maximize?.()}restore(){A.fullScreen.set("normal"),Ai(this).restore?.()}close(){let A=Ai(this);AA||(AA=!0,A.close?.())}get closed(){return Ai(this),AA}get visible(){return Ai(this).visible()}set visible(A){Ai(this).setVisible?.(!!A)}get active(){return Ai(this).active()}activate(){Ai(this).activate?.()}get systemChrome(){return Ai(this),"standard"}get transparent(){return Ai(this),!1}get type(){return Ai(this),"normal"}get minimizable(){return Ai(this),!0}get maximizable(){return Ai(this),!0}get resizable(){return Ai(this),!0}startMove(){return Ai(this),!1}startResize(){return Ai(this),!1}get minSize(){return Ai(this),Ae??=_(1,1)}set minSize(A){Ai(this),Ae=A}get maxSize(){return Ai(this),Ag??=_(0x6666666,0x6666666)}set maxSize(A){Ai(this),Ag=A}get alwaysInFront(){return Ai(this),At}set alwaysInFront(A){Ai(this),At=!!A}orderToFront(){return Ai(this),!1}orderToBack(){return Ai(this),!1}orderInFrontOf(A){return Ai(this),!1}orderInBackOf(A){return Ai(this),!1}globalToScreen(t){let e=Ai(this),g=e.bounds(),i=e.stageOffset();return _(g.x+i.x+Number(A.rt.prop(t,"x")),g.y+i.y+Number(A.rt.prop(t,"y")))}get menu(){return Ai(this),null}set menu(A){Ai(this)}notifyUser(A){Ai(this)}}),$),...(AB={},AQ=new WeakMap,AC=(t,e)=>Number(A.rt.prop(t,e)),Ar=t=>A.rt.construct(A.rt.classNamed("flash.geom::Rectangle"),t.x,t.y,t.width,t.height),As=()=>{let t=A.application?.screens?.();if(t&&t.length>0)return t;let e={x:0,y:0,width:A.screenCapabilities.screenResolutionX||1920,height:A.screenCapabilities.screenResolutionY||1080};return[{bounds:e,visibleBounds:e,colorDepth:32}]},Ao=t=>{let e=A.rt.classNamed("flash.display::Screen").$it,g=e.instance();return e.proto.$init.call(g),AQ.set(g,{screen:t,bounds:null,visibleBounds:null}),g},QS(AB,"flash.display::Screen",class{static get screens(){return A.rt.array(As().map(Ao))}static get mainScreen(){let A=As();return Ao(A.find(A=>A.main)??A[0])}static getScreensForRectangle(t){if(null==t)throw A.rt.error("TypeError",2007,"rect");let e={x:AC(t,"x"),y:AC(t,"y"),width:AC(t,"width"),height:AC(t,"height")};return A.rt.array(As().filter(A=>{var t;let g,i,I,B;return t=A.bounds,g=mh(e.x),i=mh(e.y),I=g+mh(e.width)|0,B=i+mh(e.height)|0,!(I<=g)&&!(B<=i)&&g<t.x+t.width&&I>t.x&&i<t.y+t.height&&B>t.y}).map(Ao))}get bounds(){let A=AQ.get(this);return A.bounds??=Ar(A.screen.bounds),A.bounds}get visibleBounds(){let A=AQ.get(this);return A.visibleBounds??=Ar(A.screen.visibleBounds),A.visibleBounds}get colorDepth(){let A;return(A=0|AQ.get(this).screen.colorDepth)>=24&&A<32?32:A}}),AB),...(QS(An={},"flash.events::Event",class{"flash.events:Event::ctor"(t,e,g){if(null==t)throw A.rt.error("TypeError",2007,"type");this.$type=String(t),this.$bubbles=!!e,this.$cancelable=!!g,this.$target=null,this.$currentTarget=null,this.$phase=2,this.$stopped=0,this.$prevented=!1}get type(){return this.$type}get bubbles(){return this.$bubbles}get cancelable(){return this.$cancelable}get target(){return this.$target}get currentTarget(){return this.$currentTarget}get eventPhase(){return this.$phase}stopPropagation(){this.$stopped=Math.max(this.$stopped,1)}stopImmediatePropagation(){this.$stopped=2}preventDefault(){this.$cancelable&&(this.$prevented=!0)}isDefaultPrevented(){return this.$prevented}}),An),...(QS(AE={},"flash.events::KeyboardEvent",class{get charCode(){return this.$charCode??0}set charCode(t){this.$charCode=A.rt.toUint(t)}get ctrlKey(){return this.$ctrlKey??!1}set ctrlKey(A){this.$ctrlKey=!!A}get altKey(){return this.$altKey??!1}set altKey(A){this.$altKey=!!A}get shiftKey(){return this.$shiftKey??!1}set shiftKey(A){this.$shiftKey=!!A}get commandKey(){return this.$commandKey??!1}set commandKey(A){this.$commandKey=!!A}updateAfterEvent(){A.updates++}}),QS(AE,"flash.events::TextEvent",class{"flash.events:TextEvent::copyNativeData"(A){}}),AE),...(QS(Aa={},"flash.events::TimerEvent",class{updateAfterEvent(){A.updates++,A.timers.renderAsked=!0}}),Aa),...(QS(Al={},"flash.events::MouseEvent",class{updateAfterEvent(){A.updates++}get localX(){return this.$mouseX??0/0}set localX(t){this.$mouseX=A.rt.toNumber(t)}get localY(){return this.$mouseY??0/0}set localY(t){this.$mouseY=A.rt.toNumber(t)}"flash.events:MouseEvent::getStageX"(t,e){return mM(A,this,t??this.$mouseX,e??this.$mouseY)[0]}"flash.events:MouseEvent::getStageY"(t,e){return mM(A,this,t??this.$mouseX,e??this.$mouseY)[1]}get movementX(){return this.$movementX??0}set movementX(t){this.$movementX=A.rt.toNumber(t)}get movementY(){return this.$movementY??0}set movementY(t){this.$movementY=A.rt.toNumber(t)}}),Al),...(QS(Ah={},"flash.events::TouchEvent",class{updateAfterEvent(){A.updates++}get localX(){return this.$touchX??0/0}set localX(t){this.$touchX=A.rt.toNumber(t)}get localY(){return this.$touchY??0/0}set localY(t){this.$touchY=A.rt.toNumber(t)}"flash.events:TouchEvent::getStageX"(t,e){return mM(A,this,t??this.$touchX,e??this.$touchY)[0]}"flash.events:TouchEvent::getStageY"(t,e){return mM(A,this,t??this.$touchX,e??this.$touchY)[1]}isToolButtonDown(){return!1}getSamples(){return 0}"flash.events:TouchEvent::privateGetSamples"(){return 0}"flash.events:TouchEvent::setSamples"(){}}),Ah),...(QS(Ac={},"flash.events::GestureEvent",class{updateAfterEvent(){A.updates++}get localX(){return this.$gestureX??0/0}set localX(t){this.$gestureX=A.rt.toNumber(t)}get localY(){return this.$gestureY??0/0}set localY(t){this.$gestureY=A.rt.toNumber(t)}"flash.events:GestureEvent::getStageX"(t,e){return mM(A,this,t??this.$gestureX,e??this.$gestureY)[0]}"flash.events:GestureEvent::getStageY"(t,e){return mM(A,this,t??this.$gestureX,e??this.$gestureY)[1]}}),Ac),...(QS(Aw={},"flash.events::PressAndTapGestureEvent",class{get tapLocalX(){return this.$tapX??0/0}set tapLocalX(t){this.$tapX=A.rt.toNumber(t)}get tapLocalY(){return this.$tapY??0/0}set tapLocalY(t){this.$tapY=A.rt.toNumber(t)}"flash.events:PressAndTapGestureEvent::getTapStageX"(t,e){return mM(A,this,t??this.$tapX,e??this.$tapY)[0]}"flash.events:PressAndTapGestureEvent::getTapStageY"(t,e){return mM(A,this,t??this.$tapX,e??this.$tapY)[1]}}),Aw),...(QS(Ad={},"flash.ui::Mouse",class{static hide(){A.mouseVisible=!1,A.pointer?.updateCursor()}static show(){A.mouseVisible=!0,A.pointer?.updateCursor()}static get supportsCursor(){return!0}static get supportsNativeCursor(){return!0}static get cursor(){return A.mouseCursor}static set cursor(t){if(null==t)throw A.rt.error("TypeError",2007,"cursor");let e=A.rt.toString(t);if(!Fa.has(e)&&!A.cursors.has(e))throw A.rt.error("ArgumentError",2008,"cursor");A.mouseCursor=e,A.pointer?.updateCursor()}static registerCursor(t,e){if(null==e)throw A.rt.error("TypeError",2007,"cursorData");if(null==t)throw A.rt.error("TypeError",2007,"name");let g=e.$cursorFrames;if(!g)return;let i=g.$a;if(0===i.length)throw A.rt.error("ArgumentError",2008,"cursorData");let I=e.$cursorHotX??0,B=e.$cursorHotY??0;if(I<0||I>31||B<0||B>31)throw A.rt.error("ArgumentError",2008,"hotSpot");for(let t of i){if(null==t)throw A.rt.error("ArgumentError",2004);let e=fb(A,t);if(e.width>32||e.height>32)throw A.rt.error("ArgumentError",2004)}let Q=fb(A,i[0]),C=fI(Q,{x:0,y:0,width:Q.width,height:Q.height},!0),r=Math.min(Math.floor(I)||0,Q.width-1),s=Math.min(Math.floor(B)||0,Q.height-1),o=`data:image/png;base64,${btoa(String.fromCharCode(...C))}`;A.cursors.set(A.rt.toString(t),`url("${o}") ${r} ${s}, default`),A.pointer?.updateCursor()}static unregisterCursor(t){if(null==t)throw A.rt.error("TypeError",2007,"name");let e=A.rt.toString(t);A.cursors.delete(e)&&A.mouseCursor===e&&(A.mouseCursor="auto"),A.pointer?.updateCursor()}}),QS(Ad,"flash.ui::MouseCursorData",class{get data(){return this.$cursorFrames??null}set data(A){this.$cursorFrames=A}get hotSpot(){return A.rt.construct(A.rt.classNamed("flash.geom::Point"),this.$cursorHotX??0,this.$cursorHotY??0)}set hotSpot(t){if(null==t)throw A.rt.error("TypeError",2007,"hotSpot");this.$cursorHotX=A.rt.toNumber(A.rt.prop(t,"x")),this.$cursorHotY=A.rt.toNumber(A.rt.prop(t,"y"))}get frameRate(){return this.$cursorFrameRate??0}set frameRate(t){let e=A.rt.toNumber(t);this.$cursorFrameRate=e<0?0:e}}),Ad),...(QS(AG={},"flash.ui::Multitouch",class{static get inputMode(){return A.inputMode}static set inputMode(t){if(null==t)throw A.rt.error("TypeError",2007,"inputMode");let e=A.rt.toString(t);if(!Fl.has(e))throw A.rt.error("ArgumentError",2008,"inputMode");A.maxTouchPoints>0&&(A.inputMode=e)}static get supportsTouchEvents(){return A.maxTouchPoints>0}static get supportsGestureEvents(){return!1}static get supportedGestures(){return null}static get maxTouchPoints(){return A.maxTouchPoints}static get mapTouchToMouse(){return A.mapTouchToMouse}static set mapTouchToMouse(t){A.mapTouchToMouse=!!t}}),AG),...Dv(A),...(QS(AF={},"flash.display::DisplayObject",class{get name(){return this.$display.name}set name(t){if(null==t)throw A.rt.error("TypeError",2007,"name");if(this.$display.placeFrame>0)throw A.rt.error("flash.errors::IllegalOperationError",2078);this.$display.name=t}get visible(){return this.$display.visible}set visible(A){this.$display.visible=!!A,this.$display.invalidate(1),A||this.$display.focusDrop?.(this.$display)}get x(){return this.$display instanceof EM&&this.$display.settle(),f_(this.$display.matrix.tx,fz(this.$display)[0])}set x(A){let t=fz(this.$display)[0];if(this.$display.space){this.$display.touch(),this.$display.set3D("x",f_(Number(A)||0,-t));return}f1(this.$display,e=>{e.tx=f_(f$(Number(A)),-t)})}get y(){return this.$display instanceof EM&&this.$display.settle(),f_(this.$display.matrix.ty,fz(this.$display)[1])}set y(A){let t=fz(this.$display)[1];if(this.$display.space){this.$display.touch(),this.$display.set3D("y",f_(Number(A)||0,-t));return}f1(this.$display,e=>{e.ty=f_(f$(Number(A)),-t)})}get scaleX(){return this.$display.scaleX}set scaleX(A){this.$display.touch(),this.$display.setScaleX(Number(A))}get scaleY(){return this.$display.scaleY}set scaleY(A){this.$display.touch(),this.$display.setScaleY(Number(A))}get rotation(){return this.$display.rotation}set rotation(A){this.$display.touch(),this.$display.setRotation(Number(A))}get z(){return this.$display.space?.z??0}set z(A){this.$display.touch(),this.$display.set3D("z",Number(A))}get rotationX(){return this.$display.space?.rotationX??0}set rotationX(A){this.$display.touch(),this.$display.set3D("rotationX",Number(A))}get rotationY(){return this.$display.space?.rotationY??0}set rotationY(A){this.$display.touch(),this.$display.set3D("rotationY",Number(A))}get rotationZ(){return this.$display.space?this.$display.rotation:0}set rotationZ(A){this.$display.touch(),this.$display.set3D("rotationZ",Number(A))}get scaleZ(){return this.$display.space?.scaleZ??1}set scaleZ(A){this.$display.touch(),this.$display.set3D("scaleZ",Number(A))}get alpha(){return this.$display.colorTransform?.aMul??1}set alpha(A){let t=this.$display;t.touch(),t.colorTransform={...t.colorTransform??f2,aMul:Number(A)},t.invalidate(1)}get parent(){let A=this.$display.parent;return A instanceof Eq?null:A?.object??null}get stage(){return!function(A,t){for(let e=t;e;e=e.parent)if(e===A.stage)return!0;return!1}(A,this.$display)?null:A.stage?.object??null}get root(){return nt(this.$display)?.object??null}get loaderInfo(){return this.$display===A.stage?A.root?.loaderInfo??null:nt(this.$display)?.loaderInfo??null}get mouseX(){let t=oC(as(this.$display,A.stage));return t?or(t,A.mouseStageX,A.mouseStageY)[0]:0}get mouseY(){let t=oC(as(this.$display,A.stage));return t?or(t,A.mouseStageX,A.mouseStageY)[1]:0}get width(){return fO(this.$display)[0]}set width(A){let t=Number(A);if(!(t>=0))return;let e=this.$display;if(e.touch(),e instanceof EM){e.width=t/(Math.abs(e.scaleX)||1),e.invalidate(4),e.deferFit();return}let g=an(e,!0),i=g?fP(g.xMax-g.xMin):0,I=0===e.rotation&&0===e.skew?i:fO(e)[0];I>0?0===e.rotation&&0===e.skew?e.setScaleX(t/i):e.setScaleX(e.scaleX*t/I):(e.setScaleX(0),null===g&&e.setScaleY(0))}get height(){return fO(this.$display)[1]}set height(A){let t=Number(A);if(!(t>=0))return;let e=this.$display;if(e.touch(),e instanceof EM){e.height=t/(Math.abs(e.scaleY)||1),e.invalidate(4),e.deferFit();return}let g=an(e,!0),i=g?fP(g.yMax-g.yMin):0,I=0===e.rotation&&0===e.skew?i:fO(e)[1];I>0?0===e.rotation&&0===e.skew?e.setScaleY(t/i):e.setScaleY(e.scaleY*t/I):(e.setScaleY(0),null===g&&e.setScaleX(0))}getBounds(t){return fj(A,af(this.$display,t?.$display??null,A.stage,!0))}getRect(t){return fj(A,af(this.$display,t?.$display??null,A.stage,!1))}"flash.display:DisplayObject::_hitTest"(t,e,g,i,I){if(t)return aG(this.$display,Number(e),Number(g),!!i,A.root);let B=I?.$display;return!!B&&aL(this.$display,B,A.stage)}get blendMode(){return this.$display.blendMode}set blendMode(t){let e=A.rt.toString(t);if(!fX.has(e))throw A.rt.error("ArgumentError",2008,"blendMode");this.$display.touch(),this.$display.setBlendMode(e)}set blendShader(t){if(null==t)throw A.rt.error("TypeError",2007,"blendShader");if(!fy(t))throw A.rt.error("TypeError",2007,"data");this.$display.touch(),this.$display.setBlendShader(fS(A,t,2))}get cacheAsBitmap(){return this.$display.cachedAsBitmap||this.$display.filters.length>0}set cacheAsBitmap(A){this.$display.setCachedAsBitmap(!!A)}get cacheAsBitmapMatrix(){return this.$cacheAsBitmapMatrix??null}set cacheAsBitmapMatrix(A){this.$cacheAsBitmapMatrix=A}get filters(){return A.rt.array(this.$display.filters.map(t=>{let e=A.rt.construct(A.rt.classNamed(fQ(t.kind)));return e.$filter=og(t),e}))}set filters(t){let e=(t?t.$a??[]:[]).map(t=>{let e=t&&"object"==typeof t?fC(A.rt,t):null;if(!e)throw A.rt.error("ArgumentError",2005,0,"Filter");let g=og(fr(t,e));if("displacementMap"===g.kind&&g.mapBitmap&&(g.mapSnapshot=fx(A,g.mapBitmap)),"shader"===g.kind){if(!fy(g.shader))throw A.rt.error("ArgumentError",2171);g.shaderUse=fS(A,g.shader,1)}return g});this.$display.touch(),this.$display.filters=e,this.$display.invalidate(1)}get mask(){return this.$display.mask?.object??null}set mask(A){let t=A?.$display??null;this.$display.setMask(t)}get metaData(){return this.$metaData??null}set metaData(A){this.$metaData=A}get opaqueBackground(){return this.$opaqueBackground??null}set opaqueBackground(t){this.$display.touch(),this.$opaqueBackground=null==t?null:A.rt.toUint(t)}get scale9Grid(){let t=this.$display.scale9Grid;return t?A.rt.construct(A.rt.classNamed("flash.geom::Rectangle"),Math.trunc(t.xMin),Math.trunc(t.yMin),Math.trunc(t.xMax-t.xMin),Math.trunc(t.yMax-t.yMin)):null}set scale9Grid(t){let e=this.$display;if(e.touch(),e.invalidate(4),!t){e.scale9Grid=null;return}let[g,i,I,B]=["x","y","width","height"].map(e=>Number(A.rt.prop(t,e))),[Q,C]=[Math.trunc(g),Math.trunc(i)];if(e.scale9Grid={xMin:Q,yMin:C,xMax:Q+Math.trunc(I),yMax:C+Math.trunc(B)},!ae(at(e),{xMin:g,yMin:i,xMax:g+I,yMax:i+B}))throw A.rt.error("ArgumentError",2004)}get scrollRect(){let t=this.$display.scrollRect;return t?fj(A,t):null}set scrollRect(t){this.$display.touch();let e=null;if(t){let[g,i,I,B]=["x","y","width","height"].map(e=>Number(A.rt.prop(t,e)));e={xMin:fW(g),yMin:fW(i),xMax:fW(g+I),yMax:fW(i+B)}}this.$display.scrollRect=e,A.scrolled.add(this.$display)}get accessibilityProperties(){return this.$accessibilityProperties??null}set accessibilityProperties(A){this.$accessibilityProperties=A}localToGlobal(t){let e=as(this.$display,A.stage),[g,i]=or(e,Number(A.rt.prop(t,"x")),Number(A.rt.prop(t,"y")));return oB(e)?fq(A,Math.round(g)+0,Math.round(i)+0):fq(A,g,i)}globalToLocal(t){let[e,g]=fT(A,this.$display,t);return oB(as(this.$display,A.stage))?fq(A,Math.round(20*e)/20+0,Math.round(20*g)/20+0):fq(A,e,g)}local3DToGlobal(t){let e=e=>Number(A.rt.prop(t,e)),[g,i]=function(A,t,e,g,i){var I,B,Q;let C,r,s=oZ(A),o=s&&oX(A,s);if(!s||!o)return or(A.placed,t,e);let[n,E,a]=(I=o[0]*t+o[4]*e+o[8]*g+o[12],B=o[1]*t+o[5]*e+o[9]*g+o[13],Q=o[2]*t+o[6]*e+o[10]*g+o[14],r=1/ox((C=oK(s)).fieldOfView,s),[I+C.centerX*r*Q,B+C.centerY*r*Q,1+r*Q]),l=[n/a,E/a];for(let A=s;A&&A!==i;A=A.parent)l=or(A.placed,l[0],l[1]);return l}(this.$display,e("x"),e("y"),e("z"),A.stage);return fq(A,Math.round(4*g)/4,Math.round(4*i)/4)}globalToLocal3D(t){let[e,g]=fT(A,this.$display,t);return A.rt.construct(A.rt.classNamed("flash.geom::Vector3D"),e,g,0)}get transform(){return this.$transform||(this.$transform=A.rt.construct(A.rt.classNamed("flash.geom::Transform"),this)),this.$transform}set transform(t){if(t){let e=t.$display;e.space?this.$display.setMatrix3D(e.space.shown):this.$display.setMatrix(fw(A,A.rt.getProperty(t,fv))),this.$display.colorTransform=fu(A,A.rt.getProperty(t,fV)),this.$display.touch(),this.$display.invalidate(1)}}}),AF),...(QS(AR={},"flash.display::AVM1Movie",class{get"flash.display:AVM1Movie::_interopAvailable"(){return!1}"flash.display:AVM1Movie::_callAS2"(){}"flash.display:AVM1Movie::_setCallAS3"(){}}),AR),...(Ay={},Ab=(A,t)=>{let e=null==t?null:t;A.$bitmapData=e;let g=A.$display;g.store=e?.$store??null,g.invalidate(4)},AU=(t,e)=>{let g=null==e?"auto":A.rt.toString(e);if("auto"!==g&&"always"!==g&&"never"!==g)throw A.rt.error("ArgumentError",2008,"pixelSnapping");t.$display.pixelSnapping=g},AY=(A,t)=>{let e=A.$display;e.smoothing=!!t,e.invalidate(4)},QS(Ay,"flash.display::Bitmap",class{"flash.display:Bitmap::ctor"(t,e,g){let i=this.$display.character;Ab(this,null==t&&i?A.symbols.bitmapDataOf(i):t),AU(this,e),AY(this,g)}get bitmapData(){return this.$bitmapData??null}set bitmapData(A){Ab(this,A)}get pixelSnapping(){return this.$display.pixelSnapping}set pixelSnapping(A){AU(this,A)}get smoothing(){return this.$display.smoothing}set smoothing(A){AY(this,A)}}),Ay),...(AH={},AL=t=>{let e=t&&"object"==typeof t?fC(A.rt,t):null;if(!e)throw A.rt.error("TypeError",2007,"filter");return fr(t,e)},QS(AH,"flash.display::BitmapData",class{"flash.display:BitmapData::ctor"(t,e,g,i){let I=this.$symbol;if(I){this.$store=nK.of(I.pixels??EY);return}let B=A.rt.toInt(t),Q=A.rt.toInt(e);if(B<1||Q<1||B>0x6666666||Q>0x6666666||B*Q>0x1ffc3ff8)throw A.rt.error("ArgumentError",2015);try{this.$store=new nK(B,Q,void 0===g||!!g,A.rt.toUint(void 0===i?0xffffffff:i))}catch(t){if(t instanceof RangeError)throw A.rt.error("ArgumentError",2015);throw t}}get width(){return fY(A,this).width}get height(){return fY(A,this).height}get transparent(){return fY(A,this).transparent}get rect(){let t=fY(A,this);return A.rt.construct(A.rt.classNamed("flash.geom::Rectangle"),0,0,t.width,t.height)}getPixel(t,e){return fb(A,this).getPixel(A.rt.toInt(t),A.rt.toInt(e))}getPixel32(t,e){return fb(A,this).getPixel32(A.rt.toInt(t),A.rt.toInt(e))}setPixel(t,e,g){fb(A,this).setPixel(A.rt.toInt(t),A.rt.toInt(e),A.rt.toUint(g))}setPixel32(t,e,g){fb(A,this).setPixel32(A.rt.toInt(t),A.rt.toInt(e),A.rt.toUint(g))}fillRect(t,e){fb(A,this).fillRect(fH(A,t),A.rt.toUint(e))}clone(){let t=fb(A,this),e=A.rt.construct(A.rt.classNamed("flash.display::BitmapData"),t.width,t.height,t.transparent,0);return e.$store=t.clone(),e}dispose(){let A=this.$store;A&&!A.disposed&&A.dispose()}copyPixels(t,e,g,i,I,B){let Q=fb(A,this);if(null==t)throw A.rt.error("TypeError",2007,"sourceBitmapData");let C=fb(A,t),r=fH(A,e),[s,o]=fL(A,g,"destPoint"),n=null==i?null:fb(A,i),[E,a]=null==I?[0,0]:fL(A,I,"alphaPoint");Q.copyPixels(C,r,s,o,!!B,n,E,a)}applyFilter(t,e,g,i){let I=fb(A,this),B=fZ(A,t),Q=fH(A,e),[C,r]=fL(A,g,"destPoint"),s=AL(i);if("shader"===s.kind){if(!fy(s.shader))throw A.rt.error("ArgumentError",2171);let t=fS(A,s.shader,1,0);!function(A,t,e,g,i,I,B,Q){let[C,r,s,o]=I,n=g-2*e.x-C,E=i-2*e.y-r,a=Math.max(0,n),l=Math.max(0,E),h=Math.min(A.width,n+t.width+C+s),c=Math.min(A.height,E+t.height+r+o);if(h<=a||c<=l)return;let w=new Map(B.images),d=B.kernel.inputs[0];w.set(d.index,{width:t.width,height:t.height,pixels:t.readable,channels:d.channels,clear:!0});let u=h-a,D=c-l,f=Q.channels,m=new Float32Array(u*D*f);Q.run(B.values,w,u,D,m,a-C,l-r);let G=A.pixels;for(let t=0,e=0;t<D;t++)for(let g=0;g<u;g++,e+=f)G[(l+t)*A.width+a+g]=ft(m,e,f,A.transparent);A.changed()}(I,B,Q,C,r,s.extensions,t,ff(t.kernel));return}if(!I.transparent&&hI.has(s.kind))throw A.rt.error("flash.errors::IllegalOperationError",2077);switch(hh(Q,s,{x:0,y:0,width:B.width,height:B.height})){case 2015:throw A.rt.error("ArgumentError",2015);case 2077:throw A.rt.error("flash.errors::IllegalOperationError",2077)}let o="displacementMap"===s.kind&&s.mapBitmap?fb(A,s.mapBitmap):null;if(!hc(I,B,Q,C,r,s,o))throw A.rt.unsupported(`BitmapData.applyFilter with a ${s.kind} filter`)}generateFilterRect(t,e){let g=fb(A,this),i=AL(e);if("shader"===i.kind){fH(A,t);let[e,I,B,Q]=i.extensions;return A.rt.construct(A.rt.classNamed("flash.geom::Rectangle"),-e,-I,g.width+e+B,g.height+I+Q)}if(!hB.has(i.kind))throw A.rt.unsupported(`BitmapData.generateFilterRect with a ${i.kind} filter`);let I=hE(g.width,g.height,fH(A,t),i);return A.rt.construct(A.rt.classNamed("flash.geom::Rectangle"),I.x,I.y,I.width,I.height)}getPixels(t){let e=fb(A,this),g=A.rt.construct(A.rt.classNamed("flash.utils::ByteArray"));return fU(e,fH(A,t),g.$bytes),g}copyPixelsToByteArray(t,e){let g=fb(A,this);if(null==e)throw A.rt.error("TypeError",2007,"data");fU(g,fH(A,t),e.$bytes)}encode(t,e,g){var i;let I,B=fb(A,this);if(null==t)throw A.rt.error("TypeError",2007,"rectangle");if(null==e)throw A.rt.error("TypeError",2007,"compressor");let Q=t=>A.rt.isInstance(e,A.rt.classNamed(t)),C=Q("flash.display::JPEGEncoderOptions"),r=!C&&Q("flash.display::JPEGXREncoderOptions");if(!C&&!r&&!Q("flash.display::PNGEncoderOptions"))throw A.rt.error("ArgumentError",2004);let s=B.clip(fH(A,t));if(!s)throw A.rt.error("ArgumentError",2006);let o=C?Number(A.rt.prop(e,"quality")):r?Number(A.rt.prop(e,"quantization")):0;if(!(o>=0&&o<=100))throw A.rt.error("RangeError",2006);if(r){let t=A.rt.prop(e,"colorSpace");if(null==t)throw A.rt.error("TypeError",2007,"colorspace");if(!Object.hasOwn(D3,t))throw A.rt.error("ArgumentError",2004);let g=Number(A.rt.prop(e,"trimFlexBits"));if(!(g>=0&&g<=255))throw A.rt.error("RangeError",2006);if(g>15&&!B.transparent)throw A.rt.error("Error",3699);i=B.transparent?0:g,I=function(A,t,e,g){let{alpha:i,quantization:I,subsampling:B,trimFlexBits:Q}=g;if(A.length!==t*e)throw RangeError(`${A.length} pixels are no ${t} by ${e}`);if(!(t>=1&&t<=65536&&e>=1&&e<=65536)||!(Number.isInteger(I)&&I>=0&&I<=100)||!(Number.isInteger(Q)&&Q>=0&&Q<=15)||3!==B&&2!==B&&1!==B)throw RangeError(`no JPEG XR of ${t} by ${e} pixels with ${JSON.stringify(g)}`);let C=D2.call(g=>{g.reset();let C=g.alloc(16*t*4);if(0===C||0!==g.encodeBegin(t,e,+!!i,I,B,Q))return null;for(let i=0;i<e;i+=16){let I=Math.min(16,e-i);if(new Uint32Array(g.memory.buffer,C,t*I).set(A.subarray(i*t,(i+I)*t)),0!==g.encodeRows(C,I))return null}return 0!==g.encodeEnd()?null:new Uint8Array(g.memory.buffer,g.resultPointer(),g.resultSize()).slice()});if(null===C)throw D2.drop(),RangeError(`no memory to encode ${t} by ${e} pixels as JPEG XR`);return C}(D1(B,s),s.width,s.height,{alpha:B.transparent,quantization:o,subsampling:D3[t],trimFlexBits:i})}else I=C?function(A,t,e,g){if(A.length!==t*e)throw RangeError(`${A.length} pixels are no ${t} by ${e}`);if(!(t>=1&&t<=65535&&e>=1&&e<=65535)||!(g>=0&&g<=100))throw RangeError(`no JPEG of ${t} by ${e} pixels at quality ${g}`);return F(i=>{let I=R(i,new Uint8Array(A.buffer,A.byteOffset,A.byteLength)),B=0===I||0!==i.jpegEncode(I,t,e,g)?null:y(i,0);if(null===B)throw RangeError(`no memory to encode ${t} by ${e} pixels as a JPEG`);return B})}(D1(B,s),s.width,s.height,o):fI(B,s,!!A.rt.prop(e,"fastCompression"));let n=null==g?A.rt.construct(A.rt.classNamed("flash.utils::ByteArray")):g;return n.$bytes.write(I),n}setPixels(t,e){let g=fb(A,this),i=fH(A,t);if(null==e)throw A.rt.error("TypeError",2007,"inputByteArray");let I=g.clip(i);if(!I)return;let B=e.$bytes,Q=I.width*I.height,C=Math.min(Q,Math.floor(B.available/4));g.setWords(I,B.buffer,B.position,C,B.littleEndian),B.position=B.position+4*C>>>0,C<Q&&B.checkEOF(4)}getVector(t){let e=fb(A,this),g=A.rt.resolve(A.rt.vector("uint")).$it.instance();return g.$a=e.getVector(fH(A,t)),g}setVector(t,e){let g=fb(A,this),i=fH(A,t);if(null==e)throw A.rt.error("TypeError",2007,"imputVector");let I=g.clip(i);if(!I)return;let B=e.$a;if(B.length<I.width*I.height)throw A.rt.error("RangeError",2006);g.setVector(I,B)}noise(t,e,g,i,I){hf(fb(A,this),A.rt.toInt(t),void 0===e?0:A.rt.toUint(e),void 0===g?255:A.rt.toUint(g),void 0===i?7:A.rt.toUint(i),!!I)}copyChannel(t,e,g,i,I){let B=fb(A,this),Q=fZ(A,t),C=fH(A,e,!0),[r,s]=fL(A,g,"destPoint");hG(B,Q,C,r,s,A.rt.toUint(i),A.rt.toUint(I))}perlinNoise(t,e,g,i,I,B,Q=7,C=!1,r=null){let s=fb(A,this),o=r?.$a,n=A.rt.classNamed("flash.geom::Point"),E=(t,e)=>A.rt.toNumber(A.rt.prop(t,e)),a=Array.from({length:Math.min(A.rt.toUint(g),1024)},(t,e)=>{let g=o?.[e];return g&&A.rt.isInstanceOf(g,n.$it)?[E(g,"x"),E(g,"y")]:[0,0]});hJ(s,[A.rt.toNumber(t),A.rt.toNumber(e)],a,A.rt.toInt(i),!!I,!!B,A.rt.toUint(Q),!!C)}paletteMap(t,e,g,i=null,I=null,B=null,Q=null){let C=fb(A,this),r=fZ(A,t);if(null==e)throw A.rt.error("TypeError",2007,"sourceRect");let s=fH(A,e,!0),[o,n]=fL(A,g,"destPoint"),E=(t,e)=>Uint32Array.from({length:256},(g,i)=>null==t?i<<e:A.rt.toUint(A.rt.getProperty(t,A.rt.publicName(i))));hp(C,r,s,o,n,[E(i,16),E(I,8),E(B,0),E(Q,24)])}compare(t){if(null==t)throw A.rt.error("TypeError",2007,"otherBitmapData");let e=this.$store;if(!e||e.disposed)return -1;let g=fb(A,t);if(g.width!==e.width)return -3;if(g.height!==e.height)return -4;let i=hM(e,g);if(!i)return 0;let I=A.rt.construct(A.rt.classNamed("flash.display::BitmapData"),e.width,e.height,!0,0);return I.$store.pixels.set(i),I.$store.changed(),I}colorTransform(t,e){let g=fb(A,this),i=fH(A,t);if(null==e)throw A.rt.error("TypeError",2007,"colorTransform");i.height|=0,hF(g,i,fu(A,e))}merge(t,e,g,i,I,B,Q){let C=fb(A,this),r=fZ(A,t),s=fH(A,e,!0),[o,n]=fL(A,g,"destPoint");hR(C,r,s,o,n,[i,I,B,Q].map(t=>A.rt.toUint(t)))}scroll(t,e){hk(fb(A,this),A.rt.toInt(t),A.rt.toInt(e))}threshold(t,e,g,i,I,B,Q,C){let r=fb(A,this),s=fZ(A,t),o=fH(A,e,!0),[n,E]=fL(A,g,"destPoint");if(null==i)throw A.rt.error("TypeError",2007,"operation");let a=A.rt.toString(i);if(!hS(a))throw A.rt.error("ArgumentError",2005,3);return hb(r,s,o,n,E,a,A.rt.toUint(I),A.rt.toUint(B),void 0===Q?0xffffffff:A.rt.toUint(Q),!!C)}getColorBoundsRect(t,e,g){let i=hU(fb(A,this),A.rt.toUint(t),A.rt.toUint(e),void 0===g||!!g);return A.rt.construct(A.rt.classNamed("flash.geom::Rectangle"),i.x,i.y,i.width,i.height)}floodFill(t,e,g){hY(fb(A,this),A.rt.toInt(t),A.rt.toInt(e),A.rt.toUint(g))}histogram(t){let e=fb(A,this),g=function(A,t){let e=[0,1,2,3].map(()=>Array(256).fill(0)),g=A.clip(t);if(!g)return e;for(let t=g.y;t<g.y+g.height;t++)for(let i=g.x;i<g.x+g.width;i++){let g=nN(A.pixels[t*A.width+i]);e[0][g>>>16&255]++,e[1][g>>>8&255]++,e[2][255&g]++,e[3][g>>>24]++}return e}(e,null==t?{x:0,y:0,width:e.width,height:e.height}:fH(A,t)),i=A.rt.resolve(A.rt.vector("Number")),I=A.rt.applyType(A.rt.classNamed("__AS3__.vec::Vector"),[i]).$it.instance();return I.$a=g.map(A=>{let t=i.$it.instance();return t.$a=A,t}),I}hitTest(t,e,g,i,I){let B=fb(A,this),[Q,C]=fL(A,t,"firstPoint");if(Q+B.width>0x7fffffff||C+B.height>0x7fffffff)throw A.rt.error("ArgumentError",1508,"firstPoint");let r=A.rt.toUint(e);if(null==g)throw A.rt.error("ArgumentError",2005,2);let s=A.rt.traitsOf(g).name,o=void 0!==g.$store?g:g.$display?.store!==void 0?g.$bitmapData??null:null,n="flash.geom::Point"===s,E="flash.geom::Rectangle"===s;if(n||E){let t=E?fH(A,g):null,[e,i]=n?fL(A,g,"secondObject"):[0,0],I=(t?t.x:e)-Q,s=(t?t.y:i)-C,o=t?t.width:1,a=t?t.height:1;for(let A=Math.max(0,s);A<Math.min(B.height,s+a);A++)for(let t=Math.max(0,I);t<Math.min(B.width,I+o);t++){let e=hH(B,t,A);if(e>0&&e>=r)return!0}return!1}if(o){let t=fb(A,o),[e,g]=fL(A,i,"secondBitmapDataPoint");if(e+t.width>0x7fffffff||g+t.height>0x7fffffff)throw A.rt.error("ArgumentError",1508,"secondBitmapDataPoint");let s=void 0===I?1:A.rt.toUint(I),n=e-Q,E=g-C;for(let A=Math.max(0,E);A<Math.min(B.height,E+t.height);A++)for(let e=Math.max(0,n);e<Math.min(B.width,n+t.width);e++)if(hH(B,e,A)>=r&&hH(t,e-n,A-E)>=s)return!0;return!1}throw A.rt.error("ArgumentError",2005,2)}pixelDissolve(t,e,g,i,I,B){let Q=fb(A,this);if(null==t||void 0===t.$store)throw A.rt.error("TypeError",2007,"sourceBitmapData");let C=fb(A,t);if(null==e)throw A.rt.error("TypeError",2007,"sourceRect");let r=fH(A,e,!0),[s,o]=fL(A,g,"destPoint"),n=void 0===I?0:A.rt.toInt(I);if(n<0)throw A.rt.error("RangeError",2027,"numPixels",n);return hK(Q,C,r,s,o,void 0===i?0:A.rt.toInt(i),n,void 0===B?0:A.rt.toUint(B))}draw(t,e,g,i,I,B){fK(A,fb(A,this),t,e,g,i,I,B)}drawWithQuality(t,e,g,i,I,B,Q){fK(A,fb(A,this),t,e,g,i,I,B,function(A,t){if(null==t)return 4;switch(A.rt.toString(t).toLowerCase()){case"low":return 1;case"medium":return 2;default:return 4}}(A,Q))}lock(){fb(A,this)}unlock(){fb(A,this)}}),AH),...f3(A),...function(A){let t={};function e(t){if(null==t)return null;let e=e=>A.rt.toNumber(A.rt.prop(t,e)),g=e("x"),i=e("y"),I=g+e("width"),B=i+e("height");return{xMin:Math.min(g,I),yMin:Math.min(i,B),xMax:Math.max(g,I),yMax:Math.max(i,B)}}return QS(t,"flash.display::Sprite",class{get graphics(){return ms(A,this)}"flash.display:Sprite::constructChildren"(){let A=this.$display;A instanceof EN&&A.enterFirstFrame()}get soundTransform(){return my(A,this.$soundMix??cX(null))}set soundTransform(t){if(null==t)throw A.rt.error("TypeError",2007,"soundTransform");this.$soundMix=mF(cX(t)),c9(cO(A))}get buttonMode(){return this.$buttonMode??!1}set buttonMode(A){this.$buttonMode=!!A}get useHandCursor(){return this.$useHandCursor??!0}set useHandCursor(A){this.$useHandCursor=!!A}get hitArea(){var A;return(A=this.$display,u5.get(A)??null)?.object??null}set hitArea(A){var t,e;t=this.$display,e=A?.$display??null,oT.changes++,e?u5.set(t,e):u5.delete(t)}get dropTarget(){var A;return(A=this.$display,aZ.get(A)??null)?.object??null}startDrag(t,g){A.pointer?.startDrag(this.$display,!!t,e(g))}stopDrag(){A.pointer?.stopDrag()}startTouchDrag(t,g,i){let I=A.rt.toInt(t);A.pointer?.startTouchDrag(this.$display,I,!!g,e(i),A.touch?.at(I)??null)}stopTouchDrag(t){let e=A.rt.toInt(t);A.pointer?.stopTouchDrag(e,A.touch?.at(e)??null)}}),t}(A),...(AZ={},AK=A=>{let t=A.timeline.scenes,e=Math.max(1,A.currentFrame),g=0;for(;g+1<t.length&&t[g+1].frame<=e;)g++;return g},Ax=(A,t)=>{let e=A.timeline.scenes;return[e[t].frame,t+1<e.length?e[t+1].frame:A.totalFrames+1]},Av=(A,t,e)=>{let[g,i]=Ax(A,t),I=t+1===A.timeline.scenes.length;return e.filter(A=>A.frame>=g&&(I||A.frame<i))},AV=(t,e)=>{let[g,i]=Ax(t,e),I=A.rt.classNamed("flash.display::FrameLabel"),B=Av(t,e,t.timeline.labels).map(t=>A.rt.construct(I,t.name,t.frame-g+1));return A.rt.construct(A.rt.classNamed("flash.display::Scene"),t.timeline.scenes[e].name,A.rt.array(B),i-g)},AX=(t,e,g)=>{let i=t.timeline.scenes,I=AK(t);if(null!=g){let t=A.rt.toString(g);if((I=i.findIndex(A=>A.name===t))<0)throw A.rt.error("ArgumentError",2108,t)}let B=Ax(t,I)[0];if("string"==typeof e&&!/^\d+$/.test(e)){let g=Av(t,I,t.timeline.gotoLabels).find(A=>A.name===e);if(g)return g.frame;if(""!==i[I].name||i.length>1)throw A.rt.error("ArgumentError",2109,e,i[I].name)}return B+A.rt.toInt(e)-1},AW=(t,e,g)=>{(t.library.version??10)<=9&&(t.skipsAfter=A.frames),A.inFrameScript===t?(t.queuedGoto=e,t.queuedPlay=g):(t.playing=g,t.gotoFrame(e),A.gotoCycle(t))},QS(AZ,"flash.display::MovieClip",class{addFrameScript(...t){let e=this.$display;for(let g=0;g+1<t.length;g+=2){let i=t[g+1],I=A.rt.isInstanceOf(i,A.rt.functionTraits);e.setFrameScript(A.rt.toInt(t[g])+1,I?i:null)}}get currentFrame(){let A=this.$display;return Math.max(1,A.currentFrame)-Ax(A,AK(A))[0]+1}get totalFrames(){return this.$display.totalFrames}get framesLoaded(){return this.$display.totalFrames}get currentLabel(){let A=this.$display,t=null;for(let e of A.timeline.labels){if(e.frame>A.currentFrame)break;t=e.name}return t}get currentFrameLabel(){return this.$display.timeline.frameLabels.get(this.$display.currentFrame)??null}get scenes(){let t=this.$display;return A.rt.array(t.timeline.scenes.map((A,e)=>AV(t,e)))}get currentScene(){let A=this.$display;return AV(A,AK(A))}prevScene(){let A=this.$display;AW(A,Ax(A,Math.max(0,AK(A)-1))[0],!0)}nextScene(){let A=this.$display,t=AK(A);AW(A,Ax(A,Math.min(A.timeline.scenes.length-1,t+1))[0],!0)}get isPlaying(){return this.$display.playing}play(){this.$display.playing=!0}stop(){this.$display.playing=!1}nextFrame(){let A=this.$display;AW(A,A.currentFrame+1,!1)}prevFrame(){let A=this.$display;AW(A,A.currentFrame-1,!1)}gotoAndPlay(A,t=null){let e=this.$display;AW(e,AX(e,A,t),!0)}gotoAndStop(A,t=null){let e=this.$display;AW(e,AX(e,A,t),!1)}get enabled(){return this.$enabled??!0}set enabled(A){this.$enabled=!!A}get trackAsMenu(){return!1}set trackAsMenu(A){}}),QS(AZ,"flash.display::FrameLabel",class{"flash.display:FrameLabel::ctor"(t,e){this.$name=A.rt.toString(t),this.$frame=A.rt.toInt(e)}get name(){return this.$name}get frame(){return this.$frame}}),AZ),...function(A){let t={},e=!0,g="default",i=null,I=(t,e,g=!1)=>{let i=A.rt.applyType(A.rt.classNamed("__AS3__.vec::Vector"),[A.rt.classNamed(t)]).$it.instance();return i.$a=[...e],i.$fixed=g,i};QS(t,"flash.display::Stage",class{"flash.display:Stage::requireOwnerPermissions"(){}get frameRate(){return A.frameRate}get nativeWindow(){return DU(A)}set frameRate(t){A.frameRate=Math.max(.01,Math.min(1e3,Number(t)))}get stageWidth(){return A.stageWidth}set stageWidth(A){}get stageHeight(){return A.stageHeight}set stageHeight(A){}get displayContextInfo(){return null}invalidate(){A.invalidated=!0}get scaleMode(){return A.stageScaleMode}set scaleMode(t){if(null==t)throw A.rt.error("TypeError",2007,"scaleMode");let e=A.rt.toString(t);switch(e){case"showAll":case"noScale":case"noBorder":case"exactFit":break;default:throw A.rt.error("ArgumentError",2008,"scaleMode")}A.stageScaleModeSet=!0,e!==A.stageScaleMode&&(A.stageScaleMode=e,A.onStageLayout?.())}get align(){return A.stageAlign}set align(t){if(null==t)throw A.rt.error("TypeError",2007,"align");let e=mp(A.rt.toString(t));A.stageAlignSet=!0,e!==A.stageAlign&&(A.stageAlign=e,A.onStageLayout?.())}get quality(){return A.quality}set quality(t){A.quality=String(t).toUpperCase()}get displayState(){return A.fullScreen.state}set displayState(t){if(null==t)throw A.rt.error("TypeError",2007,"displayState");let e=A.rt.toString(t);switch(e){case"normal":case"fullScreen":case"fullScreenInteractive":A.fullScreen.set(e);break;default:throw A.rt.error("ArgumentError",2008,"displayState")}}get focus(){return A.focus?.object??null}set focus(t){Dh(A,t?f0(t)??null:null)}get showDefaultContextMenu(){return A.showDefaultContextMenu}set showDefaultContextMenu(t){A.showDefaultContextMenu=A.rt.toBoolean(t)}get stageFocusRect(){return e}set stageFocusRect(A){e=!!A}get color(){return((A.stageColor??0xffffff)|0xff000000)>>>0}set color(t){A.stageColor=0xffffff&A.rt.toUint(t),A.updates++}get allowsFullScreen(){return A.fullScreen.host?.allowed(!1)??!0}get allowsFullScreenInteractive(){return!A.air&&(A.fullScreen.host?.allowed(!0)??!1)}get browserZoomFactor(){return 1}get contentsScaleFactor(){return A.contentsScaleFactor}get fullScreenWidth(){return A.screenCapabilities.screenResolutionX}get fullScreenHeight(){return A.screenCapabilities.screenResolutionY}get fullScreenSourceRect(){let t=A.fullScreen.sourceRect;return t&&A.rt.construct(A.rt.classNamed("flash.geom::Rectangle"),t.x,t.y,t.width,t.height)}set fullScreenSourceRect(t){if(null==t)return void A.fullScreen.setSourceRect(null);let e=e=>A.rt.toNumber(A.rt.prop(t,e));A.fullScreen.setSourceRect({x:e("x"),y:e("y"),width:e("width"),height:e("height")})}get colorCorrection(){return g}set colorCorrection(t){if(null==t)throw A.rt.error("TypeError",2007,"colorCorrection");g=A.rt.toString(t)}get colorCorrectionSupport(){return"unsupported"}get mouseLock(){return A.fullScreen.mouseLock}set mouseLock(t){if(!A.fullScreen.active)throw A.rt.error("Error",3707);A.fullScreen.mouseLock=A.rt.toBoolean(t)}get wmodeGPU(){return!1}get softKeyboardRect(){return A.rt.construct(A.rt.classNamed("flash.geom::Rectangle"),0,0,0,0)}get orientation(){return"unknown"}get deviceOrientation(){return"unknown"}get autoOrients(){return!1}"flash.display:Stage::setAutoOrients"(A){}get supportedOrientations(){let t=A.rt.resolve(A.rt.vector("String")).$it.instance();return t.$a=[],t}static get supportsOrientationChange(){return!1}isFocusInaccessible(){return!1}get stageVideos(){return I("flash.media::StageVideo",[])}get stage3Ds(){return I("flash.display::Stage3D",i??=[0,1,2,3].map(()=>A.rt.construct(A.rt.classNamed("flash.display::Stage3D"))),!0)}});let B=f3(A);for(let A of["removeChildAt","swapChildrenAt"])t[`flash.display::Stage#${A}`]=B[`flash.display::DisplayObjectContainer#${A}`];return t["flash.display::Stage#get:constructor"]=QJ(()=>null),t["flash.display::Stage#set:constructor"]=QJ(()=>void 0),t}(A),...(QS(Aq={},"flash.display::Loader",class{get content(){return this.$content??null}get contentLoaderInfo(){return this.$loaderInfo||(this.$loaderInfo=A.loads.loaderInfo(this)),this.$loaderInfo}"flash.display:Loader::_loadBytes"(t,e,g,i,I,B){let Q=function(A,t){if(!t)throw A.rt.error("TypeError",2007,"bytes");let e=i3(A.rt,t);return new Uint8Array(e.buffer.subarray(0,e.length))}(A,t),C=ml(A,B);A.loads.requestLoad(this,Q,A.loads.loadDomain(g),C)}"flash.display:Loader::_load"(t,e,g,i,I,B){let Q=ml(A,B);A.loads.requestLoadUrl(this,t,A.loads.loadDomain(g),Q)}"flash.display:Loader::_unload"(t,e){A.loads.unload(this,!!t)}"flash.display:Loader::_getJPEGLoaderContextdeblockingfilter"(A){return 0}"flash.display:Loader::_close"(){A.loads.closeLoad(this)}"flash.display:Loader::_getUncaughtErrorEvents"(){return ma(A,this)}"flash.display:Loader::_setUncaughtErrorEvents"(A){this.$uncaught=A}}),Aq),...(QS(AT={},"flash.display::LoaderInfo",class{get loader(){return this.$loader}get content(){return this.$content}get url(){return this.$url}get loaderURL(){return this.$loaderURL}get isURLInaccessible(){return!1}get bytesLoaded(){return this.$loaded}get bytesTotal(){return this.$total}get applicationDomain(){return this.$domain||this.$swf?A.code.applicationDomainOf(this.$domain??A.mainDomain):null}get swfVersion(){return mE(A,this).version}get actionScriptVersion(){return mE(A,this).as3?3:2}get frameRate(){return mE(A,this).frameRate}get width(){return(this.$image??mE(A,this)).width}get height(){return(this.$image??mE(A,this)).height}get contentType(){return this.$image?.contentType??(this.$swf&&this.$typed?"application/x-shockwave-flash":null)}get sharedEvents(){return this.$shared||(this.$shared=A.rt.construct(A.rt.classNamed("flash.events::EventDispatcher"))),this.$shared}get sameDomain(){return!0}get childAllowsParent(){return!0}get parentAllowsChild(){return!0}get parentSandboxBridge(){return null}set parentSandboxBridge(A){}get childSandboxBridge(){return null}set childSandboxBridge(A){}get bytes(){if(!this.$bytes)return null;let t=A.rt.construct(A.rt.classNamed("flash.utils::ByteArray")),e=i3(A.rt,t);return e.write(this.$bytes),e.position=0,t}"flash.display:LoaderInfo::_getArgs"(){let t=A.rt.objectTraits.instance();for(let[e,g]of this.$params)A.rt.setProperty(t,A.rt.publicName(e),g);return t}"flash.display:LoaderInfo::_getUncaughtErrorEvents"(){return ma(A,this)}"flash.display:LoaderInfo::_setUncaughtErrorEvents"(A){this.$uncaught=A}static getLoaderInfoByDefinition(A){return null}}),AT),...(AP={},AO=()=>{let t=A.externalInterface,e=t?.allows;return t&&(!e||A.code.securityUrls(2).every(A=>e.call(t,A)))?t:null},QS(AP,"flash.external::ExternalInterface",class{static get available(){return null!==AO()}static get objectID(){return AO()?.objectID??null}static"flash.external:ExternalInterface::_initJS"(){}static"flash.external:ExternalInterface::_getPropNames"(t){let e=[],g=A.rt.hasNext(t,0);for(;0!==g;)e.push(A.rt.nextName(t,g)),g=A.rt.hasNext(t,g);return A.rt.array(e)}static get"flash.external:ExternalInterface::activeX"(){return!1}static"flash.external:ExternalInterface::_addCallback"(t,e,g){let i=AO();if(!i)throw A.rt.error("Error",2067);i.addCallback(A.rt.toString(t),g||null==e?null:(t,g)=>(A.hostCalls++,A.rt.callValue(e,null,[t,null===g?null:A.rt.array(g)],null)))}static"flash.external:ExternalInterface::_evalJS"(t){let e=AO();if(!e)throw A.rt.error("Error",2067);return e.evalJS?.(A.rt.toString(t))??null}static"flash.external:ExternalInterface::_callOut"(t){let e=AO();if(!e)throw A.rt.error("Error",2067);return e.callOut(A.rt.toString(t))}static"flash.external:ExternalInterface::_quotedStringFromString"(t){return JSON.stringify(A.rt.toString(t))}static"flash.external:ExternalInterface::_quotedStringFromError"(t){return JSON.stringify(A.rt.toString(t))}}),AP),...(QS(Aj={},"flash.globalization::CurrencyParseResult",class{"flash.globalization:CurrencyParseResult::ctor"(t,e){if(null===e)throw A.rt.error("TypeError",2007,"symbol");this.$currencyValue=t,this.$currencyString=e}get value(){return this.$currencyValue}get currencyString(){return this.$currencyString}}),Aj),...(QS(Az={},"flash.globalization::NumberParseResult",class{"flash.globalization:NumberParseResult::ctor"(A,t,e){this.$numberValue=A,this.$startIndex=t,this.$endIndex=e}get value(){return this.$numberValue}get startIndex(){return this.$startIndex}get endIndex(){return this.$endIndex}}),Az),...(A$={},A_=(t,e)=>[m_(A,t,"string1"),m_(A,e,"string2")],QS(A$,"flash.globalization::Collator",class{static getAvailableLocaleIDNames(){return m3(A)}"flash.globalization:Collator::ctor"(t,e){let g=mz(A,m_(A,t,"requestedLocaleIDName"));if("sorting"!==m_(A,e,"initialMode")&&"matching"!==e)throw A.rt.error("ArgumentError",1508,"initialMode");this.$settings=new m8(g,"matching"===e)}get lastOperationStatus(){return this.$settings.status}get requestedLocaleIDName(){return this.$settings.locale.requested}get actualLocaleIDName(){return this.$settings.locale.actual}get ignoreCase(){return this.$settings.ignoreCase}set ignoreCase(A){this.$settings.set("ignoreCase",A)}get ignoreDiacritics(){return this.$settings.ignoreDiacritics}set ignoreDiacritics(A){this.$settings.set("ignoreDiacritics",A)}get ignoreKanaType(){return this.$settings.ignoreKanaType}set ignoreKanaType(A){this.$settings.set("ignoreKanaType",A)}get ignoreSymbols(){return this.$settings.ignoreSymbols}set ignoreSymbols(A){this.$settings.set("ignoreSymbols",A)}get ignoreCharacterWidth(){return this.$settings.ignoreCharacterWidth}set ignoreCharacterWidth(A){this.$settings.set("ignoreCharacterWidth",A)}get numericComparison(){return this.$settings.numericComparison}set numericComparison(A){this.$settings.set("numericComparison",A)}compare(A,t){return this.$settings.compare(...A_(A,t))}equals(A,t){return 0===this.$settings.compare(...A_(A,t))}}),A$),...(QS(A0={},"flash.globalization::CurrencyFormatter",class{static getAvailableLocaleIDNames(){return m3(A)}"flash.globalization:CurrencyFormatter::ctor"(t){this.$settings=new GC(mz(A,m_(A,t,"requestedLocaleIDName")))}get lastOperationStatus(){return this.$settings.status}get requestedLocaleIDName(){return this.$settings.locale.requested}get actualLocaleIDName(){return this.$settings.locale.actual}get currencyISOCode(){return this.$settings.currencyISOCode}get currencySymbol(){return this.$settings.currencySymbol}setCurrency(t,e){let g=this.$settings;m_(A,t,"currencyISOCode"),m_(A,e,"currencySymbol");let i=/^[A-Z]{3}$/.test(t);i&&(g.currencyISOCode=t,g.currencySymbol=e),g.status=i?mL:mV}"flash.globalization:CurrencyFormatter::formatImplementation"(A,t){let e=this.$settings;return e.format(A,A=>A?GB[e.negativeCurrencyFormat]:GI[e.positiveFormat],t?e.currencySymbol:e.currencyISOCode)}formattingWithCurrencySymbolIsSafe(t){let e=this.$settings;return e.status=mL,m_(A,t,"requestedISOCode")===e.currencyISOCode}parse(t){let{value:e,symbol:g}=this.$settings.parseCurrency(m_(A,t,"value"));return A.rt.construct(A.rt.classNamed("flash.globalization::CurrencyParseResult"),e,g)}get fractionalDigits(){return this.$settings.fractionalDigits}set fractionalDigits(A){this.$settings.setFractionalDigits(A)}get useGrouping(){return this.$settings.useGrouping}set useGrouping(A){this.$settings.set("useGrouping",A)}get groupingPattern(){return this.$settings.groupingPattern}set groupingPattern(t){this.$settings.setGroupingPattern(m_(A,t,"value"))}get digitsType(){return this.$settings.digitsType}set digitsType(A){this.$settings.setDigitsType(A)}get decimalSeparator(){return this.$settings.decimalSeparator}set decimalSeparator(t){this.$settings.setDecimalSeparator(m_(A,t,"value"))}get groupingSeparator(){return this.$settings.groupingSeparator}set groupingSeparator(t){this.$settings.setGroupingSeparator(m_(A,t,"value"))}get negativeSymbol(){return this.$settings.negativeSymbol}set negativeSymbol(t){m_(A,t,"value"),this.$settings.status=mx}get negativeCurrencyFormat(){return this.$settings.negativeCurrencyFormat}set negativeCurrencyFormat(A){let t=this.$settings;t.setFormat(A,GB.length)&&(t.negativeCurrencyFormat=A)}get positiveCurrencyFormat(){return this.$settings.positiveFormat}set positiveCurrencyFormat(A){let t=this.$settings;t.setFormat(A,GI.length)&&(t.positiveFormat=A)}get leadingZero(){return this.$settings.leadingZero}set leadingZero(A){this.$settings.set("leadingZero",A)}get trailingZeros(){return this.$settings.trailingZeros}set trailingZeros(A){this.$settings.set("trailingZeros",A)}}),A0),...(A1={},A2=(t,e)=>{if(!Gr.includes(m_(A,t,e))&&t!==Gs)throw A.rt.error("ArgumentError",2008,"DateTimeFormatterStyle");return t},A3=(t,e,g)=>{let i=t.$settings;if(m_(A,e,"nameStyle"),m_(A,g,"context"),!["full","longAbbreviation","shortAbbreviation"].includes(e)||!["format","standalone"].includes(g))throw A.rt.error("ArgumentError",2008,"invalid style or context");return i.status=mL,{data:i.data,full:"full"===e,short:"shortAbbreviation"===e}},QS(A1,"flash.globalization::DateTimeFormatter",class{static getAvailableLocaleIDNames(){return m3(A)}"flash.globalization:DateTimeFormatter::ctor"(t,e,g){let i=mz(A,m_(A,t,"requestedLocaleIDName")),I=A2(e,"dateStyle"),B=A2(g,"timeStyle");if(I===Gs||B===Gs)throw A.rt.error("TypeError",2007,"Constructor Failed");this.$settings=new Gd(i),this.$settings.setStyles(I,B)}get lastOperationStatus(){return this.$settings.status}get requestedLocaleIDName(){return this.$settings.locale.requested}get actualLocaleIDName(){return this.$settings.locale.actual}setDateTimeStyles(A,t){let e=this.$settings,g=A2(A,"dateStyle"),i=A2(t,"timeStyle");if(g===Gs||i===Gs){e.status=mV;return}e.setStyles(g,i),e.status=mL}getDateStyle(){return this.$settings.status=mL,this.$settings.dateStyle}getTimeStyle(){return this.$settings.status=mL,this.$settings.timeStyle}getDateTimePattern(){return this.$settings.status=mL,this.$settings.pattern}setDateTimePattern(t){let e=this.$settings,g=Gc(m_(A,t,"pattern"));e.status=g.status,g.status!==mv&&(e.pattern=g.kept,e.fields=g.fields,e.dateStyle=Gs,e.timeStyle=Gs)}"flash.globalization:DateTimeFormatter::formatImplementation"(t,e){var g,i,I;let B,Q,C,r,s,o=this.$settings,n=m_(A,t,"dateTime").$time,E=e||Number.isNaN(n)?0:A.rt.prop(t,"timezoneOffset"),a=Number.isNaN(E)?new Date(n).getTimezoneOffset():E,l=A=>o.fields.some(({letter:t})=>""!==t&&A.includes(t)),h=l("yMdEGDQwF"),c=Number.isNaN(n),w=(B=Math.abs(g=c?0:n-6e4*a)>864e13?Math.trunc(g/126227808e5):0,{date:Q=new Date(g-126227808e5*B),year:Q.getUTCFullYear()+400*B}),d=c&&(e?h:!h||l("hHkKmsaS"))?null:h?function({date:A,year:t}){let e=t%65536,g=30828===e&&(A.getUTCMonth()>8||8===A.getUTCMonth()&&A.getUTCDate()>14);if(t<0||e<1601||e>30828||g)return null;let i=new Date(A.getTime());return i.setUTCFullYear(e),i}(w):w.date;return d?(o.status=mL,i=o.fields,I=o.data,C=d.getUTCFullYear(),r=d.getUTCHours(),s=(A,t)=>t>1?Gw(A):`${A}`,i.map(({letter:A,count:t,text:e},g)=>{switch(A){case"":return e;case"y":return 2===t?Gw(C%100):`${C}`;case"M":return t<3?s(d.getUTCMonth()+1,t):3===t?I.shortMonths[d.getUTCMonth()]:([-1,1].some(A=>{let t=g+A;for(;i[t]&&""===i[t].letter;)t+=A;return i[t]?.letter==="d"})?I.genitiveMonths:I.months)[d.getUTCMonth()];case"d":return s(d.getUTCDate(),t);case"E":return(t<4?I.shortWeekdays:I.weekdays)[d.getUTCDay()];case"a":return I.periods[r<12?0:1];case"h":case"K":return s(r%12||12,t);case"H":case"k":return s(r,t);case"m":return s(d.getUTCMinutes(),t);case"s":return s(d.getUTCSeconds(),t);case"G":return I.eras[+(C>0)];default:return""}}).join("")):(o.status=mV,"")}getMonthNames(t="full",e="standalone"){let{data:g,full:i}=A3(this,t,e);return m0(A,(i?"format"===e?g.genitiveMonths:g.months:g.shortMonths).slice())}getWeekdayNames(t="full",e="standalone"){let{data:g,full:i,short:I}=A3(this,t,e);return m0(A,(i?g.weekdays:I?g.shortestWeekdays:g.shortWeekdays).slice())}getFirstWeekday(){return this.$settings.status=mL,this.$settings.data.firstWeekday}}),A1),...(QS(A8={},"flash.globalization::LocaleID",class{static determinePreferredLocales(t,e,g="userinterface"){return m_(A,t,"want"),m_(A,e,"have"),m_(A,g,"keyword"),m0(A,function(A,t){let e=t.map(Gf),g=A.map(Gf),i=[];for(let A of g){let t=t=>t.named===A.named?0:t.maximized===A.maximized?1:g.some(A=>A.named===t.named)?2:t.regional?3:4;for(let g of e.filter(t=>t.language===A.language).sort((A,e)=>t(A)-t(e)))i.includes(g.name)||i.push(g.name)}return i}(m1(t),m1(e)))}"flash.globalization:LocaleID::ctor"(t){this.$parts=function(A){let t,e=mP(A),g=e.split("@")[0],i=mT(e),I=i?mW.exec(g):null;if(!i||!I){let[A,t=""]=e.split(/[-_. ]+/);return{name:e,language:e,script:"",region:/^[a-z]{2,8}$/.test(A)&&/^[a-z]{2}$/.test(t)?t:"",variant:"",keywords:{}}}let B=I[1].toLowerCase(),Q=I[2]&&I[2][0].toUpperCase()+I[2].slice(1).toLowerCase(),C=I[3]?.toUpperCase();try{Gu.includes(B)||(t=new Intl.Locale([B,Q,C].filter(Boolean).join("-")).maximize())}catch{}return{name:e,language:B,script:Q??t?.script??"",region:C??t?.region??"",variant:I[4].split(/[-_. ]+/).filter(Boolean).map(A=>A.toUpperCase()).join("-"),keywords:i}}(m_(A,t,"name"))}get name(){return this.$parts.name}get lastOperationStatus(){return mL}getLanguage(){return this.$parts.language}getScript(){return this.$parts.script}getRegion(){return this.$parts.region}getVariant(){return this.$parts.variant}getKeysAndValues(){return A.rt.newObject(Object.entries(this.$parts.keywords).flat())}isRightToLeft(){return GD.test(this.$parts.script)}}),A8),...(A9={},A4=(A,t)=>{let e=A.$settings;return e.format(t,A=>A?m9[e.negativeFormat]:"n")},QS(A9,"flash.globalization::NumberFormatter",class{static getAvailableLocaleIDNames(){return m3(A)}"flash.globalization:NumberFormatter::ctor"(t){this.$settings=new GA(mz(A,m_(A,t,"requestedLocaleIDName")))}get lastOperationStatus(){return this.$settings.status}get requestedLocaleIDName(){return this.$settings.locale.requested}get actualLocaleIDName(){return this.$settings.locale.actual}get fractionalDigits(){return this.$settings.fractionalDigits}set fractionalDigits(A){this.$settings.setFractionalDigits(A)}get useGrouping(){return this.$settings.useGrouping}set useGrouping(A){this.$settings.set("useGrouping",A)}get groupingPattern(){return this.$settings.groupingPattern}set groupingPattern(t){this.$settings.setGroupingPattern(m_(A,t,"value"))}get digitsType(){return this.$settings.digitsType}set digitsType(A){this.$settings.setDigitsType(A)}get decimalSeparator(){return this.$settings.decimalSeparator}set decimalSeparator(t){this.$settings.setDecimalSeparator(m_(A,t,"value"))}get groupingSeparator(){return this.$settings.groupingSeparator}set groupingSeparator(t){this.$settings.setGroupingSeparator(m_(A,t,"value"))}get negativeSymbol(){return this.$settings.negativeSymbol}set negativeSymbol(t){m_(A,t,"value"),this.$settings.status=mx}get negativeNumberFormat(){return this.$settings.negativeFormat}set negativeNumberFormat(A){this.$settings.setNegativeFormat(A)}get leadingZero(){return this.$settings.leadingZero}set leadingZero(A){this.$settings.set("leadingZero",A)}get trailingZeros(){return this.$settings.trailingZeros}set trailingZeros(A){this.$settings.set("trailingZeros",A)}formatInt(A){return A4(this,A)}formatUint(A){return A4(this,A)}formatNumber(A){return A4(this,A)}parse(t){let{value:e,start:g,end:i}=this.$settings.parse(m_(A,t,"parseString"));return A.rt.construct(A.rt.classNamed("flash.globalization::NumberParseResult"),e,g,i)}parseNumber(t){return this.$settings.parseNumber(m_(A,t,"parseString"))}}),A9),...(QS(A5={},"flash.globalization::StringTools",class{static getAvailableLocaleIDNames(){return m3(A)}"flash.globalization:StringTools::ctor"(t){this.$locale=mz(A,m_(A,t,"requestedLocaleIDName")),this.$status=this.$locale.status}get lastOperationStatus(){return this.$status}get requestedLocaleIDName(){return this.$locale.requested}get actualLocaleIDName(){return this.$locale.actual}toLowerCase(t){return this.$status=mL,GG(m_(A,t,"s"),this.$locale.actual,!0)}toUpperCase(t){return this.$status=mL,GG(m_(A,t,"s"),this.$locale.actual,!1)}}),A5),...(QS(A6={},"flash.net::URLRequest",class{get url(){return this.$url??null}set url(A){this.$url=null==A?null:String(A)}get data(){return this.$data??null}set data(A){this.$data=A}get method(){return this.$method??"GET"}"flash.net:URLRequest::setMethod"(A){this.$method=String(A)}get contentType(){return this.$contentType??"application/x-www-form-urlencoded"}set contentType(A){this.$contentType=A}get requestHeaders(){return this.$headers||(this.$headers=A.rt.array([])),this.$headers}"flash.net:URLRequest::setRequestHeaders"(A){this.$headers=A}get digest(){return this.$digest??null}set digest(A){this.$digest=A}useRedirectedURL(){}get followRedirects(){return this.$followRedirects??!0}set followRedirects(A){this.$followRedirects=!!A}get userAgent(){return this.$userAgent??G3(A)}set userAgent(A){this.$userAgent=A}get manageCookies(){return this.$manageCookies??!0}set manageCookies(A){this.$manageCookies=!!A}get useCache(){return this.$useCache??!0}set useCache(A){this.$useCache=!!A}get cacheResponse(){return this.$cacheResponse??!0}set cacheResponse(A){this.$cacheResponse=!!A}"flash.net:URLRequest::_SetIdleTimeout"(t){this.$idleTimeout=G8(A,t)}get idleTimeout(){return this.$idleTimeout??0}get authenticate(){return this.$authenticate??!0}set authenticate(A){this.$authenticate=!!A}}),A6),...(QS(A7={},"flash.net::URLRequestDefaults",class{static get followRedirects(){return G2(A).followRedirects}static set followRedirects(t){G2(A).followRedirects=!!t}static get manageCookies(){return G2(A).manageCookies}static set manageCookies(t){G2(A).manageCookies=!!t}static get authenticate(){return G2(A).authenticate}static set authenticate(t){G2(A).authenticate=!!t}static get useCache(){return G2(A).useCache}static set useCache(t){G2(A).useCache=!!t}static get cacheResponse(){return G2(A).cacheResponse}static set cacheResponse(t){G2(A).cacheResponse=!!t}static get idleTimeout(){return G2(A).idleTimeout}static set idleTimeout(t){G2(A).idleTimeout=G8(A,t)}static get userAgent(){return G2(A).userAgent||G3(A)}static set userAgent(t){G2(A).userAgent=null==t?null:A.rt.toString(t)}static setLoginCredentialsForHost(){}}),A7),...(tA={},tt=t=>t.$buffer??=A.rt.construct(A.rt.classNamed("flash.utils::ByteArray")),te=(t,e,...g)=>A.rt.callProp(tt(t),e,...g),tg=A=>{A.$generation=(A.$generation??0)+1,A.$abort?.abort(),A.$abort=null,A.$connected=!1},QS(tA,"flash.net::URLStream",class{load(t){if(null==t)throw A.rt.error("TypeError",2007,"request");this.$abort?.abort();let e=(this.$generation??0)+1;this.$generation=e,this.$connected=!1,this.$buffer=void 0;let g=new AbortController;this.$abort=g;let i=A.air&&cH(this,"httpResponseStatus");A.loads.requestBytes(t,g.signal,(t,g)=>{if(this.$generation!==e)return;let{status:I,local:B}=t,Q=I>=400,C=Q&&!A.air?null:t.bytes,r=void 0!==t.url,s=A.httpResponseStatus(t,g);if(this.$abort=null,null===C){if(this.$connected=!1,s&&(cK(A,this,s),this.$generation!==e)||(cK(A,this,A.httpStatus(I,r)),this.$generation!==e))return;cK(A,this,A.rt.construct(A.rt.classNamed("flash.events::IOErrorEvent"),"ioError",!1,!1,A.loads.streamError(g,B),2032));return}if(this.$connected=!0,cK(A,this,A.event("open")),this.$generation!==e||s&&(cK(A,this,s),this.$generation!==e))return;let o=i3(A.rt,tt(this));o.write(C),o.position=0,(!(C.length>0)&&A.air||(cK(A,this,A.rt.construct(A.rt.classNamed("flash.events::ProgressEvent"),"progress",!1,!1,C.length,C.length)),this.$generation===e))&&(cK(A,this,A.httpStatus(I,r)),this.$generation===e&&cK(A,this,Q&&!i?A.rt.construct(A.rt.classNamed("flash.events::IOErrorEvent"),"ioError",!1,!1,A.loads.streamError(g,B),2032):A.event("complete")))})}get connected(){return this.$connected??!1}get bytesAvailable(){return i3(A.rt,tt(this)).available}close(){if(!this.$abort&&!this.$connected)throw A.rt.error("flash.errors::IOError",2029);tg(this)}stop(){tg(this)}readBytes(A,t=0,e=0){te(this,"readBytes",A,t,e)}readBoolean(){return te(this,"readBoolean")}readByte(){return te(this,"readByte")}readUnsignedByte(){return te(this,"readUnsignedByte")}readShort(){return te(this,"readShort")}readUnsignedShort(){return te(this,"readUnsignedShort")}readInt(){return te(this,"readInt")}readUnsignedInt(){return te(this,"readUnsignedInt")}readFloat(){return te(this,"readFloat")}readDouble(){return te(this,"readDouble")}readUTF(){return te(this,"readUTF")}readUTFBytes(A){return te(this,"readUTFBytes",A)}readMultiByte(A,t){return te(this,"readMultiByte",A,t)}readObject(){return te(this,"readObject")}get objectEncoding(){return A.rt.prop(tt(this),"objectEncoding")}set objectEncoding(t){A.rt.setProp(tt(this),"objectEncoding",t)}get endian(){return A.rt.prop(tt(this),"endian")}set endian(t){A.rt.setProp(tt(this),"endian",t)}get diskCacheEnabled(){return!1}get position(){return i3(A.rt,tt(this)).position}set position(t){i3(A.rt,tt(this)).position=A.rt.toUint(t)>>>0}get length(){return i3(A.rt,tt(this)).length}}),tA),...(ti=(A,t)=>{if(null==t)throw A.error("TypeError",2007,"request");if(null===t.$url||void 0===t.$url)throw A.error("TypeError",2007,"url");return t},{"flash.net::navigateToURL":t=>(e,g)=>{var i;let I=ti(t,e),B=null==g?null:t.toString(g);A.loads.navigateTo(I,null===B?null:(i=B,/^_?blank$/i.test(i)?"_blank":i))},"flash.net::sendToURL":t=>e=>{A.loads.sendTo(ti(t,e))}}),...(QS(tI={},"flash.system::ApplicationDomain",class{static get currentDomain(){return A.code.applicationDomainOf(A.code.codeDomain())}static get MIN_DOMAIN_MEMORY_LENGTH(){return 1024}get domainMemory(){return A.rt.memoryProvider}set domainMemory(t){Ci(A.rt,t)}"flash.system:ApplicationDomain::ctor"(t){this.$domain=A.rt.childDomain(t?t.$domain??A.mainDomain:A.rt.root)}get parentDomain(){let t=(this.$domain??A.mainDomain).parent;return t&&t!==A.rt.root?A.code.applicationDomainOf(t):null}getQualifiedDefinitionNames(){let t=A.rt.resolve(A.rt.vector("String")).$it.instance();return t.$a=A.rt.definitionNames(this.$domain??A.mainDomain),t}getDefinition(t){let e;return e=this,G9(A.rt,String(t),t=>A.rt.definitionNamed(t,e.$domain??A.mainDomain))}hasDefinition(t){var e=this;if(null==t)return!1;try{return G9(A.rt,String(t),t=>A.rt.definitionNamed(t,e.$domain??A.mainDomain),()=>!0),!0}catch{return!1}}}),tI),...(QS(tB={},"flash.system::Capabilities",class{static get screenResolutionX(){return A.screenCapabilities.screenResolutionX}static get screenResolutionY(){return A.screenCapabilities.screenResolutionY}static get pixelAspectRatio(){return A.screenCapabilities.pixelAspectRatio}static get screenDPI(){return A.screenCapabilities.screenDPI}static get os(){return A.platform.os}static get manufacturer(){return A.platform.manufacturer}static get version(){return A.platform.version}static get language(){return A.platform.language}static get languages(){return A.rt.newArray([A.platform.language])}static get playerType(){return A.platform.playerType}static get isDebugger(){return A.rt.debugger}static get cpuArchitecture(){return"x86"}static get screenColor(){return"color"}static get touchscreenType(){return A.maxTouchPoints>0?"finger":"none"}static get maxLevelIDC(){return"5.1"}static get serverString(){var t;let e,g;return e=(t=A).platform,g=t.screenCapabilities,[["A","t"],["SA","t"],["SV","t"],["EV","t"],["MP3","t"],["AE","t"],["VE","t"],["ACC","t"],["PR","t"],["SP","f"],["SB","f"],["DEB",t.rt.debugger?"t":"f"],["V",e.version],["M",e.manufacturer],["R",`${g.screenResolutionX}x${g.screenResolutionY}`],["COL","color"],["AR",String(g.pixelAspectRatio)],["OS",e.os],["ARCH","x86"],["L",e.language],["IME","t"],["PR32","t"],["PR64","t"],["PT",e.playerType],["AVD","f"],["LFD","t"],["WD","f"],["TLS","t"],["ML","5.1"],["DP",String(g.screenDPI)]].map(([A,t])=>`${A}=${encodeURIComponent(t)}`).join("&")}static get _internal(){return 36}static hasMultiChannelAudio(A){return!1}static get hasAudio(){return!0}static get hasMP3(){return!0}static get hasStreamingAudio(){return!0}static get hasStreamingVideo(){return!0}static get hasEmbeddedVideo(){return!0}static get hasAudioEncoder(){return!0}static get hasVideoEncoder(){return!0}static get hasPrinting(){return!0}static get hasAccessibility(){return!0}static get hasIME(){return!0}static get hasTLS(){return!0}static get supports32BitProcesses(){return!0}static get supports64BitProcesses(){return!0}static get hasScreenBroadcast(){return!1}static get hasScreenPlayback(){return!1}static get avHardwareDisable(){return!1}static get localFileReadDisable(){return!0}static get isEmbeddedInAcrobat(){return!1}}),tB),...(tC=!0,tr=!1,QS(tQ={},"flash.system::Security",class{static get exactSettings(){return tC}static set exactSettings(A){tC=!!A}static get disableAVM1Loading(){return tr}static set disableAVM1Loading(A){tr=!!A}static get sandboxType(){return A.sandboxType}static get pageDomain(){return null}static allowDomain(){}static allowInsecureDomain(){}static loadPolicyFile(t){null!=t&&A.loads.policyFile(A.rt.toString(t))}static showSettings(A){}}),tQ),...(to=null,QS(ts={},"flash.system::SecurityDomain",class{static get currentDomain(){return to||(to=A.rt.classNamed("flash.system::SecurityDomain").$it.instance()),to}get domainID(){return Ft(FA(Fe.encode(A.url))).toUpperCase()}"flash.system:SecurityDomain::ctor_impl"(){throw A.rt.error("ArgumentError",2012,"SecurityDomain")}}),ts),...(tE=!1,QS(tn={},"flash.system::System",class{static get ime(){return null}static setClipboard(t){if(null==t)throw A.rt.error("TypeError",2007,"text");let e=A.clipboard;if(!e.writable)throw A.rt.error("Error",2176);e.clear(),e.set(DC,A.rt.toString(t))}static get totalMemory(){return 0}static get totalMemoryNumber(){return 0}static get freeMemory(){return 0}static get privateMemory(){return 0}static get processCPUUsage(){return 0}static get useCodePage(){return tE}static set useCodePage(A){tE=!!A}static get vmVersion(){return"swf2es"}static pause(){}static resume(){}static exit(A){}static gc(){}static pauseForGCIfCollectionImminent(A){}static disposeXML(A){}}),tn),...(ta={},tl=Dv(A),th=t=>tl[`flash.events::EventDispatcher#${t}`](A.rt),QS(ta,"flash.system::Worker",class{static get isSupported(){return A.workers.supported}get isPrimordial(){return 0===this.$worker}"flash.system:Worker::internalGetState"(){return A.workers.state(this.$worker)}getSharedProperty(t){return A.workers.getShared(this.$worker,Fg(A,t))}setSharedProperty(t,e){A.workers.setShared(this.$worker,Fg(A,t),e)}"flash.system:Worker::internalGetSharedProperty"(t){return A.workers.getShared(this.$worker,Fg(A,t))}"flash.system:Worker::internalSetSharedProperty"(t,e){A.workers.setShared(this.$worker,Fg(A,t),e)}"flash.system:Worker::internalAddEventListener"(){}"flash.system:Worker::internalRemoveEventListener"(){}start(){A.workers.start(this.$worker)}terminate(){return A.workers.terminate(this.$worker)}createMessageChannel(t){if(null==t)throw A.rt.error("TypeError",2007,"receiver");return A.workers.createChannel(this.$worker,t.$worker)}}),QS(ta,"flash.system::WorkerDomain",class{static get isSupported(){return A.workers.supported}createWorker(t){return A.workers.create(t)}listWorkers(){let t=A.rt,e=t.applyType(t.classNamed("__AS3__.vec::Vector"),[t.classNamed("flash.system::Worker")]).$it.instance();return e.$a=A.workers.list(),e.$fixed=!1,e}}),QS(ta,"flash.system::MessageChannel",class{send(t){A.workers.send(this,t)}get messageAvailable(){return A.workers.messageAvailable(this)}receive(t){return A.workers.receive(this,!!t)}addEventListener(...A){return th("addEventListener").apply(this,A)}removeEventListener(...A){return th("removeEventListener").apply(this,A)}close(){A.workers.close(this)}get state(){return A.workers.channelState(this)}toString(){return"[object MessageChannel]"}}),ta),...(QS(tc={},"flash.profiler::Telemetry",class{static get connected(){return!1}static get spanMarker(){return 0}static sendMetric(A,t){}static sendSpanMetric(A,t,e){}static registerCommandHandler(A,t){return!1}static unregisterCommandHandler(A){return!1}}),tc),...(QS(tw={},"flash.display::InteractiveObject",class{get tabEnabled(){return this.$tabEnabled??Dn(f0(this))}set tabEnabled(A){this.$tabEnabled=!!A}get tabIndex(){return this.$tabIndex??-1}set tabIndex(A){this.$tabIndex=0|Number(A)}get focusRect(){return this.$focusRect??null}set focusRect(A){this.$focusRect=A}get mouseEnabled(){return this.$mouseEnabled??!0}set mouseEnabled(A){this.$mouseEnabled=!!A,oT.changes++}get doubleClickEnabled(){return this.$doubleClickEnabled??!1}set doubleClickEnabled(A){this.$doubleClickEnabled=!!A}get accessibilityImplementation(){return this.$accessibility??null}set accessibilityImplementation(A){this.$accessibility=A}get softKeyboardInputAreaOfInterest(){return this.$softKeyboardArea??null}set softKeyboardInputAreaOfInterest(A){this.$softKeyboardArea=A}get needsSoftKeyboard(){return this.$needsSoftKeyboard??!1}set needsSoftKeyboard(A){this.$needsSoftKeyboard=!!A}get contextMenu(){return this.$contextMenu??null}set contextMenu(t){this.$contextMenu=mn(A,t,"flash.display::NativeMenu")}requestSoftKeyboard(){return!1}}),tw),...(QS(td={},"flash.net::FileFilter",class{get description(){return this.$description??null}set description(A){this.$description=A}get extension(){return this.$extension??null}set extension(A){this.$extension=A}get macType(){return this.$macType??null}set macType(A){this.$macType=A}}),td),...(tu={},tD=new WeakMap,tf=t=>{let e=tD.get(t);return e||(e={input:A.rt.construct(A.rt.classNamed("flash.utils::ByteArray")),output:A.rt.construct(A.rt.classNamed("flash.utils::ByteArray")),transport:null,generation:0,connected:!1,connecting:!1,failed:!1,endpoints:null,noDelay:null},tD.set(t,e)),e},tm=()=>{throw A.rt.error("flash.errors::IOError",2002)},tG=A=>{let t=tf(A);return t.connected||tm(),t},tF=(t,e,...g)=>A.rt.callProp(tG(t).input,e,...g),tR=(t,e,...g)=>A.rt.callProp(tG(t).output,e,...g),ty=(t,e)=>{cK(A,t,A.event(e))},QS(tu,"flash.net::Socket",class{"flash.net:Socket::internalGetSecurityErrorMessage"(A,t){return`Error #2048: Security sandbox violation: ${String(A)}:${Number(t)}`}"flash.net:Socket::internalConnect"(t,e){let g=tf(this);g.transport?.close(),g.generation++,g.transport=null,g.connected=!1,g.connecting=!0,g.failed=!1,g.endpoints=G0,i3(A.rt,g.input).clear(),i3(A.rt,g.output).clear();let i=g.generation,I=t=>{g.generation===i&&(g.generation++,g.connecting=!1,g.connected=!1,g.transport?.close(),g.transport=null,g.failed=!0,cK(A,this,A.rt.construct(A.rt.classNamed("flash.events::IOErrorEvent"),"ioError",!1,!1,t)))};if(!A.socket)return void A.loads.deferHostEvent(()=>I("Error #2031: Socket Error."));try{g.transport=A.socket.connect(null===t?"localhost":A.rt.toString(t),A.rt.toInt(e),{open:t=>A.loads.deferHostEvent(()=>{g.generation===i&&(g.connecting=!1,g.connected=!0,g.endpoints=t?{...t}:G0,ty(this,"connect"))}),data:t=>{let e=t.slice();A.loads.deferHostEvent(()=>{if(g.generation!==i||!g.connected)return;let t=i3(A.rt,g.input);if(t.position>=65536&&2*t.position>=t.length){let A=t.available;t.buffer.copyWithin(0,t.position,t.length),t.setLength(A),t.position=0}let I=t.position;t.position=t.length,t.write(e),t.position=I,cK(A,this,A.rt.construct(A.rt.classNamed("flash.events::ProgressEvent"),"socketData",!1,!1,e.length,0))})},close:()=>A.loads.deferHostEvent(()=>{if(g.generation===i){if(g.connecting)return void I("Error #2031: Socket Error.");g.connected=!1,g.connecting=!1,g.transport=null,ty(this,"close")}}),error:t=>A.loads.deferHostEvent(()=>I(t))},null===g.noDelay?void 0:{noDelay:g.noDelay})}catch(t){A.loads.deferHostEvent(()=>I(String(t)))}}"flash.net:Socket::didFailureOccur"(){return tf(this).failed}"flash.net:Socket::internalClose"(){let A=tf(this);A.connected||A.connecting||tm(),A.generation++,A.transport?.close(),A.transport=null,A.connected=!1,A.connecting=!1,A.endpoints=null}"flash.net:Socket::OnError"(){}"flash.net:Socket::wasCalledByAppContent"(){return!1}get localAddress(){return tf(this).endpoints?.localAddress??null}get localPort(){return tf(this).endpoints?.localPort??0}get remoteAddress(){return tf(this).endpoints?.remoteAddress??null}get remotePort(){return tf(this).endpoints?.remotePort??0}get connected(){return tf(this).connected}get tcpNoDelay(){return tf(this).noDelay??!1}set tcpNoDelay(A){tf(this).noDelay=!!A}get bytesAvailable(){return i3(A.rt,tf(this).input).available}get bytesPending(){return i3(A.rt,tf(this).output).length}flush(){let t=tG(this),e=i3(A.rt,t.output);0!==e.length&&(t.transport?.send(e.buffer.slice(0,e.length)),e.setLength(0),e.position=0)}readBytes(A,t,e){tF(this,"readBytes",A,t,e)}readBoolean(){return tF(this,"readBoolean")}readByte(){return tF(this,"readByte")}readUnsignedByte(){return tF(this,"readUnsignedByte")}readShort(){return tF(this,"readShort")}readUnsignedShort(){return tF(this,"readUnsignedShort")}readInt(){return tF(this,"readInt")}readUnsignedInt(){return tF(this,"readUnsignedInt")}readFloat(){return tF(this,"readFloat")}readDouble(){return tF(this,"readDouble")}readUTF(){return tF(this,"readUTF")}readUTFBytes(A){return tF(this,"readUTFBytes",A)}readMultiByte(A,t){return tF(this,"readMultiByte",A,t)}readObject(){return tF(this,"readObject")}writeBytes(A,t,e){tR(this,"writeBytes",A,t,e)}writeBoolean(A){tR(this,"writeBoolean",A)}writeByte(A){tR(this,"writeByte",A)}writeShort(A){tR(this,"writeShort",A)}writeInt(A){tR(this,"writeInt",A)}writeUnsignedInt(A){tR(this,"writeUnsignedInt",A)}writeFloat(A){tR(this,"writeFloat",A)}writeDouble(A){tR(this,"writeDouble",A)}writeMultiByte(A,t){tR(this,"writeMultiByte",A,t)}writeUTF(A){tR(this,"writeUTF",A)}writeUTFBytes(A){tR(this,"writeUTFBytes",A)}writeObject(A){tR(this,"writeObject",A)}get objectEncoding(){return A.rt.prop(tf(this).input,"objectEncoding")}set objectEncoding(t){let e=tf(this);A.rt.setProp(e.input,"objectEncoding",t),A.rt.setProp(e.output,"objectEncoding",t)}get endian(){return A.rt.prop(tf(this).input,"endian")}set endian(t){let e=tf(this);A.rt.setProp(e.input,"endian",t),A.rt.setProp(e.output,"endian",t)}}),tu),...(QS(tp={},"flash.net::SecureSocket",class{static get isSupported(){return!1}get serverCertificateStatus(){return"unknown"}get serverCertificate(){return null}}),tp),...(QS(tM={},"flash.net::XMLSocket",class{get"flash.net:XMLSocket::domain"(){return ch(A.url).domain}}),tM),...(tJ={},tk=new WeakMap,tN=t=>{let e=tk.get(t);if(e)return e;let g=A.code.securityUrls(3).map(ch),i=g[0]??ch(A.url);g.some(A=>A.domain!==i.domain||A.secure!==i.secure)&&(i.domain="");let I={owner:A,...i,key:null,client:t,locked:!1,perUser:!1,domains:new Set,insecure:new Set,alive:()=>!A.destroyed,allows:A=>{let t=I.secure&&!A.secure?I.insecure:I.domains;return!(I.secure&&!A.secure)&&A.domain===I.domain||t.has("*")||t.has(A.domain)},defer:t=>A.loads.deferHostEvent(t),status:e=>{cH(t,"status")&&cK(A,t,A.rt.construct(A.rt.classNamed("flash.events::StatusEvent"),"status",!1,!1,null,e?"status":"error"))},receive:(e,g)=>{try{var i,B;A.rt.callProperty(I.client,A.rt.publicName(e),...0===g.encoding?(i=A.rt,B=g.bytes,new GH(i,B).value().$a):GS(A.rt,g.bytes))}catch(i){if(i instanceof Error)return void A.reportUncaught(i);let g=A.rt.error("Error",2095,"flash.net.LocalConnection",e);if(!cH(t,"asyncError"))return void A.reportUncaught(g);cK(A,t,A.rt.construct(A.rt.classNamed("flash.events::AsyncErrorEvent"),"asyncError",!1,!1,A.rt.prop(g,"message"),A.rt.isInstance(i,A.rt.classNamed("Error"))?i:A.rt.construct(A.rt.classNamed("Error"),A.rt.toString(i))))}}};return tk.set(t,I),I},QS(tJ,"flash.net::LocalConnection",class{"flash.net:LocalConnection::ctor"(){tN(this)}get domain(){return tN(this).domain}connect(t){let e=tN(this);if(e.locked=!0,null===t)throw A.rt.error("TypeError",2007,"connectionName");if(""===t)throw A.rt.error("ArgumentError",2085,"connectionName");if(t.includes(":"))throw A.rt.error("ArgumentError",2004);if(!A.localConnections.connect(e,t))throw A.rt.error("ArgumentError",2082)}close(){let t=tN(this);if(t.locked=!0,!A.localConnections.close(t))throw A.rt.error("ArgumentError",2083)}send(t,e,...g){let i,I=tN(this);if(I.locked=!0,null===t||null===e)throw A.rt.error("TypeError",2007,null===t?"connectionName":"methodName");if(""===t||""===e)throw A.rt.error("ArgumentError",2085,""===t?"connectionName":"methodName");if(!cc(e))throw A.rt.error("ArgumentError",2004);try{i=function(A,t){let e=Gp.get(A);e||(e=[],Gp.set(A,e));let g=e.pop();if(!g){let t=A.construct(A.classNamed("flash.utils::ByteArray"));g=new GR(A,t),t.$bytes=g}let i=new Gy(A,g);try{return i.value(A.newArray(t)),g.buffer.slice(0,g.length)}finally{!i.escaped&&(g.position=0,g.setLength(0),e.length<2&&e.push(g))}}(A.rt,g)}catch(t){if(!(t instanceof RangeError))throw t;throw A.rt.error("ArgumentError",2084)}A.localConnections.send(I,t,e,{encoding:3,bytes:i,legacy:()=>(function(A,t){let e=new GY(A);for(let A of(e.out.bytes(10),e.out.u32(t.length),t))e.value(A);return e.out.finish()})(A.rt,GS(A.rt,i))})}get client(){return tN(this).client}set client(t){if(null==t)throw A.rt.error("TypeError",2007,"client");tN(this).client=t}get isPerUser(){return tN(this).perUser}set isPerUser(t){let e=tN(this);if(e.locked)throw A.rt.error("Error",3316);e.perUser=t}allowDomain(...t){let e=tN(this);for(let g of t)e.domains.add(A.rt.toString(g).toLowerCase())}allowInsecureDomain(...t){let e=tN(this);for(let g of t){let t=A.rt.toString(g).toLowerCase();e.insecure.add(t),e.domains.add(t)}}}),tJ),...(tS={},tb=new WeakMap,tU=A=>{let t=tb.get(A);return t||(t={state:"new",url:"",transport:null,protocol:null,closeReason:-1,closedHere:!1},tb.set(A,t)),t},tY=()=>{throw A.rt.error("flash.errors::IOError",2002)},tH=(t,e,g,i,I)=>{let B=A.rt.construct(A.rt.classNamed(e),g,!1,!1,I,i);cK(A,t,B)},tL=(A,t)=>tH(A,"flash.events::IOErrorEvent","ioError",2031,`Error #2031: Socket Error.${t&&` URL: ${t}`}`),tZ=(t,e)=>{e.transport?.close(),e.transport=null,e.state="closed",A.loads.deferHostEvent(()=>{tL(t,e.url),cK(A,t,A.event("close"))})},QS(tS,"air.net::WebSocket",class{"air.net:WebSocket::internalConnect"(t,e){if(null==t)throw A.rt.error("TypeError",2007,"url");let g=tU(this);if("new"!==g.state)throw A.rt.error("flash.errors::IllegalOperationError",2082);let i=A.rt.toString(t);if(!/^wss?:\/\//.test(i))throw A.rt.error("ArgumentError",2147,i);g.state="connecting",g.url=i;let I=null==e?[]:e.$a.filter(A=>null!=A).map(t=>A.rt.toString(t)),B=()=>{"connecting"===g.state&&(g.transport=null,g.state="failed",tL(this,(A=>{try{return new URL(A).hostname}catch{return""}})(i)))},Q=A.webSocket;if(!Q)return void A.loads.deferHostEvent(B);try{g.transport=Q.connect(i.replace(/#.*$/s,""),I,{open:t=>A.loads.deferHostEvent(()=>{"connecting"===g.state&&(g.state="open",""!==t&&(g.protocol=t),cK(A,this,A.event("connect")))}),message:t=>A.loads.deferHostEvent(()=>{if("open"!==g.state&&"closing"!==g.state)return;let e=A.rt.construct(A.rt.classNamed("flash.utils::ByteArray")),i=i3(A.rt,e);i.write("string"==typeof t?DF.encode(t):t.slice()),i.position=0;let I="string"==typeof t?1:2,B=A.rt.classNamed("flash.events::WebSocketEvent");cK(A,this,A.rt.construct(B,"websocketData",I,e))}),close:t=>A.loads.deferHostEvent(()=>{"connecting"===g.state?B():("open"===g.state||"closing"===g.state)&&(g.state="closed",g.transport=null,1005!==t&&1006!==t&&(g.closeReason=t),g.closedHere||cK(A,this,A.event("close")))}),error:()=>A.loads.deferHostEvent(B)})}catch(t){t?.name==="SecurityError"?(g.state="failed",A.loads.deferHostEvent(()=>tH(this,"flash.events::SecurityErrorEvent","securityError",2048,`Error #2048: Security sandbox violation: ${A.url} cannot load data from ${i}.`))):A.loads.deferHostEvent(B)}}sendMessage(t,e){let g;if("string"==typeof e)g=DF.encode(e);else if(null!=e&&A.rt.isInstance(e,A.rt.classNamed("flash.utils::ByteArray"))){let t=i3(A.rt,e);g=t.buffer.slice(0,t.length)}else throw A.rt.error("ArgumentError",1508,"data");let i=tU(this);switch(i.state){case"open":var I=A.rt.toUint(t),B=g;let Q=i.transport;if(Q)switch(15&I){case 1:Q.send(DR.decode(B));break;case 2:Q.send(B);break;case 8:{let A=B.length>=2?B[0]<<8|B[1]:0;i.state="closing",Q.close(Dy(A)?A:void 0)}}break;case"connecting":tZ(this,i);break;case"new":case"closed":tY()}}"air.net:WebSocket::internalClose"(t){let e=tU(this);switch(e.state){case"open":{let g=65535&A.rt.toUint(t);e.state="closing",e.closedHere=!0,e.transport?.close(Dy(g)?g:void 0);break}case"connecting":tZ(this,e);break;case"new":case"closed":tY()}}get protocol(){return tU(this).protocol}set protocol(t){let e=tU(this);if("open"===e.state||"closing"===e.state||"closed"===e.state)throw A.rt.error("ArgumentError",2014);e.protocol=null==t?null:A.rt.toString(t)}get closeReason(){return tU(this).closeReason}startServer(t){if(null==t)throw A.rt.error("TypeError",2007,"socket");throw A.rt.construct(A.rt.classNamed("flash.errors::IllegalOperationError"),"This method is not supported in this profile.")}}),tS),...(tK={},tx=new Map,tv=3,tV=!1,tX=new TextEncoder,tW=()=>i3(A.rt,A.rt.construct(A.rt.classNamed("flash.utils::ByteArray"))),tq=t=>{try{A.storage.remove(t)}catch{}},tT=(t,e)=>{if(0===e.length){A.storage.remove(t.$key),tq(t.$key+"#amf3");return}let g=G$(e);A.storage.set(g?t.$key+"#amf3":t.$key,e),tq(g?t.$key:t.$key+"#amf3")},tP=t=>{let e=t.$data.$d??new Map;if(0===e.size)return new Uint8Array(0);let g=t.$encoding>=3,i=tX.encode(t.$name),I=new Uint8Array(18+i.length+4);I.set([0,191],0),I.set([84,67,83,79,0,4,0,0,0,0],6),I.set([i.length>>8,255&i.length],16),I.set(i,18),I[I.length-1]=3*!!g;let B=tW();B.write(I);let Q=g?new I0(A.rt,B):null,C=g?null:new GP(A.rt,B);for(let[A,t]of e)Q?(Q.string(String(A)),Q.value(t)):(C.name(String(A)),C.value(t)),B.write(G_);let r=B.buffer.slice(0,B.length);return new DataView(r.buffer).setUint32(2,r.length-6),r},tO=t=>{if(null==t)throw A.rt.error("TypeError",2007,"url");throw A.rt.error("Error",2014)},A.flushSharedObjects=()=>{for(let A of tx.values())try{let t=tP(A);t.length&&!function(A,t){return null!==t&&A.length===t.length&&A.every((A,e)=>A===t[e])}(t,A.$saved)&&(tT(A,t),A.$saved=t)}catch{}},QS(tK,"flash.net::SharedObject",class{static getLocal(t,e,g){if(null==t)throw A.rt.error("TypeError",2007,"name");let i=A.rt.toString(t);if(""===i||Gj.test(i))throw A.rt.error("Error",2134);let I=new URL(A.code.codeUrl(),"file:///");if(g&&"https:"!==I.protocol)throw A.rt.error("Error",2134);let B=I.pathname.endsWith("/")?`${I.pathname}[swf]`:I.pathname,Q=B;if(null!=e){let t=(Q=A.rt.toString(e)).endsWith("/")?Q:`${Q}/`;if(Q!==B&&!B.startsWith(t))throw A.rt.error("Error",2134)}let C=`${I.host}${Q.startsWith("/")?"":"/"}${Q}/${i}${g?"#secure":""}`,r=tx.get(C);if(r)return r;let s=A.rt.construct(A.rt.classNamed("flash.net::SharedObject"));s.$key=C,s.$name=i,s.$encoding=tv,s.$client=s;let o=A.storage.get(C+"#amf3"),n=o??A.storage.get(C);return s.$data=(n&&((t,e)=>{if(t.length<18||0!==t[0]||191!==t[1])return null;let g=tW();g.write(t),g.position=Gz(t)+1;let i=G$(t),I=i?new I1(A.rt,g):null,B=i?null:new GO(A.rt,g),Q=A.rt.newObject([]);try{for(;g.position<g.length;){let t,i;I&&e?(t=new I1(A.rt,g).string(),i=new I1(A.rt,g).value()):(t=I?I.string():B.name(),i=I?I.value():B.value()),A.rt.setProperty(Q,iV(iY,t),i),g.position=g.position+1>>>0}}catch{return null}return Q})(n,null===o))??A.rt.newObject([]),s.$saved=(A=>{try{return tP(A)}catch{return null}})(s),tx.set(C,s),s}static deleteAll(A){return tO(A)}static getDiskUsage(A){return tO(A)}static get defaultObjectEncoding(){return tv}static set defaultObjectEncoding(t){tv=A.rt.toUint(t)}static get"flash.net:SharedObject::preventBackupImpl"(){return tV}static set"flash.net:SharedObject::preventBackupImpl"(A){tV=!!A}get data(){return this.$data}get objectEncoding(){return this.$encoding}set objectEncoding(t){this.$encoding=3*(0!==A.rt.toUint(t))}get client(){return this.$client}set client(A){this.$client=A}setDirty(A){}"flash.net:SharedObject::invoke"(t){switch(A.rt.toUint(t)){case 2:let e=tP(this);try{tT(this,e)}catch{return!1}return this.$saved=e,!0;case 4:return tP(this).length;case 6:this.$data=A.rt.newObject([]),this.$saved=new Uint8Array(0),tq(this.$key),tq(this.$key+"#amf3");return;case 3:return;default:throw A.rt.unsupported("SharedObject's remote calls")}}}),tK),...(tj={},tz=new WeakMap,t$=t=>{let e=oc();for(let g=t;g&&g!==A.stage;g=g.parent)e=ou(g.space?g.space.shown:Float32Array.of(g.matrix.a,g.matrix.b,0,0,g.matrix.c,g.matrix.d,0,0,0,0,1,0,g.matrix.tx,g.matrix.ty,0,1),e);return e},QS(tj,"flash.geom::Transform",class{"flash.geom:Transform::ctor"(A){this.$display=A.$display}get matrix(){return this.$display.space?null:fc(A,this.$display.matrix)}set matrix(t){this.$display.touch(),t?this.$display.setMatrix(fw(A,t)):this.$display.enter3D()}get colorTransform(){return fd(A,this.$display.colorTransform??fh)}set colorTransform(t){t&&(this.$display.colorTransform=fu(A,t),this.$display.touch(),this.$display.invalidate(1))}get concatenatedMatrix(){let t=this.$display;if(t.space)return null;let e=t.matrix,g=t.parent;for(;g&&g!==A.stage&&!g.space;g=g.parent)e=oQ(e,g.placed);let i=g?.space?an(g,!0):null;return i&&(e={...e,tx:e.tx+2-Math.floor(i.xMin),ty:e.ty+2-Math.floor(i.yMin)}),fc(A,e)}get concatenatedColorTransform(){let t={...this.$display.colorTransform??fh};for(let e=this.$display.parent;e&&e!==A.stage;e=e.parent){let A=e.colorTransform;if(A)for(let[e,,g]of[["rMul",0,"rAdd"],["gMul",0,"gAdd"],["bMul",0,"bAdd"],["aMul",0,"aAdd"]])t[g]=t[g]*A[e]+A[g],t[e]=t[e]*A[e]}return fd(A,t)}get matrix3D(){let t=this.$display,e=t.space;if(!e)return null;let g=tz.get(t);return g&&g.$matrix3D===e.raw||((g=A.rt.construct(A.rt.classNamed("flash.geom::Matrix3D"))).$matrix3D=e.raw,g.$owner=t,tz.set(t,g)),g}set matrix3D(t){let e=this.$display,g=tz.get(e);if(!t){g&&(g.$owner=null,tz.delete(e)),e.touch(),e.setMatrix3D(null);return}let i=t.$matrix3D;if(t===g&&e.space?.raw===i)return void e.touch();let I=t.$owner;if(I&&I!==e&&I.space?.raw===i)throw A.rt.error("ArgumentError",2189);if(0===of(i))throw A.rt.error("ArgumentError",2188);g&&(g.$owner=null),e.touch(),e.setMatrix3D(i,!1,!0),t.$owner=e,tz.set(e,t)}getRelativeMatrix3D(t){if(null==t)throw A.rt.error("TypeError",2007,"relativeTo");let e=this.$display;if(!e.space)return null;let g=om(t$(t.$display))??oc(),i=A.rt.construct(A.rt.classNamed("flash.geom::Matrix3D"));return i.$matrix3D.set(ou(g,t$(e))),i}get perspectiveProjection(){let t,e=this.$display;return e.projection||e===A.stage||null!==e.loaderInfo?((t=A.rt.construct(A.rt.classNamed("flash.geom::PerspectiveProjection"))).$display=e,t):null}set perspectiveProjection(t){this.$display.projection=t?t.$display?{...fE(A,t.$display)}:{fieldOfView:t.$fieldOfView*Math.PI/180,centerX:t.$centerX,centerY:t.$centerY}:null,this.$display.invalidate(1)}get pixelBounds(){let t=af(this.$display,A.stage,A.stage,!0),e=Math.ceil(t.xMin)||0,g=Math.ceil(t.yMin)||0,i=Math.ceil(t.xMax),I=Math.ceil(t.yMax);return A.rt.construct(A.rt.classNamed("flash.geom::Rectangle"),e,g,i-e,I-g)}}),tj),...function(A){let t={},e=null,g=["x","y","z","w"],i=(t,e)=>{if(null==t)throw A.rt.error("TypeError",2007,"vector3D");let g=A.rt.toUint(e);if(g>3)throw A.rt.error("ArgumentError",2004);return g},I=(t,e)=>{if(null==t)throw A.rt.error("TypeError",2007,e);return t},B=(t,e,g,i)=>A.rt.construct(A.rt.classNamed("flash.geom::Vector3D"),t,e,g,i),Q=t=>g.map(e=>A.rt.toNumber(A.rt.prop(t,e))),C=A=>{let[t,e,g]=Q(A);return[t,e,g]},r=t=>{let e=A.rt.toString(I(t,"orientationStyle"));if(!mU.includes(e))throw A.rt.error("Error",2187,e);return e},s=(t,e,g)=>{let i=A.rt.toNumber(t),I=A.rt.toNumber(e),B=A.rt.toNumber(g);if(0===i||0===I||0===B)throw A.rt.error("ArgumentError",2183);return ow(i,I,B)},o=(t,e,g)=>(function(A,t,[e,g,i],I=!0){let[B,Q,C]=t;if(I){let A=oh(Math.sqrt(oh(oh(oh(B*B)+oh(Q*Q))+oh(C*C))));B=oh(B/A),Q=oh(Q/A),C=oh(C/A)}let r=A*Math.PI/180,s=Math.cos(r),o=Math.sin(r),n=1-s,E=Float32Array.of(s+n*B*B,n*B*Q+o*C,n*B*C-o*Q,0,n*B*Q-o*C,s+n*Q*Q,n*Q*C+o*B,0,n*B*C+o*Q,n*Q*C-o*B,s+n*C*C,0,0,0,0,1);return 0===e&&0===g&&0===i?E:ou(od(e,g,i),ou(E,od(-e,-g,-i)))})(A.rt.toNumber(t),Q(I(e,"axis")),null==g?[0,0,0]:Q(g),A.rt.swfVersion>=13);class n{"flash.geom:Matrix3D::ctor"(A){let t=A?.$a;this.$matrix3D=t?.length===16?Float32Array.from(t.map(Number)):mS()}get rawData(){var t;let g;return t=mb(this),(g=(e??=A.rt.resolve(A.rt.vector("Number"))).$it.instance()).$a=Array.from(t),g}set rawData(A){let t=A?.$a;t?.length===16&&mb(this).set(t.map(Number))}clone(){let t=A.rt.construct(A.rt.classNamed("flash.geom::Matrix3D"));return mb(t).set(mb(this)),t}copyFrom(t){if(null==t)throw A.rt.error("TypeError",2007,"source");mb(this).set(mb(t))}copyToMatrix3D(t){if(null==t)throw A.rt.error("TypeError",2007,"dest");mb(t).set(mb(this))}copyRawDataFrom(t,e=0,g=!1){if(null==t)throw A.rt.error("TypeError",2007,"source");let i=t.$a,I=A.rt.toUint(e);if(I+16>i.length)throw A.rt.error("ArgumentError",2004);let B=mb(this);if(g)for(let A=0;A<16;A++)B[A]=Number(i[I+A%4*4+(A>>2)]);else for(let A=0;A<16;A++)B[A]=Number(i[I+A])}copyRawDataTo(t,e=0,g=!1){if(null==t)throw A.rt.error("TypeError",2007,"dest");let i=t.$a,I=A.rt.toUint(e);if(I>=0x10000000)throw A.rt.error("ArgumentError",2004);if(t.$fixed&&I+16>i.length)throw A.rt.error("RangeError",1126);for(;i.length<I+16;)i.push(0);let B=mb(this);for(let A=0;A<16;A++)i[I+A]=B[g?A%4*4+(A>>2):A]}copyRowTo(t,e){let I=i(e,t),B=mb(this);for(let t=0;t<4;t++)A.rt.setProp(e,g[t],B[I+4*t])}copyColumnTo(t,e){let I=i(e,t),B=mb(this);for(let t=0;t<4;t++)A.rt.setProp(e,g[t],B[4*I+t])}copyRowFrom(t,e){let I=i(e,t),B=mb(this);for(let t=0;t<4;t++)B[I+4*t]=A.rt.toNumber(A.rt.prop(e,g[t]))}copyColumnFrom(t,e){let I=i(e,t),B=mb(this);for(let t=0;t<4;t++)B[4*I+t]=A.rt.toNumber(A.rt.prop(e,g[t]))}identity(){mb(this).set(mS())}transpose(){let A=mb(this);for(let t=0;t<4;t++)for(let e=t+1;e<4;e++){let g=4*t+e,i=4*e+t,I=A[g];A[g]=A[i],A[i]=I}}appendTranslation(t,e,g){let i=mb(this);i[12]+=Math.fround(A.rt.toNumber(t)),i[13]+=Math.fround(A.rt.toNumber(e)),i[14]+=Math.fround(A.rt.toNumber(g))}prependTranslation(t,e,g){let i=od(A.rt.toNumber(t),A.rt.toNumber(e),A.rt.toNumber(g));mb(this).set(ou(mb(this),i))}appendScale(A,t,e){mb(this).set(ou(s(A,t,e),mb(this)))}prependScale(A,t,e){mb(this).set(ou(mb(this),s(A,t,e)))}appendRotation(A,t,e=null){mb(this).set(ou(o(A,t,e),mb(this)))}prependRotation(A,t,e=null){mb(this).set(ou(mb(this),o(A,t,e)))}append(A){mb(this).set(ou(mb(I(A,"lhs")),mb(this)))}prepend(A){mb(this).set(ou(mb(this),mb(I(A,"rhs"))))}get determinant(){let t=of(mb(this));return A.rt.swfVersion>=13?t:-t}invert(){let A=om(mb(this));return A&&mb(this).set(A),null!==A}get position(){let A=mb(this);return B(A[12],A[13],A[14],0)}set position(A){if(null==A)return;let[t,e,g]=Q(A),i=mb(this);i[12]=t,i[13]=e,i[14]=g}transformVector(A){let[t,e,g,i]=op(mb(this),...C(I(A,"vector")));return B(t,e,g,i)}deltaTransformVector(A){let[t,e,g,i]=op(mb(this),...C(I(A,"vector")),0);return B(t,e,g,i)}transformVectors(t,e){let g=I(t,"vin").$a,i=I(e,"vout"),B=3*Math.floor(g.length/3);if(B>i.$a.length){if(i.$fixed)throw A.rt.error("RangeError",1126,i.$a.length,B);for(;i.$a.length<B;)i.$a.push(0)}let Q=Array.from(mb(this));for(let A=0;A<B;A+=3){let t=Number(g[A]),e=Number(g[A+1]),I=Number(g[A+2]);i.$a[A]=Q[0]*t+Q[4]*e+Q[8]*I+Q[12],i.$a[A+1]=Q[1]*t+Q[5]*e+Q[9]*I+Q[13],i.$a[A+2]=Q[2]*t+Q[6]*e+Q[10]*I+Q[14]}}pointAt(A,t=null,e=null){let g=oS(mb(this),C(I(A,"position")),null==t?[0,1,0]:C(t),null==e?[0,0,1]:C(e));g&&mb(this).set(g)}decompose(t="eulerAngles"){let e=oy(mb(this),r(t)),g=A.rt.applyType(A.rt.classNamed("__AS3__.vec::Vector"),[A.rt.classNamed("flash.geom::Vector3D")]).$it.instance();return g.$a=e.map(([A,t,e,g])=>B(A,t,e,g)),g}recompose(A,t="eulerAngles"){let e=I(A,"components").$a,g=r(t),i=e.slice(0,3);if(i.length<3||i.some(A=>null==A))return!1;let[B,C,s]=i.map(A=>Q(A));return mb(this).set(oG(B,C,s,g)),!0}interpolateTo(t,e){let g=mb(I(t,"toMat"));mb(this).set(oM(mb(this),g,A.rt.toNumber(e)))}static interpolate(t,e,g){var i;let B;return i=oM(mb(I(t,"fromMat")),mb(I(e,"toMat")),A.rt.toNumber(g)),mb(B=A.rt.construct(A.rt.classNamed("flash.geom::Matrix3D"))).set(i),B}}let E=A=>{let t=A?.$owner;t?.matrix3DChanged(mb(A))},a=n.prototype;for(let A of mY){let t=Object.getOwnPropertyDescriptor(a,A);if(t.set){let A=t.set;t.set=function(t){A.call(this,t),E(this)}}else{let A=t.value;t.value=function(...t){let e=A.apply(this,t);return E(this),e}}Object.defineProperty(a,A,t)}return QS(t,"flash.geom::Matrix3D",n),t}(A),...fs(A,"blur"),...fs(A,"glow"),...fs(A,"dropShadow"),...fs(A,"bevel"),...fs(A,"gradientGlow",({gradientProps:A})=>A()),...fs(A,"gradientBevel",({gradientProps:A})=>A()),...fs(A,"colorMatrix",({elements:t,floats:e})=>({matrix:[t=>A.rt.array([...t.matrix]),(A,g)=>{A.matrix=e(t(g,"matrix"),20)}]})),...fs(A,"convolution",({elements:t,floats:e,matrixSize:g})=>({matrix:[t=>A.rt.array([...t.matrix]),(A,g)=>{A.matrix=e(t(g,"matrix"),A.matrixX*A.matrixY)}],matrixX:[A=>A.matrixX,(A,t)=>{A.matrixX=g(t),A.matrix=e(A.matrix,A.matrixX*A.matrixY)}],matrixY:[A=>A.matrixY,(A,t)=>{A.matrixY=g(t),A.matrix=e(A.matrix,A.matrixX*A.matrixY)}]})),...fs(A,"displacementMap",({num:t})=>({mapBitmap:[t=>fx(A,t.mapBitmap),(A,t)=>{A.mapBitmap=t??null}],mapPoint:[t=>A.rt.construct(A.rt.classNamed("flash.geom::Point"),t.mapPoint[0],t.mapPoint[1]),(e,g)=>{e.mapPoint=g?[Math.trunc(t(A.rt.prop(g,"x")))||0,Math.trunc(t(A.rt.prop(g,"y")))||0]:[0,0]}],mode:[A=>A.mode,(t,e)=>{if(null==e)throw A.rt.error("TypeError",2007,"mode");let g=A.rt.toString(e);if(!["wrap","clamp","ignore","color"].includes(g))throw A.rt.error("ArgumentError",2008,"mode");t.mode=g}]})),...(t_=t=>{let e=A.rt.toInt(t);if(e<0)throw A.rt.error("RangeError",2006);return e},t0=A=>[t=>t.extensions[A],(t,e)=>{t.extensions[A]=t_(e)}],fs(A,"shader",()=>({shader:[A=>A.shader??null,(t,e)=>{if(null==e)throw A.rt.error("TypeError",2007,"shader");if(!fy(e))throw A.rt.error("ArgumentError",2171);t.shader=e}],leftExtension:t0(0),topExtension:t0(1),rightExtension:t0(2),bottomExtension:t0(3),"flash.filters:ShaderFilter::_extendBy":[t=>{let[e,g,i,I]=t.extensions;return A.rt.construct(A.rt.classNamed("flash.geom::Rectangle"),e,g,i-e,I-g)},(t,e)=>{if(null==e)throw A.rt.error("TypeError",2007,"extendBy");let g=t=>A.rt.getProperty(e,A.rt.publicName(t));t.extensions=[t_(g("left")),t_(g("top")),t_(g("right")),t_(g("bottom"))]}]}))),...(QS(t1={},"flash.media::SoundTransform",class{get volume(){return this.$soundVolume??1}set volume(t){this.$soundVolume=A.rt.toNumber(t)}get leftToLeft(){return this.$soundLeftToLeft??1}set leftToLeft(t){this.$soundLeftToLeft=A.rt.toNumber(t)}get leftToRight(){return this.$soundLeftToRight??0}set leftToRight(t){this.$soundLeftToRight=A.rt.toNumber(t)}get rightToRight(){return this.$soundRightToRight??1}set rightToRight(t){this.$soundRightToRight=A.rt.toNumber(t)}get rightToLeft(){return this.$soundRightToLeft??0}set rightToLeft(t){this.$soundRightToLeft=A.rt.toNumber(t)}}),t1),...(t2={},t3=t=>{let e=cv.get(A);for(let g of e??[]){let i=g.$channel;i.sound!==t||i.playing||(cz(A,i),e?.delete(g))}},t8=t=>{cz(A,t);let e=cv.get(A);for(let A of e??[])if(A.$channel===t){e?.delete(A);break}},t9=t=>{let e=t.sound;e.character||e.clip||(e.clip=t4(e));let g=e.character?A.symbols.soundClip(e.character):e.clip;g?.then(e=>{t.stopped||(t.playing=e.play(t.start,t.loops,cW(t.mix,cq(A))))},()=>{e.character||t8(t)}).catch(()=>{e.character||t8(t)})},t4=t=>A.audio?t.pcm?A.audio.decode(function(A){let t=A[0].length,e=new Uint8Array(t*A.length*2),g=new DataView(e.buffer);for(let e=0;e<t;e++)for(let[t,i]of A.entries()){let I=Math.max(-1,Math.min(1,i[e]));g.setInt16((e*A.length+t)*2,Math.round(32767*I),!0)}return{id:0,format:3,sampleRate:44100,sampleSize:16,channels:1===A.length?1:2,sampleCount:t,seekSamples:0,data:e}}(t.pcm)):t.compressed&&t.bytes?A.audio.decode(t.bytes):null:null,QS(t2,"flash.media::Sound",class{extract(t,e,g=-1){let i=mG(this);if(null==t)return 0;let I=(A=>{if(A.pcm)return{rate:44100,channels:A.pcm,skip:0,whole:!1};let t=A.character,e=t?.definition;if(t&&e&&2!==e.format){let A=mf.get(t);return void 0===A&&(A=function(A){let t=A.channels,e={rate:A.sampleRate,skip:0,whole:!0};if(1===A.format){var g,i;let I,B,Q,C,r,s;return{...e,...(g=A.data,B=(Math.floor((I=cu(g,i=t).length/i)/2048)+1)*2048,Q=g.length?(g[0]>>6)+2:4,(C=new Uint8Array(g.length+Math.ceil((B-I)*Q*i/8)+8*i)).set(g),r=cu(C,i),s=22*i+4095*Q*i,{channels:mD(B,i,A=>r[A]/32768),starts:I,seek:A=>0>Math.imul(Math.floor(A/4096),s)?A%4096:A})}}if(4===A.format||5===A.format||6===A.format){let t=new cD().decode(A.data);return{...e,channels:[t.subarray(0,Math.min(t.length,A.sampleCount))]}}if(0!==A.format&&3!==A.format)return null;let I=new DataView(A.data.buffer,A.data.byteOffset,A.data.byteLength),B=A.sampleSize/8,Q=Math.min(A.sampleCount,Math.floor(A.data.byteLength/(B*t)));return{...e,channels:mD(Q,t,A=>1===B?(I.getUint8(A)-128)/128:I.getInt16(2*A,!0)/32768)}}(e),mf.set(t,A)),A}let g=t??A,i=e?e.data:A.bytes,I=mm.get(g);return void 0===I&&i?.length&&((I=function(A){let t=cy(A);if(!t?.whole.length||null===mw)return null;let e=t.whole.length/2*t.samplesPerFrame,g=Array.from({length:t.channels},()=>new Float32Array(e)),i=new mu,I=0;for(let e=0;e<t.whole.length;e+=2){let B=i.read(A.subarray(t.whole[e],t.whole[e+1]));if(i.channels===t.channels&&i.rate===t.rate){let A=Math.min(B,t.samplesPerFrame);for(let e=0;e<A;e++)for(let A=0;A<t.channels;A++)g[A][I+e]=i.pcm[e*t.channels+A]}I+=t.samplesPerFrame}return{rate:t.rate,channels:g,skip:0,whole:!1}}(i))&&e&&(I.skip=Math.max(0,e.seekSamples)),mm.set(g,I)),I??null})(i),B=A.rt.toNumber(g);if(B>=0){let A=B>=0x80000000?0:Math.floor(B);if(i.extracted=I?.seek?I.seek(A):A,I&&i.extracted>=(I.starts??1/0))return i.extracted=I.channels[0].length,0}if(!I)return 0;let{samples:Q,position:C,count:r}=function(A,t,e){let g=A.channels[0].length-A.skip,i=44100/A.rate,I=Math.max(0,g-t),B=Math.floor(e),Q=B>0?Math.min(B,Math.floor(I*i)):0;A.whole&&(Q=Math.floor(Math.floor(Q/i)*i));let C=Math.min(I,Math.ceil(Q/i)),[r,s=r]=A.channels,o=new Float32Array(2*Q);for(let e=0;e<Q;e++){let g=A.skip+t+Math.floor(e/i);o[2*e]=r[g],o[2*e+1]=s[g]}return{samples:o,position:t+C,count:t+C>=g?C:Q}}(I,i.extracted,A.rt.toNumber(e));i.extracted=C;let s=i3(A.rt,t),o=new Uint8Array(4*Q.length),n=new DataView(o.buffer);for(let A=0;A<Q.length;A++)n.setFloat32(4*A,Q[A],s.littleEndian);return o.length&&s.write(o),r}loadCompressedDataFromByteArray(t,e){if(null==t)throw A.rt.error("TypeError",2007,"bytes");let g=mG(this),i=i3(A.rt,t),I=A.rt.toUint(e);if(0===I||I>i.length-i.position)throw A.rt.error("ArgumentError",2084);let B=i.readView(I);if(g.character)return;let Q=g.compressed?g.bytes:null,C=(Q?.length??0)+I,r=Q&&0===Q.byteOffset&&Q.buffer.byteLength>=C?new Uint8Array(Q.buffer):null;r||(r=new Uint8Array(Math.max(C,(Q?.length??0)*2))).set(Q??[]),r.set(B,Q?.length??0);let s=r.subarray(0,C),o=cy(s,Q?g.frames:null);g.bytes=s,g.frames=o,g.compressed=!0,g.pcm=null,g.used=!0,g.loaded=I,g.total=I,g.length=o?o.frames*o.samplesPerFrame*1e3/o.rate:0,g.clip=null,mm.delete(g),cK(A,this,A.rt.construct(A.rt.classNamed("flash.events::ProgressEvent"),"progress",!1,!1,I,I))}loadPCMFromByteArray(t,e,g="float",i=!0,I=44100){if(null==t)throw A.rt.error("TypeError",2007,"bytes");if(null==g)throw A.rt.error("TypeError",2007,"format");let B=A.rt.toString(g);if("float"!==B&&"short"!==B)throw A.rt.error("ArgumentError",2005);let Q=i3(A.rt,t),C=A.rt.toUint(e),r=A.rt.toNumber(I),s=i?2:1,o="float"===B?4:2,n=Q.length-Q.position;if(0===C||!(r>0)||C>n)throw A.rt.error("ArgumentError",2084);let E=Math.floor(44100*C/r),a=Math.min(C,E);if(a*s*o>n)throw Q.position=Q.position+Math.floor(n/o)*o>>>0,A.rt.error("flash.errors::EOFError",2030);let l=Q.littleEndian,h=new DataView(Q.read(a*s*o).buffer),c=Array.from({length:s},()=>new Float32Array(a));for(let A=0;A<a*s;A++)c[A%s][Math.floor(A/s)]=4===o?h.getFloat32(4*A,l):h.getInt16(2*A,l)/32768;let w=mG(this),d=function(A,t){if(44100===t)return A;let e=Math.floor(44100*A[0].length/t);return A.map(A=>{let g=new Float32Array(e);for(let i=0;i<e;i++)g[i]=A[Math.floor(i*t/44100)];return g})}(c,a<C?44100:r);w.character=null,w.pcm=d,w.bytes=new Uint8Array(0),w.compressed=!1,w.used=!0,w.loaded=C*o,w.total=C*o,w.length=d[0].length/44.1,w.extracted=0,w.clip=null}"flash.media:Sound::_load"(t,e,g){let i=mG(this),I=i.character?.definition;if(I&&0===i.total&&(i.loaded=I.data.length,i.total=I.data.length),null==t)return;if(i.used)throw A.rt.error("Error",2037);i.used=!0,A.audio?.warm?.();let B=++i.generation,Q=new AbortController;i.abort=Q,A.loads.requestBytes(t,Q.signal,({bytes:t,local:e},g)=>{if(i.generation!==B)return;if(i.abort=null,i.url=g,!t){t3(i),cK(A,this,A.rt.construct(A.rt.classNamed("flash.events::IOErrorEvent"),"ioError",!1,!1,A.loads.streamError(g,e)));return}if(i.bytes=t,i.loaded=t.length,i.total=t.length,cK(A,this,A.event("open")),i.generation!==B||(cK(A,this,A.rt.construct(A.rt.classNamed("flash.events::ProgressEvent"),"progress",!1,!1,t.length,t.length)),i.generation!==B))return;if(!A.audio){t3(i),cK(A,this,A.event("complete"));return}for(let e of(i.clip=A.audio.decode(t),cv.get(A)??[])){let A=e.$channel;A.sound!==i||A.stopped||t9(A)}let I=i.clip.then(t=>{i.length=t.durationMs,A.loads.deferHostEvent(()=>{i.generation===B&&cK(A,this,A.event("complete"))})},()=>{t3(i),A.loads.deferHostEvent(()=>{i.generation===B&&cK(A,this,A.rt.construct(A.rt.classNamed("flash.events::IOErrorEvent"),"ioError",!1,!1,A.loads.streamError(g,e)))})});A.loads.trackRequest(I)},"content")}get url(){return mG(this).url}get isURLInaccessible(){return!1}get length(){return mG(this).length}get isBuffering(){return!1}get bytesLoaded(){return mG(this).loaded}get bytesTotal(){return mG(this).total}get id3(){return null}close(){let A=mG(this);A.abort?.abort(),A.abort=null,A.generation++,t3(A)}play(t,e,g){let i=mG(this),I=!i.character&&!i.bytes&&!i.abort&&(this.$listeners?.get("sampleData")?.length??0)>0;if(!I&&!i.character&&!i.bytes&&!i.abort)return null;let B=Math.max(0,A.rt.toNumber(t)||0);if(i.length>0&&B>=i.length||c3(cO(A))>=32)return null;let Q=A.rt.construct(A.rt.classNamed("flash.media::SoundChannel")),C={sound:i,started:A.timers.now,start:B,loops:Math.max(0,A.rt.toInt(e)),mix:mF(cX(g)),playing:null,stopped:!1,stoppedAt:0};Q.$channel=C;let r=cv.get(A);if(r||(r=new Set,cv.set(A,r)),r.add(Q),I){let t=()=>{r.delete(Q);try{C.stoppedAt=cj(A,C)}catch{C.stoppedAt=C.start}C.stopped=!0;try{C.playing?.stop()}catch{}};try{!function(A,t,e,g){let i,I=A.rt.construct(A.rt.classNamed("flash.utils::ByteArray")),B=i3(A.rt,I),Q=0,C=0,r=!1,s=!1,o=!1,n=!0,E=()=>i?.positionMs??Math.min(1e3*Q/44100,A.timers.now-e.started),a=()=>{B.position=0;let g=A.rt.construct(A.rt.classNamed("flash.events::SampleDataEvent"),"sampleData",!1,!1,Q+C,I);if(cK(A,t,g),e.stopped)return;let s=Math.floor(B.position/8);if(s>8192||B.position>B.length){r=!0,i?.finish(),A.reportUncaught(s>8192?A.rt.error("RangeError",2004):A.rt.error("flash.errors::EOFError",2030));return}if(s>0){let A=[new Float32Array(s),new Float32Array(s)];for(let t=0;t<s;t++)for(let e=0;e<2;e++){let g=B.view.getFloat32(8*t+4*e,B.littleEndian);A[e][t]=Number.isFinite(g)?g:0}Q+=s,i?.append(A)}s<2048&&(r=!0,i?.finish())},l=()=>{if(o&&!s&&!r&&!e.stopped){s=!0;try{Q-44100*E()/1e3<8192&&a()}catch(A){if(n)throw A;r=!0,g(A)}finally{s=!1}}};if(e.dynamic={position:()=>e.start+E(),pump:l,complete:()=>r&&(i?!0===i.ended:E()>=Q/44.1)},i=A.audio?.stream?.(cW(e.mix,cq(A)),l),e.playing=i??null,o=!0,l(),!r&&!e.stopped&&8192===Q){s=!0;try{a()}finally{s=!1}}C=Math.floor(44.1*e.start),n=!1}(A,this,C,e=>{t(),A.reportUncaught(e)})}catch(A){throw t(),A}}else t9(C);return Q}}),QS(t2,"flash.media::SoundChannel",class{get position(){let t=this.$channel;return t?cj(A,t):0}get soundTransform(){return my(A,this.$channel?.mix??cX(null))}set soundTransform(t){let e=this.$channel;e&&(e.mix=mF(cX(t)),e.playing?.setMix(cW(e.mix,cq(A))))}get leftPeak(){return 0}get rightPeak(){return 0}stop(){let t=this.$channel;t&&!t.stopped&&(cz(A,t),cv.get(A)?.delete(this))}}),t2),...(t6=5,t7="media",eA=!1,QS(t5={},"flash.media::SoundMixer",class{static get soundTransform(){return my(A,cq(A))}static set soundTransform(t){mR(A,t)}static get bufferTime(){return t6}static set bufferTime(t){let e=A.rt.toInt(t);if(e<0)throw A.rt.error("RangeError",2027,"bufferTime",e);t6=e}static stopAll(){c$(A)}static areSoundsInaccessible(){return!1}static computeSpectrum(t,e,g){if(null==t)throw A.rt.error("TypeError",2007,"sound");let i=t.$bytes;i.setLength(2048),i.position=0,i.write(new Uint8Array(2048)),i.position=0}static get audioPlaybackMode(){return t7}static set audioPlaybackMode(t){if(null==t)throw A.rt.error("TypeError",2007,"audioPlaybackMode");let e=A.rt.toString(t);if(!GF.includes(e))throw A.rt.error("ArgumentError",2004);t7=e}static get useSpeakerphoneForVoice(){return eA}static set useSpeakerphoneForVoice(A){eA=!!A}}),t5),...(et={},ee=A=>(A.$display.drawing??=new h9,A.$display.invalidate(4),A.$display.drawing),eg=(A,t=0)=>{let e=Number(A);return Number.isNaN(e)?t:e},ei=(t,e=1)=>{if(null==t)throw A.rt.error("TypeError",2007,"shader");if(!fy(t))throw A.rt.error("ArgumentError",2171);return fS(A,t,0,e)},eI=t=>{if(null==t)return{...mQ};let e=A.rt;return{a:e.toNumber(e.getProperty(t,mC[0])),b:e.toNumber(e.getProperty(t,mC[1])),c:e.toNumber(e.getProperty(t,mC[2])),d:e.toNumber(e.getProperty(t,mC[3])),tx:e.toNumber(e.getProperty(t,mC[4])),ty:e.toNumber(e.getProperty(t,mC[5]))}},eB=(t,e,g,i,I,B,Q,C)=>{let r=A=>A.$a??[],s=r(e),o=null==g?s.map(()=>1):r(g),n=null==i?s.map((A,t)=>s.length>1?Math.floor(255*t/(s.length-1)):0):r(i).map(t=>Math.trunc(A.rt.toNumber(t)));if(o.length!==s.length||n.length!==s.length||n.some(A=>!(A>=0&&A<=255)))return null;let E=A.rt.toString(B),a={type:"gradient",radial:"radial"===t,focal:"radial"===t?eg(C):0,stops:s.slice(0,16).map((A,t)=>({ratio:n[t],color:mo(A,o[t])})),spread:"reflect"===E?1:2*("repeat"===E),linearRgb:"linearRGB"===A.rt.toString(Q),matrix:eI(I)};return null==I&&mr.add(a),a},eQ=(A,t,e,g)=>{if(A instanceof Ee&&mg(A.drawn()?.layers??[],t,mr,g),mg(A.drawing?.layers??[],t,mr,g),e&&A instanceof ng)for(let e of A.children)eQ(e,oQ(e.matrix,t),!0,g)},eC=t=>A.rt.construct(A.rt.classNamed("flash.geom::Matrix"),t.a,t.b,t.c,t.d,t.tx,t.ty),er=(t,e)=>{let g=A.rt.resolve(A.rt.vector(t)).$it.instance();return g.$a=e,g},es=t=>{let e=(t,...e)=>A.rt.construct(A.rt.classNamed(`flash.display::${t}`),...e);switch(t.type){case"solid":return e("GraphicsSolidFill",t.color,t.alpha);case"gradient":return e("GraphicsGradientFill",t.radial?"radial":"linear",A.rt.array(t.colors),A.rt.array(t.alphas),A.rt.array(t.ratios),eC(t.matrix),t.spread,t.linearRgb?"linearRGB":"rgb",t.focal);case"bitmap":{let g=t.image instanceof nK?t.image:null,i=null;return g&&((i=A.rt.construct(A.rt.classNamed("flash.display::BitmapData"),g.width,g.height,g.transparent,0)).$store=g.clone()),e("GraphicsBitmapFill",i,eC(t.matrix),!0,!1)}case"path":return e("GraphicsPath",er("int",t.commands),er("Number",t.data),t.winding);default:return e("GraphicsEndFill")}},QS(et,"flash.display::Graphics",class{"flash.display:Graphics::nativeGetGraphicsData"(A,t){let e=[];eQ(this.$display,mQ,!!t,e);let g=A.$a;for(let A of e)g.push(es(A))}clear(){ee(this).clear()}beginFill(A,t=1){ee(this).beginFill({type:"solid",color:mo(A,t)})}beginGradientFill(t,e,g,i,I=null,B="pad",Q="rgb",C=0){let r=A.rt.toString(t);if("linear"!==r&&"radial"!==r)throw A.rt.error("ArgumentError",2008,"type");if(null==e)throw A.rt.error("TypeError",2007,"colors");let s=eB(r,e,g,i,I,B,Q,C);ee(this).beginFill(s??{type:"solid",color:0})}beginBitmapFill(t,e=null,g=!0,i=!1){if(null==t)throw A.rt.error("TypeError",2007,"bitmap");let I=t.$store;if(!I)throw A.rt.error("ArgumentError",2015);I.views.add(this.$display.ref),ee(this).beginFill({type:"image",image:I,matrix:eI(e),repeat:!!g,smooth:!!i})}beginShaderFill(A,t=null){ee(this).beginFill({type:"shader",use:ei(A),matrix:eI(t)})}endFill(){ee(this).endFill()}lineStyle(A=0/0,t=0,e=1,g=!1,i="normal",I=null,B=null,Q=3){let C=Number(A);if(Number.isNaN(C))return void ee(this).lineStyle(null);let r=mi[String(I??"round")]??0,s={width:Math.round(20*Math.max(0,Math.min(255,C))),color:mo(t,e),startCap:r,endCap:r,join:mI[String(B??"round")]??0,miterLimit:eg(Q,3),noHScale:"none"===i||"vertical"===i,noVScale:"none"===i||"horizontal"===i,pixelHinting:!!g,noClose:!1,fill:null};ee(this).lineStyle(s)}lineGradientStyle(t,e,g,i,I=null,B="pad",Q="rgb",C=0){if(null==e)throw A.rt.error("TypeError",2007,"colors");let r=A.rt.toString(t);if("linear"!==r&&"radial"!==r)throw A.rt.error("ArgumentError",2008,"type");let s=eB(r,e,g,i,I,B,Q,C);s&&ee(this).lineGradient(s)}lineBitmapStyle(t,e=null,g=!0,i=!1){if(null==t)throw A.rt.error("TypeError",2007,"bitmap");let I=t.$store;if(!I)return;let B={type:"image",image:I,matrix:eI(e),repeat:!!g,smooth:!!i};I.views.add(this.$display.ref),ee(this).lineBitmap(B)}lineShaderStyle(A){ei(A,2)}drawRect(A,t,e,g){ee(this).drawRect(eg(A),eg(t),eg(e),eg(g))}drawRoundRect(A,t,e,g,i,I=0/0){let B=eg(i);ee(this).drawRoundRect(eg(A),eg(t),eg(e),eg(g),B,eg(I,B))}drawRoundRectComplex(A,t,e,g,i,I,B,Q){let C=A=>{let t=Math.min(Math.abs(eg(A)),Math.abs(eg(e))/2,Math.abs(eg(g))/2);return[t,t]};ee(this).drawRoundRectComplex(eg(A),eg(t),eg(e),eg(g),C(i),C(I),C(B),C(Q))}moveTo(A,t){ee(this).moveTo(eg(A),eg(t))}lineTo(A,t){ee(this).lineTo(eg(A),eg(t))}curveTo(A,t,e,g){ee(this).curveTo(eg(A),eg(t),eg(e),eg(g))}cubicCurveTo(A,t,e,g,i,I){ee(this).cubicCurveTo(eg(A),eg(t),eg(e),eg(g),eg(i),eg(I))}drawPath(t,e,g="evenOdd"){if("evenOdd"!==g&&"nonZero"!==g)throw A.rt.error("ArgumentError",2008,"winding");let i=(t?.$a??[]).map(A=>Number(A)),I=(e?.$a??[]).map(A=>Number(A));if(i.length&&I.length%2)throw A.rt.error("ArgumentError",2004);ee(this).drawPath(i,I,g)}drawTriangles(t,e=null,g=null,i="none"){if(null==t)return;let I=t.$a,B=I;for(let A=0;A<B.length;A++){let t=20*B[A];t>=-0x80000000&&t<=0x7fffffff||(B===I&&(B=I.slice()),B[A]=-107374182.4)}let Q=B.length/2,C=null==e?null:e.$a,r=null==g?null:g.$a;if(B.length%2||(C?C.length%3:Q%3)||r&&r.length!==2*Q&&r.length!==3*Q)throw A.rt.error("ArgumentError",2004);let s="string"==typeof i&&Object.hasOwn(mB,i)?mB[i]:void 0;if(void 0===s)throw A.rt.error("ArgumentError",2008,"culling");let o=r;if(r&&r.length!==3*Q){o=Array(3*Q);for(let A=0;A<Q;A++)o[3*A]=r[2*A],o[3*A+1]=r[2*A+1],o[3*A+2]=1}ee(this).drawTriangles(B,C,o,s)}copyFrom(A){let t=A?.$display?.drawing;if(t)for(let A of(ee(this).copyFrom(t),t.layers)){for(let{fill:t}of A.fills)"image"===t.type&&t.image instanceof nK&&t.image.views.add(this.$display.ref);for(let{paint:t}of A.strokes)t?.type==="image"&&t.image instanceof nK&&t.image.views.add(this.$display.ref);for(let t of A.meshes??[])t.image.views.add(this.$display.ref)}else ee(this).clear()}}),et),...(QS(eo={},"flash.display::Shape",class{get graphics(){return ms(A,this)}}),eo),...(QS(en={},"flash.display::Shader",class{get data(){return this.$data??null}set data(A){this.$data=A??null}get precisionHint(){return this.$precision??"full"}set precisionHint(t){let e=null==t?null:A.rt.toString(t);if("full"!==e&&"fast"!==e)throw A.rt.error("ArgumentError",2004);this.$precision=e}}),en),...(QS(eE={},"flash.display::ShaderData",class{"flash.display:ShaderData::_setByteCode"(t){let e;if(null==t)throw A.rt.error("TypeError",2007,"byteCode");let g=i3(A.rt,t);try{e=function(A){let t=new AJ(A),e={name:null,metadata:[],parameters:[],inputs:[],operations:[]},g=null,i=0,I=[],B=()=>{throw new Am(2004)};for(;!t.done;){let A=t.u8();switch(A){case 165:1!==t.i32()&&B();break;case 164:e.name=t.string(t.u16());break;case 160:case 162:{let i=t.u8(),I=t.cstring();if(0===i||i>=Au.length)throw new Am(2030);let Q=function(A,t){if(12===t)return A.cstring();let e=[];for(let g=0;g<AD[t];g++)e.push(Af(t)?A.f32():A.u16());return e}(t,i);160===A?(12!==i&&8!==i&&B(),e.metadata.push({key:I,type:i,value:Q})):g?.metadata.push({key:I,type:i,value:Q});break}case 161:{let A=t.u8(),i=t.u8(),I=t.u16(),Q=t.u8(),C=t.cstring(),r=2===A;(12===i||"name"===C||r&&!Af(i))&&B();let s=i-5+2,o=s>=2&&s<=4?AS(I,s):Ak(I,15&Q),n={name:C,type:i,output:r,register:o,metadata:[]};r&&o.matrix&&B(),e.parameters.push(n),g=n;break}case 163:{let A=t.u8(),i=t.u8();e.inputs.push({name:t.cstring(),index:A,channels:i}),g=null;break}case 0:{let A=t.u24(),e=t.u24();(0!==A||0!==e)&&B();break}case 50:{let g=Ak(t.u16(),t.u8()>>4),i=g.int?65535&t.i32():t.f32();0===g.size&&B(),e.operations.push({op:A,dst:g,value:i});break}case 48:case 49:{let g=t.u16(),i=t.u8(),I=AN(t.u24(),(3&i)+1),Q=t.u8(),C=Ak(g,i>>4);(C.int||0===C.size)&&B(),e.operations.push({op:A,dst:C,src:I,texture:Q});break}case 52:{t.skip(3);let g=AN(t.u24(),1);t.skip(1),g.int||B(),i++,I.push(!1),e.operations.push({op:A,src:g});break}case 53:case 54:t.skip(7),(0===i||53===A&&I[I.length-1])&&B(),53===A?I[I.length-1]=!0:(i--,I.pop()),e.operations.push({op:A});break;case 51:{let g=Ak(t.u16(),t.u8()>>4),i=AN(t.u24(),1);t.skip(1);let I=AN(t.u24(),g.size);t.skip(1);let Q=AN(t.u24(),g.size);t.skip(1),i.int&&g.int===I.int&&I.int===Q.int&&0!==g.size||B(),e.operations.push({op:A,dst:g,condition:i,a:I,b:Q});break}default:{let g=t.u16(),i=t.u8(),I=t.u24();t.skip(1);let Q=Ap.get(A)??B(),C=(3&i)+1,r=i>>2&3;if(0===r){let t=Ak(g,i>>4),r=AN(I,C);(0===t.size||!function(A,t,e){let g=t.int?2:1,i=e.int?2:1;for(let t=0;t<A.kinds.length;t+=2)if(A.kinds[t]===g&&A.kinds[t+1]===i)return!0;return!1}(Q,t,r)||!function(A,t,e){switch(A.sizes){case"same":return t===e;case"any":return!0;case"scalar":return 1===t&&1===e;case"vector":return t===e&&e>=2;case"length":return 1===t&&e>=2;case"cross":return 3===t&&3===e}}(Q,t.size,r.size))&&B(),e.operations.push({op:A,dst:t,src:r});break}let s=r+1,o=AS(I,s),n=34===A||33===A,E=n?Ak(g,i>>4):AS(g,s);(!AM.includes(A)||I>>>16!=0||1!==C||o.int||E.int||(n?E.size!==s:i>>4!=0))&&B(),e.operations.push({op:A,dst:E,src:o})}}}return 0===i&&e.parameters.some(A=>A.output)||B(),e}(g.buffer.subarray(0,g.length))}catch(t){if(!(t instanceof Am))throw t;throw 2030===t.errorID?A.rt.error("flash.errors::EOFError",2030):A.rt.error("ArgumentError",2004)}finally{g.position=g.length}this.$kernel=e;let i=this.$d;for(let A of e.metadata)i.set(A.key,"string"==typeof A.value?A.value:A.value[0]);null!==e.name&&i.set("name",e.name);let I=0;for(let t of e.parameters){if(t.output||t.name===D8)continue;let e=A.rt.construct(A.rt.classNamed("flash.display::ShaderParameter"));for(let g of(e.$type=Au[t.type]??null,e.$index=I++,e.$value=null,t.metadata))e.$d.set(g.key,fm(A,g.value)),"defaultValue"===g.key&&(e.$value=12===g.type?null:fm(A,g.value));e.$d.set("name",t.name),i.set(t.name,e)}for(let t of e.inputs){let e=A.rt.construct(A.rt.classNamed("flash.display::ShaderInput"));e.$channels=t.channels,e.$index=t.index,e.$d.set("name",t.name),i.set(t.name,e)}}}),eE),...(QS(ea={},"flash.display::ShaderInput",class{get input(){return this.$input??null}set input(t){if(!fR(A,t))throw A.rt.error("ArgumentError",2004);this.$input=t}get width(){return this.$width??0}set width(t){this.$width=A.rt.toInt(t)}get height(){return this.$height??0}set height(t){this.$height=A.rt.toInt(t)}get channels(){return this.$channels??0}get index(){return this.$index??0}}),ea),...(QS(el={},"flash.display::ShaderParameter",class{get value(){return this.$value??null}set value(A){this.$value=A??null}get type(){return this.$type??null}get index(){return this.$index??0}}),el),...(eh={},ec=t=>A.rt.isInstance(t,fF(A).bitmapData),ew=t=>A.rt.isInstance(t,fF(A).vector),ed=(t,...e)=>{throw A.rt.error("ArgumentError",t,...e)},eu=(t,e,g)=>{if(ec(t)){let A=t.$store;if(A.disposed)return;let i=new Uint32Array(A.width*A.height);for(let t=0,I=0;t<i.length;t++,I+=g)i[t]=ft(e,I,g,A.transparent);A.pixels=i,A.changed();return}if(ew(t)){if(t.$fixed&&t.$a.length!==e.length)throw A.rt.error("RangeError",1126);A.rt.setElements(t,Array.from(e));return}let i=i3(A.rt,t),I=new Uint8Array(4*e.length),B=new DataView(I.buffer);for(let A=0;A<e.length;A++)B.setFloat32(4*A,e[A],i.littleEndian);i.setLength(0),i.position=0,i.write(I)},QS(eh,"flash.display::ShaderJob",class{get shader(){return this.$jobShader??null}set shader(A){this.$jobShader=A??null}get target(){return this.$jobTarget??null}set target(A){this.$jobTarget=A??null}get width(){return this.$jobWidth??0}set width(t){this.$jobWidth=A.rt.toInt(t)}get height(){return this.$jobHeight??0}set height(t){this.$jobHeight=A.rt.toInt(t)}get progress(){return this.$jobProgress??0/0}start(t){let e;(this.$jobState??0)!==0&&ed(2172);let g=this.$jobShader??null;if(null===g)throw A.rt.error("TypeError",2007,"shader");let i=g.$data??null;null!==i&&i.$kernel||ed(2171);let I=ff(i.$kernel),B=this.$jobTarget??null,Q=this.$jobWidth??0,C=this.$jobHeight??0;if(ec(B)){let A=B.$store,t=I.output.type;(!A||A.disposed||3!==t&&4!==t)&&ed(2162),Q=A.width,C=A.height}else(!fR(A,B)||Q<=0||C<=0)&&ed(2004);let r=I.kernel,s=new Map,o=[];for(let t of r.inputs){let e=fN(A,i,t.name,t.channels,o);s.set(t.index,e)}for(let A of I.sampled)s.has(A)||ed(2167);let n=fp(A,i,r);for(let A of o)A();try{e=new Float32Array(Q*C*I.channels)}catch(A){throw A instanceof RangeError&&ed(2004),A}let E=ew(B)?B:null;if(E?.$fixed&&E.$a.length!==e.length)throw A.rt.error("RangeError",1126);if(I.run(n,s,Q,C,e),t){eu(B,e,I.channels),this.$jobState=2,this.$jobProgress=1;return}this.$jobState=1,this.$jobProgress=1,A.afterExitFrame.push(()=>{if(1!==this.$jobState)return;this.$jobState=2,eu(B,e,I.channels);let t=A.rt.construct(fF(A).shaderEvent,"complete",!1,!1,ec(B)?B:null,A.rt.isInstance(B,fF(A).byteArray)?B:null,E);cK(A,this,t)})}cancel(){1===this.$jobState&&(this.$jobState=2,this.$jobProgress=0)}}),eh),...(eD={},ef=(A,t)=>{let e=f0(A),g="hitTest"===t?e.hitTestState:e.stateObject(t);return g?.object??null},em=(t,e,g)=>{let i=f0(t),I=null==g?null:f0(g);switch(I?.parent&&I.parent!==i&&!I.encloses(i)&&I.parent.removeChild(I),e){case"up":i.upState=I;break;case"over":i.overState=I;break;case"down":i.downState=I;break;default:i.hitTestState=I}i.show(),I?.encloses(i)&&e===i.state&&A.reportUncaught(A.rt.error("ArgumentError",2150))},QS(eD,"flash.display::SimpleButton",class{"flash.display:SimpleButton::_updateButton"(){f0(this).show()}get upState(){return ef(this,"up")}set upState(A){em(this,"up",A)}get overState(){return ef(this,"over")}set overState(A){em(this,"over",A)}get downState(){return ef(this,"down")}set downState(A){em(this,"down",A)}get hitTestState(){return ef(this,"hitTest")}set hitTestState(A){em(this,"hitTest",A)}get enabled(){return f0(this).enabled}set enabled(A){f0(this).enabled=!!A,oT.changes++}get useHandCursor(){return f0(this).useHandCursor}set useHandCursor(A){f0(this).useHandCursor=!!A}get trackAsMenu(){return f0(this).trackAsMenu}set trackAsMenu(A){f0(this).trackAsMenu=!!A}get soundTransform(){return my(A,cq(A))}set soundTransform(t){mR(A,t)}}),eD),...(QS(eG={},"flash.utils::Timer",class{get running(){return A.timers.timerRunning(this)}"flash.utils:Timer::_start"(t,e){A.timers.startTimer(this,Number(t),e)}stop(){A.timers.stopTimer(this)}"flash.utils:Timer::_timerDispatch"(){cK(A,this,A.rt.construct(A.rt.classNamed("flash.events::TimerEvent"),"timer"))}}),eG),...(QS(eF={},"flash.text::StaticText",class{get text(){let A=f0(this);return A instanceof Ey?A.glyphs.text:null}}),eF),...(eR={},ey=new WeakMap,QS(eR,"flash.text::Font",class{get fontName(){return this.$font?.name??null}get fontStyle(){var A;return this.$font?(A=this.$font).bold&&A.italic?"boldItalic":A.bold?"bold":A.italic?"italic":"regular":null}get fontType(){return this.$font?"fontCff"===this.$font.type?"embeddedCFF":"embedded":null}hasGlyphs(A){let t=this.$font;if(!t)return!1;if("fontCff"===t.type)return 0===A.length;let e=ey.get(t);e||(e=new Set(t.font.glyphs.map(A=>A.code)),ey.set(t,e));for(let t=0;t<A.length;t++)if(!e.has(A.charCodeAt(t)))return!1;return!0}static enumerateFonts(t){let e=A.rt.classNamed("flash.text::Font"),g=[];for(let t of FQ(A,!1))g.push({font:t,cls:e});for(let[t,e]of A.symbols.registeredFonts)g.push({font:e,cls:t});return g.sort((A,t)=>{let e=A.font.name.toLowerCase(),g=t.font.name.toLowerCase();return e<g?-1:+(e>g)}),A.rt.array(g.map(({font:t,cls:e})=>{let g=A.rt.construct(e);return g.$font=t,g}))}static registerFont(t){let e=t?.$it&&A.symbols.fontSymbol(t.$it);if(!e)throw A.rt.error("ArgumentError",1508,"font");A.symbols.registerFont(t,e)}}),eR),...(ep={},eM=(t,e)=>{if(null==t)throw A.rt.error("TypeError",2007,e);let g=A.rt.toString(t);if(Fi[e]&&!Fi[e].includes(g))throw A.rt.error("ArgumentError",2008,e);return g},eJ=(t,e,g)=>{let i=FI(t);if(i.locked)throw A.rt.error("Error",2185);i[e]=eM(g,e)},ek=(t,e,g,i)=>{if(!i&&null==t)return!1;let I=eM(t,"fontName"),B=eM(e,"fontWeight"),Q=eM(g,"fontPosture"),C="bold"===B,r="italic"===Q;if(!i)return[...A.code.codeLibrary()?.characters.values()??[],...A.symbols.registeredFonts.values()].some(A=>"fontCff"===A.type&&A.name.toLowerCase()===I.toLowerCase()&&A.bold===C&&A.italic===r);if(["_sans","_serif","_typewriter"].includes(I.toLowerCase()))return!1;let s=Er(I,48,C,r),o=["M","W","i","1","@"];if("Linux"===A.platform.os){let A={arial:"Liberation Sans","times new roman":"Liberation Serif","courier new":"Liberation Mono"}[I.toLowerCase()];if(A){let t=Er(A,48,C,r);if(o.every(A=>s.advance(A)===t.advance(A)))return!1}}let n=Er("__swf2es_missing_font__",48,C,r);return o.some(A=>s.advance(A)!==n.advance(A))},QS(ep,"flash.text.engine::FontDescription",class{get fontName(){return FI(this).fontName}set fontName(A){eJ(this,"fontName",A)}get fontWeight(){return FI(this).fontWeight}set fontWeight(A){eJ(this,"fontWeight",A)}get fontPosture(){return FI(this).fontPosture}set fontPosture(A){eJ(this,"fontPosture",A)}get fontLookup(){return FI(this).fontLookup}set fontLookup(A){eJ(this,"fontLookup",A)}get renderingMode(){return FI(this).renderingMode}set renderingMode(A){eJ(this,"renderingMode",A)}get cffHinting(){return FI(this).cffHinting}set cffHinting(A){eJ(this,"cffHinting",A)}get locked(){return FI(this).locked}set locked(t){let e=FI(this);if(e.locked)throw A.rt.error("Error",2185);e.locked=!!t}static isFontCompatible(A,t,e){return ek(A,t,e,!1)}static isDeviceFontCompatible(A,t,e){return ek(A,t,e,!0)}}),ep),...(QS(eN={},"flash.text.engine::TabStop",class{get alignment(){return FB(this).alignment}set alignment(t){if(null==t)throw A.rt.error("TypeError",2007,"alignment");let e=A.rt.toString(t);if(!["start","center","end","decimal"].includes(e))throw A.rt.error("ArgumentError",2008,"alignment");FB(this).alignment=e}get position(){return FB(this).position}set position(t){let e=Number(t);if(e<0)throw A.rt.error("ArgumentError",2004);FB(this).position=e}get decimalAlignmentToken(){return FB(this).decimalAlignmentToken}set decimalAlignmentToken(t){if(null==t)throw A.rt.error("TypeError",2007,"decimalAlignmentToken");FB(this).decimalAlignmentToken=A.rt.toString(t)}}),eN),...(eS={},eb=A=>(A.$format??=Ed(),A.$format),eU=t=>{let e=A.rt.construct(A.rt.classNamed("flash.text::TextFormat"));return e.$format={...t,tabStops:t.tabStops?[...t.tabStops]:null},e},eY=A=>{A.$display.invalidate(4),A.$display.deferFit()},eH=(t,e)=>{let g=A.rt.toInt(e);if(g<0||g>=t.layout.lines.length)throw A.rt.error("RangeError",2006);return g},eL=(t,e,g)=>{let i=t.model.text.length,I=void 0===e||-1===A.rt.toInt(e)?0:A.rt.toInt(e),B=void 0===g||-1===A.rt.toInt(g)?i:A.rt.toInt(g);if(I<0||B<I||B>i)throw A.rt.error("RangeError",2006);return[I,B]},eZ=(t,e,g)=>{let i=A.rt.toString(t);if(!e.includes(i))throw A.rt.error("ArgumentError",2008,g);return i},eK=A=>{let t=A.model.text.length;A.select(t,t)},ex=A=>{"input"!==A.type&&eK(A)},ev=(t,e)=>{let g=t.styleSheet.$styles??null;t.htmlSource=e,t.model.setHtml(e,t.multiline,A.trimTrailingHtmlBreak,t=>{let e=g?A.rt.getProperty(g,A.rt.publicName(t)):null;return e&&"object"==typeof e?eb(e):null})},QS(eS,"flash.text::TextFormat",class{get font(){return eb(this).font}set font(t){eb(this).font=null==t?null:A.rt.toString(t)}get size(){return eb(this).size}set size(t){eb(this).size=null==t?null:Fs(A.rt.toNumber(t))}get color(){return eb(this).color}set color(t){eb(this).color=null==t?null:Fs(A.rt.toNumber(t))}get bold(){return eb(this).bold}set bold(A){eb(this).bold=null==A?null:!!A}get italic(){return eb(this).italic}set italic(A){eb(this).italic=null==A?null:!!A}get underline(){return eb(this).underline}set underline(A){eb(this).underline=null==A?null:!!A}get url(){return eb(this).url}set url(t){eb(this).url=null==t?null:A.rt.toString(t)}get target(){return eb(this).target}set target(t){eb(this).target=null==t?null:A.rt.toString(t)}get align(){return eb(this).align}set align(A){eb(this).align=null==A?null:eZ(A,Fr,"align")}get leftMargin(){return eb(this).leftMargin}set leftMargin(t){eb(this).leftMargin=null==t?null:Fs(A.rt.toNumber(t))}get rightMargin(){return eb(this).rightMargin}set rightMargin(t){eb(this).rightMargin=null==t?null:Fs(A.rt.toNumber(t))}get indent(){return eb(this).indent}set indent(t){eb(this).indent=null==t?null:Fs(A.rt.toNumber(t))}get leading(){return eb(this).leading}set leading(t){eb(this).leading=null==t?null:Fs(A.rt.toNumber(t))}get blockIndent(){return eb(this).blockIndent}set blockIndent(t){eb(this).blockIndent=null==t?null:Fs(A.rt.toNumber(t))}get letterSpacing(){return eb(this).letterSpacing}set letterSpacing(t){eb(this).letterSpacing=null==t?null:A.rt.toNumber(t)}get kerning(){return eb(this).kerning}set kerning(A){eb(this).kerning=null==A?null:!!A}get bullet(){return eb(this).bullet}set bullet(A){eb(this).bullet=null==A?null:!!A}get tabStops(){let t=eb(this).tabStops;return null===t?null:A.rt.array(t)}set tabStops(t){let e=t?.$a??null;eb(this).tabStops=null===e?null:e.map(t=>Fs(A.rt.toNumber(t)))}get display(){return eb(this).display}set display(t){let e=null==t?null:A.rt.toString(t);eb(this).display="block"===e||"inline"===e||"none"===e?e:null}}),QS(eS,"flash.text::TextField",class{get text(){return this.$display.model.text}set text(t){if(null==t)throw A.rt.error("TypeError",2007,"value");let e=this.$display,g=A.rt.toString(t),i="input"!==e.type&&g!==e.model.text;e.styleSheet?ev(e,g):e.model.setText(g),i&&e.select(0,0),eY(this)}get htmlText(){let A=this.$display;return A.styleSheet&&null!==A.htmlSource?A.htmlSource:A.model.toHtml()}set htmlText(t){if(null==t)throw A.rt.error("TypeError",2007,"value");if(this.$display.styleSheet){let e=A.rt.toString(t);e!==this.$display.htmlSource&&(ev(this.$display,e),ex(this.$display),eY(this));return}this.$display.model.setHtml(A.rt.toString(t),this.$display.multiline,A.trimTrailingHtmlBreak),ex(this.$display),eY(this)}get length(){return this.$display.model.text.length}getRawText(){return this.$display.model.text}appendText(t){let e=this.$display.model;e.replace(e.text.length,e.text.length,A.rt.toString(t)),"input"!==this.$display.type&&eK(this.$display),eY(this)}replaceText(t,e,g){if(this.$display.styleSheet)throw A.rt.error("Error",2009);let i=this.$display.model,I=Math.max(0,Math.min(i.text.length,A.rt.toInt(t))),B=Math.max(I,Math.min(i.text.length,A.rt.toInt(e))),Q=A.rt.toString(g);i.replace(I,B,Q),"input"!==this.$display.type&&this.$display.select(I+Q.length,I+Q.length),eY(this)}get textColor(){let A=this.$display.model;return(A.formats[0]??A.defaultFormat).color>>>0}set textColor(t){let e=A.rt.toUint(t),g=this.$display.model;g.defaultFormat={...g.defaultFormat,color:e};let i=Ed();i.color=e,g.setFormat(i,0,g.text.length),eY(this)}get defaultTextFormat(){return eU(this.$display.model.defaultFormat)}set defaultTextFormat(t){if(null==t)throw A.rt.error("TypeError",2007,"format");let e=this.$display.model;e.defaultFormat=Eu(e.defaultFormat,eb(t))}getTextFormat(A=-1,t=-1){let e=this.$display,[g,i]=eL(e,A,t);return eU(e.model.formatOf(g,i))}setTextFormat(t,e=-1,g=-1){if(null==t)throw A.rt.error("TypeError",2007,"format");let i=this.$display,[I,B]=eL(i,e,g);i.model.setFormat(eb(t),I,B),eY(this)}get type(){return this.$display.type}set type(A){this.$display.type=eZ(A,["dynamic","input"],"type"),eY(this)}get autoSize(){return this.$display.autoSize}set autoSize(A){this.$display.autoSize=eZ(A,["none","left","right","center"],"autoSize"),this.$display.deferFit()}get antiAliasType(){return this.$display.antiAliasType}set antiAliasType(t){let e=A.rt.toString(t);("normal"===e||"advanced"===e)&&e!==this.$display.antiAliasType&&(this.$display.antiAliasType=e,eY(this))}get gridFitType(){return this.$display.gridFitType}set gridFitType(t){let e=A.rt.toString(t);this.$display.gridFitType="pixel"===e||"subpixel"===e?e:"none",this.$display.invalidate(4)}get border(){return this.$display.border}set border(A){this.$display.border=!!A,eY(this)}get borderColor(){return this.$display.borderColor}set borderColor(t){this.$display.borderColor=0xffffff&A.rt.toUint(t),eY(this)}get background(){return this.$display.background}set background(A){this.$display.background=!!A,eY(this)}get backgroundColor(){return this.$display.backgroundColor}set backgroundColor(t){this.$display.backgroundColor=0xffffff&A.rt.toUint(t),eY(this)}get multiline(){return this.$display.multiline}set multiline(A){this.$display.multiline=!!A,eY(this)}get wordWrap(){return this.$display.wordWrap}set wordWrap(A){this.$display.wordWrap=!!A,eY(this)}get embedFonts(){return this.$display.embedFonts}set embedFonts(A){this.$display.embedFonts=!!A,eY(this)}get selectable(){return this.$display.selectable}set selectable(A){this.$display.selectable=!!A}get displayAsPassword(){return this.$display.displayAsPassword}set displayAsPassword(A){this.$display.displayAsPassword=!!A,eY(this)}get condenseWhite(){return this.$display.condenseWhite}set condenseWhite(A){this.$display.condenseWhite=!!A}get maxChars(){return this.$display.maxChars}set maxChars(t){this.$display.maxChars=A.rt.toInt(t)}get restrict(){return this.$display.restrict}set restrict(t){this.$display.restrict=null==t?null:A.rt.toString(t)}get sharpness(){return this.$display.sharpness}set sharpness(t){this.$display.sharpness=A.rt.toNumber(t),this.$display.invalidate(4)}get thickness(){return this.$display.thickness}set thickness(t){this.$display.thickness=A.rt.toNumber(t),this.$display.invalidate(4)}get mouseWheelEnabled(){return this.$display.mouseWheelEnabled}set mouseWheelEnabled(A){this.$display.mouseWheelEnabled=!!A}get alwaysShowSelection(){return this.$display.alwaysShowSelection}set alwaysShowSelection(A){this.$display.alwaysShowSelection=!!A}get useRichTextClipboard(){return this.$display.useRichTextClipboard}set useRichTextClipboard(A){this.$display.useRichTextClipboard=!!A}get textWidth(){return this.$display.layout.width/20}get textHeight(){return this.$display.layout.height/20}get numLines(){return this.$display.layout.lines.length}getLineMetrics(t){let e=this.$display.layout.lines[eH(this.$display,t)];return A.rt.construct(A.rt.classNamed("flash.text::TextLineMetrics"),e.x/20,e.width/20,(e.ascent+e.descent+e.leading)/20,e.ascent/20,e.descent/20,e.leading/20)}getLineLength(A){let t=this.$display.layout.lines[eH(this.$display,A)];return t.end-t.start}getLineOffset(A){return this.$display.layout.lines[eH(this.$display,A)].start}getLineText(A){let t=this.$display.layout.lines[eH(this.$display,A)];return this.$display.model.text.slice(t.start,t.end)}getLineIndexOfChar(t){let e=A.rt.toInt(t),g=this.$display;return e<0||e>=g.model.text.length?-1:EE(g.layout,e)}getCharBoundaries(t){let e=A.rt.toInt(t),g=this.$display;if(e<0||e>=g.model.text.length)return null;let i=g.layout.lines[EE(g.layout,e)],I=i.chars[e-i.start];return I?.shown?A.rt.construct(A.rt.classNamed("flash.geom::Rectangle"),I.x/20,i.y/20,I.advance/20,(i.ascent+i.descent)/20):null}getLineIndexAtPoint(t,e){return Fo(this.$display,20*A.rt.toNumber(t),20*A.rt.toNumber(e))}getCharIndexAtPoint(t,e){let g=this.$display,i=20*A.rt.toNumber(t),I=Fo(g,i,20*A.rt.toNumber(e));if(I<0)return -1;for(let A of g.layout.lines[I].chars)if(A.shown&&i>=A.x&&i<A.x+A.advance)return A.index;return -1}get scrollV(){return this.$display.scrollV}set scrollV(t){let e=this.$display;e.scrollV=Math.max(1,Math.min(A.rt.toInt(t),El(e))),eY(this)}get maxScrollV(){return El(this.$display)}get bottomScrollV(){let A=this.$display;return A.scrollV+Ea(A,A.scrollV-1)-1}get scrollH(){return this.$display.scrollH}set scrollH(t){this.$display.scrollH=Math.max(0,A.rt.toInt(t)),this.$display.invalidate(4)}get maxScrollH(){return 0}get selectionBeginIndex(){return this.$display.selection[0]}get selectionEndIndex(){return this.$display.selection[1]}get selectedText(){let[A,t]=this.$display.selection;return this.$display.model.text.slice(A,t)}get caretIndex(){return this.$display.caret}setSelection(t,e){this.$display.select(A.rt.toInt(t),A.rt.toInt(e))}replaceSelectedText(t){if(this.$display.styleSheet)throw A.rt.error("Error",2009);let e=this.$display,[g,i]=e.selection,I=A.rt.toString(t);e.model.replace(g,i,I),e.select(g+I.length,g+I.length),eY(this)}getTextRuns(t=0,e=0x7fffffff){let g=this.$display.model,i=Math.max(0,A.rt.toInt(t)),I=Math.min(g.text.length,A.rt.toInt(e)),B=[];for(let[t,e]of g.runs(i,I))B.push(A.rt.construct(A.rt.classNamed("flash.text::TextRun"),t,e,eU(g.formatOf(t,e))));return A.rt.array(B)}getFirstCharInParagraph(t){return Fn(this.$display.model.text,A.rt.toInt(t))[0]}getParagraphLength(t){return Fn(this.$display.model.text,A.rt.toInt(t))[1]}getImageReference(t){if(null==t)throw A.rt.error("TypeError",2007,"name");return null}static isFontCompatible(t,e){if(null==t)return!1;let g=A.rt.toString(t).toLowerCase(),i=null==e?"":A.rt.toString(e),I="bold"===i||"boldItalic"===i,B="italic"===i||"boldItalic"===i;return FQ(A).some(A=>"font"===A.type&&A.name.toLowerCase()===g&&A.bold===I&&A.italic===B)}get textInteractionMode(){return"normal"}get styleSheet(){return this.$display.styleSheet}set styleSheet(A){let t,e=this.$display,g=A??null;if(e.styleSheet=g,!g){e.htmlSource=null,e.restyle=null;return}if(null===e.htmlSource){e.restyle=null;return}(t=FC.get(g))||(t=new Set,FC.set(g,t)),t.add(e.ref),e.restyle=()=>{null!==e.htmlSource&&(ev(e,e.htmlSource),eY({$display:e}))}}}),eS),...(eX="default",eW=4,eq="default",QS(eV={},"flash.text::TextRenderer",class{static get displayMode(){return"default"===eX?"crt":eX}static set displayMode(t){if(null==t)return;let e=A.rt.toString(t);eX="lcd"===e||"crt"===e?e:"default"}static get maxLevel(){return eW}static set maxLevel(t){let e=A.rt.toInt(t);(3===e||4===e||7===e)&&(eW=e)}static get antiAliasType(){return eq}static set antiAliasType(t){if(null==t)throw A.rt.error("TypeError",2007,"antialiasType");let e=A.rt.toString(t);eq="on"===e||"default"===e?e:"off"}static setAdvancedAntiAliasingTable(t,e,g,i){var I,B,Q;let C,r;for(let[i,I]of[["fontName",t],["fontStyle",e],["colorType",g]])if(null==I)throw A.rt.error("TypeError",2007,i);let s=i?.$a;if(!s)return;let o=A.rt.classNamed("flash.text::CSMSettings");for(let t of s)if(!A.rt.isInstance(t,o))throw A.rt.error("TypeError",2005,4,"CSMSettings");let n=(t,e)=>A.rt.toNumber(A.rt.prop(t,e));I=A.rt.toString(t),B=A.rt.toString(e),Q=s.map(A=>[n(A,"fontSize"),n(A,"insideCutoff"),n(A,"outsideCutoff")]),C=`${I}\0${B}`,0===(r=Q.filter(A=>A.every(Number.isFinite))).length?FE.delete(C):(r.sort((A,t)=>A[0]-t[0]),FE.set(C,r.flat()))}}),eV),...(QS(eT={},"flash.trace::Trace",class{static setLevel(A,t){}static getLevel(A){return 0}static setListener(A){}static getListener(){return null}}),eT),...(eP={},eO=(t,e)=>{if(null==t)throw A.rt.error("TypeError",2007,e);return t},ej=(t,e)=>A.rt.toNumber(A.rt.prop(t,e)),ez=(t,e)=>{if(!(t.$a.length>=e)){if(t.$fixed)throw A.rt.error("RangeError",1126,t.$a.length,e);for(;t.$a.length<e;)t.$a.push(0)}},e$=A=>["x","y","z"].map(t=>ej(A,t)),QS(eP,"flash.geom::Utils3D",class{static pointTowards(t,e,g,i=null,I=null){let B=eO(e,"fromMat").$matrix3D,Q=e$(eO(g,"target")),C=od(B[12],B[13],B[14]),r=oS(C,Q,null==i?[0,1,0]:e$(i),null==I?[0,0,1]:e$(I)),s=A.rt.construct(A.rt.classNamed("flash.geom::Matrix3D")),o=s.$matrix3D;if(!r)return o.set(B),s;let n=Math.max(0,Math.min(1,A.rt.toNumber(t)));o.set(oM(B,r,n));for(let A=0;A<3;A++)o[12+A]=B[12+A]+(C[12+A]-B[12+A])*n;return o[15]=1,s}static projectVector(t,e){let g=eO(t,"m").$matrix3D,i=eO(e,"v"),[I,B,Q,C]=op(g,ej(i,"x"),ej(i,"y"),ej(i,"z")),r=mH(1/C);return A.rt.construct(A.rt.classNamed("flash.geom::Vector3D"),I*r,B*r,Q*r,C)}static projectVectors(A,t,e,g){let i=eO(A,"m").$matrix3D,I=eO(t,"verts").$a,B=eO(e,"projectedVerts"),Q=eO(g,"uvts");ez(Q,I.length),ez(B,2*Math.floor(I.length/3));for(let A=0,t=0;A+2<I.length;A+=3,t+=2){let[e,g,,C]=op(i,Number(I[A]),Number(I[A+1]),Number(I[A+2]));B.$a[t]=e/C,B.$a[t+1]=g/C,Q.$a[A+2]=1/C}}}),eP),...(e_={},e0=t=>t&&t!==A.stage?A.stageWidth:500,e1=t=>t.$display?oL(fE(A,t.$display).fieldOfView,e0(t.$display)):oL(t.$fieldOfView*fn,500),e2=(t,e)=>{t.projection={...fE(A,t),...e},t.invalidate(1)},QS(e_,"flash.geom::PerspectiveProjection",class{"flash.geom:PerspectiveProjection::ctor"(){this.$display=null,this.$fieldOfView=55,this.$centerX=250,this.$centerY=250}get fieldOfView(){return this.$display?180*fE(A,this.$display).fieldOfView/Math.PI:this.$fieldOfView}set fieldOfView(t){let e=A.rt.toNumber(t);if(!(e>0&&e<180))throw A.rt.error("ArgumentError",2182);this.$display?e2(this.$display,{fieldOfView:e*Math.PI/180}):this.$fieldOfView=e}get focalLength(){return e1(this)}set focalLength(t){let e=A.rt.toNumber(t);if(!(e>0))throw A.rt.error("ArgumentError",2186,e);let g=2*Math.atan(e0(this.$display)/2/e);this.$display?e2(this.$display,{fieldOfView:g}):this.$fieldOfView=180*g/Math.PI}get projectionCenter(){let t=this.$display?fE(A,this.$display):null;return A.rt.construct(A.rt.classNamed("flash.geom::Point"),t?t.centerX:this.$centerX,t?t.centerY:this.$centerY)}set projectionCenter(t){if(null==t)throw A.rt.error("TypeError",2007,"projectionCenter");let e=A.rt.toNumber(A.rt.prop(t,"x")),g=A.rt.toNumber(A.rt.prop(t,"y"));this.$display?e2(this.$display,{centerX:e,centerY:g}):(this.$centerX=e,this.$centerY=g)}toMatrix3D(){let t=e1(this),e=A.rt.construct(A.rt.classNamed("flash.geom::Matrix3D"));return e.$matrix3D.set([t,0,0,0,0,t,0,0,0,0,1,1,0,0,0,0]),e}}),e_),...(QS(e3={},"flash.text::StyleSheet",class{get"flash.text:StyleSheet::_styles"(){return this.$styles??null}set"flash.text:StyleSheet::_styles"(A){this.$styles=A}"flash.text:StyleSheet::_update"(){let A=FC.get(this);for(let t of A??[]){let e=t.deref();if(!e||e.styleSheet!==this){A?.delete(t);continue}e.restyle?.()}}"flash.text:StyleSheet::_parseCSSInternal"(t){let e=w6(A.rt.toString(t));if(!e)return null;let g=[];for(let[t,i]of e){let e=[];for(let[A,t]of i)e.push(w7(A),t);g.push(t.toLowerCase(),A.rt.newObject(e))}return A.rt.newObject(g)}"flash.text:StyleSheet::_parseCSSFontFamily"(t){return dA(A.rt.toString(t))}"flash.text:StyleSheet::_parseColor"(t){var e=A.rt.toString(t);if(!e.startsWith("#"))return 0;let g=e.slice(1).trimEnd();return g.length<=6&&/^[0-9a-fA-F]+$/.test(g)?Number.parseInt(g,16):0}}),e3),...(e8={},e9=new WeakMap,e4={host:A.fileHost,signal:A.fileLifetime.signal,defer:t=>A.loads.deferHostEvent(t),track:t=>A.loads.trackRequest(t),fetch:(t,e)=>A.fetch?A.fetch({...t,purpose:"data"},e):Promise.reject(),error:t=>{throw A.rt.error("Error",t)},responseStatus:A.air},e5=t=>{let e=e9.get(t);return e||(e=new cr(e4,(e,g,i,I,B)=>{let Q;switch(e){case"httpStatus":Q=A.httpStatus(g??0);break;case"httpResponseStatus":Q=B?A.httpResponseStatus(B,I??""):null;break;case"progress":Q=A.rt.construct(A.rt.classNamed("flash.events::ProgressEvent"),e,!1,!1,g,i);break;case"ioError":t.$fileInto=null,Q=A.rt.construct(A.rt.classNamed("flash.events::IOErrorEvent"),e,!1,!1,I);break;case"uploadCompleteData":Q=A.rt.construct(A.rt.classNamed("flash.events::DataEvent"),e,!1,!1,I);break;case"complete":{let g=t.$fileInto,i=e9.get(t)?.data;if(g&&i){let e=i3(A.rt,g);e.length=0,e.position=0,e.write(i),e.position=0,t.$fileData=g}t.$fileInto=null,Q=A.event(e);break}case"select":t.$fileData=null,t.$fileInto=null,Q=A.event(e);break;default:Q=A.event(e)}Q&&cK(A,t,Q)}),e9.set(t,e)),e},e6=(t,e)=>A.rt.getProperty(t,A.rt.publicName(e)),e7=t=>(t?.$a??[]).map(t=>({description:A.rt.toString(e6(t,"description")),extension:A.rt.toString(e6(t,"extension"))})),gA=t=>{if(null==t)throw A.rt.error("TypeError",2007,"request");return t},gt=t=>(t=>{let e,g=(e=D$(t))?{name:new DV(A.fileSystem?.separator??"/").name(e.path),stat:A.fileSystem?.stat(e.path)??null}:null;if(!g)return null;let i=g.stat,I=()=>{throw A.rt.error("Error",3003)};return{name:g.name,get size(){return i?i.directory?0:i.size:I()},get modificationDate(){return i?i.modified:I()},get creationDate(){return i?i.created:I()},directory:i?.directory??!1}})(t)??e5(t).file??e4.error(2037),QS(e8,"flash.net::FileReference",class{get creationDate(){let t=gt(this);return A.rt.construct(A.rt.classNamed("Date"),t.creationDate??t.modificationDate)}get modificationDate(){return A.rt.construct(A.rt.classNamed("Date"),gt(this).modificationDate)}get name(){return gt(this).name}get size(){return gt(this).size}get type(){let{name:A,directory:t}=gt(this);if(t)return"";let e=A.lastIndexOf(".");return e<0?"":A.slice(e)}get creator(){return null}get data(){return this.$fileData??null}browse(A=null){return e5(this).browse(e7(A)),!0}cancel(){e5(this).cancel(),this.$fileInto=null}download(t,e=null){let g=A.loads.fetchRequest(gA(t),A.url,{requestHeaders:!1}),i=null==e?g.url.split(/[?#]/,1)[0].split("/").pop()||"download":A.rt.toString(e);e5(this).save(i,g)}upload(t,e="Filedata",g=!1){let i=A.loads.fetchRequest(gA(t),A.url,{requestHeaders:!1});if(null==e)throw A.rt.error("TypeError",2007,"uploadDataFieldName");let I=A.rt.toString(e),B=t.$data;if(""===I||B&&"object"==typeof B&&"flash.utils::ByteArray"===A.rt.traitsOf(B).name)throw A.rt.error("ArgumentError",2004);e5(this).upload(i,I,!!g&&A.platform.os.startsWith("Windows"))}uploadUnencoded(t){e5(this).upload(A.loads.fetchRequest(gA(t),A.url,{requestHeaders:"all"}),null)}"flash.net:FileReference::_load"(A){e5(this).load(),this.$fileInto=A,this.$fileData=null}"flash.net:FileReference::_save"(t,e){let g=i3(A.rt,t);e5(this).save(null==e?"Untitled":A.rt.toString(e),g.buffer.slice(0,g.length))}static"flash.net:FileReference::_ensureIsRootPlayer"(){}}),QS(e8,"flash.net::FileReferenceList",class{get fileList(){return this.$fileList??null}browse(t=null){return this.$fileList=A.rt.array([]),e5(this).browse(e7(t),!0,t=>{this.$fileList=A.rt.array(t.map(t=>{let e=A.rt.construct(A.rt.classNamed("flash.net::FileReference"));return e5(e).file=t,e}))}),!0}}),e8),...(QS(ge={},"flash.system::FSCommandHost",class{static _fscommand(t,e){A.fsCommand?.(A.rt.toString(t),A.rt.toString(e),A.code.securityUrls(1))}}),ge),...(gg={},gi=3,gI=(t,e)=>{cK(A,t,A.rt.construct(A.rt.classNamed("flash.events::NetStatusEvent"),"netStatus",!1,!1,A.rt.newObject(e)))},gB=(t,e)=>{if(!t.$connected)throw A.rt.error("ArgumentError",2126);return e},gQ=A=>{let t=A.$uri??null,e=A.$connected??!1;A.$connected=!1,A.$uri=null,A.$remote=null,e?gI(A,["code","NetConnection.Connect.Closed","level","status"]):null!==t&&(gI(A,["code","NetConnection.Connect.Closed","level","status"]),gI(A,["code","","description","","details","","level","status"]))},gC=(t,e)=>{let g=t.$remote;if(!g)return;let i=A.rt.toString(e[0]),I=e[1]??null,B=g.next++,Q=t.$objectEncoding??gi;g.queue.push({method:i,id:B,body:function(A,t,e){if(3===e){let e=new GK(A),g=new Uint8Array(5);for(let A of(g[0]=10,new DataView(g.buffer).setUint32(1,t.length),e.bytes.write(g),t))e.value(A);return e.finish()}let g=new GY(A,1/0,0,"Remoting");for(let A of(g.out.bytes(10),g.out.u32(t.length),t))g.value(A);return g.out.finish()}(A.rt,e.slice(2),Q)}),g.responders.set(B,I),g.scheduled||(g.scheduled=!0,A.afterExitFrame.push(()=>gs(t,g,Q)))},gr=(t,e)=>{let g=t.$remote;if(!g)return;let i=A.rt.toString(e[0]),I=t.$objectEncoding??gi,B=function(A,t,e){if(3===e){let e=new GK(A);return e.value(t),e.finish()}let g=new GY(A,1/0,0,"Remoting");return g.value(t),g.out.finish()}(A.rt,e[2]??null,I);g.headers=g.headers.filter(A=>A.name.toLowerCase()!==i.toLowerCase()),g.headers.push({name:i,mustUnderstand:A.rt.toBoolean(e[1]),value:B})},gs=(t,e,g)=>{e.scheduled=!1;let i=e.queue;e.queue=[];let I=A.fetch;if(t.$remote!==e||0===i.length||!I)return;let B=function(A,t,e){let g=[GV(3*(3===A)),GV(t.length)];for(let A of t)g.push(Gv(A.name),Uint8Array.of(+!!A.mustUnderstand),GX(A.value.length),A.value);for(let A of(g.push(GV(e.length)),e))g.push(Gv(A.method),Gv(`/${A.id}`),GX(A.body.length),A.body);return Gx(g)}(g,e.headers,i),Q=I({url:e.url,method:"POST",headers:[["Content-Type","application/x-amf"]],body:B,purpose:"data"},new AbortController().signal).then(A=>A,()=>({bytes:null,status:0,headers:[]}));A.loads.trackRequest(Q.then(g=>{A.loads.deferHostEvent(()=>{try{go(t,e,g.bytes,g.status)}finally{for(let A of i)e.responders.delete(A.id)}})}))},go=(t,e,g,i)=>{if(t.$remote!==e)return;if(null===g)return void gI(t,["code","NetConnection.Call.Failed","description",i>=300?`HTTP: Status ${i}`:"HTTP: Failed","details",e.url,"level","error"]);if(0===g.length)return;let I=function(A,t){let e=new DataView(t.buffer,t.byteOffset,t.byteLength);try{let g=e.getUint16(0);if(0!==g&&3!==g)return"version";let i=2,I=()=>{let A=e.getUint16(i);if((i+=2)+A>t.length)throw RangeError("past the end");let g=GZ.decode(t.subarray(i,i+A));return i+=A,g},B=()=>{let g=e.getUint32(i),I=i+=4,B=new GH(A,t,i,!0,"Remoting"),Q=B.value();return i=0xffffffff!==g&&I+g<=t.length?I+g:B.at,Q},Q=e.getUint16(i);i+=2;for(let A=0;A<Q;A++)I(),i+=1,B();let C=e.getUint16(i);i+=2;let r=[];for(let A=0;A<C;A++){let A=I();I(),r.push([A,B()])}return r}catch{return"version"}}(A.rt,g);if("version"===I)return void gI(t,["code","NetConnection.Call.BadVersion","description","","details","","level","error"]);for(let[t,g]of I){let i=/^\/(\d+)\/(onResult|onStatus)$/.exec(t);if(!i)continue;let I=Number(i[1]),B=e.responders.get(I);e.responders.delete(I);let Q=B?B["onResult"===i[2]?"$result":"$status"]:null;if("function"==typeof Q||Q&&"object"==typeof Q)try{A.rt.call(Q,null,g)}catch(t){A.reportUncaught(t,Q)}}},QS(gg,"flash.net::NetConnection",class{get connected(){return this.$connected??!1}get uri(){return this.$uri??null}connect(t){if((this.$connected||this.$remote)&&(this.$connected=!1,this.$remote=null,gI(this,["code","NetConnection.Connect.Closed","level","status"])),null==t||"null"===A.rt.toString(t)){this.$uri="null",this.$connected=!0,gI(this,["code","NetConnection.Connect.Success","level","status"]);return}this.$uri=A.rt.toString(t),/^https?:\/\//i.test(this.$uri)&&(this.$remote={url:this.$uri,headers:[],queue:[],next:1,responders:new Map,scheduled:!1})}"flash.net:NetConnection::invoke"(t){if(1===A.rt.toUint(t))return void gQ(this);throw A.rt.unsupported(`NetConnection invoke ${A.rt.toUint(t)}`)}"flash.net:NetConnection::invokeWithArgsArray"(t,e){let g=A.rt.toUint(t),i=e?.$a??[];if(3===g)return void gr(this,i);if(2===g)return void gC(this,i);throw A.rt.unsupported(`NetConnection invoke ${g}`)}get client(){return this.$client??this}set client(t){if(null==t)throw A.rt.error("TypeError",2004);this.$client=t}get objectEncoding(){return this.$objectEncoding??gi}set objectEncoding(t){this.$objectEncoding=A.rt.toUint(t)}get proxyType(){return this.$proxyType??"none"}set proxyType(t){this.$proxyType=A.rt.toString(t)}get maxPeerConnections(){return this.$maxPeers??8}set maxPeerConnections(t){this.$maxPeers=A.rt.toUint(t)}get httpIdleTimeout(){return this.$idleTimeout??0}"flash.net:NetConnection::_SetHTTPIdleTimeout"(t){this.$idleTimeout=A.rt.toNumber(t)}get connectedProxyType(){return gB(this,"none")}get usingTLS(){return gB(this,!1)}get protocol(){return gB(this,"rtmp")}get nearID(){return gB(this,"")}get farID(){return gB(this,"")}get nearNonce(){return gB(this,GW)}get farNonce(){return gB(this,GW)}get unconnectedPeerStreams(){return gB(this,A.rt.array([]))}static get defaultObjectEncoding(){return gi}static set defaultObjectEncoding(t){gi=A.rt.toUint(t)}}),QS(gg,"flash.net::Responder",class{"flash.net:Responder::ctor"(A,t){this.$result=A,this.$status=t}}),gg),...(gn={},gE=t=>{A.loads.deferHostEvent(()=>cK(A,t,A.rt.construct(A.rt.classNamed("flash.events::ErrorEvent"),"error",!1,!1,"Error #3702: Context3D not available.",3702)))},ga=t=>{let e=A.rt.toNumber(t);if(!(e>=-8192&&e<=8191))throw A.rt.error("ArgumentError",2006);return e},QS(gn,"flash.display::Stage3D",class{get context3D(){return null}requestContext3D(A="auto",t="baseline"){gE(this)}requestContext3DMatchingProfiles(t){if(null==t)throw A.rt.error("TypeError",2007,"profiles");gE(this)}get x(){return this.$x??0}set x(A){this.$x=ga(A)}get y(){return this.$y??0}set y(A){this.$y=ga(A)}get visible(){return this.$visible??!0}set visible(A){this.$visible=!!A}}),gn),...(QS(gl={},"flash.xml::XMLParser",class{startParse(t,e){let g=new Io(A.rt.toString(t));g.parse(!!e),this.$parser=g}getNext(t){if(null==t)throw A.rt.error("TypeError",2007,"tag");let e=this.$parser;if(!e)return -1;let g=new Ir,i=e.getNext(g);return t.$type=g.type,t.$value=g.text,t.$empty=g.empty,t.$attrs=1===g.type?A.rt.newObject(g.attributes):null,i}}),QS(gl,"flash.xml::XMLTag",class{get type(){return this.$type??0}set type(t){this.$type=A.rt.toUint(t)}get empty(){return this.$empty??!1}set empty(A){this.$empty=!!A}get value(){return this.$value??null}set value(t){this.$value=null==t?null:A.rt.toString(t)}get attrs(){return this.$attrs??null}set attrs(A){this.$attrs=A}}),QS(gl,"flash.xml::XMLNode",class{static"flash.xml:XMLNode::escapeXML"(t){return A.rt.toString(t).replace(/[&<>"']/g,A=>FG[A])}}),gl),...(QS(gh={},"flash.media::Video",class{"flash.media:Video::ctor"(t,e){let g=A.rt.toInt(t),i=A.rt.toInt(e);if(g<0||i<0)throw A.rt.error("RangeError",2006);g>0&&i>0&&(this.$display.boxWidth=g,this.$display.boxHeight=i)}get videoWidth(){return 0}get videoHeight(){return 0}get deblocking(){return this.$deblocking??0}set deblocking(t){this.$deblocking=A.rt.toInt(t)}get smoothing(){return this.$smoothing??!1}set smoothing(A){this.$smoothing=!!A}attachNetStream(A){}attachCamera(A){}clear(){}}),gh),...function(A){let t={};function e(t,e){if(null==t)throw A.rt.error("TypeError",2007,e)}return QS(t,"flash.media::Camera",class{static get isSupported(){return!0}static get names(){return A.rt.array([])}static getCamera(A){return null}get activityLevel(){return 0}get bandwidth(){return 0}get currentFPS(){return 0}get fps(){return 0}get height(){return 0}get index(){return 0}get keyFrameInterval(){return 0}get loopback(){return!1}get motionLevel(){return 0}get motionTimeout(){return 0}get muted(){return!1}get name(){return null}get position(){return null}get quality(){return 0}get width(){return 0}setCursor(A){}setKeyFrameInterval(A){}setLoopback(A){}setMode(A,t,e,g){}setMotionLevel(A,t){}setQuality(A,t){}drawToBitmapData(A){e(A,"destination")}copyToByteArray(A,t){e(A,"rect"),e(t,"destination")}copyToVector(A,t){e(A,"rect"),e(t,"destination")}}),t}(A),...function(A){let t,e={};function g(t,e){if(null==t)throw A.rt.error("TypeError",2007,e)}return QS(e,"flash.media::Microphone",class{static get isSupported(){return!0}static get names(){return A.rt.array([])}static getMicrophone(A){return null}static getEnhancedMicrophone(A){return t??=new Map([["mode","fullDuplex"],["echoPath",128],["nonLinearProcessing",!0]]),null}get activityLevel(){return 0}get codec(){return null}set codec(A){g(A,"codecString")}get enableVAD(){return!1}set enableVAD(A){}get encodeQuality(){return 0}set encodeQuality(A){}get enhancedOptions(){if(!t)return null;let e=A.rt.construct(A.rt.classNamed("flash.media::MicrophoneEnhancedOptions"));for(let[g,i]of t)A.rt.setProp(e,g,i);return e}set enhancedOptions(e){if(t&&null!=e)for(let g of t.keys())t.set(g,A.rt.prop(e,g))}get framesPerPacket(){return 0}set framesPerPacket(A){}get gain(){return 0}set gain(A){}get index(){return 0}get muted(){return!1}get name(){return null}get noiseSuppressionLevel(){return 0}set noiseSuppressionLevel(A){}get rate(){return 0}set rate(A){}get silenceLevel(){return 0}get silenceTimeout(){return 0}get soundTransform(){return A.rt.construct(A.rt.classNamed("flash.media::SoundTransform"))}set soundTransform(A){g(A,"sndTransform")}get useEchoSuppression(){return!1}setLoopBack(A){}setSilenceLevel(A,t){}setUseEchoSuppression(A){}}),QS(e,"flash.media::MicrophoneEnhancedOptions",class{get autoGain(){return!1}set autoGain(A){}}),e}(A),...(QS(gc={},"flash.ui::Keyboard",class{static get capsLock(){return!1}static get numLock(){return!1}static get hasVirtualKeyboard(){return!1}static get physicalKeyboardType(){return"alphanumeric"}static isAccessible(){return!0}}),gc),...(QS(gw={},"flash.ui::GameInput",class{static get isSupported(){return!1}static get numDevices(){return 0}static getDeviceAt(t){throw A.rt.error("RangeError",1506)}}),gw),...(QS(gd={},"flash.ui::ContextMenu",class{get link(){return this.$link??null}set link(t){this.$link=mn(A,t,"flash.net::URLRequest")}}),gd),...(QS(gu={},"flash.sensors::Accelerometer",class{static get isSupported(){return!1}get muted(){return!0}setRequestedUpdateInterval(t){if(0>A.rt.toNumber(t))throw A.rt.error("ArgumentError",1508,"interval")}}),gu),...(QS(gD={},"flash.printing::PrintJob",class{static get isSupported(){return!1}}),gD)}}(this)}},{...{...ru,...rr,...rs,...r_,...Q7,...rb,"flash.utils::ByteArray":CA,Date:C3,...r7,...sY,...rG,...r4,...rj},...{...(e=this,{"flash.display::DisplayObject":{create:A=>{let t=Object.create(A.proto),g=null===e.pending,i=e.pending??e.symbols.displayFor(A);return e.pending=null,""===i.name&&i!==e.stage&&(i.name=`instance${++e.instances}`),t.$display=i,i.object=t,oq.changes++,i instanceof EN&&!i.avm1Root&&(i.library.version??10)<10&&(i.listedAlways=!0,oj(i)),i instanceof EN&&function(A){for(let t=A;t&&"flash.display::MovieClip"!==t.name;t=t.base)if("flash.display::Sprite"===t.name)return!0;return!1}(A)&&(i.playing=!1),g&&(e.lifecycle.made(i),i instanceof EN&&i.placeFirstFrame()),t}}}),...(g=this,{"flash.display::BitmapData":{create:A=>{let t=Object.create(A.proto);return t.$store=null,t.$symbol=g.symbols.bitmapSymbol(A),t}}}),...(i=this,{"flash.utils::ByteArray":{...CA,create:(A,t)=>{let e=CA.create(A,t),g=i.symbols.binarySymbol(A);if(g){let A=i3(t,e);A.buffer=g,A.view=new DataView(g.buffer),A.length=g.length}return e}}}),...mJ,...fo,...mc,...(I=this,{"flash.system::Worker":{created(A,t){BC(t,"_current",I.workers.objectOf(I.workers.id,t))}}}),"flash.desktop::Clipboard":{construct(A,t,e){if(!DS)throw A.error("flash.errors::IllegalOperationError",2178);let g=t.$it.instance();return t.$it.proto.$init.apply(g,e),g}},...(B=this,{"flash.media::Sound":{create:A=>{let t=Object.create(A.proto),e=B.symbols.soundSymbol(A),g=e?.definition;return t.$sound={character:e,bytes:null,url:null,loaded:0,total:0,length:g?g.sampleCount/(g.sampleRate/1e3):0,used:!!g,generation:0,abort:null,clip:null,frames:null,compressed:!1,pcm:null,extracted:0},t}}}),...(Q=this,{"flash.text::Font":{create:A=>{let t=Object.create(A.proto);return t.$font=Q.symbols.fontSymbol(A),t}}}),...(C=this,{"flash.net::URLRequest":{create:A=>{let t=Object.create(A.proto),e=G2(C);return t.$followRedirects=e.followRedirects,t.$manageCookies=e.manageCookies,t.$authenticate=e.authenticate,t.$useCache=e.useCache,t.$cacheResponse=e.cacheResponse,t.$idleTimeout=e.idleTimeout,t.$userAgent=e.userAgent,t}}})}},{onUnsupported:A=>console.warn(`${A} (caught by the SWF)`),...t,apiVersion:this.air?51:50}),this.mainDomain=this.rt.childDomain(this.rt.root),this.codegen.reset(this.rt.apiVersion)}loadLibraries(A){return this.workers.libraries.push(...A),this.code.loadLibraries(A)}settled(){return this.loads.settled()}heldTime(){return this.loads.heldTime()}holdsFrame(){return this.loads.holdsFrame()}destroy(){if(this.onStageLayout=null,this.contentsScaleListeners.clear(),this.fileLifetime.abort(),!this.destroyed){for(let A of(this.destroyed=!0,this.loads.destroyAvm1(),this.workers.stopAll(),this.code.recorder?.drop(),this.localConnections.destroy(this),this.flushSharedObjects?.(),c$(this),this.audio?.close?.(),[...this.connections]))A.close();this.stopped.abort(),ip()}}track(A,t){let e=!0,g={close:()=>{}},i=()=>{e=!1,this.connections.delete(g)},I=t({...A,close:(...t)=>{i(),A.close(...t)},error:(...t)=>{i(),A.error(...t)}});return g.close=()=>{i(),I.close()},e&&this.connections.add(g),{send:A=>I.send(A),close:A=>{i(),I.close(A)}}}bind(A,t){this.symbols.bind(A,t),t.construct=(A,e)=>this.construct(A,e,t),t.uncaught=A=>this.reportUncaught(A,t),t.constructLater=(A,e)=>{let g=t.classes.get(e.id);g&&this.rt.classNamed(g,t.domain??null),this.toConstruct.push({display:A,character:e,library:t})},t.constructPlaced=A=>{let e={placed:A,library:t};this.placing.push(e);try{this.constructGoto(e)}finally{this.placing.splice(this.placing.indexOf(e),1)}},t.removing=(A,t)=>this.lifecycle.removing(A,t),t.placedSymbol=A=>this.symbols.placedSymbol(A,t.domain??this.mainDomain),t.sounds=this.timelineSounds}construct(A,t,e){var g;let i=A.metaData;A.metaData=null;let I=null===i?null:this.readMetaData(i);A instanceof EN&&(A.timelineChild=!0,A.placeFirstFrame());let B=e.classes.get(t.id)??F2[t.type],Q=e.domain??null,C=t=>{let e=A.parent?.object;e&&A.timelineNamed&&this.rt.setProperty(e,iV(iY,A.name),t)};if(A instanceof Eq&&"button"===t.type&&(""===A.name&&(A.name=`instance${++this.instances}`),this.makeButtonStates(A,t,e),(e.version??10)>9&&((g=A.upState)instanceof EN||g instanceof ng&&g.children.some(A=>A instanceof EN)))){let t,e=this.rt.classNamed(B,Q);this.pending=A;try{t=this.rt.allocate(e)}finally{this.pending=null}let g=null;if(t)try{C(t)}catch(A){g={error:A}}for(let t of(A.firstScripts=!0,this.constructPending(),[...this.placing]))this.constructGoto(t);if(this.broadcast("frameConstructed"),this.runFrameScripts(this.stage??A,A),this.broadcast("exitFrame"),t){if(this.rt.constructSuper(e,t),null!==i&&(t.$metaData=I),g)throw g.error;this.lifecycle.added(A);return}}let r="bitmap"===t.type&&A instanceof ne?this.constructBitmap(A,B,Q):this.constructAs(A,this.rt.classNamed(B,Q));null!==i&&(r.$metaData=I),C(r),this.lifecycle.added(A)}readMetaData(A){let t=new i1(this.rt,{});return t.write(A),t.position=0,new I1(this.rt,t).value()}constructBitmap(A,t,e){let g=this.rt.classNamed(t,e);if(!function(A,t){for(let e=A.$it;e;e=e.base)if(e.name===t)return!0;return!1}(g,"flash.display::BitmapData"))return this.constructAs(A,g);if(!A.hasImage)throw this.rt.construct(g),this.rt.error("TypeError",2022,`${t.replace(/^.*::/,"")}$`);let i=this.rt.construct(g,1,1);return this.constructAs(A,this.rt.classNamed("flash.display::Bitmap"),i)}constructAs(A,t,...e){this.pending=A;try{return this.rt.construct(t,...e)}finally{this.pending=null}}makeButtonStates(A,t,e){let g=this.rt.classNamed("flash.display::Sprite");ET(A,t,e,(A,t)=>this.construct(A,t,e),A=>this.constructAs(A,g))}event(A,t=!1){return this.rt.construct(this.rt.classNamed("flash.events::Event"),A,t,!1)}httpStatus(A,t=!1){return this.statusEvent("httpStatus",A,t)}httpResponseStatus(A,t){let e=A.url??t;if(!this.air||A.local||0===A.status||!/^https?:/i.test(e))return null;let g=this.rt,i=this.statusEvent("httpResponseStatus",A.status,void 0!==A.url),I=g.classNamed("flash.net::URLRequestHeader");return g.setProp(i,"responseURL",e),g.setProp(i,"responseHeaders",g.array(A.headers.map(([A,t])=>g.construct(I,A,t)))),i}statusEvent(A,t,e){let g=this.statusClass;return g||(g=this.rt.classNamed("flash.events::HTTPStatusEvent"),this.statusClass=g),this.rt.construct(g,A,!1,!1,t,e)}broadcastTargets(A){let t=this.broadcasts.get(A);return t||(t=new Set,this.broadcasts.set(A,t),this.broadcastSets.push(t)),t}setStageDefaults(A,t){this.stageScaleModeSet||(this.stageScaleMode=A),this.stageAlignSet||(this.stageAlign=mp(t))}setContentsScaleFactor(A){let t=Number.isFinite(A)&&A>0&&this.screenResolution()?A:1;if(t!==this.contentsScaleFactor)for(let A of(this.contentsScaleFactor=t,this.contentsScaleListeners))A()}screenResolution(){if(!this.air)return!0;let A=/<initialWindow>([\s\S]*?)<\/initialWindow>/.exec(this.application?.descriptor??"");return/<requestedDisplayResolution>\s*high\s*</.test(A?.[1]??"")}resizeStage(A,t){if(A===this.stageWidth&&t===this.stageHeight)return;this.stageWidth=A,this.stageHeight=t;let e=this.stage?.object;"noScale"===this.stageScaleMode&&e&&cH(e,"resize")&&cL(this,e,this.event("resize"))}activationTargets(A){let t=this.activation.get(A);return t||(t=new cx,this.activation.set(A,t)),t}broadcastActivation(A){for(let t of this.activation.get(A)?.live()??[])cL(this,t,this.event(A))}broadcast(A){let t=this.broadcasts.get(A);if(t)for(let e of[...t])("render"!==A||this.lifecycle.onStage(e.$display))&&cL(this,e,this.event(A))}reportUncaught=(A,t=null)=>{this.uncaughtErrors.report(A,t)};tellHost=A=>{if(!this.onUncaught)return void this.uncaught.push(A);try{this.onUncaught(A)}catch(A){this.uncaught.push(A)}};runFrameScripts(A,t=null){let e=()=>this.overflowed&&this.cycles>0,g=this.scriptDepth++,i=this.scriptQueues[g]??[];this.scriptQueues[g]=i;try{for(let g=0;g<64&&!e();g++){let g=oq.changes;if(!this.frameScriptRound(i,A,t,e))break;if(oq.changes===g){F3.checkRounds&&this.checkRoundLeftOut(i,A,t,e);break}}}finally{this.scriptDepth--}}checkRoundLeftOut(A,t,e,g){let i=oq.changes,I=this.framesMarked;if(this.frameScriptRound(A,t,e,g)||this.framesMarked!==I||oq.changes!==i)throw Error("a round of frame scripts left out had work to do")}frameScriptRound(A,t,e,g){let i=!1,I=A=>{if(!A.makingChildren||A.frameScripts.has(A.currentFrame)||!A.timelineChild&&this.scriptPhase)for(let t=0;t<64&&A.scriptedFrame!==A.currentFrame&&!g();t++){A.scriptedFrame=A.currentFrame,this.framesMarked++;let t=A.frameScripts.get(A.currentFrame);if(!t)return;i=!0;let e=this.inFrameScript;this.inFrameScript=A;try{this.rt.call(t,A.object)}catch(A){this.reportUncaught(A,t)}finally{this.inFrameScript=e}if(null!==A.queuedGoto){let t=A.queuedGoto;A.queuedGoto=null,A.playing=A.queuedPlay,A.gotoFrame(t);try{this.gotoCycle(A)}catch(A){this.reportUncaught(A)}}}};if(!this.pruning()){let g=this.queueAll(A,t,e,null);for(let t=0;t<g;t++){let e=A[t];A[t]=null,I(e)}return i}if(F3.checkRounds)return this.checkedRound(A,t,e,I),i;let B=this.queueDue(A,t,e,null);for(let t=0;t<B;t++){let e=A[t];A[t]=null,I(e)}return i}pruning(){return!this.overflowed&&null!==this.stage}queueAll(A,t,e,g){let i=0,I=t=>{if(t instanceof ng&&2!==t.kind){let e=Ej(t).items;for(let t=0;t<e.length;t++){let g=e[t];2===g.kind?I(g):g.object&&(A[i++]=g)}return}1===t.kind&&t.object&&(A[i++]=t);let e=Ez(t,g);for(let A=0;A<e.length;A++){let t=e[A];(0!==t.kind||0!==t.frameChildren.length)&&I(t)}};for(let A of(this.lifecycle.eachOrphanRoot(I),I(t),this.lifecycle.fresh))I(A);return this.alsoAt=i,e&&I(e),i}queueDue(A,t,e,g){let i=this.openClip,I=this.openEnd,B=this.openDue,Q=0,C=0,r=(t,e)=>t.scriptedFrame!==t.currentFrame?(t.object&&(A[C++]=t),!0):((e||t.listedAlways)&&t.object&&(A[C++]=t),t.listedAlways),s=(A,t)=>{if(!A.scriptsDue&&!t)return!1;let e=!1;if(2===A.kind){let i=Ez(A,g);for(let A=0;A<i.length;A++){let g=i[A];(0!==g.kind||0!==g.frameChildren.length)&&s(g,t)&&(e=!0)}e||=A.statesDue}else A instanceof ng&&(e=o(A,t));return F9(A,e),e},o=(A,t)=>{if(t){let{items:e,ends:g}=Ej(A),C=Q,o=!1;for(let A=0;A<e.length;A++){for(;Q>C&&I[Q-1]<=A;)n(C);let E=e[A];if(2===E.kind){s(E,t)&&(o=!0,Q>C&&(B[Q-1]=!0));continue}let a=r(E,t);o||=a,i[Q]=E,I[Q]=g[A],B[Q++]=a}for(;Q>C;)n(C);return o}if(A.avm1Root)return!1;let e=1===A.kind&&r(A,!1),g=A.children;for(let A=0;A<g.length;A++){let t=g[A];if(t.scriptsDue){if(2===t.kind)e=s(t,!1)||e;else if(0!==t.kind||0!==t.frameChildren.length){let A=o(t,!1);F9(t,A),e||=A}}}return e},n=A=>{let t=B[--Q];F9(i[Q],t),i[Q]=null,t&&Q>A&&(B[Q-1]=!0)};for(let A of(this.lifecycle.eachOrphanRoot(A=>{s(A,!1)||null===A.orphanEntry||(A.orphanEntry.due=!1)},!0),s(t,!1),this.lifecycle.fresh))s(A,!1);return this.alsoAt=C,e&&s(e,!0),C}checkedRound(A,t,e,g){let i=new Set,I=this.queueDue(A,t,e,i),B=new Set,Q=[],C=this.queueAll(Q,t,e,B),r=this.alsoAt;for(let A of B){if(!i.has(A))throw Error("a round of frame scripts left out a button's first scripts");A.firstScripts=!1}let s=[],o=0;for(let t=0;t<C;t++){let e=Q[t];if(s[t]=t>=r||e.listedAlways||e.scriptedFrame!==e.currentFrame,s[t]&&A[o++]!==e)throw Error(`a round of frame scripts walked out of order at ${o-1}`)}if(o!==I)throw Error(`a round of frame scripts walked ${I} clips due, not ${o}`);A.fill(null,0,I);for(let A=0;A<C;A++){let t=Q[A],e=this.framesMarked;if(g(t),!s[A]&&this.framesMarked!==e)throw Error("a clip a round of frame scripts left out had a script due")}}gotoCycle(A){if(!((A.library.version??10)<10)&&this.stage&&!this.overflowed){if(this.cycles>=F8)throw this.overflowed=!0,this.rt.error("Error",1023);this.cycles++;try{this.constructPending(),this.broadcast("frameConstructed"),this.runFrameScripts(this.stage),this.broadcast("exitFrame")}finally{this.cycles--}}}constructPending(){for(let A=this.toConstruct.shift();A;A=this.toConstruct.shift())if(!A.display.object&&A.display.parent)try{this.construct(A.display,A.character,A.library)}catch(t){this.reportUncaught(t,A.library)}}constructGoto(A){for(let t=A.placed.shift();t;t=A.placed.shift())if(!t.display.object&&t.display.parent)try{this.construct(t.display,t.character,A.library)}catch(t){this.reportUncaught(t,A.library)}}frame(A,t=!0,e=!0){let g=[];try{this.playFrame(A,t,e)}catch(A){g.push(A)}this.throwUncaught(g)}renderFrame(A=[]){try{this.render()}catch(t){A.push(t)}this.throwUncaught(A)}throwUncaught(A){if(A.push(...this.uncaught.splice(0)),1===A.length)throw A[0];if(A.length>1)throw AggregateError(A,`${A.length} errors that nothing caught`)}playFrame(A,t,e){this.overflowed=!1,function(A){wi(cO(A));let t=cv.get(A);if(t)for(let e of[...t]){let g=e.$channel;if(!g.stopped){if(g.dynamic){if(g.dynamic.pump(),g.stopped||!t.has(e)||!g.dynamic.complete())continue}else{let t=(g.sound.length-g.start)*Math.max(1,g.loops);if(g.sound.length<=0||A.timers.now-g.started<t)continue}cz(A,g),t.delete(e),cK(A,e,A.event("soundComplete"))}}}(this),t&&(this.frames++,this.broadcast("enterFrame"),this.timers.frameTimers(),this.loads.tickAvm1()),this.constructPending();let g=[...this.loads.frameEnds.splice(0),...this.loads.completeLoads()];this.broadcast("frameConstructed");let i=this.scriptPhase;this.scriptPhase=!0,oq.changes++;try{this.runFrameScripts(A)}finally{this.scriptPhase=i,oq.changes++}for(let A of(this.lifecycle.afterScripts(),this.broadcast("exitFrame"),[...g,...this.afterExitFrame.splice(0)]))try{A()}catch(A){this.reportUncaught(A)}this.loads.deliverAvm1Loads(),this.pointer?.frameEnded(),e&&this.render()}renderPending(){this.destroyed||this.renderedUpdates===this.updates||this.render()}render(){for(let A of(this.renderedUpdates=this.updates,this.invalidated&&(this.invalidated=!1,this.broadcast("render")),this.scrolled))A.scroll=A.scrollRect,A.invalidate(1);this.scrolled.clear()}}let F8=256;function F9(A,t){A.scriptsDue!==t&&(A.scriptsDue=t,null!==A.orphanEntry&&(A.orphanEntry.due=t))}let F4=globalThis;d={post:A=>F4.postMessage(A),listen:A=>{F4.onmessage=t=>{t.data?.type==="ping"?F4.postMessage({type:"ready"}):A(t.data)}}},s=null,o=[],n=0,E=0,a=null,l=!1,h=()=>{if(l||!s||!Ca(s.rt).terminated)return l;l=!0;try{a?.destroy(),s.destroy()}catch(A){A instanceof CC||d.post({type:"uncaught",text:w(A)})}finally{Ca(s.rt).end(c)}return!0},c=0,w=A=>{if(A instanceof Error)return`${A.name}: ${A.message}`;try{return s?s.rt.toString(A):String(A)}catch{return"an error that could not be described"}},d.listen(A=>{"codegen"in A?(async({codegen:A,init:t})=>{c=t.id;let e=new Map,g=new F3(await async function(A){let t=await async function(A,t={}){let e={env:Object.setPrototypeOf({abort(A,t,e,g){throw A=B(A>>>0),t=B(t>>>0),e>>>=0,g>>>=0,Error(`${A} in ${t}:${e}:${g}`)}},Object.assign(Object.create(globalThis),t.env||{}))},{exports:g}=await WebAssembly.instantiate(A,e),i=g.memory||t.env.memory,I=Object.setPrototypeOf({compilerVersion:()=>B(g.compilerVersion()>>>0),abcVersion:A=>(A=C(Uint8Array,27,0,A)||n(),g.abcVersion(A)),actionsEmitEach(A,t,e,i,I,r){A=s(C(Uint8Array,27,0,A)||n()),t=s(C(Int32Array,31,2,t)||n()),e=s(C(Int32Array,31,2,e)||n()),I=Q(I)||n(),r=+!!r;try{return B(g.actionsEmitEach(A,t,e,i,I,r)>>>0)}finally{o(A),o(t),o(e)}},actionsEmitEachBytes(A,t,e,i,I,B){A=s(C(Uint8Array,27,0,A)||n()),t=s(C(Int32Array,31,2,t)||n()),e=s(C(Int32Array,31,2,e)||n()),I=Q(I)||n(),B=+!!B;try{return g.actionsEmitEachBytes(A,t,e,i,I,B)>>>0}finally{o(A),o(t),o(e)}},actionsHeldEmitEachBytes:(A,t,e)=>(e=Q(e)||n(),g.actionsHeldEmitEachBytes(A,t,e)>>>0),actionsHeldUnitBytes:(A,t,e,i,I,B)=>(B=+!!B,g.actionsHeldUnitBytes(A,t,e,i,I,B)>>>0),actionsHold(A,t,e,i){t=s(C(Uint8Array,27,0,t)||n()),e=s(C(Int32Array,31,2,e)||n()),i=C(Int32Array,31,2,i)||n();try{g.actionsHold(A,t,e,i)}finally{o(t),o(e)}},actionsModuleBytes(A,t,e,i,I){A=s(C(Uint8Array,27,0,A)||n()),t=s(C(Int32Array,31,2,t)||n()),e=C(Int32Array,31,2,e)||n(),I=+!!I;try{return g.__setArgumentsLength(arguments.length),g.actionsModuleBytes(A,t,e,i,I)>>>0}finally{o(A),o(t)}},actionsModuleEntries:()=>B(g.actionsModuleEntries()>>>0),actionsModuleUnits:()=>B(g.actionsModuleUnits()>>>0),actionsUnitBytes(A,t,e,i,I,B,Q,r){A=s(C(Uint8Array,27,0,A)||n()),t=s(C(Int32Array,31,2,t)||n()),e=C(Int32Array,31,2,e)||n(),r=+!!r;try{return g.actionsUnitBytes(A,t,e,i,I,B,Q,r)>>>0}finally{o(A),o(t)}},actionsUnitLimits:()=>{var A,t;return A=Float64Array,(t=g.actionsUnitLimits()>>>0)?new A(i.buffer,function(A){try{return E.getUint32(A,!0)}catch{return(E=new DataView(i.buffer)).getUint32(A,!0)}}(t+4),E.getUint32(t+8,!0)/A.BYTES_PER_ELEMENT).slice():null},domainAdd(A,t,e){return A=C(Uint8Array,27,0,A)||n(),t=+!!t,g.__setArgumentsLength(arguments.length),g.domainAdd(A,t,e)},domainCompact:()=>0!=g.domainCompact(),domainContext(A,t,e){return g.__setArgumentsLength(arguments.length),B(g.domainContext(A,t,e)>>>0)},domainEmitEach(A,t,e){return A=Q(A)||n(),t=+!!t,g.__setArgumentsLength(arguments.length),B(g.domainEmitEach(A,t,e)>>>0)},domainEmitEachBytes(A,t,e){return A=Q(A)||n(),t=+!!t,g.__setArgumentsLength(arguments.length),g.domainEmitEachBytes(A,t,e)>>>0},domainFound(A,t,e,i,I,B){e=s(Q(e)||n()),i=Q(i)||n(),B=+!!B;try{g.domainFound(A,t,e,i,I,B)}finally{o(e)}},domainLazyModuleBytes(A,t){return A=Q(A)||n(),g.__setArgumentsLength(arguments.length),g.domainLazyModuleBytes(A,t)>>>0},domainLinked(A){return g.__setArgumentsLength(arguments.length),B(g.domainLinked(A)>>>0)},domainLogSince(A,t){return g.__setArgumentsLength(arguments.length),B(g.domainLogSince(A,t)>>>0)},domainModule(A,t,e,i){return A=Q(A)||n(),e=+!!e,i=+!!i,g.__setArgumentsLength(arguments.length),B(g.domainModule(A,t,e,i)>>>0)},domainModuleBytes(A,t,e,i){return A=Q(A)||n(),e=+!!e,i=+!!i,g.__setArgumentsLength(arguments.length),g.domainModuleBytes(A,t,e,i)>>>0},domainModuleEntries:()=>B(g.domainModuleEntries()>>>0),domainReplay(A,t){return A=Q(A)||n(),g.__setArgumentsLength(arguments.length),0!=g.domainReplay(A,t)},domainRestore:(A,t)=>(t=C(Uint8Array,27,0,t)||n(),g.domainRestore(A,t)),domainRevision:()=>B(g.domainRevision()>>>0),domainSourceMap:()=>B(g.domainSourceMap()>>>0),domainUsage:()=>B(g.domainUsage()>>>0),domainWantsCompact:()=>0!=g.domainWantsCompact(),outputLength:()=>g.outputLength()>>>0},g);function B(A){if(!A)return null;let t=A+new Uint32Array(i.buffer)[A-4>>>2]>>>1,e=new Uint16Array(i.buffer),g=A>>>1,I="";for(;t-g>1024;)I+=String.fromCharCode(...e.subarray(g,g+=1024));return I+String.fromCharCode(...e.subarray(g,t))}function Q(A){if(null==A)return 0;let t=A.length,e=g.__new(t<<1,2)>>>0,I=new Uint16Array(i.buffer);for(let g=0;g<t;++g)I[(e>>>1)+g]=A.charCodeAt(g);return e}function C(A,t,e,I){if(null==I)return 0;let B=I.length,Q=g.__pin(g.__new(B<<e,1))>>>0,C=g.__new(12,t)>>>0;return function(A,t){try{E.setUint32(A,t,!0)}catch{(E=new DataView(i.buffer)).setUint32(A,t,!0)}}(C+0,Q),E.setUint32(C+4,Q,!0),E.setUint32(C+8,B<<e,!0),new A(i.buffer,Q,B).set(I),g.__unpin(Q),C}let r=new Map;function s(A){if(A){let t=r.get(A);t?r.set(A,t+1):r.set(g.__pin(A),1)}return A}function o(A){if(A){let t=r.get(A);if(1===t)g.__unpin(A),r.delete(A);else if(t)r.set(A,t-1);else throw Error(`invalid refcount '${t}' for reference '${A}'`)}}function n(){throw TypeError("value must not be null")}let E=new DataView(i.buffer);return I}(A,{env:{}}),e=t.compilerVersion();if(e!==AY)throw Error(`codegen.wasm is version ${e} but the wrapper expects ${AY}`);if(!WebAssembly.Module.exports(A).some(A=>"outputLength"===A.name))throw Error("codegen.wasm has no outputLength export, which the wrapper expects: it is older than the wrapper");let g=t.memory.buffer.byteLength,i=0,I=0,B=0,Q=A=>{if(0===B)throw Error(`${A}: no ABC has been added to the domain`)},C=A=>{if(A>=0&&(!Number.isInteger(A)||A>=B))throw Error(`ABC ${A}: only ${B} have been added to the domain`);return A<0?-1:A},r=(A,e,g,i=!1)=>{let I=C(e),Q=I<0?B-1:I,r=G(t.domainLinked(I)),s=[A[Q]??""];for(let t of r?r.split(","):[])s.push(A[Number(t)]??"");let o=G(d(i?t.domainLazyModuleBytes(s.join("\n"),I):t.domainModuleBytes(s.join("\n"),I,g,!0),t.outputLength()),i);if(""===o)throw Error(`ABC ${e}: its application domain was dropped`);return o},s=A=>[Int32Array.from(A.blocks,A=>A.offset),Int32Array.from(A.blocks,A=>A.length)],o=new WeakMap,n=[],E=0,a=0,l=A=>{let e=n.indexOf(A);e>=0&&(n.splice(e,1),t.actionsRelease(A))},h=new FinalizationRegistry(l),c=(A,e)=>{let g=o.get(A);if(void 0!==g&&g.actions===e&&n.includes(g.handle))return n.splice(n.indexOf(g.handle),1),n.push(g.handle),g.handle;void 0!==g&&(l(g.handle),h.unregister(g));let i=++E,[I,B]=s(e);t.actionsHold(i,A,I,B),a++;let Q={handle:i,actions:e};for(o.set(A,Q),h.register(A,i,Q),n.push(i);n.length>4;)l(n[0]);return i},w=(A,e,g)=>{let[i,I]=s(e);return G(d(t.actionsModuleBytes(A,i,I,e.version,g),t.outputLength()))},d=(A,e)=>0===e?"":AL.decode(new Uint8Array(t.memory.buffer,A,e)),u=WebAssembly.Module.customSections(A,"swf2es.build"),D=u.length?String.fromCharCode(...new Uint8Array(u[0])):null,f=0,m=50,G=(A,e=!1)=>{let B=t.memory.buffer.byteLength;return(e||B>g||++i>=64)&&(t.__collect(),g=B,i=0,I=0),A};return{identity:D,abcVersion(A){let e=G(t.abcVersion(A));return e<0?null:{major:e>>>16,minor:65535&e}},get epoch(){return f},reset(A=50){Ao(A),B=0,f++,m=A,G(t.domainReset(A))},get apiVersion(){return m},add(A,e=!1,g=0){let i=G(t.domainAdd(A,e,g));if(i<0)throw Error(`application domain ${g}: never made, or dropped`);return 0===i&&B++,i},childDomain(A){let e=G(t.domainChild(A));if(e<0)throw Error(`application domain ${A}: never made, or dropped`);return e},dropDomain(A,e=f){e===f&&G(t.domainDrop(A))},evictDomain(A){G(t.domainEvict(A))},usage(){let[A,e,g]=G(t.domainUsage()).split(" ").map(Number);return{live:A,dead:e,memory:g}},compact:()=>!!G(t.domainWantsCompact())&&(t.__collect(),i=0,!!t.domainCompact()&&(t.__collect(),g=t.memory.buffer.byteLength,i=0,!0)),isLive:A=>0===G(t.domainState(A)),reviveDomain(A,e){let I=G(t.domainRevive(A));if(I<0){for(let[A,g]of e){let e=G(t.domainRestore(A,g));if(0!==e)throw Error(`ABC ${A}: not of an evicted domain, or rejected (${e})`)}I=G(t.domainRevive(A))}if(I<0)throw Error(`application domain ${A}: not evicted, its parent not live, or an ABC of it not given`);I>0&&(t.__collect(),g=t.memory.buffer.byteLength,i=0)},found(A){G(t.domainFound(A.domain,A.nsKind,A.uri,A.name,A.abc,A.asType))},compile(A=[],e=-1){Q("compile");let g=r(A,e,!0);return{module:g,sourceMap:G(t.domainSourceMap()),entries:AH(G(t.domainModuleEntries()))}},compileModule:(A=[],t=-1)=>(Q("compileModule"),r(A,t,!1)),compileLazyModule:(A=[],t=-1)=>(Q("compileLazyModule"),r(A,t,!1,!0)),context(A=-1,e=0,g=-1){if(0===B)return null;let i=G(t.domainContext(C(A),e,g));if(""===i)return null;let I=i.indexOf("\n"),Q=i.indexOf("\n",I+1),r=i.slice(0,I);return{abcs:r?r.split(",").map(Number):[],own:Number(i.slice(I+1,Q<0?i.length:Q)),log:Q<0?"":i.slice(Q+1)}},revision:()=>`${f} ${t.domainRevision()}`,compileModuleLogged(A=[],e=-1){Q("compileModuleLogged");let g=t.domainLogMark(),i=r(A,e,!1),I=G(t.domainLogSince(g,C(e)));return{module:i,log:"!"===I?null:I}},replay:(A,e=-1)=>(Q("replay"),G(t.domainReplay(A,C(e)))),compileMethods(A,e=-1){Q("compileMethods");let g=A.filter(A=>Number.isInteger(A)&&A>=0);if(0===g.length)return new Map;let i=t.domainEmitEachBytes(g.join(","),!0,C(e)),B=t.outputLength();return I+=B,AH(G(d(i,B),I>=262144))},compileActions(A,e){let g=w(A,e,!0),i=AH(G(t.actionsModuleEntries())),I=new Map;for(let A of G(t.actionsModuleUnits()).split("\x02")){let[t,e,g,i]=A.split("\x01");if(void 0!==i){let[A,B,Q,C]=e.split(",").map(Number),[r,s]=g.split(",").map(Number);I.set(t,{code:i,high:r,reach:s,unit:{at:A,end:B,bound:Q,five:0!==C}})}}return{module:g,entries:e.blocks.map((A,t)=>i.get(t)??""),units:I}},compileActionsModule:(A,t)=>w(A,t,!1),compileActionBlocks(A,e,g){let i=g.filter(A=>Number.isInteger(A)&&A>=0);if(0===i.length)return new Map;let I=c(A,e);return AH(G(d(t.actionsHeldEmitEachBytes(I,e.version,i.join(",")),t.outputLength()),!0))},compileActionUnit(A,e,{at:g,end:i,bound:I,five:B}){let Q=c(A,e),C=d(t.actionsHeldUnitBytes(Q,e.version,g,i,I,B),t.outputLength()),[r,s]=t.actionsUnitLimits();return G({code:C,high:r,reach:s})},releaseActions(A){let t=o.get(A);void 0!==t&&(l(t.handle),o.delete(A),h.unregister(t))},heldActions:()=>({held:G(t.actionsHeldCount()),copies:a})}}(A),{handedModules:t.modules,url:t.url,sandboxType:t.sandboxType,air:t.air,print:A=>d.post({type:"trace",line:A}),onUncaught:A=>d.post({type:"uncaught",text:w(A)}),workerParent:{id:t.id,post:A=>d.post(A),shared:t.shared},sync:{memory:t.sync,thread:t.id},audio:null,navigate:null,fileHost:null,clipboard:null,webSocket:null,sendToUrl:!1,storage:{get:A=>e.get(A)??null,set:(A,t)=>{e.set(A,t.slice())},remove:A=>{e.delete(A)}}});await g.loadLibraries(t.libraries);let i=a=new DG(t.swf,g);for(let A of(s=g,n++,o.splice(0)))g.workers.fromParent(A),n++;if(Ca(g.rt).start(t.id),d.post({type:"running"}),await i.start(),h())return;let I=setInterval(()=>{h()&&clearInterval(I)},10),B=performance.now(),Q=()=>{if(h())return;let A=n,t=performance.now(),e=i.advance(t-B);B=t,h()||(e>0&&A>E&&(E=A,d.post({type:"idle",received:A})),setTimeout(Q,1e3/i.frameRate))};setTimeout(Q,1e3/i.frameRate)})(A).catch(t=>{if(!h()){if(t instanceof CC){l=!0,new Co(A.init.sync,A.init.id).end(A.init.id);return}d.post({type:"uncaught",text:w(t)}),d.post({type:"terminate"})}}):s?(s.workers.fromParent(A),n++):o.push(A)});
15
+ `),r=B.rt.loadInto(t,()=>I(...g));return(...A)=>{let t=r(...A);return Fp.set(t,g[10]),t}}):void 0,n=A=>this.s.rt.loadInto(t,()=>A(this.s.rt,o),e);if(g.cached&&i){let e=t.own.length;try{r=n(g.factory)}catch(g){if(this.discard(i.key,i.entry),t.own.length!==e)throw g;this.refused(A),s=`swf2es-${++this.modules}.js`,r=n(wF(this.s.codegen.compileModule(this.hashes,A),s))}}else r=n(g.factory);if(e&&this.libraryScripts.add(s),I){let A=r;this.moduleAbcs.set(s,new WeakRef(A)),this.origins.set(A,I),this.loadedUrls.add(I.url),this.moduleGone.register(A,s)}return r}compileNow(A,t){let e=this.s.codegen;if(t){let t=e.compileLazyModule(this.hashes,A);return this.journal(`lazy ${A}`),t}if(this.recorder?.open){let{module:t,log:g}=e.compileModuleLogged(this.hashes,A);return this.recorded(A,{text:t},g),t}let g=e.compileModule(this.hashes,A);return this.journal(`compile ${A}`),g}async importHanded(A){let t=this.uniqueUrl(A.url),e=(await import(t)).default;if("function"!=typeof e)throw Error(`swf2es: ${A.url} is no module the player wrote`);return{factory:e,script:t,cached:!0}}cache(){return null===this.s.codegen.identity?null:this.s.moduleCache}async prepare(A){let t=this.cache(),e=[];await this.digestLibraries(A[0]);let g=t?.minBytes??FN;for(let i of A){let A,I=!this.builtins[i]&&this.s.lazyCompilation&&FM();if(this.sizes[i]<g){let A=this.compileNow(i,I);e.push({module:A,key:null,cached:!1,lazy:I});continue}let B=this.moduleKey(i);for(let e=0;t&&null!==B&&e<3;e++){let e=this.s.codegen.revision(),g=B;try{A=await async function(A,t,e){for(let g=0;g<2;g++){let g=await A.get(t);if(void 0===g)break;if("string"==typeof g.log&&Array.isArray(g.lengths)&&g.lengths[1]===g.log.length&&(void 0===g.url?"string"==typeof g.module&&g.lengths[0]===g.module.length:"string"==typeof g.url)){if(void 0===g.url)return{entry:g};try{let A=e(g.url),t=(await import(A)).default;if("function"==typeof t)return{entry:g,imported:{factory:t,url:A}}}catch{}}try{await A.delete(t,g)}catch{break}}}(t,await FS(g),A=>this.uniqueUrl(A))}catch{A=void 0}if(this.s.codegen.revision()===e||(B=this.moduleKey(i))===g)break;A=void 0}let Q=!1;if(null!==B&&void 0!==A){let{entry:t,imported:g}=A;if(this.s.codegen.replay(t.log,i)){this.recorded(i,void 0===t.url?{text:t.module}:{url:t.url},t.log),e.push({module:t.module,key:B,cached:!0,entry:t,imported:g});continue}this.unmodelled(),Q=!0,this.discard(B,t)}if(I){e.push({module:this.compileNow(i,!0),key:B,cached:!1,lazy:!0});continue}let{module:C,log:r}=this.s.codegen.compileModuleLogged(this.hashes,i);this.recorded(i,{text:C},r),null===r||Q||this.store(B,C,r),e.push({module:C,key:B,cached:!1})}return e}store(A,t,e){let g=this.cache();if(g&&null!==A){let i={module:t,log:e,lengths:[t.length,e.length]};FS(A).then(A=>g.put(A,i)).catch(()=>{})}}discard(A,t){let e=this.cache();e&&null!==A&&FS(A).then(A=>e.delete(A,t)).catch(()=>{})}async digestLibraries(A){var t;let e=this.libraryCount,g=this.s.codegen.epoch;if(null===e||void 0===A||this.libraryLog?.epoch===g)return;let i=await FS((t=this.s.codegen,t.context(A,0,e)?.log??""));this.libraryLog={epoch:g,digest:i}}moduleKey(A){var t,e;let g,i=null!==this.libraryCount&&this.libraryLog?.epoch===this.s.codegen.epoch?{count:this.libraryCount,digest:this.libraryLog.digest}:null;return t=this.s.codegen,e={hashes:this.hashes,builtins:this.builtins},(g=t.context(A,i?.count??0))?JSON.stringify({compiler:t.identity,api:t.apiVersion,abcs:g.abcs.map(A=>`${e.builtins[A]?"builtin ":""}${e.hashes[A]}`),own:g.own,libraries:i,log:g.log}):null}applicationDomainOf(A){let t=this.s.rt.classNamed("flash.system::ApplicationDomain").$it.instance();return t.$domain=A,t}codeDomain(){let A=this.s.rt.codeDomain();return A===this.s.rt.root?this.s.mainDomain:A}codeUrl(){return this.codeOrigin(Error().stack)?.url??this.s.url}callerUrl(A){let t=Fb(),e=null===t?null:function(A,t,e,g){if(!A.split("\n").some(A=>/^\s*at /.test(A)))return null;let i=BR(A),I=i.map(A=>null===A?null:By(A)),B=A=>null!=A&&e.isModule(A)&&!e.isLibrary(A);if(I.length<=t||I.slice(0,t).some(A=>null===A||e.isModule(A)))return null;let Q=t;for(;Q<I.length&&e.isLibrary(I[Q]??"");)Q++;if(B(I[Q]))return I[Q];if(Q>t&&g?.every((A,t)=>i[Q+t]===A)){let A=I[Q+g.length];return B(A)?A:null}return null}(t,2+A,{isModule:A=>this.isModule(A),isLibrary:A=>this.libraryScripts.has(A)},this.byNameChain());if(null===e)return null;let g=this.moduleAbcs.get(e)?.deref();return(g&&this.origins.get(g)?.url)??null}byName;byNameChain(){if(void 0!==this.byName)return this.byName;let A=null,t={proto:{[Bd(0)]:()=>{A=Fb()}}};this.s.rt.call(this.s.rt.methodClosure(void 0,t,0),null);let e=null===A?[]:BR(A),g=void 0===e[0]||null===e[0]?null:By(e[0]),i=e.slice(2,5),I=null!==g&&3===i.length&&i.every(A=>null!==A&&!this.isModule(By(A)??""))&&null!==e[1]&&By(e[1]??"")===g&&By(e[5]??"")===g;return this.byName=I?i:null,this.byName}isModule(A){return this.libraryScripts.has(A)||this.moduleAbcs.has(A)}everUrls(){return[...new Set([this.s.url,...this.loadedUrls])]}securityUrls(A){let t=this.callerUrl(A+1);return null===t?this.everUrls():[t]}codeLibrary(){return this.codeOrigin(Error().stack)?.library??this.s.library}runningLibrary(){let A=Error,t=A.stackTraceLimit;A.stackTraceLimit=48;let e=Error().stack;return A.stackTraceLimit=t,this.codeOrigin(e)?.library??null}calledLibrary(A,t){let e=this.s.rt.moduleOf(A),g=e&&this.origins.get(e);if(g)return g.library;let i=t?.$jsError,I=null;for(let A of i instanceof Error?BM(i.stack):[]){let t=this.moduleAbcs.get(A)?.deref();I=(t&&this.origins.get(t)?.library)??I}return I}codeOrigin(A){for(let t of BM(A)){let A=this.moduleAbcs.get(t)?.deref(),e=A&&this.origins.get(A);if(e)return e}}}let FN=8192;function FS(A){return G7(FJ.encode(A))}function Fb(){let A=Error,t=A.stackTraceLimit;try{A.stackTraceLimit=1/0}catch{return null}try{return 1/0===A.stackTraceLimit?Error().stack??null:null}finally{A.stackTraceLimit=t}}class FU{s;host;state="normal";sourceRect=null;drawn=null;mouseLock=!1;asked=0;constructor(A,t){this.s=A,this.host=t}get active(){return"normal"!==this.state}get rect(){return this.active?this.drawn:null}set(A){let t=this.host;if(A===this.state||!t)return;if("normal"===A){this.asked++,t.exit(),this.change(A);return}let e="fullScreenInteractive"===A;if(this.active){if(!t.allowed(e))throw this.s.rt.error("SecurityError",2152);this.state=A;return}if(!t.allowed(e)||!t.request(e))throw this.s.rt.error("SecurityError",2152);this.asked++,this.change(A)}setSourceRect(A){this.sourceRect=A,(!A||A.width>0&&A.height>0)&&(this.drawn=A),this.active&&this.s.onStageLayout?.()}hostChanged(A){A!==this.active&&this.change(A?"fullScreen":"normal")}change(A){let t=this.s;t.onStageLayout?.(),this.state=A,this.active||(this.mouseLock=!1);let e=t.stage?.object;if(e&&cH(e,"fullScreen")){let g=!t.air&&"fullScreenInteractive"===A;cL(t,e,t.rt.construct(t.rt.classNamed("flash.events::FullScreenEvent"),"fullScreen",!1,!1,this.active,g))}t.onStageLayout?.()}}class FY{s;orphans=new Map;madeThisFrame=[];leaving=new Map;constructor(A){this.s=A}get fresh(){return this.madeThisFrame}onStage(A){for(let t=A;t;t=t.parent)if(t===this.s.stage)return!0;return!1}added(A){this.dropOrphan(A.serial),this.dispatch(A.object,"added",!0),this.onStage(A)&&this.eachObject(A,A=>this.dispatch(A,"addedToStage",!1))}rootConstructed(A){this.dispatch(A.object,"added",!0),this.onStage(A)&&this.dispatch(A.object,"addedToStage",!1)}removing(A,t=!1){let e=A.parent?.object;if(this.orphan(A,!t),t?this.telling(A,2025):this.tell(A),t&&e&&A.timelineNamed){let t=iV(iY,A.name);this.s.rt.getProperty(e,t)===A.object&&this.s.rt.setProperty(e,t,null)}}remove(A){let t=this.leaving.get(A);if(void 0!==t)throw this.s.rt.error(2025===t?"ArgumentError":"Error",t);this.telling(A,2094),this.orphan(A),A.parent?.removeChild(A)}telling(A,t){if(this.leaving.has(A))return void this.tell(A);this.leaving.set(A,t);try{this.tell(A)}finally{this.leaving.delete(A)}}tell(A){this.dispatch(A.object,"removed",!0),this.onStage(A)&&this.eachObject(A,A=>this.dispatch(A,"removedFromStage",!1))}orphan(A,t=!0){if(A.object&&!this.orphans.has(A.serial)){let e=A.serial,g={serial:e,ref:A.ref,keep:t,since:this.s.frames,due:A.scriptsDue,advances:A.advanceDue};this.orphans.set(e,g),A.orphanEntry=g,this.sortedOrphans=null,oq.changes++,o$.watch?.orphaned(A)}}made(A){this.madeThisFrame.push(A),oq.changes++,A instanceof EN&&(A.fresh=!0)}sortedOrphans=null;dropOrphan(A){let t=this.orphans.get(A);if(void 0!==t){this.orphans.delete(A),this.sortedOrphans=null;let e=null!==o$.watch?t.ref.deref():void 0;void 0!==e&&o$.watch?.unorphaned(e)}}eachOrphanRoot(A,t=!1,e=!1){let g=this.sortedOrphans;g||((g=[...this.orphans.values()]).sort((A,t)=>t.serial-A.serial),this.sortedOrphans=g);for(let i=0;i<g.length;i++){if(t&&!g[i].due||e&&!g[i].advances)continue;let I=g[i].ref.deref();if(!I){this.dropOrphan(g[i].serial);continue}A(I)}}hearsFrames(A){if(A.object){let t=this.s.broadcastSets;for(let e=0;e<t.length;e++)if(t[e].has(A.object))return!0}let t=A.frameChildren;for(let A=0;A<t.length;A++)if(this.hearsFrames(t[A]))return!0;return!1}stopAll(A){this.dropOrphan(A.serial),we(this.s,A);let t=A=>{if(A instanceof EN&&(A.playing=!1),A.object)for(let t of this.s.broadcasts.values())t.delete(A.object);if(A instanceof ng)for(let e of A.children)t(e)};t(A)}dispatch(A,t,e){A&&cH(A,t)&&cK(this.s,A,this.s.event(t,e))}eachObject(A,t){if(A.object&&t(A.object),A instanceof ng)for(let e of[...A.children])this.eachObject(e,t)}afterScripts(){this.orphans.forEach((A,t)=>{if(!A.keep)return void this.dropOrphan(t);if(this.s.frames-A.since<FH)return;let e=A.ref.deref();if(e&&this.hearsFrames(e)){A.since=this.s.frames;return}this.dropOrphan(t),e&&we(this.s,e)});let A=this.madeThisFrame.splice(0);for(let t of(A.length>0&&oq.changes++,A))t.parent||this.orphan(t)}}let FH=120;class FL{s;audioEntries=new WeakMap;sharedAudio=new Map;sharedAudioGone=new FinalizationRegistry(({hash:A,entry:t,serial:e})=>{t.serial!==e||t.definition.deref()||this.removeSharedAudio(A,t)});symbols=new WeakMap;unbound=new Map;fontSets=new Set;fontSetsSeen=new WeakSet;registeredFonts=new Map;constructor(A){this.s=A}bind(A,t){let e=t.domain??this.s.mainDomain;for(let g of A.tags)if(76===g.code)for(let[i,I]of function(A,t){let e=new H(A,t.offset,t.offset+t.length),g=e.u16(),i=[];for(let A=0;A<g&&!e.overrun;A++){let A=e.u16();i.push([A,Ae(e)])}return i}(A.bytes,g)){let A=FZ(I);t.classes.set(i,A);let g=t.characters.get(i);if(g){let i=this.s.rt.definingAbc(A,e),I=i?this.symbols.get(i):this.unbound;I||(I=new Map,this.symbols.set(i,I)),I.has(A)||I.set(A,{character:g,library:t})}}}bitmapSymbol(A){for(let t=A;t;t=t.base){let A=this.symbolOf(t);if(A)return"bitmap"===A.character.type?A.character:null}return null}binarySymbol(A){for(let t=A;t;t=t.base){let A=this.symbolOf(t);if(A){let t=A.character;if("binary"!==t.type)return null;return t.shared??=new Uint8Array(t.data),t.shared}}return null}soundSymbol(A){for(let t=A;t;t=t.base){let A=this.symbolOf(t);if(A)return"sound"===A.character.type?A.character:null}return null}fontSymbol(A){for(let t=A;t;t=t.base){let A=this.symbolOf(t);if(A)return"font"===A.character.type||"fontCff"===A.character.type?A.character:null}return null}placedSymbol(A,t){let e=FZ(A);if(!this.s.rt.definingAbc(e,t))return null;let g=this.s.rt.classNamed(e,t);for(let A=g.$it;A;A=A.base){let t=this.symbolOf(A);if(t){let A=t.character;return"binary"===A.type||"font"===A.type||"fontCff"===A.type||"sound"===A.type?null:{character:A,library:t.library}}}return null}addFontLibrary(A){if(!this.fontSetsSeen.has(A.fonts)){for(let A of this.fontSets)A.deref()||this.fontSets.delete(A);for(let t of(this.fontSetsSeen.add(A.fonts),this.fontSets.add(new WeakRef(A.fonts)),this.registeredFonts.values()))"font"===t.type&&A.fonts.add(t.font)}}registerFont(A,t){if(!(this.registeredFonts.has(A)||[...this.registeredFonts.values()].some(A=>A.name.toLowerCase()===t.name.toLowerCase()&&A.type===t.type&&A.bold===t.bold&&A.italic===t.italic)))for(let e of(this.registeredFonts.set(A,t),this.fontSets)){let A=e.deref();A?"font"===t.type&&A.add(t.font):this.fontSets.delete(e)}}soundClip(A){if(!this.s.audio)return null;let t=this.audioEntries.get(A);if(t?.pending)return t.pending;let e=t?.decoded;if(e)return Promise.resolve(e);let g=A.definition,i=function(A){let t=0x811c9dc5;for(let e of[A.format,A.sampleRate,A.sampleSize,A.channels,A.sampleCount,A.seekSamples])t=Math.imul(t^e,0x1000193);let e=A.data;for(let A=0;A<e.length;A++)t=Math.imul(t^e[A],0x1000193);return t>>>0}(g);for(let t of this.sharedAudio.get(i)??[]){let e=t.definition.deref();if(!e||!function(A,t){if(A.format!==t.format||A.sampleRate!==t.sampleRate||A.sampleSize!==t.sampleSize||A.channels!==t.channels||A.sampleCount!==t.sampleCount||A.seekSamples!==t.seekSamples||A.data.length!==t.data.length)return!1;for(let e=0;e<A.data.length;e++)if(A.data[e]!==t.data[e])return!1;return!0}(e,g))continue;let I=t.decoded,B=t.pending??(I?Promise.resolve(I):null);if(B)return t.definition=new WeakRef(g),this.sharedAudioGone.register(g,{hash:i,entry:t,serial:++t.serial}),this.audioEntries.set(A,t),B}let I={definition:new WeakRef(g),decoded:null,pending:null,serial:1},B=this.s.audio,Q=Promise.resolve().then(()=>B.decode(g));I.pending=Q;let C=this.sharedAudio.get(i)??[];return C.push(I),this.sharedAudio.set(i,C),this.sharedAudioGone.register(g,{hash:i,entry:I,serial:1}),Q.then(A=>{I.decoded=A,I.pending=null},()=>this.removeSharedAudio(i,I)),this.audioEntries.set(A,I),Q}removeSharedAudio(A,t){let e=this.sharedAudio.get(A)?.filter(A=>A!==t)??[];e.length>0?this.sharedAudio.set(A,e):this.sharedAudio.delete(A)}symbolOf(A){let t=A.abc;return(t&&this.symbols.get(t)?.get(A.name))??this.unbound.get(A.name)}bitmapDataOf(A){let t=this.s.rt.construct(this.s.rt.classNamed("flash.display::BitmapData"),1,1);return t.$store=nK.of(A.pixels??EY),t}displayFor(A){let t=this.s.library??{characters:new Map,root:EU,classes:new Map,construct:null,constructLater:null,constructPlaced:null,uncaught:null,removing:null,fonts:new EI};for(let e=A;e;e=e.base){let A=this.symbolOf(e);if(A&&"binary"!==A.character.type&&"font"!==A.character.type&&"fontCff"!==A.character.type&&"sound"!==A.character.type){if("text"===A.character.type){let t=new EM(A.character,!1);return t.fonts=A.library.fonts,t}let t=EV(A.character,A.library);return t instanceof Eq&&"button"===A.character.type&&this.s.makeButtonStates(t,A.character,A.library),t}switch(e.name){case"flash.display::SimpleButton":return new Eq;case"flash.display::MovieClip":return new EN(EU,t);case"flash.display::Shape":return new Ee(null);case"flash.display::MorphShape":throw this.s.rt.error("ArgumentError",2012,"MorphShape$");case"flash.text::StaticText":throw this.s.rt.error("ArgumentError",2012,"StaticText$");case"flash.display::AVM1Movie":throw this.s.rt.error("ArgumentError",2012,"AVM1Movie$");case"flash.display::Bitmap":return new ne(null);case"flash.media::Video":return new EO;case"flash.text::TextField":{let A=new EM(null);return A.fonts=(this.s.code.codeLibrary()??t).fonts,A}}}return new ng}}function FZ(A){let t=A.lastIndexOf(".");return t<0?A:`${A.slice(0,t)}::${A.slice(t+1)}`}class FK{s;clock=0;now=0;realTime;running=new Map;timers=new Fv;starts=0;renderAsked=!1;host=0/0;hostReal=0;at=0/0;grid=0/0;cap=1/0;lastPass=-1/0;lastRaw=0/0;sum=0;spin;constructor(A,t){this.s=A,this.realTime=void 0===t.realTime?"u">typeof performance?()=>performance.now():null:t.realTime,this.spin=new dS(()=>this.elapsed()),this.realTime&&this.elapsed()}timer(){return this.realTime?Math.floor(this.spin.read()):Math.round(this.now)}ahead(){return this.realTime?this.spin.ahead():0}lead(A){return this.spin.lead(A)}elapsed(){let A=this.realTime();return Number.isFinite(A)&&(A>this.lastRaw&&(this.sum+=A-this.lastRaw),this.lastRaw=A),this.sum}current(){let A=this.elapsed();return(Number.isNaN(this.host)?A:this.host+(A-this.hostReal))+this.lead(A)}hostPassed(A){if(!this.realTime)return;let t=this.elapsed();this.host=Number.isNaN(this.host)?t:this.host+A,this.hostReal=t}frameAt(A,t){let e=Number.isNaN(A)||Number.isNaN(this.host),g=e?0:this.lead(this.elapsed());this.at=e?0/0:this.host-A+g,this.grid=e?0/0:this.host-A-t+g}holdAfter(A){this.realTime&&1/0===this.cap&&!Number.isNaN(this.host)&&(this.cap=this.host+this.lead(this.elapsed())+A)}release(){this.cap=1/0}beginFrame(A){this.realTime&&this.spin.settle(),this.clock+=A,this.now=this.clock}fireByClock(){try{for(;;){let A=this.timers.pop(this.clock);if(!A)break;this.now=A.due,A.due+=A.delay;try{this.s.rt.call(A.closure,A.object)}catch(t){this.s.reportUncaught(t,A.closure)}finally{A.stopped||this.timers.push(A)}}}finally{this.now=this.clock}}frameTimers(){if(this.realTime){let A=Number.isNaN(this.at)?this.current():this.at,t=Number.isNaN(this.grid)?A:this.grid;this.fireDue(A,t,1e3/this.s.frameRate,!1)}else this.fireByClock()}betweenFrames(A){if(!this.realTime)return;this.spin.settle();let t=this.elapsed();this.at=(Number.isNaN(this.host)?t:this.host)+this.lead(t);try{this.fireDue(this.at,0/0,A,!0)}finally{this.at=0/0}}fireDue(A,t,e,g){let i=Math.max(Math.min(A,this.cap),this.lastPass),I=Math.min(t,this.cap);this.lastPass=i;let B=[],Q=[];for(;;){let A=this.timers.pop(i+Fx);if(!A)break;let t=A.delay<e;(!g||A.fired+A.delay<=i+Fx)&&A.due<=(t?i:I)+Fx?(A.due=Number.isNaN(I)?i:I,A.fired=i,B.push(A)):Q.push(A)}for(let A of Q)this.timers.push(A);if(B.length){B.sort((A,t)=>A.order-t.order);try{for(let A of B)if(!A.stopped){A.due+=A.delay,this.renderAsked=!1;try{this.s.rt.call(A.closure,A.object)}catch(t){this.s.reportUncaught(t,A.closure)}finally{A.stopped||this.timers.push(A)}g&&this.renderAsked&&this.s.render()}}finally{this.renderAsked=!1}}}startTimer(A,t,e){this.stopTimer(A);let g=Math.max(Math.trunc(t)||0,1),i=this.now;this.realTime&&(i=g>=1e3/this.s.frameRate&&!Number.isNaN(this.grid)?this.grid:Number.isNaN(this.at)?this.current():this.at);let I={object:A,delay:g,closure:e,due:i+g,fired:-1/0,seq:0,order:this.starts++,stopped:!1};this.running.set(A,I),this.timers.push(I)}stopTimer(A){let t=this.running.get(A);t&&(t.stopped=!0,this.running.delete(A),this.timers.stopped())}timerRunning(A){return this.running.has(A)}}let Fx=1e-6;class Fv{heap=[];seq=0;stoppedCount=0;push(A){A.seq=this.seq++,this.insert(A)}insert(A){let t=this.heap;t.push(A);let e=t.length-1;for(;e>0;){let A=e-1>>1;if(!FV(t[e],t[A]))break;[t[e],t[A]]=[t[A],t[e]],e=A}}pop(A){for(;;){let t=this.heap[0];if(!t||t.due>A)return null;if(this.remove(),t.stopped){this.stoppedCount--;continue}return t}}stopped(){if(this.stoppedCount++,this.stoppedCount>this.heap.length/2){let A=this.heap.filter(A=>!A.stopped);for(let t of(this.heap=[],this.stoppedCount=0,A))this.insert(t)}}remove(){let A=this.heap,t=A.pop();if(!A.length)return;A[0]=t;let e=0;for(;;){let t=2*e+1,g=t+1,i=e;if(t<A.length&&FV(A[t],A[i])&&(i=t),g<A.length&&FV(A[g],A[i])&&(i=g),i===e)break;[A[e],A[i]]=[A[i],A[e]],e=i}}}function FV(A,t){return A.due<t.due||A.due===t.due&&A.seq<t.seq}class FX{s;infos=new WeakMap;main=null;telling=!1;errorEvent=null;asked=null;constructor(A){this.s=A}owns(A,t){this.infos.set(A,t),this.main??=t}report(A,t=null){let e;if(A instanceof QE)return void this.s.tellHost(A);try{e=this.s.rt.caught(A)}catch{this.s.tellHost(A);return}let g=t;this.infos.has(t)||(g=this.telling?null:this.s.code.calledLibrary(t,e)),this.tell(e,g)&&this.s.tellHost(e)}mustBeHeard(A){try{this.errorEvent??=this.s.rt.classNamed("flash.events::ErrorEvent")}catch{return!1}return this.s.rt.isInstanceOf(A,this.errorEvent.$it)}asCaller(A){let t=this.s.code.runningLibrary();return(...e)=>{let g=this.asked;this.asked=t;try{A(...e)}finally{this.asked=g}}}unheard(A){if(this.tell(A,this.s.code.runningLibrary()??this.asked)){let t=this.s.rt,e=t.toString(t.prop(A,"text")),g=t.toString(t.prop(A,"type")),i=t.construct(t.classNamed("Error"),`Error #2044: Unhandled ${g}:. text=${e}`,2044);this.s.tellHost(i)}}tell(A,t){if(this.telling)return!1;let e=(t&&this.infos.get(t))??this.main;if(!e)return!0;let g=[];for(let A=e;A;){g.push([A,A.$uncaught]);let t=A.$loader;if(!t)break;g.push([t,t.$uncaught]),A=nt(t.$display)?.loaderInfo??null}if(!g.some(([,A])=>A))return!0;this.telling=!0;try{let t=this.s.rt.construct(this.s.rt.classNamed("flash.events::UncaughtErrorEvent"),"uncaughtError",!0,!0,A);return cZ(this.s,t,g)}finally{this.telling=!1}}}let FW=new TextEncoder,Fq=new TextDecoder;function FT(A,t){let e=new Uint8Array(1+t);return e[0]=A,{out:e,view:new DataView(e.buffer)}}function FP(A,t){let{out:e}=FT(A,t.length);return e.set(t,1),e}function FO(A){switch(A.kind){case"value":{let t=A.value;if(null===t)return FT(4,0).out;if("boolean"==typeof t)return FT(t?1:2,0).out;if("string"==typeof t)return FP(3,FW.encode(t));let{out:e,view:g}=FT(0,8);return g.setFloat64(1,t,!0),e}case"amf":return FP(5,A.bytes);case"bytes":return FP(6,A.bytes);case"shared":{let{out:t,view:e}=FT(7,8);return e.setFloat64(1,A.memory.id,!0),t}case"channel":{let{out:t,view:e}=FT(8,20);return e.setFloat64(1,A.channel.id,!0),e.setInt32(9,A.channel.sender,!0),e.setInt32(13,A.channel.receiver,!0),e.setInt32(17,A.channel.queue,!0),t}case"sync":{let{out:t,view:e}=FT("mutex"===A.ref.kind?9:10,4);return e.setInt32(1,A.ref.address,!0),t}}}function Fj(A){let t=new DataView(A.buffer,A.byteOffset,A.byteLength);switch(A[0]){case 0:return{kind:"value",value:t.getFloat64(1,!0)};case 1:case 2:return{kind:"value",value:1===A[0]};case 3:return{kind:"value",value:Fq.decode(A.subarray(1))};case 4:return{kind:"value",value:null};case 5:return{kind:"amf",bytes:A.slice(1)};case 6:return{kind:"bytes",bytes:A.slice(1)};case 7:return{kind:"shared",id:t.getFloat64(1,!0)};case 8:return{kind:"channel",channel:{id:t.getFloat64(1,!0),sender:t.getInt32(9,!0),receiver:t.getInt32(13,!0),queue:t.getInt32(17,!0)}};default:return{kind:"sync",ref:{kind:9===A[0]?"mutex":"condition",address:t.getInt32(1,!0)}}}}function Fz(A){let t=[];for(let e of A){let A=null===e.key?null:FW.encode(e.key),g=new DataView(new ArrayBuffer(16));g.setInt32(0,e.worker,!0),g.setInt32(4,null===A?-1:A.length,!0),g.setInt32(8,e.token,!0),g.setUint32(12,e.value.length,!0),t.push(new Uint8Array(g.buffer),A??new Uint8Array(0),e.value)}let e=new Uint8Array(t.reduce((A,t)=>A+t.length,0)),g=0;for(let A of t)e.set(A,g),g+=A.length;return e}function F$(A){let t=new DataView(A.buffer,A.byteOffset,A.byteLength),e=[],g=0;for(;g<A.length;){let i=t.getInt32(g,!0),I=t.getInt32(g+4,!0),B=t.getInt32(g+8,!0),Q=t.getUint32(g+12,!0);g+=16;let C=I<0?null:Fq.decode(A.subarray(g,g+I));g+=Math.max(I,0),e.push({worker:i,key:C,token:B,value:A.slice(g,g+Q)}),g+=Q}return e}let F_=(A,t)=>`${A}${null===t?"":`:${t}`}`,F0={new:"new",starting:"new",running:"running",terminated:"terminated"};class F1{s;id;host;parent;backgrounds=new Map;ended=new Set;objects=new Map;shared=new Map;channels=new Map;memories=new Map;nextChannel=1;table=null;servicing=!1;libraries=[];constructor(A,t){if(this.s=A,this.parent=t.workerParent??null,this.host=this.parent?null:t.workerHost??null,this.id=this.parent?.id??0,this.parent)for(let A of this.parent.shared)this.applyShared(A)}get supported(){return null!==this.parent||null!==this.host}objectOf(A,t){let e=this.objects.get(A);if(!e){let g=this.s.rt;(e=g.constructClass(t??g.classNamed("flash.system::Worker"),[])).$worker=A,this.objects.set(A,e)}return e}create(A){let t=this.s.rt;if(null==A)throw t.error("TypeError",2007,"swf");if(!this.parent&&!this.host)throw t.unsupported("creating a Worker without a worker host");let e=Ca(t);if(this.parent&&!e.shared)throw iP("a Worker a background worker makes");let g=i3(t,A),i=e.newThread();return this.backgrounds.set(i,{id:i,creator:this.parent?this.id:null,swf:g.buffer.slice(0,g.length),state:"new",thread:null,pending:[],sent:0,waits:[]}),this.objectOf(i)}start(A){let t=this.s.rt,e=this.backgrounds.get(A);if(!e)throw t.error("flash.errors::IllegalOperationError",A===this.id||0===A||this.ended.has(A)?1511:1521);if("new"!==e.state)throw t.error("flash.errors::IllegalOperationError",1511);if(this.parent){if(0===Ca(t).requests)throw t.unsupported("starting a Worker from a background worker the primordial did not start");e.state="starting";let g=[...this.propertiesOf(A)].map(([t,e])=>({worker:A,key:t,value:e.wire}));this.request(function(A,t,e,g){let i=new DataView(new ArrayBuffer(16));i.setInt32(0,A,!0),i.setInt32(4,t,!0),i.setUint32(8,e.length,!0),i.setUint32(12,g.length,!0);let I=[new Uint8Array([0]),new Uint8Array(i.buffer),e];for(let A of g){let t=null===A.key?null:FW.encode(A.key),e=FO(A.value),g=new DataView(new ArrayBuffer(12));g.setInt32(0,A.worker,!0),g.setInt32(4,null===t?-1:t.length,!0),g.setUint32(8,e.length,!0),I.push(new Uint8Array(g.buffer),t??new Uint8Array(0),e)}let B=new Uint8Array(I.reduce((A,t)=>A+t.length,0)),Q=0;for(let A of I)B.set(A,Q),Q+=A.length;return B}(A,this.id,e.swf,g)),e.swf=new Uint8Array(0);return}this.takeRequests();let g=this.host;e.state="starting";let i=[A,0].flatMap(A=>[...this.propertiesOf(A)].map(([t,e])=>({type:"shared",worker:A,key:t,value:e.wire}))),I=e.swf;e.swf=new Uint8Array(0),e.sent=1,this.wait(e,1);try{e.thread=g.start({type:"init",id:A,swf:I,url:this.s.url,sandboxType:this.s.sandboxType,air:this.s.air,libraries:this.libraries,shared:i,sync:Ca(t).memory,modules:this.s.code.handedModules()},A=>this.fromBackground(e,A),A=>{"terminated"!==e.state&&(this.s.reportUncaught(A),this.end(e))})}catch{throw this.end(e),t.error("flash.errors::IllegalOperationError",3807)}for(let A of e.pending.splice(0))this.post(e,A)}terminate(A){var t;let e;if(0===A)throw this.s.rt.error("flash.errors::IllegalOperationError",3732);if(this.parent&&A===this.id)return Ca(this.s.rt).stop(A),this.parent.post({type:"terminate"}),!0;let g=this.backgrounds.get(A);return!!g&&"new"!==g.state&&"terminated"!==g.state&&(this.parent&&this.request((t=this.id,(e=new DataView(new ArrayBuffer(9))).setUint8(0,1),e.setInt32(1,A,!0),e.setInt32(5,t,!0),new Uint8Array(e.buffer))),this.end(g),!0)}request(A){let t=Ca(this.s.rt);this.inShared(()=>t.push(t.requests,A)),this.parent?.post({type:"requests"})}inShared(A){try{return A()}catch(A){throw Cw(this.s.rt,A)}}state(A){if(A===this.id||0===A)return"running";let t=this.backgrounds.get(A);return t?.state==="starting"&&Ca(this.s.rt).running(A)?"running":F0[t?.state??"terminated"]}list(){if(this.parent)return[this.objectOf(0),this.objectOf(this.id)];let A=[...this.backgrounds.values()].filter(A=>"running"===A.state);return[this.objectOf(0),...A.map(A=>this.objectOf(A.id))]}setShared(A,t,e){if(this.ended.has(A))return;let g=this.propertiesOf(A);if(void 0===e)g.delete(t);else{let A=this.encode(e);g.set(t,{wire:A,local:"bytes"===A.kind?e:void 0})}let i=Ca(this.s.rt);if(i.shared){let e=g.get(t);e&&(e.token=i.nextToken()),this.inShared(()=>i.updateTable(g=>{let i=F$(g).filter(e=>e.worker!==A||e.key!==t);return e?.token!==void 0&&i.push({worker:A,key:t,token:e.token,value:FO(e.wire)}),Fz(i)}))}let I={type:"shared",worker:A,key:t,value:void 0===e?null:g.get(t).wire};this.parent?this.parent.post(I):this.share(I,0)}share(A,t){for(let e of this.backgrounds.values()){let g=e.id,i=this.backgrounds.get(A.worker)?.creator===g;g!==t&&(0===A.worker||A.worker===g||i)&&"new"!==e.state&&this.post(e,A)}}getShared(A,t){let e=this.shared.get(A)?.get(t);if(Ca(this.s.rt).shared){let g=this.tableEntries().get(F_(A,t));if(!g)return;if(e?.token!==g.token)return this.decode(this.unpacked(Fj(g.value)))}if(e)return void 0!==e.local?e.local:this.decode(e.wire)}tableEntries(){let A=Ca(this.s.rt);if(this.table?.version!==A.tableVersion()){let{version:t,bytes:e}=A.readTable(),g=new Map;for(let A of F$(e))g.set(F_(A.worker,A.key),A);this.table={version:t,entries:g}}return this.table.entries}createChannel(A,t){let e=1048576*this.id+this.nextChannel++,g=Ca(this.s.rt),i=g.shared?this.inShared(()=>g.newQueue()):0;return this.channelObject({id:e,sender:A,receiver:t,queue:i})}send(A,t){let e=this.s.rt,g=this.channelOf(A);if(g.ref.sender!==this.id)throw e.error("ArgumentError",3736);if("open"!==g.state)throw e.error("flash.errors::IOError",3738);let i=this.encode(t);if(0!==g.ref.queue){let A=Ca(this.s.rt);this.inShared(()=>A.push(g.ref.queue,FO(i)));let t="shared"===i.kind?i:null;this.route({type:"message",channel:g.ref,value:t},this.id);return}this.route({type:"message",channel:g.ref,value:i},this.id)}receive(A,t){let e=this.s.rt,g=this.channelOf(A);if(g.ref.receiver!==this.id)throw e.error("ArgumentError",3737);if(0!==g.ref.queue)return this.receiveShared(g,t);let i=g.queue.shift();if(void 0===i){if("closed"===g.state)throw e.error("flash.errors::IOError",3738);if(t)throw e.unsupported("MessageChannel.receive(true) with no message queued");return}return"closing"===g.state&&0===g.queue.length&&(g.state="closed",this.drained(g)),this.decode(i)}receiveShared(A,t){let e=this.s.rt,g=Ca(e),i=A.ref.queue,I=g.shift(i);if(null===I&&t&&"open"===A.state){try{g.waitFor(i)}catch(A){throw Cw(e,A)}I=g.shift(i)}if(null===I){if("closed"===A.state||t&&g.closed(i))throw e.error("flash.errors::IOError",3738);return}return"closing"===A.state&&0===g.queued(i)&&(A.state="closed",this.drained(A)),this.decode(this.unpacked(Fj(I)))}unpacked(A){if("shared"!==A.kind)return A;let t=this.memories.get(A.id);if(!t)throw this.s.rt.unsupported("reading a shareable ByteArray another worker shared before its memory reached this one");return{kind:"shared",memory:t}}messageAvailable(A){let t=this.channelOf(A);return 0!==t.ref.queue?Ca(this.s.rt).queued(t.ref.queue)>0:t.ref.receiver===this.id?t.queue.length>0:t.undelivered>0}channelState(A){return this.channelOf(A).state}close(A){let t=this.channelOf(A);"open"===t.state&&(0!==t.ref.queue&&Ca(this.s.rt).close(t.ref.queue),this.route({type:"close",channel:t.ref,drained:!1},this.id),this.closed(t))}stopAll(){if(!this.parent||!Ca(this.s.rt).terminated){for(let A of this.backgrounds.values())"new"!==A.state&&"terminated"!==A.state&&this.end(A);this.host?.release?.()}}fromParent(A){switch(A.type){case"shared":this.applyShared(A);break;case"message":case"close":this.arrive(A);break;case"state":{let t=this.backgrounds.get(A.worker);t&&"running"===A.state&&"starting"===t.state?(t.state="running",this.stateChanged(t.id)):t&&"terminated"===A.state&&this.end(t)}}}fromBackground(A,t){if("terminated"!==A.state)switch(t.type){case"running":A.state="running",this.stateChanged(A.id),this.toCreator(A,"running");break;case"requests":this.serviceRequests();break;case"idle":for(let e of A.waits.filter(A=>A.upTo<=t.received))e.done();for(let e of(A.waits=A.waits.filter(A=>A.upTo>t.received),this.channels.values()))e.ref.receiver===A.id&&(e.undelivered=0);break;case"trace":this.s.rt.print(t.line);break;case"uncaught":this.s.reportUncaught(Error(`a background worker: ${t.text}`));break;case"terminate":this.end(A);break;case"shared":this.applyShared(t),this.share(t,A.id);break;case"message":case"close":this.route(t,A.id)}}route(A,t){let e=A.channel;if(!this.parent&&"close"===A.type&&e.sender!==this.id&&e.receiver!==this.id){let t=this.channels.get(e.id),g=A.drained?"closed":"closing";t&&t.state!==g&&"closed"!==t.state&&(t.state=g,this.stateEvent(t))}let g="close"===A.type?[e.sender,e.receiver]:[e.receiver],i=!1;for(let I of new Set(g))if(I!==t||"close"!==A.type)if(I===this.id)this.arrive(A);else if(this.parent)i||(this.parent.post(A),i=!0);else{let t=this.backgrounds.get(I);t&&("message"===A.type&&0===e.queue&&this.channel(e).undelivered++,this.post(t,A))}}arrive(A){let t=this.channel(A.channel);"close"===A.type?A.drained?"closed"!==t.state&&(t.state="closed",this.stateEvent(t)):"open"===t.state&&this.closed(t):(A.value?.kind==="shared"&&this.memories.set(A.value.memory.id,A.value.memory),0===A.channel.queue&&A.value&&t.queue.push(A.value),this.s.loads.deferHostEvent(()=>this.dispatch(t,"channelMessage")))}closed(A){let t=A.ref.receiver===this.id;A.state=t&&0===this.queued(A)?"closed":"closing",this.stateEvent(A),t&&this.drained(A)}drained(A){"closed"===A.state&&A.ref.sender!==this.id&&this.route({type:"close",channel:A.ref,drained:!0},this.id)}queued(A){return 0!==A.ref.queue?Ca(this.s.rt).queued(A.ref.queue):A.queue.length}stateEvent(A){this.s.loads.deferHostEvent(()=>this.dispatch(A,"channelState"))}dispatch(A,t){A.object&&cK(this.s,A.object,this.s.event(t))}stateChanged(A,t=!1){this.s.loads.deferHostEvent(()=>{let e=this.objects.get(A);e&&cK(this.s,e,this.s.event("workerState")),t&&this.objects.delete(A)})}takeRequests(){let A=Ca(this.s.rt);A.shared&&0===A.requests&&(A.requests=A.newQueue(),A.poll=()=>{A.queued(A.requests)>0&&this.serviceRequests()})}serviceRequests(){let A=Ca(this.s.rt);if(!this.servicing&&0!==A.requests){this.servicing=!0;try{for(let t=A.shift(A.requests);t;t=A.shift(A.requests)){let A=function(A){if(1===A[0]){let t=new DataView(A.buffer,A.byteOffset,A.byteLength);return{type:"end",id:t.getInt32(1,!0),creator:t.getInt32(5,!0)}}return{type:"start",job:function(A){let t=new DataView(A.buffer,A.byteOffset,A.byteLength),e=t.getUint32(8,!0),g=t.getUint32(12,!0),i=16+e,I=[];for(let e=0;e<g;e++){let e=t.getInt32(i,!0),g=t.getInt32(i+4,!0),B=t.getUint32(i+8,!0);i+=12;let Q=g<0?null:Fq.decode(A.subarray(i,i+g));i+=Math.max(g,0),I.push({worker:e,key:Q,value:Fj(A.slice(i,i+B))}),i+=B}return{id:t.getInt32(0,!0),creator:t.getInt32(4,!0),swf:A.slice(16,16+e),shared:I}}(A.subarray(1))}}(t);if("end"===A.type){let t=this.backgrounds.get(A.id);t?.creator===A.creator&&this.end(t);continue}let{job:e}=A,g=this.backgrounds.get(e.creator);if(g){for(let A of e.shared)try{let t=this.unpacked(A.value);this.applyShared({type:"shared",worker:A.worker,key:A.key,value:t})}catch(A){this.s.reportUncaught(A)}this.createFor(g,e.id,e.swf)}}}finally{this.servicing=!1}}}createFor(A,t,e){Ca(this.s.rt).addThread(t);let g={id:t,creator:A.id,swf:e,state:"new",thread:null,pending:[],sent:0,waits:[]};this.backgrounds.set(t,g);try{this.start(t)}catch(A){this.s.reportUncaught(A)}}toCreator(A,t){let e=null===A.creator?null:this.backgrounds.get(A.creator);e&&!this.parent&&this.post(e,{type:"state",worker:A.id,state:t})}end(A){let t=A.id;if("terminated"===A.state)return;this.toCreator(A,"terminated"),A.state="terminated";let e=A.thread;for(let t of(A.thread=null,A.pending.length=0,A.swf=new Uint8Array(0),A.waits.splice(0)))t.done();this.backgrounds.delete(t),this.ended.add(t);let g=Ca(this.s.rt);if(g.shared&&!this.parent&&g.updateTable(A=>Fz(F$(A).filter(A=>A.worker!==t))),g.stop(t),!this.parent)if(e){let A,i;A=Date.now(),setTimeout(i=()=>{g.stopped(t)?e.terminate():Date.now()-A>=1e3?Promise.resolve(e.terminate()).then(()=>g.end(t)):setTimeout(i,10)},10)}else g.end(t);for(let[A,e]of(this.shared.delete(t),this.channels))if(e.ref.sender===t||e.ref.receiver===t){if(e.undelivered=0,0!==e.ref.queue&&!g.terminated)for(g.close(e.ref.queue);null!==g.shift(e.ref.queue););this.channels.delete(A)}this.stateChanged(t,!0)}post(A,t){if("terminated"!==A.state){if(!A.thread)return void A.pending.push(t);A.thread.post(t),A.sent++,this.wait(A,A.sent)}}wait(A,t){let e=Ca(this.s.rt);this.s.loads.trackRequest(new Promise(g=>{let i=null,I=()=>{null!==i&&clearInterval(i),g()};e.shared&&(i=setInterval(()=>{e.blocked(A.id)&&I()},5)),A.waits.push({upTo:t,done:I})}))}applyShared(A){A.value?.kind==="shared"&&this.memories.set(A.value.memory.id,A.value.memory);let t=this.propertiesOf(A.worker);null===A.value?t.delete(A.key):t.set(A.key,{wire:A.value,local:void 0})}propertiesOf(A){let t=this.shared.get(A);return t||(t=new Map,this.shared.set(A,t)),t}channel(A){let t=this.channels.get(A.id);return t||(t={ref:A,state:"open",queue:[],undelivered:0,object:null},this.channels.set(A.id,t)),t}channelObject(A){let t=this.channel(A);if(!t.object){let A=this.s.rt,e=A.constructClass(A.classNamed("flash.system::MessageChannel"),[]);e.$channel=t,t.object=e}return t.object}channelOf(A){return A.$channel}encode(A){let t=this.s.rt;if(null===A||"object"!=typeof A)return{kind:"value",value:A};if(A.$channel)return{kind:"channel",channel:A.$channel.ref};if(t.isInstance(A,t.classNamed("flash.utils::ByteArray"))){let e=i3(t,A);if(e.shareable){let A=e.share();return this.memories.set(A.id,A),{kind:"shared",memory:A}}return{kind:"bytes",bytes:e.buffer.slice(0,e.length)}}let e=Cl(A);if(e){if(!Ca(t).shared)throw iP("mutex"===e.kind?"a Mutex":"a Condition");return{kind:"sync",ref:e}}let g=t.construct(t.classNamed("flash.utils::ByteArray")),i=i3(t,g);return new I0(t,i).value(A),{kind:"amf",bytes:i.buffer.slice(0,i.length)}}decode(A){let t=this.s.rt;switch(A.kind){case"value":return A.value;case"channel":return this.channelObject(A.channel);case"sync":return Ch(t,A.ref);case"shared":return this.memories.set(A.memory.id,A.memory),iz(t,A.memory);case"bytes":case"amf":{let e=t.construct(t.classNamed("flash.utils::ByteArray")),g=i3(t,e);return g.write(A.bytes),g.position=0,"bytes"===A.kind?e:new I1(t,g).value()}}}}let F2={shape:"flash.display::Shape",morph:"flash.display::MorphShape",sprite:"flash.display::MovieClip",button:"flash.display::SimpleButton",bitmap:"flash.display::Bitmap",text:"flash.text::TextField",static:"flash.text::StaticText"};class F3{codegen;rt;mainDomain;code=new Fk(this);uncaughtErrors=new FX(this);symbols=new FL(this);lifecycle=new FY(this);loads;timers;clipboard;workers;screenCapabilities;externalInterface;hostCalls=0;updates=0;renderedUpdates=0;cycles=0;scriptPhase=!1;framesMarked=0;static get checkRounds(){return uz.on}static set checkRounds(A){uz.on=A}static get checkPicks(){return u4.on}static set checkPicks(A){u4.on=A}overflowed=!1;scriptQueues=[];scriptDepth=0;openClip=[];openEnd=[];openDue=[];alsoAt=0;onUncaught;uncaught=[];toConstruct=[];placing=[];socket;webSocket;audio;navigate;fileHost;fileLifetime=new AbortController;moduleCache;lazyCompilation;connections=new Set;stopped=new AbortController;destroyed=!1;localConnections;sendToUrl;fsCommand;timelineSounds=wg(cO(this));fetch=null;decodeImage;drawer=null;showMenu=null;url="file:///";sandboxType;air;application;fileSystem;encryptedStore;loadPolicyFile;base;storage;flushSharedObjects=null;platform;maxTouchPoints;inputMode;mapTouchToMouse=!0;eventFields=null;pending=null;stage=null;focus=null;root=null;library=null;invalidated=!1;scrolled=new Set;afterExitFrame=[];inFrameScript=null;broadcasts=new Map;broadcastSets=[];activation=new Map;stageWidth=0;stageHeight=0;stageScaleMode="showAll";stageAlign="";stageScaleModeSet=!1;stageAlignSet=!1;onStageLayout=null;fullScreen;stageColor=null;stageViewportX=0;stageViewportY=0;stageViewportWidth=0;stageViewportHeight=0;contentsScaleFactor=1;contentsScaleListeners=new Set;mouseStageX=0;mouseStageY=0;frameRate=24;frames=0;quality="HIGH";showDefaultContextMenu=!0;instances=0;statusClass=null;mouseVisible=!0;mouseCursor="auto";cursors=new Map;pointer=null;touch=null;avm1Input=null;trimTrailingHtmlBreak;constructor(A,t={}){var e,g,i,I,B,Q,C;let r,s,o;this.codegen=A,this.localConnections=t.localConnections??new cw,this.screenCapabilities={screenResolutionX:t.screenCapabilities?.screenResolutionX??("u"<typeof screen?0:screen.width),screenResolutionY:t.screenCapabilities?.screenResolutionY??("u"<typeof screen?0:screen.height),pixelAspectRatio:t.screenCapabilities?.pixelAspectRatio??1,screenDPI:t.screenCapabilities?.screenDPI??72},this.fullScreen=new FU(this,t.fullScreen??null),this.trimTrailingHtmlBreak=t.trimTrailingHtmlBreak??!1,this.timers=new FK(this,t),this.decodeImage=void 0===t.decodeImage?cA:t.decodeImage,this.externalInterface=t.externalInterface??null;let n=t.socket;this.socket=n?{connect:(A,t,e,g)=>this.track(e,e=>n.connect(A,t,e,g))}:null;let E=void 0===t.webSocket?"function"!=typeof(r=globalThis.WebSocket)?null:{connect(A,t,e){let g=new r(A,t);return g.binaryType="arraybuffer",g.addEventListener("open",()=>e.open(g.protocol)),g.addEventListener("message",({data:A})=>{e.message("string"==typeof A?A:new Uint8Array(A))}),g.addEventListener("close",({code:A})=>e.close(A)),g.addEventListener("error",()=>e.error()),{send:A=>g.send(A),close:A=>g.close(A)}}}:t.webSocket;if(this.webSocket=E?{connect:(A,t,e)=>this.track(e,e=>E.connect(A,t,e))}:null,this.onUncaught=t.onUncaught??null,this.audio=void 0===t.audio?cM():t.audio,this.fileHost=void 0===t.fileHost?cC():t.fileHost,this.navigate=void 0===t.navigate?cn():t.navigate,this.clipboard=new Ds(void 0===t.clipboard?function(){let A=globalThis.navigator?.clipboard;if(!A||"function"!=typeof A.writeText)return null;let t=globalThis.ClipboardItem;return{write:({text:e,html:g})=>{(void 0!==g&&t&&"function"==typeof A.write?A.write([new t({"text/plain":new Blob([e],{type:"text/plain"}),"text/html":new Blob([g],{type:"text/html"})})]):A.writeText(e)).catch(()=>{})}}}():t.clipboard),this.fsCommand=t.fsCommand??null,this.workers=new F1(this,t),t.handedModules){let e=new FR(t.handedModules);this.code.handover=e,this.codegen=e.guard(A)}else t.workerHost&&!t.workerParent&&(this.code.recorder=new FF);this.sendToUrl=t.sendToUrl??!0,this.moduleCache=t.moduleCache??null,this.lazyCompilation=t.lazyCompilation??!1;let a=t.fetch;this.fetch=a?(A,t)=>a(A,AbortSignal.any([t,this.stopped.signal])):null,this.url=t.url??this.url,this.air=t.air??!1,this.application=this.air?t.application??null:null,this.fileSystem=this.air?t.fileSystem??null:null,this.encryptedStore=this.air?t.encryptedStore??(s=new Map,{getItem:A=>s.get(A)??null,setItem:(A,t)=>{s.set(A,t)},removeItem:A=>{s.delete(A)},reset:()=>s.clear()}):null,this.sandboxType=t.sandboxType??(this.air?"application":"remote"),this.loadPolicyFile=t.loadPolicyFile??null,this.base=t.base??null,this.loads=new dj(this,t),this.storage=t.storage??cE(),this.platform={...function(){let A=globalThis.navigator,t=A?.userAgent??"",e=/Mac OS X (\d+)[._](\d+)(?:[._](\d+))?/.exec(t),[g,i,I]=/Windows/.test(t)?["Windows 10","Adobe Windows","WIN"]:e?[`Mac OS ${e[1]}.${e[2]}${e[3]?`.${e[3]}`:""}`,"Adobe Macintosh","MAC"]:["Linux","Adobe Linux","LNX"],B=A?.language??new Intl.DateTimeFormat().resolvedOptions().locale,[Q,C]=B.split("-");return{os:g,manufacturer:i,version:`${I} 32,0,0,465`,language:("zh"===Q||"pt"===Q)&&C?`${Q}-${C}`:Q,locale:B,playerType:"PlugIn"}}(),...t.platform},this.maxTouchPoints=Math.max(0,Math.floor(t.maxTouchPoints??(o=globalThis.navigator,o?.maxTouchPoints??0))||0),this.inputMode=this.maxTouchPoints>0?"gesture":"none",this.rt=new QR(A=>{let t,e,g,i,I,B;return{...{...rl,...Q6,...r$,...function(A){let t={};class e{get source(){return this.$source}get global(){return this.$re.global}get ignoreCase(){return this.$re.ignoreCase}get multiline(){return this.$re.multiline}get dotall(){return this.$re.dotAll}get extended(){return this.$extended}get lastIndex(){return this.$re.lastIndex}set lastIndex(t){this.$re.lastIndex=A.toInt(t)}[`${Qp}::exec`](t=""){let e=this.$re;if(e.global&&e.lastIndex<0)return e.lastIndex=0,null;let g=e.exec(A.toString(t));return g?rR(A,g):null}}return QS(t,"RegExp",e),t}(A),...rg,...ro,...r3,...C8,...rF,...I2,...(t={},e=t=>{if(null==t)throw A.error("ArgumentError",1507,"filename");return A.toString(t)},g=t=>{let e=A.files.read(t);if(null===e)throw A.error("Error",1500,t);return e},i=(t,e)=>{if(!A.files.write(t,e))throw A.error("Error",1501,t)},QS(t,"avmplus::System",class{static trace(t){A.print(QU(t).map(t=>A.toString(t)).join(" ").replaceAll("\0",""))}static write(t){A.print(A.toString(t).replaceAll("\0",""))}static"avmplus:System::getArgv"(){return A.array([])}static getAvmplusVersion(){return"swf2es"}static get swfVersion(){return A.swfVersion}static get apiVersion(){return A.apiVersion}static getTimer(){return Date.now()-rx}static getRunmode(){return"jit"}static isDebugger(){return A.debugger}static exit(){}static sleep(t){let{workers:e}=rX(A),g=()=>{if(e.terminated)throw new rL};g();for(let e=A.toInt(t);e>0;e-=50)!function(A){if(A<=0)return;let t=Date.now()+A;if("function"==typeof SharedArrayBuffer){let t=new Int32Array(new SharedArrayBuffer(4));try{Atomics.wait(t,0,0,A);return}catch{}}for(;Date.now()<t;);}(Math.min(e,50)),g()}static exec(t){if(null==t)throw A.error("ArgumentError",1507,"command");return -1}static canonicalizeNumber(A){return A}static isGlobal(t){return null!==t&&"object"==typeof t&&A.traitsOf(t).isGlobal}static getFeatures(){return rv}static forceFullCollection(){}static queueCollection(){}static pauseForGCIfCollectionImminent(A){}static get totalMemory(){return 1347584+i0(A)}static get freeMemory(){return 753664}static get privateMemory(){return 6557696+i0(A)}}),QS(t,"avmplus::File",class{static exists(t){return null!==A.files.read(e(t))}static read(A){return function(A){if(A.length>=3){if(239===A[0]&&187===A[1]&&191===A[2])return Iq(A.subarray(3));let t=254===A[0]&&255===A[1];if(t||255===A[0]&&254===A[1]){let e=[];for(let g=2;g+1<A.length;g+=2){let i=t?A[g]<<8|A[g+1]:A[g]|A[g+1]<<8;e.push(String.fromCharCode(i))}return e.join("")}}return Iq(A)}(g(e(A)))}static write(t,g){let I=e(t);if(null==g)throw A.error("ArgumentError",1507,"data");i(I,IW(A.toString(g)))}static readByteArray(t){let i=g(e(t)),I=A.construct(A.classNamed("flash.utils::ByteArray")),B=i3(A,I);return B.write(i),B.position=0,I}static writeByteArray(t,g){let I=e(t),B=i3(A,g);return i(I,B.buffer.subarray(0,B.length)),!0}}),QS(t,"avmplus::Domain",class{static get currentDomain(){return A.currentDomain()}static get MIN_DOMAIN_MEMORY_LENGTH(){return 1024}"avmplus:Domain::init"(t){this.$domain=A.childDomain(t?t.$domain??A.root:A.root)}loadBytes(t,e){if(null==t)throw A.error("TypeError",1507,"bytes");let g=A.toUint(e??0);if(0!==g&&(g<9||g>31))throw A.error("TypeError",1508,"swfVersion");if(!A.compileAbc)throw A.unsupported("Domain.loadBytes without RuntimeOptions.compileAbc");let i=this.$domain??A.root,I=i3(A,t),B=A.compileAbc(I.buffer.slice(0,I.length),A.compileUnit(i));if("number"==typeof B)throw A.error("VerifyError",B);A.run(A.loadInto(i,()=>B(A)))}getClass(t){if(null==t)throw A.error("ArgumentError",1507,"name");let e=A.toString(t),g=e.lastIndexOf("."),i=g<0?e:`${e.slice(0,g)}::${e.slice(g+1)}`,I=A.classNamedByCode(i,this.$domain??A.root);if(null===I||"object"!=typeof I||void 0===I.$it)throw A.error("TypeError",1034,A.toString(I),"Class");return I}get domainMemory(){return A.memoryProvider}set domainMemory(t){Ci(A,t)}}),QS(t,"flash.system::Worker",class{static pr(t){A.print(A.toString(t))}"flash.system:Worker::internalGetState"(){return rU[rX(A).workers.state(this.$id)]||"aborted"}get isPrimordial(){return 0===this.$id}isParentOf(t){if(null==t)throw A.error("TypeError",2007,"worker");return rX(A).workers.parent(t.$id)===this.$id}setSharedProperty(t,e){let{workers:g}=rX(A),i=rP(A,t);if(void 0===e){g.set(this.$id,i,null),g.objects.delete(rK(this.$id,i));return}let I=function(A,t){if("number"==typeof t){let A=new Uint8Array(8);return new DataView(A.buffer).setFloat64(0,t,!0),{kind:3,bytes:A}}if(null!==t&&"object"==typeof t){if(A.isInstance(t,A.classNamed("flash.utils::ByteArray"))){let e=i3(A,t);if(!e.shareable)return{kind:1,bytes:rT(A,t)};let g=e.share();A.workerHost?.share?.(g);let i=new Uint8Array(8);return new DataView(i.buffer).setFloat64(0,g.id,!0),{kind:4,bytes:i}}let e=Cl(t);if(e){let A=new Uint8Array(5);return A[0]=+("mutex"!==e.kind),new DataView(A.buffer).setInt32(1,e.address,!0),{kind:2,bytes:A}}}let e=rq(A,new Uint8Array(0)),g=i3(A,e);return new I0(A,g).value(t),{kind:0,bytes:g.buffer.slice(0,g.length)}}(A,e),B=g.set(this.$id,i,I);(1===I.kind||4===I.kind)&&g.objects.set(rK(this.$id,i),{token:B,value:e})}getSharedProperty(t){let{workers:e}=rX(A),g=rP(A,t),i=e.get(this.$id,g);if(!i)return;switch(i.kind){case 3:return new DataView(i.bytes.buffer).getFloat64(0,!0);case 0:var I;return new I1(I=A,i3(I,rq(I,i.bytes))).value();case 2:{let t=new DataView(i.bytes.buffer).getInt32(1,!0);return Ch(A,{kind:0===i.bytes[0]?"mutex":"condition",address:t})}}let B=e.objects.get(rK(this.$id,g));if(B?.token===i.token)return B.value;if(4===i.kind){let t=new DataView(i.bytes.buffer).getFloat64(0,!0),e=ij(A).get(t)?.deref();if(e)return e;let g=A.workerHost?.shared?.(t);if(!g)throw A.unsupported("a shareable ByteArray from a worker whose host does not share it");return iz(A,g)}let Q=rq(A,i.bytes);return e.objects.set(rK(this.$id,g),{token:i.token,value:Q}),Q}start(){let{workers:t,threads:e}=rX(A);if(1!==t.state(this.$id))throw A.error("flash.errors::IllegalOperationError",1511);if(t.parent(this.$id)!==t.self)throw A.error("flash.errors::IllegalOperationError",1521);if(!A.workerHost)throw A.unsupported("starting a Worker without RuntimeOptions.workers");let g=null===this.$code||void 0===this.$code?null:rT(A,this.$code);this.$code=null,t.setState(this.$id,2);try{e.set(this.$id,A.workerHost.start({id:this.$id,memory:t.memory,code:g}))}catch(A){throw t.setState(this.$id,7),A}}terminate(){var t,e,g,i;let I,{workers:B,threads:Q}=rX(A);if(0!==this.$id&&this.$id===B.self)throw B.terminateSelf(),new rL;if(0===this.$id)throw A.error("Error",1513);let C=B.terminate(this.$id);if(0===C.size)return!1;let r=Q.get(this.$id);return Q.delete(this.$id),r&&(t=A,e=this.$id,g=r,i=C,(I=Ca(t)).waitStopped(e,100),Promise.resolve(g.terminate()).then(()=>{for(let A of i)I.end(A)})),!0}}),QS(t,"flash.system::WorkerDomain",class{listWorkers(){let{workers:t}=rX(A),e=[];for(let g=0;g<t.count();g++)4===t.state(g)&&e.push(rW(A,g));let g=A.applyType(A.classNamed("__AS3__.vec::Vector"),[A.classNamed("flash.system::Worker")]).$it.instance();return g.$a=e,g.$fixed=!1,g}"flash.system:WorkerDomain::createWorkerFromByteArrayInternal"(t){let e=rW(A,rX(A).workers.create());return e.$code=t,e}}),t),...re,...r6,...function(A){let t="flash.utils:ByteArray",e={},g=(A,t,e)=>{if(null==t)throw A.error("TypeError",2007,e)},i=(A,t,e)=>{var g;let i;if(t.available<e)throw A.error("flash.errors::EOFError",2030);if(e<=24){let A=t.buffer,g=t.position,i="",I=0;for(;I<e;I++){let t=A[g+I];if(0===t||t>=128)break;i+=String.fromCharCode(t)}if(I===e||0===A[g+I])return t.position=g+e>>>0,i}let I=t.buffer.subarray(t.position,t.position+e);Ct(I)&&(I=I.subarray(3));let B=Iq((i=(g=I).indexOf(0))<0?g:g.subarray(0,i));return t.position=t.position+e>>>0,B};class I{static get defaultObjectEncoding(){return A.defaultObjectEncoding}static set defaultObjectEncoding(t){A.defaultObjectEncoding=A.toUint(t)}get length(){return i3(A,this).length}set length(t){i3(A,this).setLength(A.toUint(t),!0)}get position(){return i3(A,this).position}set position(t){i3(A,this).position=A.toUint(t)>>>0}get bytesAvailable(){return i3(A,this).available}get endian(){return i3(A,this).littleEndian?"littleEndian":"bigEndian"}set endian(t){let e=i3(A,this);g(A,t,"endian");let i=A.toString(t);if("bigEndian"===i||"littleEndian"===i)e.littleEndian="littleEndian"===i;else throw A.error("ArgumentError",2008,"type")}get objectEncoding(){return i3(A,this).objectEncoding}set objectEncoding(t){let e=i3(A,this),g=A.toUint(t);if(0!==g&&3!==g)throw A.error("ArgumentError",2008,"objectEncoding");e.objectEncoding=g}get shareable(){return i3(A,this).shareable}set shareable(t){A.toBoolean(t)&&(i3(A,this).shareable=!0)}clear(){i3(A,this).clear()}atomicCompareAndSwapIntAt(t,e,g){let i=i3(A,this),I=A.toInt(t)>>>0;if(i.length<4||I>i.length-4||I%4!=0)throw A.error("RangeError",1506);return i.compareAndSwapInt(I,A.toInt(e),A.toInt(g))}atomicCompareAndSwapLength(t,e){let g=i3(A,this),i=A.toInt(e);if(g.subscribed&&i<1024)throw A.error("RangeError",1506);return g.compareAndSwapLength(A.toInt(t),i>>>0)}readBoolean(){let t=i3(A,this),e=t.shortRead(1);return 0!==t.buffer[e]}readByte(){let t=i3(A,this),e=t.shortRead(1);return t.view.getInt8(e)}readUnsignedByte(){let t=i3(A,this),e=t.shortRead(1);return t.buffer[e]}readShort(){let t=i3(A,this),e=t.shortRead(2);return t.view.getInt16(e,t.littleEndian)}readUnsignedShort(){let t=i3(A,this),e=t.shortRead(2);return t.view.getUint16(e,t.littleEndian)}readInt(){let t=i3(A,this),e=t.shortRead(4);return t.view.getInt32(e,t.littleEndian)}readUnsignedInt(){let t=i3(A,this),e=t.shortRead(4);return t.view.getUint32(e,t.littleEndian)}readFloat(){let t=i3(A,this),e=t.shortRead(4);return t.view.getFloat32(e,t.littleEndian)}readDouble(){let t=i3(A,this),e=t.shortRead(8);return t.view.getFloat64(e,t.littleEndian)}readUTFBytes(t){let e=i3(A,this);return i(A,e,A.toUint(t))}readUTF(){let t=i3(A,this),e=t.shortRead(2);return i(A,t,t.view.getUint16(e,t.littleEndian))}readMultiByte(t,e){let i=i3(A,this);return g(A,e,"charSet"),i.checkEOF(A.toUint(t)),""}readBytes(t,e=0,i=0){let I=i3(A,this);g(A,t,"bytes");let B=A.toUint(e),Q=A.toUint(i),C=I.available;if(0===Q&&(Q=C),Q>C)throw A.error("flash.errors::EOFError",2030);if(B+Q>0xffffffff)throw A.error("RangeError",2006);let r=i3(A,t),s=I.buffer,o=I.position;B+Q>=r.length&&r.extend(B+Q),I.position=o+Q>>>0,i2(r.buffer,B,s,o,Q)}writeBoolean(t){let e=i3(A,this),g=e.shortWrite(1);e.buffer[g]=+!!t}writeByte(t){let e=i3(A,this),g=e.shortWrite(1);e.buffer[g]=255&A.toInt(t)}writeShort(t){let e=i3(A,this),g=e.shortWrite(2);e.view.setInt16(g,A.toInt(t),e.littleEndian)}writeInt(t){let e=i3(A,this),g=e.shortWrite(4);e.view.setInt32(g,A.toInt(t),e.littleEndian)}writeUnsignedInt(t){let e=i3(A,this),g=e.shortWrite(4);e.view.setUint32(g,A.toUint(t),e.littleEndian)}writeFloat(t){let e=i3(A,this),g=e.shortWrite(4);e.view.setFloat32(g,A.toNumber(t),e.littleEndian)}writeDouble(t){let e=i3(A,this),g=e.shortWrite(8);e.view.setFloat64(g,A.toNumber(t),e.littleEndian)}writeUTFBytes(t){let e=i3(A,this);g(A,t,"value"),e.write(IW(A.toString(t)))}writeUTF(t){let e=i3(A,this);g(A,t,"value");let i=IW(A.toString(t));if(i.length>65535)throw A.error("RangeError",2006);let I=e.shortWrite(2);e.view.setUint16(I,i.length,e.littleEndian),e.write(i)}writeMultiByte(t,e){g(A,t,"value"),g(A,e,"charSet")}writeBytes(t,e=0,i=0){let I=i3(A,this);g(A,t,"bytes");let B=i3(A,t),Q=A.toUint(e),C=A.toUint(i);0===C&&(C=B.length-Q>>>0);let r=B.length;if(Q>r&&(Q=r),0===C&&(C=r-Q),C>r-Q)throw A.error("RangeError",2006);C>0&&I.write(B.buffer,Q,C)}[`${t}::_compress`](t){let e=Ce(A,t),g=i3(A,this);if(0===g.length)return;let i=g.buffer.subarray(0,g.length),I="zlib"===e?function(A,t=9){return J(A,t,!1)}(i):"deflate"===e?J(i,9,!0):F(A=>{let t=R(A,i),e=0===t||0!==A.lzmaEncode(t,i.length)?null:y(A,0);if(null===e)throw RangeError(`no memory to compress ${i.length} bytes`);return e});Cg(g,I,I.length)}[`${t}::_uncompress`](t){let e,g=Ce(A,t),i=i3(A,this);if(0===i.length)return;let I=i.buffer.subarray(0,i.length);if("lzma"===g){if(i.length<13)return;if(I[9]|I[10]|I[11]|I[12])throw A.error("flash.errors::MemoryError",1e3)}try{e="lzma"===g?function(A){let t=(A[5]|A[6]<<8|A[7]<<16|A[8]<<24)>>>0;if(t>8192*(A.length-13)+4096)throw new N(`${t} bytes in a stream of ${A.length}`);let e=k(A,0,13,t);if(0!==e.status)throw b(e);if(e.bytes.length!==t)throw new N("length mismatch");return e.bytes}(I):U(I,"deflate"===g)}catch(t){if(t instanceof S)throw A.error("flash.errors::MemoryError",1e3);if(t instanceof N)throw A.error("flash.errors::IOError",2058);throw t}Cg(i,e,0)}[`${t}::_toString`](){let t=i3(A,this),e=t.buffer.subarray(0,t.length);if(e.length>=3){if(Ct(e))return Iq(e.subarray(3));if(254===e[0]&&255===e[1]||255===e[0]&&254===e[1]){let A=255===e[0],t=[],g=new DataView(e.buffer,e.byteOffset,e.length);for(let i=2;i+1<e.length;i+=2)t.push(g.getUint16(i,A));return IT(t)}}return Iq(e)}}QS(e,"flash.utils::ByteArray",I);let B=(A,t)=>{let e=I.prototype;for(let g of t){let t=e[g];Object.defineProperty(A,g,{value(...A){let e=this.$amf,g=e.bytes,i=g.littleEndian;g.littleEndian=e.littleEndian;try{return t.apply(g.owner,A)}finally{g.littleEndian=i}}})}},Q={get endian(){return this.$amf.littleEndian?"littleEndian":"bigEndian"},set endian(t){if(g(A,t,"endian"),"bigEndian"!==t&&"littleEndian"!==t)throw A.error("ArgumentError",2008,"type");this.$amf.littleEndian="littleEndian"===t},get objectEncoding(){return this.$amf.objectEncoding},set objectEncoding(t){let e=A.toUint(t);if(0!==e&&3!==e)throw A.error("ArgumentError",2008,"objectEncoding");this.$amf.objectEncoding=e}};class C{writeObject(A){this.$amf.value(A)}}class r{readObject(){return this.$amf.value()}get bytesAvailable(){return this.$amf.bytes.available}}for(let A of[C,r])Object.defineProperties(A.prototype,Object.getOwnPropertyDescriptors(Q));return B(C.prototype,["writeBytes","writeBoolean","writeByte","writeShort","writeInt","writeUnsignedInt","writeFloat","writeDouble","writeMultiByte","writeUTF","writeUTFBytes"]),B(r.prototype,["readBytes","readBoolean","readByte","readUnsignedByte","readShort","readUnsignedShort","readInt","readUnsignedInt","readFloat","readDouble","readMultiByte","readUTF","readUTFBytes"]),QS(e,"flash.utils::ObjectOutput",C),QS(e,"flash.utils::ObjectInput",r),e}(A),...(I={},B=t=>{try{return t()}catch(t){throw Cw(A,t)}},I["avm2.intrinsics.memory::casi32"]=QJ((t,e,g)=>{let i=A.toInt(t),I=()=>i%4!=0||A.memoryLength<4||i>>>0>A.memoryLength-4;if(I()&&(A.refreshMemory?.(),I()))throw A.error("RangeError",1506);if(A.refreshMemory&&A.memoryProvider)return i3(A,A.memoryProvider).compareAndSwapInt(i,A.toInt(e),A.toInt(g));let B=A.memory.getInt32(i,!0);return B===A.toInt(e)&&A.memory.setInt32(i,A.toInt(g),!0),B}),I["avm2.intrinsics.memory::mfence"]=QJ(()=>{}),QS(I,"flash.concurrent::Mutex",class{static get isSupported(){return!0}"flash.concurrent:Mutex::ctor"(){let t=CE(A);this.$mutex=B(()=>t.sync.newMutex()),t.objects.set(this.$mutex,new WeakRef(this))}lock(){B(()=>Ca(A).lock(this.$mutex))}tryLock(){return B(()=>Ca(A).tryLock(this.$mutex))}unlock(){if(!Ca(A).unlock(this.$mutex))throw A.error("flash.errors::IllegalOperationError",1514)}}),QS(I,"flash.concurrent::Condition",class{static get isSupported(){return!0}"flash.concurrent:Condition::ctor"(t){if(null==t)throw A.error("ArgumentError",2007,"mutex");let e=CE(A);this.$mutexObject=t,this.$condition=B(()=>e.sync.newCondition(t.$mutex)),e.objects.set(this.$condition,new WeakRef(this))}get mutex(){if(!this.$mutexObject){let t=Ca(A).conditionMutex(this.$condition);this.$mutexObject=Ch(A,{kind:"mutex",address:t})}return this.$mutexObject}wait(t){let e=void 0===t?-1:A.toNumber(t);if(e<0&&-1!==e)throw A.error("ArgumentError",1515);let g=Ca(A);if(!g.holds(g.conditionMutex(this.$condition)))throw A.error("flash.errors::IllegalOperationError",1518);let i=-1===e?-1:Number.isNaN(e)?0:Math.min(Math.ceil(e),0x7fffffff);return B(()=>g.wait(this.$condition,i))}notify(){let t=Ca(A);if(!t.holds(t.conditionMutex(this.$condition)))throw A.error("flash.errors::IllegalOperationError",1516);B(()=>t.notify(this.$condition,!1))}notifyAll(){let t=Ca(A);if(!t.holds(t.conditionMutex(this.$condition)))throw A.error("flash.errors::IllegalOperationError",1517);B(()=>t.notify(this.$condition,!0))}}),I),...function(){let A={"Date.parse":A=>t=>C2(A.toString(t)),"Date.UTC":A=>(...t)=>{let e=t.map(t=>A.toNumber(t));return Cz([e[0],e[1],e[2]??1,e[3]??0,e[4]??0,e[5]??0,e[6]??0],!1)},"Date#Date::_get":()=>function(A){return C0(C1(this),A)},"Date#Date::_toString":()=>function(A){return C_(C1(this),A)},"Date#Date::_setTime":A=>function(t){return this.$time=Cf(A.toNumber(t)),this.$time},[`Date#${Cd}::getTime`]:()=>function(){return C1(this)},[`Date#${Cd}::valueOf`]:()=>function(){return C1(this)},[`Date#${Cd}::getTimezoneOffset`]:()=>function(){return C0(C1(this),16)}};for(let[t,e]of[["getUTCFullYear",0],["getUTCMonth",1],["getUTCDate",2],["getUTCDay",3],["getUTCHours",4],["getUTCMinutes",5],["getUTCSeconds",6],["getUTCMilliseconds",7],["getFullYear",8],["getMonth",9],["getDate",10],["getDay",11],["getHours",12],["getMinutes",13],["getSeconds",14],["getMilliseconds",15]])A[`Date#${Cd}::${t}`]=()=>function(){return C0(C1(this),e)};let t=["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"];for(let e=0;e<t.length;e++)for(let[g,i]of[["",e+1],["UTC",-(e+1)]])A[`Date#Date::_set${g}${t[e]}`]=A=>function(...t){return this.$time=function(A,t,e,g){let i=[0/0,0/0,0/0,0/0,0/0,0/0,0/0],I=e>0,B=Math.abs(e)-1;for(let t=0;t<g.length&&B+t<7;t++)if(i[B+t]=A.toNumber(g[t]),Number.isNaN(i[B+t]))return 0/0;let Q=I?CO(t):t;if(B<3){let A;if(Number.isNaN(t)){if(Number.isNaN(i[0]))return t;Q=0}Q=CZ(CH(Number.isNaN(i[0])?Cp(Q):i[0],Number.isNaN(i[1])?CJ(Q):i[1],Number.isNaN(i[2])?Ck(Q):i[2]),(A=Q%864e5)<0?A+864e5:A)}else{let A=Number.isNaN(i[3])?Cb(Q):i[3],t=Number.isNaN(i[4])?CU(Q):i[4],e=Number.isNaN(i[5])?CY(Q):i[5],g=Number.isNaN(i[6])?CN(Q%1e3,1e3):i[6];Q=CZ(CG(Q),CL(A,t,e,g))}return Cf(I?Cj(Q):Q)}(A,C1(this),i,t),this.$time};return A}(),"JSON.JSON::parseCore":A=>t=>(function(A,t){let e;try{e=JSON.parse(t)}catch{var g,i;let e,I,B,Q,C,r,s,o,n;return g=A,i=t,I=0,B="",Q=()=>B,C=()=>{throw g.error("SyntaxError",1132)},r=()=>{let A=I;for(;I<i.length&&i.charCodeAt(I)>=48&&57>=i.charCodeAt(I);)I++;I<=A&&C()},s=()=>{for(B="";I<i.length;){let A=i[I];switch(A){case" ":case"\n":case"\r":case" ":I++;continue;case",":case":":case"{":case"}":case"[":case"]":I++,B=A;return;case'"':{let A="",t=++I;for(;I<i.length;){let e=i.charCodeAt(I);if(e<32&&C(),34===e)break;if(92===e){A+=i.slice(t,I),++I===i.length&&C();let e=i[I],g={'"':'"',"/":"/","\\":"\\",b:"\b",f:"\f",n:"\n",r:"\r",t:" "};if(e in g)A+=g[e];else if("u"===e){let t=i.slice(I+1,I+5);/^[0-9a-fA-F]{4}$/.test(t)||C(),A+=String.fromCharCode(Number.parseInt(t,16)),I+=4}else C();t=++I}else I++}I===i.length&&C(),e=A+i.slice(t,I),I++,B='"';return}case"-":case".":case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{let A=I;"-"===i[I]&&I++,r(),"."===i[I]&&(I++,r()),("e"===i[I]||"E"===i[I])&&(("-"===i[++I]||"+"===i[I])&&I++,r()),e=i.slice(A,I),B="0";return}default:for(let A of rE)if(i.startsWith(A,I)){I+=A.length,B=A[0];return}C()}}},o=()=>{switch(Q()){case"n":return s(),null;case"t":return s(),!0;case"f":return s(),!1;case'"':{let A=e;return s(),A}case"0":{let A=Number(e);return s(),A}case"[":{s();let A=[];if("]"!==Q())for(;A.push(o()),","===Q();)s();return"]"!==Q()&&C(),s(),g.array(A)}case"{":{s();let A=g.newObject([]);if("}"!==Q())for(;;){'"'!==Q()&&C();let t=o();if(":"!==Q()&&C(),s(),g.setProperty(A,iX(t,g.userVersions),o()),","!==Q())break;s()}return"}"!==Q()&&C(),s(),A}default:return C()}},s(),n=o(),""!==Q()&&C(),n}return function A(t,e,g=0){if("object"!=typeof e||null===e)return e;if(g>500)return function(A,t){let e=[],g=t=>{if("object"!=typeof t||null===t)return t;let g=Array.isArray(t)?A.array(t):A.newObject([]);return e.push([t,g]),g},i=g(t);for(let A=e.pop();A;A=e.pop()){let[t,e]=A;if(Array.isArray(t))for(let A=0;A<t.length;A++)t[A]=g(t[A]);else{let A=e.$d;for(let e in t)A.set(e,g(t[e]))}}return i}(t,e);if(Array.isArray(e)){for(let i=0;i<e.length;i++)e[i]=A(t,e[i],g+1);return t.array(e)}let i=t.newObject([]),I=i.$d;for(let i in e)I.set(i,A(t,e[i],g+1));return i}(A,e)})(A,A.toString(t)),"JSON.JSON::stringifySpecializedToString":A=>(t,e,g,i)=>new ra(A,e?.$a?e.$a.map(t=>A.toString(t)):null,g?.$f?g:null,null==i?"":A.toString(i)).stringify(t),...s6},...function(A){let t,e,g,i,I,B,Q,C,r,s,o,n,E,a,l,h,c,w,d,u,D,f,m,G,p,M,J,k,N,S,b,U,Y,H,L,Z,K,x,v,V,X,W,q,T,P,O,j,z,$,_,AA,At,Ae,Ag,Ai,AI,AB,AQ,AC,Ar,As,Ao,An,AE,Aa,Al,Ah,Ac,Aw,Ad,AG,AF,AR,Ay,Ab,AU,AY,AH,AL,AZ,AK,Ax,Av,AV,AX,AW,Aq,AT,AP,AO,Aj,Az,A$,A_,A0,A1,A2,A3,A8,A9,A4,A5,A6,A7,tA,tt,te,tg,ti,tI,tB,tQ,tC,tr,ts,to,tn,tE,ta,tl,th,tc,tw,td,tu,tD,tf,tm,tG,tF,tR,ty,tp,tM,tJ,tk,tN,tS,tb,tU,tY,tH,tL,tZ,tK,tx,tv,tV,tX,tW,tq,tT,tP,tO,tj,tz,t$,t_,t0,t1,t2,t3,t8,t9,t4,t5,t6,t7,eA,et,ee,eg,ei,eI,eB,eQ,eC,er,es,eo,en,eE,ea,el,eh,ec,ew,ed,eu,eD,ef,em,eG,eF,eR,ey,ep,eM,eJ,ek,eN,eS,eb,eU,eY,eH,eL,eZ,eK,ex,ev,eV,eX,eW,eq,eT,eP,eO,ej,ez,e$,e_,e0,e1,e2,e3,e8,e9,e4,e5,e6,e7,gA,gt,ge,gg,gi,gI,gB,gQ,gC,gr,gs,go,gn,gE,ga,gl,gh,gc,gw,gd,gu,gD,gf;return{...(QS(t={},"flash.accessibility::Accessibility",class{static get active(){return!1}static sendEvent(t,e,g,i){if(null==t)throw A.rt.error("TypeError",2007,"source")}static updateProperties(){}}),t),trace:A=>(...t)=>{A.print(t.map(t=>A.toString(t)).join(" "))},"flash.utils::getDefinitionByName":t=>e=>G9(t,t.toString(e),e=>t.definitionNamed(e,A.code.codeDomain())),"flash.utils::getAliasName":A=>t=>{if(null==t)return null;let e=A.aliasOf(t.$it?t.$it:A.traitsOf(t));return""===e?null:e},"flash.utils::getTimer":()=>()=>A.timers.timer(),"flash.utils::escapeMultiByte":A=>t=>(function(A){let t=A.indexOf("\0"),e=G4.encode(t<0?A:A.slice(0,t)),g="";for(let A=0;A<e.length;A++){let t=e[A];g+=t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122?String.fromCharCode(t):`%${t.toString(16).toUpperCase().padStart(2,"0")}`}return g})(A.toString(t)),"flash.utils::unescapeMultiByte":A=>t=>(function(A){let t=[];for(let e=0;e<A.length;){let g=A[e++];if("\0"===g)break;if("%"!==g){for(let A of G4.encode(g))t.push(A);continue}let i=A[e++];if(void 0===i||!G5.test(i))continue;let I=A[e++];void 0!==I&&G5.test(I)&&t.push(Number.parseInt(i+I,16))}let e="";for(let A=0;A<t.length;){let g=t[A],i=g<128?1:g>=192&&g<224?2:g>=224&&g<240?3:4*(g>=240&&g<248),I=1===i?g:2===i?31&g:3===i?15&g:7&g,B=i>0&&A+i<=t.length;for(let e=1;B&&e<i;e++){let g=t[A+e];B=(192&g)==128,I=I<<6|63&g}if(!B){e+=String.fromCharCode(g),A++;continue}e+=String.fromCodePoint(I),A+=i}return e})(A.toString(t)),"flash.crypto::generateRandomBytes":A=>t=>{let e=A.toUint(t);if(0===e)return null;if(e>1024)throw A.error("Error",2004);let g=globalThis.crypto;if(!g?.getRandomValues)throw A.error("Error",0);let i=A.construct(A.classNamed("flash.utils::ByteArray")),I=i3(A,i);I.setLength(e);try{g.getRandomValues(I.buffer.subarray(0,e))}catch{throw A.error("Error",0)}return i},...(e=(t,e,g)=>{let i=A.rt;if(null==e)throw i.error("TypeError",2007,"value");if(null==g)throw i.error("TypeError",2007,"charSet");t.write(function(A,t){switch(t){case"utf-8":return Fc.encode(A);case"utf-16":case"utf-16le":case"unicode":return Fm(A,!0);case"utf-16be":case"unicodefffe":return Fm(A,!1)}let e="iso-8859-1"===t||"iso_8859-1"===t||"latin1"===t,g="ascii"===t||"us-ascii"===t,i=e||g?null:function(A){let t=FD.get(A.encoding);if(t)return t;t=new Map;let e=new Uint8Array(1);for(let g=0;g<256;g++){e[0]=g;let i=A.decode(e);1!==i.length||"�"===i||t.has(i)||t.set(i,g)}if(Ff.has(A.encoding)){let e=new Uint8Array(2);for(let g=129;g<255;g++){e[0]=g;for(let i=64;i<255;i++){e[1]=i;let I=A.decode(e);1!==I.length||"�"===I||t.has(I)||t.set(I,65536|g<<8|i)}}}return FD.set(A.encoding,t),t}(Fw(t)),I=[];for(let t of A){let A,B=t.charCodeAt(0);void 0===(A=e||g?1===t.length&&B<(g?128:256)?B:void 0:i.get(t))?I.push(63):A>65535?I.push(A>>8&255,255&A):I.push(A)}return new Uint8Array(I)}(i.toString(e),i.toString(g).toLowerCase()))},g=(t,e,g)=>{let i=A.rt;if(null==g)throw i.error("TypeError",2007,"charSet");let I=i.toUint(e);t.checkEOF(I);let B=i.toString(g).toLowerCase();switch(B){case"utf-16":case"utf-16le":case"unicode":return Fu(t.readView(I-I%2),!0);case"utf-16be":case"unicodefffe":return Fu(t.readView(I-I%2),!1)}let Q=t.readView(I),C=Q.indexOf(0);switch(C>=0&&(Q=Q.subarray(0,C)),B){case"iso-8859-1":case"iso_8859-1":case"latin1":return Fd(Q,!1);case"ascii":case"us-ascii":return Fd(Q,!0)}let r=Fw(B),s=r.decode(Q);return"shift_jis"===r.encoding&&s.includes("�")?function(A,t){let e=[];for(let g=0;g<A.length;g++){let i=A[g];if(i>=129&&i<=159||i>=224&&i<=252){let i=A[++g];void 0===i||i<64||127===i||i>252?e.push("・"):e.push(t.decode(A.subarray(g-1,g+1)).replaceAll("�","・"))}else 128===i?e.push("€"):160===i||i>=253?e.push(String.fromCharCode(160===i?63728:63729+i-253)):e.push(t.decode(A.subarray(g,g+1)))}return e.join("")}(Q,r):s},{"flash.utils::ByteArray#readMultiByte":QJ(function(t,e){return g(i3(A.rt,this),t,e)}),"flash.utils::ByteArray#writeMultiByte":QJ(function(t,g){e(i3(A.rt,this),t,g)}),"flash.utils::ObjectOutput#writeMultiByte":QJ(function(A,t){e(this.$amf.bytes,A,t)}),"flash.utils::ByteArray#writeObject":QJ(function(t){let e=i3(A.rt,this);(0|e.objectEncoding)<3?new GP(A.rt,e).value(t):new I0(A.rt,e).value(t)}),"flash.utils::ByteArray#readObject":QJ(function(){let t=i3(A.rt,this);return(0|t.objectEncoding)<3?new GO(A.rt,t).value():new I1(A.rt,t).value()}),"flash.utils::ObjectInput#readMultiByte":QJ(function(A,t){return g(this.$amf.bytes,A,t)})}),...(i={},I=()=>{if(!A.clipboard.writable)throw A.rt.error("SecurityError",2191)},B=t=>(t&&(i3(A.rt,t).position=0),t??null),QS(i,"flash.desktop::Clipboard",class{static get generalClipboard(){var t=A;let e=DN.get(t);if(!e){DS=!0;try{e=t.rt.constructClass(t.rt.classNamed("flash.desktop::Clipboard"),[])}finally{DS=!1}DN.set(t,e)}return e}get formats(){let t=A.clipboard.formats.map(A=>A.startsWith(DJ)?A.slice(DJ.length):A.startsWith(Dk)?A.slice(Dk.length):A);return A.rt.array([...new Set(t)])}clear(){I(),A.clipboard.clear()}clearData(t){I();let e=A.rt.toString(t);e.startsWith("air:")||e.startsWith("flash:")?A.clipboard.delete(e):(A.clipboard.delete(DJ+e),A.clipboard.delete(Dk+e))}get"flash.desktop:Clipboard::alive"(){return!0}get"flash.desktop:Clipboard::canReadContents"(){return A.clipboard.readable}get"flash.desktop:Clipboard::canWriteContents"(){return A.clipboard.writable}"flash.desktop:Clipboard::nativeSetHandler"(t,e){A.clipboard.setHandler(A.rt.toString(t),()=>{A.rt.call(e,null)})}"flash.desktop:Clipboard::setHandlerStoringData"(t){A.clipboard.storing=!!t}"flash.desktop:Clipboard::getObjectReference"(t){return A.clipboard.get(A.rt.toString(t))}"flash.desktop:Clipboard::putObjectReference"(t,e){A.clipboard.set(A.rt.toString(t),e)}"flash.desktop:Clipboard::getString"(){return A.clipboard.get(DC)??null}"flash.desktop:Clipboard::putString"(t){A.clipboard.set(DC,A.rt.toString(t))}"flash.desktop:Clipboard::getHTML"(){return A.clipboard.get(Dr)??null}"flash.desktop:Clipboard::putHTML"(t){A.clipboard.set(Dr,A.rt.toString(t))}"flash.desktop:Clipboard::getRTF"(){return B(A.clipboard.get(Dp))}"flash.desktop:Clipboard::putRTF"(t){A.clipboard.set(Dp,t)}"flash.desktop:Clipboard::getByteArray"(t){return B(A.clipboard.get(A.rt.toString(t)))}"flash.desktop:Clipboard::putByteArray"(t,e){A.clipboard.set(A.rt.toString(t),e)}get"flash.desktop:Clipboard::swfVersion"(){return A.rt.swfVersion}get supportsFilePromise(){return!1}"flash.desktop:Clipboard::getURL"(){return A.clipboard.get(DM)??null}"flash.desktop:Clipboard::putURL"(t){A.clipboard.set(DM,A.rt.toString(t))}"flash.desktop:Clipboard::getBitmapData"(){return null}"flash.desktop:Clipboard::putBitmapData"(){}"flash.desktop:Clipboard::getFileList"(){return null}"flash.desktop:Clipboard::nativePutFileList"(){}"flash.desktop:Clipboard::nativeGetFilePromiseList"(){return null}"flash.desktop:Clipboard::nativePutFilePromiseList"(){}}),i),...(Q={},C=null,r=[],s=!0,o=300,n="normal",E=!1,a=()=>{let t=C,e=t.$listeners?.get(D0)??[];for(let g of r.splice(0)){if(!e.some(A=>A.fn===g&&!A.capture))continue;let i=A.rt.construct(A.rt.classNamed("flash.events::InvokeEvent"),D0,!1,!1,A.application?.currentDirectory?function(A,t){let e=A.rt.construct(A.rt.classNamed("flash.filesystem::File"));return e.$fileLocation={root:"file",path:t},e}(A,A.application.currentDirectory):null,A.rt.array([...A.application?.arguments??[]]),"standard");!function(A,t,e,g){let i=cb(A);e[i.target]=t.$target??t,e[i.currentTarget]=t,e[i.phase]=2;try{A.rt.call(g,null,e)}catch(t){A.reportUncaught(t,g)}}(A,t,i,g)}},QS(Q,"flash.desktop::NativeApplication",class{static get nativeApplication(){return C??=A.rt.construct(A.rt.classNamed("flash.desktop::NativeApplication"))}static get supportsMenu(){return!1}static get supportsDockIcon(){return!1}static get supportsSystemTrayIcon(){return!1}static get supportsDefaultApplication(){return!1}static get supportsStartAtLogin(){return!1}addEventListener(t,e,g,i){DK(A,this,t,e,g,i)&&t===D0&&!g&&(0===r.length&&A.afterExitFrame.push(a),r.push(e))}removeEventListener(t,e,g){Dx(A,this,t,e,g)}dispatchEvent(t){return cK(A,this,t)}exit(t){A.application?.exit?.(0|Number(t))}get runtimeVersion(){return D_}get runtimePatchLevel(){return 2}get applicationID(){return A.application?.id??""}get publisherID(){return""}get applicationDescriptor(){let t=A.application?.descriptor;return t?A.rt.constructClass(A.rt.builtinClass("XML"),[t]):null}get menu(){return null}set menu(A){}get icon(){return null}get autoExit(){return s}set autoExit(A){s=!!A}get idleThreshold(){return o}set idleThreshold(A){o=0|Number(A)}get timeSinceLastUserInput(){return 0}get systemIdleMode(){return n}set systemIdleMode(A){n=String(A)}get executeInBackground(){return E}set executeInBackground(A){E=!!A}get startAtLogin(){throw A.rt.error("Error",2014)}set startAtLogin(t){throw A.rt.error("Error",2014)}get activeWindow(){let t=DU(A);return t&&A.application?.window?.active()?t:null}get openedWindows(){let t=DU(A);return A.rt.array(t?[t]:[])}activate(t){A.application?.window?.activate?.()}copy(){return!1}cut(){return!1}paste(){return!1}clear(){return!1}selectAll(){return!1}getDefaultApplication(A){return null}isSetAsDefaultApplication(A){return!1}setAsDefaultApplication(t){throw A.rt.error("Error",2014)}removeAsDefaultApplication(t){throw A.rt.error("Error",2014)}}),Q),...(l={},h=A.fileSystem,c=new DV(h?.separator??"/"),w=A=>{switch(A){case"app":return h?.directories.application??null;case"app-storage":return h?.directories.applicationStorage??null;default:return null}},d=t=>{let e=A.rt.construct(A.rt.classNamed("flash.filesystem::File"));return e.$fileLocation=t,e},u=(t,e)=>{if(!e)throw A.rt.error("Error",2014);return d({root:t,path:c.normalize(e)??e})},D=t=>{let e=D$(t);if(!e)throw A.rt.error("Error",2037);return e},f=()=>{throw A.rt.error("ArgumentError",2004)},m=A=>{let t=/^(app|app-storage):(.*)$/i.exec(A);if(t){let A=t[1].toLowerCase(),e=w(A),g=c.urlSegments(t[2]);return e&&g?{root:A,path:c.resolve(e,g.join(c.separator),e)}:null}if(/^file:/i.test(A)){let t=c.fromFileUrl(A);return t?{root:"file",path:t}:null}if(/^[a-z][a-z0-9+.-]*:\/\//i.test(A))return null;let e=c.normalize(A);return e?{root:"file",path:e}:null},G=t=>{if(t)throw A.rt.error("flash.errors::IOError",t)},p=t=>{if(null==t)throw A.rt.error("TypeError",2007,"newLocation");let e=D(t);return DW(A,e),e},M=(t,e)=>{A.loads.deferHostEvent(()=>{let g=e();cK(A,t,g?Dz(A,g):A.event("complete"))})},J=t=>{let e=function(A,t){let e=A.fileSystem,g=e?.directories.cache;if(!e||!g)return null;let i=Dq(A),I=new DV(e.separator),B=Math.floor(65535*Math.random());for(let A=0;A<65535;A++){let Q=(B+A)%65535+1,C=I.resolve(g,`fla${Q.toString(16)}.tmp`,null);if(e.stat(C))continue;let r=t?!!i?.createDirectory(C):!!i?.write(C,new Uint8Array(0),0,0);return{path:C,made:r}}return null}(A,t);if(!e||t&&!e.made)throw A.rt.error("flash.errors::IllegalOperationError",2014);return d({root:"file",path:e.path})},QS(l,"flash.filesystem::File",class{static get systemCharset(){return"utf-8"}static get separator(){return c.separator}static get lineEnding(){return"\\"===c.separator?"\r\n":"\n"}static get applicationDirectory(){return u("app",h?.directories.application)}static get applicationStorageDirectory(){return u("app-storage",h?.directories.applicationStorage)}static get userDirectory(){return u("file",h?.directories.user)}static get documentsDirectory(){return u("file",h?.directories.documents)}static get desktopDirectory(){return u("file",h?.directories.desktop)}static get cacheDirectory(){return u("file",h?.directories.cache)}static getRootDirectories(){let t=new Set;for(let A of Object.values(h?.directories??{})){let e=A?c.normalize(A):null;for(;e&&null!==c.parent(e);)e=c.parent(e);e&&t.add(e)}return A.rt.array([...t].map(A=>d({root:"file",path:A})))}static createTempFile(){return J(!1)}static createTempDirectory(){return J(!0)}"flash.filesystem:File::_init"(A){this.$fileLocation=m(String(A))??f()}toString(){return"[object File]"}get exists(){return!!h?.stat(D(this).path)}get isDirectory(){return h?.stat(D(this).path)?.directory??!1}get isHidden(){return h?.stat(D(this).path)?.hidden??!1}get isSymbolicLink(){return h?.stat(D(this).path)?.symbolicLink??!1}get isPackage(){return D(this),!1}resolvePath(A){let t=D(this),e=String(A??"");return/^(file|app|app-storage):/i.test(e)&&!c.isAbsolute(e)?d(m(e)??f()):c.isAbsolute(e)?d({root:"file",path:c.normalize(e)}):d({root:t.root,path:c.resolve(t.path,e,w(t.root))})}getRelativePath(A,t){let e=D(this).path,g=D(A).path,i=c.under(g,e);if(i)return i.join("/");if(!t)return null;let I=e,B=0;for(;null!==I&&!c.under(g,I);)I=c.parent(I),B++;return null===I?null:[...Array(B).fill(".."),...c.under(g,I)].join("/")}get parent(){let A=D(this),t=w(A.root);if(null!==t&&c.under(t,A.path))return null;let e=c.parent(A.path);return null===e?null:d({root:A.root,path:e})}get nativePath(){return D(this).path}set nativePath(A){let t=c.normalize(String(A??""));this.$fileLocation=t?{root:"file",path:t}:f()}canonicalize(){D(this)}get url(){let A=D(this),t=w(A.root);if(null!==t){let e=c.under(A.path,t)??[];return`${A.root}:/${e.map(encodeURIComponent).join("/")}`}return c.fileUrl(A.path)}set url(A){let t=String(A??""),e=/^(file|app|app-storage):/i.test(t)?m(t):null;this.$fileLocation=e??f()}getDirectoryListing(){let t=D(this);if(!(t=>{let e=h?.stat(t.path);if(!e)throw A.rt.error("Error",3003);return e})(t).directory)throw A.rt.error("Error",3007);let e=h?.list(t.path)??[];return A.rt.array(e.map(A=>d({root:t.root,path:c.resolve(t.path,A,null)})))}getDirectoryListingAsync(){let t=D(this);A.loads.deferHostEvent(()=>{let e=h?.stat(t.path);if(!e?.directory)return void cK(A,this,Dz(A,e?3007:3003));let g=(h?.list(t.path)??[]).map(A=>d({root:t.root,path:c.resolve(t.path,A,null)}));cK(A,this,A.rt.construct(A.rt.classNamed("flash.events::FileListEvent"),"directoryListing",!1,!1,A.rt.array(g)))})}createDirectory(){var t;let e;G((t=p(this).path,(e=A.fileSystem?.stat(t))?3002*!e.directory:3001*!Dq(A)?.createDirectory(t)))}deleteFile(){G(DP(A,p(this).path))}deleteFileAsync(){let t=p(this);M(this,()=>DP(A,t.path))}deleteDirectory(t=!1){G(DO(A,p(this).path,!!t))}deleteDirectoryAsync(t=!1){let e=p(this);M(this,()=>DO(A,e.path,!!t))}copyTo(t,e=!1){G(Dj(A,D(this).path,p(t).path,!!e,!1))}copyToAsync(t,e=!1){let g=D(this),i=p(t);M(this,()=>Dj(A,g.path,i.path,!!e,!1))}moveTo(t,e=!1){G(Dj(A,p(this).path,p(t).path,!!e,!0))}moveToAsync(t,e=!1){let g=p(this),i=p(t);M(this,()=>Dj(A,g.path,i.path,!!e,!0))}clone(){return d({...D(this)})}cancel(){}get icon(){return null}get downloaded(){return!1}set downloaded(A){}get preventBackup(){return!1}set preventBackup(A){}}),l),...(k={},N=A.fileSystem,S=()=>{throw A.rt.error("flash.errors::IOError",2029)},b=A=>{let t=A.$buffer??S();return"write"===A.$mode||"append"===A.$mode?S():t},U=A=>{let t=A.$buffer??S();return"read"===A.$mode?S():t},Y=(t,e,...g)=>A.rt.callProp(b(t),e,...g),H=(t,e,...g)=>{let i=i3(A.rt,U(t)),I=i.position;A.rt.callProp(t.$buffer,e,...g),t.$written=(t.$written??0)+(i.position-I),Z(t,I,i.position)},L=t=>{let e;return e=A.rt.construct(A.rt.classNamed("flash.events::OutputProgressEvent"),"outputProgress",!1,!1,0,t.$written??0),cK(A,t,e)},Z=(t,e,g)=>{if(t.$from=Math.min(t.$from??e,e),t.$to=Math.max(t.$to??g,g),t.$flushing)return;t.$flushing=!0;let i=t.$generation;A.loads.deferHostEvent(()=>{t.$generation===i&&(t.$flushing=!1,K(t)&&t.$async&&L(t))})},K=t=>{if(void 0===t.$from||!t.$buffer||!t.$made)return!1;let e=i3(A.rt,t.$buffer),g=Math.min(t.$from,e.length),i=Math.max(g,Math.min(t.$to??g,e.length));return t.$from=void 0,t.$to=void 0,DT(A,t.$path,e.buffer.subarray(g,i),g,e.length),!0},x=(t,e)=>{if(null==t)throw A.rt.error("TypeError",2007,"file");let g=D$(t);if(!g)throw A.rt.error("flash.errors::IllegalOperationError",2037);let i=A.rt.toString(e);if(!mk.includes(i))throw A.rt.error("ArgumentError",2004);return"read"!==i&&DW(A,g),{path:g.path,mode:i}},v=A=>{let t=N?.stat(A);return t?t.directory?3006:N?.read?.(A)??3003:3003},V=(t,e)=>{let g=function(A,t){let e=A.fileSystem;if(e?.stat(t)?.directory)return 3006;let g=new DV(e?.separator??"/");for(let A=g.parent(t);null!==A;A=g.parent(A)){let t=e?.stat(A);if(t){if(!t.directory)return 3003;break}}return 3001*!Dq(A)}(A,t);if(g)return g;let i=!!N?.stat(t),I="write"!==e&&i?N?.read?.(t):mN;return I&&DT(A,t,mN,I.length,I.length)?I:3001},X=(t,e,g,i)=>{K(t),t.$generation=(t.$generation??0)+1;let I=A.rt.construct(A.rt.classNamed("flash.utils::ByteArray"));return A.rt.setProp(I,"endian",t.$endian??"bigEndian"),A.rt.setProp(I,"objectEncoding",t.$objectEncoding??3),t.$buffer=I,t.$async=e,t.$path=g,t.$mode=i,t.$made=!e,t.$from=void 0,t.$to=void 0,t.$flushing=!1,t.$written=0,I},W=A=>{let t=K(A);return A.$buffer=null,A.$generation=(A.$generation??0)+1,t},q=(t,e,g)=>{let i=i3(A.rt,t.$buffer),I=i.position,B=Math.max(g,t.$from??1/0),Q=Math.min(g+e.length,t.$to??0,i.length),C=B<Q?i.buffer.slice(B,Q):null;i.position=g,i.write(e),C&&(i.position=B,i.write(C)),i.position=I},T=(t,e)=>{let g=i3(A.rt,t.$buffer);g.write(e),g.position="append"===t.$mode?g.length:0},P=(t,e,g,i)=>{let I=0,B=()=>{let Q;if(t.$generation!==g)return;let C=Math.min(I+40960,e.length);if(q(t,e.subarray(I,C),I),I=C,Q=A.rt.construct(A.rt.classNamed("flash.events::ProgressEvent"),"progress",!1,!1,I,e.length),cK(A,t,Q),t.$generation===g)if(I<e.length)A.loads.deferHostEvent(B);else{let e;i(),e=A.event("complete"),cK(A,t,e)}};A.loads.deferHostEvent(B)},QS(k,"flash.filesystem::FileStream",class{open(t,e){let g=x(t,e),i="read"===g.mode?v(g.path):V(g.path,g.mode);if("number"==typeof i)throw W(this),A.rt.error("flash.errors::IOError",i);X(this,!1,g.path,g.mode),T(this,i)}openAsync(t,e){let g=x(t,e);X(this,!0,g.path,g.mode);let i=this.$generation,I=t=>{let e;W(this),e=Dz(A,t,` file: ${g.path}`),cK(A,this,e)};if("read"===g.mode){let t=v(g.path);A.loads.deferHostEvent(()=>{this.$generation===i&&("number"==typeof t?I(t):P(this,t,i,()=>{}))});return}"append"===g.mode&&T(this,N?.read?.(g.path)??mN),A.loads.deferHostEvent(()=>{if(this.$generation!==i)return;let A=V(g.path,g.mode);"number"==typeof A?I(A):"update"===g.mode?P(this,A,i,()=>{this.$made=!0,K(this)&&L(this)}):(this.$made=!0,K(this)&&L(this))})}close(){if(!this.$buffer)return;if(!this.$made&&"read"!==this.$mode){let A=V(this.$path,this.$mode);"number"!=typeof A&&("update"===this.$mode&&q(this,A,0),this.$made=!0)}let t=W(this);if(this.$async){let e=this.$generation;A.loads.deferHostEvent(()=>{if(this.$generation===e){let e;t&&L(this),e=A.event("close"),cK(A,this,e)}})}}truncate(){let t=U(this),e=i3(A.rt,t).position;A.rt.setProp(t,"length",e),Z(this,e,e),K(this)}get position(){return i3(A.rt,this.$buffer??S()).position}set position(t){let e=i3(A.rt,this.$buffer??S());if("append"===this.$mode)throw A.rt.error("flash.errors::IllegalOperationError",2037);e.position=A.rt.toUint(t)>>>0}get bytesAvailable(){return i3(A.rt,b(this)).available}get readAhead(){return this.$readAhead??1/0}set readAhead(t){this.$readAhead=A.rt.toNumber(t)}get endian(){return this.$buffer?A.rt.prop(this.$buffer,"endian"):this.$endian??"bigEndian"}set endian(t){this.$buffer&&A.rt.setProp(this.$buffer,"endian",t),this.$endian=this.$buffer?A.rt.prop(this.$buffer,"endian"):t}get objectEncoding(){return this.$buffer?A.rt.prop(this.$buffer,"objectEncoding"):this.$objectEncoding??3}set objectEncoding(t){this.$buffer&&A.rt.setProp(this.$buffer,"objectEncoding",t),this.$objectEncoding=this.$buffer?A.rt.prop(this.$buffer,"objectEncoding"):t}readBytes(A,t=0,e=0){Y(this,"readBytes",A,t,e)}readBoolean(){return Y(this,"readBoolean")}readByte(){return Y(this,"readByte")}readUnsignedByte(){return Y(this,"readUnsignedByte")}readShort(){return Y(this,"readShort")}readUnsignedShort(){return Y(this,"readUnsignedShort")}readInt(){return Y(this,"readInt")}readUnsignedInt(){return Y(this,"readUnsignedInt")}readFloat(){return Y(this,"readFloat")}readDouble(){return Y(this,"readDouble")}readUTF(){return Y(this,"readUTF")}readUTFBytes(A){return Y(this,"readUTFBytes",A)}readMultiByte(A,t){return Y(this,"readMultiByte",A,t)}readObject(){return Y(this,"readObject")}writeBoolean(...A){H(this,"writeBoolean",...A)}writeByte(...A){H(this,"writeByte",...A)}writeBytes(...A){H(this,"writeBytes",...A)}writeDouble(...A){H(this,"writeDouble",...A)}writeFloat(...A){H(this,"writeFloat",...A)}writeInt(...A){H(this,"writeInt",...A)}writeMultiByte(...A){H(this,"writeMultiByte",...A)}writeObject(...A){H(this,"writeObject",...A)}writeShort(...A){H(this,"writeShort",...A)}writeUnsignedInt(...A){H(this,"writeUnsignedInt",...A)}writeUTF(...A){H(this,"writeUTF",...A)}writeUTFBytes(...A){H(this,"writeUTFBytes",...A)}}),k),...(O={},j=t=>{if(null==t)throw A.rt.error("ArgumentError",2007,"name");let e=A.rt.toString(t);if(""===e)throw A.rt.error("ArgumentError",2085,"name");return e},QS(O,"flash.data::EncryptedLocalStore",class{static get isSupported(){return null!==A.encryptedStore}static setItem(t,e,g=!1){let i=j(t);if(null==e)throw A.rt.error("ArgumentError",2007,"data");let I=i3(A.rt,e),B=I.buffer.slice(0,I.length);0===B.length?A.encryptedStore?.removeItem(i):A.encryptedStore?.setItem(i,B)}static getItem(t){let e=A.encryptedStore?.getItem(j(t));if(!e||0===e.length)return null;let g=A.rt.construct(A.rt.classNamed("flash.utils::ByteArray")),i=i3(A.rt,g);return i.write(e),i.position=0,g}static removeItem(t){A.encryptedStore?.removeItem(j(t))}static reset(){A.encryptedStore?.reset()}}),O),...(QS(z={},"flash.display::NativeMenu",class{static get isSupported(){return A.air}"flash.display:NativeMenu::show"(t,e,g){let i=A.showMenu;if(!i||A.destroyed)return;let I=function(A,t,e){let g=A.rt,i=(A,t)=>g.getProperty(A,g.publicName(String(t))),I=g.toUint(g.prop(e,"length")),B=g.classNamed("flash.ui::ContextMenuItem"),Q=[],C=!1,r=!1;for(let s=0;s<I;s++){let I=i(e,s);if(g.prop(I,"isSeparator")){C=Q.length>0;continue}let o=g.isInstance(I,B),n=g.prop(I,"submenu"),E=!n&&g.prop(I,"enabled"),a=o&&g.prop(I,"separatorBefore");Q.push({caption:`${g.prop(I,"label")??""}${n?" ▸":""}`,enabled:E,separatorBefore:C||a,checked:g.prop(I,"checked")||void 0,select:()=>{E&&!r&&!A.destroyed&&(r=!0,A.clipboard.gesture(()=>{if(o)return void cL(A,I,g.construct(g.classNamed("flash.events::ContextMenuEvent"),"menuItemSelect",!1,!1,null,null));let e=[[I,I]],i=new Set;for(let A=t;A&&!i.has(A);A=g.prop(A,"parent"))i.add(A),e.push([A,A]);cZ(A,g.construct(g.classNamed("flash.events::Event"),"select",!0,!1),e)}),A.updates++)}}),C=!1}return Q}(A,this,t);I.length>0&&i(I,A.rt.toNumber(e),A.rt.toNumber(g))}}),z),...($={},_=(t,e)=>A.rt.construct(A.rt.classNamed("flash.geom::Point"),t,e),AA=!1,At=!1,Ae=null,Ag=null,Ai=t=>{let e=A.application?.window;if(!e||t!==Db.get(A))throw A.rt.unsupported("a NativeWindow a script opens");return e},AI=(A,t)=>{let e=Ai(A);e.setBounds?.({...e.bounds(),...t})},QS($,"flash.display::NativeWindow",class{static get isSupported(){return A.air}static get supportsMenu(){return!1}static get supportsNotification(){return!1}static get supportsTransparency(){return!1}static get systemMinSize(){return _(1,1)}static get systemMaxSize(){return _(0x6666666,0x6666666)}get stage(){return Ai(this),A.stage?.object??null}get title(){return Ai(this).title()}set title(A){Ai(this).setTitle?.(String(A))}get bounds(){let t=Ai(this).bounds();return A.rt.construct(A.rt.classNamed("flash.geom::Rectangle"),t.x,t.y,t.width,t.height)}set bounds(t){if(null===t)throw A.rt.error("TypeError",2007,"bounds");AI(this,{x:Number(A.rt.prop(t,"x")),y:Number(A.rt.prop(t,"y")),width:Number(A.rt.prop(t,"width")),height:Number(A.rt.prop(t,"height"))})}get x(){return Ai(this).bounds().x}set x(A){AI(this,{x:Number(A)})}get y(){return Ai(this).bounds().y}set y(A){AI(this,{y:Number(A)})}get width(){return Ai(this).bounds().width}set width(A){AI(this,{width:Number(A)})}get height(){return Ai(this).bounds().height}set height(A){AI(this,{height:Number(A)})}get displayState(){return Ai(this).displayState()}minimize(){A.fullScreen.set("normal"),Ai(this).minimize?.()}maximize(){Ai(this).maximize?.()}restore(){A.fullScreen.set("normal"),Ai(this).restore?.()}close(){let A=Ai(this);AA||(AA=!0,A.close?.())}get closed(){return Ai(this),AA}get visible(){return Ai(this).visible()}set visible(A){Ai(this).setVisible?.(!!A)}get active(){return Ai(this).active()}activate(){Ai(this).activate?.()}get systemChrome(){return Ai(this),"standard"}get transparent(){return Ai(this),!1}get type(){return Ai(this),"normal"}get minimizable(){return Ai(this),!0}get maximizable(){return Ai(this),!0}get resizable(){return Ai(this),!0}startMove(){return Ai(this),!1}startResize(){return Ai(this),!1}get minSize(){return Ai(this),Ae??=_(1,1)}set minSize(A){Ai(this),Ae=A}get maxSize(){return Ai(this),Ag??=_(0x6666666,0x6666666)}set maxSize(A){Ai(this),Ag=A}get alwaysInFront(){return Ai(this),At}set alwaysInFront(A){Ai(this),At=!!A}orderToFront(){return Ai(this),!1}orderToBack(){return Ai(this),!1}orderInFrontOf(A){return Ai(this),!1}orderInBackOf(A){return Ai(this),!1}globalToScreen(t){let e=Ai(this),g=e.bounds(),i=e.stageOffset();return _(g.x+i.x+Number(A.rt.prop(t,"x")),g.y+i.y+Number(A.rt.prop(t,"y")))}get menu(){return Ai(this),null}set menu(A){Ai(this)}notifyUser(A){Ai(this)}}),$),...(AB={},AQ=new WeakMap,AC=(t,e)=>Number(A.rt.prop(t,e)),Ar=t=>A.rt.construct(A.rt.classNamed("flash.geom::Rectangle"),t.x,t.y,t.width,t.height),As=()=>{let t=A.application?.screens?.();if(t&&t.length>0)return t;let e={x:0,y:0,width:A.screenCapabilities.screenResolutionX||1920,height:A.screenCapabilities.screenResolutionY||1080};return[{bounds:e,visibleBounds:e,colorDepth:32}]},Ao=t=>{let e=A.rt.classNamed("flash.display::Screen").$it,g=e.instance();return e.proto.$init.call(g),AQ.set(g,{screen:t,bounds:null,visibleBounds:null}),g},QS(AB,"flash.display::Screen",class{static get screens(){return A.rt.array(As().map(Ao))}static get mainScreen(){let A=As();return Ao(A.find(A=>A.main)??A[0])}static getScreensForRectangle(t){if(null==t)throw A.rt.error("TypeError",2007,"rect");let e={x:AC(t,"x"),y:AC(t,"y"),width:AC(t,"width"),height:AC(t,"height")};return A.rt.array(As().filter(A=>{var t;let g,i,I,B;return t=A.bounds,g=mh(e.x),i=mh(e.y),I=g+mh(e.width)|0,B=i+mh(e.height)|0,!(I<=g)&&!(B<=i)&&g<t.x+t.width&&I>t.x&&i<t.y+t.height&&B>t.y}).map(Ao))}get bounds(){let A=AQ.get(this);return A.bounds??=Ar(A.screen.bounds),A.bounds}get visibleBounds(){let A=AQ.get(this);return A.visibleBounds??=Ar(A.screen.visibleBounds),A.visibleBounds}get colorDepth(){let A;return(A=0|AQ.get(this).screen.colorDepth)>=24&&A<32?32:A}}),AB),...(QS(An={},"flash.events::Event",class{"flash.events:Event::ctor"(t,e,g){if(null==t)throw A.rt.error("TypeError",2007,"type");this.$type=String(t),this.$bubbles=!!e,this.$cancelable=!!g,this.$target=null,this.$currentTarget=null,this.$phase=2,this.$stopped=0,this.$prevented=!1}get type(){return this.$type}get bubbles(){return this.$bubbles}get cancelable(){return this.$cancelable}get target(){return this.$target}get currentTarget(){return this.$currentTarget}get eventPhase(){return this.$phase}stopPropagation(){this.$stopped=Math.max(this.$stopped,1)}stopImmediatePropagation(){this.$stopped=2}preventDefault(){this.$cancelable&&(this.$prevented=!0)}isDefaultPrevented(){return this.$prevented}}),An),...(QS(AE={},"flash.events::KeyboardEvent",class{get charCode(){return this.$charCode??0}set charCode(t){this.$charCode=A.rt.toUint(t)}get ctrlKey(){return this.$ctrlKey??!1}set ctrlKey(A){this.$ctrlKey=!!A}get altKey(){return this.$altKey??!1}set altKey(A){this.$altKey=!!A}get shiftKey(){return this.$shiftKey??!1}set shiftKey(A){this.$shiftKey=!!A}get commandKey(){return this.$commandKey??!1}set commandKey(A){this.$commandKey=!!A}updateAfterEvent(){A.updates++}}),QS(AE,"flash.events::TextEvent",class{"flash.events:TextEvent::copyNativeData"(A){}}),AE),...(QS(Aa={},"flash.events::TimerEvent",class{updateAfterEvent(){A.updates++,A.timers.renderAsked=!0}}),Aa),...(QS(Al={},"flash.events::MouseEvent",class{updateAfterEvent(){A.updates++}get localX(){return this.$mouseX??0/0}set localX(t){this.$mouseX=A.rt.toNumber(t)}get localY(){return this.$mouseY??0/0}set localY(t){this.$mouseY=A.rt.toNumber(t)}"flash.events:MouseEvent::getStageX"(t,e){return mM(A,this,t??this.$mouseX,e??this.$mouseY)[0]}"flash.events:MouseEvent::getStageY"(t,e){return mM(A,this,t??this.$mouseX,e??this.$mouseY)[1]}get movementX(){return this.$movementX??0}set movementX(t){this.$movementX=A.rt.toNumber(t)}get movementY(){return this.$movementY??0}set movementY(t){this.$movementY=A.rt.toNumber(t)}}),Al),...(QS(Ah={},"flash.events::TouchEvent",class{updateAfterEvent(){A.updates++}get localX(){return this.$touchX??0/0}set localX(t){this.$touchX=A.rt.toNumber(t)}get localY(){return this.$touchY??0/0}set localY(t){this.$touchY=A.rt.toNumber(t)}"flash.events:TouchEvent::getStageX"(t,e){return mM(A,this,t??this.$touchX,e??this.$touchY)[0]}"flash.events:TouchEvent::getStageY"(t,e){return mM(A,this,t??this.$touchX,e??this.$touchY)[1]}isToolButtonDown(){return!1}getSamples(){return 0}"flash.events:TouchEvent::privateGetSamples"(){return 0}"flash.events:TouchEvent::setSamples"(){}}),Ah),...(QS(Ac={},"flash.events::GestureEvent",class{updateAfterEvent(){A.updates++}get localX(){return this.$gestureX??0/0}set localX(t){this.$gestureX=A.rt.toNumber(t)}get localY(){return this.$gestureY??0/0}set localY(t){this.$gestureY=A.rt.toNumber(t)}"flash.events:GestureEvent::getStageX"(t,e){return mM(A,this,t??this.$gestureX,e??this.$gestureY)[0]}"flash.events:GestureEvent::getStageY"(t,e){return mM(A,this,t??this.$gestureX,e??this.$gestureY)[1]}}),Ac),...(QS(Aw={},"flash.events::PressAndTapGestureEvent",class{get tapLocalX(){return this.$tapX??0/0}set tapLocalX(t){this.$tapX=A.rt.toNumber(t)}get tapLocalY(){return this.$tapY??0/0}set tapLocalY(t){this.$tapY=A.rt.toNumber(t)}"flash.events:PressAndTapGestureEvent::getTapStageX"(t,e){return mM(A,this,t??this.$tapX,e??this.$tapY)[0]}"flash.events:PressAndTapGestureEvent::getTapStageY"(t,e){return mM(A,this,t??this.$tapX,e??this.$tapY)[1]}}),Aw),...(QS(Ad={},"flash.ui::Mouse",class{static hide(){A.mouseVisible=!1,A.pointer?.updateCursor()}static show(){A.mouseVisible=!0,A.pointer?.updateCursor()}static get supportsCursor(){return!0}static get supportsNativeCursor(){return!0}static get cursor(){return A.mouseCursor}static set cursor(t){if(null==t)throw A.rt.error("TypeError",2007,"cursor");let e=A.rt.toString(t);if(!Fa.has(e)&&!A.cursors.has(e))throw A.rt.error("ArgumentError",2008,"cursor");A.mouseCursor=e,A.pointer?.updateCursor()}static registerCursor(t,e){if(null==e)throw A.rt.error("TypeError",2007,"cursorData");if(null==t)throw A.rt.error("TypeError",2007,"name");let g=e.$cursorFrames;if(!g)return;let i=g.$a;if(0===i.length)throw A.rt.error("ArgumentError",2008,"cursorData");let I=e.$cursorHotX??0,B=e.$cursorHotY??0;if(I<0||I>31||B<0||B>31)throw A.rt.error("ArgumentError",2008,"hotSpot");for(let t of i){if(null==t)throw A.rt.error("ArgumentError",2004);let e=fb(A,t);if(e.width>32||e.height>32)throw A.rt.error("ArgumentError",2004)}let Q=fb(A,i[0]),C=fI(Q,{x:0,y:0,width:Q.width,height:Q.height},!0),r=Math.min(Math.floor(I)||0,Q.width-1),s=Math.min(Math.floor(B)||0,Q.height-1),o=`data:image/png;base64,${btoa(String.fromCharCode(...C))}`;A.cursors.set(A.rt.toString(t),`url("${o}") ${r} ${s}, default`),A.pointer?.updateCursor()}static unregisterCursor(t){if(null==t)throw A.rt.error("TypeError",2007,"name");let e=A.rt.toString(t);A.cursors.delete(e)&&A.mouseCursor===e&&(A.mouseCursor="auto"),A.pointer?.updateCursor()}}),QS(Ad,"flash.ui::MouseCursorData",class{get data(){return this.$cursorFrames??null}set data(A){this.$cursorFrames=A}get hotSpot(){return A.rt.construct(A.rt.classNamed("flash.geom::Point"),this.$cursorHotX??0,this.$cursorHotY??0)}set hotSpot(t){if(null==t)throw A.rt.error("TypeError",2007,"hotSpot");this.$cursorHotX=A.rt.toNumber(A.rt.prop(t,"x")),this.$cursorHotY=A.rt.toNumber(A.rt.prop(t,"y"))}get frameRate(){return this.$cursorFrameRate??0}set frameRate(t){let e=A.rt.toNumber(t);this.$cursorFrameRate=e<0?0:e}}),Ad),...(QS(AG={},"flash.ui::Multitouch",class{static get inputMode(){return A.inputMode}static set inputMode(t){if(null==t)throw A.rt.error("TypeError",2007,"inputMode");let e=A.rt.toString(t);if(!Fl.has(e))throw A.rt.error("ArgumentError",2008,"inputMode");A.maxTouchPoints>0&&(A.inputMode=e)}static get supportsTouchEvents(){return A.maxTouchPoints>0}static get supportsGestureEvents(){return!1}static get supportedGestures(){return null}static get maxTouchPoints(){return A.maxTouchPoints}static get mapTouchToMouse(){return A.mapTouchToMouse}static set mapTouchToMouse(t){A.mapTouchToMouse=!!t}}),AG),...Dv(A),...(QS(AF={},"flash.display::DisplayObject",class{get name(){return this.$display.name}set name(t){if(null==t)throw A.rt.error("TypeError",2007,"name");if(this.$display.placeFrame>0)throw A.rt.error("flash.errors::IllegalOperationError",2078);this.$display.name=t}get visible(){return this.$display.visible}set visible(A){this.$display.visible=!!A,this.$display.invalidate(1),A||this.$display.focusDrop?.(this.$display)}get x(){return this.$display instanceof EM&&this.$display.settle(),f_(this.$display.matrix.tx,fz(this.$display)[0])}set x(A){let t=fz(this.$display)[0];if(this.$display.space){this.$display.touch(),this.$display.set3D("x",f_(Number(A)||0,-t));return}f1(this.$display,e=>{e.tx=f_(f$(Number(A)),-t)})}get y(){return this.$display instanceof EM&&this.$display.settle(),f_(this.$display.matrix.ty,fz(this.$display)[1])}set y(A){let t=fz(this.$display)[1];if(this.$display.space){this.$display.touch(),this.$display.set3D("y",f_(Number(A)||0,-t));return}f1(this.$display,e=>{e.ty=f_(f$(Number(A)),-t)})}get scaleX(){return this.$display.scaleX}set scaleX(A){this.$display.touch(),this.$display.setScaleX(Number(A))}get scaleY(){return this.$display.scaleY}set scaleY(A){this.$display.touch(),this.$display.setScaleY(Number(A))}get rotation(){return this.$display.rotation}set rotation(A){this.$display.touch(),this.$display.setRotation(Number(A))}get z(){return this.$display.space?.z??0}set z(A){this.$display.touch(),this.$display.set3D("z",Number(A))}get rotationX(){return this.$display.space?.rotationX??0}set rotationX(A){this.$display.touch(),this.$display.set3D("rotationX",Number(A))}get rotationY(){return this.$display.space?.rotationY??0}set rotationY(A){this.$display.touch(),this.$display.set3D("rotationY",Number(A))}get rotationZ(){return this.$display.space?this.$display.rotation:0}set rotationZ(A){this.$display.touch(),this.$display.set3D("rotationZ",Number(A))}get scaleZ(){return this.$display.space?.scaleZ??1}set scaleZ(A){this.$display.touch(),this.$display.set3D("scaleZ",Number(A))}get alpha(){return this.$display.colorTransform?.aMul??1}set alpha(A){let t=this.$display;t.touch(),t.colorTransform={...t.colorTransform??f2,aMul:Number(A)},t.invalidate(1)}get parent(){let A=this.$display.parent;return A instanceof Eq?null:A?.object??null}get stage(){return!function(A,t){for(let e=t;e;e=e.parent)if(e===A.stage)return!0;return!1}(A,this.$display)?null:A.stage?.object??null}get root(){return nt(this.$display)?.object??null}get loaderInfo(){return this.$display===A.stage?A.root?.loaderInfo??null:nt(this.$display)?.loaderInfo??null}get mouseX(){let t=oC(as(this.$display,A.stage));return t?or(t,A.mouseStageX,A.mouseStageY)[0]:0}get mouseY(){let t=oC(as(this.$display,A.stage));return t?or(t,A.mouseStageX,A.mouseStageY)[1]:0}get width(){return fO(this.$display)[0]}set width(A){let t=Number(A);if(!(t>=0))return;let e=this.$display;if(e.touch(),e instanceof EM){e.width=t/(Math.abs(e.scaleX)||1),e.invalidate(4),e.deferFit();return}let g=an(e,!0),i=g?fP(g.xMax-g.xMin):0,I=0===e.rotation&&0===e.skew?i:fO(e)[0];I>0?0===e.rotation&&0===e.skew?e.setScaleX(t/i):e.setScaleX(e.scaleX*t/I):(e.setScaleX(0),null===g&&e.setScaleY(0))}get height(){return fO(this.$display)[1]}set height(A){let t=Number(A);if(!(t>=0))return;let e=this.$display;if(e.touch(),e instanceof EM){e.height=t/(Math.abs(e.scaleY)||1),e.invalidate(4),e.deferFit();return}let g=an(e,!0),i=g?fP(g.yMax-g.yMin):0,I=0===e.rotation&&0===e.skew?i:fO(e)[1];I>0?0===e.rotation&&0===e.skew?e.setScaleY(t/i):e.setScaleY(e.scaleY*t/I):(e.setScaleY(0),null===g&&e.setScaleX(0))}getBounds(t){return fj(A,af(this.$display,t?.$display??null,A.stage,!0))}getRect(t){return fj(A,af(this.$display,t?.$display??null,A.stage,!1))}"flash.display:DisplayObject::_hitTest"(t,e,g,i,I){if(t)return aG(this.$display,Number(e),Number(g),!!i,A.root);let B=I?.$display;return!!B&&aL(this.$display,B,A.stage)}get blendMode(){return this.$display.blendMode}set blendMode(t){let e=A.rt.toString(t);if(!fX.has(e))throw A.rt.error("ArgumentError",2008,"blendMode");this.$display.touch(),this.$display.setBlendMode(e)}set blendShader(t){if(null==t)throw A.rt.error("TypeError",2007,"blendShader");if(!fy(t))throw A.rt.error("TypeError",2007,"data");this.$display.touch(),this.$display.setBlendShader(fS(A,t,2))}get cacheAsBitmap(){return this.$display.cachedAsBitmap||this.$display.filters.length>0}set cacheAsBitmap(A){this.$display.setCachedAsBitmap(!!A)}get cacheAsBitmapMatrix(){return this.$cacheAsBitmapMatrix??null}set cacheAsBitmapMatrix(A){this.$cacheAsBitmapMatrix=A}get filters(){return A.rt.array(this.$display.filters.map(t=>{let e=A.rt.construct(A.rt.classNamed(fQ(t.kind)));return e.$filter=og(t),e}))}set filters(t){let e=(t?t.$a??[]:[]).map(t=>{let e=t&&"object"==typeof t?fC(A.rt,t):null;if(!e)throw A.rt.error("ArgumentError",2005,0,"Filter");let g=og(fr(t,e));if("displacementMap"===g.kind&&g.mapBitmap&&(g.mapSnapshot=fx(A,g.mapBitmap)),"shader"===g.kind){if(!fy(g.shader))throw A.rt.error("ArgumentError",2171);g.shaderUse=fS(A,g.shader,1)}return g});this.$display.touch(),this.$display.filters=e,this.$display.invalidate(1)}get mask(){return this.$display.mask?.object??null}set mask(A){let t=A?.$display??null;this.$display.setMask(t)}get metaData(){return this.$metaData??null}set metaData(A){this.$metaData=A}get opaqueBackground(){return this.$opaqueBackground??null}set opaqueBackground(t){this.$display.touch(),this.$opaqueBackground=null==t?null:A.rt.toUint(t)}get scale9Grid(){let t=this.$display.scale9Grid;return t?A.rt.construct(A.rt.classNamed("flash.geom::Rectangle"),Math.trunc(t.xMin),Math.trunc(t.yMin),Math.trunc(t.xMax-t.xMin),Math.trunc(t.yMax-t.yMin)):null}set scale9Grid(t){let e=this.$display;if(e.touch(),e.invalidate(4),!t){e.scale9Grid=null;return}let[g,i,I,B]=["x","y","width","height"].map(e=>Number(A.rt.prop(t,e))),[Q,C]=[Math.trunc(g),Math.trunc(i)];if(e.scale9Grid={xMin:Q,yMin:C,xMax:Q+Math.trunc(I),yMax:C+Math.trunc(B)},!ae(at(e),{xMin:g,yMin:i,xMax:g+I,yMax:i+B}))throw A.rt.error("ArgumentError",2004)}get scrollRect(){let t=this.$display.scrollRect;return t?fj(A,t):null}set scrollRect(t){this.$display.touch();let e=null;if(t){let[g,i,I,B]=["x","y","width","height"].map(e=>Number(A.rt.prop(t,e)));e={xMin:fW(g),yMin:fW(i),xMax:fW(g+I),yMax:fW(i+B)}}this.$display.scrollRect=e,A.scrolled.add(this.$display)}get accessibilityProperties(){return this.$accessibilityProperties??null}set accessibilityProperties(A){this.$accessibilityProperties=A}localToGlobal(t){let e=as(this.$display,A.stage),[g,i]=or(e,Number(A.rt.prop(t,"x")),Number(A.rt.prop(t,"y")));return oB(e)?fq(A,Math.round(g)+0,Math.round(i)+0):fq(A,g,i)}globalToLocal(t){let[e,g]=fT(A,this.$display,t);return oB(as(this.$display,A.stage))?fq(A,Math.round(20*e)/20+0,Math.round(20*g)/20+0):fq(A,e,g)}local3DToGlobal(t){let e=e=>Number(A.rt.prop(t,e)),[g,i]=function(A,t,e,g,i){var I,B,Q;let C,r,s=oZ(A),o=s&&oX(A,s);if(!s||!o)return or(A.placed,t,e);let[n,E,a]=(I=o[0]*t+o[4]*e+o[8]*g+o[12],B=o[1]*t+o[5]*e+o[9]*g+o[13],Q=o[2]*t+o[6]*e+o[10]*g+o[14],r=1/ox((C=oK(s)).fieldOfView,s),[I+C.centerX*r*Q,B+C.centerY*r*Q,1+r*Q]),l=[n/a,E/a];for(let A=s;A&&A!==i;A=A.parent)l=or(A.placed,l[0],l[1]);return l}(this.$display,e("x"),e("y"),e("z"),A.stage);return fq(A,Math.round(4*g)/4,Math.round(4*i)/4)}globalToLocal3D(t){let[e,g]=fT(A,this.$display,t);return A.rt.construct(A.rt.classNamed("flash.geom::Vector3D"),e,g,0)}get transform(){return this.$transform||(this.$transform=A.rt.construct(A.rt.classNamed("flash.geom::Transform"),this)),this.$transform}set transform(t){if(t){let e=t.$display;e.space?this.$display.setMatrix3D(e.space.shown):this.$display.setMatrix(fw(A,A.rt.getProperty(t,fv))),this.$display.colorTransform=fu(A,A.rt.getProperty(t,fV)),this.$display.touch(),this.$display.invalidate(1)}}}),AF),...(QS(AR={},"flash.display::AVM1Movie",class{get"flash.display:AVM1Movie::_interopAvailable"(){return!1}"flash.display:AVM1Movie::_callAS2"(){}"flash.display:AVM1Movie::_setCallAS3"(){}}),AR),...(Ay={},Ab=(A,t)=>{let e=null==t?null:t;A.$bitmapData=e;let g=A.$display;g.store=e?.$store??null,g.invalidate(4)},AU=(t,e)=>{let g=null==e?"auto":A.rt.toString(e);if("auto"!==g&&"always"!==g&&"never"!==g)throw A.rt.error("ArgumentError",2008,"pixelSnapping");t.$display.pixelSnapping=g},AY=(A,t)=>{let e=A.$display;e.smoothing=!!t,e.invalidate(4)},QS(Ay,"flash.display::Bitmap",class{"flash.display:Bitmap::ctor"(t,e,g){let i=this.$display.character;Ab(this,null==t&&i?A.symbols.bitmapDataOf(i):t),AU(this,e),AY(this,g)}get bitmapData(){return this.$bitmapData??null}set bitmapData(A){Ab(this,A)}get pixelSnapping(){return this.$display.pixelSnapping}set pixelSnapping(A){AU(this,A)}get smoothing(){return this.$display.smoothing}set smoothing(A){AY(this,A)}}),Ay),...(AH={},AL=t=>{let e=t&&"object"==typeof t?fC(A.rt,t):null;if(!e)throw A.rt.error("TypeError",2007,"filter");return fr(t,e)},QS(AH,"flash.display::BitmapData",class{"flash.display:BitmapData::ctor"(t,e,g,i){let I=this.$symbol;if(I){this.$store=nK.of(I.pixels??EY);return}let B=A.rt.toInt(t),Q=A.rt.toInt(e);if(B<1||Q<1||B>0x6666666||Q>0x6666666||B*Q>0x1ffc3ff8)throw A.rt.error("ArgumentError",2015);try{this.$store=new nK(B,Q,void 0===g||!!g,A.rt.toUint(void 0===i?0xffffffff:i))}catch(t){if(t instanceof RangeError)throw A.rt.error("ArgumentError",2015);throw t}}get width(){return fY(A,this).width}get height(){return fY(A,this).height}get transparent(){return fY(A,this).transparent}get rect(){let t=fY(A,this);return A.rt.construct(A.rt.classNamed("flash.geom::Rectangle"),0,0,t.width,t.height)}getPixel(t,e){return fb(A,this).getPixel(A.rt.toInt(t),A.rt.toInt(e))}getPixel32(t,e){return fb(A,this).getPixel32(A.rt.toInt(t),A.rt.toInt(e))}setPixel(t,e,g){fb(A,this).setPixel(A.rt.toInt(t),A.rt.toInt(e),A.rt.toUint(g))}setPixel32(t,e,g){fb(A,this).setPixel32(A.rt.toInt(t),A.rt.toInt(e),A.rt.toUint(g))}fillRect(t,e){fb(A,this).fillRect(fH(A,t),A.rt.toUint(e))}clone(){let t=fb(A,this),e=A.rt.construct(A.rt.classNamed("flash.display::BitmapData"),t.width,t.height,t.transparent,0);return e.$store=t.clone(),e}dispose(){let A=this.$store;A&&!A.disposed&&A.dispose()}copyPixels(t,e,g,i,I,B){let Q=fb(A,this);if(null==t)throw A.rt.error("TypeError",2007,"sourceBitmapData");let C=fb(A,t),r=fH(A,e),[s,o]=fL(A,g,"destPoint"),n=null==i?null:fb(A,i),[E,a]=null==I?[0,0]:fL(A,I,"alphaPoint");Q.copyPixels(C,r,s,o,!!B,n,E,a)}applyFilter(t,e,g,i){let I=fb(A,this),B=fZ(A,t),Q=fH(A,e),[C,r]=fL(A,g,"destPoint"),s=AL(i);if("shader"===s.kind){if(!fy(s.shader))throw A.rt.error("ArgumentError",2171);let t=fS(A,s.shader,1,0);!function(A,t,e,g,i,I,B,Q){let[C,r,s,o]=I,n=g-2*e.x-C,E=i-2*e.y-r,a=Math.max(0,n),l=Math.max(0,E),h=Math.min(A.width,n+t.width+C+s),c=Math.min(A.height,E+t.height+r+o);if(h<=a||c<=l)return;let w=new Map(B.images),d=B.kernel.inputs[0];w.set(d.index,{width:t.width,height:t.height,pixels:t.readable,channels:d.channels,clear:!0});let u=h-a,D=c-l,f=Q.channels,m=new Float32Array(u*D*f);Q.run(B.values,w,u,D,m,a-C,l-r);let G=A.pixels;for(let t=0,e=0;t<D;t++)for(let g=0;g<u;g++,e+=f)G[(l+t)*A.width+a+g]=ft(m,e,f,A.transparent);A.changed()}(I,B,Q,C,r,s.extensions,t,ff(t.kernel));return}if(!I.transparent&&hI.has(s.kind))throw A.rt.error("flash.errors::IllegalOperationError",2077);switch(hh(Q,s,{x:0,y:0,width:B.width,height:B.height})){case 2015:throw A.rt.error("ArgumentError",2015);case 2077:throw A.rt.error("flash.errors::IllegalOperationError",2077)}let o="displacementMap"===s.kind&&s.mapBitmap?fb(A,s.mapBitmap):null;if(!hc(I,B,Q,C,r,s,o))throw A.rt.unsupported(`BitmapData.applyFilter with a ${s.kind} filter`)}generateFilterRect(t,e){let g=fb(A,this),i=AL(e);if("shader"===i.kind){fH(A,t);let[e,I,B,Q]=i.extensions;return A.rt.construct(A.rt.classNamed("flash.geom::Rectangle"),-e,-I,g.width+e+B,g.height+I+Q)}if(!hB.has(i.kind))throw A.rt.unsupported(`BitmapData.generateFilterRect with a ${i.kind} filter`);let I=hE(g.width,g.height,fH(A,t),i);return A.rt.construct(A.rt.classNamed("flash.geom::Rectangle"),I.x,I.y,I.width,I.height)}getPixels(t){let e=fb(A,this),g=A.rt.construct(A.rt.classNamed("flash.utils::ByteArray"));return fU(e,fH(A,t),g.$bytes),g}copyPixelsToByteArray(t,e){let g=fb(A,this);if(null==e)throw A.rt.error("TypeError",2007,"data");fU(g,fH(A,t),e.$bytes)}encode(t,e,g){var i;let I,B=fb(A,this);if(null==t)throw A.rt.error("TypeError",2007,"rectangle");if(null==e)throw A.rt.error("TypeError",2007,"compressor");let Q=t=>A.rt.isInstance(e,A.rt.classNamed(t)),C=Q("flash.display::JPEGEncoderOptions"),r=!C&&Q("flash.display::JPEGXREncoderOptions");if(!C&&!r&&!Q("flash.display::PNGEncoderOptions"))throw A.rt.error("ArgumentError",2004);let s=B.clip(fH(A,t));if(!s)throw A.rt.error("ArgumentError",2006);let o=C?Number(A.rt.prop(e,"quality")):r?Number(A.rt.prop(e,"quantization")):0;if(!(o>=0&&o<=100))throw A.rt.error("RangeError",2006);if(r){let t=A.rt.prop(e,"colorSpace");if(null==t)throw A.rt.error("TypeError",2007,"colorspace");if(!Object.hasOwn(D3,t))throw A.rt.error("ArgumentError",2004);let g=Number(A.rt.prop(e,"trimFlexBits"));if(!(g>=0&&g<=255))throw A.rt.error("RangeError",2006);if(g>15&&!B.transparent)throw A.rt.error("Error",3699);i=B.transparent?0:g,I=function(A,t,e,g){let{alpha:i,quantization:I,subsampling:B,trimFlexBits:Q}=g;if(A.length!==t*e)throw RangeError(`${A.length} pixels are no ${t} by ${e}`);if(!(t>=1&&t<=65536&&e>=1&&e<=65536)||!(Number.isInteger(I)&&I>=0&&I<=100)||!(Number.isInteger(Q)&&Q>=0&&Q<=15)||3!==B&&2!==B&&1!==B)throw RangeError(`no JPEG XR of ${t} by ${e} pixels with ${JSON.stringify(g)}`);let C=D2.call(g=>{g.reset();let C=g.alloc(16*t*4);if(0===C||0!==g.encodeBegin(t,e,+!!i,I,B,Q))return null;for(let i=0;i<e;i+=16){let I=Math.min(16,e-i);if(new Uint32Array(g.memory.buffer,C,t*I).set(A.subarray(i*t,(i+I)*t)),0!==g.encodeRows(C,I))return null}return 0!==g.encodeEnd()?null:new Uint8Array(g.memory.buffer,g.resultPointer(),g.resultSize()).slice()});if(null===C)throw D2.drop(),RangeError(`no memory to encode ${t} by ${e} pixels as JPEG XR`);return C}(D1(B,s),s.width,s.height,{alpha:B.transparent,quantization:o,subsampling:D3[t],trimFlexBits:i})}else I=C?function(A,t,e,g){if(A.length!==t*e)throw RangeError(`${A.length} pixels are no ${t} by ${e}`);if(!(t>=1&&t<=65535&&e>=1&&e<=65535)||!(g>=0&&g<=100))throw RangeError(`no JPEG of ${t} by ${e} pixels at quality ${g}`);return F(i=>{let I=R(i,new Uint8Array(A.buffer,A.byteOffset,A.byteLength)),B=0===I||0!==i.jpegEncode(I,t,e,g)?null:y(i,0);if(null===B)throw RangeError(`no memory to encode ${t} by ${e} pixels as a JPEG`);return B})}(D1(B,s),s.width,s.height,o):fI(B,s,!!A.rt.prop(e,"fastCompression"));let n=null==g?A.rt.construct(A.rt.classNamed("flash.utils::ByteArray")):g;return n.$bytes.write(I),n}setPixels(t,e){let g=fb(A,this),i=fH(A,t);if(null==e)throw A.rt.error("TypeError",2007,"inputByteArray");let I=g.clip(i);if(!I)return;let B=e.$bytes,Q=I.width*I.height,C=Math.min(Q,Math.floor(B.available/4));g.setWords(I,B.buffer,B.position,C,B.littleEndian),B.position=B.position+4*C>>>0,C<Q&&B.checkEOF(4)}getVector(t){let e=fb(A,this),g=A.rt.resolve(A.rt.vector("uint")).$it.instance();return g.$a=e.getVector(fH(A,t)),g}setVector(t,e){let g=fb(A,this),i=fH(A,t);if(null==e)throw A.rt.error("TypeError",2007,"imputVector");let I=g.clip(i);if(!I)return;let B=e.$a;if(B.length<I.width*I.height)throw A.rt.error("RangeError",2006);g.setVector(I,B)}noise(t,e,g,i,I){hf(fb(A,this),A.rt.toInt(t),void 0===e?0:A.rt.toUint(e),void 0===g?255:A.rt.toUint(g),void 0===i?7:A.rt.toUint(i),!!I)}copyChannel(t,e,g,i,I){let B=fb(A,this),Q=fZ(A,t),C=fH(A,e,!0),[r,s]=fL(A,g,"destPoint");hG(B,Q,C,r,s,A.rt.toUint(i),A.rt.toUint(I))}perlinNoise(t,e,g,i,I,B,Q=7,C=!1,r=null){let s=fb(A,this),o=r?.$a,n=A.rt.classNamed("flash.geom::Point"),E=(t,e)=>A.rt.toNumber(A.rt.prop(t,e)),a=Array.from({length:Math.min(A.rt.toUint(g),1024)},(t,e)=>{let g=o?.[e];return g&&A.rt.isInstanceOf(g,n.$it)?[E(g,"x"),E(g,"y")]:[0,0]});hJ(s,[A.rt.toNumber(t),A.rt.toNumber(e)],a,A.rt.toInt(i),!!I,!!B,A.rt.toUint(Q),!!C)}paletteMap(t,e,g,i=null,I=null,B=null,Q=null){let C=fb(A,this),r=fZ(A,t);if(null==e)throw A.rt.error("TypeError",2007,"sourceRect");let s=fH(A,e,!0),[o,n]=fL(A,g,"destPoint"),E=(t,e)=>Uint32Array.from({length:256},(g,i)=>null==t?i<<e:A.rt.toUint(A.rt.getProperty(t,A.rt.publicName(i))));hp(C,r,s,o,n,[E(i,16),E(I,8),E(B,0),E(Q,24)])}compare(t){if(null==t)throw A.rt.error("TypeError",2007,"otherBitmapData");let e=this.$store;if(!e||e.disposed)return -1;let g=fb(A,t);if(g.width!==e.width)return -3;if(g.height!==e.height)return -4;let i=hM(e,g);if(!i)return 0;let I=A.rt.construct(A.rt.classNamed("flash.display::BitmapData"),e.width,e.height,!0,0);return I.$store.pixels.set(i),I.$store.changed(),I}colorTransform(t,e){let g=fb(A,this),i=fH(A,t);if(null==e)throw A.rt.error("TypeError",2007,"colorTransform");i.height|=0,hF(g,i,fu(A,e))}merge(t,e,g,i,I,B,Q){let C=fb(A,this),r=fZ(A,t),s=fH(A,e,!0),[o,n]=fL(A,g,"destPoint");hR(C,r,s,o,n,[i,I,B,Q].map(t=>A.rt.toUint(t)))}scroll(t,e){hk(fb(A,this),A.rt.toInt(t),A.rt.toInt(e))}threshold(t,e,g,i,I,B,Q,C){let r=fb(A,this),s=fZ(A,t),o=fH(A,e,!0),[n,E]=fL(A,g,"destPoint");if(null==i)throw A.rt.error("TypeError",2007,"operation");let a=A.rt.toString(i);if(!hS(a))throw A.rt.error("ArgumentError",2005,3);return hb(r,s,o,n,E,a,A.rt.toUint(I),A.rt.toUint(B),void 0===Q?0xffffffff:A.rt.toUint(Q),!!C)}getColorBoundsRect(t,e,g){let i=hU(fb(A,this),A.rt.toUint(t),A.rt.toUint(e),void 0===g||!!g);return A.rt.construct(A.rt.classNamed("flash.geom::Rectangle"),i.x,i.y,i.width,i.height)}floodFill(t,e,g){hY(fb(A,this),A.rt.toInt(t),A.rt.toInt(e),A.rt.toUint(g))}histogram(t){let e=fb(A,this),g=function(A,t){let e=[0,1,2,3].map(()=>Array(256).fill(0)),g=A.clip(t);if(!g)return e;for(let t=g.y;t<g.y+g.height;t++)for(let i=g.x;i<g.x+g.width;i++){let g=nN(A.pixels[t*A.width+i]);e[0][g>>>16&255]++,e[1][g>>>8&255]++,e[2][255&g]++,e[3][g>>>24]++}return e}(e,null==t?{x:0,y:0,width:e.width,height:e.height}:fH(A,t)),i=A.rt.resolve(A.rt.vector("Number")),I=A.rt.applyType(A.rt.classNamed("__AS3__.vec::Vector"),[i]).$it.instance();return I.$a=g.map(A=>{let t=i.$it.instance();return t.$a=A,t}),I}hitTest(t,e,g,i,I){let B=fb(A,this),[Q,C]=fL(A,t,"firstPoint");if(Q+B.width>0x7fffffff||C+B.height>0x7fffffff)throw A.rt.error("ArgumentError",1508,"firstPoint");let r=A.rt.toUint(e);if(null==g)throw A.rt.error("ArgumentError",2005,2);let s=A.rt.traitsOf(g).name,o=void 0!==g.$store?g:g.$display?.store!==void 0?g.$bitmapData??null:null,n="flash.geom::Point"===s,E="flash.geom::Rectangle"===s;if(n||E){let t=E?fH(A,g):null,[e,i]=n?fL(A,g,"secondObject"):[0,0],I=(t?t.x:e)-Q,s=(t?t.y:i)-C,o=t?t.width:1,a=t?t.height:1;for(let A=Math.max(0,s);A<Math.min(B.height,s+a);A++)for(let t=Math.max(0,I);t<Math.min(B.width,I+o);t++){let e=hH(B,t,A);if(e>0&&e>=r)return!0}return!1}if(o){let t=fb(A,o),[e,g]=fL(A,i,"secondBitmapDataPoint");if(e+t.width>0x7fffffff||g+t.height>0x7fffffff)throw A.rt.error("ArgumentError",1508,"secondBitmapDataPoint");let s=void 0===I?1:A.rt.toUint(I),n=e-Q,E=g-C;for(let A=Math.max(0,E);A<Math.min(B.height,E+t.height);A++)for(let e=Math.max(0,n);e<Math.min(B.width,n+t.width);e++)if(hH(B,e,A)>=r&&hH(t,e-n,A-E)>=s)return!0;return!1}throw A.rt.error("ArgumentError",2005,2)}pixelDissolve(t,e,g,i,I,B){let Q=fb(A,this);if(null==t||void 0===t.$store)throw A.rt.error("TypeError",2007,"sourceBitmapData");let C=fb(A,t);if(null==e)throw A.rt.error("TypeError",2007,"sourceRect");let r=fH(A,e,!0),[s,o]=fL(A,g,"destPoint"),n=void 0===I?0:A.rt.toInt(I);if(n<0)throw A.rt.error("RangeError",2027,"numPixels",n);return hK(Q,C,r,s,o,void 0===i?0:A.rt.toInt(i),n,void 0===B?0:A.rt.toUint(B))}draw(t,e,g,i,I,B){fK(A,fb(A,this),t,e,g,i,I,B)}drawWithQuality(t,e,g,i,I,B,Q){fK(A,fb(A,this),t,e,g,i,I,B,function(A,t){if(null==t)return 4;switch(A.rt.toString(t).toLowerCase()){case"low":return 1;case"medium":return 2;default:return 4}}(A,Q))}lock(){fb(A,this)}unlock(){fb(A,this)}}),AH),...f3(A),...function(A){let t={};function e(t){if(null==t)return null;let e=e=>A.rt.toNumber(A.rt.prop(t,e)),g=e("x"),i=e("y"),I=g+e("width"),B=i+e("height");return{xMin:Math.min(g,I),yMin:Math.min(i,B),xMax:Math.max(g,I),yMax:Math.max(i,B)}}return QS(t,"flash.display::Sprite",class{get graphics(){return ms(A,this)}"flash.display:Sprite::constructChildren"(){let A=this.$display;A instanceof EN&&A.enterFirstFrame()}get soundTransform(){return my(A,this.$soundMix??cX(null))}set soundTransform(t){if(null==t)throw A.rt.error("TypeError",2007,"soundTransform");this.$soundMix=mF(cX(t)),c9(cO(A))}get buttonMode(){return this.$buttonMode??!1}set buttonMode(A){this.$buttonMode=!!A}get useHandCursor(){return this.$useHandCursor??!0}set useHandCursor(A){this.$useHandCursor=!!A}get hitArea(){var A;return(A=this.$display,u5.get(A)??null)?.object??null}set hitArea(A){var t,e;t=this.$display,e=A?.$display??null,oT.changes++,e?u5.set(t,e):u5.delete(t)}get dropTarget(){var A;return(A=this.$display,aZ.get(A)??null)?.object??null}startDrag(t,g){A.pointer?.startDrag(this.$display,!!t,e(g))}stopDrag(){A.pointer?.stopDrag()}startTouchDrag(t,g,i){let I=A.rt.toInt(t);A.pointer?.startTouchDrag(this.$display,I,!!g,e(i),A.touch?.at(I)??null)}stopTouchDrag(t){let e=A.rt.toInt(t);A.pointer?.stopTouchDrag(e,A.touch?.at(e)??null)}}),t}(A),...(AZ={},AK=A=>{let t=A.timeline.scenes,e=Math.max(1,A.currentFrame),g=0;for(;g+1<t.length&&t[g+1].frame<=e;)g++;return g},Ax=(A,t)=>{let e=A.timeline.scenes;return[e[t].frame,t+1<e.length?e[t+1].frame:A.totalFrames+1]},Av=(A,t,e)=>{let[g,i]=Ax(A,t),I=t+1===A.timeline.scenes.length;return e.filter(A=>A.frame>=g&&(I||A.frame<i))},AV=(t,e)=>{let[g,i]=Ax(t,e),I=A.rt.classNamed("flash.display::FrameLabel"),B=Av(t,e,t.timeline.labels).map(t=>A.rt.construct(I,t.name,t.frame-g+1));return A.rt.construct(A.rt.classNamed("flash.display::Scene"),t.timeline.scenes[e].name,A.rt.array(B),i-g)},AX=(t,e,g)=>{let i=t.timeline.scenes,I=AK(t);if(null!=g){let t=A.rt.toString(g);if((I=i.findIndex(A=>A.name===t))<0)throw A.rt.error("ArgumentError",2108,t)}let B=Ax(t,I)[0];if("string"==typeof e&&!/^\d+$/.test(e)){let g=Av(t,I,t.timeline.gotoLabels).find(A=>A.name===e);if(g)return g.frame;if(""!==i[I].name||i.length>1)throw A.rt.error("ArgumentError",2109,e,i[I].name)}return B+A.rt.toInt(e)-1},AW=(t,e,g)=>{(t.library.version??10)<=9&&(t.skipsAfter=A.frames),A.inFrameScript===t?(t.queuedGoto=e,t.queuedPlay=g):(t.playing=g,t.gotoFrame(e),A.gotoCycle(t))},QS(AZ,"flash.display::MovieClip",class{addFrameScript(...t){let e=this.$display;for(let g=0;g+1<t.length;g+=2){let i=t[g+1],I=A.rt.isInstanceOf(i,A.rt.functionTraits);e.setFrameScript(A.rt.toInt(t[g])+1,I?i:null)}}get currentFrame(){let A=this.$display;return Math.max(1,A.currentFrame)-Ax(A,AK(A))[0]+1}get totalFrames(){return this.$display.totalFrames}get framesLoaded(){return this.$display.totalFrames}get currentLabel(){let A=this.$display,t=null;for(let e of A.timeline.labels){if(e.frame>A.currentFrame)break;t=e.name}return t}get currentFrameLabel(){return this.$display.timeline.frameLabels.get(this.$display.currentFrame)??null}get scenes(){let t=this.$display;return A.rt.array(t.timeline.scenes.map((A,e)=>AV(t,e)))}get currentScene(){let A=this.$display;return AV(A,AK(A))}prevScene(){let A=this.$display;AW(A,Ax(A,Math.max(0,AK(A)-1))[0],!0)}nextScene(){let A=this.$display,t=AK(A);AW(A,Ax(A,Math.min(A.timeline.scenes.length-1,t+1))[0],!0)}get isPlaying(){return this.$display.playing}play(){this.$display.playing=!0}stop(){this.$display.playing=!1}nextFrame(){let A=this.$display;AW(A,A.currentFrame+1,!1)}prevFrame(){let A=this.$display;AW(A,A.currentFrame-1,!1)}gotoAndPlay(A,t=null){let e=this.$display;AW(e,AX(e,A,t),!0)}gotoAndStop(A,t=null){let e=this.$display;AW(e,AX(e,A,t),!1)}get enabled(){return this.$enabled??!0}set enabled(A){this.$enabled=!!A}get trackAsMenu(){return!1}set trackAsMenu(A){}}),QS(AZ,"flash.display::FrameLabel",class{"flash.display:FrameLabel::ctor"(t,e){this.$name=A.rt.toString(t),this.$frame=A.rt.toInt(e)}get name(){return this.$name}get frame(){return this.$frame}}),AZ),...function(A){let t={},e=!0,g="default",i=null,I=(t,e,g=!1)=>{let i=A.rt.applyType(A.rt.classNamed("__AS3__.vec::Vector"),[A.rt.classNamed(t)]).$it.instance();return i.$a=[...e],i.$fixed=g,i};QS(t,"flash.display::Stage",class{"flash.display:Stage::requireOwnerPermissions"(){}get frameRate(){return A.frameRate}get nativeWindow(){return DU(A)}set frameRate(t){A.frameRate=Math.max(.01,Math.min(1e3,Number(t)))}get stageWidth(){return A.stageWidth}set stageWidth(A){}get stageHeight(){return A.stageHeight}set stageHeight(A){}get displayContextInfo(){return null}invalidate(){A.invalidated=!0}get scaleMode(){return A.stageScaleMode}set scaleMode(t){if(null==t)throw A.rt.error("TypeError",2007,"scaleMode");let e=A.rt.toString(t);switch(e){case"showAll":case"noScale":case"noBorder":case"exactFit":break;default:throw A.rt.error("ArgumentError",2008,"scaleMode")}A.stageScaleModeSet=!0,e!==A.stageScaleMode&&(A.stageScaleMode=e,A.onStageLayout?.())}get align(){return A.stageAlign}set align(t){if(null==t)throw A.rt.error("TypeError",2007,"align");let e=mp(A.rt.toString(t));A.stageAlignSet=!0,e!==A.stageAlign&&(A.stageAlign=e,A.onStageLayout?.())}get quality(){return A.quality}set quality(t){A.quality=String(t).toUpperCase()}get displayState(){return A.fullScreen.state}set displayState(t){if(null==t)throw A.rt.error("TypeError",2007,"displayState");let e=A.rt.toString(t);switch(e){case"normal":case"fullScreen":case"fullScreenInteractive":A.fullScreen.set(e);break;default:throw A.rt.error("ArgumentError",2008,"displayState")}}get focus(){return A.focus?.object??null}set focus(t){Dh(A,t?f0(t)??null:null)}get showDefaultContextMenu(){return A.showDefaultContextMenu}set showDefaultContextMenu(t){A.showDefaultContextMenu=A.rt.toBoolean(t)}get stageFocusRect(){return e}set stageFocusRect(A){e=!!A}get color(){return((A.stageColor??0xffffff)|0xff000000)>>>0}set color(t){A.stageColor=0xffffff&A.rt.toUint(t),A.updates++}get allowsFullScreen(){return A.fullScreen.host?.allowed(!1)??!0}get allowsFullScreenInteractive(){return!A.air&&(A.fullScreen.host?.allowed(!0)??!1)}get browserZoomFactor(){return 1}get contentsScaleFactor(){return A.contentsScaleFactor}get fullScreenWidth(){return A.screenCapabilities.screenResolutionX}get fullScreenHeight(){return A.screenCapabilities.screenResolutionY}get fullScreenSourceRect(){let t=A.fullScreen.sourceRect;return t&&A.rt.construct(A.rt.classNamed("flash.geom::Rectangle"),t.x,t.y,t.width,t.height)}set fullScreenSourceRect(t){if(null==t)return void A.fullScreen.setSourceRect(null);let e=e=>A.rt.toNumber(A.rt.prop(t,e));A.fullScreen.setSourceRect({x:e("x"),y:e("y"),width:e("width"),height:e("height")})}get colorCorrection(){return g}set colorCorrection(t){if(null==t)throw A.rt.error("TypeError",2007,"colorCorrection");g=A.rt.toString(t)}get colorCorrectionSupport(){return"unsupported"}get mouseLock(){return A.fullScreen.mouseLock}set mouseLock(t){if(!A.fullScreen.active)throw A.rt.error("Error",3707);A.fullScreen.mouseLock=A.rt.toBoolean(t)}get wmodeGPU(){return!1}get softKeyboardRect(){return A.rt.construct(A.rt.classNamed("flash.geom::Rectangle"),0,0,0,0)}get orientation(){return"unknown"}get deviceOrientation(){return"unknown"}get autoOrients(){return!1}"flash.display:Stage::setAutoOrients"(A){}get supportedOrientations(){let t=A.rt.resolve(A.rt.vector("String")).$it.instance();return t.$a=[],t}static get supportsOrientationChange(){return!1}isFocusInaccessible(){return!1}get stageVideos(){return I("flash.media::StageVideo",[])}get stage3Ds(){return I("flash.display::Stage3D",i??=[0,1,2,3].map(()=>A.rt.construct(A.rt.classNamed("flash.display::Stage3D"))),!0)}});let B=f3(A);for(let A of["removeChildAt","swapChildrenAt"])t[`flash.display::Stage#${A}`]=B[`flash.display::DisplayObjectContainer#${A}`];return t["flash.display::Stage#get:constructor"]=QJ(()=>null),t["flash.display::Stage#set:constructor"]=QJ(()=>void 0),t}(A),...(QS(Aq={},"flash.display::Loader",class{get content(){return this.$content??null}get contentLoaderInfo(){return this.$loaderInfo||(this.$loaderInfo=A.loads.loaderInfo(this)),this.$loaderInfo}"flash.display:Loader::_loadBytes"(t,e,g,i,I,B){let Q=function(A,t){if(!t)throw A.rt.error("TypeError",2007,"bytes");let e=i3(A.rt,t);return new Uint8Array(e.buffer.subarray(0,e.length))}(A,t),C=ml(A,B);A.loads.requestLoad(this,Q,A.loads.loadDomain(g),C)}"flash.display:Loader::_load"(t,e,g,i,I,B){let Q=ml(A,B);A.loads.requestLoadUrl(this,t,A.loads.loadDomain(g),Q)}"flash.display:Loader::_unload"(t,e){A.loads.unload(this,!!t)}"flash.display:Loader::_getJPEGLoaderContextdeblockingfilter"(A){return 0}"flash.display:Loader::_close"(){A.loads.closeLoad(this)}"flash.display:Loader::_getUncaughtErrorEvents"(){return ma(A,this)}"flash.display:Loader::_setUncaughtErrorEvents"(A){this.$uncaught=A}}),Aq),...(QS(AT={},"flash.display::LoaderInfo",class{get loader(){return this.$loader}get content(){return this.$content}get url(){return this.$url}get loaderURL(){return this.$loaderURL}get isURLInaccessible(){return!1}get bytesLoaded(){return this.$loaded}get bytesTotal(){return this.$total}get applicationDomain(){return this.$domain||this.$swf?A.code.applicationDomainOf(this.$domain??A.mainDomain):null}get swfVersion(){return mE(A,this).version}get actionScriptVersion(){return mE(A,this).as3?3:2}get frameRate(){return mE(A,this).frameRate}get width(){return(this.$image??mE(A,this)).width}get height(){return(this.$image??mE(A,this)).height}get contentType(){return this.$image?.contentType??(this.$swf&&this.$typed?"application/x-shockwave-flash":null)}get sharedEvents(){return this.$shared||(this.$shared=A.rt.construct(A.rt.classNamed("flash.events::EventDispatcher"))),this.$shared}get sameDomain(){return!0}get childAllowsParent(){return!0}get parentAllowsChild(){return!0}get parentSandboxBridge(){return null}set parentSandboxBridge(A){}get childSandboxBridge(){return null}set childSandboxBridge(A){}get bytes(){if(!this.$bytes)return null;let t=A.rt.construct(A.rt.classNamed("flash.utils::ByteArray")),e=i3(A.rt,t);return e.write(this.$bytes),e.position=0,t}"flash.display:LoaderInfo::_getArgs"(){let t=A.rt.objectTraits.instance();for(let[e,g]of this.$params)A.rt.setProperty(t,A.rt.publicName(e),g);return t}"flash.display:LoaderInfo::_getUncaughtErrorEvents"(){return ma(A,this)}"flash.display:LoaderInfo::_setUncaughtErrorEvents"(A){this.$uncaught=A}static getLoaderInfoByDefinition(A){return null}}),AT),...(AP={},AO=()=>{let t=A.externalInterface,e=t?.allows;return t&&(!e||A.code.securityUrls(2).every(A=>e.call(t,A)))?t:null},QS(AP,"flash.external::ExternalInterface",class{static get available(){return null!==AO()}static get objectID(){return AO()?.objectID??null}static"flash.external:ExternalInterface::_initJS"(){}static"flash.external:ExternalInterface::_getPropNames"(t){let e=[],g=A.rt.hasNext(t,0);for(;0!==g;)e.push(A.rt.nextName(t,g)),g=A.rt.hasNext(t,g);return A.rt.array(e)}static get"flash.external:ExternalInterface::activeX"(){return!1}static"flash.external:ExternalInterface::_addCallback"(t,e,g){let i=AO();if(!i)throw A.rt.error("Error",2067);i.addCallback(A.rt.toString(t),g||null==e?null:(t,g)=>(A.hostCalls++,A.rt.callValue(e,null,[t,null===g?null:A.rt.array(g)],null)))}static"flash.external:ExternalInterface::_evalJS"(t){let e=AO();if(!e)throw A.rt.error("Error",2067);return e.evalJS?.(A.rt.toString(t))??null}static"flash.external:ExternalInterface::_callOut"(t){let e=AO();if(!e)throw A.rt.error("Error",2067);return e.callOut(A.rt.toString(t))}static"flash.external:ExternalInterface::_quotedStringFromString"(t){return JSON.stringify(A.rt.toString(t))}static"flash.external:ExternalInterface::_quotedStringFromError"(t){return JSON.stringify(A.rt.toString(t))}}),AP),...(QS(Aj={},"flash.globalization::CurrencyParseResult",class{"flash.globalization:CurrencyParseResult::ctor"(t,e){if(null===e)throw A.rt.error("TypeError",2007,"symbol");this.$currencyValue=t,this.$currencyString=e}get value(){return this.$currencyValue}get currencyString(){return this.$currencyString}}),Aj),...(QS(Az={},"flash.globalization::NumberParseResult",class{"flash.globalization:NumberParseResult::ctor"(A,t,e){this.$numberValue=A,this.$startIndex=t,this.$endIndex=e}get value(){return this.$numberValue}get startIndex(){return this.$startIndex}get endIndex(){return this.$endIndex}}),Az),...(A$={},A_=(t,e)=>[m_(A,t,"string1"),m_(A,e,"string2")],QS(A$,"flash.globalization::Collator",class{static getAvailableLocaleIDNames(){return m3(A)}"flash.globalization:Collator::ctor"(t,e){let g=mz(A,m_(A,t,"requestedLocaleIDName"));if("sorting"!==m_(A,e,"initialMode")&&"matching"!==e)throw A.rt.error("ArgumentError",1508,"initialMode");this.$settings=new m8(g,"matching"===e)}get lastOperationStatus(){return this.$settings.status}get requestedLocaleIDName(){return this.$settings.locale.requested}get actualLocaleIDName(){return this.$settings.locale.actual}get ignoreCase(){return this.$settings.ignoreCase}set ignoreCase(A){this.$settings.set("ignoreCase",A)}get ignoreDiacritics(){return this.$settings.ignoreDiacritics}set ignoreDiacritics(A){this.$settings.set("ignoreDiacritics",A)}get ignoreKanaType(){return this.$settings.ignoreKanaType}set ignoreKanaType(A){this.$settings.set("ignoreKanaType",A)}get ignoreSymbols(){return this.$settings.ignoreSymbols}set ignoreSymbols(A){this.$settings.set("ignoreSymbols",A)}get ignoreCharacterWidth(){return this.$settings.ignoreCharacterWidth}set ignoreCharacterWidth(A){this.$settings.set("ignoreCharacterWidth",A)}get numericComparison(){return this.$settings.numericComparison}set numericComparison(A){this.$settings.set("numericComparison",A)}compare(A,t){return this.$settings.compare(...A_(A,t))}equals(A,t){return 0===this.$settings.compare(...A_(A,t))}}),A$),...(QS(A0={},"flash.globalization::CurrencyFormatter",class{static getAvailableLocaleIDNames(){return m3(A)}"flash.globalization:CurrencyFormatter::ctor"(t){this.$settings=new GC(mz(A,m_(A,t,"requestedLocaleIDName")))}get lastOperationStatus(){return this.$settings.status}get requestedLocaleIDName(){return this.$settings.locale.requested}get actualLocaleIDName(){return this.$settings.locale.actual}get currencyISOCode(){return this.$settings.currencyISOCode}get currencySymbol(){return this.$settings.currencySymbol}setCurrency(t,e){let g=this.$settings;m_(A,t,"currencyISOCode"),m_(A,e,"currencySymbol");let i=/^[A-Z]{3}$/.test(t);i&&(g.currencyISOCode=t,g.currencySymbol=e),g.status=i?mL:mV}"flash.globalization:CurrencyFormatter::formatImplementation"(A,t){let e=this.$settings;return e.format(A,A=>A?GB[e.negativeCurrencyFormat]:GI[e.positiveFormat],t?e.currencySymbol:e.currencyISOCode)}formattingWithCurrencySymbolIsSafe(t){let e=this.$settings;return e.status=mL,m_(A,t,"requestedISOCode")===e.currencyISOCode}parse(t){let{value:e,symbol:g}=this.$settings.parseCurrency(m_(A,t,"value"));return A.rt.construct(A.rt.classNamed("flash.globalization::CurrencyParseResult"),e,g)}get fractionalDigits(){return this.$settings.fractionalDigits}set fractionalDigits(A){this.$settings.setFractionalDigits(A)}get useGrouping(){return this.$settings.useGrouping}set useGrouping(A){this.$settings.set("useGrouping",A)}get groupingPattern(){return this.$settings.groupingPattern}set groupingPattern(t){this.$settings.setGroupingPattern(m_(A,t,"value"))}get digitsType(){return this.$settings.digitsType}set digitsType(A){this.$settings.setDigitsType(A)}get decimalSeparator(){return this.$settings.decimalSeparator}set decimalSeparator(t){this.$settings.setDecimalSeparator(m_(A,t,"value"))}get groupingSeparator(){return this.$settings.groupingSeparator}set groupingSeparator(t){this.$settings.setGroupingSeparator(m_(A,t,"value"))}get negativeSymbol(){return this.$settings.negativeSymbol}set negativeSymbol(t){m_(A,t,"value"),this.$settings.status=mx}get negativeCurrencyFormat(){return this.$settings.negativeCurrencyFormat}set negativeCurrencyFormat(A){let t=this.$settings;t.setFormat(A,GB.length)&&(t.negativeCurrencyFormat=A)}get positiveCurrencyFormat(){return this.$settings.positiveFormat}set positiveCurrencyFormat(A){let t=this.$settings;t.setFormat(A,GI.length)&&(t.positiveFormat=A)}get leadingZero(){return this.$settings.leadingZero}set leadingZero(A){this.$settings.set("leadingZero",A)}get trailingZeros(){return this.$settings.trailingZeros}set trailingZeros(A){this.$settings.set("trailingZeros",A)}}),A0),...(A1={},A2=(t,e)=>{if(!Gr.includes(m_(A,t,e))&&t!==Gs)throw A.rt.error("ArgumentError",2008,"DateTimeFormatterStyle");return t},A3=(t,e,g)=>{let i=t.$settings;if(m_(A,e,"nameStyle"),m_(A,g,"context"),!["full","longAbbreviation","shortAbbreviation"].includes(e)||!["format","standalone"].includes(g))throw A.rt.error("ArgumentError",2008,"invalid style or context");return i.status=mL,{data:i.data,full:"full"===e,short:"shortAbbreviation"===e}},QS(A1,"flash.globalization::DateTimeFormatter",class{static getAvailableLocaleIDNames(){return m3(A)}"flash.globalization:DateTimeFormatter::ctor"(t,e,g){let i=mz(A,m_(A,t,"requestedLocaleIDName")),I=A2(e,"dateStyle"),B=A2(g,"timeStyle");if(I===Gs||B===Gs)throw A.rt.error("TypeError",2007,"Constructor Failed");this.$settings=new Gd(i),this.$settings.setStyles(I,B)}get lastOperationStatus(){return this.$settings.status}get requestedLocaleIDName(){return this.$settings.locale.requested}get actualLocaleIDName(){return this.$settings.locale.actual}setDateTimeStyles(A,t){let e=this.$settings,g=A2(A,"dateStyle"),i=A2(t,"timeStyle");if(g===Gs||i===Gs){e.status=mV;return}e.setStyles(g,i),e.status=mL}getDateStyle(){return this.$settings.status=mL,this.$settings.dateStyle}getTimeStyle(){return this.$settings.status=mL,this.$settings.timeStyle}getDateTimePattern(){return this.$settings.status=mL,this.$settings.pattern}setDateTimePattern(t){let e=this.$settings,g=Gc(m_(A,t,"pattern"));e.status=g.status,g.status!==mv&&(e.pattern=g.kept,e.fields=g.fields,e.dateStyle=Gs,e.timeStyle=Gs)}"flash.globalization:DateTimeFormatter::formatImplementation"(t,e){var g,i,I;let B,Q,C,r,s,o=this.$settings,n=m_(A,t,"dateTime").$time,E=e||Number.isNaN(n)?0:A.rt.prop(t,"timezoneOffset"),a=Number.isNaN(E)?new Date(n).getTimezoneOffset():E,l=A=>o.fields.some(({letter:t})=>""!==t&&A.includes(t)),h=l("yMdEGDQwF"),c=Number.isNaN(n),w=(B=Math.abs(g=c?0:n-6e4*a)>864e13?Math.trunc(g/126227808e5):0,{date:Q=new Date(g-126227808e5*B),year:Q.getUTCFullYear()+400*B}),d=c&&(e?h:!h||l("hHkKmsaS"))?null:h?function({date:A,year:t}){let e=t%65536,g=30828===e&&(A.getUTCMonth()>8||8===A.getUTCMonth()&&A.getUTCDate()>14);if(t<0||e<1601||e>30828||g)return null;let i=new Date(A.getTime());return i.setUTCFullYear(e),i}(w):w.date;return d?(o.status=mL,i=o.fields,I=o.data,C=d.getUTCFullYear(),r=d.getUTCHours(),s=(A,t)=>t>1?Gw(A):`${A}`,i.map(({letter:A,count:t,text:e},g)=>{switch(A){case"":return e;case"y":return 2===t?Gw(C%100):`${C}`;case"M":return t<3?s(d.getUTCMonth()+1,t):3===t?I.shortMonths[d.getUTCMonth()]:([-1,1].some(A=>{let t=g+A;for(;i[t]&&""===i[t].letter;)t+=A;return i[t]?.letter==="d"})?I.genitiveMonths:I.months)[d.getUTCMonth()];case"d":return s(d.getUTCDate(),t);case"E":return(t<4?I.shortWeekdays:I.weekdays)[d.getUTCDay()];case"a":return I.periods[r<12?0:1];case"h":case"K":return s(r%12||12,t);case"H":case"k":return s(r,t);case"m":return s(d.getUTCMinutes(),t);case"s":return s(d.getUTCSeconds(),t);case"G":return I.eras[+(C>0)];default:return""}}).join("")):(o.status=mV,"")}getMonthNames(t="full",e="standalone"){let{data:g,full:i}=A3(this,t,e);return m0(A,(i?"format"===e?g.genitiveMonths:g.months:g.shortMonths).slice())}getWeekdayNames(t="full",e="standalone"){let{data:g,full:i,short:I}=A3(this,t,e);return m0(A,(i?g.weekdays:I?g.shortestWeekdays:g.shortWeekdays).slice())}getFirstWeekday(){return this.$settings.status=mL,this.$settings.data.firstWeekday}}),A1),...(QS(A8={},"flash.globalization::LocaleID",class{static determinePreferredLocales(t,e,g="userinterface"){return m_(A,t,"want"),m_(A,e,"have"),m_(A,g,"keyword"),m0(A,function(A,t){let e=t.map(Gf),g=A.map(Gf),i=[];for(let A of g){let t=t=>t.named===A.named?0:t.maximized===A.maximized?1:g.some(A=>A.named===t.named)?2:t.regional?3:4;for(let g of e.filter(t=>t.language===A.language).sort((A,e)=>t(A)-t(e)))i.includes(g.name)||i.push(g.name)}return i}(m1(t),m1(e)))}"flash.globalization:LocaleID::ctor"(t){this.$parts=function(A){let t,e=mP(A),g=e.split("@")[0],i=mT(e),I=i?mW.exec(g):null;if(!i||!I){let[A,t=""]=e.split(/[-_. ]+/);return{name:e,language:e,script:"",region:/^[a-z]{2,8}$/.test(A)&&/^[a-z]{2}$/.test(t)?t:"",variant:"",keywords:{}}}let B=I[1].toLowerCase(),Q=I[2]&&I[2][0].toUpperCase()+I[2].slice(1).toLowerCase(),C=I[3]?.toUpperCase();try{Gu.includes(B)||(t=new Intl.Locale([B,Q,C].filter(Boolean).join("-")).maximize())}catch{}return{name:e,language:B,script:Q??t?.script??"",region:C??t?.region??"",variant:I[4].split(/[-_. ]+/).filter(Boolean).map(A=>A.toUpperCase()).join("-"),keywords:i}}(m_(A,t,"name"))}get name(){return this.$parts.name}get lastOperationStatus(){return mL}getLanguage(){return this.$parts.language}getScript(){return this.$parts.script}getRegion(){return this.$parts.region}getVariant(){return this.$parts.variant}getKeysAndValues(){return A.rt.newObject(Object.entries(this.$parts.keywords).flat())}isRightToLeft(){return GD.test(this.$parts.script)}}),A8),...(A9={},A4=(A,t)=>{let e=A.$settings;return e.format(t,A=>A?m9[e.negativeFormat]:"n")},QS(A9,"flash.globalization::NumberFormatter",class{static getAvailableLocaleIDNames(){return m3(A)}"flash.globalization:NumberFormatter::ctor"(t){this.$settings=new GA(mz(A,m_(A,t,"requestedLocaleIDName")))}get lastOperationStatus(){return this.$settings.status}get requestedLocaleIDName(){return this.$settings.locale.requested}get actualLocaleIDName(){return this.$settings.locale.actual}get fractionalDigits(){return this.$settings.fractionalDigits}set fractionalDigits(A){this.$settings.setFractionalDigits(A)}get useGrouping(){return this.$settings.useGrouping}set useGrouping(A){this.$settings.set("useGrouping",A)}get groupingPattern(){return this.$settings.groupingPattern}set groupingPattern(t){this.$settings.setGroupingPattern(m_(A,t,"value"))}get digitsType(){return this.$settings.digitsType}set digitsType(A){this.$settings.setDigitsType(A)}get decimalSeparator(){return this.$settings.decimalSeparator}set decimalSeparator(t){this.$settings.setDecimalSeparator(m_(A,t,"value"))}get groupingSeparator(){return this.$settings.groupingSeparator}set groupingSeparator(t){this.$settings.setGroupingSeparator(m_(A,t,"value"))}get negativeSymbol(){return this.$settings.negativeSymbol}set negativeSymbol(t){m_(A,t,"value"),this.$settings.status=mx}get negativeNumberFormat(){return this.$settings.negativeFormat}set negativeNumberFormat(A){this.$settings.setNegativeFormat(A)}get leadingZero(){return this.$settings.leadingZero}set leadingZero(A){this.$settings.set("leadingZero",A)}get trailingZeros(){return this.$settings.trailingZeros}set trailingZeros(A){this.$settings.set("trailingZeros",A)}formatInt(A){return A4(this,A)}formatUint(A){return A4(this,A)}formatNumber(A){return A4(this,A)}parse(t){let{value:e,start:g,end:i}=this.$settings.parse(m_(A,t,"parseString"));return A.rt.construct(A.rt.classNamed("flash.globalization::NumberParseResult"),e,g,i)}parseNumber(t){return this.$settings.parseNumber(m_(A,t,"parseString"))}}),A9),...(QS(A5={},"flash.globalization::StringTools",class{static getAvailableLocaleIDNames(){return m3(A)}"flash.globalization:StringTools::ctor"(t){this.$locale=mz(A,m_(A,t,"requestedLocaleIDName")),this.$status=this.$locale.status}get lastOperationStatus(){return this.$status}get requestedLocaleIDName(){return this.$locale.requested}get actualLocaleIDName(){return this.$locale.actual}toLowerCase(t){return this.$status=mL,GG(m_(A,t,"s"),this.$locale.actual,!0)}toUpperCase(t){return this.$status=mL,GG(m_(A,t,"s"),this.$locale.actual,!1)}}),A5),...(QS(A6={},"flash.net::URLRequest",class{get url(){return this.$url??null}set url(A){this.$url=null==A?null:String(A)}get data(){return this.$data??null}set data(A){this.$data=A}get method(){return this.$method??"GET"}"flash.net:URLRequest::setMethod"(A){this.$method=String(A)}get contentType(){return this.$contentType??"application/x-www-form-urlencoded"}set contentType(A){this.$contentType=A}get requestHeaders(){return this.$headers||(this.$headers=A.rt.array([])),this.$headers}"flash.net:URLRequest::setRequestHeaders"(A){this.$headers=A}get digest(){return this.$digest??null}set digest(A){this.$digest=A}useRedirectedURL(){}get followRedirects(){return this.$followRedirects??!0}set followRedirects(A){this.$followRedirects=!!A}get userAgent(){return this.$userAgent??G3(A)}set userAgent(A){this.$userAgent=A}get manageCookies(){return this.$manageCookies??!0}set manageCookies(A){this.$manageCookies=!!A}get useCache(){return this.$useCache??!0}set useCache(A){this.$useCache=!!A}get cacheResponse(){return this.$cacheResponse??!0}set cacheResponse(A){this.$cacheResponse=!!A}"flash.net:URLRequest::_SetIdleTimeout"(t){this.$idleTimeout=G8(A,t)}get idleTimeout(){return this.$idleTimeout??0}get authenticate(){return this.$authenticate??!0}set authenticate(A){this.$authenticate=!!A}}),A6),...(QS(A7={},"flash.net::URLRequestDefaults",class{static get followRedirects(){return G2(A).followRedirects}static set followRedirects(t){G2(A).followRedirects=!!t}static get manageCookies(){return G2(A).manageCookies}static set manageCookies(t){G2(A).manageCookies=!!t}static get authenticate(){return G2(A).authenticate}static set authenticate(t){G2(A).authenticate=!!t}static get useCache(){return G2(A).useCache}static set useCache(t){G2(A).useCache=!!t}static get cacheResponse(){return G2(A).cacheResponse}static set cacheResponse(t){G2(A).cacheResponse=!!t}static get idleTimeout(){return G2(A).idleTimeout}static set idleTimeout(t){G2(A).idleTimeout=G8(A,t)}static get userAgent(){return G2(A).userAgent||G3(A)}static set userAgent(t){G2(A).userAgent=null==t?null:A.rt.toString(t)}static setLoginCredentialsForHost(){}}),A7),...(tA={},tt=t=>t.$buffer??=A.rt.construct(A.rt.classNamed("flash.utils::ByteArray")),te=(t,e,...g)=>A.rt.callProp(tt(t),e,...g),tg=A=>{A.$generation=(A.$generation??0)+1,A.$abort?.abort(),A.$abort=null,A.$connected=!1},QS(tA,"flash.net::URLStream",class{load(t){if(null==t)throw A.rt.error("TypeError",2007,"request");this.$abort?.abort();let e=(this.$generation??0)+1;this.$generation=e,this.$connected=!1,this.$buffer=void 0;let g=new AbortController;this.$abort=g;let i=A.air&&cH(this,"httpResponseStatus");A.loads.requestBytes(t,g.signal,(t,g)=>{if(this.$generation!==e)return;let{status:I,local:B}=t,Q=I>=400,C=Q&&!A.air?null:t.bytes,r=void 0!==t.url,s=A.httpResponseStatus(t,g);if(this.$abort=null,null===C){if(this.$connected=!1,s&&(cK(A,this,s),this.$generation!==e)||(cK(A,this,A.httpStatus(I,r)),this.$generation!==e))return;cK(A,this,A.rt.construct(A.rt.classNamed("flash.events::IOErrorEvent"),"ioError",!1,!1,A.loads.streamError(g,B),2032));return}if(this.$connected=!0,cK(A,this,A.event("open")),this.$generation!==e||s&&(cK(A,this,s),this.$generation!==e))return;let o=i3(A.rt,tt(this));o.write(C),o.position=0,(!(C.length>0)&&A.air||(cK(A,this,A.rt.construct(A.rt.classNamed("flash.events::ProgressEvent"),"progress",!1,!1,C.length,C.length)),this.$generation===e))&&(cK(A,this,A.httpStatus(I,r)),this.$generation===e&&cK(A,this,Q&&!i?A.rt.construct(A.rt.classNamed("flash.events::IOErrorEvent"),"ioError",!1,!1,A.loads.streamError(g,B),2032):A.event("complete")))})}get connected(){return this.$connected??!1}get bytesAvailable(){return i3(A.rt,tt(this)).available}close(){if(!this.$abort&&!this.$connected)throw A.rt.error("flash.errors::IOError",2029);tg(this)}stop(){tg(this)}readBytes(A,t=0,e=0){te(this,"readBytes",A,t,e)}readBoolean(){return te(this,"readBoolean")}readByte(){return te(this,"readByte")}readUnsignedByte(){return te(this,"readUnsignedByte")}readShort(){return te(this,"readShort")}readUnsignedShort(){return te(this,"readUnsignedShort")}readInt(){return te(this,"readInt")}readUnsignedInt(){return te(this,"readUnsignedInt")}readFloat(){return te(this,"readFloat")}readDouble(){return te(this,"readDouble")}readUTF(){return te(this,"readUTF")}readUTFBytes(A){return te(this,"readUTFBytes",A)}readMultiByte(A,t){return te(this,"readMultiByte",A,t)}readObject(){return te(this,"readObject")}get objectEncoding(){return A.rt.prop(tt(this),"objectEncoding")}set objectEncoding(t){A.rt.setProp(tt(this),"objectEncoding",t)}get endian(){return A.rt.prop(tt(this),"endian")}set endian(t){A.rt.setProp(tt(this),"endian",t)}get diskCacheEnabled(){return!1}get position(){return i3(A.rt,tt(this)).position}set position(t){i3(A.rt,tt(this)).position=A.rt.toUint(t)>>>0}get length(){return i3(A.rt,tt(this)).length}}),tA),...(ti=(A,t)=>{if(null==t)throw A.error("TypeError",2007,"request");if(null===t.$url||void 0===t.$url)throw A.error("TypeError",2007,"url");return t},{"flash.net::navigateToURL":t=>(e,g)=>{var i;let I=ti(t,e),B=null==g?null:t.toString(g);A.loads.navigateTo(I,null===B?null:(i=B,/^_?blank$/i.test(i)?"_blank":i))},"flash.net::sendToURL":t=>e=>{A.loads.sendTo(ti(t,e))}}),...(QS(tI={},"flash.system::ApplicationDomain",class{static get currentDomain(){return A.code.applicationDomainOf(A.code.codeDomain())}static get MIN_DOMAIN_MEMORY_LENGTH(){return 1024}get domainMemory(){return A.rt.memoryProvider}set domainMemory(t){Ci(A.rt,t)}"flash.system:ApplicationDomain::ctor"(t){this.$domain=A.rt.childDomain(t?t.$domain??A.mainDomain:A.rt.root)}get parentDomain(){let t=(this.$domain??A.mainDomain).parent;return t&&t!==A.rt.root?A.code.applicationDomainOf(t):null}getQualifiedDefinitionNames(){let t=A.rt.resolve(A.rt.vector("String")).$it.instance();return t.$a=A.rt.definitionNames(this.$domain??A.mainDomain),t}getDefinition(t){let e;return e=this,G9(A.rt,String(t),t=>A.rt.definitionNamed(t,e.$domain??A.mainDomain))}hasDefinition(t){var e=this;if(null==t)return!1;try{return G9(A.rt,String(t),t=>A.rt.definitionNamed(t,e.$domain??A.mainDomain),()=>!0),!0}catch{return!1}}}),tI),...(QS(tB={},"flash.system::Capabilities",class{static get screenResolutionX(){return A.screenCapabilities.screenResolutionX}static get screenResolutionY(){return A.screenCapabilities.screenResolutionY}static get pixelAspectRatio(){return A.screenCapabilities.pixelAspectRatio}static get screenDPI(){return A.screenCapabilities.screenDPI}static get os(){return A.platform.os}static get manufacturer(){return A.platform.manufacturer}static get version(){return A.platform.version}static get language(){return A.platform.language}static get languages(){return A.rt.newArray([A.platform.language])}static get playerType(){return A.platform.playerType}static get isDebugger(){return A.rt.debugger}static get cpuArchitecture(){return"x86"}static get screenColor(){return"color"}static get touchscreenType(){return A.maxTouchPoints>0?"finger":"none"}static get maxLevelIDC(){return"5.1"}static get serverString(){var t;let e,g;return e=(t=A).platform,g=t.screenCapabilities,[["A","t"],["SA","t"],["SV","t"],["EV","t"],["MP3","t"],["AE","t"],["VE","t"],["ACC","t"],["PR","t"],["SP","f"],["SB","f"],["DEB",t.rt.debugger?"t":"f"],["V",e.version],["M",e.manufacturer],["R",`${g.screenResolutionX}x${g.screenResolutionY}`],["COL","color"],["AR",String(g.pixelAspectRatio)],["OS",e.os],["ARCH","x86"],["L",e.language],["IME","t"],["PR32","t"],["PR64","t"],["PT",e.playerType],["AVD","f"],["LFD","t"],["WD","f"],["TLS","t"],["ML","5.1"],["DP",String(g.screenDPI)]].map(([A,t])=>`${A}=${encodeURIComponent(t)}`).join("&")}static get _internal(){return 36}static hasMultiChannelAudio(A){return!1}static get hasAudio(){return!0}static get hasMP3(){return!0}static get hasStreamingAudio(){return!0}static get hasStreamingVideo(){return!0}static get hasEmbeddedVideo(){return!0}static get hasAudioEncoder(){return!0}static get hasVideoEncoder(){return!0}static get hasPrinting(){return!0}static get hasAccessibility(){return!0}static get hasIME(){return!0}static get hasTLS(){return!0}static get supports32BitProcesses(){return!0}static get supports64BitProcesses(){return!0}static get hasScreenBroadcast(){return!1}static get hasScreenPlayback(){return!1}static get avHardwareDisable(){return!1}static get localFileReadDisable(){return!0}static get isEmbeddedInAcrobat(){return!1}}),tB),...(tC=!0,tr=!1,QS(tQ={},"flash.system::Security",class{static get exactSettings(){return tC}static set exactSettings(A){tC=!!A}static get disableAVM1Loading(){return tr}static set disableAVM1Loading(A){tr=!!A}static get sandboxType(){return A.sandboxType}static get pageDomain(){return null}static allowDomain(){}static allowInsecureDomain(){}static loadPolicyFile(t){null!=t&&A.loads.policyFile(A.rt.toString(t))}static showSettings(A){}}),tQ),...(to=null,QS(ts={},"flash.system::SecurityDomain",class{static get currentDomain(){return to||(to=A.rt.classNamed("flash.system::SecurityDomain").$it.instance()),to}get domainID(){return Ft(FA(Fe.encode(A.url))).toUpperCase()}"flash.system:SecurityDomain::ctor_impl"(){throw A.rt.error("ArgumentError",2012,"SecurityDomain")}}),ts),...(tE=!1,QS(tn={},"flash.system::System",class{static get ime(){return null}static setClipboard(t){if(null==t)throw A.rt.error("TypeError",2007,"text");let e=A.clipboard;if(!e.writable)throw A.rt.error("Error",2176);e.clear(),e.set(DC,A.rt.toString(t))}static get totalMemory(){return 0}static get totalMemoryNumber(){return 0}static get freeMemory(){return 0}static get privateMemory(){return 0}static get processCPUUsage(){return 0}static get useCodePage(){return tE}static set useCodePage(A){tE=!!A}static get vmVersion(){return"swf2es"}static pause(){}static resume(){}static exit(A){}static gc(){}static pauseForGCIfCollectionImminent(A){}static disposeXML(A){}}),tn),...(ta={},tl=Dv(A),th=t=>tl[`flash.events::EventDispatcher#${t}`](A.rt),QS(ta,"flash.system::Worker",class{static get isSupported(){return A.workers.supported}get isPrimordial(){return 0===this.$worker}"flash.system:Worker::internalGetState"(){return A.workers.state(this.$worker)}getSharedProperty(t){return A.workers.getShared(this.$worker,Fg(A,t))}setSharedProperty(t,e){A.workers.setShared(this.$worker,Fg(A,t),e)}"flash.system:Worker::internalGetSharedProperty"(t){return A.workers.getShared(this.$worker,Fg(A,t))}"flash.system:Worker::internalSetSharedProperty"(t,e){A.workers.setShared(this.$worker,Fg(A,t),e)}"flash.system:Worker::internalAddEventListener"(){}"flash.system:Worker::internalRemoveEventListener"(){}start(){A.workers.start(this.$worker)}terminate(){return A.workers.terminate(this.$worker)}createMessageChannel(t){if(null==t)throw A.rt.error("TypeError",2007,"receiver");return A.workers.createChannel(this.$worker,t.$worker)}}),QS(ta,"flash.system::WorkerDomain",class{static get isSupported(){return A.workers.supported}createWorker(t){return A.workers.create(t)}listWorkers(){let t=A.rt,e=t.applyType(t.classNamed("__AS3__.vec::Vector"),[t.classNamed("flash.system::Worker")]).$it.instance();return e.$a=A.workers.list(),e.$fixed=!1,e}}),QS(ta,"flash.system::MessageChannel",class{send(t){A.workers.send(this,t)}get messageAvailable(){return A.workers.messageAvailable(this)}receive(t){return A.workers.receive(this,!!t)}addEventListener(...A){return th("addEventListener").apply(this,A)}removeEventListener(...A){return th("removeEventListener").apply(this,A)}close(){A.workers.close(this)}get state(){return A.workers.channelState(this)}toString(){return"[object MessageChannel]"}}),ta),...(QS(tc={},"flash.profiler::Telemetry",class{static get connected(){return!1}static get spanMarker(){return 0}static sendMetric(A,t){}static sendSpanMetric(A,t,e){}static registerCommandHandler(A,t){return!1}static unregisterCommandHandler(A){return!1}}),tc),...(QS(tw={},"flash.display::InteractiveObject",class{get tabEnabled(){return this.$tabEnabled??Dn(f0(this))}set tabEnabled(A){this.$tabEnabled=!!A}get tabIndex(){return this.$tabIndex??-1}set tabIndex(A){this.$tabIndex=0|Number(A)}get focusRect(){return this.$focusRect??null}set focusRect(A){this.$focusRect=A}get mouseEnabled(){return this.$mouseEnabled??!0}set mouseEnabled(A){this.$mouseEnabled=!!A,oT.changes++}get doubleClickEnabled(){return this.$doubleClickEnabled??!1}set doubleClickEnabled(A){this.$doubleClickEnabled=!!A}get accessibilityImplementation(){return this.$accessibility??null}set accessibilityImplementation(A){this.$accessibility=A}get softKeyboardInputAreaOfInterest(){return this.$softKeyboardArea??null}set softKeyboardInputAreaOfInterest(A){this.$softKeyboardArea=A}get needsSoftKeyboard(){return this.$needsSoftKeyboard??!1}set needsSoftKeyboard(A){this.$needsSoftKeyboard=!!A}get contextMenu(){return this.$contextMenu??null}set contextMenu(t){this.$contextMenu=mn(A,t,"flash.display::NativeMenu")}requestSoftKeyboard(){return!1}}),tw),...(QS(td={},"flash.net::FileFilter",class{get description(){return this.$description??null}set description(A){this.$description=A}get extension(){return this.$extension??null}set extension(A){this.$extension=A}get macType(){return this.$macType??null}set macType(A){this.$macType=A}}),td),...(tu={},tD=new WeakMap,tf=t=>{let e=tD.get(t);return e||(e={input:A.rt.construct(A.rt.classNamed("flash.utils::ByteArray")),output:A.rt.construct(A.rt.classNamed("flash.utils::ByteArray")),transport:null,generation:0,connected:!1,connecting:!1,failed:!1,endpoints:null,noDelay:null},tD.set(t,e)),e},tm=()=>{throw A.rt.error("flash.errors::IOError",2002)},tG=A=>{let t=tf(A);return t.connected||tm(),t},tF=(t,e,...g)=>A.rt.callProp(tG(t).input,e,...g),tR=(t,e,...g)=>A.rt.callProp(tG(t).output,e,...g),ty=(t,e)=>{cK(A,t,A.event(e))},QS(tu,"flash.net::Socket",class{"flash.net:Socket::internalGetSecurityErrorMessage"(A,t){return`Error #2048: Security sandbox violation: ${String(A)}:${Number(t)}`}"flash.net:Socket::internalConnect"(t,e){let g=tf(this);g.transport?.close(),g.generation++,g.transport=null,g.connected=!1,g.connecting=!0,g.failed=!1,g.endpoints=G0,i3(A.rt,g.input).clear(),i3(A.rt,g.output).clear();let i=g.generation,I=t=>{g.generation===i&&(g.generation++,g.connecting=!1,g.connected=!1,g.transport?.close(),g.transport=null,g.failed=!0,cK(A,this,A.rt.construct(A.rt.classNamed("flash.events::IOErrorEvent"),"ioError",!1,!1,t)))};if(!A.socket)return void A.loads.deferHostEvent(()=>I("Error #2031: Socket Error."));try{g.transport=A.socket.connect(null===t?"localhost":A.rt.toString(t),A.rt.toInt(e),{open:t=>A.loads.deferHostEvent(()=>{g.generation===i&&(g.connecting=!1,g.connected=!0,g.endpoints=t?{...t}:G0,ty(this,"connect"))}),data:t=>{let e=t.slice();A.loads.deferHostEvent(()=>{if(g.generation!==i||!g.connected)return;let t=i3(A.rt,g.input);if(t.position>=65536&&2*t.position>=t.length){let A=t.available;t.buffer.copyWithin(0,t.position,t.length),t.setLength(A),t.position=0}let I=t.position;t.position=t.length,t.write(e),t.position=I,cK(A,this,A.rt.construct(A.rt.classNamed("flash.events::ProgressEvent"),"socketData",!1,!1,e.length,0))})},close:()=>A.loads.deferHostEvent(()=>{if(g.generation===i){if(g.connecting)return void I("Error #2031: Socket Error.");g.connected=!1,g.connecting=!1,g.transport=null,ty(this,"close")}}),error:t=>A.loads.deferHostEvent(()=>I(t))},null===g.noDelay?void 0:{noDelay:g.noDelay})}catch(t){A.loads.deferHostEvent(()=>I(String(t)))}}"flash.net:Socket::didFailureOccur"(){return tf(this).failed}"flash.net:Socket::internalClose"(){let A=tf(this);A.connected||A.connecting||tm(),A.generation++,A.transport?.close(),A.transport=null,A.connected=!1,A.connecting=!1,A.endpoints=null}"flash.net:Socket::OnError"(){}"flash.net:Socket::wasCalledByAppContent"(){return!1}get localAddress(){return tf(this).endpoints?.localAddress??null}get localPort(){return tf(this).endpoints?.localPort??0}get remoteAddress(){return tf(this).endpoints?.remoteAddress??null}get remotePort(){return tf(this).endpoints?.remotePort??0}get connected(){return tf(this).connected}get tcpNoDelay(){return tf(this).noDelay??!1}set tcpNoDelay(A){tf(this).noDelay=!!A}get bytesAvailable(){return i3(A.rt,tf(this).input).available}get bytesPending(){return i3(A.rt,tf(this).output).length}flush(){let t=tG(this),e=i3(A.rt,t.output);0!==e.length&&(t.transport?.send(e.buffer.slice(0,e.length)),e.setLength(0),e.position=0)}readBytes(A,t,e){tF(this,"readBytes",A,t,e)}readBoolean(){return tF(this,"readBoolean")}readByte(){return tF(this,"readByte")}readUnsignedByte(){return tF(this,"readUnsignedByte")}readShort(){return tF(this,"readShort")}readUnsignedShort(){return tF(this,"readUnsignedShort")}readInt(){return tF(this,"readInt")}readUnsignedInt(){return tF(this,"readUnsignedInt")}readFloat(){return tF(this,"readFloat")}readDouble(){return tF(this,"readDouble")}readUTF(){return tF(this,"readUTF")}readUTFBytes(A){return tF(this,"readUTFBytes",A)}readMultiByte(A,t){return tF(this,"readMultiByte",A,t)}readObject(){return tF(this,"readObject")}writeBytes(A,t,e){tR(this,"writeBytes",A,t,e)}writeBoolean(A){tR(this,"writeBoolean",A)}writeByte(A){tR(this,"writeByte",A)}writeShort(A){tR(this,"writeShort",A)}writeInt(A){tR(this,"writeInt",A)}writeUnsignedInt(A){tR(this,"writeUnsignedInt",A)}writeFloat(A){tR(this,"writeFloat",A)}writeDouble(A){tR(this,"writeDouble",A)}writeMultiByte(A,t){tR(this,"writeMultiByte",A,t)}writeUTF(A){tR(this,"writeUTF",A)}writeUTFBytes(A){tR(this,"writeUTFBytes",A)}writeObject(A){tR(this,"writeObject",A)}get objectEncoding(){return A.rt.prop(tf(this).input,"objectEncoding")}set objectEncoding(t){let e=tf(this);A.rt.setProp(e.input,"objectEncoding",t),A.rt.setProp(e.output,"objectEncoding",t)}get endian(){return A.rt.prop(tf(this).input,"endian")}set endian(t){let e=tf(this);A.rt.setProp(e.input,"endian",t),A.rt.setProp(e.output,"endian",t)}}),tu),...(QS(tp={},"flash.net::SecureSocket",class{static get isSupported(){return!1}get serverCertificateStatus(){return"unknown"}get serverCertificate(){return null}}),tp),...(QS(tM={},"flash.net::XMLSocket",class{get"flash.net:XMLSocket::domain"(){return ch(A.url).domain}}),tM),...(tJ={},tk=new WeakMap,tN=t=>{let e=tk.get(t);if(e)return e;let g=A.code.securityUrls(3).map(ch),i=g[0]??ch(A.url);g.some(A=>A.domain!==i.domain||A.secure!==i.secure)&&(i.domain="");let I={owner:A,...i,key:null,client:t,locked:!1,perUser:!1,domains:new Set,insecure:new Set,alive:()=>!A.destroyed,allows:A=>{let t=I.secure&&!A.secure?I.insecure:I.domains;return!(I.secure&&!A.secure)&&A.domain===I.domain||t.has("*")||t.has(A.domain)},defer:t=>A.loads.deferHostEvent(t),status:e=>{cH(t,"status")&&cK(A,t,A.rt.construct(A.rt.classNamed("flash.events::StatusEvent"),"status",!1,!1,null,e?"status":"error"))},receive:(e,g)=>{try{var i,B;A.rt.callProperty(I.client,A.rt.publicName(e),...0===g.encoding?(i=A.rt,B=g.bytes,new GH(i,B).value().$a):GS(A.rt,g.bytes))}catch(i){if(i instanceof Error)return void A.reportUncaught(i);let g=A.rt.error("Error",2095,"flash.net.LocalConnection",e);if(!cH(t,"asyncError"))return void A.reportUncaught(g);cK(A,t,A.rt.construct(A.rt.classNamed("flash.events::AsyncErrorEvent"),"asyncError",!1,!1,A.rt.prop(g,"message"),A.rt.isInstance(i,A.rt.classNamed("Error"))?i:A.rt.construct(A.rt.classNamed("Error"),A.rt.toString(i))))}}};return tk.set(t,I),I},QS(tJ,"flash.net::LocalConnection",class{"flash.net:LocalConnection::ctor"(){tN(this)}get domain(){return tN(this).domain}connect(t){let e=tN(this);if(e.locked=!0,null===t)throw A.rt.error("TypeError",2007,"connectionName");if(""===t)throw A.rt.error("ArgumentError",2085,"connectionName");if(t.includes(":"))throw A.rt.error("ArgumentError",2004);if(!A.localConnections.connect(e,t))throw A.rt.error("ArgumentError",2082)}close(){let t=tN(this);if(t.locked=!0,!A.localConnections.close(t))throw A.rt.error("ArgumentError",2083)}send(t,e,...g){let i,I=tN(this);if(I.locked=!0,null===t||null===e)throw A.rt.error("TypeError",2007,null===t?"connectionName":"methodName");if(""===t||""===e)throw A.rt.error("ArgumentError",2085,""===t?"connectionName":"methodName");if(!cc(e))throw A.rt.error("ArgumentError",2004);try{i=function(A,t){let e=Gp.get(A);e||(e=[],Gp.set(A,e));let g=e.pop();if(!g){let t=A.construct(A.classNamed("flash.utils::ByteArray"));g=new GR(A,t),t.$bytes=g}let i=new Gy(A,g);try{return i.value(A.newArray(t)),g.buffer.slice(0,g.length)}finally{!i.escaped&&(g.position=0,g.setLength(0),e.length<2&&e.push(g))}}(A.rt,g)}catch(t){if(!(t instanceof RangeError))throw t;throw A.rt.error("ArgumentError",2084)}A.localConnections.send(I,t,e,{encoding:3,bytes:i,legacy:()=>(function(A,t){let e=new GY(A);for(let A of(e.out.bytes(10),e.out.u32(t.length),t))e.value(A);return e.out.finish()})(A.rt,GS(A.rt,i))})}get client(){return tN(this).client}set client(t){if(null==t)throw A.rt.error("TypeError",2007,"client");tN(this).client=t}get isPerUser(){return tN(this).perUser}set isPerUser(t){let e=tN(this);if(e.locked)throw A.rt.error("Error",3316);e.perUser=t}allowDomain(...t){let e=tN(this);for(let g of t)e.domains.add(A.rt.toString(g).toLowerCase())}allowInsecureDomain(...t){let e=tN(this);for(let g of t){let t=A.rt.toString(g).toLowerCase();e.insecure.add(t),e.domains.add(t)}}}),tJ),...(tS={},tb=new WeakMap,tU=A=>{let t=tb.get(A);return t||(t={state:"new",url:"",transport:null,protocol:null,closeReason:-1,closedHere:!1},tb.set(A,t)),t},tY=()=>{throw A.rt.error("flash.errors::IOError",2002)},tH=(t,e,g,i,I)=>{let B=A.rt.construct(A.rt.classNamed(e),g,!1,!1,I,i);cK(A,t,B)},tL=(A,t)=>tH(A,"flash.events::IOErrorEvent","ioError",2031,`Error #2031: Socket Error.${t&&` URL: ${t}`}`),tZ=(t,e)=>{e.transport=null,e.state="closed",tL(t,e.url),cK(A,t,A.event("close"))},tK=(t,e)=>{e.transport?.close(),e.transport=null,e.state="closed",A.loads.deferHostEvent(()=>tZ(t,e))},QS(tS,"air.net::WebSocket",class{"air.net:WebSocket::internalConnect"(t,e){if(null==t)throw A.rt.error("TypeError",2007,"url");let g=tU(this);if("new"!==g.state)throw A.rt.error("flash.errors::IllegalOperationError",2082);let i=A.rt.toString(t);if(!/^wss?:\/\//.test(i))throw A.rt.error("ArgumentError",2147,i);g.state="connecting",g.url=i;let I=null==e?[]:e.$a.filter(A=>null!=A).map(t=>A.rt.toString(t)),B=()=>{"connecting"===g.state&&(g.transport=null,g.state="failed",tL(this,(A=>{try{return new URL(A).hostname}catch{return""}})(i)))},Q=A=>{if("connecting"===g.state)switch(A){case"handshake":tZ(this,g);break;case"subprotocol":g.transport=null,g.state="failed",tL(this,i);break;default:B()}},C=A.webSocket;if(!C)return void A.loads.deferHostEvent(B);try{g.transport=C.connect(i.replace(/#.*$/s,""),I,{open:t=>A.loads.deferHostEvent(()=>{"connecting"===g.state&&(g.state="open",""!==t&&(g.protocol=t),cK(A,this,A.event("connect")))}),message:(t,e)=>A.loads.deferHostEvent(()=>{if("open"!==g.state&&"closing"!==g.state)return;let i=A.rt.construct(A.rt.classNamed("flash.utils::ByteArray")),I=i3(A.rt,i);I.write("string"==typeof t?DF.encode(t):t.slice()),I.position=0;let B="string"==typeof t||e?1:2,Q=A.rt.classNamed("flash.events::WebSocketEvent");cK(A,this,A.rt.construct(Q,"websocketData",B,i))}),close:t=>A.loads.deferHostEvent(()=>{"connecting"===g.state?B():("open"===g.state||"closing"===g.state)&&(g.state="closed",g.transport=null,1005!==t&&1006!==t&&(g.closeReason=t),g.closedHere||cK(A,this,A.event("close")))}),error:t=>A.loads.deferHostEvent(()=>Q(t)),certificateError:t=>A.loads.deferHostEvent(()=>{if("connecting"!==g.state)return void t(!1);let e=A.rt.classNamed("flash.events::SecurityErrorEvent"),i=A.rt.construct(e,"certificateError",!1,!0,"Certificate for socket server is self-signed",0);t(!cK(A,this,i)&&"connecting"===g.state)})})}catch(t){t?.name==="SecurityError"?(g.state="failed",A.loads.deferHostEvent(()=>tH(this,"flash.events::SecurityErrorEvent","securityError",2048,`Error #2048: Security sandbox violation: ${A.url} cannot load data from ${i}.`))):A.loads.deferHostEvent(B)}}sendMessage(t,e){let g;if("string"==typeof e)g=DF.encode(e);else if(null!=e&&A.rt.isInstance(e,A.rt.classNamed("flash.utils::ByteArray"))){let t=i3(A.rt,e);g=t.buffer.slice(0,t.length)}else throw A.rt.error("ArgumentError",1508,"data");let i=tU(this);switch(i.state){case"open":((A,t,e)=>{let g=A.transport;if(!g)return;let i=15&t;if(g.frame){switch(i){case 8:A.state="closing",g.frame(i,e);break;case 1:case 2:case 9:case 10:g.frame(i,e)}return}switch(i){case 1:g.send(DR.decode(e));break;case 2:g.send(e);break;case 8:{let t=e.length>=2?e[0]<<8|e[1]:0;A.state="closing",g.close(Dy(t)?t:void 0)}}})(i,A.rt.toUint(t),g);break;case"connecting":tK(this,i);break;case"new":case"closed":tY()}}"air.net:WebSocket::internalClose"(t){let e=tU(this);switch(e.state){case"open":{let g=65535&A.rt.toUint(t);e.state="closing",e.closedHere=!0;let i=e.transport;i?.frame?i.frame(8,Uint8Array.of(g>>8,255&g)):i?.close(Dy(g)?g:void 0);break}case"connecting":tK(this,e);break;case"new":case"closed":tY()}}get protocol(){return tU(this).protocol}set protocol(t){let e=tU(this);if("open"===e.state||"closing"===e.state||"closed"===e.state)throw A.rt.error("ArgumentError",2014);e.protocol=null==t?null:A.rt.toString(t)}get closeReason(){return tU(this).closeReason}startServer(t){if(null==t)throw A.rt.error("TypeError",2007,"socket");throw A.rt.construct(A.rt.classNamed("flash.errors::IllegalOperationError"),"This method is not supported in this profile.")}}),tS),...(tx={},tv=new Map,tV=3,tX=!1,tW=new TextEncoder,tq=()=>i3(A.rt,A.rt.construct(A.rt.classNamed("flash.utils::ByteArray"))),tT=t=>{try{A.storage.remove(t)}catch{}},tP=(t,e)=>{if(0===e.length){A.storage.remove(t.$key),tT(t.$key+"#amf3");return}let g=G$(e);A.storage.set(g?t.$key+"#amf3":t.$key,e),tT(g?t.$key:t.$key+"#amf3")},tO=t=>{let e=t.$data.$d??new Map;if(0===e.size)return new Uint8Array(0);let g=t.$encoding>=3,i=tW.encode(t.$name),I=new Uint8Array(18+i.length+4);I.set([0,191],0),I.set([84,67,83,79,0,4,0,0,0,0],6),I.set([i.length>>8,255&i.length],16),I.set(i,18),I[I.length-1]=3*!!g;let B=tq();B.write(I);let Q=g?new I0(A.rt,B):null,C=g?null:new GP(A.rt,B);for(let[A,t]of e)Q?(Q.string(String(A)),Q.value(t)):(C.name(String(A)),C.value(t)),B.write(G_);let r=B.buffer.slice(0,B.length);return new DataView(r.buffer).setUint32(2,r.length-6),r},tj=t=>{if(null==t)throw A.rt.error("TypeError",2007,"url");throw A.rt.error("Error",2014)},A.flushSharedObjects=()=>{for(let A of tv.values())try{let t=tO(A);t.length&&!function(A,t){return null!==t&&A.length===t.length&&A.every((A,e)=>A===t[e])}(t,A.$saved)&&(tP(A,t),A.$saved=t)}catch{}},QS(tx,"flash.net::SharedObject",class{static getLocal(t,e,g){if(null==t)throw A.rt.error("TypeError",2007,"name");let i=A.rt.toString(t);if(""===i||Gj.test(i))throw A.rt.error("Error",2134);let I=new URL(A.code.codeUrl(),"file:///");if(g&&"https:"!==I.protocol)throw A.rt.error("Error",2134);let B=I.pathname.endsWith("/")?`${I.pathname}[swf]`:I.pathname,Q=B;if(null!=e){let t=(Q=A.rt.toString(e)).endsWith("/")?Q:`${Q}/`;if(Q!==B&&!B.startsWith(t))throw A.rt.error("Error",2134)}let C=`${I.host}${Q.startsWith("/")?"":"/"}${Q}/${i}${g?"#secure":""}`,r=tv.get(C);if(r)return r;let s=A.rt.construct(A.rt.classNamed("flash.net::SharedObject"));s.$key=C,s.$name=i,s.$encoding=tV,s.$client=s;let o=A.storage.get(C+"#amf3"),n=o??A.storage.get(C);return s.$data=(n&&((t,e)=>{if(t.length<18||0!==t[0]||191!==t[1])return null;let g=tq();g.write(t),g.position=Gz(t)+1;let i=G$(t),I=i?new I1(A.rt,g):null,B=i?null:new GO(A.rt,g),Q=A.rt.newObject([]);try{for(;g.position<g.length;){let t,i;I&&e?(t=new I1(A.rt,g).string(),i=new I1(A.rt,g).value()):(t=I?I.string():B.name(),i=I?I.value():B.value()),A.rt.setProperty(Q,iV(iY,t),i),g.position=g.position+1>>>0}}catch{return null}return Q})(n,null===o))??A.rt.newObject([]),s.$saved=(A=>{try{return tO(A)}catch{return null}})(s),tv.set(C,s),s}static deleteAll(A){return tj(A)}static getDiskUsage(A){return tj(A)}static get defaultObjectEncoding(){return tV}static set defaultObjectEncoding(t){tV=A.rt.toUint(t)}static get"flash.net:SharedObject::preventBackupImpl"(){return tX}static set"flash.net:SharedObject::preventBackupImpl"(A){tX=!!A}get data(){return this.$data}get objectEncoding(){return this.$encoding}set objectEncoding(t){this.$encoding=3*(0!==A.rt.toUint(t))}get client(){return this.$client}set client(A){this.$client=A}setDirty(A){}"flash.net:SharedObject::invoke"(t){switch(A.rt.toUint(t)){case 2:let e=tO(this);try{tP(this,e)}catch{return!1}return this.$saved=e,!0;case 4:return tO(this).length;case 6:this.$data=A.rt.newObject([]),this.$saved=new Uint8Array(0),tT(this.$key),tT(this.$key+"#amf3");return;case 3:return;default:throw A.rt.unsupported("SharedObject's remote calls")}}}),tx),...(tz={},t$=new WeakMap,t_=t=>{let e=oc();for(let g=t;g&&g!==A.stage;g=g.parent)e=ou(g.space?g.space.shown:Float32Array.of(g.matrix.a,g.matrix.b,0,0,g.matrix.c,g.matrix.d,0,0,0,0,1,0,g.matrix.tx,g.matrix.ty,0,1),e);return e},QS(tz,"flash.geom::Transform",class{"flash.geom:Transform::ctor"(A){this.$display=A.$display}get matrix(){return this.$display.space?null:fc(A,this.$display.matrix)}set matrix(t){this.$display.touch(),t?this.$display.setMatrix(fw(A,t)):this.$display.enter3D()}get colorTransform(){return fd(A,this.$display.colorTransform??fh)}set colorTransform(t){t&&(this.$display.colorTransform=fu(A,t),this.$display.touch(),this.$display.invalidate(1))}get concatenatedMatrix(){let t=this.$display;if(t.space)return null;let e=t.matrix,g=t.parent;for(;g&&g!==A.stage&&!g.space;g=g.parent)e=oQ(e,g.placed);let i=g?.space?an(g,!0):null;return i&&(e={...e,tx:e.tx+2-Math.floor(i.xMin),ty:e.ty+2-Math.floor(i.yMin)}),fc(A,e)}get concatenatedColorTransform(){let t={...this.$display.colorTransform??fh};for(let e=this.$display.parent;e&&e!==A.stage;e=e.parent){let A=e.colorTransform;if(A)for(let[e,,g]of[["rMul",0,"rAdd"],["gMul",0,"gAdd"],["bMul",0,"bAdd"],["aMul",0,"aAdd"]])t[g]=t[g]*A[e]+A[g],t[e]=t[e]*A[e]}return fd(A,t)}get matrix3D(){let t=this.$display,e=t.space;if(!e)return null;let g=t$.get(t);return g&&g.$matrix3D===e.raw||((g=A.rt.construct(A.rt.classNamed("flash.geom::Matrix3D"))).$matrix3D=e.raw,g.$owner=t,t$.set(t,g)),g}set matrix3D(t){let e=this.$display,g=t$.get(e);if(!t){g&&(g.$owner=null,t$.delete(e)),e.touch(),e.setMatrix3D(null);return}let i=t.$matrix3D;if(t===g&&e.space?.raw===i)return void e.touch();let I=t.$owner;if(I&&I!==e&&I.space?.raw===i)throw A.rt.error("ArgumentError",2189);if(0===of(i))throw A.rt.error("ArgumentError",2188);g&&(g.$owner=null),e.touch(),e.setMatrix3D(i,!1,!0),t.$owner=e,t$.set(e,t)}getRelativeMatrix3D(t){if(null==t)throw A.rt.error("TypeError",2007,"relativeTo");let e=this.$display;if(!e.space)return null;let g=om(t_(t.$display))??oc(),i=A.rt.construct(A.rt.classNamed("flash.geom::Matrix3D"));return i.$matrix3D.set(ou(g,t_(e))),i}get perspectiveProjection(){let t,e=this.$display;return e.projection||e===A.stage||null!==e.loaderInfo?((t=A.rt.construct(A.rt.classNamed("flash.geom::PerspectiveProjection"))).$display=e,t):null}set perspectiveProjection(t){this.$display.projection=t?t.$display?{...fE(A,t.$display)}:{fieldOfView:t.$fieldOfView*Math.PI/180,centerX:t.$centerX,centerY:t.$centerY}:null,this.$display.invalidate(1)}get pixelBounds(){let t=af(this.$display,A.stage,A.stage,!0),e=Math.ceil(t.xMin)||0,g=Math.ceil(t.yMin)||0,i=Math.ceil(t.xMax),I=Math.ceil(t.yMax);return A.rt.construct(A.rt.classNamed("flash.geom::Rectangle"),e,g,i-e,I-g)}}),tz),...function(A){let t={},e=null,g=["x","y","z","w"],i=(t,e)=>{if(null==t)throw A.rt.error("TypeError",2007,"vector3D");let g=A.rt.toUint(e);if(g>3)throw A.rt.error("ArgumentError",2004);return g},I=(t,e)=>{if(null==t)throw A.rt.error("TypeError",2007,e);return t},B=(t,e,g,i)=>A.rt.construct(A.rt.classNamed("flash.geom::Vector3D"),t,e,g,i),Q=t=>g.map(e=>A.rt.toNumber(A.rt.prop(t,e))),C=A=>{let[t,e,g]=Q(A);return[t,e,g]},r=t=>{let e=A.rt.toString(I(t,"orientationStyle"));if(!mU.includes(e))throw A.rt.error("Error",2187,e);return e},s=(t,e,g)=>{let i=A.rt.toNumber(t),I=A.rt.toNumber(e),B=A.rt.toNumber(g);if(0===i||0===I||0===B)throw A.rt.error("ArgumentError",2183);return ow(i,I,B)},o=(t,e,g)=>(function(A,t,[e,g,i],I=!0){let[B,Q,C]=t;if(I){let A=oh(Math.sqrt(oh(oh(oh(B*B)+oh(Q*Q))+oh(C*C))));B=oh(B/A),Q=oh(Q/A),C=oh(C/A)}let r=A*Math.PI/180,s=Math.cos(r),o=Math.sin(r),n=1-s,E=Float32Array.of(s+n*B*B,n*B*Q+o*C,n*B*C-o*Q,0,n*B*Q-o*C,s+n*Q*Q,n*Q*C+o*B,0,n*B*C+o*Q,n*Q*C-o*B,s+n*C*C,0,0,0,0,1);return 0===e&&0===g&&0===i?E:ou(od(e,g,i),ou(E,od(-e,-g,-i)))})(A.rt.toNumber(t),Q(I(e,"axis")),null==g?[0,0,0]:Q(g),A.rt.swfVersion>=13);class n{"flash.geom:Matrix3D::ctor"(A){let t=A?.$a;this.$matrix3D=t?.length===16?Float32Array.from(t.map(Number)):mS()}get rawData(){var t;let g;return t=mb(this),(g=(e??=A.rt.resolve(A.rt.vector("Number"))).$it.instance()).$a=Array.from(t),g}set rawData(A){let t=A?.$a;t?.length===16&&mb(this).set(t.map(Number))}clone(){let t=A.rt.construct(A.rt.classNamed("flash.geom::Matrix3D"));return mb(t).set(mb(this)),t}copyFrom(t){if(null==t)throw A.rt.error("TypeError",2007,"source");mb(this).set(mb(t))}copyToMatrix3D(t){if(null==t)throw A.rt.error("TypeError",2007,"dest");mb(t).set(mb(this))}copyRawDataFrom(t,e=0,g=!1){if(null==t)throw A.rt.error("TypeError",2007,"source");let i=t.$a,I=A.rt.toUint(e);if(I+16>i.length)throw A.rt.error("ArgumentError",2004);let B=mb(this);if(g)for(let A=0;A<16;A++)B[A]=Number(i[I+A%4*4+(A>>2)]);else for(let A=0;A<16;A++)B[A]=Number(i[I+A])}copyRawDataTo(t,e=0,g=!1){if(null==t)throw A.rt.error("TypeError",2007,"dest");let i=t.$a,I=A.rt.toUint(e);if(I>=0x10000000)throw A.rt.error("ArgumentError",2004);if(t.$fixed&&I+16>i.length)throw A.rt.error("RangeError",1126);for(;i.length<I+16;)i.push(0);let B=mb(this);for(let A=0;A<16;A++)i[I+A]=B[g?A%4*4+(A>>2):A]}copyRowTo(t,e){let I=i(e,t),B=mb(this);for(let t=0;t<4;t++)A.rt.setProp(e,g[t],B[I+4*t])}copyColumnTo(t,e){let I=i(e,t),B=mb(this);for(let t=0;t<4;t++)A.rt.setProp(e,g[t],B[4*I+t])}copyRowFrom(t,e){let I=i(e,t),B=mb(this);for(let t=0;t<4;t++)B[I+4*t]=A.rt.toNumber(A.rt.prop(e,g[t]))}copyColumnFrom(t,e){let I=i(e,t),B=mb(this);for(let t=0;t<4;t++)B[4*I+t]=A.rt.toNumber(A.rt.prop(e,g[t]))}identity(){mb(this).set(mS())}transpose(){let A=mb(this);for(let t=0;t<4;t++)for(let e=t+1;e<4;e++){let g=4*t+e,i=4*e+t,I=A[g];A[g]=A[i],A[i]=I}}appendTranslation(t,e,g){let i=mb(this);i[12]+=Math.fround(A.rt.toNumber(t)),i[13]+=Math.fround(A.rt.toNumber(e)),i[14]+=Math.fround(A.rt.toNumber(g))}prependTranslation(t,e,g){let i=od(A.rt.toNumber(t),A.rt.toNumber(e),A.rt.toNumber(g));mb(this).set(ou(mb(this),i))}appendScale(A,t,e){mb(this).set(ou(s(A,t,e),mb(this)))}prependScale(A,t,e){mb(this).set(ou(mb(this),s(A,t,e)))}appendRotation(A,t,e=null){mb(this).set(ou(o(A,t,e),mb(this)))}prependRotation(A,t,e=null){mb(this).set(ou(mb(this),o(A,t,e)))}append(A){mb(this).set(ou(mb(I(A,"lhs")),mb(this)))}prepend(A){mb(this).set(ou(mb(this),mb(I(A,"rhs"))))}get determinant(){let t=of(mb(this));return A.rt.swfVersion>=13?t:-t}invert(){let A=om(mb(this));return A&&mb(this).set(A),null!==A}get position(){let A=mb(this);return B(A[12],A[13],A[14],0)}set position(A){if(null==A)return;let[t,e,g]=Q(A),i=mb(this);i[12]=t,i[13]=e,i[14]=g}transformVector(A){let[t,e,g,i]=op(mb(this),...C(I(A,"vector")));return B(t,e,g,i)}deltaTransformVector(A){let[t,e,g,i]=op(mb(this),...C(I(A,"vector")),0);return B(t,e,g,i)}transformVectors(t,e){let g=I(t,"vin").$a,i=I(e,"vout"),B=3*Math.floor(g.length/3);if(B>i.$a.length){if(i.$fixed)throw A.rt.error("RangeError",1126,i.$a.length,B);for(;i.$a.length<B;)i.$a.push(0)}let Q=Array.from(mb(this));for(let A=0;A<B;A+=3){let t=Number(g[A]),e=Number(g[A+1]),I=Number(g[A+2]);i.$a[A]=Q[0]*t+Q[4]*e+Q[8]*I+Q[12],i.$a[A+1]=Q[1]*t+Q[5]*e+Q[9]*I+Q[13],i.$a[A+2]=Q[2]*t+Q[6]*e+Q[10]*I+Q[14]}}pointAt(A,t=null,e=null){let g=oS(mb(this),C(I(A,"position")),null==t?[0,1,0]:C(t),null==e?[0,0,1]:C(e));g&&mb(this).set(g)}decompose(t="eulerAngles"){let e=oy(mb(this),r(t)),g=A.rt.applyType(A.rt.classNamed("__AS3__.vec::Vector"),[A.rt.classNamed("flash.geom::Vector3D")]).$it.instance();return g.$a=e.map(([A,t,e,g])=>B(A,t,e,g)),g}recompose(A,t="eulerAngles"){let e=I(A,"components").$a,g=r(t),i=e.slice(0,3);if(i.length<3||i.some(A=>null==A))return!1;let[B,C,s]=i.map(A=>Q(A));return mb(this).set(oG(B,C,s,g)),!0}interpolateTo(t,e){let g=mb(I(t,"toMat"));mb(this).set(oM(mb(this),g,A.rt.toNumber(e)))}static interpolate(t,e,g){var i;let B;return i=oM(mb(I(t,"fromMat")),mb(I(e,"toMat")),A.rt.toNumber(g)),mb(B=A.rt.construct(A.rt.classNamed("flash.geom::Matrix3D"))).set(i),B}}let E=A=>{let t=A?.$owner;t?.matrix3DChanged(mb(A))},a=n.prototype;for(let A of mY){let t=Object.getOwnPropertyDescriptor(a,A);if(t.set){let A=t.set;t.set=function(t){A.call(this,t),E(this)}}else{let A=t.value;t.value=function(...t){let e=A.apply(this,t);return E(this),e}}Object.defineProperty(a,A,t)}return QS(t,"flash.geom::Matrix3D",n),t}(A),...fs(A,"blur"),...fs(A,"glow"),...fs(A,"dropShadow"),...fs(A,"bevel"),...fs(A,"gradientGlow",({gradientProps:A})=>A()),...fs(A,"gradientBevel",({gradientProps:A})=>A()),...fs(A,"colorMatrix",({elements:t,floats:e})=>({matrix:[t=>A.rt.array([...t.matrix]),(A,g)=>{A.matrix=e(t(g,"matrix"),20)}]})),...fs(A,"convolution",({elements:t,floats:e,matrixSize:g})=>({matrix:[t=>A.rt.array([...t.matrix]),(A,g)=>{A.matrix=e(t(g,"matrix"),A.matrixX*A.matrixY)}],matrixX:[A=>A.matrixX,(A,t)=>{A.matrixX=g(t),A.matrix=e(A.matrix,A.matrixX*A.matrixY)}],matrixY:[A=>A.matrixY,(A,t)=>{A.matrixY=g(t),A.matrix=e(A.matrix,A.matrixX*A.matrixY)}]})),...fs(A,"displacementMap",({num:t})=>({mapBitmap:[t=>fx(A,t.mapBitmap),(A,t)=>{A.mapBitmap=t??null}],mapPoint:[t=>A.rt.construct(A.rt.classNamed("flash.geom::Point"),t.mapPoint[0],t.mapPoint[1]),(e,g)=>{e.mapPoint=g?[Math.trunc(t(A.rt.prop(g,"x")))||0,Math.trunc(t(A.rt.prop(g,"y")))||0]:[0,0]}],mode:[A=>A.mode,(t,e)=>{if(null==e)throw A.rt.error("TypeError",2007,"mode");let g=A.rt.toString(e);if(!["wrap","clamp","ignore","color"].includes(g))throw A.rt.error("ArgumentError",2008,"mode");t.mode=g}]})),...(t0=t=>{let e=A.rt.toInt(t);if(e<0)throw A.rt.error("RangeError",2006);return e},t1=A=>[t=>t.extensions[A],(t,e)=>{t.extensions[A]=t0(e)}],fs(A,"shader",()=>({shader:[A=>A.shader??null,(t,e)=>{if(null==e)throw A.rt.error("TypeError",2007,"shader");if(!fy(e))throw A.rt.error("ArgumentError",2171);t.shader=e}],leftExtension:t1(0),topExtension:t1(1),rightExtension:t1(2),bottomExtension:t1(3),"flash.filters:ShaderFilter::_extendBy":[t=>{let[e,g,i,I]=t.extensions;return A.rt.construct(A.rt.classNamed("flash.geom::Rectangle"),e,g,i-e,I-g)},(t,e)=>{if(null==e)throw A.rt.error("TypeError",2007,"extendBy");let g=t=>A.rt.getProperty(e,A.rt.publicName(t));t.extensions=[t0(g("left")),t0(g("top")),t0(g("right")),t0(g("bottom"))]}]}))),...(QS(t2={},"flash.media::SoundTransform",class{get volume(){return this.$soundVolume??1}set volume(t){this.$soundVolume=A.rt.toNumber(t)}get leftToLeft(){return this.$soundLeftToLeft??1}set leftToLeft(t){this.$soundLeftToLeft=A.rt.toNumber(t)}get leftToRight(){return this.$soundLeftToRight??0}set leftToRight(t){this.$soundLeftToRight=A.rt.toNumber(t)}get rightToRight(){return this.$soundRightToRight??1}set rightToRight(t){this.$soundRightToRight=A.rt.toNumber(t)}get rightToLeft(){return this.$soundRightToLeft??0}set rightToLeft(t){this.$soundRightToLeft=A.rt.toNumber(t)}}),t2),...(t3={},t8=t=>{let e=cv.get(A);for(let g of e??[]){let i=g.$channel;i.sound!==t||i.playing||(cz(A,i),e?.delete(g))}},t9=t=>{cz(A,t);let e=cv.get(A);for(let A of e??[])if(A.$channel===t){e?.delete(A);break}},t4=t=>{let e=t.sound;e.character||e.clip||(e.clip=t5(e));let g=e.character?A.symbols.soundClip(e.character):e.clip;g?.then(e=>{t.stopped||(t.playing=e.play(t.start,t.loops,cW(t.mix,cq(A))))},()=>{e.character||t9(t)}).catch(()=>{e.character||t9(t)})},t5=t=>A.audio?t.pcm?A.audio.decode(function(A){let t=A[0].length,e=new Uint8Array(t*A.length*2),g=new DataView(e.buffer);for(let e=0;e<t;e++)for(let[t,i]of A.entries()){let I=Math.max(-1,Math.min(1,i[e]));g.setInt16((e*A.length+t)*2,Math.round(32767*I),!0)}return{id:0,format:3,sampleRate:44100,sampleSize:16,channels:1===A.length?1:2,sampleCount:t,seekSamples:0,data:e}}(t.pcm)):t.compressed&&t.bytes?A.audio.decode(t.bytes):null:null,QS(t3,"flash.media::Sound",class{extract(t,e,g=-1){let i=mG(this);if(null==t)return 0;let I=(A=>{if(A.pcm)return{rate:44100,channels:A.pcm,skip:0,whole:!1};let t=A.character,e=t?.definition;if(t&&e&&2!==e.format){let A=mf.get(t);return void 0===A&&(A=function(A){let t=A.channels,e={rate:A.sampleRate,skip:0,whole:!0};if(1===A.format){var g,i;let I,B,Q,C,r,s;return{...e,...(g=A.data,B=(Math.floor((I=cu(g,i=t).length/i)/2048)+1)*2048,Q=g.length?(g[0]>>6)+2:4,(C=new Uint8Array(g.length+Math.ceil((B-I)*Q*i/8)+8*i)).set(g),r=cu(C,i),s=22*i+4095*Q*i,{channels:mD(B,i,A=>r[A]/32768),starts:I,seek:A=>0>Math.imul(Math.floor(A/4096),s)?A%4096:A})}}if(4===A.format||5===A.format||6===A.format){let t=new cD().decode(A.data);return{...e,channels:[t.subarray(0,Math.min(t.length,A.sampleCount))]}}if(0!==A.format&&3!==A.format)return null;let I=new DataView(A.data.buffer,A.data.byteOffset,A.data.byteLength),B=A.sampleSize/8,Q=Math.min(A.sampleCount,Math.floor(A.data.byteLength/(B*t)));return{...e,channels:mD(Q,t,A=>1===B?(I.getUint8(A)-128)/128:I.getInt16(2*A,!0)/32768)}}(e),mf.set(t,A)),A}let g=t??A,i=e?e.data:A.bytes,I=mm.get(g);return void 0===I&&i?.length&&((I=function(A){let t=cy(A);if(!t?.whole.length||null===mw)return null;let e=t.whole.length/2*t.samplesPerFrame,g=Array.from({length:t.channels},()=>new Float32Array(e)),i=new mu,I=0;for(let e=0;e<t.whole.length;e+=2){let B=i.read(A.subarray(t.whole[e],t.whole[e+1]));if(i.channels===t.channels&&i.rate===t.rate){let A=Math.min(B,t.samplesPerFrame);for(let e=0;e<A;e++)for(let A=0;A<t.channels;A++)g[A][I+e]=i.pcm[e*t.channels+A]}I+=t.samplesPerFrame}return{rate:t.rate,channels:g,skip:0,whole:!1}}(i))&&e&&(I.skip=Math.max(0,e.seekSamples)),mm.set(g,I)),I??null})(i),B=A.rt.toNumber(g);if(B>=0){let A=B>=0x80000000?0:Math.floor(B);if(i.extracted=I?.seek?I.seek(A):A,I&&i.extracted>=(I.starts??1/0))return i.extracted=I.channels[0].length,0}if(!I)return 0;let{samples:Q,position:C,count:r}=function(A,t,e){let g=A.channels[0].length-A.skip,i=44100/A.rate,I=Math.max(0,g-t),B=Math.floor(e),Q=B>0?Math.min(B,Math.floor(I*i)):0;A.whole&&(Q=Math.floor(Math.floor(Q/i)*i));let C=Math.min(I,Math.ceil(Q/i)),[r,s=r]=A.channels,o=new Float32Array(2*Q);for(let e=0;e<Q;e++){let g=A.skip+t+Math.floor(e/i);o[2*e]=r[g],o[2*e+1]=s[g]}return{samples:o,position:t+C,count:t+C>=g?C:Q}}(I,i.extracted,A.rt.toNumber(e));i.extracted=C;let s=i3(A.rt,t),o=new Uint8Array(4*Q.length),n=new DataView(o.buffer);for(let A=0;A<Q.length;A++)n.setFloat32(4*A,Q[A],s.littleEndian);return o.length&&s.write(o),r}loadCompressedDataFromByteArray(t,e){if(null==t)throw A.rt.error("TypeError",2007,"bytes");let g=mG(this),i=i3(A.rt,t),I=A.rt.toUint(e);if(0===I||I>i.length-i.position)throw A.rt.error("ArgumentError",2084);let B=i.readView(I);if(g.character)return;let Q=g.compressed?g.bytes:null,C=(Q?.length??0)+I,r=Q&&0===Q.byteOffset&&Q.buffer.byteLength>=C?new Uint8Array(Q.buffer):null;r||(r=new Uint8Array(Math.max(C,(Q?.length??0)*2))).set(Q??[]),r.set(B,Q?.length??0);let s=r.subarray(0,C),o=cy(s,Q?g.frames:null);g.bytes=s,g.frames=o,g.compressed=!0,g.pcm=null,g.used=!0,g.loaded=I,g.total=I,g.length=o?o.frames*o.samplesPerFrame*1e3/o.rate:0,g.clip=null,mm.delete(g),cK(A,this,A.rt.construct(A.rt.classNamed("flash.events::ProgressEvent"),"progress",!1,!1,I,I))}loadPCMFromByteArray(t,e,g="float",i=!0,I=44100){if(null==t)throw A.rt.error("TypeError",2007,"bytes");if(null==g)throw A.rt.error("TypeError",2007,"format");let B=A.rt.toString(g);if("float"!==B&&"short"!==B)throw A.rt.error("ArgumentError",2005);let Q=i3(A.rt,t),C=A.rt.toUint(e),r=A.rt.toNumber(I),s=i?2:1,o="float"===B?4:2,n=Q.length-Q.position;if(0===C||!(r>0)||C>n)throw A.rt.error("ArgumentError",2084);let E=Math.floor(44100*C/r),a=Math.min(C,E);if(a*s*o>n)throw Q.position=Q.position+Math.floor(n/o)*o>>>0,A.rt.error("flash.errors::EOFError",2030);let l=Q.littleEndian,h=new DataView(Q.read(a*s*o).buffer),c=Array.from({length:s},()=>new Float32Array(a));for(let A=0;A<a*s;A++)c[A%s][Math.floor(A/s)]=4===o?h.getFloat32(4*A,l):h.getInt16(2*A,l)/32768;let w=mG(this),d=function(A,t){if(44100===t)return A;let e=Math.floor(44100*A[0].length/t);return A.map(A=>{let g=new Float32Array(e);for(let i=0;i<e;i++)g[i]=A[Math.floor(i*t/44100)];return g})}(c,a<C?44100:r);w.character=null,w.pcm=d,w.bytes=new Uint8Array(0),w.compressed=!1,w.used=!0,w.loaded=C*o,w.total=C*o,w.length=d[0].length/44.1,w.extracted=0,w.clip=null}"flash.media:Sound::_load"(t,e,g){let i=mG(this),I=i.character?.definition;if(I&&0===i.total&&(i.loaded=I.data.length,i.total=I.data.length),null==t)return;if(i.used)throw A.rt.error("Error",2037);i.used=!0,A.audio?.warm?.();let B=++i.generation,Q=new AbortController;i.abort=Q,A.loads.requestBytes(t,Q.signal,({bytes:t,local:e},g)=>{if(i.generation!==B)return;if(i.abort=null,i.url=g,!t){t8(i),cK(A,this,A.rt.construct(A.rt.classNamed("flash.events::IOErrorEvent"),"ioError",!1,!1,A.loads.streamError(g,e)));return}if(i.bytes=t,i.loaded=t.length,i.total=t.length,cK(A,this,A.event("open")),i.generation!==B||(cK(A,this,A.rt.construct(A.rt.classNamed("flash.events::ProgressEvent"),"progress",!1,!1,t.length,t.length)),i.generation!==B))return;if(!A.audio){t8(i),cK(A,this,A.event("complete"));return}for(let e of(i.clip=A.audio.decode(t),cv.get(A)??[])){let A=e.$channel;A.sound!==i||A.stopped||t4(A)}let I=i.clip.then(t=>{i.length=t.durationMs,A.loads.deferHostEvent(()=>{i.generation===B&&cK(A,this,A.event("complete"))})},()=>{t8(i),A.loads.deferHostEvent(()=>{i.generation===B&&cK(A,this,A.rt.construct(A.rt.classNamed("flash.events::IOErrorEvent"),"ioError",!1,!1,A.loads.streamError(g,e)))})});A.loads.trackRequest(I)},"content")}get url(){return mG(this).url}get isURLInaccessible(){return!1}get length(){return mG(this).length}get isBuffering(){return!1}get bytesLoaded(){return mG(this).loaded}get bytesTotal(){return mG(this).total}get id3(){return null}close(){let A=mG(this);A.abort?.abort(),A.abort=null,A.generation++,t8(A)}play(t,e,g){let i=mG(this),I=!i.character&&!i.bytes&&!i.abort&&(this.$listeners?.get("sampleData")?.length??0)>0;if(!I&&!i.character&&!i.bytes&&!i.abort)return null;let B=Math.max(0,A.rt.toNumber(t)||0);if(i.length>0&&B>=i.length||c3(cO(A))>=32)return null;let Q=A.rt.construct(A.rt.classNamed("flash.media::SoundChannel")),C={sound:i,started:A.timers.now,start:B,loops:Math.max(0,A.rt.toInt(e)),mix:mF(cX(g)),playing:null,stopped:!1,stoppedAt:0};Q.$channel=C;let r=cv.get(A);if(r||(r=new Set,cv.set(A,r)),r.add(Q),I){let t=()=>{r.delete(Q);try{C.stoppedAt=cj(A,C)}catch{C.stoppedAt=C.start}C.stopped=!0;try{C.playing?.stop()}catch{}};try{!function(A,t,e,g){let i,I=A.rt.construct(A.rt.classNamed("flash.utils::ByteArray")),B=i3(A.rt,I),Q=0,C=0,r=!1,s=!1,o=!1,n=!0,E=()=>i?.positionMs??Math.min(1e3*Q/44100,A.timers.now-e.started),a=()=>{B.position=0;let g=A.rt.construct(A.rt.classNamed("flash.events::SampleDataEvent"),"sampleData",!1,!1,Q+C,I);if(cK(A,t,g),e.stopped)return;let s=Math.floor(B.position/8);if(s>8192||B.position>B.length){r=!0,i?.finish(),A.reportUncaught(s>8192?A.rt.error("RangeError",2004):A.rt.error("flash.errors::EOFError",2030));return}if(s>0){let A=[new Float32Array(s),new Float32Array(s)];for(let t=0;t<s;t++)for(let e=0;e<2;e++){let g=B.view.getFloat32(8*t+4*e,B.littleEndian);A[e][t]=Number.isFinite(g)?g:0}Q+=s,i?.append(A)}s<2048&&(r=!0,i?.finish())},l=()=>{if(o&&!s&&!r&&!e.stopped){s=!0;try{Q-44100*E()/1e3<8192&&a()}catch(A){if(n)throw A;r=!0,g(A)}finally{s=!1}}};if(e.dynamic={position:()=>e.start+E(),pump:l,complete:()=>r&&(i?!0===i.ended:E()>=Q/44.1)},i=A.audio?.stream?.(cW(e.mix,cq(A)),l),e.playing=i??null,o=!0,l(),!r&&!e.stopped&&8192===Q){s=!0;try{a()}finally{s=!1}}C=Math.floor(44.1*e.start),n=!1}(A,this,C,e=>{t(),A.reportUncaught(e)})}catch(A){throw t(),A}}else t4(C);return Q}}),QS(t3,"flash.media::SoundChannel",class{get position(){let t=this.$channel;return t?cj(A,t):0}get soundTransform(){return my(A,this.$channel?.mix??cX(null))}set soundTransform(t){let e=this.$channel;e&&(e.mix=mF(cX(t)),e.playing?.setMix(cW(e.mix,cq(A))))}get leftPeak(){return 0}get rightPeak(){return 0}stop(){let t=this.$channel;t&&!t.stopped&&(cz(A,t),cv.get(A)?.delete(this))}}),t3),...(t7=5,eA="media",et=!1,QS(t6={},"flash.media::SoundMixer",class{static get soundTransform(){return my(A,cq(A))}static set soundTransform(t){mR(A,t)}static get bufferTime(){return t7}static set bufferTime(t){let e=A.rt.toInt(t);if(e<0)throw A.rt.error("RangeError",2027,"bufferTime",e);t7=e}static stopAll(){c$(A)}static areSoundsInaccessible(){return!1}static computeSpectrum(t,e,g){if(null==t)throw A.rt.error("TypeError",2007,"sound");let i=t.$bytes;i.setLength(2048),i.position=0,i.write(new Uint8Array(2048)),i.position=0}static get audioPlaybackMode(){return eA}static set audioPlaybackMode(t){if(null==t)throw A.rt.error("TypeError",2007,"audioPlaybackMode");let e=A.rt.toString(t);if(!GF.includes(e))throw A.rt.error("ArgumentError",2004);eA=e}static get useSpeakerphoneForVoice(){return et}static set useSpeakerphoneForVoice(A){et=!!A}}),t6),...(ee={},eg=A=>(A.$display.drawing??=new h9,A.$display.invalidate(4),A.$display.drawing),ei=(A,t=0)=>{let e=Number(A);return Number.isNaN(e)?t:e},eI=(t,e=1)=>{if(null==t)throw A.rt.error("TypeError",2007,"shader");if(!fy(t))throw A.rt.error("ArgumentError",2171);return fS(A,t,0,e)},eB=t=>{if(null==t)return{...mQ};let e=A.rt;return{a:e.toNumber(e.getProperty(t,mC[0])),b:e.toNumber(e.getProperty(t,mC[1])),c:e.toNumber(e.getProperty(t,mC[2])),d:e.toNumber(e.getProperty(t,mC[3])),tx:e.toNumber(e.getProperty(t,mC[4])),ty:e.toNumber(e.getProperty(t,mC[5]))}},eQ=(t,e,g,i,I,B,Q,C)=>{let r=A=>A.$a??[],s=r(e),o=null==g?s.map(()=>1):r(g),n=null==i?s.map((A,t)=>s.length>1?Math.floor(255*t/(s.length-1)):0):r(i).map(t=>Math.trunc(A.rt.toNumber(t)));if(o.length!==s.length||n.length!==s.length||n.some(A=>!(A>=0&&A<=255)))return null;let E=A.rt.toString(B),a={type:"gradient",radial:"radial"===t,focal:"radial"===t?ei(C):0,stops:s.slice(0,16).map((A,t)=>({ratio:n[t],color:mo(A,o[t])})),spread:"reflect"===E?1:2*("repeat"===E),linearRgb:"linearRGB"===A.rt.toString(Q),matrix:eB(I)};return null==I&&mr.add(a),a},eC=(A,t,e,g)=>{if(A instanceof Ee&&mg(A.drawn()?.layers??[],t,mr,g),mg(A.drawing?.layers??[],t,mr,g),e&&A instanceof ng)for(let e of A.children)eC(e,oQ(e.matrix,t),!0,g)},er=t=>A.rt.construct(A.rt.classNamed("flash.geom::Matrix"),t.a,t.b,t.c,t.d,t.tx,t.ty),es=(t,e)=>{let g=A.rt.resolve(A.rt.vector(t)).$it.instance();return g.$a=e,g},eo=t=>{let e=(t,...e)=>A.rt.construct(A.rt.classNamed(`flash.display::${t}`),...e);switch(t.type){case"solid":return e("GraphicsSolidFill",t.color,t.alpha);case"gradient":return e("GraphicsGradientFill",t.radial?"radial":"linear",A.rt.array(t.colors),A.rt.array(t.alphas),A.rt.array(t.ratios),er(t.matrix),t.spread,t.linearRgb?"linearRGB":"rgb",t.focal);case"bitmap":{let g=t.image instanceof nK?t.image:null,i=null;return g&&((i=A.rt.construct(A.rt.classNamed("flash.display::BitmapData"),g.width,g.height,g.transparent,0)).$store=g.clone()),e("GraphicsBitmapFill",i,er(t.matrix),!0,!1)}case"path":return e("GraphicsPath",es("int",t.commands),es("Number",t.data),t.winding);default:return e("GraphicsEndFill")}},QS(ee,"flash.display::Graphics",class{"flash.display:Graphics::nativeGetGraphicsData"(A,t){let e=[];eC(this.$display,mQ,!!t,e);let g=A.$a;for(let A of e)g.push(eo(A))}clear(){eg(this).clear()}beginFill(A,t=1){eg(this).beginFill({type:"solid",color:mo(A,t)})}beginGradientFill(t,e,g,i,I=null,B="pad",Q="rgb",C=0){let r=A.rt.toString(t);if("linear"!==r&&"radial"!==r)throw A.rt.error("ArgumentError",2008,"type");if(null==e)throw A.rt.error("TypeError",2007,"colors");let s=eQ(r,e,g,i,I,B,Q,C);eg(this).beginFill(s??{type:"solid",color:0})}beginBitmapFill(t,e=null,g=!0,i=!1){if(null==t)throw A.rt.error("TypeError",2007,"bitmap");let I=t.$store;if(!I)throw A.rt.error("ArgumentError",2015);I.views.add(this.$display.ref),eg(this).beginFill({type:"image",image:I,matrix:eB(e),repeat:!!g,smooth:!!i})}beginShaderFill(A,t=null){eg(this).beginFill({type:"shader",use:eI(A),matrix:eB(t)})}endFill(){eg(this).endFill()}lineStyle(A=0/0,t=0,e=1,g=!1,i="normal",I=null,B=null,Q=3){let C=Number(A);if(Number.isNaN(C))return void eg(this).lineStyle(null);let r=mi[String(I??"round")]??0,s={width:Math.round(20*Math.max(0,Math.min(255,C))),color:mo(t,e),startCap:r,endCap:r,join:mI[String(B??"round")]??0,miterLimit:ei(Q,3),noHScale:"none"===i||"vertical"===i,noVScale:"none"===i||"horizontal"===i,pixelHinting:!!g,noClose:!1,fill:null};eg(this).lineStyle(s)}lineGradientStyle(t,e,g,i,I=null,B="pad",Q="rgb",C=0){if(null==e)throw A.rt.error("TypeError",2007,"colors");let r=A.rt.toString(t);if("linear"!==r&&"radial"!==r)throw A.rt.error("ArgumentError",2008,"type");let s=eQ(r,e,g,i,I,B,Q,C);s&&eg(this).lineGradient(s)}lineBitmapStyle(t,e=null,g=!0,i=!1){if(null==t)throw A.rt.error("TypeError",2007,"bitmap");let I=t.$store;if(!I)return;let B={type:"image",image:I,matrix:eB(e),repeat:!!g,smooth:!!i};I.views.add(this.$display.ref),eg(this).lineBitmap(B)}lineShaderStyle(A){eI(A,2)}drawRect(A,t,e,g){eg(this).drawRect(ei(A),ei(t),ei(e),ei(g))}drawRoundRect(A,t,e,g,i,I=0/0){let B=ei(i);eg(this).drawRoundRect(ei(A),ei(t),ei(e),ei(g),B,ei(I,B))}drawRoundRectComplex(A,t,e,g,i,I,B,Q){let C=A=>{let t=Math.min(Math.abs(ei(A)),Math.abs(ei(e))/2,Math.abs(ei(g))/2);return[t,t]};eg(this).drawRoundRectComplex(ei(A),ei(t),ei(e),ei(g),C(i),C(I),C(B),C(Q))}moveTo(A,t){eg(this).moveTo(ei(A),ei(t))}lineTo(A,t){eg(this).lineTo(ei(A),ei(t))}curveTo(A,t,e,g){eg(this).curveTo(ei(A),ei(t),ei(e),ei(g))}cubicCurveTo(A,t,e,g,i,I){eg(this).cubicCurveTo(ei(A),ei(t),ei(e),ei(g),ei(i),ei(I))}drawPath(t,e,g="evenOdd"){if("evenOdd"!==g&&"nonZero"!==g)throw A.rt.error("ArgumentError",2008,"winding");let i=(t?.$a??[]).map(A=>Number(A)),I=(e?.$a??[]).map(A=>Number(A));if(i.length&&I.length%2)throw A.rt.error("ArgumentError",2004);eg(this).drawPath(i,I,g)}drawTriangles(t,e=null,g=null,i="none"){if(null==t)return;let I=t.$a,B=I;for(let A=0;A<B.length;A++){let t=20*B[A];t>=-0x80000000&&t<=0x7fffffff||(B===I&&(B=I.slice()),B[A]=-107374182.4)}let Q=B.length/2,C=null==e?null:e.$a,r=null==g?null:g.$a;if(B.length%2||(C?C.length%3:Q%3)||r&&r.length!==2*Q&&r.length!==3*Q)throw A.rt.error("ArgumentError",2004);let s="string"==typeof i&&Object.hasOwn(mB,i)?mB[i]:void 0;if(void 0===s)throw A.rt.error("ArgumentError",2008,"culling");let o=r;if(r&&r.length!==3*Q){o=Array(3*Q);for(let A=0;A<Q;A++)o[3*A]=r[2*A],o[3*A+1]=r[2*A+1],o[3*A+2]=1}eg(this).drawTriangles(B,C,o,s)}copyFrom(A){let t=A?.$display?.drawing;if(t)for(let A of(eg(this).copyFrom(t),t.layers)){for(let{fill:t}of A.fills)"image"===t.type&&t.image instanceof nK&&t.image.views.add(this.$display.ref);for(let{paint:t}of A.strokes)t?.type==="image"&&t.image instanceof nK&&t.image.views.add(this.$display.ref);for(let t of A.meshes??[])t.image.views.add(this.$display.ref)}else eg(this).clear()}}),ee),...(QS(en={},"flash.display::Shape",class{get graphics(){return ms(A,this)}}),en),...(QS(eE={},"flash.display::Shader",class{get data(){return this.$data??null}set data(A){this.$data=A??null}get precisionHint(){return this.$precision??"full"}set precisionHint(t){let e=null==t?null:A.rt.toString(t);if("full"!==e&&"fast"!==e)throw A.rt.error("ArgumentError",2004);this.$precision=e}}),eE),...(QS(ea={},"flash.display::ShaderData",class{"flash.display:ShaderData::_setByteCode"(t){let e;if(null==t)throw A.rt.error("TypeError",2007,"byteCode");let g=i3(A.rt,t);try{e=function(A){let t=new AJ(A),e={name:null,metadata:[],parameters:[],inputs:[],operations:[]},g=null,i=0,I=[],B=()=>{throw new Am(2004)};for(;!t.done;){let A=t.u8();switch(A){case 165:1!==t.i32()&&B();break;case 164:e.name=t.string(t.u16());break;case 160:case 162:{let i=t.u8(),I=t.cstring();if(0===i||i>=Au.length)throw new Am(2030);let Q=function(A,t){if(12===t)return A.cstring();let e=[];for(let g=0;g<AD[t];g++)e.push(Af(t)?A.f32():A.u16());return e}(t,i);160===A?(12!==i&&8!==i&&B(),e.metadata.push({key:I,type:i,value:Q})):g?.metadata.push({key:I,type:i,value:Q});break}case 161:{let A=t.u8(),i=t.u8(),I=t.u16(),Q=t.u8(),C=t.cstring(),r=2===A;(12===i||"name"===C||r&&!Af(i))&&B();let s=i-5+2,o=s>=2&&s<=4?AS(I,s):Ak(I,15&Q),n={name:C,type:i,output:r,register:o,metadata:[]};r&&o.matrix&&B(),e.parameters.push(n),g=n;break}case 163:{let A=t.u8(),i=t.u8();e.inputs.push({name:t.cstring(),index:A,channels:i}),g=null;break}case 0:{let A=t.u24(),e=t.u24();(0!==A||0!==e)&&B();break}case 50:{let g=Ak(t.u16(),t.u8()>>4),i=g.int?65535&t.i32():t.f32();0===g.size&&B(),e.operations.push({op:A,dst:g,value:i});break}case 48:case 49:{let g=t.u16(),i=t.u8(),I=AN(t.u24(),(3&i)+1),Q=t.u8(),C=Ak(g,i>>4);(C.int||0===C.size)&&B(),e.operations.push({op:A,dst:C,src:I,texture:Q});break}case 52:{t.skip(3);let g=AN(t.u24(),1);t.skip(1),g.int||B(),i++,I.push(!1),e.operations.push({op:A,src:g});break}case 53:case 54:t.skip(7),(0===i||53===A&&I[I.length-1])&&B(),53===A?I[I.length-1]=!0:(i--,I.pop()),e.operations.push({op:A});break;case 51:{let g=Ak(t.u16(),t.u8()>>4),i=AN(t.u24(),1);t.skip(1);let I=AN(t.u24(),g.size);t.skip(1);let Q=AN(t.u24(),g.size);t.skip(1),i.int&&g.int===I.int&&I.int===Q.int&&0!==g.size||B(),e.operations.push({op:A,dst:g,condition:i,a:I,b:Q});break}default:{let g=t.u16(),i=t.u8(),I=t.u24();t.skip(1);let Q=Ap.get(A)??B(),C=(3&i)+1,r=i>>2&3;if(0===r){let t=Ak(g,i>>4),r=AN(I,C);(0===t.size||!function(A,t,e){let g=t.int?2:1,i=e.int?2:1;for(let t=0;t<A.kinds.length;t+=2)if(A.kinds[t]===g&&A.kinds[t+1]===i)return!0;return!1}(Q,t,r)||!function(A,t,e){switch(A.sizes){case"same":return t===e;case"any":return!0;case"scalar":return 1===t&&1===e;case"vector":return t===e&&e>=2;case"length":return 1===t&&e>=2;case"cross":return 3===t&&3===e}}(Q,t.size,r.size))&&B(),e.operations.push({op:A,dst:t,src:r});break}let s=r+1,o=AS(I,s),n=34===A||33===A,E=n?Ak(g,i>>4):AS(g,s);(!AM.includes(A)||I>>>16!=0||1!==C||o.int||E.int||(n?E.size!==s:i>>4!=0))&&B(),e.operations.push({op:A,dst:E,src:o})}}}return 0===i&&e.parameters.some(A=>A.output)||B(),e}(g.buffer.subarray(0,g.length))}catch(t){if(!(t instanceof Am))throw t;throw 2030===t.errorID?A.rt.error("flash.errors::EOFError",2030):A.rt.error("ArgumentError",2004)}finally{g.position=g.length}this.$kernel=e;let i=this.$d;for(let A of e.metadata)i.set(A.key,"string"==typeof A.value?A.value:A.value[0]);null!==e.name&&i.set("name",e.name);let I=0;for(let t of e.parameters){if(t.output||t.name===D8)continue;let e=A.rt.construct(A.rt.classNamed("flash.display::ShaderParameter"));for(let g of(e.$type=Au[t.type]??null,e.$index=I++,e.$value=null,t.metadata))e.$d.set(g.key,fm(A,g.value)),"defaultValue"===g.key&&(e.$value=12===g.type?null:fm(A,g.value));e.$d.set("name",t.name),i.set(t.name,e)}for(let t of e.inputs){let e=A.rt.construct(A.rt.classNamed("flash.display::ShaderInput"));e.$channels=t.channels,e.$index=t.index,e.$d.set("name",t.name),i.set(t.name,e)}}}),ea),...(QS(el={},"flash.display::ShaderInput",class{get input(){return this.$input??null}set input(t){if(!fR(A,t))throw A.rt.error("ArgumentError",2004);this.$input=t}get width(){return this.$width??0}set width(t){this.$width=A.rt.toInt(t)}get height(){return this.$height??0}set height(t){this.$height=A.rt.toInt(t)}get channels(){return this.$channels??0}get index(){return this.$index??0}}),el),...(QS(eh={},"flash.display::ShaderParameter",class{get value(){return this.$value??null}set value(A){this.$value=A??null}get type(){return this.$type??null}get index(){return this.$index??0}}),eh),...(ec={},ew=t=>A.rt.isInstance(t,fF(A).bitmapData),ed=t=>A.rt.isInstance(t,fF(A).vector),eu=(t,...e)=>{throw A.rt.error("ArgumentError",t,...e)},eD=(t,e,g)=>{if(ew(t)){let A=t.$store;if(A.disposed)return;let i=new Uint32Array(A.width*A.height);for(let t=0,I=0;t<i.length;t++,I+=g)i[t]=ft(e,I,g,A.transparent);A.pixels=i,A.changed();return}if(ed(t)){if(t.$fixed&&t.$a.length!==e.length)throw A.rt.error("RangeError",1126);A.rt.setElements(t,Array.from(e));return}let i=i3(A.rt,t),I=new Uint8Array(4*e.length),B=new DataView(I.buffer);for(let A=0;A<e.length;A++)B.setFloat32(4*A,e[A],i.littleEndian);i.setLength(0),i.position=0,i.write(I)},QS(ec,"flash.display::ShaderJob",class{get shader(){return this.$jobShader??null}set shader(A){this.$jobShader=A??null}get target(){return this.$jobTarget??null}set target(A){this.$jobTarget=A??null}get width(){return this.$jobWidth??0}set width(t){this.$jobWidth=A.rt.toInt(t)}get height(){return this.$jobHeight??0}set height(t){this.$jobHeight=A.rt.toInt(t)}get progress(){return this.$jobProgress??0/0}start(t){let e;(this.$jobState??0)!==0&&eu(2172);let g=this.$jobShader??null;if(null===g)throw A.rt.error("TypeError",2007,"shader");let i=g.$data??null;null!==i&&i.$kernel||eu(2171);let I=ff(i.$kernel),B=this.$jobTarget??null,Q=this.$jobWidth??0,C=this.$jobHeight??0;if(ew(B)){let A=B.$store,t=I.output.type;(!A||A.disposed||3!==t&&4!==t)&&eu(2162),Q=A.width,C=A.height}else(!fR(A,B)||Q<=0||C<=0)&&eu(2004);let r=I.kernel,s=new Map,o=[];for(let t of r.inputs){let e=fN(A,i,t.name,t.channels,o);s.set(t.index,e)}for(let A of I.sampled)s.has(A)||eu(2167);let n=fp(A,i,r);for(let A of o)A();try{e=new Float32Array(Q*C*I.channels)}catch(A){throw A instanceof RangeError&&eu(2004),A}let E=ed(B)?B:null;if(E?.$fixed&&E.$a.length!==e.length)throw A.rt.error("RangeError",1126);if(I.run(n,s,Q,C,e),t){eD(B,e,I.channels),this.$jobState=2,this.$jobProgress=1;return}this.$jobState=1,this.$jobProgress=1,A.afterExitFrame.push(()=>{if(1!==this.$jobState)return;this.$jobState=2,eD(B,e,I.channels);let t=A.rt.construct(fF(A).shaderEvent,"complete",!1,!1,ew(B)?B:null,A.rt.isInstance(B,fF(A).byteArray)?B:null,E);cK(A,this,t)})}cancel(){1===this.$jobState&&(this.$jobState=2,this.$jobProgress=0)}}),ec),...(ef={},em=(A,t)=>{let e=f0(A),g="hitTest"===t?e.hitTestState:e.stateObject(t);return g?.object??null},eG=(t,e,g)=>{let i=f0(t),I=null==g?null:f0(g);switch(I?.parent&&I.parent!==i&&!I.encloses(i)&&I.parent.removeChild(I),e){case"up":i.upState=I;break;case"over":i.overState=I;break;case"down":i.downState=I;break;default:i.hitTestState=I}i.show(),I?.encloses(i)&&e===i.state&&A.reportUncaught(A.rt.error("ArgumentError",2150))},QS(ef,"flash.display::SimpleButton",class{"flash.display:SimpleButton::_updateButton"(){f0(this).show()}get upState(){return em(this,"up")}set upState(A){eG(this,"up",A)}get overState(){return em(this,"over")}set overState(A){eG(this,"over",A)}get downState(){return em(this,"down")}set downState(A){eG(this,"down",A)}get hitTestState(){return em(this,"hitTest")}set hitTestState(A){eG(this,"hitTest",A)}get enabled(){return f0(this).enabled}set enabled(A){f0(this).enabled=!!A,oT.changes++}get useHandCursor(){return f0(this).useHandCursor}set useHandCursor(A){f0(this).useHandCursor=!!A}get trackAsMenu(){return f0(this).trackAsMenu}set trackAsMenu(A){f0(this).trackAsMenu=!!A}get soundTransform(){return my(A,cq(A))}set soundTransform(t){mR(A,t)}}),ef),...(QS(eF={},"flash.utils::Timer",class{get running(){return A.timers.timerRunning(this)}"flash.utils:Timer::_start"(t,e){A.timers.startTimer(this,Number(t),e)}stop(){A.timers.stopTimer(this)}"flash.utils:Timer::_timerDispatch"(){cK(A,this,A.rt.construct(A.rt.classNamed("flash.events::TimerEvent"),"timer"))}}),eF),...(QS(eR={},"flash.text::StaticText",class{get text(){let A=f0(this);return A instanceof Ey?A.glyphs.text:null}}),eR),...(ey={},ep=new WeakMap,QS(ey,"flash.text::Font",class{get fontName(){return this.$font?.name??null}get fontStyle(){var A;return this.$font?(A=this.$font).bold&&A.italic?"boldItalic":A.bold?"bold":A.italic?"italic":"regular":null}get fontType(){return this.$font?"fontCff"===this.$font.type?"embeddedCFF":"embedded":null}hasGlyphs(A){let t=this.$font;if(!t)return!1;if("fontCff"===t.type)return 0===A.length;let e=ep.get(t);e||(e=new Set(t.font.glyphs.map(A=>A.code)),ep.set(t,e));for(let t=0;t<A.length;t++)if(!e.has(A.charCodeAt(t)))return!1;return!0}static enumerateFonts(t){let e=A.rt.classNamed("flash.text::Font"),g=[];for(let t of FQ(A,!1))g.push({font:t,cls:e});for(let[t,e]of A.symbols.registeredFonts)g.push({font:e,cls:t});return g.sort((A,t)=>{let e=A.font.name.toLowerCase(),g=t.font.name.toLowerCase();return e<g?-1:+(e>g)}),A.rt.array(g.map(({font:t,cls:e})=>{let g=A.rt.construct(e);return g.$font=t,g}))}static registerFont(t){let e=t?.$it&&A.symbols.fontSymbol(t.$it);if(!e)throw A.rt.error("ArgumentError",1508,"font");A.symbols.registerFont(t,e)}}),ey),...(eM={},eJ=(t,e)=>{if(null==t)throw A.rt.error("TypeError",2007,e);let g=A.rt.toString(t);if(Fi[e]&&!Fi[e].includes(g))throw A.rt.error("ArgumentError",2008,e);return g},ek=(t,e,g)=>{let i=FI(t);if(i.locked)throw A.rt.error("Error",2185);i[e]=eJ(g,e)},eN=(t,e,g,i)=>{if(!i&&null==t)return!1;let I=eJ(t,"fontName"),B=eJ(e,"fontWeight"),Q=eJ(g,"fontPosture"),C="bold"===B,r="italic"===Q;if(!i)return[...A.code.codeLibrary()?.characters.values()??[],...A.symbols.registeredFonts.values()].some(A=>"fontCff"===A.type&&A.name.toLowerCase()===I.toLowerCase()&&A.bold===C&&A.italic===r);if(["_sans","_serif","_typewriter"].includes(I.toLowerCase()))return!1;let s=Er(I,48,C,r),o=["M","W","i","1","@"];if("Linux"===A.platform.os){let A={arial:"Liberation Sans","times new roman":"Liberation Serif","courier new":"Liberation Mono"}[I.toLowerCase()];if(A){let t=Er(A,48,C,r);if(o.every(A=>s.advance(A)===t.advance(A)))return!1}}let n=Er("__swf2es_missing_font__",48,C,r);return o.some(A=>s.advance(A)!==n.advance(A))},QS(eM,"flash.text.engine::FontDescription",class{get fontName(){return FI(this).fontName}set fontName(A){ek(this,"fontName",A)}get fontWeight(){return FI(this).fontWeight}set fontWeight(A){ek(this,"fontWeight",A)}get fontPosture(){return FI(this).fontPosture}set fontPosture(A){ek(this,"fontPosture",A)}get fontLookup(){return FI(this).fontLookup}set fontLookup(A){ek(this,"fontLookup",A)}get renderingMode(){return FI(this).renderingMode}set renderingMode(A){ek(this,"renderingMode",A)}get cffHinting(){return FI(this).cffHinting}set cffHinting(A){ek(this,"cffHinting",A)}get locked(){return FI(this).locked}set locked(t){let e=FI(this);if(e.locked)throw A.rt.error("Error",2185);e.locked=!!t}static isFontCompatible(A,t,e){return eN(A,t,e,!1)}static isDeviceFontCompatible(A,t,e){return eN(A,t,e,!0)}}),eM),...(QS(eS={},"flash.text.engine::TabStop",class{get alignment(){return FB(this).alignment}set alignment(t){if(null==t)throw A.rt.error("TypeError",2007,"alignment");let e=A.rt.toString(t);if(!["start","center","end","decimal"].includes(e))throw A.rt.error("ArgumentError",2008,"alignment");FB(this).alignment=e}get position(){return FB(this).position}set position(t){let e=Number(t);if(e<0)throw A.rt.error("ArgumentError",2004);FB(this).position=e}get decimalAlignmentToken(){return FB(this).decimalAlignmentToken}set decimalAlignmentToken(t){if(null==t)throw A.rt.error("TypeError",2007,"decimalAlignmentToken");FB(this).decimalAlignmentToken=A.rt.toString(t)}}),eS),...(eb={},eU=A=>(A.$format??=Ed(),A.$format),eY=t=>{let e=A.rt.construct(A.rt.classNamed("flash.text::TextFormat"));return e.$format={...t,tabStops:t.tabStops?[...t.tabStops]:null},e},eH=A=>{A.$display.invalidate(4),A.$display.deferFit()},eL=(t,e)=>{let g=A.rt.toInt(e);if(g<0||g>=t.layout.lines.length)throw A.rt.error("RangeError",2006);return g},eZ=(t,e,g)=>{let i=t.model.text.length,I=void 0===e||-1===A.rt.toInt(e)?0:A.rt.toInt(e),B=void 0===g||-1===A.rt.toInt(g)?i:A.rt.toInt(g);if(I<0||B<I||B>i)throw A.rt.error("RangeError",2006);return[I,B]},eK=(t,e,g)=>{let i=A.rt.toString(t);if(!e.includes(i))throw A.rt.error("ArgumentError",2008,g);return i},ex=A=>{let t=A.model.text.length;A.select(t,t)},ev=A=>{"input"!==A.type&&ex(A)},eV=(t,e)=>{let g=t.styleSheet.$styles??null;t.htmlSource=e,t.model.setHtml(e,t.multiline,A.trimTrailingHtmlBreak,t=>{let e=g?A.rt.getProperty(g,A.rt.publicName(t)):null;return e&&"object"==typeof e?eU(e):null})},QS(eb,"flash.text::TextFormat",class{get font(){return eU(this).font}set font(t){eU(this).font=null==t?null:A.rt.toString(t)}get size(){return eU(this).size}set size(t){eU(this).size=null==t?null:Fs(A.rt.toNumber(t))}get color(){return eU(this).color}set color(t){eU(this).color=null==t?null:Fs(A.rt.toNumber(t))}get bold(){return eU(this).bold}set bold(A){eU(this).bold=null==A?null:!!A}get italic(){return eU(this).italic}set italic(A){eU(this).italic=null==A?null:!!A}get underline(){return eU(this).underline}set underline(A){eU(this).underline=null==A?null:!!A}get url(){return eU(this).url}set url(t){eU(this).url=null==t?null:A.rt.toString(t)}get target(){return eU(this).target}set target(t){eU(this).target=null==t?null:A.rt.toString(t)}get align(){return eU(this).align}set align(A){eU(this).align=null==A?null:eK(A,Fr,"align")}get leftMargin(){return eU(this).leftMargin}set leftMargin(t){eU(this).leftMargin=null==t?null:Fs(A.rt.toNumber(t))}get rightMargin(){return eU(this).rightMargin}set rightMargin(t){eU(this).rightMargin=null==t?null:Fs(A.rt.toNumber(t))}get indent(){return eU(this).indent}set indent(t){eU(this).indent=null==t?null:Fs(A.rt.toNumber(t))}get leading(){return eU(this).leading}set leading(t){eU(this).leading=null==t?null:Fs(A.rt.toNumber(t))}get blockIndent(){return eU(this).blockIndent}set blockIndent(t){eU(this).blockIndent=null==t?null:Fs(A.rt.toNumber(t))}get letterSpacing(){return eU(this).letterSpacing}set letterSpacing(t){eU(this).letterSpacing=null==t?null:A.rt.toNumber(t)}get kerning(){return eU(this).kerning}set kerning(A){eU(this).kerning=null==A?null:!!A}get bullet(){return eU(this).bullet}set bullet(A){eU(this).bullet=null==A?null:!!A}get tabStops(){let t=eU(this).tabStops;return null===t?null:A.rt.array(t)}set tabStops(t){let e=t?.$a??null;eU(this).tabStops=null===e?null:e.map(t=>Fs(A.rt.toNumber(t)))}get display(){return eU(this).display}set display(t){let e=null==t?null:A.rt.toString(t);eU(this).display="block"===e||"inline"===e||"none"===e?e:null}}),QS(eb,"flash.text::TextField",class{get text(){return this.$display.model.text}set text(t){if(null==t)throw A.rt.error("TypeError",2007,"value");let e=this.$display,g=A.rt.toString(t),i="input"!==e.type&&g!==e.model.text;e.styleSheet?eV(e,g):e.model.setText(g),i&&e.select(0,0),eH(this)}get htmlText(){let A=this.$display;return A.styleSheet&&null!==A.htmlSource?A.htmlSource:A.model.toHtml()}set htmlText(t){if(null==t)throw A.rt.error("TypeError",2007,"value");if(this.$display.styleSheet){let e=A.rt.toString(t);e!==this.$display.htmlSource&&(eV(this.$display,e),ev(this.$display),eH(this));return}this.$display.model.setHtml(A.rt.toString(t),this.$display.multiline,A.trimTrailingHtmlBreak),ev(this.$display),eH(this)}get length(){return this.$display.model.text.length}getRawText(){return this.$display.model.text}appendText(t){let e=this.$display.model;e.replace(e.text.length,e.text.length,A.rt.toString(t)),"input"!==this.$display.type&&ex(this.$display),eH(this)}replaceText(t,e,g){if(this.$display.styleSheet)throw A.rt.error("Error",2009);let i=this.$display.model,I=Math.max(0,Math.min(i.text.length,A.rt.toInt(t))),B=Math.max(I,Math.min(i.text.length,A.rt.toInt(e))),Q=A.rt.toString(g);i.replace(I,B,Q),"input"!==this.$display.type&&this.$display.select(I+Q.length,I+Q.length),eH(this)}get textColor(){let A=this.$display.model;return(A.formats[0]??A.defaultFormat).color>>>0}set textColor(t){let e=A.rt.toUint(t),g=this.$display.model;g.defaultFormat={...g.defaultFormat,color:e};let i=Ed();i.color=e,g.setFormat(i,0,g.text.length),eH(this)}get defaultTextFormat(){return eY(this.$display.model.defaultFormat)}set defaultTextFormat(t){if(null==t)throw A.rt.error("TypeError",2007,"format");let e=this.$display.model;e.defaultFormat=Eu(e.defaultFormat,eU(t))}getTextFormat(A=-1,t=-1){let e=this.$display,[g,i]=eZ(e,A,t);return eY(e.model.formatOf(g,i))}setTextFormat(t,e=-1,g=-1){if(null==t)throw A.rt.error("TypeError",2007,"format");let i=this.$display,[I,B]=eZ(i,e,g);i.model.setFormat(eU(t),I,B),eH(this)}get type(){return this.$display.type}set type(A){this.$display.type=eK(A,["dynamic","input"],"type"),eH(this)}get autoSize(){return this.$display.autoSize}set autoSize(A){this.$display.autoSize=eK(A,["none","left","right","center"],"autoSize"),this.$display.deferFit()}get antiAliasType(){return this.$display.antiAliasType}set antiAliasType(t){let e=A.rt.toString(t);("normal"===e||"advanced"===e)&&e!==this.$display.antiAliasType&&(this.$display.antiAliasType=e,eH(this))}get gridFitType(){return this.$display.gridFitType}set gridFitType(t){let e=A.rt.toString(t);this.$display.gridFitType="pixel"===e||"subpixel"===e?e:"none",this.$display.invalidate(4)}get border(){return this.$display.border}set border(A){this.$display.border=!!A,eH(this)}get borderColor(){return this.$display.borderColor}set borderColor(t){this.$display.borderColor=0xffffff&A.rt.toUint(t),eH(this)}get background(){return this.$display.background}set background(A){this.$display.background=!!A,eH(this)}get backgroundColor(){return this.$display.backgroundColor}set backgroundColor(t){this.$display.backgroundColor=0xffffff&A.rt.toUint(t),eH(this)}get multiline(){return this.$display.multiline}set multiline(A){this.$display.multiline=!!A,eH(this)}get wordWrap(){return this.$display.wordWrap}set wordWrap(A){this.$display.wordWrap=!!A,eH(this)}get embedFonts(){return this.$display.embedFonts}set embedFonts(A){this.$display.embedFonts=!!A,eH(this)}get selectable(){return this.$display.selectable}set selectable(A){this.$display.selectable=!!A}get displayAsPassword(){return this.$display.displayAsPassword}set displayAsPassword(A){this.$display.displayAsPassword=!!A,eH(this)}get condenseWhite(){return this.$display.condenseWhite}set condenseWhite(A){this.$display.condenseWhite=!!A}get maxChars(){return this.$display.maxChars}set maxChars(t){this.$display.maxChars=A.rt.toInt(t)}get restrict(){return this.$display.restrict}set restrict(t){this.$display.restrict=null==t?null:A.rt.toString(t)}get sharpness(){return this.$display.sharpness}set sharpness(t){this.$display.sharpness=A.rt.toNumber(t),this.$display.invalidate(4)}get thickness(){return this.$display.thickness}set thickness(t){this.$display.thickness=A.rt.toNumber(t),this.$display.invalidate(4)}get mouseWheelEnabled(){return this.$display.mouseWheelEnabled}set mouseWheelEnabled(A){this.$display.mouseWheelEnabled=!!A}get alwaysShowSelection(){return this.$display.alwaysShowSelection}set alwaysShowSelection(A){this.$display.alwaysShowSelection=!!A}get useRichTextClipboard(){return this.$display.useRichTextClipboard}set useRichTextClipboard(A){this.$display.useRichTextClipboard=!!A}get textWidth(){return this.$display.layout.width/20}get textHeight(){return this.$display.layout.height/20}get numLines(){return this.$display.layout.lines.length}getLineMetrics(t){let e=this.$display.layout.lines[eL(this.$display,t)];return A.rt.construct(A.rt.classNamed("flash.text::TextLineMetrics"),e.x/20,e.width/20,(e.ascent+e.descent+e.leading)/20,e.ascent/20,e.descent/20,e.leading/20)}getLineLength(A){let t=this.$display.layout.lines[eL(this.$display,A)];return t.end-t.start}getLineOffset(A){return this.$display.layout.lines[eL(this.$display,A)].start}getLineText(A){let t=this.$display.layout.lines[eL(this.$display,A)];return this.$display.model.text.slice(t.start,t.end)}getLineIndexOfChar(t){let e=A.rt.toInt(t),g=this.$display;return e<0||e>=g.model.text.length?-1:EE(g.layout,e)}getCharBoundaries(t){let e=A.rt.toInt(t),g=this.$display;if(e<0||e>=g.model.text.length)return null;let i=g.layout.lines[EE(g.layout,e)],I=i.chars[e-i.start];return I?.shown?A.rt.construct(A.rt.classNamed("flash.geom::Rectangle"),I.x/20,i.y/20,I.advance/20,(i.ascent+i.descent)/20):null}getLineIndexAtPoint(t,e){return Fo(this.$display,20*A.rt.toNumber(t),20*A.rt.toNumber(e))}getCharIndexAtPoint(t,e){let g=this.$display,i=20*A.rt.toNumber(t),I=Fo(g,i,20*A.rt.toNumber(e));if(I<0)return -1;for(let A of g.layout.lines[I].chars)if(A.shown&&i>=A.x&&i<A.x+A.advance)return A.index;return -1}get scrollV(){return this.$display.scrollV}set scrollV(t){let e=this.$display;e.scrollV=Math.max(1,Math.min(A.rt.toInt(t),El(e))),eH(this)}get maxScrollV(){return El(this.$display)}get bottomScrollV(){let A=this.$display;return A.scrollV+Ea(A,A.scrollV-1)-1}get scrollH(){return this.$display.scrollH}set scrollH(t){this.$display.scrollH=Math.max(0,A.rt.toInt(t)),this.$display.invalidate(4)}get maxScrollH(){return 0}get selectionBeginIndex(){return this.$display.selection[0]}get selectionEndIndex(){return this.$display.selection[1]}get selectedText(){let[A,t]=this.$display.selection;return this.$display.model.text.slice(A,t)}get caretIndex(){return this.$display.caret}setSelection(t,e){this.$display.select(A.rt.toInt(t),A.rt.toInt(e))}replaceSelectedText(t){if(this.$display.styleSheet)throw A.rt.error("Error",2009);let e=this.$display,[g,i]=e.selection,I=A.rt.toString(t);e.model.replace(g,i,I),e.select(g+I.length,g+I.length),eH(this)}getTextRuns(t=0,e=0x7fffffff){let g=this.$display.model,i=Math.max(0,A.rt.toInt(t)),I=Math.min(g.text.length,A.rt.toInt(e)),B=[];for(let[t,e]of g.runs(i,I))B.push(A.rt.construct(A.rt.classNamed("flash.text::TextRun"),t,e,eY(g.formatOf(t,e))));return A.rt.array(B)}getFirstCharInParagraph(t){return Fn(this.$display.model.text,A.rt.toInt(t))[0]}getParagraphLength(t){return Fn(this.$display.model.text,A.rt.toInt(t))[1]}getImageReference(t){if(null==t)throw A.rt.error("TypeError",2007,"name");return null}static isFontCompatible(t,e){if(null==t)return!1;let g=A.rt.toString(t).toLowerCase(),i=null==e?"":A.rt.toString(e),I="bold"===i||"boldItalic"===i,B="italic"===i||"boldItalic"===i;return FQ(A).some(A=>"font"===A.type&&A.name.toLowerCase()===g&&A.bold===I&&A.italic===B)}get textInteractionMode(){return"normal"}get styleSheet(){return this.$display.styleSheet}set styleSheet(A){let t,e=this.$display,g=A??null;if(e.styleSheet=g,!g){e.htmlSource=null,e.restyle=null;return}if(null===e.htmlSource){e.restyle=null;return}(t=FC.get(g))||(t=new Set,FC.set(g,t)),t.add(e.ref),e.restyle=()=>{null!==e.htmlSource&&(eV(e,e.htmlSource),eH({$display:e}))}}}),eb),...(eW="default",eq=4,eT="default",QS(eX={},"flash.text::TextRenderer",class{static get displayMode(){return"default"===eW?"crt":eW}static set displayMode(t){if(null==t)return;let e=A.rt.toString(t);eW="lcd"===e||"crt"===e?e:"default"}static get maxLevel(){return eq}static set maxLevel(t){let e=A.rt.toInt(t);(3===e||4===e||7===e)&&(eq=e)}static get antiAliasType(){return eT}static set antiAliasType(t){if(null==t)throw A.rt.error("TypeError",2007,"antialiasType");let e=A.rt.toString(t);eT="on"===e||"default"===e?e:"off"}static setAdvancedAntiAliasingTable(t,e,g,i){var I,B,Q;let C,r;for(let[i,I]of[["fontName",t],["fontStyle",e],["colorType",g]])if(null==I)throw A.rt.error("TypeError",2007,i);let s=i?.$a;if(!s)return;let o=A.rt.classNamed("flash.text::CSMSettings");for(let t of s)if(!A.rt.isInstance(t,o))throw A.rt.error("TypeError",2005,4,"CSMSettings");let n=(t,e)=>A.rt.toNumber(A.rt.prop(t,e));I=A.rt.toString(t),B=A.rt.toString(e),Q=s.map(A=>[n(A,"fontSize"),n(A,"insideCutoff"),n(A,"outsideCutoff")]),C=`${I}\0${B}`,0===(r=Q.filter(A=>A.every(Number.isFinite))).length?FE.delete(C):(r.sort((A,t)=>A[0]-t[0]),FE.set(C,r.flat()))}}),eX),...(QS(eP={},"flash.trace::Trace",class{static setLevel(A,t){}static getLevel(A){return 0}static setListener(A){}static getListener(){return null}}),eP),...(eO={},ej=(t,e)=>{if(null==t)throw A.rt.error("TypeError",2007,e);return t},ez=(t,e)=>A.rt.toNumber(A.rt.prop(t,e)),e$=(t,e)=>{if(!(t.$a.length>=e)){if(t.$fixed)throw A.rt.error("RangeError",1126,t.$a.length,e);for(;t.$a.length<e;)t.$a.push(0)}},e_=A=>["x","y","z"].map(t=>ez(A,t)),QS(eO,"flash.geom::Utils3D",class{static pointTowards(t,e,g,i=null,I=null){let B=ej(e,"fromMat").$matrix3D,Q=e_(ej(g,"target")),C=od(B[12],B[13],B[14]),r=oS(C,Q,null==i?[0,1,0]:e_(i),null==I?[0,0,1]:e_(I)),s=A.rt.construct(A.rt.classNamed("flash.geom::Matrix3D")),o=s.$matrix3D;if(!r)return o.set(B),s;let n=Math.max(0,Math.min(1,A.rt.toNumber(t)));o.set(oM(B,r,n));for(let A=0;A<3;A++)o[12+A]=B[12+A]+(C[12+A]-B[12+A])*n;return o[15]=1,s}static projectVector(t,e){let g=ej(t,"m").$matrix3D,i=ej(e,"v"),[I,B,Q,C]=op(g,ez(i,"x"),ez(i,"y"),ez(i,"z")),r=mH(1/C);return A.rt.construct(A.rt.classNamed("flash.geom::Vector3D"),I*r,B*r,Q*r,C)}static projectVectors(A,t,e,g){let i=ej(A,"m").$matrix3D,I=ej(t,"verts").$a,B=ej(e,"projectedVerts"),Q=ej(g,"uvts");e$(Q,I.length),e$(B,2*Math.floor(I.length/3));for(let A=0,t=0;A+2<I.length;A+=3,t+=2){let[e,g,,C]=op(i,Number(I[A]),Number(I[A+1]),Number(I[A+2]));B.$a[t]=e/C,B.$a[t+1]=g/C,Q.$a[A+2]=1/C}}}),eO),...(e0={},e1=t=>t&&t!==A.stage?A.stageWidth:500,e2=t=>t.$display?oL(fE(A,t.$display).fieldOfView,e1(t.$display)):oL(t.$fieldOfView*fn,500),e3=(t,e)=>{t.projection={...fE(A,t),...e},t.invalidate(1)},QS(e0,"flash.geom::PerspectiveProjection",class{"flash.geom:PerspectiveProjection::ctor"(){this.$display=null,this.$fieldOfView=55,this.$centerX=250,this.$centerY=250}get fieldOfView(){return this.$display?180*fE(A,this.$display).fieldOfView/Math.PI:this.$fieldOfView}set fieldOfView(t){let e=A.rt.toNumber(t);if(!(e>0&&e<180))throw A.rt.error("ArgumentError",2182);this.$display?e3(this.$display,{fieldOfView:e*Math.PI/180}):this.$fieldOfView=e}get focalLength(){return e2(this)}set focalLength(t){let e=A.rt.toNumber(t);if(!(e>0))throw A.rt.error("ArgumentError",2186,e);let g=2*Math.atan(e1(this.$display)/2/e);this.$display?e3(this.$display,{fieldOfView:g}):this.$fieldOfView=180*g/Math.PI}get projectionCenter(){let t=this.$display?fE(A,this.$display):null;return A.rt.construct(A.rt.classNamed("flash.geom::Point"),t?t.centerX:this.$centerX,t?t.centerY:this.$centerY)}set projectionCenter(t){if(null==t)throw A.rt.error("TypeError",2007,"projectionCenter");let e=A.rt.toNumber(A.rt.prop(t,"x")),g=A.rt.toNumber(A.rt.prop(t,"y"));this.$display?e3(this.$display,{centerX:e,centerY:g}):(this.$centerX=e,this.$centerY=g)}toMatrix3D(){let t=e2(this),e=A.rt.construct(A.rt.classNamed("flash.geom::Matrix3D"));return e.$matrix3D.set([t,0,0,0,0,t,0,0,0,0,1,1,0,0,0,0]),e}}),e0),...(QS(e8={},"flash.text::StyleSheet",class{get"flash.text:StyleSheet::_styles"(){return this.$styles??null}set"flash.text:StyleSheet::_styles"(A){this.$styles=A}"flash.text:StyleSheet::_update"(){let A=FC.get(this);for(let t of A??[]){let e=t.deref();if(!e||e.styleSheet!==this){A?.delete(t);continue}e.restyle?.()}}"flash.text:StyleSheet::_parseCSSInternal"(t){let e=w6(A.rt.toString(t));if(!e)return null;let g=[];for(let[t,i]of e){let e=[];for(let[A,t]of i)e.push(w7(A),t);g.push(t.toLowerCase(),A.rt.newObject(e))}return A.rt.newObject(g)}"flash.text:StyleSheet::_parseCSSFontFamily"(t){return dA(A.rt.toString(t))}"flash.text:StyleSheet::_parseColor"(t){var e=A.rt.toString(t);if(!e.startsWith("#"))return 0;let g=e.slice(1).trimEnd();return g.length<=6&&/^[0-9a-fA-F]+$/.test(g)?Number.parseInt(g,16):0}}),e8),...(e9={},e4=new WeakMap,e5={host:A.fileHost,signal:A.fileLifetime.signal,defer:t=>A.loads.deferHostEvent(t),track:t=>A.loads.trackRequest(t),fetch:(t,e)=>A.fetch?A.fetch({...t,purpose:"data"},e):Promise.reject(),error:t=>{throw A.rt.error("Error",t)},responseStatus:A.air},e6=t=>{let e=e4.get(t);return e||(e=new cr(e5,(e,g,i,I,B)=>{let Q;switch(e){case"httpStatus":Q=A.httpStatus(g??0);break;case"httpResponseStatus":Q=B?A.httpResponseStatus(B,I??""):null;break;case"progress":Q=A.rt.construct(A.rt.classNamed("flash.events::ProgressEvent"),e,!1,!1,g,i);break;case"ioError":t.$fileInto=null,Q=A.rt.construct(A.rt.classNamed("flash.events::IOErrorEvent"),e,!1,!1,I);break;case"uploadCompleteData":Q=A.rt.construct(A.rt.classNamed("flash.events::DataEvent"),e,!1,!1,I);break;case"complete":{let g=t.$fileInto,i=e4.get(t)?.data;if(g&&i){let e=i3(A.rt,g);e.length=0,e.position=0,e.write(i),e.position=0,t.$fileData=g}t.$fileInto=null,Q=A.event(e);break}case"select":t.$fileData=null,t.$fileInto=null,Q=A.event(e);break;default:Q=A.event(e)}Q&&cK(A,t,Q)}),e4.set(t,e)),e},e7=(t,e)=>A.rt.getProperty(t,A.rt.publicName(e)),gA=t=>(t?.$a??[]).map(t=>({description:A.rt.toString(e7(t,"description")),extension:A.rt.toString(e7(t,"extension"))})),gt=t=>{if(null==t)throw A.rt.error("TypeError",2007,"request");return t},ge=t=>(t=>{let e,g=(e=D$(t))?{name:new DV(A.fileSystem?.separator??"/").name(e.path),stat:A.fileSystem?.stat(e.path)??null}:null;if(!g)return null;let i=g.stat,I=()=>{throw A.rt.error("Error",3003)};return{name:g.name,get size(){return i?i.directory?0:i.size:I()},get modificationDate(){return i?i.modified:I()},get creationDate(){return i?i.created:I()},directory:i?.directory??!1}})(t)??e6(t).file??e5.error(2037),QS(e9,"flash.net::FileReference",class{get creationDate(){let t=ge(this);return A.rt.construct(A.rt.classNamed("Date"),t.creationDate??t.modificationDate)}get modificationDate(){return A.rt.construct(A.rt.classNamed("Date"),ge(this).modificationDate)}get name(){return ge(this).name}get size(){return ge(this).size}get type(){let{name:A,directory:t}=ge(this);if(t)return"";let e=A.lastIndexOf(".");return e<0?"":A.slice(e)}get creator(){return null}get data(){return this.$fileData??null}browse(A=null){return e6(this).browse(gA(A)),!0}cancel(){e6(this).cancel(),this.$fileInto=null}download(t,e=null){let g=A.loads.fetchRequest(gt(t),A.url,{requestHeaders:!1}),i=null==e?g.url.split(/[?#]/,1)[0].split("/").pop()||"download":A.rt.toString(e);e6(this).save(i,g)}upload(t,e="Filedata",g=!1){let i=A.loads.fetchRequest(gt(t),A.url,{requestHeaders:!1});if(null==e)throw A.rt.error("TypeError",2007,"uploadDataFieldName");let I=A.rt.toString(e),B=t.$data;if(""===I||B&&"object"==typeof B&&"flash.utils::ByteArray"===A.rt.traitsOf(B).name)throw A.rt.error("ArgumentError",2004);e6(this).upload(i,I,!!g&&A.platform.os.startsWith("Windows"))}uploadUnencoded(t){e6(this).upload(A.loads.fetchRequest(gt(t),A.url,{requestHeaders:"all"}),null)}"flash.net:FileReference::_load"(A){e6(this).load(),this.$fileInto=A,this.$fileData=null}"flash.net:FileReference::_save"(t,e){let g=i3(A.rt,t);e6(this).save(null==e?"Untitled":A.rt.toString(e),g.buffer.slice(0,g.length))}static"flash.net:FileReference::_ensureIsRootPlayer"(){}}),QS(e9,"flash.net::FileReferenceList",class{get fileList(){return this.$fileList??null}browse(t=null){return this.$fileList=A.rt.array([]),e6(this).browse(gA(t),!0,t=>{this.$fileList=A.rt.array(t.map(t=>{let e=A.rt.construct(A.rt.classNamed("flash.net::FileReference"));return e6(e).file=t,e}))}),!0}}),e9),...(QS(gg={},"flash.system::FSCommandHost",class{static _fscommand(t,e){A.fsCommand?.(A.rt.toString(t),A.rt.toString(e),A.code.securityUrls(1))}}),gg),...(gi={},gI=3,gB=(t,e)=>{cK(A,t,A.rt.construct(A.rt.classNamed("flash.events::NetStatusEvent"),"netStatus",!1,!1,A.rt.newObject(e)))},gQ=(t,e)=>{if(!t.$connected)throw A.rt.error("ArgumentError",2126);return e},gC=A=>{let t=A.$uri??null,e=A.$connected??!1;A.$connected=!1,A.$uri=null,A.$remote=null,e?gB(A,["code","NetConnection.Connect.Closed","level","status"]):null!==t&&(gB(A,["code","NetConnection.Connect.Closed","level","status"]),gB(A,["code","","description","","details","","level","status"]))},gr=(t,e)=>{let g=t.$remote;if(!g)return;let i=A.rt.toString(e[0]),I=e[1]??null,B=g.next++,Q=t.$objectEncoding??gI;g.queue.push({method:i,id:B,body:function(A,t,e){if(3===e){let e=new GK(A),g=new Uint8Array(5);for(let A of(g[0]=10,new DataView(g.buffer).setUint32(1,t.length),e.bytes.write(g),t))e.value(A);return e.finish()}let g=new GY(A,1/0,0,"Remoting");for(let A of(g.out.bytes(10),g.out.u32(t.length),t))g.value(A);return g.out.finish()}(A.rt,e.slice(2),Q)}),g.responders.set(B,I),g.scheduled||(g.scheduled=!0,A.afterExitFrame.push(()=>go(t,g,Q)))},gs=(t,e)=>{let g=t.$remote;if(!g)return;let i=A.rt.toString(e[0]),I=t.$objectEncoding??gI,B=function(A,t,e){if(3===e){let e=new GK(A);return e.value(t),e.finish()}let g=new GY(A,1/0,0,"Remoting");return g.value(t),g.out.finish()}(A.rt,e[2]??null,I);g.headers=g.headers.filter(A=>A.name.toLowerCase()!==i.toLowerCase()),g.headers.push({name:i,mustUnderstand:A.rt.toBoolean(e[1]),value:B})},go=(t,e,g)=>{e.scheduled=!1;let i=e.queue;e.queue=[];let I=A.fetch;if(t.$remote!==e||0===i.length||!I)return;let B=function(A,t,e){let g=[GV(3*(3===A)),GV(t.length)];for(let A of t)g.push(Gv(A.name),Uint8Array.of(+!!A.mustUnderstand),GX(A.value.length),A.value);for(let A of(g.push(GV(e.length)),e))g.push(Gv(A.method),Gv(`/${A.id}`),GX(A.body.length),A.body);return Gx(g)}(g,e.headers,i),Q=I({url:e.url,method:"POST",headers:[["Content-Type","application/x-amf"]],body:B,purpose:"data"},new AbortController().signal).then(A=>A,()=>({bytes:null,status:0,headers:[]}));A.loads.trackRequest(Q.then(g=>{A.loads.deferHostEvent(()=>{try{gn(t,e,g.bytes,g.status)}finally{for(let A of i)e.responders.delete(A.id)}})}))},gn=(t,e,g,i)=>{if(t.$remote!==e)return;if(null===g)return void gB(t,["code","NetConnection.Call.Failed","description",i>=300?`HTTP: Status ${i}`:"HTTP: Failed","details",e.url,"level","error"]);if(0===g.length)return;let I=function(A,t){let e=new DataView(t.buffer,t.byteOffset,t.byteLength);try{let g=e.getUint16(0);if(0!==g&&3!==g)return"version";let i=2,I=()=>{let A=e.getUint16(i);if((i+=2)+A>t.length)throw RangeError("past the end");let g=GZ.decode(t.subarray(i,i+A));return i+=A,g},B=()=>{let g=e.getUint32(i),I=i+=4,B=new GH(A,t,i,!0,"Remoting"),Q=B.value();return i=0xffffffff!==g&&I+g<=t.length?I+g:B.at,Q},Q=e.getUint16(i);i+=2;for(let A=0;A<Q;A++)I(),i+=1,B();let C=e.getUint16(i);i+=2;let r=[];for(let A=0;A<C;A++){let A=I();I(),r.push([A,B()])}return r}catch{return"version"}}(A.rt,g);if("version"===I)return void gB(t,["code","NetConnection.Call.BadVersion","description","","details","","level","error"]);for(let[t,g]of I){let i=/^\/(\d+)\/(onResult|onStatus)$/.exec(t);if(!i)continue;let I=Number(i[1]),B=e.responders.get(I);e.responders.delete(I);let Q=B?B["onResult"===i[2]?"$result":"$status"]:null;if("function"==typeof Q||Q&&"object"==typeof Q)try{A.rt.call(Q,null,g)}catch(t){A.reportUncaught(t,Q)}}},QS(gi,"flash.net::NetConnection",class{get connected(){return this.$connected??!1}get uri(){return this.$uri??null}connect(t){if((this.$connected||this.$remote)&&(this.$connected=!1,this.$remote=null,gB(this,["code","NetConnection.Connect.Closed","level","status"])),null==t||"null"===A.rt.toString(t)){this.$uri="null",this.$connected=!0,gB(this,["code","NetConnection.Connect.Success","level","status"]);return}this.$uri=A.rt.toString(t),/^https?:\/\//i.test(this.$uri)&&(this.$remote={url:this.$uri,headers:[],queue:[],next:1,responders:new Map,scheduled:!1})}"flash.net:NetConnection::invoke"(t){if(1===A.rt.toUint(t))return void gC(this);throw A.rt.unsupported(`NetConnection invoke ${A.rt.toUint(t)}`)}"flash.net:NetConnection::invokeWithArgsArray"(t,e){let g=A.rt.toUint(t),i=e?.$a??[];if(3===g)return void gs(this,i);if(2===g)return void gr(this,i);throw A.rt.unsupported(`NetConnection invoke ${g}`)}get client(){return this.$client??this}set client(t){if(null==t)throw A.rt.error("TypeError",2004);this.$client=t}get objectEncoding(){return this.$objectEncoding??gI}set objectEncoding(t){this.$objectEncoding=A.rt.toUint(t)}get proxyType(){return this.$proxyType??"none"}set proxyType(t){this.$proxyType=A.rt.toString(t)}get maxPeerConnections(){return this.$maxPeers??8}set maxPeerConnections(t){this.$maxPeers=A.rt.toUint(t)}get httpIdleTimeout(){return this.$idleTimeout??0}"flash.net:NetConnection::_SetHTTPIdleTimeout"(t){this.$idleTimeout=A.rt.toNumber(t)}get connectedProxyType(){return gQ(this,"none")}get usingTLS(){return gQ(this,!1)}get protocol(){return gQ(this,"rtmp")}get nearID(){return gQ(this,"")}get farID(){return gQ(this,"")}get nearNonce(){return gQ(this,GW)}get farNonce(){return gQ(this,GW)}get unconnectedPeerStreams(){return gQ(this,A.rt.array([]))}static get defaultObjectEncoding(){return gI}static set defaultObjectEncoding(t){gI=A.rt.toUint(t)}}),QS(gi,"flash.net::Responder",class{"flash.net:Responder::ctor"(A,t){this.$result=A,this.$status=t}}),gi),...(gE={},ga=t=>{A.loads.deferHostEvent(()=>cK(A,t,A.rt.construct(A.rt.classNamed("flash.events::ErrorEvent"),"error",!1,!1,"Error #3702: Context3D not available.",3702)))},gl=t=>{let e=A.rt.toNumber(t);if(!(e>=-8192&&e<=8191))throw A.rt.error("ArgumentError",2006);return e},QS(gE,"flash.display::Stage3D",class{get context3D(){return null}requestContext3D(A="auto",t="baseline"){ga(this)}requestContext3DMatchingProfiles(t){if(null==t)throw A.rt.error("TypeError",2007,"profiles");ga(this)}get x(){return this.$x??0}set x(A){this.$x=gl(A)}get y(){return this.$y??0}set y(A){this.$y=gl(A)}get visible(){return this.$visible??!0}set visible(A){this.$visible=!!A}}),gE),...(QS(gh={},"flash.xml::XMLParser",class{startParse(t,e){let g=new Io(A.rt.toString(t));g.parse(!!e),this.$parser=g}getNext(t){if(null==t)throw A.rt.error("TypeError",2007,"tag");let e=this.$parser;if(!e)return -1;let g=new Ir,i=e.getNext(g);return t.$type=g.type,t.$value=g.text,t.$empty=g.empty,t.$attrs=1===g.type?A.rt.newObject(g.attributes):null,i}}),QS(gh,"flash.xml::XMLTag",class{get type(){return this.$type??0}set type(t){this.$type=A.rt.toUint(t)}get empty(){return this.$empty??!1}set empty(A){this.$empty=!!A}get value(){return this.$value??null}set value(t){this.$value=null==t?null:A.rt.toString(t)}get attrs(){return this.$attrs??null}set attrs(A){this.$attrs=A}}),QS(gh,"flash.xml::XMLNode",class{static"flash.xml:XMLNode::escapeXML"(t){return A.rt.toString(t).replace(/[&<>"']/g,A=>FG[A])}}),gh),...(QS(gc={},"flash.media::Video",class{"flash.media:Video::ctor"(t,e){let g=A.rt.toInt(t),i=A.rt.toInt(e);if(g<0||i<0)throw A.rt.error("RangeError",2006);g>0&&i>0&&(this.$display.boxWidth=g,this.$display.boxHeight=i)}get videoWidth(){return 0}get videoHeight(){return 0}get deblocking(){return this.$deblocking??0}set deblocking(t){this.$deblocking=A.rt.toInt(t)}get smoothing(){return this.$smoothing??!1}set smoothing(A){this.$smoothing=!!A}attachNetStream(A){}attachCamera(A){}clear(){}}),gc),...function(A){let t={};function e(t,e){if(null==t)throw A.rt.error("TypeError",2007,e)}return QS(t,"flash.media::Camera",class{static get isSupported(){return!0}static get names(){return A.rt.array([])}static getCamera(A){return null}get activityLevel(){return 0}get bandwidth(){return 0}get currentFPS(){return 0}get fps(){return 0}get height(){return 0}get index(){return 0}get keyFrameInterval(){return 0}get loopback(){return!1}get motionLevel(){return 0}get motionTimeout(){return 0}get muted(){return!1}get name(){return null}get position(){return null}get quality(){return 0}get width(){return 0}setCursor(A){}setKeyFrameInterval(A){}setLoopback(A){}setMode(A,t,e,g){}setMotionLevel(A,t){}setQuality(A,t){}drawToBitmapData(A){e(A,"destination")}copyToByteArray(A,t){e(A,"rect"),e(t,"destination")}copyToVector(A,t){e(A,"rect"),e(t,"destination")}}),t}(A),...function(A){let t,e={};function g(t,e){if(null==t)throw A.rt.error("TypeError",2007,e)}return QS(e,"flash.media::Microphone",class{static get isSupported(){return!0}static get names(){return A.rt.array([])}static getMicrophone(A){return null}static getEnhancedMicrophone(A){return t??=new Map([["mode","fullDuplex"],["echoPath",128],["nonLinearProcessing",!0]]),null}get activityLevel(){return 0}get codec(){return null}set codec(A){g(A,"codecString")}get enableVAD(){return!1}set enableVAD(A){}get encodeQuality(){return 0}set encodeQuality(A){}get enhancedOptions(){if(!t)return null;let e=A.rt.construct(A.rt.classNamed("flash.media::MicrophoneEnhancedOptions"));for(let[g,i]of t)A.rt.setProp(e,g,i);return e}set enhancedOptions(e){if(t&&null!=e)for(let g of t.keys())t.set(g,A.rt.prop(e,g))}get framesPerPacket(){return 0}set framesPerPacket(A){}get gain(){return 0}set gain(A){}get index(){return 0}get muted(){return!1}get name(){return null}get noiseSuppressionLevel(){return 0}set noiseSuppressionLevel(A){}get rate(){return 0}set rate(A){}get silenceLevel(){return 0}get silenceTimeout(){return 0}get soundTransform(){return A.rt.construct(A.rt.classNamed("flash.media::SoundTransform"))}set soundTransform(A){g(A,"sndTransform")}get useEchoSuppression(){return!1}setLoopBack(A){}setSilenceLevel(A,t){}setUseEchoSuppression(A){}}),QS(e,"flash.media::MicrophoneEnhancedOptions",class{get autoGain(){return!1}set autoGain(A){}}),e}(A),...(QS(gw={},"flash.ui::Keyboard",class{static get capsLock(){return!1}static get numLock(){return!1}static get hasVirtualKeyboard(){return!1}static get physicalKeyboardType(){return"alphanumeric"}static isAccessible(){return!0}}),gw),...(QS(gd={},"flash.ui::GameInput",class{static get isSupported(){return!1}static get numDevices(){return 0}static getDeviceAt(t){throw A.rt.error("RangeError",1506)}}),gd),...(QS(gu={},"flash.ui::ContextMenu",class{get link(){return this.$link??null}set link(t){this.$link=mn(A,t,"flash.net::URLRequest")}}),gu),...(QS(gD={},"flash.sensors::Accelerometer",class{static get isSupported(){return!1}get muted(){return!0}setRequestedUpdateInterval(t){if(0>A.rt.toNumber(t))throw A.rt.error("ArgumentError",1508,"interval")}}),gD),...(QS(gf={},"flash.printing::PrintJob",class{static get isSupported(){return!1}}),gf)}}(this)}},{...{...ru,...rr,...rs,...r_,...Q7,...rb,"flash.utils::ByteArray":CA,Date:C3,...r7,...sY,...rG,...r4,...rj},...{...(e=this,{"flash.display::DisplayObject":{create:A=>{let t=Object.create(A.proto),g=null===e.pending,i=e.pending??e.symbols.displayFor(A);return e.pending=null,""===i.name&&i!==e.stage&&(i.name=`instance${++e.instances}`),t.$display=i,i.object=t,oq.changes++,i instanceof EN&&!i.avm1Root&&(i.library.version??10)<10&&(i.listedAlways=!0,oj(i)),i instanceof EN&&function(A){for(let t=A;t&&"flash.display::MovieClip"!==t.name;t=t.base)if("flash.display::Sprite"===t.name)return!0;return!1}(A)&&(i.playing=!1),g&&(e.lifecycle.made(i),i instanceof EN&&i.placeFirstFrame()),t}}}),...(g=this,{"flash.display::BitmapData":{create:A=>{let t=Object.create(A.proto);return t.$store=null,t.$symbol=g.symbols.bitmapSymbol(A),t}}}),...(i=this,{"flash.utils::ByteArray":{...CA,create:(A,t)=>{let e=CA.create(A,t),g=i.symbols.binarySymbol(A);if(g){let A=i3(t,e);A.buffer=g,A.view=new DataView(g.buffer),A.length=g.length}return e}}}),...mJ,...fo,...mc,...(I=this,{"flash.system::Worker":{created(A,t){BC(t,"_current",I.workers.objectOf(I.workers.id,t))}}}),"flash.desktop::Clipboard":{construct(A,t,e){if(!DS)throw A.error("flash.errors::IllegalOperationError",2178);let g=t.$it.instance();return t.$it.proto.$init.apply(g,e),g}},...(B=this,{"flash.media::Sound":{create:A=>{let t=Object.create(A.proto),e=B.symbols.soundSymbol(A),g=e?.definition;return t.$sound={character:e,bytes:null,url:null,loaded:0,total:0,length:g?g.sampleCount/(g.sampleRate/1e3):0,used:!!g,generation:0,abort:null,clip:null,frames:null,compressed:!1,pcm:null,extracted:0},t}}}),...(Q=this,{"flash.text::Font":{create:A=>{let t=Object.create(A.proto);return t.$font=Q.symbols.fontSymbol(A),t}}}),...(C=this,{"flash.net::URLRequest":{create:A=>{let t=Object.create(A.proto),e=G2(C);return t.$followRedirects=e.followRedirects,t.$manageCookies=e.manageCookies,t.$authenticate=e.authenticate,t.$useCache=e.useCache,t.$cacheResponse=e.cacheResponse,t.$idleTimeout=e.idleTimeout,t.$userAgent=e.userAgent,t}}})}},{onUnsupported:A=>console.warn(`${A} (caught by the SWF)`),...t,apiVersion:this.air?51:50}),this.mainDomain=this.rt.childDomain(this.rt.root),this.codegen.reset(this.rt.apiVersion)}loadLibraries(A){return this.workers.libraries.push(...A),this.code.loadLibraries(A)}settled(){return this.loads.settled()}heldTime(){return this.loads.heldTime()}holdsFrame(){return this.loads.holdsFrame()}destroy(){if(this.onStageLayout=null,this.contentsScaleListeners.clear(),this.fileLifetime.abort(),!this.destroyed){for(let A of(this.destroyed=!0,this.loads.destroyAvm1(),this.workers.stopAll(),this.code.recorder?.drop(),this.localConnections.destroy(this),this.flushSharedObjects?.(),c$(this),this.audio?.close?.(),[...this.connections]))A.close();this.stopped.abort(),ip()}}track(A,t){let e=!0,g={close:()=>{}},i=()=>{e=!1,this.connections.delete(g)},I=t({...A,close:(...t)=>{i(),A.close(...t)},error:(...t)=>{i(),A.error(...t)}});g.close=()=>{i(),I.close()},e&&this.connections.add(g);let B=I.frame;return{send:A=>I.send(A),close:A=>{i(),I.close(A)},...B&&{frame:(A,t)=>{8===A&&i(),B.call(I,A,t)}}}}bind(A,t){this.symbols.bind(A,t),t.construct=(A,e)=>this.construct(A,e,t),t.uncaught=A=>this.reportUncaught(A,t),t.constructLater=(A,e)=>{let g=t.classes.get(e.id);g&&this.rt.classNamed(g,t.domain??null),this.toConstruct.push({display:A,character:e,library:t})},t.constructPlaced=A=>{let e={placed:A,library:t};this.placing.push(e);try{this.constructGoto(e)}finally{this.placing.splice(this.placing.indexOf(e),1)}},t.removing=(A,t)=>this.lifecycle.removing(A,t),t.placedSymbol=A=>this.symbols.placedSymbol(A,t.domain??this.mainDomain),t.sounds=this.timelineSounds}construct(A,t,e){var g;let i=A.metaData;A.metaData=null;let I=null===i?null:this.readMetaData(i);A instanceof EN&&(A.timelineChild=!0,A.placeFirstFrame());let B=e.classes.get(t.id)??F2[t.type],Q=e.domain??null,C=t=>{let e=A.parent?.object;e&&A.timelineNamed&&this.rt.setProperty(e,iV(iY,A.name),t)};if(A instanceof Eq&&"button"===t.type&&(""===A.name&&(A.name=`instance${++this.instances}`),this.makeButtonStates(A,t,e),(e.version??10)>9&&((g=A.upState)instanceof EN||g instanceof ng&&g.children.some(A=>A instanceof EN)))){let t,e=this.rt.classNamed(B,Q);this.pending=A;try{t=this.rt.allocate(e)}finally{this.pending=null}let g=null;if(t)try{C(t)}catch(A){g={error:A}}for(let t of(A.firstScripts=!0,this.constructPending(),[...this.placing]))this.constructGoto(t);if(this.broadcast("frameConstructed"),this.runFrameScripts(this.stage??A,A),this.broadcast("exitFrame"),t){if(this.rt.constructSuper(e,t),null!==i&&(t.$metaData=I),g)throw g.error;this.lifecycle.added(A);return}}let r="bitmap"===t.type&&A instanceof ne?this.constructBitmap(A,B,Q):this.constructAs(A,this.rt.classNamed(B,Q));null!==i&&(r.$metaData=I),C(r),this.lifecycle.added(A)}readMetaData(A){let t=new i1(this.rt,{});return t.write(A),t.position=0,new I1(this.rt,t).value()}constructBitmap(A,t,e){let g=this.rt.classNamed(t,e);if(!function(A,t){for(let e=A.$it;e;e=e.base)if(e.name===t)return!0;return!1}(g,"flash.display::BitmapData"))return this.constructAs(A,g);if(!A.hasImage)throw this.rt.construct(g),this.rt.error("TypeError",2022,`${t.replace(/^.*::/,"")}$`);let i=this.rt.construct(g,1,1);return this.constructAs(A,this.rt.classNamed("flash.display::Bitmap"),i)}constructAs(A,t,...e){this.pending=A;try{return this.rt.construct(t,...e)}finally{this.pending=null}}makeButtonStates(A,t,e){let g=this.rt.classNamed("flash.display::Sprite");ET(A,t,e,(A,t)=>this.construct(A,t,e),A=>this.constructAs(A,g))}event(A,t=!1){return this.rt.construct(this.rt.classNamed("flash.events::Event"),A,t,!1)}httpStatus(A,t=!1){return this.statusEvent("httpStatus",A,t)}httpResponseStatus(A,t){let e=A.url??t;if(!this.air||A.local||0===A.status||!/^https?:/i.test(e))return null;let g=this.rt,i=this.statusEvent("httpResponseStatus",A.status,void 0!==A.url),I=g.classNamed("flash.net::URLRequestHeader");return g.setProp(i,"responseURL",e),g.setProp(i,"responseHeaders",g.array(A.headers.map(([A,t])=>g.construct(I,A,t)))),i}statusEvent(A,t,e){let g=this.statusClass;return g||(g=this.rt.classNamed("flash.events::HTTPStatusEvent"),this.statusClass=g),this.rt.construct(g,A,!1,!1,t,e)}broadcastTargets(A){let t=this.broadcasts.get(A);return t||(t=new Set,this.broadcasts.set(A,t),this.broadcastSets.push(t)),t}setStageDefaults(A,t){this.stageScaleModeSet||(this.stageScaleMode=A),this.stageAlignSet||(this.stageAlign=mp(t))}setContentsScaleFactor(A){let t=Number.isFinite(A)&&A>0&&this.screenResolution()?A:1;if(t!==this.contentsScaleFactor)for(let A of(this.contentsScaleFactor=t,this.contentsScaleListeners))A()}screenResolution(){if(!this.air)return!0;let A=/<initialWindow>([\s\S]*?)<\/initialWindow>/.exec(this.application?.descriptor??"");return/<requestedDisplayResolution>\s*high\s*</.test(A?.[1]??"")}resizeStage(A,t){if(A===this.stageWidth&&t===this.stageHeight)return;this.stageWidth=A,this.stageHeight=t;let e=this.stage?.object;"noScale"===this.stageScaleMode&&e&&cH(e,"resize")&&cL(this,e,this.event("resize"))}activationTargets(A){let t=this.activation.get(A);return t||(t=new cx,this.activation.set(A,t)),t}broadcastActivation(A){for(let t of this.activation.get(A)?.live()??[])cL(this,t,this.event(A))}broadcast(A){let t=this.broadcasts.get(A);if(t)for(let e of[...t])("render"!==A||this.lifecycle.onStage(e.$display))&&cL(this,e,this.event(A))}reportUncaught=(A,t=null)=>{this.uncaughtErrors.report(A,t)};tellHost=A=>{if(!this.onUncaught)return void this.uncaught.push(A);try{this.onUncaught(A)}catch(A){this.uncaught.push(A)}};runFrameScripts(A,t=null){let e=()=>this.overflowed&&this.cycles>0,g=this.scriptDepth++,i=this.scriptQueues[g]??[];this.scriptQueues[g]=i;try{for(let g=0;g<64&&!e();g++){let g=oq.changes;if(!this.frameScriptRound(i,A,t,e))break;if(oq.changes===g){F3.checkRounds&&this.checkRoundLeftOut(i,A,t,e);break}}}finally{this.scriptDepth--}}checkRoundLeftOut(A,t,e,g){let i=oq.changes,I=this.framesMarked;if(this.frameScriptRound(A,t,e,g)||this.framesMarked!==I||oq.changes!==i)throw Error("a round of frame scripts left out had work to do")}frameScriptRound(A,t,e,g){let i=!1,I=A=>{if(!A.makingChildren||A.frameScripts.has(A.currentFrame)||!A.timelineChild&&this.scriptPhase)for(let t=0;t<64&&A.scriptedFrame!==A.currentFrame&&!g();t++){A.scriptedFrame=A.currentFrame,this.framesMarked++;let t=A.frameScripts.get(A.currentFrame);if(!t)return;i=!0;let e=this.inFrameScript;this.inFrameScript=A;try{this.rt.call(t,A.object)}catch(A){this.reportUncaught(A,t)}finally{this.inFrameScript=e}if(null!==A.queuedGoto){let t=A.queuedGoto;A.queuedGoto=null,A.playing=A.queuedPlay,A.gotoFrame(t);try{this.gotoCycle(A)}catch(A){this.reportUncaught(A)}}}};if(!this.pruning()){let g=this.queueAll(A,t,e,null);for(let t=0;t<g;t++){let e=A[t];A[t]=null,I(e)}return i}if(F3.checkRounds)return this.checkedRound(A,t,e,I),i;let B=this.queueDue(A,t,e,null);for(let t=0;t<B;t++){let e=A[t];A[t]=null,I(e)}return i}pruning(){return!this.overflowed&&null!==this.stage}queueAll(A,t,e,g){let i=0,I=t=>{if(t instanceof ng&&2!==t.kind){let e=Ej(t).items;for(let t=0;t<e.length;t++){let g=e[t];2===g.kind?I(g):g.object&&(A[i++]=g)}return}1===t.kind&&t.object&&(A[i++]=t);let e=Ez(t,g);for(let A=0;A<e.length;A++){let t=e[A];(0!==t.kind||0!==t.frameChildren.length)&&I(t)}};for(let A of(this.lifecycle.eachOrphanRoot(I),I(t),this.lifecycle.fresh))I(A);return this.alsoAt=i,e&&I(e),i}queueDue(A,t,e,g){let i=this.openClip,I=this.openEnd,B=this.openDue,Q=0,C=0,r=(t,e)=>t.scriptedFrame!==t.currentFrame?(t.object&&(A[C++]=t),!0):((e||t.listedAlways)&&t.object&&(A[C++]=t),t.listedAlways),s=(A,t)=>{if(!A.scriptsDue&&!t)return!1;let e=!1;if(2===A.kind){let i=Ez(A,g);for(let A=0;A<i.length;A++){let g=i[A];(0!==g.kind||0!==g.frameChildren.length)&&s(g,t)&&(e=!0)}e||=A.statesDue}else A instanceof ng&&(e=o(A,t));return F9(A,e),e},o=(A,t)=>{if(t){let{items:e,ends:g}=Ej(A),C=Q,o=!1;for(let A=0;A<e.length;A++){for(;Q>C&&I[Q-1]<=A;)n(C);let E=e[A];if(2===E.kind){s(E,t)&&(o=!0,Q>C&&(B[Q-1]=!0));continue}let a=r(E,t);o||=a,i[Q]=E,I[Q]=g[A],B[Q++]=a}for(;Q>C;)n(C);return o}if(A.avm1Root)return!1;let e=1===A.kind&&r(A,!1),g=A.children;for(let A=0;A<g.length;A++){let t=g[A];if(t.scriptsDue){if(2===t.kind)e=s(t,!1)||e;else if(0!==t.kind||0!==t.frameChildren.length){let A=o(t,!1);F9(t,A),e||=A}}}return e},n=A=>{let t=B[--Q];F9(i[Q],t),i[Q]=null,t&&Q>A&&(B[Q-1]=!0)};for(let A of(this.lifecycle.eachOrphanRoot(A=>{s(A,!1)||null===A.orphanEntry||(A.orphanEntry.due=!1)},!0),s(t,!1),this.lifecycle.fresh))s(A,!1);return this.alsoAt=C,e&&s(e,!0),C}checkedRound(A,t,e,g){let i=new Set,I=this.queueDue(A,t,e,i),B=new Set,Q=[],C=this.queueAll(Q,t,e,B),r=this.alsoAt;for(let A of B){if(!i.has(A))throw Error("a round of frame scripts left out a button's first scripts");A.firstScripts=!1}let s=[],o=0;for(let t=0;t<C;t++){let e=Q[t];if(s[t]=t>=r||e.listedAlways||e.scriptedFrame!==e.currentFrame,s[t]&&A[o++]!==e)throw Error(`a round of frame scripts walked out of order at ${o-1}`)}if(o!==I)throw Error(`a round of frame scripts walked ${I} clips due, not ${o}`);A.fill(null,0,I);for(let A=0;A<C;A++){let t=Q[A],e=this.framesMarked;if(g(t),!s[A]&&this.framesMarked!==e)throw Error("a clip a round of frame scripts left out had a script due")}}gotoCycle(A){if(!((A.library.version??10)<10)&&this.stage&&!this.overflowed){if(this.cycles>=F8)throw this.overflowed=!0,this.rt.error("Error",1023);this.cycles++;try{this.constructPending(),this.broadcast("frameConstructed"),this.runFrameScripts(this.stage),this.broadcast("exitFrame")}finally{this.cycles--}}}constructPending(){for(let A=this.toConstruct.shift();A;A=this.toConstruct.shift())if(!A.display.object&&A.display.parent)try{this.construct(A.display,A.character,A.library)}catch(t){this.reportUncaught(t,A.library)}}constructGoto(A){for(let t=A.placed.shift();t;t=A.placed.shift())if(!t.display.object&&t.display.parent)try{this.construct(t.display,t.character,A.library)}catch(t){this.reportUncaught(t,A.library)}}frame(A,t=!0,e=!0){let g=[];try{this.playFrame(A,t,e)}catch(A){g.push(A)}this.throwUncaught(g)}renderFrame(A=[]){try{this.render()}catch(t){A.push(t)}this.throwUncaught(A)}throwUncaught(A){if(A.push(...this.uncaught.splice(0)),1===A.length)throw A[0];if(A.length>1)throw AggregateError(A,`${A.length} errors that nothing caught`)}playFrame(A,t,e){this.overflowed=!1,function(A){wi(cO(A));let t=cv.get(A);if(t)for(let e of[...t]){let g=e.$channel;if(!g.stopped){if(g.dynamic){if(g.dynamic.pump(),g.stopped||!t.has(e)||!g.dynamic.complete())continue}else{let t=(g.sound.length-g.start)*Math.max(1,g.loops);if(g.sound.length<=0||A.timers.now-g.started<t)continue}cz(A,g),t.delete(e),cK(A,e,A.event("soundComplete"))}}}(this),t&&(this.frames++,this.broadcast("enterFrame"),this.timers.frameTimers(),this.loads.tickAvm1()),this.constructPending();let g=[...this.loads.frameEnds.splice(0),...this.loads.completeLoads()];this.broadcast("frameConstructed");let i=this.scriptPhase;this.scriptPhase=!0,oq.changes++;try{this.runFrameScripts(A)}finally{this.scriptPhase=i,oq.changes++}for(let A of(this.lifecycle.afterScripts(),this.broadcast("exitFrame"),[...g,...this.afterExitFrame.splice(0)]))try{A()}catch(A){this.reportUncaught(A)}this.loads.deliverAvm1Loads(),this.pointer?.frameEnded(),e&&this.render()}renderPending(){this.destroyed||this.renderedUpdates===this.updates||this.render()}render(){for(let A of(this.renderedUpdates=this.updates,this.invalidated&&(this.invalidated=!1,this.broadcast("render")),this.scrolled))A.scroll=A.scrollRect,A.invalidate(1);this.scrolled.clear()}}let F8=256;function F9(A,t){A.scriptsDue!==t&&(A.scriptsDue=t,null!==A.orphanEntry&&(A.orphanEntry.due=t))}let F4=globalThis;d={post:A=>F4.postMessage(A),listen:A=>{F4.onmessage=t=>{t.data?.type==="ping"?F4.postMessage({type:"ready"}):A(t.data)}}},s=null,o=[],n=0,E=0,a=null,l=!1,h=()=>{if(l||!s||!Ca(s.rt).terminated)return l;l=!0;try{a?.destroy(),s.destroy()}catch(A){A instanceof CC||d.post({type:"uncaught",text:w(A)})}finally{Ca(s.rt).end(c)}return!0},c=0,w=A=>{if(A instanceof Error)return`${A.name}: ${A.message}`;try{return s?s.rt.toString(A):String(A)}catch{return"an error that could not be described"}},d.listen(A=>{"codegen"in A?(async({codegen:A,init:t})=>{c=t.id;let e=new Map,g=new F3(await async function(A){let t=await async function(A,t={}){let e={env:Object.setPrototypeOf({abort(A,t,e,g){throw A=B(A>>>0),t=B(t>>>0),e>>>=0,g>>>=0,Error(`${A} in ${t}:${e}:${g}`)}},Object.assign(Object.create(globalThis),t.env||{}))},{exports:g}=await WebAssembly.instantiate(A,e),i=g.memory||t.env.memory,I=Object.setPrototypeOf({compilerVersion:()=>B(g.compilerVersion()>>>0),abcVersion:A=>(A=C(Uint8Array,27,0,A)||n(),g.abcVersion(A)),actionsEmitEach(A,t,e,i,I,r){A=s(C(Uint8Array,27,0,A)||n()),t=s(C(Int32Array,31,2,t)||n()),e=s(C(Int32Array,31,2,e)||n()),I=Q(I)||n(),r=+!!r;try{return B(g.actionsEmitEach(A,t,e,i,I,r)>>>0)}finally{o(A),o(t),o(e)}},actionsEmitEachBytes(A,t,e,i,I,B){A=s(C(Uint8Array,27,0,A)||n()),t=s(C(Int32Array,31,2,t)||n()),e=s(C(Int32Array,31,2,e)||n()),I=Q(I)||n(),B=+!!B;try{return g.actionsEmitEachBytes(A,t,e,i,I,B)>>>0}finally{o(A),o(t),o(e)}},actionsHeldEmitEachBytes:(A,t,e)=>(e=Q(e)||n(),g.actionsHeldEmitEachBytes(A,t,e)>>>0),actionsHeldUnitBytes:(A,t,e,i,I,B)=>(B=+!!B,g.actionsHeldUnitBytes(A,t,e,i,I,B)>>>0),actionsHold(A,t,e,i){t=s(C(Uint8Array,27,0,t)||n()),e=s(C(Int32Array,31,2,e)||n()),i=C(Int32Array,31,2,i)||n();try{g.actionsHold(A,t,e,i)}finally{o(t),o(e)}},actionsModuleBytes(A,t,e,i,I){A=s(C(Uint8Array,27,0,A)||n()),t=s(C(Int32Array,31,2,t)||n()),e=C(Int32Array,31,2,e)||n(),I=+!!I;try{return g.__setArgumentsLength(arguments.length),g.actionsModuleBytes(A,t,e,i,I)>>>0}finally{o(A),o(t)}},actionsModuleEntries:()=>B(g.actionsModuleEntries()>>>0),actionsModuleUnits:()=>B(g.actionsModuleUnits()>>>0),actionsUnitBytes(A,t,e,i,I,B,Q,r){A=s(C(Uint8Array,27,0,A)||n()),t=s(C(Int32Array,31,2,t)||n()),e=C(Int32Array,31,2,e)||n(),r=+!!r;try{return g.actionsUnitBytes(A,t,e,i,I,B,Q,r)>>>0}finally{o(A),o(t)}},actionsUnitLimits:()=>{var A,t;return A=Float64Array,(t=g.actionsUnitLimits()>>>0)?new A(i.buffer,function(A){try{return E.getUint32(A,!0)}catch{return(E=new DataView(i.buffer)).getUint32(A,!0)}}(t+4),E.getUint32(t+8,!0)/A.BYTES_PER_ELEMENT).slice():null},domainAdd(A,t,e){return A=C(Uint8Array,27,0,A)||n(),t=+!!t,g.__setArgumentsLength(arguments.length),g.domainAdd(A,t,e)},domainCompact:()=>0!=g.domainCompact(),domainContext(A,t,e){return g.__setArgumentsLength(arguments.length),B(g.domainContext(A,t,e)>>>0)},domainEmitEach(A,t,e){return A=Q(A)||n(),t=+!!t,g.__setArgumentsLength(arguments.length),B(g.domainEmitEach(A,t,e)>>>0)},domainEmitEachBytes(A,t,e){return A=Q(A)||n(),t=+!!t,g.__setArgumentsLength(arguments.length),g.domainEmitEachBytes(A,t,e)>>>0},domainFound(A,t,e,i,I,B){e=s(Q(e)||n()),i=Q(i)||n(),B=+!!B;try{g.domainFound(A,t,e,i,I,B)}finally{o(e)}},domainLazyModuleBytes(A,t){return A=Q(A)||n(),g.__setArgumentsLength(arguments.length),g.domainLazyModuleBytes(A,t)>>>0},domainLinked(A){return g.__setArgumentsLength(arguments.length),B(g.domainLinked(A)>>>0)},domainLogSince(A,t){return g.__setArgumentsLength(arguments.length),B(g.domainLogSince(A,t)>>>0)},domainModule(A,t,e,i){return A=Q(A)||n(),e=+!!e,i=+!!i,g.__setArgumentsLength(arguments.length),B(g.domainModule(A,t,e,i)>>>0)},domainModuleBytes(A,t,e,i){return A=Q(A)||n(),e=+!!e,i=+!!i,g.__setArgumentsLength(arguments.length),g.domainModuleBytes(A,t,e,i)>>>0},domainModuleEntries:()=>B(g.domainModuleEntries()>>>0),domainReplay(A,t){return A=Q(A)||n(),g.__setArgumentsLength(arguments.length),0!=g.domainReplay(A,t)},domainRestore:(A,t)=>(t=C(Uint8Array,27,0,t)||n(),g.domainRestore(A,t)),domainRevision:()=>B(g.domainRevision()>>>0),domainSourceMap:()=>B(g.domainSourceMap()>>>0),domainUsage:()=>B(g.domainUsage()>>>0),domainWantsCompact:()=>0!=g.domainWantsCompact(),outputLength:()=>g.outputLength()>>>0},g);function B(A){if(!A)return null;let t=A+new Uint32Array(i.buffer)[A-4>>>2]>>>1,e=new Uint16Array(i.buffer),g=A>>>1,I="";for(;t-g>1024;)I+=String.fromCharCode(...e.subarray(g,g+=1024));return I+String.fromCharCode(...e.subarray(g,t))}function Q(A){if(null==A)return 0;let t=A.length,e=g.__new(t<<1,2)>>>0,I=new Uint16Array(i.buffer);for(let g=0;g<t;++g)I[(e>>>1)+g]=A.charCodeAt(g);return e}function C(A,t,e,I){if(null==I)return 0;let B=I.length,Q=g.__pin(g.__new(B<<e,1))>>>0,C=g.__new(12,t)>>>0;return function(A,t){try{E.setUint32(A,t,!0)}catch{(E=new DataView(i.buffer)).setUint32(A,t,!0)}}(C+0,Q),E.setUint32(C+4,Q,!0),E.setUint32(C+8,B<<e,!0),new A(i.buffer,Q,B).set(I),g.__unpin(Q),C}let r=new Map;function s(A){if(A){let t=r.get(A);t?r.set(A,t+1):r.set(g.__pin(A),1)}return A}function o(A){if(A){let t=r.get(A);if(1===t)g.__unpin(A),r.delete(A);else if(t)r.set(A,t-1);else throw Error(`invalid refcount '${t}' for reference '${A}'`)}}function n(){throw TypeError("value must not be null")}let E=new DataView(i.buffer);return I}(A,{env:{}}),e=t.compilerVersion();if(e!==AY)throw Error(`codegen.wasm is version ${e} but the wrapper expects ${AY}`);if(!WebAssembly.Module.exports(A).some(A=>"outputLength"===A.name))throw Error("codegen.wasm has no outputLength export, which the wrapper expects: it is older than the wrapper");let g=t.memory.buffer.byteLength,i=0,I=0,B=0,Q=A=>{if(0===B)throw Error(`${A}: no ABC has been added to the domain`)},C=A=>{if(A>=0&&(!Number.isInteger(A)||A>=B))throw Error(`ABC ${A}: only ${B} have been added to the domain`);return A<0?-1:A},r=(A,e,g,i=!1)=>{let I=C(e),Q=I<0?B-1:I,r=G(t.domainLinked(I)),s=[A[Q]??""];for(let t of r?r.split(","):[])s.push(A[Number(t)]??"");let o=G(d(i?t.domainLazyModuleBytes(s.join("\n"),I):t.domainModuleBytes(s.join("\n"),I,g,!0),t.outputLength()),i);if(""===o)throw Error(`ABC ${e}: its application domain was dropped`);return o},s=A=>[Int32Array.from(A.blocks,A=>A.offset),Int32Array.from(A.blocks,A=>A.length)],o=new WeakMap,n=[],E=0,a=0,l=A=>{let e=n.indexOf(A);e>=0&&(n.splice(e,1),t.actionsRelease(A))},h=new FinalizationRegistry(l),c=(A,e)=>{let g=o.get(A);if(void 0!==g&&g.actions===e&&n.includes(g.handle))return n.splice(n.indexOf(g.handle),1),n.push(g.handle),g.handle;void 0!==g&&(l(g.handle),h.unregister(g));let i=++E,[I,B]=s(e);t.actionsHold(i,A,I,B),a++;let Q={handle:i,actions:e};for(o.set(A,Q),h.register(A,i,Q),n.push(i);n.length>4;)l(n[0]);return i},w=(A,e,g)=>{let[i,I]=s(e);return G(d(t.actionsModuleBytes(A,i,I,e.version,g),t.outputLength()))},d=(A,e)=>0===e?"":AL.decode(new Uint8Array(t.memory.buffer,A,e)),u=WebAssembly.Module.customSections(A,"swf2es.build"),D=u.length?String.fromCharCode(...new Uint8Array(u[0])):null,f=0,m=50,G=(A,e=!1)=>{let B=t.memory.buffer.byteLength;return(e||B>g||++i>=64)&&(t.__collect(),g=B,i=0,I=0),A};return{identity:D,abcVersion(A){let e=G(t.abcVersion(A));return e<0?null:{major:e>>>16,minor:65535&e}},get epoch(){return f},reset(A=50){Ao(A),B=0,f++,m=A,G(t.domainReset(A))},get apiVersion(){return m},add(A,e=!1,g=0){let i=G(t.domainAdd(A,e,g));if(i<0)throw Error(`application domain ${g}: never made, or dropped`);return 0===i&&B++,i},childDomain(A){let e=G(t.domainChild(A));if(e<0)throw Error(`application domain ${A}: never made, or dropped`);return e},dropDomain(A,e=f){e===f&&G(t.domainDrop(A))},evictDomain(A){G(t.domainEvict(A))},usage(){let[A,e,g]=G(t.domainUsage()).split(" ").map(Number);return{live:A,dead:e,memory:g}},compact:()=>!!G(t.domainWantsCompact())&&(t.__collect(),i=0,!!t.domainCompact()&&(t.__collect(),g=t.memory.buffer.byteLength,i=0,!0)),isLive:A=>0===G(t.domainState(A)),reviveDomain(A,e){let I=G(t.domainRevive(A));if(I<0){for(let[A,g]of e){let e=G(t.domainRestore(A,g));if(0!==e)throw Error(`ABC ${A}: not of an evicted domain, or rejected (${e})`)}I=G(t.domainRevive(A))}if(I<0)throw Error(`application domain ${A}: not evicted, its parent not live, or an ABC of it not given`);I>0&&(t.__collect(),g=t.memory.buffer.byteLength,i=0)},found(A){G(t.domainFound(A.domain,A.nsKind,A.uri,A.name,A.abc,A.asType))},compile(A=[],e=-1){Q("compile");let g=r(A,e,!0);return{module:g,sourceMap:G(t.domainSourceMap()),entries:AH(G(t.domainModuleEntries()))}},compileModule:(A=[],t=-1)=>(Q("compileModule"),r(A,t,!1)),compileLazyModule:(A=[],t=-1)=>(Q("compileLazyModule"),r(A,t,!1,!0)),context(A=-1,e=0,g=-1){if(0===B)return null;let i=G(t.domainContext(C(A),e,g));if(""===i)return null;let I=i.indexOf("\n"),Q=i.indexOf("\n",I+1),r=i.slice(0,I);return{abcs:r?r.split(",").map(Number):[],own:Number(i.slice(I+1,Q<0?i.length:Q)),log:Q<0?"":i.slice(Q+1)}},revision:()=>`${f} ${t.domainRevision()}`,compileModuleLogged(A=[],e=-1){Q("compileModuleLogged");let g=t.domainLogMark(),i=r(A,e,!1),I=G(t.domainLogSince(g,C(e)));return{module:i,log:"!"===I?null:I}},replay:(A,e=-1)=>(Q("replay"),G(t.domainReplay(A,C(e)))),compileMethods(A,e=-1){Q("compileMethods");let g=A.filter(A=>Number.isInteger(A)&&A>=0);if(0===g.length)return new Map;let i=t.domainEmitEachBytes(g.join(","),!0,C(e)),B=t.outputLength();return I+=B,AH(G(d(i,B),I>=262144))},compileActions(A,e){let g=w(A,e,!0),i=AH(G(t.actionsModuleEntries())),I=new Map;for(let A of G(t.actionsModuleUnits()).split("\x02")){let[t,e,g,i]=A.split("\x01");if(void 0!==i){let[A,B,Q,C]=e.split(",").map(Number),[r,s]=g.split(",").map(Number);I.set(t,{code:i,high:r,reach:s,unit:{at:A,end:B,bound:Q,five:0!==C}})}}return{module:g,entries:e.blocks.map((A,t)=>i.get(t)??""),units:I}},compileActionsModule:(A,t)=>w(A,t,!1),compileActionBlocks(A,e,g){let i=g.filter(A=>Number.isInteger(A)&&A>=0);if(0===i.length)return new Map;let I=c(A,e);return AH(G(d(t.actionsHeldEmitEachBytes(I,e.version,i.join(",")),t.outputLength()),!0))},compileActionUnit(A,e,{at:g,end:i,bound:I,five:B}){let Q=c(A,e),C=d(t.actionsHeldUnitBytes(Q,e.version,g,i,I,B),t.outputLength()),[r,s]=t.actionsUnitLimits();return G({code:C,high:r,reach:s})},releaseActions(A){let t=o.get(A);void 0!==t&&(l(t.handle),o.delete(A),h.unregister(t))},heldActions:()=>({held:G(t.actionsHeldCount()),copies:a})}}(A),{handedModules:t.modules,url:t.url,sandboxType:t.sandboxType,air:t.air,print:A=>d.post({type:"trace",line:A}),onUncaught:A=>d.post({type:"uncaught",text:w(A)}),workerParent:{id:t.id,post:A=>d.post(A),shared:t.shared},sync:{memory:t.sync,thread:t.id},audio:null,navigate:null,fileHost:null,clipboard:null,webSocket:null,sendToUrl:!1,storage:{get:A=>e.get(A)??null,set:(A,t)=>{e.set(A,t.slice())},remove:A=>{e.delete(A)}}});await g.loadLibraries(t.libraries);let i=a=new DG(t.swf,g);for(let A of(s=g,n++,o.splice(0)))g.workers.fromParent(A),n++;if(Ca(g.rt).start(t.id),d.post({type:"running"}),await i.start(),h())return;let I=setInterval(()=>{h()&&clearInterval(I)},10),B=performance.now(),Q=()=>{if(h())return;let A=n,t=performance.now(),e=i.advance(t-B);B=t,h()||(e>0&&A>E&&(E=A,d.post({type:"idle",received:A})),setTimeout(Q,1e3/i.frameRate))};setTimeout(Q,1e3/i.frameRate)})(A).catch(t=>{if(!h()){if(t instanceof CC){l=!0,new Co(A.init.sync,A.init.id).end(A.init.id);return}d.post({type:"uncaught",text:w(t)}),d.post({type:"terminate"})}}):s?(s.workers.fromParent(A),n++):o.push(A)});
16
16
  //# sourceMappingURL=worker.js.map