diff --git a/AnimatedSprite-d8850d0f.js b/AnimatedSprite-86b56f12.js similarity index 98% rename from AnimatedSprite-d8850d0f.js rename to AnimatedSprite-86b56f12.js index bf5e30ef..ec161304 100644 --- a/AnimatedSprite-d8850d0f.js +++ b/AnimatedSprite-86b56f12.js @@ -1 +1 @@ -import{P as a,w as r,c as h,U as u}from"./ChartManager-f20da8bc.js";class n extends a{constructor(t,e=!0){super(t[0]instanceof r?t[0]:t[0].texture),this._textures=null,this._durations=null,this._autoUpdate=e,this._isConnectedToTicker=!1,this.animationSpeed=1,this.loop=!0,this.updateAnchor=!1,this.onComplete=null,this.onFrameChange=null,this.onLoop=null,this._currentTime=0,this._playing=!1,this._previousFrame=null,this.textures=t}stop(){this._playing&&(this._playing=!1,this._autoUpdate&&this._isConnectedToTicker&&(h.shared.remove(this.update,this),this._isConnectedToTicker=!1))}play(){this._playing||(this._playing=!0,this._autoUpdate&&!this._isConnectedToTicker&&(h.shared.add(this.update,this,u.HIGH),this._isConnectedToTicker=!0))}gotoAndStop(t){this.stop(),this.currentFrame=t}gotoAndPlay(t){this.currentFrame=t,this.play()}update(t){if(!this._playing)return;const e=this.animationSpeed*t,s=this.currentFrame;if(this._durations!==null){let i=this._currentTime%1*this._durations[this.currentFrame];for(i+=e/60*1e3;i<0;)this._currentTime--,i+=this._durations[this.currentFrame];const o=Math.sign(this.animationSpeed*t);for(this._currentTime=Math.floor(this._currentTime);i>=this._durations[this.currentFrame];)i-=this._durations[this.currentFrame]*o,this._currentTime+=o;this._currentTime+=i/this._durations[this.currentFrame]}else this._currentTime+=e;this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete&&this.onComplete()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete&&this.onComplete()):s!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFrames)&&this.onLoop(),this.updateTexture())}updateTexture(){const t=this.currentFrame;this._previousFrame!==t&&(this._previousFrame=t,this._texture=this._textures[t],this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this.uvs=this._texture._uvs.uvsFloat32,this.updateAnchor&&this._anchor.copyFrom(this._texture.defaultAnchor),this.onFrameChange&&this.onFrameChange(this.currentFrame))}destroy(t){this.stop(),super.destroy(t),this.onComplete=null,this.onFrameChange=null,this.onLoop=null}static fromFrames(t){const e=[];for(let s=0;sthis.totalFrames-1)throw new Error(`[AnimatedSprite]: Invalid frame index value ${t}, expected to be between 0 and totalFrames ${this.totalFrames}.`);const e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture()}get playing(){return this._playing}get autoUpdate(){return this._autoUpdate}set autoUpdate(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isConnectedToTicker?(h.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._playing&&(h.shared.add(this.update,this),this._isConnectedToTicker=!0))}}export{n as A}; +import{P as a,w as r,c as h,U as u}from"./ChartManager-3c3d6f39.js";class n extends a{constructor(t,e=!0){super(t[0]instanceof r?t[0]:t[0].texture),this._textures=null,this._durations=null,this._autoUpdate=e,this._isConnectedToTicker=!1,this.animationSpeed=1,this.loop=!0,this.updateAnchor=!1,this.onComplete=null,this.onFrameChange=null,this.onLoop=null,this._currentTime=0,this._playing=!1,this._previousFrame=null,this.textures=t}stop(){this._playing&&(this._playing=!1,this._autoUpdate&&this._isConnectedToTicker&&(h.shared.remove(this.update,this),this._isConnectedToTicker=!1))}play(){this._playing||(this._playing=!0,this._autoUpdate&&!this._isConnectedToTicker&&(h.shared.add(this.update,this,u.HIGH),this._isConnectedToTicker=!0))}gotoAndStop(t){this.stop(),this.currentFrame=t}gotoAndPlay(t){this.currentFrame=t,this.play()}update(t){if(!this._playing)return;const e=this.animationSpeed*t,s=this.currentFrame;if(this._durations!==null){let i=this._currentTime%1*this._durations[this.currentFrame];for(i+=e/60*1e3;i<0;)this._currentTime--,i+=this._durations[this.currentFrame];const o=Math.sign(this.animationSpeed*t);for(this._currentTime=Math.floor(this._currentTime);i>=this._durations[this.currentFrame];)i-=this._durations[this.currentFrame]*o,this._currentTime+=o;this._currentTime+=i/this._durations[this.currentFrame]}else this._currentTime+=e;this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete&&this.onComplete()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete&&this.onComplete()):s!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFrames)&&this.onLoop(),this.updateTexture())}updateTexture(){const t=this.currentFrame;this._previousFrame!==t&&(this._previousFrame=t,this._texture=this._textures[t],this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this.uvs=this._texture._uvs.uvsFloat32,this.updateAnchor&&this._anchor.copyFrom(this._texture.defaultAnchor),this.onFrameChange&&this.onFrameChange(this.currentFrame))}destroy(t){this.stop(),super.destroy(t),this.onComplete=null,this.onFrameChange=null,this.onLoop=null}static fromFrames(t){const e=[];for(let s=0;sthis.totalFrames-1)throw new Error(`[AnimatedSprite]: Invalid frame index value ${t}, expected to be between 0 and totalFrames ${this.totalFrames}.`);const e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture()}get playing(){return this._playing}get autoUpdate(){return this._autoUpdate}set autoUpdate(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isConnectedToTicker?(h.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._playing&&(h.shared.add(this.update,this),this._isConnectedToTicker=!0))}}export{n as A}; diff --git a/ChartManager-3c3d6f39.js b/ChartManager-3c3d6f39.js new file mode 100644 index 00000000..c6648f25 --- /dev/null +++ b/ChartManager-3c3d6f39.js @@ -0,0 +1,1271 @@ +var Sy=Object.defineProperty;var My=(r,e,t)=>e in r?Sy(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var Ys=(r,e,t)=>(My(r,typeof e!="symbol"?e+"":e,t),t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const n of s)if(n.type==="childList")for(const a of n.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function t(s){const n={};return s.integrity&&(n.integrity=s.integrity),s.referrerPolicy&&(n.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?n.credentials="include":s.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function i(s){if(s.ep)return;s.ep=!0;const n=t(s);fetch(s.href,n)}})();var $s=(r=>(r[r.WEBGL_LEGACY=0]="WEBGL_LEGACY",r[r.WEBGL=1]="WEBGL",r[r.WEBGL2=2]="WEBGL2",r))($s||{}),r0=(r=>(r[r.UNKNOWN=0]="UNKNOWN",r[r.WEBGL=1]="WEBGL",r[r.CANVAS=2]="CANVAS",r))(r0||{}),Bc=(r=>(r[r.COLOR=16384]="COLOR",r[r.DEPTH=256]="DEPTH",r[r.STENCIL=1024]="STENCIL",r))(Bc||{}),Me=(r=>(r[r.NORMAL=0]="NORMAL",r[r.ADD=1]="ADD",r[r.MULTIPLY=2]="MULTIPLY",r[r.SCREEN=3]="SCREEN",r[r.OVERLAY=4]="OVERLAY",r[r.DARKEN=5]="DARKEN",r[r.LIGHTEN=6]="LIGHTEN",r[r.COLOR_DODGE=7]="COLOR_DODGE",r[r.COLOR_BURN=8]="COLOR_BURN",r[r.HARD_LIGHT=9]="HARD_LIGHT",r[r.SOFT_LIGHT=10]="SOFT_LIGHT",r[r.DIFFERENCE=11]="DIFFERENCE",r[r.EXCLUSION=12]="EXCLUSION",r[r.HUE=13]="HUE",r[r.SATURATION=14]="SATURATION",r[r.COLOR=15]="COLOR",r[r.LUMINOSITY=16]="LUMINOSITY",r[r.NORMAL_NPM=17]="NORMAL_NPM",r[r.ADD_NPM=18]="ADD_NPM",r[r.SCREEN_NPM=19]="SCREEN_NPM",r[r.NONE=20]="NONE",r[r.SRC_OVER=0]="SRC_OVER",r[r.SRC_IN=21]="SRC_IN",r[r.SRC_OUT=22]="SRC_OUT",r[r.SRC_ATOP=23]="SRC_ATOP",r[r.DST_OVER=24]="DST_OVER",r[r.DST_IN=25]="DST_IN",r[r.DST_OUT=26]="DST_OUT",r[r.DST_ATOP=27]="DST_ATOP",r[r.ERASE=26]="ERASE",r[r.SUBTRACT=28]="SUBTRACT",r[r.XOR=29]="XOR",r))(Me||{}),tr=(r=>(r[r.POINTS=0]="POINTS",r[r.LINES=1]="LINES",r[r.LINE_LOOP=2]="LINE_LOOP",r[r.LINE_STRIP=3]="LINE_STRIP",r[r.TRIANGLES=4]="TRIANGLES",r[r.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",r[r.TRIANGLE_FAN=6]="TRIANGLE_FAN",r))(tr||{}),se=(r=>(r[r.RGBA=6408]="RGBA",r[r.RGB=6407]="RGB",r[r.RG=33319]="RG",r[r.RED=6403]="RED",r[r.RGBA_INTEGER=36249]="RGBA_INTEGER",r[r.RGB_INTEGER=36248]="RGB_INTEGER",r[r.RG_INTEGER=33320]="RG_INTEGER",r[r.RED_INTEGER=36244]="RED_INTEGER",r[r.ALPHA=6406]="ALPHA",r[r.LUMINANCE=6409]="LUMINANCE",r[r.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",r[r.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",r[r.DEPTH_STENCIL=34041]="DEPTH_STENCIL",r))(se||{}),wn=(r=>(r[r.TEXTURE_2D=3553]="TEXTURE_2D",r[r.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",r[r.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",r[r.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",r[r.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",r[r.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",r[r.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",r[r.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",r[r.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",r))(wn||{}),Ae=(r=>(r[r.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",r[r.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",r[r.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",r[r.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",r[r.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",r[r.UNSIGNED_INT=5125]="UNSIGNED_INT",r[r.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",r[r.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",r[r.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",r[r.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",r[r.BYTE=5120]="BYTE",r[r.SHORT=5122]="SHORT",r[r.INT=5124]="INT",r[r.FLOAT=5126]="FLOAT",r[r.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",r[r.HALF_FLOAT=36193]="HALF_FLOAT",r))(Ae||{}),ue=(r=>(r[r.FLOAT=0]="FLOAT",r[r.INT=1]="INT",r[r.UINT=2]="UINT",r))(ue||{}),Er=(r=>(r[r.NEAREST=0]="NEAREST",r[r.LINEAR=1]="LINEAR",r))(Er||{}),ss=(r=>(r[r.CLAMP=33071]="CLAMP",r[r.REPEAT=10497]="REPEAT",r[r.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",r))(ss||{}),ur=(r=>(r[r.OFF=0]="OFF",r[r.POW2=1]="POW2",r[r.ON=2]="ON",r[r.ON_MANUAL=3]="ON_MANUAL",r))(ur||{}),Xt=(r=>(r[r.NPM=0]="NPM",r[r.UNPACK=1]="UNPACK",r[r.PMA=2]="PMA",r[r.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",r[r.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",r[r.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA",r))(Xt||{}),Zi=(r=>(r[r.NO=0]="NO",r[r.YES=1]="YES",r[r.AUTO=2]="AUTO",r[r.BLEND=0]="BLEND",r[r.CLEAR=1]="CLEAR",r[r.BLIT=2]="BLIT",r))(Zi||{}),Xu=(r=>(r[r.AUTO=0]="AUTO",r[r.MANUAL=1]="MANUAL",r))(Xu||{}),gi=(r=>(r.LOW="lowp",r.MEDIUM="mediump",r.HIGH="highp",r))(gi||{}),Et=(r=>(r[r.NONE=0]="NONE",r[r.SCISSOR=1]="SCISSOR",r[r.STENCIL=2]="STENCIL",r[r.SPRITE=3]="SPRITE",r[r.COLOR=4]="COLOR",r))(Et||{}),xt=(r=>(r[r.NONE=0]="NONE",r[r.LOW=2]="LOW",r[r.MEDIUM=4]="MEDIUM",r[r.HIGH=8]="HIGH",r))(xt||{}),nr=(r=>(r[r.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",r[r.ARRAY_BUFFER=34962]="ARRAY_BUFFER",r[r.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",r))(nr||{});const ky={createCanvas:(r,e)=>{const t=document.createElement("canvas");return t.width=r,t.height=e,t},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(r,e)=>fetch(r,e),parseXML:r=>new DOMParser().parseFromString(r,"text/xml")},de={ADAPTER:ky,RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var wh=/iPhone/i,Xd=/iPod/i,Kd=/iPad/i,Zd=/\biOS-universal(?:.+)Mac\b/i,xh=/\bAndroid(?:.+)Mobile\b/i,Jd=/Android/i,Xs=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,co=/Silk/i,br=/Windows Phone/i,Qd=/\bWindows(?:.+)ARM\b/i,ef=/BlackBerry/i,tf=/BB10/i,rf=/Opera Mini/i,sf=/\b(CriOS|Chrome)(?:.+)Mobile/i,nf=/Mobile(?:.+)Firefox\b/i,af=function(r){return typeof r<"u"&&r.platform==="MacIntel"&&typeof r.maxTouchPoints=="number"&&r.maxTouchPoints>1&&typeof MSStream>"u"};function Dy(r){return function(e){return e.test(r)}}function of(r){var e={userAgent:"",platform:"",maxTouchPoints:0};!r&&typeof navigator<"u"?e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof r=="string"?e.userAgent=r:r&&r.userAgent&&(e={userAgent:r.userAgent,platform:r.platform,maxTouchPoints:r.maxTouchPoints||0});var t=e.userAgent,i=t.split("[FBAN");typeof i[1]<"u"&&(t=i[0]),i=t.split("Twitter"),typeof i[1]<"u"&&(t=i[0]);var s=Dy(t),n={apple:{phone:s(wh)&&!s(br),ipod:s(Xd),tablet:!s(wh)&&(s(Kd)||af(e))&&!s(br),universal:s(Zd),device:(s(wh)||s(Xd)||s(Kd)||s(Zd)||af(e))&&!s(br)},amazon:{phone:s(Xs),tablet:!s(Xs)&&s(co),device:s(Xs)||s(co)},android:{phone:!s(br)&&s(Xs)||!s(br)&&s(xh),tablet:!s(br)&&!s(Xs)&&!s(xh)&&(s(co)||s(Jd)),device:!s(br)&&(s(Xs)||s(co)||s(xh)||s(Jd))||s(/\bokhttp\b/i)},windows:{phone:s(br),tablet:s(Qd),device:s(br)||s(Qd)},other:{blackberry:s(ef),blackberry10:s(tf),opera:s(rf),firefox:s(nf),chrome:s(sf),device:s(ef)||s(tf)||s(rf)||s(nf)||s(sf)},any:!1,phone:!1,tablet:!1};return n.any=n.apple.device||n.android.device||n.windows.device||n.other.device,n.phone=n.apple.phone||n.android.phone||n.windows.phone,n.tablet=n.apple.tablet||n.android.tablet||n.windows.tablet,n}const Iy=of.default??of,Ar=Iy(globalThis.navigator);de.RETINA_PREFIX=/@([0-9\.]+)x/;de.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var Yt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xa(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function Py(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function i(){return this instanceof i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(i){var s=Object.getOwnPropertyDescriptor(r,i);Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:function(){return r[i]}})}),t}var s0={exports:{}};(function(r){var e=Object.prototype.hasOwnProperty,t="~";function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(t=!1));function s(l,c,u){this.fn=l,this.context=c,this.once=u||!1}function n(l,c,u,h,d){if(typeof u!="function")throw new TypeError("The listener must be a function");var f=new s(u,h||l,d),p=t?t+c:c;return l._events[p]?l._events[p].fn?l._events[p]=[l._events[p],f]:l._events[p].push(f):(l._events[p]=f,l._eventsCount++),l}function a(l,c){--l._eventsCount===0?l._events=new i:delete l._events[c]}function o(){this._events=new i,this._eventsCount=0}o.prototype.eventNames=function(){var c=[],u,h;if(this._eventsCount===0)return c;for(h in u=this._events)e.call(u,h)&&c.push(t?h.slice(1):h);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(u)):c},o.prototype.listeners=function(c){var u=t?t+c:c,h=this._events[u];if(!h)return[];if(h.fn)return[h.fn];for(var d=0,f=h.length,p=new Array(f);d80*t){o=c=r[0],l=u=r[1];for(var p=t;pc&&(c=h),d>u&&(u=d);f=Math.max(c-o,u-l),f=f!==0?32767/f:0}return Ia(n,a,t,o,l,f,0),a}function n0(r,e,t,i,s){var n,a;if(s===Lc(r,e,t,i)>0)for(n=e;n=e;n-=i)a=lf(n,r[n],r[n+1],a);return a&&jl(a,a.next)&&(Ba(a),a=a.next),a}function Gs(r,e){if(!r)return r;e||(e=r);var t=r,i;do if(i=!1,!t.steiner&&(jl(t,t.next)||mt(t.prev,t,t.next)===0)){if(Ba(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function Ia(r,e,t,i,s,n,a){if(r){!a&&n&&zy(r,i,s,n);for(var o=r,l,c;r.prev!==r.next;){if(l=r.prev,c=r.next,n?Fy(r,i,s,n):Ry(r)){e.push(l.i/t|0),e.push(r.i/t|0),e.push(c.i/t|0),Ba(r),r=c.next,o=c.next;continue}if(r=c,r===o){a?a===1?(r=Ly(Gs(r),e,t),Ia(r,e,t,i,s,n,2)):a===2&&Oy(r,e,t,i,s,n):Ia(Gs(r),e,t,i,s,n,1);break}}}}function Ry(r){var e=r.prev,t=r,i=r.next;if(mt(e,t,i)>=0)return!1;for(var s=e.x,n=t.x,a=i.x,o=e.y,l=t.y,c=i.y,u=sn?s>a?s:a:n>a?n:a,f=o>l?o>c?o:c:l>c?l:c,p=i.next;p!==e;){if(p.x>=u&&p.x<=d&&p.y>=h&&p.y<=f&&mn(s,o,n,l,a,c,p.x,p.y)&&mt(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function Fy(r,e,t,i){var s=r.prev,n=r,a=r.next;if(mt(s,n,a)>=0)return!1;for(var o=s.x,l=n.x,c=a.x,u=s.y,h=n.y,d=a.y,f=ol?o>c?o:c:l>c?l:c,g=u>h?u>d?u:d:h>d?h:d,b=Rc(f,p,e,t,i),w=Rc(m,g,e,t,i),v=r.prevZ,y=r.nextZ;v&&v.z>=b&&y&&y.z<=w;){if(v.x>=f&&v.x<=m&&v.y>=p&&v.y<=g&&v!==s&&v!==a&&mn(o,u,l,h,c,d,v.x,v.y)&&mt(v.prev,v,v.next)>=0||(v=v.prevZ,y.x>=f&&y.x<=m&&y.y>=p&&y.y<=g&&y!==s&&y!==a&&mn(o,u,l,h,c,d,y.x,y.y)&&mt(y.prev,y,y.next)>=0))return!1;y=y.nextZ}for(;v&&v.z>=b;){if(v.x>=f&&v.x<=m&&v.y>=p&&v.y<=g&&v!==s&&v!==a&&mn(o,u,l,h,c,d,v.x,v.y)&&mt(v.prev,v,v.next)>=0)return!1;v=v.prevZ}for(;y&&y.z<=w;){if(y.x>=f&&y.x<=m&&y.y>=p&&y.y<=g&&y!==s&&y!==a&&mn(o,u,l,h,c,d,y.x,y.y)&&mt(y.prev,y,y.next)>=0)return!1;y=y.nextZ}return!0}function Ly(r,e,t){var i=r;do{var s=i.prev,n=i.next.next;!jl(s,n)&&a0(s,i,i.next,n)&&Pa(s,n)&&Pa(n,s)&&(e.push(s.i/t|0),e.push(i.i/t|0),e.push(n.i/t|0),Ba(i),Ba(i.next),i=r=n),i=i.next}while(i!==r);return Gs(i)}function Oy(r,e,t,i,s,n){var a=r;do{for(var o=a.next.next;o!==a.prev;){if(a.i!==o.i&&jy(a,o)){var l=o0(a,o);a=Gs(a,a.next),l=Gs(l,l.next),Ia(a,e,t,i,s,n,0),Ia(l,e,t,i,s,n,0);return}o=o.next}a=a.next}while(a!==r)}function Ny(r,e,t,i){var s=[],n,a,o,l,c;for(n=0,a=e.length;n=t.next.y&&t.next.y!==t.y){var o=t.x+(s-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(o<=i&&o>n&&(n=o,a=t.x=t.x&&t.x>=c&&i!==t.x&&mn(sa.x||t.x===a.x&&Vy(a,t)))&&(a=t,h=d)),t=t.next;while(t!==l);return a}function Vy(r,e){return mt(r.prev,r,e.prev)<0&&mt(e.next,r,r.next)<0}function zy(r,e,t,i){var s=r;do s.z===0&&(s.z=Rc(s.x,s.y,e,t,i)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next;while(s!==r);s.prevZ.nextZ=null,s.prevZ=null,Wy(s)}function Wy(r){var e,t,i,s,n,a,o,l,c=1;do{for(t=r,r=null,n=null,a=0;t;){for(a++,i=t,o=0,e=0;e0||l>0&&i;)o!==0&&(l===0||!i||t.z<=i.z)?(s=t,t=t.nextZ,o--):(s=i,i=i.nextZ,l--),n?n.nextZ=s:r=s,s.prevZ=n,n=s;t=i}n.nextZ=null,c*=2}while(a>1);return r}function Rc(r,e,t,i,s){return r=(r-t)*s|0,e=(e-i)*s|0,r=(r|r<<8)&16711935,r=(r|r<<4)&252645135,r=(r|r<<2)&858993459,r=(r|r<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,r|e<<1}function $y(r){var e=r,t=r;do(e.x=(r-a)*(n-o)&&(r-a)*(i-o)>=(t-a)*(e-o)&&(t-a)*(n-o)>=(s-a)*(i-o)}function jy(r,e){return r.next.i!==e.i&&r.prev.i!==e.i&&!qy(r,e)&&(Pa(r,e)&&Pa(e,r)&&Yy(r,e)&&(mt(r.prev,r,e.prev)||mt(r,e.prev,e))||jl(r,e)&&mt(r.prev,r,r.next)>0&&mt(e.prev,e,e.next)>0)}function mt(r,e,t){return(e.y-r.y)*(t.x-e.x)-(e.x-r.x)*(t.y-e.y)}function jl(r,e){return r.x===e.x&&r.y===e.y}function a0(r,e,t,i){var s=fo(mt(r,e,t)),n=fo(mt(r,e,i)),a=fo(mt(t,i,r)),o=fo(mt(t,i,e));return!!(s!==n&&a!==o||s===0&&uo(r,t,e)||n===0&&uo(r,i,e)||a===0&&uo(t,r,i)||o===0&&uo(t,e,i))}function uo(r,e,t){return e.x<=Math.max(r.x,t.x)&&e.x>=Math.min(r.x,t.x)&&e.y<=Math.max(r.y,t.y)&&e.y>=Math.min(r.y,t.y)}function fo(r){return r>0?1:r<0?-1:0}function qy(r,e){var t=r;do{if(t.i!==r.i&&t.next.i!==r.i&&t.i!==e.i&&t.next.i!==e.i&&a0(t,t.next,r,e))return!0;t=t.next}while(t!==r);return!1}function Pa(r,e){return mt(r.prev,r,r.next)<0?mt(r,e,r.next)>=0&&mt(r,r.prev,e)>=0:mt(r,e,r.prev)<0||mt(r,r.next,e)<0}function Yy(r,e){var t=r,i=!1,s=(r.x+e.x)/2,n=(r.y+e.y)/2;do t.y>n!=t.next.y>n&&t.next.y!==t.y&&s<(t.next.x-t.x)*(n-t.y)/(t.next.y-t.y)+t.x&&(i=!i),t=t.next;while(t!==r);return i}function o0(r,e){var t=new Fc(r.i,r.x,r.y),i=new Fc(e.i,e.x,e.y),s=r.next,n=e.prev;return r.next=e,e.prev=r,t.next=s,s.prev=t,i.next=t,t.prev=i,n.next=i,i.prev=n,i}function lf(r,e,t,i){var s=new Fc(r,e,t);return i?(s.next=i.next,s.prev=i,i.next.prev=s,i.next=s):(s.prev=s,s.next=s),s}function Ba(r){r.next.prev=r.prev,r.prev.next=r.next,r.prevZ&&(r.prevZ.nextZ=r.nextZ),r.nextZ&&(r.nextZ.prevZ=r.prevZ)}function Fc(r,e,t){this.i=r,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}$l.deviation=function(r,e,t,i){var s=e&&e.length,n=s?e[0]*t:r.length,a=Math.abs(Lc(r,0,n,t));if(s)for(var o=0,l=e.length;o0&&(i+=r[s-1].length,t.holes.push(i))}return t};var Xy=Ku.exports;const Ky=Xa(Xy);var pl={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */pl.exports;(function(r,e){(function(t){var i=e&&!e.nodeType&&e,s=r&&!r.nodeType&&r,n=typeof Yt=="object"&&Yt;(n.global===n||n.window===n||n.self===n)&&(t=n);var a,o=2147483647,l=36,c=1,u=26,h=38,d=700,f=72,p=128,m="-",g=/^xn--/,b=/[^\x20-\x7E]/,w=/[\x2E\u3002\uFF0E\uFF61]/g,v={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},y=l-c,E=Math.floor,C=String.fromCharCode,k;function B(z){throw new RangeError(v[z])}function M(z,O){for(var N=z.length,ie=[];N--;)ie[N]=O(z[N]);return ie}function U(z,O){var N=z.split("@"),ie="";N.length>1&&(ie=N[0]+"@",z=N[1]),z=z.replace(w,".");var Q=z.split("."),Z=M(Q,O).join(".");return ie+Z}function V(z){for(var O=[],N=0,ie=z.length,Q,Z;N=55296&&Q<=56319&&N65535&&(O-=65536,N+=C(O>>>10&1023|55296),O=56320|O&1023),N+=C(O),N}).join("")}function S(z){return z-48<10?z-22:z-65<26?z-65:z-97<26?z-97:l}function _(z,O){return z+22+75*(z<26)-((O!=0)<<5)}function R(z,O,N){var ie=0;for(z=N?E(z/d):z>>1,z+=E(z/O);z>y*u>>1;ie+=l)z=E(z/y);return E(ie+(y+1)*z/(z+h))}function q(z){var O=[],N=z.length,ie,Q=0,Z=p,be=f,Se,ce,pe,xe,le,fe,we,A,Y;for(Se=z.lastIndexOf(m),Se<0&&(Se=0),ce=0;ce=128&&B("not-basic"),O.push(z.charCodeAt(ce));for(pe=Se>0?Se+1:0;pe=N&&B("invalid-input"),we=S(z.charCodeAt(pe++)),(we>=l||we>E((o-Q)/le))&&B("overflow"),Q+=we*le,A=fe<=be?c:fe>=be+u?u:fe-be,!(weE(o/Y)&&B("overflow"),le*=Y;ie=O.length+1,be=R(Q-xe,ie,xe==0),E(Q/ie)>o-Z&&B("overflow"),Z+=E(Q/ie),Q%=ie,O.splice(Q++,0,Z)}return T(O)}function F(z){var O,N,ie,Q,Z,be,Se,ce,pe,xe,le,fe=[],we,A,Y,j;for(z=V(z),we=z.length,O=p,N=0,Z=f,be=0;be=O&&leE((o-N)/A)&&B("overflow"),N+=(Se-O)*A,O=Se,be=0;beo&&B("overflow"),le==O){for(ce=N,pe=l;xe=pe<=Z?c:pe>=Z+u?u:pe-Z,!(ce"u"||!Mt?Ge:Mt(Uint8Array),Fs={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Ge:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Ge:ArrayBuffer,"%ArrayIteratorPrototype%":Ks&&Mt?Mt([][Symbol.iterator]()):Ge,"%AsyncFromSyncIteratorPrototype%":Ge,"%AsyncFunction%":nn,"%AsyncGenerator%":nn,"%AsyncGeneratorFunction%":nn,"%AsyncIteratorPrototype%":nn,"%Atomics%":typeof Atomics>"u"?Ge:Atomics,"%BigInt%":typeof BigInt>"u"?Ge:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Ge:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Ge:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Ge:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":w1,"%eval%":eval,"%EvalError%":x1,"%Float32Array%":typeof Float32Array>"u"?Ge:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Ge:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Ge:FinalizationRegistry,"%Function%":h0,"%GeneratorFunction%":nn,"%Int8Array%":typeof Int8Array>"u"?Ge:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Ge:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Ge:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ks&&Mt?Mt(Mt([][Symbol.iterator]())):Ge,"%JSON%":typeof JSON=="object"?JSON:Ge,"%Map%":typeof Map>"u"?Ge:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ks||!Mt?Ge:Mt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Ge:Promise,"%Proxy%":typeof Proxy>"u"?Ge:Proxy,"%RangeError%":_1,"%ReferenceError%":E1,"%Reflect%":typeof Reflect>"u"?Ge:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Ge:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ks||!Mt?Ge:Mt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Ge:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ks&&Mt?Mt(""[Symbol.iterator]()):Ge,"%Symbol%":Ks?Symbol:Ge,"%SyntaxError%":kn,"%ThrowTypeError%":T1,"%TypedArray%":S1,"%TypeError%":xn,"%Uint8Array%":typeof Uint8Array>"u"?Ge:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Ge:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Ge:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Ge:Uint32Array,"%URIError%":A1,"%WeakMap%":typeof WeakMap>"u"?Ge:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Ge:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Ge:WeakSet};if(Mt)try{null.error}catch(r){var M1=Mt(Mt(r));Fs["%Error.prototype%"]=M1}var k1=function r(e){var t;if(e==="%AsyncFunction%")t=Eh("async function () {}");else if(e==="%GeneratorFunction%")t=Eh("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=Eh("async function* () {}");else if(e==="%AsyncGenerator%"){var i=r("%AsyncGeneratorFunction%");i&&(t=i.prototype)}else if(e==="%AsyncIteratorPrototype%"){var s=r("%AsyncGenerator%");s&&Mt&&(t=Mt(s.prototype))}return Fs[e]=t,t},uf={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Za=Zu,ml=v1,D1=Za.call(Function.call,Array.prototype.concat),I1=Za.call(Function.apply,Array.prototype.splice),df=Za.call(Function.call,String.prototype.replace),gl=Za.call(Function.call,String.prototype.slice),P1=Za.call(Function.call,RegExp.prototype.exec),B1=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,R1=/\\(\\)?/g,F1=function(e){var t=gl(e,0,1),i=gl(e,-1);if(t==="%"&&i!=="%")throw new kn("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&t!=="%")throw new kn("invalid intrinsic syntax, expected opening `%`");var s=[];return df(e,B1,function(n,a,o,l){s[s.length]=o?df(l,R1,"$1"):a||n}),s},L1=function(e,t){var i=e,s;if(ml(uf,i)&&(s=uf[i],i="%"+s[0]+"%"),ml(Fs,i)){var n=Fs[i];if(n===nn&&(n=k1(i)),typeof n>"u"&&!t)throw new xn("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:s,name:i,value:n}}throw new kn("intrinsic "+e+" does not exist!")},jn=function(e,t){if(typeof e!="string"||e.length===0)throw new xn("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new xn('"allowMissing" argument must be a boolean');if(P1(/^%?[^%]*%?$/,e)===null)throw new kn("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=F1(e),s=i.length>0?i[0]:"",n=L1("%"+s+"%",t),a=n.name,o=n.value,l=!1,c=n.alias;c&&(s=c[0],I1(i,D1([0,1],c)));for(var u=1,h=!0;u=i.length){var m=Rs(o,d);h=!!m,h&&"get"in m&&!("originalValue"in m.get)?o=m.get:o=o[d]}else h=ml(o,d),o=o[d];h&&!l&&(Fs[a]=o)}}return o},c0={exports:{}},Th,ff;function Ju(){if(ff)return Th;ff=1;var r=jn,e=r("%Object.defineProperty%",!0)||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Th=e,Th}var O1=jn,tl=O1("%Object.getOwnPropertyDescriptor%",!0);if(tl)try{tl([],"length")}catch{tl=null}var u0=tl,pf=Ju(),N1=l0,Zs=Ka,mf=u0,U1=function(e,t,i){if(!e||typeof e!="object"&&typeof e!="function")throw new Zs("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new Zs("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Zs("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Zs("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Zs("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Zs("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,n=arguments.length>4?arguments[4]:null,a=arguments.length>5?arguments[5]:null,o=arguments.length>6?arguments[6]:!1,l=!!mf&&mf(e,t);if(pf)pf(e,t,{configurable:a===null&&l?l.configurable:!a,enumerable:s===null&&l?l.enumerable:!s,value:i,writable:n===null&&l?l.writable:!n});else if(o||!s&&!n&&!a)e[t]=i;else throw new N1("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Oc=Ju(),d0=function(){return!!Oc};d0.hasArrayLengthDefineBug=function(){if(!Oc)return null;try{return Oc([],"length",{value:1}).length!==1}catch{return!0}};var H1=d0,G1=jn,gf=U1,V1=H1(),bf=u0,yf=Ka,z1=G1("%Math.floor%"),W1=function(e,t){if(typeof e!="function")throw new yf("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||z1(t)!==t)throw new yf("`length` must be a positive 32-bit integer");var i=arguments.length>2&&!!arguments[2],s=!0,n=!0;if("length"in e&&bf){var a=bf(e,"length");a&&!a.configurable&&(s=!1),a&&!a.writable&&(n=!1)}return(s||n||!i)&&(V1?gf(e,"length",t,!0,!0):gf(e,"length",t)),e};(function(r){var e=Zu,t=jn,i=W1,s=Ka,n=t("%Function.prototype.apply%"),a=t("%Function.prototype.call%"),o=t("%Reflect.apply%",!0)||e.call(a,n),l=Ju(),c=t("%Math.max%");r.exports=function(d){if(typeof d!="function")throw new s("a function is required");var f=o(e,a,arguments);return i(f,1+c(0,d.length-(arguments.length-1)),!0)};var u=function(){return o(e,n,arguments)};l?l(r.exports,"apply",{value:u}):r.exports.apply=u})(c0);var $1=c0.exports,f0=jn,p0=$1,j1=p0(f0("String.prototype.indexOf")),q1=function(e,t){var i=f0(e,!!t);return typeof i=="function"&&j1(e,".prototype.")>-1?p0(i):i};const Y1={},X1=Object.freeze(Object.defineProperty({__proto__:null,default:Y1},Symbol.toStringTag,{value:"Module"})),K1=Py(X1);var Qu=typeof Map=="function"&&Map.prototype,Ch=Object.getOwnPropertyDescriptor&&Qu?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,bl=Qu&&Ch&&typeof Ch.get=="function"?Ch.get:null,vf=Qu&&Map.prototype.forEach,ed=typeof Set=="function"&&Set.prototype,Sh=Object.getOwnPropertyDescriptor&&ed?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,yl=ed&&Sh&&typeof Sh.get=="function"?Sh.get:null,wf=ed&&Set.prototype.forEach,Z1=typeof WeakMap=="function"&&WeakMap.prototype,xa=Z1?WeakMap.prototype.has:null,J1=typeof WeakSet=="function"&&WeakSet.prototype,_a=J1?WeakSet.prototype.has:null,Q1=typeof WeakRef=="function"&&WeakRef.prototype,xf=Q1?WeakRef.prototype.deref:null,ev=Boolean.prototype.valueOf,tv=Object.prototype.toString,iv=Function.prototype.toString,rv=String.prototype.match,td=String.prototype.slice,es=String.prototype.replace,sv=String.prototype.toUpperCase,_f=String.prototype.toLowerCase,m0=RegExp.prototype.test,Ef=Array.prototype.concat,Ji=Array.prototype.join,nv=Array.prototype.slice,Af=Math.floor,Nc=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Mh=Object.getOwnPropertySymbols,Uc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Dn=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Ut=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Dn||"symbol")?Symbol.toStringTag:null,g0=Object.prototype.propertyIsEnumerable,Tf=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(r){return r.__proto__}:null);function Cf(r,e){if(r===1/0||r===-1/0||r!==r||r&&r>-1e3&&r<1e3||m0.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof r=="number"){var i=r<0?-Af(-r):Af(r);if(i!==r){var s=String(i),n=td.call(e,s.length+1);return es.call(s,t,"$&_")+"."+es.call(es.call(n,/([0-9]{3})/g,"$&_"),/_$/,"")}}return es.call(e,t,"$&_")}var Hc=K1,Sf=Hc.custom,Mf=y0(Sf)?Sf:null,av=function r(e,t,i,s){var n=t||{};if($r(n,"quoteStyle")&&n.quoteStyle!=="single"&&n.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if($r(n,"maxStringLength")&&(typeof n.maxStringLength=="number"?n.maxStringLength<0&&n.maxStringLength!==1/0:n.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=$r(n,"customInspect")?n.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if($r(n,"indent")&&n.indent!==null&&n.indent!==" "&&!(parseInt(n.indent,10)===n.indent&&n.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if($r(n,"numericSeparator")&&typeof n.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var o=n.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return w0(e,n);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var l=String(e);return o?Cf(e,l):l}if(typeof e=="bigint"){var c=String(e)+"n";return o?Cf(e,c):c}var u=typeof n.depth>"u"?5:n.depth;if(typeof i>"u"&&(i=0),i>=u&&u>0&&typeof e=="object")return Gc(e)?"[Array]":"[Object]";var h=Av(n,i);if(typeof s>"u")s=[];else if(v0(s,e)>=0)return"[Circular]";function d(S,_,R){if(_&&(s=nv.call(s),s.push(_)),R){var q={depth:n.depth};return $r(n,"quoteStyle")&&(q.quoteStyle=n.quoteStyle),r(S,q,i+1,s)}return r(S,n,i+1,s)}if(typeof e=="function"&&!kf(e)){var f=mv(e),p=po(e,d);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(p.length>0?" { "+Ji.call(p,", ")+" }":"")}if(y0(e)){var m=Dn?es.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Uc.call(e);return typeof e=="object"&&!Dn?ea(m):m}if(xv(e)){for(var g="<"+_f.call(String(e.nodeName)),b=e.attributes||[],w=0;w",g}if(Gc(e)){if(e.length===0)return"[]";var v=po(e,d);return h&&!Ev(v)?"["+Vc(v,h)+"]":"[ "+Ji.call(v,", ")+" ]"}if(hv(e)){var y=po(e,d);return!("cause"in Error.prototype)&&"cause"in e&&!g0.call(e,"cause")?"{ ["+String(e)+"] "+Ji.call(Ef.call("[cause]: "+d(e.cause),y),", ")+" }":y.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Ji.call(y,", ")+" }"}if(typeof e=="object"&&a){if(Mf&&typeof e[Mf]=="function"&&Hc)return Hc(e,{depth:u-i});if(a!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(gv(e)){var E=[];return vf&&vf.call(e,function(S,_){E.push(d(_,e,!0)+" => "+d(S,e))}),Df("Map",bl.call(e),E,h)}if(vv(e)){var C=[];return wf&&wf.call(e,function(S){C.push(d(S,e))}),Df("Set",yl.call(e),C,h)}if(bv(e))return kh("WeakMap");if(wv(e))return kh("WeakSet");if(yv(e))return kh("WeakRef");if(uv(e))return ea(d(Number(e)));if(fv(e))return ea(d(Nc.call(e)));if(dv(e))return ea(ev.call(e));if(cv(e))return ea(d(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(typeof globalThis<"u"&&e===globalThis||typeof Yt<"u"&&e===Yt)return"{ [object globalThis] }";if(!lv(e)&&!kf(e)){var k=po(e,d),B=Tf?Tf(e)===Object.prototype:e instanceof Object||e.constructor===Object,M=e instanceof Object?"":"null prototype",U=!B&&Ut&&Object(e)===e&&Ut in e?td.call(hs(e),8,-1):M?"Object":"",V=B||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",T=V+(U||M?"["+Ji.call(Ef.call([],U||[],M||[]),": ")+"] ":"");return k.length===0?T+"{}":h?T+"{"+Vc(k,h)+"}":T+"{ "+Ji.call(k,", ")+" }"}return String(e)};function b0(r,e,t){var i=(t.quoteStyle||e)==="double"?'"':"'";return i+r+i}function ov(r){return es.call(String(r),/"/g,""")}function Gc(r){return hs(r)==="[object Array]"&&(!Ut||!(typeof r=="object"&&Ut in r))}function lv(r){return hs(r)==="[object Date]"&&(!Ut||!(typeof r=="object"&&Ut in r))}function kf(r){return hs(r)==="[object RegExp]"&&(!Ut||!(typeof r=="object"&&Ut in r))}function hv(r){return hs(r)==="[object Error]"&&(!Ut||!(typeof r=="object"&&Ut in r))}function cv(r){return hs(r)==="[object String]"&&(!Ut||!(typeof r=="object"&&Ut in r))}function uv(r){return hs(r)==="[object Number]"&&(!Ut||!(typeof r=="object"&&Ut in r))}function dv(r){return hs(r)==="[object Boolean]"&&(!Ut||!(typeof r=="object"&&Ut in r))}function y0(r){if(Dn)return r&&typeof r=="object"&&r instanceof Symbol;if(typeof r=="symbol")return!0;if(!r||typeof r!="object"||!Uc)return!1;try{return Uc.call(r),!0}catch{}return!1}function fv(r){if(!r||typeof r!="object"||!Nc)return!1;try{return Nc.call(r),!0}catch{}return!1}var pv=Object.prototype.hasOwnProperty||function(r){return r in this};function $r(r,e){return pv.call(r,e)}function hs(r){return tv.call(r)}function mv(r){if(r.name)return r.name;var e=rv.call(iv.call(r),/^function\s*([\w$]+)/);return e?e[1]:null}function v0(r,e){if(r.indexOf)return r.indexOf(e);for(var t=0,i=r.length;te.maxStringLength){var t=r.length-e.maxStringLength,i="... "+t+" more character"+(t>1?"s":"");return w0(td.call(r,0,e.maxStringLength),e)+i}var s=es.call(es.call(r,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,_v);return b0(s,"single",e)}function _v(r){var e=r.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+sv.call(e.toString(16))}function ea(r){return"Object("+r+")"}function kh(r){return r+" { ? }"}function Df(r,e,t,i){var s=i?Vc(t,i):Ji.call(t,", ");return r+" ("+e+") {"+s+"}"}function Ev(r){for(var e=0;e=0)return!1;return!0}function Av(r,e){var t;if(r.indent===" ")t=" ";else if(typeof r.indent=="number"&&r.indent>0)t=Ji.call(Array(r.indent+1)," ");else return null;return{base:t,prev:Ji.call(Array(e+1),t)}}function Vc(r,e){if(r.length===0)return"";var t=` +`+e.prev+e.base;return t+Ji.call(r,","+t)+` +`+e.prev}function po(r,e){var t=Gc(r),i=[];if(t){i.length=r.length;for(var s=0;s1;){var t=e.pop(),i=t.obj[t.prop];if(Ms(i)){for(var s=[],n=0;n=Ph?a.slice(l,l+Ph):a,u=[],h=0;h=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||n===Uv.RFC1738&&(d===40||d===41)){u[u.length]=c.charAt(h);continue}if(d<128){u[u.length]=Hi[d];continue}if(d<2048){u[u.length]=Hi[192|d>>6]+Hi[128|d&63];continue}if(d<55296||d>=57344){u[u.length]=Hi[224|d>>12]+Hi[128|d>>6&63]+Hi[128|d&63];continue}h+=1,d=65536+((d&1023)<<10|c.charCodeAt(h)&1023),u[u.length]=Hi[240|d>>18]+Hi[128|d>>12&63]+Hi[128|d>>6&63]+Hi[128|d&63]}o+=u.join("")}return o},$v=function(e){for(var t=[{obj:{o:e},prop:"o"}],i=[],s=0;s"u"&&(E=0)}if(typeof u=="function"?v=u(t,v):v instanceof Date?v=f(v):i==="comma"&&Yi(v)&&(v=il.maybeMap(v,function(z){return z instanceof Date?f(z):z})),v===null){if(a)return c&&!g?c(t,_t.encoder,b,"key",p):t;v=""}if(Qv(v)||il.isBuffer(v)){if(c){var B=g?t:c(t,_t.encoder,b,"key",p);return[m(B)+"="+m(c(v,_t.encoder,b,"value",p))]}return[m(t)+"="+m(String(v))]}var M=[];if(typeof v>"u")return M;var U;if(i==="comma"&&Yi(v))g&&c&&(v=il.maybeMap(v,c)),U=[{value:v.length>0?v.join(",")||null:void 0}];else if(Yi(u))U=u;else{var V=Object.keys(v);U=h?V.sort(h):V}var T=l?t.replace(/\./g,"%2E"):t,S=s&&Yi(v)&&v.length===1?T+"[]":T;if(n&&Yi(v)&&v.length===0)return S+"[]";for(var _=0;_"u"?e.encodeDotInKeys===!0?!0:_t.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:_t.addQueryPrefix,allowDots:o,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:_t.allowEmptyArrays,arrayFormat:a,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:_t.charsetSentinel,commaRoundTrip:e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?_t.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:_t.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:_t.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:_t.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:_t.encodeValuesOnly,filter:n,format:i,formatter:s,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:_t.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:_t.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:_t.strictNullHandling}},iw=function(r,e){var t=r,i=tw(e),s,n;typeof i.filter=="function"?(n=i.filter,t=n("",t)):Yi(i.filter)&&(n=i.filter,s=n);var a=[];if(typeof t!="object"||t===null)return"";var o=T0[i.arrayFormat],l=o==="comma"&&i.commaRoundTrip;s||(s=Object.keys(t)),i.sort&&s.sort(i.sort);for(var c=A0(),u=0;u0?f+d:""},In=E0,zc=Object.prototype.hasOwnProperty,rw=Array.isArray,vt={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:In.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},sw=function(r){return r.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},S0=function(r,e){return r&&typeof r=="string"&&e.comma&&r.indexOf(",")>-1?r.split(","):r},aw="utf8=%26%2310003%3B",ow="utf8=%E2%9C%93",lw=function(e,t){var i={__proto__:null},s=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;s=s.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var n=t.parameterLimit===1/0?void 0:t.parameterLimit,a=s.split(t.delimiter,n),o=-1,l,c=t.charset;if(t.charsetSentinel)for(l=0;l-1&&(p=rw(p)?[p]:p);var m=zc.call(i,f);m&&t.duplicates==="combine"?i[f]=In.combine(i[f],p):(!m||t.duplicates==="last")&&(i[f]=p)}return i},hw=function(r,e,t,i){for(var s=i?e:S0(e,t),n=r.length-1;n>=0;--n){var a,o=r[n];if(o==="[]"&&t.parseArrays)a=t.allowEmptyArrays&&(s===""||t.strictNullHandling&&s===null)?[]:[].concat(s);else{a=t.plainObjects?Object.create(null):{};var l=o.charAt(0)==="["&&o.charAt(o.length-1)==="]"?o.slice(1,-1):o,c=t.decodeDotInKeys?l.replace(/%2E/g,"."):l,u=parseInt(c,10);!t.parseArrays&&c===""?a={0:s}:!isNaN(u)&&o!==c&&String(u)===c&&u>=0&&t.parseArrays&&u<=t.arrayLimit?(a=[],a[u]=s):c!=="__proto__"&&(a[c]=s)}s=a}return s},cw=function(e,t,i,s){if(e){var n=i.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/,o=/(\[[^[\]]*])/g,l=i.depth>0&&a.exec(n),c=l?n.slice(0,l.index):n,u=[];if(c){if(!i.plainObjects&&zc.call(Object.prototype,c)&&!i.allowPrototypes)return;u.push(c)}for(var h=0;i.depth>0&&(l=o.exec(n))!==null&&h"u"?vt.charset:e.charset,i=typeof e.duplicates>"u"?vt.duplicates:e.duplicates;if(i!=="combine"&&i!=="first"&&i!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var s=typeof e.allowDots>"u"?e.decodeDotInKeys===!0?!0:vt.allowDots:!!e.allowDots;return{allowDots:s,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:vt.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:vt.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:vt.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:vt.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:vt.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:vt.comma,decodeDotInKeys:typeof e.decodeDotInKeys=="boolean"?e.decodeDotInKeys:vt.decodeDotInKeys,decoder:typeof e.decoder=="function"?e.decoder:vt.decoder,delimiter:typeof e.delimiter=="string"||In.isRegExp(e.delimiter)?e.delimiter:vt.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:vt.depth,duplicates:i,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:vt.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:vt.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:vt.plainObjects,strictDepth:typeof e.strictDepth=="boolean"?!!e.strictDepth:vt.strictDepth,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:vt.strictNullHandling}},dw=function(r,e){var t=uw(e);if(r===""||r===null||typeof r>"u")return t.plainObjects?Object.create(null):{};for(var i=typeof r=="string"?lw(r,t):r,s=t.plainObjects?Object.create(null):{},n=Object.keys(i),a=0;a",'"',"`"," ","\r",` +`," "],_w=["{","}","|","\\","^","`"].concat(xw),Wc=["'"].concat(_w),Pf=["%","/","?",";","#"].concat(Wc),Bf=["/","?","#"],Ew=255,Rf=/^[+a-z0-9A-Z_-]{0,63}$/,Aw=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Tw={javascript:!0,"javascript:":!0},$c={javascript:!0,"javascript:":!0},_n={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},jc=gw;function Cw(r,e,t){if(r&&typeof r=="object"&&r instanceof Mr)return r;var i=new Mr;return i.parse(r,e,t),i}Mr.prototype.parse=function(r,e,t){if(typeof r!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof r);var i=r.indexOf("?"),s=i!==-1&&i127?E+="x":E+=y[C];if(!E.match(Rf)){var B=w.slice(0,f),M=w.slice(f+1),U=y.match(Aw);U&&(B.push(U[1]),M.unshift(U[2])),M.length&&(o="/"+M.join(".")+o),this.hostname=B.join(".");break}}}this.hostname.length>Ew?this.hostname="":this.hostname=this.hostname.toLowerCase(),b||(this.hostname=bw.toASCII(this.hostname));var V=this.port?":"+this.port:"",T=this.hostname||"";this.host=T+V,this.href+=this.host,b&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),o[0]!=="/"&&(o="/"+o))}if(!Tw[u])for(var f=0,v=Wc.length;f0?t.host.split("@"):!1;E&&(t.auth=E.shift(),t.hostname=E.shift(),t.host=t.hostname)}return t.search=r.search,t.query=r.query,(t.pathname!==null||t.search!==null)&&(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.href=t.format(),t}if(!w.length)return t.pathname=null,t.search?t.path="/"+t.search:t.path=null,t.href=t.format(),t;for(var C=w.slice(-1)[0],k=(t.host||r.host||w.length>1)&&(C==="."||C==="..")||C==="",B=0,M=w.length;M>=0;M--)C=w[M],C==="."?w.splice(M,1):C===".."?(w.splice(M,1),B++):B&&(w.splice(M,1),B--);if(!g&&!b)for(;B--;B)w.unshift("..");g&&w[0]!==""&&(!w[0]||w[0].charAt(0)!=="/")&&w.unshift(""),k&&w.join("/").substr(-1)!=="/"&&w.push("");var U=w[0]===""||w[0]&&w[0].charAt(0)==="/";if(y){t.hostname=U?"":w.length?w.shift():"",t.host=t.hostname;var E=t.host&&t.host.indexOf("@")>0?t.host.split("@"):!1;E&&(t.auth=E.shift(),t.hostname=E.shift(),t.host=t.hostname)}return g=g||t.host&&w.length,g&&!U&&w.unshift(""),w.length>0?t.pathname=w.join("/"):(t.pathname=null,t.path=null),(t.pathname!==null||t.search!==null)&&(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.auth=r.auth||t.auth,t.slashes=t.slashes||r.slashes,t.href=t.format(),t};Mr.prototype.parseHost=function(){var r=this.host,e=vw.exec(r);e&&(e=e[0],e!==":"&&(this.port=e.substr(1)),r=r.substr(0,r.length-e.length)),r&&(this.hostname=r)};const Ff={};function He(r,e,t=3){if(Ff[e])return;let i=new Error().stack;typeof i>"u"?console.warn("PixiJS Deprecation Warning: ",`${e} +Deprecated since v${r}`):(i=i.split(` +`).splice(t).join(` +`),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",`${e} +Deprecated since v${r}`),console.warn(i),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",`${e} +Deprecated since v${r}`),console.warn(i))),Ff[e]=!0}function Ei(r){if(typeof r!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(r)}`)}function ta(r){return r.split("?")[0].split("#")[0]}function Sw(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Mw(r,e,t){return r.replace(new RegExp(Sw(e),"g"),t)}function kw(r,e){let t="",i=0,s=-1,n=0,a=-1;for(let o=0;o<=r.length;++o){if(o2){const l=t.lastIndexOf("/");if(l!==t.length-1){l===-1?(t="",i=0):(t=t.slice(0,l),i=t.length-1-t.lastIndexOf("/")),s=o,n=0;continue}}else if(t.length===2||t.length===1){t="",i=0,s=o,n=0;continue}}e&&(t.length>0?t+="/..":t="..",i=2)}else t.length>0?t+=`/${r.slice(s+1,o)}`:t=r.slice(s+1,o),i=o-s-1;s=o,n=0}else a===46&&n!==-1?++n:n=-1}return t}const Pt={toPosix(r){return Mw(r,"\\","/")},isUrl(r){return/^https?:/.test(this.toPosix(r))},isDataUrl(r){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(r)},isBlobUrl(r){return r.startsWith("blob:")},hasProtocol(r){return/^[^/:]+:/.test(this.toPosix(r))},getProtocol(r){Ei(r),r=this.toPosix(r);const e=/^file:\/\/\//.exec(r);if(e)return e[0];const t=/^[^/:]+:\/{0,2}/.exec(r);return t?t[0]:""},toAbsolute(r,e,t){if(Ei(r),this.isDataUrl(r)||this.isBlobUrl(r))return r;const i=ta(this.toPosix(e??de.ADAPTER.getBaseUrl())),s=ta(this.toPosix(t??this.rootname(i)));return r=this.toPosix(r),r.startsWith("/")?Pt.join(s,r.slice(1)):this.isAbsolute(r)?r:this.join(i,r)},normalize(r){if(Ei(r),r.length===0)return".";if(this.isDataUrl(r)||this.isBlobUrl(r))return r;r=this.toPosix(r);let e="";const t=r.startsWith("/");this.hasProtocol(r)&&(e=this.rootname(r),r=r.slice(e.length));const i=r.endsWith("/");return r=kw(r,!1),r.length>0&&i&&(r+="/"),t?`/${r}`:e+r},isAbsolute(r){return Ei(r),r=this.toPosix(r),this.hasProtocol(r)?!0:r.startsWith("/")},join(...r){if(r.length===0)return".";let e;for(let t=0;t0)if(e===void 0)e=i;else{const s=r[t-1]??"";this.joinExtensions.includes(this.extname(s).toLowerCase())?e+=`/../${i}`:e+=`/${i}`}}return e===void 0?".":this.normalize(e)},dirname(r){if(Ei(r),r.length===0)return".";r=this.toPosix(r);let e=r.charCodeAt(0);const t=e===47;let i=-1,s=!0;const n=this.getProtocol(r),a=r;r=r.slice(n.length);for(let o=r.length-1;o>=1;--o)if(e=r.charCodeAt(o),e===47){if(!s){i=o;break}}else s=!1;return i===-1?t?"/":this.isUrl(a)?n+r:n:t&&i===1?"//":n+r.slice(0,i)},rootname(r){Ei(r),r=this.toPosix(r);let e="";if(r.startsWith("/")?e="/":e=this.getProtocol(r),this.isUrl(r)){const t=r.indexOf("/",e.length);t!==-1?e=r.slice(0,t):e=r,e.endsWith("/")||(e+="/")}return e},basename(r,e){Ei(r),e&&Ei(e),r=ta(this.toPosix(r));let t=0,i=-1,s=!0,n;if(e!==void 0&&e.length>0&&e.length<=r.length){if(e.length===r.length&&e===r)return"";let a=e.length-1,o=-1;for(n=r.length-1;n>=0;--n){const l=r.charCodeAt(n);if(l===47){if(!s){t=n+1;break}}else o===-1&&(s=!1,o=n+1),a>=0&&(l===e.charCodeAt(a)?--a===-1&&(i=n):(a=-1,i=o))}return t===i?i=o:i===-1&&(i=r.length),r.slice(t,i)}for(n=r.length-1;n>=0;--n)if(r.charCodeAt(n)===47){if(!s){t=n+1;break}}else i===-1&&(s=!1,i=n+1);return i===-1?"":r.slice(t,i)},extname(r){Ei(r),r=ta(this.toPosix(r));let e=-1,t=0,i=-1,s=!0,n=0;for(let a=r.length-1;a>=0;--a){const o=r.charCodeAt(a);if(o===47){if(!s){t=a+1;break}continue}i===-1&&(s=!1,i=a+1),o===46?e===-1?e=a:n!==1&&(n=1):e!==-1&&(n=-1)}return e===-1||i===-1||n===0||n===1&&e===i-1&&e===t+1?"":r.slice(e,i)},parse(r){Ei(r);const e={root:"",dir:"",base:"",ext:"",name:""};if(r.length===0)return e;r=ta(this.toPosix(r));let t=r.charCodeAt(0);const i=this.isAbsolute(r);let s;e.root=this.rootname(r),i||this.hasProtocol(r)?s=1:s=0;let n=-1,a=0,o=-1,l=!0,c=r.length-1,u=0;for(;c>=s;--c){if(t=r.charCodeAt(c),t===47){if(!l){a=c+1;break}continue}o===-1&&(l=!1,o=c+1),t===46?n===-1?n=c:u!==1&&(u=1):n!==-1&&(u=-1)}return n===-1||o===-1||u===0||u===1&&n===o-1&&n===a+1?o!==-1&&(a===0&&i?e.base=e.name=r.slice(1,o):e.base=e.name=r.slice(a,o)):(a===0&&i?(e.name=r.slice(1,n),e.base=r.slice(1,o)):(e.name=r.slice(a,n),e.base=r.slice(a,o)),e.ext=r.slice(n,o)),e.dir=this.dirname(r),e},sep:"/",delimiter:":",joinExtensions:[".html"]};let Rh;async function Dw(){return Rh??(Rh=(async()=>{const r=document.createElement("canvas").getContext("webgl");if(!r)return Xt.UNPACK;const e=await new Promise(n=>{const a=document.createElement("video");a.onloadeddata=()=>n(a),a.onerror=()=>n(null),a.autoplay=!1,a.crossOrigin="anonymous",a.preload="auto",a.src="data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmoCrXsYMPQkBNgIRMYXZmV0GETGF2ZkSJiEBEAAAAAAAAFlSua8yuAQAAAAAAAEPXgQFzxYgAAAAAAAAAAZyBACK1nIN1bmSIgQCGhVZfVlA5g4EBI+ODhAJiWgDglLCBArqBApqBAlPAgQFVsIRVuYEBElTDZ9Vzc9JjwItjxYgAAAAAAAAAAWfInEWjh0VOQ09ERVJEh49MYXZjIGxpYnZweC12cDlnyKJFo4hEVVJBVElPTkSHlDAwOjAwOjAwLjA0MDAwMDAwMAAAH0O2dcfngQCgwqGggQAAAIJJg0IAABAAFgA4JBwYSgAAICAAEb///4r+AAB1oZ2mm+6BAaWWgkmDQgAAEAAWADgkHBhKAAAgIABIQBxTu2uRu4+zgQC3iveBAfGCAXHwgQM=",a.load()});if(!e)return Xt.UNPACK;const t=r.createTexture();r.bindTexture(r.TEXTURE_2D,t);const i=r.createFramebuffer();r.bindFramebuffer(r.FRAMEBUFFER,i),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,t,0),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),r.pixelStorei(r.UNPACK_COLORSPACE_CONVERSION_WEBGL,r.NONE),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,e);const s=new Uint8Array(4);return r.readPixels(0,0,1,1,r.RGBA,r.UNSIGNED_BYTE,s),r.deleteFramebuffer(i),r.deleteTexture(t),r.getExtension("WEBGL_lose_context")?.loseContext(),s[0]<=s[3]?Xt.PMA:Xt.UNPACK})()),Rh}let Fh;function Iw(){return typeof Fh>"u"&&(Fh=function(){const r={stencil:!0,failIfMajorPerformanceCaveat:de.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!de.ADAPTER.getWebGLRenderingContext())return!1;const e=de.ADAPTER.createCanvas();let t=e.getContext("webgl",r)||e.getContext("experimental-webgl",r);const i=!!t?.getContextAttributes()?.stencil;if(t){const s=t.getExtension("WEBGL_lose_context");s&&s.loseContext()}return t=null,i}catch{return!1}}()),Fh}var Pw={grad:.9,turn:360,rad:360/(2*Math.PI)},yr=function(r){return typeof r=="string"?r.length>0:typeof r=="number"},kt=function(r,e,t){return e===void 0&&(e=0),t===void 0&&(t=Math.pow(10,e)),Math.round(t*r)/t+0},bi=function(r,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),r>t?t:r>e?r:e},M0=function(r){return(r=isFinite(r)?r%360:0)>0?r:r+360},Lf=function(r){return{r:bi(r.r,0,255),g:bi(r.g,0,255),b:bi(r.b,0,255),a:bi(r.a)}},Lh=function(r){return{r:kt(r.r),g:kt(r.g),b:kt(r.b),a:kt(r.a,3)}},Bw=/^#([0-9a-f]{3,8})$/i,bo=function(r){var e=r.toString(16);return e.length<2?"0"+e:e},k0=function(r){var e=r.r,t=r.g,i=r.b,s=r.a,n=Math.max(e,t,i),a=n-Math.min(e,t,i),o=a?n===e?(t-i)/a:n===t?2+(i-e)/a:4+(e-t)/a:0;return{h:60*(o<0?o+6:o),s:n?a/n*100:0,v:n/255*100,a:s}},D0=function(r){var e=r.h,t=r.s,i=r.v,s=r.a;e=e/360*6,t/=100,i/=100;var n=Math.floor(e),a=i*(1-t),o=i*(1-(e-n)*t),l=i*(1-(1-e+n)*t),c=n%6;return{r:255*[i,o,a,a,l,i][c],g:255*[l,i,i,o,a,a][c],b:255*[a,a,l,i,i,o][c],a:s}},Of=function(r){return{h:M0(r.h),s:bi(r.s,0,100),l:bi(r.l,0,100),a:bi(r.a)}},Nf=function(r){return{h:kt(r.h),s:kt(r.s),l:kt(r.l),a:kt(r.a,3)}},Uf=function(r){return D0((t=(e=r).s,{h:e.h,s:(t*=((i=e.l)<50?i:100-i)/100)>0?2*t/(i+t)*100:0,v:i+t,a:e.a}));var e,t,i},Aa=function(r){return{h:(e=k0(r)).h,s:(s=(200-(t=e.s))*(i=e.v)/100)>0&&s<200?t*i/100/(s<=100?s:200-s)*100:0,l:s/2,a:e.a};var e,t,i,s},Rw=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Fw=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Lw=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ow=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,qc={string:[[function(r){var e=Bw.exec(r);return e?(r=e[1]).length<=4?{r:parseInt(r[0]+r[0],16),g:parseInt(r[1]+r[1],16),b:parseInt(r[2]+r[2],16),a:r.length===4?kt(parseInt(r[3]+r[3],16)/255,2):1}:r.length===6||r.length===8?{r:parseInt(r.substr(0,2),16),g:parseInt(r.substr(2,2),16),b:parseInt(r.substr(4,2),16),a:r.length===8?kt(parseInt(r.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(r){var e=Lw.exec(r)||Ow.exec(r);return e?e[2]!==e[4]||e[4]!==e[6]?null:Lf({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(r){var e=Rw.exec(r)||Fw.exec(r);if(!e)return null;var t,i,s=Of({h:(t=e[1],i=e[2],i===void 0&&(i="deg"),Number(t)*(Pw[i]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return Uf(s)},"hsl"]],object:[[function(r){var e=r.r,t=r.g,i=r.b,s=r.a,n=s===void 0?1:s;return yr(e)&&yr(t)&&yr(i)?Lf({r:Number(e),g:Number(t),b:Number(i),a:Number(n)}):null},"rgb"],[function(r){var e=r.h,t=r.s,i=r.l,s=r.a,n=s===void 0?1:s;if(!yr(e)||!yr(t)||!yr(i))return null;var a=Of({h:Number(e),s:Number(t),l:Number(i),a:Number(n)});return Uf(a)},"hsl"],[function(r){var e=r.h,t=r.s,i=r.v,s=r.a,n=s===void 0?1:s;if(!yr(e)||!yr(t)||!yr(i))return null;var a=function(o){return{h:M0(o.h),s:bi(o.s,0,100),v:bi(o.v,0,100),a:bi(o.a)}}({h:Number(e),s:Number(t),v:Number(i),a:Number(n)});return D0(a)},"hsv"]]},Hf=function(r,e){for(var t=0;t=.5},r.prototype.toHex=function(){return e=Lh(this.rgba),t=e.r,i=e.g,s=e.b,a=(n=e.a)<1?bo(kt(255*n)):"","#"+bo(t)+bo(i)+bo(s)+a;var e,t,i,s,n,a},r.prototype.toRgb=function(){return Lh(this.rgba)},r.prototype.toRgbString=function(){return e=Lh(this.rgba),t=e.r,i=e.g,s=e.b,(n=e.a)<1?"rgba("+t+", "+i+", "+s+", "+n+")":"rgb("+t+", "+i+", "+s+")";var e,t,i,s,n},r.prototype.toHsl=function(){return Nf(Aa(this.rgba))},r.prototype.toHslString=function(){return e=Nf(Aa(this.rgba)),t=e.h,i=e.s,s=e.l,(n=e.a)<1?"hsla("+t+", "+i+"%, "+s+"%, "+n+")":"hsl("+t+", "+i+"%, "+s+"%)";var e,t,i,s,n},r.prototype.toHsv=function(){return e=k0(this.rgba),{h:kt(e.h),s:kt(e.s),v:kt(e.v),a:kt(e.a,3)};var e},r.prototype.invert=function(){return Vi({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},r.prototype.saturate=function(e){return e===void 0&&(e=.1),Vi(Oh(this.rgba,e))},r.prototype.desaturate=function(e){return e===void 0&&(e=.1),Vi(Oh(this.rgba,-e))},r.prototype.grayscale=function(){return Vi(Oh(this.rgba,-1))},r.prototype.lighten=function(e){return e===void 0&&(e=.1),Vi(Gf(this.rgba,e))},r.prototype.darken=function(e){return e===void 0&&(e=.1),Vi(Gf(this.rgba,-e))},r.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},r.prototype.alpha=function(e){return typeof e=="number"?Vi({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):kt(this.rgba.a,3);var t},r.prototype.hue=function(e){var t=Aa(this.rgba);return typeof e=="number"?Vi({h:e,s:t.s,l:t.l,a:t.a}):kt(t.h)},r.prototype.isEqual=function(e){return this.toHex()===Vi(e).toHex()},r}(),Vi=function(r){return r instanceof Yc?r:new Yc(r)},Vf=[],Uw=function(r){r.forEach(function(e){Vf.indexOf(e)<0&&(e(Yc,qc),Vf.push(e))})};function Hw(r,e){var t={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},i={};for(var s in t)i[t[s]]=s;var n={};r.prototype.toName=function(a){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var o,l,c=i[this.toHex()];if(c)return c;if(a?.closest){var u=this.toRgb(),h=1/0,d="black";if(!n.length)for(var f in t)n[f]=new r(t[f]).toRgb();for(var p in t){var m=(o=u,l=n[p],Math.pow(o.r-l.r,2)+Math.pow(o.g-l.g,2)+Math.pow(o.b-l.b,2));ms===t[n]);if(e!==null&&t!==null){const s=Object.keys(e),n=Object.keys(t);return s.length!==n.length?!1:s.every(a=>e[a]===t[a])}return e===t}toRgba(){const[e,t,i,s]=this._components;return{r:e,g:t,b:i,a:s}}toRgb(){const[e,t,i]=this._components;return{r:e,g:t,b:i}}toRgbaString(){const[e,t,i]=this.toUint8RgbArray();return`rgba(${e},${t},${i},${this.alpha})`}toUint8RgbArray(e){const[t,i,s]=this._components;return e=e??[],e[0]=Math.round(t*255),e[1]=Math.round(i*255),e[2]=Math.round(s*255),e}toRgbArray(e){e=e??[];const[t,i,s]=this._components;return e[0]=t,e[1]=i,e[2]=s,e}toNumber(){return this._int}toLittleEndianNumber(){const e=this._int;return(e>>16)+(e&65280)+((e&255)<<16)}multiply(e){const[t,i,s,n]=rl.temp.setValue(e)._components;return this._components[0]*=t,this._components[1]*=i,this._components[2]*=s,this._components[3]*=n,this.refreshInt(),this._value=null,this}premultiply(e,t=!0){return t&&(this._components[0]*=e,this._components[1]*=e,this._components[2]*=e),this._components[3]=e,this.refreshInt(),this._value=null,this}toPremultiplied(e,t=!0){if(e===1)return(255<<24)+this._int;if(e===0)return t?0:this._int;let i=this._int>>16&255,s=this._int>>8&255,n=this._int&255;return t&&(i=i*e+.5|0,s=s*e+.5|0,n=n*e+.5|0),(e*255<<24)+(i<<16)+(s<<8)+n}toHex(){const e=this._int.toString(16);return`#${"000000".substring(0,6-e.length)+e}`}toHexa(){const e=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-e.length)+e}setAlpha(e){return this._components[3]=this._clamp(e),this}round(e){const[t,i,s]=this._components;return this._components[0]=Math.round(t*e)/e,this._components[1]=Math.round(i*e)/e,this._components[2]=Math.round(s*e)/e,this.refreshInt(),this._value=null,this}toArray(e){e=e??[];const[t,i,s,n]=this._components;return e[0]=t,e[1]=i,e[2]=s,e[3]=n,e}normalize(e){let t,i,s,n;if((typeof e=="number"||e instanceof Number)&&e>=0&&e<=16777215){const a=e;t=(a>>16&255)/255,i=(a>>8&255)/255,s=(a&255)/255,n=1}else if((Array.isArray(e)||e instanceof Float32Array)&&e.length>=3&&e.length<=4)e=this._clamp(e),[t,i,s,n=1]=e;else if((e instanceof Uint8Array||e instanceof Uint8ClampedArray)&&e.length>=3&&e.length<=4)e=this._clamp(e,0,255),[t,i,s,n=255]=e,t/=255,i/=255,s/=255,n/=255;else if(typeof e=="string"||typeof e=="object"){if(typeof e=="string"){const o=rl.HEX_PATTERN.exec(e);o&&(e=`#${o[2]}`)}const a=Vi(e);a.isValid()&&({r:t,g:i,b:s,a:n}=a.rgba,t/=255,i/=255,s/=255)}if(t!==void 0)this._components[0]=t,this._components[1]=i,this._components[2]=s,this._components[3]=n,this.refreshInt();else throw new Error(`Unable to convert color ${e}`)}refreshInt(){this._clamp(this._components);const[e,t,i]=this._components;this._int=(e*255<<16)+(t*255<<8)+(i*255|0)}_clamp(e,t=0,i=1){return typeof e=="number"?Math.min(Math.max(e,t),i):(e.forEach((s,n)=>{e[n]=Math.min(Math.max(s,t),i)}),e)}};an.shared=new an,an.temp=new an,an.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;let P=an;function Gw(r){return He("7.2.0","utils.hex2string is deprecated, use Color#toHex instead"),P.shared.setValue(r).toHex()}function Vw(r){return He("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),P.shared.setValue(r).toNumber()}function zw(){const r=[],e=[];for(let i=0;i<32;i++)r[i]=i,e[i]=i;r[Me.NORMAL_NPM]=Me.NORMAL,r[Me.ADD_NPM]=Me.ADD,r[Me.SCREEN_NPM]=Me.SCREEN,e[Me.NORMAL]=Me.NORMAL_NPM,e[Me.ADD]=Me.ADD_NPM,e[Me.SCREEN]=Me.SCREEN_NPM;const t=[];return t.push(e),t.push(r),t}const I0=zw();function P0(r,e){return I0[e?1:0][r]}function Ww(r,e=null){const t=r*6;if(e=e||new Uint16Array(t),e.length!==t)throw new Error(`Out buffer length is incorrect, got ${e.length} and expected ${t}`);for(let i=0,s=0;i>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r+1}function zf(r){return!(r&r-1)&&!!r}function Wf(r){let e=(r>65535?1:0)<<4;r>>>=e;let t=(r>255?1:0)<<3;return r>>>=t,e|=t,t=(r>15?1:0)<<2,r>>>=t,e|=t,t=(r>3?1:0)<<1,r>>>=t,e|=t,e|r>>1}function En(r,e,t){const i=r.length;let s;if(e>=i||t===0)return;t=e+t>i?i-e:t;const n=i-t;for(s=e;s(r.Renderer="renderer",r.Application="application",r.RendererSystem="renderer-webgl-system",r.RendererPlugin="renderer-webgl-plugin",r.CanvasRendererSystem="renderer-canvas-system",r.CanvasRendererPlugin="renderer-canvas-plugin",r.Asset="asset",r.LoadParser="load-parser",r.ResolveParser="resolve-parser",r.CacheParser="cache-parser",r.DetectionParser="detection-parser",r))(oe||{});const Kc=r=>{if(typeof r=="function"||typeof r=="object"&&r.extension){if(!r.extension)throw new Error("Extension class must have an extension object");r={...typeof r.extension!="object"?{type:r.extension}:r.extension,ref:r}}if(typeof r=="object")r={...r};else throw new Error("Invalid extension type");return typeof r.type=="string"&&(r.type=[r.type]),r},Xf=(r,e)=>Kc(r).priority??e,ge={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...r){return r.map(Kc).forEach(e=>{e.type.forEach(t=>this._removeHandlers[t]?.(e))}),this},add(...r){return r.map(Kc).forEach(e=>{e.type.forEach(t=>{const i=this._addHandlers,s=this._queue;i[t]?i[t]?.(e):(s[t]=s[t]||[],s[t]?.push(e))})}),this},handle(r,e,t){const i=this._addHandlers,s=this._removeHandlers;if(i[r]||s[r])throw new Error(`Extension type ${r} already has a handler`);i[r]=e,s[r]=t;const n=this._queue;return n[r]&&(n[r]?.forEach(a=>e(a)),delete n[r]),this},handleByMap(r,e){return this.handle(r,t=>{t.name&&(e[t.name]=t.ref)},t=>{t.name&&delete e[t.name]})},handleByList(r,e,t=-1){return this.handle(r,i=>{e.includes(i.ref)||(e.push(i.ref),e.sort((s,n)=>Xf(n,t)-Xf(s,t)))},i=>{const s=e.indexOf(i.ref);s!==-1&&e.splice(s,1)})}};class Zc{constructor(e){typeof e=="number"?this.rawBinaryData=new ArrayBuffer(e):e instanceof Uint8Array?this.rawBinaryData=e.buffer:this.rawBinaryData=e,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData)}get int8View(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View}get uint8View(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View}get int16View(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View}get uint16View(){return this._uint16View||(this._uint16View=new Uint16Array(this.rawBinaryData)),this._uint16View}get int32View(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View}view(e){return this[`${e}View`]}destroy(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null}static sizeOf(e){switch(e){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(`${e} isn't a valid view type`)}}}const Kw=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(` +`);function Zw(r){let e="";for(let t=0;t0&&(e+=` +else `),t=0;--i){const s=Jc[i];if(s.test&&s.test(r,t))return new s(r,e)}throw new Error("Unrecognized source type to auto-detect Resource")}class Pi{constructor(e){this.items=[],this._name=e,this._aliasCount=0}emit(e,t,i,s,n,a,o,l){if(arguments.length>8)throw new Error("max arguments reached");const{name:c,items:u}=this;this._aliasCount++;for(let h=0,d=u.length;h0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))}add(e){return e[this._name]&&(this.ensureNonAliasedItems(),this.remove(e),this.items.push(e)),this}remove(e){const t=this.items.indexOf(e);return t!==-1&&(this.ensureNonAliasedItems(),this.items.splice(t,1)),this}contains(e){return this.items.includes(e)}removeAll(){return this.ensureNonAliasedItems(),this.items.length=0,this}destroy(){this.removeAll(),this.items.length=0,this._name=""}get empty(){return this.items.length===0}get name(){return this._name}}Object.defineProperties(Pi.prototype,{dispatch:{value:Pi.prototype.emit},run:{value:Pi.prototype.emit}});class Ra{constructor(e=0,t=0){this._width=e,this._height=t,this.destroyed=!1,this.internal=!1,this.onResize=new Pi("setRealSize"),this.onUpdate=new Pi("update"),this.onError=new Pi("onError")}bind(e){this.onResize.add(e),this.onUpdate.add(e),this.onError.add(e),(this._width||this._height)&&this.onResize.emit(this._width,this._height)}unbind(e){this.onResize.remove(e),this.onUpdate.remove(e),this.onError.remove(e)}resize(e,t){(e!==this._width||t!==this._height)&&(this._width=e,this._height=t,this.onResize.emit(e,t))}get valid(){return!!this._width&&!!this._height}update(){this.destroyed||this.onUpdate.emit()}load(){return Promise.resolve(this)}get width(){return this._width}get height(){return this._height}style(e,t,i){return!1}dispose(){}destroy(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)}static test(e,t){return!1}}class ql extends Ra{constructor(e,t){const{width:i,height:s}=t||{};if(!i||!s)throw new Error("BufferResource width or height invalid");super(i,s),this.data=e,this.unpackAlignment=t.unpackAlignment??4}upload(e,t,i){const s=e.gl;s.pixelStorei(s.UNPACK_ALIGNMENT,this.unpackAlignment),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.alphaMode===Xt.UNPACK);const n=t.realWidth,a=t.realHeight;return i.width===n&&i.height===a?s.texSubImage2D(t.target,0,0,0,n,a,t.format,i.type,this.data):(i.width=n,i.height=a,s.texImage2D(t.target,0,i.internalFormat,n,a,0,t.format,i.type,this.data)),!0}dispose(){this.data=null}static test(e){return e===null||e instanceof Int8Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array}}const Qw={scaleMode:Er.NEAREST,alphaMode:Xt.NPM},Qc=class on extends $n{constructor(e=null,t=null){super(),t=Object.assign({},on.defaultOptions,t);const{alphaMode:i,mipmap:s,anisotropicLevel:n,scaleMode:a,width:o,height:l,wrapMode:c,format:u,type:h,target:d,resolution:f,resourceOptions:p}=t;e&&!(e instanceof Ra)&&(e=R0(e,p),e.internal=!0),this.resolution=f||de.RESOLUTION,this.width=Math.round((o||0)*this.resolution)/this.resolution,this.height=Math.round((l||0)*this.resolution)/this.resolution,this._mipmap=s,this.anisotropicLevel=n,this._wrapMode=c,this._scaleMode=a,this.format=u,this.type=h,this.target=d,this.alphaMode=i,this.uid=Vs(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=o>0&&l>0,this.textureCacheIds=[],this.destroyed=!1,this.resource=null,this._batchEnabled=0,this._batchLocation=0,this.parentTextureArray=null,this.setResource(e)}get realWidth(){return Math.round(this.width*this.resolution)}get realHeight(){return Math.round(this.height*this.resolution)}get mipmap(){return this._mipmap}set mipmap(e){this._mipmap!==e&&(this._mipmap=e,this.dirtyStyleId++)}get scaleMode(){return this._scaleMode}set scaleMode(e){this._scaleMode!==e&&(this._scaleMode=e,this.dirtyStyleId++)}get wrapMode(){return this._wrapMode}set wrapMode(e){this._wrapMode!==e&&(this._wrapMode=e,this.dirtyStyleId++)}setStyle(e,t){let i;return e!==void 0&&e!==this.scaleMode&&(this.scaleMode=e,i=!0),t!==void 0&&t!==this.mipmap&&(this.mipmap=t,i=!0),i&&this.dirtyStyleId++,this}setSize(e,t,i){return i=i||this.resolution,this.setRealSize(e*i,t*i,i)}setRealSize(e,t,i){return this.resolution=i||this.resolution,this.width=Math.round(e)/this.resolution,this.height=Math.round(t)/this.resolution,this._refreshPOT(),this.update(),this}_refreshPOT(){this.isPowerOfTwo=zf(this.realWidth)&&zf(this.realHeight)}setResolution(e){const t=this.resolution;return t===e?this:(this.resolution=e,this.valid&&(this.width=Math.round(this.width*t)/e,this.height=Math.round(this.height*t)/e,this.emit("update",this)),this._refreshPOT(),this)}setResource(e){if(this.resource===e)return this;if(this.resource)throw new Error("Resource can be set only once");return e.bind(this),this.resource=e,this}update(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))}onError(e){this.emit("error",this,e)}destroy(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete Nr[this.cacheId],delete zi[this.cacheId],this.cacheId=null),this.valid=!1,this.dispose(),on.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0,this.emit("destroyed",this),this.removeAllListeners()}dispose(){this.emit("dispose",this)}castToBaseTexture(){return this}static from(e,t,i=de.STRICT_TEXTURE_CACHE){const s=typeof e=="string";let n=null;if(s)n=e;else{if(!e._pixiId){const o=t?.pixiIdPrefix||"pixiid";e._pixiId=`${o}_${Vs()}`}n=e._pixiId}let a=Nr[n];if(s&&i&&!a)throw new Error(`The cacheId "${n}" does not exist in BaseTextureCache.`);return a||(a=new on(e,t),a.cacheId=n,on.addToCache(a,n)),a}static fromBuffer(e,t,i,s){e=e||new Float32Array(t*i*4);const n=new ql(e,{width:t,height:i,...s?.resourceOptions});let a,o;return e instanceof Float32Array?(a=se.RGBA,o=Ae.FLOAT):e instanceof Int32Array?(a=se.RGBA_INTEGER,o=Ae.INT):e instanceof Uint32Array?(a=se.RGBA_INTEGER,o=Ae.UNSIGNED_INT):e instanceof Int16Array?(a=se.RGBA_INTEGER,o=Ae.SHORT):e instanceof Uint16Array?(a=se.RGBA_INTEGER,o=Ae.UNSIGNED_SHORT):e instanceof Int8Array?(a=se.RGBA,o=Ae.BYTE):(a=se.RGBA,o=Ae.UNSIGNED_BYTE),n.internal=!0,new on(n,Object.assign({},Qw,{type:o,format:a},s))}static addToCache(e,t){t&&(e.textureCacheIds.includes(t)||e.textureCacheIds.push(t),Nr[t]&&Nr[t]!==e&&console.warn(`BaseTexture added to the cache with an id [${t}] that already had an entry`),Nr[t]=e)}static removeFromCache(e){if(typeof e=="string"){const t=Nr[e];if(t){const i=t.textureCacheIds.indexOf(e);return i>-1&&t.textureCacheIds.splice(i,1),delete Nr[e],t}}else if(e?.textureCacheIds){for(let t=0;t1){for(let h=0;h(r[r.POLY=0]="POLY",r[r.RECT=1]="RECT",r[r.CIRC=2]="CIRC",r[r.ELIP=3]="ELIP",r[r.RREC=4]="RREC",r))(Lt||{});class ze{constructor(e=0,t=0){this.x=0,this.y=0,this.x=e,this.y=t}clone(){return new ze(this.x,this.y)}copyFrom(e){return this.set(e.x,e.y),this}copyTo(e){return e.set(this.x,this.y),e}equals(e){return e.x===this.x&&e.y===this.y}set(e=0,t=e){return this.x=e,this.y=t,this}}ze.prototype.toString=function(){return`[@pixi/math:Point x=${this.x} y=${this.y}]`};const yo=[new ze,new ze,new ze,new ze];class ke{constructor(e=0,t=0,i=0,s=0){this.x=Number(e),this.y=Number(t),this.width=Number(i),this.height=Number(s),this.type=Lt.RECT}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}static get EMPTY(){return new ke(0,0,0,0)}clone(){return new ke(this.x,this.y,this.width,this.height)}copyFrom(e){return this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height,this}copyTo(e){return e.x=this.x,e.y=this.y,e.width=this.width,e.height=this.height,e}contains(e,t){return this.width<=0||this.height<=0?!1:e>=this.x&&e=this.y&&te.right?e.right:this.right)<=B)return!1;const M=this.ye.bottom?e.bottom:this.bottom)>M}const i=this.left,s=this.right,n=this.top,a=this.bottom;if(s<=i||a<=n)return!1;const o=yo[0].set(e.left,e.top),l=yo[1].set(e.left,e.bottom),c=yo[2].set(e.right,e.top),u=yo[3].set(e.right,e.bottom);if(c.x<=o.x||l.y<=o.y)return!1;const h=Math.sign(t.a*t.d-t.b*t.c);if(h===0||(t.apply(o,o),t.apply(l,l),t.apply(c,c),t.apply(u,u),Math.max(o.x,l.x,c.x,u.x)<=i||Math.min(o.x,l.x,c.x,u.x)>=s||Math.max(o.y,l.y,c.y,u.y)<=n||Math.min(o.y,l.y,c.y,u.y)>=a))return!1;const d=h*(l.y-o.y),f=h*(o.x-l.x),p=d*i+f*n,m=d*s+f*n,g=d*i+f*a,b=d*s+f*a;if(Math.max(p,m,g,b)<=d*o.x+f*o.y||Math.min(p,m,g,b)>=d*u.x+f*u.y)return!1;const w=h*(o.y-c.y),v=h*(c.x-o.x),y=w*i+v*n,E=w*s+v*n,C=w*i+v*a,k=w*s+v*a;return!(Math.max(y,E,C,k)<=w*o.x+v*o.y||Math.min(y,E,C,k)>=w*u.x+v*u.y)}pad(e=0,t=e){return this.x-=e,this.y-=t,this.width+=e*2,this.height+=t*2,this}fit(e){const t=Math.max(this.x,e.x),i=Math.min(this.x+this.width,e.x+e.width),s=Math.max(this.y,e.y),n=Math.min(this.y+this.height,e.y+e.height);return this.x=t,this.width=Math.max(i-t,0),this.y=s,this.height=Math.max(n-s,0),this}ceil(e=1,t=.001){const i=Math.ceil((this.x+this.width-t)*e)/e,s=Math.ceil((this.y+this.height-t)*e)/e;return this.x=Math.floor((this.x+t)*e)/e,this.y=Math.floor((this.y+t)*e)/e,this.width=i-this.x,this.height=s-this.y,this}enlarge(e){const t=Math.min(this.x,e.x),i=Math.max(this.x+this.width,e.x+e.width),s=Math.min(this.y,e.y),n=Math.max(this.y+this.height,e.y+e.height);return this.x=t,this.width=i-t,this.y=s,this.height=n-s,this}}ke.prototype.toString=function(){return`[@pixi/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`};class Yl{constructor(e=0,t=0,i=0){this.x=e,this.y=t,this.radius=i,this.type=Lt.CIRC}clone(){return new Yl(this.x,this.y,this.radius)}contains(e,t){if(this.radius<=0)return!1;const i=this.radius*this.radius;let s=this.x-e,n=this.y-t;return s*=s,n*=n,s+n<=i}getBounds(){return new ke(this.x-this.radius,this.y-this.radius,this.radius*2,this.radius*2)}}Yl.prototype.toString=function(){return`[@pixi/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`};class Xl{constructor(e=0,t=0,i=0,s=0){this.x=e,this.y=t,this.width=i,this.height=s,this.type=Lt.ELIP}clone(){return new Xl(this.x,this.y,this.width,this.height)}contains(e,t){if(this.width<=0||this.height<=0)return!1;let i=(e-this.x)/this.width,s=(t-this.y)/this.height;return i*=i,s*=s,i+s<=1}getBounds(){return new ke(this.x-this.width,this.y-this.height,this.width,this.height)}}Xl.prototype.toString=function(){return`[@pixi/math:Ellipse x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`};class Ls{constructor(...e){let t=Array.isArray(e[0])?e[0]:e;if(typeof t[0]!="number"){const i=[];for(let s=0,n=t.length;st!=u>t&&e<(c-o)*((t-l)/(u-l))+o&&(i=!i)}return i}}Ls.prototype.toString=function(){return`[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce((r,e)=>`${r}, ${e}`,"")}]`};class Kl{constructor(e=0,t=0,i=0,s=0,n=20){this.x=e,this.y=t,this.width=i,this.height=s,this.radius=n,this.type=Lt.RREC}clone(){return new Kl(this.x,this.y,this.width,this.height,this.radius)}contains(e,t){if(this.width<=0||this.height<=0)return!1;if(e>=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height){const i=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(t>=this.y+i&&t<=this.y+this.height-i||e>=this.x+i&&e<=this.x+this.width-i)return!0;let s=e-(this.x+i),n=t-(this.y+i);const a=i*i;if(s*s+n*n<=a||(s=e-(this.x+this.width-i),s*s+n*n<=a)||(n=t-(this.y+this.height-i),s*s+n*n<=a)||(s=e-(this.x+i),s*s+n*n<=a))return!0}return!1}}Kl.prototype.toString=function(){return`[@pixi/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`};class at{constructor(e=1,t=0,i=0,s=1,n=0,a=0){this.array=null,this.a=e,this.b=t,this.c=i,this.d=s,this.tx=n,this.ty=a}fromArray(e){this.a=e[0],this.b=e[1],this.c=e[3],this.d=e[4],this.tx=e[2],this.ty=e[5]}set(e,t,i,s,n,a){return this.a=e,this.b=t,this.c=i,this.d=s,this.tx=n,this.ty=a,this}toArray(e,t){this.array||(this.array=new Float32Array(9));const i=t||this.array;return e?(i[0]=this.a,i[1]=this.b,i[2]=0,i[3]=this.c,i[4]=this.d,i[5]=0,i[6]=this.tx,i[7]=this.ty,i[8]=1):(i[0]=this.a,i[1]=this.c,i[2]=this.tx,i[3]=this.b,i[4]=this.d,i[5]=this.ty,i[6]=0,i[7]=0,i[8]=1),i}apply(e,t){t=t||new ze;const i=e.x,s=e.y;return t.x=this.a*i+this.c*s+this.tx,t.y=this.b*i+this.d*s+this.ty,t}applyInverse(e,t){t=t||new ze;const i=1/(this.a*this.d+this.c*-this.b),s=e.x,n=e.y;return t.x=this.d*i*s+-this.c*i*n+(this.ty*this.c-this.tx*this.d)*i,t.y=this.a*i*n+-this.b*i*s+(-this.ty*this.a+this.tx*this.b)*i,t}translate(e,t){return this.tx+=e,this.ty+=t,this}scale(e,t){return this.a*=e,this.d*=t,this.c*=e,this.b*=t,this.tx*=e,this.ty*=t,this}rotate(e){const t=Math.cos(e),i=Math.sin(e),s=this.a,n=this.c,a=this.tx;return this.a=s*t-this.b*i,this.b=s*i+this.b*t,this.c=n*t-this.d*i,this.d=n*i+this.d*t,this.tx=a*t-this.ty*i,this.ty=a*i+this.ty*t,this}append(e){const t=this.a,i=this.b,s=this.c,n=this.d;return this.a=e.a*t+e.b*s,this.b=e.a*i+e.b*n,this.c=e.c*t+e.d*s,this.d=e.c*i+e.d*n,this.tx=e.tx*t+e.ty*s+this.tx,this.ty=e.tx*i+e.ty*n+this.ty,this}setTransform(e,t,i,s,n,a,o,l,c){return this.a=Math.cos(o+c)*n,this.b=Math.sin(o+c)*n,this.c=-Math.sin(o-l)*a,this.d=Math.cos(o-l)*a,this.tx=e-(i*this.a+s*this.c),this.ty=t-(i*this.b+s*this.d),this}prepend(e){const t=this.tx;if(e.a!==1||e.b!==0||e.c!==0||e.d!==1){const i=this.a,s=this.c;this.a=i*e.a+this.b*e.c,this.b=i*e.b+this.b*e.d,this.c=s*e.a+this.d*e.c,this.d=s*e.b+this.d*e.d}return this.tx=t*e.a+this.ty*e.c+e.tx,this.ty=t*e.b+this.ty*e.d+e.ty,this}decompose(e){const t=this.a,i=this.b,s=this.c,n=this.d,a=e.pivot,o=-Math.atan2(-s,n),l=Math.atan2(i,t),c=Math.abs(o+l);return c<1e-5||Math.abs(xl-c)<1e-5?(e.rotation=l,e.skew.x=e.skew.y=0):(e.rotation=0,e.skew.x=o,e.skew.y=l),e.scale.x=Math.sqrt(t*t+i*i),e.scale.y=Math.sqrt(s*s+n*n),e.position.x=this.tx+(a.x*t+a.y*s),e.position.y=this.ty+(a.x*i+a.y*n),e}invert(){const e=this.a,t=this.b,i=this.c,s=this.d,n=this.tx,a=e*s-t*i;return this.a=s/a,this.b=-t/a,this.c=-i/a,this.d=e/a,this.tx=(i*this.ty-s*n)/a,this.ty=-(e*this.ty-t*n)/a,this}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){const e=new at;return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e}copyTo(e){return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e}copyFrom(e){return this.a=e.a,this.b=e.b,this.c=e.c,this.d=e.d,this.tx=e.tx,this.ty=e.ty,this}static get IDENTITY(){return new at}static get TEMP_MATRIX(){return new at}}at.prototype.toString=function(){return`[@pixi/math:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`};const ys=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],vs=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],ws=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],xs=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],tu=[],O0=[],vo=Math.sign;function ox(){for(let r=0;r<16;r++){const e=[];tu.push(e);for(let t=0;t<16;t++){const i=vo(ys[r]*ys[t]+ws[r]*vs[t]),s=vo(vs[r]*ys[t]+xs[r]*vs[t]),n=vo(ys[r]*ws[t]+ws[r]*xs[t]),a=vo(vs[r]*ws[t]+xs[r]*xs[t]);for(let o=0;o<16;o++)if(ys[o]===i&&vs[o]===s&&ws[o]===n&&xs[o]===a){e.push(o);break}}}for(let r=0;r<16;r++){const e=new at;e.set(ys[r],vs[r],ws[r],xs[r],0,0),O0.push(e)}}ox();const pt={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:r=>ys[r],uY:r=>vs[r],vX:r=>ws[r],vY:r=>xs[r],inv:r=>r&8?r&15:-r&7,add:(r,e)=>tu[r][e],sub:(r,e)=>tu[r][pt.inv(e)],rotate180:r=>r^4,isVertical:r=>(r&3)===2,byDirection:(r,e)=>Math.abs(r)*2<=Math.abs(e)?e>=0?pt.S:pt.N:Math.abs(e)*2<=Math.abs(r)?r>0?pt.E:pt.W:e>0?r>0?pt.SE:pt.SW:r>0?pt.NE:pt.NW,matrixAppendRotationInv:(r,e,t=0,i=0)=>{const s=O0[pt.inv(e)];s.tx=t,s.ty=i,r.append(s)}};class Tr{constructor(e,t,i=0,s=0){this._x=i,this._y=s,this.cb=e,this.scope=t}clone(e=this.cb,t=this.scope){return new Tr(e,t,this._x,this._y)}set(e=0,t=e){return(this._x!==e||this._y!==t)&&(this._x=e,this._y=t,this.cb.call(this.scope)),this}copyFrom(e){return(this._x!==e.x||this._y!==e.y)&&(this._x=e.x,this._y=e.y,this.cb.call(this.scope)),this}copyTo(e){return e.set(this._x,this._y),e}equals(e){return e.x===this._x&&e.y===this._y}get x(){return this._x}set x(e){this._x!==e&&(this._x=e,this.cb.call(this.scope))}get y(){return this._y}set y(e){this._y!==e&&(this._y=e,this.cb.call(this.scope))}}Tr.prototype.toString=function(){return`[@pixi/math:ObservablePoint x=${this.x} y=${this.y} scope=${this.scope}]`};const iu=class{constructor(){this.worldTransform=new at,this.localTransform=new at,this.position=new Tr(this.onChange,this,0,0),this.scale=new Tr(this.onChange,this,1,1),this.pivot=new Tr(this.onChange,this,0,0),this.skew=new Tr(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}onChange(){this._localID++}updateSkew(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++}updateLocalTransform(){const r=this.localTransform;this._localID!==this._currentLocalID&&(r.a=this._cx*this.scale.x,r.b=this._sx*this.scale.x,r.c=this._cy*this.scale.y,r.d=this._sy*this.scale.y,r.tx=this.position.x-(this.pivot.x*r.a+this.pivot.y*r.c),r.ty=this.position.y-(this.pivot.x*r.b+this.pivot.y*r.d),this._currentLocalID=this._localID,this._parentID=-1)}updateTransform(r){const e=this.localTransform;if(this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==r._worldID){const t=r.worldTransform,i=this.worldTransform;i.a=e.a*t.a+e.b*t.c,i.b=e.a*t.b+e.b*t.d,i.c=e.c*t.a+e.d*t.c,i.d=e.c*t.b+e.d*t.d,i.tx=e.tx*t.a+e.ty*t.c+t.tx,i.ty=e.tx*t.b+e.ty*t.d+t.ty,this._parentID=r._worldID,this._worldID++}}setFromMatrix(r){r.decompose(this),this._localID++}get rotation(){return this._rotation}set rotation(r){this._rotation!==r&&(this._rotation=r,this.updateSkew())}};iu.IDENTITY=new iu;let sd=iu;sd.prototype.toString=function(){return`[@pixi/math:Transform position=(${this.position.x}, ${this.position.y}) rotation=${this.rotation} scale=(${this.scale.x}, ${this.scale.y}) skew=(${this.skew.x}, ${this.skew.y}) ]`};var lx=`varying vec2 vTextureCoord; + +uniform sampler2D uSampler; + +void main(void){ + gl_FragColor *= texture2D(uSampler, vTextureCoord); +}`,hx=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void){ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +} +`;function Zf(r,e,t){const i=r.createShader(e);return r.shaderSource(i,t),r.compileShader(i),i}function $h(r){const e=new Array(r);for(let t=0;tr.type==="float"&&r.size===1&&!r.isArray,code:r=>` + if(uv["${r}"] !== ud["${r}"].value) + { + ud["${r}"].value = uv["${r}"] + gl.uniform1f(ud["${r}"].location, uv["${r}"]) + } + `},{test:(r,e)=>(r.type==="sampler2D"||r.type==="samplerCube"||r.type==="sampler2DArray")&&r.size===1&&!r.isArray&&(e==null||e.castToBaseTexture!==void 0),code:r=>`t = syncData.textureCount++; + + renderer.texture.bind(uv["${r}"], t); + + if(ud["${r}"].value !== t) + { + ud["${r}"].value = t; + gl.uniform1i(ud["${r}"].location, t); +; // eslint-disable-line max-len + }`},{test:(r,e)=>r.type==="mat3"&&r.size===1&&!r.isArray&&e.a!==void 0,code:r=>` + gl.uniformMatrix3fv(ud["${r}"].location, false, uv["${r}"].toArray(true)); + `,codeUbo:r=>` + var ${r}_matrix = uv.${r}.toArray(true); + + data[offset] = ${r}_matrix[0]; + data[offset+1] = ${r}_matrix[1]; + data[offset+2] = ${r}_matrix[2]; + + data[offset + 4] = ${r}_matrix[3]; + data[offset + 5] = ${r}_matrix[4]; + data[offset + 6] = ${r}_matrix[5]; + + data[offset + 8] = ${r}_matrix[6]; + data[offset + 9] = ${r}_matrix[7]; + data[offset + 10] = ${r}_matrix[8]; + `},{test:(r,e)=>r.type==="vec2"&&r.size===1&&!r.isArray&&e.x!==void 0,code:r=>` + cv = ud["${r}"].value; + v = uv["${r}"]; + + if(cv[0] !== v.x || cv[1] !== v.y) + { + cv[0] = v.x; + cv[1] = v.y; + gl.uniform2f(ud["${r}"].location, v.x, v.y); + }`,codeUbo:r=>` + v = uv.${r}; + + data[offset] = v.x; + data[offset+1] = v.y; + `},{test:r=>r.type==="vec2"&&r.size===1&&!r.isArray,code:r=>` + cv = ud["${r}"].value; + v = uv["${r}"]; + + if(cv[0] !== v[0] || cv[1] !== v[1]) + { + cv[0] = v[0]; + cv[1] = v[1]; + gl.uniform2f(ud["${r}"].location, v[0], v[1]); + } + `},{test:(r,e)=>r.type==="vec4"&&r.size===1&&!r.isArray&&e.width!==void 0,code:r=>` + cv = ud["${r}"].value; + v = uv["${r}"]; + + if(cv[0] !== v.x || cv[1] !== v.y || cv[2] !== v.width || cv[3] !== v.height) + { + cv[0] = v.x; + cv[1] = v.y; + cv[2] = v.width; + cv[3] = v.height; + gl.uniform4f(ud["${r}"].location, v.x, v.y, v.width, v.height) + }`,codeUbo:r=>` + v = uv.${r}; + + data[offset] = v.x; + data[offset+1] = v.y; + data[offset+2] = v.width; + data[offset+3] = v.height; + `},{test:(r,e)=>r.type==="vec4"&&r.size===1&&!r.isArray&&e.red!==void 0,code:r=>` + cv = ud["${r}"].value; + v = uv["${r}"]; + + if(cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue || cv[3] !== v.alpha) + { + cv[0] = v.red; + cv[1] = v.green; + cv[2] = v.blue; + cv[3] = v.alpha; + gl.uniform4f(ud["${r}"].location, v.red, v.green, v.blue, v.alpha) + }`,codeUbo:r=>` + v = uv.${r}; + + data[offset] = v.red; + data[offset+1] = v.green; + data[offset+2] = v.blue; + data[offset+3] = v.alpha; + `},{test:(r,e)=>r.type==="vec3"&&r.size===1&&!r.isArray&&e.red!==void 0,code:r=>` + cv = ud["${r}"].value; + v = uv["${r}"]; + + if(cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue || cv[3] !== v.a) + { + cv[0] = v.red; + cv[1] = v.green; + cv[2] = v.blue; + + gl.uniform3f(ud["${r}"].location, v.red, v.green, v.blue) + }`,codeUbo:r=>` + v = uv.${r}; + + data[offset] = v.red; + data[offset+1] = v.green; + data[offset+2] = v.blue; + `},{test:r=>r.type==="vec4"&&r.size===1&&!r.isArray,code:r=>` + cv = ud["${r}"].value; + v = uv["${r}"]; + + if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) + { + cv[0] = v[0]; + cv[1] = v[1]; + cv[2] = v[2]; + cv[3] = v[3]; + + gl.uniform4f(ud["${r}"].location, v[0], v[1], v[2], v[3]) + }`}],cx={float:` + if (cv !== v) + { + cu.value = v; + gl.uniform1f(location, v); + }`,vec2:` + if (cv[0] !== v[0] || cv[1] !== v[1]) + { + cv[0] = v[0]; + cv[1] = v[1]; + + gl.uniform2f(location, v[0], v[1]) + }`,vec3:` + if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) + { + cv[0] = v[0]; + cv[1] = v[1]; + cv[2] = v[2]; + + gl.uniform3f(location, v[0], v[1], v[2]) + }`,vec4:` + if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) + { + cv[0] = v[0]; + cv[1] = v[1]; + cv[2] = v[2]; + cv[3] = v[3]; + + gl.uniform4f(location, v[0], v[1], v[2], v[3]); + }`,int:` + if (cv !== v) + { + cu.value = v; + + gl.uniform1i(location, v); + }`,ivec2:` + if (cv[0] !== v[0] || cv[1] !== v[1]) + { + cv[0] = v[0]; + cv[1] = v[1]; + + gl.uniform2i(location, v[0], v[1]); + }`,ivec3:` + if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) + { + cv[0] = v[0]; + cv[1] = v[1]; + cv[2] = v[2]; + + gl.uniform3i(location, v[0], v[1], v[2]); + }`,ivec4:` + if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) + { + cv[0] = v[0]; + cv[1] = v[1]; + cv[2] = v[2]; + cv[3] = v[3]; + + gl.uniform4i(location, v[0], v[1], v[2], v[3]); + }`,uint:` + if (cv !== v) + { + cu.value = v; + + gl.uniform1ui(location, v); + }`,uvec2:` + if (cv[0] !== v[0] || cv[1] !== v[1]) + { + cv[0] = v[0]; + cv[1] = v[1]; + + gl.uniform2ui(location, v[0], v[1]); + }`,uvec3:` + if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) + { + cv[0] = v[0]; + cv[1] = v[1]; + cv[2] = v[2]; + + gl.uniform3ui(location, v[0], v[1], v[2]); + }`,uvec4:` + if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) + { + cv[0] = v[0]; + cv[1] = v[1]; + cv[2] = v[2]; + cv[3] = v[3]; + + gl.uniform4ui(location, v[0], v[1], v[2], v[3]); + }`,bool:` + if (cv !== v) + { + cu.value = v; + gl.uniform1i(location, v); + }`,bvec2:` + if (cv[0] != v[0] || cv[1] != v[1]) + { + cv[0] = v[0]; + cv[1] = v[1]; + + gl.uniform2i(location, v[0], v[1]); + }`,bvec3:` + if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) + { + cv[0] = v[0]; + cv[1] = v[1]; + cv[2] = v[2]; + + gl.uniform3i(location, v[0], v[1], v[2]); + }`,bvec4:` + if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) + { + cv[0] = v[0]; + cv[1] = v[1]; + cv[2] = v[2]; + cv[3] = v[3]; + + gl.uniform4i(location, v[0], v[1], v[2], v[3]); + }`,mat2:"gl.uniformMatrix2fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",sampler2D:` + if (cv !== v) + { + cu.value = v; + + gl.uniform1i(location, v); + }`,samplerCube:` + if (cv !== v) + { + cu.value = v; + + gl.uniform1i(location, v); + }`,sampler2DArray:` + if (cv !== v) + { + cu.value = v; + + gl.uniform1i(location, v); + }`},ux={float:"gl.uniform1fv(location, v)",vec2:"gl.uniform2fv(location, v)",vec3:"gl.uniform3fv(location, v)",vec4:"gl.uniform4fv(location, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat2:"gl.uniformMatrix2fv(location, false, v)",int:"gl.uniform1iv(location, v)",ivec2:"gl.uniform2iv(location, v)",ivec3:"gl.uniform3iv(location, v)",ivec4:"gl.uniform4iv(location, v)",uint:"gl.uniform1uiv(location, v)",uvec2:"gl.uniform2uiv(location, v)",uvec3:"gl.uniform3uiv(location, v)",uvec4:"gl.uniform4uiv(location, v)",bool:"gl.uniform1iv(location, v)",bvec2:"gl.uniform2iv(location, v)",bvec3:"gl.uniform3iv(location, v)",bvec4:"gl.uniform4iv(location, v)",sampler2D:"gl.uniform1iv(location, v)",samplerCube:"gl.uniform1iv(location, v)",sampler2DArray:"gl.uniform1iv(location, v)"};function dx(r,e){const t=[` + var v = null; + var cv = null; + var cu = null; + var t = 0; + var gl = renderer.gl; + `];for(const i in r.uniforms){const s=e[i];if(!s){r.uniforms[i]?.group===!0&&(r.uniforms[i].ubo?t.push(` + renderer.shader.syncUniformBufferGroup(uv.${i}, '${i}'); + `):t.push(` + renderer.shader.syncUniformGroup(uv.${i}, syncData); + `));continue}const n=r.uniforms[i];let a=!1;for(let o=0;o=$s.WEBGL2&&(e=r.getContext("webgl2",{})),e||(e=r.getContext("webgl",{})||r.getContext("experimental-webgl",{}),e?e.getExtension("WEBGL_draw_buffers"):e=null),wo=e}return wo}let xo;function px(){if(!xo){xo=gi.MEDIUM;const r=fx();if(r&&r.getShaderPrecisionFormat){const e=r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.HIGH_FLOAT);e&&(xo=e.precision?gi.HIGH:gi.MEDIUM)}}return xo}function Jf(r,e){const t=r.getShaderSource(e).split(` +`).map((c,u)=>`${u}: ${c}`),i=r.getShaderInfoLog(e),s=i.split(` +`),n={},a=s.map(c=>parseFloat(c.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1"))).filter(c=>c&&!n[c]?(n[c]=!0,!0):!1),o=[""];a.forEach(c=>{t[c-1]=`%c${t[c-1]}%c`,o.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")});const l=t.join(` +`);o[0]=l,console.error(i),console.groupCollapsed("click to view full shader code"),console.warn(...o),console.groupEnd()}function mx(r,e,t,i){r.getProgramParameter(e,r.LINK_STATUS)||(r.getShaderParameter(t,r.COMPILE_STATUS)||Jf(r,t),r.getShaderParameter(i,r.COMPILE_STATUS)||Jf(r,i),console.error("PixiJS Error: Could not initialize shader."),r.getProgramInfoLog(e)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",r.getProgramInfoLog(e)))}const gx={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function H0(r){return gx[r]}let _o=null;const Qf={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function G0(r,e){if(!_o){const t=Object.keys(Qf);_o={};for(let i=0;i0&&(t+=` +else `),ithis.size&&this.flush(),this._vertexCount+=e.vertexData.length/2,this._indexCount+=e.indices.length,this._bufferedTextures[this._bufferSize]=e._texture.baseTexture,this._bufferedElements[this._bufferSize++]=e)}buildTexturesAndDrawCalls(){const{_bufferedTextures:e,maxTextures:t}=this,i=Ci._textureArrayPool,s=this.renderer.batch,n=this._tempBoundTextures,a=this.renderer.textureGC.count;let o=++Pe._globalBatch,l=0,c=i[0],u=0;s.copyBoundTextures(n,t);for(let h=0;h=t&&(s.boundArray(c,n,o,t),this.buildDrawCalls(c,u,h),u=h,c=i[++l],++o),d._batchEnabled=o,d.touched=a,c.elements[c.count++]=d)}c.count>0&&(s.boundArray(c,n,o,t),this.buildDrawCalls(c,u,this._bufferSize),++l,++o);for(let h=0;h0);for(let m=0;m=0;--s)e[s]=i[s]||null,e[s]&&(e[s]._batchLocation=s)}boundArray(e,t,i,s){const{elements:n,ids:a,count:o}=e;let l=0;for(let c=0;c=0&&h=$s.WEBGL2&&(i=e.getContext("webgl2",t)),i)this.webGLVersion=2;else if(this.webGLVersion=1,i=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),!i)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=i,this.getExtensions(),this.gl}getExtensions(){const{gl:e}=this,t={loseContext:e.getExtension("WEBGL_lose_context"),anisotropicFiltering:e.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),s3tc:e.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:e.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:e.getExtension("WEBGL_compressed_texture_etc"),etc1:e.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:e.getExtension("WEBGL_compressed_texture_atc"),astc:e.getExtension("WEBGL_compressed_texture_astc"),bptc:e.getExtension("EXT_texture_compression_bptc")};this.webGLVersion===1?Object.assign(this.extensions,t,{drawBuffers:e.getExtension("WEBGL_draw_buffers"),depthTexture:e.getExtension("WEBGL_depth_texture"),vertexArrayObject:e.getExtension("OES_vertex_array_object")||e.getExtension("MOZ_OES_vertex_array_object")||e.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:e.getExtension("OES_element_index_uint"),floatTexture:e.getExtension("OES_texture_float"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),textureHalfFloat:e.getExtension("OES_texture_half_float"),textureHalfFloatLinear:e.getExtension("OES_texture_half_float_linear")}):this.webGLVersion===2&&Object.assign(this.extensions,t,{colorBufferFloat:e.getExtension("EXT_color_buffer_float")})}handleContextLost(e){e.preventDefault(),setTimeout(()=>{this.gl.isContextLost()&&this.extensions.loseContext&&this.extensions.loseContext.restoreContext()},0)}handleContextRestored(){this.renderer.runners.contextChange.emit(this.gl)}destroy(){const e=this.renderer.view;this.renderer=null,e.removeEventListener!==void 0&&(e.removeEventListener("webglcontextlost",this.handleContextLost),e.removeEventListener("webglcontextrestored",this.handleContextRestored)),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()}postrender(){this.renderer.objectRenderer.renderingToScreen&&this.gl.flush()}validateContext(e){const t=e.getContextAttributes(),i="WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext;i&&(this.webGLVersion=2),t&&!t.stencil&&console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");const s=i||!!e.getExtension("OES_element_index_uint");this.supports.uint32Indices=s,s||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")}}El.defaultOptions={context:null,antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"default"},El.extension={type:oe.RendererSystem,name:"context"};ge.add(El);class au{constructor(e,t){if(this.width=Math.round(e),this.height=Math.round(t),!this.width||!this.height)throw new Error("Framebuffer width or height is zero");this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new Pi("disposeFramebuffer"),this.multisample=xt.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(e=0,t){return this.colorTextures[e]=t||new Pe(null,{scaleMode:Er.NEAREST,resolution:1,mipmap:ur.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(e){return this.depthTexture=e||new Pe(null,{scaleMode:Er.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:ur.OFF,format:se.DEPTH_COMPONENT,type:Ae.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this}enableDepth(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this}enableStencil(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this}resize(e,t){if(e=Math.round(e),t=Math.round(t),!e||!t)throw new Error("Framebuffer width and height must not be zero");if(!(e===this.width&&t===this.height)){this.width=e,this.height=t,this.dirtyId++,this.dirtySize++;for(let i=0;i{const s=this.source;this.url=s.src;const n=()=>{this.destroyed||(s.onload=null,s.onerror=null,this.update(),this._load=null,this.createBitmap?t(this.process()):t(this))};s.complete&&s.src?n():(s.onload=n,s.onerror=a=>{i(a),this.onError.emit(a)})}),this._load)}process(){const e=this.source;if(this._process!==null)return this._process;if(this.bitmap!==null||!globalThis.createImageBitmap)return Promise.resolve(this);const t=globalThis.createImageBitmap,i=!e.crossOrigin||e.crossOrigin==="anonymous";return this._process=fetch(e.src,{mode:i?"cors":"no-cors"}).then(s=>s.blob()).then(s=>t(s,0,0,e.width,e.height,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===Xt.UNPACK?"premultiply":"none"})).then(s=>this.destroyed?Promise.reject():(this.bitmap=s,this.update(),this._process=null,Promise.resolve(this))),this._process}upload(e,t,i){if(typeof this.alphaMode=="number"&&(t.alphaMode=this.alphaMode),!this.createBitmap)return super.upload(e,t,i);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(super.upload(e,t,i,this.bitmap),!this.preserveBitmap){let s=!0;const n=t._glTextures;for(const a in n){const o=n[a];if(o!==i&&o.dirtyId!==t.dirtyId){s=!1;break}}s&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0}dispose(){this.source.onload=null,this.source.onerror=null,super.dispose(),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null}static test(e){return typeof HTMLImageElement<"u"&&(typeof e=="string"||e instanceof HTMLImageElement)}}class nd{constructor(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsFloat32=new Float32Array(8)}set(e,t,i){const s=t.width,n=t.height;if(i){const a=e.width/2/s,o=e.height/2/n,l=e.x/s+a,c=e.y/n+o;i=pt.add(i,pt.NW),this.x0=l+a*pt.uX(i),this.y0=c+o*pt.uY(i),i=pt.add(i,2),this.x1=l+a*pt.uX(i),this.y1=c+o*pt.uY(i),i=pt.add(i,2),this.x2=l+a*pt.uX(i),this.y2=c+o*pt.uY(i),i=pt.add(i,2),this.x3=l+a*pt.uX(i),this.y3=c+o*pt.uY(i)}else this.x0=e.x/s,this.y0=e.y/n,this.x1=(e.x+e.width)/s,this.y1=e.y/n,this.x2=(e.x+e.width)/s,this.y2=(e.y+e.height)/n,this.x3=e.x/s,this.y3=(e.y+e.height)/n;this.uvsFloat32[0]=this.x0,this.uvsFloat32[1]=this.y0,this.uvsFloat32[2]=this.x1,this.uvsFloat32[3]=this.y1,this.uvsFloat32[4]=this.x2,this.uvsFloat32[5]=this.y2,this.uvsFloat32[6]=this.x3,this.uvsFloat32[7]=this.y3}}nd.prototype.toString=function(){return`[@pixi/core:TextureUvs x0=${this.x0} y0=${this.y0} x1=${this.x1} y1=${this.y1} x2=${this.x2} y2=${this.y2} x3=${this.x3} y3=${this.y3}]`};const ip=new nd;function Ao(r){r.destroy=function(){},r.on=function(){},r.once=function(){},r.emit=function(){}}class te extends $n{constructor(e,t,i,s,n,a,o){if(super(),this.noFrame=!1,t||(this.noFrame=!0,t=new ke(0,0,1,1)),e instanceof te&&(e=e.baseTexture),this.baseTexture=e,this._frame=t,this.trim=s,this.valid=!1,this.destroyed=!1,this._uvs=ip,this.uvMatrix=null,this.orig=i||t,this._rotate=Number(n||0),n===!0)this._rotate=2;else if(this._rotate%2!==0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");this.defaultAnchor=a?new ze(a.x,a.y):new ze(0,0),this.defaultBorders=o,this._updateID=0,this.textureCacheIds=[],e.valid?this.noFrame?e.valid&&this.onBaseTextureUpdated(e):this.frame=t:e.once("loaded",this.onBaseTextureUpdated,this),this.noFrame&&e.on("update",this.onBaseTextureUpdated,this)}update(){this.baseTexture.resource&&this.baseTexture.resource.update()}onBaseTextureUpdated(e){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=e.width,this._frame.height=e.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)}destroy(e){if(this.baseTexture){if(e){const{resource:t}=this.baseTexture;t?.url&&zi[t.url]&&te.removeFromCache(t.url),this.baseTexture.destroy()}this.baseTexture.off("loaded",this.onBaseTextureUpdated,this),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture=null}this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,te.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0,this.emit("destroyed",this),this.removeAllListeners()}clone(){const e=this._frame.clone(),t=this._frame===this.orig?e:this.orig.clone(),i=new te(this.baseTexture,!this.noFrame&&e,t,this.trim?.clone(),this.rotate,this.defaultAnchor,this.defaultBorders);return this.noFrame&&(i._frame=e),i}updateUvs(){this._uvs===ip&&(this._uvs=new nd),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++}static from(e,t={},i=de.STRICT_TEXTURE_CACHE){const s=typeof e=="string";let n=null;if(s)n=e;else if(e instanceof Pe){if(!e.cacheId){const o=t?.pixiIdPrefix||"pixiid";e.cacheId=`${o}-${Vs()}`,Pe.addToCache(e,e.cacheId)}n=e.cacheId}else{if(!e._pixiId){const o=t?.pixiIdPrefix||"pixiid";e._pixiId=`${o}_${Vs()}`}n=e._pixiId}let a=zi[n];if(s&&i&&!a)throw new Error(`The cacheId "${n}" does not exist in TextureCache.`);return!a&&!(e instanceof Pe)?(t.resolution||(t.resolution=Dr(e)),a=new te(new Pe(e,t)),a.baseTexture.cacheId=n,Pe.addToCache(a.baseTexture,n),te.addToCache(a,n)):!a&&e instanceof Pe&&(a=new te(e),te.addToCache(a,n)),a}static fromURL(e,t){const i=Object.assign({autoLoad:!1},t?.resourceOptions),s=te.from(e,Object.assign({resourceOptions:i},t),!1),n=s.baseTexture.resource;return s.baseTexture.valid?Promise.resolve(s):n.load().then(()=>Promise.resolve(s))}static fromBuffer(e,t,i,s){return new te(Pe.fromBuffer(e,t,i,s))}static fromLoader(e,t,i,s){const n=new Pe(e,Object.assign({scaleMode:Pe.defaultOptions.scaleMode,resolution:Dr(t)},s)),{resource:a}=n;a instanceof W0&&(a.url=t);const o=new te(n);return i||(i=t),Pe.addToCache(o.baseTexture,i),te.addToCache(o,i),i!==t&&(Pe.addToCache(o.baseTexture,t),te.addToCache(o,t)),o.baseTexture.valid?Promise.resolve(o):new Promise(l=>{o.baseTexture.once("loaded",()=>l(o))})}static addToCache(e,t){t&&(e.textureCacheIds.includes(t)||e.textureCacheIds.push(t),zi[t]&&zi[t]!==e&&console.warn(`Texture added to the cache with an id [${t}] that already had an entry`),zi[t]=e)}static removeFromCache(e){if(typeof e=="string"){const t=zi[e];if(t){const i=t.textureCacheIds.indexOf(e);return i>-1&&t.textureCacheIds.splice(i,1),delete zi[e],t}}else if(e?.textureCacheIds){for(let t=0;tthis.baseTexture.width,o=i+n>this.baseTexture.height;if(a||o){const l=a&&o?"and":"or",c=`X: ${t} + ${s} = ${t+s} > ${this.baseTexture.width}`,u=`Y: ${i} + ${n} = ${i+n} > ${this.baseTexture.height}`;throw new Error(`Texture Error: frame does not fit inside the base Texture dimensions: ${c} ${l} ${u}`)}this.valid=s&&n&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=e),this.valid&&this.updateUvs()}get rotate(){return this._rotate}set rotate(e){this._rotate=e,this.valid&&this.updateUvs()}get width(){return this.orig.width}get height(){return this.orig.height}castToBaseTexture(){return this.baseTexture}static get EMPTY(){return te._EMPTY||(te._EMPTY=new te(new Pe),Ao(te._EMPTY),Ao(te._EMPTY.baseTexture)),te._EMPTY}static get WHITE(){if(!te._WHITE){const e=de.ADAPTER.createCanvas(16,16),t=e.getContext("2d");e.width=16,e.height=16,t.fillStyle="white",t.fillRect(0,0,16,16),te._WHITE=new te(Pe.from(e)),Ao(te._WHITE),Ao(te._WHITE.baseTexture)}return te._WHITE}}class Gt extends te{constructor(e,t){super(e,t),this.valid=!0,this.filterFrame=null,this.filterPoolKey=null,this.updateUvs()}get framebuffer(){return this.baseTexture.framebuffer}get multisample(){return this.framebuffer.multisample}set multisample(e){this.framebuffer.multisample=e}resize(e,t,i=!0){const s=this.baseTexture.resolution,n=Math.round(e*s)/s,a=Math.round(t*s)/s;this.valid=n>0&&a>0,this._frame.width=this.orig.width=n,this._frame.height=this.orig.height=a,i&&this.baseTexture.resize(n,a),this.updateUvs()}setResolution(e){const{baseTexture:t}=this;t.resolution!==e&&(t.setResolution(e),this.resize(t.width,t.height,!1))}static create(e){return new Gt(new z0(e))}}class $0{constructor(e){this.texturePool={},this.textureOptions=e||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(e,t,i=xt.NONE){const s=new z0(Object.assign({width:e,height:t,resolution:1,multisample:i},this.textureOptions));return new Gt(s)}getOptimalTexture(e,t,i=1,s=xt.NONE){let n;e=Math.max(Math.ceil(e*i-1e-6),1),t=Math.max(Math.ceil(t*i-1e-6),1),!this.enableFullScreen||e!==this._pixelsWidth||t!==this._pixelsHeight?(e=vl(e),t=vl(t),n=((e&65535)<<16|t&65535)>>>0,s>1&&(n+=s*4294967296)):n=s>1?-s:-1,this.texturePool[n]||(this.texturePool[n]=[]);let a=this.texturePool[n].pop();return a||(a=this.createTexture(e,t,s)),a.filterPoolKey=n,a.setResolution(i),a}getFilterTexture(e,t,i){const s=this.getOptimalTexture(e.width,e.height,t||e.resolution,i||xt.NONE);return s.filterFrame=e.filterFrame,s}returnTexture(e){const t=e.filterPoolKey;e.filterFrame=null,this.texturePool[t].push(e)}returnFilterTexture(e){this.returnTexture(e)}clear(e){if(e=e!==!1,e)for(const t in this.texturePool){const i=this.texturePool[t];if(i)for(let s=0;s0&&e.height>0;for(const t in this.texturePool){if(!(Number(t)<0))continue;const i=this.texturePool[t];if(i)for(let s=0;s1&&(u=this.getOptimalFilterTexture(c.width,c.height,t.resolution),u.filterFrame=c.filterFrame),i[h].apply(this,c,u,Zi.CLEAR,t);const d=c;c=u,u=d}i[h].apply(this,c,l.renderTexture,Zi.BLEND,t),h>1&&t.multisample>1&&this.returnFilterTexture(t.renderTexture),this.returnFilterTexture(c),this.returnFilterTexture(u)}t.clear(),this.statePool.push(t)}bindAndClear(e,t=Zi.CLEAR){const{renderTexture:i,state:s}=this.renderer;if(e===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,e?.filterFrame){const a=this.tempRect;a.x=0,a.y=0,a.width=e.filterFrame.width,a.height=e.filterFrame.height,i.bind(e,e.filterFrame,a)}else e!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?i.bind(e):this.renderer.renderTexture.bind(e,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);const n=s.stateId&1||this.forceClear;(t===Zi.CLEAR||t===Zi.BLIT&&n)&&this.renderer.framebuffer.clear(0,0,0,0)}applyFilter(e,t,i,s){const n=this.renderer;n.state.set(e.state),this.bindAndClear(i,s),e.uniforms.uSampler=t,e.uniforms.filterGlobals=this.globalUniforms,n.shader.bind(e),e.legacy=!!e.program.attributeData.aTextureCoord,e.legacy?(this.quadUv.map(t._frame,t.filterFrame),n.geometry.bind(this.quadUv),n.geometry.draw(tr.TRIANGLES)):(n.geometry.bind(this.quad),n.geometry.draw(tr.TRIANGLE_STRIP))}calculateSpriteMatrix(e,t){const{sourceFrame:i,destinationFrame:s}=this.activeState,{orig:n}=t._texture,a=e.set(s.width,0,0,s.height,i.x,i.y),o=t.worldTransform.copyTo(at.TEMP_MATRIX);return o.invert(),a.prepend(o),a.scale(1/n.width,1/n.height),a.translate(t.anchor.x,t.anchor.y),a}destroy(){this.renderer=null,this.texturePool.clear(!1)}getOptimalFilterTexture(e,t,i=1,s=xt.NONE){return this.texturePool.getOptimalTexture(e,t,i,s)}getFilterTexture(e,t,i){if(typeof e=="number"){const n=e;e=t,t=n}e=e||this.activeState.renderTexture;const s=this.texturePool.getOptimalTexture(e.width,e.height,t||e.resolution,i||xt.NONE);return s.filterFrame=e.filterFrame,s}returnFilterTexture(e){this.texturePool.returnTexture(e)}emptyPool(){this.texturePool.clear(!0)}resize(){this.texturePool.setScreenSize(this.renderer.view)}transformAABB(e,t){const i=To[0],s=To[1],n=To[2],a=To[3];i.set(t.left,t.top),s.set(t.left,t.bottom),n.set(t.right,t.top),a.set(t.right,t.bottom),e.apply(i,i),e.apply(s,s),e.apply(n,n),e.apply(a,a);const o=Math.min(i.x,s.x,n.x,a.x),l=Math.min(i.y,s.y,n.y,a.y),c=Math.max(i.x,s.x,n.x,a.x),u=Math.max(i.y,s.y,n.y,a.y);t.x=o,t.y=l,t.width=c-o,t.height=u-l}roundFrame(e,t,i,s,n){if(!(e.width<=0||e.height<=0||i.width<=0||i.height<=0)){if(n){const{a,b:o,c:l,d:c}=n;if((Math.abs(o)>1e-4||Math.abs(l)>1e-4)&&(Math.abs(a)>1e-4||Math.abs(c)>1e-4))return}n=n?jh.copyFrom(n):jh.identity(),n.translate(-i.x,-i.y).scale(s.width/i.width,s.height/i.height).translate(s.x,s.y),this.transformAABB(n,e),e.ceil(t),this.transformAABB(n.invert(),e)}}}q0.extension={type:oe.RendererSystem,name:"filter"};ge.add(q0);class kx{constructor(e){this.framebuffer=e,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=xt.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}const Dx=new ke;class Y0{constructor(e){this.renderer=e,this.managedFramebuffers=[],this.unknownFramebuffer=new au(10,10),this.msaaSamples=null}contextChange(){this.disposeAll(!0);const e=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new ke,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){let t=this.renderer.context.extensions.drawBuffers,i=this.renderer.context.extensions.depthTexture;de.PREFER_ENV===$s.WEBGL_LEGACY&&(t=null,i=null),t?e.drawBuffers=s=>t.drawBuffersWEBGL(s):(this.hasMRT=!1,e.drawBuffers=()=>{}),i||(this.writeDepthTexture=!1)}else this.msaaSamples=e.getInternalformatParameter(e.RENDERBUFFER,e.RGBA8,e.SAMPLES)}bind(e,t,i=0){const{gl:s}=this;if(e){const n=e.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(e);this.current!==e&&(this.current=e,s.bindFramebuffer(s.FRAMEBUFFER,n.framebuffer)),n.mipLevel!==i&&(e.dirtyId++,e.dirtyFormat++,n.mipLevel=i),n.dirtyId!==e.dirtyId&&(n.dirtyId=e.dirtyId,n.dirtyFormat!==e.dirtyFormat?(n.dirtyFormat=e.dirtyFormat,n.dirtySize=e.dirtySize,this.updateFramebuffer(e,i)):n.dirtySize!==e.dirtySize&&(n.dirtySize=e.dirtySize,this.resizeFramebuffer(e)));for(let a=0;a>i,o=t.height>>i,l=a/t.width;this.setViewport(t.x*l,t.y*l,a,o)}else{const a=e.width>>i,o=e.height>>i;this.setViewport(0,0,a,o)}}else this.current&&(this.current=null,s.bindFramebuffer(s.FRAMEBUFFER,null)),t?this.setViewport(t.x,t.y,t.width,t.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)}setViewport(e,t,i,s){const n=this.viewport;e=Math.round(e),t=Math.round(t),i=Math.round(i),s=Math.round(s),(n.width!==i||n.height!==s||n.x!==e||n.y!==t)&&(n.x=e,n.y=t,n.width=i,n.height=s,this.gl.viewport(e,t,i,s))}get size(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}}clear(e,t,i,s,n=Bc.COLOR|Bc.DEPTH){const{gl:a}=this;a.clearColor(e,t,i,s),a.clear(n)}initFramebuffer(e){const{gl:t}=this,i=new kx(t.createFramebuffer());return i.multisample=this.detectSamples(e.multisample),e.glFramebuffers[this.CONTEXT_UID]=i,this.managedFramebuffers.push(e),e.disposeRunner.add(this),i}resizeFramebuffer(e){const{gl:t}=this,i=e.glFramebuffers[this.CONTEXT_UID];if(i.stencil){t.bindRenderbuffer(t.RENDERBUFFER,i.stencil);let a;this.renderer.context.webGLVersion===1?a=t.DEPTH_STENCIL:e.depth&&e.stencil?a=t.DEPTH24_STENCIL8:e.depth?a=t.DEPTH_COMPONENT24:a=t.STENCIL_INDEX8,i.msaaBuffer?t.renderbufferStorageMultisample(t.RENDERBUFFER,i.multisample,a,e.width,e.height):t.renderbufferStorage(t.RENDERBUFFER,a,e.width,e.height)}const s=e.colorTextures;let n=s.length;t.drawBuffers||(n=Math.min(n,1));for(let a=0;a1&&this.canMultisampleFramebuffer(e)?s.msaaBuffer=s.msaaBuffer||i.createRenderbuffer():s.msaaBuffer&&(i.deleteRenderbuffer(s.msaaBuffer),s.msaaBuffer=null,s.blitFramebuffer&&(s.blitFramebuffer.dispose(),s.blitFramebuffer=null));const o=[];for(let l=0;l1&&i.drawBuffers(o),e.depthTexture&&this.writeDepthTexture){const l=e.depthTexture;this.renderer.texture.bind(l,0),i.framebufferTexture2D(i.FRAMEBUFFER,i.DEPTH_ATTACHMENT,i.TEXTURE_2D,l._glTextures[this.CONTEXT_UID].texture,t)}if((e.stencil||e.depth)&&!(e.depthTexture&&this.writeDepthTexture)){s.stencil=s.stencil||i.createRenderbuffer();let l,c;this.renderer.context.webGLVersion===1?(l=i.DEPTH_STENCIL_ATTACHMENT,c=i.DEPTH_STENCIL):e.depth&&e.stencil?(l=i.DEPTH_STENCIL_ATTACHMENT,c=i.DEPTH24_STENCIL8):e.depth?(l=i.DEPTH_ATTACHMENT,c=i.DEPTH_COMPONENT24):(l=i.STENCIL_ATTACHMENT,c=i.STENCIL_INDEX8),i.bindRenderbuffer(i.RENDERBUFFER,s.stencil),s.msaaBuffer?i.renderbufferStorageMultisample(i.RENDERBUFFER,s.multisample,c,e.width,e.height):i.renderbufferStorage(i.RENDERBUFFER,c,e.width,e.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,l,i.RENDERBUFFER,s.stencil)}else s.stencil&&(i.deleteRenderbuffer(s.stencil),s.stencil=null)}canMultisampleFramebuffer(e){return this.renderer.context.webGLVersion!==1&&e.colorTextures.length<=1&&!e.depthTexture}detectSamples(e){const{msaaSamples:t}=this;let i=xt.NONE;if(e<=1||t===null)return i;for(let s=0;s=0&&this.managedFramebuffers.splice(n,1),e.disposeRunner.remove(this),t||(s.deleteFramebuffer(i.framebuffer),i.msaaBuffer&&s.deleteRenderbuffer(i.msaaBuffer),i.stencil&&s.deleteRenderbuffer(i.stencil)),i.blitFramebuffer&&this.disposeFramebuffer(i.blitFramebuffer,t)}disposeAll(e){const t=this.managedFramebuffers;this.managedFramebuffers=[];for(let i=0;ii.createVertexArrayOES(),e.bindVertexArray=s=>i.bindVertexArrayOES(s),e.deleteVertexArray=s=>i.deleteVertexArrayOES(s)):(this.hasVao=!1,e.createVertexArray=()=>null,e.bindVertexArray=()=>null,e.deleteVertexArray=()=>null)}if(t.webGLVersion!==2){const i=e.getExtension("ANGLE_instanced_arrays");i?(e.vertexAttribDivisor=(s,n)=>i.vertexAttribDivisorANGLE(s,n),e.drawElementsInstanced=(s,n,a,o,l)=>i.drawElementsInstancedANGLE(s,n,a,o,l),e.drawArraysInstanced=(s,n,a,o)=>i.drawArraysInstancedANGLE(s,n,a,o)):this.hasInstance=!1}this.canUseUInt32ElementIndex=t.webGLVersion===2||!!t.extensions.uint32ElementIndex}bind(e,t){t=t||this.renderer.shader.shader;const{gl:i}=this;let s=e.glVertexArrayObjects[this.CONTEXT_UID],n=!1;s||(this.managedGeometries[e.id]=e,e.disposeRunner.add(this),e.glVertexArrayObjects[this.CONTEXT_UID]=s={},n=!0);const a=s[t.program.id]||this.initGeometryVao(e,t,n);this._activeGeometry=e,this._activeVao!==a&&(this._activeVao=a,this.hasVao?i.bindVertexArray(a):this.activateVao(e,t.program)),this.updateBuffers()}reset(){this.unbind()}updateBuffers(){const e=this._activeGeometry,t=this.renderer.buffer;for(let i=0;i"u"?.5:t,this.isSimple=!1}get texture(){return this._texture}set texture(e){this._texture=e,this._textureID=-1}multiplyUvs(e,t){t===void 0&&(t=e);const i=this.mapCoord;for(let s=0;s0?this.maskStack[this.maskStack.length-1]._colorMask:15;i!==t&&this.renderer.gl.colorMask((i&1)!==0,(i&2)!==0,(i&4)!==0,(i&8)!==0)}destroy(){this.renderer=null}}Z0.extension={type:oe.RendererSystem,name:"mask"};ge.add(Z0);class J0{constructor(e){this.renderer=e,this.maskStack=[],this.glConst=0}getStackLength(){return this.maskStack.length}setMaskStack(e){const{gl:t}=this.renderer,i=this.getStackLength();this.maskStack=e;const s=this.getStackLength();s!==i&&(s===0?t.disable(this.glConst):(t.enable(this.glConst),this._useCurrent()))}_useCurrent(){}destroy(){this.renderer=null,this.maskStack=null}}const sp=new at,np=[],Q0=class sl extends J0{constructor(e){super(e),this.glConst=de.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST}getStackLength(){const e=this.maskStack[this.maskStack.length-1];return e?e._scissorCounter:0}calcScissorRect(e){if(e._scissorRectLocal)return;const t=e._scissorRect,{maskObject:i}=e,{renderer:s}=this,n=s.renderTexture,a=i.getBounds(!0,np.pop()??new ke);this.roundFrameToPixels(a,n.current?n.current.resolution:s.resolution,n.sourceFrame,n.destinationFrame,s.projection.transform),t&&a.fit(t),e._scissorRectLocal=a}static isMatrixRotated(e){if(!e)return!1;const{a:t,b:i,c:s,d:n}=e;return(Math.abs(i)>1e-4||Math.abs(s)>1e-4)&&(Math.abs(t)>1e-4||Math.abs(n)>1e-4)}testScissor(e){const{maskObject:t}=e;if(!t.isFastRect||!t.isFastRect()||sl.isMatrixRotated(t.worldTransform)||sl.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(e);const i=e._scissorRectLocal;return i.width>0&&i.height>0}roundFrameToPixels(e,t,i,s,n){sl.isMatrixRotated(n)||(n=n?sp.copyFrom(n):sp.identity(),n.translate(-i.x,-i.y).scale(s.width/i.width,s.height/i.height).translate(s.x,s.y),this.renderer.filter.transformAABB(n,e),e.fit(s),e.x=Math.round(e.x*t),e.y=Math.round(e.y*t),e.width=Math.round(e.width*t),e.height=Math.round(e.height*t))}push(e){e._scissorRectLocal||this.calcScissorRect(e);const{gl:t}=this.renderer;e._scissorRect||t.enable(t.SCISSOR_TEST),e._scissorCounter++,e._scissorRect=e._scissorRectLocal,this._useCurrent()}pop(e){const{gl:t}=this.renderer;e&&np.push(e._scissorRectLocal),this.getStackLength()>0?this._useCurrent():t.disable(t.SCISSOR_TEST)}_useCurrent(){const e=this.maskStack[this.maskStack.length-1]._scissorRect;let t;this.renderer.renderTexture.current?t=e.y:t=this.renderer.height-e.height-e.y,this.renderer.gl.scissor(e.x,t,e.width,e.height)}};Q0.extension={type:oe.RendererSystem,name:"scissor"};let Fx=Q0;ge.add(Fx);class eg extends J0{constructor(e){super(e),this.glConst=de.ADAPTER.getWebGLRenderingContext().STENCIL_TEST}getStackLength(){const e=this.maskStack[this.maskStack.length-1];return e?e._stencilCounter:0}push(e){const t=e.maskObject,{gl:i}=this.renderer,s=e._stencilCounter;s===0&&(this.renderer.framebuffer.forceStencil(),i.clearStencil(0),i.clear(i.STENCIL_BUFFER_BIT),i.enable(i.STENCIL_TEST)),e._stencilCounter++;const n=e._colorMask;n!==0&&(e._colorMask=0,i.colorMask(!1,!1,!1,!1)),i.stencilFunc(i.EQUAL,s,4294967295),i.stencilOp(i.KEEP,i.KEEP,i.INCR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,n!==0&&(e._colorMask=n,i.colorMask((n&1)!==0,(n&2)!==0,(n&4)!==0,(n&8)!==0)),this._useCurrent()}pop(e){const t=this.renderer.gl;if(this.getStackLength()===0)t.disable(t.STENCIL_TEST);else{const i=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null,s=i?i._colorMask:15;s!==0&&(i._colorMask=0,t.colorMask(!1,!1,!1,!1)),t.stencilOp(t.KEEP,t.KEEP,t.DECR),e.renderable=!0,e.render(this.renderer),this.renderer.batch.flush(),e.renderable=!1,s!==0&&(i._colorMask=s,t.colorMask((s&1)!==0,(s&2)!==0,(s&4)!==0,(s&8)!==0)),this._useCurrent()}}_useCurrent(){const e=this.renderer.gl;e.stencilFunc(e.EQUAL,this.getStackLength(),4294967295),e.stencilOp(e.KEEP,e.KEEP,e.KEEP)}}eg.extension={type:oe.RendererSystem,name:"stencil"};ge.add(eg);class tg{constructor(e){this.renderer=e,this.plugins={},Object.defineProperties(this.plugins,{extract:{enumerable:!1,get(){return He("7.0.0","renderer.plugins.extract has moved to renderer.extract"),e.extract}},prepare:{enumerable:!1,get(){return He("7.0.0","renderer.plugins.prepare has moved to renderer.prepare"),e.prepare}},interaction:{enumerable:!1,get(){return He("7.0.0","renderer.plugins.interaction has been deprecated, use renderer.events"),e.events}}})}init(){const e=this.rendererPlugins;for(const t in e)this.plugins[t]=new e[t](this.renderer)}destroy(){for(const e in this.plugins)this.plugins[e].destroy(),this.plugins[e]=null}}tg.extension={type:[oe.RendererSystem,oe.CanvasRendererSystem],name:"_plugin"};ge.add(tg);class ig{constructor(e){this.renderer=e,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new at,this.transform=null}update(e,t,i,s){this.destinationFrame=e||this.destinationFrame||this.defaultFrame,this.sourceFrame=t||this.sourceFrame||e,this.calculateProjection(this.destinationFrame,this.sourceFrame,i,s),this.transform&&this.projectionMatrix.append(this.transform);const n=this.renderer;n.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,n.globalUniforms.update(),n.shader.shader&&n.shader.syncUniformGroup(n.shader.shader.uniforms.globals)}calculateProjection(e,t,i,s){const n=this.projectionMatrix,a=s?-1:1;n.identity(),n.a=1/t.width*2,n.d=a*(1/t.height*2),n.tx=-1-t.x*n.a,n.ty=-a-t.y*n.d}setTransform(e){}destroy(){this.renderer=null}}ig.extension={type:oe.RendererSystem,name:"projection"};ge.add(ig);const Lx=new sd,ap=new ke;class rg{constructor(e){this.renderer=e,this._tempMatrix=new at}generateTexture(e,t){const{region:i,...s}=t||{},n=i?.copyTo(ap)||e.getLocalBounds(ap,!0),a=s.resolution||this.renderer.resolution;n.width=Math.max(n.width,1/a),n.height=Math.max(n.height,1/a),s.width=n.width,s.height=n.height,s.resolution=a,s.multisample??(s.multisample=this.renderer.multisample);const o=Gt.create(s);this._tempMatrix.tx=-n.x,this._tempMatrix.ty=-n.y;const l=e.transform;return e.transform=Lx,this.renderer.render(e,{renderTexture:o,transform:this._tempMatrix,skipUpdateTransform:!!e.parent,blit:!0}),e.transform=l,o}destroy(){}}rg.extension={type:[oe.RendererSystem,oe.CanvasRendererSystem],name:"textureGenerator"};ge.add(rg);const ms=new ke,ra=new ke;class sg{constructor(e){this.renderer=e,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new ke,this.destinationFrame=new ke,this.viewportFrame=new ke}contextChange(){const e=this.renderer?.gl.getContextAttributes();this._rendererPremultipliedAlpha=!!(e&&e.alpha&&e.premultipliedAlpha)}bind(e=null,t,i){const s=this.renderer;this.current=e;let n,a,o;e?(n=e.baseTexture,o=n.resolution,t||(ms.width=e.frame.width,ms.height=e.frame.height,t=ms),i||(ra.x=e.frame.x,ra.y=e.frame.y,ra.width=t.width,ra.height=t.height,i=ra),a=n.framebuffer):(o=s.resolution,t||(ms.width=s._view.screen.width,ms.height=s._view.screen.height,t=ms),i||(i=ms,i.width=t.width,i.height=t.height));const l=this.viewportFrame;l.x=i.x*o,l.y=i.y*o,l.width=i.width*o,l.height=i.height*o,e||(l.y=s.view.height-(l.y+l.height)),l.ceil(),this.renderer.framebuffer.bind(a,l),this.renderer.projection.update(i,t,o,!a),e?this.renderer.mask.setMaskStack(n.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(t),this.destinationFrame.copyFrom(i)}clear(e,t){const i=this.current?this.current.baseTexture.clear:this.renderer.background.backgroundColor,s=P.shared.setValue(e||i);(this.current&&this.current.baseTexture.alphaMode>0||!this.current&&this._rendererPremultipliedAlpha)&&s.premultiply(s.alpha);const n=this.destinationFrame,a=this.current?this.current.baseTexture:this.renderer._view.screen,o=n.width!==a.width||n.height!==a.height;if(o){let{x:l,y:c,width:u,height:h}=this.viewportFrame;l=Math.round(l),c=Math.round(c),u=Math.round(u),h=Math.round(h),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(l,c,u,h)}this.renderer.framebuffer.clear(s.red,s.green,s.blue,s.alpha,t),o&&this.renderer.scissor.pop()}resize(){this.bind(null)}reset(){this.bind(null)}destroy(){this.renderer=null}}sg.extension={type:oe.RendererSystem,name:"renderTexture"};ge.add(sg);class Ox{constructor(e,t){this.program=e,this.uniformData=t,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}destroy(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null}}function Nx(r,e){const t={},i=e.getProgramParameter(r,e.ACTIVE_ATTRIBUTES);for(let s=0;sl>c?1:-1);for(let l=0;l({data:n,offset:0,dataLen:0,dirty:0}));let t=0,i=0,s=0;for(let n=0;n1&&(t=Math.max(t,16)*a.data.size),a.dataLen=t,i%t!==0&&i<16){const o=i%t%16;i+=o,s+=o}i+t>16?(s=Math.ceil(s/16)*16,a.offset=s,s+=t,i=t):(a.offset=s,i+=t,s+=t)}return s=Math.ceil(s/16)*16,{uboElements:e,size:s}}function Wx(r,e){const t=[];for(const i in r)e[i]&&t.push(e[i]);return t.sort((i,s)=>i.index-s.index),t}function $x(r,e){if(!r.autoManage)return{size:0,syncFunc:Gx};const t=Wx(r.uniforms,e),{uboElements:i,size:s}=zx(t),n=[` + var v = null; + var v2 = null; + var cv = null; + var t = 0; + var gl = renderer.gl + var index = 0; + var data = buffer.data; + `];for(let a=0;a1){const h=H0(o.data.type),d=Math.max(ng[o.data.type]/16,1),f=h/d,p=(4-f%4)%4;n.push(` + cv = ud.${c}.value; + v = uv.${c}; + offset = ${o.offset/4}; + + t = 0; + + for(var i=0; i < ${o.data.size*d}; i++) + { + for(var j = 0; j < ${f}; j++) + { + data[offset++] = v[t++]; + } + offset += ${p}; + } + + `)}else{const h=Vx[o.data.type];n.push(` + cv = ud.${c}.value; + v = uv.${c}; + offset = ${o.offset/4}; + ${h}; + `)}}return n.push(` + renderer.buffer.update(buffer); + `),{size:s,syncFunc:new Function("ud","uv","renderer","syncData","buffer",n.join(` +`))}}let jx=0;const Co={textureCount:0,uboCount:0};class ag{constructor(e){this.destroyed=!1,this.renderer=e,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=jx++}systemCheck(){if(!bx())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(e){this.gl=e,this.reset()}bind(e,t){e.disposeRunner.add(this),e.uniforms.globals=this.renderer.globalUniforms;const i=e.program,s=i.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(e);return this.shader=e,this.program!==i&&(this.program=i,this.gl.useProgram(s.program)),t||(Co.textureCount=0,Co.uboCount=0,this.syncUniformGroup(e.uniformGroup,Co)),s}setUniforms(e){const t=this.shader.program,i=t.glPrograms[this.renderer.CONTEXT_UID];t.syncUniforms(i.uniformData,e,this.renderer)}syncUniformGroup(e,t){const i=this.getGlProgram();(!e.static||e.dirtyId!==i.uniformDirtyGroups[e.id])&&(i.uniformDirtyGroups[e.id]=e.dirtyId,this.syncUniforms(e,i,t))}syncUniforms(e,t,i){(e.syncUniforms[this.shader.program.id]||this.createSyncGroups(e))(t.uniformData,e.uniforms,this.renderer,i)}createSyncGroups(e){const t=this.getSignature(e,this.shader.program.uniformData,"u");return this.cache[t]||(this.cache[t]=dx(e,this.shader.program.uniformData)),e.syncUniforms[this.shader.program.id]=this.cache[t],e.syncUniforms[this.shader.program.id]}syncUniformBufferGroup(e,t){const i=this.getGlProgram();if(!e.static||e.dirtyId!==0||!i.uniformGroups[e.id]){e.dirtyId=0;const s=i.uniformGroups[e.id]||this.createSyncBufferGroup(e,i,t);e.buffer.update(),s(i.uniformData,e.uniforms,this.renderer,Co,e.buffer)}this.renderer.buffer.bindBufferBase(e.buffer,i.uniformBufferBindings[t])}createSyncBufferGroup(e,t,i){const{gl:s}=this.renderer;this.renderer.buffer.bind(e.buffer);const n=this.gl.getUniformBlockIndex(t.program,i);t.uniformBufferBindings[i]=this.shader.uniformBindCount,s.uniformBlockBinding(t.program,n,this.shader.uniformBindCount),this.shader.uniformBindCount++;const a=this.getSignature(e,this.shader.program.uniformData,"ubo");let o=this._uboCache[a];if(o||(o=this._uboCache[a]=$x(e,this.shader.program.uniformData)),e.autoManage){const l=new Float32Array(o.size/4);e.buffer.update(l)}return t.uniformGroups[e.id]=o.syncFunc,t.uniformGroups[e.id]}getSignature(e,t,i){const s=e.uniforms,n=[`${i}-`];for(const a in s)n.push(a),t[a]&&n.push(t[a].type);return n.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(e){const t=this.gl,i=e.program,s=Hx(t,i);return i.glPrograms[this.renderer.CONTEXT_UID]=s,s}reset(){this.program=null,this.shader=null}disposeShader(e){this.shader===e&&(this.shader=null)}destroy(){this.renderer=null,this.destroyed=!0}}ag.extension={type:oe.RendererSystem,name:"shader"};ge.add(ag);class Al{constructor(e){this.renderer=e}run(e){const{renderer:t}=this;t.runners.init.emit(t.options),e.hello&&console.log(`PixiJS 7.4.2 - ${t.rendererLogId} - https://pixijs.com`),t.resize(t.screen.width,t.screen.height)}destroy(){}}Al.defaultOptions={hello:!1},Al.extension={type:[oe.RendererSystem,oe.CanvasRendererSystem],name:"startup"};ge.add(Al);function qx(r,e=[]){return e[Me.NORMAL]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[Me.ADD]=[r.ONE,r.ONE],e[Me.MULTIPLY]=[r.DST_COLOR,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA],e[Me.SCREEN]=[r.ONE,r.ONE_MINUS_SRC_COLOR,r.ONE,r.ONE_MINUS_SRC_ALPHA],e[Me.OVERLAY]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[Me.DARKEN]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[Me.LIGHTEN]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[Me.COLOR_DODGE]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[Me.COLOR_BURN]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[Me.HARD_LIGHT]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[Me.SOFT_LIGHT]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[Me.DIFFERENCE]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[Me.EXCLUSION]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[Me.HUE]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[Me.SATURATION]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[Me.COLOR]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[Me.LUMINOSITY]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[Me.NONE]=[0,0],e[Me.NORMAL_NPM]=[r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA],e[Me.ADD_NPM]=[r.SRC_ALPHA,r.ONE,r.ONE,r.ONE],e[Me.SCREEN_NPM]=[r.SRC_ALPHA,r.ONE_MINUS_SRC_COLOR,r.ONE,r.ONE_MINUS_SRC_ALPHA],e[Me.SRC_IN]=[r.DST_ALPHA,r.ZERO],e[Me.SRC_OUT]=[r.ONE_MINUS_DST_ALPHA,r.ZERO],e[Me.SRC_ATOP]=[r.DST_ALPHA,r.ONE_MINUS_SRC_ALPHA],e[Me.DST_OVER]=[r.ONE_MINUS_DST_ALPHA,r.ONE],e[Me.DST_IN]=[r.ZERO,r.SRC_ALPHA],e[Me.DST_OUT]=[r.ZERO,r.ONE_MINUS_SRC_ALPHA],e[Me.DST_ATOP]=[r.ONE_MINUS_DST_ALPHA,r.SRC_ALPHA],e[Me.XOR]=[r.ONE_MINUS_DST_ALPHA,r.ONE_MINUS_SRC_ALPHA],e[Me.SUBTRACT]=[r.ONE,r.ONE,r.ONE,r.ONE,r.FUNC_REVERSE_SUBTRACT,r.FUNC_ADD],e}const Yx=0,Xx=1,Kx=2,Zx=3,Jx=4,Qx=5,og=class ou{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=Me.NONE,this._blendEq=!1,this.map=[],this.map[Yx]=this.setBlend,this.map[Xx]=this.setOffset,this.map[Kx]=this.setCullFace,this.map[Zx]=this.setDepthTest,this.map[Jx]=this.setFrontFace,this.map[Qx]=this.setDepthMask,this.checks=[],this.defaultState=new fr,this.defaultState.blend=!0}contextChange(e){this.gl=e,this.blendModes=qx(e),this.set(this.defaultState),this.reset()}set(e){if(e=e||this.defaultState,this.stateId!==e.data){let t=this.stateId^e.data,i=0;for(;t;)t&1&&this.map[i].call(this,!!(e.data&1<>1,i++;this.stateId=e.data}for(let t=0;te.systems[s]),i=[...t,...Object.keys(e.systems).filter(s=>!t.includes(s))];for(const s of i)this.addSystem(e.systems[s],s)}addRunners(...e){e.forEach(t=>{this.runners[t]=new Pi(t)})}addSystem(e,t){const i=new e(this);if(this[t])throw new Error(`Whoops! The name "${t}" is already in use`);this[t]=i,this._systemsHash[t]=i;for(const s in this.runners)this.runners[s].add(i);return this}emitWithCustomOptions(e,t){const i=Object.keys(this._systemsHash);e.items.forEach(s=>{const n=i.find(a=>this._systemsHash[a]===s);s[e.name](t[n])})}destroy(){Object.values(this.runners).forEach(e=>{e.destroy()}),this._systemsHash={}}}const ua=class nl{constructor(e){this.renderer=e,this.count=0,this.checkCount=0,this.maxIdle=nl.defaultMaxIdle,this.checkCountMax=nl.defaultCheckCountMax,this.mode=nl.defaultMode}postrender(){this.renderer.objectRenderer.renderingToScreen&&(this.count++,this.mode!==Xu.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))}run(){const e=this.renderer.texture,t=e.managedTextures;let i=!1;for(let s=0;sthis.maxIdle&&(e.destroyTexture(n,!0),t[s]=null,i=!0)}if(i){let s=0;for(let n=0;n=0;s--)this.unload(e.children[s])}destroy(){this.renderer=null}};ua.defaultMode=Xu.AUTO,ua.defaultMaxIdle=60*60,ua.defaultCheckCountMax=60*10,ua.extension={type:oe.RendererSystem,name:"textureGC"};let Es=ua;ge.add(Es);class Yh{constructor(e){this.texture=e,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=Ae.UNSIGNED_BYTE,this.internalFormat=se.RGBA,this.samplerType=0}}function i_(r){let e;return"WebGL2RenderingContext"in globalThis&&r instanceof globalThis.WebGL2RenderingContext?e={[r.RGB]:ue.FLOAT,[r.RGBA]:ue.FLOAT,[r.ALPHA]:ue.FLOAT,[r.LUMINANCE]:ue.FLOAT,[r.LUMINANCE_ALPHA]:ue.FLOAT,[r.R8]:ue.FLOAT,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F_STENCIL8]:ue.FLOAT}:e={[r.RGB]:ue.FLOAT,[r.RGBA]:ue.FLOAT,[r.ALPHA]:ue.FLOAT,[r.LUMINANCE]:ue.FLOAT,[r.LUMINANCE_ALPHA]:ue.FLOAT,[r.DEPTH_STENCIL]:ue.FLOAT},e}function r_(r){let e;return"WebGL2RenderingContext"in globalThis&&r instanceof globalThis.WebGL2RenderingContext?e={[Ae.UNSIGNED_BYTE]:{[se.RGBA]:r.RGBA8,[se.RGB]:r.RGB8,[se.RG]:r.RG8,[se.RED]:r.R8,[se.RGBA_INTEGER]:r.RGBA8UI,[se.RGB_INTEGER]:r.RGB8UI,[se.RG_INTEGER]:r.RG8UI,[se.RED_INTEGER]:r.R8UI,[se.ALPHA]:r.ALPHA,[se.LUMINANCE]:r.LUMINANCE,[se.LUMINANCE_ALPHA]:r.LUMINANCE_ALPHA},[Ae.BYTE]:{[se.RGBA]:r.RGBA8_SNORM,[se.RGB]:r.RGB8_SNORM,[se.RG]:r.RG8_SNORM,[se.RED]:r.R8_SNORM,[se.RGBA_INTEGER]:r.RGBA8I,[se.RGB_INTEGER]:r.RGB8I,[se.RG_INTEGER]:r.RG8I,[se.RED_INTEGER]:r.R8I},[Ae.UNSIGNED_SHORT]:{[se.RGBA_INTEGER]:r.RGBA16UI,[se.RGB_INTEGER]:r.RGB16UI,[se.RG_INTEGER]:r.RG16UI,[se.RED_INTEGER]:r.R16UI,[se.DEPTH_COMPONENT]:r.DEPTH_COMPONENT16},[Ae.SHORT]:{[se.RGBA_INTEGER]:r.RGBA16I,[se.RGB_INTEGER]:r.RGB16I,[se.RG_INTEGER]:r.RG16I,[se.RED_INTEGER]:r.R16I},[Ae.UNSIGNED_INT]:{[se.RGBA_INTEGER]:r.RGBA32UI,[se.RGB_INTEGER]:r.RGB32UI,[se.RG_INTEGER]:r.RG32UI,[se.RED_INTEGER]:r.R32UI,[se.DEPTH_COMPONENT]:r.DEPTH_COMPONENT24},[Ae.INT]:{[se.RGBA_INTEGER]:r.RGBA32I,[se.RGB_INTEGER]:r.RGB32I,[se.RG_INTEGER]:r.RG32I,[se.RED_INTEGER]:r.R32I},[Ae.FLOAT]:{[se.RGBA]:r.RGBA32F,[se.RGB]:r.RGB32F,[se.RG]:r.RG32F,[se.RED]:r.R32F,[se.DEPTH_COMPONENT]:r.DEPTH_COMPONENT32F},[Ae.HALF_FLOAT]:{[se.RGBA]:r.RGBA16F,[se.RGB]:r.RGB16F,[se.RG]:r.RG16F,[se.RED]:r.R16F},[Ae.UNSIGNED_SHORT_5_6_5]:{[se.RGB]:r.RGB565},[Ae.UNSIGNED_SHORT_4_4_4_4]:{[se.RGBA]:r.RGBA4},[Ae.UNSIGNED_SHORT_5_5_5_1]:{[se.RGBA]:r.RGB5_A1},[Ae.UNSIGNED_INT_2_10_10_10_REV]:{[se.RGBA]:r.RGB10_A2,[se.RGBA_INTEGER]:r.RGB10_A2UI},[Ae.UNSIGNED_INT_10F_11F_11F_REV]:{[se.RGB]:r.R11F_G11F_B10F},[Ae.UNSIGNED_INT_5_9_9_9_REV]:{[se.RGB]:r.RGB9_E5},[Ae.UNSIGNED_INT_24_8]:{[se.DEPTH_STENCIL]:r.DEPTH24_STENCIL8},[Ae.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[se.DEPTH_STENCIL]:r.DEPTH32F_STENCIL8}}:e={[Ae.UNSIGNED_BYTE]:{[se.RGBA]:r.RGBA,[se.RGB]:r.RGB,[se.ALPHA]:r.ALPHA,[se.LUMINANCE]:r.LUMINANCE,[se.LUMINANCE_ALPHA]:r.LUMINANCE_ALPHA},[Ae.UNSIGNED_SHORT_5_6_5]:{[se.RGB]:r.RGB},[Ae.UNSIGNED_SHORT_4_4_4_4]:{[se.RGBA]:r.RGBA},[Ae.UNSIGNED_SHORT_5_5_5_1]:{[se.RGBA]:r.RGBA}},e}class lg{constructor(e){this.renderer=e,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new Pe,this.hasIntegerTextures=!1}contextChange(){const e=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=r_(e),this.samplerTypes=i_(e);const t=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=t;for(let s=0;s=0;--n){const a=t[n];a&&a._glTextures[s].samplerType!==ue.FLOAT&&this.renderer.texture.unbind(a)}}initTexture(e){const t=new Yh(this.gl.createTexture());return t.dirtyId=-1,e._glTextures[this.CONTEXT_UID]=t,this.managedTextures.push(e),e.on("dispose",this.destroyTexture,this),t}initTextureType(e,t){t.internalFormat=this.internalFormats[e.type]?.[e.format]??e.format,t.samplerType=this.samplerTypes[t.internalFormat]??ue.FLOAT,this.webGLVersion===2&&e.type===Ae.HALF_FLOAT?t.type=this.gl.HALF_FLOAT:t.type=e.type}updateTexture(e){const t=e._glTextures[this.CONTEXT_UID];if(!t)return;const i=this.renderer;if(this.initTextureType(e,t),e.resource?.upload(i,e,t))t.samplerType!==ue.FLOAT&&(this.hasIntegerTextures=!0);else{const s=e.realWidth,n=e.realHeight,a=i.gl;(t.width!==s||t.height!==n||t.dirtyId<0)&&(t.width=s,t.height=n,a.texImage2D(e.target,0,t.internalFormat,s,n,0,e.format,t.type,null))}e.dirtyStyleId!==t.dirtyStyleId&&this.updateTextureStyle(e),t.dirtyId=e.dirtyId}destroyTexture(e,t){const{gl:i}=this;if(e=e.castToBaseTexture(),e._glTextures[this.CONTEXT_UID]&&(this.unbind(e),i.deleteTexture(e._glTextures[this.CONTEXT_UID].texture),e.off("dispose",this.destroyTexture,this),delete e._glTextures[this.CONTEXT_UID],!t)){const s=this.managedTextures.indexOf(e);s!==-1&&En(this.managedTextures,s,1)}}updateTextureStyle(e){const t=e._glTextures[this.CONTEXT_UID];t&&((e.mipmap===ur.POW2||this.webGLVersion!==2)&&!e.isPowerOfTwo?t.mipmap=!1:t.mipmap=e.mipmap>=1,this.webGLVersion!==2&&!e.isPowerOfTwo?t.wrapMode=ss.CLAMP:t.wrapMode=e.wrapMode,e.resource?.style(this.renderer,e,t)||this.setStyle(e,t),t.dirtyStyleId=e.dirtyStyleId)}setStyle(e,t){const i=this.gl;if(t.mipmap&&e.mipmap!==ur.ON_MANUAL&&i.generateMipmap(e.target),i.texParameteri(e.target,i.TEXTURE_WRAP_S,t.wrapMode),i.texParameteri(e.target,i.TEXTURE_WRAP_T,t.wrapMode),t.mipmap){i.texParameteri(e.target,i.TEXTURE_MIN_FILTER,e.scaleMode===Er.LINEAR?i.LINEAR_MIPMAP_LINEAR:i.NEAREST_MIPMAP_NEAREST);const s=this.renderer.context.extensions.anisotropicFiltering;if(s&&e.anisotropicLevel>0&&e.scaleMode===Er.LINEAR){const n=Math.min(e.anisotropicLevel,i.getParameter(s.MAX_TEXTURE_MAX_ANISOTROPY_EXT));i.texParameterf(e.target,s.TEXTURE_MAX_ANISOTROPY_EXT,n)}}else i.texParameteri(e.target,i.TEXTURE_MIN_FILTER,e.scaleMode===Er.LINEAR?i.LINEAR:i.NEAREST);i.texParameteri(e.target,i.TEXTURE_MAG_FILTER,e.scaleMode===Er.LINEAR?i.LINEAR:i.NEAREST)}destroy(){this.renderer=null}}lg.extension={type:oe.RendererSystem,name:"texture"};ge.add(lg);class hg{constructor(e){this.renderer=e}contextChange(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(e){const{gl:t,CONTEXT_UID:i}=this,s=e._glTransformFeedbacks[i]||this.createGLTransformFeedback(e);t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,s)}unbind(){const{gl:e}=this;e.bindTransformFeedback(e.TRANSFORM_FEEDBACK,null)}beginTransformFeedback(e,t){const{gl:i,renderer:s}=this;t&&s.shader.bind(t),i.beginTransformFeedback(e)}endTransformFeedback(){const{gl:e}=this;e.endTransformFeedback()}createGLTransformFeedback(e){const{gl:t,renderer:i,CONTEXT_UID:s}=this,n=t.createTransformFeedback();e._glTransformFeedbacks[s]=n,t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,n);for(let a=0;a(r[r.INTERACTION=50]="INTERACTION",r[r.HIGH=25]="HIGH",r[r.NORMAL=0]="NORMAL",r[r.LOW=-25]="LOW",r[r.UTILITY=-50]="UTILITY",r))(ns||{});class Xh{constructor(e,t=null,i=0,s=!1){this.next=null,this.previous=null,this._destroyed=!1,this.fn=e,this.context=t,this.priority=i,this.once=s}match(e,t=null){return this.fn===e&&this.context===t}emit(e){this.fn&&(this.context?this.fn.call(this.context,e):this.fn(e));const t=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),t}connect(e){this.previous=e,e.next&&(e.next.previous=this),this.next=e.next,e.next=this}destroy(e=!1){this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);const t=this.next;return this.next=e?null:t,this.previous=null,t}}const cg=class ei{constructor(){this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new Xh(null,null,1/0),this.deltaMS=1/ei.targetFPMS,this.elapsedMS=1/ei.targetFPMS,this._tick=e=>{this._requestId=null,this.started&&(this.update(e),this.started&&this._requestId===null&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(e,t,i=ns.NORMAL){return this._addListener(new Xh(e,t,i))}addOnce(e,t,i=ns.NORMAL){return this._addListener(new Xh(e,t,i,!0))}_addListener(e){let t=this._head.next,i=this._head;if(!t)e.connect(i);else{for(;t;){if(e.priority>t.priority){e.connect(i);break}i=t,t=t.next}e.previous||e.connect(i)}return this._startIfPossible(),this}remove(e,t){let i=this._head.next;for(;i;)i.match(e,t)?i=i.destroy():i=i.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let e=0,t=this._head;for(;t=t.next;)e++;return e}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let e=this._head.next;for(;e;)e=e.destroy(!0);this._head.destroy(),this._head=null}}update(e=performance.now()){let t;if(e>this.lastTime){if(t=this.elapsedMS=e-this.lastTime,t>this._maxElapsedMS&&(t=this._maxElapsedMS),t*=this.speed,this._minElapsedMS){const n=e-this._lastFrame|0;if(n{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=e.sharedTicker?It.shared:new It,e.autoStart&&this.start()}static destroy(){if(this._ticker){const e=this._ticker;this.ticker=null,e.destroy()}}}ug.extension=oe.Application;ge.add(ug);const dg=[];ge.handleByList(oe.Renderer,dg);function s_(r){for(const e of dg)if(e.test(r))return new e(r);throw new Error("Unable to auto-detect a suitable renderer.")}var n_=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,a_=`attribute vec2 aVertexPosition; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +uniform vec4 inputSize; +uniform vec4 outputFrame; + +vec4 filterVertexPosition( void ) +{ + vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy; + + return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0); +} + +vec2 filterTextureCoord( void ) +{ + return aVertexPosition * (outputFrame.zw * inputSize.zw); +} + +void main(void) +{ + gl_Position = filterVertexPosition(); + vTextureCoord = filterTextureCoord(); +} +`;const o_=n_,fg=a_;class pg{constructor(e){this.renderer=e}contextChange(e){let t;if(this.renderer.context.webGLVersion===1){const i=e.getParameter(e.FRAMEBUFFER_BINDING);e.bindFramebuffer(e.FRAMEBUFFER,null),t=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.FRAMEBUFFER,i)}else{const i=e.getParameter(e.DRAW_FRAMEBUFFER_BINDING);e.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),t=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.DRAW_FRAMEBUFFER,i)}t>=xt.HIGH?this.multisample=xt.HIGH:t>=xt.MEDIUM?this.multisample=xt.MEDIUM:t>=xt.LOW?this.multisample=xt.LOW:this.multisample=xt.NONE}destroy(){}}pg.extension={type:oe.RendererSystem,name:"_multisample"};ge.add(pg);class l_{constructor(e){this.buffer=e||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class mg{constructor(e){this.renderer=e,this.managedBuffers={},this.boundBufferBases={}}destroy(){this.renderer=null}contextChange(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(e){const{gl:t,CONTEXT_UID:i}=this,s=e._glBuffers[i]||this.createGLBuffer(e);t.bindBuffer(e.type,s.buffer)}unbind(e){const{gl:t}=this;t.bindBuffer(e,null)}bindBufferBase(e,t){const{gl:i,CONTEXT_UID:s}=this;if(this.boundBufferBases[t]!==e){const n=e._glBuffers[s]||this.createGLBuffer(e);this.boundBufferBases[t]=e,i.bindBufferBase(i.UNIFORM_BUFFER,t,n.buffer)}}bindBufferRange(e,t,i){const{gl:s,CONTEXT_UID:n}=this;i=i||0;const a=e._glBuffers[n]||this.createGLBuffer(e);s.bindBufferRange(s.UNIFORM_BUFFER,t||0,a.buffer,i*256,256)}update(e){const{gl:t,CONTEXT_UID:i}=this,s=e._glBuffers[i]||this.createGLBuffer(e);if(e._updateID!==s.updateID)if(s.updateID=e._updateID,t.bindBuffer(e.type,s.buffer),s.byteLength>=e.data.byteLength)t.bufferSubData(e.type,0,e.data);else{const n=e.static?t.STATIC_DRAW:t.DYNAMIC_DRAW;s.byteLength=e.data.byteLength,t.bufferData(e.type,e.data,n)}}dispose(e,t){if(!this.managedBuffers[e.id])return;delete this.managedBuffers[e.id];const i=e._glBuffers[this.CONTEXT_UID],s=this.gl;e.disposeRunner.remove(this),i&&(t||s.deleteBuffer(i.buffer),delete e._glBuffers[this.CONTEXT_UID])}disposeAll(e){const t=Object.keys(this.managedBuffers);for(let i=0;it.resource).filter(t=>t).map(t=>t.load());return this._load=Promise.all(e).then(()=>{const{realWidth:t,realHeight:i}=this.items[0];return this.resize(t,i),this.update(),Promise.resolve(this)}),this._load}}class h_ extends bg{constructor(e,t){const{width:i,height:s}=t||{};let n,a;Array.isArray(e)?(n=e,a=e.length):a=e,super(a,{width:i,height:s}),n&&this.initFromArray(n,t)}addBaseTextureAt(e,t){if(e.resource)this.addResourceAt(e.resource,t);else throw new Error("ArrayResource does not support RenderTexture");return this}bind(e){super.bind(e),e.target=wn.TEXTURE_2D_ARRAY}upload(e,t,i){const{length:s,itemDirtyIds:n,items:a}=this,{gl:o}=e;i.dirtyId<0&&o.texImage3D(o.TEXTURE_2D_ARRAY,0,i.internalFormat,this._width,this._height,s,0,t.format,i.type,null);for(let l=0;l0)if(e.resource)this.addResourceAt(e.resource,t);else throw new Error("CubeResource does not support copying of renderTexture.");else e.target=wn.TEXTURE_CUBE_MAP_POSITIVE_X+t,e.parentTextureArray=this.baseTexture,this.items[t]=e;return e.valid&&!this.valid&&this.resize(e.realWidth,e.realHeight),this.items[t]=e,this}upload(e,t,i){const s=this.itemDirtyIds;for(let n=0;n{if(this.url===null){e(this);return}try{const i=await de.ADAPTER.fetch(this.url,{mode:this.crossOrigin?"cors":"no-cors"});if(this.destroyed)return;const s=await i.blob();if(this.destroyed)return;const n=await createImageBitmap(s,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===Xt.UNPACK?"premultiply":"none"});if(this.destroyed){n.close();return}this.source=n,this.update(),e(this)}catch(i){if(this.destroyed)return;t(i),this.onError.emit(i)}}),this._load)}upload(e,t,i){return this.source instanceof ImageBitmap?(typeof this.alphaMode=="number"&&(t.alphaMode=this.alphaMode),super.upload(e,t,i)):(this.load(),!1)}dispose(){this.ownsImageBitmap&&this.source instanceof ImageBitmap&&this.source.close(),super.dispose(),this._load=null}static test(e){return!!globalThis.createImageBitmap&&typeof ImageBitmap<"u"&&(typeof e=="string"||e instanceof ImageBitmap)}static get EMPTY(){return gn._EMPTY=gn._EMPTY??de.ADAPTER.createCanvas(0,0),gn._EMPTY}}const hu=class ol extends Ir{constructor(e,t){t=t||{},super(de.ADAPTER.createCanvas()),this._width=0,this._height=0,this.svg=e,this.scale=t.scale||1,this._overrideWidth=t.width,this._overrideHeight=t.height,this._resolve=null,this._crossorigin=t.crossorigin,this._load=null,t.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(e=>{if(this._resolve=()=>{this.update(),e(this)},ol.SVG_XML.test(this.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");this.svg=`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(this.svg)))}`}this._loadSvg()}),this._load)}_loadSvg(){const e=new Image;Ir.crossOrigin(e,this.svg,this._crossorigin),e.src=this.svg,e.onerror=t=>{this._resolve&&(e.onerror=null,this.onError.emit(t))},e.onload=()=>{if(!this._resolve)return;const t=e.width,i=e.height;if(!t||!i)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");let s=t*this.scale,n=i*this.scale;(this._overrideWidth||this._overrideHeight)&&(s=this._overrideWidth||this._overrideHeight/i*t,n=this._overrideHeight||this._overrideWidth/t*i),s=Math.round(s),n=Math.round(n);const a=this.source;a.width=s,a.height=n,a._pixiId=`canvas_${Vs()}`,a.getContext("2d").drawImage(e,0,0,t,i,0,0,s,n),this._resolve(),this._resolve=null}}static getSize(e){const t=ol.SVG_SIZE.exec(e),i={};return t&&(i[t[1]]=Math.round(parseFloat(t[3])),i[t[5]]=Math.round(parseFloat(t[7]))),i}dispose(){super.dispose(),this._resolve=null,this._crossorigin=null}static test(e,t){return t==="svg"||typeof e=="string"&&e.startsWith("data:image/svg+xml")||typeof e=="string"&&ol.SVG_XML.test(e)}};hu.SVG_XML=/^(<\?xml[^?]+\?>)?\s*()]*-->)?\s*\]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;let cu=hu;class d_ extends Ir{constructor(e){super(e)}static test(e){return!!globalThis.VideoFrame&&e instanceof globalThis.VideoFrame}}const uu=class du extends Ir{constructor(e,t){if(t=t||{},!(e instanceof HTMLVideoElement)){const i=document.createElement("video");t.autoLoad!==!1&&i.setAttribute("preload","auto"),t.playsinline!==!1&&(i.setAttribute("webkit-playsinline",""),i.setAttribute("playsinline","")),t.muted===!0&&(i.setAttribute("muted",""),i.muted=!0),t.loop===!0&&i.setAttribute("loop",""),t.autoPlay!==!1&&i.setAttribute("autoplay",""),typeof e=="string"&&(e=[e]);const s=e[0].src||e[0];Ir.crossOrigin(i,s,t.crossorigin);for(let n=0;n{this.valid?t(this):(this._resolve=t,this._reject=i,e.load())}),this._load}_onError(e){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(e),this._reject&&(this._reject(e),this._reject=null,this._resolve=null)}_isSourcePlaying(){const e=this.source;return!e.paused&&!e.ended}_isSourceReady(){return this.source.readyState>2}_onPlayStart(){this.valid||this._onCanPlay(),this._configureAutoUpdate()}_onPlayStop(){this._configureAutoUpdate()}_onSeeked(){this._autoUpdate&&!this._isSourcePlaying()&&(this._msToNextUpdate=0,this.update(),this._msToNextUpdate=0)}_onCanPlay(){const e=this.source;e.removeEventListener("canplay",this._onCanPlay),e.removeEventListener("canplaythrough",this._onCanPlay);const t=this.valid;this._msToNextUpdate=0,this.update(),this._msToNextUpdate=0,!t&&this._resolve&&(this._resolve(this),this._resolve=null,this._reject=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&e.play()}dispose(){this._configureAutoUpdate();const e=this.source;e&&(e.removeEventListener("play",this._onPlayStart),e.removeEventListener("pause",this._onPlayStop),e.removeEventListener("seeked",this._onSeeked),e.removeEventListener("canplay",this._onCanPlay),e.removeEventListener("canplaythrough",this._onCanPlay),e.removeEventListener("error",this._onError,!0),e.pause(),e.src="",e.load()),super.dispose()}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){e!==this._autoUpdate&&(this._autoUpdate=e,this._configureAutoUpdate())}get updateFPS(){return this._updateFPS}set updateFPS(e){e!==this._updateFPS&&(this._updateFPS=e,this._configureAutoUpdate())}_configureAutoUpdate(){this._autoUpdate&&this._isSourcePlaying()?!this._updateFPS&&this.source.requestVideoFrameCallback?(this._isConnectedToTicker&&(It.shared.remove(this.update,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0),this._videoFrameRequestCallbackHandle===null&&(this._videoFrameRequestCallbackHandle=this.source.requestVideoFrameCallback(this._videoFrameRequestCallback))):(this._videoFrameRequestCallbackHandle!==null&&(this.source.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker||(It.shared.add(this.update,this),this._isConnectedToTicker=!0,this._msToNextUpdate=0)):(this._videoFrameRequestCallbackHandle!==null&&(this.source.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker&&(It.shared.remove(this.update,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0))}static test(e,t){return globalThis.HTMLVideoElement&&e instanceof HTMLVideoElement||du.TYPES.includes(t)}};uu.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],uu.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"};let vg=uu;Jc.push(gn,W0,c_,vg,d_,cu,ql,u_,h_);class Cl{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}clear(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}getRectangle(e){return this.minX>this.maxX||this.minY>this.maxY?ke.EMPTY:(e=e||new ke(0,0,1,1),e.x=this.minX,e.y=this.minY,e.width=this.maxX-this.minX,e.height=this.maxY-this.minY,e)}addPoint(e){this.minX=Math.min(this.minX,e.x),this.maxX=Math.max(this.maxX,e.x),this.minY=Math.min(this.minY,e.y),this.maxY=Math.max(this.maxY,e.y)}addPointMatrix(e,t){const{a:i,b:s,c:n,d:a,tx:o,ty:l}=e,c=i*t.x+n*t.y+o,u=s*t.x+a*t.y+l;this.minX=Math.min(this.minX,c),this.maxX=Math.max(this.maxX,c),this.minY=Math.min(this.minY,u),this.maxY=Math.max(this.maxY,u)}addQuad(e){let t=this.minX,i=this.minY,s=this.maxX,n=this.maxY,a=e[0],o=e[1];t=as?a:s,n=o>n?o:n,a=e[2],o=e[3],t=as?a:s,n=o>n?o:n,a=e[4],o=e[5],t=as?a:s,n=o>n?o:n,a=e[6],o=e[7],t=as?a:s,n=o>n?o:n,this.minX=t,this.minY=i,this.maxX=s,this.maxY=n}addFrame(e,t,i,s,n){this.addFrameMatrix(e.worldTransform,t,i,s,n)}addFrameMatrix(e,t,i,s,n){const a=e.a,o=e.b,l=e.c,c=e.d,u=e.tx,h=e.ty;let d=this.minX,f=this.minY,p=this.maxX,m=this.maxY,g=a*t+l*i+u,b=o*t+c*i+h;d=gp?g:p,m=b>m?b:m,g=a*s+l*i+u,b=o*s+c*i+h,d=gp?g:p,m=b>m?b:m,g=a*t+l*n+u,b=o*t+c*n+h,d=gp?g:p,m=b>m?b:m,g=a*s+l*n+u,b=o*s+c*n+h,d=gp?g:p,m=b>m?b:m,this.minX=d,this.minY=f,this.maxX=p,this.maxY=m}addVertexData(e,t,i){let s=this.minX,n=this.minY,a=this.maxX,o=this.maxY;for(let l=t;la?c:a,o=u>o?u:o}this.minX=s,this.minY=n,this.maxX=a,this.maxY=o}addVertices(e,t,i,s){this.addVerticesMatrix(e.worldTransform,t,i,s)}addVerticesMatrix(e,t,i,s,n=0,a=n){const o=e.a,l=e.b,c=e.c,u=e.d,h=e.tx,d=e.ty;let f=this.minX,p=this.minY,m=this.maxX,g=this.maxY;for(let b=i;bs?e.maxX:s,this.maxY=e.maxY>n?e.maxY:n}addBoundsMask(e,t){const i=e.minX>t.minX?e.minX:t.minX,s=e.minY>t.minY?e.minY:t.minY,n=e.maxXc?n:c,this.maxY=a>u?a:u}}addBoundsMatrix(e,t){this.addFrameMatrix(t,e.minX,e.minY,e.maxX,e.maxY)}addBoundsArea(e,t){const i=e.minX>t.x?e.minX:t.x,s=e.minY>t.y?e.minY:t.y,n=e.maxXc?n:c,this.maxY=a>u?a:u}}pad(e=0,t=e){this.isEmpty()||(this.minX-=e,this.maxX+=e,this.minY-=t,this.maxY+=t)}addFramePad(e,t,i,s,n,a){e-=n,t-=a,i+=n,s+=a,this.minX=this.minXi?this.maxX:i,this.minY=this.minYs?this.maxY:s}}class gt extends $n{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new sd,this.alpha=1,this.visible=!0,this.renderable=!0,this.cullable=!1,this.cullArea=null,this.parent=null,this.worldAlpha=1,this._lastSortedIndex=0,this._zIndex=0,this.filterArea=null,this.filters=null,this._enabledFilters=null,this._bounds=new Cl,this._localBounds=null,this._boundsID=0,this._boundsRect=null,this._localBoundsRect=null,this._mask=null,this._maskRefCount=0,this._destroyed=!1,this.isSprite=!1,this.isMask=!1}static mixin(e){const t=Object.keys(e);for(let i=0;i1)for(let t=0;tthis.children.length)throw new Error(`${e}addChildAt: The index ${t} supplied is out of bounds ${this.children.length}`);return e.parent&&e.parent.removeChild(e),e.parent=this,this.sortDirty=!0,e.transform._parentID=-1,this.children.splice(t,0,e),this._boundsID++,this.onChildrenChange(t),e.emit("added",this),this.emit("childAdded",e,this,t),e}swapChildren(e,t){if(e===t)return;const i=this.getChildIndex(e),s=this.getChildIndex(t);this.children[i]=t,this.children[s]=e,this.onChildrenChange(i=this.children.length)throw new Error(`The index ${t} supplied is out of bounds ${this.children.length}`);const i=this.getChildIndex(e);En(this.children,i,1),this.children.splice(t,0,e),this.onChildrenChange(t)}getChildAt(e){if(e<0||e>=this.children.length)throw new Error(`getChildAt: Index (${e}) does not exist.`);return this.children[e]}removeChild(...e){if(e.length>1)for(let t=0;t0&&n<=s){a=this.children.splice(i,n);for(let o=0;o1&&this.children.sort(m_),this.sortDirty=!1}updateTransform(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(let e=0,t=this.children.length;e0&&t.height>0))return;let i,s;this.cullArea?(i=this.cullArea,s=this.worldTransform):this._render!==fu.prototype._render&&(i=this.getBounds(!0));const n=e.projection.transform;if(n&&(s?(s=p_.copyFrom(s),s.prepend(n)):s=n),i&&t.intersects(i,s))this._render(e);else if(this.cullArea)return;for(let a=0,o=this.children.length;a=s&&sa.x=n&&sa.y=t&&(a=r-o-1),l=l.replace("%value%",e[a].toString()),s+=l,s+=` +`}return i=i.replace("%blur%",s),i=i.replace("%size%",r.toString()),i}const E_=` + attribute vec2 aVertexPosition; + + uniform mat3 projectionMatrix; + + uniform float strength; + + varying vec2 vBlurTexCoords[%size%]; + + uniform vec4 inputSize; + uniform vec4 outputFrame; + + vec4 filterVertexPosition( void ) + { + vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy; + + return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0); + } + + vec2 filterTextureCoord( void ) + { + return aVertexPosition * (outputFrame.zw * inputSize.zw); + } + + void main(void) + { + gl_Position = filterVertexPosition(); + + vec2 textureCoord = filterTextureCoord(); + %blur% + }`;function A_(r,e){const t=Math.ceil(r/2);let i=E_,s="",n;e?n="vBlurTexCoords[%index%] = textureCoord + vec2(%sampleIndex% * strength, 0.0);":n="vBlurTexCoords[%index%] = textureCoord + vec2(0.0, %sampleIndex% * strength);";for(let a=0;a 0.0) { + c.rgb /= c.a; + } + + vec4 result; + + result.r = (m[0] * c.r); + result.r += (m[1] * c.g); + result.r += (m[2] * c.b); + result.r += (m[3] * c.a); + result.r += m[4]; + + result.g = (m[5] * c.r); + result.g += (m[6] * c.g); + result.g += (m[7] * c.b); + result.g += (m[8] * c.a); + result.g += m[9]; + + result.b = (m[10] * c.r); + result.b += (m[11] * c.g); + result.b += (m[12] * c.b); + result.b += (m[13] * c.a); + result.b += m[14]; + + result.a = (m[15] * c.r); + result.a += (m[16] * c.g); + result.a += (m[17] * c.b); + result.a += (m[18] * c.a); + result.a += m[19]; + + vec3 rgb = mix(c.rgb, result.rgb, uAlpha); + + // Premultiply alpha again. + rgb *= result.a; + + gl_FragColor = vec4(rgb, result.a); +} +`;class mu extends Wt{constructor(){const e={m:new Float32Array([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]),uAlpha:1};super(fg,C_,e),this.alpha=1}_loadMatrix(e,t=!1){let i=e;t&&(this._multiply(i,this.uniforms.m,e),i=this._colorMatrix(i)),this.uniforms.m=i}_multiply(e,t,i){return e[0]=t[0]*i[0]+t[1]*i[5]+t[2]*i[10]+t[3]*i[15],e[1]=t[0]*i[1]+t[1]*i[6]+t[2]*i[11]+t[3]*i[16],e[2]=t[0]*i[2]+t[1]*i[7]+t[2]*i[12]+t[3]*i[17],e[3]=t[0]*i[3]+t[1]*i[8]+t[2]*i[13]+t[3]*i[18],e[4]=t[0]*i[4]+t[1]*i[9]+t[2]*i[14]+t[3]*i[19]+t[4],e[5]=t[5]*i[0]+t[6]*i[5]+t[7]*i[10]+t[8]*i[15],e[6]=t[5]*i[1]+t[6]*i[6]+t[7]*i[11]+t[8]*i[16],e[7]=t[5]*i[2]+t[6]*i[7]+t[7]*i[12]+t[8]*i[17],e[8]=t[5]*i[3]+t[6]*i[8]+t[7]*i[13]+t[8]*i[18],e[9]=t[5]*i[4]+t[6]*i[9]+t[7]*i[14]+t[8]*i[19]+t[9],e[10]=t[10]*i[0]+t[11]*i[5]+t[12]*i[10]+t[13]*i[15],e[11]=t[10]*i[1]+t[11]*i[6]+t[12]*i[11]+t[13]*i[16],e[12]=t[10]*i[2]+t[11]*i[7]+t[12]*i[12]+t[13]*i[17],e[13]=t[10]*i[3]+t[11]*i[8]+t[12]*i[13]+t[13]*i[18],e[14]=t[10]*i[4]+t[11]*i[9]+t[12]*i[14]+t[13]*i[19]+t[14],e[15]=t[15]*i[0]+t[16]*i[5]+t[17]*i[10]+t[18]*i[15],e[16]=t[15]*i[1]+t[16]*i[6]+t[17]*i[11]+t[18]*i[16],e[17]=t[15]*i[2]+t[16]*i[7]+t[17]*i[12]+t[18]*i[17],e[18]=t[15]*i[3]+t[16]*i[8]+t[17]*i[13]+t[18]*i[18],e[19]=t[15]*i[4]+t[16]*i[9]+t[17]*i[14]+t[18]*i[19]+t[19],e}_colorMatrix(e){const t=new Float32Array(e);return t[4]/=255,t[9]/=255,t[14]/=255,t[19]/=255,t}brightness(e,t){const i=[e,0,0,0,0,0,e,0,0,0,0,0,e,0,0,0,0,0,1,0];this._loadMatrix(i,t)}tint(e,t){const[i,s,n]=P.shared.setValue(e).toArray(),a=[i,0,0,0,0,0,s,0,0,0,0,0,n,0,0,0,0,0,1,0];this._loadMatrix(a,t)}greyscale(e,t){const i=[e,e,e,0,0,e,e,e,0,0,e,e,e,0,0,0,0,0,1,0];this._loadMatrix(i,t)}blackAndWhite(e){const t=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0];this._loadMatrix(t,e)}hue(e,t){e=(e||0)/180*Math.PI;const i=Math.cos(e),s=Math.sin(e),n=Math.sqrt,a=1/3,o=n(a),l=i+(1-i)*a,c=a*(1-i)-o*s,u=a*(1-i)+o*s,h=a*(1-i)+o*s,d=i+a*(1-i),f=a*(1-i)-o*s,p=a*(1-i)-o*s,m=a*(1-i)+o*s,g=i+a*(1-i),b=[l,c,u,0,0,h,d,f,0,0,p,m,g,0,0,0,0,0,1,0];this._loadMatrix(b,t)}contrast(e,t){const i=(e||0)+1,s=-.5*(i-1),n=[i,0,0,0,s,0,i,0,0,s,0,0,i,0,s,0,0,0,1,0];this._loadMatrix(n,t)}saturate(e=0,t){const i=e*2/3+1,s=(i-1)*-.5,n=[i,s,s,0,0,s,i,s,0,0,s,s,i,0,0,0,0,0,1,0];this._loadMatrix(n,t)}desaturate(){this.saturate(-1)}negative(e){const t=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0];this._loadMatrix(t,e)}sepia(e){const t=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0];this._loadMatrix(t,e)}technicolor(e){const t=[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0];this._loadMatrix(t,e)}polaroid(e){const t=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0];this._loadMatrix(t,e)}toBGR(e){const t=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0];this._loadMatrix(t,e)}kodachrome(e){const t=[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0];this._loadMatrix(t,e)}browni(e){const t=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0];this._loadMatrix(t,e)}vintage(e){const t=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0];this._loadMatrix(t,e)}colorTone(e,t,i,s,n){e=e||.2,t=t||.15,i=i||16770432,s=s||3375104;const a=P.shared,[o,l,c]=a.setValue(i).toArray(),[u,h,d]=a.setValue(s).toArray(),f=[.3,.59,.11,0,0,o,l,c,e,0,u,h,d,t,0,o-u,l-h,c-d,0,0];this._loadMatrix(f,n)}night(e,t){e=e||.1;const i=[e*-2,-e,0,0,0,-e,0,e,0,0,0,e,e*2,0,0,0,0,0,1,0];this._loadMatrix(i,t)}predator(e,t){const i=[11.224130630493164*e,-4.794486999511719*e,-2.8746118545532227*e,0*e,.40342438220977783*e,-3.6330697536468506*e,9.193157196044922*e,-2.951810836791992*e,0*e,-1.316135048866272*e,-3.2184197902679443*e,-4.2375030517578125*e,7.476448059082031*e,0*e,.8044459223747253*e,0,0,0,1,0];this._loadMatrix(i,t)}lsd(e){const t=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0];this._loadMatrix(t,e)}reset(){const e=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];this._loadMatrix(e,!1)}get matrix(){return this.uniforms.m}set matrix(e){this.uniforms.m=e}get alpha(){return this.uniforms.uAlpha}set alpha(e){this.uniforms.uAlpha=e}}mu.prototype.grayscale=mu.prototype.greyscale;var S_=`varying vec2 vFilterCoord; +varying vec2 vTextureCoord; + +uniform vec2 scale; +uniform mat2 rotation; +uniform sampler2D uSampler; +uniform sampler2D mapSampler; + +uniform highp vec4 inputSize; +uniform vec4 inputClamp; + +void main(void) +{ + vec4 map = texture2D(mapSampler, vFilterCoord); + + map -= 0.5; + map.xy = scale * inputSize.zw * (rotation * map.xy); + + gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), inputClamp.xy, inputClamp.zw)); +} +`,M_=`attribute vec2 aVertexPosition; + +uniform mat3 projectionMatrix; +uniform mat3 filterMatrix; + +varying vec2 vTextureCoord; +varying vec2 vFilterCoord; + +uniform vec4 inputSize; +uniform vec4 outputFrame; + +vec4 filterVertexPosition( void ) +{ + vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy; + + return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0); +} + +vec2 filterTextureCoord( void ) +{ + return aVertexPosition * (outputFrame.zw * inputSize.zw); +} + +void main(void) +{ + gl_Position = filterVertexPosition(); + vTextureCoord = filterTextureCoord(); + vFilterCoord = ( filterMatrix * vec3( vTextureCoord, 1.0) ).xy; +} +`;class k_ extends Wt{constructor(e,t){const i=new at;e.renderable=!1,super(M_,S_,{mapSampler:e._texture,filterMatrix:i,scale:{x:1,y:1},rotation:new Float32Array([1,0,0,1])}),this.maskSprite=e,this.maskMatrix=i,t==null&&(t=20),this.scale=new ze(t,t)}apply(e,t,i,s){this.uniforms.filterMatrix=e.calculateSpriteMatrix(this.maskMatrix,this.maskSprite),this.uniforms.scale.x=this.scale.x,this.uniforms.scale.y=this.scale.y;const n=this.maskSprite.worldTransform,a=Math.sqrt(n.a*n.a+n.b*n.b),o=Math.sqrt(n.c*n.c+n.d*n.d);a!==0&&o!==0&&(this.uniforms.rotation[0]=n.a/a,this.uniforms.rotation[1]=n.b/a,this.uniforms.rotation[2]=n.c/o,this.uniforms.rotation[3]=n.d/o),e.applyFilter(this,t,i,s)}get map(){return this.uniforms.mapSampler}set map(e){this.uniforms.mapSampler=e}}var D_=`varying vec2 v_rgbNW; +varying vec2 v_rgbNE; +varying vec2 v_rgbSW; +varying vec2 v_rgbSE; +varying vec2 v_rgbM; + +varying vec2 vFragCoord; +uniform sampler2D uSampler; +uniform highp vec4 inputSize; + + +/** + Basic FXAA implementation based on the code on geeks3d.com with the + modification that the texture2DLod stuff was removed since it's + unsupported by WebGL. + + -- + + From: + https://github.com/mitsuhiko/webgl-meincraft + + Copyright (c) 2011 by Armin Ronacher. + + Some rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + * The names of the contributors may not be used to endorse or + promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef FXAA_REDUCE_MIN +#define FXAA_REDUCE_MIN (1.0/ 128.0) +#endif +#ifndef FXAA_REDUCE_MUL +#define FXAA_REDUCE_MUL (1.0 / 8.0) +#endif +#ifndef FXAA_SPAN_MAX +#define FXAA_SPAN_MAX 8.0 +#endif + +//optimized version for mobile, where dependent +//texture reads can be a bottleneck +vec4 fxaa(sampler2D tex, vec2 fragCoord, vec2 inverseVP, + vec2 v_rgbNW, vec2 v_rgbNE, + vec2 v_rgbSW, vec2 v_rgbSE, + vec2 v_rgbM) { + vec4 color; + vec3 rgbNW = texture2D(tex, v_rgbNW).xyz; + vec3 rgbNE = texture2D(tex, v_rgbNE).xyz; + vec3 rgbSW = texture2D(tex, v_rgbSW).xyz; + vec3 rgbSE = texture2D(tex, v_rgbSE).xyz; + vec4 texColor = texture2D(tex, v_rgbM); + vec3 rgbM = texColor.xyz; + vec3 luma = vec3(0.299, 0.587, 0.114); + float lumaNW = dot(rgbNW, luma); + float lumaNE = dot(rgbNE, luma); + float lumaSW = dot(rgbSW, luma); + float lumaSE = dot(rgbSE, luma); + float lumaM = dot(rgbM, luma); + float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE))); + float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE))); + + mediump vec2 dir; + dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE)); + dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE)); + + float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) * + (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN); + + float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce); + dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX), + max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX), + dir * rcpDirMin)) * inverseVP; + + vec3 rgbA = 0.5 * ( + texture2D(tex, fragCoord * inverseVP + dir * (1.0 / 3.0 - 0.5)).xyz + + texture2D(tex, fragCoord * inverseVP + dir * (2.0 / 3.0 - 0.5)).xyz); + vec3 rgbB = rgbA * 0.5 + 0.25 * ( + texture2D(tex, fragCoord * inverseVP + dir * -0.5).xyz + + texture2D(tex, fragCoord * inverseVP + dir * 0.5).xyz); + + float lumaB = dot(rgbB, luma); + if ((lumaB < lumaMin) || (lumaB > lumaMax)) + color = vec4(rgbA, texColor.a); + else + color = vec4(rgbB, texColor.a); + return color; +} + +void main() { + + vec4 color; + + color = fxaa(uSampler, vFragCoord, inputSize.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM); + + gl_FragColor = color; +} +`,I_=` +attribute vec2 aVertexPosition; + +uniform mat3 projectionMatrix; + +varying vec2 v_rgbNW; +varying vec2 v_rgbNE; +varying vec2 v_rgbSW; +varying vec2 v_rgbSE; +varying vec2 v_rgbM; + +varying vec2 vFragCoord; + +uniform vec4 inputSize; +uniform vec4 outputFrame; + +vec4 filterVertexPosition( void ) +{ + vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy; + + return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0); +} + +void texcoords(vec2 fragCoord, vec2 inverseVP, + out vec2 v_rgbNW, out vec2 v_rgbNE, + out vec2 v_rgbSW, out vec2 v_rgbSE, + out vec2 v_rgbM) { + v_rgbNW = (fragCoord + vec2(-1.0, -1.0)) * inverseVP; + v_rgbNE = (fragCoord + vec2(1.0, -1.0)) * inverseVP; + v_rgbSW = (fragCoord + vec2(-1.0, 1.0)) * inverseVP; + v_rgbSE = (fragCoord + vec2(1.0, 1.0)) * inverseVP; + v_rgbM = vec2(fragCoord * inverseVP); +} + +void main(void) { + + gl_Position = filterVertexPosition(); + + vFragCoord = aVertexPosition * outputFrame.zw; + + texcoords(vFragCoord, inputSize.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM); +} +`;class gu extends Wt{constructor(){super(I_,D_)}}var P_=`precision highp float; + +varying vec2 vTextureCoord; +varying vec4 vColor; + +uniform float uNoise; +uniform float uSeed; +uniform sampler2D uSampler; + +float rand(vec2 co) +{ + return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453); +} + +void main() +{ + vec4 color = texture2D(uSampler, vTextureCoord); + float randomValue = rand(gl_FragCoord.xy * uSeed); + float diff = (randomValue - 0.5) * uNoise; + + // Un-premultiply alpha before applying the color matrix. See issue #3539. + if (color.a > 0.0) { + color.rgb /= color.a; + } + + color.r += diff; + color.g += diff; + color.b += diff; + + // Premultiply alpha again. + color.rgb *= color.a; + + gl_FragColor = color; +} +`;class B_ extends Wt{constructor(e=.5,t=Math.random()){super(fg,P_,{uNoise:0,uSeed:0}),this.noise=e,this.seed=t}get noise(){return this.uniforms.uNoise}set noise(e){this.uniforms.uNoise=e}get seed(){return this.uniforms.uSeed}set seed(e){this.uniforms.uSeed=e}}const op={AlphaFilter:v_,BlurFilter:T_,BlurFilterPass:pu,ColorMatrixFilter:mu,DisplacementFilter:k_,FXAAFilter:gu,NoiseFilter:B_};Object.entries(op).forEach(([r,e])=>{Object.defineProperty(op,r,{get(){return He("7.1.0",`filters.${r} has moved to ${r}`),e}})});class R_{constructor(){this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}init(e){this.removeTickerListener(),this.events=e,this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}get pauseUpdate(){return this._pauseUpdate}set pauseUpdate(e){this._pauseUpdate=e}addTickerListener(){this.tickerAdded||!this.domElement||(It.system.add(this.tickerUpdate,this,ns.INTERACTION),this.tickerAdded=!0)}removeTickerListener(){this.tickerAdded&&(It.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)}pointerMoved(){this._didMove=!0}update(){if(!this.domElement||this._pauseUpdate)return;if(this._didMove){this._didMove=!1;return}const e=this.events.rootPointerEvent;this.events.supportsTouchEvents&&e.pointerType==="touch"||globalThis.document.dispatchEvent(new PointerEvent("pointermove",{clientX:e.clientX,clientY:e.clientY}))}tickerUpdate(e){this._deltaTime+=e,!(this._deltaTimei.priority-s.priority)}dispatchEvent(e,t){e.propagationStopped=!1,e.propagationImmediatelyStopped=!1,this.propagate(e,t),this.dispatch.emit(t||e.type,e)}mapEvent(e){if(!this.rootTarget)return;const t=this.mappingTable[e.type];if(t)for(let i=0,s=t.length;i=0;s--)if(e.currentTarget=i[s],this.notifyTarget(e,t),e.propagationStopped||e.propagationImmediatelyStopped)return}}all(e,t,i=this._allInteractiveElements){if(i.length===0)return;e.eventPhase=e.BUBBLING_PHASE;const s=Array.isArray(t)?t:[t];for(let n=i.length-1;n>=0;n--)s.forEach(a=>{e.currentTarget=i[n],this.notifyTarget(e,a)})}propagationPath(e){const t=[e];for(let i=0;i=0;h--){const d=u[h],f=this.hitTestMoveRecursive(d,this._isInteractive(t)?t:d.eventMode,i,s,n,a||n(e,i));if(f){if(f.length>0&&!f[f.length-1].parent)continue;const p=e.isInteractive();(f.length>0||p)&&(p&&this._allInteractiveElements.push(e),f.push(e)),this._hitElements.length===0&&(this._hitElements=f),o=!0}}}const l=this._isInteractive(t),c=e.isInteractive();return l&&c&&this._allInteractiveElements.push(e),a||this._hitElements.length>0?null:o?this._hitElements:l&&!n(e,i)&&s(e,i)?c?[e]:[]:null}hitTestRecursive(e,t,i,s,n){if(this._interactivePrune(e)||n(e,i))return null;if((e.eventMode==="dynamic"||t==="dynamic")&&(Xr.pauseUpdate=!1),e.interactiveChildren&&e.children){const l=e.children;for(let c=l.length-1;c>=0;c--){const u=l[c],h=this.hitTestRecursive(u,this._isInteractive(t)?t:u.eventMode,i,s,n);if(h){if(h.length>0&&!h[h.length-1].parent)continue;const d=e.isInteractive();return(h.length>0||d)&&h.push(e),h}}}const a=this._isInteractive(t),o=e.isInteractive();return a&&s(e,i)?o?[e]:[]:null}_isInteractive(e){return e==="static"||e==="dynamic"}_interactivePrune(e){return!!(!e||e.isMask||!e.visible||!e.renderable||e.eventMode==="none"||e.eventMode==="passive"&&!e.interactiveChildren||e.isMask)}hitPruneFn(e,t){if(e.hitArea&&(e.worldTransform.applyInverse(t,Kh),!e.hitArea.contains(Kh.x,Kh.y)))return!0;if(e._mask){const i=e._mask.isMaskData?e._mask.maskObject:e._mask;if(i&&!i.containsPoint?.(t))return!0}return!1}hitTestFn(e,t){return e.eventMode==="passive"?!1:e.hitArea?!0:e.containsPoint?e.containsPoint(t):!1}notifyTarget(e,t){t=t??e.type;const i=`on${t}`;e.currentTarget[i]?.(e);const s=e.eventPhase===e.CAPTURING_PHASE||e.eventPhase===e.AT_TARGET?`${t}capture`:t;this.notifyListeners(e,s),e.eventPhase===e.AT_TARGET&&this.notifyListeners(e,t)}mapPointerDown(e){if(!(e instanceof Si)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=this.createPointerEvent(e);if(this.dispatchEvent(t,"pointerdown"),t.pointerType==="touch")this.dispatchEvent(t,"touchstart");else if(t.pointerType==="mouse"||t.pointerType==="pen"){const s=t.button===2;this.dispatchEvent(t,s?"rightdown":"mousedown")}const i=this.trackingData(e.pointerId);i.pressTargetsByButton[e.button]=t.composedPath(),this.freeEvent(t)}mapPointerMove(e){if(!(e instanceof Si)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}this._allInteractiveElements.length=0,this._hitElements.length=0,this._isPointerMoveEvent=!0;const t=this.createPointerEvent(e);this._isPointerMoveEvent=!1;const i=t.pointerType==="mouse"||t.pointerType==="pen",s=this.trackingData(e.pointerId),n=this.findMountedTarget(s.overTargets);if(s.overTargets?.length>0&&n!==t.target){const l=e.type==="mousemove"?"mouseout":"pointerout",c=this.createPointerEvent(e,l,n);if(this.dispatchEvent(c,"pointerout"),i&&this.dispatchEvent(c,"mouseout"),!t.composedPath().includes(n)){const u=this.createPointerEvent(e,"pointerleave",n);for(u.eventPhase=u.AT_TARGET;u.target&&!t.composedPath().includes(u.target);)u.currentTarget=u.target,this.notifyTarget(u),i&&this.notifyTarget(u,"mouseleave"),u.target=u.target.parent;this.freeEvent(u)}this.freeEvent(c)}if(n!==t.target){const l=e.type==="mousemove"?"mouseover":"pointerover",c=this.clonePointerEvent(t,l);this.dispatchEvent(c,"pointerover"),i&&this.dispatchEvent(c,"mouseover");let u=n?.parent;for(;u&&u!==this.rootTarget.parent&&u!==t.target;)u=u.parent;if(!u||u===this.rootTarget.parent){const h=this.clonePointerEvent(t,"pointerenter");for(h.eventPhase=h.AT_TARGET;h.target&&h.target!==n&&h.target!==this.rootTarget.parent;)h.currentTarget=h.target,this.notifyTarget(h),i&&this.notifyTarget(h,"mouseenter"),h.target=h.target.parent;this.freeEvent(h)}this.freeEvent(c)}const a=[],o=this.enableGlobalMoveEvents??!0;this.moveOnAll?a.push("pointermove"):this.dispatchEvent(t,"pointermove"),o&&a.push("globalpointermove"),t.pointerType==="touch"&&(this.moveOnAll?a.splice(1,0,"touchmove"):this.dispatchEvent(t,"touchmove"),o&&a.push("globaltouchmove")),i&&(this.moveOnAll?a.splice(1,0,"mousemove"):this.dispatchEvent(t,"mousemove"),o&&a.push("globalmousemove"),this.cursor=t.target?.cursor),a.length>0&&this.all(t,a),this._allInteractiveElements.length=0,this._hitElements.length=0,s.overTargets=t.composedPath(),this.freeEvent(t)}mapPointerOver(e){if(!(e instanceof Si)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=this.trackingData(e.pointerId),i=this.createPointerEvent(e),s=i.pointerType==="mouse"||i.pointerType==="pen";this.dispatchEvent(i,"pointerover"),s&&this.dispatchEvent(i,"mouseover"),i.pointerType==="mouse"&&(this.cursor=i.target?.cursor);const n=this.clonePointerEvent(i,"pointerenter");for(n.eventPhase=n.AT_TARGET;n.target&&n.target!==this.rootTarget.parent;)n.currentTarget=n.target,this.notifyTarget(n),s&&this.notifyTarget(n,"mouseenter"),n.target=n.target.parent;t.overTargets=i.composedPath(),this.freeEvent(i),this.freeEvent(n)}mapPointerOut(e){if(!(e instanceof Si)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=this.trackingData(e.pointerId);if(t.overTargets){const i=e.pointerType==="mouse"||e.pointerType==="pen",s=this.findMountedTarget(t.overTargets),n=this.createPointerEvent(e,"pointerout",s);this.dispatchEvent(n),i&&this.dispatchEvent(n,"mouseout");const a=this.createPointerEvent(e,"pointerleave",s);for(a.eventPhase=a.AT_TARGET;a.target&&a.target!==this.rootTarget.parent;)a.currentTarget=a.target,this.notifyTarget(a),i&&this.notifyTarget(a,"mouseleave"),a.target=a.target.parent;t.overTargets=null,this.freeEvent(n),this.freeEvent(a)}this.cursor=null}mapPointerUp(e){if(!(e instanceof Si)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=performance.now(),i=this.createPointerEvent(e);if(this.dispatchEvent(i,"pointerup"),i.pointerType==="touch")this.dispatchEvent(i,"touchend");else if(i.pointerType==="mouse"||i.pointerType==="pen"){const o=i.button===2;this.dispatchEvent(i,o?"rightup":"mouseup")}const s=this.trackingData(e.pointerId),n=this.findMountedTarget(s.pressTargetsByButton[e.button]);let a=n;if(n&&!i.composedPath().includes(n)){let o=n;for(;o&&!i.composedPath().includes(o);){if(i.currentTarget=o,this.notifyTarget(i,"pointerupoutside"),i.pointerType==="touch")this.notifyTarget(i,"touchendoutside");else if(i.pointerType==="mouse"||i.pointerType==="pen"){const l=i.button===2;this.notifyTarget(i,l?"rightupoutside":"mouseupoutside")}o=o.parent}delete s.pressTargetsByButton[e.button],a=o}if(a){const o=this.clonePointerEvent(i,"click");o.target=a,o.path=null,s.clicksByButton[e.button]||(s.clicksByButton[e.button]={clickCount:0,target:o.target,timeStamp:t});const l=s.clicksByButton[e.button];if(l.target===o.target&&t-l.timeStamp<200?++l.clickCount:l.clickCount=1,l.target=o.target,l.timeStamp=t,o.detail=l.clickCount,o.pointerType==="mouse"){const c=o.button===2;this.dispatchEvent(o,c?"rightclick":"click")}else o.pointerType==="touch"&&this.dispatchEvent(o,"tap");this.dispatchEvent(o,"pointertap"),this.freeEvent(o)}this.freeEvent(i)}mapPointerUpOutside(e){if(!(e instanceof Si)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=this.trackingData(e.pointerId),i=this.findMountedTarget(t.pressTargetsByButton[e.button]),s=this.createPointerEvent(e);if(i){let n=i;for(;n;)s.currentTarget=n,this.notifyTarget(s,"pointerupoutside"),s.pointerType==="touch"?this.notifyTarget(s,"touchendoutside"):(s.pointerType==="mouse"||s.pointerType==="pen")&&this.notifyTarget(s,s.button===2?"rightupoutside":"mouseupoutside"),n=n.parent;delete t.pressTargetsByButton[e.button]}this.freeEvent(s)}mapWheel(e){if(!(e instanceof Tn)){console.warn("EventBoundary cannot map a non-wheel event as a wheel event");return}const t=this.createWheelEvent(e);this.dispatchEvent(t),this.freeEvent(t)}findMountedTarget(e){if(!e)return null;let t=e[0];for(let i=1;i(i==="globalMove"&&(this.rootBoundary.enableGlobalMoveEvents=s),t[i]=s,!0)}),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOverOut=this.onPointerOverOut.bind(this),this.onWheel=this.onWheel.bind(this)}static get defaultEventMode(){return this._defaultEventMode}init(e){const{view:t,resolution:i}=this.renderer;this.setTargetElement(t),this.resolution=i,yu._defaultEventMode=e.eventMode??"auto",Object.assign(this.features,e.eventFeatures??{}),this.rootBoundary.enableGlobalMoveEvents=this.features.globalMove}resolutionChange(e){this.resolution=e}destroy(){this.setTargetElement(null),this.renderer=null}setCursor(e){e=e||"default";let t=!0;if(globalThis.OffscreenCanvas&&this.domElement instanceof OffscreenCanvas&&(t=!1),this.currentCursor===e)return;this.currentCursor=e;const i=this.cursorStyles[e];if(i)switch(typeof i){case"string":t&&(this.domElement.style.cursor=i);break;case"function":i(e);break;case"object":t&&Object.assign(this.domElement.style,i);break}else t&&typeof e=="string"&&!Object.prototype.hasOwnProperty.call(this.cursorStyles,e)&&(this.domElement.style.cursor=e)}get pointer(){return this.rootPointerEvent}onPointerDown(e){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;const t=this.normalizeToPointerData(e);this.autoPreventDefault&&t[0].isNormalized&&(e.cancelable||!("cancelable"in e))&&e.preventDefault();for(let i=0,s=t.length;i0&&(t=e.composedPath()[0]);const i=t!==this.domElement?"outside":"",s=this.normalizeToPointerData(e);for(let n=0,a=s.length;n"u"&&(n.button=0),typeof n.buttons>"u"&&(n.buttons=1),typeof n.isPrimary>"u"&&(n.isPrimary=e.touches.length===1&&e.type==="touchstart"),typeof n.width>"u"&&(n.width=n.radiusX||1),typeof n.height>"u"&&(n.height=n.radiusY||1),typeof n.tiltX>"u"&&(n.tiltX=0),typeof n.tiltY>"u"&&(n.tiltY=0),typeof n.pointerType>"u"&&(n.pointerType="touch"),typeof n.pointerId>"u"&&(n.pointerId=n.identifier||0),typeof n.pressure>"u"&&(n.pressure=n.force||.5),typeof n.twist>"u"&&(n.twist=0),typeof n.tangentialPressure>"u"&&(n.tangentialPressure=0),typeof n.layerX>"u"&&(n.layerX=n.offsetX=n.clientX),typeof n.layerY>"u"&&(n.layerY=n.offsetY=n.clientY),n.isNormalized=!0,n.type=e.type,t.push(n)}else if(!globalThis.MouseEvent||e instanceof MouseEvent&&(!this.supportsPointerEvents||!(e instanceof globalThis.PointerEvent))){const i=e;typeof i.isPrimary>"u"&&(i.isPrimary=!0),typeof i.width>"u"&&(i.width=1),typeof i.height>"u"&&(i.height=1),typeof i.tiltX>"u"&&(i.tiltX=0),typeof i.tiltY>"u"&&(i.tiltY=0),typeof i.pointerType>"u"&&(i.pointerType="mouse"),typeof i.pointerId>"u"&&(i.pointerId=N_),typeof i.pressure>"u"&&(i.pressure=.5),typeof i.twist>"u"&&(i.twist=0),typeof i.tangentialPressure>"u"&&(i.tangentialPressure=0),i.isNormalized=!0,t.push(i)}else t.push(e);return t}normalizeWheelEvent(e){const t=this.rootWheelEvent;return this.transferMouseData(t,e),t.deltaX=e.deltaX,t.deltaY=e.deltaY,t.deltaZ=e.deltaZ,t.deltaMode=e.deltaMode,this.mapPositionToPoint(t.screen,e.clientX,e.clientY),t.global.copyFrom(t.screen),t.offset.copyFrom(t.screen),t.nativeEvent=e,t.type=e.type,t}bootstrapEvent(e,t){return e.originalEvent=null,e.nativeEvent=t,e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist,this.transferMouseData(e,t),this.mapPositionToPoint(e.screen,t.clientX,t.clientY),e.global.copyFrom(e.screen),e.offset.copyFrom(e.screen),e.isTrusted=t.isTrusted,e.type==="pointerleave"&&(e.type="pointerout"),e.type.startsWith("mouse")&&(e.type=e.type.replace("mouse","pointer")),e.type.startsWith("touch")&&(e.type=U_[e.type]||e.type),e}transferMouseData(e,t){e.isTrusted=t.isTrusted,e.srcElement=t.srcElement,e.timeStamp=performance.now(),e.type=t.type,e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.client.x=t.clientX,e.client.y=t.clientY,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.movement.x=t.movementX,e.movement.y=t.movementY,e.page.x=t.pageX,e.page.y=t.pageY,e.relatedTarget=null,e.shiftKey=t.shiftKey}};bu.extension={name:"events",type:[oe.RendererSystem,oe.CanvasRendererSystem]},bu.defaultEventFeatures={move:!0,globalMove:!0,click:!0,wheel:!0};let vu=bu;ge.add(vu);function lp(r){return r==="dynamic"||r==="static"}const H_={onclick:null,onmousedown:null,onmouseenter:null,onmouseleave:null,onmousemove:null,onglobalmousemove:null,onmouseout:null,onmouseover:null,onmouseup:null,onmouseupoutside:null,onpointercancel:null,onpointerdown:null,onpointerenter:null,onpointerleave:null,onpointermove:null,onglobalpointermove:null,onpointerout:null,onpointerover:null,onpointertap:null,onpointerup:null,onpointerupoutside:null,onrightclick:null,onrightdown:null,onrightup:null,onrightupoutside:null,ontap:null,ontouchcancel:null,ontouchend:null,ontouchendoutside:null,ontouchmove:null,onglobaltouchmove:null,ontouchstart:null,onwheel:null,_internalInteractive:void 0,get interactive(){return this._internalInteractive??lp(vu.defaultEventMode)},set interactive(r){He("7.2.0","Setting interactive is deprecated, use eventMode = 'none'/'passive'/'auto'/'static'/'dynamic' instead."),this._internalInteractive=r,this.eventMode=r?"static":"auto"},_internalEventMode:void 0,get eventMode(){return this._internalEventMode??vu.defaultEventMode},set eventMode(r){this._internalInteractive=lp(r),this._internalEventMode=r},isInteractive(){return this.eventMode==="static"||this.eventMode==="dynamic"},interactiveChildren:!0,hitArea:null,addEventListener(r,e,t){const i=typeof t=="boolean"&&t||typeof t=="object"&&t.capture,s=typeof t=="object"?t.signal:void 0,n=typeof t=="object"?t.once===!0:!1,a=typeof e=="function"?void 0:e;r=i?`${r}capture`:r;const o=typeof e=="function"?e:e.handleEvent,l=this;s&&s.addEventListener("abort",()=>{l.off(r,o,a)}),n?l.once(r,o,a):l.on(r,o,a)},removeEventListener(r,e,t){const i=typeof t=="boolean"&&t||typeof t=="object"&&t.capture,s=typeof e=="function"?void 0:e;r=i?`${r}capture`:r,e=typeof e=="function"?e:e.handleEvent,this.off(r,e,s)},dispatchEvent(r){if(!(r instanceof Ja))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");return r.defaultPrevented=!1,r.path=null,r.target=this,r.manager.dispatchEvent(r),!r.defaultPrevented}};gt.mixin(H_);const G_={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:null,accessibleType:"button",accessiblePointerEvents:"auto",accessibleChildren:!0,renderId:-1};gt.mixin(G_);const V_=9,So=100,z_=0,W_=0,hp=2,cp=1,$_=-1e3,j_=-1e3,q_=2;class _g{constructor(e){this.debug=!1,this._isActive=!1,this._isMobileAccessibility=!1,this.pool=[],this.renderId=0,this.children=[],this.androidUpdateCount=0,this.androidUpdateFrequency=500,this._hookDiv=null,(Ar.tablet||Ar.phone)&&this.createTouchHook();const t=document.createElement("div");t.style.width=`${So}px`,t.style.height=`${So}px`,t.style.position="absolute",t.style.top=`${z_}px`,t.style.left=`${W_}px`,t.style.zIndex=hp.toString(),this.div=t,this.renderer=e,this._onKeyDown=this._onKeyDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),globalThis.addEventListener("keydown",this._onKeyDown,!1)}get isActive(){return this._isActive}get isMobileAccessibility(){return this._isMobileAccessibility}createTouchHook(){const e=document.createElement("button");e.style.width=`${cp}px`,e.style.height=`${cp}px`,e.style.position="absolute",e.style.top=`${$_}px`,e.style.left=`${j_}px`,e.style.zIndex=q_.toString(),e.style.backgroundColor="#FF0000",e.title="select to enable accessibility for this content",e.addEventListener("focus",()=>{this._isMobileAccessibility=!0,this.activate(),this.destroyTouchHook()}),document.body.appendChild(e),this._hookDiv=e}destroyTouchHook(){this._hookDiv&&(document.body.removeChild(this._hookDiv),this._hookDiv=null)}activate(){this._isActive||(this._isActive=!0,globalThis.document.addEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown,!1),this.renderer.on("postrender",this.update,this),this.renderer.view.parentNode?.appendChild(this.div))}deactivate(){!this._isActive||this._isMobileAccessibility||(this._isActive=!1,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.addEventListener("keydown",this._onKeyDown,!1),this.renderer.off("postrender",this.update),this.div.parentNode?.removeChild(this.div))}updateAccessibleObjects(e){if(!e.visible||!e.accessibleChildren)return;e.accessible&&e.isInteractive()&&(e._accessibleActive||this.addChild(e),e.renderId=this.renderId);const t=e.children;if(t)for(let i=0;i title : ${e.title}
tabIndex: ${e.tabIndex}`}capHitArea(e){e.x<0&&(e.width+=e.x,e.x=0),e.y<0&&(e.height+=e.y,e.y=0);const{width:t,height:i}=this.renderer;e.x+e.width>t&&(e.width=t-e.x),e.y+e.height>i&&(e.height=i-e.y)}addChild(e){let t=this.pool.pop();t||(t=document.createElement("button"),t.style.width=`${So}px`,t.style.height=`${So}px`,t.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",t.style.position="absolute",t.style.zIndex=hp.toString(),t.style.borderStyle="none",navigator.userAgent.toLowerCase().includes("chrome")?t.setAttribute("aria-live","off"):t.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?t.setAttribute("aria-relevant","additions"):t.setAttribute("aria-relevant","text"),t.addEventListener("click",this._onClick.bind(this)),t.addEventListener("focus",this._onFocus.bind(this)),t.addEventListener("focusout",this._onFocusOut.bind(this))),t.style.pointerEvents=e.accessiblePointerEvents,t.type=e.accessibleType,e.accessibleTitle&&e.accessibleTitle!==null?t.title=e.accessibleTitle:(!e.accessibleHint||e.accessibleHint===null)&&(t.title=`displayObject ${e.tabIndex}`),e.accessibleHint&&e.accessibleHint!==null&&t.setAttribute("aria-label",e.accessibleHint),this.debug&&this.updateDebugHTML(t),e._accessibleActive=!0,e._accessibleDiv=t,t.displayObject=e,this.children.push(e),this.div.appendChild(e._accessibleDiv),e._accessibleDiv.tabIndex=e.tabIndex}_dispatchEvent(e,t){const{displayObject:i}=e.target,s=this.renderer.events.rootBoundary,n=Object.assign(new Ja(s),{target:i});s.rootTarget=this.renderer.lastObjectRendered,t.forEach(a=>s.dispatchEvent(n,a))}_onClick(e){this._dispatchEvent(e,["click","pointertap","tap"])}_onFocus(e){e.target.getAttribute("aria-live")||e.target.setAttribute("aria-live","assertive"),this._dispatchEvent(e,["mouseover"])}_onFocusOut(e){e.target.getAttribute("aria-live")||e.target.setAttribute("aria-live","polite"),this._dispatchEvent(e,["mouseout"])}_onKeyDown(e){e.keyCode===V_&&this.activate()}_onMouseMove(e){e.movementX===0&&e.movementY===0||this.deactivate()}destroy(){this.destroyTouchHook(),this.div=null,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null}}_g.extension={name:"accessibility",type:[oe.RendererPlugin,oe.CanvasRendererPlugin]};ge.add(_g);const Eg=class wu{constructor(e){this.stage=new ve,e=Object.assign({forceCanvas:!1},e),this.renderer=s_(e),wu._plugins.forEach(t=>{t.init.call(this,e)})}render(){this.renderer.render(this.stage)}get view(){return this.renderer?.view}get screen(){return this.renderer?.screen}destroy(e,t){const i=wu._plugins.slice(0);i.reverse(),i.forEach(s=>{s.destroy.call(this)}),this.stage.destroy(t),this.stage=null,this.renderer.destroy(e),this.renderer=null}};Eg._plugins=[];let Y_=Eg;ge.handleByList(oe.Application,Y_._plugins);class Ag{static init(e){Object.defineProperty(this,"resizeTo",{set(t){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=t,t&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get(){return this._resizeTo}}),this.queueResize=()=>{this._resizeTo&&(this.cancelResize(),this._resizeId=requestAnimationFrame(()=>this.resize()))},this.cancelResize=()=>{this._resizeId&&(cancelAnimationFrame(this._resizeId),this._resizeId=null)},this.resize=()=>{if(!this._resizeTo)return;this.cancelResize();let t,i;if(this._resizeTo===globalThis.window)t=globalThis.innerWidth,i=globalThis.innerHeight;else{const{clientWidth:s,clientHeight:n}=this._resizeTo;t=s,i=n}this.renderer.resize(t,i),this.render()},this._resizeId=null,this._resizeTo=null,this.resizeTo=e.resizeTo||null}static destroy(){globalThis.removeEventListener("resize",this.queueResize),this.cancelResize(),this.cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null}}Ag.extension=oe.Application;ge.add(Ag);const up={loader:oe.LoadParser,resolver:oe.ResolveParser,cache:oe.CacheParser,detection:oe.DetectionParser};ge.handle(oe.Asset,r=>{const e=r.ref;Object.entries(up).filter(([t])=>!!e[t]).forEach(([t,i])=>ge.add(Object.assign(e[t],{extension:e[t].extension??i})))},r=>{const e=r.ref;Object.keys(up).filter(t=>!!e[t]).forEach(t=>ge.remove(e[t]))});class X_{constructor(e,t=!1){this._loader=e,this._assetList=[],this._isLoading=!1,this._maxConcurrent=1,this.verbose=t}add(e){e.forEach(t=>{this._assetList.push(t)}),this.verbose&&console.log("[BackgroundLoader] assets: ",this._assetList),this._isActive&&!this._isLoading&&this._next()}async _next(){if(this._assetList.length&&this._isActive){this._isLoading=!0;const e=[],t=Math.min(this._assetList.length,this._maxConcurrent);for(let i=0;i(Array.isArray(r)||(r=[r]),e?r.map(i=>typeof i=="string"||t?e(i):i):r),xu=(r,e)=>{const t=e.split("?")[1];return t&&(r+=`?${t}`),r};function Tg(r,e,t,i,s){const n=e[t];for(let a=0;a{const a=n.substring(1,n.length-1).split(",");s.push(a)}),Tg(r,s,0,t,i)}else i.push(r);return i}const Ml=r=>!Array.isArray(r);class Z_{constructor(){this._parsers=[],this._cache=new Map,this._cacheMap=new Map}reset(){this._cacheMap.clear(),this._cache.clear()}has(e){return this._cache.has(e)}get(e){const t=this._cache.get(e);return t||console.warn(`[Assets] Asset id ${e} was not found in the Cache`),t}set(e,t){const i=Mi(e);let s;for(let o=0;o{s[o]=t}));const n=Object.keys(s),a={cacheKeys:n,keys:i};if(i.forEach(o=>{this._cacheMap.set(o,a)}),n.forEach(o=>{this._cache.has(o)&&this._cache.get(o)!==t&&console.warn("[Cache] already has key:",o),this._cache.set(o,s[o])}),t instanceof te){const o=t;i.forEach(l=>{o.baseTexture!==te.EMPTY.baseTexture&&Pe.addToCache(o.baseTexture,l),te.addToCache(o,l)})}}remove(e){if(!this._cacheMap.has(e)){console.warn(`[Assets] Asset id ${e} was not found in the Cache`);return}const t=this._cacheMap.get(e);t.cacheKeys.forEach(i=>{this._cache.delete(i)}),t.keys.forEach(i=>{this._cacheMap.delete(i)})}get parsers(){return this._parsers}}const ks=new Z_;class J_{constructor(){this._parsers=[],this._parsersValidated=!1,this.parsers=new Proxy(this._parsers,{set:(e,t,i)=>(this._parsersValidated=!1,e[t]=i,!0)}),this.promiseCache={}}reset(){this._parsersValidated=!1,this.promiseCache={}}_getLoadPromiseAndParser(e,t){const i={promise:null,parser:null};return i.promise=(async()=>{let s=null,n=null;if(t.loadParser&&(n=this._parserHash[t.loadParser],n||console.warn(`[Assets] specified load parser "${t.loadParser}" not found while loading ${e}`)),!n){for(let a=0;a({alias:[c],src:c})),o=a.length,l=a.map(async c=>{const u=Pt.toAbsolute(c.src);if(!s[c.src])try{this.promiseCache[u]||(this.promiseCache[u]=this._getLoadPromiseAndParser(u,c)),s[c.src]=await this.promiseCache[u].promise,t&&t(++i/o)}catch(h){throw delete this.promiseCache[u],delete s[c.src],new Error(`[Loader.load] Failed to load ${u}. +${h}`)}});return await Promise.all(l),n?s[a[0].src]:s}async unload(e){const t=Mi(e,i=>({alias:[i],src:i})).map(async i=>{const s=Pt.toAbsolute(i.src),n=this.promiseCache[s];if(n){const a=await n.promise;delete this.promiseCache[s],n.parser?.unload?.(a,i,this)}});await Promise.all(t)}_validateParsers(){this._parsersValidated=!0,this._parserHash=this._parsers.filter(e=>e.name).reduce((e,t)=>(e[t.name]&&console.warn(`[Assets] loadParser name conflict "${t.name}"`),{...e,[t.name]:t}),{})}}var Ni=(r=>(r[r.Low=0]="Low",r[r.Normal=1]="Normal",r[r.High=2]="High",r))(Ni||{});const Q_=".json",eE="application/json",tE={extension:{type:oe.LoadParser,priority:Ni.Low},name:"loadJson",test(r){return Yn(r,eE)||cs(r,Q_)},async load(r){return await(await de.ADAPTER.fetch(r)).json()}};ge.add(tE);const iE=".txt",rE="text/plain",sE={name:"loadTxt",extension:{type:oe.LoadParser,priority:Ni.Low},test(r){return Yn(r,rE)||cs(r,iE)},async load(r){return await(await de.ADAPTER.fetch(r)).text()}};ge.add(sE);const nE=["normal","bold","100","200","300","400","500","600","700","800","900"],aE=[".ttf",".otf",".woff",".woff2"],oE=["font/ttf","font/otf","font/woff","font/woff2"],lE=/^(--|-?[A-Z_])[0-9A-Z_-]*$/i;function hE(r){const e=Pt.extname(r),t=Pt.basename(r,e).replace(/(-|_)/g," ").toLowerCase().split(" ").map(n=>n.charAt(0).toUpperCase()+n.slice(1));let i=t.length>0;for(const n of t)if(!n.match(lE)){i=!1;break}let s=t.join(" ");return i||(s=`"${s.replace(/[\\"]/g,"\\$&")}"`),s}const cE=/^[0-9A-Za-z%:/?#\[\]@!\$&'()\*\+,;=\-._~]*$/;function uE(r){return cE.test(r)?r:encodeURI(r)}const dE={extension:{type:oe.LoadParser,priority:Ni.Low},name:"loadWebFont",test(r){return Yn(r,oE)||cs(r,aE)},async load(r,e){const t=de.ADAPTER.getFontFaceSet();if(t){const i=[],s=e.data?.family??hE(r),n=e.data?.weights?.filter(o=>nE.includes(o))??["normal"],a=e.data??{};for(let o=0;ode.ADAPTER.getFontFaceSet().delete(e))}};ge.add(dE);const fE=`(function() { + "use strict"; + const WHITE_PNG = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII="; + async function checkImageBitmap() { + try { + if (typeof createImageBitmap != "function") + return !1; + const imageBlob = await (await fetch(WHITE_PNG)).blob(), imageBitmap = await createImageBitmap(imageBlob); + return imageBitmap.width === 1 && imageBitmap.height === 1; + } catch { + return !1; + } + } + checkImageBitmap().then((result) => { + self.postMessage(result); + }); +})(); +`;let Cn=null,_u=class{constructor(){Cn||(Cn=URL.createObjectURL(new Blob([fE],{type:"application/javascript"}))),this.worker=new Worker(Cn)}};_u.revokeObjectURL=function(){Cn&&(URL.revokeObjectURL(Cn),Cn=null)};const pE=`(function() { + "use strict"; + async function loadImageBitmap(url) { + const response = await fetch(url); + if (!response.ok) + throw new Error(\`[WorkerManager.loadImageBitmap] Failed to fetch \${url}: \${response.status} \${response.statusText}\`); + const imageBlob = await response.blob(); + return await createImageBitmap(imageBlob); + } + self.onmessage = async (event) => { + try { + const imageBitmap = await loadImageBitmap(event.data.data[0]); + self.postMessage({ + data: imageBitmap, + uuid: event.data.uuid, + id: event.data.id + }, [imageBitmap]); + } catch (e) { + self.postMessage({ + error: e, + uuid: event.data.uuid, + id: event.data.id + }); + } + }; +})(); +`;let Sn=null;class Cg{constructor(){Sn||(Sn=URL.createObjectURL(new Blob([pE],{type:"application/javascript"}))),this.worker=new Worker(Sn)}}Cg.revokeObjectURL=function(){Sn&&(URL.revokeObjectURL(Sn),Sn=null)};let dp=0,Zh;class mE{constructor(){this._initialized=!1,this._createdWorkers=0,this.workerPool=[],this.queue=[],this.resolveHash={}}isImageBitmapSupported(){return this._isImageBitmapSupported!==void 0?this._isImageBitmapSupported:(this._isImageBitmapSupported=new Promise(e=>{const{worker:t}=new _u;t.addEventListener("message",i=>{t.terminate(),_u.revokeObjectURL(),e(i.data)})}),this._isImageBitmapSupported)}loadImageBitmap(e){return this._run("loadImageBitmap",[e])}async _initWorkers(){this._initialized||(this._initialized=!0)}getWorker(){Zh===void 0&&(Zh=navigator.hardwareConcurrency||4);let e=this.workerPool.pop();return!e&&this._createdWorkers{this.complete(t.data),this.returnWorker(t.target),this.next()})),e}returnWorker(e){this.workerPool.push(e)}complete(e){e.error!==void 0?this.resolveHash[e.uuid].reject(e.error):this.resolveHash[e.uuid].resolve(e.data),this.resolveHash[e.uuid]=null}async _run(e,t){await this._initWorkers();const i=new Promise((s,n)=>{this.queue.push({id:e,arguments:t,resolve:s,reject:n})});return this.next(),i}next(){if(!this.queue.length)return;const e=this.getWorker();if(!e)return;const t=this.queue.pop(),i=t.id;this.resolveHash[dp]={resolve:t.resolve,reject:t.reject},e.postMessage({data:t.arguments,uuid:dp++,id:i})}}const fp=new mE;function Qa(r,e,t){r.resource.internal=!0;const i=new te(r),s=()=>{delete e.promiseCache[t],ks.has(t)&&ks.remove(t)};return i.baseTexture.once("destroyed",()=>{t in e.promiseCache&&(console.warn("[Assets] A BaseTexture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the BaseTexture."),s())}),i.once("destroyed",()=>{r.destroyed||(console.warn("[Assets] A Texture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the Texture."),s())}),i}const gE=[".jpeg",".jpg",".png",".webp",".avif"],bE=["image/jpeg","image/png","image/webp","image/avif"];async function yE(r){const e=await de.ADAPTER.fetch(r);if(!e.ok)throw new Error(`[loadImageBitmap] Failed to fetch ${r}: ${e.status} ${e.statusText}`);const t=await e.blob();return await createImageBitmap(t)}const Jl={name:"loadTextures",extension:{type:oe.LoadParser,priority:Ni.High},config:{preferWorkers:!0,preferCreateImageBitmap:!0,crossOrigin:"anonymous"},test(r){return Yn(r,bE)||cs(r,gE)},async load(r,e,t){const i=globalThis.createImageBitmap&&this.config.preferCreateImageBitmap;let s;i?this.config.preferWorkers&&await fp.isImageBitmapSupported()?s=await fp.loadImageBitmap(r):s=await yE(r):s=await new Promise((o,l)=>{const c=new Image;c.crossOrigin=this.config.crossOrigin,c.src=r,c.complete?o(c):(c.onload=()=>o(c),c.onerror=u=>l(u))});const n={...e.data};n.resolution??(n.resolution=Dr(r)),i&&n.resourceOptions?.ownsImageBitmap===void 0&&(n.resourceOptions={...n.resourceOptions},n.resourceOptions.ownsImageBitmap=!0);const a=new Pe(s,n);return a.resource.src=r,Qa(a,t,r)},unload(r){r.destroy(!0)}};ge.add(Jl);const vE=".svg",wE="image/svg+xml",xE={extension:{type:oe.LoadParser,priority:Ni.High},name:"loadSVG",test(r){return Yn(r,wE)||cs(r,vE)},async testParse(r){return cu.test(r)},async parse(r,e,t){const i=new cu(r,e?.data?.resourceOptions);await i.load();const s=new Pe(i,{resolution:Dr(r),...e?.data});return s.resource.src=e.src,Qa(s,t,e.src)},async load(r,e){return(await de.ADAPTER.fetch(r)).text()},unload:Jl.unload};ge.add(xE);const _E=[".mp4",".m4v",".webm",".ogv"],EE=["video/mp4","video/webm","video/ogg"],AE={name:"loadVideo",extension:{type:oe.LoadParser,priority:Ni.High},config:{defaultAutoPlay:!0,defaultUpdateFPS:0,defaultLoop:!1,defaultMuted:!1,defaultPlaysinline:!0},test(r){return Yn(r,EE)||cs(r,_E)},async load(r,e,t){let i;const s=await(await de.ADAPTER.fetch(r)).blob(),n=URL.createObjectURL(s);try{const a={autoPlay:this.config.defaultAutoPlay,updateFPS:this.config.defaultUpdateFPS,loop:this.config.defaultLoop,muted:this.config.defaultMuted,playsinline:this.config.defaultPlaysinline,...e?.data?.resourceOptions,autoLoad:!0},o=new vg(n,a);await o.load();const l=new Pe(o,{alphaMode:await Dw(),resolution:Dr(r),...e?.data});l.resource.src=r,i=Qa(l,t,r),i.baseTexture.once("destroyed",()=>{URL.revokeObjectURL(n)})}catch(a){throw URL.revokeObjectURL(n),a}return i},unload(r){r.destroy(!0)}};ge.add(AE);class TE{constructor(){this._defaultBundleIdentifierOptions={connector:"-",createBundleAssetId:(e,t)=>`${e}${this._bundleIdConnector}${t}`,extractAssetIdFromBundle:(e,t)=>t.replace(`${e}${this._bundleIdConnector}`,"")},this._bundleIdConnector=this._defaultBundleIdentifierOptions.connector,this._createBundleAssetId=this._defaultBundleIdentifierOptions.createBundleAssetId,this._extractAssetIdFromBundle=this._defaultBundleIdentifierOptions.extractAssetIdFromBundle,this._assetMap={},this._preferredOrder=[],this._parsers=[],this._resolverHash={},this._bundles={}}setBundleIdentifier(e){if(this._bundleIdConnector=e.connector??this._bundleIdConnector,this._createBundleAssetId=e.createBundleAssetId??this._createBundleAssetId,this._extractAssetIdFromBundle=e.extractAssetIdFromBundle??this._extractAssetIdFromBundle,this._extractAssetIdFromBundle("foo",this._createBundleAssetId("foo","bar"))!=="bar")throw new Error("[Resolver] GenerateBundleAssetId are not working correctly")}prefer(...e){e.forEach(t=>{this._preferredOrder.push(t),t.priority||(t.priority=Object.keys(t.params))}),this._resolverHash={}}set basePath(e){this._basePath=e}get basePath(){return this._basePath}set rootPath(e){this._rootPath=e}get rootPath(){return this._rootPath}get parsers(){return this._parsers}reset(){this.setBundleIdentifier(this._defaultBundleIdentifierOptions),this._assetMap={},this._preferredOrder=[],this._resolverHash={},this._rootPath=null,this._basePath=null,this._manifest=null,this._bundles={},this._defaultSearchParams=null}setDefaultSearchParams(e){if(typeof e=="string")this._defaultSearchParams=e;else{const t=e;this._defaultSearchParams=Object.keys(t).map(i=>`${encodeURIComponent(i)}=${encodeURIComponent(t[i])}`).join("&")}}getAlias(e){const{alias:t,name:i,src:s,srcs:n}=e;return Mi(t||i||s||n,a=>typeof a=="string"?a:Array.isArray(a)?a.map(o=>o?.src??o?.srcs??o):a?.src||a?.srcs?a.src??a.srcs:a,!0)}addManifest(e){this._manifest&&console.warn("[Resolver] Manifest already exists, this will be overwritten"),this._manifest=e,e.bundles.forEach(t=>{this.addBundle(t.name,t.assets)})}addBundle(e,t){const i=[];Array.isArray(t)?t.forEach(s=>{const n=s.src??s.srcs,a=s.alias??s.name;let o;if(typeof a=="string"){const l=this._createBundleAssetId(e,a);i.push(l),o=[a,l]}else{const l=a.map(c=>this._createBundleAssetId(e,c));i.push(...l),o=[...a,...l]}this.add({...s,alias:o,src:n})}):Object.keys(t).forEach(s=>{const n=[s,this._createBundleAssetId(e,s)];if(typeof t[s]=="string")this.add({alias:n,src:t[s]});else if(Array.isArray(t[s]))this.add({alias:n,src:t[s]});else{const a=t[s],o=a.src??a.srcs;this.add({...a,alias:n,src:Array.isArray(o)?o:[o]})}i.push(...n)}),this._bundles[e]=i}add(e,t,i,s,n){const a=[];typeof e=="string"||Array.isArray(e)&&typeof e[0]=="string"?(He("7.2.0",`Assets.add now uses an object instead of individual parameters. +Please use Assets.add({ alias, src, data, format, loadParser }) instead.`),a.push({alias:e,src:t,data:i,format:s,loadParser:n})):Array.isArray(e)?a.push(...e):a.push(e);let o;o=l=>{this.hasKey(l)&&console.warn(`[Resolver] already has key: ${l} overwriting`)},Mi(a).forEach(l=>{const{src:c,srcs:u}=l;let{data:h,format:d,loadParser:f}=l;const p=Mi(c||u).map(b=>typeof b=="string"?K_(b):Array.isArray(b)?b:[b]),m=this.getAlias(l);Array.isArray(m)?m.forEach(o):o(m);const g=[];p.forEach(b=>{b.forEach(w=>{let v={};if(typeof w!="object"){v.src=w;for(let y=0;y{this._assetMap[b]=g})})}resolveBundle(e){const t=Ml(e);e=Mi(e);const i={};return e.forEach(s=>{const n=this._bundles[s];if(n){const a=this.resolve(n),o={};for(const l in a){const c=a[l];o[this._extractAssetIdFromBundle(s,l)]=c}i[s]=o}}),t?i[e[0]]:i}resolveUrl(e){const t=this.resolve(e);if(typeof e!="string"){const i={};for(const s in t)i[s]=t[s].src;return i}return t.src}resolve(e){const t=Ml(e);e=Mi(e);const i={};return e.forEach(s=>{if(!this._resolverHash[s])if(this._assetMap[s]){let n=this._assetMap[s];const a=n[0],o=this._getPreferredOrder(n);o?.priority.forEach(l=>{o.params[l].forEach(c=>{const u=n.filter(h=>h[l]?h[l]===c:!1);u.length&&(n=u)})}),this._resolverHash[s]=n[0]??a}else this._resolverHash[s]=this.buildResolvedAsset({alias:[s],src:s},{});i[s]=this._resolverHash[s]}),t?i[e[0]]:i}hasKey(e){return!!this._assetMap[e]}hasBundle(e){return!!this._bundles[e]}_getPreferredOrder(e){for(let t=0;tn.params.format.includes(i.format));if(s)return s}return this._preferredOrder[0]}_appendDefaultSearchParams(e){if(!this._defaultSearchParams)return e;const t=/\?/.test(e)?"&":"?";return`${e}${t}${this._defaultSearchParams}`}buildResolvedAsset(e,t){const{aliases:i,data:s,loadParser:n,format:a}=t;return(this._basePath||this._rootPath)&&(e.src=Pt.toAbsolute(e.src,this._basePath,this._rootPath)),e.alias=i??e.alias??[e.src],e.src=this._appendDefaultSearchParams(e.src),e.data={...s||{},...e.data},e.loadParser=n??e.loadParser,e.format=a??e.format??Pt.extname(e.src).slice(1),e.srcs=e.src,e.name=e.alias,e}}class CE{constructor(){this._detections=[],this._initialized=!1,this.resolver=new TE,this.loader=new J_,this.cache=ks,this._backgroundLoader=new X_(this.loader),this._backgroundLoader.active=!0,this.reset()}async init(e={}){if(this._initialized){console.warn("[Assets]AssetManager already initialized, did you load before calling this Assets.init()?");return}if(this._initialized=!0,e.defaultSearchParams&&this.resolver.setDefaultSearchParams(e.defaultSearchParams),e.basePath&&(this.resolver.basePath=e.basePath),e.bundleIdentifier&&this.resolver.setBundleIdentifier(e.bundleIdentifier),e.manifest){let n=e.manifest;typeof n=="string"&&(n=await this.load(n)),this.resolver.addManifest(n)}const t=e.texturePreference?.resolution??1,i=typeof t=="number"?[t]:t,s=await this._detectFormats({preferredFormats:e.texturePreference?.format,skipDetections:e.skipDetections,detections:this._detections});this.resolver.prefer({params:{format:s,resolution:i}}),e.preferences&&this.setPreferences(e.preferences)}add(e,t,i,s,n){this.resolver.add(e,t,i,s,n)}async load(e,t){this._initialized||await this.init();const i=Ml(e),s=Mi(e).map(o=>{if(typeof o!="string"){const l=this.resolver.getAlias(o);return l.some(c=>!this.resolver.hasKey(c))&&this.add(o),Array.isArray(l)?l[0]:l}return this.resolver.hasKey(o)||this.add({alias:o,src:o}),o}),n=this.resolver.resolve(s),a=await this._mapLoadToResolve(n,t);return i?a[s[0]]:a}addBundle(e,t){this.resolver.addBundle(e,t)}async loadBundle(e,t){this._initialized||await this.init();let i=!1;typeof e=="string"&&(i=!0,e=[e]);const s=this.resolver.resolveBundle(e),n={},a=Object.keys(s);let o=0,l=0;const c=()=>{t?.(++o/l)},u=a.map(h=>{const d=s[h];return l+=Object.keys(d).length,this._mapLoadToResolve(d,c).then(f=>{n[h]=f})});return await Promise.all(u),i?n[e[0]]:n}async backgroundLoad(e){this._initialized||await this.init(),typeof e=="string"&&(e=[e]);const t=this.resolver.resolve(e);this._backgroundLoader.add(Object.values(t))}async backgroundLoadBundle(e){this._initialized||await this.init(),typeof e=="string"&&(e=[e]);const t=this.resolver.resolveBundle(e);Object.values(t).forEach(i=>{this._backgroundLoader.add(Object.values(i))})}reset(){this.resolver.reset(),this.loader.reset(),this.cache.reset(),this._initialized=!1}get(e){if(typeof e=="string")return ks.get(e);const t={};for(let i=0;i{const c=n[o.src],u=[o.src];o.alias&&u.push(...o.alias),a[s[l]]=c,ks.set(u,c)}),a}async unload(e){this._initialized||await this.init();const t=Mi(e).map(s=>typeof s!="string"?s.src:s),i=this.resolver.resolve(t);await this._unloadFromResolved(i)}async unloadBundle(e){this._initialized||await this.init(),e=Mi(e);const t=this.resolver.resolveBundle(e),i=Object.keys(t).map(s=>this._unloadFromResolved(t[s]));await Promise.all(i)}async _unloadFromResolved(e){const t=Object.values(e);t.forEach(i=>{ks.remove(i.src)}),await this.loader.unload(t)}async _detectFormats(e){let t=[];e.preferredFormats&&(t=Array.isArray(e.preferredFormats)?e.preferredFormats:[e.preferredFormats]);for(const i of e.detections)e.skipDetections||await i.test()?t=await i.add(t):e.skipDetections||(t=await i.remove(t));return t=t.filter((i,s)=>t.indexOf(i)===s),t}get detections(){return this._detections}get preferWorkers(){return Jl.config.preferWorkers}set preferWorkers(e){He("7.2.0","Assets.prefersWorkers is deprecated, use Assets.setPreferences({ preferWorkers: true }) instead."),this.setPreferences({preferWorkers:e})}setPreferences(e){this.loader.parsers.forEach(t=>{t.config&&Object.keys(t.config).filter(i=>i in e).forEach(i=>{t.config[i]=e[i]})})}}const bn=new CE;ge.handleByList(oe.LoadParser,bn.loader.parsers).handleByList(oe.ResolveParser,bn.resolver.parsers).handleByList(oe.CacheParser,bn.cache.parsers).handleByList(oe.DetectionParser,bn.detections);const SE={extension:oe.CacheParser,test:r=>Array.isArray(r)&&r.every(e=>e instanceof te),getCacheableAssets:(r,e)=>{const t={};return r.forEach(i=>{e.forEach((s,n)=>{t[i+(n===0?"":n+1)]=s})}),t}};ge.add(SE);async function Sg(r){if("Image"in globalThis)return new Promise(e=>{const t=new Image;t.onload=()=>{e(!0)},t.onerror=()=>{e(!1)},t.src=r});if("createImageBitmap"in globalThis&&"fetch"in globalThis){try{const e=await(await fetch(r)).blob();await createImageBitmap(e)}catch{return!1}return!0}return!1}const ME={extension:{type:oe.DetectionParser,priority:1},test:async()=>Sg("data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A="),add:async r=>[...r,"avif"],remove:async r=>r.filter(e=>e!=="avif")};ge.add(ME);const kE={extension:{type:oe.DetectionParser,priority:0},test:async()=>Sg("data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="),add:async r=>[...r,"webp"],remove:async r=>r.filter(e=>e!=="webp")};ge.add(kE);const pp=["png","jpg","jpeg"],DE={extension:{type:oe.DetectionParser,priority:-1},test:()=>Promise.resolve(!0),add:async r=>[...r,...pp],remove:async r=>r.filter(e=>!pp.includes(e))};ge.add(DE);const IE="WorkerGlobalScope"in globalThis&&globalThis instanceof globalThis.WorkerGlobalScope;function od(r){return IE?!1:document.createElement("video").canPlayType(r)!==""}const PE={extension:{type:oe.DetectionParser,priority:0},test:async()=>od("video/webm"),add:async r=>[...r,"webm"],remove:async r=>r.filter(e=>e!=="webm")};ge.add(PE);const BE={extension:{type:oe.DetectionParser,priority:0},test:async()=>od("video/mp4"),add:async r=>[...r,"mp4","m4v"],remove:async r=>r.filter(e=>e!=="mp4"&&e!=="m4v")};ge.add(BE);const RE={extension:{type:oe.DetectionParser,priority:0},test:async()=>od("video/ogg"),add:async r=>[...r,"ogv"],remove:async r=>r.filter(e=>e!=="ogv")};ge.add(RE);const FE={extension:oe.ResolveParser,test:Jl.test,parse:r=>({resolution:parseFloat(de.RETINA_PREFIX.exec(r)?.[1]??"1"),format:Pt.extname(r).slice(1),src:r})};ge.add(FE);var Rt=(r=>(r[r.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",r[r.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",r[r.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",r[r.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",r[r.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=35917]="COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT",r[r.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT=35918]="COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT",r[r.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=35919]="COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT",r[r.COMPRESSED_SRGB_S3TC_DXT1_EXT=35916]="COMPRESSED_SRGB_S3TC_DXT1_EXT",r[r.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",r[r.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",r[r.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",r[r.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",r[r.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",r[r.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",r[r.COMPRESSED_SRGB8_ETC2=37493]="COMPRESSED_SRGB8_ETC2",r[r.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC",r[r.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",r[r.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",r[r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG=35840]="COMPRESSED_RGB_PVRTC_4BPPV1_IMG",r[r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG=35842]="COMPRESSED_RGBA_PVRTC_4BPPV1_IMG",r[r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG=35841]="COMPRESSED_RGB_PVRTC_2BPPV1_IMG",r[r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG=35843]="COMPRESSED_RGBA_PVRTC_2BPPV1_IMG",r[r.COMPRESSED_RGB_ETC1_WEBGL=36196]="COMPRESSED_RGB_ETC1_WEBGL",r[r.COMPRESSED_RGB_ATC_WEBGL=35986]="COMPRESSED_RGB_ATC_WEBGL",r[r.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL=35987]="COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL",r[r.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL=34798]="COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL",r[r.COMPRESSED_RGBA_ASTC_4x4_KHR=37808]="COMPRESSED_RGBA_ASTC_4x4_KHR",r[r.COMPRESSED_RGBA_BPTC_UNORM_EXT=36492]="COMPRESSED_RGBA_BPTC_UNORM_EXT",r[r.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT=36493]="COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT",r[r.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT=36494]="COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT",r[r.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT=36495]="COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT",r))(Rt||{});const kl={33776:.5,33777:.5,33778:1,33779:1,35916:.5,35917:.5,35918:1,35919:1,37488:.5,37489:.5,37490:1,37491:1,37492:.5,37496:1,37493:.5,37497:1,37494:.5,37495:.5,35840:.5,35842:.5,35841:.25,35843:.25,36196:.5,35986:.5,35987:1,34798:1,37808:1,36492:1,36493:1,36494:1,36495:1};let Wi,hn;function mp(){hn={bptc:Wi.getExtension("EXT_texture_compression_bptc"),astc:Wi.getExtension("WEBGL_compressed_texture_astc"),etc:Wi.getExtension("WEBGL_compressed_texture_etc"),s3tc:Wi.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:Wi.getExtension("WEBGL_compressed_texture_s3tc_srgb"),pvrtc:Wi.getExtension("WEBGL_compressed_texture_pvrtc")||Wi.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),etc1:Wi.getExtension("WEBGL_compressed_texture_etc1"),atc:Wi.getExtension("WEBGL_compressed_texture_atc")}}const LE={extension:{type:oe.DetectionParser,priority:2},test:async()=>{const r=de.ADAPTER.createCanvas().getContext("webgl");return r?(Wi=r,!0):(console.warn("WebGL not available for compressed textures."),!1)},add:async r=>{hn||mp();const e=[];for(const t in hn)hn[t]&&e.push(t);return[...e,...r]},remove:async r=>(hn||mp(),r.filter(e=>!(e in hn)))};ge.add(LE);class OE extends ql{constructor(e,t={width:1,height:1,autoLoad:!0}){let i,s;typeof e=="string"?(i=e,s=new Uint8Array):(i=null,s=e),super(s,t),this.origin=i,this.buffer=s?new Zc(s):null,this._load=null,this.loaded=!1,this.origin!==null&&t.autoLoad!==!1&&this.load(),this.origin===null&&this.buffer&&(this._load=Promise.resolve(this),this.loaded=!0,this.onBlobLoaded(this.buffer.rawBinaryData))}onBlobLoaded(e){}load(){return this._load?this._load:(this._load=fetch(this.origin).then(e=>e.blob()).then(e=>e.arrayBuffer()).then(e=>(this.data=new Uint32Array(e),this.buffer=new Zc(e),this.loaded=!0,this.onBlobLoaded(e),this.update(),this)),this._load)}}class Os extends OE{constructor(e,t){super(e,t),this.format=t.format,this.levels=t.levels||1,this._width=t.width,this._height=t.height,this._extension=Os._formatToExtension(this.format),(t.levelBuffers||this.buffer)&&(this._levelBuffers=t.levelBuffers||Os._createLevelBuffers(e instanceof Uint8Array?e:this.buffer.uint8View,this.format,this.levels,4,4,this.width,this.height))}upload(e,t,i){const s=e.gl;if(!e.context.extensions[this._extension])throw new Error(`${this._extension} textures are not supported on the current machine`);if(!this._levelBuffers)return!1;s.pixelStorei(s.UNPACK_ALIGNMENT,4);for(let n=0,a=this.levels;n=33776&&e<=33779)return"s3tc";if(e>=35916&&e<=35919)return"s3tc_sRGB";if(e>=37488&&e<=37497)return"etc";if(e>=35840&&e<=35843)return"pvrtc";if(e===36196)return"etc1";if(e===35986||e===35987||e===34798)return"atc";if(e>=36492&&e<=36495)return"bptc";if(e===37808)return"astc";throw new Error(`Invalid (compressed) texture format given: ${e}`)}static _createLevelBuffers(e,t,i,s,n,a,o){const l=new Array(i);let c=e.byteOffset,u=a,h=o,d=u+s-1&~(s-1),f=h+n-1&~(n-1),p=d*f*kl[t];for(let m=0;m1?u:d,levelHeight:i>1?h:f,levelBuffer:new Uint8Array(e.buffer,c,p)},c+=p,u=u>>1||1,h=h>>1||1,d=u+s-1&~(s-1),f=h+n-1&~(n-1),p=d*f*kl[t];return l}}const Jh=4,Mo=124,NE=32,gp=20,UE=542327876,ko={SIZE:1,FLAGS:2,HEIGHT:3,WIDTH:4,MIPMAP_COUNT:7,PIXEL_FORMAT:19},HE={SIZE:0,FLAGS:1,FOURCC:2,RGB_BITCOUNT:3,R_BIT_MASK:4,G_BIT_MASK:5,B_BIT_MASK:6,A_BIT_MASK:7},Do={DXGI_FORMAT:0,RESOURCE_DIMENSION:1,MISC_FLAG:2,ARRAY_SIZE:3,MISC_FLAGS2:4},GE=1,VE=2,zE=4,WE=64,$E=512,jE=131072,qE=827611204,YE=861165636,XE=894720068,KE=808540228,ZE=4,JE={[qE]:Rt.COMPRESSED_RGBA_S3TC_DXT1_EXT,[YE]:Rt.COMPRESSED_RGBA_S3TC_DXT3_EXT,[XE]:Rt.COMPRESSED_RGBA_S3TC_DXT5_EXT},QE={70:Rt.COMPRESSED_RGBA_S3TC_DXT1_EXT,71:Rt.COMPRESSED_RGBA_S3TC_DXT1_EXT,73:Rt.COMPRESSED_RGBA_S3TC_DXT3_EXT,74:Rt.COMPRESSED_RGBA_S3TC_DXT3_EXT,76:Rt.COMPRESSED_RGBA_S3TC_DXT5_EXT,77:Rt.COMPRESSED_RGBA_S3TC_DXT5_EXT,72:Rt.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,75:Rt.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,78:Rt.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT,96:Rt.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT,95:Rt.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT,98:Rt.COMPRESSED_RGBA_BPTC_UNORM_EXT,99:Rt.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT};function eA(r){const e=new Uint32Array(r);if(e[0]!==UE)throw new Error("Invalid DDS file magic word");const t=new Uint32Array(r,0,Mo/Uint32Array.BYTES_PER_ELEMENT),i=t[ko.HEIGHT],s=t[ko.WIDTH],n=t[ko.MIPMAP_COUNT],a=new Uint32Array(r,ko.PIXEL_FORMAT*Uint32Array.BYTES_PER_ELEMENT,NE/Uint32Array.BYTES_PER_ELEMENT),o=a[GE];if(o&zE){const l=a[HE.FOURCC];if(l!==KE){const w=JE[l],v=Jh+Mo,y=new Uint8Array(r,v);return[new Os(y,{format:w,width:s,height:i,levels:n})]}const c=Jh+Mo,u=new Uint32Array(e.buffer,c,gp/Uint32Array.BYTES_PER_ELEMENT),h=u[Do.DXGI_FORMAT],d=u[Do.RESOURCE_DIMENSION],f=u[Do.MISC_FLAG],p=u[Do.ARRAY_SIZE],m=QE[h];if(m===void 0)throw new Error(`DDSParser cannot parse texture data with DXGI format ${h}`);if(f===ZE)throw new Error("DDSParser does not support cubemap textures");if(d===6)throw new Error("DDSParser does not supported 3D texture data");const g=new Array,b=Jh+Mo+gp;if(p===1)g.push(new Uint8Array(r,b));else{const w=kl[m];let v=0,y=s,E=i;for(let k=0;k>>1,E=E>>>1}let C=b;for(let k=0;knew Os(w,{format:m,width:s,height:i,levels:n}))}throw o&WE?new Error("DDSParser does not support uncompressed texture data."):o&$E?new Error("DDSParser does not supported YUV uncompressed texture data."):o&jE?new Error("DDSParser does not support single-channel (lumninance) texture data!"):o&VE?new Error("DDSParser does not support single-channel (alpha) texture data!"):new Error("DDSParser failed to load a texture file due to an unknown reason!")}const bp=[171,75,84,88,32,49,49,187,13,10,26,10],tA=67305985,Ai={FILE_IDENTIFIER:0,ENDIANNESS:12,GL_TYPE:16,GL_TYPE_SIZE:20,GL_FORMAT:24,GL_INTERNAL_FORMAT:28,GL_BASE_INTERNAL_FORMAT:32,PIXEL_WIDTH:36,PIXEL_HEIGHT:40,PIXEL_DEPTH:44,NUMBER_OF_ARRAY_ELEMENTS:48,NUMBER_OF_FACES:52,NUMBER_OF_MIPMAP_LEVELS:56,BYTES_OF_KEY_VALUE_DATA:60},Eu=64,yp={[Ae.UNSIGNED_BYTE]:1,[Ae.UNSIGNED_SHORT]:2,[Ae.INT]:4,[Ae.UNSIGNED_INT]:4,[Ae.FLOAT]:4,[Ae.HALF_FLOAT]:8},iA={[se.RGBA]:4,[se.RGB]:3,[se.RG]:2,[se.RED]:1,[se.LUMINANCE]:1,[se.LUMINANCE_ALPHA]:2,[se.ALPHA]:1},rA={[Ae.UNSIGNED_SHORT_4_4_4_4]:2,[Ae.UNSIGNED_SHORT_5_5_5_1]:2,[Ae.UNSIGNED_SHORT_5_6_5]:2};function sA(r,e,t=!1){const i=new DataView(e);if(!nA(r,i))return null;const s=i.getUint32(Ai.ENDIANNESS,!0)===tA,n=i.getUint32(Ai.GL_TYPE,s),a=i.getUint32(Ai.GL_FORMAT,s),o=i.getUint32(Ai.GL_INTERNAL_FORMAT,s),l=i.getUint32(Ai.PIXEL_WIDTH,s),c=i.getUint32(Ai.PIXEL_HEIGHT,s)||1,u=i.getUint32(Ai.PIXEL_DEPTH,s)||1,h=i.getUint32(Ai.NUMBER_OF_ARRAY_ELEMENTS,s)||1,d=i.getUint32(Ai.NUMBER_OF_FACES,s),f=i.getUint32(Ai.NUMBER_OF_MIPMAP_LEVELS,s),p=i.getUint32(Ai.BYTES_OF_KEY_VALUE_DATA,s);if(c===0||u!==1)throw new Error("Only 2D textures are supported");if(d!==1)throw new Error("CubeTextures are not supported by KTXLoader yet!");if(h!==1)throw new Error("WebGL does not support array textures");const m=4,g=4,b=l+3&-4,w=c+3&-4,v=new Array(h);let y=l*c;n===0&&(y=b*w);let E;if(n!==0?yp[n]?E=yp[n]*iA[a]:E=rA[n]:E=kl[o],E===void 0)throw new Error("Unable to resolve the pixel format stored in the *.ktx file!");const C=t?oA(i,p,s):null;let k=y*E,B=l,M=c,U=b,V=w,T=Eu+p;for(let S=0;S1||n!==0?B:U,levelHeight:f>1||n!==0?M:V,levelBuffer:new Uint8Array(e,R,k)},R+=k}T+=_+4,T=T%4!==0?T+4-T%4:T,B=B>>1||1,M=M>>1||1,U=B+m-1&~(m-1),V=M+g-1&~(g-1),k=U*V*E}return n!==0?{uncompressed:v.map(S=>{let _=S[0].levelBuffer,R=!1;return n===Ae.FLOAT?_=new Float32Array(S[0].levelBuffer.buffer,S[0].levelBuffer.byteOffset,S[0].levelBuffer.byteLength/4):n===Ae.UNSIGNED_INT?(R=!0,_=new Uint32Array(S[0].levelBuffer.buffer,S[0].levelBuffer.byteOffset,S[0].levelBuffer.byteLength/4)):n===Ae.INT&&(R=!0,_=new Int32Array(S[0].levelBuffer.buffer,S[0].levelBuffer.byteOffset,S[0].levelBuffer.byteLength/4)),{resource:new ql(_,{width:S[0].levelWidth,height:S[0].levelHeight}),type:n,format:R?aA(a):a}}),kvData:C}:{compressed:v.map(S=>new Os(null,{format:o,width:l,height:c,levels:f,levelBuffers:S})),kvData:C}}function nA(r,e){for(let t=0;te-s){console.error("KTXLoader: keyAndValueByteSize out of bounds");break}let l=0;for(;l{const a=new Pe(n,{mipmap:ur.OFF,alphaMode:Xt.NO_PREMULTIPLIED_ALPHA,resolution:Dr(r),...e.data});return Qa(a,t,r)});return s.length===1?s[0]:s},unload(r){Array.isArray(r)?r.forEach(e=>e.destroy(!0)):r.destroy(!0)}};ge.add(lA);const hA={extension:{type:oe.LoadParser,priority:Ni.High},name:"loadKTX",test(r){return cs(r,".ktx")},async load(r,e,t){const i=await(await de.ADAPTER.fetch(r)).arrayBuffer(),{compressed:s,uncompressed:n,kvData:a}=sA(r,i),o=s??n,l={mipmap:ur.OFF,alphaMode:Xt.NO_PREMULTIPLIED_ALPHA,resolution:Dr(r),...e.data},c=o.map(u=>{o===n&&Object.assign(l,{type:u.type,format:u.format});const h=u.resource??u,d=new Pe(h,l);return d.ktxKeyValueData=a,Qa(d,t,r)});return c.length===1?c[0]:c},unload(r){Array.isArray(r)?r.forEach(e=>e.destroy(!0)):r.destroy(!0)}};ge.add(hA);const cA=["s3tc","s3tc_sRGB","etc","etc1","pvrtc","atc","astc","bptc"],uA={extension:oe.ResolveParser,test:r=>{const e=Pt.extname(r).slice(1);return["basis","ktx","dds"].includes(e)},parse:r=>{const e=r.split("."),t=e.pop();if(["ktx","dds"].includes(t)){const i=e.pop();if(cA.includes(i))return{resolution:parseFloat(de.RETINA_PREFIX.exec(r)?.[1]??"1"),format:i,src:r}}return{resolution:parseFloat(de.RETINA_PREFIX.exec(r)?.[1]??"1"),format:t,src:r}}};ge.add(uA);const Io=new ke,dA=4,Mg=class fa{constructor(e){this.renderer=e,this._rendererPremultipliedAlpha=!1}contextChange(){const e=this.renderer?.gl.getContextAttributes();this._rendererPremultipliedAlpha=!!(e&&e.alpha&&e.premultipliedAlpha)}async image(e,t,i,s){const n=new Image;return n.src=await this.base64(e,t,i,s),n}async base64(e,t,i,s){const n=this.canvas(e,s);if(n.toBlob!==void 0)return new Promise((a,o)=>{n.toBlob(l=>{if(!l){o(new Error("ICanvas.toBlob failed!"));return}const c=new FileReader;c.onload=()=>a(c.result),c.onerror=o,c.readAsDataURL(l)},t,i)});if(n.toDataURL!==void 0)return n.toDataURL(t,i);if(n.convertToBlob!==void 0){const a=await n.convertToBlob({type:t,quality:i});return new Promise((o,l)=>{const c=new FileReader;c.onload=()=>o(c.result),c.onerror=l,c.readAsDataURL(a)})}throw new Error("Extract.base64() requires ICanvas.toDataURL, ICanvas.toBlob, or ICanvas.convertToBlob to be implemented")}canvas(e,t){const{pixels:i,width:s,height:n,flipY:a,premultipliedAlpha:o}=this._rawPixels(e,t);a&&fa._flipY(i,s,n),o&&fa._unpremultiplyAlpha(i);const l=new jw(s,n,1),c=new ImageData(new Uint8ClampedArray(i.buffer),s,n);return l.context.putImageData(c,0,0),l.canvas}pixels(e,t){const{pixels:i,width:s,height:n,flipY:a,premultipliedAlpha:o}=this._rawPixels(e,t);return a&&fa._flipY(i,s,n),o&&fa._unpremultiplyAlpha(i),i}_rawPixels(e,t){const i=this.renderer;if(!i)throw new Error("The Extract has already been destroyed");let s,n=!1,a=!1,o,l=!1;e&&(e instanceof Gt?o=e:(o=i.generateTexture(e,{region:t,resolution:i.resolution,multisample:i.multisample}),l=!0,t&&(Io.width=t.width,Io.height=t.height,t=Io)));const c=i.gl;if(o){if(s=o.baseTexture.resolution,t=t??o.frame,n=!1,a=o.baseTexture.alphaMode>0&&o.baseTexture.format===se.RGBA,!l){i.renderTexture.bind(o);const f=o.framebuffer.glFramebuffers[i.CONTEXT_UID];f.blitFramebuffer&&i.framebuffer.bind(f.blitFramebuffer)}}else s=i.resolution,t||(t=Io,t.width=i.width/s,t.height=i.height/s),n=!0,a=this._rendererPremultipliedAlpha,i.renderTexture.bind();const u=Math.max(Math.round(t.width*s),1),h=Math.max(Math.round(t.height*s),1),d=new Uint8Array(dA*u*h);return c.readPixels(Math.round(t.x*s),Math.round(t.y*s),u,h,c.RGBA,c.UNSIGNED_BYTE,d),l&&o?.destroy(!0),{pixels:d,width:u,height:h,flipY:n,premultipliedAlpha:a}}destroy(){this.renderer=null}static _flipY(e,t,i){const s=t<<2,n=i>>1,a=new Uint8Array(s);for(let o=0;o=0&&o>=0&&s>=0&&n>=0)){e.length=0;return}const l=Math.ceil(2.3*Math.sqrt(a+o)),c=l*8+(s?4:0)+(n?4:0);if(e.length=c,c===0)return;if(l===0){e.length=8,e[0]=e[6]=t+s,e[1]=e[3]=i+n,e[2]=e[4]=t-s,e[5]=e[7]=i-n;return}let u=0,h=l*4+(s?2:0)+2,d=h,f=c;{const p=s+a,m=n,g=t+p,b=t-p,w=i+m;if(e[u++]=g,e[u++]=w,e[--h]=w,e[--h]=b,n){const v=i-m;e[d++]=b,e[d++]=v,e[--f]=v,e[--f]=g}}for(let p=1;p0||e&&i<=0){const s=t/2;for(let n=s+s%2;n=6){vp(t,!1);const a=[];for(let c=0;c=0&&n>=0&&a.push(t,i,t+s,i,t+s,i+n,t,i+n)},triangulate(r,e){const t=r.points,i=e.points;if(t.length===0)return;const s=i.length/2;i.push(t[0],t[1],t[2],t[3],t[6],t[7],t[4],t[5]),e.indices.push(s,s+1,s+2,s+1,s+2,s+3)}},mA={build(r){Dl.build(r)},triangulate(r,e){Dl.triangulate(r,e)}};var ui=(r=>(r.MITER="miter",r.BEVEL="bevel",r.ROUND="round",r))(ui||{}),is=(r=>(r.BUTT="butt",r.ROUND="round",r.SQUARE="square",r))(is||{});const Pn={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount(r,e=20){if(!this.adaptive||!r||isNaN(r))return e;let t=Math.ceil(r/this.maxLength);return tthis.maxSegments&&(t=this.maxSegments),t}};class wp{static curveTo(e,t,i,s,n,a){const o=a[a.length-2],l=a[a.length-1]-t,c=o-e,u=s-t,h=i-e,d=Math.abs(l*h-c*u);if(d<1e-8||n===0)return(a[a.length-2]!==e||a[a.length-1]!==t)&&a.push(e,t),null;const f=l*l+c*c,p=u*u+h*h,m=l*u+c*h,g=n*Math.sqrt(f)/d,b=n*Math.sqrt(p)/d,w=g*m/f,v=b*m/p,y=g*h+b*c,E=g*u+b*l,C=c*(b+w),k=l*(b+w),B=h*(g+v),M=u*(g+v),U=Math.atan2(k-E,C-y),V=Math.atan2(M-E,B-y);return{cx:y+e,cy:E+t,radius:n,startAngle:U,endAngle:V,anticlockwise:c*u>h*l}}static arc(e,t,i,s,n,a,o,l,c){const u=o-a,h=Pn._segmentsCount(Math.abs(u)*n,Math.ceil(Math.abs(u)/xl)*40),d=u/(h*2),f=d*2,p=Math.cos(d),m=Math.sin(d),g=h-1,b=g%1/g;for(let w=0;w<=g;++w){const v=w+b*w,y=d+a+f*v,E=Math.cos(y),C=-Math.sin(y);c.push((p*E+m*C)*n+i,(p*-C+m*E)*n+s)}}}class gA{constructor(){this.reset()}begin(e,t,i){this.reset(),this.style=e,this.start=t,this.attribStart=i}end(e,t){this.attribSize=t-this.attribStart,this.size=e-this.start}reset(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0}}class ld{static curveLength(e,t,i,s,n,a,o,l){let c=0,u=0,h=0,d=0,f=0,p=0,m=0,g=0,b=0,w=0,v=0,y=e,E=t;for(let C=1;C<=10;++C)u=C/10,h=u*u,d=h*u,f=1-u,p=f*f,m=p*f,g=m*e+3*p*u*i+3*f*h*n+d*o,b=m*t+3*p*u*s+3*f*h*a+d*l,w=y-g,v=E-b,y=g,E=b,c+=Math.sqrt(w*w+v*v);return c}static curveTo(e,t,i,s,n,a,o){const l=o[o.length-2],c=o[o.length-1];o.length-=2;const u=Pn._segmentsCount(ld.curveLength(l,c,e,t,i,s,n,a));let h=0,d=0,f=0,p=0,m=0;o.push(l,c);for(let g=1,b=0;g<=u;++g)b=g/u,h=1-b,d=h*h,f=d*h,p=b*b,m=p*b,o.push(f*l+3*d*b*e+3*h*p*i+m*n,f*c+3*d*b*t+3*h*p*s+m*a)}}function xp(r,e,t,i,s,n,a,o){const l=r-t*s,c=e-i*s,u=r+t*n,h=e+i*n;let d,f;a?(d=i,f=-t):(d=-i,f=t);const p=l+d,m=c+f,g=u+d,b=h+f;return o.push(p,m,g,b),2}function gs(r,e,t,i,s,n,a,o){const l=t-r,c=i-e;let u=Math.atan2(l,c),h=Math.atan2(s-r,n-e);o&&uh&&(h+=Math.PI*2);let d=u;const f=h-u,p=Math.abs(f),m=Math.sqrt(l*l+c*c),g=(15*p*Math.sqrt(m)/Math.PI>>0)+1,b=f/g;if(d+=b,o){a.push(r,e,t,i);for(let w=1,v=d;w=0&&(n.join===ui.ROUND?d+=gs(v,y,v-k*S,y-B*S,v-M*S,y-U*S,u,!1)+4:d+=2,u.push(v-M*_,y-U*_,v+M*S,y+U*S));continue}const Z=(-k+b)*(-B+y)-(-k+v)*(-B+w),be=(-M+E)*(-U+y)-(-M+v)*(-U+C),Se=(L*be-z*Z)/ie,ce=(O*Z-W*be)/ie,pe=(Se-v)*(Se-v)+(ce-y)*(ce-y),xe=v+(Se-v)*S,le=y+(ce-y)*S,fe=v-(Se-v)*_,we=y-(ce-y)*_,A=Math.min(L*L+W*W,z*z+O*O),Y=Q?S:_,j=A+Y*Y*m,I=pe<=j;let D=n.join;if(D===ui.MITER&&pe/m>g&&(D=ui.BEVEL),I)switch(D){case ui.MITER:{u.push(xe,le,fe,we);break}case ui.BEVEL:{Q?u.push(xe,le,v+k*_,y+B*_,xe,le,v+M*_,y+U*_):u.push(v-k*S,y-B*S,fe,we,v-M*S,y-U*S,fe,we),d+=2;break}case ui.ROUND:{Q?(u.push(xe,le,v+k*_,y+B*_),d+=gs(v,y,v+k*_,y+B*_,v+M*_,y+U*_,u,!0)+4,u.push(xe,le,v+M*_,y+U*_)):(u.push(v-k*S,y-B*S,fe,we),d+=gs(v,y,v-k*S,y-B*S,v-M*S,y-U*S,u,!1)+4,u.push(v-M*S,y-U*S,fe,we));break}}else{switch(u.push(v-k*S,y-B*S,v+k*_,y+B*_),D){case ui.MITER:{Q?u.push(fe,we,fe,we):u.push(xe,le,xe,le),d+=2;break}case ui.ROUND:{Q?d+=gs(v,y,v+k*_,y+B*_,v+M*_,y+U*_,u,!0)+2:d+=gs(v,y,v-k*S,y-B*S,v-M*S,y-U*S,u,!1)+2;break}}u.push(v-M*S,y-U*S,v+M*_,y+U*_),d+=2}}b=i[(h-2)*2],w=i[(h-2)*2+1],v=i[(h-1)*2],y=i[(h-1)*2+1],k=-(w-y),B=b-v,V=Math.sqrt(k*k+B*B),k/=V,B/=V,k*=p,B*=p,u.push(v-k*S,y-B*S,v+k*_,y+B*_),l||(n.cap===is.ROUND?d+=gs(v-k*(S-_)*.5,y-B*(S-_)*.5,v-k*S,y-B*S,v+k*_,y+B*_,u,!1)+2:n.cap===is.SQUARE&&(d+=xp(v,y,k,B,S,_,!1,u)));const R=e.indices,q=Pn.epsilon*Pn.epsilon;for(let F=f;F0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this}drawShape(e,t=null,i=null,s=null){const n=new Il(e,t,i,s);return this.graphicsData.push(n),this.dirty++,this}drawHole(e,t=null){if(!this.graphicsData.length)return null;const i=new Il(e,null,null,t),s=this.graphicsData[this.graphicsData.length-1];return i.lineStyle=s.lineStyle,s.holes.push(i),this.dirty++,this}destroy(){super.destroy();for(let e=0;e0&&(i=this.batches[this.batches.length-1],s=i.style);for(let l=this.shapeIndex;l65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&o===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=o?new Uint32Array(this.indices):new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}_compareStyles(e,t){return!(!e||!t||e.texture.baseTexture!==t.texture.baseTexture||e.color+e.alpha!==t.color+t.alpha||!!e.native!=!!t.native)}validateBatching(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(let e=0,t=this.graphicsData.length;e65535*2)return!1;const e=this.batches;for(let t=0;t0&&(s=Po.pop(),s||(s=new eu,s.texArray=new su),this.drawCalls.push(s)),s.start=u,s.size=0,s.texArray.count=0,s.type=c),m.touched=1,m._batchEnabled=e,m._batchLocation=n,m.wrapMode=ss.REPEAT,s.texArray.elements[s.texArray.count++]=m,n++)),s.size+=d.size,u+=d.size,o=m._batchLocation,this.addColors(t,p.color,p.alpha,d.attribSize,d.attribStart),this.addTextureIds(i,o,d.attribSize,d.attribStart)}Pe._globalBatch=e,this.packAttributes()}packAttributes(){const e=this.points,t=this.uvs,i=this.colors,s=this.textureIds,n=new ArrayBuffer(e.length*3*4),a=new Float32Array(n),o=new Uint32Array(n);let l=0;for(let c=0;c0&&e.alpha>0;return i?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._lineStyle,{visible:i},e)):this._lineStyle.reset(),this}startPoly(){if(this.currentPath){const e=this.currentPath.points,t=this.currentPath.points.length;t>2&&(this.drawShape(this.currentPath),this.currentPath=new Ls,this.currentPath.closeStroke=!1,this.currentPath.points.push(e[t-2],e[t-1]))}else this.currentPath=new Ls,this.currentPath.closeStroke=!1}finishPoly(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)}moveTo(e,t){return this.startPoly(),this.currentPath.points[0]=e,this.currentPath.points[1]=t,this}lineTo(e,t){this.currentPath||this.moveTo(0,0);const i=this.currentPath.points,s=i[i.length-2],n=i[i.length-1];return(s!==e||n!==t)&&i.push(e,t),this}_initCurve(e=0,t=0){this.currentPath?this.currentPath.points.length===0&&(this.currentPath.points=[e,t]):this.moveTo(e,t)}quadraticCurveTo(e,t,i,s){this._initCurve();const n=this.currentPath.points;return n.length===0&&this.moveTo(0,0),hd.curveTo(e,t,i,s,n),this}bezierCurveTo(e,t,i,s,n,a){return this._initCurve(),ld.curveTo(e,t,i,s,n,a,this.currentPath.points),this}arcTo(e,t,i,s,n){this._initCurve(e,t);const a=this.currentPath.points,o=wp.curveTo(e,t,i,s,n,a);if(o){const{cx:l,cy:c,radius:u,startAngle:h,endAngle:d,anticlockwise:f}=o;this.arc(l,c,u,h,d,f)}return this}arc(e,t,i,s,n,a=!1){if(s===n)return this;if(!a&&n<=s?n+=xl:a&&s<=n&&(s+=xl),n-s===0)return this;const o=e+Math.cos(s)*i,l=t+Math.sin(s)*i,c=this._geometry.closePointEps;let u=this.currentPath?this.currentPath.points:null;if(u){const h=Math.abs(u[u.length-2]-o),d=Math.abs(u[u.length-1]-l);h0;return i?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._fillStyle,{visible:i},e)):this._fillStyle.reset(),this}endFill(){return this.finishPoly(),this._fillStyle.reset(),this}drawRect(e,t,i,s){return this.drawShape(new ke(e,t,i,s))}drawRoundedRect(e,t,i,s,n){return this.drawShape(new Kl(e,t,i,s,n))}drawCircle(e,t,i){return this.drawShape(new Yl(e,t,i))}drawEllipse(e,t,i,s){return this.drawShape(new Xl(e,t,i,s))}drawPolygon(...e){let t,i=!0;const s=e[0];s.points?(i=s.closeStroke,t=s.points):Array.isArray(e[0])?t=e[0]:t=e;const n=new Ls(t);return n.closeStroke=i,this.drawShape(n),this}drawShape(e){return this._holeMode?this._geometry.drawHole(e,this._matrix):this._geometry.drawShape(e,this._fillStyle.clone(),this._lineStyle.clone(),this._matrix),this}clear(){return this._geometry.clear(),this._lineStyle.reset(),this._fillStyle.reset(),this._boundsID++,this._matrix=null,this._holeMode=!1,this.currentPath=null,this}isFastRect(){const e=this._geometry.graphicsData;return e.length===1&&e[0].shape.type===Lt.RECT&&!e[0].matrix&&!e[0].holes.length&&!(e[0].lineStyle.visible&&e[0].lineStyle.width)}_render(e){this.finishPoly();const t=this._geometry;t.updateBatches(),t.batchable?(this.batchDirty!==t.batchDirty&&this._populateBatches(),this._renderBatched(e)):(e.batch.flush(),this._renderDirect(e))}_populateBatches(){const e=this._geometry,t=this.blendMode,i=e.batches.length;this.batchTint=-1,this._transformID=-1,this.batchDirty=e.batchDirty,this.batches.length=i,this.vertexData=new Float32Array(e.points);for(let s=0;se?1:this._width/e,i=this._topHeight+this._bottomHeight,s=this._height>i?1:this._height/i;return Math.min(t,s)}get width(){return this._width}set width(e){this._width=e,this._refresh()}get height(){return this._height}set height(e){this._height=e,this._refresh()}get leftWidth(){return this._leftWidth}set leftWidth(e){this._leftWidth=e,this._refresh()}get rightWidth(){return this._rightWidth}set rightWidth(e){this._rightWidth=e,this._refresh()}get topHeight(){return this._topHeight}set topHeight(e){this._topHeight=e,this._refresh()}get bottomHeight(){return this._bottomHeight}set bottomHeight(e){this._bottomHeight=e,this._refresh()}_refresh(){const e=this.texture,t=this.geometry.buffers[1].data;this._origWidth=e.orig.width,this._origHeight=e.orig.height;const i=1/this._origWidth,s=1/this._origHeight;t[0]=t[8]=t[16]=t[24]=0,t[1]=t[3]=t[5]=t[7]=0,t[6]=t[14]=t[22]=t[30]=1,t[25]=t[27]=t[29]=t[31]=1,t[2]=t[10]=t[18]=t[26]=i*this._leftWidth,t[4]=t[12]=t[20]=t[28]=1-i*this._rightWidth,t[9]=t[11]=t[13]=t[15]=s*this._topHeight,t[17]=t[19]=t[21]=t[23]=1-s*this._bottomHeight,this.updateHorizontalVertices(),this.updateVerticalVertices(),this.geometry.buffers[0].update(),this.geometry.buffers[1].update()}}class ud extends ve{constructor(e=1500,t,i=16384,s=!1){super();const n=16384;i>n&&(i=n),this._properties=[!1,!0,!1,!1,!1],this._maxSize=e,this._batchSize=i,this._buffers=null,this._bufferUpdateIDs=[],this._updateID=0,this.interactiveChildren=!1,this.blendMode=Me.NORMAL,this.autoResize=s,this.roundPixels=!0,this.baseTexture=null,this.setProperties(t),this._tintColor=new P(0),this.tintRgb=new Float32Array(3),this.tint=16777215}setProperties(e){e&&(this._properties[0]="vertices"in e||"scale"in e?!!e.vertices||!!e.scale:this._properties[0],this._properties[1]="position"in e?!!e.position:this._properties[1],this._properties[2]="rotation"in e?!!e.rotation:this._properties[2],this._properties[3]="uvs"in e?!!e.uvs:this._properties[3],this._properties[4]="tint"in e||"alpha"in e?!!e.tint||!!e.alpha:this._properties[4])}updateTransform(){this.displayObjectUpdateTransform()}get tint(){return this._tintColor.value}set tint(e){this._tintColor.setValue(e),this._tintColor.toRgbArray(this.tintRgb)}render(e){!this.visible||this.worldAlpha<=0||!this.children.length||!this.renderable||(this.baseTexture||(this.baseTexture=this.children[0]._texture.baseTexture,this.baseTexture.valid||this.baseTexture.once("update",()=>this.onChildrenChange(0))),e.batch.setObjectRenderer(e.plugins.particle),e.plugins.particle.render(this))}onChildrenChange(e){const t=Math.floor(e/this._batchSize);for(;this._bufferUpdateIDs.lengthi&&!e.autoResize&&(a=i);let o=e._buffers;o||(o=e._buffers=this.generateBuffers(e));const l=t[0]._texture.baseTexture,c=l.alphaMode>0;this.state.blendMode=P0(e.blendMode,c),n.state.set(this.state);const u=n.gl,h=e.worldTransform.copyTo(this.tempMatrix);h.prepend(n.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=h.toArray(!0),this.shader.uniforms.uColor=P.shared.setValue(e.tintRgb).premultiply(e.worldAlpha,c).toArray(this.shader.uniforms.uColor),this.shader.uniforms.uSampler=l,this.renderer.shader.bind(this.shader);let d=!1;for(let f=0,p=0;fs&&(m=s),p>=o.length&&o.push(this._generateOneMoreBuffer(e));const g=o[p];g.uploadDynamic(t,f,m);const b=e._bufferUpdateIDs[p]||0;d=d||g._updateID0);s[a]=c,s[a+n]=c,s[a+n*2]=c,s[a+n*3]=c,a+=n*4}}destroy(){super.destroy(),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null}}Lg.extension={name:"particle",type:oe.RendererPlugin};ge.add(Lg);var eh=(r=>(r[r.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",r[r.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL",r))(eh||{});const Ro={willReadFrequently:!0},$i=class ye{static get experimentalLetterSpacingSupported(){let e=ye._experimentalLetterSpacingSupported;if(e!==void 0){const t=de.ADAPTER.getCanvasRenderingContext2D().prototype;e=ye._experimentalLetterSpacingSupported="letterSpacing"in t||"textLetterSpacing"in t}return e}constructor(e,t,i,s,n,a,o,l,c){this.text=e,this.style=t,this.width=i,this.height=s,this.lines=n,this.lineWidths=a,this.lineHeight=o,this.maxLineWidth=l,this.fontProperties=c}static measureText(e,t,i,s=ye._canvas){i=i??t.wordWrap;const n=t.toFontString(),a=ye.measureFont(n);a.fontSize===0&&(a.fontSize=t.fontSize,a.ascent=t.fontSize);const o=s.getContext("2d",Ro);o.font=n;const l=(i?ye.wordWrap(e,t,s):e).split(/(?:\r\n|\r|\n)/),c=new Array(l.length);let u=0;for(let p=0;p0&&(s?n-=t:n+=(ye.graphemeSegmenter(e).length-1)*t),n}static wordWrap(e,t,i=ye._canvas){const s=i.getContext("2d",Ro);let n=0,a="",o="";const l=Object.create(null),{letterSpacing:c,whiteSpace:u}=t,h=ye.collapseSpaces(u),d=ye.collapseNewlines(u);let f=!h;const p=t.wordWrapWidth+c,m=ye.tokenize(e);for(let g=0;gp)if(a!==""&&(o+=ye.addLine(a),a="",n=0),ye.canBreakWords(b,t.breakWords)){const v=ye.wordWrapSplit(b);for(let y=0;yp&&(o+=ye.addLine(a),f=!1,a="",n=0),a+=E,n+=B}}else{a.length>0&&(o+=ye.addLine(a),a="",n=0);const v=g===m.length-1;o+=ye.addLine(b,!v),f=!1,a="",n=0}else w+n>p&&(f=!1,o+=ye.addLine(a),a="",n=0),(a.length>0||!ye.isBreakingSpace(b)||f)&&(a+=b,n+=w)}return o+=ye.addLine(a,!1),o}static addLine(e,t=!0){return e=ye.trimRight(e),e=t?`${e} +`:e,e}static getFromCache(e,t,i,s){let n=i[e];return typeof n!="number"&&(n=ye._measureText(e,t,s)+t,i[e]=n),n}static collapseSpaces(e){return e==="normal"||e==="pre-line"}static collapseNewlines(e){return e==="normal"}static trimRight(e){if(typeof e!="string")return"";for(let t=e.length-1;t>=0;t--){const i=e[t];if(!ye.isBreakingSpace(i))break;e=e.slice(0,-1)}return e}static isNewline(e){return typeof e!="string"?!1:ye._newlines.includes(e.charCodeAt(0))}static isBreakingSpace(e,t){return typeof e!="string"?!1:ye._breakingSpaces.includes(e.charCodeAt(0))}static tokenize(e){const t=[];let i="";if(typeof e!="string")return t;for(let s=0;so;--d){for(let m=0;m{if(typeof Intl?.Segmenter=="function"){const r=new Intl.Segmenter;return e=>[...r.segment(e)].map(t=>t.segment)}return r=>[...r]})(),$i.experimentalLetterSpacing=!1,$i._fonts={},$i._newlines=[10,13],$i._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];let jr=$i;const SA=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],Og=class pa{constructor(e){this.styleID=0,this.reset(),rc(this,e,e)}clone(){const e={};return rc(e,this,pa.defaultStyle),new pa(e)}reset(){rc(this,pa.defaultStyle,pa.defaultStyle)}get align(){return this._align}set align(e){this._align!==e&&(this._align=e,this.styleID++)}get breakWords(){return this._breakWords}set breakWords(e){this._breakWords!==e&&(this._breakWords=e,this.styleID++)}get dropShadow(){return this._dropShadow}set dropShadow(e){this._dropShadow!==e&&(this._dropShadow=e,this.styleID++)}get dropShadowAlpha(){return this._dropShadowAlpha}set dropShadowAlpha(e){this._dropShadowAlpha!==e&&(this._dropShadowAlpha=e,this.styleID++)}get dropShadowAngle(){return this._dropShadowAngle}set dropShadowAngle(e){this._dropShadowAngle!==e&&(this._dropShadowAngle=e,this.styleID++)}get dropShadowBlur(){return this._dropShadowBlur}set dropShadowBlur(e){this._dropShadowBlur!==e&&(this._dropShadowBlur=e,this.styleID++)}get dropShadowColor(){return this._dropShadowColor}set dropShadowColor(e){const t=ic(e);this._dropShadowColor!==t&&(this._dropShadowColor=t,this.styleID++)}get dropShadowDistance(){return this._dropShadowDistance}set dropShadowDistance(e){this._dropShadowDistance!==e&&(this._dropShadowDistance=e,this.styleID++)}get fill(){return this._fill}set fill(e){const t=ic(e);this._fill!==t&&(this._fill=t,this.styleID++)}get fillGradientType(){return this._fillGradientType}set fillGradientType(e){this._fillGradientType!==e&&(this._fillGradientType=e,this.styleID++)}get fillGradientStops(){return this._fillGradientStops}set fillGradientStops(e){MA(this._fillGradientStops,e)||(this._fillGradientStops=e,this.styleID++)}get fontFamily(){return this._fontFamily}set fontFamily(e){this.fontFamily!==e&&(this._fontFamily=e,this.styleID++)}get fontSize(){return this._fontSize}set fontSize(e){this._fontSize!==e&&(this._fontSize=e,this.styleID++)}get fontStyle(){return this._fontStyle}set fontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.styleID++)}get fontVariant(){return this._fontVariant}set fontVariant(e){this._fontVariant!==e&&(this._fontVariant=e,this.styleID++)}get fontWeight(){return this._fontWeight}set fontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.styleID++)}get letterSpacing(){return this._letterSpacing}set letterSpacing(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.styleID++)}get lineHeight(){return this._lineHeight}set lineHeight(e){this._lineHeight!==e&&(this._lineHeight=e,this.styleID++)}get leading(){return this._leading}set leading(e){this._leading!==e&&(this._leading=e,this.styleID++)}get lineJoin(){return this._lineJoin}set lineJoin(e){this._lineJoin!==e&&(this._lineJoin=e,this.styleID++)}get miterLimit(){return this._miterLimit}set miterLimit(e){this._miterLimit!==e&&(this._miterLimit=e,this.styleID++)}get padding(){return this._padding}set padding(e){this._padding!==e&&(this._padding=e,this.styleID++)}get stroke(){return this._stroke}set stroke(e){const t=ic(e);this._stroke!==t&&(this._stroke=t,this.styleID++)}get strokeThickness(){return this._strokeThickness}set strokeThickness(e){this._strokeThickness!==e&&(this._strokeThickness=e,this.styleID++)}get textBaseline(){return this._textBaseline}set textBaseline(e){this._textBaseline!==e&&(this._textBaseline=e,this.styleID++)}get trim(){return this._trim}set trim(e){this._trim!==e&&(this._trim=e,this.styleID++)}get whiteSpace(){return this._whiteSpace}set whiteSpace(e){this._whiteSpace!==e&&(this._whiteSpace=e,this.styleID++)}get wordWrap(){return this._wordWrap}set wordWrap(e){this._wordWrap!==e&&(this._wordWrap=e,this.styleID++)}get wordWrapWidth(){return this._wordWrapWidth}set wordWrapWidth(e){this._wordWrapWidth!==e&&(this._wordWrapWidth=e,this.styleID++)}toFontString(){const e=typeof this.fontSize=="number"?`${this.fontSize}px`:this.fontSize;let t=this.fontFamily;Array.isArray(this.fontFamily)||(t=this.fontFamily.split(","));for(let i=t.length-1;i>=0;i--){let s=t[i].trim();!/([\"\'])[^\'\"]+\1/.test(s)&&!SA.includes(s)&&(s=`"${s}"`),t[i]=s}return`${this.fontStyle} ${this.fontVariant} ${this.fontWeight} ${e} ${t.join(",")}`}};Og.defaultStyle={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:eh.LINEAR_VERTICAL,fillGradientStops:[],fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",leading:0,letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100};let as=Og;function ic(r){const e=P.shared,t=i=>{const s=e.setValue(i);return s.alpha===1?s.toHex():s.toRgbaString()};return Array.isArray(r)?r.map(t):t(r)}function MA(r,e){if(!Array.isArray(r)||!Array.isArray(e)||r.length!==e.length)return!1;for(let t=0;t0&&p>m&&(g=(m+p)/2);const b=m+d,w=i.lineHeight*(f+1);let v=b;f+10}}function IA(r,e){let t=!1;if(r?._textures?.length){for(let i=0;i{this.queue&&this.prepareItems()},this.registerFindHook(LA),this.registerFindHook(OA),this.registerFindHook(IA),this.registerFindHook(PA),this.registerFindHook(BA),this.registerUploadHook(RA),this.registerUploadHook(FA)}upload(e){return new Promise(t=>{e&&this.add(e),this.queue.length?(this.completes.push(t),this.ticking||(this.ticking=!0,It.system.addOnce(this.tick,this,ns.UTILITY))):t()})}tick(){setTimeout(this.delayedTick,0)}prepareItems(){for(this.limiter.beginFrame();this.queue.length&&this.limiter.allowedToUpload();){const e=this.queue[0];let t=!1;if(e&&!e._destroyed){for(let i=0,s=this.uploadHooks.length;i=0;t--)this.add(e.children[t]);return this}destroy(){this.ticking&&It.system.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null}};Hg.uploadsPerFrame=4;let Mu=Hg;Object.defineProperties(de,{UPLOADS_PER_FRAME:{get(){return Mu.uploadsPerFrame},set(r){He("7.1.0","settings.UPLOADS_PER_FRAME is deprecated, use prepare.BasePrepare.uploadsPerFrame"),Mu.uploadsPerFrame=r}}});function Vg(r,e){return e instanceof Pe?(e._glTextures[r.CONTEXT_UID]||r.texture.bind(e),!0):!1}function NA(r,e){if(!(e instanceof Xn))return!1;const{geometry:t}=e;e.finishPoly(),t.updateBatches();const{batches:i}=t;for(let s=0;s1?ar.from(GA,HA,t):ar.from(Cp,VA,t)}render(e){const t=this.renderer,i=this.quad;let s=i.vertices;s[0]=s[6]=e._width*-e.anchor.x,s[1]=s[3]=e._height*-e.anchor.y,s[2]=s[4]=e._width*(1-e.anchor.x),s[5]=s[7]=e._height*(1-e.anchor.y);const n=e.uvRespectAnchor?e.anchor.x:0,a=e.uvRespectAnchor?e.anchor.y:0;s=i.uvs,s[0]=s[6]=-n,s[1]=s[3]=-a,s[2]=s[4]=1-n,s[5]=s[7]=1-a,i.invalidate();const o=e._texture,l=o.baseTexture,c=l.alphaMode>0,u=e.tileTransform.localTransform,h=e.uvMatrix;let d=l.isPowerOfTwo&&o.frame.width===l.width&&o.frame.height===l.height;d&&(l._glTextures[t.CONTEXT_UID]?d=l.wrapMode!==ss.CLAMP:l.wrapMode===ss.CLAMP&&(l.wrapMode=ss.REPEAT));const f=d?this.simpleShader:this.shader,p=o.width,m=o.height,g=e._width,b=e._height;Fo.set(u.a*p/g,u.b*p/b,u.c*m/g,u.d*m/b,u.tx/g,u.ty/b),Fo.invert(),d?Fo.prepend(h.mapCoord):(f.uniforms.uMapCoord=h.mapCoord.toArray(!0),f.uniforms.uClampFrame=h.uClampFrame,f.uniforms.uClampOffset=h.uClampOffset),f.uniforms.uTransform=Fo.toArray(!0),f.uniforms.uColor=P.shared.setValue(e.tint).premultiply(e.worldAlpha,c).toArray(f.uniforms.uColor),f.uniforms.translationMatrix=e.transform.worldTransform.toArray(!0),f.uniforms.uSampler=o,t.shader.bind(f),t.geometry.bind(i),this.state.blendMode=P0(e.blendMode,c),t.state.set(this.state),t.geometry.draw(this.renderer.gl.TRIANGLES,6,0)}}Wg.extension={name:"tilingSprite",type:oe.RendererPlugin};ge.add(Wg);const $g=class ma{constructor(e,t,i){this.linkedSheets=[],(e instanceof Pe||e instanceof te)&&(e={texture:e,data:t,resolutionFilename:i});const{texture:s,data:n,resolutionFilename:a=null,cachePrefix:o=""}=e;this.cachePrefix=o,this._texture=s instanceof te?s:null,this.baseTexture=s instanceof Pe?s:this._texture.baseTexture,this.textures={},this.animations={},this.data=n;const l=this.baseTexture.resource;this.resolution=this._updateResolution(a||(l?l.url:null)),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}_updateResolution(e=null){const{scale:t}=this.data.meta;let i=Dr(e,null);return i===null&&(i=typeof t=="number"?t:parseFloat(t??"1")),i!==1&&this.baseTexture.setResolution(i),i}parse(){return new Promise(e=>{this._callback=e,this._batchIndex=0,this._frameKeys.length<=ma.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}_processFrames(e){let t=e;const i=ma.BATCH_SIZE;for(;t-e{this._batchIndex*ma.BATCH_SIZE{i[s]=e}),Object.keys(e.textures).forEach(s=>{i[`${e.cachePrefix}${s}`]=e.textures[s]}),!t){const s=Pt.dirname(r[0]);e.linkedSheets.forEach((n,a)=>{Object.assign(i,jg([`${s}/${e.data.meta.related_multi_packs[a]}`],n,!0))})}return i}const $A={extension:oe.Asset,cache:{test:r=>r instanceof Sp,getCacheableAssets:(r,e)=>jg(r,e,!1)},resolver:{test:r=>{const e=r.split("?")[0].split("."),t=e.pop(),i=e.pop();return t==="json"&&WA.includes(i)},parse:r=>{const e=r.split(".");return{resolution:parseFloat(de.RETINA_PREFIX.exec(r)?.[1]??"1"),format:e[e.length-2],src:r}}},loader:{name:"spritesheetLoader",extension:{type:oe.LoadParser,priority:Ni.Normal},async testParse(r,e){return Pt.extname(e.src).toLowerCase()===".json"&&!!r.frames},async parse(r,e,t){const{texture:i,imageFilename:s,cachePrefix:n}=e?.data??{};let a=Pt.dirname(e.src);a&&a.lastIndexOf("/")!==a.length-1&&(a+="/");let o;if(i&&i.baseTexture)o=i;else{const u=xu(a+(s??r.meta.image),e.src);o=(await t.load([u]))[u]}const l=new Sp({texture:o.baseTexture,data:r,resolutionFilename:e.src,cachePrefix:n});await l.parse();const c=r?.meta?.related_multi_packs;if(Array.isArray(c)){const u=[];for(const d of c){if(typeof d!="string")continue;let f=a+d;e.data?.ignoreMultiPack||(f=xu(f,e.src),u.push(t.load({src:f,data:{ignoreMultiPack:!0}})))}const h=await Promise.all(u);l.linkedSheets=h,h.forEach(d=>{d.linkedSheets=[l].concat(l.linkedSheets.filter(f=>f!==d))})}return l},unload(r){r.destroy(!0)}}};ge.add($A);class Pl{constructor(){this.info=[],this.common=[],this.page=[],this.char=[],this.kerning=[],this.distanceField=[]}}class hl{static test(e){return typeof e=="string"&&e.startsWith("info face=")}static parse(e){const t=e.match(/^[a-z]+\s+.+$/gm),i={info:[],common:[],page:[],char:[],chars:[],kerning:[],kernings:[],distanceField:[]};for(const n in t){const a=t[n].match(/^[a-z]+/gm)[0],o=t[n].match(/[a-zA-Z]+=([^\s"']+|"([^"]*)")/gm),l={};for(const c in o){const u=o[c].split("="),h=u[0],d=u[1].replace(/"/gm,""),f=parseFloat(d),p=isNaN(f)?d:f;l[h]=p}i[a].push(l)}const s=new Pl;return i.info.forEach(n=>s.info.push({face:n.face,size:parseInt(n.size,10)})),i.common.forEach(n=>s.common.push({lineHeight:parseInt(n.lineHeight,10)})),i.page.forEach(n=>s.page.push({id:parseInt(n.id,10),file:n.file})),i.char.forEach(n=>s.char.push({id:parseInt(n.id,10),page:parseInt(n.page,10),x:parseInt(n.x,10),y:parseInt(n.y,10),width:parseInt(n.width,10),height:parseInt(n.height,10),xoffset:parseInt(n.xoffset,10),yoffset:parseInt(n.yoffset,10),xadvance:parseInt(n.xadvance,10)})),i.kerning.forEach(n=>s.kerning.push({first:parseInt(n.first,10),second:parseInt(n.second,10),amount:parseInt(n.amount,10)})),i.distanceField.forEach(n=>s.distanceField.push({distanceRange:parseInt(n.distanceRange,10),fieldType:n.fieldType})),s}}class ku{static test(e){const t=e;return typeof e!="string"&&"getElementsByTagName"in e&&t.getElementsByTagName("page").length&&t.getElementsByTagName("info")[0].getAttribute("face")!==null}static parse(e){const t=new Pl,i=e.getElementsByTagName("info"),s=e.getElementsByTagName("common"),n=e.getElementsByTagName("page"),a=e.getElementsByTagName("char"),o=e.getElementsByTagName("kerning"),l=e.getElementsByTagName("distanceField");for(let c=0;c")?ku.test(de.ADAPTER.parseXML(e)):!1}static parse(e){return ku.parse(de.ADAPTER.parseXML(e))}}const sc=[hl,ku,Du];function jA(r){for(let e=0;e=l-U*a){if(m===0)throw new Error(`[BitmapFont] textureHeight ${l}px is too small (fontFamily: '${h.fontFamily}', fontSize: ${h.fontSize}px, char: '${k}')`);--C,g=null,b=null,w=null,m=0,p=0,v=0;continue}if(v=Math.max(U+B.fontProperties.descent,v),V*a+p>=d){if(p===0)throw new Error(`[BitmapFont] textureWidth ${o}px is too small (fontFamily: '${h.fontFamily}', fontSize: ${h.fontSize}px, char: '${k}')`);--C,m+=v*a,m=Math.ceil(m),p=0,v=0;continue}YA(g,b,B,p,m,a,h);const T=cl(B.text);f.char.push({id:T,page:y.length-1,x:p/a,y:m/a,width:V,height:U,xoffset:0,yoffset:0,xadvance:M-(h.dropShadow?h.dropShadowDistance:0)-(h.stroke?h.strokeThickness:0)}),p+=(V+2*n)*a,p=Math.ceil(p)}if(!i?.skipKerning)for(let C=0,k=u.length;C 0.99) {\r + alpha = 1.0;\r + }\r +\r + // Gamma correction for coverage-like alpha\r + float luma = dot(uColor.rgb, vec3(0.299, 0.587, 0.114));\r + float gamma = mix(1.0, 1.0 / 2.2, luma);\r + float coverage = pow(uColor.a * alpha, gamma); \r +\r + // NPM Textures, NPM outputs\r + gl_FragColor = vec4(uColor.rgb, coverage);\r +}\r +`,ZA=`// Mesh material default fragment\r +attribute vec2 aVertexPosition;\r +attribute vec2 aTextureCoord;\r +\r +uniform mat3 projectionMatrix;\r +uniform mat3 translationMatrix;\r +uniform mat3 uTextureMatrix;\r +\r +varying vec2 vTextureCoord;\r +\r +void main(void)\r +{\r + gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\r +\r + vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;\r +}\r +`;const Mp=[],kp=[],Dp=[],Yg=class Xg extends ve{constructor(e,t={}){super();const{align:i,tint:s,maxWidth:n,letterSpacing:a,fontName:o,fontSize:l}=Object.assign({},Xg.styleDefaults,t);if(!Wr.available[o])throw new Error(`Missing BitmapFont "${o}"`);this._activePagesMeshData=[],this._textWidth=0,this._textHeight=0,this._align=i,this._tintColor=new P(s),this._font=void 0,this._fontName=o,this._fontSize=l,this.text=e,this._maxWidth=n,this._maxLineHeight=0,this._letterSpacing=a,this._anchor=new Tr(()=>{this.dirty=!0},this,0,0),this._roundPixels=de.ROUND_PIXELS,this.dirty=!0,this._resolution=de.RESOLUTION,this._autoResolution=!0,this._textureCache={}}updateText(){const e=Wr.available[this._fontName],t=this.fontSize,i=t/e.size,s=new ze,n=[],a=[],o=[],l=this._text.replace(/(?:\r\n|\r)/g,` +`)||" ",c=qg(l),u=this._maxWidth*e.size/t,h=e.distanceFieldType==="none"?Mp:kp;let d=null,f=0,p=0,m=0,g=-1,b=0,w=0,v=0,y=0;for(let V=0;V0&&s.x>u&&(++w,En(n,1+g-w,1+V-g),V=g,g=-1,a.push(b),o.push(n.length>0?n[n.length-1].prevSpaces:0),p=Math.max(p,b),m++,s.x=0,s.y+=e.lineHeight,d=null,y=0)}const E=c[c.length-1];E!=="\r"&&E!==` +`&&(/(?:\s)/.test(E)&&(f=b),a.push(f),p=Math.max(p,f),o.push(-1));const C=[];for(let V=0;V<=m;V++){let T=0;this._align==="right"?T=p-a[V]:this._align==="center"?T=(p-a[V])/2:this._align==="justify"&&(T=o[V]<0?0:(p-a[V])/o[V]),C.push(T)}const k=n.length,B={},M=[],U=this._activePagesMeshData;h.push(...U);for(let V=0;V6*S)||T.vertices.lengtht[s.mesh.texture.baseTexture.uid]).forEach(s=>{s.mesh.texture=te.EMPTY});for(const s in t)t[s].destroy(),delete t[s];this._font=null,this._tintColor=null,this._textureCache=null,super.destroy(e)}};Yg.styleDefaults={align:"left",tint:16777215,maxWidth:0,letterSpacing:0};let Fe=Yg;const JA=[".xml",".fnt"],QA={extension:{type:oe.LoadParser,priority:Ni.Normal},name:"loadBitmapFont",test(r){return JA.includes(Pt.extname(r).toLowerCase())},async testParse(r){return hl.test(r)||Du.test(r)},async parse(r,e,t){const i=hl.test(r)?hl.parse(r):Du.parse(r),{src:s}=e,{page:n}=i,a=[];for(let c=0;co[c]);return Wr.install(i,l,!0)},async load(r,e){return(await de.ADAPTER.fetch(r)).text()},unload(r){r.destroy()}};ge.add(QA);const Iu=class cn extends as{constructor(){super(...arguments),this._fonts=[],this._overrides=[],this._stylesheet="",this.fontsDirty=!1}static from(e){return new cn(Object.keys(cn.defaultOptions).reduce((t,i)=>({...t,[i]:e[i]}),{}))}cleanFonts(){this._fonts.length>0&&(this._fonts.forEach(e=>{URL.revokeObjectURL(e.src),e.refs--,e.refs===0&&(e.fontFace&&document.fonts.delete(e.fontFace),delete cn.availableFonts[e.originalUrl])}),this.fontFamily="Arial",this._fonts.length=0,this.styleID++,this.fontsDirty=!0)}loadFont(e,t={}){const{availableFonts:i}=cn;if(i[e]){const s=i[e];return this._fonts.push(s),s.refs++,this.styleID++,this.fontsDirty=!0,Promise.resolve()}return de.ADAPTER.fetch(e).then(s=>s.blob()).then(async s=>new Promise((n,a)=>{const o=URL.createObjectURL(s),l=new FileReader;l.onload=()=>n([o,l.result]),l.onerror=a,l.readAsDataURL(s)})).then(async([s,n])=>{const a=Object.assign({family:Pt.basename(e,Pt.extname(e)),weight:"normal",style:"normal",display:"auto",src:s,dataSrc:n,refs:1,originalUrl:e,fontFace:null},t);i[e]=a,this._fonts.push(a),this.styleID++;const o=new FontFace(a.family,`url(${a.src})`,{weight:a.weight,style:a.style,display:a.display});a.fontFace=o,await o.load(),document.fonts.add(o),await document.fonts.ready,this.styleID++,this.fontsDirty=!0})}addOverride(...e){const t=e.filter(i=>!this._overrides.includes(i));t.length>0&&(this._overrides.push(...t),this.styleID++)}removeOverride(...e){const t=e.filter(i=>this._overrides.includes(i));t.length>0&&(this._overrides=this._overrides.filter(i=>!t.includes(i)),this.styleID++)}toCSS(e){return[`transform: scale(${e})`,"transform-origin: top left","display: inline-block",`color: ${this.normalizeColor(this.fill)}`,`font-size: ${this.fontSize}px`,`font-family: ${this.fontFamily}`,`font-weight: ${this.fontWeight}`,`font-style: ${this.fontStyle}`,`font-variant: ${this.fontVariant}`,`letter-spacing: ${this.letterSpacing}px`,`text-align: ${this.align}`,`padding: ${this.padding}px`,`white-space: ${this.whiteSpace}`,...this.lineHeight?[`line-height: ${this.lineHeight}px`]:[],...this.wordWrap?[`word-wrap: ${this.breakWords?"break-all":"break-word"}`,`max-width: ${this.wordWrapWidth}px`]:[],...this.strokeThickness?[`-webkit-text-stroke-width: ${this.strokeThickness}px`,`-webkit-text-stroke-color: ${this.normalizeColor(this.stroke)}`,`text-stroke-width: ${this.strokeThickness}px`,`text-stroke-color: ${this.normalizeColor(this.stroke)}`,"paint-order: stroke"]:[],...this.dropShadow?[this.dropShadowToCSS()]:[],...this._overrides].join(";")}toGlobalCSS(){return this._fonts.reduce((e,t)=>`${e} + @font-face { + font-family: "${t.family}"; + src: url('${t.dataSrc}'); + font-weight: ${t.weight}; + font-style: ${t.style}; + font-display: ${t.display}; + }`,this._stylesheet)}get stylesheet(){return this._stylesheet}set stylesheet(e){this._stylesheet!==e&&(this._stylesheet=e,this.styleID++)}normalizeColor(e){return Array.isArray(e)&&(e=Vw(e)),typeof e=="number"?Gw(e):e}dropShadowToCSS(){let e=this.normalizeColor(this.dropShadowColor);const t=this.dropShadowAlpha,i=Math.round(Math.cos(this.dropShadowAngle)*this.dropShadowDistance),s=Math.round(Math.sin(this.dropShadowAngle)*this.dropShadowDistance);e.startsWith("#")&&t<1&&(e+=(t*255|0).toString(16).padStart(2,"0"));const n=`${i}px ${s}px`;return this.dropShadowBlur>0?`text-shadow: ${n} ${this.dropShadowBlur}px ${e}`:`text-shadow: ${n} ${e}`}reset(){Object.assign(this,cn.defaultOptions)}onBeforeDraw(){const{fontsDirty:e}=this;return this.fontsDirty=!1,this.isSafari&&this._fonts.length>0&&e?new Promise(t=>setTimeout(t,100)):Promise.resolve()}get isSafari(){const{userAgent:e}=de.ADAPTER.getNavigator();return/^((?!chrome|android).)*safari/i.test(e)}set fillGradientStops(e){console.warn("[HTMLTextStyle] fillGradientStops is not supported by HTMLText")}get fillGradientStops(){return super.fillGradientStops}set fillGradientType(e){console.warn("[HTMLTextStyle] fillGradientType is not supported by HTMLText")}get fillGradientType(){return super.fillGradientType}set miterLimit(e){console.warn("[HTMLTextStyle] miterLimit is not supported by HTMLText")}get miterLimit(){return super.miterLimit}set trim(e){console.warn("[HTMLTextStyle] trim is not supported by HTMLText")}get trim(){return super.trim}set textBaseline(e){console.warn("[HTMLTextStyle] textBaseline is not supported by HTMLText")}get textBaseline(){return super.textBaseline}set leading(e){console.warn("[HTMLTextStyle] leading is not supported by HTMLText")}get leading(){return super.leading}set lineJoin(e){console.warn("[HTMLTextStyle] lineJoin is not supported by HTMLText")}get lineJoin(){return super.lineJoin}};Iu.availableFonts={},Iu.defaultOptions={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,padding:0,stroke:"black",strokeThickness:0,whiteSpace:"normal",wordWrap:!1,wordWrapWidth:100};let nc=Iu;const Lo=class un extends Ne{constructor(e="",t={}){super(te.EMPTY),this._text=null,this._style=null,this._autoResolution=!0,this.localStyleID=-1,this.dirty=!1,this._updateID=0,this.ownsStyle=!1;const i=new Image,s=te.from(i,{scaleMode:de.SCALE_MODE,resourceOptions:{autoLoad:!1}});s.orig=new ke,s.trim=new ke,this.texture=s;const n="http://www.w3.org/2000/svg",a="http://www.w3.org/1999/xhtml",o=document.createElementNS(n,"svg"),l=document.createElementNS(n,"foreignObject"),c=document.createElementNS(a,"div"),u=document.createElementNS(a,"style");l.setAttribute("width","10000"),l.setAttribute("height","10000"),l.style.overflow="hidden",o.appendChild(l),this.maxWidth=un.defaultMaxWidth,this.maxHeight=un.defaultMaxHeight,this._domElement=c,this._styleElement=u,this._svgRoot=o,this._foreignObject=l,this._foreignObject.appendChild(u),this._foreignObject.appendChild(c),this._image=i,this._loadImage=new Image,this._autoResolution=un.defaultAutoResolution,this._resolution=un.defaultResolution??de.RESOLUTION,this.text=e,this.style=t}measureText(e){const{text:t,style:i,resolution:s}=Object.assign({text:this._text,style:this._style,resolution:this._resolution},e);Object.assign(this._domElement,{innerHTML:t,style:i.toCSS(s)}),this._styleElement.textContent=i.toGlobalCSS(),document.body.appendChild(this._svgRoot);const n=this._domElement.getBoundingClientRect();this._svgRoot.remove();const{width:a,height:o}=n;(a>this.maxWidth||o>this.maxHeight)&&console.warn("[HTMLText] Large expanse of text, increase HTMLText.maxWidth or HTMLText.maxHeight property.");const l=Math.min(this.maxWidth,Math.ceil(a)),c=Math.min(this.maxHeight,Math.ceil(o));return this._svgRoot.setAttribute("width",l.toString()),this._svgRoot.setAttribute("height",c.toString()),t!==this._text&&(this._domElement.innerHTML=this._text),i!==this._style&&(Object.assign(this._domElement,{style:this._style?.toCSS(s)}),this._styleElement.textContent=this._style?.toGlobalCSS()),{width:l+i.padding*2,height:c+i.padding*2}}async updateText(e=!0){const{style:t,_image:i,_loadImage:s}=this;if(this.localStyleID!==t.styleID&&(this.dirty=!0,this.localStyleID=t.styleID),!this.dirty&&e)return;const{width:n,height:a}=this.measureText();i.width=s.width=Math.ceil(Math.max(1,n)),i.height=s.height=Math.ceil(Math.max(1,a)),this._updateID++;const o=this._updateID;await new Promise(l=>{s.onload=async()=>{if(o/gi,"

").replace(/
/gi,"
").replace(/ /gi," ")}};Lo.defaultDestroyOptions={texture:!0,children:!1,baseTexture:!0},Lo.defaultMaxWidth=2024,Lo.defaultMaxHeight=2024,Lo.defaultAutoResolution=!0;var Kt="top",vi="bottom",wi="right",Zt="left",dd="auto",eo=[Kt,vi,wi,Zt],Bn="start",Fa="end",eT="clippingParents",Kg="viewport",na="popper",tT="reference",Ip=eo.reduce(function(r,e){return r.concat([e+"-"+Bn,e+"-"+Fa])},[]),Zg=[].concat(eo,[dd]).reduce(function(r,e){return r.concat([e,e+"-"+Bn,e+"-"+Fa])},[]),iT="beforeRead",rT="read",sT="afterRead",nT="beforeMain",aT="main",oT="afterMain",lT="beforeWrite",hT="write",cT="afterWrite",uT=[iT,rT,sT,nT,aT,oT,lT,hT,cT];function dr(r){return r?(r.nodeName||"").toLowerCase():null}function ti(r){if(r==null)return window;if(r.toString()!=="[object Window]"){var e=r.ownerDocument;return e&&e.defaultView||window}return r}function zs(r){var e=ti(r).Element;return r instanceof e||r instanceof Element}function yi(r){var e=ti(r).HTMLElement;return r instanceof e||r instanceof HTMLElement}function fd(r){if(typeof ShadowRoot>"u")return!1;var e=ti(r).ShadowRoot;return r instanceof e||r instanceof ShadowRoot}function dT(r){var e=r.state;Object.keys(e.elements).forEach(function(t){var i=e.styles[t]||{},s=e.attributes[t]||{},n=e.elements[t];!yi(n)||!dr(n)||(Object.assign(n.style,i),Object.keys(s).forEach(function(a){var o=s[a];o===!1?n.removeAttribute(a):n.setAttribute(a,o===!0?"":o)}))})}function fT(r){var e=r.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(i){var s=e.elements[i],n=e.attributes[i]||{},a=Object.keys(e.styles.hasOwnProperty(i)?e.styles[i]:t[i]),o=a.reduce(function(l,c){return l[c]="",l},{});!yi(s)||!dr(s)||(Object.assign(s.style,o),Object.keys(n).forEach(function(l){s.removeAttribute(l)}))})}}const Jg={name:"applyStyles",enabled:!0,phase:"write",fn:dT,effect:fT,requires:["computeStyles"]};function or(r){return r.split("-")[0]}var Ns=Math.max,Bl=Math.min,Rn=Math.round;function Pu(){var r=navigator.userAgentData;return r!=null&&r.brands&&Array.isArray(r.brands)?r.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function Qg(){return!/^((?!chrome|android).)*safari/i.test(Pu())}function Fn(r,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var i=r.getBoundingClientRect(),s=1,n=1;e&&yi(r)&&(s=r.offsetWidth>0&&Rn(i.width)/r.offsetWidth||1,n=r.offsetHeight>0&&Rn(i.height)/r.offsetHeight||1);var a=zs(r)?ti(r):window,o=a.visualViewport,l=!Qg()&&t,c=(i.left+(l&&o?o.offsetLeft:0))/s,u=(i.top+(l&&o?o.offsetTop:0))/n,h=i.width/s,d=i.height/n;return{width:h,height:d,top:u,right:c+h,bottom:u+d,left:c,x:c,y:u}}function pd(r){var e=Fn(r),t=r.offsetWidth,i=r.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:r.offsetLeft,y:r.offsetTop,width:t,height:i}}function eb(r,e){var t=e.getRootNode&&e.getRootNode();if(r.contains(e))return!0;if(t&&fd(t)){var i=e;do{if(i&&r.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function Pr(r){return ti(r).getComputedStyle(r)}function pT(r){return["table","td","th"].indexOf(dr(r))>=0}function us(r){return((zs(r)?r.ownerDocument:r.document)||window.document).documentElement}function th(r){return dr(r)==="html"?r:r.assignedSlot||r.parentNode||(fd(r)?r.host:null)||us(r)}function Pp(r){return!yi(r)||Pr(r).position==="fixed"?null:r.offsetParent}function mT(r){var e=/firefox/i.test(Pu()),t=/Trident/i.test(Pu());if(t&&yi(r)){var i=Pr(r);if(i.position==="fixed")return null}var s=th(r);for(fd(s)&&(s=s.host);yi(s)&&["html","body"].indexOf(dr(s))<0;){var n=Pr(s);if(n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].indexOf(n.willChange)!==-1||e&&n.willChange==="filter"||e&&n.filter&&n.filter!=="none")return s;s=s.parentNode}return null}function to(r){for(var e=ti(r),t=Pp(r);t&&pT(t)&&Pr(t).position==="static";)t=Pp(t);return t&&(dr(t)==="html"||dr(t)==="body"&&Pr(t).position==="static")?e:t||mT(r)||e}function md(r){return["top","bottom"].indexOf(r)>=0?"x":"y"}function Ta(r,e,t){return Ns(r,Bl(e,t))}function gT(r,e,t){var i=Ta(r,e,t);return i>t?t:i}function tb(){return{top:0,right:0,bottom:0,left:0}}function ib(r){return Object.assign({},tb(),r)}function rb(r,e){return e.reduce(function(t,i){return t[i]=r,t},{})}var bT=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,ib(typeof e!="number"?e:rb(e,eo))};function yT(r){var e,t=r.state,i=r.name,s=r.options,n=t.elements.arrow,a=t.modifiersData.popperOffsets,o=or(t.placement),l=md(o),c=[Zt,wi].indexOf(o)>=0,u=c?"height":"width";if(!(!n||!a)){var h=bT(s.padding,t),d=pd(n),f=l==="y"?Kt:Zt,p=l==="y"?vi:wi,m=t.rects.reference[u]+t.rects.reference[l]-a[l]-t.rects.popper[u],g=a[l]-t.rects.reference[l],b=to(n),w=b?l==="y"?b.clientHeight||0:b.clientWidth||0:0,v=m/2-g/2,y=h[f],E=w-d[u]-h[p],C=w/2-d[u]/2+v,k=Ta(y,C,E),B=l;t.modifiersData[i]=(e={},e[B]=k,e.centerOffset=k-C,e)}}function vT(r){var e=r.state,t=r.options,i=t.element,s=i===void 0?"[data-popper-arrow]":i;s!=null&&(typeof s=="string"&&(s=e.elements.popper.querySelector(s),!s)||eb(e.elements.popper,s)&&(e.elements.arrow=s))}const wT={name:"arrow",enabled:!0,phase:"main",fn:yT,effect:vT,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ln(r){return r.split("-")[1]}var xT={top:"auto",right:"auto",bottom:"auto",left:"auto"};function _T(r,e){var t=r.x,i=r.y,s=e.devicePixelRatio||1;return{x:Rn(t*s)/s||0,y:Rn(i*s)/s||0}}function Bp(r){var e,t=r.popper,i=r.popperRect,s=r.placement,n=r.variation,a=r.offsets,o=r.position,l=r.gpuAcceleration,c=r.adaptive,u=r.roundOffsets,h=r.isFixed,d=a.x,f=d===void 0?0:d,p=a.y,m=p===void 0?0:p,g=typeof u=="function"?u({x:f,y:m}):{x:f,y:m};f=g.x,m=g.y;var b=a.hasOwnProperty("x"),w=a.hasOwnProperty("y"),v=Zt,y=Kt,E=window;if(c){var C=to(t),k="clientHeight",B="clientWidth";if(C===ti(t)&&(C=us(t),Pr(C).position!=="static"&&o==="absolute"&&(k="scrollHeight",B="scrollWidth")),C=C,s===Kt||(s===Zt||s===wi)&&n===Fa){y=vi;var M=h&&C===E&&E.visualViewport?E.visualViewport.height:C[k];m-=M-i.height,m*=l?1:-1}if(s===Zt||(s===Kt||s===vi)&&n===Fa){v=wi;var U=h&&C===E&&E.visualViewport?E.visualViewport.width:C[B];f-=U-i.width,f*=l?1:-1}}var V=Object.assign({position:o},c&&xT),T=u===!0?_T({x:f,y:m},ti(t)):{x:f,y:m};if(f=T.x,m=T.y,l){var S;return Object.assign({},V,(S={},S[y]=w?"0":"",S[v]=b?"0":"",S.transform=(E.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",S))}return Object.assign({},V,(e={},e[y]=w?m+"px":"",e[v]=b?f+"px":"",e.transform="",e))}function ET(r){var e=r.state,t=r.options,i=t.gpuAcceleration,s=i===void 0?!0:i,n=t.adaptive,a=n===void 0?!0:n,o=t.roundOffsets,l=o===void 0?!0:o,c={placement:or(e.placement),variation:Ln(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Bp(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Bp(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const AT={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:ET,data:{}};var Oo={passive:!0};function TT(r){var e=r.state,t=r.instance,i=r.options,s=i.scroll,n=s===void 0?!0:s,a=i.resize,o=a===void 0?!0:a,l=ti(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return n&&c.forEach(function(u){u.addEventListener("scroll",t.update,Oo)}),o&&l.addEventListener("resize",t.update,Oo),function(){n&&c.forEach(function(u){u.removeEventListener("scroll",t.update,Oo)}),o&&l.removeEventListener("resize",t.update,Oo)}}const CT={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:TT,data:{}};var ST={left:"right",right:"left",bottom:"top",top:"bottom"};function ul(r){return r.replace(/left|right|bottom|top/g,function(e){return ST[e]})}var MT={start:"end",end:"start"};function Rp(r){return r.replace(/start|end/g,function(e){return MT[e]})}function gd(r){var e=ti(r),t=e.pageXOffset,i=e.pageYOffset;return{scrollLeft:t,scrollTop:i}}function bd(r){return Fn(us(r)).left+gd(r).scrollLeft}function kT(r,e){var t=ti(r),i=us(r),s=t.visualViewport,n=i.clientWidth,a=i.clientHeight,o=0,l=0;if(s){n=s.width,a=s.height;var c=Qg();(c||!c&&e==="fixed")&&(o=s.offsetLeft,l=s.offsetTop)}return{width:n,height:a,x:o+bd(r),y:l}}function DT(r){var e,t=us(r),i=gd(r),s=(e=r.ownerDocument)==null?void 0:e.body,n=Ns(t.scrollWidth,t.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),a=Ns(t.scrollHeight,t.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),o=-i.scrollLeft+bd(r),l=-i.scrollTop;return Pr(s||t).direction==="rtl"&&(o+=Ns(t.clientWidth,s?s.clientWidth:0)-n),{width:n,height:a,x:o,y:l}}function yd(r){var e=Pr(r),t=e.overflow,i=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+s+i)}function sb(r){return["html","body","#document"].indexOf(dr(r))>=0?r.ownerDocument.body:yi(r)&&yd(r)?r:sb(th(r))}function Ca(r,e){var t;e===void 0&&(e=[]);var i=sb(r),s=i===((t=r.ownerDocument)==null?void 0:t.body),n=ti(i),a=s?[n].concat(n.visualViewport||[],yd(i)?i:[]):i,o=e.concat(a);return s?o:o.concat(Ca(th(a)))}function Bu(r){return Object.assign({},r,{left:r.x,top:r.y,right:r.x+r.width,bottom:r.y+r.height})}function IT(r,e){var t=Fn(r,!1,e==="fixed");return t.top=t.top+r.clientTop,t.left=t.left+r.clientLeft,t.bottom=t.top+r.clientHeight,t.right=t.left+r.clientWidth,t.width=r.clientWidth,t.height=r.clientHeight,t.x=t.left,t.y=t.top,t}function Fp(r,e,t){return e===Kg?Bu(kT(r,t)):zs(e)?IT(e,t):Bu(DT(us(r)))}function PT(r){var e=Ca(th(r)),t=["absolute","fixed"].indexOf(Pr(r).position)>=0,i=t&&yi(r)?to(r):r;return zs(i)?e.filter(function(s){return zs(s)&&eb(s,i)&&dr(s)!=="body"}):[]}function BT(r,e,t,i){var s=e==="clippingParents"?PT(r):[].concat(e),n=[].concat(s,[t]),a=n[0],o=n.reduce(function(l,c){var u=Fp(r,c,i);return l.top=Ns(u.top,l.top),l.right=Bl(u.right,l.right),l.bottom=Bl(u.bottom,l.bottom),l.left=Ns(u.left,l.left),l},Fp(r,a,i));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function nb(r){var e=r.reference,t=r.element,i=r.placement,s=i?or(i):null,n=i?Ln(i):null,a=e.x+e.width/2-t.width/2,o=e.y+e.height/2-t.height/2,l;switch(s){case Kt:l={x:a,y:e.y-t.height};break;case vi:l={x:a,y:e.y+e.height};break;case wi:l={x:e.x+e.width,y:o};break;case Zt:l={x:e.x-t.width,y:o};break;default:l={x:e.x,y:e.y}}var c=s?md(s):null;if(c!=null){var u=c==="y"?"height":"width";switch(n){case Bn:l[c]=l[c]-(e[u]/2-t[u]/2);break;case Fa:l[c]=l[c]+(e[u]/2-t[u]/2);break}}return l}function La(r,e){e===void 0&&(e={});var t=e,i=t.placement,s=i===void 0?r.placement:i,n=t.strategy,a=n===void 0?r.strategy:n,o=t.boundary,l=o===void 0?eT:o,c=t.rootBoundary,u=c===void 0?Kg:c,h=t.elementContext,d=h===void 0?na:h,f=t.altBoundary,p=f===void 0?!1:f,m=t.padding,g=m===void 0?0:m,b=ib(typeof g!="number"?g:rb(g,eo)),w=d===na?tT:na,v=r.rects.popper,y=r.elements[p?w:d],E=BT(zs(y)?y:y.contextElement||us(r.elements.popper),l,u,a),C=Fn(r.elements.reference),k=nb({reference:C,element:v,strategy:"absolute",placement:s}),B=Bu(Object.assign({},v,k)),M=d===na?B:C,U={top:E.top-M.top+b.top,bottom:M.bottom-E.bottom+b.bottom,left:E.left-M.left+b.left,right:M.right-E.right+b.right},V=r.modifiersData.offset;if(d===na&&V){var T=V[s];Object.keys(U).forEach(function(S){var _=[wi,vi].indexOf(S)>=0?1:-1,R=[Kt,vi].indexOf(S)>=0?"y":"x";U[S]+=T[R]*_})}return U}function RT(r,e){e===void 0&&(e={});var t=e,i=t.placement,s=t.boundary,n=t.rootBoundary,a=t.padding,o=t.flipVariations,l=t.allowedAutoPlacements,c=l===void 0?Zg:l,u=Ln(i),h=u?o?Ip:Ip.filter(function(p){return Ln(p)===u}):eo,d=h.filter(function(p){return c.indexOf(p)>=0});d.length===0&&(d=h);var f=d.reduce(function(p,m){return p[m]=La(r,{placement:m,boundary:s,rootBoundary:n,padding:a})[or(m)],p},{});return Object.keys(f).sort(function(p,m){return f[p]-f[m]})}function FT(r){if(or(r)===dd)return[];var e=ul(r);return[Rp(r),e,Rp(e)]}function LT(r){var e=r.state,t=r.options,i=r.name;if(!e.modifiersData[i]._skip){for(var s=t.mainAxis,n=s===void 0?!0:s,a=t.altAxis,o=a===void 0?!0:a,l=t.fallbackPlacements,c=t.padding,u=t.boundary,h=t.rootBoundary,d=t.altBoundary,f=t.flipVariations,p=f===void 0?!0:f,m=t.allowedAutoPlacements,g=e.options.placement,b=or(g),w=b===g,v=l||(w||!p?[ul(g)]:FT(g)),y=[g].concat(v).reduce(function(Q,Z){return Q.concat(or(Z)===dd?RT(e,{placement:Z,boundary:u,rootBoundary:h,padding:c,flipVariations:p,allowedAutoPlacements:m}):Z)},[]),E=e.rects.reference,C=e.rects.popper,k=new Map,B=!0,M=y[0],U=0;U=0,R=_?"width":"height",q=La(e,{placement:V,boundary:u,rootBoundary:h,altBoundary:d,padding:c}),F=_?S?wi:Zt:S?vi:Kt;E[R]>C[R]&&(F=ul(F));var L=ul(F),W=[];if(n&&W.push(q[T]<=0),o&&W.push(q[F]<=0,q[L]<=0),W.every(function(Q){return Q})){M=V,B=!1;break}k.set(V,W)}if(B)for(var z=p?3:1,O=function(Z){var be=y.find(function(Se){var ce=k.get(Se);if(ce)return ce.slice(0,Z).every(function(pe){return pe})});if(be)return M=be,"break"},N=z;N>0;N--){var ie=O(N);if(ie==="break")break}e.placement!==M&&(e.modifiersData[i]._skip=!0,e.placement=M,e.reset=!0)}}const OT={name:"flip",enabled:!0,phase:"main",fn:LT,requiresIfExists:["offset"],data:{_skip:!1}};function Lp(r,e,t){return t===void 0&&(t={x:0,y:0}),{top:r.top-e.height-t.y,right:r.right-e.width+t.x,bottom:r.bottom-e.height+t.y,left:r.left-e.width-t.x}}function Op(r){return[Kt,wi,vi,Zt].some(function(e){return r[e]>=0})}function NT(r){var e=r.state,t=r.name,i=e.rects.reference,s=e.rects.popper,n=e.modifiersData.preventOverflow,a=La(e,{elementContext:"reference"}),o=La(e,{altBoundary:!0}),l=Lp(a,i),c=Lp(o,s,n),u=Op(l),h=Op(c);e.modifiersData[t]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:h},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":h})}const UT={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:NT};function HT(r,e,t){var i=or(r),s=[Zt,Kt].indexOf(i)>=0?-1:1,n=typeof t=="function"?t(Object.assign({},e,{placement:r})):t,a=n[0],o=n[1];return a=a||0,o=(o||0)*s,[Zt,wi].indexOf(i)>=0?{x:o,y:a}:{x:a,y:o}}function GT(r){var e=r.state,t=r.options,i=r.name,s=t.offset,n=s===void 0?[0,0]:s,a=Zg.reduce(function(u,h){return u[h]=HT(h,e.rects,n),u},{}),o=a[e.placement],l=o.x,c=o.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[i]=a}const VT={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:GT};function zT(r){var e=r.state,t=r.name;e.modifiersData[t]=nb({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const WT={name:"popperOffsets",enabled:!0,phase:"read",fn:zT,data:{}};function $T(r){return r==="x"?"y":"x"}function jT(r){var e=r.state,t=r.options,i=r.name,s=t.mainAxis,n=s===void 0?!0:s,a=t.altAxis,o=a===void 0?!1:a,l=t.boundary,c=t.rootBoundary,u=t.altBoundary,h=t.padding,d=t.tether,f=d===void 0?!0:d,p=t.tetherOffset,m=p===void 0?0:p,g=La(e,{boundary:l,rootBoundary:c,padding:h,altBoundary:u}),b=or(e.placement),w=Ln(e.placement),v=!w,y=md(b),E=$T(y),C=e.modifiersData.popperOffsets,k=e.rects.reference,B=e.rects.popper,M=typeof m=="function"?m(Object.assign({},e.rects,{placement:e.placement})):m,U=typeof M=="number"?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),V=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,T={x:0,y:0};if(C){if(n){var S,_=y==="y"?Kt:Zt,R=y==="y"?vi:wi,q=y==="y"?"height":"width",F=C[y],L=F+g[_],W=F-g[R],z=f?-B[q]/2:0,O=w===Bn?k[q]:B[q],N=w===Bn?-B[q]:-k[q],ie=e.elements.arrow,Q=f&&ie?pd(ie):{width:0,height:0},Z=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:tb(),be=Z[_],Se=Z[R],ce=Ta(0,k[q],Q[q]),pe=v?k[q]/2-z-ce-be-U.mainAxis:O-ce-be-U.mainAxis,xe=v?-k[q]/2+z+ce+Se+U.mainAxis:N+ce+Se+U.mainAxis,le=e.elements.arrow&&to(e.elements.arrow),fe=le?y==="y"?le.clientTop||0:le.clientLeft||0:0,we=(S=V?.[y])!=null?S:0,A=F+pe-we-fe,Y=F+xe-we,j=Ta(f?Bl(L,A):L,F,f?Ns(W,Y):W);C[y]=j,T[y]=j-F}if(o){var I,D=y==="x"?Kt:Zt,G=y==="x"?vi:wi,J=C[E],ee=E==="y"?"height":"width",$=J+g[D],re=J-g[G],he=[Kt,Zt].indexOf(b)!==-1,ne=(I=V?.[E])!=null?I:0,_e=he?$:J-k[ee]-B[ee]-ne+U.altAxis,Xe=he?J+k[ee]+B[ee]-ne-U.altAxis:re,Ue=f&&he?gT(_e,J,Xe):Ta(f?_e:$,J,f?Xe:re);C[E]=Ue,T[E]=Ue-J}e.modifiersData[i]=T}}const qT={name:"preventOverflow",enabled:!0,phase:"main",fn:jT,requiresIfExists:["offset"]};function YT(r){return{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}}function XT(r){return r===ti(r)||!yi(r)?gd(r):YT(r)}function KT(r){var e=r.getBoundingClientRect(),t=Rn(e.width)/r.offsetWidth||1,i=Rn(e.height)/r.offsetHeight||1;return t!==1||i!==1}function ZT(r,e,t){t===void 0&&(t=!1);var i=yi(e),s=yi(e)&&KT(e),n=us(e),a=Fn(r,s,t),o={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!t)&&((dr(e)!=="body"||yd(n))&&(o=XT(e)),yi(e)?(l=Fn(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):n&&(l.x=bd(n))),{x:a.left+o.scrollLeft-l.x,y:a.top+o.scrollTop-l.y,width:a.width,height:a.height}}function JT(r){var e=new Map,t=new Set,i=[];r.forEach(function(n){e.set(n.name,n)});function s(n){t.add(n.name);var a=[].concat(n.requires||[],n.requiresIfExists||[]);a.forEach(function(o){if(!t.has(o)){var l=e.get(o);l&&s(l)}}),i.push(n)}return r.forEach(function(n){t.has(n.name)||s(n)}),i}function QT(r){var e=JT(r);return uT.reduce(function(t,i){return t.concat(e.filter(function(s){return s.phase===i}))},[])}function e2(r){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(r())})})),e}}function t2(r){var e=r.reduce(function(t,i){var s=t[i.name];return t[i.name]=s?Object.assign({},s,i,{options:Object.assign({},s.options,i.options),data:Object.assign({},s.data,i.data)}):i,t},{});return Object.keys(e).map(function(t){return e[t]})}var Np={placement:"bottom",modifiers:[],strategy:"absolute"};function Up(){for(var r=arguments.length,e=new Array(r),t=0;t-1}function cb(r,e){return typeof r=="function"?r.apply(void 0,e):r}function Hp(r,e){if(e===0)return r;var t;return function(i){clearTimeout(t),t=setTimeout(function(){r(i)},e)}}function o2(r){return r.split(/\s+/).filter(Boolean)}function dn(r){return[].concat(r)}function Gp(r,e){r.indexOf(e)===-1&&r.push(e)}function l2(r){return r.filter(function(e,t){return r.indexOf(e)===t})}function h2(r){return r.split("-")[0]}function Rl(r){return[].slice.call(r)}function Vp(r){return Object.keys(r).reduce(function(e,t){return r[t]!==void 0&&(e[t]=r[t]),e},{})}function Sa(){return document.createElement("div")}function ih(r){return["Element","Fragment"].some(function(e){return vd(r,e)})}function c2(r){return vd(r,"NodeList")}function u2(r){return vd(r,"MouseEvent")}function d2(r){return!!(r&&r._tippy&&r._tippy.reference===r)}function f2(r){return ih(r)?[r]:c2(r)?Rl(r):Array.isArray(r)?r:Rl(document.querySelectorAll(r))}function oc(r,e){r.forEach(function(t){t&&(t.style.transitionDuration=e+"ms")})}function zp(r,e){r.forEach(function(t){t&&t.setAttribute("data-state",e)})}function p2(r){var e,t=dn(r),i=t[0];return i!=null&&(e=i.ownerDocument)!=null&&e.body?i.ownerDocument:document}function m2(r,e){var t=e.clientX,i=e.clientY;return r.every(function(s){var n=s.popperRect,a=s.popperState,o=s.props,l=o.interactiveBorder,c=h2(a.placement),u=a.modifiersData.offset;if(!u)return!0;var h=c==="bottom"?u.top.y:0,d=c==="top"?u.bottom.y:0,f=c==="right"?u.left.x:0,p=c==="left"?u.right.x:0,m=n.top-i+h>l,g=i-n.bottom-d>l,b=n.left-t+f>l,w=t-n.right-p>l;return m||g||b||w})}function lc(r,e,t){var i=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(s){r[i](s,t)})}function Wp(r,e){for(var t=e;t;){var i;if(r.contains(t))return!0;t=t.getRootNode==null||(i=t.getRootNode())==null?void 0:i.host}return!1}var Qi={isTouch:!1},$p=0;function g2(){Qi.isTouch||(Qi.isTouch=!0,window.performance&&document.addEventListener("mousemove",ub))}function ub(){var r=performance.now();r-$p<20&&(Qi.isTouch=!1,document.removeEventListener("mousemove",ub)),$p=r}function b2(){var r=document.activeElement;if(d2(r)){var e=r._tippy;r.blur&&!e.state.isVisible&&r.blur()}}function y2(){document.addEventListener("touchstart",g2,As),window.addEventListener("blur",b2)}var v2=typeof window<"u"&&typeof document<"u",w2=v2?!!window.msCrypto:!1,x2={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},_2={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Di=Object.assign({appendTo:hb,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},x2,_2),E2=Object.keys(Di),A2=function(e){var t=Object.keys(e);t.forEach(function(i){Di[i]=e[i]})};function db(r){var e=r.plugins||[],t=e.reduce(function(i,s){var n=s.name,a=s.defaultValue;if(n){var o;i[n]=r[n]!==void 0?r[n]:(o=Di[n])!=null?o:a}return i},{});return Object.assign({},r,t)}function T2(r,e){var t=e?Object.keys(db(Object.assign({},Di,{plugins:e}))):E2,i=t.reduce(function(s,n){var a=(r.getAttribute("data-tippy-"+n)||"").trim();if(!a)return s;if(n==="content")s[n]=a;else try{s[n]=JSON.parse(a)}catch{s[n]=a}return s},{});return i}function jp(r,e){var t=Object.assign({},e,{content:cb(e.content,[r])},e.ignoreAttributes?{}:T2(r,e.plugins));return t.aria=Object.assign({},Di.aria,t.aria),t.aria={expanded:t.aria.expanded==="auto"?e.interactive:t.aria.expanded,content:t.aria.content==="auto"?e.interactive?null:"describedby":t.aria.content},t}var C2=function(){return"innerHTML"};function Ru(r,e){r[C2()]=e}function qp(r){var e=Sa();return r===!0?e.className=ob:(e.className=lb,ih(r)?e.appendChild(r):Ru(e,r)),e}function Yp(r,e){ih(e.content)?(Ru(r,""),r.appendChild(e.content)):typeof e.content!="function"&&(e.allowHTML?Ru(r,e.content):r.textContent=e.content)}function Fu(r){var e=r.firstElementChild,t=Rl(e.children);return{box:e,content:t.find(function(i){return i.classList.contains(ab)}),arrow:t.find(function(i){return i.classList.contains(ob)||i.classList.contains(lb)}),backdrop:t.find(function(i){return i.classList.contains(a2)})}}function fb(r){var e=Sa(),t=Sa();t.className=n2,t.setAttribute("data-state","hidden"),t.setAttribute("tabindex","-1");var i=Sa();i.className=ab,i.setAttribute("data-state","hidden"),Yp(i,r.props),e.appendChild(t),t.appendChild(i),s(r.props,r.props);function s(n,a){var o=Fu(e),l=o.box,c=o.content,u=o.arrow;a.theme?l.setAttribute("data-theme",a.theme):l.removeAttribute("data-theme"),typeof a.animation=="string"?l.setAttribute("data-animation",a.animation):l.removeAttribute("data-animation"),a.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth=typeof a.maxWidth=="number"?a.maxWidth+"px":a.maxWidth,a.role?l.setAttribute("role",a.role):l.removeAttribute("role"),(n.content!==a.content||n.allowHTML!==a.allowHTML)&&Yp(c,r.props),a.arrow?u?n.arrow!==a.arrow&&(l.removeChild(u),l.appendChild(qp(a.arrow))):l.appendChild(qp(a.arrow)):u&&l.removeChild(u)}return{popper:e,onUpdate:s}}fb.$$tippy=!0;var S2=1,No=[],hc=[];function M2(r,e){var t=jp(r,Object.assign({},Di,db(Vp(e)))),i,s,n,a=!1,o=!1,l=!1,c=!1,u,h,d,f=[],p=Hp(A,t.interactiveDebounce),m,g=S2++,b=null,w=l2(t.plugins),v={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},y={id:g,reference:r,popper:Sa(),popperInstance:b,props:t,state:v,plugins:w,clearDelayTimeouts:_e,setProps:Xe,setContent:Ue,show:jt,hide:fs,hideWithInteractivity:ri,enable:he,disable:ne,unmount:ps,destroy:dt};if(!t.render)return y;var E=t.render(y),C=E.popper,k=E.onUpdate;C.setAttribute("data-tippy-root",""),C.id="tippy-"+y.id,y.popper=C,r._tippy=y,C._tippy=y;var B=w.map(function(X){return X.fn(y)}),M=r.hasAttribute("aria-expanded");return le(),z(),F(),L("onCreate",[y]),t.showOnCreate&&$(),C.addEventListener("mouseenter",function(){y.props.interactive&&y.state.isVisible&&y.clearDelayTimeouts()}),C.addEventListener("mouseleave",function(){y.props.interactive&&y.props.trigger.indexOf("mouseenter")>=0&&_().addEventListener("mousemove",p)}),y;function U(){var X=y.props.touch;return Array.isArray(X)?X:[X,0]}function V(){return U()[0]==="hold"}function T(){var X;return!!((X=y.props.render)!=null&&X.$$tippy)}function S(){return m||r}function _(){var X=S().parentNode;return X?p2(X):document}function R(){return Fu(C)}function q(X){return y.state.isMounted&&!y.state.isVisible||Qi.isTouch||u&&u.type==="focus"?0:ac(y.props.delay,X?0:1,Di.delay)}function F(X){X===void 0&&(X=!1),C.style.pointerEvents=y.props.interactive&&!X?"":"none",C.style.zIndex=""+y.props.zIndex}function L(X,me,Te){if(Te===void 0&&(Te=!0),B.forEach(function(Ve){Ve[X]&&Ve[X].apply(Ve,me)}),Te){var qe;(qe=y.props)[X].apply(qe,me)}}function W(){var X=y.props.aria;if(X.content){var me="aria-"+X.content,Te=C.id,qe=dn(y.props.triggerTarget||r);qe.forEach(function(Ve){var Bt=Ve.getAttribute(me);if(y.state.isVisible)Ve.setAttribute(me,Bt?Bt+" "+Te:Te);else{var qt=Bt&&Bt.replace(Te,"").trim();qt?Ve.setAttribute(me,qt):Ve.removeAttribute(me)}})}}function z(){if(!(M||!y.props.aria.expanded)){var X=dn(y.props.triggerTarget||r);X.forEach(function(me){y.props.interactive?me.setAttribute("aria-expanded",y.state.isVisible&&me===S()?"true":"false"):me.removeAttribute("aria-expanded")})}}function O(){_().removeEventListener("mousemove",p),No=No.filter(function(X){return X!==p})}function N(X){if(!(Qi.isTouch&&(l||X.type==="mousedown"))){var me=X.composedPath&&X.composedPath()[0]||X.target;if(!(y.props.interactive&&Wp(C,me))){if(dn(y.props.triggerTarget||r).some(function(Te){return Wp(Te,me)})){if(Qi.isTouch||y.state.isVisible&&y.props.trigger.indexOf("click")>=0)return}else L("onClickOutside",[y,X]);y.props.hideOnClick===!0&&(y.clearDelayTimeouts(),y.hide(),o=!0,setTimeout(function(){o=!1}),y.state.isMounted||be())}}}function ie(){l=!0}function Q(){l=!1}function Z(){var X=_();X.addEventListener("mousedown",N,!0),X.addEventListener("touchend",N,As),X.addEventListener("touchstart",Q,As),X.addEventListener("touchmove",ie,As)}function be(){var X=_();X.removeEventListener("mousedown",N,!0),X.removeEventListener("touchend",N,As),X.removeEventListener("touchstart",Q,As),X.removeEventListener("touchmove",ie,As)}function Se(X,me){pe(X,function(){!y.state.isVisible&&C.parentNode&&C.parentNode.contains(C)&&me()})}function ce(X,me){pe(X,me)}function pe(X,me){var Te=R().box;function qe(Ve){Ve.target===Te&&(lc(Te,"remove",qe),me())}if(X===0)return me();lc(Te,"remove",h),lc(Te,"add",qe),h=qe}function xe(X,me,Te){Te===void 0&&(Te=!1);var qe=dn(y.props.triggerTarget||r);qe.forEach(function(Ve){Ve.addEventListener(X,me,Te),f.push({node:Ve,eventType:X,handler:me,options:Te})})}function le(){V()&&(xe("touchstart",we,{passive:!0}),xe("touchend",Y,{passive:!0})),o2(y.props.trigger).forEach(function(X){if(X!=="manual")switch(xe(X,we),X){case"mouseenter":xe("mouseleave",Y);break;case"focus":xe(w2?"focusout":"blur",j);break;case"focusin":xe("focusout",j);break}})}function fe(){f.forEach(function(X){var me=X.node,Te=X.eventType,qe=X.handler,Ve=X.options;me.removeEventListener(Te,qe,Ve)}),f=[]}function we(X){var me,Te=!1;if(!(!y.state.isEnabled||I(X)||o)){var qe=((me=u)==null?void 0:me.type)==="focus";u=X,m=X.currentTarget,z(),!y.state.isVisible&&u2(X)&&No.forEach(function(Ve){return Ve(X)}),X.type==="click"&&(y.props.trigger.indexOf("mouseenter")<0||a)&&y.props.hideOnClick!==!1&&y.state.isVisible?Te=!0:$(X),X.type==="click"&&(a=!Te),Te&&!qe&&re(X)}}function A(X){var me=X.target,Te=S().contains(me)||C.contains(me);if(!(X.type==="mousemove"&&Te)){var qe=ee().concat(C).map(function(Ve){var Bt,qt=Ve._tippy,gr=(Bt=qt.popperInstance)==null?void 0:Bt.state;return gr?{popperRect:Ve.getBoundingClientRect(),popperState:gr,props:t}:null}).filter(Boolean);m2(qe,X)&&(O(),re(X))}}function Y(X){var me=I(X)||y.props.trigger.indexOf("click")>=0&&a;if(!me){if(y.props.interactive){y.hideWithInteractivity(X);return}re(X)}}function j(X){y.props.trigger.indexOf("focusin")<0&&X.target!==S()||y.props.interactive&&X.relatedTarget&&C.contains(X.relatedTarget)||re(X)}function I(X){return Qi.isTouch?V()!==X.type.indexOf("touch")>=0:!1}function D(){G();var X=y.props,me=X.popperOptions,Te=X.placement,qe=X.offset,Ve=X.getReferenceClientRect,Bt=X.moveTransition,qt=T()?Fu(C).arrow:null,gr=Ve?{getBoundingClientRect:Ve,contextElement:Ve.contextElement||S()}:r,Or={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(lo){var qs=lo.state;if(T()){var Cy=R(),vh=Cy.box;["placement","reference-hidden","escaped"].forEach(function(ho){ho==="placement"?vh.setAttribute("data-placement",qs.placement):qs.attributes.popper["data-popper-"+ho]?vh.setAttribute("data-"+ho,""):vh.removeAttribute("data-"+ho)}),qs.attributes.popper={}}}},si=[{name:"offset",options:{offset:qe}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!Bt}},Or];T()&&qt&&si.push({name:"arrow",options:{element:qt,padding:3}}),si.push.apply(si,me?.modifiers||[]),y.popperInstance=s2(gr,C,Object.assign({},me,{placement:Te,onFirstUpdate:d,modifiers:si}))}function G(){y.popperInstance&&(y.popperInstance.destroy(),y.popperInstance=null)}function J(){var X=y.props.appendTo,me,Te=S();y.props.interactive&&X===hb||X==="parent"?me=Te.parentNode:me=cb(X,[Te]),me.contains(C)||me.appendChild(C),y.state.isMounted=!0,D()}function ee(){return Rl(C.querySelectorAll("[data-tippy-root]"))}function $(X){y.clearDelayTimeouts(),X&&L("onTrigger",[y,X]),Z();var me=q(!0),Te=U(),qe=Te[0],Ve=Te[1];Qi.isTouch&&qe==="hold"&&Ve&&(me=Ve),me?i=setTimeout(function(){y.show()},me):y.show()}function re(X){if(y.clearDelayTimeouts(),L("onUntrigger",[y,X]),!y.state.isVisible){be();return}if(!(y.props.trigger.indexOf("mouseenter")>=0&&y.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(X.type)>=0&&a)){var me=q(!1);me?s=setTimeout(function(){y.state.isVisible&&y.hide()},me):n=requestAnimationFrame(function(){y.hide()})}}function he(){y.state.isEnabled=!0}function ne(){y.hide(),y.state.isEnabled=!1}function _e(){clearTimeout(i),clearTimeout(s),cancelAnimationFrame(n)}function Xe(X){if(!y.state.isDestroyed){L("onBeforeUpdate",[y,X]),fe();var me=y.props,Te=jp(r,Object.assign({},me,Vp(X),{ignoreAttributes:!0}));y.props=Te,le(),me.interactiveDebounce!==Te.interactiveDebounce&&(O(),p=Hp(A,Te.interactiveDebounce)),me.triggerTarget&&!Te.triggerTarget?dn(me.triggerTarget).forEach(function(qe){qe.removeAttribute("aria-expanded")}):Te.triggerTarget&&r.removeAttribute("aria-expanded"),z(),F(),k&&k(me,Te),y.popperInstance&&(D(),ee().forEach(function(qe){requestAnimationFrame(qe._tippy.popperInstance.forceUpdate)})),L("onAfterUpdate",[y,X])}}function Ue(X){y.setProps({content:X})}function jt(){var X=y.state.isVisible,me=y.state.isDestroyed,Te=!y.state.isEnabled,qe=Qi.isTouch&&!y.props.touch,Ve=ac(y.props.duration,0,Di.duration);if(!(X||me||Te||qe)&&!S().hasAttribute("disabled")&&(L("onShow",[y],!1),y.props.onShow(y)!==!1)){if(y.state.isVisible=!0,T()&&(C.style.visibility="visible"),F(),Z(),y.state.isMounted||(C.style.transition="none"),T()){var Bt=R(),qt=Bt.box,gr=Bt.content;oc([qt,gr],0)}d=function(){var si;if(!(!y.state.isVisible||c)){if(c=!0,C.offsetHeight,C.style.transition=y.props.moveTransition,T()&&y.props.animation){var yh=R(),lo=yh.box,qs=yh.content;oc([lo,qs],Ve),zp([lo,qs],"visible")}W(),z(),Gp(hc,y),(si=y.popperInstance)==null||si.forceUpdate(),L("onMount",[y]),y.props.animation&&T()&&ce(Ve,function(){y.state.isShown=!0,L("onShown",[y])})}},J()}}function fs(){var X=!y.state.isVisible,me=y.state.isDestroyed,Te=!y.state.isEnabled,qe=ac(y.props.duration,1,Di.duration);if(!(X||me||Te)&&(L("onHide",[y],!1),y.props.onHide(y)!==!1)){if(y.state.isVisible=!1,y.state.isShown=!1,c=!1,a=!1,T()&&(C.style.visibility="hidden"),O(),be(),F(!0),T()){var Ve=R(),Bt=Ve.box,qt=Ve.content;y.props.animation&&(oc([Bt,qt],qe),zp([Bt,qt],"hidden"))}W(),z(),y.props.animation?T()&&Se(qe,y.unmount):y.unmount()}}function ri(X){_().addEventListener("mousemove",p),Gp(No,p),p(X)}function ps(){y.state.isVisible&&y.hide(),y.state.isMounted&&(G(),ee().forEach(function(X){X._tippy.unmount()}),C.parentNode&&C.parentNode.removeChild(C),hc=hc.filter(function(X){return X!==y}),y.state.isMounted=!1,L("onHidden",[y]))}function dt(){y.state.isDestroyed||(y.clearDelayTimeouts(),y.unmount(),fe(),delete r._tippy,y.state.isDestroyed=!0,L("onDestroy",[y]))}}function Ze(r,e){e===void 0&&(e={});var t=Di.plugins.concat(e.plugins||[]);y2();var i=Object.assign({},e,{plugins:t}),s=f2(r),n=s.reduce(function(a,o){var l=o&&M2(o,i);return l&&a.push(l),a},[]);return ih(r)?n[0]:n}Ze.defaultProps=Di;Ze.setDefaultProps=A2;Ze.currentInput=Qi;Object.assign({},Jg,{effect:function(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow)}});Ze.setDefaultProps({render:fb});const k2="modulepreload",D2=function(r){return"/smeditor/"+r},Xp={},Qe=function(e,t,i){if(!t||t.length===0)return e();const s=document.getElementsByTagName("link");return Promise.all(t.map(n=>{if(n=D2(n),n in Xp)return;Xp[n]=!0;const a=n.endsWith(".css"),o=a?'[rel="stylesheet"]':"";if(!!i)for(let u=s.length-1;u>=0;u--){const h=s[u];if(h.href===n&&(!a||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${n}"]${o}`))return;const c=document.createElement("link");if(c.rel=a?"stylesheet":k2,a||(c.as="script",c.crossOrigin=""),c.href=n,document.head.appendChild(c),a)return new Promise((u,h)=>{c.addEventListener("load",u),c.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${n}`)))})})).then(()=>e()).catch(n=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=n,window.dispatchEvent(a),!a.defaultPrevented)throw n})},Ma={INVALID:["seeking position failed.","InvalidStateError"],GONE:["A requested file or directory could not be found at the time an operation was processed.","NotFoundError"],MISMATCH:["The path supplied exists, but was not an entry of requested type.","TypeMismatchError"],MOD_ERR:["The object can not be modified in this way.","InvalidModificationError"],SYNTAX:r=>[`Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. ${r}`,"SyntaxError"],ABORT:["The operation was aborted","AbortError"],SECURITY:["It was determined that certain files are unsafe for access within a Web application, or that too many calls are being made on file resources.","SecurityError"],DISALLOWED:["The request is not allowed by the user agent or the platform in the current context.","NotAllowedError"]},I2=r=>typeof r=="object"&&typeof r.type<"u";async function P2(r){var e,t,i;const{FolderHandle:s,FileHandle:n}=await Qe(()=>import("./memory-d5c05bb2.js"),[]),{FileSystemDirectoryHandle:a}=await Qe(()=>Promise.resolve().then(()=>k3),void 0),o=(t=(e=r[0].webkitRelativePath)===null||e===void 0?void 0:e.split("/",1)[0])!==null&&t!==void 0?t:"",l=new s(o,!1);for(let c=0;c(p._entries[m]||(p._entries[m]=new s(m,!1)),p._entries[m]),l);f._entries[d]=new n(u.name,u,!1)}return new a(l)}async function B2(r){const{FileHandle:e}=await Qe(()=>import("./memory-d5c05bb2.js"),[]),{FileSystemFileHandle:t}=await Qe(()=>Promise.resolve().then(()=>ty),void 0);return Array.from(r).map(s=>new t(new e(s.name,s,!1)))}const pb=Object.freeze(Object.defineProperty({__proto__:null,errors:Ma,isChunkObject:I2,makeDirHandleFromFileList:P2,makeFileHandlesFromFileList:B2},Symbol.toStringTag,{value:"Module"}));var Fl={};/*! howler.js v2.2.4 | (c) 2013-2020, James Simpson of GoldFire Studios | MIT License | howlerjs.com */(function(r){(function(){var e=function(){this.init()};e.prototype={init:function(){var h=this||t;return h._counter=1e3,h._html5AudioPool=[],h.html5PoolSize=10,h._codecs={},h._howls=[],h._muted=!1,h._volume=1,h._canPlayEvent="canplaythrough",h._navigator=typeof window<"u"&&window.navigator?window.navigator:null,h.masterGain=null,h.noAudio=!1,h.usingWebAudio=!0,h.autoSuspend=!0,h.ctx=null,h.autoUnlock=!0,h._setup(),h},volume:function(h){var d=this||t;if(h=parseFloat(h),d.ctx||u(),h!==void 0&&h>=0&&h<=1){if(d._volume=h,d._muted)return d;d.usingWebAudio&&d.masterGain.gain.setValueAtTime(h,t.ctx.currentTime);for(var f=0;f=0;d--)h._howls[d].unload();return h.usingWebAudio&&h.ctx&&h.ctx.close!==void 0&&(h.ctx.close(),h.ctx=null,u()),h},codecs:function(h){return(this||t)._codecs[h.replace(/^x-/,"")]},_setup:function(){var h=this||t;if(h.state=h.ctx&&h.ctx.state||"suspended",h._autoSuspend(),!h.usingWebAudio)if(typeof Audio<"u")try{var d=new Audio;d.oncanplaythrough===void 0&&(h._canPlayEvent="canplay")}catch{h.noAudio=!0}else h.noAudio=!0;try{var d=new Audio;d.muted&&(h.noAudio=!0)}catch{}return h.noAudio||h._setupCodecs(),h},_setupCodecs:function(){var h=this||t,d=null;try{d=typeof Audio<"u"?new Audio:null}catch{return h}if(!d||typeof d.canPlayType!="function")return h;var f=d.canPlayType("audio/mpeg;").replace(/^no$/,""),p=h._navigator?h._navigator.userAgent:"",m=p.match(/OPR\/(\d+)/g),g=m&&parseInt(m[0].split("/")[1],10)<33,b=p.indexOf("Safari")!==-1&&p.indexOf("Chrome")===-1,w=p.match(/Version\/(.*?) /),v=b&&w&&parseInt(w[1],10)<15;return h._codecs={mp3:!(g||!f&&!d.canPlayType("audio/mp3;").replace(/^no$/,"")),mpeg:!!f,opus:!!d.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!d.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!d.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!(d.canPlayType('audio/wav; codecs="1"')||d.canPlayType("audio/wav")).replace(/^no$/,""),aac:!!d.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!d.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(d.canPlayType("audio/x-m4a;")||d.canPlayType("audio/m4a;")||d.canPlayType("audio/aac;")).replace(/^no$/,""),m4b:!!(d.canPlayType("audio/x-m4b;")||d.canPlayType("audio/m4b;")||d.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(d.canPlayType("audio/x-mp4;")||d.canPlayType("audio/mp4;")||d.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!(v||!d.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!(v||!d.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),dolby:!!d.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(d.canPlayType("audio/x-flac;")||d.canPlayType("audio/flac;")).replace(/^no$/,"")},h},_unlockAudio:function(){var h=this||t;if(!h._audioUnlocked&&h.ctx){h._audioUnlocked=!1,h.autoUnlock=!1,h._mobileUnloaded||h.ctx.sampleRate===44100||(h._mobileUnloaded=!0,h.unload()),h._scratchBuffer=h.ctx.createBuffer(1,1,22050);var d=function(f){for(;h._html5AudioPool.length0?b._seek:f._sprite[h][0]/1e3),y=Math.max(0,(f._sprite[h][0]+f._sprite[h][1])/1e3-v),E=1e3*y/Math.abs(b._rate),C=f._sprite[h][0]/1e3,k=(f._sprite[h][0]+f._sprite[h][1])/1e3;b._sprite=h,b._ended=!1;var B=function(){b._paused=!1,b._seek=v,b._start=C,b._stop=k,b._loop=!(!b._loop&&!f._sprite[h][2])};if(v>=k)return void f._ended(b);var M=b._node;if(f._webAudio){var U=function(){f._playLock=!1,B(),f._refreshBuffer(b);var _=b._muted||f._muted?0:b._volume;M.gain.setValueAtTime(_,t.ctx.currentTime),b._playStart=t.ctx.currentTime,M.bufferSource.start===void 0?b._loop?M.bufferSource.noteGrainOn(0,v,86400):M.bufferSource.noteGrainOn(0,v,y):b._loop?M.bufferSource.start(0,v,86400):M.bufferSource.start(0,v,y),E!==1/0&&(f._endTimers[b._id]=setTimeout(f._ended.bind(f,b),E)),d||setTimeout(function(){f._emit("play",b._id),f._loadQueue()},0)};t.state==="running"&&t.ctx.state!=="interrupted"?U():(f._playLock=!0,f.once("resume",U),f._clearTimer(b._id))}else{var V=function(){M.currentTime=v,M.muted=b._muted||f._muted||t._muted||M.muted,M.volume=b._volume*t.volume(),M.playbackRate=b._rate;try{var _=M.play();if(_&&typeof Promise<"u"&&(_ instanceof Promise||typeof _.then=="function")?(f._playLock=!0,B(),_.then(function(){f._playLock=!1,M._unlocked=!0,d?f._loadQueue():f._emit("play",b._id)}).catch(function(){f._playLock=!1,f._emit("playerror",b._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."),b._ended=!0,b._paused=!0})):d||(f._playLock=!1,B(),f._emit("play",b._id)),M.playbackRate=b._rate,M.paused)return void f._emit("playerror",b._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");h!=="__default"||b._loop?f._endTimers[b._id]=setTimeout(f._ended.bind(f,b),E):(f._endTimers[b._id]=function(){f._ended(b),M.removeEventListener("ended",f._endTimers[b._id],!1)},M.addEventListener("ended",f._endTimers[b._id],!1))}catch(R){f._emit("playerror",b._id,R)}};M.src==="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"&&(M.src=f._src,M.load());var T=window&&window.ejecta||!M.readyState&&t._navigator.isCocoonJS;if(M.readyState>=3||T)V();else{f._playLock=!0,f._state="loading";var S=function(){f._state="loaded",V(),M.removeEventListener(t._canPlayEvent,S,!1)};M.addEventListener(t._canPlayEvent,S,!1),f._clearTimer(b._id)}}return b._id},pause:function(h){var d=this;if(d._state!=="loaded"||d._playLock)return d._queue.push({event:"pause",action:function(){d.pause(h)}}),d;for(var f=d._getSoundIds(h),p=0;p=0?d=parseInt(p[0],10):h=parseFloat(p[0]):p.length>=2&&(h=parseFloat(p[0]),d=parseInt(p[1],10));var m;if(!(h!==void 0&&h>=0&&h<=1))return m=d?f._soundById(d):f._sounds[0],m?m._volume:0;if(f._state!=="loaded"||f._playLock)return f._queue.push({event:"volume",action:function(){f.volume.apply(f,p)}}),f;d===void 0&&(f._volume=h),d=f._getSoundIds(d);for(var g=0;g0?p/y:p),C=Date.now();h._fadeTo=f,h._interval=setInterval(function(){var k=(Date.now()-C)/p;C=Date.now(),w+=v*k,w=Math.round(100*w)/100,w=v<0?Math.max(f,w):Math.min(f,w),b._webAudio?h._volume=w:b.volume(w,h._id,!0),g&&(b._volume=w),(fd&&w>=f)&&(clearInterval(h._interval),h._interval=null,h._fadeTo=null,b.volume(f,h._id),b._emit("fade",h._id))},E)},_stopFade:function(h){var d=this,f=d._soundById(h);return f&&f._interval&&(d._webAudio&&f._node.gain.cancelScheduledValues(t.ctx.currentTime),clearInterval(f._interval),f._interval=null,d.volume(f._fadeTo,h),f._fadeTo=null,d._emit("fade",h)),d},loop:function(){var h,d,f,p=this,m=arguments;if(m.length===0)return p._loop;if(m.length===1){if(typeof m[0]!="boolean")return!!(f=p._soundById(parseInt(m[0],10)))&&f._loop;h=m[0],p._loop=h}else m.length===2&&(h=m[0],d=parseInt(m[1],10));for(var g=p._getSoundIds(d),b=0;b=0?d=parseInt(p[0],10):h=parseFloat(p[0])}else p.length===2&&(h=parseFloat(p[0]),d=parseInt(p[1],10));var b;if(typeof h!="number")return b=f._soundById(d),b?b._rate:f._rate;if(f._state!=="loaded"||f._playLock)return f._queue.push({event:"rate",action:function(){f.rate.apply(f,p)}}),f;d===void 0&&(f._rate=h),d=f._getSoundIds(d);for(var w=0;w=0?d=parseInt(p[0],10):f._sounds.length&&(d=f._sounds[0]._id,h=parseFloat(p[0]))}else p.length===2&&(h=parseFloat(p[0]),d=parseInt(p[1],10));if(d===void 0)return 0;if(typeof h=="number"&&(f._state!=="loaded"||f._playLock))return f._queue.push({event:"seek",action:function(){f.seek.apply(f,p)}}),f;var b=f._soundById(d);if(b){if(!(typeof h=="number"&&h>=0)){if(f._webAudio){var w=f.playing(d)?t.ctx.currentTime-b._playStart:0,v=b._rateSeek?b._rateSeek-b._seek:0;return b._seek+(v+w*Math.abs(b._rate))}return b._node.currentTime}var y=f.playing(d);y&&f.pause(d,!0),b._seek=h,b._ended=!1,f._clearTimer(d),f._webAudio||!b._node||isNaN(b._node.duration)||(b._node.currentTime=h);var E=function(){y&&f.play(d,!0),f._emit("seek",d)};if(y&&!f._webAudio){var C=function(){f._playLock?setTimeout(C,0):E()};setTimeout(C,0)}else E()}return f},playing:function(h){var d=this;if(typeof h=="number"){var f=d._soundById(h);return!!f&&!f._paused}for(var p=0;p=0&&t._howls.splice(p,1);var m=!0;for(f=0;f=0){m=!1;break}return n&&m&&delete n[h._src],t.noAudio=!1,h._state="unloaded",h._sounds=[],h=null,null},on:function(h,d,f,p){var m=this,g=m["_on"+h];return typeof d=="function"&&g.push(p?{id:f,fn:d,once:p}:{id:f,fn:d}),m},off:function(h,d,f){var p=this,m=p["_on"+h],g=0;if(typeof d=="number"&&(f=d,d=null),d||f)for(g=0;g=0;g--)m[g].id&&m[g].id!==d&&h!=="load"||(setTimeout(function(b){b.call(this,d,f)}.bind(p,m[g].fn),0),m[g].once&&p.off(h,m[g].fn,m[g].id));return p._loadQueue(h),p},_loadQueue:function(h){var d=this;if(d._queue.length>0){var f=d._queue[0];f.event===h&&(d._queue.shift(),d._loadQueue()),h||f.action()}return d},_ended:function(h){var d=this,f=h._sprite;if(!d._webAudio&&h._node&&!h._node.paused&&!h._node.ended&&h._node.currentTime=0;p--){if(f<=d)return;h._sounds[p]._ended&&(h._webAudio&&h._sounds[p]._node&&h._sounds[p]._node.disconnect(0),h._sounds.splice(p,1),f--)}}},_getSoundIds:function(h){var d=this;if(h===void 0){for(var f=[],p=0;p=0;if(!h.bufferSource)return d;if(t._scratchBuffer&&h.bufferSource&&(h.bufferSource.onended=null,h.bufferSource.disconnect(0),f))try{h.bufferSource.buffer=t._scratchBuffer}catch{}return h.bufferSource=null,d},_clearSound:function(h){/MSIE |Trident\//.test(t._navigator&&t._navigator.userAgent)||(h.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA")}};var s=function(h){this._parent=h,this.init()};s.prototype={init:function(){var h=this,d=h._parent;return h._muted=d._muted,h._loop=d._loop,h._volume=d._volume,h._rate=d._rate,h._seek=0,h._paused=!0,h._ended=!0,h._sprite="__default",h._id=++t._counter,d._sounds.push(h),h.create(),h},create:function(){var h=this,d=h._parent,f=t._muted||h._muted||h._parent._muted?0:h._volume;return d._webAudio?(h._node=t.ctx.createGain===void 0?t.ctx.createGainNode():t.ctx.createGain(),h._node.gain.setValueAtTime(f,t.ctx.currentTime),h._node.paused=!0,h._node.connect(t.masterGain)):t.noAudio||(h._node=t._obtainHtml5Audio(),h._errorFn=h._errorListener.bind(h),h._node.addEventListener("error",h._errorFn,!1),h._loadFn=h._loadListener.bind(h),h._node.addEventListener(t._canPlayEvent,h._loadFn,!1),h._endFn=h._endListener.bind(h),h._node.addEventListener("ended",h._endFn,!1),h._node.src=d._src,h._node.preload=d._preload===!0?"auto":d._preload,h._node.volume=f*t.volume(),h._node.load()),h},reset:function(){var h=this,d=h._parent;return h._muted=d._muted,h._loop=d._loop,h._volume=d._volume,h._rate=d._rate,h._seek=0,h._rateSeek=0,h._paused=!0,h._ended=!0,h._sprite="__default",h._id=++t._counter,h},_errorListener:function(){var h=this;h._parent._emit("loaderror",h._id,h._node.error?h._node.error.code:0),h._node.removeEventListener("error",h._errorFn,!1)},_loadListener:function(){var h=this,d=h._parent;d._duration=Math.ceil(10*h._node.duration)/10,Object.keys(d._sprite).length===0&&(d._sprite={__default:[0,1e3*d._duration]}),d._state!=="loaded"&&(d._state="loaded",d._emit("load"),d._loadQueue()),h._node.removeEventListener(t._canPlayEvent,h._loadFn,!1)},_endListener:function(){var h=this,d=h._parent;d._duration===1/0&&(d._duration=Math.ceil(10*h._node.duration)/10,d._sprite.__default[1]===1/0&&(d._sprite.__default[1]=1e3*d._duration),d._ended(h)),h._node.removeEventListener("ended",h._endFn,!1)}};var n={},a=function(h){var d=h._src;if(n[d])return h._duration=n[d].duration,void c(h);if(/^data:[^;]+;base64,/.test(d)){for(var f=atob(d.split(",")[1]),p=new Uint8Array(f.length),m=0;m0?(n[d._src]=m,c(d,m)):f()};typeof Promise<"u"&&t.ctx.decodeAudioData.length===1?t.ctx.decodeAudioData(h).then(p).catch(f):t.ctx.decodeAudioData(h,p,f)},c=function(h,d){d&&!h._duration&&(h._duration=d.duration),Object.keys(h._sprite).length===0&&(h._sprite={__default:[0,1e3*h._duration]}),h._state!=="loaded"&&(h._state="loaded",h._emit("load"),h._loadQueue())},u=function(){if(t.usingWebAudio){try{typeof AudioContext<"u"?t.ctx=new AudioContext:typeof webkitAudioContext<"u"?t.ctx=new webkitAudioContext:t.usingWebAudio=!1}catch{t.usingWebAudio=!1}t.ctx||(t.usingWebAudio=!1);var h=/iP(hone|od|ad)/.test(t._navigator&&t._navigator.platform),d=t._navigator&&t._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),f=d?parseInt(d[1],10):null;if(h&&f&&f<9){var p=/safari/.test(t._navigator&&t._navigator.userAgent.toLowerCase());t._navigator&&!p&&(t.usingWebAudio=!1)}t.usingWebAudio&&(t.masterGain=t.ctx.createGain===void 0?t.ctx.createGainNode():t.ctx.createGain(),t.masterGain.gain.setValueAtTime(t._muted?0:t._volume,t.ctx.currentTime),t.masterGain.connect(t.ctx.destination)),t._setup()}};r.Howler=t,r.Howl=i,typeof Yt<"u"?(Yt.HowlerGlobal=e,Yt.Howler=t,Yt.Howl=i,Yt.Sound=s):typeof window<"u"&&(window.HowlerGlobal=e,window.Howler=t,window.Howl=i,window.Sound=s)})()})(Fl);const R2="data:audio/wav;base64,UklGRkYEAABXQVZFZm10IBAAAAABAAEARKwAAIhYAQACABAATElTVBoAAABJTkZPSVNGVA0AAABMYXZmNjAuMy4xMDAAAGRhdGEABAAAAIDfjHvG/eK+8VP5Bvyg/v3+Dv8O/1v+8P59B0sXqgoxBa4BQgEEAIMATAAyAE4AnwA8APf/oH+tf3J/6F74LWgXiQpfBbABbAGy/+b/4f+X/w+AAIAKjAzF7uIk8Ln4efsB/jf+Of66/kv+Ev84/6sBbf+eAMn/IADgACQA3gBXABMBrP9/ACIAvgraEnAIfwVbAdYCxf5zAVr/iQBb/6cAMP9KAKtP4H9VaPUyfhjgC0EFigNcAL4AqP/qABoA5wAc/T7yE/iK/CX94v+A/a3+4P7n/eX+cv0b/w7/v/4AgGK2Qdso7ub2vfsQ/ef96/6b/u//+/1UANb9sIAAgJq/3N4+8MX37PtP/fD+Hf5S/zf+c/80/f3DWsiL5Cby0fm5/OT9IQAG/y0A1P6S/1z/jP//f/9/un+oY5kwqheUC5oFXAGAAFv/WwDN/xQBRf9mgACAWoT+weri4/BI+aH7Xv+l/Zr/Nf3k/xT9/3/1ff9/OkPbIUEPXQiVBN4AiQDT//YA0/8JAA2AAICvgIWfetA55xX0Mfmz/Az+w/5H/4r+Zf8r/015Q1d6KlgVZwkkBqUBigHH/q4A6/7WACL/qgBtHDFPaCbnE/sIigQNAloBpf8qALn/aP9vAMj+mABm5FLnpvMc+iz99f51/wH/zP4c/wcAjf+X/zD/+CAbf51Znio6FNwI5AS5AdUAnf8g/93/yv6lAJH/R4AAgDetL9ZL7LH1VPum/Lr+JP+Y/5z+0v4b/pP+AdF63vruUPj4+7r9nP6Y/Qz/Bv5Q/3P+jf+i/ln8K+1/9y769f1I/RQAxP4RABT+5/8x/mH/ff6k//hB7n/0U6opvRPDCUkEOgF5ASD/PwBI/4cAsP9iAEgHfg1JBb4DCwGVAJz/iQCX/30Awf8LAND/HADc/xLy0+8l+K/7/v06/+b+Bf/W/sH+x/7U/tv+k/4A/yoVChNQCeEDSgLoAEEABQA9ABUABADR/xUAx/8WAHvQ7dWg6v/1wfpZ/eb9OP/6/h7/7f76/sz+zf7X/tkgHR0mDiMHGwP+AC4A9v8xAAoAQgDi/ywA9v9aABMAIAGa/+b/+v8TALT/5v8gAPT/8f8OAC4ANAAFAA3pyuQE8+D5Rf3y/Rr/5f7H/rP+g/7t/q7+Iv/Q/oAALQB9AAcAJQAJAPv/2v/O/yAAWgAbAFkBSAP+ATMCCgIGAY0AKwAzADEAMABIABMAHAC4/17/x/4J//T+Uv9b/6b/wP/Y//D/3v8QAPz/7v8GAEAAFQA4ACoAEwAIAAIABwD9//L/CAADAAkADgAWABMAGwAPAA0ACwAQAAgABQAJAAoAAwD///b/9f/y/+n/9//2//f//f/9/w==",mb="/smeditor/assets/metronome_high-bd539a8c.wav",gb="/smeditor/assets/metronome_low-cbca5846.wav",F2="/smeditor/assets/mine-b973f34e.wav",rh=[".aac",".mid",".midi",".mp3",".oga",".ogg",".opus",".wav",".webm",".weba",".flac",".aiff"],Ts=[".bmp",".gif",".jpeg",".jpg",".png",".tif",".tiff",".webp"],wd=["Hold","Roll"];function bb(r){return!wd.includes(r.type)}function Be(r){return wd.includes(r.type)}var di="INUMBER",Kn="IOP1",Zn="IOP2",Jn="IOP3",Br="IVAR",Ws="IVARNAME",On="IFUNCALL",sh="IFUNDEF",Jt="IEXPR",xd="IEXPREVAL",js="IMEMBER",nh="IENDSTATEMENT",Nn="IARRAY";function je(r,e){this.type=r,this.value=e??0}je.prototype.toString=function(){switch(this.type){case di:case Kn:case Zn:case Jn:case Br:case Ws:case nh:return this.value;case On:return"CALL "+this.value;case sh:return"DEF "+this.value;case Nn:return"ARRAY "+this.value;case js:return"."+this.value;default:return"Invalid Instruction"}};function ah(r){return new je(Kn,r)}function Fr(r){return new je(Zn,r)}function yb(r){return new je(Jn,r)}function Lu(r,e,t,i,s){for(var n=[],a=[],o,l,c,u,h=0;h1)l=n.pop(),o=n.pop(),u=t[d.value],d=new je(di,u(o.value,l.value)),n.push(d);else if(f===Jn&&n.length>2)c=n.pop(),l=n.pop(),o=n.pop(),d.value==="?"?n.push(o.value?l.value:c.value):(u=i[d.value],d=new je(di,u(o.value,l.value,c.value)),n.push(d));else if(f===Kn&&n.length>0)o=n.pop(),u=e[d.value],d=new je(di,u(o.value)),n.push(d);else if(f===Jt){for(;n.length>0;)a.push(n.shift());a.push(new je(Jt,Lu(d.value,e,t,i,s)))}else if(f===js&&n.length>0)o=n.pop(),n.push(new je(di,o.value[d.value]));else{for(;n.length>0;)a.push(n.shift());a.push(d)}}for(;n.length>0;)a.push(n.shift());return a}function vb(r,e,t){for(var i=[],s=0;s0;)l.unshift(vr(i.pop(),t));if(o=i.pop(),o.apply&&o.call)i.push(o.apply(void 0,l));else throw new Error(o+" is not a function")}else if(f===sh)i.push(function(){for(var m=i.pop(),g=[],b=d.value;b-- >0;)g.unshift(i.pop());var w=i.pop(),v=function(){for(var y=Object.assign({},t),E=0,C=g.length;E0;)l.unshift(i.pop());i.push(l)}else throw new Error("invalid Expression")}if(i.length>1)throw new Error("invalid Expression (parity)");return i[0]===0?0:vr(i[0],t)}function L2(r,e,t){return _d(r)?r:{type:xd,value:function(i){return Ds(r.value,e,i)}}}function _d(r){return r&&r.type===xd}function vr(r,e){return _d(r)?r.value(e):r}function Ed(r,e){for(var t=[],i,s,n,a,o,l,c=0;c0;)o.unshift(t.pop());a=t.pop(),t.push(a+"("+o.join(", ")+")")}else if(h===sh){for(s=t.pop(),l=u.value,o=[];l-- >0;)o.unshift(t.pop());i=t.pop(),e?t.push("("+i+" = function("+o.join(", ")+") { return "+s+" })"):t.push("("+i+"("+o.join(", ")+") = "+s+")")}else if(h===js)i=t.pop(),t.push(i+"."+u.value);else if(h===Nn){for(l=u.value,o=[];l-- >0;)o.unshift(t.pop());t.push("["+o.join(", ")+"]")}else if(h===Jt)t.push("("+Ed(u.value,e)+")");else if(h!==nh)throw new Error("invalid Expression")}return t.length>1&&(e?t=[t.join(",")]:t=[t.join(";")]),String(t[0])}function Kp(r){return typeof r=="string"?JSON.stringify(r).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029"):r}function yn(r,e){for(var t=0;t=this.expression.length)return this.newToken(Oa,"EOF");if(this.isWhitespace()||this.isComment())return this.next();if(this.isRadixInteger()||this.isNumber()||this.isOperator()||this.isString()||this.isParen()||this.isBracket()||this.isComma()||this.isSemicolon()||this.isNamedOp()||this.isConst()||this.isName())return this.current;this.parseError('Unknown character "'+this.expression.charAt(this.pos)+'"')};wt.prototype.isString=function(){var r=!1,e=this.pos,t=this.expression.charAt(e);if(t==="'"||t==='"')for(var i=this.expression.indexOf(t,e+1);i>=0&&this.pos"9")))break}if(e>r){var i=this.expression.substring(r,e);if(i in this.consts)return this.current=this.newToken(oh,this.consts[i]),this.pos+=i.length,!0}return!1};wt.prototype.isNamedOp=function(){for(var r=this.pos,e=r;e"9")))break}if(e>r){var i=this.expression.substring(r,e);if(this.isOperatorEnabled(i)&&(i in this.binaryOps||i in this.unaryOps||i in this.ternaryOps))return this.current=this.newToken(it,i),this.pos+=i.length,!0}return!1};wt.prototype.isName=function(){for(var r=this.pos,e=r,t=!1;e"9"))break}else t=!0}if(t){var s=this.expression.substring(r,e);return this.current=this.newToken(Td,s),this.pos+=s.length,!0}return!1};wt.prototype.isWhitespace=function(){for(var r=!1,e=this.expression.charAt(this.pos);(e===" "||e===" "||e===` +`||e==="\r")&&(r=!0,this.pos++,!(this.pos>=this.expression.length));)e=this.expression.charAt(this.pos);return r};var O2=/^[0-9a-f]{4}$/i;wt.prototype.unescape=function(r){var e=r.indexOf("\\");if(e<0)return r;for(var t=r.substring(0,e);e>=0;){var i=r.charAt(++e);switch(i){case"'":t+="'";break;case'"':t+='"';break;case"\\":t+="\\";break;case"/":t+="/";break;case"b":t+="\b";break;case"f":t+="\f";break;case"n":t+=` +`;break;case"r":t+="\r";break;case"t":t+=" ";break;case"u":var s=r.substring(e+1,e+5);O2.test(s)||this.parseError("Illegal escape sequence: \\u"+s),t+=String.fromCharCode(parseInt(s,16)),e+=4;break;default:throw this.parseError('Illegal escape sequence: "\\'+i+'"')}++e;var n=r.indexOf("\\",e);t+=r.substring(e,n<0?r.length:n),e=n}return t};wt.prototype.isComment=function(){var r=this.expression.charAt(this.pos);return r==="/"&&this.expression.charAt(this.pos+1)==="*"?(this.pos=this.expression.indexOf("*/",this.pos)+2,this.pos===1&&(this.pos=this.expression.length),!0):!1};wt.prototype.isRadixInteger=function(){var r=this.pos;if(r>=this.expression.length-2||this.expression.charAt(r)!=="0")return!1;++r;var e,t;if(this.expression.charAt(r)==="x")e=16,t=/^[0-9a-f]$/i,++r;else if(this.expression.charAt(r)==="b")e=2,t=/^[01]$/i,++r;else return!1;for(var i=!1,s=r;r="0"&&a<="9"||!s&&a===".");)a==="."?s=!0:n=!0,e++,r=n;if(r&&(i=e),a==="e"||a==="E"){e++;for(var o=!0,l=!1;e="0"&&a<="9")l=!0,o=!1;else break;e++}l||(e=i)}return r?(this.current=this.newToken(oh,parseFloat(this.expression.substring(t,e))),this.pos=e):this.pos=i,r};wt.prototype.isOperator=function(){var r=this.pos,e=this.expression.charAt(this.pos);if(e==="+"||e==="-"||e==="*"||e==="/"||e==="%"||e==="^"||e==="?"||e===":"||e===".")this.current=this.newToken(it,e);else if(e==="∙"||e==="•")this.current=this.newToken(it,"*");else if(e===">")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(it,">="),this.pos++):this.current=this.newToken(it,">");else if(e==="<")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(it,"<="),this.pos++):this.current=this.newToken(it,"<");else if(e==="|")if(this.expression.charAt(this.pos+1)==="|")this.current=this.newToken(it,"||"),this.pos++;else return!1;else if(e==="=")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(it,"=="),this.pos++):this.current=this.newToken(it,e);else if(e==="!")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(it,"!="),this.pos++):this.current=this.newToken(it,e);else return!1;return this.pos++,this.isOperatorEnabled(this.current.value)?!0:(this.pos=r,!1)};wt.prototype.isOperatorEnabled=function(r){return this.parser.isOperatorEnabled(r)};wt.prototype.getCoordinates=function(){var r=0,e,t=-1;do r++,e=this.pos-t,t=this.expression.indexOf(` +`,t+1);while(t>=0&&t"u"?!0:Array.isArray(e)?yn(e,r.value):typeof e=="function"?e(r):r.value===e};ot.prototype.save=function(){this.savedCurrent=this.current,this.savedNextToken=this.nextToken,this.tokens.save()};ot.prototype.restore=function(){this.tokens.restore(),this.current=this.savedCurrent,this.nextToken=this.savedNextToken};ot.prototype.accept=function(r,e){return this.nextToken.type===r&&this.tokenMatches(this.nextToken,e)?(this.next(),!0):!1};ot.prototype.expect=function(r,e){if(!this.accept(r,e)){var t=this.tokens.getCoordinates();throw new Error("parse error ["+t.line+":"+t.column+"]: Expected "+(e||r))}};ot.prototype.parseAtom=function(r){var e=this.tokens.unaryOps;function t(s){return s.value in e}if(this.accept(Td)||this.accept(it,t))r.push(new je(Br,this.current.value));else if(this.accept(oh))r.push(new je(di,this.current.value));else if(this.accept(wb))r.push(new je(di,this.current.value));else if(this.accept(Rr,"("))this.parseExpression(r),this.expect(Rr,")");else if(this.accept(Un,"["))if(this.accept(Un,"]"))r.push(new je(Nn,0));else{var i=this.parseArrayList(r);r.push(new je(Nn,i))}else throw new Error("unexpected "+this.nextToken)};ot.prototype.parseExpression=function(r){var e=[];this.parseUntilEndStatement(r,e)||(this.parseVariableAssignmentExpression(e),!this.parseUntilEndStatement(r,e)&&this.pushExpression(r,e))};ot.prototype.pushExpression=function(r,e){for(var t=0,i=e.length;t=",">","in"];ot.prototype.parseComparison=function(r){for(this.parseAddSub(r);this.accept(it,N2);){var e=this.current;this.parseAddSub(r),r.push(Fr(e.value))}};var U2=["+","-","||"];ot.prototype.parseAddSub=function(r){for(this.parseTerm(r);this.accept(it,U2);){var e=this.current;this.parseTerm(r),r.push(Fr(e.value))}};var H2=["*","/","%"];ot.prototype.parseTerm=function(r){for(this.parseFactor(r);this.accept(it,H2);){var e=this.current;this.parseFactor(r),r.push(Fr(e.value))}};ot.prototype.parseFactor=function(r){var e=this.tokens.unaryOps;function t(s){return s.value in e}if(this.save(),this.accept(it,t)){if(this.current.value!=="-"&&this.current.value!=="+"){if(this.nextToken.type===Rr&&this.nextToken.value==="("){this.restore(),this.parseExponential(r);return}else if(this.nextToken.type===Cd||this.nextToken.type===lh||this.nextToken.type===Oa||this.nextToken.type===Rr&&this.nextToken.value===")"){this.restore(),this.parseAtom(r);return}}var i=this.current;this.parseFactor(r),r.push(ah(i.value))}else this.parseExponential(r)};ot.prototype.parseExponential=function(r){for(this.parsePostfixExpression(r);this.accept(it,"^");)this.parseFactor(r),r.push(Fr("^"))};ot.prototype.parsePostfixExpression=function(r){for(this.parseFunctionCall(r);this.accept(it,"!");)r.push(ah("!"))};ot.prototype.parseFunctionCall=function(r){var e=this.tokens.unaryOps;function t(n){return n.value in e}if(this.accept(it,t)){var i=this.current;this.parseAtom(r),r.push(ah(i.value))}else for(this.parseMemberExpression(r);this.accept(Rr,"(");)if(this.accept(Rr,")"))r.push(new je(On,0));else{var s=this.parseArgumentList(r);r.push(new je(On,s))}};ot.prototype.parseArgumentList=function(r){for(var e=0;!this.accept(Rr,")");)for(this.parseExpression(r),++e;this.accept(lh);)this.parseExpression(r),++e;return e};ot.prototype.parseMemberExpression=function(r){for(this.parseAtom(r);this.accept(it,".")||this.accept(Un,"[");){var e=this.current;if(e.value==="."){if(!this.allowMemberAccess)throw new Error('unexpected ".", member access is not permitted');this.expect(Td),r.push(new je(js,this.current.value))}else if(e.value==="["){if(!this.tokens.isOperatorEnabled("["))throw new Error('unexpected "[]", arrays are disabled');this.parseExpression(r),this.expect(Un,"]"),r.push(Fr("["))}else throw new Error("unexpected symbol: "+e.value)}};function G2(r,e){return Number(r)+Number(e)}function V2(r,e){return r-e}function z2(r,e){return r*e}function W2(r,e){return r/e}function $2(r,e){return r%e}function j2(r,e){return Array.isArray(r)&&Array.isArray(e)?r.concat(e):""+r+e}function q2(r,e){return r===e}function Y2(r,e){return r!==e}function X2(r,e){return r>e}function K2(r,e){return r=e}function J2(r,e){return r<=e}function Q2(r,e){return!!(r&&e)}function eC(r,e){return!!(r||e)}function tC(r,e){return yn(e,r)}function iC(r){return(Math.exp(r)-Math.exp(-r))/2}function rC(r){return(Math.exp(r)+Math.exp(-r))/2}function sC(r){return r===1/0?1:r===-1/0?-1:(Math.exp(r)-Math.exp(-r))/(Math.exp(r)+Math.exp(-r))}function nC(r){return r===-1/0?r:Math.log(r+Math.sqrt(r*r+1))}function aC(r){return Math.log(r+Math.sqrt(r*r-1))}function oC(r){return Math.log((1+r)/(1-r))/2}function Zp(r){return Math.log(r)*Math.LOG10E}function lC(r){return-r}function hC(r){return!r}function cC(r){return r<0?Math.ceil(r):Math.floor(r)}function uC(r){return Math.random()*(r||1)}function Jp(r){return Sd(r+1)}function dC(r){return isFinite(r)&&r===Math.round(r)}var fC=4.7421875,cc=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22];function Sd(r){var e,t;if(dC(r)){if(r<=0)return isFinite(r)?1/0:NaN;if(r>171)return 1/0;for(var i=r-2,s=r-1;i>1;)s*=i,i--;return s===0&&(s=1),s}if(r<.5)return Math.PI/(Math.sin(Math.PI*r)*Sd(1-r));if(r>=171.35)return 1/0;if(r>85){var n=r*r,a=n*r,o=a*r,l=o*r;return Math.sqrt(2*Math.PI/r)*Math.pow(r/Math.E,r)*(1+1/(12*r)+1/(288*n)-139/(51840*a)-571/(2488320*o)+163879/(209018880*l)+5246819/(75246796800*l*r))}--r,t=cc[0];for(var c=1;c0?(s=i/e,r+=s*s):r+=i}return e===1/0?1/0:e*Math.sqrt(r)}function em(r,e,t){return r?e:t}function mC(r,e){return typeof e>"u"||+e==0?Math.round(r):(r=+r,e=-+e,isNaN(r)||!(typeof e=="number"&&e%1===0)?NaN:(r=r.toString().split("e"),r=Math.round(+(r[0]+"e"+(r[1]?+r[1]-e:-e))),r=r.toString().split("e"),+(r[0]+"e"+(r[1]?+r[1]+e:e))))}function gC(r,e,t){return t&&(t[r]=e),e}function bC(r,e){return r[e|0]}function yC(r){return arguments.length===1&&Array.isArray(r)?Math.max.apply(Math,r):Math.max.apply(Math,arguments)}function vC(r){return arguments.length===1&&Array.isArray(r)?Math.min.apply(Math,r):Math.min.apply(Math,arguments)}function wC(r,e){if(typeof r!="function")throw new Error("First argument to map is not a function");if(!Array.isArray(e))throw new Error("Second argument to map is not an array");return e.map(function(t,i){return r(t,i)})}function xC(r,e,t){if(typeof r!="function")throw new Error("First argument to fold is not a function");if(!Array.isArray(t))throw new Error("Second argument to fold is not an array");return t.reduce(function(i,s,n){return r(i,s,n)},e)}function _C(r,e){if(typeof r!="function")throw new Error("First argument to filter is not a function");if(!Array.isArray(e))throw new Error("Second argument to filter is not an array");return e.filter(function(t,i){return r(t,i)})}function EC(r,e){if(!(Array.isArray(e)||typeof e=="string"))throw new Error("Second argument to indexOf is not a string or array");return e.indexOf(r)}function AC(r,e){if(!Array.isArray(e))throw new Error("Second argument to join is not an array");return e.join(r)}function TC(r){return(r>0)-(r<0)||+r}var tm=1/3;function CC(r){return r<0?-Math.pow(-r,tm):Math.pow(r,tm)}function SC(r){return Math.exp(r)-1}function MC(r){return Math.log(1+r)}function kC(r){return Math.log(r)/Math.LN2}function Lr(r){this.options=r||{},this.unaryOps={sin:Math.sin,cos:Math.cos,tan:Math.tan,asin:Math.asin,acos:Math.acos,atan:Math.atan,sinh:Math.sinh||iC,cosh:Math.cosh||rC,tanh:Math.tanh||sC,asinh:Math.asinh||nC,acosh:Math.acosh||aC,atanh:Math.atanh||oC,sqrt:Math.sqrt,cbrt:Math.cbrt||CC,log:Math.log,log2:Math.log2||kC,ln:Math.log,lg:Math.log10||Zp,log10:Math.log10||Zp,expm1:Math.expm1||SC,log1p:Math.log1p||MC,abs:Math.abs,ceil:Math.ceil,floor:Math.floor,round:Math.round,trunc:Math.trunc||cC,"-":lC,"+":Number,exp:Math.exp,not:hC,length:pC,"!":Jp,sign:Math.sign||TC},this.binaryOps={"+":G2,"-":V2,"*":z2,"/":W2,"%":$2,"^":Math.pow,"||":j2,"==":q2,"!=":Y2,">":X2,"<":K2,">=":Z2,"<=":J2,and:Q2,or:eC,in:tC,"=":gC,"[":bC},this.ternaryOps={"?":em},this.functions={random:uC,fac:Jp,min:vC,max:yC,hypot:Math.hypot||Qp,pyt:Math.hypot||Qp,pow:Math.pow,atan2:Math.atan2,if:em,gamma:Sd,roundTo:mC,map:wC,fold:xC,filter:_C,indexOf:EC,join:AC},this.consts={E:Math.E,PI:Math.PI,true:!0,false:!1}}Lr.prototype.parse=function(r){var e=[],t=new ot(this,new wt(this,r),{allowMemberAccess:this.options.allowMemberAccess});return t.parseExpression(e),t.expect(Oa,"EOF"),new Fi(e,this)};Lr.prototype.evaluate=function(r,e){return this.parse(r).evaluate(e)};var _b=new Lr;Lr.parse=function(r){return _b.parse(r)};Lr.evaluate=function(r,e){return _b.parse(r).evaluate(e)};var im={"+":"add","-":"subtract","*":"multiply","/":"divide","%":"remainder","^":"power","!":"factorial","<":"comparison",">":"comparison","<=":"comparison",">=":"comparison","==":"comparison","!=":"comparison","||":"concatenate",and:"logical",or:"logical",not:"logical","?":"conditional",":":"conditional","=":"assignment","[":"array","()=":"fndef"};function DC(r){return im.hasOwnProperty(r)?im[r]:r}Lr.prototype.isOperatorEnabled=function(r){var e=DC(r),t=this.options.operators||{};return!(e in t)||!!t[e]};const _r=[1,1/2,1/3,1/4,1/6,1/8,1/12,1/16,1/24,1/48],Gi=["4th","8th","12th","16th","24th","32nd","48th","64th","96th","192nd"],rm=[4,8,12,16,24,32,48,64,96,192];function IC(r){for(let e=0;e<_r.length;e++)if(Math.abs(r-Math.round(r/_r[e])*_r[e])<.01)return e;return 9}function lr(r){return r.beat+(Be(r)?r.hold:0)}function Ou(r){return 4/_r[IC(r)]}function Nt(r,e,t){if(t=t??(n=>n),r.length==0)return-1;if(e>=t(r[r.length-1])){let n=r.length-1;for(;n>0&&t(r[n-1])==e;)n--;return n}let i=0,s=r.length;for(;i<=s&&i>>1;if(t(r[n])==e){for(;n>0&&t(r[n-1])==e;)n--;return n}t(r[n])e&&(s=n-1)}return Math.max(0,s)}function Uo(r,e,t){if(t=t??(s=>s),r.length==0)return-1;let i=Nt(r,e,t);for(;r[i-1]&&t(r[i-1])==e;)i--;return i}function sm(r,e){return!(Object.keys(r).some(t=>r[t]!=e[t])||Object.keys(e).some(t=>r[t]!=e[t]))}function Na(r){try{return Lr.evaluate(r)}catch{return null}}function hr(r,e){let t=r.length;if(r.length!=0)for(;t--;)e(r[t],t)&&r[t].destroy()}function Nu(r){return r==""?"":r.slice(0,1).toUpperCase()+r.slice(1).toLowerCase()}function Uu(r){return r.button==2||r.getModifierState("Control")&&Ii}function HD(){try{return window.self!==window.top}catch{return!0}}function GD(r,e,t,i,s){const n=[];for(let a=0;a1&&(i.innerHTML+=` (${t})`),i.classList.add("waterfall-item"),Ee.messages[e]={type:"",container:i,timeoutID:setTimeout(()=>{i.classList.add("waterfall-exiting")},5e3),clearTimeoutID:setTimeout(()=>{delete this.messages[e],this.view.removeChild(i)},5500),count:t},this.view.appendChild(i)}static createFormatted(e,t){if(this.view==null)return;let i=1;if(this.messages[e]&&this.messages[e].type==t){const n=this.messages[e];clearTimeout(n.timeoutID),clearTimeout(n.clearTimeoutID),i=++n.count,this.view.removeChild(n.container)}const s=document.createElement("div");s.innerHTML=`
${Nu(t)}:
`+e,i>1&&(s.innerHTML+=` (${i})`),s.classList.add("waterfall-item"),console[t](e),Ee.messages[e]={type:t,container:s,timeoutID:setTimeout(()=>{s.classList.add("waterfall-exiting")},5e3),clearTimeoutID:setTimeout(()=>{delete this.messages[e],this.view.removeChild(s)},5500),count:i},this.view.appendChild(s)}}const nm={};function PC(r){let e=nm[r];if(e)return e;e=nm[r]=[];for(let t=0;t<128;t++){const i=String.fromCharCode(t);e.push(i)}for(let t=0;t=55296&&u<=57343?s+="���":s+=String.fromCharCode(u),n+=6;continue}}if((o&248)===240&&n+91114111?s+="����":(h-=65536,s+=String.fromCharCode(55296+(h>>10),56320+(h&1023))),n+=9;continue}}s+="�"}return s})}Hn.defaultChars=";/?:@&=+$,#";Hn.componentChars="";const am={};function BC(r){let e=am[r];if(e)return e;e=am[r]=[];for(let t=0;t<128;t++){const i=String.fromCharCode(t);/^[0-9a-z]$/i.test(i)?e.push(i):e.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2))}for(let t=0;t"u"&&(t=!0);const i=BC(e);let s="";for(let n=0,a=r.length;n=55296&&o<=57343){if(o>=55296&&o<=56319&&n+1=56320&&l<=57343){s+=encodeURIComponent(r[n]+r[n+1]),n++;continue}}s+="%EF%BF%BD";continue}s+=encodeURIComponent(r[n])}return s}io.defaultChars=";/?:@&=+$,-_.!~*'()#";io.componentChars="-_.!~*'()";function Md(r){let e="";return e+=r.protocol||"",e+=r.slashes?"//":"",e+=r.auth?r.auth+"@":"",r.hostname&&r.hostname.indexOf(":")!==-1?e+="["+r.hostname+"]":e+=r.hostname||"",e+=r.port?":"+r.port:"",e+=r.pathname||"",e+=r.search||"",e+=r.hash||"",e}function Ll(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const RC=/^([a-z0-9.+-]+:)/i,FC=/:[0-9]*$/,LC=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,OC=["<",">",'"',"`"," ","\r",` +`," "],NC=["{","}","|","\\","^","`"].concat(OC),UC=["'"].concat(NC),om=["%","/","?",";","#"].concat(UC),lm=["/","?","#"],HC=255,hm=/^[+a-z0-9A-Z_-]{0,63}$/,GC=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,cm={javascript:!0,"javascript:":!0},um={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function kd(r,e){if(r&&r instanceof Ll)return r;const t=new Ll;return t.parse(r,e),t}Ll.prototype.parse=function(r,e){let t,i,s,n=r;if(n=n.trim(),!e&&r.split("#").length===1){const c=LC.exec(n);if(c)return this.pathname=c[1],c[2]&&(this.search=c[2]),this}let a=RC.exec(n);if(a&&(a=a[0],t=a.toLowerCase(),this.protocol=a,n=n.substr(a.length)),(e||a||n.match(/^\/\/[^@\/]+@[^@\/]+/))&&(s=n.substr(0,2)==="//",s&&!(a&&cm[a])&&(n=n.substr(2),this.slashes=!0)),!cm[a]&&(s||a&&!um[a])){let c=-1;for(let p=0;p127?w+="x":w+=b[v];if(!w.match(hm)){const v=p.slice(0,m),y=p.slice(m+1),E=b.match(GC);E&&(v.push(E[1]),y.unshift(E[2])),y.length&&(n=y.join(".")+n),this.hostname=v.join(".");break}}}}this.hostname.length>HC&&(this.hostname=""),f&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const o=n.indexOf("#");o!==-1&&(this.hash=n.substr(o),n=n.slice(0,o));const l=n.indexOf("?");return l!==-1&&(this.search=n.substr(l),n=n.slice(0,l)),n&&(this.pathname=n),um[t]&&this.hostname&&!this.pathname&&(this.pathname=""),this};Ll.prototype.parseHost=function(r){let e=FC.exec(r);e&&(e=e[0],e!==":"&&(this.port=e.substr(1)),r=r.substr(0,r.length-e.length)),r&&(this.hostname=r)};const VC=Object.freeze(Object.defineProperty({__proto__:null,decode:Hn,encode:io,format:Md,parse:kd},Symbol.toStringTag,{value:"Module"})),Eb=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Ab=/[\0-\x1F\x7F-\x9F]/,zC=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,Dd=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,Tb=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,Cb=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,WC=Object.freeze(Object.defineProperty({__proto__:null,Any:Eb,Cc:Ab,Cf:zC,P:Dd,S:Tb,Z:Cb},Symbol.toStringTag,{value:"Module"})),$C=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(r=>r.charCodeAt(0))),jC=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(r=>r.charCodeAt(0)));var uc;const qC=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),YC=(uc=String.fromCodePoint)!==null&&uc!==void 0?uc:function(r){let e="";return r>65535&&(r-=65536,e+=String.fromCharCode(r>>>10&1023|55296),r=56320|r&1023),e+=String.fromCharCode(r),e};function XC(r){var e;return r>=55296&&r<=57343||r>1114111?65533:(e=qC.get(r))!==null&&e!==void 0?e:r}var Dt;(function(r){r[r.NUM=35]="NUM",r[r.SEMI=59]="SEMI",r[r.EQUALS=61]="EQUALS",r[r.ZERO=48]="ZERO",r[r.NINE=57]="NINE",r[r.LOWER_A=97]="LOWER_A",r[r.LOWER_F=102]="LOWER_F",r[r.LOWER_X=120]="LOWER_X",r[r.LOWER_Z=122]="LOWER_Z",r[r.UPPER_A=65]="UPPER_A",r[r.UPPER_F=70]="UPPER_F",r[r.UPPER_Z=90]="UPPER_Z"})(Dt||(Dt={}));const KC=32;var rs;(function(r){r[r.VALUE_LENGTH=49152]="VALUE_LENGTH",r[r.BRANCH_LENGTH=16256]="BRANCH_LENGTH",r[r.JUMP_TABLE=127]="JUMP_TABLE"})(rs||(rs={}));function Hu(r){return r>=Dt.ZERO&&r<=Dt.NINE}function ZC(r){return r>=Dt.UPPER_A&&r<=Dt.UPPER_F||r>=Dt.LOWER_A&&r<=Dt.LOWER_F}function JC(r){return r>=Dt.UPPER_A&&r<=Dt.UPPER_Z||r>=Dt.LOWER_A&&r<=Dt.LOWER_Z||Hu(r)}function QC(r){return r===Dt.EQUALS||JC(r)}var Ct;(function(r){r[r.EntityStart=0]="EntityStart",r[r.NumericStart=1]="NumericStart",r[r.NumericDecimal=2]="NumericDecimal",r[r.NumericHex=3]="NumericHex",r[r.NamedEntity=4]="NamedEntity"})(Ct||(Ct={}));var Kr;(function(r){r[r.Legacy=0]="Legacy",r[r.Strict=1]="Strict",r[r.Attribute=2]="Attribute"})(Kr||(Kr={}));class eS{constructor(e,t,i){this.decodeTree=e,this.emitCodePoint=t,this.errors=i,this.state=Ct.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Kr.Strict}startEntity(e){this.decodeMode=e,this.state=Ct.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case Ct.EntityStart:return e.charCodeAt(t)===Dt.NUM?(this.state=Ct.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=Ct.NamedEntity,this.stateNamedEntity(e,t));case Ct.NumericStart:return this.stateNumericStart(e,t);case Ct.NumericDecimal:return this.stateNumericDecimal(e,t);case Ct.NumericHex:return this.stateNumericHex(e,t);case Ct.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|KC)===Dt.LOWER_X?(this.state=Ct.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=Ct.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,i,s){if(t!==i){const n=i-t;this.result=this.result*Math.pow(s,n)+parseInt(e.substr(t,n),s),this.consumed+=n}}stateNumericHex(e,t){const i=t;for(;t>14;for(;t>14,n!==0){if(a===Dt.SEMI)return this.emitNamedEntityData(this.treeIndex,n,this.consumed+this.excess);this.decodeMode!==Kr.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:t,decodeTree:i}=this,s=(i[t]&rs.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,s,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,i){const{decodeTree:s}=this;return this.emitCodePoint(t===1?s[e]&~rs.VALUE_LENGTH:s[e+1],i),t===3&&this.emitCodePoint(s[e+2],i),i}end(){var e;switch(this.state){case Ct.NamedEntity:return this.result!==0&&(this.decodeMode!==Kr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ct.NumericDecimal:return this.emitNumericEntity(0,2);case Ct.NumericHex:return this.emitNumericEntity(0,3);case Ct.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ct.EntityStart:return 0}}}function Sb(r){let e="";const t=new eS(r,i=>e+=YC(i));return function(s,n){let a=0,o=0;for(;(o=s.indexOf("&",o))>=0;){e+=s.slice(a,o),t.startEntity(n);const c=t.write(s,o+1);if(c<0){a=o+t.end();break}a=o+c,o=c===0?a+1:a}const l=e+s.slice(a);return e="",l}}function tS(r,e,t,i){const s=(e&rs.BRANCH_LENGTH)>>7,n=e&rs.JUMP_TABLE;if(s===0)return n!==0&&i===n?t:-1;if(n){const l=i-n;return l<0||l>=s?-1:r[t+l]-1}let a=t,o=a+s-1;for(;a<=o;){const l=a+o>>>1,c=r[l];if(ci)o=l-1;else return r[l+s]}return-1}const iS=Sb($C);Sb(jC);function Mb(r,e=Kr.Legacy){return iS(r,e)}function rS(r){return Object.prototype.toString.call(r)}function Id(r){return rS(r)==="[object String]"}const sS=Object.prototype.hasOwnProperty;function nS(r,e){return sS.call(r,e)}function hh(r){return Array.prototype.slice.call(arguments,1).forEach(function(t){if(t){if(typeof t!="object")throw new TypeError(t+"must be object");Object.keys(t).forEach(function(i){r[i]=t[i]})}}),r}function kb(r,e,t){return[].concat(r.slice(0,e),t,r.slice(e+1))}function Pd(r){return!(r>=55296&&r<=57343||r>=64976&&r<=65007||(r&65535)===65535||(r&65535)===65534||r>=0&&r<=8||r===11||r>=14&&r<=31||r>=127&&r<=159||r>1114111)}function Ol(r){if(r>65535){r-=65536;const e=55296+(r>>10),t=56320+(r&1023);return String.fromCharCode(e,t)}return String.fromCharCode(r)}const Db=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,aS=/&([a-z#][a-z0-9]{1,31});/gi,oS=new RegExp(Db.source+"|"+aS.source,"gi"),lS=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function hS(r,e){if(e.charCodeAt(0)===35&&lS.test(e)){const i=e[1].toLowerCase()==="x"?parseInt(e.slice(2),16):parseInt(e.slice(1),10);return Pd(i)?Ol(i):r}const t=Mb(r);return t!==r?t:r}function cS(r){return r.indexOf("\\")<0?r:r.replace(Db,"$1")}function Gn(r){return r.indexOf("\\")<0&&r.indexOf("&")<0?r:r.replace(oS,function(e,t,i){return t||hS(e,i)})}const uS=/[&<>"]/,dS=/[&<>"]/g,fS={"&":"&","<":"<",">":">",'"':"""};function pS(r){return fS[r]}function os(r){return uS.test(r)?r.replace(dS,pS):r}const mS=/[.?*+^$[\]\\(){}|-]/g;function gS(r){return r.replace(mS,"\\$&")}function st(r){switch(r){case 9:case 32:return!0}return!1}function Ua(r){if(r>=8192&&r<=8202)return!0;switch(r){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function Ha(r){return Dd.test(r)||Tb.test(r)}function Ga(r){switch(r){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function ch(r){return r=r.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(r=r.replace(/ẞ/g,"ß")),r.toLowerCase().toUpperCase()}const bS={mdurl:VC,ucmicro:WC},yS=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:kb,assign:hh,escapeHtml:os,escapeRE:gS,fromCodePoint:Ol,has:nS,isMdAsciiPunct:Ga,isPunctChar:Ha,isSpace:st,isString:Id,isValidEntityCode:Pd,isWhiteSpace:Ua,lib:bS,normalizeReference:ch,unescapeAll:Gn,unescapeMd:cS},Symbol.toStringTag,{value:"Module"}));function vS(r,e,t){let i,s,n,a;const o=r.posMax,l=r.pos;for(r.pos=e+1,i=1;r.pos32))return n;if(i===41){if(a===0)break;a--}s++}return e===s||a!==0||(n.str=Gn(r.slice(e,s)),n.pos=s,n.ok=!0),n}function xS(r,e,t,i){let s,n=e;const a={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(i)a.str=i.str,a.marker=i.marker;else{if(n>=t)return a;let o=r.charCodeAt(n);if(o!==34&&o!==39&&o!==40)return a;e++,n++,o===40&&(o=41),a.marker=o}for(;n"+os(n.content)+""};pr.code_block=function(r,e,t,i,s){const n=r[e];return""+os(r[e].content)+` +`};pr.fence=function(r,e,t,i,s){const n=r[e],a=n.info?Gn(n.info).trim():"";let o="",l="";if(a){const u=a.split(/(\s+)/g);o=u[0],l=u.slice(2).join("")}let c;if(t.highlight?c=t.highlight(n.content,o,l)||os(n.content):c=os(n.content),c.indexOf("${c} +`}return`
${c}
+`};pr.image=function(r,e,t,i,s){const n=r[e];return n.attrs[n.attrIndex("alt")][1]=s.renderInlineAsText(n.children,t,i),s.renderToken(r,e,t)};pr.hardbreak=function(r,e,t){return t.xhtmlOut?`
+`:`
+`};pr.softbreak=function(r,e,t){return t.breaks?t.xhtmlOut?`
+`:`
+`:` +`};pr.text=function(r,e){return os(r[e].content)};pr.html_block=function(r,e){return r[e].content};pr.html_inline=function(r,e){return r[e].content};function Qn(){this.rules=hh({},pr)}Qn.prototype.renderAttrs=function(e){let t,i,s;if(!e.attrs)return"";for(s="",t=0,i=e.attrs.length;t +`:">",n};Qn.prototype.renderInline=function(r,e,t){let i="";const s=this.rules;for(let n=0,a=r.length;n=0&&(i=this.attrs[t][1]),i};Ui.prototype.attrJoin=function(e,t){const i=this.attrIndex(e);i<0?this.attrPush([e,t]):this.attrs[i][1]=this.attrs[i][1]+" "+t};function Ib(r,e,t){this.src=r,this.env=t,this.tokens=[],this.inlineMode=!1,this.md=e}Ib.prototype.Token=Ui;const ES=/\r\n?|\n/g,AS=/\0/g;function TS(r){let e;e=r.src.replace(ES,` +`),e=e.replace(AS,"�"),r.src=e}function CS(r){let e;r.inlineMode?(e=new r.Token("inline","",0),e.content=r.src,e.map=[0,1],e.children=[],r.tokens.push(e)):r.md.block.parse(r.src,r.md,r.env,r.tokens)}function SS(r){const e=r.tokens;for(let t=0,i=e.length;t\s]/i.test(r)}function kS(r){return/^<\/a\s*>/i.test(r)}function DS(r){const e=r.tokens;if(r.md.options.linkify)for(let t=0,i=e.length;t=0;a--){const o=s[a];if(o.type==="link_close"){for(a--;s[a].level!==o.level&&s[a].type!=="link_open";)a--;continue}if(o.type==="html_inline"&&(MS(o.content)&&n>0&&n--,kS(o.content)&&n++),!(n>0)&&o.type==="text"&&r.md.linkify.test(o.content)){const l=o.content;let c=r.md.linkify.match(l);const u=[];let h=o.level,d=0;c.length>0&&c[0].index===0&&a>0&&s[a-1].type==="text_special"&&(c=c.slice(1));for(let f=0;fd){const E=new r.Token("text","",0);E.content=l.slice(d,b),E.level=h,u.push(E)}const w=new r.Token("link_open","a",1);w.attrs=[["href",m]],w.level=h++,w.markup="linkify",w.info="auto",u.push(w);const v=new r.Token("text","",0);v.content=g,v.level=h,u.push(v);const y=new r.Token("link_close","a",-1);y.level=--h,y.markup="linkify",y.info="auto",u.push(y),d=c[f].lastIndex}if(d=0;t--){const i=r[t];i.type==="text"&&!e&&(i.content=i.content.replace(PS,RS)),i.type==="link_open"&&i.info==="auto"&&e--,i.type==="link_close"&&i.info==="auto"&&e++}}function LS(r){let e=0;for(let t=r.length-1;t>=0;t--){const i=r[t];i.type==="text"&&!e&&Pb.test(i.content)&&(i.content=i.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),i.type==="link_open"&&i.info==="auto"&&e--,i.type==="link_close"&&i.info==="auto"&&e++}}function OS(r){let e;if(r.md.options.typographer)for(e=r.tokens.length-1;e>=0;e--)r.tokens[e].type==="inline"&&(IS.test(r.tokens[e].content)&&FS(r.tokens[e].children),Pb.test(r.tokens[e].content)&&LS(r.tokens[e].children))}const NS=/['"]/,dm=/['"]/g,fm="’";function Ho(r,e,t){return r.slice(0,e)+t+r.slice(e+1)}function US(r,e){let t;const i=[];for(let s=0;s=0&&!(i[t].level<=a);t--);if(i.length=t+1,n.type!=="text")continue;let o=n.content,l=0,c=o.length;e:for(;l=0)p=o.charCodeAt(u.index-1);else for(t=s-1;t>=0&&!(r[t].type==="softbreak"||r[t].type==="hardbreak");t--)if(r[t].content){p=r[t].content.charCodeAt(r[t].content.length-1);break}let m=32;if(l=48&&p<=57&&(d=h=!1),h&&d&&(h=g,d=b),!h&&!d){f&&(n.content=Ho(n.content,u.index,fm));continue}if(d)for(t=i.length-1;t>=0;t--){let y=i[t];if(i[t].level=0;e--)r.tokens[e].type!=="inline"||!NS.test(r.tokens[e].content)||US(r.tokens[e].children,r)}function GS(r){let e,t;const i=r.tokens,s=i.length;for(let n=0;n0&&this.level++,this.tokens.push(i),i};mr.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]};mr.prototype.skipEmptyLines=function(e){for(let t=this.lineMax;et;)if(!st(this.src.charCodeAt(--e)))return e+1;return e};mr.prototype.skipChars=function(e,t){for(let i=this.src.length;ei;)if(t!==this.src.charCodeAt(--e))return e+1;return e};mr.prototype.getLines=function(e,t,i,s){if(e>=t)return"";const n=new Array(t-e);for(let a=0,o=e;oi?n[a]=new Array(l-i+1).join(" ")+this.src.slice(u,h):n[a]=this.src.slice(u,h)}return n.join("")};mr.prototype.Token=Ui;const VS=65536;function fc(r,e){const t=r.bMarks[e]+r.tShift[e],i=r.eMarks[e];return r.src.slice(t,i)}function pm(r){const e=[],t=r.length;let i=0,s=r.charCodeAt(i),n=!1,a=0,o="";for(;it)return!1;let s=e+1;if(r.sCount[s]=4)return!1;let n=r.bMarks[s]+r.tShift[s];if(n>=r.eMarks[s])return!1;const a=r.src.charCodeAt(n++);if(a!==124&&a!==45&&a!==58||n>=r.eMarks[s])return!1;const o=r.src.charCodeAt(n++);if(o!==124&&o!==45&&o!==58&&!st(o)||a===45&&st(o))return!1;for(;n=4)return!1;c=pm(l),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop();const h=c.length;if(h===0||h!==u.length)return!1;if(i)return!0;const d=r.parentType;r.parentType="table";const f=r.md.block.ruler.getRules("blockquote"),p=r.push("table_open","table",1),m=[e,0];p.map=m;const g=r.push("thead_open","thead",1);g.map=[e,e+1];const b=r.push("tr_open","tr",1);b.map=[e,e+1];for(let y=0;y=4||(c=pm(l),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop(),v+=h-c.length,v>VS))break;if(s===e+2){const C=r.push("tbody_open","tbody",1);C.map=w=[e+2,0]}const E=r.push("tr_open","tr",1);E.map=[s,s+1];for(let C=0;C=4){i++,s=i;continue}break}r.line=s;const n=r.push("code_block","code",0);return n.content=r.getLines(e,s,4+r.blkIndent,!1)+` +`,n.map=[e,r.line],!0}function $S(r,e,t,i){let s=r.bMarks[e]+r.tShift[e],n=r.eMarks[e];if(r.sCount[e]-r.blkIndent>=4||s+3>n)return!1;const a=r.src.charCodeAt(s);if(a!==126&&a!==96)return!1;let o=s;s=r.skipChars(s,a);let l=s-o;if(l<3)return!1;const c=r.src.slice(o,s),u=r.src.slice(s,n);if(a===96&&u.indexOf(String.fromCharCode(a))>=0)return!1;if(i)return!0;let h=e,d=!1;for(;h++,!(h>=t||(s=o=r.bMarks[h]+r.tShift[h],n=r.eMarks[h],s=4)&&(s=r.skipChars(s,a),!(s-o=4||r.src.charCodeAt(s)!==62)return!1;if(i)return!0;const o=[],l=[],c=[],u=[],h=r.md.block.ruler.getRules("blockquote"),d=r.parentType;r.parentType="blockquote";let f=!1,p;for(p=e;p=n)break;if(r.src.charCodeAt(s++)===62&&!v){let E=r.sCount[p]+1,C,k;r.src.charCodeAt(s)===32?(s++,E++,k=!1,C=!0):r.src.charCodeAt(s)===9?(C=!0,(r.bsCount[p]+E)%4===3?(s++,E++,k=!1):k=!0):C=!1;let B=E;for(o.push(r.bMarks[p]),r.bMarks[p]=s;s=n,l.push(r.bsCount[p]),r.bsCount[p]=r.sCount[p]+1+(C?1:0),c.push(r.sCount[p]),r.sCount[p]=B-E,u.push(r.tShift[p]),r.tShift[p]=s-r.bMarks[p];continue}if(f)break;let y=!1;for(let E=0,C=h.length;E";const b=[e,0];g.map=b,r.md.block.tokenize(r,e,p);const w=r.push("blockquote_close","blockquote",-1);w.markup=">",r.lineMax=a,r.parentType=d,b[1]=r.line;for(let v=0;v=4)return!1;let n=r.bMarks[e]+r.tShift[e];const a=r.src.charCodeAt(n++);if(a!==42&&a!==45&&a!==95)return!1;let o=1;for(;n=i)return-1;let n=r.src.charCodeAt(s++);if(n<48||n>57)return-1;for(;;){if(s>=i)return-1;if(n=r.src.charCodeAt(s++),n>=48&&n<=57){if(s-t>=10)return-1;continue}if(n===41||n===46)break;return-1}return s=4||r.listIndent>=0&&r.sCount[l]-r.listIndent>=4&&r.sCount[l]=r.blkIndent&&(u=!0);let h,d,f;if((f=gm(r,l))>=0){if(h=!0,a=r.bMarks[l]+r.tShift[l],d=Number(r.src.slice(a,f-1)),u&&d!==1)return!1}else if((f=mm(r,l))>=0)h=!1;else return!1;if(u&&r.skipSpaces(f)>=r.eMarks[l])return!1;if(i)return!0;const p=r.src.charCodeAt(f-1),m=r.tokens.length;h?(o=r.push("ordered_list_open","ol",1),d!==1&&(o.attrs=[["start",d]])):o=r.push("bullet_list_open","ul",1);const g=[l,0];o.map=g,o.markup=String.fromCharCode(p);let b=!1;const w=r.md.block.ruler.getRules("list"),v=r.parentType;for(r.parentType="list";l=s?k=1:k=E-y,k>4&&(k=1);const B=y+k;o=r.push("list_item_open","li",1),o.markup=String.fromCharCode(p);const M=[l,0];o.map=M,h&&(o.info=r.src.slice(a,f-1));const U=r.tight,V=r.tShift[l],T=r.sCount[l],S=r.listIndent;if(r.listIndent=r.blkIndent,r.blkIndent=B,r.tight=!0,r.tShift[l]=C-r.bMarks[l],r.sCount[l]=E,C>=s&&r.isEmpty(l+1)?r.line=Math.min(r.line+2,t):r.md.block.tokenize(r,l,t,!0),(!r.tight||b)&&(c=!1),b=r.line-l>1&&r.isEmpty(r.line-1),r.blkIndent=r.listIndent,r.listIndent=S,r.tShift[l]=V,r.sCount[l]=T,r.tight=U,o=r.push("list_item_close","li",-1),o.markup=String.fromCharCode(p),l=r.line,M[1]=l,l>=t||r.sCount[l]=4)break;let _=!1;for(let R=0,q=w.length;R=4||r.src.charCodeAt(s)!==91)return!1;function o(w){const v=r.lineMax;if(w>=v||r.isEmpty(w))return null;let y=!1;if(r.sCount[w]-r.blkIndent>3&&(y=!0),r.sCount[w]<0&&(y=!0),!y){const k=r.md.block.ruler.getRules("reference"),B=r.parentType;r.parentType="reference";let M=!1;for(let U=0,V=k.length;U"u"&&(r.env.references={}),typeof r.env.references[b]>"u"&&(r.env.references[b]={title:g,href:h}),r.line=a),!0):!1}const ZS=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],JS="[a-zA-Z_:][a-zA-Z0-9:._-]*",QS="[^\"'=<>`\\x00-\\x20]+",eM="'[^']*'",tM='"[^"]*"',iM="(?:"+QS+"|"+eM+"|"+tM+")",rM="(?:\\s+"+JS+"(?:\\s*=\\s*"+iM+")?)",Bb="<[A-Za-z][A-Za-z0-9\\-]*"+rM+"*\\s*\\/?>",Rb="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",sM="",nM="<[?][\\s\\S]*?[?]>",aM="]*>",oM="",lM=new RegExp("^(?:"+Bb+"|"+Rb+"|"+sM+"|"+nM+"|"+aM+"|"+oM+")"),hM=new RegExp("^(?:"+Bb+"|"+Rb+")"),Qs=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(hM.source+"\\s*$"),/^$/,!1]];function cM(r,e,t,i){let s=r.bMarks[e]+r.tShift[e],n=r.eMarks[e];if(r.sCount[e]-r.blkIndent>=4||!r.md.options.html||r.src.charCodeAt(s)!==60)return!1;let a=r.src.slice(s,n),o=0;for(;o=4)return!1;let a=r.src.charCodeAt(s);if(a!==35||s>=n)return!1;let o=1;for(a=r.src.charCodeAt(++s);a===35&&s6||ss&&st(r.src.charCodeAt(l-1))&&(n=l),r.line=e+1;const c=r.push("heading_open","h"+String(o),1);c.markup="########".slice(0,o),c.map=[e,r.line];const u=r.push("inline","",0);u.content=r.src.slice(s,n).trim(),u.map=[e,r.line],u.children=[];const h=r.push("heading_close","h"+String(o),-1);return h.markup="########".slice(0,o),!0}function dM(r,e,t){const i=r.md.block.ruler.getRules("paragraph");if(r.sCount[e]-r.blkIndent>=4)return!1;const s=r.parentType;r.parentType="paragraph";let n=0,a,o=e+1;for(;o3)continue;if(r.sCount[o]>=r.blkIndent){let f=r.bMarks[o]+r.tShift[o];const p=r.eMarks[o];if(f=p))){n=a===61?1:2;break}}if(r.sCount[o]<0)continue;let d=!1;for(let f=0,p=i.length;f3||r.sCount[n]<0)continue;let c=!1;for(let u=0,h=i.length;u=t||r.sCount[a]=n){r.line=t;break}const l=r.line;let c=!1;for(let u=0;u=r.line)throw new Error("block rule didn't increment state.line");break}if(!c)throw new Error("none of the block rules matched");r.tight=!o,r.isEmpty(r.line-1)&&(o=!0),a=r.line,a0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],s={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(i),this.tokens_meta.push(s),i};ro.prototype.scanDelims=function(r,e){const t=this.posMax,i=this.src.charCodeAt(r),s=r>0?this.src.charCodeAt(r-1):32;let n=r;for(;n0)return!1;const t=r.pos,i=r.posMax;if(t+3>i||r.src.charCodeAt(t)!==58||r.src.charCodeAt(t+1)!==47||r.src.charCodeAt(t+2)!==47)return!1;const s=r.pending.match(gM);if(!s)return!1;const n=s[1],a=r.md.linkify.matchAtStart(r.src.slice(t-n.length));if(!a)return!1;let o=a.url;if(o.length<=n.length)return!1;o=o.replace(/\*+$/,"");const l=r.md.normalizeLink(o);if(!r.md.validateLink(l))return!1;if(!e){r.pending=r.pending.slice(0,-n.length);const c=r.push("link_open","a",1);c.attrs=[["href",l]],c.markup="linkify",c.info="auto";const u=r.push("text","",0);u.content=r.md.normalizeLinkText(o);const h=r.push("link_close","a",-1);h.markup="linkify",h.info="auto"}return r.pos+=o.length-n.length,!0}function yM(r,e){let t=r.pos;if(r.src.charCodeAt(t)!==10)return!1;const i=r.pending.length-1,s=r.posMax;if(!e)if(i>=0&&r.pending.charCodeAt(i)===32)if(i>=1&&r.pending.charCodeAt(i-1)===32){let n=i-1;for(;n>=1&&r.pending.charCodeAt(n-1)===32;)n--;r.pending=r.pending.slice(0,n),r.push("hardbreak","br",0)}else r.pending=r.pending.slice(0,-1),r.push("softbreak","br",0);else r.push("softbreak","br",0);for(t++;t?@[]^_`{|}~-".split("").forEach(function(r){Rd[r.charCodeAt(0)]=1});function vM(r,e){let t=r.pos;const i=r.posMax;if(r.src.charCodeAt(t)!==92||(t++,t>=i))return!1;let s=r.src.charCodeAt(t);if(s===10){for(e||r.push("hardbreak","br",0),t++;t=55296&&s<=56319&&t+1=56320&&o<=57343&&(n+=r.src[t+1],t++)}const a="\\"+n;if(!e){const o=r.push("text_special","",0);s<256&&Rd[s]!==0?o.content=n:o.content=a,o.markup=a,o.info="escape"}return r.pos=t+1,!0}function wM(r,e){let t=r.pos;if(r.src.charCodeAt(t)!==96)return!1;const s=t;t++;const n=r.posMax;for(;t=0;i--){const s=e[i];if(s.marker!==95&&s.marker!==42||s.end===-1)continue;const n=e[s.end],a=i>0&&e[i-1].end===s.end+1&&e[i-1].marker===s.marker&&e[i-1].token===s.token-1&&e[s.end+1].token===n.token+1,o=String.fromCharCode(s.marker),l=r.tokens[s.token];l.type=a?"strong_open":"em_open",l.tag=a?"strong":"em",l.nesting=1,l.markup=a?o+o:o,l.content="";const c=r.tokens[n.token];c.type=a?"strong_close":"em_close",c.tag=a?"strong":"em",c.nesting=-1,c.markup=a?o+o:o,c.content="",a&&(r.tokens[e[i-1].token].content="",r.tokens[e[s.end+1].token].content="",i--)}}function AM(r){const e=r.tokens_meta,t=r.tokens_meta.length;ym(r,r.delimiters);for(let i=0;i=h)return!1;if(l=p,s=r.md.helpers.parseLinkDestination(r.src,p,r.posMax),s.ok){for(a=r.md.normalizeLink(s.str),r.md.validateLink(a)?p=s.pos:a="",l=p;p=h||r.src.charCodeAt(p)!==41)&&(c=!0),p++}if(c){if(typeof r.env.references>"u")return!1;if(p=0?i=r.src.slice(l,p++):p=f+1):p=f+1,i||(i=r.src.slice(d,f)),n=r.env.references[ch(i)],!n)return r.pos=u,!1;a=n.href,o=n.title}if(!e){r.pos=d,r.posMax=f;const m=r.push("link_open","a",1),g=[["href",a]];m.attrs=g,o&&g.push(["title",o]),r.linkLevel++,r.md.inline.tokenize(r),r.linkLevel--,r.push("link_close","a",-1)}return r.pos=p,r.posMax=h,!0}function CM(r,e){let t,i,s,n,a,o,l,c,u="";const h=r.pos,d=r.posMax;if(r.src.charCodeAt(r.pos)!==33||r.src.charCodeAt(r.pos+1)!==91)return!1;const f=r.pos+2,p=r.md.helpers.parseLinkLabel(r,r.pos+1,!1);if(p<0)return!1;if(n=p+1,n=d)return!1;for(c=n,o=r.md.helpers.parseLinkDestination(r.src,n,r.posMax),o.ok&&(u=r.md.normalizeLink(o.str),r.md.validateLink(u)?n=o.pos:u=""),c=n;n=d||r.src.charCodeAt(n)!==41)return r.pos=h,!1;n++}else{if(typeof r.env.references>"u")return!1;if(n=0?s=r.src.slice(c,n++):n=p+1):n=p+1,s||(s=r.src.slice(f,p)),a=r.env.references[ch(s)],!a)return r.pos=h,!1;u=a.href,l=a.title}if(!e){i=r.src.slice(f,p);const m=[];r.md.inline.parse(i,r.md,r.env,m);const g=r.push("image","img",0),b=[["src",u],["alt",""]];g.attrs=b,g.children=m,g.content=i,l&&b.push(["title",l])}return r.pos=n,r.posMax=d,!0}const SM=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,MM=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function kM(r,e){let t=r.pos;if(r.src.charCodeAt(t)!==60)return!1;const i=r.pos,s=r.posMax;for(;;){if(++t>=s)return!1;const a=r.src.charCodeAt(t);if(a===60)return!1;if(a===62)break}const n=r.src.slice(i+1,t);if(MM.test(n)){const a=r.md.normalizeLink(n);if(!r.md.validateLink(a))return!1;if(!e){const o=r.push("link_open","a",1);o.attrs=[["href",a]],o.markup="autolink",o.info="auto";const l=r.push("text","",0);l.content=r.md.normalizeLinkText(n);const c=r.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return r.pos+=n.length+2,!0}if(SM.test(n)){const a=r.md.normalizeLink("mailto:"+n);if(!r.md.validateLink(a))return!1;if(!e){const o=r.push("link_open","a",1);o.attrs=[["href",a]],o.markup="autolink",o.info="auto";const l=r.push("text","",0);l.content=r.md.normalizeLinkText(n);const c=r.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return r.pos+=n.length+2,!0}return!1}function DM(r){return/^\s]/i.test(r)}function IM(r){return/^<\/a\s*>/i.test(r)}function PM(r){const e=r|32;return e>=97&&e<=122}function BM(r,e){if(!r.md.options.html)return!1;const t=r.posMax,i=r.pos;if(r.src.charCodeAt(i)!==60||i+2>=t)return!1;const s=r.src.charCodeAt(i+1);if(s!==33&&s!==63&&s!==47&&!PM(s))return!1;const n=r.src.slice(i).match(lM);if(!n)return!1;if(!e){const a=r.push("html_inline","",0);a.content=n[0],DM(a.content)&&r.linkLevel++,IM(a.content)&&r.linkLevel--}return r.pos+=n[0].length,!0}const RM=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,FM=/^&([a-z][a-z0-9]{1,31});/i;function LM(r,e){const t=r.pos,i=r.posMax;if(r.src.charCodeAt(t)!==38||t+1>=i)return!1;if(r.src.charCodeAt(t+1)===35){const n=r.src.slice(t).match(RM);if(n){if(!e){const a=n[1][0].toLowerCase()==="x"?parseInt(n[1].slice(1),16):parseInt(n[1],10),o=r.push("text_special","",0);o.content=Pd(a)?Ol(a):Ol(65533),o.markup=n[0],o.info="entity"}return r.pos+=n[0].length,!0}}else{const n=r.src.slice(t).match(FM);if(n){const a=Mb(n[0]);if(a!==n[0]){if(!e){const o=r.push("text_special","",0);o.content=a,o.markup=n[0],o.info="entity"}return r.pos+=n[0].length,!0}}}return!1}function vm(r){const e={},t=r.length;if(!t)return;let i=0,s=-2;const n=[];for(let a=0;al;c-=n[c]+1){const h=r[c];if(h.marker===o.marker&&h.open&&h.end<0){let d=!1;if((h.close||o.open)&&(h.length+o.length)%3===0&&(h.length%3!==0||o.length%3!==0)&&(d=!0),!d){const f=c>0&&!r[c-1].open?n[c-1]+1:0;n[a]=a-c+f,n[c]=f,o.open=!1,h.end=a,h.close=!1,u=-1,s=-2;break}}}u!==-1&&(e[o.marker][(o.open?3:0)+(o.length||0)%3]=u)}}function OM(r){const e=r.tokens_meta,t=r.tokens_meta.length;vm(r.delimiters);for(let i=0;i0&&i++,s[e].type==="text"&&e+1=r.pos)throw new Error("inline rule didn't increment state.pos");break}}else r.pos=r.posMax;a||r.pos++,n[e]=r.pos};so.prototype.tokenize=function(r){const e=this.ruler.getRules(""),t=e.length,i=r.posMax,s=r.md.options.maxNesting;for(;r.pos=r.pos)throw new Error("inline rule didn't increment state.pos");break}}if(a){if(r.pos>=i)break;continue}r.pending+=r.src[r.pos++]}r.pending&&r.pushPending()};so.prototype.parse=function(r,e,t,i){const s=new this.State(r,e,t,i);this.tokenize(s);const n=this.ruler2.getRules(""),a=n.length;for(let o=0;o|$))",e.tpl_email_fuzzy="(^|"+t+'|"|\\(|'+e.src_ZCc+")("+e.src_email_name+"@"+e.tpl_host_fuzzy_strict+")",e.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_fuzzy_strict+e.src_path+")",e.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_no_ip_fuzzy_strict+e.src_path+")",e}function Gu(r){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(i){r[i]=t[i]})}),r}function dh(r){return Object.prototype.toString.call(r)}function HM(r){return dh(r)==="[object String]"}function GM(r){return dh(r)==="[object Object]"}function VM(r){return dh(r)==="[object RegExp]"}function wm(r){return dh(r)==="[object Function]"}function zM(r){return r.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const Ob={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function WM(r){return Object.keys(r||{}).reduce(function(e,t){return e||Ob.hasOwnProperty(t)},!1)}const $M={"http:":{validate:function(r,e,t){const i=r.slice(e);return t.re.http||(t.re.http=new RegExp("^\\/\\/"+t.re.src_auth+t.re.src_host_port_strict+t.re.src_path,"i")),t.re.http.test(i)?i.match(t.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(r,e,t){const i=r.slice(e);return t.re.no_http||(t.re.no_http=new RegExp("^"+t.re.src_auth+"(?:localhost|(?:(?:"+t.re.src_domain+")\\.)+"+t.re.src_domain_root+")"+t.re.src_port+t.re.src_host_terminator+t.re.src_path,"i")),t.re.no_http.test(i)?e>=3&&r[e-3]===":"||e>=3&&r[e-3]==="/"?0:i.match(t.re.no_http)[0].length:0}},"mailto:":{validate:function(r,e,t){const i=r.slice(e);return t.re.mailto||(t.re.mailto=new RegExp("^"+t.re.src_email_name+"@"+t.re.src_host_strict,"i")),t.re.mailto.test(i)?i.match(t.re.mailto)[0].length:0}}},jM="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",qM="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function YM(r){r.__index__=-1,r.__text_cache__=""}function XM(r){return function(e,t){const i=e.slice(t);return r.test(i)?i.match(r)[0].length:0}}function xm(){return function(r,e){e.normalize(r)}}function Nl(r){const e=r.re=UM(r.__opts__),t=r.__tlds__.slice();r.onCompile(),r.__tlds_replaced__||t.push(jM),t.push(e.src_xn),e.src_tlds=t.join("|");function i(o){return o.replace("%TLDS%",e.src_tlds)}e.email_fuzzy=RegExp(i(e.tpl_email_fuzzy),"i"),e.link_fuzzy=RegExp(i(e.tpl_link_fuzzy),"i"),e.link_no_ip_fuzzy=RegExp(i(e.tpl_link_no_ip_fuzzy),"i"),e.host_fuzzy_test=RegExp(i(e.tpl_host_fuzzy_test),"i");const s=[];r.__compiled__={};function n(o,l){throw new Error('(LinkifyIt) Invalid schema "'+o+'": '+l)}Object.keys(r.__schemas__).forEach(function(o){const l=r.__schemas__[o];if(l===null)return;const c={validate:null,link:null};if(r.__compiled__[o]=c,GM(l)){VM(l.validate)?c.validate=XM(l.validate):wm(l.validate)?c.validate=l.validate:n(o,l),wm(l.normalize)?c.normalize=l.normalize:l.normalize?n(o,l):c.normalize=xm();return}if(HM(l)){s.push(o);return}n(o,l)}),s.forEach(function(o){r.__compiled__[r.__schemas__[o]]&&(r.__compiled__[o].validate=r.__compiled__[r.__schemas__[o]].validate,r.__compiled__[o].normalize=r.__compiled__[r.__schemas__[o]].normalize)}),r.__compiled__[""]={validate:null,normalize:xm()};const a=Object.keys(r.__compiled__).filter(function(o){return o.length>0&&r.__compiled__[o]}).map(zM).join("|");r.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+a+")","i"),r.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+a+")","ig"),r.re.schema_at_start=RegExp("^"+r.re.schema_search.source,"i"),r.re.pretest=RegExp("("+r.re.schema_test.source+")|("+r.re.host_fuzzy_test.source+")|@","i"),YM(r)}function KM(r,e){const t=r.__index__,i=r.__last_index__,s=r.__text_cache__.slice(t,i);this.schema=r.__schema__.toLowerCase(),this.index=t+e,this.lastIndex=i+e,this.raw=s,this.text=s,this.url=s}function Vu(r,e){const t=new KM(r,e);return r.__compiled__[t.schema].normalize(t,r),t}function ii(r,e){if(!(this instanceof ii))return new ii(r,e);e||WM(r)&&(e=r,r={}),this.__opts__=Gu({},Ob,e),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=Gu({},$M,r),this.__compiled__={},this.__tlds__=qM,this.__tlds_replaced__=!1,this.re={},Nl(this)}ii.prototype.add=function(e,t){return this.__schemas__[e]=t,Nl(this),this};ii.prototype.set=function(e){return this.__opts__=Gu(this.__opts__,e),this};ii.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;let t,i,s,n,a,o,l,c,u;if(this.re.schema_test.test(e)){for(l=this.re.schema_search,l.lastIndex=0;(t=l.exec(e))!==null;)if(n=this.testSchemaAt(e,t[2],l.lastIndex),n){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+n;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(c=e.search(this.re.host_fuzzy_test),c>=0&&(this.__index__<0||c=0&&(s=e.match(this.re.email_fuzzy))!==null&&(a=s.index+s[1].length,o=s.index+s[0].length,(this.__index__<0||athis.__last_index__)&&(this.__schema__="mailto:",this.__index__=a,this.__last_index__=o))),this.__index__>=0};ii.prototype.pretest=function(e){return this.re.pretest.test(e)};ii.prototype.testSchemaAt=function(e,t,i){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,i,this):0};ii.prototype.match=function(e){const t=[];let i=0;this.__index__>=0&&this.__text_cache__===e&&(t.push(Vu(this,i)),i=this.__last_index__);let s=i?e.slice(i):e;for(;this.test(s);)t.push(Vu(this,i)),s=s.slice(this.__last_index__),i+=this.__last_index__;return t.length?t:null};ii.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;const t=this.re.schema_at_start.exec(e);if(!t)return null;const i=this.testSchemaAt(e,t[2],t[0].length);return i?(this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+i,Vu(this,0)):null};ii.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(i,s,n){return i!==n[s-1]}).reverse(),Nl(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,Nl(this),this)};ii.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url="mailto:"+e.url)};ii.prototype.onCompile=function(){};const Mn=2147483647,ir=36,Fd=1,Va=26,ZM=38,JM=700,Nb=72,Ub=128,Hb="-",QM=/^xn--/,e3=/[^\0-\x7F]/,t3=/[\x2E\u3002\uFF0E\uFF61]/g,i3={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},gc=ir-Fd,rr=Math.floor,bc=String.fromCharCode;function qr(r){throw new RangeError(i3[r])}function r3(r,e){const t=[];let i=r.length;for(;i--;)t[i]=e(r[i]);return t}function Gb(r,e){const t=r.split("@");let i="";t.length>1&&(i=t[0]+"@",r=t[1]),r=r.replace(t3,".");const s=r.split("."),n=r3(s,e).join(".");return i+n}function Vb(r){const e=[];let t=0;const i=r.length;for(;t=55296&&s<=56319&&tString.fromCodePoint(...r),n3=function(r){return r>=48&&r<58?26+(r-48):r>=65&&r<91?r-65:r>=97&&r<123?r-97:ir},_m=function(r,e){return r+22+75*(r<26)-((e!=0)<<5)},zb=function(r,e,t){let i=0;for(r=t?rr(r/JM):r>>1,r+=rr(r/e);r>gc*Va>>1;i+=ir)r=rr(r/gc);return rr(i+(gc+1)*r/(r+ZM))},Wb=function(r){const e=[],t=r.length;let i=0,s=Ub,n=Nb,a=r.lastIndexOf(Hb);a<0&&(a=0);for(let o=0;o=128&&qr("not-basic"),e.push(r.charCodeAt(o));for(let o=a>0?a+1:0;o=t&&qr("invalid-input");const d=n3(r.charCodeAt(o++));d>=ir&&qr("invalid-input"),d>rr((Mn-i)/u)&&qr("overflow"),i+=d*u;const f=h<=n?Fd:h>=n+Va?Va:h-n;if(drr(Mn/p)&&qr("overflow"),u*=p}const c=e.length+1;n=zb(i-l,c,l==0),rr(i/c)>Mn-s&&qr("overflow"),s+=rr(i/c),i%=c,e.splice(i++,0,s)}return String.fromCodePoint(...e)},$b=function(r){const e=[];r=Vb(r);const t=r.length;let i=Ub,s=0,n=Nb;for(const l of r)l<128&&e.push(bc(l));const a=e.length;let o=a;for(a&&e.push(Hb);o=i&&urr((Mn-s)/c)&&qr("overflow"),s+=(l-i)*c,i=l;for(const u of r)if(uMn&&qr("overflow"),u===i){let h=s;for(let d=ir;;d+=ir){const f=d<=n?Fd:d>=n+Va?Va:d-n;if(h=0))try{e.hostname=jb.toASCII(e.hostname)}catch{}return io(Md(e))}function g3(r){const e=kd(r,!0);if(e.hostname&&(!e.protocol||qb.indexOf(e.protocol)>=0))try{e.hostname=jb.toUnicode(e.hostname)}catch{}return Hn(Md(e),Hn.defaultChars+"%")}function xi(r,e){if(!(this instanceof xi))return new xi(r,e);e||Id(r)||(e=r||{},r="default"),this.inline=new so,this.block=new uh,this.core=new Bd,this.renderer=new Qn,this.linkify=new ii,this.validateLink=p3,this.normalizeLink=m3,this.normalizeLinkText=g3,this.utils=yS,this.helpers=hh({},_S),this.options={},this.configure(r),e&&this.set(e)}xi.prototype.set=function(r){return hh(this.options,r),this};xi.prototype.configure=function(r){const e=this;if(Id(r)){const t=r;if(r=u3[t],!r)throw new Error('Wrong `markdown-it` preset "'+t+'", check name')}if(!r)throw new Error("Wrong `markdown-it` preset, can't be empty");return r.options&&e.set(r.options),r.components&&Object.keys(r.components).forEach(function(t){r.components[t].rules&&e[t].ruler.enableOnly(r.components[t].rules),r.components[t].rules2&&e[t].ruler2.enableOnly(r.components[t].rules2)}),this};xi.prototype.enable=function(r,e){let t=[];Array.isArray(r)||(r=[r]),["core","block","inline"].forEach(function(s){t=t.concat(this[s].ruler.enable(r,!0))},this),t=t.concat(this.inline.ruler2.enable(r,!0));const i=r.filter(function(s){return t.indexOf(s)<0});if(i.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+i);return this};xi.prototype.disable=function(r,e){let t=[];Array.isArray(r)||(r=[r]),["core","block","inline"].forEach(function(s){t=t.concat(this[s].ruler.disable(r,!0))},this),t=t.concat(this.inline.ruler2.disable(r,!0));const i=r.filter(function(s){return t.indexOf(s)<0});if(i.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+i);return this};xi.prototype.use=function(r){const e=[this].concat(Array.prototype.slice.call(arguments,1));return r.apply(r,e),this};xi.prototype.parse=function(r,e){if(typeof r!="string")throw new Error("Input data should be a String");const t=new this.core.State(r,this,e);return this.core.process(t),t.tokens};xi.prototype.render=function(r,e){return e=e||{},this.renderer.render(this.parse(r,e),this.options,e)};xi.prototype.parseInline=function(r,e){const t=new this.core.State(r,this,e);return t.inlineMode=!0,this.core.process(t),t.tokens};xi.prototype.renderInline=function(r,e){return e=e||{},this.renderer.render(this.parseInline(r,e),this.options,e)};function $t(r,e,t){return r*(1-t)+e*t}function Vt(r,e,t){return(t-r)/(e-r)}function ae(r,e){return Math.round(r*Math.pow(10,e))/Math.pow(10,e)}function Oe(r,e,t){return Math.max(e,Math.min(t,r))}function Yb(r){if(r.length==0)return 0;const e=r.length,t=r.reduce((i,s)=>i+s)/e;return Math.sqrt(r.map(i=>Math.pow(i-t,2)).reduce((i,s)=>i+s)/e)}function fh(r){if(r.length==0)return 0;r=[...r],r.sort((t,i)=>t-i);const e=Math.floor(r.length/2);return r.length%2?r[e]:(r[e-1]+r[e])/2}function b3(r){return r.length==0?0:r.reduce((e,t)=>e+t)/r.length}function Xb(r,e){return e?Xb(e,r%e):e===0?r:NaN}function Kb(r,e){return r*e/Xb(r,e)}function Em(r){let e=1;for(let t=0;te&&(e=t);return e}class y3 extends HTMLDivElement{_width;_height;_color;_svg;loadSVG(e){this.innerHTML=e,this._svg=this.children[0],this.updateStyles()}updateStyles(){this._svg&&(this.style.width="",this.style.height="",this._width!==void 0&&(this._svg.style.width=this._width+"px"),this._height!==void 0&&(this._svg.style.height=this._height+"px"),this._color!==void 0&&(this._svg.style.color=this._color))}get width(){return this._width}set width(e){e!==void 0&&(this._width=e,this.updateStyles())}get height(){return this._height}set height(e){e!==void 0&&(this._height=e,this.updateStyles())}get color(){return this._color}set color(e){e!==void 0&&(this._color=e,this.updateStyles())}}class Ce{static cache=new Map;static pendingWrappers=new Map;static getIcon(e,t,i,s){const n=document.createElement("div");if(Object.setPrototypeOf(n,y3.prototype),n.loadSVG("
"),n.classList.add("icon"),this.cache.has(e))n.loadSVG(this.cache.get(e));else{const a=!this.pendingWrappers.has(e);this.pendingWrappers.has(e)||this.pendingWrappers.set(e,[]),this.pendingWrappers.get(e).push(n),a&&this.fetchIcon(e)}return n.width=t,i===void 0&&t!==void 0&&(i=t),n.height=i,n.color=s,n}static fetchIcon(e){fetch(`/smeditor/assets/svg/${e}.svg`).then(t=>t.text()).then(t=>{this.cache.set(e,t),this.pendingWrappers.get(e).forEach(i=>{i.loadSVG(t)}),this.pendingWrappers.set(e,[])})}}class Tt{windowManager;options;windowElement;viewElement;constructor(e){this.options=e;const t=document.createElement("div"),i=document.createElement("div"),s=document.createElement("div"),n=document.createElement("div");if(t.appendChild(s),t.appendChild(i),t.style.width=e.width+"px",t.style.left=window.innerWidth/2-e.width/2+"px",t.style.top=window.innerHeight/2-e.height/2+"px",t.classList.add("unselectable","window"),e.win_id&&(t.dataset.win_id=e.win_id),i.classList.add("view"),i.style.height=e.height+"px",i.style.width=e.width+"px",s.classList.add("navbar"),e.title!==""&&s.appendChild(n),!e.disableClose){const a=Ce.getIcon("MINIMIZE",15),o=Ce.getIcon("CLOSE_WINDOW",15);a.classList.add("unselectable"),a.draggable=!1,a.onclick=()=>{i.style.height!="0px"?i.style.height="0px":i.style.height=e.height+"px",this.clampPosition()},o.classList.add("unselectable"),o.draggable=!1,o.onclick=()=>this.closeWindow(),s.appendChild(a),s.appendChild(o)}n.innerText=e.title,n.classList.add("title"),t.addEventListener("mousedown",()=>this.focus()),e.blocking&&(window.addEventListener("mousedown",this.block,!0),document.getElementById("blocker").style.display="block",t.dataset.blocking="block"),n.addEventListener("mousedown",()=>{window.addEventListener("mousemove",this.handleDrag),window.addEventListener("mouseup",()=>window.removeEventListener("mousemove",this.handleDrag))}),this.focus(),t.classList.add("focused"),this.windowElement=t,this.viewElement=i}addToManager(e){this.windowManager=e,e.view.appendChild(this.windowElement),this.focus()}onClose(){}closeWindow(){this.windowManager&&(this.onClose(),this.windowManager.removeWindow(this),this.windowElement.classList.add("exiting"),window.removeEventListener("mousedown",this.block,!0),this.options.blocking&&this.windowManager.windows.filter(e=>e.options.blocking).length==0&&(document.getElementById("blocker").style.display="none"),setTimeout(()=>this.windowManager.view.removeChild(this.windowElement),40))}focus(){if(this.windowManager==null)return;this.windowManager.unfocusAll(),this.windowElement.classList.add("focused");const e=Array.from(this.windowManager.view.children).map(t=>t).filter(t=>t!=this.windowElement);e.sort((t,i)=>parseInt(t.style.zIndex)-parseInt(i.style.zIndex)),e.push(this.windowElement);for(let t=0;t{!e.target||this.windowElement.contains(e.target)||(e.stopImmediatePropagation(),e.preventDefault())};handleDrag=e=>{const t=parseInt(this.windowElement.style.left.slice(0,-2))+e.movementX,i=parseInt(this.windowElement.style.top.slice(0,-2))+e.movementY;this.windowElement.style.left=t+"px",this.windowElement.style.top=i+"px",this.clampPosition()};clampPosition(){if(this.windowManager==null)return;const e=parseInt(this.windowElement.style.left.slice(0,-2)),t=parseInt(this.windowElement.style.top.slice(0,-2)),i=this.windowManager.app.view.getBoundingClientRect();this.windowElement.style.left=Oe(e,i.left,i.width-this.windowElement.clientWidth+i.left)+"px",this.windowElement.style.top=Oe(t,i.top,i.height-this.windowElement.clientHeight+i.top)+"px"}move(e,t){this.windowElement.style.left=e+"px",this.windowElement.style.top=t+"px"}}class v3 extends Tt{app;constructor(e){super({title:"Changelog",width:600,height:500,win_id:"changelog"}),this.app=e,this.initView()}initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("markdown-container"),fetch("/smeditor/assets/app/changelog.json").then(n=>n.json()).then(n=>{t.innerHTML=n.map(a=>`# ${a.version} +--- +`+a.changelog).map(a=>`
${xi().render(a)}
`).join("")}),e.appendChild(t);const i=document.createElement("div");i.classList.add("menu-options"),i.style.justifyContent="flex-end";const s=document.createElement("button");s.innerText="Close",s.onclick=()=>{this.closeWindow()},s.classList.add("confirm"),i.append(s),e.appendChild(i),this.viewElement.appendChild(e)}}class w3{cols=[];keyDown(e){this.cols[e]=(this.cols[e]??0)+1}keyUp(e){this.cols[e]=(this.cols[e]??1)-1,this.cols[e]=Math.max(this.cols[e],0)}isPressed(e){return!!this.cols[e]}getHeldCols(){return this.cols.map((e,t)=>t).filter(e=>this.isPressed(e))}reset(){this.cols=[]}}class H extends $n{static _instance;static get instance(){return H._instance||(H._instance=new H),H._instance}static emit(e,...t){return H.instance.emit(e,...t)}static on(e,t,i){H.instance.on(e,t,i)}static off(e,t,i,s){H.instance.off(e,t,i,s)}}const Cm=["audio.rate","chart.snap","chart.CMod","play.timingCollection"];class za{static app={width:800,height:600,fullscreen:!1};static general={spinnerStep:1,smoothAnimations:!0,autosaveInterval:120,warnBeforeExit:!0,showPlaybackOptions:!0,theme:"default"};static chart={CMod:!1,reverse:!1,mousePlacement:!1,defaultHoldPlacement:!0,zoom:1,speed:250,snap:1,hideWarpedArrows:!1,hideFakedArrows:!1,doSpeedChanges:!0,drawNoteFlash:!0,drawIcons:!0,allowReceptorDrag:!0,receptorYPos:-250,receptorXPos:0,maxDrawBeats:20,maxDrawBeatsBack:10,scroll:{scrollSensitivity:1,scrollSnapEveryScroll:!navigator.userAgent.includes("Mac"),invertZoomScroll:!1,invertReverseScroll:!0},waveform:{enabled:!0,antialiasing:!0,color:"#60617288",allowFilter:!0,filteredColor:"#1e523e88",lineHeight:1,speedChanges:!0},noteLayout:{enabled:!0},npsGraph:{enabled:!1,color1:"#4aa7bcff",color2:"#423c7aff"},timingEventOrder:{left:["LABELS","FAKES","TIMESIGNATURES","DELAYS","WARPS","STOPS","BPMS"],right:["SPEEDS","SCROLLS","TICKCOUNTS","COMBOS","ATTACKS","BGCHANGES","FGCHANGES"]},renderTimingEvent:{BPMS:!0,STOPS:!0,DELAYS:!0,WARPS:!0,FAKES:!0,COMBOS:!0,SPEEDS:!0,LABELS:!0,SCROLLS:!0,TIMESIGNATURES:!0,TICKCOUNTS:!0,BGCHANGES:!0,FGCHANGES:!0,ATTACKS:!0},noteskin:{type:"dance-single",name:"default"},lastNoteskins:{"dance-single":"default","dance-double":"default","dance-couple":"default","dance-solo":"default","dance-solodouble":"default","dance-threepanel":"default","dance-threedouble":"default","pump-single":"default","pump-double":"default","pump-versus":"default","pump-couple":"default","pump-halfdouble":"default"}};static audio={assistTick:!1,metronome:!1,rate:1,masterVolume:1,songVolume:.2,soundEffectVolume:.5,allowFilter:!0};static play={offset:0,effectOffset:0,visualOffset:0,hideBarlines:!1,judgementTilt:!0,timingCollection:"ITG",timingWindowScale:1,timingWindowAdd:0,defaultTimingCollection:{"dance-single":"ITG","dance-double":"ITG","dance-threepanel":"ITG","dance-threedouble":"ITG","dance-solo":"ITG","dance-solodouble":"ITG"}};static performance={antialiasing:!1,resolution:window.devicePixelRatio};static debug={showFPS:!1,showTimers:!1,showScroll:!1,showNoteskinErrors:!1,showDebugVariables:!1};static experimental={}}class x extends za{static extractOptions(e,t){return Object.entries(e).reduce((i,s)=>{const n=t?t+".":"";return typeof s[1]=="object"&&!Array.isArray(s[1])?i=i.concat(this.extractOptions(s[1],n+s[0])):(s[0]=n+s[0],i.push([s[0],s[1]])),i},[])}static applyOption(e){if(typeof this.getDefaultOption(e[0])!=typeof e[1])return console.warn("Couldn't load option "+e[0]+": the value "+e[1]+" ("+typeof e[1]+") does not match the type "+typeof this.getDefaultOption(e[0]));const t=e[0].split("."),i=t.pop();let s=this;for(const n of t)if(n in s)s=s[n];else return console.warn("Couldn't load option "+e[0]+": the id doesn't exist");s[i]=e[1]}static getDefaultOption(e){const t=e.split(".");let i=za;for(const s of t)if(s in i)i=i[s];else return;if(!(typeof i=="object"&&!Array.isArray(i)))return i}static getOption(e){const t=e.split(".");let i=this;for(const s of t)if(s in i)i=i[s];else return;if(!(typeof i=="object"&&!Array.isArray(i)))return i}static saveOptions(){const e={};for(const t of this.extractOptions(this)){if(Cm.includes(t[0]))continue;const i=this.getDefaultOption(t[0]);if(i==null){console.warn("Couldn't save option "+t[0]+": the id doesn't exist");continue}typeof i!=typeof t[1]?(console.warn("Couldn't save option "+t[0]+": the value "+t[1]+" does not match the type "+typeof this.getDefaultOption(t[0])),e[t[0]]=i):e[t[0]]=t[1]}localStorage.setItem("options",JSON.stringify(e))}static loadOptions(){const e=localStorage.getItem("options");if(!e)return;const t=JSON.parse(e);if(typeof t!="object")return console.error("Couldn't load options from storage");for(const i of Object.entries(t))Cm.includes(i[0])||this.applyOption(i)}static clearSave(){localStorage.removeItem("options")}}function Zb(r,e,t=""){for(const[i,s]of Object.entries(e))if(typeof s=="object"&&!Array.isArray(s))r[i]={},Zb(r[i],s,t==""?i:t+"."+i);else{let n=structuredClone(s);const a=t+"."+i;Object.defineProperty(r,i,{get:function(){return n},set:function(o){H.emit("userOptionUpdated",a),n=o},enumerable:!0})}}Zb(x,za);class ph{timingWindowMS;dancePoints;lifeChange;constructor(e,t,i){this.timingWindowMS=e,this.dancePoints=t,this.lifeChange=i}getTimingWindowMS(){return this.timingWindowMS*x.play.timingWindowScale+x.play.timingWindowAdd}}class Vo extends ph{target="dropped";constructor(e,t){super(0,e,t)}}class en extends ph{noteType;constructor(e,t,i,s){super(t,i,s),this.noteType=e}}const x3="/smeditor/assets/judgementITG-5390eacd.png",_3="/smeditor/assets/judgementWaterfall-5bb3f994.png";class ht{static ITG=new ht(x3,["w0","w1","w2","w3","w4","w5","miss"]);static WATERFALL=new ht(_3,["w0","w1","w2","w3","w4","w5","miss"]);texHeight=0;texWidth=0;texture;judgeNames=[];constructor(e,t){this.judgeNames=t,this.loadTex(e)}async loadTex(e){const t=await bn.load(e);this.texture=t,this.texHeight=t.height,this.texWidth=t.width}getTexture(e,t){if(!this.texture||!this.judgeNames.includes(t.id))return;let i=0;const s=this.judgeNames.indexOf(t.id)*this.texHeight/this.judgeNames.length;return e>=0&&(i+=this.texWidth/2),this.texture.frame=new ke(i,s,this.texWidth/2,this.texHeight/this.judgeNames.length),this.texture}}class zo extends ph{target="mine";constructor(e,t,i){super(e,t,i)}}class St extends ph{id;name;color;judgementTexture;constructor(e,t,i,s,n,a,o){super(s,n,a),this.id=e,this.name=t,this.color=i,this.judgementTexture=o}}const Jb=new St("w0","Fantastic",183528,0,0,0,ht.ITG);class Wo extends St{constructor(e,t,i,s,n){super("miss",e,t,0,i,s,n)}}function cr(r){return r.color!=null&&r.id!="miss"}function Li(r){return r.color!=null&&r.id=="miss"}function Us(r){return!!r.noteType}function Vn(r){return r.target=="dropped"}function mh(r){return r.target=="mine"}class rt{static COLLECTIONS={ITG:new rt([new St("w0","Fantastic",2215144,23,5,.008,ht.ITG),new St("w2","Excellent",14851096,44.5,4,.008,ht.ITG),new St("w3","Great",6736213,103.5,2,.004,ht.ITG),new St("w4","Decent",11820287,136.5,0,0,ht.ITG),new St("w5","Way Off",13206878,181.5,-6,-.05,ht.ITG),new Wo("Miss",16724016,-12,-.1,ht.ITG),new en("Hold",321.5,5,-.008),new en("Roll",351.5,5,-.008),new Vo(0,-.08),new zo(71.5,-6,-.05)],103.5),FA:new rt([new St("w0","Fantastic",2215144,15,3.5,.008,ht.ITG),new St("w1","Fantastic",16777215,23,3,.008,ht.ITG),new St("w2","Excellent",14851096,44.5,2,.008,ht.ITG),new St("w3","Great",6736213,103.5,1,.004,ht.ITG),new St("w4","Decent",11820287,136.5,0,0,ht.ITG),new St("w5","Way Off",13206878,181.5,0,-.05,ht.ITG),new Wo("Miss",16724016,0,-.1,ht.ITG),new en("Hold",321.5,1,-.008),new en("Roll",351.5,1,-.008),new Vo(0,-.08),new zo(71.5,-1,-.05)],103.5),WATERFALL:new rt([new St("w0","Masterful",16711870,15,10,.008,ht.WATERFALL),new St("w2","Awesome",16776960,30,9,.008,ht.WATERFALL),new St("w3","Solid",51200,50,6,.008,ht.WATERFALL),new St("w4","OK",33023,100,3,.004,ht.WATERFALL),new St("w5","Fault",8421504,160,0,0,ht.WATERFALL),new Wo("Miss",16724016,0,-.1,ht.WATERFALL),new en("Hold",300,6,-.008),new en("Roll",350,6,-.008),new Vo(0,-.08),new zo(71.5,-3,-.05)],100)};windows=[];holdWindows={};missWindow;droppedWindow;mineWindow;hideLimitMS;constructor(e,t){this.missWindow=new Wo("Miss",16724016,-12,-.1,ht.ITG),this.droppedWindow=new Vo(0,-.08),this.mineWindow=new zo(71.5,-1,-.05);for(const i of e)cr(i)?this.windows.push(i):Li(i)?this.missWindow=i:Us(i)?this.holdWindows[i.noteType]=i:Vn(i)?this.droppedWindow=i:mh(i)&&(this.mineWindow=i);this.windows.sort((i,s)=>i.timingWindowMS-s.timingWindowMS),this.hideLimitMS=t}judgeInput(e){for(const t of this.windows)if(t.getTimingWindowMS()/1e3>=Math.abs(e))return t;return this.missWindow}getHeldJudgement(e){return this.holdWindows[e.type]}getMissJudgement(){return this.missWindow}getDroppedJudgement(){return this.droppedWindow}getMineJudgement(){return this.mineWindow}shouldHideNote(e){return e.id!="miss"&&e.timingWindowMS<=this.hideLimitMS}maxWindowMS(){return this.windows.at(-1)?.getTimingWindowMS()??0}getMaxDancePoints(){return Math.max(...this.windows.map(e=>e.dancePoints),this.missWindow.dancePoints)}getMaxHoldDancePoints(e){return Math.max(this.holdWindows[e].dancePoints??0,this.droppedWindow.dancePoints)}getStandardWindows(){return[...this.windows]}getHoldWindows(){return[...Object.values(this.holdWindows)]}static getCollection(e){return this.COLLECTIONS[e]??this.COLLECTIONS.ITG}static getCollections(){return rt.COLLECTIONS}}class E3{}class ds extends E3{chordCohesion=new Map;missNoteIndex=0;holdProgress=[];heldCols=new w3;collection=rt.getCollection("ITG");usesHoldTicks=!1;update(e){if(!e.loadedChart||!e.chartView)return;const i=e.chartView.getTimeWithOffset()-this.collection.maxWindowMS()/1e3*x.audio.rate;let s=-1;for(;e.loadedChart.getNotedata()[this.missNoteIndex]&&e.loadedChart.getNotedata()[this.missNoteIndex].second=e.chartView.chart.getSecondsFromBeat(n.beat+n.hold)&&(n.gameplay.hideNote=!0,e.chartView.doJudgement(n,null,this.collection.getHeldJudgement(n)),e.chartView.getNotefield().releaseHold(n.col),this.holdProgress.splice(this.holdProgress.indexOf(n),1),e.gameStats?.addHoldDataPoint(n,this.collection.getHeldJudgement(n)))}for(const n of this.heldCols.getHeldCols()){const a=this.getClosestNote(e.loadedChart.getNotedata(),e.chartView.getTimeWithOffset()-this.collection.getMineJudgement().getTimingWindowMS()/2e3,n,["Mine"],this.collection.getMineJudgement().getTimingWindowMS()/2);a&&(a.gameplay.hasHit=!0,a.gameplay.hideNote=!0,e.chartView.doJudgement(a,null,this.collection.getMineJudgement()),e.gameStats?.addDataPoint([a],this.collection.getMineJudgement(),null),e.mine.play())}}startPlay(e){if(!e.loadedChart||!e.chartView)return;this.collection=rt.getCollection(x.play.timingCollection),this.chordCohesion.clear();for(const n of e.loadedChart.getNotedata())n.type=="Mine"||n.fake||n.warped||(this.chordCohesion.has(n.beat)||this.chordCohesion.set(n.beat,[]),this.chordCohesion.get(n.beat).push(n));const i=e.chartView.getTimeWithOffset()-this.collection.maxWindowMS()/1e3*x.audio.rate;let s=Nt(e.loadedChart.getNotedata(),i,n=>n.second)+1;s>=1&&i<=e.loadedChart.getNotedata()[s-1].second&&s--,this.missNoteIndex=s,this.holdProgress=[],this.heldCols.reset()}keyDown(e,t){if(!e.loadedChart||!e.chartView)return;const i=e.chartView.getTimeWithOffset(),s=this.getClosestNote(e.loadedChart.getNotedata(),i,t,["Tap","Hold","Roll"]);this.heldCols.keyDown(t),e.chartView.getNotefield().press(t);for(const n of this.holdProgress)n.type=="Roll"&&n.col==t&&(n.gameplay.lastHoldActivation=Date.now());s?this.hitNote(e,s,i):e.chartView.getNotefield().ghostTap(t)}keyUp(e,t){if(!e.loadedChart||!e.chartView)return;const i=e.chartView.getTimeWithOffset(),s=this.getClosestNote(e.loadedChart.getNotedata(),i,t,["Lift"]);this.heldCols.keyUp(t),e.chartView.getNotefield().lift(t),s&&this.hitNote(e,s,i)}shouldAssistTick(e){return!e.fake&&!e.warped&&e.type!="Mine"}hitNote(e,t,i){t.gameplay.hasHit=!0,Be(t)&&(t.gameplay.lastHoldActivation=Date.now(),t.type=="Roll"?e.chartView.getNotefield().activateRoll(t.col):e.chartView.getNotefield().activateHold(t.col),this.holdProgress.push(t));const s=this.chordCohesion.get(t.beat);if(s.every(n=>n.gameplay.hasHit)){const n=this.collection.judgeInput((i-t.second)/x.audio.rate),a=this.collection.shouldHideNote(n);s.forEach(o=>{e.chartView.doJudgement(o,(i-o.second)/x.audio.rate,n),a&&bb(o)&&(o.gameplay.hideNote=!0)}),e.gameStats?.addDataPoint(s,n,(i-t.second)/x.audio.rate)}}getClosestNote(e,t,i,s,n){n=n??this.collection.maxWindowMS(),n*=x.audio.rate;const a=t-n/1e3,o=t+n/1e3;let l=Nt(e,a,u=>u.second)+1;l>=1&&a<=e[l-1].second&&l--;let c;for(;e[l]&&e[l].second<=o;){const u=e[l];if(u.gameplay.hasHit||u.col!=i||u.fake||u.warped||!s.includes(u.type)){l++;continue}(!c||Math.abs(u.second-t)=i.getTimingWindowMS():!1}calculateMaxDP(e,t){const i=new Map,s=new Map;for(const a of e)a.type=="Mine"||a.fake||a.warped||(Be(a)&&(s.has(a.type)||s.set(a.type,0),s.set(a.type,s.get(a.type)+1)),i.has(a.beat)||i.set(a.beat,[]),i.get(a.beat).push(a));let n=i.size*rt.getCollection(x.play.timingCollection).getMaxDancePoints();return n+=Array.from(s.entries()).reduce((a,o)=>a+o[1]*rt.getCollection(x.play.timingCollection).getMaxHoldDancePoints(o[0]),0),n}}class A3{}const T3={1:"Tap",2:"Hold",4:"Roll",M:"Mine",F:"Fake",L:"Lift"},C3={Tap:"1",Hold:"2",Roll:"4",Mine:"M",Fake:"F",Lift:"L"};class _i extends A3{serialize(e,t){if(e.length==0)return"";const i=[];let s=0;const n=e.filter(Be).map(c=>({col:c.col,beat:c.beat+c.hold})).sort((c,u)=>c.beat-u.beat),a=e.at(-1),o=a.beat+(Be(a)?a.hold:0);let l=Math.ceil(o/4);o%4==0&&l++;for(let c=0;cOu(p.beat))),Em(d.map(p=>Ou(p.beat)))));for(let p=0;p=t.numCols);h++){const d=a*4+l/o.length*4;let f=c[h];if(f=="{"||f=="["){let p="";for(h++;hn[c]?n[c]=void 0:n[c]1&&t.Jumps++,s+l>2&&t.Hands++,s=0,i=o.beat}if(o.type!="Mine"&&!o.fake&&!o.warped&&s++,o.fake||o.warped){t.Fakes++;continue}switch(o.type){case"Tap":t.Taps++;break;case"Hold":t.Holds++;break;case"Roll":t.Rolls++;break;case"Lift":t.Lifts++;break;case"Mine":t.Mines++;break}Be(o)&&(n[o.col]=o.beat+o.hold)}let a=0;for(let o=0;o1&&t.Jumps++,s+a>2&&t.Hands++,t}getNPSGraph(e,t){const i=e.at(-1);if(!i)return[];let s=i.beat;Be(i)&&(s+=i.hold);const n=[];let a=0;for(;e[a];){const o=Math.floor(t.getMeasure(e[a].beat)),l=t.getBeatFromMeasure(o),c=t.getBeatFromMeasure(o+1),u=t.getSecondsFromBeat(c)-t.getSecondsFromBeat(l);if(u<=.05){for(;e[a]?.beat=e.chartView.chart.getSecondsFromBeat(o.beat+o.hold)&&(o.gameplay.hideNote=a.hitLast||l.length==0||o.gameplay?.droppedHoldBeat===void 0,this.tickProgress.delete(a))}for(const a of this.heldCols.getHeldCols()){const o=this.getClosestNote(e.loadedChart.getNotedata(),e.chartView.getTimeWithOffset()-this.collection.getMineJudgement().getTimingWindowMS()/2e3,a,["Mine"],this.collection.getMineJudgement().getTimingWindowMS()/2);o&&(o.gameplay.hasHit=!0,o.gameplay.hideNote=!0,e.chartView.doJudgement(o,0,this.collection.getMineJudgement()),e.gameStats?.addDataPoint([o],this.collection.getMineJudgement(),0),e.mine.play())}}hitNote(e,t,i){t.gameplay.hasHit=!0;const s=this.chordCohesion.get(t.beat);if(s.every(n=>n.gameplay.hasHit)){const n=this.collection.judgeInput((i-t.second)/x.audio.rate),a=this.collection.shouldHideNote(n);s.forEach(o=>{e.chartView.doJudgement(o,(i-o.second)/x.audio.rate,n),a&&bb(o)&&(o.gameplay.hideNote=!0)}),e.gameStats?.addDataPoint(s,n,(i-t.second)/x.audio.rate)}}startPlay(e){if(!e.loadedChart||!e.chartView)return;this.collection=rt.getCollection(x.play.timingCollection),this.chordCohesion.clear();for(const n of e.loadedChart.getNotedata())n.type=="Mine"||n.fake||n.warped||(this.chordCohesion.has(n.beat)||this.chordCohesion.set(n.beat,[]),this.chordCohesion.get(n.beat).push(n));const i=e.chartView.getTimeWithOffset()-this.collection.maxWindowMS()/1e3*x.audio.rate;let s=Nt(e.loadedChart.getNotedata(),i,n=>n.second)+1;s>=1&&i<=e.loadedChart.getNotedata()[s-1].second&&s--,this.missNoteIndex=s,this.holdIndex=s,this.tickProgress=new Set,this.heldCols.reset()}keyDown(e,t){if(!e.loadedChart||!e.chartView)return;const i=e.chartView.getTimeWithOffset(),s=this.getClosestNote(e.loadedChart.getNotedata(),i,t,["Tap","Hold","Roll"]);this.heldCols.keyDown(t),e.chartView.getNotefield().press(t);for(const{hold:n}of this.tickProgress)n.type=="Roll"&&n.col==t&&(n.gameplay.lastHoldActivation=Date.now(),n.gameplay.droppedHoldBeat=void 0,e.chartView.getNotefield().activateRoll(n.col));s?this.hitNote(e,s,i):e.chartView.getNotefield().ghostTap(t)}shouldDropHold(e,t){if(!e.gameplay?.lastHoldActivation)return!1;const i=this.collection.getHeldJudgement(e);return i?t-e.gameplay.lastHoldActivation>=i.getTimingWindowMS():!1}generateHoldTicks(e,t){const i=e.getTimingData("TICKCOUNTS");let s=Nt(i,t.beat,c=>c.beat),a=1/(i[s]??{type:"TICKCOUNTS",beat:0,value:4}).value,o=Math.round(t.beat/a)*a;o==t.beat&&(o+=a);const l=[];for((i[s]?.value??4)!=0?l.push(o):o=t.beat;oc<=lr(t)&&!e.isBeatWarped(c))}else o+=a;(i[s]?.value??4)!=0&&l.at(-1)!=o&&l.push(o)}return l.filter(c=>c<=lr(t)&&!e.isBeatWarped(c))}calculateMaxDP(e,t){const i=new Map;let s=0;for(const n of e)n.type=="Mine"||n.fake||(Be(n)&&(s+=rt.getCollection(x.play.timingCollection).getMaxDancePoints()*this.generateHoldTicks(t,n).length),!n.warped&&(i.has(n.beat)||i.set(n.beat,[]),i.get(n.beat).push(n)));return s+=i.size*rt.getCollection(x.play.timingCollection).getMaxDancePoints(),s}}class We{static gameTypes={};static priority=[];static register(e){e.notefieldWidth=e.columnWidths.reduce((t,i)=>t+i,0),We.gameTypes[e.id]=e,this.priority.push(e)}static getPriority(){return this.priority}static getGameType(e){return We.gameTypes[e]}static getTypes(){return this.gameTypes}}We.register({id:"dance-single",numCols:4,columnWidths:[64,64,64,64],columnNames:["Left","Down","Up","Right"],gameLogic:new ds,parser:new _i,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[3,1,2,0],vertical:[0,2,1,3]}});We.register({id:"dance-double",numCols:8,columnWidths:[64,64,64,64,64,64,64,64],columnNames:["Left","Down","Up","Right","Left","Down","Up","Right"],gameLogic:new ds,parser:new _i,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[3,1,2,0,7,5,6,4],vertical:[0,2,1,3,4,6,5,7]}});We.register({id:"dance-couple",numCols:8,columnWidths:[64,64,64,64,64,64,64,64],columnNames:["Left","Down","Up","Right","Left","Down","Up","Right"],gameLogic:new ds,parser:new _i,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[3,1,2,0,7,5,6,4],vertical:[0,2,1,3,4,6,5,7]}});We.register({id:"dance-solo",numCols:6,columnWidths:[64,64,64,64,64,64],columnNames:["Left","UpLeft","Down","Up","UpRight","Right"],gameLogic:new ds,parser:new _i,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[5,4,2,3,1,0],vertical:[0,1,3,2,4,5]}});We.register({id:"dance-solodouble",numCols:12,columnWidths:[64,64,64,64,64,64,64,64,64,64,64,64],columnNames:["Left","UpLeft","Down","Up","UpRight","Right","Left","UpLeft","Down","Up","UpRight","Right"],gameLogic:new ds,parser:new _i,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[5,4,2,3,1,0,11,10,8,9,7,6],vertical:[0,1,3,2,4,5,6,7,9,8,10,11]}});We.register({id:"dance-threepanel",numCols:3,columnWidths:[64,64,64],columnNames:["UpLeft","Down","UpRight"],gameLogic:new ds,parser:new _i,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[2,1,0],vertical:[0,1,2]}});We.register({id:"dance-threedouble",numCols:6,columnWidths:[64,64,64,64,64,64],columnNames:["UpLeft","Down","UpRight","UpLeft","Down","UpRight"],gameLogic:new ds,parser:new _i,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[2,1,0,5,4,3],vertical:[0,1,2,3,4,5]}});We.register({id:"pump-single",numCols:5,columnWidths:[58,58,58,58,58],columnNames:["DownLeft","UpLeft","Center","UpRight","DownRight"],gameLogic:new no,parser:new _i,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[4,3,2,1,0],vertical:[1,0,2,4,3]}});We.register({id:"pump-double",numCols:10,columnWidths:[58,58,58,58,58,58,58,58,58,58],columnNames:["DownLeft","UpLeft","Center","UpRight","DownRight","DownLeft","UpLeft","Center","UpRight","DownRight"],gameLogic:new no,parser:new _i,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[9,8,7,6,5,4,3,2,1,0],vertical:[1,0,2,4,3,6,5,7,9,8]}});We.register({id:"pump-versus",numCols:10,columnWidths:[58,58,58,58,58,58,58,58,58,58],columnNames:["DownLeft","UpLeft","Center","UpRight","DownRight","DownLeft","UpLeft","Center","UpRight","DownRight"],gameLogic:new no,parser:new _i,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[9,8,7,6,5,4,3,2,1,0],vertical:[1,0,2,4,3,6,5,7,9,8]}});We.register({id:"pump-couple",numCols:10,columnWidths:[58,58,58,58,58,58,58,58,58,58],columnNames:["DownLeft","UpLeft","Center","UpRight","DownRight","DownLeft","UpLeft","Center","UpRight","DownRight"],gameLogic:new no,parser:new _i,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[9,8,7,6,5,4,3,2,1,0],vertical:[1,0,2,4,3,6,5,7,9,8]}});We.register({id:"pump-halfdouble",numCols:6,columnWidths:[58,58,58,58,58,58],columnNames:["Center","UpRight","DownRight","DownLeft","UpLeft","Center"],gameLogic:new no,parser:new _i,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[5,4,3,2,1,0],vertical:[0,2,1,4,3,5]}});const ki=["Beginner","Easy","Medium","Hard","Challenge","Edit"],Ot=["BPMS","STOPS","WARPS","DELAYS","LABELS","SPEEDS","SCROLLS","TICKCOUNTS","TIMESIGNATURES","COMBOS","FAKES","ATTACKS","BGCHANGES","FGCHANGES"];class Qb{gameType=We.getPriority()[0];description="";difficulty="Beginner";meter=1;meterF=1;radarValues="0,0,0,0,0";chartName="";chartStyle="";credit="";music;timingData;sm;other_properties={};notedata=[];_notedataStats;_npsGraph;_lastBeat=0;_lastSecond=0;constructor(e,t){if(this.timingData=e.timingData.createChartTimingData(this),this.timingData.reloadCache(),this.sm=e,!t){this.recalculateStats();return}if(e._type=="ssc"){const i=t;for(const n in i)(n=="OFFSET"||Ot.includes(n))&&(this.timingData.parse(n,i[n]),delete i[n]);this.timingData.reloadCache();const s=We.getGameType(i.STEPSTYPE);if(!s)throw Error("Unknown step type "+i.STEPSTYPE);if(this.gameType=s,this.description=i.DESCRIPTION??"",ki.includes(i.DIFFICULTY))this.difficulty=i.DIFFICULTY;else throw Error("Unknown chart difficulty "+i.DIFFICULTY);this.meter=parseInt(i.METER),(!isFinite(this.meter)||this.meter<0)&&(this.meter=0),this.meterF=parseFloat(i.METERF),(!isFinite(this.meterF)||this.meterF<0)&&(this.meterF=this.meter),this.radarValues=i.RADARVALUES??"",this.notedata=s.parser.fromString(i.NOTES,s).map(n=>this.computeNote(n))??[],this.credit=i.CREDIT??"",this.chartName=i.CHARTNAME??"",this.chartStyle=i.CHARTSTYLE??"",this.music=i.MUSIC;for(const n in i)["STEPSTYPE","DESCRIPTION","DIFFICULTY","METER","METERF","RADARVALUES","CREDIT","CHARTNAME","CHARTSTYLE","MUSIC","NOTES","NOTEDATA"].includes(n)||(this.other_properties[n]=i[n])}else{const i=/([\w-]+):[\s ]*([^:]*):[\s ]*(\w+):[\s ]*(\d+):[\s ]*([\d.,]*):[\s ]*([\w\s, ]*)/g.exec(t.trim());if(i!=null){const s=We.getGameType(i[1]);if(!s)throw Error("Unknown step type "+i[1]);if(this.gameType=s,this.description=i[2]??"",ki.includes(i[3]))this.difficulty=i[3];else throw Error("Unknown chart difficulty "+i[3]);this.meter=parseInt(i[4]),(!isFinite(this.meter)||this.meter<0)&&(this.meter=0),this.meterF=this.meter,this.radarValues=i[5]??"",this.notedata=s.parser.fromString(i[6],s).map(n=>this.computeNote(n))??[]}else throw Error("Failed to load sm chart!")}this.recalculateStats()}getNotedataStats(){return this._notedataStats}getNPSGraph(){return this._npsGraph}getMaxNPS(){let e=0;for(const t of this._npsGraph)t>e&&(e=t);return e}getLastBeat(){return this._lastBeat}getLastSecond(){return this._lastSecond}getSecondsFromBeat(e,t){return this.timingData.getSecondsFromBeat(e,t)}getBeatFromSeconds(e){return this.timingData.getBeatFromSeconds(e)}getBeatFromEffectiveBeat(e){return this.timingData.getBeatFromEffectiveBeat(e)}isBeatWarped(e){return this.timingData.isBeatWarped(e)}isBeatFaked(e){return this.timingData.isBeatFaked(e)}recalculateLastNote(){let e=0,t=0;this.notedata.forEach(i=>{const s=i.beat+(Be(i)?i.hold:0),n=this.timingData.getSecondsFromBeat(s);s>e&&(e=s),n>t&&(t=n)}),this._lastBeat=e,this._lastSecond=t}getNoteIndex(e){if(this.notedata.includes(e))return this.notedata.indexOf(e);for(let t=0;ts.beat)+1;return i>=1&&this.notedata[i-1].beat>e.beat&&i--,this.notedata.splice(i,0,t),t}addNote(e,t=!0){const i=this.insertNote(e);return t&&H.emit("chartModified"),i}addNotes(e,t=!0){const i=e.map(s=>this.insertNote(s));return t&&H.emit("chartModified"),i}computeNote(e){return Object.assign(e,{warped:this.timingData.isBeatWarped(e.beat),fake:e.type=="Fake"||this.timingData.isBeatFaked(e.beat),second:this.timingData.getSecondsFromBeat(e.beat),quant:Math.round(Ou(this.timingData.getBeatOfMeasure(e.beat)))})}modifyNote(e,t,i=!0){const s=this.getNoteIndex(e);if(s==-1)return;const n=Object.assign({},this.notedata[s]);this.notedata.splice(s,1),Be(t)||(t.hold=void 0),Object.assign(n,t),this.addNote(n),i&&H.emit("chartModified")}removeNote(e,t=!0){const i=this.getNoteIndex(e);if(i==-1)return;const s=this.notedata.splice(i,1);return t&&H.emit("chartModified"),s[0]}removeNotes(e,t=!0){const i=e.map(s=>{const n=this.getNoteIndex(s);return n==-1?void 0:this.notedata.splice(n,1)[0]}).filter(s=>s!=null);return t&&H.emit("chartModified"),i}setNotedata(e){this.notedata=e,H.emit("chartModified")}getNotedata(){return this.notedata}recalculateNotes(){this.notedata=this.notedata.map(e=>this.computeNote(e))}recalculateStats(){this._notedataStats=this.gameType.parser.getStats(this.notedata),this._npsGraph=this.gameType.parser.getNPSGraph(this.notedata,this.timingData),this.recalculateLastNote()}getMusicPath(){return this.music??this.sm.properties.MUSIC??""}toString(){return this.difficulty+" "+this.meter}serialize(e){let t="//---------------"+this.gameType.id+" - "+this.description+`--------------- +`;if(e=="sm")t+=`#NOTES: +`,t+=` ${this.gameType.id}: +`,t+=` ${this.description}: +`,t+=` ${this.difficulty}: +`,t+=` ${this.meter}: +`,t+=` ${this.radarValues}: +`;else{t+=`#NOTEDATA:; +`,t+=`#CHARTNAME:${this.chartName}; +`,t+=`#CHARTSTYLE:${this.chartStyle}; +`,t+=`#CREDIT:${this.credit}; +`,this.music&&(t+=`#MUSIC:${this.music}; +`),t+=`#STEPSTYPE:${this.gameType.id}; +`,t+=`#DESCRIPTION:${this.description}; +`,t+=`#DIFFICULTY:${this.difficulty}; +`,t+=`#METER:${this.meter}; +`,t+=`#METERF:${this.meterF}; +`,t+=`#RADARVALUES:${this.radarValues}; +`;for(const i in this.other_properties)t+=`#${i}:${this.other_properties[i]}; +`;this.timingData.usesChartTiming()&&(t+=this.timingData.serialize("ssc")),t+=`#NOTES: +`}return t+=this.gameType.parser.serialize(this.notedata,this.gameType)+`; +`,t}requiresSSC(){return this.chartName!==""||this.chartStyle!==""||this.credit!==""||this.music!==void 0||this.timingData.requiresSSC()}}const Sm=globalThis.showDirectoryPicker;async function S3(r={}){if(Sm&&!r._preferPolyfill)return Sm(r);const e=document.createElement("input");e.type="file",e.webkitdirectory=!0,e.multiple=!0,e.style.position="fixed",e.style.top="-100000px",e.style.left="-100000px",document.body.appendChild(e);const{makeDirHandleFromFileList:t}=await Qe(()=>Promise.resolve().then(()=>pb),void 0);return new Promise((i,s)=>{e.addEventListener("change",()=>{t(e.files).then(i).catch(s),document.body.removeChild(e)}),e.click()})}const Mm=globalThis.showOpenFilePicker;async function ey(r={}){if(Mm&&!r._preferPolyfill)return Mm(r);const e=document.createElement("input");e.type="file",e.multiple=!!r.multiple,e.accept=(r.accepts||[]).map(i=>[...(i.extensions||[]).map(s=>"."+s),...i.mimeTypes||[]]).flat().join(","),e.style.position="fixed",e.style.top="-100000px",e.style.left="-100000px",document.body.appendChild(e);const{makeFileHandlesFromFileList:t}=await Qe(()=>Promise.resolve().then(()=>pb),void 0);return new Promise((i,s)=>{e.addEventListener("change",()=>{t(e.files).then(i).catch(s),document.body.removeChild(e)}),e.click()})}const km=globalThis.showSaveFilePicker;async function M3(r={}){if(km&&!r._preferPolyfill)return km(r);const{FileSystemFileHandle:e}=await Qe(()=>Promise.resolve().then(()=>ty),void 0),{FileHandle:t}=await Qe(()=>import("./downloader-46f1bfb8.js"),[]);return new e(new t(r.suggestedName))}const tn=Symbol("adapter");let Ld=class{constructor(e){this.kind=e.kind,this.name=e.name,this[tn]=e}get isFile(){return this.kind==="file"}get isDirectory(){return this.kind==="directory"}async queryPermission(e={mode:"read"}){const t=this[tn];if(t.queryPermission)return t.queryPermission(e);if(e.mode==="read")return"granted";if(e.mode==="readwrite")return t.writable?"granted":"denied";throw new TypeError(`Mode ${e.mode} must be 'read' or 'readwrite'`)}async requestPermission(e={mode:"read"}){const t=this[tn];if(t.requestPermission)return t.requestPermission(e);if(e.mode==="read")return"granted";if(e.mode==="readwrite")return t.writable?"granted":"denied";throw new TypeError(`Mode ${e.mode} must be 'read' or 'readwrite'`)}async isSameEntry(e){return this===e?!0:this.kind!==e.kind||!e[tn]?!1:await this[tn].isSameEntry(e[tn])}};Object.defineProperty(Ld.prototype,Symbol.toStringTag,{value:"FileSystemHandle",writable:!1,enumerable:!1,configurable:!0});const yc=Symbol("adapter");let zn=class extends Ld{constructor(e){super(e),this.kind="file",this[yc]=e}async createWritable(e={}){const{FileSystemWritableFileStream:t}=await Qe(()=>import("./FileSystemWritableFileStream-e4c13ad9.js"),["FileSystemWritableFileStream-e4c13ad9.js","web-streams-ponyfill-4a0f4950.js"]);return new t(await this[yc].createWritable(e))}async getFile(){return this[yc].getFile()}};Object.defineProperty(zn.prototype,Symbol.toStringTag,{value:"FileSystemFileHandle",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties(zn.prototype,{createWritable:{enumerable:!0},getFile:{enumerable:!0}});const ty=Object.freeze(Object.defineProperty({__proto__:null,FileSystemFileHandle:zn,default:zn},Symbol.toStringTag,{value:"Module"})),rn=Symbol("adapter");class ls extends Ld{constructor(e){super(e),this.kind="directory",this[rn]=e}async getDirectoryHandle(e,t={}){if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");return new ls(await this[rn].getDirectoryHandle(e,t))}getDirectory(e,t={}){return this.getDirectoryHandle(e,t)}async*entries(){for await(const[e,t]of this[rn].entries())yield[t.name,t.kind==="file"?new zn(t):new ls(t)]}async*getEntries(){return this.entries()}async*keys(){for await(const[e]of this[rn].entries())yield e}async*values(){for await(const[e,t]of this.entries())yield t}async getFileHandle(e,t={}){if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");return t.create=!!t.create,new zn(await this[rn].getFileHandle(e,t))}getFile(e,t={}){return this.getFileHandle(e,t)}async removeEntry(e,t={}){if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");return t.recursive=!!t.recursive,this[rn].removeEntry(e,t)}async resolve(e){if(await e.isSameEntry(this))return[];const t=[{handle:this,path:[]}];for(;t.length;){let{handle:i,path:s}=t.pop();for await(const n of i.values()){if(await n.isSameEntry(e))return[...s,n.name];n.kind==="directory"&&t.push({handle:n,path:[...s,n.name]})}}return null}[Symbol.asyncIterator](){return this.entries()}}Object.defineProperty(ls.prototype,Symbol.toStringTag,{value:"FileSystemDirectoryHandle",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties(ls.prototype,{getDirectoryHandle:{enumerable:!0},entries:{enumerable:!0},getFileHandle:{enumerable:!0},removeEntry:{enumerable:!0}});const k3=Object.freeze(Object.defineProperty({__proto__:null,FileSystemDirectoryHandle:ls,default:ls},Symbol.toStringTag,{value:"Module"}));async function Dm(r,e={}){var t,i,s,n;if(!r){if(!(!((t=globalThis.navigator)===null||t===void 0)&&t.storage)&&((i=globalThis.location)===null||i===void 0?void 0:i.protocol)==="http:")throw new Error("Native getDirectory not supported in HTTP context. Please use HTTPS instead or provide an adapter.");if(!(!((n=(s=globalThis.navigator)===null||s===void 0?void 0:s.storage)===null||n===void 0)&&n.getDirectory))throw new Error("Native StorageManager.getDirectory() is not supported in current environment. Please provide an adapter instead.");return globalThis.navigator.storage.getDirectory()}const a=await r,o=typeof a=="function"?await a(e):await a.default(e);return new ls(o)}var vc,wc;const D3={adapter:{cache:!!(globalThis.CacheStorage&&globalThis.caches instanceof CacheStorage),native:typeof((wc=(vc=globalThis.navigator)===null||vc===void 0?void 0:vc.storage)===null||wc===void 0?void 0:wc.getDirectory)=="function",sandbox:typeof window<"u"&&typeof window.webkitRequestFileSystem=="function"}},Im=r=>typeof r=="object"&&r!=null&&r.nodeType===1,Pm=(r,e)=>(!e||r!=="hidden")&&r!=="visible"&&r!=="clip",xc=(r,e)=>{if(r.clientHeight{const s=(n=>{if(!n.ownerDocument||!n.ownerDocument.defaultView)return null;try{return n.ownerDocument.defaultView.frameElement}catch{return null}})(i);return!!s&&(s.clientHeightne||n>r&&a=e&&o>=t?n-r-i:a>e&&ot?a-e+s:0,I3=r=>{const e=r.parentElement;return e??(r.getRootNode().host||null)},Bm=(r,e)=>{var t,i,s,n;if(typeof document>"u")return[];const{scrollMode:a,block:o,inline:l,boundary:c,skipOverflowHiddenElements:u}=e,h=typeof c=="function"?c:q=>q!==c;if(!Im(r))throw new TypeError("Invalid target");const d=document.scrollingElement||document.documentElement,f=[];let p=r;for(;Im(p)&&h(p);){if(p=I3(p),p===d){f.push(p);break}p!=null&&p===document.body&&xc(p)&&!xc(document.documentElement)||p!=null&&xc(p,u)&&f.push(p)}const m=(i=(t=window.visualViewport)==null?void 0:t.width)!=null?i:innerWidth,g=(n=(s=window.visualViewport)==null?void 0:s.height)!=null?n:innerHeight,{scrollX:b,scrollY:w}=window,{height:v,width:y,top:E,right:C,bottom:k,left:B}=r.getBoundingClientRect(),{top:M,right:U,bottom:V,left:T}=(q=>{const F=window.getComputedStyle(q);return{top:parseFloat(F.scrollMarginTop)||0,right:parseFloat(F.scrollMarginRight)||0,bottom:parseFloat(F.scrollMarginBottom)||0,left:parseFloat(F.scrollMarginLeft)||0}})(r);let S=o==="start"||o==="nearest"?E-M:o==="end"?k+V:E+v/2-M+V,_=l==="center"?B+y/2-T+U:l==="end"?C+U:B-T;const R=[];for(let q=0;q=0&&B>=0&&k<=g&&C<=m&&E>=z&&k<=N&&B>=ie&&C<=O)return R;const Q=getComputedStyle(F),Z=parseInt(Q.borderLeftWidth,10),be=parseInt(Q.borderTopWidth,10),Se=parseInt(Q.borderRightWidth,10),ce=parseInt(Q.borderBottomWidth,10);let pe=0,xe=0;const le="offsetWidth"in F?F.offsetWidth-F.clientWidth-Z-Se:0,fe="offsetHeight"in F?F.offsetHeight-F.clientHeight-be-ce:0,we="offsetWidth"in F?F.offsetWidth===0?0:W/F.offsetWidth:0,A="offsetHeight"in F?F.offsetHeight===0?0:L/F.offsetHeight:0;if(d===F)pe=o==="start"?S:o==="end"?S-g:o==="nearest"?$o(w,w+g,g,be,ce,w+S,w+S+v,v):S-g/2,xe=l==="start"?_:l==="center"?_-m/2:l==="end"?_-m:$o(b,b+m,m,Z,Se,b+_,b+_+y,y),pe=Math.max(0,pe+w),xe=Math.max(0,xe+b);else{pe=o==="start"?S-z-be:o==="end"?S-N+ce+fe:o==="nearest"?$o(z,N,L,be,ce+fe,S,S+v,v):S-(z+L/2)+fe/2,xe=l==="start"?_-ie-Z:l==="center"?_-(ie+W/2)+le/2:l==="end"?_-O+Se+le:$o(ie,O,W,Z,Se+le,_,_+y,y);const{scrollLeft:Y,scrollTop:j}=F;pe=A===0?0:Math.max(0,Math.min(j+pe/A,F.scrollHeight-L/A+fe)),xe=we===0?0:Math.max(0,Math.min(Y+xe/we,F.scrollWidth-W/we+le)),S+=j-pe,_+=Y-xe}R.push({el:F,top:pe,left:xe})}return R},P3=r=>r===!1?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&Object.keys(e).length!==0)(r)?r:{block:"start",inline:"nearest"};function ka(r,e){if(!r.isConnected||!(s=>{let n=s;for(;n&&n.parentNode;){if(n.parentNode===document)return!0;n=n.parentNode instanceof ShadowRoot?n.parentNode.host:n.parentNode}return!1})(r))return;const t=(s=>{const n=window.getComputedStyle(s);return{top:parseFloat(n.scrollMarginTop)||0,right:parseFloat(n.scrollMarginRight)||0,bottom:parseFloat(n.scrollMarginBottom)||0,left:parseFloat(n.scrollMarginLeft)||0}})(r);if((s=>typeof s=="object"&&typeof s.behavior=="function")(e))return e.behavior(Bm(r,e));const i=typeof e=="boolean"||e==null?void 0:e.behavior;for(const{el:s,top:n,left:a}of Bm(r,P3(e))){const o=n-t.top+t.bottom,l=a-t.left+t.right;s.scroll({top:o,left:l,behavior:i})}}function er(r,e){let t=Od(r)[2];return e&&t.slice(-1*e.length)===e&&(t=t.slice(0,t.length-e.length)),t}function Ht(r){const e=Od(r),t=e[0];let i=e[1];return!t&&!i?"":(i&&(i=i.slice(0,i.length-1)),t+i)}function sr(r){return Od(r)[3]}const B3=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^/]+?|)(\.[^./]*|))(?:[/]*)$/;function Od(r){return B3.exec(r).slice(1)}const{GONE:iy}=Ma;FileSystemFileHandle;class Nd{_path;kind="file";name;isFile=!0;isDirectory=!1;constructor(e){this._path=e,this.name=new URL(e).pathname.split("/").pop()??""}async getFile(){return fetch(this._path).then(e=>e.blob()).then(e=>new File([e],this.name)).catch(()=>{throw new DOMException(...iy)})}async createWritable(){throw Error("Cannot call createWriteable from a URLFileHandle")}async isSameEntry(e){return FileSystemHandle instanceof Nd?e._path==this._path:!1}async queryPermission(){return"granted"}async requestPermission(){return"granted"}}class R3{async handleDropEvent(e,t){throw Error("Cannot call handleDropEvent from a URLFileHandler")}async getDirectoryHandle(e,t,i){throw Error("Cannot call getDirectoryHandle from a URLFileHandler")}async hasFile(e){return fetch(e).then(t=>t.ok).catch(()=>!1)}async getFileHandle(e,t){try{if(!await this.hasFile(e))throw new DOMException(...iy);return new Nd(e)}catch(i){console.error("Failed to get file "+e+": "+i);return}}async getFileHandleRelativeTo(e,t){const i=new URL(e);sr(i.pathname)!=""&&(i.pathname=i.pathname.split("/").slice(0,-1).join("/")),i.pathname+="/"+t;try{return this.getFileHandle(i.toString())}catch(s){console.error("Failed to get relative file "+i+": "+s);return}}async getDirectoryFiles(e){throw Error("Cannot call getDirectoryFiles from a URLFileHandler")}async getDirectoryFolders(e){throw Error("Cannot call getDirectoryFolders from a URLFileHandler")}async writeFile(e,t){throw Error("Cannot save to a URL file!")}async removeFile(e){throw Error("Cannot remove a URL file!")}getRelativePath(e,t){throw Error("Cannot call getRelativePath from a URLFileHandler")}}function jo(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ry={exports:{}};/*! + +JSZip v3.10.1 - A JavaScript class for generating and reading zip files + + +(c) 2009-2016 Stuart Knightley +Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown. + +JSZip uses the library pako released under the MIT license : +https://github.com/nodeca/pako/blob/main/LICENSE +*/(function(r,e){(function(t){r.exports=t()})(function(){return function t(i,s,n){function a(c,u){if(!s[c]){if(!i[c]){var h=typeof jo=="function"&&jo;if(!u&&h)return h(c,!0);if(o)return o(c,!0);var d=new Error("Cannot find module '"+c+"'");throw d.code="MODULE_NOT_FOUND",d}var f=s[c]={exports:{}};i[c][0].call(f.exports,function(p){var m=i[c][1][p];return a(m||p)},f,f.exports,t,i,s,n)}return s[c].exports}for(var o=typeof jo=="function"&&jo,l=0;l>2,f=(3&c)<<4|u>>4,p=1>6:64,m=2>4,u=(15&d)<<4|(f=o.indexOf(l.charAt(m++)))>>2,h=(3&f)<<6|(p=o.indexOf(l.charAt(m++))),w[g++]=c,f!==64&&(w[g++]=u),p!==64&&(w[g++]=h);return w}},{"./support":30,"./utils":32}],2:[function(t,i,s){var n=t("./external"),a=t("./stream/DataWorker"),o=t("./stream/Crc32Probe"),l=t("./stream/DataLengthProbe");function c(u,h,d,f,p){this.compressedSize=u,this.uncompressedSize=h,this.crc32=d,this.compression=f,this.compressedContent=p}c.prototype={getContentWorker:function(){var u=new a(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")),h=this;return u.on("end",function(){if(this.streamInfo.data_length!==h.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),u},getCompressedWorker:function(){return new a(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},c.createWorkerFrom=function(u,h,d){return u.pipe(new o).pipe(new l("uncompressedSize")).pipe(h.compressWorker(d)).pipe(new l("compressedSize")).withStreamInfo("compression",h)},i.exports=c},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,i,s){var n=t("./stream/GenericWorker");s.STORE={magic:"\0\0",compressWorker:function(){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},s.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,i,s){var n=t("./utils"),a=function(){for(var o,l=[],c=0;c<256;c++){o=c;for(var u=0;u<8;u++)o=1&o?3988292384^o>>>1:o>>>1;l[c]=o}return l}();i.exports=function(o,l){return o!==void 0&&o.length?n.getTypeOf(o)!=="string"?function(c,u,h,d){var f=a,p=d+h;c^=-1;for(var m=d;m>>8^f[255&(c^u[m])];return-1^c}(0|l,o,o.length,0):function(c,u,h,d){var f=a,p=d+h;c^=-1;for(var m=d;m>>8^f[255&(c^u.charCodeAt(m))];return-1^c}(0|l,o,o.length,0):0}},{"./utils":32}],5:[function(t,i,s){s.base64=!1,s.binary=!1,s.dir=!1,s.createFolders=!0,s.date=null,s.compression=null,s.compressionOptions=null,s.comment=null,s.unixPermissions=null,s.dosPermissions=null},{}],6:[function(t,i,s){var n=null;n=typeof Promise<"u"?Promise:t("lie"),i.exports={Promise:n}},{lie:37}],7:[function(t,i,s){var n=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",a=t("pako"),o=t("./utils"),l=t("./stream/GenericWorker"),c=n?"uint8array":"array";function u(h,d){l.call(this,"FlateWorker/"+h),this._pako=null,this._pakoAction=h,this._pakoOptions=d,this.meta={}}s.magic="\b\0",o.inherits(u,l),u.prototype.processChunk=function(h){this.meta=h.meta,this._pako===null&&this._createPako(),this._pako.push(o.transformTo(c,h.data),!1)},u.prototype.flush=function(){l.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},u.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},u.prototype._createPako=function(){this._pako=new a[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var h=this;this._pako.onData=function(d){h.push({data:d,meta:h.meta})}},s.compressWorker=function(h){return new u("Deflate",h)},s.uncompressWorker=function(){return new u("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,i,s){function n(f,p){var m,g="";for(m=0;m>>=8;return g}function a(f,p,m,g,b,w){var v,y,E=f.file,C=f.compression,k=w!==c.utf8encode,B=o.transformTo("string",w(E.name)),M=o.transformTo("string",c.utf8encode(E.name)),U=E.comment,V=o.transformTo("string",w(U)),T=o.transformTo("string",c.utf8encode(U)),S=M.length!==E.name.length,_=T.length!==U.length,R="",q="",F="",L=E.dir,W=E.date,z={crc32:0,compressedSize:0,uncompressedSize:0};p&&!m||(z.crc32=f.crc32,z.compressedSize=f.compressedSize,z.uncompressedSize=f.uncompressedSize);var O=0;p&&(O|=8),k||!S&&!_||(O|=2048);var N=0,ie=0;L&&(N|=16),b==="UNIX"?(ie=798,N|=function(Z,be){var Se=Z;return Z||(Se=be?16893:33204),(65535&Se)<<16}(E.unixPermissions,L)):(ie=20,N|=function(Z){return 63&(Z||0)}(E.dosPermissions)),v=W.getUTCHours(),v<<=6,v|=W.getUTCMinutes(),v<<=5,v|=W.getUTCSeconds()/2,y=W.getUTCFullYear()-1980,y<<=4,y|=W.getUTCMonth()+1,y<<=5,y|=W.getUTCDate(),S&&(q=n(1,1)+n(u(B),4)+M,R+="up"+n(q.length,2)+q),_&&(F=n(1,1)+n(u(V),4)+T,R+="uc"+n(F.length,2)+F);var Q="";return Q+=` +\0`,Q+=n(O,2),Q+=C.magic,Q+=n(v,2),Q+=n(y,2),Q+=n(z.crc32,4),Q+=n(z.compressedSize,4),Q+=n(z.uncompressedSize,4),Q+=n(B.length,2),Q+=n(R.length,2),{fileRecord:h.LOCAL_FILE_HEADER+Q+B+R,dirRecord:h.CENTRAL_FILE_HEADER+n(ie,2)+Q+n(V.length,2)+"\0\0\0\0"+n(N,4)+n(g,4)+B+R+V}}var o=t("../utils"),l=t("../stream/GenericWorker"),c=t("../utf8"),u=t("../crc32"),h=t("../signature");function d(f,p,m,g){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=p,this.zipPlatform=m,this.encodeFileName=g,this.streamFiles=f,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(d,l),d.prototype.push=function(f){var p=f.meta.percent||0,m=this.entriesCount,g=this._sources.length;this.accumulate?this.contentBuffer.push(f):(this.bytesWritten+=f.data.length,l.prototype.push.call(this,{data:f.data,meta:{currentFile:this.currentFile,percent:m?(p+100*(m-g-1))/m:100}}))},d.prototype.openedSource=function(f){this.currentSourceOffset=this.bytesWritten,this.currentFile=f.file.name;var p=this.streamFiles&&!f.file.dir;if(p){var m=a(f,p,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:m.fileRecord,meta:{percent:0}})}else this.accumulate=!0},d.prototype.closedSource=function(f){this.accumulate=!1;var p=this.streamFiles&&!f.file.dir,m=a(f,p,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(m.dirRecord),p)this.push({data:function(g){return h.DATA_DESCRIPTOR+n(g.crc32,4)+n(g.compressedSize,4)+n(g.uncompressedSize,4)}(f),meta:{percent:100}});else for(this.push({data:m.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},d.prototype.flush=function(){for(var f=this.bytesWritten,p=0;p=this.index;l--)c=(c<<8)+this.byteAt(l);return this.index+=o,c},readString:function(o){return n.transformTo("string",this.readData(o))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var o=this.readInt(4);return new Date(Date.UTC(1980+(o>>25&127),(o>>21&15)-1,o>>16&31,o>>11&31,o>>5&63,(31&o)<<1))}},i.exports=a},{"../utils":32}],19:[function(t,i,s){var n=t("./Uint8ArrayReader");function a(o){n.call(this,o)}t("../utils").inherits(a,n),a.prototype.readData=function(o){this.checkOffset(o);var l=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,l},i.exports=a},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,i,s){var n=t("./DataReader");function a(o){n.call(this,o)}t("../utils").inherits(a,n),a.prototype.byteAt=function(o){return this.data.charCodeAt(this.zero+o)},a.prototype.lastIndexOfSignature=function(o){return this.data.lastIndexOf(o)-this.zero},a.prototype.readAndCheckSignature=function(o){return o===this.readData(4)},a.prototype.readData=function(o){this.checkOffset(o);var l=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,l},i.exports=a},{"../utils":32,"./DataReader":18}],21:[function(t,i,s){var n=t("./ArrayReader");function a(o){n.call(this,o)}t("../utils").inherits(a,n),a.prototype.readData=function(o){if(this.checkOffset(o),o===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+o);return this.index+=o,l},i.exports=a},{"../utils":32,"./ArrayReader":17}],22:[function(t,i,s){var n=t("../utils"),a=t("../support"),o=t("./ArrayReader"),l=t("./StringReader"),c=t("./NodeBufferReader"),u=t("./Uint8ArrayReader");i.exports=function(h){var d=n.getTypeOf(h);return n.checkSupport(d),d!=="string"||a.uint8array?d==="nodebuffer"?new c(h):a.uint8array?new u(n.transformTo("uint8array",h)):new o(n.transformTo("array",h)):new l(h)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,i,s){s.LOCAL_FILE_HEADER="PK",s.CENTRAL_FILE_HEADER="PK",s.CENTRAL_DIRECTORY_END="PK",s.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",s.ZIP64_CENTRAL_DIRECTORY_END="PK",s.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(t,i,s){var n=t("./GenericWorker"),a=t("../utils");function o(l){n.call(this,"ConvertWorker to "+l),this.destType=l}a.inherits(o,n),o.prototype.processChunk=function(l){this.push({data:a.transformTo(this.destType,l.data),meta:l.meta})},i.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(t,i,s){var n=t("./GenericWorker"),a=t("../crc32");function o(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(o,n),o.prototype.processChunk=function(l){this.streamInfo.crc32=a(l.data,this.streamInfo.crc32||0),this.push(l)},i.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,i,s){var n=t("../utils"),a=t("./GenericWorker");function o(l){a.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}n.inherits(o,a),o.prototype.processChunk=function(l){if(l){var c=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=c+l.data.length}a.prototype.processChunk.call(this,l)},i.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(t,i,s){var n=t("../utils"),a=t("./GenericWorker");function o(l){a.call(this,"DataWorker");var c=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(u){c.dataIsReady=!0,c.data=u,c.max=u&&u.length||0,c.type=n.getTypeOf(u),c.isPaused||c._tickAndRepeat()},function(u){c.error(u)})}n.inherits(o,a),o.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,c=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":l=this.data.substring(this.index,c);break;case"uint8array":l=this.data.subarray(this.index,c);break;case"array":case"nodebuffer":l=this.data.slice(this.index,c)}return this.index=c,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},i.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(t,i,s){function n(a){this.name=a||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(a){this.emit("data",a)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(a){this.emit("error",a)}return!0},error:function(a){return!this.isFinished&&(this.isPaused?this.generatedError=a:(this.isFinished=!0,this.emit("error",a),this.previous&&this.previous.error(a),this.cleanUp()),!0)},on:function(a,o){return this._listeners[a].push(o),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(a,o){if(this._listeners[a])for(var l=0;l "+a:a}},i.exports=n},{}],29:[function(t,i,s){var n=t("../utils"),a=t("./ConvertWorker"),o=t("./GenericWorker"),l=t("../base64"),c=t("../support"),u=t("../external"),h=null;if(c.nodestream)try{h=t("../nodejs/NodejsStreamOutputAdapter")}catch{}function d(p,m){return new u.Promise(function(g,b){var w=[],v=p._internalType,y=p._outputType,E=p._mimeType;p.on("data",function(C,k){w.push(C),m&&m(k)}).on("error",function(C){w=[],b(C)}).on("end",function(){try{var C=function(k,B,M){switch(k){case"blob":return n.newBlob(n.transformTo("arraybuffer",B),M);case"base64":return l.encode(B);default:return n.transformTo(k,B)}}(y,function(k,B){var M,U=0,V=null,T=0;for(M=0;M"u")s.blob=!1;else{var n=new ArrayBuffer(0);try{s.blob=new Blob([n],{type:"application/zip"}).size===0}catch{try{var a=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);a.append(n),s.blob=a.getBlob("application/zip").size===0}catch{s.blob=!1}}}try{s.nodestream=!!t("readable-stream").Readable}catch{s.nodestream=!1}},{"readable-stream":16}],31:[function(t,i,s){for(var n=t("./utils"),a=t("./support"),o=t("./nodejsUtils"),l=t("./stream/GenericWorker"),c=new Array(256),u=0;u<256;u++)c[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;c[254]=c[254]=1;function h(){l.call(this,"utf-8 decode"),this.leftOver=null}function d(){l.call(this,"utf-8 encode")}s.utf8encode=function(f){return a.nodebuffer?o.newBufferFrom(f,"utf-8"):function(p){var m,g,b,w,v,y=p.length,E=0;for(w=0;w>>6:(g<65536?m[v++]=224|g>>>12:(m[v++]=240|g>>>18,m[v++]=128|g>>>12&63),m[v++]=128|g>>>6&63),m[v++]=128|63&g);return m}(f)},s.utf8decode=function(f){return a.nodebuffer?n.transformTo("nodebuffer",f).toString("utf-8"):function(p){var m,g,b,w,v=p.length,y=new Array(2*v);for(m=g=0;m>10&1023,y[g++]=56320|1023&b)}return y.length!==g&&(y.subarray?y=y.subarray(0,g):y.length=g),n.applyFromCharCode(y)}(f=n.transformTo(a.uint8array?"uint8array":"array",f))},n.inherits(h,l),h.prototype.processChunk=function(f){var p=n.transformTo(a.uint8array?"uint8array":"array",f.data);if(this.leftOver&&this.leftOver.length){if(a.uint8array){var m=p;(p=new Uint8Array(m.length+this.leftOver.length)).set(this.leftOver,0),p.set(m,this.leftOver.length)}else p=this.leftOver.concat(p);this.leftOver=null}var g=function(w,v){var y;for((v=v||w.length)>w.length&&(v=w.length),y=v-1;0<=y&&(192&w[y])==128;)y--;return y<0||y===0?v:y+c[w[y]]>v?y:v}(p),b=p;g!==p.length&&(a.uint8array?(b=p.subarray(0,g),this.leftOver=p.subarray(g,p.length)):(b=p.slice(0,g),this.leftOver=p.slice(g,p.length))),this.push({data:s.utf8decode(b),meta:f.meta})},h.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=h,n.inherits(d,l),d.prototype.processChunk=function(f){this.push({data:s.utf8encode(f.data),meta:f.meta})},s.Utf8EncodeWorker=d},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,i,s){var n=t("./support"),a=t("./base64"),o=t("./nodejsUtils"),l=t("./external");function c(m){return m}function u(m,g){for(var b=0;b>8;this.dir=!!(16&this.externalFileAttributes),f==0&&(this.dosPermissions=63&this.externalFileAttributes),f==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var f=n(this.extraFields[1].value);this.uncompressedSize===a.MAX_VALUE_32BITS&&(this.uncompressedSize=f.readInt(8)),this.compressedSize===a.MAX_VALUE_32BITS&&(this.compressedSize=f.readInt(8)),this.localHeaderOffset===a.MAX_VALUE_32BITS&&(this.localHeaderOffset=f.readInt(8)),this.diskNumberStart===a.MAX_VALUE_32BITS&&(this.diskNumberStart=f.readInt(4))}},readExtraFields:function(f){var p,m,g,b=f.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});f.index+4>>6:(f<65536?d[g++]=224|f>>>12:(d[g++]=240|f>>>18,d[g++]=128|f>>>12&63),d[g++]=128|f>>>6&63),d[g++]=128|63&f);return d},s.buf2binstring=function(h){return u(h,h.length)},s.binstring2buf=function(h){for(var d=new n.Buf8(h.length),f=0,p=d.length;f>10&1023,w[p++]=56320|1023&m)}return u(w,p)},s.utf8border=function(h,d){var f;for((d=d||h.length)>h.length&&(d=h.length),f=d-1;0<=f&&(192&h[f])==128;)f--;return f<0||f===0?d:f+l[h[f]]>d?f:d}},{"./common":41}],43:[function(t,i,s){i.exports=function(n,a,o,l){for(var c=65535&n|0,u=n>>>16&65535|0,h=0;o!==0;){for(o-=h=2e3>>1:a>>>1;o[l]=a}return o}();i.exports=function(a,o,l,c){var u=n,h=c+l;a^=-1;for(var d=c;d>>8^u[255&(a^o[d])];return-1^a}},{}],46:[function(t,i,s){var n,a=t("../utils/common"),o=t("./trees"),l=t("./adler32"),c=t("./crc32"),u=t("./messages"),h=0,d=4,f=0,p=-2,m=-1,g=4,b=2,w=8,v=9,y=286,E=30,C=19,k=2*y+1,B=15,M=3,U=258,V=U+M+1,T=42,S=113,_=1,R=2,q=3,F=4;function L(A,Y){return A.msg=u[Y],Y}function W(A){return(A<<1)-(4A.avail_out&&(j=A.avail_out),j!==0&&(a.arraySet(A.output,Y.pending_buf,Y.pending_out,j,A.next_out),A.next_out+=j,Y.pending_out+=j,A.total_out+=j,A.avail_out-=j,Y.pending-=j,Y.pending===0&&(Y.pending_out=0))}function N(A,Y){o._tr_flush_block(A,0<=A.block_start?A.block_start:-1,A.strstart-A.block_start,Y),A.block_start=A.strstart,O(A.strm)}function ie(A,Y){A.pending_buf[A.pending++]=Y}function Q(A,Y){A.pending_buf[A.pending++]=Y>>>8&255,A.pending_buf[A.pending++]=255&Y}function Z(A,Y){var j,I,D=A.max_chain_length,G=A.strstart,J=A.prev_length,ee=A.nice_match,$=A.strstart>A.w_size-V?A.strstart-(A.w_size-V):0,re=A.window,he=A.w_mask,ne=A.prev,_e=A.strstart+U,Xe=re[G+J-1],Ue=re[G+J];A.prev_length>=A.good_match&&(D>>=2),ee>A.lookahead&&(ee=A.lookahead);do if(re[(j=Y)+J]===Ue&&re[j+J-1]===Xe&&re[j]===re[G]&&re[++j]===re[G+1]){G+=2,j++;do;while(re[++G]===re[++j]&&re[++G]===re[++j]&&re[++G]===re[++j]&&re[++G]===re[++j]&&re[++G]===re[++j]&&re[++G]===re[++j]&&re[++G]===re[++j]&&re[++G]===re[++j]&&G<_e);if(I=U-(_e-G),G=_e-U,J$&&--D!=0);return J<=A.lookahead?J:A.lookahead}function be(A){var Y,j,I,D,G,J,ee,$,re,he,ne=A.w_size;do{if(D=A.window_size-A.lookahead-A.strstart,A.strstart>=ne+(ne-V)){for(a.arraySet(A.window,A.window,ne,ne,0),A.match_start-=ne,A.strstart-=ne,A.block_start-=ne,Y=j=A.hash_size;I=A.head[--Y],A.head[Y]=ne<=I?I-ne:0,--j;);for(Y=j=ne;I=A.prev[--Y],A.prev[Y]=ne<=I?I-ne:0,--j;);D+=ne}if(A.strm.avail_in===0)break;if(J=A.strm,ee=A.window,$=A.strstart+A.lookahead,re=D,he=void 0,he=J.avail_in,re=M)for(G=A.strstart-A.insert,A.ins_h=A.window[G],A.ins_h=(A.ins_h<=M&&(A.ins_h=(A.ins_h<=M)if(I=o._tr_tally(A,A.strstart-A.match_start,A.match_length-M),A.lookahead-=A.match_length,A.match_length<=A.max_lazy_match&&A.lookahead>=M){for(A.match_length--;A.strstart++,A.ins_h=(A.ins_h<=M&&(A.ins_h=(A.ins_h<=M&&A.match_length<=A.prev_length){for(D=A.strstart+A.lookahead-M,I=o._tr_tally(A,A.strstart-1-A.prev_match,A.prev_length-M),A.lookahead-=A.prev_length-1,A.prev_length-=2;++A.strstart<=D&&(A.ins_h=(A.ins_h<A.pending_buf_size-5&&(j=A.pending_buf_size-5);;){if(A.lookahead<=1){if(be(A),A.lookahead===0&&Y===h)return _;if(A.lookahead===0)break}A.strstart+=A.lookahead,A.lookahead=0;var I=A.block_start+j;if((A.strstart===0||A.strstart>=I)&&(A.lookahead=A.strstart-I,A.strstart=I,N(A,!1),A.strm.avail_out===0)||A.strstart-A.block_start>=A.w_size-V&&(N(A,!1),A.strm.avail_out===0))return _}return A.insert=0,Y===d?(N(A,!0),A.strm.avail_out===0?q:F):(A.strstart>A.block_start&&(N(A,!1),A.strm.avail_out),_)}),new pe(4,4,8,4,Se),new pe(4,5,16,8,Se),new pe(4,6,32,32,Se),new pe(4,4,16,16,ce),new pe(8,16,32,32,ce),new pe(8,16,128,128,ce),new pe(8,32,128,256,ce),new pe(32,128,258,1024,ce),new pe(32,258,258,4096,ce)],s.deflateInit=function(A,Y){return we(A,Y,w,15,8,0)},s.deflateInit2=we,s.deflateReset=fe,s.deflateResetKeep=le,s.deflateSetHeader=function(A,Y){return A&&A.state?A.state.wrap!==2?p:(A.state.gzhead=Y,f):p},s.deflate=function(A,Y){var j,I,D,G;if(!A||!A.state||5>8&255),ie(I,I.gzhead.time>>16&255),ie(I,I.gzhead.time>>24&255),ie(I,I.level===9?2:2<=I.strategy||I.level<2?4:0),ie(I,255&I.gzhead.os),I.gzhead.extra&&I.gzhead.extra.length&&(ie(I,255&I.gzhead.extra.length),ie(I,I.gzhead.extra.length>>8&255)),I.gzhead.hcrc&&(A.adler=c(A.adler,I.pending_buf,I.pending,0)),I.gzindex=0,I.status=69):(ie(I,0),ie(I,0),ie(I,0),ie(I,0),ie(I,0),ie(I,I.level===9?2:2<=I.strategy||I.level<2?4:0),ie(I,3),I.status=S);else{var J=w+(I.w_bits-8<<4)<<8;J|=(2<=I.strategy||I.level<2?0:I.level<6?1:I.level===6?2:3)<<6,I.strstart!==0&&(J|=32),J+=31-J%31,I.status=S,Q(I,J),I.strstart!==0&&(Q(I,A.adler>>>16),Q(I,65535&A.adler)),A.adler=1}if(I.status===69)if(I.gzhead.extra){for(D=I.pending;I.gzindex<(65535&I.gzhead.extra.length)&&(I.pending!==I.pending_buf_size||(I.gzhead.hcrc&&I.pending>D&&(A.adler=c(A.adler,I.pending_buf,I.pending-D,D)),O(A),D=I.pending,I.pending!==I.pending_buf_size));)ie(I,255&I.gzhead.extra[I.gzindex]),I.gzindex++;I.gzhead.hcrc&&I.pending>D&&(A.adler=c(A.adler,I.pending_buf,I.pending-D,D)),I.gzindex===I.gzhead.extra.length&&(I.gzindex=0,I.status=73)}else I.status=73;if(I.status===73)if(I.gzhead.name){D=I.pending;do{if(I.pending===I.pending_buf_size&&(I.gzhead.hcrc&&I.pending>D&&(A.adler=c(A.adler,I.pending_buf,I.pending-D,D)),O(A),D=I.pending,I.pending===I.pending_buf_size)){G=1;break}G=I.gzindexD&&(A.adler=c(A.adler,I.pending_buf,I.pending-D,D)),G===0&&(I.gzindex=0,I.status=91)}else I.status=91;if(I.status===91)if(I.gzhead.comment){D=I.pending;do{if(I.pending===I.pending_buf_size&&(I.gzhead.hcrc&&I.pending>D&&(A.adler=c(A.adler,I.pending_buf,I.pending-D,D)),O(A),D=I.pending,I.pending===I.pending_buf_size)){G=1;break}G=I.gzindexD&&(A.adler=c(A.adler,I.pending_buf,I.pending-D,D)),G===0&&(I.status=103)}else I.status=103;if(I.status===103&&(I.gzhead.hcrc?(I.pending+2>I.pending_buf_size&&O(A),I.pending+2<=I.pending_buf_size&&(ie(I,255&A.adler),ie(I,A.adler>>8&255),A.adler=0,I.status=S)):I.status=S),I.pending!==0){if(O(A),A.avail_out===0)return I.last_flush=-1,f}else if(A.avail_in===0&&W(Y)<=W(j)&&Y!==d)return L(A,-5);if(I.status===666&&A.avail_in!==0)return L(A,-5);if(A.avail_in!==0||I.lookahead!==0||Y!==h&&I.status!==666){var ee=I.strategy===2?function($,re){for(var he;;){if($.lookahead===0&&(be($),$.lookahead===0)){if(re===h)return _;break}if($.match_length=0,he=o._tr_tally($,0,$.window[$.strstart]),$.lookahead--,$.strstart++,he&&(N($,!1),$.strm.avail_out===0))return _}return $.insert=0,re===d?(N($,!0),$.strm.avail_out===0?q:F):$.last_lit&&(N($,!1),$.strm.avail_out===0)?_:R}(I,Y):I.strategy===3?function($,re){for(var he,ne,_e,Xe,Ue=$.window;;){if($.lookahead<=U){if(be($),$.lookahead<=U&&re===h)return _;if($.lookahead===0)break}if($.match_length=0,$.lookahead>=M&&0<$.strstart&&(ne=Ue[_e=$.strstart-1])===Ue[++_e]&&ne===Ue[++_e]&&ne===Ue[++_e]){Xe=$.strstart+U;do;while(ne===Ue[++_e]&&ne===Ue[++_e]&&ne===Ue[++_e]&&ne===Ue[++_e]&&ne===Ue[++_e]&&ne===Ue[++_e]&&ne===Ue[++_e]&&ne===Ue[++_e]&&_e$.lookahead&&($.match_length=$.lookahead)}if($.match_length>=M?(he=o._tr_tally($,1,$.match_length-M),$.lookahead-=$.match_length,$.strstart+=$.match_length,$.match_length=0):(he=o._tr_tally($,0,$.window[$.strstart]),$.lookahead--,$.strstart++),he&&(N($,!1),$.strm.avail_out===0))return _}return $.insert=0,re===d?(N($,!0),$.strm.avail_out===0?q:F):$.last_lit&&(N($,!1),$.strm.avail_out===0)?_:R}(I,Y):n[I.level].func(I,Y);if(ee!==q&&ee!==F||(I.status=666),ee===_||ee===q)return A.avail_out===0&&(I.last_flush=-1),f;if(ee===R&&(Y===1?o._tr_align(I):Y!==5&&(o._tr_stored_block(I,0,0,!1),Y===3&&(z(I.head),I.lookahead===0&&(I.strstart=0,I.block_start=0,I.insert=0))),O(A),A.avail_out===0))return I.last_flush=-1,f}return Y!==d?f:I.wrap<=0?1:(I.wrap===2?(ie(I,255&A.adler),ie(I,A.adler>>8&255),ie(I,A.adler>>16&255),ie(I,A.adler>>24&255),ie(I,255&A.total_in),ie(I,A.total_in>>8&255),ie(I,A.total_in>>16&255),ie(I,A.total_in>>24&255)):(Q(I,A.adler>>>16),Q(I,65535&A.adler)),O(A),0=j.w_size&&(G===0&&(z(j.head),j.strstart=0,j.block_start=0,j.insert=0),re=new a.Buf8(j.w_size),a.arraySet(re,Y,he-j.w_size,j.w_size,0),Y=re,he=j.w_size),J=A.avail_in,ee=A.next_in,$=A.input,A.avail_in=he,A.next_in=0,A.input=Y,be(j);j.lookahead>=M;){for(I=j.strstart,D=j.lookahead-(M-1);j.ins_h=(j.ins_h<>>=M=B>>>24,v-=M,(M=B>>>16&255)===0)R[u++]=65535&B;else{if(!(16&M)){if(!(64&M)){B=y[(65535&B)+(w&(1<>>=M,v-=M),v<15&&(w+=_[l++]<>>=M=B>>>24,v-=M,!(16&(M=B>>>16&255))){if(!(64&M)){B=E[(65535&B)+(w&(1<>>=M,v-=M,(M=u-h)>3,w&=(1<<(v-=U<<3))-1,n.next_in=l,n.next_out=u,n.avail_in=l>>24&255)+(T>>>8&65280)+((65280&T)<<8)+((255&T)<<24)}function w(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function v(T){var S;return T&&T.state?(S=T.state,T.total_in=T.total_out=S.total=0,T.msg="",S.wrap&&(T.adler=1&S.wrap),S.mode=p,S.last=0,S.havedict=0,S.dmax=32768,S.head=null,S.hold=0,S.bits=0,S.lencode=S.lendyn=new n.Buf32(m),S.distcode=S.distdyn=new n.Buf32(g),S.sane=1,S.back=-1,d):f}function y(T){var S;return T&&T.state?((S=T.state).wsize=0,S.whave=0,S.wnext=0,v(T)):f}function E(T,S){var _,R;return T&&T.state?(R=T.state,S<0?(_=0,S=-S):(_=1+(S>>4),S<48&&(S&=15)),S&&(S<8||15=F.wsize?(n.arraySet(F.window,S,_-F.wsize,F.wsize,0),F.wnext=0,F.whave=F.wsize):(R<(q=F.wsize-F.wnext)&&(q=R),n.arraySet(F.window,S,_-R,q,F.wnext),(R-=q)?(n.arraySet(F.window,S,_-R,R,0),F.wnext=R,F.whave=F.wsize):(F.wnext+=q,F.wnext===F.wsize&&(F.wnext=0),F.whave>>8&255,_.check=o(_.check,G,2,0),N=O=0,_.mode=2;break}if(_.flags=0,_.head&&(_.head.done=!1),!(1&_.wrap)||(((255&O)<<8)+(O>>8))%31){T.msg="incorrect header check",_.mode=30;break}if((15&O)!=8){T.msg="unknown compression method",_.mode=30;break}if(N-=4,A=8+(15&(O>>>=4)),_.wbits===0)_.wbits=A;else if(A>_.wbits){T.msg="invalid window size",_.mode=30;break}_.dmax=1<>8&1),512&_.flags&&(G[0]=255&O,G[1]=O>>>8&255,_.check=o(_.check,G,2,0)),N=O=0,_.mode=3;case 3:for(;N<32;){if(W===0)break e;W--,O+=R[F++]<>>8&255,G[2]=O>>>16&255,G[3]=O>>>24&255,_.check=o(_.check,G,4,0)),N=O=0,_.mode=4;case 4:for(;N<16;){if(W===0)break e;W--,O+=R[F++]<>8),512&_.flags&&(G[0]=255&O,G[1]=O>>>8&255,_.check=o(_.check,G,2,0)),N=O=0,_.mode=5;case 5:if(1024&_.flags){for(;N<16;){if(W===0)break e;W--,O+=R[F++]<>>8&255,_.check=o(_.check,G,2,0)),N=O=0}else _.head&&(_.head.extra=null);_.mode=6;case 6:if(1024&_.flags&&(W<(Z=_.length)&&(Z=W),Z&&(_.head&&(A=_.head.extra_len-_.length,_.head.extra||(_.head.extra=new Array(_.head.extra_len)),n.arraySet(_.head.extra,R,F,Z,A)),512&_.flags&&(_.check=o(_.check,R,Z,F)),W-=Z,F+=Z,_.length-=Z),_.length))break e;_.length=0,_.mode=7;case 7:if(2048&_.flags){if(W===0)break e;for(Z=0;A=R[F+Z++],_.head&&A&&_.length<65536&&(_.head.name+=String.fromCharCode(A)),A&&Z>9&1,_.head.done=!0),T.adler=_.check=0,_.mode=12;break;case 10:for(;N<32;){if(W===0)break e;W--,O+=R[F++]<>>=7&N,N-=7&N,_.mode=27;break}for(;N<3;){if(W===0)break e;W--,O+=R[F++]<>>=1)){case 0:_.mode=14;break;case 1:if(U(_),_.mode=20,S!==6)break;O>>>=2,N-=2;break e;case 2:_.mode=17;break;case 3:T.msg="invalid block type",_.mode=30}O>>>=2,N-=2;break;case 14:for(O>>>=7&N,N-=7&N;N<32;){if(W===0)break e;W--,O+=R[F++]<>>16^65535)){T.msg="invalid stored block lengths",_.mode=30;break}if(_.length=65535&O,N=O=0,_.mode=15,S===6)break e;case 15:_.mode=16;case 16:if(Z=_.length){if(W>>=5,N-=5,_.ndist=1+(31&O),O>>>=5,N-=5,_.ncode=4+(15&O),O>>>=4,N-=4,286<_.nlen||30<_.ndist){T.msg="too many length or distance symbols",_.mode=30;break}_.have=0,_.mode=18;case 18:for(;_.have<_.ncode;){for(;N<3;){if(W===0)break e;W--,O+=R[F++]<>>=3,N-=3}for(;_.have<19;)_.lens[J[_.have++]]=0;if(_.lencode=_.lendyn,_.lenbits=7,j={bits:_.lenbits},Y=c(0,_.lens,0,19,_.lencode,0,_.work,j),_.lenbits=j.bits,Y){T.msg="invalid code lengths set",_.mode=30;break}_.have=0,_.mode=19;case 19:for(;_.have<_.nlen+_.ndist;){for(;pe=(D=_.lencode[O&(1<<_.lenbits)-1])>>>16&255,xe=65535&D,!((ce=D>>>24)<=N);){if(W===0)break e;W--,O+=R[F++]<>>=ce,N-=ce,_.lens[_.have++]=xe;else{if(xe===16){for(I=ce+2;N>>=ce,N-=ce,_.have===0){T.msg="invalid bit length repeat",_.mode=30;break}A=_.lens[_.have-1],Z=3+(3&O),O>>>=2,N-=2}else if(xe===17){for(I=ce+3;N>>=ce)),O>>>=3,N-=3}else{for(I=ce+7;N>>=ce)),O>>>=7,N-=7}if(_.have+Z>_.nlen+_.ndist){T.msg="invalid bit length repeat",_.mode=30;break}for(;Z--;)_.lens[_.have++]=A}}if(_.mode===30)break;if(_.lens[256]===0){T.msg="invalid code -- missing end-of-block",_.mode=30;break}if(_.lenbits=9,j={bits:_.lenbits},Y=c(u,_.lens,0,_.nlen,_.lencode,0,_.work,j),_.lenbits=j.bits,Y){T.msg="invalid literal/lengths set",_.mode=30;break}if(_.distbits=6,_.distcode=_.distdyn,j={bits:_.distbits},Y=c(h,_.lens,_.nlen,_.ndist,_.distcode,0,_.work,j),_.distbits=j.bits,Y){T.msg="invalid distances set",_.mode=30;break}if(_.mode=20,S===6)break e;case 20:_.mode=21;case 21:if(6<=W&&258<=z){T.next_out=L,T.avail_out=z,T.next_in=F,T.avail_in=W,_.hold=O,_.bits=N,l(T,Q),L=T.next_out,q=T.output,z=T.avail_out,F=T.next_in,R=T.input,W=T.avail_in,O=_.hold,N=_.bits,_.mode===12&&(_.back=-1);break}for(_.back=0;pe=(D=_.lencode[O&(1<<_.lenbits)-1])>>>16&255,xe=65535&D,!((ce=D>>>24)<=N);){if(W===0)break e;W--,O+=R[F++]<>le)])>>>16&255,xe=65535&D,!(le+(ce=D>>>24)<=N);){if(W===0)break e;W--,O+=R[F++]<>>=le,N-=le,_.back+=le}if(O>>>=ce,N-=ce,_.back+=ce,_.length=xe,pe===0){_.mode=26;break}if(32&pe){_.back=-1,_.mode=12;break}if(64&pe){T.msg="invalid literal/length code",_.mode=30;break}_.extra=15&pe,_.mode=22;case 22:if(_.extra){for(I=_.extra;N>>=_.extra,N-=_.extra,_.back+=_.extra}_.was=_.length,_.mode=23;case 23:for(;pe=(D=_.distcode[O&(1<<_.distbits)-1])>>>16&255,xe=65535&D,!((ce=D>>>24)<=N);){if(W===0)break e;W--,O+=R[F++]<>le)])>>>16&255,xe=65535&D,!(le+(ce=D>>>24)<=N);){if(W===0)break e;W--,O+=R[F++]<>>=le,N-=le,_.back+=le}if(O>>>=ce,N-=ce,_.back+=ce,64&pe){T.msg="invalid distance code",_.mode=30;break}_.offset=xe,_.extra=15&pe,_.mode=24;case 24:if(_.extra){for(I=_.extra;N>>=_.extra,N-=_.extra,_.back+=_.extra}if(_.offset>_.dmax){T.msg="invalid distance too far back",_.mode=30;break}_.mode=25;case 25:if(z===0)break e;if(Z=Q-z,_.offset>Z){if((Z=_.offset-Z)>_.whave&&_.sane){T.msg="invalid distance too far back",_.mode=30;break}be=Z>_.wnext?(Z-=_.wnext,_.wsize-Z):_.wnext-Z,Z>_.length&&(Z=_.length),Se=_.window}else Se=q,be=L-_.offset,Z=_.length;for(zk?(M=be[Se+g[S]],N[ie+g[S]]):(M=96,0),w=1<>L)+(v-=w)]=B<<24|M<<16|U|0,v!==0;);for(w=1<>=1;if(w!==0?(O&=w-1,O+=w):O=0,S++,--Q[T]==0){if(T===R)break;T=h[d+g[S]]}if(q>>7)]}function ie(D,G){D.pending_buf[D.pending++]=255&G,D.pending_buf[D.pending++]=G>>>8&255}function Q(D,G,J){D.bi_valid>b-J?(D.bi_buf|=G<>b-D.bi_valid,D.bi_valid+=J-b):(D.bi_buf|=G<>>=1,J<<=1,0<--G;);return J>>>1}function Se(D,G,J){var ee,$,re=new Array(g+1),he=0;for(ee=1;ee<=g;ee++)re[ee]=he=he+J[ee-1]<<1;for($=0;$<=G;$++){var ne=D[2*$+1];ne!==0&&(D[2*$]=be(re[ne]++,ne))}}function ce(D){var G;for(G=0;G>1;1<=J;J--)le(D,re,J);for($=_e;J=D.heap[1],D.heap[1]=D.heap[D.heap_len--],le(D,re,1),ee=D.heap[1],D.heap[--D.heap_max]=J,D.heap[--D.heap_max]=ee,re[2*$]=re[2*J]+re[2*ee],D.depth[$]=(D.depth[J]>=D.depth[ee]?D.depth[J]:D.depth[ee])+1,re[2*J+1]=re[2*ee+1]=$,D.heap[1]=$++,le(D,re,1),2<=D.heap_len;);D.heap[--D.heap_max]=D.heap[1],function(Ue,jt){var fs,ri,ps,dt,X,me,Te=jt.dyn_tree,qe=jt.max_code,Ve=jt.stat_desc.static_tree,Bt=jt.stat_desc.has_stree,qt=jt.stat_desc.extra_bits,gr=jt.stat_desc.extra_base,Or=jt.stat_desc.max_length,si=0;for(dt=0;dt<=g;dt++)Ue.bl_count[dt]=0;for(Te[2*Ue.heap[Ue.heap_max]+1]=0,fs=Ue.heap_max+1;fs>=7;$>>=1)if(1&Xe&&ne.dyn_ltree[2*_e]!==0)return a;if(ne.dyn_ltree[18]!==0||ne.dyn_ltree[20]!==0||ne.dyn_ltree[26]!==0)return o;for(_e=32;_e>>3,(re=D.static_len+3+7>>>3)<=$&&($=re)):$=re=J+5,J+4<=$&&G!==-1?I(D,G,J,ee):D.strategy===4||re===$?(Q(D,2+(ee?1:0),3),fe(D,V,T)):(Q(D,4+(ee?1:0),3),function(ne,_e,Xe,Ue){var jt;for(Q(ne,_e-257,5),Q(ne,Xe-1,5),Q(ne,Ue-4,4),jt=0;jt>>8&255,D.pending_buf[D.d_buf+2*D.last_lit+1]=255&G,D.pending_buf[D.l_buf+D.last_lit]=255&J,D.last_lit++,G===0?D.dyn_ltree[2*J]++:(D.matches++,G--,D.dyn_ltree[2*(_[J]+h+1)]++,D.dyn_dtree[2*N(G)]++),D.last_lit===D.lit_bufsize-1},s._tr_align=function(D){Q(D,2,3),Z(D,v,V),function(G){G.bi_valid===16?(ie(G,G.bi_buf),G.bi_buf=0,G.bi_valid=0):8<=G.bi_valid&&(G.pending_buf[G.pending++]=255&G.bi_buf,G.bi_buf>>=8,G.bi_valid-=8)}(D)}},{"../utils/common":41}],53:[function(t,i,s){i.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,i,s){(function(n){(function(a,o){if(!a.setImmediate){var l,c,u,h,d=1,f={},p=!1,m=a.document,g=Object.getPrototypeOf&&Object.getPrototypeOf(a);g=g&&g.setTimeout?g:a,l={}.toString.call(a.process)==="[object process]"?function(y){process.nextTick(function(){w(y)})}:function(){if(a.postMessage&&!a.importScripts){var y=!0,E=a.onmessage;return a.onmessage=function(){y=!1},a.postMessage("","*"),a.onmessage=E,y}}()?(h="setImmediate$"+Math.random()+"$",a.addEventListener?a.addEventListener("message",v,!1):a.attachEvent("onmessage",v),function(y){a.postMessage(h+y,"*")}):a.MessageChannel?((u=new MessageChannel).port1.onmessage=function(y){w(y.data)},function(y){u.port2.postMessage(y)}):m&&"onreadystatechange"in m.createElement("script")?(c=m.documentElement,function(y){var E=m.createElement("script");E.onreadystatechange=function(){w(y),E.onreadystatechange=null,c.removeChild(E),E=null},c.appendChild(E)}):function(y){setTimeout(w,0,y)},g.setImmediate=function(y){typeof y!="function"&&(y=new Function(""+y));for(var E=new Array(arguments.length-1),C=0;C"u"?n===void 0?this:n:self)}).call(this,typeof Yt<"u"?Yt:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(ry);var F3=ry.exports;const L3=Xa(F3),xr=class xr{static async writeHandle(e,t){const i=this.workID++,s=new Promise((o,l)=>this.map.set(i,[o,l])),n=new TextEncoder,a=typeof t=="string"?n.encode(t):await t.arrayBuffer();return this.worker.postMessage([i,e,a],[a]),s}};Ys(xr,"worker",new Worker(new URL("/smeditor/assets/SafariFileWorker-557e53c3.js",self.location),{type:"module"})),Ys(xr,"workID",0),Ys(xr,"map",new Map),xr.worker.onmessage=e=>{const t=e.data;t.success?xr.map.get(t.id)[0]():xr.map.get(t.id)[1](t.reason),xr.map.delete(t.id)};let zu=xr;class O3{_root;async getRoot(){return this._root||(D3.adapter.native?await Dm().then(e=>this._root=e):await Dm(Qe(()=>import("./memory-d5c05bb2.js"),[])).then(e=>this._root=e)),this._root}async uploadHandle(e,t){let i;if(typeof t=="string"){const s=await this.getDirectoryHandle(t,{create:!0});if(!s)return;i=s}else i=t??await this.getRoot();if(e.kind=="file"){const s=await i.getFileHandle(e.name,{create:!0});await this.writeFile(s,await e.getFile())}else{const s=await i.getDirectoryHandle(e.name,{create:!0}),n=[];for await(const a of e.values())n.push(this.uploadHandle(a,s));await Promise.all(n)}}async uploadFiles(e,t){let i;if(typeof t=="string"){const s=await this.getDirectoryHandle(t,{create:!0});if(!s)return;i=s}else i=t??await this.getRoot();if(e.isFile){const s=e;if(s.name==".DS_Store")return;s.file(async n=>{const a=await i.getFileHandle(n.name,{create:!0});await this.writeHandle(a,n)})}else if(e.isDirectory){const s=e.createReader(),n=await i.getDirectoryHandle(e.name,{create:!0});for await(const a of n.values())await n.removeEntry(a.name,{recursive:!0});s.readEntries(async a=>{const o=[];for(let l=0;li!="."&&i!="");t.indexOf("..")>-1;){const i=t.indexOf("..");if(i==0)throw Error("Path"+t.join("/")+"is invalid!");t.splice(i-1,2)}return t.join("/")}async zipDirectory(e,t){const i=t??new L3,s=sr(e)==""?e:Ht(e),n=await this.getDirectoryHandle(s);if(n){for(const a of await this.getDirectoryFiles(n))i.file(a.name,await a.getFile());for(const a of await this.getDirectoryFolders(n)){const o=i.folder(a.name);if(!o){console.error("Failed to zip folder "+s+"/"+a.name);continue}await this.zipDirectory(s+"/"+a.name,o)}return i}}async saveDirectory(e){const t=sr(e)==""?e:Ht(e);Ee.create("Exporting "+t+".zip");const i=await M3({_preferPolyfill:!1,suggestedName:`${t}.zip`,types:[{accept:{"application/zip":[".zip"]}}],excludeAcceptAllOption:!1}),s=await this.zipDirectory(e);s&&await s.generateAsync({type:"blob"}).then(async n=>{if(!window.showSaveFilePicker){console.log(n);const a=document.createElement("a"),o=URL.createObjectURL(n);document.body.appendChild(a),a.href=o,a.download=t+".zip",a.click(),a.remove(),window.URL.revokeObjectURL(o);return}await this.writeHandle(i,n)})}async renameFile(e,t){if(e!=t)try{const i=await this.getDirectoryHandle(Ht(e)),s=await this.getDirectoryHandle(Ht(t),{create:!0}),n=await this.getFileHandle(e);if(!i||!s||!n)return;await this.copyToHandle(s,n,er(t)),await i.removeEntry(er(e))}catch(i){console.error(i)}}async renameDirectory(e,t){if(!t.startsWith(e))try{const i=await this.getDirectoryHandle(Ht(e)),s=await this.getDirectoryHandle(Ht(t),{create:!0}),n=await this.getDirectoryHandle(e);if(!i||!s||!n)return;await this.copyToHandle(s,n,er(t)),await i.removeEntry(er(e),{recursive:!0})}catch(i){console.error(i)}}async copyToHandle(e,t,i){try{if(t.kind=="directory"){const s=await e.getDirectoryHandle(i??t.name,{create:!0}),n=[];for await(const a of t.values())n.push(this.copyToHandle(s,a));await Promise.all(n)}else{const s=await t.getFile(),n=await e.getFileHandle(i??t.name,{create:!0});await this.writeHandle(n,s)}}catch(s){console.error(s)}}getRelativePath(e,t){const i=e.split("/"),s=t.split("/"),n=Math.min(i.length,s.length);let a=n;for(let l=0;limport("./NodeFileHandler-1495cd5b.js"),[])).NodeFileHandler:new O3}static getStandardHandler(){return this.standardHandler}static getHandler(e){return e!==void 0&&e.startsWith("https://")||e?.startsWith("http://")?this.urlHandler:this.standardHandler}static handleDropEvent(e,t){return this.getHandler().handleDropEvent(e,t)}static getDirectoryHandle(e,t){return Le.getHandler(e).getDirectoryHandle(e,t)}static hasFile(e){return Le.getHandler(e).hasFile(e)}static getFileHandle(e,t){return Le.getHandler(e).getFileHandle(e,t)}static getFileHandleRelativeTo(e,t){return Le.getHandler(e).getFileHandleRelativeTo(e,t)}static getDirectoryFiles(e){return Le.getHandler(typeof e=="string"?e:void 0).getDirectoryFiles(e)}static getDirectoryFolders(e){return Le.getHandler(typeof e=="string"?e:void 0).getDirectoryFolders(e)}static writeFile(e,t){return Le.getHandler(typeof e=="string"?e:void 0).writeFile(e,t)}static removeFile(e){return Le.getHandler(e).removeFile(e)}static getRelativePath(e,t){return Le.getHandler().getRelativePath(e,t)}}class Ud extends Tt{app;dirOptions;fileDropPath="";draggedElement;draggedCopy;keyHandler;dropHandler;mouseHandler;dragHandler;constructor(e,t,i){super({title:t.title,width:500,height:400,disableClose:t.disableClose,win_id:"file_selector"+Math.random(),blocking:!0}),this.app=e,this.dirOptions=t,t.accepted_file_types||=[],this.keyHandler=this.handleKeyEvent.bind(this),this.dropHandler=this.handleDropEvent.bind(this),this.mouseHandler=this.handleMouseEvent.bind(this),this.dragHandler=this.handleDragEvent.bind(this),this.initView().then(()=>{i&&this.selectPath(i),t.onload?.()})}async initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("menu-options");const i=document.createElement("div");i.classList.add("menu-left");const s=document.createElement("div");s.classList.add("menu-right"),t.appendChild(i),t.appendChild(s);const n=document.createElement("button");n.innerText="Cancel",n.onclick=()=>{window.removeEventListener("keydown",this.keyHandler,!0),window.removeEventListener("drop",this.dropHandler,!0),this.closeWindow()};const a=document.createElement("button");a.innerText="Select",a.classList.add("confirm"),a.onclick=()=>this.confirmFile(),a.disabled=!0,i.appendChild(n),s.appendChild(a);const o=document.createElement("div");o.classList.add("dir-selector"),o.onclick=b=>{b.target==o&&this.selectElement(void 0)};const l=document.createElement("div");l.classList.add("file-options");const c=document.createElement("button"),u=Ce.getIcon("ADD_FILE",16);c.appendChild(u),c.appendChild(document.createTextNode("Upload files")),l.appendChild(c),c.onclick=async()=>{const b=this.fileDropPath,w=await ey({_preferPolyfill:!0,excludeAcceptAllOption:!1,multiple:!0}),y=this.viewElement.querySelector(".info.selected")?.dataset.path??"",E=[];for(const C of w)E.push(Le.getStandardHandler().uploadHandle(C,y));await Promise.all(E),await this.refreshDirectory(b),this.getAcceptableFile(b).then(C=>this.selectPath(C))};const h=document.createElement("button"),d=Ce.getIcon("FOLDER",16);h.appendChild(d),h.appendChild(document.createTextNode("Upload folder")),l.appendChild(h),h.onclick=async()=>{const b=this.fileDropPath,w=await S3({_preferPolyfill:!0}),y=this.viewElement.querySelector(".info.selected")?.dataset.path??"";await Le.getStandardHandler().uploadHandle(w,y),await this.refreshDirectory(b),this.getAcceptableFile(b==""?w.name:b+"/"+w.name).then(E=>this.selectPath(E))};const f=document.createElement("button");f.classList.add("rename");const p=Ce.getIcon("EDIT",16);f.appendChild(p),f.appendChild(document.createTextNode("Rename")),f.disabled=!0,f.onclick=()=>{const b=this.viewElement.querySelector(".info.selected");b?.dataset.path&&this.startEditing(b.querySelector("textarea"))},l.appendChild(f);const m=document.createElement("button");m.classList.add("delete");const g=Ce.getIcon("TRASH",16);m.appendChild(g),m.appendChild(document.createTextNode("Delete")),m.disabled=!0,m.onclick=()=>{const b=this.viewElement.querySelector(".info.selected"),w=b?.dataset.path;if(!w)return;const v=b.parentElement.classList.contains("folder");Le.getStandardHandler()[v?"removeDirectory":"removeFile"](w).then(()=>{const y=this.getElement(w);y&&(y.parentElement?.remove(),m.disabled=!0,f.disabled=!0)})},l.appendChild(m),e.appendChild(o),e.appendChild(l),e.appendChild(t),this.viewElement.appendChild(e),window.addEventListener("keydown",this.keyHandler,!0),window.addEventListener("drop",this.dropHandler,!0),window.addEventListener("mousemove",this.dragHandler,!0),this.viewElement.addEventListener("dragover",this.mouseHandler),await this.createDiv("").then(b=>o.replaceChildren(...b))}async expand(e){if(!e.parentElement.classList.contains("folder"))return;e.parentElement.classList.remove("collapsed");const t=e.nextSibling;await this.createDiv(e.dataset.path).then(i=>{t.replaceChildren(...i)})}collapse(e){if(!e.parentElement.classList.contains("folder"))return;e.parentElement.classList.add("collapsed"),e.nextSibling.replaceChildren()}selectElement(e){if(this.viewElement.querySelector(".info.selected")?.classList.remove("selected"),!e){this.viewElement.querySelector(".delete").disabled=!0,this.viewElement.querySelector(".rename").disabled=!0;return}e.classList.add("selected"),ka(e,{scrollMode:"if-needed",block:"nearest",inline:"nearest"});const t=this.viewElement.querySelector("button.confirm"),i=e.dataset.path;t.disabled=!0,i&&(t.disabled=!this.acceptableFileType(i),this.viewElement.querySelector(".delete").disabled=!1,this.viewElement.querySelector(".rename").disabled=!1)}async createDiv(e){const t=await Le.getStandardHandler().getDirectoryFolders(e);let i=await Le.getStandardHandler().getDirectoryFiles(e);return t.sort((s,n)=>s.name.toLowerCase().localeCompare(n.name.toLowerCase())),i.sort((s,n)=>s.name.toLowerCase().localeCompare(n.name.toLowerCase())),i=i.filter(s=>sr(s.name)!=".crswap"),t.map(s=>this.createBaseElement(e,s)).concat(i.map(s=>this.createBaseElement(e,s)))}createBaseElement(e,t){e!=""&&(e+="/");const i=document.createElement("div");i.classList.add("item");const s=document.createElement("div");if(s.classList.add("info"),i.appendChild(s),t.kind=="directory"){const a=Ce.getIcon("CHEVRON",16);a.classList.add("folder-icon"),s.appendChild(a);const o=document.createElement("div");o.classList.add("children"),i.appendChild(o),i.classList.add("folder"),i.classList.add("collapsed"),s.addEventListener("click",l=>{const c=l.target;c?.classList.contains("options-icon")||c.tagName=="TEXTAREA"&&!c.disabled||(i.classList.contains("collapsed")?this.expand(s):this.collapse(s))})}else{this.acceptableFileType(t.name)||s.classList.add("disabled");const a=Ce.getIcon(this.getIconId(t.name),16);s.appendChild(a)}s.dataset.path=e+t.name;const n=document.createElement("textarea");return n.rows=1,n.disabled=!0,n.autocomplete="off",n.autocapitalize="off",n.spellcheck=!1,n.innerText=t.name,n.style.pointerEvents="none",n.classList.add("title"),s.appendChild(n),s.addEventListener("click",()=>this.selectElement(s)),s.addEventListener("mousedown",()=>this.startDragging(s)),s.ondblclick=()=>this.confirmFile(),i}confirmFile(){const t=this.viewElement.querySelector(".info.selected")?.dataset.path;t&&this.acceptableFileType(t)&&(this.dirOptions.callback?.(t),window.removeEventListener("keydown",this.keyHandler,!0),window.removeEventListener("drop",this.dropHandler,!0),window.removeEventListener("mousemove",this.dragHandler,!0),this.closeWindow())}acceptableFileType(e){return this.dirOptions.accepted_file_types.length==0||this.dirOptions.accepted_file_types.includes(sr(e))}getIconId(e){const t=sr(e);return t==""&&!e.startsWith(".")?"FOLDER":Ts.includes(t)?"IMAGE_FILE":rh.includes(t)?"VOLUME":[".sm",".ssc"].includes(t)?"SM_FILE":"UNKNOWN_FILE"}startEditing(e){const t=e.value,i=!!e.parentElement?.parentElement?.classList.contains("folder"),s=e.parentElement?.dataset.path??"",n=Ht(s);e.value=s.split("/").at(-1)??"",window.removeEventListener("keydown",this.keyHandler,!0),e.disabled=!1,e.style.pointerEvents="",e.focus(),e.addEventListener("keypress",a=>{a.code=="Enter"&&(a.preventDefault(),a.stopImmediatePropagation(),e.blur())},!0),e.addEventListener("blur",async()=>{if(window.addEventListener("keydown",this.keyHandler,!0),e.disabled=!0,e.style.pointerEvents="none",e.value.startsWith(".")){e.value=t;return}e.value=e.value.replaceAll("/","");const a=n==""?e.value:n+"/"+e.value;a!=s&&(e.parentElement.dataset.path=a,await Le.getStandardHandler()[i?"renameDirectory":"renameFile"](s,a),this.refreshDirectory(n),e.value.length>32&&(e.value=e.value.slice(0,32)+"..."))})}async refreshDirectory(e){const t=this.viewElement.querySelector(".dir-selector");if(!t)return;let i=t.querySelector("div[data-path='"+this.escapeSelector(e)+"']")?.nextSibling;if(e==""&&(i=t),!i)return;const s=Array.from(i.parentElement.querySelectorAll(".folder:not(.collapsed)")).map(n=>n.children[0].dataset.path);await this.createDiv(e).then(n=>i.replaceChildren(...n)),await Promise.all(s.map(n=>this.expand(t.querySelector("div[data-path='"+this.escapeSelector(n)+"']"))))}getElement(e){const t=this.viewElement.querySelector(".dir-selector");return t?t.querySelector("div[data-path='"+this.escapeSelector(e)+"']"):null}async getAcceptableFile(e){const t=await Le.getStandardHandler().getDirectoryHandle(e);if(!t)return;const i=[{path:e,handle:t}];for(;i.length>0;){const s=i.shift(),n=s.handle;for await(const a of n.values()){const o=s.path==""?"":s.path+"/";if(a.kind=="directory")i.push({path:o+a.name,handle:a});else if(this.acceptableFileType(a.name))return o+a.name}}}async selectPath(e){if(!e)return;const t=this.viewElement.querySelector(".dir-selector");if(!t)return;const i=e.split("/");i.pop();const s=[];for(;i.length>0;){s.push(i.shift());const a=t.querySelector("div[data-path='"+this.escapeSelector(s.join("/"))+"']");if(!a)return;await this.expand(a)}const n=t.querySelector("div[data-path='"+this.escapeSelector(e)+"']");n&&this.selectElement(n)}handleKeyEvent(e){if(!this.windowElement.classList.contains("focused"))return;const t=this.viewElement.querySelector(".info.selected");if(t==null){if(e.code.startsWith("Arrow")){const i=this.viewElement.querySelector(".info");i&&this.selectElement(i)}return}if(e.code=="ArrowUp"){e.preventDefault(),e.stopImmediatePropagation();const i=t.parentElement;let s=i.previousSibling?.querySelector(".info");s&&!s.parentElement.classList.contains("collapsed")&&s.parentElement.classList.contains("folder")&&(s=s.parentElement.querySelector(".children").lastChild.querySelector(".info")),!s&&i.parentElement.classList.contains("children")&&(s=i.parentElement.parentElement.querySelector(".info")),s&&(this.selectElement(s),ka(s,{scrollMode:"if-needed",block:"nearest",inline:"nearest"}))}if(e.code=="ArrowDown"){e.preventDefault(),e.stopImmediatePropagation();const i=t.parentElement;let s;i.classList.contains("folder")&&!i.classList.contains("collapsed")&&(s=i.querySelector(".children").children[0].querySelector(".info")),s||(s=t.parentElement.nextSibling?.querySelector(".info")),!s&&i.parentElement.classList.contains("children")&&(s=i.parentElement.parentElement.nextSibling.querySelector(".info")),s&&(this.selectElement(s),ka(s,{scrollMode:"if-needed",block:"nearest",inline:"nearest"}))}if(e.code=="ArrowLeft"&&(e.preventDefault(),e.stopImmediatePropagation(),this.collapse(t)),e.code=="ArrowRight"&&(e.preventDefault(),e.stopImmediatePropagation(),this.expand(t)),e.code=="Enter"&&(e.preventDefault(),e.stopImmediatePropagation(),t.parentElement?.querySelector(".title")&&this.startEditing(t.parentElement?.querySelector(".title"))),e.code=="Delete"||e.code=="Backspace"){const i=this.viewElement.querySelector(".info.selected"),s=i?.dataset.path;if(!s)return;const n=i.parentElement.classList.contains("folder");Le.getStandardHandler()[n?"removeDirectory":"removeFile"](s).then(()=>{const a=this.getElement(s);a&&(a.parentElement?.remove(),this.viewElement.querySelector(".delete").disabled=!0,this.viewElement.querySelector(".rename").disabled=!0)})}}startDragging(e){const t=e;t.totalMovementX=0,t.totalMovementY=0,this.draggedElement=t;const i=()=>{this.stopDragging(),window.removeEventListener("mouseup",i)};window.addEventListener("mouseup",i)}handleDragEvent(e){if(this.draggedElement){if(this.draggedElement.totalMovementX+=e.movementX,this.draggedElement.totalMovementY+=e.movementY,!this.draggedCopy)if(Math.abs(this.draggedElement.totalMovementX)+Math.abs(this.draggedElement.totalMovementY)>8){this.viewElement.addEventListener("mousemove",this.mouseHandler),this.draggedCopy=this.draggedElement.parentElement.cloneNode(!0),this.draggedCopy.style.position="fixed";const t=this.draggedElement.getBoundingClientRect();this.draggedCopy.style.top=t.top+this.draggedElement.totalMovementY+"px",this.draggedCopy.style.left=t.left+this.draggedElement.totalMovementX+"px",this.draggedCopy.style.width=t.width+"px",this.draggedCopy.style.boxShadow="3px 3px 3px #222",this.draggedCopy.querySelector(".children")&&this.draggedCopy.removeChild(this.draggedCopy.querySelector(".children")),this.viewElement.appendChild(this.draggedCopy)}else return;this.draggedCopy.style.top=parseFloat(this.draggedCopy.style.top.slice(0,-2))+e.movementY+"px",this.draggedCopy.style.left=parseFloat(this.draggedCopy.style.left.slice(0,-2))+e.movementX+"px"}}async stopDragging(){if(this.draggedCopy){this.draggedCopy.remove(),this.viewElement.removeEventListener("mousemove",this.mouseHandler);const e=this.draggedCopy.classList.contains("folder"),t=this.draggedElement.dataset.path,i=this.fileDropPath==""?er(this.draggedElement.dataset.path):this.fileDropPath+"/"+er(this.draggedElement.dataset.path);t!=i&&await Le.getStandardHandler()[e?"renameDirectory":"renameFile"](t,i),await this.refreshDirectory(Ht(t)),await this.refreshDirectory(Ht(i)),this.viewElement.querySelector(".outlined")?.classList.remove("outlined"),this.fileDropPath=""}this.draggedCopy=void 0,this.draggedElement=void 0}handleDropEvent(e){e.preventDefault(),e.stopImmediatePropagation(),this.viewElement.querySelector(".outlined")?.classList.remove("outlined"),e.target.closest(".dir-selector")&&Le.getStandardHandler().handleDropEvent(e,this.fileDropPath).then(async t=>{await this.refreshDirectory(this.fileDropPath),this.getAcceptableFile(t??this.fileDropPath).then(i=>this.selectPath(i)),this.fileDropPath=""})}handleMouseEvent(e){const t=this.viewElement.querySelector(".dir-selector");let i=Array.from(t.querySelectorAll("div.item.folder"));const s=this.viewElement.querySelector(".outlined");i=i.filter(n=>!n.parentElement.closest(".collapsed")),i.reverse(),i.push(t);for(const n of i){const a=n.getBoundingClientRect();if(e.clientX>=a.x&&e.clientX<=a.x+a.width&&e.clientY>=a.y&&e.clientY<=a.y+a.height){s!=n&&s?.classList.remove("outlined");const o=n.querySelector(".info");this.fileDropPath=o?.dataset.path??"",n.classList.contains("dir-selector")&&(this.fileDropPath=""),n.classList.add("outlined");return}}this.viewElement.querySelector(".outlined")?.classList.remove("outlined"),this.fileDropPath=""}escapeSelector(e){return e.replaceAll(/'/g,"\\'")}}class Ye{items=[];itemIndex=0;limit=0;app;static instance;constructor(e){this.app=e,Ye.instance||(Ye.instance=this)}run(e){e.action(this.app),this.items.splice(this.itemIndex,this.items.length-this.itemIndex,e),this.itemIndex++}undo(){this.items[this.itemIndex-1]&&(this.items[this.itemIndex-1].undo(this.app),this.itemIndex--,H.emit("undo"))}redo(){this.items[this.itemIndex]&&(this.items[this.itemIndex].redo?this.items[this.itemIndex].redo(this.app):this.items[this.itemIndex].action(this.app),this.itemIndex++,H.emit("redo"))}reset(){this.itemIndex=0,this.limit=0,this.items=[]}canUndo(){return this.itemIndex>0}canRedo(){return this.itemIndex!=this.items.length}setLimit(){this.limit=this.itemIndex}isDirty(){return this.itemIndex!=this.limit}merge(e){const t=this.items.splice(-e),i=t.reverse();this.itemIndex-=e,this.run({action:()=>{},redo:s=>{t.forEach(n=>n.action(s))},undo:s=>{i.forEach(n=>n.undo(s))}})}}function sy(){const r=document.createElement("div");return r.spellcheck=!1,r.contentEditable="true",r.classList.add("inlineEdit"),r.onkeydown=e=>{e.key=="Enter"&&r.blur()},r}function qo(r,e){return{title:r,element:t=>{const i=sy();return i.onblur=()=>{const s=i.innerText,n=t[e];Ye.instance.run({action:()=>{t[e]=s,i.innerText=s},undo:()=>{t[e]=n,i.innerText=n}}),i.scrollLeft=0},i.innerText=t[e],i}}}const N3={name:qo("Name","chartName"),credit:qo("Artist","credit"),style:qo("Style","chartStyle"),description:qo("Description","description"),music:{title:"Music File",element:(r,e)=>{const t=document.createElement("div");t.classList.add("flex-row","flex-column-gap","flex-static","hide-buttons");const i=()=>{if(s.innerText==(r.music??e.chartManager.loadedSM.properties.MUSIC??""))return;const c=e.chartManager.chartAudio.isPlaying();if(s.innerText==""||s.innerText==e.chartManager.loadedSM.properties.MUSIC){r.music=void 0,s.innerText=e.chartManager.loadedSM.properties.MUSIC+"",e.chartManager.loadAudio(),c&&e.chartManager.chartAudio.play();return}const u=s.innerText==e.chartManager.loadedSM.properties.MUSIC?void 0:s.innerText,h=r.music;Ye.instance.run({action:()=>{r.music=u,s.innerText=u??e.chartManager.loadedSM.properties.MUSIC??"",e.chartManager.loadAudio(),c&&e.chartManager.chartAudio.play()},undo:()=>{r.music=h,s.innerText=h??e.chartManager.loadedSM.properties.MUSIC??"",e.chartManager.loadAudio(),c&&e.chartManager.chartAudio.play()}})},s=sy();s.style.flex="1",s.onblur=i,s.innerText=r.music??e.chartManager.loadedSM.properties.MUSIC??"";const n=document.createElement("button");n.onclick=()=>{const c=Ht(e.chartManager.smPath);if(window.nw){const u=document.createElement("input");u.type="file",u.accept="audio/*",u.onchange=()=>{s.innerText=Le.getRelativePath(c,u.value),i()},u.click()}else e.windowManager.openWindow(new Ud(e,{title:"Select an audio file...",accepted_file_types:rh,disableClose:!0,callback:u=>{s.innerText=Le.getRelativePath(c,u),i()}},c+"/"+(r.music??e.chartManager.loadedSM.properties.MUSIC??"")))};const a=Ce.getIcon("FOLDER",12);n.appendChild(a);const o=document.createElement("button");o.onclick=()=>{s.innerText!=(e.chartManager.loadedSM.properties.MUSIC??"")&&(s.innerText=e.chartManager.loadedSM.properties.MUSIC??"",i())};const l=Ce.getIcon("REVERT",12);return o.appendChild(l),t.appendChild(s),t.appendChild(n),t.appendChild(o),t}}};class Oi{view;items=[];selectedItem;onChangeHandlers=[];static create(e,t){return new Oi(document.createElement("div"),e,t)}constructor(e,t,i){this.view=e,e.classList.add("dropdown"),this.items=t??[],this.selectedItem=i??this.items[0];const s=document.createElement("div");s.classList.add("dropdown-selected");const n=document.createElement("div");n.classList.add("dropdown-selected-text");const a=Ce.getIcon("CHEVRON",12);s.appendChild(n),s.appendChild(a);const o=document.createElement("div");o.classList.add("dropdown-items"),o.style.height="",s.onclick=()=>{if(!s.classList.contains("disabled")){if(this.items.length==0){o.style.height="";return}this.createDropdown(),o.style.height==""?(o.classList.remove("collapsed"),o.style.width=Math.max(o.scrollWidth,s.clientWidth)+"px",o.style.height=o.scrollHeight+"px",Array.from(o.children).forEach((l,c)=>{l.style.animationDelay=c*.02+"s"})):(o.style.height="",o.classList.add("collapsed"))}},window.addEventListener("click",l=>{const c=l.target;(!c.closest(".dropdown")||c.closest(".dropdown")!=e)&&(o.style.height="")}),o.classList.add("collapsed"),this.view.appendChild(s),this.view.appendChild(o),this.setSelected()}onChange(e){this.onChangeHandlers.push(e)}removeHandler(e){this.onChangeHandlers.includes(e)&&this.onChangeHandlers.splice(this.onChangeHandlers.indexOf(e),1)}getItems(){return this.items}setItems(e){this.items=e,e.includes(this.selectedItem)||(this.selectedItem=this.items[0],this.setSelected())}setSelected(e){this.selectedItem=e??this.selectedItem;const t=this.view.querySelector(".dropdown-selected-text");t.innerText=this.selectedItem?this.selectedItem+"":""}closeDropdown(){const e=this.view.querySelector(".dropdown-items");e&&(e.style.height="")}get value(){return this.selectedItem}get disabled(){return this.view.querySelector(".dropdown-selected").classList.contains("disabled")}set disabled(e){e?this.view.querySelector(".dropdown-selected").classList.add("disabled"):this.view.querySelector(".dropdown-selected").classList.remove("disabled")}createDropdown(){const e=this.view.querySelector(".dropdown-items"),t=this.items.map((i,s)=>{const n=document.createElement("div");return n.classList.add("dropdown-item"),n.innerText=i+"",n.onclick=()=>{e.style.height="",e.classList.add("collapsed"),this.selectedItem!=i&&(this.setSelected(i),this.onChangeHandlers.forEach(a=>a(i,s)))},n});e.replaceChildren(...t)}}class Wa extends Tt{app;buttonOptions;message;resolve;resolved=new Promise(e=>this.resolve=e);constructor(e,t,i,s){super({title:t,width:300,height:100,disableClose:!0,win_id:"confirm",blocking:!0}),this.app=e,this.message=i,this.buttonOptions=s,this.initView()}initView(){this.viewElement.replaceChildren(),this.viewElement.classList.add("confirmation");const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("label"),t.innerText=this.message,e.appendChild(t);const i=document.createElement("div");i.classList.add("menu-options"),this.buttonOptions.forEach(s=>{const n=document.createElement("button");n.innerText=s.label,n.onclick=()=>{s.callback?.(),this.resolve?.(s.label),this.closeWindow()},s.type!="default"&&n.classList.add(s.type),i.append(n)}),e.appendChild(i),this.viewElement.appendChild(e)}}class ny extends Tt{app;gameType;chartList;chartInfo;gameTypeDropdown;smLoadHandler=()=>{this.gameTypeDropdown.setItems(We.getPriority().map(e=>{const t=this.app.chartManager.loadedSM?.charts[e.id]??[];return e.id+" ("+t.length+")"})),this.gameTypeDropdown.setSelected(this.gameType.id+" ("+(this.app.chartManager.loadedSM?.charts[this.gameType.id]??[]).length+") "),this.gameType=this.app.chartManager.loadedChart?.gameType??this.gameType,this.loadCharts()};constructor(e,t){super({title:"Chart List",width:500,height:400,win_id:"chart_list"}),this.app=e,this.gameType=t??e.chartManager.loadedChart?.gameType??We.getPriority()[0],this.initView(),H.on("smLoadedAfter",this.smLoadHandler)}initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("chart-view-type-wrapper");const i=document.createElement("div");i.classList.add("chart-view-type-label"),i.innerText="Game Type:",this.gameTypeDropdown=Oi.create(We.getPriority().map(n=>{const a=this.app.chartManager.loadedSM?.charts[n.id]??[];return n.id+" ("+a.length+")"}),this.gameType.id+" ("+(this.app.chartManager.loadedSM?.charts[this.gameType.id]??[]).length+") "),this.gameTypeDropdown.onChange(n=>{this.gameType=We.getGameType(n.split(" ")[0])??this.gameType,this.loadCharts()}),t.appendChild(i),t.appendChild(this.gameTypeDropdown.view);const s=document.createElement("div");s.classList.add("chart-view-scroller"),e.appendChild(t),e.appendChild(s),this.chartList=document.createElement("div"),this.chartList.classList.add("chart-list"),this.chartInfo=document.createElement("div"),this.chartInfo.classList.add("chart-info"),s.appendChild(this.chartList),s.appendChild(this.chartInfo),this.viewElement.appendChild(e),this.loadCharts()}onClose(){H.off("smLoadedAfter",this.smLoadHandler)}loadCharts(){const e=this.app.chartManager.loadedSM?.charts[this.gameType.id]??[],t=[];this.gameTypeDropdown.setItems(We.getPriority().map(a=>{const o=this.app.chartManager.loadedSM?.charts[a.id]??[];return a.id+" ("+o.length+")"})),this.gameTypeDropdown.setSelected(this.gameType.id+" ("+(this.app.chartManager.loadedSM?.charts[this.gameType.id]??[]).length+") "),e.forEach(a=>{const o=document.createElement("div");o.classList.add("chart-list-item"),o.chart=a,this.app.chartManager.loadedChart==a&&o.classList.add("selected"),o.onclick=()=>{o.chart!=this.app.chartManager.loadedChart&&(this.app.chartManager.loadChart(o.chart),this.chartList.querySelectorAll(".selected").forEach(d=>d.classList.remove("selected")),o.classList.add("selected"))},o.onmouseenter=()=>{this.loadChartDetails(o.chart)},o.onmouseleave=()=>{this.loadChartDetails()};const l=document.createElement("div");l.innerText=a.meter+"",l.classList.add("title",a.difficulty);const c=document.createElement("div");c.classList.add("chart-list-info");const u=document.createElement("div");u.innerText=a.credit,u.classList.add("title","chart-credit");const h=document.createElement("div");h.innerText=a.getNotedata().length+"",h.classList.add("title","chart-step-count"),c.appendChild(u),c.appendChild(h),o.appendChild(l),o.appendChild(c),t.push(o)});const i=document.createElement("div");i.classList.add("chart-list-item");const s=document.createElement("div");s.innerText="+",s.classList.add("title");const n=document.createElement("div");n.classList.add("chart-list-info"),n.innerText="New Blank Chart",i.appendChild(s),i.appendChild(n),i.onclick=()=>{const a=new Qb(this.app.chartManager.loadedSM);a.gameType=this.gameType,this.app.chartManager.loadedSM.addChart(a),this.app.chartManager.loadChart(a),this.loadCharts()},this.chartList.replaceChildren(...t,i),this.loadChartDetails()}loadChartDetails(e){if(e=e??this.app.chartManager.loadedChart,e?.gameType.id!=this.gameType.id){this.chartInfo.replaceChildren();return}if(!e)return;const t=()=>this.app.chartManager.loadedSM.charts[e.gameType.id].sort((m,g)=>ki.indexOf(m.difficulty)==ki.indexOf(g.difficulty)?m.meter-g.meter:ki.indexOf(m.difficulty)-ki.indexOf(g.difficulty)),i=document.createElement("div");i.classList.add("chart-info-main");const s=Oi.create(ki,e.difficulty);s.view.classList.add("no-border","white"),s.onChange(m=>{const g=e.difficulty;Ye.instance.run({action:()=>{e.difficulty=m,t(),this.loadCharts()},undo:()=>{e.difficulty=g,t(),this.loadCharts()}})});const n=document.createElement("div");n.spellcheck=!1,n.contentEditable="true",n.classList.add("inlineEdit","chart-meter"),n.onkeydown=m=>{m.key=="Enter"&&n.blur()},n.onblur=()=>{let m=Na(n.innerText);if(m===null){n.innerText=e?.meter+"";return}m=Math.round(Oe(1,m,2**31-1));const g=e.meter;Ye.instance.run({action:()=>{e.meter=m,e.meterF=m,t(),this.loadCharts()},undo:()=>{e.meter=g,e.meterF=g,t(),this.loadCharts()}}),n.scrollLeft=0},n.innerText=e.meter+"";const a=document.createElement("div");a.classList.add("chart-properties"),i.appendChild(s.view),i.appendChild(n),Object.values(N3).forEach(m=>{const g=document.createElement("div");g.classList.add("label"),g.innerText=m.title;const b=m.element(e,this.app);m.title=="Artist"&&b.addEventListener("blur",()=>this.loadCharts()),a.appendChild(g),a.appendChild(b)});const o=e.getNotedataStats(),l=document.createElement("div");l.classList.add("chart-info-grid-item");const c=document.createElement("div");c.innerText="Peak NPS",c.classList.add("title","chart-info-grid-label");const u=document.createElement("div");u.innerText=e.getMaxNPS().toFixed(2)+"",u.classList.add("title","chart-info-grid-count"),l.appendChild(c),l.appendChild(u);const h=document.createElement("div");h.classList.add("chart-info-grid"),Object.entries(o).forEach(m=>{const g=document.createElement("div");g.classList.add("chart-info-grid-item");const b=document.createElement("div");b.innerText=m[0],b.classList.add("title","chart-info-grid-label");const w=document.createElement("div");w.innerText=m[1]+"",w.classList.add("title","chart-info-grid-count"),g.appendChild(b),g.appendChild(w),h.appendChild(g)});const d=document.createElement("div");d.classList.add("menu-options");const f=document.createElement("button");f.innerText="Duplicate Chart",f.onclick=()=>{const m=Object.assign(Object.create(Object.getPrototypeOf(e)),e);m.setNotedata(e.getNotedata().map(g=>e.computeNote(g))??[]),this.app.chartManager.loadedSM.addChart(m),this.app.chartManager.loadChart(m),this.loadCharts()},d.append(f);const p=document.createElement("button");p.innerText="Delete Chart",p.onclick=()=>{this.app.windowManager.openWindow(new Wa(this.app,"Delete chart","Are you sure you want to delete this chart?",[{type:"default",label:"Cancel"},{type:"delete",label:"Delete",callback:()=>{this.app.chartManager.loadedSM.removeChart(e)&&(this.app.chartManager.loadChart(),this.gameType=this.app.chartManager.loadedChart?.gameType??this.gameType,this.loadCharts())}}]))},p.classList.add("delete"),d.append(p),this.chartInfo.replaceChildren(i,a,l,h,d)}}var U3=4,H3=.001,G3=1e-7,V3=10,ga=11,Yo=1/(ga-1),z3=typeof Float32Array=="function";function ay(r,e){return 1-3*e+3*r}function oy(r,e){return 3*e-6*r}function ly(r){return 3*r}function Ul(r,e,t){return((ay(e,t)*r+oy(e,t))*r+ly(e))*r}function hy(r,e,t){return 3*ay(e,t)*r*r+2*oy(e,t)*r+ly(e)}function W3(r,e,t,i,s){var n,a,o=0;do a=e+(t-e)/2,n=Ul(a,i,s)-r,n>0?t=a:e=a;while(Math.abs(n)>G3&&++o=H3?$3(l,f,e,i):p===0?f:W3(l,c,c+Yo,e,i)}return function(c){return c===0?0:c===1?1:Ul(o(c),t,s)}};const Sr=Xa(q3),Y3=Sr(0,0,1,1);function Rm(r,e){const t=e?e.split("."):[];for(;t.length&&r;){const i=t.shift(),s=new RegExp("(.+)\\[([0-9]*)\\]").exec(i);if(s!==null&&s.length==3){const n={arrName:s[1],arrIndex:s[2]};r[n.arrName]!==void 0?r=r[n.arrName][n.arrIndex]:r=void 0;continue}r=r[i]}return r}function X3(r,e,t){const i=e?e.split("."):[];for(;i.length&&r;){const s=i.shift(),n=new RegExp("(.+)\\[([0-9]*)\\]").exec(s);if(n!==null&&n.length==3){const a={arrName:n[1],arrIndex:n[2]};r[a.arrName]!==void 0&&i.length===0&&(r[a.arrName][a.arrIndex]=t);continue}r[s]===void 0&&(r[s]={}),i.length===0&&(r[s]=t),r=r[s]}return r}const Yr=class Yr{static updateObject(e,t,i){const s=Object.keys(t).sort((o,l)=>parseFloat(o)-parseFloat(l));let n="0";for(let o=s.length-2;o>=0;o--)if(parseFloat(s[o])<=i){n=s[o];break}let a="1";for(let o=1;oi){a=s[o];break}Object.keys(t[0]).forEach(o=>{let l=t[n][o],c=t[a][o];l==="inherit"&&(t[n][o]=Rm(e,o),l=t[n][o]),c==="inherit"&&(t[a][o]=Rm(e,o),c=t[a][o]);const u=l+(i-parseFloat(n))/(parseFloat(a)-parseFloat(n))*(c-l);X3(e,o,u)})}static stop(e,t=null){e!==void 0&&(t!==null&&this.animations.get(e)?.obj&&!this.animations.get(e).obj.destroyed&&this.updateObject(this.animations.get(e).obj,this.animations.get(e).animation,t),this.animations.delete(e))}static finish(e){e!==void 0&&this.stop(e,1)}static animate(e,t,i,s,n=()=>{},a){return a||=`${++this._id}`,this.animations.set(a,{obj:e,animation:t,seconds:1/(60*i),progress:0,curve:s!==void 0?s:Y3,onend:n}),a}};Ys(Yr,"animations",new Map),Ys(Yr,"_id",0),It.shared.add(e=>{for(const[t,i]of Yr.animations.entries())i.obj._destroyed?Yr.stop(t):(i.progress=Math.min(1,i.progress+i.seconds*e),Yr.updateObject(i.obj,i.animation,i.curve(i.progress)),i.progress>=1&&(i.onend(i.obj),Yr.stop(t,1)))});let mi=Yr;const Fm=["accent-color","editor-bg","widget-bg","editable-overlay-hover","editable-overlay-active","text-color","text-color-secondary","text-color-detail","text-color-disabled","primary-bg","primary-border","primary-bg-active","primary-bg-hover","secondary-bg","secondary-border","secondary-bg-active","secondary-bg-hover","tooltip-bg","input-bg","input-bg-active","input-bg-hover","input-border","navbar-bg","navbar-bg-inactive","window-bg","window-border"],K3=["primary-bg","secondary-bg","text-color","accent-color","widget-bg","editor-bg","editable-overlay-active","input-bg","window-bg"],Z3=[{name:"primary-bg",ids:[{id:"primary-bg",label:"base"},{id:"primary-bg-active",label:"active"},{id:"primary-bg-hover",label:"hover"},{id:"primary-border",label:"border"}]},{name:"secondary-bg",ids:[{id:"secondary-bg",label:"base"},{id:"secondary-bg-active",label:"active"},{id:"secondary-bg-hover",label:"hover"},{id:"secondary-border",label:"border"}]},{name:"text-color",ids:[{id:"text-color",label:"primary"},{id:"text-color-secondary",label:"secondary"},{id:"text-color-detail",label:"detail"},{id:"text-color-disabled",label:"disabled"}]},{name:"other",ids:[{id:"accent-color",label:"accent-color"},{id:"widget-bg",label:"widget-bg"},{id:"tooltip-bg",label:"tooltip-bg"},{id:"editor-bg",label:"editor-bg"}]},{name:"editable-overlay",ids:[{id:"editable-overlay-hover",label:"hover"},{id:"editable-overlay-active",label:"active"}]},{name:"input",ids:[{id:"input-bg",label:"background"},{id:"input-bg-active",label:"active"},{id:"input-bg-hover",label:"hover"},{id:"input-border",label:"border"}]},{name:"window",ids:[{id:"window-bg",label:"background"},{id:"window-border",label:"border"}]},{name:"window-navbar",ids:[{id:"navbar-bg",label:"active"},{id:"navbar-bg-inactive",label:"inactive"}]}],Lm={"accent-color":"Color used for focus input rings, confirm buttons","text-color":"Base text color","text-color-secondary":"Secondary text color, used for text in recent files, menubar keybinds","text-color-detail":"Detail text color, used for text in timing event boxes","text-color-disabled":"Used for texts relating to empty/disabled things (ex. no files in directory picker)","primary-bg":"Primary background, used for menubar, context/dropdown menus","primary-border":"","primary-bg-active":"","primary-bg-hover":"","navbar-bg":"Window navbar background","navbar-bg-inactive":"","window-bg":"Window background","window-border":"","secondary-bg":"Secondary background, used for subareas in menus","secondary-border":"","secondary-bg-active":"","secondary-bg-hover":"","editable-overlay-hover":"Overlay on top of editable items (status widget buttons, playback option toggles, textareas)","editable-overlay-active":"","input-bg":"Background color for input","input-bg-active":"","input-bg-hover":"","input-border":"","widget-bg":"Widget background","tooltip-bg":"Color of these tooltips","editor-bg":"Editor background"},_c={"primary-bg":{"primary-border":function(r){return this.lighten(r,10).setAlpha(187/255)},"primary-bg-active":function(r){return this.lighten(r,10)},"primary-bg-hover":function(r){return this.lighten(r,30)},"widget-bg":function(r){return this.add(r,-50).setAlpha(136/255)},"window-bg":function(r){return this.lighten(r,-10)},"text-color":function(r){return this.average(r)>.5?new P("#000"):new P("#fff")},"input-bg":function(r){return this.average(r)<.5?new P("#000"):new P("#fff")},"input-border":function(r){return this.average(r)>.5?this.add(r,-30).setAlpha(119/255):this.add(r,30).setAlpha(119/255)},"tooltip-bg":function(r){return this.lighten(r,-10).setAlpha(238/255)},"secondary-bg":function(r){return this.lighten(r,-20)},"editor-bg":function(r){return this.lighten(r,-60)}},"window-bg":{"navbar-bg":function(r){return new P(r)}},"secondary-bg":{"secondary-border":function(r){return this.lighten(r,10).setAlpha(187/255)},"secondary-bg-active":function(r){return this.lighten(r,50)},"secondary-bg-hover":function(r){return this.lighten(r,30)}},"navbar-bg":{"navbar-bg-inactive":function(r){return this.lighten(r,-33)}},"text-color":{"text-color-secondary":function(r){return new P(r).setAlpha(119/255)},"text-color-detail":function(r){return new P(r).setAlpha(68/255)},"text-color-disabled":function(r){return new P(r).setAlpha(136/255)}},"input-bg":{"input-border":function(r){return this.lighten(r,10).setAlpha(187/255)},"input-bg-active":function(r){return this.lighten(r,50)},"input-bg-hover":function(r){return this.lighten(r,30)}}},Cs={default:{"accent-color":new P("rgb(23, 131, 208)"),"text-color":new P("#fff"),"text-color-secondary":new P("#888"),"text-color-detail":new P("#757a89"),"text-color-disabled":new P("#888"),"primary-bg":new P("#555"),"primary-border":new P("#444"),"primary-bg-active":new P("#575757"),"primary-bg-hover":new P("#666"),"navbar-bg":new P("#3d3d3d"),"navbar-bg-inactive":new P("#626262"),"window-bg":new P("#3d3d3d"),"window-border":new P("#00000000"),"secondary-bg":new P("#373737"),"secondary-border":new P("#333"),"secondary-bg-active":new P("#555"),"secondary-bg-hover":new P("#454545"),"editable-overlay-hover":new P("rgb(255, 255, 255, 0.1)"),"editable-overlay-active":new P("rgb(255, 255, 255, 0.2)"),"input-bg":new P("rgba(35, 35, 35, 0.309)"),"input-bg-active":new P("rgba(50, 50, 50, 0.309)"),"input-bg-hover":new P("rgba(79, 79, 79, 0.309)"),"input-border":new P("rgba(0, 0, 0, 0.3)"),"widget-bg":new P("rgba(0, 0, 0, 0.5)"),"tooltip-bg":new P("rgba(20, 20, 20, 0.95)"),"editor-bg":new P("#18191c")},dusk:{"accent-color":new P("#b34e97ff"),"text-color":new P("#ffffffff"),"text-color-secondary":new P("#ffffff77"),"text-color-detail":new P("#ffffff44"),"text-color-disabled":new P("#ffffff88"),"primary-bg":new P("#1b0131ff"),"primary-border":new P("#1e0136bb"),"primary-bg-active":new P("#2f0057ff"),"primary-bg-hover":new P("#230140ff"),"navbar-bg":new P("#18012cff"),"navbar-bg-inactive":new P("#10011dff"),"window-bg":new P("#18012cff"),"window-border":new P("#00000000"),"secondary-bg":new P("#160127ff"),"secondary-border":new P("#18012bbb"),"secondary-bg-active":new P("#310a52ff"),"secondary-bg-hover":new P("#25033fff"),"editable-overlay-hover":new P("#e79dff1a"),"editable-overlay-active":new P("#e79dff33"),"input-bg":new P("#000000ff"),"input-bg-active":new P("#000000ff"),"input-bg-hover":new P("#000000ff"),"input-border":new P("#391f4f77"),"widget-bg":new P("#00000088"),"tooltip-bg":new P("#18012cee"),"editor-bg":new P("#0b0014ff")},nord:{"accent-color":new P("#1783d0ff"),"text-color":new P("#d9dee8ff"),"text-color-secondary":new P("#d9dee878"),"text-color-detail":new P("#d9dee845"),"text-color-disabled":new P("#d9dee887"),"primary-bg":new P("#2e3440ff"),"primary-border":new P("#323946ba"),"primary-bg-active":new P("#636d83ff"),"primary-bg-hover":new P("#485061ff"),"navbar-bg":new P("#292e39ff"),"navbar-bg-inactive":new P("#2f333cff"),"window-bg":new P("#292e39ff"),"window-border":new P("#00000000"),"secondary-bg":new P("#242933ff"),"secondary-border":new P("#272d38ba"),"secondary-bg-active":new P("#444d5fff"),"secondary-bg-hover":new P("#3f4755ff"),"editable-overlay-hover":new P("#ffffff1a"),"editable-overlay-active":new P("#ffffff33"),"input-bg":new P("#1212124f"),"input-bg-active":new P("#141414ff"),"input-bg-hover":new P("#171717ff"),"input-border":new P("#121212ff"),"widget-bg":new P("#00020e87"),"tooltip-bg":new P("#292e39ed"),"editor-bg":new P("#18191cff")},light:{"accent-color":new P("#ff594cff"),"text-color":new P("#000000ff"),"text-color-secondary":new P("#00000078"),"text-color-detail":new P("#00000045"),"text-color-disabled":new P("#00000087"),"primary-bg":new P("#ffffffff"),"primary-border":new P("#b5b5b5ff"),"primary-bg-active":new P("#ebebebff"),"primary-bg-hover":new P("#ffd4d1ff"),"navbar-bg":new P("#edededff"),"navbar-bg-inactive":new P("#d1d1d1ff"),"window-bg":new P("#edededff"),"window-border":new P("#00000000"),"secondary-bg":new P("#d9d9d9ff"),"secondary-border":new P("#c7c7c7ff"),"secondary-bg-active":new P("#f0f0f0ff"),"secondary-bg-hover":new P("#e3e3e3ff"),"editable-overlay-hover":new P("#ff594c3d"),"editable-overlay-active":new P("#ff594c73"),"input-bg":new P("#ebebebff"),"input-bg-active":new P("#e0e0e0ff"),"input-bg-hover":new P("#ffffffff"),"input-border":new P("#9e9e9eff"),"widget-bg":new P("#f7f7f7e5"),"tooltip-bg":new P("#ffffffff"),"editor-bg":new P("#cfcfcfff")},rust:{"accent-color":new P("#b37100ff"),"text-color":new P("#ffd7bdf2"),"text-color-secondary":new P("#ffd7bd78"),"text-color-detail":new P("#ffd7bd45"),"text-color-disabled":new P("#ffd7bd87"),"primary-bg":new P("#3c2e2aff"),"primary-border":new P("#42332eff"),"primary-bg-active":new P("#68524bff"),"primary-bg-hover":new P("#4e3c37ff"),"navbar-bg":new P("#362926ff"),"navbar-bg-inactive":new P("#241b19ff"),"window-bg":new P("#58413cff"),"window-border":new P("#00000000"),"secondary-bg":new P("#40302ba1"),"secondary-border":new P("#46352fff"),"secondary-bg-active":new P("#614a42ff"),"secondary-bg-hover":new P("#533e38ff"),"editable-overlay-hover":new P("#fff8e01a"),"editable-overlay-active":new P("#fff8e033"),"input-bg":new P("#231515ff"),"input-bg-active":new P("#271717ff"),"input-bg-hover":new P("#2e1b1bff"),"input-border":new P("#4b413fff"),"widget-bg":new P("#311e1cdd"),"tooltip-bg":new P("#362926ff"),"editor-bg":new P("#181211ff")},tron:{"accent-color":new P("#00ccffff"),"text-color":new P("#ffffffff"),"text-color-secondary":new P("#ffffffe4"),"text-color-detail":new P("#ffffff5b"),"text-color-disabled":new P("#ffffff88"),"primary-bg":new P("#000000ff"),"primary-border":new P("#ff7b00c9"),"primary-bg-active":new P("#00e1ff98"),"primary-bg-hover":new P("#ff751a5a"),"navbar-bg":new P("#000000ff"),"navbar-bg-inactive":new P("#000000ff"),"window-bg":new P("#000000ff"),"window-border":new P("#ff880085"),"secondary-bg":new P("#121212ff"),"secondary-border":new P("#ff8800aa"),"secondary-bg-active":new P("#00e1ffa3"),"secondary-bg-hover":new P("#ff7e145a"),"editable-overlay-hover":new P("#ffffff1a"),"editable-overlay-active":new P("#ffffff33"),"input-bg":new P("#000000ff"),"input-bg-active":new P("#000000ff"),"input-bg-hover":new P("#000000ff"),"input-border":new P("#1e1e1eff"),"widget-bg":new P("#000000ad"),"tooltip-bg":new P("#000000ff"),"editor-bg":new P("#000000ff")},gilded:{"accent-color":new P("#ffc014ff"),"text-color":new P("#e6e6e6ff"),"text-color-secondary":new P("#ffffff6b"),"text-color-detail":new P("#e6e6e645"),"text-color-disabled":new P("#e6e6e687"),"primary-bg":new P("#232325ff"),"primary-border":new P("#272729ff"),"primary-bg-active":new P("#ffc0145b"),"primary-bg-hover":new P("#ffc01421"),"navbar-bg":new P("#202021ff"),"navbar-bg-inactive":new P("#151516ff"),"window-bg":new P("#202021ff"),"window-border":new P("#00000000"),"secondary-bg":new P("#1c1c1eff"),"secondary-border":new P("#1f1f21ff"),"secondary-bg-active":new P("#1f1f21ff"),"secondary-bg-hover":new P("#242427ff"),"editable-overlay-hover":new P("#ffffff1a"),"editable-overlay-active":new P("#ffffff33"),"input-bg":new P("#0d0d0dff"),"input-bg-active":new P("#0e0e0eff"),"input-bg-hover":new P("#111111ff"),"input-border":new P("#0e0e0eff"),"widget-bg":new P("#171717db"),"tooltip-bg":new P("#202021ff"),"editor-bg":new P("#0e0e0fff")}};class $e{static _themes=Cs;static _userThemes={};static _initialized=!1;static style;static currentTheme;static initialize(){this._createThemeStyle(),this._loadUserThemes(),this._initialized=!0}static _createThemeStyle(){const e=document.createElement("style");document.getElementsByTagName("head")[0].appendChild(e),this.style=e}static _loadUserThemes(){let e={};try{e=JSON.parse(localStorage.getItem("themes")??"{}")}catch{console.warn("Error loading user themes")}const t={};for(const[i,s]of Object.entries(e))t[i]=this.validateTheme(s);this._userThemes=t}static _saveUserThemes(){const e=Object.fromEntries(Object.entries(this._userThemes).map(([t,i])=>[t,this.convertThemeToString(i)]));localStorage.setItem("themes",JSON.stringify(e))}static validateTheme(e){const t={...Cs.default};if(typeof e!="object")return t;for(const i of Fm)if(e[i]!==void 0)try{t[i]=new P(e[i])}catch{console.warn(`Invalid color ${e[i]} for ${i}`)}return t}static getThemes(){return{...this._themes,...this._userThemes}}static getBuiltinThemes(){return this._themes}static getUserThemes(){return this._userThemes}static loadTheme(e){this._initialized||this.initialize();let t=this.getThemes()[e];t||(Ee.createFormatted("Error loading theme: Invalid theme id","error"),t=Cs.default),x.general.theme=e,this._applyTheme(t)}static _applyTheme(e){const t=`body{${Fm.map(i=>`--${i}: ${(e[i]??Cs.default[i]).toHexa()};`).join("")}}`;this.style.innerHTML=t,this.currentTheme={...e},H.emit("themeChanged")}static loadThemeFromColors(e){this._applyTheme(this.validateTheme(e))}static getCurrentTheme(){return this.currentTheme}static convertThemeToString(e){return Object.fromEntries(Object.entries(e).map(([t,i])=>[t,i.toHexa()]))}static exportCurrentTheme(e){return e={code:!1,spaces:!1,...e},e.code?JSON.stringify(Object.fromEntries(Object.entries(this.currentTheme).map(([t,i])=>[t,`^new Color('${i.toHexa()}')^`])),null,e.spaces?2:0).replaceAll('"^',"").replaceAll('^"',""):JSON.stringify(this.convertThemeToString(this.currentTheme),null,e.spaces?2:0)}static createUserTheme(e,t){this.getThemes()[e]===void 0&&(t?this._userThemes[e]={...t}:this._userThemes[e]={...Cs.default},this._saveUserThemes())}static setUserTheme(e,t){this._userThemes[e]!==void 0&&(this._userThemes[e]={...t},this._saveUserThemes())}static deleteUserTheme(e){this._userThemes[e]!==void 0&&(delete this._userThemes[e],this.loadTheme("default"),this._saveUserThemes())}static renameUserTheme(e,t){this._userThemes[e]!==void 0&&this.getThemes()[t]===void 0&&(this._userThemes[t]=this._userThemes[e],delete this._userThemes[e],this._saveUserThemes())}static parseThemeText(e){let t;try{t=JSON.parse(e)}catch{return null}return this.validateTheme(t)}static getColor(e){return this.currentTheme?.[e]??Cs.default[e]}}function Hd(r,e,t){return(r<<16)+(e<<8)+t}function Gd(r,e){let t=r>>16,i=r>>8&255,s=r&255;return t=Oe(Math.round(t*e),0,255),i=Oe(Math.round(i*e),0,255),s=Oe(Math.round(s*e),0,255),Hd(t,i,s)}function J3(r,e){let t=r>>16,i=r>>8&255,s=r&255;return t=Oe(Math.round(t+e),0,255),i=Oe(Math.round(i+e),0,255),s=Oe(Math.round(s+e),0,255),Hd(t,i,s)}function Wu(r){return(r.red+r.green+r.blue)/3}function Hl(r,e,t){const[i,s,n]=r.match(/\w\w/g).map(d=>parseInt(d,16)),[a,o,l]=e.match(/\w\w/g).map(d=>parseInt(d,16)),c=Math.round(i+(a-i)*t).toString(16).padStart(2,"0"),u=Math.round(s+(o-s)*t).toString(16).padStart(2,"0"),h=Math.round(n+(l-n)*t).toString(16).padStart(2,"0");return"#"+c+u+h}function Xi(r,e,t){const i=$t(r.red,e.red,t),s=$t(r.green,e.green,t),n=$t(r.blue,e.blue,t),a=$t(r.alpha,e.alpha,t);return new P([i,s,n,a])}const Da=new Map;H.on("themeChanged",()=>{for(const[r,e]of Da.entries()){const t=$e.getColor(r);e.forEach(i=>{i.destroyed||(i.tint=t.toNumber(),i.alpha=t.alpha)}),Da.set(r,e.filter(i=>!i.destroyed))}});function et(r,e){Da.has(e)||Da.set(e,[]),Da.get(e).push(r);const t=$e.getColor(e);r.tint=t.toNumber(),r.alpha=t.alpha}function Ec(r){const{r:e,g:t,b:i,a:s}=r.toRgba(),n=Math.max(e,t,i),a=Math.min(e,t,i);let o=0,l=0;const c=(n+a)/2;if(n==a)o=l=0;else{const u=n-a;switch(l=c>.5?u/(2-n-a):u/(n+a),n){case e:o=(t-i)/u+(tVd(e)),Q3=new Float32Array(Gl);function Vl(r){return Math.log(r/20)/Math.log(1102.5)*Hs}function Vd(r){return Math.pow(1102.5,r/Hs)*20}function Is(r){return-r*6+Ft/2}function Nm(r){return-(r-Ft/2)/6}class ek extends Tt{app;cachedReponse=new Array(Hs).fill(0);onAudioLoad=this.onAudio.bind(this);onThemeChange=this.changeHTMLColors.bind(this);points=[];icons;info;trackedFilter=null;constructor(e){super({title:"Audio Equalizer",width:600,height:245,win_id:"audio-eq"}),this.app=e,this.initView(),this.onAudioLoad(),H.on("audioLoaded",this.onAudioLoad),H.on("themeChanged",this.onThemeChange)}destroy(){H.off("audioLoaded",this.onAudioLoad),H.off("themeChanged",this.onThemeChange)}initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("eq-container");const t=document.createElement("div");t.classList.add("icon-container"),this.app.chartManager.chartAudio.getFilters().forEach((v,y)=>{const E=Ce.getIcon(v.type.toUpperCase(),36,24,Ss[y]);E.classList.add("eq-icon"),E.style.backgroundColor=`${Ss[y]}40`,E.onclick=()=>{this.app.chartManager.chartAudio.getFilter(y).enabled?this.app.chartManager.chartAudio.disableFilter(y):this.app.chartManager.chartAudio.enableFilter(y),this.endTrack(),this.updateIcons()},E.onmouseenter=()=>this.points[y].highlight(),E.onmouseleave=()=>this.points[y].unhighlight(),t.appendChild(E)}),this.icons=t,this.updateIcons();const i=document.createElement("canvas");i.style.width="600px",i.style.height="200px",i.onmousedown=v=>{const y=this.points.filter(E=>E.hitTest(v.offsetX*2,v.offsetY*2)).at(-1);this.endTrack(),y?.mouseDown(v)};const s=document.createElement("div");s.classList.add("eq-info-container");const n=document.createElement("div");n.classList.add("eq-info");const a=document.createElement("div");a.innerText="Type",a.classList.add("eq-info-label");const o=document.createElement("div");o.classList.add("eq-info-value"),n.replaceChildren(a,o);const l=document.createElement("div");l.classList.add("eq-info");const c=document.createElement("div");c.innerText="Frequency",c.classList.add("eq-info-label");const u=document.createElement("div");u.contentEditable="false",u.classList.add("eq-info-value","inlineEdit"),l.replaceChildren(c,u),this.setupInput(u,"frequency",20,22050," Hz");const h=document.createElement("div");h.classList.add("eq-info");const d=document.createElement("div");d.innerText="Gain",d.classList.add("eq-info-label");const f=document.createElement("div");f.contentEditable="false",f.classList.add("eq-info-value","inlineEdit"),h.replaceChildren(d,f),this.setupInput(f,"gain",-24,24," dB",1);const p=document.createElement("div");p.classList.add("eq-info");const m=document.createElement("div");m.innerText="Q",m.classList.add("eq-info-label");const g=document.createElement("div");g.contentEditable="false",g.classList.add("eq-info-value","inlineEdit"),p.replaceChildren(m,g),this.setupInput(g,"Q",1e-4,1e3,"",4);const b=document.createElement("div");b.classList.add("eq-reset","disabled"),b.innerText="Reset",b.onclick=()=>{if(this.trackedFilter==null)for(let v=0;v{o=this.app.chartManager.chartAudio.getFilter(this.trackedFilter)[t].value,e.innerText=ae(o,a)+"",this.selectText(e)},e.onkeydown=l=>{if(l.key=="Enter"){e.blur();return}if(l.key=="Tab"){const u=[...e.parentElement.parentElement.children],h=u.indexOf(e.parentElement);for(let d=1;d{const c=Na(e.innerText);c!==null&&(this.app.chartManager.chartAudio.updateFilter(this.trackedFilter,{[t]:Oe(c,i,s)}),this.points[this.trackedFilter].refreshPoint(),this.getResponse())})},e.onblur=()=>{Na(e.innerText)===null&&(this.app.chartManager.chartAudio.updateFilter(this.trackedFilter,{[t]:Oe(o,i,s)}),this.points[this.trackedFilter].refreshPoint(),this.getResponse()),e.innerText=ae(this.app.chartManager.chartAudio.getFilter(this.trackedFilter)[t].value,a)+n}}onAudio(){this.points=this.app.chartManager.chartAudio.getFilters().map((e,t)=>new tk(this,t)),this.getResponse(),this.updateIcons(),this.endTrack()}getResponse(){this.cachedReponse=this.app.chartManager.chartAudio.getFrequencyResponse(Gl)}drawEQ(e){const t=e.getContext("2d");t.canvas.width=1200,t.canvas.height=400;const i=()=>{if(!this.app.chartManager.chartAudio)return;const s=t.createRadialGradient(e.width/2,e.height/2,0,e.width/2,e.height/2,e.width/2);let n,a;const o=$e.getColor("accent-color");Wu($e.getColor("primary-bg"))>.5?(n=new P("white"),a=new P("black")):(n=new P("black"),a=new P("white"));const l=Xi(o,n,.95);s.addColorStop(0,Xi(o,n,.9).toHexa()),s.addColorStop(1,l.toHexa()),t.fillStyle=s,t.fillRect(0,0,e.width,e.height),t.fillStyle=Xi(o,n,.2).toHex(),this.drawFrequencies(t,this.app.chartManager.chartAudio.getFrequencyData()),this.app.chartManager.chartAudio.hasFilters()&&(t.fillStyle=Xi(o,a,.2).toHex()+"50",this.drawFrequencies(t,this.app.chartManager.chartAudio.getFilteredFrequencyData())),t.fillStyle="rgba(200, 200, 200, 0.5)",this.drawResponse(t),t.fillStyle=Xi(o,a,.2).toHex()+"80",t.font="22px Assistant",this.drawGrid(t),this.points.forEach(c=>c.draw(t)),e.closest("#windows")&&requestAnimationFrame(i)};return i}drawFrequencies(e,t){for(let i=0;i.5?e=new P("white"):e=new P("black");const i=Xi(t,e,.95),s=Xi(t,e,.5);this.icons.style.backgroundColor=i.toHexa(),this.icons.style.borderImageSource=`linear-gradient(to right, ${i.toHexa()}, ${s.toHexa()}, ${i.toHexa()})`,this.info.style.backgroundColor=i.toHexa(),this.info.style.borderImageSource=`linear-gradient(to right, ${i.toHexa()}, ${s.toHexa()}, ${i.toHexa()})`,this.info.style.color=t.toHexa()}updateIcons(){[...this.icons.children].forEach((e,t)=>{this.app.chartManager.chartAudio.getFilter(t).enabled?e.classList.remove("disabled"):e.classList.add("disabled")}),this.getResponse()}trackFilter(e){this.trackedFilter=e;const t=this.app.chartManager.chartAudio.getFilter(e),[i,s,n,a]=[...this.info.children].map(o=>o.children[1]);i.innerText=t.type,s.innerText=Math.round(t.frequency.value)+" Hz",n.innerText=t.type.endsWith("pass")?"-":ae(t.gain.value,1)+" dB",a.innerText=t.type.endsWith("shelf")?"-":ae(t.Q.value,2)+"",i.style.color=Ss[e],s.style.color=Ss[e],n.style.color=Ss[e],a.style.color=Ss[e],s.contentEditable="true",n.contentEditable=`${!t.type.endsWith("pass")}`,a.contentEditable=`${!t.type.endsWith("shelf")}`}endTrack(){setTimeout(()=>{this.trackedFilter=null,this.points.forEach(n=>n.unhighlight());const[e,t,i,s]=[...this.info.children].map(n=>n.children[1]);e.innerText="",t.innerText="",i.innerText="",s.innerText="",t.contentEditable="false",i.contentEditable="false",s.contentEditable="false"})}}const Ko=16,Ss=["#a3001b","#a34f00","#d6d606","#19c402","#02c4ba","#022fc4","#5602c4","#c402b4"];class tk{filterIndex;window;dragging=!1;x=0;y=0;type;response=new Float32Array(Gl.length);_empty=new Float32Array(Gl.length);highlighted=!1;pointSize=.4;constructor(e,t){this.filterIndex=t,this.window=e,this.type=this.window.app.chartManager.chartAudio.getFilter(t).type,this.x=Vl(this.window.app.chartManager.chartAudio.getFilter(t).frequency.value??10),this.getY()}hitTest(e,t){return(e-this.x)*(e-this.x)+(t-this.y)*(t-this.y)<=Ko*Ko}canChangeGain(){return this.type=="lowshelf"||this.type=="highshelf"||this.type=="peaking"}canChangeQ(){return!this.type.endsWith("shelf")}getY(){this.type.endsWith("shelf")?this.y=Is((this.window.app.chartManager.chartAudio.getFilter(this.filterIndex).gain.value??0)/2):this.canChangeGain()?this.y=Is(this.window.app.chartManager.chartAudio.getFilter(this.filterIndex).gain.value??0):this.y=Ft/2}getGain(){if(this.canChangeGain())return this.type.endsWith("shelf")?Nm(this.y)*2:Nm(this.y)}mouseDown(e){this.calcResponse(),this.dragging=!0,this.highlighted=!0,this.window.app.chartManager.chartAudio.getFilter(this.filterIndex).enabled||(this.window.app.chartManager.chartAudio.enableFilter(this.filterIndex),this.window.updateIcons());const t=this.x,i=this.y,s=e.clientX,n=e.clientY,a=l=>{this.x=(l.clientX-s)*2+t,this.canChangeGain()?this.y=(l.clientY-n)*2+i:this.y=Ft/2,this.x=Oe(this.x,0,Hs),this.y=Oe(this.y,this.type.endsWith("shelf")?Ft/4:Is(24),this.type.endsWith("shelf")?3*Ft/4:Is(-24)),this.window.app.chartManager.chartAudio.updateFilter(this.filterIndex,{frequency:Vd(this.x),gain:this.getGain()}),this.window.getResponse(),this.window.trackFilter(this.filterIndex),this.calcResponse()};this.window.trackFilter(this.filterIndex);const o=()=>{mi.animate(this,{0:{pointSize:"inherit"},1:{pointSize:.3}},.3,Sr(.11,.71,.41,.86),()=>{},`eq-point${this.filterIndex}`),this.dragging=!1,window.removeEventListener("mousemove",a),window.removeEventListener("mouseup",o)};mi.animate(this,{0:{pointSize:"inherit"},1:{pointSize:.9}},.3,Sr(.11,.71,.41,.86),()=>{},`eq-point${this.filterIndex}`),window.addEventListener("mousemove",a),window.addEventListener("mouseup",o)}calcResponse(){this.window.app.chartManager.chartAudio.getFilter(this.filterIndex).getFrequencyResponse(Q3,this.response,this._empty)}draw(e){const t=this.highlighted||this.window.app.chartManager.chartAudio.getFilter(this.filterIndex).enabled?Ss[this.filterIndex]:"#888888";if(e.fillStyle=t+"60",this.dragging)for(let i=0;i{navigator.clipboard.writeText(s.innerText)}),this.outputDiv=s;const n=document.createElement("div");n.classList.add("export-section-label"),n.innerText="Include",i.appendChild(n),Object.keys(this.exportOptions.include).forEach(o=>{const l=document.createElement("input");l.type="checkbox",l.id="en-i-"+o,l.checked=this.exportOptions.include[o],l.onchange=()=>{this.exportOptions.include[o]=l.checked,this.export()};const c=document.createElement("label");c.classList.add("export-label"),c.htmlFor=l.id,c.innerText=o;const u=document.createElement("div");u.replaceChildren(l,c),u.classList.add("export-option"),i.appendChild(u)});const a=document.createElement("div");a.classList.add("export-section-label"),a.innerText="Options",i.appendChild(a),Object.keys(this.exportOptions.options).forEach(o=>{const l=document.createElement("input");l.id="en-o-"+o,l.type="checkbox",l.checked=this.exportOptions.options[o],l.onchange=()=>{this.exportOptions.options[o]=l.checked,this.export()};const c=document.createElement("label");c.classList.add("export-label"),c.htmlFor=l.id,c.innerText=Tc[o].label;const u=document.createElement("div");u.replaceChildren(l,c),u.classList.add("export-option"),i.appendChild(u),Tc[o].tooltip!==void 0&&Ze(u,{content:Tc[o].tooltip})}),t.replaceChildren(i,s),e.appendChild(t),this.viewElement.appendChild(e)}export(){let e=`{ +`+this.selection.map(t=>{let i=" {";return this.exportOptions.include.Beat&&(i+=this.padNum(t.beat)+","),this.exportOptions.include.Second&&(i+=this.padNum(t.second)+","),this.exportOptions.include.Column&&(this.exportOptions.options.columnOneBased?i+=t.col+1+",":i+=t.col+","),this.exportOptions.include.Type&&(this.exportOptions.options.notitgNoteTypes&&Um[t.type]!==void 0?i+=Um[t.type]+",":i+='"'+t.type+'",'),this.exportOptions.include.Quantization&&(i+=t.quant+","),this.exportOptions.include.Length&&Be(t)&&(this.exportOptions.options.lengthAsNumberIndex?i+=this.padNum(t.hold)+",":i+="length="+this.padNum(t.hold)+","),i.endsWith(",")&&(i=i.slice(0,-1)),i+="}",this.getNumIncludes()==1&&(i=i.replaceAll("{",""),i=i.replaceAll("}","")),i}).join(`, +`)+` +}`;this.exportOptions.options.minify&&(e=e.replaceAll(/\s/g,"")),this.outputDiv.innerText=e}getNumIncludes(){return Object.values(this.exportOptions.include).map(e=>+e).reduce((e,t)=>e+t,0)}padNum(e){return this.exportOptions.options.padNumbers?(Math.round(e*1e3)/1e3).toFixed(3):Math.round(e*1e3)/1e3}}const Zr={"dance-single":[{label:"Left",keys:["Left","A"]},{label:"Down",keys:["Down","S"]},{label:"Up",keys:["Up","W"]},{label:"Right",keys:["Right","D"]}],"dance-double":[{label:"P1 Left",keys:["Left"]},{label:"P1 Down",keys:["Down"]},{label:"P1 Up",keys:["Up"]},{label:"P1 Right",keys:["Right"]},{label:"P2 Left",keys:["A"]},{label:"P2 Down",keys:["S"]},{label:"P2 Up",keys:["W"]},{label:"P2 Right",keys:["D"]}],"dance-couple":[{label:"P1 Left",keys:["Left"]},{label:"P1 Down",keys:["Down"]},{label:"P1 Up",keys:["Up"]},{label:"P1 Right",keys:["Right"]},{label:"P2 Left",keys:["A"]},{label:"P2 Down",keys:["S"]},{label:"P2 Up",keys:["W"]},{label:"P2 Right",keys:["D"]}],"dance-solo":[{label:"Left",keys:["Left","A"]},{label:"UpLeft",keys:["Q"]},{label:"Down",keys:["Down","S"]},{label:"Up",keys:["Up","W"]},{label:"UpRight",keys:["E"]},{label:"Right",keys:["Right","D"]}],"dance-solodouble":[{label:"P1 Left",keys:["A"]},{label:"P1 UpLeft",keys:["Q"]},{label:"P1 Down",keys:["S"]},{label:"P1 Up",keys:["W"]},{label:"P1 UpRight",keys:["E"]},{label:"P1 Right",keys:["D"]},{label:"P2 Left",keys:["J"]},{label:"P2 UpLeft",keys:["U"]},{label:"P2 Down",keys:["K"]},{label:"P2 Up",keys:["I"]},{label:"P2 UpRight",keys:["O"]},{label:"P2 Right",keys:["L"]}],"dance-threepanel":[{label:"UpLeft",keys:["Left","Q"]},{label:"Down",keys:["Down","S"]},{label:"UpRight",keys:["Right","E"]}],"dance-threedouble":[{label:"P1 UpLeft",keys:["Left"]},{label:"P1 Down",keys:["Down"]},{label:"P1 UpRight",keys:["Right"]},{label:"P2 UpLeft",keys:["Q"]},{label:"P2 Down",keys:["S"]},{label:"P2 UpRight",keys:["E"]}],"pump-single":[{label:"DownLeft",keys:["Z"]},{label:"UpLeft",keys:["Q"]},{label:"Center",keys:["S"]},{label:"UpRight",keys:["E"]},{label:"DownRight",keys:["C"]}],"pump-double":[{label:"P1 DownLeft",keys:["Z"]},{label:"P1 UpLeft",keys:["Q"]},{label:"P1 Center",keys:["S"]},{label:"P1 UpRight",keys:["E"]},{label:"P1 DownRight",keys:["C"]},{label:"P2 DownLeft",keys:["V"]},{label:"P2 UpLeft",keys:["R"]},{label:"P2 Center",keys:["G"]},{label:"P2 UpRight",keys:["Y"]},{label:"P2 DownRight",keys:["N"]}],"pump-versus":[{label:"P1 DownLeft",keys:["Z"]},{label:"P1 UpLeft",keys:["Q"]},{label:"P1 Center",keys:["S"]},{label:"P1 UpRight",keys:["E"]},{label:"P1 DownRight",keys:["C"]},{label:"P2 DownLeft",keys:["V"]},{label:"P2 UpLeft",keys:["R"]},{label:"P2 Center",keys:["G"]},{label:"P2 UpRight",keys:["Y"]},{label:"P2 DownRight",keys:["N"]}],"pump-couple":[{label:"P1 DownLeft",keys:["Z"]},{label:"P1 UpLeft",keys:["Q"]},{label:"P1 Center",keys:["S"]},{label:"P1 UpRight",keys:["E"]},{label:"P1 DownRight",keys:["C"]},{label:"P2 DownLeft",keys:["V"]},{label:"P2 UpLeft",keys:["R"]},{label:"P2 Center",keys:["G"]},{label:"P2 UpRight",keys:["Y"]},{label:"P2 DownRight",keys:["N"]}],"pump-halfdouble":[{label:"P1 Center",keys:["S"]},{label:"P1 UpRight",keys:["E"]},{label:"P1 DownRight",keys:["C"]},{label:"P2 DownLeft",keys:["V"]},{label:"P2 UpLeft",keys:["R"]},{label:"P2 Center",keys:["G"]}]};class Re{static app;static userKeybinds=new Map;static userGameplayKeybinds=new Map;static load(e){this.app=e;try{this.loadKeybinds()}catch(t){console.error("Failed to load user keybinds!"),console.error(t.stack),this.userKeybinds.clear(),this.userGameplayKeybinds.clear()}window.addEventListener("keydown",t=>this.checkKey(t,"keydown")),window.addEventListener("keyup",t=>this.checkKey(t,"keyup"))}static checkKey(e,t){if(e.target.classList.contains("inlineEdit")||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLButtonElement||["Meta","Control","Shift","Alt"].includes(e.key))return;const i=[];for(let a=0;a(o[u]??c.keys).some(h=>s==h));if(l!=-1){if(e.preventDefault(),this.app.windowManager.getFocusedWindow()?.options?.win_id=="keybind_options"||this.app.windowManager.isBlocked())return;this.app.chartManager[t=="keydown"?"judgeCol":"judgeColUp"](l);return}}const n=Object.keys(ct).filter(a=>!["cut","copy","paste","pasteReplace"].includes(a)).filter(a=>{for(const o of this.getCombosForKeybind(a))if(this.compareModifiers(o.mods,i)&&o.key==s)return!0;return!1}).map(a=>ct[a]);if(n.length>0){if(n.every(a=>a.preventDefault!=!1)&&e.preventDefault(),this.app.windowManager.getFocusedWindow()?.options?.win_id=="keybind_options"||this.app.windowManager.isBlocked())return;for(const a of n){let o=a.disabled;if(o instanceof Function&&(o=o(this.app)),!o&&!(a.disableRepeat&&e.repeat)){t=="keydown"?a.callback(this.app):a.callbackKeyUp?.(this.app);return}}}}static getKeyNameFromCode(e){let t=e;return t.startsWith("Digit")&&(t=t.slice(5)),t.startsWith("Key")&&(t=t.slice(3)),t in jm&&(t=jm[t]),t}static getKeybindString(e){return this.getCombosForKeybind(e).map(t=>this.getComboString(t)).join(" / ")}static getComboString(e){const t=dl.filter(i=>e.mods.includes(i)).map(i=>Ek[i]).join("");return t+(t!=""?" ":"")+(vy[e.key]??e.key)}static getCombosForKeybind(e){return e in ct?this.userKeybinds.get(e)??ct[e].combos:(console.log("Couldn't find keybind with id "+e),[])}static getKeysForGameType(e){const t=We.getGameType(e);return t?new Array(t.numCols).fill(null).map((i,s)=>this.userGameplayKeybinds.get(e)?.[s]??Zr[e]?.[s].keys??[]):(console.log("Couldn't find game type with id "+e),[])}static compareModifiers(e,t){if(e.length!=t.length)return!1;for(const i of dl)if((e.includes(i)?1:0)+(t.includes(i)?1:0)==1)return!1;return!0}static compareCombos(e,t){return e.key==t.key&&this.compareModifiers(e.mods,t.mods)}static loadKeybinds(){const e=localStorage.getItem("keybinds");if(e){const i=JSON.parse(e);if(typeof i!="object")return console.error("Couldn't load keybinds from storage");for(const[s,n]of Object.entries(i)){if(!(s in ct)){console.warn("Couldn't load keybind "+s+": key doesn't exist");continue}Array.isArray(n)||console.warn("Couldn't load keybind "+s+": value is not an array"),this.userKeybinds.set(s,n.filter(a=>typeof a.key!="string"||!Array.isArray(a.mods)?(console.warn("Couldn't load keycombo for keybind "+s+": "+JSON.stringify(a)),!1):!0))}}const t=localStorage.getItem("keybindsGP");if(t){const i=JSON.parse(t);if(typeof i!="object")return console.error("Couldn't load gameplay keybinds from storage");for(const[s,n]of Object.entries(i)){if(!We.getGameType(s)){console.warn("Couldn't load gameplay keybinds for gameType "+s+": gameType doesn't exist");continue}Array.isArray(n)||console.warn("Couldn't load gameplay keybind "+s+": value is not an array"),this.userGameplayKeybinds.set(s,n.map((a,o)=>!Array.isArray(a)&&a!==null?(console.warn("Couldn't load gameplay keys for type "+s+" col "+o+": "+JSON.stringify(a)),null):a))}}}static clearSave(){localStorage.removeItem("keybinds"),localStorage.removeItem("keybindsGP")}static setKeybind(e,t){this.userKeybinds.has(e)||this.userKeybinds.set(e,[...ct[e].combos]),this.userKeybinds.get(e)?.push(t),this.checkIsDefault(e),this.saveKeybinds()}static removeKeybind(e,t){this.userKeybinds.has(e)||this.userKeybinds.set(e,[...ct[e].combos]),this.userKeybinds.set(e,this.userKeybinds.get(e).filter(i=>!this.compareCombos(i,t))),this.checkIsDefault(e),this.saveKeybinds()}static revertKeybind(e){this.userKeybinds.delete(e),this.saveKeybinds()}static revertGameplayKeybind(e,t){this.userGameplayKeybinds.has(e)&&(this.userGameplayKeybinds.get(e)[t]=null,this.userGameplayKeybinds.get(e).every(i=>i===null)&&this.userGameplayKeybinds.delete(e)),this.saveKeybinds()}static setGameplayKeybind(e,t,i){this.userGameplayKeybinds.has(e)||this.userGameplayKeybinds.set(e,new Array(We.getGameType(e).numCols).fill(null)),this.userGameplayKeybinds.get(e)[t]==null&&(this.userGameplayKeybinds.get(e)[t]=[...Zr[e]?.[t].keys??[]]),this.userGameplayKeybinds.get(e)[t].push(i),this.checkIsDefaultGameplay(e,t),this.saveKeybinds()}static removeGameplayKeybind(e,t,i){this.userGameplayKeybinds.has(e)||this.userGameplayKeybinds.set(e,new Array(We.getGameType(e).numCols).fill(null)),this.userGameplayKeybinds.get(e)[t]==null&&(this.userGameplayKeybinds.get(e)[t]=[...Zr[e]?.[t].keys??[]]),this.userGameplayKeybinds.get(e)[t]=this.userGameplayKeybinds.get(e)[t].filter(s=>s!=i),this.checkIsDefaultGameplay(e,t),this.saveKeybinds()}static checkIsDefault(e){if(!this.userKeybinds.has(e))return!0;const t=this.userKeybinds.get(e),i=[...ct[e].combos];return t.length!=i.length?!1:t.map(s=>this.getComboString(s)).sort().join("∆")==i.map(s=>this.getComboString(s)).sort().join("∆")?(this.userKeybinds.delete(e),!0):!1}static checkIsDefaultGameplay(e,t){if(!this.userGameplayKeybinds.has(e)||this.userGameplayKeybinds.get(e)[t]===null)return!0;const i=this.userGameplayKeybinds.get(e)[t],s=[...Zr[e]?.[t].keys??[]];return i.length!=s.length?!1:i.sort().join("∆")==s.sort().join("∆")?(this.userGameplayKeybinds.get(e)[t]=null,this.userGameplayKeybinds.get(e).every(n=>n===null)&&this.userGameplayKeybinds.delete(e),!0):!1}static saveKeybinds(){const e={};for(const[i,s]of this.userKeybinds.entries())e[i]=s;localStorage.setItem("keybinds",JSON.stringify(e));const t={};for(const[i,s]of this.userGameplayKeybinds.entries())t[i]=s;localStorage.setItem("keybindsGP",JSON.stringify(t))}static getKeybindTooltip(e){return this.getCombosForKeybind(e).map(i=>{let s=this.getComboString(i);return s==""?"":(s=s.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'"),"")}).join("")}static evaluateTaggedTooltip(e,t){t=t.map(s=>s.startsWith("\\")?s.slice(1):this.getKeybindTooltip(s));const i=[];for(let s=0;s"+i.join("")+""}static createKeybindTooltip(e){return(t,...i)=>{Ze(e,{allowHTML:!0,onShow:s=>{s.setContent(this.evaluateTaggedTooltip(t,i))}})}}}class Wn extends Tt{app;allowMods;callback;combo={mods:[],key:""};conflictCheck;listener;static active=!0;constructor(e,t,i,s){super({title:"",width:300,height:168,disableClose:!0,win_id:"keyComboSelector",blocking:!0}),this.app=e,this.allowMods=t,this.callback=i,this.conflictCheck=s??(()=>[]),this.initView(),Wn.active=!0}initView(){this.viewElement.replaceChildren(),this.viewElement.classList.add("confirmation");const e=document.createElement("div");e.classList.add("padding"),e.style.gap="8px";const t=document.createElement("div");t.classList.add("label"),t.innerText="Input a key combo and select Ok when finished.",e.appendChild(t);const i=document.createElement("input");i.type="text",i.disabled=!0,i.style.fontSize="18px",i.style.height="24px",i.style.flex="0",i.style.textAlign="center",e.appendChild(i);const s=document.createElement("div");s.classList.add("detail"),s.innerText="No conflicts",s.style.flex="1",e.appendChild(s);const n=document.createElement("div");n.classList.add("menu-options");const a=document.createElement("button");a.innerText="Ok",a.onclick=()=>{this.callback(this.combo),this.closeWindow()},a.classList.add("confirm"),a.disabled=!0;const o=document.createElement("button");o.innerText="Cancel",o.onclick=()=>{this.closeWindow()},n.append(o),n.append(a),e.appendChild(n),this.viewElement.appendChild(e),this.listener=l=>{if(["Meta","Control","Shift","Alt","Escape"].includes(l.key))return;if(this.combo.key=Re.getKeyNameFromCode(l.code),this.allowMods){const u=[];for(let h=0;h=3?s.innerText=`Conflicts with ${c.length} keybinds`:c.length>=1?s.innerText=`Conflicts with ${c.join(",")}`:s.innerText="No conflicts"),l.preventDefault()},window.addEventListener("keydown",this.listener,!0)}onClose(){window.removeEventListener("keydown",this.listener,!0),Wn.active=!1}}class rk extends Tt{app;observer;conflictMap=this.calculateConflicts();constructor(e){super({title:"Gameplay Keybind Options",width:600,height:400,disableClose:!1,win_id:"gameplay_keybind_options",blocking:!1}),this.app=e,this.initView()}initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("pref-container");const i=document.createElement("div");i.classList.add("pref-scrollers");const s=document.createElement("div");s.classList.add("pref-section-scroller");const n=document.createElement("div");n.classList.add("pref-option-scroller"),i.replaceChildren(s,n),this.observer=new IntersectionObserver(a=>{a.forEach(o=>{const l=o.target.dataset.id,c=s.querySelector(`.pref-section[data-id=${l}]`);c&&(o.intersectionRatio>0?c.classList.add("selected"):c.classList.remove("selected"))})},{}),t.replaceChildren(i),s.replaceChildren(...this.createSections()),n.replaceChildren(...this.createOptions()),e.appendChild(t),this.viewElement.appendChild(e)}createSections(){return Object.keys(We.getTypes()).map(e=>this.createEmptySection(e))}createOptions(){return Object.keys(We.getTypes()).map(e=>{const t=new Array(We.getTypes()[e].numCols).fill(null).map((n,a)=>this.createKeybindItem(e,a)),i=document.createElement("div");i.classList.add("pref-group"),i.dataset.id=e;const s=document.createElement("div");return s.classList.add("pref-group-label"),s.innerText=e,i.replaceChildren(s,...t),this.observer.observe(i),i})}createEmptySection(e){const t=document.createElement("div");return t.classList.add("pref-section"),t.dataset.id=e,t.innerText=e,t.onclick=()=>{t.parentElement.parentElement.querySelector(`.pref-group[data-id=${e}]`).scrollIntoView()},t}createKeybindItem(e,t){const i=document.createElement("div");i.classList.add("pref-keybind"),i.dataset.id=e+"-"+t,i.onclick=o=>{o.target.classList.contains("pref-keybind-combo")||i.querySelector(".icon")?.contains(o.target)||this.app.windowManager.openWindow(new Wn(this.app,!1,l=>{Re.setGameplayKeybind(e,t,l.key),this.conflictMap=this.calculateConflicts(),i.replaceWith(this.createKeybindItem(e,t))},l=>{const c=this.conflictMap.get(e)?.get(l.key)?.map(u=>Zr[u[0]]?.[u[1]].label??"Column "+u[1])??[];return c.includes(Zr[e]?.[t].label??"Column "+t)?"self":c}))};const s=document.createElement("div");s.classList.add("pref-keybind-label"),s.innerText=Zr[e]?.[t].label??"Column "+t;const n=Ce.getIcon("REVERT");n.style.width="12px",n.addEventListener("click",()=>{Re.revertGameplayKeybind(e,t),this.conflictMap=this.calculateConflicts(),i.replaceWith(this.createKeybindItem(e,t))}),n.style.display=Re.checkIsDefaultGameplay(e,t)?"none":"block";const a=document.createElement("div");return a.classList.add("pref-keybind-combos"),a.replaceChildren(...Re.getKeysForGameType(e)[t].map(o=>{const l=document.createElement("button");return l.classList.add("pref-keybind-combo"),l.innerText=o,this.conflictMap.get(e).get(o).length>1&&l.classList.add("conflict"),l.onclick=()=>{Re.removeGameplayKeybind(e,t,o),this.conflictMap=this.calculateConflicts(),i.replaceWith(this.createKeybindItem(e,t))},l})),i.replaceChildren(s,n,a),i}calculateConflicts(){const e=new Map;Object.keys(We.getTypes()).forEach(t=>{const i=new Map;Re.getKeysForGameType(t).forEach((s,n)=>{s.forEach((a,o)=>{i.has(a)||i.set(a,[]),i.get(a).push([t,n,o])})}),e.set(t,i)}),[...this.viewElement.querySelectorAll(".pref-keybind-combo.conflict")].forEach(t=>t.classList.remove("conflict"));for(const t of e.values())for(const i of t.values())i.length!=1&&i.forEach(s=>{const n=this.viewElement.querySelector(`.pref-keybind[data-id=${s[0]}-${s[1]}] .pref-keybind-combos`);n?.children[s[2]]&&n.children[s[2]].classList.add("conflict")});return e}onClose(){this.observer?.disconnect()}}class cy{static _model;static async getModel(){return this._model||await this._load(),this._model}static async _load(){this._model=[];const e=localStorage.getItem("recentFiles");if(e){try{const t=JSON.parse(e);if(!Array.isArray(t))return;for(const i of t)typeof i!="object"||Array.isArray(i)||typeof i?.name!="string"||typeof i?.path!="string"||this._model.find(s=>s.path==i.path)||this._model.push({name:i.name,path:i.path})}catch{console.log("Failed to load recent file entries");return}await this.saveEntries()}}static async getRecents(){return await this.getModel()}static async addSM(e,t){const i=await this.getModel(),s=i.findIndex(n=>n.path==e);s!=-1&&i.splice(s,1),i.unshift({name:t.properties.TITLE??"Untitled Song",path:e}),this.saveEntries()}static async limitEntries(){(await this.getModel()).splice(15)}static async saveEntries(){this.limitEntries();const e=await Promise.all(this._model.map(t=>Le.hasFile(t.path)));this._model=this._model.filter((t,i)=>e[i]),localStorage.setItem("recentFiles",JSON.stringify(this._model))}}const sk=["TITLE","SUBTITLE","ARTIST","TITLETRANSLIT","SUBTITLETRANSLIT","ARTISTTRANSLIT","GENRE","CREDIT","ORIGIN","BACKGROUND","BANNER","MUSIC","CDTITLE","JACKET","DISCIMAGE","CDIMAGE","PREVIEW","LYRICSPATH","SAMPLESTART","SAMPLELENGTH","SELECTABLE"];class uy{_cache={warpedBeats:new Map,beatsToSeconds:new Map};columns={};offset;buildBeatTimingDataCache(){const e=[];let t=this.getTimingData("BPMS","STOPS","WARPS","DELAYS");t=t.concat(this.getTimingData("WARPS").map(n=>({type:"WARP_DEST",beat:n.beat+n.value,value:n.value})));const i=["WARP_DEST","BPMS","STOPS","WARPS","DELAYS"];t.sort((n,a)=>n.beat==a.beat?i.indexOf(n.type)-i.indexOf(a.type):n.beat-a.beat);const s=this.getOffset();e.push({beat:0,secondBefore:-s,secondOf:-s,secondAfter:-s,secondClamp:-s,bpm:this.getTimingData("BPMS")[0]?.value??120,warped:!1});for(const n of t){if(e.at(-1)?.beat!=n.beat){e.at(-1).secondClamp=Math.max(Math.max(e.at(-2)?.secondClamp??-s,e.at(-2)?.secondAfter??-s),e.at(-1).secondBefore);let a=(n.beat-e.at(-1).beat)*60/e.at(-1).bpm;e.at(-1).warped&&(a=0),e.push({beat:n.beat,secondBefore:e.at(-1).secondAfter+a,secondOf:e.at(-1).secondAfter+a,secondAfter:e.at(-1).secondAfter+a,secondClamp:0,bpm:e.at(-1).bpm,warped:e.at(-1).warped})}n.type=="WARPS"&&(e.at(-1).warped=!0),n.type=="WARP_DEST"&&(e.at(-1).warped=!1),n.type=="BPMS"&&(e.at(-1).bpm=n.value),n.type=="STOPS"&&(e.at(-1).secondAfter+=n.value),n.type=="DELAYS"&&(e.at(-1).secondOf+=n.value,e.at(-1).secondAfter+=n.value)}e.at(-1).secondClamp=Math.max(e.at(-2)?.secondClamp??-s,e.at(-1).secondBefore),this._cache.beatTiming=e,this._cache.warpedBeats.clear(),this._cache.beatsToSeconds.clear()}buildEffectiveBeatTimingDataCache(){const e=[...this.getTimingData("SCROLLS")];let t=0;if(e.length==0){this._cache.effectiveBeatTiming=[];return}e[0].beat!=0&&e.unshift({type:"SCROLLS",beat:0,value:e[0].value??1}),t=e[0].beat;for(let i=0;is[t])}mergeColumns(e){if(e.length==0)return[];for(e=e.filter(t=>t.length>0);e.length>1;){const t=[];for(let i=0;i=e.length)return n.concat(t.slice(s))}else if(n.push(t[s]),s++,s>=t.length)return n.concat(e.slice(i))}splitEvents(e){const t=new Map;return e.forEach(i=>{t.has(i.type)||t.set(i.type,[]),t.get(i.type).push(i)}),t}splitEventPairs(e){const t=new Map;return e.forEach(i=>{t.has(i[0].type)||t.set(i[0].type,[]),t.get(i[0].type).push(i)}),t}parse(e,t){if(e=="OFFSET"){this.offset=parseFloat(t);return}e in this.columns||this.createColumn(e),this.parseEvents(e,t)}setOffset(e){const t=this.offset;Ye.instance.run({action:()=>{this.offset=e,this.reloadCache(["OFFSET"]),H.emit("timingModified"),H.emit("chartModified")},undo:()=>{this.offset=t,this.reloadCache(["OFFSET"]),H.emit("timingModified"),H.emit("chartModified")}})}serialize(e){this.reloadCache();let t="";this.offset&&(t+="#OFFSET:"+this.offset+`; +`);let i=["BPMS","STOPS","WARPS","DELAYS","SPEEDS","SCROLLS","TICKCOUNTS","TIMESIGNATURES","LABELS","COMBOS","FAKES","BGCHANGES","FGCHANGES","ATTACKS"];e=="sm"&&(i=["BPMS","STOPS","TIMESIGNATURES","BGCHANGES","FGCHANGES","ATTACKS","SPEEDS","SCROLLS"]);for(const s of i)s in this.columns&&(t+=this.formatProperty(e,s));return t}formatProperty(e,t){let s="";const n=a=>ae(a,3).toFixed(3);switch(t){case"ATTACKS":{s=this.columns[t].events.map(o=>`TIME=${o.second}:${o.endType}=${o.value}:MODS=${o.mods}`).join(`: +`);break}case"BGCHANGES":case"FGCHANGES":{s=this.columns[t].events.map(o=>[o.beat,o.file,n(o.updateRate),Number(o.crossFade),Number(o.stretchRewind),Number(o.stretchNoLoop),o.effect,o.file2,o.transition,o.color1,o.color2].join("=")).join(`, +`);break}case"BPMS":case"DELAYS":case"FAKES":case"SCROLLS":case"WARPS":{s=this.columns[t].events.map(o=>[n(o.beat),n(o.value)].join("=")).join(`, +`);break}case"STOPS":{let a=this.columns[t].events;if(e=="sm"){const l=this.getTimingData("WARPS").map(c=>{const u=this.getEventAtBeat("BPMS",c.beat).value;return{type:"STOPS",beat:c.beat,value:-60/u*c.value}});a=a.concat(l)}s=a.map(o=>[n(o.beat),n(o.value)].join("=")).join(`, +`);break}case"COMBOS":{s=this.columns[t].events.map(o=>o.hitMult==o.missMult?[n(o.beat),o.hitMult].join("="):[n(o.beat),o.hitMult,o.missMult].join("=")).join(`, +`);break}case"LABELS":case"TICKCOUNTS":{s=this.columns[t].events.map(o=>[n(o.beat),o.value].join("=")).join(`, +`);break}case"SPEEDS":{s=this.getTimingData(t).map(o=>[n(o.beat),n(o.value),n(o.delay),o.unit=="B"?0:1].join("=")).join(`, +`);break}case"TIMESIGNATURES":{s=this.getTimingData(t).map(o=>[n(o.beat),o.upper,o.lower].join("=")).join(`, +`);break}}return s.includes(",")&&(s+=` +`),"#"+t+":"+s+`; +`}createColumn(e){this.columns[e]={type:e,events:[]}}getTime(e){switch(e.type){case"BPMS":case"STOPS":case"WARPS":case"DELAYS":case"LABELS":case"SPEEDS":case"SCROLLS":case"TICKCOUNTS":case"TIMESIGNATURES":case"COMBOS":case"FAKES":case"BGCHANGES":case"FGCHANGES":return e.beat;case"ATTACKS":return e.second}}isNullEvent(e){switch(e.type){case"BPMS":case"SPEEDS":case"SCROLLS":case"TICKCOUNTS":case"TIMESIGNATURES":case"COMBOS":return!1;case"STOPS":case"WARPS":case"DELAYS":case"FAKES":return e.value==0;case"LABELS":return e.value=="";case"BGCHANGES":case"FGCHANGES":return e.file=="";case"ATTACKS":return e.mods==""}}isSimilar(e,t){switch(e.type){case"BPMS":case"LABELS":case"SPEEDS":case"SCROLLS":case"TICKCOUNTS":return e.type==t.type&&e.value==t.value;case"TIMESIGNATURES":return e.type==t.type&&e.upper==t.upper&&e.lower==t.lower;case"COMBOS":return e.type==t.type&&e.hitMult==t.hitMult&&e.missMult==t.missMult;case"STOPS":case"WARPS":case"DELAYS":case"FAKES":case"BGCHANGES":case"FGCHANGES":case"ATTACKS":return!1}}removeOverlapping(e){const t=[];let i=null;for(;e.length>0;)this.getTime(e[0])!=i&&(i=this.getTime(e[0]),t.push(e[0])),e.shift();return t}compareEvents(e,t){const i=s=>!s.some(n=>e[n]!==void 0&&e[n]!==t[n]);switch(e.type){case"BPMS":case"STOPS":case"WARPS":case"DELAYS":case"SCROLLS":case"TICKCOUNTS":case"FAKES":case"LABELS":return i(["type","beat","value"]);case"SPEEDS":return i(["type","beat","value","unit","delay"]);case"TIMESIGNATURES":return i(["type","beat","upper","lower"]);case"COMBOS":return i(["type","beat","hitMult","missMult"]);case"ATTACKS":return i(["type","second","mods","endType","value"]);case"FGCHANGES":case"BGCHANGES":return i(["type","beat","color1","color2","crossFade","effect","file1","file2","stretchNoLoop","stretchRewind","transition","updateRate"])}}insertEvents(e,t){this.columns[e]||this.createColumn(e);const i=this.columns[e],s=[];t=this.removeOverlapping(t);let n=0;for(;t[0]&&i.events[n];){const a=i.events[n],o=[];for(;t[0]&&this.getTime(a)>=this.getTime(t[0]);)o.push(t.shift());if(o.length==0){n++;continue}i.events.splice(n,0,...o),n+=o.length,this.getTime(o.at(-1))==this.getTime(a)?s.push(...i.events.splice(n,1)):n++}return i.events.push(...t),s}deleteEvents(e,t){this.columns[e]||this.createColumn(e);const i=this.columns[e];t=this.removeOverlapping(t);const s=[];let n=0,a=0;for(;t[n]&&i.events[a];)this.compareEvents(t[n],i.events[a])?(s.push(...i.events.splice(a,1)),n++):a++;return s}getColumnType(e){switch(e){case"BPMS":case"LABELS":case"SPEEDS":case"SCROLLS":case"TICKCOUNTS":case"TIMESIGNATURES":case"COMBOS":return"continuing";case"STOPS":case"WARPS":case"DELAYS":case"FAKES":case"BGCHANGES":case"FGCHANGES":case"ATTACKS":return"instant"}}findConflictingEvents(e){const t=this.columns[e];if(!t)return[];switch(this.getColumnType(t.type)){case"continuing":{const i=[];let s=0;for(;t.events[s]&&this.isNullEvent(t.events[s]);)i.push(t.events[s]),s++;let n=t.events[s];for(s++;sthis.isNullEvent(i))}}parseEvents(e,t){switch(e){case"BPMS":case"STOPS":case"WARPS":case"DELAYS":case"SCROLLS":case"FAKES":this.insertEvents(e,Array.from(t.matchAll(/(-?[\d.]+)=(-?[\d.]+)/g)).map(i=>({type:e,beat:parseFloat(i[1]),value:parseFloat(i[2])})));return;case"TICKCOUNTS":this.insertEvents(e,Array.from(t.matchAll(/(-?[\d.]+)=(-?\d+)/g)).map(i=>({type:"TICKCOUNTS",beat:parseFloat(i[1]),value:parseInt(i[2])})));return;case"LABELS":this.insertEvents(e,Array.from(t.matchAll(/((-?[\d.]+)=([^\n]+)=\d)|((-?[\d.]+)=([^\n,]+))/g)).map(i=>i[1]===void 0?{type:"LABELS",beat:parseFloat(i[5]),value:i[6].trim()}:{type:"LABELS",beat:parseFloat(i[2]),value:i[3].trim()}));return;case"SPEEDS":this.insertEvents(e,Array.from(t.matchAll(/(-?[\d.]+)=(-?[\d.]+)=([\d.]+)=([01])/g)).map(i=>({type:"SPEEDS",beat:parseFloat(i[1]),value:parseFloat(i[2]),delay:parseFloat(i[3]),unit:i[4].trim()=="0"?"B":"T"})));return;case"TIMESIGNATURES":this.insertEvents(e,Array.from(t.matchAll(/(-?[\d.]+)=(\d+)=(\d+)/g)).map(i=>({type:"TIMESIGNATURES",beat:parseFloat(i[1]),upper:parseInt(i[2]),lower:parseInt(i[3])})));return;case"COMBOS":this.insertEvents(e,Array.from(t.matchAll(/(-?[\d.]+)=(\d+)=*(\d+)*/g)).map(i=>({type:"COMBOS",beat:parseFloat(i[1]),hitMult:parseInt(i[2]),missMult:parseInt(i[3]??i[2])})));return;case"ATTACKS":this.insertEvents(e,Array.from(t.matchAll(/TIME=(-?[\d.]+):(END|LEN)=(-?[\d.]+):MODS=([^:]+)/g)).map(i=>({type:"ATTACKS",second:parseFloat(i[1]),endType:i[2].trim(),value:parseFloat(i[3]),mods:i[4].trim()})));return;case"BGCHANGES":case"FGCHANGES":this.insertEvents(e,Array.from(t.matchAll(/(-?[\d.]+)=([^\n]+?)=(-?[\d.]+)=([01])=([01])=([01])=?([^\n=,]*)=?([^\n=,]*)=?([^\n=,]*)=?([^\n=,]*)=?([^\n=,]*)/g)).map(i=>({type:e,beat:parseFloat(i[1]),file:i[2].trim(),updateRate:parseFloat(i[3]),crossFade:i[4].trim()=="1",stretchRewind:i[5].trim()=="1",stretchNoLoop:i[6].trim()=="1",effect:i[7].trim()??"",file2:i[8].trim()??"",transition:i[9].trim()??"",color1:i[10].trim()??"",color2:i[11].trim()??""})))}}typeRequiresSSC(e){switch(e){case"BPMS":case"STOPS":case"ATTACKS":case"BGCHANGES":case"FGCHANGES":case"SPEEDS":case"SCROLLS":return!1;case"WARPS":case"DELAYS":case"LABELS":case"TICKCOUNTS":case"TIMESIGNATURES":case"COMBOS":case"FAKES":return!!this.columns[e]&&this.columns[e].events.length>0}}getDefaultEvent(e,t){switch(e){case"BPMS":return{type:e,beat:t,value:120,second:this.getSecondsFromBeat(t)};case"STOPS":case"WARPS":case"FAKES":return{type:e,beat:t,value:0,second:this.getSecondsFromBeat(t)};case"DELAYS":return{type:e,beat:t,value:0,second:this.getSecondsFromBeat(t,"before")};case"LABELS":return{type:e,beat:t,value:"",second:this.getSecondsFromBeat(t)};case"SPEEDS":return{type:e,beat:t,value:1,delay:0,unit:"B",second:this.getSecondsFromBeat(t)};case"SCROLLS":return{type:e,beat:t,value:1,second:this.getSecondsFromBeat(t)};case"TICKCOUNTS":return{type:e,beat:t,value:4,second:this.getSecondsFromBeat(t)};case"TIMESIGNATURES":return{type:e,beat:t,upper:4,lower:4,second:this.getSecondsFromBeat(t)};case"COMBOS":return{type:e,beat:t,hitMult:1,missMult:1,second:this.getSecondsFromBeat(t)};case"ATTACKS":return{type:e,beat:t,second:this.getSecondsFromBeat(t),endType:"LEN",value:1,mods:""};case"BGCHANGES":case"FGCHANGES":return{type:e,beat:t,file:"",updateRate:1,crossFade:!1,stretchRewind:!1,stretchNoLoop:!1,effect:"",file2:"",transition:"",color1:"",color2:"",second:this.getSecondsFromBeat(t)}}}getEventAtBeat(e,t,i=!0){const s=this.getColumn(e),n=s.events[Nt(s.events,t,a=>a.beat)];if(!n)switch(this.getColumnType(s.type)){case"continuing":return i?this.getDefaultEvent(s.type,0):void 0;case"instant":return}return n}updateEvents(e){const t=this.columns[e];if(t)switch(e){case"DELAYS":t.events.forEach(i=>i.second=this.getSecondsFromBeat(i.beat,"before"));break;case"ATTACKS":t.events.forEach(i=>i.beat=this.getBeatFromSeconds(i.second));break;case"BPMS":case"STOPS":case"WARPS":case"LABELS":case"SPEEDS":case"SCROLLS":case"TICKCOUNTS":case"TIMESIGNATURES":case"COMBOS":case"FAKES":case"BGCHANGES":case"FGCHANGES":t.events.forEach(i=>i.second=this.getSecondsFromBeat(i.beat))}}_insert(e){e=e.sort((n,a)=>n.type=="ATTACKS"&&a.type=="ATTACKS"?n.second-a.second:n.type!="ATTACKS"&&a.type!="ATTACKS"?n.beat-a.beat:0);const t=this.splitEvents(e),i=[],s=[];for(const[n,a]of t.entries())i.push(...this.insertEvents(n,a)),s.push(...this.findConflictingEvents(n));return{events:e,insertConflicts:i,errors:s}}_modify(e){const t=this.splitEventPairs(e),i=[],s=[];for(const[n,a]of t.entries())this.deleteEvents(n,a.map(o=>o[0]).sort((o,l)=>o.type=="ATTACKS"&&l.type=="ATTACKS"?o.second-l.second:o.type!="ATTACKS"&&l.type!="ATTACKS"?o.beat-l.beat:0)),i.push(...this.insertEvents(n,a.map(o=>o[1]).sort((o,l)=>o.type=="ATTACKS"&&l.type=="ATTACKS"?o.second-l.second:o.type!="ATTACKS"&&l.type!="ATTACKS"?o.beat-l.beat:0))),s.push(...this.findConflictingEvents(n));return{newEvents:e.map(n=>n[1]).sort((n,a)=>n.type=="ATTACKS"&&a.type=="ATTACKS"?n.second-a.second:n.type!="ATTACKS"&&a.type!="ATTACKS"?n.beat-a.beat:0),oldEvents:e.map(n=>n[0]).sort((n,a)=>n.type=="ATTACKS"&&a.type=="ATTACKS"?n.second-a.second:n.type!="ATTACKS"&&a.type!="ATTACKS"?n.beat-a.beat:0),insertConflicts:i,errors:s}}_delete(e){e=e.sort((n,a)=>n.type=="ATTACKS"&&a.type=="ATTACKS"?n.second-a.second:n.type!="ATTACKS"&&a.type!="ATTACKS"?n.beat-a.beat:0);const t=this.splitEvents(e),i=[],s=[];for(const[n,a]of t.entries())s.push(...this.deleteEvents(n,a)),i.push(...this.findConflictingEvents(n));return{removedEvents:s,errors:i}}insert(e){let t;const i=e.find(s=>s.type=="TIMESIGNATURES");Ye.instance.run({action:s=>{t=this._insert(e),this._delete(t.errors),this.reloadCache(),s.chartManager.clearSelections(),s.chartManager.setEventSelection(this.findEvents(t.events)),H.emit("timingModified"),H.emit("chartModified"),i&&H.emit("timeSigChanged")},undo:s=>{this._insert(t.errors),this._delete(t.events),this._insert(t.insertConflicts),this.reloadCache(),s.chartManager.clearSelections(),H.emit("timingModified"),H.emit("chartModified"),i&&H.emit("timeSigChanged")}})}modify(e){let t;const i=e.find(s=>s[0].type=="TIMESIGNATURES");Ye.instance.run({action:s=>{t=this._modify(e),this._delete(t.errors),this.reloadCache(),s.chartManager.clearSelections(),s.chartManager.setEventSelection(this.findEvents(t.newEvents)),H.emit("timingModified"),H.emit("chartModified"),i&&H.emit("timeSigChanged")},undo:s=>{this._insert(t.errors),this._delete(t.newEvents),this._insert(t.insertConflicts),this._insert(t.oldEvents),this.reloadCache(),s.chartManager.clearSelections(),s.chartManager.setEventSelection(this.findEvents(t.oldEvents)),H.emit("timingModified"),H.emit("chartModified"),i&&H.emit("timeSigChanged")}})}delete(e){let t;const i=e.find(s=>s.type=="TIMESIGNATURES");Ye.instance.run({action:s=>{t=this._delete(e),this._delete(t.errors),this.reloadCache(),s.chartManager.clearSelections(),H.emit("timingModified"),H.emit("chartModified"),i&&H.emit("timeSigChanged")},undo:s=>{this._insert(t.errors),this._insert(t.removedEvents),this.reloadCache(),s.chartManager.clearSelections(),s.chartManager.setEventSelection(this.findEvents(t.removedEvents)),H.emit("timingModified"),H.emit("chartModified"),i&&H.emit("timeSigChanged")}})}findEvents(e){const t=this.splitEvents(e),i=[];for(const[s,n]of t.entries()){const a=this.columns[s];if(!a)continue;let o=0,l=0;for(;n[o]&&a.events[l];)this.compareEvents(n[o],a.events[l])?(i.push(a.events[l]),o++):l++}return i}getBeatFromSeconds(e){if(!isFinite(e))return 0;if(this._cache.beatTiming==null&&this.buildBeatTimingDataCache(),e+this.getOffset()<0)return(e+this.getOffset())*this._cache.beatTiming[0].bpm/60;const t=this._cache.beatTiming,i=this.binarySearch(t,"secondClamp",e),s=Math.max(0,e-i.secondAfter);return i.beat+s*i.bpm/60}getSecondsFromBeat(e,t){if(t||="",!isFinite(e))return 0;this._cache.beatTiming==null&&this.buildBeatTimingDataCache();const i=Math.floor(e*1e3)/1e3;if(e<=0){const c=this._cache.beatTiming[0].bpm;return-this.getOffset()+e*60/c}const s=`${e}-${t}`;if(this._cache.beatsToSeconds.has(s))return this._cache.beatsToSeconds.get(s);const n=this._cache.beatTiming,a=this.binarySearch(n,"beat",i);if(a.beat==i){if(t=="noclamp"||t=="")return this._cache.beatsToSeconds.set(s,a.secondOf),a.secondOf;if(t=="before")return this._cache.beatsToSeconds.set(s,a.secondBefore),a.secondBefore;if(t=="after")return this._cache.beatsToSeconds.set(s,a.secondAfter),a.secondAfter}let l=(e-a.beat)*60/a.bpm;return a.warped&&(l=0),t=="noclamp"?(this._cache.beatsToSeconds.set(s,a.secondAfter+l),a.secondAfter+l):(this._cache.beatsToSeconds.set(s,Math.max(a.secondClamp,a.secondAfter+l)),Math.max(a.secondClamp,a.secondAfter+l))}isBeatWarped(e){if(!isFinite(e))return!1;const t=Math.floor(e*1e3)/1e3;if(this._cache.warpedBeats.has(t))return this._cache.warpedBeats.get(t);this._cache.beatTiming==null&&this.buildBeatTimingDataCache();const i=this._cache.beatTiming,s=this.binarySearch(i,"beat",t),n=s.beat==t?s.secondClamp:Math.max(s.secondAfter,s.secondClamp);return s.secondOf=s.beat&&th.beat==s.beat):-1,a=this.getDivisionLength(e);const o=this.getDivisionOfMeasure(e)%1*a;let l=Math.max(0,e-o);l=i[n+1]?.beat&&(n++,s=i[n],l=s.beat,a=this.getDivisionLength(l),c=0,u=s.upper)}getEffectiveBeat(e){if(!isFinite(e))return 0;this._cache.effectiveBeatTiming==null&&this.buildEffectiveBeatTimingDataCache();const t=this._cache.effectiveBeatTiming;if(t.length==0)return e;const i=this.binarySearch(t,"beat",e);if(t[0]==i&&i.beat>e&&i.beat>0)return e;let s=i.effectiveBeat;const n=e-i.beat;return s+=n*i.value,s}getBeatFromEffectiveBeat(e){if(!isFinite(e))return 0;this._cache.effectiveBeatTiming==null&&this.buildEffectiveBeatTimingDataCache();const t=this._cache.effectiveBeatTiming;if(t.length==0)return e;let i=0;for(;t[i+1]&&(t[i].value<=0||t[i+1].effectiveBeat<=e);)i++;let n=(e-t[i].effectiveBeat)/t[i].value;return isFinite(n)||(n=0),t[i].beat+n}getSpeedMult(e,t){if(!isFinite(e)||!isFinite(t))return 0;const i=this.getColumn("SPEEDS").events;if(i.length==0)return 1;const s=this.binarySearchIndex(i,"beat",e),n=i[s];if(n==null)return 1;let a=e-n.beat;n.unit=="T"&&(a=t-n.second);let o=Oe(a/n.delay,0,1);n.delay==0&&(o=1);const l=i[s-1]?.value??1;return o*(n.value-l)+l}reloadCache(e=[]){let t=e;(e.length==0||e.filter(i=>["WARPS","STOPS","DELAYS","BPMS","OFFSET"].includes(i)).length>0)&&(this.buildBeatTimingDataCache(),t=[...Ot]),(e.length==0||e.includes("SCROLLS"))&&this.buildEffectiveBeatTimingDataCache(),(e.length==0||e.includes("TIMESIGNATURES"))&&this.buildMeasureTimingCache(),t.filter(i=>i!="OFFSET").forEach(i=>this.updateEvents(i)),this._cache.sortedEvents=this.mergeColumns(Ot.map(i=>this.getColumn(i).events))}getBeatTiming(){return[...this._cache.beatTiming]}getTimingData(...e){return e.length==0?this._cache.sortedEvents:this.mergeColumns(e.map(t=>this.getColumn(t).events))}requiresSSC(){return Ot.some(e=>this.typeRequiresSSC(e))}}class nk extends uy{songTimingData;chart;constructor(e,t){super(),this.songTimingData=e,this.chart=t}getColumn(e){return this.columns[e]??this.songTimingData.getColumn(e)}getOffset(){return this.offset??this.songTimingData.getOffset()}usesChartTiming(){return this.offset!==void 0||Object.values(this.columns).length>0}hasChartOffset(){return this.offset!==void 0}isPropertyChartSpecific(e){return e in this.columns}copyOffsetToSimfile(){if(this.offset===void 0)return;const e=this.offset,t=this.songTimingData.getOffset();Ye.instance.run({action:()=>{this.songTimingData._setOffset(e),this.offset=void 0,this.songTimingData.reloadCache(),H.emit("timingModified"),H.emit("chartModified")},undo:()=>{this.offset=e,this.songTimingData._setOffset(t),this.songTimingData.reloadCache(),H.emit("timingModified"),H.emit("chartModified")}})}removeChartOffset(){if(this.offset===void 0)return;const e=this.offset;Ye.instance.run({action:()=>{this.offset=void 0,this.songTimingData.reloadCache(),H.emit("timingModified"),H.emit("chartModified")},undo:()=>{this.offset=e,this.songTimingData.reloadCache(),H.emit("timingModified"),H.emit("chartModified")}})}copyAllToSimfile(){const e=Object.fromEntries(Object.values(this.columns).map(a=>[a.type,a])),t=Object.values(e).map(a=>a.events).flat(),i=this.offset,s=this.songTimingData.getOffset();let n;Ye.instance.run({action:a=>{Ot.forEach(o=>{delete this.columns[o]}),n=this.songTimingData._insert(t),this.songTimingData._delete(n.errors),i!==void 0&&(this.songTimingData._setOffset(i),this.offset=void 0),this.songTimingData.reloadCache(),a.chartManager.clearSelections(),H.emit("timingModified"),H.emit("chartModified"),H.emit("timeSigChanged")},undo:a=>{this.songTimingData._insert(n.errors),this.songTimingData._delete(n.events),this.songTimingData._insert(n.insertConflicts),Object.assign(this.columns,e),i!==void 0&&(this.offset=i,this.songTimingData._setOffset(s)),this.songTimingData.reloadCache(),a.chartManager.clearSelections(),H.emit("timingModified"),H.emit("chartModified"),H.emit("timeSigChanged")}})}copyColumnsToSimfile(e){const t=Object.fromEntries(e.map(a=>this.columns[a]).filter(a=>a!==void 0).map(a=>[a.type,a])),i=Object.values(t).map(a=>a.events).flat();let s;const n=e.includes("TIMESIGNATURES");Ye.instance.run({action:a=>{e.forEach(o=>{delete this.columns[o]}),s=this.songTimingData._insert(i),this.songTimingData._delete(s.errors),this.songTimingData.reloadCache(),a.chartManager.clearSelections(),H.emit("timingModified"),H.emit("chartModified"),n&&H.emit("timeSigChanged")},undo:a=>{this.songTimingData._insert(s.errors),this.songTimingData._delete(s.events),this.songTimingData._insert(s.insertConflicts),Object.assign(this.columns,t),this.songTimingData.reloadCache(),a.chartManager.clearSelections(),H.emit("timingModified"),H.emit("chartModified"),n&&H.emit("timeSigChanged")}})}copyColumnsFromSimfile(e){const t=e.includes("TIMESIGNATURES");Ye.instance.run({action:i=>{e.forEach(s=>{this.createColumn(s),Object.assign(this.columns[s],structuredClone(this.songTimingData.getColumn(s)))}),this.songTimingData.reloadCache(),i.chartManager.clearSelections(),H.emit("timingModified"),H.emit("chartModified"),t&&H.emit("timeSigChanged")},undo:i=>{e.forEach(s=>{delete this.columns[s]}),this.songTimingData.reloadCache(),i.chartManager.clearSelections(),H.emit("timingModified"),H.emit("chartModified"),t&&H.emit("timeSigChanged")}})}copyAllFromSimfile(){const e=Object.fromEntries(Ot.map(i=>[i,this.columns[i]])),t=this.offset;Ye.instance.run({action:i=>{Ot.forEach(s=>{this.createColumn(s),Object.assign(this.columns[s],structuredClone(this.songTimingData.getColumn(s)))}),this.songTimingData.reloadCache(),this.offset=this.getOffset(),i.chartManager.clearSelections(),H.emit("timingModified"),H.emit("chartModified"),H.emit("timeSigChanged")},undo:i=>{Ot.forEach(s=>{e[s]&&this.columns[s]?Object.assign(this.columns[s],e[s]):delete this.columns[s]}),this.offset=t,this.songTimingData.reloadCache(),i.chartManager.clearSelections(),H.emit("timingModified"),H.emit("chartModified"),H.emit("timeSigChanged")}})}createChartColumns(e){const t=e.includes("TIMESIGNATURES");Ye.instance.run({action:i=>{e.forEach(s=>{this.createColumn(s)}),this.songTimingData.reloadCache(),i.chartManager.clearSelections(),H.emit("timingModified"),H.emit("chartModified"),t&&H.emit("timeSigChanged")},undo:i=>{e.forEach(s=>{delete this.columns[s]}),this.songTimingData.reloadCache(),i.chartManager.clearSelections(),H.emit("timingModified"),H.emit("chartModified"),t&&H.emit("timeSigChanged")}})}createEmptyData(){const e=Ot.filter(i=>!this.columns[i]),t=!this.hasChartOffset();Ye.instance.run({action:i=>{e.forEach(s=>{this.createColumn(s)}),t&&(this.offset=0),this.songTimingData.reloadCache(),i.chartManager.clearSelections(),H.emit("timingModified"),H.emit("chartModified"),H.emit("timeSigChanged")},undo:i=>{e.forEach(s=>{delete this.columns[s]}),t&&(this.offset=void 0),this.songTimingData.reloadCache(),i.chartManager.clearSelections(),H.emit("timingModified"),H.emit("chartModified"),H.emit("timeSigChanged")}})}deleteColumns(e){const t=Object.fromEntries(e.map(s=>this.columns[s]).filter(s=>s!==void 0).map(s=>[s.type,s])),i=e.includes("TIMESIGNATURES");Ye.instance.run({action:s=>{e.forEach(n=>{delete this.columns[n]}),this.songTimingData.reloadCache(),s.chartManager.clearSelections(),H.emit("timingModified"),H.emit("chartModified"),i&&H.emit("timeSigChanged")},undo:s=>{Object.assign(this.columns,t),this.songTimingData.reloadCache(),s.chartManager.clearSelections(),H.emit("timingModified"),H.emit("chartModified"),i&&H.emit("timeSigChanged")}})}deleteAllChartSpecific(){const e=Object.fromEntries(Object.values(this.columns).map(i=>[i.type,i])),t=this.offset;Ye.instance.run({action:i=>{Ot.forEach(s=>{delete this.columns[s]}),this.offset=void 0,this.songTimingData.reloadCache(),i.chartManager.clearSelections(),H.emit("timingModified"),H.emit("chartModified"),H.emit("timeSigChanged")},undo:i=>{Object.assign(this.columns,e),this.offset=t,this.songTimingData.reloadCache(),i.chartManager.clearSelections(),H.emit("timingModified"),H.emit("chartModified"),H.emit("timeSigChanged")}})}reloadCache(e=[]){super.reloadCache(e),this.chart.recalculateNotes()}splitSM(e){const t=[],i=[];return e.forEach(s=>{this.isPropertyChartSpecific(s.type)?i.push(s):t.push(s)}),{chartEvents:i,smEvents:t}}splitSMPairs(e){const t=[],i=[];return e.forEach(s=>{this.isPropertyChartSpecific(s[0].type)?i.push(s):t.push(s)}),{chartEvents:i,smEvents:t}}insertMulti(e){const{smEvents:t,chartEvents:i}=this.splitSM(e);let s,n;const a=e.find(o=>o.type=="TIMESIGNATURES");Ye.instance.run({action:o=>{n=this._insert(i),this._delete(n.errors),s=this.songTimingData._insert(t),this.songTimingData._delete(s.errors),this.songTimingData.reloadCache(),o.chartManager.clearSelections(),o.chartManager.setEventSelection(this.findEvents(n.events).concat(this.songTimingData.findEvents(s.events))),H.emit("timingModified"),H.emit("chartModified"),a&&H.emit("timeSigChanged")},undo:o=>{this.songTimingData._insert(s.errors),this.songTimingData._delete(s.events),this.songTimingData._insert(s.insertConflicts),this._insert(n.errors),this._delete(n.events),this._insert(n.insertConflicts),this.songTimingData.reloadCache(),o.chartManager.clearSelections(),H.emit("timingModified"),H.emit("chartModified"),a&&H.emit("timeSigChanged")}})}modifyMulti(e){const{smEvents:t,chartEvents:i}=this.splitSMPairs(e);let s,n;const a=e.find(o=>o[0].type=="TIMESIGNATURES");Ye.instance.run({action:o=>{n=this._modify(i),this._delete(n.errors),s=this.songTimingData._modify(t),this.songTimingData._delete(s.errors),this.songTimingData.reloadCache(),o.chartManager.clearSelections(),o.chartManager.setEventSelection(this.findEvents(n.newEvents).concat(this.songTimingData.findEvents(s.newEvents))),H.emit("timingModified"),H.emit("chartModified"),a&&H.emit("timeSigChanged")},undo:o=>{this.songTimingData._insert(s.errors),this.songTimingData._delete(s.newEvents),this.songTimingData._insert(s.insertConflicts),this.songTimingData._insert(s.oldEvents),this._insert(n.errors),this._delete(n.newEvents),this._insert(n.insertConflicts),this._insert(n.oldEvents),this.songTimingData.reloadCache(),o.chartManager.clearSelections(),o.chartManager.setEventSelection(this.findEvents(n.oldEvents).concat(this.songTimingData.findEvents(s.oldEvents))),H.emit("timingModified"),H.emit("chartModified"),a&&H.emit("timeSigChanged")}})}deleteMulti(e){const{smEvents:t,chartEvents:i}=this.splitSM(e);let s,n;const a=e.find(o=>o.type=="TIMESIGNATURES");Ye.instance.run({action:o=>{s=this._delete(i),this._delete(s.errors),n=this.songTimingData._delete(t),this.songTimingData._delete(n.errors),this.songTimingData.reloadCache(),o.chartManager.clearSelections(),H.emit("timingModified"),H.emit("chartModified"),a&&H.emit("timeSigChanged")},undo:o=>{this.songTimingData._insert(n.errors),this.songTimingData._insert(n.removedEvents),this._insert(s.errors),this._insert(s.removedEvents),this.songTimingData.reloadCache(),o.chartManager.clearSelections(),o.chartManager.setEventSelection(this.findEvents(s.removedEvents).concat(this.songTimingData.findEvents(n.removedEvents))),H.emit("timingModified"),H.emit("chartModified"),a&&H.emit("timeSigChanged")}})}}class ak extends uy{offset=0;chartTimingDatas=[];constructor(){super(),Ot.forEach(e=>this.createColumn(e))}createChartTimingData(e){const t=new nk(this,e);return this.chartTimingDatas.push(t),t}getColumn(e){return this.columns[e]}getOffset(){return this.offset}reloadCache(e=[]){super.reloadCache(e),this.chartTimingDatas.forEach(t=>t.reloadCache(e))}_setOffset(e){this.offset=e}}class dy{charts={};_type;other_properties={};properties={};timingData=new ak;unloadedCharts=[];loaded;constructor(e){this.loaded=new Promise(t=>{let i=e.name.split(".").pop();i=="smebak"&&(i="ssc"),i=="sm"||i=="ssc"?this._type=i:t(),e.text().then(s=>{s=s.replaceAll(/\/\/.+/g,"");const n=[...s.matchAll(/#([A-Z]+):([^;]*);/g)];let a=!1,o={};const l=[];for(const c of n)c[1]=="NOTEDATA"&&i=="ssc"||a?(a=!0,o[c[1]]=c[2],c[1]=="NOTES"&&(l.push(o),o={},a=!1)):c[1]=="NOTES"?l.push(c[2]):sk.includes(c[1])?this.properties[c[1]]=c[2]:c[1]=="OFFSET"||Ot.includes(c[1])?this.timingData.parse(c[1],c[2]):this.other_properties[c[1]]=c[2];this.charts={};for(const c of l){let u;try{u=new Qb(this,c)}catch(h){this.unloadedCharts.push(c),Ee.createFormatted(h instanceof Error?h.message:String(h),"warn");continue}this.addChart(u)}this.timingData.reloadCache(),t()})})}addChart(e){this.charts[e.gameType.id]||=[],this.charts[e.gameType.id].push(e),this.charts[e.gameType.id].sort((t,i)=>ki.indexOf(t.difficulty)==ki.indexOf(i.difficulty)?t.meter-i.meter:ki.indexOf(t.difficulty)-ki.indexOf(i.difficulty))}removeChart(e){if(!this.charts[e.gameType.id])return!1;const t=this.charts[e.gameType.id].indexOf(e);return t==-1?!1:(this.charts[e.gameType.id].splice(t,1),!0)}serialize(e){let t="";e=="sm"?(this.other_properties.NITGVERSION&&(t+=this.formatProperty("NITGVERSION",this.other_properties.NITGVERSION)),t+=this.formatProperty("TITLE",this.properties.TITLE),t+=this.formatProperty("SUBTITLE",this.properties.SUBTITLE),t+=this.formatProperty("ARTIST",this.properties.ARTIST),t+=this.formatProperty("MUSIC",this.properties.MUSIC??""),t+=this.formatProperty("BANNER",this.properties.GENRE),t+=this.formatProperty("BACKGROUND",this.properties.BACKGROUND),t+=this.formatProperty("LYRICSPATH",this.properties.LYRICSPATH),t+=this.formatProperty("CDTITLE",this.properties.CDTITLE),t+=this.formatProperty("SAMPLESTART",this.properties.SAMPLESTART),t+=this.formatProperty("SAMPLELENGTH",this.properties.SAMPLELENGTH)):(t+=this.formatProperty("VERSION",this.other_properties.VERSION??.83),t+=this.formatProperty("TITLE",this.properties.TITLE),t+=this.formatProperty("SUBTITLE",this.properties.SUBTITLE),t+=this.formatProperty("ARTIST",this.properties.ARTIST),t+=this.formatProperty("TITLETRANSLIT",this.properties.TITLETRANSLIT),t+=this.formatProperty("SUBTITLETRANSLIT",this.properties.SUBTITLETRANSLIT),t+=this.formatProperty("ARTISTTRANSLIT",this.properties.ARTISTTRANSLIT),t+=this.formatProperty("GENRE",this.properties.GENRE),t+=this.formatProperty("CREDIT",this.properties.CREDIT),t+=this.formatProperty("MUSIC",this.properties.MUSIC??""),t+=this.formatProperty("BANNER",this.properties.BANNER),t+=this.formatProperty("BACKGROUND",this.properties.BACKGROUND),t+=this.formatProperty("JACKET",this.properties.JACKET),t+=this.formatProperty("DISCIMAGE",this.properties.DISCIMAGE),t+=this.formatProperty("CDIMAGE",this.properties.CDIMAGE),t+=this.formatProperty("SELECTABLE",this.properties.SELECTABLE??"YES"),t+=this.formatProperty("LYRICSPATH",this.properties.LYRICSPATH),t+=this.formatProperty("CDTITLE",this.properties.CDTITLE),t+=this.formatProperty("SAMPLESTART",this.properties.SAMPLESTART),t+=this.formatProperty("SAMPLELENGTH",this.properties.SAMPLELENGTH)),t+=this.timingData.serialize(e);for(const i in this.other_properties)i=="VERSION"||i=="NITGVERSION"||(t+=this.formatProperty(i,this.other_properties[i]));t+=` +`;for(const i in this.charts)for(const s of this.charts[i])t+=s.serialize(e)+` +`;for(const i of this.unloadedCharts)if(typeof i=="string")t+="#NOTES:"+i+` +`;else{t+="//---------------"+i.STEPSTYPE+" - "+i.DESCRIPTION+`--------------- +`,t+=`#NOTEDATA:; +`,t+=`#CHARTNAME:${i.CHARTNAME}; +`,t+=`#CHARTSTYLE:${i.CHARTSTYLE}; +`,t+=`#CREDIT:${i.CREDIT}; +`,i.MUSIC&&(t+=`#MUSIC:${i.MUSIC}; +`),t+=`#STEPSTYPE:${i.STEPSTYPE}; +`,t+=`#DESCRIPTION:${i.DESCRIPTION}; +`,t+=`#DIFFICULTY:${i.DIFFICULTY}; +`,t+=`#METER:${i.METER}; +`,t+=`#METERF:${i.METERF??i.METER}; +`,t+=`#RADARVALUES:${i.RADARVALUES}; +`,t+="#NOTES:";for(const s in i)["NOTEDATA","CHARTNAME","CHARTSTYLE","CREDIT","MUSIC","STEPSTYPE","DESCRIPTION","DIFFICULTY","METER","METERF","RADARVALUES"].includes(s)||(t+=`#${s}:${i[s]}; + +`)}return t}usesChartTiming(){for(const e in this.charts)for(const t of this.charts[e])if(t.timingData.usesChartTiming())return!0;return!1}requiresSSC(){if(this.timingData.requiresSSC()||this.usesChartTiming())return!0;for(const e in this.charts)for(const t of this.charts[e])if(t.requiresSSC())return!0;return!1}formatProperty(e,t){return t||="","#"+e.toUpperCase()+":"+t+`; +`}}const ok=`#TITLE:New Song; +#SUBTITLE:; +#ARTIST:; +#TITLETRANSLIT:; +#SUBTITLETRANSLIT:; +#ARTISTTRANSLIT:; +#GENRE:; +#CREDIT:; +#BANNER:; +#BACKGROUND:; +#LYRICSPATH:; +#CDTITLE:; +#MUSIC:; +#OFFSET:0; +#SAMPLESTART:0.000000; +#SAMPLELENGTH:10.000000; +#SELECTABLE:YES; +#BPMS:0.000000=120.000000; +#STOPS:; +#BGCHANGES:; +#FGCHANGES:; +#KEYSOUNDS:; +#ATTACKS:; +`;class ft{view;input;onChange;min=-Number.MAX_VALUE;max=Number.MAX_VALUE;precision;step=1;lastVal="";constructor(e,t,i,s,n,a){this.view=e,this.view.classList.add("spinner"),this.view.onfocus=()=>{o.focus()};const o=document.createElement("input");o.classList.add("spinner-input"),o.type="text",o.autocomplete="off",o.spellcheck=!1,o.onblur=()=>{if(o.value===this.lastVal)return;if(o.value===""){this.onChange?.(void 0);return}const h=Na(o.value);if(h===null){o.value=this.lastVal;return}let d=ae(h,this.precision??3);d=Oe(d,this.min,this.max),o.value=this.formatValue(d),this.onChange?.(d)},o.onkeydown=h=>{h.key=="Enter"&&o.blur(),h.key=="Escape"&&(o.value=this.lastVal,o.blur())},o.onfocus=()=>{this.lastVal=o.value},this.input=o,this.min=n??this.min,this.max=a??this.max,this.step=i,this.precision=s,this.setValue(t),e.appendChild(o);const l=document.createElement("div");l.classList.add("spinner-btns"),e.appendChild(l);const c=document.createElement("button");c.classList.add("spinner-up"),c.appendChild(Ce.getIcon("CHEVRON",10)),c.tabIndex=-1,c.onclick=h=>{let d=i??x.general.spinnerStep;h.getModifierState("Shift")&&(d/=10),!(a!==void 0&&parseFloat(o.value)+d>a)&&(o.value=this.formatValue(parseFloat(o.value)+d),this.onChange?.(parseFloat(o.value)))},l.appendChild(c);const u=document.createElement("button");u.classList.add("spinner-down"),u.appendChild(Ce.getIcon("CHEVRON",10)),u.tabIndex=-1,u.onclick=h=>{let d=i??x.general.spinnerStep;h.getModifierState("Shift")&&(d/=10),!(n!==void 0&&parseFloat(o.value)-dr.chartManager.loadAudio()}},{title:"Background Image",propName:"BACKGROUND",input:{type:"file",typeName:"image",accept:Ts}},{title:"Banner Image",propName:"BANNER",input:{type:"file",typeName:"image",accept:Ts}},{title:"CD Title",propName:"CDTITLE",input:{type:"file",typeName:"image",accept:Ts}},{title:"CD Image",propName:"CDIMAGE",input:{type:"file",typeName:"image",accept:Ts}},{title:"Jacket",propName:"JACKET",input:{type:"file",typeName:"image",accept:Ts}},{title:"Disc Image",propName:"DISCIMAGE",input:{type:"file",typeName:"image",accept:Ts}}]},{title:"Song",items:[{title:"Song Preview",propName:"SAMPLESTART",input:{type:"custom",create:(r,e,t)=>{const i=t??Ye.instance,s=()=>{a.value{(e??f.chartManager.loadedSM).properties.SAMPLESTART=h,(e??f.chartManager.loadedSM).properties.SAMPLELENGTH=d,n.setValue(parseFloat(h)),a.setValue(parseFloat(h)+parseFloat(d))},undo:()=>{(e??r.chartManager.loadedSM).properties.SAMPLESTART=c,(e??r.chartManager.loadedSM).properties.SAMPLELENGTH=u,n.setValue(parseFloat(c)),a.setValue(parseFloat(c)+parseFloat(u))}})},n=ft.create(parseFloat((e??r.chartManager.loadedSM).properties.SAMPLESTART??"0"),void 0,3,0);n.onChange=c=>{if(c===void 0){n.setValue(parseFloat((e??r.chartManager.loadedSM).properties.SAMPLESTART??"0"));return}s()};const a=ft.create(parseFloat((e??r.chartManager.loadedSM).properties.SAMPLESTART??"0")+parseFloat((e??r.chartManager.loadedSM).properties.SAMPLELENGTH??"10"),void 0,3,0);a.onChange=c=>{if(c===void 0){a.setValue(parseFloat((e??r.chartManager.loadedSM).properties.SAMPLESTART??"0")+parseFloat((e??r.chartManager.loadedSM).properties.SAMPLELENGTH??"10"));return}s()};const o=document.createElement("div"),l=document.createElement("div");return l.innerText="to",o.classList.add("flex-row","flex-column-gap"),o.replaceChildren(n.view,l,a.view),o}}}]}];function py(r,e,t,i){const s=i??Ye.instance;switch(e.input.type){case"custom":return e.input.create(r,t,i);case"string":{const n=document.createElement("input");return n.type="text",n.autocomplete="off",n.spellcheck=!1,n.onkeydown=a=>{a.key=="Enter"&&n.blur()},n.onblur=()=>{const a=(t??r.chartManager.loadedSM).properties[e.propName],o=n.value;s.run({action:l=>{(t??l.chartManager.loadedSM).properties[e.propName]=o,n.value=o},undo:()=>{(t??r.chartManager.loadedSM).properties[e.propName]=a,n.value=a??""}})},n.value=(t??r.chartManager.loadedSM).properties[e.propName]??"",n}case"number":{const n=e.input,a=ft.create(parseFloat((t??r.chartManager.loadedSM).properties[e.propName])??15,n.step,n.precision,n.min,n.max);return a.onChange=o=>{if(o===void 0){a.setValue(parseFloat((t??r.chartManager.loadedSM).properties[e.propName]??"0"));return}const l=(t??r.chartManager.loadedSM).properties[e.propName],c=o.toString();s.run({action:u=>{(t??u.chartManager.loadedSM).properties[e.propName]=c,a.setValue(parseFloat(c))},undo:()=>{(t??r.chartManager.loadedSM).properties[e.propName]=l,a.setValue(parseFloat(l??"0"))}})},a.view}case"file":{const n=e.input,a=e.input.onChange,o=document.createElement("div");o.classList.add("flex-row","flex-column-gap");const l=document.createElement("input");l.type="text",l.autocomplete="off",l.spellcheck=!1,l.placeholder="click to select a file",l.onclick=h=>{h.preventDefault(),l.blur();const d=Ht(r.chartManager.smPath);if(window.nw){const f=document.createElement("input");f.type="file",f.accept=n.accept.join(","),f.onchange=()=>{const p=Le.getRelativePath(d,f.value),m=(t??r.chartManager.loadedSM).properties[e.propName]??"";s.run({action:g=>{(t??g.chartManager.loadedSM).properties[e.propName]=p,l.value=p},undo:()=>{(t??r.chartManager.loadedSM).properties[e.propName]=m,l.value=m}}),a?.(r)},f.click()}else r.windowManager.openWindow(new Ud(r,{title:`Select a${n.typeName.match(/^[aieouAIEOU].*/)?"n":""} ${n.typeName} file...`,accepted_file_types:n.accept,disableClose:!0,callback:f=>{const p=Le.getRelativePath(d,f),m=(t??r.chartManager.loadedSM).properties[e.propName]??"";s.run({action:g=>{(t??g.chartManager.loadedSM).properties[e.propName]=p,l.value=p},undo:()=>{(t??r.chartManager.loadedSM).properties[e.propName]=m,l.value=m}}),a?.(r)}},(t??r.chartManager.loadedSM).properties[e.propName]?d+"/"+(t??r.chartManager.loadedSM).properties[e.propName]:r.chartManager.smPath))},l.value=(t??r.chartManager.loadedSM).properties[e.propName]??"",o.appendChild(l);const c=document.createElement("button");c.style.height="100%",c.classList.add("delete"),c.disabled=!(t??r.chartManager.loadedSM).properties[e.propName],c.onclick=()=>{l.value="",c.disabled=!0};const u=Ce.getIcon("TRASH",12);return c.appendChild(u),o.appendChild(c),o}}}class my extends Tt{app;sm;actionHistory;fileTable={};constructor(e){super({title:"New Song",width:450,height:492,disableClose:!0,win_id:"sm_properties",blocking:!0});const t=new Blob([ok],{type:"text/plain"}),i=new File([t],"song.sm",{type:"text/plain"});this.sm=new dy(i),this.app=e,this.actionHistory=new Ye(this.app),this.initView()}initView(){this.viewElement.replaceChildren(),this.viewElement.classList.add("sm-properties");const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("label"),t.innerText="Apply to",fy.forEach(l=>{const c=document.createElement("div");c.classList.add("sm-container");const u=document.createElement("div");u.classList.add("sm-title"),u.innerText=l.title;const h=document.createElement("div");h.classList.add("property-grid"),l.items.forEach(d=>{const f=document.createElement("div");f.classList.add("label"),f.innerText=d.title,h.appendChild(f),d.input.type=="file"?h.appendChild(this.createFileElement(d.propName,d.input.typeName)):h.appendChild(py(this.app,d,this.sm,this.actionHistory))}),c.appendChild(u),c.appendChild(h),e.appendChild(c)});const i=document.createElement("div");i.classList.add("menu-options");const s=document.createElement("div");s.classList.add("menu-left");const n=document.createElement("div");n.classList.add("menu-right"),i.appendChild(s),i.appendChild(n);const a=document.createElement("button");a.innerText="Cancel",a.onclick=()=>{this.closeWindow()};const o=document.createElement("button");o.innerText="Create",o.classList.add("confirm"),o.onclick=()=>{this.sm.properties.MUSIC===void 0||this.sm.properties.MUSIC===""?this.app.windowManager.openWindow(new Wa(this.app,"No audio file uploaded","Are you sure you want to create a file with no audio?",[{type:"confirm",label:"Yes",callback:()=>{this.createSong(),this.closeWindow()}},{type:"default",label:"No"}])):(this.createSong(),this.closeWindow())},s.appendChild(a),n.appendChild(o),e.appendChild(i),this.viewElement.appendChild(e)}async createSong(){let e=this.sm.properties.TITLE;if(window.nw){const t=nw.require("path"),i=document.createElement("input");i.type="file",i.nwsaveas=e+".sm",i.onchange=async()=>{const s=t.basename(i.value,t.extname(i.value));e=t.dirname(i.value);const n=t.join(e,s+".sm");await Le.writeFile(n,this.sm.serialize("sm")),await Promise.all(Object.entries(this.fileTable).map(a=>Le.writeFile(e+`/${a[0]}`,a[1]))),await this.app.chartManager.loadSM(n),this.app.windowManager?.getWindowById("select_sm_initial")?.closeWindow()},i.click()}else{if(await Le.getDirectoryHandle(e)){let t=2;for(;await Le.getDirectoryHandle(e);)e=`${this.sm.properties.TITLE} ${t++}`}await Le.writeFile(e+"/song.sm",this.sm.serialize("sm")),await Promise.all(Object.entries(this.fileTable).map(t=>Le.writeFile(e+`/${t[0]}`,t[1]))),await this.app.chartManager.loadSM(e+"/song.sm"),this.app.windowManager?.getWindowById("select_sm_initial")?.closeWindow()}}createFileElement(e,t){const i=document.createElement("div");i.classList.add("flex-row","flex-column-gap");const s=document.createElement("input");s.type="text",s.autocomplete="off",s.spellcheck=!1,s.placeholder="click to upload a file",s.readOnly=!0,s.onclick=o=>{o.preventDefault(),s.blur();const l=document.createElement("input");l.type="file",l.accept=t=="audio"?"audio/*":"image/*",l.onchange=()=>{const c=l.files?.[0];if(!c)return;this.sm.properties[e]&&this.fileTable[this.sm.properties[e]]&&delete this.fileTable[this.sm.properties[e]];let u=c.name;for(;this.fileTable[c.name]&&(this.fileTable[c.name].size!=c.size||this.fileTable[c.name].type!=c.type);)u="_"+u;this.fileTable[u]=c,s.value=u,this.sm.properties[e]=s.value,n.disabled=!1},l.click()},s.value=this.sm.properties[e]??"",i.appendChild(s);const n=document.createElement("button");n.style.height="100%",n.classList.add("delete"),n.disabled=!0,n.onclick=()=>{this.sm.properties[e]&&this.fileTable[this.sm.properties[e]]&&delete this.fileTable[this.sm.properties[e]],this.sm.properties[e]=void 0,s.value="",n.disabled=!0};const a=Ce.getIcon("TRASH",12);return n.appendChild(a),i.appendChild(n),i}}class gy extends Tt{app;keyHandler;constructor(e,t=!0){super({title:"Open a Song",width:400,height:320,disableClose:t,win_id:"select_sm_initial"}),this.app=e,this.keyHandler=this.handleKeyEvent.bind(this),window.addEventListener("keydown",this.keyHandler),this.initView(),H.on("resize",()=>{this.move(window.innerWidth/2-this.options.width/2,window.innerHeight/2-this.options.height/2)})}onClose(){window.removeEventListener("keydown",this.keyHandler)}initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("open-container"),e.appendChild(t);const i=document.createElement("div");i.classList.add("top-container");const s=document.createElement("div");s.classList.add("separator"),s.style.margin="10px";const n=document.createElement("div");n.classList.add("bottom-container"),t.appendChild(i),t.appendChild(s),t.appendChild(n);const a=document.createElement("button");a.style.display="flex",a.style.flexDirection="column",a.style.padding="10px",a.style.backgroundColor="#414352",a.style.color="white",i.appendChild(a);const o=Ce.getIcon("UPLOAD",30);a.appendChild(o);const l=document.createElement("div");l.innerText=window.nw?"Open an existing song":"Import a song folder",a.appendChild(l),a.onclick=()=>{if(window.nw){const p=document.createElement("input");p.type="file",p.accept=".sm,.ssc",p.onchange=()=>{this.app.chartManager.loadSM(p.value),this.closeWindow()},p.click()}else this.app.windowManager.openWindow(new Ud(this.app,{title:"Select an sm/ssc file...",accepted_file_types:[".sm",".ssc"],disableClose:!0,callback:p=>{this.app.chartManager.loadSM(p),this.closeWindow()}}))};const c=document.createElement("button");c.style.display="flex",c.style.flexDirection="column",c.style.padding="10px",c.style.backgroundColor="#506352",c.style.color="white",i.appendChild(c);const u=Ce.getIcon("PLUS",30);c.appendChild(u);const h=document.createElement("div");h.innerText="New Song",c.appendChild(h),c.onclick=()=>{this.app.windowManager.openWindow(new my(this.app))};const d=document.createElement("div");d.innerText="Recently Opened",d.classList.add("title"),n.appendChild(d);const f=document.createElement("div");f.classList.add("recent-selector"),n.appendChild(f),cy.getRecents().then(p=>p.forEach(m=>{const g=document.createElement("div");g.classList.add("recent-item");const b=document.createElement("div");b.classList.add("recent-name"),b.innerText=m.name;const w=document.createElement("div");w.classList.add("recent-path"),w.innerText=m.path,g.appendChild(b),g.appendChild(w),g.onclick=()=>{f.querySelectorAll(".selected").forEach(v=>v.classList.remove("selected")),g.classList.add("selected")},g.ondblclick=()=>{this.app.chartManager.loadSM(m.path),this.closeWindow()},f.appendChild(g)})),this.viewElement.appendChild(e)}handleKeyEvent(e){if(!this.windowElement.classList.contains("focused"))return;const t=this.viewElement.querySelector(".selected");if(t){if(e.code=="ArrowUp"){e.preventDefault(),e.stopImmediatePropagation();const i=t.previousElementSibling;i&&(t.parentElement.querySelectorAll(".selected").forEach(s=>s.classList.remove("selected")),i.classList.add("selected"),ka(i,{scrollMode:"if-needed",block:"nearest",inline:"nearest"}))}if(e.code=="ArrowDown"){e.preventDefault(),e.stopImmediatePropagation();const i=t.nextElementSibling;i&&(t.parentElement.querySelectorAll(".selected").forEach(s=>s.classList.remove("selected")),i.classList.add("selected"),ka(i,{scrollMode:"if-needed",block:"nearest",inline:"nearest"}))}}}}function $D(){const r=new URLSearchParams(location.search),e=r.get("flags");if(e!=null){const n=new Set(e.split("").map(a=>hk[a]).filter(a=>a));for(const a of n.values())De[a]=!De[a]}const t=r.get("url");if(t!=null)try{De.url=new URL(t).toString()}catch{Ee.createFormatted("Invalid url "+t,"warn"),De.url=null}const i=r.get("chartIndex");if(i!=null)try{De.chartIndex=parseInt(i)}catch{Ee.createFormatted("Invalid chartIndex "+i,"warn"),De.chartIndex=null}const s=r.get("chartType");s!==null&&(We.getGameType(s)?De.chartType=s:(Ee.createFormatted("Invalid chartType "+s,"warn"),De.chartType=null))}const lk={viewMode:{char:"V",name:"Force view mode (disables record mode)"},menuBar:{char:"M",name:"Hide menu bar"},playbackOptions:{char:"o",name:"Hide playback options"},barlines:{char:"B",name:"Hide barlines, waveform, and timing boxes"},assist:{char:"A",name:"Disable assist sounds"},recordMode:{char:"R",name:"Disable record mode"},playMode:{char:"P",name:"Disable play mode"},layout:{char:"L",name:"Hide note layout"},status:{char:"S",name:"Hide status bar"},autoPlay:{char:"a",name:"Play automatically"},openWindows:{char:"O",name:"Disable opening windows"},hidePoweredByText:{char:"H",name:'Hide "Powered by SMEditor" text'}},hk=Object.fromEntries(Object.entries(lk).map(([r,e])=>[e.char,r])),De={viewMode:!1,menuBar:!0,playbackOptions:!0,barlines:!0,assist:!0,recordMode:!0,playMode:!0,layout:!0,status:!0,autoPlay:!1,hidePoweredByText:!1,openWindows:!0,url:null,chartIndex:null,chartType:null},ba={file:{type:"menu",title:"File",options:[{type:"selection",id:"newSong"},{type:"selection",id:"openSong"},{type:"separator"},{type:"selection",id:"save"},{type:"selection",id:"export"}]},edit:{type:"menu",title:"Edit",options:[{type:"selection",id:"cut"},{type:"selection",id:"copy"},{type:"selection",id:"paste"},{type:"selection",id:"pasteReplace"},{type:"separator"},{type:"selection",id:"undo"},{type:"selection",id:"redo"},{type:"separator"},{type:"checkbox",id:"mousePlacement",checked:()=>x.chart.mousePlacement}]},view:{type:"menu",title:"View",options:[{type:"dropdown",title:"Cursor",options:[{type:"selection",id:"cursorUp"},{type:"selection",id:"cursorDown"},{type:"separator"},{type:"selection",id:"previousNote"},{type:"selection",id:"nextNote"},{type:"separator"},{type:"selection",id:"previousMeasure"},{type:"selection",id:"nextMeasure"},{type:"separator"},{type:"selection",id:"jumpChartStart"},{type:"selection",id:"jumpChartEnd"},{type:"separator"},{type:"selection",id:"jumpSongStart"},{type:"selection",id:"jumpSongEnd"}]},{type:"dropdown",title:"Snap",options:[{type:"selection",id:"decreaseSnap"},{type:"selection",id:"increaseSnap"}]},{type:"dropdown",title:"Scroll",options:[{type:"checkbox",id:"XMod",checked:()=>!x.chart.CMod},{type:"checkbox",id:"CMod",checked:()=>x.chart.CMod},{type:"separator"},{type:"selection",id:"increaseScrollSpeed"},{type:"selection",id:"decreaseScrollSpeed"}]},{type:"dropdown",title:"Zoom",options:[{type:"selection",id:"zoomIn"},{type:"selection",id:"zoomOut"},{type:"separator"},{type:"selection",id:"zoomDefault"}]},{type:"separator"},{type:"selection",id:"playMode"},{type:"selection",id:"playModeStart"},{type:"separator"},{type:"selection",id:"recordMode"},{type:"selection",id:"recordModeStart"},{type:"separator"},{type:"checkbox",id:"reverse",checked:()=>x.chart.reverse},{type:"checkbox",id:"hideWarpedArrows",checked:()=>x.chart.hideWarpedArrows},{type:"checkbox",id:"hideFakedArrows",checked:()=>x.chart.hideFakedArrows},{type:"checkbox",id:"doSpeedChanges",checked:()=>x.chart.doSpeedChanges}]},chart:{type:"menu",title:"Chart",options:[{type:"selection",id:"openChart"},{type:"separator"},{type:"selection",id:"previousChart"},{type:"selection",id:"nextChart"},{type:"separator"},{type:"selection",id:"songProperties"},{type:"separator"},{type:"selection",id:"timingDataRow"}]},selection:{type:"menu",title:"Selection",options:[{type:"dropdown",title:"Convert",options:[{type:"selection",id:"convertHoldsRolls"},{type:"selection",id:"convertRollsHolds"},{type:"selection",id:"swapHoldsRolls"},{type:"separator"},{type:"selection",id:"convertHoldsTaps"},{type:"selection",id:"convertTapsMines"},{type:"selection",id:"convertTapsLifts"},{type:"selection",id:"convertTapsFakes"}]},{type:"dropdown",title:"Mirror",options:[{type:"selection",id:"mirrorHorizontally"},{type:"selection",id:"mirrorVertically"},{type:"selection",id:"mirrorBoth"}]},{type:"dropdown",title:"Stretch",options:[{type:"selection",id:"expand2to1"},{type:"selection",id:"expand3to2"},{type:"selection",id:"expand4to3"},{type:"separator"},{type:"selection",id:"compress1to2"},{type:"selection",id:"compress2to3"},{type:"selection",id:"compress3to4"}]},{type:"dropdown",title:"Shift",options:[{type:"dropdown",title:"Up",options:[{type:"selection",id:"shiftUp4m"},{type:"selection",id:"shiftUp2m"},{type:"selection",id:"shiftUp1m"},{type:"selection",id:"shiftUp4th"},{type:"selection",id:"shiftUp8th"},{type:"selection",id:"shiftUp12th"},{type:"selection",id:"shiftUp16th"},{type:"selection",id:"shiftUp24th"},{type:"selection",id:"shiftUp32nd"},{type:"selection",id:"shiftUp48th"},{type:"selection",id:"shiftUp64th"},{type:"selection",id:"shiftUp96th"},{type:"selection",id:"shiftUp192nd"}]},{type:"dropdown",title:"Down",options:[{type:"selection",id:"shiftDown4m"},{type:"selection",id:"shiftDown2m"},{type:"selection",id:"shiftDown1m"},{type:"selection",id:"shiftDown4th"},{type:"selection",id:"shiftDown8th"},{type:"selection",id:"shiftDown12th"},{type:"selection",id:"shiftDown16th"},{type:"selection",id:"shiftDown24th"},{type:"selection",id:"shiftDown32nd"},{type:"selection",id:"shiftDown48th"},{type:"selection",id:"shiftDown64th"},{type:"selection",id:"shiftDown96th"},{type:"selection",id:"shiftDown192nd"}]}]},{type:"dropdown",title:"Quantize",options:[{type:"selection",id:"quantize4th"},{type:"selection",id:"quantize8th"},{type:"selection",id:"quantize12th"},{type:"selection",id:"quantize16th"},{type:"selection",id:"quantize24th"},{type:"selection",id:"quantize32nd"},{type:"selection",id:"quantize48th"},{type:"selection",id:"quantize64th"},{type:"selection",id:"quantize96th"}]},{type:"separator"},{type:"selection",id:"setSongPreview"},{type:"separator"},{type:"selection",id:"exportNotedata"},{type:"separator"},{type:"selection",id:"selectBeforeCursor"},{type:"selection",id:"selectAfterCursor"},{type:"selection",id:"selectAll"}]},audio:{type:"menu",title:"Audio",options:[{type:"selection",id:"detectSync"},{type:"separator"},{type:"checkbox",id:"assistTick",checked:()=>x.audio.assistTick&&De.assist},{type:"checkbox",id:"metronome",checked:()=>x.audio.metronome&&De.assist},{type:"separator"},{type:"dropdown",title:()=>"Master Volume ("+Math.round(x.audio.masterVolume*100)+"%)",options:[{type:"selection",id:"volumeUp"},{type:"selection",id:"volumeDown"}]},{type:"dropdown",title:()=>"Song Volume ("+Math.round(x.audio.songVolume*100)+"%)",options:[{type:"selection",id:"songVolumeUp"},{type:"selection",id:"songVolumeDown"}]},{type:"dropdown",title:()=>"Effect Volume ("+Math.round(x.audio.soundEffectVolume*100)+"%)",options:[{type:"selection",id:"effectvolumeUp"},{type:"selection",id:"effectvolumeDown"}]},{type:"dropdown",title:()=>"Playback rate ("+Math.round(x.audio.rate*100)+"%)",options:[{type:"selection",id:"rateUp"},{type:"selection",id:"rateDown"},{type:"separator"},{type:"selection",id:"rateDefault"}]},{type:"separator"},{type:"selection",id:"showEq"}]},preferences:{type:"menu",title:"Preferences",options:[{type:"selection",id:"options"},{type:"selection",id:"themes"},{type:"selection",id:"keybinds"},{type:"selection",id:"gameplayKeybinds"},{type:"selection",id:"noteskinWindow"}]},help:{type:"menu",title:"Help",options:[{type:"selection",id:"openGuide"},{type:"selection",id:"openChangelog"}]}},Hm=["cut","copy","paste","pasteReplace"],Gm={edit:[{ids:["delete"],after:"redo"},{ids:["toggleEditTiming","toggleAddTiming","previousNoteType","nextNoteType","noteTypeTap","noteTypeMine","noteTypeFake","noteTypeLift","quant4","quant8","quant12","quant16","quant24","quant32","quant48","quant64","quant96","quant192"],after:"mousePlacement"}],view:[{ids:["playback","selectRegion"]}],debug:[{ids:["showFPSCounter","showDebugTimers"]}]};class qi extends Tt{static GROUPS;app;observer;searchDropdown;conflictMap=this.calculateConflicts();constructor(e){super({title:"Keybind Options",width:600,height:400,disableClose:!1,win_id:"keybind_options",blocking:!1}),this.app=e,qi.GROUPS||(qi.GROUPS=qi.createGroups()),this.initView()}initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("pref-container");const i=document.createElement("div");i.classList.add("pref-search");const s=document.createElement("input");s.classList.add("pref-search-bar"),s.type="text",s.placeholder="Search for a keybind...",s.oninput=()=>{o.replaceChildren(...this.createSections(s.value)),l.replaceChildren(...this.createOptions(s.value))};const n=Oi.create(["Name","Key"],"Name");n.onChange(()=>{o.replaceChildren(...this.createSections(s.value)),l.replaceChildren(...this.createOptions(s.value))}),this.searchDropdown=n,i.replaceChildren(s,n.view);const a=document.createElement("div");a.classList.add("pref-scrollers");const o=document.createElement("div");o.classList.add("pref-section-scroller");const l=document.createElement("div");l.classList.add("pref-option-scroller"),a.replaceChildren(o,l),this.observer=new IntersectionObserver(c=>{c.forEach(u=>{const h=u.target.dataset.id,d=o.querySelector(`.pref-section[data-id=${h}]`);d&&(u.intersectionRatio>0?d.classList.add("selected"):d.classList.remove("selected"))})},{}),t.replaceChildren(i,a),o.replaceChildren(...this.createSections()),l.replaceChildren(...this.createOptions()),e.appendChild(t),this.viewElement.appendChild(e)}createSections(e=""){return Object.keys(qi.GROUPS).filter(t=>qi.GROUPS[t].some(i=>this.filterID(e,i))).map(t=>this.createEmptySection(ba[t]?.title??Nu(t),t))}createOptions(e=""){return Object.keys(qi.GROUPS).filter(t=>qi.GROUPS[t].some(i=>this.filterID(e,i))).map(t=>{const i=qi.GROUPS[t].filter(a=>this.filterID(e,a)).map(a=>this.createKeybindItem(a)),s=document.createElement("div");s.classList.add("pref-group"),s.dataset.id=t;const n=document.createElement("div");return n.classList.add("pref-group-label"),n.innerText=ba[t]?.title??Nu(t),s.replaceChildren(n,...i),this.observer.observe(s),s})}static createGroups(){const e=Object.keys(ct),t={};return Object.keys(ba).forEach(i=>{t[i]=this.expandMenubarOptions(ba[i]).map(s=>{const n=e.indexOf(s);return n!=-1&&e.splice(n,1),s}).filter(s=>!Hm.includes(s))}),Object.keys(Gm).forEach(i=>{t[i]===void 0&&(t[i]=[]),Gm[i].forEach(s=>{let n=0;if(s.after){const a=t[i].findIndex(o=>s.after==o)+1;a!=0&&(n=a)}t[i].splice(n,0,...s.ids),s.ids.forEach(a=>{const o=e.indexOf(a);o!=-1&&e.splice(o,1)})})}),Hm.forEach(i=>{const s=e.indexOf(i);s!=-1&&e.splice(s,1)}),e.length>0&&(console.warn("Missing keybinds not shown:"),console.warn(e)),t}filterID(e,t){if((this.searchDropdown?.value??"Name")=="Name")return(ct[t].bindLabel??ct[t].label).toLowerCase().includes(e.toLowerCase());{const i=Re.getCombosForKeybind(t);if(i.some(n=>n.key.toLowerCase().includes(e.toLowerCase()))||i.some(n=>(vy[n.key]??n.key).toLowerCase().includes(e.toLowerCase())))return!0;let s=e.split(" ").map(n=>n.toLowerCase());return i.some(n=>(s.includes("shift")||s.includes("⇧"))&&!n.mods.includes(ya.SHIFT)||(s.includes("ctrl")||s.includes("control")||s.includes("⌃"))&&!n.mods.includes(ya.CTRL)||(s.includes("meta")||s.includes("cmd")||s.includes("command")||s.includes("⌘"))&&!n.mods.includes(ya.META)||(s.includes("alt")||s.includes("⌥"))&&!n.mods.includes(ya.ALT)?!1:(s=s.filter(a=>!["shift","ctrl","control","meta","cmd","command","alt","⇧","⌃","⌘","⌥",""].includes(a)),s.length==0||s.length==1&&n.key.toLowerCase().includes(s[0])))}}static expandMenubarOptions(e){switch(e.type){case"menu":case"dropdown":return e.options.map(t=>this.expandMenubarOptions(t)).flat();case"selection":case"checkbox":return[e.id];case"separator":return[]}}createEmptySection(e,t){const i=document.createElement("div");return i.classList.add("pref-section"),i.dataset.id=t,i.innerText=e,i.onclick=()=>{i.parentElement.parentElement.querySelector(`.pref-group[data-id=${t}]`).scrollIntoView()},i}createKeybindItem(e){const t=document.createElement("div");t.classList.add("pref-keybind"),t.dataset.id=e,t.onclick=a=>{a.target.classList.contains("pref-keybind-combo")||t.querySelector(".icon")?.contains(a.target)||this.app.windowManager.openWindow(new Wn(this.app,!0,o=>{Re.setKeybind(e,o),this.conflictMap=this.calculateConflicts(),t.replaceWith(this.createKeybindItem(e))},o=>{const l=this.conflictMap.get(Re.getComboString(o))?.map(c=>c[0]).map(c=>ct[c].bindLabel??ct[c].label)??[];return l.includes(e)?"self":l}))};const i=document.createElement("div");i.classList.add("pref-keybind-label"),i.innerText=ct[e].bindLabel??ct[e].label;const s=Ce.getIcon("REVERT");s.style.width="12px",s.addEventListener("click",()=>{Re.revertKeybind(e),this.conflictMap=this.calculateConflicts(),t.replaceWith(this.createKeybindItem(e))}),s.style.display=Re.checkIsDefault(e)?"none":"block";const n=document.createElement("div");return n.classList.add("pref-keybind-combos"),n.replaceChildren(...Re.getCombosForKeybind(e).map(a=>{const o=document.createElement("button");return o.classList.add("pref-keybind-combo"),o.innerText=Re.getComboString(a),this.conflictMap.get(Re.getComboString(a)).length>1&&o.classList.add("conflict"),o.onclick=()=>{Re.removeKeybind(e,a),this.conflictMap=this.calculateConflicts(),t.replaceWith(this.createKeybindItem(e))},o})),t.replaceChildren(i,s,n),t}calculateConflicts(){const e=new Map;Object.keys(ct).forEach(t=>{Re.getCombosForKeybind(t).forEach((i,s)=>{const n=Re.getComboString(i);e.has(n)||e.set(n,[]),e.get(n).push([t,s])})}),[...this.viewElement.querySelectorAll(".pref-keybind-combo.conflict")].forEach(t=>t.classList.remove("conflict"));for(const t of e.values())t.length!=1&&t.forEach(i=>{const s=this.viewElement.querySelector(`.pref-keybind[data-id=${i[0]}] .pref-keybind-combos`);s?.children[i[1]]&&s.children[i[1]].classList.add("conflict")});return e}onClose(){this.observer?.disconnect()}}class ut{static noteskins=new Map;static register(e){for(const t of new Set(e.gameTypes))ut.noteskins.has(t)||ut.noteskins.set(t,new Map),ut.noteskins.get(t).set(e.id,e)}static async getNoteskin(e,t){const i=this.noteskins.get(e.id);if(!i||i.size==0)return;const s=i.get(t)??[...i.values()][0];return i.get(t)||Ee.createFormatted(`Couldn't find the noteskin ${t}!`,"warn"),await s.load()}static getNoteskinData(e,t){const i=this.noteskins.get(e.id);return!i||i.size==0?void 0:i.get(t)??[...i.values()][0]}static getNoteskins(){return this.noteskins}static getPreviewUrl(e,t){return this.getNoteskinData(e,t).preview}}ut.register({id:"default",gameTypes:["dance-single","dance-double","dance-couple","dance-solo","dance-solodouble","dance-threepanel","dance-threedouble"],load:async()=>(await Qe(()=>import("./Noteskin-e8141f1a.js"),["Noteskin-e8141f1a.js","HoldBody-5358344a.js"])).default,preview:new URL("/smeditor/assets/preview-17ffcc02.png",self.location).href,title:"Scalable",subtitle:"Pete-Lawrence"});ut.register({id:"cf-chrome",gameTypes:["dance-single","dance-double","dance-couple","dance-solo","dance-solodouble","dance-threepanel","dance-threedouble"],load:async()=>(await Qe(()=>import("./Noteskin-5a1b65c6.js"),["Noteskin-5a1b65c6.js","HoldBody-5358344a.js"])).default,preview:new URL("/smeditor/assets/preview-40b76b28.png",self.location).href,title:"CF_CHROME",subtitle:"Pete-Lawrence"});ut.register({id:"ddr-note",gameTypes:["dance-single","dance-double","dance-couple","dance-solo","dance-solodouble","dance-threepanel","dance-threedouble"],load:async()=>(await Qe(()=>import("./Noteskin-7b7fe270.js"),["Noteskin-7b7fe270.js","AnimatedSprite-86b56f12.js","HoldBody-5358344a.js"])).default,preview:new URL("/smeditor/assets/preview-b8f75a15.png",self.location).href,title:"DDR-Note",subtitle:"Pete-Lawrence"});ut.register({id:"ddr-note-itg",gameTypes:["dance-single","dance-double","dance-couple","dance-solo","dance-solodouble","dance-threepanel","dance-threedouble"],load:async()=>(await Qe(()=>import("./Noteskin-bd003ac8.js"),["Noteskin-bd003ac8.js","AnimatedSprite-86b56f12.js","HoldBody-5358344a.js"])).default,preview:new URL("/smeditor/assets/preview-f113aacc.png",self.location).href,title:"DDR-Note (ITG quants)",subtitle:"Pete-Lawrence"});ut.register({id:"ddr-rainbow",gameTypes:["dance-single","dance-double","dance-couple"],load:async()=>(await Qe(()=>import("./Noteskin-ba1ed891.js"),["Noteskin-ba1ed891.js","AnimatedSprite-86b56f12.js","HoldBody-5358344a.js"])).default,preview:new URL("/smeditor/assets/preview-0f9b00cd.png",self.location).href,title:"DDR-Rainbow",subtitle:"LemmaEOF"});ut.register({id:"ddr-rainbow-itg",gameTypes:["dance-single","dance-double","dance-couple"],load:async()=>(await Qe(()=>import("./Noteskin-c2a220e5.js"),["Noteskin-c2a220e5.js","AnimatedSprite-86b56f12.js","HoldBody-5358344a.js"])).default,preview:new URL("/smeditor/assets/preview-2fd7d50c.png",self.location).href,title:"DDR-Rainbow (ITG quants)",subtitle:"LemmaEOF"});ut.register({id:"metal",gameTypes:["dance-single","dance-double","dance-couple","dance-solo","dance-solodouble","dance-threepanel","dance-threedouble"],load:async()=>(await Qe(()=>import("./Noteskin-39363162.js"),["Noteskin-39363162.js","HoldBody-5358344a.js"])).default,preview:new URL("/smeditor/assets/preview-26b1bdce.png",self.location).href,title:"Metal",subtitle:"Pete-Lawrence"});ut.register({id:"pastel",gameTypes:["dance-single","dance-double","dance-couple","dance-solo","dance-solodouble","dance-threepanel","dance-threedouble"],load:async()=>(await Qe(()=>import("./Noteskin-6a616711.js"),["Noteskin-6a616711.js","AnimatedSprite-86b56f12.js","HoldBody-5358344a.js"])).default,preview:new URL("/smeditor/assets/preview-d67630f1.png",self.location).href,title:"Pastel",subtitle:"halcyoniix"});ut.register({id:"dividebyzero",gameTypes:["dance-single","dance-double","dance-couple","dance-solo","dance-solodouble","dance-threepanel","dance-threedouble"],load:async()=>(await Qe(()=>import("./Noteskin-ace77c92.js"),["Noteskin-ace77c92.js","AnimatedSprite-86b56f12.js","HoldBody-5358344a.js"])).default,preview:new URL("/smeditor/assets/preview-d763e667.png",self.location).href,title:"DivideByZero",subtitle:"MinaciousGrace"});ut.register({id:"subtractbyzero",gameTypes:["dance-single","dance-double","dance-couple","dance-solo","dance-solodouble","dance-threepanel","dance-threedouble"],load:async()=>(await Qe(()=>import("./Noteskin-f1e24e88.js"),["Noteskin-f1e24e88.js","AnimatedSprite-86b56f12.js","HoldBody-5358344a.js"])).default,preview:new URL("/smeditor/assets/preview-72ea0444.png",self.location).href,title:"SubtractByZero",subtitle:"qwertyzoro/Vague"});ut.register({id:"sm4",gameTypes:["dance-single","dance-double","dance-couple","dance-solo","dance-solodouble","dance-threepanel","dance-threedouble"],load:async()=>(await Qe(()=>import("./Noteskin-c2d5fa3c.js"),["Noteskin-c2d5fa3c.js","AnimatedSprite-86b56f12.js","HoldBody-5358344a.js"])).default,preview:new URL("/smeditor/assets/preview-3514cbb3.png",self.location).href,title:"SM4",subtitle:"from SM4"});ut.register({id:"sm4-bold",gameTypes:["dance-single","dance-double","dance-couple","dance-solo","dance-solodouble","dance-threepanel","dance-threedouble"],load:async()=>(await Qe(()=>import("./Noteskin-88871f72.js"),["Noteskin-88871f72.js","AnimatedSprite-86b56f12.js","HoldBody-5358344a.js"])).default,preview:new URL("/smeditor/assets/preview-9fe2bd96.png",self.location).href,title:"SM4 Bold",subtitle:"from SM4"});ut.register({id:"starlight-vivid",gameTypes:["dance-single","dance-double","dance-couple"],load:async()=>(await Qe(()=>import("./Noteskin-430fd36b.js"),["Noteskin-430fd36b.js","AnimatedSprite-86b56f12.js","HoldBody-5358344a.js"])).default,preview:new URL("/smeditor/assets/preview-5ecfc22a.png",self.location).href,title:"SLNEXXT-vivid",subtitle:"from STARLiGHT-NEXXT"});ut.register({id:"default",gameTypes:["pump-single","pump-double","pump-couple","pump-versus","pump-halfdouble"],load:async()=>(await Qe(()=>import("./Noteskin-1b40b05f.js"),["Noteskin-1b40b05f.js","AnimatedSprite-86b56f12.js","HoldBody-5358344a.js"])).default,preview:new URL("/smeditor/assets/preview-d6d59d37.png",self.location).href,title:"Fiesta"});ut.register({id:"fourv2",gameTypes:["pump-single","pump-double","pump-couple","pump-versus","pump-halfdouble"],load:async()=>(await Qe(()=>import("./Noteskin-5b9ce776.js"),["Noteskin-5b9ce776.js","AnimatedSprite-86b56f12.js","HoldBody-5358344a.js"])).default,preview:new URL("/smeditor/assets/preview-5d9781d2.png",self.location).href,title:"FourV2",subtitle:"Jousway"});ut.register({id:"prime",gameTypes:["pump-single","pump-double","pump-couple","pump-versus","pump-halfdouble"],load:async()=>(await Qe(()=>import("./Noteskin-fb3b8e1b.js"),["Noteskin-fb3b8e1b.js","AnimatedSprite-86b56f12.js","HoldBody-5358344a.js"])).default,preview:new URL("/smeditor/assets/preview-4f79831b.png",self.location).href,title:"Prime"});const ck="/smeditor/assets/preview-747db171.png";class uk extends Tt{app;grid;lastGameType=null;constructor(e){super({title:"Noteskin Selection",width:600,height:400,disableClose:!1,win_id:"noteskin-selection",blocking:!1}),this.app=e,this.initView(),this.loadGrid(),H.on("chartLoaded",()=>{const t=e.chartManager.loadedChart.gameType.id;this.lastGameType!=t&&this.loadGrid()})}initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("input");t.classList.add("pref-search-bar"),t.type="text",t.placeholder="Search for a noteskin...",t.oninput=()=>{this.filterGrid(t.value)};const i=document.createElement("div");i.classList.add("noteskin-grid"),this.grid=i,e.replaceChildren(t,i),this.viewElement.appendChild(e)}loadGrid(){if(this.grid.replaceChildren(),!this.app.chartManager.loadedChart)return;const e=this.app.chartManager.loadedChart.gameType;this.lastGameType=e.id;const t=ut.getNoteskins().get(e.id);if(t)for(const[i,s]of t.entries()){const n=document.createElement("div"),a=document.createElement("img"),o=document.createElement("div"),l=document.createElement("div"),c=document.createElement("div");n.classList.add("noteskin-cell"),o.classList.add("noteskin-label"),l.classList.add("noteskin-title"),c.classList.add("noteskin-subtitle"),l.innerText=s.title??i,c.innerText=s.subtitle??"",a.src=ut.getPreviewUrl(e,i),a.onerror=()=>{a.src=ck},n.replaceChildren(a,o),o.replaceChildren(l,c),this.grid.appendChild(n),i==x.chart.noteskin.name&&(n.classList.add("selected"),setTimeout(()=>{n.scrollIntoView({behavior:x.general.smoothAnimations?"smooth":"instant",block:"center"})})),n.dataset.id=i,n.dataset.title=s.title??"",n.dataset.subtitle=s.subtitle??"",n.onclick=()=>{x.chart.noteskin.name!=i&&(this.app.chartManager.chartView?.swapNoteskin(i),this.removeAllSelections(),n.classList.add("selected"))}}}removeAllSelections(){[...this.grid.querySelectorAll(".selected")].forEach(e=>e.classList.remove("selected"))}filterGrid(e){[...this.grid.children].forEach(t=>{if(!(t instanceof HTMLDivElement))return;const i=t,s=this.containsQuery(e,i.dataset.id)||this.containsQuery(e,i.dataset.title)||this.containsQuery(e,i.dataset.subtitle);i.style.display=s?"":"none"})}containsQuery(e,t){return t?t.toLowerCase().includes(e.trim().toLowerCase()):!1}}class dk extends Tt{app;metronomeInterval;startTime;me_high=new Fl.Howl({src:mb,volume:x.audio.soundEffectVolume});me_low=new Fl.Howl({src:gb,volume:x.audio.soundEffectVolume});tickLines=[];resultLines=[];previousOffsets=[];keyHandler;constructor(e){super({title:"Offset Adjuster",width:300,height:200,win_id:"offset",blocking:!0}),this.app=e,this.initView(),this.startTime=performance.now();let t=this.startTime+500;this.tickLines.push({time:t+500,beat:0}),this.tickLines.push({time:t+500*2,beat:1}),this.tickLines.push({time:t+500*3,beat:2}),this.tickLines.push({time:t+500*4,beat:3});let i=0;this.metronomeInterval=setInterval(()=>{const s=performance.now();if(s-t>500){for(t=s,(i%4==0?this.me_high:this.me_low).play();this.tickLines[0]?.time+1e3s-n.startTime<8e3)},5),this.keyHandler=s=>{if(s.code.startsWith("Digit")||s.code.startsWith("Key")||s.code=="Space"){let n=this.tickLines[0];const a=performance.now();for(const l of this.tickLines)if(a-l.time+x.play.offset*1e3<300){n=l;break}s.preventDefault();const o=a-n.time+x.play.offset*1e3;o>-300&&(this.tickLines.splice(this.tickLines.indexOf(n),1),this.resultLines.push({startTime:performance.now(),offset:o}),this.previousOffsets.push(o),this.previousOffsets.length==16&&(Yb(this.previousOffsets)<70&&(x.play.offset-=fh(this.previousOffsets)/1e3),this.previousOffsets=[]))}},window.addEventListener("keydown",this.keyHandler)}initView(){this.viewElement.replaceChildren();const e=document.createElement("canvas");this.viewElement.appendChild(e);const t=this.drawEQ(e);requestAnimationFrame(t)}drawEQ(e){const t=e.getContext("2d");t.canvas.width=250,t.canvas.height=100;const i=()=>{t.fillStyle="rgba(0, 0, 0, 1)",t.fillRect(0,0,e.width,e.height),t.fillStyle="rgb(255, 255, 255)",t.fillRect(e.width/2-1,8,2,e.height-16);const s=performance.now();for(const n of this.resultLines){t.fillStyle="rgba(255, 255, 255, 1)";const a=Math.min(1,4-(s-n.startTime)/2e3);if(n.offset<0&&(t.fillStyle=`rgba(160, ${$t(160,0,-n.offset/250)}, ${$t(160,0,-n.offset/250)}, ${a})`),n.offset>0&&(t.fillStyle=`rgba(${$t(160,0,n.offset/250)}, ${$t(160,0,n.offset/250)}, 160, ${a})`),t.fillRect(e.width/2-.5+n.offset/4,12,1,e.height-24),s-n.startTime<250){const o=(s-n.startTime)/250;t.globalAlpha=1-o,t.fillRect(e.width/2-.5-o*3+n.offset/4,12-o*10,1+o*6,e.height-24+o*20)}t.globalAlpha=1}for(const n of this.tickLines){const a=n.time-s-x.play.offset*1e3;t.fillStyle="rgba(255, 255, 255, 0.8)",n.beat%4!=0?t.fillRect(e.width/2-1-a/4,12,2,e.height-24):t.fillRect(e.width/2-2-a/4,12,4,e.height-24)}e.closest("#windows")&&requestAnimationFrame(i)};return i}onClose(){clearInterval(this.metronomeInterval),window.removeEventListener("keydown",this.keyHandler)}}class fk extends Tt{app;changeHandler=()=>this.initView();constructor(e){super({title:"Song Properties",width:450,height:486,disableClose:!1,win_id:"sm_properties",blocking:!1}),this.app=e,this.initView(),H.on("smLoaded",this.changeHandler),H.on("undo",this.changeHandler),H.on("redo",this.changeHandler)}onClose(){H.off("smLoaded",this.changeHandler),H.off("undo",this.changeHandler),H.off("redo",this.changeHandler)}initView(){this.viewElement.replaceChildren(),this.viewElement.classList.add("sm-properties");const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("label"),t.innerText="Apply to",fy.forEach(i=>{const s=document.createElement("div");s.classList.add("sm-container");const n=document.createElement("div");n.classList.add("sm-title"),n.innerText=i.title;const a=document.createElement("div");a.classList.add("property-grid"),i.items.forEach(o=>{const l=document.createElement("div");l.classList.add("label"),l.innerText=o.title,a.appendChild(l),a.appendChild(py(this.app,o))}),s.appendChild(n),s.appendChild(a),e.appendChild(s)}),this.viewElement.appendChild(e)}}var pk=yk,zl=8192,zd=65536,Wd=new ArrayBuffer(zd*4),mk=new Float64Array(Wd,zd,zl),gk=new Float64Array(Wd,zd*2,zl/2),bk=vk({Math,Float64Array},null,Wd);function yk(r){if(!r)throw Error("Input data is not provided, pass an array.");var e=r.length;if(e>zl)throw Error("Input length is too big, must be under "+zl);var t=Math.floor(Math.log(e)/Math.LN2);if(Math.pow(2,t)!==e)throw Error("Invalid array size, must be a power of 2.");return mk.set(r),bk(e,t),gk.subarray(0,e/2)}function vk(r,e,t){var i=6.283185307179586,s=r.Math.sqrt,n=r.Math.sin,a=r.Math.cos,o=r.Math.abs,l=r.Math.SQRT1_2,c=r.Math.imul,u=new r.Float64Array(t),h=new r.Float64Array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Z=4*ie*(.75-ie*ie),le=0,we=E<<1;do{for(fe=le;(fe|0)<(g|0);fe=fe+we|0)S=fe+v|0,_=S+C|0,R=_+C|0,q=R+C|0,F=fe+C-v|0,L=F+C|0,W=L+C|0,z=W+C|0,U=h[W<<3>>3]*N-h[R<<3>>3]*ie,M=h[W<<3>>3]*ie+h[R<<3>>3]*N,T=h[z<<3>>3]*Q-h[q<<3>>3]*Z,V=h[z<<3>>3]*Z+h[q<<3>>3]*Q,O=U-T,U=U+T,T=O,h[z<<3>>3]=U+h[L<<3>>3],h[R<<3>>3]=U-h[L<<3>>3],O=V-M,M=M+V,V=O,h[q<<3>>3]=V+h[_<<3>>3],h[W<<3>>3]=V-h[_<<3>>3],h[L<<3>>3]=h[S<<3>>3]-M,h[S<<3>>3]=h[S<<3>>3]+M,h[_<<3>>3]=T+h[F<<3>>3],h[F<<3>>3]=h[F<<3>>3]-T;le=(we<<1)-E|0,we=we<<2}while((le|0)<(g|0))}}for(;w=w-1|0;)ce=+h[w<<3>>3],pe=+h[g-w-1<<3>>3],xe=y*s(ce*ce+pe*pe),u[f+w<<3>>3]=xe;u[f+0<<3>>3]=o(y*h[0])}function m(g){g=g|0;var b=0,w=0,v=1,y=0,E=0;b=g>>>1,w=g-1|0,h[0]=u[d+0<<3>>3];do{for(y=y+b|0,h[v<<3>>3]=u[d+y<<3>>3],h[y<<3>>3]=u[d+v<<3>>3],v=v+1|0,E=b<<1;E=E>>1,((y=y^E)&E)==0;);(y|0)>=(v|0)&&(h[v<<3>>3]=u[d+y<<3>>3],h[y<<3>>3]=u[d+v<<3>>3],h[w-v<<3>>3]=u[d+w-y<<3>>3],h[w-y<<3>>3]=u[d+w-v<<3>>3]),v=v+1|0}while((v|0)<(b|0));h[w<<3>>3]=u[d+w<<3>>3]}return p}const Vm=Xa(pk);class Ps{view;slider;text;options;constructor(e,t){this.view=e,this.options=t,this.view.classList.add("slider");const i=document.createElement("input");i.classList.add("slider-input"),i.type="range",i.min=t.min.toString(),i.max=t.max.toString(),i.step=t.step.toString(),i.value=(t.value??(t.min+t.max)/2).toString(),i.oninput=()=>{s.innerText=this.formatValue(parseFloat(i.value))+"",this.options.onChange?.(parseFloat(i.value))},t.width!==void 0&&(i.style.width=t.width+"px"),this.slider=i,e.appendChild(i);const s=document.createElement("div");s.innerText=this.formatValue(parseFloat(i.value))+"",s.style.width="30px",this.text=s,e.appendChild(s)}get value(){return parseFloat(this.slider.value)}setValue(e){this.slider.value=e+"",this.text.innerText=this.formatValue(parseFloat(this.slider.value))+""}static create(e){return new Ps(document.createElement("div"),e)}formatValue(e){return this.options.transformer?this.options.transformer(e):this.options.precision===void 0?ae(e,3).toString():ae(e,this.options.precision).toFixed(this.options.precision)}}const ni=800,nt=200,Cc=3,aa=125,oa=250,Zo=3,wk=.02,sn=6,Sc=800,zm=15,ai=32768,Mc=[{frequency:20,weight:.4006009013520281},{frequency:25,weight:.4258037044922291},{frequency:31.5,weight:.4536690484291709},{frequency:40,weight:.4840856831659204},{frequency:50,weight:.5142710208279764},{frequency:63,weight:.5473453749315819},{frequency:80,weight:.5841121495327103},{frequency:100,weight:.6214074879602299},{frequency:125,weight:.6601749463607856},{frequency:160,weight:.7054673721340388},{frequency:200,weight:.7489234225800412},{frequency:250,weight:.7936507936507937},{frequency:315,weight:.8406893652795292},{frequency:400,weight:.889284126278346},{frequency:500,weight:.9291521486643438},{frequency:630,weight:.9675858732462506},{frequency:800,weight:.9985022466300548},{frequency:1e3,weight:.9997500624843789},{frequency:1250,weight:.9564801530368244},{frequency:1600,weight:.9409550693954364},{frequency:2e3,weight:1.0196278358399185},{frequency:2500,weight:1.0955902492467817},{frequency:3150,weight:1.1232799775344005},{frequency:4e3,weight:1.0914051841746248},{frequency:5e3,weight:.9997500624843789},{frequency:6300,weight:.8727907484180668},{frequency:8e3,weight:.7722007722007722},{frequency:1e4,weight:.7369196757553427},{frequency:12500,weight:.7768498737618955},{frequency:16e3,weight:.7698229407236336},{frequency:2e4,weight:.4311738708634257},{frequency:22550,weight:.2},{frequency:25e3,weight:0}];class by extends Tt{app;onAudioLoad=this.reset.bind(this);windowStep=512;fftSize=1024;tempoFftSize=4096;tempoStep=2;monoAudioData;audioLength=0;sampleRate=44100;tempogram=[];tempogramGroups=[];spectrogram=[];spectrogramDifference=[];noveltyCurve=[];noveltyCurveIsolated=[];spectrogramCanvases=[];lowestFinishedBlock=0;numRenderedBlocks=0;peaks=[];_threshold=.3;spectroHeights=[];spectroWeights=[];placeNotesSelectionButton;toggleButton;resetButton;onsetResults;offsetTableLabel;offsetRows=[];bpmRows=[];covers=[];doAnalysis=!1;lastSecond=0;constructor(e){super({title:"Detect Audio Sync",width:400,height:450,win_id:"detect-sync"}),this.app=e,this.initView(),this.reset(),H.on("audioLoaded",this.onAudioLoad)}onClose(){H.off("audioLoaded",this.onAudioLoad),this.app.chartManager.chartAudio.offLoad(this.onAudioLoad)}initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("sync-container"),e.style.display="flex",e.style.flexDirection="column",e.style.alignItems="center";const t=document.createElement("canvas");t.style.width=`${ni/2}px`,t.style.height=`${nt}px`;const i=document.createElement("div");i.classList.add("sync-tab-container");const s=document.createElement("div");s.classList.add("sync-tab-option","active"),s.innerText="Analysis Options";const n=document.createElement("div");n.classList.add("sync-tab-option"),n.innerText="Tempo Results";const a=document.createElement("div");a.classList.add("sync-tab-option"),a.innerText="Onset Results",i.replaceChildren(s,n,a),[...i.children].forEach((m,g)=>{m.onclick=()=>{l.scrollLeft=370*g,i.querySelectorAll(".active").forEach(b=>b.classList.remove("active")),m.classList.add("active")}});const o=document.createElement("div");o.classList.add("sync-tab-view");const l=document.createElement("div");l.classList.add("sync-tab-scroller");const c=this.createOptionsView(),u=this.createTempoView(),h=this.createOnsetsView(),d=(m,g)=>{const b=document.createElement("div");return b.classList.add("sync-cover"),b.innerText=m,b.style.left=`${g*370}px`,b};this.covers=[d("Clear analysis results to edit",0),d("Start analysis to view",1),d("Start analysis to view",2)],o.appendChild(l),l.replaceChildren(c,this.covers[0],u,this.covers[1],h,this.covers[2]);const f=document.createElement("div");f.classList.add("sync-bottom-container"),this.resetButton=document.createElement("button"),this.resetButton.classList.add("delete"),this.resetButton.innerText="Clear results",this.resetButton.style.width="120px",this.resetButton.disabled=!0,this.resetButton.onclick=()=>{this.resetButton.disabled=!0,s.click(),this.reset()},this.toggleButton=document.createElement("button"),this.toggleButton.innerText="Start analyzing",this.toggleButton.style.width="200px",this.toggleButton.onclick=()=>{this.doAnalysis||n.click(),this.doAnalysis=!this.doAnalysis,this.toggleButton.innerText=this.doAnalysis?"Stop analyzing":this.hasData()?"Resume analyzing":"Start analyzing",this.resetButton.disabled=this.doAnalysis},f.replaceChildren(this.toggleButton,this.resetButton),e.replaceChildren(t,i,o,f),this.viewElement.appendChild(e);const p=this.windowLoop(t);requestAnimationFrame(p)}createOptionsView(){const e=document.createElement("div");e.style.display="flex",e.style.position="relative",e.style.flexDirection="column",e.style.gap="3px",e.style.height="100%";const t=(c,u,h)=>{const d=document.createElement("div");d.style.display="flex",d.style.flexDirection="row",d.style.justifyContent="space-between",d.style.alignItems="center";const f=document.createElement("div");return f.innerText=c,d.replaceChildren(f,u),Ze(d,{content:h}),d},i=document.createElement("div");i.innerText="Onsets",i.style.fontWeight="600";const s=Ps.create({min:Math.log2(128),max:Math.log2(8192),step:1,value:Math.log2(this.fftSize),transformer:c=>2**c,onChange:c=>{this.fftSize=2**c,this.windowStep>this.fftSize&&(this.windowStep=this.fftSize,n.setValue(c)),this.reset()}}),n=Ps.create({min:Math.log2(128),max:Math.log2(8192),step:1,value:Math.log2(this.windowStep),transformer:c=>2**c,onChange:c=>{this.windowStep=2**c,this.windowStep>this.fftSize&&(this.windowStep=this.fftSize,n.setValue(Math.log2(this.fftSize))),this.reset()}}),a=document.createElement("div");a.innerText="Tempo",a.style.fontWeight="600",a.style.marginTop="15px";const o=Ps.create({min:Math.log2(128),max:Math.log2(8192),step:1,value:Math.log2(this.tempoFftSize),transformer:c=>2**c,onChange:c=>{this.tempoStep=2**c,this.tempoStep>this.tempoFftSize&&(this.tempoStep=this.tempoFftSize,l.setValue(c)),this.reset()}}),l=Ps.create({min:Math.log2(1),max:Math.log2(1024),step:1,value:Math.log2(this.tempoStep),transformer:c=>2**c,onChange:c=>{this.tempoStep=2**c,this.tempoStep>this.tempoFftSize&&(this.tempoStep=this.tempoFftSize,l.setValue(Math.log2(this.tempoFftSize))),this.reset()}});return e.replaceChildren(i,t("FFT Size",s.view,"Determines the amount of audio to analyze at every block. Higher values result in more accurate frequencies, while lower values result in more accurate timings. Defaults to 1024."),t("Window Step",n.view,"Determines the number of blocks per second. Lower values result in more time-accurate spectrograms, but may take more time and mess up tempo analysis. Defaults to 512 and must be lower than FFT Size."),a,t("FFT Size",o.view,"Determines the amount of the onset graph to analyze at every block. Higher values result in more accurate tempos, while lower values result in more accurate timings. Defaults to 4096."),t("Window Step",l.view,"Determines the number of blocks per second. Lower values result in more time-accurate tempograms, but may take more time. Defaults to 2 and must be lower than FFT Size.")),e}createTempoView(){const e=document.createElement("div");e.style.display="flex",e.style.position="relative",e.style.gap="10px";const t=document.createElement("div");t.style.flex="1";const i=document.createElement("div");i.classList.add("sync-table-label"),i.innerText="Offsets",this.offsetTableLabel=i;const s=document.createElement("table");s.classList.add("sync-table");const n=document.createElement("tr"),a=document.createElement("th");a.innerText="Offset";const o=document.createElement("th");o.innerText="Confidence",n.replaceChildren(a,o),s.appendChild(n),t.replaceChildren(i,s);const l=document.createElement("div");l.style.flex="1";const c=document.createElement("div");c.classList.add("sync-table-label"),c.innerText="Current Tempos";const u=document.createElement("table");u.classList.add("sync-table");const h=document.createElement("tr"),d=document.createElement("th");d.innerText="BPM";const f=document.createElement("th");f.innerText="Confidence",h.replaceChildren(d,f),u.appendChild(h);for(let p=0;p<5;p++){const m=document.createElement("tr"),g=document.createElement("td");g.innerText="-";const b=document.createElement("td");b.innerText="-",m.replaceChildren(g,b),s.appendChild(m),this.offsetRows.push(m);const w=m.cloneNode(!0);u.appendChild(w),this.bpmRows.push(w)}return l.replaceChildren(c,u),e.replaceChildren(t,l),e}createOnsetsView(){const e=document.createElement("div");e.style.display="flex",e.style.flexDirection="column",e.style.gap="10px",e.style.justifyContent="center",e.style.alignItems="center",e.style.position="relative";const t=document.createElement("div");t.style.display="flex",t.style.justifyContent="space-between",t.style.alignItems="center",t.style.width="100%",Ze(t,{content:"Adjust the threshold for a block to be considered an onset (red line)."});const i=document.createElement("div");i.innerText="Onset Threshold";const s=Ps.create({min:0,max:1,step:.01,value:.3,onChange:c=>{this.threshold=c}}),n=document.createElement("div");n.style.color="#888888",n.style.fontStyle="italic",n.style.fontSize="11px",n.style.marginBottom="15px",n.style.marginTop="-6px",n.innerText="Found 0 onsets",this.onsetResults=n,t.replaceChildren(i,s.view);const a=document.createElement("div");a.style.display="flex",a.style.justifyContent="space-between",a.style.alignItems="center",a.style.width="100%";const o=document.createElement("button");o.innerText="Place onsets as notes",o.onclick=()=>this.placeOnsets();const l=document.createElement("button");return l.innerText="Place onsets as notes in selection",l.disabled=!0,l.onclick=()=>this.placeOnsets(!0),this.placeNotesSelectionButton=l,a.replaceChildren(o,l),e.replaceChildren(t,n,a),e}async reset(){this._threshold=.3,this.doAnalysis=!1,this.toggleButton.disabled=!1,this.toggleButton.style.background="",this.toggleButton.innerText="Start analyzing",this.app.chartManager.chartAudio.onLoad(this.onAudioLoad),await this.getMonoAudioData(),this.sampleRate=this.app.chartManager.chartAudio.getSampleRate(),this.spectroHeights=new Array(this.fftSize).fill(0).map((t,i)=>{const s=i/(this.fftSize/2)*this.sampleRate/2,n=(i+1)/(this.fftSize/2)*this.sampleRate/2,a=nt-Oe(Math.log(s/20)/Math.log(this.sampleRate/40)*nt,0,nt),o=nt-Oe(Math.log(n/20)/Math.log(this.sampleRate/40)*nt,0,nt);return{y:o,height:a-o}}),this.spectroWeights=new Array(this.fftSize).fill(0).map((t,i)=>{const s=i/(this.fftSize/2)*this.sampleRate/2,n=Mc.findIndex(l=>l.frequency>s);if(n<1)return 0;const a=Mc[n-1],o=Mc[n];return $t(a.weight,o.weight,Vt(Math.log(1+a.frequency),Math.log(1+o.frequency),Math.log(1+s)))});const e=Math.max(1,Math.ceil(this.audioLength/this.windowStep));this.spectrogramCanvases=[];for(let t=0;t{t.firstChild.innerText="-",t.lastChild.innerText="-"}),this.bpmRows.forEach(t=>{t.firstChild.innerText="-",t.lastChild.innerText="-"})}hasData(){return this.numRenderedBlocks>0}windowLoop(e){const t=e.getContext("2d");t.canvas.width=ni,t.canvas.height=nt*2,t.imageSmoothingEnabled=!1;const i=()=>{if(this.placeNotesSelectionButton.disabled=this.app.chartManager.startRegion===void 0||this.app.chartManager.endRegion===void 0||this.app.chartManager.startRegion==this.app.chartManager.endRegion,this.covers[0].classList.toggle("active",this.hasData()),this.covers[1].classList.toggle("active",!this.hasData()),this.covers[2].classList.toggle("active",!this.hasData()),!this.app.chartManager.chartAudio)return;const s=Math.ceil(this.audioLength/this.windowStep);if(this.monoAudioData!==void 0&&this.doAnalysis){const d=performance.now();for(;performance.now()-d=s){this.tempogram.length==0&&(this.toggleButton.disabled=!0,this.calcTempogram());break}this.spectrogram[this.lowestFinishedBlock]===void 0&&(this.renderBlock(this.lowestFinishedBlock),this.calcDifference(this.lowestFinishedBlock),this.calcIsolatedNovelty(this.lowestFinishedBlock),this.numRenderedBlocks++),this.lowestFinishedBlock++}this.lowestFinishedBlock.5?l=new P("white"):l=new P("black"),t.fillStyle=Xi($e.getColor("accent-color"),l,.1).toHexa(),t.fillRect(0,0,e.width,e.height),t.globalCompositeOperation="destination-over",t.fillStyle=Xi($e.getColor("accent-color"),l,.9).toHexa(),t.fillRect(0,0,e.width,e.height),t.globalCompositeOperation="source-over";const c=a*this.windowStep/this.sampleRate,u=o*this.windowStep/this.sampleRate;if(this.app.chartManager.loadedChart){const d=this.app.chartManager.loadedChart.getBeatFromSeconds(c),f=this.app.chartManager.loadedChart.getBeatFromSeconds(Math.min(u,this.app.chartManager.chartAudio.getSongLength()));t.fillStyle="rgba(255, 255, 255, 0.2)";for(const[p,m]of this.app.chartManager.loadedChart.timingData.getMeasureBeats(d,f)){const g=this.app.chartManager.loadedChart.getSecondsFromBeat(p);t.fillRect(Vt(c,u,g)*ni-(m?2:1),0,m?5:3,nt*1.5)}}t.fillStyle="rgba(255, 0, 0, 0.3)";for(let d=Math.floor(a);d<=Math.ceil(o);d++)this.peaks[d]&&t.fillRect(Vt(a,o,d)*ni-.5,0,2,nt*1.5);t.fillStyle="rgba(50, 255, 20, 0.3)",t.fillRect(ni*.2-1,0,3,nt*2),t.fillStyle="rgba(255, 0, 255, 0.5)",t.fillRect(0,nt*1.5-this._threshold*nt*.5,ni,1);const h=Math.round(this.app.chartManager.time*this.sampleRate/this.windowStep/this.tempoStep);if(t.fillStyle=$e.getColor("accent-color").toHex(),t.textAlign="right",t.textBaseline="top",t.font="22px Assistant",t.fillText(`${this.numRenderedBlocks}/${s} blocks rendered`,ni-10,10),t.textAlign="right",t.textBaseline="middle",this.tempogramGroups[h]){const d=[];for(const f of this.tempogramGroups[h]){let p=0,m=0,g=0;for(let b=h-Zo;b<=h+Zo;b++){if(this.tempogramGroups[b]===void 0)continue;const w=this.tempogramGroups[b].find(v=>v.centerf.center-sn);w!==void 0&&(p+=w.groups[0].value,m+=w.avg,g++)}p/=g,m/=g,d.push({bpm:m,weight:f.groups[0].value,smoothedWeight:p})}d.sort((f,p)=>p.smoothedWeight-f.smoothedWeight);for(const f of d)f.weight<.01||(t.font=`${18+f.weight*300}px Assistant`,t.globalAlpha=Math.min(1,f.weight*100),t.fillText(ae(f.bpm,0)+"",200,$t(nt*2,nt*1.5,Vt(aa,oa,f.bpm))));if(this.lastSecond!=this.app.chartManager.time){this.lastSecond=this.app.chartManager.time;const f=d.slice(0,5).reduce((p,m)=>p+m.smoothedWeight,0);for(let p=0;p<5;p++){const m=this.bpmRows[p],g=d[p]?.bpm,b=d[p]?.weight;m.firstChild.innerText=g===void 0?"-":Math.round(g).toString(),m.lastChild.innerText=b===void 0?"-":Math.round(b/f*100)+"%"}}}t.globalAlpha=1,t.font="22px Assistant",t.textAlign="left",t.textBaseline="top",t.fillText("Spectrogram",10,10),t.fillText("Onsets",10,nt+10),t.fillText("Tempogram",10,nt*1.5+10),e.closest("#windows")&&requestAnimationFrame(i)};return i}renderBlock(e){if(!this.monoAudioData)return;const t=new Float32Array(this.fftSize);t.set(this.monoAudioData.subarray(Math.max(0,e*this.windowStep-this.fftSize/2),e*this.windowStep+this.fftSize/2),-Math.min(0,e*this.windowStep-this.fftSize/2));for(let s=0;s{const a=this.spectroHeights[n],o=Oe(s*2e3,0,255);i.globalAlpha=o/255,i.fillRect(e%ai,a.y,1,a.height)}),i.globalAlpha=1}storeDifferenceResponse(e,t){this.spectrogramDifference[e]=t;const i=t.reduce((s,n)=>s+n,0);this.noveltyCurve[e]=i}calcIsolatedNovelty(e){for(let t=e-Cc;t<=e;t++){if(t<0)continue;let i=0,s=0;for(let n=t-Cc;n<=t+Cc;n++)this.noveltyCurve[n]!==void 0&&(i+=this.noveltyCurve[n],s++);i/=s,this.storeIsolatedNovelty(t,Math.max(0,this.noveltyCurve[t]-i))}}storeIsolatedNovelty(e,t){this.noveltyCurveIsolated[e]=Math.log(1+t),Math.log(1+t)>this._threshold&&Math.log(1+t)>(this.noveltyCurveIsolated[e-1]??0)?(this.peaks[e-1]&&(this.peaks[e-1]=!1),this.peaks[e]=!0,this.onsetResults.innerText=`Found ${this.peaks.filter(n=>n).length} onsets`):this.peaks[e]=!1;const i=this.spectrogramCanvases[Math.floor(e/ai)].getContext("2d"),s=Math.min(1,Math.log(1+t))*nt*.5;i.fillStyle="white",i.fillRect(e%ai,nt*1.5-s,1,s)}async getMonoAudioData(){const e=this.app.chartManager.chartAudio;if(!e)return;const t=e.getBuffer(),i=new OfflineAudioContext(t.numberOfChannels,t.length,t.sampleRate),s=i.createBufferSource();s.buffer=t;const n=i.createChannelMerger(t.numberOfChannels);s.connect(n),n.connect(i.destination),s.start(),await i.startRendering().then(a=>{this.monoAudioData=a.getChannelData(0),this.audioLength=this.monoAudioData.length}).catch(()=>{Ee.createFormatted("Failed to load audio: audio rendering failed","error")})}get threshold(){return this._threshold}set threshold(e){this._threshold=e,this.peaks=this.noveltyCurveIsolated.map((t,i)=>t>this._threshold&&(this.noveltyCurveIsolated[i-1]??0)t).length} onsets`}calculateOffset(){const e=new Map;let t=0,i=0,s=0;for(let c=0;cd.groups[0].value>=wk);if(h.length!=0&&(i=c,h.forEach(d=>{let f=0,p=0;for(let g=c-Zo;g<=c+Zo;g++){if(this.tempogramGroups[g]===void 0)continue;const b=this.tempogramGroups[g].find(w=>w.centerd.center-sn);b!==void 0&&(p+=b.avg,f++)}const m=Math.round(p/f);e.has(m)||e.set(m,0),e.set(m,e.get(m)+1),e.get(m)>t&&(t=e.get(m),s=m)}),t>50))break}if(s==0)return;const n=60/s*(this.sampleRate/this.windowStep),a=new Array(Sc).fill(0).map((c,u)=>{const h=u%n/n;let d=0,f=0;for(let p=1;p<=4;p++)f+=Math.max(1-Math.abs(Math.round(h*p)/p-h)*12,0)*1/p,d+=1/p;return f/d}),o=[];for(let c=i;ca[d]*h).reduce((h,d)=>h+d,0);o.push({block:c,offset:-(c*this.windowStep/this.sampleRate)%(60/s),response:u,curve:this.noveltyCurveIsolated.slice(c,c+Sc).map((h,d)=>a[d]*h)})}o.sort((c,u)=>u.response-c.response);const l=o.slice(0,5).reduce((c,u)=>c+u.response,0);this.offsetTableLabel.innerText=`Offsets (first BPM: ${s})`;for(let c=0;c{if(!i)return null;let n=this.app.chartManager.loadedChart.getBeatFromSeconds(s*this.windowStep/this.sampleRate);return n=Math.round(n*48)/48,n<0?null:{type:"Tap",beat:n,col:0}}).filter(i=>i!==null).filter(i=>e?i.beat>this.app.chartManager.startRegion&&i.beate&&(e=this.noveltyCurveIsolated[a]);const t=new Float32Array(this.noveltyCurveIsolated.length);for(let a=0;a{const o=new Float32Array(this.tempoFftSize);o.set(t.subarray(Math.max(0,a*this.tempoStep-this.tempoFftSize/2),a*this.tempoStep+this.tempoFftSize/2),-Math.min(0,a*this.tempoStep-this.tempoFftSize/2));for(let c=0;cn(++a),1)):(this.calculateOffset(),this.spectrogram=[],this.noveltyCurve=[],this.tempogram=[],this.monoAudioData=void 0,this.toggleButton.innerText="Finished analyzing",this.resetButton.disabled=!1,this.doAnalysis=!1,this.toggleButton.style.background="var(--accent-color)")};n(0)}storeTempogram(e,t){const i=new Map,s=[];t.forEach((a,o)=>{let l=this.sampleRate*60/(this.windowStep*this.tempoFftSize)*o;if(!(l>oa*4||loa&&l!=1/0;)l/=2;for(;l({bpm:a,value:o})).sort((a,o)=>o.value-a.value).filter(a=>a.value!=0);for(let a=0;ac.centero.bpm-sn);if(l===void 0){s.push({center:o.bpm,groups:[o]});continue}l.groups.push(o)}this.tempogramGroups[e]=s.map(a=>({...a,avg:a.groups.reduce((o,l)=>o+l.bpm*l.value,0)/a.groups.reduce((o,l)=>o+l.value,0)}));const n=this.spectrogramCanvases[Math.floor(e*this.tempoStep/ai)].getContext("2d");n.fillStyle="white",this.tempogram[e].forEach(a=>{const o=Oe(a.value*8e3,0,255);n.globalAlpha=o/255,n.fillRect(e*this.tempoStep%ai,$t(nt*2,nt*1.5,Vt(aa,oa,a.bpm)),1*this.tempoStep,nt*.5/(oa-aa))})}}class yy extends HTMLDivElement{colorElement;set color(e){this.colorElement.style.background=e.toHexa()}}function kc(){const r=document.createElement("div");r.classList.add("color-picker-transparent"),Object.setPrototypeOf(r,yy.prototype);const e=document.createElement("div");return e.style.width="100%",e.style.height="100%",r.colorElement=e,r.appendChild(e),r}class vn extends HTMLDivElement{inputs;opts;getValue;onupdate;static create(e){const t=document.createElement("div");Object.setPrototypeOf(t,vn.prototype),t.opts=e.inputs,t.inputs={},t.getValue=e.getValue.bind(t),t.onupdate=e.onupdate,t.classList.add("color-format");const i=document.createElement("div");i.classList.add("color-format-label"),i.innerText=e.label;const s=document.createElement("div");return s.classList.add("color-format-inputs"),Object.entries(e.inputs).forEach(([n,a])=>{const o=document.createElement("input");o.type="text";let l="";o.onfocus=()=>{l=o.value},o.onkeydown=c=>{c.key=="Enter"&&(o.blur(),c.preventDefault()),c.key=="Escape"&&(o.value=l,o.blur(),c.stopImmediatePropagation())},o.oninput=()=>{a.isValid(o.value)!==null&&t.onupdate?.(t.getValue())},o.onblur=()=>{const c=a.isValid(o.value);c===null?o.value=l:o.value=c,t.onupdate?.(t.getValue())},t.inputs[n]=o,s.appendChild(o)}),t.replaceChildren(i,s),t}setValue(e){Object.entries(this.inputs).forEach(([t,i])=>{document.activeElement!=i&&(i.value=this.opts[t].setValue(e))})}}const oi=(r,e,t)=>i=>{t!==void 0&&i.endsWith(t)&&(i=i.slice(0,i.length-t.length));let s;try{s=parseInt(i)}catch{return null}return Oe(s,r,e)+""},li=(r,e,t,i)=>{let s;i!==void 0&&r.endsWith(i)&&(r=r.slice(0,r.length-i.length));try{s=parseInt(r)}catch{return e}return Oe(s,e,t)};class gh extends yy{_value;_hue=0;_sat=0;_val=0;_alp=1;popup;matrix;matrixDot;matrixDragging=!1;hueDragging=!1;hueThumb;alphaDragging=!1;alphaBg;alphaThumb;previewNew;formats=[];onColorChange;static create(e){const t=kc();return Object.setPrototypeOf(t,gh.prototype),t.value=$a(e.value),t.classList.add("color-picker"),t.formats=[],e.height!==void 0&&(t.style.height=e.height+"px"),e.width!==void 0&&(t.style.width=e.width+"px"),t.addEventListener("click",()=>{t.createPopup()}),t}updatePreview(){this.color=this._value}get value(){return this._value}set value(e){this._value=e;const t=Xo(this._value);this._hue=t[0],this._sat=t[1],this._val=t[2],this._alp=t[3],this.updatePreview(),this.updatePopup()}get hue(){return this._hue}set hue(e){this._hue=e,this.updateColor()}get sat(){return this._sat}set sat(e){this._sat=e,this.updateColor()}get val(){return this._val}set val(e){this._val=e,this.updateColor()}get alpha(){return this._alp}set alpha(e){this._alp=e,this.updateColor()}updateColor(){this._value=new P({h:this._hue*360,s:this._sat*100,v:this._val*100,a:this._alp}),this.updatePreview(),this.updatePopup()}createPopup(){if(this.popup){this.closePopup();return}const e=document.createElement("div");e.classList.add("color-picker-popup");const t=document.createElement("div");t.classList.add("color-picker-area");const[i,s]=this.createMatrix();this.matrix=i,this.matrixDot=s,s.style.background="#f00";const[n,a]=this.createSlider({ondrag:()=>this.hueDragging=!0,offdrag:()=>this.hueDragging=!1,change:E=>{this.hue=E,this.onColorChange?.(this._value)}});this.hueThumb=a,n.style.background="linear-gradient(to right, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 66%, #f0f 83%, red 100%)";const[o,l]=this.createSlider({ondrag:()=>this.alphaDragging=!0,offdrag:()=>this.alphaDragging=!1,change:E=>{this.alpha=E,this.onColorChange?.(this._value)}});this.alphaThumb=l,o.classList.add("color-picker-transparent");const c=document.createElement("div");c.classList.add("color-slider"),o.appendChild(c),this.alphaBg=c,t.replaceChildren(i,n,o);const u=document.createElement("div");u.classList.add("color-picker-area");const h=vn.create({label:"HEX",inputs:{hex:{setValue:E=>E.alpha!=1?E.toHexa():E.toHex(),isValid:E=>{const C=/#?([0-9a-fA-F]+)/.exec(E);return C&&[3,4,6,8].includes(C[1].length)?(E[0]!="#"&&(E="#"+E),E):null}}},getValue(){let E=this.inputs.hex.value;return E[0]!="#"&&(E="#"+E),new P(E)},onupdate:E=>{this.value=E,this.onColorChange?.(this._value)}});this.formats.push(h),u.appendChild(h);const d=vn.create({label:"RGBA",inputs:{r:{setValue:E=>Math.round(E.red*255).toString(),isValid:oi(0,255)},g:{setValue:E=>Math.round(E.green*255).toString(),isValid:oi(0,255)},b:{setValue:E=>Math.round(E.blue*255).toString(),isValid:oi(0,255)},a:{setValue:E=>Math.round(E.alpha*100)+"%",isValid:oi(0,100,"%")}},getValue(){return new P({r:li(this.inputs.r.value,0,255),g:li(this.inputs.g.value,0,255),b:li(this.inputs.b.value,0,255),a:li(this.inputs.a.value,0,100,"%")/100})},onupdate:E=>{this.value=E,this.onColorChange?.(this._value)}});this.formats.push(d),u.appendChild(d);const f=vn.create({label:"HSVA",inputs:{h:{setValue:E=>Math.round(Xo(E)[0]*360)+"º",isValid:oi(0,360,"º")},s:{setValue:E=>Math.round(Xo(E)[1]*100)+"%",isValid:oi(0,100,"%")},v:{setValue:E=>Math.round(Xo(E)[2]*100)+"%",isValid:oi(0,100,"%")},a:{setValue:E=>Math.round(E.alpha*100)+"%",isValid:oi(0,100,"%")}},getValue(){return new P({h:li(this.inputs.h.value,0,360,"º"),s:li(this.inputs.s.value,0,100,"%"),v:li(this.inputs.v.value,0,100,"%"),a:li(this.inputs.a.value,0,100,"%")/100})},onupdate:E=>{this.value=E,this.onColorChange?.(this._value)}});this.formats.push(f),u.appendChild(f);const p=vn.create({label:"HSLA",inputs:{h:{setValue:E=>Math.round(Ec(E)[0]*360)+"º",isValid:oi(0,360,"º")},s:{setValue:E=>Math.round(Ec(E)[1]*100)+"%",isValid:oi(0,100,"%")},l:{setValue:E=>Math.round(Ec(E)[2]*100)+"%",isValid:oi(0,100,"%")},a:{setValue:E=>Math.round(E.alpha*100)+"%",isValid:oi(0,100,"%")}},getValue(){return new P({h:li(this.inputs.h.value,0,360,"º"),s:li(this.inputs.s.value,0,100,"%"),l:li(this.inputs.l.value,0,100,"%"),a:li(this.inputs.a.value,0,100,"%")/100})},onupdate:E=>{this.value=E,this.onColorChange?.(this._value)}});this.formats.push(p),u.appendChild(p);const m=document.createElement("div");m.classList.add("color-picker-preview");const g=kc(),b=kc();b.color=this._value,g.color=this._value,m.replaceChildren(g,b),this.previewNew=g,u.appendChild(m),e.replaceChildren(t,u),this.popup=e,this.updatePopup();const w=this._value,v=E=>{E.key=="Escape"&&(E.stopImmediatePropagation(),window.removeEventListener("keydown",v),window.removeEventListener("mousedown",y),this.closePopup(),this.value=w,this.onColorChange?.(this._value))},y=E=>{e.contains(E.target)||(window.removeEventListener("keydown",v),window.removeEventListener("mousedown",y),this.closePopup())};window.addEventListener("keydown",v),window.addEventListener("mousedown",y),document.getElementById("popups").appendChild(e),setTimeout(()=>this.movePosition())}updatePopup(){if(!this.popup)return;this.matrix.style.backgroundColor=`hsl(${this._hue*360} 100% 50%)`,this.matrixDot.style.backgroundColor=this._value.toHex(),this.matrixDragging||(this.matrixDot.style.left=this._sat*200+"px",this.matrixDot.style.top=(1-this._val)*200+"px"),this.hueDragging||(this.hueThumb.style.left=this._hue*200+"px");const e=`rgba(${this._value.red*255}, ${this._value.green*255}, ${this._value.blue*255}`;this.alphaBg.style.background=`linear-gradient(to right, ${e}, 0 ), ${e}, 1))`,this.alphaDragging||(this.alphaThumb.style.left=this._alp*200+"px"),this.formats.forEach(t=>t.setValue(this._value)),this.previewNew.color=this._value}closePopup(){const e=this.popup;this.popup=void 0,e&&(e.classList.add("exiting"),setTimeout(()=>{e.remove()},500))}createMatrix(){const e=document.createElement("div");e.classList.add("color-matrix"),e.style.backgroundColor="#ff0000";const t=document.createElement("div");t.classList.add("color-matrix-x");const i=document.createElement("div");i.classList.add("color-matrix-y");const s=document.createElement("div");s.classList.add("color-matrix-dot"),e.appendChild(s),e.replaceChildren(t,i,s),e.onmousedown=o=>{window.addEventListener("mousemove",n),window.addEventListener("mouseup",a),n(o),this.matrixDragging=!0};const n=o=>{const l=e.getBoundingClientRect(),c=Oe((o.clientX-l.left)/l.width,0,1),u=Oe((o.clientY-l.top)/l.height,0,1);s.style.left=c*l.width+"px",s.style.top=u*l.height+"px",this._sat=c,this.val=1-u,this.onColorChange?.(this._value)},a=()=>{window.removeEventListener("mousemove",n),window.removeEventListener("mouseup",a),this.matrixDragging=!1};return[e,s]}createSlider(e){const t=document.createElement("div");t.classList.add("color-slider");const i=document.createElement("div");i.classList.add("color-slider-thumb"),t.appendChild(i),t.onmousedown=a=>{window.addEventListener("mousemove",s),window.addEventListener("mouseup",n),s(a),e.ondrag?.(),this.onColorChange?.(this._value)};const s=a=>{const o=t.getBoundingClientRect(),l=Oe((a.clientX-o.left)/o.width,0,1);i.style.left=l*o.width+"px",e.change(l)},n=()=>{window.removeEventListener("mousemove",s),window.removeEventListener("mouseup",n),e.offdrag?.()};return[t,i]}movePosition(){const e=this.getBoundingClientRect(),t=e.left+e.width/2-this.popup.clientWidth/2,i=e.top+e.height+10,s=15,n=window.innerWidth-this.popup.clientWidth-15;this.popup.style.left=`${Oe(t,s,n)}px`,this.popup.style.top=`${i}px`,i+this.popup.clientHeight>window.innerHeight-15&&(this.popup.style.transformOrigin="bottom center",this.popup.style.top=`${e.top-this.popup.clientHeight-10}px`)}isActive(){return this.popup!==void 0}}class $u extends Tt{app;grid;actions={};constructor(e){super({title:"Themes",width:600,height:400,disableClose:!1,win_id:"theme-selection",blocking:!1}),this.app=e,this.initView(),this.loadGrid()}initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("pref-search");const i=document.createElement("input");i.classList.add("pref-search-bar"),i.type="text",i.placeholder="Search for a theme...",i.oninput=()=>{this.filterGrid(i.value)},t.appendChild(i);const s=document.createElement("div");s.classList.add("theme-grid"),this.grid=s;const n=this.createOptionTray();e.replaceChildren(t,s,n),this.viewElement.appendChild(e)}createOptionTray(){const e=document.createElement("div");e.classList.add("theme-tray");const t=document.createElement("button");t.appendChild(Ce.getIcon("PLUS",16)),t.appendChild(document.createTextNode("New")),t.onclick=()=>{const l=this.getNonConflictingName("new-theme");$e.createUserTheme(l),$e.loadTheme(l),this.loadGrid()},this.actions.add=t,e.appendChild(t);const i=document.createElement("button");i.appendChild(Ce.getIcon("COPY",16)),i.appendChild(document.createTextNode("Duplicate")),i.onclick=()=>{const l=this.getNonConflictingName(x.general.theme);$e.createUserTheme(l,$e.getCurrentTheme()),$e.loadTheme(l),this.loadGrid()},i.disabled=!0,this.actions.copy=i,e.appendChild(i);const s=document.createElement("button");s.classList.add("confirm"),s.appendChild(Ce.getIcon("EDIT",16)),s.appendChild(document.createTextNode("Edit")),s.onclick=()=>{this.closeWindow(),this.app.windowManager.openWindow(new ja(this.app))},s.disabled=!0,this.actions.edit=s,e.appendChild(s);const n=document.createElement("button");n.classList.add("delete"),n.appendChild(Ce.getIcon("TRASH",16)),n.appendChild(document.createTextNode("Delete")),n.onclick=()=>{this.app.windowManager.openWindow(new Wa(this.app,"Delete theme","Are you sure you want to delete this theme?",[{type:"default",label:"Cancel"},{type:"delete",label:"Delete",callback:()=>{$e.deleteUserTheme(x.general.theme),this.loadGrid()}}]))},n.disabled=!0,this.actions.del=n,e.appendChild(n);const a=document.createElement("button");a.appendChild(Ce.getIcon("UPLOAD",16)),a.appendChild(document.createTextNode("Import")),a.onclick=async()=>{(await ey({_preferPolyfill:!1,excludeAcceptAllOption:!1,multiple:!0,accepts:[{extensions:["txt"]}]})).forEach(c=>{c.getFile().then(u=>u.text()).then(u=>{const h=$e.parseThemeText(u);let d=er(c.name,".txt");if(!h){Ee.createFormatted("Failed to load theme "+d,"error");return}d=this.getNonConflictingName(d),$e.createUserTheme(d,h),this.loadGrid()})})},this.actions.imp=a,e.appendChild(a);const o=document.createElement("button");return o.appendChild(Ce.getIcon("DOWNLOAD",16)),o.appendChild(document.createTextNode("Export")),o.onclick=()=>{const l=$e.exportCurrentTheme({spaces:!0}),c=new File([l],x.general.theme+".txt",{type:"text/plain"}),u=document.createElement("a"),h=URL.createObjectURL(c);u.href=h,u.download=c.name,document.body.appendChild(u),u.click(),document.body.removeChild(u),window.URL.revokeObjectURL(h)},this.actions.exp=o,o.disabled=!0,e.appendChild(o),e}loadGrid(){this.grid.replaceChildren();const e=$e.getThemes();if(e)for(const[t,i]of Object.entries(e)){let s=t;const n=Cs[t]!==void 0,a=document.createElement("div"),o=document.createElement("div");if(o.classList.add("inlineEdit"),n)o.style.fontWeight="bold";else{o.contentEditable="true";let c=t;o.onfocus=()=>{c=o.innerText},o.onkeydown=u=>{u.key=="Enter"&&(o.blur(),u.preventDefault()),u.key=="Escape"&&(o.innerText=c,o.blur(),u.stopImmediatePropagation())},o.onblur=()=>{if(o.innerText==c)return;const u=this.getNonConflictingName(o.innerText);$e.renameUserTheme(c,u),$e.loadTheme(u),o.innerText=u,s=u,a.dataset.id=u}}const l=document.createElement("div");l.classList.add("theme-preview-grid");for(const c of K3){const u=document.createElement("div");u.style.backgroundColor=i[c].toHex(),l.appendChild(u)}o.innerText=t,a.classList.add("theme-cell"),o.classList.add("theme-title"),a.replaceChildren(o,l),this.grid.appendChild(a),t==x.general.theme&&(a.classList.add("selected"),setTimeout(()=>{a.scrollIntoView({behavior:x.general.smoothAnimations?"smooth":"instant",block:"center"})}),this.actions.edit.disabled=n,this.actions.del.disabled=n,this.actions.copy.disabled=!1,this.actions.exp.disabled=!1),a.dataset.id=t,a.onclick=()=>{x.general.theme!=s&&($e.loadTheme(s),this.removeAllSelections(),a.classList.add("selected"),this.actions.edit.disabled=n,this.actions.del.disabled=n,this.actions.copy.disabled=!1,this.actions.exp.disabled=!1)}}}removeAllSelections(){[...this.grid.querySelectorAll(".selected")].forEach(e=>e.classList.remove("selected"))}filterGrid(e){[...this.grid.children].forEach(t=>{if(!(t instanceof HTMLDivElement))return;const i=t,s=this.containsQuery(e,i.dataset.id);i.style.display=s?"":"none"})}containsQuery(e,t){return t?t.toLowerCase().includes(e.trim().toLowerCase()):!1}getNonConflictingName(e){const t=$e.getThemes();if(t[e]==null)return e;let i=2;const s=/([^]+)-(\d+)$/.exec(e);s&&(e=s[1],i=parseInt(s[2]));let n=`${e}-${i}`;for(;t[n]!==void 0;)n=`${e}-${i}`,i++;return n}}class ja extends Tt{app;pickers={};handlers=[];linkBlacklist=new Set;static isOpen=!1;constructor(e){super({title:"Theme Color Editor",width:500,height:400,win_id:"theme-editor",disableClose:!0}),this.app=e,this.initView(),ja.isOpen=!0}initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("theme-color-grid"),Z3.forEach(l=>{t.appendChild(this.createGroup(l))});const i=document.createElement("div");i.classList.add("menu-options");const s=document.createElement("div");s.classList.add("menu-left");const n=document.createElement("div");n.classList.add("menu-right"),i.appendChild(s),i.appendChild(n);const a=document.createElement("button");a.innerText="Cancel",a.onclick=()=>{this.closeWindow(),$e.loadTheme(x.general.theme),this.app.windowManager.openWindow(new $u(this.app))},s.appendChild(a);const o=document.createElement("button");o.innerText="Save",o.classList.add("confirm"),o.onclick=()=>{$e.setUserTheme(x.general.theme,$e.getCurrentTheme()),$e.loadTheme(x.general.theme),this.app.windowManager.openWindow(new $u(this.app)),this.closeWindow()},n.appendChild(o),e.replaceChildren(t,i),this.viewElement.appendChild(e)}createGroup(e){const t=document.createElement("div");t.classList.add("theme-group");const i=document.createElement("div");i.classList.add("theme-group-label"),i.innerText=e.name;const s=document.createElement("div");return s.classList.add("theme-picker-grid"),e.ids.forEach(n=>{s.appendChild(this.createPicker(n))}),t.replaceChildren(i,s),t}createPicker(e){const t=()=>{const u=new P($e.getCurrentTheme()[e.id]);o.innerText=u.toHex()+" | "+Math.round(u.alpha*100)+"%",!l.isActive()&&(l.value=u)},i=u=>{const h=$e.getCurrentTheme();h[e.id]=u,$e._applyTheme(this.updateLinks(e.id,h))},s=document.createElement("div");s.classList.add("theme-color-cell"),Lm[e.id]!=""&&Ze(s,{content:Lm[e.id]});const n=_c[e.id];n&&(s.onmouseover=()=>{Object.keys(n).forEach(u=>{this.linkBlacklist.has(u)||this.pickers[u].classList.add("linked")})},s.onmouseout=()=>{Object.keys(n).forEach(u=>{this.pickers[u].classList.remove("linked")})});const a=document.createElement("div");a.innerText=e.label;const o=document.createElement("div");o.classList.add("theme-color-detail");const l=gh.create({value:"white",width:30,height:30});l.onColorChange=i,s.replaceChildren(a,o,l);const c=this.getLink(e.id);if(c!==null){const u=document.createElement("div");u.classList.add("ico-checkbox");const h=Ce.getIcon("LINK",16),d=Ce.getIcon("LINK_BROKEN",16);let f=!0;const p=()=>{f?this.linkBlacklist.delete(e.id):this.linkBlacklist.add(e.id),h.style.display=f?"":"none",d.style.display=f?"none":""};u.onclick=()=>{f=!f,p()},Ze(u,{onShow(g){g.setContent(f?`Linked to ${c}`:"Unlinked")}}),Ze(u,{trigger:"click",onShow(g){g.setContent(f?`Linked to ${c}`:"Unlinked")}}),p(),u.replaceChildren(h,d),s.appendChild(u);const m=g=>{f&&(f=!1,p()),i(g)};l.onColorChange=m}return t(),H.on("themeChanged",t),this.handlers.push(t),this.pickers[e.id]=s,s}getLink(e){for(const[t,i]of Object.entries(_c))if(e in i)return t;return null}average(e){return(e.red+e.green+e.blue)/3}lighten(e,t){return new P(Gd(new P(e).toNumber(),1+t/100))}add(e,t){return new P(J3(new P(e).toNumber(),t))}updateLinks(e,t){const i=new Set,s=[e];for(;s.length!=0;){const n=s.shift(),a=_c[n];if(a)for(const[o,l]of Object.entries(a))this.linkBlacklist.has(o)||i.has(o)||(t[o]=l.bind(this)(t[n]),s.push(o),i.add(o))}return t}onClose(){ja.isOpen=!1}}const hi=r=>r,Wm={offset:{title:"Offset",element:hi({create:r=>{const e=ft.create(0,x.general.spinnerStep/100,3);return e.onChange=t=>{const i=r.chartManager.loadedChart.timingData;t!=null&&(i.hasChartOffset()?i.setOffset(t):i.songTimingData.setOffset(t))},e.view},update:(r,e)=>{const t=r.querySelector(".spinner-input");if(document.activeElement==t)return;const i=e.getOffset();t.value!=ae(i,3).toFixed(3)&&(t.value=ae(i,3).toFixed(3))}})},bpm:{title:"BPM",element:hi({create:r=>{const e=ft.create(120,void 0,3);return e.onChange=t=>{const i=r.chartManager.loadedChart.timingData;if(t==null){const s=r.chartManager.beat;i.deleteMulti([{type:"BPMS",beat:s}]);return}i.insertMulti([{type:"BPMS",beat:r.chartManager.beat,value:t}])},e.view},update:(r,e,t)=>{const i=r.querySelector(".spinner-input");if(document.activeElement==i)return;const s=e.getEventAtBeat("BPMS",t)?.value??120;i.value!=ae(s,3).toFixed(3)&&(i.value=ae(s,3).toFixed(3))}})},stop:{title:"Stop",element:hi({create:r=>{const e=ft.create(0,void 0,3);return e.onChange=t=>{const i=r.chartManager.loadedChart.timingData;if(t==null||t==0){const s=r.chartManager.beat;i.deleteMulti([{type:"STOPS",beat:s}]);return}i.insertMulti([{type:"STOPS",beat:r.chartManager.beat,value:t}])},e.view},update:(r,e,t)=>{const i=r.querySelector(".spinner-input");if(document.activeElement==i)return;const s=e.getEventAtBeat("STOPS",t);let n=s?.value??0;t!=s?.beat&&(n=0),i.value!=ae(n,3).toFixed(3)&&(i.value=ae(n,3).toFixed(3))}})},delay:{title:"Delay",element:hi({create:r=>{const e=ft.create(0,void 0,3);return e.onChange=t=>{const i=r.chartManager.loadedChart.timingData;if(t==null||t==0){const s=r.chartManager.beat;i.deleteMulti([{type:"DELAYS",beat:s}]);return}i.insertMulti([{type:"DELAYS",beat:r.chartManager.beat,value:t}])},e.view},update:(r,e,t)=>{const i=r.querySelector(".spinner-input");if(document.activeElement==i)return;const s=e.getEventAtBeat("DELAYS",t);let n=s?.value??0;t!=s?.beat&&(n=0),i.value!=ae(n,3).toFixed(3)&&(i.value=ae(n,3).toFixed(3))}})},warp:{title:"Warp",element:hi({create:r=>{const e=ft.create(0,void 0,3,0);return e.onChange=t=>{const i=r.chartManager.loadedChart.timingData;if(t==null||t==0){const s=r.chartManager.beat;i.deleteMulti([{type:"WARPS",beat:s}]);return}t<0||i.insertMulti([{type:"WARPS",beat:r.chartManager.beat,value:t}])},e.view},update:(r,e,t)=>{const i=r.querySelector(".spinner-input");if(document.activeElement==i)return;const s=e.getEventAtBeat("WARPS",t);let n=s?.value??0;t!=s?.beat&&(n=0),i.value!=ae(n,3).toFixed(3)&&(i.value=ae(n,3).toFixed(3))}})},timeSig:{title:"Time Sig.",element:hi({create:r=>{const e=document.createElement("div");e.classList.add("flex-column-gap");const t=ft.create(4,1,0,1);t.onChange=s=>{const n=r.chartManager.loadedChart.timingData;if(s==null){const a=r.chartManager.beat;n.deleteMulti([{type:"TIMESIGNATURES",beat:a}]);return}s<1||n.insertMulti([{type:"TIMESIGNATURES",beat:r.chartManager.beat,upper:s,lower:i.value}])};const i=ft.create(4,1,0,1);return i.onChange=s=>{const n=r.chartManager.loadedChart.timingData;if(s==null){const a=r.chartManager.beat;n.deleteMulti([{type:"TIMESIGNATURES",beat:a}]);return}s<1||n.insertMulti([{type:"TIMESIGNATURES",beat:r.chartManager.beat,upper:t.value,lower:s}])},e.appendChild(t.view),e.appendChild(i.view),e},update:(r,e,t)=>{const i=r.firstElementChild.querySelector(".spinner-input"),s=r.lastElementChild.querySelector(".spinner-input"),n=e.getEventAtBeat("TIMESIGNATURES",t),a=n?.upper??4,o=n?.lower??4;document.activeElement!=i&&i.value!=Math.round(a).toString()&&(i.value=Math.round(a).toString()),document.activeElement!=s&&s.value!=Math.round(o).toString()&&(s.value=Math.round(o).toString())}})},tick:{title:"Tickcount",element:hi({create:r=>{const e=ft.create(4,1,0,0);return e.onChange=t=>{const i=r.chartManager.loadedChart.timingData;if(t==null){const s=r.chartManager.beat;i.deleteMulti([{type:"TICKCOUNTS",beat:s}]);return}t<0||i.insertMulti([{type:"TICKCOUNTS",beat:r.chartManager.beat,value:t}])},e.view},update:(r,e,t)=>{const i=r.querySelector(".spinner-input");if(document.activeElement==i)return;const s=e.getEventAtBeat("TICKCOUNTS",t)?.value??4;i.value!=Math.round(s).toString()&&(i.value=Math.round(s).toString())}})},combo:{title:"Combo",element:hi({create:r=>{const e=document.createElement("div");e.classList.add("flex-column-gap");const t=ft.create(1,1,0,0);t.onChange=s=>{const n=r.chartManager.loadedChart.timingData;if(s==null){const a=r.chartManager.beat;n.deleteMulti([{type:"COMBOS",beat:a}]);return}s<0||n.insertMulti([{type:"COMBOS",beat:r.chartManager.beat,hitMult:s,missMult:i.value}])};const i=ft.create(1,1,0,0);return i.onChange=s=>{const n=r.chartManager.loadedChart.timingData;if(s==null){const a=r.chartManager.beat;i.setValue(r.chartManager.loadedChart?.timingData.getEventAtBeat("COMBOS",a)?.missMult??1);return}s<0||n.insertMulti([{type:"COMBOS",beat:r.chartManager.beat,hitMult:t.value,missMult:s}])},e.appendChild(t.view),e.appendChild(i.view),e},update:(r,e,t)=>{const i=r.firstElementChild.querySelector(".spinner-input"),s=r.lastElementChild.querySelector(".spinner-input"),n=e.getEventAtBeat("COMBOS",t),a=n?.hitMult??1,o=n?.missMult??1;document.activeElement!=i&&i.value!=Math.round(a).toString()&&(i.value=Math.round(a).toString()),document.activeElement!=s&&s.value!=Math.round(o).toString()&&(s.value=Math.round(o).toString())}})},speed:{title:"Speed",element:hi({create:r=>{const e=document.createElement("div");e.classList.add("flex-column-gap");const t=()=>{r.chartManager.loadedChart.timingData.insertMulti([{type:"SPEEDS",beat:r.chartManager.beat,value:i.value,delay:s.value,unit:n.value=="Beats"?"B":"T"}])},i=ft.create(1,.1,0);i.onChange=a=>{const o=r.chartManager.loadedChart.timingData;if(a==null){const l=r.chartManager.beat;o.deleteMulti([{type:"SPEEDS",beat:l}]);return}t()};const s=ft.create(1,.1,0);s.onChange=a=>{a==null||a<0||t()};const n=Oi.create(["Beat","Time"],"Beats");return n.onChange=t,e.appendChild(i.view),e.appendChild(s.view),e.appendChild(n.view),e},update:(r,e,t)=>{const i=r.firstElementChild.querySelector(".spinner-input"),s=r.children[1].querySelector(".spinner-input"),n=e.getEventAtBeat("SPEEDS",t),a=n?.value??1,o=n?.delay??0,l=n?.unit=="B"?"Beat":"Time";document.activeElement!=i&&i.value!=ae(a,3).toFixed(3)&&(i.value=ae(a,3).toFixed(3)),document.activeElement!=s&&s.value!=ae(o,3).toFixed(3)&&(s.value=ae(o,3).toFixed(3)),s.disabled=n?.beat!=t;const c=r.lastElementChild.querySelector(".dropdown-selected-text");c.innerText!=l&&(c.innerText=l),n?.beat!=t?c.classList.add("disabled"):c.classList.remove("disabled")}})},scroll:{title:"Scroll",element:hi({create:r=>{const e=ft.create(1,void 0,3);return e.onChange=t=>{const i=r.chartManager.loadedChart.timingData;if(t==null){const s=r.chartManager.beat;i.deleteMulti([{type:"SCROLLS",beat:s}]);return}i.insertMulti([{type:"SCROLLS",beat:r.chartManager.beat,value:t}])},e.view},update:(r,e,t)=>{const i=r.querySelector(".spinner-input");if(document.activeElement==i)return;const s=e.getEventAtBeat("SCROLLS",t)?.value??1;i.value!=ae(s,3).toFixed(3)&&(i.value=ae(s,3).toFixed(3))}})},fake:{title:"Fake",element:hi({create:r=>{const e=ft.create(1,void 0,3,0);return e.onChange=t=>{const i=r.chartManager.loadedChart.timingData;if(t==null){const s=r.chartManager.beat;i.deleteMulti([{type:"FAKES",beat:s}]);return}t<0||i.insertMulti([{type:"FAKES",beat:r.chartManager.beat,value:t}])},e.view},update:(r,e,t)=>{const i=r.querySelector(".spinner-input");if(document.activeElement==i)return;const s=e.getEventAtBeat("FAKES",t);let n=s?.value??1;t!=s?.beat&&(n=0),i.value!=ae(n,3).toFixed(3)&&(i.value=ae(n,3).toFixed(3))}})},label:{title:"Label",element:hi({create:r=>{const e=document.createElement("input");return e.type="text",e.autocomplete="off",e.spellcheck=!1,e.onkeydown=t=>{t.key=="Enter"&&e.blur()},e.onblur=()=>{const t=r.chartManager.loadedChart.timingData;if(e.value==""){const i=r.chartManager.beat;t.deleteMulti([{type:"LABELS",beat:i}]);return}t.insertMulti([{type:"LABELS",beat:r.chartManager.beat,value:e.value}])},e},update:(r,e,t)=>{const i=r;if(document.activeElement==i)return;const n=e.getEventAtBeat("LABELS",t)?.value??"";i.value!=n&&(i.value=n)}})}};class xk extends Tt{app;lastBeat;interval;changeHandler=()=>this.setData();constructor(e){super({title:"Edit Timing Data",width:300,height:340,disableClose:!1,win_id:"timing_data",blocking:!1}),this.app=e,this.lastBeat=Math.round(this.app.chartManager.beat*1e3)/1e3,this.initView(),this.interval=setInterval(()=>{Math.round(this.app.chartManager.beat*1e3)/1e3!=this.lastBeat&&(this.lastBeat=Math.round(this.app.chartManager.beat*1e3)/1e3,this.setData())},17),H.on("timingModified",this.changeHandler),H.on("chartLoaded",this.changeHandler)}onClose(){H.off("timingModified",this.changeHandler),clearInterval(this.interval)}initView(){this.viewElement.replaceChildren(),this.viewElement.classList.add("timing-data");const e=document.createElement("div");e.classList.add("padding"),Object.values(Wm).forEach(t=>{const i=document.createElement("div");i.classList.add("label"),i.innerText=t.title;const s=t.element.create(this.app);e.appendChild(i),e.appendChild(s)}),this.viewElement.appendChild(e),this.setData()}setData(){this.app.chartManager.loadedChart&&Object.values(Wm).forEach((e,t)=>{const i=this.viewElement.children[0].children[t*2+1];e.element.update(i,this.app.chartManager.loadedChart.timingData,this.lastBeat)})}}const $m=[{type:"group",id:"app",label:"App",disable:()=>window.nw===void 0,children:[{type:"subgroup",children:[{type:"item",label:"Window Width",id:"app.width",input:{type:"number",step:50,min:300,onChange:(r,e)=>{const t=nw.Window.get();t.isFullscreen||(t.width=e)}}},{type:"item",label:"Window Height",id:"app.height",input:{type:"number",step:50,min:300,onChange:(r,e)=>{const t=nw.Window.get();t.isFullscreen||(t.height=e)}}}]},{type:"subgroup",children:[{type:"item",label:"Fullscreen",id:"app.fullscreen",input:{type:"checkbox",onChange:(r,e)=>{const t=nw.Window.get();e?nw.Window.get().enterFullscreen():(t.hide(),nw.Window.get().leaveFullscreen(),t.show())}}}]}]},{type:"group",id:"general",label:"General",children:[{type:"subgroup",children:[{type:"item",label:"Smooth Animations",id:"general.smoothAnimations",input:{type:"checkbox",onChange:(r,e)=>{e?document.body.classList.add("animated"):document.body.classList.remove("animated")}}},{type:"item",label:"Autosave interval",id:"general.autosaveInterval",input:{type:"slider",min:30,step:5,max:600,hardMin:15,hardMax:2**31-1},tooltip:"Interval in seconds between autosaves"},{type:"item",label:"Warn before exit",id:"general.warnBeforeExit",input:{type:"checkbox"},tooltip:"Warn before exiting the editor if you have unsaved changes."},{type:"item",label:"Spinner step",id:"general.spinnerStep",input:{type:"slider",min:0,step:.1,max:5,hardMin:0,hardMax:2**31-1},tooltip:"The default increment for all number spinners."}]}]},{type:"group",id:"chart",label:"Chart",children:[{type:"subgroup",label:"Playfield",children:[{type:"subgroup",children:[{type:"item",label:"Enable mouse placement",id:"chart.mousePlacement",input:{type:"checkbox"}},{type:"item",label:"Directional hold placement behavior",id:"chart.defaultHoldPlacement",input:{type:"checkbox"},tooltip:"Changes the hold placement behavior. By default, holds can only be extended in one direction when placed. Turn this off to mimic the behavior of AV/Stepmania."}]},{type:"subgroup",children:[{type:"item",label:"Zoom",id:"chart.zoom",input:{type:"slider",min:50,step:1,max:200,hardMax:2**31-1,transformers:{serialize:r=>r*100,deserialize:r=>r/100}}},{type:"item",label:"Reverse playfield",id:"chart.reverse",input:{type:"checkbox"}}]},{type:"subgroup",children:[{type:"item",label:"Allow receptor dragging",id:"chart.allowReceptorDrag",input:{type:"checkbox"},tooltip:"Allows the receptors to be dragged to move the playfield."},{type:"item",label:"X position",id:"chart.receptorXPos",input:{type:"slider",min:-400,max:400,hardMin:-(2**31-1),hardMax:2**31-1}},{type:"item",label:"Y position",id:"chart.receptorYPos",input:{type:"slider",min:-400,max:0,hardMin:-(2**31-1),hardMax:2**31-1}}]},{type:"subgroup",children:[{type:"item",label:"Draw length",id:"chart.maxDrawBeats",input:{type:"slider",min:0,max:30,hardMax:2**31-1},tooltip:"Maximum number of beats to draw notes. Increasing this works well for songs with high bpm but can affect performance. Only applies to XMod."},{type:"item",label:"Draw length past receptors",id:"chart.maxDrawBeatsBack",input:{type:"slider",min:0,max:30,hardMax:2**31-1},tooltip:"Maximum number of beats to draw notes past the receptors. Increasing this can affect performance. Only applies to XMod."}]},{type:"subgroup",children:[{type:"item",label:"Draw noteflashes",id:"chart.drawNoteFlash",input:{type:"checkbox"}},{type:"item",label:"Draw note icons",id:"chart.drawIcons",input:{type:"checkbox"},tooltip:"Draw indicators above notes that some noteskins may not differentiate, like Fakes and Lifts."}]}]},{type:"subgroup",label:"Scrolling",children:[{type:"item",label:"Scroll sensitivity",id:"chart.scroll.scrollSensitivity",input:{type:"slider",min:0,step:1,max:200,hardMax:2**31-1,transformers:{serialize:r=>r*100,deserialize:r=>r/100}},tooltip:"Adjust the scroll sensitivity when scrolling through the chart."},{type:"item",label:"Snap every scroll",id:"chart.scroll.scrollSnapEveryScroll",input:{type:"checkbox"},tooltip:"Whether each scroll movement corresponds to moving one snap unit when scrolling. Turning this on will have the same behavior as ArrowVortex. Recommended on for those using a mouse, off for those using trackpad."},{type:"item",label:"Invert zoom in/out",id:"chart.scroll.invertZoomScroll",input:{type:"checkbox"},tooltip:"Inverts the zoom in/out control when scrolling."},{type:"item",label:"Invert scroll direction when in reverse",id:"chart.scroll.invertReverseScroll",input:{type:"checkbox"}}]},{type:"subgroup",label:"Waveform",children:[{type:"item",label:"Draw waveform",id:"chart.waveform.enabled",input:{type:"checkbox"}},{type:"subgroup",children:[{type:"item",label:"Color",id:"chart.waveform.color",input:{type:"color"}}]},{type:"subgroup",children:[{type:"item",label:"Draw filtered waveform",id:"chart.waveform.allowFilter",input:{type:"checkbox"}},{type:"item",label:"Filtered color",id:"chart.waveform.filteredColor",input:{type:"color"}}]},{type:"item",label:"Line height",id:"chart.waveform.lineHeight",input:{type:"slider",min:1,max:3,step:.1,hardMax:100},tooltip:"The height of each line of the waveform. Increasing this can help performance."},{type:"item",label:"Antialiasing",id:"chart.waveform.antialiasing",input:{type:"checkbox"}},{type:"item",label:"Allow speed changes",id:"chart.waveform.speedChanges",input:{type:"checkbox"},tooltip:"Allows the waveform to be affected by SPEEDS and SCROLLS."}]},{type:"subgroup",label:"Note Layout",children:[{type:"item",label:"Show Note Layout",id:"chart.noteLayout.enabled",input:{type:"checkbox"}}]},{type:"subgroup",label:"NPS Graph",children:[{type:"item",label:"Show NPS Graph",id:"chart.npsGraph.enabled",input:{type:"checkbox"}},{type:"subgroup",children:[{type:"item",label:"Start Color",id:"chart.npsGraph.color1",input:{type:"color"}},{type:"item",label:"End Color",id:"chart.npsGraph.color2",input:{type:"color"}}]}]}]},{type:"group",id:"audio",label:"Audio",children:[{type:"subgroup",children:[{type:"item",label:"Master volume",id:"audio.masterVolume",input:{type:"slider",min:0,step:1,max:100,hardMax:2**31-1,transformers:{serialize:r=>r*100,deserialize:r=>r/100}}},{type:"item",label:"Song volume",id:"audio.songVolume",input:{type:"slider",min:0,step:1,max:100,hardMax:2**31-1,transformers:{serialize:r=>r*100,deserialize:r=>r/100}}},{type:"item",label:"Sound effect volume",id:"audio.soundEffectVolume",input:{type:"slider",min:0,step:1,max:100,hardMax:2**31-1,transformers:{serialize:r=>r*100,deserialize:r=>r/100}}}]},{type:"subgroup",children:[{type:"item",label:"Enable assist tick",id:"audio.assistTick",input:{type:"checkbox"},tooltip:"Plays a sound when a note passes the receptors"},{type:"item",label:"Enable metronome",id:"audio.metronome",input:{type:"checkbox"}}]},{type:"subgroup",children:[{type:"item",label:"Allow filters to affect audio",id:"audio.allowFilter",input:{type:"checkbox",onChange:r=>{r.chartManager.chartAudio.reload()}}},{type:"item",label:"Enable metronome",id:"audio.metronome",input:{type:"checkbox"}}]}]},{type:"group",id:"play",label:"Play mode",children:[{type:"subgroup",label:"Calibration",children:[{type:"item",label:"Global offset",id:"play.offset",input:{type:"slider",min:-1,step:.001,max:1,hardMin:-(2**31-1),hardMax:2**31-1},tooltip:"Offset in seconds when playing a chart. Set to positive if you are hitting early and negative if you are hitting late."},{type:"item",label:"Sound effect offset",id:"play.effectOffset",input:{type:"slider",min:-1,step:.001,max:1,hardMin:-(2**31-1),hardMax:2**31-1},tooltip:"Offset in seconds when playing sound effects like assist tick and metronome."},{type:"item",label:"Visual offset",id:"play.visualOffset",input:{type:"slider",min:-1,step:.001,max:1,hardMin:-(2**31-1),hardMax:2**31-1},tooltip:"Offset in seconds when displaying notes."}]},{type:"subgroup",children:[{type:"item",label:"Judgement tilt",id:"play.judgementTilt",input:{type:"checkbox"},tooltip:"Tilts the judgement text left if you are hitting early and right if you are hitting late."},{type:"item",label:"Hide barlines during play",id:"play.hideBarlines",input:{type:"checkbox"}}]},{type:"subgroup",label:"Timing windows",children:[{type:"item",id:"play.timingCollection",label:"Timing window collection",input:{type:"dropdown",advanced:!1,get items(){return Object.keys(rt.getCollections())}}},{type:"item",id:"play.timingWindowScale",label:"Timing window scale",input:{type:"slider",min:0,step:.001,max:2,hardMax:2**31-1},tooltip:"Scales all timing windows by the given amount."},{type:"item",id:"play.timingWindowAdd",label:"Timing window add",input:{type:"slider",min:0,step:.001,max:1,hardMax:2**31-1},tooltip:"Adds this value (in seconds) to all timing windows."}]}]},{type:"group",id:"performance",label:"Performance",children:[{type:"item",label:"Antialiasing",id:"performance.antialiasing",input:{type:"checkbox"}},{type:"item",label:"Resolution",id:"performance.resolution",input:{type:"slider",min:1,step:1,max:4,hardMin:0,hardMax:2**31-1},tooltip:"Requires a reload."}]},{type:"group",id:"debug",label:"Debug",children:[{type:"item",label:"Show FPS",id:"debug.showFPS",input:{type:"checkbox"}},{type:"item",label:"Show rendering timers",id:"debug.showTimers",input:{type:"checkbox"}},{type:"item",label:"Show scrolls/speeds debug visual",id:"debug.showScroll",input:{type:"checkbox"}},{type:"item",label:"Show noteskin errors",id:"debug.showNoteskinErrors",input:{type:"checkbox"}}]}];class _k extends Tt{app;observer;sectionContainer;constructor(e){super({title:"Options",width:600,height:400,disableClose:!1,win_id:"user_options",blocking:!1}),this.app=e,this.initView(),H.on("resize",()=>{this.move(window.innerWidth/2-this.options.width/2,window.innerHeight/2-this.options.height/2)})}initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("pref-container");const i=document.createElement("div");i.classList.add("pref-search");const s=document.createElement("input");s.classList.add("pref-search-bar"),s.type="text",s.placeholder="Search for an option...",s.oninput=()=>{a.replaceChildren(),o.replaceChildren(...this.createOptions(this.filterOptions(s.value)))},i.appendChild(s);const n=document.createElement("div");n.classList.add("pref-scrollers");const a=document.createElement("div");a.classList.add("pref-section-scroller"),this.sectionContainer=a;const o=document.createElement("div");o.classList.add("pref-option-scroller"),n.replaceChildren(a,o),this.observer=new IntersectionObserver(l=>{l.forEach(c=>{const u=c.target.dataset.id,h=a.querySelector(`.pref-section[data-id=${u}]`);h&&(c.intersectionRatio>0?h.classList.add("selected"):h.classList.remove("selected"))})},{}),t.replaceChildren(i,n),a.replaceChildren(),o.replaceChildren(...this.createOptions($m)),e.appendChild(t),this.viewElement.appendChild(e)}createOptions(e){return e.filter(t=>!t.disable?.(this.app)).map(t=>{const i=this.makeOption(t);return t.type=="group"&&(this.observer.observe(i),this.sectionContainer?.appendChild(this.createEmptyGroup(t))),i})}makeOption(e){const t=document.createElement("div");t.classList.add("pref-"+e.type),(e.type=="group"||e.type=="item")&&(t.dataset.id=e.id);const i=document.createElement("div");i.classList.add(`pref-${e.type}-label`),e.label!==void 0&&(i.innerText=e.label,t.appendChild(i));const s=Ce.getIcon("REVERT");if(e.type=="item"&&(s.style.width="12px",s.addEventListener("click",()=>{x.applyOption([e.id,x.getDefaultOption(e.id)]);const n=e.input.onChange;n?.(this.app,x.getDefaultOption(e.id)),t.replaceWith(this.makeOption(e))}),s.style.display=x.getDefaultOption(e.id)===x.getOption(e.id)?"none":"block",t.appendChild(s)),e.type=="item"){const n=x.getOption(e.id);let a;if(!e.input)return t;switch(i.innerText=e.label,e.input.type){case"checkbox":{const o=document.createElement("input"),l=e.input.onChange;o.type="checkbox",o.checked=n,o.onblur=null,o.onchange=()=>{x.applyOption([e.id,o.checked]),s.style.display=x.getDefaultOption(e.id)===x.getOption(e.id)?"none":"block",l?.(this.app,o.checked)},o.classList.add("pref-input","right"),o.onkeydown=c=>{c.key=="Enter"&&o.blur()},a=o;break}case"dropdown":{if(e.input.advanced){const o=e.input.transformers.deserialize,l=e.input.transformers.serialize,c=e.input.onChange,u=Oi.create(e.input.items,l(n));u.onChange(h=>{x.applyOption([e.id,o(h)]),s.style.display=x.getDefaultOption(e.id)===x.getOption(e.id)?"none":"block",c?.(this.app,o(h))}),u.view.classList.add("pref-input","dropdown-right"),a=u.view}else{const o=e.input.onChange,l=Oi.create(e.input.items,n);l.onChange(c=>{x.applyOption([e.id,c]),s.style.display=x.getDefaultOption(e.id)===x.getOption(e.id)?"none":"block",o?.(this.app,c)}),l.view.classList.add("pref-input","dropdown-right"),a=l.view}break}case"number":{const o=e.input.transformers?.deserialize??(h=>h),l=e.input.transformers?.serialize??(h=>h),c=e.input.onChange,u=ft.create(l(n),e.input.step,e.input.precision,e.input.min,e.input.max);u.onChange=h=>{if(!h){u.setValue(l(h));return}x.applyOption([e.id,o(h)]),s.style.display=x.getDefaultOption(e.id)===x.getOption(e.id)?"none":"block",c?.(this.app,o(h))},a=u.view;break}case"slider":{const o=e.input.transformers?.deserialize??(m=>m),l=e.input.transformers?.serialize??(m=>m),c=e.input.onChange,u=document.createElement("div");u.style.display="flex",u.style.alignItems="center";const h=document.createElement("input");h.type="range",h.min=e.input.min?.toString()??"",h.max=e.input.max?.toString()??"",h.step=e.input.step?.toString()??"1",h.value=l(n).toString();const d=document.createElement("input");d.type="text",d.value=(Math.round(l(n)*1e3)/1e3).toString();const f=e.input.min??e.input.hardMin??-Number.MAX_VALUE,p=e.input.max??e.input.hardMax??Number.MAX_VALUE;d.onblur=()=>{let m=Na(d.value);if(m===null){d.value=(Math.round(l(n)*1e3)/1e3).toString();return}m=Oe(m,f,p),d.value=ae(m,3).toString(),d.blur(),d.value==""?d.value=l(m).toString():x.applyOption([e.id,o(m)]),h.value=m.toString(),s.style.display=x.getDefaultOption(e.id)===x.getOption(e.id)?"none":"block",c?.(this.app,o(m))},h.oninput=()=>{const m=parseFloat(h.value);d.value=ae(m,3).toString(),x.applyOption([e.id,o(m)]),s.style.display=x.getDefaultOption(e.id)===x.getOption(e.id)?"none":"block"},d.style.width="50px",d.onkeydown=m=>{m.key=="Enter"&&d.blur()},u.appendChild(h),u.appendChild(d),a=u;break}case"text":{const o=e.input.onChange,l=document.createElement("input");l.type="text",l.value=n.toString(),l.onblur=()=>{x.applyOption([e.id,l.value]),s.style.display=x.getDefaultOption(e.id)===x.getOption(e.id)?"none":"block",o?.(this.app,l.value)},l.onkeydown=c=>{c.key=="Enter"&&l.blur()},a=l;break}case"color":{const o=e.input.onChange,l=gh.create({value:n});l.onColorChange=c=>{x.applyOption([e.id,c.toHexa()]),s.style.display=x.getDefaultOption(e.id)===x.getOption(e.id)?"none":"block",o?.(this.app,c)},a=l}}a.classList.add("pref-item-input"),t.appendChild(a)}else{const n=document.createElement("div");n.classList.add("pref-children"),t.appendChild(n),n.replaceChildren(...this.createOptions(e.children))}return e.type=="item"&&e.tooltip!==void 0&&Ze(t,{content:e.tooltip}),t}filterOptions(e,t=$m){const i=[];return t.forEach(s=>{if(s.label&&s.label.toLowerCase().includes(e.toLowerCase())){i.push(s);return}if(s.type=="group"||s.type=="subgroup"){const n=this.filterOptions(e,s.children);n.length!=0&&i.push({...s,children:n})}}),i}createEmptyGroup(e){const t=document.createElement("div");return t.classList.add("pref-section"),t.dataset.id=e.id,t.innerText=e.label,t.onclick=()=>{t.parentElement.parentElement.querySelector(`.pref-group[data-id=${e.id}]`).scrollIntoView()},t}onClose(){this.observer?.disconnect()}}var ya=(r=>(r.SHIFT="Shift",r.CTRL="Ctrl",r.ALT="Alt",r.META="Command",r))(ya||{});const Ii=navigator.userAgent.indexOf("Mac OS X")>-1,bt=Ii?"Command":"Ctrl",Ek={Shift:Ii?"⇧":"Shift",Ctrl:Ii?"⌃":"Ctrl",Alt:Ii?"⌥":"Alt",Command:"⌘"},jm={ArrowLeft:"Left",ArrowUp:"Up",ArrowRight:"Right",ArrowDown:"Down",BracketLeft:"[",BracketRight:"]",Semicolon:";",Quote:"'",Backslash:"\\",Slash:"/",Period:".",Comma:",",Backquote:"`",Minus:"-",Equal:"+"},vy={Home:Ii?"fn Left":"Home",End:Ii?"fn Right":"End",PageUp:Ii?"fn Up":"End",PageDown:Ii?"fn Down":"End"},Wl=["ctrlKey","altKey","shiftKey","metaKey"],dl=["Ctrl","Alt","Shift","Command"],ct={playback:{label:"Play/Pause",combos:[{key:"Space",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==K.Play||r.chartManager.getMode()==K.Record,callback:r=>r.chartManager.playPause()},decreaseSnap:{label:"Decrease snap",combos:[{key:"Left",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==K.Play||r.chartManager.getMode()==K.Record,callback:r=>r.chartManager.previousSnap()},increaseSnap:{label:"Increase snap",combos:[{key:"Right",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==K.Play||r.chartManager.getMode()==K.Record,callback:r=>r.chartManager.nextSnap()},cursorUp:{label:"Move cursor up",combos:[{key:"Up",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==K.Play||r.chartManager.getMode()==K.Record,callback:r=>{r.chartManager.snapToPreviousTick()}},cursorDown:{label:"Move cursor down",combos:[{key:"Down",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==K.Play||r.chartManager.getMode()==K.Record,callback:r=>{r.chartManager.snapToNextTick()}},increaseScrollSpeed:{label:"Increase scroll speed",combos:[{key:"Up",mods:[bt]}],disabled:r=>!r.chartManager.chartView,callback:()=>x.chart.speed=Math.max(10,x.chart.speed*Math.pow(1.01,30))},decreaseScrollSpeed:{label:"Decrease scroll speed",combos:[{key:"Down",mods:[bt]}],disabled:r=>!r.chartManager.chartView,callback:()=>x.chart.speed=Math.max(10,x.chart.speed*Math.pow(1.01,-30))},zoomIn:{label:"Zoom in",combos:[{key:"+",mods:[bt]}],disabled:r=>!r.chartManager.chartView,callback:()=>{x.chart.zoom+=.1,Ee.create("Zoom: "+Math.round(x.chart.zoom*100)+"%")}},zoomOut:{label:"Zoom out",combos:[{key:"-",mods:[bt]}],disabled:r=>!r.chartManager.chartView,callback:()=>{x.chart.zoom=Math.max(.1,x.chart.zoom-.1),Ee.create("Zoom: "+Math.round(x.chart.zoom*100)+"%")}},zoomDefault:{label:"Reset zoom",combos:[{key:"0",mods:[bt]}],disabled:r=>!r.chartManager.chartView,callback:()=>{x.chart.zoom=1,Ee.create("Zoom: "+Math.round(x.chart.zoom*100)+"%")}},newSong:{label:"New song...",bindLabel:"New song",combos:[{key:"N",mods:[bt]}],disabled:r=>!r.chartManager.loadedSM||!De.openWindows,callback:r=>{r.windowManager.openWindow(new my(r))}},openSong:{label:"Open song...",bindLabel:"Open song",combos:[{key:"O",mods:[bt]}],disabled:r=>!r.chartManager.loadedSM||!De.openWindows,callback:r=>{if(window.nw){const e=document.createElement("input");e.type="file",e.accept=".sm,.ssc",e.onchange=()=>r.chartManager.loadSM(e.value),e.click()}else r.windowManager.openWindow(new gy(r,!1))}},songProperties:{label:"Song properties...",bindLabel:"Open song properties",combos:[{key:"O",mods:["Shift"]}],disabled:r=>!r.chartManager.loadedSM||!De.openWindows,callback:r=>r.windowManager.openWindow(new fk(r))},save:{label:"Save...",bindLabel:"Save",combos:[{key:"S",mods:[bt]}],disabled:r=>!r.chartManager.loadedSM||r.chartManager.smPath.startsWith("https://")||r.chartManager.smPath.startsWith("http://"),callback:r=>r.chartManager.save()},export:{label:"Save and export current song",combos:[{key:"E",mods:[bt]}],disabled:r=>!!window.nw||!r.chartManager.loadedSM||r.chartManager.smPath.startsWith("https://")||r.chartManager.smPath.startsWith("http://"),callback:r=>{r.chartManager.save(),Le.getStandardHandler().saveDirectory(r.chartManager.smPath)}},exportNotedata:{label:"Export to notedata...",bindLabel:"Export to notedata",combos:[{key:"E",mods:[bt,"Shift"]}],disabled:r=>!r.chartManager.loadedSM||!De.openWindows,callback:r=>r.windowManager.openWindow(new ik(r,r.chartManager.selection.notes))},openChart:{label:"Chart list",bindLabel:"Open chart list",combos:[{key:"O",mods:[bt,"Shift"]}],disabled:r=>!r.chartManager.loadedSM||!De.openWindows,callback:r=>r.windowManager.openWindow(new ny(r))},timingDataRow:{label:"Edit timing data at row",combos:[{key:"T",mods:["Shift"]}],disabled:r=>!r.chartManager.chartView||!De.openWindows,callback:r=>r.windowManager.openWindow(new xk(r))},selectRegion:{label:"Select region",combos:[{key:"Tab",mods:[]}],disabled:r=>!r.chartManager.loadedChart&&r.chartManager.getMode()!=K.Edit,callback:r=>r.chartManager.selectRegion()},volumeUp:{label:"Increase master volume",combos:[{key:"Up",mods:["Alt"]}],disabled:!1,callback:()=>{x.audio.masterVolume=Math.min(x.audio.masterVolume+.05,1),Ee.create("Master volume: "+Math.round(x.audio.masterVolume*100)+"%")}},volumeDown:{label:"Decrease master volume",combos:[{key:"Down",mods:["Alt"]}],disabled:!1,callback:()=>{x.audio.masterVolume=Math.max(x.audio.masterVolume-.05,0),Ee.create("Master volume: "+Math.round(x.audio.masterVolume*100)+"%")}},songVolumeUp:{label:"Increase song volume",combos:[{key:"Up",mods:["Shift","Alt"]}],disabled:!1,callback:()=>{x.audio.songVolume=Math.min(x.audio.songVolume+.05,1),Ee.create("Song volume: "+Math.round(x.audio.songVolume*100)+"%")}},songVolumeDown:{label:"Decrease song volume",combos:[{key:"Down",mods:["Shift","Alt"]}],disabled:!1,callback:()=>{x.audio.songVolume=Math.max(x.audio.songVolume-.05,0),Ee.create("Song volume: "+Math.round(x.audio.songVolume*100)+"%")}},effectvolumeUp:{label:"Increase tick/metronome volume",combos:[{key:"Up",mods:["Shift",bt,"Alt"]}],disabled:!1,callback:()=>{x.audio.soundEffectVolume=Math.min(x.audio.soundEffectVolume+.05,1),Ee.create("Effect volume: "+Math.round(x.audio.soundEffectVolume*100)+"%")}},effectvolumeDown:{label:"Decrease tick/metronome volume",combos:[{key:"Down",mods:["Shift",bt,"Alt"]}],disabled:!1,callback:()=>{x.audio.soundEffectVolume=Math.max(x.audio.soundEffectVolume-.05,0),Ee.create("Effect Volume: "+Math.round(x.audio.soundEffectVolume*100)+"%")}},rateUp:{label:"Increase playback rate",combos:[{key:"Right",mods:["Shift"]}],disabled:r=>r.chartManager.getMode()==K.Play||r.chartManager.getMode()==K.Record,callback:()=>{x.audio.rate+=.05,Ee.create("Playback Rate: "+Math.round(x.audio.rate*100)+"%")}},rateDown:{label:"Decrease playback rate",combos:[{key:"Left",mods:["Shift"]}],disabled:r=>r.chartManager.getMode()==K.Play||r.chartManager.getMode()==K.Record,callback:()=>{x.audio.rate=Math.max(x.audio.rate-.05,.1),Ee.create("Playback Rate: "+Math.round(x.audio.rate*100)+"%")}},rateDefault:{label:"Reset playback rate",combos:[],disabled:!1,callback:()=>{x.audio.rate=1,Ee.create("Playback Rate: "+Math.round(x.audio.rate)+"%")}},previousMeasure:{label:"Previous measure",combos:[{key:"PageUp",mods:[]},{key:";",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==K.Play||r.chartManager.getMode()==K.Record,callback:r=>{const e=r.chartManager.beat,t=r.chartManager.loadedChart.timingData.getMeasureLength(e-.001);r.chartManager.snapToNearestTick(Math.max(0,e-t))}},nextMeasure:{label:"Next measure",combos:[{key:"PageDown",mods:[]},{key:"'",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==K.Play||r.chartManager.getMode()==K.Record,callback:r=>{const e=r.chartManager.beat,t=r.chartManager.loadedChart.timingData.getMeasureLength(e);r.chartManager.snapToNearestTick(Math.max(0,e+t))}},previousNote:{label:"Previous note",combos:[{key:",",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==K.Play||r.chartManager.getMode()==K.Record,callback:r=>r.chartManager.previousNote()},nextNote:{label:"Next note",combos:[{key:".",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==K.Play||r.chartManager.getMode()==K.Record,callback:r=>r.chartManager.nextNote()},jumpChartStart:{label:"Jump to first note",combos:[],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==K.Play||r.chartManager.getMode()==K.Record,callback:r=>r.chartManager.firstNote()},jumpChartEnd:{label:"Jump to last note",combos:[],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==K.Play||r.chartManager.getMode()==K.Record,callback:r=>r.chartManager.lastNote()},jumpSongStart:{label:"Jump to song start",combos:[{key:"Home",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==K.Play||r.chartManager.getMode()==K.Record,callback:r=>r.chartManager.beat=Math.max(0,r.chartManager.loadedChart.getBeatFromSeconds(0))},jumpSongEnd:{label:"Jump to song end",combos:[{key:"End",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==K.Play||r.chartManager.getMode()==K.Record,callback:r=>r.chartManager.beat=r.chartManager.loadedChart.getBeatFromSeconds(r.chartManager.chartAudio.getSongLength())},assistTick:{label:"Assist tick",combos:[{key:"F7",mods:[]}],disabled:()=>!De.assist,callback:()=>{x.audio.assistTick=!x.audio.assistTick,Ee.create("Assist Tick: "+(x.audio.assistTick?"on":"off"))}},metronome:{label:"Metronome",combos:[{key:"F7",mods:["Alt"]}],disabled:()=>!De.assist,callback:()=>{x.audio.metronome=!x.audio.metronome,Ee.create("Metronome: "+(x.audio.metronome?"on":"off"))}},XMod:{label:"XMod (Beat-based)",combos:[{key:"X",mods:["Shift"]}],disabled:!1,callback:()=>{x.chart.CMod=!1,Ee.create("Switched to XMod")}},CMod:{label:"CMod (Time-based)",combos:[{key:"C",mods:["Shift"]}],disabled:!1,callback:()=>{x.chart.CMod=!0,Ee.create("Switched to CMod")}},reverse:{label:"Reverse playfield",combos:[],disabled:!1,callback:()=>{x.chart.reverse=!x.chart.reverse,Ee.create("Reverse Playfield: "+(x.chart.reverse?"on":"off"))}},hideWarpedArrows:{label:"Hide warped notes (CMod only)",combos:[{key:"W",mods:["Shift"]}],disabled:!1,callback:()=>{x.chart.hideWarpedArrows=!x.chart.hideWarpedArrows,Ee.create("Hide Warped Arrows: "+(x.chart.hideWarpedArrows?"on":"off"))}},hideFakedArrows:{label:"Hide faked notes (CMod only)",combos:[{key:"F",mods:["Shift"]}],disabled:!1,callback:()=>{x.chart.hideFakedArrows=!x.chart.hideFakedArrows,Ee.create("Hide Faked Arrows: "+(x.chart.hideFakedArrows?"on":"off"))}},doSpeedChanges:{label:"Do speed changes (XMod only)",combos:[{key:"S",mods:["Shift"]}],disabled:!1,callback:()=>{x.chart.doSpeedChanges=!x.chart.doSpeedChanges,Ee.create("Speed Changes: "+(x.chart.doSpeedChanges?"on":"off"))}},showEq:{label:"Equalizer",combos:[{key:"E",mods:["Shift"]}],disabled:r=>!r.chartManager.chartAudio||!De.openWindows,callback:r=>r.windowManager.openWindow(new ek(r))},detectSync:{label:"Detect audio sync",combos:[{key:"L",mods:["Shift"]}],disabled:r=>!r.chartManager.chartAudio||!De.openWindows,callback:r=>r.windowManager.openWindow(new by(r))},previousNoteType:{label:"Previous note type",combos:[{key:"N",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==K.Play||r.chartManager.getMode()==K.Record,callback:r=>r.chartManager.previousNoteType()},nextNoteType:{label:"Next note type",combos:[{key:"M",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==K.Play||r.chartManager.getMode()==K.Record,callback:r=>r.chartManager.nextNoteType()},undo:{label:"Undo",combos:[{key:"Z",mods:[bt]}],disabled:r=>!r.actionHistory.canUndo()||r.chartManager.getMode()!=K.Edit,callback:r=>r.actionHistory.undo()},redo:{label:"Redo",combos:[{key:"Y",mods:[bt]},{key:"Z",mods:[bt,"Shift"]}],disabled:r=>!r.actionHistory.canRedo()||r.chartManager.getMode()!=K.Edit,callback:r=>r.actionHistory.redo()},mousePlacement:{label:"Enable Mouse Note Placement",combos:[{key:"M",mods:["Shift"]}],disabled:!1,callback:()=>{x.chart.mousePlacement=!x.chart.mousePlacement,Ee.create("Mouse Note Placement: "+(x.chart.mousePlacement?"on":"off"))}},playMode:{label:"Enter/Exit Play Mode",combos:[{key:"P",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==K.Record||!De.playMode,callback:r=>r.chartManager.setMode(K.Play)},recordMode:{label:"Enter/Exit Record Mode",combos:[{key:"R",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==K.Play||r.chartManager.getMode()==K.View||!De.recordMode,callback:r=>r.chartManager.setMode(K.Record)},playModeStart:{label:"Play from start",combos:[{key:"P",mods:["Shift"]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==K.Record||!De.playMode,callback:r=>{r.chartManager.beat=0,r.chartManager.setMode(K.Play)}},recordModeStart:{label:"Record from start",combos:[{key:"R",mods:["Shift"]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==K.Play||r.chartManager.getMode()==K.View||!De.recordMode,callback:r=>r.chartManager.setMode(K.Record)},options:{label:"Options...",bindLabel:"Edit options",combos:[{key:",",mods:[bt]}],disabled:()=>!De.openWindows||!De.openWindows,callback:r=>{r.windowManager.openWindow(new _k(r))}},keybinds:{label:"Keybinds...",bindLabel:"Edit keybinds",combos:[],disabled:()=>!De.openWindows||!De.openWindows,callback:r=>{r.windowManager.openWindow(new qi(r))}},gameplayKeybinds:{label:"Gameplay keybinds...",bindLabel:"Edit gameplay keybinds",combos:[],disabled:()=>!De.openWindows||!De.openWindows,callback:r=>{r.windowManager.openWindow(new rk(r))}},themes:{label:"Themes...",bindLabel:"Edit themes",combos:[],disabled:()=>!De.openWindows||!De.openWindows||ja.isOpen,callback:r=>{r.windowManager.openWindow(new $u(r))}},convertHoldsRolls:{label:"Holds to rolls",bindLabel:"Convert holds to rolls",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=K.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.type=="Hold"&&(e.type="Roll"),e))}},convertRollsHolds:{label:"Rolls to holds",bindLabel:"Convert rolls to holds",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=K.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.type=="Roll"&&(e.type="Hold"),e))}},swapHoldsRolls:{label:"Swap holds and rolls",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=K.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.type=="Hold"?e.type="Roll":e.type=="Roll"&&(e.type="Hold"),e))}},convertHoldsTaps:{label:"Holds/rolls to taps",bindLabel:"Convert holds/rolls to taps",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=K.Edit,callback:r=>{r.chartManager.modifySelection(e=>((e.type=="Hold"||e.type=="Roll")&&(e.type="Tap"),e))}},convertTapsMines:{label:"Taps to mines",bindLabel:"Convert taps to mines",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=K.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.type=="Tap"&&(e.type="Mine"),e))}},convertTapsLifts:{label:"Taps to lifts",bindLabel:"Convert taps to lifts",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=K.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.type=="Tap"&&(e.type="Lift"),e))}},convertTapsFakes:{label:"Taps to fakes",bindLabel:"Convert taps to fakes",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=K.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.type=="Tap"&&(e.type="Fake"),e))}},mirrorHorizontally:{label:"Horizontally",bindLabel:"Mirror horizontally",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=K.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.col=r.chartManager.loadedChart.gameType.flipColumns.horizontal[e.col],e))}},mirrorVertically:{label:"Vertically",bindLabel:"Mirror vertically",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=K.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.col=r.chartManager.loadedChart.gameType.flipColumns.vertical[e.col],e))}},mirrorBoth:{label:"Both",bindLabel:"Mirror both",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=K.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.col=r.chartManager.loadedChart.gameType.flipColumns.horizontal[e.col],e.col=r.chartManager.loadedChart.gameType.flipColumns.vertical[e.col],e))}},selectBeforeCursor:{label:"Select before cursor",combos:[{key:"Home",mods:["Shift"]}],disabled:r=>!r.chartManager.loadedChart,callback:r=>{r.chartManager.editTimingMode==Ie.Off?r.chartManager.setNoteSelection(r.chartManager.loadedChart.getNotedata().filter(e=>e.beate.beat!r.chartManager.loadedChart,callback:r=>{r.chartManager.editTimingMode==Ie.Off?r.chartManager.setNoteSelection(r.chartManager.loadedChart.getNotedata().filter(e=>e.beat>r.chartManager.beat)):r.chartManager.setEventSelection(r.chartManager.loadedChart.timingData.getTimingData().filter(e=>e.beat>r.chartManager.beat))}},selectAll:{label:"Select all",combos:[{key:"A",mods:[bt]}],disabled:r=>!r.chartManager.loadedChart,callback:r=>{r.chartManager.editTimingMode==Ie.Off?r.chartManager.setNoteSelection(r.chartManager.loadedChart.getNotedata()):r.chartManager.setEventSelection(r.chartManager.loadedChart.timingData.getTimingData())}},expand2to1:{label:"Expand 2:1 (8th to 4th)",combos:[],disabled:r=>r.chartManager.selection.notes.length<2||r.chartManager.getMode()!=K.Edit,callback:r=>{const e=Math.min(...r.chartManager.selection.notes.map(t=>t.beat));r.chartManager.modifySelection(t=>(t.beat=(t.beat-e)*2+e,t.beat=Math.round(t.beat*48)/48,Be(t)&&(t.hold*=2,t.hold=Math.round(t.hold*48)/48),t))}},expand3to2:{label:"Expand 3:2 (12th to 8th)",combos:[],disabled:r=>r.chartManager.selection.notes.length<2||r.chartManager.getMode()!=K.Edit,callback:r=>{const e=Math.min(...r.chartManager.selection.notes.map(t=>t.beat));r.chartManager.modifySelection(t=>(t.beat=(t.beat-e)*1.5+e,t.beat=Math.round(t.beat*48)/48,Be(t)&&(t.hold*=1.5,t.hold=Math.round(t.hold*48)/48),t))}},expand4to3:{label:"Expand 4:3 (16th to 2th)",combos:[],disabled:r=>r.chartManager.selection.notes.length<2||r.chartManager.getMode()!=K.Edit,callback:r=>{const e=Math.min(...r.chartManager.selection.notes.map(t=>t.beat));r.chartManager.modifySelection(t=>(t.beat=(t.beat-e)*4/3+e,t.beat=Math.round(t.beat*48)/48,Be(t)&&(t.hold*=4/3,t.hold=Math.round(t.hold*48)/48),t))}},compress1to2:{label:"Compress 1:2 (4th to 8th)",combos:[],disabled:r=>r.chartManager.selection.notes.length<2||r.chartManager.getMode()!=K.Edit,callback:r=>{const e=Math.min(...r.chartManager.selection.notes.map(t=>t.beat));r.chartManager.modifySelection(t=>(t.beat=(t.beat-e)/2+e,t.beat=Math.round(t.beat*48)/48,Be(t)&&(t.hold/=2,t.hold=Math.round(t.hold*48)/48),t))}},compress2to3:{label:"Compress 2:3 (8th to 12th)",combos:[],disabled:r=>r.chartManager.selection.notes.length<2||r.chartManager.getMode()!=K.Edit,callback:r=>{const e=Math.min(...r.chartManager.selection.notes.map(t=>t.beat));r.chartManager.modifySelection(t=>(t.beat=(t.beat-e)/1.5+e,t.beat=Math.round(t.beat*48)/48,Be(t)&&(t.hold/=1.5,t.hold=Math.round(t.hold*48)/48),t))}},compress3to4:{label:"Compress 3:4 (12th to 16th)",combos:[],disabled:r=>r.chartManager.selection.notes.length<2||r.chartManager.getMode()!=K.Edit,callback:r=>{const e=Math.min(...r.chartManager.selection.notes.map(t=>t.beat));r.chartManager.modifySelection(t=>(t.beat=(t.beat-e)*.75+e,t.beat=Math.round(t.beat*48)/48,Be(t)&&(t.hold*=.75,t.hold=Math.round(t.hold*48)/48),t))}},delete:{label:"Delete",combos:[{key:"Backspace",mods:[]},{key:"Delete",mods:[]}],disabled:r=>r.chartManager.getMode()!=K.Edit||r.chartManager.selection.notes.length==0&&r.chartManager.eventSelection.timingEvents.length==0,callback:r=>{r.chartManager.deleteSelection(),r.chartManager.deleteEventSelection()}},paste:{label:"Paste",combos:[{mods:[bt],key:"V"}],preventDefault:!1,disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()!=K.Edit,callback:async r=>{const e=await navigator.clipboard.readText();r.chartManager.paste(e)}},pasteReplace:{label:"Clear and paste",combos:[{mods:[bt,"Shift"],key:"V"}],preventDefault:!1,disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()!=K.Edit,callback:async r=>{const e=await navigator.clipboard.readText();r.chartManager.paste(e,!0)}},copy:{label:"Copy",combos:[{mods:[bt],key:"C"}],preventDefault:!1,disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()!=K.Edit||!r.chartManager.hasSelection(),callback:async r=>{const e=r.chartManager.copy();e&&await navigator.clipboard.writeText(e)}},cut:{label:"Cut",combos:[{mods:[bt],key:"X"}],preventDefault:!1,disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()!=K.Edit||!r.chartManager.hasSelection(),callback:async r=>{const e=r.chartManager.copy();e&&await navigator.clipboard.writeText(e),r.chartManager.deleteSelection()}},adjustOffset:{label:"Adjust offset",combos:[],disabled:()=>!De.openWindows,callback:r=>r.windowManager.openWindow(new dk(r))},setSongPreview:{label:"Set as song preview",combos:[],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()!=K.Edit||!r.chartManager.hasRange(),callback:r=>{const e=r.chartManager.loadedChart,t=r.chartManager.loadedSM.properties.SAMPLESTART??"0",i=r.chartManager.loadedSM.properties.SAMPLELENGTH??"10";let s="",n="";if(r.chartManager.startRegion!==void 0&&r.chartManager.endRegion!==void 0){const a=e.getSecondsFromBeat(r.chartManager.startRegion),o=e.getSecondsFromBeat(r.chartManager.endRegion);s=ae(a,3).toString(),n=ae(o-a,3).toString()}else{const o=(r.chartManager.selection.notes.length>0?r.chartManager.selection.notes:r.chartManager.eventSelection.timingEvents).map(u=>u.beat),l=e.getSecondsFromBeat(Math.min(...o)),c=e.getSecondsFromBeat(Math.max(...o));s=ae(l,3).toString(),n=ae(c-l,3).toString()}Ye.instance.run({action:a=>{a.chartManager.loadedSM.properties.SAMPLESTART=s,a.chartManager.loadedSM.properties.SAMPLELENGTH=n},undo:()=>{r.chartManager.loadedSM.properties.SAMPLESTART=t,r.chartManager.loadedSM.properties.SAMPLELENGTH=i}})}},showDebugTimers:{label:"Toggle Debug Timers",combos:[{key:"F3",mods:["Shift"]}],disabled:!1,callback:()=>{x.debug.showTimers=!x.debug.showTimers}},showFPSCounter:{label:"Toggle FPS Counter",combos:[{key:"F3",mods:[]}],disabled:!1,callback:()=>{x.debug.showFPS=!x.debug.showFPS}},noteTypeTap:{label:"Switch to Taps",combos:[],disabled:r=>!r.chartManager.chartView,callback:r=>{r.chartManager.setEditingNoteType("Tap")}},noteTypeLift:{label:"Switch to Lifts",combos:[],disabled:r=>!r.chartManager.chartView,callback:r=>{r.chartManager.setEditingNoteType("Lift")}},noteTypeMine:{label:"Switch to Mines",combos:[],disabled:r=>!r.chartManager.chartView,callback:r=>{r.chartManager.setEditingNoteType("Mine")}},noteTypeFake:{label:"Switch to Fakes",combos:[],disabled:r=>!r.chartManager.chartView,callback:r=>{r.chartManager.setEditingNoteType("Fake")}},openGuide:{label:"Open Help Guide",combos:[],disabled:!1,callback:()=>{window.open("/smeditor/guide/")}},openChangelog:{label:"Open Changelog",combos:[],disabled:!1,callback:r=>{r.windowManager.openWindow(new v3(r))}},noteskinWindow:{label:"Noteskins...",bindLabel:"Open Noteskin Window",combos:[{mods:["Shift"],key:"N"}],disabled:r=>!r.chartManager.chartView,callback:r=>r.windowManager.openWindow(new uk(r))},previousChart:{label:"Previous chart",combos:[{key:"F5",mods:[]}],disabled:r=>!r.chartManager.chartView,callback:r=>{if(!r.chartManager.loadedSM?.charts||!r.chartManager.loadedChart)return;const e=r.chartManager.loadedSM?.charts[r.chartManager.loadedChart.gameType.id],t=e.indexOf(r.chartManager.loadedChart);e[t-1]&&r.chartManager.loadChart(e[t-1])}},nextChart:{label:"Next chart",combos:[{key:"F6",mods:[]}],disabled:r=>!r.chartManager.chartView,callback:r=>{if(!r.chartManager.loadedSM?.charts||!r.chartManager.loadedChart)return;const e=r.chartManager.loadedSM?.charts[r.chartManager.loadedChart.gameType.id],t=e.indexOf(r.chartManager.loadedChart);e[t+1]&&r.chartManager.loadChart(e[t+1])}},toggleEditTiming:{label:"Toggle Edit Timing",combos:[{key:"T",mods:[]}],disabled:r=>!r.chartManager.chartView,callback:r=>{r.chartManager.editTimingMode!=Ie.Off?r.chartManager.editTimingMode=Ie.Off:r.chartManager.editTimingMode=Ie.Edit}},toggleAddTiming:{label:"Toggle Add Timing",combos:[{key:"T",mods:["Alt"]}],disabled:r=>!r.chartManager.chartView,callback:r=>{r.chartManager.editTimingMode!=Ie.Add?r.chartManager.editTimingMode=Ie.Add:r.chartManager.editTimingMode=Ie.Edit}}};for(const r of[4,2,1])ct[`shiftUp${r}m`]={label:`${r} measure`+(r==1,""),bindLabel:`Shift up by ${r} measure`+(r==1,""),combos:[],disabled:e=>!e.chartManager.chartView,callback:e=>{const t=e.chartManager.selection.notes[0].beat,i=e.chartManager.loadedChart.timingData.getMeasureLength(t);e.chartManager.modifySelection(s=>(s.beat-=i*r,s),!0)}},ct[`shiftDown${r}m`]={label:`${r} measure`+(r==1,""),bindLabel:`Shift down by ${r} measure`+(r==1,""),combos:[],disabled:e=>!e.chartManager.chartView,callback:e=>{const t=e.chartManager.selection.notes[0].beat,i=e.chartManager.loadedChart.timingData.getMeasureLength(t);e.chartManager.modifySelection(s=>(s.beat+=i*r,s),!0)}};for(let r=0;r<_r.length;r++)ct["quant"+rm[r]]={label:`Switch to ${Gi[r]}s`,combos:[],disabled:e=>!e.chartManager.chartView,callback:()=>{x.chart.snap=_r[r]}},ct[`shiftUp${Gi[r]}`]={label:`${Gi[r]}`,bindLabel:`Shift up by ${Gi[r]}`,combos:[],disabled:e=>!e.chartManager.chartView,callback:e=>e.chartManager.modifySelection(t=>(t.beat-=_r[r],t),!0)},ct[`shiftDown${Gi[r]}`]={label:`${Gi[r]}`,bindLabel:`Shift down by ${Gi[r]}`,combos:[],disabled:e=>!e.chartManager.chartView,callback:e=>e.chartManager.modifySelection(t=>(t.beat+=_r[r],t),!0)},r!=_r.length-1&&(ct["quantize"+Gi[r]]={label:`${Gi[r]}s`,bindLabel:`Quantize to ${Gi[r]}s`,combos:[],disabled:e=>e.chartManager.selection.notes.length==0||e.chartManager.getMode()!=K.Edit,callback:e=>{e.chartManager.modifySelection(t=>(t.beat=e.chartManager.getClosestTick(t.beat,rm[r]),t.beat=Math.round(t.beat*48)/48,t))}});class $d{static popup;static build(e){const t=document.createElement("div");t.classList.add("update-popup");const i=document.createElement("div");i.classList.add("title"),i.innerText=e.title;const s=document.createElement("div");s.classList.add("desc"),s.innerText=e.desc;const n=document.createElement("div");if(n.classList.add("update-options"),t.replaceChildren(i,s),e.options.length>0){for(const a of e.options){const o=document.createElement("button");o.innerText=a.label,o.onclick=()=>{a.callback?.(this)},o.classList.add(a.type),n.appendChild(o)}t.appendChild(n)}this.popup=t,document.getElementById("popups")?.appendChild(this.popup)}static close(){this.popup&&(this.popup.classList.add("exiting"),this.popup.style.pointerEvents="none",setTimeout(()=>this.popup.remove(),300))}}class Ak extends $d{static open(e,t){super.build({title:`A new version of the desktop app is available! (${e})`,desc:"Click here to download the new version.",options:[{label:"Close",type:"default",callback:()=>this.close()},{label:"Download",type:"confirm",callback:()=>{localStorage.setItem("downloadedVersion",e),nw.require("nw.gui").Shell.openExternal(t),this.close()}}]})}}class Tk extends $d{static open(e){super.build({title:"A new version of the app is available!",desc:"Refresh the page to get the new version.",options:[{label:"Close",type:"default",callback:()=>this.close()},{label:"Refresh",type:"confirm",callback:()=>{e()}}]})}}class Ck extends $d{static open(){super.build({title:"SMEditor was loaded offline!",desc:"You can now use SMEditor without an internet connection.",options:[]}),setTimeout(()=>this.close(),5e3)}}class zt extends Fg{static graphics=new Xn;static textures={default:Gt.create({width:50,height:50}),noBorder:Gt.create({width:50,height:50}),onlyBorder:Gt.create({width:50,height:50})};static init(e){this.textures.default=Gt.create({width:50,height:50,resolution:e.resolution}),this.textures.noBorder=Gt.create({width:50,height:50,resolution:e.resolution}),this.textures.onlyBorder=Gt.create({width:50,height:50,resolution:e.resolution}),this.graphics.beginFill(16777215,1),this.graphics.lineStyle(1,0),this.graphics.drawRoundedRect(0,0,50,50,5),this.graphics.endFill(),e.render(this.graphics,{renderTexture:this.textures.default}),this.graphics.clear(),this.graphics.beginFill(16777215,1),this.graphics.lineStyle(0,16777215),this.graphics.drawRoundedRect(0,0,50,50,5),this.graphics.endFill(),e.render(this.graphics,{renderTexture:this.textures.noBorder}),this.graphics.clear(),this.graphics.beginFill(16777215,0),this.graphics.lineStyle(2,16777215),this.graphics.drawRoundedRect(0,0,50,50,5),this.graphics.endFill(),e.render(this.graphics,{renderTexture:this.textures.onlyBorder})}constructor(e){super(zt.textures[e??"default"],5,5,5,5)}}const va=[];function qm(){return va.length}function jD(){for(va.push(Date.now());va.length>0&&va[0]0&&wa[0]qm()+" FPS"});drawUpdateTimeGraph=new la({width:300,height:Ti,color:6034982,min:0,unit:"ms",label:"DrawUpdate",precision:1});updateTimeGraph=new la({width:300,height:Ti,color:1516101,min:0,unit:"ms",label:"Update",precision:1,sublabel:()=>Ym()+" TPS"});memoryTimeGraph=new la({width:300,height:Ti,color:6626406,min:0,formatter:e=>Math.round(e/1048576)+" MB",label:"Memory"});cpuGraph=new la({width:300,height:Ti,color:5190685,min:0,label:"CPU"});graphs=new ve;fpsCounter=new ve;fpsBg=new zt("noBorder");fpsText=new Fe("",{fontName:"Main",fontSize:12});lastFrameTime=0;properties=new Map;constructor(e){super(e),this.drawUpdateTimeGraph.y+=Ti+5,this.updateTimeGraph.y+=(Ti+5)*2,this.memoryTimeGraph.y+=(Ti+5)*3,this.cpuGraph.y+=(Ti+5)*4,qa.instance=this,this.fpsText.x=5,this.fpsBg.y=-5,et(this.fpsBg,"widget-bg"),et(this.fpsText,"text-color"),this.graphs.addChild(this.frameTimeGraph,this.drawUpdateTimeGraph,this.updateTimeGraph),performance.memory&&this.graphs.addChild(this.memoryTimeGraph),this.fpsCounter.addChild(this.fpsBg,this.fpsText),this.graphs.visible=x.debug.showTimers,this.fpsCounter.visible=x.debug.showFPS,this.addChild(this.graphs,this.fpsCounter)}update(){this.x=-this.manager.app.renderer.screen.width/2+20,this.y=-this.manager.app.renderer.screen.height/2+20,this.graphs.children.forEach(e=>e.update()),this.graphs.visible=x.debug.showTimers,this.fpsCounter.visible=x.debug.showFPS,this.fpsText.text=`${qm()} FPS +${Ym()} TPS +${this.lastFrameTime.toFixed(2)} ms +`,x.debug.showDebugVariables&&this.properties.forEach((e,t)=>{this.fpsText.text+=`${t}: ${e} +`}),this.fpsBg.width=this.fpsText.width+10,this.fpsBg.height=this.fpsText.height+10,x.debug.showTimers?(this.fpsBg.y=(Ti+5)*this.graphs.children.length-5,this.fpsText.y=(Ti+5)*this.graphs.children.length):(this.fpsBg.y=-5,this.fpsText.y=0)}addMemoryTimeValue(e){this.memoryTimeGraph.addValue(e)}addFrameTimeValue(e){this.lastFrameTime=e,this.frameTimeGraph.addValue(e)}addUpdateTimeValue(e){this.updateTimeGraph.addValue(e)}addDrawUpdateTimeValue(e){this.drawUpdateTimeGraph.addValue(e)}setProperty(e,t){this.properties.set(e,t)}clearProperty(e){this.properties.delete(e)}clearProperties(){this.properties.clear()}}class la extends ve{graphWidth;graphHeight;color;unit;precision;formatter;sublabel;maxEase=1;targetMax=1;minEase=1;targetMin=1;constrainedMin=null;constrainedMax=null;dataPoints=[];linePool=[];lineContainer;labelText;sublabelText;topText;bottomText;constructor(e){super();const{width:t,height:i,color:s=16777215,unit:n="",label:a="",min:o=null,max:l=null,precision:c=0,formatter:u=null,sublabel:h=()=>""}=e;this.graphWidth=t,this.graphHeight=i,this.color=s,this.unit=n,this.constrainedMax=l,this.constrainedMin=o,this.precision=c,this.formatter=u,this.sublabel=h,this.lineContainer=new ud(t,{position:!0},16384,!0);const d=new zt("noBorder");d.tint=0,d.alpha=.3,d.width=this.graphWidth,d.height=this.graphHeight,et(d,"widget-bg"),this.labelText=new Fe(a,{fontName:"Main",fontSize:Math.min(i/5,16)}),this.labelText.alpha=.8,this.sublabelText=new Fe("",{fontName:"Main",fontSize:Math.min(i/5,16)}),this.topText=new Fe("",{fontName:"Main",fontSize:Math.min(i/7,12)}),this.topText.anchor.x=1,this.topText.alpha=.5,this.topText.x=this.graphWidth,this.bottomText=new Fe("",{fontName:"Main",fontSize:Math.min(i/7,12)}),this.bottomText.anchor.x=1,this.bottomText.anchor.y=1,this.bottomText.alpha=.5,this.bottomText.x=this.graphWidth,this.bottomText.y=this.graphHeight,this.sublabelText.y=this.graphHeight,this.sublabelText.anchor.y=1,this.sublabelText.alpha=.5,this.addChild(d,this.lineContainer,this.labelText,this.sublabelText,this.topText,this.bottomText)}addValue(e){if(this.lineContainer.children[0]?.x+this.lineContainer.x<0){const i=this.lineContainer.children[0];this.dataPoints.shift(),this.removeChild(i),this.linePool.push(i)}this.lineContainer.x-=1,this.lineContainer.x<-1e7&&(this.lineContainer.children.forEach(i=>{i.x-=1e7}),this.lineContainer.x+=1e7);const t=this.linePool.shift()??new Ne(te.WHITE);t.width=1,t.anchor.x=.5,t.anchor.y=1,t.tint=this.color,t.alpha=.6,t.x=this.graphWidth-this.lineContainer.x,t.y=this.graphHeight,t.value=e,this.dataPoints.push(e),this.targetMax=this.constrainedMax!==null?this.constrainedMax:Math.max(...this.dataPoints),this.targetMin=this.constrainedMin!==null?this.constrainedMin:Math.min(...this.dataPoints),this.lineContainer.addChild(t)}update(){this.dataPoints.length!=0&&(this.maxEase=(this.maxEase-this.targetMax)*.1+this.targetMax,this.minEase=(this.minEase-this.targetMin)*.1+this.targetMin,this.lineContainer.children.forEach(e=>{e.height=Oe((e.value-this.minEase)/this.maxEase,0,1)*this.graphHeight}),this.topText.text=this.formatter?.(this.maxEase)??`${ae(this.maxEase,this.precision)} ${this.unit}`,this.bottomText.text=this.formatter?.(this.minEase)??`${ae(this.minEase,this.precision)} ${this.unit}`,this.sublabelText.text=this.sublabel())}}class wy extends ao{backing=new zt("noBorder");overlay=new Ne(te.WHITE);selectionOverlay=new Ne(te.WHITE);container=new ve;lastHeight=0;lastCMod;mouseDown=!1;queued=!1;verticalMargin=40;backingVerticalPadding=10;backingWidth=32;xOffset=20;constructor(e,t=20,i=32){super(e),this.backingWidth=i,this.xOffset=t,this.sortableChildren=!0,this.addChild(this.backing),this.addChild(this.container),this.visible=!1,et(this.backing,"widget-bg"),this.overlay.anchor.x=.5,this.overlay.anchor.y=0,this.overlay.alpha=.3,this.overlay.zIndex=10,this.lastCMod=x.chart.CMod,this.addChild(this.overlay),this.x=this.manager.app.renderer.screen.width/2-this.xOffset,H.on("chartLoaded",()=>{this.queued=!1,this.populate()}),H.on("chartModifiedAfter",()=>{this.queued||this.populate(),this.queued=!0});const s=setInterval(()=>{this.queued&&(this.queued=!1,this.populate())},3e3);this.on("destroyed",()=>clearInterval(s)),this.eventMode="static",this.on("mousedown",n=>{this.mouseDown=!0,this.handleMouse(n)}),this.on("mousemove",n=>{this.mouseDown&&this.handleMouse(n)}),this.on("mouseup",()=>{this.mouseDown=!1}),this.on("mouseleave",()=>{this.mouseDown=!1})}handleMouse(e){if(this.manager.chartManager.getMode()==K.Play||!this.getChart())return;let t=(this.container.toLocal(e.global).y+this.container.height/2)/this.container.height;t=Oe(t,0,1),this.getChart().getNotedata().at(-1)&&(x.chart.CMod?this.manager.chartManager.time=$t(-this.getChart().timingData.getOffset(),this.getChart().getLastSecond(),t):this.manager.chartManager.beat=this.getChart().getLastBeat()*t)}update(){this.scale.y=x.chart.reverse?-1:1;const e=this.manager.app.renderer.screen.height-this.verticalMargin;this.backing.height=e+this.backingVerticalPadding,this.backing.position.y=-this.backing.height/2,this.backing.position.x=-this.backing.width/2,this.x=this.manager.app.renderer.screen.width/2-this.xOffset;const t=this.getChart(),i=this.manager.chartManager.chartView;if(!t||!i||!De.layout){this.visible=!1;return}if(this.visible=!0,!t.getNotedata().at(-1)){this.overlay.height=0;return}const n=x.chart.CMod?i.getSecondFromYPos(-this.manager.app.renderer.screen.height/2):i.getBeatFromYPos(-this.manager.app.renderer.screen.height/2,!0),a=x.chart.CMod?i.getSecondFromYPos(this.manager.app.renderer.screen.height/2):i.getBeatFromYPos(this.manager.app.renderer.screen.height/2,!0),o=this.getYFromRange(t,n,a);this.overlay.y=o.startY,this.overlay.height=o.endY-o.startY,this.overlay.height=Math.max(2,this.overlay.height);const l=this.manager.chartManager.selection.notes;if(l.length<1)this.selectionOverlay.visible=!1;else{this.selectionOverlay.visible=!0;let c,u;x.chart.CMod?(c=Am(l.map(d=>d.second)),u=Tm(l.map(d=>t.getSecondsFromBeat(lr(d))))):(c=Am(l.map(d=>d.beat)),u=Tm(l.map(d=>lr(d))));const h=this.getYFromRange(t,c,u);this.selectionOverlay.y=h.startY,this.selectionOverlay.height=h.endY-h.startY,this.selectionOverlay.height=Math.max(2,this.selectionOverlay.height)}(this.manager.app.renderer.screen.height!=this.lastHeight||this.lastCMod!=x.chart.CMod)&&(this.lastCMod=x.chart.CMod,this.lastHeight=this.manager.app.renderer.screen.height,this.updateDimensions(),this.populate())}getYFromRange(e,t,i){const s=e.getLastBeat(),n=e.getLastSecond();let a=Vt(0,s,t),o=Vt(0,s,i);x.chart.CMod&&(a=Vt(-e.timingData.getOffset(),n,t),o=Vt(-e.timingData.getOffset(),n,i)),a=Oe(a,0,1),o=Oe(o,0,1),a>o&&([a,o]=[o,a]);const l=(a-.5)*this.container.height,c=(o-.5)*this.container.height;return{startY:l,endY:c}}updateDimensions(){if(!this.getChart())return;const t=this.manager.app.renderer.screen.height-this.verticalMargin;this.backing.height=t+this.backingVerticalPadding,this.backing.width=this.backingWidth,this.overlay.width=this.backingWidth,this.selectionOverlay.width=this.backingWidth,this.pivot.x=this.backing.width/2}populate(){}getChart(){return this.manager.chartManager.loadedChart}}class Mk extends wy{npsGraph;graphGradient=null;graphWidth=40;npsText=new Fe("",{fontName:"Main",fontSize:12});constructor(e){super(e,60,40),this.graphWidth=40,this.graphGradient=this.makeGradient(),this.npsGraph=new Xn,this.container.addChild(this.npsGraph),this.npsText.visible=!1,this.npsText.anchor.x=1,this.npsText.anchor.y=.5,et(this.npsText,"text-color"),this.addChild(this.npsText),H.on("userOptionUpdated",i=>{(i=="chart.npsGraph.color1"||i=="chart.npsGraph.color2")&&(this.graphGradient=this.makeGradient(),this.populate())}),this.on("mouseleave",()=>{this.hideNpsDisplay()}),this.on("mouseenter",()=>{this.showNpsDisplay()}),this.on("mousemove",i=>{this.updateNpsDisplay(i)}),this.populate()}updateNpsDisplay(e){const t=this.getChart();if(!t){this.npsText.visible=!1;return}if(!t.getNotedata().at(-1)){this.npsText.visible=!1;return}const s=t.getNPSGraph();let n=this.npsGraph.toLocal(e.global).y/this.npsGraph.height;n=Oe(n,0,1);let a=$t(0,t.getLastBeat(),n);if(x.chart.CMod){const c=$t(-t.timingData.getOffset(),t.getLastSecond(),n);a=t.timingData.getBeatFromSeconds(c)}const o=Math.floor(t.timingData.getMeasure(a)),l=s[o]??0;this.npsText.text=l.toFixed(1)+" nps",this.npsText.position.y=this.getYFromBeat(a)-this.npsGraph.height/2,this.npsText.position.x=-this.backing.width/2-10,this.npsText.visible=!0}hideNpsDisplay(){this.npsText.visible=!1}showNpsDisplay(){const e=this.getChart();if(!e){this.npsText.visible=!1;return}if(!e.getNotedata().at(-1)){this.npsText.visible=!1;return}this.npsText.visible=!0}update(){if(!x.chart.npsGraph.enabled){this.visible=!1;return}this.visible=!0;const e=this.manager.getChildByName("note-layout");e!==void 0&&e.visible?this.xOffset=e.backingWidth+28:this.xOffset=20,this.npsText.scale.y=x.chart.reverse?-1:1,super.update()}populate(){const e=this.getChart();if(!e)return;const t=this.manager.app.renderer.screen.height-40,i=e.getMaxNPS(),s=e.getNPSGraph(),n=e.getLastBeat();if(this.npsGraph.clear(),e.getNotedata().length==0)return;this.graphGradient?this.npsGraph.beginTextureFill({texture:this.graphGradient}):this.npsGraph.beginFill(0,1),this.npsGraph.pivot.x=this.backing.width/2,this.npsGraph.pivot.y=t/2;const a=s.length,o=this.getYFromBeat(0);this.npsGraph.moveTo(0,o);for(let h=0;h{this.popup?.contains(t.target)||this.close()}),this.popup.style.transitionDuration="0s",this.movePosition(),this.moveInterval=setInterval(()=>this.movePosition(),Xm),this.active=!0,this.options.cancelableOnOpen&&setTimeout(()=>window.addEventListener("click",this.clickOutside,!0),200)}}static cloneRect(e){return{top:e.top,bottom:e.bottom,left:e.left,right:e.right,width:e.width,height:e.height}}static movePosition(){const e=this.options.attach instanceof HTMLElement?this.options.attach.getBoundingClientRect():this.cloneRect(this.options.attach.getBounds());this.options.attach instanceof HTMLElement||(e.top+=document.getElementById("pixi").offsetTop+9);const t=e.left+e.width/2,i=this.popup.clientWidth,s=i/2+15,n=window.innerWidth-i/2-15;this.popup.style.left=`${Oe(t,s,n)}px`;const a=e.top+e.height/2+15;this.popup.style.top=`${a}px`,a+this.popup.clientHeight>window.innerHeight-15?(this.popup.style.transform="translate(-50%, -100%)",this.view.style.transformOrigin="bottom",this.popup.style.top=`${e.top-15}px`):(this.popup.style.transform="",this.view.style.transformOrigin=""),requestAnimationFrame(()=>this.popup.style.transitionDuration="")}static _build(){const e=document.createElement("div");e.classList.add("popup"),this.popup=e;const t=document.createElement("div");t.classList.add("popup-zoomer"),this.options.width&&(t.style.width=`${this.options.width}px`),t.style.backgroundColor=this.options.background??"",t.style.color=this.options.textColor??"",e.appendChild(t),this.view=t;const i=document.createElement("div");if(i.innerText=this.options.title,i.classList.add("popup-title"),t.appendChild(i),this.title=i,this.options.description!==void 0){const s=document.createElement("div");s.innerText=this.options.description,s.classList.add("popup-desc"),t.appendChild(s),this.desc=s}if(this.buildContent(),this.options.editable){const s=document.createElement("div");s.innerText="click to edit",s.style.marginTop="4px",s.style.height="10px",t.appendChild(s),s.classList.add("popup-desc"),this.editText=s}if(this.options.options){const s=document.createElement("div");s.classList.add("popup-options"),this.options.options.forEach(n=>{const a=document.createElement("button");a.innerText=n.label,a.onclick=()=>{n.callback?.()},a.classList.add(n.type),s.appendChild(a)}),this.view.append(s)}}static buildContent(){}static close(){if(!this.popup||!this.active)return;window.removeEventListener("click",this.clickOutside,!0),this.popup.classList.add("exiting");const e=this.popup;setTimeout(()=>e.remove(),200),this.active=!1,this.persistent=!1,clearInterval(this.moveInterval),clearInterval(this.updateInterval)}static select(){!this.popup||!this.options.editable||(this.persistent=!0,this.view.classList.add("selected"),this.editText.style.transform="scale(0)",this.editText.style.height="0px",this.options.cancelableOnOpen||setTimeout(()=>window.addEventListener("click",this.clickOutside,!0),200))}static detach(){clearInterval(this.moveInterval)}static attach(e){clearInterval(this.moveInterval),this.moveInterval=setInterval(()=>this.movePosition(),Xm),this.options.attach=e}}class Jo extends oo{static onSnapChange=this.updateValues.bind(this);static divInput;static divLabel;static beatInput;static open(e){this.active||(super._open({attach:e,title:"Snap Options",width:200,editable:!0,cancelableOnOpen:!1}),H.on("snapChanged",this.onSnapChange))}static buildContent(){const e=document.createElement("div");e.classList.add("popup-flex"),this.view.appendChild(e);const t=document.createElement("div");t.classList.add("popup-row");const i=document.createElement("div");i.innerText="Snap to nearest ";const s=ft.create(x.chart.snap==0?0:Math.round(4/x.chart.snap),1,0,0,1e3);s.onChange=u=>{if(u===void 0){this.updateValues();return}u==0?x.chart.snap=0:x.chart.snap=4/u,this.updateValues()};const n=document.createElement("div");n.innerText=this.suffixSnap()+" note",t.replaceChildren(i,s.view,n);const a=document.createElement("div");a.classList.add("popup-row");const o=document.createElement("div");o.innerText="Snap every";const l=ft.create(x.chart.snap,.001,3,0);l.onChange=u=>{if(u===void 0){this.updateValues();return}u==0?x.chart.snap=0:x.chart.snap=u,this.updateValues()};const c=document.createElement("div");c.innerText=" beats",a.replaceChildren(o,l.view,c),e.replaceChildren(t,a),this.beatInput=l,this.divInput=s,this.divLabel=n}static updateValues(){document.activeElement==this.divInput.input||document.activeElement==this.beatInput.input||(this.divInput.setValue(x.chart.snap==0?0:Math.round(4/x.chart.snap)),this.divLabel.innerText=this.suffixSnap()+" note",this.beatInput.setValue(x.chart.snap))}static suffixSnap(){const e=x.chart.snap==0?0:Math.round(4/x.chart.snap);return e%10==1&&e!=11?"st":e%10==2&&e!=12?"nd":e%10==3&&e!=13?"rd":"th"}static close(){!this.popup||!this.active||(super.close(),H.off("timingModified",this.onSnapChange))}}const kk={fontName:"Main",fontSize:10,fill:["#ffffff"]},xy={4:15157287,8:4033015,12:11152884,16:8577607,24:14167723,32:15376696,48:15699179,64:7071886,96:8553090,192:8553090};class Dk extends ve{renderer;children=[];constructor(e){super(),this.renderer=e;for(let t=0;t<2;t++){const i=new ve,s=new Xn,n=new Fe("4",kk);i.x=(t-.5)*(this.renderer.chart.gameType.notefieldWidth+48),s.rotation=Math.PI/4,s.lineStyle(1,0,1),s.beginFill(16777215),s.drawRect(-12,-12,24,24),s.endFill(),n.anchor.set(.5),i.addChild(s,n),this.addChild(i),i.eventMode="static",i.on("mouseenter",()=>Jo.open(s)),i.on("mousedown",()=>Jo.select()),i.on("mouseleave",()=>{Jo.persistent||Jo.close()})}}update(){this.y=this.renderer.getActualReceptorYPos(),this.visible=this.renderer.chartManager.getMode()!=K.Play;for(let e=0;e<2;e++){const t=this.children[e],i=t.children[0];i.tint=xy[4/x.chart.snap]??7368816;const s=t.children[1];s.text=""+(x.chart.snap==0||4/x.chart.snap%1!=0?"":4/x.chart.snap)}}}class Ik extends wy{barContainer=new ud(1500,{position:!0,scale:!0,tint:!0},16384,!0);bars;barTexture;constructor(e){super(e),this.addChild(this.backing),this.addChild(this.container),this.visible=!1,this.name="note-layout",this.backing.tint=0,this.backing.alpha=.3,this.barTexture=Gt.create({resolution:this.manager.app.renderer.resolution}),this.bars=new Ne(this.barTexture),this.bars.anchor.set(.5),this.container.addChild(this.bars),this.populate()}update(){if(!x.chart.noteLayout.enabled){this.visible=!1;return}this.visible=!0,super.update()}populate(){const e=this.getChart();if(!e){hr(this.barContainer.children,()=>!0),this.manager.app.renderer.render(this.barContainer,{renderTexture:this.barTexture});return}let t=0;const i=e.gameType.numCols,s=e.getNotedata().at(-1),n=this.manager.app.renderer.screen.height-40;if(this.barTexture.resize(i*6,n),this.backingWidth=i*6+8,this.updateDimensions(),!s){hr(this.barContainer.children,()=>!0),this.manager.app.renderer.render(this.barContainer,{renderTexture:this.barTexture});return}const a=s.beat+(Be(s)?s.hold:0),o=e.getSecondsFromBeat(a),l=e.timingData.getOffset();e.getNotedata().forEach(c=>{let u=this.barContainer.children[t];u||(u=new Ne(te.WHITE),u.width=4,this.barContainer.addChild(u)),u.anchor.set(.5),u.height=1,u.x=(c.col+.5)*6;let h=Vt(0,a,c.beat);if(x.chart.CMod&&(h=Vt(l,o,c.second)),u.y=h*n,u.tint=xy[c.quant],c.type=="Mine"&&(u.tint=8421504),t++,Be(c)){let d=this.barContainer.children[t];d||(d=new Ne(te.WHITE),d.width=4,d.height=2,this.barContainer.addChild(d)),d.anchor.x=.5,d.anchor.y=0,d.x=(c.col+.5)*6;const f=(x.chart.CMod?e.getSecondsFromBeat(c.beat+c.hold)/o:(c.beat+c.hold)/a)*n+1;d.y=u.y,d.height=f-u.y,c.type=="Hold"&&(d.tint=10526880),c.type=="Roll"&&(d.tint=11379586),t++}}),hr(this.barContainer.children,(c,u)=>u>=t),this.manager.app.renderer.render(this.barContainer,{renderTexture:this.barTexture})}}const Ke=300,lt=150,Km=[.045,.09,.18,.37,.18,.09,.045];class Pk extends ao{max=0;barlines=new ve;backgroundRect=new zt("noBorder");background=new ve;backgroundLines=new ve;statText=new ve;meanText;medianText;modeText;stddevText;errorMS=[];texts=new ve;showEase=0;toggled=!1;drag=!1;dragStart=0;lastMode=this.manager.chartManager.getMode();constructor(e){super(e),this.visible=!1,this.background.addChild(this.backgroundRect),et(this.backgroundRect,"widget-bg"),this.addChild(this.background),this.addChild(this.backgroundLines),this.eventMode="static",this.on("mousedown",()=>{this.manager.chartManager.getMode()!=K.Play&&(this.drag=!0,this.dragStart=Date.now(),mi.stop("play-widget"))}),window.addEventListener("mousemove",p=>{this.drag&&(this.showEase+=p.movementY/-400)}),window.addEventListener("mouseup",()=>{this.drag&&(Date.now()-this.dragStart>400?this.toggled=this.showEase>.5:this.toggled=!this.toggled,mi.animate(this,{0:{showEase:"inherit"},1:{showEase:this.toggled?1:0}},.6,Sr(.11,.71,.33,1.39),()=>{},"play-widget")),this.drag=!1}),this.on("mouseenter",()=>{!this.toggled&&this.manager.chartManager.getMode()!=K.Play&&mi.animate(this,{0:{showEase:"inherit"},1:{showEase:.05}},.6,Sr(.11,.71,.33,1.39),()=>{},"play-widget")}),this.on("mouseleave",()=>{!this.toggled&&this.manager.chartManager.getMode()!=K.Play&&mi.animate(this,{0:{showEase:"inherit"},1:{showEase:0}},.6,Sr(.11,.71,.33,1.39),()=>{},"play-widget")});const t=new Fe("Early",{fontName:"Main",fontSize:15});t.x=-Ke/2+5,t.y=-lt-40,t.alpha=.3,this.background.addChild(t),et(t,"text-color");const i=new Fe("Late",{fontName:"Main",fontSize:15});i.anchor.x=1,i.x=Ke/2-5,i.y=-lt-40,i.alpha=.3,this.background.addChild(i),et(i,"text-color"),this.meanText=new Fe("-",{fontName:"Main",fontSize:15}),this.meanText.anchor.x=.5,this.meanText.x=Ke/4*-1.5,this.meanText.y=-lt-70,this.statText.addChild(this.meanText),this.medianText=new Fe("-",{fontName:"Main",fontSize:15}),this.medianText.anchor.x=.5,this.medianText.x=Ke/4*-.5,this.medianText.y=-lt-70,this.statText.addChild(this.medianText),this.modeText=new Fe("-",{fontName:"Main",fontSize:15}),this.modeText.anchor.x=.5,this.modeText.x=Ke/4*.5,this.modeText.y=-lt-70,this.statText.addChild(this.modeText),this.stddevText=new Fe("-",{fontName:"Main",fontSize:15}),this.stddevText.anchor.x=.5,this.stddevText.x=Ke/4*1.5,this.stddevText.y=-lt-70,this.statText.addChild(this.stddevText);const s=new Fe("Mean",{fontName:"Main",fontSize:10});s.anchor.x=.5,s.x=Ke/4*-1.5,s.y=-lt-80,this.statText.addChild(s);const n=new Fe("Median",{fontName:"Main",fontSize:10});n.anchor.x=.5,n.x=Ke/4*-.5,n.y=-lt-80,this.statText.addChild(n);const a=new Fe("Mode",{fontName:"Main",fontSize:10});a.anchor.x=.5,a.x=Ke/4*.5,a.y=-lt-80,this.statText.addChild(a);const o=new Fe("Std Dev.",{fontName:"Main",fontSize:10});o.anchor.x=.5,o.x=Ke/4*1.5,o.y=-lt-80,this.statText.addChild(o),this.statText.children.forEach(p=>{et(p,"text-color")});const l=new ve,c=new zt("noBorder");c.tint=3355443,c.alpha=.3,c.width=Ke/2-10,c.height=30,c.y=-25,c.x=-Ke/4,c.pivot.x=(Ke/2-10)/2,c.pivot.y=15;const u=new Fe("Adjust song offset",{fontName:"Main",fontSize:12});u.anchor.set(.5),u.x=-Ke/4,u.y=-25,l.addChild(c,u),l.eventMode="static",l.addEventListener("mouseenter",()=>{c.alpha=.6}),l.addEventListener("mousedown",p=>{p.stopImmediatePropagation(),this.adjustOffset("song")}),l.addEventListener("mouseleave",()=>{c.alpha=.3}),this.statText.addChild(l),et(u,"text-color");const h=new ve,d=new zt("noBorder");d.tint=3355443,d.alpha=.3,d.width=Ke/2-10,d.height=30,d.y=-25,d.x=Ke/4,d.pivot.x=(Ke/2-10)/2,d.pivot.y=15,d.eventMode="static",h.addEventListener("mouseenter",()=>{d.alpha=.6}),h.addEventListener("mouseleave",()=>{d.alpha=.3});const f=new Fe("Adjust global offset",{fontName:"Main",fontSize:12});f.anchor.set(.5),f.x=Ke/4,f.y=-25,h.addChild(d,f),et(f,"text-color"),h.eventMode="static",h.addEventListener("mouseenter",()=>{d.alpha=.6}),h.addEventListener("mousedown",p=>{p.stopImmediatePropagation(),this.adjustOffset("global")}),h.addEventListener("mouseleave",()=>{d.alpha=.3}),this.statText.addChild(h),this.addChild(this.background),this.addChild(this.backgroundLines),this.eventMode="static",this.addChild(this.statText),this.addChild(this.barlines),this.addChild(this.texts)}update(){this.visible=!!this.manager.chartManager.gameStats,this.x=-this.manager.chartManager.app.renderer.screen.width/2+20+Ke/2,this.y=this.manager.chartManager.app.renderer.screen.height/2-20,this.backgroundRect.width=Ke+10,this.backgroundRect.height=lt+260,this.backgroundRect.x=-Ke/2-5,this.backgroundRect.y=-lt-260,this.visible=!!this.manager.chartManager.gameStats;for(const e of this.barlines.children)x.general.smoothAnimations?e.height=(e.targetHeight-e.height)*.2+e.height:e.height=e.targetHeight;this.lastMode!=this.manager.chartManager.getMode()&&(this.lastMode=this.manager.chartManager.getMode(),mi.animate(this,{0:{showEase:"inherit"},1:{showEase:this.manager.chartManager.getMode()==K.Play?1:0}},.6,Sr(.11,.71,.33,1.39),()=>{},"play-widget")),x.general.smoothAnimations?this.y+=(1-Math.abs(this.showEase))*400:this.manager.chartManager.getMode()!=K.Play&&(this.y+=400)}newLine(){const e=new Ne(te.WHITE);return e.smoothCount=0,e.targetHeight=0,e.anchor.y=1,e.anchor.x=.5,e.height=0,e.visible=!1,e}startPlay(){const e=this.manager.chartManager.gameStats;this.max=0,this.errorMS=[],this.meanText.text="-",this.medianText.text="-",this.modeText.text="-",this.stddevText.text="-",hr(this.barlines.children,()=>!0),hr(this.backgroundLines.children,()=>!0),hr(this.texts.children,()=>!0);const t=rt.getCollection(x.play.timingCollection),i=t.getStandardWindows().length+1,s=Math.round(t.maxWindowMS());for(let p=0;pw.type==m&&!w.fake).length),g.alpha=.8,b.alpha=.8,b.name=m,this.texts.addChild(g),this.texts.addChild(b),g.x=-Ke/2+160,b.x=-Ke/2+290,g.y=80/l*n-lt-220,b.y=80/l*n++-lt-220,g.anchor.y=.5,b.anchor.y=.5,b.anchor.x=1}const c=new Fe("Max Combo",{fontName:"Main",fontSize:15});et(c,"text-color");const u=new Fe("0",{fontName:"Main",fontSize:15});et(u,"text-color"),c.alpha=.8,u.alpha=.8,u.name="Combo",this.texts.addChild(c),this.texts.addChild(u),c.x=-Ke/2+160,u.x=-Ke/2+290,c.y=80/l*n-lt-220,u.y=80/l*n++-lt-220,c.anchor.y=.5,u.anchor.y=.5,u.anchor.x=1;const h=new Fe("0.00 / 0.00",{fontName:"Main",fontSize:20});et(h,"text-color"),h.alpha=.8,h.x=-Ke/2+225,h.y=-lt-112,h.name="Score",this.texts.addChild(h),h.anchor.set(.5);const d=new Fe("Score / Current Score",{fontName:"Main",fontSize:13});et(d,"text-color"),d.alpha=.5,d.x=-Ke/2+225,d.y=-lt-135,this.texts.addChild(d),d.anchor.set(.5);const f=new Fe("Play Statistics",{fontName:"Main",fontSize:13});f.y=-lt-245,f.anchor.set(.5),et(f,"text-color"),this.texts.addChild(f),e.onJudge((p,m)=>{let g="";(Li(m)||cr(m))&&(g=m.id),Us(m)&&(g=m.noteType),mh(m)&&(g="Mine");const b=this.texts.getChildByName(g);if(Us(m)){const v=b.text.split(" / ")[1];b.text=e.getCount(m)+" / "+v}else Vn(m)||(b.text=e.getCount(m)+"");if(this.texts.getChildByName("Combo").text=e.getMaxCombo()+"",this.texts.getChildByName("Score").text=ae(e.getScore()*100,2).toFixed(2)+" / "+ae(e.getCumulativeScore()*100,2).toFixed(2),Li(m)||!cr(m)||p==null)return;const w=Math.round(p*1e3);for(let v=-3;v<=3;v++)this.barlines.children[w+s+v]&&(this.barlines.children[w+s+v].smoothCount+=Km[v+3],this.barlines.children[w+s+v].visible=!0,this.barlines.children[w+s+v].smoothCount>this.max&&(this.modeText.text=w+"ms",this.max=this.barlines.children[w+s+v].smoothCount));this.errorMS.push(p*1e3),this.meanText.text=b3(this.errorMS).toFixed(2)+"ms",this.medianText.text=fh(this.errorMS).toFixed(2)+"ms",this.stddevText.text=Yb(this.errorMS).toFixed(2)+"ms",this.redraw()})}redraw(){for(const e of this.barlines.children)e.targetHeight=e.smoothCount*(lt-20)/this.max}adjustOffset(e){const t=this.manager.chartManager.gameStats;if(!t)return;const i=Math.round(t.getMedian()*1e3)/1e3;if(i==0)return;t.applyOffset(-i),this.barlines.children.forEach(o=>{o.smoothCount=0});const s=rt.getCollection(x.play.timingCollection),n=Math.round(s.maxWindowMS());t.getDataPoints().forEach(o=>{if(Li(o.judgement)||!cr(o.judgement)||o.error===null)return;const l=Math.round(o.error*1e3);for(let c=-3;c<=3;c++)this.barlines.children[l+n+c]&&(this.barlines.children[l+n+c].smoothCount+=Km[c+3],this.barlines.children[l+n+c].visible=!0,this.barlines.children[l+n+c].smoothCount>this.max&&(this.modeText.text=l+"ms",this.max=this.barlines.children[l+n+c].smoothCount))}),this.redraw();const a=e=="global"?x.play.offset:this.manager.app.chartManager.loadedChart.timingData.getOffset();if(e=="global")x.play.offset=ae(x.play.offset-i,3);else if(e=="song"){const o=this.manager.app.chartManager.loadedChart.timingData.hasChartOffset()?this.manager.app.chartManager.loadedChart.timingData:this.manager.app.chartManager.loadedSM.timingData;o.setOffset(ae(o.getOffset()-i,3))}Ee.create(`Adjusted ${e} offset from ${ae(a,3).toFixed(3)} to ${ae(a-i,3).toFixed(3)}`)}}class Bk extends ao{registeredSpinners=[];registeredToggles=[];registeredCheckboxes=[];changeRow;warpRow;fakeRow;view;collapseButton;lastSpeedMod=x.chart.CMod;rateSpinner;enteredMain=!1;constructor(e){super(e),this.visible=!1;const t=document.createElement("div");t.id="playback-options",x.general.showPlaybackOptions||t.classList.add("collapsed"),t.style.height="0px",document.getElementById("menubar")?.insertAdjacentElement("afterend",t),this.view=t;const i=document.createElement("button");i.classList.add("po-collapse"),i.tabIndex=-1;const s=Ce.getIcon("CHEVRON",18);i.appendChild(s),x.general.showPlaybackOptions&&i.classList.add("toggled"),this.collapseButton=i,i.onclick=()=>{x.general.showPlaybackOptions=!x.general.showPlaybackOptions,t.classList.toggle("collapsed"),i.classList.toggle("toggled",!t.classList.contains("collapsed")),i.blur()},i.style.display="none",Ze(i,{onShow(L){L.setContent((t.classList.contains("collapsed")?"Show ":"Hide ")+"playback options")}});const n=this.createRow("Zoom"),a=this.createSpinner({value:x.chart.zoom*100,step:10,altStep:2,min:10,hardMin:0,onChange:L=>x.chart.zoom=L/100,getValue:()=>x.chart.zoom*100});n.appendChild(a),t.appendChild(n);const o=document.createElement("div"),l=document.createElement("h1");l.innerText="a",o.appendChild(l),Re.createKeybindTooltip(n)`Adjust playfield size ${"zoomOut"}/${"zoomIn"}`,t.appendChild(this.createSeparator());const c=this.createRow("Playback"),u=this.createSpinner({value:x.audio.rate*100,step:10,altStep:2,min:10,hardMin:0,onChange:L=>x.audio.rate=L/100,getValue:()=>x.audio.rate*100});c.appendChild(u),t.appendChild(c),this.rateSpinner=this.registeredSpinners.at(-1),Re.createKeybindTooltip(c)`Adjust audio playback rate ${"rateDown"}/${"rateUp"}`;const h=document.createElement("div");h.style.gap="5px",h.style.display="flex",h.style.alignItems="center";const d=this.createCheckbox({getValue:()=>x.audio.assistTick,value:x.audio.assistTick,onEl:Ce.getIcon("CLAP",18),offEl:Ce.getIcon("X_CLAP",18),onChange:L=>x.audio.assistTick=L});h.appendChild(d),Re.createKeybindTooltip(d)`Toggle assist tick ${"assistTick"}`;const f=this.createCheckbox({getValue:()=>x.audio.metronome,value:x.audio.metronome,onEl:Ce.getIcon("METRONOME",18),offEl:Ce.getIcon("X_METRONOME",18),onChange:L=>x.audio.metronome=L});h.appendChild(f),t.appendChild(h),Re.createKeybindTooltip(f)`Toggle metronome ${"metronome"}`,t.appendChild(this.createSeparator());const p=this.createRow("Scroll"),m=Ce.getIcon("DBL_CHEVRON",16);m.style.padding="2px";const g=Ce.getIcon("DBL_CHEVRON",16);g.style.padding="2px",g.style.transform="rotate(180deg)";const b=this.createToggle({values:[m,g],value:x.chart.reverse?1:0,getValue:()=>x.chart.reverse?1:0,onChange:(L,W)=>x.chart.reverse=W!=0});p.appendChild(b),t.appendChild(p),Re.createKeybindTooltip(p)`Change scroll direction ${"reverse"}`;const w=this.createRow("Speedmod"),v=this.createToggle({values:["X","C"],value:x.chart.CMod?1:0,getValue:()=>x.chart.CMod?1:0,onChange:L=>x.chart.CMod=L!="X"});Re.createKeybindTooltip(v)`Change speedmod type ${"XMod"}/${"CMod"}`;const y=this.createSpinner({value:x.chart.speed,step:25,altStep:5,min:10,hardMin:10,hardMax:35e3,onChange:L=>x.chart.speed=L,getValue:()=>x.chart.speed});w.appendChild(v),w.appendChild(y),t.appendChild(w),Re.createKeybindTooltip(y)`Adjust scroll speed ${"increaseScrollSpeed"}/${"decreaseScrollSpeed"}`,t.appendChild(this.createSeparator());const E=this.createRow("Speed Changes"),C=this.createToggle({values:["On","Off"],value:x.chart.doSpeedChanges?0:1,getValue:()=>x.chart.doSpeedChanges?0:1,onChange:L=>x.chart.doSpeedChanges=L=="On"});E.appendChild(C),t.appendChild(E),Re.createKeybindTooltip(E)`Allow scroll/speed events (XMod only) ${"doSpeedChanges"}`,this.changeRow=E;const k=this.createRow("Warped Notes"),B=this.createCheckbox({getValue:()=>x.chart.hideWarpedArrows,value:x.chart.hideWarpedArrows,onEl:Ce.getIcon("X_EYE",18),offEl:Ce.getIcon("EYE",18),onChange:L=>x.chart.hideWarpedArrows=L});k.appendChild(B),t.appendChild(k),Re.createKeybindTooltip(k)`Show/hide warped notes (CMod only) ${"hideWarpedArrows"}`,this.warpRow=k;const M=this.createRow("Faked Notes"),U=this.createCheckbox({getValue:()=>x.chart.hideFakedArrows,value:x.chart.hideFakedArrows,onEl:Ce.getIcon("X_EYE",18),offEl:Ce.getIcon("EYE",18),onChange:L=>x.chart.hideFakedArrows=L});M.appendChild(U),t.appendChild(M),Re.createKeybindTooltip(M)`Show/hide faked notes (CMod only) ${"hideFakedArrows"}`,this.fakeRow=M;const V=Ce.getIcon("VOLUME",22);V.style.marginLeft="auto",V.style.marginRight="-16px",V.style.height="22px",V.style.width="22px",V.style.alignSelf="center",t.appendChild(V);const T=this.createRow("Master"),S=this.createSpinner({value:x.audio.masterVolume*100,step:5,altStep:1,min:0,max:200,hardMin:0,hardMax:200,onChange:L=>x.audio.masterVolume=L/100,getValue:()=>x.audio.masterVolume*100});T.appendChild(S),t.appendChild(T);const _=this.createRow("Song"),R=this.createSpinner({value:x.audio.songVolume*100,step:5,altStep:1,min:0,max:200,hardMin:0,hardMax:200,onChange:L=>x.audio.songVolume=L/100,getValue:()=>x.audio.songVolume*100});_.appendChild(R),t.appendChild(_);const q=this.createRow("FX"),F=this.createSpinner({value:x.audio.soundEffectVolume*100,step:5,altStep:1,min:0,max:200,hardMin:0,hardMax:200,onChange:L=>x.audio.soundEffectVolume=L/100,getValue:()=>x.audio.soundEffectVolume*100});q.appendChild(F),t.appendChild(q),this.changeRow.style.setProperty("--w",this.changeRow.offsetWidth+"px"),this.warpRow.style.setProperty("--w",this.warpRow.offsetWidth+"px"),this.fakeRow.style.setProperty("--w",this.fakeRow.offsetWidth+"px"),this.changeRow.classList.toggle("hidden",x.chart.CMod),this.warpRow.classList.toggle("hidden",!x.chart.CMod),this.fakeRow.classList.toggle("hidden",!x.chart.CMod),De.playbackOptions||(t.style.display="none",i.style.display="none")}createRow(e){const t=document.createElement("div");t.classList.add("playback-options-row");const i=document.createElement("div");return i.classList.add("playback-options-label"),i.innerText=e,t.appendChild(i),t}createSeparator(){const e=document.createElement("div");return e.classList.add("po-separator"),e}createSpinner(e){const t=document.createElement("div");t.classList.add("po-spinner");const i=c=>{let u=x.general.spinnerStep;return c.getModifierState("Shift")?u=e.altStep??(e.step!==void 0?e.step/10:x.general.spinnerStep):u=e.step??x.general.spinnerStep,u},s=document.createElement("button");s.classList.add("po-spinner-btn"),s.innerText="-",s.onclick=c=>{l.currentValue-=i(c),e.min!==void 0&&l.currentValue{l.currentValue+=i(c),e.max!==void 0&&l.currentValue>e.max&&(l.currentValue=e.max),o(!0)};const a=document.createElement("input");a.classList.add("po-spinner-input"),a.type="text";const o=(c=!0)=>{e.hardMin!==void 0&&l.currentValuee.hardMax&&(l.currentValue=e.hardMax),c&&e.onChange(l.currentValue),a.value=l.currentValue.toFixed()};a.onwheel=c=>{l.currentValue+=i(c)*c.deltaY/100*(x.chart.scroll.invertZoomScroll?-1:1)*x.chart.scroll.scrollSensitivity,e.max!==void 0&&l.currentValue>e.max&&(l.currentValue=e.max),e.min!==void 0&&l.currentValue{c.key=="Enter"&&a.blur(),c.key=="Escape"&&(l.currentValue=e.getValue(),o(!1))},a.onfocus=()=>{a.select()},a.onblur=()=>{const c=this.parseString(a);if(c==null){l.currentValue=e.getValue(),o(!1);return}l.currentValue=c,o()},a.ondragstart=c=>c.preventDefault(),this.registeredSpinners.push(l),t}createToggle(e){const t=document.createElement("div");if(t.classList.add("po-toggle"),e.values.length==0)return t;const i=document.createElement("div");i.classList.add("po-toggle-highlight");const s=e.values.map((l,c)=>{if(typeof l=="string"){const u=document.createElement("div");return u.classList.add("po-toggle-item"),u.innerText=l,t.appendChild(u),u.onclick=()=>{o.currentValue!=c&&(o.currentValue=c,a())},u}else return l.onclick=()=>{o.currentValue!=c&&(o.currentValue=c,a())},t.appendChild(l),l});t.style.visibility="hidden",document.body.appendChild(t);const n=l=>{i.style.left=s[l].getBoundingClientRect().left-s[0].getBoundingClientRect().left+"px",i.style.width=s[l].getBoundingClientRect().width+"px",i.style.height=s[l].getBoundingClientRect().height+"px"},a=(l=!0)=>{l&&e.onChange(e.values[o.currentValue],o.currentValue),[...t.querySelectorAll(".active")].forEach(c=>c.classList.remove("active")),n(o.currentValue),s[o.currentValue].classList.add("active")},o={currentValue:e.value??0,options:e,update:a};return this.registeredToggles.push(o),a(!1),t.remove(),t.style.visibility="",t.appendChild(i),t}createCheckbox(e){const t=document.createElement("div");t.classList.add("ico-checkbox");const i=(n=!0)=>{n&&e.onChange(s.currentValue),s.options.onEl.style.display=s.currentValue?"":"none",s.options.offEl.style.display=s.currentValue?"none":""},s={currentValue:e.value??!0,options:e,update:i};return t.onclick=()=>{s.currentValue=!s.currentValue,i()},this.registeredCheckboxes.push(s),i(!1),t.replaceChildren(s.options.onEl,s.options.offEl),t}update(){!this.enteredMain&&this.manager.chartManager.loadedChart!==void 0&&(this.enteredMain=!0,this.view.style.height="",this.collapseButton.style.display="",document.getElementById("menubar")?.appendChild(this.collapseButton));for(const t of this.registeredSpinners)t.currentValue!=t.options.getValue()&&document.activeElement!=t.input&&(t.currentValue=t.options.getValue(),t.update(!1));for(const t of this.registeredToggles)t.currentValue!=t.options.getValue()&&(t.currentValue=t.options.getValue(),t.update(!1));for(const t of this.registeredCheckboxes)t.currentValue!=t.options.getValue()&&(t.currentValue=t.options.getValue(),t.update(!1));const e=this.manager.chartManager.getMode()==K.Play||this.manager.chartManager.getMode()==K.Record;this.rateSpinner.btnMinus.disabled=e,this.rateSpinner.btnPlus.disabled=e,this.rateSpinner.input.disabled=e,x.chart.CMod!=this.lastSpeedMod&&(this.lastSpeedMod=x.chart.CMod,this.changeRow.classList.toggle("hidden",x.chart.CMod),this.warpRow.classList.toggle("hidden",!x.chart.CMod),this.fakeRow.classList.toggle("hidden",!x.chart.CMod))}parseString(e){try{const t=Lr.evaluate(e.value);return isFinite(t)?t:0}catch{return null}}}class Ya extends ve{pool=[];options;constructor(e){super(),this.options=e}createChild(){if(this.pool.length==0&&this.options.maxPoolSize!==void 0&&this.children.length>=this.options.maxPoolSize)return;const e=this.pool.pop()??this.options.create();return this.addChild(e),e._disabledTime=Date.now(),e}destroyChild(e){this.children.includes(e)&&(e.removeFromParent(),e.removeAllListeners(),e.eventMode="auto",e._disabledTime=Date.now(),this.pool.push(e))}destroyAll(){this.children.forEach(e=>e._disabledTime=Date.now()),this.pool.push(...this.children),this.children.forEach(e=>{e.removeAllListeners(),e.eventMode="auto"}),this.removeChildren()}_render(e){super._render(e);const t=Date.now();for(;t-this.pool[0]?._disabledTime>(this.options.destroyTimer??5e3);)this.pool.shift().destroy()}}const kr={BPMS:9182254,STOPS:4934913,DELAYS:217453,WARPS:9243998,FAKES:4868682,COMBOS:939078,SPEEDS:2968693,LABELS:7747359,SCROLLS:3557006,TIMESIGNATURES:5392684,TICKCOUNTS:1594906,BGCHANGES:8460415,FGCHANGES:8857115,ATTACKS:1856083};class Rk extends ve{renderer;areaPool=new Ya({create:()=>{const e=new Ne(te.WHITE);return Object.assign(e,{alpha:.2,width:this.renderer.chart.gameType.notefieldWidth+128}),e.anchor.set(.5,0),e}});timingAreaMap=new Map;timingEvents=[];timingDirty=!0;constructor(e){super(),this.renderer=e,this.addChild(this.areaPool);const t=()=>this.timingDirty=!0;H.on("timingModified",t),this.on("destroyed",()=>H.off("timingModified",t))}update(e,t){this.timingDirty&&(this.timingAreaMap.clear(),this.areaPool.destroyAll(),this.timingDirty=!1,this.timingEvents=this.renderer.chart.timingData.getTimingData("STOPS","WARPS","DELAYS","FAKES")),this.visible=this.renderer.shouldDisplayBarlines();for(const i of this.timingEvents){if(i.beat>t)break;if(this.shouldDrawEvent(i,e,t)&&!this.timingAreaMap.has(i)){const s=this.areaPool.createChild();if(!s)break;s.tint=kr[i.type],this.timingAreaMap.set(i,s)}}for(const[i,s]of this.timingAreaMap.entries()){if(!this.shouldDrawEvent(i,e,t)){this.timingAreaMap.delete(i),this.areaPool.destroyChild(s);continue}let n=x.chart.CMod?this.renderer.getYPosFromSecond(i.second):this.renderer.getYPosFromBeat(i.beat),a=n;switch(i.type){case"STOPS":case"DELAYS":{x.chart.CMod&&i.value>0?a=this.renderer.getYPosFromSecond(i.second+i.value):i.value<0&&(a=this.renderer.getYPosFromBeat(this.renderer.chart.getBeatFromSeconds(i.second+1e-4)));break}case"FAKES":{a=this.renderer.getYPosFromBeat(i.beat+i.value);break}case"WARPS":{x.chart.CMod||(a=this.renderer.getYPosFromBeat(i.beat+i.value));break}}a0)||e.type=="WARPS"&&x.chart.CMod?!1:e.beat<=i}}const Je={chart:{title:"Chart Timing Column",desc:"Events in this column are only used by this difficulty",convertText:"Convert to song timing",buttonOne:{text:"Copy chart events",tooltip:"Copies chart events from this column to song timing",tooltipAll:"Copies offset and chart events from all columns to song timing",action:(r,e)=>{r.copyColumnsToSimfile([e])},actionAll:r=>{r.copyAllToSimfile()}},buttonTwo:{text:"Delete chart events",tooltip:"Reverts this column to the events in song timing, deleting any difficulty-specific events",tooltipAll:"Reverts offset and all columns to the events in song timing, deleting any difficulty-specific events",action:(r,e)=>{r.deleteColumns([e])},actionAll:r=>{r.deleteAllChartSpecific()}}},song:{title:"Song Timing Column",desc:"Events in this column are used by all difficulties (unless overridden)",convertText:"Convert to chart timing",buttonOne:{text:"Copy song events",tooltip:"Copies song events from this column to chart timing",tooltipAll:"Copies offset and song events from all columns to chart timing",action:(r,e)=>{r.copyColumnsFromSimfile([e])},actionAll:r=>{r.copyAllFromSimfile()}},buttonTwo:{text:"Don't copy song events",tooltip:"Converts this column to chart timing without copying any song events",tooltipAll:"Converts offset and all columns to chart timing without copying any song events",action:(r,e)=>{r.createChartColumns([e])},actionAll:r=>{r.createEmptyData()}}}},bs={chart:{title:"Chart Specific Offset",desc:"This offset is only used by this difficulty",convertText:"Convert to song timing",buttonOne:{text:"Copy chart offset",tooltip:"Sets the song offset to this chart offset",action:r=>{r.copyOffsetToSimfile()}},buttonTwo:{text:"Revert to song offset",tooltip:"Reverts to the song offset, removing the chart-specific offset",action:r=>{r.removeChartOffset()}}},song:{title:"Song Specific Offset",desc:"This offset is used by all difficulties (unless overridden)",convertText:"Convert to chart timing",buttonOne:{text:"Copy song offset",tooltip:"Copies song offset to the chart offset",action:r=>{r.setOffset(r.getOffset())}},buttonTwo:{text:"Don't copy song offset",tooltip:"Sets the new chart offset to 0",action:r=>{r.setOffset(0)}}}};class Dc extends oo{static app;static timingGrid;static onTimingChange=this.updateValues.bind(this);static open(e){this.active||(this.app=e,super._open({title:"Manage Split Timing",editable:!1,attach:document.getElementById("split-timing"),cancelableOnOpen:!0,clickHandler:t=>{!this.popup?.contains(t.target)&&!document.getElementById("split-timing")?.contains(t.target)&&this.close()}}),H.on("timingModified",this.onTimingChange))}static buildContent(){this.popup.id="split-timing";const e=document.createElement("div");e.classList.add("split-timing-grid"),this.timingGrid=e;const t=this.buildModifyGrid();this.updateValues(),this.view.appendChild(e),this.view.appendChild(t)}static updateValues(){this.timingGrid.replaceChildren();const e=document.createElement("div");e.classList.add("split-timing-row"),e.style.backgroundColor="rgba(0, 0, 0, 0.3";const t=document.createElement("div");t.innerText="OFFSET";const i=this.app.chartManager.loadedChart.timingData.hasChartOffset(),s=i?"chart":"song",n=document.createElement("div");n.innerText=i?"C":"S",Ze(n,{content:bs[s].desc});const a=document.createElement("button");a.innerText=bs[s].buttonOne.text,Ze(a,{content:bs[s].buttonOne.tooltip}),a.onclick=()=>{bs[s].buttonOne.action(this.app.chartManager.loadedChart.timingData)};const o=document.createElement("button");o.innerText=bs[s].buttonTwo.text,o.classList.toggle("delete",i),Ze(o,{content:bs[s].buttonTwo.tooltip}),o.onclick=()=>{bs[s].buttonTwo.action(this.app.chartManager.loadedChart.timingData)},e.replaceChildren(t,n,a,o),this.timingGrid.appendChild(e);for(const l of Ot)this.timingGrid.appendChild(this.buildRow(l));return e}static buildRow(e){const t=document.createElement("div");t.classList.add("split-timing-row"),t.style.backgroundColor=Hl(kr[e].toString(16).padStart(6,"0"),"#333333",.75);const i=document.createElement("div");i.innerText=e;const s=this.app.chartManager.loadedChart.timingData.isPropertyChartSpecific(e),n=s?"chart":"song",a=document.createElement("div");a.innerText=s?"C":"S",Ze(a,{content:Je[n].desc});const o=document.createElement("button");o.innerText=Je[n].buttonOne.text,Ze(o,{content:Je[n].buttonOne.tooltip}),o.onclick=()=>{Je[n].buttonOne.action(this.app.chartManager.loadedChart.timingData,e)};const l=document.createElement("button");return l.innerText=Je[n].buttonTwo.text,l.classList.toggle("delete",s),Ze(l,{content:Je[n].buttonTwo.tooltip}),l.onclick=()=>{Je[n].buttonTwo.action(this.app.chartManager.loadedChart.timingData,e)},t.replaceChildren(i,a,o,l),t}static buildModifyGrid(){const e=document.createElement("div");e.classList.add("split-timing-grid");const t=document.createElement("div");t.classList.add("split-timing-modify-row"),t.style.backgroundColor="rgba(0, 0, 0, 0.3";const i=document.createElement("div");i.innerText="Convert all to chart timing";const s=document.createElement("button");s.innerText=Je.song.buttonOne.text,Ze(s,{content:Je.song.buttonOne.tooltipAll}),s.onclick=()=>{Je.song.buttonOne.actionAll(this.app.chartManager.loadedChart.timingData),s.blur()};const n=document.createElement("button");n.innerText=Je.song.buttonTwo.text,n.classList.add("delete"),Ze(n,{content:Je.song.buttonTwo.tooltipAll}),n.onclick=()=>{Je.song.buttonTwo.actionAll(this.app.chartManager.loadedChart.timingData),n.blur()},t.replaceChildren(i,s,n);const a=document.createElement("div");a.classList.add("split-timing-modify-row"),a.style.backgroundColor="rgba(0, 0, 0, 0.3";const o=document.createElement("div");o.innerText="Convert all to song timing";const l=document.createElement("button");l.innerText=Je.chart.buttonOne.text,Ze(l,{content:Je.chart.buttonOne.tooltipAll}),l.onclick=()=>{Je.chart.buttonOne.actionAll(this.app.chartManager.loadedChart.timingData),l.blur()};const c=document.createElement("button");return c.innerText=Je.chart.buttonTwo.text,Ze(c,{content:Je.chart.buttonTwo.tooltipAll}),c.onclick=()=>{Je.chart.buttonTwo.actionAll(this.app.chartManager.loadedChart.timingData),c.blur()},a.replaceChildren(o,l,c),e.replaceChildren(t,a),e}static close(){!this.popup||!this.active||super.close()}}class Ic extends oo{static draggedElement;static dragOffsetX=0;static dragOffsetY=0;static grid;static leftovers;static boundaryCache=[];static open(){this.active||super._open({title:"Reorder Timing Tracks",editable:!1,attach:document.getElementById("toggle-tracks"),cancelableOnOpen:!0,clickHandler:e=>{!this.popup?.contains(e.target)&&!this.draggedElement?.contains(e.target)&&!document.getElementById("toggle-tracks")?.contains(e.target)&&this.close()}})}static buildContent(){this.popup.id="timing-track-order";const e=document.createElement("div");e.classList.add("track-grid-options");const t=document.createElement("button");t.classList.add("delete"),t.innerText="Reset",t.onclick=()=>{x.chart.timingEventOrder.left=structuredClone(za.chart.timingEventOrder.left),x.chart.timingEventOrder.right=structuredClone(za.chart.timingEventOrder.right),this.clearBoundaries(),this.grid?.replaceChildren(),this.leftovers?.replaceChildren();const n=[...Ot];for(const o of x.chart.timingEventOrder.left){const l=this.makeDraggableTrack(o);l.classList.add("left"),this.grid?.appendChild(l),n.splice(n.indexOf(o),1)}const a=document.createElement("div");a.classList.add("draggable-track"),a.innerText="PLAYFIELD",a.style.backgroundColor="#2D2D2D",a.style.padding="20px 10px",a.style.writingMode="horizontal-tb",a.addEventListener("mousedown",o=>this.startDragging(o,a)),a.dataset.type="PLAYFIELD",this.grid?.appendChild(a);for(const o of x.chart.timingEventOrder.right){const l=this.makeDraggableTrack(o);l.classList.add("right"),this.grid?.appendChild(l),n.splice(n.indexOf(o),1)}for(const o of n)this.leftovers?.appendChild(this.makeLeftoverTrack(o))},this.grid=document.createElement("div"),this.grid.classList.add("track-grid"),this.view.appendChild(this.grid),this.view.appendChild(e);const i=[...Ot];for(const n of x.chart.timingEventOrder.left){const a=this.makeDraggableTrack(n);a.classList.add("left"),this.grid.appendChild(a),i.splice(i.indexOf(n),1)}const s=document.createElement("div");s.classList.add("draggable-track"),s.innerText="PLAYFIELD",s.style.backgroundColor="#2D2D2D",s.style.padding="20px 10px",s.style.writingMode="horizontal-tb",s.addEventListener("mousedown",n=>this.startDragging(n,s)),s.dataset.type="PLAYFIELD",this.grid.appendChild(s);for(const n of x.chart.timingEventOrder.right){const a=this.makeDraggableTrack(n);a.classList.add("right"),this.grid.appendChild(a),i.splice(i.indexOf(n),1)}this.leftovers=document.createElement("div"),this.leftovers.classList.add("track-selector"),e.appendChild(this.leftovers),e.appendChild(t);for(const n of i)this.leftovers.appendChild(this.makeLeftoverTrack(n))}static makeDraggableTrack(e){const t=document.createElement("div");t.classList.add("draggable-track");const i=document.createElement("div");i.classList.add("draggable-track-text"),i.innerText=e,t.style.backgroundColor=Hl(kr[e].toString(16).padStart(6,"0"),"#333333",.7),t.appendChild(i);let s=!0;const n=Ce.getIcon("TRASH",16);return n.addEventListener("click",()=>{if(!s)return;s=!1,this.deleteTrack(e),t.classList.add("exiting"),setTimeout(()=>t.remove(),400);const a=this.makeLeftoverTrack(e);a.classList.add("entering"),setTimeout(()=>a.classList.remove("entering"),400),this.leftovers?.appendChild(a),this.clearBoundaries()}),t.appendChild(n),t.addEventListener("mousedown",a=>{s&&(n.contains(a.target)||this.startDragging(a,t))}),t.dataset.type=e,t}static makeLeftoverTrack(e){const t=document.createElement("div");t.classList.add("leftover-track");const i=Ce.getIcon("PLUS",8);t.append(i);const s=document.createElement("div");s.classList.add("leftover-track-text"),s.innerText=e,t.style.backgroundColor=Hl(kr[e].toString(16).padStart(6,"0"),"#333333",.7),t.appendChild(s);let n=0,a=0,o=!1,l=!1;return t.addEventListener("mousedown",()=>{o=!0}),t.addEventListener("mousemove",c=>{if(!(!o||l)&&(n+=c.movementX,a+=c.movementY,n*n+a*a>15)){l=!0;const u=this.makeDraggableTrack(e);this.grid?.appendChild(u),this.clearBoundaries();const h=t.getBoundingClientRect(),d=this.getClosestSlot(h.left),f=x.chart.timingEventOrder.left.concat(["PLAYFIELD"],x.chart.timingEventOrder.right);f.splice(d,0,e),this.saveOptions(f),f.forEach(p=>{const m=this.grid?.querySelector(`div[data-type=${p}]`);this.grid?.appendChild(m),p!="PLAYFIELD"&&(m?.classList.remove("left","right"),x.chart.timingEventOrder.left.includes(p)&&m?.classList.add("left"),x.chart.timingEventOrder.right.includes(p)&&m?.classList.add("right"))}),this.startDragging(c,u,c.clientX,c.clientY),x.general.smoothAnimations?(t.style.width=t.clientWidth+"px",t.style.transition="0.4s cubic-bezier(0, 0.91, 0.34, 1.05)",setTimeout(()=>{t.style.width="0px",t.style.opacity="0",t.style.padding="0",t.style.fontSize="0"},10),setTimeout(()=>t.remove(),400)):t.remove()}}),t.addEventListener("mouseup",()=>{if(!o||l)return;l=!0,x.chart.timingEventOrder.right.push(e),x.general.smoothAnimations?(t.style.width=t.clientWidth+"px",t.style.transition="0.4s cubic-bezier(0, 0.91, 0.34, 1.05)",setTimeout(()=>{t.style.width="0px",t.style.opacity="0",t.style.padding="0",t.style.fontSize="0"},10),setTimeout(()=>t.remove(),400)):t.remove();const c=this.makeDraggableTrack(e);c.classList.add("entering"),c.classList.add("right"),setTimeout(()=>c.classList.remove("entering"),400),this.grid?.appendChild(c),this.clearBoundaries()}),t}static startDragging(e,t,i,s){if(!this.popup)return;this.draggedElement=t.cloneNode(!0),this.draggedElement.style.position="fixed";const n=t.getBoundingClientRect(),a=this.popup.getBoundingClientRect();!i||!s?(this.dragOffsetX=e.clientX-n.left,this.dragOffsetY=e.clientY-n.top,this.draggedElement.style.left=n.left-a.left+"px",this.draggedElement.style.top=n.top-a.top+"px"):(this.dragOffsetX=n.width/2,this.dragOffsetY=n.height/4*3,this.draggedElement.style.left=i-n.width/2-a.left+"px",this.draggedElement.style.top=s-n.height/4*3-a.top+"px",this.draggedElement.classList.add("entering")),this.draggedElement.style.boxShadow="6px 6px 6px #222",this.draggedElement.style.transition="none",t.style.opacity="0.03",this.popup.appendChild(this.draggedElement);const o=x.chart.timingEventOrder.left.concat(["PLAYFIELD"],x.chart.timingEventOrder.right),l=t.dataset.type;let c=o.indexOf(l);const u=o.indexOf(l),h=f=>{this.draggedElement.style.left=f.clientX-this.dragOffsetX-a.left+"px",this.draggedElement.style.top=f.clientY-this.dragOffsetY-a.top+"px";let p=this.getClosestSlot(f.clientX-this.dragOffsetX);Math.abs(f.clientY-this.dragOffsetY-a.top-(n.top-a.top))>140&&(p=u),c!=p&&(o.splice(c,1),o.splice(p,0,l),this.saveOptions(o),o.forEach(m=>{const g=this.grid?.querySelector(`div[data-type=${m}]`);this.grid?.appendChild(g),m!="PLAYFIELD"&&(g?.classList.remove("left","right"),x.chart.timingEventOrder.left.includes(m)&&g?.classList.add("left"),x.chart.timingEventOrder.right.includes(m)&&g?.classList.add("right"))}),l!="PLAYFIELD"&&(this.draggedElement?.classList.remove("left","right"),x.chart.timingEventOrder.left.includes(l)&&this.draggedElement?.classList.add("left"),x.chart.timingEventOrder.right.includes(l)&&this.draggedElement?.classList.add("right")),c=p)};window.addEventListener("mousemove",h);const d=()=>{this.draggedElement?.remove(),this.draggedElement=void 0,window.removeEventListener("mousemove",h),t.style.opacity="",this.clearBoundaries(),window.removeEventListener("mouseup",d)};window.addEventListener("mouseup",d)}static saveOptions(e){const t=e.indexOf("PLAYFIELD");t!=-1&&(x.chart.timingEventOrder.left=e.slice(0,t),x.chart.timingEventOrder.right=e.slice(t+1))}static deleteTrack(e){const t=x.chart.timingEventOrder.left.indexOf(e);t!=-1&&x.chart.timingEventOrder.left.splice(t,1);const i=x.chart.timingEventOrder.right.indexOf(e);i!=-1&&x.chart.timingEventOrder.right.splice(i,1),x.chart.timingEventOrder.left=[...x.chart.timingEventOrder.left],x.chart.timingEventOrder.right=[...x.chart.timingEventOrder.right]}static getClosestSlot(e){this.boundaryCache.length==0&&this.getBoundaries();let t=-1,i=999999,s=999999;for(let n=0;ns)break;s=a}return t}static getBoundaries(){if(this.grid){for(const e of this.grid.children)this.boundaryCache.push([e,e.getBoundingClientRect()]);this.boundaryCache.sort((e,t)=>e[1].left-t[1].left)}}static clearBoundaries(){this.boundaryCache=[]}static close(){!this.popup||!this.active||(super.close(),this.clearBoundaries())}}class Fk extends ao{view;playbackBar;skipStart;skipEnd;play;playIcon;stopIcon;record;playtest;timeCounter;beatCounter;min;sec;millis;beat;beatDropdown;editBar;editSteps;editTiming;stepsContainer;timingContainer;editChoiceContainer;addTimingEvent;splitTiming;toggleTimingTracks;detectSync;offsetCounter;offset;noteArrows=[];noteArrowMask;lastTime=null;lastBeat=null;lastOffset=null;lastMode=K.Edit;lastTimingMode=Ie.Off;lastHover=0;lastPlaying=!1;hovering=!1;trackingMovement=!0;idleFrames=0;lastBounds;constructor(e){super(e);const t=document.createElement("div");t.id="status-widget",document.getElementById("view-wrapper")?.appendChild(t),De.viewMode&&t.classList.add("collapsed"),this.playbackBar=document.createElement("div"),this.playbackBar.classList.add("playback-bar"),this.editBar=document.createElement("div"),this.editBar.classList.add("edit-bar"),this.skipStart=document.createElement("button"),this.skipStart.tabIndex=-1;const i=Ce.getIcon("SKIP_START",36);this.skipStart.appendChild(i),this.skipStart.onclick=()=>{this.manager.chartManager.beat=Math.max(0,this.manager.chartManager.loadedChart.getBeatFromSeconds(0)),this.skipStart.blur()},Re.createKeybindTooltip(this.skipStart)`Skip to start ${"jumpSongStart"}`,this.skipEnd=document.createElement("button"),this.skipEnd.tabIndex=-1;const s=Ce.getIcon("SKIP_END",36);this.skipEnd.appendChild(s),this.skipEnd.onclick=()=>{this.manager.chartManager.beat=this.manager.chartManager.loadedChart.getBeatFromSeconds(this.manager.chartManager.chartAudio.getSongLength()),this.skipEnd.blur()},Re.createKeybindTooltip(this.skipEnd)`Skip to end ${"jumpSongEnd"}`,this.play=document.createElement("button"),this.play.tabIndex=-1;const n=Ce.getIcon("PLAY",40);this.play.appendChild(n),this.playIcon=n;const a=Ce.getIcon("STOP",32);this.play.appendChild(a),this.stopIcon=a,this.stopIcon.style.display="none",this.play.onclick=()=>{(this.manager.chartManager.getMode()==K.Record||this.manager.chartManager.getMode()==K.Play)&&this.manager.chartManager.setMode(K.Edit),this.manager.chartManager.playPause(),this.play.blur()},Re.createKeybindTooltip(this.play)`Play/Pause ${"playback"}`,this.record=document.createElement("button"),this.record.tabIndex=-1;const o=Ce.getIcon("RECORD",36,void 0,"red");this.record.appendChild(o),this.record.onclick=()=>{this.manager.chartManager.setMode(K.Record),this.record.blur()},Re.createKeybindTooltip(this.record)`Record ${"recordMode"}`,(De.viewMode||!De.recordMode)&&(this.record.style.display="none"),this.playtest=document.createElement("button"),this.playtest.tabIndex=-1;const l=Ce.getIcon("PLAYTEST",30);this.playtest.appendChild(l),this.playtest.onclick=()=>{this.manager.chartManager.setMode(K.Play),this.playtest.blur()},Re.createKeybindTooltip(this.playtest)`Playtest ${"playMode"}`,De.playMode||(this.playtest.style.display="none");const c=document.createElement("div");c.classList.add("playback-separator"),this.timeCounter=document.createElement("div"),this.timeCounter.classList.add("playback-counter");const u=document.createElement("div");u.style.display="flex",u.classList.add("playback-counter-main");const h=document.createElement("div");h.classList.add("inlineEdit"),h.innerText="00",h.spellcheck=!1,h.contentEditable="true",h.style.maxWidth="27px",h.onkeydown=_=>{_.key=="Enter"&&h.blur(),_.key=="Escape"&&(h.innerText=Math.floor(Math.abs(this.manager.chartManager.time)/60).toString().padStart(2,"0"),h.blur())},h.onfocus=()=>setTimeout(()=>this.selectText(h),25),h.onblur=()=>this.updateTime(),h.ondragstart=_=>_.preventDefault();const d=document.createElement("div");d.classList.add("inlineEdit"),d.innerText="00",d.spellcheck=!1,d.contentEditable="true",d.style.maxWidth="18px",d.onkeydown=_=>{_.key=="Enter"&&d.blur(),_.key=="Escape"&&(d.innerText=Math.floor(Math.abs(this.manager.chartManager.time)%60).toString().padStart(2,"0"),d.blur())},d.onfocus=()=>setTimeout(()=>this.selectText(d),25),d.onblur=()=>this.updateTime(),d.ondragstart=_=>_.preventDefault();const f=document.createElement("div");f.classList.add("inlineEdit"),f.innerText="000",f.spellcheck=!1,f.contentEditable="true",f.style.maxWidth="27px",f.onkeydown=_=>{_.key=="Enter"&&f.blur(),_.key=="Escape"&&(f.innerText=(ae(Math.abs(this.manager.chartManager.time)%1,3)*1e3).toString().padStart(3,"0"),f.blur())},f.onfocus=()=>setTimeout(()=>this.selectText(f),25),f.onblur=()=>this.updateTime(),f.ondragstart=_=>_.preventDefault(),this.min=h,this.sec=d,this.millis=f;const p=document.createElement("div");p.classList.add("playback-counter-label"),p.innerText="Time",u.appendChild(h),u.appendChild(document.createTextNode(":")),u.appendChild(d),u.appendChild(document.createTextNode(".")),u.appendChild(f),this.timeCounter.appendChild(u),this.timeCounter.appendChild(p);const m=document.createElement("div");m.classList.add("playback-separator"),this.beatCounter=document.createElement("div"),this.beatCounter.classList.add("playback-counter");const g=document.createElement("div");g.classList.add("playback-counter-main","inlineEdit"),g.innerText="0.000",g.spellcheck=!1,g.contentEditable="true",g.onkeydown=_=>{if(_.key=="Enter"&&g.blur(),_.key=="Escape"){if(this.beatDropdown.value=="Measure"){const R=this.manager.chartManager.loadedChart?.timingData?.getMeasure(this.manager.chartManager.beat)??this.manager.chartManager.beat/4;g.innerText=ae(R,3).toFixed(3)}else g.innerText=ae(this.manager.chartManager.beat,3).toFixed(3);g.blur()}},g.onfocus=()=>{setTimeout(()=>this.selectText(g),25)},g.onblur=()=>this.updateBeat(),g.ondragstart=_=>_.preventDefault(),this.beat=g,this.beatDropdown=Oi.create(["Beat","Measure"],"Beat"),this.beatDropdown.view.querySelector(".dropdown-selected").classList.add("playback-counter-label"),this.beatCounter.appendChild(g),this.beatCounter.appendChild(this.beatDropdown.view),this.beatDropdown.onChange(()=>{if(this.beatDropdown.value=="Measure"){const _=this.manager.chartManager.loadedChart?.timingData?.getMeasure(this.manager.chartManager.beat)??this.manager.chartManager.beat/4;g.innerText=ae(_,3).toFixed(3)}else g.innerText=ae(this.manager.chartManager.beat,3).toFixed(3)}),this.playbackBar.appendChild(this.skipStart),this.playbackBar.appendChild(this.skipEnd),this.playbackBar.appendChild(this.play),this.playbackBar.appendChild(this.record),this.playbackBar.appendChild(this.playtest),this.playbackBar.appendChild(c),this.playbackBar.appendChild(this.timeCounter),this.playbackBar.appendChild(m),this.playbackBar.appendChild(this.beatCounter),this.editSteps=document.createElement("button"),this.editSteps.tabIndex=-1,this.editSteps.classList.add("edit-fancy-button");const b=Ce.getIcon("FEET",24);b.style.marginBottom="2px",this.editSteps.appendChild(b),this.editSteps.appendChild(document.createTextNode("Edit Steps")),this.editSteps.onclick=()=>{this.manager.chartManager.editTimingMode=Ie.Off,this.editSteps.blur()},this.editSteps.classList.add("active"),this.editTiming=document.createElement("button"),this.editTiming.tabIndex=-1,this.editTiming.classList.add("edit-fancy-button");const w=Ce.getIcon("METRONOME",24);w.style.marginBottom="2px",this.editTiming.appendChild(w),this.editTiming.appendChild(document.createTextNode("Edit Timing")),this.editTiming.onclick=()=>{this.manager.chartManager.editTimingMode=Ie.Edit,this.editTiming.blur()};const v=document.createElement("div");v.classList.add("playback-separator");const y=document.createElement("div");y.classList.add("edit-bar-left"),y.appendChild(this.editSteps),y.appendChild(this.editTiming),y.appendChild(v),this.editBar.appendChild(y),this.editChoiceContainer=document.createElement("div"),this.editChoiceContainer.classList.add("edit-choice-container"),this.stepsContainer=document.createElement("div"),this.stepsContainer.classList.add("edit-steps-container"),this.timingContainer=document.createElement("div"),this.timingContainer.classList.add("edit-timing-container"),this.editChoiceContainer.appendChild(this.stepsContainer),this.editChoiceContainer.appendChild(this.timingContainer),this.addTimingEvent=document.createElement("button"),this.addTimingEvent.tabIndex=-1;const E=Ce.getIcon("ADD_EVENT",32);this.addTimingEvent.appendChild(E),this.addTimingEvent.onclick=()=>{this.manager.chartManager.editTimingMode==Ie.Add?this.manager.chartManager.editTimingMode=Ie.Edit:this.manager.chartManager.editTimingMode=Ie.Add,this.addTimingEvent.blur()},this.timingContainer.appendChild(this.addTimingEvent),Re.createKeybindTooltip(this.addTimingEvent)`Add timing events ${"toggleAddTiming"}`;const C=document.createElement("div");C.classList.add("playback-separator"),this.timingContainer.appendChild(C),this.splitTiming=document.createElement("button"),this.splitTiming.tabIndex=-1;const k=Ce.getIcon("SPLIT_TIMING",32);this.splitTiming.appendChild(k),this.splitTiming.onclick=()=>{Dc.active?Dc.close():Dc.open(this.manager.app),this.splitTiming.blur()},this.splitTiming.id="split-timing",this.timingContainer.appendChild(this.splitTiming),Ze(this.splitTiming,{content:"Manage split timing"}),this.toggleTimingTracks=document.createElement("button"),this.toggleTimingTracks.tabIndex=-1;const B=Ce.getIcon("EYE",32);this.toggleTimingTracks.appendChild(B),this.toggleTimingTracks.onclick=()=>{Ic.active?Ic.close():Ic.open(),this.toggleTimingTracks.blur()},this.toggleTimingTracks.id="toggle-tracks",this.timingContainer.appendChild(this.toggleTimingTracks),Ze(this.toggleTimingTracks,{content:"Toggle timing track visibility"}),this.detectSync=document.createElement("button"),this.detectSync.tabIndex=-1;const M=Ce.getIcon("DETECT_SYNC",32);this.detectSync.appendChild(M),this.detectSync.onclick=()=>{this.manager.app.windowManager.openWindow(new by(this.manager.app)),this.detectSync.blur()},this.detectSync.id="detect-sync",this.timingContainer.appendChild(this.detectSync),Re.createKeybindTooltip(this.detectSync)`Detect audio sync ${"detectSync"}`;const U=document.createElement("div");U.classList.add("playback-separator"),this.timingContainer.appendChild(U),this.offsetCounter=document.createElement("div"),this.offsetCounter.classList.add("playback-counter");const V=document.createElement("div");V.classList.add("playback-counter-label"),V.innerText="Offset";const T=document.createElement("div");T.classList.add("playback-counter-main","inlineEdit"),T.innerText="0.000",T.spellcheck=!1,T.contentEditable="true",T.onkeydown=_=>{_.key=="Enter"&&T.blur(),_.key=="Escape"&&(T.innerText=ae(this.manager.chartManager.loadedChart?.timingData.getOffset()??0,3).toFixed(3),T.blur())},T.tabIndex=-1,T.onfocus=()=>{setTimeout(()=>this.selectText(T),25)},T.onblur=()=>this.updateOffset(),T.ondragstart=_=>_.preventDefault(),this.offset=T,this.offsetCounter.appendChild(T),this.offsetCounter.appendChild(V),this.timingContainer.appendChild(this.offsetCounter),this.editBar.appendChild(this.editChoiceContainer);const S=document.createElement("div");S.classList.add("note-placeholder-right"),this.stepsContainer.appendChild(S),H.on("resize",()=>{this.trackingMovement=!0,this.idleFrames=5}),H.on("noteskinLoaded",()=>{this.stepsContainer.replaceChildren(),this.noteArrows.forEach(R=>{this.removeChild(R.sprite),this.removeChild(R.bg),this.removeChild(R.highlight)}),this.noteArrows=[];const _=document.createElement("div");if(_.classList.add("note-placeholder-right"),this.stepsContainer.appendChild(_),!!this.manager.chartManager.loadedChart){for(const R of this.manager.chartManager.loadedChart.gameType.editNoteTypes){if(wd.includes(R))continue;const q=this.manager.chartManager.chartView.getNotefield().createNote({type:R,beat:0,col:0,quant:4,second:0,warped:!1,fake:!1});q.scale.set(.5);const F=new Ne(te.WHITE);et(F,"widget-bg"),F.width=48,F.height=48,F.anchor.set(.5);const L=new zt("noBorder");L.alpha=0,L.width=48,L.height=48,L.pivot.x=24,L.pivot.y=24;const W=document.createElement("button");W.tabIndex=-1,W.style.height="48px",W.style.width="48px",W.classList.add("note-placeholder"),W.onclick=()=>{this.manager.chartManager.setEditingNoteType(R),W.blur()},Re.createKeybindTooltip(W)`${"\\"+R} ${"noteType"+R}`;const z={element:W,sprite:q,type:R,bg:F,highlight:L,hovered:!1};W.onmouseover=()=>{z.hovered=!0},W.onmouseleave=()=>{z.hovered=!1},this.addChild(F),this.addChild(q),this.addChild(L);const O=W.getBoundingClientRect();q.position.y=O.top-this.manager.app.view.clientHeight/2-this.manager.app.view.getBoundingClientRect().top+24,q.position.x=O.left-this.manager.app.view.clientWidth/2+24,F.position=q.position,this.noteArrows.push(z)}this.stepsContainer.replaceChildren(...this.noteArrows.map(R=>R.element),_),this.trackingMovement=!0,this.idleFrames=5}}),this.noteArrowMask=new Ne(te.WHITE),this.noteArrowMask.height=48,this.noteArrowMask.width=2500,this.noteArrowMask.anchor.y=1,this.noteArrowMask.anchor.x=.5,this.addChild(this.noteArrowMask),this.mask=this.noteArrowMask,t.onmouseenter=()=>{this.lastHover=Date.now(),this.hovering=!0,this.view.style.opacity="",this.view.style.transition=""},t.onmouseleave=()=>this.hovering=!1,t.appendChild(this.playbackBar),t.appendChild(this.editBar),this.view=t,t.style.display="none"}update(){this.view.style.display=this.manager.chartManager.loadedSM&&De.status?"":"none";const e=this.manager.chartManager.time;this.lastTime!=e&&(document.activeElement!=this.min&&(this.min.innerText=(e<0?"-":"")+Math.floor(Math.abs(e)/60).toString().padStart(2,"0")),document.activeElement!=this.sec&&(this.sec.innerText=Math.floor(Math.abs(e)%60).toString().padStart(2,"0")),document.activeElement!=this.millis&&(this.millis.innerText=(ae(Math.abs(e)%1,3)*1e3).toString().padStart(3,"0")),this.lastTime=e);const t=this.manager.chartManager.beat;if(this.lastBeat!=t){if(document.activeElement!=this.beat)if(this.beatDropdown.value=="Measure"){const h=this.manager.chartManager.loadedChart?.timingData?.getMeasure(t)??t/4;this.beat.innerText=ae(h,3).toFixed(3)}else this.beat.innerText=ae(t,3).toFixed(3);this.lastBeat=t}const i=this.manager.chartManager.loadedChart?.timingData.getOffset()??0;this.lastOffset!=i&&document.activeElement!=this.offset&&(this.offset.innerText=ae(i,3).toFixed(3));const s=this.manager.chartManager.getMode(),n=this.manager.chartManager.editTimingMode;if(this.lastMode!=s){switch(s){case K.Edit:this.skipStart.disabled=!1,this.skipEnd.disabled=!1,this.record.disabled=!1,this.playtest.disabled=!1,this.min.contentEditable="true",this.sec.contentEditable="true",this.millis.contentEditable="true",this.beat.contentEditable="true",this.offset.contentEditable="true",this.record.style.background="",this.playtest.style.background="",this.view.style.opacity="",this.view.style.transition="",this.view.classList.remove("collapsed"),this.beatDropdown.disabled=!1;break;case K.Record:this.lastHover=Date.now(),this.skipStart.disabled=!0,this.skipEnd.disabled=!0,this.record.disabled=!1,this.record.style.background="rgba(170, 0, 0, 0.35)",this.playtest.disabled=!0,this.min.contentEditable="false",this.sec.contentEditable="false",this.millis.contentEditable="false",this.beat.contentEditable="false",this.offset.contentEditable="false",n!=Ie.Off&&(this.visible=!1),this.view.classList.add("collapsed"),this.beatDropdown.closeDropdown(),this.beatDropdown.disabled=!0;break;case K.Play:this.lastHover=Date.now(),this.skipStart.disabled=!0,this.skipEnd.disabled=!0,this.record.disabled=!0,this.playtest.disabled=!1,this.playtest.style.background="rgba(12, 97, 31, 0.35)",this.min.contentEditable="false",this.sec.contentEditable="false",this.millis.contentEditable="false",this.beat.contentEditable="false",this.offset.contentEditable="false",n!=Ie.Off&&(this.visible=!1),this.view.classList.add("collapsed"),this.beatDropdown.closeDropdown(),this.beatDropdown.disabled=!0;break;case K.View:this.lastHover=Date.now(),this.skipStart.disabled=!1,this.skipEnd.disabled=!1,this.record.disabled=!0,this.playtest.disabled=!1,this.min.contentEditable="true",this.sec.contentEditable="true",this.millis.contentEditable="true",this.beat.contentEditable="true",this.offset.contentEditable="true",n!=Ie.Off&&(this.visible=!1),this.view.classList.add("collapsed"),this.beatDropdown.closeDropdown(),this.beatDropdown.disabled=!0}this.trackingMovement=!0,this.idleFrames=5,this.lastMode=s}if(this.lastTimingMode!=n){switch(n){case Ie.Off:this.visible=!0,this.stepsContainer.style.transform="",this.timingContainer.style.transform="",this.editSteps.classList.add("active"),this.editTiming.classList.remove("active"),this.offset.tabIndex=-1;break;case Ie.Add:this.addTimingEvent.classList.add("active");break;case Ie.Edit:this.addTimingEvent.classList.remove("active"),this.offset.tabIndex=0}(this.lastTimingMode==Ie.Off&&n!=Ie.Off||this.lastTimingMode!=Ie.Off&&n==Ie.Off)&&this.manager.chartManager.clearSelections(),this.trackingMovement=!0,this.idleFrames=5,this.lastTimingMode=n,this.stepsContainer.style.transform=n==Ie.Off?"":"translateY(-48px)",this.timingContainer.style.transform=n==Ie.Off?"":"translateY(-48px)",this.editSteps.classList.toggle("active",n==Ie.Off),this.editTiming.classList.toggle("active",n!=Ie.Off)}const a=this.manager.chartManager.chartAudio.isPlaying();if(this.lastPlaying!=a&&(this.playIcon.style.display=a?"none":"",this.stopIcon.style.display=a?"":"none",this.lastPlaying=a),(s==K.Play||s==K.Record)&&this.view.style.opacity==""&&!this.hovering&&Date.now()-this.lastHover>3e3&&(this.view.style.opacity="0.2",this.view.style.transition="2s cubic-bezier(.11,.72,.51,1.14)"),this.trackingMovement){const h=this.noteArrows[0];if(h){const f=h.element.getBoundingClientRect();this.noteArrows.forEach((p,m)=>{p.sprite.position.y=f.top-this.manager.app.view.clientHeight/2-this.manager.app.view.getBoundingClientRect().top+24,p.sprite.position.x=f.left-this.manager.app.view.clientWidth/2+24+m*48,p.bg.position=p.sprite.position,p.highlight.position=p.sprite.position}),this.lastBounds&&Math.abs(this.lastBounds.top-f.top)+Math.abs(this.lastBounds.left-f.left)==0&&(this.idleFrames--,this.idleFrames<0&&(this.trackingMovement=!1,this.lastBounds=void 0,n!=Ie.Off&&(this.visible=!1))),this.lastBounds=f}const d=this.view.getBoundingClientRect();this.noteArrowMask.y=d.bottom-this.manager.app.view.clientHeight/2-this.manager.app.view.getBoundingClientRect().top}const o=this.manager.chartManager.getEditingNoteType(),l=$e.getColor("editable-overlay-hover"),c=$e.getColor("editable-overlay-active"),u=new P(l).setAlpha(0);this.noteArrows.forEach(h=>{let d=o==h.type?c:h.hovered?l:u;x.general.smoothAnimations&&(d=new P(Xi(new P(h.highlight.tint).setAlpha(h.highlight.alpha),d,.3))),h.highlight.tint=d.toNumber(),h.highlight.alpha=d.alpha})}selectText(e){const t=window.getSelection(),i=document.createRange();!t||!i||(i.selectNodeContents(e),t.removeAllRanges(),t.addRange(i))}updateTime(){this.millis.innerText=this.millis.innerText.padEnd(3,"0").slice(0,3);const e=this.parseString(this.min),t=this.parseString(this.sec),i=this.parseString(this.millis);if(e===null||t===null||i===null){this.lastTime=null;return}let s=e*60+t+i/1e3;s>9999999&&(s=9999999),s<0&&(s=0),this.manager.chartManager.time=s,this.lastTime=null}updateBeat(){let e=this.parseString(this.beat);if(e===null){this.lastBeat=null;return}this.beatDropdown.value=="Measure"&&(e=this.manager.chartManager.loadedChart?.timingData?.getBeatFromMeasure(e)??e*4),e>9999999&&(e=9999999),e<0&&(e=0),this.manager.chartManager.beat=e,this.lastBeat=null}updateOffset(){let e=this.parseString(this.offset);if(e===null){this.lastOffset=null;return}e>9999999&&(e=9999999),e<-9999999&&(e=-9999999),this.lastOffset=null,!(!this.manager.chartManager.loadedChart||!this.manager.chartManager.loadedSM)&&(this.manager.chartManager.loadedChart.timingData.hasChartOffset()?this.manager.chartManager.loadedChart.timingData:this.manager.chartManager.loadedSM.timingData).setOffset(e)}parseString(e){try{const t=Lr.evaluate(e.innerText);return isFinite(t)?t:0}catch{return null}}}class Lk extends ve{app;chartManager;children=[];constructor(e){super(),this.app=e.app,this.chartManager=e,this.addChild(new Ik(this)),this.addChild(new Pk(this)),this.addChild(new Fk(this)),this.addChild(new qa(this)),this.addChild(new Mk(this)),this.addChild(new Bk(this)),this.zIndex=2}update(){this.x=this.app.renderer.screen.width/2,this.y=this.app.renderer.screen.height/2,this.children.forEach(e=>e.update())}startPlay(){this.children.forEach(e=>e.startPlay())}endPlay(){this.children.forEach(e=>e.endPlay())}}const ju=Array(85).fill(void 0).map((r,e)=>33+e),_y=[];for(const r of ju)for(const e of ju)_y.push([r,e]);const qu="<~".split("").map(r=>r.charCodeAt(0)),Yu="~>".split("").map(r=>r.charCodeAt(0));function Ok(r,e,t,i=!1,s=!1,n=!1){let a;typeof r=="string"?a=r.split("").map(h=>h.charCodeAt(0)):a=[...new Uint8Array(r)];const o=4-a.length%4;for(let h=0;ho.charCodeAt(0)):i=[...new Uint8Array(r)],e){if(i.at(-1)!=Yu.at(-1)||i.at(-2)!=Yu.at(-2))return!1;i.at(0)==qu.at(0)&&i.at(1)==qu.at(1)?i=i.slice(2,-2):i=i.slice(void 0,-2)}for(let o=0;o<4;o++)i.push("u".charCodeAt(0));let s=[],n=[];for(const o of i)if(o>=33&&117>=o){if(n.push(o),n.length==5){let l=0;for(const c of n)l=85*l+(c-33);if(l>2**32-1)return!1;s.push(l>>24&255),s.push(l>>16&255),s.push(l>>8&255),s.push(l&255),n=[]}}else if(o==122){if(n.length!=0)return!1;s.push(0),s.push(0),s.push(0),s.push(0)}else if(o==121){if(n.length!=0)return!1;s.push(32),s.push(32),s.push(32),s.push(32)}else if(!t.includes(String.fromCharCode(o)))return!1;const a=4-n.length;return a&&(s=s.slice(void 0,-a)),s}function fi(r){let e=0,t=0,i=129;for(;i&128;){const s=r.shift();if(!s)break;e=e|(s&127)<<7*t++,i=s}return e}function pi(r){const e=[];let t=!1;for(;!t;){let i=r&127;r=r>>7,t=r==0,t||(i=i|128),e.push(i)}return e}const Nk=["Hold","Mine","Roll","Lift","Fake"];function Uk(r){if(r.startsWith("ArrowVortex:notes:")){const e=qd(r.slice(18));if(e!==!1){const t=Array.from(e);if(t.shift()!=0)return;const i=fi(t),s=[];for(let n=0;n4)continue;const h=Nk[u];if(l==c){if(h=="Hold"||h=="Roll")continue;s.push({type:h,beat:l/48,col:o})}else{if(h=="Mine"||h=="Fake"||h=="Lift")continue;s.push({type:h,beat:l/48,hold:(c-l)/48,col:o})}}else s.push({type:"Tap",beat:fi(t)/48,col:o})}return s}}}function Hk(r){const e=[0];e.push(...pi(r.length));for(const t of r)if(t.type=="Tap"){const i=Math.round(t.beat*48);e.push(t.col),e.push(...pi(i))}else{e.push(t.col+128);const i=Math.round(t.beat*48);let s=0;Be(t)&&(s=t.hold);const n=Math.round(s*48)+i;e.push(...pi(i)),e.push(...pi(n)),e.push(["Hold","Mine","Roll","Lift","Fake"].indexOf(t.type))}return"ArrowVortex:notes:"+jd(e).map(t=>String.fromCharCode(t)).join("")}const bh=["BPMS","STOPS","DELAYS","WARPS","TIMESIGNATURES","TICKCOUNTS","COMBOS","SPEEDS","SCROLLS","FAKES","LABELS","ATTACKS","BGCHANGES","FGCHANGES"];function Ur(r){const e=new ArrayBuffer(4);return new DataView(e).setUint32(0,r,!0),Array.from(new Uint8Array(e))}function Hr(r){const e=new Uint8Array(r.splice(0,4));return new DataView(e.buffer).getUint32(0,!0)}function Jr(r){const e=new ArrayBuffer(8);return new DataView(e).setFloat64(0,r,!0),Array.from(new Uint8Array(e))}function Qr(r){const e=new Uint8Array(r.splice(0,8)),t=new DataView(e.buffer);return ae(t.getFloat64(0,!0),3)}function Gk(r){return[r.length,...r.split("").map(e=>e.charCodeAt(0))]}function Vk(r){const e=r.shift();if(!e)return"";let t="";for(let i=0;ie.charCodeAt(0)))}function Vr(r){const e=fi(r);if(!e)return"";let t="";for(let i=0;i{if(e.type=="ATTACKS"||e.type=="BGCHANGES"||e.type=="FGCHANGES")return!0;const t=Math.round(e.beat*48)/48;if(Math.abs(t-e.beat)>5e-4)return!0;if(e.type=="FAKES"||e.type=="WARPS"){const i=Math.round(e.value*48)/48;if(Math.abs(i-e.value)>5e-4)return!0}return e.type=="LABELS"&&e.value.length>255||e.type=="TIMESIGNATURES"&&(e.upper>2**32-1||e.lower>2**32-1)||e.type=="COMBOS"&&(e.hitMult>2**32-1||e.missMult>2**32-1)?!0:e.type=="TICKCOUNTS"&&e.value>2**32-1})?$k(r):Wk(r)}function Wk(r){const e=[],t=new Map;r.forEach(i=>{t.has(i.type)||t.set(i.type,[]),t.get(i.type)?.push(i)});for(const[i,s]of t.entries())if(!(i=="ATTACKS"||i=="BGCHANGES"||i=="FGCHANGES")){e.push(s.length),e.push(bh.indexOf(i));for(const n of s)switch(e.push(...Ur(Math.round(n.beat*48))),n.type){case"BPMS":case"STOPS":case"DELAYS":case"SCROLLS":e.push(...Jr(n.value));break;case"FAKES":case"WARPS":e.push(...Ur(Math.round(n.value*48)));break;case"TIMESIGNATURES":e.push(...Ur(Math.round(n.upper))),e.push(...Ur(Math.round(n.lower)));break;case"COMBOS":e.push(...Ur(Math.round(n.hitMult))),e.push(...Ur(Math.round(n.missMult)));break;case"TICKCOUNTS":e.push(...Ur(Math.round(n.value)));break;case"SPEEDS":e.push(...Jr(n.value)),e.push(...Jr(n.delay)),e.push(...Ur(n.unit=="B"?0:1));break;case"LABELS":e.push(...Gk(n.value))}}return e.push(0),"ArrowVortex:tempo:"+jd(e).map(i=>String.fromCharCode(i)).join("")}function $k(r){const e=[],t=new Map;r.forEach(i=>{t.has(i.type)||t.set(i.type,[]),t.get(i.type)?.push(i)});for(const[i,s]of t.entries()){e.push(...pi(s.length)),e.push(bh.indexOf(i));for(const n of s)switch(e.push(...pi(Math.round((n.type=="ATTACKS"?n.second:n.beat)*1e3))),n.type){case"BPMS":case"STOPS":case"DELAYS":case"SCROLLS":case"FAKES":case"WARPS":e.push(...Jr(n.value));break;case"TIMESIGNATURES":e.push(...pi(Math.round(n.upper))),e.push(...pi(Math.round(n.lower)));break;case"COMBOS":e.push(...pi(Math.round(n.hitMult))),e.push(...pi(Math.round(n.missMult)));break;case"TICKCOUNTS":e.push(...pi(Math.round(n.value)));break;case"SPEEDS":e.push(...Jr(n.value)),e.push(...Jr(n.delay)),e.push(n.unit=="B"?0:1);break;case"LABELS":e.push(...Gr(n.value));break;case"ATTACKS":e.push(...Jr(n.value)),e.push(n.endType=="LEN"?0:1),e.push(...Gr(n.mods));break;case"BGCHANGES":case"FGCHANGES":e.push((n.crossFade?1:0)+((n.stretchRewind?1:0)<<1)+((n.stretchNoLoop?1:0)<<2)),e.push(...Gr(n.file)),e.push(...Jr(n.updateRate)),e.push(...Gr(n.effect)),e.push(...Gr(n.file2)),e.push(...Gr(n.transition)),e.push(...Gr(n.color1)),e.push(...Gr(n.color2))}}return"SMEditor:tempo:"+jd(e).map(i=>String.fromCharCode(i)).join("")}function jk(r){if(r.startsWith("SMEditor:tempo:"))return Yk(r);if(r.startsWith("ArrowVortex:tempo:"))return qk(r)}function qk(r){if(!r.startsWith("ArrowVortex:tempo:"))return;const e=qd(r.slice(18)),t=[];if(e===!1)return;const i=Array.from(e);try{for(;;){const s=i.shift();if(s===void 0)return;if(s==0)break;const n=i.shift();if(n===void 0)return;const a=bh[n];for(let o=0;o0,stretchRewind:(c&2)>0,stretchNoLoop:(c&4)>0,effect:Vr(i),file2:Vr(i),transition:Vr(i),color1:Vr(i),color2:Vr(i)})}}}}}catch{return}return t}const Xk={"dance-single":[{x:-1,y:0},{x:0,y:-1},{x:0,y:1},{x:1,y:0}]},yt={DOUBLESTEP:850,BRACKETJACK:20,JACK:30,JUMP:30,BRACKETTAP:400,HOLDSWITCH:20,MINE:1e4,FOOTSWITCH:5e3,MISSED_FOOTSWITCH:500,FACING:2,DISTANCE:6,SPIN:1e3,SIDESWITCH:130},Zm=[1,2,3,4],Kk="LlRr";class Zk{id=0;neighbors=new Map;state;constructor(e,t){this.state=e,this.id=t}}class Jk{nodes=[];states=[];startNode=0;endNode=0;stateNodeMap=new Map;addOrGetExistingNode(e){this.stateNodeMap.get(e.rowIndex)==null&&this.stateNodeMap.set(e.rowIndex,new Map);for(const[n,a]of this.stateNodeMap.get(e.rowIndex))if(eD(e,this.states[n]))return this.nodes[a];const t=this.states.length,i=this.nodes.length;this.states.push(e);const s=new Zk(e,i);return this.nodes.push(s),this.stateNodeMap.get(e.rowIndex)?.set(t,i),s}addEdge(e,t,i){e.neighbors.set(t.id,i)}}class Qk{app;permuteCache=new Map;layout;constructor(e,t){this.app=e,this.layout=Xk[t]}help(){console.log(`Currently only compatible with dance-single. +Available commands: +analyze(): analyze the current chart +clear(): clear parity highlights`)}getActionCost(e,t,i,s){const n=i[s],a=t.second-e.second;let o=0;const l=new Array(t.columns.length).fill(0);for(let L=0;LL!=0))for(const L of t.movedFeet)switch(L){case 1:case 2:e.columns.includes(3)||e.columns.includes(4)||(o+=500);break;case 3:case 4:e.columns.includes(1)||e.columns.includes(4)||(o+=500);break}const f=t.movedFeet.has(1)||t.movedFeet.has(2),p=t.movedFeet.has(3)||t.movedFeet.has(4),m=(e.movedFeet.has(1)&&!e.holdFeet.has(1)||e.movedFeet.has(2)&&!e.holdFeet.has(2))&&(e.movedFeet.has(3)&&!e.holdFeet.has(3)||e.movedFeet.has(4)&&!e.holdFeet.has(4));let g=!1,b=!1;if(m||(c!=-1&&f&&(e.columns[c]==1&&!t.holdFeet.has(1)&&(e.movedFeet.has(1)&&!e.holdFeet.has(1)||e.movedFeet.has(2)&&!e.holdFeet.has(2))&&(g=!0),e.columns[u]==2&&!t.holdFeet.has(2)&&(e.movedFeet.has(1)&&!e.holdFeet.has(1)||e.movedFeet.has(2)&&!e.holdFeet.has(2))&&(g=!0)),h!=-1&&p&&(e.columns[h]==3&&!t.holdFeet.has(3)&&(e.movedFeet.has(3)&&!e.holdFeet.has(3)||e.movedFeet.has(4)&&!e.holdFeet.has(4))&&(b=!0),e.columns[d]==4&&!t.holdFeet.has(4)&&(e.movedFeet.has(3)&&!e.holdFeet.has(3)||e.movedFeet.has(4)&&!e.holdFeet.has(4))&&(b=!0))),f!=p&&(f||p)&&t.holdFeet.size==0&&!m){let L=!1;f&&!g&&(e.movedFeet.has(1)&&!e.holdFeet.has(1)||e.movedFeet.has(2)&&!e.holdFeet.has(2))&&(L=!0),p&&!b&&(e.movedFeet.has(3)&&!e.holdFeet.has(3)||e.movedFeet.has(4)&&!e.holdFeet.has(4))&&(L=!0);const W=i[s-1];if(W!==void 0)for(const z of W.holds){if(z===void 0)continue;const O=this.app.chartManager.loadedChart.timingData.getBeatFromSeconds(n.second),N=this.app.chartManager.loadedChart.timingData.getBeatFromSeconds(W.second);z.beat+z.hold>N&&z.beat+z.hold=O&&(L=!1)}L&&(o+=yt.DOUBLESTEP),g&&t.movedFeet.has(1)&&t.movedFeet.has(2)&&(o+=yt.BRACKETJACK),b&&t.movedFeet.has(3)&&t.movedFeet.has(4)&&(o+=yt.BRACKETJACK)}f&&p&&n.notes.filter(L=>L!==void 0).length>=2&&(o+=yt.JUMP/a);let w=-1,v=-1,y=-1,E=-1;for(let L=0;L0&&(o+=U*yt.FACING),V>0&&(o+=V*yt.FACING),T>0&&(o+=T*yt.FACING),S>0&&(o+=S*yt.FACING);const _=this.averagePoint(e.columns.indexOf(1),e.columns.indexOf(2)),R=this.averagePoint(e.columns.indexOf(3),e.columns.indexOf(4)),q=this.averagePoint(w,v),F=this.averagePoint(y,E);if(F.x_.y&&(o+=yt.SPIN),F.xq.y&&R.y<_.y&&(o+=yt.SPIN),a>=.25&&!n.mines.some(L=>L!==void 0)&&!n.fakeMines.some(L=>L!==void 0)){const L=a-.25;for(let W=0;WL!==void 0)||n.fakeMines.some(L=>L!==void 0))&&(o+=yt.MISSED_FOOTSWITCH),a<=.15&&f!=p){const L=.15-a;(g||b)&&(o+=(1/L-1/.15)*yt.JACK)}for(const L of t.movedFeet){const W=e.columns.indexOf(L);W!=-1&&(o+=Math.sqrt(this.getDistanceSq(this.layout[W],this.layout[t.columns.indexOf(L)]))*yt.DISTANCE/a)}return t.columns=l,o}calculatePermuteColumnKey(e){let t=0;for(let i=0;i<4;i++)(e.notes[i]!==void 0||e.holds[i]!==void 0)&&(t+=Math.pow(2,i));return t}getPermuteColumns(e){const t=this.calculatePermuteColumnKey(e);let i=this.permuteCache.get(t);return i==null&&(i=this.permuteColumn(e,new Array(4).fill(0),0),this.permuteCache.set(t,i)),this.permuteCache.get(t)}permuteColumn(e,t,i){if(i>=t.length){let n=-1,a=-1,o=-1,l=-1;for(let c=0;c0?u.fake||u.warped?l[u.col]=u.second:o[u.col]=u.second:u.fake||u.warped?a[u.col]=u.second:n[u.col]=u.second;continue}u.fake||u.warped||(i!=u.second&&(i!=null&&c.push({notes:s,holds:t.map(h=>{if(!(h===void 0||h.second>=i))return h}),holdTails:new Set(t.filter(h=>!(h===void 0||Math.abs(h.beat+h.hold-this.app.chartManager.loadedChart.timingData.getBeatFromSeconds(i))>5e-4)).map(h=>h.col)),mines:o,fakeMines:l,second:i}),i=u.second,s=[],o=n,l=a,n=[],a=[],t=t.map(h=>{if(!(h===void 0||u.beat>h.beat+h.hold))return h})),s[u.col]=u,Be(u)&&(t[u.col]=u))}return c.push({notes:s,holds:t.map(u=>{if(!(u===void 0||u.second>=i))return u}),holdTails:new Set(t.filter(u=>!(u===void 0||Math.abs(u.beat+u.hold-this.app.chartManager.loadedChart.timingData.getBeatFromSeconds(i))>5e-4)).map(u=>u.col)),mines:o,fakeMines:l,second:i}),c}analyze(){const e=this.app.chartManager.loadedChart?.getNotedata();if(!e)return[];const t=this.createRows(e),i=this.buildStateGraph(t);this.analyzeGraph(t,i)}analyzeGraph(e,t){const i=this.computeCheapestPath(t);for(let s=0;s0;){const u=n.shift(),h=t.addOrGetExistingNode(u),d=this.getPermuteColumns(e[l]);for(const f of d){const p=this.initResultState(u,e[l],l,f),m=this.getActionCost(u,p,e,l),g=t.addOrGetExistingNode(p);t.addEdge(h,g,m),c.add(g.id)}}for(const u of c)n.push(t.nodes[u].state)}const a={rowIndex:e.length,second:e[e.length-1].second+1,columns:[],movedFeet:new Set,holdFeet:new Set},o=t.addOrGetExistingNode(a);for(t.endNode=o.id;n.length>0;){const l=n.shift(),c=t.addOrGetExistingNode(l);t.addEdge(c,o,0)}return t}initResultState(e,t,i,s){const n={rowIndex:i,second:t.second,columns:s,movedFeet:new Set,holdFeet:new Set};for(let a=0;a<4;a++)s[a]!=null&&((t.holds[a]==null||e.columns[a]!=s[a])&&n.movedFeet.add(s[a]),t.holds[a]!=null&&n.holdFeet.add(s[a]));return n}computeCheapestPath(e){const t=e.startNode,i=e.endNode,s=[],n=Array(e.nodes.length).fill(Number.MAX_VALUE),a=Array(e.nodes.length).fill(-1);n[t]=0;for(let l=0;l<=i;l++){const c=e.nodes[l];for(const[u,h]of c.neighbors)n[l]+ht.parity=void 0)}}function eD(r,e){return!(r.second!==e.second||r.rowIndex!==e.rowIndex||!tD(r.columns,e.columns)||!Jm(r.movedFeet,e.movedFeet)||!Jm(r.holdFeet,e.holdFeet))}function tD(r,e){if(r.length!==e.length)return!1;for(let t=0;t{fetch(e.src).then(i=>i.arrayBuffer()).then(i=>this.decodeData(i)).then(i=>{i&&(this._buffer=i)}).catch(i=>{Ee.createFormatted("Failed to load sound effect: "+i.message,"error")}).finally(()=>{t()})})}destroy(){this._destroyed||(this.stop(),this._buffer=this._audioContext.createBuffer(2,1,44100),this._destroyed=!0)}async decodeData(e){return new Promise((t,i)=>{if(!e){t();return}(async()=>{try{t(await this._audioContext.decodeAudioData(e))}catch(s){i(s)}})()})}volume(e){this._destroyed||this._volume!=e&&(this._volume=e,this._gainNode.gain.setValueAtTime(e,this._audioContext.currentTime))}rate(e){if(!this._destroyed&&this._rate!=e){this._rate=e;for(const t of this._sources)t.playbackRate.value=e}}play(e){if(this._destroyed)return;const t=iD.create(this._audioContext.createBufferSource());t.buffer=this._buffer,t.connect(this._gainNode),this._gainNode.connect(this._audioContext.destination),t.start(e+this._audioContext.currentTime,0),t.playbackRate.value=this._rate,this._sources.push(t),t.onended=()=>{t.disconnect(),this._sources=this._sources.filter(i=>i!=t)}}stop(){if(!this._destroyed){for(const e of this._sources)e.stop(),e.disconnect();this._sources=[]}}}class rD{static menuElement;static closeTimeout;static open(e,t){e.chartManager.getMode()!=K.View&&(this.buildMenu(e),this.menuElement.style.display="none",setTimeout(()=>this.fitContextMenu(t)),this.menuElement.classList.add("entering"),clearTimeout(this.closeTimeout),setTimeout(()=>this.menuElement?.classList.remove("entering"),300),this.menuElement.style.left=t.clientX+"px",this.menuElement.style.top=t.clientY+"px")}static fitContextMenu(e){this.menuElement.style.display="";const t=this.menuElement.getBoundingClientRect(),i=window.innerHeight-t.bottom-20,s=window.innerWidth-t.right-20;i<0&&(this.menuElement.style.top=e.clientY+i+"px"),s<0&&(this.menuElement.style.left=e.clientX+s+"px"),this.menuElement.style.transformOrigin=`${Math.max(0,-s)}px ${Math.max(0,-i)}px`}static close(){this.menuElement&&(this.menuElement.classList.add("exiting"),this.closeTimeout=setTimeout(()=>this.menuElement.replaceChildren(),300))}static buildMenu(e){const t=document.createElement("div");if(t.appendChild(this.createElement(e,{type:"selection",id:"cut"})),t.appendChild(this.createElement(e,{type:"selection",id:"copy"})),t.appendChild(this.createElement(e,{type:"selection",id:"paste"})),t.appendChild(this.createElement(e,{type:"selection",id:"pasteReplace"})),e.chartManager.getMode()==K.Edit&&e.chartManager.hasNoteSelection()){const i=document.createElement("div");i.classList.add("separator"),t.appendChild(i),ba.selection.options.slice(0,-4).forEach(s=>{t.appendChild(this.createElement(e,s))})}this.menuElement=t,t.id="context-menu",document.getElementById("context-menu")?.replaceWith(this.menuElement)}static createElement(e,t){if(t.type=="separator"){const i=document.createElement("div");return i.classList.add("separator"),i}if(t.type=="selection"||t.type=="checkbox"||t.type=="dropdown"){const i=document.createElement("div"),s=document.createElement("div"),n=document.createElement("div");let a;if(t.type=="selection"||t.type=="checkbox"){const o=ct[t.id];a=document.createElement("div"),a.innerText=Re.getKeybindString(t.id),a.classList.add("keybind","unselectable"),n.innerText=o?.label??t.id;let l=o?.disabled??!0;typeof l=="function"&&(l=l(e)),l&&i.classList.add("disabled"),i.addEventListener("click",()=>{l||(o?.callback(e),this.close())})}else a=Ce.getIcon("CHEVRON",16),a.style.transform="rotate(-90deg)",n.innerText=typeof t.title=="function"?t.title(e):t.title;if(s.appendChild(n),s.appendChild(a),i.appendChild(s),i.classList.add("menu-item"),s.classList.add("menu-item-title","menu-hover"),n.classList.add("title","unselectable"),t.type=="dropdown"){const o=document.createElement("div");i.appendChild(o),o.classList.add("menubar-dropdown"),t.options.map(l=>this.createElement(e,l)).forEach(l=>o.appendChild(l))}if(t.type=="checkbox"){let o=t.checked;typeof o=="function"&&(o=o(e)),o&&(n.innerText="✓ "+n.innerText)}return i}if(t.type=="menu"){const i=document.createElement("div"),s=document.createElement("div"),n=document.createElement("div");return i.appendChild(s),s.innerText=t.title,i.appendChild(n),s.classList.add("title","unselectable"),i.classList.add("menu-item","menu-main"),s.classList.add("menu-hover"),n.classList.add("menubar-dropdown","unselectable"),i.onmouseenter=()=>{n.replaceChildren(...t.options.map(a=>this.createElement(e,a)))},i.onmouseleave=()=>{n.replaceChildren()},i}return document.createElement("div")}}const sD={fontName:"Main",fontSize:20,fill:["#ffffff"]};class nD extends ve{renderer;barlineMap=new Map;barlineLabelMap=new Map;barlinePool=new Ya({create:()=>{const e=new Ne(te.WHITE);return et(e,"text-color"),e}});barlineLabelPool=new Ya({create:()=>{const e=new Fe("",sD);return et(e,"text-color"),e}});constructor(e){super(),this.renderer=e;const t=()=>{this.barlineMap.clear(),this.barlineLabelMap.clear(),this.barlinePool.destroyAll(),this.barlineLabelPool.destroyAll()};H.on("timeSigChanged",t),this.on("destroyed",()=>H.off("timeSigChanged",t)),this.addChild(this.barlinePool,this.barlineLabelPool)}update(e,t){this.visible=this.renderer.shouldDisplayBarlines();for(const[i,s]of this.renderer.chart.timingData.getMeasureBeats(e,t)){if(!this.barlineMap.has(i)){const n=this.barlinePool.createChild();if(!n)continue;Object.assign(n,{width:this.renderer.chart.gameType.notefieldWidth+128,height:s?4:1,visible:!0}),n.anchor.set(.5),this.barlineMap.set(i,n)}if(s&&!this.barlineLabelMap.has(i)){const n=this.barlineLabelPool.createChild();if(!n)continue;Object.assign(n,{x:(this.renderer.chart.gameType.notefieldWidth+128)/-2-16,text:`${Math.round(this.renderer.chart.timingData.getMeasure(i))}`,visible:!0}),n.anchor.set(1,.5),this.barlineLabelMap.set(i,n)}}for(const[i,s]of this.barlineMap.entries()){if(it){this.barlineMap.delete(i),this.barlinePool.destroyChild(s);continue}s.y=this.renderer.getYPosFromBeat(i)}for(const[i,s]of this.barlineLabelMap.entries()){if(it){this.barlineLabelMap.delete(i),this.barlineLabelPool.destroyChild(s);continue}s.y=this.renderer.getYPosFromBeat(i)}}}class aD extends ve{previewArea=new Ne(te.WHITE);previewText=new Fe("SONG PREVIEW",{fontName:"Main",fontSize:13});renderer;constructor(e){super(),this.renderer=e,Object.assign(this.previewArea,{alpha:.2,tint:11052482,width:this.renderer.chart.gameType.notefieldWidth+96,height:64}),this.previewText.x=-this.previewArea.width/2+5,this.previewArea.anchor.x=.5,et(this.previewText,"text-color"),this.addChild(this.previewArea,this.previewText)}update(e,t){const i=Number(this.renderer.chart.sm.properties.SAMPLESTART),s=Number(this.renderer.chart.sm.properties.SAMPLELENGTH);if(Number.isNaN(i)||Number.isNaN(s)||!this.renderer.shouldDisplayBarlines()||this.renderer.chart.timingData.getBeatFromSeconds(i+s)t){this.visible=!1;return}this.visible=!0;let n=this.renderer.getYPosFromSecond(i),a=this.renderer.getYPosFromSecond(i+s);a=0){l.visible=!1;continue}if(Math.abs(e[n].beat-t)>20&&Math.abs(e[n+1].beat-t)>20&&!(t>e[n].beat&&te[n].beat&&te[n+1].beat&&(l.text.y=l.box.height),l.x=(n%4-1.5)*150}for(const[n,a]of this.scrollMap.entries())if(!a.marked){this.scrollMap.delete(n),a.destroy();continue}const i=this.renderer.findFirstOnScreenScroll(),s=this.renderer.findLastOnScreenScroll();{const n=this.scrollMap.get(i);n&&(n.text.text+=` +start`,n.box.tint==16777215&&(n.box.tint=16777096),n.text.tint=16777096)}{const n=this.scrollMap.get(s);n&&(n.text.text+=` +end`,n.box.tint==16777215&&(n.box.tint=8978431),n.text.tint=8978431)}this.receptors.y=this.renderer.getActualReceptorYPos(),this.topBound.y=this.renderer.getUpperBound(),this.bottomBound.y=this.renderer.getLowerBound(),this.topBoundBeat.y=this.renderer.getYPosFromBeat(this.renderer.getVisualBeat()-x.chart.maxDrawBeatsBack),this.bottomBoundBeat.y=this.renderer.getYPosFromBeat(this.renderer.getVisualBeat()+x.chart.maxDrawBeats),this.topScreenBeat.y=this.renderer.getYPosFromBeat(this.renderer.getTopOnScreenBeat()),this.bottomScreenBeat.y=this.renderer.getYPosFromBeat(this.renderer.getBottomOnScreenBeat()),this.topScreenBeatText.y=this.topScreenBeat.y,this.topScreenBeatText.text=ae(this.renderer.getTopOnScreenBeat(),3)+"",this.bottomScreenBeatText.y=this.bottomScreenBeat.y,this.bottomScreenBeatText.text=ae(this.renderer.getBottomOnScreenBeat(),3)+""}inBounds(e){const t=this.renderer.chartManager.app.renderer.screen.height/this.scale.y;return Math.abs(e)this.renderer.getVisualBeat()),this.trackVariable(()=>this.renderer.getVisualTime()),this.trackVariable(()=>x.chart.speed),this.trackVariable(()=>this.getSpeed(),n=>{this.speed=n,clearTimeout(this.lastSpeedTimeout),this.lastSpeedTimeout=setTimeout(()=>{this.blockCache.clear(),this.lastSpeed=this.speed,this.drawDirty=!0},200)}),this.trackVariable(()=>x.chart.zoom),this.trackVariable(()=>x.chart.CMod),this.trackVariable(()=>x.chart.doSpeedChanges),this.trackVariable(()=>x.chart.waveform.allowFilter),this.trackVariable(()=>x.chart.reverse),this.trackVariable(()=>x.chart.waveform.antialiasing,n=>{this.filters=n?[new gu]:[]}),this.trackVariable(()=>this.renderer.chartManager.app.renderer.screen.width,()=>this.resizeWaveform()),this.trackVariable(()=>this.renderer.chartManager.app.renderer.screen.height,()=>this.resizeWaveform()),this.trackVariable(()=>x.chart.waveform.filteredColor),this.trackVariable(()=>x.chart.waveform.color),this.trackVariable(()=>x.chart.waveform.speedChanges),this.trackVariable(()=>x.chart.receptorYPos),this.trackVariable(()=>x.chart.waveform.lineHeight,()=>{x.chart.waveform.lineHeight<=0&&(x.chart.waveform.lineHeight=1),this.updateLineHeight()}),this.trackVariable(()=>x.chart.zoom,()=>this.resizeWaveform()),this.trackVariable(()=>this.renderer.chartManager.chartAudio.hasFilters());const t=()=>this.getData();this.anchor.set(.5),this.renderer.chartManager.chartAudio.onUpdate(t),this.getData(),this.resizeWaveform(),this.filters=x.chart.waveform.antialiasing?[new gu]:[];const i=()=>this.drawDirty=!0,s=()=>{this.getData(),this.resizeWaveform(),this.renderer.chartManager.chartAudio.onUpdate(t)};H.on("timingModified",i),this.on("destroyed",()=>{H.off("timingModified",i)}),H.on("audioLoaded",s),this.on("destroyed",()=>{H.off("audioLoaded",s),this.renderer.chartManager.chartAudio.offUpdate(t)})}getData(){this.rawData=this.renderer.chartManager.chartAudio.getRawData(),this.filteredRawData=this.renderer.chartManager.chartAudio.getFilteredRawData(),this.sampleRate=this.renderer.chartManager.chartAudio.getSampleRate(),this.blockCache.clear(),this.drawDirty=!0}resizeWaveform(){this.waveformTex.resize(Oe((this.rawData?.length??0)*288*x.chart.zoom,1,this.renderer.chartManager.app.renderer.screen.width),this.renderer.chartManager.app.renderer.screen.height)}update(){this.visible=x.chart.waveform.enabled&&this.renderer.shouldDisplayBarlines(),x.chart.waveform.enabled&&((this.drawDirty||this.variableChanged())&&(this.colorCache.toHexa()!=x.chart.waveform.color&&(this.colorCache=$a(x.chart.waveform.color)),this.filteredColorCache.toHexa()!=x.chart.waveform.filteredColor&&(this.filteredColorCache=$a(x.chart.waveform.filteredColor)),this.drawDirty=!1,this.renderData(),this.renderer.chartManager.app.renderer.render(this.lineContainer,{renderTexture:this.waveformTex})),this.scale.set(1/x.chart.zoom))}trackVariable(e,t){this.trackedVariables.set(e,{value:e(),cb:t})}variableChanged(){let e=!1;for(const[t,i]of this.trackedVariables.entries())t()!=i.value&&(this.trackedVariables.get(t).value=t(),this.trackedVariables.get(t).cb?.(t()),e=!0);return e}getSample(e,t,i){if(t<0)return 0;const s=this.sampleRate/(this.lastSpeed*4),n=Math.floor(t*this.lastSpeed*4);if(this.blockCache.get(i)?.[n]!==void 0)return this.blockCache.get(i)[n];const a=Math.floor(n*s),o=e.slice(a,Math.floor(a+s)).reduce((l,c)=>l+Math.abs(c),0)/s;return this.blockCache.has(i)||this.blockCache.set(i,[]),this.blockCache.get(i)[n]=o,o}renderData(){this.resetPool();const e=x.chart.waveform.allowFilter&&this.renderer.chartManager.chartAudio.hasFilters(),t={data:{bpms:[],bpmIndex:0,timing:[],timingIndex:0,offset:0,lastBeat:-999,timingData:null},init(i){if(this.data.bpms=i.getTimingData("BPMS"),this.data.timing=i.getBeatTiming(),this.data.offset=i.getOffset(),this.data.bpms[0]?.beat!==0){const s=structuredClone(this.data.bpms[0])??{value:120,type:"BPMS",beat:0};s.beat=0,this.data.bpms.unshift(s)}this.data.timing.length==0&&this.data.timing.unshift({beat:0,secondBefore:-this.data.offset,secondAfter:-this.data.offset,secondClamp:-this.data.offset,secondOf:-this.data.offset,warped:!1,bpm:120}),this.data.timingData=i},getBPM(i){for(;i>this.data.bpms[this.data.bpmIndex+1]?.beat;)this.data.bpmIndex++;return this.data.bpms[this.data.bpmIndex].value},getSecond(i){const s=Math.floor(i*1e3)/1e3;if(i<=0)return-this.data.offset+i*60/this.getBPM(i);if(s>=this.data.timing[this.data.timingIndex+1]?.beat){for(;s>=this.data.timing[this.data.timingIndex+1]?.beat;)this.data.timingIndex++;return this.data.timingData.getSecondsFromBeat(i)}else{const n=this.data.timing[this.data.timingIndex];let o=(i-n.beat)*60/n.bpm;return n.warped&&(o=0),Math.max(n.secondClamp,n.secondAfter+o)}}};if(x.chart.waveform.speedChanges&&!x.chart.CMod&&x.chart.doSpeedChanges){const i=x.chart.speed,s=this.renderer.getCurrentSpeedMult(),n=this.renderer.getTopOnScreenBeat(),a=this.renderer.getBottomOnScreenBeat(),o=Math.min(n,a),l=Math.max(n,a),c=this.renderer.findFirstOnScreenScroll(),u=this.renderer.findLastOnScreenScroll(),h=[...this.renderer.chart.timingData.getTimingData("SCROLLS")];h[0]?.beat!=0&&h.unshift({type:"SCROLLS",beat:0,value:h[0]?.value??1}),t.init(this.renderer.chart.timingData);const d=h.findIndex(v=>v.beat==c.beat),f=h.findIndex(v=>v.beat==u.beat),p=100/i/Math.abs(s)/64/x.chart.zoom,m=this.renderer.chartManager.app.renderer.screen.height;let g=o,b=Math.round(this.renderer.getYPosFromBeat(g)*x.chart.zoom+this.parent.y),w=this.renderer.chart.getSecondsFromBeat(g);for(const v of h.slice(d,f+1)){if(v.value==0)continue;const y=p/Math.abs(v.value);v.beat!=c.beat?g=v.beat:g=Math.round((g-v.beat)/y)*y+v.beat,b=Math.round(this.renderer.getYPosFromBeat(g)*x.chart.zoom+this.parent.y),w=this.renderer.chart.getSecondsFromBeat(g);const E=this.renderer.getScrollDirection(v.value),C=h[h.indexOf(v)+1]?.beat??Number.MAX_VALUE;for(;gm){if(E>0){g=C;break}g+=y*(b-m),b=m;continue}g+=y*x.chart.waveform.lineHeight,b+=E*x.chart.waveform.lineHeight,w=t.getSecond(g),this.drawLine(w,b,e)}}}else if(x.chart.CMod){let i=this.renderer.getSecondFromYPos((-this.parent.y+(x.chart.reverse?this.renderer.chartManager.app.renderer.screen.height:0))/x.chart.zoom);const s=this.renderer.getPixelsToSecondsRatio()/x.chart.zoom;i=Math.floor(i/s)*s;const n=a=>{i+=s*x.chart.waveform.lineHeight,this.drawLine(i,a,e)};if(x.chart.reverse)for(let a=this.renderer.chartManager.app.renderer.screen.height;a>=0;a-=x.chart.waveform.lineHeight)n(a);else for(let a=0;a<=this.renderer.chartManager.app.renderer.screen.height;a+=x.chart.waveform.lineHeight)n(a)}else{let i=this.renderer.getBeatFromYPos((-this.parent.y+(x.chart.reverse?this.renderer.chartManager.app.renderer.screen.height:0))/x.chart.zoom);t.init(this.renderer.chart.timingData);const s=this.renderer.getPixelsToEffectiveBeatsRatio()/x.chart.zoom;i=Math.floor(i/s)*s;let n=this.renderer.chart.getSecondsFromBeat(i);const a=o=>{i+=s*x.chart.waveform.lineHeight,n=t.getSecond(i),this.drawLine(n,o,e)};if(x.chart.reverse)for(let o=this.renderer.chartManager.app.renderer.screen.height;o>=0;o-=x.chart.waveform.lineHeight)a(o);else for(let o=0;o<=this.renderer.chartManager.app.renderer.screen.height;o+=x.chart.waveform.lineHeight)a(o)}this.purgePool()}drawLine(e,t,i){if(!(e<0))for(let s=0;st>=this.poolSearch)}updateLineHeight(){for(const e of this.lineContainer.children){const t=e;t.height=x.chart.waveform.lineHeight}}getLine(){if(this.lineContainer.children[this.poolSearch]){const t=this.lineContainer.children[this.poolSearch];return t.visible=!0,this.poolSearch++,t}const e=new Ne(te.WHITE);return e.height=x.chart.waveform.lineHeight,e.anchor.set(.5),e.visible=!0,this.poolSearch++,this.lineContainer.addChild(e),e}getSpeed(){return Math.min(x.chart.speed,cD)}}const dD="/smeditor/assets/missing-81d55ba9.png",Ay=te.from(dD),fD={HoldBodyTopOffset:0,HoldBodyBottomOffset:0,RollBodyTopOffset:0,RollBodyBottomOffset:0};class pD{renderer;options;objects=[];updateHooks=new Set;hooks={};metrics;constructor(e,t){this.renderer=e,this.options=t,this.options.init?.(e),this.metrics={...fD,...this.options.metrics}}update(e){this.options.update?.(e),this.updateHooks.forEach(({item:t,cb:i})=>{t.destroyed||i(e)})}getPlaceholderSprite(){const e=new Ne(Ay);return e.anchor.set(.5),e}getBlankSprite(){return new Ne(te.EMPTY)}getElement(e,t={}){try{return this.options.load?this.options.load.bind(this)(e,{noteskin:this,columnName:e.columnName,columnNumber:e.columnNumber,...t})??this.getPlaceholderSprite():this.loadElement(e,t)??this.getPlaceholderSprite()}catch(i){return console.error(i),x.debug.showNoteskinErrors&&Ee.createFormatted("Noteskin Error: "+i,"error"),this.getPlaceholderSprite()}}loadElement(e,t={}){const i=this.followRedirs(e);return i===void 0?(x.debug.showNoteskinErrors&&Ee.createFormatted(`Noteskin element ${e.columnName} ${e.element} failed to load for noteskin: Redirect loop`,"error"),this.getPlaceholderSprite()):i({noteskin:this,columnName:e.columnName,columnNumber:e.columnNumber,...t})}followRedirs(e){const t=[e];let i=e;for(;;){const s=this.options.elements[i.columnName]?.[i.element];if(s===void 0)return;if(typeof s=="function")return s;if(i={columnName:s.columnName??i.columnName,columnNumber:s.columnNumber??i.columnNumber,element:s.element},t.some(n=>i.columnName==n.columnName&&i.element==n.element))return;t.push(i)}}on(e,t,i){this.hooks[t]===void 0&&(this.hooks[t]=new Set);const s={item:e,cb:i};this.hooks[t].add(s),e.once("destroyed",()=>this.hooks[t].delete(s))}onUpdate(e,t){const i={item:e,cb:t};this.updateHooks.add(i),e.once("destroyed",()=>this.updateHooks.delete(i))}broadcast(e){if(this.hooks[e.type]===void 0)return;this.hooks[e.type].forEach(({item:i,cb:s})=>{i.destroyed||s(e)})}}const mD="/smeditor/assets/hold_judgement-82934f15.png";class Bs extends ve{children=[];static held_tex;static dropped_tex;notefield;constructor(e){super(),Bs.held_tex||this.loadTex(),this.notefield=e}async loadTex(){const e=await bn.load(mD),t=e.height,i=e.width;Bs.held_tex=new te(e,new ke(0,0,i,t/2)),Bs.dropped_tex=new te(e,new ke(0,t/2,i,t/2))}update(){this.y=this.notefield.renderer.getActualReceptorYPos()+(x.chart.reverse?-48:48);for(const e of this.children){const t=(Date.now()-e.createTime)/1e3;if(t<.1){const i=1-(1-t/.1)*(1-t/.1);e.scale.set(.3*i)}else if(t>.6&&t<.8){const i=(t-.6)/.2*(t-.6)/.2;e.scale.set(.3*(1-i))}}hr(this.children,e=>Date.now()-e.createTime>800)}addJudge(e,t){if(!Vn(t)&&!Us(t))return;const i=new Ne(Vn(t)?Bs.dropped_tex:Bs.held_tex);i.anchor.set(.5),i.x=this.notefield.getColumnX(e),i.createTime=Date.now(),i.scale.set(0),this.addChild(i)}}const gD={L:233724,l:11261687,R:16559363,r:16442809};class bD extends ve{notefield;arrowMap=new Map;notesDirty=!1;children=[];constructor(e){super(),this.notefield=e,this.sortableChildren=!0;const t=()=>{this.arrowMap.clear(),this.removeChildren()},i=()=>this.notesDirty=!0;H.on("timeSigChanged",t),H.on("chartModified",i),this.on("destroyed",()=>{H.off("timeSigChanged",t),H.off("chartModified",i)})}update(e,t){const i=this.notefield.renderer.chart.getNotedata();if(this.notesDirty){for(const[s,n]of this.arrowMap.entries())i.includes(s)||(n.destroy(),this.arrowMap.delete(s));this.notesDirty=!1}for(const s of i){if(s.beat>t)break;if(this.shouldDisplayNote(s,e,t)&&!this.arrowMap.has(s)){const n=new ve,a=this.notefield.createNote(s);Object.assign(n,{x:this.notefield.getColumnX(s.col),zIndex:s.beat});const o=new Ne(te.WHITE),l=a.getBounds();o.x=l.x,o.y=l.y,o.width=l.width,o.height=l.height,o.alpha=0;const c=new Ne(te.WHITE);c.x=l.x,c.y=l.y,c.width=l.width,c.height=l.height,c.alpha=0,this.notefield.renderer.registerDragNote(n,s),n.wrapper=a,n.selection=o,n.parity=c,n.lastActive=!1,this.arrowMap.set(s,n),n.addChild(a,o,c),this.addChild(n)}}for(const[s,n]of this.arrowMap.entries()){if(!this.shouldDisplayNote(s,e,t)){n.destroy(),this.arrowMap.delete(s);continue}if(n.y=this.notefield.renderer.getActualReceptorYPos(),(!Be(s)||!s.gameplay?.lastHoldActivation||this.notefield.renderer.getVisualBeat(){e=="chart.allowReceptorDrag"&&(this.eventMode=x.chart.allowReceptorDrag?"static":"passive")};constructor(e){super(),this.notefield=e;for(let s=0;s{!this.dragStart||!this.dragOptionsStart||(x.chart.receptorXPos=Math.round(this.dragOptionsStart[0]+s.global.x-this.dragStart.x),x.chart.receptorYPos=Math.round(this.dragOptionsStart[1]+s.global.y-this.dragStart.y))},i=()=>{this.notefield.renderer.off("pointermove",t),this.notefield.renderer.off("pointerup",i)};this.on("pointerdown",s=>{this.dragStart=new ze(s.globalX,s.globalY),this.dragOptionsStart=[x.chart.receptorXPos,x.chart.receptorYPos],s.preventDefault(),s.stopImmediatePropagation(),this.notefield.renderer.on("pointermove",t),this.notefield.renderer.on("pointerup",i)}),H.on("userOptionUpdated",this.optionUpdate),this.optionUpdate("chart.allowReceptorDrag")}destroy(){H.off("userOptionUpdated",this.optionUpdate)}update(){this.y=this.notefield.renderer.getActualReceptorYPos()}}class wD extends ve{notefield;arrowMap=new Map;children=[];lastBeatShift=0;lastColShift=0;constructor(e){super(),this.notefield=e,this.sortableChildren=!0}update(e,t){if(!this.notefield.renderer.chartManager.selection.shift){this.removeChildren(),this.arrowMap.clear();return}const i=this.notefield.renderer.chartManager.selection.shift.beatShift,s=this.notefield.renderer.chartManager.selection.shift.columnShift;if(this.lastBeatShift!=i||this.lastColShift!=s){this.lastBeatShift=i,this.lastColShift=s;for(const[n,a]of this.arrowMap.entries()){const o=this.notefield.renderer.chartManager.loadedChart.computeNote({...n,beat:n.beat+i,col:n.col+s});a.x=this.notefield.getColumnX(o.col),a.wrapper.destroy(),a.wrapper.alpha=.4,a.wrapper=this.notefield.createNote(o);const l=a.wrapper.getBounds();a.selection.x=l.x,a.selection.y=l.y,a.selection.width=l.width,a.selection.height=l.height,a.addChild(a.wrapper,a.selection)}}for(const n of this.notefield.renderer.chartManager.selection.notes)if(!(n.beat+i+(Be(n)?n.hold:0)t)&&!this.arrowMap.has(n)){const a={...n,beat:n.beat+i,col:n.col+s},o=new ve,l=this.notefield.createNote(a);Object.assign(o,{x:this.notefield.getColumnX(a.col),zIndex:a.beat,alpha:.4});const c=new Ne(te.WHITE),u=l.getBounds();c.x=u.x,c.y=u.y,c.width=u.width,c.height=u.height,c.alpha=0,this.notefield.renderer.registerDragNote(l,a),o.wrapper=l,o.selection=c,this.arrowMap.set(n,o),o.addChild(l,c),this.addChild(o)}for(const[n,a]of this.arrowMap.entries()){if(n.beat+i+(Be(n)?n.hold:0)t){a.destroy(),this.arrowMap.delete(n);continue}const o=n.beat+i;if(a.y=this.notefield.renderer.getYPosFromBeat(o),a.selection.alpha=Math.sin(Date.now()/320)*.1+.3,Be(n)){const l=this.notefield.renderer.getYPosFromBeat(o+(Be(n)?n.hold:0))-a.y,c=a.wrapper.object;c.setLength(l),c.setBrightness(1);const u=a.wrapper.getLocalBounds();a.selection.x=u.x,a.selection.y=u.y,a.selection.width=u.width,a.selection.height=u.height}}}}const xD="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAMAAABHPGVmAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAZ5QTFRFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8fHx9vb29PT0AAAA+fn5/////f39AAAAAAAAAAAAAAAA/v7+AAAAAAAA9vb2AAAAAAAA8/PzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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,0,0,0,0),this.scale.cb=()=>{this.refresh()}}cropBottom(e,t=!1){this._last==e&&!this._lastTop&&!t||(this._last=e,this._lastTop=!1,this._height=this.texture.height-e/Math.abs(this.scale.y),this._bottomHeight=0,this.offsetY=0,this.topHeight=this.texture.height-e/Math.abs(this.scale.y),this._updateY())}cropTop(e,t=!1){this._last==e&&this._lastTop&&!t||(this._last=e,this._lastTop=!0,this._height=this.texture.height-e/Math.abs(this.scale.y),this._topHeight=0,this.bottomHeight=this.texture.height-e/Math.abs(this.scale.y),this.offsetY=e/Math.abs(this.scale.y),this._updateY())}get y(){return this.setY}set y(e){this.setY=e,this._updateY()}_updateY(){super.y=this.setY+this.offsetY*Math.abs(this.scale.y)}refresh(){this._lastTop?this.cropTop(this._last,!0):this.cropBottom(this._last,!0)}}class Ty extends ED{constructor(e,t=64){super(e),this.scale.set(t/this.texture.width),this.pivot.x=t/2/this.scale.x,this.texture.on("update",()=>{this.width=this.texture.width,this.height=this.texture.height,this.scale.set(t/this.texture.width),this.pivot.x=t/2/this.scale.x,this.refresh()})}}class qD extends Ty{_playing=!1;_autoUpdate=!1;_isConnectedToTicker=!1;_tickerUpdate=this.update.bind(this);_currentTime=0;_textures;_previousFrame=null;onComplete=null;onLoop=null;onFrameChange=null;animationSpeed=1;loop=!1;updateAnchor=!1;constructor(e,t){super(e[0],t),this.textures=e}stop(){this._playing&&(this._playing=!1,this._autoUpdate&&this._isConnectedToTicker&&(It.shared.remove(this._tickerUpdate),this._isConnectedToTicker=!1))}play(){this._playing||(this._playing=!0,this._autoUpdate&&!this._isConnectedToTicker&&(It.shared.add(this._tickerUpdate,this,ns.HIGH),this._isConnectedToTicker=!0))}gotoAndStop(e){this.stop(),this.currentFrame=e}gotoAndPlay(e){this.currentFrame=e,this.play()}update(e){if(!this._playing)return;const t=this.animationSpeed*e,i=this.currentFrame;this._currentTime+=t,this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete?.()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete?.()):i!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFramei)&&this.onLoop(),this.updateTexture())}updateTexture(){const e=this.currentFrame;this._previousFrame!==e&&(this._previousFrame=e,this.texture=this._textures[e],this.onFrameChange?.(this.currentFrame))}destroy(e){this.stop(),super.destroy(e),this.onComplete=null,this.onFrameChange=null,this.onLoop=null}get totalFrames(){return this._textures?.length??0}get textures(){return this._textures??[]}set textures(e){this._textures=e,this._previousFrame=null,this.gotoAndStop(0),this.updateTexture()}get currentFrame(){let e=Math.floor(this._currentTime)%this._textures.length;return e<0&&(e+=this._textures.length),e}set currentFrame(e){if(e<0||e>this.totalFrames-1)throw new Error(`[AnimatedSprite]: Invalid frame index value ${e}, expected to be between 0 and totalFrames ${this.totalFrames}.`);const t=this.currentFrame;this._currentTime=e,t!==this.currentFrame&&this.updateTexture()}get playing(){return this._playing}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){e!==this._autoUpdate&&(this._autoUpdate=e,!this._autoUpdate&&this._isConnectedToTicker?(It.shared.remove(this._tickerUpdate),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._playing&&(It.shared.add(this._tickerUpdate),this._isConnectedToTicker=!0))}}const AD={Fake:te.from(xD),Lift:te.from(_D)};class Qm extends ve{object;icon;constructor(e){super(),this.object=e,this.icon=new Ne(AD[e.note.type]),this.icon.anchor.set(.5),this.icon.scale.set(.3),this.icon.alpha=.8,this.icon.visible=!1,this.addChild(e,this.icon),e.nf.noteskin===void 0?H.on("noteskinLoaded",()=>this.loadEventHandler()):this.loadEventHandler()}loadEventHandler(){this.object.nf.noteskin.onUpdate(this,e=>{if(!x.chart.drawIcons){this.icon.visible=!1;return}if(this.object.nf.noteskinOptions?.hideIcons?.includes(this.object.note.type)){this.icon.visible=!1;return}this.icon.visible=!0,this.object.note.type=="Fake"&&(this.icon.visible=e.chartManager.getMode()!=K.Play)})}}class TD extends ve{type="note";note;nf;constructor(e,t){super(),this.note=t,this.nf=e,this.nf.noteskin===void 0?H.on("noteskinLoaded",()=>{this.loadElement(t)}):this.loadElement(t)}loadElement(e){const t=this.nf.noteskin.getElement({element:e.type,columnName:this.nf.getColumnName(e.col),columnNumber:e.col},{note:e});this.addChild(t)}}function CD(r){return r.cropTop!==void 0}class SD extends ve{type="hold";note;active;inactive;wasActive=!1;lastLength=null;elements;metrics;ns;nf;loaded=!1;constructor(e,t){super();const i=new ve,s=new ve;this.note=t,this.ns=e.noteskin,this.nf=e,this.metrics=this.ns.metrics,i.visible=!1,this.active=i,this.inactive=s,this.addChild(s,i),e.noteskin===void 0?H.on("noteskinLoaded",()=>{this.loadElements()}):this.loadElements()}loadElements(){if(!this.loaded){this.elements={};for(const e of["Active","Inactive"]){this.elements[e]={};for(const t of["BottomCap","Body","TopCap","Head"]){const i=this.getNoteskinElement(`${e} ${t}`);t=="BottomCap"?CD(i)?this.elements[e][t]=i:(x.debug.showNoteskinErrors&&Ee.createFormatted(`Noteskin Error: invalid tail found for ${e} ${t}!`,"error"),this.elements[e][t]=new Ty(Ay,64)):this.elements[e][t]=i,(e=="Active"?this.active:this.inactive).addChild(this.elements[e][t])}}this.loaded=!0}}getNoteskinElement(e){return this.ns.getElement({element:`${this.note.type} ${e}`,columnName:this.nf.getColumnName(this.note.col),columnNumber:this.note.col},{note:this.note})}setActive(e){this.wasActive!=e&&(this.wasActive=e,this.active.visible=e,this.inactive.visible=!e)}setBrightness(e){if(!this.loaded)return;const t=["Active","Inactive"],i=["Body","TopCap","BottomCap"];for(const s of t)for(const n of i)"tint"in this.elements[s][n]&&(this.elements[s][n].tint=Hd(e*255,e*255,e*255))}setLength(e){if(!this.loaded||this.lastLength==e)return;this.lastLength=e;const t=this.metrics[`${this.note.type}BodyBottomOffset`],i=this.metrics[`${this.note.type}BodyTopOffset`],s=["Active","Inactive"],n=e>=0?1:-1,a=Math.abs(e);for(const o of s){this.elements[o].Body.height=Math.max(0,a+t-i),this.elements[o].Body.y=a+t,this.elements[o].BottomCap.y=a+t,this.elements[o].BottomCap.y<0?(this.elements[o].BottomCap.cropTop(-this.elements[o].BottomCap.y),e<0&&(this.elements[o].BottomCap.y-=this.elements[o].BottomCap.y/Math.abs(this.elements[o].BottomCap.scale.y))):this.elements[o].BottomCap.cropTop(0),this.elements[o].TopCap.y=i;const l=Math.abs(this.elements[o].BottomCap.scale.y);this.elements[o].BottomCap.scale.y=e<0?-l:l;const c=Math.abs(this.elements[o].TopCap.scale.y);this.elements[o].TopCap.scale.y=e<0?-c:c,this.elements[o].Body.height*=n,this.elements[o].Body.y*=n,this.elements[o].BottomCap.y*=n,this.elements[o].TopCap.y*=n}}}class e0 extends ve{noteskinOptions;noteskin;gameType;renderer;receptors;notes;selectionNotes;flashes;holdJudges;ghostNote;ghostNoteEntry;columnX=[];constructor(e){super(),this.renderer=e,this.gameType=e.chart.gameType,ut.getNoteskin(this.gameType,x.chart.noteskin.name).then(t=>{if(!t){Ee.createFormatted("Couldn't find an available noteskin!","error");return}let i=0;for(let s=0;s=e&&this.ghostNoteEntry.beat<=t&&this.ghostNoteEntry.beat>=0))}onJudgement(e,t){this.noteskin!==void 0&&(this.holdJudges.addJudge(e,t),cr(t)&&this.noteskin.broadcast({type:"hit",judgement:t,columnName:this.getColumnName(e),columnNumber:e}),Us(t)&&this.noteskin.broadcast({type:"held",columnName:this.getColumnName(e),columnNumber:e}),Vn(t)&&this.noteskin.broadcast({type:"letgo",columnName:this.getColumnName(e),columnNumber:e}),Li(t)&&this.noteskin.broadcast({type:"miss",judgement:t,columnName:this.getColumnName(e),columnNumber:e}),mh(t)&&this.noteskin.broadcast({type:"hitmine",columnName:this.getColumnName(e),columnNumber:e}))}startPlay(){}endPlay(){if(this.noteskin!==void 0)for(let e=0;eDate.now()-e.createTime>5e3),x.general.smoothAnimations?this.currentMedian.x=(this.currentMedian.x-this.target)*.8+this.target:this.currentMedian.x=this.target}addBar(e,t){if(e==null||!Li(t)&&!cr(t))return;const i=new Ne(te.WHITE);i.width=kD,i.height=t0,i.anchor.set(.5),i.x=e*400,i.tint=t.color,i.createTime=Date.now(),i.miss=Li(t),i.ms=Math.round(e*1e3),this.errorText.tint=t.color,this.errorText.text=(e*1e3).toFixed(1)+"ms",this.errorTextTime=Date.now(),this.barlines.addChild(i),this.target=fh(this.barlines.children.filter(s=>!s.miss).map(s=>s.ms))*.4}reset(){this.currentMedian.x=0,this.target=0,hr(this.barlines.children,()=>!0)}}class PD extends Ne{createTime=-1;active=!1;type=Jb;constructor(){super(),this.anchor.set(.5)}update(){if(this.y=x.chart.reverse?40:-40,this.visible=this.active,this.active){const e=(Date.now()-this.createTime)/1e3;let t=1.2;if(rt.getCollection(x.play.timingCollection).shouldHideNote(this.type)||(t=.8),e<.1){const i=1-(1-e/.1)*(1-e/.1),s=(1-t)*i+t;this.scale.x=.4*s,this.scale.y=.4*s}else if(e>.6&&e<.8){const i=(e-.6)/.2*(e-.6)/.2;this.scale.x=.4*(1-i),this.scale.y=.4*(1-i)}else e>.8&&(this.active=!1)}}doJudge(e,t){if(e==null&&(e=0),!cr(t)&&!Li(t))return;const i=t.judgementTexture.getTexture(e,t);i&&(this.texture=i,this.texture.updateUvs(),this.active=!0,this.type=t,this.createTime=Date.now(),x.play.judgementTilt?this.rotation=Oe(e,-.05,.05)*300/180*Math.PI:this.rotation=0)}reset(){this.active=!1}}class wr extends oo{static options;static convertText;static convertBtnOne;static convertBtnTwo;static onTimingChange=this.updateValues.bind(this);onConfirm=()=>{};persistent=!1;static open(e){super._open({...e,title:"Column",description:"",width:255,editable:!0,cancelableOnOpen:!1}),H.on("timingModified",this.onTimingChange),this.updateValues()}static buildContent(){const e=document.createElement("div");e.style.display="flex",e.style.gap="4px",e.style.alignItems="center",e.style.flexDirection="column",e.style.marginTop="10px",e.style.fontSize="12px";const t=document.createElement("div"),i=document.createElement("button"),s=document.createElement("button");this.convertBtnOne=i,this.convertBtnTwo=s,this.convertText=t,e.replaceChildren(t,i,s),this.view.appendChild(e)}static close(){!this.popup||!this.active||(super.close(),H.off("timingModified",this.onTimingChange))}static updateValues(){const e=this.options.timingData.isPropertyChartSpecific(this.options.type),t=e?"chart":"song";this.title.innerText=Je[t].title,this.desc.innerText=Je[t].desc,this.convertText.innerText=Je[t].convertText,this.convertBtnOne.innerText=Je[t].buttonOne.text,this.convertBtnTwo.innerText=Je[t].buttonTwo.text,this.convertBtnTwo.classList.toggle("delete",e),Ze(this.convertBtnOne,{content:Je[t].buttonOne.tooltip}),Ze(this.convertBtnTwo,{content:Je[t].buttonTwo.tooltip}),this.convertBtnOne.onclick=()=>{Je[t].buttonOne.action(this.options.timingData,this.options.type),this.close()},this.convertBtnTwo.onclick=()=>{Je[t].buttonTwo.action(this.options.timingData,this.options.type),this.close()}}}const Qo={BPMS:{title:"BPM Event",rows:[{label:"Tempo",key:"value",input:{type:"spinner",precision:3}}]},STOPS:{title:"Stop Event",description:"Stops for a number of seconds. Notes on this beat are hit before the stop occurs.",rows:[{label:"Seconds",key:"value",input:{type:"spinner",precision:3}}]},WARPS:{title:"Warp Event",description:"Warps ahead a number of beats. Warped notes do not count towards score.",rows:[{label:"Beats",key:"value",input:{type:"spinner",precision:3,min:0}}]},DELAYS:{title:"Delay Event",description:"Stops for a number of seconds. Notes on this beat are hit after the delay occurs.",rows:[{label:"Seconds",key:"value",input:{type:"spinner",precision:3}}]},SCROLLS:{title:"Scroll Event",description:"Notes after this event will scroll at the specified speed.",rows:[{label:"Multiplier",key:"value",input:{type:"spinner",precision:3}}]},TICKCOUNTS:{title:"Tickcount Event",description:"Number of ticks per beat in a hold. Only applies to pump gamemodes.",rows:[{label:"Ticks",key:"value",input:{type:"spinner",step:1,precision:0,min:0}}]},FAKES:{title:"Fake Event",description:"Creates an area of notes that cannot be hit and do not count towards score.",rows:[{label:"Beats",key:"value",input:{type:"spinner",precision:3,min:0}}]},LABELS:{title:"Label Event",rows:[{label:"Label",key:"value",input:{type:"text"}}]},SPEEDS:{title:"Speed Event",width:200,description:"The entire playfield scrolls at the specified speed. Can slowly ease over a certain amount of time.",rows:[{label:"Multiplier",key:"value",input:{type:"spinner",precision:3}},{label:"Ease time",key:"delay",input:{type:"spinner",precision:3,min:0}},{label:"Ease unit",key:"unit",input:{type:"dropdown",items:["Beats","Seconds"],transformers:{serialize:r=>r=="B"?"Beats":"Seconds",deserialize:r=>r=="Beats"?"B":"T"}}}]},TIMESIGNATURES:{title:"Time Signature Event",width:200,rows:[{label:"Upper",key:"upper",input:{type:"spinner",step:1,precision:0,min:1}},{label:"Lower",key:"lower",input:{type:"spinner",step:1,precision:0,min:1}}]},COMBOS:{title:"Combo Event",width:200,description:"Multiplies the combo gained from hitting/missing notes after this event.",rows:[{label:"Hit multiplier",key:"hitMult",input:{type:"spinner",step:1,precision:0,min:0}},{label:"Miss multiplier",key:"missMult",input:{type:"spinner",step:1,precision:0,min:0}}]},ATTACKS:{title:"Attack Event",width:200,description:"Applies a modifier to the playfield. Can specify the length of the applied attack in seconds or the end time of the attack.",rows:[{label:"Timing type",key:"endType",input:{type:"dropdown",items:["Length","End"],transformers:{serialize:r=>r=="LEN"?"Length":"End",deserialize:r=>r=="Length"?"LEN":"END"}}},{label:"Seconds",key:"value",input:{type:"spinner",precision:3}},{label:"Mods",key:"mods",input:{type:"text"}}]},BGCHANGES:{title:"BG Change Event",width:250,rows:[{label:"File",key:"file",input:{type:"text"}},{label:"Update rate",key:"updateRate",input:{type:"spinner",precision:3,min:0}},{label:"Crossfade",key:"crossfade",input:{type:"checkbox"}},{label:"StretchRewind",key:"stretchRewind",input:{type:"checkbox"}},{label:"StretchNoLoop",key:"StretchNoLoop",input:{type:"checkbox"}},{label:"Effect",key:"effect",input:{type:"text"}},{label:"File2",key:"file2",input:{type:"text"}},{label:"Transition",key:"transition",input:{type:"text"}},{label:"Color1",key:"color1",input:{type:"text"}},{label:"Color2",key:"color2",input:{type:"text"}}]},FGCHANGES:{title:"FG Change Event",width:250,rows:[{label:"File",key:"file",input:{type:"text"}},{label:"Update rate",key:"updateRate",input:{type:"spinner",precision:3,min:0}},{label:"Crossfade",key:"crossfade",input:{type:"checkbox"}},{label:"StretchRewind",key:"stretchRewind",input:{type:"checkbox"}},{label:"StretchNoLoop",key:"StretchNoLoop",input:{type:"checkbox"}},{label:"Effect",key:"effect",input:{type:"text"}},{label:"File2",key:"file2",input:{type:"text"}},{label:"Transition",key:"transition",input:{type:"text"}},{label:"Color1",key:"color1",input:{type:"text"}},{label:"Color2",key:"color2",input:{type:"text"}}]}};class tt extends oo{static options;static cachedEvent;static rows=[];static onTimingChange;static open(e){this.active||(super._open({...e,attach:e.box.backgroundObj,title:Qo[e.box.event.type].title,description:Qo[e.box.event.type].description,width:Qo[e.box.event.type].width??150,editable:!0,cancelableOnOpen:!1,background:Hl(kr[e.box.event.type].toString(16).padStart(6,"0"),"#333333",.75),textColor:"#ffffff",options:[{label:"Ok",type:"confirm",callback:()=>{this.close(),this.options.onConfirm(this.cachedEvent)}},{label:"Delete",type:"delete",callback:()=>{this.options.modifyBox||this.options.timingData.delete([{type:this.cachedEvent.type,[this.cachedEvent.type=="ATTACKS"?"second":"beat"]:this.cachedEvent.type=="ATTACKS"?this.cachedEvent.second:this.cachedEvent.beat}]),this.close()}}]}),this.cachedEvent=structuredClone(e.box.event),this.onTimingChange=this.updateValues.bind(this),H.on("timingModified",this.onTimingChange))}static buildContent(){const e=Qo[this.options.box.event.type],t=document.createElement("div");t.classList.add("popup-grid"),this.view.appendChild(t),e.rows.forEach(i=>t.append(...this.buildRow(i)))}static buildRow(e){const t=structuredClone(this.options.box.event),i=document.createElement("div");i.innerText=e.label,i.classList.add("popup-label");const s=[];switch(s.push(i),e.input.type){case"spinner":{const n=ft.create(t[e.key],e.input.step,e.input.precision,e.input.min,e.input.max);n.onChange=a=>{a!==void 0&&this.modifyEvent(e.key,a)},this.rows.push({data:e,el:n}),s.push(n.view);break}case"text":{const n=document.createElement("input");n.type="text",n.autocomplete="off",n.spellcheck=!1,n.onkeydown=a=>{a.key=="Enter"&&n.blur()},n.onblur=()=>{this.modifyEvent(e.key,n.value)},n.value=t[e.key],this.rows.push({data:e,el:n}),s.push(n);break}case"dropdown":{if(e.input.transformers){const n=e.input.transformers.deserialize,a=e.input.transformers.serialize,o=Oi.create(e.input.items,a(t[e.key]));o.onChange(l=>{this.modifyEvent(e.key,n(l))}),this.rows.push({data:e,el:o}),s.push(o.view)}else{const n=Oi.create(e.input.items,t[e.key]);n.onChange(a=>{this.modifyEvent(e.key,a)}),this.rows.push({data:e,el:n}),s.push(n.view)}break}case"checkbox":{const n=document.createElement("input");n.type="checkbox",n.checked=t[e.key],n.onchange=()=>{this.modifyEvent(e.key,n.checked)},this.rows.push({data:e,el:n}),s.push(n);break}}return s}static modifyEvent(e,t){this.options.modifyBox?Object.assign(this.options.box.event,{[e]:t}):this.options.timingData.modify([[structuredClone(this.options.box.event),Object.assign(this.options.box.event,{[e]:t})]]),this.cachedEvent=structuredClone(this.options.box.event)}static updateValues(){const e=this.options.timingData.getEventAtBeat(this.options.box.event.type,this.options.box.event.beat,!1);if(!this.options.box||!e||e.beat!=this.options.box.event.beat){this.close();return}this.rows.forEach(t=>{switch(t.data.input.type){case"spinner":{t.el.setValue(e[t.data.key]);break}case"text":{t.el.value=e[t.data.key];break}case"dropdown":{const i=t.el;t.data.input.transformers?i.setSelected(t.data.input.transformers.serialize(e[t.data.key])):i.setSelected(e[t.data.key]);break}case"checkbox":{t.el.checked=e[t.data.key];break}}})}static close(){this.active&&(super.close(),H.off("timingModified",this.onTimingChange))}static getEvent(){return this.cachedEvent}static attach(e){super.attach(e.backgroundObj),this.options.box=e,this.cachedEvent=e.event}}const fl={fontName:"Main",fontSize:15},Ki={BPMS:55,STOPS:55,DELAYS:55,WARPS:55,FAKES:55,COMBOS:40,SPEEDS:80,LABELS:80,SCROLLS:55,TIMESIGNATURES:40,TICKCOUNTS:40,BGCHANGES:55,FGCHANGES:55,ATTACKS:55};class BD extends ve{tracks=new ve;renderer;timingBoxMap=new Map;wasEditingTiming=!1;boxPool=new Ya({create:()=>{const e=new ve;return e.textObj=new Fe("",fl),e.backgroundObj=new zt,e.selection=new zt("onlyBorder"),e.selection.tint=3841008,e.addChild(e.backgroundObj,e.textObj,e.selection),e}});ghostBox;timingDirty=!1;tracksDirty=!0;constructor(e){super(),this.renderer=e,this.boxPool.sortableChildren=!0,this.sortableChildren=!0,this.addChild(this.tracks,this.boxPool);const t=()=>{this.timingDirty=!0,this.tracksDirty=!0},i=s=>{s.startsWith("chart.timingEventOrder")&&(this.tracksDirty=!0)};H.on("timingModified",t),H.on("userOptionUpdated",i),this.on("destroyed",()=>{H.off("timingModified",t),H.off("userOptionUpdated",i)})}update(e,t){this.renderer.chartManager.editTimingMode!=Ie.Add&&(this.ghostBox?.removeFromParent(),this.ghostBox?.destroy(),this.ghostBox=void 0),this.updateTracks(),this.updateBoxes(e,t)}createTrack(e,t){const i=Object.assign(new ve,{alpha:0,name:e,x:t,type:e,timingMode:"song",background:new Ne(te.WHITE),btns:new ve});i.background=new Ne(te.WHITE),i.background.width=Ki[e],i.background.height=5e3,i.background.tint=2503250,i.background.anchor.y=.5,i.background.alpha=0,i.btns.y=this.renderer.getActualReceptorYPos()+(x.chart.reverse?50:-50);const s=new ve,n=new zt,a=new Fe(e,fl);return n.width=20,n.height=20,et(n,"widget-bg"),n.pivot.set(10,10),a.anchor.set(.5,.55),a.text="S",et(a,"text-color"),s.alpha=.4,s.name="timingTypeBtn",s.eventMode="static",s.on("mouseenter",()=>{wr.persistent||wr.open({attach:s,type:e,timingData:this.renderer.chart.timingData})}),s.on("mouseleave",()=>{wr.persistent||wr.close()}),s.on("pointerdown",()=>{wr.persistent&&wr.open({attach:s,type:e,timingData:this.renderer.chart.timingData}),wr.select()}),s.addChild(n,a),i.btns.addChild(s),i.addChild(i.background,i.btns),this.tracks.addChild(i),i}initializeBox(e,t){if(mi.stop(e.animationId),Object.assign(e,{event:t,lastX:void 0,lastAnchor:void 0,animationId:void 0,zIndex:t.beat,eventMode:"static"}),e.textObj.text=this.getLabelFromEvent(t),e.textObj.anchor.set(.5,.55),e.backgroundObj.width=e.textObj.width+10,e.backgroundObj.height=25,e.backgroundObj.position.x=-e.backgroundObj.width/2,e.backgroundObj.position.y=-25/2,e.selection.width=e.textObj.width+10,e.selection.height=25,e.selection.position=e.backgroundObj.position,tt.active){const i=tt.getEvent();i.type=="ATTACKS"&&t.type=="ATTACKS"&&i.second==t.second&&tt.attach(e),i.type!="ATTACKS"&&t.type!="ATTACKS"&&i.type==t.type&&i.beat==t.beat&&tt.attach(e)}}addDragListeners(e,t){e.on("mouseenter",()=>{tt.persistent||this.renderer.chartManager.eventSelection.timingEvents.length>0||this.renderer.isDragSelecting()||(tt.active&&tt.close(),this.renderer.chartManager.getMode()==K.Edit&&tt.open({box:e,timingData:this.getTargetTimingData(e.event),modifyBox:!1,onConfirm:()=>{this.renderer.chartManager.removeEventFromSelection(t)}}))}),e.on("mouseleave",()=>{tt.persistent||tt.close()});let i=0,s;const n=a=>{const o=s,l=this.toLocal(a.global);if(Math.abs(l.y-i)<32){this.renderer.chartManager.eventSelection.shift&&(this.renderer.chartManager.eventSelection.shift={beatShift:0});return}tt.close();const c=this.renderer.getBeatFromYPos(l.y),u=x.chart.snap==0?1/1e3:x.chart.snap;let h=Math.round(c/u)*u;Math.abs(h-c)>Math.abs(c-o.beat)&&(h=o.beat),this.renderer.chartManager.eventSelection.shift||={beatShift:0},this.renderer.chartManager.eventSelection.shift.beatShift=Math.max(-Math.min(...this.renderer.chartManager.eventSelection.timingEvents.map(d=>d.beat)),h-o.beat)};e.on("pointerdown",a=>{if(Uu(a)){this.renderer.chartManager.clearSelections(),this.renderer.chartManager.addEventToSelection(t),tt.close();return}if(a.stopImmediatePropagation(),this.renderer.chartManager.isEventInSelection(t)?(a.getModifierState("Control")||a.getModifierState("Meta"))&&this.renderer.chartManager.removeEventFromSelection(t):(!a.getModifierState("Control")&&!a.getModifierState("Meta")&&!a.getModifierState("Shift")&&this.renderer.chartManager.clearSelections(),this.renderer.chartManager.addEventToSelection(t)),this.renderer.chartManager.getMode()==K.Edit&&this.renderer.chartManager.eventSelection.timingEvents.length==1&&tt.options?.box!=e&&(tt.close(),tt.open({box:e,timingData:this.getTargetTimingData(e.event),modifyBox:!1,onConfirm:()=>{this.renderer.chartManager.removeEventFromSelection(t)}})),tt.active&&!a.getModifierState("Control")&&!a.getModifierState("Meta")&&!a.getModifierState("Shift")?tt.select():tt.close(),i=e.y,s=t,this.renderer.chartManager.editTimingMode==Ie.Add)return;this.renderer.on("pointermove",n);const o=()=>{this.renderer.off("pointermove",n),this.renderer.off("pointerup",o),(this.renderer.chartManager.eventSelection.shift?.beatShift??0)!=0&&this.renderer.chartManager.modifyEventSelection(l=>(l.type=="ATTACKS"&&(l.second=this.renderer.chart.timingData.getSecondsFromBeat(l.beat+this.renderer.chartManager.eventSelection.shift.beatShift)),l.beat+=this.renderer.chartManager.eventSelection.shift.beatShift,l)),this.renderer.chartManager.eventSelection.shift=void 0};this.renderer.on("pointerup",o)})}updateTracks(){const e=this.renderer.chartManager.editTimingMode!=Ie.Off&&this.renderer.chartManager.getMode()==K.Edit;if(e&&this.tracks.children.forEach(a=>{a.btns.y=this.renderer.getActualReceptorYPos()+(x.chart.reverse?50:-50)}),!this.tracksDirty&&this.wasEditingTiming==e)return;this.wasEditingTiming=e,this.tracksDirty=!1;const t=x.chart.timingEventOrder.left,i=x.chart.timingEventOrder.right;this.tracks.children.forEach(a=>{a.visible=!1});let s=-this.renderer.chart.gameType.notefieldWidth*.5-128;const n=(a,o,l,c,u)=>{mi.animate(a,{0:{[o]:"inherit"},1:{[o]:l}},c,Sr(0,0,.16,1.01),()=>{},u)};for(let a=t.length-1;a>=0;a--){const o=t[a],l=this.tracks.getChildByName(o)??this.createTrack(o,s);l.visible=!0;const c=a%2==0?.1:0;n(l,"x",s,.3,`track-${o}-x`),n(l.btns,"x",-Ki[o]/2,.3,`track-${o}-btn-x`),n(l.background,"anchor.x",1,.3,`track-${o}-anchor-x`),n(l.background,"alpha",e?c:0,.3,`track-${o}-bg-alpha`),s-=Ki[o]}s=this.renderer.chart.gameType.notefieldWidth*.5+128;for(let a=0;a{const o=a.btns.getChildByName("timingTypeBtn"),l=o?.children[1];o&&(o.eventMode=e?"static":"none"),l&&(l.text=this.renderer.chart.timingData.isPropertyChartSpecific(a.type)?"C":"S")})}updateBoxes(e,t){this.timingDirty&&(this.timingBoxMap.clear(),this.boxPool.destroyAll(),this.timingDirty=!1);const i=this.renderer.chartManager.editTimingMode!=Ie.Off&&this.renderer.chartManager.getMode()==K.Edit;this.boxPool.visible=this.renderer.shouldDisplayBarlines(),this.ghostBox&&(this.ghostBox.visible=this.renderer.shouldDisplayBarlines()&&i);for(const n of this.renderer.chart.timingData.getTimingData()){if(tn.beat)&&!this.timingBoxMap.has(n)){const a=this.boxPool.createChild();if(!a)break;this.initializeBox(a,n),this.addDragListeners(a,n),this.timingBoxMap.set(n,a)}}const s={beat:-Number.MAX_SAFE_INTEGER,second:-Number.MAX_SAFE_INTEGER,leftOffset:0,rightOffset:0};for(const[n,a]of this.timingBoxMap.entries()){if(n.beatt||!x.chart.timingEventOrder.left.includes(n.type)&&!x.chart.timingEventOrder.right.includes(n.type)){this.timingBoxMap.delete(n),tt.options?.box==a?tt.detach():tt.persistent||tt.close(),this.boxPool.destroyChild(a);continue}let o=0,l=0;const c=a.backgroundObj.width,u=x.chart.timingEventOrder.right.includes(n.type)?"right":"left";i?(o=this.tracks.getChildByName(n.type)?.x??a.x,o+=Ki[n.type]/2*(o>0?1:-1),l=.5):(o=(u=="right"?1:-1)*(this.renderer.chart.gameType.notefieldWidth*.5+80),u=="left"&&(o-=30),(s.beat!=n.beat||n.second&&s.second!=n.second)&&(s.leftOffset=0,s.rightOffset=0,s.beat=n.beat,s.second=n.second),u=="left"?(o-=s.leftOffset,s.leftOffset+=c+5):(o+=s.rightOffset,s.rightOffset+=c+5),l=u=="right"?0:1),a.lastX===void 0||a.lastAnchor===void 0?(a.x=o,a.pivot.x=(l-.5)*c):(a.lastX!=o||a.lastAnchor!=l)&&(a.animationId=mi.animate(a,{0:{x:"inherit","pivot.x":"inherit"},1:{x:o,"pivot.x":(l-.5)*c}},.3,Sr(0,0,.16,1.01),()=>{},a.animationId)),a.lastX=o,a.lastAnchor=l,a.y=x.chart.CMod&&n.type=="ATTACKS"?this.renderer.getYPosFromSecond(n.second):this.renderer.getYPosFromBeat(n.beat);const h=this.renderer.chartManager.getMode()!=K.Play&&this.renderer.chartManager.isEventInSelection(n);if(a.backgroundObj.tint=h?Gd(kr[n.type]??0,Math.sin(Date.now()/320)*.4+1.5):kr[n.type]??0,a.selection.alpha=h?1:0,a.visible=!h||!this.renderer.chartManager.eventSelection.shift,this.renderer.chartManager.editTimingMode!=Ie.Off){const d=this.renderer.selectionTest(a);!h&&d&&this.renderer.chartManager.addEventToDragSelection(n),h&&!d&&this.renderer.chartManager.removeEventFromDragSelection(n)}}}updateGhostEvent(e){const t=x.chart.snap==0?.001:x.chart.snap,i=Math.round(this.renderer.getBeatFromYPos(e.y)/t)*t,s=tt.active&&tt.options?.box==this.ghostBox,n=s?this.ghostBox.event.type:this.getClosestTrack(e.x)?.name;if(!n){this.ghostBox?.removeFromParent(),this.ghostBox?.destroy(),this.ghostBox=void 0;return}if(!this.ghostBox){const l=new ve;l.textObj=new Fe("",fl),l.backgroundObj=new zt,l.selection=new zt("onlyBorder"),l.guideLine=new Ne(te.WHITE),l.selection.tint=3841008,l.selection.alpha=0,l.addChild(l.guideLine,l.backgroundObj,l.textObj,l.selection),this.addChild(l),l.visible=this.renderer.shouldDisplayBarlines(),l.textObj.anchor.set(.5,.55),l.backgroundObj.height=25,l.selection.height=25,l.guideLine.height=1,l.guideLine.anchor.y=.5,this.ghostBox=l}!s&&(this.ghostBox.event?.beat!=i||this.ghostBox.event?.type!=n)&&(this.ghostBox.event=structuredClone(this.renderer.chart.timingData.getEventAtBeat(n,i))??this.renderer.chart.timingData.getDefaultEvent(n,i),this.ghostBox.event.beat=i,n=="ATTACKS"&&(this.ghostBox.event.second=this.renderer.chart.getSecondsFromBeat(i)),this.ghostBox.textObj.text=this.getLabelFromEvent(this.ghostBox.event),this.ghostBox.backgroundObj.width=this.ghostBox.textObj.width+10,this.ghostBox.selection.width=this.ghostBox.textObj.width+10),this.ghostBox.alpha=s?1:.4,this.ghostBox.selection.alpha=s?1:0,this.ghostBox.name=n;const a=this.renderer.getYPosFromBeat(s?this.ghostBox.event.beat:i);let o=this.tracks.getChildByName(n).x;o+=Ki[n]/2*(o>0?1:-1),this.ghostBox.position.x=o,this.ghostBox.backgroundObj.tint=kr[n]??0,this.ghostBox.backgroundObj.position.x=-this.ghostBox.backgroundObj.width/2,this.ghostBox.backgroundObj.position.y=-25/2,this.ghostBox.guideLine.anchor.x=o<0?0:1,this.ghostBox.guideLine.width=Math.abs(this.ghostBox.position.x)+192-this.ghostBox.backgroundObj.width/2,this.ghostBox.guideLine.position.x=(o<0?1:-1)*this.ghostBox.backgroundObj.width/2,this.ghostBox.y=a,this.ghostBox.selection.position=this.ghostBox.backgroundObj.position}placeGhostEvent(){if(!this.ghostBox)return;const e=this.renderer.chart.timingData.getEventAtBeat(this.ghostBox.event.type,this.ghostBox.event.beat,!1);this.ghostBox.event.type=="ATTACKS"&&this.ghostBox.event.second==e?.second||this.ghostBox.event.type!="ATTACKS"&&this.ghostBox.event.beat==e?.beat||(this.renderer.chartManager.clearSelections(),tt.open({box:this.ghostBox,timingData:this.getTargetTimingData(this.ghostBox.event),modifyBox:!0,onConfirm:t=>{this.getTargetTimingData(this.ghostBox.event).insert([t])}}),tt.select())}getClosestTrack(e){let t=Number.MAX_SAFE_INTEGER,i=this.tracks.children[0];for(const s of this.tracks.children){const n=Math.abs(s.x+(.5-s.background.anchor.x)*s.width-e);ni.width))return i}getLabelFromEvent(e){let t="";switch(e.type){case"BPMS":case"STOPS":case"WARPS":case"DELAYS":case"TICKCOUNTS":case"FAKES":case"SCROLLS":t=ae(e.value,3).toString();break;case"SPEEDS":t=`${ae(e.value,3)}/${ae(e.delay,3)}/${e.unit}`;break;case"LABELS":t=e.value;break;case"TIMESIGNATURES":t=`${ae(e.upper,3)}/${ae(e.lower,3)}`;break;case"COMBOS":t=`${ae(e.hitMult,3)}/${ae(e.missMult,3)}`;break;case"BGCHANGES":case"FGCHANGES":t=e.file;break;case"ATTACKS":t=`${e.mods}`}return t}getTargetTimingData(e){return this.renderer.chart.timingData.isPropertyChartSpecific(e.type)?this.renderer.chart.timingData:this.renderer.chart.timingData.songTimingData}}class RD extends ve{children=[];renderer;timingBoxMap=new Map;trackPosCache=new Map;timingBoxPool=new Ya({create:()=>{const e=new ve;return e.guideLine=new Ne(te.WHITE),e.textObj=new Fe("",fl),e.backgroundObj=new zt,e.addChild(e.guideLine,e.backgroundObj,e.textObj),e}});constructor(e){super(),this.renderer=e,this.timingBoxPool.sortableChildren=!0,this.addChild(this.timingBoxPool)}update(e,t){if(!this.renderer.chartManager.eventSelection.shift){this.timingBoxPool.destroyAll(),this.timingBoxMap.clear(),this.trackPosCache.clear();return}const i=this.renderer.chartManager.eventSelection.shift.beatShift;for(const s of this.renderer.chartManager.eventSelection.timingEvents)if(!(ts.beat+i)&&!this.timingBoxMap.has(s)){const n=this.timingBoxPool.createChild();if(!n)continue;this.timingBoxMap.set(s,n);let a="";switch(s.type){case"BPMS":case"STOPS":case"WARPS":case"DELAYS":case"TICKCOUNTS":case"FAKES":case"SCROLLS":a=ae(s.value,3).toString();break;case"SPEEDS":a=`${ae(s.value,3)}/${ae(s.delay,3)}/${s.unit}`;break;case"LABELS":a=s.value;break;case"TIMESIGNATURES":a=`${ae(s.upper,3)}/${ae(s.lower,3)}`;break;case"COMBOS":a=`${ae(s.hitMult,3)}/${ae(s.missMult,3)}`;break;case"BGCHANGES":case"FGCHANGES":a=s.file;break;case"ATTACKS":a=`${s.mods} (${s.endType}=${s.value})`}const o=x.chart.timingEventOrder.right.includes(s.type)?"right":"left";if(Object.assign(n,{alpha:.4,zIndex:s.beat}),n.textObj.text=a,n.textObj.anchor.set(.5,.55),n.backgroundObj.width=n.textObj.width+10,n.backgroundObj.height=25,n.backgroundObj.tint=kr[s.type]??0,n.backgroundObj.position.x=-n.backgroundObj.width/2,n.backgroundObj.position.y=-n.backgroundObj.height/2,n.guideLine.height=1,n.guideLine.anchor.set(o=="left"?0:1,.5),n.guideLine.width=Math.abs(n.position.x)+192-n.backgroundObj.width/2,n.guideLine.position.x=(o=="left"?1:-1)*n.backgroundObj.width/2,this.renderer.chartManager.editTimingMode!=Ie.Off){let l=this.getTrackPos(s.type);l+=Ki[s.type]/2*(l>0?1:-1),n.position.x=l,n.pivot.x=0}else{let l=(o=="right"?1:-1)*(this.renderer.chart.gameType.notefieldWidth*.5+80);o=="left"&&(l-=30),n.position.x=l,n.pivot.x=o=="right"?-n.backgroundObj.width/2:n.backgroundObj.width/2}}for(const[s,n]of this.timingBoxMap.entries()){if(ts.beat+i){this.timingBoxPool.destroyChild(n),this.timingBoxMap.delete(s);continue}n.y=x.chart.CMod&&s.second?this.renderer.getYPosFromSecond(s.second):this.renderer.getYPosFromBeat(s.beat+i)}}getTrackPos(e){if(this.trackPosCache.has(e))return this.trackPosCache.get(e);const t=x.chart.timingEventOrder.left,i=x.chart.timingEventOrder.right;let s=-this.renderer.chart.gameType.notefieldWidth*.5-128;for(let n=t.length-1;n>=0;n--){const a=t[n];this.trackPosCache.set(a,s),s-=Ki[a]}s=this.renderer.chart.gameType.notefieldWidth*.5+128;for(let n=0;n{if(this.editingCol!=-1){const a=x.chart.snap==0?.020833333333333332:x.chart.snap,o=Math.round(this.getBeatFromYPos(this.lastMousePos.y)/a)*a;this.chartManager.editHoldBeat(this.editingCol,o,n.shiftKey)}};let i=0;const s=()=>{if(!this.chartManager.selection.shift&&!this.selectionBounds||i==0)return;const n=this.getYPosFromBeat(Math.max(0,this.chartManager.beat+i));this.chartManager.beat=Math.max(0,this.chartManager.beat+i),this.selectionBounds&&(x.chart.reverse?this.selectionBounds.start.y-=x.chart.receptorYPos/x.chart.zoom+n:this.selectionBounds.start.y+=x.chart.receptorYPos/x.chart.zoom-n,this.selectionBoundary.update())};this.chartManager.app.ticker.add(s),window.addEventListener("keydown",t),this.on("destroyed",()=>{window.removeEventListener("keydown",t),this.removeAllListeners(),this.chartManager.app.ticker.remove(s)}),this.on("pointerdown",n=>{Uu(n)||this.chartManager.getMode()==K.Play||this.chartManager.getMode()==K.View||(this.chartManager.editTimingMode==Ie.Add&&this.lastMousePos?this.timingTracks.placeGhostEvent():this.chartManager.editTimingMode==Ie.Off&&x.chart.mousePlacement&&this.lastMouseBeat!=-1&&this.lastMouseCol!=-1&&!n.getModifierState("Shift")?(this.chartManager.clearSelections(),this.editingCol=this.lastMouseCol,this.chartManager.setNote(this.lastMouseCol,"mouse",this.lastMouseBeat)):(!n.getModifierState("Control")&&!n.getModifierState("Meta")&&!n.getModifierState("Shift")&&this.chartManager.clearSelections(),this.chartManager[this.chartManager.editTimingMode==Ie.Off?"startDragSelection":"startDragEventSelection"](),this.selectionBounds={start:this.toLocal(n.global),end:this.toLocal(n.global)},this.selectionBoundary.update()))}),this.on("mousemove",n=>{if(this.lastMousePos=this.toLocal(n.global),this.editingCol!=-1){const a=x.chart.snap==0?.020833333333333332:x.chart.snap,o=Math.round(this.getBeatFromYPos(this.lastMousePos.y)/a)*a;this.chartManager.editHoldBeat(this.editingCol,o,n.shiftKey)}this.selectionBounds&&(this.selectionBounds.end=this.toLocal(n.global),this.selectionBoundary.update()),i=Math.max(0,this.lastMousePos.y-this.getLowerBound()+100)/600,this.lastMousePos.y<0&&(i=Math.min(0,this.lastMousePos.y-this.getUpperBound()-100)/600),x.chart.reverse&&(i=Math.max(0,this.getUpperBound()-this.lastMousePos.y+100)/600,this.lastMousePos.y>0&&(i=Math.min(0,this.getLowerBound()-this.lastMousePos.y-100)/600))}),this.on("pointerup",()=>{this.editingCol!=-1&&(this.chartManager.endEditing(this.editingCol),this.editingCol=-1),this.chartManager[this.chartManager.editTimingMode==Ie.Off?"endDragSelection":"endDragEventSelection"](),this.selectionBounds=void 0,this.selectionBoundary.update(),i=0})}isDragSelecting(){return!!this.selectionBounds}doJudgement(e,t,i){this.chartManager.getMode()==K.Play&&(this.judgement.doJudge(t,i),this.timingBar.addBar(t,i)),this.notefield.onJudgement(e.col,i)}startPlay(){this.notefield.startPlay()}endPlay(){this.notefield.endPlay(),this.timingBar.reset(),this.judgement.reset()}update(){if(this.destroyed)return;this.cachedBeat=this.chartManager.beat,this.cachedTime=this.chartManager.time,this.x=this.chartManager.app.renderer.screen.width/2+x.chart.receptorXPos,this.speedMult=x.chart.doSpeedChanges?this.getCurrentSpeedMult():1;const e=this.getTopOnScreenBeat(),t=this.getBottomOnScreenBeat(),i=Math.min(e,t),s=Math.max(e,t);if(this.scale.x=x.chart.zoom,this.scale.y=x.chart.zoom,this.children.forEach(n=>n.update(i,s)),this.notefield.alpha=this.chartManager.editTimingMode==Ie.Off||this.chartManager.getMode()==K.Play?1:.3,x.chart.mousePlacement&&this.lastMousePos&&this.chartManager.getMode()!=K.Play){const n=x.chart.snap==0?.020833333333333332:x.chart.snap,a=Math.round(this.getBeatFromYPos(this.lastMousePos.y)/n)*n;let o=-1;for(let l=0;lu-c/2){o=l;break}}(a!=this.lastMouseBeat||o!=this.lastMouseCol||this.chartManager.getEditingNoteType()!=this.lastNoteType)&&(this.lastMouseBeat=a,this.lastMouseCol=o,this.lastNoteType=this.chartManager.getEditingNoteType(),this.editingCol!=-1&&this.chartManager.editHoldBeat(this.editingCol,a,!1),o===-1?(this.lastMouseBeat=-1,this.lastMouseCol=-1,this.notefield.setGhostNote()):this.notefield.setGhostNote(this.chart.computeNote({beat:a,col:this.lastMouseCol,type:this.chartManager.getEditingNoteType()})))}this.lastMousePos&&this.chartManager.editTimingMode==Ie.Add&&this.timingTracks.updateGhostEvent(this.lastMousePos)}getTimeWithOffset(){let e=this.cachedTime;return(this.chartManager.getMode()==K.Play||this.chartManager.getMode()==K.Record)&&(e+=x.play.offset*x.audio.rate),e}getBeatWithOffset(){let e=this.cachedBeat;return(this.chartManager.getMode()==K.Play||this.chartManager.getMode()==K.Record)&&(e=this.chart.getBeatFromSeconds(this.getTimeWithOffset())),e}getVisualTime(){let e=this.cachedTime;return(this.chartManager.getMode()==K.Play||this.chartManager.getMode()==K.Record)&&(e+=(x.play.offset+x.play.visualOffset)*x.audio.rate),e}getVisualBeat(){let e=this.cachedBeat;return(this.chartManager.getMode()==K.Play||this.chartManager.getMode()==K.Record)&&(e=this.chart.getBeatFromSeconds(this.getVisualTime())),e}getYPosFromBeat(e){const t=this.getVisualTime(),i=this.getVisualBeat(),s=x.chart.reverse?-1:1;return x.chart.CMod?(this.chart.getSecondsFromBeat(e)-t)*this.getSecondsToPixelsRatio()*s+this.getActualReceptorYPos():i==e?this.getActualReceptorYPos():(x.chart.doSpeedChanges?this.chart.timingData.getEffectiveBeat(e)-this.chart.timingData.getEffectiveBeat(i):e-i)*this.getEffectiveBeatsToPixelsRatio()*s+this.getActualReceptorYPos()}getYPosFromSecond(e){const t=this.getVisualTime(),i=x.chart.reverse?-1:1;return x.chart.CMod?(e-t)*this.getSecondsToPixelsRatio()*i+this.getActualReceptorYPos():this.getYPosFromBeat(this.chart.timingData.getBeatFromSeconds(e))}getSecondFromYPos(e){const t=x.chart.reverse?-1:1;if(x.chart.CMod){const i=this.getPixelsToSecondsRatio(),s=this.getVisualTime(),a=(e-this.getActualReceptorYPos())*i*t;return s+a}return this.chart.getSecondsFromBeat(this.getBeatFromYPos(e))}getBeatFromYPos(e,t){const i=this.getVisualBeat(),s=x.chart.reverse?-1:1;if(x.chart.CMod)return this.chart.getBeatFromSeconds(this.getSecondFromYPos(e));const a=(e-this.getActualReceptorYPos())*this.getPixelsToEffectiveBeatsRatio()*s;if(x.chart.doSpeedChanges&&!t){const o=this.chart.timingData.getEffectiveBeat(i)+a;return this.chart.getBeatFromEffectiveBeat(o)}return i+a}getColumnFromXPos(e){const t=this.chart.gameType;let i=null;for(let s=0;si)return s-1;i=n}return t.numCols-1}getActualReceptorYPos(){return x.chart.receptorYPos/x.chart.zoom*(x.chart.reverse?-1:1)}getEffectiveBeatsToPixelsRatio(){return x.chart.speed/100*64*this.speedMult}getPixelsToEffectiveBeatsRatio(){return 1/this.getEffectiveBeatsToPixelsRatio()}getSecondsToPixelsRatio(){return x.chart.speed/100*64*4}getPixelsToSecondsRatio(){return 1/this.getSecondsToPixelsRatio()}isNegScroll(e){return x.chart.doSpeedChanges&&(this.speedMult<0||(this.chart.timingData.getEventAtBeat("SCROLLS",e)?.value??1)<0||(this.chart.timingData.getEventAtBeat("BPMS",e)?.value??120)<0)}getUpperBound(){return-this.y/x.chart.zoom-64}getLowerBound(){return(this.chartManager.app.renderer.screen.height-this.y)/x.chart.zoom+64}findFirstOnScreenScroll(){const e=[...this.chart.timingData.getTimingData("SCROLLS")];e[0]?.beat!=0&&e.splice(0,0,{beat:0,value:e[0]?.value??1,type:"SCROLLS"});let t=Nt(e,this.getVisualBeat()-x.chart.maxDrawBeatsBack,i=>i.beat);for(;ts.beat);const i=Nt(e,this.getVisualBeat()-x.chart.maxDrawBeatsBack,s=>s.beat);for(;t>=i;){const s=e[t];t--;const n=s===void 0?-1/0*this.getScrollDirection(e[0]?.value??1):this.getYPosFromBeat(s.beat??0),a=e[t+2]===void 0?1/0*this.getScrollDirection(s.value):this.getYPosFromBeat(e[t+2].beat);if(this.isAreaOnScreen(n,a))return s}return{beat:0,value:1,type:"SCROLLS"}}getTopOnScreenBeat(){if(x.chart.waveform.speedChanges&&!x.chart.CMod&&x.chart.doSpeedChanges){const e=this.findFirstOnScreenScroll(),t=1/Math.abs(this.getEffectiveBeatsToPixelsRatio()),i=this.getYPosFromBeat(e.beat),s=t/Math.abs(e.value),n=this.getScrollDirection(e.value),a=n==1?this.getUpperBound():this.getLowerBound(),o=n*(a-i)*s+e.beat;return Math.max(this.getVisualBeat()-x.chart.maxDrawBeatsBack,o)}return x.chart.CMod?this.getBeatFromYPos(this.getUpperBound()):Math.max(this.getVisualBeat()-x.chart.maxDrawBeatsBack,this.getBeatFromYPos(this.getUpperBound()))}getBottomOnScreenBeat(){if(x.chart.waveform.speedChanges&&!x.chart.CMod&&x.chart.doSpeedChanges){const e=this.findLastOnScreenScroll(),t=1/Math.abs(this.getEffectiveBeatsToPixelsRatio()),i=this.getYPosFromBeat(e.beat),s=t/Math.abs(e.value),n=this.getScrollDirection(e.value),a=n==1?this.getLowerBound():this.getUpperBound(),o=n*(a-i)*s+e.beat;return Math.min(this.getVisualBeat()+x.chart.maxDrawBeats,o)}return x.chart.CMod?this.getBeatFromYPos(this.getLowerBound()):Math.min(this.getVisualBeat()+x.chart.maxDrawBeats,this.getBeatFromYPos(this.getLowerBound()))}isAreaOnScreen(e,t){ti}getCurrentSpeedMult(){return this.chart.timingData.getSpeedMult(this.getVisualBeat(),this.getVisualTime())}getScrollDirection(e){let t=1;return this.getCurrentSpeedMult()<0&&(t*=-1),x.chart.reverse&&(t*=-1),e<0&&(t*=-1),t}getUpperBoundBeat(){if(x.chart.waveform.speedChanges&&!x.chart.CMod&&x.chart.doSpeedChanges){const e=x.chart.speed,t=this.chart.timingData.getSpeedMult(this.getVisualBeat(),this.getVisualTime()),i=t>=0!=x.chart.reverse?1:-1,s=this.chart.timingData.getTimingData("SCROLLS"),n=100/e/Math.abs(t)/64/x.chart.zoom,a=this.getUpperBound(),o=this.getLowerBound();let l=Nt(s,this.getVisualBeat()-x.chart.maxDrawBeatsBack,m=>m.beat);for(this.getVisualBeat()-x.chart.maxDrawBeatsBack0&&w>a&&(ga||!s[l-1]||s[l-1].beat0?s[l-1]?.value==0&&this.getYPosFromBeat(s[l-1].beat)>p?this.getVisualBeat()-x.chart.maxDrawBeatsBack:Math.max(this.getVisualBeat()-x.chart.maxDrawBeatsBack,c+d*(p-u)):s[l-1]?.value==0&&this.getYPosFromBeat(s[l-1].beat)=0!=x.chart.reverse?1:-1,s=this.chart.timingData.getTimingData("SCROLLS"),n=100/e/Math.abs(t)/64/x.chart.zoom,a=this.getUpperBound(),o=this.getLowerBound();let l=Nt(s,this.getVisualBeat()+x.chart.maxDrawBeats,m=>m.beat);for(;l=0&&(s[l].beat??0)>this.getVisualBeat()-x.chart.maxDrawBeatsBack;){const m=s[l],g=this.getYPosFromBeat(m?.beat??0),b=s[l+1]?.beat??this.getVisualBeat()+x.chart.maxDrawBeats,w=this.getYPosFromBeat(b);if((m?.value??1)*i>0&&go||!s[l+1]||s[l+1].beat>this.getVisualBeat()+x.chart.maxDrawBeatsBack||s[l+1].value==0)||(m?.value??1)*i<0&&g>o&&(wthis.getVisualBeat()+x.chart.maxDrawBeatsBack||s[l+1].value==0))break;l--}const c=s[l]?.beat??0,u=this.getYPosFromBeat(c),h=s[l]?.value??1,d=n/Math.abs(h)*x.chart.zoom,f=x.chart.reverse?o:a,p=x.chart.reverse?a:o;return h*i>0?s[l+1]?.value==0&&this.getYPosFromBeat(s[l+1].beat)f?this.getVisualBeat()+x.chart.maxDrawBeats:Math.min(this.getVisualBeat()+x.chart.maxDrawBeats,c+d*(u-f))}return x.chart.CMod?this.getBeatFromYPos(this.getLowerBound()):Math.min(this.getVisualBeat()+x.chart.maxDrawBeats,this.getBeatFromYPos(this.getLowerBound()))}selectionTest(e){if(!this.selectionBounds)return!1;const t=this.selectionBoundary.getBounds(),i=e.getBounds(),s=16*x.chart.zoom;return t.x+t.width>i.x+s&&t.xi.y+s&&t.y{const u=o,h=this.toLocal(c.global);if(Math.abs(h.y-a-n)**2+Math.abs(h.x-s)**2<32*32){this.chartManager.selection.shift&&(this.chartManager.selection.shift={columnShift:0,beatShift:0});return}const d=this.getBeatFromYPos(h.y-a),f=x.chart.snap==0?1/48:x.chart.snap;let p=Math.round(d/f)*f;Math.abs(p-d)>Math.abs(d-u.beat)&&(p=u.beat);const m=this.getColumnFromXPos(h.x);this.chartManager.selection.shift||={columnShift:0,beatShift:0},i!=m-u.col&&(i=m-u.col,this.chartManager.selection.notes.every(g=>{const b=g.col+i;return b>=0&&bg.beat)),p-u.beat)};e.on("pointerdown",c=>{if(this.chartManager.getMode()==K.View)return;if(Uu(c)){this.chartManager.isNoteInSelection(t)||(this.chartManager.clearSelections(),this.chartManager.addNoteToSelection(t)),rD.open(this.chartManager.app,c),c.preventDefault();return}if(x.chart.mousePlacement&&!c.getModifierState("Meta")&&!c.getModifierState("Control")&&!c.getModifierState("Shift")&&!this.chartManager.isNoteInSelection(t))return;c.stopImmediatePropagation(),this.chartManager.isNoteInSelection(t)?(c.getModifierState("Control")||c.getModifierState("Meta"))&&this.chartManager.removeNoteFromSelection(t):(!c.getModifierState("Control")&&!c.getModifierState("Meta")&&!c.getModifierState("Shift")&&this.chartManager.clearSelections(),this.chartManager.addNoteToSelection(t)),s=e.x,n=e.y,a=this.toLocal(c.global).y-e.y,o=t,this.on("pointermove",l);const u=()=>{this.off("pointermove",l),this.off("pointerup",u),((this.chartManager.selection.shift?.beatShift??0)!=0||(this.chartManager.selection.shift?.columnShift??0)!=0)&&this.chartManager.modifySelection(h=>(h.beat+=this.chartManager.selection.shift.beatShift,h.col+=this.chartManager.selection.shift.columnShift,h)),this.chartManager.selection.shift=void 0};this.on("pointerup",u)}),e.on("destroyed",()=>{e?.removeAllListeners()})}getNotefield(){return this.notefield}swapNoteskin(e){x.chart.noteskin.name=e,x.chart.lastNoteskins[this.chart.gameType.id]=e,this.reloadNotefield()}reloadNotefield(){const e=new e0(this);this.addChildAt(e,this.children.indexOf(this.notefield)),this.notefield.destroy(),this.notefield=e}getSelectionBounds(){return this.selectionBounds}shouldDisplayBarlines(){return(this.chartManager.getMode()!=K.Play||!x.play.hideBarlines)&&De.barlines}}class Yd extends AudioBufferSourceNode{started=!1;start(e,t,i){this.started||super.start(e,t,i),this.started=!0}stop(e){this.started&&super.stop(e),this.started=!1}static create(e){const t=e;return t.started=!1,Object.setPrototypeOf(t,Yd.prototype),t}}class LD extends BiquadFilterNode{enabled=!1;static create(e){const t=e;return t.enabled=!1,t}}class el{_audioAnalyzer;_filteredAudioAnalyzer;_freqData;_filteredFreqData;_gainNode;type;_audioContext=new AudioContext;_source;_playbackTime=0;_startTimestamp=0;_rate=1;_isPlaying=!1;_buffer;_filteredBuffer;_loadedBuffer;_delay;_loadListeners=[];_updateListeners=[];_volume=1;_destroyed=!1;_renderTimeout;_filters=[this.createFilter({type:"highpass",frequency:20,Q:.71}),this.createFilter({type:"lowshelf",frequency:75,gain:0}),this.createFilter({type:"peaking",frequency:100,gain:0,Q:.6}),this.createFilter({type:"peaking",frequency:250,gain:0,Q:.3}),this.createFilter({type:"peaking",frequency:1040,gain:0,Q:.41}),this.createFilter({type:"peaking",frequency:2500,gain:0,Q:.2}),this.createFilter({type:"highshelf",frequency:7500,gain:0}),this.createFilter({type:"lowpass",frequency:2e4,Q:.71})];_filtersEnabled=!1;onStop;loaded;constructor(e,t){this.type=t??"",this._filters[0].gain.value=-25,this._audioAnalyzer=this._audioContext.createAnalyser(),this._audioAnalyzer.fftSize=4096,this._audioAnalyzer.maxDecibels=0,this._freqData=new Uint8Array(this._audioAnalyzer.frequencyBinCount),this._filteredAudioAnalyzer=this._audioContext.createAnalyser(),this._filteredAudioAnalyzer.fftSize=4096,this._filteredAudioAnalyzer.maxDecibels=0,this._filteredFreqData=new Uint8Array(this._filteredAudioAnalyzer.frequencyBinCount),this._gainNode=this._audioContext.createGain(),this._buffer=this._audioContext.createBuffer(2,1,44100),this._filteredBuffer=this._audioContext.createBuffer(2,1,44100),this._loadedBuffer=this._audioContext.createBuffer(2,1,44100),this.initSource(),this.loaded=new Promise(i=>{this.decodeData(e).then(s=>{if(s)return this._loadedBuffer=s,s}).then(async s=>(await this.renderBuffer(s),await this.renderFilteredBuffer(s),s)).catch(s=>{s.name=="EncodingError"?Ee.createFormatted("Failed to load audio: file format not supported","error"):Ee.createFormatted("Failed to load audio: "+s.message,"error")}).finally(()=>{this.initSource(),this.callLoadListeners(),this.callUpdateListeners(),i()})})}async renderBuffer(e){if(!e)return;const t=new OfflineAudioContext(e.numberOfChannels,e.length,e.sampleRate),i=t.createBufferSource();return i.buffer=e,i.connect(t.destination),i.start(),await t.startRendering().then(s=>{this._buffer=s}).catch(()=>{Ee.createFormatted("Failed to load audio: audio rendering failed","error")})}async renderFilteredBuffer(e){if(!e)return;const t=new OfflineAudioContext(e.numberOfChannels,e.length,e.sampleRate),i=t.createBufferSource();i.buffer=e;let s=i;for(const n of this._filters){if(!n.enabled)continue;const a=t.createBiquadFilter();a.type=n.type,a.Q.setValueAtTime(n.Q.value,0),a.frequency.setValueAtTime(n.frequency.value,0),a.gain.setValueAtTime(n.gain.value,0),s.connect(a),s=a}return s.connect(t.destination),i.start(),await t.startRendering().then(n=>{this._filteredBuffer=n}).catch(()=>{Ee.createFormatted("Failed to load audio: audio rendering failed","error")})}createFilter(e){const t=LD.create(this._audioContext.createBiquadFilter());return t.type=e.type,e.Q!==void 0&&(t.Q.value=e.Q),e.gain!==void 0&&(t.gain.value=e.gain),e.frequency!==void 0&&(t.frequency.value=e.frequency),t}getFilters(){return this._filters}getFilter(e){return this._filters[e]}updateFilter(e,t){this._filters[e]&&(t.Q!==void 0&&(this._filters[e].Q.value=t.Q),t.frequency!==void 0&&(this._filters[e].frequency.value=t.frequency),t.gain!==void 0&&(this._filters[e].gain.value=t.gain),clearTimeout(this._renderTimeout),this._renderTimeout=setTimeout(()=>this.renderFilteredBuffer(this._loadedBuffer).then(()=>this.callUpdateListeners()),500))}enableFilter(e){this._filters[e].enabled=!0,this.initSource(),clearTimeout(this._renderTimeout),this._renderTimeout=setTimeout(()=>this.renderFilteredBuffer(this._loadedBuffer).then(()=>this.callUpdateListeners()),500),this._filtersEnabled=!0}disableFilter(e){this._filters[e].enabled=!1,this.initSource(),clearTimeout(this._renderTimeout),this._renderTimeout=setTimeout(()=>this.renderFilteredBuffer(this._loadedBuffer).then(()=>this.callUpdateListeners()),500),this._filtersEnabled=this._filters.some(t=>t.enabled)}hasFilters(){return this._filtersEnabled}onLoad(e){this._loadListeners.push(e)}offLoad(e){this._loadListeners=this._loadListeners.filter(t=>t!=e)}onUpdate(e){this._updateListeners.push(e)}offUpdate(e){this._updateListeners=this._updateListeners.filter(t=>t!=e)}getSongLength(){return this._buffer.length/this._buffer.sampleRate}getFrequencyData(){return this._destroyed?new Uint8Array:(this._audioAnalyzer.getByteFrequencyData(this._freqData),this._freqData)}getFilteredFrequencyData(){return this._destroyed?new Uint8Array:(this._filteredAudioAnalyzer.getByteFrequencyData(this._filteredFreqData),this._filteredFreqData)}getSampleRate(){return this._buffer.sampleRate}getFFTSize(){return this._audioAnalyzer.fftSize}getRawData(){if(this._destroyed)return[];const e=[];for(let t=0;ti.enabled)?this._filters.filter(i=>i.enabled).map(i=>{const s=new Float32Array(e.length);return i.getFrequencyResponse(t,s,new Float32Array(e.length)),[...s]}).reduce((i,s)=>i.map((n,a)=>n*s[a])):new Array(e.length).fill(1)}callLoadListeners(){this._loadListeners.forEach(e=>e())}callUpdateListeners(){this._updateListeners.forEach(e=>e())}async decodeData(e){return new Promise((t,i)=>{if(!e){t();return}(async()=>{try{t(await this._audioContext.decodeAudioData(e))}catch(s){if(this.type==".ogg"){const n=(await Qe(()=>import("./OggDec-2941c3fd.js"),[])).default;try{t(await n.decodeOggData(e))}catch(a){i(a)}return}i(s)}})()})}initSource(){for(const t of this._filters)t.disconnect();this._audioAnalyzer.disconnect(),this._filteredAudioAnalyzer.disconnect(),this._gainNode.disconnect(),this._audioContext.destination.disconnect(),this._source?.stop(),this._source=Yd.create(this._audioContext.createBufferSource()),this._source.buffer=this._buffer,this._source.connect(this._audioAnalyzer);let e=this._audioAnalyzer;for(const t of this._filters)t.enabled&&(e.connect(t),e=t);e.connect(this._filteredAudioAnalyzer),x.audio.allowFilter?this._filteredAudioAnalyzer.connect(this._gainNode):this._audioAnalyzer.connect(this._gainNode),this._gainNode.connect(this._audioContext.destination),this._source.playbackRate.value=this._rate,this._isPlaying&&(this.pause(),this.play())}volume(e){this._destroyed||this._volume!=e&&(this._volume=e,this._gainNode.gain.setValueAtTime(e,this._audioContext.currentTime))}rate(e){this._destroyed||this._rate!=e&&(this._rate=e,this._source&&(this._isPlaying&&(this._playbackTime+=(this._audioContext.currentTime-this._startTimestamp)*this._source.playbackRate.value),this._startTimestamp=this._audioContext.currentTime,this._source.playbackRate.value=e))}play(){this._destroyed||this._source&&(this._isPlaying||(this.initSource(),this._playbackTime<=this._buffer.duration&&this._source.start(Math.max(0,this._audioContext.currentTime-this._playbackTime/x.audio.rate),Math.max(0,this._playbackTime)),this._startTimestamp=this._audioContext.currentTime,this._isPlaying=!0))}seek(e){if(e===void 0)return this._destroyed?this._playbackTime:this._source?this._isPlaying?(this._audioContext.currentTime-this._startTimestamp)*this._source.playbackRate.value+this._playbackTime:this._playbackTime:this._playbackTime;this._isPlaying?(this.stop(),this._playbackTime=e,this.play()):this._playbackTime=e}pause(){this._destroyed||this.stop(!0)}stop(e){this._destroyed||this._source&&this._isPlaying&&(this.onStop?.(),clearTimeout(this._delay),this._isPlaying=!1,this._playbackTime<=this._buffer.duration&&this._source.stop(),this._playbackTime=e?(this._audioContext.currentTime-this._startTimestamp)*this._source.playbackRate.value+this._playbackTime:0)}}class OD{judgementCounts=new Map;holdJudgementCounts=new Map;dancePoints=0;maxCumulativeDancePoints=0;maxDancePoints=0;chartManager;notedata;dataPoints=[];handlers=[];combo=0;missCombo=0;maxCombo=0;bestJudge;constructor(e){this.notedata=e.loadedChart.getNotedata(),this.chartManager=e,this.bestJudge=rt.getCollection(x.play.timingCollection).getStandardWindows()[0],this.calculateMaxDP()}onJudge(e){this.handlers.push(e)}applyOffset(e){this.dataPoints=this.dataPoints.map(t=>Li(t.judgement)||!cr(t.judgement)?t:{...t,error:t.error!==null?t.error+e:null})}addDataPoint(e,t,i){this.judgementCounts.has(t)||this.judgementCounts.set(t,0),this.judgementCounts.set(t,this.judgementCounts.get(t)+1),this.dancePoints+=t.dancePoints;const s=this.chartManager.loadedChart.timingData.getEventAtBeat("COMBOS",e[0].beat),n=s?.hitMult??1,a=s?.missMult??1;mh(t)||(this.maxCumulativeDancePoints+=rt.getCollection(x.play.timingCollection).getMaxDancePoints()),Li(t)?(this.chartManager.loadedChart.gameType.gameLogic.usesHoldTicks||(this.maxCumulativeDancePoints+=e.filter(Be).reduce((o,l)=>o+rt.getCollection(x.play.timingCollection).getMaxHoldDancePoints(l.type),0)),this.combo=0,this.missCombo+=a,this.bestJudge=void 0):cr(t)&&(rt.getCollection(x.play.timingCollection).shouldHideNote(t)?(this.combo+=e.length*n,this.combo>this.maxCombo&&(this.maxCombo=this.combo),this.missCombo=0,this.bestJudge&&t.getTimingWindowMS()>this.bestJudge.getTimingWindowMS()&&(this.bestJudge=t)):(this.bestJudge=void 0,this.combo=0)),this.handlers.forEach(o=>o(i,t)),this.dataPoints.push({second:e[0].second,error:i,judgement:t,notes:e})}addHoldDataPoint(e,t){this.judgementCounts.has(t)||this.judgementCounts.set(t,0),this.judgementCounts.set(t,this.judgementCounts.get(t)+1);const i=rt.getCollection(x.play.timingCollection).getHeldJudgement(e);this.holdJudgementCounts.has(i)||this.holdJudgementCounts.set(i,[0,0]);const s=this.holdJudgementCounts.get(i);Us(t)?s[0]++:s[1]++,this.holdJudgementCounts.set(i,s),this.dancePoints+=t.dancePoints,this.maxCumulativeDancePoints+=rt.getCollection(x.play.timingCollection).getMaxHoldDancePoints(e.type),this.handlers.forEach(n=>n(0,t)),Vn(t)&&(this.bestJudge=void 0)}getScore(){return this.maxDancePoints==0?0:this.dancePoints/this.maxDancePoints}getCumulativeScore(){return this.maxCumulativeDancePoints==0?0:this.dancePoints/this.maxCumulativeDancePoints}getDataPoints(){return this.dataPoints}getMedian(){return fh(this.dataPoints.filter(e=>!Li(e.judgement)&&cr(e.judgement)&&e.error!=null).map(e=>e.error))}getMaxCombo(){return this.maxCombo}calculateMaxDP(){this.maxDancePoints=this.chartManager.loadedChart.gameType.gameLogic.calculateMaxDP(this.notedata,this.chartManager.loadedChart.timingData)}getCount(e){return this.judgementCounts.get(e)??0}getCombo(){return this.combo}getMissCombo(){return this.missCombo}getBestJudge(){return this.bestJudge}}const ci=[1,2,3,4,6,8,12,16,24,48,-1],i0=.2;var K=(r=>(r.View="View Mode",r.Edit="Edit Mode",r.Play="Play Mode",r.Record="Record Mode",r))(K||{}),Ie=(r=>(r[r.Off=0]="Off",r[r.Edit=1]="Edit",r[r.Add=2]="Add",r))(Ie||{});class YD{app;chartAudio=new el;chartView;widgetManager;assistTick=new Pc({src:R2,volume:.5});me_high=new Pc({src:mb,volume:.5});me_low=new Pc({src:gb,volume:.5});mine=new Fl.Howl({src:F2,volume:.5});loadedSM;smPath="";loadedChart;selection={notes:[],inProgressNotes:[]};eventSelection={timingEvents:[],inProgressTimingEvents:[]};editTimingMode=0;holdEditing=[];editNoteTypeIndex=0;partialScroll=0;noteFlashIndex=0;assistTickIndex=0;lastMetronomeDivision=-1;lastMetronomeMeasure=-1;lastSong=null;mode="Edit Mode";lastMode="Edit Mode";_beat=0;noChartTextA;noChartTextB;loadingText;shiftPressed=0;virtualClipboard="";lastAutoSave=0;startRegion;endRegion;gameStats;constructor(e){this.app=e,document.addEventListener("keydown",i=>{i.key=="Shift"&&this.shiftPressed++}),document.addEventListener("keyup",i=>{i.key=="Shift"&&(this.shiftPressed=Math.max(this.shiftPressed-1,0))}),document.addEventListener("cut",i=>{if(i.target.classList.contains("inlineEdit")||i.target instanceof HTMLTextAreaElement||i.target instanceof HTMLInputElement||this.mode!="Edit Mode")return;const s=this.copy();s&&i.clipboardData?.setData("text/plain",s),this.eventSelection.timingEvents.length>0?this.deleteEventSelection():this.deleteSelection(),i.preventDefault()},!0),document.addEventListener("copy",i=>{if(i.target.classList.contains("inlineEdit")||i.target instanceof HTMLTextAreaElement||i.target instanceof HTMLInputElement||this.mode!="Edit Mode")return;const s=this.copy();s&&i.clipboardData?.setData("text/plain",s),i.preventDefault(),i.stopImmediatePropagation()},!0),document.addEventListener("paste",i=>{if(i.target.classList.contains("inlineEdit")||i.target instanceof HTMLTextAreaElement||i.target instanceof HTMLInputElement||this.mode!="Edit Mode")return;const s=i.clipboardData?.getData("text/plain");s&&this.paste(s,this.shiftPressed>0),i.preventDefault(),i.stopImmediatePropagation()},!0),e.view.addEventListener?.("wheel",i=>{if(!(this.loadedSM==null||this.loadedChart==null||this.chartView==null))if(i.preventDefault(),Ii&&i.metaKey||!Ii&&i.ctrlKey){const s=i.deltaY/5*x.chart.scroll.scrollSensitivity*(x.chart.scroll.invertZoomScroll?-1:1);x.chart.speed=Oe(x.chart.speed*Math.pow(1.01,s),10,35e3)}else{if(this.mode=="Play Mode"||this.mode=="Record Mode")return;let s=this.beat;const n=x.chart.snap,a=x.chart.speed*(x.chart.reverse&&x.chart.scroll.invertReverseScroll?-1:1),o=i.deltaY/a*x.chart.scroll.scrollSensitivity;if(n==0?(this.partialScroll=0,s=this.beat+o):x.chart.scroll.scrollSnapEveryScroll?i.deltaY<0!=x.chart.scroll.invertReverseScroll?s=Math.round((this.beat-n)/n)*n:s=Math.round((this.beat+n)/n)*n:(this.partialScroll+=o,Math.abs(this.partialScroll)>n&&(this.partialScroll<0?s=Math.round((this.beat+Math.ceil(this.partialScroll/n)*n)/n)*n:s=Math.round((this.beat+Math.floor(this.partialScroll/n)*n)/n)*n,this.partialScroll%=n)),s=Math.max(0,s),s!=this.beat&&(this.beat=s),!this.holdEditing.every(l=>l==null))for(let l=0;l{this.noChartTextB.tint=8952234}),this.noChartTextB.on("mouseleave",()=>{this.noChartTextB.tint=5596791}),this.noChartTextB.on("mousedown",()=>{this.app.windowManager.openWindow(new ny(e,We.getGameType("dance-single")))}),this.noChartTextA.visible=!1,this.noChartTextB.visible=!1,this.app.stage.addChild(this.noChartTextB),this.loadingText=new Fe("Loading simfile...",{fontName:"Main",fontSize:20}),this.loadingText.anchor.set(.5),this.loadingText.tint=5592405,this.app.stage.addChild(this.loadingText),this.loadingText.visible=!1;const t=()=>{this.noChartTextA.x=this.app.renderer.screen.width/2,this.noChartTextA.y=this.app.renderer.screen.height/2-20,this.noChartTextB.x=this.app.renderer.screen.width/2,this.noChartTextB.y=this.app.renderer.screen.height/2+10,this.loadingText.x=this.app.renderer.screen.width/2,this.loadingText.y=this.app.renderer.screen.height/2};t(),this.app.ticker.add(()=>{const i=performance.now();this.widgetManager.update(),this.loadedSM&&this.loadedChart&&this.chartView&&this.chartView.update(),qa.instance?.addDrawUpdateTimeValue(performance.now()-i)}),setInterval(()=>{if(!this.loadedSM||!this.loadedChart||!this.chartView)return;const i=performance.now(),s=this.chartAudio.seek();if(this.chartAudio.isPlaying()&&!this.holdEditing.every(a=>!a))for(let a=0;a.3&&this.editHoldBeat(a,c,!1)}const n=this.loadedChart.getNotedata();if(this.chartAudio.isPlaying()){for(this._beat=this.loadedChart?.getBeatFromSeconds(this.time)??0;this.noteFlashIndexn[this.noteFlashIndex].second;)this.mode!="Record Mode"&&this.loadedChart.gameType.gameLogic.shouldAssistTick(n[this.noteFlashIndex])&&this.mode!="Play Mode"&&this.chartView.doJudgement(n[this.noteFlashIndex],0,Jb),this.noteFlashIndex++;const a=new Set;for(;this.assistTickIndexn[this.assistTickIndex].second+x.play.effectOffset-i0;){if(a.has(n[this.assistTickIndex].second)||n[this.assistTickIndex].second+x.play.effectOffset-s<0){this.assistTickIndex++;continue}this.mode!="Record Mode"&&this.loadedChart.gameType.gameLogic.shouldAssistTick(n[this.assistTickIndex])&&(x.audio.assistTick&&De.assist&&this.assistTick.play((n[this.assistTickIndex].second+x.play.effectOffset-s)/x.audio.rate),a.add(n[this.assistTickIndex].second)),this.assistTickIndex++}}if(this.chartAudio.isPlaying()&&x.audio.metronome&&De.assist){const a=this.loadedChart.timingData,o=this.loadedChart.getBeatFromSeconds(this.time+x.play.effectOffset+i0),l=new Set,c=a.getBeatFromMeasure(this.lastMetronomeMeasure),u=a.getDivisionLength(c),h=c+u*this.lastMetronomeDivision,d=[...a.getMeasureBeats(h,o)].slice(1);for(const[f,p]of d){if(this.beat>f)continue;const m=a.getSecondsFromBeat(f);if(l.has(m))continue;l.add(m);const g=(m+x.play.effectOffset-this.time)/x.audio.rate;p?this.me_high.play(g):this.me_low.play(g)}if(d.length>0){const f=d.at(-1)[0];this.lastMetronomeMeasure=Math.floor(a.getMeasure(f)),this.lastMetronomeDivision=Math.round(a.getDivisionOfMeasure(f))}}this.mode=="Play Mode"&&this.loadedChart.gameType.gameLogic.update(this),this.lastAutoSave+x.general.autosaveInterval*1e3{this.chartView&&(this.chartView.x=this.app.renderer.screen.width/2,this.chartView.y=this.app.renderer.screen.height/2),t()}),H.on("chartModified",()=>{this.loadedChart&&(this.loadedChart.recalculateStats(),this.setNoteIndex(),H.emit("chartModifiedAfter"))}),H.on("userOptionUpdated",i=>{i!="audio.rate"&&i!="play.effectOffset"&&i!="audio.assistTick"&&i!="audio.metronome"||(this.assistTick.stop(),this.me_low.stop(),this.me_high.stop(),this.setNoteIndex())}),window.addEventListener("keyup",i=>{if(this.mode=="Edit Mode"&&i.code.startsWith("Digit")){let s=parseInt(i.code.slice(5))-1;s==-1&&(s=9),this.endEditing(s)}},!0),window.addEventListener("keydown",i=>{const s=Re.getKeyNameFromCode(i.code);if(this.mode=="Edit Mode"&&!i.target.classList.contains("inlineEdit")&&!(i.target instanceof HTMLTextAreaElement)&&!(i.target instanceof HTMLInputElement)&&!Wn.active){if(i.code.startsWith("Digit")&&!i.repeat&&!i.ctrlKey&&!i.metaKey&&!i.altKey&&!i.ctrlKey){let n=parseInt(i.code.slice(5))-1;n==-1&&(n=9),n<(this.loadedChart?.gameType.numCols??4)&&(this.setNote(n,"key"),i.preventDefault(),i.stopImmediatePropagation())}if(!this.holdEditing.every(n=>n==null)){const n=["cursorUp","cursorDown","previousNote","nextNote","previousMeasure","nextMeasure","jumpChartStart","jumpChartEnd","jumpSongStart","jumpSongEnd"];for(const a of n)if(Re.getCombosForKeybind(a).map(o=>o.key).includes(s)){i.preventDefault(),i.stopImmediatePropagation(),ct[a].callback(this.app);for(let o=0;oo.key).includes(s)){this.holdEditing=[];return}}}},!0),window.addEventListener("keydown",i=>{this.mode!="Play Mode"&&this.mode!="Record Mode"||i.key=="Escape"&&(this.setMode(this.lastMode),this.chartAudio.pause())},!0)}get beat(){return this.loadedChart?this.chartAudio.isPlaying()?this.loadedChart.getBeatFromSeconds(this.time):this._beat:0}set beat(e){this.loadedChart&&(this.chartAudio.seek(this.loadedChart.getSecondsFromBeat(e)),this._beat=e,this.setNoteIndex(),this.lastMetronomeMeasure=Math.floor(this.loadedChart.timingData.getMeasure(this.beat)),this.lastMetronomeDivision=Math.floor(this.loadedChart.timingData.getDivisionOfMeasure(this.beat)))}get time(){return this.chartAudio.seek()}set time(e){this.loadedChart&&(this.chartAudio.seek(e),this.setNoteIndex())}async loadSM(e){if(Ak.close(),Tk.close(),Ck.close(),Ye.instance.isDirty()){const a=new Wa(this.app,"Save","Do you wish to save the current file?",[{label:"Cancel",type:"default"},{label:"No",type:"default"},{label:"Yes",type:"confirm"}]);this.app.windowManager.openWindow(a);const o=await a.resolved;if(o=="Cancel")return;o=="Yes"&&this.save(),o=="No"&&await this.removeAutosaves()}if(!e){this.smPath="",this.loadedSM=void 0,this.chartAudio.stop(),this.noChartTextA.visible=!1,this.noChartTextB.visible=!1,this.chartView?.destroy({children:!0});return}this.chartAudio.stop(),this.chartAudio.seek(0),this.lastSong=null,this.smPath=e,this.loadingText.visible=!0;let t=this.smPath;const i=this.getSMPath(".smebak");if(await Le.hasFile(i)){const a=new Wa(this.app,"Autosave","An autosave was found. Do you wish to load the autosave?",[{label:"No",type:"default"},{label:"Yes",type:"confirm"}]);this.app.windowManager.openWindow(a),await a.resolved=="Yes"&&(t=i)}const s=await Le.getFileHandle(t);if(!s){Ee.createFormatted("Couldn't load the file at "+t,"error"),this.app.windowManager.openWindow(new gy(this.app)),this.loadingText.visible=!1;return}const n=await s.getFile();this.loadedSM=new dy(n),await this.loadedSM.loaded,this.loadingText.visible=!1,this.noChartTextA.visible=!0,this.noChartTextB.visible=!0,this.editTimingMode=0,H.emit("smLoaded"),await this.loadChart(),H.emit("smLoadedAfter"),this.beat=0,cy.addSM(this.smPath,this.loadedSM)}async loadChart(e){if(this.loadedSM==null)return;if(e==null){if(this.loadedChart){const s=this.loadedSM.charts[this.loadedChart.gameType.id];s&&s.length>0&&(e=s.at(-1))}if(!e)for(const s of We.getPriority()){const n=this.loadedSM.charts[s.id];if(n&&n.length>0){e=n.at(-1);break}}if(!e){this.chartView?.destroy({children:!0}),this.chartView?.removeChildren(),this.beat=0,this.loadedChart=void 0,this.chartView=void 0,this.noChartTextA.visible=!0,this.noChartTextB.visible=!0,H.emit("chartLoaded"),H.emit("chartModified");return}}if(e==this.loadedChart)return;this.chartView?.destroy({children:!0}),this.chartView?.removeChildren(),this.clearSelections(),this.loadedChart=e,this.beat=this.loadedChart.getBeatFromSeconds(this.time),Ye.instance.reset(),x.play.timingCollection=x.play.defaultTimingCollection[e.gameType.id]??"ITG";const t=We.getGameType(x.chart.noteskin.type),i={type:e.gameType.id,name:x.chart.lastNoteskins[e.gameType.id]??"default"};if(t){const s=ut.getNoteskinData(t,x.chart.noteskin.name);s?.gameTypes.includes(e.gameType.id)&&(i.name=s.id)}if(x.chart.noteskin=i,x.chart.lastNoteskins[e.gameType.id]=i.name,this.setNoteIndex(),this.chartView=new FD(this),this.chartView.x=this.app.renderer.screen.width/2,this.chartView.y=this.app.renderer.screen.height/2,(this.mode=="Play Mode"||this.mode=="Record Mode")&&this.setMode(this.lastMode),De.viewMode&&this.setMode("View Mode"),this.noChartTextA.visible=!1,this.noChartTextB.visible=!1,this.loadedChart.getMusicPath()!=this.lastSong){this.lastSong=this.loadedChart.getMusicPath();const s=this.chartAudio.isPlaying();await this.loadAudio(),H.emit("audioLoaded"),s&&this.chartAudio.play()}Ee.create("Loaded chart "+e.difficulty+" "+e.meter+" "+e.gameType.id),H.emit("chartLoaded"),H.emit("audioLoaded"),H.emit("chartModified"),this.loadedChart.gameType.id=="dance-single"?window.Parity=new Qk(this.app,this.loadedChart.gameType.id):window.Parity=void 0,De.autoPlay&&this.playPause()}async loadAudio(){if(!this.loadedSM||!this.loadedChart)return;this.chartAudio.stop(),this.chartAudio?.destroy();const e=this.loadedChart.getMusicPath();if(Ee.create("Loading audio..."),e==""){Ee.createFormatted("Failed to load audio: no audio file","error");const n=Math.max(0,this.beat);this.chartAudio=new el(void 0),this.beat=n;return}const t=await this.getAudioHandle(e);if(t==null){Ee.createFormatted("Failed to load audio: couldn't find audio file "+e,"error");const n=Math.max(0,this.beat);this.chartAudio=new el(void 0),this.beat=n;return}const i=await t.getFile(),s=Math.max(0,this.beat);this.chartAudio=new el(await i.arrayBuffer(),sr(i.name)),this.chartAudio.onLoad(()=>{Ee.create("Loaded audio")}),this.beat=s,this.chartAudio.onStop=()=>{this.assistTick.stop(),this.me_high.stop(),this.me_low.stop()},this.setNoteIndex()}async getAudioHandle(e){let t=await Le.getFileHandleRelativeTo(this.smPath,e);if(t)return t;try{const i=await Le.getDirectoryFiles(Ht(this.smPath));if(t=i.filter(s=>s.name.toLowerCase()==er(e).toLowerCase())[0],t)return Ee.createFormatted("Failed to locate audio file "+e+", using file "+t.name+" instead","warn"),t;t=i.filter(s=>rh.includes(sr(s.name)))[0],t&&Ee.createFormatted("Failed to locate audio file "+e+", using file "+t.name+" instead","warn")}catch{return}return t}getAudio(){return this.chartAudio}updateSoundProperties(){this.setEffectVolume(x.audio.soundEffectVolume*x.audio.masterVolume),this.setVolume(x.audio.songVolume*x.audio.masterVolume),this.setRate(x.audio.rate)}setRate(e){this.chartAudio.rate(e)}setVolume(e){this.chartAudio.volume(e)}setEffectVolume(e){this.assistTick.volume(e),this.me_high.volume(e),this.me_low.volume(e),this.mine.volume()!=e&&this.mine.volume(e)}setNoteIndex(){if(this.loadedSM==null||this.loadedChart==null||this.chartView==null||this.loadedChart.getNotedata().length==0){this.noteFlashIndex=0,this.assistTickIndex=0;return}this.assistTick.stop(),this.noteFlashIndex=Nt(this.loadedChart.getNotedata(),this.time,e=>e.second)+1,this.noteFlashIndex>=1&&this.time<=this.loadedChart.getNotedata()[this.noteFlashIndex-1].second&&this.noteFlashIndex--,this.assistTickIndex=this.noteFlashIndex}playPause(){this.setNoteIndex(),this.chartAudio.isPlaying()?(this.chartAudio.pause(),this._beat=this.loadedChart?.getBeatFromSeconds(this.time)??0):this.chartAudio.play()}getClosestTick(e,t){if(!this.loadedChart)return 0;const i=Math.max(.001,4/t),s=this.loadedChart.timingData.getBeatOfMeasure(e),n=e-s,a=Math.round(s/i)*i;return Math.max(0,n+a)}snapToNearestTick(e){this.beat=Math.max(0,this.getClosestTick(e,4/x.chart.snap))}snapToPreviousTick(){if(!this.loadedChart)return;const e=Math.max(.001,x.chart.snap),t=Math.floor(this.loadedChart.timingData.getMeasure(this.beat)),i=this.loadedChart.timingData.getBeatFromMeasure(t),s=Math.floor((this.beat-i)/e)*e,n=Math.abs(s-(this.beat-i))<5e-4?s-e:s,a=n+i;if(n<0){const o=this.loadedChart.timingData.getBeatFromMeasure(t-1),l=Math.round((a-o)/e)*e;this.beat=Math.max(0,o+l);return}this.beat=Math.max(0,a)}snapToNextTick(){if(!this.loadedChart)return;const e=Math.max(.001,x.chart.snap),t=Math.floor(this.loadedChart.timingData.getMeasure(this.beat)),i=this.loadedChart.timingData.getBeatFromMeasure(t),a=Math.floor((this.beat-i+5e-4)/e)*e+e+i,o=this.loadedChart.timingData.getBeatFromMeasure(t+1);if(a>o){this.beat=o;return}this.beat=a}previousSnap(){let e=this.getSnapIndex()-1;e=(e+ci.length)%ci.length,x.chart.snap=ci[e]==-1?0:1/ci[e],H.emit("snapChanged")}nextSnap(){let e=this.getSnapIndex();(e==ci.length-1||Math.abs(1/x.chart.snap-ci[e])<=5e-4)&&e++,e=(e+ci.length)%ci.length,x.chart.snap=ci[e]==-1?0:1/ci[e],H.emit("snapChanged")}getSnapIndex(){return x.chart.snap==0?ci.length-1:ci.findIndex(e=>1/e<=x.chart.snap)}removeDuplicateBeats(e){if(e.length===0)return e;const t=[e[0]];for(let i=1;ii.beat+i.hold),t=this.loadedChart.getNotedata().map(i=>i.beat).concat(e).sort((i,s)=>i-s);return this.removeDuplicateBeats(t)}previousNote(){const e=this.getRows();if(e.length==0)return;let t=Nt(e,this.beat);this.beat==e[t]&&t--,this.beat=e[Math.max(0,t)]}nextNote(){const e=this.getRows();if(e.length==0)return;let t=Nt(e,this.beat);this.beat>=e[t]&&t++,this.beat=e[Math.min(e.length-1,t)]}firstNote(){if(this.loadedSM==null||this.loadedChart==null||this.chartView==null)return;const e=this.loadedChart.getNotedata();e.length!=0&&(this.beat=e[0].beat)}lastNote(){if(this.loadedSM==null||this.loadedChart==null||this.chartView==null)return;const e=this.loadedChart.getNotedata();if(e.length==0)return;const t=e[e.length-1];this.beat=lr(t)}truncateHold(e,t){const i=Oe(Math.round((t-Math.max(.020833333333333332,x.chart.snap))*48)/48,e.beat,e.beat+e.hold-.020833333333333332);return i==e.beat?{beat:e.beat,col:e.col,type:"Tap"}:{beat:e.beat,col:e.col,type:e.type,hold:i-e.beat}}setNote(e,t,i=this.beat){if(this.loadedSM==null||this.loadedChart==null||this.chartView==null)return;i=Math.max(0,Math.round(i*48)/48);const s=this.loadedChart.getNotedata().filter(o=>o.col!=e?!1:Math.abs(o.beat-i)<.003?!0:Be(o)&&o.beat==i),n=this.loadedChart.getNotedata().filter(o=>Be(o)&&o.col==e&&i>o.beat&&i<=Math.round((o.beat+o.hold)*48)/48).map(o=>({oldNote:o,newNote:this.truncateHold(o,i)})),a={startBeat:i,endBeat:i,roll:!1,originalNote:void 0,type:t,removedNotes:s,truncatedHolds:n,direction:null};this.holdEditing[e]=a,s.length==0&&(a.originalNote={beat:i,col:e,type:this.getEditingNoteType()}),this.setNoteIndex(),this.app.actionHistory.run({action:()=>{a.removedNotes.forEach(o=>{this.loadedChart.removeNote(o),this.removeNoteFromSelection(o)}),a.truncatedHolds.forEach(o=>this.loadedChart.modifyNote(o.oldNote,o.newNote)),a.originalNote&&this.loadedChart.addNote(a.originalNote)},undo:()=>{a.originalNote&&this.loadedChart.removeNote(a.originalNote),a.truncatedHolds.forEach(o=>this.loadedChart.modifyNote(o.newNote,o.oldNote)),a.removedNotes.forEach(o=>this.loadedChart.addNote(o))}})}editHoldBeat(e,t,i){if(this.loadedSM==null||this.loadedChart==null||this.chartView==null)return;const s=this.holdEditing[e];if(s==null||t==s.startBeat&&t==s.endBeat)return;if(s.direction===null&&(ta.beat==s.originalNote.beat&&a.col==s.originalNote.col||a.col!=e?!1:a.beat>=s.startBeat&&a.beat<=s.endBeat?!0:Be(a)&&a.beat+a.hold>=s.startBeat&&a.beat+a.hold<=s.endBeat);s.removedNotes=s.removedNotes.concat(n),n.forEach(a=>this.loadedChart.removeNote(a)),this.setNoteIndex()}endEditing(e){this.holdEditing[e]=void 0}previousNoteType(){const e=this.loadedChart?.gameType.editNoteTypes.length??0;this.editNoteTypeIndex=(this.editNoteTypeIndex-1+e)%e}nextNoteType(){const e=this.loadedChart?.gameType.editNoteTypes.length??0;this.editNoteTypeIndex=(this.editNoteTypeIndex+1+e)%e}getEditingNoteType(){return this.loadedChart?.gameType.editNoteTypes[this.editNoteTypeIndex]??null}setEditingNoteType(e){if(!this.loadedChart)return;const i=(this.loadedChart?.gameType.editNoteTypes).indexOf(e);i!=-1&&(this.editNoteTypeIndex=i)}getMode(){return this.mode}setMode(e){if(!this.loadedChart||!this.chartView)return;if(this.mode==e){(e=="Play Mode"||e=="Record Mode")&&(this.setMode(this.lastMode),this.setNoteIndex(),this.chartAudio.pause());return}(this.mode=="View Mode"||this.mode=="Edit Mode")&&(this.lastMode=this.mode),this.mode=e;const t=this.loadedChart.getNotedata();if(this.mode=="Play Mode"){t.forEach(i=>{i.gameplay={hideNote:!1,hasHit:!1}});for(const i of t)if(i.secondi.gameplay=void 0))}judgeCol(e){if(!(!this.loadedChart||!this.chartView)){if(this.mode=="Play Mode")this.loadedChart.gameType.gameLogic.keyDown(this,e);else if(this.mode=="Record Mode"){const t=this.loadedChart.getBeatFromSeconds(this.time+x.play.offset),i=x.chart.snap==0?1/48:x.chart.snap,s=Math.round(t/i)*i;this.setNote(e,"key",s)}}}judgeColUp(e){!this.loadedChart||!this.chartView||(this.mode=="Play Mode"?this.loadedChart.gameType.gameLogic.keyUp(this,e):this.mode=="Record Mode"&&this.endEditing(e))}async save(){if(!this.loadedSM||this.smPath.startsWith("https://")||this.smPath.startsWith("http://"))return;const e=this.getSMPath(".sm"),t=this.getSMPath(".ssc");let i=null;!this.loadedSM.usesChartTiming()&&await Le.getFileHandle(this.getSMPath(".smebak"))&&await Le.writeFile(e,this.loadedSM.serialize("sm")).catch(s=>{const n=s.message;n.includes(Ma.GONE[0])||(i=n)}),(this.loadedSM.requiresSSC()||await Le.getFileHandle(t))&&await Le.writeFile(t,this.loadedSM.serialize("ssc")).catch(s=>{const n=s.message;n.includes(Ma.GONE[0])||(i=n)}),i==null?(this.loadedSM.usesChartTiming()?Ee.create("Saved. No SM file since split timing was used."):Ee.create("Saved"),await this.removeAutosaves()):Ee.createFormatted("Failed to save file: "+i,"error"),Ye.instance.setLimit()}getSMPath(e){if(window.nw){const t=window.nw.require("path"),i=t.parse(this.smPath);return t.resolve(i.dir,i.name+e)}else{const t=Ht(this.smPath),i=er(this.smPath),s=i.includes(".")?i.split(".").slice(0,-1).join("."):i;return t+"/"+s+e}}async removeAutosaves(){await Le.removeFile(this.getSMPath(".smebak")).catch(()=>{})}async autosave(){if(!this.loadedSM||this.smPath.startsWith("https://")||this.smPath.startsWith("http://"))return;let e=null;await Le.writeFile(this.getSMPath(".smebak"),this.loadedSM.serialize("ssc")).catch(t=>{const i=t.message;i.includes(Ma.GONE[0])||(e=i)}),e==null?Ee.create("Autosaved"):Ee.createFormatted("Failed to autosave file: "+e,"error")}hasSelection(){return this.hasNoteSelection()||this.hasEventSelection()}hasNoteSelection(){return this.selection.notes.length>0||this.startRegion!==void 0&&this.endRegion!==void 0}hasEventSelection(){return this.eventSelection.timingEvents.length>0}hasRange(){return this.selection.notes.length>1||this.eventSelection.timingEvents.length>1||this.startRegion!==void 0&&this.endRegion!==void 0}clearSelections(){this.selection={notes:[],inProgressNotes:[]},this.eventSelection={timingEvents:[],inProgressTimingEvents:[]}}startDragSelection(){this.selection.inProgressNotes=[]}endDragSelection(){let e=0,t=0;const i=[],s=this.selection.inProgressNotes,n=this.selection.notes,a=(o,l)=>o.beat==l.beat?o.col-l.col:o.beat-l.beat;if(s.length==0||n.length==0){this.selection.notes=s.concat(n),this.selection.inProgressNotes=[];return}for(;;)if(a(s[e],n[t])<0){if(i.push(s[e]),e++,e>=s.length){this.selection.notes=i.concat(n.slice(t));break}}else if(i.push(n[t]),t++,t>=n.length){this.selection.notes=i.concat(s.slice(e));break}this.selection.inProgressNotes=[]}startDragEventSelection(){this.eventSelection.inProgressTimingEvents=[]}endDragEventSelection(){let e=0,t=0;const i=[],s=this.eventSelection.inProgressTimingEvents,n=this.eventSelection.timingEvents,a=(o,l)=>o.beat-l.beat;if(s.length==0||n.length==0){this.eventSelection.timingEvents=s.concat(n),this.eventSelection.inProgressTimingEvents=[];return}for(;;)if(a(s[e],n[t])<0){if(i.push(s[e]),e++,e>=s.length){this.eventSelection.timingEvents=i.concat(n.slice(t));break}}else if(i.push(n[t]),t++,t>=n.length){this.eventSelection.timingEvents=i.concat(s.slice(e));break}this.eventSelection.inProgressTimingEvents=[]}addNoteToDragSelection(e){this.addNoteSelection(this.selection.inProgressNotes,e)}removeNoteFromDragSelection(e){this.removeNoteSelection(this.selection.inProgressNotes,e)}addEventToDragSelection(e){this.addEventSelection(this.eventSelection.inProgressTimingEvents,e)}removeEventFromDragSelection(e){this.removeEventSelection(this.eventSelection.inProgressTimingEvents,e)}addNoteToSelection(e){this.addNoteSelection(this.selection.notes,e)}removeNoteFromSelection(e){this.removeNoteSelection(this.selection.notes,e)}setNoteSelection(e){this.selection.inProgressNotes=[],this.selection.notes=[...e].sort((t,i)=>t.beat==i.beat?t.col-i.col:t.beat-i.beat)}addEventToSelection(e){this.addEventSelection(this.eventSelection.timingEvents,e)}removeEventFromSelection(e){this.removeEventSelection(this.eventSelection.timingEvents,e)}setEventSelection(e){this.eventSelection.inProgressTimingEvents=[],this.eventSelection.timingEvents=e.sort((t,i)=>t.beat-i.beat)}isNoteInSelection(e){return this.getNoteSelectionIndex(this.selection.notes,e)!=-1||this.getNoteSelectionIndex(this.selection.inProgressNotes,e)!=-1}isEventInSelection(e){return this.getEventSelectionIndex(this.eventSelection.timingEvents,e)!=-1||this.getEventSelectionIndex(this.eventSelection.inProgressTimingEvents,e)!=-1}addNoteSelection(e,t){let i=Uo(e,t.beat,s=>s.beat);for(;e[i]&&(e[i].beats.beat);for(;e[i]&&e[i].beat==t.beat;){if(sm(e[i],t))return i;i++}return-1}addEventSelection(e,t){let i=Uo(e,t.beat,s=>s.beat);for(;e[i]&&e[i].beat<=t.beat;)i++;e.splice(i,0,t)}removeEventSelection(e,t){const i=this.getEventSelectionIndex(e,t);i!=-1&&e.splice(i,1)}getEventSelectionIndex(e,t){let i=Uo(e,t.beat,s=>s.beat);for(;e[i]&&e[i].beat==t.beat;){if(sm(e[i],t))return i;i++}return-1}selectRegion(){if(this.loadedChart){if(this.endRegion!==void 0&&(this.startRegion=void 0,this.endRegion=void 0),this.startRegion===void 0){this.clearSelections(),this.startRegion=this.beat;return}this.endRegion=this.beat,this.endRegione.beat>=this.startRegion&&e.beat<=this.endRegion)):this.setEventSelection(Ot.flatMap(e=>this.loadedChart.timingData.getColumn(e).events).filter(e=>e.beat>=this.startRegion&&e.beat<=this.endRegion))}}modifySelection(e,t=!1){if(!this.loadedChart)return;const i=this.selection.notes,s=structuredClone(this.selection.notes).map(e).sort((l,c)=>l.beat==c.beat?l.col-c.col:l.beat-c.beat);if(s.length==0)return;const n=[];for(const l of s){const c=n.at(-1);c!==void 0&&c.beat==l.beat&&c.col==l.col||n.push(l)}if(n.length==0)return;const{removedNotes:a,truncatedHolds:o}=this.checkConflicts(n,i);if(t){const l=n.map(f=>lr(f));let c=0;for(const f of l)f>c&&(c=f);const u=new Array(this.loadedChart.gameType.numCols).fill(0).map((f,p)=>({type:"Hold",hold:c-n[0].beat,col:p,beat:n[0].beat})),{removedNotes:h,truncatedHolds:d}=this.checkConflicts(u,i);h.forEach(f=>{a.includes(f)||a.push(f)}),d.forEach(f=>{const p=o.find(m=>m.oldNote==f.oldNote);if(p){const m=Be(p.newNote)?p.newNote.hold:0,g=Be(p.newNote)?p.newNote.hold:0,b=Math.min(m,g);b==0?p.newNote={beat:p.newNote.beat,col:p.newNote.col,type:"Tap"}:p.newNote={beat:p.newNote.beat,col:p.newNote.col,type:p.newNote.type,hold:b}}}),a.sort((f,p)=>f.beat==p.beat?f.col-p.col:f.beat-p.beat),o.sort((f,p)=>f.newNote.beat==p.newNote.beat?f.newNote.col-p.newNote.col:f.newNote.beat-p.newNote.beat)}this.app.actionHistory.run({action:()=>{this.loadedChart.removeNotes(i.concat(a),!1),o.forEach(l=>this.loadedChart.modifyNote(l.oldNote,l.newNote,!1)),this.clearSelections(),this.setNoteSelection(this.loadedChart.addNotes(n))},undo:()=>{this.loadedChart.removeNotes(n,!1),o.forEach(l=>this.loadedChart.modifyNote(l.newNote,l.oldNote,!1)),this.loadedChart.addNotes(a,!1),this.clearSelections(),this.setNoteSelection(this.loadedChart.addNotes(i))}})}checkConflicts(e,t=[]){if(e.length==0)return{removedNotes:[],truncatedHolds:[]};const i=this.loadedChart.getNotedata(),s=this.loadedChart.gameType.numCols,n=new Array(s).fill(0).map(u=>[]);for(const u of i)n[u.col].push(u);const a=new Array(s).fill(0).map(u=>[]);for(const u of e)u.col>s||a[u.col].push(u);const o=[],l=[],c=[];for(let u=0;ua[u][0].beat<=(Be(d)?d.beat+d.hold:d.beat));for(const d of a[u])for(;n[u][h];){const f=n[u][h],p=Be(d)?d.beat+d.hold:d.beat;if(!t.includes(f)&&!c.includes(f)&&(d.beat<=f.beat&&p>=f.beat?(c.push(f),o.push(f)):Be(f)&&f.beat+f.hold>=d.beat&&f.beatp)break;h++}}return o.sort((u,h)=>u.beat==h.beat?u.col-h.col:u.beat-h.beat),l.sort((u,h)=>u.newNote.beat==h.newNote.beat?u.newNote.col-h.newNote.col:u.newNote.beat-h.newNote.beat),{removedNotes:o,truncatedHolds:l}}modifyEventSelection(e){if(!this.loadedChart||!this.loadedSM)return;const t=this.eventSelection.timingEvents.map(i=>[i,e(structuredClone(i))]);this.loadedChart.timingData.modifyMulti(t)}deleteSelection(){if(this.selection.notes.length==0)return;const e=this.selection.notes;this.app.actionHistory.run({action:()=>{this.loadedChart.removeNotes(e),this.clearSelections()},undo:()=>{this.selection.notes=this.loadedChart.addNotes(e)}})}deleteEventSelection(){this.eventSelection.timingEvents.length!=0&&(!this.loadedChart||!this.loadedSM||this.loadedChart.timingData.deleteMulti(this.eventSelection.timingEvents))}paste(e,t=!1){if(this.loadedChart&&(e.startsWith("ArrowVortex:notes:")&&(this.pasteNotes(e,t)||this.pasteNotes(this.virtualClipboard,t)),e.startsWith("ArrowVortex:tempo:")||e.startsWith("SMEditor:tempo:"))){this.pasteTempo(e)||this.pasteTempo(this.virtualClipboard);return}}pasteNotes(e,t=!1){if(!this.loadedChart)return!0;const i=Uk(e);return!i||i.length==0?!1:(this.insertNotes(i.map(s=>(s.beat+=this.beat,s.beat=Math.round(s.beat*48)/48,s)),t),!0)}insertNotes(e,t=!1){e.sort((n,a)=>n.beat==a.beat?n.col-a.col:n.beat-a.beat);const{removedNotes:i,truncatedHolds:s}=this.checkConflicts(e);if(t){const n=e.map(u=>lr(u));let a=0;for(const u of n)u>a&&(a=u);const o=new Array(this.loadedChart.gameType.numCols).fill(0).map((u,h)=>({type:"Hold",hold:a-e[0].beat,col:h,beat:e[0].beat})),{removedNotes:l,truncatedHolds:c}=this.checkConflicts(o);l.forEach(u=>{i.includes(u)||i.push(u)}),c.forEach(u=>{const h=s.find(d=>d.oldNote==u.oldNote);if(h){const d=Be(h.newNote)?h.newNote.hold:0,f=Be(h.newNote)?h.newNote.hold:0,p=Math.min(d,f);p==0?h.newNote={beat:h.newNote.beat,col:h.newNote.col,type:"Tap"}:h.newNote={beat:h.newNote.beat,col:h.newNote.col,type:h.newNote.type,hold:p}}}),i.sort((u,h)=>u.beat==h.beat?u.col-h.col:u.beat-h.beat),s.sort((u,h)=>u.newNote.beat==h.newNote.beat?u.newNote.col-h.newNote.col:u.newNote.beat-h.newNote.beat)}this.app.actionHistory.run({action:()=>{this.loadedChart.removeNotes(i,!1),s.forEach(n=>{this.loadedChart.modifyNote(n.oldNote,n.newNote,!1)}),this.clearSelections(),this.setNoteSelection(this.loadedChart.addNotes(e))},undo:()=>{this.loadedChart.removeNotes(e,!1),s.forEach(n=>{this.loadedChart.modifyNote(n.newNote,n.oldNote,!1)}),this.setNoteSelection(this.loadedChart.addNotes(i)),this.clearSelections()}})}pasteTempo(e){if(!this.loadedChart||!this.loadedSM)return!0;const t=jk(e);return!t||t.length==0?!1:(t.forEach(i=>{i.type=="ATTACKS"?i.second+=this.time:i.beat+=this.beat}),this.loadedChart.timingData.insertMulti(t),!0)}copy(){if(this.selection.notes.length!=0){const e=Math.min(...this.selection.notes.map(s=>s.beat)),t=structuredClone(this.selection.notes).map(s=>(s.beat-=e,s)).sort((s,n)=>s.beat==n.beat?s.col-n.col:s.beat-n.beat),i=Hk(t);return this.virtualClipboard=i,i}else if(this.eventSelection.timingEvents.length!=0){const e=Math.min(...this.eventSelection.timingEvents.map(n=>n.beat)),t=this.loadedChart.timingData.getSecondsFromBeat(e),i=structuredClone(this.eventSelection.timingEvents).map(n=>n.type=="ATTACKS"?(n.second-=t,n):(n.beat-=e,n)).sort((n,a)=>n.type!=a.type?n.type.localeCompare(a.type):n.type=="ATTACKS"?n.second-a.second:n.beat-a.beat),s=zk(i);return this.virtualClipboard=s,s}}}export{Ty as $,Ye as A,zt as B,rD as C,qa as D,H as E,De as F,We as G,VD as H,Ce as I,ar as J,ct as K,Tu as L,ba as M,ut as N,x as O,Ne as P,ke as Q,ad as R,dy as S,$e as T,ns as U,mi as V,Ee as W,Sr as X,Me as Y,Hd as Z,Qe as _,Re as a,Oe as a0,GD as a1,qD as a2,sd as a3,K0 as a4,ze as a5,Yt as a6,K1 as a7,Ma as a8,I2 as a9,ls as aa,zn as ab,ve as b,It as c,YD as d,Le as e,gy as f,Xa as g,sr as h,HD as i,Wr as j,eh as k,$D as l,P as m,Ud as n,Ak as o,v3 as p,Tk as q,Ck as r,jD as s,Ze as t,Oi as u,lk as v,te as w,Pe as x,ur as y,Gt as z}; diff --git a/ChartManager-f20da8bc.js b/ChartManager-f20da8bc.js deleted file mode 100644 index 871c1b75..00000000 --- a/ChartManager-f20da8bc.js +++ /dev/null @@ -1,1253 +0,0 @@ -var Py=Object.defineProperty;var By=(r,e,t)=>e in r?Py(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var Is=(r,e,t)=>(By(r,typeof e!="symbol"?e+"":e,t),t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const n of s)if(n.type==="childList")for(const a of n.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function t(s){const n={};return s.integrity&&(n.integrity=s.integrity),s.referrerPolicy&&(n.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?n.credentials="include":s.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function i(s){if(s.ep)return;s.ep=!0;const n=t(s);fetch(s.href,n)}})();var Cs=(r=>(r[r.WEBGL_LEGACY=0]="WEBGL_LEGACY",r[r.WEBGL=1]="WEBGL",r[r.WEBGL2=2]="WEBGL2",r))(Cs||{}),Pf=(r=>(r[r.UNKNOWN=0]="UNKNOWN",r[r.WEBGL=1]="WEBGL",r[r.CANVAS=2]="CANVAS",r))(Pf||{}),Dh=(r=>(r[r.COLOR=16384]="COLOR",r[r.DEPTH=256]="DEPTH",r[r.STENCIL=1024]="STENCIL",r))(Dh||{}),Me=(r=>(r[r.NORMAL=0]="NORMAL",r[r.ADD=1]="ADD",r[r.MULTIPLY=2]="MULTIPLY",r[r.SCREEN=3]="SCREEN",r[r.OVERLAY=4]="OVERLAY",r[r.DARKEN=5]="DARKEN",r[r.LIGHTEN=6]="LIGHTEN",r[r.COLOR_DODGE=7]="COLOR_DODGE",r[r.COLOR_BURN=8]="COLOR_BURN",r[r.HARD_LIGHT=9]="HARD_LIGHT",r[r.SOFT_LIGHT=10]="SOFT_LIGHT",r[r.DIFFERENCE=11]="DIFFERENCE",r[r.EXCLUSION=12]="EXCLUSION",r[r.HUE=13]="HUE",r[r.SATURATION=14]="SATURATION",r[r.COLOR=15]="COLOR",r[r.LUMINOSITY=16]="LUMINOSITY",r[r.NORMAL_NPM=17]="NORMAL_NPM",r[r.ADD_NPM=18]="ADD_NPM",r[r.SCREEN_NPM=19]="SCREEN_NPM",r[r.NONE=20]="NONE",r[r.SRC_OVER=0]="SRC_OVER",r[r.SRC_IN=21]="SRC_IN",r[r.SRC_OUT=22]="SRC_OUT",r[r.SRC_ATOP=23]="SRC_ATOP",r[r.DST_OVER=24]="DST_OVER",r[r.DST_IN=25]="DST_IN",r[r.DST_OUT=26]="DST_OUT",r[r.DST_ATOP=27]="DST_ATOP",r[r.ERASE=26]="ERASE",r[r.SUBTRACT=28]="SUBTRACT",r[r.XOR=29]="XOR",r))(Me||{}),$i=(r=>(r[r.POINTS=0]="POINTS",r[r.LINES=1]="LINES",r[r.LINE_LOOP=2]="LINE_LOOP",r[r.LINE_STRIP=3]="LINE_STRIP",r[r.TRIANGLES=4]="TRIANGLES",r[r.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",r[r.TRIANGLE_FAN=6]="TRIANGLE_FAN",r))($i||{}),se=(r=>(r[r.RGBA=6408]="RGBA",r[r.RGB=6407]="RGB",r[r.RG=33319]="RG",r[r.RED=6403]="RED",r[r.RGBA_INTEGER=36249]="RGBA_INTEGER",r[r.RGB_INTEGER=36248]="RGB_INTEGER",r[r.RG_INTEGER=33320]="RG_INTEGER",r[r.RED_INTEGER=36244]="RED_INTEGER",r[r.ALPHA=6406]="ALPHA",r[r.LUMINANCE=6409]="LUMINANCE",r[r.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",r[r.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",r[r.DEPTH_STENCIL=34041]="DEPTH_STENCIL",r))(se||{}),en=(r=>(r[r.TEXTURE_2D=3553]="TEXTURE_2D",r[r.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",r[r.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",r[r.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",r[r.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",r[r.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",r[r.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",r[r.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",r[r.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",r))(en||{}),xe=(r=>(r[r.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",r[r.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",r[r.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",r[r.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",r[r.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",r[r.UNSIGNED_INT=5125]="UNSIGNED_INT",r[r.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",r[r.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",r[r.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",r[r.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",r[r.BYTE=5120]="BYTE",r[r.SHORT=5122]="SHORT",r[r.INT=5124]="INT",r[r.FLOAT=5126]="FLOAT",r[r.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",r[r.HALF_FLOAT=36193]="HALF_FLOAT",r))(xe||{}),de=(r=>(r[r.FLOAT=0]="FLOAT",r[r.INT=1]="INT",r[r.UINT=2]="UINT",r))(de||{}),hr=(r=>(r[r.NEAREST=0]="NEAREST",r[r.LINEAR=1]="LINEAR",r))(hr||{}),Gr=(r=>(r[r.CLAMP=33071]="CLAMP",r[r.REPEAT=10497]="REPEAT",r[r.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",r))(Gr||{}),er=(r=>(r[r.OFF=0]="OFF",r[r.POW2=1]="POW2",r[r.ON=2]="ON",r[r.ON_MANUAL=3]="ON_MANUAL",r))(er||{}),zt=(r=>(r[r.NPM=0]="NPM",r[r.UNPACK=1]="UNPACK",r[r.PMA=2]="PMA",r[r.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",r[r.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",r[r.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA",r))(zt||{}),Vi=(r=>(r[r.NO=0]="NO",r[r.YES=1]="YES",r[r.AUTO=2]="AUTO",r[r.BLEND=0]="BLEND",r[r.CLEAR=1]="CLEAR",r[r.BLIT=2]="BLIT",r))(Vi||{}),qc=(r=>(r[r.AUTO=0]="AUTO",r[r.MANUAL=1]="MANUAL",r))(qc||{}),di=(r=>(r.LOW="lowp",r.MEDIUM="mediump",r.HIGH="highp",r))(di||{}),bt=(r=>(r[r.NONE=0]="NONE",r[r.SCISSOR=1]="SCISSOR",r[r.STENCIL=2]="STENCIL",r[r.SPRITE=3]="SPRITE",r[r.COLOR=4]="COLOR",r))(bt||{}),yt=(r=>(r[r.NONE=0]="NONE",r[r.LOW=2]="LOW",r[r.MEDIUM=4]="MEDIUM",r[r.HIGH=8]="HIGH",r))(yt||{}),Yi=(r=>(r[r.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",r[r.ARRAY_BUFFER=34962]="ARRAY_BUFFER",r[r.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",r))(Yi||{});const Ry={createCanvas:(r,e)=>{const t=document.createElement("canvas");return t.width=r,t.height=e,t},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(r,e)=>fetch(r,e),parseXML:r=>new DOMParser().parseFromString(r,"text/xml")},ue={ADAPTER:Ry,RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var kl=/iPhone/i,Gd=/iPod/i,Vd=/iPad/i,Wd=/\biOS-universal(?:.+)Mac\b/i,Il=/\bAndroid(?:.+)Mobile\b/i,zd=/Android/i,Ps=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,ka=/Silk/i,sr=/Windows Phone/i,jd=/\bWindows(?:.+)ARM\b/i,$d=/BlackBerry/i,Xd=/BB10/i,Yd=/Opera Mini/i,qd=/\b(CriOS|Chrome)(?:.+)Mobile/i,Kd=/Mobile(?:.+)Firefox\b/i,Zd=function(r){return typeof r<"u"&&r.platform==="MacIntel"&&typeof r.maxTouchPoints=="number"&&r.maxTouchPoints>1&&typeof MSStream>"u"};function Ly(r){return function(e){return e.test(r)}}function Jd(r){var e={userAgent:"",platform:"",maxTouchPoints:0};!r&&typeof navigator<"u"?e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof r=="string"?e.userAgent=r:r&&r.userAgent&&(e={userAgent:r.userAgent,platform:r.platform,maxTouchPoints:r.maxTouchPoints||0});var t=e.userAgent,i=t.split("[FBAN");typeof i[1]<"u"&&(t=i[0]),i=t.split("Twitter"),typeof i[1]<"u"&&(t=i[0]);var s=Ly(t),n={apple:{phone:s(kl)&&!s(sr),ipod:s(Gd),tablet:!s(kl)&&(s(Vd)||Zd(e))&&!s(sr),universal:s(Wd),device:(s(kl)||s(Gd)||s(Vd)||s(Wd)||Zd(e))&&!s(sr)},amazon:{phone:s(Ps),tablet:!s(Ps)&&s(ka),device:s(Ps)||s(ka)},android:{phone:!s(sr)&&s(Ps)||!s(sr)&&s(Il),tablet:!s(sr)&&!s(Ps)&&!s(Il)&&(s(ka)||s(zd)),device:!s(sr)&&(s(Ps)||s(ka)||s(Il)||s(zd))||s(/\bokhttp\b/i)},windows:{phone:s(sr),tablet:s(jd),device:s(sr)||s(jd)},other:{blackberry:s($d),blackberry10:s(Xd),opera:s(Yd),firefox:s(Kd),chrome:s(qd),device:s($d)||s(Xd)||s(Yd)||s(Kd)||s(qd)},any:!1,phone:!1,tablet:!1};return n.any=n.apple.device||n.android.device||n.windows.device||n.other.device,n.phone=n.apple.phone||n.android.phone||n.windows.phone,n.tablet=n.apple.tablet||n.android.tablet||n.windows.tablet,n}const Dy=Jd.default??Jd,cr=Dy(globalThis.navigator);ue.RETINA_PREFIX=/@([0-9\.]+)x/;ue.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var Wt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function va(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function Oy(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function i(){return this instanceof i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(i){var s=Object.getOwnPropertyDescriptor(r,i);Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:function(){return r[i]}})}),t}var Bf={exports:{}};(function(r){var e=Object.prototype.hasOwnProperty,t="~";function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(t=!1));function s(l,c,u){this.fn=l,this.context=c,this.once=u||!1}function n(l,c,u,h,d){if(typeof u!="function")throw new TypeError("The listener must be a function");var p=new s(u,h||l,d),f=t?t+c:c;return l._events[f]?l._events[f].fn?l._events[f]=[l._events[f],p]:l._events[f].push(p):(l._events[f]=p,l._eventsCount++),l}function a(l,c){--l._eventsCount===0?l._events=new i:delete l._events[c]}function o(){this._events=new i,this._eventsCount=0}o.prototype.eventNames=function(){var c=[],u,h;if(this._eventsCount===0)return c;for(h in u=this._events)e.call(u,h)&&c.push(t?h.slice(1):h);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(u)):c},o.prototype.listeners=function(c){var u=t?t+c:c,h=this._events[u];if(!h)return[];if(h.fn)return[h.fn];for(var d=0,p=h.length,f=new Array(p);d80*t){o=c=r[0],l=u=r[1];for(var f=t;fc&&(c=h),d>u&&(u=d);p=Math.max(c-o,u-l),p=p!==0?32767/p:0}return aa(n,a,t,o,l,p,0),a}function Rf(r,e,t,i,s){var n,a;if(s===Nh(r,e,t,i)>0)for(n=e;n=e;n-=i)a=Qd(n,r[n],r[n+1],a);return a&&sl(a,a.next)&&(la(a),a=a.next),a}function Ts(r,e){if(!r)return r;e||(e=r);var t=r,i;do if(i=!1,!t.steiner&&(sl(t,t.next)||ct(t.prev,t,t.next)===0)){if(la(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function aa(r,e,t,i,s,n,a){if(r){!a&&n&&Xy(r,i,s,n);for(var o=r,l,c;r.prev!==r.next;){if(l=r.prev,c=r.next,n?Uy(r,i,s,n):Ny(r)){e.push(l.i/t|0),e.push(r.i/t|0),e.push(c.i/t|0),la(r),r=c.next,o=c.next;continue}if(r=c,r===o){a?a===1?(r=Hy(Ts(r),e,t),aa(r,e,t,i,s,n,2)):a===2&&Gy(r,e,t,i,s,n):aa(Ts(r),e,t,i,s,n,1);break}}}}function Ny(r){var e=r.prev,t=r,i=r.next;if(ct(e,t,i)>=0)return!1;for(var s=e.x,n=t.x,a=i.x,o=e.y,l=t.y,c=i.y,u=sn?s>a?s:a:n>a?n:a,p=o>l?o>c?o:c:l>c?l:c,f=i.next;f!==e;){if(f.x>=u&&f.x<=d&&f.y>=h&&f.y<=p&&qs(s,o,n,l,a,c,f.x,f.y)&&ct(f.prev,f,f.next)>=0)return!1;f=f.next}return!0}function Uy(r,e,t,i){var s=r.prev,n=r,a=r.next;if(ct(s,n,a)>=0)return!1;for(var o=s.x,l=n.x,c=a.x,u=s.y,h=n.y,d=a.y,p=ol?o>c?o:c:l>c?l:c,g=u>h?u>d?u:d:h>d?h:d,y=Oh(p,f,e,t,i),w=Oh(m,g,e,t,i),b=r.prevZ,v=r.nextZ;b&&b.z>=y&&v&&v.z<=w;){if(b.x>=p&&b.x<=m&&b.y>=f&&b.y<=g&&b!==s&&b!==a&&qs(o,u,l,h,c,d,b.x,b.y)&&ct(b.prev,b,b.next)>=0||(b=b.prevZ,v.x>=p&&v.x<=m&&v.y>=f&&v.y<=g&&v!==s&&v!==a&&qs(o,u,l,h,c,d,v.x,v.y)&&ct(v.prev,v,v.next)>=0))return!1;v=v.nextZ}for(;b&&b.z>=y;){if(b.x>=p&&b.x<=m&&b.y>=f&&b.y<=g&&b!==s&&b!==a&&qs(o,u,l,h,c,d,b.x,b.y)&&ct(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;v&&v.z<=w;){if(v.x>=p&&v.x<=m&&v.y>=f&&v.y<=g&&v!==s&&v!==a&&qs(o,u,l,h,c,d,v.x,v.y)&&ct(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function Hy(r,e,t){var i=r;do{var s=i.prev,n=i.next.next;!sl(s,n)&&Lf(s,i,i.next,n)&&oa(s,n)&&oa(n,s)&&(e.push(s.i/t|0),e.push(i.i/t|0),e.push(n.i/t|0),la(i),la(i.next),i=r=n),i=i.next}while(i!==r);return Ts(i)}function Gy(r,e,t,i,s,n){var a=r;do{for(var o=a.next.next;o!==a.prev;){if(a.i!==o.i&&Ky(a,o)){var l=Df(a,o);a=Ts(a,a.next),l=Ts(l,l.next),aa(a,e,t,i,s,n,0),aa(l,e,t,i,s,n,0);return}o=o.next}a=a.next}while(a!==r)}function Vy(r,e,t,i){var s=[],n,a,o,l,c;for(n=0,a=e.length;n=t.next.y&&t.next.y!==t.y){var o=t.x+(s-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(o<=i&&o>n&&(n=o,a=t.x=t.x&&t.x>=c&&i!==t.x&&qs(sa.x||t.x===a.x&&$y(a,t)))&&(a=t,h=d)),t=t.next;while(t!==l);return a}function $y(r,e){return ct(r.prev,r,e.prev)<0&&ct(e.next,r,r.next)<0}function Xy(r,e,t,i){var s=r;do s.z===0&&(s.z=Oh(s.x,s.y,e,t,i)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next;while(s!==r);s.prevZ.nextZ=null,s.prevZ=null,Yy(s)}function Yy(r){var e,t,i,s,n,a,o,l,c=1;do{for(t=r,r=null,n=null,a=0;t;){for(a++,i=t,o=0,e=0;e0||l>0&&i;)o!==0&&(l===0||!i||t.z<=i.z)?(s=t,t=t.nextZ,o--):(s=i,i=i.nextZ,l--),n?n.nextZ=s:r=s,s.prevZ=n,n=s;t=i}n.nextZ=null,c*=2}while(a>1);return r}function Oh(r,e,t,i,s){return r=(r-t)*s|0,e=(e-i)*s|0,r=(r|r<<8)&16711935,r=(r|r<<4)&252645135,r=(r|r<<2)&858993459,r=(r|r<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,r|e<<1}function qy(r){var e=r,t=r;do(e.x=(r-a)*(n-o)&&(r-a)*(i-o)>=(t-a)*(e-o)&&(t-a)*(n-o)>=(s-a)*(i-o)}function Ky(r,e){return r.next.i!==e.i&&r.prev.i!==e.i&&!Zy(r,e)&&(oa(r,e)&&oa(e,r)&&Jy(r,e)&&(ct(r.prev,r,e.prev)||ct(r,e.prev,e))||sl(r,e)&&ct(r.prev,r,r.next)>0&&ct(e.prev,e,e.next)>0)}function ct(r,e,t){return(e.y-r.y)*(t.x-e.x)-(e.x-r.x)*(t.y-e.y)}function sl(r,e){return r.x===e.x&&r.y===e.y}function Lf(r,e,t,i){var s=Pa(ct(r,e,t)),n=Pa(ct(r,e,i)),a=Pa(ct(t,i,r)),o=Pa(ct(t,i,e));return!!(s!==n&&a!==o||s===0&&Ia(r,t,e)||n===0&&Ia(r,i,e)||a===0&&Ia(t,r,i)||o===0&&Ia(t,e,i))}function Ia(r,e,t){return e.x<=Math.max(r.x,t.x)&&e.x>=Math.min(r.x,t.x)&&e.y<=Math.max(r.y,t.y)&&e.y>=Math.min(r.y,t.y)}function Pa(r){return r>0?1:r<0?-1:0}function Zy(r,e){var t=r;do{if(t.i!==r.i&&t.next.i!==r.i&&t.i!==e.i&&t.next.i!==e.i&&Lf(t,t.next,r,e))return!0;t=t.next}while(t!==r);return!1}function oa(r,e){return ct(r.prev,r,r.next)<0?ct(r,e,r.next)>=0&&ct(r,r.prev,e)>=0:ct(r,e,r.prev)<0||ct(r,r.next,e)<0}function Jy(r,e){var t=r,i=!1,s=(r.x+e.x)/2,n=(r.y+e.y)/2;do t.y>n!=t.next.y>n&&t.next.y!==t.y&&s<(t.next.x-t.x)*(n-t.y)/(t.next.y-t.y)+t.x&&(i=!i),t=t.next;while(t!==r);return i}function Df(r,e){var t=new Fh(r.i,r.x,r.y),i=new Fh(e.i,e.x,e.y),s=r.next,n=e.prev;return r.next=e,e.prev=r,t.next=s,s.prev=t,i.next=t,t.prev=i,n.next=i,i.prev=n,i}function Qd(r,e,t,i){var s=new Fh(r,e,t);return i?(s.next=i.next,s.prev=i,i.next.prev=s,i.next=s):(s.prev=s,s.next=s),s}function la(r){r.next.prev=r.prev,r.prev.next=r.next,r.prevZ&&(r.prevZ.nextZ=r.nextZ),r.nextZ&&(r.nextZ.prevZ=r.prevZ)}function Fh(r,e,t){this.i=r,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}rl.deviation=function(r,e,t,i){var s=e&&e.length,n=s?e[0]*t:r.length,a=Math.abs(Nh(r,0,n,t));if(s)for(var o=0,l=e.length;o0&&(i+=r[s-1].length,t.holes.push(i))}return t};var Qy=Kc.exports;const e0=va(Qy);var Mo={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */Mo.exports;(function(r,e){(function(t){var i=e&&!e.nodeType&&e,s=r&&!r.nodeType&&r,n=typeof Wt=="object"&&Wt;(n.global===n||n.window===n||n.self===n)&&(t=n);var a,o=2147483647,l=36,c=1,u=26,h=38,d=700,p=72,f=128,m="-",g=/^xn--/,y=/[^\x20-\x7E]/,w=/[\x2E\u3002\uFF0E\uFF61]/g,b={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},v=l-c,A=Math.floor,C=String.fromCharCode,I;function L(V){throw new RangeError(b[V])}function k(V,F){for(var U=V.length,te=[];U--;)te[U]=F(V[U]);return te}function N(V,F){var U=V.split("@"),te="";U.length>1&&(te=U[0]+"@",V=U[1]),V=V.replace(w,".");var Q=V.split("."),Z=k(Q,F).join(".");return te+Z}function G(V){for(var F=[],U=0,te=V.length,Q,Z;U=55296&&Q<=56319&&U65535&&(F-=65536,U+=C(F>>>10&1023|55296),F=56320|F&1023),U+=C(F),U}).join("")}function S(V){return V-48<10?V-22:V-65<26?V-65:V-97<26?V-97:l}function x(V,F){return V+22+75*(V<26)-((F!=0)<<5)}function D(V,F,U){var te=0;for(V=U?A(V/d):V>>1,V+=A(V/F);V>v*u>>1;te+=l)V=A(V/v);return A(te+(v+1)*V/(V+h))}function $(V){var F=[],U=V.length,te,Q=0,Z=f,ye=p,Ce,ce,fe,we,le,pe,be,T,X;for(Ce=V.lastIndexOf(m),Ce<0&&(Ce=0),ce=0;ce=128&&L("not-basic"),F.push(V.charCodeAt(ce));for(fe=Ce>0?Ce+1:0;fe=U&&L("invalid-input"),be=S(V.charCodeAt(fe++)),(be>=l||be>A((o-Q)/le))&&L("overflow"),Q+=be*le,T=pe<=ye?c:pe>=ye+u?u:pe-ye,!(beA(o/X)&&L("overflow"),le*=X;te=F.length+1,ye=D(Q-we,te,we==0),A(Q/te)>o-Z&&L("overflow"),Z+=A(Q/te),Q%=te,F.splice(Q++,0,Z)}return E(F)}function R(V){var F,U,te,Q,Z,ye,Ce,ce,fe,we,le,pe=[],be,T,X,j;for(V=G(V),be=V.length,F=f,U=0,Z=p,ye=0;ye=F&&leA((o-U)/T)&&L("overflow"),U+=(Ce-F)*T,F=Ce,ye=0;yeo&&L("overflow"),le==F){for(ce=U,fe=l;we=fe<=Z?c:fe>=Z+u?u:fe-Z,!(ce"u"||!xt?Ge:xt(Uint8Array),ys={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Ge:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Ge:ArrayBuffer,"%ArrayIteratorPrototype%":Bs&&xt?xt([][Symbol.iterator]()):Ge,"%AsyncFromSyncIteratorPrototype%":Ge,"%AsyncFunction%":Us,"%AsyncGenerator%":Us,"%AsyncGeneratorFunction%":Us,"%AsyncIteratorPrototype%":Us,"%Atomics%":typeof Atomics>"u"?Ge:Atomics,"%BigInt%":typeof BigInt>"u"?Ge:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Ge:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Ge:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Ge:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":A0,"%eval%":eval,"%EvalError%":E0,"%Float32Array%":typeof Float32Array>"u"?Ge:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Ge:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Ge:FinalizationRegistry,"%Function%":Ff,"%GeneratorFunction%":Us,"%Int8Array%":typeof Int8Array>"u"?Ge:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Ge:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Ge:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Bs&&xt?xt(xt([][Symbol.iterator]())):Ge,"%JSON%":typeof JSON=="object"?JSON:Ge,"%Map%":typeof Map>"u"?Ge:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Bs||!xt?Ge:xt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Ge:Promise,"%Proxy%":typeof Proxy>"u"?Ge:Proxy,"%RangeError%":S0,"%ReferenceError%":C0,"%Reflect%":typeof Reflect>"u"?Ge:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Ge:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Bs||!xt?Ge:xt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Ge:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Bs&&xt?xt(""[Symbol.iterator]()):Ge,"%Symbol%":Bs?Symbol:Ge,"%SyntaxError%":hn,"%ThrowTypeError%":k0,"%TypedArray%":P0,"%TypeError%":tn,"%Uint8Array%":typeof Uint8Array>"u"?Ge:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Ge:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Ge:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Ge:Uint32Array,"%URIError%":M0,"%WeakMap%":typeof WeakMap>"u"?Ge:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Ge:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Ge:WeakSet};if(xt)try{null.error}catch(r){var B0=xt(xt(r));ys["%Error.prototype%"]=B0}var R0=function r(e){var t;if(e==="%AsyncFunction%")t=Bl("async function () {}");else if(e==="%GeneratorFunction%")t=Bl("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=Bl("async function* () {}");else if(e==="%AsyncGenerator%"){var i=r("%AsyncGeneratorFunction%");i&&(t=i.prototype)}else if(e==="%AsyncIteratorPrototype%"){var s=r("%AsyncGenerator%");s&&xt&&(t=xt(s.prototype))}return ys[e]=t,t},iu={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},wa=Zc,ko=T0,L0=wa.call(Function.call,Array.prototype.concat),D0=wa.call(Function.apply,Array.prototype.splice),ru=wa.call(Function.call,String.prototype.replace),Io=wa.call(Function.call,String.prototype.slice),O0=wa.call(Function.call,RegExp.prototype.exec),F0=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,N0=/\\(\\)?/g,U0=function(e){var t=Io(e,0,1),i=Io(e,-1);if(t==="%"&&i!=="%")throw new hn("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&t!=="%")throw new hn("invalid intrinsic syntax, expected opening `%`");var s=[];return ru(e,F0,function(n,a,o,l){s[s.length]=o?ru(l,N0,"$1"):a||n}),s},H0=function(e,t){var i=e,s;if(ko(iu,i)&&(s=iu[i],i="%"+s[0]+"%"),ko(ys,i)){var n=ys[i];if(n===Us&&(n=R0(i)),typeof n>"u"&&!t)throw new tn("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:s,name:i,value:n}}throw new hn("intrinsic "+e+" does not exist!")},Tn=function(e,t){if(typeof e!="string"||e.length===0)throw new tn("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new tn('"allowMissing" argument must be a boolean');if(O0(/^%?[^%]*%?$/,e)===null)throw new hn("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=U0(e),s=i.length>0?i[0]:"",n=H0("%"+s+"%",t),a=n.name,o=n.value,l=!1,c=n.alias;c&&(s=c[0],D0(i,L0([0,1],c)));for(var u=1,h=!0;u=i.length){var m=gs(o,d);h=!!m,h&&"get"in m&&!("originalValue"in m.get)?o=m.get:o=o[d]}else h=ko(o,d),o=o[d];h&&!l&&(ys[a]=o)}}return o},Nf={exports:{}},Ll,su;function Jc(){if(su)return Ll;su=1;var r=Tn,e=r("%Object.defineProperty%",!0)||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Ll=e,Ll}var G0=Tn,go=G0("%Object.getOwnPropertyDescriptor%",!0);if(go)try{go([],"length")}catch{go=null}var Uf=go,nu=Jc(),V0=Of,Rs=ba,au=Uf,W0=function(e,t,i){if(!e||typeof e!="object"&&typeof e!="function")throw new Rs("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new Rs("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Rs("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Rs("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Rs("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Rs("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,n=arguments.length>4?arguments[4]:null,a=arguments.length>5?arguments[5]:null,o=arguments.length>6?arguments[6]:!1,l=!!au&&au(e,t);if(nu)nu(e,t,{configurable:a===null&&l?l.configurable:!a,enumerable:s===null&&l?l.enumerable:!s,value:i,writable:n===null&&l?l.writable:!n});else if(o||!s&&!n&&!a)e[t]=i;else throw new V0("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Uh=Jc(),Hf=function(){return!!Uh};Hf.hasArrayLengthDefineBug=function(){if(!Uh)return null;try{return Uh([],"length",{value:1}).length!==1}catch{return!0}};var z0=Hf,j0=Tn,ou=W0,$0=z0(),lu=Uf,hu=ba,X0=j0("%Math.floor%"),Y0=function(e,t){if(typeof e!="function")throw new hu("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||X0(t)!==t)throw new hu("`length` must be a positive 32-bit integer");var i=arguments.length>2&&!!arguments[2],s=!0,n=!0;if("length"in e&&lu){var a=lu(e,"length");a&&!a.configurable&&(s=!1),a&&!a.writable&&(n=!1)}return(s||n||!i)&&($0?ou(e,"length",t,!0,!0):ou(e,"length",t)),e};(function(r){var e=Zc,t=Tn,i=Y0,s=ba,n=t("%Function.prototype.apply%"),a=t("%Function.prototype.call%"),o=t("%Reflect.apply%",!0)||e.call(a,n),l=Jc(),c=t("%Math.max%");r.exports=function(d){if(typeof d!="function")throw new s("a function is required");var p=o(e,a,arguments);return i(p,1+c(0,d.length-(arguments.length-1)),!0)};var u=function(){return o(e,n,arguments)};l?l(r.exports,"apply",{value:u}):r.exports.apply=u})(Nf);var q0=Nf.exports,Gf=Tn,Vf=q0,K0=Vf(Gf("String.prototype.indexOf")),Z0=function(e,t){var i=Gf(e,!!t);return typeof i=="function"&&K0(e,".prototype.")>-1?Vf(i):i};const J0={},Q0=Object.freeze(Object.defineProperty({__proto__:null,default:J0},Symbol.toStringTag,{value:"Module"})),ev=Oy(Q0);var Qc=typeof Map=="function"&&Map.prototype,Dl=Object.getOwnPropertyDescriptor&&Qc?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Po=Qc&&Dl&&typeof Dl.get=="function"?Dl.get:null,cu=Qc&&Map.prototype.forEach,ed=typeof Set=="function"&&Set.prototype,Ol=Object.getOwnPropertyDescriptor&&ed?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Bo=ed&&Ol&&typeof Ol.get=="function"?Ol.get:null,du=ed&&Set.prototype.forEach,tv=typeof WeakMap=="function"&&WeakMap.prototype,Zn=tv?WeakMap.prototype.has:null,iv=typeof WeakSet=="function"&&WeakSet.prototype,Jn=iv?WeakSet.prototype.has:null,rv=typeof WeakRef=="function"&&WeakRef.prototype,uu=rv?WeakRef.prototype.deref:null,sv=Boolean.prototype.valueOf,nv=Object.prototype.toString,av=Function.prototype.toString,ov=String.prototype.match,td=String.prototype.slice,Nr=String.prototype.replace,lv=String.prototype.toUpperCase,pu=String.prototype.toLowerCase,Wf=RegExp.prototype.test,fu=Array.prototype.concat,Wi=Array.prototype.join,hv=Array.prototype.slice,mu=Math.floor,Hh=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Fl=Object.getOwnPropertySymbols,Gh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,cn=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Dt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===cn||"symbol")?Symbol.toStringTag:null,zf=Object.prototype.propertyIsEnumerable,gu=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(r){return r.__proto__}:null);function yu(r,e){if(r===1/0||r===-1/0||r!==r||r&&r>-1e3&&r<1e3||Wf.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof r=="number"){var i=r<0?-mu(-r):mu(r);if(i!==r){var s=String(i),n=td.call(e,s.length+1);return Nr.call(s,t,"$&_")+"."+Nr.call(Nr.call(n,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Nr.call(e,t,"$&_")}var Vh=ev,vu=Vh.custom,bu=$f(vu)?vu:null,cv=function r(e,t,i,s){var n=t||{};if(Ir(n,"quoteStyle")&&n.quoteStyle!=="single"&&n.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ir(n,"maxStringLength")&&(typeof n.maxStringLength=="number"?n.maxStringLength<0&&n.maxStringLength!==1/0:n.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=Ir(n,"customInspect")?n.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Ir(n,"indent")&&n.indent!==null&&n.indent!==" "&&!(parseInt(n.indent,10)===n.indent&&n.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Ir(n,"numericSeparator")&&typeof n.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var o=n.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return Yf(e,n);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var l=String(e);return o?yu(e,l):l}if(typeof e=="bigint"){var c=String(e)+"n";return o?yu(e,c):c}var u=typeof n.depth>"u"?5:n.depth;if(typeof i>"u"&&(i=0),i>=u&&u>0&&typeof e=="object")return Wh(e)?"[Array]":"[Object]";var h=Mv(n,i);if(typeof s>"u")s=[];else if(Xf(s,e)>=0)return"[Circular]";function d(S,x,D){if(x&&(s=hv.call(s),s.push(x)),D){var $={depth:n.depth};return Ir(n,"quoteStyle")&&($.quoteStyle=n.quoteStyle),r(S,$,i+1,s)}return r(S,n,i+1,s)}if(typeof e=="function"&&!wu(e)){var p=bv(e),f=Ba(e,d);return"[Function"+(p?": "+p:" (anonymous)")+"]"+(f.length>0?" { "+Wi.call(f,", ")+" }":"")}if($f(e)){var m=cn?Nr.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Gh.call(e);return typeof e=="object"&&!cn?In(m):m}if(Ev(e)){for(var g="<"+pu.call(String(e.nodeName)),y=e.attributes||[],w=0;w",g}if(Wh(e)){if(e.length===0)return"[]";var b=Ba(e,d);return h&&!Cv(b)?"["+zh(b,h)+"]":"[ "+Wi.call(b,", ")+" ]"}if(pv(e)){var v=Ba(e,d);return!("cause"in Error.prototype)&&"cause"in e&&!zf.call(e,"cause")?"{ ["+String(e)+"] "+Wi.call(fu.call("[cause]: "+d(e.cause),v),", ")+" }":v.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Wi.call(v,", ")+" }"}if(typeof e=="object"&&a){if(bu&&typeof e[bu]=="function"&&Vh)return Vh(e,{depth:u-i});if(a!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(wv(e)){var A=[];return cu&&cu.call(e,function(S,x){A.push(d(x,e,!0)+" => "+d(S,e))}),_u("Map",Po.call(e),A,h)}if(Tv(e)){var C=[];return du&&du.call(e,function(S){C.push(d(S,e))}),_u("Set",Bo.call(e),C,h)}if(_v(e))return Nl("WeakMap");if(Av(e))return Nl("WeakSet");if(xv(e))return Nl("WeakRef");if(mv(e))return In(d(Number(e)));if(yv(e))return In(d(Hh.call(e)));if(gv(e))return In(sv.call(e));if(fv(e))return In(d(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(typeof globalThis<"u"&&e===globalThis||typeof Wt<"u"&&e===Wt)return"{ [object globalThis] }";if(!uv(e)&&!wu(e)){var I=Ba(e,d),L=gu?gu(e)===Object.prototype:e instanceof Object||e.constructor===Object,k=e instanceof Object?"":"null prototype",N=!L&&Dt&&Object(e)===e&&Dt in e?td.call($r(e),8,-1):k?"Object":"",G=L||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",E=G+(N||k?"["+Wi.call(fu.call([],N||[],k||[]),": ")+"] ":"");return I.length===0?E+"{}":h?E+"{"+zh(I,h)+"}":E+"{ "+Wi.call(I,", ")+" }"}return String(e)};function jf(r,e,t){var i=(t.quoteStyle||e)==="double"?'"':"'";return i+r+i}function dv(r){return Nr.call(String(r),/"/g,""")}function Wh(r){return $r(r)==="[object Array]"&&(!Dt||!(typeof r=="object"&&Dt in r))}function uv(r){return $r(r)==="[object Date]"&&(!Dt||!(typeof r=="object"&&Dt in r))}function wu(r){return $r(r)==="[object RegExp]"&&(!Dt||!(typeof r=="object"&&Dt in r))}function pv(r){return $r(r)==="[object Error]"&&(!Dt||!(typeof r=="object"&&Dt in r))}function fv(r){return $r(r)==="[object String]"&&(!Dt||!(typeof r=="object"&&Dt in r))}function mv(r){return $r(r)==="[object Number]"&&(!Dt||!(typeof r=="object"&&Dt in r))}function gv(r){return $r(r)==="[object Boolean]"&&(!Dt||!(typeof r=="object"&&Dt in r))}function $f(r){if(cn)return r&&typeof r=="object"&&r instanceof Symbol;if(typeof r=="symbol")return!0;if(!r||typeof r!="object"||!Gh)return!1;try{return Gh.call(r),!0}catch{}return!1}function yv(r){if(!r||typeof r!="object"||!Hh)return!1;try{return Hh.call(r),!0}catch{}return!1}var vv=Object.prototype.hasOwnProperty||function(r){return r in this};function Ir(r,e){return vv.call(r,e)}function $r(r){return nv.call(r)}function bv(r){if(r.name)return r.name;var e=ov.call(av.call(r),/^function\s*([\w$]+)/);return e?e[1]:null}function Xf(r,e){if(r.indexOf)return r.indexOf(e);for(var t=0,i=r.length;te.maxStringLength){var t=r.length-e.maxStringLength,i="... "+t+" more character"+(t>1?"s":"");return Yf(td.call(r,0,e.maxStringLength),e)+i}var s=Nr.call(Nr.call(r,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Sv);return jf(s,"single",e)}function Sv(r){var e=r.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+lv.call(e.toString(16))}function In(r){return"Object("+r+")"}function Nl(r){return r+" { ? }"}function _u(r,e,t,i){var s=i?zh(t,i):Wi.call(t,", ");return r+" ("+e+") {"+s+"}"}function Cv(r){for(var e=0;e=0)return!1;return!0}function Mv(r,e){var t;if(r.indent===" ")t=" ";else if(typeof r.indent=="number"&&r.indent>0)t=Wi.call(Array(r.indent+1)," ");else return null;return{base:t,prev:Wi.call(Array(e+1),t)}}function zh(r,e){if(r.length===0)return"";var t=` -`+e.prev+e.base;return t+Wi.call(r,","+t)+` -`+e.prev}function Ba(r,e){var t=Wh(r),i=[];if(t){i.length=r.length;for(var s=0;s1;){var t=e.pop(),i=t.obj[t.prop];if(cs(i)){for(var s=[],n=0;n=Gl?a.slice(l,l+Gl):a,u=[],h=0;h=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||n===Wv.RFC1738&&(d===40||d===41)){u[u.length]=c.charAt(h);continue}if(d<128){u[u.length]=Ri[d];continue}if(d<2048){u[u.length]=Ri[192|d>>6]+Ri[128|d&63];continue}if(d<55296||d>=57344){u[u.length]=Ri[224|d>>12]+Ri[128|d>>6&63]+Ri[128|d&63];continue}h+=1,d=65536+((d&1023)<<10|c.charCodeAt(h)&1023),u[u.length]=Ri[240|d>>18]+Ri[128|d>>12&63]+Ri[128|d>>6&63]+Ri[128|d&63]}o+=u.join("")}return o},qv=function(e){for(var t=[{obj:{o:e},prop:"o"}],i=[],s=0;s"u"&&(A=0)}if(typeof u=="function"?b=u(t,b):b instanceof Date?b=p(b):i==="comma"&&Gi(b)&&(b=yo.maybeMap(b,function(V){return V instanceof Date?p(V):V})),b===null){if(a)return c&&!g?c(t,vt.encoder,y,"key",f):t;b=""}if(rb(b)||yo.isBuffer(b)){if(c){var L=g?t:c(t,vt.encoder,y,"key",f);return[m(L)+"="+m(c(b,vt.encoder,y,"value",f))]}return[m(t)+"="+m(String(b))]}var k=[];if(typeof b>"u")return k;var N;if(i==="comma"&&Gi(b))g&&c&&(b=yo.maybeMap(b,c)),N=[{value:b.length>0?b.join(",")||null:void 0}];else if(Gi(u))N=u;else{var G=Object.keys(b);N=h?G.sort(h):G}var E=l?t.replace(/\./g,"%2E"):t,S=s&&Gi(b)&&b.length===1?E+"[]":E;if(n&&Gi(b)&&b.length===0)return S+"[]";for(var x=0;x"u"?e.encodeDotInKeys===!0?!0:vt.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:vt.addQueryPrefix,allowDots:o,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:vt.allowEmptyArrays,arrayFormat:a,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:vt.charsetSentinel,commaRoundTrip:e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?vt.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:vt.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:vt.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:vt.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:vt.encodeValuesOnly,filter:n,format:i,formatter:s,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:vt.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:vt.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:vt.strictNullHandling}},ab=function(r,e){var t=r,i=nb(e),s,n;typeof i.filter=="function"?(n=i.filter,t=n("",t)):Gi(i.filter)&&(n=i.filter,s=n);var a=[];if(typeof t!="object"||t===null)return"";var o=Qf[i.arrayFormat],l=o==="comma"&&i.commaRoundTrip;s||(s=Object.keys(t)),i.sort&&s.sort(i.sort);for(var c=Jf(),u=0;u0?p+d:""},dn=Zf,jh=Object.prototype.hasOwnProperty,ob=Array.isArray,ft={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:dn.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},lb=function(r){return r.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},tm=function(r,e){return r&&typeof r=="string"&&e.comma&&r.indexOf(",")>-1?r.split(","):r},hb="utf8=%26%2310003%3B",cb="utf8=%E2%9C%93",db=function(e,t){var i={__proto__:null},s=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;s=s.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var n=t.parameterLimit===1/0?void 0:t.parameterLimit,a=s.split(t.delimiter,n),o=-1,l,c=t.charset;if(t.charsetSentinel)for(l=0;l-1&&(f=ob(f)?[f]:f);var m=jh.call(i,p);m&&t.duplicates==="combine"?i[p]=dn.combine(i[p],f):(!m||t.duplicates==="last")&&(i[p]=f)}return i},ub=function(r,e,t,i){for(var s=i?e:tm(e,t),n=r.length-1;n>=0;--n){var a,o=r[n];if(o==="[]"&&t.parseArrays)a=t.allowEmptyArrays&&(s===""||t.strictNullHandling&&s===null)?[]:[].concat(s);else{a=t.plainObjects?Object.create(null):{};var l=o.charAt(0)==="["&&o.charAt(o.length-1)==="]"?o.slice(1,-1):o,c=t.decodeDotInKeys?l.replace(/%2E/g,"."):l,u=parseInt(c,10);!t.parseArrays&&c===""?a={0:s}:!isNaN(u)&&o!==c&&String(u)===c&&u>=0&&t.parseArrays&&u<=t.arrayLimit?(a=[],a[u]=s):c!=="__proto__"&&(a[c]=s)}s=a}return s},pb=function(e,t,i,s){if(e){var n=i.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/,o=/(\[[^[\]]*])/g,l=i.depth>0&&a.exec(n),c=l?n.slice(0,l.index):n,u=[];if(c){if(!i.plainObjects&&jh.call(Object.prototype,c)&&!i.allowPrototypes)return;u.push(c)}for(var h=0;i.depth>0&&(l=o.exec(n))!==null&&h"u"?ft.charset:e.charset,i=typeof e.duplicates>"u"?ft.duplicates:e.duplicates;if(i!=="combine"&&i!=="first"&&i!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var s=typeof e.allowDots>"u"?e.decodeDotInKeys===!0?!0:ft.allowDots:!!e.allowDots;return{allowDots:s,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:ft.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:ft.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:ft.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:ft.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:ft.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:ft.comma,decodeDotInKeys:typeof e.decodeDotInKeys=="boolean"?e.decodeDotInKeys:ft.decodeDotInKeys,decoder:typeof e.decoder=="function"?e.decoder:ft.decoder,delimiter:typeof e.delimiter=="string"||dn.isRegExp(e.delimiter)?e.delimiter:ft.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:ft.depth,duplicates:i,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:ft.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:ft.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:ft.plainObjects,strictDepth:typeof e.strictDepth=="boolean"?!!e.strictDepth:ft.strictDepth,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:ft.strictNullHandling}},mb=function(r,e){var t=fb(e);if(r===""||r===null||typeof r>"u")return t.plainObjects?Object.create(null):{};for(var i=typeof r=="string"?db(r,t):r,s=t.plainObjects?Object.create(null):{},n=Object.keys(i),a=0;a",'"',"`"," ","\r",` -`," "],Eb=["{","}","|","\\","^","`"].concat(Ab),$h=["'"].concat(Eb),Tu=["%","/","?",";","#"].concat($h),Au=["/","?","#"],Sb=255,Eu=/^[+a-z0-9A-Z_-]{0,63}$/,Cb=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Mb={javascript:!0,"javascript:":!0},Xh={javascript:!0,"javascript:":!0},rn={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},Yh=bb;function kb(r,e,t){if(r&&typeof r=="object"&&r instanceof pr)return r;var i=new pr;return i.parse(r,e,t),i}pr.prototype.parse=function(r,e,t){if(typeof r!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof r);var i=r.indexOf("?"),s=i!==-1&&i127?A+="x":A+=v[C];if(!A.match(Eu)){var L=w.slice(0,p),k=w.slice(p+1),N=v.match(Cb);N&&(L.push(N[1]),k.unshift(N[2])),k.length&&(o="/"+k.join(".")+o),this.hostname=L.join(".");break}}}this.hostname.length>Sb?this.hostname="":this.hostname=this.hostname.toLowerCase(),y||(this.hostname=wb.toASCII(this.hostname));var G=this.port?":"+this.port:"",E=this.hostname||"";this.host=E+G,this.href+=this.host,y&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),o[0]!=="/"&&(o="/"+o))}if(!Mb[u])for(var p=0,b=$h.length;p0?t.host.split("@"):!1;A&&(t.auth=A.shift(),t.hostname=A.shift(),t.host=t.hostname)}return t.search=r.search,t.query=r.query,(t.pathname!==null||t.search!==null)&&(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.href=t.format(),t}if(!w.length)return t.pathname=null,t.search?t.path="/"+t.search:t.path=null,t.href=t.format(),t;for(var C=w.slice(-1)[0],I=(t.host||r.host||w.length>1)&&(C==="."||C==="..")||C==="",L=0,k=w.length;k>=0;k--)C=w[k],C==="."?w.splice(k,1):C===".."?(w.splice(k,1),L++):L&&(w.splice(k,1),L--);if(!g&&!y)for(;L--;L)w.unshift("..");g&&w[0]!==""&&(!w[0]||w[0].charAt(0)!=="/")&&w.unshift(""),I&&w.join("/").substr(-1)!=="/"&&w.push("");var N=w[0]===""||w[0]&&w[0].charAt(0)==="/";if(v){t.hostname=N?"":w.length?w.shift():"",t.host=t.hostname;var A=t.host&&t.host.indexOf("@")>0?t.host.split("@"):!1;A&&(t.auth=A.shift(),t.hostname=A.shift(),t.host=t.hostname)}return g=g||t.host&&w.length,g&&!N&&w.unshift(""),w.length>0?t.pathname=w.join("/"):(t.pathname=null,t.path=null),(t.pathname!==null||t.search!==null)&&(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.auth=r.auth||t.auth,t.slashes=t.slashes||r.slashes,t.href=t.format(),t};pr.prototype.parseHost=function(){var r=this.host,e=xb.exec(r);e&&(e=e[0],e!==":"&&(this.port=e.substr(1)),r=r.substr(0,r.length-e.length)),r&&(this.hostname=r)};const Su={};function He(r,e,t=3){if(Su[e])return;let i=new Error().stack;typeof i>"u"?console.warn("PixiJS Deprecation Warning: ",`${e} -Deprecated since v${r}`):(i=i.split(` -`).splice(t).join(` -`),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",`${e} -Deprecated since v${r}`),console.warn(i),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",`${e} -Deprecated since v${r}`),console.warn(i))),Su[e]=!0}function vi(r){if(typeof r!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(r)}`)}function Pn(r){return r.split("?")[0].split("#")[0]}function Ib(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Pb(r,e,t){return r.replace(new RegExp(Ib(e),"g"),t)}function Bb(r,e){let t="",i=0,s=-1,n=0,a=-1;for(let o=0;o<=r.length;++o){if(o2){const l=t.lastIndexOf("/");if(l!==t.length-1){l===-1?(t="",i=0):(t=t.slice(0,l),i=t.length-1-t.lastIndexOf("/")),s=o,n=0;continue}}else if(t.length===2||t.length===1){t="",i=0,s=o,n=0;continue}}e&&(t.length>0?t+="/..":t="..",i=2)}else t.length>0?t+=`/${r.slice(s+1,o)}`:t=r.slice(s+1,o),i=o-s-1;s=o,n=0}else a===46&&n!==-1?++n:n=-1}return t}const Et={toPosix(r){return Pb(r,"\\","/")},isUrl(r){return/^https?:/.test(this.toPosix(r))},isDataUrl(r){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(r)},isBlobUrl(r){return r.startsWith("blob:")},hasProtocol(r){return/^[^/:]+:/.test(this.toPosix(r))},getProtocol(r){vi(r),r=this.toPosix(r);const e=/^file:\/\/\//.exec(r);if(e)return e[0];const t=/^[^/:]+:\/{0,2}/.exec(r);return t?t[0]:""},toAbsolute(r,e,t){if(vi(r),this.isDataUrl(r)||this.isBlobUrl(r))return r;const i=Pn(this.toPosix(e??ue.ADAPTER.getBaseUrl())),s=Pn(this.toPosix(t??this.rootname(i)));return r=this.toPosix(r),r.startsWith("/")?Et.join(s,r.slice(1)):this.isAbsolute(r)?r:this.join(i,r)},normalize(r){if(vi(r),r.length===0)return".";if(this.isDataUrl(r)||this.isBlobUrl(r))return r;r=this.toPosix(r);let e="";const t=r.startsWith("/");this.hasProtocol(r)&&(e=this.rootname(r),r=r.slice(e.length));const i=r.endsWith("/");return r=Bb(r,!1),r.length>0&&i&&(r+="/"),t?`/${r}`:e+r},isAbsolute(r){return vi(r),r=this.toPosix(r),this.hasProtocol(r)?!0:r.startsWith("/")},join(...r){if(r.length===0)return".";let e;for(let t=0;t0)if(e===void 0)e=i;else{const s=r[t-1]??"";this.joinExtensions.includes(this.extname(s).toLowerCase())?e+=`/../${i}`:e+=`/${i}`}}return e===void 0?".":this.normalize(e)},dirname(r){if(vi(r),r.length===0)return".";r=this.toPosix(r);let e=r.charCodeAt(0);const t=e===47;let i=-1,s=!0;const n=this.getProtocol(r),a=r;r=r.slice(n.length);for(let o=r.length-1;o>=1;--o)if(e=r.charCodeAt(o),e===47){if(!s){i=o;break}}else s=!1;return i===-1?t?"/":this.isUrl(a)?n+r:n:t&&i===1?"//":n+r.slice(0,i)},rootname(r){vi(r),r=this.toPosix(r);let e="";if(r.startsWith("/")?e="/":e=this.getProtocol(r),this.isUrl(r)){const t=r.indexOf("/",e.length);t!==-1?e=r.slice(0,t):e=r,e.endsWith("/")||(e+="/")}return e},basename(r,e){vi(r),e&&vi(e),r=Pn(this.toPosix(r));let t=0,i=-1,s=!0,n;if(e!==void 0&&e.length>0&&e.length<=r.length){if(e.length===r.length&&e===r)return"";let a=e.length-1,o=-1;for(n=r.length-1;n>=0;--n){const l=r.charCodeAt(n);if(l===47){if(!s){t=n+1;break}}else o===-1&&(s=!1,o=n+1),a>=0&&(l===e.charCodeAt(a)?--a===-1&&(i=n):(a=-1,i=o))}return t===i?i=o:i===-1&&(i=r.length),r.slice(t,i)}for(n=r.length-1;n>=0;--n)if(r.charCodeAt(n)===47){if(!s){t=n+1;break}}else i===-1&&(s=!1,i=n+1);return i===-1?"":r.slice(t,i)},extname(r){vi(r),r=Pn(this.toPosix(r));let e=-1,t=0,i=-1,s=!0,n=0;for(let a=r.length-1;a>=0;--a){const o=r.charCodeAt(a);if(o===47){if(!s){t=a+1;break}continue}i===-1&&(s=!1,i=a+1),o===46?e===-1?e=a:n!==1&&(n=1):e!==-1&&(n=-1)}return e===-1||i===-1||n===0||n===1&&e===i-1&&e===t+1?"":r.slice(e,i)},parse(r){vi(r);const e={root:"",dir:"",base:"",ext:"",name:""};if(r.length===0)return e;r=Pn(this.toPosix(r));let t=r.charCodeAt(0);const i=this.isAbsolute(r);let s;e.root=this.rootname(r),i||this.hasProtocol(r)?s=1:s=0;let n=-1,a=0,o=-1,l=!0,c=r.length-1,u=0;for(;c>=s;--c){if(t=r.charCodeAt(c),t===47){if(!l){a=c+1;break}continue}o===-1&&(l=!1,o=c+1),t===46?n===-1?n=c:u!==1&&(u=1):n!==-1&&(u=-1)}return n===-1||o===-1||u===0||u===1&&n===o-1&&n===a+1?o!==-1&&(a===0&&i?e.base=e.name=r.slice(1,o):e.base=e.name=r.slice(a,o)):(a===0&&i?(e.name=r.slice(1,n),e.base=r.slice(1,o)):(e.name=r.slice(a,n),e.base=r.slice(a,o)),e.ext=r.slice(n,o)),e.dir=this.dirname(r),e},sep:"/",delimiter:":",joinExtensions:[".html"]};let Wl;async function Rb(){return Wl??(Wl=(async()=>{const r=document.createElement("canvas").getContext("webgl");if(!r)return zt.UNPACK;const e=await new Promise(n=>{const a=document.createElement("video");a.onloadeddata=()=>n(a),a.onerror=()=>n(null),a.autoplay=!1,a.crossOrigin="anonymous",a.preload="auto",a.src="data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmoCrXsYMPQkBNgIRMYXZmV0GETGF2ZkSJiEBEAAAAAAAAFlSua8yuAQAAAAAAAEPXgQFzxYgAAAAAAAAAAZyBACK1nIN1bmSIgQCGhVZfVlA5g4EBI+ODhAJiWgDglLCBArqBApqBAlPAgQFVsIRVuYEBElTDZ9Vzc9JjwItjxYgAAAAAAAAAAWfInEWjh0VOQ09ERVJEh49MYXZjIGxpYnZweC12cDlnyKJFo4hEVVJBVElPTkSHlDAwOjAwOjAwLjA0MDAwMDAwMAAAH0O2dcfngQCgwqGggQAAAIJJg0IAABAAFgA4JBwYSgAAICAAEb///4r+AAB1oZ2mm+6BAaWWgkmDQgAAEAAWADgkHBhKAAAgIABIQBxTu2uRu4+zgQC3iveBAfGCAXHwgQM=",a.load()});if(!e)return zt.UNPACK;const t=r.createTexture();r.bindTexture(r.TEXTURE_2D,t);const i=r.createFramebuffer();r.bindFramebuffer(r.FRAMEBUFFER,i),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,t,0),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),r.pixelStorei(r.UNPACK_COLORSPACE_CONVERSION_WEBGL,r.NONE),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,e);const s=new Uint8Array(4);return r.readPixels(0,0,1,1,r.RGBA,r.UNSIGNED_BYTE,s),r.deleteFramebuffer(i),r.deleteTexture(t),r.getExtension("WEBGL_lose_context")?.loseContext(),s[0]<=s[3]?zt.PMA:zt.UNPACK})()),Wl}let zl;function Lb(){return typeof zl>"u"&&(zl=function(){const r={stencil:!0,failIfMajorPerformanceCaveat:ue.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!ue.ADAPTER.getWebGLRenderingContext())return!1;const e=ue.ADAPTER.createCanvas();let t=e.getContext("webgl",r)||e.getContext("experimental-webgl",r);const i=!!t?.getContextAttributes()?.stencil;if(t){const s=t.getExtension("WEBGL_lose_context");s&&s.loseContext()}return t=null,i}catch{return!1}}()),zl}var Db={grad:.9,turn:360,rad:360/(2*Math.PI)},nr=function(r){return typeof r=="string"?r.length>0:typeof r=="number"},Tt=function(r,e,t){return e===void 0&&(e=0),t===void 0&&(t=Math.pow(10,e)),Math.round(t*r)/t+0},ui=function(r,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),r>t?t:r>e?r:e},im=function(r){return(r=isFinite(r)?r%360:0)>0?r:r+360},Cu=function(r){return{r:ui(r.r,0,255),g:ui(r.g,0,255),b:ui(r.b,0,255),a:ui(r.a)}},jl=function(r){return{r:Tt(r.r),g:Tt(r.g),b:Tt(r.b),a:Tt(r.a,3)}},Ob=/^#([0-9a-f]{3,8})$/i,Da=function(r){var e=r.toString(16);return e.length<2?"0"+e:e},rm=function(r){var e=r.r,t=r.g,i=r.b,s=r.a,n=Math.max(e,t,i),a=n-Math.min(e,t,i),o=a?n===e?(t-i)/a:n===t?2+(i-e)/a:4+(e-t)/a:0;return{h:60*(o<0?o+6:o),s:n?a/n*100:0,v:n/255*100,a:s}},sm=function(r){var e=r.h,t=r.s,i=r.v,s=r.a;e=e/360*6,t/=100,i/=100;var n=Math.floor(e),a=i*(1-t),o=i*(1-(e-n)*t),l=i*(1-(1-e+n)*t),c=n%6;return{r:255*[i,o,a,a,l,i][c],g:255*[l,i,i,o,a,a][c],b:255*[a,a,l,i,i,o][c],a:s}},Mu=function(r){return{h:im(r.h),s:ui(r.s,0,100),l:ui(r.l,0,100),a:ui(r.a)}},ku=function(r){return{h:Tt(r.h),s:Tt(r.s),l:Tt(r.l),a:Tt(r.a,3)}},Iu=function(r){return sm((t=(e=r).s,{h:e.h,s:(t*=((i=e.l)<50?i:100-i)/100)>0?2*t/(i+t)*100:0,v:i+t,a:e.a}));var e,t,i},ea=function(r){return{h:(e=rm(r)).h,s:(s=(200-(t=e.s))*(i=e.v)/100)>0&&s<200?t*i/100/(s<=100?s:200-s)*100:0,l:s/2,a:e.a};var e,t,i,s},Fb=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Nb=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ub=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Hb=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,qh={string:[[function(r){var e=Ob.exec(r);return e?(r=e[1]).length<=4?{r:parseInt(r[0]+r[0],16),g:parseInt(r[1]+r[1],16),b:parseInt(r[2]+r[2],16),a:r.length===4?Tt(parseInt(r[3]+r[3],16)/255,2):1}:r.length===6||r.length===8?{r:parseInt(r.substr(0,2),16),g:parseInt(r.substr(2,2),16),b:parseInt(r.substr(4,2),16),a:r.length===8?Tt(parseInt(r.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(r){var e=Ub.exec(r)||Hb.exec(r);return e?e[2]!==e[4]||e[4]!==e[6]?null:Cu({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(r){var e=Fb.exec(r)||Nb.exec(r);if(!e)return null;var t,i,s=Mu({h:(t=e[1],i=e[2],i===void 0&&(i="deg"),Number(t)*(Db[i]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return Iu(s)},"hsl"]],object:[[function(r){var e=r.r,t=r.g,i=r.b,s=r.a,n=s===void 0?1:s;return nr(e)&&nr(t)&&nr(i)?Cu({r:Number(e),g:Number(t),b:Number(i),a:Number(n)}):null},"rgb"],[function(r){var e=r.h,t=r.s,i=r.l,s=r.a,n=s===void 0?1:s;if(!nr(e)||!nr(t)||!nr(i))return null;var a=Mu({h:Number(e),s:Number(t),l:Number(i),a:Number(n)});return Iu(a)},"hsl"],[function(r){var e=r.h,t=r.s,i=r.v,s=r.a,n=s===void 0?1:s;if(!nr(e)||!nr(t)||!nr(i))return null;var a=function(o){return{h:im(o.h),s:ui(o.s,0,100),v:ui(o.v,0,100),a:ui(o.a)}}({h:Number(e),s:Number(t),v:Number(i),a:Number(n)});return sm(a)},"hsv"]]},Pu=function(r,e){for(var t=0;t=.5},r.prototype.toHex=function(){return e=jl(this.rgba),t=e.r,i=e.g,s=e.b,a=(n=e.a)<1?Da(Tt(255*n)):"","#"+Da(t)+Da(i)+Da(s)+a;var e,t,i,s,n,a},r.prototype.toRgb=function(){return jl(this.rgba)},r.prototype.toRgbString=function(){return e=jl(this.rgba),t=e.r,i=e.g,s=e.b,(n=e.a)<1?"rgba("+t+", "+i+", "+s+", "+n+")":"rgb("+t+", "+i+", "+s+")";var e,t,i,s,n},r.prototype.toHsl=function(){return ku(ea(this.rgba))},r.prototype.toHslString=function(){return e=ku(ea(this.rgba)),t=e.h,i=e.s,s=e.l,(n=e.a)<1?"hsla("+t+", "+i+"%, "+s+"%, "+n+")":"hsl("+t+", "+i+"%, "+s+"%)";var e,t,i,s,n},r.prototype.toHsv=function(){return e=rm(this.rgba),{h:Tt(e.h),s:Tt(e.s),v:Tt(e.v),a:Tt(e.a,3)};var e},r.prototype.invert=function(){return Di({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},r.prototype.saturate=function(e){return e===void 0&&(e=.1),Di($l(this.rgba,e))},r.prototype.desaturate=function(e){return e===void 0&&(e=.1),Di($l(this.rgba,-e))},r.prototype.grayscale=function(){return Di($l(this.rgba,-1))},r.prototype.lighten=function(e){return e===void 0&&(e=.1),Di(Bu(this.rgba,e))},r.prototype.darken=function(e){return e===void 0&&(e=.1),Di(Bu(this.rgba,-e))},r.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},r.prototype.alpha=function(e){return typeof e=="number"?Di({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):Tt(this.rgba.a,3);var t},r.prototype.hue=function(e){var t=ea(this.rgba);return typeof e=="number"?Di({h:e,s:t.s,l:t.l,a:t.a}):Tt(t.h)},r.prototype.isEqual=function(e){return this.toHex()===Di(e).toHex()},r}(),Di=function(r){return r instanceof Kh?r:new Kh(r)},Ru=[],Vb=function(r){r.forEach(function(e){Ru.indexOf(e)<0&&(e(Kh,qh),Ru.push(e))})};function Wb(r,e){var t={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},i={};for(var s in t)i[t[s]]=s;var n={};r.prototype.toName=function(a){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var o,l,c=i[this.toHex()];if(c)return c;if(a?.closest){var u=this.toRgb(),h=1/0,d="black";if(!n.length)for(var p in t)n[p]=new r(t[p]).toRgb();for(var f in t){var m=(o=u,l=n[f],Math.pow(o.r-l.r,2)+Math.pow(o.g-l.g,2)+Math.pow(o.b-l.b,2));ms===t[n]);if(e!==null&&t!==null){const s=Object.keys(e),n=Object.keys(t);return s.length!==n.length?!1:s.every(a=>e[a]===t[a])}return e===t}toRgba(){const[e,t,i,s]=this._components;return{r:e,g:t,b:i,a:s}}toRgb(){const[e,t,i]=this._components;return{r:e,g:t,b:i}}toRgbaString(){const[e,t,i]=this.toUint8RgbArray();return`rgba(${e},${t},${i},${this.alpha})`}toUint8RgbArray(e){const[t,i,s]=this._components;return e=e??[],e[0]=Math.round(t*255),e[1]=Math.round(i*255),e[2]=Math.round(s*255),e}toRgbArray(e){e=e??[];const[t,i,s]=this._components;return e[0]=t,e[1]=i,e[2]=s,e}toNumber(){return this._int}toLittleEndianNumber(){const e=this._int;return(e>>16)+(e&65280)+((e&255)<<16)}multiply(e){const[t,i,s,n]=vo.temp.setValue(e)._components;return this._components[0]*=t,this._components[1]*=i,this._components[2]*=s,this._components[3]*=n,this.refreshInt(),this._value=null,this}premultiply(e,t=!0){return t&&(this._components[0]*=e,this._components[1]*=e,this._components[2]*=e),this._components[3]=e,this.refreshInt(),this._value=null,this}toPremultiplied(e,t=!0){if(e===1)return(255<<24)+this._int;if(e===0)return t?0:this._int;let i=this._int>>16&255,s=this._int>>8&255,n=this._int&255;return t&&(i=i*e+.5|0,s=s*e+.5|0,n=n*e+.5|0),(e*255<<24)+(i<<16)+(s<<8)+n}toHex(){const e=this._int.toString(16);return`#${"000000".substring(0,6-e.length)+e}`}toHexa(){const e=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-e.length)+e}setAlpha(e){return this._components[3]=this._clamp(e),this}round(e){const[t,i,s]=this._components;return this._components[0]=Math.round(t*e)/e,this._components[1]=Math.round(i*e)/e,this._components[2]=Math.round(s*e)/e,this.refreshInt(),this._value=null,this}toArray(e){e=e??[];const[t,i,s,n]=this._components;return e[0]=t,e[1]=i,e[2]=s,e[3]=n,e}normalize(e){let t,i,s,n;if((typeof e=="number"||e instanceof Number)&&e>=0&&e<=16777215){const a=e;t=(a>>16&255)/255,i=(a>>8&255)/255,s=(a&255)/255,n=1}else if((Array.isArray(e)||e instanceof Float32Array)&&e.length>=3&&e.length<=4)e=this._clamp(e),[t,i,s,n=1]=e;else if((e instanceof Uint8Array||e instanceof Uint8ClampedArray)&&e.length>=3&&e.length<=4)e=this._clamp(e,0,255),[t,i,s,n=255]=e,t/=255,i/=255,s/=255,n/=255;else if(typeof e=="string"||typeof e=="object"){if(typeof e=="string"){const o=vo.HEX_PATTERN.exec(e);o&&(e=`#${o[2]}`)}const a=Di(e);a.isValid()&&({r:t,g:i,b:s,a:n}=a.rgba,t/=255,i/=255,s/=255)}if(t!==void 0)this._components[0]=t,this._components[1]=i,this._components[2]=s,this._components[3]=n,this.refreshInt();else throw new Error(`Unable to convert color ${e}`)}refreshInt(){this._clamp(this._components);const[e,t,i]=this._components;this._int=(e*255<<16)+(t*255<<8)+(i*255|0)}_clamp(e,t=0,i=1){return typeof e=="number"?Math.min(Math.max(e,t),i):(e.forEach((s,n)=>{e[n]=Math.min(Math.max(s,t),i)}),e)}};Hs.shared=new Hs,Hs.temp=new Hs,Hs.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;let B=Hs;function zb(r){return He("7.2.0","utils.hex2string is deprecated, use Color#toHex instead"),B.shared.setValue(r).toHex()}function jb(r){return He("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),B.shared.setValue(r).toNumber()}function $b(){const r=[],e=[];for(let i=0;i<32;i++)r[i]=i,e[i]=i;r[Me.NORMAL_NPM]=Me.NORMAL,r[Me.ADD_NPM]=Me.ADD,r[Me.SCREEN_NPM]=Me.SCREEN,e[Me.NORMAL]=Me.NORMAL_NPM,e[Me.ADD]=Me.ADD_NPM,e[Me.SCREEN]=Me.SCREEN_NPM;const t=[];return t.push(e),t.push(r),t}const nm=$b();function am(r,e){return nm[e?1:0][r]}function Xb(r,e=null){const t=r*6;if(e=e||new Uint16Array(t),e.length!==t)throw new Error(`Out buffer length is incorrect, got ${e.length} and expected ${t}`);for(let i=0,s=0;i>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r+1}function Lu(r){return!(r&r-1)&&!!r}function Du(r){let e=(r>65535?1:0)<<4;r>>>=e;let t=(r>255?1:0)<<3;return r>>>=t,e|=t,t=(r>15?1:0)<<2,r>>>=t,e|=t,t=(r>3?1:0)<<1,r>>>=t,e|=t,e|r>>1}function sn(r,e,t){const i=r.length;let s;if(e>=i||t===0)return;t=e+t>i?i-e:t;const n=i-t;for(s=e;s(r.Renderer="renderer",r.Application="application",r.RendererSystem="renderer-webgl-system",r.RendererPlugin="renderer-webgl-plugin",r.CanvasRendererSystem="renderer-canvas-system",r.CanvasRendererPlugin="renderer-canvas-plugin",r.Asset="asset",r.LoadParser="load-parser",r.ResolveParser="resolve-parser",r.CacheParser="cache-parser",r.DetectionParser="detection-parser",r))(oe||{});const Jh=r=>{if(typeof r=="function"||typeof r=="object"&&r.extension){if(!r.extension)throw new Error("Extension class must have an extension object");r={...typeof r.extension!="object"?{type:r.extension}:r.extension,ref:r}}if(typeof r=="object")r={...r};else throw new Error("Invalid extension type");return typeof r.type=="string"&&(r.type=[r.type]),r},Hu=(r,e)=>Jh(r).priority??e,ge={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...r){return r.map(Jh).forEach(e=>{e.type.forEach(t=>this._removeHandlers[t]?.(e))}),this},add(...r){return r.map(Jh).forEach(e=>{e.type.forEach(t=>{const i=this._addHandlers,s=this._queue;i[t]?i[t]?.(e):(s[t]=s[t]||[],s[t]?.push(e))})}),this},handle(r,e,t){const i=this._addHandlers,s=this._removeHandlers;if(i[r]||s[r])throw new Error(`Extension type ${r} already has a handler`);i[r]=e,s[r]=t;const n=this._queue;return n[r]&&(n[r]?.forEach(a=>e(a)),delete n[r]),this},handleByMap(r,e){return this.handle(r,t=>{t.name&&(e[t.name]=t.ref)},t=>{t.name&&delete e[t.name]})},handleByList(r,e,t=-1){return this.handle(r,i=>{e.includes(i.ref)||(e.push(i.ref),e.sort((s,n)=>Hu(n,t)-Hu(s,t)))},i=>{const s=e.indexOf(i.ref);s!==-1&&e.splice(s,1)})}};class Qh{constructor(e){typeof e=="number"?this.rawBinaryData=new ArrayBuffer(e):e instanceof Uint8Array?this.rawBinaryData=e.buffer:this.rawBinaryData=e,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData)}get int8View(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View}get uint8View(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View}get int16View(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View}get uint16View(){return this._uint16View||(this._uint16View=new Uint16Array(this.rawBinaryData)),this._uint16View}get int32View(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View}view(e){return this[`${e}View`]}destroy(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null}static sizeOf(e){switch(e){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(`${e} isn't a valid view type`)}}}const Qb=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(` -`);function ew(r){let e="";for(let t=0;t0&&(e+=` -else `),t=0;--i){const s=ec[i];if(s.test&&s.test(r,t))return new s(r,e)}throw new Error("Unrecognized source type to auto-detect Resource")}class Ci{constructor(e){this.items=[],this._name=e,this._aliasCount=0}emit(e,t,i,s,n,a,o,l){if(arguments.length>8)throw new Error("max arguments reached");const{name:c,items:u}=this;this._aliasCount++;for(let h=0,d=u.length;h0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))}add(e){return e[this._name]&&(this.ensureNonAliasedItems(),this.remove(e),this.items.push(e)),this}remove(e){const t=this.items.indexOf(e);return t!==-1&&(this.ensureNonAliasedItems(),this.items.splice(t,1)),this}contains(e){return this.items.includes(e)}removeAll(){return this.ensureNonAliasedItems(),this.items.length=0,this}destroy(){this.removeAll(),this.items.length=0,this._name=""}get empty(){return this.items.length===0}get name(){return this._name}}Object.defineProperties(Ci.prototype,{dispatch:{value:Ci.prototype.emit},run:{value:Ci.prototype.emit}});class ha{constructor(e=0,t=0){this._width=e,this._height=t,this.destroyed=!1,this.internal=!1,this.onResize=new Ci("setRealSize"),this.onUpdate=new Ci("update"),this.onError=new Ci("onError")}bind(e){this.onResize.add(e),this.onUpdate.add(e),this.onError.add(e),(this._width||this._height)&&this.onResize.emit(this._width,this._height)}unbind(e){this.onResize.remove(e),this.onUpdate.remove(e),this.onError.remove(e)}resize(e,t){(e!==this._width||t!==this._height)&&(this._width=e,this._height=t,this.onResize.emit(e,t))}get valid(){return!!this._width&&!!this._height}update(){this.destroyed||this.onUpdate.emit()}load(){return Promise.resolve(this)}get width(){return this._width}get height(){return this._height}style(e,t,i){return!1}dispose(){}destroy(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)}static test(e,t){return!1}}class nl extends ha{constructor(e,t){const{width:i,height:s}=t||{};if(!i||!s)throw new Error("BufferResource width or height invalid");super(i,s),this.data=e,this.unpackAlignment=t.unpackAlignment??4}upload(e,t,i){const s=e.gl;s.pixelStorei(s.UNPACK_ALIGNMENT,this.unpackAlignment),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.alphaMode===zt.UNPACK);const n=t.realWidth,a=t.realHeight;return i.width===n&&i.height===a?s.texSubImage2D(t.target,0,0,0,n,a,t.format,i.type,this.data):(i.width=n,i.height=a,s.texImage2D(t.target,0,i.internalFormat,n,a,0,t.format,i.type,this.data)),!0}dispose(){this.data=null}static test(e){return e===null||e instanceof Int8Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array}}const iw={scaleMode:hr.NEAREST,alphaMode:zt.NPM},tc=class Gs extends xn{constructor(e=null,t=null){super(),t=Object.assign({},Gs.defaultOptions,t);const{alphaMode:i,mipmap:s,anisotropicLevel:n,scaleMode:a,width:o,height:l,wrapMode:c,format:u,type:h,target:d,resolution:p,resourceOptions:f}=t;e&&!(e instanceof ha)&&(e=lm(e,f),e.internal=!0),this.resolution=p||ue.RESOLUTION,this.width=Math.round((o||0)*this.resolution)/this.resolution,this.height=Math.round((l||0)*this.resolution)/this.resolution,this._mipmap=s,this.anisotropicLevel=n,this._wrapMode=c,this._scaleMode=a,this.format=u,this.type=h,this.target=d,this.alphaMode=i,this.uid=As(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=o>0&&l>0,this.textureCacheIds=[],this.destroyed=!1,this.resource=null,this._batchEnabled=0,this._batchLocation=0,this.parentTextureArray=null,this.setResource(e)}get realWidth(){return Math.round(this.width*this.resolution)}get realHeight(){return Math.round(this.height*this.resolution)}get mipmap(){return this._mipmap}set mipmap(e){this._mipmap!==e&&(this._mipmap=e,this.dirtyStyleId++)}get scaleMode(){return this._scaleMode}set scaleMode(e){this._scaleMode!==e&&(this._scaleMode=e,this.dirtyStyleId++)}get wrapMode(){return this._wrapMode}set wrapMode(e){this._wrapMode!==e&&(this._wrapMode=e,this.dirtyStyleId++)}setStyle(e,t){let i;return e!==void 0&&e!==this.scaleMode&&(this.scaleMode=e,i=!0),t!==void 0&&t!==this.mipmap&&(this.mipmap=t,i=!0),i&&this.dirtyStyleId++,this}setSize(e,t,i){return i=i||this.resolution,this.setRealSize(e*i,t*i,i)}setRealSize(e,t,i){return this.resolution=i||this.resolution,this.width=Math.round(e)/this.resolution,this.height=Math.round(t)/this.resolution,this._refreshPOT(),this.update(),this}_refreshPOT(){this.isPowerOfTwo=Lu(this.realWidth)&&Lu(this.realHeight)}setResolution(e){const t=this.resolution;return t===e?this:(this.resolution=e,this.valid&&(this.width=Math.round(this.width*t)/e,this.height=Math.round(this.height*t)/e,this.emit("update",this)),this._refreshPOT(),this)}setResource(e){if(this.resource===e)return this;if(this.resource)throw new Error("Resource can be set only once");return e.bind(this),this.resource=e,this}update(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))}onError(e){this.emit("error",this,e)}destroy(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete Tr[this.cacheId],delete Oi[this.cacheId],this.cacheId=null),this.valid=!1,this.dispose(),Gs.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0,this.emit("destroyed",this),this.removeAllListeners()}dispose(){this.emit("dispose",this)}castToBaseTexture(){return this}static from(e,t,i=ue.STRICT_TEXTURE_CACHE){const s=typeof e=="string";let n=null;if(s)n=e;else{if(!e._pixiId){const o=t?.pixiIdPrefix||"pixiid";e._pixiId=`${o}_${As()}`}n=e._pixiId}let a=Tr[n];if(s&&i&&!a)throw new Error(`The cacheId "${n}" does not exist in BaseTextureCache.`);return a||(a=new Gs(e,t),a.cacheId=n,Gs.addToCache(a,n)),a}static fromBuffer(e,t,i,s){e=e||new Float32Array(t*i*4);const n=new nl(e,{width:t,height:i,...s?.resourceOptions});let a,o;return e instanceof Float32Array?(a=se.RGBA,o=xe.FLOAT):e instanceof Int32Array?(a=se.RGBA_INTEGER,o=xe.INT):e instanceof Uint32Array?(a=se.RGBA_INTEGER,o=xe.UNSIGNED_INT):e instanceof Int16Array?(a=se.RGBA_INTEGER,o=xe.SHORT):e instanceof Uint16Array?(a=se.RGBA_INTEGER,o=xe.UNSIGNED_SHORT):e instanceof Int8Array?(a=se.RGBA,o=xe.BYTE):(a=se.RGBA,o=xe.UNSIGNED_BYTE),n.internal=!0,new Gs(n,Object.assign({},iw,{type:o,format:a},s))}static addToCache(e,t){t&&(e.textureCacheIds.includes(t)||e.textureCacheIds.push(t),Tr[t]&&Tr[t]!==e&&console.warn(`BaseTexture added to the cache with an id [${t}] that already had an entry`),Tr[t]=e)}static removeFromCache(e){if(typeof e=="string"){const t=Tr[e];if(t){const i=t.textureCacheIds.indexOf(e);return i>-1&&t.textureCacheIds.splice(i,1),delete Tr[e],t}}else if(e?.textureCacheIds){for(let t=0;t1){for(let h=0;h(r[r.POLY=0]="POLY",r[r.RECT=1]="RECT",r[r.CIRC=2]="CIRC",r[r.ELIP=3]="ELIP",r[r.RREC=4]="RREC",r))(It||{});class We{constructor(e=0,t=0){this.x=0,this.y=0,this.x=e,this.y=t}clone(){return new We(this.x,this.y)}copyFrom(e){return this.set(e.x,e.y),this}copyTo(e){return e.set(this.x,this.y),e}equals(e){return e.x===this.x&&e.y===this.y}set(e=0,t=e){return this.x=e,this.y=t,this}}We.prototype.toString=function(){return`[@pixi/math:Point x=${this.x} y=${this.y}]`};const Oa=[new We,new We,new We,new We];class ke{constructor(e=0,t=0,i=0,s=0){this.x=Number(e),this.y=Number(t),this.width=Number(i),this.height=Number(s),this.type=It.RECT}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}static get EMPTY(){return new ke(0,0,0,0)}clone(){return new ke(this.x,this.y,this.width,this.height)}copyFrom(e){return this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height,this}copyTo(e){return e.x=this.x,e.y=this.y,e.width=this.width,e.height=this.height,e}contains(e,t){return this.width<=0||this.height<=0?!1:e>=this.x&&e=this.y&&te.right?e.right:this.right)<=L)return!1;const k=this.ye.bottom?e.bottom:this.bottom)>k}const i=this.left,s=this.right,n=this.top,a=this.bottom;if(s<=i||a<=n)return!1;const o=Oa[0].set(e.left,e.top),l=Oa[1].set(e.left,e.bottom),c=Oa[2].set(e.right,e.top),u=Oa[3].set(e.right,e.bottom);if(c.x<=o.x||l.y<=o.y)return!1;const h=Math.sign(t.a*t.d-t.b*t.c);if(h===0||(t.apply(o,o),t.apply(l,l),t.apply(c,c),t.apply(u,u),Math.max(o.x,l.x,c.x,u.x)<=i||Math.min(o.x,l.x,c.x,u.x)>=s||Math.max(o.y,l.y,c.y,u.y)<=n||Math.min(o.y,l.y,c.y,u.y)>=a))return!1;const d=h*(l.y-o.y),p=h*(o.x-l.x),f=d*i+p*n,m=d*s+p*n,g=d*i+p*a,y=d*s+p*a;if(Math.max(f,m,g,y)<=d*o.x+p*o.y||Math.min(f,m,g,y)>=d*u.x+p*u.y)return!1;const w=h*(o.y-c.y),b=h*(c.x-o.x),v=w*i+b*n,A=w*s+b*n,C=w*i+b*a,I=w*s+b*a;return!(Math.max(v,A,C,I)<=w*o.x+b*o.y||Math.min(v,A,C,I)>=w*u.x+b*u.y)}pad(e=0,t=e){return this.x-=e,this.y-=t,this.width+=e*2,this.height+=t*2,this}fit(e){const t=Math.max(this.x,e.x),i=Math.min(this.x+this.width,e.x+e.width),s=Math.max(this.y,e.y),n=Math.min(this.y+this.height,e.y+e.height);return this.x=t,this.width=Math.max(i-t,0),this.y=s,this.height=Math.max(n-s,0),this}ceil(e=1,t=.001){const i=Math.ceil((this.x+this.width-t)*e)/e,s=Math.ceil((this.y+this.height-t)*e)/e;return this.x=Math.floor((this.x+t)*e)/e,this.y=Math.floor((this.y+t)*e)/e,this.width=i-this.x,this.height=s-this.y,this}enlarge(e){const t=Math.min(this.x,e.x),i=Math.max(this.x+this.width,e.x+e.width),s=Math.min(this.y,e.y),n=Math.max(this.y+this.height,e.y+e.height);return this.x=t,this.width=i-t,this.y=s,this.height=n-s,this}}ke.prototype.toString=function(){return`[@pixi/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`};class al{constructor(e=0,t=0,i=0){this.x=e,this.y=t,this.radius=i,this.type=It.CIRC}clone(){return new al(this.x,this.y,this.radius)}contains(e,t){if(this.radius<=0)return!1;const i=this.radius*this.radius;let s=this.x-e,n=this.y-t;return s*=s,n*=n,s+n<=i}getBounds(){return new ke(this.x-this.radius,this.y-this.radius,this.radius*2,this.radius*2)}}al.prototype.toString=function(){return`[@pixi/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`};class ol{constructor(e=0,t=0,i=0,s=0){this.x=e,this.y=t,this.width=i,this.height=s,this.type=It.ELIP}clone(){return new ol(this.x,this.y,this.width,this.height)}contains(e,t){if(this.width<=0||this.height<=0)return!1;let i=(e-this.x)/this.width,s=(t-this.y)/this.height;return i*=i,s*=s,i+s<=1}getBounds(){return new ke(this.x-this.width,this.y-this.height,this.width,this.height)}}ol.prototype.toString=function(){return`[@pixi/math:Ellipse x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`};class vs{constructor(...e){let t=Array.isArray(e[0])?e[0]:e;if(typeof t[0]!="number"){const i=[];for(let s=0,n=t.length;st!=u>t&&e<(c-o)*((t-l)/(u-l))+o&&(i=!i)}return i}}vs.prototype.toString=function(){return`[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce((r,e)=>`${r}, ${e}`,"")}]`};class ll{constructor(e=0,t=0,i=0,s=0,n=20){this.x=e,this.y=t,this.width=i,this.height=s,this.radius=n,this.type=It.RREC}clone(){return new ll(this.x,this.y,this.width,this.height,this.radius)}contains(e,t){if(this.width<=0||this.height<=0)return!1;if(e>=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height){const i=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(t>=this.y+i&&t<=this.y+this.height-i||e>=this.x+i&&e<=this.x+this.width-i)return!0;let s=e-(this.x+i),n=t-(this.y+i);const a=i*i;if(s*s+n*n<=a||(s=e-(this.x+this.width-i),s*s+n*n<=a)||(n=t-(this.y+this.height-i),s*s+n*n<=a)||(s=e-(this.x+i),s*s+n*n<=a))return!0}return!1}}ll.prototype.toString=function(){return`[@pixi/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`};class tt{constructor(e=1,t=0,i=0,s=1,n=0,a=0){this.array=null,this.a=e,this.b=t,this.c=i,this.d=s,this.tx=n,this.ty=a}fromArray(e){this.a=e[0],this.b=e[1],this.c=e[3],this.d=e[4],this.tx=e[2],this.ty=e[5]}set(e,t,i,s,n,a){return this.a=e,this.b=t,this.c=i,this.d=s,this.tx=n,this.ty=a,this}toArray(e,t){this.array||(this.array=new Float32Array(9));const i=t||this.array;return e?(i[0]=this.a,i[1]=this.b,i[2]=0,i[3]=this.c,i[4]=this.d,i[5]=0,i[6]=this.tx,i[7]=this.ty,i[8]=1):(i[0]=this.a,i[1]=this.c,i[2]=this.tx,i[3]=this.b,i[4]=this.d,i[5]=this.ty,i[6]=0,i[7]=0,i[8]=1),i}apply(e,t){t=t||new We;const i=e.x,s=e.y;return t.x=this.a*i+this.c*s+this.tx,t.y=this.b*i+this.d*s+this.ty,t}applyInverse(e,t){t=t||new We;const i=1/(this.a*this.d+this.c*-this.b),s=e.x,n=e.y;return t.x=this.d*i*s+-this.c*i*n+(this.ty*this.c-this.tx*this.d)*i,t.y=this.a*i*n+-this.b*i*s+(-this.ty*this.a+this.tx*this.b)*i,t}translate(e,t){return this.tx+=e,this.ty+=t,this}scale(e,t){return this.a*=e,this.d*=t,this.c*=e,this.b*=t,this.tx*=e,this.ty*=t,this}rotate(e){const t=Math.cos(e),i=Math.sin(e),s=this.a,n=this.c,a=this.tx;return this.a=s*t-this.b*i,this.b=s*i+this.b*t,this.c=n*t-this.d*i,this.d=n*i+this.d*t,this.tx=a*t-this.ty*i,this.ty=a*i+this.ty*t,this}append(e){const t=this.a,i=this.b,s=this.c,n=this.d;return this.a=e.a*t+e.b*s,this.b=e.a*i+e.b*n,this.c=e.c*t+e.d*s,this.d=e.c*i+e.d*n,this.tx=e.tx*t+e.ty*s+this.tx,this.ty=e.tx*i+e.ty*n+this.ty,this}setTransform(e,t,i,s,n,a,o,l,c){return this.a=Math.cos(o+c)*n,this.b=Math.sin(o+c)*n,this.c=-Math.sin(o-l)*a,this.d=Math.cos(o-l)*a,this.tx=e-(i*this.a+s*this.c),this.ty=t-(i*this.b+s*this.d),this}prepend(e){const t=this.tx;if(e.a!==1||e.b!==0||e.c!==0||e.d!==1){const i=this.a,s=this.c;this.a=i*e.a+this.b*e.c,this.b=i*e.b+this.b*e.d,this.c=s*e.a+this.d*e.c,this.d=s*e.b+this.d*e.d}return this.tx=t*e.a+this.ty*e.c+e.tx,this.ty=t*e.b+this.ty*e.d+e.ty,this}decompose(e){const t=this.a,i=this.b,s=this.c,n=this.d,a=e.pivot,o=-Math.atan2(-s,n),l=Math.atan2(i,t),c=Math.abs(o+l);return c<1e-5||Math.abs(Do-c)<1e-5?(e.rotation=l,e.skew.x=e.skew.y=0):(e.rotation=0,e.skew.x=o,e.skew.y=l),e.scale.x=Math.sqrt(t*t+i*i),e.scale.y=Math.sqrt(s*s+n*n),e.position.x=this.tx+(a.x*t+a.y*s),e.position.y=this.ty+(a.x*i+a.y*n),e}invert(){const e=this.a,t=this.b,i=this.c,s=this.d,n=this.tx,a=e*s-t*i;return this.a=s/a,this.b=-t/a,this.c=-i/a,this.d=e/a,this.tx=(i*this.ty-s*n)/a,this.ty=-(e*this.ty-t*n)/a,this}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){const e=new tt;return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e}copyTo(e){return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e}copyFrom(e){return this.a=e.a,this.b=e.b,this.c=e.c,this.d=e.d,this.tx=e.tx,this.ty=e.ty,this}static get IDENTITY(){return new tt}static get TEMP_MATRIX(){return new tt}}tt.prototype.toString=function(){return`[@pixi/math:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`};const es=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],ts=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],is=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],rs=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],rc=[],dm=[],Fa=Math.sign;function dw(){for(let r=0;r<16;r++){const e=[];rc.push(e);for(let t=0;t<16;t++){const i=Fa(es[r]*es[t]+is[r]*ts[t]),s=Fa(ts[r]*es[t]+rs[r]*ts[t]),n=Fa(es[r]*is[t]+is[r]*rs[t]),a=Fa(ts[r]*is[t]+rs[r]*rs[t]);for(let o=0;o<16;o++)if(es[o]===i&&ts[o]===s&&is[o]===n&&rs[o]===a){e.push(o);break}}}for(let r=0;r<16;r++){const e=new tt;e.set(es[r],ts[r],is[r],rs[r],0,0),dm.push(e)}}dw();const ht={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:r=>es[r],uY:r=>ts[r],vX:r=>is[r],vY:r=>rs[r],inv:r=>r&8?r&15:-r&7,add:(r,e)=>rc[r][e],sub:(r,e)=>rc[r][ht.inv(e)],rotate180:r=>r^4,isVertical:r=>(r&3)===2,byDirection:(r,e)=>Math.abs(r)*2<=Math.abs(e)?e>=0?ht.S:ht.N:Math.abs(e)*2<=Math.abs(r)?r>0?ht.E:ht.W:e>0?r>0?ht.SE:ht.SW:r>0?ht.NE:ht.NW,matrixAppendRotationInv:(r,e,t=0,i=0)=>{const s=dm[ht.inv(e)];s.tx=t,s.ty=i,r.append(s)}};class dr{constructor(e,t,i=0,s=0){this._x=i,this._y=s,this.cb=e,this.scope=t}clone(e=this.cb,t=this.scope){return new dr(e,t,this._x,this._y)}set(e=0,t=e){return(this._x!==e||this._y!==t)&&(this._x=e,this._y=t,this.cb.call(this.scope)),this}copyFrom(e){return(this._x!==e.x||this._y!==e.y)&&(this._x=e.x,this._y=e.y,this.cb.call(this.scope)),this}copyTo(e){return e.set(this._x,this._y),e}equals(e){return e.x===this._x&&e.y===this._y}get x(){return this._x}set x(e){this._x!==e&&(this._x=e,this.cb.call(this.scope))}get y(){return this._y}set y(e){this._y!==e&&(this._y=e,this.cb.call(this.scope))}}dr.prototype.toString=function(){return`[@pixi/math:ObservablePoint x=${this.x} y=${this.y} scope=${this.scope}]`};const sc=class{constructor(){this.worldTransform=new tt,this.localTransform=new tt,this.position=new dr(this.onChange,this,0,0),this.scale=new dr(this.onChange,this,1,1),this.pivot=new dr(this.onChange,this,0,0),this.skew=new dr(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}onChange(){this._localID++}updateSkew(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++}updateLocalTransform(){const r=this.localTransform;this._localID!==this._currentLocalID&&(r.a=this._cx*this.scale.x,r.b=this._sx*this.scale.x,r.c=this._cy*this.scale.y,r.d=this._sy*this.scale.y,r.tx=this.position.x-(this.pivot.x*r.a+this.pivot.y*r.c),r.ty=this.position.y-(this.pivot.x*r.b+this.pivot.y*r.d),this._currentLocalID=this._localID,this._parentID=-1)}updateTransform(r){const e=this.localTransform;if(this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==r._worldID){const t=r.worldTransform,i=this.worldTransform;i.a=e.a*t.a+e.b*t.c,i.b=e.a*t.b+e.b*t.d,i.c=e.c*t.a+e.d*t.c,i.d=e.c*t.b+e.d*t.d,i.tx=e.tx*t.a+e.ty*t.c+t.tx,i.ty=e.tx*t.b+e.ty*t.d+t.ty,this._parentID=r._worldID,this._worldID++}}setFromMatrix(r){r.decompose(this),this._localID++}get rotation(){return this._rotation}set rotation(r){this._rotation!==r&&(this._rotation=r,this.updateSkew())}};sc.IDENTITY=new sc;let sd=sc;sd.prototype.toString=function(){return`[@pixi/math:Transform position=(${this.position.x}, ${this.position.y}) rotation=${this.rotation} scale=(${this.scale.x}, ${this.scale.y}) skew=(${this.skew.x}, ${this.skew.y}) ]`};var uw=`varying vec2 vTextureCoord; - -uniform sampler2D uSampler; - -void main(void){ - gl_FragColor *= texture2D(uSampler, vTextureCoord); -}`,pw=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void){ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -} -`;function Vu(r,e,t){const i=r.createShader(e);return r.shaderSource(i,t),r.compileShader(i),i}function eh(r){const e=new Array(r);for(let t=0;tr.type==="float"&&r.size===1&&!r.isArray,code:r=>` - if(uv["${r}"] !== ud["${r}"].value) - { - ud["${r}"].value = uv["${r}"] - gl.uniform1f(ud["${r}"].location, uv["${r}"]) - } - `},{test:(r,e)=>(r.type==="sampler2D"||r.type==="samplerCube"||r.type==="sampler2DArray")&&r.size===1&&!r.isArray&&(e==null||e.castToBaseTexture!==void 0),code:r=>`t = syncData.textureCount++; - - renderer.texture.bind(uv["${r}"], t); - - if(ud["${r}"].value !== t) - { - ud["${r}"].value = t; - gl.uniform1i(ud["${r}"].location, t); -; // eslint-disable-line max-len - }`},{test:(r,e)=>r.type==="mat3"&&r.size===1&&!r.isArray&&e.a!==void 0,code:r=>` - gl.uniformMatrix3fv(ud["${r}"].location, false, uv["${r}"].toArray(true)); - `,codeUbo:r=>` - var ${r}_matrix = uv.${r}.toArray(true); - - data[offset] = ${r}_matrix[0]; - data[offset+1] = ${r}_matrix[1]; - data[offset+2] = ${r}_matrix[2]; - - data[offset + 4] = ${r}_matrix[3]; - data[offset + 5] = ${r}_matrix[4]; - data[offset + 6] = ${r}_matrix[5]; - - data[offset + 8] = ${r}_matrix[6]; - data[offset + 9] = ${r}_matrix[7]; - data[offset + 10] = ${r}_matrix[8]; - `},{test:(r,e)=>r.type==="vec2"&&r.size===1&&!r.isArray&&e.x!==void 0,code:r=>` - cv = ud["${r}"].value; - v = uv["${r}"]; - - if(cv[0] !== v.x || cv[1] !== v.y) - { - cv[0] = v.x; - cv[1] = v.y; - gl.uniform2f(ud["${r}"].location, v.x, v.y); - }`,codeUbo:r=>` - v = uv.${r}; - - data[offset] = v.x; - data[offset+1] = v.y; - `},{test:r=>r.type==="vec2"&&r.size===1&&!r.isArray,code:r=>` - cv = ud["${r}"].value; - v = uv["${r}"]; - - if(cv[0] !== v[0] || cv[1] !== v[1]) - { - cv[0] = v[0]; - cv[1] = v[1]; - gl.uniform2f(ud["${r}"].location, v[0], v[1]); - } - `},{test:(r,e)=>r.type==="vec4"&&r.size===1&&!r.isArray&&e.width!==void 0,code:r=>` - cv = ud["${r}"].value; - v = uv["${r}"]; - - if(cv[0] !== v.x || cv[1] !== v.y || cv[2] !== v.width || cv[3] !== v.height) - { - cv[0] = v.x; - cv[1] = v.y; - cv[2] = v.width; - cv[3] = v.height; - gl.uniform4f(ud["${r}"].location, v.x, v.y, v.width, v.height) - }`,codeUbo:r=>` - v = uv.${r}; - - data[offset] = v.x; - data[offset+1] = v.y; - data[offset+2] = v.width; - data[offset+3] = v.height; - `},{test:(r,e)=>r.type==="vec4"&&r.size===1&&!r.isArray&&e.red!==void 0,code:r=>` - cv = ud["${r}"].value; - v = uv["${r}"]; - - if(cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue || cv[3] !== v.alpha) - { - cv[0] = v.red; - cv[1] = v.green; - cv[2] = v.blue; - cv[3] = v.alpha; - gl.uniform4f(ud["${r}"].location, v.red, v.green, v.blue, v.alpha) - }`,codeUbo:r=>` - v = uv.${r}; - - data[offset] = v.red; - data[offset+1] = v.green; - data[offset+2] = v.blue; - data[offset+3] = v.alpha; - `},{test:(r,e)=>r.type==="vec3"&&r.size===1&&!r.isArray&&e.red!==void 0,code:r=>` - cv = ud["${r}"].value; - v = uv["${r}"]; - - if(cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue || cv[3] !== v.a) - { - cv[0] = v.red; - cv[1] = v.green; - cv[2] = v.blue; - - gl.uniform3f(ud["${r}"].location, v.red, v.green, v.blue) - }`,codeUbo:r=>` - v = uv.${r}; - - data[offset] = v.red; - data[offset+1] = v.green; - data[offset+2] = v.blue; - `},{test:r=>r.type==="vec4"&&r.size===1&&!r.isArray,code:r=>` - cv = ud["${r}"].value; - v = uv["${r}"]; - - if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) - { - cv[0] = v[0]; - cv[1] = v[1]; - cv[2] = v[2]; - cv[3] = v[3]; - - gl.uniform4f(ud["${r}"].location, v[0], v[1], v[2], v[3]) - }`}],fw={float:` - if (cv !== v) - { - cu.value = v; - gl.uniform1f(location, v); - }`,vec2:` - if (cv[0] !== v[0] || cv[1] !== v[1]) - { - cv[0] = v[0]; - cv[1] = v[1]; - - gl.uniform2f(location, v[0], v[1]) - }`,vec3:` - if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) - { - cv[0] = v[0]; - cv[1] = v[1]; - cv[2] = v[2]; - - gl.uniform3f(location, v[0], v[1], v[2]) - }`,vec4:` - if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) - { - cv[0] = v[0]; - cv[1] = v[1]; - cv[2] = v[2]; - cv[3] = v[3]; - - gl.uniform4f(location, v[0], v[1], v[2], v[3]); - }`,int:` - if (cv !== v) - { - cu.value = v; - - gl.uniform1i(location, v); - }`,ivec2:` - if (cv[0] !== v[0] || cv[1] !== v[1]) - { - cv[0] = v[0]; - cv[1] = v[1]; - - gl.uniform2i(location, v[0], v[1]); - }`,ivec3:` - if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) - { - cv[0] = v[0]; - cv[1] = v[1]; - cv[2] = v[2]; - - gl.uniform3i(location, v[0], v[1], v[2]); - }`,ivec4:` - if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) - { - cv[0] = v[0]; - cv[1] = v[1]; - cv[2] = v[2]; - cv[3] = v[3]; - - gl.uniform4i(location, v[0], v[1], v[2], v[3]); - }`,uint:` - if (cv !== v) - { - cu.value = v; - - gl.uniform1ui(location, v); - }`,uvec2:` - if (cv[0] !== v[0] || cv[1] !== v[1]) - { - cv[0] = v[0]; - cv[1] = v[1]; - - gl.uniform2ui(location, v[0], v[1]); - }`,uvec3:` - if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) - { - cv[0] = v[0]; - cv[1] = v[1]; - cv[2] = v[2]; - - gl.uniform3ui(location, v[0], v[1], v[2]); - }`,uvec4:` - if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) - { - cv[0] = v[0]; - cv[1] = v[1]; - cv[2] = v[2]; - cv[3] = v[3]; - - gl.uniform4ui(location, v[0], v[1], v[2], v[3]); - }`,bool:` - if (cv !== v) - { - cu.value = v; - gl.uniform1i(location, v); - }`,bvec2:` - if (cv[0] != v[0] || cv[1] != v[1]) - { - cv[0] = v[0]; - cv[1] = v[1]; - - gl.uniform2i(location, v[0], v[1]); - }`,bvec3:` - if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) - { - cv[0] = v[0]; - cv[1] = v[1]; - cv[2] = v[2]; - - gl.uniform3i(location, v[0], v[1], v[2]); - }`,bvec4:` - if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) - { - cv[0] = v[0]; - cv[1] = v[1]; - cv[2] = v[2]; - cv[3] = v[3]; - - gl.uniform4i(location, v[0], v[1], v[2], v[3]); - }`,mat2:"gl.uniformMatrix2fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",sampler2D:` - if (cv !== v) - { - cu.value = v; - - gl.uniform1i(location, v); - }`,samplerCube:` - if (cv !== v) - { - cu.value = v; - - gl.uniform1i(location, v); - }`,sampler2DArray:` - if (cv !== v) - { - cu.value = v; - - gl.uniform1i(location, v); - }`},mw={float:"gl.uniform1fv(location, v)",vec2:"gl.uniform2fv(location, v)",vec3:"gl.uniform3fv(location, v)",vec4:"gl.uniform4fv(location, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat2:"gl.uniformMatrix2fv(location, false, v)",int:"gl.uniform1iv(location, v)",ivec2:"gl.uniform2iv(location, v)",ivec3:"gl.uniform3iv(location, v)",ivec4:"gl.uniform4iv(location, v)",uint:"gl.uniform1uiv(location, v)",uvec2:"gl.uniform2uiv(location, v)",uvec3:"gl.uniform3uiv(location, v)",uvec4:"gl.uniform4uiv(location, v)",bool:"gl.uniform1iv(location, v)",bvec2:"gl.uniform2iv(location, v)",bvec3:"gl.uniform3iv(location, v)",bvec4:"gl.uniform4iv(location, v)",sampler2D:"gl.uniform1iv(location, v)",samplerCube:"gl.uniform1iv(location, v)",sampler2DArray:"gl.uniform1iv(location, v)"};function gw(r,e){const t=[` - var v = null; - var cv = null; - var cu = null; - var t = 0; - var gl = renderer.gl; - `];for(const i in r.uniforms){const s=e[i];if(!s){r.uniforms[i]?.group===!0&&(r.uniforms[i].ubo?t.push(` - renderer.shader.syncUniformBufferGroup(uv.${i}, '${i}'); - `):t.push(` - renderer.shader.syncUniformGroup(uv.${i}, syncData); - `));continue}const n=r.uniforms[i];let a=!1;for(let o=0;o=Cs.WEBGL2&&(e=r.getContext("webgl2",{})),e||(e=r.getContext("webgl",{})||r.getContext("experimental-webgl",{}),e?e.getExtension("WEBGL_draw_buffers"):e=null),Na=e}return Na}let Ua;function vw(){if(!Ua){Ua=di.MEDIUM;const r=yw();if(r&&r.getShaderPrecisionFormat){const e=r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.HIGH_FLOAT);e&&(Ua=e.precision?di.HIGH:di.MEDIUM)}}return Ua}function Wu(r,e){const t=r.getShaderSource(e).split(` -`).map((c,u)=>`${u}: ${c}`),i=r.getShaderInfoLog(e),s=i.split(` -`),n={},a=s.map(c=>parseFloat(c.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1"))).filter(c=>c&&!n[c]?(n[c]=!0,!0):!1),o=[""];a.forEach(c=>{t[c-1]=`%c${t[c-1]}%c`,o.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")});const l=t.join(` -`);o[0]=l,console.error(i),console.groupCollapsed("click to view full shader code"),console.warn(...o),console.groupEnd()}function bw(r,e,t,i){r.getProgramParameter(e,r.LINK_STATUS)||(r.getShaderParameter(t,r.COMPILE_STATUS)||Wu(r,t),r.getShaderParameter(i,r.COMPILE_STATUS)||Wu(r,i),console.error("PixiJS Error: Could not initialize shader."),r.getProgramInfoLog(e)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",r.getProgramInfoLog(e)))}const ww={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function fm(r){return ww[r]}let Ha=null;const zu={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function mm(r,e){if(!Ha){const t=Object.keys(zu);Ha={};for(let i=0;i0&&(t+=` -else `),ithis.size&&this.flush(),this._vertexCount+=e.vertexData.length/2,this._indexCount+=e.indices.length,this._bufferedTextures[this._bufferSize]=e._texture.baseTexture,this._bufferedElements[this._bufferSize++]=e)}buildTexturesAndDrawCalls(){const{_bufferedTextures:e,maxTextures:t}=this,i=_i._textureArrayPool,s=this.renderer.batch,n=this._tempBoundTextures,a=this.renderer.textureGC.count;let o=++Be._globalBatch,l=0,c=i[0],u=0;s.copyBoundTextures(n,t);for(let h=0;h=t&&(s.boundArray(c,n,o,t),this.buildDrawCalls(c,u,h),u=h,c=i[++l],++o),d._batchEnabled=o,d.touched=a,c.elements[c.count++]=d)}c.count>0&&(s.boundArray(c,n,o,t),this.buildDrawCalls(c,u,this._bufferSize),++l,++o);for(let h=0;h0);for(let m=0;m=0;--s)e[s]=i[s]||null,e[s]&&(e[s]._batchLocation=s)}boundArray(e,t,i,s){const{elements:n,ids:a,count:o}=e;let l=0;for(let c=0;c=0&&h=Cs.WEBGL2&&(i=e.getContext("webgl2",t)),i)this.webGLVersion=2;else if(this.webGLVersion=1,i=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),!i)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=i,this.getExtensions(),this.gl}getExtensions(){const{gl:e}=this,t={loseContext:e.getExtension("WEBGL_lose_context"),anisotropicFiltering:e.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),s3tc:e.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:e.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:e.getExtension("WEBGL_compressed_texture_etc"),etc1:e.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:e.getExtension("WEBGL_compressed_texture_atc"),astc:e.getExtension("WEBGL_compressed_texture_astc"),bptc:e.getExtension("EXT_texture_compression_bptc")};this.webGLVersion===1?Object.assign(this.extensions,t,{drawBuffers:e.getExtension("WEBGL_draw_buffers"),depthTexture:e.getExtension("WEBGL_depth_texture"),vertexArrayObject:e.getExtension("OES_vertex_array_object")||e.getExtension("MOZ_OES_vertex_array_object")||e.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:e.getExtension("OES_element_index_uint"),floatTexture:e.getExtension("OES_texture_float"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),textureHalfFloat:e.getExtension("OES_texture_half_float"),textureHalfFloatLinear:e.getExtension("OES_texture_half_float_linear")}):this.webGLVersion===2&&Object.assign(this.extensions,t,{colorBufferFloat:e.getExtension("EXT_color_buffer_float")})}handleContextLost(e){e.preventDefault(),setTimeout(()=>{this.gl.isContextLost()&&this.extensions.loseContext&&this.extensions.loseContext.restoreContext()},0)}handleContextRestored(){this.renderer.runners.contextChange.emit(this.gl)}destroy(){const e=this.renderer.view;this.renderer=null,e.removeEventListener!==void 0&&(e.removeEventListener("webglcontextlost",this.handleContextLost),e.removeEventListener("webglcontextrestored",this.handleContextRestored)),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()}postrender(){this.renderer.objectRenderer.renderingToScreen&&this.gl.flush()}validateContext(e){const t=e.getContextAttributes(),i="WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext;i&&(this.webGLVersion=2),t&&!t.stencil&&console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");const s=i||!!e.getExtension("OES_element_index_uint");this.supports.uint32Indices=s,s||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")}}Fo.defaultOptions={context:null,antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"default"},Fo.extension={type:oe.RendererSystem,name:"context"};ge.add(Fo);class lc{constructor(e,t){if(this.width=Math.round(e),this.height=Math.round(t),!this.width||!this.height)throw new Error("Framebuffer width or height is zero");this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new Ci("disposeFramebuffer"),this.multisample=yt.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(e=0,t){return this.colorTextures[e]=t||new Be(null,{scaleMode:hr.NEAREST,resolution:1,mipmap:er.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(e){return this.depthTexture=e||new Be(null,{scaleMode:hr.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:er.OFF,format:se.DEPTH_COMPONENT,type:xe.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this}enableDepth(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this}enableStencil(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this}resize(e,t){if(e=Math.round(e),t=Math.round(t),!e||!t)throw new Error("Framebuffer width and height must not be zero");if(!(e===this.width&&t===this.height)){this.width=e,this.height=t,this.dirtyId++,this.dirtySize++;for(let i=0;i{const s=this.source;this.url=s.src;const n=()=>{this.destroyed||(s.onload=null,s.onerror=null,this.update(),this._load=null,this.createBitmap?t(this.process()):t(this))};s.complete&&s.src?n():(s.onload=n,s.onerror=a=>{i(a),this.onError.emit(a)})}),this._load)}process(){const e=this.source;if(this._process!==null)return this._process;if(this.bitmap!==null||!globalThis.createImageBitmap)return Promise.resolve(this);const t=globalThis.createImageBitmap,i=!e.crossOrigin||e.crossOrigin==="anonymous";return this._process=fetch(e.src,{mode:i?"cors":"no-cors"}).then(s=>s.blob()).then(s=>t(s,0,0,e.width,e.height,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===zt.UNPACK?"premultiply":"none"})).then(s=>this.destroyed?Promise.reject():(this.bitmap=s,this.update(),this._process=null,Promise.resolve(this))),this._process}upload(e,t,i){if(typeof this.alphaMode=="number"&&(t.alphaMode=this.alphaMode),!this.createBitmap)return super.upload(e,t,i);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(super.upload(e,t,i,this.bitmap),!this.preserveBitmap){let s=!0;const n=t._glTextures;for(const a in n){const o=n[a];if(o!==i&&o.dirtyId!==t.dirtyId){s=!1;break}}s&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0}dispose(){this.source.onload=null,this.source.onerror=null,super.dispose(),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null}static test(e){return typeof HTMLImageElement<"u"&&(typeof e=="string"||e instanceof HTMLImageElement)}}class nd{constructor(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsFloat32=new Float32Array(8)}set(e,t,i){const s=t.width,n=t.height;if(i){const a=e.width/2/s,o=e.height/2/n,l=e.x/s+a,c=e.y/n+o;i=ht.add(i,ht.NW),this.x0=l+a*ht.uX(i),this.y0=c+o*ht.uY(i),i=ht.add(i,2),this.x1=l+a*ht.uX(i),this.y1=c+o*ht.uY(i),i=ht.add(i,2),this.x2=l+a*ht.uX(i),this.y2=c+o*ht.uY(i),i=ht.add(i,2),this.x3=l+a*ht.uX(i),this.y3=c+o*ht.uY(i)}else this.x0=e.x/s,this.y0=e.y/n,this.x1=(e.x+e.width)/s,this.y1=e.y/n,this.x2=(e.x+e.width)/s,this.y2=(e.y+e.height)/n,this.x3=e.x/s,this.y3=(e.y+e.height)/n;this.uvsFloat32[0]=this.x0,this.uvsFloat32[1]=this.y0,this.uvsFloat32[2]=this.x1,this.uvsFloat32[3]=this.y1,this.uvsFloat32[4]=this.x2,this.uvsFloat32[5]=this.y2,this.uvsFloat32[6]=this.x3,this.uvsFloat32[7]=this.y3}}nd.prototype.toString=function(){return`[@pixi/core:TextureUvs x0=${this.x0} y0=${this.y0} x1=${this.x1} y1=${this.y1} x2=${this.x2} y2=${this.y2} x3=${this.x3} y3=${this.y3}]`};const Xu=new nd;function Va(r){r.destroy=function(){},r.on=function(){},r.once=function(){},r.emit=function(){}}class ie extends xn{constructor(e,t,i,s,n,a,o){if(super(),this.noFrame=!1,t||(this.noFrame=!0,t=new ke(0,0,1,1)),e instanceof ie&&(e=e.baseTexture),this.baseTexture=e,this._frame=t,this.trim=s,this.valid=!1,this.destroyed=!1,this._uvs=Xu,this.uvMatrix=null,this.orig=i||t,this._rotate=Number(n||0),n===!0)this._rotate=2;else if(this._rotate%2!==0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");this.defaultAnchor=a?new We(a.x,a.y):new We(0,0),this.defaultBorders=o,this._updateID=0,this.textureCacheIds=[],e.valid?this.noFrame?e.valid&&this.onBaseTextureUpdated(e):this.frame=t:e.once("loaded",this.onBaseTextureUpdated,this),this.noFrame&&e.on("update",this.onBaseTextureUpdated,this)}update(){this.baseTexture.resource&&this.baseTexture.resource.update()}onBaseTextureUpdated(e){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=e.width,this._frame.height=e.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)}destroy(e){if(this.baseTexture){if(e){const{resource:t}=this.baseTexture;t?.url&&Oi[t.url]&&ie.removeFromCache(t.url),this.baseTexture.destroy()}this.baseTexture.off("loaded",this.onBaseTextureUpdated,this),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture=null}this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,ie.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0,this.emit("destroyed",this),this.removeAllListeners()}clone(){const e=this._frame.clone(),t=this._frame===this.orig?e:this.orig.clone(),i=new ie(this.baseTexture,!this.noFrame&&e,t,this.trim?.clone(),this.rotate,this.defaultAnchor,this.defaultBorders);return this.noFrame&&(i._frame=e),i}updateUvs(){this._uvs===Xu&&(this._uvs=new nd),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++}static from(e,t={},i=ue.STRICT_TEXTURE_CACHE){const s=typeof e=="string";let n=null;if(s)n=e;else if(e instanceof Be){if(!e.cacheId){const o=t?.pixiIdPrefix||"pixiid";e.cacheId=`${o}-${As()}`,Be.addToCache(e,e.cacheId)}n=e.cacheId}else{if(!e._pixiId){const o=t?.pixiIdPrefix||"pixiid";e._pixiId=`${o}_${As()}`}n=e._pixiId}let a=Oi[n];if(s&&i&&!a)throw new Error(`The cacheId "${n}" does not exist in TextureCache.`);return!a&&!(e instanceof Be)?(t.resolution||(t.resolution=mr(e)),a=new ie(new Be(e,t)),a.baseTexture.cacheId=n,Be.addToCache(a.baseTexture,n),ie.addToCache(a,n)):!a&&e instanceof Be&&(a=new ie(e),ie.addToCache(a,n)),a}static fromURL(e,t){const i=Object.assign({autoLoad:!1},t?.resourceOptions),s=ie.from(e,Object.assign({resourceOptions:i},t),!1),n=s.baseTexture.resource;return s.baseTexture.valid?Promise.resolve(s):n.load().then(()=>Promise.resolve(s))}static fromBuffer(e,t,i,s){return new ie(Be.fromBuffer(e,t,i,s))}static fromLoader(e,t,i,s){const n=new Be(e,Object.assign({scaleMode:Be.defaultOptions.scaleMode,resolution:mr(t)},s)),{resource:a}=n;a instanceof vm&&(a.url=t);const o=new ie(n);return i||(i=t),Be.addToCache(o.baseTexture,i),ie.addToCache(o,i),i!==t&&(Be.addToCache(o.baseTexture,t),ie.addToCache(o,t)),o.baseTexture.valid?Promise.resolve(o):new Promise(l=>{o.baseTexture.once("loaded",()=>l(o))})}static addToCache(e,t){t&&(e.textureCacheIds.includes(t)||e.textureCacheIds.push(t),Oi[t]&&Oi[t]!==e&&console.warn(`Texture added to the cache with an id [${t}] that already had an entry`),Oi[t]=e)}static removeFromCache(e){if(typeof e=="string"){const t=Oi[e];if(t){const i=t.textureCacheIds.indexOf(e);return i>-1&&t.textureCacheIds.splice(i,1),delete Oi[e],t}}else if(e?.textureCacheIds){for(let t=0;tthis.baseTexture.width,o=i+n>this.baseTexture.height;if(a||o){const l=a&&o?"and":"or",c=`X: ${t} + ${s} = ${t+s} > ${this.baseTexture.width}`,u=`Y: ${i} + ${n} = ${i+n} > ${this.baseTexture.height}`;throw new Error(`Texture Error: frame does not fit inside the base Texture dimensions: ${c} ${l} ${u}`)}this.valid=s&&n&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=e),this.valid&&this.updateUvs()}get rotate(){return this._rotate}set rotate(e){this._rotate=e,this.valid&&this.updateUvs()}get width(){return this.orig.width}get height(){return this.orig.height}castToBaseTexture(){return this.baseTexture}static get EMPTY(){return ie._EMPTY||(ie._EMPTY=new ie(new Be),Va(ie._EMPTY),Va(ie._EMPTY.baseTexture)),ie._EMPTY}static get WHITE(){if(!ie._WHITE){const e=ue.ADAPTER.createCanvas(16,16),t=e.getContext("2d");e.width=16,e.height=16,t.fillStyle="white",t.fillRect(0,0,16,16),ie._WHITE=new ie(Be.from(e)),Va(ie._WHITE),Va(ie._WHITE.baseTexture)}return ie._WHITE}}class Ft extends ie{constructor(e,t){super(e,t),this.valid=!0,this.filterFrame=null,this.filterPoolKey=null,this.updateUvs()}get framebuffer(){return this.baseTexture.framebuffer}get multisample(){return this.framebuffer.multisample}set multisample(e){this.framebuffer.multisample=e}resize(e,t,i=!0){const s=this.baseTexture.resolution,n=Math.round(e*s)/s,a=Math.round(t*s)/s;this.valid=n>0&&a>0,this._frame.width=this.orig.width=n,this._frame.height=this.orig.height=a,i&&this.baseTexture.resize(n,a),this.updateUvs()}setResolution(e){const{baseTexture:t}=this;t.resolution!==e&&(t.setResolution(e),this.resize(t.width,t.height,!1))}static create(e){return new Ft(new ym(e))}}class bm{constructor(e){this.texturePool={},this.textureOptions=e||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(e,t,i=yt.NONE){const s=new ym(Object.assign({width:e,height:t,resolution:1,multisample:i},this.textureOptions));return new Ft(s)}getOptimalTexture(e,t,i=1,s=yt.NONE){let n;e=Math.max(Math.ceil(e*i-1e-6),1),t=Math.max(Math.ceil(t*i-1e-6),1),!this.enableFullScreen||e!==this._pixelsWidth||t!==this._pixelsHeight?(e=Ro(e),t=Ro(t),n=((e&65535)<<16|t&65535)>>>0,s>1&&(n+=s*4294967296)):n=s>1?-s:-1,this.texturePool[n]||(this.texturePool[n]=[]);let a=this.texturePool[n].pop();return a||(a=this.createTexture(e,t,s)),a.filterPoolKey=n,a.setResolution(i),a}getFilterTexture(e,t,i){const s=this.getOptimalTexture(e.width,e.height,t||e.resolution,i||yt.NONE);return s.filterFrame=e.filterFrame,s}returnTexture(e){const t=e.filterPoolKey;e.filterFrame=null,this.texturePool[t].push(e)}returnFilterTexture(e){this.returnTexture(e)}clear(e){if(e=e!==!1,e)for(const t in this.texturePool){const i=this.texturePool[t];if(i)for(let s=0;s0&&e.height>0;for(const t in this.texturePool){if(!(Number(t)<0))continue;const i=this.texturePool[t];if(i)for(let s=0;s1&&(u=this.getOptimalFilterTexture(c.width,c.height,t.resolution),u.filterFrame=c.filterFrame),i[h].apply(this,c,u,Vi.CLEAR,t);const d=c;c=u,u=d}i[h].apply(this,c,l.renderTexture,Vi.BLEND,t),h>1&&t.multisample>1&&this.returnFilterTexture(t.renderTexture),this.returnFilterTexture(c),this.returnFilterTexture(u)}t.clear(),this.statePool.push(t)}bindAndClear(e,t=Vi.CLEAR){const{renderTexture:i,state:s}=this.renderer;if(e===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,e?.filterFrame){const a=this.tempRect;a.x=0,a.y=0,a.width=e.filterFrame.width,a.height=e.filterFrame.height,i.bind(e,e.filterFrame,a)}else e!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?i.bind(e):this.renderer.renderTexture.bind(e,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);const n=s.stateId&1||this.forceClear;(t===Vi.CLEAR||t===Vi.BLIT&&n)&&this.renderer.framebuffer.clear(0,0,0,0)}applyFilter(e,t,i,s){const n=this.renderer;n.state.set(e.state),this.bindAndClear(i,s),e.uniforms.uSampler=t,e.uniforms.filterGlobals=this.globalUniforms,n.shader.bind(e),e.legacy=!!e.program.attributeData.aTextureCoord,e.legacy?(this.quadUv.map(t._frame,t.filterFrame),n.geometry.bind(this.quadUv),n.geometry.draw($i.TRIANGLES)):(n.geometry.bind(this.quad),n.geometry.draw($i.TRIANGLE_STRIP))}calculateSpriteMatrix(e,t){const{sourceFrame:i,destinationFrame:s}=this.activeState,{orig:n}=t._texture,a=e.set(s.width,0,0,s.height,i.x,i.y),o=t.worldTransform.copyTo(tt.TEMP_MATRIX);return o.invert(),a.prepend(o),a.scale(1/n.width,1/n.height),a.translate(t.anchor.x,t.anchor.y),a}destroy(){this.renderer=null,this.texturePool.clear(!1)}getOptimalFilterTexture(e,t,i=1,s=yt.NONE){return this.texturePool.getOptimalTexture(e,t,i,s)}getFilterTexture(e,t,i){if(typeof e=="number"){const n=e;e=t,t=n}e=e||this.activeState.renderTexture;const s=this.texturePool.getOptimalTexture(e.width,e.height,t||e.resolution,i||yt.NONE);return s.filterFrame=e.filterFrame,s}returnFilterTexture(e){this.texturePool.returnTexture(e)}emptyPool(){this.texturePool.clear(!0)}resize(){this.texturePool.setScreenSize(this.renderer.view)}transformAABB(e,t){const i=Wa[0],s=Wa[1],n=Wa[2],a=Wa[3];i.set(t.left,t.top),s.set(t.left,t.bottom),n.set(t.right,t.top),a.set(t.right,t.bottom),e.apply(i,i),e.apply(s,s),e.apply(n,n),e.apply(a,a);const o=Math.min(i.x,s.x,n.x,a.x),l=Math.min(i.y,s.y,n.y,a.y),c=Math.max(i.x,s.x,n.x,a.x),u=Math.max(i.y,s.y,n.y,a.y);t.x=o,t.y=l,t.width=c-o,t.height=u-l}roundFrame(e,t,i,s,n){if(!(e.width<=0||e.height<=0||i.width<=0||i.height<=0)){if(n){const{a,b:o,c:l,d:c}=n;if((Math.abs(o)>1e-4||Math.abs(l)>1e-4)&&(Math.abs(a)>1e-4||Math.abs(c)>1e-4))return}n=n?th.copyFrom(n):th.identity(),n.translate(-i.x,-i.y).scale(s.width/i.width,s.height/i.height).translate(s.x,s.y),this.transformAABB(n,e),e.ceil(t),this.transformAABB(n.invert(),e)}}}_m.extension={type:oe.RendererSystem,name:"filter"};ge.add(_m);class Rw{constructor(e){this.framebuffer=e,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=yt.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}const Lw=new ke;class xm{constructor(e){this.renderer=e,this.managedFramebuffers=[],this.unknownFramebuffer=new lc(10,10),this.msaaSamples=null}contextChange(){this.disposeAll(!0);const e=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new ke,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){let t=this.renderer.context.extensions.drawBuffers,i=this.renderer.context.extensions.depthTexture;ue.PREFER_ENV===Cs.WEBGL_LEGACY&&(t=null,i=null),t?e.drawBuffers=s=>t.drawBuffersWEBGL(s):(this.hasMRT=!1,e.drawBuffers=()=>{}),i||(this.writeDepthTexture=!1)}else this.msaaSamples=e.getInternalformatParameter(e.RENDERBUFFER,e.RGBA8,e.SAMPLES)}bind(e,t,i=0){const{gl:s}=this;if(e){const n=e.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(e);this.current!==e&&(this.current=e,s.bindFramebuffer(s.FRAMEBUFFER,n.framebuffer)),n.mipLevel!==i&&(e.dirtyId++,e.dirtyFormat++,n.mipLevel=i),n.dirtyId!==e.dirtyId&&(n.dirtyId=e.dirtyId,n.dirtyFormat!==e.dirtyFormat?(n.dirtyFormat=e.dirtyFormat,n.dirtySize=e.dirtySize,this.updateFramebuffer(e,i)):n.dirtySize!==e.dirtySize&&(n.dirtySize=e.dirtySize,this.resizeFramebuffer(e)));for(let a=0;a>i,o=t.height>>i,l=a/t.width;this.setViewport(t.x*l,t.y*l,a,o)}else{const a=e.width>>i,o=e.height>>i;this.setViewport(0,0,a,o)}}else this.current&&(this.current=null,s.bindFramebuffer(s.FRAMEBUFFER,null)),t?this.setViewport(t.x,t.y,t.width,t.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)}setViewport(e,t,i,s){const n=this.viewport;e=Math.round(e),t=Math.round(t),i=Math.round(i),s=Math.round(s),(n.width!==i||n.height!==s||n.x!==e||n.y!==t)&&(n.x=e,n.y=t,n.width=i,n.height=s,this.gl.viewport(e,t,i,s))}get size(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}}clear(e,t,i,s,n=Dh.COLOR|Dh.DEPTH){const{gl:a}=this;a.clearColor(e,t,i,s),a.clear(n)}initFramebuffer(e){const{gl:t}=this,i=new Rw(t.createFramebuffer());return i.multisample=this.detectSamples(e.multisample),e.glFramebuffers[this.CONTEXT_UID]=i,this.managedFramebuffers.push(e),e.disposeRunner.add(this),i}resizeFramebuffer(e){const{gl:t}=this,i=e.glFramebuffers[this.CONTEXT_UID];if(i.stencil){t.bindRenderbuffer(t.RENDERBUFFER,i.stencil);let a;this.renderer.context.webGLVersion===1?a=t.DEPTH_STENCIL:e.depth&&e.stencil?a=t.DEPTH24_STENCIL8:e.depth?a=t.DEPTH_COMPONENT24:a=t.STENCIL_INDEX8,i.msaaBuffer?t.renderbufferStorageMultisample(t.RENDERBUFFER,i.multisample,a,e.width,e.height):t.renderbufferStorage(t.RENDERBUFFER,a,e.width,e.height)}const s=e.colorTextures;let n=s.length;t.drawBuffers||(n=Math.min(n,1));for(let a=0;a1&&this.canMultisampleFramebuffer(e)?s.msaaBuffer=s.msaaBuffer||i.createRenderbuffer():s.msaaBuffer&&(i.deleteRenderbuffer(s.msaaBuffer),s.msaaBuffer=null,s.blitFramebuffer&&(s.blitFramebuffer.dispose(),s.blitFramebuffer=null));const o=[];for(let l=0;l1&&i.drawBuffers(o),e.depthTexture&&this.writeDepthTexture){const l=e.depthTexture;this.renderer.texture.bind(l,0),i.framebufferTexture2D(i.FRAMEBUFFER,i.DEPTH_ATTACHMENT,i.TEXTURE_2D,l._glTextures[this.CONTEXT_UID].texture,t)}if((e.stencil||e.depth)&&!(e.depthTexture&&this.writeDepthTexture)){s.stencil=s.stencil||i.createRenderbuffer();let l,c;this.renderer.context.webGLVersion===1?(l=i.DEPTH_STENCIL_ATTACHMENT,c=i.DEPTH_STENCIL):e.depth&&e.stencil?(l=i.DEPTH_STENCIL_ATTACHMENT,c=i.DEPTH24_STENCIL8):e.depth?(l=i.DEPTH_ATTACHMENT,c=i.DEPTH_COMPONENT24):(l=i.STENCIL_ATTACHMENT,c=i.STENCIL_INDEX8),i.bindRenderbuffer(i.RENDERBUFFER,s.stencil),s.msaaBuffer?i.renderbufferStorageMultisample(i.RENDERBUFFER,s.multisample,c,e.width,e.height):i.renderbufferStorage(i.RENDERBUFFER,c,e.width,e.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,l,i.RENDERBUFFER,s.stencil)}else s.stencil&&(i.deleteRenderbuffer(s.stencil),s.stencil=null)}canMultisampleFramebuffer(e){return this.renderer.context.webGLVersion!==1&&e.colorTextures.length<=1&&!e.depthTexture}detectSamples(e){const{msaaSamples:t}=this;let i=yt.NONE;if(e<=1||t===null)return i;for(let s=0;s=0&&this.managedFramebuffers.splice(n,1),e.disposeRunner.remove(this),t||(s.deleteFramebuffer(i.framebuffer),i.msaaBuffer&&s.deleteRenderbuffer(i.msaaBuffer),i.stencil&&s.deleteRenderbuffer(i.stencil)),i.blitFramebuffer&&this.disposeFramebuffer(i.blitFramebuffer,t)}disposeAll(e){const t=this.managedFramebuffers;this.managedFramebuffers=[];for(let i=0;ii.createVertexArrayOES(),e.bindVertexArray=s=>i.bindVertexArrayOES(s),e.deleteVertexArray=s=>i.deleteVertexArrayOES(s)):(this.hasVao=!1,e.createVertexArray=()=>null,e.bindVertexArray=()=>null,e.deleteVertexArray=()=>null)}if(t.webGLVersion!==2){const i=e.getExtension("ANGLE_instanced_arrays");i?(e.vertexAttribDivisor=(s,n)=>i.vertexAttribDivisorANGLE(s,n),e.drawElementsInstanced=(s,n,a,o,l)=>i.drawElementsInstancedANGLE(s,n,a,o,l),e.drawArraysInstanced=(s,n,a,o)=>i.drawArraysInstancedANGLE(s,n,a,o)):this.hasInstance=!1}this.canUseUInt32ElementIndex=t.webGLVersion===2||!!t.extensions.uint32ElementIndex}bind(e,t){t=t||this.renderer.shader.shader;const{gl:i}=this;let s=e.glVertexArrayObjects[this.CONTEXT_UID],n=!1;s||(this.managedGeometries[e.id]=e,e.disposeRunner.add(this),e.glVertexArrayObjects[this.CONTEXT_UID]=s={},n=!0);const a=s[t.program.id]||this.initGeometryVao(e,t,n);this._activeGeometry=e,this._activeVao!==a&&(this._activeVao=a,this.hasVao?i.bindVertexArray(a):this.activateVao(e,t.program)),this.updateBuffers()}reset(){this.unbind()}updateBuffers(){const e=this._activeGeometry,t=this.renderer.buffer;for(let i=0;i"u"?.5:t,this.isSimple=!1}get texture(){return this._texture}set texture(e){this._texture=e,this._textureID=-1}multiplyUvs(e,t){t===void 0&&(t=e);const i=this.mapCoord;for(let s=0;s0?this.maskStack[this.maskStack.length-1]._colorMask:15;i!==t&&this.renderer.gl.colorMask((i&1)!==0,(i&2)!==0,(i&4)!==0,(i&8)!==0)}destroy(){this.renderer=null}}Em.extension={type:oe.RendererSystem,name:"mask"};ge.add(Em);class Sm{constructor(e){this.renderer=e,this.maskStack=[],this.glConst=0}getStackLength(){return this.maskStack.length}setMaskStack(e){const{gl:t}=this.renderer,i=this.getStackLength();this.maskStack=e;const s=this.getStackLength();s!==i&&(s===0?t.disable(this.glConst):(t.enable(this.glConst),this._useCurrent()))}_useCurrent(){}destroy(){this.renderer=null,this.maskStack=null}}const qu=new tt,Ku=[],Cm=class bo extends Sm{constructor(e){super(e),this.glConst=ue.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST}getStackLength(){const e=this.maskStack[this.maskStack.length-1];return e?e._scissorCounter:0}calcScissorRect(e){if(e._scissorRectLocal)return;const t=e._scissorRect,{maskObject:i}=e,{renderer:s}=this,n=s.renderTexture,a=i.getBounds(!0,Ku.pop()??new ke);this.roundFrameToPixels(a,n.current?n.current.resolution:s.resolution,n.sourceFrame,n.destinationFrame,s.projection.transform),t&&a.fit(t),e._scissorRectLocal=a}static isMatrixRotated(e){if(!e)return!1;const{a:t,b:i,c:s,d:n}=e;return(Math.abs(i)>1e-4||Math.abs(s)>1e-4)&&(Math.abs(t)>1e-4||Math.abs(n)>1e-4)}testScissor(e){const{maskObject:t}=e;if(!t.isFastRect||!t.isFastRect()||bo.isMatrixRotated(t.worldTransform)||bo.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(e);const i=e._scissorRectLocal;return i.width>0&&i.height>0}roundFrameToPixels(e,t,i,s,n){bo.isMatrixRotated(n)||(n=n?qu.copyFrom(n):qu.identity(),n.translate(-i.x,-i.y).scale(s.width/i.width,s.height/i.height).translate(s.x,s.y),this.renderer.filter.transformAABB(n,e),e.fit(s),e.x=Math.round(e.x*t),e.y=Math.round(e.y*t),e.width=Math.round(e.width*t),e.height=Math.round(e.height*t))}push(e){e._scissorRectLocal||this.calcScissorRect(e);const{gl:t}=this.renderer;e._scissorRect||t.enable(t.SCISSOR_TEST),e._scissorCounter++,e._scissorRect=e._scissorRectLocal,this._useCurrent()}pop(e){const{gl:t}=this.renderer;e&&Ku.push(e._scissorRectLocal),this.getStackLength()>0?this._useCurrent():t.disable(t.SCISSOR_TEST)}_useCurrent(){const e=this.maskStack[this.maskStack.length-1]._scissorRect;let t;this.renderer.renderTexture.current?t=e.y:t=this.renderer.height-e.height-e.y,this.renderer.gl.scissor(e.x,t,e.width,e.height)}};Cm.extension={type:oe.RendererSystem,name:"scissor"};let Uw=Cm;ge.add(Uw);class Mm extends Sm{constructor(e){super(e),this.glConst=ue.ADAPTER.getWebGLRenderingContext().STENCIL_TEST}getStackLength(){const e=this.maskStack[this.maskStack.length-1];return e?e._stencilCounter:0}push(e){const t=e.maskObject,{gl:i}=this.renderer,s=e._stencilCounter;s===0&&(this.renderer.framebuffer.forceStencil(),i.clearStencil(0),i.clear(i.STENCIL_BUFFER_BIT),i.enable(i.STENCIL_TEST)),e._stencilCounter++;const n=e._colorMask;n!==0&&(e._colorMask=0,i.colorMask(!1,!1,!1,!1)),i.stencilFunc(i.EQUAL,s,4294967295),i.stencilOp(i.KEEP,i.KEEP,i.INCR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,n!==0&&(e._colorMask=n,i.colorMask((n&1)!==0,(n&2)!==0,(n&4)!==0,(n&8)!==0)),this._useCurrent()}pop(e){const t=this.renderer.gl;if(this.getStackLength()===0)t.disable(t.STENCIL_TEST);else{const i=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null,s=i?i._colorMask:15;s!==0&&(i._colorMask=0,t.colorMask(!1,!1,!1,!1)),t.stencilOp(t.KEEP,t.KEEP,t.DECR),e.renderable=!0,e.render(this.renderer),this.renderer.batch.flush(),e.renderable=!1,s!==0&&(i._colorMask=s,t.colorMask((s&1)!==0,(s&2)!==0,(s&4)!==0,(s&8)!==0)),this._useCurrent()}}_useCurrent(){const e=this.renderer.gl;e.stencilFunc(e.EQUAL,this.getStackLength(),4294967295),e.stencilOp(e.KEEP,e.KEEP,e.KEEP)}}Mm.extension={type:oe.RendererSystem,name:"stencil"};ge.add(Mm);class km{constructor(e){this.renderer=e,this.plugins={},Object.defineProperties(this.plugins,{extract:{enumerable:!1,get(){return He("7.0.0","renderer.plugins.extract has moved to renderer.extract"),e.extract}},prepare:{enumerable:!1,get(){return He("7.0.0","renderer.plugins.prepare has moved to renderer.prepare"),e.prepare}},interaction:{enumerable:!1,get(){return He("7.0.0","renderer.plugins.interaction has been deprecated, use renderer.events"),e.events}}})}init(){const e=this.rendererPlugins;for(const t in e)this.plugins[t]=new e[t](this.renderer)}destroy(){for(const e in this.plugins)this.plugins[e].destroy(),this.plugins[e]=null}}km.extension={type:[oe.RendererSystem,oe.CanvasRendererSystem],name:"_plugin"};ge.add(km);class Im{constructor(e){this.renderer=e,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new tt,this.transform=null}update(e,t,i,s){this.destinationFrame=e||this.destinationFrame||this.defaultFrame,this.sourceFrame=t||this.sourceFrame||e,this.calculateProjection(this.destinationFrame,this.sourceFrame,i,s),this.transform&&this.projectionMatrix.append(this.transform);const n=this.renderer;n.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,n.globalUniforms.update(),n.shader.shader&&n.shader.syncUniformGroup(n.shader.shader.uniforms.globals)}calculateProjection(e,t,i,s){const n=this.projectionMatrix,a=s?-1:1;n.identity(),n.a=1/t.width*2,n.d=a*(1/t.height*2),n.tx=-1-t.x*n.a,n.ty=-a-t.y*n.d}setTransform(e){}destroy(){this.renderer=null}}Im.extension={type:oe.RendererSystem,name:"projection"};ge.add(Im);const Hw=new sd,Zu=new ke;class Pm{constructor(e){this.renderer=e,this._tempMatrix=new tt}generateTexture(e,t){const{region:i,...s}=t||{},n=i?.copyTo(Zu)||e.getLocalBounds(Zu,!0),a=s.resolution||this.renderer.resolution;n.width=Math.max(n.width,1/a),n.height=Math.max(n.height,1/a),s.width=n.width,s.height=n.height,s.resolution=a,s.multisample??(s.multisample=this.renderer.multisample);const o=Ft.create(s);this._tempMatrix.tx=-n.x,this._tempMatrix.ty=-n.y;const l=e.transform;return e.transform=Hw,this.renderer.render(e,{renderTexture:o,transform:this._tempMatrix,skipUpdateTransform:!!e.parent,blit:!0}),e.transform=l,o}destroy(){}}Pm.extension={type:[oe.RendererSystem,oe.CanvasRendererSystem],name:"textureGenerator"};ge.add(Pm);const Jr=new ke,Rn=new ke;class Bm{constructor(e){this.renderer=e,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new ke,this.destinationFrame=new ke,this.viewportFrame=new ke}contextChange(){const e=this.renderer?.gl.getContextAttributes();this._rendererPremultipliedAlpha=!!(e&&e.alpha&&e.premultipliedAlpha)}bind(e=null,t,i){const s=this.renderer;this.current=e;let n,a,o;e?(n=e.baseTexture,o=n.resolution,t||(Jr.width=e.frame.width,Jr.height=e.frame.height,t=Jr),i||(Rn.x=e.frame.x,Rn.y=e.frame.y,Rn.width=t.width,Rn.height=t.height,i=Rn),a=n.framebuffer):(o=s.resolution,t||(Jr.width=s._view.screen.width,Jr.height=s._view.screen.height,t=Jr),i||(i=Jr,i.width=t.width,i.height=t.height));const l=this.viewportFrame;l.x=i.x*o,l.y=i.y*o,l.width=i.width*o,l.height=i.height*o,e||(l.y=s.view.height-(l.y+l.height)),l.ceil(),this.renderer.framebuffer.bind(a,l),this.renderer.projection.update(i,t,o,!a),e?this.renderer.mask.setMaskStack(n.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(t),this.destinationFrame.copyFrom(i)}clear(e,t){const i=this.current?this.current.baseTexture.clear:this.renderer.background.backgroundColor,s=B.shared.setValue(e||i);(this.current&&this.current.baseTexture.alphaMode>0||!this.current&&this._rendererPremultipliedAlpha)&&s.premultiply(s.alpha);const n=this.destinationFrame,a=this.current?this.current.baseTexture:this.renderer._view.screen,o=n.width!==a.width||n.height!==a.height;if(o){let{x:l,y:c,width:u,height:h}=this.viewportFrame;l=Math.round(l),c=Math.round(c),u=Math.round(u),h=Math.round(h),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(l,c,u,h)}this.renderer.framebuffer.clear(s.red,s.green,s.blue,s.alpha,t),o&&this.renderer.scissor.pop()}resize(){this.bind(null)}reset(){this.bind(null)}destroy(){this.renderer=null}}Bm.extension={type:oe.RendererSystem,name:"renderTexture"};ge.add(Bm);class Gw{constructor(e,t){this.program=e,this.uniformData=t,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}destroy(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null}}function Vw(r,e){const t={},i=e.getProgramParameter(r,e.ACTIVE_ATTRIBUTES);for(let s=0;sl>c?1:-1);for(let l=0;l({data:n,offset:0,dataLen:0,dirty:0}));let t=0,i=0,s=0;for(let n=0;n1&&(t=Math.max(t,16)*a.data.size),a.dataLen=t,i%t!==0&&i<16){const o=i%t%16;i+=o,s+=o}i+t>16?(s=Math.ceil(s/16)*16,a.offset=s,s+=t,i=t):(a.offset=s,i+=t,s+=t)}return s=Math.ceil(s/16)*16,{uboElements:e,size:s}}function Yw(r,e){const t=[];for(const i in r)e[i]&&t.push(e[i]);return t.sort((i,s)=>i.index-s.index),t}function qw(r,e){if(!r.autoManage)return{size:0,syncFunc:jw};const t=Yw(r.uniforms,e),{uboElements:i,size:s}=Xw(t),n=[` - var v = null; - var v2 = null; - var cv = null; - var t = 0; - var gl = renderer.gl - var index = 0; - var data = buffer.data; - `];for(let a=0;a1){const h=fm(o.data.type),d=Math.max(Rm[o.data.type]/16,1),p=h/d,f=(4-p%4)%4;n.push(` - cv = ud.${c}.value; - v = uv.${c}; - offset = ${o.offset/4}; - - t = 0; - - for(var i=0; i < ${o.data.size*d}; i++) - { - for(var j = 0; j < ${p}; j++) - { - data[offset++] = v[t++]; - } - offset += ${f}; - } - - `)}else{const h=$w[o.data.type];n.push(` - cv = ud.${c}.value; - v = uv.${c}; - offset = ${o.offset/4}; - ${h}; - `)}}return n.push(` - renderer.buffer.update(buffer); - `),{size:s,syncFunc:new Function("ud","uv","renderer","syncData","buffer",n.join(` -`))}}let Kw=0;const za={textureCount:0,uboCount:0};class Lm{constructor(e){this.destroyed=!1,this.renderer=e,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=Kw++}systemCheck(){if(!_w())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(e){this.gl=e,this.reset()}bind(e,t){e.disposeRunner.add(this),e.uniforms.globals=this.renderer.globalUniforms;const i=e.program,s=i.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(e);return this.shader=e,this.program!==i&&(this.program=i,this.gl.useProgram(s.program)),t||(za.textureCount=0,za.uboCount=0,this.syncUniformGroup(e.uniformGroup,za)),s}setUniforms(e){const t=this.shader.program,i=t.glPrograms[this.renderer.CONTEXT_UID];t.syncUniforms(i.uniformData,e,this.renderer)}syncUniformGroup(e,t){const i=this.getGlProgram();(!e.static||e.dirtyId!==i.uniformDirtyGroups[e.id])&&(i.uniformDirtyGroups[e.id]=e.dirtyId,this.syncUniforms(e,i,t))}syncUniforms(e,t,i){(e.syncUniforms[this.shader.program.id]||this.createSyncGroups(e))(t.uniformData,e.uniforms,this.renderer,i)}createSyncGroups(e){const t=this.getSignature(e,this.shader.program.uniformData,"u");return this.cache[t]||(this.cache[t]=gw(e,this.shader.program.uniformData)),e.syncUniforms[this.shader.program.id]=this.cache[t],e.syncUniforms[this.shader.program.id]}syncUniformBufferGroup(e,t){const i=this.getGlProgram();if(!e.static||e.dirtyId!==0||!i.uniformGroups[e.id]){e.dirtyId=0;const s=i.uniformGroups[e.id]||this.createSyncBufferGroup(e,i,t);e.buffer.update(),s(i.uniformData,e.uniforms,this.renderer,za,e.buffer)}this.renderer.buffer.bindBufferBase(e.buffer,i.uniformBufferBindings[t])}createSyncBufferGroup(e,t,i){const{gl:s}=this.renderer;this.renderer.buffer.bind(e.buffer);const n=this.gl.getUniformBlockIndex(t.program,i);t.uniformBufferBindings[i]=this.shader.uniformBindCount,s.uniformBlockBinding(t.program,n,this.shader.uniformBindCount),this.shader.uniformBindCount++;const a=this.getSignature(e,this.shader.program.uniformData,"ubo");let o=this._uboCache[a];if(o||(o=this._uboCache[a]=qw(e,this.shader.program.uniformData)),e.autoManage){const l=new Float32Array(o.size/4);e.buffer.update(l)}return t.uniformGroups[e.id]=o.syncFunc,t.uniformGroups[e.id]}getSignature(e,t,i){const s=e.uniforms,n=[`${i}-`];for(const a in s)n.push(a),t[a]&&n.push(t[a].type);return n.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(e){const t=this.gl,i=e.program,s=zw(t,i);return i.glPrograms[this.renderer.CONTEXT_UID]=s,s}reset(){this.program=null,this.shader=null}disposeShader(e){this.shader===e&&(this.shader=null)}destroy(){this.renderer=null,this.destroyed=!0}}Lm.extension={type:oe.RendererSystem,name:"shader"};ge.add(Lm);class No{constructor(e){this.renderer=e}run(e){const{renderer:t}=this;t.runners.init.emit(t.options),e.hello&&console.log(`PixiJS 7.4.2 - ${t.rendererLogId} - https://pixijs.com`),t.resize(t.screen.width,t.screen.height)}destroy(){}}No.defaultOptions={hello:!1},No.extension={type:[oe.RendererSystem,oe.CanvasRendererSystem],name:"startup"};ge.add(No);function Zw(r,e=[]){return e[Me.NORMAL]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[Me.ADD]=[r.ONE,r.ONE],e[Me.MULTIPLY]=[r.DST_COLOR,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA],e[Me.SCREEN]=[r.ONE,r.ONE_MINUS_SRC_COLOR,r.ONE,r.ONE_MINUS_SRC_ALPHA],e[Me.OVERLAY]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[Me.DARKEN]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[Me.LIGHTEN]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[Me.CO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.FUNC_ADD],e}const Jw=0,Qw=1,e_=2,t_=3,i_=4,r_=5,Dm=class hc{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=Me.NONE,this._blendEq=!1,this.map=[],this.map[Jw]=this.setBlend,this.map[Qw]=this.setOffset,this.map[e_]=this.setCullFace,this.map[t_]=this.setDepthTest,this.map[i_]=this.setFrontFace,this.map[r_]=this.setDepthMask,this.checks=[],this.defaultState=new ir,this.defaultState.blend=!0}contextChange(e){this.gl=e,this.blendModes=Zw(e),this.set(this.defaultState),this.reset()}set(e){if(e=e||this.defaultState,this.stateId!==e.data){let t=this.stateId^e.data,i=0;for(;t;)t&1&&this.map[i].call(this,!!(e.data&1<>1,i++;this.stateId=e.data}for(let t=0;te.systems[s]),i=[...t,...Object.keys(e.systems).filter(s=>!t.includes(s))];for(const s of i)this.addSystem(e.systems[s],s)}addRunners(...e){e.forEach(t=>{this.runners[t]=new Ci(t)})}addSystem(e,t){const i=new e(this);if(this[t])throw new Error(`Whoops! The name "${t}" is already in use`);this[t]=i,this._systemsHash[t]=i;for(const s in this.runners)this.runners[s].add(i);return this}emitWithCustomOptions(e,t){const i=Object.keys(this._systemsHash);e.items.forEach(s=>{const n=i.find(a=>this._systemsHash[a]===s);s[e.name](t[n])})}destroy(){Object.values(this.runners).forEach(e=>{e.destroy()}),this._systemsHash={}}}const Gn=class wo{constructor(e){this.renderer=e,this.count=0,this.checkCount=0,this.maxIdle=wo.defaultMaxIdle,this.checkCountMax=wo.defaultCheckCountMax,this.mode=wo.defaultMode}postrender(){this.renderer.objectRenderer.renderingToScreen&&(this.count++,this.mode!==qc.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))}run(){const e=this.renderer.texture,t=e.managedTextures;let i=!1;for(let s=0;sthis.maxIdle&&(e.destroyTexture(n,!0),t[s]=null,i=!0)}if(i){let s=0;for(let n=0;n=0;s--)this.unload(e.children[s])}destroy(){this.renderer=null}};Gn.defaultMode=qc.AUTO,Gn.defaultMaxIdle=60*60,Gn.defaultCheckCountMax=60*10,Gn.extension={type:oe.RendererSystem,name:"textureGC"};let ns=Gn;ge.add(ns);class rh{constructor(e){this.texture=e,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=xe.UNSIGNED_BYTE,this.internalFormat=se.RGBA,this.samplerType=0}}function a_(r){let e;return"WebGL2RenderingContext"in globalThis&&r instanceof globalThis.WebGL2RenderingContext?e={[r.RGB]:de.FLOAT,[r.RGBA]:de.FLOAT,[r.ALPHA]:de.FLOAT,[r.LUMINANCE]:de.FLOAT,[r.LUMINANCE_ALPHA]:de.FLOAT,[r.R8]:de.FLOAT,[r.R8_SNORM]:de.FLOAT,[r.RG8]:de.FLOAT,[r.RG8_SNORM]:de.FLOAT,[r.RGB8]:de.FLOAT,[r.RGB8_SNORM]:de.FLOAT,[r.RGB565]:de.FLOAT,[r.RGBA4]:de.FLOAT,[r.RGB5_A1]:de.FLOAT,[r.RGBA8]:de.FLOAT,[r.RGBA8_SNORM]:de.FLOAT,[r.RGB10_A2]:de.FLOAT,[r.RGB10_A2UI]:de.FLOAT,[r.SRGB8]:de.FLOAT,[r.SRGB8_ALPHA8]:de.FLOAT,[r.R16F]:de.FLOAT,[r.RG16F]:de.FLOAT,[r.RGB16F]:de.FLOAT,[r.RGBA16F]:de.FLOAT,[r.R32F]:de.FLOAT,[r.RG32F]:de.FLOAT,[r.RGB32F]:de.FLOAT,[r.RGBA32F]:de.FLOAT,[r.R11F_G11F_B10F]:de.FLOAT,[r.RGB9_E5]:de.FLOAT,[r.R8I]:de.INT,[r.R8UI]:de.UINT,[r.R16I]:de.INT,[r.R16UI]:de.UINT,[r.R32I]:de.INT,[r.R32UI]:de.UINT,[r.RG8I]:de.INT,[r.RG8UI]:de.UINT,[r.RG16I]:de.INT,[r.RG16UI]:de.UINT,[r.RG32I]:de.INT,[r.RG32UI]:de.UINT,[r.RGB8I]:de.INT,[r.RGB8UI]:de.UINT,[r.RGB16I]:de.INT,[r.RGB16UI]:de.UINT,[r.RGB32I]:de.INT,[r.RGB32UI]:de.UINT,[r.RGBA8I]:de.INT,[r.RGBA8UI]:de.UINT,[r.RGBA16I]:de.INT,[r.RGBA16UI]:de.UINT,[r.RGBA32I]:de.INT,[r.RGBA32UI]:de.UINT,[r.DEPTH_COMPONENT16]:de.FLOAT,[r.DEPTH_COMPONENT24]:de.FLOAT,[r.DEPTH_COMPONENT32F]:de.FLOAT,[r.DEPTH_STENCIL]:de.FLOAT,[r.DEPTH24_STENCIL8]:de.FLOAT,[r.DEPTH32F_STENCIL8]:de.FLOAT}:e={[r.RGB]:de.FLOAT,[r.RGBA]:de.FLOAT,[r.ALPHA]:de.FLOAT,[r.LUMINANCE]:de.FLOAT,[r.LUMINANCE_ALPHA]:de.FLOAT,[r.DEPTH_STENCIL]:de.FLOAT},e}function o_(r){let e;return"WebGL2RenderingContext"in globalThis&&r instanceof globalThis.WebGL2RenderingContext?e={[xe.UNSIGNED_BYTE]:{[se.RGBA]:r.RGBA8,[se.RGB]:r.RGB8,[se.RG]:r.RG8,[se.RED]:r.R8,[se.RGBA_INTEGER]:r.RGBA8UI,[se.RGB_INTEGER]:r.RGB8UI,[se.RG_INTEGER]:r.RG8UI,[se.RED_INTEGER]:r.R8UI,[se.ALPHA]:r.ALPHA,[se.LUMINANCE]:r.LUMINANCE,[se.LUMINANCE_ALPHA]:r.LUMINANCE_ALPHA},[xe.BYTE]:{[se.RGBA]:r.RGBA8_SNORM,[se.RGB]:r.RGB8_SNORM,[se.RG]:r.RG8_SNORM,[se.RED]:r.R8_SNORM,[se.RGBA_INTEGER]:r.RGBA8I,[se.RGB_INTEGER]:r.RGB8I,[se.RG_INTEGER]:r.RG8I,[se.RED_INTEGER]:r.R8I},[xe.UNSIGNED_SHORT]:{[se.RGBA_INTEGER]:r.RGBA16UI,[se.RGB_INTEGER]:r.RGB16UI,[se.RG_INTEGER]:r.RG16UI,[se.RED_INTEGER]:r.R16UI,[se.DEPTH_COMPONENT]:r.DEPTH_COMPONENT16},[xe.SHORT]:{[se.RGBA_INTEGER]:r.RGBA16I,[se.RGB_INTEGER]:r.RGB16I,[se.RG_INTEGER]:r.RG16I,[se.RED_INTEGER]:r.R16I},[xe.UNSIGNED_INT]:{[se.RGBA_INTEGER]:r.RGBA32UI,[se.RGB_INTEGER]:r.RGB32UI,[se.RG_INTEGER]:r.RG32UI,[se.RED_INTEGER]:r.R32UI,[se.DEPTH_COMPONENT]:r.DEPTH_COMPONENT24},[xe.INT]:{[se.RGBA_INTEGER]:r.RGBA32I,[se.RGB_INTEGER]:r.RGB32I,[se.RG_INTEGER]:r.RG32I,[se.RED_INTEGER]:r.R32I},[xe.FLOAT]:{[se.RGBA]:r.RGBA32F,[se.RGB]:r.RGB32F,[se.RG]:r.RG32F,[se.RED]:r.R32F,[se.DEPTH_COMPONENT]:r.DEPTH_COMPONENT32F},[xe.HALF_FLOAT]:{[se.RGBA]:r.RGBA16F,[se.RGB]:r.RGB16F,[se.RG]:r.RG16F,[se.RED]:r.R16F},[xe.UNSIGNED_SHORT_5_6_5]:{[se.RGB]:r.RGB565},[xe.UNSIGNED_SHORT_4_4_4_4]:{[se.RGBA]:r.RGBA4},[xe.UNSIGNED_SHORT_5_5_5_1]:{[se.RGBA]:r.RGB5_A1},[xe.UNSIGNED_INT_2_10_10_10_REV]:{[se.RGBA]:r.RGB10_A2,[se.RGBA_INTEGER]:r.RGB10_A2UI},[xe.UNSIGNED_INT_10F_11F_11F_REV]:{[se.RGB]:r.R11F_G11F_B10F},[xe.UNSIGNED_INT_5_9_9_9_REV]:{[se.RGB]:r.RGB9_E5},[xe.UNSIGNED_INT_24_8]:{[se.DEPTH_STENCIL]:r.DEPTH24_STENCIL8},[xe.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[se.DEPTH_STENCIL]:r.DEPTH32F_STENCIL8}}:e={[xe.UNSIGNED_BYTE]:{[se.RGBA]:r.RGBA,[se.RGB]:r.RGB,[se.ALPHA]:r.ALPHA,[se.LUMINANCE]:r.LUMINANCE,[se.LUMINANCE_ALPHA]:r.LUMINANCE_ALPHA},[xe.UNSIGNED_SHORT_5_6_5]:{[se.RGB]:r.RGB},[xe.UNSIGNED_SHORT_4_4_4_4]:{[se.RGBA]:r.RGBA},[xe.UNSIGNED_SHORT_5_5_5_1]:{[se.RGBA]:r.RGBA}},e}class Om{constructor(e){this.renderer=e,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new Be,this.hasIntegerTextures=!1}contextChange(){const e=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=o_(e),this.samplerTypes=a_(e);const t=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=t;for(let s=0;s=0;--n){const a=t[n];a&&a._glTextures[s].samplerType!==de.FLOAT&&this.renderer.texture.unbind(a)}}initTexture(e){const t=new rh(this.gl.createTexture());return t.dirtyId=-1,e._glTextures[this.CONTEXT_UID]=t,this.managedTextures.push(e),e.on("dispose",this.destroyTexture,this),t}initTextureType(e,t){t.internalFormat=this.internalFormats[e.type]?.[e.format]??e.format,t.samplerType=this.samplerTypes[t.internalFormat]??de.FLOAT,this.webGLVersion===2&&e.type===xe.HALF_FLOAT?t.type=this.gl.HALF_FLOAT:t.type=e.type}updateTexture(e){const t=e._glTextures[this.CONTEXT_UID];if(!t)return;const i=this.renderer;if(this.initTextureType(e,t),e.resource?.upload(i,e,t))t.samplerType!==de.FLOAT&&(this.hasIntegerTextures=!0);else{const s=e.realWidth,n=e.realHeight,a=i.gl;(t.width!==s||t.height!==n||t.dirtyId<0)&&(t.width=s,t.height=n,a.texImage2D(e.target,0,t.internalFormat,s,n,0,e.format,t.type,null))}e.dirtyStyleId!==t.dirtyStyleId&&this.updateTextureStyle(e),t.dirtyId=e.dirtyId}destroyTexture(e,t){const{gl:i}=this;if(e=e.castToBaseTexture(),e._glTextures[this.CONTEXT_UID]&&(this.unbind(e),i.deleteTexture(e._glTextures[this.CONTEXT_UID].texture),e.off("dispose",this.destroyTexture,this),delete e._glTextures[this.CONTEXT_UID],!t)){const s=this.managedTextures.indexOf(e);s!==-1&&sn(this.managedTextures,s,1)}}updateTextureStyle(e){const t=e._glTextures[this.CONTEXT_UID];t&&((e.mipmap===er.POW2||this.webGLVersion!==2)&&!e.isPowerOfTwo?t.mipmap=!1:t.mipmap=e.mipmap>=1,this.webGLVersion!==2&&!e.isPowerOfTwo?t.wrapMode=Gr.CLAMP:t.wrapMode=e.wrapMode,e.resource?.style(this.renderer,e,t)||this.setStyle(e,t),t.dirtyStyleId=e.dirtyStyleId)}setStyle(e,t){const i=this.gl;if(t.mipmap&&e.mipmap!==er.ON_MANUAL&&i.generateMipmap(e.target),i.texParameteri(e.target,i.TEXTURE_WRAP_S,t.wrapMode),i.texParameteri(e.target,i.TEXTURE_WRAP_T,t.wrapMode),t.mipmap){i.texParameteri(e.target,i.TEXTURE_MIN_FILTER,e.scaleMode===hr.LINEAR?i.LINEAR_MIPMAP_LINEAR:i.NEAREST_MIPMAP_NEAREST);const s=this.renderer.context.extensions.anisotropicFiltering;if(s&&e.anisotropicLevel>0&&e.scaleMode===hr.LINEAR){const n=Math.min(e.anisotropicLevel,i.getParameter(s.MAX_TEXTURE_MAX_ANISOTROPY_EXT));i.texParameterf(e.target,s.TEXTURE_MAX_ANISOTROPY_EXT,n)}}else i.texParameteri(e.target,i.TEXTURE_MIN_FILTER,e.scaleMode===hr.LINEAR?i.LINEAR:i.NEAREST);i.texParameteri(e.target,i.TEXTURE_MAG_FILTER,e.scaleMode===hr.LINEAR?i.LINEAR:i.NEAREST)}destroy(){this.renderer=null}}Om.extension={type:oe.RendererSystem,name:"texture"};ge.add(Om);class Fm{constructor(e){this.renderer=e}contextChange(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(e){const{gl:t,CONTEXT_UID:i}=this,s=e._glTransformFeedbacks[i]||this.createGLTransformFeedback(e);t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,s)}unbind(){const{gl:e}=this;e.bindTransformFeedback(e.TRANSFORM_FEEDBACK,null)}beginTransformFeedback(e,t){const{gl:i,renderer:s}=this;t&&s.shader.bind(t),i.beginTransformFeedback(e)}endTransformFeedback(){const{gl:e}=this;e.endTransformFeedback()}createGLTransformFeedback(e){const{gl:t,renderer:i,CONTEXT_UID:s}=this,n=t.createTransformFeedback();e._glTransformFeedbacks[s]=n,t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,n);for(let a=0;a(r[r.INTERACTION=50]="INTERACTION",r[r.HIGH=25]="HIGH",r[r.NORMAL=0]="NORMAL",r[r.LOW=-25]="LOW",r[r.UTILITY=-50]="UTILITY",r))(Wr||{});class sh{constructor(e,t=null,i=0,s=!1){this.next=null,this.previous=null,this._destroyed=!1,this.fn=e,this.context=t,this.priority=i,this.once=s}match(e,t=null){return this.fn===e&&this.context===t}emit(e){this.fn&&(this.context?this.fn.call(this.context,e):this.fn(e));const t=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),t}connect(e){this.previous=e,e.next&&(e.next.previous=this),this.next=e.next,e.next=this}destroy(e=!1){this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);const t=this.next;return this.next=e?null:t,this.previous=null,t}}const Nm=class Kt{constructor(){this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new sh(null,null,1/0),this.deltaMS=1/Kt.targetFPMS,this.elapsedMS=1/Kt.targetFPMS,this._tick=e=>{this._requestId=null,this.started&&(this.update(e),this.started&&this._requestId===null&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(e,t,i=Wr.NORMAL){return this._addListener(new sh(e,t,i))}addOnce(e,t,i=Wr.NORMAL){return this._addListener(new sh(e,t,i,!0))}_addListener(e){let t=this._head.next,i=this._head;if(!t)e.connect(i);else{for(;t;){if(e.priority>t.priority){e.connect(i);break}i=t,t=t.next}e.previous||e.connect(i)}return this._startIfPossible(),this}remove(e,t){let i=this._head.next;for(;i;)i.match(e,t)?i=i.destroy():i=i.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let e=0,t=this._head;for(;t=t.next;)e++;return e}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let e=this._head.next;for(;e;)e=e.destroy(!0);this._head.destroy(),this._head=null}}update(e=performance.now()){let t;if(e>this.lastTime){if(t=this.elapsedMS=e-this.lastTime,t>this._maxElapsedMS&&(t=this._maxElapsedMS),t*=this.speed,this._minElapsedMS){const n=e-this._lastFrame|0;if(n{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=e.sharedTicker?At.shared:new At,e.autoStart&&this.start()}static destroy(){if(this._ticker){const e=this._ticker;this.ticker=null,e.destroy()}}}Um.extension=oe.Application;ge.add(Um);const Hm=[];ge.handleByList(oe.Renderer,Hm);function l_(r){for(const e of Hm)if(e.test(r))return new e(r);throw new Error("Unable to auto-detect a suitable renderer.")}var h_=`attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; -}`,c_=`attribute vec2 aVertexPosition; - -uniform mat3 projectionMatrix; - -varying vec2 vTextureCoord; - -uniform vec4 inputSize; -uniform vec4 outputFrame; - -vec4 filterVertexPosition( void ) -{ - vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy; - - return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0); -} - -vec2 filterTextureCoord( void ) -{ - return aVertexPosition * (outputFrame.zw * inputSize.zw); -} - -void main(void) -{ - gl_Position = filterVertexPosition(); - vTextureCoord = filterTextureCoord(); -} -`;const d_=h_,Gm=c_;class Vm{constructor(e){this.renderer=e}contextChange(e){let t;if(this.renderer.context.webGLVersion===1){const i=e.getParameter(e.FRAMEBUFFER_BINDING);e.bindFramebuffer(e.FRAMEBUFFER,null),t=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.FRAMEBUFFER,i)}else{const i=e.getParameter(e.DRAW_FRAMEBUFFER_BINDING);e.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),t=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.DRAW_FRAMEBUFFER,i)}t>=yt.HIGH?this.multisample=yt.HIGH:t>=yt.MEDIUM?this.multisample=yt.MEDIUM:t>=yt.LOW?this.multisample=yt.LOW:this.multisample=yt.NONE}destroy(){}}Vm.extension={type:oe.RendererSystem,name:"_multisample"};ge.add(Vm);class u_{constructor(e){this.buffer=e||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class Wm{constructor(e){this.renderer=e,this.managedBuffers={},this.boundBufferBases={}}destroy(){this.renderer=null}contextChange(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(e){const{gl:t,CONTEXT_UID:i}=this,s=e._glBuffers[i]||this.createGLBuffer(e);t.bindBuffer(e.type,s.buffer)}unbind(e){const{gl:t}=this;t.bindBuffer(e,null)}bindBufferBase(e,t){const{gl:i,CONTEXT_UID:s}=this;if(this.boundBufferBases[t]!==e){const n=e._glBuffers[s]||this.createGLBuffer(e);this.boundBufferBases[t]=e,i.bindBufferBase(i.UNIFORM_BUFFER,t,n.buffer)}}bindBufferRange(e,t,i){const{gl:s,CONTEXT_UID:n}=this;i=i||0;const a=e._glBuffers[n]||this.createGLBuffer(e);s.bindBufferRange(s.UNIFORM_BUFFER,t||0,a.buffer,i*256,256)}update(e){const{gl:t,CONTEXT_UID:i}=this,s=e._glBuffers[i]||this.createGLBuffer(e);if(e._updateID!==s.updateID)if(s.updateID=e._updateID,t.bindBuffer(e.type,s.buffer),s.byteLength>=e.data.byteLength)t.bufferSubData(e.type,0,e.data);else{const n=e.static?t.STATIC_DRAW:t.DYNAMIC_DRAW;s.byteLength=e.data.byteLength,t.bufferData(e.type,e.data,n)}}dispose(e,t){if(!this.managedBuffers[e.id])return;delete this.managedBuffers[e.id];const i=e._glBuffers[this.CONTEXT_UID],s=this.gl;e.disposeRunner.remove(this),i&&(t||s.deleteBuffer(i.buffer),delete e._glBuffers[this.CONTEXT_UID])}disposeAll(e){const t=Object.keys(this.managedBuffers);for(let i=0;it.resource).filter(t=>t).map(t=>t.load());return this._load=Promise.all(e).then(()=>{const{realWidth:t,realHeight:i}=this.items[0];return this.resize(t,i),this.update(),Promise.resolve(this)}),this._load}}class p_ extends jm{constructor(e,t){const{width:i,height:s}=t||{};let n,a;Array.isArray(e)?(n=e,a=e.length):a=e,super(a,{width:i,height:s}),n&&this.initFromArray(n,t)}addBaseTextureAt(e,t){if(e.resource)this.addResourceAt(e.resource,t);else throw new Error("ArrayResource does not support RenderTexture");return this}bind(e){super.bind(e),e.target=en.TEXTURE_2D_ARRAY}upload(e,t,i){const{length:s,itemDirtyIds:n,items:a}=this,{gl:o}=e;i.dirtyId<0&&o.texImage3D(o.TEXTURE_2D_ARRAY,0,i.internalFormat,this._width,this._height,s,0,t.format,i.type,null);for(let l=0;l0)if(e.resource)this.addResourceAt(e.resource,t);else throw new Error("CubeResource does not support copying of renderTexture.");else e.target=en.TEXTURE_CUBE_MAP_POSITIVE_X+t,e.parentTextureArray=this.baseTexture,this.items[t]=e;return e.valid&&!this.valid&&this.resize(e.realWidth,e.realHeight),this.items[t]=e,this}upload(e,t,i){const s=this.itemDirtyIds;for(let n=0;n{if(this.url===null){e(this);return}try{const i=await ue.ADAPTER.fetch(this.url,{mode:this.crossOrigin?"cors":"no-cors"});if(this.destroyed)return;const s=await i.blob();if(this.destroyed)return;const n=await createImageBitmap(s,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===zt.UNPACK?"premultiply":"none"});if(this.destroyed){n.close();return}this.source=n,this.update(),e(this)}catch(i){if(this.destroyed)return;t(i),this.onError.emit(i)}}),this._load)}upload(e,t,i){return this.source instanceof ImageBitmap?(typeof this.alphaMode=="number"&&(t.alphaMode=this.alphaMode),super.upload(e,t,i)):(this.load(),!1)}dispose(){this.ownsImageBitmap&&this.source instanceof ImageBitmap&&this.source.close(),super.dispose(),this._load=null}static test(e){return!!globalThis.createImageBitmap&&typeof ImageBitmap<"u"&&(typeof e=="string"||e instanceof ImageBitmap)}static get EMPTY(){return Ks._EMPTY=Ks._EMPTY??ue.ADAPTER.createCanvas(0,0),Ks._EMPTY}}const dc=class xo extends gr{constructor(e,t){t=t||{},super(ue.ADAPTER.createCanvas()),this._width=0,this._height=0,this.svg=e,this.scale=t.scale||1,this._overrideWidth=t.width,this._overrideHeight=t.height,this._resolve=null,this._crossorigin=t.crossorigin,this._load=null,t.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(e=>{if(this._resolve=()=>{this.update(),e(this)},xo.SVG_XML.test(this.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");this.svg=`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(this.svg)))}`}this._loadSvg()}),this._load)}_loadSvg(){const e=new Image;gr.crossOrigin(e,this.svg,this._crossorigin),e.src=this.svg,e.onerror=t=>{this._resolve&&(e.onerror=null,this.onError.emit(t))},e.onload=()=>{if(!this._resolve)return;const t=e.width,i=e.height;if(!t||!i)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");let s=t*this.scale,n=i*this.scale;(this._overrideWidth||this._overrideHeight)&&(s=this._overrideWidth||this._overrideHeight/i*t,n=this._overrideHeight||this._overrideWidth/t*i),s=Math.round(s),n=Math.round(n);const a=this.source;a.width=s,a.height=n,a._pixiId=`canvas_${As()}`,a.getContext("2d").drawImage(e,0,0,t,i,0,0,s,n),this._resolve(),this._resolve=null}}static getSize(e){const t=xo.SVG_SIZE.exec(e),i={};return t&&(i[t[1]]=Math.round(parseFloat(t[3])),i[t[5]]=Math.round(parseFloat(t[7]))),i}dispose(){super.dispose(),this._resolve=null,this._crossorigin=null}static test(e,t){return t==="svg"||typeof e=="string"&&e.startsWith("data:image/svg+xml")||typeof e=="string"&&xo.SVG_XML.test(e)}};dc.SVG_XML=/^(<\?xml[^?]+\?>)?\s*()]*-->)?\s*\]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;let uc=dc;class g_ extends gr{constructor(e){super(e)}static test(e){return!!globalThis.VideoFrame&&e instanceof globalThis.VideoFrame}}const pc=class fc extends gr{constructor(e,t){if(t=t||{},!(e instanceof HTMLVideoElement)){const i=document.createElement("video");t.autoLoad!==!1&&i.setAttribute("preload","auto"),t.playsinline!==!1&&(i.setAttribute("webkit-playsinline",""),i.setAttribute("playsinline","")),t.muted===!0&&(i.setAttribute("muted",""),i.muted=!0),t.loop===!0&&i.setAttribute("loop",""),t.autoPlay!==!1&&i.setAttribute("autoplay",""),typeof e=="string"&&(e=[e]);const s=e[0].src||e[0];gr.crossOrigin(i,s,t.crossorigin);for(let n=0;n{this.valid?t(this):(this._resolve=t,this._reject=i,e.load())}),this._load}_onError(e){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(e),this._reject&&(this._reject(e),this._reject=null,this._resolve=null)}_isSourcePlaying(){const e=this.source;return!e.paused&&!e.ended}_isSourceReady(){return this.source.readyState>2}_onPlayStart(){this.valid||this._onCanPlay(),this._configureAutoUpdate()}_onPlayStop(){this._configureAutoUpdate()}_onSeeked(){this._autoUpdate&&!this._isSourcePlaying()&&(this._msToNextUpdate=0,this.update(),this._msToNextUpdate=0)}_onCanPlay(){const e=this.source;e.removeEventListener("canplay",this._onCanPlay),e.removeEventListener("canplaythrough",this._onCanPlay);const t=this.valid;this._msToNextUpdate=0,this.update(),this._msToNextUpdate=0,!t&&this._resolve&&(this._resolve(this),this._resolve=null,this._reject=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&e.play()}dispose(){this._configureAutoUpdate();const e=this.source;e&&(e.removeEventListener("play",this._onPlayStart),e.removeEventListener("pause",this._onPlayStop),e.removeEventListener("seeked",this._onSeeked),e.removeEventListener("canplay",this._onCanPlay),e.removeEventListener("canplaythrough",this._onCanPlay),e.removeEventListener("error",this._onError,!0),e.pause(),e.src="",e.load()),super.dispose()}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){e!==this._autoUpdate&&(this._autoUpdate=e,this._configureAutoUpdate())}get updateFPS(){return this._updateFPS}set updateFPS(e){e!==this._updateFPS&&(this._updateFPS=e,this._configureAutoUpdate())}_configureAutoUpdate(){this._autoUpdate&&this._isSourcePlaying()?!this._updateFPS&&this.source.requestVideoFrameCallback?(this._isConnectedToTicker&&(At.shared.remove(this.update,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0),this._videoFrameRequestCallbackHandle===null&&(this._videoFrameRequestCallbackHandle=this.source.requestVideoFrameCallback(this._videoFrameRequestCallback))):(this._videoFrameRequestCallbackHandle!==null&&(this.source.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker||(At.shared.add(this.update,this),this._isConnectedToTicker=!0,this._msToNextUpdate=0)):(this._videoFrameRequestCallbackHandle!==null&&(this.source.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker&&(At.shared.remove(this.update,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0))}static test(e,t){return globalThis.HTMLVideoElement&&e instanceof HTMLVideoElement||fc.TYPES.includes(t)}};pc.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],pc.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"};let Xm=pc;ec.push(Ks,vm,f_,Xm,g_,uc,nl,m_,p_);class Ho{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}clear(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}getRectangle(e){return this.minX>this.maxX||this.minY>this.maxY?ke.EMPTY:(e=e||new ke(0,0,1,1),e.x=this.minX,e.y=this.minY,e.width=this.maxX-this.minX,e.height=this.maxY-this.minY,e)}addPoint(e){this.minX=Math.min(this.minX,e.x),this.maxX=Math.max(this.maxX,e.x),this.minY=Math.min(this.minY,e.y),this.maxY=Math.max(this.maxY,e.y)}addPointMatrix(e,t){const{a:i,b:s,c:n,d:a,tx:o,ty:l}=e,c=i*t.x+n*t.y+o,u=s*t.x+a*t.y+l;this.minX=Math.min(this.minX,c),this.maxX=Math.max(this.maxX,c),this.minY=Math.min(this.minY,u),this.maxY=Math.max(this.maxY,u)}addQuad(e){let t=this.minX,i=this.minY,s=this.maxX,n=this.maxY,a=e[0],o=e[1];t=as?a:s,n=o>n?o:n,a=e[2],o=e[3],t=as?a:s,n=o>n?o:n,a=e[4],o=e[5],t=as?a:s,n=o>n?o:n,a=e[6],o=e[7],t=as?a:s,n=o>n?o:n,this.minX=t,this.minY=i,this.maxX=s,this.maxY=n}addFrame(e,t,i,s,n){this.addFrameMatrix(e.worldTransform,t,i,s,n)}addFrameMatrix(e,t,i,s,n){const a=e.a,o=e.b,l=e.c,c=e.d,u=e.tx,h=e.ty;let d=this.minX,p=this.minY,f=this.maxX,m=this.maxY,g=a*t+l*i+u,y=o*t+c*i+h;d=gf?g:f,m=y>m?y:m,g=a*s+l*i+u,y=o*s+c*i+h,d=gf?g:f,m=y>m?y:m,g=a*t+l*n+u,y=o*t+c*n+h,d=gf?g:f,m=y>m?y:m,g=a*s+l*n+u,y=o*s+c*n+h,d=gf?g:f,m=y>m?y:m,this.minX=d,this.minY=p,this.maxX=f,this.maxY=m}addVertexData(e,t,i){let s=this.minX,n=this.minY,a=this.maxX,o=this.maxY;for(let l=t;la?c:a,o=u>o?u:o}this.minX=s,this.minY=n,this.maxX=a,this.maxY=o}addVertices(e,t,i,s){this.addVerticesMatrix(e.worldTransform,t,i,s)}addVerticesMatrix(e,t,i,s,n=0,a=n){const o=e.a,l=e.b,c=e.c,u=e.d,h=e.tx,d=e.ty;let p=this.minX,f=this.minY,m=this.maxX,g=this.maxY;for(let y=i;ys?e.maxX:s,this.maxY=e.maxY>n?e.maxY:n}addBoundsMask(e,t){const i=e.minX>t.minX?e.minX:t.minX,s=e.minY>t.minY?e.minY:t.minY,n=e.maxXc?n:c,this.maxY=a>u?a:u}}addBoundsMatrix(e,t){this.addFrameMatrix(t,e.minX,e.minY,e.maxX,e.maxY)}addBoundsArea(e,t){const i=e.minX>t.x?e.minX:t.x,s=e.minY>t.y?e.minY:t.y,n=e.maxXc?n:c,this.maxY=a>u?a:u}}pad(e=0,t=e){this.isEmpty()||(this.minX-=e,this.maxX+=e,this.minY-=t,this.maxY+=t)}addFramePad(e,t,i,s,n,a){e-=n,t-=a,i+=n,s+=a,this.minX=this.minXi?this.maxX:i,this.minY=this.minYs?this.maxY:s}}class dt extends xn{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new sd,this.alpha=1,this.visible=!0,this.renderable=!0,this.cullable=!1,this.cullArea=null,this.parent=null,this.worldAlpha=1,this._lastSortedIndex=0,this._zIndex=0,this.filterArea=null,this.filters=null,this._enabledFilters=null,this._bounds=new Ho,this._localBounds=null,this._boundsID=0,this._boundsRect=null,this._localBoundsRect=null,this._mask=null,this._maskRefCount=0,this._destroyed=!1,this.isSprite=!1,this.isMask=!1}static mixin(e){const t=Object.keys(e);for(let i=0;i1)for(let t=0;tthis.children.length)throw new Error(`${e}addChildAt: The index ${t} supplied is out of bounds ${this.children.length}`);return e.parent&&e.parent.removeChild(e),e.parent=this,this.sortDirty=!0,e.transform._parentID=-1,this.children.splice(t,0,e),this._boundsID++,this.onChildrenChange(t),e.emit("added",this),this.emit("childAdded",e,this,t),e}swapChildren(e,t){if(e===t)return;const i=this.getChildIndex(e),s=this.getChildIndex(t);this.children[i]=t,this.children[s]=e,this.onChildrenChange(i=this.children.length)throw new Error(`The index ${t} supplied is out of bounds ${this.children.length}`);const i=this.getChildIndex(e);sn(this.children,i,1),this.children.splice(t,0,e),this.onChildrenChange(t)}getChildAt(e){if(e<0||e>=this.children.length)throw new Error(`getChildAt: Index (${e}) does not exist.`);return this.children[e]}removeChild(...e){if(e.length>1)for(let t=0;t0&&n<=s){a=this.children.splice(i,n);for(let o=0;o1&&this.children.sort(b_),this.sortDirty=!1}updateTransform(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(let e=0,t=this.children.length;e0&&t.height>0))return;let i,s;this.cullArea?(i=this.cullArea,s=this.worldTransform):this._render!==mc.prototype._render&&(i=this.getBounds(!0));const n=e.projection.transform;if(n&&(s?(s=v_.copyFrom(s),s.prepend(n)):s=n),i&&t.intersects(i,s))this._render(e);else if(this.cullArea)return;for(let a=0,o=this.children.length;a=s&&Ln.x=n&&Ln.y=t&&(a=r-o-1),l=l.replace("%value%",e[a].toString()),s+=l,s+=` -`}return i=i.replace("%blur%",s),i=i.replace("%size%",r.toString()),i}const C_=` - attribute vec2 aVertexPosition; - - uniform mat3 projectionMatrix; - - uniform float strength; - - varying vec2 vBlurTexCoords[%size%]; - - uniform vec4 inputSize; - uniform vec4 outputFrame; - - vec4 filterVertexPosition( void ) - { - vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy; - - return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0); - } - - vec2 filterTextureCoord( void ) - { - return aVertexPosition * (outputFrame.zw * inputSize.zw); - } - - void main(void) - { - gl_Position = filterVertexPosition(); - - vec2 textureCoord = filterTextureCoord(); - %blur% - }`;function M_(r,e){const t=Math.ceil(r/2);let i=C_,s="",n;e?n="vBlurTexCoords[%index%] = textureCoord + vec2(%sampleIndex% * strength, 0.0);":n="vBlurTexCoords[%index%] = textureCoord + vec2(0.0, %sampleIndex% * strength);";for(let a=0;a 0.0) { - c.rgb /= c.a; - } - - vec4 result; - - result.r = (m[0] * c.r); - result.r += (m[1] * c.g); - result.r += (m[2] * c.b); - result.r += (m[3] * c.a); - result.r += m[4]; - - result.g = (m[5] * c.r); - result.g += (m[6] * c.g); - result.g += (m[7] * c.b); - result.g += (m[8] * c.a); - result.g += m[9]; - - result.b = (m[10] * c.r); - result.b += (m[11] * c.g); - result.b += (m[12] * c.b); - result.b += (m[13] * c.a); - result.b += m[14]; - - result.a = (m[15] * c.r); - result.a += (m[16] * c.g); - result.a += (m[17] * c.b); - result.a += (m[18] * c.a); - result.a += m[19]; - - vec3 rgb = mix(c.rgb, result.rgb, uAlpha); - - // Premultiply alpha again. - rgb *= result.a; - - gl_FragColor = vec4(rgb, result.a); -} -`;class yc extends Ut{constructor(){const e={m:new Float32Array([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]),uAlpha:1};super(Gm,I_,e),this.alpha=1}_loadMatrix(e,t=!1){let i=e;t&&(this._multiply(i,this.uniforms.m,e),i=this._colorMatrix(i)),this.uniforms.m=i}_multiply(e,t,i){return e[0]=t[0]*i[0]+t[1]*i[5]+t[2]*i[10]+t[3]*i[15],e[1]=t[0]*i[1]+t[1]*i[6]+t[2]*i[11]+t[3]*i[16],e[2]=t[0]*i[2]+t[1]*i[7]+t[2]*i[12]+t[3]*i[17],e[3]=t[0]*i[3]+t[1]*i[8]+t[2]*i[13]+t[3]*i[18],e[4]=t[0]*i[4]+t[1]*i[9]+t[2]*i[14]+t[3]*i[19]+t[4],e[5]=t[5]*i[0]+t[6]*i[5]+t[7]*i[10]+t[8]*i[15],e[6]=t[5]*i[1]+t[6]*i[6]+t[7]*i[11]+t[8]*i[16],e[7]=t[5]*i[2]+t[6]*i[7]+t[7]*i[12]+t[8]*i[17],e[8]=t[5]*i[3]+t[6]*i[8]+t[7]*i[13]+t[8]*i[18],e[9]=t[5]*i[4]+t[6]*i[9]+t[7]*i[14]+t[8]*i[19]+t[9],e[10]=t[10]*i[0]+t[11]*i[5]+t[12]*i[10]+t[13]*i[15],e[11]=t[10]*i[1]+t[11]*i[6]+t[12]*i[11]+t[13]*i[16],e[12]=t[10]*i[2]+t[11]*i[7]+t[12]*i[12]+t[13]*i[17],e[13]=t[10]*i[3]+t[11]*i[8]+t[12]*i[13]+t[13]*i[18],e[14]=t[10]*i[4]+t[11]*i[9]+t[12]*i[14]+t[13]*i[19]+t[14],e[15]=t[15]*i[0]+t[16]*i[5]+t[17]*i[10]+t[18]*i[15],e[16]=t[15]*i[1]+t[16]*i[6]+t[17]*i[11]+t[18]*i[16],e[17]=t[15]*i[2]+t[16]*i[7]+t[17]*i[12]+t[18]*i[17],e[18]=t[15]*i[3]+t[16]*i[8]+t[17]*i[13]+t[18]*i[18],e[19]=t[15]*i[4]+t[16]*i[9]+t[17]*i[14]+t[18]*i[19]+t[19],e}_colorMatrix(e){const t=new Float32Array(e);return t[4]/=255,t[9]/=255,t[14]/=255,t[19]/=255,t}brightness(e,t){const i=[e,0,0,0,0,0,e,0,0,0,0,0,e,0,0,0,0,0,1,0];this._loadMatrix(i,t)}tint(e,t){const[i,s,n]=B.shared.setValue(e).toArray(),a=[i,0,0,0,0,0,s,0,0,0,0,0,n,0,0,0,0,0,1,0];this._loadMatrix(a,t)}greyscale(e,t){const i=[e,e,e,0,0,e,e,e,0,0,e,e,e,0,0,0,0,0,1,0];this._loadMatrix(i,t)}blackAndWhite(e){const t=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0];this._loadMatrix(t,e)}hue(e,t){e=(e||0)/180*Math.PI;const i=Math.cos(e),s=Math.sin(e),n=Math.sqrt,a=1/3,o=n(a),l=i+(1-i)*a,c=a*(1-i)-o*s,u=a*(1-i)+o*s,h=a*(1-i)+o*s,d=i+a*(1-i),p=a*(1-i)-o*s,f=a*(1-i)-o*s,m=a*(1-i)+o*s,g=i+a*(1-i),y=[l,c,u,0,0,h,d,p,0,0,f,m,g,0,0,0,0,0,1,0];this._loadMatrix(y,t)}contrast(e,t){const i=(e||0)+1,s=-.5*(i-1),n=[i,0,0,0,s,0,i,0,0,s,0,0,i,0,s,0,0,0,1,0];this._loadMatrix(n,t)}saturate(e=0,t){const i=e*2/3+1,s=(i-1)*-.5,n=[i,s,s,0,0,s,i,s,0,0,s,s,i,0,0,0,0,0,1,0];this._loadMatrix(n,t)}desaturate(){this.saturate(-1)}negative(e){const t=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0];this._loadMatrix(t,e)}sepia(e){const t=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0];this._loadMatrix(t,e)}technicolor(e){const t=[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0];this._loadMatrix(t,e)}polaroid(e){const t=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0];this._loadMatrix(t,e)}toBGR(e){const t=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0];this._loadMatrix(t,e)}kodachrome(e){const t=[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0];this._loadMatrix(t,e)}browni(e){const t=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0];this._loadMatrix(t,e)}vintage(e){const t=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0];this._loadMatrix(t,e)}colorTone(e,t,i,s,n){e=e||.2,t=t||.15,i=i||16770432,s=s||3375104;const a=B.shared,[o,l,c]=a.setValue(i).toArray(),[u,h,d]=a.setValue(s).toArray(),p=[.3,.59,.11,0,0,o,l,c,e,0,u,h,d,t,0,o-u,l-h,c-d,0,0];this._loadMatrix(p,n)}night(e,t){e=e||.1;const i=[e*-2,-e,0,0,0,-e,0,e,0,0,0,e,e*2,0,0,0,0,0,1,0];this._loadMatrix(i,t)}predator(e,t){const i=[11.224130630493164*e,-4.794486999511719*e,-2.8746118545532227*e,0*e,.40342438220977783*e,-3.6330697536468506*e,9.193157196044922*e,-2.951810836791992*e,0*e,-1.316135048866272*e,-3.2184197902679443*e,-4.2375030517578125*e,7.476448059082031*e,0*e,.8044459223747253*e,0,0,0,1,0];this._loadMatrix(i,t)}lsd(e){const t=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0];this._loadMatrix(t,e)}reset(){const e=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];this._loadMatrix(e,!1)}get matrix(){return this.uniforms.m}set matrix(e){this.uniforms.m=e}get alpha(){return this.uniforms.uAlpha}set alpha(e){this.uniforms.uAlpha=e}}yc.prototype.grayscale=yc.prototype.greyscale;var P_=`varying vec2 vFilterCoord; -varying vec2 vTextureCoord; - -uniform vec2 scale; -uniform mat2 rotation; -uniform sampler2D uSampler; -uniform sampler2D mapSampler; - -uniform highp vec4 inputSize; -uniform vec4 inputClamp; - -void main(void) -{ - vec4 map = texture2D(mapSampler, vFilterCoord); - - map -= 0.5; - map.xy = scale * inputSize.zw * (rotation * map.xy); - - gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), inputClamp.xy, inputClamp.zw)); -} -`,B_=`attribute vec2 aVertexPosition; - -uniform mat3 projectionMatrix; -uniform mat3 filterMatrix; - -varying vec2 vTextureCoord; -varying vec2 vFilterCoord; - -uniform vec4 inputSize; -uniform vec4 outputFrame; - -vec4 filterVertexPosition( void ) -{ - vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy; - - return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0); -} - -vec2 filterTextureCoord( void ) -{ - return aVertexPosition * (outputFrame.zw * inputSize.zw); -} - -void main(void) -{ - gl_Position = filterVertexPosition(); - vTextureCoord = filterTextureCoord(); - vFilterCoord = ( filterMatrix * vec3( vTextureCoord, 1.0) ).xy; -} -`;class R_ extends Ut{constructor(e,t){const i=new tt;e.renderable=!1,super(B_,P_,{mapSampler:e._texture,filterMatrix:i,scale:{x:1,y:1},rotation:new Float32Array([1,0,0,1])}),this.maskSprite=e,this.maskMatrix=i,t==null&&(t=20),this.scale=new We(t,t)}apply(e,t,i,s){this.uniforms.filterMatrix=e.calculateSpriteMatrix(this.maskMatrix,this.maskSprite),this.uniforms.scale.x=this.scale.x,this.uniforms.scale.y=this.scale.y;const n=this.maskSprite.worldTransform,a=Math.sqrt(n.a*n.a+n.b*n.b),o=Math.sqrt(n.c*n.c+n.d*n.d);a!==0&&o!==0&&(this.uniforms.rotation[0]=n.a/a,this.uniforms.rotation[1]=n.b/a,this.uniforms.rotation[2]=n.c/o,this.uniforms.rotation[3]=n.d/o),e.applyFilter(this,t,i,s)}get map(){return this.uniforms.mapSampler}set map(e){this.uniforms.mapSampler=e}}var L_=`varying vec2 v_rgbNW; -varying vec2 v_rgbNE; -varying vec2 v_rgbSW; -varying vec2 v_rgbSE; -varying vec2 v_rgbM; - -varying vec2 vFragCoord; -uniform sampler2D uSampler; -uniform highp vec4 inputSize; - - -/** - Basic FXAA implementation based on the code on geeks3d.com with the - modification that the texture2DLod stuff was removed since it's - unsupported by WebGL. - - -- - - From: - https://github.com/mitsuhiko/webgl-meincraft - - Copyright (c) 2011 by Armin Ronacher. - - Some rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * The names of the contributors may not be used to endorse or - promote products derived from this software without specific - prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef FXAA_REDUCE_MIN -#define FXAA_REDUCE_MIN (1.0/ 128.0) -#endif -#ifndef FXAA_REDUCE_MUL -#define FXAA_REDUCE_MUL (1.0 / 8.0) -#endif -#ifndef FXAA_SPAN_MAX -#define FXAA_SPAN_MAX 8.0 -#endif - -//optimized version for mobile, where dependent -//texture reads can be a bottleneck -vec4 fxaa(sampler2D tex, vec2 fragCoord, vec2 inverseVP, - vec2 v_rgbNW, vec2 v_rgbNE, - vec2 v_rgbSW, vec2 v_rgbSE, - vec2 v_rgbM) { - vec4 color; - vec3 rgbNW = texture2D(tex, v_rgbNW).xyz; - vec3 rgbNE = texture2D(tex, v_rgbNE).xyz; - vec3 rgbSW = texture2D(tex, v_rgbSW).xyz; - vec3 rgbSE = texture2D(tex, v_rgbSE).xyz; - vec4 texColor = texture2D(tex, v_rgbM); - vec3 rgbM = texColor.xyz; - vec3 luma = vec3(0.299, 0.587, 0.114); - float lumaNW = dot(rgbNW, luma); - float lumaNE = dot(rgbNE, luma); - float lumaSW = dot(rgbSW, luma); - float lumaSE = dot(rgbSE, luma); - float lumaM = dot(rgbM, luma); - float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE))); - float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE))); - - mediump vec2 dir; - dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE)); - dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE)); - - float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) * - (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN); - - float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce); - dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX), - max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX), - dir * rcpDirMin)) * inverseVP; - - vec3 rgbA = 0.5 * ( - texture2D(tex, fragCoord * inverseVP + dir * (1.0 / 3.0 - 0.5)).xyz + - texture2D(tex, fragCoord * inverseVP + dir * (2.0 / 3.0 - 0.5)).xyz); - vec3 rgbB = rgbA * 0.5 + 0.25 * ( - texture2D(tex, fragCoord * inverseVP + dir * -0.5).xyz + - texture2D(tex, fragCoord * inverseVP + dir * 0.5).xyz); - - float lumaB = dot(rgbB, luma); - if ((lumaB < lumaMin) || (lumaB > lumaMax)) - color = vec4(rgbA, texColor.a); - else - color = vec4(rgbB, texColor.a); - return color; -} - -void main() { - - vec4 color; - - color = fxaa(uSampler, vFragCoord, inputSize.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM); - - gl_FragColor = color; -} -`,D_=` -attribute vec2 aVertexPosition; - -uniform mat3 projectionMatrix; - -varying vec2 v_rgbNW; -varying vec2 v_rgbNE; -varying vec2 v_rgbSW; -varying vec2 v_rgbSE; -varying vec2 v_rgbM; - -varying vec2 vFragCoord; - -uniform vec4 inputSize; -uniform vec4 outputFrame; - -vec4 filterVertexPosition( void ) -{ - vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy; - - return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0); -} - -void texcoords(vec2 fragCoord, vec2 inverseVP, - out vec2 v_rgbNW, out vec2 v_rgbNE, - out vec2 v_rgbSW, out vec2 v_rgbSE, - out vec2 v_rgbM) { - v_rgbNW = (fragCoord + vec2(-1.0, -1.0)) * inverseVP; - v_rgbNE = (fragCoord + vec2(1.0, -1.0)) * inverseVP; - v_rgbSW = (fragCoord + vec2(-1.0, 1.0)) * inverseVP; - v_rgbSE = (fragCoord + vec2(1.0, 1.0)) * inverseVP; - v_rgbM = vec2(fragCoord * inverseVP); -} - -void main(void) { - - gl_Position = filterVertexPosition(); - - vFragCoord = aVertexPosition * outputFrame.zw; - - texcoords(vFragCoord, inputSize.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM); -} -`;class vc extends Ut{constructor(){super(D_,L_)}}var O_=`precision highp float; - -varying vec2 vTextureCoord; -varying vec4 vColor; - -uniform float uNoise; -uniform float uSeed; -uniform sampler2D uSampler; - -float rand(vec2 co) -{ - return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453); -} - -void main() -{ - vec4 color = texture2D(uSampler, vTextureCoord); - float randomValue = rand(gl_FragCoord.xy * uSeed); - float diff = (randomValue - 0.5) * uNoise; - - // Un-premultiply alpha before applying the color matrix. See issue #3539. - if (color.a > 0.0) { - color.rgb /= color.a; - } - - color.r += diff; - color.g += diff; - color.b += diff; - - // Premultiply alpha again. - color.rgb *= color.a; - - gl_FragColor = color; -} -`;class F_ extends Ut{constructor(e=.5,t=Math.random()){super(Gm,O_,{uNoise:0,uSeed:0}),this.noise=e,this.seed=t}get noise(){return this.uniforms.uNoise}set noise(e){this.uniforms.uNoise=e}get seed(){return this.uniforms.uSeed}set seed(e){this.uniforms.uSeed=e}}const Ju={AlphaFilter:T_,BlurFilter:k_,BlurFilterPass:gc,ColorMatrixFilter:yc,DisplacementFilter:R_,FXAAFilter:vc,NoiseFilter:F_};Object.entries(Ju).forEach(([r,e])=>{Object.defineProperty(Ju,r,{get(){return He("7.1.0",`filters.${r} has moved to ${r}`),e}})});class N_{constructor(){this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}init(e){this.removeTickerListener(),this.events=e,this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}get pauseUpdate(){return this._pauseUpdate}set pauseUpdate(e){this._pauseUpdate=e}addTickerListener(){this.tickerAdded||!this.domElement||(At.system.add(this.tickerUpdate,this,Wr.INTERACTION),this.tickerAdded=!0)}removeTickerListener(){this.tickerAdded&&(At.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)}pointerMoved(){this._didMove=!0}update(){if(!this.domElement||this._pauseUpdate)return;if(this._didMove){this._didMove=!1;return}const e=this.events.rootPointerEvent;this.events.supportsTouchEvents&&e.pointerType==="touch"||globalThis.document.dispatchEvent(new PointerEvent("pointermove",{clientX:e.clientX,clientY:e.clientY}))}tickerUpdate(e){this._deltaTime+=e,!(this._deltaTimei.priority-s.priority)}dispatchEvent(e,t){e.propagationStopped=!1,e.propagationImmediatelyStopped=!1,this.propagate(e,t),this.dispatch.emit(t||e.type,e)}mapEvent(e){if(!this.rootTarget)return;const t=this.mappingTable[e.type];if(t)for(let i=0,s=t.length;i=0;s--)if(e.currentTarget=i[s],this.notifyTarget(e,t),e.propagationStopped||e.propagationImmediatelyStopped)return}}all(e,t,i=this._allInteractiveElements){if(i.length===0)return;e.eventPhase=e.BUBBLING_PHASE;const s=Array.isArray(t)?t:[t];for(let n=i.length-1;n>=0;n--)s.forEach(a=>{e.currentTarget=i[n],this.notifyTarget(e,a)})}propagationPath(e){const t=[e];for(let i=0;i=0;h--){const d=u[h],p=this.hitTestMoveRecursive(d,this._isInteractive(t)?t:d.eventMode,i,s,n,a||n(e,i));if(p){if(p.length>0&&!p[p.length-1].parent)continue;const f=e.isInteractive();(p.length>0||f)&&(f&&this._allInteractiveElements.push(e),p.push(e)),this._hitElements.length===0&&(this._hitElements=p),o=!0}}}const l=this._isInteractive(t),c=e.isInteractive();return l&&c&&this._allInteractiveElements.push(e),a||this._hitElements.length>0?null:o?this._hitElements:l&&!n(e,i)&&s(e,i)?c?[e]:[]:null}hitTestRecursive(e,t,i,s,n){if(this._interactivePrune(e)||n(e,i))return null;if((e.eventMode==="dynamic"||t==="dynamic")&&(Rr.pauseUpdate=!1),e.interactiveChildren&&e.children){const l=e.children;for(let c=l.length-1;c>=0;c--){const u=l[c],h=this.hitTestRecursive(u,this._isInteractive(t)?t:u.eventMode,i,s,n);if(h){if(h.length>0&&!h[h.length-1].parent)continue;const d=e.isInteractive();return(h.length>0||d)&&h.push(e),h}}}const a=this._isInteractive(t),o=e.isInteractive();return a&&s(e,i)?o?[e]:[]:null}_isInteractive(e){return e==="static"||e==="dynamic"}_interactivePrune(e){return!!(!e||e.isMask||!e.visible||!e.renderable||e.eventMode==="none"||e.eventMode==="passive"&&!e.interactiveChildren||e.isMask)}hitPruneFn(e,t){if(e.hitArea&&(e.worldTransform.applyInverse(t,nh),!e.hitArea.contains(nh.x,nh.y)))return!0;if(e._mask){const i=e._mask.isMaskData?e._mask.maskObject:e._mask;if(i&&!i.containsPoint?.(t))return!0}return!1}hitTestFn(e,t){return e.eventMode==="passive"?!1:e.hitArea?!0:e.containsPoint?e.containsPoint(t):!1}notifyTarget(e,t){t=t??e.type;const i=`on${t}`;e.currentTarget[i]?.(e);const s=e.eventPhase===e.CAPTURING_PHASE||e.eventPhase===e.AT_TARGET?`${t}capture`:t;this.notifyListeners(e,s),e.eventPhase===e.AT_TARGET&&this.notifyListeners(e,t)}mapPointerDown(e){if(!(e instanceof xi)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=this.createPointerEvent(e);if(this.dispatchEvent(t,"pointerdown"),t.pointerType==="touch")this.dispatchEvent(t,"touchstart");else if(t.pointerType==="mouse"||t.pointerType==="pen"){const s=t.button===2;this.dispatchEvent(t,s?"rightdown":"mousedown")}const i=this.trackingData(e.pointerId);i.pressTargetsByButton[e.button]=t.composedPath(),this.freeEvent(t)}mapPointerMove(e){if(!(e instanceof xi)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}this._allInteractiveElements.length=0,this._hitElements.length=0,this._isPointerMoveEvent=!0;const t=this.createPointerEvent(e);this._isPointerMoveEvent=!1;const i=t.pointerType==="mouse"||t.pointerType==="pen",s=this.trackingData(e.pointerId),n=this.findMountedTarget(s.overTargets);if(s.overTargets?.length>0&&n!==t.target){const l=e.type==="mousemove"?"mouseout":"pointerout",c=this.createPointerEvent(e,l,n);if(this.dispatchEvent(c,"pointerout"),i&&this.dispatchEvent(c,"mouseout"),!t.composedPath().includes(n)){const u=this.createPointerEvent(e,"pointerleave",n);for(u.eventPhase=u.AT_TARGET;u.target&&!t.composedPath().includes(u.target);)u.currentTarget=u.target,this.notifyTarget(u),i&&this.notifyTarget(u,"mouseleave"),u.target=u.target.parent;this.freeEvent(u)}this.freeEvent(c)}if(n!==t.target){const l=e.type==="mousemove"?"mouseover":"pointerover",c=this.clonePointerEvent(t,l);this.dispatchEvent(c,"pointerover"),i&&this.dispatchEvent(c,"mouseover");let u=n?.parent;for(;u&&u!==this.rootTarget.parent&&u!==t.target;)u=u.parent;if(!u||u===this.rootTarget.parent){const h=this.clonePointerEvent(t,"pointerenter");for(h.eventPhase=h.AT_TARGET;h.target&&h.target!==n&&h.target!==this.rootTarget.parent;)h.currentTarget=h.target,this.notifyTarget(h),i&&this.notifyTarget(h,"mouseenter"),h.target=h.target.parent;this.freeEvent(h)}this.freeEvent(c)}const a=[],o=this.enableGlobalMoveEvents??!0;this.moveOnAll?a.push("pointermove"):this.dispatchEvent(t,"pointermove"),o&&a.push("globalpointermove"),t.pointerType==="touch"&&(this.moveOnAll?a.splice(1,0,"touchmove"):this.dispatchEvent(t,"touchmove"),o&&a.push("globaltouchmove")),i&&(this.moveOnAll?a.splice(1,0,"mousemove"):this.dispatchEvent(t,"mousemove"),o&&a.push("globalmousemove"),this.cursor=t.target?.cursor),a.length>0&&this.all(t,a),this._allInteractiveElements.length=0,this._hitElements.length=0,s.overTargets=t.composedPath(),this.freeEvent(t)}mapPointerOver(e){if(!(e instanceof xi)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=this.trackingData(e.pointerId),i=this.createPointerEvent(e),s=i.pointerType==="mouse"||i.pointerType==="pen";this.dispatchEvent(i,"pointerover"),s&&this.dispatchEvent(i,"mouseover"),i.pointerType==="mouse"&&(this.cursor=i.target?.cursor);const n=this.clonePointerEvent(i,"pointerenter");for(n.eventPhase=n.AT_TARGET;n.target&&n.target!==this.rootTarget.parent;)n.currentTarget=n.target,this.notifyTarget(n),s&&this.notifyTarget(n,"mouseenter"),n.target=n.target.parent;t.overTargets=i.composedPath(),this.freeEvent(i),this.freeEvent(n)}mapPointerOut(e){if(!(e instanceof xi)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=this.trackingData(e.pointerId);if(t.overTargets){const i=e.pointerType==="mouse"||e.pointerType==="pen",s=this.findMountedTarget(t.overTargets),n=this.createPointerEvent(e,"pointerout",s);this.dispatchEvent(n),i&&this.dispatchEvent(n,"mouseout");const a=this.createPointerEvent(e,"pointerleave",s);for(a.eventPhase=a.AT_TARGET;a.target&&a.target!==this.rootTarget.parent;)a.currentTarget=a.target,this.notifyTarget(a),i&&this.notifyTarget(a,"mouseleave"),a.target=a.target.parent;t.overTargets=null,this.freeEvent(n),this.freeEvent(a)}this.cursor=null}mapPointerUp(e){if(!(e instanceof xi)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=performance.now(),i=this.createPointerEvent(e);if(this.dispatchEvent(i,"pointerup"),i.pointerType==="touch")this.dispatchEvent(i,"touchend");else if(i.pointerType==="mouse"||i.pointerType==="pen"){const o=i.button===2;this.dispatchEvent(i,o?"rightup":"mouseup")}const s=this.trackingData(e.pointerId),n=this.findMountedTarget(s.pressTargetsByButton[e.button]);let a=n;if(n&&!i.composedPath().includes(n)){let o=n;for(;o&&!i.composedPath().includes(o);){if(i.currentTarget=o,this.notifyTarget(i,"pointerupoutside"),i.pointerType==="touch")this.notifyTarget(i,"touchendoutside");else if(i.pointerType==="mouse"||i.pointerType==="pen"){const l=i.button===2;this.notifyTarget(i,l?"rightupoutside":"mouseupoutside")}o=o.parent}delete s.pressTargetsByButton[e.button],a=o}if(a){const o=this.clonePointerEvent(i,"click");o.target=a,o.path=null,s.clicksByButton[e.button]||(s.clicksByButton[e.button]={clickCount:0,target:o.target,timeStamp:t});const l=s.clicksByButton[e.button];if(l.target===o.target&&t-l.timeStamp<200?++l.clickCount:l.clickCount=1,l.target=o.target,l.timeStamp=t,o.detail=l.clickCount,o.pointerType==="mouse"){const c=o.button===2;this.dispatchEvent(o,c?"rightclick":"click")}else o.pointerType==="touch"&&this.dispatchEvent(o,"tap");this.dispatchEvent(o,"pointertap"),this.freeEvent(o)}this.freeEvent(i)}mapPointerUpOutside(e){if(!(e instanceof xi)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=this.trackingData(e.pointerId),i=this.findMountedTarget(t.pressTargetsByButton[e.button]),s=this.createPointerEvent(e);if(i){let n=i;for(;n;)s.currentTarget=n,this.notifyTarget(s,"pointerupoutside"),s.pointerType==="touch"?this.notifyTarget(s,"touchendoutside"):(s.pointerType==="mouse"||s.pointerType==="pen")&&this.notifyTarget(s,s.button===2?"rightupoutside":"mouseupoutside"),n=n.parent;delete t.pressTargetsByButton[e.button]}this.freeEvent(s)}mapWheel(e){if(!(e instanceof an)){console.warn("EventBoundary cannot map a non-wheel event as a wheel event");return}const t=this.createWheelEvent(e);this.dispatchEvent(t),this.freeEvent(t)}findMountedTarget(e){if(!e)return null;let t=e[0];for(let i=1;i(i==="globalMove"&&(this.rootBoundary.enableGlobalMoveEvents=s),t[i]=s,!0)}),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOverOut=this.onPointerOverOut.bind(this),this.onWheel=this.onWheel.bind(this)}static get defaultEventMode(){return this._defaultEventMode}init(e){const{view:t,resolution:i}=this.renderer;this.setTargetElement(t),this.resolution=i,wc._defaultEventMode=e.eventMode??"auto",Object.assign(this.features,e.eventFeatures??{}),this.rootBoundary.enableGlobalMoveEvents=this.features.globalMove}resolutionChange(e){this.resolution=e}destroy(){this.setTargetElement(null),this.renderer=null}setCursor(e){e=e||"default";let t=!0;if(globalThis.OffscreenCanvas&&this.domElement instanceof OffscreenCanvas&&(t=!1),this.currentCursor===e)return;this.currentCursor=e;const i=this.cursorStyles[e];if(i)switch(typeof i){case"string":t&&(this.domElement.style.cursor=i);break;case"function":i(e);break;case"object":t&&Object.assign(this.domElement.style,i);break}else t&&typeof e=="string"&&!Object.prototype.hasOwnProperty.call(this.cursorStyles,e)&&(this.domElement.style.cursor=e)}get pointer(){return this.rootPointerEvent}onPointerDown(e){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;const t=this.normalizeToPointerData(e);this.autoPreventDefault&&t[0].isNormalized&&(e.cancelable||!("cancelable"in e))&&e.preventDefault();for(let i=0,s=t.length;i0&&(t=e.composedPath()[0]);const i=t!==this.domElement?"outside":"",s=this.normalizeToPointerData(e);for(let n=0,a=s.length;n"u"&&(n.button=0),typeof n.buttons>"u"&&(n.buttons=1),typeof n.isPrimary>"u"&&(n.isPrimary=e.touches.length===1&&e.type==="touchstart"),typeof n.width>"u"&&(n.width=n.radiusX||1),typeof n.height>"u"&&(n.height=n.radiusY||1),typeof n.tiltX>"u"&&(n.tiltX=0),typeof n.tiltY>"u"&&(n.tiltY=0),typeof n.pointerType>"u"&&(n.pointerType="touch"),typeof n.pointerId>"u"&&(n.pointerId=n.identifier||0),typeof n.pressure>"u"&&(n.pressure=n.force||.5),typeof n.twist>"u"&&(n.twist=0),typeof n.tangentialPressure>"u"&&(n.tangentialPressure=0),typeof n.layerX>"u"&&(n.layerX=n.offsetX=n.clientX),typeof n.layerY>"u"&&(n.layerY=n.offsetY=n.clientY),n.isNormalized=!0,n.type=e.type,t.push(n)}else if(!globalThis.MouseEvent||e instanceof MouseEvent&&(!this.supportsPointerEvents||!(e instanceof globalThis.PointerEvent))){const i=e;typeof i.isPrimary>"u"&&(i.isPrimary=!0),typeof i.width>"u"&&(i.width=1),typeof i.height>"u"&&(i.height=1),typeof i.tiltX>"u"&&(i.tiltX=0),typeof i.tiltY>"u"&&(i.tiltY=0),typeof i.pointerType>"u"&&(i.pointerType="mouse"),typeof i.pointerId>"u"&&(i.pointerId=V_),typeof i.pressure>"u"&&(i.pressure=.5),typeof i.twist>"u"&&(i.twist=0),typeof i.tangentialPressure>"u"&&(i.tangentialPressure=0),i.isNormalized=!0,t.push(i)}else t.push(e);return t}normalizeWheelEvent(e){const t=this.rootWheelEvent;return this.transferMouseData(t,e),t.deltaX=e.deltaX,t.deltaY=e.deltaY,t.deltaZ=e.deltaZ,t.deltaMode=e.deltaMode,this.mapPositionToPoint(t.screen,e.clientX,e.clientY),t.global.copyFrom(t.screen),t.offset.copyFrom(t.screen),t.nativeEvent=e,t.type=e.type,t}bootstrapEvent(e,t){return e.originalEvent=null,e.nativeEvent=t,e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist,this.transferMouseData(e,t),this.mapPositionToPoint(e.screen,t.clientX,t.clientY),e.global.copyFrom(e.screen),e.offset.copyFrom(e.screen),e.isTrusted=t.isTrusted,e.type==="pointerleave"&&(e.type="pointerout"),e.type.startsWith("mouse")&&(e.type=e.type.replace("mouse","pointer")),e.type.startsWith("touch")&&(e.type=W_[e.type]||e.type),e}transferMouseData(e,t){e.isTrusted=t.isTrusted,e.srcElement=t.srcElement,e.timeStamp=performance.now(),e.type=t.type,e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.client.x=t.clientX,e.client.y=t.clientY,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.movement.x=t.movementX,e.movement.y=t.movementY,e.page.x=t.pageX,e.page.y=t.pageY,e.relatedTarget=null,e.shiftKey=t.shiftKey}};bc.extension={name:"events",type:[oe.RendererSystem,oe.CanvasRendererSystem]},bc.defaultEventFeatures={move:!0,globalMove:!0,click:!0,wheel:!0};let _c=bc;ge.add(_c);function Qu(r){return r==="dynamic"||r==="static"}const z_={onclick:null,onmousedown:null,onmouseenter:null,onmouseleave:null,onmousemove:null,onglobalmousemove:null,onmouseout:null,onmouseover:null,onmouseup:null,onmouseupoutside:null,onpointercancel:null,onpointerdown:null,onpointerenter:null,onpointerleave:null,onpointermove:null,onglobalpointermove:null,onpointerout:null,onpointerover:null,onpointertap:null,onpointerup:null,onpointerupoutside:null,onrightclick:null,onrightdown:null,onrightup:null,onrightupoutside:null,ontap:null,ontouchcancel:null,ontouchend:null,ontouchendoutside:null,ontouchmove:null,onglobaltouchmove:null,ontouchstart:null,onwheel:null,_internalInteractive:void 0,get interactive(){return this._internalInteractive??Qu(_c.defaultEventMode)},set interactive(r){He("7.2.0","Setting interactive is deprecated, use eventMode = 'none'/'passive'/'auto'/'static'/'dynamic' instead."),this._internalInteractive=r,this.eventMode=r?"static":"auto"},_internalEventMode:void 0,get eventMode(){return this._internalEventMode??_c.defaultEventMode},set eventMode(r){this._internalInteractive=Qu(r),this._internalEventMode=r},isInteractive(){return this.eventMode==="static"||this.eventMode==="dynamic"},interactiveChildren:!0,hitArea:null,addEventListener(r,e,t){const i=typeof t=="boolean"&&t||typeof t=="object"&&t.capture,s=typeof t=="object"?t.signal:void 0,n=typeof t=="object"?t.once===!0:!1,a=typeof e=="function"?void 0:e;r=i?`${r}capture`:r;const o=typeof e=="function"?e:e.handleEvent,l=this;s&&s.addEventListener("abort",()=>{l.off(r,o,a)}),n?l.once(r,o,a):l.on(r,o,a)},removeEventListener(r,e,t){const i=typeof t=="boolean"&&t||typeof t=="object"&&t.capture,s=typeof e=="function"?void 0:e;r=i?`${r}capture`:r,e=typeof e=="function"?e:e.handleEvent,this.off(r,e,s)},dispatchEvent(r){if(!(r instanceof _a))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");return r.defaultPrevented=!1,r.path=null,r.target=this,r.manager.dispatchEvent(r),!r.defaultPrevented}};dt.mixin(z_);const j_={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:null,accessibleType:"button",accessiblePointerEvents:"auto",accessibleChildren:!0,renderId:-1};dt.mixin(j_);const $_=9,ja=100,X_=0,Y_=0,ep=2,tp=1,q_=-1e3,K_=-1e3,Z_=2;class Km{constructor(e){this.debug=!1,this._isActive=!1,this._isMobileAccessibility=!1,this.pool=[],this.renderId=0,this.children=[],this.androidUpdateCount=0,this.androidUpdateFrequency=500,this._hookDiv=null,(cr.tablet||cr.phone)&&this.createTouchHook();const t=document.createElement("div");t.style.width=`${ja}px`,t.style.height=`${ja}px`,t.style.position="absolute",t.style.top=`${X_}px`,t.style.left=`${Y_}px`,t.style.zIndex=ep.toString(),this.div=t,this.renderer=e,this._onKeyDown=this._onKeyDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),globalThis.addEventListener("keydown",this._onKeyDown,!1)}get isActive(){return this._isActive}get isMobileAccessibility(){return this._isMobileAccessibility}createTouchHook(){const e=document.createElement("button");e.style.width=`${tp}px`,e.style.height=`${tp}px`,e.style.position="absolute",e.style.top=`${q_}px`,e.style.left=`${K_}px`,e.style.zIndex=Z_.toString(),e.style.backgroundColor="#FF0000",e.title="select to enable accessibility for this content",e.addEventListener("focus",()=>{this._isMobileAccessibility=!0,this.activate(),this.destroyTouchHook()}),document.body.appendChild(e),this._hookDiv=e}destroyTouchHook(){this._hookDiv&&(document.body.removeChild(this._hookDiv),this._hookDiv=null)}activate(){this._isActive||(this._isActive=!0,globalThis.document.addEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown,!1),this.renderer.on("postrender",this.update,this),this.renderer.view.parentNode?.appendChild(this.div))}deactivate(){!this._isActive||this._isMobileAccessibility||(this._isActive=!1,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.addEventListener("keydown",this._onKeyDown,!1),this.renderer.off("postrender",this.update),this.div.parentNode?.removeChild(this.div))}updateAccessibleObjects(e){if(!e.visible||!e.accessibleChildren)return;e.accessible&&e.isInteractive()&&(e._accessibleActive||this.addChild(e),e.renderId=this.renderId);const t=e.children;if(t)for(let i=0;i title : ${e.title}
tabIndex: ${e.tabIndex}`}capHitArea(e){e.x<0&&(e.width+=e.x,e.x=0),e.y<0&&(e.height+=e.y,e.y=0);const{width:t,height:i}=this.renderer;e.x+e.width>t&&(e.width=t-e.x),e.y+e.height>i&&(e.height=i-e.y)}addChild(e){let t=this.pool.pop();t||(t=document.createElement("button"),t.style.width=`${ja}px`,t.style.height=`${ja}px`,t.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",t.style.position="absolute",t.style.zIndex=ep.toString(),t.style.borderStyle="none",navigator.userAgent.toLowerCase().includes("chrome")?t.setAttribute("aria-live","off"):t.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?t.setAttribute("aria-relevant","additions"):t.setAttribute("aria-relevant","text"),t.addEventListener("click",this._onClick.bind(this)),t.addEventListener("focus",this._onFocus.bind(this)),t.addEventListener("focusout",this._onFocusOut.bind(this))),t.style.pointerEvents=e.accessiblePointerEvents,t.type=e.accessibleType,e.accessibleTitle&&e.accessibleTitle!==null?t.title=e.accessibleTitle:(!e.accessibleHint||e.accessibleHint===null)&&(t.title=`displayObject ${e.tabIndex}`),e.accessibleHint&&e.accessibleHint!==null&&t.setAttribute("aria-label",e.accessibleHint),this.debug&&this.updateDebugHTML(t),e._accessibleActive=!0,e._accessibleDiv=t,t.displayObject=e,this.children.push(e),this.div.appendChild(e._accessibleDiv),e._accessibleDiv.tabIndex=e.tabIndex}_dispatchEvent(e,t){const{displayObject:i}=e.target,s=this.renderer.events.rootBoundary,n=Object.assign(new _a(s),{target:i});s.rootTarget=this.renderer.lastObjectRendered,t.forEach(a=>s.dispatchEvent(n,a))}_onClick(e){this._dispatchEvent(e,["click","pointertap","tap"])}_onFocus(e){e.target.getAttribute("aria-live")||e.target.setAttribute("aria-live","assertive"),this._dispatchEvent(e,["mouseover"])}_onFocusOut(e){e.target.getAttribute("aria-live")||e.target.setAttribute("aria-live","polite"),this._dispatchEvent(e,["mouseout"])}_onKeyDown(e){e.keyCode===$_&&this.activate()}_onMouseMove(e){e.movementX===0&&e.movementY===0||this.deactivate()}destroy(){this.destroyTouchHook(),this.div=null,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null}}Km.extension={name:"accessibility",type:[oe.RendererPlugin,oe.CanvasRendererPlugin]};ge.add(Km);const Zm=class xc{constructor(e){this.stage=new Ae,e=Object.assign({forceCanvas:!1},e),this.renderer=l_(e),xc._plugins.forEach(t=>{t.init.call(this,e)})}render(){this.renderer.render(this.stage)}get view(){return this.renderer?.view}get screen(){return this.renderer?.screen}destroy(e,t){const i=xc._plugins.slice(0);i.reverse(),i.forEach(s=>{s.destroy.call(this)}),this.stage.destroy(t),this.stage=null,this.renderer.destroy(e),this.renderer=null}};Zm._plugins=[];let J_=Zm;ge.handleByList(oe.Application,J_._plugins);class Jm{static init(e){Object.defineProperty(this,"resizeTo",{set(t){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=t,t&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get(){return this._resizeTo}}),this.queueResize=()=>{this._resizeTo&&(this.cancelResize(),this._resizeId=requestAnimationFrame(()=>this.resize()))},this.cancelResize=()=>{this._resizeId&&(cancelAnimationFrame(this._resizeId),this._resizeId=null)},this.resize=()=>{if(!this._resizeTo)return;this.cancelResize();let t,i;if(this._resizeTo===globalThis.window)t=globalThis.innerWidth,i=globalThis.innerHeight;else{const{clientWidth:s,clientHeight:n}=this._resizeTo;t=s,i=n}this.renderer.resize(t,i),this.render()},this._resizeId=null,this._resizeTo=null,this.resizeTo=e.resizeTo||null}static destroy(){globalThis.removeEventListener("resize",this.queueResize),this.cancelResize(),this.cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null}}Jm.extension=oe.Application;ge.add(Jm);const ip={loader:oe.LoadParser,resolver:oe.ResolveParser,cache:oe.CacheParser,detection:oe.DetectionParser};ge.handle(oe.Asset,r=>{const e=r.ref;Object.entries(ip).filter(([t])=>!!e[t]).forEach(([t,i])=>ge.add(Object.assign(e[t],{extension:e[t].extension??i})))},r=>{const e=r.ref;Object.keys(ip).filter(t=>!!e[t]).forEach(t=>ge.remove(e[t]))});class Q_{constructor(e,t=!1){this._loader=e,this._assetList=[],this._isLoading=!1,this._maxConcurrent=1,this.verbose=t}add(e){e.forEach(t=>{this._assetList.push(t)}),this.verbose&&console.log("[BackgroundLoader] assets: ",this._assetList),this._isActive&&!this._isLoading&&this._next()}async _next(){if(this._assetList.length&&this._isActive){this._isLoading=!0;const e=[],t=Math.min(this._assetList.length,this._maxConcurrent);for(let i=0;i(Array.isArray(r)||(r=[r]),e?r.map(i=>typeof i=="string"||t?e(i):i):r),Tc=(r,e)=>{const t=e.split("?")[1];return t&&(r+=`?${t}`),r};function Qm(r,e,t,i,s){const n=e[t];for(let a=0;a{const a=n.substring(1,n.length-1).split(",");s.push(a)}),Qm(r,s,0,t,i)}else i.push(r);return i}const Vo=r=>!Array.isArray(r);class tx{constructor(){this._parsers=[],this._cache=new Map,this._cacheMap=new Map}reset(){this._cacheMap.clear(),this._cache.clear()}has(e){return this._cache.has(e)}get(e){const t=this._cache.get(e);return t||console.warn(`[Assets] Asset id ${e} was not found in the Cache`),t}set(e,t){const i=Ti(e);let s;for(let o=0;o{s[o]=t}));const n=Object.keys(s),a={cacheKeys:n,keys:i};if(i.forEach(o=>{this._cacheMap.set(o,a)}),n.forEach(o=>{this._cache.has(o)&&this._cache.get(o)!==t&&console.warn("[Cache] already has key:",o),this._cache.set(o,s[o])}),t instanceof ie){const o=t;i.forEach(l=>{o.baseTexture!==ie.EMPTY.baseTexture&&Be.addToCache(o.baseTexture,l),ie.addToCache(o,l)})}}remove(e){if(!this._cacheMap.has(e)){console.warn(`[Assets] Asset id ${e} was not found in the Cache`);return}const t=this._cacheMap.get(e);t.cacheKeys.forEach(i=>{this._cache.delete(i)}),t.keys.forEach(i=>{this._cacheMap.delete(i)})}get parsers(){return this._parsers}}const ds=new tx;class ix{constructor(){this._parsers=[],this._parsersValidated=!1,this.parsers=new Proxy(this._parsers,{set:(e,t,i)=>(this._parsersValidated=!1,e[t]=i,!0)}),this.promiseCache={}}reset(){this._parsersValidated=!1,this.promiseCache={}}_getLoadPromiseAndParser(e,t){const i={promise:null,parser:null};return i.promise=(async()=>{let s=null,n=null;if(t.loadParser&&(n=this._parserHash[t.loadParser],n||console.warn(`[Assets] specified load parser "${t.loadParser}" not found while loading ${e}`)),!n){for(let a=0;a({alias:[c],src:c})),o=a.length,l=a.map(async c=>{const u=Et.toAbsolute(c.src);if(!s[c.src])try{this.promiseCache[u]||(this.promiseCache[u]=this._getLoadPromiseAndParser(u,c)),s[c.src]=await this.promiseCache[u].promise,t&&t(++i/o)}catch(h){throw delete this.promiseCache[u],delete s[c.src],new Error(`[Loader.load] Failed to load ${u}. -${h}`)}});return await Promise.all(l),n?s[a[0].src]:s}async unload(e){const t=Ti(e,i=>({alias:[i],src:i})).map(async i=>{const s=Et.toAbsolute(i.src),n=this.promiseCache[s];if(n){const a=await n.promise;delete this.promiseCache[s],n.parser?.unload?.(a,i,this)}});await Promise.all(t)}_validateParsers(){this._parsersValidated=!0,this._parserHash=this._parsers.filter(e=>e.name).reduce((e,t)=>(e[t.name]&&console.warn(`[Assets] loadParser name conflict "${t.name}"`),{...e,[t.name]:t}),{})}}var Bi=(r=>(r[r.Low=0]="Low",r[r.Normal=1]="Normal",r[r.High=2]="High",r))(Bi||{});const rx=".json",sx="application/json",nx={extension:{type:oe.LoadParser,priority:Bi.Low},name:"loadJson",test(r){return En(r,sx)||Xr(r,rx)},async load(r){return await(await ue.ADAPTER.fetch(r)).json()}};ge.add(nx);const ax=".txt",ox="text/plain",lx={name:"loadTxt",extension:{type:oe.LoadParser,priority:Bi.Low},test(r){return En(r,ox)||Xr(r,ax)},async load(r){return await(await ue.ADAPTER.fetch(r)).text()}};ge.add(lx);const hx=["normal","bold","100","200","300","400","500","600","700","800","900"],cx=[".ttf",".otf",".woff",".woff2"],dx=["font/ttf","font/otf","font/woff","font/woff2"],ux=/^(--|-?[A-Z_])[0-9A-Z_-]*$/i;function px(r){const e=Et.extname(r),t=Et.basename(r,e).replace(/(-|_)/g," ").toLowerCase().split(" ").map(n=>n.charAt(0).toUpperCase()+n.slice(1));let i=t.length>0;for(const n of t)if(!n.match(ux)){i=!1;break}let s=t.join(" ");return i||(s=`"${s.replace(/[\\"]/g,"\\$&")}"`),s}const fx=/^[0-9A-Za-z%:/?#\[\]@!\$&'()\*\+,;=\-._~]*$/;function mx(r){return fx.test(r)?r:encodeURI(r)}const gx={extension:{type:oe.LoadParser,priority:Bi.Low},name:"loadWebFont",test(r){return En(r,dx)||Xr(r,cx)},async load(r,e){const t=ue.ADAPTER.getFontFaceSet();if(t){const i=[],s=e.data?.family??px(r),n=e.data?.weights?.filter(o=>hx.includes(o))??["normal"],a=e.data??{};for(let o=0;oue.ADAPTER.getFontFaceSet().delete(e))}};ge.add(gx);const yx=`(function() { - "use strict"; - const WHITE_PNG = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII="; - async function checkImageBitmap() { - try { - if (typeof createImageBitmap != "function") - return !1; - const imageBlob = await (await fetch(WHITE_PNG)).blob(), imageBitmap = await createImageBitmap(imageBlob); - return imageBitmap.width === 1 && imageBitmap.height === 1; - } catch { - return !1; - } - } - checkImageBitmap().then((result) => { - self.postMessage(result); - }); -})(); -`;let on=null,Ac=class{constructor(){on||(on=URL.createObjectURL(new Blob([yx],{type:"application/javascript"}))),this.worker=new Worker(on)}};Ac.revokeObjectURL=function(){on&&(URL.revokeObjectURL(on),on=null)};const vx=`(function() { - "use strict"; - async function loadImageBitmap(url) { - const response = await fetch(url); - if (!response.ok) - throw new Error(\`[WorkerManager.loadImageBitmap] Failed to fetch \${url}: \${response.status} \${response.statusText}\`); - const imageBlob = await response.blob(); - return await createImageBitmap(imageBlob); - } - self.onmessage = async (event) => { - try { - const imageBitmap = await loadImageBitmap(event.data.data[0]); - self.postMessage({ - data: imageBitmap, - uuid: event.data.uuid, - id: event.data.id - }, [imageBitmap]); - } catch (e) { - self.postMessage({ - error: e, - uuid: event.data.uuid, - id: event.data.id - }); - } - }; -})(); -`;let ln=null;class eg{constructor(){ln||(ln=URL.createObjectURL(new Blob([vx],{type:"application/javascript"}))),this.worker=new Worker(ln)}}eg.revokeObjectURL=function(){ln&&(URL.revokeObjectURL(ln),ln=null)};let rp=0,ah;class bx{constructor(){this._initialized=!1,this._createdWorkers=0,this.workerPool=[],this.queue=[],this.resolveHash={}}isImageBitmapSupported(){return this._isImageBitmapSupported!==void 0?this._isImageBitmapSupported:(this._isImageBitmapSupported=new Promise(e=>{const{worker:t}=new Ac;t.addEventListener("message",i=>{t.terminate(),Ac.revokeObjectURL(),e(i.data)})}),this._isImageBitmapSupported)}loadImageBitmap(e){return this._run("loadImageBitmap",[e])}async _initWorkers(){this._initialized||(this._initialized=!0)}getWorker(){ah===void 0&&(ah=navigator.hardwareConcurrency||4);let e=this.workerPool.pop();return!e&&this._createdWorkers{this.complete(t.data),this.returnWorker(t.target),this.next()})),e}returnWorker(e){this.workerPool.push(e)}complete(e){e.error!==void 0?this.resolveHash[e.uuid].reject(e.error):this.resolveHash[e.uuid].resolve(e.data),this.resolveHash[e.uuid]=null}async _run(e,t){await this._initWorkers();const i=new Promise((s,n)=>{this.queue.push({id:e,arguments:t,resolve:s,reject:n})});return this.next(),i}next(){if(!this.queue.length)return;const e=this.getWorker();if(!e)return;const t=this.queue.pop(),i=t.id;this.resolveHash[rp]={resolve:t.resolve,reject:t.reject},e.postMessage({data:t.arguments,uuid:rp++,id:i})}}const sp=new bx;function xa(r,e,t){r.resource.internal=!0;const i=new ie(r),s=()=>{delete e.promiseCache[t],ds.has(t)&&ds.remove(t)};return i.baseTexture.once("destroyed",()=>{t in e.promiseCache&&(console.warn("[Assets] A BaseTexture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the BaseTexture."),s())}),i.once("destroyed",()=>{r.destroyed||(console.warn("[Assets] A Texture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the Texture."),s())}),i}const wx=[".jpeg",".jpg",".png",".webp",".avif"],_x=["image/jpeg","image/png","image/webp","image/avif"];async function xx(r){const e=await ue.ADAPTER.fetch(r);if(!e.ok)throw new Error(`[loadImageBitmap] Failed to fetch ${r}: ${e.status} ${e.statusText}`);const t=await e.blob();return await createImageBitmap(t)}const cl={name:"loadTextures",extension:{type:oe.LoadParser,priority:Bi.High},config:{preferWorkers:!0,preferCreateImageBitmap:!0,crossOrigin:"anonymous"},test(r){return En(r,_x)||Xr(r,wx)},async load(r,e,t){const i=globalThis.createImageBitmap&&this.config.preferCreateImageBitmap;let s;i?this.config.preferWorkers&&await sp.isImageBitmapSupported()?s=await sp.loadImageBitmap(r):s=await xx(r):s=await new Promise((o,l)=>{const c=new Image;c.crossOrigin=this.config.crossOrigin,c.src=r,c.complete?o(c):(c.onload=()=>o(c),c.onerror=u=>l(u))});const n={...e.data};n.resolution??(n.resolution=mr(r)),i&&n.resourceOptions?.ownsImageBitmap===void 0&&(n.resourceOptions={...n.resourceOptions},n.resourceOptions.ownsImageBitmap=!0);const a=new Be(s,n);return a.resource.src=r,xa(a,t,r)},unload(r){r.destroy(!0)}};ge.add(cl);const Tx=".svg",Ax="image/svg+xml",Ex={extension:{type:oe.LoadParser,priority:Bi.High},name:"loadSVG",test(r){return En(r,Ax)||Xr(r,Tx)},async testParse(r){return uc.test(r)},async parse(r,e,t){const i=new uc(r,e?.data?.resourceOptions);await i.load();const s=new Be(i,{resolution:mr(r),...e?.data});return s.resource.src=e.src,xa(s,t,e.src)},async load(r,e){return(await ue.ADAPTER.fetch(r)).text()},unload:cl.unload};ge.add(Ex);const Sx=[".mp4",".m4v",".webm",".ogv"],Cx=["video/mp4","video/webm","video/ogg"],Mx={name:"loadVideo",extension:{type:oe.LoadParser,priority:Bi.High},config:{defaultAutoPlay:!0,defaultUpdateFPS:0,defaultLoop:!1,defaultMuted:!1,defaultPlaysinline:!0},test(r){return En(r,Cx)||Xr(r,Sx)},async load(r,e,t){let i;const s=await(await ue.ADAPTER.fetch(r)).blob(),n=URL.createObjectURL(s);try{const a={autoPlay:this.config.defaultAutoPlay,updateFPS:this.config.defaultUpdateFPS,loop:this.config.defaultLoop,muted:this.config.defaultMuted,playsinline:this.config.defaultPlaysinline,...e?.data?.resourceOptions,autoLoad:!0},o=new Xm(n,a);await o.load();const l=new Be(o,{alphaMode:await Rb(),resolution:mr(r),...e?.data});l.resource.src=r,i=xa(l,t,r),i.baseTexture.once("destroyed",()=>{URL.revokeObjectURL(n)})}catch(a){throw URL.revokeObjectURL(n),a}return i},unload(r){r.destroy(!0)}};ge.add(Mx);class kx{constructor(){this._defaultBundleIdentifierOptions={connector:"-",createBundleAssetId:(e,t)=>`${e}${this._bundleIdConnector}${t}`,extractAssetIdFromBundle:(e,t)=>t.replace(`${e}${this._bundleIdConnector}`,"")},this._bundleIdConnector=this._defaultBundleIdentifierOptions.connector,this._createBundleAssetId=this._defaultBundleIdentifierOptions.createBundleAssetId,this._extractAssetIdFromBundle=this._defaultBundleIdentifierOptions.extractAssetIdFromBundle,this._assetMap={},this._preferredOrder=[],this._parsers=[],this._resolverHash={},this._bundles={}}setBundleIdentifier(e){if(this._bundleIdConnector=e.connector??this._bundleIdConnector,this._createBundleAssetId=e.createBundleAssetId??this._createBundleAssetId,this._extractAssetIdFromBundle=e.extractAssetIdFromBundle??this._extractAssetIdFromBundle,this._extractAssetIdFromBundle("foo",this._createBundleAssetId("foo","bar"))!=="bar")throw new Error("[Resolver] GenerateBundleAssetId are not working correctly")}prefer(...e){e.forEach(t=>{this._preferredOrder.push(t),t.priority||(t.priority=Object.keys(t.params))}),this._resolverHash={}}set basePath(e){this._basePath=e}get basePath(){return this._basePath}set rootPath(e){this._rootPath=e}get rootPath(){return this._rootPath}get parsers(){return this._parsers}reset(){this.setBundleIdentifier(this._defaultBundleIdentifierOptions),this._assetMap={},this._preferredOrder=[],this._resolverHash={},this._rootPath=null,this._basePath=null,this._manifest=null,this._bundles={},this._defaultSearchParams=null}setDefaultSearchParams(e){if(typeof e=="string")this._defaultSearchParams=e;else{const t=e;this._defaultSearchParams=Object.keys(t).map(i=>`${encodeURIComponent(i)}=${encodeURIComponent(t[i])}`).join("&")}}getAlias(e){const{alias:t,name:i,src:s,srcs:n}=e;return Ti(t||i||s||n,a=>typeof a=="string"?a:Array.isArray(a)?a.map(o=>o?.src??o?.srcs??o):a?.src||a?.srcs?a.src??a.srcs:a,!0)}addManifest(e){this._manifest&&console.warn("[Resolver] Manifest already exists, this will be overwritten"),this._manifest=e,e.bundles.forEach(t=>{this.addBundle(t.name,t.assets)})}addBundle(e,t){const i=[];Array.isArray(t)?t.forEach(s=>{const n=s.src??s.srcs,a=s.alias??s.name;let o;if(typeof a=="string"){const l=this._createBundleAssetId(e,a);i.push(l),o=[a,l]}else{const l=a.map(c=>this._createBundleAssetId(e,c));i.push(...l),o=[...a,...l]}this.add({...s,alias:o,src:n})}):Object.keys(t).forEach(s=>{const n=[s,this._createBundleAssetId(e,s)];if(typeof t[s]=="string")this.add({alias:n,src:t[s]});else if(Array.isArray(t[s]))this.add({alias:n,src:t[s]});else{const a=t[s],o=a.src??a.srcs;this.add({...a,alias:n,src:Array.isArray(o)?o:[o]})}i.push(...n)}),this._bundles[e]=i}add(e,t,i,s,n){const a=[];typeof e=="string"||Array.isArray(e)&&typeof e[0]=="string"?(He("7.2.0",`Assets.add now uses an object instead of individual parameters. -Please use Assets.add({ alias, src, data, format, loadParser }) instead.`),a.push({alias:e,src:t,data:i,format:s,loadParser:n})):Array.isArray(e)?a.push(...e):a.push(e);let o;o=l=>{this.hasKey(l)&&console.warn(`[Resolver] already has key: ${l} overwriting`)},Ti(a).forEach(l=>{const{src:c,srcs:u}=l;let{data:h,format:d,loadParser:p}=l;const f=Ti(c||u).map(y=>typeof y=="string"?ex(y):Array.isArray(y)?y:[y]),m=this.getAlias(l);Array.isArray(m)?m.forEach(o):o(m);const g=[];f.forEach(y=>{y.forEach(w=>{let b={};if(typeof w!="object"){b.src=w;for(let v=0;v{this._assetMap[y]=g})})}resolveBundle(e){const t=Vo(e);e=Ti(e);const i={};return e.forEach(s=>{const n=this._bundles[s];if(n){const a=this.resolve(n),o={};for(const l in a){const c=a[l];o[this._extractAssetIdFromBundle(s,l)]=c}i[s]=o}}),t?i[e[0]]:i}resolveUrl(e){const t=this.resolve(e);if(typeof e!="string"){const i={};for(const s in t)i[s]=t[s].src;return i}return t.src}resolve(e){const t=Vo(e);e=Ti(e);const i={};return e.forEach(s=>{if(!this._resolverHash[s])if(this._assetMap[s]){let n=this._assetMap[s];const a=n[0],o=this._getPreferredOrder(n);o?.priority.forEach(l=>{o.params[l].forEach(c=>{const u=n.filter(h=>h[l]?h[l]===c:!1);u.length&&(n=u)})}),this._resolverHash[s]=n[0]??a}else this._resolverHash[s]=this.buildResolvedAsset({alias:[s],src:s},{});i[s]=this._resolverHash[s]}),t?i[e[0]]:i}hasKey(e){return!!this._assetMap[e]}hasBundle(e){return!!this._bundles[e]}_getPreferredOrder(e){for(let t=0;tn.params.format.includes(i.format));if(s)return s}return this._preferredOrder[0]}_appendDefaultSearchParams(e){if(!this._defaultSearchParams)return e;const t=/\?/.test(e)?"&":"?";return`${e}${t}${this._defaultSearchParams}`}buildResolvedAsset(e,t){const{aliases:i,data:s,loadParser:n,format:a}=t;return(this._basePath||this._rootPath)&&(e.src=Et.toAbsolute(e.src,this._basePath,this._rootPath)),e.alias=i??e.alias??[e.src],e.src=this._appendDefaultSearchParams(e.src),e.data={...s||{},...e.data},e.loadParser=n??e.loadParser,e.format=a??e.format??Et.extname(e.src).slice(1),e.srcs=e.src,e.name=e.alias,e}}class Ix{constructor(){this._detections=[],this._initialized=!1,this.resolver=new kx,this.loader=new ix,this.cache=ds,this._backgroundLoader=new Q_(this.loader),this._backgroundLoader.active=!0,this.reset()}async init(e={}){if(this._initialized){console.warn("[Assets]AssetManager already initialized, did you load before calling this Assets.init()?");return}if(this._initialized=!0,e.defaultSearchParams&&this.resolver.setDefaultSearchParams(e.defaultSearchParams),e.basePath&&(this.resolver.basePath=e.basePath),e.bundleIdentifier&&this.resolver.setBundleIdentifier(e.bundleIdentifier),e.manifest){let n=e.manifest;typeof n=="string"&&(n=await this.load(n)),this.resolver.addManifest(n)}const t=e.texturePreference?.resolution??1,i=typeof t=="number"?[t]:t,s=await this._detectFormats({preferredFormats:e.texturePreference?.format,skipDetections:e.skipDetections,detections:this._detections});this.resolver.prefer({params:{format:s,resolution:i}}),e.preferences&&this.setPreferences(e.preferences)}add(e,t,i,s,n){this.resolver.add(e,t,i,s,n)}async load(e,t){this._initialized||await this.init();const i=Vo(e),s=Ti(e).map(o=>{if(typeof o!="string"){const l=this.resolver.getAlias(o);return l.some(c=>!this.resolver.hasKey(c))&&this.add(o),Array.isArray(l)?l[0]:l}return this.resolver.hasKey(o)||this.add({alias:o,src:o}),o}),n=this.resolver.resolve(s),a=await this._mapLoadToResolve(n,t);return i?a[s[0]]:a}addBundle(e,t){this.resolver.addBundle(e,t)}async loadBundle(e,t){this._initialized||await this.init();let i=!1;typeof e=="string"&&(i=!0,e=[e]);const s=this.resolver.resolveBundle(e),n={},a=Object.keys(s);let o=0,l=0;const c=()=>{t?.(++o/l)},u=a.map(h=>{const d=s[h];return l+=Object.keys(d).length,this._mapLoadToResolve(d,c).then(p=>{n[h]=p})});return await Promise.all(u),i?n[e[0]]:n}async backgroundLoad(e){this._initialized||await this.init(),typeof e=="string"&&(e=[e]);const t=this.resolver.resolve(e);this._backgroundLoader.add(Object.values(t))}async backgroundLoadBundle(e){this._initialized||await this.init(),typeof e=="string"&&(e=[e]);const t=this.resolver.resolveBundle(e);Object.values(t).forEach(i=>{this._backgroundLoader.add(Object.values(i))})}reset(){this.resolver.reset(),this.loader.reset(),this.cache.reset(),this._initialized=!1}get(e){if(typeof e=="string")return ds.get(e);const t={};for(let i=0;i{const c=n[o.src],u=[o.src];o.alias&&u.push(...o.alias),a[s[l]]=c,ds.set(u,c)}),a}async unload(e){this._initialized||await this.init();const t=Ti(e).map(s=>typeof s!="string"?s.src:s),i=this.resolver.resolve(t);await this._unloadFromResolved(i)}async unloadBundle(e){this._initialized||await this.init(),e=Ti(e);const t=this.resolver.resolveBundle(e),i=Object.keys(t).map(s=>this._unloadFromResolved(t[s]));await Promise.all(i)}async _unloadFromResolved(e){const t=Object.values(e);t.forEach(i=>{ds.remove(i.src)}),await this.loader.unload(t)}async _detectFormats(e){let t=[];e.preferredFormats&&(t=Array.isArray(e.preferredFormats)?e.preferredFormats:[e.preferredFormats]);for(const i of e.detections)e.skipDetections||await i.test()?t=await i.add(t):e.skipDetections||(t=await i.remove(t));return t=t.filter((i,s)=>t.indexOf(i)===s),t}get detections(){return this._detections}get preferWorkers(){return cl.config.preferWorkers}set preferWorkers(e){He("7.2.0","Assets.prefersWorkers is deprecated, use Assets.setPreferences({ preferWorkers: true }) instead."),this.setPreferences({preferWorkers:e})}setPreferences(e){this.loader.parsers.forEach(t=>{t.config&&Object.keys(t.config).filter(i=>i in e).forEach(i=>{t.config[i]=e[i]})})}}const Zs=new Ix;ge.handleByList(oe.LoadParser,Zs.loader.parsers).handleByList(oe.ResolveParser,Zs.resolver.parsers).handleByList(oe.CacheParser,Zs.cache.parsers).handleByList(oe.DetectionParser,Zs.detections);const Px={extension:oe.CacheParser,test:r=>Array.isArray(r)&&r.every(e=>e instanceof ie),getCacheableAssets:(r,e)=>{const t={};return r.forEach(i=>{e.forEach((s,n)=>{t[i+(n===0?"":n+1)]=s})}),t}};ge.add(Px);async function tg(r){if("Image"in globalThis)return new Promise(e=>{const t=new Image;t.onload=()=>{e(!0)},t.onerror=()=>{e(!1)},t.src=r});if("createImageBitmap"in globalThis&&"fetch"in globalThis){try{const e=await(await fetch(r)).blob();await createImageBitmap(e)}catch{return!1}return!0}return!1}const Bx={extension:{type:oe.DetectionParser,priority:1},test:async()=>tg("data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A="),add:async r=>[...r,"avif"],remove:async r=>r.filter(e=>e!=="avif")};ge.add(Bx);const Rx={extension:{type:oe.DetectionParser,priority:0},test:async()=>tg("data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="),add:async r=>[...r,"webp"],remove:async r=>r.filter(e=>e!=="webp")};ge.add(Rx);const np=["png","jpg","jpeg"],Lx={extension:{type:oe.DetectionParser,priority:-1},test:()=>Promise.resolve(!0),add:async r=>[...r,...np],remove:async r=>r.filter(e=>!np.includes(e))};ge.add(Lx);const Dx="WorkerGlobalScope"in globalThis&&globalThis instanceof globalThis.WorkerGlobalScope;function od(r){return Dx?!1:document.createElement("video").canPlayType(r)!==""}const Ox={extension:{type:oe.DetectionParser,priority:0},test:async()=>od("video/webm"),add:async r=>[...r,"webm"],remove:async r=>r.filter(e=>e!=="webm")};ge.add(Ox);const Fx={extension:{type:oe.DetectionParser,priority:0},test:async()=>od("video/mp4"),add:async r=>[...r,"mp4","m4v"],remove:async r=>r.filter(e=>e!=="mp4"&&e!=="m4v")};ge.add(Fx);const Nx={extension:{type:oe.DetectionParser,priority:0},test:async()=>od("video/ogg"),add:async r=>[...r,"ogv"],remove:async r=>r.filter(e=>e!=="ogv")};ge.add(Nx);const Ux={extension:oe.ResolveParser,test:cl.test,parse:r=>({resolution:parseFloat(ue.RETINA_PREFIX.exec(r)?.[1]??"1"),format:Et.extname(r).slice(1),src:r})};ge.add(Ux);var Mt=(r=>(r[r.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",r[r.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",r[r.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",r[r.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",r[r.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=35917]="COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT",r[r.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT=35918]="COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT",r[r.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=35919]="COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT",r[r.COMPRESSED_SRGB_S3TC_DXT1_EXT=35916]="COMPRESSED_SRGB_S3TC_DXT1_EXT",r[r.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",r[r.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",r[r.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",r[r.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",r[r.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",r[r.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",r[r.COMPRESSED_SRGB8_ETC2=37493]="COMPRESSED_SRGB8_ETC2",r[r.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC",r[r.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",r[r.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",r[r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG=35840]="COMPRESSED_RGB_PVRTC_4BPPV1_IMG",r[r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG=35842]="COMPRESSED_RGBA_PVRTC_4BPPV1_IMG",r[r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG=35841]="COMPRESSED_RGB_PVRTC_2BPPV1_IMG",r[r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG=35843]="COMPRESSED_RGBA_PVRTC_2BPPV1_IMG",r[r.COMPRESSED_RGB_ETC1_WEBGL=36196]="COMPRESSED_RGB_ETC1_WEBGL",r[r.COMPRESSED_RGB_ATC_WEBGL=35986]="COMPRESSED_RGB_ATC_WEBGL",r[r.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL=35987]="COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL",r[r.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL=34798]="COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL",r[r.COMPRESSED_RGBA_ASTC_4x4_KHR=37808]="COMPRESSED_RGBA_ASTC_4x4_KHR",r[r.COMPRESSED_RGBA_BPTC_UNORM_EXT=36492]="COMPRESSED_RGBA_BPTC_UNORM_EXT",r[r.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT=36493]="COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT",r[r.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT=36494]="COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT",r[r.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT=36495]="COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT",r))(Mt||{});const Wo={33776:.5,33777:.5,33778:1,33779:1,35916:.5,35917:.5,35918:1,35919:1,37488:.5,37489:.5,37490:1,37491:1,37492:.5,37496:1,37493:.5,37497:1,37494:.5,37495:.5,35840:.5,35842:.5,35841:.25,35843:.25,36196:.5,35986:.5,35987:1,34798:1,37808:1,36492:1,36493:1,36494:1,36495:1};let Fi,Ws;function ap(){Ws={bptc:Fi.getExtension("EXT_texture_compression_bptc"),astc:Fi.getExtension("WEBGL_compressed_texture_astc"),etc:Fi.getExtension("WEBGL_compressed_texture_etc"),s3tc:Fi.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:Fi.getExtension("WEBGL_compressed_texture_s3tc_srgb"),pvrtc:Fi.getExtension("WEBGL_compressed_texture_pvrtc")||Fi.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),etc1:Fi.getExtension("WEBGL_compressed_texture_etc1"),atc:Fi.getExtension("WEBGL_compressed_texture_atc")}}const Hx={extension:{type:oe.DetectionParser,priority:2},test:async()=>{const r=ue.ADAPTER.createCanvas().getContext("webgl");return r?(Fi=r,!0):(console.warn("WebGL not available for compressed textures."),!1)},add:async r=>{Ws||ap();const e=[];for(const t in Ws)Ws[t]&&e.push(t);return[...e,...r]},remove:async r=>(Ws||ap(),r.filter(e=>!(e in Ws)))};ge.add(Hx);class Gx extends nl{constructor(e,t={width:1,height:1,autoLoad:!0}){let i,s;typeof e=="string"?(i=e,s=new Uint8Array):(i=null,s=e),super(s,t),this.origin=i,this.buffer=s?new Qh(s):null,this._load=null,this.loaded=!1,this.origin!==null&&t.autoLoad!==!1&&this.load(),this.origin===null&&this.buffer&&(this._load=Promise.resolve(this),this.loaded=!0,this.onBlobLoaded(this.buffer.rawBinaryData))}onBlobLoaded(e){}load(){return this._load?this._load:(this._load=fetch(this.origin).then(e=>e.blob()).then(e=>e.arrayBuffer()).then(e=>(this.data=new Uint32Array(e),this.buffer=new Qh(e),this.loaded=!0,this.onBlobLoaded(e),this.update(),this)),this._load)}}class bs extends Gx{constructor(e,t){super(e,t),this.format=t.format,this.levels=t.levels||1,this._width=t.width,this._height=t.height,this._extension=bs._formatToExtension(this.format),(t.levelBuffers||this.buffer)&&(this._levelBuffers=t.levelBuffers||bs._createLevelBuffers(e instanceof Uint8Array?e:this.buffer.uint8View,this.format,this.levels,4,4,this.width,this.height))}upload(e,t,i){const s=e.gl;if(!e.context.extensions[this._extension])throw new Error(`${this._extension} textures are not supported on the current machine`);if(!this._levelBuffers)return!1;s.pixelStorei(s.UNPACK_ALIGNMENT,4);for(let n=0,a=this.levels;n=33776&&e<=33779)return"s3tc";if(e>=35916&&e<=35919)return"s3tc_sRGB";if(e>=37488&&e<=37497)return"etc";if(e>=35840&&e<=35843)return"pvrtc";if(e===36196)return"etc1";if(e===35986||e===35987||e===34798)return"atc";if(e>=36492&&e<=36495)return"bptc";if(e===37808)return"astc";throw new Error(`Invalid (compressed) texture format given: ${e}`)}static _createLevelBuffers(e,t,i,s,n,a,o){const l=new Array(i);let c=e.byteOffset,u=a,h=o,d=u+s-1&~(s-1),p=h+n-1&~(n-1),f=d*p*Wo[t];for(let m=0;m1?u:d,levelHeight:i>1?h:p,levelBuffer:new Uint8Array(e.buffer,c,f)},c+=f,u=u>>1||1,h=h>>1||1,d=u+s-1&~(s-1),p=h+n-1&~(n-1),f=d*p*Wo[t];return l}}const oh=4,$a=124,Vx=32,op=20,Wx=542327876,Xa={SIZE:1,FLAGS:2,HEIGHT:3,WIDTH:4,MIPMAP_COUNT:7,PIXEL_FORMAT:19},zx={SIZE:0,FLAGS:1,FOURCC:2,RGB_BITCOUNT:3,R_BIT_MASK:4,G_BIT_MASK:5,B_BIT_MASK:6,A_BIT_MASK:7},Ya={DXGI_FORMAT:0,RESOURCE_DIMENSION:1,MISC_FLAG:2,ARRAY_SIZE:3,MISC_FLAGS2:4},jx=1,$x=2,Xx=4,Yx=64,qx=512,Kx=131072,Zx=827611204,Jx=861165636,Qx=894720068,e1=808540228,t1=4,i1={[Zx]:Mt.COMPRESSED_RGBA_S3TC_DXT1_EXT,[Jx]:Mt.COMPRESSED_RGBA_S3TC_DXT3_EXT,[Qx]:Mt.COMPRESSED_RGBA_S3TC_DXT5_EXT},r1={70:Mt.COMPRESSED_RGBA_S3TC_DXT1_EXT,71:Mt.COMPRESSED_RGBA_S3TC_DXT1_EXT,73:Mt.COMPRESSED_RGBA_S3TC_DXT3_EXT,74:Mt.COMPRESSED_RGBA_S3TC_DXT3_EXT,76:Mt.COMPRESSED_RGBA_S3TC_DXT5_EXT,77:Mt.COMPRESSED_RGBA_S3TC_DXT5_EXT,72:Mt.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,75:Mt.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,78:Mt.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT,96:Mt.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT,95:Mt.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT,98:Mt.COMPRESSED_RGBA_BPTC_UNORM_EXT,99:Mt.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT};function s1(r){const e=new Uint32Array(r);if(e[0]!==Wx)throw new Error("Invalid DDS file magic word");const t=new Uint32Array(r,0,$a/Uint32Array.BYTES_PER_ELEMENT),i=t[Xa.HEIGHT],s=t[Xa.WIDTH],n=t[Xa.MIPMAP_COUNT],a=new Uint32Array(r,Xa.PIXEL_FORMAT*Uint32Array.BYTES_PER_ELEMENT,Vx/Uint32Array.BYTES_PER_ELEMENT),o=a[jx];if(o&Xx){const l=a[zx.FOURCC];if(l!==e1){const w=i1[l],b=oh+$a,v=new Uint8Array(r,b);return[new bs(v,{format:w,width:s,height:i,levels:n})]}const c=oh+$a,u=new Uint32Array(e.buffer,c,op/Uint32Array.BYTES_PER_ELEMENT),h=u[Ya.DXGI_FORMAT],d=u[Ya.RESOURCE_DIMENSION],p=u[Ya.MISC_FLAG],f=u[Ya.ARRAY_SIZE],m=r1[h];if(m===void 0)throw new Error(`DDSParser cannot parse texture data with DXGI format ${h}`);if(p===t1)throw new Error("DDSParser does not support cubemap textures");if(d===6)throw new Error("DDSParser does not supported 3D texture data");const g=new Array,y=oh+$a+op;if(f===1)g.push(new Uint8Array(r,y));else{const w=Wo[m];let b=0,v=s,A=i;for(let I=0;I>>1,A=A>>>1}let C=y;for(let I=0;Inew bs(w,{format:m,width:s,height:i,levels:n}))}throw o&Yx?new Error("DDSParser does not support uncompressed texture data."):o&qx?new Error("DDSParser does not supported YUV uncompressed texture data."):o&Kx?new Error("DDSParser does not support single-channel (lumninance) texture data!"):o&$x?new Error("DDSParser does not support single-channel (alpha) texture data!"):new Error("DDSParser failed to load a texture file due to an unknown reason!")}const lp=[171,75,84,88,32,49,49,187,13,10,26,10],n1=67305985,bi={FILE_IDENTIFIER:0,ENDIANNESS:12,GL_TYPE:16,GL_TYPE_SIZE:20,GL_FORMAT:24,GL_INTERNAL_FORMAT:28,GL_BASE_INTERNAL_FORMAT:32,PIXEL_WIDTH:36,PIXEL_HEIGHT:40,PIXEL_DEPTH:44,NUMBER_OF_ARRAY_ELEMENTS:48,NUMBER_OF_FACES:52,NUMBER_OF_MIPMAP_LEVELS:56,BYTES_OF_KEY_VALUE_DATA:60},Ec=64,hp={[xe.UNSIGNED_BYTE]:1,[xe.UNSIGNED_SHORT]:2,[xe.INT]:4,[xe.UNSIGNED_INT]:4,[xe.FLOAT]:4,[xe.HALF_FLOAT]:8},a1={[se.RGBA]:4,[se.RGB]:3,[se.RG]:2,[se.RED]:1,[se.LUMINANCE]:1,[se.LUMINANCE_ALPHA]:2,[se.ALPHA]:1},o1={[xe.UNSIGNED_SHORT_4_4_4_4]:2,[xe.UNSIGNED_SHORT_5_5_5_1]:2,[xe.UNSIGNED_SHORT_5_6_5]:2};function l1(r,e,t=!1){const i=new DataView(e);if(!h1(r,i))return null;const s=i.getUint32(bi.ENDIANNESS,!0)===n1,n=i.getUint32(bi.GL_TYPE,s),a=i.getUint32(bi.GL_FORMAT,s),o=i.getUint32(bi.GL_INTERNAL_FORMAT,s),l=i.getUint32(bi.PIXEL_WIDTH,s),c=i.getUint32(bi.PIXEL_HEIGHT,s)||1,u=i.getUint32(bi.PIXEL_DEPTH,s)||1,h=i.getUint32(bi.NUMBER_OF_ARRAY_ELEMENTS,s)||1,d=i.getUint32(bi.NUMBER_OF_FACES,s),p=i.getUint32(bi.NUMBER_OF_MIPMAP_LEVELS,s),f=i.getUint32(bi.BYTES_OF_KEY_VALUE_DATA,s);if(c===0||u!==1)throw new Error("Only 2D textures are supported");if(d!==1)throw new Error("CubeTextures are not supported by KTXLoader yet!");if(h!==1)throw new Error("WebGL does not support array textures");const m=4,g=4,y=l+3&-4,w=c+3&-4,b=new Array(h);let v=l*c;n===0&&(v=y*w);let A;if(n!==0?hp[n]?A=hp[n]*a1[a]:A=o1[n]:A=Wo[o],A===void 0)throw new Error("Unable to resolve the pixel format stored in the *.ktx file!");const C=t?d1(i,f,s):null;let I=v*A,L=l,k=c,N=y,G=w,E=Ec+f;for(let S=0;S1||n!==0?L:N,levelHeight:p>1||n!==0?k:G,levelBuffer:new Uint8Array(e,D,I)},D+=I}E+=x+4,E=E%4!==0?E+4-E%4:E,L=L>>1||1,k=k>>1||1,N=L+m-1&~(m-1),G=k+g-1&~(g-1),I=N*G*A}return n!==0?{uncompressed:b.map(S=>{let x=S[0].levelBuffer,D=!1;return n===xe.FLOAT?x=new Float32Array(S[0].levelBuffer.buffer,S[0].levelBuffer.byteOffset,S[0].levelBuffer.byteLength/4):n===xe.UNSIGNED_INT?(D=!0,x=new Uint32Array(S[0].levelBuffer.buffer,S[0].levelBuffer.byteOffset,S[0].levelBuffer.byteLength/4)):n===xe.INT&&(D=!0,x=new Int32Array(S[0].levelBuffer.buffer,S[0].levelBuffer.byteOffset,S[0].levelBuffer.byteLength/4)),{resource:new nl(x,{width:S[0].levelWidth,height:S[0].levelHeight}),type:n,format:D?c1(a):a}}),kvData:C}:{compressed:b.map(S=>new bs(null,{format:o,width:l,height:c,levels:p,levelBuffers:S})),kvData:C}}function h1(r,e){for(let t=0;te-s){console.error("KTXLoader: keyAndValueByteSize out of bounds");break}let l=0;for(;l{const a=new Be(n,{mipmap:er.OFF,alphaMode:zt.NO_PREMULTIPLIED_ALPHA,resolution:mr(r),...e.data});return xa(a,t,r)});return s.length===1?s[0]:s},unload(r){Array.isArray(r)?r.forEach(e=>e.destroy(!0)):r.destroy(!0)}};ge.add(u1);const p1={extension:{type:oe.LoadParser,priority:Bi.High},name:"loadKTX",test(r){return Xr(r,".ktx")},async load(r,e,t){const i=await(await ue.ADAPTER.fetch(r)).arrayBuffer(),{compressed:s,uncompressed:n,kvData:a}=l1(r,i),o=s??n,l={mipmap:er.OFF,alphaMode:zt.NO_PREMULTIPLIED_ALPHA,resolution:mr(r),...e.data},c=o.map(u=>{o===n&&Object.assign(l,{type:u.type,format:u.format});const h=u.resource??u,d=new Be(h,l);return d.ktxKeyValueData=a,xa(d,t,r)});return c.length===1?c[0]:c},unload(r){Array.isArray(r)?r.forEach(e=>e.destroy(!0)):r.destroy(!0)}};ge.add(p1);const f1=["s3tc","s3tc_sRGB","etc","etc1","pvrtc","atc","astc","bptc"],m1={extension:oe.ResolveParser,test:r=>{const e=Et.extname(r).slice(1);return["basis","ktx","dds"].includes(e)},parse:r=>{const e=r.split("."),t=e.pop();if(["ktx","dds"].includes(t)){const i=e.pop();if(f1.includes(i))return{resolution:parseFloat(ue.RETINA_PREFIX.exec(r)?.[1]??"1"),format:i,src:r}}return{resolution:parseFloat(ue.RETINA_PREFIX.exec(r)?.[1]??"1"),format:t,src:r}}};ge.add(m1);const qa=new ke,g1=4,ig=class Wn{constructor(e){this.renderer=e,this._rendererPremultipliedAlpha=!1}contextChange(){const e=this.renderer?.gl.getContextAttributes();this._rendererPremultipliedAlpha=!!(e&&e.alpha&&e.premultipliedAlpha)}async image(e,t,i,s){const n=new Image;return n.src=await this.base64(e,t,i,s),n}async base64(e,t,i,s){const n=this.canvas(e,s);if(n.toBlob!==void 0)return new Promise((a,o)=>{n.toBlob(l=>{if(!l){o(new Error("ICanvas.toBlob failed!"));return}const c=new FileReader;c.onload=()=>a(c.result),c.onerror=o,c.readAsDataURL(l)},t,i)});if(n.toDataURL!==void 0)return n.toDataURL(t,i);if(n.convertToBlob!==void 0){const a=await n.convertToBlob({type:t,quality:i});return new Promise((o,l)=>{const c=new FileReader;c.onload=()=>o(c.result),c.onerror=l,c.readAsDataURL(a)})}throw new Error("Extract.base64() requires ICanvas.toDataURL, ICanvas.toBlob, or ICanvas.convertToBlob to be implemented")}canvas(e,t){const{pixels:i,width:s,height:n,flipY:a,premultipliedAlpha:o}=this._rawPixels(e,t);a&&Wn._flipY(i,s,n),o&&Wn._unpremultiplyAlpha(i);const l=new qb(s,n,1),c=new ImageData(new Uint8ClampedArray(i.buffer),s,n);return l.context.putImageData(c,0,0),l.canvas}pixels(e,t){const{pixels:i,width:s,height:n,flipY:a,premultipliedAlpha:o}=this._rawPixels(e,t);return a&&Wn._flipY(i,s,n),o&&Wn._unpremultiplyAlpha(i),i}_rawPixels(e,t){const i=this.renderer;if(!i)throw new Error("The Extract has already been destroyed");let s,n=!1,a=!1,o,l=!1;e&&(e instanceof Ft?o=e:(o=i.generateTexture(e,{region:t,resolution:i.resolution,multisample:i.multisample}),l=!0,t&&(qa.width=t.width,qa.height=t.height,t=qa)));const c=i.gl;if(o){if(s=o.baseTexture.resolution,t=t??o.frame,n=!1,a=o.baseTexture.alphaMode>0&&o.baseTexture.format===se.RGBA,!l){i.renderTexture.bind(o);const p=o.framebuffer.glFramebuffers[i.CONTEXT_UID];p.blitFramebuffer&&i.framebuffer.bind(p.blitFramebuffer)}}else s=i.resolution,t||(t=qa,t.width=i.width/s,t.height=i.height/s),n=!0,a=this._rendererPremultipliedAlpha,i.renderTexture.bind();const u=Math.max(Math.round(t.width*s),1),h=Math.max(Math.round(t.height*s),1),d=new Uint8Array(g1*u*h);return c.readPixels(Math.round(t.x*s),Math.round(t.y*s),u,h,c.RGBA,c.UNSIGNED_BYTE,d),l&&o?.destroy(!0),{pixels:d,width:u,height:h,flipY:n,premultipliedAlpha:a}}destroy(){this.renderer=null}static _flipY(e,t,i){const s=t<<2,n=i>>1,a=new Uint8Array(s);for(let o=0;o=0&&o>=0&&s>=0&&n>=0)){e.length=0;return}const l=Math.ceil(2.3*Math.sqrt(a+o)),c=l*8+(s?4:0)+(n?4:0);if(e.length=c,c===0)return;if(l===0){e.length=8,e[0]=e[6]=t+s,e[1]=e[3]=i+n,e[2]=e[4]=t-s,e[5]=e[7]=i-n;return}let u=0,h=l*4+(s?2:0)+2,d=h,p=c;{const f=s+a,m=n,g=t+f,y=t-f,w=i+m;if(e[u++]=g,e[u++]=w,e[--h]=w,e[--h]=y,n){const b=i-m;e[d++]=y,e[d++]=b,e[--p]=b,e[--p]=g}}for(let f=1;f0||e&&i<=0){const s=t/2;for(let n=s+s%2;n=6){cp(t,!1);const a=[];for(let c=0;c=0&&n>=0&&a.push(t,i,t+s,i,t+s,i+n,t,i+n)},triangulate(r,e){const t=r.points,i=e.points;if(t.length===0)return;const s=i.length/2;i.push(t[0],t[1],t[2],t[3],t[6],t[7],t[4],t[5]),e.indices.push(s,s+1,s+2,s+1,s+2,s+3)}},b1={build(r){zo.build(r)},triangulate(r,e){zo.triangulate(r,e)}};var oi=(r=>(r.MITER="miter",r.BEVEL="bevel",r.ROUND="round",r))(oi||{}),Hr=(r=>(r.BUTT="butt",r.ROUND="round",r.SQUARE="square",r))(Hr||{});const un={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount(r,e=20){if(!this.adaptive||!r||isNaN(r))return e;let t=Math.ceil(r/this.maxLength);return tthis.maxSegments&&(t=this.maxSegments),t}};class dp{static curveTo(e,t,i,s,n,a){const o=a[a.length-2],l=a[a.length-1]-t,c=o-e,u=s-t,h=i-e,d=Math.abs(l*h-c*u);if(d<1e-8||n===0)return(a[a.length-2]!==e||a[a.length-1]!==t)&&a.push(e,t),null;const p=l*l+c*c,f=u*u+h*h,m=l*u+c*h,g=n*Math.sqrt(p)/d,y=n*Math.sqrt(f)/d,w=g*m/p,b=y*m/f,v=g*h+y*c,A=g*u+y*l,C=c*(y+w),I=l*(y+w),L=h*(g+b),k=u*(g+b),N=Math.atan2(I-A,C-v),G=Math.atan2(k-A,L-v);return{cx:v+e,cy:A+t,radius:n,startAngle:N,endAngle:G,anticlockwise:c*u>h*l}}static arc(e,t,i,s,n,a,o,l,c){const u=o-a,h=un._segmentsCount(Math.abs(u)*n,Math.ceil(Math.abs(u)/Do)*40),d=u/(h*2),p=d*2,f=Math.cos(d),m=Math.sin(d),g=h-1,y=g%1/g;for(let w=0;w<=g;++w){const b=w+y*w,v=d+a+p*b,A=Math.cos(v),C=-Math.sin(v);c.push((f*A+m*C)*n+i,(f*-C+m*A)*n+s)}}}class w1{constructor(){this.reset()}begin(e,t,i){this.reset(),this.style=e,this.start=t,this.attribStart=i}end(e,t){this.attribSize=t-this.attribStart,this.size=e-this.start}reset(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0}}class ld{static curveLength(e,t,i,s,n,a,o,l){let c=0,u=0,h=0,d=0,p=0,f=0,m=0,g=0,y=0,w=0,b=0,v=e,A=t;for(let C=1;C<=10;++C)u=C/10,h=u*u,d=h*u,p=1-u,f=p*p,m=f*p,g=m*e+3*f*u*i+3*p*h*n+d*o,y=m*t+3*f*u*s+3*p*h*a+d*l,w=v-g,b=A-y,v=g,A=y,c+=Math.sqrt(w*w+b*b);return c}static curveTo(e,t,i,s,n,a,o){const l=o[o.length-2],c=o[o.length-1];o.length-=2;const u=un._segmentsCount(ld.curveLength(l,c,e,t,i,s,n,a));let h=0,d=0,p=0,f=0,m=0;o.push(l,c);for(let g=1,y=0;g<=u;++g)y=g/u,h=1-y,d=h*h,p=d*h,f=y*y,m=f*y,o.push(p*l+3*d*y*e+3*h*f*i+m*n,p*c+3*d*y*t+3*h*f*s+m*a)}}function up(r,e,t,i,s,n,a,o){const l=r-t*s,c=e-i*s,u=r+t*n,h=e+i*n;let d,p;a?(d=i,p=-t):(d=-i,p=t);const f=l+d,m=c+p,g=u+d,y=h+p;return o.push(f,m,g,y),2}function Qr(r,e,t,i,s,n,a,o){const l=t-r,c=i-e;let u=Math.atan2(l,c),h=Math.atan2(s-r,n-e);o&&uh&&(h+=Math.PI*2);let d=u;const p=h-u,f=Math.abs(p),m=Math.sqrt(l*l+c*c),g=(15*f*Math.sqrt(m)/Math.PI>>0)+1,y=p/g;if(d+=y,o){a.push(r,e,t,i);for(let w=1,b=d;w=0&&(n.join===oi.ROUND?d+=Qr(b,v,b-I*S,v-L*S,b-k*S,v-N*S,u,!1)+4:d+=2,u.push(b-k*x,v-N*x,b+k*S,v+N*S));continue}const Z=(-I+y)*(-L+v)-(-I+b)*(-L+w),ye=(-k+A)*(-N+v)-(-k+b)*(-N+C),Ce=(O*ye-V*Z)/te,ce=(F*Z-W*ye)/te,fe=(Ce-b)*(Ce-b)+(ce-v)*(ce-v),we=b+(Ce-b)*S,le=v+(ce-v)*S,pe=b-(Ce-b)*x,be=v-(ce-v)*x,T=Math.min(O*O+W*W,V*V+F*F),X=Q?S:x,j=T+X*X*m,P=fe<=j;let M=n.join;if(M===oi.MITER&&fe/m>g&&(M=oi.BEVEL),P)switch(M){case oi.MITER:{u.push(we,le,pe,be);break}case oi.BEVEL:{Q?u.push(we,le,b+I*x,v+L*x,we,le,b+k*x,v+N*x):u.push(b-I*S,v-L*S,pe,be,b-k*S,v-N*S,pe,be),d+=2;break}case oi.ROUND:{Q?(u.push(we,le,b+I*x,v+L*x),d+=Qr(b,v,b+I*x,v+L*x,b+k*x,v+N*x,u,!0)+4,u.push(we,le,b+k*x,v+N*x)):(u.push(b-I*S,v-L*S,pe,be),d+=Qr(b,v,b-I*S,v-L*S,b-k*S,v-N*S,u,!1)+4,u.push(b-k*S,v-N*S,pe,be));break}}else{switch(u.push(b-I*S,v-L*S,b+I*x,v+L*x),M){case oi.MITER:{Q?u.push(pe,be,pe,be):u.push(we,le,we,le),d+=2;break}case oi.ROUND:{Q?d+=Qr(b,v,b+I*x,v+L*x,b+k*x,v+N*x,u,!0)+2:d+=Qr(b,v,b-I*S,v-L*S,b-k*S,v-N*S,u,!1)+2;break}}u.push(b-k*S,v-N*S,b+k*x,v+N*x),d+=2}}y=i[(h-2)*2],w=i[(h-2)*2+1],b=i[(h-1)*2],v=i[(h-1)*2+1],I=-(w-v),L=y-b,G=Math.sqrt(I*I+L*L),I/=G,L/=G,I*=f,L*=f,u.push(b-I*S,v-L*S,b+I*x,v+L*x),l||(n.cap===Hr.ROUND?d+=Qr(b-I*(S-x)*.5,v-L*(S-x)*.5,b-I*S,v-L*S,b+I*x,v+L*x,u,!1)+2:n.cap===Hr.SQUARE&&(d+=up(b,v,I,L,S,x,!1,u)));const D=e.indices,$=un.epsilon*un.epsilon;for(let R=p;R0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this}drawShape(e,t=null,i=null,s=null){const n=new jo(e,t,i,s);return this.graphicsData.push(n),this.dirty++,this}drawHole(e,t=null){if(!this.graphicsData.length)return null;const i=new jo(e,null,null,t),s=this.graphicsData[this.graphicsData.length-1];return i.lineStyle=s.lineStyle,s.holes.push(i),this.dirty++,this}destroy(){super.destroy();for(let e=0;e0&&(i=this.batches[this.batches.length-1],s=i.style);for(let l=this.shapeIndex;l65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&o===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=o?new Uint32Array(this.indices):new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}_compareStyles(e,t){return!(!e||!t||e.texture.baseTexture!==t.texture.baseTexture||e.color+e.alpha!==t.color+t.alpha||!!e.native!=!!t.native)}validateBatching(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(let e=0,t=this.graphicsData.length;e65535*2)return!1;const e=this.batches;for(let t=0;t0&&(s=Ka.pop(),s||(s=new ic,s.texArray=new ac),this.drawCalls.push(s)),s.start=u,s.size=0,s.texArray.count=0,s.type=c),m.touched=1,m._batchEnabled=e,m._batchLocation=n,m.wrapMode=Gr.REPEAT,s.texArray.elements[s.texArray.count++]=m,n++)),s.size+=d.size,u+=d.size,o=m._batchLocation,this.addColors(t,f.color,f.alpha,d.attribSize,d.attribStart),this.addTextureIds(i,o,d.attribSize,d.attribStart)}Be._globalBatch=e,this.packAttributes()}packAttributes(){const e=this.points,t=this.uvs,i=this.colors,s=this.textureIds,n=new ArrayBuffer(e.length*3*4),a=new Float32Array(n),o=new Uint32Array(n);let l=0;for(let c=0;c0&&e.alpha>0;return i?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._lineStyle,{visible:i},e)):this._lineStyle.reset(),this}startPoly(){if(this.currentPath){const e=this.currentPath.points,t=this.currentPath.points.length;t>2&&(this.drawShape(this.currentPath),this.currentPath=new vs,this.currentPath.closeStroke=!1,this.currentPath.points.push(e[t-2],e[t-1]))}else this.currentPath=new vs,this.currentPath.closeStroke=!1}finishPoly(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)}moveTo(e,t){return this.startPoly(),this.currentPath.points[0]=e,this.currentPath.points[1]=t,this}lineTo(e,t){this.currentPath||this.moveTo(0,0);const i=this.currentPath.points,s=i[i.length-2],n=i[i.length-1];return(s!==e||n!==t)&&i.push(e,t),this}_initCurve(e=0,t=0){this.currentPath?this.currentPath.points.length===0&&(this.currentPath.points=[e,t]):this.moveTo(e,t)}quadraticCurveTo(e,t,i,s){this._initCurve();const n=this.currentPath.points;return n.length===0&&this.moveTo(0,0),hd.curveTo(e,t,i,s,n),this}bezierCurveTo(e,t,i,s,n,a){return this._initCurve(),ld.curveTo(e,t,i,s,n,a,this.currentPath.points),this}arcTo(e,t,i,s,n){this._initCurve(e,t);const a=this.currentPath.points,o=dp.curveTo(e,t,i,s,n,a);if(o){const{cx:l,cy:c,radius:u,startAngle:h,endAngle:d,anticlockwise:p}=o;this.arc(l,c,u,h,d,p)}return this}arc(e,t,i,s,n,a=!1){if(s===n)return this;if(!a&&n<=s?n+=Do:a&&s<=n&&(s+=Do),n-s===0)return this;const o=e+Math.cos(s)*i,l=t+Math.sin(s)*i,c=this._geometry.closePointEps;let u=this.currentPath?this.currentPath.points:null;if(u){const h=Math.abs(u[u.length-2]-o),d=Math.abs(u[u.length-1]-l);h0;return i?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._fillStyle,{visible:i},e)):this._fillStyle.reset(),this}endFill(){return this.finishPoly(),this._fillStyle.reset(),this}drawRect(e,t,i,s){return this.drawShape(new ke(e,t,i,s))}drawRoundedRect(e,t,i,s,n){return this.drawShape(new ll(e,t,i,s,n))}drawCircle(e,t,i){return this.drawShape(new al(e,t,i))}drawEllipse(e,t,i,s){return this.drawShape(new ol(e,t,i,s))}drawPolygon(...e){let t,i=!0;const s=e[0];s.points?(i=s.closeStroke,t=s.points):Array.isArray(e[0])?t=e[0]:t=e;const n=new vs(t);return n.closeStroke=i,this.drawShape(n),this}drawShape(e){return this._holeMode?this._geometry.drawHole(e,this._matrix):this._geometry.drawShape(e,this._fillStyle.clone(),this._lineStyle.clone(),this._matrix),this}clear(){return this._geometry.clear(),this._lineStyle.reset(),this._fillStyle.reset(),this._boundsID++,this._matrix=null,this._holeMode=!1,this.currentPath=null,this}isFastRect(){const e=this._geometry.graphicsData;return e.length===1&&e[0].shape.type===It.RECT&&!e[0].matrix&&!e[0].holes.length&&!(e[0].lineStyle.visible&&e[0].lineStyle.width)}_render(e){this.finishPoly();const t=this._geometry;t.updateBatches(),t.batchable?(this.batchDirty!==t.batchDirty&&this._populateBatches(),this._renderBatched(e)):(e.batch.flush(),this._renderDirect(e))}_populateBatches(){const e=this._geometry,t=this.blendMode,i=e.batches.length;this.batchTint=-1,this._transformID=-1,this.batchDirty=e.batchDirty,this.batches.length=i,this.vertexData=new Float32Array(e.points);for(let s=0;se?1:this._width/e,i=this._topHeight+this._bottomHeight,s=this._height>i?1:this._height/i;return Math.min(t,s)}get width(){return this._width}set width(e){this._width=e,this._refresh()}get height(){return this._height}set height(e){this._height=e,this._refresh()}get leftWidth(){return this._leftWidth}set leftWidth(e){this._leftWidth=e,this._refresh()}get rightWidth(){return this._rightWidth}set rightWidth(e){this._rightWidth=e,this._refresh()}get topHeight(){return this._topHeight}set topHeight(e){this._topHeight=e,this._refresh()}get bottomHeight(){return this._bottomHeight}set bottomHeight(e){this._bottomHeight=e,this._refresh()}_refresh(){const e=this.texture,t=this.geometry.buffers[1].data;this._origWidth=e.orig.width,this._origHeight=e.orig.height;const i=1/this._origWidth,s=1/this._origHeight;t[0]=t[8]=t[16]=t[24]=0,t[1]=t[3]=t[5]=t[7]=0,t[6]=t[14]=t[22]=t[30]=1,t[25]=t[27]=t[29]=t[31]=1,t[2]=t[10]=t[18]=t[26]=i*this._leftWidth,t[4]=t[12]=t[20]=t[28]=1-i*this._rightWidth,t[9]=t[11]=t[13]=t[15]=s*this._topHeight,t[17]=t[19]=t[21]=t[23]=1-s*this._bottomHeight,this.updateHorizontalVertices(),this.updateVerticalVertices(),this.geometry.buffers[0].update(),this.geometry.buffers[1].update()}}class dd extends Ae{constructor(e=1500,t,i=16384,s=!1){super();const n=16384;i>n&&(i=n),this._properties=[!1,!0,!1,!1,!1],this._maxSize=e,this._batchSize=i,this._buffers=null,this._bufferUpdateIDs=[],this._updateID=0,this.interactiveChildren=!1,this.blendMode=Me.NORMAL,this.autoResize=s,this.roundPixels=!0,this.baseTexture=null,this.setProperties(t),this._tintColor=new B(0),this.tintRgb=new Float32Array(3),this.tint=16777215}setProperties(e){e&&(this._properties[0]="vertices"in e||"scale"in e?!!e.vertices||!!e.scale:this._properties[0],this._properties[1]="position"in e?!!e.position:this._properties[1],this._properties[2]="rotation"in e?!!e.rotation:this._properties[2],this._properties[3]="uvs"in e?!!e.uvs:this._properties[3],this._properties[4]="tint"in e||"alpha"in e?!!e.tint||!!e.alpha:this._properties[4])}updateTransform(){this.displayObjectUpdateTransform()}get tint(){return this._tintColor.value}set tint(e){this._tintColor.setValue(e),this._tintColor.toRgbArray(this.tintRgb)}render(e){!this.visible||this.worldAlpha<=0||!this.children.length||!this.renderable||(this.baseTexture||(this.baseTexture=this.children[0]._texture.baseTexture,this.baseTexture.valid||this.baseTexture.once("update",()=>this.onChildrenChange(0))),e.batch.setObjectRenderer(e.plugins.particle),e.plugins.particle.render(this))}onChildrenChange(e){const t=Math.floor(e/this._batchSize);for(;this._bufferUpdateIDs.lengthi&&!e.autoResize&&(a=i);let o=e._buffers;o||(o=e._buffers=this.generateBuffers(e));const l=t[0]._texture.baseTexture,c=l.alphaMode>0;this.state.blendMode=am(e.blendMode,c),n.state.set(this.state);const u=n.gl,h=e.worldTransform.copyTo(this.tempMatrix);h.prepend(n.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=h.toArray(!0),this.shader.uniforms.uColor=B.shared.setValue(e.tintRgb).premultiply(e.worldAlpha,c).toArray(this.shader.uniforms.uColor),this.shader.uniforms.uSampler=l,this.renderer.shader.bind(this.shader);let d=!1;for(let p=0,f=0;ps&&(m=s),f>=o.length&&o.push(this._generateOneMoreBuffer(e));const g=o[f];g.uploadDynamic(t,p,m);const y=e._bufferUpdateIDs[f]||0;d=d||g._updateID0);s[a]=c,s[a+n]=c,s[a+n*2]=c,s[a+n*3]=c,a+=n*4}}destroy(){super.destroy(),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null}}cg.extension={name:"particle",type:oe.RendererPlugin};ge.add(cg);var ul=(r=>(r[r.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",r[r.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL",r))(ul||{});const Ja={willReadFrequently:!0},Ni=class ve{static get experimentalLetterSpacingSupported(){let e=ve._experimentalLetterSpacingSupported;if(e!==void 0){const t=ue.ADAPTER.getCanvasRenderingContext2D().prototype;e=ve._experimentalLetterSpacingSupported="letterSpacing"in t||"textLetterSpacing"in t}return e}constructor(e,t,i,s,n,a,o,l,c){this.text=e,this.style=t,this.width=i,this.height=s,this.lines=n,this.lineWidths=a,this.lineHeight=o,this.maxLineWidth=l,this.fontProperties=c}static measureText(e,t,i,s=ve._canvas){i=i??t.wordWrap;const n=t.toFontString(),a=ve.measureFont(n);a.fontSize===0&&(a.fontSize=t.fontSize,a.ascent=t.fontSize);const o=s.getContext("2d",Ja);o.font=n;const l=(i?ve.wordWrap(e,t,s):e).split(/(?:\r\n|\r|\n)/),c=new Array(l.length);let u=0;for(let f=0;f0&&(s?n-=t:n+=(ve.graphemeSegmenter(e).length-1)*t),n}static wordWrap(e,t,i=ve._canvas){const s=i.getContext("2d",Ja);let n=0,a="",o="";const l=Object.create(null),{letterSpacing:c,whiteSpace:u}=t,h=ve.collapseSpaces(u),d=ve.collapseNewlines(u);let p=!h;const f=t.wordWrapWidth+c,m=ve.tokenize(e);for(let g=0;gf)if(a!==""&&(o+=ve.addLine(a),a="",n=0),ve.canBreakWords(y,t.breakWords)){const b=ve.wordWrapSplit(y);for(let v=0;vf&&(o+=ve.addLine(a),p=!1,a="",n=0),a+=A,n+=L}}else{a.length>0&&(o+=ve.addLine(a),a="",n=0);const b=g===m.length-1;o+=ve.addLine(y,!b),p=!1,a="",n=0}else w+n>f&&(p=!1,o+=ve.addLine(a),a="",n=0),(a.length>0||!ve.isBreakingSpace(y)||p)&&(a+=y,n+=w)}return o+=ve.addLine(a,!1),o}static addLine(e,t=!0){return e=ve.trimRight(e),e=t?`${e} -`:e,e}static getFromCache(e,t,i,s){let n=i[e];return typeof n!="number"&&(n=ve._measureText(e,t,s)+t,i[e]=n),n}static collapseSpaces(e){return e==="normal"||e==="pre-line"}static collapseNewlines(e){return e==="normal"}static trimRight(e){if(typeof e!="string")return"";for(let t=e.length-1;t>=0;t--){const i=e[t];if(!ve.isBreakingSpace(i))break;e=e.slice(0,-1)}return e}static isNewline(e){return typeof e!="string"?!1:ve._newlines.includes(e.charCodeAt(0))}static isBreakingSpace(e,t){return typeof e!="string"?!1:ve._breakingSpaces.includes(e.charCodeAt(0))}static tokenize(e){const t=[];let i="";if(typeof e!="string")return t;for(let s=0;so;--d){for(let m=0;m{if(typeof Intl?.Segmenter=="function"){const r=new Intl.Segmenter;return e=>[...r.segment(e)].map(t=>t.segment)}return r=>[...r]})(),Ni.experimentalLetterSpacing=!1,Ni._fonts={},Ni._newlines=[10,13],Ni._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];let Pr=Ni;const P1=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],dg=class zn{constructor(e){this.styleID=0,this.reset(),uh(this,e,e)}clone(){const e={};return uh(e,this,zn.defaultStyle),new zn(e)}reset(){uh(this,zn.defaultStyle,zn.defaultStyle)}get align(){return this._align}set align(e){this._align!==e&&(this._align=e,this.styleID++)}get breakWords(){return this._breakWords}set breakWords(e){this._breakWords!==e&&(this._breakWords=e,this.styleID++)}get dropShadow(){return this._dropShadow}set dropShadow(e){this._dropShadow!==e&&(this._dropShadow=e,this.styleID++)}get dropShadowAlpha(){return this._dropShadowAlpha}set dropShadowAlpha(e){this._dropShadowAlpha!==e&&(this._dropShadowAlpha=e,this.styleID++)}get dropShadowAngle(){return this._dropShadowAngle}set dropShadowAngle(e){this._dropShadowAngle!==e&&(this._dropShadowAngle=e,this.styleID++)}get dropShadowBlur(){return this._dropShadowBlur}set dropShadowBlur(e){this._dropShadowBlur!==e&&(this._dropShadowBlur=e,this.styleID++)}get dropShadowColor(){return this._dropShadowColor}set dropShadowColor(e){const t=dh(e);this._dropShadowColor!==t&&(this._dropShadowColor=t,this.styleID++)}get dropShadowDistance(){return this._dropShadowDistance}set dropShadowDistance(e){this._dropShadowDistance!==e&&(this._dropShadowDistance=e,this.styleID++)}get fill(){return this._fill}set fill(e){const t=dh(e);this._fill!==t&&(this._fill=t,this.styleID++)}get fillGradientType(){return this._fillGradientType}set fillGradientType(e){this._fillGradientType!==e&&(this._fillGradientType=e,this.styleID++)}get fillGradientStops(){return this._fillGradientStops}set fillGradientStops(e){B1(this._fillGradientStops,e)||(this._fillGradientStops=e,this.styleID++)}get fontFamily(){return this._fontFamily}set fontFamily(e){this.fontFamily!==e&&(this._fontFamily=e,this.styleID++)}get fontSize(){return this._fontSize}set fontSize(e){this._fontSize!==e&&(this._fontSize=e,this.styleID++)}get fontStyle(){return this._fontStyle}set fontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.styleID++)}get fontVariant(){return this._fontVariant}set fontVariant(e){this._fontVariant!==e&&(this._fontVariant=e,this.styleID++)}get fontWeight(){return this._fontWeight}set fontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.styleID++)}get letterSpacing(){return this._letterSpacing}set letterSpacing(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.styleID++)}get lineHeight(){return this._lineHeight}set lineHeight(e){this._lineHeight!==e&&(this._lineHeight=e,this.styleID++)}get leading(){return this._leading}set leading(e){this._leading!==e&&(this._leading=e,this.styleID++)}get lineJoin(){return this._lineJoin}set lineJoin(e){this._lineJoin!==e&&(this._lineJoin=e,this.styleID++)}get miterLimit(){return this._miterLimit}set miterLimit(e){this._miterLimit!==e&&(this._miterLimit=e,this.styleID++)}get padding(){return this._padding}set padding(e){this._padding!==e&&(this._padding=e,this.styleID++)}get stroke(){return this._stroke}set stroke(e){const t=dh(e);this._stroke!==t&&(this._stroke=t,this.styleID++)}get strokeThickness(){return this._strokeThickness}set strokeThickness(e){this._strokeThickness!==e&&(this._strokeThickness=e,this.styleID++)}get textBaseline(){return this._textBaseline}set textBaseline(e){this._textBaseline!==e&&(this._textBaseline=e,this.styleID++)}get trim(){return this._trim}set trim(e){this._trim!==e&&(this._trim=e,this.styleID++)}get whiteSpace(){return this._whiteSpace}set whiteSpace(e){this._whiteSpace!==e&&(this._whiteSpace=e,this.styleID++)}get wordWrap(){return this._wordWrap}set wordWrap(e){this._wordWrap!==e&&(this._wordWrap=e,this.styleID++)}get wordWrapWidth(){return this._wordWrapWidth}set wordWrapWidth(e){this._wordWrapWidth!==e&&(this._wordWrapWidth=e,this.styleID++)}toFontString(){const e=typeof this.fontSize=="number"?`${this.fontSize}px`:this.fontSize;let t=this.fontFamily;Array.isArray(this.fontFamily)||(t=this.fontFamily.split(","));for(let i=t.length-1;i>=0;i--){let s=t[i].trim();!/([\"\'])[^\'\"]+\1/.test(s)&&!P1.includes(s)&&(s=`"${s}"`),t[i]=s}return`${this.fontStyle} ${this.fontVariant} ${this.fontWeight} ${e} ${t.join(",")}`}};dg.defaultStyle={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:ul.LINEAR_VERTICAL,fillGradientStops:[],fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",leading:0,letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100};let zr=dg;function dh(r){const e=B.shared,t=i=>{const s=e.setValue(i);return s.alpha===1?s.toHex():s.toRgbaString()};return Array.isArray(r)?r.map(t):t(r)}function B1(r,e){if(!Array.isArray(r)||!Array.isArray(e)||r.length!==e.length)return!1;for(let t=0;t0&&f>m&&(g=(m+f)/2);const y=m+d,w=i.lineHeight*(p+1);let b=y;p+10}}function D1(r,e){let t=!1;if(r?._textures?.length){for(let i=0;i{this.queue&&this.prepareItems()},this.registerFindHook(H1),this.registerFindHook(G1),this.registerFindHook(D1),this.registerFindHook(O1),this.registerFindHook(F1),this.registerUploadHook(N1),this.registerUploadHook(U1)}upload(e){return new Promise(t=>{e&&this.add(e),this.queue.length?(this.completes.push(t),this.ticking||(this.ticking=!0,At.system.addOnce(this.tick,this,Wr.UTILITY))):t()})}tick(){setTimeout(this.delayedTick,0)}prepareItems(){for(this.limiter.beginFrame();this.queue.length&&this.limiter.allowedToUpload();){const e=this.queue[0];let t=!1;if(e&&!e._destroyed){for(let i=0,s=this.uploadHooks.length;i=0;t--)this.add(e.children[t]);return this}destroy(){this.ticking&&At.system.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null}};fg.uploadsPerFrame=4;let Ic=fg;Object.defineProperties(ue,{UPLOADS_PER_FRAME:{get(){return Ic.uploadsPerFrame},set(r){He("7.1.0","settings.UPLOADS_PER_FRAME is deprecated, use prepare.BasePrepare.uploadsPerFrame"),Ic.uploadsPerFrame=r}}});function gg(r,e){return e instanceof Be?(e._glTextures[r.CONTEXT_UID]||r.texture.bind(e),!0):!1}function V1(r,e){if(!(e instanceof Sn))return!1;const{geometry:t}=e;e.finishPoly(),t.updateBatches();const{batches:i}=t;for(let s=0;s1?qi.from(j1,z1,t):qi.from(yp,$1,t)}render(e){const t=this.renderer,i=this.quad;let s=i.vertices;s[0]=s[6]=e._width*-e.anchor.x,s[1]=s[3]=e._height*-e.anchor.y,s[2]=s[4]=e._width*(1-e.anchor.x),s[5]=s[7]=e._height*(1-e.anchor.y);const n=e.uvRespectAnchor?e.anchor.x:0,a=e.uvRespectAnchor?e.anchor.y:0;s=i.uvs,s[0]=s[6]=-n,s[1]=s[3]=-a,s[2]=s[4]=1-n,s[5]=s[7]=1-a,i.invalidate();const o=e._texture,l=o.baseTexture,c=l.alphaMode>0,u=e.tileTransform.localTransform,h=e.uvMatrix;let d=l.isPowerOfTwo&&o.frame.width===l.width&&o.frame.height===l.height;d&&(l._glTextures[t.CONTEXT_UID]?d=l.wrapMode!==Gr.CLAMP:l.wrapMode===Gr.CLAMP&&(l.wrapMode=Gr.REPEAT));const p=d?this.simpleShader:this.shader,f=o.width,m=o.height,g=e._width,y=e._height;Qa.set(u.a*f/g,u.b*f/y,u.c*m/g,u.d*m/y,u.tx/g,u.ty/y),Qa.invert(),d?Qa.prepend(h.mapCoord):(p.uniforms.uMapCoord=h.mapCoord.toArray(!0),p.uniforms.uClampFrame=h.uClampFrame,p.uniforms.uClampOffset=h.uClampOffset),p.uniforms.uTransform=Qa.toArray(!0),p.uniforms.uColor=B.shared.setValue(e.tint).premultiply(e.worldAlpha,c).toArray(p.uniforms.uColor),p.uniforms.translationMatrix=e.transform.worldTransform.toArray(!0),p.uniforms.uSampler=o,t.shader.bind(p),t.geometry.bind(i),this.state.blendMode=am(e.blendMode,c),t.state.set(this.state),t.geometry.draw(this.renderer.gl.TRIANGLES,6,0)}}vg.extension={name:"tilingSprite",type:oe.RendererPlugin};ge.add(vg);const bg=class jn{constructor(e,t,i){this.linkedSheets=[],(e instanceof Be||e instanceof ie)&&(e={texture:e,data:t,resolutionFilename:i});const{texture:s,data:n,resolutionFilename:a=null,cachePrefix:o=""}=e;this.cachePrefix=o,this._texture=s instanceof ie?s:null,this.baseTexture=s instanceof Be?s:this._texture.baseTexture,this.textures={},this.animations={},this.data=n;const l=this.baseTexture.resource;this.resolution=this._updateResolution(a||(l?l.url:null)),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}_updateResolution(e=null){const{scale:t}=this.data.meta;let i=mr(e,null);return i===null&&(i=typeof t=="number"?t:parseFloat(t??"1")),i!==1&&this.baseTexture.setResolution(i),i}parse(){return new Promise(e=>{this._callback=e,this._batchIndex=0,this._frameKeys.length<=jn.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}_processFrames(e){let t=e;const i=jn.BATCH_SIZE;for(;t-e{this._batchIndex*jn.BATCH_SIZE{i[s]=e}),Object.keys(e.textures).forEach(s=>{i[`${e.cachePrefix}${s}`]=e.textures[s]}),!t){const s=Et.dirname(r[0]);e.linkedSheets.forEach((n,a)=>{Object.assign(i,wg([`${s}/${e.data.meta.related_multi_packs[a]}`],n,!0))})}return i}const q1={extension:oe.Asset,cache:{test:r=>r instanceof vp,getCacheableAssets:(r,e)=>wg(r,e,!1)},resolver:{test:r=>{const e=r.split("?")[0].split("."),t=e.pop(),i=e.pop();return t==="json"&&Y1.includes(i)},parse:r=>{const e=r.split(".");return{resolution:parseFloat(ue.RETINA_PREFIX.exec(r)?.[1]??"1"),format:e[e.length-2],src:r}}},loader:{name:"spritesheetLoader",extension:{type:oe.LoadParser,priority:Bi.Normal},async testParse(r,e){return Et.extname(e.src).toLowerCase()===".json"&&!!r.frames},async parse(r,e,t){const{texture:i,imageFilename:s,cachePrefix:n}=e?.data??{};let a=Et.dirname(e.src);a&&a.lastIndexOf("/")!==a.length-1&&(a+="/");let o;if(i&&i.baseTexture)o=i;else{const u=Tc(a+(s??r.meta.image),e.src);o=(await t.load([u]))[u]}const l=new vp({texture:o.baseTexture,data:r,resolutionFilename:e.src,cachePrefix:n});await l.parse();const c=r?.meta?.related_multi_packs;if(Array.isArray(c)){const u=[];for(const d of c){if(typeof d!="string")continue;let p=a+d;e.data?.ignoreMultiPack||(p=Tc(p,e.src),u.push(t.load({src:p,data:{ignoreMultiPack:!0}})))}const h=await Promise.all(u);l.linkedSheets=h,h.forEach(d=>{d.linkedSheets=[l].concat(l.linkedSheets.filter(p=>p!==d))})}return l},unload(r){r.destroy(!0)}}};ge.add(q1);class $o{constructor(){this.info=[],this.common=[],this.page=[],this.char=[],this.kerning=[],this.distanceField=[]}}class Ao{static test(e){return typeof e=="string"&&e.startsWith("info face=")}static parse(e){const t=e.match(/^[a-z]+\s+.+$/gm),i={info:[],common:[],page:[],char:[],chars:[],kerning:[],kernings:[],distanceField:[]};for(const n in t){const a=t[n].match(/^[a-z]+/gm)[0],o=t[n].match(/[a-zA-Z]+=([^\s"']+|"([^"]*)")/gm),l={};for(const c in o){const u=o[c].split("="),h=u[0],d=u[1].replace(/"/gm,""),p=parseFloat(d),f=isNaN(p)?d:p;l[h]=f}i[a].push(l)}const s=new $o;return i.info.forEach(n=>s.info.push({face:n.face,size:parseInt(n.size,10)})),i.common.forEach(n=>s.common.push({lineHeight:parseInt(n.lineHeight,10)})),i.page.forEach(n=>s.page.push({id:parseInt(n.id,10),file:n.file})),i.char.forEach(n=>s.char.push({id:parseInt(n.id,10),page:parseInt(n.page,10),x:parseInt(n.x,10),y:parseInt(n.y,10),width:parseInt(n.width,10),height:parseInt(n.height,10),xoffset:parseInt(n.xoffset,10),yoffset:parseInt(n.yoffset,10),xadvance:parseInt(n.xadvance,10)})),i.kerning.forEach(n=>s.kerning.push({first:parseInt(n.first,10),second:parseInt(n.second,10),amount:parseInt(n.amount,10)})),i.distanceField.forEach(n=>s.distanceField.push({distanceRange:parseInt(n.distanceRange,10),fieldType:n.fieldType})),s}}class Pc{static test(e){const t=e;return typeof e!="string"&&"getElementsByTagName"in e&&t.getElementsByTagName("page").length&&t.getElementsByTagName("info")[0].getAttribute("face")!==null}static parse(e){const t=new $o,i=e.getElementsByTagName("info"),s=e.getElementsByTagName("common"),n=e.getElementsByTagName("page"),a=e.getElementsByTagName("char"),o=e.getElementsByTagName("kerning"),l=e.getElementsByTagName("distanceField");for(let c=0;c")?Pc.test(ue.ADAPTER.parseXML(e)):!1}static parse(e){return Pc.parse(ue.ADAPTER.parseXML(e))}}const ph=[Ao,Pc,Bc];function K1(r){for(let e=0;e=l-N*a){if(m===0)throw new Error(`[BitmapFont] textureHeight ${l}px is too small (fontFamily: '${h.fontFamily}', fontSize: ${h.fontSize}px, char: '${I}')`);--C,g=null,y=null,w=null,m=0,f=0,b=0;continue}if(b=Math.max(N+L.fontProperties.descent,b),G*a+f>=d){if(f===0)throw new Error(`[BitmapFont] textureWidth ${o}px is too small (fontFamily: '${h.fontFamily}', fontSize: ${h.fontSize}px, char: '${I}')`);--C,m+=b*a,m=Math.ceil(m),f=0,b=0;continue}J1(g,y,L,f,m,a,h);const E=Eo(L.text);p.char.push({id:E,page:v.length-1,x:f/a,y:m/a,width:G,height:N,xoffset:0,yoffset:0,xadvance:k-(h.dropShadow?h.dropShadowDistance:0)-(h.stroke?h.strokeThickness:0)}),f+=(G+2*n)*a,f=Math.ceil(f)}if(!i?.skipKerning)for(let C=0,I=u.length;C 0.99) {\r - alpha = 1.0;\r - }\r -\r - // Gamma correction for coverage-like alpha\r - float luma = dot(uColor.rgb, vec3(0.299, 0.587, 0.114));\r - float gamma = mix(1.0, 1.0 / 2.2, luma);\r - float coverage = pow(uColor.a * alpha, gamma); \r -\r - // NPM Textures, NPM outputs\r - gl_FragColor = vec4(uColor.rgb, coverage);\r -}\r -`,tT=`// Mesh material default fragment\r -attribute vec2 aVertexPosition;\r -attribute vec2 aTextureCoord;\r -\r -uniform mat3 projectionMatrix;\r -uniform mat3 translationMatrix;\r -uniform mat3 uTextureMatrix;\r -\r -varying vec2 vTextureCoord;\r -\r -void main(void)\r -{\r - gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\r -\r - vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;\r -}\r -`;const bp=[],wp=[],_p=[],xg=class Tg extends Ae{constructor(e,t={}){super();const{align:i,tint:s,maxWidth:n,letterSpacing:a,fontName:o,fontSize:l}=Object.assign({},Tg.styleDefaults,t);if(!kr.available[o])throw new Error(`Missing BitmapFont "${o}"`);this._activePagesMeshData=[],this._textWidth=0,this._textHeight=0,this._align=i,this._tintColor=new B(s),this._font=void 0,this._fontName=o,this._fontSize=l,this.text=e,this._maxWidth=n,this._maxLineHeight=0,this._letterSpacing=a,this._anchor=new dr(()=>{this.dirty=!0},this,0,0),this._roundPixels=ue.ROUND_PIXELS,this.dirty=!0,this._resolution=ue.RESOLUTION,this._autoResolution=!0,this._textureCache={}}updateText(){const e=kr.available[this._fontName],t=this.fontSize,i=t/e.size,s=new We,n=[],a=[],o=[],l=this._text.replace(/(?:\r\n|\r)/g,` -`)||" ",c=_g(l),u=this._maxWidth*e.size/t,h=e.distanceFieldType==="none"?bp:wp;let d=null,p=0,f=0,m=0,g=-1,y=0,w=0,b=0,v=0;for(let G=0;G0&&s.x>u&&(++w,sn(n,1+g-w,1+G-g),G=g,g=-1,a.push(y),o.push(n.length>0?n[n.length-1].prevSpaces:0),f=Math.max(f,y),m++,s.x=0,s.y+=e.lineHeight,d=null,v=0)}const A=c[c.length-1];A!=="\r"&&A!==` -`&&(/(?:\s)/.test(A)&&(p=y),a.push(p),f=Math.max(f,p),o.push(-1));const C=[];for(let G=0;G<=m;G++){let E=0;this._align==="right"?E=f-a[G]:this._align==="center"?E=(f-a[G])/2:this._align==="justify"&&(E=o[G]<0?0:(f-a[G])/o[G]),C.push(E)}const I=n.length,L={},k=[],N=this._activePagesMeshData;h.push(...N);for(let G=0;G6*S)||E.vertices.lengtht[s.mesh.texture.baseTexture.uid]).forEach(s=>{s.mesh.texture=ie.EMPTY});for(const s in t)t[s].destroy(),delete t[s];this._font=null,this._tintColor=null,this._textureCache=null,super.destroy(e)}};xg.styleDefaults={align:"left",tint:16777215,maxWidth:0,letterSpacing:0};let Oe=xg;const iT=[".xml",".fnt"],rT={extension:{type:oe.LoadParser,priority:Bi.Normal},name:"loadBitmapFont",test(r){return iT.includes(Et.extname(r).toLowerCase())},async testParse(r){return Ao.test(r)||Bc.test(r)},async parse(r,e,t){const i=Ao.test(r)?Ao.parse(r):Bc.parse(r),{src:s}=e,{page:n}=i,a=[];for(let c=0;co[c]);return kr.install(i,l,!0)},async load(r,e){return(await ue.ADAPTER.fetch(r)).text()},unload(r){r.destroy()}};ge.add(rT);const Rc=class zs extends zr{constructor(){super(...arguments),this._fonts=[],this._overrides=[],this._stylesheet="",this.fontsDirty=!1}static from(e){return new zs(Object.keys(zs.defaultOptions).reduce((t,i)=>({...t,[i]:e[i]}),{}))}cleanFonts(){this._fonts.length>0&&(this._fonts.forEach(e=>{URL.revokeObjectURL(e.src),e.refs--,e.refs===0&&(e.fontFace&&document.fonts.delete(e.fontFace),delete zs.availableFonts[e.originalUrl])}),this.fontFamily="Arial",this._fonts.length=0,this.styleID++,this.fontsDirty=!0)}loadFont(e,t={}){const{availableFonts:i}=zs;if(i[e]){const s=i[e];return this._fonts.push(s),s.refs++,this.styleID++,this.fontsDirty=!0,Promise.resolve()}return ue.ADAPTER.fetch(e).then(s=>s.blob()).then(async s=>new Promise((n,a)=>{const o=URL.createObjectURL(s),l=new FileReader;l.onload=()=>n([o,l.result]),l.onerror=a,l.readAsDataURL(s)})).then(async([s,n])=>{const a=Object.assign({family:Et.basename(e,Et.extname(e)),weight:"normal",style:"normal",display:"auto",src:s,dataSrc:n,refs:1,originalUrl:e,fontFace:null},t);i[e]=a,this._fonts.push(a),this.styleID++;const o=new FontFace(a.family,`url(${a.src})`,{weight:a.weight,style:a.style,display:a.display});a.fontFace=o,await o.load(),document.fonts.add(o),await document.fonts.ready,this.styleID++,this.fontsDirty=!0})}addOverride(...e){const t=e.filter(i=>!this._overrides.includes(i));t.length>0&&(this._overrides.push(...t),this.styleID++)}removeOverride(...e){const t=e.filter(i=>this._overrides.includes(i));t.length>0&&(this._overrides=this._overrides.filter(i=>!t.includes(i)),this.styleID++)}toCSS(e){return[`transform: scale(${e})`,"transform-origin: top left","display: inline-block",`color: ${this.normalizeColor(this.fill)}`,`font-size: ${this.fontSize}px`,`font-family: ${this.fontFamily}`,`font-weight: ${this.fontWeight}`,`font-style: ${this.fontStyle}`,`font-variant: ${this.fontVariant}`,`letter-spacing: ${this.letterSpacing}px`,`text-align: ${this.align}`,`padding: ${this.padding}px`,`white-space: ${this.whiteSpace}`,...this.lineHeight?[`line-height: ${this.lineHeight}px`]:[],...this.wordWrap?[`word-wrap: ${this.breakWords?"break-all":"break-word"}`,`max-width: ${this.wordWrapWidth}px`]:[],...this.strokeThickness?[`-webkit-text-stroke-width: ${this.strokeThickness}px`,`-webkit-text-stroke-color: ${this.normalizeColor(this.stroke)}`,`text-stroke-width: ${this.strokeThickness}px`,`text-stroke-color: ${this.normalizeColor(this.stroke)}`,"paint-order: stroke"]:[],...this.dropShadow?[this.dropShadowToCSS()]:[],...this._overrides].join(";")}toGlobalCSS(){return this._fonts.reduce((e,t)=>`${e} - @font-face { - font-family: "${t.family}"; - src: url('${t.dataSrc}'); - font-weight: ${t.weight}; - font-style: ${t.style}; - font-display: ${t.display}; - }`,this._stylesheet)}get stylesheet(){return this._stylesheet}set stylesheet(e){this._stylesheet!==e&&(this._stylesheet=e,this.styleID++)}normalizeColor(e){return Array.isArray(e)&&(e=jb(e)),typeof e=="number"?zb(e):e}dropShadowToCSS(){let e=this.normalizeColor(this.dropShadowColor);const t=this.dropShadowAlpha,i=Math.round(Math.cos(this.dropShadowAngle)*this.dropShadowDistance),s=Math.round(Math.sin(this.dropShadowAngle)*this.dropShadowDistance);e.startsWith("#")&&t<1&&(e+=(t*255|0).toString(16).padStart(2,"0"));const n=`${i}px ${s}px`;return this.dropShadowBlur>0?`text-shadow: ${n} ${this.dropShadowBlur}px ${e}`:`text-shadow: ${n} ${e}`}reset(){Object.assign(this,zs.defaultOptions)}onBeforeDraw(){const{fontsDirty:e}=this;return this.fontsDirty=!1,this.isSafari&&this._fonts.length>0&&e?new Promise(t=>setTimeout(t,100)):Promise.resolve()}get isSafari(){const{userAgent:e}=ue.ADAPTER.getNavigator();return/^((?!chrome|android).)*safari/i.test(e)}set fillGradientStops(e){console.warn("[HTMLTextStyle] fillGradientStops is not supported by HTMLText")}get fillGradientStops(){return super.fillGradientStops}set fillGradientType(e){console.warn("[HTMLTextStyle] fillGradientType is not supported by HTMLText")}get fillGradientType(){return super.fillGradientType}set miterLimit(e){console.warn("[HTMLTextStyle] miterLimit is not supported by HTMLText")}get miterLimit(){return super.miterLimit}set trim(e){console.warn("[HTMLTextStyle] trim is not supported by HTMLText")}get trim(){return super.trim}set textBaseline(e){console.warn("[HTMLTextStyle] textBaseline is not supported by HTMLText")}get textBaseline(){return super.textBaseline}set leading(e){console.warn("[HTMLTextStyle] leading is not supported by HTMLText")}get leading(){return super.leading}set lineJoin(e){console.warn("[HTMLTextStyle] lineJoin is not supported by HTMLText")}get lineJoin(){return super.lineJoin}};Rc.availableFonts={},Rc.defaultOptions={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,padding:0,stroke:"black",strokeThickness:0,whiteSpace:"normal",wordWrap:!1,wordWrapWidth:100};let fh=Rc;const eo=class js extends Fe{constructor(e="",t={}){super(ie.EMPTY),this._text=null,this._style=null,this._autoResolution=!0,this.localStyleID=-1,this.dirty=!1,this._updateID=0,this.ownsStyle=!1;const i=new Image,s=ie.from(i,{scaleMode:ue.SCALE_MODE,resourceOptions:{autoLoad:!1}});s.orig=new ke,s.trim=new ke,this.texture=s;const n="http://www.w3.org/2000/svg",a="http://www.w3.org/1999/xhtml",o=document.createElementNS(n,"svg"),l=document.createElementNS(n,"foreignObject"),c=document.createElementNS(a,"div"),u=document.createElementNS(a,"style");l.setAttribute("width","10000"),l.setAttribute("height","10000"),l.style.overflow="hidden",o.appendChild(l),this.maxWidth=js.defaultMaxWidth,this.maxHeight=js.defaultMaxHeight,this._domElement=c,this._styleElement=u,this._svgRoot=o,this._foreignObject=l,this._foreignObject.appendChild(u),this._foreignObject.appendChild(c),this._image=i,this._loadImage=new Image,this._autoResolution=js.defaultAutoResolution,this._resolution=js.defaultResolution??ue.RESOLUTION,this.text=e,this.style=t}measureText(e){const{text:t,style:i,resolution:s}=Object.assign({text:this._text,style:this._style,resolution:this._resolution},e);Object.assign(this._domElement,{innerHTML:t,style:i.toCSS(s)}),this._styleElement.textContent=i.toGlobalCSS(),document.body.appendChild(this._svgRoot);const n=this._domElement.getBoundingClientRect();this._svgRoot.remove();const{width:a,height:o}=n;(a>this.maxWidth||o>this.maxHeight)&&console.warn("[HTMLText] Large expanse of text, increase HTMLText.maxWidth or HTMLText.maxHeight property.");const l=Math.min(this.maxWidth,Math.ceil(a)),c=Math.min(this.maxHeight,Math.ceil(o));return this._svgRoot.setAttribute("width",l.toString()),this._svgRoot.setAttribute("height",c.toString()),t!==this._text&&(this._domElement.innerHTML=this._text),i!==this._style&&(Object.assign(this._domElement,{style:this._style?.toCSS(s)}),this._styleElement.textContent=this._style?.toGlobalCSS()),{width:l+i.padding*2,height:c+i.padding*2}}async updateText(e=!0){const{style:t,_image:i,_loadImage:s}=this;if(this.localStyleID!==t.styleID&&(this.dirty=!0,this.localStyleID=t.styleID),!this.dirty&&e)return;const{width:n,height:a}=this.measureText();i.width=s.width=Math.ceil(Math.max(1,n)),i.height=s.height=Math.ceil(Math.max(1,a)),this._updateID++;const o=this._updateID;await new Promise(l=>{s.onload=async()=>{if(o/gi,"

").replace(/
/gi,"
").replace(/ /gi," ")}};eo.defaultDestroyOptions={texture:!0,children:!1,baseTexture:!0},eo.defaultMaxWidth=2024,eo.defaultMaxHeight=2024,eo.defaultAutoResolution=!0;var $t="top",fi="bottom",mi="right",Xt="left",ud="auto",Ta=[$t,fi,mi,Xt],pn="start",ca="end",sT="clippingParents",Ag="viewport",Dn="popper",nT="reference",xp=Ta.reduce(function(r,e){return r.concat([e+"-"+pn,e+"-"+ca])},[]),Eg=[].concat(Ta,[ud]).reduce(function(r,e){return r.concat([e,e+"-"+pn,e+"-"+ca])},[]),aT="beforeRead",oT="read",lT="afterRead",hT="beforeMain",cT="main",dT="afterMain",uT="beforeWrite",pT="write",fT="afterWrite",mT=[aT,oT,lT,hT,cT,dT,uT,pT,fT];function tr(r){return r?(r.nodeName||"").toLowerCase():null}function Jt(r){if(r==null)return window;if(r.toString()!=="[object Window]"){var e=r.ownerDocument;return e&&e.defaultView||window}return r}function Es(r){var e=Jt(r).Element;return r instanceof e||r instanceof Element}function pi(r){var e=Jt(r).HTMLElement;return r instanceof e||r instanceof HTMLElement}function pd(r){if(typeof ShadowRoot>"u")return!1;var e=Jt(r).ShadowRoot;return r instanceof e||r instanceof ShadowRoot}function gT(r){var e=r.state;Object.keys(e.elements).forEach(function(t){var i=e.styles[t]||{},s=e.attributes[t]||{},n=e.elements[t];!pi(n)||!tr(n)||(Object.assign(n.style,i),Object.keys(s).forEach(function(a){var o=s[a];o===!1?n.removeAttribute(a):n.setAttribute(a,o===!0?"":o)}))})}function yT(r){var e=r.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(i){var s=e.elements[i],n=e.attributes[i]||{},a=Object.keys(e.styles.hasOwnProperty(i)?e.styles[i]:t[i]),o=a.reduce(function(l,c){return l[c]="",l},{});!pi(s)||!tr(s)||(Object.assign(s.style,o),Object.keys(n).forEach(function(l){s.removeAttribute(l)}))})}}const Sg={name:"applyStyles",enabled:!0,phase:"write",fn:gT,effect:yT,requires:["computeStyles"]};function Ki(r){return r.split("-")[0]}var ws=Math.max,Xo=Math.min,fn=Math.round;function Lc(){var r=navigator.userAgentData;return r!=null&&r.brands&&Array.isArray(r.brands)?r.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function Cg(){return!/^((?!chrome|android).)*safari/i.test(Lc())}function mn(r,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var i=r.getBoundingClientRect(),s=1,n=1;e&&pi(r)&&(s=r.offsetWidth>0&&fn(i.width)/r.offsetWidth||1,n=r.offsetHeight>0&&fn(i.height)/r.offsetHeight||1);var a=Es(r)?Jt(r):window,o=a.visualViewport,l=!Cg()&&t,c=(i.left+(l&&o?o.offsetLeft:0))/s,u=(i.top+(l&&o?o.offsetTop:0))/n,h=i.width/s,d=i.height/n;return{width:h,height:d,top:u,right:c+h,bottom:u+d,left:c,x:c,y:u}}function fd(r){var e=mn(r),t=r.offsetWidth,i=r.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:r.offsetLeft,y:r.offsetTop,width:t,height:i}}function Mg(r,e){var t=e.getRootNode&&e.getRootNode();if(r.contains(e))return!0;if(t&&pd(t)){var i=e;do{if(i&&r.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function yr(r){return Jt(r).getComputedStyle(r)}function vT(r){return["table","td","th"].indexOf(tr(r))>=0}function Yr(r){return((Es(r)?r.ownerDocument:r.document)||window.document).documentElement}function pl(r){return tr(r)==="html"?r:r.assignedSlot||r.parentNode||(pd(r)?r.host:null)||Yr(r)}function Tp(r){return!pi(r)||yr(r).position==="fixed"?null:r.offsetParent}function bT(r){var e=/firefox/i.test(Lc()),t=/Trident/i.test(Lc());if(t&&pi(r)){var i=yr(r);if(i.position==="fixed")return null}var s=pl(r);for(pd(s)&&(s=s.host);pi(s)&&["html","body"].indexOf(tr(s))<0;){var n=yr(s);if(n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].indexOf(n.willChange)!==-1||e&&n.willChange==="filter"||e&&n.filter&&n.filter!=="none")return s;s=s.parentNode}return null}function Aa(r){for(var e=Jt(r),t=Tp(r);t&&vT(t)&&yr(t).position==="static";)t=Tp(t);return t&&(tr(t)==="html"||tr(t)==="body"&&yr(t).position==="static")?e:t||bT(r)||e}function md(r){return["top","bottom"].indexOf(r)>=0?"x":"y"}function ta(r,e,t){return ws(r,Xo(e,t))}function wT(r,e,t){var i=ta(r,e,t);return i>t?t:i}function kg(){return{top:0,right:0,bottom:0,left:0}}function Ig(r){return Object.assign({},kg(),r)}function Pg(r,e){return e.reduce(function(t,i){return t[i]=r,t},{})}var _T=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,Ig(typeof e!="number"?e:Pg(e,Ta))};function xT(r){var e,t=r.state,i=r.name,s=r.options,n=t.elements.arrow,a=t.modifiersData.popperOffsets,o=Ki(t.placement),l=md(o),c=[Xt,mi].indexOf(o)>=0,u=c?"height":"width";if(!(!n||!a)){var h=_T(s.padding,t),d=fd(n),p=l==="y"?$t:Xt,f=l==="y"?fi:mi,m=t.rects.reference[u]+t.rects.reference[l]-a[l]-t.rects.popper[u],g=a[l]-t.rects.reference[l],y=Aa(n),w=y?l==="y"?y.clientHeight||0:y.clientWidth||0:0,b=m/2-g/2,v=h[p],A=w-d[u]-h[f],C=w/2-d[u]/2+b,I=ta(v,C,A),L=l;t.modifiersData[i]=(e={},e[L]=I,e.centerOffset=I-C,e)}}function TT(r){var e=r.state,t=r.options,i=t.element,s=i===void 0?"[data-popper-arrow]":i;s!=null&&(typeof s=="string"&&(s=e.elements.popper.querySelector(s),!s)||Mg(e.elements.popper,s)&&(e.elements.arrow=s))}const AT={name:"arrow",enabled:!0,phase:"main",fn:xT,effect:TT,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function gn(r){return r.split("-")[1]}var ET={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ST(r,e){var t=r.x,i=r.y,s=e.devicePixelRatio||1;return{x:fn(t*s)/s||0,y:fn(i*s)/s||0}}function Ap(r){var e,t=r.popper,i=r.popperRect,s=r.placement,n=r.variation,a=r.offsets,o=r.position,l=r.gpuAcceleration,c=r.adaptive,u=r.roundOffsets,h=r.isFixed,d=a.x,p=d===void 0?0:d,f=a.y,m=f===void 0?0:f,g=typeof u=="function"?u({x:p,y:m}):{x:p,y:m};p=g.x,m=g.y;var y=a.hasOwnProperty("x"),w=a.hasOwnProperty("y"),b=Xt,v=$t,A=window;if(c){var C=Aa(t),I="clientHeight",L="clientWidth";if(C===Jt(t)&&(C=Yr(t),yr(C).position!=="static"&&o==="absolute"&&(I="scrollHeight",L="scrollWidth")),C=C,s===$t||(s===Xt||s===mi)&&n===ca){v=fi;var k=h&&C===A&&A.visualViewport?A.visualViewport.height:C[I];m-=k-i.height,m*=l?1:-1}if(s===Xt||(s===$t||s===fi)&&n===ca){b=mi;var N=h&&C===A&&A.visualViewport?A.visualViewport.width:C[L];p-=N-i.width,p*=l?1:-1}}var G=Object.assign({position:o},c&&ET),E=u===!0?ST({x:p,y:m},Jt(t)):{x:p,y:m};if(p=E.x,m=E.y,l){var S;return Object.assign({},G,(S={},S[v]=w?"0":"",S[b]=y?"0":"",S.transform=(A.devicePixelRatio||1)<=1?"translate("+p+"px, "+m+"px)":"translate3d("+p+"px, "+m+"px, 0)",S))}return Object.assign({},G,(e={},e[v]=w?m+"px":"",e[b]=y?p+"px":"",e.transform="",e))}function CT(r){var e=r.state,t=r.options,i=t.gpuAcceleration,s=i===void 0?!0:i,n=t.adaptive,a=n===void 0?!0:n,o=t.roundOffsets,l=o===void 0?!0:o,c={placement:Ki(e.placement),variation:gn(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Ap(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Ap(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const MT={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:CT,data:{}};var to={passive:!0};function kT(r){var e=r.state,t=r.instance,i=r.options,s=i.scroll,n=s===void 0?!0:s,a=i.resize,o=a===void 0?!0:a,l=Jt(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return n&&c.forEach(function(u){u.addEventListener("scroll",t.update,to)}),o&&l.addEventListener("resize",t.update,to),function(){n&&c.forEach(function(u){u.removeEventListener("scroll",t.update,to)}),o&&l.removeEventListener("resize",t.update,to)}}const IT={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:kT,data:{}};var PT={left:"right",right:"left",bottom:"top",top:"bottom"};function So(r){return r.replace(/left|right|bottom|top/g,function(e){return PT[e]})}var BT={start:"end",end:"start"};function Ep(r){return r.replace(/start|end/g,function(e){return BT[e]})}function gd(r){var e=Jt(r),t=e.pageXOffset,i=e.pageYOffset;return{scrollLeft:t,scrollTop:i}}function yd(r){return mn(Yr(r)).left+gd(r).scrollLeft}function RT(r,e){var t=Jt(r),i=Yr(r),s=t.visualViewport,n=i.clientWidth,a=i.clientHeight,o=0,l=0;if(s){n=s.width,a=s.height;var c=Cg();(c||!c&&e==="fixed")&&(o=s.offsetLeft,l=s.offsetTop)}return{width:n,height:a,x:o+yd(r),y:l}}function LT(r){var e,t=Yr(r),i=gd(r),s=(e=r.ownerDocument)==null?void 0:e.body,n=ws(t.scrollWidth,t.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),a=ws(t.scrollHeight,t.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),o=-i.scrollLeft+yd(r),l=-i.scrollTop;return yr(s||t).direction==="rtl"&&(o+=ws(t.clientWidth,s?s.clientWidth:0)-n),{width:n,height:a,x:o,y:l}}function vd(r){var e=yr(r),t=e.overflow,i=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+s+i)}function Bg(r){return["html","body","#document"].indexOf(tr(r))>=0?r.ownerDocument.body:pi(r)&&vd(r)?r:Bg(pl(r))}function ia(r,e){var t;e===void 0&&(e=[]);var i=Bg(r),s=i===((t=r.ownerDocument)==null?void 0:t.body),n=Jt(i),a=s?[n].concat(n.visualViewport||[],vd(i)?i:[]):i,o=e.concat(a);return s?o:o.concat(ia(pl(a)))}function Dc(r){return Object.assign({},r,{left:r.x,top:r.y,right:r.x+r.width,bottom:r.y+r.height})}function DT(r,e){var t=mn(r,!1,e==="fixed");return t.top=t.top+r.clientTop,t.left=t.left+r.clientLeft,t.bottom=t.top+r.clientHeight,t.right=t.left+r.clientWidth,t.width=r.clientWidth,t.height=r.clientHeight,t.x=t.left,t.y=t.top,t}function Sp(r,e,t){return e===Ag?Dc(RT(r,t)):Es(e)?DT(e,t):Dc(LT(Yr(r)))}function OT(r){var e=ia(pl(r)),t=["absolute","fixed"].indexOf(yr(r).position)>=0,i=t&&pi(r)?Aa(r):r;return Es(i)?e.filter(function(s){return Es(s)&&Mg(s,i)&&tr(s)!=="body"}):[]}function FT(r,e,t,i){var s=e==="clippingParents"?OT(r):[].concat(e),n=[].concat(s,[t]),a=n[0],o=n.reduce(function(l,c){var u=Sp(r,c,i);return l.top=ws(u.top,l.top),l.right=Xo(u.right,l.right),l.bottom=Xo(u.bottom,l.bottom),l.left=ws(u.left,l.left),l},Sp(r,a,i));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function Rg(r){var e=r.reference,t=r.element,i=r.placement,s=i?Ki(i):null,n=i?gn(i):null,a=e.x+e.width/2-t.width/2,o=e.y+e.height/2-t.height/2,l;switch(s){case $t:l={x:a,y:e.y-t.height};break;case fi:l={x:a,y:e.y+e.height};break;case mi:l={x:e.x+e.width,y:o};break;case Xt:l={x:e.x-t.width,y:o};break;default:l={x:e.x,y:e.y}}var c=s?md(s):null;if(c!=null){var u=c==="y"?"height":"width";switch(n){case pn:l[c]=l[c]-(e[u]/2-t[u]/2);break;case ca:l[c]=l[c]+(e[u]/2-t[u]/2);break}}return l}function da(r,e){e===void 0&&(e={});var t=e,i=t.placement,s=i===void 0?r.placement:i,n=t.strategy,a=n===void 0?r.strategy:n,o=t.boundary,l=o===void 0?sT:o,c=t.rootBoundary,u=c===void 0?Ag:c,h=t.elementContext,d=h===void 0?Dn:h,p=t.altBoundary,f=p===void 0?!1:p,m=t.padding,g=m===void 0?0:m,y=Ig(typeof g!="number"?g:Pg(g,Ta)),w=d===Dn?nT:Dn,b=r.rects.popper,v=r.elements[f?w:d],A=FT(Es(v)?v:v.contextElement||Yr(r.elements.popper),l,u,a),C=mn(r.elements.reference),I=Rg({reference:C,element:b,strategy:"absolute",placement:s}),L=Dc(Object.assign({},b,I)),k=d===Dn?L:C,N={top:A.top-k.top+y.top,bottom:k.bottom-A.bottom+y.bottom,left:A.left-k.left+y.left,right:k.right-A.right+y.right},G=r.modifiersData.offset;if(d===Dn&&G){var E=G[s];Object.keys(N).forEach(function(S){var x=[mi,fi].indexOf(S)>=0?1:-1,D=[$t,fi].indexOf(S)>=0?"y":"x";N[S]+=E[D]*x})}return N}function NT(r,e){e===void 0&&(e={});var t=e,i=t.placement,s=t.boundary,n=t.rootBoundary,a=t.padding,o=t.flipVariations,l=t.allowedAutoPlacements,c=l===void 0?Eg:l,u=gn(i),h=u?o?xp:xp.filter(function(f){return gn(f)===u}):Ta,d=h.filter(function(f){return c.indexOf(f)>=0});d.length===0&&(d=h);var p=d.reduce(function(f,m){return f[m]=da(r,{placement:m,boundary:s,rootBoundary:n,padding:a})[Ki(m)],f},{});return Object.keys(p).sort(function(f,m){return p[f]-p[m]})}function UT(r){if(Ki(r)===ud)return[];var e=So(r);return[Ep(r),e,Ep(e)]}function HT(r){var e=r.state,t=r.options,i=r.name;if(!e.modifiersData[i]._skip){for(var s=t.mainAxis,n=s===void 0?!0:s,a=t.altAxis,o=a===void 0?!0:a,l=t.fallbackPlacements,c=t.padding,u=t.boundary,h=t.rootBoundary,d=t.altBoundary,p=t.flipVariations,f=p===void 0?!0:p,m=t.allowedAutoPlacements,g=e.options.placement,y=Ki(g),w=y===g,b=l||(w||!f?[So(g)]:UT(g)),v=[g].concat(b).reduce(function(Q,Z){return Q.concat(Ki(Z)===ud?NT(e,{placement:Z,boundary:u,rootBoundary:h,padding:c,flipVariations:f,allowedAutoPlacements:m}):Z)},[]),A=e.rects.reference,C=e.rects.popper,I=new Map,L=!0,k=v[0],N=0;N=0,D=x?"width":"height",$=da(e,{placement:G,boundary:u,rootBoundary:h,altBoundary:d,padding:c}),R=x?S?mi:Xt:S?fi:$t;A[D]>C[D]&&(R=So(R));var O=So(R),W=[];if(n&&W.push($[E]<=0),o&&W.push($[R]<=0,$[O]<=0),W.every(function(Q){return Q})){k=G,L=!1;break}I.set(G,W)}if(L)for(var V=f?3:1,F=function(Z){var ye=v.find(function(Ce){var ce=I.get(Ce);if(ce)return ce.slice(0,Z).every(function(fe){return fe})});if(ye)return k=ye,"break"},U=V;U>0;U--){var te=F(U);if(te==="break")break}e.placement!==k&&(e.modifiersData[i]._skip=!0,e.placement=k,e.reset=!0)}}const GT={name:"flip",enabled:!0,phase:"main",fn:HT,requiresIfExists:["offset"],data:{_skip:!1}};function Cp(r,e,t){return t===void 0&&(t={x:0,y:0}),{top:r.top-e.height-t.y,right:r.right-e.width+t.x,bottom:r.bottom-e.height+t.y,left:r.left-e.width-t.x}}function Mp(r){return[$t,mi,fi,Xt].some(function(e){return r[e]>=0})}function VT(r){var e=r.state,t=r.name,i=e.rects.reference,s=e.rects.popper,n=e.modifiersData.preventOverflow,a=da(e,{elementContext:"reference"}),o=da(e,{altBoundary:!0}),l=Cp(a,i),c=Cp(o,s,n),u=Mp(l),h=Mp(c);e.modifiersData[t]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:h},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":h})}const WT={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:VT};function zT(r,e,t){var i=Ki(r),s=[Xt,$t].indexOf(i)>=0?-1:1,n=typeof t=="function"?t(Object.assign({},e,{placement:r})):t,a=n[0],o=n[1];return a=a||0,o=(o||0)*s,[Xt,mi].indexOf(i)>=0?{x:o,y:a}:{x:a,y:o}}function jT(r){var e=r.state,t=r.options,i=r.name,s=t.offset,n=s===void 0?[0,0]:s,a=Eg.reduce(function(u,h){return u[h]=zT(h,e.rects,n),u},{}),o=a[e.placement],l=o.x,c=o.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[i]=a}const $T={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:jT};function XT(r){var e=r.state,t=r.name;e.modifiersData[t]=Rg({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const YT={name:"popperOffsets",enabled:!0,phase:"read",fn:XT,data:{}};function qT(r){return r==="x"?"y":"x"}function KT(r){var e=r.state,t=r.options,i=r.name,s=t.mainAxis,n=s===void 0?!0:s,a=t.altAxis,o=a===void 0?!1:a,l=t.boundary,c=t.rootBoundary,u=t.altBoundary,h=t.padding,d=t.tether,p=d===void 0?!0:d,f=t.tetherOffset,m=f===void 0?0:f,g=da(e,{boundary:l,rootBoundary:c,padding:h,altBoundary:u}),y=Ki(e.placement),w=gn(e.placement),b=!w,v=md(y),A=qT(v),C=e.modifiersData.popperOffsets,I=e.rects.reference,L=e.rects.popper,k=typeof m=="function"?m(Object.assign({},e.rects,{placement:e.placement})):m,N=typeof k=="number"?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),G=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,E={x:0,y:0};if(C){if(n){var S,x=v==="y"?$t:Xt,D=v==="y"?fi:mi,$=v==="y"?"height":"width",R=C[v],O=R+g[x],W=R-g[D],V=p?-L[$]/2:0,F=w===pn?I[$]:L[$],U=w===pn?-L[$]:-I[$],te=e.elements.arrow,Q=p&&te?fd(te):{width:0,height:0},Z=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:kg(),ye=Z[x],Ce=Z[D],ce=ta(0,I[$],Q[$]),fe=b?I[$]/2-V-ce-ye-N.mainAxis:F-ce-ye-N.mainAxis,we=b?-I[$]/2+V+ce+Ce+N.mainAxis:U+ce+Ce+N.mainAxis,le=e.elements.arrow&&Aa(e.elements.arrow),pe=le?v==="y"?le.clientTop||0:le.clientLeft||0:0,be=(S=G?.[v])!=null?S:0,T=R+fe-be-pe,X=R+we-be,j=ta(p?Xo(O,T):O,R,p?ws(W,X):W);C[v]=j,E[v]=j-R}if(o){var P,M=v==="x"?$t:Xt,H=v==="x"?fi:mi,J=C[A],ee=A==="y"?"height":"width",z=J+g[M],re=J-g[H],he=[$t,Xt].indexOf(y)!==-1,ne=(P=G?.[A])!=null?P:0,_e=he?z:J-I[ee]-L[ee]-ne+N.altAxis,Xe=he?J+I[ee]+L[ee]-ne-N.altAxis:re,Ne=p&&he?wT(_e,J,Xe):ta(p?_e:z,J,p?Xe:re);C[A]=Ne,E[A]=Ne-J}e.modifiersData[i]=E}}const ZT={name:"preventOverflow",enabled:!0,phase:"main",fn:KT,requiresIfExists:["offset"]};function JT(r){return{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}}function QT(r){return r===Jt(r)||!pi(r)?gd(r):JT(r)}function eA(r){var e=r.getBoundingClientRect(),t=fn(e.width)/r.offsetWidth||1,i=fn(e.height)/r.offsetHeight||1;return t!==1||i!==1}function tA(r,e,t){t===void 0&&(t=!1);var i=pi(e),s=pi(e)&&eA(e),n=Yr(e),a=mn(r,s,t),o={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!t)&&((tr(e)!=="body"||vd(n))&&(o=QT(e)),pi(e)?(l=mn(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):n&&(l.x=yd(n))),{x:a.left+o.scrollLeft-l.x,y:a.top+o.scrollTop-l.y,width:a.width,height:a.height}}function iA(r){var e=new Map,t=new Set,i=[];r.forEach(function(n){e.set(n.name,n)});function s(n){t.add(n.name);var a=[].concat(n.requires||[],n.requiresIfExists||[]);a.forEach(function(o){if(!t.has(o)){var l=e.get(o);l&&s(l)}}),i.push(n)}return r.forEach(function(n){t.has(n.name)||s(n)}),i}function rA(r){var e=iA(r);return mT.reduce(function(t,i){return t.concat(e.filter(function(s){return s.phase===i}))},[])}function sA(r){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(r())})})),e}}function nA(r){var e=r.reduce(function(t,i){var s=t[i.name];return t[i.name]=s?Object.assign({},s,i,{options:Object.assign({},s.options,i.options),data:Object.assign({},s.data,i.data)}):i,t},{});return Object.keys(e).map(function(t){return e[t]})}var kp={placement:"bottom",modifiers:[],strategy:"absolute"};function Ip(){for(var r=arguments.length,e=new Array(r),t=0;t-1}function Ng(r,e){return typeof r=="function"?r.apply(void 0,e):r}function Pp(r,e){if(e===0)return r;var t;return function(i){clearTimeout(t),t=setTimeout(function(){r(i)},e)}}function dA(r){return r.split(/\s+/).filter(Boolean)}function $s(r){return[].concat(r)}function Bp(r,e){r.indexOf(e)===-1&&r.push(e)}function uA(r){return r.filter(function(e,t){return r.indexOf(e)===t})}function pA(r){return r.split("-")[0]}function Yo(r){return[].slice.call(r)}function Rp(r){return Object.keys(r).reduce(function(e,t){return r[t]!==void 0&&(e[t]=r[t]),e},{})}function ra(){return document.createElement("div")}function fl(r){return["Element","Fragment"].some(function(e){return bd(r,e)})}function fA(r){return bd(r,"NodeList")}function mA(r){return bd(r,"MouseEvent")}function gA(r){return!!(r&&r._tippy&&r._tippy.reference===r)}function yA(r){return fl(r)?[r]:fA(r)?Yo(r):Array.isArray(r)?r:Yo(document.querySelectorAll(r))}function gh(r,e){r.forEach(function(t){t&&(t.style.transitionDuration=e+"ms")})}function Lp(r,e){r.forEach(function(t){t&&t.setAttribute("data-state",e)})}function vA(r){var e,t=$s(r),i=t[0];return i!=null&&(e=i.ownerDocument)!=null&&e.body?i.ownerDocument:document}function bA(r,e){var t=e.clientX,i=e.clientY;return r.every(function(s){var n=s.popperRect,a=s.popperState,o=s.props,l=o.interactiveBorder,c=pA(a.placement),u=a.modifiersData.offset;if(!u)return!0;var h=c==="bottom"?u.top.y:0,d=c==="top"?u.bottom.y:0,p=c==="right"?u.left.x:0,f=c==="left"?u.right.x:0,m=n.top-i+h>l,g=i-n.bottom-d>l,y=n.left-t+p>l,w=t-n.right-f>l;return m||g||y||w})}function yh(r,e,t){var i=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(s){r[i](s,t)})}function Dp(r,e){for(var t=e;t;){var i;if(r.contains(t))return!0;t=t.getRootNode==null||(i=t.getRootNode())==null?void 0:i.host}return!1}var zi={isTouch:!1},Op=0;function wA(){zi.isTouch||(zi.isTouch=!0,window.performance&&document.addEventListener("mousemove",Ug))}function Ug(){var r=performance.now();r-Op<20&&(zi.isTouch=!1,document.removeEventListener("mousemove",Ug)),Op=r}function _A(){var r=document.activeElement;if(gA(r)){var e=r._tippy;r.blur&&!e.state.isVisible&&r.blur()}}function xA(){document.addEventListener("touchstart",wA,as),window.addEventListener("blur",_A)}var TA=typeof window<"u"&&typeof document<"u",AA=TA?!!window.msCrypto:!1,EA={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},SA={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Ei=Object.assign({appendTo:Fg,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},EA,SA),CA=Object.keys(Ei),MA=function(e){var t=Object.keys(e);t.forEach(function(i){Ei[i]=e[i]})};function Hg(r){var e=r.plugins||[],t=e.reduce(function(i,s){var n=s.name,a=s.defaultValue;if(n){var o;i[n]=r[n]!==void 0?r[n]:(o=Ei[n])!=null?o:a}return i},{});return Object.assign({},r,t)}function kA(r,e){var t=e?Object.keys(Hg(Object.assign({},Ei,{plugins:e}))):CA,i=t.reduce(function(s,n){var a=(r.getAttribute("data-tippy-"+n)||"").trim();if(!a)return s;if(n==="content")s[n]=a;else try{s[n]=JSON.parse(a)}catch{s[n]=a}return s},{});return i}function Fp(r,e){var t=Object.assign({},e,{content:Ng(e.content,[r])},e.ignoreAttributes?{}:kA(r,e.plugins));return t.aria=Object.assign({},Ei.aria,t.aria),t.aria={expanded:t.aria.expanded==="auto"?e.interactive:t.aria.expanded,content:t.aria.content==="auto"?e.interactive?null:"describedby":t.aria.content},t}var IA=function(){return"innerHTML"};function Oc(r,e){r[IA()]=e}function Np(r){var e=ra();return r===!0?e.className=Dg:(e.className=Og,fl(r)?e.appendChild(r):Oc(e,r)),e}function Up(r,e){fl(e.content)?(Oc(r,""),r.appendChild(e.content)):typeof e.content!="function"&&(e.allowHTML?Oc(r,e.content):r.textContent=e.content)}function Fc(r){var e=r.firstElementChild,t=Yo(e.children);return{box:e,content:t.find(function(i){return i.classList.contains(Lg)}),arrow:t.find(function(i){return i.classList.contains(Dg)||i.classList.contains(Og)}),backdrop:t.find(function(i){return i.classList.contains(cA)})}}function Gg(r){var e=ra(),t=ra();t.className=hA,t.setAttribute("data-state","hidden"),t.setAttribute("tabindex","-1");var i=ra();i.className=Lg,i.setAttribute("data-state","hidden"),Up(i,r.props),e.appendChild(t),t.appendChild(i),s(r.props,r.props);function s(n,a){var o=Fc(e),l=o.box,c=o.content,u=o.arrow;a.theme?l.setAttribute("data-theme",a.theme):l.removeAttribute("data-theme"),typeof a.animation=="string"?l.setAttribute("data-animation",a.animation):l.removeAttribute("data-animation"),a.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth=typeof a.maxWidth=="number"?a.maxWidth+"px":a.maxWidth,a.role?l.setAttribute("role",a.role):l.removeAttribute("role"),(n.content!==a.content||n.allowHTML!==a.allowHTML)&&Up(c,r.props),a.arrow?u?n.arrow!==a.arrow&&(l.removeChild(u),l.appendChild(Np(a.arrow))):l.appendChild(Np(a.arrow)):u&&l.removeChild(u)}return{popper:e,onUpdate:s}}Gg.$$tippy=!0;var PA=1,io=[],vh=[];function BA(r,e){var t=Fp(r,Object.assign({},Ei,Hg(Rp(e)))),i,s,n,a=!1,o=!1,l=!1,c=!1,u,h,d,p=[],f=Pp(T,t.interactiveDebounce),m,g=PA++,y=null,w=uA(t.plugins),b={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},v={id:g,reference:r,popper:ra(),popperInstance:y,props:t,state:b,plugins:w,clearDelayTimeouts:_e,setProps:Xe,setContent:Ne,show:Gt,hide:Kr,hideWithInteractivity:Qt,enable:he,disable:ne,unmount:Zr,destroy:ot};if(!t.render)return v;var A=t.render(v),C=A.popper,I=A.onUpdate;C.setAttribute("data-tippy-root",""),C.id="tippy-"+v.id,v.popper=C,r._tippy=v,C._tippy=v;var L=w.map(function(Y){return Y.fn(v)}),k=r.hasAttribute("aria-expanded");return le(),V(),R(),O("onCreate",[v]),t.showOnCreate&&z(),C.addEventListener("mouseenter",function(){v.props.interactive&&v.state.isVisible&&v.clearDelayTimeouts()}),C.addEventListener("mouseleave",function(){v.props.interactive&&v.props.trigger.indexOf("mouseenter")>=0&&x().addEventListener("mousemove",f)}),v;function N(){var Y=v.props.touch;return Array.isArray(Y)?Y:[Y,0]}function G(){return N()[0]==="hold"}function E(){var Y;return!!((Y=v.props.render)!=null&&Y.$$tippy)}function S(){return m||r}function x(){var Y=S().parentNode;return Y?vA(Y):document}function D(){return Fc(C)}function $(Y){return v.state.isMounted&&!v.state.isVisible||zi.isTouch||u&&u.type==="focus"?0:mh(v.props.delay,Y?0:1,Ei.delay)}function R(Y){Y===void 0&&(Y=!1),C.style.pointerEvents=v.props.interactive&&!Y?"":"none",C.style.zIndex=""+v.props.zIndex}function O(Y,me,Te){if(Te===void 0&&(Te=!0),L.forEach(function(Ve){Ve[Y]&&Ve[Y].apply(Ve,me)}),Te){var $e;($e=v.props)[Y].apply($e,me)}}function W(){var Y=v.props.aria;if(Y.content){var me="aria-"+Y.content,Te=C.id,$e=$s(v.props.triggerTarget||r);$e.forEach(function(Ve){var Ct=Ve.getAttribute(me);if(v.state.isVisible)Ve.setAttribute(me,Ct?Ct+" "+Te:Te);else{var Vt=Ct&&Ct.replace(Te,"").trim();Vt?Ve.setAttribute(me,Vt):Ve.removeAttribute(me)}})}}function V(){if(!(k||!v.props.aria.expanded)){var Y=$s(v.props.triggerTarget||r);Y.forEach(function(me){v.props.interactive?me.setAttribute("aria-expanded",v.state.isVisible&&me===S()?"true":"false"):me.removeAttribute("aria-expanded")})}}function F(){x().removeEventListener("mousemove",f),io=io.filter(function(Y){return Y!==f})}function U(Y){if(!(zi.isTouch&&(l||Y.type==="mousedown"))){var me=Y.composedPath&&Y.composedPath()[0]||Y.target;if(!(v.props.interactive&&Dp(C,me))){if($s(v.props.triggerTarget||r).some(function(Te){return Dp(Te,me)})){if(zi.isTouch||v.state.isVisible&&v.props.trigger.indexOf("click")>=0)return}else O("onClickOutside",[v,Y]);v.props.hideOnClick===!0&&(v.clearDelayTimeouts(),v.hide(),o=!0,setTimeout(function(){o=!1}),v.state.isMounted||ye())}}}function te(){l=!0}function Q(){l=!1}function Z(){var Y=x();Y.addEventListener("mousedown",U,!0),Y.addEventListener("touchend",U,as),Y.addEventListener("touchstart",Q,as),Y.addEventListener("touchmove",te,as)}function ye(){var Y=x();Y.removeEventListener("mousedown",U,!0),Y.removeEventListener("touchend",U,as),Y.removeEventListener("touchstart",Q,as),Y.removeEventListener("touchmove",te,as)}function Ce(Y,me){fe(Y,function(){!v.state.isVisible&&C.parentNode&&C.parentNode.contains(C)&&me()})}function ce(Y,me){fe(Y,me)}function fe(Y,me){var Te=D().box;function $e(Ve){Ve.target===Te&&(yh(Te,"remove",$e),me())}if(Y===0)return me();yh(Te,"remove",h),yh(Te,"add",$e),h=$e}function we(Y,me,Te){Te===void 0&&(Te=!1);var $e=$s(v.props.triggerTarget||r);$e.forEach(function(Ve){Ve.addEventListener(Y,me,Te),p.push({node:Ve,eventType:Y,handler:me,options:Te})})}function le(){G()&&(we("touchstart",be,{passive:!0}),we("touchend",X,{passive:!0})),dA(v.props.trigger).forEach(function(Y){if(Y!=="manual")switch(we(Y,be),Y){case"mouseenter":we("mouseleave",X);break;case"focus":we(AA?"focusout":"blur",j);break;case"focusin":we("focusout",j);break}})}function pe(){p.forEach(function(Y){var me=Y.node,Te=Y.eventType,$e=Y.handler,Ve=Y.options;me.removeEventListener(Te,$e,Ve)}),p=[]}function be(Y){var me,Te=!1;if(!(!v.state.isEnabled||P(Y)||o)){var $e=((me=u)==null?void 0:me.type)==="focus";u=Y,m=Y.currentTarget,V(),!v.state.isVisible&&mA(Y)&&io.forEach(function(Ve){return Ve(Y)}),Y.type==="click"&&(v.props.trigger.indexOf("mouseenter")<0||a)&&v.props.hideOnClick!==!1&&v.state.isVisible?Te=!0:z(Y),Y.type==="click"&&(a=!Te),Te&&!$e&&re(Y)}}function T(Y){var me=Y.target,Te=S().contains(me)||C.contains(me);if(!(Y.type==="mousemove"&&Te)){var $e=ee().concat(C).map(function(Ve){var Ct,Vt=Ve._tippy,rr=(Ct=Vt.popperInstance)==null?void 0:Ct.state;return rr?{popperRect:Ve.getBoundingClientRect(),popperState:rr,props:t}:null}).filter(Boolean);bA($e,Y)&&(F(),re(Y))}}function X(Y){var me=P(Y)||v.props.trigger.indexOf("click")>=0&&a;if(!me){if(v.props.interactive){v.hideWithInteractivity(Y);return}re(Y)}}function j(Y){v.props.trigger.indexOf("focusin")<0&&Y.target!==S()||v.props.interactive&&Y.relatedTarget&&C.contains(Y.relatedTarget)||re(Y)}function P(Y){return zi.isTouch?G()!==Y.type.indexOf("touch")>=0:!1}function M(){H();var Y=v.props,me=Y.popperOptions,Te=Y.placement,$e=Y.offset,Ve=Y.getReferenceClientRect,Ct=Y.moveTransition,Vt=E()?Fc(C).arrow:null,rr=Ve?{getBoundingClientRect:Ve,contextElement:Ve.contextElement||S()}:r,xr={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Ca){var ks=Ca.state;if(E()){var Iy=D(),Ml=Iy.box;["placement","reference-hidden","escaped"].forEach(function(Ma){Ma==="placement"?Ml.setAttribute("data-placement",ks.placement):ks.attributes.popper["data-popper-"+Ma]?Ml.setAttribute("data-"+Ma,""):Ml.removeAttribute("data-"+Ma)}),ks.attributes.popper={}}}},ei=[{name:"offset",options:{offset:$e}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!Ct}},xr];E()&&Vt&&ei.push({name:"arrow",options:{element:Vt,padding:3}}),ei.push.apply(ei,me?.modifiers||[]),v.popperInstance=lA(rr,C,Object.assign({},me,{placement:Te,onFirstUpdate:d,modifiers:ei}))}function H(){v.popperInstance&&(v.popperInstance.destroy(),v.popperInstance=null)}function J(){var Y=v.props.appendTo,me,Te=S();v.props.interactive&&Y===Fg||Y==="parent"?me=Te.parentNode:me=Ng(Y,[Te]),me.contains(C)||me.appendChild(C),v.state.isMounted=!0,M()}function ee(){return Yo(C.querySelectorAll("[data-tippy-root]"))}function z(Y){v.clearDelayTimeouts(),Y&&O("onTrigger",[v,Y]),Z();var me=$(!0),Te=N(),$e=Te[0],Ve=Te[1];zi.isTouch&&$e==="hold"&&Ve&&(me=Ve),me?i=setTimeout(function(){v.show()},me):v.show()}function re(Y){if(v.clearDelayTimeouts(),O("onUntrigger",[v,Y]),!v.state.isVisible){ye();return}if(!(v.props.trigger.indexOf("mouseenter")>=0&&v.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(Y.type)>=0&&a)){var me=$(!1);me?s=setTimeout(function(){v.state.isVisible&&v.hide()},me):n=requestAnimationFrame(function(){v.hide()})}}function he(){v.state.isEnabled=!0}function ne(){v.hide(),v.state.isEnabled=!1}function _e(){clearTimeout(i),clearTimeout(s),cancelAnimationFrame(n)}function Xe(Y){if(!v.state.isDestroyed){O("onBeforeUpdate",[v,Y]),pe();var me=v.props,Te=Fp(r,Object.assign({},me,Rp(Y),{ignoreAttributes:!0}));v.props=Te,le(),me.interactiveDebounce!==Te.interactiveDebounce&&(F(),f=Pp(T,Te.interactiveDebounce)),me.triggerTarget&&!Te.triggerTarget?$s(me.triggerTarget).forEach(function($e){$e.removeAttribute("aria-expanded")}):Te.triggerTarget&&r.removeAttribute("aria-expanded"),V(),R(),I&&I(me,Te),v.popperInstance&&(M(),ee().forEach(function($e){requestAnimationFrame($e._tippy.popperInstance.forceUpdate)})),O("onAfterUpdate",[v,Y])}}function Ne(Y){v.setProps({content:Y})}function Gt(){var Y=v.state.isVisible,me=v.state.isDestroyed,Te=!v.state.isEnabled,$e=zi.isTouch&&!v.props.touch,Ve=mh(v.props.duration,0,Ei.duration);if(!(Y||me||Te||$e)&&!S().hasAttribute("disabled")&&(O("onShow",[v],!1),v.props.onShow(v)!==!1)){if(v.state.isVisible=!0,E()&&(C.style.visibility="visible"),R(),Z(),v.state.isMounted||(C.style.transition="none"),E()){var Ct=D(),Vt=Ct.box,rr=Ct.content;gh([Vt,rr],0)}d=function(){var ei;if(!(!v.state.isVisible||c)){if(c=!0,C.offsetHeight,C.style.transition=v.props.moveTransition,E()&&v.props.animation){var Cl=D(),Ca=Cl.box,ks=Cl.content;gh([Ca,ks],Ve),Lp([Ca,ks],"visible")}W(),V(),Bp(vh,v),(ei=v.popperInstance)==null||ei.forceUpdate(),O("onMount",[v]),v.props.animation&&E()&&ce(Ve,function(){v.state.isShown=!0,O("onShown",[v])})}},J()}}function Kr(){var Y=!v.state.isVisible,me=v.state.isDestroyed,Te=!v.state.isEnabled,$e=mh(v.props.duration,1,Ei.duration);if(!(Y||me||Te)&&(O("onHide",[v],!1),v.props.onHide(v)!==!1)){if(v.state.isVisible=!1,v.state.isShown=!1,c=!1,a=!1,E()&&(C.style.visibility="hidden"),F(),ye(),R(!0),E()){var Ve=D(),Ct=Ve.box,Vt=Ve.content;v.props.animation&&(gh([Ct,Vt],$e),Lp([Ct,Vt],"hidden"))}W(),V(),v.props.animation?E()&&Ce($e,v.unmount):v.unmount()}}function Qt(Y){x().addEventListener("mousemove",f),Bp(io,f),f(Y)}function Zr(){v.state.isVisible&&v.hide(),v.state.isMounted&&(H(),ee().forEach(function(Y){Y._tippy.unmount()}),C.parentNode&&C.parentNode.removeChild(C),vh=vh.filter(function(Y){return Y!==v}),v.state.isMounted=!1,O("onHidden",[v]))}function ot(){v.state.isDestroyed||(v.clearDelayTimeouts(),v.unmount(),pe(),delete r._tippy,v.state.isDestroyed=!0,O("onDestroy",[v]))}}function Lt(r,e){e===void 0&&(e={});var t=Ei.plugins.concat(e.plugins||[]);xA();var i=Object.assign({},e,{plugins:t}),s=yA(r),n=s.reduce(function(a,o){var l=o&&BA(o,i);return l&&a.push(l),a},[]);return fl(r)?n[0]:n}Lt.defaultProps=Ei;Lt.setDefaultProps=MA;Lt.currentInput=zi;Object.assign({},Sg,{effect:function(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow)}});Lt.setDefaultProps({render:Gg});const RA="modulepreload",LA=function(r){return"/smeditor/"+r},Hp={},Ke=function(e,t,i){if(!t||t.length===0)return e();const s=document.getElementsByTagName("link");return Promise.all(t.map(n=>{if(n=LA(n),n in Hp)return;Hp[n]=!0;const a=n.endsWith(".css"),o=a?'[rel="stylesheet"]':"";if(!!i)for(let u=s.length-1;u>=0;u--){const h=s[u];if(h.href===n&&(!a||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${n}"]${o}`))return;const c=document.createElement("link");if(c.rel=a?"stylesheet":RA,a||(c.as="script",c.crossOrigin=""),c.href=n,document.head.appendChild(c),a)return new Promise((u,h)=>{c.addEventListener("load",u),c.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${n}`)))})})).then(()=>e()).catch(n=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=n,window.dispatchEvent(a),!a.defaultPrevented)throw n})},qo={INVALID:["seeking position failed.","InvalidStateError"],GONE:["A requested file or directory could not be found at the time an operation was processed.","NotFoundError"],MISMATCH:["The path supplied exists, but was not an entry of requested type.","TypeMismatchError"],MOD_ERR:["The object can not be modified in this way.","InvalidModificationError"],SYNTAX:r=>[`Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. ${r}`,"SyntaxError"],ABORT:["The operation was aborted","AbortError"],SECURITY:["It was determined that certain files are unsafe for access within a Web application, or that too many calls are being made on file resources.","SecurityError"],DISALLOWED:["The request is not allowed by the user agent or the platform in the current context.","NotAllowedError"]},DA=r=>typeof r=="object"&&typeof r.type<"u";async function OA(r){var e,t,i;const{FolderHandle:s,FileHandle:n}=await Ke(()=>import("./memory-4ca8cdb3.js"),[]),{FileSystemDirectoryHandle:a}=await Ke(()=>Promise.resolve().then(()=>XE),void 0),o=(t=(e=r[0].webkitRelativePath)===null||e===void 0?void 0:e.split("/",1)[0])!==null&&t!==void 0?t:"",l=new s(o,!1);for(let c=0;c(f._entries[m]||(f._entries[m]=new s(m,!1)),f._entries[m]),l);p._entries[d]=new n(u.name,u,!1)}return new a(l)}async function FA(r){const{FileHandle:e}=await Ke(()=>import("./memory-4ca8cdb3.js"),[]),{FileSystemFileHandle:t}=await Ke(()=>Promise.resolve().then(()=>sy),void 0);return Array.from(r).map(s=>new t(new e(s.name,s,!1)))}const Vg=Object.freeze(Object.defineProperty({__proto__:null,errors:qo,isChunkObject:DA,makeDirHandleFromFileList:OA,makeFileHandlesFromFileList:FA},Symbol.toStringTag,{value:"Module"}));var Ko={};/*! howler.js v2.2.4 | (c) 2013-2020, James Simpson of GoldFire Studios | MIT License | howlerjs.com */(function(r){(function(){var e=function(){this.init()};e.prototype={init:function(){var h=this||t;return h._counter=1e3,h._html5AudioPool=[],h.html5PoolSize=10,h._codecs={},h._howls=[],h._muted=!1,h._volume=1,h._canPlayEvent="canplaythrough",h._navigator=typeof window<"u"&&window.navigator?window.navigator:null,h.masterGain=null,h.noAudio=!1,h.usingWebAudio=!0,h.autoSuspend=!0,h.ctx=null,h.autoUnlock=!0,h._setup(),h},volume:function(h){var d=this||t;if(h=parseFloat(h),d.ctx||u(),h!==void 0&&h>=0&&h<=1){if(d._volume=h,d._muted)return d;d.usingWebAudio&&d.masterGain.gain.setValueAtTime(h,t.ctx.currentTime);for(var p=0;p=0;d--)h._howls[d].unload();return h.usingWebAudio&&h.ctx&&h.ctx.close!==void 0&&(h.ctx.close(),h.ctx=null,u()),h},codecs:function(h){return(this||t)._codecs[h.replace(/^x-/,"")]},_setup:function(){var h=this||t;if(h.state=h.ctx&&h.ctx.state||"suspended",h._autoSuspend(),!h.usingWebAudio)if(typeof Audio<"u")try{var d=new Audio;d.oncanplaythrough===void 0&&(h._canPlayEvent="canplay")}catch{h.noAudio=!0}else h.noAudio=!0;try{var d=new Audio;d.muted&&(h.noAudio=!0)}catch{}return h.noAudio||h._setupCodecs(),h},_setupCodecs:function(){var h=this||t,d=null;try{d=typeof Audio<"u"?new Audio:null}catch{return h}if(!d||typeof d.canPlayType!="function")return h;var p=d.canPlayType("audio/mpeg;").replace(/^no$/,""),f=h._navigator?h._navigator.userAgent:"",m=f.match(/OPR\/(\d+)/g),g=m&&parseInt(m[0].split("/")[1],10)<33,y=f.indexOf("Safari")!==-1&&f.indexOf("Chrome")===-1,w=f.match(/Version\/(.*?) /),b=y&&w&&parseInt(w[1],10)<15;return h._codecs={mp3:!(g||!p&&!d.canPlayType("audio/mp3;").replace(/^no$/,"")),mpeg:!!p,opus:!!d.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!d.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!d.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!(d.canPlayType('audio/wav; codecs="1"')||d.canPlayType("audio/wav")).replace(/^no$/,""),aac:!!d.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!d.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(d.canPlayType("audio/x-m4a;")||d.canPlayType("audio/m4a;")||d.canPlayType("audio/aac;")).replace(/^no$/,""),m4b:!!(d.canPlayType("audio/x-m4b;")||d.canPlayType("audio/m4b;")||d.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(d.canPlayType("audio/x-mp4;")||d.canPlayType("audio/mp4;")||d.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!(b||!d.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!(b||!d.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),dolby:!!d.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(d.canPlayType("audio/x-flac;")||d.canPlayType("audio/flac;")).replace(/^no$/,"")},h},_unlockAudio:function(){var h=this||t;if(!h._audioUnlocked&&h.ctx){h._audioUnlocked=!1,h.autoUnlock=!1,h._mobileUnloaded||h.ctx.sampleRate===44100||(h._mobileUnloaded=!0,h.unload()),h._scratchBuffer=h.ctx.createBuffer(1,1,22050);var d=function(p){for(;h._html5AudioPool.length0?y._seek:p._sprite[h][0]/1e3),v=Math.max(0,(p._sprite[h][0]+p._sprite[h][1])/1e3-b),A=1e3*v/Math.abs(y._rate),C=p._sprite[h][0]/1e3,I=(p._sprite[h][0]+p._sprite[h][1])/1e3;y._sprite=h,y._ended=!1;var L=function(){y._paused=!1,y._seek=b,y._start=C,y._stop=I,y._loop=!(!y._loop&&!p._sprite[h][2])};if(b>=I)return void p._ended(y);var k=y._node;if(p._webAudio){var N=function(){p._playLock=!1,L(),p._refreshBuffer(y);var x=y._muted||p._muted?0:y._volume;k.gain.setValueAtTime(x,t.ctx.currentTime),y._playStart=t.ctx.currentTime,k.bufferSource.start===void 0?y._loop?k.bufferSource.noteGrainOn(0,b,86400):k.bufferSource.noteGrainOn(0,b,v):y._loop?k.bufferSource.start(0,b,86400):k.bufferSource.start(0,b,v),A!==1/0&&(p._endTimers[y._id]=setTimeout(p._ended.bind(p,y),A)),d||setTimeout(function(){p._emit("play",y._id),p._loadQueue()},0)};t.state==="running"&&t.ctx.state!=="interrupted"?N():(p._playLock=!0,p.once("resume",N),p._clearTimer(y._id))}else{var G=function(){k.currentTime=b,k.muted=y._muted||p._muted||t._muted||k.muted,k.volume=y._volume*t.volume(),k.playbackRate=y._rate;try{var x=k.play();if(x&&typeof Promise<"u"&&(x instanceof Promise||typeof x.then=="function")?(p._playLock=!0,L(),x.then(function(){p._playLock=!1,k._unlocked=!0,d?p._loadQueue():p._emit("play",y._id)}).catch(function(){p._playLock=!1,p._emit("playerror",y._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."),y._ended=!0,y._paused=!0})):d||(p._playLock=!1,L(),p._emit("play",y._id)),k.playbackRate=y._rate,k.paused)return void p._emit("playerror",y._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");h!=="__default"||y._loop?p._endTimers[y._id]=setTimeout(p._ended.bind(p,y),A):(p._endTimers[y._id]=function(){p._ended(y),k.removeEventListener("ended",p._endTimers[y._id],!1)},k.addEventListener("ended",p._endTimers[y._id],!1))}catch(D){p._emit("playerror",y._id,D)}};k.src==="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"&&(k.src=p._src,k.load());var E=window&&window.ejecta||!k.readyState&&t._navigator.isCocoonJS;if(k.readyState>=3||E)G();else{p._playLock=!0,p._state="loading";var S=function(){p._state="loaded",G(),k.removeEventListener(t._canPlayEvent,S,!1)};k.addEventListener(t._canPlayEvent,S,!1),p._clearTimer(y._id)}}return y._id},pause:function(h){var d=this;if(d._state!=="loaded"||d._playLock)return d._queue.push({event:"pause",action:function(){d.pause(h)}}),d;for(var p=d._getSoundIds(h),f=0;f=0?d=parseInt(f[0],10):h=parseFloat(f[0]):f.length>=2&&(h=parseFloat(f[0]),d=parseInt(f[1],10));var m;if(!(h!==void 0&&h>=0&&h<=1))return m=d?p._soundById(d):p._sounds[0],m?m._volume:0;if(p._state!=="loaded"||p._playLock)return p._queue.push({event:"volume",action:function(){p.volume.apply(p,f)}}),p;d===void 0&&(p._volume=h),d=p._getSoundIds(d);for(var g=0;g0?f/v:f),C=Date.now();h._fadeTo=p,h._interval=setInterval(function(){var I=(Date.now()-C)/f;C=Date.now(),w+=b*I,w=Math.round(100*w)/100,w=b<0?Math.max(p,w):Math.min(p,w),y._webAudio?h._volume=w:y.volume(w,h._id,!0),g&&(y._volume=w),(pd&&w>=p)&&(clearInterval(h._interval),h._interval=null,h._fadeTo=null,y.volume(p,h._id),y._emit("fade",h._id))},A)},_stopFade:function(h){var d=this,p=d._soundById(h);return p&&p._interval&&(d._webAudio&&p._node.gain.cancelScheduledValues(t.ctx.currentTime),clearInterval(p._interval),p._interval=null,d.volume(p._fadeTo,h),p._fadeTo=null,d._emit("fade",h)),d},loop:function(){var h,d,p,f=this,m=arguments;if(m.length===0)return f._loop;if(m.length===1){if(typeof m[0]!="boolean")return!!(p=f._soundById(parseInt(m[0],10)))&&p._loop;h=m[0],f._loop=h}else m.length===2&&(h=m[0],d=parseInt(m[1],10));for(var g=f._getSoundIds(d),y=0;y=0?d=parseInt(f[0],10):h=parseFloat(f[0])}else f.length===2&&(h=parseFloat(f[0]),d=parseInt(f[1],10));var y;if(typeof h!="number")return y=p._soundById(d),y?y._rate:p._rate;if(p._state!=="loaded"||p._playLock)return p._queue.push({event:"rate",action:function(){p.rate.apply(p,f)}}),p;d===void 0&&(p._rate=h),d=p._getSoundIds(d);for(var w=0;w=0?d=parseInt(f[0],10):p._sounds.length&&(d=p._sounds[0]._id,h=parseFloat(f[0]))}else f.length===2&&(h=parseFloat(f[0]),d=parseInt(f[1],10));if(d===void 0)return 0;if(typeof h=="number"&&(p._state!=="loaded"||p._playLock))return p._queue.push({event:"seek",action:function(){p.seek.apply(p,f)}}),p;var y=p._soundById(d);if(y){if(!(typeof h=="number"&&h>=0)){if(p._webAudio){var w=p.playing(d)?t.ctx.currentTime-y._playStart:0,b=y._rateSeek?y._rateSeek-y._seek:0;return y._seek+(b+w*Math.abs(y._rate))}return y._node.currentTime}var v=p.playing(d);v&&p.pause(d,!0),y._seek=h,y._ended=!1,p._clearTimer(d),p._webAudio||!y._node||isNaN(y._node.duration)||(y._node.currentTime=h);var A=function(){v&&p.play(d,!0),p._emit("seek",d)};if(v&&!p._webAudio){var C=function(){p._playLock?setTimeout(C,0):A()};setTimeout(C,0)}else A()}return p},playing:function(h){var d=this;if(typeof h=="number"){var p=d._soundById(h);return!!p&&!p._paused}for(var f=0;f=0&&t._howls.splice(f,1);var m=!0;for(p=0;p=0){m=!1;break}return n&&m&&delete n[h._src],t.noAudio=!1,h._state="unloaded",h._sounds=[],h=null,null},on:function(h,d,p,f){var m=this,g=m["_on"+h];return typeof d=="function"&&g.push(f?{id:p,fn:d,once:f}:{id:p,fn:d}),m},off:function(h,d,p){var f=this,m=f["_on"+h],g=0;if(typeof d=="number"&&(p=d,d=null),d||p)for(g=0;g=0;g--)m[g].id&&m[g].id!==d&&h!=="load"||(setTimeout(function(y){y.call(this,d,p)}.bind(f,m[g].fn),0),m[g].once&&f.off(h,m[g].fn,m[g].id));return f._loadQueue(h),f},_loadQueue:function(h){var d=this;if(d._queue.length>0){var p=d._queue[0];p.event===h&&(d._queue.shift(),d._loadQueue()),h||p.action()}return d},_ended:function(h){var d=this,p=h._sprite;if(!d._webAudio&&h._node&&!h._node.paused&&!h._node.ended&&h._node.currentTime=0;f--){if(p<=d)return;h._sounds[f]._ended&&(h._webAudio&&h._sounds[f]._node&&h._sounds[f]._node.disconnect(0),h._sounds.splice(f,1),p--)}}},_getSoundIds:function(h){var d=this;if(h===void 0){for(var p=[],f=0;f=0;if(!h.bufferSource)return d;if(t._scratchBuffer&&h.bufferSource&&(h.bufferSource.onended=null,h.bufferSource.disconnect(0),p))try{h.bufferSource.buffer=t._scratchBuffer}catch{}return h.bufferSource=null,d},_clearSound:function(h){/MSIE |Trident\//.test(t._navigator&&t._navigator.userAgent)||(h.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA")}};var s=function(h){this._parent=h,this.init()};s.prototype={init:function(){var h=this,d=h._parent;return h._muted=d._muted,h._loop=d._loop,h._volume=d._volume,h._rate=d._rate,h._seek=0,h._paused=!0,h._ended=!0,h._sprite="__default",h._id=++t._counter,d._sounds.push(h),h.create(),h},create:function(){var h=this,d=h._parent,p=t._muted||h._muted||h._parent._muted?0:h._volume;return d._webAudio?(h._node=t.ctx.createGain===void 0?t.ctx.createGainNode():t.ctx.createGain(),h._node.gain.setValueAtTime(p,t.ctx.currentTime),h._node.paused=!0,h._node.connect(t.masterGain)):t.noAudio||(h._node=t._obtainHtml5Audio(),h._errorFn=h._errorListener.bind(h),h._node.addEventListener("error",h._errorFn,!1),h._loadFn=h._loadListener.bind(h),h._node.addEventListener(t._canPlayEvent,h._loadFn,!1),h._endFn=h._endListener.bind(h),h._node.addEventListener("ended",h._endFn,!1),h._node.src=d._src,h._node.preload=d._preload===!0?"auto":d._preload,h._node.volume=p*t.volume(),h._node.load()),h},reset:function(){var h=this,d=h._parent;return h._muted=d._muted,h._loop=d._loop,h._volume=d._volume,h._rate=d._rate,h._seek=0,h._rateSeek=0,h._paused=!0,h._ended=!0,h._sprite="__default",h._id=++t._counter,h},_errorListener:function(){var h=this;h._parent._emit("loaderror",h._id,h._node.error?h._node.error.code:0),h._node.removeEventListener("error",h._errorFn,!1)},_loadListener:function(){var h=this,d=h._parent;d._duration=Math.ceil(10*h._node.duration)/10,Object.keys(d._sprite).length===0&&(d._sprite={__default:[0,1e3*d._duration]}),d._state!=="loaded"&&(d._state="loaded",d._emit("load"),d._loadQueue()),h._node.removeEventListener(t._canPlayEvent,h._loadFn,!1)},_endListener:function(){var h=this,d=h._parent;d._duration===1/0&&(d._duration=Math.ceil(10*h._node.duration)/10,d._sprite.__default[1]===1/0&&(d._sprite.__default[1]=1e3*d._duration),d._ended(h)),h._node.removeEventListener("ended",h._endFn,!1)}};var n={},a=function(h){var d=h._src;if(n[d])return h._duration=n[d].duration,void c(h);if(/^data:[^;]+;base64,/.test(d)){for(var p=atob(d.split(",")[1]),f=new Uint8Array(p.length),m=0;m0?(n[d._src]=m,c(d,m)):p()};typeof Promise<"u"&&t.ctx.decodeAudioData.length===1?t.ctx.decodeAudioData(h).then(f).catch(p):t.ctx.decodeAudioData(h,f,p)},c=function(h,d){d&&!h._duration&&(h._duration=d.duration),Object.keys(h._sprite).length===0&&(h._sprite={__default:[0,1e3*h._duration]}),h._state!=="loaded"&&(h._state="loaded",h._emit("load"),h._loadQueue())},u=function(){if(t.usingWebAudio){try{typeof AudioContext<"u"?t.ctx=new AudioContext:typeof webkitAudioContext<"u"?t.ctx=new webkitAudioContext:t.usingWebAudio=!1}catch{t.usingWebAudio=!1}t.ctx||(t.usingWebAudio=!1);var h=/iP(hone|od|ad)/.test(t._navigator&&t._navigator.platform),d=t._navigator&&t._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),p=d?parseInt(d[1],10):null;if(h&&p&&p<9){var f=/safari/.test(t._navigator&&t._navigator.userAgent.toLowerCase());t._navigator&&!f&&(t.usingWebAudio=!1)}t.usingWebAudio&&(t.masterGain=t.ctx.createGain===void 0?t.ctx.createGainNode():t.ctx.createGain(),t.masterGain.gain.setValueAtTime(t._muted?0:t._volume,t.ctx.currentTime),t.masterGain.connect(t.ctx.destination)),t._setup()}};r.Howler=t,r.Howl=i,typeof Wt<"u"?(Wt.HowlerGlobal=e,Wt.Howler=t,Wt.Howl=i,Wt.Sound=s):typeof window<"u"&&(window.HowlerGlobal=e,window.Howler=t,window.Howl=i,window.Sound=s)})()})(Ko);const NA="data:audio/wav;base64,UklGRkYEAABXQVZFZm10IBAAAAABAAEARKwAAIhYAQACABAATElTVBoAAABJTkZPSVNGVA0AAABMYXZmNjAuMy4xMDAAAGRhdGEABAAAAIDfjHvG/eK+8VP5Bvyg/v3+Dv8O/1v+8P59B0sXqgoxBa4BQgEEAIMATAAyAE4AnwA8APf/oH+tf3J/6F74LWgXiQpfBbABbAGy/+b/4f+X/w+AAIAKjAzF7uIk8Ln4efsB/jf+Of66/kv+Ev84/6sBbf+eAMn/IADgACQA3gBXABMBrP9/ACIAvgraEnAIfwVbAdYCxf5zAVr/iQBb/6cAMP9KAKtP4H9VaPUyfhjgC0EFigNcAL4AqP/qABoA5wAc/T7yE/iK/CX94v+A/a3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b/9f/y/+n/9//2//f//f/9/w==",Wg="/smeditor/assets/metronome_high-bd539a8c.wav",zg="/smeditor/assets/metronome_low-cbca5846.wav",UA="/smeditor/assets/mine-b973f34e.wav",ml=[".aac",".mid",".midi",".mp3",".oga",".ogg",".opus",".wav",".webm",".weba",".flac",".aiff"],os=[".bmp",".gif",".jpeg",".jpg",".png",".tif",".tiff",".webp"],wd=["Hold","Roll"];function jg(r){return!wd.includes(r.type)}function Re(r){return wd.includes(r.type)}var li="INUMBER",Cn="IOP1",Mn="IOP2",kn="IOP3",vr="IVAR",Ss="IVARNAME",yn="IFUNCALL",gl="IFUNDEF",Yt="IEXPR",_d="IEXPREVAL",Ms="IMEMBER",yl="IENDSTATEMENT",vn="IARRAY";function je(r,e){this.type=r,this.value=e??0}je.prototype.toString=function(){switch(this.type){case li:case Cn:case Mn:case kn:case vr:case Ss:case yl:return this.value;case yn:return"CALL "+this.value;case gl:return"DEF "+this.value;case vn:return"ARRAY "+this.value;case Ms:return"."+this.value;default:return"Invalid Instruction"}};function vl(r){return new je(Cn,r)}function wr(r){return new je(Mn,r)}function $g(r){return new je(kn,r)}function Nc(r,e,t,i,s){for(var n=[],a=[],o,l,c,u,h=0;h1)l=n.pop(),o=n.pop(),u=t[d.value],d=new je(li,u(o.value,l.value)),n.push(d);else if(p===kn&&n.length>2)c=n.pop(),l=n.pop(),o=n.pop(),d.value==="?"?n.push(o.value?l.value:c.value):(u=i[d.value],d=new je(li,u(o.value,l.value,c.value)),n.push(d));else if(p===Cn&&n.length>0)o=n.pop(),u=e[d.value],d=new je(li,u(o.value)),n.push(d);else if(p===Yt){for(;n.length>0;)a.push(n.shift());a.push(new je(Yt,Nc(d.value,e,t,i,s)))}else if(p===Ms&&n.length>0)o=n.pop(),n.push(new je(li,o.value[d.value]));else{for(;n.length>0;)a.push(n.shift());a.push(d)}}for(;n.length>0;)a.push(n.shift());return a}function Xg(r,e,t){for(var i=[],s=0;s0;)l.unshift(ar(i.pop(),t));if(o=i.pop(),o.apply&&o.call)i.push(o.apply(void 0,l));else throw new Error(o+" is not a function")}else if(p===gl)i.push(function(){for(var m=i.pop(),g=[],y=d.value;y-- >0;)g.unshift(i.pop());var w=i.pop(),b=function(){for(var v=Object.assign({},t),A=0,C=g.length;A0;)l.unshift(i.pop());i.push(l)}else throw new Error("invalid Expression")}if(i.length>1)throw new Error("invalid Expression (parity)");return i[0]===0?0:ar(i[0],t)}function HA(r,e,t){return xd(r)?r:{type:_d,value:function(i){return us(r.value,e,i)}}}function xd(r){return r&&r.type===_d}function ar(r,e){return xd(r)?r.value(e):r}function Td(r,e){for(var t=[],i,s,n,a,o,l,c=0;c0;)o.unshift(t.pop());a=t.pop(),t.push(a+"("+o.join(", ")+")")}else if(h===gl){for(s=t.pop(),l=u.value,o=[];l-- >0;)o.unshift(t.pop());i=t.pop(),e?t.push("("+i+" = function("+o.join(", ")+") { return "+s+" })"):t.push("("+i+"("+o.join(", ")+") = "+s+")")}else if(h===Ms)i=t.pop(),t.push(i+"."+u.value);else if(h===vn){for(l=u.value,o=[];l-- >0;)o.unshift(t.pop());t.push("["+o.join(", ")+"]")}else if(h===Yt)t.push("("+Td(u.value,e)+")");else if(h!==yl)throw new Error("invalid Expression")}return t.length>1&&(e?t=[t.join(",")]:t=[t.join(";")]),String(t[0])}function Gp(r){return typeof r=="string"?JSON.stringify(r).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029"):r}function Js(r,e){for(var t=0;t=this.expression.length)return this.newToken(ua,"EOF");if(this.isWhitespace()||this.isComment())return this.next();if(this.isRadixInteger()||this.isNumber()||this.isOperator()||this.isString()||this.isParen()||this.isBracket()||this.isComma()||this.isSemicolon()||this.isNamedOp()||this.isConst()||this.isName())return this.current;this.parseError('Unknown character "'+this.expression.charAt(this.pos)+'"')};mt.prototype.isString=function(){var r=!1,e=this.pos,t=this.expression.charAt(e);if(t==="'"||t==='"')for(var i=this.expression.indexOf(t,e+1);i>=0&&this.pos"9")))break}if(e>r){var i=this.expression.substring(r,e);if(i in this.consts)return this.current=this.newToken(bl,this.consts[i]),this.pos+=i.length,!0}return!1};mt.prototype.isNamedOp=function(){for(var r=this.pos,e=r;e"9")))break}if(e>r){var i=this.expression.substring(r,e);if(this.isOperatorEnabled(i)&&(i in this.binaryOps||i in this.unaryOps||i in this.ternaryOps))return this.current=this.newToken(Ze,i),this.pos+=i.length,!0}return!1};mt.prototype.isName=function(){for(var r=this.pos,e=r,t=!1;e"9"))break}else t=!0}if(t){var s=this.expression.substring(r,e);return this.current=this.newToken(Ed,s),this.pos+=s.length,!0}return!1};mt.prototype.isWhitespace=function(){for(var r=!1,e=this.expression.charAt(this.pos);(e===" "||e===" "||e===` -`||e==="\r")&&(r=!0,this.pos++,!(this.pos>=this.expression.length));)e=this.expression.charAt(this.pos);return r};var GA=/^[0-9a-f]{4}$/i;mt.prototype.unescape=function(r){var e=r.indexOf("\\");if(e<0)return r;for(var t=r.substring(0,e);e>=0;){var i=r.charAt(++e);switch(i){case"'":t+="'";break;case'"':t+='"';break;case"\\":t+="\\";break;case"/":t+="/";break;case"b":t+="\b";break;case"f":t+="\f";break;case"n":t+=` -`;break;case"r":t+="\r";break;case"t":t+=" ";break;case"u":var s=r.substring(e+1,e+5);GA.test(s)||this.parseError("Illegal escape sequence: \\u"+s),t+=String.fromCharCode(parseInt(s,16)),e+=4;break;default:throw this.parseError('Illegal escape sequence: "\\'+i+'"')}++e;var n=r.indexOf("\\",e);t+=r.substring(e,n<0?r.length:n),e=n}return t};mt.prototype.isComment=function(){var r=this.expression.charAt(this.pos);return r==="/"&&this.expression.charAt(this.pos+1)==="*"?(this.pos=this.expression.indexOf("*/",this.pos)+2,this.pos===1&&(this.pos=this.expression.length),!0):!1};mt.prototype.isRadixInteger=function(){var r=this.pos;if(r>=this.expression.length-2||this.expression.charAt(r)!=="0")return!1;++r;var e,t;if(this.expression.charAt(r)==="x")e=16,t=/^[0-9a-f]$/i,++r;else if(this.expression.charAt(r)==="b")e=2,t=/^[01]$/i,++r;else return!1;for(var i=!1,s=r;r="0"&&a<="9"||!s&&a===".");)a==="."?s=!0:n=!0,e++,r=n;if(r&&(i=e),a==="e"||a==="E"){e++;for(var o=!0,l=!1;e="0"&&a<="9")l=!0,o=!1;else break;e++}l||(e=i)}return r?(this.current=this.newToken(bl,parseFloat(this.expression.substring(t,e))),this.pos=e):this.pos=i,r};mt.prototype.isOperator=function(){var r=this.pos,e=this.expression.charAt(this.pos);if(e==="+"||e==="-"||e==="*"||e==="/"||e==="%"||e==="^"||e==="?"||e===":"||e===".")this.current=this.newToken(Ze,e);else if(e==="∙"||e==="•")this.current=this.newToken(Ze,"*");else if(e===">")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ze,">="),this.pos++):this.current=this.newToken(Ze,">");else if(e==="<")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ze,"<="),this.pos++):this.current=this.newToken(Ze,"<");else if(e==="|")if(this.expression.charAt(this.pos+1)==="|")this.current=this.newToken(Ze,"||"),this.pos++;else return!1;else if(e==="=")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ze,"=="),this.pos++):this.current=this.newToken(Ze,e);else if(e==="!")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ze,"!="),this.pos++):this.current=this.newToken(Ze,e);else return!1;return this.pos++,this.isOperatorEnabled(this.current.value)?!0:(this.pos=r,!1)};mt.prototype.isOperatorEnabled=function(r){return this.parser.isOperatorEnabled(r)};mt.prototype.getCoordinates=function(){var r=0,e,t=-1;do r++,e=this.pos-t,t=this.expression.indexOf(` -`,t+1);while(t>=0&&t"u"?!0:Array.isArray(e)?Js(e,r.value):typeof e=="function"?e(r):r.value===e};it.prototype.save=function(){this.savedCurrent=this.current,this.savedNextToken=this.nextToken,this.tokens.save()};it.prototype.restore=function(){this.tokens.restore(),this.current=this.savedCurrent,this.nextToken=this.savedNextToken};it.prototype.accept=function(r,e){return this.nextToken.type===r&&this.tokenMatches(this.nextToken,e)?(this.next(),!0):!1};it.prototype.expect=function(r,e){if(!this.accept(r,e)){var t=this.tokens.getCoordinates();throw new Error("parse error ["+t.line+":"+t.column+"]: Expected "+(e||r))}};it.prototype.parseAtom=function(r){var e=this.tokens.unaryOps;function t(s){return s.value in e}if(this.accept(Ed)||this.accept(Ze,t))r.push(new je(vr,this.current.value));else if(this.accept(bl))r.push(new je(li,this.current.value));else if(this.accept(Yg))r.push(new je(li,this.current.value));else if(this.accept(br,"("))this.parseExpression(r),this.expect(br,")");else if(this.accept(bn,"["))if(this.accept(bn,"]"))r.push(new je(vn,0));else{var i=this.parseArrayList(r);r.push(new je(vn,i))}else throw new Error("unexpected "+this.nextToken)};it.prototype.parseExpression=function(r){var e=[];this.parseUntilEndStatement(r,e)||(this.parseVariableAssignmentExpression(e),!this.parseUntilEndStatement(r,e)&&this.pushExpression(r,e))};it.prototype.pushExpression=function(r,e){for(var t=0,i=e.length;t=",">","in"];it.prototype.parseComparison=function(r){for(this.parseAddSub(r);this.accept(Ze,VA);){var e=this.current;this.parseAddSub(r),r.push(wr(e.value))}};var WA=["+","-","||"];it.prototype.parseAddSub=function(r){for(this.parseTerm(r);this.accept(Ze,WA);){var e=this.current;this.parseTerm(r),r.push(wr(e.value))}};var zA=["*","/","%"];it.prototype.parseTerm=function(r){for(this.parseFactor(r);this.accept(Ze,zA);){var e=this.current;this.parseFactor(r),r.push(wr(e.value))}};it.prototype.parseFactor=function(r){var e=this.tokens.unaryOps;function t(s){return s.value in e}if(this.save(),this.accept(Ze,t)){if(this.current.value!=="-"&&this.current.value!=="+"){if(this.nextToken.type===br&&this.nextToken.value==="("){this.restore(),this.parseExponential(r);return}else if(this.nextToken.type===Sd||this.nextToken.type===wl||this.nextToken.type===ua||this.nextToken.type===br&&this.nextToken.value===")"){this.restore(),this.parseAtom(r);return}}var i=this.current;this.parseFactor(r),r.push(vl(i.value))}else this.parseExponential(r)};it.prototype.parseExponential=function(r){for(this.parsePostfixExpression(r);this.accept(Ze,"^");)this.parseFactor(r),r.push(wr("^"))};it.prototype.parsePostfixExpression=function(r){for(this.parseFunctionCall(r);this.accept(Ze,"!");)r.push(vl("!"))};it.prototype.parseFunctionCall=function(r){var e=this.tokens.unaryOps;function t(n){return n.value in e}if(this.accept(Ze,t)){var i=this.current;this.parseAtom(r),r.push(vl(i.value))}else for(this.parseMemberExpression(r);this.accept(br,"(");)if(this.accept(br,")"))r.push(new je(yn,0));else{var s=this.parseArgumentList(r);r.push(new je(yn,s))}};it.prototype.parseArgumentList=function(r){for(var e=0;!this.accept(br,")");)for(this.parseExpression(r),++e;this.accept(wl);)this.parseExpression(r),++e;return e};it.prototype.parseMemberExpression=function(r){for(this.parseAtom(r);this.accept(Ze,".")||this.accept(bn,"[");){var e=this.current;if(e.value==="."){if(!this.allowMemberAccess)throw new Error('unexpected ".", member access is not permitted');this.expect(Ed),r.push(new je(Ms,this.current.value))}else if(e.value==="["){if(!this.tokens.isOperatorEnabled("["))throw new Error('unexpected "[]", arrays are disabled');this.parseExpression(r),this.expect(bn,"]"),r.push(wr("["))}else throw new Error("unexpected symbol: "+e.value)}};function jA(r,e){return Number(r)+Number(e)}function $A(r,e){return r-e}function XA(r,e){return r*e}function YA(r,e){return r/e}function qA(r,e){return r%e}function KA(r,e){return Array.isArray(r)&&Array.isArray(e)?r.concat(e):""+r+e}function ZA(r,e){return r===e}function JA(r,e){return r!==e}function QA(r,e){return r>e}function eE(r,e){return r=e}function iE(r,e){return r<=e}function rE(r,e){return!!(r&&e)}function sE(r,e){return!!(r||e)}function nE(r,e){return Js(e,r)}function aE(r){return(Math.exp(r)-Math.exp(-r))/2}function oE(r){return(Math.exp(r)+Math.exp(-r))/2}function lE(r){return r===1/0?1:r===-1/0?-1:(Math.exp(r)-Math.exp(-r))/(Math.exp(r)+Math.exp(-r))}function hE(r){return r===-1/0?r:Math.log(r+Math.sqrt(r*r+1))}function cE(r){return Math.log(r+Math.sqrt(r*r-1))}function dE(r){return Math.log((1+r)/(1-r))/2}function Vp(r){return Math.log(r)*Math.LOG10E}function uE(r){return-r}function pE(r){return!r}function fE(r){return r<0?Math.ceil(r):Math.floor(r)}function mE(r){return Math.random()*(r||1)}function Wp(r){return Cd(r+1)}function gE(r){return isFinite(r)&&r===Math.round(r)}var yE=4.7421875,bh=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22];function Cd(r){var e,t;if(gE(r)){if(r<=0)return isFinite(r)?1/0:NaN;if(r>171)return 1/0;for(var i=r-2,s=r-1;i>1;)s*=i,i--;return s===0&&(s=1),s}if(r<.5)return Math.PI/(Math.sin(Math.PI*r)*Cd(1-r));if(r>=171.35)return 1/0;if(r>85){var n=r*r,a=n*r,o=a*r,l=o*r;return Math.sqrt(2*Math.PI/r)*Math.pow(r/Math.E,r)*(1+1/(12*r)+1/(288*n)-139/(51840*a)-571/(2488320*o)+163879/(209018880*l)+5246819/(75246796800*l*r))}--r,t=bh[0];for(var c=1;c0?(s=i/e,r+=s*s):r+=i}return e===1/0?1/0:e*Math.sqrt(r)}function jp(r,e,t){return r?e:t}function bE(r,e){return typeof e>"u"||+e==0?Math.round(r):(r=+r,e=-+e,isNaN(r)||!(typeof e=="number"&&e%1===0)?NaN:(r=r.toString().split("e"),r=Math.round(+(r[0]+"e"+(r[1]?+r[1]-e:-e))),r=r.toString().split("e"),+(r[0]+"e"+(r[1]?+r[1]+e:e))))}function wE(r,e,t){return t&&(t[r]=e),e}function _E(r,e){return r[e|0]}function xE(r){return arguments.length===1&&Array.isArray(r)?Math.max.apply(Math,r):Math.max.apply(Math,arguments)}function TE(r){return arguments.length===1&&Array.isArray(r)?Math.min.apply(Math,r):Math.min.apply(Math,arguments)}function AE(r,e){if(typeof r!="function")throw new Error("First argument to map is not a function");if(!Array.isArray(e))throw new Error("Second argument to map is not an array");return e.map(function(t,i){return r(t,i)})}function EE(r,e,t){if(typeof r!="function")throw new Error("First argument to fold is not a function");if(!Array.isArray(t))throw new Error("Second argument to fold is not an array");return t.reduce(function(i,s,n){return r(i,s,n)},e)}function SE(r,e){if(typeof r!="function")throw new Error("First argument to filter is not a function");if(!Array.isArray(e))throw new Error("Second argument to filter is not an array");return e.filter(function(t,i){return r(t,i)})}function CE(r,e){if(!(Array.isArray(e)||typeof e=="string"))throw new Error("Second argument to indexOf is not a string or array");return e.indexOf(r)}function ME(r,e){if(!Array.isArray(e))throw new Error("Second argument to join is not an array");return e.join(r)}function kE(r){return(r>0)-(r<0)||+r}var $p=1/3;function IE(r){return r<0?-Math.pow(-r,$p):Math.pow(r,$p)}function PE(r){return Math.exp(r)-1}function BE(r){return Math.log(1+r)}function RE(r){return Math.log(r)/Math.LN2}function _r(r){this.options=r||{},this.unaryOps={sin:Math.sin,cos:Math.cos,tan:Math.tan,asin:Math.asin,acos:Math.acos,atan:Math.atan,sinh:Math.sinh||aE,cosh:Math.cosh||oE,tanh:Math.tanh||lE,asinh:Math.asinh||hE,acosh:Math.acosh||cE,atanh:Math.atanh||dE,sqrt:Math.sqrt,cbrt:Math.cbrt||IE,log:Math.log,log2:Math.log2||RE,ln:Math.log,lg:Math.log10||Vp,log10:Math.log10||Vp,expm1:Math.expm1||PE,log1p:Math.log1p||BE,abs:Math.abs,ceil:Math.ceil,floor:Math.floor,round:Math.round,trunc:Math.trunc||fE,"-":uE,"+":Number,exp:Math.exp,not:pE,length:vE,"!":Wp,sign:Math.sign||kE},this.binaryOps={"+":jA,"-":$A,"*":XA,"/":YA,"%":qA,"^":Math.pow,"||":KA,"==":ZA,"!=":JA,">":QA,"<":eE,">=":tE,"<=":iE,and:rE,or:sE,in:nE,"=":wE,"[":_E},this.ternaryOps={"?":jp},this.functions={random:mE,fac:Wp,min:TE,max:xE,hypot:Math.hypot||zp,pyt:Math.hypot||zp,pow:Math.pow,atan2:Math.atan2,if:jp,gamma:Cd,roundTo:bE,map:AE,fold:EE,filter:SE,indexOf:CE,join:ME},this.consts={E:Math.E,PI:Math.PI,true:!0,false:!1}}_r.prototype.parse=function(r){var e=[],t=new it(this,new mt(this,r),{allowMemberAccess:this.options.allowMemberAccess});return t.parseExpression(e),t.expect(ua,"EOF"),new Ii(e,this)};_r.prototype.evaluate=function(r,e){return this.parse(r).evaluate(e)};var Kg=new _r;_r.parse=function(r){return Kg.parse(r)};_r.evaluate=function(r,e){return Kg.parse(r).evaluate(e)};var Xp={"+":"add","-":"subtract","*":"multiply","/":"divide","%":"remainder","^":"power","!":"factorial","<":"comparison",">":"comparison","<=":"comparison",">=":"comparison","==":"comparison","!=":"comparison","||":"concatenate",and:"logical",or:"logical",not:"logical","?":"conditional",":":"conditional","=":"assignment","[":"array","()=":"fndef"};function LE(r){return Xp.hasOwnProperty(r)?Xp[r]:r}_r.prototype.isOperatorEnabled=function(r){var e=LE(r),t=this.options.operators||{};return!(e in t)||!!t[e]};const lr=[1,1/2,1/3,1/4,1/6,1/8,1/12,1/16,1/24,1/48],Li=["4th","8th","12th","16th","24th","32nd","48th","64th","96th","192nd"],Yp=[4,8,12,16,24,32,48,64,96,192];function DE(r){for(let e=0;en),r.length==0)return-1;if(e>=t(r[r.length-1])){let n=r.length-1;for(;n>0&&t(r[n-1])==e;)n--;return n}let i=0,s=r.length;for(;i<=s&&i>>1;if(t(r[n])==e){for(;n>0&&t(r[n-1])==e;)n--;return n}t(r[n])e&&(s=n-1)}return Math.max(0,s)}function ro(r,e,t){if(t=t??(s=>s),r.length==0)return-1;let i=Rt(r,e,t);for(;r[i-1]&&t(r[i-1])==e;)i--;return i}function qp(r,e){return!(Object.keys(r).some(t=>r[t]!=e[t])||Object.keys(e).some(t=>r[t]!=e[t]))}function pa(r){try{return _r.evaluate(r)}catch{return null}}function Ji(r,e){let t=r.length;if(r.length!=0)for(;t--;)e(r[t],t)&&r[t].destroy()}function Hc(r){return r==""?"":r.slice(0,1).toUpperCase()+r.slice(1).toLowerCase()}function Gc(r){return r.button==2||r.getModifierState("Control")&&Si}function nM(){try{return window.self!==window.top}catch{return!0}}function aM(r,e,t,i,s){const n=[];for(let a=0;a1&&(i.innerHTML+=` (${t})`),i.classList.add("waterfall-item"),Ee.messages[e]={type:"",container:i,timeoutID:setTimeout(()=>{i.classList.add("waterfall-exiting")},5e3),clearTimeoutID:setTimeout(()=>{delete this.messages[e],this.view.removeChild(i)},5500),count:t},this.view.appendChild(i)}static createFormatted(e,t){if(this.view==null)return;let i=1;if(this.messages[e]&&this.messages[e].type==t){const n=this.messages[e];clearTimeout(n.timeoutID),clearTimeout(n.clearTimeoutID),i=++n.count,this.view.removeChild(n.container)}const s=document.createElement("div");s.innerHTML=`
${Hc(t)}:
`+e,i>1&&(s.innerHTML+=` (${i})`),s.classList.add("waterfall-item"),console[t](e),Ee.messages[e]={type:t,container:s,timeoutID:setTimeout(()=>{s.classList.add("waterfall-exiting")},5e3),clearTimeoutID:setTimeout(()=>{delete this.messages[e],this.view.removeChild(s)},5500),count:i},this.view.appendChild(s)}}class OE{cols=[];keyDown(e){this.cols[e]=(this.cols[e]??0)+1}keyUp(e){this.cols[e]=(this.cols[e]??1)-1,this.cols[e]=Math.max(this.cols[e],0)}isPressed(e){return!!this.cols[e]}getHeldCols(){return this.cols.map((e,t)=>t).filter(e=>this.isPressed(e))}reset(){this.cols=[]}}class K extends xn{static _instance;static get instance(){return K._instance||(K._instance=new K),K._instance}static emit(e,...t){return K.instance.emit(e,...t)}static on(e,t,i){K.instance.on(e,t,i)}static off(e,t,i,s){K.instance.off(e,t,i,s)}}const Kp=["audio.rate","chart.snap","chart.CMod","play.timingCollection"];class Zo{static app={width:800,height:600,fullscreen:!1};static general={spinnerStep:1,smoothAnimations:!0,warnBeforeExit:!0,showPlaybackOptions:!0,theme:"default"};static chart={CMod:!1,reverse:!1,mousePlacement:!1,defaultHoldPlacement:!0,zoom:1,speed:250,snap:1,hideWarpedArrows:!1,hideFakedArrows:!1,doSpeedChanges:!0,drawNoteFlash:!0,drawIcons:!0,allowReceptorDrag:!0,receptorYPos:-250,receptorXPos:0,maxDrawBeats:20,maxDrawBeatsBack:10,scroll:{scrollSensitivity:1,scrollSnapEveryScroll:!navigator.userAgent.includes("Mac"),invertZoomScroll:!1,invertReverseScroll:!0},waveform:{enabled:!0,antialiasing:!0,color:"#60617288",allowFilter:!0,filteredColor:"#1e523e88",lineHeight:1,speedChanges:!0},noteLayout:{enabled:!0},npsGraph:{enabled:!1,color1:"#4aa7bcff",color2:"#423c7aff"},timingEventOrder:{left:["LABELS","FAKES","TIMESIGNATURES","DELAYS","WARPS","STOPS","BPMS"],right:["SPEEDS","SCROLLS","TICKCOUNTS","COMBOS","ATTACKS","BGCHANGES","FGCHANGES"]},renderTimingEvent:{BPMS:!0,STOPS:!0,DELAYS:!0,WARPS:!0,FAKES:!0,COMBOS:!0,SPEEDS:!0,LABELS:!0,SCROLLS:!0,TIMESIGNATURES:!0,TICKCOUNTS:!0,BGCHANGES:!0,FGCHANGES:!0,ATTACKS:!0},noteskin:{type:"dance-single",name:"default"},lastNoteskins:{"dance-single":"default","dance-double":"default","dance-couple":"default","dance-solo":"default","dance-solodouble":"default","dance-threepanel":"default","dance-threedouble":"default","pump-single":"default","pump-double":"default","pump-versus":"default","pump-couple":"default","pump-halfdouble":"default"}};static audio={assistTick:!1,metronome:!1,rate:1,masterVolume:1,songVolume:.2,soundEffectVolume:.5,allowFilter:!0};static play={offset:0,effectOffset:0,visualOffset:0,hideBarlines:!1,judgementTilt:!0,timingCollection:"ITG",timingWindowScale:1,timingWindowAdd:0,defaultTimingCollection:{"dance-single":"ITG","dance-double":"ITG","dance-threepanel":"ITG","dance-threedouble":"ITG","dance-solo":"ITG","dance-solodouble":"ITG"}};static performance={antialiasing:!1,resolution:window.devicePixelRatio};static debug={showFPS:!1,showTimers:!1,showScroll:!1,showNoteskinErrors:!1};static experimental={}}class _ extends Zo{static extractOptions(e,t){return Object.entries(e).reduce((i,s)=>{const n=t?t+".":"";return typeof s[1]=="object"&&!Array.isArray(s[1])?i=i.concat(this.extractOptions(s[1],n+s[0])):(s[0]=n+s[0],i.push([s[0],s[1]])),i},[])}static applyOption(e){if(typeof this.getDefaultOption(e[0])!=typeof e[1])return console.warn("Couldn't load option "+e[0]+": the value "+e[1]+" ("+typeof e[1]+") does not match the type "+typeof this.getDefaultOption(e[0]));const t=e[0].split("."),i=t.pop();let s=this;for(const n of t)if(n in s)s=s[n];else return console.warn("Couldn't load option "+e[0]+": the id doesn't exist");s[i]=e[1]}static getDefaultOption(e){const t=e.split(".");let i=Zo;for(const s of t)if(s in i)i=i[s];else return;if(!(typeof i=="object"&&!Array.isArray(i)))return i}static getOption(e){const t=e.split(".");let i=this;for(const s of t)if(s in i)i=i[s];else return;if(!(typeof i=="object"&&!Array.isArray(i)))return i}static saveOptions(){const e={};for(const t of this.extractOptions(this)){if(Kp.includes(t[0]))continue;const i=this.getDefaultOption(t[0]);if(i==null){console.warn("Couldn't save option "+t[0]+": the id doesn't exist");continue}typeof i!=typeof t[1]?(console.warn("Couldn't save option "+t[0]+": the value "+t[1]+" does not match the type "+typeof this.getDefaultOption(t[0])),e[t[0]]=i):e[t[0]]=t[1]}localStorage.setItem("options",JSON.stringify(e))}static loadOptions(){const e=localStorage.getItem("options");if(!e)return;const t=JSON.parse(e);if(typeof t!="object")return console.error("Couldn't load options from storage");for(const i of Object.entries(t))Kp.includes(i[0])||this.applyOption(i)}static clearSave(){localStorage.removeItem("options")}}function Zg(r,e,t=""){for(const[i,s]of Object.entries(e))if(typeof s=="object")Array.isArray(s)?r[i]=s:(r[i]={},Zg(r[i],s,t==""?i:t+"."+i));else{let n=s;const a=t+"."+i;Object.defineProperty(r,i,{get:function(){return n},set:function(o){K.emit("userOptionUpdated",a),n=o},enumerable:!0})}}Zg(_,Zo);class _l{timingWindowMS;dancePoints;lifeChange;constructor(e,t,i){this.timingWindowMS=e,this.dancePoints=t,this.lifeChange=i}getTimingWindowMS(){return this.timingWindowMS*_.play.timingWindowScale+_.play.timingWindowAdd}}class so extends _l{target="dropped";constructor(e,t){super(0,e,t)}}class Ds extends _l{noteType;constructor(e,t,i,s){super(t,i,s),this.noteType=e}}const FE="/smeditor/assets/judgementITG-5390eacd.png",NE="/smeditor/assets/judgementWaterfall-5bb3f994.png";class st{static ITG=new st(FE,["w0","w1","w2","w3","w4","w5","miss"]);static WATERFALL=new st(NE,["w0","w1","w2","w3","w4","w5","miss"]);texHeight=0;texWidth=0;texture;judgeNames=[];constructor(e,t){this.judgeNames=t,this.loadTex(e)}async loadTex(e){const t=await Zs.load(e);this.texture=t,this.texHeight=t.height,this.texWidth=t.width}getTexture(e,t){if(!this.texture||!this.judgeNames.includes(t.id))return;let i=0;const s=this.judgeNames.indexOf(t.id)*this.texHeight/this.judgeNames.length;return e>=0&&(i+=this.texWidth/2),this.texture.frame=new ke(i,s,this.texWidth/2,this.texHeight/this.judgeNames.length),this.texture}}class no extends _l{target="mine";constructor(e,t,i){super(e,t,i)}}class _t extends _l{id;name;color;judgementTexture;constructor(e,t,i,s,n,a,o){super(s,n,a),this.id=e,this.name=t,this.color=i,this.judgementTexture=o}}const Jg=new _t("w0","Fantastic",183528,0,0,0,st.ITG);class ao extends _t{constructor(e,t,i,s,n){super("miss",e,t,0,i,s,n)}}function Qi(r){return r.color!=null&&r.id!="miss"}function Pi(r){return r.color!=null&&r.id=="miss"}function _s(r){return!!r.noteType}function wn(r){return r.target=="dropped"}function xl(r){return r.target=="mine"}class Je{static COLLECTIONS={ITG:new Je([new _t("w0","Fantastic",2215144,23,5,.008,st.ITG),new _t("w2","Excellent",14851096,44.5,4,.008,st.ITG),new _t("w3","Great",6736213,103.5,2,.004,st.ITG),new _t("w4","Decent",11820287,136.5,0,0,st.ITG),new _t("w5","Way Off",13206878,181.5,-6,-.05,st.ITG),new ao("Miss",16724016,-12,-.1,st.ITG),new Ds("Hold",321.5,5,-.008),new Ds("Roll",351.5,5,-.008),new so(0,-.08),new no(71.5,-6,-.05)],103.5),FA:new Je([new _t("w0","Fantastic",2215144,15,3.5,.008,st.ITG),new _t("w1","Fantastic",16777215,23,3,.008,st.ITG),new _t("w2","Excellent",14851096,44.5,2,.008,st.ITG),new _t("w3","Great",6736213,103.5,1,.004,st.ITG),new _t("w4","Decent",11820287,136.5,0,0,st.ITG),new _t("w5","Way Off",13206878,181.5,0,-.05,st.ITG),new ao("Miss",16724016,0,-.1,st.ITG),new Ds("Hold",321.5,1,-.008),new Ds("Roll",351.5,1,-.008),new so(0,-.08),new no(71.5,-1,-.05)],103.5),WATERFALL:new Je([new _t("w0","Masterful",16711870,15,10,.008,st.WATERFALL),new _t("w2","Awesome",16776960,30,9,.008,st.WATERFALL),new _t("w3","Solid",51200,50,6,.008,st.WATERFALL),new _t("w4","OK",33023,100,3,.004,st.WATERFALL),new _t("w5","Fault",8421504,160,0,0,st.WATERFALL),new ao("Miss",16724016,0,-.1,st.WATERFALL),new Ds("Hold",300,6,-.008),new Ds("Roll",350,6,-.008),new so(0,-.08),new no(71.5,-3,-.05)],100)};windows=[];holdWindows={};missWindow;droppedWindow;mineWindow;hideLimitMS;constructor(e,t){this.missWindow=new ao("Miss",16724016,-12,-.1,st.ITG),this.droppedWindow=new so(0,-.08),this.mineWindow=new no(71.5,-1,-.05);for(const i of e)Qi(i)?this.windows.push(i):Pi(i)?this.missWindow=i:_s(i)?this.holdWindows[i.noteType]=i:wn(i)?this.droppedWindow=i:xl(i)&&(this.mineWindow=i);this.windows.sort((i,s)=>i.timingWindowMS-s.timingWindowMS),this.hideLimitMS=t}judgeInput(e){for(const t of this.windows)if(t.getTimingWindowMS()/1e3>=Math.abs(e))return t;return this.missWindow}getHeldJudgement(e){return this.holdWindows[e.type]}getMissJudgement(){return this.missWindow}getDroppedJudgement(){return this.droppedWindow}getMineJudgement(){return this.mineWindow}shouldHideNote(e){return e.id!="miss"&&e.timingWindowMS<=this.hideLimitMS}maxWindowMS(){return this.windows.at(-1)?.getTimingWindowMS()??0}getMaxDancePoints(){return Math.max(...this.windows.map(e=>e.dancePoints),this.missWindow.dancePoints)}getMaxHoldDancePoints(e){return Math.max(this.holdWindows[e].dancePoints??0,this.droppedWindow.dancePoints)}getStandardWindows(){return[...this.windows]}getHoldWindows(){return[...Object.values(this.holdWindows)]}static getCollection(e){return this.COLLECTIONS[e]??this.COLLECTIONS.ITG}static getCollections(){return Je.COLLECTIONS}}class UE{}class qr extends UE{chordCohesion=new Map;missNoteIndex=0;holdProgress=[];heldCols=new OE;collection=Je.getCollection("ITG");usesHoldTicks=!1;update(e){if(!e.loadedChart||!e.chartView)return;const i=e.chartView.getTimeWithOffset()-this.collection.maxWindowMS()/1e3*_.audio.rate;let s=-1;for(;e.loadedChart.getNotedata()[this.missNoteIndex]&&e.loadedChart.getNotedata()[this.missNoteIndex].second=e.chartView.chart.getSecondsFromBeat(n.beat+n.hold)&&(n.gameplay.hideNote=!0,e.chartView.doJudgement(n,null,this.collection.getHeldJudgement(n)),e.chartView.getNotefield().releaseHold(n.col),this.holdProgress.splice(this.holdProgress.indexOf(n),1),e.gameStats?.addHoldDataPoint(n,this.collection.getHeldJudgement(n)))}for(const n of this.heldCols.getHeldCols()){const a=this.getClosestNote(e.loadedChart.getNotedata(),e.chartView.getTimeWithOffset()-this.collection.getMineJudgement().getTimingWindowMS()/2e3,n,["Mine"],this.collection.getMineJudgement().getTimingWindowMS()/2);a&&(a.gameplay.hasHit=!0,a.gameplay.hideNote=!0,e.chartView.doJudgement(a,null,this.collection.getMineJudgement()),e.gameStats?.addDataPoint([a],this.collection.getMineJudgement(),null),e.mine.play())}}startPlay(e){if(!e.loadedChart||!e.chartView)return;this.collection=Je.getCollection(_.play.timingCollection),this.chordCohesion.clear();for(const n of e.loadedChart.getNotedata())n.type=="Mine"||n.fake||n.warped||(this.chordCohesion.has(n.beat)||this.chordCohesion.set(n.beat,[]),this.chordCohesion.get(n.beat).push(n));const i=e.chartView.getTimeWithOffset()-this.collection.maxWindowMS()/1e3*_.audio.rate;let s=Rt(e.loadedChart.getNotedata(),i,n=>n.second)+1;s>=1&&i<=e.loadedChart.getNotedata()[s-1].second&&s--,this.missNoteIndex=s,this.holdProgress=[],this.heldCols.reset()}keyDown(e,t){if(!e.loadedChart||!e.chartView)return;const i=e.chartView.getTimeWithOffset(),s=this.getClosestNote(e.loadedChart.getNotedata(),i,t,["Tap","Hold","Roll"]);this.heldCols.keyDown(t),e.chartView.getNotefield().press(t);for(const n of this.holdProgress)n.type=="Roll"&&n.col==t&&(n.gameplay.lastHoldActivation=Date.now());s?this.hitNote(e,s,i):e.chartView.getNotefield().ghostTap(t)}keyUp(e,t){if(!e.loadedChart||!e.chartView)return;const i=e.chartView.getTimeWithOffset(),s=this.getClosestNote(e.loadedChart.getNotedata(),i,t,["Lift"]);this.heldCols.keyUp(t),e.chartView.getNotefield().lift(t),s&&this.hitNote(e,s,i)}shouldAssistTick(e){return!e.fake&&!e.warped&&e.type!="Mine"}hitNote(e,t,i){t.gameplay.hasHit=!0,Re(t)&&(t.gameplay.lastHoldActivation=Date.now(),t.type=="Roll"?e.chartView.getNotefield().activateRoll(t.col):e.chartView.getNotefield().activateHold(t.col),this.holdProgress.push(t));const s=this.chordCohesion.get(t.beat);if(s.every(n=>n.gameplay.hasHit)){const n=this.collection.judgeInput((i-t.second)/_.audio.rate),a=this.collection.shouldHideNote(n);s.forEach(o=>{e.chartView.doJudgement(o,(i-o.second)/_.audio.rate,n),a&&jg(o)&&(o.gameplay.hideNote=!0)}),e.gameStats?.addDataPoint(s,n,(i-t.second)/_.audio.rate)}}getClosestNote(e,t,i,s,n){n=n??this.collection.maxWindowMS(),n*=_.audio.rate;const a=t-n/1e3,o=t+n/1e3;let l=Rt(e,a,u=>u.second)+1;l>=1&&a<=e[l-1].second&&l--;let c;for(;e[l]&&e[l].second<=o;){const u=e[l];if(u.gameplay.hasHit||u.col!=i||u.fake||u.warped||!s.includes(u.type)){l++;continue}(!c||Math.abs(u.second-t)=i.getTimingWindowMS():!1}calculateMaxDP(e,t){const i=new Map,s=new Map;for(const a of e)a.type=="Mine"||a.fake||a.warped||(Re(a)&&(s.has(a.type)||s.set(a.type,0),s.set(a.type,s.get(a.type)+1)),i.has(a.beat)||i.set(a.beat,[]),i.get(a.beat).push(a));let n=i.size*Je.getCollection(_.play.timingCollection).getMaxDancePoints();return n+=Array.from(s.entries()).reduce((a,o)=>a+o[1]*Je.getCollection(_.play.timingCollection).getMaxHoldDancePoints(o[0]),0),n}}function Ht(r,e,t){return r*(1-t)+e*t}function Nt(r,e,t){return(t-r)/(e-r)}function ae(r,e){return Math.round(r*Math.pow(10,e))/Math.pow(10,e)}function Le(r,e,t){return Math.max(e,Math.min(t,r))}function Qg(r){if(r.length==0)return 0;const e=r.length,t=r.reduce((i,s)=>i+s)/e;return Math.sqrt(r.map(i=>Math.pow(i-t,2)).reduce((i,s)=>i+s)/e)}function Tl(r){if(r.length==0)return 0;r=[...r],r.sort((t,i)=>t-i);const e=Math.floor(r.length/2);return r.length%2?r[e]:(r[e-1]+r[e])/2}function HE(r){return r.length==0?0:r.reduce((e,t)=>e+t)/r.length}function ey(r,e){return e?ey(e,r%e):e===0?r:NaN}function ty(r,e){return r*e/ey(r,e)}function Zp(r){let e=1;for(let t=0;te&&(e=t);return e}class GE{}const VE={1:"Tap",2:"Hold",4:"Roll",M:"Mine",F:"Fake",L:"Lift"},WE={Tap:"1",Hold:"2",Roll:"4",Mine:"M",Fake:"F",Lift:"L"};class yi extends GE{serialize(e,t){if(e.length==0)return"";const i=[];let s=0;const n=e.filter(Re).map(c=>({col:c.col,beat:c.beat+c.hold})).sort((c,u)=>c.beat-u.beat),a=e.at(-1),o=a.beat+(Re(a)?a.hold:0);let l=Math.ceil(o/4);o%4==0&&l++;for(let c=0;cUc(f.beat))),Zp(d.map(f=>Uc(f.beat)))));for(let f=0;f=t.numCols);h++){const d=a*4+l/o.length*4;let p=c[h];if(p=="{"||p=="["){let f="";for(h++;hn[c]?n[c]=void 0:n[c]1&&t.Jumps++,s+l>2&&t.Hands++,s=0,i=o.beat}if(o.type!="Mine"&&!o.fake&&!o.warped&&s++,o.fake||o.warped){t.Fakes++;continue}switch(o.type){case"Tap":t.Taps++;break;case"Hold":t.Holds++;break;case"Roll":t.Rolls++;break;case"Lift":t.Lifts++;break;case"Mine":t.Mines++;break}Re(o)&&(n[o.col]=o.beat+o.hold)}let a=0;for(let o=0;o1&&t.Jumps++,s+a>2&&t.Hands++,t}getNPSGraph(e,t){const i=e.at(-1);if(!i)return[];let s=i.beat;Re(i)&&(s+=i.hold);const n=[];let a=0;for(;e[a];){const o=Math.floor(t.getMeasure(e[a].beat)),l=t.getBeatFromMeasure(o),c=t.getBeatFromMeasure(o+1),u=t.getSecondsFromBeat(c)-t.getSecondsFromBeat(l);if(u<=.05){for(;e[a]?.beat=e.chartView.chart.getSecondsFromBeat(o.beat+o.hold)&&(o.gameplay.hideNote=a.hitLast||l.length==0||o.gameplay?.droppedHoldBeat===void 0,this.tickProgress.delete(a))}for(const a of this.heldCols.getHeldCols()){const o=this.getClosestNote(e.loadedChart.getNotedata(),e.chartView.getTimeWithOffset()-this.collection.getMineJudgement().getTimingWindowMS()/2e3,a,["Mine"],this.collection.getMineJudgement().getTimingWindowMS()/2);o&&(o.gameplay.hasHit=!0,o.gameplay.hideNote=!0,e.chartView.doJudgement(o,0,this.collection.getMineJudgement()),e.gameStats?.addDataPoint([o],this.collection.getMineJudgement(),0),e.mine.play())}}hitNote(e,t,i){t.gameplay.hasHit=!0;const s=this.chordCohesion.get(t.beat);if(s.every(n=>n.gameplay.hasHit)){const n=this.collection.judgeInput((i-t.second)/_.audio.rate),a=this.collection.shouldHideNote(n);s.forEach(o=>{e.chartView.doJudgement(o,(i-o.second)/_.audio.rate,n),a&&jg(o)&&(o.gameplay.hideNote=!0)}),e.gameStats?.addDataPoint(s,n,(i-t.second)/_.audio.rate)}}startPlay(e){if(!e.loadedChart||!e.chartView)return;this.collection=Je.getCollection(_.play.timingCollection),this.chordCohesion.clear();for(const n of e.loadedChart.getNotedata())n.type=="Mine"||n.fake||n.warped||(this.chordCohesion.has(n.beat)||this.chordCohesion.set(n.beat,[]),this.chordCohesion.get(n.beat).push(n));const i=e.chartView.getTimeWithOffset()-this.collection.maxWindowMS()/1e3*_.audio.rate;let s=Rt(e.loadedChart.getNotedata(),i,n=>n.second)+1;s>=1&&i<=e.loadedChart.getNotedata()[s-1].second&&s--,this.missNoteIndex=s,this.holdIndex=s,this.tickProgress=new Set,this.heldCols.reset()}keyDown(e,t){if(!e.loadedChart||!e.chartView)return;const i=e.chartView.getTimeWithOffset(),s=this.getClosestNote(e.loadedChart.getNotedata(),i,t,["Tap","Hold","Roll"]);this.heldCols.keyDown(t),e.chartView.getNotefield().press(t);for(const{hold:n}of this.tickProgress)n.type=="Roll"&&n.col==t&&(n.gameplay.lastHoldActivation=Date.now(),n.gameplay.droppedHoldBeat=void 0,e.chartView.getNotefield().activateRoll(n.col));s?this.hitNote(e,s,i):e.chartView.getNotefield().ghostTap(t)}shouldDropHold(e,t){if(!e.gameplay?.lastHoldActivation)return!1;const i=this.collection.getHeldJudgement(e);return i?t-e.gameplay.lastHoldActivation>=i.getTimingWindowMS():!1}generateHoldTicks(e,t){const i=e.getTimingData("TICKCOUNTS");let s=Rt(i,t.beat,c=>c.beat),a=1/(i[s]??{type:"TICKCOUNTS",beat:0,value:4}).value,o=Math.round(t.beat/a)*a;o==t.beat&&(o+=a);const l=[];for((i[s]?.value??4)!=0?l.push(o):o=t.beat;oc<=Zi(t)&&!e.isBeatWarped(c))}else o+=a;(i[s]?.value??4)!=0&&l.at(-1)!=o&&l.push(o)}return l.filter(c=>c<=Zi(t)&&!e.isBeatWarped(c))}calculateMaxDP(e,t){const i=new Map;let s=0;for(const n of e)n.type=="Mine"||n.fake||(Re(n)&&(s+=Je.getCollection(_.play.timingCollection).getMaxDancePoints()*this.generateHoldTicks(t,n).length),!n.warped&&(i.has(n.beat)||i.set(n.beat,[]),i.get(n.beat).push(n)));return s+=i.size*Je.getCollection(_.play.timingCollection).getMaxDancePoints(),s}}class ze{static gameTypes={};static priority=[];static register(e){e.notefieldWidth=e.columnWidths.reduce((t,i)=>t+i,0),ze.gameTypes[e.id]=e,this.priority.push(e)}static getPriority(){return this.priority}static getGameType(e){return ze.gameTypes[e]}static getTypes(){return this.gameTypes}}ze.register({id:"dance-single",numCols:4,columnWidths:[64,64,64,64],columnNames:["Left","Down","Up","Right"],gameLogic:new qr,parser:new yi,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[3,1,2,0],vertical:[0,2,1,3]}});ze.register({id:"dance-double",numCols:8,columnWidths:[64,64,64,64,64,64,64,64],columnNames:["Left","Down","Up","Right","Left","Down","Up","Right"],gameLogic:new qr,parser:new yi,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[3,1,2,0,7,5,6,4],vertical:[0,2,1,3,4,6,5,7]}});ze.register({id:"dance-couple",numCols:8,columnWidths:[64,64,64,64,64,64,64,64],columnNames:["Left","Down","Up","Right","Left","Down","Up","Right"],gameLogic:new qr,parser:new yi,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[3,1,2,0,7,5,6,4],vertical:[0,2,1,3,4,6,5,7]}});ze.register({id:"dance-solo",numCols:6,columnWidths:[64,64,64,64,64,64],columnNames:["Left","UpLeft","Down","Up","UpRight","Right"],gameLogic:new qr,parser:new yi,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[5,4,2,3,1,0],vertical:[0,1,3,2,4,5]}});ze.register({id:"dance-solodouble",numCols:12,columnWidths:[64,64,64,64,64,64,64,64,64,64,64,64],columnNames:["Left","UpLeft","Down","Up","UpRight","Right","Left","UpLeft","Down","Up","UpRight","Right"],gameLogic:new qr,parser:new yi,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[5,4,2,3,1,0,11,10,8,9,7,6],vertical:[0,1,3,2,4,5,6,7,9,8,10,11]}});ze.register({id:"dance-threepanel",numCols:3,columnWidths:[64,64,64],columnNames:["UpLeft","Down","UpRight"],gameLogic:new qr,parser:new yi,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[2,1,0],vertical:[0,1,2]}});ze.register({id:"dance-threedouble",numCols:6,columnWidths:[64,64,64,64,64,64],columnNames:["UpLeft","Down","UpRight","UpLeft","Down","UpRight"],gameLogic:new qr,parser:new yi,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[2,1,0,5,4,3],vertical:[0,1,2,3,4,5]}});ze.register({id:"pump-single",numCols:5,columnWidths:[58,58,58,58,58],columnNames:["DownLeft","UpLeft","Center","UpRight","DownRight"],gameLogic:new Ea,parser:new yi,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[4,3,2,1,0],vertical:[1,0,2,4,3]}});ze.register({id:"pump-double",numCols:10,columnWidths:[58,58,58,58,58,58,58,58,58,58],columnNames:["DownLeft","UpLeft","Center","UpRight","DownRight","DownLeft","UpLeft","Center","UpRight","DownRight"],gameLogic:new Ea,parser:new yi,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[9,8,7,6,5,4,3,2,1,0],vertical:[1,0,2,4,3,6,5,7,9,8]}});ze.register({id:"pump-versus",numCols:10,columnWidths:[58,58,58,58,58,58,58,58,58,58],columnNames:["DownLeft","UpLeft","Center","UpRight","DownRight","DownLeft","UpLeft","Center","UpRight","DownRight"],gameLogic:new Ea,parser:new yi,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[9,8,7,6,5,4,3,2,1,0],vertical:[1,0,2,4,3,6,5,7,9,8]}});ze.register({id:"pump-couple",numCols:10,columnWidths:[58,58,58,58,58,58,58,58,58,58],columnNames:["DownLeft","UpLeft","Center","UpRight","DownRight","DownLeft","UpLeft","Center","UpRight","DownRight"],gameLogic:new Ea,parser:new yi,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[9,8,7,6,5,4,3,2,1,0],vertical:[1,0,2,4,3,6,5,7,9,8]}});ze.register({id:"pump-halfdouble",numCols:6,columnWidths:[58,58,58,58,58,58],columnNames:["Center","UpRight","DownRight","DownLeft","UpLeft","Center"],gameLogic:new Ea,parser:new yi,editNoteTypes:["Tap","Mine","Fake","Lift"],flipColumns:{horizontal:[5,4,3,2,1,0],vertical:[0,2,1,4,3,5]}});const Ai=["Beginner","Easy","Medium","Hard","Challenge","Edit"],fr=["BPMS","STOPS","WARPS","DELAYS","LABELS","SPEEDS","SCROLLS","TICKCOUNTS","TIMESIGNATURES","COMBOS","FAKES","ATTACKS","BGCHANGES","FGCHANGES"];class iy{gameType=ze.getPriority()[0];description="";difficulty="Beginner";meter=1;meterF=1;radarValues="0,0,0,0,0";chartName="";chartStyle="";credit="";music;timingData;sm;other_properties={};notedata=[];_notedataStats;_npsGraph;_lastBeat=0;_lastSecond=0;constructor(e,t){if(this.timingData=e.timingData.createChartTimingData(this),this.timingData.reloadCache(),this.sm=e,!t){this.recalculateStats();return}if(e._type=="ssc"){const i=t;for(const n in i)(n=="OFFSET"||fr.includes(n))&&this.timingData.parse(n,i[n]);this.timingData.reloadCache();const s=ze.getGameType(i.STEPSTYPE);if(!s)throw Error("Unknown step type "+i.STEPSTYPE);if(this.gameType=s,this.description=i.DESCRIPTION??"",Ai.includes(i.DIFFICULTY))this.difficulty=i.DIFFICULTY;else throw Error("Unknown chart difficulty "+i.DIFFICULTY);this.meter=parseInt(i.METER),(!isFinite(this.meter)||this.meter<0)&&(this.meter=0),this.meterF=parseFloat(i.METERF),(!isFinite(this.meterF)||this.meterF<0)&&(this.meterF=this.meter),this.radarValues=i.RADARVALUES??"",this.notedata=s.parser.fromString(i.NOTES,s).map(n=>this.computeNote(n))??[],this.credit=i.CREDIT??"",this.chartName=i.CHARTNAME??"",this.chartStyle=i.CHARTSTYLE??"",this.music=i.MUSIC;for(const n in i)["STEPSTYPE","DESCRIPTION","DIFFICULTY","METER","METERF","RADARVALUES","CREDIT","CHARTNAME","CHARTSTYLE","MUSIC","NOTES","NOTEDATA"].includes(n)||(this.other_properties[n]=i[n])}else{const i=/([\w-]+):[\s ]*([^:]*):[\s ]*(\w+):[\s ]*(\d+):[\s ]*([\d.,]*):[\s ]*([\w\s, ]*)/g.exec(t.trim());if(i!=null){const s=ze.getGameType(i[1]);if(!s)throw Error("Unknown step type "+i[1]);if(this.gameType=s,this.description=i[2]??"",Ai.includes(i[3]))this.difficulty=i[3];else throw Error("Unknown chart difficulty "+i[3]);this.meter=parseInt(i[4]),(!isFinite(this.meter)||this.meter<0)&&(this.meter=0),this.meterF=this.meter,this.radarValues=i[5]??"",this.notedata=s.parser.fromString(i[6],s).map(n=>this.computeNote(n))??[]}else throw Error("Failed to load sm chart!")}this.recalculateStats()}getNotedataStats(){return this._notedataStats}getNPSGraph(){return this._npsGraph}getMaxNPS(){let e=0;for(const t of this._npsGraph)t>e&&(e=t);return e}getLastBeat(){return this._lastBeat}getLastSecond(){return this._lastSecond}getSecondsFromBeat(e,t){return this.timingData.getSecondsFromBeat(e,t)}getBeatFromSeconds(e){return this.timingData.getBeatFromSeconds(e)}getBeatFromEffectiveBeat(e){return this.timingData.getBeatFromEffectiveBeat(e)}isBeatWarped(e){return this.timingData.isBeatWarped(e)}isBeatFaked(e){return this.timingData.isBeatFaked(e)}recalculateLastNote(){let e=0,t=0;this.notedata.forEach(i=>{const s=i.beat+(Re(i)?i.hold:0),n=this.timingData.getSecondsFromBeat(s);s>e&&(e=s),n>t&&(t=n)}),this._lastBeat=e,this._lastSecond=t}getNoteIndex(e){if(this.notedata.includes(e))return this.notedata.indexOf(e);for(let t=0;ts.beat)+1;return i>=1&&this.notedata[i-1].beat>e.beat&&i--,this.notedata.splice(i,0,t),t}addNote(e,t=!0){const i=this.insertNote(e);return t&&K.emit("chartModified"),i}addNotes(e,t=!0){const i=e.map(s=>this.insertNote(s));return t&&K.emit("chartModified"),i}computeNote(e){return Object.assign(e,{warped:this.timingData.isBeatWarped(e.beat),fake:e.type=="Fake"||this.timingData.isBeatFaked(e.beat),second:this.timingData.getSecondsFromBeat(e.beat),quant:Math.round(Uc(this.timingData.getBeatOfMeasure(e.beat)))})}modifyNote(e,t,i=!0){const s=this.getNoteIndex(e);if(s==-1)return;const n=Object.assign({},this.notedata[s]);this.notedata.splice(s,1),Re(t)||(t.hold=void 0),Object.assign(n,t),this.addNote(n),i&&K.emit("chartModified")}removeNote(e,t=!0){const i=this.getNoteIndex(e);if(i==-1)return;const s=this.notedata.splice(i,1);return t&&K.emit("chartModified"),s[0]}removeNotes(e,t=!0){const i=e.map(s=>{const n=this.getNoteIndex(s);return n==-1?void 0:this.notedata.splice(n,1)[0]}).filter(s=>s!=null);return t&&K.emit("chartModified"),i}setNotedata(e){this.notedata=e,K.emit("chartModified")}getNotedata(){return this.notedata}recalculateNotes(){this.notedata=this.notedata.map(e=>this.computeNote(e))}recalculateStats(){this._notedataStats=this.gameType.parser.getStats(this.notedata),this._npsGraph=this.gameType.parser.getNPSGraph(this.notedata,this.timingData),this.recalculateLastNote()}getMusicPath(){return this.music??this.sm.properties.MUSIC??""}toString(){return this.difficulty+" "+this.meter}serialize(e){let t="//---------------"+this.gameType.id+" - "+this.description+`--------------- -`;if(e=="sm")t+=`#NOTES: -`,t+=` ${this.gameType.id}: -`,t+=` ${this.description}: -`,t+=` ${this.difficulty}: -`,t+=` ${this.meter}: -`,t+=` ${this.radarValues}: -`;else{t+=`#NOTEDATA:; -`,t+=`#CHARTNAME:${this.chartName}; -`,t+=`#CHARTSTYLE:${this.chartStyle}; -`,t+=`#CREDIT:${this.credit}; -`,this.music&&(t+=`#MUSIC:${this.music}; -`),t+=`#STEPSTYPE:${this.gameType.id}; -`,t+=`#DESCRIPTION:${this.description}; -`,t+=`#DIFFICULTY:${this.difficulty}; -`,t+=`#METER:${this.meter}; -`,t+=`#METERF:${this.meterF}; -`,t+=`#RADARVALUES:${this.radarValues}; -`;for(const i in this.other_properties)t+=`#${i}:${this.other_properties[i]}; -`;this.timingData.usesChartTiming()||(t+=this.timingData.serialize("ssc")),t+=`#NOTES: -`}return t+=this.gameType.parser.serialize(this.notedata,this.gameType)+`; -`,t}requiresSSC(){return this.chartName!==""||this.chartStyle!==""||this.credit!==""||this.music!==void 0||this.timingData.requiresSSC()}}class zE extends HTMLDivElement{_width;_height;_color;_svg;loadSVG(e){this.innerHTML=e,this._svg=this.children[0],this.updateStyles()}updateStyles(){this._svg&&(this.style.width="",this.style.height="",this._width!==void 0&&(this._svg.style.width=this._width+"px"),this._height!==void 0&&(this._svg.style.height=this._height+"px"),this._color!==void 0&&(this._svg.style.color=this._color))}get width(){return this._width}set width(e){e!==void 0&&(this._width=e,this.updateStyles())}get height(){return this._height}set height(e){e!==void 0&&(this._height=e,this.updateStyles())}get color(){return this._color}set color(e){e!==void 0&&(this._color=e,this.updateStyles())}}class Se{static cache=new Map;static pendingWrappers=new Map;static getIcon(e,t,i,s){const n=document.createElement("div");if(Object.setPrototypeOf(n,zE.prototype),n.loadSVG("
"),n.classList.add("icon"),this.cache.has(e))n.loadSVG(this.cache.get(e));else{const a=!this.pendingWrappers.has(e);this.pendingWrappers.has(e)||this.pendingWrappers.set(e,[]),this.pendingWrappers.get(e).push(n),a&&this.fetchIcon(e)}return n.width=t,i===void 0&&t!==void 0&&(i=t),n.height=i,n.color=s,n}static fetchIcon(e){fetch(`/smeditor/assets/svg/${e}.svg`).then(t=>t.text()).then(t=>{this.cache.set(e,t),this.pendingWrappers.get(e).forEach(i=>{i.loadSVG(t)}),this.pendingWrappers.set(e,[])})}}const ef=globalThis.showDirectoryPicker;async function jE(r={}){if(ef&&!r._preferPolyfill)return ef(r);const e=document.createElement("input");e.type="file",e.webkitdirectory=!0,e.multiple=!0,e.style.position="fixed",e.style.top="-100000px",e.style.left="-100000px",document.body.appendChild(e);const{makeDirHandleFromFileList:t}=await Ke(()=>Promise.resolve().then(()=>Vg),void 0);return new Promise((i,s)=>{e.addEventListener("change",()=>{t(e.files).then(i).catch(s),document.body.removeChild(e)}),e.click()})}const tf=globalThis.showOpenFilePicker;async function ry(r={}){if(tf&&!r._preferPolyfill)return tf(r);const e=document.createElement("input");e.type="file",e.multiple=!!r.multiple,e.accept=(r.accepts||[]).map(i=>[...(i.extensions||[]).map(s=>"."+s),...i.mimeTypes||[]]).flat().join(","),e.style.position="fixed",e.style.top="-100000px",e.style.left="-100000px",document.body.appendChild(e);const{makeFileHandlesFromFileList:t}=await Ke(()=>Promise.resolve().then(()=>Vg),void 0);return new Promise((i,s)=>{e.addEventListener("change",()=>{t(e.files).then(i).catch(s),document.body.removeChild(e)}),e.click()})}const rf=globalThis.showSaveFilePicker;async function $E(r={}){if(rf&&!r._preferPolyfill)return rf(r);const{FileSystemFileHandle:e}=await Ke(()=>Promise.resolve().then(()=>sy),void 0),{FileHandle:t}=await Ke(()=>import("./downloader-0c348135.js"),[]);return new e(new t(r.suggestedName))}const Os=Symbol("adapter");let Md=class{constructor(e){this.kind=e.kind,this.name=e.name,this[Os]=e}get isFile(){return this.kind==="file"}get isDirectory(){return this.kind==="directory"}async queryPermission(e={mode:"read"}){const t=this[Os];if(t.queryPermission)return t.queryPermission(e);if(e.mode==="read")return"granted";if(e.mode==="readwrite")return t.writable?"granted":"denied";throw new TypeError(`Mode ${e.mode} must be 'read' or 'readwrite'`)}async requestPermission(e={mode:"read"}){const t=this[Os];if(t.requestPermission)return t.requestPermission(e);if(e.mode==="read")return"granted";if(e.mode==="readwrite")return t.writable?"granted":"denied";throw new TypeError(`Mode ${e.mode} must be 'read' or 'readwrite'`)}async isSameEntry(e){return this===e?!0:this.kind!==e.kind||!e[Os]?!1:await this[Os].isSameEntry(e[Os])}};Object.defineProperty(Md.prototype,Symbol.toStringTag,{value:"FileSystemHandle",writable:!1,enumerable:!1,configurable:!0});const wh=Symbol("adapter");let _n=class extends Md{constructor(e){super(e),this.kind="file",this[wh]=e}async createWritable(e={}){const{FileSystemWritableFileStream:t}=await Ke(()=>import("./FileSystemWritableFileStream-e4c13ad9.js"),["FileSystemWritableFileStream-e4c13ad9.js","web-streams-ponyfill-4a0f4950.js"]);return new t(await this[wh].createWritable(e))}async getFile(){return this[wh].getFile()}};Object.defineProperty(_n.prototype,Symbol.toStringTag,{value:"FileSystemFileHandle",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties(_n.prototype,{createWritable:{enumerable:!0},getFile:{enumerable:!0}});const sy=Object.freeze(Object.defineProperty({__proto__:null,FileSystemFileHandle:_n,default:_n},Symbol.toStringTag,{value:"Module"})),Fs=Symbol("adapter");class jr extends Md{constructor(e){super(e),this.kind="directory",this[Fs]=e}async getDirectoryHandle(e,t={}){if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");return new jr(await this[Fs].getDirectoryHandle(e,t))}getDirectory(e,t={}){return this.getDirectoryHandle(e,t)}async*entries(){for await(const[e,t]of this[Fs].entries())yield[t.name,t.kind==="file"?new _n(t):new jr(t)]}async*getEntries(){return this.entries()}async*keys(){for await(const[e]of this[Fs].entries())yield e}async*values(){for await(const[e,t]of this.entries())yield t}async getFileHandle(e,t={}){if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");return t.create=!!t.create,new _n(await this[Fs].getFileHandle(e,t))}getFile(e,t={}){return this.getFileHandle(e,t)}async removeEntry(e,t={}){if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");return t.recursive=!!t.recursive,this[Fs].removeEntry(e,t)}async resolve(e){if(await e.isSameEntry(this))return[];const t=[{handle:this,path:[]}];for(;t.length;){let{handle:i,path:s}=t.pop();for await(const n of i.values()){if(await n.isSameEntry(e))return[...s,n.name];n.kind==="directory"&&t.push({handle:n,path:[...s,n.name]})}}return null}[Symbol.asyncIterator](){return this.entries()}}Object.defineProperty(jr.prototype,Symbol.toStringTag,{value:"FileSystemDirectoryHandle",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties(jr.prototype,{getDirectoryHandle:{enumerable:!0},entries:{enumerable:!0},getFileHandle:{enumerable:!0},removeEntry:{enumerable:!0}});const XE=Object.freeze(Object.defineProperty({__proto__:null,FileSystemDirectoryHandle:jr,default:jr},Symbol.toStringTag,{value:"Module"}));async function sf(r,e={}){var t,i,s,n;if(!r){if(!(!((t=globalThis.navigator)===null||t===void 0)&&t.storage)&&((i=globalThis.location)===null||i===void 0?void 0:i.protocol)==="http:")throw new Error("Native getDirectory not supported in HTTP context. Please use HTTPS instead or provide an adapter.");if(!(!((n=(s=globalThis.navigator)===null||s===void 0?void 0:s.storage)===null||n===void 0)&&n.getDirectory))throw new Error("Native StorageManager.getDirectory() is not supported in current environment. Please provide an adapter instead.");return globalThis.navigator.storage.getDirectory()}const a=await r,o=typeof a=="function"?await a(e):await a.default(e);return new jr(o)}var _h,xh;const YE={adapter:{cache:!!(globalThis.CacheStorage&&globalThis.caches instanceof CacheStorage),native:typeof((xh=(_h=globalThis.navigator)===null||_h===void 0?void 0:_h.storage)===null||xh===void 0?void 0:xh.getDirectory)=="function",sandbox:typeof window<"u"&&typeof window.webkitRequestFileSystem=="function"}},nf=r=>typeof r=="object"&&r!=null&&r.nodeType===1,af=(r,e)=>(!e||r!=="hidden")&&r!=="visible"&&r!=="clip",Th=(r,e)=>{if(r.clientHeight{const s=(n=>{if(!n.ownerDocument||!n.ownerDocument.defaultView)return null;try{return n.ownerDocument.defaultView.frameElement}catch{return null}})(i);return!!s&&(s.clientHeightne||n>r&&a=e&&o>=t?n-r-i:a>e&&ot?a-e+s:0,qE=r=>{const e=r.parentElement;return e??(r.getRootNode().host||null)},of=(r,e)=>{var t,i,s,n;if(typeof document>"u")return[];const{scrollMode:a,block:o,inline:l,boundary:c,skipOverflowHiddenElements:u}=e,h=typeof c=="function"?c:$=>$!==c;if(!nf(r))throw new TypeError("Invalid target");const d=document.scrollingElement||document.documentElement,p=[];let f=r;for(;nf(f)&&h(f);){if(f=qE(f),f===d){p.push(f);break}f!=null&&f===document.body&&Th(f)&&!Th(document.documentElement)||f!=null&&Th(f,u)&&p.push(f)}const m=(i=(t=window.visualViewport)==null?void 0:t.width)!=null?i:innerWidth,g=(n=(s=window.visualViewport)==null?void 0:s.height)!=null?n:innerHeight,{scrollX:y,scrollY:w}=window,{height:b,width:v,top:A,right:C,bottom:I,left:L}=r.getBoundingClientRect(),{top:k,right:N,bottom:G,left:E}=($=>{const R=window.getComputedStyle($);return{top:parseFloat(R.scrollMarginTop)||0,right:parseFloat(R.scrollMarginRight)||0,bottom:parseFloat(R.scrollMarginBottom)||0,left:parseFloat(R.scrollMarginLeft)||0}})(r);let S=o==="start"||o==="nearest"?A-k:o==="end"?I+G:A+b/2-k+G,x=l==="center"?L+v/2-E+N:l==="end"?C+N:L-E;const D=[];for(let $=0;$=0&&L>=0&&I<=g&&C<=m&&A>=V&&I<=U&&L>=te&&C<=F)return D;const Q=getComputedStyle(R),Z=parseInt(Q.borderLeftWidth,10),ye=parseInt(Q.borderTopWidth,10),Ce=parseInt(Q.borderRightWidth,10),ce=parseInt(Q.borderBottomWidth,10);let fe=0,we=0;const le="offsetWidth"in R?R.offsetWidth-R.clientWidth-Z-Ce:0,pe="offsetHeight"in R?R.offsetHeight-R.clientHeight-ye-ce:0,be="offsetWidth"in R?R.offsetWidth===0?0:W/R.offsetWidth:0,T="offsetHeight"in R?R.offsetHeight===0?0:O/R.offsetHeight:0;if(d===R)fe=o==="start"?S:o==="end"?S-g:o==="nearest"?oo(w,w+g,g,ye,ce,w+S,w+S+b,b):S-g/2,we=l==="start"?x:l==="center"?x-m/2:l==="end"?x-m:oo(y,y+m,m,Z,Ce,y+x,y+x+v,v),fe=Math.max(0,fe+w),we=Math.max(0,we+y);else{fe=o==="start"?S-V-ye:o==="end"?S-U+ce+pe:o==="nearest"?oo(V,U,O,ye,ce+pe,S,S+b,b):S-(V+O/2)+pe/2,we=l==="start"?x-te-Z:l==="center"?x-(te+W/2)+le/2:l==="end"?x-F+Ce+le:oo(te,F,W,Z,Ce+le,x,x+v,v);const{scrollLeft:X,scrollTop:j}=R;fe=T===0?0:Math.max(0,Math.min(j+fe/T,R.scrollHeight-O/T+pe)),we=be===0?0:Math.max(0,Math.min(X+we/be,R.scrollWidth-W/be+le)),S+=j-fe,x+=X-we}D.push({el:R,top:fe,left:we})}return D},KE=r=>r===!1?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&Object.keys(e).length!==0)(r)?r:{block:"start",inline:"nearest"};function sa(r,e){if(!r.isConnected||!(s=>{let n=s;for(;n&&n.parentNode;){if(n.parentNode===document)return!0;n=n.parentNode instanceof ShadowRoot?n.parentNode.host:n.parentNode}return!1})(r))return;const t=(s=>{const n=window.getComputedStyle(s);return{top:parseFloat(n.scrollMarginTop)||0,right:parseFloat(n.scrollMarginRight)||0,bottom:parseFloat(n.scrollMarginBottom)||0,left:parseFloat(n.scrollMarginLeft)||0}})(r);if((s=>typeof s=="object"&&typeof s.behavior=="function")(e))return e.behavior(of(r,e));const i=typeof e=="boolean"||e==null?void 0:e.behavior;for(const{el:s,top:n,left:a}of of(r,KE(e))){const o=n-t.top+t.bottom,l=a-t.left+t.right;s.scroll({top:o,left:l,behavior:i})}}function ji(r,e){let t=kd(r)[2];return e&&t.slice(-1*e.length)===e&&(t=t.slice(0,t.length-e.length)),t}function Ot(r){const e=kd(r),t=e[0];let i=e[1];return!t&&!i?"":(i&&(i=i.slice(0,i.length-1)),t+i)}function Xi(r){return kd(r)[3]}const ZE=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^/]+?|)(\.[^./]*|))(?:[/]*)$/;function kd(r){return ZE.exec(r).slice(1)}const{GONE:ny}=qo;FileSystemFileHandle;class Id{_path;kind="file";name;isFile=!0;isDirectory=!1;constructor(e){this._path=e,this.name=new URL(e).pathname.split("/").pop()??""}async getFile(){return fetch(this._path).then(e=>e.blob()).then(e=>new File([e],this.name)).catch(()=>{throw new DOMException(...ny)})}async createWritable(){throw Error("Cannot call createWriteable from a URLFileHandle")}async isSameEntry(e){return FileSystemHandle instanceof Id?e._path==this._path:!1}async queryPermission(){return"granted"}async requestPermission(){return"granted"}}class JE{async handleDropEvent(e,t){throw Error("Cannot call handleDropEvent from a URLFileHandler")}async getDirectoryHandle(e,t,i){throw Error("Cannot call getDirectoryHandle from a URLFileHandler")}async hasFile(e){return fetch(e).then(t=>t.ok).catch(()=>!1)}async getFileHandle(e,t){try{if(!await this.hasFile(e))throw new DOMException(...ny);return new Id(e)}catch(i){console.error("Failed to get file "+e+": "+i);return}}async getFileHandleRelativeTo(e,t){const i=new URL(e);Xi(i.pathname)!=""&&(i.pathname=i.pathname.split("/").slice(0,-1).join("/")),i.pathname+="/"+t;try{return this.getFileHandle(i.toString())}catch(s){console.error("Failed to get relative file "+i+": "+s);return}}async getDirectoryFiles(e){throw Error("Cannot call getDirectoryFiles from a URLFileHandler")}async getDirectoryFolders(e){throw Error("Cannot call getDirectoryFolders from a URLFileHandler")}async writeFile(e,t){throw Error("Cannot save to a URL file!")}getRelativePath(e,t){throw Error("Cannot call getRelativePath from a URLFileHandler")}}function lo(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ay={exports:{}};/*! - -JSZip v3.10.1 - A JavaScript class for generating and reading zip files - - -(c) 2009-2016 Stuart Knightley -Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown. - -JSZip uses the library pako released under the MIT license : -https://github.com/nodeca/pako/blob/main/LICENSE -*/(function(r,e){(function(t){r.exports=t()})(function(){return function t(i,s,n){function a(c,u){if(!s[c]){if(!i[c]){var h=typeof lo=="function"&&lo;if(!u&&h)return h(c,!0);if(o)return o(c,!0);var d=new Error("Cannot find module '"+c+"'");throw d.code="MODULE_NOT_FOUND",d}var p=s[c]={exports:{}};i[c][0].call(p.exports,function(f){var m=i[c][1][f];return a(m||f)},p,p.exports,t,i,s,n)}return s[c].exports}for(var o=typeof lo=="function"&&lo,l=0;l>2,p=(3&c)<<4|u>>4,f=1>6:64,m=2>4,u=(15&d)<<4|(p=o.indexOf(l.charAt(m++)))>>2,h=(3&p)<<6|(f=o.indexOf(l.charAt(m++))),w[g++]=c,p!==64&&(w[g++]=u),f!==64&&(w[g++]=h);return w}},{"./support":30,"./utils":32}],2:[function(t,i,s){var n=t("./external"),a=t("./stream/DataWorker"),o=t("./stream/Crc32Probe"),l=t("./stream/DataLengthProbe");function c(u,h,d,p,f){this.compressedSize=u,this.uncompressedSize=h,this.crc32=d,this.compression=p,this.compressedContent=f}c.prototype={getContentWorker:function(){var u=new a(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")),h=this;return u.on("end",function(){if(this.streamInfo.data_length!==h.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),u},getCompressedWorker:function(){return new a(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},c.createWorkerFrom=function(u,h,d){return u.pipe(new o).pipe(new l("uncompressedSize")).pipe(h.compressWorker(d)).pipe(new l("compressedSize")).withStreamInfo("compression",h)},i.exports=c},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,i,s){var n=t("./stream/GenericWorker");s.STORE={magic:"\0\0",compressWorker:function(){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},s.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,i,s){var n=t("./utils"),a=function(){for(var o,l=[],c=0;c<256;c++){o=c;for(var u=0;u<8;u++)o=1&o?3988292384^o>>>1:o>>>1;l[c]=o}return l}();i.exports=function(o,l){return o!==void 0&&o.length?n.getTypeOf(o)!=="string"?function(c,u,h,d){var p=a,f=d+h;c^=-1;for(var m=d;m>>8^p[255&(c^u[m])];return-1^c}(0|l,o,o.length,0):function(c,u,h,d){var p=a,f=d+h;c^=-1;for(var m=d;m>>8^p[255&(c^u.charCodeAt(m))];return-1^c}(0|l,o,o.length,0):0}},{"./utils":32}],5:[function(t,i,s){s.base64=!1,s.binary=!1,s.dir=!1,s.createFolders=!0,s.date=null,s.compression=null,s.compressionOptions=null,s.comment=null,s.unixPermissions=null,s.dosPermissions=null},{}],6:[function(t,i,s){var n=null;n=typeof Promise<"u"?Promise:t("lie"),i.exports={Promise:n}},{lie:37}],7:[function(t,i,s){var n=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",a=t("pako"),o=t("./utils"),l=t("./stream/GenericWorker"),c=n?"uint8array":"array";function u(h,d){l.call(this,"FlateWorker/"+h),this._pako=null,this._pakoAction=h,this._pakoOptions=d,this.meta={}}s.magic="\b\0",o.inherits(u,l),u.prototype.processChunk=function(h){this.meta=h.meta,this._pako===null&&this._createPako(),this._pako.push(o.transformTo(c,h.data),!1)},u.prototype.flush=function(){l.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},u.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},u.prototype._createPako=function(){this._pako=new a[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var h=this;this._pako.onData=function(d){h.push({data:d,meta:h.meta})}},s.compressWorker=function(h){return new u("Deflate",h)},s.uncompressWorker=function(){return new u("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,i,s){function n(p,f){var m,g="";for(m=0;m>>=8;return g}function a(p,f,m,g,y,w){var b,v,A=p.file,C=p.compression,I=w!==c.utf8encode,L=o.transformTo("string",w(A.name)),k=o.transformTo("string",c.utf8encode(A.name)),N=A.comment,G=o.transformTo("string",w(N)),E=o.transformTo("string",c.utf8encode(N)),S=k.length!==A.name.length,x=E.length!==N.length,D="",$="",R="",O=A.dir,W=A.date,V={crc32:0,compressedSize:0,uncompressedSize:0};f&&!m||(V.crc32=p.crc32,V.compressedSize=p.compressedSize,V.uncompressedSize=p.uncompressedSize);var F=0;f&&(F|=8),I||!S&&!x||(F|=2048);var U=0,te=0;O&&(U|=16),y==="UNIX"?(te=798,U|=function(Z,ye){var Ce=Z;return Z||(Ce=ye?16893:33204),(65535&Ce)<<16}(A.unixPermissions,O)):(te=20,U|=function(Z){return 63&(Z||0)}(A.dosPermissions)),b=W.getUTCHours(),b<<=6,b|=W.getUTCMinutes(),b<<=5,b|=W.getUTCSeconds()/2,v=W.getUTCFullYear()-1980,v<<=4,v|=W.getUTCMonth()+1,v<<=5,v|=W.getUTCDate(),S&&($=n(1,1)+n(u(L),4)+k,D+="up"+n($.length,2)+$),x&&(R=n(1,1)+n(u(G),4)+E,D+="uc"+n(R.length,2)+R);var Q="";return Q+=` -\0`,Q+=n(F,2),Q+=C.magic,Q+=n(b,2),Q+=n(v,2),Q+=n(V.crc32,4),Q+=n(V.compressedSize,4),Q+=n(V.uncompressedSize,4),Q+=n(L.length,2),Q+=n(D.length,2),{fileRecord:h.LOCAL_FILE_HEADER+Q+L+D,dirRecord:h.CENTRAL_FILE_HEADER+n(te,2)+Q+n(G.length,2)+"\0\0\0\0"+n(U,4)+n(g,4)+L+D+G}}var o=t("../utils"),l=t("../stream/GenericWorker"),c=t("../utf8"),u=t("../crc32"),h=t("../signature");function d(p,f,m,g){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=f,this.zipPlatform=m,this.encodeFileName=g,this.streamFiles=p,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(d,l),d.prototype.push=function(p){var f=p.meta.percent||0,m=this.entriesCount,g=this._sources.length;this.accumulate?this.contentBuffer.push(p):(this.bytesWritten+=p.data.length,l.prototype.push.call(this,{data:p.data,meta:{currentFile:this.currentFile,percent:m?(f+100*(m-g-1))/m:100}}))},d.prototype.openedSource=function(p){this.currentSourceOffset=this.bytesWritten,this.currentFile=p.file.name;var f=this.streamFiles&&!p.file.dir;if(f){var m=a(p,f,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:m.fileRecord,meta:{percent:0}})}else this.accumulate=!0},d.prototype.closedSource=function(p){this.accumulate=!1;var f=this.streamFiles&&!p.file.dir,m=a(p,f,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(m.dirRecord),f)this.push({data:function(g){return h.DATA_DESCRIPTOR+n(g.crc32,4)+n(g.compressedSize,4)+n(g.uncompressedSize,4)}(p),meta:{percent:100}});else for(this.push({data:m.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},d.prototype.flush=function(){for(var p=this.bytesWritten,f=0;f=this.index;l--)c=(c<<8)+this.byteAt(l);return this.index+=o,c},readString:function(o){return n.transformTo("string",this.readData(o))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var o=this.readInt(4);return new Date(Date.UTC(1980+(o>>25&127),(o>>21&15)-1,o>>16&31,o>>11&31,o>>5&63,(31&o)<<1))}},i.exports=a},{"../utils":32}],19:[function(t,i,s){var n=t("./Uint8ArrayReader");function a(o){n.call(this,o)}t("../utils").inherits(a,n),a.prototype.readData=function(o){this.checkOffset(o);var l=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,l},i.exports=a},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,i,s){var n=t("./DataReader");function a(o){n.call(this,o)}t("../utils").inherits(a,n),a.prototype.byteAt=function(o){return this.data.charCodeAt(this.zero+o)},a.prototype.lastIndexOfSignature=function(o){return this.data.lastIndexOf(o)-this.zero},a.prototype.readAndCheckSignature=function(o){return o===this.readData(4)},a.prototype.readData=function(o){this.checkOffset(o);var l=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,l},i.exports=a},{"../utils":32,"./DataReader":18}],21:[function(t,i,s){var n=t("./ArrayReader");function a(o){n.call(this,o)}t("../utils").inherits(a,n),a.prototype.readData=function(o){if(this.checkOffset(o),o===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+o);return this.index+=o,l},i.exports=a},{"../utils":32,"./ArrayReader":17}],22:[function(t,i,s){var n=t("../utils"),a=t("../support"),o=t("./ArrayReader"),l=t("./StringReader"),c=t("./NodeBufferReader"),u=t("./Uint8ArrayReader");i.exports=function(h){var d=n.getTypeOf(h);return n.checkSupport(d),d!=="string"||a.uint8array?d==="nodebuffer"?new c(h):a.uint8array?new u(n.transformTo("uint8array",h)):new o(n.transformTo("array",h)):new l(h)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,i,s){s.LOCAL_FILE_HEADER="PK",s.CENTRAL_FILE_HEADER="PK",s.CENTRAL_DIRECTORY_END="PK",s.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",s.ZIP64_CENTRAL_DIRECTORY_END="PK",s.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(t,i,s){var n=t("./GenericWorker"),a=t("../utils");function o(l){n.call(this,"ConvertWorker to "+l),this.destType=l}a.inherits(o,n),o.prototype.processChunk=function(l){this.push({data:a.transformTo(this.destType,l.data),meta:l.meta})},i.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(t,i,s){var n=t("./GenericWorker"),a=t("../crc32");function o(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(o,n),o.prototype.processChunk=function(l){this.streamInfo.crc32=a(l.data,this.streamInfo.crc32||0),this.push(l)},i.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,i,s){var n=t("../utils"),a=t("./GenericWorker");function o(l){a.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}n.inherits(o,a),o.prototype.processChunk=function(l){if(l){var c=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=c+l.data.length}a.prototype.processChunk.call(this,l)},i.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(t,i,s){var n=t("../utils"),a=t("./GenericWorker");function o(l){a.call(this,"DataWorker");var c=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(u){c.dataIsReady=!0,c.data=u,c.max=u&&u.length||0,c.type=n.getTypeOf(u),c.isPaused||c._tickAndRepeat()},function(u){c.error(u)})}n.inherits(o,a),o.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,c=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":l=this.data.substring(this.index,c);break;case"uint8array":l=this.data.subarray(this.index,c);break;case"array":case"nodebuffer":l=this.data.slice(this.index,c)}return this.index=c,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},i.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(t,i,s){function n(a){this.name=a||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(a){this.emit("data",a)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(a){this.emit("error",a)}return!0},error:function(a){return!this.isFinished&&(this.isPaused?this.generatedError=a:(this.isFinished=!0,this.emit("error",a),this.previous&&this.previous.error(a),this.cleanUp()),!0)},on:function(a,o){return this._listeners[a].push(o),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(a,o){if(this._listeners[a])for(var l=0;l "+a:a}},i.exports=n},{}],29:[function(t,i,s){var n=t("../utils"),a=t("./ConvertWorker"),o=t("./GenericWorker"),l=t("../base64"),c=t("../support"),u=t("../external"),h=null;if(c.nodestream)try{h=t("../nodejs/NodejsStreamOutputAdapter")}catch{}function d(f,m){return new u.Promise(function(g,y){var w=[],b=f._internalType,v=f._outputType,A=f._mimeType;f.on("data",function(C,I){w.push(C),m&&m(I)}).on("error",function(C){w=[],y(C)}).on("end",function(){try{var C=function(I,L,k){switch(I){case"blob":return n.newBlob(n.transformTo("arraybuffer",L),k);case"base64":return l.encode(L);default:return n.transformTo(I,L)}}(v,function(I,L){var k,N=0,G=null,E=0;for(k=0;k"u")s.blob=!1;else{var n=new ArrayBuffer(0);try{s.blob=new Blob([n],{type:"application/zip"}).size===0}catch{try{var a=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);a.append(n),s.blob=a.getBlob("application/zip").size===0}catch{s.blob=!1}}}try{s.nodestream=!!t("readable-stream").Readable}catch{s.nodestream=!1}},{"readable-stream":16}],31:[function(t,i,s){for(var n=t("./utils"),a=t("./support"),o=t("./nodejsUtils"),l=t("./stream/GenericWorker"),c=new Array(256),u=0;u<256;u++)c[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;c[254]=c[254]=1;function h(){l.call(this,"utf-8 decode"),this.leftOver=null}function d(){l.call(this,"utf-8 encode")}s.utf8encode=function(p){return a.nodebuffer?o.newBufferFrom(p,"utf-8"):function(f){var m,g,y,w,b,v=f.length,A=0;for(w=0;w>>6:(g<65536?m[b++]=224|g>>>12:(m[b++]=240|g>>>18,m[b++]=128|g>>>12&63),m[b++]=128|g>>>6&63),m[b++]=128|63&g);return m}(p)},s.utf8decode=function(p){return a.nodebuffer?n.transformTo("nodebuffer",p).toString("utf-8"):function(f){var m,g,y,w,b=f.length,v=new Array(2*b);for(m=g=0;m>10&1023,v[g++]=56320|1023&y)}return v.length!==g&&(v.subarray?v=v.subarray(0,g):v.length=g),n.applyFromCharCode(v)}(p=n.transformTo(a.uint8array?"uint8array":"array",p))},n.inherits(h,l),h.prototype.processChunk=function(p){var f=n.transformTo(a.uint8array?"uint8array":"array",p.data);if(this.leftOver&&this.leftOver.length){if(a.uint8array){var m=f;(f=new Uint8Array(m.length+this.leftOver.length)).set(this.leftOver,0),f.set(m,this.leftOver.length)}else f=this.leftOver.concat(f);this.leftOver=null}var g=function(w,b){var v;for((b=b||w.length)>w.length&&(b=w.length),v=b-1;0<=v&&(192&w[v])==128;)v--;return v<0||v===0?b:v+c[w[v]]>b?v:b}(f),y=f;g!==f.length&&(a.uint8array?(y=f.subarray(0,g),this.leftOver=f.subarray(g,f.length)):(y=f.slice(0,g),this.leftOver=f.slice(g,f.length))),this.push({data:s.utf8decode(y),meta:p.meta})},h.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=h,n.inherits(d,l),d.prototype.processChunk=function(p){this.push({data:s.utf8encode(p.data),meta:p.meta})},s.Utf8EncodeWorker=d},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,i,s){var n=t("./support"),a=t("./base64"),o=t("./nodejsUtils"),l=t("./external");function c(m){return m}function u(m,g){for(var y=0;y>8;this.dir=!!(16&this.externalFileAttributes),p==0&&(this.dosPermissions=63&this.externalFileAttributes),p==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var p=n(this.extraFields[1].value);this.uncompressedSize===a.MAX_VALUE_32BITS&&(this.uncompressedSize=p.readInt(8)),this.compressedSize===a.MAX_VALUE_32BITS&&(this.compressedSize=p.readInt(8)),this.localHeaderOffset===a.MAX_VALUE_32BITS&&(this.localHeaderOffset=p.readInt(8)),this.diskNumberStart===a.MAX_VALUE_32BITS&&(this.diskNumberStart=p.readInt(4))}},readExtraFields:function(p){var f,m,g,y=p.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});p.index+4>>6:(p<65536?d[g++]=224|p>>>12:(d[g++]=240|p>>>18,d[g++]=128|p>>>12&63),d[g++]=128|p>>>6&63),d[g++]=128|63&p);return d},s.buf2binstring=function(h){return u(h,h.length)},s.binstring2buf=function(h){for(var d=new n.Buf8(h.length),p=0,f=d.length;p>10&1023,w[f++]=56320|1023&m)}return u(w,f)},s.utf8border=function(h,d){var p;for((d=d||h.length)>h.length&&(d=h.length),p=d-1;0<=p&&(192&h[p])==128;)p--;return p<0||p===0?d:p+l[h[p]]>d?p:d}},{"./common":41}],43:[function(t,i,s){i.exports=function(n,a,o,l){for(var c=65535&n|0,u=n>>>16&65535|0,h=0;o!==0;){for(o-=h=2e3>>1:a>>>1;o[l]=a}return o}();i.exports=function(a,o,l,c){var u=n,h=c+l;a^=-1;for(var d=c;d>>8^u[255&(a^o[d])];return-1^a}},{}],46:[function(t,i,s){var n,a=t("../utils/common"),o=t("./trees"),l=t("./adler32"),c=t("./crc32"),u=t("./messages"),h=0,d=4,p=0,f=-2,m=-1,g=4,y=2,w=8,b=9,v=286,A=30,C=19,I=2*v+1,L=15,k=3,N=258,G=N+k+1,E=42,S=113,x=1,D=2,$=3,R=4;function O(T,X){return T.msg=u[X],X}function W(T){return(T<<1)-(4T.avail_out&&(j=T.avail_out),j!==0&&(a.arraySet(T.output,X.pending_buf,X.pending_out,j,T.next_out),T.next_out+=j,X.pending_out+=j,T.total_out+=j,T.avail_out-=j,X.pending-=j,X.pending===0&&(X.pending_out=0))}function U(T,X){o._tr_flush_block(T,0<=T.block_start?T.block_start:-1,T.strstart-T.block_start,X),T.block_start=T.strstart,F(T.strm)}function te(T,X){T.pending_buf[T.pending++]=X}function Q(T,X){T.pending_buf[T.pending++]=X>>>8&255,T.pending_buf[T.pending++]=255&X}function Z(T,X){var j,P,M=T.max_chain_length,H=T.strstart,J=T.prev_length,ee=T.nice_match,z=T.strstart>T.w_size-G?T.strstart-(T.w_size-G):0,re=T.window,he=T.w_mask,ne=T.prev,_e=T.strstart+N,Xe=re[H+J-1],Ne=re[H+J];T.prev_length>=T.good_match&&(M>>=2),ee>T.lookahead&&(ee=T.lookahead);do if(re[(j=X)+J]===Ne&&re[j+J-1]===Xe&&re[j]===re[H]&&re[++j]===re[H+1]){H+=2,j++;do;while(re[++H]===re[++j]&&re[++H]===re[++j]&&re[++H]===re[++j]&&re[++H]===re[++j]&&re[++H]===re[++j]&&re[++H]===re[++j]&&re[++H]===re[++j]&&re[++H]===re[++j]&&H<_e);if(P=N-(_e-H),H=_e-N,Jz&&--M!=0);return J<=T.lookahead?J:T.lookahead}function ye(T){var X,j,P,M,H,J,ee,z,re,he,ne=T.w_size;do{if(M=T.window_size-T.lookahead-T.strstart,T.strstart>=ne+(ne-G)){for(a.arraySet(T.window,T.window,ne,ne,0),T.match_start-=ne,T.strstart-=ne,T.block_start-=ne,X=j=T.hash_size;P=T.head[--X],T.head[X]=ne<=P?P-ne:0,--j;);for(X=j=ne;P=T.prev[--X],T.prev[X]=ne<=P?P-ne:0,--j;);M+=ne}if(T.strm.avail_in===0)break;if(J=T.strm,ee=T.window,z=T.strstart+T.lookahead,re=M,he=void 0,he=J.avail_in,re=k)for(H=T.strstart-T.insert,T.ins_h=T.window[H],T.ins_h=(T.ins_h<=k&&(T.ins_h=(T.ins_h<=k)if(P=o._tr_tally(T,T.strstart-T.match_start,T.match_length-k),T.lookahead-=T.match_length,T.match_length<=T.max_lazy_match&&T.lookahead>=k){for(T.match_length--;T.strstart++,T.ins_h=(T.ins_h<=k&&(T.ins_h=(T.ins_h<=k&&T.match_length<=T.prev_length){for(M=T.strstart+T.lookahead-k,P=o._tr_tally(T,T.strstart-1-T.prev_match,T.prev_length-k),T.lookahead-=T.prev_length-1,T.prev_length-=2;++T.strstart<=M&&(T.ins_h=(T.ins_h<T.pending_buf_size-5&&(j=T.pending_buf_size-5);;){if(T.lookahead<=1){if(ye(T),T.lookahead===0&&X===h)return x;if(T.lookahead===0)break}T.strstart+=T.lookahead,T.lookahead=0;var P=T.block_start+j;if((T.strstart===0||T.strstart>=P)&&(T.lookahead=T.strstart-P,T.strstart=P,U(T,!1),T.strm.avail_out===0)||T.strstart-T.block_start>=T.w_size-G&&(U(T,!1),T.strm.avail_out===0))return x}return T.insert=0,X===d?(U(T,!0),T.strm.avail_out===0?$:R):(T.strstart>T.block_start&&(U(T,!1),T.strm.avail_out),x)}),new fe(4,4,8,4,Ce),new fe(4,5,16,8,Ce),new fe(4,6,32,32,Ce),new fe(4,4,16,16,ce),new fe(8,16,32,32,ce),new fe(8,16,128,128,ce),new fe(8,32,128,256,ce),new fe(32,128,258,1024,ce),new fe(32,258,258,4096,ce)],s.deflateInit=function(T,X){return be(T,X,w,15,8,0)},s.deflateInit2=be,s.deflateReset=pe,s.deflateResetKeep=le,s.deflateSetHeader=function(T,X){return T&&T.state?T.state.wrap!==2?f:(T.state.gzhead=X,p):f},s.deflate=function(T,X){var j,P,M,H;if(!T||!T.state||5>8&255),te(P,P.gzhead.time>>16&255),te(P,P.gzhead.time>>24&255),te(P,P.level===9?2:2<=P.strategy||P.level<2?4:0),te(P,255&P.gzhead.os),P.gzhead.extra&&P.gzhead.extra.length&&(te(P,255&P.gzhead.extra.length),te(P,P.gzhead.extra.length>>8&255)),P.gzhead.hcrc&&(T.adler=c(T.adler,P.pending_buf,P.pending,0)),P.gzindex=0,P.status=69):(te(P,0),te(P,0),te(P,0),te(P,0),te(P,0),te(P,P.level===9?2:2<=P.strategy||P.level<2?4:0),te(P,3),P.status=S);else{var J=w+(P.w_bits-8<<4)<<8;J|=(2<=P.strategy||P.level<2?0:P.level<6?1:P.level===6?2:3)<<6,P.strstart!==0&&(J|=32),J+=31-J%31,P.status=S,Q(P,J),P.strstart!==0&&(Q(P,T.adler>>>16),Q(P,65535&T.adler)),T.adler=1}if(P.status===69)if(P.gzhead.extra){for(M=P.pending;P.gzindex<(65535&P.gzhead.extra.length)&&(P.pending!==P.pending_buf_size||(P.gzhead.hcrc&&P.pending>M&&(T.adler=c(T.adler,P.pending_buf,P.pending-M,M)),F(T),M=P.pending,P.pending!==P.pending_buf_size));)te(P,255&P.gzhead.extra[P.gzindex]),P.gzindex++;P.gzhead.hcrc&&P.pending>M&&(T.adler=c(T.adler,P.pending_buf,P.pending-M,M)),P.gzindex===P.gzhead.extra.length&&(P.gzindex=0,P.status=73)}else P.status=73;if(P.status===73)if(P.gzhead.name){M=P.pending;do{if(P.pending===P.pending_buf_size&&(P.gzhead.hcrc&&P.pending>M&&(T.adler=c(T.adler,P.pending_buf,P.pending-M,M)),F(T),M=P.pending,P.pending===P.pending_buf_size)){H=1;break}H=P.gzindexM&&(T.adler=c(T.adler,P.pending_buf,P.pending-M,M)),H===0&&(P.gzindex=0,P.status=91)}else P.status=91;if(P.status===91)if(P.gzhead.comment){M=P.pending;do{if(P.pending===P.pending_buf_size&&(P.gzhead.hcrc&&P.pending>M&&(T.adler=c(T.adler,P.pending_buf,P.pending-M,M)),F(T),M=P.pending,P.pending===P.pending_buf_size)){H=1;break}H=P.gzindexM&&(T.adler=c(T.adler,P.pending_buf,P.pending-M,M)),H===0&&(P.status=103)}else P.status=103;if(P.status===103&&(P.gzhead.hcrc?(P.pending+2>P.pending_buf_size&&F(T),P.pending+2<=P.pending_buf_size&&(te(P,255&T.adler),te(P,T.adler>>8&255),T.adler=0,P.status=S)):P.status=S),P.pending!==0){if(F(T),T.avail_out===0)return P.last_flush=-1,p}else if(T.avail_in===0&&W(X)<=W(j)&&X!==d)return O(T,-5);if(P.status===666&&T.avail_in!==0)return O(T,-5);if(T.avail_in!==0||P.lookahead!==0||X!==h&&P.status!==666){var ee=P.strategy===2?function(z,re){for(var he;;){if(z.lookahead===0&&(ye(z),z.lookahead===0)){if(re===h)return x;break}if(z.match_length=0,he=o._tr_tally(z,0,z.window[z.strstart]),z.lookahead--,z.strstart++,he&&(U(z,!1),z.strm.avail_out===0))return x}return z.insert=0,re===d?(U(z,!0),z.strm.avail_out===0?$:R):z.last_lit&&(U(z,!1),z.strm.avail_out===0)?x:D}(P,X):P.strategy===3?function(z,re){for(var he,ne,_e,Xe,Ne=z.window;;){if(z.lookahead<=N){if(ye(z),z.lookahead<=N&&re===h)return x;if(z.lookahead===0)break}if(z.match_length=0,z.lookahead>=k&&0z.lookahead&&(z.match_length=z.lookahead)}if(z.match_length>=k?(he=o._tr_tally(z,1,z.match_length-k),z.lookahead-=z.match_length,z.strstart+=z.match_length,z.match_length=0):(he=o._tr_tally(z,0,z.window[z.strstart]),z.lookahead--,z.strstart++),he&&(U(z,!1),z.strm.avail_out===0))return x}return z.insert=0,re===d?(U(z,!0),z.strm.avail_out===0?$:R):z.last_lit&&(U(z,!1),z.strm.avail_out===0)?x:D}(P,X):n[P.level].func(P,X);if(ee!==$&&ee!==R||(P.status=666),ee===x||ee===$)return T.avail_out===0&&(P.last_flush=-1),p;if(ee===D&&(X===1?o._tr_align(P):X!==5&&(o._tr_stored_block(P,0,0,!1),X===3&&(V(P.head),P.lookahead===0&&(P.strstart=0,P.block_start=0,P.insert=0))),F(T),T.avail_out===0))return P.last_flush=-1,p}return X!==d?p:P.wrap<=0?1:(P.wrap===2?(te(P,255&T.adler),te(P,T.adler>>8&255),te(P,T.adler>>16&255),te(P,T.adler>>24&255),te(P,255&T.total_in),te(P,T.total_in>>8&255),te(P,T.total_in>>16&255),te(P,T.total_in>>24&255)):(Q(P,T.adler>>>16),Q(P,65535&T.adler)),F(T),0=j.w_size&&(H===0&&(V(j.head),j.strstart=0,j.block_start=0,j.insert=0),re=new a.Buf8(j.w_size),a.arraySet(re,X,he-j.w_size,j.w_size,0),X=re,he=j.w_size),J=T.avail_in,ee=T.next_in,z=T.input,T.avail_in=he,T.next_in=0,T.input=X,ye(j);j.lookahead>=k;){for(P=j.strstart,M=j.lookahead-(k-1);j.ins_h=(j.ins_h<>>=k=L>>>24,b-=k,(k=L>>>16&255)===0)D[u++]=65535&L;else{if(!(16&k)){if(!(64&k)){L=v[(65535&L)+(w&(1<>>=k,b-=k),b<15&&(w+=x[l++]<>>=k=L>>>24,b-=k,!(16&(k=L>>>16&255))){if(!(64&k)){L=A[(65535&L)+(w&(1<>>=k,b-=k,(k=u-h)>3,w&=(1<<(b-=N<<3))-1,n.next_in=l,n.next_out=u,n.avail_in=l>>24&255)+(E>>>8&65280)+((65280&E)<<8)+((255&E)<<24)}function w(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function b(E){var S;return E&&E.state?(S=E.state,E.total_in=E.total_out=S.total=0,E.msg="",S.wrap&&(E.adler=1&S.wrap),S.mode=f,S.last=0,S.havedict=0,S.dmax=32768,S.head=null,S.hold=0,S.bits=0,S.lencode=S.lendyn=new n.Buf32(m),S.distcode=S.distdyn=new n.Buf32(g),S.sane=1,S.back=-1,d):p}function v(E){var S;return E&&E.state?((S=E.state).wsize=0,S.whave=0,S.wnext=0,b(E)):p}function A(E,S){var x,D;return E&&E.state?(D=E.state,S<0?(x=0,S=-S):(x=1+(S>>4),S<48&&(S&=15)),S&&(S<8||15=R.wsize?(n.arraySet(R.window,S,x-R.wsize,R.wsize,0),R.wnext=0,R.whave=R.wsize):(D<($=R.wsize-R.wnext)&&($=D),n.arraySet(R.window,S,x-D,$,R.wnext),(D-=$)?(n.arraySet(R.window,S,x-D,D,0),R.wnext=D,R.whave=R.wsize):(R.wnext+=$,R.wnext===R.wsize&&(R.wnext=0),R.whave>>8&255,x.check=o(x.check,H,2,0),U=F=0,x.mode=2;break}if(x.flags=0,x.head&&(x.head.done=!1),!(1&x.wrap)||(((255&F)<<8)+(F>>8))%31){E.msg="incorrect header check",x.mode=30;break}if((15&F)!=8){E.msg="unknown compression method",x.mode=30;break}if(U-=4,T=8+(15&(F>>>=4)),x.wbits===0)x.wbits=T;else if(T>x.wbits){E.msg="invalid window size",x.mode=30;break}x.dmax=1<>8&1),512&x.flags&&(H[0]=255&F,H[1]=F>>>8&255,x.check=o(x.check,H,2,0)),U=F=0,x.mode=3;case 3:for(;U<32;){if(W===0)break e;W--,F+=D[R++]<>>8&255,H[2]=F>>>16&255,H[3]=F>>>24&255,x.check=o(x.check,H,4,0)),U=F=0,x.mode=4;case 4:for(;U<16;){if(W===0)break e;W--,F+=D[R++]<>8),512&x.flags&&(H[0]=255&F,H[1]=F>>>8&255,x.check=o(x.check,H,2,0)),U=F=0,x.mode=5;case 5:if(1024&x.flags){for(;U<16;){if(W===0)break e;W--,F+=D[R++]<>>8&255,x.check=o(x.check,H,2,0)),U=F=0}else x.head&&(x.head.extra=null);x.mode=6;case 6:if(1024&x.flags&&(W<(Z=x.length)&&(Z=W),Z&&(x.head&&(T=x.head.extra_len-x.length,x.head.extra||(x.head.extra=new Array(x.head.extra_len)),n.arraySet(x.head.extra,D,R,Z,T)),512&x.flags&&(x.check=o(x.check,D,Z,R)),W-=Z,R+=Z,x.length-=Z),x.length))break e;x.length=0,x.mode=7;case 7:if(2048&x.flags){if(W===0)break e;for(Z=0;T=D[R+Z++],x.head&&T&&x.length<65536&&(x.head.name+=String.fromCharCode(T)),T&&Z>9&1,x.head.done=!0),E.adler=x.check=0,x.mode=12;break;case 10:for(;U<32;){if(W===0)break e;W--,F+=D[R++]<>>=7&U,U-=7&U,x.mode=27;break}for(;U<3;){if(W===0)break e;W--,F+=D[R++]<>>=1)){case 0:x.mode=14;break;case 1:if(N(x),x.mode=20,S!==6)break;F>>>=2,U-=2;break e;case 2:x.mode=17;break;case 3:E.msg="invalid block type",x.mode=30}F>>>=2,U-=2;break;case 14:for(F>>>=7&U,U-=7&U;U<32;){if(W===0)break e;W--,F+=D[R++]<>>16^65535)){E.msg="invalid stored block lengths",x.mode=30;break}if(x.length=65535&F,U=F=0,x.mode=15,S===6)break e;case 15:x.mode=16;case 16:if(Z=x.length){if(W>>=5,U-=5,x.ndist=1+(31&F),F>>>=5,U-=5,x.ncode=4+(15&F),F>>>=4,U-=4,286>>=3,U-=3}for(;x.have<19;)x.lens[J[x.have++]]=0;if(x.lencode=x.lendyn,x.lenbits=7,j={bits:x.lenbits},X=c(0,x.lens,0,19,x.lencode,0,x.work,j),x.lenbits=j.bits,X){E.msg="invalid code lengths set",x.mode=30;break}x.have=0,x.mode=19;case 19:for(;x.have>>16&255,we=65535&M,!((ce=M>>>24)<=U);){if(W===0)break e;W--,F+=D[R++]<>>=ce,U-=ce,x.lens[x.have++]=we;else{if(we===16){for(P=ce+2;U>>=ce,U-=ce,x.have===0){E.msg="invalid bit length repeat",x.mode=30;break}T=x.lens[x.have-1],Z=3+(3&F),F>>>=2,U-=2}else if(we===17){for(P=ce+3;U>>=ce)),F>>>=3,U-=3}else{for(P=ce+7;U>>=ce)),F>>>=7,U-=7}if(x.have+Z>x.nlen+x.ndist){E.msg="invalid bit length repeat",x.mode=30;break}for(;Z--;)x.lens[x.have++]=T}}if(x.mode===30)break;if(x.lens[256]===0){E.msg="invalid code -- missing end-of-block",x.mode=30;break}if(x.lenbits=9,j={bits:x.lenbits},X=c(u,x.lens,0,x.nlen,x.lencode,0,x.work,j),x.lenbits=j.bits,X){E.msg="invalid literal/lengths set",x.mode=30;break}if(x.distbits=6,x.distcode=x.distdyn,j={bits:x.distbits},X=c(h,x.lens,x.nlen,x.ndist,x.distcode,0,x.work,j),x.distbits=j.bits,X){E.msg="invalid distances set",x.mode=30;break}if(x.mode=20,S===6)break e;case 20:x.mode=21;case 21:if(6<=W&&258<=V){E.next_out=O,E.avail_out=V,E.next_in=R,E.avail_in=W,x.hold=F,x.bits=U,l(E,Q),O=E.next_out,$=E.output,V=E.avail_out,R=E.next_in,D=E.input,W=E.avail_in,F=x.hold,U=x.bits,x.mode===12&&(x.back=-1);break}for(x.back=0;fe=(M=x.lencode[F&(1<>>16&255,we=65535&M,!((ce=M>>>24)<=U);){if(W===0)break e;W--,F+=D[R++]<>le)])>>>16&255,we=65535&M,!(le+(ce=M>>>24)<=U);){if(W===0)break e;W--,F+=D[R++]<>>=le,U-=le,x.back+=le}if(F>>>=ce,U-=ce,x.back+=ce,x.length=we,fe===0){x.mode=26;break}if(32&fe){x.back=-1,x.mode=12;break}if(64&fe){E.msg="invalid literal/length code",x.mode=30;break}x.extra=15&fe,x.mode=22;case 22:if(x.extra){for(P=x.extra;U>>=x.extra,U-=x.extra,x.back+=x.extra}x.was=x.length,x.mode=23;case 23:for(;fe=(M=x.distcode[F&(1<>>16&255,we=65535&M,!((ce=M>>>24)<=U);){if(W===0)break e;W--,F+=D[R++]<>le)])>>>16&255,we=65535&M,!(le+(ce=M>>>24)<=U);){if(W===0)break e;W--,F+=D[R++]<>>=le,U-=le,x.back+=le}if(F>>>=ce,U-=ce,x.back+=ce,64&fe){E.msg="invalid distance code",x.mode=30;break}x.offset=we,x.extra=15&fe,x.mode=24;case 24:if(x.extra){for(P=x.extra;U>>=x.extra,U-=x.extra,x.back+=x.extra}if(x.offset>x.dmax){E.msg="invalid distance too far back",x.mode=30;break}x.mode=25;case 25:if(V===0)break e;if(Z=Q-V,x.offset>Z){if((Z=x.offset-Z)>x.whave&&x.sane){E.msg="invalid distance too far back",x.mode=30;break}ye=Z>x.wnext?(Z-=x.wnext,x.wsize-Z):x.wnext-Z,Z>x.length&&(Z=x.length),Ce=x.window}else Ce=$,ye=O-x.offset,Z=x.length;for(VI?(k=ye[Ce+g[S]],U[te+g[S]]):(k=96,0),w=1<>O)+(b-=w)]=L<<24|k<<16|N|0,b!==0;);for(w=1<>=1;if(w!==0?(F&=w-1,F+=w):F=0,S++,--Q[E]==0){if(E===D)break;E=h[d+g[S]]}if($>>7)]}function te(M,H){M.pending_buf[M.pending++]=255&H,M.pending_buf[M.pending++]=H>>>8&255}function Q(M,H,J){M.bi_valid>y-J?(M.bi_buf|=H<>y-M.bi_valid,M.bi_valid+=J-y):(M.bi_buf|=H<>>=1,J<<=1,0<--H;);return J>>>1}function Ce(M,H,J){var ee,z,re=new Array(g+1),he=0;for(ee=1;ee<=g;ee++)re[ee]=he=he+J[ee-1]<<1;for(z=0;z<=H;z++){var ne=M[2*z+1];ne!==0&&(M[2*z]=ye(re[ne]++,ne))}}function ce(M){var H;for(H=0;H>1;1<=J;J--)le(M,re,J);for(z=_e;J=M.heap[1],M.heap[1]=M.heap[M.heap_len--],le(M,re,1),ee=M.heap[1],M.heap[--M.heap_max]=J,M.heap[--M.heap_max]=ee,re[2*z]=re[2*J]+re[2*ee],M.depth[z]=(M.depth[J]>=M.depth[ee]?M.depth[J]:M.depth[ee])+1,re[2*J+1]=re[2*ee+1]=z,M.heap[1]=z++,le(M,re,1),2<=M.heap_len;);M.heap[--M.heap_max]=M.heap[1],function(Ne,Gt){var Kr,Qt,Zr,ot,Y,me,Te=Gt.dyn_tree,$e=Gt.max_code,Ve=Gt.stat_desc.static_tree,Ct=Gt.stat_desc.has_stree,Vt=Gt.stat_desc.extra_bits,rr=Gt.stat_desc.extra_base,xr=Gt.stat_desc.max_length,ei=0;for(ot=0;ot<=g;ot++)Ne.bl_count[ot]=0;for(Te[2*Ne.heap[Ne.heap_max]+1]=0,Kr=Ne.heap_max+1;Kr>=7;z>>=1)if(1&Xe&&ne.dyn_ltree[2*_e]!==0)return a;if(ne.dyn_ltree[18]!==0||ne.dyn_ltree[20]!==0||ne.dyn_ltree[26]!==0)return o;for(_e=32;_e>>3,(re=M.static_len+3+7>>>3)<=z&&(z=re)):z=re=J+5,J+4<=z&&H!==-1?P(M,H,J,ee):M.strategy===4||re===z?(Q(M,2+(ee?1:0),3),pe(M,G,E)):(Q(M,4+(ee?1:0),3),function(ne,_e,Xe,Ne){var Gt;for(Q(ne,_e-257,5),Q(ne,Xe-1,5),Q(ne,Ne-4,4),Gt=0;Gt>>8&255,M.pending_buf[M.d_buf+2*M.last_lit+1]=255&H,M.pending_buf[M.l_buf+M.last_lit]=255&J,M.last_lit++,H===0?M.dyn_ltree[2*J]++:(M.matches++,H--,M.dyn_ltree[2*(x[J]+h+1)]++,M.dyn_dtree[2*U(H)]++),M.last_lit===M.lit_bufsize-1},s._tr_align=function(M){Q(M,2,3),Z(M,b,G),function(H){H.bi_valid===16?(te(H,H.bi_buf),H.bi_buf=0,H.bi_valid=0):8<=H.bi_valid&&(H.pending_buf[H.pending++]=255&H.bi_buf,H.bi_buf>>=8,H.bi_valid-=8)}(M)}},{"../utils/common":41}],53:[function(t,i,s){i.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,i,s){(function(n){(function(a,o){if(!a.setImmediate){var l,c,u,h,d=1,p={},f=!1,m=a.document,g=Object.getPrototypeOf&&Object.getPrototypeOf(a);g=g&&g.setTimeout?g:a,l={}.toString.call(a.process)==="[object process]"?function(v){process.nextTick(function(){w(v)})}:function(){if(a.postMessage&&!a.importScripts){var v=!0,A=a.onmessage;return a.onmessage=function(){v=!1},a.postMessage("","*"),a.onmessage=A,v}}()?(h="setImmediate$"+Math.random()+"$",a.addEventListener?a.addEventListener("message",b,!1):a.attachEvent("onmessage",b),function(v){a.postMessage(h+v,"*")}):a.MessageChannel?((u=new MessageChannel).port1.onmessage=function(v){w(v.data)},function(v){u.port2.postMessage(v)}):m&&"onreadystatechange"in m.createElement("script")?(c=m.documentElement,function(v){var A=m.createElement("script");A.onreadystatechange=function(){w(v),A.onreadystatechange=null,c.removeChild(A),A=null},c.appendChild(A)}):function(v){setTimeout(w,0,v)},g.setImmediate=function(v){typeof v!="function"&&(v=new Function(""+v));for(var A=new Array(arguments.length-1),C=0;C"u"?n===void 0?this:n:self)}).call(this,typeof Wt<"u"?Wt:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(ay);var QE=ay.exports;const eS=va(QE),or=class or{static async writeHandle(e,t){const i=this.workID++,s=new Promise((o,l)=>this.map.set(i,[o,l])),n=new TextEncoder,a=typeof t=="string"?n.encode(t):await t.arrayBuffer();return this.worker.postMessage([i,e,a],[a]),s}};Is(or,"worker",new Worker(new URL("/smeditor/assets/SafariFileWorker-557e53c3.js",self.location),{type:"module"})),Is(or,"workID",0),Is(or,"map",new Map),or.worker.onmessage=e=>{const t=e.data;t.success?or.map.get(t.id)[0]():or.map.get(t.id)[1](t.reason),or.map.delete(t.id)};let Vc=or;class tS{_root;async getRoot(){return this._root||(YE.adapter.native?await sf().then(e=>this._root=e):await sf(Ke(()=>import("./memory-4ca8cdb3.js"),[])).then(e=>this._root=e)),this._root}async uploadHandle(e,t){let i;if(typeof t=="string"){const s=await this.getDirectoryHandle(t,{create:!0});if(!s)return;i=s}else i=t??await this.getRoot();if(e.kind=="file"){const s=await i.getFileHandle(e.name,{create:!0});await this.writeFile(s,await e.getFile())}else{const s=await i.getDirectoryHandle(e.name,{create:!0}),n=[];for await(const a of e.values())n.push(this.uploadHandle(a,s));await Promise.all(n)}}async uploadFiles(e,t){let i;if(typeof t=="string"){const s=await this.getDirectoryHandle(t,{create:!0});if(!s)return;i=s}else i=t??await this.getRoot();if(e.isFile){const s=e;if(s.name==".DS_Store")return;s.file(async n=>{const a=await i.getFileHandle(n.name,{create:!0});await this.writeHandle(a,n)})}else if(e.isDirectory){const s=e.createReader(),n=await i.getDirectoryHandle(e.name,{create:!0});for await(const a of n.values())await n.removeEntry(a.name,{recursive:!0});s.readEntries(async a=>{const o=[];for(let l=0;li!="."&&i!="");t.indexOf("..")>-1;){const i=t.indexOf("..");if(i==0)throw Error("Path"+t.join("/")+"is invalid!");t.splice(i-1,2)}return t.join("/")}async zipDirectory(e,t){const i=t??new eS,s=Xi(e)==""?e:Ot(e),n=await this.getDirectoryHandle(s);if(n){for(const a of await this.getDirectoryFiles(n))i.file(a.name,await a.getFile());for(const a of await this.getDirectoryFolders(n)){const o=i.folder(a.name);if(!o){console.error("Failed to zip folder "+s+"/"+a.name);continue}await this.zipDirectory(s+"/"+a.name,o)}return i}}async saveDirectory(e){const t=Xi(e)==""?e:Ot(e);Ee.create("Exporting "+t+".zip");const i=await $E({_preferPolyfill:!1,suggestedName:`${t}.zip`,types:[{accept:{"application/zip":[".zip"]}}],excludeAcceptAllOption:!1}),s=await this.zipDirectory(e);s&&await s.generateAsync({type:"blob"}).then(async n=>{if(!window.showSaveFilePicker){console.log(n);const a=document.createElement("a"),o=URL.createObjectURL(n);document.body.appendChild(a),a.href=o,a.download=t+".zip",a.click(),a.remove(),window.URL.revokeObjectURL(o);return}await this.writeHandle(i,n)})}async renameFile(e,t){if(e!=t)try{const i=await this.getDirectoryHandle(Ot(e)),s=await this.getDirectoryHandle(Ot(t),{create:!0}),n=await this.getFileHandle(e);if(!i||!s||!n)return;await this.copyToHandle(s,n,ji(t)),await i.removeEntry(ji(e))}catch(i){console.error(i)}}async renameDirectory(e,t){if(!t.startsWith(e))try{const i=await this.getDirectoryHandle(Ot(e)),s=await this.getDirectoryHandle(Ot(t),{create:!0}),n=await this.getDirectoryHandle(e);if(!i||!s||!n)return;await this.copyToHandle(s,n,ji(t)),await i.removeEntry(ji(e),{recursive:!0})}catch(i){console.error(i)}}async copyToHandle(e,t,i){try{if(t.kind=="directory"){const s=await e.getDirectoryHandle(i??t.name,{create:!0}),n=[];for await(const a of t.values())n.push(this.copyToHandle(s,a));await Promise.all(n)}else{const s=await t.getFile(),n=await e.getFileHandle(i??t.name,{create:!0});await this.writeHandle(n,s)}}catch(s){console.error(s)}}getRelativePath(e,t){const i=e.split("/"),s=t.split("/"),n=Math.min(i.length,s.length);let a=n;for(let l=0;limport("./NodeFileHandler-17f340e7.js"),[])).NodeFileHandler:new tS}static getStandardHandler(){return this.standardHandler}static getHandler(e){return e!==void 0&&e.startsWith("https://")||e?.startsWith("http://")?this.urlHandler:this.standardHandler}static handleDropEvent(e,t){return this.getHandler().handleDropEvent(e,t)}static getDirectoryHandle(e,t){return Ue.getHandler(e).getDirectoryHandle(e,t)}static hasFile(e){return Ue.getHandler(e).hasFile(e)}static getFileHandle(e,t){return Ue.getHandler(e).getFileHandle(e,t)}static getFileHandleRelativeTo(e,t){return Ue.getHandler(e).getFileHandleRelativeTo(e,t)}static getDirectoryFiles(e){return Ue.getHandler(typeof e=="string"?e:void 0).getDirectoryFiles(e)}static getDirectoryFolders(e){return Ue.getHandler(typeof e=="string"?e:void 0).getDirectoryFolders(e)}static writeFile(e,t){return Ue.getHandler(typeof e=="string"?e:void 0).writeFile(e,t)}static getRelativePath(e,t){return Ue.getHandler().getRelativePath(e,t)}}class St{windowManager;options;windowElement;viewElement;constructor(e){this.options=e;const t=document.createElement("div"),i=document.createElement("div"),s=document.createElement("div"),n=document.createElement("div");if(t.appendChild(s),t.appendChild(i),t.style.width=e.width+"px",t.style.left=window.innerWidth/2-e.width/2+"px",t.style.top=window.innerHeight/2-e.height/2+"px",t.classList.add("unselectable","window"),e.win_id&&(t.dataset.win_id=e.win_id),i.classList.add("view"),i.style.height=e.height+"px",i.style.width=e.width+"px",s.classList.add("navbar"),e.title!==""&&s.appendChild(n),!e.disableClose){const a=Se.getIcon("MINIMIZE",15),o=Se.getIcon("CLOSE_WINDOW",15);a.classList.add("unselectable"),a.draggable=!1,a.onclick=()=>{i.style.height!="0px"?i.style.height="0px":i.style.height=e.height+"px",this.clampPosition()},o.classList.add("unselectable"),o.draggable=!1,o.onclick=()=>this.closeWindow(),s.appendChild(a),s.appendChild(o)}n.innerText=e.title,n.classList.add("title"),t.addEventListener("mousedown",()=>this.focus()),e.blocking&&(window.addEventListener("mousedown",this.block,!0),document.getElementById("blocker").style.display="block",t.dataset.blocking="block"),n.addEventListener("mousedown",()=>{window.addEventListener("mousemove",this.handleDrag),window.addEventListener("mouseup",()=>window.removeEventListener("mousemove",this.handleDrag))}),this.focus(),t.classList.add("focused"),this.windowElement=t,this.viewElement=i}addToManager(e){this.windowManager=e,e.view.appendChild(this.windowElement),this.focus()}onClose(){}closeWindow(){this.windowManager&&(this.onClose(),this.windowManager.removeWindow(this),this.windowElement.classList.add("exiting"),window.removeEventListener("mousedown",this.block,!0),this.options.blocking&&this.windowManager.windows.filter(e=>e.options.blocking).length==0&&(document.getElementById("blocker").style.display="none"),setTimeout(()=>this.windowManager.view.removeChild(this.windowElement),40))}focus(){if(this.windowManager==null)return;this.windowManager.unfocusAll(),this.windowElement.classList.add("focused");const e=Array.from(this.windowManager.view.children).map(t=>t).filter(t=>t!=this.windowElement);e.sort((t,i)=>parseInt(t.style.zIndex)-parseInt(i.style.zIndex)),e.push(this.windowElement);for(let t=0;t{!e.target||this.windowElement.contains(e.target)||(e.stopImmediatePropagation(),e.preventDefault())};handleDrag=e=>{const t=parseInt(this.windowElement.style.left.slice(0,-2))+e.movementX,i=parseInt(this.windowElement.style.top.slice(0,-2))+e.movementY;this.windowElement.style.left=t+"px",this.windowElement.style.top=i+"px",this.clampPosition()};clampPosition(){if(this.windowManager==null)return;const e=parseInt(this.windowElement.style.left.slice(0,-2)),t=parseInt(this.windowElement.style.top.slice(0,-2)),i=this.windowManager.app.view.getBoundingClientRect();this.windowElement.style.left=Le(e,i.left,i.width-this.windowElement.clientWidth+i.left)+"px",this.windowElement.style.top=Le(t,i.top,i.height-this.windowElement.clientHeight+i.top)+"px"}move(e,t){this.windowElement.style.left=e+"px",this.windowElement.style.top=t+"px"}}class Pd extends St{app;dirOptions;fileDropPath="";draggedElement;draggedCopy;keyHandler;dropHandler;mouseHandler;dragHandler;constructor(e,t,i){super({title:t.title,width:500,height:400,disableClose:t.disableClose,win_id:"file_selector"+Math.random(),blocking:!0}),this.app=e,this.dirOptions=t,t.accepted_file_types||=[],this.keyHandler=this.handleKeyEvent.bind(this),this.dropHandler=this.handleDropEvent.bind(this),this.mouseHandler=this.handleMouseEvent.bind(this),this.dragHandler=this.handleDragEvent.bind(this),this.initView().then(()=>{i&&this.selectPath(i),t.onload?.()})}async initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("menu-options");const i=document.createElement("div");i.classList.add("menu-left");const s=document.createElement("div");s.classList.add("menu-right"),t.appendChild(i),t.appendChild(s);const n=document.createElement("button");n.innerText="Cancel",n.onclick=()=>{window.removeEventListener("keydown",this.keyHandler,!0),window.removeEventListener("drop",this.dropHandler,!0),this.closeWindow()};const a=document.createElement("button");a.innerText="Select",a.classList.add("confirm"),a.onclick=()=>this.confirmFile(),a.disabled=!0,i.appendChild(n),s.appendChild(a);const o=document.createElement("div");o.classList.add("dir-selector"),o.onclick=y=>{y.target==o&&this.selectElement(void 0)};const l=document.createElement("div");l.classList.add("file-options");const c=document.createElement("button"),u=Se.getIcon("ADD_FILE",16);c.appendChild(u),c.appendChild(document.createTextNode("Upload files")),l.appendChild(c),c.onclick=async()=>{const y=this.fileDropPath,w=await ry({_preferPolyfill:!1,excludeAcceptAllOption:!1,multiple:!0}),v=this.viewElement.querySelector(".info.selected")?.dataset.path??"",A=[];for(const C of w)A.push(Ue.getStandardHandler().uploadHandle(C,v));await Promise.all(A),await this.refreshDirectory(y),this.getAcceptableFile(y).then(C=>this.selectPath(C))};const h=document.createElement("button"),d=Se.getIcon("FOLDER",16);h.appendChild(d),h.appendChild(document.createTextNode("Upload folder")),l.appendChild(h),h.onclick=async()=>{const y=this.fileDropPath,w=await jE({_preferPolyfill:!1}),v=this.viewElement.querySelector(".info.selected")?.dataset.path??"";await Ue.getStandardHandler().uploadHandle(w,v),await this.refreshDirectory(y),this.getAcceptableFile(y==""?w.name:y+"/"+w.name).then(A=>this.selectPath(A))};const p=document.createElement("button");p.classList.add("rename");const f=Se.getIcon("EDIT",16);p.appendChild(f),p.appendChild(document.createTextNode("Rename")),p.disabled=!0,p.onclick=()=>{const y=this.viewElement.querySelector(".info.selected");y?.dataset.path&&this.startEditing(y.querySelector("textarea"))},l.appendChild(p);const m=document.createElement("button");m.classList.add("delete");const g=Se.getIcon("TRASH",16);m.appendChild(g),m.appendChild(document.createTextNode("Delete")),m.disabled=!0,m.onclick=()=>{const y=this.viewElement.querySelector(".info.selected"),w=y?.dataset.path;if(!w)return;const b=y.parentElement.classList.contains("folder");Ue.getStandardHandler()[b?"removeDirectory":"removeFile"](w).then(()=>{const v=this.getElement(w);v&&(v.parentElement?.remove(),m.disabled=!0,p.disabled=!0)})},l.appendChild(m),e.appendChild(o),e.appendChild(l),e.appendChild(t),this.viewElement.appendChild(e),window.addEventListener("keydown",this.keyHandler,!0),window.addEventListener("drop",this.dropHandler,!0),window.addEventListener("mousemove",this.dragHandler,!0),this.viewElement.addEventListener("dragover",this.mouseHandler),await this.createDiv("").then(y=>o.replaceChildren(...y))}async expand(e){if(!e.parentElement.classList.contains("folder"))return;e.parentElement.classList.remove("collapsed");const t=e.nextSibling;await this.createDiv(e.dataset.path).then(i=>{t.replaceChildren(...i)})}collapse(e){if(!e.parentElement.classList.contains("folder"))return;e.parentElement.classList.add("collapsed"),e.nextSibling.replaceChildren()}selectElement(e){if(this.viewElement.querySelector(".info.selected")?.classList.remove("selected"),!e){this.viewElement.querySelector(".delete").disabled=!0,this.viewElement.querySelector(".rename").disabled=!0;return}e.classList.add("selected"),sa(e,{scrollMode:"if-needed",block:"nearest",inline:"nearest"});const t=this.viewElement.querySelector("button.confirm"),i=e.dataset.path;t.disabled=!0,i&&(t.disabled=!this.acceptableFileType(i),this.viewElement.querySelector(".delete").disabled=!1,this.viewElement.querySelector(".rename").disabled=!1)}async createDiv(e){const t=await Ue.getStandardHandler().getDirectoryFolders(e);let i=await Ue.getStandardHandler().getDirectoryFiles(e);return t.sort((s,n)=>s.name.toLowerCase().localeCompare(n.name.toLowerCase())),i.sort((s,n)=>s.name.toLowerCase().localeCompare(n.name.toLowerCase())),i=i.filter(s=>Xi(s.name)!=".crswap"),t.map(s=>this.createBaseElement(e,s)).concat(i.map(s=>this.createBaseElement(e,s)))}createBaseElement(e,t){e!=""&&(e+="/");const i=document.createElement("div");i.classList.add("item");const s=document.createElement("div");if(s.classList.add("info"),i.appendChild(s),t.kind=="directory"){const a=Se.getIcon("CHEVRON",16);a.classList.add("folder-icon"),s.appendChild(a);const o=document.createElement("div");o.classList.add("children"),i.appendChild(o),i.classList.add("folder"),i.classList.add("collapsed"),s.addEventListener("click",l=>{const c=l.target;c?.classList.contains("options-icon")||c.tagName=="TEXTAREA"&&!c.disabled||(i.classList.contains("collapsed")?this.expand(s):this.collapse(s))})}else{this.acceptableFileType(t.name)||s.classList.add("disabled");const a=Se.getIcon(this.getIconId(t.name),16);s.appendChild(a)}s.dataset.path=e+t.name;const n=document.createElement("textarea");return n.rows=1,n.disabled=!0,n.autocomplete="off",n.autocapitalize="off",n.spellcheck=!1,n.innerText=t.name,n.style.pointerEvents="none",n.classList.add("title"),s.appendChild(n),s.addEventListener("click",()=>this.selectElement(s)),s.addEventListener("mousedown",()=>this.startDragging(s)),s.ondblclick=()=>this.confirmFile(),i}confirmFile(){const t=this.viewElement.querySelector(".info.selected")?.dataset.path;t&&this.acceptableFileType(t)&&(this.dirOptions.callback?.(t),window.removeEventListener("keydown",this.keyHandler,!0),window.removeEventListener("drop",this.dropHandler,!0),window.removeEventListener("mousemove",this.dragHandler,!0),this.closeWindow())}acceptableFileType(e){return this.dirOptions.accepted_file_types.length==0||this.dirOptions.accepted_file_types.includes(Xi(e))}getIconId(e){const t=Xi(e);return t==""&&!e.startsWith(".")?"FOLDER":os.includes(t)?"IMAGE_FILE":ml.includes(t)?"VOLUME":[".sm",".ssc"].includes(t)?"SM_FILE":"UNKNOWN_FILE"}startEditing(e){const t=e.value,i=!!e.parentElement?.parentElement?.classList.contains("folder"),s=e.parentElement?.dataset.path??"",n=Ot(s);e.value=s.split("/").at(-1)??"",window.removeEventListener("keydown",this.keyHandler,!0),e.disabled=!1,e.style.pointerEvents="",e.focus(),e.addEventListener("keypress",a=>{a.code=="Enter"&&(a.preventDefault(),a.stopImmediatePropagation(),e.blur())},!0),e.addEventListener("blur",async()=>{if(window.addEventListener("keydown",this.keyHandler,!0),e.disabled=!0,e.style.pointerEvents="none",e.value.startsWith(".")){e.value=t;return}e.value=e.value.replaceAll("/","");const a=n==""?e.value:n+"/"+e.value;a!=s&&(e.parentElement.dataset.path=a,await Ue.getStandardHandler()[i?"renameDirectory":"renameFile"](s,a),this.refreshDirectory(n),e.value.length>32&&(e.value=e.value.slice(0,32)+"..."))})}async refreshDirectory(e){const t=this.viewElement.querySelector(".dir-selector");if(!t)return;let i=t.querySelector("div[data-path='"+this.escapeSelector(e)+"']")?.nextSibling;if(e==""&&(i=t),!i)return;const s=Array.from(i.parentElement.querySelectorAll(".folder:not(.collapsed)")).map(n=>n.children[0].dataset.path);await this.createDiv(e).then(n=>i.replaceChildren(...n)),await Promise.all(s.map(n=>this.expand(t.querySelector("div[data-path='"+this.escapeSelector(n)+"']"))))}getElement(e){const t=this.viewElement.querySelector(".dir-selector");return t?t.querySelector("div[data-path='"+this.escapeSelector(e)+"']"):null}async getAcceptableFile(e){const t=await Ue.getStandardHandler().getDirectoryHandle(e);if(!t)return;const i=[{path:e,handle:t}];for(;i.length>0;){const s=i.shift(),n=s.handle;for await(const a of n.values()){const o=s.path==""?"":s.path+"/";if(a.kind=="directory")i.push({path:o+a.name,handle:a});else if(this.acceptableFileType(a.name))return o+a.name}}}async selectPath(e){if(!e)return;const t=this.viewElement.querySelector(".dir-selector");if(!t)return;const i=e.split("/");i.pop();const s=[];for(;i.length>0;){s.push(i.shift());const a=t.querySelector("div[data-path='"+this.escapeSelector(s.join("/"))+"']");if(!a)return;await this.expand(a)}const n=t.querySelector("div[data-path='"+this.escapeSelector(e)+"']");n&&this.selectElement(n)}handleKeyEvent(e){if(!this.windowElement.classList.contains("focused"))return;const t=this.viewElement.querySelector(".info.selected");if(t==null){if(e.code.startsWith("Arrow")){const i=this.viewElement.querySelector(".info");i&&this.selectElement(i)}return}if(e.code=="ArrowUp"){e.preventDefault(),e.stopImmediatePropagation();const i=t.parentElement;let s=i.previousSibling?.querySelector(".info");s&&!s.parentElement.classList.contains("collapsed")&&s.parentElement.classList.contains("folder")&&(s=s.parentElement.querySelector(".children").lastChild.querySelector(".info")),!s&&i.parentElement.classList.contains("children")&&(s=i.parentElement.parentElement.querySelector(".info")),s&&(this.selectElement(s),sa(s,{scrollMode:"if-needed",block:"nearest",inline:"nearest"}))}if(e.code=="ArrowDown"){e.preventDefault(),e.stopImmediatePropagation();const i=t.parentElement;let s;i.classList.contains("folder")&&!i.classList.contains("collapsed")&&(s=i.querySelector(".children").children[0].querySelector(".info")),s||(s=t.parentElement.nextSibling?.querySelector(".info")),!s&&i.parentElement.classList.contains("children")&&(s=i.parentElement.parentElement.nextSibling.querySelector(".info")),s&&(this.selectElement(s),sa(s,{scrollMode:"if-needed",block:"nearest",inline:"nearest"}))}if(e.code=="ArrowLeft"&&(e.preventDefault(),e.stopImmediatePropagation(),this.collapse(t)),e.code=="ArrowRight"&&(e.preventDefault(),e.stopImmediatePropagation(),this.expand(t)),e.code=="Enter"&&(e.preventDefault(),e.stopImmediatePropagation(),t.parentElement?.querySelector(".title")&&this.startEditing(t.parentElement?.querySelector(".title"))),e.code=="Delete"||e.code=="Backspace"){const i=this.viewElement.querySelector(".info.selected"),s=i?.dataset.path;if(!s)return;const n=i.parentElement.classList.contains("folder");Ue.getStandardHandler()[n?"removeDirectory":"removeFile"](s).then(()=>{const a=this.getElement(s);a&&(a.parentElement?.remove(),this.viewElement.querySelector(".delete").disabled=!0,this.viewElement.querySelector(".rename").disabled=!0)})}}startDragging(e){const t=e;t.totalMovementX=0,t.totalMovementY=0,this.draggedElement=t;const i=()=>{this.stopDragging(),window.removeEventListener("mouseup",i)};window.addEventListener("mouseup",i)}handleDragEvent(e){if(this.draggedElement){if(this.draggedElement.totalMovementX+=e.movementX,this.draggedElement.totalMovementY+=e.movementY,!this.draggedCopy)if(Math.abs(this.draggedElement.totalMovementX)+Math.abs(this.draggedElement.totalMovementY)>8){this.viewElement.addEventListener("mousemove",this.mouseHandler),this.draggedCopy=this.draggedElement.parentElement.cloneNode(!0),this.draggedCopy.style.position="fixed";const t=this.draggedElement.getBoundingClientRect();this.draggedCopy.style.top=t.top+this.draggedElement.totalMovementY+"px",this.draggedCopy.style.left=t.left+this.draggedElement.totalMovementX+"px",this.draggedCopy.style.width=t.width+"px",this.draggedCopy.style.boxShadow="3px 3px 3px #222",this.draggedCopy.querySelector(".children")&&this.draggedCopy.removeChild(this.draggedCopy.querySelector(".children")),this.viewElement.appendChild(this.draggedCopy)}else return;this.draggedCopy.style.top=parseFloat(this.draggedCopy.style.top.slice(0,-2))+e.movementY+"px",this.draggedCopy.style.left=parseFloat(this.draggedCopy.style.left.slice(0,-2))+e.movementX+"px"}}async stopDragging(){if(this.draggedCopy){this.draggedCopy.remove(),this.viewElement.removeEventListener("mousemove",this.mouseHandler);const e=this.draggedCopy.classList.contains("folder"),t=this.draggedElement.dataset.path,i=this.fileDropPath==""?ji(this.draggedElement.dataset.path):this.fileDropPath+"/"+ji(this.draggedElement.dataset.path);t!=i&&await Ue.getStandardHandler()[e?"renameDirectory":"renameFile"](t,i),await this.refreshDirectory(Ot(t)),await this.refreshDirectory(Ot(i)),this.viewElement.querySelector(".outlined")?.classList.remove("outlined"),this.fileDropPath=""}this.draggedCopy=void 0,this.draggedElement=void 0}handleDropEvent(e){e.preventDefault(),e.stopImmediatePropagation(),this.viewElement.querySelector(".outlined")?.classList.remove("outlined"),e.target.closest(".dir-selector")&&Ue.getStandardHandler().handleDropEvent(e,this.fileDropPath).then(async t=>{await this.refreshDirectory(this.fileDropPath),this.getAcceptableFile(t??this.fileDropPath).then(i=>this.selectPath(i)),this.fileDropPath=""})}handleMouseEvent(e){const t=this.viewElement.querySelector(".dir-selector");let i=Array.from(t.querySelectorAll("div.item.folder"));const s=this.viewElement.querySelector(".outlined");i=i.filter(n=>!n.parentElement.closest(".collapsed")),i.reverse(),i.push(t);for(const n of i){const a=n.getBoundingClientRect();if(e.clientX>=a.x&&e.clientX<=a.x+a.width&&e.clientY>=a.y&&e.clientY<=a.y+a.height){s!=n&&s?.classList.remove("outlined");const o=n.querySelector(".info");this.fileDropPath=o?.dataset.path??"",n.classList.contains("dir-selector")&&(this.fileDropPath=""),n.classList.add("outlined");return}}this.viewElement.querySelector(".outlined")?.classList.remove("outlined"),this.fileDropPath=""}escapeSelector(e){return e.replaceAll(/'/g,"\\'")}}class gt{items=[];itemIndex=0;limit=0;app;static instance;constructor(e){this.app=e,gt.instance||(gt.instance=this)}run(e){e.action(this.app),this.items.splice(this.itemIndex,this.items.length-this.itemIndex,e),this.itemIndex++}undo(){this.items[this.itemIndex-1]&&(this.items[this.itemIndex-1].undo(this.app),this.itemIndex--,K.emit("undo"))}redo(){this.items[this.itemIndex]&&(this.items[this.itemIndex].redo?this.items[this.itemIndex].redo(this.app):this.items[this.itemIndex].action(this.app),this.itemIndex++,K.emit("redo"))}reset(){this.itemIndex=0,this.limit=0,this.items=[]}canUndo(){return this.itemIndex>0}canRedo(){return this.itemIndex!=this.items.length}setLimit(){this.limit=this.itemIndex}isDirty(){return this.itemIndex!=this.limit}}function oy(){const r=document.createElement("div");return r.spellcheck=!1,r.contentEditable="true",r.classList.add("inlineEdit"),r.onkeydown=e=>{e.key=="Enter"&&r.blur()},r}function ho(r,e){return{title:r,element:t=>{const i=oy();return i.onblur=()=>{const s=t[e];gt.instance.run({action:()=>{t[e]=i.innerText},undo:()=>{t[e]=s}}),i.scrollLeft=0},i.innerText=t[e],i}}}const iS={name:ho("Name","chartName"),credit:ho("Artist","credit"),style:ho("Style","chartStyle"),description:ho("Description","description"),music:{title:"Music File",element:(r,e)=>{const t=document.createElement("div");t.classList.add("flex-row","flex-column-gap","flex-static","hide-buttons");const i=()=>{if(s.innerText==(r.music??e.chartManager.loadedSM.properties.MUSIC??""))return;const c=e.chartManager.chartAudio.isPlaying();if(s.innerText==""||s.innerText==e.chartManager.loadedSM.properties.MUSIC){r.music=void 0,s.innerText=e.chartManager.loadedSM.properties.MUSIC+"",e.chartManager.loadAudio(),c&&e.chartManager.chartAudio.play();return}const u=r.music;gt.instance.run({action:()=>r.music=s.innerText==e.chartManager.loadedSM.properties.MUSIC?void 0:s.innerText,undo:()=>r.music=u}),e.chartManager.loadAudio(),c&&e.chartManager.chartAudio.play()},s=oy();s.style.flex="1",s.onblur=i,s.innerText=r.music??e.chartManager.loadedSM.properties.MUSIC??"";const n=document.createElement("button");n.onclick=()=>{const c=Ot(e.chartManager.smPath);if(window.nw){const u=document.createElement("input");u.type="file",u.accept="audio/*",u.onchange=()=>{s.innerText=Ue.getRelativePath(c,u.value),i()},u.click()}else e.windowManager.openWindow(new Pd(e,{title:"Select an audio file...",accepted_file_types:ml,disableClose:!0,callback:u=>{s.innerText=Ue.getRelativePath(c,u),i()}},c+"/"+(r.music??e.chartManager.loadedSM.properties.MUSIC??"")))};const a=Se.getIcon("FOLDER",12);n.appendChild(a);const o=document.createElement("button");o.onclick=()=>{s.innerText!=(e.chartManager.loadedSM.properties.MUSIC??"")&&(s.innerText=e.chartManager.loadedSM.properties.MUSIC??"",i())};const l=Se.getIcon("REVERT",12);return o.appendChild(l),t.appendChild(s),t.appendChild(n),t.appendChild(o),t}}};class gi{view;items=[];selectedItem;onChangeHandlers=[];static create(e,t){return new gi(document.createElement("div"),e,t)}constructor(e,t,i){this.view=e,e.classList.add("dropdown"),this.items=t??[],this.selectedItem=i??this.items[0];const s=document.createElement("div");s.classList.add("dropdown-selected");const n=document.createElement("div");n.classList.add("dropdown-selected-text");const a=Se.getIcon("CHEVRON",12);s.appendChild(n),s.appendChild(a);const o=document.createElement("div");o.classList.add("dropdown-items"),o.style.height="",s.onclick=()=>{if(!s.classList.contains("disabled")){if(this.items.length==0){o.style.height="";return}this.createDropdown(),o.style.height==""?(o.classList.remove("collapsed"),o.style.width=Math.max(o.scrollWidth,s.clientWidth)+"px",o.style.height=o.scrollHeight+"px",Array.from(o.children).forEach((l,c)=>{l.style.animationDelay=c*.02+"s"})):(o.style.height="",o.classList.add("collapsed"))}},window.addEventListener("click",l=>{const c=l.target;(!c.closest(".dropdown")||c.closest(".dropdown")!=e)&&(o.style.height="")}),o.classList.add("collapsed"),this.view.appendChild(s),this.view.appendChild(o),this.setSelected()}onChange(e){this.onChangeHandlers.push(e)}removeHandler(e){this.onChangeHandlers.includes(e)&&this.onChangeHandlers.splice(this.onChangeHandlers.indexOf(e),1)}getItems(){return this.items}setItems(e){this.items=e,e.includes(this.selectedItem)||(this.selectedItem=this.items[0],this.setSelected())}setSelected(e){this.selectedItem=e??this.selectedItem;const t=this.view.querySelector(".dropdown-selected-text");t.innerText=this.selectedItem?this.selectedItem+"":""}closeDropdown(){const e=this.view.querySelector(".dropdown-items");e&&(e.style.height="")}get value(){return this.selectedItem}get disabled(){return this.view.querySelector(".dropdown-selected").classList.contains("disabled")}set disabled(e){e?this.view.querySelector(".dropdown-selected").classList.add("disabled"):this.view.querySelector(".dropdown-selected").classList.remove("disabled")}createDropdown(){const e=this.view.querySelector(".dropdown-items"),t=this.items.map((i,s)=>{const n=document.createElement("div");return n.classList.add("dropdown-item"),n.innerText=i+"",n.onclick=()=>{e.style.height="",this.selectedItem!=i&&(this.setSelected(i),this.onChangeHandlers.forEach(a=>a(i,s)))},n});e.replaceChildren(...t)}}class Al extends St{app;buttonOptions;message;resolve;resolved=new Promise(e=>this.resolve=e);constructor(e,t,i,s){super({title:t,width:300,height:100,disableClose:!0,win_id:"confirm",blocking:!0}),this.app=e,this.message=i,this.buttonOptions=s,this.initView()}initView(){this.viewElement.replaceChildren(),this.viewElement.classList.add("confirmation");const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("label"),t.innerText=this.message,e.appendChild(t);const i=document.createElement("div");i.classList.add("menu-options"),this.buttonOptions.forEach(s=>{const n=document.createElement("button");n.innerText=s.label,n.onclick=()=>{s.callback?.(),this.resolve?.(s.label),this.closeWindow()},s.type!="default"&&n.classList.add(s.type),i.append(n)}),e.appendChild(i),this.viewElement.appendChild(e)}}class ly extends St{app;gameType;chartList;chartInfo;gameTypeDropdown;smLoadHandler=()=>{this.gameTypeDropdown.setItems(ze.getPriority().map(e=>{const t=this.app.chartManager.loadedSM?.charts[e.id]??[];return e.id+" ("+t.length+")"})),this.gameTypeDropdown.setSelected(this.gameType.id+" ("+(this.app.chartManager.loadedSM?.charts[this.gameType.id]??[]).length+") "),this.gameType=this.app.chartManager.loadedChart?.gameType??this.gameType,this.loadCharts()};constructor(e,t){super({title:"Chart List",width:500,height:400,win_id:"chart_list"}),this.app=e,this.gameType=t??e.chartManager.loadedChart?.gameType??ze.getPriority()[0],this.initView(),K.on("smLoadedAfter",this.smLoadHandler)}initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("chart-view-type-wrapper");const i=document.createElement("div");i.classList.add("chart-view-type-label"),i.innerText="Game Type:",this.gameTypeDropdown=gi.create(ze.getPriority().map(n=>{const a=this.app.chartManager.loadedSM?.charts[n.id]??[];return n.id+" ("+a.length+")"}),this.gameType.id+" ("+(this.app.chartManager.loadedSM?.charts[this.gameType.id]??[]).length+") "),this.gameTypeDropdown.onChange(n=>{this.gameType=ze.getGameType(n.split(" ")[0])??this.gameType,this.loadCharts()}),t.appendChild(i),t.appendChild(this.gameTypeDropdown.view);const s=document.createElement("div");s.classList.add("chart-view-scroller"),e.appendChild(t),e.appendChild(s),this.chartList=document.createElement("div"),this.chartList.classList.add("chart-list"),this.chartInfo=document.createElement("div"),this.chartInfo.classList.add("chart-info"),s.appendChild(this.chartList),s.appendChild(this.chartInfo),this.viewElement.appendChild(e),this.loadCharts()}onClose(){K.off("smLoadedAfter",this.smLoadHandler)}loadCharts(){const e=this.app.chartManager.loadedSM?.charts[this.gameType.id]??[],t=[];this.gameTypeDropdown.setItems(ze.getPriority().map(a=>{const o=this.app.chartManager.loadedSM?.charts[a.id]??[];return a.id+" ("+o.length+")"})),this.gameTypeDropdown.setSelected(this.gameType.id+" ("+(this.app.chartManager.loadedSM?.charts[this.gameType.id]??[]).length+") "),e.forEach(a=>{const o=document.createElement("div");o.classList.add("chart-list-item"),o.chart=a,this.app.chartManager.loadedChart==a&&o.classList.add("selected"),o.onclick=()=>{o.chart!=this.app.chartManager.loadedChart&&(this.app.chartManager.loadChart(o.chart),this.chartList.querySelectorAll(".selected").forEach(d=>d.classList.remove("selected")),o.classList.add("selected"))},o.onmouseenter=()=>{this.loadChartDetails(o.chart)},o.onmouseleave=()=>{this.loadChartDetails()};const l=document.createElement("div");l.innerText=a.meter+"",l.classList.add("title",a.difficulty);const c=document.createElement("div");c.classList.add("chart-list-info");const u=document.createElement("div");u.innerText=a.credit,u.classList.add("title","chart-credit");const h=document.createElement("div");h.innerText=a.getNotedata().length+"",h.classList.add("title","chart-step-count"),c.appendChild(u),c.appendChild(h),o.appendChild(l),o.appendChild(c),t.push(o)});const i=document.createElement("div");i.classList.add("chart-list-item");const s=document.createElement("div");s.innerText="+",s.classList.add("title");const n=document.createElement("div");n.classList.add("chart-list-info"),n.innerText="New Blank Chart",i.appendChild(s),i.appendChild(n),i.onclick=()=>{const a=new iy(this.app.chartManager.loadedSM);a.gameType=this.gameType,this.app.chartManager.loadedSM.addChart(a),this.app.chartManager.loadChart(a),this.loadCharts()},this.chartList.replaceChildren(...t,i),this.loadChartDetails()}loadChartDetails(e){if(e=e??this.app.chartManager.loadedChart,e?.gameType.id!=this.gameType.id){this.chartInfo.replaceChildren();return}if(!e)return;const t=()=>this.app.chartManager.loadedSM.charts[e.gameType.id].sort((m,g)=>Ai.indexOf(m.difficulty)==Ai.indexOf(g.difficulty)?m.meter-g.meter:Ai.indexOf(m.difficulty)-Ai.indexOf(g.difficulty)),i=document.createElement("div");i.classList.add("chart-info-main");const s=gi.create(Ai,e.difficulty);s.view.classList.add("no-border","white"),s.onChange(m=>{const g=e.difficulty;gt.instance.run({action:()=>{e.difficulty=m,t(),this.loadCharts()},undo:()=>{e.difficulty=g,t(),this.loadCharts()}})});const n=document.createElement("div");n.spellcheck=!1,n.contentEditable="true",n.classList.add("inlineEdit","chart-meter"),n.onkeydown=m=>{m.key=="Enter"&&n.blur()},n.onblur=()=>{let m=pa(n.innerText);if(m===null){n.innerText=e?.meter+"";return}m=Math.round(Le(1,m,2**31-1));const g=e.meter;gt.instance.run({action:()=>{e.meter=m,e.meterF=m,t(),this.loadCharts()},undo:()=>{e.meter=g,e.meterF=g,t(),this.loadCharts()}}),n.scrollLeft=0},n.innerText=e.meter+"";const a=document.createElement("div");a.classList.add("chart-properties"),i.appendChild(s.view),i.appendChild(n),Object.values(iS).forEach(m=>{const g=document.createElement("div");g.classList.add("label"),g.innerText=m.title;const y=m.element(e,this.app);m.title=="Artist"&&y.addEventListener("blur",()=>this.loadCharts()),a.appendChild(g),a.appendChild(y)});const o=e.getNotedataStats(),l=document.createElement("div");l.classList.add("chart-info-grid-item");const c=document.createElement("div");c.innerText="Peak NPS",c.classList.add("title","chart-info-grid-label");const u=document.createElement("div");u.innerText=e.getMaxNPS().toFixed(2)+"",u.classList.add("title","chart-info-grid-count"),l.appendChild(c),l.appendChild(u);const h=document.createElement("div");h.classList.add("chart-info-grid"),Object.entries(o).forEach(m=>{const g=document.createElement("div");g.classList.add("chart-info-grid-item");const y=document.createElement("div");y.innerText=m[0],y.classList.add("title","chart-info-grid-label");const w=document.createElement("div");w.innerText=m[1]+"",w.classList.add("title","chart-info-grid-count"),g.appendChild(y),g.appendChild(w),h.appendChild(g)});const d=document.createElement("div");d.classList.add("menu-options");const p=document.createElement("button");p.innerText="Duplicate Chart",p.onclick=()=>{const m=Object.assign(Object.create(Object.getPrototypeOf(e)),e);m.setNotedata(e.getNotedata().map(g=>e.computeNote(g))??[]),this.app.chartManager.loadedSM.addChart(m),this.app.chartManager.loadChart(m),this.loadCharts()},d.append(p);const f=document.createElement("button");f.innerText="Delete Chart",f.onclick=()=>{this.app.windowManager.openWindow(new Al(this.app,"Delete chart","Are you sure you want to delete this chart?",[{type:"default",label:"Cancel"},{type:"delete",label:"Delete",callback:()=>{this.app.chartManager.loadedSM.removeChart(e)&&(this.app.chartManager.loadChart(),this.gameType=this.app.chartManager.loadedChart?.gameType??this.gameType,this.loadCharts())}}]))},f.classList.add("delete"),d.append(f),this.chartInfo.replaceChildren(i,a,l,h,d)}}var rS=4,sS=.001,nS=1e-7,aS=10,$n=11,co=1/($n-1),oS=typeof Float32Array=="function";function hy(r,e){return 1-3*e+3*r}function cy(r,e){return 3*e-6*r}function dy(r){return 3*r}function Jo(r,e,t){return((hy(e,t)*r+cy(e,t))*r+dy(e))*r}function uy(r,e,t){return 3*hy(e,t)*r*r+2*cy(e,t)*r+dy(e)}function lS(r,e,t,i,s){var n,a,o=0;do a=e+(t-e)/2,n=Jo(a,i,s)-r,n>0?t=a:e=a;while(Math.abs(n)>nS&&++o=sS?hS(l,p,e,i):f===0?p:lS(l,c,c+co,e,i)}return function(c){return c===0?0:c===1?1:Jo(o(c),t,s)}};const Zt=va(dS),uS=Zt(0,0,1,1);function lf(r,e){const t=e?e.split("."):[];for(;t.length&&r;){const i=t.shift(),s=new RegExp("(.+)\\[([0-9]*)\\]").exec(i);if(s!==null&&s.length==3){const n={arrName:s[1],arrIndex:s[2]};r[n.arrName]!==void 0?r=r[n.arrName][n.arrIndex]:r=void 0;continue}r=r[i]}return r}function pS(r,e,t){const i=e?e.split("."):[];for(;i.length&&r;){const s=i.shift(),n=new RegExp("(.+)\\[([0-9]*)\\]").exec(s);if(n!==null&&n.length==3){const a={arrName:n[1],arrIndex:n[2]};r[a.arrName]!==void 0&&i.length===0&&(r[a.arrName][a.arrIndex]=t);continue}r[s]===void 0&&(r[s]={}),i.length===0&&(r[s]=t),r=r[s]}return r}const Br=class Br{static updateObject(e,t,i){const s=Object.keys(t).sort((o,l)=>parseFloat(o)-parseFloat(l));let n="0";for(let o=s.length-2;o>=0;o--)if(parseFloat(s[o])<=i){n=s[o];break}let a="1";for(let o=1;oi){a=s[o];break}Object.keys(t[0]).forEach(o=>{let l=t[n][o],c=t[a][o];l==="inherit"&&(t[n][o]=lf(e,o),l=t[n][o]),c==="inherit"&&(t[a][o]=lf(e,o),c=t[a][o]);const u=l+(i-parseFloat(n))/(parseFloat(a)-parseFloat(n))*(c-l);pS(e,o,u)})}static stop(e,t=null){e!==void 0&&(t!==null&&this.animations.get(e)?.obj&&!this.animations.get(e).obj.destroyed&&this.updateObject(this.animations.get(e).obj,this.animations.get(e).animation,t),this.animations.delete(e))}static finish(e){e!==void 0&&this.stop(e,1)}static animate(e,t,i,s,n=()=>{},a){return a||=`${++this._id}`,this.animations.set(a,{obj:e,animation:t,seconds:1/(60*i),progress:0,curve:s!==void 0?s:uS,onend:n}),a}};Is(Br,"animations",new Map),Is(Br,"_id",0),At.shared.add(e=>{for(const[t,i]of Br.animations.entries())i.obj._destroyed?Br.stop(t):(i.progress=Math.min(1,i.progress+i.seconds*e),Br.updateObject(i.obj,i.animation,i.curve(i.progress)),i.progress>=1&&(i.onend(i.obj),Br.stop(t,1)))});let Bt=Br;const Ah=[{frequency:20,Q:.71},{frequency:75,gain:0},{frequency:100,gain:0,Q:.6},{frequency:250,gain:0,Q:.3},{frequency:1040,gain:0,Q:.41},{frequency:2500,gain:0,Q:.2},{frequency:7500,gain:0},{frequency:2e4,Q:.71}],hf=[{freq:20,label:"20"},{freq:30,label:"30"},{freq:40,label:"40"},{freq:50,label:"50"},{freq:60,label:"60"},{freq:70,label:""},{freq:80,label:"80"},{freq:90,label:""},{freq:100,label:"100"},{freq:200,label:"200"},{freq:300,label:"300"},{freq:400,label:"400"},{freq:500,label:"500"},{freq:600,label:"600"},{freq:700,label:""},{freq:800,label:"800"},{freq:900,label:""},{freq:1e3,label:"1k"},{freq:2e3,label:"2k"},{freq:3e3,label:"3k"},{freq:4e3,label:"4k"},{freq:5e3,label:"5k"},{freq:6e3,label:"6k"},{freq:7e3,label:""},{freq:8e3,label:"8k"},{freq:9e3,label:""},{freq:1e4,label:"10k"},{freq:15e3,label:""},{freq:2e4,label:"20k"}],Xs=0,Ys=0,xs=1200,kt=400,Qo=new Array(xs).fill(0).map((r,e)=>Bd(e)),fS=new Float32Array(Qo);function el(r){return Math.log(r/20)/Math.log(1102.5)*xs}function Bd(r){return Math.pow(1102.5,r/xs)*20}function ps(r){return-r*6+kt/2}function cf(r){return-(r-kt/2)/6}class mS extends St{app;cachedReponse=new Array(xs).fill(0);onAudioLoad=this.onAudio.bind(this);points=[];icons;info;trackedFilter=null;constructor(e){super({title:"Audio Equalizer",width:600,height:245,win_id:"audio-eq"}),this.app=e,this.initView(),this.onAudioLoad(),K.on("audioLoaded",this.onAudioLoad)}destroy(){K.off("audioLoaded",this.onAudioLoad)}initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("eq-container");const t=document.createElement("div");t.classList.add("icon-container"),this.app.chartManager.chartAudio.getFilters().forEach((b,v)=>{const A=Se.getIcon(b.type.toUpperCase(),36,24,ls[v]);A.classList.add("eq-icon"),A.style.backgroundColor=`${ls[v]}40`,A.onclick=()=>{this.app.chartManager.chartAudio.getFilter(v).enabled?this.app.chartManager.chartAudio.disableFilter(v):this.app.chartManager.chartAudio.enableFilter(v),this.endTrack(),this.updateIcons()},A.onmouseenter=()=>this.points[v].highlight(),A.onmouseleave=()=>this.points[v].unhighlight(),t.appendChild(A)}),this.icons=t,this.updateIcons();const i=document.createElement("canvas");i.style.width="600px",i.style.height="200px",i.onmousedown=b=>{const v=this.points.filter(A=>A.hitTest(b.offsetX*2,b.offsetY*2)).at(-1);this.endTrack(),v?.mouseDown(b)};const s=document.createElement("div");s.classList.add("eq-info-container");const n=document.createElement("div");n.classList.add("eq-info");const a=document.createElement("div");a.innerText="Type",a.classList.add("eq-info-label");const o=document.createElement("div");o.classList.add("eq-info-value"),n.replaceChildren(a,o);const l=document.createElement("div");l.classList.add("eq-info");const c=document.createElement("div");c.innerText="Frequency",c.classList.add("eq-info-label");const u=document.createElement("div");u.contentEditable="false",u.classList.add("eq-info-value","inlineEdit"),l.replaceChildren(c,u),this.setupInput(u,"frequency",20,22050," Hz");const h=document.createElement("div");h.classList.add("eq-info");const d=document.createElement("div");d.innerText="Gain",d.classList.add("eq-info-label");const p=document.createElement("div");p.contentEditable="false",p.classList.add("eq-info-value","inlineEdit"),h.replaceChildren(d,p),this.setupInput(p,"gain",-24,24," dB",1);const f=document.createElement("div");f.classList.add("eq-info");const m=document.createElement("div");m.innerText="Q",m.classList.add("eq-info-label");const g=document.createElement("div");g.contentEditable="false",g.classList.add("eq-info-value","inlineEdit"),f.replaceChildren(m,g),this.setupInput(g,"Q",1e-4,1e3,"",4);const y=document.createElement("div");y.classList.add("eq-reset","disabled"),y.innerText="Reset",y.onclick=()=>{if(this.trackedFilter==null)for(let b=0;b{o=this.app.chartManager.chartAudio.getFilter(this.trackedFilter)[t].value,e.innerText=ae(o,a)+"",this.selectText(e)},e.onkeydown=l=>{if(l.key=="Enter"){e.blur();return}if(l.key=="Tab"){const u=[...e.parentElement.parentElement.children],h=u.indexOf(e.parentElement);for(let d=1;d{const c=pa(e.innerText);c!==null&&(this.app.chartManager.chartAudio.updateFilter(this.trackedFilter,{[t]:Le(c,i,s)}),this.points[this.trackedFilter].refreshPoint(),this.getResponse())})},e.onblur=()=>{pa(e.innerText)===null&&(this.app.chartManager.chartAudio.updateFilter(this.trackedFilter,{[t]:Le(o,i,s)}),this.points[this.trackedFilter].refreshPoint(),this.getResponse()),e.innerText=ae(this.app.chartManager.chartAudio.getFilter(this.trackedFilter)[t].value,a)+n}}onAudio(){this.points=this.app.chartManager.chartAudio.getFilters().map((e,t)=>new gS(this,t)),this.getResponse(),this.updateIcons(),this.endTrack()}getResponse(){this.cachedReponse=this.app.chartManager.chartAudio.getFrequencyResponse(Qo)}drawEQ(e){const t=e.getContext("2d");t.canvas.width=1200,t.canvas.height=400;const i=()=>{if(!this.app.chartManager.chartAudio)return;const s=t.createRadialGradient(e.width/2,e.height/2,0,e.width/2,e.height/2,e.width/2);s.addColorStop(0,"rgb(11, 14, 26)"),s.addColorStop(1,"rgb(5, 7, 13)"),t.fillStyle=s,t.fillRect(0,0,e.width,e.height),t.fillStyle="rgb(0, 50, 150)",this.drawFrequencies(t,this.app.chartManager.chartAudio.getFrequencyData()),this.app.chartManager.chartAudio.hasFilters()&&(t.fillStyle="rgba(200, 200, 200, 0.2)",this.drawFrequencies(t,this.app.chartManager.chartAudio.getFilteredFrequencyData())),t.fillStyle="rgba(200, 200, 200, 0.5)",this.drawResponse(t),t.fillStyle="rgba(0, 100, 150, 0.5)",t.font="22px Assistant",this.drawGrid(t),this.points.forEach(n=>n.draw(t)),e.closest("#windows")&&requestAnimationFrame(i)};return i}drawFrequencies(e,t){for(let i=0;i{this.app.chartManager.chartAudio.getFilter(t).enabled?e.classList.remove("disabled"):e.classList.add("disabled")}),this.getResponse()}trackFilter(e){this.trackedFilter=e;const t=this.app.chartManager.chartAudio.getFilter(e),[i,s,n,a]=[...this.info.children].map(o=>o.children[1]);i.innerText=t.type,s.innerText=Math.round(t.frequency.value)+" Hz",n.innerText=t.type.endsWith("pass")?"-":ae(t.gain.value,1)+" dB",a.innerText=t.type.endsWith("shelf")?"-":ae(t.Q.value,2)+"",i.style.color=ls[e],s.style.color=ls[e],n.style.color=ls[e],a.style.color=ls[e],s.contentEditable="true",n.contentEditable=`${!t.type.endsWith("pass")}`,a.contentEditable=`${!t.type.endsWith("shelf")}`}endTrack(){setTimeout(()=>{this.trackedFilter=null,this.points.forEach(n=>n.unhighlight());const[e,t,i,s]=[...this.info.children].map(n=>n.children[1]);e.innerText="",t.innerText="",i.innerText="",s.innerText="",t.contentEditable="false",i.contentEditable="false",s.contentEditable="false"})}}const uo=16,ls=["#a3001b","#a34f00","#d6d606","#19c402","#02c4ba","#022fc4","#5602c4","#c402b4"];class gS{filterIndex;window;dragging=!1;x=0;y=0;type;response=new Float32Array(Qo.length);_empty=new Float32Array(Qo.length);highlighted=!1;pointSize=.4;constructor(e,t){this.filterIndex=t,this.window=e,this.type=this.window.app.chartManager.chartAudio.getFilter(t).type,this.x=el(this.window.app.chartManager.chartAudio.getFilter(t).frequency.value??10),this.getY()}hitTest(e,t){return(e-this.x)*(e-this.x)+(t-this.y)*(t-this.y)<=uo*uo}canChangeGain(){return this.type=="lowshelf"||this.type=="highshelf"||this.type=="peaking"}canChangeQ(){return!this.type.endsWith("shelf")}getY(){this.type.endsWith("shelf")?this.y=ps(this.window.app.chartManager.chartAudio.getFilter(this.filterIndex).gain.value/2):this.canChangeGain()?this.y=ps(this.window.app.chartManager.chartAudio.getFilter(this.filterIndex).gain.value??0):this.y=kt/2}getGain(){if(this.canChangeGain())return this.type.endsWith("shelf")?cf(this.y)*2:cf(this.y)}mouseDown(e){this.calcResponse(),this.dragging=!0,this.highlighted=!0,this.window.app.chartManager.chartAudio.getFilter(this.filterIndex).enabled||(this.window.app.chartManager.chartAudio.enableFilter(this.filterIndex),this.window.updateIcons());const t=this.x,i=this.y,s=e.clientX,n=e.clientY,a=l=>{this.x=(l.clientX-s)*2+t,this.canChangeGain()?this.y=(l.clientY-n)*2+i:this.y=kt/2,this.x=Le(this.x,0,xs),this.y=Le(this.y,this.type.endsWith("shelf")?kt/4:ps(24),this.type.endsWith("shelf")?3*kt/4:ps(-24)),this.window.app.chartManager.chartAudio.updateFilter(this.filterIndex,{frequency:Bd(this.x),gain:this.getGain()}),this.window.getResponse(),this.window.trackFilter(this.filterIndex),this.calcResponse()};this.window.trackFilter(this.filterIndex);const o=()=>{Bt.animate(this,{0:{pointSize:"inherit"},1:{pointSize:.3}},.3,Zt(.11,.71,.41,.86),()=>{},`eq-point${this.filterIndex}`),this.dragging=!1,window.removeEventListener("mousemove",a),window.removeEventListener("mouseup",o)};Bt.animate(this,{0:{pointSize:"inherit"},1:{pointSize:.9}},.3,Zt(.11,.71,.41,.86),()=>{},`eq-point${this.filterIndex}`),window.addEventListener("mousemove",a),window.addEventListener("mouseup",o)}calcResponse(){this.window.app.chartManager.chartAudio.getFilter(this.filterIndex).getFrequencyResponse(fS,this.response,this._empty)}draw(e){const t=this.highlighted||this.window.app.chartManager.chartAudio.getFilter(this.filterIndex).enabled?ls[this.filterIndex]:"#888888";if(e.fillStyle=t+"60",this.dragging)for(let i=0;i{navigator.clipboard.writeText(s.innerText)}),this.outputDiv=s;const n=document.createElement("div");n.classList.add("export-section-label"),n.innerText="Include",i.appendChild(n),Object.keys(this.exportOptions.include).forEach(o=>{const l=document.createElement("input");l.type="checkbox",l.id="en-i-"+o,l.checked=this.exportOptions.include[o],l.onchange=()=>{this.exportOptions.include[o]=l.checked,this.export()};const c=document.createElement("label");c.classList.add("export-label"),c.htmlFor=l.id,c.innerText=o;const u=document.createElement("div");u.replaceChildren(l,c),u.classList.add("export-option"),i.appendChild(u)});const a=document.createElement("div");a.classList.add("export-section-label"),a.innerText="Options",i.appendChild(a),Object.keys(this.exportOptions.options).forEach(o=>{const l=document.createElement("input");l.id="en-o-"+o,l.type="checkbox",l.checked=this.exportOptions.options[o],l.onchange=()=>{this.exportOptions.options[o]=l.checked,this.export()};const c=document.createElement("label");c.classList.add("export-label"),c.htmlFor=l.id,c.innerText=Eh[o].label;const u=document.createElement("div");u.replaceChildren(l,c),u.classList.add("export-option"),i.appendChild(u),Eh[o].tooltip!==void 0&&Lt(u,{content:Eh[o].tooltip})}),t.replaceChildren(i,s),e.appendChild(t),this.viewElement.appendChild(e)}export(){let e=`{ -`+this.selection.map(t=>{let i=" {";return this.exportOptions.include.Beat&&(i+=this.padNum(t.beat)+","),this.exportOptions.include.Second&&(i+=this.padNum(t.second)+","),this.exportOptions.include.Column&&(this.exportOptions.options.columnOneBased?i+=t.col+1+",":i+=t.col+","),this.exportOptions.include.Type&&(this.exportOptions.options.notitgNoteTypes&&df[t.type]!==void 0?i+=df[t.type]+",":i+='"'+t.type+'",'),this.exportOptions.include.Quantization&&(i+=t.quant+","),this.exportOptions.include.Length&&Re(t)&&(this.exportOptions.options.lengthAsNumberIndex?i+=this.padNum(t.hold)+",":i+="length="+this.padNum(t.hold)+","),i.endsWith(",")&&(i=i.slice(0,-1)),i+="}",this.getNumIncludes()==1&&(i=i.replaceAll("{",""),i=i.replaceAll("}","")),i}).join(`, -`)+` -}`;this.exportOptions.options.minify&&(e=e.replaceAll(/\s/g,"")),this.outputDiv.innerText=e}getNumIncludes(){return Object.values(this.exportOptions.include).map(e=>+e).reduce((e,t)=>e+t,0)}padNum(e){return this.exportOptions.options.padNumbers?(Math.round(e*1e3)/1e3).toFixed(3):Math.round(e*1e3)/1e3}}const Lr={"dance-single":[{label:"Left",keys:["Left","A"]},{label:"Down",keys:["Down","S"]},{label:"Up",keys:["Up","W"]},{label:"Right",keys:["Right","D"]}],"dance-double":[{label:"P1 Left",keys:["Left"]},{label:"P1 Down",keys:["Down"]},{label:"P1 Up",keys:["Up"]},{label:"P1 Right",keys:["Right"]},{label:"P2 Left",keys:["A"]},{label:"P2 Down",keys:["S"]},{label:"P2 Up",keys:["W"]},{label:"P2 Right",keys:["D"]}],"dance-couple":[{label:"P1 Left",keys:["Left"]},{label:"P1 Down",keys:["Down"]},{label:"P1 Up",keys:["Up"]},{label:"P1 Right",keys:["Right"]},{label:"P2 Left",keys:["A"]},{label:"P2 Down",keys:["S"]},{label:"P2 Up",keys:["W"]},{label:"P2 Right",keys:["D"]}],"dance-solo":[{label:"Left",keys:["Left","A"]},{label:"UpLeft",keys:["Q"]},{label:"Down",keys:["Down","S"]},{label:"Up",keys:["Up","W"]},{label:"UpRight",keys:["E"]},{label:"Right",keys:["Right","D"]}],"dance-solodouble":[{label:"P1 Left",keys:["A"]},{label:"P1 UpLeft",keys:["Q"]},{label:"P1 Down",keys:["S"]},{label:"P1 Up",keys:["W"]},{label:"P1 UpRight",keys:["E"]},{label:"P1 Right",keys:["D"]},{label:"P2 Left",keys:["J"]},{label:"P2 UpLeft",keys:["U"]},{label:"P2 Down",keys:["K"]},{label:"P2 Up",keys:["I"]},{label:"P2 UpRight",keys:["O"]},{label:"P2 Right",keys:["L"]}],"dance-threepanel":[{label:"UpLeft",keys:["Left","Q"]},{label:"Down",keys:["Down","S"]},{label:"UpRight",keys:["Right","E"]}],"dance-threedouble":[{label:"P1 UpLeft",keys:["Left"]},{label:"P1 Down",keys:["Down"]},{label:"P1 UpRight",keys:["Right"]},{label:"P2 UpLeft",keys:["Q"]},{label:"P2 Down",keys:["S"]},{label:"P2 UpRight",keys:["E"]}],"pump-single":[{label:"DownLeft",keys:["Z"]},{label:"UpLeft",keys:["Q"]},{label:"Center",keys:["S"]},{label:"UpRight",keys:["E"]},{label:"DownRight",keys:["C"]}],"pump-double":[{label:"P1 DownLeft",keys:["Z"]},{label:"P1 UpLeft",keys:["Q"]},{label:"P1 Center",keys:["S"]},{label:"P1 UpRight",keys:["E"]},{label:"P1 DownRight",keys:["C"]},{label:"P2 DownLeft",keys:["V"]},{label:"P2 UpLeft",keys:["R"]},{label:"P2 Center",keys:["G"]},{label:"P2 UpRight",keys:["Y"]},{label:"P2 DownRight",keys:["N"]}],"pump-versus":[{label:"P1 DownLeft",keys:["Z"]},{label:"P1 UpLeft",keys:["Q"]},{label:"P1 Center",keys:["S"]},{label:"P1 UpRight",keys:["E"]},{label:"P1 DownRight",keys:["C"]},{label:"P2 DownLeft",keys:["V"]},{label:"P2 UpLeft",keys:["R"]},{label:"P2 Center",keys:["G"]},{label:"P2 UpRight",keys:["Y"]},{label:"P2 DownRight",keys:["N"]}],"pump-couple":[{label:"P1 DownLeft",keys:["Z"]},{label:"P1 UpLeft",keys:["Q"]},{label:"P1 Center",keys:["S"]},{label:"P1 UpRight",keys:["E"]},{label:"P1 DownRight",keys:["C"]},{label:"P2 DownLeft",keys:["V"]},{label:"P2 UpLeft",keys:["R"]},{label:"P2 Center",keys:["G"]},{label:"P2 UpRight",keys:["Y"]},{label:"P2 DownRight",keys:["N"]}],"pump-halfdouble":[{label:"P1 Center",keys:["S"]},{label:"P1 UpRight",keys:["E"]},{label:"P1 DownRight",keys:["C"]},{label:"P2 DownLeft",keys:["V"]},{label:"P2 UpLeft",keys:["R"]},{label:"P2 Center",keys:["G"]}]};class De{static app;static userKeybinds=new Map;static userGameplayKeybinds=new Map;static load(e){this.app=e;try{this.loadKeybinds()}catch(t){console.error("Failed to load user keybinds!"),console.error(t.stack),this.userKeybinds.clear(),this.userGameplayKeybinds.clear()}window.addEventListener("keydown",t=>this.checkKey(t,"keydown")),window.addEventListener("keyup",t=>this.checkKey(t,"keyup"))}static checkKey(e,t){if(e.target.classList.contains("inlineEdit")||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLButtonElement||["Meta","Control","Shift","Alt"].includes(e.key))return;const i=[];for(let a=0;a(o[u]??c.keys).some(h=>s==h));if(l!=-1){if(e.preventDefault(),this.app.windowManager.getFocusedWindow()?.options?.win_id=="keybind_options"||this.app.windowManager.isBlocked())return;this.app.chartManager[t=="keydown"?"judgeCol":"judgeColUp"](l);return}}const n=Object.keys(nt).filter(a=>!["cut","copy","paste","pasteReplace"].includes(a)).filter(a=>{for(const o of this.getCombosForKeybind(a))if(this.compareModifiers(o.mods,i)&&o.key==s)return!0;return!1}).map(a=>nt[a]);if(n.length>0){if(n.every(a=>a.preventDefault!=!1)&&e.preventDefault(),this.app.windowManager.getFocusedWindow()?.options?.win_id=="keybind_options"||this.app.windowManager.isBlocked())return;for(const a of n){let o=a.disabled;if(o instanceof Function&&(o=o(this.app)),!o&&!(a.disableRepeat&&e.repeat)){t=="keydown"?a.callback(this.app):a.callbackKeyUp?.(this.app);return}}}}static getKeyNameFromCode(e){let t=e;return t.startsWith("Digit")&&(t=t.slice(5)),t.startsWith("Key")&&(t=t.slice(3)),t in wf&&(t=wf[t]),t}static getKeybindString(e){return this.getCombosForKeybind(e).map(t=>this.getComboString(t)).join(" / ")}static getComboString(e){const t=Co.filter(i=>e.mods.includes(i)).map(i=>VS[i]).join("");return t+(t!=""?" ":"")+(Ty[e.key]??e.key)}static getCombosForKeybind(e){return e in nt?this.userKeybinds.get(e)??nt[e].combos:(console.log("Couldn't find keybind with id "+e),[])}static getKeysForGameType(e){const t=ze.getGameType(e);return t?new Array(t.numCols).fill(null).map((i,s)=>this.userGameplayKeybinds.get(e)?.[s]??Lr[e]?.[s].keys??[]):(console.log("Couldn't find game type with id "+e),[])}static compareModifiers(e,t){if(e.length!=t.length)return!1;for(const i of Co)if((e.includes(i)?1:0)+(t.includes(i)?1:0)==1)return!1;return!0}static compareCombos(e,t){return e.key==t.key&&this.compareModifiers(e.mods,t.mods)}static loadKeybinds(){const e=localStorage.getItem("keybinds");if(e){const i=JSON.parse(e);if(typeof i!="object")return console.error("Couldn't load keybinds from storage");for(const[s,n]of Object.entries(i)){if(!(s in nt)){console.warn("Couldn't load keybind "+s+": key doesn't exist");continue}Array.isArray(n)||console.warn("Couldn't load keybind "+s+": value is not an array"),this.userKeybinds.set(s,n.filter(a=>typeof a.key!="string"||!Array.isArray(a.mods)?(console.warn("Couldn't load keycombo for keybind "+s+": "+JSON.stringify(a)),!1):!0))}}const t=localStorage.getItem("keybindsGP");if(t){const i=JSON.parse(t);if(typeof i!="object")return console.error("Couldn't load gameplay keybinds from storage");for(const[s,n]of Object.entries(i)){if(!ze.getGameType(s)){console.warn("Couldn't load gameplay keybinds for gameType "+s+": gameType doesn't exist");continue}Array.isArray(n)||console.warn("Couldn't load gameplay keybind "+s+": value is not an array"),this.userGameplayKeybinds.set(s,n.map((a,o)=>!Array.isArray(a)&&a!==null?(console.warn("Couldn't load gameplay keys for type "+s+" col "+o+": "+JSON.stringify(a)),null):a))}}}static clearSave(){localStorage.removeItem("keybinds"),localStorage.removeItem("keybindsGP")}static setKeybind(e,t){this.userKeybinds.has(e)||this.userKeybinds.set(e,[...nt[e].combos]),this.userKeybinds.get(e)?.push(t),this.checkIsDefault(e),this.saveKeybinds()}static removeKeybind(e,t){this.userKeybinds.has(e)||this.userKeybinds.set(e,[...nt[e].combos]),this.userKeybinds.set(e,this.userKeybinds.get(e).filter(i=>!this.compareCombos(i,t))),this.checkIsDefault(e),this.saveKeybinds()}static revertKeybind(e){this.userKeybinds.delete(e),this.saveKeybinds()}static revertGameplayKeybind(e,t){this.userGameplayKeybinds.has(e)&&(this.userGameplayKeybinds.get(e)[t]=null,this.userGameplayKeybinds.get(e).every(i=>i===null)&&this.userGameplayKeybinds.delete(e)),this.saveKeybinds()}static setGameplayKeybind(e,t,i){this.userGameplayKeybinds.has(e)||this.userGameplayKeybinds.set(e,new Array(ze.getGameType(e).numCols).fill(null)),this.userGameplayKeybinds.get(e)[t]==null&&(this.userGameplayKeybinds.get(e)[t]=[...Lr[e]?.[t].keys??[]]),this.userGameplayKeybinds.get(e)[t].push(i),this.checkIsDefaultGameplay(e,t),this.saveKeybinds()}static removeGameplayKeybind(e,t,i){this.userGameplayKeybinds.has(e)||this.userGameplayKeybinds.set(e,new Array(ze.getGameType(e).numCols).fill(null)),this.userGameplayKeybinds.get(e)[t]==null&&(this.userGameplayKeybinds.get(e)[t]=[...Lr[e]?.[t].keys??[]]),this.userGameplayKeybinds.get(e)[t]=this.userGameplayKeybinds.get(e)[t].filter(s=>s!=i),this.checkIsDefaultGameplay(e,t),this.saveKeybinds()}static checkIsDefault(e){if(!this.userKeybinds.has(e))return!0;const t=this.userKeybinds.get(e),i=[...nt[e].combos];return t.length!=i.length?!1:t.map(s=>this.getComboString(s)).sort().join("∆")==i.map(s=>this.getComboString(s)).sort().join("∆")?(this.userKeybinds.delete(e),!0):!1}static checkIsDefaultGameplay(e,t){if(!this.userGameplayKeybinds.has(e)||this.userGameplayKeybinds.get(e)[t]===null)return!0;const i=this.userGameplayKeybinds.get(e)[t],s=[...Lr[e]?.[t].keys??[]];return i.length!=s.length?!1:i.sort().join("∆")==s.sort().join("∆")?(this.userGameplayKeybinds.get(e)[t]=null,this.userGameplayKeybinds.get(e).every(n=>n===null)&&this.userGameplayKeybinds.delete(e),!0):!1}static saveKeybinds(){const e={};for(const[i,s]of this.userKeybinds.entries())e[i]=s;localStorage.setItem("keybinds",JSON.stringify(e));const t={};for(const[i,s]of this.userGameplayKeybinds.entries())t[i]=s;localStorage.setItem("keybindsGP",JSON.stringify(t))}static getKeybindTooltip(e){return this.getCombosForKeybind(e).map(i=>{let s=this.getComboString(i);return s==""?"":(s=s.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'"),"")}).join("")}static evaluateTaggedTooltip(e,t){t=t.map(s=>s.startsWith("\\")?s.slice(1):this.getKeybindTooltip(s));const i=[];for(let s=0;s"+i.join("")+""}static createKeybindTooltip(e){return(t,...i)=>{Lt(e,{allowHTML:!0,onShow:s=>{s.setContent(this.evaluateTaggedTooltip(t,i))}})}}}class py extends St{app;allowMods;callback;combo={mods:[],key:""};conflictCheck;listener;constructor(e,t,i,s){super({title:"",width:300,height:168,disableClose:!0,win_id:"keyComboSelector",blocking:!0}),this.app=e,this.allowMods=t,this.callback=i,this.conflictCheck=s??(()=>[]),this.initView()}initView(){this.viewElement.replaceChildren(),this.viewElement.classList.add("confirmation");const e=document.createElement("div");e.classList.add("padding"),e.style.gap="8px";const t=document.createElement("div");t.classList.add("label"),t.innerText="Input a key combo and select Ok when finished.",e.appendChild(t);const i=document.createElement("input");i.type="text",i.disabled=!0,i.style.fontSize="18px",i.style.height="24px",i.style.flex="0",i.style.textAlign="center",e.appendChild(i);const s=document.createElement("div");s.classList.add("detail"),s.innerText="No conflicts",s.style.flex="1",e.appendChild(s);const n=document.createElement("div");n.classList.add("menu-options");const a=document.createElement("button");a.innerText="Ok",a.onclick=()=>{this.callback(this.combo),this.closeWindow()},a.classList.add("confirm"),a.disabled=!0;const o=document.createElement("button");o.innerText="Cancel",o.onclick=()=>{this.closeWindow()},n.append(o),n.append(a),e.appendChild(n),this.viewElement.appendChild(e),this.listener=l=>{if(["Meta","Control","Shift","Alt","Escape"].includes(l.key))return;if(this.combo.key=De.getKeyNameFromCode(l.code),this.allowMods){const u=[];for(let h=0;h=3?s.innerText=`Conflicts with ${c.length} keybinds`:c.length>=1?s.innerText=`Conflicts with ${c.join(",")}`:s.innerText="No conflicts"),l.preventDefault()},window.addEventListener("keydown",this.listener)}onClose(){window.removeEventListener("keydown",this.listener)}}class vS extends St{app;observer;conflictMap=this.calculateConflicts();constructor(e){super({title:"Gameplay Keybind Options",width:600,height:400,disableClose:!1,win_id:"gameplay_keybind_options",blocking:!1}),this.app=e,this.initView()}initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("pref-container");const i=document.createElement("div");i.classList.add("pref-scrollers");const s=document.createElement("div");s.classList.add("pref-section-scroller");const n=document.createElement("div");n.classList.add("pref-option-scroller"),i.replaceChildren(s,n),this.observer=new IntersectionObserver(a=>{a.forEach(o=>{const l=o.target.dataset.id,c=s.querySelector(`.pref-section[data-id=${l}]`);c&&(o.intersectionRatio>0?c.classList.add("selected"):c.classList.remove("selected"))})},{}),t.replaceChildren(i),s.replaceChildren(...this.createSections()),n.replaceChildren(...this.createOptions()),e.appendChild(t),this.viewElement.appendChild(e)}createSections(){return Object.keys(ze.getTypes()).map(e=>this.createEmptySection(e))}createOptions(){return Object.keys(ze.getTypes()).map(e=>{const t=new Array(ze.getTypes()[e].numCols).fill(null).map((n,a)=>this.createKeybindItem(e,a)),i=document.createElement("div");i.classList.add("pref-group"),i.dataset.id=e;const s=document.createElement("div");return s.classList.add("pref-group-label"),s.innerText=e,i.replaceChildren(s,...t),this.observer.observe(i),i})}createEmptySection(e){const t=document.createElement("div");return t.classList.add("pref-section"),t.dataset.id=e,t.innerText=e,t.onclick=()=>{t.parentElement.parentElement.querySelector(`.pref-group[data-id=${e}]`).scrollIntoView()},t}createKeybindItem(e,t){const i=document.createElement("div");i.classList.add("pref-keybind"),i.dataset.id=e+"-"+t,i.onclick=o=>{o.target.classList.contains("pref-keybind-combo")||i.querySelector(".icon")?.contains(o.target)||this.app.windowManager.openWindow(new py(this.app,!1,l=>{De.setGameplayKeybind(e,t,l.key),this.conflictMap=this.calculateConflicts(),i.replaceWith(this.createKeybindItem(e,t))},l=>{const c=this.conflictMap.get(e)?.get(l.key)?.map(u=>Lr[u[0]]?.[u[1]].label??"Column "+u[1])??[];return c.includes(Lr[e]?.[t].label??"Column "+t)?"self":c}))};const s=document.createElement("div");s.classList.add("pref-keybind-label"),s.innerText=Lr[e]?.[t].label??"Column "+t;const n=Se.getIcon("REVERT");n.style.width="12px",n.addEventListener("click",()=>{De.revertGameplayKeybind(e,t),this.conflictMap=this.calculateConflicts(),i.replaceWith(this.createKeybindItem(e,t))}),n.style.display=De.checkIsDefaultGameplay(e,t)?"none":"block";const a=document.createElement("div");return a.classList.add("pref-keybind-combos"),a.replaceChildren(...De.getKeysForGameType(e)[t].map(o=>{const l=document.createElement("button");return l.classList.add("pref-keybind-combo"),l.innerText=o,this.conflictMap.get(e).get(o).length>1&&l.classList.add("conflict"),l.onclick=()=>{De.removeGameplayKeybind(e,t,o),this.conflictMap=this.calculateConflicts(),i.replaceWith(this.createKeybindItem(e,t))},l})),i.replaceChildren(s,n,a),i}calculateConflicts(){const e=new Map;Object.keys(ze.getTypes()).forEach(t=>{const i=new Map;De.getKeysForGameType(t).forEach((s,n)=>{s.forEach((a,o)=>{i.has(a)||i.set(a,[]),i.get(a).push([t,n,o])})}),e.set(t,i)}),[...this.viewElement.querySelectorAll(".pref-keybind-combo.conflict")].forEach(t=>t.classList.remove("conflict"));for(const t of e.values())for(const i of t.values())i.length!=1&&i.forEach(s=>{const n=this.viewElement.querySelector(`.pref-keybind[data-id=${s[0]}-${s[1]}] .pref-keybind-combos`);n?.children[s[2]]&&n.children[s[2]].classList.add("conflict")});return e}onClose(){this.observer?.disconnect()}}class fy{static _model;static async getModel(){return this._model||await this._load(),this._model}static async _load(){this._model=[];const e=localStorage.getItem("recentFiles");if(e){try{const t=JSON.parse(e);if(!Array.isArray(t))return;for(const i of t)typeof i!="object"||Array.isArray(i)||typeof i?.name!="string"||typeof i?.path!="string"||this._model.find(s=>s.path==i.path)||this._model.push({name:i.name,path:i.path})}catch{console.log("Failed to load recent file entries");return}await this.saveEntries()}}static async getRecents(){return await this.getModel()}static async addSM(e,t){const i=await this.getModel(),s=i.findIndex(n=>n.path==e);s!=-1&&i.splice(s,1),i.unshift({name:t.properties.TITLE??"Untitled Song",path:e}),this.saveEntries()}static async limitEntries(){(await this.getModel()).splice(15)}static async saveEntries(){this.limitEntries();const e=await Promise.all(this._model.map(t=>Ue.hasFile(t.path)));this._model=this._model.filter((t,i)=>e[i]),localStorage.setItem("recentFiles",JSON.stringify(this._model))}}function ti(r){return!!r.simfileTimingData}class my{_cache={warpedBeats:new Map,beatsToSeconds:new Map};columns={};offset;buildBeatTimingDataCache(){const e=[];let t=this.getTimingData("BPMS","STOPS","WARPS","DELAYS");t=t.concat(this.getTimingData("WARPS").map(n=>({type:"WARP_DEST",beat:n.beat+n.value,value:n.value})));const i=["WARP_DEST","BPMS","STOPS","WARPS","DELAYS"];t.sort((n,a)=>n.beat==a.beat?i.indexOf(n.type)-i.indexOf(a.type):n.beat-a.beat);const s=this.getOffset();e.push({beat:0,secondBefore:-s,secondOf:-s,secondAfter:-s,secondClamp:-s,bpm:this.getTimingData("BPMS")[0]?.value??120,warped:!1});for(const n of t){if(e.at(-1)?.beat!=n.beat){e.at(-1).secondClamp=Math.max(Math.max(e.at(-2)?.secondClamp??-s,e.at(-2)?.secondAfter??-s),e.at(-1).secondBefore);let a=(n.beat-e.at(-1).beat)*60/e.at(-1).bpm;e.at(-1).warped&&(a=0),e.push({beat:n.beat,secondBefore:e.at(-1).secondAfter+a,secondOf:e.at(-1).secondAfter+a,secondAfter:e.at(-1).secondAfter+a,secondClamp:0,bpm:e.at(-1).bpm,warped:e.at(-1).warped})}n.type=="WARPS"&&(e.at(-1).warped=!0),n.type=="WARP_DEST"&&(e.at(-1).warped=!1),n.type=="BPMS"&&(e.at(-1).bpm=n.value),n.type=="STOPS"&&(e.at(-1).secondAfter+=n.value),n.type=="DELAYS"&&(e.at(-1).secondOf+=n.value,e.at(-1).secondAfter+=n.value)}e.at(-1).secondClamp=Math.max(e.at(-2)?.secondClamp??-s,e.at(-1).secondBefore),this._cache.beatTiming=e,this._cache.warpedBeats.clear(),this._cache.beatsToSeconds.clear()}buildEffectiveBeatTimingDataCache(){const e=[...this.getTimingData("SCROLLS")];let t=0;if(e.length==0){this._cache.effectiveBeatTiming=[];return}e[0].beat!=0&&e.unshift({type:"SCROLLS",beat:0,value:e[0].value??1}),t=e[0].beat;for(let i=0;is[t])}mergeColumns(e){if(e.length==0)return[];for(e=e.filter(t=>t.length>0);e.length>1;){const t=[];for(let i=0;i=e.length)return n.concat(t.slice(s))}else if(n.push(t[s]),s++,s>=t.length)return n.concat(e.slice(i))}splitEvents(e){const t=new Map;return e.forEach(i=>{t.has(i.type)||t.set(i.type,[]),t.get(i.type).push(i)}),t}splitEventPairs(e){const t=new Map;return e.forEach(i=>{t.has(i[0].type)||t.set(i[0].type,[]),t.get(i[0].type).push(i)}),t}parse(e,t){if(e=="OFFSET"){this.offset=parseFloat(t);return}e in this.columns||this.createColumn(e),this.parseEvents(e,t)}setOffset(e){const t=this.offset;gt.instance.run({action:()=>{this.offset=e,this.reloadCache(["OFFSET"]),K.emit("timingModified"),K.emit("chartModified")},undo:()=>{this.offset=t,this.reloadCache(["OFFSET"]),K.emit("timingModified"),K.emit("chartModified")}})}serialize(e){this.reloadCache();let t="";this.offset&&(t+="#OFFSET:"+this.offset+`; -`);let i=["BPMS","STOPS","WARPS","DELAYS","SPEEDS","SCROLLS","TICKCOUNTS","TIMESIGNATURES","LABELS","COMBOS","FAKES","BGCHANGES","FGCHANGES","ATTACKS"];e=="sm"&&(i=["BPMS","STOPS","TIMESIGNATURES","BGCHANGES","FGCHANGES","ATTACKS"]);for(const s of i)s in this.columns&&(t+=this.formatProperty(e,s));return t}formatProperty(e,t){let s="";const n=a=>ae(a,3).toFixed(3);switch(t){case"ATTACKS":{s=this.columns[t].events.map(o=>`TIME=${o.second}:${o.endType}=${o.value}:MODS=${o.mods}`).join(`: -`);break}case"BGCHANGES":case"FGCHANGES":{s=this.columns[t].events.map(o=>[o.beat,o.file,n(o.updateRate),Number(o.crossFade),Number(o.stretchRewind),Number(o.stretchNoLoop),o.effect,o.file2,o.transition,o.color1,o.color2].join("=")).join(`, -`);break}case"BPMS":case"DELAYS":case"FAKES":case"SCROLLS":case"WARPS":{s=this.columns[t].events.map(o=>[n(o.beat),n(o.value)].join("=")).join(`, -`);break}case"STOPS":{let a=this.columns[t].events;if(e=="sm"){const l=this.getTimingData("WARPS").map(c=>{const u=this.getEventAtBeat("BPMS",c.beat).value;return{type:"STOPS",beat:c.beat,value:-60/u*c.value}});a=a.concat(l)}s=a.map(o=>[n(o.beat),n(o.value)].join("=")).join(`, -`);break}case"COMBOS":{s=this.columns[t].events.map(o=>o.hitMult==o.missMult?[n(o.beat),o.hitMult].join("="):[n(o.beat),o.hitMult,o.missMult].join("=")).join(`, -`);break}case"LABELS":case"TICKCOUNTS":{s=this.columns[t].events.map(o=>[n(o.beat),o.value].join("=")).join(`, -`);break}case"SPEEDS":{s=this.getTimingData(t).map(o=>[n(o.beat),n(o.value),n(o.delay),o.unit=="B"?0:1].join("=")).join(`, -`);break}case"TIMESIGNATURES":{s=this.getTimingData(t).map(o=>[n(o.beat),o.upper,o.lower].join("=")).join(`, -`);break}}return s.includes(",")&&(s+=` -`),"#"+t+":"+s+`; -`}createColumn(e){this.columns[e]={type:e,events:[]}}getTime(e){switch(e.type){case"BPMS":case"STOPS":case"WARPS":case"DELAYS":case"LABELS":case"SPEEDS":case"SCROLLS":case"TICKCOUNTS":case"TIMESIGNATURES":case"COMBOS":case"FAKES":case"BGCHANGES":case"FGCHANGES":return e.beat;case"ATTACKS":return e.second}}isNullEvent(e){switch(e.type){case"BPMS":case"SPEEDS":case"SCROLLS":case"TICKCOUNTS":case"TIMESIGNATURES":case"COMBOS":return!1;case"STOPS":case"WARPS":case"DELAYS":case"FAKES":return e.value==0;case"LABELS":return e.value=="";case"BGCHANGES":case"FGCHANGES":return e.file=="";case"ATTACKS":return e.mods==""}}isSimilar(e,t){switch(e.type){case"BPMS":case"LABELS":case"SPEEDS":case"SCROLLS":case"TICKCOUNTS":return e.type==t.type&&e.value==t.value;case"TIMESIGNATURES":return e.type==t.type&&e.upper==t.upper&&e.lower==t.lower;case"COMBOS":return e.type==t.type&&e.hitMult==t.hitMult&&e.missMult==t.missMult;case"STOPS":case"WARPS":case"DELAYS":case"FAKES":case"BGCHANGES":case"FGCHANGES":case"ATTACKS":return!1}}removeOverlapping(e){const t=[];let i=null;for(;e.length>0;)this.getTime(e[0])!=i&&(i=this.getTime(e[0]),t.push(e[0])),e.shift();return t}compareEvents(e,t){const i=s=>!s.some(n=>e[n]!==void 0&&e[n]!==t[n]);switch(e.type){case"BPMS":case"STOPS":case"WARPS":case"DELAYS":case"SCROLLS":case"TICKCOUNTS":case"FAKES":case"LABELS":return i(["type","beat","value"]);case"SPEEDS":return i(["type","beat","value","unit","delay"]);case"TIMESIGNATURES":return i(["type","beat","upper","lower"]);case"COMBOS":return i(["type","beat","hitMult","missMult"]);case"ATTACKS":return i(["type","second","mods","endType","value"]);case"FGCHANGES":case"BGCHANGES":return i(["type","beat","color1","color2","crossFade","effect","file1","file2","stretchNoLoop","stretchRewind","transition","updateRate"])}}insertEvents(e,t){this.columns[e]||this.createColumn(e);const i=this.columns[e],s=[];t=this.removeOverlapping(t);let n=0;for(;t[0]&&i.events[n];){const a=i.events[n],o=[];for(;t[0]&&this.getTime(a)>=this.getTime(t[0]);)o.push(t.shift());if(o.length==0){n++;continue}i.events.splice(n,0,...o),n+=o.length,this.getTime(o.at(-1))==this.getTime(a)?s.push(...i.events.splice(n,1)):n++}return i.events.push(...t),s}deleteEvents(e,t){this.columns[e]||this.createColumn(e);const i=this.columns[e];t=this.removeOverlapping(t);const s=[];let n=0,a=0;for(;t[n]&&i.events[a];)this.compareEvents(t[n],i.events[a])?(s.push(...i.events.splice(a,1)),n++):a++;return s}getColumnType(e){switch(e){case"BPMS":case"LABELS":case"SPEEDS":case"SCROLLS":case"TICKCOUNTS":case"TIMESIGNATURES":case"COMBOS":return"continuing";case"STOPS":case"WARPS":case"DELAYS":case"FAKES":case"BGCHANGES":case"FGCHANGES":case"ATTACKS":return"instant"}}findConflictingEvents(e){const t=this.columns[e];if(!t)return[];switch(this.getColumnType(t.type)){case"continuing":{const i=[];let s=0;for(;t.events[s]&&this.isNullEvent(t.events[s]);)i.push(t.events[s]),s++;let n=t.events[s];for(s++;sthis.isNullEvent(i))}}parseEvents(e,t){switch(e){case"BPMS":case"STOPS":case"WARPS":case"DELAYS":case"SCROLLS":case"FAKES":this.insertEvents(e,Array.from(t.matchAll(/(-?[\d.]+)=(-?[\d.]+)/g)).map(i=>({type:e,beat:parseFloat(i[1]),value:parseFloat(i[2])})));return;case"TICKCOUNTS":this.insertEvents(e,Array.from(t.matchAll(/(-?[\d.]+)=(-?\d+)/g)).map(i=>({type:"TICKCOUNTS",beat:parseFloat(i[1]),value:parseInt(i[2])})));return;case"LABELS":this.insertEvents(e,Array.from(t.matchAll(/((-?[\d.]+)=([^\n]+)=\d)|((-?[\d.]+)=([^\n,]+))/g)).map(i=>i[1]===void 0?{type:"LABELS",beat:parseFloat(i[5]),value:i[6].trim()}:{type:"LABELS",beat:parseFloat(i[2]),value:i[3].trim()}));return;case"SPEEDS":this.insertEvents(e,Array.from(t.matchAll(/(-?[\d.]+)=(-?[\d.]+)=([\d.]+)=([01])/g)).map(i=>({type:"SPEEDS",beat:parseFloat(i[1]),value:parseFloat(i[2]),delay:parseFloat(i[3]),unit:i[4].trim()=="0"?"B":"T"})));return;case"TIMESIGNATURES":this.insertEvents(e,Array.from(t.matchAll(/(-?[\d.]+)=(\d+)=(\d+)/g)).map(i=>({type:"TIMESIGNATURES",beat:parseFloat(i[1]),upper:parseInt(i[2]),lower:parseInt(i[3])})));return;case"COMBOS":this.insertEvents(e,Array.from(t.matchAll(/(-?[\d.]+)=(\d+)=*(\d+)*/g)).map(i=>({type:"COMBOS",beat:parseFloat(i[1]),hitMult:parseInt(i[2]),missMult:parseInt(i[3]??i[2])})));return;case"ATTACKS":this.insertEvents(e,Array.from(t.matchAll(/TIME=(-?[\d.]+):(END|LEN)=(-?[\d.]+):MODS=([^:]+)/g)).map(i=>({type:"ATTACKS",second:parseFloat(i[1]),endType:i[2].trim(),value:parseFloat(i[3]),mods:i[4].trim()})));return;case"BGCHANGES":case"FGCHANGES":this.insertEvents(e,Array.from(t.matchAll(/(-?[\d.]+)=([^\n]+?)=(-?[\d.]+)=([01])=([01])=([01])=?([^\n=,]*)=?([^\n=,]*)=?([^\n=,]*)=?([^\n=,]*)=?([^\n=,]*)/g)).map(i=>({type:e,beat:parseFloat(i[1]),file:i[2].trim(),updateRate:parseFloat(i[3]),crossFade:i[4].trim()=="1",stretchRewind:i[5].trim()=="1",stretchNoLoop:i[6].trim()=="1",effect:i[7].trim()??"",file2:i[8].trim()??"",transition:i[9].trim()??"",color1:i[10].trim()??"",color2:i[11].trim()??""})))}}typeRequiresSSC(e){switch(e){case"BPMS":case"STOPS":case"ATTACKS":case"BGCHANGES":case"FGCHANGES":return!1;case"WARPS":case"DELAYS":case"LABELS":case"SPEEDS":case"SCROLLS":case"TICKCOUNTS":case"TIMESIGNATURES":case"COMBOS":case"FAKES":return!!this.columns[e]&&this.columns[e].events.length>0}}getDefaultEvent(e,t){switch(e){case"BPMS":return{type:e,beat:t,value:120,second:this.getSecondsFromBeat(t),isChartTiming:ti(this)};case"STOPS":case"WARPS":case"FAKES":return{type:e,beat:t,value:0,second:this.getSecondsFromBeat(t),isChartTiming:ti(this)};case"DELAYS":return{type:e,beat:t,value:0,second:this.getSecondsFromBeat(t,"before"),isChartTiming:ti(this)};case"LABELS":return{type:e,beat:t,value:"",second:this.getSecondsFromBeat(t),isChartTiming:ti(this)};case"SPEEDS":return{type:e,beat:t,value:1,delay:0,unit:"B",second:this.getSecondsFromBeat(t),isChartTiming:ti(this)};case"SCROLLS":return{type:e,beat:t,value:1,second:this.getSecondsFromBeat(t),isChartTiming:ti(this)};case"TICKCOUNTS":return{type:e,beat:t,value:4,second:this.getSecondsFromBeat(t),isChartTiming:ti(this)};case"TIMESIGNATURES":return{type:e,beat:t,upper:4,lower:4,second:this.getSecondsFromBeat(t),isChartTiming:ti(this)};case"COMBOS":return{type:e,beat:t,hitMult:1,missMult:1,second:this.getSecondsFromBeat(t),isChartTiming:ti(this)};case"ATTACKS":return{type:e,beat:t,second:this.getSecondsFromBeat(t),endType:"LEN",value:1,mods:"",isChartTiming:ti(this)};case"BGCHANGES":case"FGCHANGES":return{type:e,beat:t,file:"",updateRate:1,crossFade:!1,stretchRewind:!1,stretchNoLoop:!1,effect:"",file2:"",transition:"",color1:"",color2:"",second:this.getSecondsFromBeat(t),isChartTiming:ti(this)}}}getEventAtBeat(e,t,i=!0){const s=this.getColumn(e),n=s.events[Rt(s.events,t,a=>a.beat)];if(!n)switch(this.getColumnType(s.type)){case"continuing":return i?this.getDefaultEvent(s.type,0):void 0;case"instant":return}return n}updateEvents(e){const t=this.columns[e];if(t){switch(e){case"DELAYS":t.events.forEach(i=>i.second=this.getSecondsFromBeat(i.beat,"before"));break;case"ATTACKS":t.events.forEach(i=>i.beat=this.getBeatFromSeconds(i.second));break;case"BPMS":case"STOPS":case"WARPS":case"LABELS":case"SPEEDS":case"SCROLLS":case"TICKCOUNTS":case"TIMESIGNATURES":case"COMBOS":case"FAKES":case"BGCHANGES":case"FGCHANGES":t.events.forEach(i=>i.second=this.getSecondsFromBeat(i.beat))}t.events.forEach(i=>i.isChartTiming=ti(this))}}_insert(e){e=e.sort((n,a)=>n.type=="ATTACKS"&&a.type=="ATTACKS"?n.second-a.second:n.type!="ATTACKS"&&a.type!="ATTACKS"?n.beat-a.beat:0);const t=this.splitEvents(e),i=[],s=[];for(const[n,a]of t.entries())i.push(...this.insertEvents(n,a)),s.push(...this.findConflictingEvents(n));return{events:e,insertConflicts:i,errors:s}}_modify(e){const t=this.splitEventPairs(e),i=[],s=[];for(const[n,a]of t.entries())this.deleteEvents(n,a.map(o=>o[0]).sort((o,l)=>o.type=="ATTACKS"&&l.type=="ATTACKS"?o.second-l.second:o.type!="ATTACKS"&&l.type!="ATTACKS"?o.beat-l.beat:0)),i.push(...this.insertEvents(n,a.map(o=>o[1]).sort((o,l)=>o.type=="ATTACKS"&&l.type=="ATTACKS"?o.second-l.second:o.type!="ATTACKS"&&l.type!="ATTACKS"?o.beat-l.beat:0))),s.push(...this.findConflictingEvents(n));return{newEvents:e.map(n=>n[1]).sort((n,a)=>n.type=="ATTACKS"&&a.type=="ATTACKS"?n.second-a.second:n.type!="ATTACKS"&&a.type!="ATTACKS"?n.beat-a.beat:0),oldEvents:e.map(n=>n[0]).sort((n,a)=>n.type=="ATTACKS"&&a.type=="ATTACKS"?n.second-a.second:n.type!="ATTACKS"&&a.type!="ATTACKS"?n.beat-a.beat:0),insertConflicts:i,errors:s}}_delete(e){e=e.sort((n,a)=>n.type=="ATTACKS"&&a.type=="ATTACKS"?n.second-a.second:n.type!="ATTACKS"&&a.type!="ATTACKS"?n.beat-a.beat:0);const t=this.splitEvents(e),i=[],s=[];for(const[n,a]of t.entries())s.push(...this.deleteEvents(n,a)),i.push(...this.findConflictingEvents(n));return{removedEvents:s,errors:i}}findEvents(e){const t=this.splitEvents(e),i=[];for(const[s,n]of t.entries()){const a=this.columns[s];if(!a)continue;let o=0,l=0;for(;n[o]&&a.events[l];)this.compareEvents(n[o],a.events[l])?(i.push(a.events[l]),o++):l++}return i}getBeatFromSeconds(e){if(!isFinite(e))return 0;if(this._cache.beatTiming==null&&this.buildBeatTimingDataCache(),e+this.getOffset()<0)return(e+this.getOffset())*this._cache.beatTiming[0].bpm/60;const t=this._cache.beatTiming,i=this.binarySearch(t,"secondClamp",e),s=Math.max(0,e-i.secondAfter);return i.beat+s*i.bpm/60}getSecondsFromBeat(e,t){if(t||="",!isFinite(e))return 0;this._cache.beatTiming==null&&this.buildBeatTimingDataCache();const i=Math.floor(e*1e3)/1e3;if(e<=0){const c=this._cache.beatTiming[0].bpm;return-this.getOffset()+e*60/c}const s=`${e}-${t}`;if(this._cache.beatsToSeconds.has(s))return this._cache.beatsToSeconds.get(s);const n=this._cache.beatTiming,a=this.binarySearch(n,"beat",i);if(a.beat==i){if(t=="noclamp"||t=="")return this._cache.beatsToSeconds.set(s,a.secondOf),a.secondOf;if(t=="before")return this._cache.beatsToSeconds.set(s,a.secondBefore),a.secondBefore;if(t=="after")return this._cache.beatsToSeconds.set(s,a.secondAfter),a.secondAfter}let l=(e-a.beat)*60/a.bpm;return a.warped&&(l=0),t=="noclamp"?(this._cache.beatsToSeconds.set(s,a.secondAfter+l),a.secondAfter+l):(this._cache.beatsToSeconds.set(s,Math.max(a.secondClamp,a.secondAfter+l)),Math.max(a.secondClamp,a.secondAfter+l))}isBeatWarped(e){if(!isFinite(e))return!1;const t=Math.floor(e*1e3)/1e3;if(this._cache.warpedBeats.has(t))return this._cache.warpedBeats.get(t);this._cache.beatTiming==null&&this.buildBeatTimingDataCache();const i=this._cache.beatTiming,s=this.binarySearch(i,"beat",t),n=s.beat==t?s.secondClamp:Math.max(s.secondAfter,s.secondClamp);return s.secondOf=s.beat&&th.beat==s.beat):-1,a=this.getDivisionLength(e);const o=this.getDivisionOfMeasure(e)%1*a;let l=Math.max(0,e-o);l=i[n+1]?.beat&&(n++,s=i[n],l=s.beat,a=this.getDivisionLength(l),c=0,u=s.upper)}getEffectiveBeat(e){if(!isFinite(e))return 0;this._cache.effectiveBeatTiming==null&&this.buildEffectiveBeatTimingDataCache();const t=this._cache.effectiveBeatTiming;if(t.length==0)return e;const i=this.binarySearch(t,"beat",e);if(t[0]==i&&i.beat>e&&i.beat>0)return e;let s=i.effectiveBeat;const n=e-i.beat;return s+=n*i.value,s}getBeatFromEffectiveBeat(e){if(!isFinite(e))return 0;this._cache.effectiveBeatTiming==null&&this.buildEffectiveBeatTimingDataCache();const t=this._cache.effectiveBeatTiming;if(t.length==0)return e;let i=0;for(;t[i+1]&&(t[i].value<=0||t[i+1].effectiveBeat<=e);)i++;let n=(e-t[i].effectiveBeat)/t[i].value;return isFinite(n)||(n=0),t[i].beat+n}getSpeedMult(e,t){if(!isFinite(e)||!isFinite(t))return 0;const i=this.getColumn("SPEEDS").events;if(i.length==0)return 1;const s=this.binarySearchIndex(i,"beat",e),n=i[s];if(n==null)return 1;let a=e-n.beat;n.unit=="T"&&(a=t-n.second);let o=Le(a/n.delay,0,1);n.delay==0&&(o=1);const l=i[s-1]?.value??1;return o*(n.value-l)+l}reloadCache(e=[]){let t=e;(e.length==0||e.filter(i=>["WARPS","STOPS","DELAYS","BPMS","OFFSET"].includes(i)).length>0)&&(this.buildBeatTimingDataCache(),t=[...fr]),(e.length==0||e.includes("SCROLLS"))&&this.buildEffectiveBeatTimingDataCache(),(e.length==0||e.includes("TIMESIGNATURES"))&&this.buildMeasureTimingCache(),t.filter(i=>i!="OFFSET").forEach(i=>this.updateEvents(i)),this._cache.sortedEvents=this.mergeColumns(fr.map(i=>this.getColumn(i).events))}getBeatTiming(){return[...this._cache.beatTiming]}getTimingData(...e){return e.length==0?this._cache.sortedEvents:this.mergeColumns(e.map(t=>this.getColumn(t).events))}requiresSSC(){return fr.some(e=>this.typeRequiresSSC(e))}}class bS extends my{simfileTimingData;chart;constructor(e,t){super(),this.simfileTimingData=e,this.chart=t}getColumn(e){return this.columns[e]??this.simfileTimingData.getColumn(e)}splitSM(e){const t=[],i=[];for(const s of e)s.isChartTiming?i.push(s):t.push(s);return[t,i]}splitSMPairs(e){const t=[],i=[];for(const s of e)s[0].isChartTiming?i.push(s):t.push(s);return[t,i]}insert(e){let t,i;const s=e.find(o=>o.type=="TIMESIGNATURES"),[n,a]=this.splitSM(e);gt.instance.run({action:o=>{t=this.simfileTimingData._insert(n),this.simfileTimingData._delete(t.errors),i=this._insert(a),this._delete(i.errors),this.simfileTimingData.reloadCache(),o.chartManager.clearSelections(),o.chartManager.setEventSelection(this.findEvents(i.events).concat(this.simfileTimingData.findEvents(t.events))),K.emit("timingModified"),K.emit("chartModified"),s&&K.emit("timeSigChanged")},undo:o=>{this.simfileTimingData._insert(t.errors),this.simfileTimingData._delete(t.events),this.simfileTimingData._insert(t.insertConflicts),this._insert(i.errors),this._delete(i.events),this._insert(i.insertConflicts),this.simfileTimingData.reloadCache(),o.chartManager.clearSelections(),K.emit("timingModified"),K.emit("chartModified"),s&&K.emit("timeSigChanged")}})}modify(e){let t,i;const s=e.find(o=>o[0].type=="TIMESIGNATURES"),[n,a]=this.splitSMPairs(e);gt.instance.run({action:o=>{t=this.simfileTimingData._modify(n),this.simfileTimingData._delete(t.errors),i=this._modify(a),this._delete(i.errors),this.simfileTimingData.reloadCache(),o.chartManager.clearSelections(),o.chartManager.setEventSelection(this.findEvents(i.newEvents).concat(this.simfileTimingData.findEvents(t.newEvents))),K.emit("timingModified"),K.emit("chartModified"),s&&K.emit("timeSigChanged")},undo:o=>{this.simfileTimingData._insert(t.errors),this.simfileTimingData._delete(t.newEvents),this.simfileTimingData._insert(t.insertConflicts),this.simfileTimingData._insert(t.oldEvents),this._insert(i.errors),this._delete(i.newEvents),this._insert(i.insertConflicts),this._insert(i.oldEvents),this.simfileTimingData.reloadCache(),o.chartManager.clearSelections(),o.chartManager.setEventSelection(this.findEvents(i.oldEvents).concat(this.simfileTimingData.findEvents(t.oldEvents))),K.emit("timingModified"),K.emit("chartModified"),s&&K.emit("timeSigChanged")}})}delete(e){let t,i;const s=e.find(o=>o.type=="TIMESIGNATURES"),[n,a]=this.splitSM(e);gt.instance.run({action:o=>{t=this.simfileTimingData._delete(n),this.simfileTimingData._delete(t.errors),i=this._delete(a),this._delete(i.errors),this.simfileTimingData.reloadCache(),o.chartManager.clearSelections(),K.emit("timingModified"),K.emit("chartModified"),s&&K.emit("timeSigChanged")},undo:o=>{this.simfileTimingData._insert(t.errors),this.simfileTimingData._insert(t.removedEvents),this._insert(i.errors),this._insert(i.removedEvents),this.simfileTimingData.reloadCache(),o.chartManager.clearSelections(),o.chartManager.setEventSelection(this.findEvents(i.removedEvents).concat(this.simfileTimingData.findEvents(t.removedEvents))),K.emit("timingModified"),K.emit("chartModified"),s&&K.emit("timeSigChanged")}})}getOffset(){return this.offset??this.simfileTimingData.getOffset()}usesChartTiming(){return this.offset!==void 0||Object.values(this.columns).length>0}hasChartOffset(){return this.offset!==void 0}isPropertyChartSpecific(e){return e in this.columns}reloadCache(e=[]){super.reloadCache(e),this.chart.recalculateNotes()}}class wS extends my{offset=0;chartTimingDatas=[];constructor(){super(),fr.forEach(e=>this.createColumn(e))}createChartTimingData(e){const t=new bS(this,e);return this.chartTimingDatas.push(t),t}getColumn(e){return this.columns[e]}getOffset(){return this.offset}reloadCache(e=[]){super.reloadCache(e),this.chartTimingDatas.forEach(t=>t.reloadCache(e))}insert(e){let t;const i=e.find(s=>s.type=="TIMESIGNATURES");gt.instance.run({action:s=>{t=this._insert(e),this._delete(t.errors),this.reloadCache(),s.chartManager.clearSelections(),s.chartManager.setEventSelection(this.findEvents(t.events)),K.emit("timingModified"),K.emit("chartModified"),i&&K.emit("timeSigChanged")},undo:s=>{this._insert(t.errors),this._delete(t.events),this._insert(t.insertConflicts),this.reloadCache(),s.chartManager.clearSelections(),K.emit("timingModified"),K.emit("chartModified"),i&&K.emit("timeSigChanged")}})}modify(e){let t;const i=e.find(s=>s[0].type=="TIMESIGNATURES");gt.instance.run({action:s=>{t=this._modify(e),this._delete(t.errors),this.reloadCache(),s.chartManager.clearSelections(),s.chartManager.setEventSelection(this.findEvents(t.newEvents)),K.emit("timingModified"),K.emit("chartModified"),i&&K.emit("timeSigChanged")},undo:s=>{this._insert(t.errors),this._delete(t.newEvents),this._insert(t.insertConflicts),this._insert(t.oldEvents),this.reloadCache(),s.chartManager.clearSelections(),s.chartManager.setEventSelection(this.findEvents(t.oldEvents)),K.emit("timingModified"),K.emit("chartModified"),i&&K.emit("timeSigChanged")}})}delete(e){let t;const i=e.find(s=>s.type=="TIMESIGNATURES");gt.instance.run({action:s=>{t=this._delete(e),this._delete(t.errors),this.reloadCache(),s.chartManager.clearSelections(),K.emit("timingModified"),K.emit("chartModified"),i&&K.emit("timeSigChanged")},undo:s=>{this._insert(t.errors),this._insert(t.removedEvents),this.reloadCache(),s.chartManager.clearSelections(),s.chartManager.setEventSelection(this.findEvents(t.removedEvents)),K.emit("timingModified"),K.emit("chartModified"),i&&K.emit("timeSigChanged")}})}}const _S=["TITLE","SUBTITLE","ARTIST","TITLETRANSLIT","SUBTITLETRANSLIT","ARTISTTRANSLIT","GENRE","CREDIT","ORIGIN","BACKGROUND","BANNER","MUSIC","CDTITLE","JACKET","DISCIMAGE","CDIMAGE","PREVIEW","LYRICSPATH","SAMPLESTART","SAMPLELENGTH","SELECTABLE"];class gy{charts={};_type;other_properties={};properties={};timingData=new wS;unloadedCharts=[];loaded;constructor(e){this.loaded=new Promise(t=>{const i=e.name.split(".").pop();i=="sm"||i=="ssc"?this._type=i:t(),e.text().then(s=>{s=s.replaceAll(/\/\/.+/g,"");const n=[...s.matchAll(/#([A-Z]+):([^;]*);/g)];let a=!1,o={};const l=[];for(const c of n)c[1]=="NOTEDATA"&&i=="ssc"||a?(a=!0,o[c[1]]=c[2],c[1]=="NOTES"&&(l.push(o),o={},a=!1)):c[1]=="NOTES"?l.push(c[2]):_S.includes(c[1])?this.properties[c[1]]=c[2]:c[1]=="OFFSET"||fr.includes(c[1])?this.timingData.parse(c[1],c[2]):this.other_properties[c[1]]=c[2];this.charts={};for(const c of l){let u;try{u=new iy(this,c)}catch(h){this.unloadedCharts.push(c),Ee.createFormatted(h instanceof Error?h.message:String(h),"warn");continue}this.addChart(u)}this.timingData.reloadCache(),t()})})}addChart(e){this.charts[e.gameType.id]||=[],this.charts[e.gameType.id].push(e),this.charts[e.gameType.id].sort((t,i)=>Ai.indexOf(t.difficulty)==Ai.indexOf(i.difficulty)?t.meter-i.meter:Ai.indexOf(t.difficulty)-Ai.indexOf(i.difficulty))}removeChart(e){if(!this.charts[e.gameType.id])return!1;const t=this.charts[e.gameType.id].indexOf(e);return t==-1?!1:(this.charts[e.gameType.id].splice(t,1),!0)}serialize(e){let t="";e=="sm"?(this.other_properties.NITGVERSION&&(t+=this.formatProperty("NITGVERSION",this.other_properties.NITGVERSION)),t+=this.formatProperty("TITLE",this.properties.TITLE),t+=this.formatProperty("SUBTITLE",this.properties.SUBTITLE),t+=this.formatProperty("ARTIST",this.properties.ARTIST),t+=this.formatProperty("MUSIC",this.properties.MUSIC??""),t+=this.formatProperty("BANNER",this.properties.GENRE),t+=this.formatProperty("BACKGROUND",this.properties.BACKGROUND),t+=this.formatProperty("LYRICSPATH",this.properties.LYRICSPATH),t+=this.formatProperty("CDTITLE",this.properties.CDTITLE),t+=this.formatProperty("SAMPLESTART",this.properties.SAMPLESTART),t+=this.formatProperty("SAMPLELENGTH",this.properties.SAMPLELENGTH)):(t+=this.formatProperty("VERSION",this.other_properties.VERSION??.83),t+=this.formatProperty("TITLE",this.properties.TITLE),t+=this.formatProperty("SUBTITLE",this.properties.SUBTITLE),t+=this.formatProperty("ARTIST",this.properties.ARTIST),t+=this.formatProperty("TITLETRANSLIT",this.properties.TITLETRANSLIT),t+=this.formatProperty("SUBTITLETRANSLIT",this.properties.SUBTITLETRANSLIT),t+=this.formatProperty("ARTISTTRANSLIT",this.properties.ARTISTTRANSLIT),t+=this.formatProperty("GENRE",this.properties.GENRE),t+=this.formatProperty("CREDIT",this.properties.CREDIT),t+=this.formatProperty("MUSIC",this.properties.MUSIC??""),t+=this.formatProperty("BANNER",this.properties.BANNER),t+=this.formatProperty("BACKGROUND",this.properties.BACKGROUND),t+=this.formatProperty("JACKET",this.properties.JACKET),t+=this.formatProperty("DISCIMAGE",this.properties.DISCIMAGE),t+=this.formatProperty("CDIMAGE",this.properties.CDIMAGE),t+=this.formatProperty("SELECTABLE",this.properties.SELECTABLE??"YES"),t+=this.formatProperty("LYRICSPATH",this.properties.LYRICSPATH),t+=this.formatProperty("CDTITLE",this.properties.CDTITLE),t+=this.formatProperty("SAMPLESTART",this.properties.SAMPLESTART),t+=this.formatProperty("SAMPLELENGTH",this.properties.SAMPLELENGTH)),t+=this.timingData.serialize(e);for(const i in this.other_properties)i=="VERSION"||i=="NITGVERSION"||(t+=this.formatProperty(i,this.other_properties[i]));t+=` -`;for(const i in this.charts)for(const s of this.charts[i])t+=s.serialize(e)+` -`;for(const i of this.unloadedCharts)if(typeof i=="string")t+="#NOTES:"+i+` -`;else{t+="//---------------"+i.STEPSTYPE+" - "+i.DESCRIPTION+`--------------- -`,t+=`#NOTEDATA:; -`,t+=`#CHARTNAME:${i.CHARTNAME}; -`,t+=`#CHARTSTYLE:${i.CHARTSTYLE}; -`,t+=`#CREDIT:${i.CREDIT}; -`,i.MUSIC&&(t+=`#MUSIC:${i.MUSIC}; -`),t+=`#STEPSTYPE:${i.STEPSTYPE}; -`,t+=`#DESCRIPTION:${i.DESCRIPTION}; -`,t+=`#DIFFICULTY:${i.DIFFICULTY}; -`,t+=`#METER:${i.METER}; -`,t+=`#METERF:${i.METERF??i.METER}; -`,t+=`#RADARVALUES:${i.RADARVALUES}; -`,t+="#NOTES:";for(const s in i)["NOTEDATA","CHARTNAME","CHARTSTYLE","CREDIT","MUSIC","STEPSTYPE","DESCRIPTION","DIFFICULTY","METER","METERF","RADARVALUES"].includes(s)||(t+=`#${s}:${i[s]}; - -`)}return t}usesChartTiming(){for(const e in this.charts)for(const t of this.charts[e])if(t.timingData.usesChartTiming())return!0;return!1}requiresSSC(){if(this.timingData.requiresSSC()||this.usesChartTiming())return!0;for(const e in this.charts)for(const t of this.charts[e])if(t.requiresSSC())return!0;return!1}formatProperty(e,t){return t||="","#"+e.toUpperCase()+":"+t+`; -`}}const xS=`#TITLE:New Song; -#SUBTITLE:; -#ARTIST:; -#TITLETRANSLIT:; -#SUBTITLETRANSLIT:; -#ARTISTTRANSLIT:; -#GENRE:; -#CREDIT:; -#BANNER:; -#BACKGROUND:; -#LYRICSPATH:; -#CDTITLE:; -#MUSIC:; -#OFFSET:0; -#SAMPLESTART:0.000000; -#SAMPLELENGTH:10.000000; -#SELECTABLE:YES; -#BPMS:0.000000=120.000000; -#STOPS:; -#BGCHANGES:; -#FGCHANGES:; -#KEYSOUNDS:; -#ATTACKS:; -`;class lt{view;input;onChange;min=-Number.MAX_VALUE;max=Number.MAX_VALUE;precision;step=1;lastVal="";constructor(e,t,i,s,n,a){this.view=e,this.view.classList.add("spinner"),this.view.onfocus=()=>{o.focus()};const o=document.createElement("input");o.classList.add("spinner-input"),o.type="text",o.autocomplete="off",o.spellcheck=!1,o.onblur=()=>{if(o.value===this.lastVal)return;if(o.value===""){this.onChange?.(void 0);return}const h=pa(o.value);if(h===null){o.value=this.lastVal;return}let d=ae(h,this.precision??3);d=Le(d,this.min,this.max),o.value=this.formatValue(d),this.onChange?.(d)},o.onkeydown=h=>{h.key=="Enter"&&o.blur(),h.key=="Escape"&&(o.value=this.lastVal,o.blur())},o.onfocus=()=>{this.lastVal=o.value},this.input=o,this.min=n??this.min,this.max=a??this.max,this.step=i,this.precision=s,this.setValue(t),e.appendChild(o);const l=document.createElement("div");l.classList.add("spinner-btns"),e.appendChild(l);const c=document.createElement("button");c.classList.add("spinner-up"),c.appendChild(Se.getIcon("CHEVRON",10)),c.tabIndex=-1,c.onclick=h=>{let d=i??_.general.spinnerStep;h.getModifierState("Shift")&&(d/=10),!(a!==void 0&&parseFloat(o.value)+d>a)&&(o.value=this.formatValue(parseFloat(o.value)+d),this.onChange?.(parseFloat(o.value)))},l.appendChild(c);const u=document.createElement("button");u.classList.add("spinner-down"),u.appendChild(Se.getIcon("CHEVRON",10)),u.tabIndex=-1,u.onclick=h=>{let d=i??_.general.spinnerStep;h.getModifierState("Shift")&&(d/=10),!(n!==void 0&&parseFloat(o.value)-dr.chartManager.loadAudio()}},{title:"Background Image",propName:"BACKGROUND",input:{type:"file",typeName:"image",accept:os}},{title:"Banner Image",propName:"BANNER",input:{type:"file",typeName:"image",accept:os}},{title:"CD Title",propName:"CDTITLE",input:{type:"file",typeName:"image",accept:os}},{title:"CD Image",propName:"CDIMAGE",input:{type:"file",typeName:"image",accept:os}},{title:"Jacket",propName:"JACKET",input:{type:"file",typeName:"image",accept:os}},{title:"Disc Image",propName:"DISCIMAGE",input:{type:"file",typeName:"image",accept:os}}]},{title:"Song",items:[{title:"Song Preview",propName:"SAMPLESTART",input:{type:"custom",create:(r,e,t)=>{const i=t??gt.instance,s=()=>{a.value{(e??p.chartManager.loadedSM).properties.SAMPLESTART=h,(e??p.chartManager.loadedSM).properties.SAMPLELENGTH=d,n.setValue(parseFloat(h)),a.setValue(parseFloat(h)+parseFloat(d))},undo:()=>{(e??r.chartManager.loadedSM).properties.SAMPLESTART=c,(e??r.chartManager.loadedSM).properties.SAMPLELENGTH=u,n.setValue(parseFloat(c)),a.setValue(parseFloat(c)+parseFloat(u))}})},n=lt.create(parseFloat((e??r.chartManager.loadedSM).properties.SAMPLESTART??"0"),void 0,3,0);n.onChange=c=>{if(c===void 0){n.setValue(parseFloat((e??r.chartManager.loadedSM).properties.SAMPLESTART??"0"));return}s()};const a=lt.create(parseFloat((e??r.chartManager.loadedSM).properties.SAMPLESTART??"0")+parseFloat((e??r.chartManager.loadedSM).properties.SAMPLELENGTH??"10"),void 0,3,0);a.onChange=c=>{if(c===void 0){a.setValue(parseFloat((e??r.chartManager.loadedSM).properties.SAMPLESTART??"0")+parseFloat((e??r.chartManager.loadedSM).properties.SAMPLELENGTH??"10"));return}s()};const o=document.createElement("div"),l=document.createElement("div");return l.innerText="to",o.classList.add("flex-row","flex-column-gap"),o.replaceChildren(n.view,l,a.view),o}}}]}];function vy(r,e,t,i){const s=i??gt.instance;switch(e.input.type){case"custom":return e.input.create(r,t,i);case"string":{const n=document.createElement("input");return n.type="text",n.autocomplete="off",n.spellcheck=!1,n.onkeydown=a=>{a.key=="Enter"&&n.blur()},n.onblur=()=>{const a=(t??r.chartManager.loadedSM).properties[e.propName],o=n.value;s.run({action:l=>{(t??l.chartManager.loadedSM).properties[e.propName]=o,n.value=o},undo:()=>{(t??r.chartManager.loadedSM).properties[e.propName]=a,n.value=a??""}})},n.value=(t??r.chartManager.loadedSM).properties[e.propName]??"",n}case"number":{const n=e.input,a=lt.create(parseFloat((t??r.chartManager.loadedSM).properties[e.propName])??15,n.step,n.precision,n.min,n.max);return a.onChange=o=>{if(o===void 0){a.setValue(parseFloat((t??r.chartManager.loadedSM).properties[e.propName]??"0"));return}const l=(t??r.chartManager.loadedSM).properties[e.propName],c=o.toString();s.run({action:u=>{(t??u.chartManager.loadedSM).properties[e.propName]=c,a.setValue(parseFloat(c))},undo:()=>{(t??r.chartManager.loadedSM).properties[e.propName]=l,a.setValue(parseFloat(l??"0"))}})},a.view}case"file":{const n=e.input,a=e.input.onChange,o=document.createElement("div");o.classList.add("flex-row","flex-column-gap");const l=document.createElement("input");l.type="text",l.autocomplete="off",l.spellcheck=!1,l.placeholder="click to select a file",l.onclick=h=>{h.preventDefault(),l.blur();const d=Ot(r.chartManager.smPath);if(window.nw){const p=document.createElement("input");p.type="file",p.accept=n.accept.join(","),p.onchange=()=>{const f=Ue.getRelativePath(d,p.value),m=(t??r.chartManager.loadedSM).properties[e.propName]??"";s.run({action:g=>{(t??g.chartManager.loadedSM).properties[e.propName]=f,l.value=f},undo:()=>{(t??r.chartManager.loadedSM).properties[e.propName]=m,l.value=m}}),a?.(r)},p.click()}else r.windowManager.openWindow(new Pd(r,{title:`Select a${n.typeName.match(/^[aieouAIEOU].*/)?"n":""} ${n.typeName} file...`,accepted_file_types:n.accept,disableClose:!0,callback:p=>{const f=Ue.getRelativePath(d,p),m=(t??r.chartManager.loadedSM).properties[e.propName]??"";s.run({action:g=>{(t??g.chartManager.loadedSM).properties[e.propName]=f,l.value=f},undo:()=>{(t??r.chartManager.loadedSM).properties[e.propName]=m,l.value=m}}),a?.(r)}},(t??r.chartManager.loadedSM).properties[e.propName]?d+"/"+(t??r.chartManager.loadedSM).properties[e.propName]:r.chartManager.smPath))},l.value=(t??r.chartManager.loadedSM).properties[e.propName]??"",o.appendChild(l);const c=document.createElement("button");c.style.height="100%",c.classList.add("delete"),c.disabled=!(t??r.chartManager.loadedSM).properties[e.propName],c.onclick=()=>{l.value="",c.disabled=!0};const u=Se.getIcon("TRASH",12);return c.appendChild(u),o.appendChild(c),o}}}class by extends St{app;sm;actionHistory;fileTable={};constructor(e){super({title:"New Song",width:450,height:492,disableClose:!0,win_id:"sm_properties",blocking:!0});const t=new Blob([xS],{type:"text/plain"}),i=new File([t],"song.sm",{type:"text/plain"});this.sm=new gy(i),this.app=e,this.actionHistory=new gt(this.app),this.initView()}initView(){this.viewElement.replaceChildren(),this.viewElement.classList.add("sm-properties");const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("label"),t.innerText="Apply to",yy.forEach(l=>{const c=document.createElement("div");c.classList.add("sm-container");const u=document.createElement("div");u.classList.add("sm-title"),u.innerText=l.title;const h=document.createElement("div");h.classList.add("property-grid"),l.items.forEach(d=>{const p=document.createElement("div");p.classList.add("label"),p.innerText=d.title,h.appendChild(p),d.input.type=="file"?h.appendChild(this.createFileElement(d.propName,d.input.typeName)):h.appendChild(vy(this.app,d,this.sm,this.actionHistory))}),c.appendChild(u),c.appendChild(h),e.appendChild(c)});const i=document.createElement("div");i.classList.add("menu-options");const s=document.createElement("div");s.classList.add("menu-left");const n=document.createElement("div");n.classList.add("menu-right"),i.appendChild(s),i.appendChild(n);const a=document.createElement("button");a.innerText="Cancel",a.onclick=()=>{this.closeWindow()};const o=document.createElement("button");o.innerText="Create",o.classList.add("confirm"),o.onclick=()=>{this.sm.properties.MUSIC===void 0||this.sm.properties.MUSIC===""?this.app.windowManager.openWindow(new Al(this.app,"No audio file uploaded","Are you sure you want to create a file with no audio?",[{type:"confirm",label:"Yes",callback:()=>{this.createSong(),this.closeWindow()}},{type:"default",label:"No"}])):(this.createSong(),this.closeWindow())},s.appendChild(a),n.appendChild(o),e.appendChild(i),this.viewElement.appendChild(e)}async createSong(){let e=this.sm.properties.TITLE;if(window.nw){const t=nw.require("path"),i=document.createElement("input");i.type="file",i.nwsaveas=e+".sm",i.onchange=async()=>{const s=t.basename(i.value,t.extname(i.value));e=t.dirname(i.value);const n=t.join(e,s+".sm");await Ue.writeFile(n,this.sm.serialize("sm")),await Promise.all(Object.entries(this.fileTable).map(a=>Ue.writeFile(e+`/${a[0]}`,a[1]))),await this.app.chartManager.loadSM(n),this.app.windowManager?.getWindowById("select_sm_initial")?.closeWindow()},i.click()}else{if(await Ue.getDirectoryHandle(e)){let t=2;for(;await Ue.getDirectoryHandle(e);)e=`${this.sm.properties.TITLE} ${t++}`}await Ue.writeFile(e+"/song.sm",this.sm.serialize("sm")),await Promise.all(Object.entries(this.fileTable).map(t=>Ue.writeFile(e+`/${t[0]}`,t[1]))),await this.app.chartManager.loadSM(e+"/song.sm"),this.app.windowManager?.getWindowById("select_sm_initial")?.closeWindow()}}createFileElement(e,t){const i=document.createElement("div");i.classList.add("flex-row","flex-column-gap");const s=document.createElement("input");s.type="text",s.autocomplete="off",s.spellcheck=!1,s.placeholder="click to upload a file",s.style.color="white",s.readOnly=!0,s.onclick=o=>{o.preventDefault(),s.blur();const l=document.createElement("input");l.type="file",l.accept=t=="audio"?"audio/*":"image/*",l.onchange=()=>{const c=l.files?.[0];if(!c)return;this.sm.properties[e]&&this.fileTable[this.sm.properties[e]]&&delete this.fileTable[this.sm.properties[e]];let u=c.name;for(;this.fileTable[c.name]&&(this.fileTable[c.name].size!=c.size||this.fileTable[c.name].type!=c.type);)u="_"+u;this.fileTable[u]=c,s.value=u,this.sm.properties[e]=s.value,n.disabled=!1},l.click()},s.value=this.sm.properties[e]??"",i.appendChild(s);const n=document.createElement("button");n.style.height="100%",n.classList.add("delete"),n.disabled=!0,n.onclick=()=>{this.sm.properties[e]&&this.fileTable[this.sm.properties[e]]&&delete this.fileTable[this.sm.properties[e]],this.sm.properties[e]=void 0,s.value="",n.disabled=!0};const a=Se.getIcon("TRASH",12);return n.appendChild(a),i.appendChild(n),i}}class wy extends St{app;keyHandler;constructor(e,t=!0){super({title:"Open a Song",width:400,height:320,disableClose:t,win_id:"select_sm_initial"}),this.app=e,this.keyHandler=this.handleKeyEvent.bind(this),window.addEventListener("keydown",this.keyHandler),this.initView(),K.on("resize",()=>{this.move(window.innerWidth/2-this.options.width/2,window.innerHeight/2-this.options.height/2)})}onClose(){window.removeEventListener("keydown",this.keyHandler)}initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("open-container"),e.appendChild(t);const i=document.createElement("div");i.classList.add("top-container");const s=document.createElement("div");s.classList.add("separator"),s.style.margin="10px";const n=document.createElement("div");n.classList.add("bottom-container"),t.appendChild(i),t.appendChild(s),t.appendChild(n);const a=document.createElement("button");a.style.display="flex",a.style.flexDirection="column",a.style.padding="10px",a.style.backgroundColor="#414352",a.style.color="white",i.appendChild(a);const o=Se.getIcon("UPLOAD",30);a.appendChild(o);const l=document.createElement("div");l.innerText=window.nw?"Open an existing song":"Import a song folder",a.appendChild(l),a.onclick=()=>{if(window.nw){const f=document.createElement("input");f.type="file",f.accept=".sm,.ssc",f.onchange=()=>{this.app.chartManager.loadSM(f.value),this.closeWindow()},f.click()}else this.app.windowManager.openWindow(new Pd(this.app,{title:"Select an sm/ssc file...",accepted_file_types:[".sm",".ssc"],disableClose:!0,callback:f=>{this.app.chartManager.loadSM(f),this.closeWindow()}}))};const c=document.createElement("button");c.style.display="flex",c.style.flexDirection="column",c.style.padding="10px",c.style.backgroundColor="#506352",c.style.color="white",i.appendChild(c);const u=Se.getIcon("PLUS",30);c.appendChild(u);const h=document.createElement("div");h.innerText="New Song",c.appendChild(h),c.onclick=()=>{this.app.windowManager.openWindow(new by(this.app))};const d=document.createElement("div");d.innerText="Recently Opened",d.classList.add("title"),n.appendChild(d);const p=document.createElement("div");p.classList.add("recent-selector"),n.appendChild(p),fy.getRecents().then(f=>f.forEach(m=>{const g=document.createElement("div");g.classList.add("recent-item");const y=document.createElement("div");y.classList.add("recent-name"),y.innerText=m.name;const w=document.createElement("div");w.classList.add("recent-path"),w.innerText=m.path,g.appendChild(y),g.appendChild(w),g.onclick=()=>{p.querySelectorAll(".selected").forEach(b=>b.classList.remove("selected")),g.classList.add("selected")},g.ondblclick=()=>{this.app.chartManager.loadSM(m.path),this.closeWindow()},p.appendChild(g)})),this.viewElement.appendChild(e)}handleKeyEvent(e){if(!this.windowElement.classList.contains("focused"))return;const t=this.viewElement.querySelector(".selected");if(t){if(e.code=="ArrowUp"){e.preventDefault(),e.stopImmediatePropagation();const i=t.previousElementSibling;i&&(t.parentElement.querySelectorAll(".selected").forEach(s=>s.classList.remove("selected")),i.classList.add("selected"),sa(i,{scrollMode:"if-needed",block:"nearest",inline:"nearest"}))}if(e.code=="ArrowDown"){e.preventDefault(),e.stopImmediatePropagation();const i=t.nextElementSibling;i&&(t.parentElement.querySelectorAll(".selected").forEach(s=>s.classList.remove("selected")),i.classList.add("selected"),sa(i,{scrollMode:"if-needed",block:"nearest",inline:"nearest"}))}}}}function cM(){const r=new URLSearchParams(location.search),e=r.get("flags");if(e!=null){const n=new Set(e.split("").map(a=>AS[a]).filter(a=>a));for(const a of n.values())Ie[a]=!Ie[a]}const t=r.get("url");if(t!=null)try{Ie.url=new URL(t).toString()}catch{Ee.createFormatted("Invalid url "+t,"warn"),Ie.url=null}const i=r.get("chartIndex");if(i!=null)try{Ie.chartIndex=parseInt(i)}catch{Ee.createFormatted("Invalid chartIndex "+i,"warn"),Ie.chartIndex=null}const s=r.get("chartType");s!==null&&(ze.getGameType(s)?Ie.chartType=s:(Ee.createFormatted("Invalid chartType "+s,"warn"),Ie.chartType=null))}const TS={viewMode:{char:"V",name:"Force view mode (disables record mode)"},menuBar:{char:"M",name:"Hide menu bar"},playbackOptions:{char:"o",name:"Hide playback options"},barlines:{char:"B",name:"Hide barlines, waveform, and timing boxes"},assist:{char:"A",name:"Disable assist sounds"},recordMode:{char:"R",name:"Disable record mode"},playMode:{char:"P",name:"Disable play mode"},layout:{char:"L",name:"Hide note layout"},status:{char:"S",name:"Hide status bar"},autoPlay:{char:"a",name:"Play automatically"},openWindows:{char:"O",name:"Disable opening windows"},hidePoweredByText:{char:"H",name:'Hide "Powered by SMEditor" text'}},AS=Object.fromEntries(Object.entries(TS).map(([r,e])=>[e.char,r])),Ie={viewMode:!1,menuBar:!0,playbackOptions:!0,barlines:!0,assist:!0,recordMode:!0,playMode:!0,layout:!0,status:!0,autoPlay:!1,hidePoweredByText:!1,openWindows:!0,url:null,chartIndex:null,chartType:null},Xn={file:{type:"menu",title:"File",options:[{type:"selection",id:"newSong"},{type:"selection",id:"openSong"},{type:"separator"},{type:"selection",id:"save"},{type:"selection",id:"export"}]},edit:{type:"menu",title:"Edit",options:[{type:"selection",id:"cut"},{type:"selection",id:"copy"},{type:"selection",id:"paste"},{type:"selection",id:"pasteReplace"},{type:"separator"},{type:"selection",id:"undo"},{type:"selection",id:"redo"},{type:"separator"},{type:"checkbox",id:"mousePlacement",checked:()=>_.chart.mousePlacement}]},view:{type:"menu",title:"View",options:[{type:"dropdown",title:"Cursor",options:[{type:"selection",id:"cursorUp"},{type:"selection",id:"cursorDown"},{type:"separator"},{type:"selection",id:"previousNote"},{type:"selection",id:"nextNote"},{type:"separator"},{type:"selection",id:"previousMeasure"},{type:"selection",id:"nextMeasure"},{type:"separator"},{type:"selection",id:"jumpChartStart"},{type:"selection",id:"jumpChartEnd"},{type:"separator"},{type:"selection",id:"jumpSongStart"},{type:"selection",id:"jumpSongEnd"}]},{type:"dropdown",title:"Snap",options:[{type:"selection",id:"decreaseSnap"},{type:"selection",id:"increaseSnap"}]},{type:"dropdown",title:"Scroll",options:[{type:"checkbox",id:"XMod",checked:()=>!_.chart.CMod},{type:"checkbox",id:"CMod",checked:()=>_.chart.CMod},{type:"separator"},{type:"selection",id:"increaseScrollSpeed"},{type:"selection",id:"decreaseScrollSpeed"}]},{type:"dropdown",title:"Zoom",options:[{type:"selection",id:"zoomIn"},{type:"selection",id:"zoomOut"},{type:"separator"},{type:"selection",id:"zoomDefault"}]},{type:"separator"},{type:"selection",id:"playMode"},{type:"selection",id:"playModeStart"},{type:"separator"},{type:"selection",id:"recordMode"},{type:"selection",id:"recordModeStart"},{type:"separator"},{type:"checkbox",id:"reverse",checked:()=>_.chart.reverse},{type:"checkbox",id:"hideWarpedArrows",checked:()=>_.chart.hideWarpedArrows},{type:"checkbox",id:"hideFakedArrows",checked:()=>_.chart.hideFakedArrows},{type:"checkbox",id:"doSpeedChanges",checked:()=>_.chart.doSpeedChanges}]},chart:{type:"menu",title:"Chart",options:[{type:"selection",id:"openChart"},{type:"separator"},{type:"selection",id:"previousChart"},{type:"selection",id:"nextChart"},{type:"separator"},{type:"selection",id:"songProperties"},{type:"separator"},{type:"selection",id:"timingDataRow"}]},selection:{type:"menu",title:"Selection",options:[{type:"dropdown",title:"Convert",options:[{type:"selection",id:"convertHoldsRolls"},{type:"selection",id:"convertRollsHolds"},{type:"selection",id:"swapHoldsRolls"},{type:"separator"},{type:"selection",id:"convertHoldsTaps"},{type:"selection",id:"convertTapsMines"},{type:"selection",id:"convertTapsLifts"},{type:"selection",id:"convertTapsFakes"}]},{type:"dropdown",title:"Mirror",options:[{type:"selection",id:"mirrorHorizontally"},{type:"selection",id:"mirrorVertically"},{type:"selection",id:"mirrorBoth"}]},{type:"dropdown",title:"Stretch",options:[{type:"selection",id:"expand2to1"},{type:"selection",id:"expand3to2"},{type:"selection",id:"expand4to3"},{type:"separator"},{type:"selection",id:"compress1to2"},{type:"selection",id:"compress2to3"},{type:"selection",id:"compress3to4"}]},{type:"dropdown",title:"Shift",options:[{type:"dropdown",title:"Up",options:[{type:"selection",id:"shiftUp4m"},{type:"selection",id:"shiftUp2m"},{type:"selection",id:"shiftUp1m"},{type:"selection",id:"shiftUp4th"},{type:"selection",id:"shiftUp8th"},{type:"selection",id:"shiftUp12th"},{type:"selection",id:"shiftUp16th"},{type:"selection",id:"shiftUp24th"},{type:"selection",id:"shiftUp32nd"},{type:"selection",id:"shiftUp48th"},{type:"selection",id:"shiftUp64th"},{type:"selection",id:"shiftUp96th"},{type:"selection",id:"shiftUp192nd"}]},{type:"dropdown",title:"Down",options:[{type:"selection",id:"shiftDown4m"},{type:"selection",id:"shiftDown2m"},{type:"selection",id:"shiftDown1m"},{type:"selection",id:"shiftDown4th"},{type:"selection",id:"shiftDown8th"},{type:"selection",id:"shiftDown12th"},{type:"selection",id:"shiftDown16th"},{type:"selection",id:"shiftDown24th"},{type:"selection",id:"shiftDown32nd"},{type:"selection",id:"shiftDown48th"},{type:"selection",id:"shiftDown64th"},{type:"selection",id:"shiftDown96th"},{type:"selection",id:"shiftDown192nd"}]}]},{type:"dropdown",title:"Quantize",options:[{type:"selection",id:"quantize4th"},{type:"selection",id:"quantize8th"},{type:"selection",id:"quantize12th"},{type:"selection",id:"quantize16th"},{type:"selection",id:"quantize24th"},{type:"selection",id:"quantize32nd"},{type:"selection",id:"quantize48th"},{type:"selection",id:"quantize64th"},{type:"selection",id:"quantize96th"}]},{type:"separator"},{type:"selection",id:"setSongPreview"},{type:"separator"},{type:"selection",id:"exportNotedata"},{type:"separator"},{type:"selection",id:"selectBeforeCursor"},{type:"selection",id:"selectAfterCursor"},{type:"selection",id:"selectAll"}]},audio:{type:"menu",title:"Audio",options:[{type:"selection",id:"detectSync"},{type:"separator"},{type:"checkbox",id:"assistTick",checked:()=>_.audio.assistTick&&Ie.assist},{type:"checkbox",id:"metronome",checked:()=>_.audio.metronome&&Ie.assist},{type:"separator"},{type:"dropdown",title:()=>"Master Volume ("+Math.round(_.audio.masterVolume*100)+"%)",options:[{type:"selection",id:"volumeUp"},{type:"selection",id:"volumeDown"}]},{type:"dropdown",title:()=>"Song Volume ("+Math.round(_.audio.songVolume*100)+"%)",options:[{type:"selection",id:"songVolumeUp"},{type:"selection",id:"songVolumeDown"}]},{type:"dropdown",title:()=>"Effect Volume ("+Math.round(_.audio.soundEffectVolume*100)+"%)",options:[{type:"selection",id:"effectvolumeUp"},{type:"selection",id:"effectvolumeDown"}]},{type:"dropdown",title:()=>"Playback rate ("+Math.round(_.audio.rate*100)+"%)",options:[{type:"selection",id:"rateUp"},{type:"selection",id:"rateDown"},{type:"separator"},{type:"selection",id:"rateDefault"}]},{type:"separator"},{type:"selection",id:"showEq"}]},preferences:{type:"menu",title:"Preferences",options:[{type:"selection",id:"options"},{type:"selection",id:"themes"},{type:"selection",id:"keybinds"},{type:"selection",id:"gameplayKeybinds"},{type:"selection",id:"noteskinWindow"}]},help:{type:"menu",title:"Help",options:[{type:"selection",id:"openGuide"}]}},uf=["cut","copy","paste","pasteReplace"],pf={edit:[{ids:["delete"],after:"redo"},{ids:["previousNoteType","nextNoteType","noteTypeTap","noteTypeMine","noteTypeFake","noteTypeLift","quant4","quant8","quant12","quant16","quant24","quant32","quant48","quant64","quant96","quant192"],after:"mousePlacement"}],view:[{ids:["playback","selectRegion"]}],debug:[{ids:["showFPSCounter","showDebugTimers"]}]};class Hi extends St{static GROUPS;app;observer;searchDropdown;conflictMap=this.calculateConflicts();constructor(e){super({title:"Keybind Options",width:600,height:400,disableClose:!1,win_id:"keybind_options",blocking:!1}),this.app=e,Hi.GROUPS||(Hi.GROUPS=Hi.createGroups()),this.initView()}initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("pref-container");const i=document.createElement("div");i.classList.add("pref-search");const s=document.createElement("input");s.classList.add("pref-search-bar"),s.type="text",s.placeholder="Search for a keybind...",s.oninput=()=>{o.replaceChildren(...this.createSections(s.value)),l.replaceChildren(...this.createOptions(s.value))};const n=gi.create(["Name","Key"],"Name");n.onChange(()=>{o.replaceChildren(...this.createSections(s.value)),l.replaceChildren(...this.createOptions(s.value))}),this.searchDropdown=n,i.replaceChildren(s,n.view);const a=document.createElement("div");a.classList.add("pref-scrollers");const o=document.createElement("div");o.classList.add("pref-section-scroller");const l=document.createElement("div");l.classList.add("pref-option-scroller"),a.replaceChildren(o,l),this.observer=new IntersectionObserver(c=>{c.forEach(u=>{const h=u.target.dataset.id,d=o.querySelector(`.pref-section[data-id=${h}]`);d&&(u.intersectionRatio>0?d.classList.add("selected"):d.classList.remove("selected"))})},{}),t.replaceChildren(i,a),o.replaceChildren(...this.createSections()),l.replaceChildren(...this.createOptions()),e.appendChild(t),this.viewElement.appendChild(e)}createSections(e=""){return Object.keys(Hi.GROUPS).filter(t=>Hi.GROUPS[t].some(i=>this.filterID(e,i))).map(t=>this.createEmptySection(Xn[t]?.title??Hc(t),t))}createOptions(e=""){return Object.keys(Hi.GROUPS).filter(t=>Hi.GROUPS[t].some(i=>this.filterID(e,i))).map(t=>{const i=Hi.GROUPS[t].filter(a=>this.filterID(e,a)).map(a=>this.createKeybindItem(a)),s=document.createElement("div");s.classList.add("pref-group"),s.dataset.id=t;const n=document.createElement("div");return n.classList.add("pref-group-label"),n.innerText=Xn[t]?.title??Hc(t),s.replaceChildren(n,...i),this.observer.observe(s),s})}static createGroups(){const e=Object.keys(nt),t={};return Object.keys(Xn).forEach(i=>{t[i]=this.expandMenubarOptions(Xn[i]).map(s=>{const n=e.indexOf(s);return n!=-1&&e.splice(n,1),s}).filter(s=>!uf.includes(s))}),Object.keys(pf).forEach(i=>{t[i]===void 0&&(t[i]=[]),pf[i].forEach(s=>{let n=0;if(s.after){const a=t[i].findIndex(o=>s.after==o)+1;a!=0&&(n=a)}t[i].splice(n,0,...s.ids),s.ids.forEach(a=>{const o=e.indexOf(a);o!=-1&&e.splice(o,1)})})}),uf.forEach(i=>{const s=e.indexOf(i);s!=-1&&e.splice(s,1)}),e.length>0&&(console.warn("Missing keybinds not shown:"),console.warn(e)),t}filterID(e,t){if((this.searchDropdown?.value??"Name")=="Name")return(nt[t].bindLabel??nt[t].label).toLowerCase().includes(e.toLowerCase());{const i=De.getCombosForKeybind(t);if(i.some(n=>n.key.toLowerCase().includes(e.toLowerCase()))||i.some(n=>(Ty[n.key]??n.key).toLowerCase().includes(e.toLowerCase())))return!0;let s=e.split(" ").map(n=>n.toLowerCase());return i.some(n=>(s.includes("shift")||s.includes("⇧"))&&!n.mods.includes(Yn.SHIFT)||(s.includes("ctrl")||s.includes("control")||s.includes("⌃"))&&!n.mods.includes(Yn.CTRL)||(s.includes("meta")||s.includes("cmd")||s.includes("command")||s.includes("⌘"))&&!n.mods.includes(Yn.META)||(s.includes("alt")||s.includes("⌥"))&&!n.mods.includes(Yn.ALT)?!1:(s=s.filter(a=>!["shift","ctrl","control","meta","cmd","command","alt","⇧","⌃","⌘","⌥",""].includes(a)),s.length==0||s.length==1&&n.key.toLowerCase().includes(s[0])))}}static expandMenubarOptions(e){switch(e.type){case"menu":case"dropdown":return e.options.map(t=>this.expandMenubarOptions(t)).flat();case"selection":case"checkbox":return[e.id];case"separator":return[]}}createEmptySection(e,t){const i=document.createElement("div");return i.classList.add("pref-section"),i.dataset.id=t,i.innerText=e,i.onclick=()=>{i.parentElement.parentElement.querySelector(`.pref-group[data-id=${t}]`).scrollIntoView()},i}createKeybindItem(e){const t=document.createElement("div");t.classList.add("pref-keybind"),t.dataset.id=e,t.onclick=a=>{a.target.classList.contains("pref-keybind-combo")||t.querySelector(".icon")?.contains(a.target)||this.app.windowManager.openWindow(new py(this.app,!0,o=>{De.setKeybind(e,o),this.conflictMap=this.calculateConflicts(),t.replaceWith(this.createKeybindItem(e))},o=>{const l=this.conflictMap.get(De.getComboString(o))?.map(c=>c[0]).map(c=>nt[c].bindLabel??nt[c].label)??[];return l.includes(e)?"self":l}))};const i=document.createElement("div");i.classList.add("pref-keybind-label"),i.innerText=nt[e].bindLabel??nt[e].label;const s=Se.getIcon("REVERT");s.style.width="12px",s.addEventListener("click",()=>{De.revertKeybind(e),this.conflictMap=this.calculateConflicts(),t.replaceWith(this.createKeybindItem(e))}),s.style.display=De.checkIsDefault(e)?"none":"block";const n=document.createElement("div");return n.classList.add("pref-keybind-combos"),n.replaceChildren(...De.getCombosForKeybind(e).map(a=>{const o=document.createElement("button");return o.classList.add("pref-keybind-combo"),o.innerText=De.getComboString(a),this.conflictMap.get(De.getComboString(a)).length>1&&o.classList.add("conflict"),o.onclick=()=>{De.removeKeybind(e,a),this.conflictMap=this.calculateConflicts(),t.replaceWith(this.createKeybindItem(e))},o})),t.replaceChildren(i,s,n),t}calculateConflicts(){const e=new Map;Object.keys(nt).forEach(t=>{De.getCombosForKeybind(t).forEach((i,s)=>{const n=De.getComboString(i);e.has(n)||e.set(n,[]),e.get(n).push([t,s])})}),[...this.viewElement.querySelectorAll(".pref-keybind-combo.conflict")].forEach(t=>t.classList.remove("conflict"));for(const t of e.values())t.length!=1&&t.forEach(i=>{const s=this.viewElement.querySelector(`.pref-keybind[data-id=${i[0]}] .pref-keybind-combos`);s?.children[i[1]]&&s.children[i[1]].classList.add("conflict")});return e}onClose(){this.observer?.disconnect()}}class at{static noteskins=new Map;static register(e){for(const t of new Set(e.gameTypes))at.noteskins.has(t)||at.noteskins.set(t,new Map),at.noteskins.get(t).set(e.id,e)}static async getNoteskin(e,t){const i=this.noteskins.get(e.id);if(!i||i.size==0)return;const s=i.get(t)??[...i.values()][0];return i.get(t)||Ee.createFormatted(`Couldn't find the noteskin ${t}!`,"warn"),await s.load()}static getNoteskinData(e,t){const i=this.noteskins.get(e.id);return!i||i.size==0?void 0:i.get(t)??[...i.values()][0]}static getNoteskins(){return this.noteskins}static getPreviewUrl(e,t){return this.getNoteskinData(e,t).preview}}at.register({id:"default",gameTypes:["dance-single","dance-double","dance-couple","dance-solo","dance-solodouble","dance-threepanel","dance-threedouble"],load:async()=>(await Ke(()=>import("./Noteskin-ac1b249a.js"),["Noteskin-ac1b249a.js","HoldBody-34995142.js"])).default,preview:new URL("/smeditor/assets/preview-17ffcc02.png",self.location).href,title:"Scalable",subtitle:"Pete-Lawrence"});at.register({id:"cf-chrome",gameTypes:["dance-single","dance-double","dance-couple","dance-solo","dance-solodouble","dance-threepanel","dance-threedouble"],load:async()=>(await Ke(()=>import("./Noteskin-5c25a811.js"),["Noteskin-5c25a811.js","HoldBody-34995142.js"])).default,preview:new URL("/smeditor/assets/preview-40b76b28.png",self.location).href,title:"CF_CHROME",subtitle:"Pete-Lawrence"});at.register({id:"ddr-note",gameTypes:["dance-single","dance-double","dance-couple","dance-solo","dance-solodouble","dance-threepanel","dance-threedouble"],load:async()=>(await Ke(()=>import("./Noteskin-34b7a61f.js"),["Noteskin-34b7a61f.js","AnimatedSprite-d8850d0f.js","HoldBody-34995142.js"])).default,preview:new URL("/smeditor/assets/preview-b8f75a15.png",self.location).href,title:"DDR-Note",subtitle:"Pete-Lawrence"});at.register({id:"ddr-note-itg",gameTypes:["dance-single","dance-double","dance-couple","dance-solo","dance-solodouble","dance-threepanel","dance-threedouble"],load:async()=>(await Ke(()=>import("./Noteskin-1293521e.js"),["Noteskin-1293521e.js","AnimatedSprite-d8850d0f.js","HoldBody-34995142.js"])).default,preview:new URL("/smeditor/assets/preview-f113aacc.png",self.location).href,title:"DDR-Note (ITG quants)",subtitle:"Pete-Lawrence"});at.register({id:"ddr-rainbow",gameTypes:["dance-single","dance-double","dance-couple"],load:async()=>(await Ke(()=>import("./Noteskin-4d4bdabd.js"),["Noteskin-4d4bdabd.js","AnimatedSprite-d8850d0f.js","HoldBody-34995142.js"])).default,preview:new URL("/smeditor/assets/preview-0f9b00cd.png",self.location).href,title:"DDR-Rainbow",subtitle:"LemmaEOF"});at.register({id:"ddr-rainbow-itg",gameTypes:["dance-single","dance-double","dance-couple"],load:async()=>(await Ke(()=>import("./Noteskin-fe09add9.js"),["Noteskin-fe09add9.js","AnimatedSprite-d8850d0f.js","HoldBody-34995142.js"])).default,preview:new URL("/smeditor/assets/preview-2fd7d50c.png",self.location).href,title:"DDR-Rainbow (ITG quants)",subtitle:"LemmaEOF"});at.register({id:"metal",gameTypes:["dance-single","dance-double","dance-couple","dance-solo","dance-solodouble","dance-threepanel","dance-threedouble"],load:async()=>(await Ke(()=>import("./Noteskin-c26c25f8.js"),["Noteskin-c26c25f8.js","HoldBody-34995142.js"])).default,preview:new URL("/smeditor/assets/preview-26b1bdce.png",self.location).href,title:"Metal",subtitle:"Pete-Lawrence"});at.register({id:"pastel",gameTypes:["dance-single","dance-double","dance-couple","dance-solo","dance-solodouble","dance-threepanel","dance-threedouble"],load:async()=>(await Ke(()=>import("./Noteskin-e768ec16.js"),["Noteskin-e768ec16.js","AnimatedSprite-d8850d0f.js","HoldBody-34995142.js"])).default,preview:new URL("/smeditor/assets/preview-d67630f1.png",self.location).href,title:"Pastel",subtitle:"halcyoniix"});at.register({id:"dividebyzero",gameTypes:["dance-single","dance-double","dance-couple","dance-solo","dance-solodouble","dance-threepanel","dance-threedouble"],load:async()=>(await Ke(()=>import("./Noteskin-4f641a63.js"),["Noteskin-4f641a63.js","AnimatedSprite-d8850d0f.js","HoldBody-34995142.js"])).default,preview:new URL("/smeditor/assets/preview-d763e667.png",self.location).href,title:"DivideByZero",subtitle:"MinaciousGrace"});at.register({id:"subtractbyzero",gameTypes:["dance-single","dance-double","dance-couple","dance-solo","dance-solodouble","dance-threepanel","dance-threedouble"],load:async()=>(await Ke(()=>import("./Noteskin-da25c255.js"),["Noteskin-da25c255.js","AnimatedSprite-d8850d0f.js","HoldBody-34995142.js"])).default,preview:new URL("/smeditor/assets/preview-72ea0444.png",self.location).href,title:"SubtractByZero",subtitle:"qwertyzoro/Vague"});at.register({id:"sm4",gameTypes:["dance-single","dance-double","dance-couple","dance-solo","dance-solodouble","dance-threepanel","dance-threedouble"],load:async()=>(await Ke(()=>import("./Noteskin-eae11eee.js"),["Noteskin-eae11eee.js","AnimatedSprite-d8850d0f.js","HoldBody-34995142.js"])).default,preview:new URL("/smeditor/assets/preview-3514cbb3.png",self.location).href,title:"SM4",subtitle:"from SM4"});at.register({id:"sm4-bold",gameTypes:["dance-single","dance-double","dance-couple","dance-solo","dance-solodouble","dance-threepanel","dance-threedouble"],load:async()=>(await Ke(()=>import("./Noteskin-44837e02.js"),["Noteskin-44837e02.js","AnimatedSprite-d8850d0f.js","HoldBody-34995142.js"])).default,preview:new URL("/smeditor/assets/preview-9fe2bd96.png",self.location).href,title:"SM4 Bold",subtitle:"from SM4"});at.register({id:"starlight-vivid",gameTypes:["dance-single","dance-double","dance-couple"],load:async()=>(await Ke(()=>import("./Noteskin-bd72bca6.js"),["Noteskin-bd72bca6.js","AnimatedSprite-d8850d0f.js","HoldBody-34995142.js"])).default,preview:new URL("/smeditor/assets/preview-5ecfc22a.png",self.location).href,title:"SLNEXXT-vivid",subtitle:"from STARLiGHT-NEXXT"});at.register({id:"default",gameTypes:["pump-single","pump-double","pump-couple","pump-versus","pump-halfdouble"],load:async()=>(await Ke(()=>import("./Noteskin-bcd28e0b.js"),["Noteskin-bcd28e0b.js","AnimatedSprite-d8850d0f.js","HoldBody-34995142.js"])).default,preview:new URL("/smeditor/assets/preview-d6d59d37.png",self.location).href,title:"Fiesta"});at.register({id:"fourv2",gameTypes:["pump-single","pump-double","pump-couple","pump-versus","pump-halfdouble"],load:async()=>(await Ke(()=>import("./Noteskin-5217c0b2.js"),["Noteskin-5217c0b2.js","AnimatedSprite-d8850d0f.js","HoldBody-34995142.js"])).default,preview:new URL("/smeditor/assets/preview-5d9781d2.png",self.location).href,title:"FourV2",subtitle:"Jousway"});at.register({id:"prime",gameTypes:["pump-single","pump-double","pump-couple","pump-versus","pump-halfdouble"],load:async()=>(await Ke(()=>import("./Noteskin-f28d005e.js"),["Noteskin-f28d005e.js","AnimatedSprite-d8850d0f.js","HoldBody-34995142.js"])).default,preview:new URL("/smeditor/assets/preview-4f79831b.png",self.location).href,title:"Prime"});const ES="/smeditor/assets/preview-747db171.png";class SS extends St{app;grid;lastGameType=null;constructor(e){super({title:"Noteskin Selection",width:600,height:400,disableClose:!1,win_id:"noteskin-selection",blocking:!1}),this.app=e,this.initView(),this.loadGrid(),K.on("chartLoaded",()=>{const t=e.chartManager.loadedChart.gameType.id;this.lastGameType!=t&&this.loadGrid()})}initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("input");t.classList.add("pref-search-bar"),t.type="text",t.placeholder="Search for a noteskin...",t.oninput=()=>{this.filterGrid(t.value)};const i=document.createElement("div");i.classList.add("noteskin-grid"),this.grid=i,e.replaceChildren(t,i),this.viewElement.appendChild(e)}loadGrid(){if(this.grid.replaceChildren(),!this.app.chartManager.loadedChart)return;const e=this.app.chartManager.loadedChart.gameType;this.lastGameType=e.id;const t=at.getNoteskins().get(e.id);if(t)for(const[i,s]of t.entries()){const n=document.createElement("div"),a=document.createElement("img"),o=document.createElement("div"),l=document.createElement("div"),c=document.createElement("div");n.classList.add("noteskin-cell"),o.classList.add("noteskin-label"),l.classList.add("noteskin-title"),c.classList.add("noteskin-subtitle"),l.innerText=s.title??i,c.innerText=s.subtitle??"",a.src=at.getPreviewUrl(e,i),a.onerror=()=>{a.src=ES},n.replaceChildren(a,o),o.replaceChildren(l,c),this.grid.appendChild(n),i==_.chart.noteskin.name&&(n.classList.add("selected"),setTimeout(()=>{n.scrollIntoView({behavior:_.general.smoothAnimations?"smooth":"instant",block:"center"})})),n.dataset.id=i,n.dataset.title=s.title??"",n.dataset.subtitle=s.subtitle??"",n.onclick=()=>{_.chart.noteskin.name!=i&&(this.app.chartManager.chartView?.swapNoteskin(i),this.removeAllSelections(),n.classList.add("selected"))}}}removeAllSelections(){[...this.grid.querySelectorAll(".selected")].forEach(e=>e.classList.remove("selected"))}filterGrid(e){[...this.grid.children].forEach(t=>{if(!(t instanceof HTMLDivElement))return;const i=t,s=this.containsQuery(e,i.dataset.id)||this.containsQuery(e,i.dataset.title)||this.containsQuery(e,i.dataset.subtitle);i.style.display=s?"":"none"})}containsQuery(e,t){return t?t.toLowerCase().includes(e.trim().toLowerCase()):!1}}class CS extends St{app;metronomeInterval;startTime;me_high=new Ko.Howl({src:Wg,volume:_.audio.soundEffectVolume});me_low=new Ko.Howl({src:zg,volume:_.audio.soundEffectVolume});tickLines=[];resultLines=[];previousOffsets=[];keyHandler;constructor(e){super({title:"Offset Adjuster",width:300,height:200,win_id:"offset",blocking:!0}),this.app=e,this.initView(),this.startTime=performance.now();let t=this.startTime+500;this.tickLines.push({time:t+500,beat:0}),this.tickLines.push({time:t+500*2,beat:1}),this.tickLines.push({time:t+500*3,beat:2}),this.tickLines.push({time:t+500*4,beat:3});let i=0;this.metronomeInterval=setInterval(()=>{const s=performance.now();if(s-t>500){for(t=s,(i%4==0?this.me_high:this.me_low).play();this.tickLines[0]?.time+1e3s-n.startTime<8e3)},5),this.keyHandler=s=>{if(s.code.startsWith("Digit")||s.code.startsWith("Key")||s.code=="Space"){let n=this.tickLines[0];const a=performance.now();for(const l of this.tickLines)if(a-l.time+_.play.offset*1e3<300){n=l;break}s.preventDefault();const o=a-n.time+_.play.offset*1e3;o>-300&&(this.tickLines.splice(this.tickLines.indexOf(n),1),this.resultLines.push({startTime:performance.now(),offset:o}),this.previousOffsets.push(o),this.previousOffsets.length==16&&(Qg(this.previousOffsets)<70&&(_.play.offset-=Tl(this.previousOffsets)/1e3),this.previousOffsets=[]))}},window.addEventListener("keydown",this.keyHandler)}initView(){this.viewElement.replaceChildren();const e=document.createElement("canvas");this.viewElement.appendChild(e);const t=this.drawEQ(e);requestAnimationFrame(t)}drawEQ(e){const t=e.getContext("2d");t.canvas.width=250,t.canvas.height=100;const i=()=>{t.fillStyle="rgba(0, 0, 0, 1)",t.fillRect(0,0,e.width,e.height),t.fillStyle="rgb(255, 255, 255)",t.fillRect(e.width/2-1,8,2,e.height-16);const s=performance.now();for(const n of this.resultLines){t.fillStyle="rgba(255, 255, 255, 1)";const a=Math.min(1,4-(s-n.startTime)/2e3);if(n.offset<0&&(t.fillStyle=`rgba(160, ${Ht(160,0,-n.offset/250)}, ${Ht(160,0,-n.offset/250)}, ${a})`),n.offset>0&&(t.fillStyle=`rgba(${Ht(160,0,n.offset/250)}, ${Ht(160,0,n.offset/250)}, 160, ${a})`),t.fillRect(e.width/2-.5+n.offset/4,12,1,e.height-24),s-n.startTime<250){const o=(s-n.startTime)/250;t.globalAlpha=1-o,t.fillRect(e.width/2-.5-o*3+n.offset/4,12-o*10,1+o*6,e.height-24+o*20)}t.globalAlpha=1}for(const n of this.tickLines){const a=n.time-s-_.play.offset*1e3;t.fillStyle="rgba(255, 255, 255, 0.8)",n.beat%4!=0?t.fillRect(e.width/2-1-a/4,12,2,e.height-24):t.fillRect(e.width/2-2-a/4,12,4,e.height-24)}e.closest("#windows")&&requestAnimationFrame(i)};return i}onClose(){clearInterval(this.metronomeInterval),window.removeEventListener("keydown",this.keyHandler)}}class MS extends St{app;changeHandler=()=>this.initView();constructor(e){super({title:"Song Properties",width:450,height:486,disableClose:!1,win_id:"sm_properties",blocking:!1}),this.app=e,this.initView(),K.on("smLoaded",this.changeHandler),K.on("undo",this.changeHandler),K.on("redo",this.changeHandler)}onClose(){K.off("smLoaded",this.changeHandler),K.off("undo",this.changeHandler),K.off("redo",this.changeHandler)}initView(){this.viewElement.replaceChildren(),this.viewElement.classList.add("sm-properties");const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("label"),t.innerText="Apply to",yy.forEach(i=>{const s=document.createElement("div");s.classList.add("sm-container");const n=document.createElement("div");n.classList.add("sm-title"),n.innerText=i.title;const a=document.createElement("div");a.classList.add("property-grid"),i.items.forEach(o=>{const l=document.createElement("div");l.classList.add("label"),l.innerText=o.title,a.appendChild(l),a.appendChild(vy(this.app,o))}),s.appendChild(n),s.appendChild(a),e.appendChild(s)}),this.viewElement.appendChild(e)}}var kS=RS,tl=8192,Rd=65536,Ld=new ArrayBuffer(Rd*4),IS=new Float64Array(Ld,Rd,tl),PS=new Float64Array(Ld,Rd*2,tl/2),BS=LS({Math,Float64Array},null,Ld);function RS(r){if(!r)throw Error("Input data is not provided, pass an array.");var e=r.length;if(e>tl)throw Error("Input length is too big, must be under "+tl);var t=Math.floor(Math.log(e)/Math.LN2);if(Math.pow(2,t)!==e)throw Error("Invalid array size, must be a power of 2.");return IS.set(r),BS(e,t),PS.subarray(0,e/2)}function LS(r,e,t){var i=6.283185307179586,s=r.Math.sqrt,n=r.Math.sin,a=r.Math.cos,o=r.Math.abs,l=r.Math.SQRT1_2,c=r.Math.imul,u=new r.Float64Array(t),h=new r.Float64Array(t),d=8192,p=16384;function f(g,y){g=g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be=A<<1;do{for(pe=le;(pe|0)<(g|0);pe=pe+be|0)S=pe+b|0,x=S+C|0,D=x+C|0,$=D+C|0,R=pe+C-b|0,O=R+C|0,W=O+C|0,V=W+C|0,N=h[W<<3>>3]*U-h[D<<3>>3]*te,k=h[W<<3>>3]*te+h[D<<3>>3]*U,E=h[V<<3>>3]*Q-h[$<<3>>3]*Z,G=h[V<<3>>3]*Z+h[$<<3>>3]*Q,F=N-E,N=N+E,E=F,h[V<<3>>3]=N+h[O<<3>>3],h[D<<3>>3]=N-h[O<<3>>3],F=G-k,k=k+G,G=F,h[$<<3>>3]=G+h[x<<3>>3],h[W<<3>>3]=G-h[x<<3>>3],h[O<<3>>3]=h[S<<3>>3]-k,h[S<<3>>3]=h[S<<3>>3]+k,h[x<<3>>3]=E+h[R<<3>>3],h[R<<3>>3]=h[R<<3>>3]-E;le=(be<<1)-A|0,be=be<<2}while((le|0)<(g|0))}}for(;w=w-1|0;)ce=+h[w<<3>>3],fe=+h[g-w-1<<3>>3],we=v*s(ce*ce+fe*fe),u[p+w<<3>>3]=we;u[p+0<<3>>3]=o(v*h[0])}function m(g){g=g|0;var y=0,w=0,b=1,v=0,A=0;y=g>>>1,w=g-1|0,h[0]=u[d+0<<3>>3];do{for(v=v+y|0,h[b<<3>>3]=u[d+v<<3>>3],h[v<<3>>3]=u[d+b<<3>>3],b=b+1|0,A=y<<1;A=A>>1,((v=v^A)&A)==0;);(v|0)>=(b|0)&&(h[b<<3>>3]=u[d+v<<3>>3],h[v<<3>>3]=u[d+b<<3>>3],h[w-b<<3>>3]=u[d+w-v<<3>>3],h[w-v<<3>>3]=u[d+w-b<<3>>3]),b=b+1|0}while((b|0)<(y|0));h[w<<3>>3]=u[d+w<<3>>3]}return f}const ff=va(kS);class fs{view;slider;text;options;constructor(e,t){this.view=e,this.options=t,this.view.classList.add("slider");const i=document.createElement("input");i.classList.add("slider-input"),i.type="range",i.min=t.min.toString(),i.max=t.max.toString(),i.step=t.step.toString(),i.value=(t.value??(t.min+t.max)/2).toString(),i.oninput=()=>{s.innerText=this.formatValue(parseFloat(i.value))+"",this.options.onChange?.(parseFloat(i.value))},t.width!==void 0&&(i.style.width=t.width+"px"),this.slider=i,e.appendChild(i);const s=document.createElement("div");s.innerText=this.formatValue(parseFloat(i.value))+"",s.style.width="30px",this.text=s,e.appendChild(s)}get value(){return parseFloat(this.slider.value)}setValue(e){this.slider.value=e+"",this.text.innerText=this.formatValue(parseFloat(this.slider.value))+""}static create(e){return new fs(document.createElement("div"),e)}formatValue(e){return this.options.transformer?this.options.transformer(e):this.options.precision===void 0?ae(e,3).toString():ae(e,this.options.precision).toFixed(this.options.precision)}}const ii=800,qe=200,Sh=3,On=125,Fn=250,po=3,DS=.02,Ns=6,Ch=800,mf=15,qt=32768,Mh=[{frequency:20,weight:.4006009013520281},{frequency:25,weight:.4258037044922291},{frequency:31.5,weight:.4536690484291709},{frequency:40,weight:.4840856831659204},{frequency:50,weight:.5142710208279764},{frequency:63,weight:.5473453749315819},{frequency:80,weight:.5841121495327103},{frequency:100,weight:.6214074879602299},{frequency:125,weight:.6601749463607856},{frequency:160,weight:.7054673721340388},{frequency:200,weight:.7489234225800412},{frequency:250,weight:.7936507936507937},{frequency:315,weight:.8406893652795292},{frequency:400,weight:.889284126278346},{frequency:500,weight:.9291521486643438},{frequency:630,weight:.9675858732462506},{frequency:800,weight:.9985022466300548},{frequency:1e3,weight:.9997500624843789},{frequency:1250,weight:.9564801530368244},{frequency:1600,weight:.9409550693954364},{frequency:2e3,weight:1.0196278358399185},{frequency:2500,weight:1.0955902492467817},{frequency:3150,weight:1.1232799775344005},{frequency:4e3,weight:1.0914051841746248},{frequency:5e3,weight:.9997500624843789},{frequency:6300,weight:.8727907484180668},{frequency:8e3,weight:.7722007722007722},{frequency:1e4,weight:.7369196757553427},{frequency:12500,weight:.7768498737618955},{frequency:16e3,weight:.7698229407236336},{frequency:2e4,weight:.4311738708634257},{frequency:22550,weight:.2},{frequency:25e3,weight:0}];class _y extends St{app;onAudioLoad=this.reset.bind(this);windowStep=512;fftSize=1024;tempoFftSize=4096;tempoStep=2;monoAudioData;audioLength=0;sampleRate=44100;tempogram=[];tempogramGroups=[];spectrogram=[];spectrogramDifference=[];noveltyCurve=[];noveltyCurveIsolated=[];spectrogramCanvases=[];lowestFinishedBlock=0;numRenderedBlocks=0;peaks=[];_threshold=.3;spectroHeights=[];spectroWeights=[];placeNotesSelectionButton;toggleButton;resetButton;onsetResults;offsetTableLabel;offsetRows=[];bpmRows=[];covers=[];doAnalysis=!1;lastSecond=0;constructor(e){super({title:"Detect Audio Sync",width:400,height:450,win_id:"detect-sync"}),this.app=e,this.initView(),this.reset(),K.on("audioLoaded",this.onAudioLoad)}onClose(){K.off("audioLoaded",this.onAudioLoad),this.app.chartManager.chartAudio.offLoad(this.onAudioLoad)}initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("sync-container"),e.style.display="flex",e.style.flexDirection="column",e.style.alignItems="center";const t=document.createElement("canvas");t.style.width=`${ii/2}px`,t.style.height=`${qe}px`;const i=document.createElement("div");i.classList.add("sync-tab-container");const s=document.createElement("div");s.classList.add("sync-tab-option","active"),s.innerText="Analysis Options";const n=document.createElement("div");n.classList.add("sync-tab-option"),n.innerText="Tempo Results";const a=document.createElement("div");a.classList.add("sync-tab-option"),a.innerText="Onset Results",i.replaceChildren(s,n,a),[...i.children].forEach((m,g)=>{m.onclick=()=>{l.scrollLeft=370*g,i.querySelectorAll(".active").forEach(y=>y.classList.remove("active")),m.classList.add("active")}});const o=document.createElement("div");o.classList.add("sync-tab-view");const l=document.createElement("div");l.classList.add("sync-tab-scroller");const c=this.createOptionsView(),u=this.createTempoView(),h=this.createOnsetsView(),d=(m,g)=>{const y=document.createElement("div");return y.classList.add("sync-cover"),y.innerText=m,y.style.left=`${g*370}px`,y};this.covers=[d("Clear analysis results to edit",0),d("Start analysis to view",1),d("Start analysis to view",2)],o.appendChild(l),l.replaceChildren(c,this.covers[0],u,this.covers[1],h,this.covers[2]);const p=document.createElement("div");p.classList.add("sync-bottom-container"),this.resetButton=document.createElement("button"),this.resetButton.classList.add("delete"),this.resetButton.innerText="Clear results",this.resetButton.style.width="120px",this.resetButton.disabled=!0,this.resetButton.onclick=()=>{this.resetButton.disabled=!0,s.click(),this.reset()},this.toggleButton=document.createElement("button"),this.toggleButton.innerText="Start analyzing",this.toggleButton.style.width="200px",this.toggleButton.onclick=()=>{this.doAnalysis||n.click(),this.doAnalysis=!this.doAnalysis,this.toggleButton.innerText=this.doAnalysis?"Stop analyzing":this.hasData()?"Resume analyzing":"Start analyzing",this.resetButton.disabled=this.doAnalysis},p.replaceChildren(this.toggleButton,this.resetButton),e.replaceChildren(t,i,o,p),this.viewElement.appendChild(e);const f=this.windowLoop(t);requestAnimationFrame(f)}createOptionsView(){const e=document.createElement("div");e.style.display="flex",e.style.position="relative",e.style.flexDirection="column",e.style.gap="3px",e.style.height="100%";const t=(c,u,h)=>{const d=document.createElement("div");d.style.display="flex",d.style.flexDirection="row",d.style.justifyContent="space-between",d.style.alignItems="center";const p=document.createElement("div");return p.innerText=c,d.replaceChildren(p,u),Lt(d,{content:h}),d},i=document.createElement("div");i.innerText="Onsets",i.style.fontWeight="600";const s=fs.create({min:Math.log2(128),max:Math.log2(8192),step:1,value:Math.log2(this.fftSize),transformer:c=>2**c,onChange:c=>{this.fftSize=2**c,this.windowStep>this.fftSize&&(this.windowStep=this.fftSize,n.setValue(c)),this.reset()}}),n=fs.create({min:Math.log2(128),max:Math.log2(8192),step:1,value:Math.log2(this.windowStep),transformer:c=>2**c,onChange:c=>{this.windowStep=2**c,this.windowStep>this.fftSize&&(this.windowStep=this.fftSize,n.setValue(Math.log2(this.fftSize))),this.reset()}}),a=document.createElement("div");a.innerText="Tempo",a.style.fontWeight="600",a.style.marginTop="15px";const o=fs.create({min:Math.log2(128),max:Math.log2(8192),step:1,value:Math.log2(this.tempoFftSize),transformer:c=>2**c,onChange:c=>{this.tempoStep=2**c,this.tempoStep>this.tempoFftSize&&(this.tempoStep=this.tempoFftSize,l.setValue(c)),this.reset()}}),l=fs.create({min:Math.log2(1),max:Math.log2(1024),step:1,value:Math.log2(this.tempoStep),transformer:c=>2**c,onChange:c=>{this.tempoStep=2**c,this.tempoStep>this.tempoFftSize&&(this.tempoStep=this.tempoFftSize,l.setValue(Math.log2(this.tempoFftSize))),this.reset()}});return e.replaceChildren(i,t("FFT Size",s.view,"Determines the amount of audio to analyze at every block. Higher values result in more accurate frequencies, while lower values result in more accurate timings. Defaults to 1024."),t("Window Step",n.view,"Determines the number of blocks per second. Lower values result in more time-accurate spectrograms, but may take more time and mess up tempo analysis. Defaults to 512 and must be lower than FFT Size."),a,t("FFT Size",o.view,"Determines the amount of the onset graph to analyze at every block. Higher values result in more accurate tempos, while lower values result in more accurate timings. Defaults to 4096."),t("Window Step",l.view,"Determines the number of blocks per second. Lower values result in more time-accurate tempograms, but may take more time. Defaults to 2 and must be lower than FFT Size.")),e}createTempoView(){const e=document.createElement("div");e.style.display="flex",e.style.position="relative",e.style.gap="10px";const t=document.createElement("div");t.style.flex="1";const i=document.createElement("div");i.classList.add("sync-table-label"),i.innerText="Offsets",this.offsetTableLabel=i;const s=document.createElement("table");s.classList.add("sync-table");const n=document.createElement("tr"),a=document.createElement("th");a.innerText="Offset";const o=document.createElement("th");o.innerText="Confidence",n.replaceChildren(a,o),s.appendChild(n),t.replaceChildren(i,s);const l=document.createElement("div");l.style.flex="1";const c=document.createElement("div");c.classList.add("sync-table-label"),c.innerText="Current Tempos";const u=document.createElement("table");u.classList.add("sync-table");const h=document.createElement("tr"),d=document.createElement("th");d.innerText="BPM";const p=document.createElement("th");p.innerText="Confidence",h.replaceChildren(d,p),u.appendChild(h);for(let f=0;f<5;f++){const m=document.createElement("tr"),g=document.createElement("td");g.innerText="-";const y=document.createElement("td");y.innerText="-",m.replaceChildren(g,y),s.appendChild(m),this.offsetRows.push(m);const w=m.cloneNode(!0);u.appendChild(w),this.bpmRows.push(w)}return l.replaceChildren(c,u),e.replaceChildren(t,l),e}createOnsetsView(){const e=document.createElement("div");e.style.display="flex",e.style.flexDirection="column",e.style.gap="10px",e.style.justifyContent="center",e.style.alignItems="center",e.style.position="relative";const t=document.createElement("div");t.style.display="flex",t.style.justifyContent="space-between",t.style.alignItems="center",t.style.width="100%",Lt(t,{content:"Adjust the threshold for a block to be considered an onset (red line)."});const i=document.createElement("div");i.innerText="Onset Threshold";const s=fs.create({min:0,max:1,step:.01,value:.3,onChange:c=>{this.threshold=c}}),n=document.createElement("div");n.style.color="#888888",n.style.fontStyle="italic",n.style.fontSize="11px",n.style.marginBottom="15px",n.style.marginTop="-6px",n.innerText="Found 0 onsets",this.onsetResults=n,t.replaceChildren(i,s.view);const a=document.createElement("div");a.style.display="flex",a.style.justifyContent="space-between",a.style.alignItems="center",a.style.width="100%";const o=document.createElement("button");o.innerText="Place onsets as notes",o.onclick=()=>this.placeOnsets();const l=document.createElement("button");return l.innerText="Place onsets as notes in selection",l.disabled=!0,l.onclick=()=>this.placeOnsets(!0),this.placeNotesSelectionButton=l,a.replaceChildren(o,l),e.replaceChildren(t,n,a),e}async reset(){this._threshold=.3,this.doAnalysis=!1,this.toggleButton.disabled=!1,this.toggleButton.style.background="",this.toggleButton.innerText="Start analyzing",this.app.chartManager.chartAudio.onLoad(this.onAudioLoad),await this.getMonoAudioData(),this.sampleRate=this.app.chartManager.chartAudio.getSampleRate(),this.spectroHeights=new Array(this.fftSize).fill(0).map((t,i)=>{const s=i/(this.fftSize/2)*this.sampleRate/2,n=(i+1)/(this.fftSize/2)*this.sampleRate/2,a=qe-Le(Math.log(s/20)/Math.log(this.sampleRate/40)*qe,0,qe),o=qe-Le(Math.log(n/20)/Math.log(this.sampleRate/40)*qe,0,qe);return{y:o,height:a-o}}),this.spectroWeights=new Array(this.fftSize).fill(0).map((t,i)=>{const s=i/(this.fftSize/2)*this.sampleRate/2,n=Mh.findIndex(l=>l.frequency>s);if(n<1)return 0;const a=Mh[n-1],o=Mh[n];return Ht(a.weight,o.weight,Nt(Math.log(1+a.frequency),Math.log(1+o.frequency),Math.log(1+s)))});const e=Math.max(1,Math.ceil(this.audioLength/this.windowStep));this.spectrogramCanvases=[];for(let t=0;t{t.firstChild.innerText="-",t.lastChild.innerText="-"}),this.bpmRows.forEach(t=>{t.firstChild.innerText="-",t.lastChild.innerText="-"})}hasData(){return this.numRenderedBlocks>0}windowLoop(e){const t=e.getContext("2d");t.canvas.width=ii,t.canvas.height=qe*2,t.imageSmoothingEnabled=!1;const i=()=>{if(this.placeNotesSelectionButton.disabled=this.app.chartManager.startRegion===void 0||this.app.chartManager.endRegion===void 0||this.app.chartManager.startRegion==this.app.chartManager.endRegion,this.covers[0].classList.toggle("active",this.hasData()),this.covers[1].classList.toggle("active",!this.hasData()),this.covers[2].classList.toggle("active",!this.hasData()),!this.app.chartManager.chartAudio)return;const s=Math.ceil(this.audioLength/this.windowStep);if(this.monoAudioData!==void 0&&this.doAnalysis){const h=performance.now();for(;performance.now()-h=s){this.tempogram.length==0&&(this.toggleButton.disabled=!0,this.calcTempogram());break}this.spectrogram[this.lowestFinishedBlock]===void 0&&(this.renderBlock(this.lowestFinishedBlock),this.calcDifference(this.lowestFinishedBlock),this.calcIsolatedNovelty(this.lowestFinishedBlock),this.numRenderedBlocks++),this.lowestFinishedBlock++}this.lowestFinishedBlockw.centerd.center-Ns);y!==void 0&&(p+=y.groups[0].value,f+=y.avg,m++)}p/=m,f/=m,h.push({bpm:f,weight:d.groups[0].value,smoothedWeight:p})}h.sort((d,p)=>p.smoothedWeight-d.smoothedWeight);for(const d of h)d.weight<.01||(t.font=`${18+d.weight*300}px Assistant`,t.globalAlpha=Math.min(1,d.weight*100),t.fillText(ae(d.bpm,0)+"",200,Ht(qe*2,qe*1.5,Nt(On,Fn,d.bpm))));if(this.lastSecond!=this.app.chartManager.time){this.lastSecond=this.app.chartManager.time;const d=h.slice(0,5).reduce((p,f)=>p+f.smoothedWeight,0);for(let p=0;p<5;p++){const f=this.bpmRows[p],m=h[p]?.bpm,g=h[p]?.weight;f.firstChild.innerText=m===void 0?"-":Math.round(m).toString(),f.lastChild.innerText=g===void 0?"-":Math.round(g/d*100)+"%"}}}t.globalAlpha=1,t.font="22px Assistant",t.textAlign="left",t.textBaseline="top",t.fillText("Spectrogram",10,10),t.fillText("Onsets",10,qe+10),t.fillText("Tempogram",10,qe*1.5+10),e.closest("#windows")&&requestAnimationFrame(i)};return i}renderBlock(e){if(!this.monoAudioData)return;const t=new Float32Array(this.fftSize);t.set(this.monoAudioData.subarray(Math.max(0,e*this.windowStep-this.fftSize/2),e*this.windowStep+this.fftSize/2),-Math.min(0,e*this.windowStep-this.fftSize/2));for(let s=0;s{const a=this.spectroHeights[n],o=Le(s*2e3,0,255);i.globalAlpha=o/255,i.fillRect(e%qt,a.y,1,a.height)}),i.globalAlpha=1}storeDifferenceResponse(e,t){this.spectrogramDifference[e]=t;const i=t.reduce((s,n)=>s+n,0);this.noveltyCurve[e]=i}calcIsolatedNovelty(e){for(let t=e-Sh;t<=e;t++){if(t<0)continue;let i=0,s=0;for(let n=t-Sh;n<=t+Sh;n++)this.noveltyCurve[n]!==void 0&&(i+=this.noveltyCurve[n],s++);i/=s,this.storeIsolatedNovelty(t,Math.max(0,this.noveltyCurve[t]-i))}}storeIsolatedNovelty(e,t){this.noveltyCurveIsolated[e]=Math.log(1+t),Math.log(1+t)>this._threshold&&Math.log(1+t)>(this.noveltyCurveIsolated[e-1]??0)?(this.peaks[e-1]&&(this.peaks[e-1]=!1),this.peaks[e]=!0,this.onsetResults.innerText=`Found ${this.peaks.filter(n=>n).length} onsets`):this.peaks[e]=!1;const i=this.spectrogramCanvases[Math.floor(e/qt)].getContext("2d"),s=Math.min(1,Math.log(1+t))*qe*.5;i.fillStyle="rgb(11, 14, 26)",i.fillRect(e%qt,qe,1,qe*.5),i.fillStyle="rgba(0, 100, 150, 0.5)",i.fillRect(e%qt,qe*1.5-s,1,s)}async getMonoAudioData(){const e=this.app.chartManager.chartAudio;if(!e)return;const t=e.getBuffer(),i=new OfflineAudioContext(t.numberOfChannels,t.length,t.sampleRate),s=i.createBufferSource();s.buffer=t;const n=i.createChannelMerger(t.numberOfChannels);s.connect(n),n.connect(i.destination),s.start(),await i.startRendering().then(a=>{this.monoAudioData=a.getChannelData(0),this.audioLength=this.monoAudioData.length}).catch(()=>{Ee.createFormatted("Failed to load audio: audio rendering failed","error")})}get threshold(){return this._threshold}set threshold(e){this._threshold=e,this.peaks=this.noveltyCurveIsolated.map((t,i)=>t>this._threshold&&(this.noveltyCurveIsolated[i-1]??0)t).length} onsets`}calculateOffset(){const e=new Map;let t=0,i=0,s=0;for(let c=0;cd.groups[0].value>=DS);if(h.length!=0&&(i=c,h.forEach(d=>{let p=0,f=0;for(let g=c-po;g<=c+po;g++){if(this.tempogramGroups[g]===void 0)continue;const y=this.tempogramGroups[g].find(w=>w.centerd.center-Ns);y!==void 0&&(f+=y.avg,p++)}const m=Math.round(f/p);e.has(m)||e.set(m,0),e.set(m,e.get(m)+1),e.get(m)>t&&(t=e.get(m),s=m)}),t>50))break}if(s==0)return;const n=60/s*(this.sampleRate/this.windowStep),a=new Array(Ch).fill(0).map((c,u)=>{const h=u%n/n;let d=0,p=0;for(let f=1;f<=4;f++)p+=Math.max(1-Math.abs(Math.round(h*f)/f-h)*12,0)*1/f,d+=1/f;return p/d}),o=[];for(let c=i;ca[d]*h).reduce((h,d)=>h+d,0);o.push({block:c,offset:-(c*this.windowStep/this.sampleRate)%(60/s),response:u,curve:this.noveltyCurveIsolated.slice(c,c+Ch).map((h,d)=>a[d]*h)})}o.sort((c,u)=>u.response-c.response);const l=o.slice(0,5).reduce((c,u)=>c+u.response,0);this.offsetTableLabel.innerText=`Offsets (first BPM: ${s})`;for(let c=0;c{if(!i)return null;let n=this.app.chartManager.loadedChart.getBeatFromSeconds(s*this.windowStep/this.sampleRate);return n=Math.round(n*48)/48,n<0?null:{type:"Tap",beat:n,col:0}}).filter(i=>i!==null).filter(i=>e?i.beat>this.app.chartManager.startRegion&&i.beate&&(e=this.noveltyCurveIsolated[a]);const t=new Float32Array(this.noveltyCurveIsolated.length);for(let a=0;a{const o=new Float32Array(this.tempoFftSize);o.set(t.subarray(Math.max(0,a*this.tempoStep-this.tempoFftSize/2),a*this.tempoStep+this.tempoFftSize/2),-Math.min(0,a*this.tempoStep-this.tempoFftSize/2));for(let c=0;cn(++a),1)):(this.calculateOffset(),this.spectrogram=[],this.noveltyCurve=[],this.tempogram=[],this.monoAudioData=void 0,this.toggleButton.innerText="Finished analyzing",this.resetButton.disabled=!1,this.doAnalysis=!1,this.toggleButton.style.background="var(--accent-color)")};n(0)}storeTempogram(e,t){const i=new Map,s=[];t.forEach((a,o)=>{let l=this.sampleRate*60/(this.windowStep*this.tempoFftSize)*o;if(!(l>Fn*4||lFn&&l!=1/0;)l/=2;for(;l({bpm:a,value:o})).sort((a,o)=>o.value-a.value).filter(a=>a.value!=0);for(let a=0;ac.centero.bpm-Ns);if(l===void 0){s.push({center:o.bpm,groups:[o]});continue}l.groups.push(o)}this.tempogramGroups[e]=s.map(a=>({...a,avg:a.groups.reduce((o,l)=>o+l.bpm*l.value,0)/a.groups.reduce((o,l)=>o+l.value,0)}));const n=this.spectrogramCanvases[Math.floor(e*this.tempoStep/qt)].getContext("2d");n.fillStyle="rgba(0, 166, 255, 1)",this.tempogram[e].forEach(a=>{const o=Le(a.value*8e3,0,255);n.globalAlpha=o/255,n.fillRect(e*this.tempoStep%qt,Ht(qe*2,qe*1.5,Nt(On,Fn,a.bpm)),1*this.tempoStep,qe*.5/(Fn-On))})}}const gf=["accent-color","editor-bg","widget-bg","editable-overlay-hover","editable-overlay-active","text-color","text-color-secondary","text-color-detail","text-color-disabled","primary-bg","primary-border","primary-bg-active","primary-bg-hover","secondary-bg","secondary-border","secondary-bg-active","secondary-bg-hover","tooltip-bg","input-bg","input-bg-active","input-bg-hover","input-border","navbar-bg","navbar-bg-inactive","window-bg","window-border"],OS=["primary-bg","secondary-bg","text-color","accent-color","widget-bg","editor-bg","editable-overlay-active","input-bg","window-bg"],FS=[{name:"primary-bg",ids:[{id:"primary-bg",label:"base"},{id:"primary-bg-active",label:"active"},{id:"primary-bg-hover",label:"hover"},{id:"primary-border",label:"border"}]},{name:"secondary-bg",ids:[{id:"secondary-bg",label:"base"},{id:"secondary-bg-active",label:"active"},{id:"secondary-bg-hover",label:"hover"},{id:"secondary-border",label:"border"}]},{name:"text-color",ids:[{id:"text-color",label:"primary"},{id:"text-color-secondary",label:"secondary"},{id:"text-color-detail",label:"detail"},{id:"text-color-disabled",label:"disabled"}]},{name:"other",ids:[{id:"accent-color",label:"accent-color"},{id:"widget-bg",label:"widget-bg"},{id:"tooltip-bg",label:"tooltip-bg"},{id:"editor-bg",label:"editor-bg"}]},{name:"editable-overlay",ids:[{id:"editable-overlay-hover",label:"hover"},{id:"editable-overlay-active",label:"active"}]},{name:"input",ids:[{id:"input-bg",label:"background"},{id:"input-bg-active",label:"active"},{id:"input-bg-hover",label:"hover"},{id:"input-border",label:"border"}]},{name:"window",ids:[{id:"window-bg",label:"background"},{id:"window-border",label:"border"}]},{name:"window-navbar",ids:[{id:"navbar-bg",label:"active"},{id:"navbar-bg-inactive",label:"inactive"}]}],yf={"accent-color":"Color used for focus input rings, confirm buttons","text-color":"Base text color","text-color-secondary":"Secondary text color, used for text in recent files, menubar keybinds","text-color-detail":"Detail text color, used for text in timing event boxes","text-color-disabled":"Used for texts relating to empty/disabled things (ex. no files in directory picker)","primary-bg":"Primary background, used for menubar, context/dropdown menus","primary-border":"","primary-bg-active":"","primary-bg-hover":"","navbar-bg":"Window navbar background","navbar-bg-inactive":"","window-bg":"Window background","window-border":"","secondary-bg":"Secondary background, used for subareas in menus","secondary-border":"","secondary-bg-active":"","secondary-bg-hover":"","editable-overlay-hover":"Overlay on top of editable items (status widget buttons, playback option toggles, textareas)","editable-overlay-active":"","input-bg":"Background color for input","input-bg-active":"","input-bg-hover":"","input-border":"","widget-bg":"Widget background","tooltip-bg":"Color of these tooltips","editor-bg":"Editor background"},kh={"primary-bg":{"primary-border":function(r){return this.lighten(r,10).setAlpha(187/255)},"primary-bg-active":function(r){return this.lighten(r,10)},"primary-bg-hover":function(r){return this.lighten(r,30)},"widget-bg":function(r){return this.add(r,-50).setAlpha(136/255)},"window-bg":function(r){return this.lighten(r,-10)},"text-color":function(r){return this.average(r)>.5?new B("#000"):new B("#fff")},"input-bg":function(r){return this.average(r)<.5?new B("#000"):new B("#fff")},"input-border":function(r){return this.average(r)>.5?this.add(r,-30).setAlpha(119/255):this.add(r,30).setAlpha(119/255)},"tooltip-bg":function(r){return this.lighten(r,-10).setAlpha(238/255)},"secondary-bg":function(r){return this.lighten(r,-20)},"editor-bg":function(r){return this.lighten(r,-60)}},"window-bg":{"navbar-bg":function(r){return new B(r)}},"secondary-bg":{"secondary-border":function(r){return this.lighten(r,10).setAlpha(187/255)},"secondary-bg-active":function(r){return this.lighten(r,50)},"secondary-bg-hover":function(r){return this.lighten(r,30)}},"navbar-bg":{"navbar-bg-inactive":function(r){return this.lighten(r,-33)}},"text-color":{"text-color-secondary":function(r){return new B(r).setAlpha(119/255)},"text-color-detail":function(r){return new B(r).setAlpha(68/255)},"text-color-disabled":function(r){return new B(r).setAlpha(136/255)}},"input-bg":{"input-border":function(r){return this.lighten(r,10).setAlpha(187/255)},"input-bg-active":function(r){return this.lighten(r,50)},"input-bg-hover":function(r){return this.lighten(r,30)}}},hs={default:{"accent-color":new B("rgb(23, 131, 208)"),"text-color":new B("#fff"),"text-color-secondary":new B("#888"),"text-color-detail":new B("#757a89"),"text-color-disabled":new B("#888"),"primary-bg":new B("#555"),"primary-border":new B("#444"),"primary-bg-active":new B("#575757"),"primary-bg-hover":new B("#666"),"navbar-bg":new B("#3d3d3d"),"navbar-bg-inactive":new B("#626262"),"window-bg":new B("#3d3d3d"),"window-border":new B("#00000000"),"secondary-bg":new B("#373737"),"secondary-border":new B("#333"),"secondary-bg-active":new B("#555"),"secondary-bg-hover":new B("#454545"),"editable-overlay-hover":new B("rgb(255, 255, 255, 0.1)"),"editable-overlay-active":new B("rgb(255, 255, 255, 0.2)"),"input-bg":new B("rgba(35, 35, 35, 0.309)"),"input-bg-active":new B("rgba(50, 50, 50, 0.309)"),"input-bg-hover":new B("rgba(79, 79, 79, 0.309)"),"input-border":new B("rgba(0, 0, 0, 0.3)"),"widget-bg":new B("rgba(0, 0, 0, 0.5)"),"tooltip-bg":new B("rgba(20, 20, 20, 0.95)"),"editor-bg":new B("#18191c")},dusk:{"accent-color":new B("#b34e97ff"),"text-color":new B("#ffffffff"),"text-color-secondary":new B("#ffffff77"),"text-color-detail":new B("#ffffff44"),"text-color-disabled":new B("#ffffff88"),"primary-bg":new B("#1b0131ff"),"primary-border":new B("#1e0136bb"),"primary-bg-active":new B("#2f0057ff"),"primary-bg-hover":new B("#230140ff"),"navbar-bg":new B("#18012cff"),"navbar-bg-inactive":new B("#10011dff"),"window-bg":new B("#18012cff"),"window-border":new B("#00000000"),"secondary-bg":new B("#160127ff"),"secondary-border":new B("#18012bbb"),"secondary-bg-active":new B("#310a52ff"),"secondary-bg-hover":new B("#25033fff"),"editable-overlay-hover":new B("#e79dff1a"),"editable-overlay-active":new B("#e79dff33"),"input-bg":new B("#000000ff"),"input-bg-active":new B("#000000ff"),"input-bg-hover":new B("#000000ff"),"input-border":new B("#391f4f77"),"widget-bg":new B("#00000088"),"tooltip-bg":new B("#18012cee"),"editor-bg":new B("#0b0014ff")},nord:{"accent-color":new B("#1783d0ff"),"text-color":new B("#d9dee8ff"),"text-color-secondary":new B("#d9dee878"),"text-color-detail":new B("#d9dee845"),"text-color-disabled":new B("#d9dee887"),"primary-bg":new B("#2e3440ff"),"primary-border":new B("#323946ba"),"primary-bg-active":new B("#636d83ff"),"primary-bg-hover":new B("#485061ff"),"navbar-bg":new B("#292e39ff"),"navbar-bg-inactive":new B("#2f333cff"),"window-bg":new B("#292e39ff"),"window-border":new B("#00000000"),"secondary-bg":new B("#242933ff"),"secondary-border":new B("#272d38ba"),"secondary-bg-active":new B("#444d5fff"),"secondary-bg-hover":new B("#3f4755ff"),"editable-overlay-hover":new B("#ffffff1a"),"editable-overlay-active":new B("#ffffff33"),"input-bg":new B("#1212124f"),"input-bg-active":new B("#141414ff"),"input-bg-hover":new B("#171717ff"),"input-border":new B("#121212ff"),"widget-bg":new B("#00020e87"),"tooltip-bg":new B("#292e39ed"),"editor-bg":new B("#18191cff")},light:{"accent-color":new B("#ff594cff"),"text-color":new B("#000000ff"),"text-color-secondary":new B("#00000078"),"text-color-detail":new B("#00000045"),"text-color-disabled":new B("#00000087"),"primary-bg":new B("#ffffffff"),"primary-border":new B("#b5b5b5ff"),"primary-bg-active":new B("#ebebebff"),"primary-bg-hover":new B("#ffd4d1ff"),"navbar-bg":new B("#edededff"),"navbar-bg-inactive":new B("#d1d1d1ff"),"window-bg":new B("#edededff"),"window-border":new B("#00000000"),"secondary-bg":new B("#d9d9d9ff"),"secondary-border":new B("#c7c7c7ff"),"secondary-bg-active":new B("#f0f0f0ff"),"secondary-bg-hover":new B("#e3e3e3ff"),"editable-overlay-hover":new B("#ff594c3d"),"editable-overlay-active":new B("#ff594c73"),"input-bg":new B("#ebebebff"),"input-bg-active":new B("#e0e0e0ff"),"input-bg-hover":new B("#ffffffff"),"input-border":new B("#9e9e9eff"),"widget-bg":new B("#f7f7f7e5"),"tooltip-bg":new B("#ffffffff"),"editor-bg":new B("#cfcfcfff")},rust:{"accent-color":new B("#b37100ff"),"text-color":new B("#ffd7bdf2"),"text-color-secondary":new B("#ffd7bd78"),"text-color-detail":new B("#ffd7bd45"),"text-color-disabled":new B("#ffd7bd87"),"primary-bg":new B("#3c2e2aff"),"primary-border":new B("#42332eff"),"primary-bg-active":new B("#68524bff"),"primary-bg-hover":new B("#4e3c37ff"),"navbar-bg":new B("#362926ff"),"navbar-bg-inactive":new B("#241b19ff"),"window-bg":new B("#58413cff"),"window-border":new B("#00000000"),"secondary-bg":new B("#40302ba1"),"secondary-border":new B("#46352fff"),"secondary-bg-active":new B("#614a42ff"),"secondary-bg-hover":new B("#533e38ff"),"editable-overlay-hover":new B("#fff8e01a"),"editable-overlay-active":new B("#fff8e033"),"input-bg":new B("#231515ff"),"input-bg-active":new B("#271717ff"),"input-bg-hover":new B("#2e1b1bff"),"input-border":new B("#4b413fff"),"widget-bg":new B("#311e1cdd"),"tooltip-bg":new B("#362926ff"),"editor-bg":new B("#181211ff")},tron:{"accent-color":new B("#00ccffff"),"text-color":new B("#ffffffff"),"text-color-secondary":new B("#ffffffe4"),"text-color-detail":new B("#ffffff5b"),"text-color-disabled":new B("#ffffff88"),"primary-bg":new B("#000000ff"),"primary-border":new B("#ff7b00c9"),"primary-bg-active":new B("#00e1ff98"),"primary-bg-hover":new B("#ff751a5a"),"navbar-bg":new B("#000000ff"),"navbar-bg-inactive":new B("#000000ff"),"window-bg":new B("#000000ff"),"window-border":new B("#ff880085"),"secondary-bg":new B("#121212ff"),"secondary-border":new B("#ff8800aa"),"secondary-bg-active":new B("#00e1ffa3"),"secondary-bg-hover":new B("#ff7e145a"),"editable-overlay-hover":new B("#ffffff1a"),"editable-overlay-active":new B("#ffffff33"),"input-bg":new B("#000000ff"),"input-bg-active":new B("#000000ff"),"input-bg-hover":new B("#000000ff"),"input-border":new B("#1e1e1eff"),"widget-bg":new B("#000000ad"),"tooltip-bg":new B("#000000ff"),"editor-bg":new B("#000000ff")},gilded:{"accent-color":new B("#ffc014ff"),"text-color":new B("#e6e6e6ff"),"text-color-secondary":new B("#ffffff6b"),"text-color-detail":new B("#e6e6e645"),"text-color-disabled":new B("#e6e6e687"),"primary-bg":new B("#232325ff"),"primary-border":new B("#272729ff"),"primary-bg-active":new B("#ffc0145b"),"primary-bg-hover":new B("#ffc01421"),"navbar-bg":new B("#202021ff"),"navbar-bg-inactive":new B("#151516ff"),"window-bg":new B("#202021ff"),"window-border":new B("#00000000"),"secondary-bg":new B("#1c1c1eff"),"secondary-border":new B("#1f1f21ff"),"secondary-bg-active":new B("#1f1f21ff"),"secondary-bg-hover":new B("#242427ff"),"editable-overlay-hover":new B("#ffffff1a"),"editable-overlay-active":new B("#ffffff33"),"input-bg":new B("#0d0d0dff"),"input-bg-active":new B("#0e0e0eff"),"input-bg-hover":new B("#111111ff"),"input-border":new B("#0e0e0eff"),"widget-bg":new B("#171717db"),"tooltip-bg":new B("#202021ff"),"editor-bg":new B("#0e0e0fff")}};class Qe{static _themes=hs;static _userThemes={};static _initialized=!1;static style;static currentTheme;static initialize(){this._createThemeStyle(),this._loadUserThemes(),this._initialized=!0}static _createThemeStyle(){const e=document.createElement("style");document.getElementsByTagName("head")[0].appendChild(e),this.style=e}static _loadUserThemes(){let e={};try{e=JSON.parse(localStorage.getItem("themes")??"{}")}catch{console.warn("Error loading user themes")}const t={};for(const[i,s]of Object.entries(e))t[i]=this.validateTheme(s);this._userThemes=t}static _saveUserThemes(){const e=Object.fromEntries(Object.entries(this._userThemes).map(([t,i])=>[t,this.convertThemeToString(i)]));localStorage.setItem("themes",JSON.stringify(e))}static validateTheme(e){const t={...hs.default};if(typeof e!="object")return t;for(const i of gf)if(e[i]!==void 0)try{t[i]=new B(e[i])}catch{console.warn(`Invalid color ${e[i]} for ${i}`)}return t}static getThemes(){return{...this._themes,...this._userThemes}}static getBuiltinThemes(){return this._themes}static getUserThemes(){return this._userThemes}static loadTheme(e){this._initialized||this.initialize();let t=this.getThemes()[e];t||(Ee.createFormatted("Error loading theme: Invalid theme id","error"),t=hs.default),_.general.theme=e,this._applyTheme(t)}static _applyTheme(e){const t=`body{${gf.map(i=>`--${i}: ${(e[i]??hs.default[i]).toHexa()};`).join("")}}`;this.style.innerHTML=t,this.currentTheme={...e},K.emit("themeChanged")}static loadThemeFromColors(e){this._applyTheme(this.validateTheme(e))}static getCurrentTheme(){return this.currentTheme}static convertThemeToString(e){return Object.fromEntries(Object.entries(e).map(([t,i])=>[t,i.toHexa()]))}static exportCurrentTheme(e){return e={code:!1,spaces:!1,...e},e.code?JSON.stringify(Object.fromEntries(Object.entries(this.currentTheme).map(([t,i])=>[t,`^new Color('${i.toHexa()}')^`])),null,e.spaces?2:0).replaceAll('"^',"").replaceAll('^"',""):JSON.stringify(this.convertThemeToString(this.currentTheme),null,e.spaces?2:0)}static createUserTheme(e,t){this.getThemes()[e]===void 0&&(t?this._userThemes[e]={...t}:this._userThemes[e]={...hs.default},this._saveUserThemes())}static setUserTheme(e,t){this._userThemes[e]!==void 0&&(this._userThemes[e]={...t},this._saveUserThemes())}static deleteUserTheme(e){this._userThemes[e]!==void 0&&(delete this._userThemes[e],this.loadTheme("default"),this._saveUserThemes())}static renameUserTheme(e,t){this._userThemes[e]!==void 0&&this.getThemes()[t]===void 0&&(this._userThemes[t]=this._userThemes[e],delete this._userThemes[e],this._saveUserThemes())}static parseThemeText(e){let t;try{t=JSON.parse(e)}catch{return null}return this.validateTheme(t)}static getColor(e){return this.currentTheme?.[e]??hs.default[e]}}function Dd(r,e,t){return(r<<16)+(e<<8)+t}function Od(r,e){let t=r>>16,i=r>>8&255,s=r&255;return t=Le(Math.round(t*e),0,255),i=Le(Math.round(i*e),0,255),s=Le(Math.round(s*e),0,255),Dd(t,i,s)}function NS(r,e){let t=r>>16,i=r>>8&255,s=r&255;return t=Le(Math.round(t+e),0,255),i=Le(Math.round(i+e),0,255),s=Le(Math.round(s+e),0,255),Dd(t,i,s)}function Wc(r,e,t){const[i,s,n]=r.match(/\w\w/g).map(d=>parseInt(d,16)),[a,o,l]=e.match(/\w\w/g).map(d=>parseInt(d,16)),c=Math.round(i+(a-i)*t).toString(16).padStart(2,"0"),u=Math.round(s+(o-s)*t).toString(16).padStart(2,"0"),h=Math.round(n+(l-n)*t).toString(16).padStart(2,"0");return"#"+c+u+h}function US(r,e,t){const i=Ht(r.red,e.red,t),s=Ht(r.green,e.green,t),n=Ht(r.blue,e.blue,t),a=Ht(r.alpha,e.alpha,t);return new B([i,s,n,a])}const na=new Map;K.on("themeChanged",()=>{for(const[r,e]of na.entries()){const t=Qe.getColor(r);e.forEach(i=>{i.destroyed||(i.tint=t.toNumber(),i.alpha=t.alpha)}),na.set(r,e.filter(i=>!i.destroyed))}});function et(r,e){na.has(e)||na.set(e,[]),na.get(e).push(r);const t=Qe.getColor(e);r.tint=t.toNumber(),r.alpha=t.alpha}function Ih(r){const{r:e,g:t,b:i,a:s}=r.toRgba(),n=Math.max(e,t,i),a=Math.min(e,t,i);let o=0,l=0;const c=(n+a)/2;if(n==a)o=l=0;else{const u=n-a;switch(l=c>.5?u/(2-n-a):u/(n+a),n){case e:o=(t-i)/u+(t{const o=document.createElement("input");o.type="text";let l="";o.onfocus=()=>{l=o.value},o.onkeydown=c=>{c.key=="Enter"&&(o.blur(),c.preventDefault()),c.key=="Escape"&&(o.value=l,o.blur(),c.stopImmediatePropagation())},o.oninput=()=>{a.isValid(o.value)!==null&&t.onupdate?.(t.getValue())},o.onblur=()=>{const c=a.isValid(o.value);c===null?o.value=l:o.value=c,t.onupdate?.(t.getValue())},t.inputs[n]=o,s.appendChild(o)}),t.replaceChildren(i,s),t}setValue(e){Object.entries(this.inputs).forEach(([t,i])=>{document.activeElement!=i&&(i.value=this.opts[t].setValue(e))})}}const ri=(r,e,t)=>i=>{t!==void 0&&i.endsWith(t)&&(i=i.slice(0,i.length-t.length));let s;try{s=parseInt(i)}catch{return null}return Le(s,r,e)+""},si=(r,e,t,i)=>{let s;i!==void 0&&r.endsWith(i)&&(r=r.slice(0,r.length-i.length));try{s=parseInt(r)}catch{return e}return Le(s,e,t)};class El extends xy{_value;_hue=0;_sat=0;_val=0;_alp=1;popup;matrix;matrixDot;matrixDragging=!1;hueDragging=!1;hueThumb;alphaDragging=!1;alphaBg;alphaThumb;previewNew;formats=[];onColorChange;static create(e){const t=Ph();return Object.setPrototypeOf(t,El.prototype),t.value=fa(e.value),t.classList.add("color-picker"),t.formats=[],e.height!==void 0&&(t.style.height=e.height+"px"),e.width!==void 0&&(t.style.width=e.width+"px"),t.addEventListener("click",()=>{t.createPopup()}),t}updatePreview(){this.color=this._value}get value(){return this._value}set value(e){this._value=e;const t=fo(this._value);this._hue=t[0],this._sat=t[1],this._val=t[2],this._alp=t[3],this.updatePreview(),this.updatePopup()}get hue(){return this._hue}set hue(e){this._hue=e,this.updateColor()}get sat(){return this._sat}set sat(e){this._sat=e,this.updateColor()}get val(){return this._val}set val(e){this._val=e,this.updateColor()}get alpha(){return this._alp}set alpha(e){this._alp=e,this.updateColor()}updateColor(){this._value=new B({h:this._hue*360,s:this._sat*100,v:this._val*100,a:this._alp}),this.updatePreview(),this.updatePopup()}createPopup(){if(this.popup){this.closePopup();return}const e=document.createElement("div");e.classList.add("color-picker-popup");const t=document.createElement("div");t.classList.add("color-picker-area");const[i,s]=this.createMatrix();this.matrix=i,this.matrixDot=s,s.style.background="#f00";const[n,a]=this.createSlider({ondrag:()=>this.hueDragging=!0,offdrag:()=>this.hueDragging=!1,change:A=>{this.hue=A,this.onColorChange?.(this._value)}});this.hueThumb=a,n.style.background="linear-gradient(to right, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 66%, #f0f 83%, red 100%)";const[o,l]=this.createSlider({ondrag:()=>this.alphaDragging=!0,offdrag:()=>this.alphaDragging=!1,change:A=>{this.alpha=A,this.onColorChange?.(this._value)}});this.alphaThumb=l,o.classList.add("color-picker-transparent");const c=document.createElement("div");c.classList.add("color-slider"),o.appendChild(c),this.alphaBg=c,t.replaceChildren(i,n,o);const u=document.createElement("div");u.classList.add("color-picker-area");const h=Qs.create({label:"HEX",inputs:{hex:{setValue:A=>A.alpha!=1?A.toHexa():A.toHex(),isValid:A=>{const C=/#?([0-9a-fA-F]+)/.exec(A);return C&&[3,4,6,8].includes(C[1].length)?(A[0]!="#"&&(A="#"+A),A):null}}},getValue(){let A=this.inputs.hex.value;return A[0]!="#"&&(A="#"+A),new B(A)},onupdate:A=>{this.value=A,this.onColorChange?.(this._value)}});this.formats.push(h),u.appendChild(h);const d=Qs.create({label:"RGBA",inputs:{r:{setValue:A=>Math.round(A.red*255).toString(),isValid:ri(0,255)},g:{setValue:A=>Math.round(A.green*255).toString(),isValid:ri(0,255)},b:{setValue:A=>Math.round(A.blue*255).toString(),isValid:ri(0,255)},a:{setValue:A=>Math.round(A.alpha*100)+"%",isValid:ri(0,100,"%")}},getValue(){return new B({r:si(this.inputs.r.value,0,255),g:si(this.inputs.g.value,0,255),b:si(this.inputs.b.value,0,255),a:si(this.inputs.a.value,0,100,"%")/100})},onupdate:A=>{this.value=A,this.onColorChange?.(this._value)}});this.formats.push(d),u.appendChild(d);const p=Qs.create({label:"HSVA",inputs:{h:{setValue:A=>Math.round(fo(A)[0]*360)+"º",isValid:ri(0,360,"º")},s:{setValue:A=>Math.round(fo(A)[1]*100)+"%",isValid:ri(0,100,"%")},v:{setValue:A=>Math.round(fo(A)[2]*100)+"%",isValid:ri(0,100,"%")},a:{setValue:A=>Math.round(A.alpha*100)+"%",isValid:ri(0,100,"%")}},getValue(){return new B({h:si(this.inputs.h.value,0,360,"º"),s:si(this.inputs.s.value,0,100,"%"),v:si(this.inputs.v.value,0,100,"%"),a:si(this.inputs.a.value,0,100,"%")/100})},onupdate:A=>{this.value=A,this.onColorChange?.(this._value)}});this.formats.push(p),u.appendChild(p);const f=Qs.create({label:"HSLA",inputs:{h:{setValue:A=>Math.round(Ih(A)[0]*360)+"º",isValid:ri(0,360,"º")},s:{setValue:A=>Math.round(Ih(A)[1]*100)+"%",isValid:ri(0,100,"%")},l:{setValue:A=>Math.round(Ih(A)[2]*100)+"%",isValid:ri(0,100,"%")},a:{setValue:A=>Math.round(A.alpha*100)+"%",isValid:ri(0,100,"%")}},getValue(){return new B({h:si(this.inputs.h.value,0,360,"º"),s:si(this.inputs.s.value,0,100,"%"),l:si(this.inputs.l.value,0,100,"%"),a:si(this.inputs.a.value,0,100,"%")/100})},onupdate:A=>{this.value=A,this.onColorChange?.(this._value)}});this.formats.push(f),u.appendChild(f);const m=document.createElement("div");m.classList.add("color-picker-preview");const g=Ph(),y=Ph();y.color=this._value,g.color=this._value,m.replaceChildren(g,y),this.previewNew=g,u.appendChild(m),e.replaceChildren(t,u),this.popup=e,this.updatePopup();const w=this._value,b=A=>{A.key=="Escape"&&(A.stopImmediatePropagation(),window.removeEventListener("keydown",b),window.removeEventListener("mousedown",v),this.closePopup(),this.value=w,this.onColorChange?.(this._value))},v=A=>{e.contains(A.target)||(window.removeEventListener("keydown",b),window.removeEventListener("mousedown",v),this.closePopup())};window.addEventListener("keydown",b),window.addEventListener("mousedown",v),document.getElementById("popups").appendChild(e),setTimeout(()=>this.movePosition())}updatePopup(){if(!this.popup)return;this.matrix.style.backgroundColor=`hsl(${this._hue*360} 100% 50%)`,this.matrixDot.style.backgroundColor=this._value.toHex(),this.matrixDragging||(this.matrixDot.style.left=this._sat*200+"px",this.matrixDot.style.top=(1-this._val)*200+"px"),this.hueDragging||(this.hueThumb.style.left=this._hue*200+"px");const e=`rgba(${this._value.red*255}, ${this._value.green*255}, ${this._value.blue*255}`;this.alphaBg.style.background=`linear-gradient(to right, ${e}, 0 ), ${e}, 1))`,this.alphaDragging||(this.alphaThumb.style.left=this._alp*200+"px"),this.formats.forEach(t=>t.setValue(this._value)),this.previewNew.color=this._value}closePopup(){const e=this.popup;this.popup=void 0,e&&(e.classList.add("exiting"),setTimeout(()=>{e.remove()},500))}createMatrix(){const e=document.createElement("div");e.classList.add("color-matrix"),e.style.backgroundColor="#ff0000";const t=document.createElement("div");t.classList.add("color-matrix-x");const i=document.createElement("div");i.classList.add("color-matrix-y");const s=document.createElement("div");s.classList.add("color-matrix-dot"),e.appendChild(s),e.replaceChildren(t,i,s),e.onmousedown=o=>{window.addEventListener("mousemove",n),window.addEventListener("mouseup",a),n(o),this.matrixDragging=!0};const n=o=>{const l=e.getBoundingClientRect(),c=Le((o.clientX-l.left)/l.width,0,1),u=Le((o.clientY-l.top)/l.height,0,1);s.style.left=c*l.width+"px",s.style.top=u*l.height+"px",this._sat=c,this.val=1-u,this.onColorChange?.(this._value)},a=()=>{window.removeEventListener("mousemove",n),window.removeEventListener("mouseup",a),this.matrixDragging=!1};return[e,s]}createSlider(e){const t=document.createElement("div");t.classList.add("color-slider");const i=document.createElement("div");i.classList.add("color-slider-thumb"),t.appendChild(i),t.onmousedown=a=>{window.addEventListener("mousemove",s),window.addEventListener("mouseup",n),s(a),e.ondrag?.(),this.onColorChange?.(this._value)};const s=a=>{const o=t.getBoundingClientRect(),l=Le((a.clientX-o.left)/o.width,0,1);i.style.left=l*o.width+"px",e.change(l)},n=()=>{window.removeEventListener("mousemove",s),window.removeEventListener("mouseup",n),e.offdrag?.()};return[t,i]}movePosition(){const e=this.getBoundingClientRect(),t=e.left+e.width/2-this.popup.clientWidth/2,i=e.top+e.height+10,s=15,n=window.innerWidth-this.popup.clientWidth-15;this.popup.style.left=`${Le(t,s,n)}px`,this.popup.style.top=`${i}px`,i+this.popup.clientHeight>window.innerHeight-15&&(this.popup.style.transformOrigin="bottom center",this.popup.style.top=`${e.top-this.popup.clientHeight-10}px`)}isActive(){return this.popup!==void 0}}class zc extends St{app;grid;actions={};constructor(e){super({title:"Themes",width:600,height:400,disableClose:!1,win_id:"theme-selection",blocking:!1}),this.app=e,this.initView(),this.loadGrid()}initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("pref-search");const i=document.createElement("input");i.classList.add("pref-search-bar"),i.type="text",i.placeholder="Search for a theme...",i.oninput=()=>{this.filterGrid(i.value)},t.appendChild(i);const s=document.createElement("div");s.classList.add("theme-grid"),this.grid=s;const n=this.createOptionTray();e.replaceChildren(t,s,n),this.viewElement.appendChild(e)}createOptionTray(){const e=document.createElement("div");e.classList.add("theme-tray");const t=document.createElement("button");t.appendChild(Se.getIcon("PLUS",16)),t.appendChild(document.createTextNode("New")),t.onclick=()=>{const l=this.getNonConflictingName("new-theme");Qe.createUserTheme(l),Qe.loadTheme(l),this.loadGrid()},this.actions.add=t,e.appendChild(t);const i=document.createElement("button");i.appendChild(Se.getIcon("COPY",16)),i.appendChild(document.createTextNode("Duplicate")),i.onclick=()=>{const l=this.getNonConflictingName(_.general.theme);Qe.createUserTheme(l,Qe.getCurrentTheme()),Qe.loadTheme(l),this.loadGrid()},i.disabled=!0,this.actions.copy=i,e.appendChild(i);const s=document.createElement("button");s.classList.add("confirm"),s.appendChild(Se.getIcon("EDIT",16)),s.appendChild(document.createTextNode("Edit")),s.onclick=()=>{this.closeWindow(),this.app.windowManager.openWindow(new ma(this.app))},s.disabled=!0,this.actions.edit=s,e.appendChild(s);const n=document.createElement("button");n.classList.add("delete"),n.appendChild(Se.getIcon("TRASH",16)),n.appendChild(document.createTextNode("Delete")),n.onclick=()=>{this.app.windowManager.openWindow(new Al(this.app,"Delete theme","Are you sure you want to delete this theme?",[{type:"default",label:"Cancel"},{type:"delete",label:"Delete",callback:()=>{Qe.deleteUserTheme(_.general.theme),this.loadGrid()}}]))},n.disabled=!0,this.actions.del=n,e.appendChild(n);const a=document.createElement("button");a.appendChild(Se.getIcon("UPLOAD",16)),a.appendChild(document.createTextNode("Import")),a.onclick=async()=>{(await ry({_preferPolyfill:!1,excludeAcceptAllOption:!1,multiple:!0,accepts:[{extensions:["txt"]}]})).forEach(c=>{c.getFile().then(u=>u.text()).then(u=>{const h=Qe.parseThemeText(u);let d=ji(c.name,".txt");if(!h){Ee.createFormatted("Failed to load theme "+d,"error");return}d=this.getNonConflictingName(d),Qe.createUserTheme(d,h),this.loadGrid()})})},this.actions.imp=a,e.appendChild(a);const o=document.createElement("button");return o.appendChild(Se.getIcon("DOWNLOAD",16)),o.appendChild(document.createTextNode("Export")),o.onclick=()=>{const l=Qe.exportCurrentTheme({spaces:!0}),c=new File([l],_.general.theme+".txt",{type:"text/plain"}),u=document.createElement("a"),h=URL.createObjectURL(c);u.href=h,u.download=c.name,document.body.appendChild(u),u.click(),document.body.removeChild(u),window.URL.revokeObjectURL(h)},this.actions.exp=o,o.disabled=!0,e.appendChild(o),e}loadGrid(){this.grid.replaceChildren();const e=Qe.getThemes();if(e)for(const[t,i]of Object.entries(e)){let s=t;const n=hs[t]!==void 0,a=document.createElement("div"),o=document.createElement("div");if(o.classList.add("inlineEdit"),n)o.style.fontWeight="bold";else{o.contentEditable="true";let c=t;o.onfocus=()=>{c=o.innerText},o.onkeydown=u=>{u.key=="Enter"&&(o.blur(),u.preventDefault()),u.key=="Escape"&&(o.innerText=c,o.blur(),u.stopImmediatePropagation())},o.onblur=()=>{if(o.innerText==c)return;const u=this.getNonConflictingName(o.innerText);Qe.renameUserTheme(c,u),Qe.loadTheme(u),o.innerText=u,s=u,a.dataset.id=u}}const l=document.createElement("div");l.classList.add("theme-preview-grid");for(const c of OS){const u=document.createElement("div");u.style.backgroundColor=i[c].toHex(),l.appendChild(u)}o.innerText=t,a.classList.add("theme-cell"),o.classList.add("theme-title"),a.replaceChildren(o,l),this.grid.appendChild(a),t==_.general.theme&&(a.classList.add("selected"),setTimeout(()=>{a.scrollIntoView({behavior:_.general.smoothAnimations?"smooth":"instant",block:"center"})}),this.actions.edit.disabled=n,this.actions.del.disabled=n,this.actions.copy.disabled=!1,this.actions.exp.disabled=!1),a.dataset.id=t,a.onclick=()=>{_.general.theme!=s&&(Qe.loadTheme(s),this.removeAllSelections(),a.classList.add("selected"),this.actions.edit.disabled=n,this.actions.del.disabled=n,this.actions.copy.disabled=!1,this.actions.exp.disabled=!1)}}}removeAllSelections(){[...this.grid.querySelectorAll(".selected")].forEach(e=>e.classList.remove("selected"))}filterGrid(e){[...this.grid.children].forEach(t=>{if(!(t instanceof HTMLDivElement))return;const i=t,s=this.containsQuery(e,i.dataset.id);i.style.display=s?"":"none"})}containsQuery(e,t){return t?t.toLowerCase().includes(e.trim().toLowerCase()):!1}getNonConflictingName(e){const t=Qe.getThemes();if(t[e]==null)return e;let i=2;const s=/([^]+)-(\d+)$/.exec(e);s&&(e=s[1],i=parseInt(s[2]));let n=`${e}-${i}`;for(;t[n]!==void 0;)n=`${e}-${i}`,i++;return n}}class ma extends St{app;pickers={};handlers=[];linkBlacklist=new Set;static isOpen=!1;constructor(e){super({title:"Theme Color Editor",width:500,height:400,win_id:"theme-editor",disableClose:!0}),this.app=e,this.initView(),ma.isOpen=!0}initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("theme-color-grid"),FS.forEach(l=>{t.appendChild(this.createGroup(l))});const i=document.createElement("div");i.classList.add("menu-options");const s=document.createElement("div");s.classList.add("menu-left");const n=document.createElement("div");n.classList.add("menu-right"),i.appendChild(s),i.appendChild(n);const a=document.createElement("button");a.innerText="Cancel",a.onclick=()=>{this.closeWindow(),Qe.loadTheme(_.general.theme),this.app.windowManager.openWindow(new zc(this.app))},s.appendChild(a);const o=document.createElement("button");o.innerText="Save",o.classList.add("confirm"),o.onclick=()=>{Qe.setUserTheme(_.general.theme,Qe.getCurrentTheme()),Qe.loadTheme(_.general.theme),this.app.windowManager.openWindow(new zc(this.app)),this.closeWindow()},n.appendChild(o),e.replaceChildren(t,i),this.viewElement.appendChild(e)}createGroup(e){const t=document.createElement("div");t.classList.add("theme-group");const i=document.createElement("div");i.classList.add("theme-group-label"),i.innerText=e.name;const s=document.createElement("div");return s.classList.add("theme-picker-grid"),e.ids.forEach(n=>{s.appendChild(this.createPicker(n))}),t.replaceChildren(i,s),t}createPicker(e){const t=()=>{const u=new B(Qe.getCurrentTheme()[e.id]);o.innerText=u.toHex()+" | "+Math.round(u.alpha*100)+"%",!l.isActive()&&(l.value=u)},i=u=>{const h=Qe.getCurrentTheme();h[e.id]=u,Qe._applyTheme(this.updateLinks(e.id,h))},s=document.createElement("div");s.classList.add("theme-color-cell"),yf[e.id]!=""&&Lt(s,{content:yf[e.id]});const n=kh[e.id];n&&(s.onmouseover=()=>{Object.keys(n).forEach(u=>{this.linkBlacklist.has(u)||this.pickers[u].classList.add("linked")})},s.onmouseout=()=>{Object.keys(n).forEach(u=>{this.pickers[u].classList.remove("linked")})});const a=document.createElement("div");a.innerText=e.label;const o=document.createElement("div");o.classList.add("theme-color-detail");const l=El.create({value:"white",width:30,height:30});l.onColorChange=i,s.replaceChildren(a,o,l);const c=this.getLink(e.id);if(c!==null){const u=document.createElement("div");u.classList.add("ico-checkbox");const h=Se.getIcon("LINK",16),d=Se.getIcon("LINK_BROKEN",16);let p=!0;const f=()=>{p?this.linkBlacklist.delete(e.id):this.linkBlacklist.add(e.id),h.style.display=p?"":"none",d.style.display=p?"none":""};u.onclick=()=>{p=!p,f()},Lt(u,{onShow(g){g.setContent(p?`Linked to ${c}`:"Unlinked")}}),Lt(u,{trigger:"click",onShow(g){g.setContent(p?`Linked to ${c}`:"Unlinked")}}),f(),u.replaceChildren(h,d),s.appendChild(u);const m=g=>{p&&(p=!1,f()),i(g)};l.onColorChange=m}return t(),K.on("themeChanged",t),this.handlers.push(t),this.pickers[e.id]=s,s}getLink(e){for(const[t,i]of Object.entries(kh))if(e in i)return t;return null}average(e){return(e.red+e.green+e.blue)/3}lighten(e,t){return new B(Od(new B(e).toNumber(),1+t/100))}add(e,t){return new B(NS(new B(e).toNumber(),t))}updateLinks(e,t){const i=new Set,s=[e];for(;s.length!=0;){const n=s.shift(),a=kh[n];if(a)for(const[o,l]of Object.entries(a))this.linkBlacklist.has(o)||i.has(o)||(t[o]=l.bind(this)(t[n]),s.push(o),i.add(o))}return t}onClose(){ma.isOpen=!1}}const ni=r=>r,vf={offset:{title:"Offset",element:ni({create:(r,e)=>{const t=lt.create(0,_.general.spinnerStep/100,3);return t.onChange=i=>{i!=null&&e().setOffset(i)},t.view},update:(r,e)=>{const t=r.querySelector(".spinner-input");if(document.activeElement==t)return;const i=e.getOffset();t.value!=ae(i,3).toFixed(3)&&(t.value=ae(i,3).toFixed(3))}})},bpm:{title:"BPM",element:ni({create:(r,e)=>{const t=lt.create(120,void 0,3);return t.onChange=i=>{if(i==null){const s=r.chartManager.beat;e().delete([{type:"BPMS",beat:s}]);return}e().insert([{type:"BPMS",beat:r.chartManager.beat,value:i}])},t.view},update:(r,e,t)=>{const i=r.querySelector(".spinner-input");if(document.activeElement==i)return;const s=e.getEventAtBeat("BPMS",t)?.value??120;i.value!=ae(s,3).toFixed(3)&&(i.value=ae(s,3).toFixed(3))}})},stop:{title:"Stop",element:ni({create:(r,e)=>{const t=lt.create(0,void 0,3);return t.onChange=i=>{if(i==null||i==0){const s=r.chartManager.beat;e().delete([{type:"STOPS",beat:s}]);return}e().insert([{type:"STOPS",beat:r.chartManager.beat,value:i}])},t.view},update:(r,e,t)=>{const i=r.querySelector(".spinner-input");if(document.activeElement==i)return;const s=e.getEventAtBeat("STOPS",t);let n=s?.value??0;t!=s?.beat&&(n=0),i.value!=ae(n,3).toFixed(3)&&(i.value=ae(n,3).toFixed(3))}})},delay:{title:"Delay",element:ni({create:(r,e)=>{const t=lt.create(0,void 0,3);return t.onChange=i=>{if(i==null||i==0){const s=r.chartManager.beat;e().delete([{type:"DELAYS",beat:s}]);return}e().insert([{type:"DELAYS",beat:r.chartManager.beat,value:i}])},t.view},update:(r,e,t)=>{const i=r.querySelector(".spinner-input");if(document.activeElement==i)return;const s=e.getEventAtBeat("DELAYS",t);let n=s?.value??0;t!=s?.beat&&(n=0),i.value!=ae(n,3).toFixed(3)&&(i.value=ae(n,3).toFixed(3))}})},warp:{title:"Warp",element:ni({create:(r,e)=>{const t=lt.create(0,void 0,3,0);return t.onChange=i=>{if(i==null||i==0){const s=r.chartManager.beat;e().delete([{type:"WARPS",beat:s}]);return}i<0||e().insert([{type:"WARPS",beat:r.chartManager.beat,value:i}])},t.view},update:(r,e,t)=>{const i=r.querySelector(".spinner-input");if(document.activeElement==i)return;const s=e.getEventAtBeat("WARPS",t);let n=s?.value??0;t!=s?.beat&&(n=0),i.value!=ae(n,3).toFixed(3)&&(i.value=ae(n,3).toFixed(3))}})},timeSig:{title:"Time Sig.",element:ni({create:(r,e)=>{const t=document.createElement("div");t.classList.add("flex-column-gap");const i=lt.create(4,1,0,1);i.onChange=n=>{if(n==null){const a=r.chartManager.beat;e().delete([{type:"TIMESIGNATURES",beat:a}]);return}n<1||e().insert([{type:"TIMESIGNATURES",beat:r.chartManager.beat,upper:n,lower:s.value}])};const s=lt.create(4,1,0,1);return s.onChange=n=>{if(n==null){const a=r.chartManager.beat;e().delete([{type:"TIMESIGNATURES",beat:a}]);return}n<1||e().insert([{type:"TIMESIGNATURES",beat:r.chartManager.beat,upper:i.value,lower:n}])},t.appendChild(i.view),t.appendChild(s.view),t},update:(r,e,t)=>{const i=r.firstElementChild.querySelector(".spinner-input"),s=r.lastElementChild.querySelector(".spinner-input"),n=e.getEventAtBeat("TIMESIGNATURES",t),a=n?.upper??4,o=n?.lower??4;document.activeElement!=i&&i.value!=Math.round(a).toString()&&(i.value=Math.round(a).toString()),document.activeElement!=s&&s.value!=Math.round(o).toString()&&(s.value=Math.round(o).toString())}})},tick:{title:"Tickcount",element:ni({create:(r,e)=>{const t=lt.create(4,1,0,0);return t.onChange=i=>{if(i==null){const s=r.chartManager.beat;e().delete([{type:"TICKCOUNTS",beat:s}]);return}i<0||e().insert([{type:"TICKCOUNTS",beat:r.chartManager.beat,value:i}])},t.view},update:(r,e,t)=>{const i=r.querySelector(".spinner-input");if(document.activeElement==i)return;const s=e.getEventAtBeat("TICKCOUNTS",t)?.value??4;i.value!=Math.round(s).toString()&&(i.value=Math.round(s).toString())}})},combo:{title:"Combo",element:ni({create:(r,e)=>{const t=document.createElement("div");t.classList.add("flex-column-gap");const i=lt.create(1,1,0,0);i.onChange=n=>{if(n==null){const a=r.chartManager.beat;e().delete([{type:"COMBOS",beat:a}]);return}n<0||e().insert([{type:"COMBOS",beat:r.chartManager.beat,hitMult:n,missMult:s.value}])};const s=lt.create(1,1,0,0);return s.onChange=n=>{if(n==null){const a=r.chartManager.beat;s.setValue(r.chartManager.loadedChart?.timingData.getEventAtBeat("COMBOS",a)?.missMult??1);return}n<0||e().insert([{type:"COMBOS",beat:r.chartManager.beat,hitMult:i.value,missMult:n}])},t.appendChild(i.view),t.appendChild(s.view),t},update:(r,e,t)=>{const i=r.firstElementChild.querySelector(".spinner-input"),s=r.lastElementChild.querySelector(".spinner-input"),n=e.getEventAtBeat("COMBOS",t),a=n?.hitMult??1,o=n?.missMult??1;document.activeElement!=i&&i.value!=Math.round(a).toString()&&(i.value=Math.round(a).toString()),document.activeElement!=s&&s.value!=Math.round(o).toString()&&(s.value=Math.round(o).toString())}})},speed:{title:"Speed",element:ni({create:(r,e)=>{const t=document.createElement("div");t.classList.add("flex-column-gap");const i=()=>{e().insert([{type:"SPEEDS",beat:r.chartManager.beat,value:s.value,delay:n.value,unit:a.value=="Beats"?"B":"T"}])},s=lt.create(1,.1,0);s.onChange=o=>{if(o==null){const l=r.chartManager.beat;e().delete([{type:"SPEEDS",beat:l}]);return}i()};const n=lt.create(1,.1,0);n.onChange=o=>{o==null||o<0||i()};const a=gi.create(["Beat","Time"],"Beats");return a.onChange=i,t.appendChild(s.view),t.appendChild(n.view),t.appendChild(a.view),t},update:(r,e,t)=>{const i=r.firstElementChild.querySelector(".spinner-input"),s=r.children[1].querySelector(".spinner-input"),n=e.getEventAtBeat("SPEEDS",t),a=n?.value??1,o=n?.delay??0,l=n?.unit=="B"?"Beat":"Time";document.activeElement!=i&&i.value!=ae(a,3).toFixed(3)&&(i.value=ae(a,3).toFixed(3)),document.activeElement!=s&&s.value!=ae(o,3).toFixed(3)&&(s.value=ae(o,3).toFixed(3)),s.disabled=n?.beat!=t;const c=r.lastElementChild.querySelector(".dropdown-selected-text");c.innerText!=l&&(c.innerText=l),n?.beat!=t?c.classList.add("disabled"):c.classList.remove("disabled")}})},scroll:{title:"Scroll",element:ni({create:(r,e)=>{const t=lt.create(1,void 0,3);return t.onChange=i=>{if(i==null){const s=r.chartManager.beat;e().delete([{type:"SCROLLS",beat:s}]);return}e().insert([{type:"SCROLLS",beat:r.chartManager.beat,value:i}])},t.view},update:(r,e,t)=>{const i=r.querySelector(".spinner-input");if(document.activeElement==i)return;const s=e.getEventAtBeat("SCROLLS",t)?.value??1;i.value!=ae(s,3).toFixed(3)&&(i.value=ae(s,3).toFixed(3))}})},fake:{title:"Fake",element:ni({create:(r,e)=>{const t=lt.create(1,void 0,3,0);return t.onChange=i=>{if(i==null){const s=r.chartManager.beat;e().delete([{type:"FAKES",beat:s}]);return}i<0||e().insert([{type:"FAKES",beat:r.chartManager.beat,value:i}])},t.view},update:(r,e,t)=>{const i=r.querySelector(".spinner-input");if(document.activeElement==i)return;const s=e.getEventAtBeat("FAKES",t);let n=s?.value??1;t!=s?.beat&&(n=0),i.value!=ae(n,3).toFixed(3)&&(i.value=ae(n,3).toFixed(3))}})},label:{title:"Label",element:ni({create:(r,e)=>{const t=document.createElement("input");return t.type="text",t.autocomplete="off",t.spellcheck=!1,t.onkeydown=i=>{i.key=="Enter"&&t.blur()},t.onblur=()=>{if(t.value==""){const i=r.chartManager.beat;e().delete([{type:"LABELS",beat:i}]);return}e().insert([{type:"LABELS",beat:r.chartManager.beat,value:t.value}])},t},update:(r,e,t)=>{const i=r;if(document.activeElement==i)return;const n=e.getEventAtBeat("LABELS",t)?.value??"";i.value!=n&&(i.value=n)}})}};class HS extends St{app;lastBeat;chartTiming=!1;interval;changeHandler=()=>this.setData();constructor(e){super({title:"Edit Timing Data",width:300,height:340,disableClose:!1,win_id:"timing_data",blocking:!1}),this.app=e,this.lastBeat=Math.round(this.app.chartManager.beat*1e3)/1e3,this.chartTiming=this.app.chartManager.loadedChart.timingData.usesChartTiming(),this.initView(),this.interval=setInterval(()=>{Math.round(this.app.chartManager.beat*1e3)/1e3!=this.lastBeat&&(this.lastBeat=Math.round(this.app.chartManager.beat*1e3)/1e3,this.setData())},17),K.on("timingModified",this.changeHandler),K.on("chartLoaded",this.changeHandler)}onClose(){K.off("timingModified",this.changeHandler),clearInterval(this.interval)}initView(){this.viewElement.replaceChildren(),this.viewElement.classList.add("timing-data");const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("label"),t.innerText="Apply to";const i=gi.create(["All charts","This chart"],this.chartTiming?"This chart":"All charts");i.onChange(s=>{this.chartTiming=s=="This chart"}),e.appendChild(t),e.appendChild(i.view),Object.values(vf).forEach(s=>{const n=document.createElement("div");n.classList.add("label"),n.innerText=s.title;const a=s.element.create(this.app,()=>this.chartTiming?this.app.chartManager.loadedChart.timingData:this.app.chartManager.loadedSM.timingData);e.appendChild(n),e.appendChild(a)}),this.viewElement.appendChild(e),this.setData()}setData(){this.app.chartManager.loadedChart&&Object.values(vf).forEach((e,t)=>{const i=this.viewElement.children[0].children[t*2+3];e.element.update(i,this.app.chartManager.loadedChart.timingData,this.lastBeat)})}}const bf=[{type:"group",id:"app",label:"App",disable:()=>window.nw===void 0,children:[{type:"subgroup",children:[{type:"item",label:"Window Width",id:"app.width",input:{type:"number",step:50,min:300,onChange:(r,e)=>{const t=nw.Window.get();t.isFullscreen||(t.width=e)}}},{type:"item",label:"Window Height",id:"app.height",input:{type:"number",step:50,min:300,onChange:(r,e)=>{const t=nw.Window.get();t.isFullscreen||(t.height=e)}}}]},{type:"subgroup",children:[{type:"item",label:"Fullscreen",id:"app.fullscreen",input:{type:"checkbox",onChange:(r,e)=>{const t=nw.Window.get();e?nw.Window.get().enterFullscreen():(t.hide(),nw.Window.get().leaveFullscreen(),t.show())}}}]}]},{type:"group",id:"general",label:"General",children:[{type:"subgroup",children:[{type:"item",label:"Smooth Animations",id:"general.smoothAnimations",input:{type:"checkbox",onChange:(r,e)=>{e?document.body.classList.add("animated"):document.body.classList.remove("animated")}}},{type:"item",label:"Warn before exit",id:"general.warnBeforeExit",input:{type:"checkbox"},tooltip:"Warn before exiting the editor if you have unsaved changes."},{type:"item",label:"Spinner step",id:"general.spinnerStep",input:{type:"slider",min:0,step:.1,max:5,hardMin:0,hardMax:2**31-1},tooltip:"The default increment for all number spinners."}]}]},{type:"group",id:"chart",label:"Chart",children:[{type:"subgroup",label:"Playfield",children:[{type:"subgroup",children:[{type:"item",label:"Enable mouse placement",id:"chart.mousePlacement",input:{type:"checkbox"}},{type:"item",label:"Directional hold placement behavior",id:"chart.defaultHoldPlacement",input:{type:"checkbox"},tooltip:"Changes the hold placement behavior. By default, holds can only be extended in one direction when placed. Turn this off to mimic the behavior of AV/Stepmania."}]},{type:"subgroup",children:[{type:"item",label:"Zoom",id:"chart.zoom",input:{type:"slider",min:50,step:1,max:200,hardMax:2**31-1,transformers:{serialize:r=>r*100,deserialize:r=>r/100}}},{type:"item",label:"Reverse playfield",id:"chart.reverse",input:{type:"checkbox"}}]},{type:"subgroup",children:[{type:"item",label:"Allow receptor dragging",id:"chart.allowReceptorDrag",input:{type:"checkbox"},tooltip:"Allows the receptors to be dragged to move the playfield."},{type:"item",label:"X position",id:"chart.receptorXPos",input:{type:"slider",min:-400,max:400,hardMin:-(2**31-1),hardMax:2**31-1}},{type:"item",label:"Y position",id:"chart.receptorYPos",input:{type:"slider",min:-400,max:0,hardMin:-(2**31-1),hardMax:2**31-1}}]},{type:"subgroup",children:[{type:"item",label:"Draw length",id:"chart.maxDrawBeats",input:{type:"slider",min:0,max:30,hardMax:2**31-1},tooltip:"Maximum number of beats to draw notes. Increasing this works well for songs with high bpm but can affect performance. Only applies to XMod."},{type:"item",label:"Draw length past receptors",id:"chart.maxDrawBeatsBack",input:{type:"slider",min:0,max:30,hardMax:2**31-1},tooltip:"Maximum number of beats to draw notes past the receptors. Increasing this can affect performance. Only applies to XMod."}]},{type:"subgroup",children:[{type:"item",label:"Draw noteflashes",id:"chart.drawNoteFlash",input:{type:"checkbox"}},{type:"item",label:"Draw note icons",id:"chart.drawIcons",input:{type:"checkbox"},tooltip:"Draw indicators above notes that some noteskins may not differentiate, like Fakes and Lifts."}]}]},{type:"subgroup",label:"Scrolling",children:[{type:"item",label:"Scroll sensitivity",id:"chart.scroll.scrollSensitivity",input:{type:"slider",min:0,step:1,max:200,hardMax:2**31-1,transformers:{serialize:r=>r*100,deserialize:r=>r/100}},tooltip:"Adjust the scroll sensitivity when scrolling through the chart."},{type:"item",label:"Snap every scroll",id:"chart.scroll.scrollSnapEveryScroll",input:{type:"checkbox"},tooltip:"Whether each scroll movement corresponds to moving one snap unit when scrolling. Turning this on will have the same behavior as ArrowVortex. Recommended on for those using a mouse, off for those using trackpad."},{type:"item",label:"Invert zoom in/out",id:"chart.scroll.invertZoomScroll",input:{type:"checkbox"},tooltip:"Inverts the zoom in/out control when scrolling."},{type:"item",label:"Invert scroll direction when in reverse",id:"chart.scroll.invertReverseScroll",input:{type:"checkbox"}}]},{type:"subgroup",label:"Waveform",children:[{type:"item",label:"Draw waveform",id:"chart.waveform.enabled",input:{type:"checkbox"}},{type:"subgroup",children:[{type:"item",label:"Color",id:"chart.waveform.color",input:{type:"color"}}]},{type:"subgroup",children:[{type:"item",label:"Draw filtered waveform",id:"chart.waveform.allowFilter",input:{type:"checkbox"}},{type:"item",label:"Filtered color",id:"chart.waveform.filteredColor",input:{type:"color"}}]},{type:"item",label:"Line height",id:"chart.waveform.lineHeight",input:{type:"slider",min:1,max:3,step:.1,hardMax:100},tooltip:"The height of each line of the waveform. Increasing this can help performance."},{type:"item",label:"Antialiasing",id:"chart.waveform.antialiasing",input:{type:"checkbox"}},{type:"item",label:"Allow speed changes",id:"chart.waveform.speedChanges",input:{type:"checkbox"},tooltip:"Allows the waveform to be affected by SPEEDS and SCROLLS."}]},{type:"subgroup",label:"Note Layout",children:[{type:"item",label:"Show Note Layout",id:"chart.noteLayout.enabled",input:{type:"checkbox"}}]},{type:"subgroup",label:"NPS Graph",children:[{type:"item",label:"Show NPS Graph",id:"chart.npsGraph.enabled",input:{type:"checkbox"}},{type:"subgroup",children:[{type:"item",label:"Start Color",id:"chart.npsGraph.color1",input:{type:"color"}},{type:"item",label:"End Color",id:"chart.npsGraph.color2",input:{type:"color"}}]}]}]},{type:"group",id:"audio",label:"Audio",children:[{type:"subgroup",children:[{type:"item",label:"Master volume",id:"audio.masterVolume",input:{type:"slider",min:0,step:1,max:100,hardMax:2**31-1,transformers:{serialize:r=>r*100,deserialize:r=>r/100}}},{type:"item",label:"Song volume",id:"audio.songVolume",input:{type:"slider",min:0,step:1,max:100,hardMax:2**31-1,transformers:{serialize:r=>r*100,deserialize:r=>r/100}}},{type:"item",label:"Sound effect volume",id:"audio.soundEffectVolume",input:{type:"slider",min:0,step:1,max:100,hardMax:2**31-1,transformers:{serialize:r=>r*100,deserialize:r=>r/100}}}]},{type:"subgroup",children:[{type:"item",label:"Enable assist tick",id:"audio.assistTick",input:{type:"checkbox"},tooltip:"Plays a sound when a note passes the receptors"},{type:"item",label:"Enable metronome",id:"audio.metronome",input:{type:"checkbox"}}]},{type:"subgroup",children:[{type:"item",label:"Allow filters to affect audio",id:"audio.allowFilter",input:{type:"checkbox",onChange:r=>{r.chartManager.chartAudio.reload()}}},{type:"item",label:"Enable metronome",id:"audio.metronome",input:{type:"checkbox"}}]}]},{type:"group",id:"play",label:"Play mode",children:[{type:"subgroup",label:"Calibration",children:[{type:"item",label:"Global offset",id:"play.offset",input:{type:"slider",min:-1,step:.001,max:1,hardMin:-(2**31-1),hardMax:2**31-1},tooltip:"Offset in seconds when playing a chart. Set to positive if you are hitting early and negative if you are hitting late."},{type:"item",label:"Sound effect offset",id:"play.effectOffset",input:{type:"slider",min:-1,step:.001,max:1,hardMin:-(2**31-1),hardMax:2**31-1},tooltip:"Offset in seconds when playing sound effects like assist tick and metronome."},{type:"item",label:"Visual offset",id:"play.visualOffset",input:{type:"slider",min:-1,step:.001,max:1,hardMin:-(2**31-1),hardMax:2**31-1},tooltip:"Offset in seconds when displaying notes."}]},{type:"subgroup",children:[{type:"item",label:"Judgement tilt",id:"play.judgementTilt",input:{type:"checkbox"},tooltip:"Tilts the judgement text left if you are hitting early and right if you are hitting late."},{type:"item",label:"Hide barlines during play",id:"play.hideBarlines",input:{type:"checkbox"}}]},{type:"subgroup",label:"Timing windows",children:[{type:"item",id:"play.timingCollection",label:"Timing window collection",input:{type:"dropdown",advanced:!1,get items(){return Object.keys(Je.getCollections())}}},{type:"item",id:"play.timingWindowScale",label:"Timing window scale",input:{type:"slider",min:0,step:.001,max:2,hardMax:2**31-1},tooltip:"Scales all timing windows by the given amount."},{type:"item",id:"play.timingWindowAdd",label:"Timing window add",input:{type:"slider",min:0,step:.001,max:1,hardMax:2**31-1},tooltip:"Adds this value (in seconds) to all timing windows."}]}]},{type:"group",id:"performance",label:"Performance",children:[{type:"item",label:"Antialiasing",id:"performance.antialiasing",input:{type:"checkbox"}},{type:"item",label:"Resolution",id:"performance.resolution",input:{type:"slider",min:1,step:1,max:4,hardMin:0,hardMax:2**31-1},tooltip:"Requires a reload."}]},{type:"group",id:"debug",label:"Debug",children:[{type:"item",label:"Show FPS",id:"debug.showFPS",input:{type:"checkbox"}},{type:"item",label:"Show rendering timers",id:"debug.showTimers",input:{type:"checkbox"}},{type:"item",label:"Show scrolls/speeds debug visual",id:"debug.showScroll",input:{type:"checkbox"}},{type:"item",label:"Show noteskin errors",id:"debug.showNoteskinErrors",input:{type:"checkbox"}}]}];class GS extends St{app;observer;sectionContainer;constructor(e){super({title:"Options",width:600,height:400,disableClose:!1,win_id:"user_options",blocking:!1}),this.app=e,this.initView(),K.on("resize",()=>{this.move(window.innerWidth/2-this.options.width/2,window.innerHeight/2-this.options.height/2)})}initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("pref-container");const i=document.createElement("div");i.classList.add("pref-search");const s=document.createElement("input");s.classList.add("pref-search-bar"),s.type="text",s.placeholder="Search for an option...",s.oninput=()=>{a.replaceChildren(),o.replaceChildren(...this.createOptions(this.filterOptions(s.value)))},i.appendChild(s);const n=document.createElement("div");n.classList.add("pref-scrollers");const a=document.createElement("div");a.classList.add("pref-section-scroller"),this.sectionContainer=a;const o=document.createElement("div");o.classList.add("pref-option-scroller"),n.replaceChildren(a,o),this.observer=new IntersectionObserver(l=>{l.forEach(c=>{const u=c.target.dataset.id,h=a.querySelector(`.pref-section[data-id=${u}]`);h&&(c.intersectionRatio>0?h.classList.add("selected"):h.classList.remove("selected"))})},{}),t.replaceChildren(i,n),a.replaceChildren(),o.replaceChildren(...this.createOptions(bf)),e.appendChild(t),this.viewElement.appendChild(e)}createOptions(e){return e.filter(t=>!t.disable?.(this.app)).map(t=>{const i=this.makeOption(t);return t.type=="group"&&(this.observer.observe(i),this.sectionContainer?.appendChild(this.createEmptyGroup(t))),i})}makeOption(e){const t=document.createElement("div");t.classList.add("pref-"+e.type),(e.type=="group"||e.type=="item")&&(t.dataset.id=e.id);const i=document.createElement("div");i.classList.add(`pref-${e.type}-label`),e.label!==void 0&&(i.innerText=e.label,t.appendChild(i));const s=Se.getIcon("REVERT");if(e.type=="item"&&(s.style.width="12px",s.addEventListener("click",()=>{_.applyOption([e.id,_.getDefaultOption(e.id)]);const n=e.input.onChange;n?.(this.app,_.getDefaultOption(e.id)),t.replaceWith(this.makeOption(e))}),s.style.display=_.getDefaultOption(e.id)===_.getOption(e.id)?"none":"block",t.appendChild(s)),e.type=="item"){const n=_.getOption(e.id);let a;if(!e.input)return t;switch(i.innerText=e.label,e.input.type){case"checkbox":{const o=document.createElement("input"),l=e.input.onChange;o.type="checkbox",o.checked=n,o.onblur=null,o.onchange=()=>{_.applyOption([e.id,o.checked]),s.style.display=_.getDefaultOption(e.id)===_.getOption(e.id)?"none":"block",l?.(this.app,o.checked)},o.classList.add("pref-input","right"),o.onkeydown=c=>{c.key=="Enter"&&o.blur()},a=o;break}case"dropdown":{if(e.input.advanced){const o=e.input.transformers.deserialize,l=e.input.transformers.serialize,c=e.input.onChange,u=gi.create(e.input.items,l(n));u.onChange(h=>{_.applyOption([e.id,o(h)]),s.style.display=_.getDefaultOption(e.id)===_.getOption(e.id)?"none":"block",c?.(this.app,o(h))}),u.view.classList.add("pref-input","dropdown-right"),a=u.view}else{const o=e.input.onChange,l=gi.create(e.input.items,n);l.onChange(c=>{_.applyOption([e.id,c]),s.style.display=_.getDefaultOption(e.id)===_.getOption(e.id)?"none":"block",o?.(this.app,c)}),l.view.classList.add("pref-input","dropdown-right"),a=l.view}break}case"number":{const o=e.input.transformers?.deserialize??(h=>h),l=e.input.transformers?.serialize??(h=>h),c=e.input.onChange,u=lt.create(l(n),e.input.step,e.input.precision,e.input.min,e.input.max);u.onChange=h=>{if(!h){u.setValue(l(h));return}_.applyOption([e.id,o(h)]),s.style.display=_.getDefaultOption(e.id)===_.getOption(e.id)?"none":"block",c?.(this.app,o(h))},a=u.view;break}case"slider":{const o=e.input.transformers?.deserialize??(m=>m),l=e.input.transformers?.serialize??(m=>m),c=e.input.onChange,u=document.createElement("div");u.style.display="flex",u.style.alignItems="center";const h=document.createElement("input");h.type="range",h.min=e.input.min?.toString()??"",h.max=e.input.max?.toString()??"",h.step=e.input.step?.toString()??"1",h.value=l(n).toString();const d=document.createElement("input");d.type="text",d.value=(Math.round(l(n)*1e3)/1e3).toString();const p=e.input.min??e.input.hardMin??-Number.MAX_VALUE,f=e.input.max??e.input.hardMax??Number.MAX_VALUE;d.onblur=()=>{let m=pa(d.value);if(m===null){d.value=(Math.round(l(n)*1e3)/1e3).toString();return}m=Le(m,p,f),d.value=ae(m,3).toString(),d.blur(),d.value==""?d.value=l(m).toString():_.applyOption([e.id,o(m)]),h.value=m.toString(),s.style.display=_.getDefaultOption(e.id)===_.getOption(e.id)?"none":"block",c?.(this.app,o(m))},h.oninput=()=>{const m=parseFloat(h.value);d.value=ae(m,3).toString(),_.applyOption([e.id,o(m)]),s.style.display=_.getDefaultOption(e.id)===_.getOption(e.id)?"none":"block"},d.style.width="50px",d.onkeydown=m=>{m.key=="Enter"&&d.blur()},u.appendChild(h),u.appendChild(d),a=u;break}case"text":{const o=e.input.onChange,l=document.createElement("input");l.type="text",l.value=n.toString(),l.onblur=()=>{_.applyOption([e.id,l.value]),s.style.display=_.getDefaultOption(e.id)===_.getOption(e.id)?"none":"block",o?.(this.app,l.value)},l.onkeydown=c=>{c.key=="Enter"&&l.blur()},a=l;break}case"color":{const o=e.input.onChange,l=El.create({value:n});l.onColorChange=c=>{_.applyOption([e.id,c.toHexa()]),s.style.display=_.getDefaultOption(e.id)===_.getOption(e.id)?"none":"block",o?.(this.app,c)},a=l}}a.classList.add("pref-item-input"),t.appendChild(a)}else{const n=document.createElement("div");n.classList.add("pref-children"),t.appendChild(n),n.replaceChildren(...this.createOptions(e.children))}return e.type=="item"&&e.tooltip!==void 0&&Lt(t,{content:e.tooltip}),t}filterOptions(e,t=bf){const i=[];return t.forEach(s=>{if(s.label&&s.label.toLowerCase().includes(e.toLowerCase())){i.push(s);return}if(s.type=="group"||s.type=="subgroup"){const n=this.filterOptions(e,s.children);n.length!=0&&i.push({...s,children:n})}}),i}createEmptyGroup(e){const t=document.createElement("div");return t.classList.add("pref-section"),t.dataset.id=e.id,t.innerText=e.label,t.onclick=()=>{t.parentElement.parentElement.querySelector(`.pref-group[data-id=${e.id}]`).scrollIntoView()},t}onClose(){this.observer?.disconnect()}}var Yn=(r=>(r.SHIFT="Shift",r.CTRL="Ctrl",r.ALT="Alt",r.META="Command",r))(Yn||{});const Si=navigator.userAgent.indexOf("Mac OS X")>-1,ut=Si?"Command":"Ctrl",VS={Shift:Si?"⇧":"Shift",Ctrl:Si?"⌃":"Ctrl",Alt:Si?"⌥":"Alt",Command:"⌘"},wf={ArrowLeft:"Left",ArrowUp:"Up",ArrowRight:"Right",ArrowDown:"Down",BracketLeft:"[",BracketRight:"]",Semicolon:";",Quote:"'",Backslash:"\\",Slash:"/",Period:".",Comma:",",Backquote:"`",Minus:"-",Equal:"+"},Ty={Home:Si?"fn Left":"Home",End:Si?"fn Right":"End",PageUp:Si?"fn Up":"End",PageDown:Si?"fn Down":"End"},il=["ctrlKey","altKey","shiftKey","metaKey"],Co=["Ctrl","Alt","Shift","Command"],nt={playback:{label:"Play/Pause",combos:[{key:"Space",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==q.Play||r.chartManager.getMode()==q.Record,callback:r=>r.chartManager.playPause()},decreaseSnap:{label:"Decrease snap",combos:[{key:"Left",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==q.Play||r.chartManager.getMode()==q.Record,callback:r=>r.chartManager.previousSnap()},increaseSnap:{label:"Increase snap",combos:[{key:"Right",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==q.Play||r.chartManager.getMode()==q.Record,callback:r=>r.chartManager.nextSnap()},cursorUp:{label:"Move cursor up",combos:[{key:"Up",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==q.Play||r.chartManager.getMode()==q.Record,callback:r=>{r.chartManager.snapToPreviousTick()}},cursorDown:{label:"Move cursor down",combos:[{key:"Down",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==q.Play||r.chartManager.getMode()==q.Record,callback:r=>{r.chartManager.snapToNextTick()}},increaseScrollSpeed:{label:"Increase scroll speed",combos:[{key:"Up",mods:[ut]}],disabled:r=>!r.chartManager.chartView,callback:()=>_.chart.speed=Math.max(10,_.chart.speed*Math.pow(1.01,30))},decreaseScrollSpeed:{label:"Decrease scroll speed",combos:[{key:"Down",mods:[ut]}],disabled:r=>!r.chartManager.chartView,callback:()=>_.chart.speed=Math.max(10,_.chart.speed*Math.pow(1.01,-30))},zoomIn:{label:"Zoom in",combos:[{key:"+",mods:[ut]}],disabled:r=>!r.chartManager.chartView,callback:()=>{_.chart.zoom+=.1,Ee.create("Zoom: "+Math.round(_.chart.zoom*100)+"%")}},zoomOut:{label:"Zoom out",combos:[{key:"-",mods:[ut]}],disabled:r=>!r.chartManager.chartView,callback:()=>{_.chart.zoom=Math.max(.1,_.chart.zoom-.1),Ee.create("Zoom: "+Math.round(_.chart.zoom*100)+"%")}},zoomDefault:{label:"Reset zoom",combos:[{key:"0",mods:[ut]}],disabled:r=>!r.chartManager.chartView,callback:()=>{_.chart.zoom=1,Ee.create("Zoom: "+Math.round(_.chart.zoom*100)+"%")}},newSong:{label:"New song...",bindLabel:"New song",combos:[{key:"N",mods:[ut]}],disabled:r=>!r.chartManager.loadedSM||!Ie.openWindows,callback:r=>{r.windowManager.openWindow(new by(r))}},openSong:{label:"Open song...",bindLabel:"Open song",combos:[{key:"O",mods:[ut]}],disabled:r=>!r.chartManager.loadedSM||!Ie.openWindows,callback:r=>{if(window.nw){const e=document.createElement("input");e.type="file",e.accept=".sm,.ssc",e.onchange=()=>r.chartManager.loadSM(e.value),e.click()}else r.windowManager.openWindow(new wy(r,!1))}},songProperties:{label:"Song properties...",bindLabel:"Open song properties",combos:[{key:"O",mods:["Shift"]}],disabled:r=>!r.chartManager.loadedSM||!Ie.openWindows,callback:r=>r.windowManager.openWindow(new MS(r))},save:{label:"Save...",bindLabel:"Save",combos:[{key:"S",mods:[ut]}],disabled:r=>!r.chartManager.loadedSM||r.chartManager.smPath.startsWith("https://")||r.chartManager.smPath.startsWith("http://"),callback:r=>r.chartManager.save()},export:{label:"Save and export current song",combos:[{key:"E",mods:[ut]}],disabled:r=>!!window.nw||!r.chartManager.loadedSM||r.chartManager.smPath.startsWith("https://")||r.chartManager.smPath.startsWith("http://"),callback:r=>{r.chartManager.save(),Ue.getStandardHandler().saveDirectory(r.chartManager.smPath)}},exportNotedata:{label:"Export to notedata...",bindLabel:"Export to notedata",combos:[{key:"E",mods:[ut,"Shift"]}],disabled:r=>!r.chartManager.loadedSM||!Ie.openWindows,callback:r=>r.windowManager.openWindow(new yS(r,r.chartManager.selection.notes))},openChart:{label:"Chart list",bindLabel:"Open chart list",combos:[{key:"O",mods:[ut,"Shift"]}],disabled:r=>!r.chartManager.loadedSM||!Ie.openWindows,callback:r=>r.windowManager.openWindow(new ly(r))},timingDataRow:{label:"Edit timing data at row",combos:[{key:"T",mods:["Shift"]}],disabled:r=>!r.chartManager.chartView||!Ie.openWindows,callback:r=>r.windowManager.openWindow(new HS(r))},selectRegion:{label:"Select region",combos:[{key:"Tab",mods:[]}],disabled:r=>!r.chartManager.loadedChart&&r.chartManager.getMode()!=q.Edit,callback:r=>r.chartManager.selectRegion()},volumeUp:{label:"Increase master volume",combos:[{key:"Up",mods:["Alt"]}],disabled:!1,callback:()=>{_.audio.masterVolume=Math.min(_.audio.masterVolume+.05,1),Ee.create("Master volume: "+Math.round(_.audio.masterVolume*100)+"%")}},volumeDown:{label:"Decrease master volume",combos:[{key:"Down",mods:["Alt"]}],disabled:!1,callback:()=>{_.audio.masterVolume=Math.max(_.audio.masterVolume-.05,0),Ee.create("Master volume: "+Math.round(_.audio.masterVolume*100)+"%")}},songVolumeUp:{label:"Increase song volume",combos:[{key:"Up",mods:["Shift","Alt"]}],disabled:!1,callback:()=>{_.audio.songVolume=Math.min(_.audio.songVolume+.05,1),Ee.create("Song volume: "+Math.round(_.audio.songVolume*100)+"%")}},songVolumeDown:{label:"Decrease song volume",combos:[{key:"Down",mods:["Shift","Alt"]}],disabled:!1,callback:()=>{_.audio.songVolume=Math.max(_.audio.songVolume-.05,0),Ee.create("Song volume: "+Math.round(_.audio.songVolume*100)+"%")}},effectvolumeUp:{label:"Increase tick/metronome volume",combos:[{key:"Up",mods:["Shift",ut,"Alt"]}],disabled:!1,callback:()=>{_.audio.soundEffectVolume=Math.min(_.audio.soundEffectVolume+.05,1),Ee.create("Effect volume: "+Math.round(_.audio.soundEffectVolume*100)+"%")}},effectvolumeDown:{label:"Decrease tick/metronome volume",combos:[{key:"Down",mods:["Shift",ut,"Alt"]}],disabled:!1,callback:()=>{_.audio.soundEffectVolume=Math.max(_.audio.soundEffectVolume-.05,0),Ee.create("Effect Volume: "+Math.round(_.audio.soundEffectVolume*100)+"%")}},rateUp:{label:"Increase playback rate",combos:[{key:"Right",mods:["Shift"]}],disabled:r=>r.chartManager.getMode()==q.Play||r.chartManager.getMode()==q.Record,callback:()=>{_.audio.rate+=.05,Ee.create("Playback Rate: "+Math.round(_.audio.rate*100)+"%")}},rateDown:{label:"Decrease playback rate",combos:[{key:"Left",mods:["Shift"]}],disabled:r=>r.chartManager.getMode()==q.Play||r.chartManager.getMode()==q.Record,callback:()=>{_.audio.rate=Math.max(_.audio.rate-.05,.1),Ee.create("Playback Rate: "+Math.round(_.audio.rate*100)+"%")}},rateDefault:{label:"Reset playback rate",combos:[],disabled:!1,callback:()=>{_.audio.rate=1,Ee.create("Playback Rate: "+Math.round(_.audio.rate)+"%")}},previousMeasure:{label:"Previous measure",combos:[{key:"PageUp",mods:[]},{key:";",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==q.Play||r.chartManager.getMode()==q.Record,callback:r=>{const e=r.chartManager.beat,t=r.chartManager.loadedChart.timingData.getMeasureLength(e-.001);r.chartManager.snapToNearestTick(Math.max(0,e-t))}},nextMeasure:{label:"Next measure",combos:[{key:"PageDown",mods:[]},{key:"'",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==q.Play||r.chartManager.getMode()==q.Record,callback:r=>{const e=r.chartManager.beat,t=r.chartManager.loadedChart.timingData.getMeasureLength(e);r.chartManager.snapToNearestTick(Math.max(0,e+t))}},previousNote:{label:"Previous note",combos:[{key:",",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==q.Play||r.chartManager.getMode()==q.Record,callback:r=>r.chartManager.previousNote()},nextNote:{label:"Next note",combos:[{key:".",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==q.Play||r.chartManager.getMode()==q.Record,callback:r=>r.chartManager.nextNote()},jumpChartStart:{label:"Jump to first note",combos:[],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==q.Play||r.chartManager.getMode()==q.Record,callback:r=>r.chartManager.firstNote()},jumpChartEnd:{label:"Jump to last note",combos:[],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==q.Play||r.chartManager.getMode()==q.Record,callback:r=>r.chartManager.lastNote()},jumpSongStart:{label:"Jump to song start",combos:[{key:"Home",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==q.Play||r.chartManager.getMode()==q.Record,callback:r=>r.chartManager.beat=Math.max(0,r.chartManager.loadedChart.getBeatFromSeconds(0))},jumpSongEnd:{label:"Jump to song end",combos:[{key:"End",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==q.Play||r.chartManager.getMode()==q.Record,callback:r=>r.chartManager.beat=r.chartManager.loadedChart.getBeatFromSeconds(r.chartManager.chartAudio.getSongLength())},assistTick:{label:"Assist tick",combos:[{key:"F7",mods:[]}],disabled:()=>!Ie.assist,callback:()=>{_.audio.assistTick=!_.audio.assistTick,Ee.create("Assist Tick: "+(_.audio.assistTick?"on":"off"))}},metronome:{label:"Metronome",combos:[{key:"F7",mods:["Alt"]}],disabled:()=>!Ie.assist,callback:()=>{_.audio.metronome=!_.audio.metronome,Ee.create("Metronome: "+(_.audio.metronome?"on":"off"))}},XMod:{label:"XMod (Beat-based)",combos:[{key:"X",mods:["Shift"]}],disabled:!1,callback:()=>{_.chart.CMod=!1,Ee.create("Switched to XMod")}},CMod:{label:"CMod (Time-based)",combos:[{key:"C",mods:["Shift"]}],disabled:!1,callback:()=>{_.chart.CMod=!0,Ee.create("Switched to CMod")}},reverse:{label:"Reverse playfield",combos:[],disabled:!1,callback:()=>{_.chart.reverse=!_.chart.reverse,Ee.create("Reverse Playfield: "+(_.chart.reverse?"on":"off"))}},hideWarpedArrows:{label:"Hide warped notes (CMod only)",combos:[{key:"W",mods:["Shift"]}],disabled:!1,callback:()=>{_.chart.hideWarpedArrows=!_.chart.hideWarpedArrows,Ee.create("Hide Warped Arrows: "+(_.chart.hideWarpedArrows?"on":"off"))}},hideFakedArrows:{label:"Hide faked notes (CMod only)",combos:[{key:"F",mods:["Shift"]}],disabled:!1,callback:()=>{_.chart.hideFakedArrows=!_.chart.hideFakedArrows,Ee.create("Hide Faked Arrows: "+(_.chart.hideFakedArrows?"on":"off"))}},doSpeedChanges:{label:"Do speed changes (XMod only)",combos:[{key:"S",mods:["Shift"]}],disabled:!1,callback:()=>{_.chart.doSpeedChanges=!_.chart.doSpeedChanges,Ee.create("Speed Changes: "+(_.chart.doSpeedChanges?"on":"off"))}},showEq:{label:"Equalizer",combos:[{key:"E",mods:["Shift"]}],disabled:r=>!r.chartManager.chartAudio||!Ie.openWindows,callback:r=>r.windowManager.openWindow(new mS(r))},detectSync:{label:"Detect audio sync",combos:[{key:"L",mods:["Shift"]}],disabled:r=>!r.chartManager.chartAudio||!Ie.openWindows,callback:r=>r.windowManager.openWindow(new _y(r))},previousNoteType:{label:"Previous note type",combos:[{key:"N",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==q.Play||r.chartManager.getMode()==q.Record,callback:r=>r.chartManager.previousNoteType()},nextNoteType:{label:"Next note type",combos:[{key:"M",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==q.Play||r.chartManager.getMode()==q.Record,callback:r=>r.chartManager.nextNoteType()},undo:{label:"Undo",combos:[{key:"Z",mods:[ut]}],disabled:r=>!r.actionHistory.canUndo()||r.chartManager.getMode()!=q.Edit,callback:r=>r.actionHistory.undo()},redo:{label:"Redo",combos:[{key:"Y",mods:[ut]},{key:"Z",mods:[ut,"Shift"]}],disabled:r=>!r.actionHistory.canRedo()||r.chartManager.getMode()!=q.Edit,callback:r=>r.actionHistory.redo()},mousePlacement:{label:"Enable Mouse Note Placement",combos:[{key:"M",mods:["Shift"]}],disabled:!1,callback:()=>{_.chart.mousePlacement=!_.chart.mousePlacement,Ee.create("Mouse Note Placement: "+(_.chart.mousePlacement?"on":"off"))}},playMode:{label:"Enter/Exit Play Mode",combos:[{key:"P",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==q.Record||!Ie.playMode,callback:r=>r.chartManager.setMode(q.Play)},recordMode:{label:"Enter/Exit Record Mode",combos:[{key:"R",mods:[]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==q.Play||r.chartManager.getMode()==q.View||!Ie.recordMode,callback:r=>r.chartManager.setMode(q.Record)},playModeStart:{label:"Play from start",combos:[{key:"P",mods:["Shift"]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==q.Record||!Ie.playMode,callback:r=>{r.chartManager.beat=0,r.chartManager.setMode(q.Play)}},recordModeStart:{label:"Record from start",combos:[{key:"R",mods:["Shift"]}],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()==q.Play||r.chartManager.getMode()==q.View||!Ie.recordMode,callback:r=>r.chartManager.setMode(q.Record)},options:{label:"Options...",bindLabel:"Edit options",combos:[{key:",",mods:[ut]}],disabled:()=>!Ie.openWindows||!Ie.openWindows,callback:r=>{r.windowManager.openWindow(new GS(r))}},keybinds:{label:"Keybinds...",bindLabel:"Edit keybinds",combos:[],disabled:()=>!Ie.openWindows||!Ie.openWindows,callback:r=>{r.windowManager.openWindow(new Hi(r))}},gameplayKeybinds:{label:"Gameplay keybinds...",bindLabel:"Edit gameplay keybinds",combos:[],disabled:()=>!Ie.openWindows||!Ie.openWindows,callback:r=>{r.windowManager.openWindow(new vS(r))}},themes:{label:"Themes...",bindLabel:"Edit themes",combos:[],disabled:()=>!Ie.openWindows||!Ie.openWindows||ma.isOpen,callback:r=>{r.windowManager.openWindow(new zc(r))}},convertHoldsRolls:{label:"Holds to rolls",bindLabel:"Convert holds to rolls",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=q.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.type=="Hold"&&(e.type="Roll"),e))}},convertRollsHolds:{label:"Rolls to holds",bindLabel:"Convert rolls to holds",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=q.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.type=="Roll"&&(e.type="Hold"),e))}},swapHoldsRolls:{label:"Swap holds and rolls",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=q.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.type=="Hold"?e.type="Roll":e.type=="Roll"&&(e.type="Hold"),e))}},convertHoldsTaps:{label:"Holds/rolls to taps",bindLabel:"Convert holds/rolls to taps",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=q.Edit,callback:r=>{r.chartManager.modifySelection(e=>((e.type=="Hold"||e.type=="Roll")&&(e.type="Tap"),e))}},convertTapsMines:{label:"Taps to mines",bindLabel:"Convert taps to mines",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=q.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.type=="Tap"&&(e.type="Mine"),e))}},convertTapsLifts:{label:"Taps to lifts",bindLabel:"Convert taps to lifts",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=q.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.type=="Tap"&&(e.type="Lift"),e))}},convertTapsFakes:{label:"Taps to fakes",bindLabel:"Convert taps to fakes",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=q.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.type=="Tap"&&(e.type="Fake"),e))}},mirrorHorizontally:{label:"Horizontally",bindLabel:"Mirror horizontally",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=q.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.col=r.chartManager.loadedChart.gameType.flipColumns.horizontal[e.col],e))}},mirrorVertically:{label:"Vertically",bindLabel:"Mirror vertically",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=q.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.col=r.chartManager.loadedChart.gameType.flipColumns.vertical[e.col],e))}},mirrorBoth:{label:"Both",bindLabel:"Mirror both",combos:[],disabled:r=>r.chartManager.selection.notes.length==0||r.chartManager.getMode()!=q.Edit,callback:r=>{r.chartManager.modifySelection(e=>(e.col=r.chartManager.loadedChart.gameType.flipColumns.horizontal[e.col],e.col=r.chartManager.loadedChart.gameType.flipColumns.vertical[e.col],e))}},selectBeforeCursor:{label:"Select before cursor",combos:[{key:"Home",mods:["Shift"]}],disabled:r=>!r.chartManager.loadedChart,callback:r=>{r.chartManager.editTimingMode==Pe.Off?r.chartManager.setNoteSelection(r.chartManager.loadedChart.getNotedata().filter(e=>e.beate.beat!r.chartManager.loadedChart,callback:r=>{r.chartManager.editTimingMode==Pe.Off?r.chartManager.setNoteSelection(r.chartManager.loadedChart.getNotedata().filter(e=>e.beat>r.chartManager.beat)):r.chartManager.setEventSelection(r.chartManager.loadedChart.timingData.getTimingData().filter(e=>e.beat>r.chartManager.beat))}},selectAll:{label:"Select all",combos:[{key:"A",mods:[ut]}],disabled:r=>!r.chartManager.loadedChart,callback:r=>{r.chartManager.editTimingMode==Pe.Off?r.chartManager.setNoteSelection(r.chartManager.loadedChart.getNotedata()):r.chartManager.setEventSelection(r.chartManager.loadedChart.timingData.getTimingData())}},expand2to1:{label:"Expand 2:1 (8th to 4th)",combos:[],disabled:r=>r.chartManager.selection.notes.length<2||r.chartManager.getMode()!=q.Edit,callback:r=>{const e=Math.min(...r.chartManager.selection.notes.map(t=>t.beat));r.chartManager.modifySelection(t=>(t.beat=(t.beat-e)*2+e,t.beat=Math.round(t.beat*48)/48,Re(t)&&(t.hold*=2,t.hold=Math.round(t.hold*48)/48),t))}},expand3to2:{label:"Expand 3:2 (12th to 8th)",combos:[],disabled:r=>r.chartManager.selection.notes.length<2||r.chartManager.getMode()!=q.Edit,callback:r=>{const e=Math.min(...r.chartManager.selection.notes.map(t=>t.beat));r.chartManager.modifySelection(t=>(t.beat=(t.beat-e)*1.5+e,t.beat=Math.round(t.beat*48)/48,Re(t)&&(t.hold*=1.5,t.hold=Math.round(t.hold*48)/48),t))}},expand4to3:{label:"Expand 4:3 (16th to 2th)",combos:[],disabled:r=>r.chartManager.selection.notes.length<2||r.chartManager.getMode()!=q.Edit,callback:r=>{const e=Math.min(...r.chartManager.selection.notes.map(t=>t.beat));r.chartManager.modifySelection(t=>(t.beat=(t.beat-e)*4/3+e,t.beat=Math.round(t.beat*48)/48,Re(t)&&(t.hold*=4/3,t.hold=Math.round(t.hold*48)/48),t))}},compress1to2:{label:"Compress 1:2 (4th to 8th)",combos:[],disabled:r=>r.chartManager.selection.notes.length<2||r.chartManager.getMode()!=q.Edit,callback:r=>{const e=Math.min(...r.chartManager.selection.notes.map(t=>t.beat));r.chartManager.modifySelection(t=>(t.beat=(t.beat-e)/2+e,t.beat=Math.round(t.beat*48)/48,Re(t)&&(t.hold/=2,t.hold=Math.round(t.hold*48)/48),t))}},compress2to3:{label:"Compress 2:3 (8th to 12th)",combos:[],disabled:r=>r.chartManager.selection.notes.length<2||r.chartManager.getMode()!=q.Edit,callback:r=>{const e=Math.min(...r.chartManager.selection.notes.map(t=>t.beat));r.chartManager.modifySelection(t=>(t.beat=(t.beat-e)/1.5+e,t.beat=Math.round(t.beat*48)/48,Re(t)&&(t.hold/=1.5,t.hold=Math.round(t.hold*48)/48),t))}},compress3to4:{label:"Compress 3:4 (12th to 16th)",combos:[],disabled:r=>r.chartManager.selection.notes.length<2||r.chartManager.getMode()!=q.Edit,callback:r=>{const e=Math.min(...r.chartManager.selection.notes.map(t=>t.beat));r.chartManager.modifySelection(t=>(t.beat=(t.beat-e)*.75+e,t.beat=Math.round(t.beat*48)/48,Re(t)&&(t.hold*=.75,t.hold=Math.round(t.hold*48)/48),t))}},delete:{label:"Delete",combos:[{key:"Backspace",mods:[]},{key:"Delete",mods:[]}],disabled:r=>r.chartManager.getMode()!=q.Edit||r.chartManager.selection.notes.length==0&&r.chartManager.eventSelection.timingEvents.length==0,callback:r=>{r.chartManager.deleteSelection(),r.chartManager.deleteEventSelection()}},paste:{label:"Paste",combos:[{mods:[ut],key:"V"}],preventDefault:!1,disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()!=q.Edit,callback:async r=>{const e=await navigator.clipboard.readText();r.chartManager.paste(e)}},pasteReplace:{label:"Clear and paste",combos:[{mods:[ut,"Shift"],key:"V"}],preventDefault:!1,disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()!=q.Edit,callback:async r=>{const e=await navigator.clipboard.readText();r.chartManager.paste(e,!0)}},copy:{label:"Copy",combos:[{mods:[ut],key:"C"}],preventDefault:!1,disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()!=q.Edit||!r.chartManager.hasSelection(),callback:async r=>{const e=r.chartManager.copy();e&&await navigator.clipboard.writeText(e)}},cut:{label:"Cut",combos:[{mods:[ut],key:"X"}],preventDefault:!1,disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()!=q.Edit||!r.chartManager.hasSelection(),callback:async r=>{const e=r.chartManager.copy();e&&await navigator.clipboard.writeText(e),r.chartManager.deleteSelection()}},adjustOffset:{label:"Adjust offset",combos:[],disabled:()=>!Ie.openWindows,callback:r=>r.windowManager.openWindow(new CS(r))},setSongPreview:{label:"Set as song preview",combos:[],disabled:r=>!r.chartManager.chartView||r.chartManager.getMode()!=q.Edit||!r.chartManager.hasRange(),callback:r=>{const e=r.chartManager.loadedChart,t=r.chartManager.loadedSM.properties.SAMPLESTART??"0",i=r.chartManager.loadedSM.properties.SAMPLELENGTH??"10";let s="",n="";if(r.chartManager.startRegion!==void 0&&r.chartManager.endRegion!==void 0){const a=e.getSecondsFromBeat(r.chartManager.startRegion),o=e.getSecondsFromBeat(r.chartManager.endRegion);s=ae(a,3).toString(),n=ae(o-a,3).toString()}else{const o=(r.chartManager.selection.notes.length>0?r.chartManager.selection.notes:r.chartManager.eventSelection.timingEvents).map(u=>u.beat),l=e.getSecondsFromBeat(Math.min(...o)),c=e.getSecondsFromBeat(Math.max(...o));s=ae(l,3).toString(),n=ae(c-l,3).toString()}gt.instance.run({action:a=>{a.chartManager.loadedSM.properties.SAMPLESTART=s,a.chartManager.loadedSM.properties.SAMPLELENGTH=n},undo:()=>{r.chartManager.loadedSM.properties.SAMPLESTART=t,r.chartManager.loadedSM.properties.SAMPLELENGTH=i}})}},showDebugTimers:{label:"Toggle Debug Timers",combos:[{key:"F3",mods:["Shift"]}],disabled:!1,callback:()=>{_.debug.showTimers=!_.debug.showTimers}},showFPSCounter:{label:"Toggle FPS Counter",combos:[{key:"F3",mods:[]}],disabled:!1,callback:()=>{_.debug.showFPS=!_.debug.showFPS}},noteTypeTap:{label:"Switch to Taps",combos:[],disabled:r=>!r.chartManager.chartView,callback:r=>{r.chartManager.setEditingNoteType("Tap")}},noteTypeLift:{label:"Switch to Lifts",combos:[],disabled:r=>!r.chartManager.chartView,callback:r=>{r.chartManager.setEditingNoteType("Lift")}},noteTypeMine:{label:"Switch to Mines",combos:[],disabled:r=>!r.chartManager.chartView,callback:r=>{r.chartManager.setEditingNoteType("Mine")}},noteTypeFake:{label:"Switch to Fakes",combos:[],disabled:r=>!r.chartManager.chartView,callback:r=>{r.chartManager.setEditingNoteType("Fake")}},openGuide:{label:"Open Help Guide",combos:[],disabled:!1,callback:()=>{window.open("/smeditor/guide/")}},noteskinWindow:{label:"Noteskins...",bindLabel:"Open Noteskin Window",combos:[{mods:["Shift"],key:"N"}],disabled:r=>!r.chartManager.chartView,callback:r=>r.windowManager.openWindow(new SS(r))},previousChart:{label:"Previous chart",combos:[{key:"F5",mods:[]}],disabled:r=>!r.chartManager.chartView,callback:r=>{if(!r.chartManager.loadedSM?.charts||!r.chartManager.loadedChart)return;const e=r.chartManager.loadedSM?.charts[r.chartManager.loadedChart.gameType.id],t=e.indexOf(r.chartManager.loadedChart);e[t-1]&&r.chartManager.loadChart(e[t-1])}},nextChart:{label:"Next chart",combos:[{key:"F6",mods:[]}],disabled:r=>!r.chartManager.chartView,callback:r=>{if(!r.chartManager.loadedSM?.charts||!r.chartManager.loadedChart)return;const e=r.chartManager.loadedSM?.charts[r.chartManager.loadedChart.gameType.id],t=e.indexOf(r.chartManager.loadedChart);e[t+1]&&r.chartManager.loadChart(e[t+1])}},toggleEditTiming:{label:"Toggle Edit Timing",combos:[{key:"T",mods:[]}],disabled:r=>!r.chartManager.chartView,callback:r=>{r.chartManager.editTimingMode!=Pe.Off?r.chartManager.editTimingMode=Pe.Off:r.chartManager.editTimingMode=Pe.Edit}},toggleAddTiming:{label:"Toggle Add Timing",combos:[{key:"T",mods:["Alt"]}],disabled:r=>!r.chartManager.chartView,callback:r=>{r.chartManager.editTimingMode!=Pe.Add?r.chartManager.editTimingMode=Pe.Add:r.chartManager.editTimingMode=Pe.Edit}}};for(const r of[4,2,1])nt[`shiftUp${r}m`]={label:`${r} measure`+(r==1,""),bindLabel:`Shift up by ${r} measure`+(r==1,""),combos:[],disabled:e=>!e.chartManager.chartView,callback:e=>{const t=e.chartManager.selection.notes[0].beat,i=e.chartManager.loadedChart.timingData.getMeasureLength(t);e.chartManager.modifySelection(s=>(s.beat-=i*r,s),!0)}},nt[`shiftDown${r}m`]={label:`${r} measure`+(r==1,""),bindLabel:`Shift down by ${r} measure`+(r==1,""),combos:[],disabled:e=>!e.chartManager.chartView,callback:e=>{const t=e.chartManager.selection.notes[0].beat,i=e.chartManager.loadedChart.timingData.getMeasureLength(t);e.chartManager.modifySelection(s=>(s.beat+=i*r,s),!0)}};for(let r=0;r!e.chartManager.chartView,callback:()=>{_.chart.snap=lr[r]}},nt[`shiftUp${Li[r]}`]={label:`${Li[r]}`,bindLabel:`Shift up by ${Li[r]}`,combos:[],disabled:e=>!e.chartManager.chartView,callback:e=>e.chartManager.modifySelection(t=>(t.beat-=lr[r],t),!0)},nt[`shiftDown${Li[r]}`]={label:`${Li[r]}`,bindLabel:`Shift down by ${Li[r]}`,combos:[],disabled:e=>!e.chartManager.chartView,callback:e=>e.chartManager.modifySelection(t=>(t.beat+=lr[r],t),!0)},r!=lr.length-1&&(nt["quantize"+Li[r]]={label:`${Li[r]}s`,bindLabel:`Quantize to ${Li[r]}s`,combos:[],disabled:e=>e.chartManager.selection.notes.length==0||e.chartManager.getMode()!=q.Edit,callback:e=>{e.chartManager.modifySelection(t=>(t.beat=e.chartManager.getClosestTick(t.beat,Yp[r]),t.beat=Math.round(t.beat*48)/48,t))}});class Fd{static popup;static build(e){const t=document.createElement("div");t.classList.add("update-popup");const i=document.createElement("div");i.classList.add("title"),i.innerText=e.title;const s=document.createElement("div");s.classList.add("desc"),s.innerText=e.desc;const n=document.createElement("div");if(n.classList.add("update-options"),t.replaceChildren(i,s),e.options.length>0){for(const a of e.options){const o=document.createElement("button");o.innerText=a.label,o.onclick=()=>{a.callback?.(this)},o.classList.add(a.type),n.appendChild(o)}t.appendChild(n)}this.popup=t,document.getElementById("popups")?.appendChild(this.popup)}static close(){this.popup&&(this.popup.classList.add("exiting"),this.popup.style.pointerEvents="none",setTimeout(()=>this.popup.remove(),300))}}class WS extends Fd{static open(e,t){super.build({title:`A new version of the desktop app is available! (${e})`,desc:"Click here to download the new version.",options:[{label:"Close",type:"default",callback:()=>this.close()},{label:"Download",type:"confirm",callback:()=>{localStorage.setItem("downloadedVersion",e),nw.require("nw.gui").Shell.openExternal(t),this.close()}}]})}}class zS extends Fd{static open(e){super.build({title:"A new version of the app is available!",desc:"Refresh the page to get the new version.",options:[{label:"Close",type:"default",callback:()=>this.close()},{label:"Refresh",type:"confirm",callback:()=>{e()}}]})}}class jS extends Fd{static open(){super.build({title:"SMEditor was loaded offline!",desc:"You can now use SMEditor without an internet connection.",options:[]}),setTimeout(()=>this.close(),5e3)}}class jt extends hg{static graphics=new Sn;static textures={default:Ft.create({width:50,height:50}),noBorder:Ft.create({width:50,height:50}),onlyBorder:Ft.create({width:50,height:50})};static init(e){this.textures.default=Ft.create({width:50,height:50,resolution:e.resolution}),this.textures.noBorder=Ft.create({width:50,height:50,resolution:e.resolution}),this.textures.onlyBorder=Ft.create({width:50,height:50,resolution:e.resolution}),this.graphics.beginFill(16777215,1),this.graphics.lineStyle(1,0),this.graphics.drawRoundedRect(0,0,50,50,5),this.graphics.endFill(),e.render(this.graphics,{renderTexture:this.textures.default}),this.graphics.clear(),this.graphics.beginFill(16777215,1),this.graphics.lineStyle(0,16777215),this.graphics.drawRoundedRect(0,0,50,50,5),this.graphics.endFill(),e.render(this.graphics,{renderTexture:this.textures.noBorder}),this.graphics.clear(),this.graphics.beginFill(16777215,0),this.graphics.lineStyle(2,16777215),this.graphics.drawRoundedRect(0,0,50,50,5),this.graphics.endFill(),e.render(this.graphics,{renderTexture:this.textures.onlyBorder})}constructor(e){super(jt.textures[e??"default"],5,5,5,5)}}const qn=[];function _f(){return qn.length}function dM(){for(qn.push(Date.now());qn.length>0&&qn[0]0&&Kn[0]_f()+" FPS"});drawUpdateTimeGraph=new Nn({width:300,height:wi,color:6034982,min:0,unit:"ms",label:"DrawUpdate",precision:1});updateTimeGraph=new Nn({width:300,height:wi,color:1516101,min:0,unit:"ms",label:"Update",precision:1,sublabel:()=>xf()+" TPS"});memoryTimeGraph=new Nn({width:300,height:wi,color:6626406,min:0,formatter:e=>Math.round(e/1048576)+" MB",label:"Memory"});cpuGraph=new Nn({width:300,height:wi,color:5190685,min:0,label:"CPU"});graphs=new Ae;fpsCounter=new Ae;fpsBg=new jt("noBorder");fpsText=new Oe("",{fontName:"Main",fontSize:12});lastFrameTime=0;constructor(e){super(e),this.drawUpdateTimeGraph.y+=wi+5,this.updateTimeGraph.y+=(wi+5)*2,this.memoryTimeGraph.y+=(wi+5)*3,this.cpuGraph.y+=(wi+5)*4,ga.instance=this,this.fpsText.x=5,this.fpsBg.y=-5,et(this.fpsBg,"widget-bg"),et(this.fpsText,"text-color"),this.graphs.addChild(this.frameTimeGraph,this.drawUpdateTimeGraph,this.updateTimeGraph),performance.memory&&this.graphs.addChild(this.memoryTimeGraph),this.fpsCounter.addChild(this.fpsBg,this.fpsText),this.graphs.visible=_.debug.showTimers,this.fpsCounter.visible=_.debug.showFPS,this.addChild(this.graphs,this.fpsCounter)}update(){this.x=-this.manager.app.renderer.screen.width/2+20,this.y=-this.manager.app.renderer.screen.height/2+20,this.graphs.children.forEach(e=>e.update()),this.graphs.visible=_.debug.showTimers,this.fpsCounter.visible=_.debug.showFPS,this.fpsText.text=`${_f()} FPS -${xf()} TPS -${this.lastFrameTime.toFixed(2)} ms -`,this.fpsBg.width=this.fpsText.width+10,this.fpsBg.height=this.fpsText.height+10,_.debug.showTimers?(this.fpsBg.y=(wi+5)*this.graphs.children.length-5,this.fpsText.y=(wi+5)*this.graphs.children.length):(this.fpsBg.y=-5,this.fpsText.y=0)}addMemoryTimeValue(e){this.memoryTimeGraph.addValue(e)}addFrameTimeValue(e){this.lastFrameTime=e,this.frameTimeGraph.addValue(e)}addUpdateTimeValue(e){this.updateTimeGraph.addValue(e)}addDrawUpdateTimeValue(e){this.drawUpdateTimeGraph.addValue(e)}}class Nn extends Ae{graphWidth;graphHeight;color;unit;precision;formatter;sublabel;maxEase=1;targetMax=1;minEase=1;targetMin=1;constrainedMin=null;constrainedMax=null;dataPoints=[];linePool=[];lineContainer;labelText;sublabelText;topText;bottomText;constructor(e){super();const{width:t,height:i,color:s=16777215,unit:n="",label:a="",min:o=null,max:l=null,precision:c=0,formatter:u=null,sublabel:h=()=>""}=e;this.graphWidth=t,this.graphHeight=i,this.color=s,this.unit=n,this.constrainedMax=l,this.constrainedMin=o,this.precision=c,this.formatter=u,this.sublabel=h,this.lineContainer=new dd(t,{position:!0},16384,!0);const d=new jt("noBorder");d.tint=0,d.alpha=.3,d.width=this.graphWidth,d.height=this.graphHeight,et(d,"text-color"),this.labelText=new Oe(a,{fontName:"Main",fontSize:Math.min(i/5,16)}),this.labelText.alpha=.8,this.sublabelText=new Oe("",{fontName:"Main",fontSize:Math.min(i/5,16)}),this.topText=new Oe("",{fontName:"Main",fontSize:Math.min(i/7,12)}),this.topText.anchor.x=1,this.topText.alpha=.5,this.topText.x=this.graphWidth,this.bottomText=new Oe("",{fontName:"Main",fontSize:Math.min(i/7,12)}),this.bottomText.anchor.x=1,this.bottomText.anchor.y=1,this.bottomText.alpha=.5,this.bottomText.x=this.graphWidth,this.bottomText.y=this.graphHeight,this.sublabelText.y=this.graphHeight,this.sublabelText.anchor.y=1,this.sublabelText.alpha=.5,this.addChild(d,this.lineContainer,this.labelText,this.sublabelText,this.topText,this.bottomText)}addValue(e){if(this.lineContainer.children[0]?.x+this.lineContainer.x<0){const i=this.lineContainer.children[0];this.dataPoints.shift(),this.removeChild(i),this.linePool.push(i)}this.lineContainer.x-=1,this.lineContainer.x<-1e7&&(this.lineContainer.children.forEach(i=>{i.x-=1e7}),this.lineContainer.x+=1e7);const t=this.linePool.shift()??new Fe(ie.WHITE);t.width=1,t.anchor.x=.5,t.anchor.y=1,t.tint=this.color,t.alpha=.6,t.x=this.graphWidth-this.lineContainer.x,t.y=this.graphHeight,t.value=e,this.dataPoints.push(e),this.targetMax=this.constrainedMax!==null?this.constrainedMax:Math.max(...this.dataPoints),this.targetMin=this.constrainedMin!==null?this.constrainedMin:Math.min(...this.dataPoints),this.lineContainer.addChild(t)}update(){this.dataPoints.length!=0&&(this.maxEase=(this.maxEase-this.targetMax)*.1+this.targetMax,this.minEase=(this.minEase-this.targetMin)*.1+this.targetMin,this.lineContainer.children.forEach(e=>{e.height=Le((e.value-this.minEase)/this.maxEase,0,1)*this.graphHeight}),this.topText.text=this.formatter?.(this.maxEase)??`${ae(this.maxEase,this.precision)} ${this.unit}`,this.bottomText.text=this.formatter?.(this.minEase)??`${ae(this.minEase,this.precision)} ${this.unit}`,this.sublabelText.text=this.sublabel())}}class Ay extends Sa{backing=new jt("noBorder");overlay=new Fe(ie.WHITE);selectionOverlay=new Fe(ie.WHITE);container=new Ae;lastHeight=0;lastCMod;mouseDown=!1;queued=!1;verticalMargin=40;backingVerticalPadding=10;backingWidth=32;xOffset=20;constructor(e,t=20,i=32){super(e),this.backingWidth=i,this.xOffset=t,this.sortableChildren=!0,this.addChild(this.backing),this.addChild(this.container),this.visible=!1,et(this.backing,"widget-bg"),this.overlay.anchor.x=.5,this.overlay.anchor.y=0,this.overlay.alpha=.3,this.overlay.zIndex=10,this.lastCMod=_.chart.CMod,this.addChild(this.overlay),this.x=this.manager.app.renderer.screen.width/2-this.xOffset,K.on("chartLoaded",()=>{this.queued=!1,this.populate()}),K.on("chartModifiedAfter",()=>{this.queued||this.populate(),this.queued=!0});const s=setInterval(()=>{this.queued&&(this.queued=!1,this.populate())},3e3);this.on("destroyed",()=>clearInterval(s)),this.eventMode="static",this.on("mousedown",n=>{this.mouseDown=!0,this.handleMouse(n)}),this.on("mousemove",n=>{this.mouseDown&&this.handleMouse(n)}),this.on("mouseup",()=>{this.mouseDown=!1}),this.on("mouseleave",()=>{this.mouseDown=!1})}handleMouse(e){if(this.manager.chartManager.getMode()==q.Play||!this.getChart())return;let t=(this.container.toLocal(e.global).y+this.container.height/2)/this.container.height;t=Le(t,0,1),this.getChart().getNotedata().at(-1)&&(_.chart.CMod?this.manager.chartManager.time=Ht(-this.getChart().timingData.getOffset(),this.getChart().getLastSecond(),t):this.manager.chartManager.beat=this.getChart().getLastBeat()*t)}update(){this.scale.y=_.chart.reverse?-1:1;const e=this.manager.app.renderer.screen.height-this.verticalMargin;this.backing.height=e+this.backingVerticalPadding,this.backing.position.y=-this.backing.height/2,this.backing.position.x=-this.backing.width/2,this.x=this.manager.app.renderer.screen.width/2-this.xOffset;const t=this.getChart(),i=this.manager.chartManager.chartView;if(!t||!i||!Ie.layout){this.visible=!1;return}if(this.visible=!0,!t.getNotedata().at(-1)){this.overlay.height=0;return}const n=_.chart.CMod?i.getSecondFromYPos(-this.manager.app.renderer.screen.height/2):i.getBeatFromYPos(-this.manager.app.renderer.screen.height/2,!0),a=_.chart.CMod?i.getSecondFromYPos(this.manager.app.renderer.screen.height/2):i.getBeatFromYPos(this.manager.app.renderer.screen.height/2,!0),o=this.getYFromRange(t,n,a);this.overlay.y=o.startY,this.overlay.height=o.endY-o.startY,this.overlay.height=Math.max(2,this.overlay.height);const l=this.manager.chartManager.selection.notes;if(l.length<1)this.selectionOverlay.visible=!1;else{this.selectionOverlay.visible=!0;let c,u;_.chart.CMod?(c=Jp(l.map(d=>d.second)),u=Qp(l.map(d=>t.getSecondsFromBeat(Zi(d))))):(c=Jp(l.map(d=>d.beat)),u=Qp(l.map(d=>Zi(d))));const h=this.getYFromRange(t,c,u);this.selectionOverlay.y=h.startY,this.selectionOverlay.height=h.endY-h.startY,this.selectionOverlay.height=Math.max(2,this.selectionOverlay.height)}(this.manager.app.renderer.screen.height!=this.lastHeight||this.lastCMod!=_.chart.CMod)&&(this.lastCMod=_.chart.CMod,this.lastHeight=this.manager.app.renderer.screen.height,this.updateDimensions(),this.populate())}getYFromRange(e,t,i){const s=e.getLastBeat(),n=e.getLastSecond();let a=Nt(0,s,t),o=Nt(0,s,i);_.chart.CMod&&(a=Nt(-e.timingData.getOffset(),n,t),o=Nt(-e.timingData.getOffset(),n,i)),a=Le(a,0,1),o=Le(o,0,1),a>o&&([a,o]=[o,a]);const l=(a-.5)*this.container.height,c=(o-.5)*this.container.height;return{startY:l,endY:c}}updateDimensions(){if(!this.getChart())return;const t=this.manager.app.renderer.screen.height-this.verticalMargin;this.backing.height=t+this.backingVerticalPadding,this.backing.width=this.backingWidth,this.overlay.width=this.backingWidth,this.selectionOverlay.width=this.backingWidth,this.pivot.x=this.backing.width/2}populate(){}getChart(){return this.manager.chartManager.loadedChart}}class XS extends Ay{npsGraph;graphGradient=null;graphWidth=40;npsText=new Oe("",{fontName:"Main",fontSize:12});constructor(e){super(e,60,40),this.graphWidth=40,this.graphGradient=this.makeGradient(),this.npsGraph=new Sn,this.container.addChild(this.npsGraph),this.npsText.visible=!1,this.npsText.anchor.x=1,this.npsText.anchor.y=.5,et(this.npsText,"text-color"),this.addChild(this.npsText),K.on("userOptionUpdated",i=>{(i=="chart.npsGraph.color1"||i=="chart.npsGraph.color2")&&(this.graphGradient=this.makeGradient(),this.populate())}),this.on("mouseleave",()=>{this.hideNpsDisplay()}),this.on("mouseenter",()=>{this.showNpsDisplay()}),this.on("mousemove",i=>{this.updateNpsDisplay(i)}),this.populate()}updateNpsDisplay(e){const t=this.getChart();if(!t){this.npsText.visible=!1;return}if(!t.getNotedata().at(-1)){this.npsText.visible=!1;return}const s=t.getNPSGraph();let n=this.npsGraph.toLocal(e.global).y/this.npsGraph.height;n=Le(n,0,1);let a=Ht(0,t.getLastBeat(),n);if(_.chart.CMod){const c=Ht(-t.timingData.getOffset(),t.getLastSecond(),n);a=t.timingData.getBeatFromSeconds(c)}const o=Math.floor(t.timingData.getMeasure(a)),l=s[o]??0;this.npsText.text=l.toFixed(1)+" nps",this.npsText.position.y=this.getYFromBeat(a)-this.npsGraph.height/2,this.npsText.position.x=-this.backing.width/2-10,this.npsText.visible=!0}hideNpsDisplay(){this.npsText.visible=!1}showNpsDisplay(){const e=this.getChart();if(!e){this.npsText.visible=!1;return}if(!e.getNotedata().at(-1)){this.npsText.visible=!1;return}this.npsText.visible=!0}update(){if(!_.chart.npsGraph.enabled){this.visible=!1;return}this.visible=!0;const e=this.manager.getChildByName("note-layout");e!==void 0&&e.visible?this.xOffset=e.backingWidth+28:this.xOffset=20,this.npsText.scale.y=_.chart.reverse?-1:1,super.update()}populate(){const e=this.getChart();if(!e)return;const t=this.manager.app.renderer.screen.height-40,i=e.getMaxNPS(),s=e.getNPSGraph(),n=e.getLastBeat();if(this.npsGraph.clear(),e.getNotedata().length==0)return;this.graphGradient?this.npsGraph.beginTextureFill({texture:this.graphGradient}):this.npsGraph.beginFill(0,1),this.npsGraph.pivot.x=this.backing.width/2,this.npsGraph.pivot.y=t/2;const a=s.length,o=this.getYFromBeat(0);this.npsGraph.moveTo(0,o);for(let h=0;h{this.popup?.contains(t.target)||(this.persistent=!1,this.close())},K.on("snapChanged",this.onSnapChange),this.popup.style.display="none",setTimeout(()=>this.movePosition(e)),this.moveInterval=setInterval(()=>this.movePosition(e),150),this.active=!0)}static movePosition(e){this.popup.style.display="";const t=e.getBounds(),i=t.left+t.width/2,s=200,n=s/2+15,a=window.innerWidth-s/2-15;this.popup.style.left=`${Le(i,n,a)}px`;const o=document.getElementById("pixi").offsetTop+9,l=(t.top+t.height+o)/2;this.popup.style.top=`${t.top+t.height+o}px`,l+this.popup.clientHeight>window.innerHeight-15&&(this.popup.style.transform="translate(-50%, -100%)",this.popup.style.top=`${t.top-t.height/2}px`)}static build(){const e=document.createElement("div");e.classList.add("popup");const t=document.createElement("div");t.classList.add("popup-zoomer"),t.style.width="200px",t.style.backgroundColor="#333333",e.appendChild(t),this.zoomer=t;const i=document.createElement("div");i.innerText="Snap Options",i.classList.add("popup-title"),t.appendChild(i);const s=document.createElement("div");s.classList.add("popup-flex"),t.appendChild(s);const n=document.createElement("div");n.classList.add("popup-row");const a=document.createElement("div");a.innerText="Snap to nearest ";const o=lt.create(_.chart.snap==0?0:Math.round(4/_.chart.snap),1,0,0,1e3);o.onChange=f=>{if(f===void 0){this.updateValues();return}f==0?_.chart.snap=0:_.chart.snap=4/f,this.updateValues()};const l=document.createElement("div");l.innerText=this.suffixSnap()+" note",n.replaceChildren(a,o.view,l);const c=document.createElement("div");c.classList.add("popup-row");const u=document.createElement("div");u.innerText="Snap every";const h=lt.create(_.chart.snap,.001,3,0);h.onChange=f=>{if(f===void 0){this.updateValues();return}f==0?_.chart.snap=0:_.chart.snap=f,this.updateValues()};const d=document.createElement("div");d.innerText=" beats",c.replaceChildren(u,h.view,d),s.replaceChildren(n,c),this.beatInput=h,this.divInput=o,this.divLabel=l;const p=document.createElement("div");return p.innerText="click to edit",p.style.marginTop="4px",p.style.height="10px",t.appendChild(p),p.classList.add("popup-desc"),this.editText=p,e}static updateValues(){document.activeElement==this.divInput.input||document.activeElement==this.beatInput.input||(this.divInput.setValue(_.chart.snap==0?0:Math.round(4/_.chart.snap)),this.divLabel.innerText=this.suffixSnap()+" note",this.beatInput.setValue(_.chart.snap))}static suffixSnap(){const e=_.chart.snap==0?0:Math.round(4/_.chart.snap);return e%10==1&&e!=11?"st":e%10==2&&e!=12?"nd":e%10==3&&e!=13?"rd":"th"}static close(){if(!this.popup||!this.active||this.persistent)return;window.removeEventListener("click",this.clickOutside,!0),this.popup.classList.add("exiting");const e=this.popup;setTimeout(()=>e.remove(),200),this.active=!1,this.persistent=!1,clearInterval(this.moveInterval),clearInterval(this.updateInterval),K.off("timingModified",this.onSnapChange)}static select(){this.persistent=!0,this.zoomer.classList.add("selected"),this.editText.style.transform="scale(0)",this.editText.style.height="0px",setTimeout(()=>window.addEventListener("click",this.clickOutside,!0),200)}}const YS={fontName:"Main",fontSize:10,fill:["#ffffff"]},Ey={4:15157287,8:4033015,12:11152884,16:8577607,24:14167723,32:15376696,48:15699179,64:7071886,96:8553090,192:8553090};class qS extends Ae{renderer;children=[];constructor(e){super(),this.renderer=e;for(let t=0;t<2;t++){const i=new Ae,s=new Sn,n=new Oe("4",YS);i.x=(t-.5)*(this.renderer.chart.gameType.notefieldWidth+48),s.rotation=Math.PI/4,s.lineStyle(1,0,1),s.beginFill(16777215),s.drawRect(-12,-12,24,24),s.endFill(),n.anchor.set(.5),i.addChild(s,n),this.addChild(i),i.eventMode="static",i.on("mouseenter",()=>Bh.open(s)),i.on("mousedown",()=>Bh.select()),i.on("mouseleave",()=>Bh.close())}}update(){this.y=this.renderer.getActualReceptorYPos(),this.visible=this.renderer.chartManager.getMode()!=q.Play;for(let e=0;e<2;e++){const t=this.children[e],i=t.children[0];i.tint=Ey[4/_.chart.snap]??7368816;const s=t.children[1];s.text=""+(_.chart.snap==0||4/_.chart.snap%1!=0?"":4/_.chart.snap)}}}class KS extends Ay{barContainer=new dd(1500,{position:!0,scale:!0,tint:!0},16384,!0);bars;barTexture;constructor(e){super(e),this.addChild(this.backing),this.addChild(this.container),this.visible=!1,this.name="note-layout",this.backing.tint=0,this.backing.alpha=.3,this.barTexture=Ft.create({resolution:this.manager.app.renderer.resolution}),this.bars=new Fe(this.barTexture),this.bars.anchor.set(.5),this.container.addChild(this.bars),this.populate()}update(){if(!_.chart.noteLayout.enabled){this.visible=!1;return}this.visible=!0,super.update()}populate(){const e=this.getChart();if(!e){Ji(this.barContainer.children,()=>!0),this.manager.app.renderer.render(this.barContainer,{renderTexture:this.barTexture});return}let t=0;const i=e.gameType.numCols,s=e.getNotedata().at(-1),n=this.manager.app.renderer.screen.height-40;if(this.barTexture.resize(i*6,n),this.backingWidth=i*6+8,this.updateDimensions(),!s){Ji(this.barContainer.children,()=>!0),this.manager.app.renderer.render(this.barContainer,{renderTexture:this.barTexture});return}const a=s.beat+(Re(s)?s.hold:0),o=e.getSecondsFromBeat(a),l=e.timingData.getOffset();e.getNotedata().forEach(c=>{let u=this.barContainer.children[t];u||(u=new Fe(ie.WHITE),u.width=4,this.barContainer.addChild(u)),u.anchor.set(.5),u.height=1,u.x=(c.col+.5)*6;let h=Nt(0,a,c.beat);if(_.chart.CMod&&(h=Nt(l,o,c.second)),u.y=h*n,u.tint=Ey[c.quant],c.type=="Mine"&&(u.tint=8421504),t++,Re(c)){let d=this.barContainer.children[t];d||(d=new Fe(ie.WHITE),d.width=4,d.height=2,this.barContainer.addChild(d)),d.anchor.x=.5,d.anchor.y=0,d.x=(c.col+.5)*6;const p=(_.chart.CMod?e.getSecondsFromBeat(c.beat+c.hold)/o:(c.beat+c.hold)/a)*n+1;d.y=u.y,d.height=p-u.y,c.type=="Hold"&&(d.tint=10526880),c.type=="Roll"&&(d.tint=11379586),t++}}),Ji(this.barContainer.children,(c,u)=>u>=t),this.manager.app.renderer.render(this.barContainer,{renderTexture:this.barTexture})}}const Ye=300,rt=150,Tf=[.045,.09,.18,.37,.18,.09,.045];class ZS extends Sa{max=0;barlines=new Ae;backgroundRect=new jt("noBorder");background=new Ae;backgroundLines=new Ae;statText=new Ae;meanText;medianText;modeText;stddevText;errorMS=[];texts=new Ae;showEase=0;toggled=!1;drag=!1;dragStart=0;lastMode=this.manager.chartManager.getMode();constructor(e){super(e),this.visible=!1,this.background.addChild(this.backgroundRect),et(this.backgroundRect,"widget-bg"),this.addChild(this.background),this.addChild(this.backgroundLines),this.eventMode="static",this.on("mousedown",()=>{this.manager.chartManager.getMode()!=q.Play&&(this.drag=!0,this.dragStart=Date.now(),Bt.stop("play-widget"))}),window.addEventListener("mousemove",f=>{this.drag&&(this.showEase+=f.movementY/-400)}),window.addEventListener("mouseup",()=>{this.drag&&(Date.now()-this.dragStart>400?this.toggled=this.showEase>.5:this.toggled=!this.toggled,Bt.animate(this,{0:{showEase:"inherit"},1:{showEase:this.toggled?1:0}},.6,Zt(.11,.71,.33,1.39),()=>{},"play-widget")),this.drag=!1}),this.on("mouseenter",()=>{!this.toggled&&this.manager.chartManager.getMode()!=q.Play&&Bt.animate(this,{0:{showEase:"inherit"},1:{showEase:.05}},.6,Zt(.11,.71,.33,1.39),()=>{},"play-widget")}),this.on("mouseleave",()=>{!this.toggled&&this.manager.chartManager.getMode()!=q.Play&&Bt.animate(this,{0:{showEase:"inherit"},1:{showEase:0}},.6,Zt(.11,.71,.33,1.39),()=>{},"play-widget")});const t=new Oe("Early",{fontName:"Main",fontSize:15});t.x=-Ye/2+5,t.y=-rt-40,t.alpha=.3,this.background.addChild(t),et(t,"text-color");const i=new Oe("Late",{fontName:"Main",fontSize:15});i.anchor.x=1,i.x=Ye/2-5,i.y=-rt-40,i.alpha=.3,this.background.addChild(i),et(i,"text-color"),this.meanText=new Oe("-",{fontName:"Main",fontSize:15}),this.meanText.anchor.x=.5,this.meanText.x=Ye/4*-1.5,this.meanText.y=-rt-70,this.statText.addChild(this.meanText),this.medianText=new Oe("-",{fontName:"Main",fontSize:15}),this.medianText.anchor.x=.5,this.medianText.x=Ye/4*-.5,this.medianText.y=-rt-70,this.statText.addChild(this.medianText),this.modeText=new Oe("-",{fontName:"Main",fontSize:15}),this.modeText.anchor.x=.5,this.modeText.x=Ye/4*.5,this.modeText.y=-rt-70,this.statText.addChild(this.modeText),this.stddevText=new Oe("-",{fontName:"Main",fontSize:15}),this.stddevText.anchor.x=.5,this.stddevText.x=Ye/4*1.5,this.stddevText.y=-rt-70,this.statText.addChild(this.stddevText);const s=new Oe("Mean",{fontName:"Main",fontSize:10});s.anchor.x=.5,s.x=Ye/4*-1.5,s.y=-rt-80,this.statText.addChild(s);const n=new Oe("Median",{fontName:"Main",fontSize:10});n.anchor.x=.5,n.x=Ye/4*-.5,n.y=-rt-80,this.statText.addChild(n);const a=new Oe("Mode",{fontName:"Main",fontSize:10});a.anchor.x=.5,a.x=Ye/4*.5,a.y=-rt-80,this.statText.addChild(a);const o=new Oe("Std Dev.",{fontName:"Main",fontSize:10});o.anchor.x=.5,o.x=Ye/4*1.5,o.y=-rt-80,this.statText.addChild(o),this.statText.children.forEach(f=>{et(f,"text-color")});const l=new Ae,c=new jt("noBorder");c.tint=3355443,c.alpha=.3,c.width=Ye/2-10,c.height=30,c.y=-25,c.x=-Ye/4,c.pivot.x=(Ye/2-10)/2,c.pivot.y=15;const u=new Oe("Adjust song offset",{fontName:"Main",fontSize:12});u.anchor.set(.5),u.x=-Ye/4,u.y=-25,l.addChild(c,u),l.eventMode="static",l.addEventListener("mouseenter",()=>{c.alpha=.6}),l.addEventListener("mousedown",f=>{f.stopImmediatePropagation(),this.adjustOffset("song")}),l.addEventListener("mouseleave",()=>{c.alpha=.3}),this.statText.addChild(l),et(u,"text-color");const h=new Ae,d=new jt("noBorder");d.tint=3355443,d.alpha=.3,d.width=Ye/2-10,d.height=30,d.y=-25,d.x=Ye/4,d.pivot.x=(Ye/2-10)/2,d.pivot.y=15,d.eventMode="static",h.addEventListener("mouseenter",()=>{d.alpha=.6}),h.addEventListener("mouseleave",()=>{d.alpha=.3});const p=new Oe("Adjust global offset",{fontName:"Main",fontSize:12});p.anchor.set(.5),p.x=Ye/4,p.y=-25,h.addChild(d,p),et(p,"text-color"),h.eventMode="static",h.addEventListener("mouseenter",()=>{d.alpha=.6}),h.addEventListener("mousedown",f=>{f.stopImmediatePropagation(),this.adjustOffset("global")}),h.addEventListener("mouseleave",()=>{d.alpha=.3}),this.statText.addChild(h),this.addChild(this.background),this.addChild(this.backgroundLines),this.eventMode="static",this.addChild(this.statText),this.addChild(this.barlines),this.addChild(this.texts)}update(){this.visible=!!this.manager.chartManager.gameStats,this.x=-this.manager.chartManager.app.renderer.screen.width/2+20+Ye/2,this.y=this.manager.chartManager.app.renderer.screen.height/2-20,this.backgroundRect.width=Ye+10,this.backgroundRect.height=rt+260,this.backgroundRect.x=-Ye/2-5,this.backgroundRect.y=-rt-260,this.visible=!!this.manager.chartManager.gameStats;for(const e of this.barlines.children)_.general.smoothAnimations?e.height=(e.targetHeight-e.height)*.2+e.height:e.height=e.targetHeight;this.lastMode!=this.manager.chartManager.getMode()&&(this.lastMode=this.manager.chartManager.getMode(),Bt.animate(this,{0:{showEase:"inherit"},1:{showEase:this.manager.chartManager.getMode()==q.Play?1:0}},.6,Zt(.11,.71,.33,1.39),()=>{},"play-widget")),_.general.smoothAnimations?this.y+=(1-Math.abs(this.showEase))*400:this.manager.chartManager.getMode()!=q.Play&&(this.y+=400)}newLine(){const e=new Fe(ie.WHITE);return e.smoothCount=0,e.targetHeight=0,e.anchor.y=1,e.anchor.x=.5,e.height=0,e.visible=!1,e}startPlay(){const e=this.manager.chartManager.gameStats;this.max=0,this.errorMS=[],this.meanText.text="-",this.medianText.text="-",this.modeText.text="-",this.stddevText.text="-",Ji(this.barlines.children,()=>!0),Ji(this.backgroundLines.children,()=>!0),Ji(this.texts.children,()=>!0);const t=Je.getCollection(_.play.timingCollection),i=t.getStandardWindows().length+1,s=Math.round(t.maxWindowMS());for(let f=0;fw.type==m&&!w.fake).length),g.alpha=.8,y.alpha=.8,y.name=m,this.texts.addChild(g),this.texts.addChild(y),g.x=-Ye/2+160,y.x=-Ye/2+290,g.y=80/l*n-rt-220,y.y=80/l*n++-rt-220,g.anchor.y=.5,y.anchor.y=.5,y.anchor.x=1}const c=new Oe("Max Combo",{fontName:"Main",fontSize:15});et(c,"text-color");const u=new Oe("0",{fontName:"Main",fontSize:15});et(u,"text-color"),c.alpha=.8,u.alpha=.8,u.name="Combo",this.texts.addChild(c),this.texts.addChild(u),c.x=-Ye/2+160,u.x=-Ye/2+290,c.y=80/l*n-rt-220,u.y=80/l*n++-rt-220,c.anchor.y=.5,u.anchor.y=.5,u.anchor.x=1;const h=new Oe("0.00 / 0.00",{fontName:"Main",fontSize:20});et(h,"text-color"),h.alpha=.8,h.x=-Ye/2+225,h.y=-rt-112,h.name="Score",this.texts.addChild(h),h.anchor.set(.5);const d=new Oe("Score / Current Score",{fontName:"Main",fontSize:13});et(d,"text-color"),d.alpha=.5,d.x=-Ye/2+225,d.y=-rt-135,this.texts.addChild(d),d.anchor.set(.5);const p=new Oe("Play Statistics",{fontName:"Main",fontSize:13});p.y=-rt-245,p.anchor.set(.5),et(p,"text-color"),this.texts.addChild(p),e.onJudge((f,m)=>{let g="";(Pi(m)||Qi(m))&&(g=m.id),_s(m)&&(g=m.noteType),xl(m)&&(g="Mine");const y=this.texts.getChildByName(g);if(_s(m)){const b=y.text.split(" / ")[1];y.text=e.getCount(m)+" / "+b}else wn(m)||(y.text=e.getCount(m)+"");if(this.texts.getChildByName("Combo").text=e.getMaxCombo()+"",this.texts.getChildByName("Score").text=ae(e.getScore()*100,2).toFixed(2)+" / "+ae(e.getCumulativeScore()*100,2).toFixed(2),Pi(m)||!Qi(m)||f==null)return;const w=Math.round(f*1e3);for(let b=-3;b<=3;b++)this.barlines.children[w+s+b]&&(this.barlines.children[w+s+b].smoothCount+=Tf[b+3],this.barlines.children[w+s+b].visible=!0,this.barlines.children[w+s+b].smoothCount>this.max&&(this.modeText.text=w+"ms",this.max=this.barlines.children[w+s+b].smoothCount));this.errorMS.push(f*1e3),this.meanText.text=HE(this.errorMS).toFixed(2)+"ms",this.medianText.text=Tl(this.errorMS).toFixed(2)+"ms",this.stddevText.text=Qg(this.errorMS).toFixed(2)+"ms",this.redraw()})}redraw(){for(const e of this.barlines.children)e.targetHeight=e.smoothCount*(rt-20)/this.max}adjustOffset(e){const t=this.manager.chartManager.gameStats;if(!t)return;const i=Math.round(t.getMedian()*1e3)/1e3;if(i==0)return;t.applyOffset(-i),this.barlines.children.forEach(o=>{o.smoothCount=0});const s=Je.getCollection(_.play.timingCollection),n=Math.round(s.maxWindowMS());t.getDataPoints().forEach(o=>{if(Pi(o.judgement)||!Qi(o.judgement)||o.error===null)return;const l=Math.round(o.error*1e3);for(let c=-3;c<=3;c++)this.barlines.children[l+n+c]&&(this.barlines.children[l+n+c].smoothCount+=Tf[c+3],this.barlines.children[l+n+c].visible=!0,this.barlines.children[l+n+c].smoothCount>this.max&&(this.modeText.text=l+"ms",this.max=this.barlines.children[l+n+c].smoothCount))}),this.redraw();const a=e=="global"?_.play.offset:this.manager.app.chartManager.loadedChart.timingData.getOffset();if(e=="global")_.play.offset=ae(_.play.offset-i,3);else if(e=="song"){const o=this.manager.app.chartManager.loadedChart.timingData.hasChartOffset()?this.manager.app.chartManager.loadedChart.timingData:this.manager.app.chartManager.loadedSM.timingData;o.setOffset(ae(o.getOffset()-i,3))}Ee.create(`Adjusted ${e} offset from ${ae(a,3).toFixed(3)} to ${ae(a-i,3).toFixed(3)}`)}}class JS extends Sa{registeredSpinners=[];registeredToggles=[];registeredCheckboxes=[];changeRow;warpRow;fakeRow;view;collapseButton;lastSpeedMod=_.chart.CMod;rateSpinner;enteredMain=!1;constructor(e){super(e),this.visible=!1;const t=document.createElement("div");t.id="playback-options",_.general.showPlaybackOptions||t.classList.add("collapsed"),t.style.height="0px",document.getElementById("menubar")?.insertAdjacentElement("afterend",t),this.view=t;const i=document.createElement("button");i.classList.add("po-collapse"),i.tabIndex=-1;const s=Se.getIcon("CHEVRON",18);i.appendChild(s),_.general.showPlaybackOptions&&i.classList.add("toggled"),this.collapseButton=i,i.onclick=()=>{_.general.showPlaybackOptions=!_.general.showPlaybackOptions,t.classList.toggle("collapsed"),i.classList.toggle("toggled",!t.classList.contains("collapsed")),i.blur()},i.style.display="none",Lt(i,{onShow(O){O.setContent((t.classList.contains("collapsed")?"Show ":"Hide ")+"playback options")}});const n=this.createRow("Zoom"),a=this.createSpinner({value:_.chart.zoom*100,step:10,altStep:2,min:10,hardMin:0,onChange:O=>_.chart.zoom=O/100,getValue:()=>_.chart.zoom*100});n.appendChild(a),t.appendChild(n);const o=document.createElement("div"),l=document.createElement("h1");l.innerText="a",o.appendChild(l),De.createKeybindTooltip(n)`Adjust playfield size ${"zoomOut"}/${"zoomIn"}`,t.appendChild(this.createSeparator());const c=this.createRow("Playback"),u=this.createSpinner({value:_.audio.rate*100,step:10,altStep:2,min:10,hardMin:0,onChange:O=>_.audio.rate=O/100,getValue:()=>_.audio.rate*100});c.appendChild(u),t.appendChild(c),this.rateSpinner=this.registeredSpinners.at(-1),De.createKeybindTooltip(c)`Adjust audio playback rate ${"rateDown"}/${"rateUp"}`;const h=document.createElement("div");h.style.gap="5px",h.style.display="flex",h.style.alignItems="center";const d=this.createCheckbox({getValue:()=>_.audio.assistTick,value:_.audio.assistTick,onEl:Se.getIcon("CLAP",18),offEl:Se.getIcon("X_CLAP",18),onChange:O=>_.audio.assistTick=O});h.appendChild(d),De.createKeybindTooltip(d)`Toggle assist tick ${"assistTick"}`;const p=this.createCheckbox({getValue:()=>_.audio.metronome,value:_.audio.metronome,onEl:Se.getIcon("METRONOME",18),offEl:Se.getIcon("X_METRONOME",18),onChange:O=>_.audio.metronome=O});h.appendChild(p),t.appendChild(h),De.createKeybindTooltip(p)`Toggle metronome ${"metronome"}`,t.appendChild(this.createSeparator());const f=this.createRow("Scroll"),m=Se.getIcon("DBL_CHEVRON",16);m.style.padding="2px";const g=Se.getIcon("DBL_CHEVRON",16);g.style.padding="2px",g.style.transform="rotate(180deg)";const y=this.createToggle({values:[m,g],value:_.chart.reverse?1:0,getValue:()=>_.chart.reverse?1:0,onChange:(O,W)=>_.chart.reverse=W!=0});f.appendChild(y),t.appendChild(f),De.createKeybindTooltip(f)`Change scroll direction ${"reverse"}`;const w=this.createRow("Speedmod"),b=this.createToggle({values:["X","C"],value:_.chart.CMod?1:0,getValue:()=>_.chart.CMod?1:0,onChange:O=>_.chart.CMod=O!="X"});De.createKeybindTooltip(b)`Change speedmod type ${"XMod"}/${"CMod"}`;const v=this.createSpinner({value:_.chart.speed,step:25,altStep:5,min:10,hardMin:10,hardMax:35e3,onChange:O=>_.chart.speed=O,getValue:()=>_.chart.speed});w.appendChild(b),w.appendChild(v),t.appendChild(w),De.createKeybindTooltip(v)`Adjust scroll speed ${"increaseScrollSpeed"}/${"decreaseScrollSpeed"}`,t.appendChild(this.createSeparator());const A=this.createRow("Speed Changes"),C=this.createToggle({values:["On","Off"],value:_.chart.doSpeedChanges?0:1,getValue:()=>_.chart.doSpeedChanges?0:1,onChange:O=>_.chart.doSpeedChanges=O=="On"});A.appendChild(C),t.appendChild(A),De.createKeybindTooltip(A)`Allow scroll/speed events (XMod only) ${"doSpeedChanges"}`,this.changeRow=A;const I=this.createRow("Warped Notes"),L=this.createCheckbox({getValue:()=>_.chart.hideWarpedArrows,value:_.chart.hideWarpedArrows,onEl:Se.getIcon("X_EYE",18),offEl:Se.getIcon("EYE",18),onChange:O=>_.chart.hideWarpedArrows=O});I.appendChild(L),t.appendChild(I),De.createKeybindTooltip(I)`Show/hide warped notes (CMod only) ${"hideWarpedArrows"}`,this.warpRow=I;const k=this.createRow("Faked Notes"),N=this.createCheckbox({getValue:()=>_.chart.hideFakedArrows,value:_.chart.hideFakedArrows,onEl:Se.getIcon("X_EYE",18),offEl:Se.getIcon("EYE",18),onChange:O=>_.chart.hideFakedArrows=O});k.appendChild(N),t.appendChild(k),De.createKeybindTooltip(k)`Show/hide faked notes (CMod only) ${"hideFakedArrows"}`,this.fakeRow=k;const G=Se.getIcon("VOLUME",22);G.style.marginLeft="auto",G.style.marginRight="-16px",G.style.height="22px",G.style.width="22px",G.style.alignSelf="center",t.appendChild(G);const E=this.createRow("Master"),S=this.createSpinner({value:_.audio.masterVolume*100,step:5,altStep:1,min:0,max:200,hardMin:0,hardMax:200,onChange:O=>_.audio.masterVolume=O/100,getValue:()=>_.audio.masterVolume*100});E.appendChild(S),t.appendChild(E);const x=this.createRow("Song"),D=this.createSpinner({value:_.audio.songVolume*100,step:5,altStep:1,min:0,max:200,hardMin:0,hardMax:200,onChange:O=>_.audio.songVolume=O/100,getValue:()=>_.audio.songVolume*100});x.appendChild(D),t.appendChild(x);const $=this.createRow("FX"),R=this.createSpinner({value:_.audio.soundEffectVolume*100,step:5,altStep:1,min:0,max:200,hardMin:0,hardMax:200,onChange:O=>_.audio.soundEffectVolume=O/100,getValue:()=>_.audio.soundEffectVolume*100});$.appendChild(R),t.appendChild($),this.changeRow.style.setProperty("--w",this.changeRow.offsetWidth+"px"),this.warpRow.style.setProperty("--w",this.warpRow.offsetWidth+"px"),this.fakeRow.style.setProperty("--w",this.fakeRow.offsetWidth+"px"),this.changeRow.classList.toggle("hidden",_.chart.CMod),this.warpRow.classList.toggle("hidden",!_.chart.CMod),this.fakeRow.classList.toggle("hidden",!_.chart.CMod),Ie.playbackOptions||(t.style.display="none",i.style.display="none")}createRow(e){const t=document.createElement("div");t.classList.add("playback-options-row");const i=document.createElement("div");return i.classList.add("playback-options-label"),i.innerText=e,t.appendChild(i),t}createSeparator(){const e=document.createElement("div");return e.classList.add("po-separator"),e}createSpinner(e){const t=document.createElement("div");t.classList.add("po-spinner");const i=c=>{let u=_.general.spinnerStep;return c.getModifierState("Shift")?u=e.altStep??(e.step!==void 0?e.step/10:_.general.spinnerStep):u=e.step??_.general.spinnerStep,u},s=document.createElement("button");s.classList.add("po-spinner-btn"),s.innerText="-",s.onclick=c=>{l.currentValue-=i(c),e.min!==void 0&&l.currentValue{l.currentValue+=i(c),e.max!==void 0&&l.currentValue>e.max&&(l.currentValue=e.max),o(!0)};const a=document.createElement("input");a.classList.add("po-spinner-input"),a.type="text";const o=(c=!0)=>{e.hardMin!==void 0&&l.currentValuee.hardMax&&(l.currentValue=e.hardMax),c&&e.onChange(l.currentValue),a.value=l.currentValue.toFixed()};a.onwheel=c=>{l.currentValue+=i(c)*c.deltaY/100*(_.chart.scroll.invertZoomScroll?-1:1)*_.chart.scroll.scrollSensitivity,e.max!==void 0&&l.currentValue>e.max&&(l.currentValue=e.max),e.min!==void 0&&l.currentValue{c.key=="Enter"&&a.blur(),c.key=="Escape"&&(l.currentValue=e.getValue(),o(!1))},a.onfocus=()=>{a.select()},a.onblur=()=>{const c=this.parseString(a);if(c==null){l.currentValue=e.getValue(),o(!1);return}l.currentValue=c,o()},a.ondragstart=c=>c.preventDefault(),this.registeredSpinners.push(l),t}createToggle(e){const t=document.createElement("div");if(t.classList.add("po-toggle"),e.values.length==0)return t;const i=document.createElement("div");i.classList.add("po-toggle-highlight");const s=e.values.map((l,c)=>{if(typeof l=="string"){const u=document.createElement("div");return u.classList.add("po-toggle-item"),u.innerText=l,t.appendChild(u),u.onclick=()=>{o.currentValue!=c&&(o.currentValue=c,a())},u}else return l.onclick=()=>{o.currentValue!=c&&(o.currentValue=c,a())},t.appendChild(l),l});t.style.visibility="hidden",document.body.appendChild(t);const n=l=>{i.style.left=s[l].getBoundingClientRect().left-s[0].getBoundingClientRect().left+"px",i.style.width=s[l].getBoundingClientRect().width+"px",i.style.height=s[l].getBoundingClientRect().height+"px"},a=(l=!0)=>{l&&e.onChange(e.values[o.currentValue],o.currentValue),[...t.querySelectorAll(".active")].forEach(c=>c.classList.remove("active")),n(o.currentValue),s[o.currentValue].classList.add("active")},o={currentValue:e.value??0,options:e,update:a};return this.registeredToggles.push(o),a(!1),t.remove(),t.style.visibility="",t.appendChild(i),t}createCheckbox(e){const t=document.createElement("div");t.classList.add("ico-checkbox");const i=(n=!0)=>{n&&e.onChange(s.currentValue),s.options.onEl.style.display=s.currentValue?"":"none",s.options.offEl.style.display=s.currentValue?"none":""},s={currentValue:e.value??!0,options:e,update:i};return t.onclick=()=>{s.currentValue=!s.currentValue,i()},this.registeredCheckboxes.push(s),i(!1),t.replaceChildren(s.options.onEl,s.options.offEl),t}update(){!this.enteredMain&&this.manager.chartManager.loadedChart!==void 0&&(this.enteredMain=!0,this.view.style.height="",this.collapseButton.style.display="",document.getElementById("menubar")?.appendChild(this.collapseButton));for(const t of this.registeredSpinners)t.currentValue!=t.options.getValue()&&document.activeElement!=t.input&&(t.currentValue=t.options.getValue(),t.update(!1));for(const t of this.registeredToggles)t.currentValue!=t.options.getValue()&&(t.currentValue=t.options.getValue(),t.update(!1));for(const t of this.registeredCheckboxes)t.currentValue!=t.options.getValue()&&(t.currentValue=t.options.getValue(),t.update(!1));const e=this.manager.chartManager.getMode()==q.Play||this.manager.chartManager.getMode()==q.Record;this.rateSpinner.btnMinus.disabled=e,this.rateSpinner.btnPlus.disabled=e,this.rateSpinner.input.disabled=e,_.chart.CMod!=this.lastSpeedMod&&(this.lastSpeedMod=_.chart.CMod,this.changeRow.classList.toggle("hidden",_.chart.CMod),this.warpRow.classList.toggle("hidden",!_.chart.CMod),this.fakeRow.classList.toggle("hidden",!_.chart.CMod))}parseString(e){try{const t=_r.evaluate(e.value);return isFinite(t)?t:0}catch{return null}}}class ya extends Ae{pool=[];options;constructor(e){super(),this.options=e}createChild(){if(this.pool.length==0&&this.options.maxPoolSize!==void 0&&this.children.length>=this.options.maxPoolSize)return;const e=this.pool.pop()??this.options.create();return this.addChild(e),e._disabledTime=Date.now(),e}destroyChild(e){this.children.includes(e)&&(e.removeFromParent(),e.removeAllListeners(),e.eventMode="auto",e._disabledTime=Date.now(),this.pool.push(e))}destroyAll(){this.children.forEach(e=>e._disabledTime=Date.now()),this.pool.push(...this.children),this.children.forEach(e=>{e.removeAllListeners(),e.eventMode="auto"}),this.removeChildren()}_render(e){super._render(e);const t=Date.now();for(;t-this.pool[0]?._disabledTime>(this.options.destroyTimer??5e3);)this.pool.shift().destroy()}}const Vr={BPMS:9182254,STOPS:4934913,DELAYS:217453,WARPS:9243998,FAKES:4868682,COMBOS:939078,SPEEDS:2968693,LABELS:7747359,SCROLLS:3557006,TIMESIGNATURES:5392684,TICKCOUNTS:1594906,BGCHANGES:8460415,FGCHANGES:8857115,ATTACKS:1856083};class QS extends Ae{renderer;areaPool=new ya({create:()=>{const e=new Fe(ie.WHITE);return Object.assign(e,{alpha:.2,width:this.renderer.chart.gameType.notefieldWidth+128}),e.anchor.set(.5,0),e}});timingAreaMap=new Map;timingEvents=[];timingDirty=!0;constructor(e){super(),this.renderer=e,this.addChild(this.areaPool);const t=()=>this.timingDirty=!0;K.on("timingModified",t),this.on("destroyed",()=>K.off("timingModified",t))}update(e,t){this.timingDirty&&(this.timingAreaMap.clear(),this.areaPool.destroyAll(),this.timingDirty=!1,this.timingEvents=this.renderer.chart.timingData.getTimingData("STOPS","WARPS","DELAYS","FAKES")),this.visible=this.renderer.shouldDisplayBarlines();for(const i of this.timingEvents){if(i.beat>t)break;if(this.shouldDrawEvent(i,e,t)&&!this.timingAreaMap.has(i)){const s=this.areaPool.createChild();if(!s)break;s.tint=Vr[i.type],this.timingAreaMap.set(i,s)}}for(const[i,s]of this.timingAreaMap.entries()){if(!this.shouldDrawEvent(i,e,t)){this.timingAreaMap.delete(i),this.areaPool.destroyChild(s);continue}let n=_.chart.CMod?this.renderer.getYPosFromSecond(i.second):this.renderer.getYPosFromBeat(i.beat),a=n;switch(i.type){case"STOPS":case"DELAYS":{_.chart.CMod&&i.value>0?a=this.renderer.getYPosFromSecond(i.second+i.value):i.value<0&&(a=this.renderer.getYPosFromBeat(this.renderer.chart.getBeatFromSeconds(i.second+1e-4)));break}case"FAKES":{a=this.renderer.getYPosFromBeat(i.beat+i.value);break}case"WARPS":{_.chart.CMod||(a=this.renderer.getYPosFromBeat(i.beat+i.value));break}}a0)||e.type=="WARPS"&&_.chart.CMod?!1:e.beat<=i}}class Rh{static active=!1;static popup;static clickOutside;static moveInterval;static exitTimeout;static draggedElement;static dragOffsetX=0;static dragOffsetY=0;static grid;static leftovers;static boundaryCache=[];static open(){this.active||(this.popup=this.build(),document.getElementById("popups")?.appendChild(this.popup),this.clickOutside=e=>{!this.popup?.contains(e.target)&&!this.draggedElement?.contains(e.target)&&!document.getElementById("toggle-tracks")?.contains(e.target)&&this.close()},setTimeout(()=>window.addEventListener("click",this.clickOutside,!0)),this.popup.style.transitionDuration="0s",setTimeout(()=>this.movePosition()),clearTimeout(this.exitTimeout),this.moveInterval=setInterval(()=>this.movePosition(),150),this.active=!0)}static build(){const e=document.createElement("div");e.classList.add("popup"),e.id="timing-track-order";const t=document.createElement("div");t.classList.add("popup-zoomer"),e.appendChild(t);const i=document.createElement("div");i.classList.add("container"),t.appendChild(i);const s=document.createElement("div");s.classList.add("track-grid-options");const n=document.createElement("button");n.classList.add("delete"),n.innerText="Reset",n.onclick=()=>{_.chart.timingEventOrder=structuredClone(Zo.chart.timingEventOrder),this.clearBoundaries(),this.grid?.replaceChildren(),this.leftovers?.replaceChildren();const l=[...fr];for(const u of _.chart.timingEventOrder.left){const h=this.makeDraggableTrack(u);h.classList.add("left"),this.grid?.appendChild(h),l.splice(l.indexOf(u),1)}const c=document.createElement("div");c.classList.add("draggable-track"),c.innerText="PLAYFIELD",c.style.backgroundColor="#2D2D2D",c.style.padding="20px 10px",c.style.writingMode="horizontal-tb",c.addEventListener("mousedown",u=>this.startDragging(u,c)),c.dataset.type="PLAYFIELD",this.grid?.appendChild(c);for(const u of _.chart.timingEventOrder.right){const h=this.makeDraggableTrack(u);h.classList.add("right"),this.grid?.appendChild(h),l.splice(l.indexOf(u),1)}for(const u of l)this.leftovers?.appendChild(this.makeLeftoverTrack(u))},this.grid=document.createElement("div"),this.grid.classList.add("track-grid"),i.appendChild(this.grid),i.appendChild(s);const a=[...fr];for(const l of _.chart.timingEventOrder.left){const c=this.makeDraggableTrack(l);c.classList.add("left"),this.grid.appendChild(c),a.splice(a.indexOf(l),1)}const o=document.createElement("div");o.classList.add("draggable-track"),o.innerText="PLAYFIELD",o.style.backgroundColor="#2D2D2D",o.style.padding="20px 10px",o.style.writingMode="horizontal-tb",o.addEventListener("mousedown",l=>this.startDragging(l,o)),o.dataset.type="PLAYFIELD",this.grid.appendChild(o);for(const l of _.chart.timingEventOrder.right){const c=this.makeDraggableTrack(l);c.classList.add("right"),this.grid.appendChild(c),a.splice(a.indexOf(l),1)}this.leftovers=document.createElement("div"),this.leftovers.classList.add("track-selector"),s.appendChild(this.leftovers),s.appendChild(n);for(const l of a)this.leftovers.appendChild(this.makeLeftoverTrack(l));return e}static makeDraggableTrack(e){const t=document.createElement("div");t.classList.add("draggable-track");const i=document.createElement("div");i.classList.add("draggable-track-text"),i.innerText=e,t.style.backgroundColor=Wc(Vr[e].toString(16).padStart(6,"0"),"#333333",.7),t.appendChild(i);let s=!0;const n=Se.getIcon("TRASH",16);return n.addEventListener("click",()=>{if(!s)return;s=!1,this.deleteTrack(e),t.classList.add("exiting"),setTimeout(()=>t.remove(),400);const a=this.makeLeftoverTrack(e);a.classList.add("entering"),setTimeout(()=>a.classList.remove("entering"),400),this.leftovers?.appendChild(a),this.clearBoundaries()}),t.appendChild(n),t.addEventListener("mousedown",a=>{s&&(n.contains(a.target)||this.startDragging(a,t))}),t.dataset.type=e,t}static makeLeftoverTrack(e){const t=document.createElement("div");t.classList.add("leftover-track");const i=Se.getIcon("PLUS",8);t.append(i);const s=document.createElement("div");s.classList.add("leftover-track-text"),s.innerText=e,t.style.backgroundColor=Wc(Vr[e].toString(16).padStart(6,"0"),"#333333",.7),t.appendChild(s);let n=0,a=0,o=!1,l=!1;return t.addEventListener("mousedown",()=>{o=!0}),t.addEventListener("mousemove",c=>{if(!(!o||l)&&(n+=c.movementX,a+=c.movementY,n*n+a*a>15)){l=!0;const u=this.makeDraggableTrack(e);this.grid?.appendChild(u),this.clearBoundaries();const h=t.getBoundingClientRect(),d=this.getClosestSlot(h.left),p=_.chart.timingEventOrder.left.concat(["PLAYFIELD"],_.chart.timingEventOrder.right);p.splice(d,0,e),this.saveOptions(p),p.forEach(f=>{const m=this.grid?.querySelector(`div[data-type=${f}]`);this.grid?.appendChild(m),f!="PLAYFIELD"&&(m?.classList.remove("left","right"),_.chart.timingEventOrder.left.includes(f)&&m?.classList.add("left"),_.chart.timingEventOrder.right.includes(f)&&m?.classList.add("right"))}),this.startDragging(c,u,c.clientX,c.clientY),_.general.smoothAnimations?(t.style.width=t.clientWidth+"px",t.style.transition="0.4s cubic-bezier(0, 0.91, 0.34, 1.05)",setTimeout(()=>{t.style.width="0px",t.style.opacity="0",t.style.padding="0",t.style.fontSize="0"},10),setTimeout(()=>t.remove(),400)):t.remove()}}),t.addEventListener("mouseup",()=>{if(!o||l)return;l=!0,_.chart.timingEventOrder.right.push(e),_.general.smoothAnimations?(t.style.width=t.clientWidth+"px",t.style.transition="0.4s cubic-bezier(0, 0.91, 0.34, 1.05)",setTimeout(()=>{t.style.width="0px",t.style.opacity="0",t.style.padding="0",t.style.fontSize="0"},10),setTimeout(()=>t.remove(),400)):t.remove();const c=this.makeDraggableTrack(e);c.classList.add("entering"),c.classList.add("right"),setTimeout(()=>c.classList.remove("entering"),400),this.grid?.appendChild(c),this.clearBoundaries()}),t}static startDragging(e,t,i,s){if(!this.popup)return;this.draggedElement=t.cloneNode(!0),this.draggedElement.style.position="fixed";const n=t.getBoundingClientRect(),a=this.popup.getBoundingClientRect();!i||!s?(this.dragOffsetX=e.clientX-n.left,this.dragOffsetY=e.clientY-n.top,this.draggedElement.style.left=n.left-a.left+"px",this.draggedElement.style.top=n.top-a.top+"px"):(this.dragOffsetX=n.width/2,this.dragOffsetY=n.height/4*3,this.draggedElement.style.left=i-n.width/2-a.left+"px",this.draggedElement.style.top=s-n.height/4*3-a.top+"px",this.draggedElement.classList.add("entering")),this.draggedElement.style.boxShadow="6px 6px 6px #222",this.draggedElement.style.transition="none",t.style.opacity="0.03",this.popup.appendChild(this.draggedElement);const o=_.chart.timingEventOrder.left.concat(["PLAYFIELD"],_.chart.timingEventOrder.right),l=t.dataset.type;let c=o.indexOf(l);const u=o.indexOf(l),h=p=>{this.draggedElement.style.left=p.clientX-this.dragOffsetX-a.left+"px",this.draggedElement.style.top=p.clientY-this.dragOffsetY-a.top+"px";let f=this.getClosestSlot(p.clientX-this.dragOffsetX);Math.abs(p.clientY-this.dragOffsetY-a.top-(n.top-a.top))>140&&(f=u),c!=f&&(o.splice(c,1),o.splice(f,0,l),this.saveOptions(o),o.forEach(m=>{const g=this.grid?.querySelector(`div[data-type=${m}]`);this.grid?.appendChild(g),m!="PLAYFIELD"&&(g?.classList.remove("left","right"),_.chart.timingEventOrder.left.includes(m)&&g?.classList.add("left"),_.chart.timingEventOrder.right.includes(m)&&g?.classList.add("right"))}),l!="PLAYFIELD"&&(this.draggedElement?.classList.remove("left","right"),_.chart.timingEventOrder.left.includes(l)&&this.draggedElement?.classList.add("left"),_.chart.timingEventOrder.right.includes(l)&&this.draggedElement?.classList.add("right")),c=f)};window.addEventListener("mousemove",h);const d=()=>{this.draggedElement?.remove(),this.draggedElement=void 0,window.removeEventListener("mousemove",h),t.style.opacity="",this.clearBoundaries(),window.removeEventListener("mouseup",d)};window.addEventListener("mouseup",d)}static saveOptions(e){const t=e.indexOf("PLAYFIELD");t!=-1&&(_.chart.timingEventOrder.left=e.slice(0,t),_.chart.timingEventOrder.right=e.slice(t+1))}static deleteTrack(e){const t=_.chart.timingEventOrder.left.indexOf(e);t!=-1&&_.chart.timingEventOrder.left.splice(t,1);const i=_.chart.timingEventOrder.right.indexOf(e);i!=-1&&_.chart.timingEventOrder.right.splice(i,1)}static movePosition(){if(!this.popup)return;const e=document.getElementById("toggle-tracks");if(!e)return;this.popup.style.display="";const t=e.getBoundingClientRect(),i=t.left+t.width/2,s=this.popup.clientWidth,n=s/2+15,a=window.innerWidth-s/2-15;this.popup.style.left=`${Le(i,n,a)}px`;const o=t.top+t.height/2;this.popup.style.top=`${t.top+t.height}px`,o+this.popup.clientHeight>window.innerHeight-15&&(this.popup.style.transform="translate(-50%, -100%)",this.popup.style.top=`${t.top-t.height/2}px`),setTimeout(()=>this.popup.style.transitionDuration="",10)}static getClosestSlot(e){this.boundaryCache.length==0&&this.getBoundaries();let t=-1,i=999999,s=999999;for(let n=0;ns)break;s=a}return t}static getBoundaries(){if(this.grid){for(const e of this.grid.children)this.boundaryCache.push([e,e.getBoundingClientRect()]);this.boundaryCache.sort((e,t)=>e[1].left-t[1].left)}}static clearBoundaries(){this.boundaryCache=[]}static close(){!this.popup||!this.active||(window.removeEventListener("click",this.clickOutside,!0),this.popup.classList.add("exiting"),this.exitTimeout=setTimeout(()=>this.popup.remove(),200),this.active=!1,clearInterval(this.moveInterval),this.clearBoundaries())}}class eC extends Sa{view;playbackBar;skipStart;skipEnd;play;playIcon;stopIcon;record;playtest;timeCounter;beatCounter;min;sec;millis;beat;beatDropdown;editBar;editSteps;editTiming;stepsContainer;timingContainer;editChoiceContainer;addTimingEvent;toggleTimingTracks;detectSync;offsetCounter;offset;noteArrows=[];noteArrowMask;lastTime=null;lastBeat=null;lastOffset=null;lastMode=q.Edit;lastTimingMode=Pe.Off;lastHover=0;lastPlaying=!1;hovering=!1;trackingMovement=!0;idleFrames=0;lastBounds;constructor(e){super(e);const t=document.createElement("div");t.id="status-widget",document.getElementById("view-wrapper")?.appendChild(t),Ie.viewMode&&t.classList.add("collapsed"),this.playbackBar=document.createElement("div"),this.playbackBar.classList.add("playback-bar"),this.editBar=document.createElement("div"),this.editBar.classList.add("edit-bar"),this.skipStart=document.createElement("button"),this.skipStart.tabIndex=-1;const i=Se.getIcon("SKIP_START",36);this.skipStart.appendChild(i),this.skipStart.onclick=()=>{this.manager.chartManager.beat=0,this.skipStart.blur()},De.createKeybindTooltip(this.skipStart)`Skip to start ${"jumpSongStart"}`,this.skipEnd=document.createElement("button"),this.skipEnd.tabIndex=-1;const s=Se.getIcon("SKIP_END",36);this.skipEnd.appendChild(s),this.skipEnd.onclick=()=>{this.manager.chartManager.beat=this.manager.chartManager.loadedChart.getBeatFromSeconds(this.manager.chartManager.chartAudio.getSongLength()),this.skipEnd.blur()},De.createKeybindTooltip(this.skipEnd)`Skip to end ${"jumpSongEnd"}`,this.play=document.createElement("button"),this.play.tabIndex=-1;const n=Se.getIcon("PLAY",40);this.play.appendChild(n),this.playIcon=n;const a=Se.getIcon("STOP",32);this.play.appendChild(a),this.stopIcon=a,this.stopIcon.style.display="none",this.play.onclick=()=>{(this.manager.chartManager.getMode()==q.Record||this.manager.chartManager.getMode()==q.Play)&&this.manager.chartManager.setMode(q.Edit),this.manager.chartManager.playPause(),this.play.blur()},De.createKeybindTooltip(this.play)`Play/Pause ${"playback"}`,this.record=document.createElement("button"),this.record.tabIndex=-1;const o=Se.getIcon("RECORD",36,void 0,"red");this.record.appendChild(o),this.record.onclick=()=>{this.manager.chartManager.setMode(q.Record),this.record.blur()},De.createKeybindTooltip(this.record)`Record ${"recordMode"}`,(Ie.viewMode||!Ie.recordMode)&&(this.record.style.display="none"),this.playtest=document.createElement("button"),this.playtest.tabIndex=-1;const l=Se.getIcon("PLAYTEST",30);this.playtest.appendChild(l),this.playtest.onclick=()=>{this.manager.chartManager.setMode(q.Play),this.playtest.blur()},De.createKeybindTooltip(this.playtest)`Playtest ${"playMode"}`,Ie.playMode||(this.playtest.style.display="none");const c=document.createElement("div");c.classList.add("playback-separator"),this.timeCounter=document.createElement("div"),this.timeCounter.classList.add("playback-counter");const u=document.createElement("div");u.style.display="flex",u.classList.add("playback-counter-main");const h=document.createElement("div");h.classList.add("inlineEdit"),h.innerText="00",h.spellcheck=!1,h.contentEditable="true",h.style.maxWidth="27px",h.onkeydown=E=>{E.key=="Enter"&&h.blur(),E.key=="Escape"&&(h.innerText=Math.floor(Math.abs(this.manager.chartManager.time)/60).toString().padStart(2,"0"),h.blur())},h.onfocus=()=>setTimeout(()=>this.selectText(h),25),h.onblur=()=>this.updateTime(),h.ondragstart=E=>E.preventDefault();const d=document.createElement("div");d.classList.add("inlineEdit"),d.innerText="00",d.spellcheck=!1,d.contentEditable="true",d.style.maxWidth="18px",d.onkeydown=E=>{E.key=="Enter"&&d.blur(),E.key=="Escape"&&(d.innerText=Math.floor(Math.abs(this.manager.chartManager.time)%60).toString().padStart(2,"0"),d.blur())},d.onfocus=()=>setTimeout(()=>this.selectText(d),25),d.onblur=()=>this.updateTime(),d.ondragstart=E=>E.preventDefault();const p=document.createElement("div");p.classList.add("inlineEdit"),p.innerText="000",p.spellcheck=!1,p.contentEditable="true",p.style.maxWidth="27px",p.onkeydown=E=>{E.key=="Enter"&&p.blur(),E.key=="Escape"&&(p.innerText=(ae(Math.abs(this.manager.chartManager.time)%1,3)*1e3).toString().padStart(3,"0"),p.blur())},p.onfocus=()=>setTimeout(()=>this.selectText(p),25),p.onblur=()=>this.updateTime(),p.ondragstart=E=>E.preventDefault(),this.min=h,this.sec=d,this.millis=p;const f=document.createElement("div");f.classList.add("playback-counter-label"),f.innerText="Time",u.appendChild(h),u.appendChild(document.createTextNode(":")),u.appendChild(d),u.appendChild(document.createTextNode(".")),u.appendChild(p),this.timeCounter.appendChild(u),this.timeCounter.appendChild(f);const m=document.createElement("div");m.classList.add("playback-separator"),this.beatCounter=document.createElement("div"),this.beatCounter.classList.add("playback-counter");const g=document.createElement("div");g.classList.add("playback-counter-main","inlineEdit"),g.innerText="0.000",g.spellcheck=!1,g.contentEditable="true",g.onkeydown=E=>{if(E.key=="Enter"&&g.blur(),E.key=="Escape"){if(this.beatDropdown.value=="Measure"){const S=this.manager.chartManager.loadedChart?.timingData?.getMeasure(this.manager.chartManager.beat)??this.manager.chartManager.beat/4;g.innerText=ae(S,3).toFixed(3)}else g.innerText=ae(this.manager.chartManager.beat,3).toFixed(3);g.blur()}},g.onfocus=()=>{setTimeout(()=>this.selectText(g),25)},g.onblur=()=>this.updateBeat(),g.ondragstart=E=>E.preventDefault(),this.beat=g,this.beatDropdown=gi.create(["Beat","Measure"],"Beat"),this.beatDropdown.view.querySelector(".dropdown-selected").classList.add("playback-counter-label"),this.beatCounter.appendChild(g),this.beatCounter.appendChild(this.beatDropdown.view),this.beatDropdown.onChange(()=>{if(this.beatDropdown.value=="Measure"){const E=this.manager.chartManager.loadedChart?.timingData?.getMeasure(this.manager.chartManager.beat)??this.manager.chartManager.beat/4;g.innerText=ae(E,3).toFixed(3)}else g.innerText=ae(this.manager.chartManager.beat,3).toFixed(3)}),this.playbackBar.appendChild(this.skipStart),this.playbackBar.appendChild(this.skipEnd),this.playbackBar.appendChild(this.play),this.playbackBar.appendChild(this.record),this.playbackBar.appendChild(this.playtest),this.playbackBar.appendChild(c),this.playbackBar.appendChild(this.timeCounter),this.playbackBar.appendChild(m),this.playbackBar.appendChild(this.beatCounter),this.editSteps=document.createElement("button"),this.editSteps.tabIndex=-1,this.editSteps.classList.add("edit-fancy-button");const y=Se.getIcon("FEET",24);y.style.marginBottom="2px",this.editSteps.appendChild(y),this.editSteps.appendChild(document.createTextNode("Edit Steps")),this.editSteps.onclick=()=>{this.manager.chartManager.editTimingMode=Pe.Off,this.editSteps.blur()},this.editSteps.classList.add("active"),this.editTiming=document.createElement("button"),this.editTiming.tabIndex=-1,this.editTiming.classList.add("edit-fancy-button");const w=Se.getIcon("METRONOME",24);w.style.marginBottom="2px",this.editTiming.appendChild(w),this.editTiming.appendChild(document.createTextNode("Edit Timing")),this.editTiming.onclick=()=>{this.manager.chartManager.editTimingMode=Pe.Edit,this.editTiming.blur()};const b=document.createElement("div");b.classList.add("playback-separator");const v=document.createElement("div");v.classList.add("edit-bar-left"),v.appendChild(this.editSteps),v.appendChild(this.editTiming),v.appendChild(b),this.editBar.appendChild(v),this.editChoiceContainer=document.createElement("div"),this.editChoiceContainer.classList.add("edit-choice-container"),this.stepsContainer=document.createElement("div"),this.stepsContainer.classList.add("edit-steps-container"),this.timingContainer=document.createElement("div"),this.timingContainer.classList.add("edit-timing-container"),this.editChoiceContainer.appendChild(this.stepsContainer),this.editChoiceContainer.appendChild(this.timingContainer),this.addTimingEvent=document.createElement("button"),this.addTimingEvent.tabIndex=-1;const A=Se.getIcon("ADD_EVENT",32);this.addTimingEvent.appendChild(A),this.addTimingEvent.onclick=()=>{this.manager.chartManager.editTimingMode==Pe.Add?this.manager.chartManager.editTimingMode=Pe.Edit:this.manager.chartManager.editTimingMode=Pe.Add,this.addTimingEvent.blur()},this.timingContainer.appendChild(this.addTimingEvent),De.createKeybindTooltip(this.addTimingEvent)`Add timing events ${"toggleAddTiming"}`,this.toggleTimingTracks=document.createElement("button"),this.toggleTimingTracks.tabIndex=-1;const C=Se.getIcon("EYE",32);this.toggleTimingTracks.appendChild(C),this.toggleTimingTracks.onclick=()=>{Rh.active?Rh.close():Rh.open(),this.toggleTimingTracks.blur()},this.toggleTimingTracks.id="toggle-tracks",this.timingContainer.appendChild(this.toggleTimingTracks),Lt(this.toggleTimingTracks,{content:"Toggle timing track visibility"}),this.detectSync=document.createElement("button"),this.detectSync.tabIndex=-1;const I=Se.getIcon("DETECT_SYNC",32);this.detectSync.appendChild(I),this.detectSync.onclick=()=>{this.manager.app.windowManager.openWindow(new _y(this.manager.app)),this.detectSync.blur()},this.detectSync.id="detect-sync",this.timingContainer.appendChild(this.detectSync),De.createKeybindTooltip(this.detectSync)`Detect audio sync ${"detectSync"}`;const L=document.createElement("div");L.classList.add("playback-separator"),this.timingContainer.appendChild(L),this.offsetCounter=document.createElement("div"),this.offsetCounter.classList.add("playback-counter");const k=document.createElement("div");k.classList.add("playback-counter-label"),k.innerText="Offset";const N=document.createElement("div");N.classList.add("playback-counter-main","inlineEdit"),N.innerText="0.000",N.spellcheck=!1,N.contentEditable="true",N.onkeydown=E=>{E.key=="Enter"&&N.blur(),E.key=="Escape"&&(N.innerText=ae(this.manager.chartManager.loadedChart?.timingData.getOffset()??0,3).toFixed(3),N.blur())},N.tabIndex=-1,N.onfocus=()=>{setTimeout(()=>this.selectText(N),25)},N.onblur=()=>this.updateOffset(),N.ondragstart=E=>E.preventDefault(),this.offset=N,this.offsetCounter.appendChild(N),this.offsetCounter.appendChild(k),this.timingContainer.appendChild(this.offsetCounter),this.editBar.appendChild(this.editChoiceContainer);const G=document.createElement("div");G.classList.add("note-placeholder-right"),this.stepsContainer.appendChild(G),K.on("resize",()=>{this.trackingMovement=!0,this.idleFrames=5}),K.on("noteskinLoaded",()=>{this.stepsContainer.replaceChildren(),this.noteArrows.forEach(S=>{this.removeChild(S.sprite),this.removeChild(S.bg),this.removeChild(S.highlight)}),this.noteArrows=[];const E=document.createElement("div");if(E.classList.add("note-placeholder-right"),this.stepsContainer.appendChild(E),!!this.manager.chartManager.loadedChart){for(const S of this.manager.chartManager.loadedChart.gameType.editNoteTypes){if(wd.includes(S))continue;const x=this.manager.chartManager.chartView.getNotefield().createNote({type:S,beat:0,col:0,quant:4,second:0,warped:!1,fake:!1});x.scale.set(.5);const D=new Fe(ie.WHITE);et(D,"widget-bg"),D.width=48,D.height=48,D.anchor.set(.5);const $=new jt("noBorder");$.alpha=0,$.width=48,$.height=48,$.pivot.x=24,$.pivot.y=24;const R=document.createElement("button");R.tabIndex=-1,R.style.height="48px",R.style.width="48px",R.classList.add("note-placeholder"),R.onclick=()=>{this.manager.chartManager.setEditingNoteType(S),R.blur()},De.createKeybindTooltip(R)`${"\\"+S} ${"noteType"+S}`;const O={element:R,sprite:x,type:S,bg:D,highlight:$,hovered:!1};R.onmouseover=()=>{O.hovered=!0},R.onmouseleave=()=>{O.hovered=!1},this.addChild(D),this.addChild(x),this.addChild($);const W=R.getBoundingClientRect();x.position.y=W.top-this.manager.app.view.clientHeight/2-this.manager.app.view.getBoundingClientRect().top+24,x.position.x=W.left-this.manager.app.view.clientWidth/2+24,D.position=x.position,this.noteArrows.push(O)}this.stepsContainer.replaceChildren(...this.noteArrows.map(S=>S.element),E),this.trackingMovement=!0,this.idleFrames=5}}),this.noteArrowMask=new Fe(ie.WHITE),this.noteArrowMask.height=48,this.noteArrowMask.width=2500,this.noteArrowMask.anchor.y=1,this.noteArrowMask.anchor.x=.5,this.addChild(this.noteArrowMask),this.mask=this.noteArrowMask,t.onmouseenter=()=>{this.lastHover=Date.now(),this.hovering=!0,this.view.style.opacity="",this.view.style.transition=""},t.onmouseleave=()=>this.hovering=!1,t.appendChild(this.playbackBar),t.appendChild(this.editBar),this.view=t,t.style.display="none"}update(){this.view.style.display=this.manager.chartManager.loadedSM&&Ie.status?"":"none";const e=this.manager.chartManager.time;this.lastTime!=e&&(document.activeElement!=this.min&&(this.min.innerText=(e<0?"-":"")+Math.floor(Math.abs(e)/60).toString().padStart(2,"0")),document.activeElement!=this.sec&&(this.sec.innerText=Math.floor(Math.abs(e)%60).toString().padStart(2,"0")),document.activeElement!=this.millis&&(this.millis.innerText=(ae(Math.abs(e)%1,3)*1e3).toString().padStart(3,"0")),this.lastTime=e);const t=this.manager.chartManager.beat;if(this.lastBeat!=t){if(document.activeElement!=this.beat)if(this.beatDropdown.value=="Measure"){const h=this.manager.chartManager.loadedChart?.timingData?.getMeasure(t)??t/4;this.beat.innerText=ae(h,3).toFixed(3)}else this.beat.innerText=ae(t,3).toFixed(3);this.lastBeat=t}const i=this.manager.chartManager.loadedChart?.timingData.getOffset()??0;this.lastOffset!=i&&document.activeElement!=this.offset&&(this.offset.innerText=ae(i,3).toFixed(3));const s=this.manager.chartManager.getMode(),n=this.manager.chartManager.editTimingMode;if(this.lastMode!=s){switch(s){case q.Edit:this.skipStart.disabled=!1,this.skipEnd.disabled=!1,this.record.disabled=!1,this.playtest.disabled=!1,this.min.contentEditable="true",this.sec.contentEditable="true",this.millis.contentEditable="true",this.beat.contentEditable="true",this.offset.contentEditable="true",this.record.style.background="",this.playtest.style.background="",this.view.style.opacity="",this.view.style.transition="",this.view.classList.remove("collapsed"),this.beatDropdown.disabled=!1;break;case q.Record:this.lastHover=Date.now(),this.skipStart.disabled=!0,this.skipEnd.disabled=!0,this.record.disabled=!1,this.record.style.background="rgba(170, 0, 0, 0.35)",this.playtest.disabled=!0,this.min.contentEditable="false",this.sec.contentEditable="false",this.millis.contentEditable="false",this.beat.contentEditable="false",this.offset.contentEditable="false",n!=Pe.Off&&(this.visible=!1),this.view.classList.add("collapsed"),this.beatDropdown.closeDropdown(),this.beatDropdown.disabled=!0;break;case q.Play:this.lastHover=Date.now(),this.skipStart.disabled=!0,this.skipEnd.disabled=!0,this.record.disabled=!0,this.playtest.disabled=!1,this.playtest.style.background="rgba(12, 97, 31, 0.35)",this.min.contentEditable="false",this.sec.contentEditable="false",this.millis.contentEditable="false",this.beat.contentEditable="false",this.offset.contentEditable="false",n!=Pe.Off&&(this.visible=!1),this.view.classList.add("collapsed"),this.beatDropdown.closeDropdown(),this.beatDropdown.disabled=!0;break;case q.View:this.lastHover=Date.now(),this.skipStart.disabled=!1,this.skipEnd.disabled=!1,this.record.disabled=!0,this.playtest.disabled=!1,this.min.contentEditable="true",this.sec.contentEditable="true",this.millis.contentEditable="true",this.beat.contentEditable="true",this.offset.contentEditable="true",n!=Pe.Off&&(this.visible=!1),this.view.classList.add("collapsed"),this.beatDropdown.closeDropdown(),this.beatDropdown.disabled=!0}this.trackingMovement=!0,this.idleFrames=5,this.lastMode=s}if(this.lastTimingMode!=n){switch(n){case Pe.Off:this.visible=!0,this.stepsContainer.style.transform="",this.timingContainer.style.transform="",this.editSteps.classList.add("active"),this.editTiming.classList.remove("active"),this.offset.tabIndex=-1;break;case Pe.Add:this.addTimingEvent.classList.add("active");break;case Pe.Edit:this.addTimingEvent.classList.remove("active"),this.offset.tabIndex=0}(this.lastTimingMode==Pe.Off&&n!=Pe.Off||this.lastTimingMode!=Pe.Off&&n==Pe.Off)&&this.manager.chartManager.clearSelections(),this.trackingMovement=!0,this.idleFrames=5,this.lastTimingMode=n,this.stepsContainer.style.transform=n==Pe.Off?"":"translateY(-48px)",this.timingContainer.style.transform=n==Pe.Off?"":"translateY(-48px)",this.editSteps.classList.toggle("active",n==Pe.Off),this.editTiming.classList.toggle("active",n!=Pe.Off)}const a=this.manager.chartManager.chartAudio.isPlaying();if(this.lastPlaying!=a&&(this.playIcon.style.display=a?"none":"",this.stopIcon.style.display=a?"":"none",this.lastPlaying=a),(s==q.Play||s==q.Record)&&this.view.style.opacity==""&&!this.hovering&&Date.now()-this.lastHover>3e3&&(this.view.style.opacity="0.2",this.view.style.transition="2s cubic-bezier(.11,.72,.51,1.14)"),this.trackingMovement){const h=this.noteArrows[0];if(h){const p=h.element.getBoundingClientRect();this.noteArrows.forEach((f,m)=>{f.sprite.position.y=p.top-this.manager.app.view.clientHeight/2-this.manager.app.view.getBoundingClientRect().top+24,f.sprite.position.x=p.left-this.manager.app.view.clientWidth/2+24+m*48,f.bg.position=f.sprite.position,f.highlight.position=f.sprite.position}),this.lastBounds&&Math.abs(this.lastBounds.top-p.top)+Math.abs(this.lastBounds.left-p.left)==0&&(this.idleFrames--,this.idleFrames<0&&(this.trackingMovement=!1,this.lastBounds=void 0,n!=Pe.Off&&(this.visible=!1))),this.lastBounds=p}const d=this.view.getBoundingClientRect();this.noteArrowMask.y=d.bottom-this.manager.app.view.clientHeight/2-this.manager.app.view.getBoundingClientRect().top}const o=this.manager.chartManager.getEditingNoteType(),l=Qe.getColor("editable-overlay-hover"),c=Qe.getColor("editable-overlay-active"),u=new B(l).setAlpha(0);this.noteArrows.forEach(h=>{let d=o==h.type?c:h.hovered?l:u;_.general.smoothAnimations&&(d=new B(US(new B(h.highlight.tint).setAlpha(h.highlight.alpha),d,.3))),h.highlight.tint=d.toNumber(),h.highlight.alpha=d.alpha})}selectText(e){const t=window.getSelection(),i=document.createRange();!t||!i||(i.selectNodeContents(e),t.removeAllRanges(),t.addRange(i))}updateTime(){this.millis.innerText=this.millis.innerText.padEnd(3,"0").slice(0,3);const e=this.parseString(this.min),t=this.parseString(this.sec),i=this.parseString(this.millis);if(e===null||t===null||i===null){this.lastTime=null;return}let s=e*60+t+i/1e3;s>9999999&&(s=9999999),s<0&&(s=0),this.manager.chartManager.time=s,this.lastTime=null}updateBeat(){let e=this.parseString(this.beat);if(e===null){this.lastBeat=null;return}this.beatDropdown.value=="Measure"&&(e=this.manager.chartManager.loadedChart?.timingData?.getBeatFromMeasure(e)??e*4),e>9999999&&(e=9999999),e<0&&(e=0),this.manager.chartManager.beat=e,this.lastBeat=null}updateOffset(){let e=this.parseString(this.offset);if(e===null){this.lastOffset=null;return}e>9999999&&(e=9999999),e<-9999999&&(e=-9999999),this.lastOffset=null,!(!this.manager.chartManager.loadedChart||!this.manager.chartManager.loadedSM)&&(this.manager.chartManager.loadedChart.timingData.hasChartOffset()?this.manager.chartManager.loadedChart.timingData:this.manager.chartManager.loadedSM.timingData).setOffset(e)}parseString(e){try{const t=_r.evaluate(e.innerText);return isFinite(t)?t:0}catch{return null}}}class tC extends Ae{app;chartManager;children=[];constructor(e){super(),this.app=e.app,this.chartManager=e,this.addChild(new KS(this)),this.addChild(new ZS(this)),this.addChild(new eC(this)),this.addChild(new ga(this)),this.addChild(new XS(this)),this.addChild(new JS(this)),this.zIndex=2}update(){this.x=this.app.renderer.screen.width/2,this.y=this.app.renderer.screen.height/2,this.children.forEach(e=>e.update())}startPlay(){this.children.forEach(e=>e.startPlay())}endPlay(){this.children.forEach(e=>e.endPlay())}}const jc=Array(85).fill(void 0).map((r,e)=>33+e),Sy=[];for(const r of jc)for(const e of jc)Sy.push([r,e]);const $c="<~".split("").map(r=>r.charCodeAt(0)),Xc="~>".split("").map(r=>r.charCodeAt(0));function iC(r,e,t,i=!1,s=!1,n=!1){let a;typeof r=="string"?a=r.split("").map(h=>h.charCodeAt(0)):a=[...new Uint8Array(r)];const o=4-a.length%4;for(let h=0;ho.charCodeAt(0)):i=[...new Uint8Array(r)],e){if(i.at(-1)!=Xc.at(-1)||i.at(-2)!=Xc.at(-2))return!1;i.at(0)==$c.at(0)&&i.at(1)==$c.at(1)?i=i.slice(2,-2):i=i.slice(void 0,-2)}for(let o=0;o<4;o++)i.push("u".charCodeAt(0));let s=[],n=[];for(const o of i)if(o>=33&&117>=o){if(n.push(o),n.length==5){let l=0;for(const c of n)l=85*l+(c-33);if(l>2**32-1)return!1;s.push(l>>24&255),s.push(l>>16&255),s.push(l>>8&255),s.push(l&255),n=[]}}else if(o==122){if(n.length!=0)return!1;s.push(0),s.push(0),s.push(0),s.push(0)}else if(o==121){if(n.length!=0)return!1;s.push(32),s.push(32),s.push(32),s.push(32)}else if(!t.includes(String.fromCharCode(o)))return!1;const a=4-n.length;return a&&(s=s.slice(void 0,-a)),s}function hi(r){let e=0,t=0,i=129;for(;i&128;){const s=r.shift();if(!s)break;e=e|(s&127)<<7*t++,i=s}return e}function ci(r){const e=[];let t=!1;for(;!t;){let i=r&127;r=r>>7,t=r==0,t||(i=i|128),e.push(i)}return e}const rC=["Hold","Mine","Roll","Lift","Fake"];function sC(r){if(r.startsWith("ArrowVortex:notes:")){const e=Ud(r.slice(18));if(e!==!1){const t=Array.from(e);if(t.shift()!=0)return;const i=hi(t),s=[];for(let n=0;n4)continue;const h=rC[u];if(l==c){if(h=="Hold"||h=="Roll")continue;s.push({type:h,beat:l/48,col:o})}else{if(h=="Mine"||h=="Fake"||h=="Lift")continue;s.push({type:h,beat:l/48,hold:(c-l)/48,col:o})}}else s.push({type:"Tap",beat:hi(t)/48,col:o})}return s}}}function nC(r){const e=[0];e.push(...ci(r.length));for(const t of r)if(t.type=="Tap"){const i=Math.round(t.beat*48);e.push(t.col),e.push(...ci(i))}else{e.push(t.col+128);const i=Math.round(t.beat*48);let s=0;Re(t)&&(s=t.hold);const n=Math.round(s*48)+i;e.push(...ci(i)),e.push(...ci(n)),e.push(["Hold","Mine","Roll","Lift","Fake"].indexOf(t.type))}return"ArrowVortex:notes:"+Nd(e).map(t=>String.fromCharCode(t)).join("")}const Sl=["BPMS","STOPS","DELAYS","WARPS","TIMESIGNATURES","TICKCOUNTS","COMBOS","SPEEDS","SCROLLS","FAKES","LABELS","ATTACKS","BGCHANGES","FGCHANGES"];function Ar(r){const e=new ArrayBuffer(4);return new DataView(e).setUint32(0,r,!0),Array.from(new Uint8Array(e))}function Er(r){const e=new Uint8Array(r.splice(0,4));return new DataView(e.buffer).getUint32(0,!0)}function Dr(r){const e=new ArrayBuffer(8);return new DataView(e).setFloat64(0,r,!0),Array.from(new Uint8Array(e))}function Or(r){const e=new Uint8Array(r.splice(0,8)),t=new DataView(e.buffer);return ae(t.getFloat64(0,!0),3)}function aC(r){return[r.length,...r.split("").map(e=>e.charCodeAt(0))]}function oC(r){const e=r.shift();if(!e)return"";let t="";for(let i=0;ie.charCodeAt(0)))}function Cr(r){const e=hi(r);if(!e)return"";let t="";for(let i=0;i{if(e.type=="ATTACKS"||e.type=="BGCHANGES"||e.type=="FGCHANGES")return!0;const t=Math.round(e.beat*48)/48;if(Math.abs(t-e.beat)>5e-4)return!0;if(e.type=="FAKES"||e.type=="WARPS"){const i=Math.round(e.value*48)/48;if(Math.abs(i-e.value)>5e-4)return!0}return e.type=="LABELS"&&e.value.length>255||e.type=="TIMESIGNATURES"&&(e.upper>2**32-1||e.lower>2**32-1)||e.type=="COMBOS"&&(e.hitMult>2**32-1||e.missMult>2**32-1)?!0:e.type=="TICKCOUNTS"&&e.value>2**32-1})?cC(r):hC(r)}function hC(r){const e=[],t=new Map;r.forEach(i=>{t.has(i.type)||t.set(i.type,[]),t.get(i.type)?.push(i)});for(const[i,s]of t.entries())if(!(i=="ATTACKS"||i=="BGCHANGES"||i=="FGCHANGES")){e.push(s.length),e.push(Sl.indexOf(i));for(const n of s)switch(e.push(...Ar(Math.round(n.beat*48))),n.type){case"BPMS":case"STOPS":case"DELAYS":case"SCROLLS":e.push(...Dr(n.value));break;case"FAKES":case"WARPS":e.push(...Ar(Math.round(n.value*48)));break;case"TIMESIGNATURES":e.push(...Ar(Math.round(n.upper))),e.push(...Ar(Math.round(n.lower)));break;case"COMBOS":e.push(...Ar(Math.round(n.hitMult))),e.push(...Ar(Math.round(n.missMult)));break;case"TICKCOUNTS":e.push(...Ar(Math.round(n.value)));break;case"SPEEDS":e.push(...Dr(n.value)),e.push(...Dr(n.delay)),e.push(...Ar(n.unit=="B"?0:1));break;case"LABELS":e.push(...aC(n.value))}}return e.push(0),"ArrowVortex:tempo:"+Nd(e).map(i=>String.fromCharCode(i)).join("")}function cC(r){const e=[],t=new Map;r.forEach(i=>{t.has(i.type)||t.set(i.type,[]),t.get(i.type)?.push(i)});for(const[i,s]of t.entries()){e.push(...ci(s.length)),e.push(Sl.indexOf(i));for(const n of s)switch(e.push(...ci(Math.round((n.type=="ATTACKS"?n.second:n.beat)*1e3))),n.type){case"BPMS":case"STOPS":case"DELAYS":case"SCROLLS":case"FAKES":case"WARPS":e.push(...Dr(n.value));break;case"TIMESIGNATURES":e.push(...ci(Math.round(n.upper))),e.push(...ci(Math.round(n.lower)));break;case"COMBOS":e.push(...ci(Math.round(n.hitMult))),e.push(...ci(Math.round(n.missMult)));break;case"TICKCOUNTS":e.push(...ci(Math.round(n.value)));break;case"SPEEDS":e.push(...Dr(n.value)),e.push(...Dr(n.delay)),e.push(n.unit=="B"?0:1);break;case"LABELS":e.push(...Sr(n.value));break;case"ATTACKS":e.push(...Dr(n.value)),e.push(n.endType=="LEN"?0:1),e.push(...Sr(n.mods));break;case"BGCHANGES":case"FGCHANGES":e.push((n.crossFade?1:0)+((n.stretchRewind?1:0)<<1)+((n.stretchNoLoop?1:0)<<2)),e.push(...Sr(n.file)),e.push(...Dr(n.updateRate)),e.push(...Sr(n.effect)),e.push(...Sr(n.file2)),e.push(...Sr(n.transition)),e.push(...Sr(n.color1)),e.push(...Sr(n.color2))}}return"SMEditor:tempo:"+Nd(e).map(i=>String.fromCharCode(i)).join("")}function dC(r){if(r.startsWith("SMEditor:tempo:"))return pC(r);if(r.startsWith("ArrowVortex:tempo:"))return uC(r)}function uC(r){if(!r.startsWith("ArrowVortex:tempo:"))return;const e=Ud(r.slice(18)),t=[];if(e===!1)return;const i=Array.from(e);try{for(;;){const s=i.shift();if(s===void 0)return;if(s==0)break;const n=i.shift();if(n===void 0)return;const a=Sl[n];for(let o=0;o0,stretchRewind:(c&2)>0,stretchNoLoop:(c&4)>0,effect:Cr(i),file2:Cr(i),transition:Cr(i),color1:Cr(i),color2:Cr(i)})}}}}}catch{return}return t}const fC={"dance-single":[{x:-1,y:0},{x:0,y:-1},{x:0,y:1},{x:1,y:0}]},pt={DOUBLESTEP:850,BRACKETJACK:20,JACK:30,JUMP:30,BRACKETTAP:400,HOLDSWITCH:20,MINE:1e4,FOOTSWITCH:5e3,MISSED_FOOTSWITCH:500,FACING:2,DISTANCE:6,SPIN:1e3,SIDESWITCH:130},Af=[1,2,3,4],mC="LlRr";class gC{id=0;neighbors=new Map;state;constructor(e,t){this.state=e,this.id=t}}class yC{nodes=[];states=[];startNode=0;endNode=0;stateNodeMap=new Map;addOrGetExistingNode(e){this.stateNodeMap.get(e.rowIndex)==null&&this.stateNodeMap.set(e.rowIndex,new Map);for(const[n,a]of this.stateNodeMap.get(e.rowIndex))if(bC(e,this.states[n]))return this.nodes[a];const t=this.states.length,i=this.nodes.length;this.states.push(e);const s=new gC(e,i);return this.nodes.push(s),this.stateNodeMap.get(e.rowIndex)?.set(t,i),s}addEdge(e,t,i){e.neighbors.set(t.id,i)}}class vC{app;permuteCache=new Map;layout;constructor(e,t){this.app=e,this.layout=fC[t]}help(){console.log(`Currently only compatible with dance-single. -Available commands: -analyze(): analyze the current chart -clear(): clear parity highlights`)}getActionCost(e,t,i,s){const n=i[s],a=t.second-e.second;let o=0;const l=new Array(t.columns.length).fill(0);for(let O=0;OO!=0))for(const O of t.movedFeet)switch(O){case 1:case 2:e.columns.includes(3)||e.columns.includes(4)||(o+=500);break;case 3:case 4:e.columns.includes(1)||e.columns.includes(4)||(o+=500);break}const p=t.movedFeet.has(1)||t.movedFeet.has(2),f=t.movedFeet.has(3)||t.movedFeet.has(4),m=(e.movedFeet.has(1)&&!e.holdFeet.has(1)||e.movedFeet.has(2)&&!e.holdFeet.has(2))&&(e.movedFeet.has(3)&&!e.holdFeet.has(3)||e.movedFeet.has(4)&&!e.holdFeet.has(4));let g=!1,y=!1;if(m||(c!=-1&&p&&(e.columns[c]==1&&!t.holdFeet.has(1)&&(e.movedFeet.has(1)&&!e.holdFeet.has(1)||e.movedFeet.has(2)&&!e.holdFeet.has(2))&&(g=!0),e.columns[u]==2&&!t.holdFeet.has(2)&&(e.movedFeet.has(1)&&!e.holdFeet.has(1)||e.movedFeet.has(2)&&!e.holdFeet.has(2))&&(g=!0)),h!=-1&&f&&(e.columns[h]==3&&!t.holdFeet.has(3)&&(e.movedFeet.has(3)&&!e.holdFeet.has(3)||e.movedFeet.has(4)&&!e.holdFeet.has(4))&&(y=!0),e.columns[d]==4&&!t.holdFeet.has(4)&&(e.movedFeet.has(3)&&!e.holdFeet.has(3)||e.movedFeet.has(4)&&!e.holdFeet.has(4))&&(y=!0))),p!=f&&(p||f)&&t.holdFeet.size==0&&!m){let O=!1;p&&!g&&(e.movedFeet.has(1)&&!e.holdFeet.has(1)||e.movedFeet.has(2)&&!e.holdFeet.has(2))&&(O=!0),f&&!y&&(e.movedFeet.has(3)&&!e.holdFeet.has(3)||e.movedFeet.has(4)&&!e.holdFeet.has(4))&&(O=!0);const W=i[s-1];if(W!==void 0)for(const V of W.holds){if(V===void 0)continue;const F=this.app.chartManager.loadedChart.timingData.getBeatFromSeconds(n.second),U=this.app.chartManager.loadedChart.timingData.getBeatFromSeconds(W.second);V.beat+V.hold>U&&V.beat+V.hold=F&&(O=!1)}O&&(o+=pt.DOUBLESTEP),g&&t.movedFeet.has(1)&&t.movedFeet.has(2)&&(o+=pt.BRACKETJACK),y&&t.movedFeet.has(3)&&t.movedFeet.has(4)&&(o+=pt.BRACKETJACK)}p&&f&&n.notes.filter(O=>O!==void 0).length>=2&&(o+=pt.JUMP/a);let w=-1,b=-1,v=-1,A=-1;for(let O=0;O0&&(o+=N*pt.FACING),G>0&&(o+=G*pt.FACING),E>0&&(o+=E*pt.FACING),S>0&&(o+=S*pt.FACING);const x=this.averagePoint(e.columns.indexOf(1),e.columns.indexOf(2)),D=this.averagePoint(e.columns.indexOf(3),e.columns.indexOf(4)),$=this.averagePoint(w,b),R=this.averagePoint(v,A);if(R.x<$.x&&D.xx.y&&(o+=pt.SPIN),R.x<$.x&&D.x$.y&&D.y=.25&&!n.mines.some(O=>O!==void 0)&&!n.fakeMines.some(O=>O!==void 0)){const O=a-.25;for(let W=0;WO!==void 0)||n.fakeMines.some(O=>O!==void 0))&&(o+=pt.MISSED_FOOTSWITCH),a<=.15&&p!=f){const O=.15-a;(g||y)&&(o+=(1/O-1/.15)*pt.JACK)}for(const O of t.movedFeet){const W=e.columns.indexOf(O);W!=-1&&(o+=Math.sqrt(this.getDistanceSq(this.layout[W],this.layout[t.columns.indexOf(O)]))*pt.DISTANCE/a)}return t.columns=l,o}calculatePermuteColumnKey(e){let t=0;for(let i=0;i<4;i++)(e.notes[i]!==void 0||e.holds[i]!==void 0)&&(t+=Math.pow(2,i));return t}getPermuteColumns(e){const t=this.calculatePermuteColumnKey(e);let i=this.permuteCache.get(t);return i==null&&(i=this.permuteColumn(e,new Array(4).fill(0),0),this.permuteCache.set(t,i)),this.permuteCache.get(t)}permuteColumn(e,t,i){if(i>=t.length){let n=-1,a=-1,o=-1,l=-1;for(let c=0;c0?u.fake||u.warped?l[u.col]=u.second:o[u.col]=u.second:u.fake||u.warped?a[u.col]=u.second:n[u.col]=u.second;continue}u.fake||u.warped||(i!=u.second&&(i!=null&&c.push({notes:s,holds:t.map(h=>{if(!(h===void 0||h.second>=i))return h}),holdTails:new Set(t.filter(h=>!(h===void 0||Math.abs(h.beat+h.hold-this.app.chartManager.loadedChart.timingData.getBeatFromSeconds(i))>5e-4)).map(h=>h.col)),mines:o,fakeMines:l,second:i}),i=u.second,s=[],o=n,l=a,n=[],a=[],t=t.map(h=>{if(!(h===void 0||u.beat>h.beat+h.hold))return h})),s[u.col]=u,Re(u)&&(t[u.col]=u))}return c.push({notes:s,holds:t.map(u=>{if(!(u===void 0||u.second>=i))return u}),holdTails:new Set(t.filter(u=>!(u===void 0||Math.abs(u.beat+u.hold-this.app.chartManager.loadedChart.timingData.getBeatFromSeconds(i))>5e-4)).map(u=>u.col)),mines:o,fakeMines:l,second:i}),c}analyze(){const e=this.app.chartManager.loadedChart?.getNotedata();if(!e)return[];const t=this.createRows(e),i=this.buildStateGraph(t);this.analyzeGraph(t,i)}analyzeGraph(e,t){const i=this.computeCheapestPath(t);for(let s=0;s0;){const u=n.shift(),h=t.addOrGetExistingNode(u),d=this.getPermuteColumns(e[l]);for(const p of d){const f=this.initResultState(u,e[l],l,p),m=this.getActionCost(u,f,e,l),g=t.addOrGetExistingNode(f);t.addEdge(h,g,m),c.add(g.id)}}for(const u of c)n.push(t.nodes[u].state)}const a={rowIndex:e.length,second:e[e.length-1].second+1,columns:[],movedFeet:new Set,holdFeet:new Set},o=t.addOrGetExistingNode(a);for(t.endNode=o.id;n.length>0;){const l=n.shift(),c=t.addOrGetExistingNode(l);t.addEdge(c,o,0)}return t}initResultState(e,t,i,s){const n={rowIndex:i,second:t.second,columns:s,movedFeet:new Set,holdFeet:new Set};for(let a=0;a<4;a++)s[a]!=null&&((t.holds[a]==null||e.columns[a]!=s[a])&&n.movedFeet.add(s[a]),t.holds[a]!=null&&n.holdFeet.add(s[a]));return n}computeCheapestPath(e){const t=e.startNode,i=e.endNode,s=[],n=Array(e.nodes.length).fill(Number.MAX_VALUE),a=Array(e.nodes.length).fill(-1);n[t]=0;for(let l=0;l<=i;l++){const c=e.nodes[l];for(const[u,h]of c.neighbors)n[l]+ht.parity=void 0)}}function bC(r,e){return!(r.second!==e.second||r.rowIndex!==e.rowIndex||!wC(r.columns,e.columns)||!Ef(r.movedFeet,e.movedFeet)||!Ef(r.holdFeet,e.holdFeet))}function wC(r,e){if(r.length!==e.length)return!1;for(let t=0;t{fetch(e.src).then(i=>i.arrayBuffer()).then(i=>this.decodeData(i)).then(i=>{i&&(this._buffer=i)}).catch(i=>{Ee.createFormatted("Failed to load sound effect: "+i.message,"error")}).finally(()=>{t()})})}destroy(){this._destroyed||(this.stop(),this._buffer=this._audioContext.createBuffer(2,1,44100),this._destroyed=!0)}async decodeData(e){return new Promise((t,i)=>{if(!e){t();return}(async()=>{try{t(await this._audioContext.decodeAudioData(e))}catch(s){i(s)}})()})}volume(e){this._destroyed||this._volume!=e&&(this._volume=e,this._gainNode.gain.setValueAtTime(e,this._audioContext.currentTime))}rate(e){if(!this._destroyed&&this._rate!=e){this._rate=e;for(const t of this._sources)t.playbackRate.value=e}}play(e){if(this._destroyed)return;const t=_C.create(this._audioContext.createBufferSource());t.buffer=this._buffer,t.connect(this._gainNode),this._gainNode.connect(this._audioContext.destination),t.start(e+this._audioContext.currentTime,0),t.playbackRate.value=this._rate,this._sources.push(t),t.onended=()=>{t.disconnect(),this._sources=this._sources.filter(i=>i!=t)}}stop(){if(!this._destroyed){for(const e of this._sources)e.stop(),e.disconnect();this._sources=[]}}}class xC{static menuElement;static closeTimeout;static open(e,t){e.chartManager.getMode()!=q.View&&(this.buildMenu(e),this.menuElement.style.display="none",setTimeout(()=>this.fitContextMenu(t)),this.menuElement.classList.add("entering"),clearTimeout(this.closeTimeout),setTimeout(()=>this.menuElement?.classList.remove("entering"),300),this.menuElement.style.left=t.clientX+"px",this.menuElement.style.top=t.clientY+"px")}static fitContextMenu(e){this.menuElement.style.display="";const t=this.menuElement.getBoundingClientRect(),i=window.innerHeight-t.bottom-20,s=window.innerWidth-t.right-20;i<0&&(this.menuElement.style.top=e.clientY+i+"px"),s<0&&(this.menuElement.style.left=e.clientX+s+"px"),this.menuElement.style.transformOrigin=`${Math.max(0,-s)}px ${Math.max(0,-i)}px`}static close(){this.menuElement&&(this.menuElement.classList.add("exiting"),this.closeTimeout=setTimeout(()=>this.menuElement.replaceChildren(),300))}static buildMenu(e){const t=document.createElement("div");if(t.appendChild(this.createElement(e,{type:"selection",id:"cut"})),t.appendChild(this.createElement(e,{type:"selection",id:"copy"})),t.appendChild(this.createElement(e,{type:"selection",id:"paste"})),t.appendChild(this.createElement(e,{type:"selection",id:"pasteReplace"})),e.chartManager.getMode()==q.Edit&&e.chartManager.hasNoteSelection()){const i=document.createElement("div");i.classList.add("separator"),t.appendChild(i),Xn.selection.options.slice(0,-4).forEach(s=>{t.appendChild(this.createElement(e,s))})}this.menuElement=t,t.id="context-menu",document.getElementById("context-menu")?.replaceWith(this.menuElement)}static createElement(e,t){if(t.type=="separator"){const i=document.createElement("div");return i.classList.add("separator"),i}if(t.type=="selection"||t.type=="checkbox"||t.type=="dropdown"){const i=document.createElement("div"),s=document.createElement("div"),n=document.createElement("div");let a;if(t.type=="selection"||t.type=="checkbox"){const o=nt[t.id];a=document.createElement("div"),a.innerText=De.getKeybindString(t.id),a.classList.add("keybind","unselectable"),n.innerText=o?.label??t.id;let l=o?.disabled??!0;typeof l=="function"&&(l=l(e)),l&&i.classList.add("disabled"),i.addEventListener("click",()=>{l||(o?.callback(e),this.close())})}else a=Se.getIcon("CHEVRON",16),a.style.transform="rotate(-90deg)",n.innerText=typeof t.title=="function"?t.title(e):t.title;if(s.appendChild(n),s.appendChild(a),i.appendChild(s),i.classList.add("menu-item"),s.classList.add("menu-item-title","menu-hover"),n.classList.add("title","unselectable"),t.type=="dropdown"){const o=document.createElement("div");i.appendChild(o),o.classList.add("menubar-dropdown"),t.options.map(l=>this.createElement(e,l)).forEach(l=>o.appendChild(l))}if(t.type=="checkbox"){let o=t.checked;typeof o=="function"&&(o=o(e)),o&&(n.innerText="✓ "+n.innerText)}return i}if(t.type=="menu"){const i=document.createElement("div"),s=document.createElement("div"),n=document.createElement("div");return i.appendChild(s),s.innerText=t.title,i.appendChild(n),s.classList.add("title","unselectable"),i.classList.add("menu-item","menu-main"),s.classList.add("menu-hover"),n.classList.add("menubar-dropdown","unselectable"),i.onmouseenter=()=>{n.replaceChildren(...t.options.map(a=>this.createElement(e,a)))},i.onmouseleave=()=>{n.replaceChildren()},i}return document.createElement("div")}}const TC={fontName:"Main",fontSize:20,fill:["#ffffff"]};class AC extends Ae{renderer;barlineMap=new Map;barlineLabelMap=new Map;barlinePool=new ya({create:()=>{const e=new Fe(ie.WHITE);return et(e,"text-color"),e}});barlineLabelPool=new ya({create:()=>{const e=new Oe("",TC);return et(e,"text-color"),e}});constructor(e){super(),this.renderer=e;const t=()=>{this.barlineMap.clear(),this.barlineLabelMap.clear(),this.barlinePool.destroyAll(),this.barlineLabelPool.destroyAll()};K.on("timeSigChanged",t),this.on("destroyed",()=>K.off("timeSigChanged",t)),this.addChild(this.barlinePool,this.barlineLabelPool)}update(e,t){this.visible=this.renderer.shouldDisplayBarlines();for(const[i,s]of this.renderer.chart.timingData.getMeasureBeats(e,t)){if(!this.barlineMap.has(i)){const n=this.barlinePool.createChild();if(!n)continue;Object.assign(n,{width:this.renderer.chart.gameType.notefieldWidth+128,height:s?4:1,visible:!0}),n.anchor.set(.5),this.barlineMap.set(i,n)}if(s&&!this.barlineLabelMap.has(i)){const n=this.barlineLabelPool.createChild();if(!n)continue;Object.assign(n,{x:(this.renderer.chart.gameType.notefieldWidth+128)/-2-16,text:`${Math.round(this.renderer.chart.timingData.getMeasure(i))}`,visible:!0}),n.anchor.set(1,.5),this.barlineLabelMap.set(i,n)}}for(const[i,s]of this.barlineMap.entries()){if(it){this.barlineMap.delete(i),this.barlinePool.destroyChild(s);continue}s.y=this.renderer.getYPosFromBeat(i)}for(const[i,s]of this.barlineLabelMap.entries()){if(it){this.barlineLabelMap.delete(i),this.barlineLabelPool.destroyChild(s);continue}s.y=this.renderer.getYPosFromBeat(i)}}}class EC extends Ae{previewArea=new Fe(ie.WHITE);previewText=new Oe("SONG PREVIEW",{fontName:"Main",fontSize:13});renderer;constructor(e){super(),this.renderer=e,Object.assign(this.previewArea,{alpha:.2,tint:11052482,width:this.renderer.chart.gameType.notefieldWidth+96,height:64}),this.previewText.x=-this.previewArea.width/2+5,this.previewArea.anchor.x=.5,et(this.previewText,"text-color"),this.addChild(this.previewArea,this.previewText)}update(e,t){const i=Number(this.renderer.chart.sm.properties.SAMPLESTART),s=Number(this.renderer.chart.sm.properties.SAMPLELENGTH);if(Number.isNaN(i)||Number.isNaN(s)||!this.renderer.shouldDisplayBarlines()||this.renderer.chart.timingData.getBeatFromSeconds(i+s)t){this.visible=!1;return}this.visible=!0;let n=this.renderer.getYPosFromSecond(i),a=this.renderer.getYPosFromSecond(i+s);a=0){l.visible=!1;continue}if(Math.abs(e[n].beat-t)>20&&Math.abs(e[n+1].beat-t)>20&&!(t>e[n].beat&&te[n].beat&&te[n+1].beat&&(l.text.y=l.box.height),l.x=(n%4-1.5)*150}for(const[n,a]of this.scrollMap.entries())if(!a.marked){this.scrollMap.delete(n),a.destroy();continue}const i=this.renderer.findFirstOnScreenScroll(),s=this.renderer.findLastOnScreenScroll();{const n=this.scrollMap.get(i);n&&(n.text.text+=` -start`,n.box.tint==16777215&&(n.box.tint=16777096),n.text.tint=16777096)}{const n=this.scrollMap.get(s);n&&(n.text.text+=` -end`,n.box.tint==16777215&&(n.box.tint=8978431),n.text.tint=8978431)}this.receptors.y=this.renderer.getActualReceptorYPos(),this.topBound.y=this.renderer.getUpperBound(),this.bottomBound.y=this.renderer.getLowerBound(),this.topBoundBeat.y=this.renderer.getYPosFromBeat(this.renderer.getVisualBeat()-_.chart.maxDrawBeatsBack),this.bottomBoundBeat.y=this.renderer.getYPosFromBeat(this.renderer.getVisualBeat()+_.chart.maxDrawBeats),this.topScreenBeat.y=this.renderer.getYPosFromBeat(this.renderer.getTopOnScreenBeat()),this.bottomScreenBeat.y=this.renderer.getYPosFromBeat(this.renderer.getBottomOnScreenBeat()),this.topScreenBeatText.y=this.topScreenBeat.y,this.topScreenBeatText.text=ae(this.renderer.getTopOnScreenBeat(),3)+"",this.bottomScreenBeatText.y=this.bottomScreenBeat.y,this.bottomScreenBeatText.text=ae(this.renderer.getBottomOnScreenBeat(),3)+""}inBounds(e){const t=this.renderer.chartManager.app.renderer.screen.height/this.scale.y;return Math.abs(e)this.renderer.getVisualBeat()),this.trackVariable(()=>this.renderer.getVisualTime()),this.trackVariable(()=>_.chart.speed),this.trackVariable(()=>this.getSpeed(),n=>{this.speed=n,clearTimeout(this.lastSpeedTimeout),this.lastSpeedTimeout=setTimeout(()=>{this.blockCache.clear(),this.lastSpeed=this.speed,this.drawDirty=!0},200)}),this.trackVariable(()=>_.chart.zoom),this.trackVariable(()=>_.chart.CMod),this.trackVariable(()=>_.chart.doSpeedChanges),this.trackVariable(()=>_.chart.waveform.allowFilter),this.trackVariable(()=>_.chart.reverse),this.trackVariable(()=>_.chart.waveform.antialiasing,n=>{this.filters=n?[new vc]:[]}),this.trackVariable(()=>this.renderer.chartManager.app.renderer.screen.width,()=>this.resizeWaveform()),this.trackVariable(()=>this.renderer.chartManager.app.renderer.screen.height,()=>this.resizeWaveform()),this.trackVariable(()=>_.chart.waveform.filteredColor),this.trackVariable(()=>_.chart.waveform.color),this.trackVariable(()=>_.chart.waveform.speedChanges),this.trackVariable(()=>_.chart.receptorYPos),this.trackVariable(()=>_.chart.waveform.lineHeight,()=>{_.chart.waveform.lineHeight<=0&&(_.chart.waveform.lineHeight=1),this.updateLineHeight()}),this.trackVariable(()=>_.chart.zoom,()=>this.resizeWaveform()),this.trackVariable(()=>this.renderer.chartManager.chartAudio.hasFilters());const t=()=>this.getData();this.anchor.set(.5),this.renderer.chartManager.chartAudio.onUpdate(t),this.getData(),this.resizeWaveform(),this.filters=_.chart.waveform.antialiasing?[new vc]:[];const i=()=>this.drawDirty=!0,s=()=>{this.getData(),this.resizeWaveform(),this.renderer.chartManager.chartAudio.onUpdate(t)};K.on("timingModified",i),this.on("destroyed",()=>{K.off("timingModified",i)}),K.on("audioLoaded",s),this.on("destroyed",()=>{K.off("audioLoaded",s),this.renderer.chartManager.chartAudio.offUpdate(t)})}getData(){this.rawData=this.renderer.chartManager.chartAudio.getRawData(),this.filteredRawData=this.renderer.chartManager.chartAudio.getFilteredRawData(),this.sampleRate=this.renderer.chartManager.chartAudio.getSampleRate(),this.blockCache.clear(),this.drawDirty=!0}resizeWaveform(){this.waveformTex.resize(Le((this.rawData?.length??0)*288*_.chart.zoom,1,this.renderer.chartManager.app.renderer.screen.width),this.renderer.chartManager.app.renderer.screen.height)}update(){this.visible=_.chart.waveform.enabled&&this.renderer.shouldDisplayBarlines(),_.chart.waveform.enabled&&((this.drawDirty||this.variableChanged())&&(this.colorCache.toHexa()!=_.chart.waveform.color&&(this.colorCache=fa(_.chart.waveform.color)),this.filteredColorCache.toHexa()!=_.chart.waveform.filteredColor&&(this.filteredColorCache=fa(_.chart.waveform.filteredColor)),this.drawDirty=!1,this.renderData(),this.renderer.chartManager.app.renderer.render(this.lineContainer,{renderTexture:this.waveformTex})),this.scale.set(1/_.chart.zoom))}trackVariable(e,t){this.trackedVariables.set(e,{value:e(),cb:t})}variableChanged(){let e=!1;for(const[t,i]of this.trackedVariables.entries())t()!=i.value&&(this.trackedVariables.get(t).value=t(),this.trackedVariables.get(t).cb?.(t()),e=!0);return e}getSample(e,t,i){if(t<0)return 0;const s=this.sampleRate/(this.lastSpeed*4),n=Math.floor(t*this.lastSpeed*4);if(this.blockCache.get(i)?.[n]!==void 0)return this.blockCache.get(i)[n];const a=Math.floor(n*s),o=e.slice(a,Math.floor(a+s)).reduce((l,c)=>l+Math.abs(c),0)/s;return this.blockCache.has(i)||this.blockCache.set(i,[]),this.blockCache.get(i)[n]=o,o}renderData(){this.resetPool();const e=_.chart.waveform.allowFilter&&this.renderer.chartManager.chartAudio.hasFilters(),t={data:{bpms:[],bpmIndex:0,timing:[],timingIndex:0,offset:0,lastBeat:-999,timingData:null},init(i){if(this.data.bpms=i.getTimingData("BPMS"),this.data.timing=i.getBeatTiming(),this.data.offset=i.getOffset(),this.data.bpms[0]?.beat!==0){const s=this.data.bpms[0]??{value:120,type:"BPMS",beat:0};s.beat=0,this.data.bpms.unshift(s)}this.data.timing.length==0&&this.data.timing.unshift({beat:0,secondBefore:-this.data.offset,secondAfter:-this.data.offset,secondClamp:-this.data.offset,secondOf:-this.data.offset,warped:!1,bpm:120}),this.data.timingData=i},getBPM(i){for(;i>this.data.bpms[this.data.bpmIndex+1]?.beat;)this.data.bpmIndex++;return this.data.bpms[this.data.bpmIndex].value},getSecond(i){const s=Math.floor(i*1e3)/1e3;if(i<=0)return-this.data.offset+i*60/this.getBPM(i);if(s>=this.data.timing[this.data.timingIndex+1]?.beat){for(;s>=this.data.timing[this.data.timingIndex+1]?.beat;)this.data.timingIndex++;return this.data.timingData.getSecondsFromBeat(i)}else{const n=this.data.timing[this.data.timingIndex];let o=(i-n.beat)*60/n.bpm;return n.warped&&(o=0),Math.max(n.secondClamp,n.secondAfter+o)}}};if(_.chart.waveform.speedChanges&&!_.chart.CMod&&_.chart.doSpeedChanges){const i=_.chart.speed,s=this.renderer.getCurrentSpeedMult(),n=this.renderer.getTopOnScreenBeat(),a=this.renderer.getBottomOnScreenBeat(),o=Math.min(n,a),l=Math.max(n,a),c=this.renderer.findFirstOnScreenScroll(),u=this.renderer.findLastOnScreenScroll(),h=[...this.renderer.chart.timingData.getTimingData("SCROLLS")];h[0]?.beat!=0&&h.unshift({type:"SCROLLS",beat:0,value:h[0]?.value??1}),t.init(this.renderer.chart.timingData);const d=h.findIndex(b=>b.beat==c.beat),p=h.findIndex(b=>b.beat==u.beat),f=100/i/Math.abs(s)/64/_.chart.zoom,m=this.renderer.chartManager.app.renderer.screen.height;let g=o,y=Math.round(this.renderer.getYPosFromBeat(g)*_.chart.zoom+this.parent.y),w=this.renderer.chart.getSecondsFromBeat(g);for(const b of h.slice(d,p+1)){if(b.value==0)continue;const v=f/Math.abs(b.value);b.beat!=c.beat?g=b.beat:g=Math.round((g-b.beat)/v)*v+b.beat,y=Math.round(this.renderer.getYPosFromBeat(g)*_.chart.zoom+this.parent.y),w=this.renderer.chart.getSecondsFromBeat(g);const A=this.renderer.getScrollDirection(b.value),C=h[h.indexOf(b)+1]?.beat??Number.MAX_VALUE;for(;gm){if(A>0){g=C;break}g+=v*(y-m),y=m;continue}g+=v*_.chart.waveform.lineHeight,y+=A*_.chart.waveform.lineHeight,w=t.getSecond(g),this.drawLine(w,y,e)}}}else if(_.chart.CMod){let i=this.renderer.getSecondFromYPos((-this.parent.y+(_.chart.reverse?this.renderer.chartManager.app.renderer.screen.height:0))/_.chart.zoom);const s=this.renderer.getPixelsToSecondsRatio()/_.chart.zoom;i=Math.floor(i/s)*s;const n=a=>{i+=s*_.chart.waveform.lineHeight,this.drawLine(i,a,e)};if(_.chart.reverse)for(let a=this.renderer.chartManager.app.renderer.screen.height;a>=0;a-=_.chart.waveform.lineHeight)n(a);else for(let a=0;a<=this.renderer.chartManager.app.renderer.screen.height;a+=_.chart.waveform.lineHeight)n(a)}else{let i=this.renderer.getBeatFromYPos((-this.parent.y+(_.chart.reverse?this.renderer.chartManager.app.renderer.screen.height:0))/_.chart.zoom);t.init(this.renderer.chart.timingData);const s=this.renderer.getPixelsToEffectiveBeatsRatio()/_.chart.zoom;i=Math.floor(i/s)*s;let n=this.renderer.chart.getSecondsFromBeat(i);const a=o=>{i+=s*_.chart.waveform.lineHeight,n=t.getSecond(i),this.drawLine(n,o,e)};if(_.chart.reverse)for(let o=this.renderer.chartManager.app.renderer.screen.height;o>=0;o-=_.chart.waveform.lineHeight)a(o);else for(let o=0;o<=this.renderer.chartManager.app.renderer.screen.height;o+=_.chart.waveform.lineHeight)a(o)}this.purgePool()}drawLine(e,t,i){if(!(e<0))for(let s=0;st>=this.poolSearch)}updateLineHeight(){for(const e of this.lineContainer.children){const t=e;t.height=_.chart.waveform.lineHeight}}getLine(){if(this.lineContainer.children[this.poolSearch]){const t=this.lineContainer.children[this.poolSearch];return t.visible=!0,this.poolSearch++,t}const e=new Fe(ie.WHITE);return e.height=_.chart.waveform.lineHeight,e.anchor.set(.5),e.visible=!0,this.poolSearch++,this.lineContainer.addChild(e),e}getSpeed(){return Math.min(_.chart.speed,kC)}}const PC="/smeditor/assets/missing-81d55ba9.png",My=ie.from(PC),BC={HoldBodyTopOffset:0,HoldBodyBottomOffset:0,RollBodyTopOffset:0,RollBodyBottomOffset:0};class RC{renderer;options;objects=[];updateHooks=new Set;hooks={};metrics;constructor(e,t){this.renderer=e,this.options=t,this.options.init?.(e),this.metrics={...BC,...this.options.metrics}}update(e){this.options.update?.(e),this.updateHooks.forEach(({item:t,cb:i})=>{t.destroyed||i(e)})}getPlaceholderSprite(){const e=new Fe(My);return e.anchor.set(.5),e}getBlankSprite(){return new Fe(ie.EMPTY)}getElement(e,t={}){try{return this.options.load?this.options.load.bind(this)(e,{noteskin:this,columnName:e.columnName,columnNumber:e.columnNumber,...t})??this.getPlaceholderSprite():this.loadElement(e,t)??this.getPlaceholderSprite()}catch(i){return console.error(i),_.debug.showNoteskinErrors&&Ee.createFormatted("Noteskin Error: "+i,"error"),this.getPlaceholderSprite()}}loadElement(e,t={}){const i=this.followRedirs(e);return i===void 0?(_.debug.showNoteskinErrors&&Ee.createFormatted(`Noteskin element ${e.columnName} ${e.element} failed to load for noteskin: Redirect loop`,"error"),this.getPlaceholderSprite()):i({noteskin:this,columnName:e.columnName,columnNumber:e.columnNumber,...t})}followRedirs(e){const t=[e];let i=e;for(;;){const s=this.options.elements[i.columnName]?.[i.element];if(s===void 0)return;if(typeof s=="function")return s;if(i={columnName:s.columnName??i.columnName,columnNumber:s.columnNumber??i.columnNumber,element:s.element},t.some(n=>i.columnName==n.columnName&&i.element==n.element))return;t.push(i)}}on(e,t,i){this.hooks[t]===void 0&&(this.hooks[t]=new Set);const s={item:e,cb:i};this.hooks[t].add(s),e.once("destroyed",()=>this.hooks[t].delete(s))}onUpdate(e,t){const i={item:e,cb:t};this.updateHooks.add(i),e.once("destroyed",()=>this.updateHooks.delete(i))}broadcast(e){if(this.hooks[e.type]===void 0)return;this.hooks[e.type].forEach(({item:i,cb:s})=>{i.destroyed||s(e)})}}const LC="/smeditor/assets/hold_judgement-82934f15.png";class ms extends Ae{children=[];static held_tex;static dropped_tex;notefield;constructor(e){super(),ms.held_tex||this.loadTex(),this.notefield=e}async loadTex(){const e=await Zs.load(LC),t=e.height,i=e.width;ms.held_tex=new ie(e,new ke(0,0,i,t/2)),ms.dropped_tex=new ie(e,new ke(0,t/2,i,t/2))}update(){this.y=this.notefield.renderer.getActualReceptorYPos()+(_.chart.reverse?-48:48);for(const e of this.children){const t=(Date.now()-e.createTime)/1e3;if(t<.1){const i=1-(1-t/.1)*(1-t/.1);e.scale.set(.3*i)}else if(t>.6&&t<.8){const i=(t-.6)/.2*(t-.6)/.2;e.scale.set(.3*(1-i))}}Ji(this.children,e=>Date.now()-e.createTime>800)}addJudge(e,t){if(!wn(t)&&!_s(t))return;const i=new Fe(wn(t)?ms.dropped_tex:ms.held_tex);i.anchor.set(.5),i.x=this.notefield.getColumnX(e),i.createTime=Date.now(),i.scale.set(0),this.addChild(i)}}const DC={L:233724,l:11261687,R:16559363,r:16442809};class OC extends Ae{notefield;arrowMap=new Map;notesDirty=!1;children=[];constructor(e){super(),this.notefield=e,this.sortableChildren=!0;const t=()=>{this.arrowMap.clear(),this.removeChildren()},i=()=>this.notesDirty=!0;K.on("timeSigChanged",t),K.on("chartModified",i),this.on("destroyed",()=>{K.off("timeSigChanged",t),K.off("chartModified",i)})}update(e,t){const i=this.notefield.renderer.chart.getNotedata();if(this.notesDirty){for(const[s,n]of this.arrowMap.entries())i.includes(s)||(n.destroy(),this.arrowMap.delete(s));this.notesDirty=!1}for(const s of i){if(s.beat>t)break;if(this.shouldDisplayNote(s,e,t)&&!this.arrowMap.has(s)){const n=new Ae,a=this.notefield.createNote(s);Object.assign(n,{x:this.notefield.getColumnX(s.col),zIndex:s.beat});const o=new Fe(ie.WHITE),l=a.getBounds();o.x=l.x,o.y=l.y,o.width=l.width,o.height=l.height,o.alpha=0;const c=new Fe(ie.WHITE);c.x=l.x,c.y=l.y,c.width=l.width,c.height=l.height,c.alpha=0,this.notefield.renderer.registerDragNote(n,s),n.wrapper=a,n.selection=o,n.parity=c,n.lastActive=!1,this.arrowMap.set(s,n),n.addChild(a,o,c),this.addChild(n)}}for(const[s,n]of this.arrowMap.entries()){if(!this.shouldDisplayNote(s,e,t)){n.destroy(),this.arrowMap.delete(s);continue}if(n.y=this.notefield.renderer.getActualReceptorYPos(),(!Re(s)||!s.gameplay?.lastHoldActivation||this.notefield.renderer.getVisualBeat(){e=="chart.allowReceptorDrag"&&(this.eventMode=_.chart.allowReceptorDrag?"static":"passive")};constructor(e){super(),this.notefield=e;for(let s=0;s{!this.dragStart||!this.dragOptionsStart||(_.chart.receptorXPos=Math.round(this.dragOptionsStart[0]+s.global.x-this.dragStart.x),_.chart.receptorYPos=Math.round(this.dragOptionsStart[1]+s.global.y-this.dragStart.y))},i=()=>{this.notefield.renderer.off("pointermove",t),this.notefield.renderer.off("pointerup",i)};this.on("pointerdown",s=>{this.dragStart=new We(s.globalX,s.globalY),this.dragOptionsStart=[_.chart.receptorXPos,_.chart.receptorYPos],s.preventDefault(),s.stopImmediatePropagation(),this.notefield.renderer.on("pointermove",t),this.notefield.renderer.on("pointerup",i)}),K.on("userOptionUpdated",this.optionUpdate),this.optionUpdate("chart.allowReceptorDrag")}destroy(){K.off("userOptionUpdated",this.optionUpdate)}update(){this.y=this.notefield.renderer.getActualReceptorYPos()}}class UC extends Ae{notefield;arrowMap=new Map;children=[];lastBeatShift=0;lastColShift=0;constructor(e){super(),this.notefield=e,this.sortableChildren=!0}update(e,t){if(!this.notefield.renderer.chartManager.selection.shift){this.removeChildren(),this.arrowMap.clear();return}const i=this.notefield.renderer.chartManager.selection.shift.beatShift,s=this.notefield.renderer.chartManager.selection.shift.columnShift;if(this.lastBeatShift!=i||this.lastColShift!=s){this.lastBeatShift=i,this.lastColShift=s;for(const[n,a]of this.arrowMap.entries()){const o=this.notefield.renderer.chartManager.loadedChart.computeNote({...n,beat:n.beat+i,col:n.col+s});a.x=this.notefield.getColumnX(o.col),a.wrapper.destroy(),a.wrapper.alpha=.4,a.wrapper=this.notefield.createNote(o);const l=a.wrapper.getBounds();a.selection.x=l.x,a.selection.y=l.y,a.selection.width=l.width,a.selection.height=l.height,a.addChild(a.wrapper,a.selection)}}for(const n of this.notefield.renderer.chartManager.selection.notes)if(!(n.beat+i+(Re(n)?n.hold:0)t)&&!this.arrowMap.has(n)){const a={...n,beat:n.beat+i,col:n.col+s},o=new Ae,l=this.notefield.createNote(a);Object.assign(o,{x:this.notefield.getColumnX(a.col),zIndex:a.beat,alpha:.4});const c=new Fe(ie.WHITE),u=l.getBounds();c.x=u.x,c.y=u.y,c.width=u.width,c.height=u.height,c.alpha=0,this.notefield.renderer.registerDragNote(l,a),o.wrapper=l,o.selection=c,this.arrowMap.set(n,o),o.addChild(l,c),this.addChild(o)}for(const[n,a]of this.arrowMap.entries()){if(n.beat+i+(Re(n)?n.hold:0)t){a.destroy(),this.arrowMap.delete(n);continue}const o=n.beat+i;if(a.y=this.notefield.renderer.getYPosFromBeat(o),a.selection.alpha=Math.sin(Date.now()/320)*.1+.3,Re(n)){const l=this.notefield.renderer.getYPosFromBeat(o+(Re(n)?n.hold:0))-a.y,c=a.wrapper.object;c.setLength(l),c.setBrightness(1);const u=a.wrapper.getLocalBounds();a.selection.x=u.x,a.selection.y=u.y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0lMzliv9eYBWSUSBlpu1y/e/P9KrU3g9+WAtJFzfbURm78QR4eJOIQbeZyzuyPIKumzAMWeH3wcDsqKc2BXztrOQhI9RNhnz65lbB9KvySZkwVb/T39mO+f6ajj7oDr5yv22IE3GzkBvsXvLHZ/yI7fGeAREr7FX7bMByafmFtNCPvM1naIcC8uoBBOSlXDHotHupk8izVuSNXutvVPRFm2mk5ALCnZ1oli0yZSEHQ8m11owFsMGGYSsh90BG8vOyB10WjmydXXD3gvglTxCexSQkT5+HZbMaEkbd2p4BjeyPqkcoxMyqId67S8OW4tnMPvEZtim1l80bam5XQkQQmK+KL2kWbKamce721GN8uPYwgt4dQgRfYipFB7l/Yy2ifSaXgEh8TltdULCNXcP/xWCsHLTMhxXuAXmQzirwqURPbaUTcA3Wvoarj6/WbQgl33BnDIk41HIOSqxKD7p1SmpVy3yfaE05142tJSVHCPFR1Y/y6zRamvEX1JFLEQQCSJB5B9BfgCwNDJ0if9eSgAAAABJRU5ErkJggg==";class VC extends hg{offsetY=0;setY=0;_last=0;_lastTop=!1;constructor(e){super(e,0,0,0,0),this.scale.cb=()=>{this.refresh()}}cropBottom(e,t=!1){this._last==e&&!this._lastTop&&!t||(this._last=e,this._lastTop=!1,this._height=this.texture.height-e/Math.abs(this.scale.y),this._bottomHeight=0,this.offsetY=0,this.topHeight=this.texture.height-e/Math.abs(this.scale.y),this._updateY())}cropTop(e,t=!1){this._last==e&&this._lastTop&&!t||(this._last=e,this._lastTop=!0,this._height=this.texture.height-e/Math.abs(this.scale.y),this._topHeight=0,this.bottomHeight=this.texture.height-e/Math.abs(this.scale.y),this.offsetY=e/Math.abs(this.scale.y),this._updateY())}get y(){return this.setY}set y(e){this.setY=e,this._updateY()}_updateY(){super.y=this.setY+this.offsetY*Math.abs(this.scale.y)}refresh(){this._lastTop?this.cropTop(this._last,!0):this.cropBottom(this._last,!0)}}class ky extends VC{constructor(e,t=64){super(e),this.scale.set(t/this.texture.width),this.pivot.x=t/2/this.scale.x,this.texture.on("update",()=>{this.width=this.texture.width,this.height=this.texture.height,this.scale.set(t/this.texture.width),this.pivot.x=t/2/this.scale.x,this.refresh()})}}class uM extends ky{_playing=!1;_autoUpdate=!1;_isConnectedToTicker=!1;_tickerUpdate=this.update.bind(this);_currentTime=0;_textures;_previousFrame=null;onComplete=null;onLoop=null;onFrameChange=null;animationSpeed=1;loop=!1;updateAnchor=!1;constructor(e,t){super(e[0],t),this.textures=e}stop(){this._playing&&(this._playing=!1,this._autoUpdate&&this._isConnectedToTicker&&(At.shared.remove(this._tickerUpdate),this._isConnectedToTicker=!1))}play(){this._playing||(this._playing=!0,this._autoUpdate&&!this._isConnectedToTicker&&(At.shared.add(this._tickerUpdate,this,Wr.HIGH),this._isConnectedToTicker=!0))}gotoAndStop(e){this.stop(),this.currentFrame=e}gotoAndPlay(e){this.currentFrame=e,this.play()}update(e){if(!this._playing)return;const t=this.animationSpeed*e,i=this.currentFrame;this._currentTime+=t,this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete?.()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete?.()):i!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFramei)&&this.onLoop(),this.updateTexture())}updateTexture(){const e=this.currentFrame;this._previousFrame!==e&&(this._previousFrame=e,this.texture=this._textures[e],this.onFrameChange?.(this.currentFrame))}destroy(e){this.stop(),super.destroy(e),this.onComplete=null,this.onFrameChange=null,this.onLoop=null}get totalFrames(){return this._textures?.length??0}get textures(){return this._textures??[]}set textures(e){this._textures=e,this._previousFrame=null,this.gotoAndStop(0),this.updateTexture()}get currentFrame(){let e=Math.floor(this._currentTime)%this._textures.length;return e<0&&(e+=this._textures.length),e}set currentFrame(e){if(e<0||e>this.totalFrames-1)throw new Error(`[AnimatedSprite]: Invalid frame index value ${e}, expected to be between 0 and totalFrames ${this.totalFrames}.`);const t=this.currentFrame;this._currentTime=e,t!==this.currentFrame&&this.updateTexture()}get playing(){return this._playing}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){e!==this._autoUpdate&&(this._autoUpdate=e,!this._autoUpdate&&this._isConnectedToTicker?(At.shared.remove(this._tickerUpdate),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._playing&&(At.shared.add(this._tickerUpdate),this._isConnectedToTicker=!0))}}const WC={Fake:ie.from(HC),Lift:ie.from(GC)};class Sf extends Ae{object;icon;constructor(e){super(),this.object=e,this.icon=new Fe(WC[e.note.type]),this.icon.anchor.set(.5),this.icon.scale.set(.3),this.icon.alpha=.8,this.icon.visible=!1,this.addChild(e,this.icon),e.nf.noteskin===void 0?K.on("noteskinLoaded",()=>this.loadEventHandler()):this.loadEventHandler()}loadEventHandler(){this.object.nf.noteskin.onUpdate(this,e=>{if(!_.chart.drawIcons){this.icon.visible=!1;return}if(this.object.nf.noteskinOptions?.hideIcons?.includes(this.object.note.type)){this.icon.visible=!1;return}this.icon.visible=!0,this.object.note.type=="Fake"&&(this.icon.visible=e.chartManager.getMode()!=q.Play)})}}class zC extends Ae{type="note";note;nf;constructor(e,t){super(),this.note=t,this.nf=e,this.nf.noteskin===void 0?K.on("noteskinLoaded",()=>{this.loadElement(t)}):this.loadElement(t)}loadElement(e){const t=this.nf.noteskin.getElement({element:e.type,columnName:this.nf.getColumnName(e.col),columnNumber:e.col},{note:e});this.addChild(t)}}function jC(r){return r.cropTop!==void 0}class $C extends Ae{type="hold";note;active;inactive;wasActive=!1;lastLength=null;elements;metrics;ns;nf;loaded=!1;constructor(e,t){super();const i=new Ae,s=new Ae;this.note=t,this.ns=e.noteskin,this.nf=e,this.metrics=this.ns.metrics,i.visible=!1,this.active=i,this.inactive=s,this.addChild(s,i),e.noteskin===void 0?K.on("noteskinLoaded",()=>{this.loadElements()}):this.loadElements()}loadElements(){if(!this.loaded){this.elements={};for(const e of["Active","Inactive"]){this.elements[e]={};for(const t of["BottomCap","Body","TopCap","Head"]){const i=this.getNoteskinElement(`${e} ${t}`);t=="BottomCap"?jC(i)?this.elements[e][t]=i:(_.debug.showNoteskinErrors&&Ee.createFormatted(`Noteskin Error: invalid tail found for ${e} ${t}!`,"error"),this.elements[e][t]=new ky(My,64)):this.elements[e][t]=i,(e=="Active"?this.active:this.inactive).addChild(this.elements[e][t])}}this.loaded=!0}}getNoteskinElement(e){return this.ns.getElement({element:`${this.note.type} ${e}`,columnName:this.nf.getColumnName(this.note.col),columnNumber:this.note.col},{note:this.note})}setActive(e){this.wasActive!=e&&(this.wasActive=e,this.active.visible=e,this.inactive.visible=!e)}setBrightness(e){if(!this.loaded)return;const t=["Active","Inactive"],i=["Body","TopCap","BottomCap"];for(const s of t)for(const n of i)"tint"in this.elements[s][n]&&(this.elements[s][n].tint=Dd(e*255,e*255,e*255))}setLength(e){if(!this.loaded||this.lastLength==e)return;this.lastLength=e;const t=this.metrics[`${this.note.type}BodyBottomOffset`],i=this.metrics[`${this.note.type}BodyTopOffset`],s=["Active","Inactive"],n=e>=0?1:-1,a=Math.abs(e);for(const o of s){this.elements[o].Body.height=Math.max(0,a+t-i),this.elements[o].Body.y=a+t,this.elements[o].BottomCap.y=a+t,this.elements[o].BottomCap.y<0?(this.elements[o].BottomCap.cropTop(-this.elements[o].BottomCap.y),e<0&&(this.elements[o].BottomCap.y-=this.elements[o].BottomCap.y/Math.abs(this.elements[o].BottomCap.scale.y))):this.elements[o].BottomCap.cropTop(0),this.elements[o].TopCap.y=i;const l=Math.abs(this.elements[o].BottomCap.scale.y);this.elements[o].BottomCap.scale.y=e<0?-l:l;const c=Math.abs(this.elements[o].TopCap.scale.y);this.elements[o].TopCap.scale.y=e<0?-c:c,this.elements[o].Body.height*=n,this.elements[o].Body.y*=n,this.elements[o].BottomCap.y*=n,this.elements[o].TopCap.y*=n}}}class Cf extends Ae{noteskinOptions;noteskin;gameType;renderer;receptors;notes;selectionNotes;flashes;holdJudges;ghostNote;ghostNoteEntry;columnX=[];constructor(e){super(),this.renderer=e,this.gameType=e.chart.gameType,at.getNoteskin(this.gameType,_.chart.noteskin.name).then(t=>{if(!t){Ee.createFormatted("Couldn't find an available noteskin!","error");return}let i=0;for(let s=0;s=e&&this.ghostNoteEntry.beat<=t&&this.ghostNoteEntry.beat>=0))}onJudgement(e,t){this.noteskin!==void 0&&(this.holdJudges.addJudge(e,t),Qi(t)&&this.noteskin.broadcast({type:"hit",judgement:t,columnName:this.getColumnName(e),columnNumber:e}),_s(t)&&this.noteskin.broadcast({type:"held",columnName:this.getColumnName(e),columnNumber:e}),wn(t)&&this.noteskin.broadcast({type:"letgo",columnName:this.getColumnName(e),columnNumber:e}),Pi(t)&&this.noteskin.broadcast({type:"miss",judgement:t,columnName:this.getColumnName(e),columnNumber:e}),xl(t)&&this.noteskin.broadcast({type:"hitmine",columnName:this.getColumnName(e),columnNumber:e}))}startPlay(){}endPlay(){if(this.noteskin!==void 0)for(let e=0;eDate.now()-e.createTime>5e3),_.general.smoothAnimations?this.currentMedian.x=(this.currentMedian.x-this.target)*.8+this.target:this.currentMedian.x=this.target}addBar(e,t){if(e==null||!Pi(t)&&!Qi(t))return;const i=new Fe(ie.WHITE);i.width=YC,i.height=Mf,i.anchor.set(.5),i.x=e*400,i.tint=t.color,i.createTime=Date.now(),i.miss=Pi(t),i.ms=Math.round(e*1e3),this.errorText.tint=t.color,this.errorText.text=(e*1e3).toFixed(1)+"ms",this.errorTextTime=Date.now(),this.barlines.addChild(i),this.target=Tl(this.barlines.children.filter(s=>!s.miss).map(s=>s.ms))*.4}reset(){this.currentMedian.x=0,this.target=0,Ji(this.barlines.children,()=>!0)}}class ZC extends Fe{createTime=-1;active=!1;type=Jg;constructor(){super(),this.anchor.set(.5)}update(){if(this.y=_.chart.reverse?40:-40,this.visible=this.active,this.active){const e=(Date.now()-this.createTime)/1e3;let t=1.2;if(Je.getCollection(_.play.timingCollection).shouldHideNote(this.type)||(t=.8),e<.1){const i=1-(1-e/.1)*(1-e/.1),s=(1-t)*i+t;this.scale.x=.4*s,this.scale.y=.4*s}else if(e>.6&&e<.8){const i=(e-.6)/.2*(e-.6)/.2;this.scale.x=.4*(1-i),this.scale.y=.4*(1-i)}else e>.8&&(this.active=!1)}}doJudge(e,t){if(e==null&&(e=0),!Qi(t)&&!Pi(t))return;const i=t.judgementTexture.getTexture(e,t);i&&(this.texture=i,this.texture.updateUvs(),this.active=!0,this.type=t,this.createTime=Date.now(),_.play.judgementTilt?this.rotation=Le(e,-.05,.05)*300/180*Math.PI:this.rotation=0)}reset(){this.active=!1}}const kf={BPMS:{title:"BPM Event",rows:[{label:"Tempo",key:"value",input:{type:"spinner",precision:3}}]},STOPS:{title:"Stop Event",description:"Stops for a number of seconds. Notes on this beat are hit before the stop occurs.",rows:[{label:"Seconds",key:"value",input:{type:"spinner",precision:3}}]},WARPS:{title:"Warp Event",description:"Warps ahead a number of beats. Warped notes do not count towards score.",rows:[{label:"Beats",key:"value",input:{type:"spinner",precision:3,min:0}}]},DELAYS:{title:"Delay Event",description:"Stops for a number of seconds. Notes on this beat are hit after the delay occurs.",rows:[{label:"Seconds",key:"value",input:{type:"spinner",precision:3}}]},SCROLLS:{title:"Scroll Event",description:"Notes after this event will scroll at the specified speed.",rows:[{label:"Multiplier",key:"value",input:{type:"spinner",precision:3}}]},TICKCOUNTS:{title:"Tickcount Event",description:"Number of ticks per beat in a hold. Only applies to pump gamemodes.",rows:[{label:"Ticks",key:"value",input:{type:"spinner",step:1,precision:0,min:0}}]},FAKES:{title:"Fake Event",description:"Creates an area of notes that cannot be hit and do not count towards score.",rows:[{label:"Beats",key:"value",input:{type:"spinner",precision:3,min:0}}]},LABELS:{title:"Label Event",rows:[{label:"Label",key:"value",input:{type:"text"}}]},SPEEDS:{title:"Speed Event",width:200,description:"The entire playfield scrolls at the specified speed. Can slowly ease over a certain amount of time.",rows:[{label:"Multiplier",key:"value",input:{type:"spinner",precision:3}},{label:"Ease time",key:"delay",input:{type:"spinner",precision:3,min:0}},{label:"Ease unit",key:"unit",input:{type:"dropdown",items:["Beats","Seconds"],transformers:{serialize:r=>r=="B"?"Beats":"Seconds",deserialize:r=>r=="Beats"?"B":"T"}}}]},TIMESIGNATURES:{title:"Time Signature Event",width:200,rows:[{label:"Upper",key:"upper",input:{type:"spinner",step:1,precision:0,min:1}},{label:"Lower",key:"lower",input:{type:"spinner",step:1,precision:0,min:1}}]},COMBOS:{title:"Combo Event",width:200,description:"Multiplies the combo gained from hitting/missing notes after this event.",rows:[{label:"Hit multiplier",key:"hitMult",input:{type:"spinner",step:1,precision:0,min:0}},{label:"Miss multiplier",key:"missMult",input:{type:"spinner",step:1,precision:0,min:0}}]},ATTACKS:{title:"Attack Event",width:200,description:"Applies a modifier to the playfield. Can specify the length of the applied attack in seconds or the end time of the attack.",rows:[{label:"Timing type",key:"endType",input:{type:"dropdown",items:["Length","End"],transformers:{serialize:r=>r=="LEN"?"Length":"End",deserialize:r=>r=="Length"?"LEN":"END"}}},{label:"Seconds",key:"value",input:{type:"spinner",precision:3}},{label:"Mods",key:"mods",input:{type:"text"}}]},BGCHANGES:{title:"BG Change Event",width:250,rows:[{label:"File",key:"file",input:{type:"text"}},{label:"Update rate",key:"updateRate",input:{type:"spinner",precision:3,min:0}},{label:"Crossfade",key:"crossfade",input:{type:"checkbox"}},{label:"StretchRewind",key:"stretchRewind",input:{type:"checkbox"}},{label:"StretchNoLoop",key:"StretchNoLoop",input:{type:"checkbox"}},{label:"Effect",key:"effect",input:{type:"text"}},{label:"File2",key:"file2",input:{type:"text"}},{label:"Transition",key:"transition",input:{type:"text"}},{label:"Color1",key:"color1",input:{type:"text"}},{label:"Color2",key:"color2",input:{type:"text"}}]},FGCHANGES:{title:"FG Change Event",width:250,rows:[{label:"File",key:"file",input:{type:"text"}},{label:"Update rate",key:"updateRate",input:{type:"spinner",precision:3,min:0}},{label:"Crossfade",key:"crossfade",input:{type:"checkbox"}},{label:"StretchRewind",key:"stretchRewind",input:{type:"checkbox"}},{label:"StretchNoLoop",key:"StretchNoLoop",input:{type:"checkbox"}},{label:"Effect",key:"effect",input:{type:"text"}},{label:"File2",key:"file2",input:{type:"text"}},{label:"Transition",key:"transition",input:{type:"text"}},{label:"Color1",key:"color1",input:{type:"text"}},{label:"Color2",key:"color2",input:{type:"text"}}]}};class Pt{static activePopup;timingBox;popup;zoomer;editText;timingData;rows=[];onTimingChange;clickOutside;moveInterval;modifyBox;cachedEvent;onConfirm=()=>{};persistent=!1;constructor(e,t,i=!1){e.popup=this,this.timingBox=e,this.timingData=t,this.cachedEvent=this.timingBox.event,this.modifyBox=i,this.popup=this.build(),this.popup.style.transitionDuration="0s",setTimeout(()=>this.movePosition()),this.onTimingChange=this.updateValues.bind(this),this.clickOutside=s=>{this.popup.contains(s.target)||this.close()},K.on("timingModified",this.onTimingChange),Pt.activePopup?.persistent?e.popup=void 0:(document.getElementById("popups")?.appendChild(this.popup),this.moveInterval=setInterval(()=>this.movePosition(),150),Pt.activePopup?.close(),Pt.activePopup=this)}movePosition(){const e=this.timingBox.backgroundObj.getBounds(),t=e.left+e.width/2,i=kf[this.timingBox.event.type].width??150,s=i/2+15,n=window.innerWidth-i/2-15;this.popup.style.left=`${Le(t,s,n)}px`;const a=document.getElementById("pixi").offsetTop+9,o=e.top+a+e.height/2;this.popup.style.top=`${e.top+e.height+a}px`,o+this.popup.clientHeight>window.innerHeight-15&&(this.popup.style.transform="translate(-50%, -100%)",this.popup.style.top=`${e.top-e.height/2+a}px`),setTimeout(()=>this.popup.style.transitionDuration="",10)}build(){const e=kf[this.timingBox.event.type],t=document.createElement("div");t.classList.add("popup");const i=document.createElement("div");i.classList.add("popup-zoomer"),i.style.width=e.width?`${e.width}px`:"150px",i.style.backgroundColor=Wc(Vr[this.timingBox.event.type].toString(16).padStart(6,"0"),"#333333",.75),this.zoomer=i,t.appendChild(i);const s=document.createElement("div");if(s.innerText=e.title,s.classList.add("popup-title"),i.appendChild(s),e.description){const u=document.createElement("div");u.innerText=e.description,i.appendChild(u),u.classList.add("popup-desc")}const n=document.createElement("div");n.classList.add("popup-grid"),i.appendChild(n),e.rows.forEach(u=>n.append(...this.buildRow(u)));const a=document.createElement("div");a.innerText="click to edit",a.style.marginTop="4px",a.style.height="10px",i.appendChild(a),a.classList.add("popup-desc"),this.editText=a;const o=document.createElement("div");o.classList.add("popup-options");const l=document.createElement("button");l.innerText="Ok",l.onclick=()=>{this.close(),this.onConfirm(this.timingBox.event)},l.classList.add("confirm"),o.append(l);const c=document.createElement("button");return c.innerText="Delete",c.onclick=()=>{this.modifyBox||this.timingData.delete([{type:this.timingBox.event.type,[this.timingBox.event.type=="ATTACKS"?"second":"beat"]:this.timingBox.event.type=="ATTACKS"?this.timingBox.event.second:this.timingBox.event.beat}]),this.close()},c.classList.add("delete"),o.append(c),i.append(o),t}buildRow(e){const t=structuredClone(this.timingBox.event),i=document.createElement("div");i.innerText=e.label,i.classList.add("popup-label");const s=[];switch(s.push(i),e.input.type){case"spinner":{const n=lt.create(t[e.key],e.input.step,e.input.precision,e.input.min,e.input.max);n.onChange=a=>{a!==void 0&&this.modifyEvent(e.key,a)},this.rows.push({data:e,el:n}),s.push(n.view);break}case"text":{const n=document.createElement("input");n.type="text",n.autocomplete="off",n.spellcheck=!1,n.onkeydown=a=>{a.key=="Enter"&&n.blur()},n.onblur=()=>{this.modifyEvent(e.key,n.value)},n.value=t[e.key],this.rows.push({data:e,el:n}),s.push(n);break}case"dropdown":{if(e.input.transformers){const n=e.input.transformers.deserialize,a=e.input.transformers.serialize,o=gi.create(e.input.items,a(t[e.key]));o.onChange(l=>{this.modifyEvent(e.key,n(l))}),this.rows.push({data:e,el:o}),s.push(o.view)}else{const n=gi.create(e.input.items,t[e.key]);n.onChange(a=>{this.modifyEvent(e.key,a)}),this.rows.push({data:e,el:n}),s.push(n.view)}break}case"checkbox":{const n=document.createElement("input");n.type="checkbox",n.checked=t[e.key],n.onchange=()=>{this.modifyEvent(e.key,n.checked)},this.rows.push({data:e,el:n}),s.push(n);break}}return s}modifyEvent(e,t){this.modifyBox?Object.assign(this.timingBox.event,{[e]:t}):this.timingData.modify([[structuredClone(this.timingBox.event),Object.assign(this.timingBox.event,{[e]:t})]])}updateValues(){const e=this.timingData.getEventAtBeat(this.timingBox.event.type,this.timingBox.event.beat,!1);if(!this.timingBox||!e||e.beat!=this.timingBox.event.beat){this.close();return}this.rows.forEach(t=>{switch(t.data.input.type){case"spinner":{t.el.setValue(e[t.data.key]);break}case"text":{t.el.value=e[t.data.key];break}case"dropdown":{const i=t.el;t.data.input.transformers?i.setSelected(t.data.input.transformers.serialize(e[t.data.key])):i.setSelected(e[t.data.key]);break}case"checkbox":{t.el.checked=e[t.data.key];break}}})}close(){this.persistent=!1,K.off("timingModified",this.onTimingChange),window.removeEventListener("click",this.clickOutside),clearInterval(this.moveInterval),this.popup.classList.add("exiting"),setTimeout(()=>this.popup.remove(),200),this.timingBox.popup=void 0,Pt.activePopup=void 0}select(){this.persistent=!0,this.zoomer.classList.add("selected"),this.editText.style.transform="scale(0)",this.editText.style.height="0px",setTimeout(()=>window.addEventListener("click",this.clickOutside),200)}detach(){clearInterval(this.moveInterval)}getEvent(){return this.cachedEvent}attach(e){clearInterval(this.moveInterval),this.moveInterval=setInterval(()=>this.movePosition(),150),this.timingBox=e,this.cachedEvent=this.timingBox.event}}const Yc={fontName:"Main",fontSize:15},Fr={BPMS:55,STOPS:55,DELAYS:55,WARPS:55,FAKES:55,COMBOS:40,SPEEDS:80,LABELS:80,SCROLLS:55,TIMESIGNATURES:40,TICKCOUNTS:40,BGCHANGES:55,FGCHANGES:55,ATTACKS:55};class JC extends Ae{tracks=new Ae;renderer;timingBoxMap=new Map;wasEditingTiming=!1;boxPool=new ya({create:()=>{const e=new Ae;return e.textObj=new Oe("",Yc),e.backgroundObj=new jt,e.selection=new jt("onlyBorder"),e.selection.tint=3841008,e.addChild(e.backgroundObj,e.textObj,e.selection),e}});ghostBox;timingDirty=!1;constructor(e){super(),this.renderer=e,this.boxPool.sortableChildren=!0,this.sortableChildren=!0,this.addChild(this.tracks,this.boxPool);const t=()=>this.timingDirty=!0;K.on("timingModified",t),this.on("destroyed",()=>K.off("timingModified",t))}update(e,t){this.renderer.chartManager.editTimingMode!=Pe.Add&&(this.ghostBox?.removeFromParent(),this.ghostBox?.destroy(),this.ghostBox=void 0),this.updateTracks(),this.updateBoxes(e,t)}createTrack(e,t){const i=Object.assign(new Fe(ie.WHITE),{alpha:0,width:Fr[e],name:e,height:5e3,x:t,type:e,lastX:0,tint:2503250,targetAlpha:0});return i.anchor.y=.5,this.tracks.addChild(i),i}initializeBox(e,t){if(Bt.stop(e.animationId),Object.assign(e,{event:t,isChartTiming:this.renderer.chart.timingData.isPropertyChartSpecific(t.type),lastX:void 0,lastAnchor:void 0,animationId:void 0,zIndex:t.beat,eventMode:"static"}),e.textObj.text=this.getLabelFromEvent(t),e.textObj.anchor.set(.5,.55),e.backgroundObj.width=e.textObj.width+10,e.backgroundObj.height=25,e.backgroundObj.position.x=-e.backgroundObj.width/2,e.backgroundObj.position.y=-25/2,e.selection.width=e.textObj.width+10,e.selection.height=25,e.selection.position=e.backgroundObj.position,e.popup=void 0,Pt.activePopup){const i=Pt.activePopup.getEvent();i.type=="ATTACKS"&&t.type=="ATTACKS"&&i.second==t.second&&(Pt.activePopup.attach(e),e.popup=Pt.activePopup),i.type!="ATTACKS"&&t.type!="ATTACKS"&&i.type==t.type&&i.beat==t.beat&&(Pt.activePopup.attach(e),e.popup=Pt.activePopup)}}addDragListeners(e,t){e.on("mouseenter",()=>{e?.popup?.persistent!==!0&&(this.renderer.chartManager.eventSelection.timingEvents.length>0||this.renderer.isDragSelecting()||(e.popup?.close(),this.renderer.chartManager.getMode()==q.Edit&&(new Pt(e,this.getTargetTimingData(e.event.isChartTiming)),e.popup&&(e.popup.onConfirm=()=>{this.renderer.chartManager.removeEventFromSelection(t)}))))}),e.on("mouseleave",()=>{e?.popup?.persistent!==!0&&e.popup?.close()});let i=0,s;const n=a=>{const o=s,l=this.toLocal(a.global);if(Math.abs(l.y-i)<32){this.renderer.chartManager.eventSelection.shift&&(this.renderer.chartManager.eventSelection.shift={beatShift:0});return}e.popup?.close();const c=this.renderer.getBeatFromYPos(l.y),u=_.chart.snap==0?1/1e3:_.chart.snap;let h=Math.round(c/u)*u;Math.abs(h-c)>Math.abs(c-o.beat)&&(h=o.beat),this.renderer.chartManager.eventSelection.shift||={beatShift:0},this.renderer.chartManager.eventSelection.shift.beatShift=Math.max(-Math.min(...this.renderer.chartManager.eventSelection.timingEvents.map(d=>d.beat)),h-o.beat)};e.on("pointerdown",a=>{if(Gc(a)){this.renderer.chartManager.clearSelections(),this.renderer.chartManager.addEventToSelection(t),Pt.activePopup?.close();return}if(a.stopImmediatePropagation(),this.renderer.chartManager.isEventInSelection(t)?(a.getModifierState("Control")||a.getModifierState("Meta"))&&this.renderer.chartManager.removeEventFromSelection(t):(!a.getModifierState("Control")&&!a.getModifierState("Meta")&&!a.getModifierState("Shift")&&this.renderer.chartManager.clearSelections(),this.renderer.chartManager.addEventToSelection(t)),this.renderer.chartManager.getMode()==q.Edit&&this.renderer.chartManager.eventSelection.timingEvents.length==1&&(e?.popup||(Pt.activePopup?.close(),new Pt(e,this.getTargetTimingData(e.event.isChartTiming)),e.popup.onConfirm=()=>{this.renderer.chartManager.removeEventFromSelection(t)})),e.popup&&!a.getModifierState("Control")&&!a.getModifierState("Meta")&&!a.getModifierState("Shift")?e.popup.select():e.popup?.close(),i=e.y,s=t,this.renderer.chartManager.editTimingMode==Pe.Add)return;this.renderer.on("pointermove",n);const o=()=>{this.renderer.off("pointermove",n),this.renderer.off("pointerup",o),(this.renderer.chartManager.eventSelection.shift?.beatShift??0)!=0&&this.renderer.chartManager.modifyEventSelection(l=>(l.type=="ATTACKS"&&(l.second=this.renderer.chart.timingData.getSecondsFromBeat(l.beat+this.renderer.chartManager.eventSelection.shift.beatShift)),l.beat+=this.renderer.chartManager.eventSelection.shift.beatShift,l)),this.renderer.chartManager.eventSelection.shift=void 0};this.renderer.on("pointerup",o)})}updateTracks(){const e=_.chart.timingEventOrder.left,t=_.chart.timingEventOrder.right,i=this.renderer.chartManager.editTimingMode!=Pe.Off&&this.renderer.chartManager.getMode()==q.Edit;this.tracks.children.forEach(n=>n.visible=!1);let s=-this.renderer.chart.gameType.notefieldWidth*.5-128;for(let n=e.length-1;n>=0;n--){const a=e[n],o=this.tracks.getChildByName(a)??this.createTrack(a,s);o.visible=!0,o.lastX!=s&&(o.lastX=s,o.targetAlpha=n%2==0?.1:0,Bt.animate(o,{0:{x:"inherit","anchor.x":"inherit"},1:{x:s,"anchor.x":1}},.3,Zt(0,0,.16,1.01),()=>{},`track-${a}-x`),Bt.animate(o,{0:{alpha:"inherit"},1:{alpha:i?o.targetAlpha:0}},.3,Zt(0,0,.16,1.01),()=>{},`track-${a}-alpha`)),s-=Fr[a]}s=this.renderer.chart.gameType.notefieldWidth*.5+128;for(let n=0;n{},`track-${a}-x`),Bt.animate(o,{0:{alpha:"inherit"},1:{alpha:i?o.targetAlpha:0}},.3,Zt(0,0,.16,1.01),()=>{},`track-${a}-alpha`)),s+=Fr[a]}if(this.wasEditingTiming!=i){this.wasEditingTiming=i;for(const n of this.tracks.children)Bt.animate(n,{0:{alpha:"inherit"},1:{alpha:i?n.targetAlpha:0}},.3,Zt(0,0,.16,1.01),()=>{},`track-${n.type}-alpha`)}}updateBoxes(e,t){this.timingDirty&&(this.timingBoxMap.clear(),this.boxPool.destroyAll(),this.timingDirty=!1);const i=this.renderer.chartManager.editTimingMode!=Pe.Off&&this.renderer.chartManager.getMode()==q.Edit;this.boxPool.visible=this.renderer.shouldDisplayBarlines(),this.ghostBox&&(this.ghostBox.visible=this.renderer.shouldDisplayBarlines()&&i);for(const n of this.renderer.chart.timingData.getTimingData()){if(tn.beat)&&!this.timingBoxMap.has(n)){const a=this.boxPool.createChild();if(!a)break;this.initializeBox(a,n),this.addDragListeners(a,n),this.timingBoxMap.set(n,a)}}const s={beat:-Number.MAX_SAFE_INTEGER,second:-Number.MAX_SAFE_INTEGER,leftOffset:0,rightOffset:0};for(const[n,a]of this.timingBoxMap.entries()){if(n.beatt||!_.chart.timingEventOrder.left.includes(n.type)&&!_.chart.timingEventOrder.right.includes(n.type)){this.timingBoxMap.delete(n),a.popup?.persistent?a.popup?.detach():a.popup?.close(),this.boxPool.destroyChild(a);continue}let o=0,l=0;const c=a.backgroundObj.width,u=_.chart.timingEventOrder.right.includes(n.type)?"right":"left";i?(o=this.tracks.getChildByName(n.type)?.x??a.x,o+=Fr[n.type]/2*(o>0?1:-1),l=.5):(o=(u=="right"?1:-1)*(this.renderer.chart.gameType.notefieldWidth*.5+80),u=="left"&&(o-=30),(s.beat!=n.beat||n.second&&s.second!=n.second)&&(s.leftOffset=0,s.rightOffset=0,s.beat=n.beat,s.second=n.second),u=="left"?(o-=s.leftOffset,s.leftOffset+=c+5):(o+=s.rightOffset,s.rightOffset+=c+5),l=u=="right"?0:1),a.lastX===void 0||a.lastAnchor===void 0?(a.x=o,a.pivot.x=(l-.5)*c):(a.lastX!=o||a.lastAnchor!=l)&&(a.animationId=Bt.animate(a,{0:{x:"inherit","pivot.x":"inherit"},1:{x:o,"pivot.x":(l-.5)*c}},.3,Zt(0,0,.16,1.01),()=>{},a.animationId)),a.lastX=o,a.lastAnchor=l,a.y=_.chart.CMod&&n.type=="ATTACKS"?this.renderer.getYPosFromSecond(n.second):this.renderer.getYPosFromBeat(n.beat);const h=this.renderer.chartManager.getMode()!=q.Play&&this.renderer.chartManager.isEventInSelection(n);if(a.backgroundObj.tint=h?Od(Vr[n.type]??0,Math.sin(Date.now()/320)*.4+1.5):Vr[n.type]??0,a.selection.alpha=h?1:0,a.visible=!h||!this.renderer.chartManager.eventSelection.shift,this.renderer.chartManager.editTimingMode!=Pe.Off){const d=this.renderer.selectionTest(a);!h&&d&&this.renderer.chartManager.addEventToDragSelection(n),h&&!d&&this.renderer.chartManager.removeEventFromDragSelection(n)}}}updateGhostEvent(e){const t=_.chart.snap==0?.001:_.chart.snap,i=Math.round(this.renderer.getBeatFromYPos(e.y)/t)*t,s=this.ghostBox?.popup?this.ghostBox.event.type:this.getClosestTrack(e.x)?.name;if(!s){this.ghostBox?.removeFromParent(),this.ghostBox?.destroy(),this.ghostBox=void 0;return}if(!this.ghostBox){const o=new Ae;o.textObj=new Oe("",Yc),o.backgroundObj=new jt,o.selection=new jt("onlyBorder"),o.guideLine=new Fe(ie.WHITE),o.selection.tint=3841008,o.selection.alpha=0,o.addChild(o.guideLine,o.backgroundObj,o.textObj,o.selection),this.addChild(o),o.visible=this.renderer.shouldDisplayBarlines(),o.textObj.anchor.set(.5,.55),o.backgroundObj.height=25,o.selection.height=25,o.guideLine.height=1,o.guideLine.anchor.y=.5,this.ghostBox=o}!this.ghostBox?.popup&&(this.ghostBox.event?.beat!=i||this.ghostBox.event?.type!=s)&&(this.ghostBox.event=structuredClone(this.renderer.chart.timingData.getEventAtBeat(s,i))??this.renderer.chart.timingData.getDefaultEvent(s,i),this.ghostBox.event.beat=i,s=="ATTACKS"&&(this.ghostBox.event.second=this.renderer.chart.getSecondsFromBeat(i)),this.ghostBox.textObj.text=this.getLabelFromEvent(this.ghostBox.event),this.ghostBox.backgroundObj.width=this.ghostBox.textObj.width+10,this.ghostBox.selection.width=this.ghostBox.textObj.width+10),this.ghostBox.alpha=this.ghostBox?.popup?1:.4,this.ghostBox.selection.alpha=this.ghostBox?.popup?1:0,this.ghostBox.name=s;const n=this.renderer.getYPosFromBeat(this.ghostBox?.popup?this.ghostBox.event.beat:i);let a=this.tracks.getChildByName(s).x;a+=Fr[s]/2*(a>0?1:-1),this.ghostBox.position.x=a,this.ghostBox.backgroundObj.tint=Vr[s]??0,this.ghostBox.backgroundObj.position.x=-this.ghostBox.backgroundObj.width/2,this.ghostBox.backgroundObj.position.y=-25/2,this.ghostBox.guideLine.anchor.x=a<0?0:1,this.ghostBox.guideLine.width=Math.abs(this.ghostBox.position.x)+192-this.ghostBox.backgroundObj.width/2,this.ghostBox.guideLine.position.x=(a<0?1:-1)*this.ghostBox.backgroundObj.width/2,this.ghostBox.y=n,this.ghostBox.selection.position=this.ghostBox.backgroundObj.position}placeGhostEvent(){if(!this.ghostBox)return;const e=this.renderer.chart.timingData.getEventAtBeat(this.ghostBox.event.type,this.ghostBox.event.beat,!1);this.ghostBox.event.type=="ATTACKS"&&this.ghostBox.event.second==e?.second||this.ghostBox.event.type!="ATTACKS"&&this.ghostBox.event.beat==e?.beat||(this.renderer.chartManager.clearSelections(),this.ghostBox.event.isChartTiming=this.renderer.chart.timingData.isPropertyChartSpecific(this.ghostBox.event.type),new Pt(this.ghostBox,this.getTargetTimingData(this.ghostBox.event.isChartTiming),!0),this.ghostBox.popup?.select(),this.ghostBox.popup.onConfirm=t=>{this.getTargetTimingData(this.ghostBox.event.isChartTiming).insert([t])})}getClosestTrack(e){let t=Number.MAX_SAFE_INTEGER,i=this.tracks.children[0];for(const s of this.tracks.children){const n=Math.abs(s.x+(.5-s.anchor.x)*s.width-e);ni.width))return i}getLabelFromEvent(e){let t="";switch(e.type){case"BPMS":case"STOPS":case"WARPS":case"DELAYS":case"TICKCOUNTS":case"FAKES":case"SCROLLS":t=ae(e.value,3).toString();break;case"SPEEDS":t=`${ae(e.value,3)}/${ae(e.delay,3)}/${e.unit}`;break;case"LABELS":t=e.value;break;case"TIMESIGNATURES":t=`${ae(e.upper,3)}/${ae(e.lower,3)}`;break;case"COMBOS":t=`${ae(e.hitMult,3)}/${ae(e.missMult,3)}`;break;case"BGCHANGES":case"FGCHANGES":t=e.file;break;case"ATTACKS":t=`${e.mods}`}return t}getTargetTimingData(e){return e?this.renderer.chart.timingData:this.renderer.chart.timingData.simfileTimingData}}class QC extends Ae{children=[];renderer;timingBoxMap=new Map;trackPosCache=new Map;timingBoxPool=new ya({create:()=>{const e=new Ae;return e.guideLine=new Fe(ie.WHITE),e.textObj=new Oe("",Yc),e.backgroundObj=new jt,e.addChild(e.guideLine,e.backgroundObj,e.textObj),e}});constructor(e){super(),this.renderer=e,this.timingBoxPool.sortableChildren=!0,this.addChild(this.timingBoxPool)}update(e,t){if(!this.renderer.chartManager.eventSelection.shift){this.timingBoxPool.destroyAll(),this.timingBoxMap.clear(),this.trackPosCache.clear();return}const i=this.renderer.chartManager.eventSelection.shift.beatShift;for(const s of this.renderer.chartManager.eventSelection.timingEvents)if(!(ts.beat+i)&&!this.timingBoxMap.has(s)){const n=this.timingBoxPool.createChild();if(!n)continue;this.timingBoxMap.set(s,n);let a="";switch(s.type){case"BPMS":case"STOPS":case"WARPS":case"DELAYS":case"TICKCOUNTS":case"FAKES":case"SCROLLS":a=ae(s.value,3).toString();break;case"SPEEDS":a=`${ae(s.value,3)}/${ae(s.delay,3)}/${s.unit}`;break;case"LABELS":a=s.value;break;case"TIMESIGNATURES":a=`${ae(s.upper,3)}/${ae(s.lower,3)}`;break;case"COMBOS":a=`${ae(s.hitMult,3)}/${ae(s.missMult,3)}`;break;case"BGCHANGES":case"FGCHANGES":a=s.file;break;case"ATTACKS":a=`${s.mods} (${s.endType}=${s.value})`}const o=_.chart.timingEventOrder.right.includes(s.type)?"right":"left";if(Object.assign(n,{alpha:.4,isChartTiming:this.renderer.chart.timingData.isPropertyChartSpecific(s.type),zIndex:s.beat}),n.textObj.text=a,n.textObj.anchor.set(.5,.55),n.backgroundObj.width=n.textObj.width+10,n.backgroundObj.height=25,n.backgroundObj.tint=Vr[s.type]??0,n.backgroundObj.position.x=-n.backgroundObj.width/2,n.backgroundObj.position.y=-n.backgroundObj.height/2,n.guideLine.height=1,n.guideLine.anchor.set(o=="left"?0:1,.5),n.guideLine.width=Math.abs(n.position.x)+192-n.backgroundObj.width/2,n.guideLine.position.x=(o=="left"?1:-1)*n.backgroundObj.width/2,this.renderer.chartManager.editTimingMode!=Pe.Off){let l=this.getTrackPos(s.type);l+=Fr[s.type]/2*(l>0?1:-1),n.position.x=l,n.pivot.x=0}else{let l=(o=="right"?1:-1)*(this.renderer.chart.gameType.notefieldWidth*.5+80);o=="left"&&(l-=30),n.position.x=l,n.pivot.x=o=="right"?-n.backgroundObj.width/2:n.backgroundObj.width/2}}for(const[s,n]of this.timingBoxMap.entries()){if(ts.beat+i){this.timingBoxPool.destroyChild(n),this.timingBoxMap.delete(s);continue}n.y=_.chart.CMod&&s.second?this.renderer.getYPosFromSecond(s.second):this.renderer.getYPosFromBeat(s.beat+i)}}getTrackPos(e){if(this.trackPosCache.has(e))return this.trackPosCache.get(e);const t=_.chart.timingEventOrder.left,i=_.chart.timingEventOrder.right;let s=-this.renderer.chart.gameType.notefieldWidth*.5-128;for(let n=t.length-1;n>=0;n--){const a=t[n];this.trackPosCache.set(a,s),s-=Fr[a]}s=this.renderer.chart.gameType.notefieldWidth*.5+128;for(let n=0;n{if(this.editingCol!=-1){const a=_.chart.snap==0?.020833333333333332:_.chart.snap,o=Math.round(this.getBeatFromYPos(this.lastMousePos.y)/a)*a;this.chartManager.editHoldBeat(this.editingCol,o,n.shiftKey)}};let i=0;const s=()=>{if(!this.chartManager.selection.shift&&!this.selectionBounds||i==0)return;const n=this.getYPosFromBeat(Math.max(0,this.chartManager.beat+i));this.chartManager.beat=Math.max(0,this.chartManager.beat+i),this.selectionBounds&&(_.chart.reverse?this.selectionBounds.start.y-=_.chart.receptorYPos/_.chart.zoom+n:this.selectionBounds.start.y+=_.chart.receptorYPos/_.chart.zoom-n,this.selectionBoundary.update())};this.chartManager.app.ticker.add(s),window.addEventListener("keydown",t),this.on("destroyed",()=>{window.removeEventListener("keydown",t),this.removeAllListeners(),this.chartManager.app.ticker.remove(s)}),this.on("pointerdown",n=>{Gc(n)||this.chartManager.getMode()==q.Play||this.chartManager.getMode()==q.View||(this.chartManager.editTimingMode==Pe.Add&&this.lastMousePos?this.timingTracks.placeGhostEvent():this.chartManager.editTimingMode==Pe.Off&&_.chart.mousePlacement&&this.lastMouseBeat!=-1&&this.lastMouseCol!=-1&&!n.getModifierState("Shift")?(this.chartManager.clearSelections(),this.editingCol=this.lastMouseCol,this.chartManager.setNote(this.lastMouseCol,"mouse",this.lastMouseBeat)):(!n.getModifierState("Control")&&!n.getModifierState("Meta")&&!n.getModifierState("Shift")&&this.chartManager.clearSelections(),this.chartManager[this.chartManager.editTimingMode==Pe.Off?"startDragSelection":"startDragEventSelection"](),this.selectionBounds={start:this.toLocal(n.global),end:this.toLocal(n.global)},this.selectionBoundary.update()))}),this.on("mousemove",n=>{if(this.lastMousePos=this.toLocal(n.global),this.editingCol!=-1){const a=_.chart.snap==0?.020833333333333332:_.chart.snap,o=Math.round(this.getBeatFromYPos(this.lastMousePos.y)/a)*a;this.chartManager.editHoldBeat(this.editingCol,o,n.shiftKey)}this.selectionBounds&&(this.selectionBounds.end=this.toLocal(n.global),this.selectionBoundary.update()),i=Math.max(0,this.lastMousePos.y-this.getLowerBound()+100)/600,this.lastMousePos.y<0&&(i=Math.min(0,this.lastMousePos.y-this.getUpperBound()-100)/600),_.chart.reverse&&(i=Math.max(0,this.getUpperBound()-this.lastMousePos.y+100)/600,this.lastMousePos.y>0&&(i=Math.min(0,this.getLowerBound()-this.lastMousePos.y-100)/600))}),this.on("pointerup",()=>{this.editingCol!=-1&&(this.chartManager.endEditing(this.editingCol),this.editingCol=-1),this.chartManager[this.chartManager.editTimingMode==Pe.Off?"endDragSelection":"endDragEventSelection"](),this.selectionBounds=void 0,this.selectionBoundary.update(),i=0})}isDragSelecting(){return!!this.selectionBounds}doJudgement(e,t,i){this.chartManager.getMode()==q.Play&&(this.judgement.doJudge(t,i),this.timingBar.addBar(t,i)),this.notefield.onJudgement(e.col,i)}startPlay(){this.notefield.startPlay()}endPlay(){this.notefield.endPlay(),this.timingBar.reset(),this.judgement.reset()}update(){if(this.destroyed)return;this.cachedBeat=this.chartManager.beat,this.cachedTime=this.chartManager.time,this.x=this.chartManager.app.renderer.screen.width/2+_.chart.receptorXPos,this.speedMult=_.chart.doSpeedChanges?this.getCurrentSpeedMult():1;const e=this.getTopOnScreenBeat(),t=this.getBottomOnScreenBeat(),i=Math.min(e,t),s=Math.max(e,t);if(this.scale.x=_.chart.zoom,this.scale.y=_.chart.zoom,this.children.forEach(n=>n.update(i,s)),this.notefield.alpha=this.chartManager.editTimingMode==Pe.Off||this.chartManager.getMode()==q.Play?1:.3,_.chart.mousePlacement&&this.lastMousePos&&this.chartManager.getMode()!=q.Play){const n=_.chart.snap==0?.020833333333333332:_.chart.snap,a=Math.round(this.getBeatFromYPos(this.lastMousePos.y)/n)*n;let o=-1;for(let l=0;lu-c/2){o=l;break}}(a!=this.lastMouseBeat||o!=this.lastMouseCol||this.chartManager.getEditingNoteType()!=this.lastNoteType)&&(this.lastMouseBeat=a,this.lastMouseCol=o,this.lastNoteType=this.chartManager.getEditingNoteType(),this.editingCol!=-1&&this.chartManager.editHoldBeat(this.editingCol,a,!1),o===-1?(this.lastMouseBeat=-1,this.lastMouseCol=-1,this.notefield.setGhostNote()):this.notefield.setGhostNote(this.chart.computeNote({beat:a,col:this.lastMouseCol,type:this.chartManager.getEditingNoteType()})))}this.lastMousePos&&this.chartManager.editTimingMode==Pe.Add&&this.timingTracks.updateGhostEvent(this.lastMousePos)}getTimeWithOffset(){let e=this.cachedTime;return(this.chartManager.getMode()==q.Play||this.chartManager.getMode()==q.Record)&&(e+=_.play.offset*_.audio.rate),e}getBeatWithOffset(){let e=this.cachedBeat;return(this.chartManager.getMode()==q.Play||this.chartManager.getMode()==q.Record)&&(e=this.chart.getBeatFromSeconds(this.getTimeWithOffset())),e}getVisualTime(){let e=this.cachedTime;return(this.chartManager.getMode()==q.Play||this.chartManager.getMode()==q.Record)&&(e+=(_.play.offset+_.play.visualOffset)*_.audio.rate),e}getVisualBeat(){let e=this.cachedBeat;return(this.chartManager.getMode()==q.Play||this.chartManager.getMode()==q.Record)&&(e=this.chart.getBeatFromSeconds(this.getVisualTime())),e}getYPosFromBeat(e){const t=this.getVisualTime(),i=this.getVisualBeat(),s=_.chart.reverse?-1:1;return _.chart.CMod?(this.chart.getSecondsFromBeat(e)-t)*this.getSecondsToPixelsRatio()*s+this.getActualReceptorYPos():i==e?this.getActualReceptorYPos():(_.chart.doSpeedChanges?this.chart.timingData.getEffectiveBeat(e)-this.chart.timingData.getEffectiveBeat(i):e-i)*this.getEffectiveBeatsToPixelsRatio()*s+this.getActualReceptorYPos()}getYPosFromSecond(e){const t=this.getVisualTime(),i=_.chart.reverse?-1:1;return _.chart.CMod?(e-t)*this.getSecondsToPixelsRatio()*i+this.getActualReceptorYPos():this.getYPosFromBeat(this.chart.timingData.getBeatFromSeconds(e))}getSecondFromYPos(e){const t=_.chart.reverse?-1:1;if(_.chart.CMod){const i=this.getPixelsToSecondsRatio(),s=this.getVisualTime(),a=(e-this.getActualReceptorYPos())*i*t;return s+a}return this.chart.getSecondsFromBeat(this.getBeatFromYPos(e))}getBeatFromYPos(e,t){const i=this.getVisualBeat(),s=_.chart.reverse?-1:1;if(_.chart.CMod)return this.chart.getBeatFromSeconds(this.getSecondFromYPos(e));const a=(e-this.getActualReceptorYPos())*this.getPixelsToEffectiveBeatsRatio()*s;if(_.chart.doSpeedChanges&&!t){const o=this.chart.timingData.getEffectiveBeat(i)+a;return this.chart.getBeatFromEffectiveBeat(o)}return i+a}getColumnFromXPos(e){const t=this.chart.gameType;let i=null;for(let s=0;si)return s-1;i=n}return t.numCols-1}getActualReceptorYPos(){return _.chart.receptorYPos/_.chart.zoom*(_.chart.reverse?-1:1)}getEffectiveBeatsToPixelsRatio(){return _.chart.speed/100*64*this.speedMult}getPixelsToEffectiveBeatsRatio(){return 1/this.getEffectiveBeatsToPixelsRatio()}getSecondsToPixelsRatio(){return _.chart.speed/100*64*4}getPixelsToSecondsRatio(){return 1/this.getSecondsToPixelsRatio()}isNegScroll(e){return _.chart.doSpeedChanges&&(this.speedMult<0||(this.chart.timingData.getEventAtBeat("SCROLLS",e)?.value??1)<0||(this.chart.timingData.getEventAtBeat("BPMS",e)?.value??120)<0)}getUpperBound(){return-this.y/_.chart.zoom-64}getLowerBound(){return(this.chartManager.app.renderer.screen.height-this.y)/_.chart.zoom+64}findFirstOnScreenScroll(){const e=[...this.chart.timingData.getTimingData("SCROLLS")];e[0]?.beat!=0&&e.splice(0,0,{beat:0,value:e[0]?.value??1,type:"SCROLLS"});let t=Rt(e,this.getVisualBeat()-_.chart.maxDrawBeatsBack,i=>i.beat);for(;ts.beat);const i=Rt(e,this.getVisualBeat()-_.chart.maxDrawBeatsBack,s=>s.beat);for(;t>=i;){const s=e[t];t--;const n=s===void 0?-1/0*this.getScrollDirection(e[0]?.value??1):this.getYPosFromBeat(s.beat??0),a=e[t+2]===void 0?1/0*this.getScrollDirection(s.value):this.getYPosFromBeat(e[t+2].beat);if(this.isAreaOnScreen(n,a))return s}return{beat:0,value:1,type:"SCROLLS"}}getTopOnScreenBeat(){if(_.chart.waveform.speedChanges&&!_.chart.CMod&&_.chart.doSpeedChanges){const e=this.findFirstOnScreenScroll(),t=1/Math.abs(this.getEffectiveBeatsToPixelsRatio()),i=this.getYPosFromBeat(e.beat),s=t/Math.abs(e.value),n=this.getScrollDirection(e.value),a=n==1?this.getUpperBound():this.getLowerBound(),o=n*(a-i)*s+e.beat;return Math.max(this.getVisualBeat()-_.chart.maxDrawBeatsBack,o)}return _.chart.CMod?this.getBeatFromYPos(this.getUpperBound()):Math.max(this.getVisualBeat()-_.chart.maxDrawBeatsBack,this.getBeatFromYPos(this.getUpperBound()))}getBottomOnScreenBeat(){if(_.chart.waveform.speedChanges&&!_.chart.CMod&&_.chart.doSpeedChanges){const e=this.findLastOnScreenScroll(),t=1/Math.abs(this.getEffectiveBeatsToPixelsRatio()),i=this.getYPosFromBeat(e.beat),s=t/Math.abs(e.value),n=this.getScrollDirection(e.value),a=n==1?this.getLowerBound():this.getUpperBound(),o=n*(a-i)*s+e.beat;return Math.min(this.getVisualBeat()+_.chart.maxDrawBeats,o)}return _.chart.CMod?this.getBeatFromYPos(this.getLowerBound()):Math.min(this.getVisualBeat()+_.chart.maxDrawBeats,this.getBeatFromYPos(this.getLowerBound()))}isAreaOnScreen(e,t){ti}getCurrentSpeedMult(){return this.chart.timingData.getSpeedMult(this.getVisualBeat(),this.getVisualTime())}getScrollDirection(e){let t=1;return this.getCurrentSpeedMult()<0&&(t*=-1),_.chart.reverse&&(t*=-1),e<0&&(t*=-1),t}getUpperBoundBeat(){if(_.chart.waveform.speedChanges&&!_.chart.CMod&&_.chart.doSpeedChanges){const e=_.chart.speed,t=this.chart.timingData.getSpeedMult(this.getVisualBeat(),this.getVisualTime()),i=t>=0!=_.chart.reverse?1:-1,s=this.chart.timingData.getTimingData("SCROLLS"),n=100/e/Math.abs(t)/64/_.chart.zoom,a=this.getUpperBound(),o=this.getLowerBound();let l=Rt(s,this.getVisualBeat()-_.chart.maxDrawBeatsBack,m=>m.beat);for(this.getVisualBeat()-_.chart.maxDrawBeatsBack0&&w>a&&(ga||!s[l-1]||s[l-1].beat0?s[l-1]?.value==0&&this.getYPosFromBeat(s[l-1].beat)>f?this.getVisualBeat()-_.chart.maxDrawBeatsBack:Math.max(this.getVisualBeat()-_.chart.maxDrawBeatsBack,c+d*(f-u)):s[l-1]?.value==0&&this.getYPosFromBeat(s[l-1].beat)=0!=_.chart.reverse?1:-1,s=this.chart.timingData.getTimingData("SCROLLS"),n=100/e/Math.abs(t)/64/_.chart.zoom,a=this.getUpperBound(),o=this.getLowerBound();let l=Rt(s,this.getVisualBeat()+_.chart.maxDrawBeats,m=>m.beat);for(;l=0&&(s[l].beat??0)>this.getVisualBeat()-_.chart.maxDrawBeatsBack;){const m=s[l],g=this.getYPosFromBeat(m?.beat??0),y=s[l+1]?.beat??this.getVisualBeat()+_.chart.maxDrawBeats,w=this.getYPosFromBeat(y);if((m?.value??1)*i>0&&go||!s[l+1]||s[l+1].beat>this.getVisualBeat()+_.chart.maxDrawBeatsBack||s[l+1].value==0)||(m?.value??1)*i<0&&g>o&&(wthis.getVisualBeat()+_.chart.maxDrawBeatsBack||s[l+1].value==0))break;l--}const c=s[l]?.beat??0,u=this.getYPosFromBeat(c),h=s[l]?.value??1,d=n/Math.abs(h)*_.chart.zoom,p=_.chart.reverse?o:a,f=_.chart.reverse?a:o;return h*i>0?s[l+1]?.value==0&&this.getYPosFromBeat(s[l+1].beat)p?this.getVisualBeat()+_.chart.maxDrawBeats:Math.min(this.getVisualBeat()+_.chart.maxDrawBeats,c+d*(u-p))}return _.chart.CMod?this.getBeatFromYPos(this.getLowerBound()):Math.min(this.getVisualBeat()+_.chart.maxDrawBeats,this.getBeatFromYPos(this.getLowerBound()))}selectionTest(e){if(!this.selectionBounds)return!1;const t=this.selectionBoundary.getBounds(),i=e.getBounds(),s=16*_.chart.zoom;return t.x+t.width>i.x+s&&t.xi.y+s&&t.y{const u=o,h=this.toLocal(c.global);if(Math.abs(h.y-a-n)**2+Math.abs(h.x-s)**2<32*32){this.chartManager.selection.shift&&(this.chartManager.selection.shift={columnShift:0,beatShift:0});return}const d=this.getBeatFromYPos(h.y-a),p=_.chart.snap==0?1/48:_.chart.snap;let f=Math.round(d/p)*p;Math.abs(f-d)>Math.abs(d-u.beat)&&(f=u.beat);const m=this.getColumnFromXPos(h.x);this.chartManager.selection.shift||={columnShift:0,beatShift:0},i!=m-u.col&&(i=m-u.col,this.chartManager.selection.notes.every(g=>{const y=g.col+i;return y>=0&&yg.beat)),f-u.beat)};e.on("pointerdown",c=>{if(this.chartManager.getMode()==q.View)return;if(Gc(c)){this.chartManager.isNoteInSelection(t)||(this.chartManager.clearSelections(),this.chartManager.addNoteToSelection(t)),xC.open(this.chartManager.app,c),c.preventDefault();return}if(_.chart.mousePlacement&&!c.getModifierState("Meta")&&!c.getModifierState("Control")&&!c.getModifierState("Shift")&&!this.chartManager.isNoteInSelection(t))return;c.stopImmediatePropagation(),this.chartManager.isNoteInSelection(t)?(c.getModifierState("Control")||c.getModifierState("Meta"))&&this.chartManager.removeNoteFromSelection(t):(!c.getModifierState("Control")&&!c.getModifierState("Meta")&&!c.getModifierState("Shift")&&this.chartManager.clearSelections(),this.chartManager.addNoteToSelection(t)),s=e.x,n=e.y,a=this.toLocal(c.global).y-e.y,o=t,this.on("pointermove",l);const u=()=>{this.off("pointermove",l),this.off("pointerup",u),((this.chartManager.selection.shift?.beatShift??0)!=0||(this.chartManager.selection.shift?.columnShift??0)!=0)&&this.chartManager.modifySelection(h=>(h.beat+=this.chartManager.selection.shift.beatShift,h.col+=this.chartManager.selection.shift.columnShift,h)),this.chartManager.selection.shift=void 0};this.on("pointerup",u)}),e.on("destroyed",()=>{e?.removeAllListeners()})}getNotefield(){return this.notefield}swapNoteskin(e){_.chart.noteskin.name=e,_.chart.lastNoteskins[this.chart.gameType.id]=e,this.reloadNotefield()}reloadNotefield(){const e=new Cf(this);this.addChildAt(e,this.children.indexOf(this.notefield)),this.notefield.destroy(),this.notefield=e}getSelectionBounds(){return this.selectionBounds}shouldDisplayBarlines(){return(this.chartManager.getMode()!=q.Play||!_.play.hideBarlines)&&Ie.barlines}}class Hd extends AudioBufferSourceNode{started=!1;start(e,t,i){this.started||super.start(e,t,i),this.started=!0}stop(e){this.started&&super.stop(e),this.started=!1}static create(e){const t=e;return t.started=!1,Object.setPrototypeOf(t,Hd.prototype),t}}class tM extends BiquadFilterNode{enabled=!1;static create(e){const t=e;return t.enabled=!1,t}}class mo{_audioAnalyzer;_filteredAudioAnalyzer;_freqData;_filteredFreqData;_gainNode;type;_audioContext=new AudioContext;_source;_playbackTime=0;_startTimestamp=0;_rate=1;_isPlaying=!1;_buffer;_filteredBuffer;_loadedBuffer;_delay;_loadListeners=[];_updateListeners=[];_volume=1;_destroyed=!1;_renderTimeout;_filters=[this.createFilter({type:"highpass",frequency:20,Q:.71}),this.createFilter({type:"lowshelf",frequency:75,gain:0}),this.createFilter({type:"peaking",frequency:100,gain:0,Q:.6}),this.createFilter({type:"peaking",frequency:250,gain:0,Q:.3}),this.createFilter({type:"peaking",frequency:1040,gain:0,Q:.41}),this.createFilter({type:"peaking",frequency:2500,gain:0,Q:.2}),this.createFilter({type:"highshelf",frequency:7500,gain:0}),this.createFilter({type:"lowpass",frequency:2e4,Q:.71})];_filtersEnabled=!1;onStop;loaded;constructor(e,t){this.type=t??"",this._filters[0].gain.value=-25,this._audioAnalyzer=this._audioContext.createAnalyser(),this._audioAnalyzer.fftSize=4096,this._audioAnalyzer.maxDecibels=0,this._freqData=new Uint8Array(this._audioAnalyzer.frequencyBinCount),this._filteredAudioAnalyzer=this._audioContext.createAnalyser(),this._filteredAudioAnalyzer.fftSize=4096,this._filteredAudioAnalyzer.maxDecibels=0,this._filteredFreqData=new Uint8Array(this._filteredAudioAnalyzer.frequencyBinCount),this._gainNode=this._audioContext.createGain(),this._buffer=this._audioContext.createBuffer(2,1,44100),this._filteredBuffer=this._audioContext.createBuffer(2,1,44100),this._loadedBuffer=this._audioContext.createBuffer(2,1,44100),this.initSource(),this.loaded=new Promise(i=>{this.decodeData(e).then(s=>{if(s)return this._loadedBuffer=s,s}).then(async s=>(await this.renderBuffer(s),await this.renderFilteredBuffer(s),s)).catch(s=>{s.name=="EncodingError"?Ee.createFormatted("Failed to load audio: file format not supported","error"):Ee.createFormatted("Failed to load audio: "+s.message,"error")}).finally(()=>{this.initSource(),this.callLoadListeners(),this.callUpdateListeners(),i()})})}async renderBuffer(e){if(!e)return;const t=new OfflineAudioContext(e.numberOfChannels,e.length,e.sampleRate),i=t.createBufferSource();return i.buffer=e,i.connect(t.destination),i.start(),await t.startRendering().then(s=>{this._buffer=s}).catch(()=>{Ee.createFormatted("Failed to load audio: audio rendering failed","error")})}async renderFilteredBuffer(e){if(!e)return;const t=new OfflineAudioContext(e.numberOfChannels,e.length,e.sampleRate),i=t.createBufferSource();i.buffer=e;let s=i;for(const n of this._filters){if(!n.enabled)continue;const a=t.createBiquadFilter();a.type=n.type,a.Q.setValueAtTime(n.Q.value,0),a.frequency.setValueAtTime(n.frequency.value,0),a.gain.setValueAtTime(n.gain.value,0),s.connect(a),s=a}return s.connect(t.destination),i.start(),await t.startRendering().then(n=>{this._filteredBuffer=n}).catch(()=>{Ee.createFormatted("Failed to load audio: audio rendering failed","error")})}createFilter(e){const t=tM.create(this._audioContext.createBiquadFilter());return t.type=e.type,e.Q!==void 0&&(t.Q.value=e.Q),e.gain!==void 0&&(t.gain.value=e.gain),e.frequency!==void 0&&(t.frequency.value=e.frequency),t}getFilters(){return this._filters}getFilter(e){return this._filters[e]}updateFilter(e,t){this._filters[e]&&(t.Q!==void 0&&(this._filters[e].Q.value=t.Q),t.frequency!==void 0&&(this._filters[e].frequency.value=t.frequency),t.gain!==void 0&&(this._filters[e].gain.value=t.gain),clearTimeout(this._renderTimeout),this._renderTimeout=setTimeout(()=>this.renderFilteredBuffer(this._loadedBuffer).then(()=>this.callUpdateListeners()),500))}enableFilter(e){this._filters[e].enabled=!0,this.initSource(),clearTimeout(this._renderTimeout),this._renderTimeout=setTimeout(()=>this.renderFilteredBuffer(this._loadedBuffer).then(()=>this.callUpdateListeners()),500),this._filtersEnabled=!0}disableFilter(e){this._filters[e].enabled=!1,this.initSource(),clearTimeout(this._renderTimeout),this._renderTimeout=setTimeout(()=>this.renderFilteredBuffer(this._loadedBuffer).then(()=>this.callUpdateListeners()),500),this._filtersEnabled=this._filters.some(t=>t.enabled)}hasFilters(){return this._filtersEnabled}onLoad(e){this._loadListeners.push(e)}offLoad(e){this._loadListeners=this._loadListeners.filter(t=>t!=e)}onUpdate(e){this._updateListeners.push(e)}offUpdate(e){this._updateListeners=this._updateListeners.filter(t=>t!=e)}getSongLength(){return this._buffer.length/this._buffer.sampleRate}getFrequencyData(){return this._destroyed?new Uint8Array:(this._audioAnalyzer.getByteFrequencyData(this._freqData),this._freqData)}getFilteredFrequencyData(){return this._destroyed?new Uint8Array:(this._filteredAudioAnalyzer.getByteFrequencyData(this._filteredFreqData),this._filteredFreqData)}getSampleRate(){return this._buffer.sampleRate}getFFTSize(){return this._audioAnalyzer.fftSize}getRawData(){if(this._destroyed)return[];const e=[];for(let t=0;ti.enabled)?this._filters.filter(i=>i.enabled).map(i=>{const s=new Float32Array(e.length);return i.getFrequencyResponse(t,s,new Float32Array(e.length)),[...s]}).reduce((i,s)=>i.map((n,a)=>n*s[a])):new Array(e.length).fill(1)}callLoadListeners(){this._loadListeners.forEach(e=>e())}callUpdateListeners(){this._updateListeners.forEach(e=>e())}async decodeData(e){return new Promise((t,i)=>{if(!e){t();return}(async()=>{try{t(await this._audioContext.decodeAudioData(e))}catch(s){if(this.type==".ogg"){const n=(await Ke(()=>import("./OggDec-2941c3fd.js"),[])).default;try{t(await n.decodeOggData(e))}catch(a){i(a)}return}i(s)}})()})}initSource(){for(const t of this._filters)t.disconnect();this._audioAnalyzer.disconnect(),this._filteredAudioAnalyzer.disconnect(),this._gainNode.disconnect(),this._audioContext.destination.disconnect(),this._source?.stop(),this._source=Hd.create(this._audioContext.createBufferSource()),this._source.buffer=this._buffer,this._source.connect(this._audioAnalyzer);let e=this._audioAnalyzer;for(const t of this._filters)t.enabled&&(e.connect(t),e=t);e.connect(this._filteredAudioAnalyzer),_.audio.allowFilter?this._filteredAudioAnalyzer.connect(this._gainNode):this._audioAnalyzer.connect(this._gainNode),this._gainNode.connect(this._audioContext.destination),this._source.playbackRate.value=this._rate,this._isPlaying&&(this.pause(),this.play())}volume(e){this._destroyed||this._volume!=e&&(this._volume=e,this._gainNode.gain.setValueAtTime(e,this._audioContext.currentTime))}rate(e){this._destroyed||this._rate!=e&&(this._rate=e,this._source&&(this._isPlaying&&(this._playbackTime+=(this._audioContext.currentTime-this._startTimestamp)*this._source.playbackRate.value),this._startTimestamp=this._audioContext.currentTime,this._source.playbackRate.value=e))}play(){this._destroyed||this._source&&(this._isPlaying||(this.initSource(),this._playbackTime<=this._buffer.duration&&this._source.start(Math.max(0,this._audioContext.currentTime-this._playbackTime),Math.max(0,this._playbackTime)),this._startTimestamp=this._audioContext.currentTime,this._isPlaying=!0))}seek(e){if(e===void 0)return this._destroyed?this._playbackTime:this._source?this._isPlaying?(this._audioContext.currentTime-this._startTimestamp)*this._source.playbackRate.value+this._playbackTime:this._playbackTime:this._playbackTime;this._isPlaying?(this.stop(),this._playbackTime=e,this.play()):this._playbackTime=e}pause(){this._destroyed||this.stop(!0)}stop(e){this._destroyed||this._source&&this._isPlaying&&(this.onStop?.(),clearTimeout(this._delay),this._isPlaying=!1,this._playbackTime<=this._buffer.duration&&this._source.stop(),this._playbackTime=e?(this._audioContext.currentTime-this._startTimestamp)*this._source.playbackRate.value+this._playbackTime:0)}}class iM{judgementCounts=new Map;holdJudgementCounts=new Map;dancePoints=0;maxCumulativeDancePoints=0;maxDancePoints=0;chartManager;notedata;dataPoints=[];handlers=[];combo=0;missCombo=0;maxCombo=0;bestJudge;constructor(e){this.notedata=e.loadedChart.getNotedata(),this.chartManager=e,this.bestJudge=Je.getCollection(_.play.timingCollection).getStandardWindows()[0],this.calculateMaxDP()}onJudge(e){this.handlers.push(e)}applyOffset(e){this.dataPoints=this.dataPoints.map(t=>Pi(t.judgement)||!Qi(t.judgement)?t:{...t,error:t.error!==null?t.error+e:null})}addDataPoint(e,t,i){this.judgementCounts.has(t)||this.judgementCounts.set(t,0),this.judgementCounts.set(t,this.judgementCounts.get(t)+1),this.dancePoints+=t.dancePoints;const s=this.chartManager.loadedChart.timingData.getEventAtBeat("COMBOS",e[0].beat),n=s?.hitMult??1,a=s?.missMult??1;xl(t)||(this.maxCumulativeDancePoints+=Je.getCollection(_.play.timingCollection).getMaxDancePoints()),Pi(t)?(this.chartManager.loadedChart.gameType.gameLogic.usesHoldTicks||(this.maxCumulativeDancePoints+=e.filter(Re).reduce((o,l)=>o+Je.getCollection(_.play.timingCollection).getMaxHoldDancePoints(l.type),0)),this.combo=0,this.missCombo+=a,this.bestJudge=void 0):Qi(t)&&(Je.getCollection(_.play.timingCollection).shouldHideNote(t)?(this.combo+=e.length*n,this.combo>this.maxCombo&&(this.maxCombo=this.combo),this.missCombo=0,this.bestJudge&&t.getTimingWindowMS()>this.bestJudge.getTimingWindowMS()&&(this.bestJudge=t)):(this.bestJudge=void 0,this.combo=0)),this.handlers.forEach(o=>o(i,t)),this.dataPoints.push({second:e[0].second,error:i,judgement:t,notes:e})}addHoldDataPoint(e,t){this.judgementCounts.has(t)||this.judgementCounts.set(t,0),this.judgementCounts.set(t,this.judgementCounts.get(t)+1);const i=Je.getCollection(_.play.timingCollection).getHeldJudgement(e);this.holdJudgementCounts.has(i)||this.holdJudgementCounts.set(i,[0,0]);const s=this.holdJudgementCounts.get(i);_s(t)?s[0]++:s[1]++,this.holdJudgementCounts.set(i,s),this.dancePoints+=t.dancePoints,this.maxCumulativeDancePoints+=Je.getCollection(_.play.timingCollection).getMaxHoldDancePoints(e.type),this.handlers.forEach(n=>n(0,t)),wn(t)&&(this.bestJudge=void 0)}getScore(){return this.maxDancePoints==0?0:this.dancePoints/this.maxDancePoints}getCumulativeScore(){return this.maxCumulativeDancePoints==0?0:this.dancePoints/this.maxCumulativeDancePoints}getDataPoints(){return this.dataPoints}getMedian(){return Tl(this.dataPoints.filter(e=>!Pi(e.judgement)&&Qi(e.judgement)&&e.error!=null).map(e=>e.error))}getMaxCombo(){return this.maxCombo}calculateMaxDP(){this.maxDancePoints=this.chartManager.loadedChart.gameType.gameLogic.calculateMaxDP(this.notedata,this.chartManager.loadedChart.timingData)}getCount(e){return this.judgementCounts.get(e)??0}getCombo(){return this.combo}getMissCombo(){return this.missCombo}getBestJudge(){return this.bestJudge}}const ai=[1,2,3,4,6,8,12,16,24,48,-1],If=.2;var q=(r=>(r.View="View Mode",r.Edit="Edit Mode",r.Play="Play Mode",r.Record="Record Mode",r))(q||{}),Pe=(r=>(r[r.Off=0]="Off",r[r.Edit=1]="Edit",r[r.Add=2]="Add",r))(Pe||{});class pM{app;chartAudio=new mo;chartView;widgetManager;assistTick=new Lh({src:NA,volume:.5});me_high=new Lh({src:Wg,volume:.5});me_low=new Lh({src:zg,volume:.5});mine=new Ko.Howl({src:UA,volume:.5});loadedSM;smPath="";loadedChart;selection={notes:[],inProgressNotes:[]};eventSelection={timingEvents:[],inProgressTimingEvents:[]};editTimingMode=0;holdEditing=[];editNoteTypeIndex=0;partialScroll=0;noteFlashIndex=0;assistTickIndex=0;lastMetronomeDivision=-1;lastMetronomeMeasure=-1;lastSong=null;mode="Edit Mode";lastMode="Edit Mode";noChartTextA;noChartTextB;loadingText;shiftPressed=0;virtualClipboard="";startRegion;endRegion;gameStats;constructor(e){this.app=e,document.addEventListener("keydown",i=>{i.key=="Shift"&&this.shiftPressed++}),document.addEventListener("keyup",i=>{i.key=="Shift"&&(this.shiftPressed=Math.max(this.shiftPressed-1,0))}),document.addEventListener("cut",i=>{if(i.target.classList.contains("inlineEdit")||i.target instanceof HTMLTextAreaElement||i.target instanceof HTMLInputElement||this.mode!="Edit Mode")return;const s=this.copy();s&&i.clipboardData?.setData("text/plain",s),this.eventSelection.timingEvents.length>0?this.deleteEventSelection():this.deleteSelection(),i.preventDefault()},!0),document.addEventListener("copy",i=>{if(i.target.classList.contains("inlineEdit")||i.target instanceof HTMLTextAreaElement||i.target instanceof HTMLInputElement||this.mode!="Edit Mode")return;const s=this.copy();s&&i.clipboardData?.setData("text/plain",s),i.preventDefault(),i.stopImmediatePropagation()},!0),document.addEventListener("paste",i=>{if(i.target.classList.contains("inlineEdit")||i.target instanceof HTMLTextAreaElement||i.target instanceof HTMLInputElement||this.mode!="Edit Mode")return;const s=i.clipboardData?.getData("text/plain");s&&this.paste(s,this.shiftPressed>0),i.preventDefault(),i.stopImmediatePropagation()},!0),e.view.addEventListener?.("wheel",i=>{if(!(this.loadedSM==null||this.loadedChart==null||this.chartView==null))if(i.preventDefault(),Si&&i.metaKey||!Si&&i.ctrlKey){const s=i.deltaY/5*_.chart.scroll.scrollSensitivity*(_.chart.scroll.invertZoomScroll?-1:1);_.chart.speed=Le(_.chart.speed*Math.pow(1.01,s),10,35e3)}else{if(this.mode=="Play Mode"||this.mode=="Record Mode")return;let s=this.beat;const n=_.chart.snap,a=_.chart.speed*(_.chart.reverse&&_.chart.scroll.invertReverseScroll?-1:1),o=i.deltaY/a*_.chart.scroll.scrollSensitivity;if(n==0?(this.partialScroll=0,s=this.beat+o):_.chart.scroll.scrollSnapEveryScroll?i.deltaY<0?s=Math.round((this.beat-n)/n)*n:s=Math.round((this.beat+n)/n)*n:(this.partialScroll+=o,Math.abs(this.partialScroll)>n&&(this.partialScroll<0?s=Math.round((this.beat+Math.ceil(this.partialScroll/n)*n)/n)*n:s=Math.round((this.beat+Math.floor(this.partialScroll/n)*n)/n)*n,this.partialScroll%=n)),s=Math.max(0,s),s!=this.beat&&(this.beat=s),!this.holdEditing.every(l=>l==null))for(let l=0;l{this.noChartTextB.tint=8952234}),this.noChartTextB.on("mouseleave",()=>{this.noChartTextB.tint=5596791}),this.noChartTextB.on("mousedown",()=>{this.app.windowManager.openWindow(new ly(e,ze.getGameType("dance-single")))}),this.noChartTextA.visible=!1,this.noChartTextB.visible=!1,this.app.stage.addChild(this.noChartTextB),this.loadingText=new Oe("Loading simfile...",{fontName:"Main",fontSize:20}),this.loadingText.anchor.set(.5),this.loadingText.tint=5592405,this.app.stage.addChild(this.loadingText),this.loadingText.visible=!1;const t=()=>{this.noChartTextA.x=this.app.renderer.screen.width/2,this.noChartTextA.y=this.app.renderer.screen.height/2-20,this.noChartTextB.x=this.app.renderer.screen.width/2,this.noChartTextB.y=this.app.renderer.screen.height/2+10,this.loadingText.x=this.app.renderer.screen.width/2,this.loadingText.y=this.app.renderer.screen.height/2};t(),this.app.ticker.add(()=>{const i=performance.now();this.widgetManager.update(),this.loadedSM&&this.loadedChart&&this.chartView&&this.chartView.update(),ga.instance?.addDrawUpdateTimeValue(performance.now()-i)}),setInterval(()=>{if(!this.loadedSM||!this.loadedChart||!this.chartView)return;const i=performance.now(),s=this.chartAudio.seek();if(this.chartAudio.isPlaying()&&!this.holdEditing.every(a=>!a))for(let a=0;a.3&&this.editHoldBeat(a,c,!1)}const n=this.loadedChart.getNotedata();if(this.chartAudio.isPlaying()){for(;this.noteFlashIndexn[this.noteFlashIndex].second;)this.mode!="Record Mode"&&this.loadedChart.gameType.gameLogic.shouldAssistTick(n[this.noteFlashIndex])&&this.mode!="Play Mode"&&this.chartView.doJudgement(n[this.noteFlashIndex],0,Jg),this.noteFlashIndex++;const a=new Set;for(;this.assistTickIndexn[this.assistTickIndex].second+_.play.effectOffset-If;){if(a.has(n[this.assistTickIndex].second)||n[this.assistTickIndex].second+_.play.effectOffset-s<0){this.assistTickIndex++;continue}this.mode!="Record Mode"&&this.loadedChart.gameType.gameLogic.shouldAssistTick(n[this.assistTickIndex])&&(_.audio.assistTick&&Ie.assist&&this.assistTick.play((n[this.assistTickIndex].second+_.play.effectOffset-s)/_.audio.rate),a.add(n[this.assistTickIndex].second)),this.assistTickIndex++}}if(this.chartAudio.isPlaying()&&_.audio.metronome&&Ie.assist){const a=this.loadedChart.timingData,o=this.loadedChart.getBeatFromSeconds(this.time+_.play.effectOffset+If),l=a.getBeatFromMeasure(this.lastMetronomeMeasure),c=a.getDivisionLength(l),u=l+c*this.lastMetronomeDivision,h=[...a.getMeasureBeats(u,o)].slice(1);for(const[d,p]of h){if(this.beat>d)continue;const m=(a.getSecondsFromBeat(d)+_.play.effectOffset-this.time)/_.audio.rate;p?this.me_high.play(m):this.me_low.play(m)}if(h.length>0){const d=h.at(-1)[0];this.lastMetronomeMeasure=Math.floor(a.getMeasure(d)),this.lastMetronomeDivision=Math.round(a.getDivisionOfMeasure(d))}}this.mode=="Play Mode"&&this.loadedChart.gameType.gameLogic.update(this),this.updateSoundProperties(),$S(),ga.instance?.addUpdateTimeValue(performance.now()-i)},5),K.on("resize",()=>{this.chartView&&(this.chartView.x=this.app.renderer.screen.width/2,this.chartView.y=this.app.renderer.screen.height/2),t()}),K.on("chartModified",()=>{this.loadedChart&&(this.loadedChart.recalculateStats(),K.emit("chartModifiedAfter"))}),K.on("chartModified",()=>{this.loadedChart&&this.setNoteIndex()}),K.on("userOptionUpdated",i=>{i!="audio.rate"&&i!="play.effectOffset"&&i!="audio.assistTick"&&i!="audio.metronome"||(this.assistTick.stop(),this.me_low.stop(),this.me_high.stop(),this.setNoteIndex())}),window.addEventListener("keyup",i=>{if(this.mode=="Edit Mode"&&i.code.startsWith("Digit")){let s=parseInt(i.code.slice(5))-1;s==-1&&(s=9),this.endEditing(s)}},!0),window.addEventListener("keydown",i=>{const s=De.getKeyNameFromCode(i.code);if(this.mode=="Edit Mode"&&!i.target.classList.contains("inlineEdit")&&!(i.target instanceof HTMLTextAreaElement)&&!(i.target instanceof HTMLInputElement)){if(i.code.startsWith("Digit")&&!i.repeat&&!i.ctrlKey&&!i.metaKey&&!i.altKey&&!i.ctrlKey){let n=parseInt(i.code.slice(5))-1;n==-1&&(n=9),n<(this.loadedChart?.gameType.numCols??4)&&(this.setNote(n,"key"),i.preventDefault(),i.stopImmediatePropagation())}if(!this.holdEditing.every(n=>n==null)){const n=["cursorUp","cursorDown","previousNote","nextNote","previousMeasure","nextMeasure","jumpChartStart","jumpChartEnd","jumpSongStart","jumpSongEnd"];for(const a of n)if(De.getCombosForKeybind(a).map(o=>o.key).includes(s)){i.preventDefault(),i.stopImmediatePropagation(),nt[a].callback(this.app);for(let o=0;oo.key).includes(s)){this.holdEditing=[];return}}}},!0),window.addEventListener("keydown",i=>{this.mode!="Play Mode"&&this.mode!="Record Mode"||i.key=="Escape"&&(this.setMode(this.lastMode),this.chartAudio.pause())},!0)}get beat(){return this.loadedChart?Math.round(this.loadedChart.getBeatFromSeconds(this.time)*1e5)/1e5:0}set beat(e){this.loadedChart&&(this.chartAudio.seek(this.loadedChart.getSecondsFromBeat(e)),this.setNoteIndex())}get time(){return this.chartAudio.seek()}set time(e){this.loadedChart&&(this.chartAudio.seek(e),this.setNoteIndex())}async loadSM(e){if(WS.close(),zS.close(),jS.close(),gt.instance.isDirty()){const s=new Al(this.app,"Save","Do you wish to save the current file?",[{label:"Cancel",type:"default"},{label:"No",type:"default"},{label:"Yes",type:"confirm"}]);this.app.windowManager.openWindow(s);const n=await s.resolved;if(n=="Cancel")return;n=="Yes"&&this.save()}if(!e){this.smPath="",this.loadedSM=void 0,this.chartAudio.stop(),this.noChartTextA.visible=!1,this.noChartTextB.visible=!1,this.chartView?.destroy({children:!0});return}this.chartAudio.stop(),this.chartAudio.seek(0),this.lastSong=null,this.smPath=e,this.loadingText.visible=!0;const t=await Ue.getFileHandle(this.smPath);if(!t){Ee.createFormatted("Couldn't load the file at "+this.smPath,"error"),this.app.windowManager.openWindow(new wy(this.app)),this.loadingText.visible=!1;return}const i=await t.getFile();this.loadedSM=new gy(i),await this.loadedSM.loaded,this.loadingText.visible=!1,this.noChartTextA.visible=!0,this.noChartTextB.visible=!0,this.editTimingMode=0,K.emit("smLoaded"),await this.loadChart(),K.emit("smLoadedAfter"),this.beat=0,fy.addSM(this.smPath,this.loadedSM)}async loadChart(e){if(this.loadedSM==null)return;if(e==null){if(this.loadedChart){const s=this.loadedSM.charts[this.loadedChart.gameType.id];s&&s.length>0&&(e=s.at(-1))}if(!e)for(const s of ze.getPriority()){const n=this.loadedSM.charts[s.id];if(n&&n.length>0){e=n.at(-1);break}}if(!e){this.chartView?.destroy({children:!0}),this.chartView?.removeChildren(),this.beat=0,this.loadedChart=void 0,this.chartView=void 0,this.noChartTextA.visible=!0,this.noChartTextB.visible=!0,K.emit("chartLoaded"),K.emit("chartModified");return}}if(e==this.loadedChart)return;this.chartView?.destroy({children:!0}),this.chartView?.removeChildren(),this.clearSelections(),this.loadedChart=e,this.beat=this.loadedChart.getBeatFromSeconds(this.time),gt.instance.reset(),_.play.timingCollection=_.play.defaultTimingCollection[e.gameType.id]??"ITG";const t=ze.getGameType(_.chart.noteskin.type),i={type:e.gameType.id,name:_.chart.lastNoteskins[e.gameType.id]??"default"};if(t){const s=at.getNoteskinData(t,_.chart.noteskin.name);s?.gameTypes.includes(e.gameType.id)&&(i.name=s.id)}if(_.chart.noteskin=i,_.chart.lastNoteskins[e.gameType.id]=i.name,this.setNoteIndex(),this.chartView=new eM(this),this.chartView.x=this.app.renderer.screen.width/2,this.chartView.y=this.app.renderer.screen.height/2,(this.mode=="Play Mode"||this.mode=="Record Mode")&&this.setMode(this.lastMode),Ie.viewMode&&this.setMode("View Mode"),this.noChartTextA.visible=!1,this.noChartTextB.visible=!1,this.loadedChart.getMusicPath()!=this.lastSong){this.lastSong=this.loadedChart.getMusicPath();const s=this.chartAudio.isPlaying();await this.loadAudio(),K.emit("audioLoaded"),s&&this.chartAudio.play()}Ee.create("Loaded chart "+e.difficulty+" "+e.meter+" "+e.gameType.id),K.emit("chartLoaded"),K.emit("audioLoaded"),K.emit("chartModified"),this.loadedChart.gameType.id=="dance-single"?window.Parity=new vC(this.app,this.loadedChart.gameType.id):window.Parity=void 0,Ie.autoPlay&&this.playPause()}async loadAudio(){if(!this.loadedSM||!this.loadedChart)return;this.chartAudio.stop(),this.chartAudio?.destroy();const e=this.loadedChart.getMusicPath();if(Ee.create("Loading audio..."),e==""){Ee.createFormatted("Failed to load audio: no audio file","error");const n=Math.max(0,this.beat);this.chartAudio=new mo(void 0),this.beat=n;return}const t=await this.getAudioHandle(e);if(t==null){Ee.createFormatted("Failed to load audio: couldn't find audio file "+e,"error");const n=Math.max(0,this.beat);this.chartAudio=new mo(void 0),this.beat=n;return}const i=await t.getFile(),s=Math.max(0,this.beat);this.chartAudio=new mo(await i.arrayBuffer(),Xi(i.name)),this.chartAudio.onLoad(()=>{Ee.create("Loaded audio")}),this.beat=s,this.chartAudio.onStop=()=>{this.assistTick.stop(),this.me_high.stop(),this.me_low.stop()},this.setNoteIndex()}async getAudioHandle(e){let t=await Ue.getFileHandleRelativeTo(this.smPath,e);if(t)return t;try{const i=await Ue.getDirectoryFiles(Ot(this.smPath));if(t=i.filter(s=>s.name.toLowerCase()==ji(e).toLowerCase())[0],t)return Ee.createFormatted("Failed to locate audio file "+e+", using file "+t.name+" instead","warn"),t;t=i.filter(s=>ml.includes(Xi(s.name)))[0],t&&Ee.createFormatted("Failed to locate audio file "+e+", using file "+t.name+" instead","warn")}catch{return}return t}getAudio(){return this.chartAudio}updateSoundProperties(){this.setEffectVolume(_.audio.soundEffectVolume*_.audio.masterVolume),this.setVolume(_.audio.songVolume*_.audio.masterVolume),this.setRate(_.audio.rate)}setRate(e){this.chartAudio.rate(e)}setVolume(e){this.chartAudio.volume(e)}setEffectVolume(e){this.assistTick.volume(e),this.me_high.volume(e),this.me_low.volume(e),this.mine.volume()!=e&&this.mine.volume(e)}setNoteIndex(){if(this.loadedSM==null||this.loadedChart==null||this.chartView==null||this.loadedChart.getNotedata().length==0){this.noteFlashIndex=0,this.assistTickIndex=0;return}this.noteFlashIndex=Rt(this.loadedChart.getNotedata(),this.time,e=>e.second)+1,this.noteFlashIndex>=1&&this.time<=this.loadedChart.getNotedata()[this.noteFlashIndex-1].second&&this.noteFlashIndex--,this.assistTickIndex=this.noteFlashIndex,this.lastMetronomeMeasure=Math.floor(this.loadedChart.timingData.getMeasure(this.beat)),this.lastMetronomeDivision=Math.floor(this.loadedChart.timingData.getDivisionOfMeasure(this.beat))}playPause(){this.setNoteIndex(),this.chartAudio.isPlaying()?this.chartAudio.pause():this.chartAudio.play()}getClosestTick(e,t){if(!this.loadedChart)return 0;const i=Math.max(.001,4/t),s=this.loadedChart.timingData.getBeatOfMeasure(e),n=e-s,a=Math.round(s/i)*i;return Math.max(0,n+a)}snapToNearestTick(e){this.beat=Math.max(0,this.getClosestTick(e,4/_.chart.snap))}snapToPreviousTick(){if(!this.loadedChart)return;const e=Math.max(.001,_.chart.snap),t=Math.floor(this.loadedChart.timingData.getMeasure(this.beat)),i=this.loadedChart.timingData.getBeatFromMeasure(t),s=Math.floor((this.beat-i)/e)*e,n=Math.abs(s-(this.beat-i))<5e-4?s-e:s,a=n+i;if(n<0){const o=this.loadedChart.timingData.getBeatFromMeasure(t-1),l=Math.round((a-o)/e)*e;this.beat=Math.max(0,o+l);return}this.beat=Math.max(0,a)}snapToNextTick(){if(!this.loadedChart)return;const e=Math.max(.001,_.chart.snap),t=Math.floor(this.loadedChart.timingData.getMeasure(this.beat)),i=this.loadedChart.timingData.getBeatFromMeasure(t),a=Math.floor((this.beat-i+5e-4)/e)*e+e+i,o=this.loadedChart.timingData.getBeatFromMeasure(t+1);if(a>o){this.beat=o;return}this.beat=a}previousSnap(){let e=this.getSnapIndex()-1;e=(e+ai.length)%ai.length,_.chart.snap=ai[e]==-1?0:1/ai[e],K.emit("snapChanged")}nextSnap(){let e=this.getSnapIndex();(e==ai.length-1||Math.abs(1/_.chart.snap-ai[e])<=5e-4)&&e++,e=(e+ai.length)%ai.length,_.chart.snap=ai[e]==-1?0:1/ai[e],K.emit("snapChanged")}getSnapIndex(){return _.chart.snap==0?ai.length-1:ai.findIndex(e=>1/e<=_.chart.snap)}removeDuplicateBeats(e){if(e.length===0)return e;const t=[e[0]];for(let i=1;ii.beat+i.hold),t=this.loadedChart.getNotedata().map(i=>i.beat).concat(e).sort((i,s)=>i-s);return this.removeDuplicateBeats(t)}previousNote(){const e=this.getRows();if(e.length==0)return;let t=Rt(e,this.beat);this.beat==e[t]&&t--,this.beat=e[Math.max(0,t)]}nextNote(){const e=this.getRows();if(e.length==0)return;let t=Rt(e,this.beat);this.beat>=e[t]&&t++,this.beat=e[Math.min(e.length-1,t)]}firstNote(){if(this.loadedSM==null||this.loadedChart==null||this.chartView==null)return;const e=this.loadedChart.getNotedata();e.length!=0&&(this.beat=e[0].beat)}lastNote(){if(this.loadedSM==null||this.loadedChart==null||this.chartView==null)return;const e=this.loadedChart.getNotedata();if(e.length==0)return;const t=e[e.length-1];this.beat=Zi(t)}truncateHold(e,t){const i=Le(Math.round((t-Math.max(.020833333333333332,_.chart.snap))*48)/48,e.beat,e.beat+e.hold-.020833333333333332);return i==e.beat?{beat:e.beat,col:e.col,type:"Tap"}:{beat:e.beat,col:e.col,type:e.type,hold:i-e.beat}}setNote(e,t,i=this.beat){if(this.loadedSM==null||this.loadedChart==null||this.chartView==null)return;i=Math.max(0,Math.round(i*48)/48);const s=this.loadedChart.getNotedata().filter(o=>o.col!=e?!1:Math.abs(o.beat-i)<.003?!0:Re(o)&&o.beat==i),n=this.loadedChart.getNotedata().filter(o=>Re(o)&&o.col==e&&i>o.beat&&i<=o.beat+o.hold).map(o=>({oldNote:o,newNote:this.truncateHold(o,i)})),a={startBeat:i,endBeat:i,roll:!1,originalNote:void 0,type:t,removedNotes:s,truncatedHolds:n,direction:null};this.holdEditing[e]=a,s.length==0&&(a.originalNote={beat:i,col:e,type:this.getEditingNoteType()}),this.setNoteIndex(),this.app.actionHistory.run({action:()=>{a.removedNotes.forEach(o=>{this.loadedChart.removeNote(o),this.removeNoteFromSelection(o)}),a.truncatedHolds.forEach(o=>this.loadedChart.modifyNote(o.oldNote,o.newNote)),a.originalNote&&this.loadedChart.addNote(a.originalNote)},undo:()=>{a.originalNote&&this.loadedChart.removeNote(a.originalNote),a.truncatedHolds.forEach(o=>this.loadedChart.modifyNote(o.newNote,o.oldNote)),a.removedNotes.forEach(o=>this.loadedChart.addNote(o))}})}editHoldBeat(e,t,i){if(this.loadedSM==null||this.loadedChart==null||this.chartView==null)return;const s=this.holdEditing[e];if(s==null||t==s.startBeat&&t==s.endBeat)return;if(s.direction===null&&(ta.beat==s.originalNote.beat&&a.col==s.originalNote.col||a.col!=e?!1:a.beat>=s.startBeat&&a.beat<=s.endBeat?!0:Re(a)&&a.beat+a.hold>=s.startBeat&&a.beat+a.hold<=s.endBeat);s.removedNotes=s.removedNotes.concat(n),n.forEach(a=>this.loadedChart.removeNote(a)),this.setNoteIndex()}endEditing(e){this.holdEditing[e]=void 0}previousNoteType(){const e=this.loadedChart?.gameType.editNoteTypes.length??0;this.editNoteTypeIndex=(this.editNoteTypeIndex-1+e)%e}nextNoteType(){const e=this.loadedChart?.gameType.editNoteTypes.length??0;this.editNoteTypeIndex=(this.editNoteTypeIndex+1+e)%e}getEditingNoteType(){return this.loadedChart?.gameType.editNoteTypes[this.editNoteTypeIndex]??null}setEditingNoteType(e){if(!this.loadedChart)return;const i=(this.loadedChart?.gameType.editNoteTypes).indexOf(e);i!=-1&&(this.editNoteTypeIndex=i)}getMode(){return this.mode}setMode(e){if(!this.loadedChart||!this.chartView)return;if(this.mode==e){(e=="Play Mode"||e=="Record Mode")&&(this.setMode(this.lastMode),this.setNoteIndex(),this.chartAudio.pause());return}(this.mode=="View Mode"||this.mode=="Edit Mode")&&(this.lastMode=this.mode),this.mode=e;const t=this.loadedChart.getNotedata();if(this.mode=="Play Mode"){t.forEach(i=>{i.gameplay={hideNote:!1,hasHit:!1}});for(const i of t)if(i.secondi.gameplay=void 0))}judgeCol(e){if(!(!this.loadedChart||!this.chartView)){if(this.mode=="Play Mode")this.loadedChart.gameType.gameLogic.keyDown(this,e);else if(this.mode=="Record Mode"){const t=this.loadedChart.getBeatFromSeconds(this.time+_.play.offset),i=_.chart.snap==0?1/48:_.chart.snap,s=Math.round(t/i)*i;this.setNote(e,"key",s)}}}judgeColUp(e){!this.loadedChart||!this.chartView||(this.mode=="Play Mode"?this.loadedChart.gameType.gameLogic.keyUp(this,e):this.mode=="Record Mode"&&this.endEditing(e))}async save(){if(!this.loadedSM)return;let e,t;if(window.nw){const s=window.nw.require("path"),n=s.parse(this.smPath);e=s.resolve(n.dir,n.name+".sm"),t=s.resolve(n.dir,n.name+".ssc")}else{const s=Ot(this.smPath),n=ji(this.smPath),a=n.includes(".")?n.split(".").slice(0,-1).join("."):n;e=s+"/"+a+".sm",t=s+"/"+a+".ssc"}let i=null;!this.loadedSM.usesChartTiming()&&await Ue.getFileHandle(e)&&await Ue.writeFile(e,this.loadedSM.serialize("sm")).catch(s=>{const n=s.message;n.includes(qo.GONE[0])||(i=n)}),(this.loadedSM.requiresSSC()||await Ue.getFileHandle(t))&&await Ue.writeFile(t,this.loadedSM.serialize("ssc")).catch(s=>{const n=s.message;n.includes(qo.GONE[0])||(i=n)}),i==null?this.loadedSM.usesChartTiming()?Ee.create("Saved. No SM file since split timing was used."):Ee.create("Saved"):Ee.createFormatted("Failed to save file: "+i,"error"),gt.instance.setLimit()}hasSelection(){return this.hasNoteSelection()||this.hasEventSelection()}hasNoteSelection(){return this.selection.notes.length>0||this.startRegion!==void 0&&this.endRegion!==void 0}hasEventSelection(){return this.eventSelection.timingEvents.length>0}hasRange(){return this.selection.notes.length>1||this.eventSelection.timingEvents.length>1||this.startRegion!==void 0&&this.endRegion!==void 0}clearSelections(){this.selection={notes:[],inProgressNotes:[]},this.eventSelection={timingEvents:[],inProgressTimingEvents:[]}}startDragSelection(){this.selection.inProgressNotes=[]}endDragSelection(){let e=0,t=0;const i=[],s=this.selection.inProgressNotes,n=this.selection.notes,a=(o,l)=>o.beat==l.beat?o.col-l.col:o.beat-l.beat;if(s.length==0||n.length==0){this.selection.notes=s.concat(n),this.selection.inProgressNotes=[];return}for(;;)if(a(s[e],n[t])<0){if(i.push(s[e]),e++,e>=s.length){this.selection.notes=i.concat(n.slice(t));break}}else if(i.push(n[t]),t++,t>=n.length){this.selection.notes=i.concat(s.slice(e));break}this.selection.inProgressNotes=[]}startDragEventSelection(){this.eventSelection.inProgressTimingEvents=[]}endDragEventSelection(){let e=0,t=0;const i=[],s=this.eventSelection.inProgressTimingEvents,n=this.eventSelection.timingEvents,a=(o,l)=>o.beat-l.beat;if(s.length==0||n.length==0){this.eventSelection.timingEvents=s.concat(n),this.eventSelection.inProgressTimingEvents=[];return}for(;;)if(a(s[e],n[t])<0){if(i.push(s[e]),e++,e>=s.length){this.eventSelection.timingEvents=i.concat(n.slice(t));break}}else if(i.push(n[t]),t++,t>=n.length){this.eventSelection.timingEvents=i.concat(s.slice(e));break}this.eventSelection.inProgressTimingEvents=[]}addNoteToDragSelection(e){this.addNoteSelection(this.selection.inProgressNotes,e)}removeNoteFromDragSelection(e){this.removeNoteSelection(this.selection.inProgressNotes,e)}addEventToDragSelection(e){this.addEventSelection(this.eventSelection.inProgressTimingEvents,e)}removeEventFromDragSelection(e){this.removeEventSelection(this.eventSelection.inProgressTimingEvents,e)}addNoteToSelection(e){this.addNoteSelection(this.selection.notes,e)}removeNoteFromSelection(e){this.removeNoteSelection(this.selection.notes,e)}setNoteSelection(e){this.selection.inProgressNotes=[],this.selection.notes=[...e].sort((t,i)=>t.beat==i.beat?t.col-i.col:t.beat-i.beat)}addEventToSelection(e){this.addEventSelection(this.eventSelection.timingEvents,e)}removeEventFromSelection(e){this.removeEventSelection(this.eventSelection.timingEvents,e)}setEventSelection(e){this.eventSelection.inProgressTimingEvents=[],this.eventSelection.timingEvents=e.sort((t,i)=>t.beat-i.beat)}isNoteInSelection(e){return this.getNoteSelectionIndex(this.selection.notes,e)!=-1||this.getNoteSelectionIndex(this.selection.inProgressNotes,e)!=-1}isEventInSelection(e){return this.getEventSelectionIndex(this.eventSelection.timingEvents,e)!=-1||this.getEventSelectionIndex(this.eventSelection.inProgressTimingEvents,e)!=-1}addNoteSelection(e,t){let i=ro(e,t.beat,s=>s.beat);for(;e[i]&&(e[i].beats.beat);for(;e[i]&&e[i].beat==t.beat;){if(qp(e[i],t))return i;i++}return-1}addEventSelection(e,t){let i=ro(e,t.beat,s=>s.beat);for(;e[i]&&e[i].beat<=t.beat;)i++;e.splice(i,0,t)}removeEventSelection(e,t){const i=this.getEventSelectionIndex(e,t);i!=-1&&e.splice(i,1)}getEventSelectionIndex(e,t){let i=ro(e,t.beat,s=>s.beat);for(;e[i]&&e[i].beat==t.beat;){if(qp(e[i],t))return i;i++}return-1}selectRegion(){if(this.loadedChart){if(this.endRegion!==void 0&&(this.startRegion=void 0,this.endRegion=void 0),this.startRegion===void 0){this.clearSelections(),this.startRegion=this.beat;return}this.endRegion=this.beat,this.endRegione.beat>=this.startRegion&&e.beat<=this.endRegion)):this.setEventSelection(fr.flatMap(e=>this.loadedChart.timingData.getColumn(e).events).filter(e=>e.beat>=this.startRegion&&e.beat<=this.endRegion))}}modifySelection(e,t=!1){if(!this.loadedChart)return;const i=this.selection.notes,s=structuredClone(this.selection.notes).map(e).sort((l,c)=>l.beat==c.beat?l.col-c.col:l.beat-c.beat);if(s.length==0)return;const n=[];for(const l of s){const c=n.at(-1);c!==void 0&&c.beat==l.beat&&c.col==l.col||n.push(l)}if(n.length==0)return;const{removedNotes:a,truncatedHolds:o}=this.checkConflicts(n,i);if(t){const l=n.map(p=>Zi(p));let c=0;for(const p of l)p>c&&(c=p);const u=new Array(this.loadedChart.gameType.numCols).fill(0).map((p,f)=>({type:"Hold",hold:c-n[0].beat,col:f,beat:n[0].beat})),{removedNotes:h,truncatedHolds:d}=this.checkConflicts(u,i);h.forEach(p=>{a.includes(p)||a.push(p)}),d.forEach(p=>{const f=o.find(m=>m.oldNote==p.oldNote);if(f){const m=Re(f.newNote)?f.newNote.hold:0,g=Re(f.newNote)?f.newNote.hold:0,y=Math.min(m,g);y==0?f.newNote={beat:f.newNote.beat,col:f.newNote.col,type:"Tap"}:f.newNote={beat:f.newNote.beat,col:f.newNote.col,type:f.newNote.type,hold:y}}}),a.sort((p,f)=>p.beat==f.beat?p.col-f.col:p.beat-f.beat),o.sort((p,f)=>p.newNote.beat==f.newNote.beat?p.newNote.col-f.newNote.col:p.newNote.beat-f.newNote.beat)}this.app.actionHistory.run({action:()=>{this.loadedChart.removeNotes(i.concat(a),!1),o.forEach(l=>this.loadedChart.modifyNote(l.oldNote,l.newNote,!1)),this.clearSelections(),this.setNoteSelection(this.loadedChart.addNotes(n))},undo:()=>{this.loadedChart.removeNotes(n,!1),o.forEach(l=>this.loadedChart.modifyNote(l.newNote,l.oldNote,!1)),this.loadedChart.addNotes(a,!1),this.clearSelections(),this.setNoteSelection(this.loadedChart.addNotes(i))}})}checkConflicts(e,t=[]){if(e.length==0)return{removedNotes:[],truncatedHolds:[]};const i=this.loadedChart.getNotedata(),s=this.loadedChart.gameType.numCols,n=new Array(s).fill(0).map(u=>[]);for(const u of i)n[u.col].push(u);const a=new Array(s).fill(0).map(u=>[]);for(const u of e)u.col>s||a[u.col].push(u);const o=[],l=[],c=[];for(let u=0;ua[u][0].beat<=(Re(d)?d.beat+d.hold:d.beat));for(const d of a[u])for(;n[u][h];){const p=n[u][h],f=Re(d)?d.beat+d.hold:d.beat;if(!t.includes(p)&&!c.includes(p)&&(d.beat<=p.beat&&f>=p.beat?(c.push(p),o.push(p)):Re(p)&&p.beat+p.hold>=d.beat&&p.beatf)break;h++}}return o.sort((u,h)=>u.beat==h.beat?u.col-h.col:u.beat-h.beat),l.sort((u,h)=>u.newNote.beat==h.newNote.beat?u.newNote.col-h.newNote.col:u.newNote.beat-h.newNote.beat),{removedNotes:o,truncatedHolds:l}}modifyEventSelection(e){!this.loadedChart||!this.loadedSM||this.loadedChart.timingData.modify(this.eventSelection.timingEvents.map(t=>[t,e(structuredClone(t))]))}deleteSelection(){if(this.selection.notes.length==0)return;const e=this.selection.notes;this.app.actionHistory.run({action:()=>{this.loadedChart.removeNotes(e),this.clearSelections()},undo:()=>{this.selection.notes=this.loadedChart.addNotes(e)}})}deleteEventSelection(){this.eventSelection.timingEvents.length!=0&&(!this.loadedChart||!this.loadedSM||this.loadedChart.timingData.delete(this.eventSelection.timingEvents))}paste(e,t=!1){if(this.loadedChart&&(e.startsWith("ArrowVortex:notes:")&&(this.pasteNotes(e,t)||this.pasteNotes(this.virtualClipboard,t)),e.startsWith("ArrowVortex:tempo:")||e.startsWith("SMEditor:tempo:"))){this.pasteTempo(e)||this.pasteTempo(this.virtualClipboard);return}}pasteNotes(e,t=!1){if(!this.loadedChart)return!0;const i=sC(e);return!i||i.length==0?!1:(this.insertNotes(i.map(s=>(s.beat+=this.beat,s.beat=Math.round(s.beat*48)/48,s)),t),!0)}insertNotes(e,t=!1){e.sort((n,a)=>n.beat==a.beat?n.col-a.col:n.beat-a.beat);const{removedNotes:i,truncatedHolds:s}=this.checkConflicts(e);if(t){const n=e.map(u=>Zi(u));let a=0;for(const u of n)u>a&&(a=u);const o=new Array(this.loadedChart.gameType.numCols).fill(0).map((u,h)=>({type:"Hold",hold:a-e[0].beat,col:h,beat:e[0].beat})),{removedNotes:l,truncatedHolds:c}=this.checkConflicts(o);l.forEach(u=>{i.includes(u)||i.push(u)}),c.forEach(u=>{const h=s.find(d=>d.oldNote==u.oldNote);if(h){const d=Re(h.newNote)?h.newNote.hold:0,p=Re(h.newNote)?h.newNote.hold:0,f=Math.min(d,p);f==0?h.newNote={beat:h.newNote.beat,col:h.newNote.col,type:"Tap"}:h.newNote={beat:h.newNote.beat,col:h.newNote.col,type:h.newNote.type,hold:f}}}),i.sort((u,h)=>u.beat==h.beat?u.col-h.col:u.beat-h.beat),s.sort((u,h)=>u.newNote.beat==h.newNote.beat?u.newNote.col-h.newNote.col:u.newNote.beat-h.newNote.beat)}this.app.actionHistory.run({action:()=>{this.loadedChart.removeNotes(i,!1),s.forEach(n=>{this.loadedChart.modifyNote(n.oldNote,n.newNote,!1)}),this.clearSelections(),this.setNoteSelection(this.loadedChart.addNotes(e))},undo:()=>{this.loadedChart.removeNotes(e,!1),s.forEach(n=>{this.loadedChart.modifyNote(n.newNote,n.oldNote,!1)}),this.setNoteSelection(this.loadedChart.addNotes(i)),this.clearSelections()}})}pasteTempo(e){if(!this.loadedChart||!this.loadedSM)return!0;const t=dC(e);if(!t||t.length==0)return!1;const i=this.loadedChart.timingData;return t.forEach(s=>{s.type=="ATTACKS"?s.second+=this.time:s.beat+=this.beat}),t.forEach(s=>s.isChartTiming=i.isPropertyChartSpecific(s.type)),i.insert(t),!0}copy(){if(this.selection.notes.length!=0){const e=Math.min(...this.selection.notes.map(s=>s.beat)),t=structuredClone(this.selection.notes).map(s=>(s.beat-=e,s)).sort((s,n)=>s.beat==n.beat?s.col-n.col:s.beat-n.beat),i=nC(t);return this.virtualClipboard=i,i}else if(this.eventSelection.timingEvents.length!=0){const e=Math.min(...this.eventSelection.timingEvents.map(n=>n.beat)),t=this.loadedChart.timingData.getSecondsFromBeat(e),i=structuredClone(this.eventSelection.timingEvents).map(n=>n.type=="ATTACKS"?(n.second-=t,n):(n.beat-=e,n)).sort((n,a)=>n.type!=a.type?n.type.localeCompare(a.type):n.type=="ATTACKS"?n.second-a.second:n.beat-a.beat),s=lC(i);return this.virtualClipboard=s,s}}}export{ky as $,gt as A,jt as B,xC as C,ga as D,K as E,Ie as F,ze as G,oM as H,Se as I,qi as J,nt as K,Cc as L,Xn as M,at as N,_ as O,Fe as P,ke as Q,ad as R,gy as S,Qe as T,Wr as U,Bt as V,St as W,Zt as X,Me as Y,Dd as Z,Ke as _,De as a,Le as a0,aM as a1,uM as a2,sd as a3,Am as a4,We as a5,Wt as a6,ev as a7,qo as a8,DA as a9,jr as aa,_n as ab,Ae as b,At as c,pM as d,Xi as e,Ue as f,va as g,wy as h,nM as i,kr as j,ul as k,cM as l,B as m,Pd as n,WS as o,Ee as p,zS as q,jS as r,dM as s,Lt as t,gi as u,TS as v,ie as w,Be as x,er as y,Ft as z}; diff --git a/HoldBody-34995142.js b/HoldBody-5358344a.js similarity index 98% rename from HoldBody-34995142.js rename to HoldBody-5358344a.js index 179dad99..db3203ec 100644 --- a/HoldBody-34995142.js +++ b/HoldBody-5358344a.js @@ -1 +1 @@ -import{P as c,a3 as l,a4 as _,Q as d,w as o,a5 as p,c as h,U as m}from"./ChartManager-f20da8bc.js";const s=new p;class n extends c{constructor(t,e=100,i=100){super(t),this.tileTransform=new l,this._width=e,this._height=i,this.uvMatrix=this.texture.uvMatrix||new _(t),this.pluginName="tilingSprite",this.uvRespectAnchor=!1}get clampMargin(){return this.uvMatrix.clampMargin}set clampMargin(t){this.uvMatrix.clampMargin=t,this.uvMatrix.update(!0)}get tileScale(){return this.tileTransform.scale}set tileScale(t){this.tileTransform.scale.copyFrom(t)}get tilePosition(){return this.tileTransform.position}set tilePosition(t){this.tileTransform.position.copyFrom(t)}_onTextureUpdate(){this.uvMatrix&&(this.uvMatrix.texture=this._texture),this._cachedTint=16777215}_render(t){const e=this._texture;!e||!e.valid||(this.tileTransform.updateLocalTransform(),this.uvMatrix.update(),t.batch.setObjectRenderer(t.plugins[this.pluginName]),t.plugins[this.pluginName].render(this))}_calculateBounds(){const t=this._width*-this._anchor._x,e=this._height*-this._anchor._y,i=this._width*(1-this._anchor._x),r=this._height*(1-this._anchor._y);this._bounds.addFrame(this.transform,t,e,i,r)}getLocalBounds(t){return this.children.length===0?(this._bounds.minX=this._width*-this._anchor._x,this._bounds.minY=this._height*-this._anchor._y,this._bounds.maxX=this._width*(1-this._anchor._x),this._bounds.maxY=this._height*(1-this._anchor._y),t||(this._localBoundsRect||(this._localBoundsRect=new d),t=this._localBoundsRect),this._bounds.getRectangle(t)):super.getLocalBounds.call(this,t)}containsPoint(t){this.worldTransform.applyInverse(t,s);const e=this._width,i=this._height,r=-e*this.anchor._x;if(s.x>=r&&s.x=a&&s.y{this.tileScale.set(e/this.texture.width)}),this.uvRespectAnchor=!0,this.anchor.y=1,this.x=-e/2,this.width=e}}class T extends g{_playing=!1;_autoUpdate=!1;_isConnectedToTicker=!1;_tickerUpdate=this.update.bind(this);_currentTime=0;_textures;_previousFrame=null;onComplete=null;onLoop=null;onFrameChange=null;animationSpeed=1;loop=!1;updateAnchor=!1;constructor(t,e){super(t[0],e),this.textures=t}stop(){this._playing&&(this._playing=!1,this._autoUpdate&&this._isConnectedToTicker&&(h.shared.remove(this._tickerUpdate),this._isConnectedToTicker=!1))}play(){this._playing||(this._playing=!0,this._autoUpdate&&!this._isConnectedToTicker&&(h.shared.add(this._tickerUpdate,this,m.HIGH),this._isConnectedToTicker=!0))}gotoAndStop(t){this.stop(),this.currentFrame=t}gotoAndPlay(t){this.currentFrame=t,this.play()}update(t){if(!this._playing)return;const e=this.animationSpeed*t,i=this.currentFrame;this._currentTime+=e,this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete?.()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete?.()):i!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFramei)&&this.onLoop(),this.updateTexture())}updateTexture(){const t=this.currentFrame;this._previousFrame!==t&&(this._previousFrame=t,this.texture=this._textures[t],this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this.uvs=this._texture._uvs.uvsFloat32,this.updateAnchor&&this._anchor.copyFrom(this._texture.defaultAnchor),this.onFrameChange?.(this.currentFrame))}destroy(t){this.stop(),super.destroy(t),this.onComplete=null,this.onFrameChange=null,this.onLoop=null}get totalFrames(){return this._textures?.length??0}get textures(){return this._textures??[]}set textures(t){this._textures=t,this._previousFrame=null,this.gotoAndStop(0),this.updateTexture()}get currentFrame(){let t=Math.floor(this._currentTime)%this._textures.length;return t<0&&(t+=this._textures.length),t}set currentFrame(t){if(t<0||t>this.totalFrames-1)throw new Error(`[AnimatedSprite]: Invalid frame index value ${t}, expected to be between 0 and totalFrames ${this.totalFrames}.`);const e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture()}get playing(){return this._playing}get autoUpdate(){return this._autoUpdate}set autoUpdate(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isConnectedToTicker?(h.shared.remove(this._tickerUpdate),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._playing&&(h.shared.add(this._tickerUpdate),this._isConnectedToTicker=!0))}}export{T as A,g as H,n as T}; +import{P as c,a3 as l,a4 as _,Q as d,w as o,a5 as p,c as h,U as m}from"./ChartManager-3c3d6f39.js";const s=new p;class n extends c{constructor(t,e=100,i=100){super(t),this.tileTransform=new l,this._width=e,this._height=i,this.uvMatrix=this.texture.uvMatrix||new _(t),this.pluginName="tilingSprite",this.uvRespectAnchor=!1}get clampMargin(){return this.uvMatrix.clampMargin}set clampMargin(t){this.uvMatrix.clampMargin=t,this.uvMatrix.update(!0)}get tileScale(){return this.tileTransform.scale}set tileScale(t){this.tileTransform.scale.copyFrom(t)}get tilePosition(){return this.tileTransform.position}set tilePosition(t){this.tileTransform.position.copyFrom(t)}_onTextureUpdate(){this.uvMatrix&&(this.uvMatrix.texture=this._texture),this._cachedTint=16777215}_render(t){const e=this._texture;!e||!e.valid||(this.tileTransform.updateLocalTransform(),this.uvMatrix.update(),t.batch.setObjectRenderer(t.plugins[this.pluginName]),t.plugins[this.pluginName].render(this))}_calculateBounds(){const t=this._width*-this._anchor._x,e=this._height*-this._anchor._y,i=this._width*(1-this._anchor._x),r=this._height*(1-this._anchor._y);this._bounds.addFrame(this.transform,t,e,i,r)}getLocalBounds(t){return this.children.length===0?(this._bounds.minX=this._width*-this._anchor._x,this._bounds.minY=this._height*-this._anchor._y,this._bounds.maxX=this._width*(1-this._anchor._x),this._bounds.maxY=this._height*(1-this._anchor._y),t||(this._localBoundsRect||(this._localBoundsRect=new d),t=this._localBoundsRect),this._bounds.getRectangle(t)):super.getLocalBounds.call(this,t)}containsPoint(t){this.worldTransform.applyInverse(t,s);const e=this._width,i=this._height,r=-e*this.anchor._x;if(s.x>=r&&s.x=a&&s.y{this.tileScale.set(e/this.texture.width)}),this.uvRespectAnchor=!0,this.anchor.y=1,this.x=-e/2,this.width=e}}class T extends g{_playing=!1;_autoUpdate=!1;_isConnectedToTicker=!1;_tickerUpdate=this.update.bind(this);_currentTime=0;_textures;_previousFrame=null;onComplete=null;onLoop=null;onFrameChange=null;animationSpeed=1;loop=!1;updateAnchor=!1;constructor(t,e){super(t[0],e),this.textures=t}stop(){this._playing&&(this._playing=!1,this._autoUpdate&&this._isConnectedToTicker&&(h.shared.remove(this._tickerUpdate),this._isConnectedToTicker=!1))}play(){this._playing||(this._playing=!0,this._autoUpdate&&!this._isConnectedToTicker&&(h.shared.add(this._tickerUpdate,this,m.HIGH),this._isConnectedToTicker=!0))}gotoAndStop(t){this.stop(),this.currentFrame=t}gotoAndPlay(t){this.currentFrame=t,this.play()}update(t){if(!this._playing)return;const e=this.animationSpeed*t,i=this.currentFrame;this._currentTime+=e,this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete?.()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete?.()):i!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFramei)&&this.onLoop(),this.updateTexture())}updateTexture(){const t=this.currentFrame;this._previousFrame!==t&&(this._previousFrame=t,this.texture=this._textures[t],this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this.uvs=this._texture._uvs.uvsFloat32,this.updateAnchor&&this._anchor.copyFrom(this._texture.defaultAnchor),this.onFrameChange?.(this.currentFrame))}destroy(t){this.stop(),super.destroy(t),this.onComplete=null,this.onFrameChange=null,this.onLoop=null}get totalFrames(){return this._textures?.length??0}get textures(){return this._textures??[]}set textures(t){this._textures=t,this._previousFrame=null,this.gotoAndStop(0),this.updateTexture()}get currentFrame(){let t=Math.floor(this._currentTime)%this._textures.length;return t<0&&(t+=this._textures.length),t}set currentFrame(t){if(t<0||t>this.totalFrames-1)throw new Error(`[AnimatedSprite]: Invalid frame index value ${t}, expected to be between 0 and totalFrames ${this.totalFrames}.`);const e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture()}get playing(){return this._playing}get autoUpdate(){return this._autoUpdate}set autoUpdate(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isConnectedToTicker?(h.shared.remove(this._tickerUpdate),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._playing&&(h.shared.add(this._tickerUpdate),this._isConnectedToTicker=!0))}}export{T as A,g as H,n as T}; diff --git a/NodeFileHandler-17f340e7.js b/NodeFileHandler-1495cd5b.js similarity index 77% rename from NodeFileHandler-17f340e7.js rename to NodeFileHandler-1495cd5b.js index 0bc72874..7fa778e9 100644 --- a/NodeFileHandler-17f340e7.js +++ b/NodeFileHandler-1495cd5b.js @@ -1,12 +1,12 @@ -import{a6 as Nr,a7 as Xr,g as ra,a8 as bi,a9 as na,aa as oi,ab as ai,p as ia}from"./ChartManager-f20da8bc.js";var dr={exports:{}};/** +import{a6 as Nr,a7 as Xr,g as ra,a8 as bi,a9 as na,aa as oi,ab as ai,W as ia}from"./ChartManager-3c3d6f39.js";var hr={exports:{}};/** * @license * web-streams-polyfill v3.3.3 * Copyright 2024 Mattias Buelens, Diwank Singh Tomer and other contributors. * This code is released under the MIT license. * SPDX-License-Identifier: MIT - */var si;function oa(){return si||(si=1,function(C,u){(function(p,m){m(u)})(Nr,function(p){function m(){}function _(e){return typeof e=="object"&&e!==null||typeof e=="function"}const R=m;function w(e,t){try{Object.defineProperty(e,"name",{value:t,configurable:!0})}catch{}}const c=Promise,G=Promise.prototype.then,X=Promise.reject.bind(c);function F(e){return new c(e)}function B(e){return F(t=>t(e))}function g(e){return X(e)}function E(e,t,i){return G.call(e,t,i)}function T(e,t,i){E(E(e,t,i),void 0,R)}function O(e,t){T(e,t)}function Y(e,t){T(e,void 0,t)}function j(e,t,i){return E(e,t,i)}function U(e){E(e,void 0,R)}let H=e=>{if(typeof queueMicrotask=="function")H=queueMicrotask;else{const t=B(void 0);H=i=>E(t,i)}return H(e)};function ee(e,t,i){if(typeof e!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(e,t,i)}function D(e,t,i){try{return B(ee(e,t,i))}catch(a){return g(a)}}const ft=16384;class te{constructor(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}get length(){return this._size}push(t){const i=this._back;let a=i;i._elements.length===ft-1&&(a={_elements:[],_next:void 0}),i._elements.push(t),a!==i&&(this._back=a,i._next=a),++this._size}shift(){const t=this._front;let i=t;const a=this._cursor;let l=a+1;const h=t._elements,b=h[a];return l===ft&&(i=t._next,l=0),--this._size,this._cursor=l,t!==i&&(this._front=i),h[a]=void 0,b}forEach(t){let i=this._cursor,a=this._front,l=a._elements;for(;(i!==l.length||a._next!==void 0)&&!(i===l.length&&(a=a._next,l=a._elements,i=0,l.length===0));)t(l[i]),++i}peek(){const t=this._front,i=this._cursor;return t._elements[i]}}const qt=Symbol("[[AbortSteps]]"),xt=Symbol("[[ErrorSteps]]"),ct=Symbol("[[CancelSteps]]"),dt=Symbol("[[PullSteps]]"),ht=Symbol("[[ReleaseSteps]]");function Wt(e,t){e._ownerReadableStream=t,t._reader=e,t._state==="readable"?pt(e):t._state==="closed"?br(e):vt(e,t._storedError)}function Ve(e,t){const i=e._ownerReadableStream;return pe(i,t)}function ue(e){const t=e._ownerReadableStream;t._state==="readable"?mt(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):Q(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),t._readableStreamController[ht](),t._reader=void 0,e._ownerReadableStream=void 0}function Ge(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function pt(e){e._closedPromise=F((t,i)=>{e._closedPromise_resolve=t,e._closedPromise_reject=i})}function vt(e,t){pt(e),mt(e,t)}function br(e){pt(e),J(e)}function mt(e,t){e._closedPromise_reject!==void 0&&(U(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}function Q(e,t){vt(e,t)}function J(e){e._closedPromise_resolve!==void 0&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}const bt=Number.isFinite||function(e){return typeof e=="number"&&isFinite(e)},kt=Math.trunc||function(e){return e<0?Math.ceil(e):Math.floor(e)};function Ot(e){return typeof e=="object"||typeof e=="function"}function ae(e,t){if(e!==void 0&&!Ot(e))throw new TypeError(`${t} is not an object.`)}function re(e,t){if(typeof e!="function")throw new TypeError(`${t} is not a function.`)}function Te(e){return typeof e=="object"&&e!==null||typeof e=="function"}function Xe(e,t){if(!Te(e))throw new TypeError(`${t} is not an object.`)}function le(e,t,i){if(e===void 0)throw new TypeError(`Parameter ${t} is required in '${i}'.`)}function yt(e,t,i){if(e===void 0)throw new TypeError(`${t} is required in '${i}'.`)}function Je(e){return Number(e)}function we(e){return e===0?0:e}function Oe(e){return we(kt(e))}function _t(e,t){const a=Number.MAX_SAFE_INTEGER;let l=Number(e);if(l=we(l),!bt(l))throw new TypeError(`${t} is not a finite number`);if(l=Oe(l),l<0||l>a)throw new TypeError(`${t} is outside the accepted range of 0 to ${a}, inclusive`);return!bt(l)||l===0?0:l}function wt(e,t){if(!qe(e))throw new TypeError(`${t} is not a ReadableStream.`)}function be(e){return new V(e)}function Dt(e,t){e._reader._readRequests.push(t)}function gt(e,t,i){const l=e._reader._readRequests.shift();i?l._closeSteps():l._chunkSteps(t)}function De(e){return e._reader._readRequests.length}function ze(e){const t=e._reader;return!(t===void 0||!fe(t))}class V{constructor(t){if(le(t,1,"ReadableStreamDefaultReader"),wt(t,"First parameter"),xe(t))throw new TypeError("This stream has already been locked for exclusive reading by another reader");Wt(this,t),this._readRequests=new te}get closed(){return fe(this)?this._closedPromise:g(o("closed"))}cancel(t=void 0){return fe(this)?this._ownerReadableStream===void 0?g(Ge("cancel")):Ve(this,t):g(o("cancel"))}read(){if(!fe(this))return g(o("read"));if(this._ownerReadableStream===void 0)return g(Ge("read from"));let t,i;const a=F((h,b)=>{t=h,i=b});return Me(this,{_chunkSteps:h=>t({value:h,done:!1}),_closeSteps:()=>t({value:void 0,done:!0}),_errorSteps:h=>i(h)}),a}releaseLock(){if(!fe(this))throw o("releaseLock");this._ownerReadableStream!==void 0&&ye(this)}}Object.defineProperties(V.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),w(V.prototype.cancel,"cancel"),w(V.prototype.read,"read"),w(V.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(V.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function fe(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_readRequests")?!1:e instanceof V}function Me(e,t){const i=e._ownerReadableStream;i._disturbed=!0,i._state==="closed"?t._closeSteps():i._state==="errored"?t._errorSteps(i._storedError):i._readableStreamController[dt](t)}function ye(e){ue(e);const t=new TypeError("Reader was released");zt(e,t)}function zt(e,t){const i=e._readRequests;e._readRequests=new te,i.forEach(a=>{a._errorSteps(t)})}function o(e){return new TypeError(`ReadableStreamDefaultReader.prototype.${e} can only be used on a ReadableStreamDefaultReader`)}const r=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class n{constructor(t,i){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=t,this._preventCancel=i}next(){const t=()=>this._nextSteps();return this._ongoingPromise=this._ongoingPromise?j(this._ongoingPromise,t,t):t(),this._ongoingPromise}return(t){const i=()=>this._returnSteps(t);return this._ongoingPromise?j(this._ongoingPromise,i,i):i()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});const t=this._reader;let i,a;const l=F((b,S)=>{i=b,a=S});return Me(t,{_chunkSteps:b=>{this._ongoingPromise=void 0,H(()=>i({value:b,done:!1}))},_closeSteps:()=>{this._ongoingPromise=void 0,this._isFinished=!0,ue(t),i({value:void 0,done:!0})},_errorSteps:b=>{this._ongoingPromise=void 0,this._isFinished=!0,ue(t),a(b)}}),l}_returnSteps(t){if(this._isFinished)return Promise.resolve({value:t,done:!0});this._isFinished=!0;const i=this._reader;if(!this._preventCancel){const a=Ve(i,t);return ue(i),j(a,()=>({value:t,done:!0}))}return ue(i),B({value:t,done:!0})}}const s={next(){return d(this)?this._asyncIteratorImpl.next():g(y("next"))},return(e){return d(this)?this._asyncIteratorImpl.return(e):g(y("return"))}};Object.setPrototypeOf(s,r);function f(e,t){const i=be(e),a=new n(i,t),l=Object.create(s);return l._asyncIteratorImpl=a,l}function d(e){if(!_(e)||!Object.prototype.hasOwnProperty.call(e,"_asyncIteratorImpl"))return!1;try{return e._asyncIteratorImpl instanceof n}catch{return!1}}function y(e){return new TypeError(`ReadableStreamAsyncIterator.${e} can only be used on a ReadableSteamAsyncIterator`)}const x=Number.isNaN||function(e){return e!==e};var L,z,$;function k(e){return e.slice()}function rn(e,t,i,a,l){new Uint8Array(e).set(new Uint8Array(i,a,l),t)}let ge=e=>(typeof e.transfer=="function"?ge=t=>t.transfer():typeof structuredClone=="function"?ge=t=>structuredClone(t,{transfer:[t]}):ge=t=>t,ge(e)),Pe=e=>(typeof e.detached=="boolean"?Pe=t=>t.detached:Pe=t=>t.byteLength===0,Pe(e));function nn(e,t,i){if(e.slice)return e.slice(t,i);const a=i-t,l=new ArrayBuffer(a);return rn(l,0,e,t,a),l}function Mt(e,t){const i=e[t];if(i!=null){if(typeof i!="function")throw new TypeError(`${String(t)} is not a function`);return i}}function gi(e){const t={[Symbol.iterator]:()=>e.iterator},i=async function*(){return yield*t}(),a=i.next;return{iterator:i,nextMethod:a,done:!1}}const yr=($=(L=Symbol.asyncIterator)!==null&&L!==void 0?L:(z=Symbol.for)===null||z===void 0?void 0:z.call(Symbol,"Symbol.asyncIterator"))!==null&&$!==void 0?$:"@@asyncIterator";function on(e,t="sync",i){if(i===void 0)if(t==="async"){if(i=Mt(e,yr),i===void 0){const h=Mt(e,Symbol.iterator),b=on(e,"sync",h);return gi(b)}}else i=Mt(e,Symbol.iterator);if(i===void 0)throw new TypeError("The object is not iterable");const a=ee(i,e,[]);if(!_(a))throw new TypeError("The iterator method must return an object");const l=a.next;return{iterator:a,nextMethod:l,done:!1}}function Si(e){const t=ee(e.nextMethod,e.iterator,[]);if(!_(t))throw new TypeError("The iterator.next() method must return an object");return t}function Ri(e){return!!e.done}function Ei(e){return e.value}function Ci(e){return!(typeof e!="number"||x(e)||e<0)}function an(e){const t=nn(e.buffer,e.byteOffset,e.byteOffset+e.byteLength);return new Uint8Array(t)}function _r(e){const t=e._queue.shift();return e._queueTotalSize-=t.size,e._queueTotalSize<0&&(e._queueTotalSize=0),t.value}function wr(e,t,i){if(!Ci(i)||i===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");e._queue.push({value:t,size:i}),e._queueTotalSize+=i}function Bi(e){return e._queue.peek().value}function Ae(e){e._queue=new te,e._queueTotalSize=0}function sn(e){return e===DataView}function Ti(e){return sn(e.constructor)}function Pi(e){return sn(e)?1:e.BYTES_PER_ELEMENT}class je{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!gr(this))throw Br("view");return this._view}respond(t){if(!gr(this))throw Br("respond");if(le(t,1,"respond"),t=_t(t,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");if(Pe(this._view.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be used as a response");$t(this._associatedReadableByteStreamController,t)}respondWithNewView(t){if(!gr(this))throw Br("respondWithNewView");if(le(t,1,"respondWithNewView"),!ArrayBuffer.isView(t))throw new TypeError("You can only respond with array buffer views");if(this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");if(Pe(t.buffer))throw new TypeError("The given view's buffer has been detached and so cannot be used as a response");Nt(this._associatedReadableByteStreamController,t)}}Object.defineProperties(je.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),w(je.prototype.respond,"respond"),w(je.prototype.respondWithNewView,"respondWithNewView"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(je.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class Se{constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!Ue(this))throw Rt("byobRequest");return Cr(this)}get desiredSize(){if(!Ue(this))throw Rt("desiredSize");return yn(this)}close(){if(!Ue(this))throw Rt("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");const t=this._controlledReadableByteStream._state;if(t!=="readable")throw new TypeError(`The stream (in ${t} state) is not in the readable state and cannot be closed`);St(this)}enqueue(t){if(!Ue(this))throw Rt("enqueue");if(le(t,1,"enqueue"),!ArrayBuffer.isView(t))throw new TypeError("chunk must be an array buffer view");if(t.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(t.buffer.byteLength===0)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");const i=this._controlledReadableByteStream._state;if(i!=="readable")throw new TypeError(`The stream (in ${i} state) is not in the readable state and cannot be enqueued to`);Lt(this,t)}error(t=void 0){if(!Ue(this))throw Rt("error");ce(this,t)}[ct](t){un(this),Ae(this);const i=this._cancelAlgorithm(t);return Ut(this),i}[dt](t){const i=this._controlledReadableByteStream;if(this._queueTotalSize>0){bn(this,t);return}const a=this._autoAllocateChunkSize;if(a!==void 0){let l;try{l=new ArrayBuffer(a)}catch(b){t._errorSteps(b);return}const h={buffer:l,bufferByteLength:a,byteOffset:0,byteLength:a,bytesFilled:0,minimumFill:1,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(h)}Dt(i,t),Le(this)}[ht](){if(this._pendingPullIntos.length>0){const t=this._pendingPullIntos.peek();t.readerType="none",this._pendingPullIntos=new te,this._pendingPullIntos.push(t)}}}Object.defineProperties(Se.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),w(Se.prototype.close,"close"),w(Se.prototype.enqueue,"enqueue"),w(Se.prototype.error,"error"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Se.prototype,Symbol.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function Ue(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")?!1:e instanceof Se}function gr(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")?!1:e instanceof je}function Le(e){if(!xi(e))return;if(e._pulling){e._pullAgain=!0;return}e._pulling=!0;const i=e._pullAlgorithm();T(i,()=>(e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,Le(e)),null),a=>(ce(e,a),null))}function un(e){Rr(e),e._pendingPullIntos=new te}function Sr(e,t){let i=!1;e._state==="closed"&&(i=!0);const a=ln(t);t.readerType==="default"?gt(e,a,i):zi(e,a,i)}function ln(e){const t=e.bytesFilled,i=e.elementSize;return new e.viewConstructor(e.buffer,e.byteOffset,t/i)}function jt(e,t,i,a){e._queue.push({buffer:t,byteOffset:i,byteLength:a}),e._queueTotalSize+=a}function fn(e,t,i,a){let l;try{l=nn(t,i,i+a)}catch(h){throw ce(e,h),h}jt(e,l,0,a)}function cn(e,t){t.bytesFilled>0&&fn(e,t.buffer,t.byteOffset,t.bytesFilled),Ze(e)}function dn(e,t){const i=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),a=t.bytesFilled+i;let l=i,h=!1;const b=a%t.elementSize,S=a-b;S>=t.minimumFill&&(l=S-t.bytesFilled,h=!0);const I=e._queue;for(;l>0;){const P=I.peek(),q=Math.min(l,P.byteLength),W=t.byteOffset+t.bytesFilled;rn(t.buffer,W,P.buffer,P.byteOffset,q),P.byteLength===q?I.shift():(P.byteOffset+=q,P.byteLength-=q),e._queueTotalSize-=q,hn(e,q,t),l-=q}return h}function hn(e,t,i){i.bytesFilled+=t}function pn(e){e._queueTotalSize===0&&e._closeRequested?(Ut(e),At(e._controlledReadableByteStream)):Le(e)}function Rr(e){e._byobRequest!==null&&(e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=null,e._byobRequest=null)}function Er(e){for(;e._pendingPullIntos.length>0;){if(e._queueTotalSize===0)return;const t=e._pendingPullIntos.peek();dn(e,t)&&(Ze(e),Sr(e._controlledReadableByteStream,t))}}function Ai(e){const t=e._controlledReadableByteStream._reader;for(;t._readRequests.length>0;){if(e._queueTotalSize===0)return;const i=t._readRequests.shift();bn(e,i)}}function Ii(e,t,i,a){const l=e._controlledReadableByteStream,h=t.constructor,b=Pi(h),{byteOffset:S,byteLength:I}=t,P=i*b;let q;try{q=ge(t.buffer)}catch(M){a._errorSteps(M);return}const W={buffer:q,bufferByteLength:q.byteLength,byteOffset:S,byteLength:I,bytesFilled:0,minimumFill:P,elementSize:b,viewConstructor:h,readerType:"byob"};if(e._pendingPullIntos.length>0){e._pendingPullIntos.push(W),gn(l,a);return}if(l._state==="closed"){const M=new h(W.buffer,W.byteOffset,0);a._closeSteps(M);return}if(e._queueTotalSize>0){if(dn(e,W)){const M=ln(W);pn(e),a._chunkSteps(M);return}if(e._closeRequested){const M=new TypeError("Insufficient bytes to fill elements in the given buffer");ce(e,M),a._errorSteps(M);return}}e._pendingPullIntos.push(W),gn(l,a),Le(e)}function Fi(e,t){t.readerType==="none"&&Ze(e);const i=e._controlledReadableByteStream;if(Tr(i))for(;Sn(i)>0;){const a=Ze(e);Sr(i,a)}}function qi(e,t,i){if(hn(e,t,i),i.readerType==="none"){cn(e,i),Er(e);return}if(i.bytesFilled0){const l=i.byteOffset+i.bytesFilled;fn(e,i.buffer,l-a,a)}i.bytesFilled-=a,Sr(e._controlledReadableByteStream,i),Er(e)}function mn(e,t){const i=e._pendingPullIntos.peek();Rr(e),e._controlledReadableByteStream._state==="closed"?Fi(e,i):qi(e,t,i),Le(e)}function Ze(e){return e._pendingPullIntos.shift()}function xi(e){const t=e._controlledReadableByteStream;return t._state!=="readable"||e._closeRequested||!e._started?!1:!!(ze(t)&&De(t)>0||Tr(t)&&Sn(t)>0||yn(e)>0)}function Ut(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0}function St(e){const t=e._controlledReadableByteStream;if(!(e._closeRequested||t._state!=="readable")){if(e._queueTotalSize>0){e._closeRequested=!0;return}if(e._pendingPullIntos.length>0){const i=e._pendingPullIntos.peek();if(i.bytesFilled%i.elementSize!==0){const a=new TypeError("Insufficient bytes to fill elements in the given buffer");throw ce(e,a),a}}Ut(e),At(t)}}function Lt(e,t){const i=e._controlledReadableByteStream;if(e._closeRequested||i._state!=="readable")return;const{buffer:a,byteOffset:l,byteLength:h}=t;if(Pe(a))throw new TypeError("chunk's buffer is detached and so cannot be enqueued");const b=ge(a);if(e._pendingPullIntos.length>0){const S=e._pendingPullIntos.peek();if(Pe(S.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be filled with an enqueued chunk");Rr(e),S.buffer=ge(S.buffer),S.readerType==="none"&&cn(e,S)}if(ze(i))if(Ai(e),De(i)===0)jt(e,b,l,h);else{e._pendingPullIntos.length>0&&Ze(e);const S=new Uint8Array(b,l,h);gt(i,S,!1)}else Tr(i)?(jt(e,b,l,h),Er(e)):jt(e,b,l,h);Le(e)}function ce(e,t){const i=e._controlledReadableByteStream;i._state==="readable"&&(un(e),Ae(e),Ut(e),Hn(i,t))}function bn(e,t){const i=e._queue.shift();e._queueTotalSize-=i.byteLength,pn(e);const a=new Uint8Array(i.buffer,i.byteOffset,i.byteLength);t._chunkSteps(a)}function Cr(e){if(e._byobRequest===null&&e._pendingPullIntos.length>0){const t=e._pendingPullIntos.peek(),i=new Uint8Array(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),a=Object.create(je.prototype);vi(a,e,i),e._byobRequest=a}return e._byobRequest}function yn(e){const t=e._controlledReadableByteStream._state;return t==="errored"?null:t==="closed"?0:e._strategyHWM-e._queueTotalSize}function $t(e,t){const i=e._pendingPullIntos.peek();if(e._controlledReadableByteStream._state==="closed"){if(t!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(t===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(i.bytesFilled+t>i.byteLength)throw new RangeError("bytesWritten out of range")}i.buffer=ge(i.buffer),mn(e,t)}function Nt(e,t){const i=e._pendingPullIntos.peek();if(e._controlledReadableByteStream._state==="closed"){if(t.byteLength!==0)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(t.byteLength===0)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(i.byteOffset+i.bytesFilled!==t.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(i.bufferByteLength!==t.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(i.bytesFilled+t.byteLength>i.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");const l=t.byteLength;i.buffer=ge(t.buffer),mn(e,l)}function _n(e,t,i,a,l,h,b){t._controlledReadableByteStream=e,t._pullAgain=!1,t._pulling=!1,t._byobRequest=null,t._queue=t._queueTotalSize=void 0,Ae(t),t._closeRequested=!1,t._started=!1,t._strategyHWM=h,t._pullAlgorithm=a,t._cancelAlgorithm=l,t._autoAllocateChunkSize=b,t._pendingPullIntos=new te,e._readableStreamController=t;const S=i();T(B(S),()=>(t._started=!0,Le(t),null),I=>(ce(t,I),null))}function Wi(e,t,i){const a=Object.create(Se.prototype);let l,h,b;t.start!==void 0?l=()=>t.start(a):l=()=>{},t.pull!==void 0?h=()=>t.pull(a):h=()=>B(void 0),t.cancel!==void 0?b=I=>t.cancel(I):b=()=>B(void 0);const S=t.autoAllocateChunkSize;if(S===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");_n(e,a,l,h,b,i,S)}function vi(e,t,i){e._associatedReadableByteStreamController=t,e._view=i}function Br(e){return new TypeError(`ReadableStreamBYOBRequest.prototype.${e} can only be used on a ReadableStreamBYOBRequest`)}function Rt(e){return new TypeError(`ReadableByteStreamController.prototype.${e} can only be used on a ReadableByteStreamController`)}function ki(e,t){ae(e,t);const i=e?.mode;return{mode:i===void 0?void 0:Oi(i,`${t} has member 'mode' that`)}}function Oi(e,t){if(e=`${e}`,e!=="byob")throw new TypeError(`${t} '${e}' is not a valid enumeration value for ReadableStreamReaderMode`);return e}function Di(e,t){var i;ae(e,t);const a=(i=e?.min)!==null&&i!==void 0?i:1;return{min:_t(a,`${t} has member 'min' that`)}}function wn(e){return new Ie(e)}function gn(e,t){e._reader._readIntoRequests.push(t)}function zi(e,t,i){const l=e._reader._readIntoRequests.shift();i?l._closeSteps(t):l._chunkSteps(t)}function Sn(e){return e._reader._readIntoRequests.length}function Tr(e){const t=e._reader;return!(t===void 0||!$e(t))}class Ie{constructor(t){if(le(t,1,"ReadableStreamBYOBReader"),wt(t,"First parameter"),xe(t))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!Ue(t._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");Wt(this,t),this._readIntoRequests=new te}get closed(){return $e(this)?this._closedPromise:g(Ht("closed"))}cancel(t=void 0){return $e(this)?this._ownerReadableStream===void 0?g(Ge("cancel")):Ve(this,t):g(Ht("cancel"))}read(t,i={}){if(!$e(this))return g(Ht("read"));if(!ArrayBuffer.isView(t))return g(new TypeError("view must be an array buffer view"));if(t.byteLength===0)return g(new TypeError("view must have non-zero byteLength"));if(t.buffer.byteLength===0)return g(new TypeError("view's buffer must have non-zero byteLength"));if(Pe(t.buffer))return g(new TypeError("view's buffer has been detached"));let a;try{a=Di(i,"options")}catch(P){return g(P)}const l=a.min;if(l===0)return g(new TypeError("options.min must be greater than 0"));if(Ti(t)){if(l>t.byteLength)return g(new RangeError("options.min must be less than or equal to view's byteLength"))}else if(l>t.length)return g(new RangeError("options.min must be less than or equal to view's length"));if(this._ownerReadableStream===void 0)return g(Ge("read from"));let h,b;const S=F((P,q)=>{h=P,b=q});return Rn(this,t,l,{_chunkSteps:P=>h({value:P,done:!1}),_closeSteps:P=>h({value:P,done:!0}),_errorSteps:P=>b(P)}),S}releaseLock(){if(!$e(this))throw Ht("releaseLock");this._ownerReadableStream!==void 0&&Mi(this)}}Object.defineProperties(Ie.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),w(Ie.prototype.cancel,"cancel"),w(Ie.prototype.read,"read"),w(Ie.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Ie.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function $e(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")?!1:e instanceof Ie}function Rn(e,t,i,a){const l=e._ownerReadableStream;l._disturbed=!0,l._state==="errored"?a._errorSteps(l._storedError):Ii(l._readableStreamController,t,i,a)}function Mi(e){ue(e);const t=new TypeError("Reader was released");En(e,t)}function En(e,t){const i=e._readIntoRequests;e._readIntoRequests=new te,i.forEach(a=>{a._errorSteps(t)})}function Ht(e){return new TypeError(`ReadableStreamBYOBReader.prototype.${e} can only be used on a ReadableStreamBYOBReader`)}function Et(e,t){const{highWaterMark:i}=e;if(i===void 0)return t;if(x(i)||i<0)throw new RangeError("Invalid highWaterMark");return i}function Yt(e){const{size:t}=e;return t||(()=>1)}function Qt(e,t){ae(e,t);const i=e?.highWaterMark,a=e?.size;return{highWaterMark:i===void 0?void 0:Je(i),size:a===void 0?void 0:ji(a,`${t} has member 'size' that`)}}function ji(e,t){return re(e,t),i=>Je(e(i))}function Ui(e,t){ae(e,t);const i=e?.abort,a=e?.close,l=e?.start,h=e?.type,b=e?.write;return{abort:i===void 0?void 0:Li(i,e,`${t} has member 'abort' that`),close:a===void 0?void 0:$i(a,e,`${t} has member 'close' that`),start:l===void 0?void 0:Ni(l,e,`${t} has member 'start' that`),write:b===void 0?void 0:Hi(b,e,`${t} has member 'write' that`),type:h}}function Li(e,t,i){return re(e,i),a=>D(e,t,[a])}function $i(e,t,i){return re(e,i),()=>D(e,t,[])}function Ni(e,t,i){return re(e,i),a=>ee(e,t,[a])}function Hi(e,t,i){return re(e,i),(a,l)=>D(e,t,[a,l])}function Cn(e,t){if(!Ke(e))throw new TypeError(`${t} is not a WritableStream.`)}function Yi(e){if(typeof e!="object"||e===null)return!1;try{return typeof e.aborted=="boolean"}catch{return!1}}const Qi=typeof AbortController=="function";function Vi(){if(Qi)return new AbortController}class Fe{constructor(t={},i={}){t===void 0?t=null:Xe(t,"First parameter");const a=Qt(i,"Second parameter"),l=Ui(t,"First parameter");if(Tn(this),l.type!==void 0)throw new RangeError("Invalid type is specified");const b=Yt(a),S=Et(a,1);uo(this,l,S,b)}get locked(){if(!Ke(this))throw Zt("locked");return et(this)}abort(t=void 0){return Ke(this)?et(this)?g(new TypeError("Cannot abort a stream that already has a writer")):Vt(this,t):g(Zt("abort"))}close(){return Ke(this)?et(this)?g(new TypeError("Cannot close a stream that already has a writer")):_e(this)?g(new TypeError("Cannot close an already-closing stream")):Pn(this):g(Zt("close"))}getWriter(){if(!Ke(this))throw Zt("getWriter");return Bn(this)}}Object.defineProperties(Fe.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),w(Fe.prototype.abort,"abort"),w(Fe.prototype.close,"close"),w(Fe.prototype.getWriter,"getWriter"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Fe.prototype,Symbol.toStringTag,{value:"WritableStream",configurable:!0});function Bn(e){return new Re(e)}function Gi(e,t,i,a,l=1,h=()=>1){const b=Object.create(Fe.prototype);Tn(b);const S=Object.create(tt.prototype);return Wn(b,S,e,t,i,a,l,h),b}function Tn(e){e._state="writable",e._storedError=void 0,e._writer=void 0,e._writableStreamController=void 0,e._writeRequests=new te,e._inFlightWriteRequest=void 0,e._closeRequest=void 0,e._inFlightCloseRequest=void 0,e._pendingAbortRequest=void 0,e._backpressure=!1}function Ke(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")?!1:e instanceof Fe}function et(e){return e._writer!==void 0}function Vt(e,t){var i;if(e._state==="closed"||e._state==="errored")return B(void 0);e._writableStreamController._abortReason=t,(i=e._writableStreamController._abortController)===null||i===void 0||i.abort(t);const a=e._state;if(a==="closed"||a==="errored")return B(void 0);if(e._pendingAbortRequest!==void 0)return e._pendingAbortRequest._promise;let l=!1;a==="erroring"&&(l=!0,t=void 0);const h=F((b,S)=>{e._pendingAbortRequest={_promise:void 0,_resolve:b,_reject:S,_reason:t,_wasAlreadyErroring:l}});return e._pendingAbortRequest._promise=h,l||Ar(e,t),h}function Pn(e){const t=e._state;if(t==="closed"||t==="errored")return g(new TypeError(`The stream (in ${t} state) is not in the writable state and cannot be closed`));const i=F((l,h)=>{const b={_resolve:l,_reject:h};e._closeRequest=b}),a=e._writer;return a!==void 0&&e._backpressure&&t==="writable"&&Or(a),lo(e._writableStreamController),i}function Xi(e){return F((i,a)=>{const l={_resolve:i,_reject:a};e._writeRequests.push(l)})}function Pr(e,t){if(e._state==="writable"){Ar(e,t);return}Ir(e)}function Ar(e,t){const i=e._writableStreamController;e._state="erroring",e._storedError=t;const a=e._writer;a!==void 0&&In(a,t),!to(e)&&i._started&&Ir(e)}function Ir(e){e._state="errored",e._writableStreamController[xt]();const t=e._storedError;if(e._writeRequests.forEach(l=>{l._reject(t)}),e._writeRequests=new te,e._pendingAbortRequest===void 0){Gt(e);return}const i=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,i._wasAlreadyErroring){i._reject(t),Gt(e);return}const a=e._writableStreamController[qt](i._reason);T(a,()=>(i._resolve(),Gt(e),null),l=>(i._reject(l),Gt(e),null))}function Ji(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}function Zi(e,t){e._inFlightWriteRequest._reject(t),e._inFlightWriteRequest=void 0,Pr(e,t)}function Ki(e){e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0,e._state==="erroring"&&(e._storedError=void 0,e._pendingAbortRequest!==void 0&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";const i=e._writer;i!==void 0&&Dn(i)}function eo(e,t){e._inFlightCloseRequest._reject(t),e._inFlightCloseRequest=void 0,e._pendingAbortRequest!==void 0&&(e._pendingAbortRequest._reject(t),e._pendingAbortRequest=void 0),Pr(e,t)}function _e(e){return!(e._closeRequest===void 0&&e._inFlightCloseRequest===void 0)}function to(e){return!(e._inFlightWriteRequest===void 0&&e._inFlightCloseRequest===void 0)}function ro(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0}function no(e){e._inFlightWriteRequest=e._writeRequests.shift()}function Gt(e){e._closeRequest!==void 0&&(e._closeRequest._reject(e._storedError),e._closeRequest=void 0);const t=e._writer;t!==void 0&&vr(t,e._storedError)}function Fr(e,t){const i=e._writer;i!==void 0&&t!==e._backpressure&&(t?yo(i):Or(i)),e._backpressure=t}class Re{constructor(t){if(le(t,1,"WritableStreamDefaultWriter"),Cn(t,"First parameter"),et(t))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=t,t._writer=this;const i=t._state;if(i==="writable")!_e(t)&&t._backpressure?er(this):zn(this),Kt(this);else if(i==="erroring")kr(this,t._storedError),Kt(this);else if(i==="closed")zn(this),mo(this);else{const a=t._storedError;kr(this,a),On(this,a)}}get closed(){return Ne(this)?this._closedPromise:g(He("closed"))}get desiredSize(){if(!Ne(this))throw He("desiredSize");if(this._ownerWritableStream===void 0)throw Bt("desiredSize");return so(this)}get ready(){return Ne(this)?this._readyPromise:g(He("ready"))}abort(t=void 0){return Ne(this)?this._ownerWritableStream===void 0?g(Bt("abort")):io(this,t):g(He("abort"))}close(){if(!Ne(this))return g(He("close"));const t=this._ownerWritableStream;return t===void 0?g(Bt("close")):_e(t)?g(new TypeError("Cannot close an already-closing stream")):An(this)}releaseLock(){if(!Ne(this))throw He("releaseLock");this._ownerWritableStream!==void 0&&Fn(this)}write(t=void 0){return Ne(this)?this._ownerWritableStream===void 0?g(Bt("write to")):qn(this,t):g(He("write"))}}Object.defineProperties(Re.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),w(Re.prototype.abort,"abort"),w(Re.prototype.close,"close"),w(Re.prototype.releaseLock,"releaseLock"),w(Re.prototype.write,"write"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Re.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function Ne(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")?!1:e instanceof Re}function io(e,t){const i=e._ownerWritableStream;return Vt(i,t)}function An(e){const t=e._ownerWritableStream;return Pn(t)}function oo(e){const t=e._ownerWritableStream,i=t._state;return _e(t)||i==="closed"?B(void 0):i==="errored"?g(t._storedError):An(e)}function ao(e,t){e._closedPromiseState==="pending"?vr(e,t):bo(e,t)}function In(e,t){e._readyPromiseState==="pending"?Mn(e,t):_o(e,t)}function so(e){const t=e._ownerWritableStream,i=t._state;return i==="errored"||i==="erroring"?null:i==="closed"?0:vn(t._writableStreamController)}function Fn(e){const t=e._ownerWritableStream,i=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");In(e,i),ao(e,i),t._writer=void 0,e._ownerWritableStream=void 0}function qn(e,t){const i=e._ownerWritableStream,a=i._writableStreamController,l=fo(a,t);if(i!==e._ownerWritableStream)return g(Bt("write to"));const h=i._state;if(h==="errored")return g(i._storedError);if(_e(i)||h==="closed")return g(new TypeError("The stream is closing or closed and cannot be written to"));if(h==="erroring")return g(i._storedError);const b=Xi(i);return co(a,t,l),b}const xn={};class tt{constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!qr(this))throw Wr("abortReason");return this._abortReason}get signal(){if(!qr(this))throw Wr("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(t=void 0){if(!qr(this))throw Wr("error");this._controlledWritableStream._state==="writable"&&kn(this,t)}[qt](t){const i=this._abortAlgorithm(t);return Xt(this),i}[xt](){Ae(this)}}Object.defineProperties(tt.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(tt.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function qr(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream")?!1:e instanceof tt}function Wn(e,t,i,a,l,h,b,S){t._controlledWritableStream=e,e._writableStreamController=t,t._queue=void 0,t._queueTotalSize=void 0,Ae(t),t._abortReason=void 0,t._abortController=Vi(),t._started=!1,t._strategySizeAlgorithm=S,t._strategyHWM=b,t._writeAlgorithm=a,t._closeAlgorithm=l,t._abortAlgorithm=h;const I=xr(t);Fr(e,I);const P=i(),q=B(P);T(q,()=>(t._started=!0,Jt(t),null),W=>(t._started=!0,Pr(e,W),null))}function uo(e,t,i,a){const l=Object.create(tt.prototype);let h,b,S,I;t.start!==void 0?h=()=>t.start(l):h=()=>{},t.write!==void 0?b=P=>t.write(P,l):b=()=>B(void 0),t.close!==void 0?S=()=>t.close():S=()=>B(void 0),t.abort!==void 0?I=P=>t.abort(P):I=()=>B(void 0),Wn(e,l,h,b,S,I,i,a)}function Xt(e){e._writeAlgorithm=void 0,e._closeAlgorithm=void 0,e._abortAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function lo(e){wr(e,xn,0),Jt(e)}function fo(e,t){try{return e._strategySizeAlgorithm(t)}catch(i){return Ct(e,i),1}}function vn(e){return e._strategyHWM-e._queueTotalSize}function co(e,t,i){try{wr(e,t,i)}catch(l){Ct(e,l);return}const a=e._controlledWritableStream;if(!_e(a)&&a._state==="writable"){const l=xr(e);Fr(a,l)}Jt(e)}function Jt(e){const t=e._controlledWritableStream;if(!e._started||t._inFlightWriteRequest!==void 0)return;if(t._state==="erroring"){Ir(t);return}if(e._queue.length===0)return;const a=Bi(e);a===xn?ho(e):po(e,a)}function Ct(e,t){e._controlledWritableStream._state==="writable"&&kn(e,t)}function ho(e){const t=e._controlledWritableStream;ro(t),_r(e);const i=e._closeAlgorithm();Xt(e),T(i,()=>(Ki(t),null),a=>(eo(t,a),null))}function po(e,t){const i=e._controlledWritableStream;no(i);const a=e._writeAlgorithm(t);T(a,()=>{Ji(i);const l=i._state;if(_r(e),!_e(i)&&l==="writable"){const h=xr(e);Fr(i,h)}return Jt(e),null},l=>(i._state==="writable"&&Xt(e),Zi(i,l),null))}function xr(e){return vn(e)<=0}function kn(e,t){const i=e._controlledWritableStream;Xt(e),Ar(i,t)}function Zt(e){return new TypeError(`WritableStream.prototype.${e} can only be used on a WritableStream`)}function Wr(e){return new TypeError(`WritableStreamDefaultController.prototype.${e} can only be used on a WritableStreamDefaultController`)}function He(e){return new TypeError(`WritableStreamDefaultWriter.prototype.${e} can only be used on a WritableStreamDefaultWriter`)}function Bt(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function Kt(e){e._closedPromise=F((t,i)=>{e._closedPromise_resolve=t,e._closedPromise_reject=i,e._closedPromiseState="pending"})}function On(e,t){Kt(e),vr(e,t)}function mo(e){Kt(e),Dn(e)}function vr(e,t){e._closedPromise_reject!==void 0&&(U(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected")}function bo(e,t){On(e,t)}function Dn(e){e._closedPromise_resolve!==void 0&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved")}function er(e){e._readyPromise=F((t,i)=>{e._readyPromise_resolve=t,e._readyPromise_reject=i}),e._readyPromiseState="pending"}function kr(e,t){er(e),Mn(e,t)}function zn(e){er(e),Or(e)}function Mn(e,t){e._readyPromise_reject!==void 0&&(U(e._readyPromise),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected")}function yo(e){er(e)}function _o(e,t){kr(e,t)}function Or(e){e._readyPromise_resolve!==void 0&&(e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled")}function wo(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof Nr<"u")return Nr}const Dr=wo();function go(e){if(!(typeof e=="function"||typeof e=="object")||e.name!=="DOMException")return!1;try{return new e,!0}catch{return!1}}function So(){const e=Dr?.DOMException;return go(e)?e:void 0}function Ro(){const e=function(i,a){this.message=i||"",this.name=a||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return w(e,"DOMException"),e.prototype=Object.create(Error.prototype),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,configurable:!0}),e}const Eo=So()||Ro();function jn(e,t,i,a,l,h){const b=be(e),S=Bn(t);e._disturbed=!0;let I=!1,P=B(void 0);return F((q,W)=>{let M;if(h!==void 0){if(M=()=>{const A=h.reason!==void 0?h.reason:new Eo("Aborted","AbortError"),v=[];a||v.push(()=>t._state==="writable"?Vt(t,A):B(void 0)),l||v.push(()=>e._state==="readable"?pe(e,A):B(void 0)),ie(()=>Promise.all(v.map(N=>N())),!0,A)},h.aborted){M();return}h.addEventListener("abort",M)}function me(){return F((A,v)=>{function N(se){se?A():E(ot(),N,v)}N(!1)})}function ot(){return I?B(!0):E(S._readyPromise,()=>F((A,v)=>{Me(b,{_chunkSteps:N=>{P=E(qn(S,N),void 0,m),A(!1)},_closeSteps:()=>A(!0),_errorSteps:v})}))}if(Ce(e,b._closedPromise,A=>(a?de(!0,A):ie(()=>Vt(t,A),!0,A),null)),Ce(t,S._closedPromise,A=>(l?de(!0,A):ie(()=>pe(e,A),!0,A),null)),ne(e,b._closedPromise,()=>(i?de():ie(()=>oo(S)),null)),_e(t)||t._state==="closed"){const A=new TypeError("the destination writable stream closed before all data could be piped to it");l?de(!0,A):ie(()=>pe(e,A),!0,A)}U(me());function ve(){const A=P;return E(P,()=>A!==P?ve():void 0)}function Ce(A,v,N){A._state==="errored"?N(A._storedError):Y(v,N)}function ne(A,v,N){A._state==="closed"?N():O(v,N)}function ie(A,v,N){if(I)return;I=!0,t._state==="writable"&&!_e(t)?O(ve(),se):se();function se(){return T(A(),()=>Be(v,N),at=>Be(!0,at)),null}}function de(A,v){I||(I=!0,t._state==="writable"&&!_e(t)?O(ve(),()=>Be(A,v)):Be(A,v))}function Be(A,v){return Fn(S),ue(b),h!==void 0&&h.removeEventListener("abort",M),A?W(v):q(void 0),null}})}class Ee{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!tr(this))throw nr("desiredSize");return zr(this)}close(){if(!tr(this))throw nr("close");if(!nt(this))throw new TypeError("The stream is not in a state that permits close");Ye(this)}enqueue(t=void 0){if(!tr(this))throw nr("enqueue");if(!nt(this))throw new TypeError("The stream is not in a state that permits enqueue");return rt(this,t)}error(t=void 0){if(!tr(this))throw nr("error");he(this,t)}[ct](t){Ae(this);const i=this._cancelAlgorithm(t);return rr(this),i}[dt](t){const i=this._controlledReadableStream;if(this._queue.length>0){const a=_r(this);this._closeRequested&&this._queue.length===0?(rr(this),At(i)):Tt(this),t._chunkSteps(a)}else Dt(i,t),Tt(this)}[ht](){}}Object.defineProperties(Ee.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),w(Ee.prototype.close,"close"),w(Ee.prototype.enqueue,"enqueue"),w(Ee.prototype.error,"error"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Ee.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function tr(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")?!1:e instanceof Ee}function Tt(e){if(!Un(e))return;if(e._pulling){e._pullAgain=!0;return}e._pulling=!0;const i=e._pullAlgorithm();T(i,()=>(e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,Tt(e)),null),a=>(he(e,a),null))}function Un(e){const t=e._controlledReadableStream;return!nt(e)||!e._started?!1:!!(xe(t)&&De(t)>0||zr(e)>0)}function rr(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Ye(e){if(!nt(e))return;const t=e._controlledReadableStream;e._closeRequested=!0,e._queue.length===0&&(rr(e),At(t))}function rt(e,t){if(!nt(e))return;const i=e._controlledReadableStream;if(xe(i)&&De(i)>0)gt(i,t,!1);else{let a;try{a=e._strategySizeAlgorithm(t)}catch(l){throw he(e,l),l}try{wr(e,t,a)}catch(l){throw he(e,l),l}}Tt(e)}function he(e,t){const i=e._controlledReadableStream;i._state==="readable"&&(Ae(e),rr(e),Hn(i,t))}function zr(e){const t=e._controlledReadableStream._state;return t==="errored"?null:t==="closed"?0:e._strategyHWM-e._queueTotalSize}function Co(e){return!Un(e)}function nt(e){const t=e._controlledReadableStream._state;return!e._closeRequested&&t==="readable"}function Ln(e,t,i,a,l,h,b){t._controlledReadableStream=e,t._queue=void 0,t._queueTotalSize=void 0,Ae(t),t._started=!1,t._closeRequested=!1,t._pullAgain=!1,t._pulling=!1,t._strategySizeAlgorithm=b,t._strategyHWM=h,t._pullAlgorithm=a,t._cancelAlgorithm=l,e._readableStreamController=t;const S=i();T(B(S),()=>(t._started=!0,Tt(t),null),I=>(he(t,I),null))}function Bo(e,t,i,a){const l=Object.create(Ee.prototype);let h,b,S;t.start!==void 0?h=()=>t.start(l):h=()=>{},t.pull!==void 0?b=()=>t.pull(l):b=()=>B(void 0),t.cancel!==void 0?S=I=>t.cancel(I):S=()=>B(void 0),Ln(e,l,h,b,S,i,a)}function nr(e){return new TypeError(`ReadableStreamDefaultController.prototype.${e} can only be used on a ReadableStreamDefaultController`)}function To(e,t){return Ue(e._readableStreamController)?Ao(e):Po(e)}function Po(e,t){const i=be(e);let a=!1,l=!1,h=!1,b=!1,S,I,P,q,W;const M=F(ne=>{W=ne});function me(){return a?(l=!0,B(void 0)):(a=!0,Me(i,{_chunkSteps:ie=>{H(()=>{l=!1;const de=ie,Be=ie;h||rt(P._readableStreamController,de),b||rt(q._readableStreamController,Be),a=!1,l&&me()})},_closeSteps:()=>{a=!1,h||Ye(P._readableStreamController),b||Ye(q._readableStreamController),(!h||!b)&&W(void 0)},_errorSteps:()=>{a=!1}}),B(void 0))}function ot(ne){if(h=!0,S=ne,b){const ie=k([S,I]),de=pe(e,ie);W(de)}return M}function ve(ne){if(b=!0,I=ne,h){const ie=k([S,I]),de=pe(e,ie);W(de)}return M}function Ce(){}return P=Pt(Ce,me,ot),q=Pt(Ce,me,ve),Y(i._closedPromise,ne=>(he(P._readableStreamController,ne),he(q._readableStreamController,ne),(!h||!b)&&W(void 0),null)),[P,q]}function Ao(e){let t=be(e),i=!1,a=!1,l=!1,h=!1,b=!1,S,I,P,q,W;const M=F(A=>{W=A});function me(A){Y(A._closedPromise,v=>(A!==t||(ce(P._readableStreamController,v),ce(q._readableStreamController,v),(!h||!b)&&W(void 0)),null))}function ot(){$e(t)&&(ue(t),t=be(e),me(t)),Me(t,{_chunkSteps:v=>{H(()=>{a=!1,l=!1;const N=v;let se=v;if(!h&&!b)try{se=an(v)}catch(at){ce(P._readableStreamController,at),ce(q._readableStreamController,at),W(pe(e,at));return}h||Lt(P._readableStreamController,N),b||Lt(q._readableStreamController,se),i=!1,a?Ce():l&&ne()})},_closeSteps:()=>{i=!1,h||St(P._readableStreamController),b||St(q._readableStreamController),P._readableStreamController._pendingPullIntos.length>0&&$t(P._readableStreamController,0),q._readableStreamController._pendingPullIntos.length>0&&$t(q._readableStreamController,0),(!h||!b)&&W(void 0)},_errorSteps:()=>{i=!1}})}function ve(A,v){fe(t)&&(ue(t),t=wn(e),me(t));const N=v?q:P,se=v?P:q;Rn(t,A,1,{_chunkSteps:st=>{H(()=>{a=!1,l=!1;const ut=v?b:h;if(v?h:b)ut||Nt(N._readableStreamController,st);else{let ii;try{ii=an(st)}catch($r){ce(N._readableStreamController,$r),ce(se._readableStreamController,$r),W(pe(e,$r));return}ut||Nt(N._readableStreamController,st),Lt(se._readableStreamController,ii)}i=!1,a?Ce():l&&ne()})},_closeSteps:st=>{i=!1;const ut=v?b:h,cr=v?h:b;ut||St(N._readableStreamController),cr||St(se._readableStreamController),st!==void 0&&(ut||Nt(N._readableStreamController,st),!cr&&se._readableStreamController._pendingPullIntos.length>0&&$t(se._readableStreamController,0)),(!ut||!cr)&&W(void 0)},_errorSteps:()=>{i=!1}})}function Ce(){if(i)return a=!0,B(void 0);i=!0;const A=Cr(P._readableStreamController);return A===null?ot():ve(A._view,!1),B(void 0)}function ne(){if(i)return l=!0,B(void 0);i=!0;const A=Cr(q._readableStreamController);return A===null?ot():ve(A._view,!0),B(void 0)}function ie(A){if(h=!0,S=A,b){const v=k([S,I]),N=pe(e,v);W(N)}return M}function de(A){if(b=!0,I=A,h){const v=k([S,I]),N=pe(e,v);W(N)}return M}function Be(){}return P=Nn(Be,Ce,ie),q=Nn(Be,ne,de),me(t),[P,q]}function Io(e){return _(e)&&typeof e.getReader<"u"}function Fo(e){return Io(e)?xo(e.getReader()):qo(e)}function qo(e){let t;const i=on(e,"async"),a=m;function l(){let b;try{b=Si(i)}catch(I){return g(I)}const S=B(b);return j(S,I=>{if(!_(I))throw new TypeError("The promise returned by the iterator.next() method must fulfill with an object");if(Ri(I))Ye(t._readableStreamController);else{const q=Ei(I);rt(t._readableStreamController,q)}})}function h(b){const S=i.iterator;let I;try{I=Mt(S,"return")}catch(W){return g(W)}if(I===void 0)return B(void 0);let P;try{P=ee(I,S,[b])}catch(W){return g(W)}const q=B(P);return j(q,W=>{if(!_(W))throw new TypeError("The promise returned by the iterator.return() method must fulfill with an object")})}return t=Pt(a,l,h,0),t}function xo(e){let t;const i=m;function a(){let h;try{h=e.read()}catch(b){return g(b)}return j(h,b=>{if(!_(b))throw new TypeError("The promise returned by the reader.read() method must fulfill with an object");if(b.done)Ye(t._readableStreamController);else{const S=b.value;rt(t._readableStreamController,S)}})}function l(h){try{return B(e.cancel(h))}catch(b){return g(b)}}return t=Pt(i,a,l,0),t}function Wo(e,t){ae(e,t);const i=e,a=i?.autoAllocateChunkSize,l=i?.cancel,h=i?.pull,b=i?.start,S=i?.type;return{autoAllocateChunkSize:a===void 0?void 0:_t(a,`${t} has member 'autoAllocateChunkSize' that`),cancel:l===void 0?void 0:vo(l,i,`${t} has member 'cancel' that`),pull:h===void 0?void 0:ko(h,i,`${t} has member 'pull' that`),start:b===void 0?void 0:Oo(b,i,`${t} has member 'start' that`),type:S===void 0?void 0:Do(S,`${t} has member 'type' that`)}}function vo(e,t,i){return re(e,i),a=>D(e,t,[a])}function ko(e,t,i){return re(e,i),a=>D(e,t,[a])}function Oo(e,t,i){return re(e,i),a=>ee(e,t,[a])}function Do(e,t){if(e=`${e}`,e!=="bytes")throw new TypeError(`${t} '${e}' is not a valid enumeration value for ReadableStreamType`);return e}function zo(e,t){return ae(e,t),{preventCancel:!!e?.preventCancel}}function $n(e,t){ae(e,t);const i=e?.preventAbort,a=e?.preventCancel,l=e?.preventClose,h=e?.signal;return h!==void 0&&Mo(h,`${t} has member 'signal' that`),{preventAbort:!!i,preventCancel:!!a,preventClose:!!l,signal:h}}function Mo(e,t){if(!Yi(e))throw new TypeError(`${t} is not an AbortSignal.`)}function jo(e,t){ae(e,t);const i=e?.readable;yt(i,"readable","ReadableWritablePair"),wt(i,`${t} has member 'readable' that`);const a=e?.writable;return yt(a,"writable","ReadableWritablePair"),Cn(a,`${t} has member 'writable' that`),{readable:i,writable:a}}class K{constructor(t={},i={}){t===void 0?t=null:Xe(t,"First parameter");const a=Qt(i,"Second parameter"),l=Wo(t,"First parameter");if(Mr(this),l.type==="bytes"){if(a.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");const h=Et(a,0);Wi(this,l,h)}else{const h=Yt(a),b=Et(a,1);Bo(this,l,b,h)}}get locked(){if(!qe(this))throw Qe("locked");return xe(this)}cancel(t=void 0){return qe(this)?xe(this)?g(new TypeError("Cannot cancel a stream that already has a reader")):pe(this,t):g(Qe("cancel"))}getReader(t=void 0){if(!qe(this))throw Qe("getReader");return ki(t,"First parameter").mode===void 0?be(this):wn(this)}pipeThrough(t,i={}){if(!qe(this))throw Qe("pipeThrough");le(t,1,"pipeThrough");const a=jo(t,"First parameter"),l=$n(i,"Second parameter");if(xe(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(et(a.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");const h=jn(this,a.writable,l.preventClose,l.preventAbort,l.preventCancel,l.signal);return U(h),a.readable}pipeTo(t,i={}){if(!qe(this))return g(Qe("pipeTo"));if(t===void 0)return g("Parameter 1 is required in 'pipeTo'.");if(!Ke(t))return g(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let a;try{a=$n(i,"Second parameter")}catch(l){return g(l)}return xe(this)?g(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):et(t)?g(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):jn(this,t,a.preventClose,a.preventAbort,a.preventCancel,a.signal)}tee(){if(!qe(this))throw Qe("tee");const t=To(this);return k(t)}values(t=void 0){if(!qe(this))throw Qe("values");const i=zo(t,"First parameter");return f(this,i.preventCancel)}[yr](t){return this.values(t)}static from(t){return Fo(t)}}Object.defineProperties(K,{from:{enumerable:!0}}),Object.defineProperties(K.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),w(K.from,"from"),w(K.prototype.cancel,"cancel"),w(K.prototype.getReader,"getReader"),w(K.prototype.pipeThrough,"pipeThrough"),w(K.prototype.pipeTo,"pipeTo"),w(K.prototype.tee,"tee"),w(K.prototype.values,"values"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(K.prototype,Symbol.toStringTag,{value:"ReadableStream",configurable:!0}),Object.defineProperty(K.prototype,yr,{value:K.prototype.values,writable:!0,configurable:!0});function Pt(e,t,i,a=1,l=()=>1){const h=Object.create(K.prototype);Mr(h);const b=Object.create(Ee.prototype);return Ln(h,b,e,t,i,a,l),h}function Nn(e,t,i){const a=Object.create(K.prototype);Mr(a);const l=Object.create(Se.prototype);return _n(a,l,e,t,i,0,void 0),a}function Mr(e){e._state="readable",e._reader=void 0,e._storedError=void 0,e._disturbed=!1}function qe(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")?!1:e instanceof K}function xe(e){return e._reader!==void 0}function pe(e,t){if(e._disturbed=!0,e._state==="closed")return B(void 0);if(e._state==="errored")return g(e._storedError);At(e);const i=e._reader;if(i!==void 0&&$e(i)){const l=i._readIntoRequests;i._readIntoRequests=new te,l.forEach(h=>{h._closeSteps(void 0)})}const a=e._readableStreamController[ct](t);return j(a,m)}function At(e){e._state="closed";const t=e._reader;if(t!==void 0&&(J(t),fe(t))){const i=t._readRequests;t._readRequests=new te,i.forEach(a=>{a._closeSteps()})}}function Hn(e,t){e._state="errored",e._storedError=t;const i=e._reader;i!==void 0&&(mt(i,t),fe(i)?zt(i,t):En(i,t))}function Qe(e){return new TypeError(`ReadableStream.prototype.${e} can only be used on a ReadableStream`)}function Yn(e,t){ae(e,t);const i=e?.highWaterMark;return yt(i,"highWaterMark","QueuingStrategyInit"),{highWaterMark:Je(i)}}const Qn=e=>e.byteLength;w(Qn,"size");class ir{constructor(t){le(t,1,"ByteLengthQueuingStrategy"),t=Yn(t,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=t.highWaterMark}get highWaterMark(){if(!Gn(this))throw Vn("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!Gn(this))throw Vn("size");return Qn}}Object.defineProperties(ir.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(ir.prototype,Symbol.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function Vn(e){return new TypeError(`ByteLengthQueuingStrategy.prototype.${e} can only be used on a ByteLengthQueuingStrategy`)}function Gn(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_byteLengthQueuingStrategyHighWaterMark")?!1:e instanceof ir}const Xn=()=>1;w(Xn,"size");class or{constructor(t){le(t,1,"CountQueuingStrategy"),t=Yn(t,"First parameter"),this._countQueuingStrategyHighWaterMark=t.highWaterMark}get highWaterMark(){if(!Zn(this))throw Jn("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!Zn(this))throw Jn("size");return Xn}}Object.defineProperties(or.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(or.prototype,Symbol.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function Jn(e){return new TypeError(`CountQueuingStrategy.prototype.${e} can only be used on a CountQueuingStrategy`)}function Zn(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_countQueuingStrategyHighWaterMark")?!1:e instanceof or}function Uo(e,t){ae(e,t);const i=e?.cancel,a=e?.flush,l=e?.readableType,h=e?.start,b=e?.transform,S=e?.writableType;return{cancel:i===void 0?void 0:Ho(i,e,`${t} has member 'cancel' that`),flush:a===void 0?void 0:Lo(a,e,`${t} has member 'flush' that`),readableType:l,start:h===void 0?void 0:$o(h,e,`${t} has member 'start' that`),transform:b===void 0?void 0:No(b,e,`${t} has member 'transform' that`),writableType:S}}function Lo(e,t,i){return re(e,i),a=>D(e,t,[a])}function $o(e,t,i){return re(e,i),a=>ee(e,t,[a])}function No(e,t,i){return re(e,i),(a,l)=>D(e,t,[a,l])}function Ho(e,t,i){return re(e,i),a=>D(e,t,[a])}class ar{constructor(t={},i={},a={}){t===void 0&&(t=null);const l=Qt(i,"Second parameter"),h=Qt(a,"Third parameter"),b=Uo(t,"First parameter");if(b.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(b.writableType!==void 0)throw new RangeError("Invalid writableType specified");const S=Et(h,0),I=Yt(h),P=Et(l,1),q=Yt(l);let W;const M=F(me=>{W=me});Yo(this,M,P,q,S,I),Vo(this,b),b.start!==void 0?W(b.start(this._transformStreamController)):W(void 0)}get readable(){if(!Kn(this))throw ni("readable");return this._readable}get writable(){if(!Kn(this))throw ni("writable");return this._writable}}Object.defineProperties(ar.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(ar.prototype,Symbol.toStringTag,{value:"TransformStream",configurable:!0});function Yo(e,t,i,a,l,h){function b(){return t}function S(M){return Jo(e,M)}function I(M){return Zo(e,M)}function P(){return Ko(e)}e._writable=Gi(b,S,P,I,i,a);function q(){return ea(e)}function W(M){return ta(e,M)}e._readable=Pt(b,q,W,l,h),e._backpressure=void 0,e._backpressureChangePromise=void 0,e._backpressureChangePromise_resolve=void 0,sr(e,!0),e._transformStreamController=void 0}function Kn(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")?!1:e instanceof ar}function ei(e,t){he(e._readable._readableStreamController,t),jr(e,t)}function jr(e,t){lr(e._transformStreamController),Ct(e._writable._writableStreamController,t),Ur(e)}function Ur(e){e._backpressure&&sr(e,!1)}function sr(e,t){e._backpressureChangePromise!==void 0&&e._backpressureChangePromise_resolve(),e._backpressureChangePromise=F(i=>{e._backpressureChangePromise_resolve=i}),e._backpressure=t}class We{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!ur(this))throw fr("desiredSize");const t=this._controlledTransformStream._readable._readableStreamController;return zr(t)}enqueue(t=void 0){if(!ur(this))throw fr("enqueue");ti(this,t)}error(t=void 0){if(!ur(this))throw fr("error");Go(this,t)}terminate(){if(!ur(this))throw fr("terminate");Xo(this)}}Object.defineProperties(We.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),w(We.prototype.enqueue,"enqueue"),w(We.prototype.error,"error"),w(We.prototype.terminate,"terminate"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(We.prototype,Symbol.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function ur(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")?!1:e instanceof We}function Qo(e,t,i,a,l){t._controlledTransformStream=e,e._transformStreamController=t,t._transformAlgorithm=i,t._flushAlgorithm=a,t._cancelAlgorithm=l,t._finishPromise=void 0,t._finishPromise_resolve=void 0,t._finishPromise_reject=void 0}function Vo(e,t){const i=Object.create(We.prototype);let a,l,h;t.transform!==void 0?a=b=>t.transform(b,i):a=b=>{try{return ti(i,b),B(void 0)}catch(S){return g(S)}},t.flush!==void 0?l=()=>t.flush(i):l=()=>B(void 0),t.cancel!==void 0?h=b=>t.cancel(b):h=()=>B(void 0),Qo(e,i,a,l,h)}function lr(e){e._transformAlgorithm=void 0,e._flushAlgorithm=void 0,e._cancelAlgorithm=void 0}function ti(e,t){const i=e._controlledTransformStream,a=i._readable._readableStreamController;if(!nt(a))throw new TypeError("Readable side is not in a state that permits enqueue");try{rt(a,t)}catch(h){throw jr(i,h),i._readable._storedError}Co(a)!==i._backpressure&&sr(i,!0)}function Go(e,t){ei(e._controlledTransformStream,t)}function ri(e,t){const i=e._transformAlgorithm(t);return j(i,void 0,a=>{throw ei(e._controlledTransformStream,a),a})}function Xo(e){const t=e._controlledTransformStream,i=t._readable._readableStreamController;Ye(i);const a=new TypeError("TransformStream terminated");jr(t,a)}function Jo(e,t){const i=e._transformStreamController;if(e._backpressure){const a=e._backpressureChangePromise;return j(a,()=>{const l=e._writable;if(l._state==="erroring")throw l._storedError;return ri(i,t)})}return ri(i,t)}function Zo(e,t){const i=e._transformStreamController;if(i._finishPromise!==void 0)return i._finishPromise;const a=e._readable;i._finishPromise=F((h,b)=>{i._finishPromise_resolve=h,i._finishPromise_reject=b});const l=i._cancelAlgorithm(t);return lr(i),T(l,()=>(a._state==="errored"?it(i,a._storedError):(he(a._readableStreamController,t),Lr(i)),null),h=>(he(a._readableStreamController,h),it(i,h),null)),i._finishPromise}function Ko(e){const t=e._transformStreamController;if(t._finishPromise!==void 0)return t._finishPromise;const i=e._readable;t._finishPromise=F((l,h)=>{t._finishPromise_resolve=l,t._finishPromise_reject=h});const a=t._flushAlgorithm();return lr(t),T(a,()=>(i._state==="errored"?it(t,i._storedError):(Ye(i._readableStreamController),Lr(t)),null),l=>(he(i._readableStreamController,l),it(t,l),null)),t._finishPromise}function ea(e){return sr(e,!1),e._backpressureChangePromise}function ta(e,t){const i=e._transformStreamController;if(i._finishPromise!==void 0)return i._finishPromise;const a=e._writable;i._finishPromise=F((h,b)=>{i._finishPromise_resolve=h,i._finishPromise_reject=b});const l=i._cancelAlgorithm(t);return lr(i),T(l,()=>(a._state==="errored"?it(i,a._storedError):(Ct(a._writableStreamController,t),Ur(e),Lr(i)),null),h=>(Ct(a._writableStreamController,h),Ur(e),it(i,h),null)),i._finishPromise}function fr(e){return new TypeError(`TransformStreamDefaultController.prototype.${e} can only be used on a TransformStreamDefaultController`)}function Lr(e){e._finishPromise_resolve!==void 0&&(e._finishPromise_resolve(),e._finishPromise_resolve=void 0,e._finishPromise_reject=void 0)}function it(e,t){e._finishPromise_reject!==void 0&&(U(e._finishPromise),e._finishPromise_reject(t),e._finishPromise_resolve=void 0,e._finishPromise_reject=void 0)}function ni(e){return new TypeError(`TransformStream.prototype.${e} can only be used on a TransformStream`)}p.ByteLengthQueuingStrategy=ir,p.CountQueuingStrategy=or,p.ReadableByteStreamController=Se,p.ReadableStream=K,p.ReadableStreamBYOBReader=Ie,p.ReadableStreamBYOBRequest=je,p.ReadableStreamDefaultController=Ee,p.ReadableStreamDefaultReader=V,p.TransformStream=ar,p.TransformStreamDefaultController=We,p.WritableStream=Fe,p.WritableStreamDefaultController=tt,p.WritableStreamDefaultWriter=Re})}(dr,dr.exports)),dr.exports}var Hr={},It={},ui;function aa(){if(ui)return It;ui=1,It.byteLength=c,It.toByteArray=X,It.fromByteArray=g;for(var C=[],u=[],p=typeof Uint8Array<"u"?Uint8Array:Array,m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_=0,R=m.length;_0)throw new Error("Invalid string. Length must be a multiple of 4");var O=E.indexOf("=");O===-1&&(O=T);var Y=O===T?0:4-O%4;return[O,Y]}function c(E){var T=w(E),O=T[0],Y=T[1];return(O+Y)*3/4-Y}function G(E,T,O){return(T+O)*3/4-O}function X(E){var T,O=w(E),Y=O[0],j=O[1],U=new p(G(E,Y,j)),H=0,ee=j>0?Y-4:Y,D;for(D=0;D>16&255,U[H++]=T>>8&255,U[H++]=T&255;return j===2&&(T=u[E.charCodeAt(D)]<<2|u[E.charCodeAt(D+1)]>>4,U[H++]=T&255),j===1&&(T=u[E.charCodeAt(D)]<<10|u[E.charCodeAt(D+1)]<<4|u[E.charCodeAt(D+2)]>>2,U[H++]=T>>8&255,U[H++]=T&255),U}function F(E){return C[E>>18&63]+C[E>>12&63]+C[E>>6&63]+C[E&63]}function B(E,T,O){for(var Y,j=[],U=T;Uee?ee:H+U));return Y===1?(T=E[O-1],j.push(C[T>>2]+C[T<<4&63]+"==")):Y===2&&(T=(E[O-2]<<8)+E[O-1],j.push(C[T>>10]+C[T>>4&63]+C[T<<2&63]+"=")),j.join("")}return It}var hr={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */var li;function sa(){return li||(li=1,hr.read=function(C,u,p,m,_){var R,w,c=_*8-m-1,G=(1<>1,F=-7,B=p?_-1:0,g=p?-1:1,E=C[u+B];for(B+=g,R=E&(1<<-F)-1,E>>=-F,F+=c;F>0;R=R*256+C[u+B],B+=g,F-=8);for(w=R&(1<<-F)-1,R>>=-F,F+=m;F>0;w=w*256+C[u+B],B+=g,F-=8);if(R===0)R=1-X;else{if(R===G)return w?NaN:(E?-1:1)*(1/0);w=w+Math.pow(2,m),R=R-X}return(E?-1:1)*w*Math.pow(2,R-m)},hr.write=function(C,u,p,m,_,R){var w,c,G,X=R*8-_-1,F=(1<>1,g=_===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=m?0:R-1,T=m?1:-1,O=u<0||u===0&&1/u<0?1:0;for(u=Math.abs(u),isNaN(u)||u===1/0?(c=isNaN(u)?1:0,w=F):(w=Math.floor(Math.log(u)/Math.LN2),u*(G=Math.pow(2,-w))<1&&(w--,G*=2),w+B>=1?u+=g/G:u+=g*Math.pow(2,1-B),u*G>=2&&(w++,G/=2),w+B>=F?(c=0,w=F):w+B>=1?(c=(u*G-1)*Math.pow(2,_),w=w+B):(c=u*Math.pow(2,B-1)*Math.pow(2,_),w=0));_>=8;C[p+E]=c&255,E+=T,c/=256,_-=8);for(w=w<<_|c,X+=_;X>0;C[p+E]=w&255,E+=T,w/=256,X-=8);C[p+E-T]|=O*128}),hr}/*! + */var si;function oa(){return si||(si=1,function(C,u){(function(m,p){p(u)})(Nr,function(m){function p(){}function w(e){return typeof e=="object"&&e!==null||typeof e=="function"}const R=p;function _(e,t){try{Object.defineProperty(e,"name",{value:t,configurable:!0})}catch{}}const c=Promise,G=Promise.prototype.then,X=Promise.reject.bind(c);function F(e){return new c(e)}function B(e){return F(t=>t(e))}function g(e){return X(e)}function E(e,t,i){return G.call(e,t,i)}function T(e,t,i){E(E(e,t,i),void 0,R)}function O(e,t){T(e,t)}function Y(e,t){T(e,void 0,t)}function j(e,t,i){return E(e,t,i)}function U(e){E(e,void 0,R)}let H=e=>{if(typeof queueMicrotask=="function")H=queueMicrotask;else{const t=B(void 0);H=i=>E(t,i)}return H(e)};function ee(e,t,i){if(typeof e!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(e,t,i)}function D(e,t,i){try{return B(ee(e,t,i))}catch(a){return g(a)}}const ft=16384;class te{constructor(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}get length(){return this._size}push(t){const i=this._back;let a=i;i._elements.length===ft-1&&(a={_elements:[],_next:void 0}),i._elements.push(t),a!==i&&(this._back=a,i._next=a),++this._size}shift(){const t=this._front;let i=t;const a=this._cursor;let l=a+1;const h=t._elements,b=h[a];return l===ft&&(i=t._next,l=0),--this._size,this._cursor=l,t!==i&&(this._front=i),h[a]=void 0,b}forEach(t){let i=this._cursor,a=this._front,l=a._elements;for(;(i!==l.length||a._next!==void 0)&&!(i===l.length&&(a=a._next,l=a._elements,i=0,l.length===0));)t(l[i]),++i}peek(){const t=this._front,i=this._cursor;return t._elements[i]}}const xt=Symbol("[[AbortSteps]]"),Wt=Symbol("[[ErrorSteps]]"),ct=Symbol("[[CancelSteps]]"),dt=Symbol("[[PullSteps]]"),ht=Symbol("[[ReleaseSteps]]");function vt(e,t){e._ownerReadableStream=t,t._reader=e,t._state==="readable"?pt(e):t._state==="closed"?br(e):kt(e,t._storedError)}function Ve(e,t){const i=e._ownerReadableStream;return pe(i,t)}function ue(e){const t=e._ownerReadableStream;t._state==="readable"?mt(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):Q(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),t._readableStreamController[ht](),t._reader=void 0,e._ownerReadableStream=void 0}function Ge(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function pt(e){e._closedPromise=F((t,i)=>{e._closedPromise_resolve=t,e._closedPromise_reject=i})}function kt(e,t){pt(e),mt(e,t)}function br(e){pt(e),J(e)}function mt(e,t){e._closedPromise_reject!==void 0&&(U(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}function Q(e,t){kt(e,t)}function J(e){e._closedPromise_resolve!==void 0&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}const bt=Number.isFinite||function(e){return typeof e=="number"&&isFinite(e)},Ot=Math.trunc||function(e){return e<0?Math.ceil(e):Math.floor(e)};function Dt(e){return typeof e=="object"||typeof e=="function"}function ae(e,t){if(e!==void 0&&!Dt(e))throw new TypeError(`${t} is not an object.`)}function re(e,t){if(typeof e!="function")throw new TypeError(`${t} is not a function.`)}function Te(e){return typeof e=="object"&&e!==null||typeof e=="function"}function Xe(e,t){if(!Te(e))throw new TypeError(`${t} is not an object.`)}function le(e,t,i){if(e===void 0)throw new TypeError(`Parameter ${t} is required in '${i}'.`)}function yt(e,t,i){if(e===void 0)throw new TypeError(`${t} is required in '${i}'.`)}function Je(e){return Number(e)}function we(e){return e===0?0:e}function Oe(e){return we(Ot(e))}function _t(e,t){const a=Number.MAX_SAFE_INTEGER;let l=Number(e);if(l=we(l),!bt(l))throw new TypeError(`${t} is not a finite number`);if(l=Oe(l),l<0||l>a)throw new TypeError(`${t} is outside the accepted range of 0 to ${a}, inclusive`);return!bt(l)||l===0?0:l}function wt(e,t){if(!qe(e))throw new TypeError(`${t} is not a ReadableStream.`)}function be(e){return new V(e)}function zt(e,t){e._reader._readRequests.push(t)}function gt(e,t,i){const l=e._reader._readRequests.shift();i?l._closeSteps():l._chunkSteps(t)}function De(e){return e._reader._readRequests.length}function ze(e){const t=e._reader;return!(t===void 0||!fe(t))}class V{constructor(t){if(le(t,1,"ReadableStreamDefaultReader"),wt(t,"First parameter"),xe(t))throw new TypeError("This stream has already been locked for exclusive reading by another reader");vt(this,t),this._readRequests=new te}get closed(){return fe(this)?this._closedPromise:g(o("closed"))}cancel(t=void 0){return fe(this)?this._ownerReadableStream===void 0?g(Ge("cancel")):Ve(this,t):g(o("cancel"))}read(){if(!fe(this))return g(o("read"));if(this._ownerReadableStream===void 0)return g(Ge("read from"));let t,i;const a=F((h,b)=>{t=h,i=b});return Me(this,{_chunkSteps:h=>t({value:h,done:!1}),_closeSteps:()=>t({value:void 0,done:!0}),_errorSteps:h=>i(h)}),a}releaseLock(){if(!fe(this))throw o("releaseLock");this._ownerReadableStream!==void 0&&ye(this)}}Object.defineProperties(V.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),_(V.prototype.cancel,"cancel"),_(V.prototype.read,"read"),_(V.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(V.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function fe(e){return!w(e)||!Object.prototype.hasOwnProperty.call(e,"_readRequests")?!1:e instanceof V}function Me(e,t){const i=e._ownerReadableStream;i._disturbed=!0,i._state==="closed"?t._closeSteps():i._state==="errored"?t._errorSteps(i._storedError):i._readableStreamController[dt](t)}function ye(e){ue(e);const t=new TypeError("Reader was released");Mt(e,t)}function Mt(e,t){const i=e._readRequests;e._readRequests=new te,i.forEach(a=>{a._errorSteps(t)})}function o(e){return new TypeError(`ReadableStreamDefaultReader.prototype.${e} can only be used on a ReadableStreamDefaultReader`)}const r=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class n{constructor(t,i){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=t,this._preventCancel=i}next(){const t=()=>this._nextSteps();return this._ongoingPromise=this._ongoingPromise?j(this._ongoingPromise,t,t):t(),this._ongoingPromise}return(t){const i=()=>this._returnSteps(t);return this._ongoingPromise?j(this._ongoingPromise,i,i):i()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});const t=this._reader;let i,a;const l=F((b,S)=>{i=b,a=S});return Me(t,{_chunkSteps:b=>{this._ongoingPromise=void 0,H(()=>i({value:b,done:!1}))},_closeSteps:()=>{this._ongoingPromise=void 0,this._isFinished=!0,ue(t),i({value:void 0,done:!0})},_errorSteps:b=>{this._ongoingPromise=void 0,this._isFinished=!0,ue(t),a(b)}}),l}_returnSteps(t){if(this._isFinished)return Promise.resolve({value:t,done:!0});this._isFinished=!0;const i=this._reader;if(!this._preventCancel){const a=Ve(i,t);return ue(i),j(a,()=>({value:t,done:!0}))}return ue(i),B({value:t,done:!0})}}const s={next(){return d(this)?this._asyncIteratorImpl.next():g(y("next"))},return(e){return d(this)?this._asyncIteratorImpl.return(e):g(y("return"))}};Object.setPrototypeOf(s,r);function f(e,t){const i=be(e),a=new n(i,t),l=Object.create(s);return l._asyncIteratorImpl=a,l}function d(e){if(!w(e)||!Object.prototype.hasOwnProperty.call(e,"_asyncIteratorImpl"))return!1;try{return e._asyncIteratorImpl instanceof n}catch{return!1}}function y(e){return new TypeError(`ReadableStreamAsyncIterator.${e} can only be used on a ReadableSteamAsyncIterator`)}const x=Number.isNaN||function(e){return e!==e};var L,z,$;function k(e){return e.slice()}function rn(e,t,i,a,l){new Uint8Array(e).set(new Uint8Array(i,a,l),t)}let ge=e=>(typeof e.transfer=="function"?ge=t=>t.transfer():typeof structuredClone=="function"?ge=t=>structuredClone(t,{transfer:[t]}):ge=t=>t,ge(e)),Pe=e=>(typeof e.detached=="boolean"?Pe=t=>t.detached:Pe=t=>t.byteLength===0,Pe(e));function nn(e,t,i){if(e.slice)return e.slice(t,i);const a=i-t,l=new ArrayBuffer(a);return rn(l,0,e,t,a),l}function jt(e,t){const i=e[t];if(i!=null){if(typeof i!="function")throw new TypeError(`${String(t)} is not a function`);return i}}function gi(e){const t={[Symbol.iterator]:()=>e.iterator},i=async function*(){return yield*t}(),a=i.next;return{iterator:i,nextMethod:a,done:!1}}const yr=($=(L=Symbol.asyncIterator)!==null&&L!==void 0?L:(z=Symbol.for)===null||z===void 0?void 0:z.call(Symbol,"Symbol.asyncIterator"))!==null&&$!==void 0?$:"@@asyncIterator";function on(e,t="sync",i){if(i===void 0)if(t==="async"){if(i=jt(e,yr),i===void 0){const h=jt(e,Symbol.iterator),b=on(e,"sync",h);return gi(b)}}else i=jt(e,Symbol.iterator);if(i===void 0)throw new TypeError("The object is not iterable");const a=ee(i,e,[]);if(!w(a))throw new TypeError("The iterator method must return an object");const l=a.next;return{iterator:a,nextMethod:l,done:!1}}function Si(e){const t=ee(e.nextMethod,e.iterator,[]);if(!w(t))throw new TypeError("The iterator.next() method must return an object");return t}function Ri(e){return!!e.done}function Ei(e){return e.value}function Ci(e){return!(typeof e!="number"||x(e)||e<0)}function an(e){const t=nn(e.buffer,e.byteOffset,e.byteOffset+e.byteLength);return new Uint8Array(t)}function _r(e){const t=e._queue.shift();return e._queueTotalSize-=t.size,e._queueTotalSize<0&&(e._queueTotalSize=0),t.value}function wr(e,t,i){if(!Ci(i)||i===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");e._queue.push({value:t,size:i}),e._queueTotalSize+=i}function Bi(e){return e._queue.peek().value}function Ae(e){e._queue=new te,e._queueTotalSize=0}function sn(e){return e===DataView}function Ti(e){return sn(e.constructor)}function Pi(e){return sn(e)?1:e.BYTES_PER_ELEMENT}class je{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!gr(this))throw Br("view");return this._view}respond(t){if(!gr(this))throw Br("respond");if(le(t,1,"respond"),t=_t(t,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");if(Pe(this._view.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be used as a response");Nt(this._associatedReadableByteStreamController,t)}respondWithNewView(t){if(!gr(this))throw Br("respondWithNewView");if(le(t,1,"respondWithNewView"),!ArrayBuffer.isView(t))throw new TypeError("You can only respond with array buffer views");if(this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");if(Pe(t.buffer))throw new TypeError("The given view's buffer has been detached and so cannot be used as a response");Ht(this._associatedReadableByteStreamController,t)}}Object.defineProperties(je.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),_(je.prototype.respond,"respond"),_(je.prototype.respondWithNewView,"respondWithNewView"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(je.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class Se{constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!Ue(this))throw Rt("byobRequest");return Cr(this)}get desiredSize(){if(!Ue(this))throw Rt("desiredSize");return yn(this)}close(){if(!Ue(this))throw Rt("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");const t=this._controlledReadableByteStream._state;if(t!=="readable")throw new TypeError(`The stream (in ${t} state) is not in the readable state and cannot be closed`);St(this)}enqueue(t){if(!Ue(this))throw Rt("enqueue");if(le(t,1,"enqueue"),!ArrayBuffer.isView(t))throw new TypeError("chunk must be an array buffer view");if(t.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(t.buffer.byteLength===0)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");const i=this._controlledReadableByteStream._state;if(i!=="readable")throw new TypeError(`The stream (in ${i} state) is not in the readable state and cannot be enqueued to`);$t(this,t)}error(t=void 0){if(!Ue(this))throw Rt("error");ce(this,t)}[ct](t){un(this),Ae(this);const i=this._cancelAlgorithm(t);return Lt(this),i}[dt](t){const i=this._controlledReadableByteStream;if(this._queueTotalSize>0){bn(this,t);return}const a=this._autoAllocateChunkSize;if(a!==void 0){let l;try{l=new ArrayBuffer(a)}catch(b){t._errorSteps(b);return}const h={buffer:l,bufferByteLength:a,byteOffset:0,byteLength:a,bytesFilled:0,minimumFill:1,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(h)}zt(i,t),Le(this)}[ht](){if(this._pendingPullIntos.length>0){const t=this._pendingPullIntos.peek();t.readerType="none",this._pendingPullIntos=new te,this._pendingPullIntos.push(t)}}}Object.defineProperties(Se.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),_(Se.prototype.close,"close"),_(Se.prototype.enqueue,"enqueue"),_(Se.prototype.error,"error"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Se.prototype,Symbol.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function Ue(e){return!w(e)||!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")?!1:e instanceof Se}function gr(e){return!w(e)||!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")?!1:e instanceof je}function Le(e){if(!xi(e))return;if(e._pulling){e._pullAgain=!0;return}e._pulling=!0;const i=e._pullAlgorithm();T(i,()=>(e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,Le(e)),null),a=>(ce(e,a),null))}function un(e){Rr(e),e._pendingPullIntos=new te}function Sr(e,t){let i=!1;e._state==="closed"&&(i=!0);const a=ln(t);t.readerType==="default"?gt(e,a,i):zi(e,a,i)}function ln(e){const t=e.bytesFilled,i=e.elementSize;return new e.viewConstructor(e.buffer,e.byteOffset,t/i)}function Ut(e,t,i,a){e._queue.push({buffer:t,byteOffset:i,byteLength:a}),e._queueTotalSize+=a}function fn(e,t,i,a){let l;try{l=nn(t,i,i+a)}catch(h){throw ce(e,h),h}Ut(e,l,0,a)}function cn(e,t){t.bytesFilled>0&&fn(e,t.buffer,t.byteOffset,t.bytesFilled),Ze(e)}function dn(e,t){const i=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),a=t.bytesFilled+i;let l=i,h=!1;const b=a%t.elementSize,S=a-b;S>=t.minimumFill&&(l=S-t.bytesFilled,h=!0);const I=e._queue;for(;l>0;){const P=I.peek(),q=Math.min(l,P.byteLength),W=t.byteOffset+t.bytesFilled;rn(t.buffer,W,P.buffer,P.byteOffset,q),P.byteLength===q?I.shift():(P.byteOffset+=q,P.byteLength-=q),e._queueTotalSize-=q,hn(e,q,t),l-=q}return h}function hn(e,t,i){i.bytesFilled+=t}function pn(e){e._queueTotalSize===0&&e._closeRequested?(Lt(e),At(e._controlledReadableByteStream)):Le(e)}function Rr(e){e._byobRequest!==null&&(e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=null,e._byobRequest=null)}function Er(e){for(;e._pendingPullIntos.length>0;){if(e._queueTotalSize===0)return;const t=e._pendingPullIntos.peek();dn(e,t)&&(Ze(e),Sr(e._controlledReadableByteStream,t))}}function Ai(e){const t=e._controlledReadableByteStream._reader;for(;t._readRequests.length>0;){if(e._queueTotalSize===0)return;const i=t._readRequests.shift();bn(e,i)}}function Ii(e,t,i,a){const l=e._controlledReadableByteStream,h=t.constructor,b=Pi(h),{byteOffset:S,byteLength:I}=t,P=i*b;let q;try{q=ge(t.buffer)}catch(M){a._errorSteps(M);return}const W={buffer:q,bufferByteLength:q.byteLength,byteOffset:S,byteLength:I,bytesFilled:0,minimumFill:P,elementSize:b,viewConstructor:h,readerType:"byob"};if(e._pendingPullIntos.length>0){e._pendingPullIntos.push(W),gn(l,a);return}if(l._state==="closed"){const M=new h(W.buffer,W.byteOffset,0);a._closeSteps(M);return}if(e._queueTotalSize>0){if(dn(e,W)){const M=ln(W);pn(e),a._chunkSteps(M);return}if(e._closeRequested){const M=new TypeError("Insufficient bytes to fill elements in the given buffer");ce(e,M),a._errorSteps(M);return}}e._pendingPullIntos.push(W),gn(l,a),Le(e)}function Fi(e,t){t.readerType==="none"&&Ze(e);const i=e._controlledReadableByteStream;if(Tr(i))for(;Sn(i)>0;){const a=Ze(e);Sr(i,a)}}function qi(e,t,i){if(hn(e,t,i),i.readerType==="none"){cn(e,i),Er(e);return}if(i.bytesFilled0){const l=i.byteOffset+i.bytesFilled;fn(e,i.buffer,l-a,a)}i.bytesFilled-=a,Sr(e._controlledReadableByteStream,i),Er(e)}function mn(e,t){const i=e._pendingPullIntos.peek();Rr(e),e._controlledReadableByteStream._state==="closed"?Fi(e,i):qi(e,t,i),Le(e)}function Ze(e){return e._pendingPullIntos.shift()}function xi(e){const t=e._controlledReadableByteStream;return t._state!=="readable"||e._closeRequested||!e._started?!1:!!(ze(t)&&De(t)>0||Tr(t)&&Sn(t)>0||yn(e)>0)}function Lt(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0}function St(e){const t=e._controlledReadableByteStream;if(!(e._closeRequested||t._state!=="readable")){if(e._queueTotalSize>0){e._closeRequested=!0;return}if(e._pendingPullIntos.length>0){const i=e._pendingPullIntos.peek();if(i.bytesFilled%i.elementSize!==0){const a=new TypeError("Insufficient bytes to fill elements in the given buffer");throw ce(e,a),a}}Lt(e),At(t)}}function $t(e,t){const i=e._controlledReadableByteStream;if(e._closeRequested||i._state!=="readable")return;const{buffer:a,byteOffset:l,byteLength:h}=t;if(Pe(a))throw new TypeError("chunk's buffer is detached and so cannot be enqueued");const b=ge(a);if(e._pendingPullIntos.length>0){const S=e._pendingPullIntos.peek();if(Pe(S.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be filled with an enqueued chunk");Rr(e),S.buffer=ge(S.buffer),S.readerType==="none"&&cn(e,S)}if(ze(i))if(Ai(e),De(i)===0)Ut(e,b,l,h);else{e._pendingPullIntos.length>0&&Ze(e);const S=new Uint8Array(b,l,h);gt(i,S,!1)}else Tr(i)?(Ut(e,b,l,h),Er(e)):Ut(e,b,l,h);Le(e)}function ce(e,t){const i=e._controlledReadableByteStream;i._state==="readable"&&(un(e),Ae(e),Lt(e),Hn(i,t))}function bn(e,t){const i=e._queue.shift();e._queueTotalSize-=i.byteLength,pn(e);const a=new Uint8Array(i.buffer,i.byteOffset,i.byteLength);t._chunkSteps(a)}function Cr(e){if(e._byobRequest===null&&e._pendingPullIntos.length>0){const t=e._pendingPullIntos.peek(),i=new Uint8Array(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),a=Object.create(je.prototype);vi(a,e,i),e._byobRequest=a}return e._byobRequest}function yn(e){const t=e._controlledReadableByteStream._state;return t==="errored"?null:t==="closed"?0:e._strategyHWM-e._queueTotalSize}function Nt(e,t){const i=e._pendingPullIntos.peek();if(e._controlledReadableByteStream._state==="closed"){if(t!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(t===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(i.bytesFilled+t>i.byteLength)throw new RangeError("bytesWritten out of range")}i.buffer=ge(i.buffer),mn(e,t)}function Ht(e,t){const i=e._pendingPullIntos.peek();if(e._controlledReadableByteStream._state==="closed"){if(t.byteLength!==0)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(t.byteLength===0)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(i.byteOffset+i.bytesFilled!==t.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(i.bufferByteLength!==t.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(i.bytesFilled+t.byteLength>i.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");const l=t.byteLength;i.buffer=ge(t.buffer),mn(e,l)}function _n(e,t,i,a,l,h,b){t._controlledReadableByteStream=e,t._pullAgain=!1,t._pulling=!1,t._byobRequest=null,t._queue=t._queueTotalSize=void 0,Ae(t),t._closeRequested=!1,t._started=!1,t._strategyHWM=h,t._pullAlgorithm=a,t._cancelAlgorithm=l,t._autoAllocateChunkSize=b,t._pendingPullIntos=new te,e._readableStreamController=t;const S=i();T(B(S),()=>(t._started=!0,Le(t),null),I=>(ce(t,I),null))}function Wi(e,t,i){const a=Object.create(Se.prototype);let l,h,b;t.start!==void 0?l=()=>t.start(a):l=()=>{},t.pull!==void 0?h=()=>t.pull(a):h=()=>B(void 0),t.cancel!==void 0?b=I=>t.cancel(I):b=()=>B(void 0);const S=t.autoAllocateChunkSize;if(S===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");_n(e,a,l,h,b,i,S)}function vi(e,t,i){e._associatedReadableByteStreamController=t,e._view=i}function Br(e){return new TypeError(`ReadableStreamBYOBRequest.prototype.${e} can only be used on a ReadableStreamBYOBRequest`)}function Rt(e){return new TypeError(`ReadableByteStreamController.prototype.${e} can only be used on a ReadableByteStreamController`)}function ki(e,t){ae(e,t);const i=e?.mode;return{mode:i===void 0?void 0:Oi(i,`${t} has member 'mode' that`)}}function Oi(e,t){if(e=`${e}`,e!=="byob")throw new TypeError(`${t} '${e}' is not a valid enumeration value for ReadableStreamReaderMode`);return e}function Di(e,t){var i;ae(e,t);const a=(i=e?.min)!==null&&i!==void 0?i:1;return{min:_t(a,`${t} has member 'min' that`)}}function wn(e){return new Ie(e)}function gn(e,t){e._reader._readIntoRequests.push(t)}function zi(e,t,i){const l=e._reader._readIntoRequests.shift();i?l._closeSteps(t):l._chunkSteps(t)}function Sn(e){return e._reader._readIntoRequests.length}function Tr(e){const t=e._reader;return!(t===void 0||!$e(t))}class Ie{constructor(t){if(le(t,1,"ReadableStreamBYOBReader"),wt(t,"First parameter"),xe(t))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!Ue(t._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");vt(this,t),this._readIntoRequests=new te}get closed(){return $e(this)?this._closedPromise:g(Yt("closed"))}cancel(t=void 0){return $e(this)?this._ownerReadableStream===void 0?g(Ge("cancel")):Ve(this,t):g(Yt("cancel"))}read(t,i={}){if(!$e(this))return g(Yt("read"));if(!ArrayBuffer.isView(t))return g(new TypeError("view must be an array buffer view"));if(t.byteLength===0)return g(new TypeError("view must have non-zero byteLength"));if(t.buffer.byteLength===0)return g(new TypeError("view's buffer must have non-zero byteLength"));if(Pe(t.buffer))return g(new TypeError("view's buffer has been detached"));let a;try{a=Di(i,"options")}catch(P){return g(P)}const l=a.min;if(l===0)return g(new TypeError("options.min must be greater than 0"));if(Ti(t)){if(l>t.byteLength)return g(new RangeError("options.min must be less than or equal to view's byteLength"))}else if(l>t.length)return g(new RangeError("options.min must be less than or equal to view's length"));if(this._ownerReadableStream===void 0)return g(Ge("read from"));let h,b;const S=F((P,q)=>{h=P,b=q});return Rn(this,t,l,{_chunkSteps:P=>h({value:P,done:!1}),_closeSteps:P=>h({value:P,done:!0}),_errorSteps:P=>b(P)}),S}releaseLock(){if(!$e(this))throw Yt("releaseLock");this._ownerReadableStream!==void 0&&Mi(this)}}Object.defineProperties(Ie.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),_(Ie.prototype.cancel,"cancel"),_(Ie.prototype.read,"read"),_(Ie.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Ie.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function $e(e){return!w(e)||!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")?!1:e instanceof Ie}function Rn(e,t,i,a){const l=e._ownerReadableStream;l._disturbed=!0,l._state==="errored"?a._errorSteps(l._storedError):Ii(l._readableStreamController,t,i,a)}function Mi(e){ue(e);const t=new TypeError("Reader was released");En(e,t)}function En(e,t){const i=e._readIntoRequests;e._readIntoRequests=new te,i.forEach(a=>{a._errorSteps(t)})}function Yt(e){return new TypeError(`ReadableStreamBYOBReader.prototype.${e} can only be used on a ReadableStreamBYOBReader`)}function Et(e,t){const{highWaterMark:i}=e;if(i===void 0)return t;if(x(i)||i<0)throw new RangeError("Invalid highWaterMark");return i}function Qt(e){const{size:t}=e;return t||(()=>1)}function Vt(e,t){ae(e,t);const i=e?.highWaterMark,a=e?.size;return{highWaterMark:i===void 0?void 0:Je(i),size:a===void 0?void 0:ji(a,`${t} has member 'size' that`)}}function ji(e,t){return re(e,t),i=>Je(e(i))}function Ui(e,t){ae(e,t);const i=e?.abort,a=e?.close,l=e?.start,h=e?.type,b=e?.write;return{abort:i===void 0?void 0:Li(i,e,`${t} has member 'abort' that`),close:a===void 0?void 0:$i(a,e,`${t} has member 'close' that`),start:l===void 0?void 0:Ni(l,e,`${t} has member 'start' that`),write:b===void 0?void 0:Hi(b,e,`${t} has member 'write' that`),type:h}}function Li(e,t,i){return re(e,i),a=>D(e,t,[a])}function $i(e,t,i){return re(e,i),()=>D(e,t,[])}function Ni(e,t,i){return re(e,i),a=>ee(e,t,[a])}function Hi(e,t,i){return re(e,i),(a,l)=>D(e,t,[a,l])}function Cn(e,t){if(!Ke(e))throw new TypeError(`${t} is not a WritableStream.`)}function Yi(e){if(typeof e!="object"||e===null)return!1;try{return typeof e.aborted=="boolean"}catch{return!1}}const Qi=typeof AbortController=="function";function Vi(){if(Qi)return new AbortController}class Fe{constructor(t={},i={}){t===void 0?t=null:Xe(t,"First parameter");const a=Vt(i,"Second parameter"),l=Ui(t,"First parameter");if(Tn(this),l.type!==void 0)throw new RangeError("Invalid type is specified");const b=Qt(a),S=Et(a,1);uo(this,l,S,b)}get locked(){if(!Ke(this))throw Kt("locked");return et(this)}abort(t=void 0){return Ke(this)?et(this)?g(new TypeError("Cannot abort a stream that already has a writer")):Gt(this,t):g(Kt("abort"))}close(){return Ke(this)?et(this)?g(new TypeError("Cannot close a stream that already has a writer")):_e(this)?g(new TypeError("Cannot close an already-closing stream")):Pn(this):g(Kt("close"))}getWriter(){if(!Ke(this))throw Kt("getWriter");return Bn(this)}}Object.defineProperties(Fe.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),_(Fe.prototype.abort,"abort"),_(Fe.prototype.close,"close"),_(Fe.prototype.getWriter,"getWriter"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Fe.prototype,Symbol.toStringTag,{value:"WritableStream",configurable:!0});function Bn(e){return new Re(e)}function Gi(e,t,i,a,l=1,h=()=>1){const b=Object.create(Fe.prototype);Tn(b);const S=Object.create(tt.prototype);return Wn(b,S,e,t,i,a,l,h),b}function Tn(e){e._state="writable",e._storedError=void 0,e._writer=void 0,e._writableStreamController=void 0,e._writeRequests=new te,e._inFlightWriteRequest=void 0,e._closeRequest=void 0,e._inFlightCloseRequest=void 0,e._pendingAbortRequest=void 0,e._backpressure=!1}function Ke(e){return!w(e)||!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")?!1:e instanceof Fe}function et(e){return e._writer!==void 0}function Gt(e,t){var i;if(e._state==="closed"||e._state==="errored")return B(void 0);e._writableStreamController._abortReason=t,(i=e._writableStreamController._abortController)===null||i===void 0||i.abort(t);const a=e._state;if(a==="closed"||a==="errored")return B(void 0);if(e._pendingAbortRequest!==void 0)return e._pendingAbortRequest._promise;let l=!1;a==="erroring"&&(l=!0,t=void 0);const h=F((b,S)=>{e._pendingAbortRequest={_promise:void 0,_resolve:b,_reject:S,_reason:t,_wasAlreadyErroring:l}});return e._pendingAbortRequest._promise=h,l||Ar(e,t),h}function Pn(e){const t=e._state;if(t==="closed"||t==="errored")return g(new TypeError(`The stream (in ${t} state) is not in the writable state and cannot be closed`));const i=F((l,h)=>{const b={_resolve:l,_reject:h};e._closeRequest=b}),a=e._writer;return a!==void 0&&e._backpressure&&t==="writable"&&Or(a),lo(e._writableStreamController),i}function Xi(e){return F((i,a)=>{const l={_resolve:i,_reject:a};e._writeRequests.push(l)})}function Pr(e,t){if(e._state==="writable"){Ar(e,t);return}Ir(e)}function Ar(e,t){const i=e._writableStreamController;e._state="erroring",e._storedError=t;const a=e._writer;a!==void 0&&In(a,t),!to(e)&&i._started&&Ir(e)}function Ir(e){e._state="errored",e._writableStreamController[Wt]();const t=e._storedError;if(e._writeRequests.forEach(l=>{l._reject(t)}),e._writeRequests=new te,e._pendingAbortRequest===void 0){Xt(e);return}const i=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,i._wasAlreadyErroring){i._reject(t),Xt(e);return}const a=e._writableStreamController[xt](i._reason);T(a,()=>(i._resolve(),Xt(e),null),l=>(i._reject(l),Xt(e),null))}function Ji(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}function Zi(e,t){e._inFlightWriteRequest._reject(t),e._inFlightWriteRequest=void 0,Pr(e,t)}function Ki(e){e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0,e._state==="erroring"&&(e._storedError=void 0,e._pendingAbortRequest!==void 0&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";const i=e._writer;i!==void 0&&Dn(i)}function eo(e,t){e._inFlightCloseRequest._reject(t),e._inFlightCloseRequest=void 0,e._pendingAbortRequest!==void 0&&(e._pendingAbortRequest._reject(t),e._pendingAbortRequest=void 0),Pr(e,t)}function _e(e){return!(e._closeRequest===void 0&&e._inFlightCloseRequest===void 0)}function to(e){return!(e._inFlightWriteRequest===void 0&&e._inFlightCloseRequest===void 0)}function ro(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0}function no(e){e._inFlightWriteRequest=e._writeRequests.shift()}function Xt(e){e._closeRequest!==void 0&&(e._closeRequest._reject(e._storedError),e._closeRequest=void 0);const t=e._writer;t!==void 0&&vr(t,e._storedError)}function Fr(e,t){const i=e._writer;i!==void 0&&t!==e._backpressure&&(t?yo(i):Or(i)),e._backpressure=t}class Re{constructor(t){if(le(t,1,"WritableStreamDefaultWriter"),Cn(t,"First parameter"),et(t))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=t,t._writer=this;const i=t._state;if(i==="writable")!_e(t)&&t._backpressure?tr(this):zn(this),er(this);else if(i==="erroring")kr(this,t._storedError),er(this);else if(i==="closed")zn(this),mo(this);else{const a=t._storedError;kr(this,a),On(this,a)}}get closed(){return Ne(this)?this._closedPromise:g(He("closed"))}get desiredSize(){if(!Ne(this))throw He("desiredSize");if(this._ownerWritableStream===void 0)throw Bt("desiredSize");return so(this)}get ready(){return Ne(this)?this._readyPromise:g(He("ready"))}abort(t=void 0){return Ne(this)?this._ownerWritableStream===void 0?g(Bt("abort")):io(this,t):g(He("abort"))}close(){if(!Ne(this))return g(He("close"));const t=this._ownerWritableStream;return t===void 0?g(Bt("close")):_e(t)?g(new TypeError("Cannot close an already-closing stream")):An(this)}releaseLock(){if(!Ne(this))throw He("releaseLock");this._ownerWritableStream!==void 0&&Fn(this)}write(t=void 0){return Ne(this)?this._ownerWritableStream===void 0?g(Bt("write to")):qn(this,t):g(He("write"))}}Object.defineProperties(Re.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),_(Re.prototype.abort,"abort"),_(Re.prototype.close,"close"),_(Re.prototype.releaseLock,"releaseLock"),_(Re.prototype.write,"write"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Re.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function Ne(e){return!w(e)||!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")?!1:e instanceof Re}function io(e,t){const i=e._ownerWritableStream;return Gt(i,t)}function An(e){const t=e._ownerWritableStream;return Pn(t)}function oo(e){const t=e._ownerWritableStream,i=t._state;return _e(t)||i==="closed"?B(void 0):i==="errored"?g(t._storedError):An(e)}function ao(e,t){e._closedPromiseState==="pending"?vr(e,t):bo(e,t)}function In(e,t){e._readyPromiseState==="pending"?Mn(e,t):_o(e,t)}function so(e){const t=e._ownerWritableStream,i=t._state;return i==="errored"||i==="erroring"?null:i==="closed"?0:vn(t._writableStreamController)}function Fn(e){const t=e._ownerWritableStream,i=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");In(e,i),ao(e,i),t._writer=void 0,e._ownerWritableStream=void 0}function qn(e,t){const i=e._ownerWritableStream,a=i._writableStreamController,l=fo(a,t);if(i!==e._ownerWritableStream)return g(Bt("write to"));const h=i._state;if(h==="errored")return g(i._storedError);if(_e(i)||h==="closed")return g(new TypeError("The stream is closing or closed and cannot be written to"));if(h==="erroring")return g(i._storedError);const b=Xi(i);return co(a,t,l),b}const xn={};class tt{constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!qr(this))throw Wr("abortReason");return this._abortReason}get signal(){if(!qr(this))throw Wr("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(t=void 0){if(!qr(this))throw Wr("error");this._controlledWritableStream._state==="writable"&&kn(this,t)}[xt](t){const i=this._abortAlgorithm(t);return Jt(this),i}[Wt](){Ae(this)}}Object.defineProperties(tt.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(tt.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function qr(e){return!w(e)||!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream")?!1:e instanceof tt}function Wn(e,t,i,a,l,h,b,S){t._controlledWritableStream=e,e._writableStreamController=t,t._queue=void 0,t._queueTotalSize=void 0,Ae(t),t._abortReason=void 0,t._abortController=Vi(),t._started=!1,t._strategySizeAlgorithm=S,t._strategyHWM=b,t._writeAlgorithm=a,t._closeAlgorithm=l,t._abortAlgorithm=h;const I=xr(t);Fr(e,I);const P=i(),q=B(P);T(q,()=>(t._started=!0,Zt(t),null),W=>(t._started=!0,Pr(e,W),null))}function uo(e,t,i,a){const l=Object.create(tt.prototype);let h,b,S,I;t.start!==void 0?h=()=>t.start(l):h=()=>{},t.write!==void 0?b=P=>t.write(P,l):b=()=>B(void 0),t.close!==void 0?S=()=>t.close():S=()=>B(void 0),t.abort!==void 0?I=P=>t.abort(P):I=()=>B(void 0),Wn(e,l,h,b,S,I,i,a)}function Jt(e){e._writeAlgorithm=void 0,e._closeAlgorithm=void 0,e._abortAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function lo(e){wr(e,xn,0),Zt(e)}function fo(e,t){try{return e._strategySizeAlgorithm(t)}catch(i){return Ct(e,i),1}}function vn(e){return e._strategyHWM-e._queueTotalSize}function co(e,t,i){try{wr(e,t,i)}catch(l){Ct(e,l);return}const a=e._controlledWritableStream;if(!_e(a)&&a._state==="writable"){const l=xr(e);Fr(a,l)}Zt(e)}function Zt(e){const t=e._controlledWritableStream;if(!e._started||t._inFlightWriteRequest!==void 0)return;if(t._state==="erroring"){Ir(t);return}if(e._queue.length===0)return;const a=Bi(e);a===xn?ho(e):po(e,a)}function Ct(e,t){e._controlledWritableStream._state==="writable"&&kn(e,t)}function ho(e){const t=e._controlledWritableStream;ro(t),_r(e);const i=e._closeAlgorithm();Jt(e),T(i,()=>(Ki(t),null),a=>(eo(t,a),null))}function po(e,t){const i=e._controlledWritableStream;no(i);const a=e._writeAlgorithm(t);T(a,()=>{Ji(i);const l=i._state;if(_r(e),!_e(i)&&l==="writable"){const h=xr(e);Fr(i,h)}return Zt(e),null},l=>(i._state==="writable"&&Jt(e),Zi(i,l),null))}function xr(e){return vn(e)<=0}function kn(e,t){const i=e._controlledWritableStream;Jt(e),Ar(i,t)}function Kt(e){return new TypeError(`WritableStream.prototype.${e} can only be used on a WritableStream`)}function Wr(e){return new TypeError(`WritableStreamDefaultController.prototype.${e} can only be used on a WritableStreamDefaultController`)}function He(e){return new TypeError(`WritableStreamDefaultWriter.prototype.${e} can only be used on a WritableStreamDefaultWriter`)}function Bt(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function er(e){e._closedPromise=F((t,i)=>{e._closedPromise_resolve=t,e._closedPromise_reject=i,e._closedPromiseState="pending"})}function On(e,t){er(e),vr(e,t)}function mo(e){er(e),Dn(e)}function vr(e,t){e._closedPromise_reject!==void 0&&(U(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected")}function bo(e,t){On(e,t)}function Dn(e){e._closedPromise_resolve!==void 0&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved")}function tr(e){e._readyPromise=F((t,i)=>{e._readyPromise_resolve=t,e._readyPromise_reject=i}),e._readyPromiseState="pending"}function kr(e,t){tr(e),Mn(e,t)}function zn(e){tr(e),Or(e)}function Mn(e,t){e._readyPromise_reject!==void 0&&(U(e._readyPromise),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected")}function yo(e){tr(e)}function _o(e,t){kr(e,t)}function Or(e){e._readyPromise_resolve!==void 0&&(e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled")}function wo(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof Nr<"u")return Nr}const Dr=wo();function go(e){if(!(typeof e=="function"||typeof e=="object")||e.name!=="DOMException")return!1;try{return new e,!0}catch{return!1}}function So(){const e=Dr?.DOMException;return go(e)?e:void 0}function Ro(){const e=function(i,a){this.message=i||"",this.name=a||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return _(e,"DOMException"),e.prototype=Object.create(Error.prototype),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,configurable:!0}),e}const Eo=So()||Ro();function jn(e,t,i,a,l,h){const b=be(e),S=Bn(t);e._disturbed=!0;let I=!1,P=B(void 0);return F((q,W)=>{let M;if(h!==void 0){if(M=()=>{const A=h.reason!==void 0?h.reason:new Eo("Aborted","AbortError"),v=[];a||v.push(()=>t._state==="writable"?Gt(t,A):B(void 0)),l||v.push(()=>e._state==="readable"?pe(e,A):B(void 0)),ie(()=>Promise.all(v.map(N=>N())),!0,A)},h.aborted){M();return}h.addEventListener("abort",M)}function me(){return F((A,v)=>{function N(se){se?A():E(ot(),N,v)}N(!1)})}function ot(){return I?B(!0):E(S._readyPromise,()=>F((A,v)=>{Me(b,{_chunkSteps:N=>{P=E(qn(S,N),void 0,p),A(!1)},_closeSteps:()=>A(!0),_errorSteps:v})}))}if(Ce(e,b._closedPromise,A=>(a?de(!0,A):ie(()=>Gt(t,A),!0,A),null)),Ce(t,S._closedPromise,A=>(l?de(!0,A):ie(()=>pe(e,A),!0,A),null)),ne(e,b._closedPromise,()=>(i?de():ie(()=>oo(S)),null)),_e(t)||t._state==="closed"){const A=new TypeError("the destination writable stream closed before all data could be piped to it");l?de(!0,A):ie(()=>pe(e,A),!0,A)}U(me());function ve(){const A=P;return E(P,()=>A!==P?ve():void 0)}function Ce(A,v,N){A._state==="errored"?N(A._storedError):Y(v,N)}function ne(A,v,N){A._state==="closed"?N():O(v,N)}function ie(A,v,N){if(I)return;I=!0,t._state==="writable"&&!_e(t)?O(ve(),se):se();function se(){return T(A(),()=>Be(v,N),at=>Be(!0,at)),null}}function de(A,v){I||(I=!0,t._state==="writable"&&!_e(t)?O(ve(),()=>Be(A,v)):Be(A,v))}function Be(A,v){return Fn(S),ue(b),h!==void 0&&h.removeEventListener("abort",M),A?W(v):q(void 0),null}})}class Ee{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!rr(this))throw ir("desiredSize");return zr(this)}close(){if(!rr(this))throw ir("close");if(!nt(this))throw new TypeError("The stream is not in a state that permits close");Ye(this)}enqueue(t=void 0){if(!rr(this))throw ir("enqueue");if(!nt(this))throw new TypeError("The stream is not in a state that permits enqueue");return rt(this,t)}error(t=void 0){if(!rr(this))throw ir("error");he(this,t)}[ct](t){Ae(this);const i=this._cancelAlgorithm(t);return nr(this),i}[dt](t){const i=this._controlledReadableStream;if(this._queue.length>0){const a=_r(this);this._closeRequested&&this._queue.length===0?(nr(this),At(i)):Tt(this),t._chunkSteps(a)}else zt(i,t),Tt(this)}[ht](){}}Object.defineProperties(Ee.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),_(Ee.prototype.close,"close"),_(Ee.prototype.enqueue,"enqueue"),_(Ee.prototype.error,"error"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Ee.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function rr(e){return!w(e)||!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")?!1:e instanceof Ee}function Tt(e){if(!Un(e))return;if(e._pulling){e._pullAgain=!0;return}e._pulling=!0;const i=e._pullAlgorithm();T(i,()=>(e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,Tt(e)),null),a=>(he(e,a),null))}function Un(e){const t=e._controlledReadableStream;return!nt(e)||!e._started?!1:!!(xe(t)&&De(t)>0||zr(e)>0)}function nr(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Ye(e){if(!nt(e))return;const t=e._controlledReadableStream;e._closeRequested=!0,e._queue.length===0&&(nr(e),At(t))}function rt(e,t){if(!nt(e))return;const i=e._controlledReadableStream;if(xe(i)&&De(i)>0)gt(i,t,!1);else{let a;try{a=e._strategySizeAlgorithm(t)}catch(l){throw he(e,l),l}try{wr(e,t,a)}catch(l){throw he(e,l),l}}Tt(e)}function he(e,t){const i=e._controlledReadableStream;i._state==="readable"&&(Ae(e),nr(e),Hn(i,t))}function zr(e){const t=e._controlledReadableStream._state;return t==="errored"?null:t==="closed"?0:e._strategyHWM-e._queueTotalSize}function Co(e){return!Un(e)}function nt(e){const t=e._controlledReadableStream._state;return!e._closeRequested&&t==="readable"}function Ln(e,t,i,a,l,h,b){t._controlledReadableStream=e,t._queue=void 0,t._queueTotalSize=void 0,Ae(t),t._started=!1,t._closeRequested=!1,t._pullAgain=!1,t._pulling=!1,t._strategySizeAlgorithm=b,t._strategyHWM=h,t._pullAlgorithm=a,t._cancelAlgorithm=l,e._readableStreamController=t;const S=i();T(B(S),()=>(t._started=!0,Tt(t),null),I=>(he(t,I),null))}function Bo(e,t,i,a){const l=Object.create(Ee.prototype);let h,b,S;t.start!==void 0?h=()=>t.start(l):h=()=>{},t.pull!==void 0?b=()=>t.pull(l):b=()=>B(void 0),t.cancel!==void 0?S=I=>t.cancel(I):S=()=>B(void 0),Ln(e,l,h,b,S,i,a)}function ir(e){return new TypeError(`ReadableStreamDefaultController.prototype.${e} can only be used on a ReadableStreamDefaultController`)}function To(e,t){return Ue(e._readableStreamController)?Ao(e):Po(e)}function Po(e,t){const i=be(e);let a=!1,l=!1,h=!1,b=!1,S,I,P,q,W;const M=F(ne=>{W=ne});function me(){return a?(l=!0,B(void 0)):(a=!0,Me(i,{_chunkSteps:ie=>{H(()=>{l=!1;const de=ie,Be=ie;h||rt(P._readableStreamController,de),b||rt(q._readableStreamController,Be),a=!1,l&&me()})},_closeSteps:()=>{a=!1,h||Ye(P._readableStreamController),b||Ye(q._readableStreamController),(!h||!b)&&W(void 0)},_errorSteps:()=>{a=!1}}),B(void 0))}function ot(ne){if(h=!0,S=ne,b){const ie=k([S,I]),de=pe(e,ie);W(de)}return M}function ve(ne){if(b=!0,I=ne,h){const ie=k([S,I]),de=pe(e,ie);W(de)}return M}function Ce(){}return P=Pt(Ce,me,ot),q=Pt(Ce,me,ve),Y(i._closedPromise,ne=>(he(P._readableStreamController,ne),he(q._readableStreamController,ne),(!h||!b)&&W(void 0),null)),[P,q]}function Ao(e){let t=be(e),i=!1,a=!1,l=!1,h=!1,b=!1,S,I,P,q,W;const M=F(A=>{W=A});function me(A){Y(A._closedPromise,v=>(A!==t||(ce(P._readableStreamController,v),ce(q._readableStreamController,v),(!h||!b)&&W(void 0)),null))}function ot(){$e(t)&&(ue(t),t=be(e),me(t)),Me(t,{_chunkSteps:v=>{H(()=>{a=!1,l=!1;const N=v;let se=v;if(!h&&!b)try{se=an(v)}catch(at){ce(P._readableStreamController,at),ce(q._readableStreamController,at),W(pe(e,at));return}h||$t(P._readableStreamController,N),b||$t(q._readableStreamController,se),i=!1,a?Ce():l&&ne()})},_closeSteps:()=>{i=!1,h||St(P._readableStreamController),b||St(q._readableStreamController),P._readableStreamController._pendingPullIntos.length>0&&Nt(P._readableStreamController,0),q._readableStreamController._pendingPullIntos.length>0&&Nt(q._readableStreamController,0),(!h||!b)&&W(void 0)},_errorSteps:()=>{i=!1}})}function ve(A,v){fe(t)&&(ue(t),t=wn(e),me(t));const N=v?q:P,se=v?P:q;Rn(t,A,1,{_chunkSteps:st=>{H(()=>{a=!1,l=!1;const ut=v?b:h;if(v?h:b)ut||Ht(N._readableStreamController,st);else{let ii;try{ii=an(st)}catch($r){ce(N._readableStreamController,$r),ce(se._readableStreamController,$r),W(pe(e,$r));return}ut||Ht(N._readableStreamController,st),$t(se._readableStreamController,ii)}i=!1,a?Ce():l&&ne()})},_closeSteps:st=>{i=!1;const ut=v?b:h,dr=v?h:b;ut||St(N._readableStreamController),dr||St(se._readableStreamController),st!==void 0&&(ut||Ht(N._readableStreamController,st),!dr&&se._readableStreamController._pendingPullIntos.length>0&&Nt(se._readableStreamController,0)),(!ut||!dr)&&W(void 0)},_errorSteps:()=>{i=!1}})}function Ce(){if(i)return a=!0,B(void 0);i=!0;const A=Cr(P._readableStreamController);return A===null?ot():ve(A._view,!1),B(void 0)}function ne(){if(i)return l=!0,B(void 0);i=!0;const A=Cr(q._readableStreamController);return A===null?ot():ve(A._view,!0),B(void 0)}function ie(A){if(h=!0,S=A,b){const v=k([S,I]),N=pe(e,v);W(N)}return M}function de(A){if(b=!0,I=A,h){const v=k([S,I]),N=pe(e,v);W(N)}return M}function Be(){}return P=Nn(Be,Ce,ie),q=Nn(Be,ne,de),me(t),[P,q]}function Io(e){return w(e)&&typeof e.getReader<"u"}function Fo(e){return Io(e)?xo(e.getReader()):qo(e)}function qo(e){let t;const i=on(e,"async"),a=p;function l(){let b;try{b=Si(i)}catch(I){return g(I)}const S=B(b);return j(S,I=>{if(!w(I))throw new TypeError("The promise returned by the iterator.next() method must fulfill with an object");if(Ri(I))Ye(t._readableStreamController);else{const q=Ei(I);rt(t._readableStreamController,q)}})}function h(b){const S=i.iterator;let I;try{I=jt(S,"return")}catch(W){return g(W)}if(I===void 0)return B(void 0);let P;try{P=ee(I,S,[b])}catch(W){return g(W)}const q=B(P);return j(q,W=>{if(!w(W))throw new TypeError("The promise returned by the iterator.return() method must fulfill with an object")})}return t=Pt(a,l,h,0),t}function xo(e){let t;const i=p;function a(){let h;try{h=e.read()}catch(b){return g(b)}return j(h,b=>{if(!w(b))throw new TypeError("The promise returned by the reader.read() method must fulfill with an object");if(b.done)Ye(t._readableStreamController);else{const S=b.value;rt(t._readableStreamController,S)}})}function l(h){try{return B(e.cancel(h))}catch(b){return g(b)}}return t=Pt(i,a,l,0),t}function Wo(e,t){ae(e,t);const i=e,a=i?.autoAllocateChunkSize,l=i?.cancel,h=i?.pull,b=i?.start,S=i?.type;return{autoAllocateChunkSize:a===void 0?void 0:_t(a,`${t} has member 'autoAllocateChunkSize' that`),cancel:l===void 0?void 0:vo(l,i,`${t} has member 'cancel' that`),pull:h===void 0?void 0:ko(h,i,`${t} has member 'pull' that`),start:b===void 0?void 0:Oo(b,i,`${t} has member 'start' that`),type:S===void 0?void 0:Do(S,`${t} has member 'type' that`)}}function vo(e,t,i){return re(e,i),a=>D(e,t,[a])}function ko(e,t,i){return re(e,i),a=>D(e,t,[a])}function Oo(e,t,i){return re(e,i),a=>ee(e,t,[a])}function Do(e,t){if(e=`${e}`,e!=="bytes")throw new TypeError(`${t} '${e}' is not a valid enumeration value for ReadableStreamType`);return e}function zo(e,t){return ae(e,t),{preventCancel:!!e?.preventCancel}}function $n(e,t){ae(e,t);const i=e?.preventAbort,a=e?.preventCancel,l=e?.preventClose,h=e?.signal;return h!==void 0&&Mo(h,`${t} has member 'signal' that`),{preventAbort:!!i,preventCancel:!!a,preventClose:!!l,signal:h}}function Mo(e,t){if(!Yi(e))throw new TypeError(`${t} is not an AbortSignal.`)}function jo(e,t){ae(e,t);const i=e?.readable;yt(i,"readable","ReadableWritablePair"),wt(i,`${t} has member 'readable' that`);const a=e?.writable;return yt(a,"writable","ReadableWritablePair"),Cn(a,`${t} has member 'writable' that`),{readable:i,writable:a}}class K{constructor(t={},i={}){t===void 0?t=null:Xe(t,"First parameter");const a=Vt(i,"Second parameter"),l=Wo(t,"First parameter");if(Mr(this),l.type==="bytes"){if(a.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");const h=Et(a,0);Wi(this,l,h)}else{const h=Qt(a),b=Et(a,1);Bo(this,l,b,h)}}get locked(){if(!qe(this))throw Qe("locked");return xe(this)}cancel(t=void 0){return qe(this)?xe(this)?g(new TypeError("Cannot cancel a stream that already has a reader")):pe(this,t):g(Qe("cancel"))}getReader(t=void 0){if(!qe(this))throw Qe("getReader");return ki(t,"First parameter").mode===void 0?be(this):wn(this)}pipeThrough(t,i={}){if(!qe(this))throw Qe("pipeThrough");le(t,1,"pipeThrough");const a=jo(t,"First parameter"),l=$n(i,"Second parameter");if(xe(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(et(a.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");const h=jn(this,a.writable,l.preventClose,l.preventAbort,l.preventCancel,l.signal);return U(h),a.readable}pipeTo(t,i={}){if(!qe(this))return g(Qe("pipeTo"));if(t===void 0)return g("Parameter 1 is required in 'pipeTo'.");if(!Ke(t))return g(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let a;try{a=$n(i,"Second parameter")}catch(l){return g(l)}return xe(this)?g(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):et(t)?g(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):jn(this,t,a.preventClose,a.preventAbort,a.preventCancel,a.signal)}tee(){if(!qe(this))throw Qe("tee");const t=To(this);return k(t)}values(t=void 0){if(!qe(this))throw Qe("values");const i=zo(t,"First parameter");return f(this,i.preventCancel)}[yr](t){return this.values(t)}static from(t){return Fo(t)}}Object.defineProperties(K,{from:{enumerable:!0}}),Object.defineProperties(K.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),_(K.from,"from"),_(K.prototype.cancel,"cancel"),_(K.prototype.getReader,"getReader"),_(K.prototype.pipeThrough,"pipeThrough"),_(K.prototype.pipeTo,"pipeTo"),_(K.prototype.tee,"tee"),_(K.prototype.values,"values"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(K.prototype,Symbol.toStringTag,{value:"ReadableStream",configurable:!0}),Object.defineProperty(K.prototype,yr,{value:K.prototype.values,writable:!0,configurable:!0});function Pt(e,t,i,a=1,l=()=>1){const h=Object.create(K.prototype);Mr(h);const b=Object.create(Ee.prototype);return Ln(h,b,e,t,i,a,l),h}function Nn(e,t,i){const a=Object.create(K.prototype);Mr(a);const l=Object.create(Se.prototype);return _n(a,l,e,t,i,0,void 0),a}function Mr(e){e._state="readable",e._reader=void 0,e._storedError=void 0,e._disturbed=!1}function qe(e){return!w(e)||!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")?!1:e instanceof K}function xe(e){return e._reader!==void 0}function pe(e,t){if(e._disturbed=!0,e._state==="closed")return B(void 0);if(e._state==="errored")return g(e._storedError);At(e);const i=e._reader;if(i!==void 0&&$e(i)){const l=i._readIntoRequests;i._readIntoRequests=new te,l.forEach(h=>{h._closeSteps(void 0)})}const a=e._readableStreamController[ct](t);return j(a,p)}function At(e){e._state="closed";const t=e._reader;if(t!==void 0&&(J(t),fe(t))){const i=t._readRequests;t._readRequests=new te,i.forEach(a=>{a._closeSteps()})}}function Hn(e,t){e._state="errored",e._storedError=t;const i=e._reader;i!==void 0&&(mt(i,t),fe(i)?Mt(i,t):En(i,t))}function Qe(e){return new TypeError(`ReadableStream.prototype.${e} can only be used on a ReadableStream`)}function Yn(e,t){ae(e,t);const i=e?.highWaterMark;return yt(i,"highWaterMark","QueuingStrategyInit"),{highWaterMark:Je(i)}}const Qn=e=>e.byteLength;_(Qn,"size");class or{constructor(t){le(t,1,"ByteLengthQueuingStrategy"),t=Yn(t,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=t.highWaterMark}get highWaterMark(){if(!Gn(this))throw Vn("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!Gn(this))throw Vn("size");return Qn}}Object.defineProperties(or.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(or.prototype,Symbol.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function Vn(e){return new TypeError(`ByteLengthQueuingStrategy.prototype.${e} can only be used on a ByteLengthQueuingStrategy`)}function Gn(e){return!w(e)||!Object.prototype.hasOwnProperty.call(e,"_byteLengthQueuingStrategyHighWaterMark")?!1:e instanceof or}const Xn=()=>1;_(Xn,"size");class ar{constructor(t){le(t,1,"CountQueuingStrategy"),t=Yn(t,"First parameter"),this._countQueuingStrategyHighWaterMark=t.highWaterMark}get highWaterMark(){if(!Zn(this))throw Jn("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!Zn(this))throw Jn("size");return Xn}}Object.defineProperties(ar.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(ar.prototype,Symbol.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function Jn(e){return new TypeError(`CountQueuingStrategy.prototype.${e} can only be used on a CountQueuingStrategy`)}function Zn(e){return!w(e)||!Object.prototype.hasOwnProperty.call(e,"_countQueuingStrategyHighWaterMark")?!1:e instanceof ar}function Uo(e,t){ae(e,t);const i=e?.cancel,a=e?.flush,l=e?.readableType,h=e?.start,b=e?.transform,S=e?.writableType;return{cancel:i===void 0?void 0:Ho(i,e,`${t} has member 'cancel' that`),flush:a===void 0?void 0:Lo(a,e,`${t} has member 'flush' that`),readableType:l,start:h===void 0?void 0:$o(h,e,`${t} has member 'start' that`),transform:b===void 0?void 0:No(b,e,`${t} has member 'transform' that`),writableType:S}}function Lo(e,t,i){return re(e,i),a=>D(e,t,[a])}function $o(e,t,i){return re(e,i),a=>ee(e,t,[a])}function No(e,t,i){return re(e,i),(a,l)=>D(e,t,[a,l])}function Ho(e,t,i){return re(e,i),a=>D(e,t,[a])}class sr{constructor(t={},i={},a={}){t===void 0&&(t=null);const l=Vt(i,"Second parameter"),h=Vt(a,"Third parameter"),b=Uo(t,"First parameter");if(b.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(b.writableType!==void 0)throw new RangeError("Invalid writableType specified");const S=Et(h,0),I=Qt(h),P=Et(l,1),q=Qt(l);let W;const M=F(me=>{W=me});Yo(this,M,P,q,S,I),Vo(this,b),b.start!==void 0?W(b.start(this._transformStreamController)):W(void 0)}get readable(){if(!Kn(this))throw ni("readable");return this._readable}get writable(){if(!Kn(this))throw ni("writable");return this._writable}}Object.defineProperties(sr.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(sr.prototype,Symbol.toStringTag,{value:"TransformStream",configurable:!0});function Yo(e,t,i,a,l,h){function b(){return t}function S(M){return Jo(e,M)}function I(M){return Zo(e,M)}function P(){return Ko(e)}e._writable=Gi(b,S,P,I,i,a);function q(){return ea(e)}function W(M){return ta(e,M)}e._readable=Pt(b,q,W,l,h),e._backpressure=void 0,e._backpressureChangePromise=void 0,e._backpressureChangePromise_resolve=void 0,ur(e,!0),e._transformStreamController=void 0}function Kn(e){return!w(e)||!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")?!1:e instanceof sr}function ei(e,t){he(e._readable._readableStreamController,t),jr(e,t)}function jr(e,t){fr(e._transformStreamController),Ct(e._writable._writableStreamController,t),Ur(e)}function Ur(e){e._backpressure&&ur(e,!1)}function ur(e,t){e._backpressureChangePromise!==void 0&&e._backpressureChangePromise_resolve(),e._backpressureChangePromise=F(i=>{e._backpressureChangePromise_resolve=i}),e._backpressure=t}class We{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!lr(this))throw cr("desiredSize");const t=this._controlledTransformStream._readable._readableStreamController;return zr(t)}enqueue(t=void 0){if(!lr(this))throw cr("enqueue");ti(this,t)}error(t=void 0){if(!lr(this))throw cr("error");Go(this,t)}terminate(){if(!lr(this))throw cr("terminate");Xo(this)}}Object.defineProperties(We.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),_(We.prototype.enqueue,"enqueue"),_(We.prototype.error,"error"),_(We.prototype.terminate,"terminate"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(We.prototype,Symbol.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function lr(e){return!w(e)||!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")?!1:e instanceof We}function Qo(e,t,i,a,l){t._controlledTransformStream=e,e._transformStreamController=t,t._transformAlgorithm=i,t._flushAlgorithm=a,t._cancelAlgorithm=l,t._finishPromise=void 0,t._finishPromise_resolve=void 0,t._finishPromise_reject=void 0}function Vo(e,t){const i=Object.create(We.prototype);let a,l,h;t.transform!==void 0?a=b=>t.transform(b,i):a=b=>{try{return ti(i,b),B(void 0)}catch(S){return g(S)}},t.flush!==void 0?l=()=>t.flush(i):l=()=>B(void 0),t.cancel!==void 0?h=b=>t.cancel(b):h=()=>B(void 0),Qo(e,i,a,l,h)}function fr(e){e._transformAlgorithm=void 0,e._flushAlgorithm=void 0,e._cancelAlgorithm=void 0}function ti(e,t){const i=e._controlledTransformStream,a=i._readable._readableStreamController;if(!nt(a))throw new TypeError("Readable side is not in a state that permits enqueue");try{rt(a,t)}catch(h){throw jr(i,h),i._readable._storedError}Co(a)!==i._backpressure&&ur(i,!0)}function Go(e,t){ei(e._controlledTransformStream,t)}function ri(e,t){const i=e._transformAlgorithm(t);return j(i,void 0,a=>{throw ei(e._controlledTransformStream,a),a})}function Xo(e){const t=e._controlledTransformStream,i=t._readable._readableStreamController;Ye(i);const a=new TypeError("TransformStream terminated");jr(t,a)}function Jo(e,t){const i=e._transformStreamController;if(e._backpressure){const a=e._backpressureChangePromise;return j(a,()=>{const l=e._writable;if(l._state==="erroring")throw l._storedError;return ri(i,t)})}return ri(i,t)}function Zo(e,t){const i=e._transformStreamController;if(i._finishPromise!==void 0)return i._finishPromise;const a=e._readable;i._finishPromise=F((h,b)=>{i._finishPromise_resolve=h,i._finishPromise_reject=b});const l=i._cancelAlgorithm(t);return fr(i),T(l,()=>(a._state==="errored"?it(i,a._storedError):(he(a._readableStreamController,t),Lr(i)),null),h=>(he(a._readableStreamController,h),it(i,h),null)),i._finishPromise}function Ko(e){const t=e._transformStreamController;if(t._finishPromise!==void 0)return t._finishPromise;const i=e._readable;t._finishPromise=F((l,h)=>{t._finishPromise_resolve=l,t._finishPromise_reject=h});const a=t._flushAlgorithm();return fr(t),T(a,()=>(i._state==="errored"?it(t,i._storedError):(Ye(i._readableStreamController),Lr(t)),null),l=>(he(i._readableStreamController,l),it(t,l),null)),t._finishPromise}function ea(e){return ur(e,!1),e._backpressureChangePromise}function ta(e,t){const i=e._transformStreamController;if(i._finishPromise!==void 0)return i._finishPromise;const a=e._writable;i._finishPromise=F((h,b)=>{i._finishPromise_resolve=h,i._finishPromise_reject=b});const l=i._cancelAlgorithm(t);return fr(i),T(l,()=>(a._state==="errored"?it(i,a._storedError):(Ct(a._writableStreamController,t),Ur(e),Lr(i)),null),h=>(Ct(a._writableStreamController,h),Ur(e),it(i,h),null)),i._finishPromise}function cr(e){return new TypeError(`TransformStreamDefaultController.prototype.${e} can only be used on a TransformStreamDefaultController`)}function Lr(e){e._finishPromise_resolve!==void 0&&(e._finishPromise_resolve(),e._finishPromise_resolve=void 0,e._finishPromise_reject=void 0)}function it(e,t){e._finishPromise_reject!==void 0&&(U(e._finishPromise),e._finishPromise_reject(t),e._finishPromise_resolve=void 0,e._finishPromise_reject=void 0)}function ni(e){return new TypeError(`TransformStream.prototype.${e} can only be used on a TransformStream`)}m.ByteLengthQueuingStrategy=or,m.CountQueuingStrategy=ar,m.ReadableByteStreamController=Se,m.ReadableStream=K,m.ReadableStreamBYOBReader=Ie,m.ReadableStreamBYOBRequest=je,m.ReadableStreamDefaultController=Ee,m.ReadableStreamDefaultReader=V,m.TransformStream=sr,m.TransformStreamDefaultController=We,m.WritableStream=Fe,m.WritableStreamDefaultController=tt,m.WritableStreamDefaultWriter=Re})}(hr,hr.exports)),hr.exports}var Hr={},It={},ui;function aa(){if(ui)return It;ui=1,It.byteLength=c,It.toByteArray=X,It.fromByteArray=g;for(var C=[],u=[],m=typeof Uint8Array<"u"?Uint8Array:Array,p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",w=0,R=p.length;w0)throw new Error("Invalid string. Length must be a multiple of 4");var O=E.indexOf("=");O===-1&&(O=T);var Y=O===T?0:4-O%4;return[O,Y]}function c(E){var T=_(E),O=T[0],Y=T[1];return(O+Y)*3/4-Y}function G(E,T,O){return(T+O)*3/4-O}function X(E){var T,O=_(E),Y=O[0],j=O[1],U=new m(G(E,Y,j)),H=0,ee=j>0?Y-4:Y,D;for(D=0;D>16&255,U[H++]=T>>8&255,U[H++]=T&255;return j===2&&(T=u[E.charCodeAt(D)]<<2|u[E.charCodeAt(D+1)]>>4,U[H++]=T&255),j===1&&(T=u[E.charCodeAt(D)]<<10|u[E.charCodeAt(D+1)]<<4|u[E.charCodeAt(D+2)]>>2,U[H++]=T>>8&255,U[H++]=T&255),U}function F(E){return C[E>>18&63]+C[E>>12&63]+C[E>>6&63]+C[E&63]}function B(E,T,O){for(var Y,j=[],U=T;Uee?ee:H+U));return Y===1?(T=E[O-1],j.push(C[T>>2]+C[T<<4&63]+"==")):Y===2&&(T=(E[O-2]<<8)+E[O-1],j.push(C[T>>10]+C[T>>4&63]+C[T<<2&63]+"=")),j.join("")}return It}var pr={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */var li;function sa(){return li||(li=1,pr.read=function(C,u,m,p,w){var R,_,c=w*8-p-1,G=(1<>1,F=-7,B=m?w-1:0,g=m?-1:1,E=C[u+B];for(B+=g,R=E&(1<<-F)-1,E>>=-F,F+=c;F>0;R=R*256+C[u+B],B+=g,F-=8);for(_=R&(1<<-F)-1,R>>=-F,F+=p;F>0;_=_*256+C[u+B],B+=g,F-=8);if(R===0)R=1-X;else{if(R===G)return _?NaN:(E?-1:1)*(1/0);_=_+Math.pow(2,p),R=R-X}return(E?-1:1)*_*Math.pow(2,R-p)},pr.write=function(C,u,m,p,w,R){var _,c,G,X=R*8-w-1,F=(1<>1,g=w===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=p?0:R-1,T=p?1:-1,O=u<0||u===0&&1/u<0?1:0;for(u=Math.abs(u),isNaN(u)||u===1/0?(c=isNaN(u)?1:0,_=F):(_=Math.floor(Math.log(u)/Math.LN2),u*(G=Math.pow(2,-_))<1&&(_--,G*=2),_+B>=1?u+=g/G:u+=g*Math.pow(2,1-B),u*G>=2&&(_++,G/=2),_+B>=F?(c=0,_=F):_+B>=1?(c=(u*G-1)*Math.pow(2,w),_=_+B):(c=u*Math.pow(2,B-1)*Math.pow(2,w),_=0));w>=8;C[m+E]=c&255,E+=T,c/=256,w-=8);for(_=_<0;C[m+E]=_&255,E+=T,_/=256,X-=8);C[m+E-T]|=O*128}),pr}/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT - */var fi;function ua(){return fi||(fi=1,function(C){const u=aa(),p=sa(),m=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;C.Buffer=c,C.SlowBuffer=U,C.INSPECT_MAX_BYTES=50;const _=2147483647;C.kMaxLength=_,c.TYPED_ARRAY_SUPPORT=R(),!c.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function R(){try{const o=new Uint8Array(1),r={foo:function(){return 42}};return Object.setPrototypeOf(r,Uint8Array.prototype),Object.setPrototypeOf(o,r),o.foo()===42}catch{return!1}}Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}});function w(o){if(o>_)throw new RangeError('The value "'+o+'" is invalid for option "size"');const r=new Uint8Array(o);return Object.setPrototypeOf(r,c.prototype),r}function c(o,r,n){if(typeof o=="number"){if(typeof r=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return B(o)}return G(o,r,n)}c.poolSize=8192;function G(o,r,n){if(typeof o=="string")return g(o,r);if(ArrayBuffer.isView(o))return T(o);if(o==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof o);if(V(o,ArrayBuffer)||o&&V(o.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(V(o,SharedArrayBuffer)||o&&V(o.buffer,SharedArrayBuffer)))return O(o,r,n);if(typeof o=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const s=o.valueOf&&o.valueOf();if(s!=null&&s!==o)return c.from(s,r,n);const f=Y(o);if(f)return f;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof o[Symbol.toPrimitive]=="function")return c.from(o[Symbol.toPrimitive]("string"),r,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof o)}c.from=function(o,r,n){return G(o,r,n)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array);function X(o){if(typeof o!="number")throw new TypeError('"size" argument must be of type number');if(o<0)throw new RangeError('The value "'+o+'" is invalid for option "size"')}function F(o,r,n){return X(o),o<=0?w(o):r!==void 0?typeof n=="string"?w(o).fill(r,n):w(o).fill(r):w(o)}c.alloc=function(o,r,n){return F(o,r,n)};function B(o){return X(o),w(o<0?0:j(o)|0)}c.allocUnsafe=function(o){return B(o)},c.allocUnsafeSlow=function(o){return B(o)};function g(o,r){if((typeof r!="string"||r==="")&&(r="utf8"),!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r);const n=H(o,r)|0;let s=w(n);const f=s.write(o,r);return f!==n&&(s=s.slice(0,f)),s}function E(o){const r=o.length<0?0:j(o.length)|0,n=w(r);for(let s=0;s=_)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+_.toString(16)+" bytes");return o|0}function U(o){return+o!=o&&(o=0),c.alloc(+o)}c.isBuffer=function(r){return r!=null&&r._isBuffer===!0&&r!==c.prototype},c.compare=function(r,n){if(V(r,Uint8Array)&&(r=c.from(r,r.offset,r.byteLength)),V(n,Uint8Array)&&(n=c.from(n,n.offset,n.byteLength)),!c.isBuffer(r)||!c.isBuffer(n))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===n)return 0;let s=r.length,f=n.length;for(let d=0,y=Math.min(s,f);df.length?(c.isBuffer(y)||(y=c.from(y)),y.copy(f,d)):Uint8Array.prototype.set.call(f,y,d);else if(c.isBuffer(y))y.copy(f,d);else throw new TypeError('"list" argument must be an Array of Buffers');d+=y.length}return f};function H(o,r){if(c.isBuffer(o))return o.length;if(ArrayBuffer.isView(o)||V(o,ArrayBuffer))return o.byteLength;if(typeof o!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof o);const n=o.length,s=arguments.length>2&&arguments[2]===!0;if(!s&&n===0)return 0;let f=!1;for(;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return be(o).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return n*2;case"hex":return n>>>1;case"base64":return De(o).length;default:if(f)return s?-1:be(o).length;r=(""+r).toLowerCase(),f=!0}}c.byteLength=H;function ee(o,r,n){let s=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((n===void 0||n>this.length)&&(n=this.length),n<=0)||(n>>>=0,r>>>=0,n<=r))return"";for(o||(o="utf8");;)switch(o){case"hex":return br(this,r,n);case"utf8":case"utf-8":return Ve(this,r,n);case"ascii":return pt(this,r,n);case"latin1":case"binary":return vt(this,r,n);case"base64":return Wt(this,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return mt(this,r,n);default:if(s)throw new TypeError("Unknown encoding: "+o);o=(o+"").toLowerCase(),s=!0}}c.prototype._isBuffer=!0;function D(o,r,n){const s=o[r];o[r]=o[n],o[n]=s}c.prototype.swap16=function(){const r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let n=0;nn&&(r+=" ... "),""},m&&(c.prototype[m]=c.prototype.inspect),c.prototype.compare=function(r,n,s,f,d){if(V(r,Uint8Array)&&(r=c.from(r,r.offset,r.byteLength)),!c.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof r);if(n===void 0&&(n=0),s===void 0&&(s=r?r.length:0),f===void 0&&(f=0),d===void 0&&(d=this.length),n<0||s>r.length||f<0||d>this.length)throw new RangeError("out of range index");if(f>=d&&n>=s)return 0;if(f>=d)return-1;if(n>=s)return 1;if(n>>>=0,s>>>=0,f>>>=0,d>>>=0,this===r)return 0;let y=d-f,x=s-n;const L=Math.min(y,x),z=this.slice(f,d),$=r.slice(n,s);for(let k=0;k2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,fe(n)&&(n=f?0:o.length-1),n<0&&(n=o.length+n),n>=o.length){if(f)return-1;n=o.length-1}else if(n<0)if(f)n=0;else return-1;if(typeof r=="string"&&(r=c.from(r,s)),c.isBuffer(r))return r.length===0?-1:te(o,r,n,s,f);if(typeof r=="number")return r=r&255,typeof Uint8Array.prototype.indexOf=="function"?f?Uint8Array.prototype.indexOf.call(o,r,n):Uint8Array.prototype.lastIndexOf.call(o,r,n):te(o,[r],n,s,f);throw new TypeError("val must be string, number or Buffer")}function te(o,r,n,s,f){let d=1,y=o.length,x=r.length;if(s!==void 0&&(s=String(s).toLowerCase(),s==="ucs2"||s==="ucs-2"||s==="utf16le"||s==="utf-16le")){if(o.length<2||r.length<2)return-1;d=2,y/=2,x/=2,n/=2}function L($,k){return d===1?$[k]:$.readUInt16BE(k*d)}let z;if(f){let $=-1;for(z=n;zy&&(n=y-x),z=n;z>=0;z--){let $=!0;for(let k=0;kf&&(s=f)):s=f;const d=r.length;s>d/2&&(s=d/2);let y;for(y=0;y>>0,isFinite(s)?(s=s>>>0,f===void 0&&(f="utf8")):(f=s,s=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const d=this.length-n;if((s===void 0||s>d)&&(s=d),r.length>0&&(s<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");f||(f="utf8");let y=!1;for(;;)switch(f){case"hex":return qt(this,r,n,s);case"utf8":case"utf-8":return xt(this,r,n,s);case"ascii":case"latin1":case"binary":return ct(this,r,n,s);case"base64":return dt(this,r,n,s);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ht(this,r,n,s);default:if(y)throw new TypeError("Unknown encoding: "+f);f=(""+f).toLowerCase(),y=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Wt(o,r,n){return r===0&&n===o.length?u.fromByteArray(o):u.fromByteArray(o.slice(r,n))}function Ve(o,r,n){n=Math.min(o.length,n);const s=[];let f=r;for(;f239?4:d>223?3:d>191?2:1;if(f+x<=n){let L,z,$,k;switch(x){case 1:d<128&&(y=d);break;case 2:L=o[f+1],(L&192)===128&&(k=(d&31)<<6|L&63,k>127&&(y=k));break;case 3:L=o[f+1],z=o[f+2],(L&192)===128&&(z&192)===128&&(k=(d&15)<<12|(L&63)<<6|z&63,k>2047&&(k<55296||k>57343)&&(y=k));break;case 4:L=o[f+1],z=o[f+2],$=o[f+3],(L&192)===128&&(z&192)===128&&($&192)===128&&(k=(d&15)<<18|(L&63)<<12|(z&63)<<6|$&63,k>65535&&k<1114112&&(y=k))}}y===null?(y=65533,x=1):y>65535&&(y-=65536,s.push(y>>>10&1023|55296),y=56320|y&1023),s.push(y),f+=x}return Ge(s)}const ue=4096;function Ge(o){const r=o.length;if(r<=ue)return String.fromCharCode.apply(String,o);let n="",s=0;for(;ss)&&(n=s);let f="";for(let d=r;ds&&(r=s),n<0?(n+=s,n<0&&(n=0)):n>s&&(n=s),nn)throw new RangeError("Trying to access beyond buffer length")}c.prototype.readUintLE=c.prototype.readUIntLE=function(r,n,s){r=r>>>0,n=n>>>0,s||Q(r,n,this.length);let f=this[r],d=1,y=0;for(;++y>>0,n=n>>>0,s||Q(r,n,this.length);let f=this[r+--n],d=1;for(;n>0&&(d*=256);)f+=this[r+--n]*d;return f},c.prototype.readUint8=c.prototype.readUInt8=function(r,n){return r=r>>>0,n||Q(r,1,this.length),this[r]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(r,n){return r=r>>>0,n||Q(r,2,this.length),this[r]|this[r+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(r,n){return r=r>>>0,n||Q(r,2,this.length),this[r]<<8|this[r+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(r,n){return r=r>>>0,n||Q(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(r,n){return r=r>>>0,n||Q(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])},c.prototype.readBigUInt64LE=ye(function(r){r=r>>>0,we(r,"offset");const n=this[r],s=this[r+7];(n===void 0||s===void 0)&&Oe(r,this.length-8);const f=n+this[++r]*2**8+this[++r]*2**16+this[++r]*2**24,d=this[++r]+this[++r]*2**8+this[++r]*2**16+s*2**24;return BigInt(f)+(BigInt(d)<>>0,we(r,"offset");const n=this[r],s=this[r+7];(n===void 0||s===void 0)&&Oe(r,this.length-8);const f=n*2**24+this[++r]*2**16+this[++r]*2**8+this[++r],d=this[++r]*2**24+this[++r]*2**16+this[++r]*2**8+s;return(BigInt(f)<>>0,n=n>>>0,s||Q(r,n,this.length);let f=this[r],d=1,y=0;for(;++y=d&&(f-=Math.pow(2,8*n)),f},c.prototype.readIntBE=function(r,n,s){r=r>>>0,n=n>>>0,s||Q(r,n,this.length);let f=n,d=1,y=this[r+--f];for(;f>0&&(d*=256);)y+=this[r+--f]*d;return d*=128,y>=d&&(y-=Math.pow(2,8*n)),y},c.prototype.readInt8=function(r,n){return r=r>>>0,n||Q(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]},c.prototype.readInt16LE=function(r,n){r=r>>>0,n||Q(r,2,this.length);const s=this[r]|this[r+1]<<8;return s&32768?s|4294901760:s},c.prototype.readInt16BE=function(r,n){r=r>>>0,n||Q(r,2,this.length);const s=this[r+1]|this[r]<<8;return s&32768?s|4294901760:s},c.prototype.readInt32LE=function(r,n){return r=r>>>0,n||Q(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24},c.prototype.readInt32BE=function(r,n){return r=r>>>0,n||Q(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]},c.prototype.readBigInt64LE=ye(function(r){r=r>>>0,we(r,"offset");const n=this[r],s=this[r+7];(n===void 0||s===void 0)&&Oe(r,this.length-8);const f=this[r+4]+this[r+5]*2**8+this[r+6]*2**16+(s<<24);return(BigInt(f)<>>0,we(r,"offset");const n=this[r],s=this[r+7];(n===void 0||s===void 0)&&Oe(r,this.length-8);const f=(n<<24)+this[++r]*2**16+this[++r]*2**8+this[++r];return(BigInt(f)<>>0,n||Q(r,4,this.length),p.read(this,r,!0,23,4)},c.prototype.readFloatBE=function(r,n){return r=r>>>0,n||Q(r,4,this.length),p.read(this,r,!1,23,4)},c.prototype.readDoubleLE=function(r,n){return r=r>>>0,n||Q(r,8,this.length),p.read(this,r,!0,52,8)},c.prototype.readDoubleBE=function(r,n){return r=r>>>0,n||Q(r,8,this.length),p.read(this,r,!1,52,8)};function J(o,r,n,s,f,d){if(!c.isBuffer(o))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>f||ro.length)throw new RangeError("Index out of range")}c.prototype.writeUintLE=c.prototype.writeUIntLE=function(r,n,s,f){if(r=+r,n=n>>>0,s=s>>>0,!f){const x=Math.pow(2,8*s)-1;J(this,r,n,s,x,0)}let d=1,y=0;for(this[n]=r&255;++y>>0,s=s>>>0,!f){const x=Math.pow(2,8*s)-1;J(this,r,n,s,x,0)}let d=s-1,y=1;for(this[n+d]=r&255;--d>=0&&(y*=256);)this[n+d]=r/y&255;return n+s},c.prototype.writeUint8=c.prototype.writeUInt8=function(r,n,s){return r=+r,n=n>>>0,s||J(this,r,n,1,255,0),this[n]=r&255,n+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(r,n,s){return r=+r,n=n>>>0,s||J(this,r,n,2,65535,0),this[n]=r&255,this[n+1]=r>>>8,n+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(r,n,s){return r=+r,n=n>>>0,s||J(this,r,n,2,65535,0),this[n]=r>>>8,this[n+1]=r&255,n+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(r,n,s){return r=+r,n=n>>>0,s||J(this,r,n,4,4294967295,0),this[n+3]=r>>>24,this[n+2]=r>>>16,this[n+1]=r>>>8,this[n]=r&255,n+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(r,n,s){return r=+r,n=n>>>0,s||J(this,r,n,4,4294967295,0),this[n]=r>>>24,this[n+1]=r>>>16,this[n+2]=r>>>8,this[n+3]=r&255,n+4};function bt(o,r,n,s,f){Je(r,s,f,o,n,7);let d=Number(r&BigInt(4294967295));o[n++]=d,d=d>>8,o[n++]=d,d=d>>8,o[n++]=d,d=d>>8,o[n++]=d;let y=Number(r>>BigInt(32)&BigInt(4294967295));return o[n++]=y,y=y>>8,o[n++]=y,y=y>>8,o[n++]=y,y=y>>8,o[n++]=y,n}function kt(o,r,n,s,f){Je(r,s,f,o,n,7);let d=Number(r&BigInt(4294967295));o[n+7]=d,d=d>>8,o[n+6]=d,d=d>>8,o[n+5]=d,d=d>>8,o[n+4]=d;let y=Number(r>>BigInt(32)&BigInt(4294967295));return o[n+3]=y,y=y>>8,o[n+2]=y,y=y>>8,o[n+1]=y,y=y>>8,o[n]=y,n+8}c.prototype.writeBigUInt64LE=ye(function(r,n=0){return bt(this,r,n,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeBigUInt64BE=ye(function(r,n=0){return kt(this,r,n,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeIntLE=function(r,n,s,f){if(r=+r,n=n>>>0,!f){const L=Math.pow(2,8*s-1);J(this,r,n,s,L-1,-L)}let d=0,y=1,x=0;for(this[n]=r&255;++d>0)-x&255;return n+s},c.prototype.writeIntBE=function(r,n,s,f){if(r=+r,n=n>>>0,!f){const L=Math.pow(2,8*s-1);J(this,r,n,s,L-1,-L)}let d=s-1,y=1,x=0;for(this[n+d]=r&255;--d>=0&&(y*=256);)r<0&&x===0&&this[n+d+1]!==0&&(x=1),this[n+d]=(r/y>>0)-x&255;return n+s},c.prototype.writeInt8=function(r,n,s){return r=+r,n=n>>>0,s||J(this,r,n,1,127,-128),r<0&&(r=255+r+1),this[n]=r&255,n+1},c.prototype.writeInt16LE=function(r,n,s){return r=+r,n=n>>>0,s||J(this,r,n,2,32767,-32768),this[n]=r&255,this[n+1]=r>>>8,n+2},c.prototype.writeInt16BE=function(r,n,s){return r=+r,n=n>>>0,s||J(this,r,n,2,32767,-32768),this[n]=r>>>8,this[n+1]=r&255,n+2},c.prototype.writeInt32LE=function(r,n,s){return r=+r,n=n>>>0,s||J(this,r,n,4,2147483647,-2147483648),this[n]=r&255,this[n+1]=r>>>8,this[n+2]=r>>>16,this[n+3]=r>>>24,n+4},c.prototype.writeInt32BE=function(r,n,s){return r=+r,n=n>>>0,s||J(this,r,n,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[n]=r>>>24,this[n+1]=r>>>16,this[n+2]=r>>>8,this[n+3]=r&255,n+4},c.prototype.writeBigInt64LE=ye(function(r,n=0){return bt(this,r,n,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeBigInt64BE=ye(function(r,n=0){return kt(this,r,n,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ot(o,r,n,s,f,d){if(n+s>o.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function ae(o,r,n,s,f){return r=+r,n=n>>>0,f||Ot(o,r,n,4),p.write(o,r,n,s,23,4),n+4}c.prototype.writeFloatLE=function(r,n,s){return ae(this,r,n,!0,s)},c.prototype.writeFloatBE=function(r,n,s){return ae(this,r,n,!1,s)};function re(o,r,n,s,f){return r=+r,n=n>>>0,f||Ot(o,r,n,8),p.write(o,r,n,s,52,8),n+8}c.prototype.writeDoubleLE=function(r,n,s){return re(this,r,n,!0,s)},c.prototype.writeDoubleBE=function(r,n,s){return re(this,r,n,!1,s)},c.prototype.copy=function(r,n,s,f){if(!c.isBuffer(r))throw new TypeError("argument should be a Buffer");if(s||(s=0),!f&&f!==0&&(f=this.length),n>=r.length&&(n=r.length),n||(n=0),f>0&&f=this.length)throw new RangeError("Index out of range");if(f<0)throw new RangeError("sourceEnd out of bounds");f>this.length&&(f=this.length),r.length-n>>0,s=s===void 0?this.length:s>>>0,r||(r=0);let d;if(typeof r=="number")for(d=n;d2**32?f=le(String(n)):typeof n=="bigint"&&(f=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(f=le(f)),f+="n"),s+=` It must be ${r}. Received ${f}`,s},RangeError);function le(o){let r="",n=o.length;const s=o[0]==="-"?1:0;for(;n>=s+4;n-=3)r=`_${o.slice(n-3,n)}${r}`;return`${o.slice(0,n)}${r}`}function yt(o,r,n){we(r,"offset"),(o[r]===void 0||o[r+n]===void 0)&&Oe(r,o.length-(n+1))}function Je(o,r,n,s,f,d){if(o>n||o3?r===0||r===BigInt(0)?x=`>= 0${y} and < 2${y} ** ${(d+1)*8}${y}`:x=`>= -(2${y} ** ${(d+1)*8-1}${y}) and < 2 ** ${(d+1)*8-1}${y}`:x=`>= ${r}${y} and <= ${n}${y}`,new Te.ERR_OUT_OF_RANGE("value",x,o)}yt(s,f,d)}function we(o,r){if(typeof o!="number")throw new Te.ERR_INVALID_ARG_TYPE(r,"number",o)}function Oe(o,r,n){throw Math.floor(o)!==o?(we(o,n),new Te.ERR_OUT_OF_RANGE(n||"offset","an integer",o)):r<0?new Te.ERR_BUFFER_OUT_OF_BOUNDS:new Te.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${r}`,o)}const _t=/[^+/0-9A-Za-z-_]/g;function wt(o){if(o=o.split("=")[0],o=o.trim().replace(_t,""),o.length<2)return"";for(;o.length%4!==0;)o=o+"=";return o}function be(o,r){r=r||1/0;let n;const s=o.length;let f=null;const d=[];for(let y=0;y55295&&n<57344){if(!f){if(n>56319){(r-=3)>-1&&d.push(239,191,189);continue}else if(y+1===s){(r-=3)>-1&&d.push(239,191,189);continue}f=n;continue}if(n<56320){(r-=3)>-1&&d.push(239,191,189),f=n;continue}n=(f-55296<<10|n-56320)+65536}else f&&(r-=3)>-1&&d.push(239,191,189);if(f=null,n<128){if((r-=1)<0)break;d.push(n)}else if(n<2048){if((r-=2)<0)break;d.push(n>>6|192,n&63|128)}else if(n<65536){if((r-=3)<0)break;d.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((r-=4)<0)break;d.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw new Error("Invalid code point")}return d}function Dt(o){const r=[];for(let n=0;n>8,f=n%256,d.push(f),d.push(s);return d}function De(o){return u.toByteArray(wt(o))}function ze(o,r,n,s){let f;for(f=0;f=r.length||f>=o.length);++f)r[f+n]=o[f];return f}function V(o,r){return o instanceof r||o!=null&&o.constructor!=null&&o.constructor.name!=null&&o.constructor.name===r.name}function fe(o){return o!==o}const Me=function(){const o="0123456789abcdef",r=new Array(256);for(let n=0;n<16;++n){const s=n*16;for(let f=0;f<16;++f)r[s+f]=o[n]+o[f]}return r}();function ye(o){return typeof BigInt>"u"?zt:o}function zt(){throw new Error("BigInt not supported")}}(Hr)),Hr}const la=65536;if(!globalThis.ReadableStream)try{const C=Xr,{emitWarning:u}=C;try{C.emitWarning=()=>{},Object.assign(globalThis,Xr),C.emitWarning=u}catch(p){throw C.emitWarning=u,p}}catch{Object.assign(globalThis,oa())}try{const{Blob:C}=ua();C&&!C.prototype.stream&&(C.prototype.stream=function(p){let m=0;const _=this;return new ReadableStream({type:"bytes",async pull(R){const c=await _.slice(m,Math.min(_.size,m+la)).arrayBuffer();m+=c.byteLength,R.enqueue(new Uint8Array(c)),m===_.size&&R.close()}})})}catch{}/*! fetch-blob. MIT License. Jimmy Wärting */const ci=65536;async function*Yr(C,u=!0){for(const p of C)if("stream"in p)yield*p.stream();else if(ArrayBuffer.isView(p))if(u){let m=p.byteOffset;const _=p.byteOffset+p.byteLength;for(;m!==_;){const R=Math.min(_-m,ci),w=p.buffer.slice(m,m+R);m+=w.byteLength,yield new Uint8Array(w)}}else yield p;else{let m=0,_=p;for(;m!==_.size;){const w=await _.slice(m,Math.min(_.size,m+ci)).arrayBuffer();m+=w.byteLength,yield new Uint8Array(w)}}}const yi=class Jr{#e=[];#t="";#r=0;#n="transparent";constructor(u=[],p={}){if(typeof u!="object"||u===null)throw new TypeError("Failed to construct 'Blob': The provided value cannot be converted to a sequence.");if(typeof u[Symbol.iterator]!="function")throw new TypeError("Failed to construct 'Blob': The object must have a callable @@iterator property.");if(typeof p!="object"&&typeof p!="function")throw new TypeError("Failed to construct 'Blob': parameter 2 cannot convert to dictionary.");p===null&&(p={});const m=new TextEncoder;for(const R of u){let w;ArrayBuffer.isView(R)?w=new Uint8Array(R.buffer.slice(R.byteOffset,R.byteOffset+R.byteLength)):R instanceof ArrayBuffer?w=new Uint8Array(R.slice(0)):R instanceof Jr?w=R:w=m.encode(`${R}`),this.#r+=ArrayBuffer.isView(w)?w.byteLength:w.size,this.#e.push(w)}this.#n=`${p.endings===void 0?"transparent":p.endings}`;const _=p.type===void 0?"":String(p.type);this.#t=/^[\x20-\x7E]*$/.test(_)?_:""}get size(){return this.#r}get type(){return this.#t}async text(){const u=new TextDecoder;let p="";for await(const m of Yr(this.#e,!1))p+=u.decode(m,{stream:!0});return p+=u.decode(),p}async arrayBuffer(){const u=new Uint8Array(this.size);let p=0;for await(const m of Yr(this.#e,!1))u.set(m,p),p+=m.length;return u.buffer}stream(){const u=Yr(this.#e,!0);return new globalThis.ReadableStream({type:"bytes",async pull(p){const m=await u.next();m.done?p.close():p.enqueue(m.value)},async cancel(){await u.return()}})}slice(u=0,p=this.size,m=""){const{size:_}=this;let R=u<0?Math.max(_+u,0):Math.min(u,_),w=p<0?Math.max(_+p,0):Math.min(p,_);const c=Math.max(w-R,0),G=this.#e,X=[];let F=0;for(const g of G){if(F>=c)break;const E=ArrayBuffer.isView(g)?g.byteLength:g.size;if(R&&E<=R)R-=E,w-=E;else{let T;ArrayBuffer.isView(g)?(T=g.subarray(R,Math.min(E,w)),F+=T.byteLength):(T=g.slice(R,Math.min(E,w)),F+=T.size),w-=E,X.push(T),R=0}}const B=new Jr([],{type:String(m).toLowerCase()});return B.#r=c,B.#e=X,B}get[Symbol.toStringTag](){return"Blob"}static[Symbol.hasInstance](u){return u&&typeof u=="object"&&typeof u.constructor=="function"&&(typeof u.stream=="function"||typeof u.arrayBuffer=="function")&&/^(Blob|File)$/.test(u[Symbol.toStringTag])}};Object.defineProperties(yi.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}});const Zr=yi;/*! node-domexception. MIT License. Jimmy Wärting */if(!globalThis.DOMException)try{const{MessageChannel:C}=Xr,u=new C().port1,p=new ArrayBuffer;u.postMessage(p,[p,p])}catch(C){C.constructor.name==="DOMException"&&(globalThis.DOMException=C.constructor)}var fa=globalThis.DOMException;const Z=ra(fa),ca=class extends Zr{#e=0;#t="";constructor(u,p,m={}){if(arguments.length<2)throw new TypeError(`Failed to construct 'File': 2 arguments required, but only ${arguments.length} present.`);super(u,m),m===null&&(m={});const _=m.lastModified===void 0?Date.now():Number(m.lastModified);Number.isNaN(_)||(this.#e=_),this.#t=String(p)}get name(){return this.#t}get lastModified(){return this.#e}get[Symbol.toStringTag](){return"File"}static[Symbol.hasInstance](u){return!!u&&u instanceof Zr&&/^(File)$/.test(u[Symbol.toStringTag])}},da=ca;var en=nw.require("fs");en.statSync;const ha=en.createReadStream,pa=en.promises;var ma=nw.require("path");const ba=ma.basename,{stat:_i}=pa,ya=(C,u)=>_i(C).then(p=>_a(p,C,u)),_a=(C,u,p="")=>new da([new tn({path:u,size:C.size,lastModified:C.mtimeMs,start:0})],ba(u),{type:p,lastModified:C.mtimeMs});class tn{#e;#t;constructor(u){this.#e=u.path,this.#t=u.start,this.size=u.size,this.lastModified=u.lastModified}slice(u,p){return new tn({path:this.#e,lastModified:this.lastModified,size:p-u,start:this.#t+u})}async*stream(){const{mtimeMs:u}=await _i(this.#e);if(u>this.lastModified)throw new Z("The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired.","NotReadableError");yield*ha(this.#e,{start:this.#t,end:this.#t+this.size-1})}get[Symbol.toStringTag](){return"Blob"}}const wa=globalThis&&globalThis.__classPrivateFieldGet||function(C,u,p,m){if(p==="a"&&!m)throw new TypeError("Private accessor was defined without a getter");if(typeof u=="function"?C!==u||!m:!u.has(C))throw new TypeError("Cannot read private member from an object whose class did not declare it");return p==="m"?m:p==="a"?m.call(C):m?m.value:u.get(C)};let Kr,wi;var ga=nw.require("path");const pr=ga.join;var oe=nw.require("fs").promises;const{INVALID:Sa,GONE:ke,MISMATCH:di,MOD_ERR:hi,SYNTAX:Qr}=bi;class Ra{constructor(u,p,m){this.position=0,this.fileHandle=u,this.path=p,this.size=m,this.position=0}async abort(){await this.fileHandle.close()}async write(u){try{await oe.stat(this.path)}catch(m){if(m.code==="ENOENT")throw await this.fileHandle.close().catch(),new Z(...ke)}if(na(u)){if(u.type==="write"){if(typeof u.position=="number"&&u.position>=0&&(this.position=u.position),!("data"in u))throw await this.fileHandle.close(),new Z(...Qr("write requires a data argument"));u=u.data}else if(u.type==="seek")if(Number.isInteger(u.position)&&u.position>=0){if(this.size=0){await this.fileHandle.truncate(u.size),this.size=u.size,this.position>this.size&&(this.position=this.size);return}else throw await this.fileHandle.close(),new Z(...Qr("truncate requires a size argument"))}if(u instanceof ArrayBuffer)u=new Uint8Array(u);else if(typeof u=="string")u=Buffer.from(u);else if(u instanceof Zr){for await(const m of u.stream()){const _=await this.fileHandle.writev([m],this.position);this.position+=_.bytesWritten,this.size+=_.bytesWritten}return}const p=await this.fileHandle.writev([u],this.position);this.position+=p.bytesWritten,this.size+=p.bytesWritten}async close(){await this.fileHandle.close(),await oe.stat(this.path).catch(u=>{if(u.code==="ENOENT")throw new Z(...ke)})}}class Ft{constructor(u,p){Kr.add(this),this.kind="file",this.writable=!0,this._path=u,this.name=p}async getFile(){return await oe.stat(this._path).catch(u=>{if(u.code==="ENOENT")throw new Z(...ke)}),await ya(this._path)}async isSameEntry(u){return this._path===wa(this,Kr,"m",wi).apply(u)}async createWritable(){const u=await oe.open(this._path,"r+").catch(m=>{throw m.code==="ENOENT"?new Z(...ke):m}),{size:p}=await u.stat();return new Ra(u,this._path,p)}}Kr=new WeakSet,wi=function(){return this._path};class lt{constructor(u="",p=""){this.kind="directory",this.writable=!0,this.name=p,this._path=u}async isSameEntry(u){return this._path===u._path}async*entries(){const u=this._path,p=await oe.readdir(u).catch(m=>{throw m.code==="ENOENT"?new Z(...ke):m});for(const m of p){const _=pr(u,m),R=await oe.lstat(_);R.isFile()?yield[m,new Ft(_,m)]:R.isDirectory()&&(yield[m,new lt(_,m)])}}async getDirectoryHandle(u,p={}){const m=pr(this._path,u),_=await oe.lstat(m).catch(w=>{if(w.code!=="ENOENT")throw w}),R=_?.isDirectory();if(_&&R)return new lt(m,u);if(_&&!R)throw new Z(...di);if(!p.create)throw new Z(...ke);return await oe.mkdir(m),new lt(m,u)}async getFileHandle(u,p={}){const m=pr(this._path,u),_=await oe.lstat(m).catch(w=>{if(w.code!=="ENOENT")throw w}),R=_?.isFile();if(_&&R)return new Ft(m,u);if(_&&!R)throw new Z(...di);if(!p.create)throw new Z(...ke);return await(await oe.open(m,"w")).close(),new Ft(m,u)}async queryPermission(){return"granted"}async removeEntry(u,p){const m=pr(this._path,u);(await oe.lstat(m).catch(R=>{throw R.code==="ENOENT"?new Z(...ke):R})).isDirectory()?p.recursive?await oe.rm(m,{recursive:!0}).catch(R=>{throw R.code==="ENOTEMPTY"?new Z(...hi):R}):await oe.rmdir(m).catch(R=>{throw R.code==="ENOTEMPTY"?new Z(...hi):R}):await oe.unlink(m)}}const{join:Ea,dirname:Vr,extname:Ca,basename:pi}=window.nw.require("path"),mr=window.nw.require("fs").promises,{GONE:Gr,MISMATCH:mi}=bi;class Aa{async handleDropEvent(u,p){u.stopPropagation(),u.preventDefault();const m=u.dataTransfer.items;return console.log(m),""}async getDirectoryHandle(u,p){try{const m=await mr.lstat(u).catch(R=>{if(R.code!=="ENOENT")throw R}),_=m?.isDirectory();if(m&&_)return new oi(new lt(u,Vr(u)));if(m&&!_)throw new DOMException(...mi);if(!p?.create)throw new DOMException(...Gr);return await mr.mkdir(u),new oi(new lt(u,Vr(u)))}catch(m){console.error(`Failed to get directory ${u}): `+m);return}}async hasFile(u){return await this.getFileHandle(u)!==void 0}async getFileHandle(u,p){try{const m=await mr.lstat(u).catch(R=>{if(R.code!=="ENOENT")throw R}),_=m?.isFile();if(m&&_)return new ai(new Ft(u,pi(u)));if(m&&!_)throw new DOMException(...mi);if(!p?.create)throw new DOMException(...Gr);return await(await mr.open(u,"w")).close(),new ai(new Ft(u,pi(u)))}catch(m){console.error("Failed to get file "+u+": "+m);return}}async getFileHandleRelativeTo(u,p){try{Ca(u)!=""&&(u=Vr(u));const m=await this.getDirectoryHandle(u);if(!m)throw new DOMException(...Gr);return await m.getFileHandle(p)}catch(m){console.error("Failed to get relative file "+p+": "+m);return}}async getDirectoryFiles(u){try{let p;if(typeof u=="string"){if(p=await this.getDirectoryHandle(u),!p)return[]}else p=u;const m=[];for await(const _ of p.values())_.kind=="file"&&m.push(_);return m}catch(p){return console.error(p),[]}}async getDirectoryFolders(u){try{let p;if(typeof u=="string"){if(p=await this.getDirectoryHandle(u),!p)return[]}else p=u;const m=[];for await(const _ of p.values())_.kind=="directory"&&m.push(_);return m}catch(p){return console.error(p),[]}}async writeFile(u,p){let m;if(typeof u=="string"){if(m=await this.getFileHandle(u,{create:!0}),!m){ia.createFormatted("Failed to write to "+u+"!","error");return}}else m=u;await this.writeHandle(m,p)}async writeHandle(u,p){const m=p instanceof Blob?p.size:p.length,_=await u.createWritable();await _.write(p),await _.truncate(m),await _.close()}getRelativePath(u,p){return Ea(u,p)}}export{Aa as NodeFileHandler}; + */var fi;function ua(){return fi||(fi=1,function(C){const u=aa(),m=sa(),p=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;C.Buffer=c,C.SlowBuffer=U,C.INSPECT_MAX_BYTES=50;const w=2147483647;C.kMaxLength=w,c.TYPED_ARRAY_SUPPORT=R(),!c.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function R(){try{const o=new Uint8Array(1),r={foo:function(){return 42}};return Object.setPrototypeOf(r,Uint8Array.prototype),Object.setPrototypeOf(o,r),o.foo()===42}catch{return!1}}Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}});function _(o){if(o>w)throw new RangeError('The value "'+o+'" is invalid for option "size"');const r=new Uint8Array(o);return Object.setPrototypeOf(r,c.prototype),r}function c(o,r,n){if(typeof o=="number"){if(typeof r=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return B(o)}return G(o,r,n)}c.poolSize=8192;function G(o,r,n){if(typeof o=="string")return g(o,r);if(ArrayBuffer.isView(o))return T(o);if(o==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof o);if(V(o,ArrayBuffer)||o&&V(o.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(V(o,SharedArrayBuffer)||o&&V(o.buffer,SharedArrayBuffer)))return O(o,r,n);if(typeof o=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const s=o.valueOf&&o.valueOf();if(s!=null&&s!==o)return c.from(s,r,n);const f=Y(o);if(f)return f;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof o[Symbol.toPrimitive]=="function")return c.from(o[Symbol.toPrimitive]("string"),r,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof o)}c.from=function(o,r,n){return G(o,r,n)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array);function X(o){if(typeof o!="number")throw new TypeError('"size" argument must be of type number');if(o<0)throw new RangeError('The value "'+o+'" is invalid for option "size"')}function F(o,r,n){return X(o),o<=0?_(o):r!==void 0?typeof n=="string"?_(o).fill(r,n):_(o).fill(r):_(o)}c.alloc=function(o,r,n){return F(o,r,n)};function B(o){return X(o),_(o<0?0:j(o)|0)}c.allocUnsafe=function(o){return B(o)},c.allocUnsafeSlow=function(o){return B(o)};function g(o,r){if((typeof r!="string"||r==="")&&(r="utf8"),!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r);const n=H(o,r)|0;let s=_(n);const f=s.write(o,r);return f!==n&&(s=s.slice(0,f)),s}function E(o){const r=o.length<0?0:j(o.length)|0,n=_(r);for(let s=0;s=w)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+w.toString(16)+" bytes");return o|0}function U(o){return+o!=o&&(o=0),c.alloc(+o)}c.isBuffer=function(r){return r!=null&&r._isBuffer===!0&&r!==c.prototype},c.compare=function(r,n){if(V(r,Uint8Array)&&(r=c.from(r,r.offset,r.byteLength)),V(n,Uint8Array)&&(n=c.from(n,n.offset,n.byteLength)),!c.isBuffer(r)||!c.isBuffer(n))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===n)return 0;let s=r.length,f=n.length;for(let d=0,y=Math.min(s,f);df.length?(c.isBuffer(y)||(y=c.from(y)),y.copy(f,d)):Uint8Array.prototype.set.call(f,y,d);else if(c.isBuffer(y))y.copy(f,d);else throw new TypeError('"list" argument must be an Array of Buffers');d+=y.length}return f};function H(o,r){if(c.isBuffer(o))return o.length;if(ArrayBuffer.isView(o)||V(o,ArrayBuffer))return o.byteLength;if(typeof o!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof o);const n=o.length,s=arguments.length>2&&arguments[2]===!0;if(!s&&n===0)return 0;let f=!1;for(;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return be(o).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return n*2;case"hex":return n>>>1;case"base64":return De(o).length;default:if(f)return s?-1:be(o).length;r=(""+r).toLowerCase(),f=!0}}c.byteLength=H;function ee(o,r,n){let s=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((n===void 0||n>this.length)&&(n=this.length),n<=0)||(n>>>=0,r>>>=0,n<=r))return"";for(o||(o="utf8");;)switch(o){case"hex":return br(this,r,n);case"utf8":case"utf-8":return Ve(this,r,n);case"ascii":return pt(this,r,n);case"latin1":case"binary":return kt(this,r,n);case"base64":return vt(this,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return mt(this,r,n);default:if(s)throw new TypeError("Unknown encoding: "+o);o=(o+"").toLowerCase(),s=!0}}c.prototype._isBuffer=!0;function D(o,r,n){const s=o[r];o[r]=o[n],o[n]=s}c.prototype.swap16=function(){const r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let n=0;nn&&(r+=" ... "),""},p&&(c.prototype[p]=c.prototype.inspect),c.prototype.compare=function(r,n,s,f,d){if(V(r,Uint8Array)&&(r=c.from(r,r.offset,r.byteLength)),!c.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof r);if(n===void 0&&(n=0),s===void 0&&(s=r?r.length:0),f===void 0&&(f=0),d===void 0&&(d=this.length),n<0||s>r.length||f<0||d>this.length)throw new RangeError("out of range index");if(f>=d&&n>=s)return 0;if(f>=d)return-1;if(n>=s)return 1;if(n>>>=0,s>>>=0,f>>>=0,d>>>=0,this===r)return 0;let y=d-f,x=s-n;const L=Math.min(y,x),z=this.slice(f,d),$=r.slice(n,s);for(let k=0;k2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,fe(n)&&(n=f?0:o.length-1),n<0&&(n=o.length+n),n>=o.length){if(f)return-1;n=o.length-1}else if(n<0)if(f)n=0;else return-1;if(typeof r=="string"&&(r=c.from(r,s)),c.isBuffer(r))return r.length===0?-1:te(o,r,n,s,f);if(typeof r=="number")return r=r&255,typeof Uint8Array.prototype.indexOf=="function"?f?Uint8Array.prototype.indexOf.call(o,r,n):Uint8Array.prototype.lastIndexOf.call(o,r,n):te(o,[r],n,s,f);throw new TypeError("val must be string, number or Buffer")}function te(o,r,n,s,f){let d=1,y=o.length,x=r.length;if(s!==void 0&&(s=String(s).toLowerCase(),s==="ucs2"||s==="ucs-2"||s==="utf16le"||s==="utf-16le")){if(o.length<2||r.length<2)return-1;d=2,y/=2,x/=2,n/=2}function L($,k){return d===1?$[k]:$.readUInt16BE(k*d)}let z;if(f){let $=-1;for(z=n;zy&&(n=y-x),z=n;z>=0;z--){let $=!0;for(let k=0;kf&&(s=f)):s=f;const d=r.length;s>d/2&&(s=d/2);let y;for(y=0;y>>0,isFinite(s)?(s=s>>>0,f===void 0&&(f="utf8")):(f=s,s=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const d=this.length-n;if((s===void 0||s>d)&&(s=d),r.length>0&&(s<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");f||(f="utf8");let y=!1;for(;;)switch(f){case"hex":return xt(this,r,n,s);case"utf8":case"utf-8":return Wt(this,r,n,s);case"ascii":case"latin1":case"binary":return ct(this,r,n,s);case"base64":return dt(this,r,n,s);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ht(this,r,n,s);default:if(y)throw new TypeError("Unknown encoding: "+f);f=(""+f).toLowerCase(),y=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function vt(o,r,n){return r===0&&n===o.length?u.fromByteArray(o):u.fromByteArray(o.slice(r,n))}function Ve(o,r,n){n=Math.min(o.length,n);const s=[];let f=r;for(;f239?4:d>223?3:d>191?2:1;if(f+x<=n){let L,z,$,k;switch(x){case 1:d<128&&(y=d);break;case 2:L=o[f+1],(L&192)===128&&(k=(d&31)<<6|L&63,k>127&&(y=k));break;case 3:L=o[f+1],z=o[f+2],(L&192)===128&&(z&192)===128&&(k=(d&15)<<12|(L&63)<<6|z&63,k>2047&&(k<55296||k>57343)&&(y=k));break;case 4:L=o[f+1],z=o[f+2],$=o[f+3],(L&192)===128&&(z&192)===128&&($&192)===128&&(k=(d&15)<<18|(L&63)<<12|(z&63)<<6|$&63,k>65535&&k<1114112&&(y=k))}}y===null?(y=65533,x=1):y>65535&&(y-=65536,s.push(y>>>10&1023|55296),y=56320|y&1023),s.push(y),f+=x}return Ge(s)}const ue=4096;function Ge(o){const r=o.length;if(r<=ue)return String.fromCharCode.apply(String,o);let n="",s=0;for(;ss)&&(n=s);let f="";for(let d=r;ds&&(r=s),n<0?(n+=s,n<0&&(n=0)):n>s&&(n=s),nn)throw new RangeError("Trying to access beyond buffer length")}c.prototype.readUintLE=c.prototype.readUIntLE=function(r,n,s){r=r>>>0,n=n>>>0,s||Q(r,n,this.length);let f=this[r],d=1,y=0;for(;++y>>0,n=n>>>0,s||Q(r,n,this.length);let f=this[r+--n],d=1;for(;n>0&&(d*=256);)f+=this[r+--n]*d;return f},c.prototype.readUint8=c.prototype.readUInt8=function(r,n){return r=r>>>0,n||Q(r,1,this.length),this[r]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(r,n){return r=r>>>0,n||Q(r,2,this.length),this[r]|this[r+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(r,n){return r=r>>>0,n||Q(r,2,this.length),this[r]<<8|this[r+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(r,n){return r=r>>>0,n||Q(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(r,n){return r=r>>>0,n||Q(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])},c.prototype.readBigUInt64LE=ye(function(r){r=r>>>0,we(r,"offset");const n=this[r],s=this[r+7];(n===void 0||s===void 0)&&Oe(r,this.length-8);const f=n+this[++r]*2**8+this[++r]*2**16+this[++r]*2**24,d=this[++r]+this[++r]*2**8+this[++r]*2**16+s*2**24;return BigInt(f)+(BigInt(d)<>>0,we(r,"offset");const n=this[r],s=this[r+7];(n===void 0||s===void 0)&&Oe(r,this.length-8);const f=n*2**24+this[++r]*2**16+this[++r]*2**8+this[++r],d=this[++r]*2**24+this[++r]*2**16+this[++r]*2**8+s;return(BigInt(f)<>>0,n=n>>>0,s||Q(r,n,this.length);let f=this[r],d=1,y=0;for(;++y=d&&(f-=Math.pow(2,8*n)),f},c.prototype.readIntBE=function(r,n,s){r=r>>>0,n=n>>>0,s||Q(r,n,this.length);let f=n,d=1,y=this[r+--f];for(;f>0&&(d*=256);)y+=this[r+--f]*d;return d*=128,y>=d&&(y-=Math.pow(2,8*n)),y},c.prototype.readInt8=function(r,n){return r=r>>>0,n||Q(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]},c.prototype.readInt16LE=function(r,n){r=r>>>0,n||Q(r,2,this.length);const s=this[r]|this[r+1]<<8;return s&32768?s|4294901760:s},c.prototype.readInt16BE=function(r,n){r=r>>>0,n||Q(r,2,this.length);const s=this[r+1]|this[r]<<8;return s&32768?s|4294901760:s},c.prototype.readInt32LE=function(r,n){return r=r>>>0,n||Q(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24},c.prototype.readInt32BE=function(r,n){return r=r>>>0,n||Q(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]},c.prototype.readBigInt64LE=ye(function(r){r=r>>>0,we(r,"offset");const n=this[r],s=this[r+7];(n===void 0||s===void 0)&&Oe(r,this.length-8);const f=this[r+4]+this[r+5]*2**8+this[r+6]*2**16+(s<<24);return(BigInt(f)<>>0,we(r,"offset");const n=this[r],s=this[r+7];(n===void 0||s===void 0)&&Oe(r,this.length-8);const f=(n<<24)+this[++r]*2**16+this[++r]*2**8+this[++r];return(BigInt(f)<>>0,n||Q(r,4,this.length),m.read(this,r,!0,23,4)},c.prototype.readFloatBE=function(r,n){return r=r>>>0,n||Q(r,4,this.length),m.read(this,r,!1,23,4)},c.prototype.readDoubleLE=function(r,n){return r=r>>>0,n||Q(r,8,this.length),m.read(this,r,!0,52,8)},c.prototype.readDoubleBE=function(r,n){return r=r>>>0,n||Q(r,8,this.length),m.read(this,r,!1,52,8)};function J(o,r,n,s,f,d){if(!c.isBuffer(o))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>f||ro.length)throw new RangeError("Index out of range")}c.prototype.writeUintLE=c.prototype.writeUIntLE=function(r,n,s,f){if(r=+r,n=n>>>0,s=s>>>0,!f){const x=Math.pow(2,8*s)-1;J(this,r,n,s,x,0)}let d=1,y=0;for(this[n]=r&255;++y>>0,s=s>>>0,!f){const x=Math.pow(2,8*s)-1;J(this,r,n,s,x,0)}let d=s-1,y=1;for(this[n+d]=r&255;--d>=0&&(y*=256);)this[n+d]=r/y&255;return n+s},c.prototype.writeUint8=c.prototype.writeUInt8=function(r,n,s){return r=+r,n=n>>>0,s||J(this,r,n,1,255,0),this[n]=r&255,n+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(r,n,s){return r=+r,n=n>>>0,s||J(this,r,n,2,65535,0),this[n]=r&255,this[n+1]=r>>>8,n+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(r,n,s){return r=+r,n=n>>>0,s||J(this,r,n,2,65535,0),this[n]=r>>>8,this[n+1]=r&255,n+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(r,n,s){return r=+r,n=n>>>0,s||J(this,r,n,4,4294967295,0),this[n+3]=r>>>24,this[n+2]=r>>>16,this[n+1]=r>>>8,this[n]=r&255,n+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(r,n,s){return r=+r,n=n>>>0,s||J(this,r,n,4,4294967295,0),this[n]=r>>>24,this[n+1]=r>>>16,this[n+2]=r>>>8,this[n+3]=r&255,n+4};function bt(o,r,n,s,f){Je(r,s,f,o,n,7);let d=Number(r&BigInt(4294967295));o[n++]=d,d=d>>8,o[n++]=d,d=d>>8,o[n++]=d,d=d>>8,o[n++]=d;let y=Number(r>>BigInt(32)&BigInt(4294967295));return o[n++]=y,y=y>>8,o[n++]=y,y=y>>8,o[n++]=y,y=y>>8,o[n++]=y,n}function Ot(o,r,n,s,f){Je(r,s,f,o,n,7);let d=Number(r&BigInt(4294967295));o[n+7]=d,d=d>>8,o[n+6]=d,d=d>>8,o[n+5]=d,d=d>>8,o[n+4]=d;let y=Number(r>>BigInt(32)&BigInt(4294967295));return o[n+3]=y,y=y>>8,o[n+2]=y,y=y>>8,o[n+1]=y,y=y>>8,o[n]=y,n+8}c.prototype.writeBigUInt64LE=ye(function(r,n=0){return bt(this,r,n,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeBigUInt64BE=ye(function(r,n=0){return Ot(this,r,n,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeIntLE=function(r,n,s,f){if(r=+r,n=n>>>0,!f){const L=Math.pow(2,8*s-1);J(this,r,n,s,L-1,-L)}let d=0,y=1,x=0;for(this[n]=r&255;++d>0)-x&255;return n+s},c.prototype.writeIntBE=function(r,n,s,f){if(r=+r,n=n>>>0,!f){const L=Math.pow(2,8*s-1);J(this,r,n,s,L-1,-L)}let d=s-1,y=1,x=0;for(this[n+d]=r&255;--d>=0&&(y*=256);)r<0&&x===0&&this[n+d+1]!==0&&(x=1),this[n+d]=(r/y>>0)-x&255;return n+s},c.prototype.writeInt8=function(r,n,s){return r=+r,n=n>>>0,s||J(this,r,n,1,127,-128),r<0&&(r=255+r+1),this[n]=r&255,n+1},c.prototype.writeInt16LE=function(r,n,s){return r=+r,n=n>>>0,s||J(this,r,n,2,32767,-32768),this[n]=r&255,this[n+1]=r>>>8,n+2},c.prototype.writeInt16BE=function(r,n,s){return r=+r,n=n>>>0,s||J(this,r,n,2,32767,-32768),this[n]=r>>>8,this[n+1]=r&255,n+2},c.prototype.writeInt32LE=function(r,n,s){return r=+r,n=n>>>0,s||J(this,r,n,4,2147483647,-2147483648),this[n]=r&255,this[n+1]=r>>>8,this[n+2]=r>>>16,this[n+3]=r>>>24,n+4},c.prototype.writeInt32BE=function(r,n,s){return r=+r,n=n>>>0,s||J(this,r,n,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[n]=r>>>24,this[n+1]=r>>>16,this[n+2]=r>>>8,this[n+3]=r&255,n+4},c.prototype.writeBigInt64LE=ye(function(r,n=0){return bt(this,r,n,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeBigInt64BE=ye(function(r,n=0){return Ot(this,r,n,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Dt(o,r,n,s,f,d){if(n+s>o.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function ae(o,r,n,s,f){return r=+r,n=n>>>0,f||Dt(o,r,n,4),m.write(o,r,n,s,23,4),n+4}c.prototype.writeFloatLE=function(r,n,s){return ae(this,r,n,!0,s)},c.prototype.writeFloatBE=function(r,n,s){return ae(this,r,n,!1,s)};function re(o,r,n,s,f){return r=+r,n=n>>>0,f||Dt(o,r,n,8),m.write(o,r,n,s,52,8),n+8}c.prototype.writeDoubleLE=function(r,n,s){return re(this,r,n,!0,s)},c.prototype.writeDoubleBE=function(r,n,s){return re(this,r,n,!1,s)},c.prototype.copy=function(r,n,s,f){if(!c.isBuffer(r))throw new TypeError("argument should be a Buffer");if(s||(s=0),!f&&f!==0&&(f=this.length),n>=r.length&&(n=r.length),n||(n=0),f>0&&f=this.length)throw new RangeError("Index out of range");if(f<0)throw new RangeError("sourceEnd out of bounds");f>this.length&&(f=this.length),r.length-n>>0,s=s===void 0?this.length:s>>>0,r||(r=0);let d;if(typeof r=="number")for(d=n;d2**32?f=le(String(n)):typeof n=="bigint"&&(f=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(f=le(f)),f+="n"),s+=` It must be ${r}. Received ${f}`,s},RangeError);function le(o){let r="",n=o.length;const s=o[0]==="-"?1:0;for(;n>=s+4;n-=3)r=`_${o.slice(n-3,n)}${r}`;return`${o.slice(0,n)}${r}`}function yt(o,r,n){we(r,"offset"),(o[r]===void 0||o[r+n]===void 0)&&Oe(r,o.length-(n+1))}function Je(o,r,n,s,f,d){if(o>n||o3?r===0||r===BigInt(0)?x=`>= 0${y} and < 2${y} ** ${(d+1)*8}${y}`:x=`>= -(2${y} ** ${(d+1)*8-1}${y}) and < 2 ** ${(d+1)*8-1}${y}`:x=`>= ${r}${y} and <= ${n}${y}`,new Te.ERR_OUT_OF_RANGE("value",x,o)}yt(s,f,d)}function we(o,r){if(typeof o!="number")throw new Te.ERR_INVALID_ARG_TYPE(r,"number",o)}function Oe(o,r,n){throw Math.floor(o)!==o?(we(o,n),new Te.ERR_OUT_OF_RANGE(n||"offset","an integer",o)):r<0?new Te.ERR_BUFFER_OUT_OF_BOUNDS:new Te.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${r}`,o)}const _t=/[^+/0-9A-Za-z-_]/g;function wt(o){if(o=o.split("=")[0],o=o.trim().replace(_t,""),o.length<2)return"";for(;o.length%4!==0;)o=o+"=";return o}function be(o,r){r=r||1/0;let n;const s=o.length;let f=null;const d=[];for(let y=0;y55295&&n<57344){if(!f){if(n>56319){(r-=3)>-1&&d.push(239,191,189);continue}else if(y+1===s){(r-=3)>-1&&d.push(239,191,189);continue}f=n;continue}if(n<56320){(r-=3)>-1&&d.push(239,191,189),f=n;continue}n=(f-55296<<10|n-56320)+65536}else f&&(r-=3)>-1&&d.push(239,191,189);if(f=null,n<128){if((r-=1)<0)break;d.push(n)}else if(n<2048){if((r-=2)<0)break;d.push(n>>6|192,n&63|128)}else if(n<65536){if((r-=3)<0)break;d.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((r-=4)<0)break;d.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw new Error("Invalid code point")}return d}function zt(o){const r=[];for(let n=0;n>8,f=n%256,d.push(f),d.push(s);return d}function De(o){return u.toByteArray(wt(o))}function ze(o,r,n,s){let f;for(f=0;f=r.length||f>=o.length);++f)r[f+n]=o[f];return f}function V(o,r){return o instanceof r||o!=null&&o.constructor!=null&&o.constructor.name!=null&&o.constructor.name===r.name}function fe(o){return o!==o}const Me=function(){const o="0123456789abcdef",r=new Array(256);for(let n=0;n<16;++n){const s=n*16;for(let f=0;f<16;++f)r[s+f]=o[n]+o[f]}return r}();function ye(o){return typeof BigInt>"u"?Mt:o}function Mt(){throw new Error("BigInt not supported")}}(Hr)),Hr}const la=65536;if(!globalThis.ReadableStream)try{const C=Xr,{emitWarning:u}=C;try{C.emitWarning=()=>{},Object.assign(globalThis,Xr),C.emitWarning=u}catch(m){throw C.emitWarning=u,m}}catch{Object.assign(globalThis,oa())}try{const{Blob:C}=ua();C&&!C.prototype.stream&&(C.prototype.stream=function(m){let p=0;const w=this;return new ReadableStream({type:"bytes",async pull(R){const c=await w.slice(p,Math.min(w.size,p+la)).arrayBuffer();p+=c.byteLength,R.enqueue(new Uint8Array(c)),p===w.size&&R.close()}})})}catch{}/*! fetch-blob. MIT License. Jimmy Wärting */const ci=65536;async function*Yr(C,u=!0){for(const m of C)if("stream"in m)yield*m.stream();else if(ArrayBuffer.isView(m))if(u){let p=m.byteOffset;const w=m.byteOffset+m.byteLength;for(;p!==w;){const R=Math.min(w-p,ci),_=m.buffer.slice(p,p+R);p+=_.byteLength,yield new Uint8Array(_)}}else yield m;else{let p=0,w=m;for(;p!==w.size;){const _=await w.slice(p,Math.min(w.size,p+ci)).arrayBuffer();p+=_.byteLength,yield new Uint8Array(_)}}}const yi=class Jr{#e=[];#t="";#r=0;#n="transparent";constructor(u=[],m={}){if(typeof u!="object"||u===null)throw new TypeError("Failed to construct 'Blob': The provided value cannot be converted to a sequence.");if(typeof u[Symbol.iterator]!="function")throw new TypeError("Failed to construct 'Blob': The object must have a callable @@iterator property.");if(typeof m!="object"&&typeof m!="function")throw new TypeError("Failed to construct 'Blob': parameter 2 cannot convert to dictionary.");m===null&&(m={});const p=new TextEncoder;for(const R of u){let _;ArrayBuffer.isView(R)?_=new Uint8Array(R.buffer.slice(R.byteOffset,R.byteOffset+R.byteLength)):R instanceof ArrayBuffer?_=new Uint8Array(R.slice(0)):R instanceof Jr?_=R:_=p.encode(`${R}`),this.#r+=ArrayBuffer.isView(_)?_.byteLength:_.size,this.#e.push(_)}this.#n=`${m.endings===void 0?"transparent":m.endings}`;const w=m.type===void 0?"":String(m.type);this.#t=/^[\x20-\x7E]*$/.test(w)?w:""}get size(){return this.#r}get type(){return this.#t}async text(){const u=new TextDecoder;let m="";for await(const p of Yr(this.#e,!1))m+=u.decode(p,{stream:!0});return m+=u.decode(),m}async arrayBuffer(){const u=new Uint8Array(this.size);let m=0;for await(const p of Yr(this.#e,!1))u.set(p,m),m+=p.length;return u.buffer}stream(){const u=Yr(this.#e,!0);return new globalThis.ReadableStream({type:"bytes",async pull(m){const p=await u.next();p.done?m.close():m.enqueue(p.value)},async cancel(){await u.return()}})}slice(u=0,m=this.size,p=""){const{size:w}=this;let R=u<0?Math.max(w+u,0):Math.min(u,w),_=m<0?Math.max(w+m,0):Math.min(m,w);const c=Math.max(_-R,0),G=this.#e,X=[];let F=0;for(const g of G){if(F>=c)break;const E=ArrayBuffer.isView(g)?g.byteLength:g.size;if(R&&E<=R)R-=E,_-=E;else{let T;ArrayBuffer.isView(g)?(T=g.subarray(R,Math.min(E,_)),F+=T.byteLength):(T=g.slice(R,Math.min(E,_)),F+=T.size),_-=E,X.push(T),R=0}}const B=new Jr([],{type:String(p).toLowerCase()});return B.#r=c,B.#e=X,B}get[Symbol.toStringTag](){return"Blob"}static[Symbol.hasInstance](u){return u&&typeof u=="object"&&typeof u.constructor=="function"&&(typeof u.stream=="function"||typeof u.arrayBuffer=="function")&&/^(Blob|File)$/.test(u[Symbol.toStringTag])}};Object.defineProperties(yi.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}});const Zr=yi;/*! node-domexception. MIT License. Jimmy Wärting */if(!globalThis.DOMException)try{const{MessageChannel:C}=Xr,u=new C().port1,m=new ArrayBuffer;u.postMessage(m,[m,m])}catch(C){C.constructor.name==="DOMException"&&(globalThis.DOMException=C.constructor)}var fa=globalThis.DOMException;const Z=ra(fa),ca=class extends Zr{#e=0;#t="";constructor(u,m,p={}){if(arguments.length<2)throw new TypeError(`Failed to construct 'File': 2 arguments required, but only ${arguments.length} present.`);super(u,p),p===null&&(p={});const w=p.lastModified===void 0?Date.now():Number(p.lastModified);Number.isNaN(w)||(this.#e=w),this.#t=String(m)}get name(){return this.#t}get lastModified(){return this.#e}get[Symbol.toStringTag](){return"File"}static[Symbol.hasInstance](u){return!!u&&u instanceof Zr&&/^(File)$/.test(u[Symbol.toStringTag])}},da=ca;var en=nw.require("fs");en.statSync;const ha=en.createReadStream,pa=en.promises;var ma=nw.require("path");const ba=ma.basename,{stat:_i}=pa,ya=(C,u)=>_i(C).then(m=>_a(m,C,u)),_a=(C,u,m="")=>new da([new tn({path:u,size:C.size,lastModified:C.mtimeMs,start:0})],ba(u),{type:m,lastModified:C.mtimeMs});class tn{#e;#t;constructor(u){this.#e=u.path,this.#t=u.start,this.size=u.size,this.lastModified=u.lastModified}slice(u,m){return new tn({path:this.#e,lastModified:this.lastModified,size:m-u,start:this.#t+u})}async*stream(){const{mtimeMs:u}=await _i(this.#e);if(u>this.lastModified)throw new Z("The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired.","NotReadableError");yield*ha(this.#e,{start:this.#t,end:this.#t+this.size-1})}get[Symbol.toStringTag](){return"Blob"}}const wa=globalThis&&globalThis.__classPrivateFieldGet||function(C,u,m,p){if(m==="a"&&!p)throw new TypeError("Private accessor was defined without a getter");if(typeof u=="function"?C!==u||!p:!u.has(C))throw new TypeError("Cannot read private member from an object whose class did not declare it");return m==="m"?p:m==="a"?p.call(C):p?p.value:u.get(C)};let Kr,wi;var ga=nw.require("path");const mr=ga.join;var oe=nw.require("fs").promises;const{INVALID:Sa,GONE:ke,MISMATCH:di,MOD_ERR:hi,SYNTAX:Qr}=bi;class Ra{constructor(u,m,p){this.position=0,this.fileHandle=u,this.path=m,this.size=p,this.position=0}async abort(){await this.fileHandle.close()}async write(u){try{await oe.stat(this.path)}catch(p){if(p.code==="ENOENT")throw await this.fileHandle.close().catch(),new Z(...ke)}if(na(u)){if(u.type==="write"){if(typeof u.position=="number"&&u.position>=0&&(this.position=u.position),!("data"in u))throw await this.fileHandle.close(),new Z(...Qr("write requires a data argument"));u=u.data}else if(u.type==="seek")if(Number.isInteger(u.position)&&u.position>=0){if(this.size=0){await this.fileHandle.truncate(u.size),this.size=u.size,this.position>this.size&&(this.position=this.size);return}else throw await this.fileHandle.close(),new Z(...Qr("truncate requires a size argument"))}if(u instanceof ArrayBuffer)u=new Uint8Array(u);else if(typeof u=="string")u=Buffer.from(u);else if(u instanceof Zr){for await(const p of u.stream()){const w=await this.fileHandle.writev([p],this.position);this.position+=w.bytesWritten,this.size+=w.bytesWritten}return}const m=await this.fileHandle.writev([u],this.position);this.position+=m.bytesWritten,this.size+=m.bytesWritten}async close(){await this.fileHandle.close(),await oe.stat(this.path).catch(u=>{if(u.code==="ENOENT")throw new Z(...ke)})}}class qt{constructor(u,m){Kr.add(this),this.kind="file",this.writable=!0,this._path=u,this.name=m}async getFile(){return await oe.stat(this._path).catch(u=>{if(u.code==="ENOENT")throw new Z(...ke)}),await ya(this._path)}async isSameEntry(u){return this._path===wa(this,Kr,"m",wi).apply(u)}async createWritable(){const u=await oe.open(this._path,"r+").catch(p=>{throw p.code==="ENOENT"?new Z(...ke):p}),{size:m}=await u.stat();return new Ra(u,this._path,m)}}Kr=new WeakSet,wi=function(){return this._path};class lt{constructor(u="",m=""){this.kind="directory",this.writable=!0,this.name=m,this._path=u}async isSameEntry(u){return this._path===u._path}async*entries(){const u=this._path,m=await oe.readdir(u).catch(p=>{throw p.code==="ENOENT"?new Z(...ke):p});for(const p of m){const w=mr(u,p),R=await oe.lstat(w);R.isFile()?yield[p,new qt(w,p)]:R.isDirectory()&&(yield[p,new lt(w,p)])}}async getDirectoryHandle(u,m={}){const p=mr(this._path,u),w=await oe.lstat(p).catch(_=>{if(_.code!=="ENOENT")throw _}),R=w?.isDirectory();if(w&&R)return new lt(p,u);if(w&&!R)throw new Z(...di);if(!m.create)throw new Z(...ke);return await oe.mkdir(p),new lt(p,u)}async getFileHandle(u,m={}){const p=mr(this._path,u),w=await oe.lstat(p).catch(_=>{if(_.code!=="ENOENT")throw _}),R=w?.isFile();if(w&&R)return new qt(p,u);if(w&&!R)throw new Z(...di);if(!m.create)throw new Z(...ke);return await(await oe.open(p,"w")).close(),new qt(p,u)}async queryPermission(){return"granted"}async removeEntry(u,m){const p=mr(this._path,u);(await oe.lstat(p).catch(R=>{throw R.code==="ENOENT"?new Z(...ke):R})).isDirectory()?m.recursive?await oe.rm(p,{recursive:!0}).catch(R=>{throw R.code==="ENOTEMPTY"?new Z(...hi):R}):await oe.rmdir(p).catch(R=>{throw R.code==="ENOTEMPTY"?new Z(...hi):R}):await oe.unlink(p)}}const{join:Ea,dirname:Vr,extname:Ca,basename:pi}=window.nw.require("path"),Ft=window.nw.require("fs").promises,{GONE:Gr,MISMATCH:mi}=bi;class Aa{async handleDropEvent(u,m){u.stopPropagation(),u.preventDefault();const p=u.dataTransfer.items;return console.log(p),""}async getDirectoryHandle(u,m){try{const p=await Ft.lstat(u).catch(R=>{if(R.code!=="ENOENT")throw R}),w=p?.isDirectory();if(p&&w)return new oi(new lt(u,Vr(u)));if(p&&!w)throw new DOMException(...mi);if(!m?.create)throw new DOMException(...Gr);return await Ft.mkdir(u),new oi(new lt(u,Vr(u)))}catch(p){console.error(`Failed to get directory ${u}): `+p);return}}async hasFile(u){return await this.getFileHandle(u)!==void 0}async getFileHandle(u,m){try{const p=await Ft.lstat(u).catch(R=>{if(R.code!=="ENOENT")throw R}),w=p?.isFile();if(p&&w)return new ai(new qt(u,pi(u)));if(p&&!w)throw new DOMException(...mi);if(!m?.create)throw new DOMException(...Gr);return await(await Ft.open(u,"w")).close(),new ai(new qt(u,pi(u)))}catch(p){console.error("Failed to get file "+u+": "+p);return}}async getFileHandleRelativeTo(u,m){try{Ca(u)!=""&&(u=Vr(u));const p=await this.getDirectoryHandle(u);if(!p)throw new DOMException(...Gr);return await p.getFileHandle(m)}catch(p){console.error("Failed to get relative file "+m+": "+p);return}}async getDirectoryFiles(u){try{let m;if(typeof u=="string"){if(m=await this.getDirectoryHandle(u),!m)return[]}else m=u;const p=[];for await(const w of m.values())w.kind=="file"&&p.push(w);return p}catch(m){return console.error(m),[]}}async getDirectoryFolders(u){try{let m;if(typeof u=="string"){if(m=await this.getDirectoryHandle(u),!m)return[]}else m=u;const p=[];for await(const w of m.values())w.kind=="directory"&&p.push(w);return p}catch(m){return console.error(m),[]}}async writeFile(u,m){let p;if(typeof u=="string"){if(p=await this.getFileHandle(u,{create:!0}),!p){ia.createFormatted("Failed to write to "+u+"!","error");return}}else p=u;await this.writeHandle(p,m)}async removeFile(u){await Ft.unlink(u)}async writeHandle(u,m){const p=await u.createWritable();await p.truncate(0),await p.write(m),await p.close()}getRelativePath(u,m){return Ea(u,m)}}export{Aa as NodeFileHandler}; diff --git a/Noteskin-bcd28e0b.js b/Noteskin-1b40b05f.js similarity index 97% rename from Noteskin-bcd28e0b.js rename to Noteskin-1b40b05f.js index 120fb244..ab4bff78 100644 --- a/Noteskin-bcd28e0b.js +++ b/Noteskin-1b40b05f.js @@ -1 +1 @@ -import{a1 as d,w as i,b as f,z as u,O as T,Q as g,P as l,Y as m,V as p,a2 as U}from"./ChartManager-f20da8bc.js";import{A as w}from"./AnimatedSprite-d8850d0f.js";import{A as H}from"./HoldBody-34995142.js";const L="/smeditor/assets/Center-1b6bfec9.png",B="/smeditor/assets/DownLeft-242c6bf3.png",y="/smeditor/assets/DownRight-a869fa38.png",M="/smeditor/assets/UpLeft-d457a441.png",O="/smeditor/assets/UpRight-fda6b516.png",I="/smeditor/assets/Center-cb4b6c25.png",E="/smeditor/assets/DownLeft-94341616.png",S="/smeditor/assets/DownRight-3c57e4fa.png",F="/smeditor/assets/UpLeft-752b6821.png",$="/smeditor/assets/UpRight-91e454bc.png",N="/smeditor/assets/Center-55e9b68a.png",P="/smeditor/assets/DownLeft-19d91486.png",V="/smeditor/assets/DownRight-e2cf2b7d.png",Y="/smeditor/assets/UpLeft-28515625.png",j="/smeditor/assets/UpRight-8a892589.png",v={},c=["DownLeft","UpLeft","Center","UpRight","DownRight"];for(const t of c)v[t]=d(i.from(new URL(Object.assign({"./tap/Center.png":I,"./tap/DownLeft.png":E,"./tap/DownRight.png":S,"./tap/UpLeft.png":F,"./tap/UpRight.png":$})[`./tap/${t}.png`],self.location).href),3,2,96,96).flat();const D={};for(const t of c)D[t]=d(i.from(new URL(Object.assign({"./roll/Center.png":N,"./roll/DownLeft.png":P,"./roll/DownRight.png":V,"./roll/UpLeft.png":Y,"./roll/UpRight.png":j})[`./roll/${t}.png`],self.location).href),3,2,96,96).flat();const k=d(i.from(new URL("/smeditor/assets/mine-0e34ec01.png",self.location).href),3,2,96,96).flat();class a{static noteTex;static noteContainer=new f;static rollTex;static rollContainer=new f;static mineTex;static mine;static loaded=!1;static async initArrowTex(){if(!this.loaded){a.noteTex=u.create({width:96*5,height:96,resolution:T.performance.resolution}),a.rollTex=u.create({width:96*5,height:96,resolution:T.performance.resolution}),a.mineTex=u.create({width:96,height:96,resolution:T.performance.resolution});for(const e of c)this.createSprite(this.noteContainer,e,v);for(const e of c)this.createSprite(this.rollContainer,e,D);this.mine=new w(k),this.loaded=!0}}static createSprite(e,o,n){const s=c.indexOf(o)*96,r=new w(n[o]);r.x=s,e.addChild(r)}static setArrowTexTime(e){if(!this.loaded)return;const o=e.chartManager.chartView.getVisualTime(),n=Math.floor((o%.3+.3)%.3/.3*6);this.noteContainer.children.forEach(s=>s.currentFrame=n),this.rollContainer.children.forEach(s=>s.currentFrame=n),this.mine.currentFrame=n,e.renderer.render(a.noteContainer,{renderTexture:a.noteTex}),e.renderer.render(a.rollContainer,{renderTexture:a.rollTex}),e.renderer.render(a.mine,{renderTexture:a.mineTex})}static setNoteTex(e,o,n){if(o===void 0)return i.WHITE;if(o.type=="Mine")e.texture=this.mineTex;else{const s=c.indexOf(n)*96;e.texture=new i(this.noteTex.baseTexture,new g(s,0,96,96))}}static setRollTex(e,o){const n=c.indexOf(o)*96;e.texture=new i(this.rollTex.baseTexture,new g(n,0,96,96))}}const W="/smeditor/assets/receptors-0a59df78.png",z="/smeditor/assets/flash-e524b5bd.png",J="/smeditor/assets/mine-590d445e.png",Q="/smeditor/assets/press-feed8aa6.png",q=d(i.from(z),5,1,128,128)[0],G=i.from(J),C=d(i.from(Q),5,2,96,96),K=["w0","w1","w2","w3"];class X extends f{press;pressAnim;hitContainer=new f;tap;note;flash;hitAnim;anims=new Set;constructor(e,o,n){super();const s=1/1.5;this.press=new l(C[1][_.indexOf(o)]),this.press.alpha=0,this.press.anchor.set(.5),this.tap=new l(C[0][_.indexOf(o)]),this.tap.blendMode=m.ADD,this.tap.scale.set(s),this.tap.anchor.set(.5),this.note=new w(v[o]),this.note.scale.set(s),this.note.blendMode=m.ADD,this.note.animationSpeed=1/3,this.note.play(),this.note.anchor.set(.5),this.flash=new w(q),this.flash.scale.set(2),this.flash.blendMode=m.ADD,this.flash.animationSpeed=1/3,this.flash.loop=!1,this.flash.visible=!1,this.flash.anchor.set(.5),this.flash.onComplete=()=>{this.flash.visible=!1,this.flash.stop()},this.hitContainer.alpha=0,this.hitContainer.addChild(this.tap,this.note),e.on(this,"ghosttap",r=>{n==r.columnNumber&&(p.finish(this.pressAnim),this.pressAnim=p.animate(this.press,{0:{alpha:1,"scale.x":1*s,"scale.y":1*s},1:{alpha:0,"scale.x":1.3*s,"scale.y":1.3*s}},.25))}),e.on(this,"hit",r=>{if(n==r.columnNumber){if(!K.includes(r.judgement.id))return;p.finish(this.pressAnim),p.finish(this.hitAnim),this.hitAnim=p.animate(this.hitContainer,{0:{alpha:1,"scale.x":1,"scale.y":1},1:{alpha:0,"scale.x":1.2,"scale.y":1.2}},.4),this.flash.visible=!0,this.flash.currentFrame=0,this.flash.play()}}),e.on(this,"hitmine",r=>{if(n==r.columnNumber){const h=new l(G);h.alpha=0,h.anchor.set(.5),h.blendMode=m.ADD,this.addChild(h),p.animate(h,{0:{alpha:1,rotation:0},"0.5":{alpha:1,rotation:90*Math.PI/180},1:{alpha:0,rotation:180*Math.PI/180}},.4,void 0,()=>h.destroy())}}),this.addChild(this.press,this.hitContainer,this.flash)}}const A=d(i.from(W),5,2,96,96),_=["DownLeft","UpLeft","Center","UpRight","DownRight"],b={},x=96;for(const t of _){const e=i.from(new URL(Object.assign({"./hold/Center.png":L,"./hold/DownLeft.png":B,"./hold/DownRight.png":y,"./hold/UpLeft.png":M,"./hold/UpRight.png":O})[`./hold/${t}.png`],self.location).href),o=[],n=[];for(let s=0;s<6;s++)o.push(new i(e.baseTexture,new g(s*96,0,96,288-x))),n.push(new i(e.baseTexture,new g(s*96,288-x,96,x)));b[t]={body:o,cap:n}}const se={elements:{DownLeft:{Receptor:t=>{const e=new f,o=_.indexOf(t.columnName),n=new l(A[0][o]);n.width=72,n.height=72,n.anchor.set(.5);const s=new l(A[1][o]);return s.width=n.width,s.height=n.height,s.anchor.set(.5),s.blendMode=m.ADD,e.addChild(n,s),t.noteskin.onUpdate(e,r=>{const R=(r.getVisualBeat()%1+1)%1;s.alpha=(1-R)/2}),e},Tap:t=>{const e=new l(i.WHITE);return a.setNoteTex(e,t.note,t.columnName),e.anchor.set(.5),e.width=72,e.height=72,e},Fake:{element:"Tap"},Lift:{element:"Tap"},Mine:{element:"Tap"},NoteFlash:t=>new X(t.noteskin,t.columnName,t.columnNumber),"Hold Active Head":{element:"Tap"},"Hold Inactive Head":{element:"Tap"},"Hold Active Body":t=>{const e=new H(b[t.columnName].body,72);return t.noteskin.onUpdate(e,o=>{const n=o.getVisualTime(),s=Math.floor((n%.3+.3)%.3/.3*6);e.currentFrame=s}),e},"Hold Inactive Body":{element:"Hold Active Body"},"Hold Active TopCap":()=>new l(i.EMPTY),"Hold Inactive TopCap":()=>new l(i.EMPTY),"Hold Active BottomCap":t=>{const e=new U(b[t.columnName].cap,72);return t.noteskin.onUpdate(e,o=>{const n=o.getVisualTime(),s=Math.floor((n%.3+.3)%.3/.3*6);e.currentFrame=s}),e},"Hold Inactive BottomCap":{element:"Hold Active BottomCap"},"Roll Active Head":t=>{const e=new l(i.WHITE);return a.setRollTex(e,t.columnName),e.anchor.set(.5),e.width=72,e.height=72,e},"Roll Inactive Head":{element:"Roll Active Head"},"Roll Active Body":{element:"Hold Active Body"},"Roll Inactive Body":{element:"Hold Active Body"},"Roll Active TopCap":()=>new l(i.EMPTY),"Roll Inactive TopCap":()=>new l(i.EMPTY),"Roll Active BottomCap":{element:"Hold Active BottomCap"},"Roll Inactive BottomCap":{element:"Hold Active BottomCap"}}},load:function(t,e){return t.columnName="DownLeft",this.loadElement(t,e)},init(){a.initArrowTex()},update(t){a.setArrowTexTime(t.chartManager.app)},metrics:{HoldBodyBottomOffset:-36,RollBodyBottomOffset:-36}};export{se as default,_ as texOrder}; +import{a1 as d,w as i,b as f,z as u,O as T,Q as g,P as l,Y as m,V as p,a2 as U}from"./ChartManager-3c3d6f39.js";import{A as w}from"./AnimatedSprite-86b56f12.js";import{A as H}from"./HoldBody-5358344a.js";const L="/smeditor/assets/Center-1b6bfec9.png",B="/smeditor/assets/DownLeft-242c6bf3.png",y="/smeditor/assets/DownRight-a869fa38.png",M="/smeditor/assets/UpLeft-d457a441.png",O="/smeditor/assets/UpRight-fda6b516.png",I="/smeditor/assets/Center-cb4b6c25.png",E="/smeditor/assets/DownLeft-94341616.png",S="/smeditor/assets/DownRight-3c57e4fa.png",F="/smeditor/assets/UpLeft-752b6821.png",$="/smeditor/assets/UpRight-91e454bc.png",N="/smeditor/assets/Center-55e9b68a.png",P="/smeditor/assets/DownLeft-19d91486.png",V="/smeditor/assets/DownRight-e2cf2b7d.png",Y="/smeditor/assets/UpLeft-28515625.png",j="/smeditor/assets/UpRight-8a892589.png",v={},c=["DownLeft","UpLeft","Center","UpRight","DownRight"];for(const t of c)v[t]=d(i.from(new URL(Object.assign({"./tap/Center.png":I,"./tap/DownLeft.png":E,"./tap/DownRight.png":S,"./tap/UpLeft.png":F,"./tap/UpRight.png":$})[`./tap/${t}.png`],self.location).href),3,2,96,96).flat();const D={};for(const t of c)D[t]=d(i.from(new URL(Object.assign({"./roll/Center.png":N,"./roll/DownLeft.png":P,"./roll/DownRight.png":V,"./roll/UpLeft.png":Y,"./roll/UpRight.png":j})[`./roll/${t}.png`],self.location).href),3,2,96,96).flat();const k=d(i.from(new URL("/smeditor/assets/mine-0e34ec01.png",self.location).href),3,2,96,96).flat();class a{static noteTex;static noteContainer=new f;static rollTex;static rollContainer=new f;static mineTex;static mine;static loaded=!1;static async initArrowTex(){if(!this.loaded){a.noteTex=u.create({width:96*5,height:96,resolution:T.performance.resolution}),a.rollTex=u.create({width:96*5,height:96,resolution:T.performance.resolution}),a.mineTex=u.create({width:96,height:96,resolution:T.performance.resolution});for(const e of c)this.createSprite(this.noteContainer,e,v);for(const e of c)this.createSprite(this.rollContainer,e,D);this.mine=new w(k),this.loaded=!0}}static createSprite(e,o,n){const s=c.indexOf(o)*96,r=new w(n[o]);r.x=s,e.addChild(r)}static setArrowTexTime(e){if(!this.loaded)return;const o=e.chartManager.chartView.getVisualTime(),n=Math.floor((o%.3+.3)%.3/.3*6);this.noteContainer.children.forEach(s=>s.currentFrame=n),this.rollContainer.children.forEach(s=>s.currentFrame=n),this.mine.currentFrame=n,e.renderer.render(a.noteContainer,{renderTexture:a.noteTex}),e.renderer.render(a.rollContainer,{renderTexture:a.rollTex}),e.renderer.render(a.mine,{renderTexture:a.mineTex})}static setNoteTex(e,o,n){if(o===void 0)return i.WHITE;if(o.type=="Mine")e.texture=this.mineTex;else{const s=c.indexOf(n)*96;e.texture=new i(this.noteTex.baseTexture,new g(s,0,96,96))}}static setRollTex(e,o){const n=c.indexOf(o)*96;e.texture=new i(this.rollTex.baseTexture,new g(n,0,96,96))}}const W="/smeditor/assets/receptors-0a59df78.png",z="/smeditor/assets/flash-e524b5bd.png",J="/smeditor/assets/mine-590d445e.png",Q="/smeditor/assets/press-feed8aa6.png",q=d(i.from(z),5,1,128,128)[0],G=i.from(J),C=d(i.from(Q),5,2,96,96),K=["w0","w1","w2","w3"];class X extends f{press;pressAnim;hitContainer=new f;tap;note;flash;hitAnim;anims=new Set;constructor(e,o,n){super();const s=1/1.5;this.press=new l(C[1][_.indexOf(o)]),this.press.alpha=0,this.press.anchor.set(.5),this.tap=new l(C[0][_.indexOf(o)]),this.tap.blendMode=m.ADD,this.tap.scale.set(s),this.tap.anchor.set(.5),this.note=new w(v[o]),this.note.scale.set(s),this.note.blendMode=m.ADD,this.note.animationSpeed=1/3,this.note.play(),this.note.anchor.set(.5),this.flash=new w(q),this.flash.scale.set(2),this.flash.blendMode=m.ADD,this.flash.animationSpeed=1/3,this.flash.loop=!1,this.flash.visible=!1,this.flash.anchor.set(.5),this.flash.onComplete=()=>{this.flash.visible=!1,this.flash.stop()},this.hitContainer.alpha=0,this.hitContainer.addChild(this.tap,this.note),e.on(this,"ghosttap",r=>{n==r.columnNumber&&(p.finish(this.pressAnim),this.pressAnim=p.animate(this.press,{0:{alpha:1,"scale.x":1*s,"scale.y":1*s},1:{alpha:0,"scale.x":1.3*s,"scale.y":1.3*s}},.25))}),e.on(this,"hit",r=>{if(n==r.columnNumber){if(!K.includes(r.judgement.id))return;p.finish(this.pressAnim),p.finish(this.hitAnim),this.hitAnim=p.animate(this.hitContainer,{0:{alpha:1,"scale.x":1,"scale.y":1},1:{alpha:0,"scale.x":1.2,"scale.y":1.2}},.4),this.flash.visible=!0,this.flash.currentFrame=0,this.flash.play()}}),e.on(this,"hitmine",r=>{if(n==r.columnNumber){const h=new l(G);h.alpha=0,h.anchor.set(.5),h.blendMode=m.ADD,this.addChild(h),p.animate(h,{0:{alpha:1,rotation:0},"0.5":{alpha:1,rotation:90*Math.PI/180},1:{alpha:0,rotation:180*Math.PI/180}},.4,void 0,()=>h.destroy())}}),this.addChild(this.press,this.hitContainer,this.flash)}}const A=d(i.from(W),5,2,96,96),_=["DownLeft","UpLeft","Center","UpRight","DownRight"],b={},x=96;for(const t of _){const e=i.from(new URL(Object.assign({"./hold/Center.png":L,"./hold/DownLeft.png":B,"./hold/DownRight.png":y,"./hold/UpLeft.png":M,"./hold/UpRight.png":O})[`./hold/${t}.png`],self.location).href),o=[],n=[];for(let s=0;s<6;s++)o.push(new i(e.baseTexture,new g(s*96,0,96,288-x))),n.push(new i(e.baseTexture,new g(s*96,288-x,96,x)));b[t]={body:o,cap:n}}const se={elements:{DownLeft:{Receptor:t=>{const e=new f,o=_.indexOf(t.columnName),n=new l(A[0][o]);n.width=72,n.height=72,n.anchor.set(.5);const s=new l(A[1][o]);return s.width=n.width,s.height=n.height,s.anchor.set(.5),s.blendMode=m.ADD,e.addChild(n,s),t.noteskin.onUpdate(e,r=>{const R=(r.getVisualBeat()%1+1)%1;s.alpha=(1-R)/2}),e},Tap:t=>{const e=new l(i.WHITE);return a.setNoteTex(e,t.note,t.columnName),e.anchor.set(.5),e.width=72,e.height=72,e},Fake:{element:"Tap"},Lift:{element:"Tap"},Mine:{element:"Tap"},NoteFlash:t=>new X(t.noteskin,t.columnName,t.columnNumber),"Hold Active Head":{element:"Tap"},"Hold Inactive Head":{element:"Tap"},"Hold Active Body":t=>{const e=new H(b[t.columnName].body,72);return t.noteskin.onUpdate(e,o=>{const n=o.getVisualTime(),s=Math.floor((n%.3+.3)%.3/.3*6);e.currentFrame=s}),e},"Hold Inactive Body":{element:"Hold Active Body"},"Hold Active TopCap":()=>new l(i.EMPTY),"Hold Inactive TopCap":()=>new l(i.EMPTY),"Hold Active BottomCap":t=>{const e=new U(b[t.columnName].cap,72);return t.noteskin.onUpdate(e,o=>{const n=o.getVisualTime(),s=Math.floor((n%.3+.3)%.3/.3*6);e.currentFrame=s}),e},"Hold Inactive BottomCap":{element:"Hold Active BottomCap"},"Roll Active Head":t=>{const e=new l(i.WHITE);return a.setRollTex(e,t.columnName),e.anchor.set(.5),e.width=72,e.height=72,e},"Roll Inactive Head":{element:"Roll Active Head"},"Roll Active Body":{element:"Hold Active Body"},"Roll Inactive Body":{element:"Hold Active Body"},"Roll Active TopCap":()=>new l(i.EMPTY),"Roll Inactive TopCap":()=>new l(i.EMPTY),"Roll Active BottomCap":{element:"Hold Active BottomCap"},"Roll Inactive BottomCap":{element:"Hold Active BottomCap"}}},load:function(t,e){return t.columnName="DownLeft",this.loadElement(t,e)},init(){a.initArrowTex()},update(t){a.setArrowTexTime(t.chartManager.app)},metrics:{HoldBodyBottomOffset:-36,RollBodyBottomOffset:-36}};export{se as default,_ as texOrder}; diff --git a/Noteskin-c26c25f8.js b/Noteskin-39363162.js similarity index 99% rename from Noteskin-c26c25f8.js rename to Noteskin-39363162.js index 24c828ee..e8245ba0 100644 --- a/Noteskin-c26c25f8.js +++ b/Noteskin-39363162.js @@ -1,4 +1,4 @@ -import{w as o,x as v,y as p,b as C,z as c,O as l,H as m,J as f,L as h,P as i,Q as G,V as B,X as F,Y as H,Z as U,$ as E,a0 as Y}from"./ChartManager-f20da8bc.js";import{H as D}from"./HoldBody-34995142.js";const u="/smeditor/assets/parts-0c8fa692.png",b="/smeditor/assets/frame-d599a2fe.png",x="/smeditor/assets/parts-b37af2cf.png",J="/smeditor/assets/parts-9668caec.png",T=`precision mediump float; +import{w as o,x as v,y as p,b as C,z as c,O as l,H as m,J as f,L as h,P as i,Q as G,V as B,X as F,Y as H,Z as U,$ as E,a0 as Y}from"./ChartManager-3c3d6f39.js";import{H as D}from"./HoldBody-5358344a.js";const u="/smeditor/assets/parts-0c8fa692.png",b="/smeditor/assets/frame-d599a2fe.png",x="/smeditor/assets/parts-b37af2cf.png",J="/smeditor/assets/parts-9668caec.png",T=`precision mediump float; varying vec2 vUvs; diff --git a/Noteskin-bd72bca6.js b/Noteskin-430fd36b.js similarity index 98% rename from Noteskin-bd72bca6.js rename to Noteskin-430fd36b.js index fbbcab23..606b753b 100644 --- a/Noteskin-bd72bca6.js +++ b/Noteskin-430fd36b.js @@ -1 +1 @@ -import{w as i,a1 as b,b as g,P as l,Y as B,V as r,X as A,O as y,z as I,Q as H,$ as v}from"./ChartManager-f20da8bc.js";import{A as u}from"./AnimatedSprite-d8850d0f.js";import{T as R,H as f}from"./HoldBody-34995142.js";const M="/smeditor/assets/active-d06e5c33.png",U="/smeditor/assets/downBodyActive-8cf886d3.png",F="/smeditor/assets/downBodyInactive-7465edd0.png",L="/smeditor/assets/downBottomCapActive-b10d1f0d.png",k="/smeditor/assets/downBottomCapInactive-12cafebe.png",P="/smeditor/assets/inactive-a4aecb82.png",O="/smeditor/assets/leftBodyActive-5d89f111.png",D="/smeditor/assets/leftBodyInactive-1110dc77.png",S="/smeditor/assets/leftBottomCapActive-f759c91c.png",j="/smeditor/assets/leftBottomCapInactive-a4ac7bba.png",V="/smeditor/assets/rightBodyActive-8af7624b.png",Y="/smeditor/assets/rightBodyInactive-695480aa.png",z="/smeditor/assets/rightBottomCapActive-6edeea1e.png",X="/smeditor/assets/rightBottomCapInactive-d674960e.png",q="/smeditor/assets/upBodyActive-c813881f.png",Q="/smeditor/assets/upBodyInactive-0222237a.png",W="/smeditor/assets/upBottomCapActive-19e4c05d.png",G="/smeditor/assets/upBottomCapInactive-23aae747.png",J="/smeditor/assets/active-29dd632a.png",K="/smeditor/assets/downBodyActive-77f6502e.png",Z="/smeditor/assets/downBodyInactive-a5759c62.png",tt="/smeditor/assets/downBottomCapActive-57ef4d54.png",et="/smeditor/assets/downBottomCapInactive-13ddf252.png",ot="/smeditor/assets/inactive-48f23de3.png",st="/smeditor/assets/leftBodyActive-fd4e902b.png",at="/smeditor/assets/leftBodyInactive-8fe6311e.png",nt="/smeditor/assets/leftBottomCapActive-057c49fb.png",it="/smeditor/assets/leftBottomCapInactive-df6350c7.png",ct="/smeditor/assets/rightBodyActive-751fadec.png",lt="/smeditor/assets/rightBodyInactive-46202369.png",rt="/smeditor/assets/rightBottomCapActive-a736d803.png",dt="/smeditor/assets/rightBottomCapInactive-a64cea2c.png",pt="/smeditor/assets/upBodyActive-b06d82f3.png",ht="/smeditor/assets/upBodyInactive-4ef75342.png",mt="/smeditor/assets/upBottomCapActive-07fb7c6e.png",_t="/smeditor/assets/upBottomCapInactive-75f78aac.png",gt="/smeditor/assets/hold-4cf23d59.png",vt="/smeditor/assets/mine-f6147b04.png",ft="/smeditor/assets/particles-18ec6c1d.png",wt="/smeditor/assets/w0-6f86addb.png",ut="/smeditor/assets/w1-c8c43b0f.png",bt="/smeditor/assets/w2-37282ba8.png",Bt="/smeditor/assets/w3-3c2ca2d8.png",At="/smeditor/assets/w4-ce0f95de.png",yt="/smeditor/assets/w5-23173d4f.png",Ct="/smeditor/assets/hold-4cf23d59.png",xt="/smeditor/assets/mine-f6147b04.png",It="/smeditor/assets/particles-18ec6c1d.png",Tt=i.from(Ct),Nt=b(i.from(xt),16,1,160,1024)[0],$t=i.from(It),N=["w0","w1","w2","w3","w4","w5"],$={};N.forEach(t=>$[t]=i.from(new URL(Object.assign({"./flash/hold.png":gt,"./flash/mine.png":vt,"./flash/particles.png":ft,"./flash/w0.png":wt,"./flash/w1.png":ut,"./flash/w2.png":bt,"./flash/w3.png":Bt,"./flash/w4.png":At,"./flash/w5.png":yt})[`./flash/${t}.png`],self.location).href));class Et extends g{holdExplosion=new l(Tt);particles=new l($t);mine=new u(Nt);standard={};anims=new Set;particleAnim;mineAnim;constructor(e,s,n){super();const a=.5;N.forEach(o=>{const c=new l($[o]);c.anchor.set(.5),c.alpha=0,c.blendMode=B.ADD,this.standard[o]=c,this.addChild(c)}),e.on(this,"hit",o=>{if(s==o.columnNumber){const c=this.standard[o.judgement.id];if(!c)return;this.anims.forEach(d=>r.finish(d)),this.anims.clear(),this.anims.add(r.animate(c,{0:{alpha:.875,"scale.x":.8*a,"scale.y":.8*a},"0.5":{alpha:.875,"scale.x":1.1*a,"scale.y":1.1*a},1:{alpha:0,"scale.x":1.1*a,"scale.y":1.1*a}},.12))}}),e.on(this,"held",o=>{s==o.columnNumber&&(this.anims.forEach(c=>r.finish(c)),this.anims.clear(),this.anims.add(r.animate(this.standard.w0,{0:{alpha:.875,"scale.x":.8*a,"scale.y":.8*a},"0.5":{alpha:.875,"scale.x":1.1*a,"scale.y":1.1*a},1:{alpha:0,"scale.x":1.1*a,"scale.y":1.1*a}},.12)))}),e.on(this,"holdon",o=>{s==o.columnNumber&&(this.holdExplosion.visible=!0)}),e.on(this,"holdoff",o=>{s==o.columnNumber&&(this.holdExplosion.visible=!1)}),e.on(this,"rollon",o=>{s==o.columnNumber&&(this.holdExplosion.visible=!0)}),e.on(this,"rolloff",o=>{s==o.columnNumber&&(this.holdExplosion.visible=!1)}),e.onUpdate(this,()=>{this.holdExplosion.alpha=Math.sin(Date.now()/1e3*Math.PI*2*20)*.1+1}),this.holdExplosion.visible=!1,this.holdExplosion.anchor.set(.5),this.holdExplosion.scale.set(.5),this.addChild(this.holdExplosion),this.particles.alpha=0,this.particles.blendMode=B.ADD,this.particles.anchor.set(.5),e.on(this,"hit",o=>{if(s==o.columnNumber){if(this.particles.rotation=Math.random()*Math.PI*2,r.finish(this.particleAnim),!["w0","w1","w2","w3"].includes(o.judgement.id))return;this.particleAnim=r.animate(this.particles,{0:{alpha:.6,"scale.x":1*a,"scale.y":1*a},"0.7":{alpha:.6,"scale.x":1.2*a,"scale.y":1.2*a},1:{alpha:0,"scale.x":1.2*a,"scale.y":1.2*a}},.185,A(.16,.73,.63,.75))}}),this.addChild(this.particles),this.mine.anchor.x=.5,this.mine.scale.set(.5),this.mine.rotation=-C[n]*Math.PI/180,this.mine.animationSpeed=1/3,this.mine.alpha=0,this.addChild(this.mine),e.on(this,"hitmine",o=>{s==o.columnNumber&&(r.finish(this.mineAnim),this.mine.anchor.y=y.chart.reverse?1:0,this.mine.currentFrame=0,this.mine.play(),this.mineAnim=r.animate(this.mine,{0:{alpha:1},"0.5":{alpha:1},1:{alpha:0}},.6))})}}const Ht="/smeditor/assets/colors-63f923d2.png",Rt="/smeditor/assets/mask-f1b4d033.png",Mt="/smeditor/assets/note-07e5d79f.png",Ut="/smeditor/assets/outline-72e881a7.png",Ft="/smeditor/assets/stroke-1f54ba14.png",Lt="/smeditor/assets/top-74da30ae.png",_={};["colors","mask","note","outline","stroke","top"].forEach(t=>_[t]=i.from(new URL(Object.assign({"./tap/colors.png":Ht,"./tap/mask.png":Rt,"./tap/note.png":Mt,"./tap/outline.png":Ut,"./tap/stroke.png":Ft,"./tap/top.png":Lt})[`./tap/${t}.png`],self.location).href));const kt=b(_.top,4,1,384,384)[0],T=[-80,0,80];class p{static arrowFrameTex;static arrowFrameContainer=new g;static arrowTex;static arrowContainer=new g;static loaded=!1;static async initArrowTex(){if(!this.loaded){p.arrowFrameTex=I.create({width:64,height:64,resolution:y.performance.resolution}),p.arrowTex=I.create({width:64*3,height:64,resolution:y.performance.resolution});{const e=new l(_.note);e.width=64,e.height=64;const s=new l(_.outline);s.width=64,s.height=64;const n=new l(_.stroke);n.width=64,n.height=64,this.arrowFrameContainer.addChild(e,s,n)}for(let e=0;e<3;e++){const s=new l(this.arrowFrameTex);s.x=e*64;const n=new l(_.mask);n.scale.set(1/6),n.x=e*64,n.y=32,n.anchor.y=.5,n.alpha=1;const a=new R(_.colors,256,1024);a.tileScale.y=1/4,a.uvRespectAnchor=!0,a.x=e*64,a.y=32,a.tilePosition.y=128+T[e],a.anchor.y=.5,a.height=64,a.width=64,a.alpha=1,a.mask=n,a.name="c"+e;const o=new u(kt);o.scale.set(1/6),o.x=e*64,o.y=32,o.anchor.y=.5,o.alpha=1,o.name="t"+e,this.arrowContainer.addChild(s,a,n,o)}this.loaded=!0}}static setArrowTexTime(e){if(!this.loaded)return;const s=e.chartManager.chartView.getVisualBeat(),n=(s%1+1)%1,a=(s%4+4)%4;for(let o=0;o<3;o++)this.arrowContainer.getChildByName("c"+o).tilePosition.y=128+T[o]-a/4*256,this.arrowContainer.getChildByName("t"+o).currentFrame=Math.floor(n*4);e.renderer.render(p.arrowFrameContainer,{renderTexture:p.arrowFrameTex}),e.renderer.render(p.arrowContainer,{renderTexture:p.arrowTex})}static setNoteTex(e,s){let n=[4,8].indexOf(s?.quant??4);n==-1&&(n=2),e.texture=new i(p.arrowTex.baseTexture,new H(n*64,0,64,64))}}const Pt="/smeditor/assets/mine-335f4545.png",Ot="/smeditor/assets/spark-2c59cc0e.png",Dt="/smeditor/assets/receptor-a0a69b2b.png",St="/smeditor/assets/receptorFlash-c7675c53.png",jt=i.from(Dt),Vt=i.from(St),Yt=i.from(Pt),zt=b(i.from(Ot),4,4,160,128).flat(),Xt={Left:0,Down:5,Up:8,Right:13},h={},m={},w={Hold:{Active:i.from(new URL("/smeditor/assets/active-d06e5c33.png",self.location).href),Inactive:i.from(new URL("/smeditor/assets/inactive-a4aecb82.png",self.location).href)},Roll:{Active:i.from(new URL("/smeditor/assets/active-29dd632a.png",self.location).href),Inactive:i.from(new URL("/smeditor/assets/inactive-48f23de3.png",self.location).href)}};for(const t of["Left","Down","Up","Right"])for(const e of["Body","BottomCap"])for(const s of["Active","Inactive"])h[t]===void 0&&(h[t]={}),h[t][s]===void 0&&(h[t][s]={}),h[t][s][e]=i.from(new URL(Object.assign({"./hold/active.png":M,"./hold/downBodyActive.png":U,"./hold/downBodyInactive.png":F,"./hold/downBottomCapActive.png":L,"./hold/downBottomCapInactive.png":k,"./hold/inactive.png":P,"./hold/leftBodyActive.png":O,"./hold/leftBodyInactive.png":D,"./hold/leftBottomCapActive.png":S,"./hold/leftBottomCapInactive.png":j,"./hold/rightBodyActive.png":V,"./hold/rightBodyInactive.png":Y,"./hold/rightBottomCapActive.png":z,"./hold/rightBottomCapInactive.png":X,"./hold/upBodyActive.png":q,"./hold/upBodyInactive.png":Q,"./hold/upBottomCapActive.png":W,"./hold/upBottomCapInactive.png":G})[`./hold/${t.toLowerCase()}${e}${s}.png`],self.location).href),m[t]===void 0&&(m[t]={}),m[t][s]===void 0&&(m[t][s]={}),m[t][s][e]=i.from(new URL(Object.assign({"./roll/active.png":J,"./roll/downBodyActive.png":K,"./roll/downBodyInactive.png":Z,"./roll/downBottomCapActive.png":tt,"./roll/downBottomCapInactive.png":et,"./roll/inactive.png":ot,"./roll/leftBodyActive.png":st,"./roll/leftBodyInactive.png":at,"./roll/leftBottomCapActive.png":nt,"./roll/leftBottomCapInactive.png":it,"./roll/rightBodyActive.png":ct,"./roll/rightBodyInactive.png":lt,"./roll/rightBottomCapActive.png":rt,"./roll/rightBottomCapInactive.png":dt,"./roll/upBodyActive.png":pt,"./roll/upBodyInactive.png":ht,"./roll/upBottomCapActive.png":mt,"./roll/upBottomCapInactive.png":_t})[`./roll/${t.toLowerCase()}${e}${s}.png`],self.location).href);const C={Left:90,Down:0,Up:180,Right:-90},qt=["Receptor","Tap","Lift","Fake","Hold Inactive Head","Hold Active Head","Roll Inactive Head","Roll Active Head","NoteFlash"],Jt={elements:{Left:{Receptor:t=>{let e,s;const n=b(jt,2,1,404,404),a=new g,o=new u(n[0]);o.width=64,o.height=64,o.anchor.set(.5),t.noteskin.on(o,"ghosttap",d=>{d.columnNumber==t.columnNumber&&(r.finish(e),e=r.animate(o,{0:{alpha:.9,width:.85*64,height:.85*64},1:{alpha:1,width:64,height:64}},.11))});const c=new l(Vt);return c.blendMode=B.ADD,c.width=64,c.height=64,c.anchor.set(.5),c.alpha=0,t.noteskin.on(a,"press",d=>{d.columnNumber==t.columnNumber&&(r.finish(s),s=r.animate(c,{0:{alpha:0,width:.85*64,height:.85*64},1:{alpha:.6,width:64,height:64}},.12,A(.5,1,.89,1)))}),t.noteskin.on(a,"lift",d=>{d.columnNumber==t.columnNumber&&(r.finish(s),s=r.animate(c,{0:{alpha:"inherit",width:"inherit",height:"inherit"},1:{alpha:0,width:64*1.2,height:64}},.12,A(.11,0,.5,1)))}),t.noteskin.onUpdate(a,d=>{const x=d.chart.getNotedata()[0]?.beat;if(x===void 0||d.getVisualBeat(){const e=new l(i.WHITE);return p.setNoteTex(e,t.note),e.anchor.set(.5),e},NoteFlash:t=>new Et(t.noteskin,t.columnNumber,t.columnName),Fake:{element:"Tap"},Lift:{element:"Tap"},Mine:t=>{const e=new g,s=new l(Yt);s.anchor.set(.5),s.width=64,s.height=64,s.rotation=C[t.columnName]*Math.PI/180;const n=new u(zt);return n.anchor.set(.5),n.scale.set(.5),e.addChild(s,n),t.noteskin.onUpdate(e,a=>{const o=a.getVisualTime();n.currentFrame=((Math.floor(o*20)+Xt[t.columnName])%16+16)%16}),e},"Hold Active Head":()=>{const t=new l(w.Hold.Active);return t.anchor.set(.5),t.scale.set(1/6),t},"Hold Inactive Head":()=>{const t=new l(w.Hold.Inactive);return t.anchor.set(.5),t.scale.set(1/6),t},"Hold Active Body":t=>new f(h[t.columnName].Active.Body),"Hold Inactive Body":t=>new f(h[t.columnName].Inactive.Body),"Hold Active TopCap":()=>new l(i.EMPTY),"Hold Inactive TopCap":()=>new l(i.EMPTY),"Hold Active BottomCap":t=>new v(h[t.columnName].Active.BottomCap),"Hold Inactive BottomCap":t=>new v(h[t.columnName].Inactive.BottomCap),"Roll Active Head":()=>{const t=new l(w.Roll.Active);return t.anchor.set(.5),t.scale.set(1/6),t},"Roll Inactive Head":()=>{const t=new l(w.Roll.Inactive);return t.anchor.set(.5),t.scale.set(1/6),t},"Roll Active Body":t=>new f(m[t.columnName].Active.Body),"Roll Inactive Body":t=>new f(m[t.columnName].Inactive.Body),"Roll Active TopCap":()=>new l(i.EMPTY),"Roll Inactive TopCap":()=>new l(i.EMPTY),"Roll Active BottomCap":t=>new v(m[t.columnName].Active.BottomCap),"Roll Inactive BottomCap":t=>new v(m[t.columnName].Inactive.BottomCap)}},load:function(t,e){const s=t.columnName;t.columnName="Left";const n=this.loadElement(t,e);return qt.includes(t.element)&&(n.rotation=C[s]*Math.PI/180),n},init(){p.initArrowTex()},update(t){p.setArrowTexTime(t.chartManager.app)},metrics:{HoldBodyBottomOffset:-16,RollBodyBottomOffset:-16}};export{Jt as default,C as rotationMap}; +import{w as i,a1 as b,b as g,P as l,Y as B,V as r,X as A,O as y,z as I,Q as H,$ as v}from"./ChartManager-3c3d6f39.js";import{A as u}from"./AnimatedSprite-86b56f12.js";import{T as R,H as f}from"./HoldBody-5358344a.js";const M="/smeditor/assets/active-d06e5c33.png",U="/smeditor/assets/downBodyActive-8cf886d3.png",F="/smeditor/assets/downBodyInactive-7465edd0.png",L="/smeditor/assets/downBottomCapActive-b10d1f0d.png",k="/smeditor/assets/downBottomCapInactive-12cafebe.png",P="/smeditor/assets/inactive-a4aecb82.png",O="/smeditor/assets/leftBodyActive-5d89f111.png",D="/smeditor/assets/leftBodyInactive-1110dc77.png",S="/smeditor/assets/leftBottomCapActive-f759c91c.png",j="/smeditor/assets/leftBottomCapInactive-a4ac7bba.png",V="/smeditor/assets/rightBodyActive-8af7624b.png",Y="/smeditor/assets/rightBodyInactive-695480aa.png",z="/smeditor/assets/rightBottomCapActive-6edeea1e.png",X="/smeditor/assets/rightBottomCapInactive-d674960e.png",q="/smeditor/assets/upBodyActive-c813881f.png",Q="/smeditor/assets/upBodyInactive-0222237a.png",W="/smeditor/assets/upBottomCapActive-19e4c05d.png",G="/smeditor/assets/upBottomCapInactive-23aae747.png",J="/smeditor/assets/active-29dd632a.png",K="/smeditor/assets/downBodyActive-77f6502e.png",Z="/smeditor/assets/downBodyInactive-a5759c62.png",tt="/smeditor/assets/downBottomCapActive-57ef4d54.png",et="/smeditor/assets/downBottomCapInactive-13ddf252.png",ot="/smeditor/assets/inactive-48f23de3.png",st="/smeditor/assets/leftBodyActive-fd4e902b.png",at="/smeditor/assets/leftBodyInactive-8fe6311e.png",nt="/smeditor/assets/leftBottomCapActive-057c49fb.png",it="/smeditor/assets/leftBottomCapInactive-df6350c7.png",ct="/smeditor/assets/rightBodyActive-751fadec.png",lt="/smeditor/assets/rightBodyInactive-46202369.png",rt="/smeditor/assets/rightBottomCapActive-a736d803.png",dt="/smeditor/assets/rightBottomCapInactive-a64cea2c.png",pt="/smeditor/assets/upBodyActive-b06d82f3.png",ht="/smeditor/assets/upBodyInactive-4ef75342.png",mt="/smeditor/assets/upBottomCapActive-07fb7c6e.png",_t="/smeditor/assets/upBottomCapInactive-75f78aac.png",gt="/smeditor/assets/hold-4cf23d59.png",vt="/smeditor/assets/mine-f6147b04.png",ft="/smeditor/assets/particles-18ec6c1d.png",wt="/smeditor/assets/w0-6f86addb.png",ut="/smeditor/assets/w1-c8c43b0f.png",bt="/smeditor/assets/w2-37282ba8.png",Bt="/smeditor/assets/w3-3c2ca2d8.png",At="/smeditor/assets/w4-ce0f95de.png",yt="/smeditor/assets/w5-23173d4f.png",Ct="/smeditor/assets/hold-4cf23d59.png",xt="/smeditor/assets/mine-f6147b04.png",It="/smeditor/assets/particles-18ec6c1d.png",Tt=i.from(Ct),Nt=b(i.from(xt),16,1,160,1024)[0],$t=i.from(It),N=["w0","w1","w2","w3","w4","w5"],$={};N.forEach(t=>$[t]=i.from(new URL(Object.assign({"./flash/hold.png":gt,"./flash/mine.png":vt,"./flash/particles.png":ft,"./flash/w0.png":wt,"./flash/w1.png":ut,"./flash/w2.png":bt,"./flash/w3.png":Bt,"./flash/w4.png":At,"./flash/w5.png":yt})[`./flash/${t}.png`],self.location).href));class Et extends g{holdExplosion=new l(Tt);particles=new l($t);mine=new u(Nt);standard={};anims=new Set;particleAnim;mineAnim;constructor(e,s,n){super();const a=.5;N.forEach(o=>{const c=new l($[o]);c.anchor.set(.5),c.alpha=0,c.blendMode=B.ADD,this.standard[o]=c,this.addChild(c)}),e.on(this,"hit",o=>{if(s==o.columnNumber){const c=this.standard[o.judgement.id];if(!c)return;this.anims.forEach(d=>r.finish(d)),this.anims.clear(),this.anims.add(r.animate(c,{0:{alpha:.875,"scale.x":.8*a,"scale.y":.8*a},"0.5":{alpha:.875,"scale.x":1.1*a,"scale.y":1.1*a},1:{alpha:0,"scale.x":1.1*a,"scale.y":1.1*a}},.12))}}),e.on(this,"held",o=>{s==o.columnNumber&&(this.anims.forEach(c=>r.finish(c)),this.anims.clear(),this.anims.add(r.animate(this.standard.w0,{0:{alpha:.875,"scale.x":.8*a,"scale.y":.8*a},"0.5":{alpha:.875,"scale.x":1.1*a,"scale.y":1.1*a},1:{alpha:0,"scale.x":1.1*a,"scale.y":1.1*a}},.12)))}),e.on(this,"holdon",o=>{s==o.columnNumber&&(this.holdExplosion.visible=!0)}),e.on(this,"holdoff",o=>{s==o.columnNumber&&(this.holdExplosion.visible=!1)}),e.on(this,"rollon",o=>{s==o.columnNumber&&(this.holdExplosion.visible=!0)}),e.on(this,"rolloff",o=>{s==o.columnNumber&&(this.holdExplosion.visible=!1)}),e.onUpdate(this,()=>{this.holdExplosion.alpha=Math.sin(Date.now()/1e3*Math.PI*2*20)*.1+1}),this.holdExplosion.visible=!1,this.holdExplosion.anchor.set(.5),this.holdExplosion.scale.set(.5),this.addChild(this.holdExplosion),this.particles.alpha=0,this.particles.blendMode=B.ADD,this.particles.anchor.set(.5),e.on(this,"hit",o=>{if(s==o.columnNumber){if(this.particles.rotation=Math.random()*Math.PI*2,r.finish(this.particleAnim),!["w0","w1","w2","w3"].includes(o.judgement.id))return;this.particleAnim=r.animate(this.particles,{0:{alpha:.6,"scale.x":1*a,"scale.y":1*a},"0.7":{alpha:.6,"scale.x":1.2*a,"scale.y":1.2*a},1:{alpha:0,"scale.x":1.2*a,"scale.y":1.2*a}},.185,A(.16,.73,.63,.75))}}),this.addChild(this.particles),this.mine.anchor.x=.5,this.mine.scale.set(.5),this.mine.rotation=-C[n]*Math.PI/180,this.mine.animationSpeed=1/3,this.mine.alpha=0,this.addChild(this.mine),e.on(this,"hitmine",o=>{s==o.columnNumber&&(r.finish(this.mineAnim),this.mine.anchor.y=y.chart.reverse?1:0,this.mine.currentFrame=0,this.mine.play(),this.mineAnim=r.animate(this.mine,{0:{alpha:1},"0.5":{alpha:1},1:{alpha:0}},.6))})}}const Ht="/smeditor/assets/colors-63f923d2.png",Rt="/smeditor/assets/mask-f1b4d033.png",Mt="/smeditor/assets/note-07e5d79f.png",Ut="/smeditor/assets/outline-72e881a7.png",Ft="/smeditor/assets/stroke-1f54ba14.png",Lt="/smeditor/assets/top-74da30ae.png",_={};["colors","mask","note","outline","stroke","top"].forEach(t=>_[t]=i.from(new URL(Object.assign({"./tap/colors.png":Ht,"./tap/mask.png":Rt,"./tap/note.png":Mt,"./tap/outline.png":Ut,"./tap/stroke.png":Ft,"./tap/top.png":Lt})[`./tap/${t}.png`],self.location).href));const kt=b(_.top,4,1,384,384)[0],T=[-80,0,80];class p{static arrowFrameTex;static arrowFrameContainer=new g;static arrowTex;static arrowContainer=new g;static loaded=!1;static async initArrowTex(){if(!this.loaded){p.arrowFrameTex=I.create({width:64,height:64,resolution:y.performance.resolution}),p.arrowTex=I.create({width:64*3,height:64,resolution:y.performance.resolution});{const e=new l(_.note);e.width=64,e.height=64;const s=new l(_.outline);s.width=64,s.height=64;const n=new l(_.stroke);n.width=64,n.height=64,this.arrowFrameContainer.addChild(e,s,n)}for(let e=0;e<3;e++){const s=new l(this.arrowFrameTex);s.x=e*64;const n=new l(_.mask);n.scale.set(1/6),n.x=e*64,n.y=32,n.anchor.y=.5,n.alpha=1;const a=new R(_.colors,256,1024);a.tileScale.y=1/4,a.uvRespectAnchor=!0,a.x=e*64,a.y=32,a.tilePosition.y=128+T[e],a.anchor.y=.5,a.height=64,a.width=64,a.alpha=1,a.mask=n,a.name="c"+e;const o=new u(kt);o.scale.set(1/6),o.x=e*64,o.y=32,o.anchor.y=.5,o.alpha=1,o.name="t"+e,this.arrowContainer.addChild(s,a,n,o)}this.loaded=!0}}static setArrowTexTime(e){if(!this.loaded)return;const s=e.chartManager.chartView.getVisualBeat(),n=(s%1+1)%1,a=(s%4+4)%4;for(let o=0;o<3;o++)this.arrowContainer.getChildByName("c"+o).tilePosition.y=128+T[o]-a/4*256,this.arrowContainer.getChildByName("t"+o).currentFrame=Math.floor(n*4);e.renderer.render(p.arrowFrameContainer,{renderTexture:p.arrowFrameTex}),e.renderer.render(p.arrowContainer,{renderTexture:p.arrowTex})}static setNoteTex(e,s){let n=[4,8].indexOf(s?.quant??4);n==-1&&(n=2),e.texture=new i(p.arrowTex.baseTexture,new H(n*64,0,64,64))}}const Pt="/smeditor/assets/mine-335f4545.png",Ot="/smeditor/assets/spark-2c59cc0e.png",Dt="/smeditor/assets/receptor-a0a69b2b.png",St="/smeditor/assets/receptorFlash-c7675c53.png",jt=i.from(Dt),Vt=i.from(St),Yt=i.from(Pt),zt=b(i.from(Ot),4,4,160,128).flat(),Xt={Left:0,Down:5,Up:8,Right:13},h={},m={},w={Hold:{Active:i.from(new URL("/smeditor/assets/active-d06e5c33.png",self.location).href),Inactive:i.from(new URL("/smeditor/assets/inactive-a4aecb82.png",self.location).href)},Roll:{Active:i.from(new URL("/smeditor/assets/active-29dd632a.png",self.location).href),Inactive:i.from(new URL("/smeditor/assets/inactive-48f23de3.png",self.location).href)}};for(const t of["Left","Down","Up","Right"])for(const e of["Body","BottomCap"])for(const s of["Active","Inactive"])h[t]===void 0&&(h[t]={}),h[t][s]===void 0&&(h[t][s]={}),h[t][s][e]=i.from(new URL(Object.assign({"./hold/active.png":M,"./hold/downBodyActive.png":U,"./hold/downBodyInactive.png":F,"./hold/downBottomCapActive.png":L,"./hold/downBottomCapInactive.png":k,"./hold/inactive.png":P,"./hold/leftBodyActive.png":O,"./hold/leftBodyInactive.png":D,"./hold/leftBottomCapActive.png":S,"./hold/leftBottomCapInactive.png":j,"./hold/rightBodyActive.png":V,"./hold/rightBodyInactive.png":Y,"./hold/rightBottomCapActive.png":z,"./hold/rightBottomCapInactive.png":X,"./hold/upBodyActive.png":q,"./hold/upBodyInactive.png":Q,"./hold/upBottomCapActive.png":W,"./hold/upBottomCapInactive.png":G})[`./hold/${t.toLowerCase()}${e}${s}.png`],self.location).href),m[t]===void 0&&(m[t]={}),m[t][s]===void 0&&(m[t][s]={}),m[t][s][e]=i.from(new URL(Object.assign({"./roll/active.png":J,"./roll/downBodyActive.png":K,"./roll/downBodyInactive.png":Z,"./roll/downBottomCapActive.png":tt,"./roll/downBottomCapInactive.png":et,"./roll/inactive.png":ot,"./roll/leftBodyActive.png":st,"./roll/leftBodyInactive.png":at,"./roll/leftBottomCapActive.png":nt,"./roll/leftBottomCapInactive.png":it,"./roll/rightBodyActive.png":ct,"./roll/rightBodyInactive.png":lt,"./roll/rightBottomCapActive.png":rt,"./roll/rightBottomCapInactive.png":dt,"./roll/upBodyActive.png":pt,"./roll/upBodyInactive.png":ht,"./roll/upBottomCapActive.png":mt,"./roll/upBottomCapInactive.png":_t})[`./roll/${t.toLowerCase()}${e}${s}.png`],self.location).href);const C={Left:90,Down:0,Up:180,Right:-90},qt=["Receptor","Tap","Lift","Fake","Hold Inactive Head","Hold Active Head","Roll Inactive Head","Roll Active Head","NoteFlash"],Jt={elements:{Left:{Receptor:t=>{let e,s;const n=b(jt,2,1,404,404),a=new g,o=new u(n[0]);o.width=64,o.height=64,o.anchor.set(.5),t.noteskin.on(o,"ghosttap",d=>{d.columnNumber==t.columnNumber&&(r.finish(e),e=r.animate(o,{0:{alpha:.9,width:.85*64,height:.85*64},1:{alpha:1,width:64,height:64}},.11))});const c=new l(Vt);return c.blendMode=B.ADD,c.width=64,c.height=64,c.anchor.set(.5),c.alpha=0,t.noteskin.on(a,"press",d=>{d.columnNumber==t.columnNumber&&(r.finish(s),s=r.animate(c,{0:{alpha:0,width:.85*64,height:.85*64},1:{alpha:.6,width:64,height:64}},.12,A(.5,1,.89,1)))}),t.noteskin.on(a,"lift",d=>{d.columnNumber==t.columnNumber&&(r.finish(s),s=r.animate(c,{0:{alpha:"inherit",width:"inherit",height:"inherit"},1:{alpha:0,width:64*1.2,height:64}},.12,A(.11,0,.5,1)))}),t.noteskin.onUpdate(a,d=>{const x=d.chart.getNotedata()[0]?.beat;if(x===void 0||d.getVisualBeat(){const e=new l(i.WHITE);return p.setNoteTex(e,t.note),e.anchor.set(.5),e},NoteFlash:t=>new Et(t.noteskin,t.columnNumber,t.columnName),Fake:{element:"Tap"},Lift:{element:"Tap"},Mine:t=>{const e=new g,s=new l(Yt);s.anchor.set(.5),s.width=64,s.height=64,s.rotation=C[t.columnName]*Math.PI/180;const n=new u(zt);return n.anchor.set(.5),n.scale.set(.5),e.addChild(s,n),t.noteskin.onUpdate(e,a=>{const o=a.getVisualTime();n.currentFrame=((Math.floor(o*20)+Xt[t.columnName])%16+16)%16}),e},"Hold Active Head":()=>{const t=new l(w.Hold.Active);return t.anchor.set(.5),t.scale.set(1/6),t},"Hold Inactive Head":()=>{const t=new l(w.Hold.Inactive);return t.anchor.set(.5),t.scale.set(1/6),t},"Hold Active Body":t=>new f(h[t.columnName].Active.Body),"Hold Inactive Body":t=>new f(h[t.columnName].Inactive.Body),"Hold Active TopCap":()=>new l(i.EMPTY),"Hold Inactive TopCap":()=>new l(i.EMPTY),"Hold Active BottomCap":t=>new v(h[t.columnName].Active.BottomCap),"Hold Inactive BottomCap":t=>new v(h[t.columnName].Inactive.BottomCap),"Roll Active Head":()=>{const t=new l(w.Roll.Active);return t.anchor.set(.5),t.scale.set(1/6),t},"Roll Inactive Head":()=>{const t=new l(w.Roll.Inactive);return t.anchor.set(.5),t.scale.set(1/6),t},"Roll Active Body":t=>new f(m[t.columnName].Active.Body),"Roll Inactive Body":t=>new f(m[t.columnName].Inactive.Body),"Roll Active TopCap":()=>new l(i.EMPTY),"Roll Inactive TopCap":()=>new l(i.EMPTY),"Roll Active BottomCap":t=>new v(m[t.columnName].Active.BottomCap),"Roll Inactive BottomCap":t=>new v(m[t.columnName].Inactive.BottomCap)}},load:function(t,e){const s=t.columnName;t.columnName="Left";const n=this.loadElement(t,e);return qt.includes(t.element)&&(n.rotation=C[s]*Math.PI/180),n},init(){p.initArrowTex()},update(t){p.setArrowTexTime(t.chartManager.app)},metrics:{HoldBodyBottomOffset:-16,RollBodyBottomOffset:-16}};export{Jt as default,C as rotationMap}; diff --git a/Noteskin-5c25a811.js b/Noteskin-5a1b65c6.js similarity index 99% rename from Noteskin-5c25a811.js rename to Noteskin-5a1b65c6.js index 4273ff61..efaadf1b 100644 --- a/Noteskin-5c25a811.js +++ b/Noteskin-5a1b65c6.js @@ -1,4 +1,4 @@ -import{w as a,x as h,y as d,b as x,z as u,O as g,H as w,J as f,L as p,P as s,Q as E,V as A,X as F,Y as I,Z as G,$ as v,a0 as H}from"./ChartManager-f20da8bc.js";import{H as B}from"./HoldBody-34995142.js";const P="/smeditor/assets/frame-d599a2fe.png",N="/smeditor/assets/parts-b37af2cf.png",k="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAABACAIAAABdtOgoAAAAAXNSR0IB2cksfwAAAAlwSFlzAAAuIwAALiMBeKU/dgAAB1lJREFUeJztnD2uLDUQhV22ewa4CRIheyAk4q2EJbAo1kGERExKxAKIkEiuYGa627g8c9Hj9neG5yuE2iMq9Lj/6rhO/bg8ef3GAkn86hTKZtRC+XrC+V/8/OV28LNf0/fvPg+3G71/u0+ff/wW7/P03U84bqdf/PGvpfzw7oDzR5EcVvFLCQCAFoSxDYoHqOcqSUvnBWOIBgDHNSQWVtuiYBre+R/f7e+SVrSAzrvsTnJZmYIcAKQgcSNb6y+bRVoqX0WcrgEQ75PZAta115T2JZkVUZVw4QvU9BjKFpvoeCW6Im3Beu9mJJkVXeCxI0le1Ur0cTD5i/jeEs7bwdUBAKddKvACYGEx9Tb8ossytm/IZYYV50qeSyhbTi8z6cfVHOE+OVW/gFHT5BZAFBdMUNZhIWxWtIA6aEbftb/xPCsAzgVIxcppO7vN/4io4+hPPdL8Q5EWkHl4Cuhy57nXm+9LNAU5o8AHK70dCYCDD6IFpG4KOnKgO7wTxpXoir9UAt/4T2O86vwD6Wdy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qxuTAAAAAASUVORK5CYII=",Y="/smeditor/assets/frameChrome-2ea8bbf3.png",L="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAAD91JpzAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAAMSURBVBhXY0ACDAwAAA4AAXqxuTAAAAAASUVORK5CYII=",V="/smeditor/assets/frameChrome-2ea8bbf3.png",T=`precision mediump float; +import{w as a,x as h,y as d,b as x,z as u,O as g,H as w,J as f,L as p,P as s,Q as E,V as A,X as F,Y as I,Z as G,$ as v,a0 as H}from"./ChartManager-3c3d6f39.js";import{H as B}from"./HoldBody-5358344a.js";const P="/smeditor/assets/frame-d599a2fe.png",N="/smeditor/assets/parts-b37af2cf.png",k="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAABACAIAAABdtOgoAAAAAXNSR0IB2cksfwAAAAlwSFlzAAAuIwAALiMBeKU/dgAAB1lJREFUeJztnD2uLDUQhV22ewa4CRIheyAk4q2EJbAo1kGERExKxAKIkEiuYGa627g8c9Hj9neG5yuE2iMq9Lj/6rhO/bg8ef3GAkn86hTKZtRC+XrC+V/8/OV28LNf0/fvPg+3G71/u0+ff/wW7/P03U84bqdf/PGvpfzw7oDzR5EcVvFLCQCAFoSxDYoHqOcqSUvnBWOIBgDHNSQWVtuiYBre+R/f7e+SVrSAzrvsTnJZmYIcAKQgcSNb6y+bRVoqX0WcrgEQ75PZAta115T2JZkVUZVw4QvU9BjKFpvoeCW6Im3Beu9mJJkVXeCxI0le1Ur0cTD5i/jeEs7bwdUBAKddKvACYGEx9Tb8ossytm/IZYYV50qeSyhbTi8z6cfVHOE+OVW/gFHT5BZAFBdMUNZhIWxWtIA6aEbftb/xPCsAzgVIxcppO7vN/4io4+hPPdL8Q5EWkHl4Cuhy57nXm+9LNAU5o8AHK70dCYCDD6IFpG4KOnKgO7wTxpXoir9UAt/4T2O86vwD6WdyZSIAwvm7K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ASUVORK5CYII=",Y="/smeditor/assets/frameChrome-2ea8bbf3.png",L="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAAD91JpzAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAAMSURBVBhXY0ACDAwAAA4AAXqxuTAAAAAASUVORK5CYII=",V="/smeditor/assets/frameChrome-2ea8bbf3.png",T=`precision mediump float; varying vec2 vUvs; diff --git a/Noteskin-5217c0b2.js b/Noteskin-5b9ce776.js similarity index 99% rename from Noteskin-5217c0b2.js rename to Noteskin-5b9ce776.js index b1888ba5..353f096b 100644 --- a/Noteskin-5217c0b2.js +++ b/Noteskin-5b9ce776.js @@ -1 +1 @@ -import{w as o,b as w,z as C,O as B,a1 as u,P as l,Z as I,Q as x,Y as L,V as h,$ as T}from"./ChartManager-f20da8bc.js";import{A as v}from"./AnimatedSprite-d8850d0f.js";import{H as m}from"./HoldBody-34995142.js";const N="/smeditor/assets/tapCenter-103680e8.png",V="/smeditor/assets/tapDownLeft-17ba3b42.png",y="/smeditor/assets/liftCenter-9712ce74.png",E="/smeditor/assets/liftDownLeft-0205bdc8.png",Q="/smeditor/assets/fakeCenter-581c6a3b.png",R="/smeditor/assets/fakeDownLeft-e3208bb3.png",Z="/smeditor/assets/base-29930c78.png",b="/smeditor/assets/overlay-f63a3b18.png",D="/smeditor/assets/underlay-95144bef.png",d={Tap:{DownLeft:o.from(V),Center:o.from(N)},Lift:{DownLeft:o.from(E),Center:o.from(y)},Fake:{DownLeft:o.from(R),Center:o.from(Q)},Mine:{Base:o.from(Z),Overlay:o.from(b),Underlay:o.from(D)}};class s{static downLeftTex;static downLeftContainer=new w;static centerTex;static centerContainer=new w;static mineTex;static mineContainer=new w;static loaded=!1;static async initArrowTex(){this.loaded||(s.downLeftTex=C.create({width:128*9,height:128*3,resolution:B.performance.resolution}),s.centerTex=C.create({width:128*9,height:128*3,resolution:B.performance.resolution}),s.mineTex=C.create({width:128*9,height:128,resolution:B.performance.resolution}),this.layoutRow(this.downLeftContainer,d.Tap.DownLeft,0),this.layoutRow(this.downLeftContainer,d.Fake.DownLeft,1),this.layoutRow(this.downLeftContainer,d.Lift.DownLeft,2),this.layoutRow(this.centerContainer,d.Tap.Center,0),this.layoutRow(this.centerContainer,d.Fake.Center,1),this.layoutRow(this.centerContainer,d.Lift.Center,2),this.createMines(this.mineContainer),this.loaded=!0)}static layoutRow(t,a,e){const n=u(a,6,9,128,128);for(let A=0;A<9;A++){const c=new v(n[A]);c.x=A*128,c.y=e*128,t.addChild(c)}}static createMines(t){const a=u(d.Mine.Base,1,9,128,128).map(A=>A[0]),e=u(d.Mine.Overlay,1,9,128,128).map(A=>A[0]),n=u(d.Mine.Underlay,1,9,128,128).map(A=>A[0]);for(let A=0;A<9;A++){const c=new l(n[A]);c.x=A*128+64,c.y=64,c.name="u"+A,c.anchor.set(.5);const p=new l(a[A]);p.x=A*128+64,p.y=64,p.name="b"+A,p.anchor.set(.5);const g=new l(e[A]);g.x=A*128+64,g.y=64,g.name="o"+A,g.anchor.set(.5),t.addChild(c,p,g)}}static setArrowTexTime(t){if(!this.loaded)return;const a=t.chartManager.chartView.getVisualBeat(),e=(a%1+1)%1,n=Math.floor(e*6);this.downLeftContainer.children.forEach(A=>A.currentFrame=n),this.centerContainer.children.forEach(A=>A.currentFrame=n),t.renderer.render(s.downLeftContainer,{renderTexture:s.downLeftTex}),t.renderer.render(s.centerContainer,{renderTexture:s.centerTex}),t.renderer.render(s.mineContainer,{renderTexture:s.mineTex});for(let A=0;A<9;A++)this.mineContainer.getChildByName("u"+A).tint=I(Math.round(255-153*e),0,0),this.mineContainer.getChildByName("b"+A).rotation=80/180*Math.PI*a,this.mineContainer.getChildByName("o"+A).rotation=-40/180*Math.PI*a}static setNoteTex(t,a,e){if(a===void 0)return o.WHITE;if(a.type=="Mine"){const n=[4,8,12,16,24,32,48,64,96,192].indexOf(a.quant);t.texture=new o(this.mineTex.baseTexture,new x(Math.min(8,n)*128,0,128,128))}else{const n=[4,8,12,16,24,32,48,64,96,192].indexOf(a.quant),A=this.getNoteRow(a.type),c=e=="Center"?this.centerTex:this.downLeftTex;t.texture=new o(c.baseTexture,new x(Math.min(8,n)*128,A*128,128,128))}}static getNoteRow(t){switch(t){case"Fake":return 1;case"Lift":return 2;default:return 0}}}const q="/smeditor/assets/centerReceptor-44665c43.png",Y="/smeditor/assets/downLeftReceptor-9be8faae.png",U="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAABACAYAAADS1n9/AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+A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cdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAARNJREFUeNrs3b9uglAYh+FfiwGSRjuUvTMb9+B1ew9uzt3tICwaNPQaINGQ5nn28yffeffzNk1T5tjv9z/X6/Wzqqq0bZvdbpckGYYhx+Mx5/M5RVHkWcqyfOr+Sz0ej4zjmLnznHtG0zTpui7b7TZJ0vd9TqdTbrdb6rq+HA6H7zl7bhbc4yvJR1ij2e/5vuCQuzmv1v0VAfCPCEAACAABIAAEgAAQAAJAAAgAASAABIAAEAACQAAIAAEgAASAABAAAkAACAABIAAEgAAQAAJAAAgAASAABIAAEAACQAAIAAEgAASAABAAAkAACAABIAAEgAAQAAJAAKwlgI2xrdbmFY/5Gx9Ir9Vl7oI/AAAA//8DAOX/Ln1VvXQfAAAAAElFTkSuQmCC",K="/smeditor/assets/capActive-59a3b423.png",O="/smeditor/assets/capInactive-efc3b952.png";class f extends l{constructor(t,a=64,e=!1){super(t),this.scale.set(a/this.texture.width),this.anchor.x=.5,e&&(this.rotation=Math.PI),this.texture.on("update",()=>{this.scale.set(a/this.texture.width)})}}const P="/smeditor/assets/flash-5a32532f.png",G="/smeditor/assets/mine-590d445e.png",S={w0:[1,1,1,1],w2:[1,1,.3,1],w3:[0,1,.4,1],w4:[.3,.8,1,1],w5:[.8,0,.6,1],held:[1,1,1,1]},z=o.from(P),X=o.from(G);class F extends w{standard=new l(z);standardAnim;anims=new Set;constructor(t,a){super(),this.standard.blendMode=L.ADD;const e=.5;t.on(this,"hit",n=>{if(a==n.columnNumber){const A=S[n.judgement.id]??[1,1,1,1];this.standard.tint=I(A[0]*255,A[1]*255,A[2]*255),h.finish(this.standardAnim),this.standardAnim=h.animate(this.standard,{0:{alpha:1,"scale.x":1*e,"scale.y":1*e},"0.5":{alpha:1.1,"scale.x":1.1*e,"scale.y":1.1*e},1:{alpha:0,"scale.x":1.1*e,"scale.y":1.1*e}},.12)}}),t.on(this,"held",n=>{a==n.columnNumber&&(this.standard.tint=16777215,h.finish(this.standardAnim),this.standardAnim=h.animate(this.standard,{0:{alpha:1,"scale.x":1*e,"scale.y":1*e},"0.5":{alpha:1.1,"scale.x":1.1*e,"scale.y":1.1*e},1:{alpha:0,"scale.x":1.1*e,"scale.y":1.1*e}},.12))}),t.on(this,"holdon",n=>{a==n.columnNumber&&(this.standard.alpha=1)}),t.on(this,"holdoff",n=>{a==n.columnNumber&&(this.standard.alpha=0)}),t.on(this,"rollon",n=>{a==n.columnNumber&&(this.standard.alpha=1)}),t.on(this,"rolloff",n=>{a==n.columnNumber&&(this.standard.alpha=0)}),t.on(this,"hitmine",n=>{if(a==n.columnNumber){const A=new l(X);A.alpha=0,A.anchor.set(.5),A.blendMode=L.ADD,this.addChild(A),h.animate(A,{0:{alpha:1,rotation:0},"0.5":{alpha:1,rotation:90*Math.PI/180},1:{alpha:0,rotation:180*Math.PI/180}},.4,void 0,()=>A.destroy())}}),this.standard.alpha=0,this.standard.anchor.set(.5),this.addChild(this.standard)}}const k="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAABACAYAAADS1n9/AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIH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/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAShJREFUeNrs3T1OAkEAhuEPHCEEEgq0sDBGK49g4wG8h8fyHh7AxiNYaYyFhVKQQBSy7HqGJYFszPP085OZd+rpNU2TNq7ub96r5XpaxoOc3F5meDpJkmzmq3w+vuTnY5Fe6WdfjkbH6Zd+0kt3NEmzrbP9rdLUzf6WqeqMzqc5u7vOYDZOkqy/lvl+eku12qRMhovXh+eLNnOWHfYxSzIOXdT6Pnd5qpVz7qzqEAHwjwhAAAgAASAABIAAEAACQAAIAAEgAASAABAAAkAACAABIAAEgAAQAAJAAAgAASAABIAAEAACQAAIAAEgAASAABAAAkAACAABIAAEgAAQAAJAAAgAASAABIAAEAACQAB0JYDi2DqrHOIy5/GBdFct2g74AwAA//8DANl4L31+t8K2AAAAAElFTkSuQmCC",M="/smeditor/assets/capActive-e83fb138.png",W="/smeditor/assets/capInactive-4622d5f2.png",j=o.from(Y),$=o.from(q),i={hold:{active:{body:o.from(U),cap:o.from(K)},inactive:{body:o.from(H),cap:o.from(O)}},roll:{active:{body:o.from(k),cap:o.from(M)},inactive:{body:o.from(J),cap:o.from(W)}}},_={Center:0,DownLeft:0,UpLeft:90,UpRight:180,DownRight:270},AA=["Receptor","Tap","Lift","Fake","Hold Inactive Head","Hold Active Head","Roll Inactive Head","Roll Active Head"],nA={elements:{DownLeft:{Receptor:r=>{const t=new l(r.columnName=="Center"?$:j);t.width=72,t.height=72,t.anchor.set(.5);let a;return r.noteskin.on(t,"ghosttap",e=>{e.columnNumber==r.columnNumber&&(h.finish(a),a=h.animate(t,{0:{width:54,height:54},1:{width:72,height:72}},.11))}),r.noteskin.onUpdate(t,e=>{const n=e.getVisualBeat();let A=204;(n%1+1)%1>.2&&(A=102),t.tint=I(A,A,A)}),t},Tap:r=>{const t=new l(o.WHITE);return s.setNoteTex(t,r.note,r.columnName),t.anchor.set(.5),t.width=72,t.height=72,t},Fake:{element:"Tap"},Lift:{element:"Tap"},Mine:{element:"Tap"},NoteFlash:r=>new F(r.noteskin,r.columnNumber),"Hold Active Head":{element:"Tap"},"Hold Inactive Head":{element:"Tap"},"Hold Active Body":()=>new m(i.hold.active.body),"Hold Inactive Body":()=>new m(i.hold.inactive.body),"Hold Active TopCap":()=>new f(i.hold.active.cap,64,!0),"Hold Inactive TopCap":()=>new f(i.hold.inactive.cap,64,!0),"Hold Active BottomCap":()=>new T(i.hold.active.cap),"Hold Inactive BottomCap":()=>new T(i.hold.inactive.cap),"Roll Active Head":{element:"Tap"},"Roll Inactive Head":{element:"Tap"},"Roll Active Body":()=>new m(i.roll.active.body),"Roll Inactive Body":()=>new m(i.roll.inactive.body),"Roll Active TopCap":()=>new f(i.roll.active.cap,64,!0),"Roll Inactive TopCap":()=>new f(i.roll.inactive.cap,64,!0),"Roll Active BottomCap":()=>new T(i.roll.active.cap),"Roll Inactive BottomCap":()=>new T(i.roll.inactive.cap)}},load:function(r,t){const a=r.columnName;r.columnName="DownLeft";const e=this.loadElement(r,t);return AA.includes(r.element)&&(e.rotation=_[a]*Math.PI/180),e},init(){s.initArrowTex()},update(r){s.setArrowTexTime(r.chartManager.app)},hideIcons:["Lift","Fake"]};export{nA as default}; +import{w as o,b as w,z as C,O as B,a1 as u,P as l,Z as I,Q as x,Y as L,V as h,$ as T}from"./ChartManager-3c3d6f39.js";import{A as v}from"./AnimatedSprite-86b56f12.js";import{H as m}from"./HoldBody-5358344a.js";const N="/smeditor/assets/tapCenter-103680e8.png",V="/smeditor/assets/tapDownLeft-17ba3b42.png",y="/smeditor/assets/liftCenter-9712ce74.png",E="/smeditor/assets/liftDownLeft-0205bdc8.png",Q="/smeditor/assets/fakeCenter-581c6a3b.png",R="/smeditor/assets/fakeDownLeft-e3208bb3.png",Z="/smeditor/assets/base-29930c78.png",b="/smeditor/assets/overlay-f63a3b18.png",D="/smeditor/assets/underlay-95144bef.png",d={Tap:{DownLeft:o.from(V),Center:o.from(N)},Lift:{DownLeft:o.from(E),Center:o.from(y)},Fake:{DownLeft:o.from(R),Center:o.from(Q)},Mine:{Base:o.from(Z),Overlay:o.from(b),Underlay:o.from(D)}};class s{static downLeftTex;static downLeftContainer=new w;static centerTex;static centerContainer=new w;static mineTex;static mineContainer=new w;static loaded=!1;static async initArrowTex(){this.loaded||(s.downLeftTex=C.create({width:128*9,height:128*3,resolution:B.performance.resolution}),s.centerTex=C.create({width:128*9,height:128*3,resolution:B.performance.resolution}),s.mineTex=C.create({width:128*9,height:128,resolution:B.performance.resolution}),this.layoutRow(this.downLeftContainer,d.Tap.DownLeft,0),this.layoutRow(this.downLeftContainer,d.Fake.DownLeft,1),this.layoutRow(this.downLeftContainer,d.Lift.DownLeft,2),this.layoutRow(this.centerContainer,d.Tap.Center,0),this.layoutRow(this.centerContainer,d.Fake.Center,1),this.layoutRow(this.centerContainer,d.Lift.Center,2),this.createMines(this.mineContainer),this.loaded=!0)}static layoutRow(t,a,e){const n=u(a,6,9,128,128);for(let A=0;A<9;A++){const c=new v(n[A]);c.x=A*128,c.y=e*128,t.addChild(c)}}static createMines(t){const a=u(d.Mine.Base,1,9,128,128).map(A=>A[0]),e=u(d.Mine.Overlay,1,9,128,128).map(A=>A[0]),n=u(d.Mine.Underlay,1,9,128,128).map(A=>A[0]);for(let A=0;A<9;A++){const c=new l(n[A]);c.x=A*128+64,c.y=64,c.name="u"+A,c.anchor.set(.5);const p=new l(a[A]);p.x=A*128+64,p.y=64,p.name="b"+A,p.anchor.set(.5);const g=new l(e[A]);g.x=A*128+64,g.y=64,g.name="o"+A,g.anchor.set(.5),t.addChild(c,p,g)}}static setArrowTexTime(t){if(!this.loaded)return;const a=t.chartManager.chartView.getVisualBeat(),e=(a%1+1)%1,n=Math.floor(e*6);this.downLeftContainer.children.forEach(A=>A.currentFrame=n),this.centerContainer.children.forEach(A=>A.currentFrame=n),t.renderer.render(s.downLeftContainer,{renderTexture:s.downLeftTex}),t.renderer.render(s.centerContainer,{renderTexture:s.centerTex}),t.renderer.render(s.mineContainer,{renderTexture:s.mineTex});for(let A=0;A<9;A++)this.mineContainer.getChildByName("u"+A).tint=I(Math.round(255-153*e),0,0),this.mineContainer.getChildByName("b"+A).rotation=80/180*Math.PI*a,this.mineContainer.getChildByName("o"+A).rotation=-40/180*Math.PI*a}static setNoteTex(t,a,e){if(a===void 0)return o.WHITE;if(a.type=="Mine"){const n=[4,8,12,16,24,32,48,64,96,192].indexOf(a.quant);t.texture=new o(this.mineTex.baseTexture,new x(Math.min(8,n)*128,0,128,128))}else{const n=[4,8,12,16,24,32,48,64,96,192].indexOf(a.quant),A=this.getNoteRow(a.type),c=e=="Center"?this.centerTex:this.downLeftTex;t.texture=new o(c.baseTexture,new x(Math.min(8,n)*128,A*128,128,128))}}static getNoteRow(t){switch(t){case"Fake":return 1;case"Lift":return 2;default:return 0}}}const q="/smeditor/assets/centerReceptor-44665c43.png",Y="/smeditor/assets/downLeftReceptor-9be8faae.png",U="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAABACAYAAADS1n9/AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC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AJAAAgAASAABIAAEAACQAAIAAEgAASAABAAAkAACAABIAAEgAAQAAJAAAgAASAABIAAEAACQAAIAAEgAASAABAAAkAACAABIAAEgAAQAAJAAKwlgI2xrdbmFY/5Gx9Ir9Vl7oI/AAAA//8DAOX/Ln1VvXQfAAAAAElFTkSuQmCC",K="/smeditor/assets/capActive-59a3b423.png",O="/smeditor/assets/capInactive-efc3b952.png";class f extends l{constructor(t,a=64,e=!1){super(t),this.scale.set(a/this.texture.width),this.anchor.x=.5,e&&(this.rotation=Math.PI),this.texture.on("update",()=>{this.scale.set(a/this.texture.width)})}}const P="/smeditor/assets/flash-5a32532f.png",G="/smeditor/assets/mine-590d445e.png",S={w0:[1,1,1,1],w2:[1,1,.3,1],w3:[0,1,.4,1],w4:[.3,.8,1,1],w5:[.8,0,.6,1],held:[1,1,1,1]},z=o.from(P),X=o.from(G);class F extends w{standard=new l(z);standardAnim;anims=new Set;constructor(t,a){super(),this.standard.blendMode=L.ADD;const e=.5;t.on(this,"hit",n=>{if(a==n.columnNumber){const A=S[n.judgement.id]??[1,1,1,1];this.standard.tint=I(A[0]*255,A[1]*255,A[2]*255),h.finish(this.standardAnim),this.standardAnim=h.animate(this.standard,{0:{alpha:1,"scale.x":1*e,"scale.y":1*e},"0.5":{alpha:1.1,"scale.x":1.1*e,"scale.y":1.1*e},1:{alpha:0,"scale.x":1.1*e,"scale.y":1.1*e}},.12)}}),t.on(this,"held",n=>{a==n.columnNumber&&(this.standard.tint=16777215,h.finish(this.standardAnim),this.standardAnim=h.animate(this.standard,{0:{alpha:1,"scale.x":1*e,"scale.y":1*e},"0.5":{alpha:1.1,"scale.x":1.1*e,"scale.y":1.1*e},1:{alpha:0,"scale.x":1.1*e,"scale.y":1.1*e}},.12))}),t.on(this,"holdon",n=>{a==n.columnNumber&&(this.standard.alpha=1)}),t.on(this,"holdoff",n=>{a==n.columnNumber&&(this.standard.alpha=0)}),t.on(this,"rollon",n=>{a==n.columnNumber&&(this.standard.alpha=1)}),t.on(this,"rolloff",n=>{a==n.columnNumber&&(this.standard.alpha=0)}),t.on(this,"hitmine",n=>{if(a==n.columnNumber){const A=new l(X);A.alpha=0,A.anchor.set(.5),A.blendMode=L.ADD,this.addChild(A),h.animate(A,{0:{alpha:1,rotation:0},"0.5":{alpha:1,rotation:90*Math.PI/180},1:{alpha:0,rotation:180*Math.PI/180}},.4,void 0,()=>A.destroy())}}),this.standard.alpha=0,this.standard.anchor.set(.5),this.addChild(this.standard)}}const k="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAABACAYAAADS1n9/AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zU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R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAShJREFUeNrs3T1OAkEAhuEPHCEEEgq0sDBGK49g4wG8h8fyHh7AxiNYaYyFhVKQQBSy7HqGJYFszPP085OZd+rpNU2TNq7ub96r5XpaxoOc3F5meDpJkmzmq3w+vuTnY5Fe6WdfjkbH6Zd+0kt3NEmzrbP9rdLUzf6WqeqMzqc5u7vOYDZOkqy/lvl+eku12qRMhovXh+eLNnOWHfYxSzIOXdT6Pnd5qpVz7qzqEAHwjwhAAAgAASAABIAAEAACQAAIAAEgAASAABAAAkAACAABIAAEgAAQAAJAAAgAASAABIAAEAACQAAIAAEgAASAABAAAkAACAABIAAEgAAQAAJAAAgAASAABIAAEAACQAB0JYDi2DqrHOIy5/GBdFct2g74AwAA//8DANl4L31+t8K2AAAAAElFTkSuQmCC",M="/smeditor/assets/capActive-e83fb138.png",W="/smeditor/assets/capInactive-4622d5f2.png",j=o.from(Y),$=o.from(q),i={hold:{active:{body:o.from(U),cap:o.from(K)},inactive:{body:o.from(H),cap:o.from(O)}},roll:{active:{body:o.from(k),cap:o.from(M)},inactive:{body:o.from(J),cap:o.from(W)}}},_={Center:0,DownLeft:0,UpLeft:90,UpRight:180,DownRight:270},AA=["Receptor","Tap","Lift","Fake","Hold Inactive Head","Hold Active Head","Roll Inactive Head","Roll Active Head"],nA={elements:{DownLeft:{Receptor:r=>{const t=new l(r.columnName=="Center"?$:j);t.width=72,t.height=72,t.anchor.set(.5);let a;return r.noteskin.on(t,"ghosttap",e=>{e.columnNumber==r.columnNumber&&(h.finish(a),a=h.animate(t,{0:{width:54,height:54},1:{width:72,height:72}},.11))}),r.noteskin.onUpdate(t,e=>{const n=e.getVisualBeat();let A=204;(n%1+1)%1>.2&&(A=102),t.tint=I(A,A,A)}),t},Tap:r=>{const t=new l(o.WHITE);return s.setNoteTex(t,r.note,r.columnName),t.anchor.set(.5),t.width=72,t.height=72,t},Fake:{element:"Tap"},Lift:{element:"Tap"},Mine:{element:"Tap"},NoteFlash:r=>new F(r.noteskin,r.columnNumber),"Hold Active Head":{element:"Tap"},"Hold Inactive Head":{element:"Tap"},"Hold Active Body":()=>new m(i.hold.active.body),"Hold Inactive Body":()=>new m(i.hold.inactive.body),"Hold Active TopCap":()=>new f(i.hold.active.cap,64,!0),"Hold Inactive TopCap":()=>new f(i.hold.inactive.cap,64,!0),"Hold Active BottomCap":()=>new T(i.hold.active.cap),"Hold Inactive BottomCap":()=>new T(i.hold.inactive.cap),"Roll Active Head":{element:"Tap"},"Roll Inactive Head":{element:"Tap"},"Roll Active Body":()=>new m(i.roll.active.body),"Roll Inactive Body":()=>new m(i.roll.inactive.body),"Roll Active TopCap":()=>new f(i.roll.active.cap,64,!0),"Roll Inactive TopCap":()=>new f(i.roll.inactive.cap,64,!0),"Roll Active BottomCap":()=>new T(i.roll.active.cap),"Roll Inactive BottomCap":()=>new T(i.roll.inactive.cap)}},load:function(r,t){const a=r.columnName;r.columnName="DownLeft";const e=this.loadElement(r,t);return AA.includes(r.element)&&(e.rotation=_[a]*Math.PI/180),e},init(){s.initArrowTex()},update(r){s.setArrowTexTime(r.chartManager.app)},hideIcons:["Lift","Fake"]};export{nA as default}; diff --git a/Noteskin-e768ec16.js b/Noteskin-6a616711.js similarity index 99% rename from Noteskin-e768ec16.js rename to Noteskin-6a616711.js index a216c037..8e0aa502 100644 --- a/Noteskin-e768ec16.js +++ b/Noteskin-6a616711.js @@ -1,4 +1,4 @@ -import{w as s,x as v,y as w,b as h,z as x,O as B,H as u,J as D,L as b,P as r,V as l,X as A,Y as H,a1 as T,$ as d}from"./ChartManager-f20da8bc.js";import{A as C}from"./AnimatedSprite-d8850d0f.js";import{H as m}from"./HoldBody-34995142.js";const I="/smeditor/assets/0-c5249fef.png",U="/smeditor/assets/1-0e354907.png",M="/smeditor/assets/2-ce5f7b2f.png",P="/smeditor/assets/3-648105cf.png",y="/smeditor/assets/4-da345826.png",F="/smeditor/assets/5-f6bb9779.png",O="/smeditor/assets/6-12d00670.png",Y="/smeditor/assets/7-00801dd0.png",G="/smeditor/assets/8-9a73d4f3.png",Q="/smeditor/assets/0-0543793c.png",z="/smeditor/assets/1-84dd19f7.png",L="/smeditor/assets/2-3b873573.png",_="/smeditor/assets/3-e5952ffa.png",N="/smeditor/assets/4-1f9a4a43.png",E="/smeditor/assets/5-b9acdc27.png",j="/smeditor/assets/6-565a7261.png",W="/smeditor/assets/7-dd1c0ecf.png",R="/smeditor/assets/8-94163432.png",X="/smeditor/assets/frame-d599a2fe.png",S="/smeditor/assets/parts-b37af2cf.png",k=`precision mediump float; +import{w as s,x as v,y as w,b as h,z as x,O as B,H as u,J as D,L as b,P as r,V as l,X as A,Y as H,a1 as T,$ as d}from"./ChartManager-3c3d6f39.js";import{A as C}from"./AnimatedSprite-86b56f12.js";import{H as m}from"./HoldBody-5358344a.js";const I="/smeditor/assets/0-c5249fef.png",U="/smeditor/assets/1-0e354907.png",M="/smeditor/assets/2-ce5f7b2f.png",P="/smeditor/assets/3-648105cf.png",y="/smeditor/assets/4-da345826.png",F="/smeditor/assets/5-f6bb9779.png",O="/smeditor/assets/6-12d00670.png",Y="/smeditor/assets/7-00801dd0.png",G="/smeditor/assets/8-9a73d4f3.png",Q="/smeditor/assets/0-0543793c.png",z="/smeditor/assets/1-84dd19f7.png",L="/smeditor/assets/2-3b873573.png",_="/smeditor/assets/3-e5952ffa.png",N="/smeditor/assets/4-1f9a4a43.png",E="/smeditor/assets/5-b9acdc27.png",j="/smeditor/assets/6-565a7261.png",W="/smeditor/assets/7-dd1c0ecf.png",R="/smeditor/assets/8-94163432.png",X="/smeditor/assets/frame-d599a2fe.png",S="/smeditor/assets/parts-b37af2cf.png",k=`precision mediump float; varying vec2 vUvs; diff --git a/Noteskin-34b7a61f.js b/Noteskin-7b7fe270.js similarity index 99% rename from Noteskin-34b7a61f.js rename to Noteskin-7b7fe270.js index dffcce68..a5791156 100644 --- a/Noteskin-34b7a61f.js +++ b/Noteskin-7b7fe270.js @@ -1,4 +1,4 @@ -import{w as r,x as I,y as E,b as P,z as v,O as m,H as w,J as c,L as Q,P as a,Q as p,a1 as L,V as C,Y as x,$ as l}from"./ChartManager-f20da8bc.js";import{A as H}from"./AnimatedSprite-d8850d0f.js";import{H as d}from"./HoldBody-34995142.js";const b="/smeditor/assets/downBodyActive-dd1fd694.png",G="/smeditor/assets/downBodyInactive-c781a303.png",y="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB98FAw0dOV1YU4MAAAPKSURBVHja7d1dTupQFIbh0pwJkDBA4xjEQVjGcOIATZwBnFslHC1l7b2/v3WHiUL6PimUwHI3Xc1pWS5fbz8/vU5bZn843/07nx/zVDVb7h/5sW29/7/vb99uvxyPu6+356nRbHnAldEqg7HGXzPt/rIIAuX4zQGwI1CP3wUAKwKH+N0AsCFwid8VAAsCp/jdAaAjcIs/BAAqAsf4wwCgIXC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TirwQgiUAt/moAUggU41cAkECgGr8KADUC5fiVACgRqMevBkCFwCF+BwAKBC7xuwBAI3CK3wkAEoFb/G4AUAgc4yMAgEDgGh8FQCuCkaUSHwkADQKl+GgA4BGoxUcEAItAMT4qADgEqvGRAcAgUI6PDqAdgXp8BgBtCBziswAoR+ASnwlAGQKn+GwAliNwi88IYBkCx/isAKYjcI3PDGAagpGlEp8dQAsCpfgKAEoRqMVXAVCCQDG+EoClCFTjqwFYgkA5viKAqQjU46sCmILAIb4ygIcQuMRXBzCEwCm+A4BTCNziuwA4hMAxvhOALxG4xncDcBeB+764ATiCwGpPHAF8hcBuP1wB3EPgvBfWCK7ZhqysrKysrCy39Q9gQ/q5SfcuvQAAAABJRU5ErkJggg==",Y="/smeditor/assets/leftBodyActive-75d41033.png",V="/smeditor/assets/leftBodyInactive-bbc074cd.png",N="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEANIA0gBQ7xAn7AAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB+EDFAI2I6Ho7PYAAANMSURBVHja7Z1bTgMxDEU7VjeAxAJR10C7CMoaEAus1B0Av6XiMY/EsX2PJT4GoTHpOZNJMhl32t3F6/n8eXt8eDrt1sTD48eiv79ebNcqluZumX9N7p7/39v7y7fj5+Nxuj3e7zrF9WKzP4xM8HsBHhXW8+RzPtgqVz4CrPiAM8IfIUzPnDaqAZmvfE8JeueyEQ2p0O17SOCRw7U/u16s1D2/JyCvXibtCCjKgC/LOX+LPfBzAZPvAZjqCQsAfGEBgC8sAPCFBQC+sADAFxYA+MICAF9YAOD7xh74f+evLpcB/+/81XYAhRQgKnwFCQz4ta/w0AIAX1gA4AvPApTgR5/WGvDjrTN4CmrAjwXfWwIDfjz4nhIY8GPC95LAgB8XvocEBnztqaYBX3udIczTQOoDFBOA+gA5gvoA1AcY17VTH2B8TuoDBAPinYv6AIEloD5A8Hs+9QEGBvU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NoxAKd6ACB8ABA+AAgfAIQPAMIHAOEDgPABQPhjayH89/2r4zLCf9+/2hVAIQFEDV8BgRF+7U94aACELwyA8IXPApTCj35aa4Qfb57BE6gRfqzwvREY4ccL3xOBEX7M8L0QGOHHDd8DgRG+9qmmEb72PEOYbwNZH6AYANYHyFGsD8D6AON27awPML4n6wMEC8S7F+sDBEbA+gAJjvmsDyAcfqbnDD8PkHm0z/oAwuFzGkj4ACB8ABA+AAgfAIQPgJHhU0UAEL4wAMIXBkD4wgAIXxgA4QsDaBk+p4DJABC+MADCj1FLxfB7jik8+rE+gHD43oNiI/yY/VgfQDh8zx5G+DHD9+plhB83fI+ellmvdxgVZyyN8HXDXwXgyZ0lVHEAcwsEvSczvGf/qs42vtoDgEAEwbtDQDgE3j/oEOUHJEauDwCCwQiO9FqT1bzyuX4f/7DntnHmBIaHP+8FAALnfh7hbwUAgin+18Fbwt8DIA0Cxdoa/l4AICgS/hEAICgQ/lEAIEge/pp5gM2AIs4YEn4/ACBIHH4rACBIGn5LACBIGH6LQWC4geFWQAWudziUoXm8IPYEMcPvBWAoAqE7jZvsvc3zBYIgVvi9xgBhxgR78LQeZMlIAgEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEEQqywY08kUlkX9pPSuAdAgAAAIAgAAA5RAAAAQAAAEAQAAAPQSVkViB99AVQfU9RKVLnJtMGx+tJ/iYCs60J2AMAIKWn34OASqHA74OFkbABSHCCLgkTBgBF4UKI+CycGEE3BgijIBbwwoiUN6GigBaIuD2cGEELBAhjEB9u1EURVEUlbz+AOnsq2p4bKxbAAAAAElFTkSuQmCC",X="/smeditor/assets/rightBodyActive-07f95372.png",K="/smeditor/assets/rightBodyInactive-fdefc2a4.png",R="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1F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yUVtXqGTxTYft32HTucbneQGJroAb/WyW7joEgroN7ENBRBANtHNBAzAthGOBAhAN1JOBAQw2UqKFwPAbDsvXV7tvJ7svxZ7rtud17P931ZQbn4f7X83O9+XNr9v5w+cdv6DPwWiAkzzlaAAyJZDQXEQyuECcsDJmViATmKR+UogAfSAFy5wAH7ADBaww3B0PhbQ03h0PhSUp/GcethVOXjKqVw4QgrEwWj0wLN2Qn0w2gsc+QamFEfDbecTbucTnnY+pp8sjgkNLT+ffpyoPadU5tMFGKDz4ZLysFx1CO5g0eJhudeLFVqtjA+WNecV22OIR4LiyOjmfOiF8cHSm/rkdnsY9mAxAPD8iaAHmPyBoAW4fC/oADZfCxqAz7eC+gKFsBDenyBvUCgBs3wnqADTfCUoALLlUAABpKERFIDFS2DYFTELL60tQXfZ2PzZpTfFdULPs/k1QSsvVy2r+4x0PhZU9xmlK6HcVVHF0HJLd7MbCOkEJ93shiKkwAPaACfQANBeCSwANTcCCYCthcBdsBgav8hEd8Mjb8unGoDI55MFQOXj6Rwg8+kCDND5cAkFdM3spbwW0OdPBeW14/Ii5cHC5t5ze5HzREAANH8kAACePxH0AJM/ELQAl+8FHcDma0ED8PlW8AT4F0zxmObwVcrYAAAAAElFTkSuQmCC",Z="/smeditor/assets/upBodyInactive-87a7969e.png",J="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEAHgAeQB3paCnMQAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB+EDFAI5IlF3wK8AAAPCSURBVHja7Z1bbsIwFETNKBtAYoFV11C6iNI1VF0gEjug/YUoRbWxfR8zV+oHH9TG58QhUe6wK6v6PJ1+bl+/vryX2tofrtXvuZxRelXL+BHm2DL+1/fH3eu343F3+xq9Fykr/N7/u+Uzj/hsEHxuCcAM/3KGOQTr8VGMytP5NKIEoQXw+GWKVQIIPrcEEHxuCTBr4pGuob1L0HMtMeMIj3gDxasEvXeI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M0vQkk+tGnRk+BklaM2nVgx6FvzAESafmj1o4MfK59Ew6Fvn5csRfph8ajEwZ/gh8qmFgwZ+gHxq0aCBHySfB7O47HYwfAUgCgQCIACBAAQCEAhAIACBAAQCEAhAIACBAAQCZI8rFT4OHUwsVoAWkC7ta2y2gDNAnXoXWd0DzP7XsQiQTALHrmXHZhi0p+MxkKgiwMqmCxm7l91H1kOdy5oufAN/RwADCSqVt2U/1j1dgmq1jRXO9U+ToGJha5XCjuESVK1qrlTZM0yCyiXt1Uq7uktQvZ9Bxdq+bhI4NLOoWtx5WQKXTiaVq3ubJXBqY1O9vPu0BG49jBzq+2/kyFuAKxKUz49Th48bufEW4IwEtL4hCIIgCKJ0/AYcP+o66BZ87AAAAABJRU5ErkJggg==",j="/smeditor/assets/upleftBodyActive-bc79d60f.png",q="/smeditor/assets/upleftBodyInactive-f60085c6.png",W="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+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z/GMzLdsAAAAGYktHRADSANIAUO8QJ+wAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfhAxQCNRlMyWaHAAACeUlEQVR42u3dPU4jQRRF4S7Le5nMayGFBTIpa3HGajzBaKQBDBi56/d+J8NCDa57eO9Vu2zKVo/L/1+czw9ffvPz718b/vL0+PrhsdPp5f1DZY+fdbDc44dfk6Ml7xtAb1SA4PAJEB4+AcLDX3IGSA4zvgIIf+IKIDwVAAQAAUAAEAAEAAFAABAABAABQAAQAAQAAbAbQ50I8t6A9uciDsIfi9broAWES0CAcAkIYBcAAoAAyNwOEiD8XgABgsPfNp8P0D0AM4DwCSD8fhyFaBsofAIInwDCNwPMHv5PX0EjT/guwCEU28B4CdwHCJeAAOESECBcAgKES0CAcAkIEC4BAcIlIEC4BAQIl8CnhYdLsFwFIIEWQIIEAb4LmQS3cVz5L/zp8fWusBLOCxxWDf/eEFMOi0RsA1tJQ4BF2kYSUW8N+24mSDxjGHcn0O4gXAASEIAEBCDB0gKcTi8kSBXgX/gkCBTgfegkMAP8SIKajCrBUgKczw8kSK8AJNACtAMC2CISgAQEmEECArShkEAFIIEWQAIzAAkMgSQgAAkIQAICdJZgBHkI0EmCUSoHATpIMFLb8D+DPkpwuSbBZy8zzz4TqAAVKgEBSEAAEhBg96m4Q39dXoKhKsBXAXccrpaWYLgWcC3oASbrZSUoFa/9Zjt16zZqD64EU2o8p1bP7RPRypIVwGDYLvwlBWhQlptJUDv8pi1g9lJ5azuYrWWXyr9wMwkah99DgjLNRVtL0Cn8lhKU6S7cSoLO4beQoGyzXry2BIOE7z5ADwmEP6cANcul8CdatIvwswXYUwLhT7x4F+EDAAAAAAAAAAAAAAAAAAAAwD38AT8g+uUAT65wAAAAAElFTkSuQmCC",$="/smeditor/assets/uprightBodyActive-3d912f52.png",A0="/smeditor/assets/uprightBodyInactive-01c6c977.png",n0="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAKT2lDQ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AAElFTkSuQmCC",u=`precision mediump float; +import{w as r,x as I,y as E,b as P,z as v,O as m,H as w,J as c,L as Q,P as a,Q as p,a1 as L,V as C,Y as x,$ as l}from"./ChartManager-3c3d6f39.js";import{A as H}from"./AnimatedSprite-86b56f12.js";import{H as d}from"./HoldBody-5358344a.js";const b="/smeditor/assets/downBodyActive-dd1fd694.png",G="/smeditor/assets/downBodyInactive-c781a303.png",y="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB98FAw0dOV1YU4MAAAPKSURBVHja7d1dTupQFIbh0pwJkDBA4xjEQVjGcOIATZwBnFslHC1l7b2/v3WHiUL6PimUwHI3Xc1pWS5fbz8/vU5bZn843/07nx/zVDVb7h/5sW29/7/vb99uvxyPu6+356nRbHnAldEqg7HGXzPt/rIIAuX4zQGwI1CP3wUAKwKH+N0AsCFwid8VAAsCp/jdAaAjcIs/BAAqAsf4wwCgIXCNPxQACgLn+MMBICBwjg8BQAEBa3wYAMwImONDAWBEwB4fDgATAoX4kAAYEKjEhwWAjEApPjQARARq8eEBICFQjE8BAAGBanwaACMRKMefpmn60+NUWXVAPj/mu4PsD+fN94/4yeZqXHPr+NWn415nAtSPtVe/vplbP2BGBOjfaag8ll2frBgQqH2hBe5FIDICt/jDrgIQETjGH3oZiITANX4pAMYvf+wPZ8r4lfdfegZQ+kKoQ/wmTwHKCBQ/QDqjHCh0BKqfHs5+AOP4za8Csh8AO36Xy8DsB8CN3+19gOwHyH6A7AcAjN8VAAuC7AcwRpD9AMYIsh/AGEH2AxgjyH6AwZP9AJM3AAUE2Q9gjCD7AYwRZD+AMYLsBzBGkP0AxgiyH8AYQfYDGCPIfgBjBNkPYIwg+wEKDlj2A+AdyyZngOwHyH6ALs/J2Q+Q/QDZD8D6IjD7AXDiD7sKyH4AjPhDLwOzH2B8/FI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gWJ8CgAICFTj0wDoRKAcf9sWvBZwb8NYX2xBfGfz2X+/9LWAzzas++1dI7eP+rb22dc3e9X/TCYE6J9pmLmXpdcADAjUPtACdxGIjMAtftspABGBY/zWYyASAtf404+BLhvJdKwtPQYqfSBUIX7LQ4AyAsV3D+8oG4WOQPWt45kPYBx/+Skg8wGw45ccAzMfADd+2fMAmQ+Q+QCZDwAYvxQAC4LMBzBGkPkAxggyH8AYQeYDfFyZDyD0t2Q+gHF86IcAJQSZD2CMIPMBjBFkPoAxgswHMEaQ+QDGCDIfwBhB5gMYI8h8AGMEmQ9gjCDzATIfoC1+5gM03hNkPsDkDct8AMy9zHwAsvj0F4GZD4ATv+0UkPkAGPFbj4GZD9Aff/oxMPMB8I6amQ9gHL/lISDzAXjiHwJw5y7EEgFj/CPtLp98/3r7jZG3h6tcEwjFvxwFEAQG8b8DYI9APf4RALYIHOIfBWCHwCX+GQA2CJzinwUgj8At/ggAWQSO8UcByCFwjf8IABkEMxdb/EcBBAF5/BkAgoA4/iwA1giY488EYImAPf5sAFYIFOKvAGCBQCX+KgDSCJTirwQgiUAt/moAUggU41cAkECgGr8KADUC5fiVACgRqMevBkCFwCF+BwAKBC7xuwBAI3CK3wkAEoFb/G4AUAgc4yMAgEDgGh8FQCuCkaUSHwkADQKl+GgA4BGoxUcEAItAMT4qADgEqvGRAcAgUI6PDqAdgXp8BgBtCBziswAoR+ASnwlAGQKn+GwAliNwi88IYBkCx/isAKYjcI3PDGAagpGlEp8dQAsCpfgKAEoRqMVXAVCCQDG+EoClCFTjqwFYgkA5viKAqQjU46sCmILAIb4ygIcQuMRXBzCEwCm+A4BTCNziuwA4hMAxvhOALxG4xncDcBeB+764ATiCwGpPHAF8hcBuP1wB3EPgvBfWCK7ZhqysrKysrCy39Q9gQ/q5SfcuvQAAAABJRU5ErkJggg==",Y="/smeditor/assets/leftBodyActive-75d41033.png",V="/smeditor/assets/leftBodyInactive-bbc074cd.png",N="data:image/png;base64,iVBORw0KGgoAAAANS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IA0Cxdoa/l4AICgS/hEAICgQ/lEAIEge/pp5gM2AIs4YEn4/ACBIHH4rACBIGn5LACBIGH6LQWC4geFWQAWudziUoXm8IPYEMcPvBWAoAqE7jZvsvc3zBYIgVvi9xgBhxgR78LQeZMlIAgEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEEQqywY08kUlkX9pPSuAdAgAAAIAgAAA5RAAAAQAAAEAQAAAPQSVkViB99AVQfU9RKVLnJtMGx+tJ/iYCs60J2AMAIKWn34OASqHA74OFkbABSHCCLgkTBgBF4UKI+CycGEE3BgijIBbwwoiUN6GigBaIuD2cGEELBAhjEB9u1EURVEUlbz+AOnsq2p4bKxbAAAAAElFTkSuQmCC",X="/smeditor/assets/rightBodyActive-07f95372.png",K="/smeditor/assets/rightBodyInactive-fdefc2a4.png",R="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB+EDFAI3NtUuOVwAAAOHSURBVHja7Z3RTSsxEEUdKw0gUSCiBkIRhBoQBSLRQeDr6YWQEK/j8c7MPfcvIO0sPmcd24RhU07yut9/Hb9+fHguPbm7PxSLfH7UIdfpub9RtXvq99Z+e3/58fppt9scv96WYLk2cK0D9flRF0O4uz8Mk2BJ/ZHinaYW4fQM7MiZraW+JXxTAaxvfFRNzxLMGMPqDcgatTxKMGvsqmcwM2t4kmDmg1O9P50zr+1BgtlvndOqWfxgXq5pteWdkanbwDUWhtZbNIstYsoZgC0iAiABAiABAiABAiABAiABAiABAiABAiDButlmB3Vu0Nf4UMfx/Xg6Maxq8Ec/idFngqoGHwlYAyABAiABAiDB/F3A2p/Fn7U6j7Q7qBGfsghPYpSZoGaEjwSOBFh7kYMEKwrgZa+LBCsI4O3cGwmCbgMzQfAoQYhzACQ4aAvwbxBGDURECaxCf4CFtekPkCj0B6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SUQ8L0lkDP8t/enkgc9UwgQ6QyhswRyh+8ugYDvLYGA7y2BgO8tgYDvLYGA7y2BgO8tgYDvLYGA7y0B/QHMJaA/gLkEAr63BLb9AbJLkFqA7PArSSDge0sg4HtLYNMfoJIE9AcIGvQHSJTgLFvd1fiuP8CxJYkZs6vXNd7en0KeXA71HiDi/uqyVaUSYPYdtpsEcob/qC7ASQI5w//XtVwkkDt8dwkEfG8JBHxvCQR8bwlCvAkcfZikNeGjrzHjZVH4TqFR4Z/9XvoDBIQ/O+gPYAw/qwQCvrcEAr63BAK+twQCvrcEAr63BAK+twQCvrcEAr63BEc2+PfvtlefWm4Zz+vLx+kcjTpoKma+90og4HtLIOB7S5CqP8AXf9sOFy1jpD9AEfgZJRDwvSU4HOGPrg38PPazj6ktj4ghVoARNe0z4Y+agSNWAov+AA8St49egTokdx8pQW9Jj5kzLBr8P0vt/dc6LMP7dne6unU7KPkUEAn+o70/ykowOr6tC9i2ee/b/xP+5bqFR7O701a1Z8qnopg7YuafvdMfdPcdOp+KMOgI8CtJcCafWj3oSPArSHA2n1o56IjwM0vQkk+tGnRk+BklaM2nVgx6FvzAESafmj1o4MfK59Ew6Fvn5csRfph8ajEwZ/gh8qmFgwZ+gHxq0aCBHySfB7O47HYwfAUgCgQCIACBAAQCEAhAIACBAAQCEAhAIACBAAQCZI8rFT4OHUwsVoAWkC7ta2y2gDNAnXoXWd0DzP7XsQiQTALHrmXHZhi0p+MxkKgiwMqmCxm7l91H1kOdy5oufAN/RwADCSqVt2U/1j1dgmq1jRXO9U+ToGJha5XCjuESVK1qrlTZM0yCyiXt1Uq7uktQvZ9Bxdq+bhI4NLOoWtx5WQKXTiaVq3ubJXBqY1O9vPu0BG49jBzq+2/kyFuAKxKUz49Th48bufEW4IwEtL4hCIIgCKJ0/AYcP+o66BZ87AAAAABJRU5ErkJggg==",j="/smeditor/assets/upleftBodyActive-bc79d60f.png",q="/smeditor/assets/upleftBodyInactive-f60085c6.png",W="data:image/png;base64,iVBOR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Df/eEFMOi0RsA1tJQ4BF2kYSUW8N+24mSDxjGHcn0O4gXAASEIAEBCDB0gKcTi8kSBXgX/gkCBTgfegkMAP8SIKajCrBUgKczw8kSK8AJNACtAMC2CISgAQEmEECArShkEAFIIEWQAIzAAkMgSQgAAkIQAICdJZgBHkI0EmCUSoHATpIMFLb8D+DPkpwuSbBZy8zzz4TqAAVKgEBSEAAEhBg96m4Q39dXoKhKsBXAXccrpaWYLgWcC3oASbrZSUoFa/9Zjt16zZqD64EU2o8p1bP7RPRypIVwGDYLvwlBWhQlptJUDv8pi1g9lJ5azuYrWWXyr9wMwkah99DgjLNRVtL0Cn8lhKU6S7cSoLO4beQoGyzXry2BIOE7z5ADwmEP6cANcul8CdatIvwswXYUwLhT7x4F+EDAAAAAAAAAAAAAAAAAAAAwD38AT8g+uUAT65wAAAAAElFTkSuQmCC",$="/smeditor/assets/uprightBodyActive-3d912f52.png",A0="/smeditor/assets/uprightBodyInactive-01c6c977.png",n0="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRH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BIgYKkDkuLdvS/8hKq8LKHB+Vv4PX3VdQJEzd1aqrzqvXeT9X+UTStV1Af+3f+h6JgCAiCEAAAgAAGANAKKnbvevom73r6Jud62ibvdvyz80PRMAABUAAAgAAGANAOj+dP849EwAAFQAACAAACCu6me4GzDuHYC7AbkbEACoAABAAABALHAdQOTwPACeBwAAVAAAIAAAgDUAiBPuCeB5AABABQAAAgAAWAMAuj/d/+fTMwEAUAEAgAAAgLiqn+F5AHHvADwPgOcBAAAVAAAIAACIBa4DiByeB8DzAACACQCghNFIJR8OdfZD49vAQn534TnLM9L6h60nAEDm+XOVfH9fZ79vfBv4KL776ZNH/kLrH7aeAAC5+4/HjfTF7r+318y/2F33TLMNFLv/P19+rH9oegIARPKGAVBkMsl1+nyi0s9mSbv+Sdh6AgDkiUC5BjAaWZ3e6vy9awAt+3ddTwCAHACDgUrf/iKgzM2N26o/i4AQZvdveARXnfevGwBV563rHgBV5/2z7Mf4h6onAEBeA1BOAP2+7h+47/q6CSBL2vW3YesJABBJfAHgfBVAPgB9S4TDRDcCL5eywxOlf+75Bl3XEwCgmwA8I3aa5hq5SfNU9fkzzwTwROmfJVnQegKA7i8OkUlfHiFPjuVr/tNUPgCPPdesp0n6oO6/YbXKH9Sd6/of2+Og9QQAeErkY6VctwbwWLkGsFqZrfp3XU8AgFzxd3QB0NvV+e8qd9H12ncdgmvVv+t67gYEiJh/AchBW6zwsfy0AAAAAElFTkSuQmCC",i0="/smeditor/assets/frame-d599a2fe.png",C0="/smeditor/assets/parts-b37af2cf.png",s0="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAABACAYAAAD1Xam+AAAKTWlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVN3WJP3Fj7f92UPVkLY8LGXbIEAIiOsCMgQWaIQkgBhhBASQMWFiApWFBURnEhVxILVCkidiOKgKLhnQYqIWotVXDjuH9yntX167+3t+9f7vOec5/zOec8PgBESJpHmomoAOVKFPDrYH49PSMTJvYACFUj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ACeBwAAVAAAIAAAgDUAiBPuCeB5AABABQAAAgAAWAMAuj/d/+fTMwEAUAEAgAAAgLiqn+F5AHHvADwPgOcBAAAVAAAIAACIBa4DiByeB8DzAACACQCghNFIJR8OdfZD49vAQn534TnLM9L6h60nAEDm+XOVfH9fZ79vfBv4KL776ZNH/kLrH7aeAAC5+4/HjfTF7r+318y/2F33TLMNFLv/P19+rH9oegIARPKGAVBkMsl1+nyi0s9mSbv+Sdh6AgDkiUC5BjAaWZ3e6vy9awAt+3ddTwCAHACDgUrf/iKgzM2N26o/i4AQZvdveARXnfevGwBV563rHgBV5/2z7Mf4h6onAEBeA1BOAP2+7h+47/q6CSBL2vW3YesJABBJfAHgfBVAPgB9S4TDRDcCL5eywxOlf+75Bl3XEwCgmwA8I3aa5hq5SfNU9fkzzwTwROmfJVnQegKA7i8OkUlfHiFPjuVr/tNUPgCPPdesp0n6oO6/YbXKH9Sd6/of2+Og9QQAeErkY6VctwbwWLkGsFqZrfp3XU8AgFzxd3QB0NvV+e8qd9H12ncdgmvVv+t67gYEiJh/AchBW6zwsfy0AAAAAElFTkSuQmCC",u=`precision mediump float; varying vec2 vUvs; diff --git a/Noteskin-44837e02.js b/Noteskin-88871f72.js similarity index 99% rename from Noteskin-44837e02.js rename to Noteskin-88871f72.js index 842f15a4..1779df16 100644 --- a/Noteskin-44837e02.js +++ b/Noteskin-88871f72.js @@ -1,4 +1,4 @@ -import{w as a,a1 as T,x as B,y as N,b as p,z as f,O as u,H as y,J as V,L as E,P as r,Q,Z as x,V as c,Y as w,$ as h,a0 as L}from"./ChartManager-f20da8bc.js";import{A as C}from"./AnimatedSprite-d8850d0f.js";import{H as m}from"./HoldBody-34995142.js";const P="/smeditor/assets/frame-d599a2fe.png",H="/smeditor/assets/parts-b37af2cf.png",b=`precision mediump float; +import{w as a,a1 as T,x as B,y as N,b as p,z as f,O as u,H as y,J as V,L as E,P as r,Q,Z as x,V as c,Y as w,$ as h,a0 as L}from"./ChartManager-3c3d6f39.js";import{A as C}from"./AnimatedSprite-86b56f12.js";import{H as m}from"./HoldBody-5358344a.js";const P="/smeditor/assets/frame-d599a2fe.png",H="/smeditor/assets/parts-b37af2cf.png",b=`precision mediump float; varying vec2 vUvs; diff --git a/Noteskin-4f641a63.js b/Noteskin-ace77c92.js similarity index 99% rename from Noteskin-4f641a63.js rename to Noteskin-ace77c92.js index 89ec9f85..e9241d83 100644 --- a/Noteskin-4f641a63.js +++ b/Noteskin-ace77c92.js @@ -1 +1 @@ -import{w as B,b as n,a1 as Q,P as C,Y as s,V as a,$ as D}from"./ChartManager-f20da8bc.js";import{A as i}from"./AnimatedSprite-d8850d0f.js";import{H as h}from"./HoldBody-34995142.js";const w="/smeditor/assets/hold-3ccaaf09.png",E="/smeditor/assets/mine-590d445e.png",l=B.from(w),f=B.from(E);class c extends n{hold=new i(Q(l,2,1,72,128)[0]);anims=new Set;constructor(e,A){super(),e.on(this,"holdon",g=>{A==g.columnNumber&&(this.hold.visible=!0)}),e.on(this,"holdoff",g=>{A==g.columnNumber&&(this.hold.visible=!1)}),e.on(this,"rollon",g=>{A==g.columnNumber&&(this.hold.visible=!0)}),e.on(this,"rolloff",g=>{A==g.columnNumber&&(this.hold.visible=!1)}),e.on(this,"hitmine",g=>{if(A==g.columnNumber){const t=new C(f);t.alpha=0,t.anchor.set(.5),t.blendMode=s.ADD,this.addChild(t),a.animate(t,{0:{alpha:1,rotation:0},"0.5":{alpha:1,rotation:90*Math.PI/180},1:{alpha:0,rotation:180*Math.PI/180}},.4,void 0,()=>t.destroy())}}),e.onUpdate(this,()=>{this.hold.alpha=Math.sin(Date.now()/1e3*Math.PI*2*20)*.1+1}),this.hold.visible=!1,this.hold.anchor.set(.5),this.addChild(this.hold)}}const r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAACACAMAAACMX59YAAAAIVBMVEUAAAD///+6urq4uLizs7OoqKinp6ecnJyVlZWUlJSIiIh18TD6AAAAAXRSTlMAQObYZgAAAKhJREFUeNrt2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m9Wl/NvwJJIwFbHuLc4AAAAABJRU5ErkJggg==",v="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAABACAMAAABbYT+NAAAAOVBMVEUAAAAAAAAICAgoKChAQEBfAABvAACRAACYmJieAACoqKi4uLi7AADQ0NDRAADg4ODpAADw8PD////pSTDZAAAAAXRSTlMAQObYZgAAATxJREFUeNrt2EGOgzAMQNGxSVxI0hK4/2Fnokx7AHuBVP7bf0W2WgT5AQAAAAAAAAAAAAAAAAAAAAAAAPB9ZLhrTy+q2bKKBPoc6SXcD9Hz4/Nftv8lpbQEelv3Y19NxdnnXmrp2d+33ntz96K2bZupBM+Pz3/R/lP560savYfa8xyeJr4+r3VYs3OA/OrDy9vrow0PjZ8fn9+//+rdf5r9M3n3t57TquLqe526s299as7e2mTR8+PzX7H/pZxTWcT3B9jPac/i6kudirPvb75etzZtGjw/Pv8V+0+fPvl+AHac02G+Aerb/X4A8fnj+0+fPvEE4AnAOwDvAP6vAA2+BevNvwLUuf96DtU0+BWg3ANwD+AhEryJkjvfBMb7+P7/bwK5C6cHAAAAAAAAAAAAAAAAAAAAAADAl/kFHH4jM43eaVYAAAAASUVORK5CYII=",F="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAABAAQMAAADoGO08AAAABlBMVEUAAAD///+l2Z/dAAAAAXRSTlMAQObYZgAAANlJREFUeNrN04GGpWAYBuAnIUAAH47ObRzE3lbABuxtBexttBYHsAF7MKYBL/LDYDA/eSjpy/u9vuiMx1X311XzfNUyXXWMV7t9WCHqt36DaFi7HaKBPX7nG8P5iz/nHo3nb/6eRzR1T57rEt38559HVH7yrqLygzcVlTsvFZWRQ0VlYFdR6dlUVDpWFRVQ0Q14RMk1Sq5Rco2Sa5RcIweMRAtMRDPMRBMsRCMcRMNKtxP12/WSp5G8H/OFmBlipoz5j9hscrPrbRvavrSNajvXtrLt7bCLnzkfnOqGiVWVifMAAAAASUVORK5CYII=",H="data:image/png;base64,iVBORw0KGgoAA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/Rp9sc7QPeBvw3gNkM/B2YBAATP0KDAKAuQ9gAgDvXXhvZr0LnPcUyt4F71Xoehe8d6HrXfDehbJ3wXsXvK8E710oeghFD6HoIRQ9hKrv/2xTKHoI6AsBfSGgr4Sf/37wD9JlHdUacfGtAAAAAElFTkSuQmCC",M=B.from(F),U=Q(B.from(v),8,1,64,64)[0],m=Q(B.from(H),1,8,64,64),p=Q(B.from(P),1,8,64,64),u=Q(B.from(d),1,8,64,64),K=B.from(I),R=B.from(r),X={Left:90,Down:0,Up:180,Right:-90,UpLeft:135,UpRight:-135,DownRight:-45,DownLeft:45},L=["Receptor","Tap","Lift","Fake","Hold Inactive Head","Hold Active Head","Roll Inactive Head","Roll Active Head","NoteFlash"],Y={elements:{Left:{Receptor:o=>{let e;const A=new i(Q(M,2,1,64,64)[0]);return A.width=64,A.height=64,A.anchor.set(.5),o.noteskin.on(A,"ghosttap",g=>{g.columnNumber==o.columnNumber&&(a.finish(e),e=a.animate(A,{0:{alpha:1.2,width:48,height:48},1:{alpha:1,width:64,height:64}},.06))}),o.noteskin.onUpdate(A,g=>{const t=(g.getVisualBeat()%1+1)%1;A.currentFrame=t<.2?0:1}),A},Tap:o=>{const e=m[Math.min([4,8,12,16,24,32,48,64,96,192].indexOf(o.note?.quant??4)??0,7)],A=new C(e[0]);return A.anchor.set(.5),A.width=64,A.height=64,A},NoteFlash:o=>new c(o.noteskin,o.columnNumber),Fake:{element:"Tap"},Lift:o=>{const e=u[Math.min([4,8,12,16,24,32,48,64,96,192].indexOf(o.note?.quant??4)??0,7)],A=new C(e[0]);return A.anchor.set(.5),A.width=64,A.height=64,A},Mine:o=>{const e=new i(U);return e.anchor.set(.5),e.width=64,e.height=64,o.noteskin.onUpdate(e,A=>e.currentFrame=Math.floor((A.getVisualBeat()%4+4)%4*2)),e},"Hold Active Head":o=>{const e=p[Math.min([4,8,12,16,24,32,48,64,96,192].indexOf(o.note?.quant??4)??0,7)],A=new C(e[0]);return A.anchor.set(.5),A.width=64,A.height=64,A},"Hold Inactive Head":{element:"Tap"},"Hold Active Body":()=>new h(K),"Hold Inactive Body":{element:"Hold Active Body"},"Hold Active TopCap":()=>new C(B.EMPTY),"Hold Inactive TopCap":()=>new C(B.EMPTY),"Hold Active BottomCap":()=>new D(B.EMPTY),"Hold Inactive BottomCap":{element:"Hold Active BottomCap"},"Roll Active Head":{element:"Hold Active Head"},"Roll Inactive Head":{element:"Tap"},"Roll Active Body":()=>new h(R),"Roll Inactive Body":{element:"Roll Active Body"},"Roll Active TopCap":()=>new C(B.EMPTY),"Roll Inactive TopCap":()=>new C(B.EMPTY),"Roll Active BottomCap":()=>new D(B.EMPTY),"Roll Inactive BottomCap":{element:"Roll Active BottomCap"}}},load:function(o,e){const A=o.columnName;o.columnName="Left";const g=this.loadElement(o,e);return L.includes(o.element)&&(g.rotation=X[A]*Math.PI/180),g},hideIcons:["Lift"]};export{Y as default}; +import{w as B,b as n,a1 as Q,P as C,Y as s,V as a,$ as D}from"./ChartManager-3c3d6f39.js";import{A as i}from"./AnimatedSprite-86b56f12.js";import{H as h}from"./HoldBody-5358344a.js";const w="/smeditor/assets/hold-3ccaaf09.png",E="/smeditor/assets/mine-590d445e.png",l=B.from(w),f=B.from(E);class c extends n{hold=new i(Q(l,2,1,72,128)[0]);anims=new Set;constructor(e,A){super(),e.on(this,"holdon",g=>{A==g.columnNumber&&(this.hold.visible=!0)}),e.on(this,"holdoff",g=>{A==g.columnNumber&&(this.hold.visible=!1)}),e.on(this,"rollon",g=>{A==g.columnNumber&&(this.hold.visible=!0)}),e.on(this,"rolloff",g=>{A==g.columnNumber&&(this.hold.visible=!1)}),e.on(this,"hitmine",g=>{if(A==g.columnNumber){const t=new C(f);t.alpha=0,t.anchor.set(.5),t.blendMode=s.ADD,this.addChild(t),a.animate(t,{0:{alpha:1,rotation:0},"0.5":{alpha:1,rotation:90*Math.PI/180},1:{alpha:0,rotation:180*Math.PI/180}},.4,void 0,()=>t.destroy())}}),e.onUpdate(this,()=>{this.hold.alpha=Math.sin(Date.now()/1e3*Math.PI*2*20)*.1+1}),this.hold.visible=!1,this.hold.anchor.set(.5),this.addChild(this.hold)}}const r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAACACAMAAACMX59YAAAAIVBMVEUAAAD///+6urq4uLizs7OoqKinp6ecnJyVlZWUlJSIiIh18TD6AAAAAXRSTlMAQObYZgAAAKhJREFUeNrt2AMCA0EQRNFRVXD/A8fmWv/F6vTuCOGj+CBUMGgAAMDw4p4UKpHiXpsB3HsGfg7g1/+QfL68furfGUiWrnc1MogPfmZgVQsgtZ2Bqmbg1wwq8XA1sf1DAACM3+v8oILv84Pxr97ZPwAAxL2UQyUlNVwzyQ2XfW5//0DV5gevAfx9ftDH8n/wAJUPYeYVqf39AwAA+wfrtVbbzf52fAyf7ADSzwa2IX7vawAAAABJRU5ErkJggg==",I="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAACAAgMAAADG74f5AAAACVBMVEUAAAAAAACoqKjq2/gjAAAAAXRSTlMAQObYZgAAACRJREFUeNpjGAWDAjBGNSA4TEsdhrfAKBgFo2C0/BgtP0Y6AACvVTE5zX7vswAAAABJRU5ErkJggg==",P="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAIACAMAAAAFcJqpAAAAUVBMVEUAAAD////Z2dmoqKiAn/+A//+A/4D//4D/0ID/gID/gN//AL+AQHCAQECAaUCAgEBAgEBAgIBAUIBAQEAAAAAA/wAA//8AQP//AAD/pAD//wABGz9TAAAAAXRSTlMAQObYZgAABvJJREFUeNrt2OkK20gQReE4k32827O+/4NGXERfq6uLgwqCHaP70+3zgQ0C0R+2/drt2qr9fV4mcP+vBgL0IEAPAvYgcF8X1PfCKqD1h0MTSsBhWhVQr1UB9VoVOLQVAPXes4Dv814f2C2WA+Pv6uuenpkU0FPmGeieugTon9IesJAB6gmQMAbUEyAhAdQjIGEIqE8BBZqEAPhDLQMsRMA9AToNgHZgQDNwn2bgAIA3Bg45E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4BQCSLQN0518ocDtkC4Hi/cEApfuDAfh/7fbfIeDYmPsD/dRhXnLAT1AbJy4H/Ay2jVXgQyPoA4MKfGiIPTCg4BmmyJUV3AIEFBVSAhzakkJqhIGCIrSIxD5XhB4SIFNoDYXBSRVaZAFIFLHHdPSsIjahAvZQYxHG4UUFVGkEQIFNCuMfFdjFm6niapnX10F1odRXEin6MUvNK9atIF2srrusIAVc+9m9Wl/NvwJJIwFbHuLc4AAAAABJRU5ErkJggg==",v="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAABACAMAAABbYT+NAAAAOVBMVEUAAAAAAAAICAgoKChAQEBfAABvAACRAACYmJieAACoqKi4uLi7AADQ0NDRAADg4ODpAADw8PD////pSTDZAAAAAXRSTlMAQObYZgAAATxJREFUeNrt2EGOgzAMQNGxSVxI0hK4/2Fnokx7AHuBVP7bf0W2WgT5AQAAAAAAAAAAAAAAAAAAAAAAAPB9ZLhrTy+q2bKKBPoc6SXcD9Hz4/Nftv8lpbQEelv3Y19NxdnnXmrp2d+33ntz96K2bZupBM+Pz3/R/lP560savYfa8xyeJr4+r3VYs3OA/OrDy9vrow0PjZ8fn9+//+rdf5r9M3n3t57TquLqe526s299as7e2mTR8+PzX7H/pZxTWcT3B9jPac/i6kudirPvb75etzZtGjw/Pv8V+0+fPvl+AHac02G+Aerb/X4A8fnj+0+fPvEE4AnAOwDvAP6vAA2+BevNvwLUuf96DtU0+BWg3ANwD+AhEryJkjvfBMb7+P7/bwK5C6cHAAAAAAAAAAAAAAAAAAAAAADAl/kFHH4jM43eaVYAAAAASUVORK5CYII=",F="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAABAAQMAAADoGO08AAAABlBMVEUAAAD///+l2Z/dAAAAAXRSTlMAQObYZgAAANlJREFUeNrN04GGpWAYBuAnIUAAH47ObRzE3lbABuxtBexttBYHsAF7MKYBL/LDYDA/eSjpy/u9vuiMx1X311XzfNUyXXWMV7t9WCHqt36DaFi7HaKBPX7nG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4DmADAexeem1nvAuc9hbJ3wXsVut4F713oehe8d6HsXfDeBe8rwXsXih5C0UMoeghFD6Hq+z/bFIoeAvpCQF8I6CvhB7wfnDvfD37JIpQ9hKKHUPQQir4S0lM4Bizd+/0VjgPpI9TAO2uB9FkLJM464L2ZACcg7wcG7H8/UMDfD3DzDeAtHYEIAqAXIMIMpBcAggDpBYAwAukdWIIIBHiowPIxAJ45kK2/Rp9sc7QPeBvw3gNkM/B2YBAATP0KDAKAuQ9gAgDvXXhvZr0LnPcUyt4F71Xoehe8d6HrXfDehbJ3wXsXvK8E710oeghFD6HoIRQ9hKrv/2xTKHoI6AsBfSGgr4Sf/37wD9JlHdUacfGtAAAAAElFTkSuQmCC",M=B.from(F),U=Q(B.from(v),8,1,64,64)[0],m=Q(B.from(H),1,8,64,64),p=Q(B.from(P),1,8,64,64),u=Q(B.from(d),1,8,64,64),K=B.from(I),R=B.from(r),X={Left:90,Down:0,Up:180,Right:-90,UpLeft:135,UpRight:-135,DownRight:-45,DownLeft:45},L=["Receptor","Tap","Lift","Fake","Hold Inactive Head","Hold Active Head","Roll Inactive Head","Roll Active Head","NoteFlash"],Y={elements:{Left:{Receptor:o=>{let e;const A=new i(Q(M,2,1,64,64)[0]);return A.width=64,A.height=64,A.anchor.set(.5),o.noteskin.on(A,"ghosttap",g=>{g.columnNumber==o.columnNumber&&(a.finish(e),e=a.animate(A,{0:{alpha:1.2,width:48,height:48},1:{alpha:1,width:64,height:64}},.06))}),o.noteskin.onUpdate(A,g=>{const t=(g.getVisualBeat()%1+1)%1;A.currentFrame=t<.2?0:1}),A},Tap:o=>{const e=m[Math.min([4,8,12,16,24,32,48,64,96,192].indexOf(o.note?.quant??4)??0,7)],A=new C(e[0]);return A.anchor.set(.5),A.width=64,A.height=64,A},NoteFlash:o=>new c(o.noteskin,o.columnNumber),Fake:{element:"Tap"},Lift:o=>{const e=u[Math.min([4,8,12,16,24,32,48,64,96,192].indexOf(o.note?.quant??4)??0,7)],A=new C(e[0]);return A.anchor.set(.5),A.width=64,A.height=64,A},Mine:o=>{const e=new i(U);return e.anchor.set(.5),e.width=64,e.height=64,o.noteskin.onUpdate(e,A=>e.currentFrame=Math.floor((A.getVisualBeat()%4+4)%4*2)),e},"Hold Active Head":o=>{const e=p[Math.min([4,8,12,16,24,32,48,64,96,192].indexOf(o.note?.quant??4)??0,7)],A=new C(e[0]);return A.anchor.set(.5),A.width=64,A.height=64,A},"Hold Inactive Head":{element:"Tap"},"Hold Active Body":()=>new h(K),"Hold Inactive Body":{element:"Hold Active Body"},"Hold Active TopCap":()=>new C(B.EMPTY),"Hold Inactive TopCap":()=>new C(B.EMPTY),"Hold Active BottomCap":()=>new D(B.EMPTY),"Hold Inactive BottomCap":{element:"Hold Active BottomCap"},"Roll Active Head":{element:"Hold Active Head"},"Roll Inactive Head":{element:"Tap"},"Roll Active Body":()=>new h(R),"Roll Inactive Body":{element:"Roll Active Body"},"Roll Active TopCap":()=>new C(B.EMPTY),"Roll Inactive TopCap":()=>new C(B.EMPTY),"Roll Active BottomCap":()=>new D(B.EMPTY),"Roll Inactive BottomCap":{element:"Roll Active BottomCap"}}},load:function(o,e){const A=o.columnName;o.columnName="Left";const g=this.loadElement(o,e);return L.includes(o.element)&&(g.rotation=X[A]*Math.PI/180),g},hideIcons:["Lift"]};export{Y as default}; diff --git a/Noteskin-4d4bdabd.js b/Noteskin-ba1ed891.js similarity index 99% rename from Noteskin-4d4bdabd.js rename to Noteskin-ba1ed891.js index b9f8841e..f579000c 100644 --- a/Noteskin-4d4bdabd.js +++ b/Noteskin-ba1ed891.js @@ -1,4 +1,4 @@ -import{w as e,x as D,y as H,b as l,z as E,O as f,H as Q,J as I,L as c,P as a,Q as J,a1 as d,V as s,Y as h,$ as v}from"./ChartManager-f20da8bc.js";import{A as F}from"./AnimatedSprite-d8850d0f.js";import{H as P}from"./HoldBody-34995142.js";const L="/smeditor/assets/downBodyActive-dd1fd694.png",Y="/smeditor/assets/downBodyInactive-c781a303.png",p="data:image/png;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8AYQeYDfFyZDyD0t2Q+gHF86IcAJQSZD2CMIPMBjBFkPoAxgswHMEaQ+QDGCDIfwBhB5gMYI8h8AGMEmQ9gjCDzATIfoC1+5gM03hNkPsDkDct8AMy9zHwAsvj0F4GZD4ATv+0UkPkAGPFbj4GZD9Aff/oxMPMB8I6amQ9gHL/lISDzAXjiHwJw5y7EEgFj/CPtLp98/3r7jZG3h6tcEwjFvxwFEAQG8b8DYI9APf4RALYIHOIfBWCHwCX+GQA2CJzinwUgj8At/ggAWQSO8UcByCFwjf8IABkEMxdb/EcBBAF5/BkAgoA4/iwA1giY488EYImAPf5sAFYIFOKvAGCBQCX+KgDSCJTirwQgiUAt/moAUggU41cAkECgGr8KADUC5fiVACgRqMevBkCFwCF+BwAKBC7xuwBAI3CK3wkAEoFb/G4AUAgc4yMAgEDgGh8FQCuCkaUSHwkADQKl+GgA4BGoxUcEAItAMT4qADgEqvGRAcAgUI6PDqAdgXp8BgBtCBziswAoR+ASnwlAGQKn+GwAliNwi88IYBkCx/isAKYjcI3PDGAagpGlEp8dQAsCpfgKAEoRqMVXAVCCQDG+EoClCFTjqwFYgkA5viKAqQjU46sCmILAIb4ygIcQuMRXBzCEwCm+A4BTCNziuwA4hMAxvhOALxG4xncDcBeB+764ATiCwGpPHAF8hcBuP1wB3EPgvBfWCK7ZhqysrKysrCy39Q9gQ/q5SfcuvQAAAABJRU5ErkJggg==",b="/smeditor/assets/leftBodyActive-75d41033.png",z="/smeditor/assets/leftBodyInactive-bbc074cd.png",x="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEANIA0gBQ7xAn7AAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB+EDFAI2I6Ho7PYAAANMSURBVHja7Z1bTgMxDEU7VjeAxAJR10C7CMoaEAus1B0Av6XiMY/EsX2PJT4GoTHpOZNJMhl32t3F6/n8eXt8eDrt1sTD48eiv79ebNcqluZum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EAQAAAPQSVkViB99AVQfU9RKVLnJtMGx+tJ/iYCs60J2AMAIKWn34OASqHA74OFkbABSHCCLgkTBgBF4UKI+CycGEE3BgijIBbwwoiUN6GigBaIuD2cGEELBAhjEB9u1EURVEUlbz+AOnsq2p4bKxbAAAAAElFTkSuQmCC",y="/smeditor/assets/rightBodyActive-07f95372.png",R="/smeditor/assets/rightBodyInactive-fdefc2a4.png",X="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB+EDFAI3NtUuOVwAAAOHSURBVHja7Z3RTSsxEEUdKw0gUSCiBkIRhBoQBSLRQeDr6YWQEK/j8c7MPfcvIO0sPmcd24RhU07yut9/Hb9+fHguPbm7PxSLfH7UIdfpub9RtXvq99Z+e3/58fppt9scv96WYLk2cK0D9flRF0O4uz8Mk2BJ/ZHinaYW4fQM7MiZraW+JXxTAaxvfFRNzxLMGMPqDcgatTxKMGvsqmcwM2t4kmDmg1O9P50zr+1BgtlvndOqWfxgXq5pteWdkanbwDUWhtZbNIstYsoZgC0iAiABAiABAiABAiABAiABAiABAiABAiDButlmB3Vu0Nf4UMfx/Xg6Maxq8Ec/idFngqoGHwlYAyABAiABAiDB/F3A2p/Fn7U6j7Q7qBGfsghPYpSZoGaEjwSOBFh7kYMEKwrgZa+LBCsI4O3cGwmCbgMzQfAoQYhzACQ4aAvwbxBGDURECaxCf4CFtekPkCj0B6A/AP0BvAFZoxb9AYJLQH8A52sA+gO016c/QMBr0h8g4P7X8xYx5QzAFhEBkAABkAABkAABkAABkAABdEJ/AEJ/AOJTAgQQlwABxCVAAHEJEGDCVtCzBAggLgECiEvgvj/AUgiWg3lar+dzA3+NDf0BBlzTchCt69EfAAnoD4AE9AdAgkJ/ACQo9AcIIZ51PfoDIAH9AUhf3t5fNAWYfaBiXa/n+ufgP+12m/QCAL8d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q/CYwBomTUA507C81727PoaeJ3HAFDZFTwFeSI4JQC6I7UTtfvUuwOD+wCYwBgAuoUE0JvAORkNINwFWI84UIKvwGMAqCwBHIfPcRw9GROAjCSBZurwlzVs+enDazwGgHTtJ0qA6BrAU1mELb8dFl7jMQBUZgASNIBcagDDG1lKr4Dww/x/miXBOjSLcSMAAAAASUVORK5CYII=",G=`precision mediump float; +import{w as e,x as D,y as H,b as l,z as E,O as f,H as Q,J as I,L as c,P as a,Q as J,a1 as d,V as s,Y as h,$ as v}from"./ChartManager-3c3d6f39.js";import{A as F}from"./AnimatedSprite-86b56f12.js";import{H as P}from"./HoldBody-5358344a.js";const L="/smeditor/assets/downBodyActive-dd1fd694.png",Y="/smeditor/assets/downBodyInactive-c781a303.png",p="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB98FAw0dOV1YU4MAAAPKSURBVHja7d1dTupQFIbh0pwJkDBA4xjEQVjGcOIATZwBnFslHC1l7b2/v3WHiUL6PimUwHI3Xc1pWS5fbz8/vU5bZn843/07nx/zVDVb7h/5sW29/7/vb99uvxyPu6+356nRbHnAldEqg7HGXzPt/rIIAuX4zQGwI1CP3wUAKwKH+N0AsCFwid8VAAsCp/jdAaAjcIs/BAAqAsf4wwCgIXCNPxQACgLn+MMBICBwjg8BQAEBa3wYAMwImONDAWBEwB4fDgATAoX4kAAYEKjEhwWAjEApPjQARARq8eEBICFQjE8BAAGBanwaACMRKMefpmn60+NUWXVAPj/mu4PsD+fN94/4yeZqXHPr+NWn415nAtSPtVe/vplbP2BGBOjfaag8ll2frBgQqH2hBe5FIDICt/jDrgIQETjGH3oZiITANX4pAMYvf+wPZ8r4lfdfegZQ+kKoQ/wmTwHKCBQ/QDqjHCh0BKqfHs5+AOP4za8Csh8AO36Xy8DsB8CN3+19gOwHyH6A7Ac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A4hMAxvhOALxG4xncDcBeB+764ATiCwGpPHAF8hcBuP1wB3EPgvBfWCK7ZhqysrKysrCy39Q9gQ/q5SfcuvQAAAABJRU5ErkJggg==",b="/smeditor/assets/leftBodyActive-75d41033.png",z="/smeditor/assets/leftBodyInactive-bbc074cd.png",x="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEANIA0gBQ7xAn7AAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB+EDFAI2I6Ho7PYAAANMSURBVHja7Z1bTgMxDEU7VjeAxAJR10C7CMoaEAus1B0Av6XiMY/EsX2PJT4GoTHpOZNJMhl32t3F6/n8eXt8eDrt1sTD48eiv79ebNcqluZumX9N7p7/39v7y7fj5+Nxuj3e7zrF9WKzP4xM8HsBHhXW8+RzPtgqVz4CrPiAM8IfIUzPnDaqAZmvfE8JeueyEQ2p0O17SOCRw7U/u16s1D2/JyCvXibtCCjKgC/LOX+LPfBzAZPvAZjqCQsAfGEBgC8sAPCFBQC+sADAFxYA+MICAF9YAOD7xh74f+evLpcB/+/81XYAhRQgKnwFCQz4ta/w0AIAX1gA4AvPApTgR5/WGvDjrTN4CmrAjwXfWwIDfjz4nhIY8GPC95LAgB8XvocEBnztqaYBX3udIczTQOoDFBOA+gA5gvoA1AcY17VTH2B8TuoDBAPinYv6AIEloD5A8Hs+9QEGBvUBiq0DZB7tUx9AGD7TQOAjAPARAPgIAHwEAD4CjIRPFBEA+MICAF9YAOALCwB8YQGALyxAS/hMAZMJAHxhAYAfI/YV4fccU3jkoz6AMHzvQbEBP2Y+6gMIw/fMYcCPCd8rlwE/LnyPnJbZXm8YFVcsDfi68GcJcP/980RxAZ6Px6mFBL0XM7xX/6quNv7YKiTQkeDXFkWUwPsLHaJ8gcSw+gBIMF6CLbnmsJrmnOj1fP68/93h6cSaQOeZQWv4P13Q09wTIoFvPg/4iwRAAr98XvAXC5BJAsVYCn+VAEhQ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1FLxfB7jik8+rE+gHD43oNiI/yY/VgfQDh8zx5G+DHD9+plhB83fI+ellmvdxgVZyyN8HXDXwXgyZ0lVHEAcwsEvSczvGf/qs42vtoDgEAEwbtDQDgE3j/oEOUHJEauDwCCwQiO9FqT1bzyuX4f/7DntnHmBIaHP+8FAALnfh7hbwUAgin+18Fbwt8DIA0Cxdoa/l4AICgS/hEAICgQ/lEAIEge/pp5gM2AIs4YEn4/ACBIHH4rACBIGn5LACBIGH6LQWC4geFWQAWudziUoXm8IPYEMcPvBWAoAqE7jZvsvc3zBYIgVvi9xgBhxgR78LQeZMlIAgEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEEQqywY08kUlkX9pPSuAdAgAAAIAgAAA5RAAAAQAAAEAQAAAPQSVkViB99AVQfU9RKVLnJtMGx+tJ/iYCs60J2AMAIKWn34OASqHA74OFkbABSHCCLgkTBgBF4UKI+CycGEE3BgijIBbwwoiUN6GigBaIuD2cGEELBAhjEB9u1EURVEUlbz+AOnsq2p4bKxbAAAAAElFTkSuQmCC",y="/smeditor/assets/rightBodyActive-07f95372.png",R="/smeditor/assets/rightBodyInactive-fdefc2a4.png",X="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB+EDFAI3NtUuOVwAAAOHSURBVHja7Z3RTSsxEEUdKw0gUSCiBkIRhBoQBSLRQeDr6YWQEK/j8c7MPfcvIO0sPmcd24RhU07yut9/Hb9+fHguPbm7PxSLfH7UIdfpub9RtXvq99Z+e3/58fppt9scv96WYLk2cK0D9flRF0O4uz8Mk2BJ/ZHinaYW4fQM7MiZraW+JXxTAaxvfFRNzxLMGMPqDcgatTxKMGvsqmcwM2t4kmDmg1O9P50zr+1BgtlvndOqWfxgXq5pteWdkanbwDUWhtZbNIstYsoZgC0iAiABAiAB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d5IAxOUk8DqPAaBlE0DhfpbuMETHbmeFj/EYALrQVf94H+S3Mb49RFjrAzHgy3gMANkSgLcNuIvxbXCIwtMGRF9qDQAeA0D3twYgviTQ9YZoaTMBXucxAPQ5CSBZD9+MfDzBV+AxAPQ5CaDwCuZ9NRa8zmMAyDaBvS8H3cZeDnqsYb0vx4TXeQwA2RKA2wDSMJ/LBrA4r4DwOo8BIBFR7h/f20beKL+LHb/r7WXP8FV5DABNXUJ82fOUACSYAJrg6cNrwgCQrQToT1xrSbCT4ACmjz8njwGgMgOIJoDgPoBSwWMAqIYBeEuAXfTwx1Xs3AsiCb4CjwGgZRJAX8YE0J42svgaYfA6jwGgeQ0gmAC64COx4HkkGKoxgZ01PF0AugDohjX5/PixN0tlI7+LHb8deTdZgq/CYwBomTUA507C81727PoaeJ3HAFDZFTwFeSI4JQC6I7UTtfvUuwOD+wCYwBgAuoUE0JvAORkNINwFWI84UIKvwGMAqCwBHIfPcRw9GROAjCSBZurwlzVs+enDazwGgHTtJ0qA6BrAU1mELb8dFl7jMQBUZgASNIBcagDDG1lKr4Dww/x/miXBOjSLcSMAAAAASUVORK5CYII=",G=`precision mediump float; varying vec2 vUvs; diff --git a/Noteskin-1293521e.js b/Noteskin-bd003ac8.js similarity index 99% rename from Noteskin-1293521e.js rename to Noteskin-bd003ac8.js index b172ea27..ec56e09b 100644 --- a/Noteskin-1293521e.js +++ b/Noteskin-bd003ac8.js @@ -1,4 +1,4 @@ -import{w as B,x as I,y as E,b as v,z as P,O as l,H as w,J as c,L as f,P as r,Q as p,a1 as F,V as s,Y as y,$ as D}from"./ChartManager-f20da8bc.js";import{A as x}from"./AnimatedSprite-d8850d0f.js";import{H as m}from"./HoldBody-34995142.js";const U="/smeditor/assets/downBodyActive-dd1fd694.png",b="/smeditor/assets/downBodyInactive-c781a303.png",N="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/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MEmQ9gjCDzATIfoC1+5gM03hNkPsDkDct8AMy9zHwAsvj0F4GZD4ATv+0UkPkAGPFbj4GZD9Aff/oxMPMB8I6amQ9gHL/lISDzAXjiHwJw5y7EEgFj/CPtLp98/3r7jZG3h6tcEwjFvxwFEAQG8b8DYI9APf4RALYIHOIfBWCHwCX+GQA2CJzinwUgj8At/ggAWQSO8UcByCFwjf8IABkEMxdb/EcBBAF5/BkAgoA4/iwA1giY488EYImAPf5sAFYIFOKvAGCBQCX+KgDSCJTirwQgiUAt/moAUggU41cAkECgGr8KADUC5fiVACgRqMevBkCFwCF+BwAKBC7xuwBAI3CK3wkAEoFb/G4AUAgc4yMAgEDgGh8FQCuCkaUSHwkADQKl+GgA4BGoxUcEAItAMT4qADgEqvGRAcAgUI6PDqAdgXp8BgBtCBziswAoR+ASnwlAGQKn+GwAliNwi88IYBkCx/isAKYjcI3PDGAagpGlEp8dQAsCpfgKAEoRqMVXAVCCQDG+EoClCFTjqwFYgkA5viKAqQjU46sCmILAIb4ygIcQuMRXBzCEwCm+A4BTCNziuwA4hMAxvhOALxG4xncDcBeB+764ATiCwGpPHAF8hcBuP1wB3EPgvBfWCK7ZhqysrKysrCy39Q9gQ/q5SfcuvQAAAABJRU5ErkJggg==",G="/smeditor/assets/leftBodyActive-75d41033.png",R="/smeditor/assets/leftBodyInactive-bbc074cd.png",J="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEANIA0gBQ7xAn7AAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB+EDFAI2I6Ho7PYAAANMSURBVHja7Z1bTgMxDEU7VjeAxAJR10C7CMoaEAus1B0Av6XiMY/EsX2PJT4GoTHpOZNJMhl32t3F6/n8eXt8eDrt1sTD48eiv79ebNcqluZumX9N7p7/39v7y7fj5+Nxuj3e7zrF9WKzP4xM8HsBHhXW8+RzPtgqVz4CrPiAM8IfIUzPnDaqAZmvfE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+CycGEE3BgijIBbwwoiUN6GigBaIuD2cGEELBAhjEB9u1EURVEUlbz+AOnsq2p4bKxbAAAAAElFTkSuQmCC",Y="/smeditor/assets/rightBodyActive-07f95372.png",Z="/smeditor/assets/rightBodyInactive-fdefc2a4.png",K="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB+EDFAI3NtUuOVwAAAOHSURBVHja7Z3RTSsxEEUdKw0gUSCiBkIRhBoQBSLRQeDr6YWQEK/j8c7MPfcvIO0sPmcd24RhU07yut9/Hb9+fHguPbm7PxSLfH7UIdfpub9RtXvq99Z+e3/58fppt9scv96WYLk2cK0D9flRF0O4uz8Mk2BJ/ZHinaYW4fQM7MiZraW+JXxTAaxvfFRNzxLMGMPqDcgatTxKMGvsqmcwM2t4kmDmg1O9P50zr+1BgtlvndOqWfxgXq5pteWdkanbwDUWhtZbNIstYsoZgC0iAiABAiABAiABAiABAiABAiABAiABAiDButlmB3Vu0Nf4UMfx/Xg6Maxq8Ec/idFngqoGHwlYAyABAiABAiDB/F3A2p/Fn7U6j7Q7qBGfsghPYpSZoGaEjwSOBFh7kYMEKwrgZa+LBCsI4O3cGwmCbgMzQfAoQYhzACQ4aAvwbxBGDURECaxCf4CFtekPkCj0B6A/AP0BvAFZoxb9AYJLQH8A52sA+gO016c/QMBr0h8g4P7X8xYx5QzAFhEBkAABkAABkAABkAABkAABdEJ/AEJ/AOJTAgQQlwABxCVAAHEJEGDCVtCzBAggLgECiEvgvj/AUgiWg3lar+dzA3+NDf0BBlzTchCt69EfAAnoD4AE9AdAgkJ/ACQo9AcIIZ51PfoDIAH9AUhf3t5fNAWYfaBiXa/n+ufgP+12m/QCAL8dvqkAXvoDzDwaHl3PGn6TAC3vIx4kAP5y+KWUcvabr/v91+nXHh+e3a6Sgd8H/6IAkSQAfj/8PwWI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EAr63BAK+twQCvrcEAr63BEc2+PfvtlefWm4Zz+vLx+kcjTpoKma+90og4HtLIOB7S5CqP8AXf9sOFy1jpD9AEfgZJRDwvSU4HOGPrg38PPazj6ktj4ghVoARNe0z4Y+agSNWAov+AA8St49egTokdx8pQW9Jj5kzLBr8P0vt/dc6LMP7dne6unU7KPkUEAn+o70/ykowOr6tC9i2ee/b/xP+5bqFR7O701a1Z8qnopg7YuafvdMfdPcdOp+KMOgI8CtJcCafWj3oSPArSHA2n1o56IjwM0vQkk+tGnRk+BklaM2nVgx6FvzAESafmj1o4MfK59Ew6Fvn5csRfph8ajEwZ/gh8qmFgwZ+gHxq0aCBHySfB7O47HYwfAUgCgQCIACBAAQCEAhAIACBAAQCEAhAIACBAAQCZI8rFT4OHUwsVoAWkC7ta2y2gDNAnXoXWd0DzP7XsQiQTALHrmXHZhi0p+MxkKgiwMqmCxm7l91H1kOdy5oufAN/RwADCSqVt2U/1j1dgmq1jRXO9U+ToGJha5XCjuESVK1qrlTZM0yCyiXt1Uq7uktQvZ9Bxdq+bhI4NLOoWtx5WQKXTiaVq3ubJXBqY1O9vPu0BG49jBzq+2/kyFuAKxKUz49Th48bufEW4IwEtL4hCIIgCKJ0/AYcP+o66BZ87AAAAABJRU5ErkJggg==",j="/smeditor/assets/upleftBodyActive-bc79d60f.png",q="/smeditor/assets/upleftBodyInactive-f60085c6.png",W="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGA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5azuYrWWXyr9wMwkah99DgjLNRVtL0Cn8lhKU6S7cSoLO4beQoGyzXry2BIOE7z5ADwmEP6cANcul8CdatIvwswXYUwLhT7x4F+EDAAAAAAAAAAAAAAAAAAAAwD38AT8g+uUAT65wAAAAAElFTkSuQmCC",$="/smeditor/assets/uprightBodyActive-3d912f52.png",A0="/smeditor/assets/uprightBodyInactive-01c6c977.png",n0="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLl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naGj+v3b/aP5o/Wn9/6xTkP/cs7Oz/VxcXl78umr/Xvxe+1/7/6ZH/vr+hP/Yra2t/U5OT0/9s1z/T/1P/FD8/585/O78dv/Upqam/z8/Pz//rU7/P/8/90f3/5gr++L7Zv/Kn5+f/y4uLy//pED9L/8v8D7w/ZEb99T3Vf/Al5eX/xcXFxf/li34F/8X5y/n+IkD7sHuPP+yi4uL/wAAAQH/ihr0Af8B4R/h4n8A6K/oJf+mgICA/w0NDQ3/kCX2Df8N5Cjk74UA67nrMf+shoaG/ygoKSn/oDv8Kf8p7jru/I8V9c/1T/+8lJSU/zk5OTn/qkj/Of859UP1/5Ul+tz6YP/GnJyc/UpKS0v9sVj/S/1L/Ez8/501/Or8cv/SpKSk/ldXWFj+uGb/WP5Y/Vn9/6RD/vb+gP/Xq6ur/2JiZGT+vXL/ZP5k/WX9/6pPjP/bsbGx/25ucHD+w37/cP5w/XH9/7BbmP/et7e3/Xl5eXn9x4b/ef15/Hr8/7NjoP/hu7u7hYX/zZT/hf+F/ob+/7pxrv/lwsLC/Y+dj4/90Zz/j/2P/JD8/755tv/oxMjE/5iqmZn/16j/mf+Z/pr+/8SFwv/syc/J/6CzoqD+267/oP6i/qD8/8mLyP/vytTK2fi5aQAAAOV0Uk5T////AP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////xt8+5oAAAYhSURBVHic7Zt3bBxFFIefHSGEEL33hN5DTyWQgtMIaYReHHrvvYbeO4RO6DgNcBqkk0o66aST0EQXchxzHMbA2/fN3l12LXHDH4d0u9LNT59uz37zefe8I70pkf94lHidXxJ+zrJOGuRwrWyQw2nZMIdTslEO18jG8NpgLP3nJ9qxaTBWyyY551fJZp71R45EgNf5JbI5XBWMdbIFbBOolS3h6mBMy1bwumBMydZwDeM28PfBGBWwLZzit27nWX/k8BWwPfxDMNbJDvCPwVgrO8I/BWNadoJ/DsaU7Az/Eow1sgu8JhijAn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8WH/uD+xP/sydHJ/pGgk5P906D/k/2T/JT8/8B9/tj+uv/pxcvF/4ePh4f/zpb/h/+H/oj+/7tz/8z/sP/mw8PD/n19f3/9yYz/f/1//ID8/7Zp/sT+pv/jvr6+/3FxcnL+xID/cv5y/XP9/7Fd/rX+mv/fuLi4/2dnaGj+v3b/aP5o/Wn9/6xT/qj+kP/cs7Oz/VxcXl78umr/Xvxe+1/7/6ZH/Zz9hP/Yra2t/U5OT0/9s1z/T/1P/FD8/585/YP9dv/Upqam/z8/Pz//rU7/P/8/90f3/5gr+Xf5Zv/Kn5+f/y4uLy//pED9L/8v8D7w/ZEb9Wv1Vf/Al5eX/xcXFxf/li34F/8X5y/n+IkD7lfuPP+yi4uL/wAAAQH/ihr0Af8B4R/h4n8A6UPpJf+mgICA/w0NDQ3/kCX2Df8N5Cjk74UA7E7sMf+shoaG/ygoKSn/oDv8Kf8p7jru/I8V82XzT/+8lJSU/zk5OTn/qkj/Of859UP1/5Ul+HH4YP/GnJyc/UpKS0v9sVj/S/1L/Ez8/501/X39cv/SpKSk/ldXWFj+uGb/WP5Y/Vn9/6RD/pL+gP/Xq6ur/2JiZGT+vXL/ZP5k/WX9/6pP/qP+jP/bsbGx/25ucHD+w37/cP5w/XH9/7Bb/rL+mP/et7e3/Xl5eXn9x4b/ef15/Hr8/7Nj/r7+oP/hu7u7hYX/zZT/hf+F/ob+/7px/8r/rv/lwsLC/Y+dj4/90Zz/j/2P/JD8/755/tX+tv/oxMjE/5iqmZn/16j/mf+Z/pr+/8SF/93/wv/syc/J/6CzoqD+267/oP6i/qD8/8mL/+L+yP/vytTKfd22ZwAAAPV0Uk5T////AP////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////90oRikAAAGVUlEQVR4nO2bd4xUVRSHz0qMMcbYe8Ne6Ci9g3TsvYO9914XCyr23qUjHelIRzrSkY50pOOwDMu6rqs573z3zQ4zJs71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l,H as w,J as c,L as f,P as r,Q as p,a1 as F,V as s,Y as y,$ as D}from"./ChartManager-3c3d6f39.js";import{A as x}from"./AnimatedSprite-86b56f12.js";import{H as m}from"./HoldBody-5358344a.js";const U="/smeditor/assets/downBodyActive-dd1fd694.png",b="/smeditor/assets/downBodyInactive-c781a303.png",N="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB98FAw0dOV1YU4MAAAPKSURBVHja7d1dTupQFIbh0pwJkDBA4xjEQVjGcOIATZwBnFslHC1l7b2/v3WHiUL6PimUwHI3Xc1pWS5fbz8/vU5bZn843/07nx/zVDVb7h/5sW29/7/vb99uvxyPu6+356nRbHnAldEqg7HGXzPt/rIIAuX4zQGwI1CP3wUAKwKH+N0AsCFwid8VAAsCp/jdAaAjcIs/BAAqAsf4wwCgIXCNPxQACgLn+MMBICBwjg8BQAEBa3wYAMwImONDAWBEwB4fDgATAoX4kAAYEKjEhwWAjEApPjQARARq8eEBICFQjE8BAAGBanwaACMRKMefpmn60+NUWXVAPj/mu4PsD+fN94/4yeZqXHPr+NWn415nAtSPtVe/vplbP2BGBOjfaag8ll2frBgQqH2hBe5FIDICt/jDrgIQETjGH3oZiITANX4pAMYvf+wPZ8r4lfdfegZQ+kKoQ/wmTwHKCBQ/QDqjHCh0BKqfHs5+AOP4za8Csh8AO36Xy8DsB8CN3+19gOwHyH6A7AcAjN8VAAuC7AcwRpD9AMYIsh/AGEH2AxgjyH6AwZP9AJM3AAUE2Q9gjCD7AYwRZD+AMYLsBzBGkP0AxgiyH8AYQfYDGCPIfgBjBNkPYIwg+wEKDlj2A+AdyyZngOwHyH6ALs/J2Q+Q/QDZD8D6IjD7AXDiD7sKyH4AjPhDLwOzH2B8/FIA2Q/A+T5D9gMYx2/yFJD9ADzxVwG4/v/zrggY469pt7v1w9OyXK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zas++1dI7eP+rb22dc3e9X/TCYE6J9pmLmXpdcADAjUPtACdxGIjMAtftspABGBY/zWYyASAtf404+BLhvJdKwtPQYqfSBUIX7LQ4AyAsV3D+8oG4WOQPWt45kPYBx/+Skg8wGw45ccAzMfADd+2fMAmQ+Q+QCZDwAYvxQAC4LMBzBGkPkAxggyH8AYQeYDfFyZDyD0t2Q+gHF86IcAJQSZD2CMIPMBjBFkPoAxgswHMEaQ+QDGCDIfwBhB5gMYI8h8AGMEmQ9gjCDzATIfoC1+5gM03hNkPsDkDct8AMy9zHwAsvj0F4GZD4ATv+0UkPkAGPFbj4GZD9Aff/oxMPMB8I6amQ9gHL/lISDzAXjiHwJw5y7EEgFj/CPtLp98/3r7jZG3h6tcEwjFvxwFEAQG8b8DYI9APf4RALYIHOIfBWCHwCX+GQA2CJzinwUgj8At/ggAWQSO8UcByCFwjf8IABkEMxdb/EcBBAF5/BkAgoA4/iwA1giY488EYImAPf5sAFYIFOKvAGCBQCX+KgDSCJTirwQgiUAt/moAUggU41cAkECgGr8KADUC5fiVACgRqMevBkCFwCF+BwAKBC7xuwBAI3CK3wkAEoFb/G4AUAgc4yMAgEDgGh8FQCuCkaUSHwkADQKl+GgA4BGoxUcEAItAMT4qADgEqvGRAcAgUI6PDqAdgXp8BgBtCBziswAoR+ASnwlAGQKn+GwAliNwi88IYBkCx/isAKYjcI3PDGAagpGlEp8dQAsCpfgKAEoRqMVXAVCCQDG+EoClCFTjqwFYgkA5viKAqQjU46sCmILAIb4ygIcQuMRXBzCEwCm+A4BTCNziuwA4hMAxvhOALxG4xncDcBeB+764ATiCwGpPHAF8hcBuP1wB3EPgvBfWCK7ZhqysrKysrCy39Q9gQ/q5SfcuvQAAAABJRU5ErkJggg==",G="/smeditor/assets/leftBodyActive-75d41033.png",R="/smeditor/assets/leftBodyInactive-bbc074cd.png",J="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0d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IHH4rACBIGn5LACBIGH6LQWC4geFWQAWudziUoXm8IPYEMcPvBWAoAqE7jZvsvc3zBYIgVvi9xgBhxgR78LQeZMlIAgEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEEQqywY08kUlkX9pPSuAdAgAAAIAgAAA5RAAAAQAAAEAQAAAPQSVkViB99AVQfU9RKVLnJtMGx+tJ/iYCs60J2AMAIKWn34OASqHA74OFkbABSHCCLgkTBgBF4UKI+CycGEE3BgijIBbwwoiUN6GigBaIuD2cGEELBAhjEB9u1EURVEUlbz+AOnsq2p4bKxbAAAAAElFTkSuQmCC",Y="/smeditor/assets/rightBodyActive-07f95372.png",Z="/smeditor/assets/rightBodyInactive-fdefc2a4.png",K="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB+EDFAI3NtUuOVwAAAOHSURBVHja7Z3RTSsxEEUdKw0gUSCiBkIRhBoQBSLRQeDr6YWQEK/j8c7MPfcvIO0sPmcd24RhU07yut9/Hb9+fHguPbm7PxSLfH7UIdfpub9RtXvq99Z+e3/58fppt9scv96WYLk2cK0D9flRF0O4uz8Mk2BJ/ZHinaYW4fQM7MiZraW+JXxTAaxvfFRNzxLMGMPqDcgatTxKMGvsqmcwM2t4kmDmg1O9P50zr+1BgtlvndOqWfxgXq5pteWdkanbwDUWhtZbNIstYsoZgC0iAiABAiABAiABAiABAiABAiABAiABAiDButlmB3Vu0Nf4UMfx/Xg6Maxq8Ec/idFngqoGHwlYAyABAiABAiDB/F3A2p/Fn7U6j7Q7qBGfsghPYpSZoGaEjwSOBFh7kYMEKwrgZa+LBCsI4O3cGwmCbgMzQfAoQYhzACQ4aAvwbxBGDURECaxCf4CFtekPkCj0B6A/AP0BvAFZoxb9AYJLQH8A52sA+gO016c/QMBr0h8g4P7X8xYx5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8tgYDvLYGA7y2BgO8tgYDvLYGA7y0B/QHMJaA/gLkEAr63BLb9AbJLkFqA7PArSSDge0sg4HtLYNMfoJIE9AcIGvQHSJTgLFvd1fiuP8CxJYkZs6vXNd7en0KeXA71HiDi/uqyVaUSYPYdtpsEcob/qC7ASQI5w//XtVwkkDt8dwkEfG8JBHxvCQR8bwlCvAkcfZikNeGjrzHjZVH4TqFR4Z/9XvoDBIQ/O+gPYAw/qwQCvrcEAr63BAK+twQCvrcEAr63BAK+twQCvrcEAr63BEc2+PfvtlefWm4Zz+vLx+kcjTpoKma+90og4HtLIOB7S5CqP8AXf9sOFy1jpD9AEfgZJRDwvSU4HOGPrg38PPazj6ktj4ghVoARNe0z4Y+agSNWAov+AA8St49egTokdx8pQW9Jj5kzLBr8P0vt/dc6LMP7dne6unU7KPkUEAn+o70/ykowOr6tC9i2ee/b/xP+5bqFR7O701a1Z8qnopg7YuafvdMfdPcdOp+KMOgI8CtJcCafWj3oSPArSHA2n1o56IjwM0vQkk+tGnRk+BklaM2nVgx6FvzAESafmj1o4MfK59Ew6Fvn5csRfph8ajEwZ/gh8qmFgwZ+gHxq0aCBHySfB7O47HYwfAUgCgQCIACBAAQCEAhAIACBAAQCEAhAIACBAAQCZI8rFT4OHUwsVoAWkC7ta2y2gDNAnXoXWd0DzP7XsQiQTALHrmXHZhi0p+MxkKgiwMqmCxm7l91H1kOdy5oufAN/RwADCSqVt2U/1j1dgmq1jRXO9U+ToGJha5XCjuESVK1qrlTZM0yCyiXt1Uq7uktQvZ9Bxdq+bhI4NLOoWtx5WQKXTiaVq3ubJXBqY1O9vPu0BG49jBzq+2/kyFuAKxKUz49Th48bufEW4IwEtL4hCIIgCKJ0/AYcP+o66BZ87AAAAABJRU5ErkJggg==",j="/smeditor/assets/upleftBodyActive-bc79d60f.png",q="/smeditor/assets/upleftBodyInactive-f60085c6.png",W="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAKT2lDQ1BQa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AEBCDB0gKcTi8kSBXgX/gkCBTgfegkMAP8SIKajCrBUgKczw8kSK8AJNACtAMC2CISgAQEmEECArShkEAFIIEWQAIzAAkMgSQgAAkIQAICdJZgBHkI0EmCUSoHATpIMFLb8D+DPkpwuSbBZy8zzz4TqAAVKgEBSEAAEhBg96m4Q39dXoKhKsBXAXccrpaWYLgWcC3oASbrZSUoFa/9Zjt16zZqD64EU2o8p1bP7RPRypIVwGDYLvwlBWhQlptJUDv8pi1g9lJ5azuYrWWXyr9wMwkah99DgjLNRVtL0Cn8lhKU6S7cSoLO4beQoGyzXry2BIOE7z5ADwmEP6cANcul8CdatIvwswXYUwLhT7x4F+EDAAAAAAAAAAAAAAAAAAAAwD38AT8g+uUAT65wAAAAAElFTkSuQmCC",$="/smeditor/assets/uprightBodyActive-3d912f52.png",A0="/smeditor/assets/uprightBodyInactive-01c6c977.png",n0="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+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A/qa9hYP/pqb+zJL/3LT/g/+Dpv6m/oT+/qb+/7lv/8qRrP/lzv/vwcHBzdfN/6K4pKT+27L/pP6k/qT+/8mPzP/vzNbM/pywnZ3916r/nf2d/J39/8WHxP/sydHJ/pGgk5P906D/k/2T/JT8/8B9uv/pxcvF/4ePh4f/zpb/h/+H/oj+/7tzsP/mw8PD/n19f3/9yYz/f/1//ID8/7Zppv/jvr6+/3FxcnL+xID/cv5y/XP9/7Fdmv/fuLi4/2dnaGj+v3b/aP5o/Wn9/6xTkP/cs7Oz/VxcXl78umr/Xvxe+1/7/6ZH/vr+hP/Yra2t/U5OT0/9s1z/T/1P/FD8/585/O78dv/Upqam/z8/Pz//rU7/P/8/90f3/5gr++L7Zv/Kn5+f/y4uLy//pED9L/8v8D7w/ZEb99T3Vf/Al5eX/xcXFxf/li34F/8X5y/n+IkD7sHuPP+yi4uL/wAAAQH/ihr0Af8B4R/h4n8A6K/oJf+mgICA/w0NDQ3/kCX2Df8N5Cjk74UA67nrMf+shoaG/ygoKSn/oDv8Kf8p7jru/I8V9c/1T/+8lJSU/zk5OTn/qkj/Of859UP1/5Ul+tz6YP/GnJyc/UpKS0v9sVj/S/1L/Ez8/501/Or8cv/SpKSk/ldXWFj+uGb/WP5Y/Vn9/6RD/vb+gP/Xq6ur/2JiZGT+vXL/ZP5k/WX9/6pPjP/bsbGx/25ucHD+w37/cP5w/XH9/7BbmP/et7e3/Xl5eXn9x4b/ef15/Hr8/7NjoP/hu7u7hYX/zZT/hf+F/ob+/7pxrv/lwsLC/Y+dj4/90Zz/j/2P/JD8/755tv/oxMjE/5iqmZn/16j/mf+Z/pr+/8SFwv/syc/J/6CzoqD+267/oP6i/qD8/8mLyP/vytTK2fi5aQAAAOV0Uk5T////AP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////xt8+5oAAAYhSURBVHic7Zt3bBxFFIefHSGEEL33hN5DTyWQgtM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+Z/pr+/8SF/93/wv/syc/J/6CzoqD+267/oP6i/qD8/8mL/+L+yP/vytTKfd22ZwAAAPV0Uk5T////AP////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////90oRikAAAGVUlEQVR4nO2bd4xUVRSHz0qMMcbYe8Ne6Ci9g3TsvYO9914XCyr23qUjHelIRzrSkY50pOOwDMu6rqs573z3zQ4zJs71jzWZd5N3f/nIm9lzP2Z2303OzZH/OHK87s8JX2dZLGWSuEj2T+JCOSCJC+TAJM6Xg5I4LgcncZ4cksQxOcyz/pQRCfC6P0cOh2PBXCxHwLuCuUiOhPOCuVCOgncHc4EcDceDOV+Ogffwr8fC+bzLcfBefurxnvWnDF8BJ8CbgrlYToQ3B3ORnARvCeZCORneGswFcgq8LZjzpSy8PZjjciq8I5jz5DR4ZzDH5HTP+lOGjwC9zoBXiS5f5Ex4tejyRc6C14guX+RseK3o8kXOgdeJ/S+fC68X+1ScB28Q+xSVgzeKferKe9afdkGZ3q9XBXiRmICK8GIxAZXgJWICKsNLxQRUgZeJCagKLxcTcD68QkzABfBKMQHVPOtPu6BM79erOjxLTEANeLaYgJrwHDEBteC5YgJqw/PEBNSB54sJqAsvEBNQD14oJqC+Z/1pF5Tp/Xo1gCeJCWgITxYT0AieIiagMTxVTEATeJqYgAvh6WICmsIzxAQ0g2eKCWjuWX/aBWV2v72iBTwqWL5IS3h0sHyRVvCYYPkireGxwfJF2sDj+D1/ETyevwsXwxP4O3IJPJG/O5d61p8yfAVcBg9CwOXwYARcAQ9BwJXwUARcBQ9DwNXwcARcA49AwLXwSARc51l/yvAVcD3cCwE3wL0RcCPcBwE3wX0RcDPcDwG3wP0R0BYegIB28EAE3OpZf8rwFXAb3AkBt8OdEXAH3AUBd8JdEXAX3A0Bd8PdEXAP3AMB98I9EXCfZ/0pI9M32I+8n/yYfID8iHyQ/JB8iPyAfJh8n3yEfI98lHyXfIx8h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YCVdGwC9wFQSsgqsiYLVn/SnDdzO0hixLriXdgch1pDswuZ50Byo3kO7A5UbSHcj8lXQnRDeR7gTpZrLUBGwh3ZHXraQ7EruNdEdmt5PuSO0O0h253Um6I7m/ke6McIw8lNxFlpoA97rE7wIbf5Lu8PQfpDs8/TvpDk/vJd3h6T2kOzy9m3SHp93CS+3w9P9NwN85VJDW1dBaWwAAAABJRU5ErkJggg==",u=`precision mediump float; varying vec2 vUvs; diff --git a/Noteskin-fe09add9.js b/Noteskin-c2a220e5.js similarity index 99% rename from Noteskin-fe09add9.js rename to Noteskin-c2a220e5.js index 469339d1..20b89e0b 100644 --- a/Noteskin-fe09add9.js +++ b/Noteskin-c2a220e5.js @@ -1,4 +1,4 @@ -import{w as o,x as H,y as r,b as G,z as E,O as f,H as Q,J as I,L as c,P as C,Q as F,a1 as K,V as a,Y as u,$ as P}from"./ChartManager-f20da8bc.js";import{A as h}from"./AnimatedSprite-d8850d0f.js";import{H as v}from"./HoldBody-34995142.js";const L="/smeditor/assets/downBodyActive-dd1fd694.png",k="/smeditor/assets/downBodyInactive-c781a303.png",Y="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB98FAw0dOV1YU4MAAAPKSURBVHja7d1dTupQFIbh0pwJkDBA4xjEQVjGcOIATZwBnFslHC1l7b2/v3WHiUL6PimUwHI3Xc1pWS5fbz8/vU5bZn843/07nx/zVDVb7h/5sW29/7/vb99uvxyPu6+356nRbHnAldEqg7HGXzPt/rIIAuX4zQGwI1CP3wUAKwKH+N0AsCFwid8VAAsCp/jdAaAjcIs/BAAqAsf4wwCgIXCNPxQACgLn+MMBICBwjg8BQAEBa3wYAMwImONDAWBEwB4fDgATAoX4kAAYEKjEhwWAjEApPjQARARq8eEBICFQjE8BAAGBanwaACMRKMefpmn60+NUWXVAPj/m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A4BGoxUcEAItAMT4qADgEqvGRAcAgUI6PDqAdgXp8BgBtCBziswAoR+ASnwlAGQKn+GwAliNwi88IYBkCx/isAKYjcI3PDGAagpGlEp8dQAsCpfgKAEoRqMVXAVCCQDG+EoClCFTjqwFYgkA5viKAqQjU46sCmILAIb4ygIcQuMRXBzCEwCm+A4BTCNziuwA4hMAxvhOALxG4xncDcBeB+764ATiCwGpPHAF8hcBuP1wB3EPgvBfWCK7ZhqysrKysrCy39Q9gQ/q5SfcuvQAAAABJRU5ErkJggg==",p="/smeditor/assets/leftBodyActive-75d41033.png",b="/smeditor/assets/leftBodyInactive-bbc074cd.png",O="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEANIA0gBQ7xAn7AAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB+EDFAI2I6Ho7PYAAANMSURBVHja7Z1bTgMxDEU7VjeAxAJR10C7CMoaEAus1B0Av6XiMY/EsX2PJT4GoTHpOZNJMhl32t3F6/n8eXt8eDrt1sTD48eiv79ebNcqluZumX9N7p7/39v7y7fj5+Nxuj3e7zrF9WKzP4xM8HsBHhXW8+RzPtgqVz4CrPiAM8IfIUzPnDaqAZmvfE8JeueyEQ2p0O17SOCRw7U/u16s1D2/JyCvXibtCCjKgC/LOX+LPfBzAZPvAZjqCQsAfGEBgC8sAPCFBQC+sADAFxYA+MICAF9YAOD7xh74f+evLpcB/+/81XYAhRQgKnwFCQz4ta/w0AIAX1gA4AvPApTgR5/WGvDjrTN4CmrAjwXfWwIDfjz4nhIY8GPC95LAgB8XvocEBnztqaYBX3udIczTQOoDFBOA+gA5gvoA1AcY17VTH2B8TuoDBAPinYv6AIEloD5A8Hs+9QEGBvUBiq0DZB7tUx9AGD7TQOAjAPARAPgIAHwEAD4CjIRPFBEA+MICAF9YAOALCwB8YQGALyxAS/hMAZMJAHxhAYAfI/YV4fccU3jkoz6AMHzvQbEBP2Y+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L3xOBEX7M8L0QGOHHDd8DgRG+9qmmEb72PEOYbwNZH6AYANYHyFGsD8D6AON27awPML4n6wMEC8S7F+sDBEbA+gAJjvmsDyAcfqbnDD8PkHm0z/oAwuFzGkj4ACB8ABA+AAgfAIQPgJHhU0UAEL4wAMIXBkD4wgAIXxgA4QsDaBk+p4DJABC+MADCj1FLxfB7jik8+rE+gHD43oNiI/yY/VgfQDh8zx5G+DHD9+plhB83fI+ellmvdxgVZyyN8HXDXwXgyZ0lVHEAcwsEvSczvGf/qs42vtoDgEAEwbtDQDgE3j/oEOUHJEauDwCCwQiO9FqT1bzyuX4f/7DntnHmBIaHP+8FAALnfh7hbwUAgin+18Fbwt8DIA0Cxdoa/l4AICgS/hEAICgQ/lEAIEge/pp5gM2AIs4YEn4/ACBIHH4rACBIGn5LACBIGH6LQWC4geFWQAWudziUoXm8IPYEMcPvBWAoAqE7jZvsvc3zBYIgVvi9xgBhxgR78LQeZMlIAgEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEEQqywY08kUlkX9pPSuAdAgAAAIAgAAA5RAAAAQAAAEAQAAAPQSVkViB99AVQfU9RKVLnJtMGx+tJ/iYCs60J2AMAIKWn34OASqHA74OFkbABSHCCLgkTBgBF4UKI+CycGEE3BgijIBbwwoiUN6GigBaIuD2cGEELBAhjEB9u1EURVEUlbz+AOnsq2p4bKxbAAAAAElFTkSuQmCC",x="/smeditor/assets/rightBodyActive-07f95372.png",y="/smeditor/assets/rightBodyInactive-fdefc2a4.png",T="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB+EDFAI3NtUuOVwAAAOHSURBVHja7Z3RTSsxEEUdKw0gUSCiBkIRhBoQBSLRQeDr6YWQEK/j8c7MPfcvIO0sPmcd24RhU07yut9/Hb9+fHguPbm7P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r9v5w+cdv6DPwWiAkzzlaAAyJZDQXEQyuECcsDJmViATmKR+UogAfSAFy5wAH7ADBaww3B0PhbQ03h0PhSUp/GcethVOXjKqVw4QgrEwWj0wLN2Qn0w2gsc+QamFEfDbecTbucTnnY+pp8sjgkNLT+ffpyoPadU5tMFGKDz4ZLysFx1CO5g0eJhudeLFVqtjA+WNecV22OIR4LiyOjmfOiF8cHSm/rkdnsY9mAxAPD8iaAHmPyBoAW4fC/oADZfCxqAz7eC+gKFsBDenyBvUCgBs3wnqADTfCUoALLlUAABpKERFIDFS2DYFTELL60tQXfZ2PzZpTfFdULPs/k1QSsvVy2r+4x0PhZU9xmlK6HcVVHF0HJLd7MbCOkEJ93shiKkwAPaACfQANBeCSwANTcCCYCthcBdsBgav8hEd8Mjb8unGoDI55MFQOXj6Rwg8+kCDND5cAkFdM3spbwW0OdPBeW14/Ii5cHC5t5ze5HzREAANH8kAACePxH0AJM/ELQAl+8FHcDma0ED8PlW8AT4F0zxmObwVcrYAAAAAElFTkSuQmCC",j="/smeditor/assets/upBodyInactive-87a7969e.png",N="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEAHgAeQB3paCnMQAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB+EDFAI5IlF3wK8AAAPCSURBVHja7Z1bbsIwFETNKBtAYoFV11C6iNI1VF0gEjug/YUoRbWxfR8zV+oHH9TG58QhUe6wK6v6PJ1+bl+/vryX2tofrtXvuZxRelXL+BHm2DL+1/fH3eu343F3+xq9Fykr/N7/u+Uzj/hsEHxuCcAM/3KGOQTr8VGMytP5NKIEoQXw+GWKVQIIPrcEEHxuCTBr4pGuob1L0HMtMeMIj3gDxasEvXeIxfM2b32peTmjesz94dptDWacDuyuP4LcZ/Byx45aAOubTJklgOBzSwDB55YAgs8tAQSfWwIIPrcEEHxuCSD43BJA8LklgOBzSwBm+PvDNeWDniEE8PQMIbMEYI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9uM/vwhPXovKX+a1zOf8nVAAUZYNRAVCUDUYFQFE2GBUARdlgVAAUZYNRAVCUDUYFQFE2mP8D644ti6CF+lcAAAAASUVORK5CYII=",I0="/smeditor/assets/frame-d599a2fe.png",c0="/smeditor/assets/parts-b37af2cf.png",D0="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAABACAIAAAB6Pz7pAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAACxZJREFUeJztXb1uJEUQnp5Ze9cnJCR0EgkBOTnxBQS8AGSgk0gQPADvQE5AdikJEQ9wGRcS8gikJOdde36wp+eneuqnq2a8fXuov8BerWt6er31df12z654z9F13bueQoDT6bR458WLVw8/X//zPX3B30dS/s2/L+e3wEc8/rUcwMt/+WaWd+CvPy2HH8f/8VdyOsev/iTlf/v0JRZ+wMev6PF//4b+vB99R3/eX374lpT/7OuSlH/z8yek/PHzL0j558//IOV35LsZT48r8FrD2Wvb8Luinl674Cb0V3yohr9PC4g8qbKtmb8wKrTU2whc13J3Zt5uHn/Ok3a02IjD4fDws22Hu0wvMgFS4Qq9I2scJECo0SR2RdOLYCH6K96X7TiLWXWEO7i2YSTo8V3Fj0XK90Q0WPMlAQqZAwsCFKPvkAmQCv4/DVS5c/MbBPbW4eEK3YGbMcNXk+6otK5s75nhmYlaCdAPOgzprZITF3XXgDmAYRjs98Q8H/iQCZAKcEX3369GHq794gVVcS/9GeGmaqHid11kOmXDuUA0zBagRS6QGN05bwHUuLm5Id/PBEgF+J+OKFsPswWwKYS3AEDHIskEPgagYSaAxf15RNWYrnj27FmLOZYJkA7GoDawAArAGEDFrzkGgGAvddAFUqjeuhjAckHdT1b7D8IxgEcmQCpYg2CjBaiGGGD2lmTVOFRg8Z9e8FroCTCEqk6heuYsUAfmolDr2QVSccAToECfMRPgjPAZ6AEoCMZfXCCPLQBSTii/U8QAUP6giAGgfNncTa85jYPyGgsQyAdrM83DQD6IAegZQXkYA0A7kAmQClYXaEMMMLJMMjGL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H0TgGDYI17L1oADHMhrC1ND8lrK5oAXO+ZtbDVyg9FJS6wfd7jkX7GWSZAKqxLg0KXSV0H0OCWigEEdAwBWFgtQPkUhTD+f3Q6EZXF/JjUhDDu8LJagPshCwT3VcXrAIsZCUwYCKB+ULY5CMaRr2gTUB2giDT/IQuQH5SdFmcuhNVDIUybR6RiAFHhyut5DgqTYSdA/2sglWKdMBbCFhbgYe33LzIBUmFLIUyBZtWWSH0poK3m3fiDnZGvsdYBgvUeZYSoCS3lRUALAKPhTIBUgIUwTRB8/ixQ6PxEdGiwAPGJjDJWC4D/HfKMjASAFmBa/otMgCcHm4HGWZFOlGcsACdfo7MXnSjPHYvCyXsL4Pq106/W8vgcAVj5Ejo/s0Kz8kwhjJO/vR2ec7xIhmYCpMKWLJACYy9Qp7zoOB+LAuG4A+y68goI0+W2ANZ2aAe22mggFsIwvAsE136PTIBUgCu6fkOMGmYXKIwBilGhP2DkPQH0MPcCWesA3c7U//xAAKz9RSZAOnAPcOH0ylgHOHcM0JY2VTETwNrS09g+79u3b8n3MwFSAQXBg8pxBDBngeBAccbAHWEatBXaECNqrJkAJZjP0GdnrQNIc5piAIhcCEsIFAQPK/ANI8+dDcosfDWIATSwHo3YehdI36O9ygIME9C4Qx0+GlEs/PVZIOgF5UJYWuBeIBmcBWAIA10gTTHMxwCFuhTQlWfeFG/uBVoQIHL5IgjOhbDkeKodYSwBloUwGUfipDcJ1hjAngUyHulGu0AsuGa4/wBTjZtfVontJAAAAABJRU5ErkJggg==",M=`precision mediump float; +import{w as o,x as H,y as r,b as G,z as E,O as f,H as Q,J as I,L as c,P as C,Q as F,a1 as K,V as a,Y as u,$ as P}from"./ChartManager-3c3d6f39.js";import{A as h}from"./AnimatedSprite-86b56f12.js";import{H as v}from"./HoldBody-5358344a.js";const L="/smeditor/assets/downBodyActive-dd1fd694.png",k="/smeditor/assets/downBodyInactive-c781a303.png",Y="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmH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FkPoAxgswHMEaQ+QDGCDIfwBhB5gMYI8h8AGMEmQ9gjCDzATIfoC1+5gM03hNkPsDkDct8AMy9zHwAsvj0F4GZD4ATv+0UkPkAGPFbj4GZD9Aff/oxMPMB8I6amQ9gHL/lISDzAXjiHwJw5y7EEgFj/CPtLp98/3r7jZG3h6tcEwjFvxwFEAQG8b8DYI9APf4RALYIHOIfBWCHwCX+GQA2CJzinwUgj8At/ggAWQSO8UcByCFwjf8IABkEMxdb/EcBBAF5/BkAgoA4/iwA1giY488EYImAPf5sAFYIFOKvAGCBQCX+KgDSCJTirwQgiUAt/moAUggU41cAkECgGr8KADUC5fiVACgRqMevBkCFwCF+BwAKBC7xuwBAI3CK3wkAEoFb/G4AUAgc4yMAgEDgGh8FQCuCkaUSHwkADQKl+GgA4BGoxUcEAItAMT4qADgEqvGRAcAgUI6PDqAdgXp8BgBtCBziswAoR+ASnwlAGQKn+GwAliNwi88IYBkCx/isAKYjcI3PDGAagpGlEp8dQAsCpfgKAEoRqMVXAVCCQDG+EoClCFTjqwFYgkA5viKAqQjU46sCmILAIb4ygIcQuMRXBzCEwCm+A4BTCNziuwA4hMAxvhOALxG4xncDcBeB+764ATiCwGpPHAF8hcBuP1wB3EPgvBfWCK7ZhqysrKysrCy39Q9gQ/q5SfcuvQAAAABJRU5ErkJggg==",p="/smeditor/assets/leftBodyActive-75d41033.png",b="/smeditor/assets/leftBodyInactive-bbc074cd.png",O="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEANIA0gBQ7xAn7AAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB+EDFAI2I6Ho7PYAAANMSURBVHja7Z1bTgMxDEU7VjeAxAJR10C7CMoaEAus1B0Av6XiMY/EsX2PJT4GoTHpOZNJMhl32t3F6/n8eXt8eDrt1sTD48eiv79ebNcqluZumX9N7p7/39v7y7fj5+Nxuj3e7zrF9WKzP4xM8HsBHh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2AMAIKWn34OASqHA74OFkbABSHCCLgkTBgBF4UKI+CycGEE3BgijIBbwwoiUN6GigBaIuD2cGEELBAhjEB9u1EURVEUlbz+AOnsq2p4bKxbAAAAAElFTkSuQmCC",x="/smeditor/assets/rightBodyActive-07f95372.png",y="/smeditor/assets/rightBodyInactive-fdefc2a4.png",T="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB+EDFAI3NtUuOVwAAAOHSURBVHja7Z3RTSsxEEUdKw0gUSCiBkIRhBoQBSLRQeDr6YWQEK/j8c7MPfcvIO0sPmcd24RhU07yut9/Hb9+fHguPbm7PxSLfH7UIdfpub9RtXvq99Z+e3/58fppt9scv96WYLk2cK0D9flRF0O4uz8Mk2BJ/ZHinaYW4fQM7MiZraW+JXxTAaxvfFRNzxLMGMPqDcgatTxKMGvsqmcwM2t4kmDmg1O9P50zr+1BgtlvndOqWfxgXq5pteWdkanbwDUWhtZbNIstYsoZgC0iAiABAiABAiABAiABAiABAiABAiABAiDButlmB3Vu0Nf4UMfx/Xg6Maxq8Ec/idFngqoGHwlYAyABAiABAiDB/F3A2p/Fn7U6j7Q7qBGfsghPYpSZoGaEjwSOBFh7kYMEKwrgZa+LBCsI4O3cGwmCbgMzQfAoQYhzACQ4aAvwbxBGDURECaxCf4CFtekPkCj0B6A/AP0BvAFZoxb9AYJLQH8A52sA+gO016c/QMBr0h8g4P7X8xYx5QzAFhEBkAABkAABkAABkAABkAABdEJ/AEJ/AOJTAgQQlwABxCVAAHEJEGDCVtCzBAggLgECiEvgvj/AUgiWg3lar+dzA3+NDf0BBlzTchCt69EfAAnoD4AE9AdAgkJ/ACQo9AcIIZ51PfoDIAH9AUhf3t5fNAWYfaBiXa/n+ufgP+12m/QCAL8dvqkAXvoDzDwaHl3PGn6TAC3vIx4kAP5y+KWUcvabr/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q3/xeeH321Phf0j2+wGo8K/Bl0T5NPjz1MMzUT4N/mSvfFv287vVf/KI7POjwZ+3fvwRWb4r/MOdH0V9vz/3/J9QARg6UutPCK0/IV35CXoaUEpz9Cdo/nX5wr0/kTYrvzyfO/p71qgADB2p9SeEzT9C2vwjpnnFGv09+QYqUfOPkO79u3xh86/jnJp/hArA0DlnByBt/hHRDkDY/Ovyhef/R6+PIXfv3Md/zxoVgKET6wCEzT8idgvAffz35BuoRc0/4ty3AOoAlCikzwAQ594DkHX/iWb1jyjA6C2AXf1jHID2AJQ4Bt8DaGcA5G8gbg+eCI//unx0AFnEFqBxAPImZiwqAEMnpviRuFHyqNUfkQz/HH8DEeKBRFZA1OqPnKP9R1QABk5xPe7328PDsvN/4gH4elT+tZ0yKj/94ctR+eO9uM/vwhPXovKX+a1zOf8nVAAUZYNRAVCUDUYFQFE2GBUARdlgVAAUZYNRAVCUDUYFQFE2mP8D644ti6CF+lcAAAAASUVORK5CYII=",I0="/smeditor/assets/frame-d599a2fe.png",c0="/smeditor/assets/parts-b37af2cf.png",D0="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAABACAIAAAB6Pz7pAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAACxZJREFUeJztXb1uJEUQnp5Ze9cnJCR0EgkBOTnxBQS8AGSgk0gQPADvQE5AdikJEQ9wGRcS8gikJOdde36wp+eneuqnq2a8fXuov8BerWt6er31df12z654z9F13bueQoDT6bR458WLVw8/X//zPX3B30dS/s2/L+e3wEc8/rUcwMt/+WaWd+CvPy2HH8f/8VdyOsev/iTlf/v0JRZ+wMev6PF//4b+vB99R3/eX374lpT/7OuSlH/z8yek/PHzL0j558//IOV35LsZT48r8FrD2Wvb8Luinl674Cb0V3yohr9PC4g8qbKtmb8wKrTU2whc13J3Zt5uHn/Ok3a02IjD4fDws22Hu0wvMgFS4Qq9I2scJECo0SR2RdOLYCH6K96X7TiLWXWEO7i2YSTo8V3Fj0XK90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ATSwHo3YehdI36O9ygIME9C4Qx0+GlEs/PVZIOgF5UJYWuBeIBmcBWAIA10gTTHMxwCFuhTQlWfeFG/uBVoQIHL5IgjOhbDkeKodYSwBloUwGUfipDcJ1hjAngUyHulGu0AsuGa4/wBTjZtfVontJAAAAABJRU5ErkJggg==",M=`precision mediump float; varying vec2 vUvs; diff --git a/Noteskin-eae11eee.js b/Noteskin-c2d5fa3c.js similarity index 99% rename from Noteskin-eae11eee.js rename to Noteskin-c2d5fa3c.js index 0c58a20e..b3abc7e5 100644 --- a/Noteskin-eae11eee.js +++ b/Noteskin-c2d5fa3c.js @@ -1,4 +1,4 @@ -import{w as a,a1 as T,x as u,y as Q,b as d,z as C,O as f,H as E,J as N,L as y,P as r,Q as D,Z as B,V as c,Y as v,$ as p,a0 as H}from"./ChartManager-f20da8bc.js";import{A as I}from"./AnimatedSprite-d8850d0f.js";import{H as h}from"./HoldBody-34995142.js";const P="/smeditor/assets/frame-d599a2fe.png",Y="/smeditor/assets/parts-b37af2cf.png",Z=`precision mediump float; +import{w as a,a1 as T,x as u,y as Q,b as d,z as C,O as f,H as E,J as N,L as y,P as r,Q as D,Z as B,V as c,Y as v,$ as p,a0 as H}from"./ChartManager-3c3d6f39.js";import{A as I}from"./AnimatedSprite-86b56f12.js";import{H as h}from"./HoldBody-5358344a.js";const P="/smeditor/assets/frame-d599a2fe.png",Y="/smeditor/assets/parts-b37af2cf.png",Z=`precision mediump float; varying vec2 vUvs; diff --git a/Noteskin-ac1b249a.js b/Noteskin-e8141f1a.js similarity index 99% rename from Noteskin-ac1b249a.js rename to Noteskin-e8141f1a.js index 060fdc81..36354573 100644 --- a/Noteskin-ac1b249a.js +++ b/Noteskin-e8141f1a.js @@ -1,4 +1,4 @@ -import{w as e,x as v,y as U,b as c,z as w,O as m,H as l,J as Q,L as h,P as i,Q as u,V as C,X as F,Y as x,Z as G,$ as f,a0 as b}from"./ChartManager-f20da8bc.js";import{H as E}from"./HoldBody-34995142.js";const S="/smeditor/assets/parts-0c8fa692.png",M="/smeditor/assets/frame-d599a2fe.png",T="/smeditor/assets/parts-b37af2cf.png",K="/smeditor/assets/parts-9668caec.png",P=`precision mediump float; +import{w as e,x as v,y as U,b as c,z as w,O as m,H as l,J as Q,L as h,P as i,Q as u,V as C,X as F,Y as x,Z as G,$ as f,a0 as b}from"./ChartManager-3c3d6f39.js";import{H as E}from"./HoldBody-5358344a.js";const S="/smeditor/assets/parts-0c8fa692.png",M="/smeditor/assets/frame-d599a2fe.png",T="/smeditor/assets/parts-b37af2cf.png",K="/smeditor/assets/parts-9668caec.png",P=`precision mediump float; varying vec2 vUvs; diff --git a/Noteskin-da25c255.js b/Noteskin-f1e24e88.js similarity index 98% rename from Noteskin-da25c255.js rename to Noteskin-f1e24e88.js index e3e05ce5..3dd1524d 100644 --- a/Noteskin-da25c255.js +++ b/Noteskin-f1e24e88.js @@ -1 +1 @@ -import{w as o,b as r,a1 as i,P as g,Y as c,V as l,$ as s}from"./ChartManager-f20da8bc.js";import{A as B}from"./AnimatedSprite-d8850d0f.js";import{H as h}from"./HoldBody-34995142.js";const D="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAABACAYAAADS1n9/AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsEAAA7BAbiRa+0AAAOLSURBVHhe7ZvLitRAGEY7KuMFbyiiggsviCheVuozCF72vogrV658EffqwmdQV/aAOsioC0FFFG/gBZ32O6FqiLEnJN0hxNR34JB0VZLOn6n6U6nOjIwxxhhjjDHGGGOMMcYYY4wxxhhjjDEDIgvL0WQyWV1PgSzLJmE1J9X486AV/DotFuLnBCD4n7oIK/mHhOPPQvDb5CG5UQ79IhD8D/lCfqFAJBs/DWCzVo7JS5J1GOpFyNOe+CbvyqeSDkD8F2Vq8S/RALZo5ZS8It/KoabDPO1J0v5eeVuO5Xp5Ul6WqcW/GBvAackFeCdpDIcl6XBIkPaey0W5R96Rj2SxAaQW/7jYAMgAH+UFyUWI6RDifSOmkL5D7y3fz0l7BH9P7pT0gGIDSDH+fxrAp7A8IzdJDkDKYLC0LD/Lvl8Eznm7PCIZ3JHSOefvkj84ge8Iy3IDWCv+r/K95Bj/Q/yc+265VVbFX9kAYg9gx8fyVljyuc8Q/Al5NSz5DPSAJg2gGP9r+UrSCH7LPkM8/PEPyP2yKv5aDYAdH8ibYcnnPsN5n5PXwrIYxywNgP1eyiX5Rv6SfWaD3Cd5sjkoq+Ifkx7qQBqkJ3CQeeQYVSk0pqpp+zaRY3DObcF50fP5489jnezR1vfUulXVbQB/wTRiU9lNck8+Ls/K8yUpo45ttMv041Sp/foM8fN4uUvSQ0nPRSmjrtNH0JkaQFN0m4nBMzDj3kx6vl6SMurYZiHsMyS41ZB6ecQ8KmnsRSmjjm3YthM6aQABvovezcCMe3M5A1BGXRy5DxE6AfdkBmjcn4tSRh3bdMZQL7SpSZcNIM4n8CjJ08T9kpRRxzZtDuD6BFOxDFJ5pOTJoihl1LFNZ3TSAMIAjcCYTGI+gUfKGyUpo45t+Kmy74O6pjAy5zGT6dhn8klJyqhjmzpPC60wUwNggNZUdpP0boJ9KMsZgDLq2Ea7TD9Oldqvz8RO8EEyn8DkUlHKqGObzhp/3QbAdswoMUiZR45R9Yeirq3vaTO7cV6MzJlkmcc6o/u2vqdWh6DneCrYU8H+MUhWxZ/Mj0H+OTjhn4P9QkjCL4QQND3Ar4SlFX/+Shipzi+FJvxSKBeAwZJfC08w/jzY0AiGmPbWIk+Hmf8xZGU1YF2EVILPKU81px6/McYYY4wxxhhjjDHGGGOMMcaYQcEbQWHVpAhvwpiEcQNImtHoDycKQp3RP5gyAAAAAElFTkSuQmCC",d="/smeditor/assets/mine-590d445e.png",C=o.from(D),m=o.from(d);class f extends r{hold=new B(i(C,2,1,64,64)[0]);anims=new Set;constructor(e,A){super(),e.on(this,"holdon",n=>{A==n.columnNumber&&(this.hold.visible=!0)}),e.on(this,"holdoff",n=>{A==n.columnNumber&&(this.hold.visible=!1)}),e.on(this,"rollon",n=>{A==n.columnNumber&&(this.hold.visible=!0)}),e.on(this,"rolloff",n=>{A==n.columnNumber&&(this.hold.visible=!1)}),e.on(this,"hitmine",n=>{if(A==n.columnNumber){const a=new g(m);a.alpha=0,a.anchor.set(.5),a.blendMode=c.ADD,this.addChild(a),l.animate(a,{0:{alpha:1,rotation:0},"0.5":{alpha:1,rotation:90*Math.PI/180},1:{alpha:0,rotation:180*Math.PI/180}},.4,void 0,()=>a.destroy())}}),e.onUpdate(this,()=>{this.hold.alpha=Math.sin(Date.now()/1e3*Math.PI*2*20)*.1+1}),this.hold.visible=!1,this.hold.anchor.set(.5),this.addChild(this.hold)}}const w="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAACACAMAAACMX59YAAAAIVBMVEUAAAD///+6urq4uLizs7OoqKinp6ecnJyVlZWUlJSIiIh18TD6AAAAAXRSTlMAQObYZgAAAKhJREFUeNrt2AMCA0EQRNFRVXD/A8fmWv/F6vTuCOGj+CBUMGgAAMDw4p4UKpHiXpsB3HsGfg7g1/+QfL68furfGUiWrnc1MogPfmZgVQsgtZ2Bqmbg1wwq8XA1sf1DAACM3+v8oILv84Pxr97ZPwAAxL2UQyUlNVwzyQ2XfW5//0DV5gevAfx9ftDH8n/wAJUPYeYVqf39AwAA+wfrtVbbzf52fAyf7ADSzwa2IX7vawAAAABJRU5ErkJggg==",E="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAACAAgMAAADG74f5AAAACVBMVEUAAAAAAACoqKjq2/gjAAAAAXRSTlMAQObYZgAAACRJREFUeNpjGAWDAjBGNSA4TEsdhrfAKBgFo2C0/BgtP0Y6AACvVTE5zX7vswAAAABJRU5ErkJggg==",P="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAIACAMAAAAFcJqpAAAAflBMVEUAAAD///8AAAAAQP8A/wAA//8BAQECAgIDAwMEBAQFAAAFBQUGBgYHBwcICAgJAAAJCQkKCgoLCwsODg5AQEBAUIBAgEBAgIB/Pz+APz+AQECAQHCAaUCAgECCPj6EPT2oqKj5AAD7AQH7AgL8AQH+AAD/AL//pAD//wD///82s5ztAAAAAnRSTlMAAHaTzTgAAAHgSURBVHja7djZTgIxFIBh1wPIIjhu4IJsLu//gsapTUCpctomPZP5v0uif5ouc3GOjgAAOX0kcIETZzIej0bD4WDQ7/d63U5H5GTLhXPpdN2PPrDZtnA2B9gfUFAF1l+Wy9UqHJjVnp3pl9ke7sc/AofZDVR/B+7/DSSvwAfmP//M34EDA7/+XxuYlQtI6iZKrlPIEthzfetbPf2+4vN5OFBbLutXs454jYvk57yIDzj1t+r7y3Wx9TET6XS63V6/PxgMh6PReDyZXF3tfNJSP6oAAAAA84PQ/OA0krnAjULmQFV8BcGAvwMtCEjqJordY1QGGv2cmR8AAAAAVucHZ5HMBW4VMgeq4isIBvwdaEFAUjdR7B6jMtDo58z8AAAAALA6P3iPZC7wpJA5UBVfQTDg70ALApK6iWL3GJWBRj9n5gcAAACA1fnBayRzgQeFzIGq+AqCAX8HWhCQ1E0Uu8eoDDT6OTM/AAAAAKzOD94imQs8KmQOVMVXEAz4O9CCgKRuotg9RmWg0c+Z+QEAAABgdX5wHslc4E4hc6AqvoJgwN+BFgQkdRPF7jEqA41+zswPAAAAAKvzg5dI5gLXCpkDVfEVBAP+DrQgIKmbKHaPURlo9HNmfgAAznGi8oFPHljdxHwy+70AAAAASUVORK5CYII=",p="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAIACAMAAAAFcJqpAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAEhQTFRFAAAA/gAAAAAACgoKCQkJCAgIBwcHBgYGBQUFBAQEAwMDAgICAQEBBQAACQAADg4OCwsLAED/AP8A//8A/wC//6MAAP//qKio3mg4lAAAABh0Uk5TAP//////////////////////////////6dxENgAAAlJJREFUeJzt2NlOwzAQhWHgkn3n/R+vdAPE0kKhYHtkepEqynEiR6N/KrUyjb+pJQt75vCgMA4BAA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savYfa8xyeJr4+r3VYs3OA/OrDy9vrow0PjZ8fn9+//+rdf5r9M3n3t57TquLqe526s299as7e2mTR8+PzX7H/pZxTWcT3B9jPac/i6kudirPvb75etzZtGjw/Pv8V+0+fPvl+AHac02G+Aerb/X4A8fnj+0+fPvEE4AnAOwDvAP6vAA2+BevNvwLUuf96DtU0+BWg3ANwD+AhEryJkjvfBMb7+P7/bwK5C6cHAAAAAAAAAAAAAAAAAAAAAADAl/kFHH4jM43eaVYAAAAASUVORK5CYII=",v="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAABAAgMAAACvuJfsAAAACVBMVEVlAEsAAAD////TJSq6AAAAAXRSTlMAQObYZgAAACxJREFUSMdjYBgFo2CoAa5VKGABOp+BA1W9Ajp/VMGoAnorIJhoR8EoGGoAAAiuLhkqD4nBAAAAAElFTkSuQmCC",Q="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAIACAMAAAAFcJqpAAAAflBMVEUAAAD///8AAAAAQP8A/wAA//8BAQECAgIDAwMEBAQFAAAFBQUGBgYHBwcICAgJAAAJCQkKCgoLCwsODg5AQEBAUIBAgEBAgIB/Pz+APz+AQECAQHCAaUCAgECCPj6EPT2oqKj5AAD7AQH7AgL8AQH+AAD/AL//pAD//wD///82s5ztAAAAAnRSTlMAAHaTzTgAAAHgSURBVHja7djZTgIxFIBh1wPIIjhu4IJsLu//gsapTUCpctomPZP5v0uif5ouc3GOjgAAOX0kcIETZzIej0bD4WDQ7/d63U5H5GTLhXPpdN2PPrDZtnA2B9gfUFAF1l+Wy9UqHJjVnp3pl9ke7sc/AofZDVR/B+7/DSSvwAfmP//M34EDA7/+XxuYlQtI6iZKrlPIEthzfetbPf2+4vN5OFBbLutXs454jYvk57yIDzj1t+r7y3Wx9TET6XS63V6/PxgMh6PReDyZXF3tfNJSP6oAAAAA84PQ/OA0krnAjULmQFV8BcGAvwMtCEjqJordY1QGGv2cmR8AAAAAVucHZ5HMBW4VMgeq4isIBvwdaEFAUjdR7B6jMtDo58z8AAAAALA6P3iPZC7wpJA5UBVfQTDg70ALApK6iWL3GJWBRj9n5gcAAACA1fnBayRzgQeFzIGq+AqCAX8HWhCQ1E0Uu8eoDDT6OTM/AAAAAKzOD94imQs8KmQOVMVXEAz4O9CCgKRuotg9RmWg0c+Z+QEAAABgdX5wHslc4E4hc6AqvoJgwN+BFgQkdRPF7jEqA41+zswPAAAAAKvzg5dI5gLXCpkDVfEVBAP+DrQgIKmbKHaPURlo9HNmfgAAznGi8oFPHljdxHwy+70AAAAASUVORK5CYII=",U=i(o.from(v),2,1,64,64)[0],R=i(o.from(M),8,1,64,64)[0],I=i(o.from(Q),1,8,64,64),H=i(o.from(P),1,8,64,64),T=i(o.from(p),1,8,64,64),u=o.from(E),V=o.from(w),S={elements:{Left:{Receptor:t=>{let e;const A=new B(U);return A.width=64,A.height=64,A.anchor.set(.5),t.noteskin.on(A,"ghosttap",n=>{n.columnNumber==t.columnNumber&&(l.finish(e),e=l.animate(A,{0:{alpha:1.2,width:48,height:48},1:{alpha:1,width:64,height:64}},.06))}),t.noteskin.onUpdate(A,n=>{const a=(n.getVisualBeat()%1+1)%1;A.currentFrame=a<.2?0:1}),A},Tap:t=>{const e=I[Math.min([4,8,12,16,24,32,48,64,96,192].indexOf(t.note?.quant??4)??0,7)],A=new g(e[0]);return A.anchor.set(.5),A.width=64,A.height=64,A},NoteFlash:t=>new f(t.noteskin,t.columnNumber),Fake:{element:"Tap"},Lift:t=>{const e=T[Math.min([4,8,12,16,24,32,48,64,96,192].indexOf(t.note?.quant??4)??0,7)],A=new g(e[0]);return A.anchor.set(.5),A.width=64,A.height=64,A},Mine:t=>{const e=new B(R);return e.anchor.set(.5),e.width=64,e.height=64,t.noteskin.onUpdate(e,A=>e.currentFrame=Math.floor((A.getVisualBeat()%4+4)%4*2)),e},"Hold Active Head":t=>{const e=H[Math.min([4,8,12,16,24,32,48,64,96,192].indexOf(t.note?.quant??4)??0,7)],A=new g(e[0]);return A.anchor.set(.5),A.width=64,A.height=64,A},"Hold Inactive Head":{element:"Tap"},"Hold Active Body":()=>new h(u),"Hold Inactive Body":{element:"Hold Active Body"},"Hold Active TopCap":()=>new g(o.EMPTY),"Hold Inactive TopCap":()=>new g(o.EMPTY),"Hold Active BottomCap":()=>new s(o.EMPTY),"Hold Inactive BottomCap":{element:"Hold Active BottomCap"},"Roll Active Head":{element:"Hold Active Head"},"Roll Inactive Head":{element:"Tap"},"Roll Active Body":()=>new h(V),"Roll Inactive Body":{element:"Roll Active Body"},"Roll Active TopCap":()=>new g(o.EMPTY),"Roll Inactive TopCap":()=>new g(o.EMPTY),"Roll Active BottomCap":()=>new s(o.EMPTY),"Roll Inactive BottomCap":{element:"Roll Active BottomCap"}}},load:function(t,e){return t.columnName="Left",this.loadElement(t,e)},hideIcons:["Lift"]};export{S as default}; +import{w as o,b as r,a1 as i,P as g,Y as c,V as l,$ as s}from"./ChartManager-3c3d6f39.js";import{A as B}from"./AnimatedSprite-86b56f12.js";import{H as h}from"./HoldBody-5358344a.js";const D="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAABACAYAAADS1n9/AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsEAAA7BAbiRa+0AAAOLSURBVHhe7ZvLitRAGEY7KuMFbyiiggsviCheVuozCF72vogrV658EffqwmdQV/aAOsioC0FFFG/gBZ32O6FqiLEnJN0hxNR34JB0VZLOn6n6U6nOjIwxxhhjjDHGGGOMMcYYY4wxxhhjjDEDIgvL0WQyWV1PgSzLJmE1J9X486AV/DotFuLnBCD4n7oIK/mHhOPPQvDb5CG5UQ79IhD8D/lCfqFAJBs/DWCzVo7JS5J1GOpFyNOe+CbvyqeSDkD8F2Vq8S/RALZo5ZS8It/KoabDPO1J0v5eeVuO5Xp5Ul6WqcW/GBvAackFeCdpDIcl6XBIkPaey0W5R96Rj2SxAaQW/7jYAMgAH+UFyUWI6RDifSOmkL5D7y3fz0l7BH9P7pT0gGIDSDH+fxrAp7A8IzdJDkDKYLC0LD/Lvl8Eznm7PCIZ3JHSOefvkj84ge8Iy3IDWCv+r/K95Bj/Q/yc+265VVbFX9kAYg9gx8fyVljyuc8Q/Al5NSz5DPSAJg2gGP9r+UrSCH7LPkM8/PEPyP2yKv5aDYAdH8ibYcnnPsN5n5PXwrIYxywNgP1eyiX5Rv6SfWaD3Cd5sjkoq+Ifkx7qQBqkJ3CQeeQYVSk0pqpp+zaRY3DObcF50fP5489jnezR1vfUulXVbQB/wTRiU9lNck8+Ls/K8yUpo45ttMv041Sp/foM8fN4uUvSQ0nPRSmjrtNH0JkaQFN0m4nBMzDj3kx6vl6SMurYZiHsMyS41ZB6ecQ8KmnsRSmjjm3YthM6aQABvovezcCMe3M5A1BGXRy5DxE6AfdkBmjcn4tSRh3bdMZQL7SpSZcNIM4n8CjJ08T9kpRRxzZtDuD6BFOxDFJ5pOTJoihl1LFNZ3TSAMIAjcCYTGI+gUfKGyUpo45t+Kmy74O6pjAy5zGT6dhn8klJyqhjmzpPC60wUwNggNZUdpP0boJ9KMsZgDLq2Ea7TD9Oldqvz8RO8EEyn8DkUlHKqGObzhp/3QbAdswoMUiZR45R9Yeirq3vaTO7cV6MzJlkmcc6o/u2vqdWh6DneCrYU8H+MUhWxZ/Mj0H+OTjhn4P9QkjCL4QQND3Ar4SlFX/+Shipzi+FJvxSKBeAwZJfC08w/jzY0AiGmPbWIk+Hmf8xZGU1YF2EVILPKU81px6/McYYY4wxxhhjjDHGGGOMMcaYQcEbQWHVpAhvwpiEcQNImtHoDycKQp3RP5gyAAAAAElFTkSuQmCC",d="/smeditor/assets/mine-590d445e.png",C=o.from(D),m=o.from(d);class f extends r{hold=new B(i(C,2,1,64,64)[0]);anims=new Set;constructor(e,A){super(),e.on(this,"holdon",n=>{A==n.columnNumber&&(this.hold.visible=!0)}),e.on(this,"holdoff",n=>{A==n.columnNumber&&(this.hold.visible=!1)}),e.on(this,"rollon",n=>{A==n.columnNumber&&(this.hold.visible=!0)}),e.on(this,"rolloff",n=>{A==n.columnNumber&&(this.hold.visible=!1)}),e.on(this,"hitmine",n=>{if(A==n.columnNumber){const a=new g(m);a.alpha=0,a.anchor.set(.5),a.blendMode=c.ADD,this.addChild(a),l.animate(a,{0:{alpha:1,rotation:0},"0.5":{alpha:1,rotation:90*Math.PI/180},1:{alpha:0,rotation:180*Math.PI/180}},.4,void 0,()=>a.destroy())}}),e.onUpdate(this,()=>{this.hold.alpha=Math.sin(Date.now()/1e3*Math.PI*2*20)*.1+1}),this.hold.visible=!1,this.hold.anchor.set(.5),this.addChild(this.hold)}}const w="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAACACAMAAACMX59YAAAAIVBMVEUAAAD///+6urq4uLizs7OoqKinp6ecnJyVlZWUlJSIiIh18TD6AAAAAXRSTlMAQObYZgAAAKhJREFUeNrt2AMCA0EQRNFRVXD/A8fmWv/F6vTuCOGj+CBUMGgAAMDw4p4UKpHiXpsB3HsGfg7g1/+QfL68furfGUiWrnc1MogPfmZgVQsgtZ2Bqmbg1wwq8XA1sf1DAACM3+v8oILv84Pxr97ZPwAAxL2UQyUlNVwzyQ2XfW5//0DV5gevAfx9ftDH8n/wAJUPYeYVqf39AwAA+wfrtVbbzf52fAyf7ADSzwa2IX7vawAAAABJRU5ErkJggg==",E="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAACAAgMAAADG74f5AAAACVBMVEUAAAAAAACoqKjq2/gjAAAAAXRSTlMAQObYZgAAACRJREFUeNpjGAWDAjBGNSA4TEsdhrfAKBgFo2C0/BgtP0Y6AACvVTE5zX7vswAAAABJRU5ErkJggg==",P="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAIACAMAAAAFcJqpAAAAflBMVEUAAAD///8AAAAAQP8A/wAA//8BAQECAgIDAwMEBAQFAAAFBQUGBgYHBwcICAgJAAAJCQkKCgoLCwsODg5AQEBAUIBAgEBAgIB/Pz+APz+AQECAQHCAaUCAgECCPj6EPT2oqKj5AAD7AQH7AgL8AQH+AAD/AL//pAD//wD///82s5ztAAAAAnRSTlMAAHaTzTgAAAHgSURBVHja7djZTgIxFIBh1wPIIjhu4IJsLu//gsapTUCpctomPZP5v0uif5ouc3GOjgAAOX0kcIETZzIej0bD4WDQ7/d63U5H5GTLhXPpdN2PPrDZtnA2B9gfUFAF1l+Wy9UqHJjVnp3pl9ke7sc/AofZDVR/B+7/DSSvwAfmP//M34EDA7/+XxuYlQtI6iZKrlPIEthzfetbPf2+4vN5OFBbLutXs454jYvk57yIDzj1t+r7y3Wx9TET6XS63V6/PxgMh6PReDyZXF3tfNJSP6oAAAAA84PQ/OA0krnAjULmQFV8BcGAvwMtCEjqJordY1QGGv2cmR8AAAAAVucHZ5HMBW4VMgeq4isIBvwdaEFAUjdR7B6jMtDo58z8AAAAALA6P3iPZC7wpJA5UBVfQTDg70ALApK6iWL3GJWBRj9n5gcAAACA1fnBayRzgQeFzIGq+AqCAX8HWhCQ1E0Uu8eoDDT6OTM/AAAAAKzOD94imQs8KmQOVMVXEAz4O9CCgKRuotg9RmWg0c+Z+QEAAABgdX5wHslc4E4hc6AqvoJgwN+BFgQkdRPF7jEqA41+zswPAAAAAKvzg5dI5gLXCpkDVfEVBAP+DrQgIKmbKHaPURlo9HNmfgAAznGi8oFPHljdxHwy+70AAAAASUVORK5CYII=",p="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAIACAMAAAAFcJqpAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAEhQTFRFAAAA/gAAAAAACgoKCQkJCAgIBwcHBgYGBQUFBAQEAwMDAgICAQEBBQAACQAADg4OCwsLAED/AP8A//8A/wC//6MAAP//qKio3mg4lAAAABh0Uk5TAP//////////////////////////////6dxENgAAAlJJREFUeJzt2NlOwzAQhWHgkn3n/R+vdAPE0kKhYHtkepEqynEiR6N/KrUyjb+pJQt75vCgMA4BAAAAAHaBEmMbARP+Pnde4e1959GTnDDE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row0PjZ8fn9+//+rdf5r9M3n3t57TquLqe526s299as7e2mTR8+PzX7H/pZxTWcT3B9jPac/i6kudirPvb75etzZtGjw/Pv8V+0+fPvl+AHac02G+Aerb/X4A8fnj+0+fPvEE4AnAOwDvAP6vAA2+BevNvwLUuf96DtU0+BWg3ANwD+AhEryJkjvfBMb7+P7/bwK5C6cHAAAAAAAAAAAAAAAAAAAAAADAl/kFHH4jM43eaVYAAAAASUVORK5CYII=",v="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAABAAgMAAACvuJfsAAAACVBMVEVlAEsAAAD////TJSq6AAAAAXRSTlMAQObYZgAAACxJREFUSMdjYBgFo2CoAa5VKGABOp+BA1W9Ajp/VMGoAnorIJhoR8EoGGoAAAiuLhkqD4nBAAAAAElFTkSuQmCC",Q="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAIACAMAAAAFcJqpAAAAflBMVEUAAAD///8AAAAAQP8A/wAA//8BAQECAgIDAwMEBAQFAAAFBQUGBgYHBwcICAgJAAAJCQkKCgoLCwsODg5AQEBAUIBAgEBAgIB/Pz+APz+AQECAQHCAaUCAgECCPj6EPT2oqKj5AAD7AQH7AgL8AQH+AAD/AL//pAD//wD///82s5ztAAAAAnRSTlMAAHaTzTgAAAHgSURBVHja7djZTgIxFIBh1wPIIjhu4IJsLu//gsapTUCpctomPZP5v0uif5ouc3GOjgAAOX0kcIETZzIej0bD4WDQ7/d63U5H5GTLhXPpdN2PPrDZtnA2B9gfUFAF1l+Wy9UqHJjVnp3pl9ke7sc/AofZDVR/B+7/DSSvwAfmP//M34EDA7/+XxuYlQtI6iZKrlPIEthzfetbPf2+4vN5OFBbLutXs454jYvk57yIDzj1t+r7y3Wx9TET6XS63V6/PxgMh6PReDyZXF3tfNJSP6oAAAAA84PQ/OA0krnAjULmQFV8BcGAvwMtCEjqJordY1QGGv2cmR8AAAAAVucHZ5HMBW4VMgeq4isIBvwdaEFAUjdR7B6jMtDo58z8AAAAALA6P3iPZC7wpJA5UBVfQTDg70ALApK6iWL3GJWBRj9n5gcAAACA1fnBayRzgQeFzIGq+AqCAX8HWhCQ1E0Uu8eoDDT6OTM/AAAAAKzOD94imQs8KmQOVMVXEAz4O9CCgKRuotg9RmWg0c+Z+QEAAABgdX5wHslc4E4hc6AqvoJgwN+BFgQkdRPF7jEqA41+zswPAAAAAKvzg5dI5gLXCpkDVfEVBAP+DrQgIKmbKHaPURlo9HNmfgAAznGi8oFPHljdxHwy+70AAAAASUVORK5CYII=",U=i(o.from(v),2,1,64,64)[0],R=i(o.from(M),8,1,64,64)[0],I=i(o.from(Q),1,8,64,64),H=i(o.from(P),1,8,64,64),T=i(o.from(p),1,8,64,64),u=o.from(E),V=o.from(w),S={elements:{Left:{Receptor:t=>{let e;const A=new B(U);return A.width=64,A.height=64,A.anchor.set(.5),t.noteskin.on(A,"ghosttap",n=>{n.columnNumber==t.columnNumber&&(l.finish(e),e=l.animate(A,{0:{alpha:1.2,width:48,height:48},1:{alpha:1,width:64,height:64}},.06))}),t.noteskin.onUpdate(A,n=>{const a=(n.getVisualBeat()%1+1)%1;A.currentFrame=a<.2?0:1}),A},Tap:t=>{const e=I[Math.min([4,8,12,16,24,32,48,64,96,192].indexOf(t.note?.quant??4)??0,7)],A=new g(e[0]);return A.anchor.set(.5),A.width=64,A.height=64,A},NoteFlash:t=>new f(t.noteskin,t.columnNumber),Fake:{element:"Tap"},Lift:t=>{const e=T[Math.min([4,8,12,16,24,32,48,64,96,192].indexOf(t.note?.quant??4)??0,7)],A=new g(e[0]);return A.anchor.set(.5),A.width=64,A.height=64,A},Mine:t=>{const e=new B(R);return e.anchor.set(.5),e.width=64,e.height=64,t.noteskin.onUpdate(e,A=>e.currentFrame=Math.floor((A.getVisualBeat()%4+4)%4*2)),e},"Hold Active Head":t=>{const e=H[Math.min([4,8,12,16,24,32,48,64,96,192].indexOf(t.note?.quant??4)??0,7)],A=new g(e[0]);return A.anchor.set(.5),A.width=64,A.height=64,A},"Hold Inactive Head":{element:"Tap"},"Hold Active Body":()=>new h(u),"Hold Inactive Body":{element:"Hold Active Body"},"Hold Active TopCap":()=>new g(o.EMPTY),"Hold Inactive TopCap":()=>new g(o.EMPTY),"Hold Active BottomCap":()=>new s(o.EMPTY),"Hold Inactive BottomCap":{element:"Hold Active BottomCap"},"Roll Active Head":{element:"Hold Active Head"},"Roll Inactive Head":{element:"Tap"},"Roll Active Body":()=>new h(V),"Roll Inactive Body":{element:"Roll Active Body"},"Roll Active TopCap":()=>new g(o.EMPTY),"Roll Inactive TopCap":()=>new g(o.EMPTY),"Roll Active BottomCap":()=>new s(o.EMPTY),"Roll Inactive BottomCap":{element:"Roll Active BottomCap"}}},load:function(t,e){return t.columnName="Left",this.loadElement(t,e)},hideIcons:["Lift"]};export{S as default}; diff --git a/Noteskin-f28d005e.js b/Noteskin-fb3b8e1b.js similarity index 97% rename from Noteskin-f28d005e.js rename to Noteskin-fb3b8e1b.js index 69c674fe..c724e101 100644 --- a/Noteskin-f28d005e.js +++ b/Noteskin-fb3b8e1b.js @@ -1 +1 @@ -import{a1 as d,w as i,b as f,z as u,O as T,Q as g,P as l,Y as m,V as p,a2 as U}from"./ChartManager-f20da8bc.js";import{A as w}from"./AnimatedSprite-d8850d0f.js";import{A as H}from"./HoldBody-34995142.js";const L="/smeditor/assets/Center-df4c129b.png",B="/smeditor/assets/DownLeft-63c88ff1.png",y="/smeditor/assets/DownRight-bcd0e463.png",M="/smeditor/assets/UpLeft-ef9a2609.png",O="/smeditor/assets/UpRight-7924deeb.png",I="/smeditor/assets/Center-461a85de.png",E="/smeditor/assets/DownLeft-4943410c.png",S="/smeditor/assets/DownRight-d5c3b98a.png",F="/smeditor/assets/UpLeft-be2bb52b.png",$="/smeditor/assets/UpRight-2e4dc3f1.png",N="/smeditor/assets/Center-274a1642.png",P="/smeditor/assets/DownLeft-15647c81.png",V="/smeditor/assets/DownRight-9aba7559.png",Y="/smeditor/assets/UpLeft-36744666.png",j="/smeditor/assets/UpRight-af6dd110.png",v={},c=["DownLeft","UpLeft","Center","UpRight","DownRight"];for(const t of c)v[t]=d(i.from(new URL(Object.assign({"./tap/Center.png":I,"./tap/DownLeft.png":E,"./tap/DownRight.png":S,"./tap/UpLeft.png":F,"./tap/UpRight.png":$})[`./tap/${t}.png`],self.location).href),3,2,96,96).flat();const D={};for(const t of c)D[t]=d(i.from(new URL(Object.assign({"./roll/Center.png":N,"./roll/DownLeft.png":P,"./roll/DownRight.png":V,"./roll/UpLeft.png":Y,"./roll/UpRight.png":j})[`./roll/${t}.png`],self.location).href),3,2,96,96).flat();const k=d(i.from(new URL("/smeditor/assets/mine-0e34ec01.png",self.location).href),3,2,96,96).flat();class a{static noteTex;static noteContainer=new f;static rollTex;static rollContainer=new f;static mineTex;static mine;static loaded=!1;static async initArrowTex(){if(!this.loaded){a.noteTex=u.create({width:96*5,height:96,resolution:T.performance.resolution}),a.rollTex=u.create({width:96*5,height:96,resolution:T.performance.resolution}),a.mineTex=u.create({width:96,height:96,resolution:T.performance.resolution});for(const e of c)this.createSprite(this.noteContainer,e,v);for(const e of c)this.createSprite(this.rollContainer,e,D);this.mine=new w(k),this.loaded=!0}}static createSprite(e,o,n){const s=c.indexOf(o)*96,r=new w(n[o]);r.x=s,e.addChild(r)}static setArrowTexTime(e){if(!this.loaded)return;const o=e.chartManager.chartView.getVisualTime(),n=Math.floor((o%.3+.3)%.3/.3*6);this.noteContainer.children.forEach(s=>s.currentFrame=n),this.rollContainer.children.forEach(s=>s.currentFrame=n),this.mine.currentFrame=n,e.renderer.render(a.noteContainer,{renderTexture:a.noteTex}),e.renderer.render(a.rollContainer,{renderTexture:a.rollTex}),e.renderer.render(a.mine,{renderTexture:a.mineTex})}static setNoteTex(e,o,n){if(o===void 0)return i.WHITE;if(o.type=="Mine")e.texture=this.mineTex;else{const s=c.indexOf(n)*96;e.texture=new i(this.noteTex.baseTexture,new g(s,0,96,96))}}static setRollTex(e,o){const n=c.indexOf(o)*96;e.texture=new i(this.rollTex.baseTexture,new g(n,0,96,96))}}const W="/smeditor/assets/receptors-5a0beefb.png",z="/smeditor/assets/flash-d0eff0a1.png",J="/smeditor/assets/mine-590d445e.png",Q="/smeditor/assets/press-55cccb8c.png",q=d(i.from(z),5,1,128,128)[0],G=i.from(J),C=d(i.from(Q),5,2,96,96),K=["w0","w1","w2","w3"];class X extends f{press;pressAnim;hitContainer=new f;tap;note;flash;hitAnim;anims=new Set;constructor(e,o,n){super();const s=1/1.5;this.press=new l(C[1][_.indexOf(o)]),this.press.alpha=0,this.press.anchor.set(.5),this.tap=new l(C[0][_.indexOf(o)]),this.tap.blendMode=m.ADD,this.tap.scale.set(s),this.tap.anchor.set(.5),this.note=new w(v[o]),this.note.scale.set(s),this.note.blendMode=m.ADD,this.note.animationSpeed=1/3,this.note.play(),this.note.anchor.set(.5),this.flash=new w(q),this.flash.scale.set(2),this.flash.blendMode=m.ADD,this.flash.animationSpeed=1/3,this.flash.loop=!1,this.flash.visible=!1,this.flash.anchor.set(.5),this.flash.onComplete=()=>{this.flash.visible=!1,this.flash.stop()},this.hitContainer.alpha=0,this.hitContainer.addChild(this.tap,this.note),e.on(this,"ghosttap",r=>{n==r.columnNumber&&(p.finish(this.pressAnim),this.pressAnim=p.animate(this.press,{0:{alpha:1,"scale.x":1*s,"scale.y":1*s},1:{alpha:0,"scale.x":1.3*s,"scale.y":1.3*s}},.25))}),e.on(this,"hit",r=>{if(n==r.columnNumber){if(!K.includes(r.judgement.id))return;p.finish(this.pressAnim),p.finish(this.hitAnim),this.hitAnim=p.animate(this.hitContainer,{0:{alpha:1,"scale.x":1,"scale.y":1},1:{alpha:0,"scale.x":1.2,"scale.y":1.2}},.4),this.flash.visible=!0,this.flash.currentFrame=0,this.flash.play()}}),e.on(this,"hitmine",r=>{if(n==r.columnNumber){const h=new l(G);h.alpha=0,h.anchor.set(.5),h.blendMode=m.ADD,this.addChild(h),p.animate(h,{0:{alpha:1,rotation:0},"0.5":{alpha:1,rotation:90*Math.PI/180},1:{alpha:0,rotation:180*Math.PI/180}},.4,void 0,()=>h.destroy())}}),this.addChild(this.press,this.hitContainer,this.flash)}}const A=d(i.from(W),5,2,96,96),_=["DownLeft","UpLeft","Center","UpRight","DownRight"],b={},x=96;for(const t of _){const e=i.from(new URL(Object.assign({"./hold/Center.png":L,"./hold/DownLeft.png":B,"./hold/DownRight.png":y,"./hold/UpLeft.png":M,"./hold/UpRight.png":O})[`./hold/${t}.png`],self.location).href),o=[],n=[];for(let s=0;s<6;s++)o.push(new i(e.baseTexture,new g(s*96,0,96,288-x))),n.push(new i(e.baseTexture,new g(s*96,288-x,96,x)));b[t]={body:o,cap:n}}const se={elements:{DownLeft:{Receptor:t=>{const e=new f,o=_.indexOf(t.columnName),n=new l(A[0][o]);n.width=72,n.height=72,n.anchor.set(.5);const s=new l(A[1][o]);return s.width=n.width,s.height=n.height,s.anchor.set(.5),s.blendMode=m.ADD,e.addChild(n,s),t.noteskin.onUpdate(e,r=>{const R=(r.getVisualBeat()%1+1)%1;s.alpha=(1-R)/2}),e},Tap:t=>{const e=new l(i.WHITE);return a.setNoteTex(e,t.note,t.columnName),e.anchor.set(.5),e.width=72,e.height=72,e},Fake:{element:"Tap"},Lift:{element:"Tap"},Mine:{element:"Tap"},NoteFlash:t=>new X(t.noteskin,t.columnName,t.columnNumber),"Hold Active Head":{element:"Tap"},"Hold Inactive Head":{element:"Tap"},"Hold Active Body":t=>{const e=new H(b[t.columnName].body,72);return t.noteskin.onUpdate(e,o=>{const n=o.getVisualTime(),s=Math.floor((n%.3+.3)%.3/.3*6);e.currentFrame=s}),e},"Hold Inactive Body":{element:"Hold Active Body"},"Hold Active TopCap":()=>new l(i.EMPTY),"Hold Inactive TopCap":()=>new l(i.EMPTY),"Hold Active BottomCap":t=>{const e=new U(b[t.columnName].cap,72);return t.noteskin.onUpdate(e,o=>{const n=o.getVisualTime(),s=Math.floor((n%.3+.3)%.3/.3*6);e.currentFrame=s}),e},"Hold Inactive BottomCap":{element:"Hold Active BottomCap"},"Roll Active Head":t=>{const e=new l(i.WHITE);return a.setRollTex(e,t.columnName),e.anchor.set(.5),e.width=72,e.height=72,e},"Roll Inactive Head":{element:"Roll Active Head"},"Roll Active Body":{element:"Hold Active Body"},"Roll Inactive Body":{element:"Hold Active Body"},"Roll Active TopCap":()=>new l(i.EMPTY),"Roll Inactive TopCap":()=>new l(i.EMPTY),"Roll Active BottomCap":{element:"Hold Active BottomCap"},"Roll Inactive BottomCap":{element:"Hold Active BottomCap"}}},load:function(t,e){return t.columnName="DownLeft",this.loadElement(t,e)},init(){a.initArrowTex()},update(t){a.setArrowTexTime(t.chartManager.app)},metrics:{HoldBodyBottomOffset:-36,RollBodyBottomOffset:-36}};export{se as default,_ as texOrder}; +import{a1 as d,w as i,b as f,z as u,O as T,Q as g,P as l,Y as m,V as p,a2 as U}from"./ChartManager-3c3d6f39.js";import{A as w}from"./AnimatedSprite-86b56f12.js";import{A as H}from"./HoldBody-5358344a.js";const L="/smeditor/assets/Center-df4c129b.png",B="/smeditor/assets/DownLeft-63c88ff1.png",y="/smeditor/assets/DownRight-bcd0e463.png",M="/smeditor/assets/UpLeft-ef9a2609.png",O="/smeditor/assets/UpRight-7924deeb.png",I="/smeditor/assets/Center-461a85de.png",E="/smeditor/assets/DownLeft-4943410c.png",S="/smeditor/assets/DownRight-d5c3b98a.png",F="/smeditor/assets/UpLeft-be2bb52b.png",$="/smeditor/assets/UpRight-2e4dc3f1.png",N="/smeditor/assets/Center-274a1642.png",P="/smeditor/assets/DownLeft-15647c81.png",V="/smeditor/assets/DownRight-9aba7559.png",Y="/smeditor/assets/UpLeft-36744666.png",j="/smeditor/assets/UpRight-af6dd110.png",v={},c=["DownLeft","UpLeft","Center","UpRight","DownRight"];for(const t of c)v[t]=d(i.from(new URL(Object.assign({"./tap/Center.png":I,"./tap/DownLeft.png":E,"./tap/DownRight.png":S,"./tap/UpLeft.png":F,"./tap/UpRight.png":$})[`./tap/${t}.png`],self.location).href),3,2,96,96).flat();const D={};for(const t of c)D[t]=d(i.from(new URL(Object.assign({"./roll/Center.png":N,"./roll/DownLeft.png":P,"./roll/DownRight.png":V,"./roll/UpLeft.png":Y,"./roll/UpRight.png":j})[`./roll/${t}.png`],self.location).href),3,2,96,96).flat();const k=d(i.from(new URL("/smeditor/assets/mine-0e34ec01.png",self.location).href),3,2,96,96).flat();class a{static noteTex;static noteContainer=new f;static rollTex;static rollContainer=new f;static mineTex;static mine;static loaded=!1;static async initArrowTex(){if(!this.loaded){a.noteTex=u.create({width:96*5,height:96,resolution:T.performance.resolution}),a.rollTex=u.create({width:96*5,height:96,resolution:T.performance.resolution}),a.mineTex=u.create({width:96,height:96,resolution:T.performance.resolution});for(const e of c)this.createSprite(this.noteContainer,e,v);for(const e of c)this.createSprite(this.rollContainer,e,D);this.mine=new w(k),this.loaded=!0}}static createSprite(e,o,n){const s=c.indexOf(o)*96,r=new w(n[o]);r.x=s,e.addChild(r)}static setArrowTexTime(e){if(!this.loaded)return;const o=e.chartManager.chartView.getVisualTime(),n=Math.floor((o%.3+.3)%.3/.3*6);this.noteContainer.children.forEach(s=>s.currentFrame=n),this.rollContainer.children.forEach(s=>s.currentFrame=n),this.mine.currentFrame=n,e.renderer.render(a.noteContainer,{renderTexture:a.noteTex}),e.renderer.render(a.rollContainer,{renderTexture:a.rollTex}),e.renderer.render(a.mine,{renderTexture:a.mineTex})}static setNoteTex(e,o,n){if(o===void 0)return i.WHITE;if(o.type=="Mine")e.texture=this.mineTex;else{const s=c.indexOf(n)*96;e.texture=new i(this.noteTex.baseTexture,new g(s,0,96,96))}}static setRollTex(e,o){const n=c.indexOf(o)*96;e.texture=new i(this.rollTex.baseTexture,new g(n,0,96,96))}}const W="/smeditor/assets/receptors-5a0beefb.png",z="/smeditor/assets/flash-d0eff0a1.png",J="/smeditor/assets/mine-590d445e.png",Q="/smeditor/assets/press-55cccb8c.png",q=d(i.from(z),5,1,128,128)[0],G=i.from(J),C=d(i.from(Q),5,2,96,96),K=["w0","w1","w2","w3"];class X extends f{press;pressAnim;hitContainer=new f;tap;note;flash;hitAnim;anims=new Set;constructor(e,o,n){super();const s=1/1.5;this.press=new l(C[1][_.indexOf(o)]),this.press.alpha=0,this.press.anchor.set(.5),this.tap=new l(C[0][_.indexOf(o)]),this.tap.blendMode=m.ADD,this.tap.scale.set(s),this.tap.anchor.set(.5),this.note=new w(v[o]),this.note.scale.set(s),this.note.blendMode=m.ADD,this.note.animationSpeed=1/3,this.note.play(),this.note.anchor.set(.5),this.flash=new w(q),this.flash.scale.set(2),this.flash.blendMode=m.ADD,this.flash.animationSpeed=1/3,this.flash.loop=!1,this.flash.visible=!1,this.flash.anchor.set(.5),this.flash.onComplete=()=>{this.flash.visible=!1,this.flash.stop()},this.hitContainer.alpha=0,this.hitContainer.addChild(this.tap,this.note),e.on(this,"ghosttap",r=>{n==r.columnNumber&&(p.finish(this.pressAnim),this.pressAnim=p.animate(this.press,{0:{alpha:1,"scale.x":1*s,"scale.y":1*s},1:{alpha:0,"scale.x":1.3*s,"scale.y":1.3*s}},.25))}),e.on(this,"hit",r=>{if(n==r.columnNumber){if(!K.includes(r.judgement.id))return;p.finish(this.pressAnim),p.finish(this.hitAnim),this.hitAnim=p.animate(this.hitContainer,{0:{alpha:1,"scale.x":1,"scale.y":1},1:{alpha:0,"scale.x":1.2,"scale.y":1.2}},.4),this.flash.visible=!0,this.flash.currentFrame=0,this.flash.play()}}),e.on(this,"hitmine",r=>{if(n==r.columnNumber){const h=new l(G);h.alpha=0,h.anchor.set(.5),h.blendMode=m.ADD,this.addChild(h),p.animate(h,{0:{alpha:1,rotation:0},"0.5":{alpha:1,rotation:90*Math.PI/180},1:{alpha:0,rotation:180*Math.PI/180}},.4,void 0,()=>h.destroy())}}),this.addChild(this.press,this.hitContainer,this.flash)}}const A=d(i.from(W),5,2,96,96),_=["DownLeft","UpLeft","Center","UpRight","DownRight"],b={},x=96;for(const t of _){const e=i.from(new URL(Object.assign({"./hold/Center.png":L,"./hold/DownLeft.png":B,"./hold/DownRight.png":y,"./hold/UpLeft.png":M,"./hold/UpRight.png":O})[`./hold/${t}.png`],self.location).href),o=[],n=[];for(let s=0;s<6;s++)o.push(new i(e.baseTexture,new g(s*96,0,96,288-x))),n.push(new i(e.baseTexture,new g(s*96,288-x,96,x)));b[t]={body:o,cap:n}}const se={elements:{DownLeft:{Receptor:t=>{const e=new f,o=_.indexOf(t.columnName),n=new l(A[0][o]);n.width=72,n.height=72,n.anchor.set(.5);const s=new l(A[1][o]);return s.width=n.width,s.height=n.height,s.anchor.set(.5),s.blendMode=m.ADD,e.addChild(n,s),t.noteskin.onUpdate(e,r=>{const R=(r.getVisualBeat()%1+1)%1;s.alpha=(1-R)/2}),e},Tap:t=>{const e=new l(i.WHITE);return a.setNoteTex(e,t.note,t.columnName),e.anchor.set(.5),e.width=72,e.height=72,e},Fake:{element:"Tap"},Lift:{element:"Tap"},Mine:{element:"Tap"},NoteFlash:t=>new X(t.noteskin,t.columnName,t.columnNumber),"Hold Active Head":{element:"Tap"},"Hold Inactive Head":{element:"Tap"},"Hold Active Body":t=>{const e=new H(b[t.columnName].body,72);return t.noteskin.onUpdate(e,o=>{const n=o.getVisualTime(),s=Math.floor((n%.3+.3)%.3/.3*6);e.currentFrame=s}),e},"Hold Inactive Body":{element:"Hold Active Body"},"Hold Active TopCap":()=>new l(i.EMPTY),"Hold Inactive TopCap":()=>new l(i.EMPTY),"Hold Active BottomCap":t=>{const e=new U(b[t.columnName].cap,72);return t.noteskin.onUpdate(e,o=>{const n=o.getVisualTime(),s=Math.floor((n%.3+.3)%.3/.3*6);e.currentFrame=s}),e},"Hold Inactive BottomCap":{element:"Hold Active BottomCap"},"Roll Active Head":t=>{const e=new l(i.WHITE);return a.setRollTex(e,t.columnName),e.anchor.set(.5),e.width=72,e.height=72,e},"Roll Inactive Head":{element:"Roll Active Head"},"Roll Active Body":{element:"Hold Active Body"},"Roll Inactive Body":{element:"Hold Active Body"},"Roll Active TopCap":()=>new l(i.EMPTY),"Roll Inactive TopCap":()=>new l(i.EMPTY),"Roll Active BottomCap":{element:"Hold Active BottomCap"},"Roll Inactive BottomCap":{element:"Hold Active BottomCap"}}},load:function(t,e){return t.columnName="DownLeft",this.loadElement(t,e)},init(){a.initArrowTex()},update(t){a.setArrowTexTime(t.chartManager.app)},metrics:{HoldBodyBottomOffset:-36,RollBodyBottomOffset:-36}};export{se as default,_ as texOrder}; diff --git a/app.js b/app.js index f5df9269..3d5f5a9e 100644 --- a/app.js +++ b/app.js @@ -1,21 +1,4 @@ -import{g as H0,_ as Mt,F as J,M as zt,K as qt,a as V0,I as jt,W as Ut,G as Gt,N as Ht,O as K,E as ae,T as le,t as Vt,e as ju,l as Wt,C as Je,b as Zt,R as Xt,c as Yt,D as Qe,U as Kt,B as Jt,d as Qt,A as u0,i as ur,f as e0,h as er,j as t0,k as tr,m as rr,n as nr,o as ir,p as r0,q as cr,r as or,s as sr}from"./ChartManager-f20da8bc.js";var we={exports:{}};const ar="2.0.0",W0=256,lr=Number.MAX_SAFE_INTEGER||9007199254740991,fr=16,dr=W0-6,hr=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var Ju={MAX_LENGTH:W0,MAX_SAFE_COMPONENT_LENGTH:fr,MAX_SAFE_BUILD_LENGTH:dr,MAX_SAFE_INTEGER:lr,RELEASE_TYPES:hr,SEMVER_SPEC_VERSION:ar,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};const pr=typeof process=="object"&&process.env&&{}.NODE_DEBUG&&/\bsemver\b/i.test({}.NODE_DEBUG)?(...u)=>console.error("SEMVER",...u):()=>{};var Qu=pr;(function(u,e){const{MAX_SAFE_COMPONENT_LENGTH:t,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:n}=Ju,i=Qu;e=u.exports={};const c=e.re=[],o=e.safeRe=[],s=e.src=[],a=e.t={};let f=0;const h="[a-zA-Z0-9-]",x=[["\\s",1],["\\d",n],[h,r]],b=$=>{for(const[R,N]of x)$=$.split(`${R}*`).join(`${R}{0,${N}}`).split(`${R}+`).join(`${R}{1,${N}}`);return $},p=($,R,N)=>{const F=b(R),k=f++;i($,k,R),a[$]=k,s[k]=R,c[k]=new RegExp(R,N?"g":void 0),o[k]=new RegExp(F,N?"g":void 0)};p("NUMERICIDENTIFIER","0|[1-9]\\d*"),p("NUMERICIDENTIFIERLOOSE","\\d+"),p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${h}*`),p("MAINVERSION",`(${s[a.NUMERICIDENTIFIER]})\\.(${s[a.NUMERICIDENTIFIER]})\\.(${s[a.NUMERICIDENTIFIER]})`),p("MAINVERSIONLOOSE",`(${s[a.NUMERICIDENTIFIERLOOSE]})\\.(${s[a.NUMERICIDENTIFIERLOOSE]})\\.(${s[a.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASEIDENTIFIER",`(?:${s[a.NUMERICIDENTIFIER]}|${s[a.NONNUMERICIDENTIFIER]})`),p("PRERELEASEIDENTIFIERLOOSE",`(?:${s[a.NUMERICIDENTIFIERLOOSE]}|${s[a.NONNUMERICIDENTIFIER]})`),p("PRERELEASE",`(?:-(${s[a.PRERELEASEIDENTIFIER]}(?:\\.${s[a.PRERELEASEIDENTIFIER]})*))`),p("PRERELEASELOOSE",`(?:-?(${s[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${s[a.PRERELEASEIDENTIFIERLOOSE]})*))`),p("BUILDIDENTIFIER",`${h}+`),p("BUILD",`(?:\\+(${s[a.BUILDIDENTIFIER]}(?:\\.${s[a.BUILDIDENTIFIER]})*))`),p("FULLPLAIN",`v?${s[a.MAINVERSION]}${s[a.PRERELEASE]}?${s[a.BUILD]}?`),p("FULL",`^${s[a.FULLPLAIN]}$`),p("LOOSEPLAIN",`[v=\\s]*${s[a.MAINVERSIONLOOSE]}${s[a.PRERELEASELOOSE]}?${s[a.BUILD]}?`),p("LOOSE",`^${s[a.LOOSEPLAIN]}$`),p("GTLT","((?:<|>)?=?)"),p("XRANGEIDENTIFIERLOOSE",`${s[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),p("XRANGEIDENTIFIER",`${s[a.NUMERICIDENTIFIER]}|x|X|\\*`),p("XRANGEPLAIN",`[v=\\s]*(${s[a.XRANGEIDENTIFIER]})(?:\\.(${s[a.XRANGEIDENTIFIER]})(?:\\.(${s[a.XRANGEIDENTIFIER]})(?:${s[a.PRERELEASE]})?${s[a.BUILD]}?)?)?`),p("XRANGEPLAINLOOSE",`[v=\\s]*(${s[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[a.XRANGEIDENTIFIERLOOSE]})(?:${s[a.PRERELEASELOOSE]})?${s[a.BUILD]}?)?)?`),p("XRANGE",`^${s[a.GTLT]}\\s*${s[a.XRANGEPLAIN]}$`),p("XRANGELOOSE",`^${s[a.GTLT]}\\s*${s[a.XRANGEPLAINLOOSE]}$`),p("COERCEPLAIN",`(^|[^\\d])(\\d{1,${t}})(?:\\.(\\d{1,${t}}))?(?:\\.(\\d{1,${t}}))?`),p("COERCE",`${s[a.COERCEPLAIN]}(?:$|[^\\d])`),p("COERCEFULL",s[a.COERCEPLAIN]+`(?:${s[a.PRERELEASE]})?(?:${s[a.BUILD]})?(?:$|[^\\d])`),p("COERCERTL",s[a.COERCE],!0),p("COERCERTLFULL",s[a.COERCEFULL],!0),p("LONETILDE","(?:~>?)"),p("TILDETRIM",`(\\s*)${s[a.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",p("TILDE",`^${s[a.LONETILDE]}${s[a.XRANGEPLAIN]}$`),p("TILDELOOSE",`^${s[a.LONETILDE]}${s[a.XRANGEPLAINLOOSE]}$`),p("LONECARET","(?:\\^)"),p("CARETTRIM",`(\\s*)${s[a.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",p("CARET",`^${s[a.LONECARET]}${s[a.XRANGEPLAIN]}$`),p("CARETLOOSE",`^${s[a.LONECARET]}${s[a.XRANGEPLAINLOOSE]}$`),p("COMPARATORLOOSE",`^${s[a.GTLT]}\\s*(${s[a.LOOSEPLAIN]})$|^$`),p("COMPARATOR",`^${s[a.GTLT]}\\s*(${s[a.FULLPLAIN]})$|^$`),p("COMPARATORTRIM",`(\\s*)${s[a.GTLT]}\\s*(${s[a.LOOSEPLAIN]}|${s[a.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",p("HYPHENRANGE",`^\\s*(${s[a.XRANGEPLAIN]})\\s+-\\s+(${s[a.XRANGEPLAIN]})\\s*$`),p("HYPHENRANGELOOSE",`^\\s*(${s[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${s[a.XRANGEPLAINLOOSE]})\\s*$`),p("STAR","(<|>)?=?\\s*\\*"),p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(we,we.exports);var Pu=we.exports;const br=Object.freeze({loose:!0}),mr=Object.freeze({}),xr=u=>u?typeof u!="object"?br:u:mr;var Fe=xr;const n0=/^[0-9]+$/,Z0=(u,e)=>{const t=n0.test(u),r=n0.test(e);return t&&r&&(u=+u,e=+e),u===e?0:t&&!r?-1:r&&!t?1:uZ0(e,u);var X0={compareIdentifiers:Z0,rcompareIdentifiers:_r};const Uu=Qu,{MAX_LENGTH:i0,MAX_SAFE_INTEGER:Gu}=Ju,{safeRe:c0,t:o0}=Pu,gr=Fe,{compareIdentifiers:Au}=X0;let Er=class lu{constructor(e,t){if(t=gr(t),e instanceof lu){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>i0)throw new TypeError(`version is longer than ${i0} characters`);Uu("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?c0[o0.LOOSE]:c0[o0.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>Gu||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Gu||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Gu||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(n=>{if(/^[0-9]+$/.test(n)){const i=+n;if(i>=0&&i=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(t===this.prerelease.join(".")&&r===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(n)}}if(t){let i=[t,n];r===!1&&(i=[t]),Au(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var uu=Er;const s0=uu,kr=(u,e,t=!1)=>{if(u instanceof s0)return u;try{return new s0(u,e)}catch(r){if(!t)return null;throw r}};var $u=kr;const Cr=$u,wr=(u,e)=>{const t=Cr(u,e);return t?t.version:null};var yr=wr;const Ar=$u,Dr=(u,e)=>{const t=Ar(u.trim().replace(/^[=v]+/,""),e);return t?t.version:null};var Fr=Dr;const a0=uu,vr=(u,e,t,r,n)=>{typeof t=="string"&&(n=r,r=t,t=void 0);try{return new a0(u instanceof a0?u.version:u,t).inc(e,r,n).version}catch{return null}};var Sr=vr;const l0=$u,$r=(u,e)=>{const t=l0(u,null,!0),r=l0(e,null,!0),n=t.compare(r);if(n===0)return null;const i=n>0,c=i?t:r,o=i?r:t,s=!!c.prerelease.length;if(!!o.prerelease.length&&!s)return!o.patch&&!o.minor?"major":c.patch?"patch":c.minor?"minor":"major";const f=s?"pre":"";return t.major!==r.major?f+"major":t.minor!==r.minor?f+"minor":t.patch!==r.patch?f+"patch":"prerelease"};var Rr=$r;const Ir=uu,Tr=(u,e)=>new Ir(u,e).major;var Lr=Tr;const Nr=uu,Or=(u,e)=>new Nr(u,e).minor;var Pr=Or;const Br=uu,Mr=(u,e)=>new Br(u,e).patch;var zr=Mr;const qr=$u,jr=(u,e)=>{const t=qr(u,e);return t&&t.prerelease.length?t.prerelease:null};var Ur=jr;const f0=uu,Gr=(u,e,t)=>new f0(u,t).compare(new f0(e,t));var cu=Gr;const Hr=cu,Vr=(u,e,t)=>Hr(e,u,t);var Wr=Vr;const Zr=cu,Xr=(u,e)=>Zr(u,e,!0);var Yr=Xr;const d0=uu,Kr=(u,e,t)=>{const r=new d0(u,t),n=new d0(e,t);return r.compare(n)||r.compareBuild(n)};var ve=Kr;const Jr=ve,Qr=(u,e)=>u.sort((t,r)=>Jr(t,r,e));var un=Qr;const en=ve,tn=(u,e)=>u.sort((t,r)=>en(r,t,e));var rn=tn;const nn=cu,cn=(u,e,t)=>nn(u,e,t)>0;var ue=cn;const on=cu,sn=(u,e,t)=>on(u,e,t)<0;var Se=sn;const an=cu,ln=(u,e,t)=>an(u,e,t)===0;var Y0=ln;const fn=cu,dn=(u,e,t)=>fn(u,e,t)!==0;var K0=dn;const hn=cu,pn=(u,e,t)=>hn(u,e,t)>=0;var $e=pn;const bn=cu,mn=(u,e,t)=>bn(u,e,t)<=0;var Re=mn;const xn=Y0,_n=K0,gn=ue,En=$e,kn=Se,Cn=Re,wn=(u,e,t,r)=>{switch(e){case"===":return typeof u=="object"&&(u=u.version),typeof t=="object"&&(t=t.version),u===t;case"!==":return typeof u=="object"&&(u=u.version),typeof t=="object"&&(t=t.version),u!==t;case"":case"=":case"==":return xn(u,t,r);case"!=":return _n(u,t,r);case">":return gn(u,t,r);case">=":return En(u,t,r);case"<":return kn(u,t,r);case"<=":return Cn(u,t,r);default:throw new TypeError(`Invalid operator: ${e}`)}};var J0=wn;const yn=uu,An=$u,{safeRe:Hu,t:Vu}=Pu,Dn=(u,e)=>{if(u instanceof yn)return u;if(typeof u=="number"&&(u=String(u)),typeof u!="string")return null;e=e||{};let t=null;if(!e.rtl)t=u.match(e.includePrerelease?Hu[Vu.COERCEFULL]:Hu[Vu.COERCE]);else{const s=e.includePrerelease?Hu[Vu.COERCERTLFULL]:Hu[Vu.COERCERTL];let a;for(;(a=s.exec(u))&&(!t||t.index+t[0].length!==u.length);)(!t||a.index+a[0].length!==t.index+t[0].length)&&(t=a),s.lastIndex=a.index+a[1].length+a[2].length;s.lastIndex=-1}if(t===null)return null;const r=t[2],n=t[3]||"0",i=t[4]||"0",c=e.includePrerelease&&t[5]?`-${t[5]}`:"",o=e.includePrerelease&&t[6]?`+${t[6]}`:"";return An(`${r}.${n}.${i}${c}${o}`,e)};var Fn=Dn;class vn{constructor(){this.max=1e3,this.map=new Map}get(e){const t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){const n=this.map.keys().next().value;this.delete(n)}this.map.set(e,t)}return this}}var Sn=vn,fe,h0;function ou(){if(h0)return fe;h0=1;const u=/\s+/g;class e{constructor(g,v){if(v=n(v),g instanceof e)return g.loose===!!v.loose&&g.includePrerelease===!!v.includePrerelease?g:new e(g.raw,v);if(g instanceof i)return this.raw=g.value,this.set=[[g]],this.formatted=void 0,this;if(this.options=v,this.loose=!!v.loose,this.includePrerelease=!!v.includePrerelease,this.raw=g.trim().replace(u," "),this.set=this.raw.split("||").map(y=>this.parseRange(y.trim())).filter(y=>y.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const y=this.set[0];if(this.set=this.set.filter(S=>!$(S[0])),this.set.length===0)this.set=[y];else if(this.set.length>1){for(const S of this.set)if(S.length===1&&R(S[0])){this.set=[S];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let g=0;g0&&(this.formatted+="||");const v=this.set[g];for(let y=0;y0&&(this.formatted+=" "),this.formatted+=v[y].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(g){const y=((this.options.includePrerelease&&b)|(this.options.loose&&p))+":"+g,S=r.get(y);if(S)return S;const A=this.options.loose,L=A?s[a.HYPHENRANGELOOSE]:s[a.HYPHENRANGE];g=g.replace(L,wu(this.options.includePrerelease)),c("hyphen replace",g),g=g.replace(s[a.COMPARATORTRIM],f),c("comparator trim",g),g=g.replace(s[a.TILDETRIM],h),c("tilde trim",g),g=g.replace(s[a.CARETTRIM],x),c("caret trim",g);let B=g.split(" ").map(G=>F(G,this.options)).join(" ").split(/\s+/).map(G=>ku(G,this.options));A&&(B=B.filter(G=>(c("loose invalid filter",G,this.options),!!G.match(s[a.COMPARATORLOOSE])))),c("range list",B);const O=new Map,j=B.map(G=>new i(G,this.options));for(const G of j){if($(G))return[G];O.set(G.value,G)}O.size>1&&O.has("")&&O.delete("");const Y=[...O.values()];return r.set(y,Y),Y}intersects(g,v){if(!(g instanceof e))throw new TypeError("a Range is required");return this.set.some(y=>N(y,v)&&g.set.some(S=>N(S,v)&&y.every(A=>S.every(L=>A.intersects(L,v)))))}test(g){if(!g)return!1;if(typeof g=="string")try{g=new o(g,this.options)}catch{return!1}for(let v=0;vC.value==="<0.0.0-0",R=C=>C.value==="",N=(C,g)=>{let v=!0;const y=C.slice();let S=y.pop();for(;v&&y.length;)v=y.every(A=>S.intersects(A,g)),S=y.pop();return v},F=(C,g)=>(c("comp",C,g),C=P(C,g),c("caret",C),C=w(C,g),c("tildes",C),C=X(C,g),c("xrange",C),C=bu(C,g),c("stars",C),C),k=C=>!C||C.toLowerCase()==="x"||C==="*",w=(C,g)=>C.trim().split(/\s+/).map(v=>T(v,g)).join(" "),T=(C,g)=>{const v=g.loose?s[a.TILDELOOSE]:s[a.TILDE];return C.replace(v,(y,S,A,L,B)=>{c("tilde",C,y,S,A,L,B);let O;return k(S)?O="":k(A)?O=`>=${S}.0.0 <${+S+1}.0.0-0`:k(L)?O=`>=${S}.${A}.0 <${S}.${+A+1}.0-0`:B?(c("replaceTilde pr",B),O=`>=${S}.${A}.${L}-${B} <${S}.${+A+1}.0-0`):O=`>=${S}.${A}.${L} <${S}.${+A+1}.0-0`,c("tilde return",O),O})},P=(C,g)=>C.trim().split(/\s+/).map(v=>M(v,g)).join(" "),M=(C,g)=>{c("caret",C,g);const v=g.loose?s[a.CARETLOOSE]:s[a.CARET],y=g.includePrerelease?"-0":"";return C.replace(v,(S,A,L,B,O)=>{c("caret",C,S,A,L,B,O);let j;return k(A)?j="":k(L)?j=`>=${A}.0.0${y} <${+A+1}.0.0-0`:k(B)?A==="0"?j=`>=${A}.${L}.0${y} <${A}.${+L+1}.0-0`:j=`>=${A}.${L}.0${y} <${+A+1}.0.0-0`:O?(c("replaceCaret pr",O),A==="0"?L==="0"?j=`>=${A}.${L}.${B}-${O} <${A}.${L}.${+B+1}-0`:j=`>=${A}.${L}.${B}-${O} <${A}.${+L+1}.0-0`:j=`>=${A}.${L}.${B}-${O} <${+A+1}.0.0-0`):(c("no pr"),A==="0"?L==="0"?j=`>=${A}.${L}.${B}${y} <${A}.${L}.${+B+1}-0`:j=`>=${A}.${L}.${B}${y} <${A}.${+L+1}.0-0`:j=`>=${A}.${L}.${B} <${+A+1}.0.0-0`),c("caret return",j),j})},X=(C,g)=>(c("replaceXRanges",C,g),C.split(/\s+/).map(v=>ru(v,g)).join(" ")),ru=(C,g)=>{C=C.trim();const v=g.loose?s[a.XRANGELOOSE]:s[a.XRANGE];return C.replace(v,(y,S,A,L,B,O)=>{c("xRange",C,y,S,A,L,B,O);const j=k(A),Y=j||k(L),G=Y||k(B),Cu=G;return S==="="&&Cu&&(S=""),O=g.includePrerelease?"-0":"",j?S===">"||S==="<"?y="<0.0.0-0":y="*":S&&Cu?(Y&&(L=0),B=0,S===">"?(S=">=",Y?(A=+A+1,L=0,B=0):(L=+L+1,B=0)):S==="<="&&(S="<",Y?A=+A+1:L=+L+1),S==="<"&&(O="-0"),y=`${S+A}.${L}.${B}${O}`):Y?y=`>=${A}.0.0${O} <${+A+1}.0.0-0`:G&&(y=`>=${A}.${L}.0${O} <${A}.${+L+1}.0-0`),c("xRange return",y),y})},bu=(C,g)=>(c("replaceStars",C,g),C.trim().replace(s[a.STAR],"")),ku=(C,g)=>(c("replaceGTE0",C,g),C.trim().replace(s[g.includePrerelease?a.GTE0PRE:a.GTE0],"")),wu=C=>(g,v,y,S,A,L,B,O,j,Y,G,Cu)=>(k(y)?v="":k(S)?v=`>=${y}.0.0${C?"-0":""}`:k(A)?v=`>=${y}.${S}.0${C?"-0":""}`:L?v=`>=${v}`:v=`>=${v}${C?"-0":""}`,k(j)?O="":k(Y)?O=`<${+j+1}.0.0-0`:k(G)?O=`<${j}.${+Y+1}.0-0`:Cu?O=`<=${j}.${Y}.${G}-${Cu}`:C?O=`<${j}.${Y}.${+G+1}-0`:O=`<=${O}`,`${v} ${O}`.trim()),au=(C,g,v)=>{for(let y=0;y0){const S=C[y].semver;if(S.major===g.major&&S.minor===g.minor&&S.patch===g.patch)return!0}return!1}return!0};return fe}var de,p0;function ee(){if(p0)return de;p0=1;const u=Symbol("SemVer ANY");class e{static get ANY(){return u}constructor(f,h){if(h=t(h),f instanceof e){if(f.loose===!!h.loose)return f;f=f.value}f=f.trim().split(/\s+/).join(" "),c("comparator",f,h),this.options=h,this.loose=!!h.loose,this.parse(f),this.semver===u?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(f){const h=this.options.loose?r[n.COMPARATORLOOSE]:r[n.COMPARATOR],x=f.match(h);if(!x)throw new TypeError(`Invalid comparator: ${f}`);this.operator=x[1]!==void 0?x[1]:"",this.operator==="="&&(this.operator=""),x[2]?this.semver=new o(x[2],this.options.loose):this.semver=u}toString(){return this.value}test(f){if(c("Comparator.test",f,this.options.loose),this.semver===u||f===u)return!0;if(typeof f=="string")try{f=new o(f,this.options)}catch{return!1}return i(f,this.operator,this.semver,this.options)}intersects(f,h){if(!(f instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new s(f.value,h).test(this.value):f.operator===""?f.value===""?!0:new s(this.value,h).test(f.semver):(h=t(h),h.includePrerelease&&(this.value==="<0.0.0-0"||f.value==="<0.0.0-0")||!h.includePrerelease&&(this.value.startsWith("<0.0.0")||f.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&f.operator.startsWith(">")||this.operator.startsWith("<")&&f.operator.startsWith("<")||this.semver.version===f.semver.version&&this.operator.includes("=")&&f.operator.includes("=")||i(this.semver,"<",f.semver,h)&&this.operator.startsWith(">")&&f.operator.startsWith("<")||i(this.semver,">",f.semver,h)&&this.operator.startsWith("<")&&f.operator.startsWith(">")))}}de=e;const t=Fe,{safeRe:r,t:n}=Pu,i=J0,c=Qu,o=uu,s=ou();return de}const $n=ou(),Rn=(u,e,t)=>{try{e=new $n(e,t)}catch{return!1}return e.test(u)};var te=Rn;const In=ou(),Tn=(u,e)=>new In(u,e).set.map(t=>t.map(r=>r.value).join(" ").trim().split(" "));var Ln=Tn;const Nn=uu,On=ou(),Pn=(u,e,t)=>{let r=null,n=null,i=null;try{i=new On(e,t)}catch{return null}return u.forEach(c=>{i.test(c)&&(!r||n.compare(c)===-1)&&(r=c,n=new Nn(r,t))}),r};var Bn=Pn;const Mn=uu,zn=ou(),qn=(u,e,t)=>{let r=null,n=null,i=null;try{i=new zn(e,t)}catch{return null}return u.forEach(c=>{i.test(c)&&(!r||n.compare(c)===1)&&(r=c,n=new Mn(r,t))}),r};var jn=qn;const he=uu,Un=ou(),b0=ue,Gn=(u,e)=>{u=new Un(u,e);let t=new he("0.0.0");if(u.test(t)||(t=new he("0.0.0-0"),u.test(t)))return t;t=null;for(let r=0;r{const o=new he(c.semver.version);switch(c.operator){case">":o.prerelease.length===0?o.patch++:o.prerelease.push(0),o.raw=o.format();case"":case">=":(!i||b0(o,i))&&(i=o);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${c.operator}`)}}),i&&(!t||b0(t,i))&&(t=i)}return t&&u.test(t)?t:null};var Hn=Gn;const Vn=ou(),Wn=(u,e)=>{try{return new Vn(u,e).range||"*"}catch{return null}};var Zn=Wn;const Xn=uu,Q0=ee(),{ANY:Yn}=Q0,Kn=ou(),Jn=te,m0=ue,x0=Se,Qn=Re,ui=$e,ei=(u,e,t,r)=>{u=new Xn(u,r),e=new Kn(e,r);let n,i,c,o,s;switch(t){case">":n=m0,i=Qn,c=x0,o=">",s=">=";break;case"<":n=x0,i=ui,c=m0,o="<",s="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Jn(u,e,r))return!1;for(let a=0;a{b.semver===Yn&&(b=new Q0(">=0.0.0")),h=h||b,x=x||b,n(b.semver,h.semver,r)?h=b:c(b.semver,x.semver,r)&&(x=b)}),h.operator===o||h.operator===s||(!x.operator||x.operator===o)&&i(u,x.semver))return!1;if(x.operator===s&&c(u,x.semver))return!1}return!0};var Ie=ei;const ti=Ie,ri=(u,e,t)=>ti(u,e,">",t);var ni=ri;const ii=Ie,ci=(u,e,t)=>ii(u,e,"<",t);var oi=ci;const _0=ou(),si=(u,e,t)=>(u=new _0(u,t),e=new _0(e,t),u.intersects(e,t));var ai=si;const li=te,fi=cu;var di=(u,e,t)=>{const r=[];let n=null,i=null;const c=u.sort((f,h)=>fi(f,h,t));for(const f of c)li(f,e,t)?(i=f,n||(n=f)):(i&&r.push([n,i]),i=null,n=null);n&&r.push([n,null]);const o=[];for(const[f,h]of r)f===h?o.push(f):!h&&f===c[0]?o.push("*"):h?f===c[0]?o.push(`<=${h}`):o.push(`${f} - ${h}`):o.push(`>=${f}`);const s=o.join(" || "),a=typeof e.raw=="string"?e.raw:String(e);return s.length{if(u===e)return!0;u=new g0(u,t),e=new g0(e,t);let r=!1;u:for(const n of u.set){for(const i of e.set){const c=bi(n,i,t);if(r=r||c!==null,c)continue u}if(r)return!1}return!0},pi=[new Te(">=0.0.0-0")],E0=[new Te(">=0.0.0")],bi=(u,e,t)=>{if(u===e)return!0;if(u.length===1&&u[0].semver===pe){if(e.length===1&&e[0].semver===pe)return!0;t.includePrerelease?u=pi:u=E0}if(e.length===1&&e[0].semver===pe){if(t.includePrerelease)return!0;e=E0}const r=new Set;let n,i;for(const b of u)b.operator===">"||b.operator===">="?n=k0(n,b,t):b.operator==="<"||b.operator==="<="?i=C0(i,b,t):r.add(b.semver);if(r.size>1)return null;let c;if(n&&i){if(c=Le(n.semver,i.semver,t),c>0)return null;if(c===0&&(n.operator!==">="||i.operator!=="<="))return null}for(const b of r){if(n&&!Iu(b,String(n),t)||i&&!Iu(b,String(i),t))return null;for(const p of e)if(!Iu(b,String(p),t))return!1;return!0}let o,s,a,f,h=i&&!t.includePrerelease&&i.semver.prerelease.length?i.semver:!1,x=n&&!t.includePrerelease&&n.semver.prerelease.length?n.semver:!1;h&&h.prerelease.length===1&&i.operator==="<"&&h.prerelease[0]===0&&(h=!1);for(const b of e){if(f=f||b.operator===">"||b.operator===">=",a=a||b.operator==="<"||b.operator==="<=",n){if(x&&b.semver.prerelease&&b.semver.prerelease.length&&b.semver.major===x.major&&b.semver.minor===x.minor&&b.semver.patch===x.patch&&(x=!1),b.operator===">"||b.operator===">="){if(o=k0(n,b,t),o===b&&o!==n)return!1}else if(n.operator===">="&&!Iu(n.semver,String(b),t))return!1}if(i){if(h&&b.semver.prerelease&&b.semver.prerelease.length&&b.semver.major===h.major&&b.semver.minor===h.minor&&b.semver.patch===h.patch&&(h=!1),b.operator==="<"||b.operator==="<="){if(s=C0(i,b,t),s===b&&s!==i)return!1}else if(i.operator==="<="&&!Iu(i.semver,String(b),t))return!1}if(!b.operator&&(i||n)&&c!==0)return!1}return!(n&&a&&!i&&c!==0||i&&f&&!n&&c!==0||x||h)},k0=(u,e,t)=>{if(!u)return e;const r=Le(u.semver,e.semver,t);return r>0?u:r<0||e.operator===">"&&u.operator===">="?e:u},C0=(u,e,t)=>{if(!u)return e;const r=Le(u.semver,e.semver,t);return r<0?u:r>0||e.operator==="<"&&u.operator==="<="?e:u};var mi=hi;const be=Pu,w0=Ju,xi=uu,y0=X0,_i=$u,gi=yr,Ei=Fr,ki=Sr,Ci=Rr,wi=Lr,yi=Pr,Ai=zr,Di=Ur,Fi=cu,vi=Wr,Si=Yr,$i=ve,Ri=un,Ii=rn,Ti=ue,Li=Se,Ni=Y0,Oi=K0,Pi=$e,Bi=Re,Mi=J0,zi=Fn,qi=ee(),ji=ou(),Ui=te,Gi=Ln,Hi=Bn,Vi=jn,Wi=Hn,Zi=Zn,Xi=Ie,Yi=ni,Ki=oi,Ji=ai,Qi=di,uc=mi;var ec={parse:_i,valid:gi,clean:Ei,inc:ki,diff:Ci,major:wi,minor:yi,patch:Ai,prerelease:Di,compare:Fi,rcompare:vi,compareLoose:Si,compareBuild:$i,sort:Ri,rsort:Ii,gt:Ti,lt:Li,eq:Ni,neq:Oi,gte:Pi,lte:Bi,cmp:Mi,coerce:zi,Comparator:qi,Range:ji,satisfies:Ui,toComparators:Gi,maxSatisfying:Hi,minSatisfying:Vi,minVersion:Wi,validRange:Zi,outside:Xi,gtr:Yi,ltr:Ki,intersects:Ji,simplifyRange:Qi,subset:uc,SemVer:xi,re:be.re,src:be.src,tokens:be.t,SEMVER_SPEC_VERSION:w0.SEMVER_SPEC_VERSION,RELEASE_TYPES:w0.RELEASE_TYPES,compareIdentifiers:y0.compareIdentifiers,rcompareIdentifiers:y0.rcompareIdentifiers};const A0=H0(ec);function tc(u={}){const{immediate:e=!1,onNeedRefresh:t,onOfflineReady:r,onRegistered:n,onRegisteredSW:i,onRegisterError:c}=u;let o,s;const a=async(h=!0)=>{await s};async function f(){if("serviceWorker"in navigator){const{Workbox:h}=await Mt(()=>import("./workbox-window.prod.es5-c46a1faa.js"),[]);o=new h("/smeditor/sw.js",{scope:"/smeditor/",type:"classic"}),o.addEventListener("activated",x=>{(x.isUpdate||x.isExternal)&&window.location.reload()}),o.addEventListener("installed",x=>{x.isUpdate||r?.()}),o.register({immediate:e}).then(x=>{i?i("/smeditor/sw.js",x):n?.(x)}).catch(x=>{c?.(x)})}}return s=f(),a}var ut={exports:{}};(function(u){(function(){function e(l,d,_){return l.call.apply(l.bind,arguments)}function t(l,d,_){if(!l)throw Error();if(2=d.f?z():l.fonts.load(T(d.a),d.h).then(function(H){1<=H.length?I():setTimeout(q,25)},function(){z()})}q()}),E=null,D=new Promise(function(I,z){E=setTimeout(z,d.f)});Promise.race([D,m]).then(function(){E&&(clearTimeout(E),E=null),d.g(d.a)},function(){d.j(d.a)})};function L(l,d,_,m,E,D,I){this.v=l,this.B=d,this.c=_,this.a=m,this.s=I||"BESbswy",this.f={},this.w=E||3e3,this.u=D||null,this.m=this.j=this.h=this.g=null,this.g=new v(this.c,this.s),this.h=new v(this.c,this.s),this.j=new v(this.c,this.s),this.m=new v(this.c,this.s),l=new w(this.a.c+",serif",M(this.a)),l=S(l),this.g.a.style.cssText=l,l=new w(this.a.c+",sans-serif",M(this.a)),l=S(l),this.h.a.style.cssText=l,l=new w("serif",M(this.a)),l=S(l),this.j.a.style.cssText=l,l=new w("sans-serif",M(this.a)),l=S(l),this.m.a.style.cssText=l,y(this.g),y(this.h),y(this.j),y(this.m)}var B={D:"serif",C:"sans-serif"},O=null;function j(){if(O===null){var l=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);O=!!l&&(536>parseInt(l[1],10)||parseInt(l[1],10)===536&&11>=parseInt(l[2],10))}return O}L.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.m.a.offsetWidth,this.A=n(),G(this)};function Y(l,d,_){for(var m in B)if(B.hasOwnProperty(m)&&d===l.f[B[m]]&&_===l.f[B[m]])return!0;return!1}function G(l){var d=l.g.a.offsetWidth,_=l.h.a.offsetWidth,m;(m=d===l.f.serif&&_===l.f["sans-serif"])||(m=j()&&Y(l,d,_)),m?n()-l.A>=l.w?j()&&Y(l,d,_)&&(l.u===null||l.u.hasOwnProperty(l.a.c))?oe(l,l.v):oe(l,l.B):Cu(l):oe(l,l.v)}function Cu(l){setTimeout(r(function(){G(this)},l),50)}function oe(l,d){setTimeout(r(function(){a(this.g.a),a(this.h.a),a(this.j.a),a(this.m.a),d(this.a)},l),0)}function se(l,d,_){this.c=l,this.a=d,this.f=0,this.m=this.j=!1,this.s=_}var qu=null;se.prototype.g=function(l){var d=this.a;d.g&&f(d.f,[d.a.c("wf",l.c,M(l).toString(),"active")],[d.a.c("wf",l.c,M(l).toString(),"loading"),d.a.c("wf",l.c,M(l).toString(),"inactive")]),au(d,"fontactive",l),this.m=!0,Ue(this)},se.prototype.h=function(l){var d=this.a;if(d.g){var _=h(d.f,d.a.c("wf",l.c,M(l).toString(),"active")),m=[],E=[d.a.c("wf",l.c,M(l).toString(),"loading")];_||m.push(d.a.c("wf",l.c,M(l).toString(),"inactive")),f(d.f,m,E)}au(d,"fontinactive",l),Ue(this)};function Ue(l){--l.f==0&&l.j&&(l.m?(l=l.a,l.g&&f(l.f,[l.a.c("wf","active")],[l.a.c("wf","loading"),l.a.c("wf","inactive")]),au(l,"active")):wu(l.a))}function Ge(l){this.j=l,this.a=new C,this.h=0,this.f=this.g=!0}Ge.prototype.load=function(l){this.c=new i(this.j,l.context||this.j),this.g=l.events!==!1,this.f=l.classes!==!1,Ft(this,new bu(this.c,l),l)};function Dt(l,d,_,m,E){var D=--l.h==0;(l.f||l.g)&&setTimeout(function(){var I=E||null,z=m||null||{};if(_.length===0&&D)wu(d.a);else{d.f+=_.length,D&&(d.j=D);var q,H=[];for(q=0;q<_.length;q++){var V=_[q],Q=z[V.c],iu=d.a,yu=V;if(iu.g&&f(iu.f,[iu.a.c("wf",yu.c,M(yu).toString(),"loading")]),au(iu,"fontloading",yu),iu=null,qu===null)if(window.FontFace){var yu=/Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent),Bt=/OS X.*Version\/10\..*Safari/.exec(window.navigator.userAgent)&&/Apple/.exec(window.navigator.vendor);qu=yu?42this.createElement(n));t.replaceChildren(...r)}createElement(e){if(e.type=="separator"){const t=document.createElement("div");return t.classList.add("separator"),t}if(e.type=="selection"||e.type=="checkbox"||e.type=="dropdown"){const t=document.createElement("div"),r=document.createElement("div"),n=document.createElement("div");let i;if(e.type=="selection"||e.type=="checkbox"){const c=qt[e.id]??{label:e.id,combos:[],callback:()=>{}};i=document.createElement("div"),i.innerText=V0.getKeybindString(e.id),i.classList.add("keybind","unselectable"),n.innerText=c.label;let o=c.disabled;typeof o=="function"&&(o=o(this.app)),o&&t.classList.add("disabled"),t.addEventListener("click",()=>{if(o)return;c.callback(this.app),t.closest(".menu-main").querySelector(".menubar-dropdown").replaceChildren()})}else i=jt.getIcon("CHEVRON",16),i.style.transform="rotate(-90deg)",n.innerText=typeof e.title=="function"?e.title(this.app):e.title;if(r.appendChild(n),r.appendChild(i),t.appendChild(r),t.classList.add("menu-item"),r.classList.add("menu-item-title","menu-hover"),n.classList.add("title","unselectable"),e.type=="dropdown"){const c=document.createElement("div");t.appendChild(c),c.classList.add("menubar-dropdown"),e.options.map(o=>this.createElement(o)).forEach(o=>c.appendChild(o))}if(e.type=="checkbox"){let c=e.checked;typeof c=="function"&&(c=c(this.app)),c&&(n.innerText="✓ "+n.innerText)}return t}if(e.type=="menu"){const t=document.createElement("div"),r=document.createElement("div"),n=document.createElement("div");return t.appendChild(r),r.innerText=e.title,t.appendChild(n),r.classList.add("title","unselectable"),t.classList.add("menu-item","menu-main"),r.classList.add("menu-hover"),n.classList.add("menubar-dropdown","unselectable"),t.onmouseenter=()=>{n.replaceChildren(...e.options.map(i=>this.createElement(i)))},t.onmouseleave=()=>{n.replaceChildren()},t}return document.createElement("div")}}const D0={};function cc(u){let e=D0[u];if(e)return e;e=D0[u]=[];for(let t=0;t<128;t++){const r=String.fromCharCode(t);e.push(r)}for(let t=0;t=55296&&f<=57343?n+="���":n+=String.fromCharCode(f),i+=6;continue}}if((o&248)===240&&i+91114111?n+="����":(h-=65536,n+=String.fromCharCode(55296+(h>>10),56320+(h&1023))),i+=9;continue}}n+="�"}return n})}vu.defaultChars=";/?:@&=+$,#";vu.componentChars="";const F0={};function oc(u){let e=F0[u];if(e)return e;e=F0[u]=[];for(let t=0;t<128;t++){const r=String.fromCharCode(t);/^[0-9a-z]$/i.test(r)?e.push(r):e.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2))}for(let t=0;t"u"&&(t=!0);const r=oc(e);let n="";for(let i=0,c=u.length;i=55296&&o<=57343){if(o>=55296&&o<=56319&&i+1=56320&&s<=57343){n+=encodeURIComponent(u[i]+u[i+1]),i++;continue}}n+="%EF%BF%BD";continue}n+=encodeURIComponent(u[i])}return n}Bu.defaultChars=";/?:@&=+$,-_.!~*'()#";Bu.componentChars="-_.!~*'()";function Ne(u){let e="";return e+=u.protocol||"",e+=u.slashes?"//":"",e+=u.auth?u.auth+"@":"",u.hostname&&u.hostname.indexOf(":")!==-1?e+="["+u.hostname+"]":e+=u.hostname||"",e+=u.port?":"+u.port:"",e+=u.pathname||"",e+=u.search||"",e+=u.hash||"",e}function Xu(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const sc=/^([a-z0-9.+-]+:)/i,ac=/:[0-9]*$/,lc=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,fc=["<",">",'"',"`"," ","\r",` -`," "],dc=["{","}","|","\\","^","`"].concat(fc),hc=["'"].concat(dc),v0=["%","/","?",";","#"].concat(hc),S0=["/","?","#"],pc=255,$0=/^[+a-z0-9A-Z_-]{0,63}$/,bc=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,R0={javascript:!0,"javascript:":!0},I0={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Oe(u,e){if(u&&u instanceof Xu)return u;const t=new Xu;return t.parse(u,e),t}Xu.prototype.parse=function(u,e){let t,r,n,i=u;if(i=i.trim(),!e&&u.split("#").length===1){const a=lc.exec(i);if(a)return this.pathname=a[1],a[2]&&(this.search=a[2]),this}let c=sc.exec(i);if(c&&(c=c[0],t=c.toLowerCase(),this.protocol=c,i=i.substr(c.length)),(e||c||i.match(/^\/\/[^@\/]+@[^@\/]+/))&&(n=i.substr(0,2)==="//",n&&!(c&&R0[c])&&(i=i.substr(2),this.slashes=!0)),!R0[c]&&(n||c&&!I0[c])){let a=-1;for(let p=0;p127?F+="x":F+=N[k];if(!F.match($0)){const k=p.slice(0,$),w=p.slice($+1),T=N.match(bc);T&&(k.push(T[1]),w.unshift(T[2])),w.length&&(i=w.join(".")+i),this.hostname=k.join(".");break}}}}this.hostname.length>pc&&(this.hostname=""),b&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const o=i.indexOf("#");o!==-1&&(this.hash=i.substr(o),i=i.slice(0,o));const s=i.indexOf("?");return s!==-1&&(this.search=i.substr(s),i=i.slice(0,s)),i&&(this.pathname=i),I0[t]&&this.hostname&&!this.pathname&&(this.pathname=""),this};Xu.prototype.parseHost=function(u){let e=ac.exec(u);e&&(e=e[0],e!==":"&&(this.port=e.substr(1)),u=u.substr(0,u.length-e.length)),u&&(this.hostname=u)};const mc=Object.freeze(Object.defineProperty({__proto__:null,decode:vu,encode:Bu,format:Ne,parse:Oe},Symbol.toStringTag,{value:"Module"})),et=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,tt=/[\0-\x1F\x7F-\x9F]/,xc=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,Pe=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,rt=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,nt=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,_c=Object.freeze(Object.defineProperty({__proto__:null,Any:et,Cc:tt,Cf:xc,P:Pe,S:rt,Z:nt},Symbol.toStringTag,{value:"Module"})),gc=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(u=>u.charCodeAt(0))),Ec=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(u=>u.charCodeAt(0)));var me;const kc=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),Cc=(me=String.fromCodePoint)!==null&&me!==void 0?me:function(u){let e="";return u>65535&&(u-=65536,e+=String.fromCharCode(u>>>10&1023|55296),u=56320|u&1023),e+=String.fromCharCode(u),e};function wc(u){var e;return u>=55296&&u<=57343||u>1114111?65533:(e=kc.get(u))!==null&&e!==void 0?e:u}var Z;(function(u){u[u.NUM=35]="NUM",u[u.SEMI=59]="SEMI",u[u.EQUALS=61]="EQUALS",u[u.ZERO=48]="ZERO",u[u.NINE=57]="NINE",u[u.LOWER_A=97]="LOWER_A",u[u.LOWER_F=102]="LOWER_F",u[u.LOWER_X=120]="LOWER_X",u[u.LOWER_Z=122]="LOWER_Z",u[u.UPPER_A=65]="UPPER_A",u[u.UPPER_F=70]="UPPER_F",u[u.UPPER_Z=90]="UPPER_Z"})(Z||(Z={}));const yc=32;var gu;(function(u){u[u.VALUE_LENGTH=49152]="VALUE_LENGTH",u[u.BRANCH_LENGTH=16256]="BRANCH_LENGTH",u[u.JUMP_TABLE=127]="JUMP_TABLE"})(gu||(gu={}));function ye(u){return u>=Z.ZERO&&u<=Z.NINE}function Ac(u){return u>=Z.UPPER_A&&u<=Z.UPPER_F||u>=Z.LOWER_A&&u<=Z.LOWER_F}function Dc(u){return u>=Z.UPPER_A&&u<=Z.UPPER_Z||u>=Z.LOWER_A&&u<=Z.LOWER_Z||ye(u)}function Fc(u){return u===Z.EQUALS||Dc(u)}var W;(function(u){u[u.EntityStart=0]="EntityStart",u[u.NumericStart=1]="NumericStart",u[u.NumericDecimal=2]="NumericDecimal",u[u.NumericHex=3]="NumericHex",u[u.NamedEntity=4]="NamedEntity"})(W||(W={}));var _u;(function(u){u[u.Legacy=0]="Legacy",u[u.Strict=1]="Strict",u[u.Attribute=2]="Attribute"})(_u||(_u={}));class vc{constructor(e,t,r){this.decodeTree=e,this.emitCodePoint=t,this.errors=r,this.state=W.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=_u.Strict}startEntity(e){this.decodeMode=e,this.state=W.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case W.EntityStart:return e.charCodeAt(t)===Z.NUM?(this.state=W.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=W.NamedEntity,this.stateNamedEntity(e,t));case W.NumericStart:return this.stateNumericStart(e,t);case W.NumericDecimal:return this.stateNumericDecimal(e,t);case W.NumericHex:return this.stateNumericHex(e,t);case W.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|yc)===Z.LOWER_X?(this.state=W.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=W.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,r,n){if(t!==r){const i=r-t;this.result=this.result*Math.pow(n,i)+parseInt(e.substr(t,i),n),this.consumed+=i}}stateNumericHex(e,t){const r=t;for(;t>14;for(;t>14,i!==0){if(c===Z.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==_u.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:t,decodeTree:r}=this,n=(r[t]&gu.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,n,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,r){const{decodeTree:n}=this;return this.emitCodePoint(t===1?n[e]&~gu.VALUE_LENGTH:n[e+1],r),t===3&&this.emitCodePoint(n[e+2],r),r}end(){var e;switch(this.state){case W.NamedEntity:return this.result!==0&&(this.decodeMode!==_u.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case W.NumericDecimal:return this.emitNumericEntity(0,2);case W.NumericHex:return this.emitNumericEntity(0,3);case W.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case W.EntityStart:return 0}}}function it(u){let e="";const t=new vc(u,r=>e+=Cc(r));return function(n,i){let c=0,o=0;for(;(o=n.indexOf("&",o))>=0;){e+=n.slice(c,o),t.startEntity(i);const a=t.write(n,o+1);if(a<0){c=o+t.end();break}c=o+a,o=a===0?c+1:c}const s=e+n.slice(c);return e="",s}}function Sc(u,e,t,r){const n=(e&gu.BRANCH_LENGTH)>>7,i=e&gu.JUMP_TABLE;if(n===0)return i!==0&&r===i?t:-1;if(i){const s=r-i;return s<0||s>=n?-1:u[t+s]-1}let c=t,o=c+n-1;for(;c<=o;){const s=c+o>>>1,a=u[s];if(ar)o=s-1;else return u[s+n]}return-1}const $c=it(gc);it(Ec);function ct(u,e=_u.Legacy){return $c(u,e)}function Rc(u){return Object.prototype.toString.call(u)}function Be(u){return Rc(u)==="[object String]"}const Ic=Object.prototype.hasOwnProperty;function Tc(u,e){return Ic.call(u,e)}function re(u){return Array.prototype.slice.call(arguments,1).forEach(function(t){if(t){if(typeof t!="object")throw new TypeError(t+"must be object");Object.keys(t).forEach(function(r){u[r]=t[r]})}}),u}function ot(u,e,t){return[].concat(u.slice(0,e),t,u.slice(e+1))}function Me(u){return!(u>=55296&&u<=57343||u>=64976&&u<=65007||(u&65535)===65535||(u&65535)===65534||u>=0&&u<=8||u===11||u>=14&&u<=31||u>=127&&u<=159||u>1114111)}function Yu(u){if(u>65535){u-=65536;const e=55296+(u>>10),t=56320+(u&1023);return String.fromCharCode(e,t)}return String.fromCharCode(u)}const st=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,Lc=/&([a-z#][a-z0-9]{1,31});/gi,Nc=new RegExp(st.source+"|"+Lc.source,"gi"),Oc=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function Pc(u,e){if(e.charCodeAt(0)===35&&Oc.test(e)){const r=e[1].toLowerCase()==="x"?parseInt(e.slice(2),16):parseInt(e.slice(1),10);return Me(r)?Yu(r):u}const t=ct(u);return t!==u?t:u}function Bc(u){return u.indexOf("\\")<0?u:u.replace(st,"$1")}function Su(u){return u.indexOf("\\")<0&&u.indexOf("&")<0?u:u.replace(Nc,function(e,t,r){return t||Pc(e,r)})}const Mc=/[&<>"]/,zc=/[&<>"]/g,qc={"&":"&","<":"<",">":">",'"':"""};function jc(u){return qc[u]}function Eu(u){return Mc.test(u)?u.replace(zc,jc):u}const Uc=/[.?*+^$[\]\\(){}|-]/g;function Gc(u){return u.replace(Uc,"\\$&")}function U(u){switch(u){case 9:case 32:return!0}return!1}function Tu(u){if(u>=8192&&u<=8202)return!0;switch(u){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function Lu(u){return Pe.test(u)||rt.test(u)}function Nu(u){switch(u){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function ne(u){return u=u.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(u=u.replace(/ẞ/g,"ß")),u.toLowerCase().toUpperCase()}const Hc={mdurl:mc,ucmicro:_c},Vc=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:ot,assign:re,escapeHtml:Eu,escapeRE:Gc,fromCodePoint:Yu,has:Tc,isMdAsciiPunct:Nu,isPunctChar:Lu,isSpace:U,isString:Be,isValidEntityCode:Me,isWhiteSpace:Tu,lib:Hc,normalizeReference:ne,unescapeAll:Su,unescapeMd:Bc},Symbol.toStringTag,{value:"Module"}));function Wc(u,e,t){let r,n,i,c;const o=u.posMax,s=u.pos;for(u.pos=e+1,r=1;u.pos32))return i;if(r===41){if(c===0)break;c--}n++}return e===n||c!==0||(i.str=Su(u.slice(e,n)),i.pos=n,i.ok=!0),i}function Xc(u,e,t,r){let n,i=e;const c={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)c.str=r.str,c.marker=r.marker;else{if(i>=t)return c;let o=u.charCodeAt(i);if(o!==34&&o!==39&&o!==40)return c;e++,i++,o===40&&(o=41),c.marker=o}for(;i"+Eu(i.content)+""};hu.code_block=function(u,e,t,r,n){const i=u[e];return""+Eu(u[e].content)+` -`};hu.fence=function(u,e,t,r,n){const i=u[e],c=i.info?Su(i.info).trim():"";let o="",s="";if(c){const f=c.split(/(\s+)/g);o=f[0],s=f.slice(2).join("")}let a;if(t.highlight?a=t.highlight(i.content,o,s)||Eu(i.content):a=Eu(i.content),a.indexOf("${a} -`}return`
${a}
-`};hu.image=function(u,e,t,r,n){const i=u[e];return i.attrs[i.attrIndex("alt")][1]=n.renderInlineAsText(i.children,t,r),n.renderToken(u,e,t)};hu.hardbreak=function(u,e,t){return t.xhtmlOut?`
-`:`
-`};hu.softbreak=function(u,e,t){return t.breaks?t.xhtmlOut?`
-`:`
-`:` -`};hu.text=function(u,e){return Eu(u[e].content)};hu.html_block=function(u,e){return u[e].content};hu.html_inline=function(u,e){return u[e].content};function Ru(){this.rules=re({},hu)}Ru.prototype.renderAttrs=function(e){let t,r,n;if(!e.attrs)return"";for(n="",t=0,r=e.attrs.length;t -`:">",i};Ru.prototype.renderInline=function(u,e,t){let r="";const n=this.rules;for(let i=0,c=u.length;i=0&&(r=this.attrs[t][1]),r};su.prototype.attrJoin=function(e,t){const r=this.attrIndex(e);r<0?this.attrPush([e,t]):this.attrs[r][1]=this.attrs[r][1]+" "+t};function at(u,e,t){this.src=u,this.env=t,this.tokens=[],this.inlineMode=!1,this.md=e}at.prototype.Token=su;const Kc=/\r\n?|\n/g,Jc=/\0/g;function Qc(u){let e;e=u.src.replace(Kc,` -`),e=e.replace(Jc,"�"),u.src=e}function uo(u){let e;u.inlineMode?(e=new u.Token("inline","",0),e.content=u.src,e.map=[0,1],e.children=[],u.tokens.push(e)):u.md.block.parse(u.src,u.md,u.env,u.tokens)}function eo(u){const e=u.tokens;for(let t=0,r=e.length;t\s]/i.test(u)}function ro(u){return/^<\/a\s*>/i.test(u)}function no(u){const e=u.tokens;if(u.md.options.linkify)for(let t=0,r=e.length;t=0;c--){const o=n[c];if(o.type==="link_close"){for(c--;n[c].level!==o.level&&n[c].type!=="link_open";)c--;continue}if(o.type==="html_inline"&&(to(o.content)&&i>0&&i--,ro(o.content)&&i++),!(i>0)&&o.type==="text"&&u.md.linkify.test(o.content)){const s=o.content;let a=u.md.linkify.match(s);const f=[];let h=o.level,x=0;a.length>0&&a[0].index===0&&c>0&&n[c-1].type==="text_special"&&(a=a.slice(1));for(let b=0;bx){const T=new u.Token("text","",0);T.content=s.slice(x,N),T.level=h,f.push(T)}const F=new u.Token("link_open","a",1);F.attrs=[["href",$]],F.level=h++,F.markup="linkify",F.info="auto",f.push(F);const k=new u.Token("text","",0);k.content=R,k.level=h,f.push(k);const w=new u.Token("link_close","a",-1);w.level=--h,w.markup="linkify",w.info="auto",f.push(w),x=a[b].lastIndex}if(x=0;t--){const r=u[t];r.type==="text"&&!e&&(r.content=r.content.replace(co,so)),r.type==="link_open"&&r.info==="auto"&&e--,r.type==="link_close"&&r.info==="auto"&&e++}}function lo(u){let e=0;for(let t=u.length-1;t>=0;t--){const r=u[t];r.type==="text"&&!e&<.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),r.type==="link_open"&&r.info==="auto"&&e--,r.type==="link_close"&&r.info==="auto"&&e++}}function fo(u){let e;if(u.md.options.typographer)for(e=u.tokens.length-1;e>=0;e--)u.tokens[e].type==="inline"&&(io.test(u.tokens[e].content)&&ao(u.tokens[e].children),lt.test(u.tokens[e].content)&&lo(u.tokens[e].children))}const ho=/['"]/,T0=/['"]/g,L0="’";function Wu(u,e,t){return u.slice(0,e)+t+u.slice(e+1)}function po(u,e){let t;const r=[];for(let n=0;n=0&&!(r[t].level<=c);t--);if(r.length=t+1,i.type!=="text")continue;let o=i.content,s=0,a=o.length;u:for(;s=0)p=o.charCodeAt(f.index-1);else for(t=n-1;t>=0&&!(u[t].type==="softbreak"||u[t].type==="hardbreak");t--)if(u[t].content){p=u[t].content.charCodeAt(u[t].content.length-1);break}let $=32;if(s=48&&p<=57&&(x=h=!1),h&&x&&(h=R,x=N),!h&&!x){b&&(i.content=Wu(i.content,f.index,L0));continue}if(x)for(t=r.length-1;t>=0;t--){let w=r[t];if(r[t].level=0;e--)u.tokens[e].type!=="inline"||!ho.test(u.tokens[e].content)||po(u.tokens[e].children,u)}function mo(u){let e,t;const r=u.tokens,n=r.length;for(let i=0;i0&&this.level++,this.tokens.push(r),r};pu.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]};pu.prototype.skipEmptyLines=function(e){for(let t=this.lineMax;et;)if(!U(this.src.charCodeAt(--e)))return e+1;return e};pu.prototype.skipChars=function(e,t){for(let r=this.src.length;er;)if(t!==this.src.charCodeAt(--e))return e+1;return e};pu.prototype.getLines=function(e,t,r,n){if(e>=t)return"";const i=new Array(t-e);for(let c=0,o=e;or?i[c]=new Array(s-r+1).join(" ")+this.src.slice(f,h):i[c]=this.src.slice(f,h)}return i.join("")};pu.prototype.Token=su;const xo=65536;function _e(u,e){const t=u.bMarks[e]+u.tShift[e],r=u.eMarks[e];return u.src.slice(t,r)}function N0(u){const e=[],t=u.length;let r=0,n=u.charCodeAt(r),i=!1,c=0,o="";for(;rt)return!1;let n=e+1;if(u.sCount[n]=4)return!1;let i=u.bMarks[n]+u.tShift[n];if(i>=u.eMarks[n])return!1;const c=u.src.charCodeAt(i++);if(c!==124&&c!==45&&c!==58||i>=u.eMarks[n])return!1;const o=u.src.charCodeAt(i++);if(o!==124&&o!==45&&o!==58&&!U(o)||c===45&&U(o))return!1;for(;i=4)return!1;a=N0(s),a.length&&a[0]===""&&a.shift(),a.length&&a[a.length-1]===""&&a.pop();const h=a.length;if(h===0||h!==f.length)return!1;if(r)return!0;const x=u.parentType;u.parentType="table";const b=u.md.block.ruler.getRules("blockquote"),p=u.push("table_open","table",1),$=[e,0];p.map=$;const R=u.push("thead_open","thead",1);R.map=[e,e+1];const N=u.push("tr_open","tr",1);N.map=[e,e+1];for(let w=0;w=4||(a=N0(s),a.length&&a[0]===""&&a.shift(),a.length&&a[a.length-1]===""&&a.pop(),k+=h-a.length,k>xo))break;if(n===e+2){const P=u.push("tbody_open","tbody",1);P.map=F=[e+2,0]}const T=u.push("tr_open","tr",1);T.map=[n,n+1];for(let P=0;P=4){r++,n=r;continue}break}u.line=n;const i=u.push("code_block","code",0);return i.content=u.getLines(e,n,4+u.blkIndent,!1)+` -`,i.map=[e,u.line],!0}function Eo(u,e,t,r){let n=u.bMarks[e]+u.tShift[e],i=u.eMarks[e];if(u.sCount[e]-u.blkIndent>=4||n+3>i)return!1;const c=u.src.charCodeAt(n);if(c!==126&&c!==96)return!1;let o=n;n=u.skipChars(n,c);let s=n-o;if(s<3)return!1;const a=u.src.slice(o,n),f=u.src.slice(n,i);if(c===96&&f.indexOf(String.fromCharCode(c))>=0)return!1;if(r)return!0;let h=e,x=!1;for(;h++,!(h>=t||(n=o=u.bMarks[h]+u.tShift[h],i=u.eMarks[h],n=4)&&(n=u.skipChars(n,c),!(n-o=4||u.src.charCodeAt(n)!==62)return!1;if(r)return!0;const o=[],s=[],a=[],f=[],h=u.md.block.ruler.getRules("blockquote"),x=u.parentType;u.parentType="blockquote";let b=!1,p;for(p=e;p=i)break;if(u.src.charCodeAt(n++)===62&&!k){let T=u.sCount[p]+1,P,M;u.src.charCodeAt(n)===32?(n++,T++,M=!1,P=!0):u.src.charCodeAt(n)===9?(P=!0,(u.bsCount[p]+T)%4===3?(n++,T++,M=!1):M=!0):P=!1;let X=T;for(o.push(u.bMarks[p]),u.bMarks[p]=n;n=i,s.push(u.bsCount[p]),u.bsCount[p]=u.sCount[p]+1+(P?1:0),a.push(u.sCount[p]),u.sCount[p]=X-T,f.push(u.tShift[p]),u.tShift[p]=n-u.bMarks[p];continue}if(b)break;let w=!1;for(let T=0,P=h.length;T";const N=[e,0];R.map=N,u.md.block.tokenize(u,e,p);const F=u.push("blockquote_close","blockquote",-1);F.markup=">",u.lineMax=c,u.parentType=x,N[1]=u.line;for(let k=0;k=4)return!1;let i=u.bMarks[e]+u.tShift[e];const c=u.src.charCodeAt(i++);if(c!==42&&c!==45&&c!==95)return!1;let o=1;for(;i=r)return-1;let i=u.src.charCodeAt(n++);if(i<48||i>57)return-1;for(;;){if(n>=r)return-1;if(i=u.src.charCodeAt(n++),i>=48&&i<=57){if(n-t>=10)return-1;continue}if(i===41||i===46)break;return-1}return n=4||u.listIndent>=0&&u.sCount[s]-u.listIndent>=4&&u.sCount[s]=u.blkIndent&&(f=!0);let h,x,b;if((b=P0(u,s))>=0){if(h=!0,c=u.bMarks[s]+u.tShift[s],x=Number(u.src.slice(c,b-1)),f&&x!==1)return!1}else if((b=O0(u,s))>=0)h=!1;else return!1;if(f&&u.skipSpaces(b)>=u.eMarks[s])return!1;if(r)return!0;const p=u.src.charCodeAt(b-1),$=u.tokens.length;h?(o=u.push("ordered_list_open","ol",1),x!==1&&(o.attrs=[["start",x]])):o=u.push("bullet_list_open","ul",1);const R=[s,0];o.map=R,o.markup=String.fromCharCode(p);let N=!1;const F=u.md.block.ruler.getRules("list"),k=u.parentType;for(u.parentType="list";s=n?M=1:M=T-w,M>4&&(M=1);const X=w+M;o=u.push("list_item_open","li",1),o.markup=String.fromCharCode(p);const ru=[s,0];o.map=ru,h&&(o.info=u.src.slice(c,b-1));const bu=u.tight,ku=u.tShift[s],wu=u.sCount[s],au=u.listIndent;if(u.listIndent=u.blkIndent,u.blkIndent=X,u.tight=!0,u.tShift[s]=P-u.bMarks[s],u.sCount[s]=T,P>=n&&u.isEmpty(s+1)?u.line=Math.min(u.line+2,t):u.md.block.tokenize(u,s,t,!0),(!u.tight||N)&&(a=!1),N=u.line-s>1&&u.isEmpty(u.line-1),u.blkIndent=u.listIndent,u.listIndent=au,u.tShift[s]=ku,u.sCount[s]=wu,u.tight=bu,o=u.push("list_item_close","li",-1),o.markup=String.fromCharCode(p),s=u.line,ru[1]=s,s>=t||u.sCount[s]=4)break;let C=!1;for(let g=0,v=F.length;g=4||u.src.charCodeAt(n)!==91)return!1;function o(F){const k=u.lineMax;if(F>=k||u.isEmpty(F))return null;let w=!1;if(u.sCount[F]-u.blkIndent>3&&(w=!0),u.sCount[F]<0&&(w=!0),!w){const M=u.md.block.ruler.getRules("reference"),X=u.parentType;u.parentType="reference";let ru=!1;for(let bu=0,ku=M.length;bu"u"&&(u.env.references={}),typeof u.env.references[N]>"u"&&(u.env.references[N]={title:R,href:h}),u.line=c),!0):!1}const Do=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Fo="[a-zA-Z_:][a-zA-Z0-9:._-]*",vo="[^\"'=<>`\\x00-\\x20]+",So="'[^']*'",$o='"[^"]*"',Ro="(?:"+vo+"|"+So+"|"+$o+")",Io="(?:\\s+"+Fo+"(?:\\s*=\\s*"+Ro+")?)",ft="<[A-Za-z][A-Za-z0-9\\-]*"+Io+"*\\s*\\/?>",dt="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",To="",Lo="<[?][\\s\\S]*?[?]>",No="]*>",Oo="",Po=new RegExp("^(?:"+ft+"|"+dt+"|"+To+"|"+Lo+"|"+No+"|"+Oo+")"),Bo=new RegExp("^(?:"+ft+"|"+dt+")"),Du=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(Bo.source+"\\s*$"),/^$/,!1]];function Mo(u,e,t,r){let n=u.bMarks[e]+u.tShift[e],i=u.eMarks[e];if(u.sCount[e]-u.blkIndent>=4||!u.md.options.html||u.src.charCodeAt(n)!==60)return!1;let c=u.src.slice(n,i),o=0;for(;o=4)return!1;let c=u.src.charCodeAt(n);if(c!==35||n>=i)return!1;let o=1;for(c=u.src.charCodeAt(++n);c===35&&n6||nn&&U(u.src.charCodeAt(s-1))&&(i=s),u.line=e+1;const a=u.push("heading_open","h"+String(o),1);a.markup="########".slice(0,o),a.map=[e,u.line];const f=u.push("inline","",0);f.content=u.src.slice(n,i).trim(),f.map=[e,u.line],f.children=[];const h=u.push("heading_close","h"+String(o),-1);return h.markup="########".slice(0,o),!0}function qo(u,e,t){const r=u.md.block.ruler.getRules("paragraph");if(u.sCount[e]-u.blkIndent>=4)return!1;const n=u.parentType;u.parentType="paragraph";let i=0,c,o=e+1;for(;o3)continue;if(u.sCount[o]>=u.blkIndent){let b=u.bMarks[o]+u.tShift[o];const p=u.eMarks[o];if(b=p))){i=c===61?1:2;break}}if(u.sCount[o]<0)continue;let x=!1;for(let b=0,p=r.length;b3||u.sCount[i]<0)continue;let a=!1;for(let f=0,h=r.length;f=t||u.sCount[c]=i){u.line=t;break}const s=u.line;let a=!1;for(let f=0;f=u.line)throw new Error("block rule didn't increment state.line");break}if(!a)throw new Error("none of the block rules matched");u.tight=!o,u.isEmpty(u.line-1)&&(o=!0),c=u.line,c0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],n={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(n),r};Mu.prototype.scanDelims=function(u,e){const t=this.posMax,r=this.src.charCodeAt(u),n=u>0?this.src.charCodeAt(u-1):32;let i=u;for(;i0)return!1;const t=u.pos,r=u.posMax;if(t+3>r||u.src.charCodeAt(t)!==58||u.src.charCodeAt(t+1)!==47||u.src.charCodeAt(t+2)!==47)return!1;const n=u.pending.match(Ho);if(!n)return!1;const i=n[1],c=u.md.linkify.matchAtStart(u.src.slice(t-i.length));if(!c)return!1;let o=c.url;if(o.length<=i.length)return!1;o=o.replace(/\*+$/,"");const s=u.md.normalizeLink(o);if(!u.md.validateLink(s))return!1;if(!e){u.pending=u.pending.slice(0,-i.length);const a=u.push("link_open","a",1);a.attrs=[["href",s]],a.markup="linkify",a.info="auto";const f=u.push("text","",0);f.content=u.md.normalizeLinkText(o);const h=u.push("link_close","a",-1);h.markup="linkify",h.info="auto"}return u.pos+=o.length-i.length,!0}function Wo(u,e){let t=u.pos;if(u.src.charCodeAt(t)!==10)return!1;const r=u.pending.length-1,n=u.posMax;if(!e)if(r>=0&&u.pending.charCodeAt(r)===32)if(r>=1&&u.pending.charCodeAt(r-1)===32){let i=r-1;for(;i>=1&&u.pending.charCodeAt(i-1)===32;)i--;u.pending=u.pending.slice(0,i),u.push("hardbreak","br",0)}else u.pending=u.pending.slice(0,-1),u.push("softbreak","br",0);else u.push("softbreak","br",0);for(t++;t?@[]^_`{|}~-".split("").forEach(function(u){qe[u.charCodeAt(0)]=1});function Zo(u,e){let t=u.pos;const r=u.posMax;if(u.src.charCodeAt(t)!==92||(t++,t>=r))return!1;let n=u.src.charCodeAt(t);if(n===10){for(e||u.push("hardbreak","br",0),t++;t=55296&&n<=56319&&t+1=56320&&o<=57343&&(i+=u.src[t+1],t++)}const c="\\"+i;if(!e){const o=u.push("text_special","",0);n<256&&qe[n]!==0?o.content=i:o.content=c,o.markup=c,o.info="escape"}return u.pos=t+1,!0}function Xo(u,e){let t=u.pos;if(u.src.charCodeAt(t)!==96)return!1;const n=t;t++;const i=u.posMax;for(;t=0;r--){const n=e[r];if(n.marker!==95&&n.marker!==42||n.end===-1)continue;const i=e[n.end],c=r>0&&e[r-1].end===n.end+1&&e[r-1].marker===n.marker&&e[r-1].token===n.token-1&&e[n.end+1].token===i.token+1,o=String.fromCharCode(n.marker),s=u.tokens[n.token];s.type=c?"strong_open":"em_open",s.tag=c?"strong":"em",s.nesting=1,s.markup=c?o+o:o,s.content="";const a=u.tokens[i.token];a.type=c?"strong_close":"em_close",a.tag=c?"strong":"em",a.nesting=-1,a.markup=c?o+o:o,a.content="",c&&(u.tokens[e[r-1].token].content="",u.tokens[e[n.end+1].token].content="",r--)}}function Qo(u){const e=u.tokens_meta,t=u.tokens_meta.length;M0(u,u.delimiters);for(let r=0;r=h)return!1;if(s=p,n=u.md.helpers.parseLinkDestination(u.src,p,u.posMax),n.ok){for(c=u.md.normalizeLink(n.str),u.md.validateLink(c)?p=n.pos:c="",s=p;p=h||u.src.charCodeAt(p)!==41)&&(a=!0),p++}if(a){if(typeof u.env.references>"u")return!1;if(p=0?r=u.src.slice(s,p++):p=b+1):p=b+1,r||(r=u.src.slice(x,b)),i=u.env.references[ne(r)],!i)return u.pos=f,!1;c=i.href,o=i.title}if(!e){u.pos=x,u.posMax=b;const $=u.push("link_open","a",1),R=[["href",c]];$.attrs=R,o&&R.push(["title",o]),u.linkLevel++,u.md.inline.tokenize(u),u.linkLevel--,u.push("link_close","a",-1)}return u.pos=p,u.posMax=h,!0}function es(u,e){let t,r,n,i,c,o,s,a,f="";const h=u.pos,x=u.posMax;if(u.src.charCodeAt(u.pos)!==33||u.src.charCodeAt(u.pos+1)!==91)return!1;const b=u.pos+2,p=u.md.helpers.parseLinkLabel(u,u.pos+1,!1);if(p<0)return!1;if(i=p+1,i=x)return!1;for(a=i,o=u.md.helpers.parseLinkDestination(u.src,i,u.posMax),o.ok&&(f=u.md.normalizeLink(o.str),u.md.validateLink(f)?i=o.pos:f=""),a=i;i=x||u.src.charCodeAt(i)!==41)return u.pos=h,!1;i++}else{if(typeof u.env.references>"u")return!1;if(i=0?n=u.src.slice(a,i++):i=p+1):i=p+1,n||(n=u.src.slice(b,p)),c=u.env.references[ne(n)],!c)return u.pos=h,!1;f=c.href,s=c.title}if(!e){r=u.src.slice(b,p);const $=[];u.md.inline.parse(r,u.md,u.env,$);const R=u.push("image","img",0),N=[["src",f],["alt",""]];R.attrs=N,R.children=$,R.content=r,s&&N.push(["title",s])}return u.pos=i,u.posMax=x,!0}const ts=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,rs=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function ns(u,e){let t=u.pos;if(u.src.charCodeAt(t)!==60)return!1;const r=u.pos,n=u.posMax;for(;;){if(++t>=n)return!1;const c=u.src.charCodeAt(t);if(c===60)return!1;if(c===62)break}const i=u.src.slice(r+1,t);if(rs.test(i)){const c=u.md.normalizeLink(i);if(!u.md.validateLink(c))return!1;if(!e){const o=u.push("link_open","a",1);o.attrs=[["href",c]],o.markup="autolink",o.info="auto";const s=u.push("text","",0);s.content=u.md.normalizeLinkText(i);const a=u.push("link_close","a",-1);a.markup="autolink",a.info="auto"}return u.pos+=i.length+2,!0}if(ts.test(i)){const c=u.md.normalizeLink("mailto:"+i);if(!u.md.validateLink(c))return!1;if(!e){const o=u.push("link_open","a",1);o.attrs=[["href",c]],o.markup="autolink",o.info="auto";const s=u.push("text","",0);s.content=u.md.normalizeLinkText(i);const a=u.push("link_close","a",-1);a.markup="autolink",a.info="auto"}return u.pos+=i.length+2,!0}return!1}function is(u){return/^\s]/i.test(u)}function cs(u){return/^<\/a\s*>/i.test(u)}function os(u){const e=u|32;return e>=97&&e<=122}function ss(u,e){if(!u.md.options.html)return!1;const t=u.posMax,r=u.pos;if(u.src.charCodeAt(r)!==60||r+2>=t)return!1;const n=u.src.charCodeAt(r+1);if(n!==33&&n!==63&&n!==47&&!os(n))return!1;const i=u.src.slice(r).match(Po);if(!i)return!1;if(!e){const c=u.push("html_inline","",0);c.content=i[0],is(c.content)&&u.linkLevel++,cs(c.content)&&u.linkLevel--}return u.pos+=i[0].length,!0}const as=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,ls=/^&([a-z][a-z0-9]{1,31});/i;function fs(u,e){const t=u.pos,r=u.posMax;if(u.src.charCodeAt(t)!==38||t+1>=r)return!1;if(u.src.charCodeAt(t+1)===35){const i=u.src.slice(t).match(as);if(i){if(!e){const c=i[1][0].toLowerCase()==="x"?parseInt(i[1].slice(1),16):parseInt(i[1],10),o=u.push("text_special","",0);o.content=Me(c)?Yu(c):Yu(65533),o.markup=i[0],o.info="entity"}return u.pos+=i[0].length,!0}}else{const i=u.src.slice(t).match(ls);if(i){const c=ct(i[0]);if(c!==i[0]){if(!e){const o=u.push("text_special","",0);o.content=c,o.markup=i[0],o.info="entity"}return u.pos+=i[0].length,!0}}}return!1}function z0(u){const e={},t=u.length;if(!t)return;let r=0,n=-2;const i=[];for(let c=0;cs;a-=i[a]+1){const h=u[a];if(h.marker===o.marker&&h.open&&h.end<0){let x=!1;if((h.close||o.open)&&(h.length+o.length)%3===0&&(h.length%3!==0||o.length%3!==0)&&(x=!0),!x){const b=a>0&&!u[a-1].open?i[a-1]+1:0;i[c]=c-a+b,i[a]=b,o.open=!1,h.end=c,h.close=!1,f=-1,n=-2;break}}}f!==-1&&(e[o.marker][(o.open?3:0)+(o.length||0)%3]=f)}}function ds(u){const e=u.tokens_meta,t=u.tokens_meta.length;z0(u.delimiters);for(let r=0;r0&&r++,n[e].type==="text"&&e+1=u.pos)throw new Error("inline rule didn't increment state.pos");break}}else u.pos=u.posMax;c||u.pos++,i[e]=u.pos};zu.prototype.tokenize=function(u){const e=this.ruler.getRules(""),t=e.length,r=u.posMax,n=u.md.options.maxNesting;for(;u.pos=u.pos)throw new Error("inline rule didn't increment state.pos");break}}if(c){if(u.pos>=r)break;continue}u.pending+=u.src[u.pos++]}u.pending&&u.pushPending()};zu.prototype.parse=function(u,e,t,r){const n=new this.State(u,e,t,r);this.tokenize(n);const i=this.ruler2.getRules(""),c=i.length;for(let o=0;o|$))",e.tpl_email_fuzzy="(^|"+t+'|"|\\(|'+e.src_ZCc+")("+e.src_email_name+"@"+e.tpl_host_fuzzy_strict+")",e.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_fuzzy_strict+e.src_path+")",e.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_no_ip_fuzzy_strict+e.src_path+")",e}function Ae(u){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(r){u[r]=t[r]})}),u}function ce(u){return Object.prototype.toString.call(u)}function bs(u){return ce(u)==="[object String]"}function ms(u){return ce(u)==="[object Object]"}function xs(u){return ce(u)==="[object RegExp]"}function q0(u){return ce(u)==="[object Function]"}function _s(u){return u.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const bt={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function gs(u){return Object.keys(u||{}).reduce(function(e,t){return e||bt.hasOwnProperty(t)},!1)}const Es={"http:":{validate:function(u,e,t){const r=u.slice(e);return t.re.http||(t.re.http=new RegExp("^\\/\\/"+t.re.src_auth+t.re.src_host_port_strict+t.re.src_path,"i")),t.re.http.test(r)?r.match(t.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(u,e,t){const r=u.slice(e);return t.re.no_http||(t.re.no_http=new RegExp("^"+t.re.src_auth+"(?:localhost|(?:(?:"+t.re.src_domain+")\\.)+"+t.re.src_domain_root+")"+t.re.src_port+t.re.src_host_terminator+t.re.src_path,"i")),t.re.no_http.test(r)?e>=3&&u[e-3]===":"||e>=3&&u[e-3]==="/"?0:r.match(t.re.no_http)[0].length:0}},"mailto:":{validate:function(u,e,t){const r=u.slice(e);return t.re.mailto||(t.re.mailto=new RegExp("^"+t.re.src_email_name+"@"+t.re.src_host_strict,"i")),t.re.mailto.test(r)?r.match(t.re.mailto)[0].length:0}}},ks="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",Cs="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function ws(u){u.__index__=-1,u.__text_cache__=""}function ys(u){return function(e,t){const r=e.slice(t);return u.test(r)?r.match(u)[0].length:0}}function j0(){return function(u,e){e.normalize(u)}}function Ku(u){const e=u.re=ps(u.__opts__),t=u.__tlds__.slice();u.onCompile(),u.__tlds_replaced__||t.push(ks),t.push(e.src_xn),e.src_tlds=t.join("|");function r(o){return o.replace("%TLDS%",e.src_tlds)}e.email_fuzzy=RegExp(r(e.tpl_email_fuzzy),"i"),e.link_fuzzy=RegExp(r(e.tpl_link_fuzzy),"i"),e.link_no_ip_fuzzy=RegExp(r(e.tpl_link_no_ip_fuzzy),"i"),e.host_fuzzy_test=RegExp(r(e.tpl_host_fuzzy_test),"i");const n=[];u.__compiled__={};function i(o,s){throw new Error('(LinkifyIt) Invalid schema "'+o+'": '+s)}Object.keys(u.__schemas__).forEach(function(o){const s=u.__schemas__[o];if(s===null)return;const a={validate:null,link:null};if(u.__compiled__[o]=a,ms(s)){xs(s.validate)?a.validate=ys(s.validate):q0(s.validate)?a.validate=s.validate:i(o,s),q0(s.normalize)?a.normalize=s.normalize:s.normalize?i(o,s):a.normalize=j0();return}if(bs(s)){n.push(o);return}i(o,s)}),n.forEach(function(o){u.__compiled__[u.__schemas__[o]]&&(u.__compiled__[o].validate=u.__compiled__[u.__schemas__[o]].validate,u.__compiled__[o].normalize=u.__compiled__[u.__schemas__[o]].normalize)}),u.__compiled__[""]={validate:null,normalize:j0()};const c=Object.keys(u.__compiled__).filter(function(o){return o.length>0&&u.__compiled__[o]}).map(_s).join("|");u.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+c+")","i"),u.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+c+")","ig"),u.re.schema_at_start=RegExp("^"+u.re.schema_search.source,"i"),u.re.pretest=RegExp("("+u.re.schema_test.source+")|("+u.re.host_fuzzy_test.source+")|@","i"),ws(u)}function As(u,e){const t=u.__index__,r=u.__last_index__,n=u.__text_cache__.slice(t,r);this.schema=u.__schema__.toLowerCase(),this.index=t+e,this.lastIndex=r+e,this.raw=n,this.text=n,this.url=n}function De(u,e){const t=new As(u,e);return u.__compiled__[t.schema].normalize(t,u),t}function tu(u,e){if(!(this instanceof tu))return new tu(u,e);e||gs(u)&&(e=u,u={}),this.__opts__=Ae({},bt,e),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=Ae({},Es,u),this.__compiled__={},this.__tlds__=Cs,this.__tlds_replaced__=!1,this.re={},Ku(this)}tu.prototype.add=function(e,t){return this.__schemas__[e]=t,Ku(this),this};tu.prototype.set=function(e){return this.__opts__=Ae(this.__opts__,e),this};tu.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;let t,r,n,i,c,o,s,a,f;if(this.re.schema_test.test(e)){for(s=this.re.schema_search,s.lastIndex=0;(t=s.exec(e))!==null;)if(i=this.testSchemaAt(e,t[2],s.lastIndex),i){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+i;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(a=e.search(this.re.host_fuzzy_test),a>=0&&(this.__index__<0||a=0&&(n=e.match(this.re.email_fuzzy))!==null&&(c=n.index+n[1].length,o=n.index+n[0].length,(this.__index__<0||cthis.__last_index__)&&(this.__schema__="mailto:",this.__index__=c,this.__last_index__=o))),this.__index__>=0};tu.prototype.pretest=function(e){return this.re.pretest.test(e)};tu.prototype.testSchemaAt=function(e,t,r){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,r,this):0};tu.prototype.match=function(e){const t=[];let r=0;this.__index__>=0&&this.__text_cache__===e&&(t.push(De(this,r)),r=this.__last_index__);let n=r?e.slice(r):e;for(;this.test(n);)t.push(De(this,r)),n=n.slice(this.__last_index__),r+=this.__last_index__;return t.length?t:null};tu.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;const t=this.re.schema_at_start.exec(e);if(!t)return null;const r=this.testSchemaAt(e,t[2],t[0].length);return r?(this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+r,De(this,0)):null};tu.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(r,n,i){return r!==i[n-1]}).reverse(),Ku(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,Ku(this),this)};tu.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url="mailto:"+e.url)};tu.prototype.onCompile=function(){};const Fu=2147483647,fu=36,je=1,Ou=26,Ds=38,Fs=700,mt=72,xt=128,_t="-",vs=/^xn--/,Ss=/[^\0-\x7F]/,$s=/[\x2E\u3002\uFF0E\uFF61]/g,Rs={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ke=fu-je,du=Math.floor,Ce=String.fromCharCode;function xu(u){throw new RangeError(Rs[u])}function Is(u,e){const t=[];let r=u.length;for(;r--;)t[r]=e(u[r]);return t}function gt(u,e){const t=u.split("@");let r="";t.length>1&&(r=t[0]+"@",u=t[1]),u=u.replace($s,".");const n=u.split("."),i=Is(n,e).join(".");return r+i}function Et(u){const e=[];let t=0;const r=u.length;for(;t=55296&&n<=56319&&tString.fromCodePoint(...u),Ls=function(u){return u>=48&&u<58?26+(u-48):u>=65&&u<91?u-65:u>=97&&u<123?u-97:fu},U0=function(u,e){return u+22+75*(u<26)-((e!=0)<<5)},kt=function(u,e,t){let r=0;for(u=t?du(u/Fs):u>>1,u+=du(u/e);u>ke*Ou>>1;r+=fu)u=du(u/ke);return du(r+(ke+1)*u/(u+Ds))},Ct=function(u){const e=[],t=u.length;let r=0,n=xt,i=mt,c=u.lastIndexOf(_t);c<0&&(c=0);for(let o=0;o=128&&xu("not-basic"),e.push(u.charCodeAt(o));for(let o=c>0?c+1:0;o=t&&xu("invalid-input");const x=Ls(u.charCodeAt(o++));x>=fu&&xu("invalid-input"),x>du((Fu-r)/f)&&xu("overflow"),r+=x*f;const b=h<=i?je:h>=i+Ou?Ou:h-i;if(xdu(Fu/p)&&xu("overflow"),f*=p}const a=e.length+1;i=kt(r-s,a,s==0),du(r/a)>Fu-n&&xu("overflow"),n+=du(r/a),r%=a,e.splice(r++,0,n)}return String.fromCodePoint(...e)},wt=function(u){const e=[];u=Et(u);const t=u.length;let r=xt,n=0,i=mt;for(const s of u)s<128&&e.push(Ce(s));const c=e.length;let o=c;for(c&&e.push(_t);o=r&&fdu((Fu-n)/a)&&xu("overflow"),n+=(s-r)*a,r=s;for(const f of u)if(fFu&&xu("overflow"),f===r){let h=n;for(let x=fu;;x+=fu){const b=x<=i?je:x>=i+Ou?Ou:x-i;if(h=0))try{e.hostname=yt.toASCII(e.hostname)}catch{}return Bu(Ne(e))}function Hs(u){const e=Oe(u,!0);if(e.hostname&&(!e.protocol||At.indexOf(e.protocol)>=0))try{e.hostname=yt.toUnicode(e.hostname)}catch{}return vu(Ne(e),vu.defaultChars+"%")}function nu(u,e){if(!(this instanceof nu))return new nu(u,e);e||Be(u)||(e=u||{},u="default"),this.inline=new zu,this.block=new ie,this.core=new ze,this.renderer=new Ru,this.linkify=new tu,this.validateLink=Us,this.normalizeLink=Gs,this.normalizeLinkText=Hs,this.utils=Vc,this.helpers=re({},Yc),this.options={},this.configure(u),e&&this.set(e)}nu.prototype.set=function(u){return re(this.options,u),this};nu.prototype.configure=function(u){const e=this;if(Be(u)){const t=u;if(u=zs[t],!u)throw new Error('Wrong `markdown-it` preset "'+t+'", check name')}if(!u)throw new Error("Wrong `markdown-it` preset, can't be empty");return u.options&&e.set(u.options),u.components&&Object.keys(u.components).forEach(function(t){u.components[t].rules&&e[t].ruler.enableOnly(u.components[t].rules),u.components[t].rules2&&e[t].ruler2.enableOnly(u.components[t].rules2)}),this};nu.prototype.enable=function(u,e){let t=[];Array.isArray(u)||(u=[u]),["core","block","inline"].forEach(function(n){t=t.concat(this[n].ruler.enable(u,!0))},this),t=t.concat(this.inline.ruler2.enable(u,!0));const r=u.filter(function(n){return t.indexOf(n)<0});if(r.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this};nu.prototype.disable=function(u,e){let t=[];Array.isArray(u)||(u=[u]),["core","block","inline"].forEach(function(n){t=t.concat(this[n].ruler.disable(u,!0))},this),t=t.concat(this.inline.ruler2.disable(u,!0));const r=u.filter(function(n){return t.indexOf(n)<0});if(r.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this};nu.prototype.use=function(u){const e=[this].concat(Array.prototype.slice.call(arguments,1));return u.apply(u,e),this};nu.prototype.parse=function(u,e){if(typeof u!="string")throw new Error("Input data should be a String");const t=new this.core.State(u,this,e);return this.core.process(t),t.tokens};nu.prototype.render=function(u,e){return e=e||{},this.renderer.render(this.parse(u,e),this.options,e)};nu.prototype.parseInline=function(u,e){const t=new this.core.State(u,this,e);return t.inlineMode=!0,this.core.process(t),t.tokens};nu.prototype.renderInline=function(u,e){return e=e||{},this.renderer.render(this.parseInline(u,e),this.options,e)};class Vs extends Ut{app;opt;constructor(e,t){super({title:"Changelog",width:600,height:500,win_id:"changelog"}),this.app=e,this.opt=t,this.initView()}initView(){this.viewElement.replaceChildren();const e=document.createElement("div");e.classList.add("padding");const t=document.createElement("div");t.classList.add("markdown-container");const r=nu().render(`# ${this.opt.version} ---- -`+this.opt.markdown);t.innerHTML=r,e.appendChild(t);const n=document.createElement("div");n.classList.add("menu-options"),n.style.justifyContent="flex-end";const i=document.createElement("button");i.innerText="Close",i.onclick=()=>{this.closeWindow()},i.classList.add("confirm"),n.append(i),e.appendChild(n),this.viewElement.appendChild(e)}}class Ws{view;windows=[];app;constructor(e,t){this.app=e,this.view=t}unfocusAll(){for(const e of this.view.querySelectorAll(".focused"))e.classList.remove("focused")}getFocusedWindow(){for(const e of this.windows)if(e.windowElement.classList.contains("focused"))return e;return null}isBlocked(){return!this.windows.every(e=>!e.options.blocking)}openWindow(e){if(e.options.win_id){const t=this.getWindowById(e.options.win_id);if(t){t.focus();return}}e.addToManager(this),this.windows.push(e)}removeWindow(e){this.windows.splice(this.windows.indexOf(e),1)}getWindowById(e){for(const t of this.windows)if(t.options.win_id==e)return t}}class Zs{options=K;events=ae;themes=le;renderer;ticker;stage;view;chartManager;windowManager;menubarManager;actionHistory;lastWidth=window.innerWidth;lastHeight=window.innerHeight;constructor(){if(Vt.setDefaultProps({duration:[200,100],theme:"sm"}),window.nw){const e=nw.Window.get();nw.App.on("open",t=>{if(!t||t?.length===0){nw.Window.open(window.location.href);return}let r="";for(let n of t)if(n.startsWith("file://")&&(n=n.substring(7)),ju(n)==".ssc"){r=n;break}else r==""&&ju(n)==".sm"&&(r=n);r!=""&&(this.chartManager.loadSM(r),this.windowManager.getWindowById("select_sm_initial")?.closeWindow())}),window.addEventListener("keydown",t=>{t.key=="r"&&(t.metaKey||t.ctrlKey)&&(t.preventDefault(),e.reload()),t.code=="KeyW"&&(t.metaKey||t.ctrlKey)&&(t.preventDefault(),e.close()),process.versions["nw-flavor"]=="sdk"&&t.code=="KeyI"&&t.metaKey&&t.altKey&&(t.preventDefault(),e.showDevTools())}),e.on("enter-fullscreen",()=>{K.app.fullscreen=e.isFullscreen}),e.on("resize",(t,r)=>{e.isFullscreen||(K.app.width=t,K.app.height=r)}),e.on("restore",()=>{K.app.fullscreen=e.isFullscreen}),this.checkAppVersion()}if(this.checkCoreVersion(),K.loadOptions(),Wt(),V0.load(this),window.nw){const e=nw.Window.get();K.app.fullscreen?e.enterFullscreen():e.resizeTo(K.app.width,K.app.height)}if(setInterval(()=>K.saveOptions(),1e4),K.general.smoothAnimations&&document.body.classList.add("animated"),this.registerFonts(),this.view=document.getElementById("pixi"),document.oncontextmenu=e=>{e.preventDefault(),this.chartManager.loadedChart&&e.target==this.view&&Je.open(this,e)},this.view.onmousedown=()=>{Je.close()},this.stage=new Zt,this.stage.sortableChildren=!0,this.renderer=new Xt({backgroundColor:1579292,antialias:K.performance.antialiasing,width:this.view.clientWidth,height:this.view.clientHeight,resolution:K.performance.resolution,autoDensity:!0,view:this.view,powerPreference:"low-power"}),this.ticker=new Yt,this.ticker.maxFPS=0,this.ticker.add(()=>{const e=performance.now();this.renderer.render(this.stage),Qe.instance?.addFrameTimeValue(performance.now()-e),performance.memory?.usedJSHeapSize&&Qe.instance?.addMemoryTimeValue(performance.memory.usedJSHeapSize),sr()},Kt.LOW),this.ticker.start(),Jt.init(this.renderer),this.chartManager=new Qt(this),this.menubarManager=new ic(this,document.getElementById("menubar")),this.windowManager=new Ws(this,document.getElementById("windows")),this.actionHistory=new u0(this),this.registerListeners(),!J.hidePoweredByText&&ur()){const e=document.getElementById("embed");e.appendChild(document.createTextNode("Powered by "));const t=document.createElement("a");if(t.href="https://tillvit.github.io/smeditor/",t.innerText="SMEditor",t.target="_blank",e.appendChild(t),J.url!=null){e.appendChild(document.createTextNode(" | Open this chart in a "));const r=document.createElement("a"),n=new URL(location.origin+"/smeditor/app/");r.innerText="new tab",r.target="_blank",n.searchParams.append("url",J.url),J.chartType!==null&&n.searchParams.append("chartType",J.chartType),J.chartIndex!==null&&n.searchParams.append("chartIndex",J.chartIndex+""),r.href=n.toString(),e.appendChild(r)}}e0.initFileSystem().then(()=>{if(J.url){this.chartManager.loadSM(J.url).then(()=>{const e=this.chartManager.loadedSM;if(!e)return;let t;if(J.chartType!=null&&(t=e.charts[J.chartType],t===void 0)){r0.createFormatted(`Couldn't find chart with type ${J.chartType}`,"warn");return}if(t===void 0){const n=Object.keys(e.charts);if(n.length==0||(t=e.charts[n[0]],t.length==0))return}let r;if(J.chartIndex!=null&&(r=t.at(J.chartIndex),r===void 0)){r0.createFormatted(`Couldn't find chart with index ${J.chartIndex}`,"warn");return}r===void 0&&(r=t.at(-1),!r)||this.chartManager.loadChart(r)});return}this.windowManager.openWindow(new er(this))}),window.onbeforeunload=e=>{if(u0.instance.isDirty()&&K.general.warnBeforeExit)return e.preventDefault(),e.returnValue="Are you sure you want to exit?"},window.onunload=()=>{K.saveOptions()},le.loadTheme(K.general.theme)}registerFonts(){t0.from("Main",{fontFamily:"Assistant",fontSize:20,fill:"white"},{chars:[["a","z"],["A","Z"],"!@#$%^&*()~{}[]:.-?=,_","0123456789/"," "],resolution:window.devicePixelRatio}),t0.from("Fancy",{fontFamily:"Assistant",fontSize:40,fontWeight:"700",fill:["#dddddd","#ffffff"],fillGradientType:tr.LINEAR_VERTICAL,stroke:11184810,strokeThickness:3},{chars:[["a","z"],["A","Z"],"!@#$%^&*()~{}[]:.-?=,_","0123456789/"," "],resolution:window.devicePixelRatio})}registerListeners(){this.view.addEventListener("mousedown",()=>{this.windowManager.unfocusAll()}),ae.on("themeChanged",()=>{this.renderer.background.color=new rr(le.getCurrentTheme()["editor-bg"]).toNumber()}),window.addEventListener("keydown",function(e){e.code=="Enter"&&e.target instanceof HTMLButtonElement&&e.preventDefault()}),window.addEventListener("dragstart",function(e){e.target instanceof HTMLImageElement&&e.preventDefault()}),setInterval(()=>{const e=window.innerWidth,t=window.innerHeight-document.getElementById("menubar").clientHeight-document.getElementById("playback-options").clientHeight;(this.lastHeight!=t||this.lastWidth!=e)&&(this.lastHeight=t,this.lastWidth=e,this.onResize(e,t),ae.emit("resize"))},100),window.addEventListener("dragover",e=>{e.preventDefault(),e.dataTransfer.dropEffect="copy"}),window.addEventListener("drop",e=>{if(window.nw){e.stopPropagation(),e.preventDefault();let t="";for(const r of e.dataTransfer.files)if(r.path)if(ju(r.path)==".ssc"){t=r.path;break}else t==""&&ju(r.path)==".sm"&&(t=r.path);t!=""&&(this.chartManager.loadSM(t),this.windowManager.getWindowById("select_sm_initial")?.closeWindow())}else e0.handleDropEvent(e).then(t=>{const r=new nr(this,{title:"Select an sm/ssc file...",accepted_file_types:[".sm",".ssc"],disableClose:!0,callback:n=>{this.chartManager.loadSM(n),this.windowManager.getWindowById("select_sm_initial")?.closeWindow()},onload:()=>{r.getAcceptableFile(t??"").then(n=>r.selectPath(n))}});this.windowManager.openWindow(r)})})}onResize(e,t){this.renderer.screen.width=e,this.renderer.screen.height=t,this.view.width=e*this.renderer.resolution,this.view.height=t*this.renderer.resolution,this.view.style.width=`${e}px`,this.view.style.height=`${t}px`}checkAppVersion(){if(!window.nw)return;const e=nw.require("nw.gui"),t={stable:3,beta:2,alpha:1,nightly:0};let r="win";process.platform=="darwin"?r=nw.require("os").arch()=="arm64"?"mac-arm":"mac-x64":process.platform=="linux"&&(r="linux"),fetch("/smeditor/assets/app/versions.json").then(n=>n.json()).then(n=>{n=n.sort((c,o)=>t[c.type]!=t[o.type]?t[o.type]-t[c.type]:o.date-c.date);const i=n[0];A0.lt(e.App.manifest.version,i.version)&&localStorage.getItem("downloadedVersion")!==i.version&&ir.open(i.version,i.downloads[r])})}checkCoreVersion(){const e=tc({onNeedRefresh(){cr.open(e),console.log("Found new version")},onOfflineReady(){or.open(),console.log("Offline use ready")}});fetch("/smeditor/assets/app/changelog.json").then(t=>t.json()).then(t=>{const r=t[0],n=localStorage.getItem("coreVersion");n!==null&&A0.lt(n,r.version)&&this.windowManager.openWindow(new Vs(this,{version:r.version,markdown:r.changelog})),localStorage.setItem("coreVersion",r.version)})}}document.querySelector("body").innerHTML=`
+import{g as At,_ as Zt,F as W,M as Jt,K as Qt,a as Ot,I as er,G as tr,N as rr,O as k,E as Ne,T as Ae,t as nr,l as sr,C as Je,b as ir,R as or,c as ar,D as Qe,U as lr,B as cr,d as hr,A as et,i as fr,e as tt,f as ur,h as fe,j as rt,k as dr,m as pr,n as mr,o as Er,p as wr,W as nt,q as gr,r as vr,s as $r}from"./ChartManager-3c3d6f39.js";var be={exports:{}};const Rr="2.0.0",Ct=256,Ir=Number.MAX_SAFE_INTEGER||9007199254740991,yr=16,Lr=Ct-6,Tr=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var Ee={MAX_LENGTH:Ct,MAX_SAFE_COMPONENT_LENGTH:yr,MAX_SAFE_BUILD_LENGTH:Lr,MAX_SAFE_INTEGER:Ir,RELEASE_TYPES:Tr,SEMVER_SPEC_VERSION:Rr,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};const Sr=typeof process=="object"&&process.env&&{}.NODE_DEBUG&&/\bsemver\b/i.test({}.NODE_DEBUG)?(...i)=>console.error("SEMVER",...i):()=>{};var we=Sr;(function(i,e){const{MAX_SAFE_COMPONENT_LENGTH:t,MAX_SAFE_BUILD_LENGTH:s,MAX_LENGTH:o}=Ee,f=we;e=i.exports={};const u=e.re=[],w=e.safeRe=[],l=e.src=[],c=e.t={};let m=0;const v="[a-zA-Z0-9-]",O=[["\\s",1],["\\d",o],[v,s]],I=B=>{for(const[U,q]of O)B=B.split(`${U}*`).join(`${U}{0,${q}}`).split(`${U}+`).join(`${U}{1,${q}}`);return B},T=(B,U,q)=>{const te=I(U),b=m++;f(B,b,U),c[B]=b,l[b]=U,u[b]=new RegExp(U,q?"g":void 0),w[b]=new RegExp(te,q?"g":void 0)};T("NUMERICIDENTIFIER","0|[1-9]\\d*"),T("NUMERICIDENTIFIERLOOSE","\\d+"),T("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${v}*`),T("MAINVERSION",`(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})`),T("MAINVERSIONLOOSE",`(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})`),T("PRERELEASEIDENTIFIER",`(?:${l[c.NUMERICIDENTIFIER]}|${l[c.NONNUMERICIDENTIFIER]})`),T("PRERELEASEIDENTIFIERLOOSE",`(?:${l[c.NUMERICIDENTIFIERLOOSE]}|${l[c.NONNUMERICIDENTIFIER]})`),T("PRERELEASE",`(?:-(${l[c.PRERELEASEIDENTIFIER]}(?:\\.${l[c.PRERELEASEIDENTIFIER]})*))`),T("PRERELEASELOOSE",`(?:-?(${l[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[c.PRERELEASEIDENTIFIERLOOSE]})*))`),T("BUILDIDENTIFIER",`${v}+`),T("BUILD",`(?:\\+(${l[c.BUILDIDENTIFIER]}(?:\\.${l[c.BUILDIDENTIFIER]})*))`),T("FULLPLAIN",`v?${l[c.MAINVERSION]}${l[c.PRERELEASE]}?${l[c.BUILD]}?`),T("FULL",`^${l[c.FULLPLAIN]}$`),T("LOOSEPLAIN",`[v=\\s]*${l[c.MAINVERSIONLOOSE]}${l[c.PRERELEASELOOSE]}?${l[c.BUILD]}?`),T("LOOSE",`^${l[c.LOOSEPLAIN]}$`),T("GTLT","((?:<|>)?=?)"),T("XRANGEIDENTIFIERLOOSE",`${l[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),T("XRANGEIDENTIFIER",`${l[c.NUMERICIDENTIFIER]}|x|X|\\*`),T("XRANGEPLAIN",`[v=\\s]*(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:${l[c.PRERELEASE]})?${l[c.BUILD]}?)?)?`),T("XRANGEPLAINLOOSE",`[v=\\s]*(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:${l[c.PRERELEASELOOSE]})?${l[c.BUILD]}?)?)?`),T("XRANGE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAIN]}$`),T("XRANGELOOSE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAINLOOSE]}$`),T("COERCEPLAIN",`(^|[^\\d])(\\d{1,${t}})(?:\\.(\\d{1,${t}}))?(?:\\.(\\d{1,${t}}))?`),T("COERCE",`${l[c.COERCEPLAIN]}(?:$|[^\\d])`),T("COERCEFULL",l[c.COERCEPLAIN]+`(?:${l[c.PRERELEASE]})?(?:${l[c.BUILD]})?(?:$|[^\\d])`),T("COERCERTL",l[c.COERCE],!0),T("COERCERTLFULL",l[c.COERCEFULL],!0),T("LONETILDE","(?:~>?)"),T("TILDETRIM",`(\\s*)${l[c.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",T("TILDE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAIN]}$`),T("TILDELOOSE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAINLOOSE]}$`),T("LONECARET","(?:\\^)"),T("CARETTRIM",`(\\s*)${l[c.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",T("CARET",`^${l[c.LONECARET]}${l[c.XRANGEPLAIN]}$`),T("CARETLOOSE",`^${l[c.LONECARET]}${l[c.XRANGEPLAINLOOSE]}$`),T("COMPARATORLOOSE",`^${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]})$|^$`),T("COMPARATOR",`^${l[c.GTLT]}\\s*(${l[c.FULLPLAIN]})$|^$`),T("COMPARATORTRIM",`(\\s*)${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]}|${l[c.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",T("HYPHENRANGE",`^\\s*(${l[c.XRANGEPLAIN]})\\s+-\\s+(${l[c.XRANGEPLAIN]})\\s*$`),T("HYPHENRANGELOOSE",`^\\s*(${l[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[c.XRANGEPLAINLOOSE]})\\s*$`),T("STAR","(<|>)?=?\\s*\\*"),T("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),T("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(be,be.exports);var oe=be.exports;const Nr=Object.freeze({loose:!0}),Ar=Object.freeze({}),Or=i=>i?typeof i!="object"?Nr:i:Ar;var De=Or;const st=/^[0-9]+$/,_t=(i,e)=>{const t=st.test(i),s=st.test(e);return t&&s&&(i=+i,e=+e),i===e?0:t&&!s?-1:s&&!t?1:i_t(e,i);var Pt={compareIdentifiers:_t,rcompareIdentifiers:Cr};const ue=we,{MAX_LENGTH:it,MAX_SAFE_INTEGER:de}=Ee,{safeRe:ot,t:at}=oe,_r=De,{compareIdentifiers:ne}=Pt;let Pr=class Z{constructor(e,t){if(t=_r(t),e instanceof Z){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>it)throw new TypeError(`version is longer than ${it} characters`);ue("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const s=e.trim().match(t.loose?ot[at.LOOSE]:ot[at.FULL]);if(!s)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>de||this.major<0)throw new TypeError("Invalid major version");if(this.minor>de||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>de||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(o=>{if(/^[0-9]+$/.test(o)){const f=+o;if(f>=0&&f=0;)typeof this.prerelease[f]=="number"&&(this.prerelease[f]++,f=-2);if(f===-1){if(t===this.prerelease.join(".")&&s===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(o)}}if(t){let f=[t,o];s===!1&&(f=[t]),ne(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=f):this.prerelease=f}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var V=Pr;const lt=V,xr=(i,e,t=!1)=>{if(i instanceof lt)return i;try{return new lt(i,e)}catch(s){if(!t)return null;throw s}};var se=xr;const br=se,Dr=(i,e)=>{const t=br(i,e);return t?t.version:null};var Fr=Dr;const jr=se,Gr=(i,e)=>{const t=jr(i.trim().replace(/^[=v]+/,""),e);return t?t.version:null};var kr=Gr;const ct=V,Wr=(i,e,t,s,o)=>{typeof t=="string"&&(o=s,s=t,t=void 0);try{return new ct(i instanceof ct?i.version:i,t).inc(e,s,o).version}catch{return null}};var Mr=Wr;const ht=se,Vr=(i,e)=>{const t=ht(i,null,!0),s=ht(e,null,!0),o=t.compare(s);if(o===0)return null;const f=o>0,u=f?t:s,w=f?s:t,l=!!u.prerelease.length;if(!!w.prerelease.length&&!l)return!w.patch&&!w.minor?"major":u.patch?"patch":u.minor?"minor":"major";const m=l?"pre":"";return t.major!==s.major?m+"major":t.minor!==s.minor?m+"minor":t.patch!==s.patch?m+"patch":"prerelease"};var Ur=Vr;const Xr=V,Hr=(i,e)=>new Xr(i,e).major;var Br=Hr;const qr=V,zr=(i,e)=>new qr(i,e).minor;var Yr=zr;const Kr=V,Zr=(i,e)=>new Kr(i,e).patch;var Jr=Zr;const Qr=se,en=(i,e)=>{const t=Qr(i,e);return t&&t.prerelease.length?t.prerelease:null};var tn=en;const ft=V,rn=(i,e,t)=>new ft(i,t).compare(new ft(e,t));var Y=rn;const nn=Y,sn=(i,e,t)=>nn(e,i,t);var on=sn;const an=Y,ln=(i,e)=>an(i,e,!0);var cn=ln;const ut=V,hn=(i,e,t)=>{const s=new ut(i,t),o=new ut(e,t);return s.compare(o)||s.compareBuild(o)};var Fe=hn;const fn=Fe,un=(i,e)=>i.sort((t,s)=>fn(t,s,e));var dn=un;const pn=Fe,mn=(i,e)=>i.sort((t,s)=>pn(s,t,e));var En=mn;const wn=Y,gn=(i,e,t)=>wn(i,e,t)>0;var ge=gn;const vn=Y,$n=(i,e,t)=>vn(i,e,t)<0;var je=$n;const Rn=Y,In=(i,e,t)=>Rn(i,e,t)===0;var xt=In;const yn=Y,Ln=(i,e,t)=>yn(i,e,t)!==0;var bt=Ln;const Tn=Y,Sn=(i,e,t)=>Tn(i,e,t)>=0;var Ge=Sn;const Nn=Y,An=(i,e,t)=>Nn(i,e,t)<=0;var ke=An;const On=xt,Cn=bt,_n=ge,Pn=Ge,xn=je,bn=ke,Dn=(i,e,t,s)=>{switch(e){case"===":return typeof i=="object"&&(i=i.version),typeof t=="object"&&(t=t.version),i===t;case"!==":return typeof i=="object"&&(i=i.version),typeof t=="object"&&(t=t.version),i!==t;case"":case"=":case"==":return On(i,t,s);case"!=":return Cn(i,t,s);case">":return _n(i,t,s);case">=":return Pn(i,t,s);case"<":return xn(i,t,s);case"<=":return bn(i,t,s);default:throw new TypeError(`Invalid operator: ${e}`)}};var Dt=Dn;const Fn=V,jn=se,{safeRe:pe,t:me}=oe,Gn=(i,e)=>{if(i instanceof Fn)return i;if(typeof i=="number"&&(i=String(i)),typeof i!="string")return null;e=e||{};let t=null;if(!e.rtl)t=i.match(e.includePrerelease?pe[me.COERCEFULL]:pe[me.COERCE]);else{const l=e.includePrerelease?pe[me.COERCERTLFULL]:pe[me.COERCERTL];let c;for(;(c=l.exec(i))&&(!t||t.index+t[0].length!==i.length);)(!t||c.index+c[0].length!==t.index+t[0].length)&&(t=c),l.lastIndex=c.index+c[1].length+c[2].length;l.lastIndex=-1}if(t===null)return null;const s=t[2],o=t[3]||"0",f=t[4]||"0",u=e.includePrerelease&&t[5]?`-${t[5]}`:"",w=e.includePrerelease&&t[6]?`+${t[6]}`:"";return jn(`${s}.${o}.${f}${u}${w}`,e)};var kn=Gn;class Wn{constructor(){this.max=1e3,this.map=new Map}get(e){const t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){const o=this.map.keys().next().value;this.delete(o)}this.map.set(e,t)}return this}}var Mn=Wn,Oe,dt;function K(){if(dt)return Oe;dt=1;const i=/\s+/g;class e{constructor(p,y){if(y=o(y),p instanceof e)return p.loose===!!y.loose&&p.includePrerelease===!!y.includePrerelease?p:new e(p.raw,y);if(p instanceof f)return this.raw=p.value,this.set=[[p]],this.formatted=void 0,this;if(this.options=y,this.loose=!!y.loose,this.includePrerelease=!!y.includePrerelease,this.raw=p.trim().replace(i," "),this.set=this.raw.split("||").map(g=>this.parseRange(g.trim())).filter(g=>g.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const g=this.set[0];if(this.set=this.set.filter(L=>!B(L[0])),this.set.length===0)this.set=[g];else if(this.set.length>1){for(const L of this.set)if(L.length===1&&U(L[0])){this.set=[L];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let p=0;p0&&(this.formatted+="||");const y=this.set[p];for(let g=0;g0&&(this.formatted+=" "),this.formatted+=y[g].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(p){const g=((this.options.includePrerelease&&I)|(this.options.loose&&T))+":"+p,L=s.get(g);if(L)return L;const $=this.options.loose,N=$?l[c.HYPHENRANGELOOSE]:l[c.HYPHENRANGE];p=p.replace(N,ce(this.options.includePrerelease)),u("hyphen replace",p),p=p.replace(l[c.COMPARATORTRIM],m),u("comparator trim",p),p=p.replace(l[c.TILDETRIM],v),u("tilde trim",p),p=p.replace(l[c.CARETTRIM],O),u("caret trim",p);let C=p.split(" ").map(D=>te(D,this.options)).join(" ").split(/\s+/).map(D=>Le(D,this.options));$&&(C=C.filter(D=>(u("loose invalid filter",D,this.options),!!D.match(l[c.COMPARATORLOOSE])))),u("range list",C);const A=new Map,x=C.map(D=>new f(D,this.options));for(const D of x){if(B(D))return[D];A.set(D.value,D)}A.size>1&&A.has("")&&A.delete("");const G=[...A.values()];return s.set(g,G),G}intersects(p,y){if(!(p instanceof e))throw new TypeError("a Range is required");return this.set.some(g=>q(g,y)&&p.set.some(L=>q(L,y)&&g.every($=>L.every(N=>$.intersects(N,y)))))}test(p){if(!p)return!1;if(typeof p=="string")try{p=new w(p,this.options)}catch{return!1}for(let y=0;yE.value==="<0.0.0-0",U=E=>E.value==="",q=(E,p)=>{let y=!0;const g=E.slice();let L=g.pop();for(;y&&g.length;)y=g.every($=>L.intersects($,p)),L=g.pop();return y},te=(E,p)=>(u("comp",E,p),E=ae(E,p),u("caret",E),E=H(E,p),u("tildes",E),E=le(E,p),u("xrange",E),E=ye(E,p),u("stars",E),E),b=E=>!E||E.toLowerCase()==="x"||E==="*",H=(E,p)=>E.trim().split(/\s+/).map(y=>Re(y,p)).join(" "),Re=(E,p)=>{const y=p.loose?l[c.TILDELOOSE]:l[c.TILDE];return E.replace(y,(g,L,$,N,C)=>{u("tilde",E,g,L,$,N,C);let A;return b(L)?A="":b($)?A=`>=${L}.0.0 <${+L+1}.0.0-0`:b(N)?A=`>=${L}.${$}.0 <${L}.${+$+1}.0-0`:C?(u("replaceTilde pr",C),A=`>=${L}.${$}.${N}-${C} <${L}.${+$+1}.0-0`):A=`>=${L}.${$}.${N} <${L}.${+$+1}.0-0`,u("tilde return",A),A})},ae=(E,p)=>E.trim().split(/\s+/).map(y=>X(y,p)).join(" "),X=(E,p)=>{u("caret",E,p);const y=p.loose?l[c.CARETLOOSE]:l[c.CARET],g=p.includePrerelease?"-0":"";return E.replace(y,(L,$,N,C,A)=>{u("caret",E,L,$,N,C,A);let x;return b($)?x="":b(N)?x=`>=${$}.0.0${g} <${+$+1}.0.0-0`:b(C)?$==="0"?x=`>=${$}.${N}.0${g} <${$}.${+N+1}.0-0`:x=`>=${$}.${N}.0${g} <${+$+1}.0.0-0`:A?(u("replaceCaret pr",A),$==="0"?N==="0"?x=`>=${$}.${N}.${C}-${A} <${$}.${N}.${+C+1}-0`:x=`>=${$}.${N}.${C}-${A} <${$}.${+N+1}.0-0`:x=`>=${$}.${N}.${C}-${A} <${+$+1}.0.0-0`):(u("no pr"),$==="0"?N==="0"?x=`>=${$}.${N}.${C}${g} <${$}.${N}.${+C+1}-0`:x=`>=${$}.${N}.${C}${g} <${$}.${+N+1}.0-0`:x=`>=${$}.${N}.${C} <${+$+1}.0.0-0`),u("caret return",x),x})},le=(E,p)=>(u("replaceXRanges",E,p),E.split(/\s+/).map(y=>Ie(y,p)).join(" ")),Ie=(E,p)=>{E=E.trim();const y=p.loose?l[c.XRANGELOOSE]:l[c.XRANGE];return E.replace(y,(g,L,$,N,C,A)=>{u("xRange",E,g,L,$,N,C,A);const x=b($),G=x||b(N),D=G||b(C),ee=D;return L==="="&&ee&&(L=""),A=p.includePrerelease?"-0":"",x?L===">"||L==="<"?g="<0.0.0-0":g="*":L&&ee?(G&&(N=0),C=0,L===">"?(L=">=",G?($=+$+1,N=0,C=0):(N=+N+1,C=0)):L==="<="&&(L="<",G?$=+$+1:N=+N+1),L==="<"&&(A="-0"),g=`${L+$}.${N}.${C}${A}`):G?g=`>=${$}.0.0${A} <${+$+1}.0.0-0`:D&&(g=`>=${$}.${N}.0${A} <${$}.${+N+1}.0-0`),u("xRange return",g),g})},ye=(E,p)=>(u("replaceStars",E,p),E.trim().replace(l[c.STAR],"")),Le=(E,p)=>(u("replaceGTE0",E,p),E.trim().replace(l[p.includePrerelease?c.GTE0PRE:c.GTE0],"")),ce=E=>(p,y,g,L,$,N,C,A,x,G,D,ee)=>(b(g)?y="":b(L)?y=`>=${g}.0.0${E?"-0":""}`:b($)?y=`>=${g}.${L}.0${E?"-0":""}`:N?y=`>=${y}`:y=`>=${y}${E?"-0":""}`,b(x)?A="":b(G)?A=`<${+x+1}.0.0-0`:b(D)?A=`<${x}.${+G+1}.0-0`:ee?A=`<=${x}.${G}.${D}-${ee}`:E?A=`<${x}.${G}.${+D+1}-0`:A=`<=${A}`,`${y} ${A}`.trim()),J=(E,p,y)=>{for(let g=0;g0){const L=E[g].semver;if(L.major===p.major&&L.minor===p.minor&&L.patch===p.patch)return!0}return!1}return!0};return Oe}var Ce,pt;function ve(){if(pt)return Ce;pt=1;const i=Symbol("SemVer ANY");class e{static get ANY(){return i}constructor(m,v){if(v=t(v),m instanceof e){if(m.loose===!!v.loose)return m;m=m.value}m=m.trim().split(/\s+/).join(" "),u("comparator",m,v),this.options=v,this.loose=!!v.loose,this.parse(m),this.semver===i?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(m){const v=this.options.loose?s[o.COMPARATORLOOSE]:s[o.COMPARATOR],O=m.match(v);if(!O)throw new TypeError(`Invalid comparator: ${m}`);this.operator=O[1]!==void 0?O[1]:"",this.operator==="="&&(this.operator=""),O[2]?this.semver=new w(O[2],this.options.loose):this.semver=i}toString(){return this.value}test(m){if(u("Comparator.test",m,this.options.loose),this.semver===i||m===i)return!0;if(typeof m=="string")try{m=new w(m,this.options)}catch{return!1}return f(m,this.operator,this.semver,this.options)}intersects(m,v){if(!(m instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new l(m.value,v).test(this.value):m.operator===""?m.value===""?!0:new l(this.value,v).test(m.semver):(v=t(v),v.includePrerelease&&(this.value==="<0.0.0-0"||m.value==="<0.0.0-0")||!v.includePrerelease&&(this.value.startsWith("<0.0.0")||m.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&m.operator.startsWith(">")||this.operator.startsWith("<")&&m.operator.startsWith("<")||this.semver.version===m.semver.version&&this.operator.includes("=")&&m.operator.includes("=")||f(this.semver,"<",m.semver,v)&&this.operator.startsWith(">")&&m.operator.startsWith("<")||f(this.semver,">",m.semver,v)&&this.operator.startsWith("<")&&m.operator.startsWith(">")))}}Ce=e;const t=De,{safeRe:s,t:o}=oe,f=Dt,u=we,w=V,l=K();return Ce}const Vn=K(),Un=(i,e,t)=>{try{e=new Vn(e,t)}catch{return!1}return e.test(i)};var $e=Un;const Xn=K(),Hn=(i,e)=>new Xn(i,e).set.map(t=>t.map(s=>s.value).join(" ").trim().split(" "));var Bn=Hn;const qn=V,zn=K(),Yn=(i,e,t)=>{let s=null,o=null,f=null;try{f=new zn(e,t)}catch{return null}return i.forEach(u=>{f.test(u)&&(!s||o.compare(u)===-1)&&(s=u,o=new qn(s,t))}),s};var Kn=Yn;const Zn=V,Jn=K(),Qn=(i,e,t)=>{let s=null,o=null,f=null;try{f=new Jn(e,t)}catch{return null}return i.forEach(u=>{f.test(u)&&(!s||o.compare(u)===1)&&(s=u,o=new Zn(s,t))}),s};var es=Qn;const _e=V,ts=K(),mt=ge,rs=(i,e)=>{i=new ts(i,e);let t=new _e("0.0.0");if(i.test(t)||(t=new _e("0.0.0-0"),i.test(t)))return t;t=null;for(let s=0;s{const w=new _e(u.semver.version);switch(u.operator){case">":w.prerelease.length===0?w.patch++:w.prerelease.push(0),w.raw=w.format();case"":case">=":(!f||mt(w,f))&&(f=w);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${u.operator}`)}}),f&&(!t||mt(t,f))&&(t=f)}return t&&i.test(t)?t:null};var ns=rs;const ss=K(),is=(i,e)=>{try{return new ss(i,e).range||"*"}catch{return null}};var os=is;const as=V,Ft=ve(),{ANY:ls}=Ft,cs=K(),hs=$e,Et=ge,wt=je,fs=ke,us=Ge,ds=(i,e,t,s)=>{i=new as(i,s),e=new cs(e,s);let o,f,u,w,l;switch(t){case">":o=Et,f=fs,u=wt,w=">",l=">=";break;case"<":o=wt,f=us,u=Et,w="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(hs(i,e,s))return!1;for(let c=0;c{I.semver===ls&&(I=new Ft(">=0.0.0")),v=v||I,O=O||I,o(I.semver,v.semver,s)?v=I:u(I.semver,O.semver,s)&&(O=I)}),v.operator===w||v.operator===l||(!O.operator||O.operator===w)&&f(i,O.semver))return!1;if(O.operator===l&&u(i,O.semver))return!1}return!0};var We=ds;const ps=We,ms=(i,e,t)=>ps(i,e,">",t);var Es=ms;const ws=We,gs=(i,e,t)=>ws(i,e,"<",t);var vs=gs;const gt=K(),$s=(i,e,t)=>(i=new gt(i,t),e=new gt(e,t),i.intersects(e,t));var Rs=$s;const Is=$e,ys=Y;var Ls=(i,e,t)=>{const s=[];let o=null,f=null;const u=i.sort((m,v)=>ys(m,v,t));for(const m of u)Is(m,e,t)?(f=m,o||(o=m)):(f&&s.push([o,f]),f=null,o=null);o&&s.push([o,null]);const w=[];for(const[m,v]of s)m===v?w.push(m):!v&&m===u[0]?w.push("*"):v?m===u[0]?w.push(`<=${v}`):w.push(`${m} - ${v}`):w.push(`>=${m}`);const l=w.join(" || "),c=typeof e.raw=="string"?e.raw:String(e);return l.length{if(i===e)return!0;i=new vt(i,t),e=new vt(e,t);let s=!1;e:for(const o of i.set){for(const f of e.set){const u=Ns(o,f,t);if(s=s||u!==null,u)continue e}if(s)return!1}return!0},Ss=[new Me(">=0.0.0-0")],$t=[new Me(">=0.0.0")],Ns=(i,e,t)=>{if(i===e)return!0;if(i.length===1&&i[0].semver===Pe){if(e.length===1&&e[0].semver===Pe)return!0;t.includePrerelease?i=Ss:i=$t}if(e.length===1&&e[0].semver===Pe){if(t.includePrerelease)return!0;e=$t}const s=new Set;let o,f;for(const I of i)I.operator===">"||I.operator===">="?o=Rt(o,I,t):I.operator==="<"||I.operator==="<="?f=It(f,I,t):s.add(I.semver);if(s.size>1)return null;let u;if(o&&f){if(u=Ve(o.semver,f.semver,t),u>0)return null;if(u===0&&(o.operator!==">="||f.operator!=="<="))return null}for(const I of s){if(o&&!ie(I,String(o),t)||f&&!ie(I,String(f),t))return null;for(const T of e)if(!ie(I,String(T),t))return!1;return!0}let w,l,c,m,v=f&&!t.includePrerelease&&f.semver.prerelease.length?f.semver:!1,O=o&&!t.includePrerelease&&o.semver.prerelease.length?o.semver:!1;v&&v.prerelease.length===1&&f.operator==="<"&&v.prerelease[0]===0&&(v=!1);for(const I of e){if(m=m||I.operator===">"||I.operator===">=",c=c||I.operator==="<"||I.operator==="<=",o){if(O&&I.semver.prerelease&&I.semver.prerelease.length&&I.semver.major===O.major&&I.semver.minor===O.minor&&I.semver.patch===O.patch&&(O=!1),I.operator===">"||I.operator===">="){if(w=Rt(o,I,t),w===I&&w!==o)return!1}else if(o.operator===">="&&!ie(o.semver,String(I),t))return!1}if(f){if(v&&I.semver.prerelease&&I.semver.prerelease.length&&I.semver.major===v.major&&I.semver.minor===v.minor&&I.semver.patch===v.patch&&(v=!1),I.operator==="<"||I.operator==="<="){if(l=It(f,I,t),l===I&&l!==f)return!1}else if(f.operator==="<="&&!ie(f.semver,String(I),t))return!1}if(!I.operator&&(f||o)&&u!==0)return!1}return!(o&&c&&!f&&u!==0||f&&m&&!o&&u!==0||O||v)},Rt=(i,e,t)=>{if(!i)return e;const s=Ve(i.semver,e.semver,t);return s>0?i:s<0||e.operator===">"&&i.operator===">="?e:i},It=(i,e,t)=>{if(!i)return e;const s=Ve(i.semver,e.semver,t);return s<0?i:s>0||e.operator==="<"&&i.operator==="<="?e:i};var As=Ts;const xe=oe,yt=Ee,Os=V,Lt=Pt,Cs=se,_s=Fr,Ps=kr,xs=Mr,bs=Ur,Ds=Br,Fs=Yr,js=Jr,Gs=tn,ks=Y,Ws=on,Ms=cn,Vs=Fe,Us=dn,Xs=En,Hs=ge,Bs=je,qs=xt,zs=bt,Ys=Ge,Ks=ke,Zs=Dt,Js=kn,Qs=ve(),ei=K(),ti=$e,ri=Bn,ni=Kn,si=es,ii=ns,oi=os,ai=We,li=Es,ci=vs,hi=Rs,fi=Ls,ui=As;var di={parse:Cs,valid:_s,clean:Ps,inc:xs,diff:bs,major:Ds,minor:Fs,patch:js,prerelease:Gs,compare:ks,rcompare:Ws,compareLoose:Ms,compareBuild:Vs,sort:Us,rsort:Xs,gt:Hs,lt:Bs,eq:qs,neq:zs,gte:Ys,lte:Ks,cmp:Zs,coerce:Js,Comparator:Qs,Range:ei,satisfies:ti,toComparators:ri,maxSatisfying:ni,minSatisfying:si,minVersion:ii,validRange:oi,outside:ai,gtr:li,ltr:ci,intersects:hi,simplifyRange:fi,subset:ui,SemVer:Os,re:xe.re,src:xe.src,tokens:xe.t,SEMVER_SPEC_VERSION:yt.SEMVER_SPEC_VERSION,RELEASE_TYPES:yt.RELEASE_TYPES,compareIdentifiers:Lt.compareIdentifiers,rcompareIdentifiers:Lt.rcompareIdentifiers};const Tt=At(di);function pi(i={}){const{immediate:e=!1,onNeedRefresh:t,onOfflineReady:s,onRegistered:o,onRegisteredSW:f,onRegisterError:u}=i;let w,l;const c=async(v=!0)=>{await l};async function m(){if("serviceWorker"in navigator){const{Workbox:v}=await Zt(()=>import("./workbox-window.prod.es5-c46a1faa.js"),[]);w=new v("/smeditor/sw.js",{scope:"/smeditor/",type:"classic"}),w.addEventListener("activated",O=>{(O.isUpdate||O.isExternal)&&window.location.reload()}),w.addEventListener("installed",O=>{O.isUpdate||s?.()}),w.register({immediate:e}).then(O=>{f?f("/smeditor/sw.js",O):o?.(O)}).catch(O=>{u?.(O)})}}return l=m(),c}var jt={exports:{}};(function(i){(function(){function e(r,n,h){return r.call.apply(r.bind,arguments)}function t(r,n,h){if(!r)throw Error();if(2=n.f?_():r.fonts.load(Re(n.a),n.h).then(function(F){1<=F.length?S():setTimeout(P,25)},function(){_()})}P()}),d=null,R=new Promise(function(S,_){d=setTimeout(_,n.f)});Promise.race([R,a]).then(function(){d&&(clearTimeout(d),d=null),n.g(n.a)},function(){n.j(n.a)})};function N(r,n,h,a,d,R,S){this.v=r,this.B=n,this.c=h,this.a=a,this.s=S||"BESbswy",this.f={},this.w=d||3e3,this.u=R||null,this.m=this.j=this.h=this.g=null,this.g=new y(this.c,this.s),this.h=new y(this.c,this.s),this.j=new y(this.c,this.s),this.m=new y(this.c,this.s),r=new H(this.a.c+",serif",X(this.a)),r=L(r),this.g.a.style.cssText=r,r=new H(this.a.c+",sans-serif",X(this.a)),r=L(r),this.h.a.style.cssText=r,r=new H("serif",X(this.a)),r=L(r),this.j.a.style.cssText=r,r=new H("sans-serif",X(this.a)),r=L(r),this.m.a.style.cssText=r,g(this.g),g(this.h),g(this.j),g(this.m)}var C={D:"serif",C:"sans-serif"},A=null;function x(){if(A===null){var r=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);A=!!r&&(536>parseInt(r[1],10)||parseInt(r[1],10)===536&&11>=parseInt(r[2],10))}return A}N.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.m.a.offsetWidth,this.A=o(),D(this)};function G(r,n,h){for(var a in C)if(C.hasOwnProperty(a)&&n===r.f[C[a]]&&h===r.f[C[a]])return!0;return!1}function D(r){var n=r.g.a.offsetWidth,h=r.h.a.offsetWidth,a;(a=n===r.f.serif&&h===r.f["sans-serif"])||(a=x()&&G(r,n,h)),a?o()-r.A>=r.w?x()&&G(r,n,h)&&(r.u===null||r.u.hasOwnProperty(r.a.c))?Te(r,r.v):Te(r,r.B):ee(r):Te(r,r.v)}function ee(r){setTimeout(s(function(){D(this)},r),50)}function Te(r,n){setTimeout(s(function(){c(this.g.a),c(this.h.a),c(this.j.a),c(this.m.a),n(this.a)},r),0)}function Se(r,n,h){this.c=r,this.a=n,this.f=0,this.m=this.j=!1,this.s=h}var he=null;Se.prototype.g=function(r){var n=this.a;n.g&&m(n.f,[n.a.c("wf",r.c,X(r).toString(),"active")],[n.a.c("wf",r.c,X(r).toString(),"loading"),n.a.c("wf",r.c,X(r).toString(),"inactive")]),J(n,"fontactive",r),this.m=!0,Ue(this)},Se.prototype.h=function(r){var n=this.a;if(n.g){var h=v(n.f,n.a.c("wf",r.c,X(r).toString(),"active")),a=[],d=[n.a.c("wf",r.c,X(r).toString(),"loading")];h||a.push(n.a.c("wf",r.c,X(r).toString(),"inactive")),m(n.f,a,d)}J(n,"fontinactive",r),Ue(this)};function Ue(r){--r.f==0&&r.j&&(r.m?(r=r.a,r.g&&m(r.f,[r.a.c("wf","active")],[r.a.c("wf","loading"),r.a.c("wf","inactive")]),J(r,"active")):ce(r.a))}function Xe(r){this.j=r,this.a=new E,this.h=0,this.f=this.g=!0}Xe.prototype.load=function(r){this.c=new f(this.j,r.context||this.j),this.g=r.events!==!1,this.f=r.classes!==!1,kt(this,new ye(this.c,r),r)};function Gt(r,n,h,a,d){var R=--r.h==0;(r.f||r.g)&&setTimeout(function(){var S=d||null,_=a||null||{};if(h.length===0&&R)ce(n.a);else{n.f+=h.length,R&&(n.j=R);var P,F=[];for(P=0;Pthis.createElement(o));t.replaceChildren(...s)}createElement(e){if(e.type=="separator"){const t=document.createElement("div");return t.classList.add("separator"),t}if(e.type=="selection"||e.type=="checkbox"||e.type=="dropdown"){const t=document.createElement("div"),s=document.createElement("div"),o=document.createElement("div");let f;if(e.type=="selection"||e.type=="checkbox"){const u=Qt[e.id]??{label:e.id,combos:[],callback:()=>{}};f=document.createElement("div"),f.innerText=Ot.getKeybindString(e.id),f.classList.add("keybind","unselectable"),o.innerText=u.label;let w=u.disabled;typeof w=="function"&&(w=w(this.app)),w&&t.classList.add("disabled"),t.addEventListener("click",()=>{if(w)return;u.callback(this.app),t.closest(".menu-main").querySelector(".menubar-dropdown").replaceChildren()})}else f=er.getIcon("CHEVRON",16),f.style.transform="rotate(-90deg)",o.innerText=typeof e.title=="function"?e.title(this.app):e.title;if(s.appendChild(o),s.appendChild(f),t.appendChild(s),t.classList.add("menu-item"),s.classList.add("menu-item-title","menu-hover"),o.classList.add("title","unselectable"),e.type=="dropdown"){const u=document.createElement("div");t.appendChild(u),u.classList.add("menubar-dropdown"),e.options.map(w=>this.createElement(w)).forEach(w=>u.appendChild(w))}if(e.type=="checkbox"){let u=e.checked;typeof u=="function"&&(u=u(this.app)),u&&(o.innerText="✓ "+o.innerText)}return t}if(e.type=="menu"){const t=document.createElement("div"),s=document.createElement("div"),o=document.createElement("div");return t.appendChild(s),s.innerText=e.title,t.appendChild(o),s.classList.add("title","unselectable"),t.classList.add("menu-item","menu-main"),s.classList.add("menu-hover"),o.classList.add("menubar-dropdown","unselectable"),t.onmouseenter=()=>{o.replaceChildren(...e.options.map(f=>this.createElement(f)))},t.onmouseleave=()=>{o.replaceChildren()},t}return document.createElement("div")}}class gi{view;windows=[];app;constructor(e,t){this.app=e,this.view=t}unfocusAll(){for(const e of this.view.querySelectorAll(".focused"))e.classList.remove("focused")}getFocusedWindow(){for(const e of this.windows)if(e.windowElement.classList.contains("focused"))return e;return null}isBlocked(){return!this.windows.every(e=>!e.options.blocking)}openWindow(e){if(e.options.win_id){const t=this.getWindowById(e.options.win_id);if(t){t.focus();return}}e.addToManager(this),this.windows.push(e)}removeWindow(e){this.windows.splice(this.windows.indexOf(e),1)}getWindowById(e){for(const t of this.windows)if(t.options.win_id==e)return t}}const St="1.1.0";class vi{options=k;events=Ne;themes=Ae;renderer;ticker;stage;view;chartManager;windowManager;menubarManager;actionHistory;lastWidth=window.innerWidth;lastHeight=window.innerHeight;constructor(){if(nr.setDefaultProps({duration:[200,100],theme:"sm"}),k.loadOptions(),sr(),Ot.load(this),window.nw){const e=nw.Window.get();k.app.fullscreen?e.enterFullscreen():e.resizeTo(k.app.width,k.app.height)}if(setInterval(()=>k.saveOptions(),1e4),k.general.smoothAnimations&&document.body.classList.add("animated"),this.registerFonts(),this.view=document.getElementById("pixi"),document.oncontextmenu=e=>{e.preventDefault(),this.chartManager.loadedChart&&e.target==this.view&&Je.open(this,e)},this.view.onmousedown=()=>{Je.close()},this.stage=new ir,this.stage.sortableChildren=!0,this.renderer=new or({backgroundColor:1579292,antialias:k.performance.antialiasing,width:this.view.clientWidth,height:this.view.clientHeight,resolution:k.performance.resolution,autoDensity:!0,view:this.view,powerPreference:"low-power"}),this.ticker=new ar,this.ticker.maxFPS=0,this.ticker.add(()=>{const e=performance.now();this.renderer.render(this.stage),Qe.instance?.addFrameTimeValue(performance.now()-e),performance.memory?.usedJSHeapSize&&Qe.instance?.addMemoryTimeValue(performance.memory.usedJSHeapSize),$r()},lr.LOW),this.ticker.start(),cr.init(this.renderer),this.chartManager=new hr(this),this.menubarManager=new wi(this,document.getElementById("menubar")),this.windowManager=new gi(this,document.getElementById("windows")),this.actionHistory=new et(this),this.registerListeners(),!W.hidePoweredByText&&fr()){const e=document.getElementById("embed");e.appendChild(document.createTextNode("Powered by "));const t=document.createElement("a");if(t.href="https://tillvit.github.io/smeditor/",t.innerText="SMEditor",t.target="_blank",e.appendChild(t),W.url!=null){e.appendChild(document.createTextNode(" | Open this chart in a "));const s=document.createElement("a"),o=new URL(location.origin+"/smeditor/app/");s.innerText="new tab",s.target="_blank",o.searchParams.append("url",W.url),W.chartType!==null&&o.searchParams.append("chartType",W.chartType),W.chartIndex!==null&&o.searchParams.append("chartIndex",W.chartIndex+""),s.href=o.toString(),e.appendChild(s)}}tt.initFileSystem().then(()=>{if(W.url){this.chartManager.loadSM(W.url).then(()=>{const e=this.chartManager.loadedSM;if(!e)return;let t;if(W.chartType!=null&&(t=e.charts[W.chartType],t===void 0)){nt.createFormatted(`Couldn't find chart with type ${W.chartType}`,"warn");return}if(t===void 0){const o=Object.keys(e.charts);if(o.length==0||(t=e.charts[o[0]],t.length==0))return}let s;if(W.chartIndex!=null&&(s=t.at(W.chartIndex),s===void 0)){nt.createFormatted(`Couldn't find chart with index ${W.chartIndex}`,"warn");return}s===void 0&&(s=t.at(-1),!s)||this.chartManager.loadChart(s)});return}if(this.windowManager.openWindow(new ur(this)),window.nw){const e=nw.Window.get();nw.App.on("open",t=>{if(!t||t?.length===0){nw.Window.open(window.location.href);return}let s="";for(let o of t)if(o.startsWith("file://")&&(o=o.substring(7)),fe(o)==".ssc"){s=o;break}else s==""&&fe(o)==".sm"&&(s=o);s!=""&&(this.chartManager.loadSM(s),this.windowManager.getWindowById("select_sm_initial")?.closeWindow())}),window.addEventListener("keydown",t=>{t.key=="r"&&(t.metaKey||t.ctrlKey)&&(t.preventDefault(),e.reload()),t.code=="KeyW"&&(t.metaKey||t.ctrlKey)&&(t.preventDefault(),e.close()),process.versions["nw-flavor"]=="sdk"&&t.code=="KeyI"&&t.metaKey&&t.altKey&&(t.preventDefault(),e.showDevTools())}),e.on("enter-fullscreen",()=>{k.app.fullscreen=e.isFullscreen}),e.on("resize",(t,s)=>{e.isFullscreen||(k.app.width=t,k.app.height=s)}),e.on("restore",()=>{k.app.fullscreen=e.isFullscreen}),this.checkAppVersion()}this.checkCoreVersion()}),window.onbeforeunload=e=>{if(et.instance.isDirty()&&k.general.warnBeforeExit)return e.preventDefault(),e.returnValue="Are you sure you want to exit?"},window.onpagehide=()=>{k.saveOptions()},Ae.loadTheme(k.general.theme)}registerFonts(){rt.from("Main",{fontFamily:"Assistant",fontSize:20,fill:"white"},{chars:[["a","z"],["A","Z"],"!@#$%^&*()~{}[]:.-?=,_","0123456789/"," "],resolution:window.devicePixelRatio}),rt.from("Fancy",{fontFamily:"Assistant",fontSize:40,fontWeight:"700",fill:["#dddddd","#ffffff"],fillGradientType:dr.LINEAR_VERTICAL,stroke:11184810,strokeThickness:3},{chars:[["a","z"],["A","Z"],"!@#$%^&*()~{}[]:.-?=,_","0123456789/"," "],resolution:window.devicePixelRatio})}registerListeners(){this.view.addEventListener("mousedown",()=>{this.windowManager.unfocusAll()}),Ne.on("themeChanged",()=>{this.renderer.background.color=new pr(Ae.getCurrentTheme()["editor-bg"]).toNumber()}),window.addEventListener("keydown",function(e){e.code=="Enter"&&e.target instanceof HTMLButtonElement&&e.preventDefault()}),window.addEventListener("dragstart",function(e){e.target instanceof HTMLImageElement&&e.preventDefault()}),setInterval(()=>{const e=window.innerWidth,t=window.innerHeight-document.getElementById("menubar").clientHeight-document.getElementById("playback-options").clientHeight;(this.lastHeight!=t||this.lastWidth!=e)&&(this.lastHeight=t,this.lastWidth=e,this.onResize(e,t),Ne.emit("resize"))},100),window.addEventListener("dragover",e=>{e.preventDefault(),e.dataTransfer.dropEffect="copy"}),window.addEventListener("drop",e=>{if(window.nw){e.stopPropagation(),e.preventDefault();let t="";for(const s of e.dataTransfer.files)if(s.path)if(fe(s.path)==".ssc"){t=s.path;break}else t==""&&fe(s.path)==".sm"&&(t=s.path);t!=""&&(this.chartManager.loadSM(t),this.windowManager.getWindowById("select_sm_initial")?.closeWindow())}else tt.handleDropEvent(e).then(t=>{const s=new mr(this,{title:"Select an sm/ssc file...",accepted_file_types:[".sm",".ssc"],disableClose:!0,callback:o=>{this.chartManager.loadSM(o),this.windowManager.getWindowById("select_sm_initial")?.closeWindow()},onload:()=>{s.getAcceptableFile(t??"").then(o=>s.selectPath(o))}});this.windowManager.openWindow(s)})})}onResize(e,t){this.renderer.screen.width=e,this.renderer.screen.height=t,this.view.width=e*this.renderer.resolution,this.view.height=t*this.renderer.resolution,this.view.style.width=`${e}px`,this.view.style.height=`${t}px`}checkAppVersion(){if(!window.nw)return;const e=nw.require("nw.gui"),t={stable:3,beta:2,alpha:1,nightly:0};let s="win";process.platform=="darwin"?s=nw.require("os").arch()=="arm64"?"mac-arm":"mac-x64":process.platform=="linux"&&(s="linux"),fetch("/smeditor/assets/app/versions.json").then(o=>o.json()).then(o=>{o=o.sort((u,w)=>t[u.type]!=t[w.type]?t[w.type]-t[u.type]:w.date-u.date);const f=o[0];Tt.lt(e.App.manifest.version,f.version)&&localStorage.getItem("downloadedVersion")!==f.version&&Er.open(f.version,f.downloads[s])})}checkCoreVersion(){const e=pi({onNeedRefresh(){gr.open(e),console.log("Found new version")},onOfflineReady(){vr.open(),console.log("Offline use ready")}}),t=localStorage.getItem("coreVersion");t!==null&&Tt.lt(t,St)&&this.windowManager.openWindow(new wr(this)),localStorage.setItem("coreVersion",St)}}document.querySelector("body").innerHTML=`
@@ -25,7 +8,7 @@ import{g as H0,_ as Mt,F as J,M as zt,K as qt,a as V0,I as jt,W as Ut,G as Gt,N
- `;nc.load({custom:{families:["Assistant"]},active:G0,inactive:G0,classes:!1});function G0(){const u=document.createElement("canvas");u.getContext("webgl")||u.getContext("experimental-webgl")?(window.app=new Zs,window.GameTypeRegistry=Gt,window.NoteskinRegistry=Ht):document.querySelector("body").innerHTML=`
+ `;Ei.load({custom:{families:["Assistant"]},active:Nt,inactive:Nt,classes:!1});function Nt(){const i=document.createElement("canvas");i.getContext("webgl")||i.getContext("experimental-webgl")?(window.app=new vi,window.GameTypeRegistry=tr,window.NoteskinRegistry=rr):document.querySelector("body").innerHTML=`

WebGL is not enabled

Please visit your browser settings and enable WebGL.
diff --git a/app/index.html b/app/index.html index a9d00bff..45a251ad 100644 --- a/app/index.html +++ b/app/index.html @@ -24,9 +24,9 @@ SMEditor - + - + diff --git a/assets/app/changelog.json b/assets/app/changelog.json index 252c9862..8adb8300 100644 --- a/assets/app/changelog.json +++ b/assets/app/changelog.json @@ -1,4 +1,9 @@ [ + { + "version": "1.1.0", + "date": 1733884335684, + "changelog": "## Changes\n - **Reworked split timing (chart/song timing)**\n - Timing columns have a C/S box when in **Edit Timing** mode. You can toggle between them by opening the popup or clicking the **Manage Split Timing** button in the status widget\n - Wiki will be updated soon to reflect these changes\n - **Autosaving!**\n - Every once in a while, your file will be saved (default 120 seconds, changable in options)\n - Stored in SSC format under `.smebak`\n - **SPEEDS and SCROLLS are now allowed in SM files** for recent NotITG changes (hopefully there isn't an SM parser that breaks because of this)\n - Added an option to open these changelogs under Help in the menubar\n - Added keybinds to toggle Edit/Add Timing (`T` and `Alt-T` by default)\n - Changed Skip to Start button in status widget to skip to start of song, not beat 0 to match keybind\n - Changed the file picker so that Chrome doesn't complain about \"containing system files\"\n - Changed EQ and Detect Sync canvases to match theme colors\n - Made textboxes in chart properties undoable\n - Allow keybinds to use numbers (this will take precedence over placing notes, but you can bind gameplay keybinds)\n## Fixes \n - **File saving issues**\n - Fixed files not being saved properly when special characters are used\n - Fixed chart timing data not being saved\n - Fixed chart timing data being parsed incorrectly (but somehow still being saved)\n - **Multiple assist tick / metronome fixes**\n - Fixed them being loud when a hold is being placed during playback\n - Fixed metronome spam on WARPS\n - Fixed holds not being truncated sometimes due to triplets\n - Fixed \"Invert scroll in reverse\" when \"Snap every scroll\" is on\n - Fixed many UI elements not being visible when in light themes\n - Fix song playback starting at the wrong time with songs with positive offset + rate mod\n\n" + }, { "version": "1.0.0", "date": 1731940757839, diff --git a/assets/index-5508b070.css b/assets/index-5508b070.css new file mode 100644 index 00000000..4150ca2c --- /dev/null +++ b/assets/index-5508b070.css @@ -0,0 +1 @@ +@font-face{font-family:Assistant;font-style:normal;font-weight:200;font-display:swap;src:url(/smeditor/assets/font/Assistant-Hebrew.woff2) format("woff2");unicode-range:U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:Assistant;font-style:normal;font-weight:200;font-display:swap;src:url(/smeditor/assets/font/Assistant-LatinExt.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Assistant;font-style:normal;font-weight:200;font-display:swap;src:url(/smeditor/assets/font/Assistant-Latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Assistant;font-style:normal;font-weight:300;font-display:swap;src:url(/smeditor/assets/font/Assistant-Hebrew.woff2) format("woff2");unicode-range:U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:Assistant;font-style:normal;font-weight:300;font-display:swap;src:url(/smeditor/assets/font/Assistant-LatinExt.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Assistant;font-style:normal;font-weight:300;font-display:swap;src:url(/smeditor/assets/font/Assistant-Latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Assistant;font-style:normal;font-weight:400;font-display:swap;src:url(/smeditor/assets/font/Assistant-Hebrew.woff2) format("woff2");unicode-range:U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:Assistant;font-style:normal;font-weight:400;font-display:swap;src:url(/smeditor/assets/font/Assistant-LatinExt.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Assistant;font-style:normal;font-weight:400;font-display:swap;src:url(/smeditor/assets/font/Assistant-Latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Assistant;font-style:normal;font-weight:500;font-display:swap;src:url(/smeditor/assets/font/Assistant-Hebrew.woff2) format("woff2");unicode-range:U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:Assistant;font-style:normal;font-weight:500;font-display:swap;src:url(/smeditor/assets/font/Assistant-LatinExt.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Assistant;font-style:normal;font-weight:500;font-display:swap;src:url(/smeditor/assets/font/Assistant-Latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Assistant;font-style:normal;font-weight:600;font-display:swap;src:url(/smeditor/assets/font/Assistant-Hebrew.woff2) format("woff2");unicode-range:U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:Assistant;font-style:normal;font-weight:600;font-display:swap;src:url(/smeditor/assets/font/Assistant-LatinExt.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Assistant;font-style:normal;font-weight:600;font-display:swap;src:url(/smeditor/assets/font/Assistant-Latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Assistant;font-style:normal;font-weight:700;font-display:swap;src:url(/smeditor/assets/font/Assistant-Hebrew.woff2) format("woff2");unicode-range:U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:Assistant;font-style:normal;font-weight:700;font-display:swap;src:url(/smeditor/assets/font/Assistant-LatinExt.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Assistant;font-style:normal;font-weight:700;font-display:swap;src:url(/smeditor/assets/font/Assistant-Latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Assistant;font-style:normal;font-weight:800;font-display:swap;src:url(/smeditor/assets/font/Assistant-Hebrew.woff2) format("woff2");unicode-range:U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:Assistant;font-style:normal;font-weight:800;font-display:swap;src:url(/smeditor/assets/font/Assistant-LatinExt.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Assistant;font-style:normal;font-weight:800;font-display:swap;src:url(/smeditor/assets/font/Assistant-Latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}*{box-sizing:border-box;margin:0;padding:0;line-height:1.15em}body{--accent-color: rgb(23, 131, 208);accent-color:var(--accent-color);--text-color: white;--text-color-secondary: #888;--text-color-detail: #757a89;--text-color-disabled: #888;--primary-bg: #555;--primary-border: #444;--primary-bg-active: #575757;--primary-bg-hover: #666;--navbar-bg: #3d3d3d;--navbar-bg-inactive: #626262;--window-bg: #3d3d3d;--window-border: #00000000;--secondary-bg: #373737;--secondary-border: #333;--secondary-bg-active: #555;--secondary-bg-hover: #454545;--editable-overlay-hover: rgb(255, 255, 255, .2);--editable-overlay-active: rgb(255, 255, 255, .1);--input-bg: rgba(35, 35, 35, .309);--input-bg-hover: rgba(79, 79, 79, .309);--input-bg-active: rgba(50, 50, 50, .309);--input-border: rgba(0, 0, 0, .3);--widget-bg: rgba(0, 0, 0, .5);--tooltip-bg: rgba(20, 20, 20, .95)}body{overflow:hidden;overscroll-behavior-x:none;overscroll-behavior-y:none;background-color:#18191c;height:100%;width:100%;position:relative;--danger: rgb(172, 54, 54);font-family:Assistant,Helvetica,sans-serif!important;color:var(--text-color)}html{height:100%;width:100%}.browser-unsupported{align-items:center;display:flex;flex-direction:row;height:100%;width:100%}.browser-unsupported-item{text-align:center;width:100%}.browser-unsupported-detail{font-size:12px;color:var(--text-color-detail)}#view-wrapper{display:flex;flex-direction:column;width:100%;caret-color:transparent}.window{border-radius:5px;position:fixed;box-shadow:0 0 5px #0009;border:1px solid var(--window-border);overflow:hidden}.navbar{align-items:center;background:var(--navbar-bg);border-bottom:1px solid var(--primary-border);border-top-left-radius:5px;border-top-right-radius:5px;display:flex;flex-direction:row;font-size:15px;width:100%;padding:3px;gap:3px}.navbar:empty{border-bottom:none}.window:not(.focused)>.navbar{background:var(--navbar-bg-inactive);border-bottom:1px solid transparent}.title:empty{margin:0}.navbar .title{color:var(--text-color);flex:1 1 auto;overflow:hidden;padding-left:5px;text-overflow:ellipsis;white-space:nowrap}.navbar .icon{cursor:pointer;filter:brightness(.8)}.animated .navbar .icon{transition:.1s cubic-bezier(.39,.575,.565,1)}.navbar .icon:hover{filter:none}button{background:var(--input-bg);border:.5px solid rgba(0,0,0,.6);border-radius:5px;padding:4px 7px;display:flex;align-items:center;justify-content:center;transform:translateY(-.5px);box-shadow:0 .5px #000000e6,0 3px 5px -3px #0009;cursor:pointer;column-gap:5px;font-family:inherit;color:inherit}.animated button{transition:.2s cubic-bezier(.175,.885,.32,1.875)}.animated button:hover:enabled{transform:translateY(-1.5px);box-shadow:0 1.5px #000000e6,0 3px 5px -2px #0009}.animated button:active:enabled{transform:translateY(.2px);box-shadow:none}button:hover:enabled{filter:brightness(1.3)}button:active:enabled{filter:brightness(.8)}button.confirm{background:var(--accent-color)}button.delete{background:var(--danger);color:#fff}button:disabled{opacity:.5;transform:none;box-shadow:none;cursor:not-allowed}.view{background-color:var(--window-bg);font-size:15px;overflow:hidden}.animated .view{transition:.3s cubic-bezier(.445,.05,.55,.95)}.window.focused .view{box-shadow:inset 0 2px 3px -1px #0000001a}.view .padding{display:flex;flex-direction:column;padding:20px;height:100%}.open-container{display:grid;grid-template-rows:2fr auto 5fr;height:100%}.open-container .top-container{display:grid;grid-template-columns:1fr 1fr;gap:20px}.open-container .bottom-container{display:flex;flex-direction:column;gap:5px;overflow:hidden}.open-container .title{font-size:17px;text-transform:uppercase}.open-container .container{align-items:center;display:flex;flex-direction:row}.container+.title{border-top:solid 1px #555;margin-top:10px;padding-top:10px}.window.exiting{filter:blur(20px);opacity:0}.animated .exiting{transition:.06s cubic-bezier(.6,.04,.98,.335)}.unselectable{-moz-user-select:none;-webkit-user-drag:none;-webkit-user-select:none;user-select:none}.folder>.children{margin-left:20px}.folder.collapsed>.children{display:none}.item .info{align-items:center;display:flex;flex-direction:row}.item .info .title{background:none;border:none;border-radius:5px;flex:1 1 auto;outline:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:1px 5px}.folder.collapsed>.info>.folder-icon{transform:rotate(-90deg)}.pref-label.collapsed>.folder-icon{transform:rotate(-90deg)}.animated .folder-icon{transition:.2s cubic-bezier(.39,.575,.565,1)}.icon{display:flex;align-items:center}.dir-selector{background-color:var(--secondary-bg);border:1px solid var(--secondary-border);border-radius:5px 5px 0 0;flex:1;height:100%;overflow:auto;padding:5px}.file-options,.theme-tray{display:flex;flex-direction:row;column-gap:5px;background-color:var(--secondary-bg);border:1px solid var(--secondary-border);margin-bottom:5px;padding:4px;border-radius:0 0 5px 5px}.info.disabled>.title{color:var(--text-color-disabled)}.info.disabled>.icon{opacity:.3}.info.selected,.info.selected:hover{background-color:var(--secondary-bg-active)}.info:hover{background-color:var(--secondary-bg-hover)}.options-icon{display:none}.info:hover>.options-icon{display:block;opacity:.3}.info.selected>.options-icon{display:block;opacity:.3}textarea{-moz-user-select:none;-webkit-user-select:none;resize:none;user-select:none;color:inherit;font-family:inherit}.dir-selector:empty:before{color:var(--text-color-disabled);content:"No files! Add a file by dragging a folder/file or using the buttons below.";height:100%;display:flex;justify-content:center;align-items:center}.recent-selector{background-color:var(--secondary-bg);border:1px solid var(--secondary-border);border-radius:5px 5px 0 0;flex:1;height:100%;overflow:auto;overflow-x:hidden;padding:5px;width:360px}.recent-selector:empty:before{color:var(--text-color-disabled);content:"No recent files";height:100%;display:flex;justify-content:center;align-items:center}.recent-item{align-items:center;display:flex;flex-direction:row;padding:1px 5px;text-overflow:ellipsis;white-space:nowrap;gap:8px;font-size:14px}.recent-item.selected,.recent-item.selected:hover{background-color:var(--secondary-bg-active)}.recent-item:hover{background-color:var(--secondary-bg-hover)}.recent-item .recent-path{font-style:italic;color:var(--text-color-secondary);text-overflow:ellipsis;overflow:hidden}.recent-item .recent-name{text-overflow:ellipsis;overflow:hidden;flex:0 0 auto}.menu-options{display:flex;margin-top:5px;flex:0;justify-content:space-between}.menu-left{display:flex;width:50%}.menu-right{display:flex;flex-direction:row-reverse;width:50%}.outlined{box-shadow:inset 0 0 3px 2px #10629ccc}.outlined>.info{box-shadow:inset 0 0 3px 2px #10629ccc}#menubar{display:flex;background-color:var(--primary-bg);border-bottom:1px solid var(--secondary-border)}.menu-item{position:relative;z-index:15}.menu-item>.menu-item-title{padding:4px 0;display:flex;align-items:center}#menubar>.menu-item>.title{padding:4px 10px}#menubar .menubar-dropdown{display:none;background-color:var(--primary-bg);border:1px solid var(--primary-border);position:absolute;border-radius:5px}#menubar .menu-item:not(.disabled):hover>.menubar-dropdown,#menubar .menubar-dropdown:not(.disabled):hover{display:block}.menu-item-title .title{flex:1;margin-left:10px;margin-right:15px;white-space:nowrap}.menu-item-title .keybind{margin-right:10px;color:var(--text-color-secondary);white-space:nowrap}.menu-item-title .icon{margin-right:10px}.menu-item.disabled .menu-item-title .title{color:var(--text-color-disabled)}.menu-item.checked>.menu-item-title .title{font-weight:800}.menu-item:not(.disabled)>.menu-hover:hover{background-color:var(--primary-bg-hover)}.animated .menu-hover{transition:.1s cubic-bezier(.215,.61,.355,1)}.separator{border:.2px solid var(--secondary-bg);margin:4px;height:1px}.check-icon{position:relative;right:16px}.chart-view-scroller{display:grid;grid-template-columns:4fr 6fr;gap:4px;width:100%;height:100%;overflow:auto}.chart-list{height:100%;background-color:var(--secondary-bg);border:1px solid var(--secondary-border);border-radius:5px;overflow:scroll}.chart-info{height:100%;background-color:var(--secondary-bg);border:1px solid var(--secondary-border);border-radius:5px;word-break:break-all;padding:15px;overflow:scroll}.chart-info .label{padding:2px 0}.chart-info:empty:before{color:var(--text-color-disabled);height:100%;display:flex;justify-content:center;align-items:center;content:"Select a chart for more details"}.chart-list-item{display:flex;align-items:center;border:.2px solid var(--secondary-border);cursor:pointer}.animated .chart-list-item{transition:.1s cubic-bezier(.215,.61,.355,1)}.chart-list-item.selected,.chart-list-item:active{background-color:var(--secondary-bg-active)}.chart-list-item:not(.selected):hover{background-color:var(--secondary-bg-hover)}.chart-list-item .Beginner{background-color:#3b6c80;color:#fff}.chart-list-item .Easy{background-color:#308655;color:#fff}.chart-list-item .Medium{background-color:#a08f45;color:#fff}.chart-list-item .Hard{background-color:#8e2921;color:#fff}.chart-list-item .Challenge{background-color:#8b1b9e;color:#fff}.chart-list-item .Edit{background-color:#757575;color:#fff}.chart-list-item>.title{padding:4px;text-align:center;align-content:center;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;min-width:25px}.chart-list-item.extended .chart-list-info{margin:0;opacity:0}.chart-list-info{opacity:1;display:flex;width:100%;align-items:center;margin:0 5px;place-content:space-between;min-width:0;column-gap:5px;flex:1}.animated .chart-list-info{transition:.2s cubic-bezier(.215,.61,.355,1)}.chart-attributes{display:flex;padding:2px 2px 2px 0}.chart-properties{display:grid;grid-template-columns:100px minmax(0,1fr);align-items:center;flex:1;row-gap:2px;margin-bottom:12px}div.inlineEdit[contenteditable=true]{min-width:8px;text-align:right;border-radius:3px;padding:0 3px;border:1px solid transparent;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;-ms-overflow-style:none;scrollbar-width:none;caret-color:auto;cursor:text}div.inlineEdit{cursor:default}.animated div.inlineEdit{transition:.2s cubic-bezier(.39,.575,.565,1)}div.inlineEdit[contenteditable=true]:hover{background:var(--editable-overlay-hover)}div.inlineEdit[contenteditable=true]:focus{background:var(--editable-overlay-active);outline:none;overflow:auto;text-overflow:clip}::-webkit-scrollbar{display:none}.chart-credit,.chart-difficulty,.chart-info-grid-label{flex:1;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;padding:1px 0}.chart-step-count{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.chart-info-main{display:flex;font-size:18px;margin-bottom:5px;align-items:center;place-content:space-between}.chart-info-grid-item{display:flex}.chart-info-grid{display:grid;grid-template-columns:1fr 1fr;row-gap:2px;column-gap:15px;margin-top:5px}.timing-data>.padding{display:grid;row-gap:3px;grid-template-columns:auto 170px;align-items:center}.timing-data>.padding>div:not(.label){display:flex;align-items:center;height:100%}.sm-properties .padding{display:flex;flex-direction:column}.sm-properties .property-grid{display:grid;row-gap:3px;grid-template-columns:auto 250px;align-items:center;flex:1}.sm-properties .property-grid>div:not(.label){display:flex;align-items:center}input[type=text],input[type=number]{background:var(--input-bg);border:1px solid var(--input-border);border-radius:3px;padding:0 3px;flex:1;height:100%;user-select:text;caret-color:auto;font-size:13.33px;font-family:inherit;color:inherit}input[type=range]:focus{outline:none}input:disabled{color:var(--text-color-disabled);pointer-events:none}input:focus{outline:1px solid var(--accent-color)}input.short{width:40px}input.right{text-align:right}.chart-view-type-wrapper{display:flex;flex-direction:row;align-items:center;column-gap:10px;margin-bottom:10px}.dropdown{height:100%;position:relative}.dropdown.no-border .dropdown-selected{border:none;background:none;padding:1px}.dropdown.no-border .dropdown-selected:not(:hover):after{opacity:0}.dropdown-selected{color:var(--text-color);background-color:var(--input-bg);border:1px solid var(--input-border);border-radius:3px;width:100%;height:100%;padding:1px 7px;margin-right:3px;display:flex;align-items:center;white-space:nowrap;cursor:pointer}.animated .dropdown-selected{transition:.1s cubic-bezier(.215,.61,.355,1)}.dropdown-selected.disabled{color:var(--text-color-disabled);pointer-events:none;cursor:not-allowed}.dropdown-selected:empty{display:none}.dropdown-selected .icon{margin-left:auto}.dropdown-selected:hover:not(.disabled):not(:active){background:var(--editable-overlay-hover)}.dropdown-selected:active{background:var(--editable-overlay-hover)}.dropdown-items{position:absolute;color:var(--text-color);background:var(--primary-bg);max-height:200px;overflow:auto;z-index:5;border-radius:5px;height:0;box-shadow:0 3px 15px #0009;cursor:pointer;top:100%;border:1px solid var(--input-border)}.dropdown-items.collapsed{border:none}.dropdown-right>.dropdown-items{right:0}.animated .dropdown-items{transition:height .07s cubic-bezier(.215,.61,.355,1)}.dropdown-item{padding:3px 7px;white-space:nowrap}.animated .dropdown-item{opacity:0;transform:translateY(-10px);animation:.2s dropdown-enter cubic-bezier(.175,.885,.32,1.575) forwards;transition-property:height,background;transition-duration:.07s;transition-timing-function:cubic-bezier(.215,.61,.355,1)}.dropdown-item:hover{background:var(--primary-bg-hover)}.dropdown-item:active{background:var(--primary-bg-active)}@keyframes dropdown-enter{0%{transform:translateY(-10px);opacity:0}to{opacity:1;transform:none}}.pref-selector{background-color:var(--secondary-bg);border:1px solid var(--secondary-border);border-radius:0 0 5px 5px;flex:1;height:100%;overflow:auto;padding:5px;font-size:15px}.pref-label{display:flex;flex-direction:row;align-items:center;margin-right:5px;padding:1px 0}.pref-label:hover{background-color:var(--secondary-bg-active)}.flex-row{display:flex;flex-direction:row;align-items:center;justify-content:space-between;height:100%;width:100%}.flex-column-gap{column-gap:5px}.flex-row-gap{row-gap:5px}.flex-grow{flex:1}.flex-static{flex:0}#blocker{width:100%;height:100%;background-color:#00000080;position:absolute;top:0;z-index:10000;caret-color:transparent}.spinner{display:flex;flex-direction:row;height:100%;flex:1;color:var(--text-color)}.spinner-input[type=text]{border-top-right-radius:0;border-bottom-right-radius:0;width:100%;height:100%;min-width:0;flex:1}.spinner-input:disabled+.spinner-btns{pointer-events:none}.spinner-btns{display:grid;grid-template-rows:1fr 1fr;border:1px solid var(--input-border);border-left:none;border-top-right-radius:3px;border-bottom-right-radius:3px;flex:0;height:100%;min-height:20px}.spinner-btns button{padding:0 2px;flex:1;border-radius:0;height:100%;width:10px;height:9px;border:none;min-width:auto}.spinner-btns .spinner-up svg{rotate:180deg}.spinner-up{background:linear-gradient(0deg,var(--input-bg-active),var(--input-bg))}.spinner-down{background:linear-gradient(180deg,var(--input-bg-active),var(--input-bg))}.slider{display:flex;flex-direction:row}#waterfall{position:relative;top:0}#waterfall-container{position:absolute;top:9px;display:flex;flex-direction:column;text-align:right;padding:0 10px;width:100%;pointer-events:none;user-select:none;caret-color:transparent}.waterfall-item{pointer-events:none}.animated .waterfall-item{transition:cubic-bezier(.455,.03,.515,.955) .5s;animation:waterfall-enter .3s cubic-bezier(.455,.03,.515,.955)}.waterfall-warn{color:#f6ca39;display:inline-block;margin-right:4px}.waterfall-error{color:#b72323;display:inline-block;margin-right:4px}@keyframes waterfall-enter{0%{opacity:0;transform:translate(200px,10px)}to{opacity:1;transform:none}}.waterfall-exiting{opacity:0;transform:translate(200px)}.confirmation .padding .label{flex:1;text-align:center}.confirmation button{min-width:55px}input[type=range]{width:100px;margin-right:10px}.hide-buttons button{display:none}.hide-buttons:hover button,.hide-buttons div:focus+button{display:flex}#status-widget{position:absolute;bottom:30px;display:flex;flex-direction:column;left:50%;transform:translate(-50%);border-radius:5px;align-items:center;height:96px;overflow:hidden;user-select:none}#status-widget.collapsed{height:48px}.playback-bar,.edit-bar{display:flex;flex-direction:row;height:48px;align-items:center;border-radius:5px;justify-content:flex-start;width:100%}.playback-bar{background-color:var(--widget-bg)}#status-widget:not(.collapsed) .playback-bar{border-bottom:1px rgba(55,55,55,.2) solid;border-radius:0}.animated #status-widget{transition:.3s cubic-bezier(.11,.72,.51,1.14)}#status-widget button{background:none;box-shadow:none;transform:none;border:none;width:48px;height:48px;outline:none;filter:none}#status-widget button img{height:100%}#status-widget button:hover:not(.active){background-color:var(--editable-overlay-hover)}#status-widget button.active{background-color:var(--editable-overlay-active)}#status-widget button:disabled{filter:brightness(.2) saturate(.4)}.animated #status-widget button{transition:.2s cubic-bezier(.39,.575,.565,1)}#status-widget .playback-separator{padding:0 2px;height:48px;display:flex;align-items:center}#status-widget .playback-separator:after{border:.5px rgba(134,134,134,.5) solid;height:30px;content:" "}#status-widget .playback-counter{display:flex;flex-direction:column;align-items:center;width:100px;margin:0 4px}#status-widget .playback-counter .playback-counter-label{font-size:10px;color:var(--text-color-secondary)}#status-widget .playback-counter .playback-counter-label:after{filter:invert() brightness(.4)}#status-widget .playback-counter .playback-counter-main{font-size:18px;line-height:18px;max-width:100px;align-items:baseline}#status-widget .playback-counter .playback-counter-main,#status-widget .playback-counter .playback-counter-main *{padding:0;border:none;text-overflow:clip;overflow:hidden}#status-widget .dropdown-selected{border:none;background:none}#status-widget .edit-fancy-button{font-size:9px;padding:0 4px;width:56px;height:48px;display:flex;flex-direction:column;align-content:center}#status-widget .edit-fancy-button.active{background-color:var(--editable-overlay-active)}#status-widget .edit-fancy-button img{margin-bottom:3px;height:23px}.note-placeholder{border-radius:5px}.edit-choice-container{display:flex;flex-direction:column;height:96px;position:relative;top:0;align-self:flex-start;width:100%;overflow:hidden}.edit-steps-container,.edit-timing-container{display:flex;flex-direction:row;align-items:center;height:48px;width:100%}.animated .edit-choice-container,.animated .edit-steps-container,.animated .edit-timing-container{transition:.2s cubic-bezier(.39,.575,.565,1)}.edit-timing-container{background-color:var(--widget-bg);height:48px}#status-widget .edit-bar .edit-bar-left{background-color:var(--widget-bg);display:flex;flex-direction:row}.note-placeholder-right{flex:1;background-color:var(--widget-bg);height:48px}.popup{user-select:none;position:absolute;transform:translate(-50%);z-index:10}.popup-zoomer{transform-origin:top center;display:flex;flex-direction:column;background-color:var(--window-bg);border-radius:5px;padding:8px;align-items:center;border:1px solid black;animation:1ms popup-enter cubic-bezier(.47,.02,0,.95) forwards;box-shadow:0 0 5px #0009;color:var(--text-color)}.popup-zoomer input{color:var(--text-color)}.popup-zoomer.selected{filter:saturate(1.2) brightness(1.4);border:1px solid rgb(14,83,104)}.popup.exiting .popup-zoomer{animation:.01s popup-exit cubic-bezier(.47,.02,0,.95) forwards;pointer-events:none}.animated .popup{transition:.2s cubic-bezier(.47,.02,0,.95)}.animated .popup-zoomer{animation:.1s popup-enter cubic-bezier(.47,.02,0,.95) forwards;transition:.2s cubic-bezier(.47,.02,0,.95)}.animated .popup.exiting .popup-zoomer{animation:.1s popup-exit cubic-bezier(.47,.02,0,.95) forwards;pointer-events:none}.popup-row{display:flex;flex-direction:row;gap:5px;color:var(--text-color);white-space:nowrap;font-size:14px;align-items:center}.popup-flex{display:flex;flex-direction:column;gap:4px;margin-top:4px}@keyframes popup-enter{0%{transform:scale(.8);opacity:0}to{transform:scale(1);opacity:1}}@keyframes popup-exit{0%{transform:scale(1);opacity:1}to{transform:scale(.8);opacity:0}}.popup .popup-desc{font-size:10px;font-style:italic;text-align:center;color:#757a89}.animated .popup-desc{transition:.2s cubic-bezier(.47,.02,0,.95)}.popup .popup-title{text-align:center}.popup .popup-label{color:#ddd;white-space:nowrap;font-size:14px}.popup .popup-grid input[type=text]{min-width:0;text-align:right}.popup .popup-grid input[type=checkbox]{min-width:0;justify-self:end}.popup .popup-grid{margin-top:4px;display:grid;grid-template-columns:auto auto;column-gap:15px;row-gap:4px;width:100%;justify-content:end;align-items:center}.animated .popup-options{transition:.2s cubic-bezier(.47,.02,0,.95)}.popup-options{margin-top:0;width:100%;justify-content:space-around;transform:scale(0);height:0;display:flex}.popup-options button{min-width:40px}.popup-zoomer.selected .popup-options{margin-top:5px;transform:scale(1);height:24.5px;filter:saturate(.8) brightness(.7)}.draggable-track{writing-mode:vertical-rl;text-align:center;padding:20px 4px;height:200px;display:flex;align-items:center;justify-content:space-around;box-shadow:0 .5px #000000e6,0 3px 5px -3px #0009;cursor:grab;color:#fff}.draggable-track.left .draggable-track-text{transform:rotate(180deg)}.draggable-track .icon{position:absolute;display:none}.draggable-track:hover .icon{display:block;bottom:10px;backface-visibility:hidden;cursor:pointer}.draggable-track:hover .icon:hover{color:var(--danger)}.draggable-track:hover{filter:brightness(1.3) saturate(2.5);transform:translateY(-1.5px);box-shadow:0 1.5px #000000e6,0 3px 5px -2px #0009}.draggable-track:active{cursor:grabbing;filter:brightness(1.1) saturate(2.5);transform:none;box-shadow:0 0 #000000e6,0 3px 5px -2px #0009}@keyframes draggable-exit{0%{width:26px}to{width:0;padding:0;opacity:0}}@keyframes draggable-enter{0%{opacity:0;width:0;padding:0}to{opacity:1;width:26px}}.draggable-track.entering,.draggable-option.entering{animation:draggable-enter 0s cubic-bezier(0,.91,.34,1.05) forwards}.draggable-track.exiting,.draggable-option.exiting{animation:draggable-exit 0s cubic-bezier(0,.91,.34,1.05) forwards}.animated .draggable-track.entering,.animated .draggable-option.entering{animation:draggable-enter .4s cubic-bezier(0,.91,.34,1.05) forwards}.animated .draggable-track.exiting,.animated .draggable-option.exiting{animation:draggable-exit .4s cubic-bezier(0,.91,.34,1.05) forwards}@keyframes leftover-enter{0%{opacity:0;transform:scale(0);padding:0}to{opacity:1;transform:scale(1)}}.leftover-track.entering,.leftover-option.entering{animation:leftover-enter 0s cubic-bezier(0,.91,.34,1.05) forwards}.animated .leftover-track.entering,.animated .leftover-option.entering{animation:leftover-enter .4s cubic-bezier(0,.91,.34,1.05) forwards}#timing-track-order .title{text-align:center;padding:6px}.track-grid{display:flex;flex-direction:row;background-color:var(--secondary-bg);border:1px solid var(--secondary-border);padding:4px;margin-top:5px;border-radius:3px;width:468.08px;justify-content:center}.track-grid-options{display:flex;flex-direction:row;column-gap:8px;padding:4px 0;width:100%}.track-selector{flex:1;height:30px;display:flex;flex-direction:row;background-color:var(--secondary-bg);border:1px solid var(--secondary-border);padding:4px;border-radius:3px;gap:4px;width:414.75px;overflow-x:auto}.leftover-track{display:flex;justify-content:center;align-items:center;border-radius:3px;padding:4px;gap:3px;box-shadow:0 .5px #000000e6,0 3px 5px -3px #0009;font-size:13px;cursor:grab;color:#fff}.leftover-track img{filter:invert();vertical-align:baseline;width:10px}.leftover-track:hover{filter:brightness(1.3) saturate(2.5);transform:translateY(-1.5px);box-shadow:0 1.5px #000000e6,0 3px 5px -2px #0009}.leftover-track:active{filter:brightness(1.1) saturate(2.5);transform:none;box-shadow:0 0 #000000e6,0 3px 5px -2px #0009;cursor:grabbing}.animated .draggable-track,.animated .draggable-track img,.animated .leftover-track,.animated .track-selector,.animated .draggable-option,.animated .draggable-option img,.animated .leftover-option{transition:.2s cubic-bezier(0,.91,.34,1.05)}.sm-title{font-weight:700;margin-bottom:3px}.sm-container{margin-bottom:15px}#context-menu{display:flex;position:absolute;flex-direction:column;background-color:var(--primary-bg);border:1px solid var(--primary-border);caret-color:transparent;font-size:15px;border-radius:5px;transform-origin:top left;opacity:.95}.animated #context-menu.entering{animation:context-enter .15s cubic-bezier(.13,.61,.07,.98)}#context-menu.exiting{transform:scale(.8);opacity:0}.animated #context-menu.exiting{transition:.1s cubic-bezier(.15,.73,.62,.75)}@keyframes context-enter{0%{opacity:0;transform:scale(.8)}to{opacity:.95;transform:scale(1)}}.menu-item>.menu-item-title{padding:3px 0;display:flex;align-items:center}.menu-item:first-child>.menu-item-title{border-top-left-radius:5px;border-top-right-radius:5px}.menu-item:last-child>.menu-item-title{border-bottom-left-radius:5px;border-bottom-right-radius:5px}#context-menu .menubar-dropdown{background-color:var(--primary-bg);border:1px solid var(--primary-border);position:absolute;left:100%;top:0;border-radius:5px;transform-origin:left;transform:scale(0);opacity:0}@keyframes context-dropdown-enter{0%{transform:scale(.8)}to{transform:scale(1)}}@keyframes context-dropdown-exit{0%{transform:scale(1)}to{transform:scale(.8)}}#context-menu .menu-item:not(.disabled):hover>.menubar-dropdown,#context-menu .menubar-dropdown:not(.disabled):hover{opacity:.95;transform:scale(1)}.animated #context-menu .menu-item:not(.disabled):hover>.menubar-dropdown,.animated #context-menu .menubar-dropdown:not(.disabled):hover{animation:context-dropdown-enter .08s cubic-bezier(.215,.61,.355,1) forwards}.animated #context-menu .menubar-dropdown{animation:context-dropdown-exit .08s cubic-bezier(.215,.61,.355,1);transition:.08s cubic-bezier(.215,.61,.355,1)}.menu-item .menubar-dropdown .menubar-dropdown{left:100%;top:0}.pref-container{display:flex;flex-direction:column;gap:10px;height:100%}.pref-search{display:flex;flex-direction:row;gap:10px}.pref-scrollers{display:flex;gap:20px;flex:1;min-height:0}.pref-section-scroller,.pref-option-scroller{background-color:var(--secondary-bg);border:1px solid var(--secondary-border);overflow:auto;padding:5px;border-radius:5px}.animated .pref-option-scroller{scroll-behavior:smooth}.pref-section{padding:3px 5px;border-radius:2px;cursor:pointer}.pref-section-scroller{width:150px}.pref-option-scroller:empty:before{color:var(--text-color-disabled);content:"No keybinds matched the search term.";height:100%;display:flex;justify-content:center;align-items:center}.animated .pref-section,.animated .pref-keybind-combo,.animated .pref-keybind,.animated .pref-item,.animated .pref-item-tooltip{transition:.1s cubic-bezier(.445,.05,.55,.95)}.pref-section.selected,.pref-section.selected:hover{background-color:var(--secondary-bg-active)}.pref-section:hover,.pref-keybind:hover,.pref-item:hover{background-color:var(--secondary-bg-hover)}.pref-option-scroller{display:flex;flex-direction:column;gap:20px;flex:1;padding:3px 5px}.pref-keybind{padding:3px 5px;border-radius:2px;display:flex;flex-direction:row;align-items:center;width:100%;cursor:pointer}.pref-item{padding:3px 5px;border-radius:2px;display:flex;flex-direction:row;align-items:center;width:100%}.pref-item-input{margin-left:auto;max-width:160px;display:flex}.pref-item>.spinner{max-width:50px}.pref-item .spinner-input{text-align:right}.pref-keybind .icon,.pref-item>.icon{margin-left:5px;display:block;bottom:10px;backface-visibility:hidden;filter:brightness(.5);cursor:pointer}.pref-keybind .icon:hover,.pref-item .icon:hover{filter:brightness(1);color:var(--danger)}.pref-keybind-label{padding:2px 0}.pref-label{padding:10px 0}.pref-keybind-combos{display:flex;flex-direction:row;align-items:center;gap:3px;margin-left:auto}.pref-keybind-combo{background-color:#0003;padding:2px 5px;font-size:13px}.pref-keybind-combo.conflict{background:rgb(187,93,31)}.pref-keybind-combo:hover{background-color:var(--danger)}.pref-group-label{font-size:18px;margin-bottom:6px}.pref-subgroup-label{font-weight:700;margin-bottom:6px}.pref-group{padding:3px 5px}.pref-children .pref-group-label{font-size:17px}.pref-search .dropdown{width:70px}.pref-group-label+.pref-children{margin-left:15px}.pref-children{display:flex;flex-direction:column;gap:5px}.pref-subgroup{margin:8px 0}.detail{font-size:12px;font-style:italic;text-align:center;color:var(--text-color-detail)}.tippy-box[data-theme~=sm]{background-color:var(--tooltip-bg);color:var(--text-color)}.tippy-box[data-theme~=sm][data-placement^=top]>.tippy-arrow:before{border-top-color:var(--tooltip-bg)}.tippy-box[data-theme~=sm][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:var(--tooltip-bg)}.tippy-box[data-theme~=sm][data-placement^=left]>.tippy-arrow:before{border-left-color:var(--tooltip-bg)}.tippy-box[data-theme~=sm][data-placement^=right]>.tippy-arrow:before{border-right-color:var(--tooltip-bg)}.export-container{display:flex;flex-direction:row;gap:15px;height:100%;overflow:hidden}.export-section-label{font-weight:700;margin-bottom:6px;margin-top:6px}.export-option{display:flex;flex-direction:row;gap:5px;align-items:center;padding:3px 5px}.export-output{flex:1;border-radius:5px;background-color:var(--secondary-bg);border:1px solid var(--secondary-border);padding:5px;white-space:pre-wrap;word-break:break-all;font-family:monospace;font-size:12px;overflow:auto;tab-size:2}.export-output:hover{background-color:var(--secondary-bg-hover)}.animated .export-output{transition:.1s cubic-bezier(.39,.575,.565,1)}.logo{text-align:center;font-size:26px}.icon-container{display:flex;align-items:center;justify-content:space-evenly;padding-top:2px;border-bottom:1px solid;border-image-slice:1}.eq-icon{border-radius:3px}.animated .eq-icon{transition:.1s cubic-bezier(.39,.575,.565,1)}.eq-icon.disabled:not(:hover){fill:#888}.eq-icon:not(:hover){background-color:#0000!important}.eq-info-container{border-top:1px solid;border-image-slice:1;display:flex;flex-direction:row;align-items:center;gap:10px;padding:2px 10px;margin:0;font-size:12px}.eq-reset{margin-left:auto;margin-right:15px;color:#ff3a3acc;padding:0 5px;border-radius:3px}.animated .eq-reset{transition:.2s cubic-bezier(.175,.885,.32,1.875)}.eq-reset:hover{background:rgba(255,58,58,.2)}.eq-info{display:flex;flex-direction:row;align-items:center;gap:5px}.eq-info-value{width:80px}.eq-info-value.inlineEdit[contenteditable=true]{border:none;min-width:80px;text-align:left;border-radius:3px;padding:0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;-ms-overflow-style:none;scrollbar-width:none;caret-color:auto}.eq-info-value.inlineEdit[contenteditable=true]:hover{background:rgba(0,135,203,.082)}.eq-info-value.inlineEdit[contenteditable=true]:focus{background:rgba(0,135,203,.082)}.eq-container{display:flex;flex-direction:column}input[type=color]{appearance:none;-moz-appearance:none;-webkit-appearance:none;background:none;border:0;cursor:pointer;height:19.5px;padding:0;width:29.5px}::-webkit-color-swatch-wrapper{padding:0}::-webkit-color-swatch{border:1px rgb(105,105,105) solid;border-radius:3px}::-moz-color-swatch,::-moz-focus-inner{border:0}::-moz-focus-inner{padding:0}.update-popup{position:absolute;right:15px;bottom:15px;z-index:10;background-color:var(--primary-bg);border-radius:10px;padding:10px;transition:.3s ease-out;user-select:none;cursor:pointer;transform-origin:bottom right;display:flex;flex-direction:column;align-items:center;gap:5px}.update-popup.exiting{transform:translate(50px);opacity:0}.update-popup .title{font-weight:700;text-align:center}.update-options{display:flex;flex-direction:row;gap:10px;align-items:center;justify-content:space-around;width:100%;margin-top:5px}.update-options button{max-width:100px;flex:1}.animated .update-popup{transition:.2s cubic-bezier(.175,.885,.32,1.875)}.animated .update-popup:hover{scale:1.01;background-color:var(--primary-bg-active)}.sync-container{display:flex;flex-direction:column;align-items:center;height:100%}.sync-spinner-container{display:flex;flex-direction:row;align-items:center;gap:10px}.sync-bottom-container{display:flex;flex-direction:row;padding:10px 5px;gap:10px;justify-content:space-around;align-items:center;margin-bottom:5px}.sync-tab-container{display:flex;width:370px;flex-direction:row;align-items:center;margin:10px 5px;background:var(--secondary-bg);border:1px solid var(--secondary-border);font-size:13px;border-radius:5px}.sync-tab-option{padding:5px 10px;flex:1;text-align:center;border-radius:5px}.sync-tab-option:hover{background-color:#ffffff1a}.sync-tab-option.active{background-color:#fff3}.animated .sync-tab-option{transition:.1s cubic-bezier(.215,.61,.355,1)}.sync-tab-view{width:370px;flex:1;min-height:0;background:var(--secondary-bg);border:1px solid var(--secondary-border);border-radius:5px;position:relative}.sync-tab-scroller{display:grid;grid-template-columns:repeat(3,1fr);overflow:hidden;position:relative;border-radius:5px}.sync-cover-scroller{position:absolute;top:0;left:0;display:grid;grid-template-columns:repeat(3,1fr);overflow:hidden;width:370px;pointer-events:none}.sync-cover{width:370px;background:rgba(0,0,0,.2);display:flex;align-items:center;justify-content:space-around;opacity:0;pointer-events:none;position:absolute;height:100%}.sync-cover.active{opacity:1;backdrop-filter:blur(2px);pointer-events:all}.animated .sync-tab-scroller,.animated .sync-cover-scroller{scroll-behavior:smooth}.sync-tab-scroller>div:not(.sync-cover){width:370px;padding:10px}.sync-table-label{text-align:center;font-weight:700}.sync-table{width:100%;table-layout:fixed;font-size:13px}.sync-table th{font-weight:500;padding:3px 1px}.sync-table td{padding:1px;text-align:center}.sync-table tr:nth-child(2n){background:rgb(0,0,0,.1)}#embed{position:fixed;bottom:0;margin:10px;font-size:13px;font-weight:200;color:#d7d7d77c;cursor:default;pointer-events:none}#embed a{transition:.2s ease-in-out;color:#d7d7d7ca;pointer-events:all}#embed a:hover{color:#d7d7d7ef}#playback-options{height:40px;left:0;display:flex;flex-direction:row;user-select:none;gap:24px;background-color:var(--secondary-bg);border-bottom:1px solid var(--secondary-border);padding:0 10px;font-size:15px;overflow-x:auto;overflow-y:hidden;width:100%;position:relative;top:0}#playback-options.collapsed{height:0px;border-bottom:0px solid var(--secondary-border)}#playback-options .playback-options-label{white-space:nowrap}.playback-options-title{justify-content:center;text-align:center;width:100%}.animated #playback-options,.animated .playback-options-row,.animated .po-thumb-row{transition:.3s cubic-bezier(.61,.04,.38,1.02)}#playback-options .playback-options-row.hidden{opacity:0;width:0px;margin-right:-24px;transform:scale(0)}#playback-options>.playback-options-row{display:flex;flex-direction:row;gap:7px;align-items:center;text-wrap:nowrap;width:var(--w)}.po-spinner{display:flex;flex-direction:row;align-items:center;height:20px}#playback-options .po-spinner-btn{box-shadow:none;transform:none;border:none;outline:none;filter:none;background-color:var(--input-bg);border-radius:5px;width:12px;height:20px;padding:0;text-align:center;justify-content:center}#playback-options .po-spinner .po-spinner-btn:first-of-type{border-top-right-radius:0;border-bottom-right-radius:0;border:1px var(--input-border) solid}#playback-options .po-spinner .po-spinner-btn:last-of-type{border-top-left-radius:0;border-bottom-left-radius:0;border:1px var(--input-border) solid}#playback-options .po-spinner-btn:disabled{filter:brightness(.5)}#playback-options .po-spinner-btn:hover:not(:disabled){background-color:var(--input-bg-hover)}#playback-options .po-spinner-btn:active:not(:disabled){background-color:var(--input-bg-active)}#playback-options .po-spinner-input{background-color:var(--input-bg);border-left:none;border-right:none;border-top:1px solid var(--input-border);border-bottom:1px solid var(--input-border);border-radius:0;width:42px;height:20px;padding:3px 4px;text-align:center;caret-color:auto}#playback-options .po-spinner-input:hover{background-color:var(--input-bg-hover)}#playback-options .po-spinner-input:disabled{filter:brightness(.6)}.animated .po-spinner-btn,.animated .po-spinner-input{transition:.08s ease-in-out}#playback-options .po-separator{margin:0 -6px;height:100%;display:flex;align-items:center}#playback-options .po-separator:after{border:.5px rgba(134,134,134,.5) solid;height:20px;content:" "}.po-toggle{background-color:var(--input-bg);border:1px solid var(--input-border);display:flex;flex-direction:row;gap:5px;font-size:14px;height:20px;border-radius:5px;align-items:center;position:relative}.po-toggle-item{padding:3px 6px}.po-toggle>*:not(.active):not(.po-toggle-highlight){opacity:.2}.po-toggle>*:not(.active):hover{opacity:.8}.po-toggle-highlight{position:absolute;background-color:var(--editable-overlay-active);border-radius:5px;pointer-events:none}.ico-checkbox{padding:1px;border-radius:2px}.ico-checkbox:hover{background:var(--editable-overlay-hover)}.ico-checkbox:active{background:var(--editable-overlay-active)}.animated .po-toggle>*,.animated .ico-checkbox{transition:.15s ease-in-out}.animated .po-toggle-highlight{transition:.15s cubic-bezier(.61,.04,.38,1.02)}.po-collapse-container{position:relative}#view-wrapper .po-collapse{margin-left:auto;margin-right:10px;height:25px;width:25px;padding:0;background:none;box-shadow:none;transform:none;border:none;outline:none;filter:none;text-align:center;justify-content:center;display:flex;align-items:center;transform:scaleY(1);user-select:none}#view-wrapper .po-collapse.toggled{transform:scaleY(-1)}.animated .po-collapse{transition:.15s cubic-bezier(.61,.04,.38,1.02)}.noteskin-grid{display:grid;grid-template-columns:repeat(4,1fr);width:100%;gap:15px;padding:10px;background:var(--secondary-bg);border:1px solid var(--secondary-border);margin-top:10px;border-radius:5px;overflow:auto;height:330px}.noteskin-cell{height:250px;position:relative;border-radius:5px;color:#fff}.noteskin-cell img{min-width:0;width:100%;height:100%;aspect-ratio:9 / 21;object-fit:cover;border-radius:5px}.noteskin-label{position:absolute;bottom:0;padding:100px 10px 10px;width:100%;background:linear-gradient(to top,rgba(0,0,0,.7),rgba(0,0,0,.7) 30%,rgba(0,0,0,0) 100%);border-radius:5px}.noteskin-title{font-size:16px;font-weight:700}.noteskin-subtitle{font-style:italic;font-size:12px}.noteskin-cell:hover{transform:scale(1.02);box-shadow:0 0 5px #0009}.noteskin-cell:hover img{filter:brightness(1.1)}.noteskin-cell:active{transform:scale(.98)}.noteskin-cell.selected img{box-shadow:0 0 5px 2px var(--accent-color);filter:brightness(1.2)}.animated .noteskin-cell,.animated .noteskin-cell img{transition:.2s cubic-bezier(.26,.64,.47,1.6)}.theme-color-grid{display:flex;flex-direction:column;gap:5px;font-size:12px;background-color:var(--secondary-bg);border:1px solid var(--secondary-border);padding:15px;overflow:auto}.theme-group-label{font-size:16px}.theme-picker-grid{display:grid;grid-template-columns:repeat(4,1fr);color:var(--text-color-secondary);gap:15px;font-size:15px;text-align:center;padding:5px;overflow:auto}.theme-color-cell{display:flex;flex-direction:column;align-items:center;border-radius:5px}.theme-color-cell.linked{background-color:var(--editable-overlay-hover)}.animated .theme-color-cell{transition:.3s cubic-bezier(.39,.575,.565,1)}.theme-color-detail{color:var(--text-color-detail);font-size:10px}.theme-color-cell input[type=range]{width:50px;margin-right:0}.color-picker{width:24px;height:24px;border-radius:3px;border:1px solid rgb(111,111,111);overflow:hidden}.color-picker:hover:not(:active){transform:scale(1.03);box-shadow:0 0 4px #0009}.color-picker:active{transform:scale(.93);box-shadow:0 0 4px #0009}.animated .color-picker{transition:.1s cubic-bezier(.39,.575,.565,1)}.color-picker-popup{position:absolute;background:#dcdcdc;padding:15px;display:flex;flex-direction:row;gap:15px;z-index:20;border-radius:5px;transform-origin:top center;border:1px solid black;animation:1ms popup-enter cubic-bezier(.47,.02,0,.95) forwards;box-shadow:0 0 5px #0009}.animated .color-picker-popup{animation:.1s popup-enter cubic-bezier(.47,.02,0,.95) forwards}.animated .color-picker-popup.exiting{animation:.1s popup-exit cubic-bezier(.47,.02,0,.95) forwards;pointer-events:none}.color-picker-popup .color-matrix{position:relative;width:200px;height:200px}.color-picker-popup .color-matrix-x{position:absolute;top:0;left:0;width:200px;height:200px;background:linear-gradient(to right,#fff 0%,rgba(255,255,255,0) 100%)}.color-picker-popup .color-matrix-y{position:absolute;top:0;left:0;width:200px;height:200px;background:linear-gradient(to bottom,transparent 0%,#000 100%)}.color-picker-popup .color-matrix-dot{position:absolute;width:15px;height:15px;border:2px solid white;border-radius:15px;transform:translate(-50%,-50%)}.color-picker-popup .color-matrix-dot:after{content:" ";position:absolute;width:15px;height:15px;border:2px solid black;border-radius:15px;transform:translate(-4px,-4px)}.color-picker-popup .color-slider{width:200px;height:20px;position:relative;border-radius:5px}.color-picker-transparent{background-image:linear-gradient(45deg,#ccc 25%,transparent 25%),linear-gradient(-45deg,#ccc 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ccc 75%),linear-gradient(-45deg,transparent 75%,#ccc 75%);background-position:0 0,0 4px,4px -4px,-4px 0px;background-size:8px 8px}.color-picker-popup .color-slider-thumb{position:absolute;width:5px;height:24px;border:1px solid white;border-radius:15px;transform:translate(-50%,-2px);z-index:21}.color-picker-popup .color-slider-thumb:after{content:" ";position:absolute;width:5px;height:24px;border:1px solid black;border-radius:15px;transform:translate(-2px,-2px);z-index:21}.color-picker-popup .color-picker-area{display:flex;flex-direction:column;gap:5px}.color-picker-popup .color-format{background-color:#cbced2;padding:10px;border-radius:5px;display:flex;gap:5px}.color-picker-popup .color-format-label{color:#000;width:45px;pointer-events:none;user-select:none}.color-picker-popup .color-format-inputs{width:170px;display:flex;gap:5px}.color-picker-popup .color-format-inputs input{min-width:none;width:100%;color:#000;background-color:#ebebeb;border:1px solid rgba(0,0,0,.3);text-align:center}.color-picker-popup .color-picker-preview{flex:1;width:100%;display:flex;border:1px solid rgba(0,0,0,.2);border-radius:5px}.color-picker-popup .color-picker-transparent{flex:1}.theme-grid{display:grid;grid-template-columns:repeat(4,1fr);width:100%;gap:5px;padding:10px;background:var(--secondary-bg);border:1px solid var(--secondary-border);margin-top:10px;overflow:auto;flex:1;border-radius:5px 5px 0 0}.theme-cell{padding:15px;display:flex;align-items:center;flex-direction:column;gap:5px;border-radius:5px;height:fit-content;min-width:0}.theme-title{text-align:center!important;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:100%}.theme-cell:hover:not(.selected){background:var(--secondary-bg-hover)}.theme-cell.selected{background:var(--secondary-bg-active)}.animated .theme-cell{transition:.2s cubic-bezier(.47,.02,0,.95)}.theme-preview-grid{display:grid;grid-template-columns:repeat(3,1fr);width:66px;height:66px;border:1px solid rgb(0,0,0,.5);border-radius:5px;overflow:hidden}.markdown-container{background-color:var(--secondary-bg);border:1px solid var(--secondary-border);border-radius:5px 5px 0 0;flex:1;height:100%;overflow:auto;padding:15px;display:flex;flex-direction:column;gap:30px}.markdown-container hr{border:1px solid var(--secondary-border);margin:5px 0}.markdown-container ul{padding-top:5px;padding-bottom:5px;padding-left:30px}.markdown-container li{padding:2px 0}.split-timing-grid{border:1px solid var(--secondary-border);margin-top:10px;display:flex;flex-direction:column}.split-timing-row{display:grid;grid-template-columns:130px 20px 120px 150px;align-items:center;gap:5px;padding:3px 10px}.split-timing-row *{overflow:hidden}.split-timing-row *:nth-child(2){background-color:#0000004d;text-align:center;border-radius:2px}.split-timing-row div,.split-timing-modify-row div{color:#fff}.split-timing-modify-row{display:grid;grid-template-columns:150px 120px 150px;align-items:center;gap:5px;padding:3px 10px}.split-timing-modify-row *:first-child{font-size:13px} diff --git a/assets/index-a01abcd0.css b/assets/index-a01abcd0.css deleted file mode 100644 index 956d9e93..00000000 --- a/assets/index-a01abcd0.css +++ /dev/null @@ -1 +0,0 @@ -@font-face{font-family:Assistant;font-style:normal;font-weight:200;font-display:swap;src:url(/smeditor/assets/font/Assistant-Hebrew.woff2) format("woff2");unicode-range:U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:Assistant;font-style:normal;font-weight:200;font-display:swap;src:url(/smeditor/assets/font/Assistant-LatinExt.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Assistant;font-style:normal;font-weight:200;font-display:swap;src:url(/smeditor/assets/font/Assistant-Latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Assistant;font-style:normal;font-weight:300;font-display:swap;src:url(/smeditor/assets/font/Assistant-Hebrew.woff2) format("woff2");unicode-range:U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:Assistant;font-style:normal;font-weight:300;font-display:swap;src:url(/smeditor/assets/font/Assistant-LatinExt.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Assistant;font-style:normal;font-weight:300;font-display:swap;src:url(/smeditor/assets/font/Assistant-Latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Assistant;font-style:normal;font-weight:400;font-display:swap;src:url(/smeditor/assets/font/Assistant-Hebrew.woff2) format("woff2");unicode-range:U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:Assistant;font-style:normal;font-weight:400;font-display:swap;src:url(/smeditor/assets/font/Assistant-LatinExt.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Assistant;font-style:normal;font-weight:400;font-display:swap;src:url(/smeditor/assets/font/Assistant-Latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Assistant;font-style:normal;font-weight:500;font-display:swap;src:url(/smeditor/assets/font/Assistant-Hebrew.woff2) format("woff2");unicode-range:U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:Assistant;font-style:normal;font-weight:500;font-display:swap;src:url(/smeditor/assets/font/Assistant-LatinExt.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Assistant;font-style:normal;font-weight:500;font-display:swap;src:url(/smeditor/assets/font/Assistant-Latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Assistant;font-style:normal;font-weight:600;font-display:swap;src:url(/smeditor/assets/font/Assistant-Hebrew.woff2) format("woff2");unicode-range:U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:Assistant;font-style:normal;font-weight:600;font-display:swap;src:url(/smeditor/assets/font/Assistant-LatinExt.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Assistant;font-style:normal;font-weight:600;font-display:swap;src:url(/smeditor/assets/font/Assistant-Latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Assistant;font-style:normal;font-weight:700;font-display:swap;src:url(/smeditor/assets/font/Assistant-Hebrew.woff2) format("woff2");unicode-range:U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:Assistant;font-style:normal;font-weight:700;font-display:swap;src:url(/smeditor/assets/font/Assistant-LatinExt.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Assistant;font-style:normal;font-weight:700;font-display:swap;src:url(/smeditor/assets/font/Assistant-Latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Assistant;font-style:normal;font-weight:800;font-display:swap;src:url(/smeditor/assets/font/Assistant-Hebrew.woff2) format("woff2");unicode-range:U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:Assistant;font-style:normal;font-weight:800;font-display:swap;src:url(/smeditor/assets/font/Assistant-LatinExt.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Assistant;font-style:normal;font-weight:800;font-display:swap;src:url(/smeditor/assets/font/Assistant-Latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}*{box-sizing:border-box;margin:0;padding:0;line-height:1.15em}body{--accent-color: rgb(23, 131, 208);accent-color:var(--accent-color);--text-color: white;--text-color-secondary: #888;--text-color-detail: #757a89;--text-color-disabled: #888;--primary-bg: #555;--primary-border: #444;--primary-bg-active: #575757;--primary-bg-hover: #666;--navbar-bg: #3d3d3d;--navbar-bg-inactive: #626262;--window-bg: #3d3d3d;--window-border: #00000000;--secondary-bg: #373737;--secondary-border: #333;--secondary-bg-active: #555;--secondary-bg-hover: #454545;--editable-overlay-hover: rgb(255, 255, 255, .2);--editable-overlay-active: rgb(255, 255, 255, .1);--input-bg: rgba(35, 35, 35, .309);--input-bg-hover: rgba(79, 79, 79, .309);--input-bg-active: rgba(50, 50, 50, .309);--input-border: rgba(0, 0, 0, .3);--widget-bg: rgba(0, 0, 0, .5);--tooltip-bg: rgba(20, 20, 20, .95)}body{overflow:hidden;overscroll-behavior-x:none;overscroll-behavior-y:none;background-color:#18191c;height:100%;width:100%;position:relative;--danger: rgb(172, 54, 54);font-family:Assistant,Helvetica,sans-serif!important;color:var(--text-color)}html{height:100%;width:100%}.browser-unsupported{align-items:center;display:flex;flex-direction:row;height:100%;width:100%}.browser-unsupported-item{text-align:center;width:100%}.browser-unsupported-detail{font-size:12px;color:var(--text-color-detail)}#view-wrapper{display:flex;flex-direction:column;width:100%;caret-color:transparent}.window{border-radius:5px;position:fixed;box-shadow:0 0 5px #0009;border:1px solid var(--window-border);overflow:hidden}.navbar{align-items:center;background:var(--navbar-bg);border-bottom:1px solid var(--primary-border);border-top-left-radius:5px;border-top-right-radius:5px;display:flex;flex-direction:row;font-size:15px;width:100%;padding:3px;gap:3px}.navbar:empty{border-bottom:none}.window:not(.focused)>.navbar{background:var(--navbar-bg-inactive);border-bottom:1px solid transparent}.title:empty{margin:0}.navbar .title{color:var(--text-color);flex:1 1 auto;overflow:hidden;padding-left:5px;text-overflow:ellipsis;white-space:nowrap}.navbar .icon{cursor:pointer;filter:brightness(.8)}.animated .navbar .icon{transition:.1s cubic-bezier(.39,.575,.565,1)}.navbar .icon:hover{filter:none}button{background:var(--input-bg);border:.5px solid rgba(0,0,0,.6);border-radius:5px;padding:4px 7px;display:flex;align-items:center;justify-content:center;transform:translateY(-.5px);box-shadow:0 .5px #000000e6,0 3px 5px -3px #0009;cursor:pointer;column-gap:5px;font-family:inherit;color:inherit}.animated button{transition:.2s cubic-bezier(.175,.885,.32,1.875)}.animated button:hover:enabled{transform:translateY(-1.5px);box-shadow:0 1.5px #000000e6,0 3px 5px -2px #0009}.animated button:active:enabled{transform:translateY(.2px);box-shadow:none}button:hover:enabled{filter:brightness(1.3)}button:active:enabled{filter:brightness(.8)}button.confirm{background:var(--accent-color)}button.delete{background:var(--danger);color:#fff}button:disabled{opacity:.5;transform:none;box-shadow:none;cursor:not-allowed}.view{background-color:var(--window-bg);font-size:15px;overflow:hidden}.animated .view{transition:.3s cubic-bezier(.445,.05,.55,.95)}.window.focused .view{box-shadow:inset 0 2px 3px -1px #0000001a}.view .padding{display:flex;flex-direction:column;padding:20px;height:100%}.open-container{display:grid;grid-template-rows:2fr auto 5fr;height:100%}.open-container .top-container{display:grid;grid-template-columns:1fr 1fr;gap:20px}.open-container .bottom-container{display:flex;flex-direction:column;gap:5px;overflow:hidden}.open-container .title{font-size:17px;text-transform:uppercase}.open-container .container{align-items:center;display:flex;flex-direction:row}.container+.title{border-top:solid 1px #555;margin-top:10px;padding-top:10px}.window.exiting{filter:blur(20px);opacity:0}.animated .exiting{transition:.06s cubic-bezier(.6,.04,.98,.335)}.unselectable{-moz-user-select:none;-webkit-user-drag:none;-webkit-user-select:none;user-select:none}.folder>.children{margin-left:20px}.folder.collapsed>.children{display:none}.item .info{align-items:center;display:flex;flex-direction:row}.item .info .title{background:none;border:none;border-radius:5px;flex:1 1 auto;outline:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:1px 5px}.folder.collapsed>.info>.folder-icon{transform:rotate(-90deg)}.pref-label.collapsed>.folder-icon{transform:rotate(-90deg)}.animated .folder-icon{transition:.2s cubic-bezier(.39,.575,.565,1)}.icon{display:flex;align-items:center}.dir-selector{background-color:var(--secondary-bg);border:1px solid var(--secondary-border);border-radius:5px 5px 0 0;flex:1;height:100%;overflow:auto;padding:5px}.file-options,.theme-tray{display:flex;flex-direction:row;column-gap:5px;background-color:var(--secondary-bg);border:1px solid var(--secondary-border);margin-bottom:5px;padding:4px;border-radius:0 0 5px 5px}.info.disabled>.title{color:var(--text-color-disabled)}.info.disabled>.icon{opacity:.3}.info.selected,.info.selected:hover{background-color:var(--secondary-bg-active)}.info:hover{background-color:var(--secondary-bg-hover)}.options-icon{display:none}.info:hover>.options-icon{display:block;opacity:.3}.info.selected>.options-icon{display:block;opacity:.3}textarea{-moz-user-select:none;-webkit-user-select:none;resize:none;user-select:none;color:inherit;font-family:inherit}.dir-selector:empty:before{color:var(--text-color-disabled);content:"No files! Add a file by dragging a folder/file or using the buttons below.";height:100%;display:flex;justify-content:center;align-items:center}.recent-selector{background-color:var(--secondary-bg);border:1px solid var(--secondary-border);border-radius:5px 5px 0 0;flex:1;height:100%;overflow:auto;overflow-x:hidden;padding:5px;width:360px}.recent-selector:empty:before{color:var(--text-color-disabled);content:"No recent files";height:100%;display:flex;justify-content:center;align-items:center}.recent-item{align-items:center;display:flex;flex-direction:row;padding:1px 5px;text-overflow:ellipsis;white-space:nowrap;gap:8px;font-size:14px}.recent-item.selected,.recent-item.selected:hover{background-color:var(--secondary-bg-active)}.recent-item:hover{background-color:var(--secondary-bg-hover)}.recent-item .recent-path{font-style:italic;color:var(--text-color-secondary);text-overflow:ellipsis;overflow:hidden}.recent-item .recent-name{text-overflow:ellipsis;overflow:hidden;flex:0 0 auto}.menu-options{display:flex;margin-top:5px;flex:0;justify-content:space-between}.menu-left{display:flex;width:50%}.menu-right{display:flex;flex-direction:row-reverse;width:50%}.outlined{box-shadow:inset 0 0 3px 2px #10629ccc}.outlined>.info{box-shadow:inset 0 0 3px 2px #10629ccc}#menubar{display:flex;background-color:var(--primary-bg);border-bottom:1px solid var(--secondary-border)}.menu-item{position:relative;z-index:15}.menu-item>.menu-item-title{padding:4px 0;display:flex;align-items:center}#menubar>.menu-item>.title{padding:4px 10px}#menubar .menubar-dropdown{display:none;background-color:var(--primary-bg);border:1px solid var(--primary-border);position:absolute;border-radius:5px}#menubar .menu-item:not(.disabled):hover>.menubar-dropdown,#menubar .menubar-dropdown:not(.disabled):hover{display:block}.menu-item-title .title{flex:1;margin-left:10px;margin-right:15px;white-space:nowrap}.menu-item-title .keybind{margin-right:10px;color:var(--text-color-secondary);white-space:nowrap}.menu-item-title .icon{margin-right:10px}.menu-item.disabled .menu-item-title .title{color:var(--text-color-disabled)}.menu-item.checked>.menu-item-title .title{font-weight:800}.menu-item:not(.disabled)>.menu-hover:hover{background-color:var(--primary-bg-hover)}.animated .menu-hover{transition:.1s cubic-bezier(.215,.61,.355,1)}.separator{border:.2px solid var(--secondary-bg);margin:4px;height:1px}.check-icon{position:relative;right:16px}.chart-view-scroller{display:grid;grid-template-columns:4fr 6fr;gap:4px;width:100%;height:100%;overflow:auto}.chart-list{height:100%;background-color:var(--secondary-bg);border:1px solid var(--secondary-border);border-radius:5px;overflow:scroll}.chart-info{height:100%;background-color:var(--secondary-bg);border:1px solid var(--secondary-border);border-radius:5px;word-break:break-all;padding:15px;overflow:scroll}.chart-info .label{padding:2px 0}.chart-info:empty:before{color:var(--text-color-disabled);height:100%;display:flex;justify-content:center;align-items:center;content:"Select a chart for more details"}.chart-list-item{display:flex;align-items:center;border:.2px solid var(--secondary-border);cursor:pointer}.animated .chart-list-item{transition:.1s cubic-bezier(.215,.61,.355,1)}.chart-list-item.selected,.chart-list-item:active{background-color:var(--secondary-bg-active)}.chart-list-item:not(.selected):hover{background-color:var(--secondary-bg-hover)}.chart-list-item .Beginner{background-color:#3b6c80;color:#fff}.chart-list-item .Easy{background-color:#308655;color:#fff}.chart-list-item .Medium{background-color:#a08f45;color:#fff}.chart-list-item .Hard{background-color:#8e2921;color:#fff}.chart-list-item .Challenge{background-color:#8b1b9e;color:#fff}.chart-list-item .Edit{background-color:#757575;color:#fff}.chart-list-item>.title{padding:4px;text-align:center;align-content:center;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;min-width:25px}.chart-list-item.extended .chart-list-info{margin:0;opacity:0}.chart-list-info{opacity:1;display:flex;width:100%;align-items:center;margin:0 5px;place-content:space-between;min-width:0;column-gap:5px;flex:1}.animated .chart-list-info{transition:.2s cubic-bezier(.215,.61,.355,1)}.chart-attributes{display:flex;padding:2px 2px 2px 0}.chart-properties{display:grid;grid-template-columns:100px minmax(0,1fr);align-items:center;flex:1;row-gap:2px;margin-bottom:12px}div.inlineEdit[contenteditable=true]{min-width:8px;text-align:right;border-radius:3px;padding:0 3px;border:1px solid transparent;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;-ms-overflow-style:none;scrollbar-width:none;caret-color:auto;cursor:text}div.inlineEdit{cursor:default}.animated div.inlineEdit{transition:.2s cubic-bezier(.39,.575,.565,1)}div.inlineEdit[contenteditable=true]:hover{background:var(--editable-overlay-hover)}div.inlineEdit[contenteditable=true]:focus{background:var(--editable-overlay-active);outline:none;overflow:auto;text-overflow:clip}::-webkit-scrollbar{display:none}.chart-credit,.chart-difficulty,.chart-info-grid-label{flex:1;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;padding:1px 0}.chart-step-count{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.chart-info-main{display:flex;font-size:18px;margin-bottom:5px;align-items:center;place-content:space-between}.chart-info-grid-item{display:flex}.chart-info-grid{display:grid;grid-template-columns:1fr 1fr;row-gap:2px;column-gap:15px;margin-top:5px}.timing-data>.padding{display:grid;row-gap:3px;grid-template-columns:auto 170px;align-items:center}.timing-data>.padding>div:not(.label){display:flex;align-items:center;height:100%}.sm-properties .padding{display:flex;flex-direction:column}.sm-properties .property-grid{display:grid;row-gap:3px;grid-template-columns:auto 250px;align-items:center;flex:1}.sm-properties .property-grid>div:not(.label){display:flex;align-items:center}input[type=text],input[type=number]{background:var(--input-bg);border:1px solid var(--input-border);border-radius:3px;padding:0 3px;flex:1;height:100%;user-select:text;caret-color:auto;font-size:13.33px;font-family:inherit;color:inherit}input[type=range]:focus{outline:none}input:disabled{color:var(--text-color-disabled);pointer-events:none}input:focus{outline:1px solid var(--accent-color)}input.short{width:40px}input.right{text-align:right}.chart-view-type-wrapper{display:flex;flex-direction:row;align-items:center;column-gap:10px;margin-bottom:10px}.dropdown{height:100%;position:relative}.dropdown.no-border .dropdown-selected{border:none;background:none;padding:1px}.dropdown.no-border .dropdown-selected:not(:hover):after{opacity:0}.dropdown-selected{background-color:var(--input-bg);border:1px solid var(--input-border);border-radius:3px;width:100%;height:100%;padding:1px 7px;margin-right:3px;display:flex;align-items:center;white-space:nowrap;cursor:pointer}.animated .dropdown-selected{transition:.1s cubic-bezier(.215,.61,.355,1)}.dropdown-selected.disabled{color:var(--text-color-disabled);pointer-events:none;cursor:not-allowed}.dropdown-selected:empty{display:none}.dropdown-selected .icon{margin-left:auto}.dropdown-selected:hover:not(.disabled):not(:active){background:var(--editable-overlay-hover)}.dropdown-selected:active{background:var(--editable-overlay-hover)}.dropdown-items{position:absolute;background:var(--primary-bg);max-height:200px;overflow:auto;z-index:5;border-radius:5px;height:0;box-shadow:0 3px 15px #0009;cursor:pointer;top:100%;border:1px solid var(--input-border)}.dropdown-items.collapsed{border:none}.dropdown-right>.dropdown-items{right:0}.animated .dropdown-items{transition:height .07s cubic-bezier(.215,.61,.355,1)}.dropdown-item{padding:3px 7px;white-space:nowrap}.animated .dropdown-item{opacity:0;transform:translateY(-10px);animation:.2s dropdown-enter cubic-bezier(.175,.885,.32,1.575) forwards;transition-property:height,background;transition-duration:.07s;transition-timing-function:cubic-bezier(.215,.61,.355,1)}.dropdown-item:hover{background:var(--primary-bg-hover)}.dropdown-item:active{background:var(--primary-bg-active)}@keyframes dropdown-enter{0%{transform:translateY(-10px);opacity:0}to{opacity:1;transform:none}}.pref-selector{background-color:var(--secondary-bg);border:1px solid var(--secondary-border);border-radius:0 0 5px 5px;flex:1;height:100%;overflow:auto;padding:5px;font-size:15px}.pref-label{display:flex;flex-direction:row;align-items:center;margin-right:5px;padding:1px 0}.pref-label:hover{background-color:var(--secondary-bg-active)}.flex-row{display:flex;flex-direction:row;align-items:center;justify-content:space-between;height:100%;width:100%}.flex-column-gap{column-gap:5px}.flex-row-gap{row-gap:5px}.flex-grow{flex:1}.flex-static{flex:0}#blocker{width:100%;height:100%;background-color:#00000080;position:absolute;top:0;z-index:10000;caret-color:transparent}.spinner{display:flex;flex-direction:row;height:100%;flex:1}.spinner-input[type=text]{border-top-right-radius:0;border-bottom-right-radius:0;width:100%;height:100%;min-width:0;flex:1}.spinner-input:disabled+.spinner-btns{pointer-events:none}.spinner-btns{display:grid;grid-template-rows:1fr 1fr;border:1px solid var(--input-border);border-left:none;border-top-right-radius:3px;border-bottom-right-radius:3px;flex:0;height:100%;min-height:20px}.spinner-btns button{padding:0 2px;flex:1;border-radius:0;height:100%;width:10px;height:9px;border:none;min-width:auto}.spinner-btns .spinner-up svg{rotate:180deg}.spinner-up{background:linear-gradient(0deg,var(--input-bg-active),var(--input-bg))}.spinner-down{background:linear-gradient(180deg,var(--input-bg-active),var(--input-bg))}.slider{display:flex;flex-direction:row}#waterfall{position:relative;top:0}#waterfall-container{position:absolute;top:9px;display:flex;flex-direction:column;text-align:right;padding:0 10px;width:100%;pointer-events:none;user-select:none;caret-color:transparent}.waterfall-item{pointer-events:none}.animated .waterfall-item{transition:cubic-bezier(.455,.03,.515,.955) .5s;animation:waterfall-enter .3s cubic-bezier(.455,.03,.515,.955)}.waterfall-warn{color:#f6ca39;display:inline-block;margin-right:4px}.waterfall-error{color:#b72323;display:inline-block;margin-right:4px}@keyframes waterfall-enter{0%{opacity:0;transform:translate(200px,10px)}to{opacity:1;transform:none}}.waterfall-exiting{opacity:0;transform:translate(200px)}.confirmation .padding .label{flex:1;text-align:center}.confirmation button{min-width:55px}input[type=range]{width:100px;margin-right:10px}.hide-buttons button{display:none}.hide-buttons:hover button,.hide-buttons div:focus+button{display:flex}#status-widget{position:absolute;bottom:30px;display:flex;flex-direction:column;left:50%;transform:translate(-50%);border-radius:5px;align-items:center;height:96px;overflow:hidden;user-select:none}#status-widget.collapsed{height:48px}.playback-bar,.edit-bar{display:flex;flex-direction:row;height:48px;align-items:center;border-radius:5px;justify-content:flex-start;width:100%}.playback-bar{background-color:var(--widget-bg)}#status-widget:not(.collapsed) .playback-bar{border-bottom:1px rgba(55,55,55,.2) solid;border-radius:0}.animated #status-widget{transition:.3s cubic-bezier(.11,.72,.51,1.14)}#status-widget button{background:none;box-shadow:none;transform:none;border:none;width:48px;height:48px;outline:none;filter:none}#status-widget button img{height:100%}#status-widget button:hover:not(.active){background-color:var(--editable-overlay-hover)}#status-widget button.active{background-color:var(--editable-overlay-active)}#status-widget button:disabled{filter:brightness(.2) saturate(.4)}.animated #status-widget button{transition:.2s cubic-bezier(.39,.575,.565,1)}#status-widget .playback-separator{padding:0 2px;height:48px;display:flex;align-items:center}#status-widget .playback-separator:after{border:.5px rgba(134,134,134,.5) solid;height:30px;content:" "}#status-widget .playback-counter{display:flex;flex-direction:column;align-items:center;width:100px;margin:0 4px}#status-widget .playback-counter .playback-counter-label{font-size:10px;color:var(--text-color-secondary)}#status-widget .playback-counter .playback-counter-label:after{filter:invert() brightness(.4)}#status-widget .playback-counter .playback-counter-main{font-size:18px;line-height:18px;max-width:100px;align-items:baseline}#status-widget .playback-counter .playback-counter-main,#status-widget .playback-counter .playback-counter-main *{padding:0;border:none;text-overflow:clip;overflow:hidden}#status-widget .dropdown-selected{border:none;background:none}#status-widget .edit-fancy-button{font-size:9px;padding:0 4px;width:56px;height:48px;display:flex;flex-direction:column;align-content:center}#status-widget .edit-fancy-button.active{background-color:var(--editable-overlay-active)}#status-widget .edit-fancy-button img{margin-bottom:3px;height:23px}.note-placeholder{border-radius:5px}.edit-choice-container{display:flex;flex-direction:column;height:96px;position:relative;top:0;align-self:flex-start;width:100%;overflow:hidden}.edit-steps-container,.edit-timing-container{display:flex;flex-direction:row;align-items:center;height:48px;width:100%}.animated .edit-choice-container,.animated .edit-steps-container,.animated .edit-timing-container{transition:.2s cubic-bezier(.39,.575,.565,1)}.edit-timing-container{background-color:var(--widget-bg);height:48px}#status-widget .edit-bar .edit-bar-left{background-color:var(--widget-bg);display:flex;flex-direction:row}.note-placeholder-right{flex:1;background-color:var(--widget-bg);height:48px}.popup{user-select:none;position:absolute;transform:translate(-50%);z-index:10}.popup-zoomer{transform-origin:top center;display:flex;flex-direction:column;background-color:var(--window-bg);border-radius:5px;padding:8px;align-items:center;border:1px solid black;animation:1ms popup-enter cubic-bezier(.47,.02,0,.95) forwards;box-shadow:0 0 5px #0009;color:#fff}.popup-zoomer input{color:var(--text-color)}.popup-zoomer.selected{filter:saturate(1.2) brightness(1.4);border:1px solid rgb(14,83,104)}.popup.exiting .popup-zoomer{animation:.01s popup-exit cubic-bezier(.47,.02,0,.95) forwards;pointer-events:none}.animated .popup{transition:.2s cubic-bezier(.47,.02,0,.95)}.animated .popup-zoomer{animation:.1s popup-enter cubic-bezier(.47,.02,0,.95) forwards;transition:.2s cubic-bezier(.47,.02,0,.95)}.animated .popup.exiting .popup-zoomer{animation:.1s popup-exit cubic-bezier(.47,.02,0,.95) forwards;pointer-events:none}.popup-row{display:flex;flex-direction:row;gap:5px;color:#ddd;white-space:nowrap;font-size:14px;align-items:center}.popup-flex{display:flex;flex-direction:column;gap:4px;margin-top:4px}@keyframes popup-enter{0%{transform:scale(.8);opacity:0}to{transform:scale(1);opacity:1}}@keyframes popup-exit{0%{transform:scale(1);opacity:1}to{transform:scale(.8);opacity:0}}.popup .popup-desc{font-size:10px;font-style:italic;text-align:center;color:#757a89}.animated .popup-desc{transition:.2s cubic-bezier(.47,.02,0,.95)}.popup .popup-title{text-align:center}.popup .popup-label{color:#ddd;white-space:nowrap;font-size:14px}.popup .popup-grid input[type=text]{min-width:0;text-align:right}.popup .popup-grid input[type=checkbox]{min-width:0;justify-self:end}.popup .popup-grid{margin-top:4px;display:grid;grid-template-columns:auto auto;column-gap:15px;row-gap:4px;width:100%;justify-content:end;align-items:center}.animated .popup-options{transition:.2s cubic-bezier(.47,.02,0,.95)}.popup-options{margin-top:0;width:100%;justify-content:space-around;transform:scale(0);height:0;display:flex}.popup-options button{min-width:40px}.popup-zoomer.selected .popup-options{margin-top:5px;transform:scale(1);height:24.5px;filter:saturate(.8) brightness(.7)}.draggable-track{writing-mode:vertical-rl;text-align:center;padding:20px 4px;height:200px;display:flex;align-items:center;justify-content:space-around;box-shadow:0 .5px #000000e6,0 3px 5px -3px #0009;cursor:grab}.draggable-track.left .draggable-track-text{transform:rotate(180deg)}.draggable-track .icon{position:absolute;display:none}.draggable-track:hover .icon{display:block;bottom:10px;backface-visibility:hidden;cursor:pointer}.draggable-track:hover .icon:hover{color:var(--danger)}.draggable-track:hover{filter:brightness(1.3) saturate(2.5);transform:translateY(-1.5px);box-shadow:0 1.5px #000000e6,0 3px 5px -2px #0009}.draggable-track:active{cursor:grabbing;filter:brightness(1.1) saturate(2.5);transform:none;box-shadow:0 0 #000000e6,0 3px 5px -2px #0009}@keyframes draggable-exit{0%{width:26px}to{width:0;padding:0;opacity:0}}@keyframes draggable-enter{0%{opacity:0;width:0;padding:0}to{opacity:1;width:26px}}.draggable-track.entering,.draggable-option.entering{animation:draggable-enter 0s cubic-bezier(0,.91,.34,1.05) forwards}.draggable-track.exiting,.draggable-option.exiting{animation:draggable-exit 0s cubic-bezier(0,.91,.34,1.05) forwards}.animated .draggable-track.entering,.animated .draggable-option.entering{animation:draggable-enter .4s cubic-bezier(0,.91,.34,1.05) forwards}.animated .draggable-track.exiting,.animated .draggable-option.exiting{animation:draggable-exit .4s cubic-bezier(0,.91,.34,1.05) forwards}@keyframes leftover-enter{0%{opacity:0;transform:scale(0);padding:0}to{opacity:1;transform:scale(1)}}.leftover-track.entering,.leftover-option.entering{animation:leftover-enter 0s cubic-bezier(0,.91,.34,1.05) forwards}.animated .leftover-track.entering,.animated .leftover-option.entering{animation:leftover-enter .4s cubic-bezier(0,.91,.34,1.05) forwards}#timing-track-order .title{text-align:center;padding:6px}.track-grid{display:flex;flex-direction:row;background-color:var(--secondary-bg);border:1px solid var(--secondary-border);padding:4px;border-radius:3px;width:468.08px;justify-content:center}.track-grid-options{display:flex;flex-direction:row;column-gap:8px;padding:4px 0}.track-selector{flex:1;height:30px;display:flex;flex-direction:row;background-color:var(--secondary-bg);border:1px solid var(--secondary-border);padding:4px;border-radius:3px;gap:4px;overflow-x:auto}.leftover-track{display:flex;justify-content:center;align-items:center;border-radius:3px;padding:4px;gap:3px;box-shadow:0 .5px #000000e6,0 3px 5px -3px #0009;font-size:13px;cursor:grab}.leftover-track img{filter:invert();vertical-align:baseline;width:10px}.leftover-track:hover{filter:brightness(1.3) saturate(2.5);transform:translateY(-1.5px);box-shadow:0 1.5px #000000e6,0 3px 5px -2px #0009}.leftover-track:active{filter:brightness(1.1) saturate(2.5);transform:none;box-shadow:0 0 #000000e6,0 3px 5px -2px #0009;cursor:grabbing}.animated .draggable-track,.animated .draggable-track img,.animated .leftover-track,.animated .track-selector,.animated .draggable-option,.animated .draggable-option img,.animated .leftover-option{transition:.2s cubic-bezier(0,.91,.34,1.05)}.sm-title{font-weight:700;margin-bottom:3px}.sm-container{margin-bottom:15px}#context-menu{display:flex;position:absolute;flex-direction:column;background-color:var(--primary-bg);border:1px solid var(--primary-border);caret-color:transparent;font-size:15px;border-radius:5px;transform-origin:top left;opacity:.95}.animated #context-menu.entering{animation:context-enter .15s cubic-bezier(.13,.61,.07,.98)}#context-menu.exiting{transform:scale(.8);opacity:0}.animated #context-menu.exiting{transition:.1s cubic-bezier(.15,.73,.62,.75)}@keyframes context-enter{0%{opacity:0;transform:scale(.8)}to{opacity:.95;transform:scale(1)}}.menu-item>.menu-item-title{padding:3px 0;display:flex;align-items:center}.menu-item:first-child>.menu-item-title{border-top-left-radius:5px;border-top-right-radius:5px}.menu-item:last-child>.menu-item-title{border-bottom-left-radius:5px;border-bottom-right-radius:5px}#context-menu .menubar-dropdown{background-color:var(--primary-bg);border:1px solid var(--primary-border);position:absolute;left:100%;top:0;border-radius:5px;transform-origin:left;transform:scale(0);opacity:0}@keyframes context-dropdown-enter{0%{transform:scale(.8)}to{transform:scale(1)}}@keyframes context-dropdown-exit{0%{transform:scale(1)}to{transform:scale(.8)}}#context-menu .menu-item:not(.disabled):hover>.menubar-dropdown,#context-menu .menubar-dropdown:not(.disabled):hover{opacity:.95;transform:scale(1)}.animated #context-menu .menu-item:not(.disabled):hover>.menubar-dropdown,.animated #context-menu .menubar-dropdown:not(.disabled):hover{animation:context-dropdown-enter .08s cubic-bezier(.215,.61,.355,1) forwards}.animated #context-menu .menubar-dropdown{animation:context-dropdown-exit .08s cubic-bezier(.215,.61,.355,1);transition:.08s cubic-bezier(.215,.61,.355,1)}.menu-item .menubar-dropdown .menubar-dropdown{left:100%;top:0}.pref-container{display:flex;flex-direction:column;gap:10px;height:100%}.pref-search{display:flex;flex-direction:row;gap:10px}.pref-scrollers{display:flex;gap:20px;flex:1;min-height:0}.pref-section-scroller,.pref-option-scroller{background-color:var(--secondary-bg);border:1px solid var(--secondary-border);overflow:auto;padding:5px;border-radius:5px}.animated .pref-option-scroller{scroll-behavior:smooth}.pref-section{padding:3px 5px;border-radius:2px;cursor:pointer}.pref-section-scroller{width:150px}.pref-option-scroller:empty:before{color:var(--text-color-disabled);content:"No keybinds matched the search term.";height:100%;display:flex;justify-content:center;align-items:center}.animated .pref-section,.animated .pref-keybind-combo,.animated .pref-keybind,.animated .pref-item,.animated .pref-item-tooltip{transition:.1s cubic-bezier(.445,.05,.55,.95)}.pref-section.selected,.pref-section.selected:hover{background-color:var(--secondary-bg-active)}.pref-section:hover,.pref-keybind:hover,.pref-item:hover{background-color:var(--secondary-bg-hover)}.pref-option-scroller{display:flex;flex-direction:column;gap:20px;flex:1;padding:3px 5px}.pref-keybind{padding:3px 5px;border-radius:2px;display:flex;flex-direction:row;align-items:center;width:100%;cursor:pointer}.pref-item{padding:3px 5px;border-radius:2px;display:flex;flex-direction:row;align-items:center;width:100%}.pref-item-input{margin-left:auto;max-width:160px;display:flex}.pref-item>.spinner{max-width:50px}.pref-item .spinner-input{text-align:right}.pref-keybind .icon,.pref-item>.icon{margin-left:5px;display:block;bottom:10px;backface-visibility:hidden;filter:brightness(.5);cursor:pointer}.pref-keybind .icon:hover,.pref-item .icon:hover{filter:brightness(1);color:var(--danger)}.pref-keybind-label{padding:2px 0}.pref-label{padding:10px 0}.pref-keybind-combos{display:flex;flex-direction:row;align-items:center;gap:3px;margin-left:auto}.pref-keybind-combo{background-color:#0003;padding:2px 5px;font-size:13px}.pref-keybind-combo.conflict{background:rgb(187,93,31)}.pref-keybind-combo:hover{background-color:var(--danger)}.pref-group-label{font-size:18px;margin-bottom:6px}.pref-subgroup-label{font-weight:700;margin-bottom:6px}.pref-group{padding:3px 5px}.pref-children .pref-group-label{font-size:17px}.pref-search .dropdown{width:70px}.pref-group-label+.pref-children{margin-left:15px}.pref-children{display:flex;flex-direction:column;gap:5px}.pref-subgroup{margin:8px 0}.detail{font-size:12px;font-style:italic;text-align:center;color:var(--text-color-detail)}.tippy-box[data-theme~=sm]{background-color:var(--tooltip-bg);color:var(--text-color)}.tippy-box[data-theme~=sm][data-placement^=top]>.tippy-arrow:before{border-top-color:var(--tooltip-bg)}.tippy-box[data-theme~=sm][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:var(--tooltip-bg)}.tippy-box[data-theme~=sm][data-placement^=left]>.tippy-arrow:before{border-left-color:var(--tooltip-bg)}.tippy-box[data-theme~=sm][data-placement^=right]>.tippy-arrow:before{border-right-color:var(--tooltip-bg)}.export-container{display:flex;flex-direction:row;gap:15px;height:100%;overflow:hidden}.export-section-label{font-weight:700;margin-bottom:6px;margin-top:6px}.export-option{display:flex;flex-direction:row;gap:5px;align-items:center;padding:3px 5px}.export-output{flex:1;border-radius:5px;background-color:var(--secondary-bg);border:1px solid var(--secondary-border);padding:5px;white-space:pre-wrap;word-break:break-all;font-family:monospace;font-size:12px;overflow:auto;tab-size:2}.export-output:hover{background-color:var(--secondary-bg-hover)}.animated .export-output{transition:.1s cubic-bezier(.39,.575,.565,1)}.logo{text-align:center;font-size:26px}.icon-container{display:flex;align-items:center;justify-content:space-evenly;background-color:#0b0e1a;padding-top:2px;border-bottom:1px solid;border-image-slice:1;border-image-source:linear-gradient(to right,rgb(11,14,26),rgb(49,57,88),rgb(11,14,26))}.eq-icon{border-radius:3px}.animated .eq-icon{transition:.1s cubic-bezier(.39,.575,.565,1)}.eq-icon.disabled:not(:hover){fill:#888}.eq-icon:not(:hover){background-color:#0000!important}.eq-info-container{border-top:1px solid;border-image-slice:1;border-image-source:linear-gradient(to right,rgb(11,14,26),rgb(49,57,88),rgb(11,14,26));background-color:#0b0e1a;display:flex;flex-direction:row;align-items:center;gap:10px;padding:2px 10px;margin:0;font-size:12px}.eq-reset{margin-left:auto;margin-right:15px;color:#ff3a3acc;padding:0 5px;border-radius:3px}.animated .eq-reset{transition:.2s cubic-bezier(.175,.885,.32,1.875)}.eq-reset:hover{background:rgba(255,58,58,.2)}.eq-info{display:flex;flex-direction:row;align-items:center;gap:5px}.eq-info-label{color:#0087cbcc}.eq-info-value{width:80px}.eq-info-value.inlineEdit[contenteditable=true]{border:none;min-width:80px;text-align:left;border-radius:3px;padding:0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;-ms-overflow-style:none;scrollbar-width:none;caret-color:auto}.eq-info-value.inlineEdit[contenteditable=true]:hover{background:rgba(0,135,203,.082)}.eq-info-value.inlineEdit[contenteditable=true]:focus{background:rgba(0,135,203,.082)}.eq-container{display:flex;flex-direction:column}input[type=color]{appearance:none;-moz-appearance:none;-webkit-appearance:none;background:none;border:0;cursor:pointer;height:19.5px;padding:0;width:29.5px}::-webkit-color-swatch-wrapper{padding:0}::-webkit-color-swatch{border:1px rgb(105,105,105) solid;border-radius:3px}::-moz-color-swatch,::-moz-focus-inner{border:0}::-moz-focus-inner{padding:0}.update-popup{position:absolute;right:15px;bottom:15px;z-index:10;background-color:var(--primary-bg);border-radius:10px;padding:10px;transition:.3s ease-out;user-select:none;cursor:pointer;transform-origin:bottom right;display:flex;flex-direction:column;align-items:center;gap:5px}.update-popup.exiting{transform:translate(50px);opacity:0}.update-popup .title{font-weight:700;text-align:center}.update-options{display:flex;flex-direction:row;gap:10px;align-items:center;justify-content:space-around;width:100%;margin-top:5px}.update-options button{max-width:100px;flex:1}.animated .update-popup{transition:.2s cubic-bezier(.175,.885,.32,1.875)}.animated .update-popup:hover{scale:1.01;background-color:var(--primary-bg-active)}.sync-container{display:flex;flex-direction:column;align-items:center;height:100%}.sync-spinner-container{display:flex;flex-direction:row;align-items:center;gap:10px}.sync-bottom-container{display:flex;flex-direction:row;padding:10px 5px;gap:10px;justify-content:space-around;align-items:center;margin-bottom:5px}.sync-tab-container{display:flex;width:370px;flex-direction:row;align-items:center;margin:10px 5px;background:var(--secondary-bg);border:1px solid var(--secondary-border);font-size:13px;border-radius:5px}.sync-tab-option{padding:5px 10px;flex:1;text-align:center;border-radius:5px}.sync-tab-option:hover{background-color:#ffffff1a}.sync-tab-option.active{background-color:#fff3}.animated .sync-tab-option{transition:.1s cubic-bezier(.215,.61,.355,1)}.sync-tab-view{width:370px;flex:1;min-height:0;background:var(--secondary-bg);border:1px solid var(--secondary-border);border-radius:5px;position:relative}.sync-tab-scroller{display:grid;grid-template-columns:repeat(3,1fr);overflow:hidden;position:relative;border-radius:5px}.sync-cover-scroller{position:absolute;top:0;left:0;display:grid;grid-template-columns:repeat(3,1fr);overflow:hidden;width:370px;pointer-events:none}.sync-cover{width:370px;background:rgba(0,0,0,.2);display:flex;align-items:center;justify-content:space-around;opacity:0;pointer-events:none;position:absolute;height:100%}.sync-cover.active{opacity:1;backdrop-filter:blur(2px);pointer-events:all}.animated .sync-tab-scroller,.animated .sync-cover-scroller{scroll-behavior:smooth}.sync-tab-scroller>div:not(.sync-cover){width:370px;padding:10px}.sync-table-label{text-align:center;font-weight:700}.sync-table{width:100%;table-layout:fixed;font-size:13px}.sync-table th{font-weight:500;padding:3px 1px}.sync-table td{padding:1px;text-align:center}.sync-table tr:nth-child(2n){background:rgb(0,0,0,.1)}#embed{position:fixed;bottom:0;margin:10px;font-size:13px;font-weight:200;color:#d7d7d77c;cursor:default;pointer-events:none}#embed a{transition:.2s ease-in-out;color:#d7d7d7ca;pointer-events:all}#embed a:hover{color:#d7d7d7ef}#playback-options{height:40px;left:0;display:flex;flex-direction:row;user-select:none;gap:24px;background-color:var(--secondary-bg);border-bottom:1px solid var(--secondary-border);padding:0 10px;font-size:15px;overflow-x:auto;overflow-y:hidden;width:100%;position:relative;top:0}#playback-options.collapsed{height:0px;border-bottom:0px solid var(--secondary-border)}#playback-options .playback-options-label{white-space:nowrap}.playback-options-title{justify-content:center;text-align:center;width:100%}.animated #playback-options,.animated .playback-options-row,.animated .po-thumb-row{transition:.3s cubic-bezier(.61,.04,.38,1.02)}#playback-options .playback-options-row.hidden{opacity:0;width:0px;margin-right:-24px;transform:scale(0)}#playback-options>.playback-options-row{display:flex;flex-direction:row;gap:7px;align-items:center;text-wrap:nowrap;width:var(--w)}.po-spinner{display:flex;flex-direction:row;align-items:center;height:20px}#playback-options .po-spinner-btn{box-shadow:none;transform:none;border:none;outline:none;filter:none;background-color:var(--input-bg);border-radius:5px;width:12px;height:20px;padding:0;text-align:center;justify-content:center}#playback-options .po-spinner .po-spinner-btn:first-of-type{border-top-right-radius:0;border-bottom-right-radius:0;border:1px var(--input-border) solid}#playback-options .po-spinner .po-spinner-btn:last-of-type{border-top-left-radius:0;border-bottom-left-radius:0;border:1px var(--input-border) solid}#playback-options .po-spinner-btn:disabled{filter:brightness(.5)}#playback-options .po-spinner-btn:hover:not(:disabled){background-color:var(--input-bg-hover)}#playback-options .po-spinner-btn:active:not(:disabled){background-color:var(--input-bg-active)}#playback-options .po-spinner-input{background-color:var(--input-bg);border-left:none;border-right:none;border-top:1px solid var(--input-border);border-bottom:1px solid var(--input-border);border-radius:0;width:42px;height:20px;padding:3px 4px;text-align:center;caret-color:auto}#playback-options .po-spinner-input:hover{background-color:var(--input-bg-hover)}#playback-options .po-spinner-input:disabled{filter:brightness(.6)}.animated .po-spinner-btn,.animated .po-spinner-input{transition:.08s ease-in-out}#playback-options .po-separator{margin:0 -6px;height:100%;display:flex;align-items:center}#playback-options .po-separator:after{border:.5px rgba(134,134,134,.5) solid;height:20px;content:" "}.po-toggle{background-color:var(--input-bg);border:1px solid var(--input-border);display:flex;flex-direction:row;gap:5px;font-size:14px;height:20px;border-radius:5px;align-items:center;position:relative}.po-toggle-item{padding:3px 6px}.po-toggle>*:not(.active):not(.po-toggle-highlight){opacity:.2}.po-toggle>*:not(.active):hover{opacity:.8}.po-toggle-highlight{position:absolute;background-color:var(--editable-overlay-active);border-radius:5px;pointer-events:none}.ico-checkbox{padding:1px;border-radius:2px}.ico-checkbox:hover{background:var(--editable-overlay-hover)}.ico-checkbox:active{background:var(--editable-overlay-active)}.animated .po-toggle>*,.animated .ico-checkbox{transition:.15s ease-in-out}.animated .po-toggle-highlight{transition:.15s cubic-bezier(.61,.04,.38,1.02)}.po-collapse-container{position:relative}#view-wrapper .po-collapse{margin-left:auto;margin-right:10px;height:25px;width:25px;padding:0;background:none;box-shadow:none;transform:none;border:none;outline:none;filter:none;text-align:center;justify-content:center;display:flex;align-items:center;transform:scaleY(1);user-select:none}#view-wrapper .po-collapse.toggled{transform:scaleY(-1)}.animated .po-collapse{transition:.15s cubic-bezier(.61,.04,.38,1.02)}.noteskin-grid{display:grid;grid-template-columns:repeat(4,1fr);width:100%;gap:15px;padding:10px;background:var(--secondary-bg);border:1px solid var(--secondary-border);margin-top:10px;border-radius:5px;overflow:auto;height:330px}.noteskin-cell{height:250px;position:relative;border-radius:5px;color:#fff}.noteskin-cell img{min-width:0;width:100%;height:100%;aspect-ratio:9 / 21;object-fit:cover;border-radius:5px}.noteskin-label{position:absolute;bottom:0;padding:100px 10px 10px;width:100%;background:linear-gradient(to top,rgba(0,0,0,.7),rgba(0,0,0,.7) 30%,rgba(0,0,0,0) 100%);border-radius:5px}.noteskin-title{font-size:16px;font-weight:700}.noteskin-subtitle{font-style:italic;font-size:12px}.noteskin-cell:hover{transform:scale(1.02);box-shadow:0 0 5px #0009}.noteskin-cell:hover img{filter:brightness(1.1)}.noteskin-cell:active{transform:scale(.98)}.noteskin-cell.selected img{box-shadow:0 0 5px 2px var(--accent-color);filter:brightness(1.2)}.animated .noteskin-cell,.animated .noteskin-cell img{transition:.2s cubic-bezier(.26,.64,.47,1.6)}.theme-color-grid{display:flex;flex-direction:column;gap:5px;font-size:12px;background-color:var(--secondary-bg);border:1px solid var(--secondary-border);padding:15px;overflow:auto}.theme-group-label{font-size:16px}.theme-picker-grid{display:grid;grid-template-columns:repeat(4,1fr);color:var(--text-color-secondary);gap:15px;font-size:15px;text-align:center;padding:5px;overflow:auto}.theme-color-cell{display:flex;flex-direction:column;align-items:center;border-radius:5px}.theme-color-cell.linked{background-color:var(--editable-overlay-hover)}.animated .theme-color-cell{transition:.3s cubic-bezier(.39,.575,.565,1)}.theme-color-detail{color:var(--text-color-detail);font-size:10px}.theme-color-cell input[type=range]{width:50px;margin-right:0}.color-picker{width:24px;height:24px;border-radius:3px;border:1px solid rgb(111,111,111);overflow:hidden}.color-picker:hover:not(:active){transform:scale(1.03);box-shadow:0 0 4px #0009}.color-picker:active{transform:scale(.93);box-shadow:0 0 4px #0009}.animated .color-picker{transition:.1s cubic-bezier(.39,.575,.565,1)}.color-picker-popup{position:absolute;background:#dcdcdc;padding:15px;display:flex;flex-direction:row;gap:15px;z-index:20;border-radius:5px;transform-origin:top center;border:1px solid black;animation:1ms popup-enter cubic-bezier(.47,.02,0,.95) forwards;box-shadow:0 0 5px #0009}.animated .color-picker-popup{animation:.1s popup-enter cubic-bezier(.47,.02,0,.95) forwards}.animated .color-picker-popup.exiting{animation:.1s popup-exit cubic-bezier(.47,.02,0,.95) forwards;pointer-events:none}.color-picker-popup .color-matrix{position:relative;width:200px;height:200px}.color-picker-popup .color-matrix-x{position:absolute;top:0;left:0;width:200px;height:200px;background:linear-gradient(to right,#fff 0%,rgba(255,255,255,0) 100%)}.color-picker-popup .color-matrix-y{position:absolute;top:0;left:0;width:200px;height:200px;background:linear-gradient(to bottom,transparent 0%,#000 100%)}.color-picker-popup .color-matrix-dot{position:absolute;width:15px;height:15px;border:2px solid white;border-radius:15px;transform:translate(-50%,-50%)}.color-picker-popup .color-matrix-dot:after{content:" ";position:absolute;width:15px;height:15px;border:2px solid black;border-radius:15px;transform:translate(-4px,-4px)}.color-picker-popup .color-slider{width:200px;height:20px;position:relative;border-radius:5px}.color-picker-transparent{background-image:linear-gradient(45deg,#ccc 25%,transparent 25%),linear-gradient(-45deg,#ccc 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ccc 75%),linear-gradient(-45deg,transparent 75%,#ccc 75%);background-position:0 0,0 4px,4px -4px,-4px 0px;background-size:8px 8px}.color-picker-popup .color-slider-thumb{position:absolute;width:5px;height:24px;border:1px solid white;border-radius:15px;transform:translate(-50%,-2px);z-index:21}.color-picker-popup .color-slider-thumb:after{content:" ";position:absolute;width:5px;height:24px;border:1px solid black;border-radius:15px;transform:translate(-2px,-2px);z-index:21}.color-picker-popup .color-picker-area{display:flex;flex-direction:column;gap:5px}.color-picker-popup .color-format{background-color:#cbced2;padding:10px;border-radius:5px;display:flex;gap:5px}.color-picker-popup .color-format-label{color:#000;width:45px;pointer-events:none;user-select:none}.color-picker-popup .color-format-inputs{width:170px;display:flex;gap:5px}.color-picker-popup .color-format-inputs input{min-width:none;width:100%;color:#000;background-color:#ebebeb;border:1px solid rgba(0,0,0,.3);text-align:center}.color-picker-popup .color-picker-preview{flex:1;width:100%;display:flex;border:1px solid rgba(0,0,0,.2);border-radius:5px}.color-picker-popup .color-picker-transparent{flex:1}.theme-grid{display:grid;grid-template-columns:repeat(4,1fr);width:100%;gap:5px;padding:10px;background:var(--secondary-bg);border:1px solid var(--secondary-border);margin-top:10px;overflow:auto;flex:1;border-radius:5px 5px 0 0}.theme-cell{padding:15px;display:flex;align-items:center;flex-direction:column;gap:5px;border-radius:5px;height:fit-content;min-width:0}.theme-title{text-align:center!important;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:100%}.theme-cell:hover:not(.selected){background:var(--secondary-bg-hover)}.theme-cell.selected{background:var(--secondary-bg-active)}.animated .theme-cell{transition:.2s cubic-bezier(.47,.02,0,.95)}.theme-preview-grid{display:grid;grid-template-columns:repeat(3,1fr);width:66px;height:66px;border:1px solid rgb(0,0,0,.5);border-radius:5px;overflow:hidden}.markdown-container{background-color:var(--secondary-bg);border:1px solid var(--secondary-border);border-radius:5px 5px 0 0;flex:1;height:100%;overflow:auto;padding:15px}.markdown-container hr{border:1px solid var(--secondary-border);margin:5px 0}.markdown-container ul{padding-top:5px;padding-bottom:5px;padding-left:30px} diff --git a/assets/svg/SPLIT_TIMING.svg b/assets/svg/SPLIT_TIMING.svg new file mode 100644 index 00000000..73cfed2b --- /dev/null +++ b/assets/svg/SPLIT_TIMING.svg @@ -0,0 +1,10 @@ + + New Project + + + + + \ No newline at end of file diff --git a/downloader-0c348135.js b/downloader-46f1bfb8.js similarity index 97% rename from downloader-0c348135.js rename to downloader-46f1bfb8.js index e8482034..1aa45168 100644 --- a/downloader-0c348135.js +++ b/downloader-46f1bfb8.js @@ -1 +1 @@ -import{_ as w,a8 as b}from"./ChartManager-f20da8bc.js";const{GONE:v}=b,E=/constructor/i.test(window.HTMLElement)||window.safari||window.WebKitPoint;class j{constructor(e="unknown"){this.kind="file",this.writable=!0,this.name=e}async getFile(){throw new DOMException(...v)}async createWritable(e={}){var t;if(e.keepExistingData)throw new TypeError("Option keepExistingData is not implemented");const h=globalThis.TransformStream||(await w(()=>import("./web-streams-ponyfill-4a0f4950.js"),[])).TransformStream,p=globalThis.WritableStream||(await w(()=>import("./web-streams-ponyfill-4a0f4950.js"),[])).WritableStream,s=await((t=navigator.serviceWorker)===null||t===void 0?void 0:t.getRegistration()),o=document.createElement("a"),i=new h,u=i.writable;if(o.download=this.name,E||!s){let a=[];i.readable.pipeTo(new p({write(r){a.push(new Blob([r]))},close(){const r=new Blob(a,{type:"application/octet-stream; charset=utf-8"});a=[],o.href=URL.createObjectURL(r),o.click(),setTimeout(()=>URL.revokeObjectURL(o.href),1e4)}}))}else{const{writable:a,readablePort:r}=new k(p),n=encodeURIComponent(this.name).replace(/['()]/g,escape).replace(/\*/g,"%2A"),f={"content-disposition":"attachment; filename*=UTF-8''"+n,"content-type":"application/octet-stream; charset=utf-8",...e.size?{"content-length":e.size}:{}},g=setTimeout(()=>s.active.postMessage(0),1e4);i.readable.pipeThrough(new h({transform(l,_){if(l instanceof Uint8Array)return _.enqueue(l);const R=new Response(l).body.getReader(),m=W=>R.read().then(y=>y.done?0:m(_.enqueue(y.value)));return m()}})).pipeTo(a).finally(()=>{clearInterval(g)}),s.active.postMessage({url:s.scope+n,headers:f,readablePort:r},[r]);const c=document.createElement("iframe");c.hidden=!0,c.src=s.scope+n,document.body.appendChild(c)}return u.getWriter()}async isSameEntry(e){return this===e}}const P=0,T=0,M=1,S=1,L=2;class O{constructor(e){this._readyPending=!1,this._port=e,this._resetReady(),this._port.onmessage=t=>this._onMessage(t.data)}start(e){return this._controller=e,this._readyPromise}write(e){const t={type:P,chunk:e};return this._port.postMessage(t,[e.buffer]),this._resetReady(),this._readyPromise}close(){this._port.postMessage({type:L}),this._port.close()}abort(e){this._port.postMessage({type:S,reason:e}),this._port.close()}_onMessage(e){e.type===T&&this._resolveReady(),e.type===M&&this._onError(e.reason)}_onError(e){this._controller.error(e),this._rejectReady(e),this._port.close()}_resetReady(){this._readyPromise=new Promise((e,t)=>{this._readyResolve=e,this._readyReject=t}),this._readyPending=!0}_resolveReady(){this._readyResolve(),this._readyPending=!1}_rejectReady(e){this._readyPending||this._resetReady(),this._readyPromise.catch(()=>{}),this._readyReject(e),this._readyPending=!1}}class k{constructor(e){const t=new MessageChannel;this.readablePort=t.port1,this.writable=new e(new O(t.port2))}}export{j as FileHandle}; +import{_ as w,a8 as b}from"./ChartManager-3c3d6f39.js";const{GONE:v}=b,E=/constructor/i.test(window.HTMLElement)||window.safari||window.WebKitPoint;class j{constructor(e="unknown"){this.kind="file",this.writable=!0,this.name=e}async getFile(){throw new DOMException(...v)}async createWritable(e={}){var t;if(e.keepExistingData)throw new TypeError("Option keepExistingData is not implemented");const h=globalThis.TransformStream||(await w(()=>import("./web-streams-ponyfill-4a0f4950.js"),[])).TransformStream,p=globalThis.WritableStream||(await w(()=>import("./web-streams-ponyfill-4a0f4950.js"),[])).WritableStream,s=await((t=navigator.serviceWorker)===null||t===void 0?void 0:t.getRegistration()),o=document.createElement("a"),i=new h,u=i.writable;if(o.download=this.name,E||!s){let a=[];i.readable.pipeTo(new p({write(r){a.push(new Blob([r]))},close(){const r=new Blob(a,{type:"application/octet-stream; charset=utf-8"});a=[],o.href=URL.createObjectURL(r),o.click(),setTimeout(()=>URL.revokeObjectURL(o.href),1e4)}}))}else{const{writable:a,readablePort:r}=new k(p),n=encodeURIComponent(this.name).replace(/['()]/g,escape).replace(/\*/g,"%2A"),f={"content-disposition":"attachment; filename*=UTF-8''"+n,"content-type":"application/octet-stream; charset=utf-8",...e.size?{"content-length":e.size}:{}},g=setTimeout(()=>s.active.postMessage(0),1e4);i.readable.pipeThrough(new h({transform(l,_){if(l instanceof Uint8Array)return _.enqueue(l);const R=new Response(l).body.getReader(),m=W=>R.read().then(y=>y.done?0:m(_.enqueue(y.value)));return m()}})).pipeTo(a).finally(()=>{clearInterval(g)}),s.active.postMessage({url:s.scope+n,headers:f,readablePort:r},[r]);const c=document.createElement("iframe");c.hidden=!0,c.src=s.scope+n,document.body.appendChild(c)}return u.getWriter()}async isSameEntry(e){return this===e}}const P=0,T=0,M=1,S=1,L=2;class O{constructor(e){this._readyPending=!1,this._port=e,this._resetReady(),this._port.onmessage=t=>this._onMessage(t.data)}start(e){return this._controller=e,this._readyPromise}write(e){const t={type:P,chunk:e};return this._port.postMessage(t,[e.buffer]),this._resetReady(),this._readyPromise}close(){this._port.postMessage({type:L}),this._port.close()}abort(e){this._port.postMessage({type:S,reason:e}),this._port.close()}_onMessage(e){e.type===T&&this._resolveReady(),e.type===M&&this._onError(e.reason)}_onError(e){this._controller.error(e),this._rejectReady(e),this._port.close()}_resetReady(){this._readyPromise=new Promise((e,t)=>{this._readyResolve=e,this._readyReject=t}),this._readyPending=!0}_resolveReady(){this._readyResolve(),this._readyPending=!1}_rejectReady(e){this._readyPending||this._resetReady(),this._readyPromise.catch(()=>{}),this._readyReject(e),this._readyPending=!1}}class k{constructor(e){const t=new MessageChannel;this.readablePort=t.port1,this.writable=new e(new O(t.port2))}}export{j as FileHandle}; diff --git a/embed.js b/embed.js index b2950c7e..56b4494e 100644 --- a/embed.js +++ b/embed.js @@ -1 +1 @@ -import{t as I,u as T,v as E,S as P,G as R}from"./ChartManager-f20da8bc.js";const u=new Set;document.addEventListener("DOMContentLoaded",()=>{const c=document.getElementById("output-url"),w=document.getElementById("output-iframe"),o=document.getElementById("sm-url"),b=document.getElementById("chart-container");let r=document.getElementById("loading-output");const f=document.getElementById("option-grid");let h,p,k="",d,m;I.setDefaultProps({duration:[200,100]}),I(c,{content:"Click to copy to clipboard",placement:"bottom"});function i(e,t){const n=r.cloneNode(!0);r.parentNode.replaceChild(n,r),r=n,r.innerText=e,t=="error"?r.style.color="rgba(222, 44, 44, 0.9)":r.style.color=""}function s(){const e=new URL(`${location.origin}/smeditor/app/`);p!==void 0&&e.searchParams.set("url",p),m!==void 0&&e.searchParams.set("chartType",m),d!==void 0&&e.searchParams.set("chartIndex",d+""),u.size>0&&e.searchParams.set("flags",[...u.values()].join("")),c.value=e.toString(),k!=e.toString()&&(w.src=e.toString()),k=e.toString()}s(),c.onclick=e=>{e.preventDefault(),c.blur(),navigator.clipboard.writeText(c.value),setTimeout(()=>c.select(),10)},c.onselect=e=>{e.preventDefault(),setTimeout(()=>c.select(),10)},c.ondblclick=e=>{e.preventDefault(),setTimeout(()=>c.select(),10)};let g;function L(){if(!o.checkValidity())return;p=void 0,s();const e=o.value;if(e===""){o.classList.remove("invalid","ok"),i("");return}o.classList.remove("invalid","ok"),i("Loading...");const t=new AbortController,n=setTimeout(()=>{o.classList.add("invalid"),t.abort(),i("Failed to load the specified URL!","error")},5e3);fetch(e,{signal:t.signal}).then(a=>{if(!a.ok){o.classList.add("invalid"),i("Failed to load the specified URL!","error");return}clearTimeout(n),a.text().then(async S=>{const B=new URL(e),D=new File([S],B.pathname.split("/").pop()??"song.sm");i("Loading charts...");const y=new P(D);await y.loaded,y.properties.TITLE===void 0&&i("Invalid file provided!","error"),h=y,p=e,d=void 0,m=void 0,i(""),s(),C()}),o.classList.add("ok")}).catch(()=>{o.classList.add("invalid"),i("Failed to load the specified URL!","error")})}o.onkeydown=e=>{o.classList.remove("invalid"),o.classList.remove("ok"),i(""),clearTimeout(g),g=setTimeout(()=>L(),1e3),(e.key=="Enter"||e.key=="Escape")&&o.blur()},o.onblur=()=>{o.checkValidity()&&(clearInterval(g),L())};const v=T.create([]);v.onChange(e=>{const t=e.split(" ")?.[0]??"dance-single",n=h?.charts[t]??[];l.setItems(n.map(a=>`${a.difficulty} ${a.meter}`)),l.setSelected(l.getItems().at(-1)),n.length!=0&&(console.log(n.length),t!="dance-single"?m=t:m=void 0,s())});const l=T.create([]);l.onChange((e,t)=>{d!=l.getItems().length-1?d=t:d=void 0,s()}),b.appendChild(v.view),b.appendChild(l.view);function C(){v.setItems(R.getPriority().map(t=>{const n=h.charts[t.id]??[];return t.id+" ("+n.length+")"}));const e=h?.charts["dance-single"]??[];l.setItems(e.map(t=>`${t.difficulty} ${t.meter}`)),l.setSelected(l.getItems().at(-1))}Object.entries(E).forEach(([e,t])=>{const n=document.createElement("label");n.classList.add("option");const a=document.createElement("input");a.type="checkbox",n.replaceChildren(a,document.createTextNode(t.name)),a.onchange=()=>{a.checked?u.add(t.char):u.delete(t.char),s()},f.appendChild(n)});const U=document.getElementById("enable-all");U.onclick=()=>{for(const e of f.children){const t=e.childNodes[0];t.checked=!0}for(const e of Object.values(E).map(t=>t.char))u.add(e);s()};const x=document.getElementById("disable-all");x.onclick=()=>{for(const e of f.children){const t=e.childNodes[0];t.checked=!1}u.clear(),s()}}); +import{t as I,u as T,v as E,S as P,G as R}from"./ChartManager-3c3d6f39.js";const u=new Set;document.addEventListener("DOMContentLoaded",()=>{const c=document.getElementById("output-url"),w=document.getElementById("output-iframe"),o=document.getElementById("sm-url"),b=document.getElementById("chart-container");let r=document.getElementById("loading-output");const f=document.getElementById("option-grid");let h,p,k="",d,m;I.setDefaultProps({duration:[200,100]}),I(c,{content:"Click to copy to clipboard",placement:"bottom"});function i(e,t){const n=r.cloneNode(!0);r.parentNode.replaceChild(n,r),r=n,r.innerText=e,t=="error"?r.style.color="rgba(222, 44, 44, 0.9)":r.style.color=""}function s(){const e=new URL(`${location.origin}/smeditor/app/`);p!==void 0&&e.searchParams.set("url",p),m!==void 0&&e.searchParams.set("chartType",m),d!==void 0&&e.searchParams.set("chartIndex",d+""),u.size>0&&e.searchParams.set("flags",[...u.values()].join("")),c.value=e.toString(),k!=e.toString()&&(w.src=e.toString()),k=e.toString()}s(),c.onclick=e=>{e.preventDefault(),c.blur(),navigator.clipboard.writeText(c.value),setTimeout(()=>c.select(),10)},c.onselect=e=>{e.preventDefault(),setTimeout(()=>c.select(),10)},c.ondblclick=e=>{e.preventDefault(),setTimeout(()=>c.select(),10)};let g;function L(){if(!o.checkValidity())return;p=void 0,s();const e=o.value;if(e===""){o.classList.remove("invalid","ok"),i("");return}o.classList.remove("invalid","ok"),i("Loading...");const t=new AbortController,n=setTimeout(()=>{o.classList.add("invalid"),t.abort(),i("Failed to load the specified URL!","error")},5e3);fetch(e,{signal:t.signal}).then(a=>{if(!a.ok){o.classList.add("invalid"),i("Failed to load the specified URL!","error");return}clearTimeout(n),a.text().then(async S=>{const B=new URL(e),D=new File([S],B.pathname.split("/").pop()??"song.sm");i("Loading charts...");const y=new P(D);await y.loaded,y.properties.TITLE===void 0&&i("Invalid file provided!","error"),h=y,p=e,d=void 0,m=void 0,i(""),s(),C()}),o.classList.add("ok")}).catch(()=>{o.classList.add("invalid"),i("Failed to load the specified URL!","error")})}o.onkeydown=e=>{o.classList.remove("invalid"),o.classList.remove("ok"),i(""),clearTimeout(g),g=setTimeout(()=>L(),1e3),(e.key=="Enter"||e.key=="Escape")&&o.blur()},o.onblur=()=>{o.checkValidity()&&(clearInterval(g),L())};const v=T.create([]);v.onChange(e=>{const t=e.split(" ")?.[0]??"dance-single",n=h?.charts[t]??[];l.setItems(n.map(a=>`${a.difficulty} ${a.meter}`)),l.setSelected(l.getItems().at(-1)),n.length!=0&&(console.log(n.length),t!="dance-single"?m=t:m=void 0,s())});const l=T.create([]);l.onChange((e,t)=>{d!=l.getItems().length-1?d=t:d=void 0,s()}),b.appendChild(v.view),b.appendChild(l.view);function C(){v.setItems(R.getPriority().map(t=>{const n=h.charts[t.id]??[];return t.id+" ("+n.length+")"}));const e=h?.charts["dance-single"]??[];l.setItems(e.map(t=>`${t.difficulty} ${t.meter}`)),l.setSelected(l.getItems().at(-1))}Object.entries(E).forEach(([e,t])=>{const n=document.createElement("label");n.classList.add("option");const a=document.createElement("input");a.type="checkbox",n.replaceChildren(a,document.createTextNode(t.name)),a.onchange=()=>{a.checked?u.add(t.char):u.delete(t.char),s()},f.appendChild(n)});const U=document.getElementById("enable-all");U.onclick=()=>{for(const e of f.children){const t=e.childNodes[0];t.checked=!0}for(const e of Object.values(E).map(t=>t.char))u.add(e);s()};const x=document.getElementById("disable-all");x.onclick=()=>{for(const e of f.children){const t=e.childNodes[0];t.checked=!1}u.clear(),s()}}); diff --git a/embed/index.html b/embed/index.html index a9ac3db4..a3af5c91 100644 --- a/embed/index.html +++ b/embed/index.html @@ -16,7 +16,7 @@ SMEditor - + diff --git a/memory-4ca8cdb3.js b/memory-d5c05bb2.js similarity index 98% rename from memory-4ca8cdb3.js rename to memory-d5c05bb2.js index 8533d7ba..6a2832b7 100644 --- a/memory-4ca8cdb3.js +++ b/memory-d5c05bb2.js @@ -1 +1 @@ -import{a8 as c,a9 as y}from"./ChartManager-f20da8bc.js";let n=globalThis.File,p=globalThis.Blob;const b=o=>{n=o},m=o=>{p=o},{INVALID:z,GONE:s,MISMATCH:w,MOD_ERR:E,SYNTAX:l,DISALLOWED:O}=c;class D{constructor(e,i){this.fileHandle=e,this.file=i?e.file:new n([],e.file.name,e.file),this.size=i?e.file.size:0,this.position=0}async write(e){if(!this.fileHandle.file)throw new DOMException(...s);let i=this.file;if(y(e)){if(e.type==="write"){if(typeof e.position=="number"&&e.position>=0&&(this.position=e.position,this.size=0){if(this.size=0){i=e.sizei.size&&(this.position=i.size),this.file=i;return}else throw new DOMException(...l("truncate requires a size argument"))}e=new p([e]);let t=this.file;const a=t.slice(0,this.position),d=t.slice(this.position+e.size);let r=this.position-a.size;r<0&&(r=0),t=new n([a,new Uint8Array(r),e,d],t.name),this.size=t.size,this.position+=e.size,this.file=t}async close(){if(!this.fileHandle.file)throw new DOMException(...s);this.fileHandle.file=this.file,this.file=this.position=this.size=null,this.fileHandle.onclose&&this.fileHandle.onclose(this.fileHandle)}}class f{constructor(e="",i=new n([],e),t=!0){this.kind="file",this.deleted=!1,this.file=i,this.name=e,this.writable=t}async getFile(){if(this.deleted||this.file===null)throw new DOMException(...s);return this.file}async createWritable(e){if(!this.writable)throw new DOMException(...O);if(this.deleted)throw new DOMException(...s);return new D(this,!!e?.keepExistingData)}async isSameEntry(e){return this===e}destroy(){this.deleted=!0,this.file=null}}class h{constructor(e,i=!0){this.kind="directory",this.deleted=!1,this._entries={},this.name=e,this.writable=i}async*entries(){if(this.deleted)throw new DOMException(...s);yield*Object.entries(this._entries)}async isSameEntry(e){return this===e}async getDirectoryHandle(e,i={}){if(this.deleted)throw new DOMException(...s);const t=this._entries[e];if(t){if(t instanceof f)throw new DOMException(...w);return t}else{if(i.create)return this._entries[e]=new h(e);throw new DOMException(...s)}}async getFileHandle(e,i={}){const t=this._entries[e];if(t){if(t instanceof f)return t;throw new DOMException(...w)}else{if(i.create)return this._entries[e]=new f(e);throw new DOMException(...s)}}async removeEntry(e,i={}){const t=this._entries[e];if(!t)throw new DOMException(...s);t.destroy(i.recursive),delete this._entries[e]}destroy(e){for(let i of Object.values(this._entries)){if(!e)throw new DOMException(...E);i.destroy(e)}this._entries={},this.deleted=!0}}const M=new h(""),g=()=>M;export{f as FileHandle,h as FolderHandle,g as default,m as setBlobImpl,b as setFileImpl}; +import{a8 as c,a9 as y}from"./ChartManager-3c3d6f39.js";let n=globalThis.File,p=globalThis.Blob;const b=o=>{n=o},m=o=>{p=o},{INVALID:z,GONE:s,MISMATCH:w,MOD_ERR:E,SYNTAX:l,DISALLOWED:O}=c;class D{constructor(e,i){this.fileHandle=e,this.file=i?e.file:new n([],e.file.name,e.file),this.size=i?e.file.size:0,this.position=0}async write(e){if(!this.fileHandle.file)throw new DOMException(...s);let i=this.file;if(y(e)){if(e.type==="write"){if(typeof e.position=="number"&&e.position>=0&&(this.position=e.position,this.size=0){if(this.size=0){i=e.sizei.size&&(this.position=i.size),this.file=i;return}else throw new DOMException(...l("truncate requires a size argument"))}e=new p([e]);let t=this.file;const a=t.slice(0,this.position),d=t.slice(this.position+e.size);let r=this.position-a.size;r<0&&(r=0),t=new n([a,new Uint8Array(r),e,d],t.name),this.size=t.size,this.position+=e.size,this.file=t}async close(){if(!this.fileHandle.file)throw new DOMException(...s);this.fileHandle.file=this.file,this.file=this.position=this.size=null,this.fileHandle.onclose&&this.fileHandle.onclose(this.fileHandle)}}class f{constructor(e="",i=new n([],e),t=!0){this.kind="file",this.deleted=!1,this.file=i,this.name=e,this.writable=t}async getFile(){if(this.deleted||this.file===null)throw new DOMException(...s);return this.file}async createWritable(e){if(!this.writable)throw new DOMException(...O);if(this.deleted)throw new DOMException(...s);return new D(this,!!e?.keepExistingData)}async isSameEntry(e){return this===e}destroy(){this.deleted=!0,this.file=null}}class h{constructor(e,i=!0){this.kind="directory",this.deleted=!1,this._entries={},this.name=e,this.writable=i}async*entries(){if(this.deleted)throw new DOMException(...s);yield*Object.entries(this._entries)}async isSameEntry(e){return this===e}async getDirectoryHandle(e,i={}){if(this.deleted)throw new DOMException(...s);const t=this._entries[e];if(t){if(t instanceof f)throw new DOMException(...w);return t}else{if(i.create)return this._entries[e]=new h(e);throw new DOMException(...s)}}async getFileHandle(e,i={}){const t=this._entries[e];if(t){if(t instanceof f)return t;throw new DOMException(...w)}else{if(i.create)return this._entries[e]=new f(e);throw new DOMException(...s)}}async removeEntry(e,i={}){const t=this._entries[e];if(!t)throw new DOMException(...s);t.destroy(i.recursive),delete this._entries[e]}destroy(e){for(let i of Object.values(this._entries)){if(!e)throw new DOMException(...E);i.destroy(e)}this._entries={},this.deleted=!0}}const M=new h(""),g=()=>M;export{f as FileHandle,h as FolderHandle,g as default,m as setBlobImpl,b as setFileImpl}; diff --git a/sw.js b/sw.js index d2d4d439..f29f2bf2 100644 --- a/sw.js +++ b/sw.js @@ -1 +1 @@ -if(!self.define){let s,e={};const n=(n,l)=>(n=new URL(n+".js",l).href,e[n]||new Promise((e=>{if("document"in self){const s=document.createElement("script");s.src=n,s.onload=e,document.head.appendChild(s)}else s=n,importScripts(n),e()})).then((()=>{let s=e[n];if(!s)throw new Error(`Module ${n} didn’t register its module`);return s})));self.define=(l,i)=>{const r=s||("document"in self?document.currentScript.src:"")||location.href;if(e[r])return;let a={};const u=s=>n(s,r),t={module:{uri:r},exports:a,require:u};e[r]=Promise.all(l.map((s=>t[s]||u(s)))).then((s=>(i(...s),a)))}}define(["./workbox-1ab968a5"],(function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"AnimatedSprite-d8850d0f.js",revision:null},{url:"app.js",revision:"0f9a88acb2d7404fd13aa81d3ea10623"},{url:"app/index.html",revision:"5ce2200aa6945edd95b71b08b4856a3c"},{url:"assets/ChartManager-00dfcf8b.css",revision:null},{url:"assets/index-8c6c3f75.css",revision:null},{url:"assets/index-a01abcd0.css",revision:null},{url:"assets/index-d7a91955.css",revision:null},{url:"assets/SafariFileWorker-557e53c3.js",revision:null},{url:"ChartManager-f20da8bc.js",revision:null},{url:"downloader-0c348135.js",revision:null},{url:"embed.js",revision:"c8c22014d4647eeb0485b3c9b332b27e"},{url:"embed/index.html",revision:"bf8909ac1c240f05f72cfbcca85ca024"},{url:"FileSystemWritableFileStream-e4c13ad9.js",revision:null},{url:"HoldBody-34995142.js",revision:null},{url:"index.html",revision:"18fca6f9c9df4dfb485b429cfb32fcef"},{url:"memory-4ca8cdb3.js",revision:null},{url:"NodeFileHandler-17f340e7.js",revision:null},{url:"Noteskin-1293521e.js",revision:null},{url:"Noteskin-34b7a61f.js",revision:null},{url:"Noteskin-44837e02.js",revision:null},{url:"Noteskin-4d4bdabd.js",revision:null},{url:"Noteskin-4f641a63.js",revision:null},{url:"Noteskin-5217c0b2.js",revision:null},{url:"Noteskin-5c25a811.js",revision:null},{url:"Noteskin-ac1b249a.js",revision:null},{url:"Noteskin-bcd28e0b.js",revision:null},{url:"Noteskin-bd72bca6.js",revision:null},{url:"Noteskin-c26c25f8.js",revision:null},{url:"Noteskin-da25c255.js",revision:null},{url:"Noteskin-e768ec16.js",revision:null},{url:"Noteskin-eae11eee.js",revision:null},{url:"Noteskin-f28d005e.js",revision:null},{url:"Noteskin-fe09add9.js",revision:null},{url:"OggDec-2941c3fd.js",revision:null},{url:"web-streams-ponyfill-4a0f4950.js",revision:null},{url:"assets/0-0543793c.png",revision:null},{url:"assets/0-c5249fef.png",revision:null},{url:"assets/1-0e354907.png",revision:null},{url:"assets/1-84dd19f7.png",revision:null},{url:"assets/2-3b873573.png",revision:null},{url:"assets/2-ce5f7b2f.png",revision:null},{url:"assets/3-648105cf.png",revision:null},{url:"assets/3-e5952ffa.png",revision:null},{url:"assets/4-1f9a4a43.png",revision:null},{url:"assets/4-da345826.png",revision:null},{url:"assets/5-b9acdc27.png",revision:null},{url:"assets/5-f6bb9779.png",revision:null},{url:"assets/6-12d00670.png",revision:null},{url:"assets/6-565a7261.png",revision:null},{url:"assets/7-00801dd0.png",revision:null},{url:"assets/7-dd1c0ecf.png",revision:null},{url:"assets/8-94163432.png",revision:null},{url:"assets/8-9a73d4f3.png",revision:null},{url:"assets/active-29dd632a.png",revision:null},{url:"assets/active-d06e5c33.png",revision:null},{url:"assets/analyze-738fe825.mp4",revision:null},{url:"assets/app/changelog.json",revision:"a57c683553e618e1f441390093e090d5"},{url:"assets/app/versions.json",revision:"223594f6ecde2ce4e9ed61e4f47c9378"},{url:"assets/av-05878b27.mp4",revision:null},{url:"assets/banner-fa29dd27.png",revision:null},{url:"assets/base-29930c78.png",revision:null},{url:"assets/body-0862c984.png",revision:null},{url:"assets/bodyActive-105f1d12.png",revision:null},{url:"assets/bodyActive-56c9977a.png",revision:null},{url:"assets/bodyActive-614d0188.png",revision:null},{url:"assets/bodyActive-889762ad.png",revision:null},{url:"assets/bodyActive-b3d95e51.png",revision:null},{url:"assets/bodyInactive-1234f594.png",revision:null},{url:"assets/bodyInactive-5d99335a.png",revision:null},{url:"assets/bodyInactive-72253162.png",revision:null},{url:"assets/bodyInactive-cfc41138.png",revision:null},{url:"assets/bodyInactive-e5ca65be.png",revision:null},{url:"assets/bottomCapActive-32ba7c5b.png",revision:null},{url:"assets/bottomCapActive-50553ab4.png",revision:null},{url:"assets/bottomCapActive-58c18c0b.png",revision:null},{url:"assets/bottomCapActive-75c2fd66.png",revision:null},{url:"assets/bottomCapInactive-177e377e.png",revision:null},{url:"assets/bottomCapInactive-d275b2b2.png",revision:null},{url:"assets/bottomCapInactive-d8fa251d.png",revision:null},{url:"assets/bottomCapInactive-e990106f.png",revision:null},{url:"assets/cap-8cc2992c.png",revision:null},{url:"assets/cap-e2813a45.png",revision:null},{url:"assets/capActive-59a3b423.png",revision:null},{url:"assets/capActive-e83fb138.png",revision:null},{url:"assets/capInactive-4622d5f2.png",revision:null},{url:"assets/capInactive-efc3b952.png",revision:null},{url:"assets/Center-1b6bfec9.png",revision:null},{url:"assets/Center-274a1642.png",revision:null},{url:"assets/Center-461a85de.png",revision:null},{url:"assets/Center-55e9b68a.png",revision:null},{url:"assets/Center-cb4b6c25.png",revision:null},{url:"assets/Center-df4c129b.png",revision:null},{url:"assets/centerReceptor-44665c43.png",revision:null},{url:"assets/colors-63f923d2.png",revision:null},{url:"assets/decent-79d4c208.png",revision:null},{url:"assets/decent-cc4ef7ea.png",revision:null},{url:"assets/decent-f3f8a110.png",revision:null},{url:"assets/downBodyActive-77f6502e.png",revision:null},{url:"assets/downBodyActive-8cf886d3.png",revision:null},{url:"assets/downBodyActive-dd1fd694.png",revision:null},{url:"assets/downBodyInactive-7465edd0.png",revision:null},{url:"assets/downBodyInactive-a5759c62.png",revision:null},{url:"assets/downBodyInactive-c781a303.png",revision:null},{url:"assets/downBottomCapActive-57ef4d54.png",revision:null},{url:"assets/downBottomCapActive-b10d1f0d.png",revision:null},{url:"assets/downBottomCapInactive-12cafebe.png",revision:null},{url:"assets/downBottomCapInactive-13ddf252.png",revision:null},{url:"assets/DownLeft-15647c81.png",revision:null},{url:"assets/DownLeft-19d91486.png",revision:null},{url:"assets/DownLeft-242c6bf3.png",revision:null},{url:"assets/DownLeft-4943410c.png",revision:null},{url:"assets/DownLeft-63c88ff1.png",revision:null},{url:"assets/DownLeft-94341616.png",revision:null},{url:"assets/downLeftReceptor-9be8faae.png",revision:null},{url:"assets/DownRight-3c57e4fa.png",revision:null},{url:"assets/DownRight-9aba7559.png",revision:null},{url:"assets/DownRight-a869fa38.png",revision:null},{url:"assets/DownRight-bcd0e463.png",revision:null},{url:"assets/DownRight-d5c3b98a.png",revision:null},{url:"assets/DownRight-e2cf2b7d.png",revision:null},{url:"assets/embed-8c85cbda.png",revision:null},{url:"assets/eq-6befbaef.mp4",revision:null},{url:"assets/excellent-30398c95.png",revision:null},{url:"assets/excellent-84718ac0.png",revision:null},{url:"assets/excellent-ab7ec4d8.png",revision:null},{url:"assets/exportlua-6de45f3b.png",revision:null},{url:"assets/fakeCenter-581c6a3b.png",revision:null},{url:"assets/fakeDownLeft-e3208bb3.png",revision:null},{url:"assets/fantastic-1755e773.png",revision:null},{url:"assets/fantastic-65c1c0cf.png",revision:null},{url:"assets/fantastic-ebaa2496.png",revision:null},{url:"assets/flash-5a32532f.png",revision:null},{url:"assets/flash-ac45db5d.png",revision:null},{url:"assets/flash-be9c0562.png",revision:null},{url:"assets/flash-d0eff0a1.png",revision:null},{url:"assets/flash-e524b5bd.png",revision:null},{url:"assets/flashBright-d5407f78.png",revision:null},{url:"assets/font/Assistant-Hebrew.woff2",revision:"e99c63e8dcd7799e8adf32df82b46376"},{url:"assets/font/Assistant-Latin.woff2",revision:"a416191c7641acf049f804b685235d3d"},{url:"assets/font/Assistant-LatinExt.woff2",revision:"2423d82cdbc6a34b99d5bbacf82623c7"},{url:"assets/frame-d599a2fe.png",revision:null},{url:"assets/frameChrome-2ea8bbf3.png",revision:null},{url:"assets/git-67477794.png",revision:null},{url:"assets/great-0e864574.png",revision:null},{url:"assets/great-cf911e79.png",revision:null},{url:"assets/great-f56818a7.png",revision:null},{url:"assets/hold_judgement-82934f15.png",revision:null},{url:"assets/hold-0c4ffc42.png",revision:null},{url:"assets/hold-160934d9.png",revision:null},{url:"assets/hold-3ccaaf09.png",revision:null},{url:"assets/hold-3f899175.png",revision:null},{url:"assets/hold-4cf23d59.png",revision:null},{url:"assets/hold-5651661d.png",revision:null},{url:"assets/hold-7b947e11.png",revision:null},{url:"assets/icon/favicon.ico",revision:"7bcbdd2344641a21b0f6f9393b491d65"},{url:"assets/icon/icon_512.png",revision:"1a4014fcbfaa08050ff38cabb8235165"},{url:"assets/icon/logo.png",revision:"3170c21a8539047fffea9eb4bd912d8e"},{url:"assets/icon/mac.icns",revision:"ac52a49fb658a942abeaa019bd05e9aa"},{url:"assets/inactive-48f23de3.png",revision:null},{url:"assets/inactive-a4aecb82.png",revision:null},{url:"assets/judgementITG-5390eacd.png",revision:null},{url:"assets/judgementWaterfall-5bb3f994.png",revision:null},{url:"assets/leftBodyActive-5d89f111.png",revision:null},{url:"assets/leftBodyActive-75d41033.png",revision:null},{url:"assets/leftBodyActive-fd4e902b.png",revision:null},{url:"assets/leftBodyInactive-1110dc77.png",revision:null},{url:"assets/leftBodyInactive-8fe6311e.png",revision:null},{url:"assets/leftBodyInactive-bbc074cd.png",revision:null},{url:"assets/leftBottomCapActive-057c49fb.png",revision:null},{url:"assets/leftBottomCapActive-f759c91c.png",revision:null},{url:"assets/leftBottomCapInactive-a4ac7bba.png",revision:null},{url:"assets/leftBottomCapInactive-df6350c7.png",revision:null},{url:"assets/lift-6db682e7.png",revision:null},{url:"assets/liftCenter-9712ce74.png",revision:null},{url:"assets/liftDownLeft-0205bdc8.png",revision:null},{url:"assets/mask-f1b4d033.png",revision:null},{url:"assets/metronome_high-bd539a8c.wav",revision:null},{url:"assets/metronome_low-cbca5846.wav",revision:null},{url:"assets/mine-0e34ec01.png",revision:null},{url:"assets/mine-335f4545.png",revision:null},{url:"assets/mine-590d445e.png",revision:null},{url:"assets/mine-b973f34e.wav",revision:null},{url:"assets/missing-81d55ba9.png",revision:null},{url:"assets/mode-cac62e2a.png",revision:null},{url:"assets/mouse-ef7f3cf3.mp4",revision:null},{url:"assets/note-07e5d79f.png",revision:null},{url:"assets/outline-72e881a7.png",revision:null},{url:"assets/overlay-f63a3b18.png",revision:null},{url:"assets/particles-18ec6c1d.png",revision:null},{url:"assets/parts-0c8fa692.png",revision:null},{url:"assets/parts-9668caec.png",revision:null},{url:"assets/parts-9a3f637b.png",revision:null},{url:"assets/parts-b37af2cf.png",revision:null},{url:"assets/playtest-f34f5856.mp4",revision:null},{url:"assets/popup-b6da9784.mp4",revision:null},{url:"assets/pref-fdc09174.mp4",revision:null},{url:"assets/press-55cccb8c.png",revision:null},{url:"assets/press-feed8aa6.png",revision:null},{url:"assets/preview-0f9b00cd.png",revision:null},{url:"assets/preview-17ffcc02.png",revision:null},{url:"assets/preview-26b1bdce.png",revision:null},{url:"assets/preview-2fd7d50c.png",revision:null},{url:"assets/preview-3514cbb3.png",revision:null},{url:"assets/preview-40b76b28.png",revision:null},{url:"assets/preview-4f79831b.png",revision:null},{url:"assets/preview-5d9781d2.png",revision:null},{url:"assets/preview-5ecfc22a.png",revision:null},{url:"assets/preview-72ea0444.png",revision:null},{url:"assets/preview-747db171.png",revision:null},{url:"assets/preview-9fe2bd96.png",revision:null},{url:"assets/preview-b8f75a15.png",revision:null},{url:"assets/preview-d67630f1.png",revision:null},{url:"assets/preview-d6d59d37.png",revision:null},{url:"assets/preview-d763e667.png",revision:null},{url:"assets/preview-f113aacc.png",revision:null},{url:"assets/receptor-13e43ffb.png",revision:null},{url:"assets/receptor-30ecd7a2.png",revision:null},{url:"assets/receptor-3e38f29b.png",revision:null},{url:"assets/receptor-59597a1d.png",revision:null},{url:"assets/receptor-6fa92e51.png",revision:null},{url:"assets/receptor-a0a69b2b.png",revision:null},{url:"assets/receptor-a4713728.png",revision:null},{url:"assets/receptor-d5ef8593.png",revision:null},{url:"assets/receptorFlash-c7675c53.png",revision:null},{url:"assets/receptors-0a59df78.png",revision:null},{url:"assets/receptors-5a0beefb.png",revision:null},{url:"assets/rightBodyActive-07f95372.png",revision:null},{url:"assets/rightBodyActive-751fadec.png",revision:null},{url:"assets/rightBodyActive-8af7624b.png",revision:null},{url:"assets/rightBodyInactive-46202369.png",revision:null},{url:"assets/rightBodyInactive-695480aa.png",revision:null},{url:"assets/rightBodyInactive-fdefc2a4.png",revision:null},{url:"assets/rightBottomCapActive-6edeea1e.png",revision:null},{url:"assets/rightBottomCapActive-a736d803.png",revision:null},{url:"assets/rightBottomCapInactive-a64cea2c.png",revision:null},{url:"assets/rightBottomCapInactive-d674960e.png",revision:null},{url:"assets/scrolls-a04758c8.mp4",revision:null},{url:"assets/spark-2c59cc0e.png",revision:null},{url:"assets/stroke-1f54ba14.png",revision:null},{url:"assets/svg/ADD_EVENT.svg",revision:"3bf1426558fe2c59723905769f9dbf44"},{url:"assets/svg/ADD_FILE.svg",revision:"0cbb4c6f95ccdae8e5c5e358e021874e"},{url:"assets/svg/CHEVRON.svg",revision:"e379dea6fdc3e7faa1033e01f5c9551f"},{url:"assets/svg/CLAP.svg",revision:"6e0ec4a2e34e1fc5643b1492deac520c"},{url:"assets/svg/CLOSE_WINDOW.svg",revision:"5a830a27cc07aae3a21deb2f5a6fa9b9"},{url:"assets/svg/COPY.svg",revision:"94fe4e617349ad3c89cede7ee900d391"},{url:"assets/svg/DBL_CHEVRON.svg",revision:"5baff238d099cd65a6b54bc41d92dc59"},{url:"assets/svg/DETECT_SYNC.svg",revision:"b9b6cc287adf7fef4485899835ea3c13"},{url:"assets/svg/DOWNLOAD.svg",revision:"67c6e0e66d510bfe9590a9f8154ddf43"},{url:"assets/svg/EDIT.svg",revision:"89ac21574175ba70a0ba09ca6ba784ba"},{url:"assets/svg/EYE.svg",revision:"d4400c91178716f68e9099e237c7c671"},{url:"assets/svg/FEET.svg",revision:"01607729992f69dd5731642a118c7677"},{url:"assets/svg/FOLDER.svg",revision:"5618bc8736afa888944207dac0d53c33"},{url:"assets/svg/HIGHPASS.svg",revision:"3d3c3465decabcb2d9e2c50ee7b0d047"},{url:"assets/svg/HIGHSHELF.svg",revision:"8d348b68061c498d9dca385be140eb95"},{url:"assets/svg/IMAGE_FILE.svg",revision:"33f6364c93e7c51a2fb539c536607659"},{url:"assets/svg/LINK_BROKEN.svg",revision:"d00f815ad8fd2dee1188d5b395f78e19"},{url:"assets/svg/LINK.svg",revision:"cea24cc83a677857158c8dcdf32d0228"},{url:"assets/svg/LOWPASS.svg",revision:"12694371d2572549fed0a48ed11cdee3"},{url:"assets/svg/LOWSHELF.svg",revision:"9b2e2fbf2c76fd115cb794bf2c4b4999"},{url:"assets/svg/MENU_VERTICAL.svg",revision:"4a0ffba6dfc324979b6204dd2354e8eb"},{url:"assets/svg/METRONOME.svg",revision:"6605cb1d1ec6821ccf0d73011739ae00"},{url:"assets/svg/MINIMIZE.svg",revision:"efea4d82097ceef2d001fc91325417da"},{url:"assets/svg/PEAKING.svg",revision:"ded7f8e515e7a552aab770eaf0edf93a"},{url:"assets/svg/PLAY.svg",revision:"47a3f485918a09effbcd1f99fbcc2ce3"},{url:"assets/svg/PLAYTEST.svg",revision:"ae455e6518022d467b0dd79269e9a8af"},{url:"assets/svg/PLUS.svg",revision:"f4694d31eb7f609c2510a9fe36dd4f12"},{url:"assets/svg/RECORD.svg",revision:"c94e7371259bc6a865996560b6656268"},{url:"assets/svg/REVERT.svg",revision:"ecd1fc1b8b0811062e3fc9a887bec68d"},{url:"assets/svg/SKIP_END.svg",revision:"43f4154ca656d2017a2b41a1dfacd671"},{url:"assets/svg/SKIP_START.svg",revision:"690fdfb6d41b25ccb4bd5aa9f65b81f1"},{url:"assets/svg/SM_FILE.svg",revision:"0c5917f0b2e2b7401097071030cc7bd1"},{url:"assets/svg/SPEED.svg",revision:"c8ecff8943040cee73642d289f25c5c9"},{url:"assets/svg/STOP.svg",revision:"2dd4917e08b23080980202ed52b8a7eb"},{url:"assets/svg/TRASH.svg",revision:"55f80a8cf8bb4aed29a3089807064464"},{url:"assets/svg/UNKNOWN_FILE.svg",revision:"d1196a02d693ed3d3f0d064f5c3d1815"},{url:"assets/svg/UPLOAD.svg",revision:"3009c00a98d4a6fe2d0ebbb1e626ee43"},{url:"assets/svg/VOLUME.svg",revision:"b971f09af774996aeeee9749ddb6949a"},{url:"assets/svg/X_CLAP.svg",revision:"00875c090478341862b257d3655922d8"},{url:"assets/svg/X_EYE.svg",revision:"0bf002a7e35febde50e7b2ce116c2139"},{url:"assets/svg/X_METRONOME.svg",revision:"abcb5baff6f1683403a1362b5f0ee561"},{url:"assets/tap-69a9f81d.png",revision:null},{url:"assets/tap-c1e36633.png",revision:null},{url:"assets/tapCenter-103680e8.png",revision:null},{url:"assets/tapDownLeft-17ba3b42.png",revision:null},{url:"assets/timesig-9e28e1f2.png",revision:null},{url:"assets/top-74da30ae.png",revision:null},{url:"assets/underlay-95144bef.png",revision:null},{url:"assets/upBodyActive-b06d82f3.png",revision:null},{url:"assets/upBodyActive-c813881f.png",revision:null},{url:"assets/upBodyInactive-0222237a.png",revision:null},{url:"assets/upBodyInactive-4ef75342.png",revision:null},{url:"assets/upBodyInactive-87a7969e.png",revision:null},{url:"assets/upBottomCapActive-07fb7c6e.png",revision:null},{url:"assets/upBottomCapActive-19e4c05d.png",revision:null},{url:"assets/upBottomCapInactive-23aae747.png",revision:null},{url:"assets/upBottomCapInactive-75f78aac.png",revision:null},{url:"assets/UpLeft-28515625.png",revision:null},{url:"assets/UpLeft-36744666.png",revision:null},{url:"assets/UpLeft-752b6821.png",revision:null},{url:"assets/UpLeft-be2bb52b.png",revision:null},{url:"assets/UpLeft-d457a441.png",revision:null},{url:"assets/UpLeft-ef9a2609.png",revision:null},{url:"assets/upleftBodyActive-bc79d60f.png",revision:null},{url:"assets/upleftBodyInactive-f60085c6.png",revision:null},{url:"assets/UpRight-2e4dc3f1.png",revision:null},{url:"assets/UpRight-7924deeb.png",revision:null},{url:"assets/UpRight-8a892589.png",revision:null},{url:"assets/UpRight-91e454bc.png",revision:null},{url:"assets/UpRight-af6dd110.png",revision:null},{url:"assets/UpRight-fda6b516.png",revision:null},{url:"assets/uprightBodyActive-3d912f52.png",revision:null},{url:"assets/uprightBodyInactive-01c6c977.png",revision:null},{url:"assets/w0-6f86addb.png",revision:null},{url:"assets/w1-c8c43b0f.png",revision:null},{url:"assets/w2-37282ba8.png",revision:null},{url:"assets/w3-3c2ca2d8.png",revision:null},{url:"assets/w4-ce0f95de.png",revision:null},{url:"assets/w5-23173d4f.png",revision:null},{url:"assets/way_off-8bc3fd65.png",revision:null},{url:"assets/way_off-bc2cdf11.png",revision:null},{url:"assets/way_off-cc9a5377.png",revision:null},{url:"assets/white_fantastic-6c519378.png",revision:null},{url:"assets/white_fantastic-9f83da7a.png",revision:null},{url:"assets/white_fantastic-b65b4f11.png",revision:null},{url:"assets/icon/icon_512.png",revision:"1a4014fcbfaa08050ff38cabb8235165"},{url:"manifest.json",revision:"1d72161daa4e530e15d85baf4906bf4c"}],{ignoreURLParametersMatching:[/^flags/,/^url/,/^chartIndex/,/^chartType/]}),s.cleanupOutdatedCaches()})); +if(!self.define){let s,e={};const n=(n,l)=>(n=new URL(n+".js",l).href,e[n]||new Promise((e=>{if("document"in self){const s=document.createElement("script");s.src=n,s.onload=e,document.head.appendChild(s)}else s=n,importScripts(n),e()})).then((()=>{let s=e[n];if(!s)throw new Error(`Module ${n} didn’t register its module`);return s})));self.define=(l,i)=>{const r=s||("document"in self?document.currentScript.src:"")||location.href;if(e[r])return;let a={};const u=s=>n(s,r),t={module:{uri:r},exports:a,require:u};e[r]=Promise.all(l.map((s=>t[s]||u(s)))).then((s=>(i(...s),a)))}}define(["./workbox-1ab968a5"],(function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"AnimatedSprite-86b56f12.js",revision:null},{url:"app.js",revision:"f7c43f8d45fa7086755971192fd532f8"},{url:"app/index.html",revision:"4ff7706fca2b9e21ef7d3ad80fc39a93"},{url:"assets/ChartManager-00dfcf8b.css",revision:null},{url:"assets/index-5508b070.css",revision:null},{url:"assets/index-8c6c3f75.css",revision:null},{url:"assets/index-d7a91955.css",revision:null},{url:"assets/SafariFileWorker-557e53c3.js",revision:null},{url:"ChartManager-3c3d6f39.js",revision:null},{url:"downloader-46f1bfb8.js",revision:null},{url:"embed.js",revision:"7494521f0da85a3b01bbd31167e86e8f"},{url:"embed/index.html",revision:"148d6a81343bf5d27a36130d46325ffd"},{url:"FileSystemWritableFileStream-e4c13ad9.js",revision:null},{url:"HoldBody-5358344a.js",revision:null},{url:"index.html",revision:"18fca6f9c9df4dfb485b429cfb32fcef"},{url:"memory-d5c05bb2.js",revision:null},{url:"NodeFileHandler-1495cd5b.js",revision:null},{url:"Noteskin-1b40b05f.js",revision:null},{url:"Noteskin-39363162.js",revision:null},{url:"Noteskin-430fd36b.js",revision:null},{url:"Noteskin-5a1b65c6.js",revision:null},{url:"Noteskin-5b9ce776.js",revision:null},{url:"Noteskin-6a616711.js",revision:null},{url:"Noteskin-7b7fe270.js",revision:null},{url:"Noteskin-88871f72.js",revision:null},{url:"Noteskin-ace77c92.js",revision:null},{url:"Noteskin-ba1ed891.js",revision:null},{url:"Noteskin-bd003ac8.js",revision:null},{url:"Noteskin-c2a220e5.js",revision:null},{url:"Noteskin-c2d5fa3c.js",revision:null},{url:"Noteskin-e8141f1a.js",revision:null},{url:"Noteskin-f1e24e88.js",revision:null},{url:"Noteskin-fb3b8e1b.js",revision:null},{url:"OggDec-2941c3fd.js",revision:null},{url:"web-streams-ponyfill-4a0f4950.js",revision:null},{url:"assets/0-0543793c.png",revision:null},{url:"assets/0-c5249fef.png",revision:null},{url:"assets/1-0e354907.png",revision:null},{url:"assets/1-84dd19f7.png",revision:null},{url:"assets/2-3b873573.png",revision:null},{url:"assets/2-ce5f7b2f.png",revision:null},{url:"assets/3-648105cf.png",revision:null},{url:"assets/3-e5952ffa.png",revision:null},{url:"assets/4-1f9a4a43.png",revision:null},{url:"assets/4-da345826.png",revision:null},{url:"assets/5-b9acdc27.png",revision:null},{url:"assets/5-f6bb9779.png",revision:null},{url:"assets/6-12d00670.png",revision:null},{url:"assets/6-565a7261.png",revision:null},{url:"assets/7-00801dd0.png",revision:null},{url:"assets/7-dd1c0ecf.png",revision:null},{url:"assets/8-94163432.png",revision:null},{url:"assets/8-9a73d4f3.png",revision:null},{url:"assets/active-29dd632a.png",revision:null},{url:"assets/active-d06e5c33.png",revision:null},{url:"assets/analyze-738fe825.mp4",revision:null},{url:"assets/app/changelog.json",revision:"6ed6903bbe0f368009b4c834aa75d93c"},{url:"assets/app/versions.json",revision:"223594f6ecde2ce4e9ed61e4f47c9378"},{url:"assets/av-05878b27.mp4",revision:null},{url:"assets/banner-fa29dd27.png",revision:null},{url:"assets/base-29930c78.png",revision:null},{url:"assets/body-0862c984.png",revision:null},{url:"assets/bodyActive-105f1d12.png",revision:null},{url:"assets/bodyActive-56c9977a.png",revision:null},{url:"assets/bodyActive-614d0188.png",revision:null},{url:"assets/bodyActive-889762ad.png",revision:null},{url:"assets/bodyActive-b3d95e51.png",revision:null},{url:"assets/bodyInactive-1234f594.png",revision:null},{url:"assets/bodyInactive-5d99335a.png",revision:null},{url:"assets/bodyInactive-72253162.png",revision:null},{url:"assets/bodyInactive-cfc41138.png",revision:null},{url:"assets/bodyInactive-e5ca65be.png",revision:null},{url:"assets/bottomCapActive-32ba7c5b.png",revision:null},{url:"assets/bottomCapActive-50553ab4.png",revision:null},{url:"assets/bottomCapActive-58c18c0b.png",revision:null},{url:"assets/bottomCapActive-75c2fd66.png",revision:null},{url:"assets/bottomCapInactive-177e377e.png",revision:null},{url:"assets/bottomCapInactive-d275b2b2.png",revision:null},{url:"assets/bottomCapInactive-d8fa251d.png",revision:null},{url:"assets/bottomCapInactive-e990106f.png",revision:null},{url:"assets/cap-8cc2992c.png",revision:null},{url:"assets/cap-e2813a45.png",revision:null},{url:"assets/capActive-59a3b423.png",revision:null},{url:"assets/capActive-e83fb138.png",revision:null},{url:"assets/capInactive-4622d5f2.png",revision:null},{url:"assets/capInactive-efc3b952.png",revision:null},{url:"assets/Center-1b6bfec9.png",revision:null},{url:"assets/Center-274a1642.png",revision:null},{url:"assets/Center-461a85de.png",revision:null},{url:"assets/Center-55e9b68a.png",revision:null},{url:"assets/Center-cb4b6c25.png",revision:null},{url:"assets/Center-df4c129b.png",revision:null},{url:"assets/centerReceptor-44665c43.png",revision:null},{url:"assets/colors-63f923d2.png",revision:null},{url:"assets/decent-79d4c208.png",revision:null},{url:"assets/decent-cc4ef7ea.png",revision:null},{url:"assets/decent-f3f8a110.png",revision:null},{url:"assets/downBodyActive-77f6502e.png",revision:null},{url:"assets/downBodyActive-8cf886d3.png",revision:null},{url:"assets/downBodyActive-dd1fd694.png",revision:null},{url:"assets/downBodyInactive-7465edd0.png",revision:null},{url:"assets/downBodyInactive-a5759c62.png",revision:null},{url:"assets/downBodyInactive-c781a303.png",revision:null},{url:"assets/downBottomCapActive-57ef4d54.png",revision:null},{url:"assets/downBottomCapActive-b10d1f0d.png",revision:null},{url:"assets/downBottomCapInactive-12cafebe.png",revision:null},{url:"assets/downBottomCapInactive-13ddf252.png",revision:null},{url:"assets/DownLeft-15647c81.png",revision:null},{url:"assets/DownLeft-19d91486.png",revision:null},{url:"assets/DownLeft-242c6bf3.png",revision:null},{url:"assets/DownLeft-4943410c.png",revision:null},{url:"assets/DownLeft-63c88ff1.png",revision:null},{url:"assets/DownLeft-94341616.png",revision:null},{url:"assets/downLeftReceptor-9be8faae.png",revision:null},{url:"assets/DownRight-3c57e4fa.png",revision:null},{url:"assets/DownRight-9aba7559.png",revision:null},{url:"assets/DownRight-a869fa38.png",revision:null},{url:"assets/DownRight-bcd0e463.png",revision:null},{url:"assets/DownRight-d5c3b98a.png",revision:null},{url:"assets/DownRight-e2cf2b7d.png",revision:null},{url:"assets/embed-8c85cbda.png",revision:null},{url:"assets/eq-6befbaef.mp4",revision:null},{url:"assets/excellent-30398c95.png",revision:null},{url:"assets/excellent-84718ac0.png",revision:null},{url:"assets/excellent-ab7ec4d8.png",revision:null},{url:"assets/exportlua-6de45f3b.png",revision:null},{url:"assets/fakeCenter-581c6a3b.png",revision:null},{url:"assets/fakeDownLeft-e3208bb3.png",revision:null},{url:"assets/fantastic-1755e773.png",revision:null},{url:"assets/fantastic-65c1c0cf.png",revision:null},{url:"assets/fantastic-ebaa2496.png",revision:null},{url:"assets/flash-5a32532f.png",revision:null},{url:"assets/flash-ac45db5d.png",revision:null},{url:"assets/flash-be9c0562.png",revision:null},{url:"assets/flash-d0eff0a1.png",revision:null},{url:"assets/flash-e524b5bd.png",revision:null},{url:"assets/flashBright-d5407f78.png",revision:null},{url:"assets/font/Assistant-Hebrew.woff2",revision:"e99c63e8dcd7799e8adf32df82b46376"},{url:"assets/font/Assistant-Latin.woff2",revision:"a416191c7641acf049f804b685235d3d"},{url:"assets/font/Assistant-LatinExt.woff2",revision:"2423d82cdbc6a34b99d5bbacf82623c7"},{url:"assets/frame-d599a2fe.png",revision:null},{url:"assets/frameChrome-2ea8bbf3.png",revision:null},{url:"assets/git-67477794.png",revision:null},{url:"assets/great-0e864574.png",revision:null},{url:"assets/great-cf911e79.png",revision:null},{url:"assets/great-f56818a7.png",revision:null},{url:"assets/hold_judgement-82934f15.png",revision:null},{url:"assets/hold-0c4ffc42.png",revision:null},{url:"assets/hold-160934d9.png",revision:null},{url:"assets/hold-3ccaaf09.png",revision:null},{url:"assets/hold-3f899175.png",revision:null},{url:"assets/hold-4cf23d59.png",revision:null},{url:"assets/hold-5651661d.png",revision:null},{url:"assets/hold-7b947e11.png",revision:null},{url:"assets/icon/favicon.ico",revision:"7bcbdd2344641a21b0f6f9393b491d65"},{url:"assets/icon/icon_512.png",revision:"1a4014fcbfaa08050ff38cabb8235165"},{url:"assets/icon/logo.png",revision:"3170c21a8539047fffea9eb4bd912d8e"},{url:"assets/icon/mac.icns",revision:"ac52a49fb658a942abeaa019bd05e9aa"},{url:"assets/inactive-48f23de3.png",revision:null},{url:"assets/inactive-a4aecb82.png",revision:null},{url:"assets/judgementITG-5390eacd.png",revision:null},{url:"assets/judgementWaterfall-5bb3f994.png",revision:null},{url:"assets/leftBodyActive-5d89f111.png",revision:null},{url:"assets/leftBodyActive-75d41033.png",revision:null},{url:"assets/leftBodyActive-fd4e902b.png",revision:null},{url:"assets/leftBodyInactive-1110dc77.png",revision:null},{url:"assets/leftBodyInactive-8fe6311e.png",revision:null},{url:"assets/leftBodyInactive-bbc074cd.png",revision:null},{url:"assets/leftBottomCapActive-057c49fb.png",revision:null},{url:"assets/leftBottomCapActive-f759c91c.png",revision:null},{url:"assets/leftBottomCapInactive-a4ac7bba.png",revision:null},{url:"assets/leftBottomCapInactive-df6350c7.png",revision:null},{url:"assets/lift-6db682e7.png",revision:null},{url:"assets/liftCenter-9712ce74.png",revision:null},{url:"assets/liftDownLeft-0205bdc8.png",revision:null},{url:"assets/mask-f1b4d033.png",revision:null},{url:"assets/metronome_high-bd539a8c.wav",revision:null},{url:"assets/metronome_low-cbca5846.wav",revision:null},{url:"assets/mine-0e34ec01.png",revision:null},{url:"assets/mine-335f4545.png",revision:null},{url:"assets/mine-590d445e.png",revision:null},{url:"assets/mine-b973f34e.wav",revision:null},{url:"assets/missing-81d55ba9.png",revision:null},{url:"assets/mode-cac62e2a.png",revision:null},{url:"assets/mouse-ef7f3cf3.mp4",revision:null},{url:"assets/note-07e5d79f.png",revision:null},{url:"assets/outline-72e881a7.png",revision:null},{url:"assets/overlay-f63a3b18.png",revision:null},{url:"assets/particles-18ec6c1d.png",revision:null},{url:"assets/parts-0c8fa692.png",revision:null},{url:"assets/parts-9668caec.png",revision:null},{url:"assets/parts-9a3f637b.png",revision:null},{url:"assets/parts-b37af2cf.png",revision:null},{url:"assets/playtest-f34f5856.mp4",revision:null},{url:"assets/popup-b6da9784.mp4",revision:null},{url:"assets/pref-fdc09174.mp4",revision:null},{url:"assets/press-55cccb8c.png",revision:null},{url:"assets/press-feed8aa6.png",revision:null},{url:"assets/preview-0f9b00cd.png",revision:null},{url:"assets/preview-17ffcc02.png",revision:null},{url:"assets/preview-26b1bdce.png",revision:null},{url:"assets/preview-2fd7d50c.png",revision:null},{url:"assets/preview-3514cbb3.png",revision:null},{url:"assets/preview-40b76b28.png",revision:null},{url:"assets/preview-4f79831b.png",revision:null},{url:"assets/preview-5d9781d2.png",revision:null},{url:"assets/preview-5ecfc22a.png",revision:null},{url:"assets/preview-72ea0444.png",revision:null},{url:"assets/preview-747db171.png",revision:null},{url:"assets/preview-9fe2bd96.png",revision:null},{url:"assets/preview-b8f75a15.png",revision:null},{url:"assets/preview-d67630f1.png",revision:null},{url:"assets/preview-d6d59d37.png",revision:null},{url:"assets/preview-d763e667.png",revision:null},{url:"assets/preview-f113aacc.png",revision:null},{url:"assets/receptor-13e43ffb.png",revision:null},{url:"assets/receptor-30ecd7a2.png",revision:null},{url:"assets/receptor-3e38f29b.png",revision:null},{url:"assets/receptor-59597a1d.png",revision:null},{url:"assets/receptor-6fa92e51.png",revision:null},{url:"assets/receptor-a0a69b2b.png",revision:null},{url:"assets/receptor-a4713728.png",revision:null},{url:"assets/receptor-d5ef8593.png",revision:null},{url:"assets/receptorFlash-c7675c53.png",revision:null},{url:"assets/receptors-0a59df78.png",revision:null},{url:"assets/receptors-5a0beefb.png",revision:null},{url:"assets/rightBodyActive-07f95372.png",revision:null},{url:"assets/rightBodyActive-751fadec.png",revision:null},{url:"assets/rightBodyActive-8af7624b.png",revision:null},{url:"assets/rightBodyInactive-46202369.png",revision:null},{url:"assets/rightBodyInactive-695480aa.png",revision:null},{url:"assets/rightBodyInactive-fdefc2a4.png",revision:null},{url:"assets/rightBottomCapActive-6edeea1e.png",revision:null},{url:"assets/rightBottomCapActive-a736d803.png",revision:null},{url:"assets/rightBottomCapInactive-a64cea2c.png",revision:null},{url:"assets/rightBottomCapInactive-d674960e.png",revision:null},{url:"assets/scrolls-a04758c8.mp4",revision:null},{url:"assets/spark-2c59cc0e.png",revision:null},{url:"assets/stroke-1f54ba14.png",revision:null},{url:"assets/svg/ADD_EVENT.svg",revision:"3bf1426558fe2c59723905769f9dbf44"},{url:"assets/svg/ADD_FILE.svg",revision:"0cbb4c6f95ccdae8e5c5e358e021874e"},{url:"assets/svg/CHEVRON.svg",revision:"e379dea6fdc3e7faa1033e01f5c9551f"},{url:"assets/svg/CLAP.svg",revision:"6e0ec4a2e34e1fc5643b1492deac520c"},{url:"assets/svg/CLOSE_WINDOW.svg",revision:"5a830a27cc07aae3a21deb2f5a6fa9b9"},{url:"assets/svg/COPY.svg",revision:"94fe4e617349ad3c89cede7ee900d391"},{url:"assets/svg/DBL_CHEVRON.svg",revision:"5baff238d099cd65a6b54bc41d92dc59"},{url:"assets/svg/DETECT_SYNC.svg",revision:"b9b6cc287adf7fef4485899835ea3c13"},{url:"assets/svg/DOWNLOAD.svg",revision:"67c6e0e66d510bfe9590a9f8154ddf43"},{url:"assets/svg/EDIT.svg",revision:"89ac21574175ba70a0ba09ca6ba784ba"},{url:"assets/svg/EYE.svg",revision:"d4400c91178716f68e9099e237c7c671"},{url:"assets/svg/FEET.svg",revision:"01607729992f69dd5731642a118c7677"},{url:"assets/svg/FOLDER.svg",revision:"5618bc8736afa888944207dac0d53c33"},{url:"assets/svg/HIGHPASS.svg",revision:"3d3c3465decabcb2d9e2c50ee7b0d047"},{url:"assets/svg/HIGHSHELF.svg",revision:"8d348b68061c498d9dca385be140eb95"},{url:"assets/svg/IMAGE_FILE.svg",revision:"33f6364c93e7c51a2fb539c536607659"},{url:"assets/svg/LINK_BROKEN.svg",revision:"d00f815ad8fd2dee1188d5b395f78e19"},{url:"assets/svg/LINK.svg",revision:"cea24cc83a677857158c8dcdf32d0228"},{url:"assets/svg/LOWPASS.svg",revision:"12694371d2572549fed0a48ed11cdee3"},{url:"assets/svg/LOWSHELF.svg",revision:"9b2e2fbf2c76fd115cb794bf2c4b4999"},{url:"assets/svg/MENU_VERTICAL.svg",revision:"4a0ffba6dfc324979b6204dd2354e8eb"},{url:"assets/svg/METRONOME.svg",revision:"6605cb1d1ec6821ccf0d73011739ae00"},{url:"assets/svg/MINIMIZE.svg",revision:"efea4d82097ceef2d001fc91325417da"},{url:"assets/svg/PEAKING.svg",revision:"ded7f8e515e7a552aab770eaf0edf93a"},{url:"assets/svg/PLAY.svg",revision:"47a3f485918a09effbcd1f99fbcc2ce3"},{url:"assets/svg/PLAYTEST.svg",revision:"ae455e6518022d467b0dd79269e9a8af"},{url:"assets/svg/PLUS.svg",revision:"f4694d31eb7f609c2510a9fe36dd4f12"},{url:"assets/svg/RECORD.svg",revision:"c94e7371259bc6a865996560b6656268"},{url:"assets/svg/REVERT.svg",revision:"ecd1fc1b8b0811062e3fc9a887bec68d"},{url:"assets/svg/SKIP_END.svg",revision:"43f4154ca656d2017a2b41a1dfacd671"},{url:"assets/svg/SKIP_START.svg",revision:"690fdfb6d41b25ccb4bd5aa9f65b81f1"},{url:"assets/svg/SM_FILE.svg",revision:"0c5917f0b2e2b7401097071030cc7bd1"},{url:"assets/svg/SPEED.svg",revision:"c8ecff8943040cee73642d289f25c5c9"},{url:"assets/svg/SPLIT_TIMING.svg",revision:"dcd9527c512275fa03ba587cbacda1dd"},{url:"assets/svg/STOP.svg",revision:"2dd4917e08b23080980202ed52b8a7eb"},{url:"assets/svg/TRASH.svg",revision:"55f80a8cf8bb4aed29a3089807064464"},{url:"assets/svg/UNKNOWN_FILE.svg",revision:"d1196a02d693ed3d3f0d064f5c3d1815"},{url:"assets/svg/UPLOAD.svg",revision:"3009c00a98d4a6fe2d0ebbb1e626ee43"},{url:"assets/svg/VOLUME.svg",revision:"b971f09af774996aeeee9749ddb6949a"},{url:"assets/svg/X_CLAP.svg",revision:"00875c090478341862b257d3655922d8"},{url:"assets/svg/X_EYE.svg",revision:"0bf002a7e35febde50e7b2ce116c2139"},{url:"assets/svg/X_METRONOME.svg",revision:"abcb5baff6f1683403a1362b5f0ee561"},{url:"assets/tap-69a9f81d.png",revision:null},{url:"assets/tap-c1e36633.png",revision:null},{url:"assets/tapCenter-103680e8.png",revision:null},{url:"assets/tapDownLeft-17ba3b42.png",revision:null},{url:"assets/timesig-9e28e1f2.png",revision:null},{url:"assets/top-74da30ae.png",revision:null},{url:"assets/underlay-95144bef.png",revision:null},{url:"assets/upBodyActive-b06d82f3.png",revision:null},{url:"assets/upBodyActive-c813881f.png",revision:null},{url:"assets/upBodyInactive-0222237a.png",revision:null},{url:"assets/upBodyInactive-4ef75342.png",revision:null},{url:"assets/upBodyInactive-87a7969e.png",revision:null},{url:"assets/upBottomCapActive-07fb7c6e.png",revision:null},{url:"assets/upBottomCapActive-19e4c05d.png",revision:null},{url:"assets/upBottomCapInactive-23aae747.png",revision:null},{url:"assets/upBottomCapInactive-75f78aac.png",revision:null},{url:"assets/UpLeft-28515625.png",revision:null},{url:"assets/UpLeft-36744666.png",revision:null},{url:"assets/UpLeft-752b6821.png",revision:null},{url:"assets/UpLeft-be2bb52b.png",revision:null},{url:"assets/UpLeft-d457a441.png",revision:null},{url:"assets/UpLeft-ef9a2609.png",revision:null},{url:"assets/upleftBodyActive-bc79d60f.png",revision:null},{url:"assets/upleftBodyInactive-f60085c6.png",revision:null},{url:"assets/UpRight-2e4dc3f1.png",revision:null},{url:"assets/UpRight-7924deeb.png",revision:null},{url:"assets/UpRight-8a892589.png",revision:null},{url:"assets/UpRight-91e454bc.png",revision:null},{url:"assets/UpRight-af6dd110.png",revision:null},{url:"assets/UpRight-fda6b516.png",revision:null},{url:"assets/uprightBodyActive-3d912f52.png",revision:null},{url:"assets/uprightBodyInactive-01c6c977.png",revision:null},{url:"assets/w0-6f86addb.png",revision:null},{url:"assets/w1-c8c43b0f.png",revision:null},{url:"assets/w2-37282ba8.png",revision:null},{url:"assets/w3-3c2ca2d8.png",revision:null},{url:"assets/w4-ce0f95de.png",revision:null},{url:"assets/w5-23173d4f.png",revision:null},{url:"assets/way_off-8bc3fd65.png",revision:null},{url:"assets/way_off-bc2cdf11.png",revision:null},{url:"assets/way_off-cc9a5377.png",revision:null},{url:"assets/white_fantastic-6c519378.png",revision:null},{url:"assets/white_fantastic-9f83da7a.png",revision:null},{url:"assets/white_fantastic-b65b4f11.png",revision:null},{url:"assets/icon/icon_512.png",revision:"1a4014fcbfaa08050ff38cabb8235165"},{url:"manifest.json",revision:"1d72161daa4e530e15d85baf4906bf4c"}],{ignoreURLParametersMatching:[/^flags/,/^url/,/^chartIndex/,/^chartType/]}),s.cleanupOutdatedCaches()}));