@prefecthq/graphs 2.3.1 → 2.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- (function(kt,Y){typeof exports=="object"&&typeof module<"u"?Y(exports,require("vue"),require("@prefecthq/vue-compositions"),require("@prefecthq/prefect-design")):typeof define=="function"&&define.amd?define(["exports","vue","@prefecthq/vue-compositions","@prefecthq/prefect-design"],Y):(kt=typeof globalThis<"u"?globalThis:kt||self,Y(kt["prefect-graphs"]={},kt.Vue,kt.vueCompositions,kt.prefectDesign))})(this,function(kt,Y,wr,Ji){"use strict";var A3=Object.defineProperty;var M3=(kt,Y,wr)=>Y in kt?A3(kt,Y,{enumerable:!0,configurable:!0,writable:!0,value:wr}):kt[Y]=wr;var Nf=(kt,Y,wr)=>(M3(kt,typeof Y!="symbol"?Y+"":Y,wr),wr);const Hf="nodes-container",Lb="node-container",Gb="edge-container";function Ph(i){const t=Object.prototype.toString.call(i);return i instanceof Date||typeof i=="object"&&t==="[object Date]"?new i.constructor(+i):typeof i=="number"||t==="[object Number]"||typeof i=="string"||t==="[object String]"?new Date(i):new Date(NaN)}function kb(i,t){return i instanceof Date?new i.constructor(t):new Date(t)}function Fb(i,t){const e=+Ph(i);return kb(i,e+t)}const ua=1e3;function Db(i,t){return Fb(i,t*1e3)}function Nb(i){return t=>{const r=(i?Math[i]:Math.trunc)(t);return r===0?0:r}}function Kf(i,t){return+Ph(i)-+Ph(t)}function Ob(i,t,e){const r=Kf(i,t)/1e3;return Nb(e==null?void 0:e.roundingMethod)(r)}var en=(i=>(i[i.WEBGL_LEGACY=0]="WEBGL_LEGACY",i[i.WEBGL=1]="WEBGL",i[i.WEBGL2=2]="WEBGL2",i))(en||{}),zf=(i=>(i[i.UNKNOWN=0]="UNKNOWN",i[i.WEBGL=1]="WEBGL",i[i.CANVAS=2]="CANVAS",i))(zf||{}),Lh=(i=>(i[i.COLOR=16384]="COLOR",i[i.DEPTH=256]="DEPTH",i[i.STENCIL=1024]="STENCIL",i))(Lh||{}),mt=(i=>(i[i.NORMAL=0]="NORMAL",i[i.ADD=1]="ADD",i[i.MULTIPLY=2]="MULTIPLY",i[i.SCREEN=3]="SCREEN",i[i.OVERLAY=4]="OVERLAY",i[i.DARKEN=5]="DARKEN",i[i.LIGHTEN=6]="LIGHTEN",i[i.COLOR_DODGE=7]="COLOR_DODGE",i[i.COLOR_BURN=8]="COLOR_BURN",i[i.HARD_LIGHT=9]="HARD_LIGHT",i[i.SOFT_LIGHT=10]="SOFT_LIGHT",i[i.DIFFERENCE=11]="DIFFERENCE",i[i.EXCLUSION=12]="EXCLUSION",i[i.HUE=13]="HUE",i[i.SATURATION=14]="SATURATION",i[i.COLOR=15]="COLOR",i[i.LUMINOSITY=16]="LUMINOSITY",i[i.NORMAL_NPM=17]="NORMAL_NPM",i[i.ADD_NPM=18]="ADD_NPM",i[i.SCREEN_NPM=19]="SCREEN_NPM",i[i.NONE=20]="NONE",i[i.SRC_OVER=0]="SRC_OVER",i[i.SRC_IN=21]="SRC_IN",i[i.SRC_OUT=22]="SRC_OUT",i[i.SRC_ATOP=23]="SRC_ATOP",i[i.DST_OVER=24]="DST_OVER",i[i.DST_IN=25]="DST_IN",i[i.DST_OUT=26]="DST_OUT",i[i.DST_ATOP=27]="DST_ATOP",i[i.ERASE=26]="ERASE",i[i.SUBTRACT=28]="SUBTRACT",i[i.XOR=29]="XOR",i))(mt||{}),vi=(i=>(i[i.POINTS=0]="POINTS",i[i.LINES=1]="LINES",i[i.LINE_LOOP=2]="LINE_LOOP",i[i.LINE_STRIP=3]="LINE_STRIP",i[i.TRIANGLES=4]="TRIANGLES",i[i.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",i[i.TRIANGLE_FAN=6]="TRIANGLE_FAN",i))(vi||{}),z=(i=>(i[i.RGBA=6408]="RGBA",i[i.RGB=6407]="RGB",i[i.RG=33319]="RG",i[i.RED=6403]="RED",i[i.RGBA_INTEGER=36249]="RGBA_INTEGER",i[i.RGB_INTEGER=36248]="RGB_INTEGER",i[i.RG_INTEGER=33320]="RG_INTEGER",i[i.RED_INTEGER=36244]="RED_INTEGER",i[i.ALPHA=6406]="ALPHA",i[i.LUMINANCE=6409]="LUMINANCE",i[i.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",i[i.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",i[i.DEPTH_STENCIL=34041]="DEPTH_STENCIL",i))(z||{}),Kn=(i=>(i[i.TEXTURE_2D=3553]="TEXTURE_2D",i[i.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",i[i.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",i[i.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",i[i.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",i[i.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",i[i.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",i[i.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",i[i.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",i))(Kn||{}),ct=(i=>(i[i.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",i[i.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",i[i.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",i[i.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",i[i.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",i[i.UNSIGNED_INT=5125]="UNSIGNED_INT",i[i.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",i[i.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",i[i.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",i[i.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",i[i.BYTE=5120]="BYTE",i[i.SHORT=5122]="SHORT",i[i.INT=5124]="INT",i[i.FLOAT=5126]="FLOAT",i[i.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",i[i.HALF_FLOAT=36193]="HALF_FLOAT",i))(ct||{}),rt=(i=>(i[i.FLOAT=0]="FLOAT",i[i.INT=1]="INT",i[i.UINT=2]="UINT",i))(rt||{}),$i=(i=>(i[i.NEAREST=0]="NEAREST",i[i.LINEAR=1]="LINEAR",i))($i||{}),wi=(i=>(i[i.CLAMP=33071]="CLAMP",i[i.REPEAT=10497]="REPEAT",i[i.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",i))(wi||{}),Ti=(i=>(i[i.OFF=0]="OFF",i[i.POW2=1]="POW2",i[i.ON=2]="ON",i[i.ON_MANUAL=3]="ON_MANUAL",i))(Ti||{}),Ee=(i=>(i[i.NPM=0]="NPM",i[i.UNPACK=1]="UNPACK",i[i.PMA=2]="PMA",i[i.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",i[i.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",i[i.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA",i))(Ee||{}),Si=(i=>(i[i.NO=0]="NO",i[i.YES=1]="YES",i[i.AUTO=2]="AUTO",i[i.BLEND=0]="BLEND",i[i.CLEAR=1]="CLEAR",i[i.BLIT=2]="BLIT",i))(Si||{}),Gh=(i=>(i[i.AUTO=0]="AUTO",i[i.MANUAL=1]="MANUAL",i))(Gh||{}),Ye=(i=>(i.LOW="lowp",i.MEDIUM="mediump",i.HIGH="highp",i))(Ye||{}),re=(i=>(i[i.NONE=0]="NONE",i[i.SCISSOR=1]="SCISSOR",i[i.STENCIL=2]="STENCIL",i[i.SPRITE=3]="SPRITE",i[i.COLOR=4]="COLOR",i))(re||{}),$t=(i=>(i[i.NONE=0]="NONE",i[i.LOW=2]="LOW",i[i.MEDIUM=4]="MEDIUM",i[i.HIGH=8]="HIGH",i))($t||{}),Ci=(i=>(i[i.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",i[i.ARRAY_BUFFER=34962]="ARRAY_BUFFER",i[i.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",i))(Ci||{});const nt={ADAPTER:{createCanvas:(i,t)=>{const e=document.createElement("canvas");return e.width=i,e.height=t,e},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(i,t)=>fetch(i,t),parseXML:i=>new DOMParser().parseFromString(i,"text/xml")},RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var kh=/iPhone/i,Yf=/iPod/i,jf=/iPad/i,Jf=/\biOS-universal(?:.+)Mac\b/i,Fh=/\bAndroid(?:.+)Mobile\b/i,$f=/Android/i,zn=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,da=/Silk/i,Qi=/Windows Phone/i,Qf=/\bWindows(?:.+)ARM\b/i,qf=/BlackBerry/i,tp=/BB10/i,ep=/Opera Mini/i,ip=/\b(CriOS|Chrome)(?:.+)Mobile/i,rp=/Mobile(?:.+)Firefox\b/i,np=function(i){return typeof i<"u"&&i.platform==="MacIntel"&&typeof i.maxTouchPoints=="number"&&i.maxTouchPoints>1&&typeof MSStream>"u"};function Bb(i){return function(t){return t.test(i)}}function sp(i){var t={userAgent:"",platform:"",maxTouchPoints:0};!i&&typeof navigator<"u"?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof i=="string"?t.userAgent=i:i&&i.userAgent&&(t={userAgent:i.userAgent,platform:i.platform,maxTouchPoints:i.maxTouchPoints||0});var e=t.userAgent,r=e.split("[FBAN");typeof r[1]<"u"&&(e=r[0]),r=e.split("Twitter"),typeof r[1]<"u"&&(e=r[0]);var n=Bb(e),s={apple:{phone:n(kh)&&!n(Qi),ipod:n(Yf),tablet:!n(kh)&&(n(jf)||np(t))&&!n(Qi),universal:n(Jf),device:(n(kh)||n(Yf)||n(jf)||n(Jf)||np(t))&&!n(Qi)},amazon:{phone:n(zn),tablet:!n(zn)&&n(da),device:n(zn)||n(da)},android:{phone:!n(Qi)&&n(zn)||!n(Qi)&&n(Fh),tablet:!n(Qi)&&!n(zn)&&!n(Fh)&&(n(da)||n($f)),device:!n(Qi)&&(n(zn)||n(da)||n(Fh)||n($f))||n(/\bokhttp\b/i)},windows:{phone:n(Qi),tablet:n(Qf),device:n(Qi)||n(Qf)},other:{blackberry:n(qf),blackberry10:n(tp),opera:n(ep),firefox:n(rp),chrome:n(ip),device:n(qf)||n(tp)||n(ep)||n(rp)||n(ip)},any:!1,phone:!1,tablet:!1};return s.any=s.apple.device||s.android.device||s.windows.device||s.other.device,s.phone=s.apple.phone||s.android.phone||s.windows.phone,s.tablet=s.apple.tablet||s.android.tablet||s.windows.tablet,s}const Ub=sp.default??sp,qi=Ub(globalThis.navigator);nt.RETINA_PREFIX=/@([0-9\.]+)x/,nt.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var we=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Tr(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function Xb(i){if(i.__esModule)return i;var t=i.default;if(typeof t=="function"){var e=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};e.prototype=t.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(i).forEach(function(r){var n=Object.getOwnPropertyDescriptor(i,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:function(){return i[r]}})}),e}var op={exports:{}};(function(i){var t=Object.prototype.hasOwnProperty,e="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(e=!1));function n(l,h,c){this.fn=l,this.context=h,this.once=c||!1}function s(l,h,c,u,d){if(typeof c!="function")throw new TypeError("The listener must be a function");var f=new n(c,u||l,d),p=e?e+h:h;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 o(l,h){--l._eventsCount===0?l._events=new r:delete l._events[h]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var h=[],c,u;if(this._eventsCount===0)return h;for(u in c=this._events)t.call(c,u)&&h.push(e?u.slice(1):u);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(c)):h},a.prototype.listeners=function(h){var c=e?e+h:h,u=this._events[c];if(!u)return[];if(u.fn)return[u.fn];for(var d=0,f=u.length,p=new Array(f);d<f;d++)p[d]=u[d].fn;return p},a.prototype.listenerCount=function(h){var c=e?e+h:h,u=this._events[c];return u?u.fn?1:u.length:0},a.prototype.emit=function(h,c,u,d,f,p){var m=e?e+h:h;if(!this._events[m])return!1;var g=this._events[m],y=arguments.length,x,b;if(g.fn){switch(g.once&&this.removeListener(h,g.fn,void 0,!0),y){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,c),!0;case 3:return g.fn.call(g.context,c,u),!0;case 4:return g.fn.call(g.context,c,u,d),!0;case 5:return g.fn.call(g.context,c,u,d,f),!0;case 6:return g.fn.call(g.context,c,u,d,f,p),!0}for(b=1,x=new Array(y-1);b<y;b++)x[b-1]=arguments[b];g.fn.apply(g.context,x)}else{var v=g.length,w;for(b=0;b<v;b++)switch(g[b].once&&this.removeListener(h,g[b].fn,void 0,!0),y){case 1:g[b].fn.call(g[b].context);break;case 2:g[b].fn.call(g[b].context,c);break;case 3:g[b].fn.call(g[b].context,c,u);break;case 4:g[b].fn.call(g[b].context,c,u,d);break;default:if(!x)for(w=1,x=new Array(y-1);w<y;w++)x[w-1]=arguments[w];g[b].fn.apply(g[b].context,x)}}return!0},a.prototype.on=function(h,c,u){return s(this,h,c,u,!1)},a.prototype.once=function(h,c,u){return s(this,h,c,u,!0)},a.prototype.removeListener=function(h,c,u,d){var f=e?e+h:h;if(!this._events[f])return this;if(!c)return o(this,f),this;var p=this._events[f];if(p.fn)p.fn===c&&(!d||p.once)&&(!u||p.context===u)&&o(this,f);else{for(var m=0,g=[],y=p.length;m<y;m++)(p[m].fn!==c||d&&!p[m].once||u&&p[m].context!==u)&&g.push(p[m]);g.length?this._events[f]=g.length===1?g[0]:g:o(this,f)}return this},a.prototype.removeAllListeners=function(h){var c;return h?(c=e?e+h:h,this._events[c]&&o(this,c)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=e,a.EventEmitter=a,i.exports=a})(op);var Wb=op.exports;const js=Tr(Wb);var Dh={exports:{}};Dh.exports=fa,Dh.exports.default=fa;function fa(i,t,e){e=e||2;var r=t&&t.length,n=r?t[0]*e:i.length,s=ap(i,0,n,e,!0),o=[];if(!s||s.next===s.prev)return o;var a,l,h,c,u,d,f;if(r&&(s=zb(i,t,s,e)),i.length>80*e){a=h=i[0],l=c=i[1];for(var p=e;p<n;p+=e)u=i[p],d=i[p+1],u<a&&(a=u),d<l&&(l=d),u>h&&(h=u),d>c&&(c=d);f=Math.max(h-a,c-l),f=f!==0?32767/f:0}return Js(s,o,e,a,l,f,0),o}function ap(i,t,e,r,n){var s,o;if(n===Bh(i,t,e,r)>0)for(s=t;s<e;s+=r)o=cp(s,i[s],i[s+1],o);else for(s=e-r;s>=t;s-=r)o=cp(s,i[s],i[s+1],o);return o&&pa(o,o.next)&&(Qs(o),o=o.next),o}function rn(i,t){if(!i)return i;t||(t=i);var e=i,r;do if(r=!1,!e.steiner&&(pa(e,e.next)||Wt(e.prev,e,e.next)===0)){if(Qs(e),e=t=e.prev,e===e.next)break;r=!0}else e=e.next;while(r||e!==t);return t}function Js(i,t,e,r,n,s,o){if(i){!o&&s&&Qb(i,r,n,s);for(var a=i,l,h;i.prev!==i.next;){if(l=i.prev,h=i.next,s?Vb(i,r,n,s):Zb(i)){t.push(l.i/e|0),t.push(i.i/e|0),t.push(h.i/e|0),Qs(i),i=h.next,a=h.next;continue}if(i=h,i===a){o?o===1?(i=Hb(rn(i),t,e),Js(i,t,e,r,n,s,2)):o===2&&Kb(i,t,e,r,n,s):Js(rn(i),t,e,r,n,s,1);break}}}}function Zb(i){var t=i.prev,e=i,r=i.next;if(Wt(t,e,r)>=0)return!1;for(var n=t.x,s=e.x,o=r.x,a=t.y,l=e.y,h=r.y,c=n<s?n<o?n:o:s<o?s:o,u=a<l?a<h?a:h:l<h?l:h,d=n>s?n>o?n:o:s>o?s:o,f=a>l?a>h?a:h:l>h?l:h,p=r.next;p!==t;){if(p.x>=c&&p.x<=d&&p.y>=u&&p.y<=f&&Yn(n,a,s,l,o,h,p.x,p.y)&&Wt(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function Vb(i,t,e,r){var n=i.prev,s=i,o=i.next;if(Wt(n,s,o)>=0)return!1;for(var a=n.x,l=s.x,h=o.x,c=n.y,u=s.y,d=o.y,f=a<l?a<h?a:h:l<h?l:h,p=c<u?c<d?c:d:u<d?u:d,m=a>l?a>h?a:h:l>h?l:h,g=c>u?c>d?c:d:u>d?u:d,y=Nh(f,p,t,e,r),x=Nh(m,g,t,e,r),b=i.prevZ,v=i.nextZ;b&&b.z>=y&&v&&v.z<=x;){if(b.x>=f&&b.x<=m&&b.y>=p&&b.y<=g&&b!==n&&b!==o&&Yn(a,c,l,u,h,d,b.x,b.y)&&Wt(b.prev,b,b.next)>=0||(b=b.prevZ,v.x>=f&&v.x<=m&&v.y>=p&&v.y<=g&&v!==n&&v!==o&&Yn(a,c,l,u,h,d,v.x,v.y)&&Wt(v.prev,v,v.next)>=0))return!1;v=v.nextZ}for(;b&&b.z>=y;){if(b.x>=f&&b.x<=m&&b.y>=p&&b.y<=g&&b!==n&&b!==o&&Yn(a,c,l,u,h,d,b.x,b.y)&&Wt(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;v&&v.z<=x;){if(v.x>=f&&v.x<=m&&v.y>=p&&v.y<=g&&v!==n&&v!==o&&Yn(a,c,l,u,h,d,v.x,v.y)&&Wt(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function Hb(i,t,e){var r=i;do{var n=r.prev,s=r.next.next;!pa(n,s)&&lp(n,r,r.next,s)&&$s(n,s)&&$s(s,n)&&(t.push(n.i/e|0),t.push(r.i/e|0),t.push(s.i/e|0),Qs(r),Qs(r.next),r=i=s),r=r.next}while(r!==i);return rn(r)}function Kb(i,t,e,r,n,s){var o=i;do{for(var a=o.next.next;a!==o.prev;){if(o.i!==a.i&&ex(o,a)){var l=hp(o,a);o=rn(o,o.next),l=rn(l,l.next),Js(o,t,e,r,n,s,0),Js(l,t,e,r,n,s,0);return}a=a.next}o=o.next}while(o!==i)}function zb(i,t,e,r){var n=[],s,o,a,l,h;for(s=0,o=t.length;s<o;s++)a=t[s]*r,l=s<o-1?t[s+1]*r:i.length,h=ap(i,a,l,r,!1),h===h.next&&(h.steiner=!0),n.push(tx(h));for(n.sort(Yb),s=0;s<n.length;s++)e=jb(n[s],e);return e}function Yb(i,t){return i.x-t.x}function jb(i,t){var e=Jb(i,t);if(!e)return t;var r=hp(e,i);return rn(r,r.next),rn(e,e.next)}function Jb(i,t){var e=t,r=i.x,n=i.y,s=-1/0,o;do{if(n<=e.y&&n>=e.next.y&&e.next.y!==e.y){var a=e.x+(n-e.y)*(e.next.x-e.x)/(e.next.y-e.y);if(a<=r&&a>s&&(s=a,o=e.x<e.next.x?e:e.next,a===r))return o}e=e.next}while(e!==t);if(!o)return null;var l=o,h=o.x,c=o.y,u=1/0,d;e=o;do r>=e.x&&e.x>=h&&r!==e.x&&Yn(n<c?r:s,n,h,c,n<c?s:r,n,e.x,e.y)&&(d=Math.abs(n-e.y)/(r-e.x),$s(e,i)&&(d<u||d===u&&(e.x>o.x||e.x===o.x&&$b(o,e)))&&(o=e,u=d)),e=e.next;while(e!==l);return o}function $b(i,t){return Wt(i.prev,i,t.prev)<0&&Wt(t.next,i,i.next)<0}function Qb(i,t,e,r){var n=i;do n.z===0&&(n.z=Nh(n.x,n.y,t,e,r)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next;while(n!==i);n.prevZ.nextZ=null,n.prevZ=null,qb(n)}function qb(i){var t,e,r,n,s,o,a,l,h=1;do{for(e=i,i=null,s=null,o=0;e;){for(o++,r=e,a=0,t=0;t<h&&(a++,r=r.nextZ,!!r);t++);for(l=h;a>0||l>0&&r;)a!==0&&(l===0||!r||e.z<=r.z)?(n=e,e=e.nextZ,a--):(n=r,r=r.nextZ,l--),s?s.nextZ=n:i=n,n.prevZ=s,s=n;e=r}s.nextZ=null,h*=2}while(o>1);return i}function Nh(i,t,e,r,n){return i=(i-e)*n|0,t=(t-r)*n|0,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,i|t<<1}function tx(i){var t=i,e=i;do(t.x<e.x||t.x===e.x&&t.y<e.y)&&(e=t),t=t.next;while(t!==i);return e}function Yn(i,t,e,r,n,s,o,a){return(n-o)*(t-a)>=(i-o)*(s-a)&&(i-o)*(r-a)>=(e-o)*(t-a)&&(e-o)*(s-a)>=(n-o)*(r-a)}function ex(i,t){return i.next.i!==t.i&&i.prev.i!==t.i&&!ix(i,t)&&($s(i,t)&&$s(t,i)&&rx(i,t)&&(Wt(i.prev,i,t.prev)||Wt(i,t.prev,t))||pa(i,t)&&Wt(i.prev,i,i.next)>0&&Wt(t.prev,t,t.next)>0)}function Wt(i,t,e){return(t.y-i.y)*(e.x-t.x)-(t.x-i.x)*(e.y-t.y)}function pa(i,t){return i.x===t.x&&i.y===t.y}function lp(i,t,e,r){var n=ga(Wt(i,t,e)),s=ga(Wt(i,t,r)),o=ga(Wt(e,r,i)),a=ga(Wt(e,r,t));return!!(n!==s&&o!==a||n===0&&ma(i,e,t)||s===0&&ma(i,r,t)||o===0&&ma(e,i,r)||a===0&&ma(e,t,r))}function ma(i,t,e){return t.x<=Math.max(i.x,e.x)&&t.x>=Math.min(i.x,e.x)&&t.y<=Math.max(i.y,e.y)&&t.y>=Math.min(i.y,e.y)}function ga(i){return i>0?1:i<0?-1:0}function ix(i,t){var e=i;do{if(e.i!==i.i&&e.next.i!==i.i&&e.i!==t.i&&e.next.i!==t.i&&lp(e,e.next,i,t))return!0;e=e.next}while(e!==i);return!1}function $s(i,t){return Wt(i.prev,i,i.next)<0?Wt(i,t,i.next)>=0&&Wt(i,i.prev,t)>=0:Wt(i,t,i.prev)<0||Wt(i,i.next,t)<0}function rx(i,t){var e=i,r=!1,n=(i.x+t.x)/2,s=(i.y+t.y)/2;do e.y>s!=e.next.y>s&&e.next.y!==e.y&&n<(e.next.x-e.x)*(s-e.y)/(e.next.y-e.y)+e.x&&(r=!r),e=e.next;while(e!==i);return r}function hp(i,t){var e=new Oh(i.i,i.x,i.y),r=new Oh(t.i,t.x,t.y),n=i.next,s=t.prev;return i.next=t,t.prev=i,e.next=n,n.prev=e,r.next=e,e.prev=r,s.next=r,r.prev=s,r}function cp(i,t,e,r){var n=new Oh(i,t,e);return r?(n.next=r.next,n.prev=r,r.next.prev=n,r.next=n):(n.prev=n,n.next=n),n}function Qs(i){i.next.prev=i.prev,i.prev.next=i.next,i.prevZ&&(i.prevZ.nextZ=i.nextZ),i.nextZ&&(i.nextZ.prevZ=i.prevZ)}function Oh(i,t,e){this.i=i,this.x=t,this.y=e,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}fa.deviation=function(i,t,e,r){var n=t&&t.length,s=n?t[0]*e:i.length,o=Math.abs(Bh(i,0,s,e));if(n)for(var a=0,l=t.length;a<l;a++){var h=t[a]*e,c=a<l-1?t[a+1]*e:i.length;o-=Math.abs(Bh(i,h,c,e))}var u=0;for(a=0;a<r.length;a+=3){var d=r[a]*e,f=r[a+1]*e,p=r[a+2]*e;u+=Math.abs((i[d]-i[p])*(i[f+1]-i[d+1])-(i[d]-i[f])*(i[p+1]-i[d+1]))}return o===0&&u===0?0:Math.abs((u-o)/o)};function Bh(i,t,e,r){for(var n=0,s=t,o=e-r;s<e;s+=r)n+=(i[o]-i[s])*(i[s+1]+i[o+1]),o=s;return n}fa.flatten=function(i){for(var t=i[0][0].length,e={vertices:[],holes:[],dimensions:t},r=0,n=0;n<i.length;n++){for(var s=0;s<i[n].length;s++)for(var o=0;o<t;o++)e.vertices.push(i[n][s][o]);n>0&&(r+=i[n-1].length,e.holes.push(r))}return e};var nx=Dh.exports;const sx=Tr(nx);var ya={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */ya.exports,function(i,t){(function(e){var r=t&&!t.nodeType&&t,n=i&&!i.nodeType&&i,s=typeof we=="object"&&we;(s.global===s||s.window===s||s.self===s)&&(e=s);var o,a=2147483647,l=36,h=1,c=26,u=38,d=700,f=72,p=128,m="-",g=/^xn--/,y=/[^\x20-\x7E]/,x=/[\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-h,w=Math.floor,S=String.fromCharCode,E;function I(D){throw new RangeError(b[D])}function A(D,k){for(var V=D.length,et=[];V--;)et[V]=k(D[V]);return et}function L(D,k){var V=D.split("@"),et="";V.length>1&&(et=V[0]+"@",D=V[1]),D=D.replace(x,".");var ft=D.split("."),at=A(ft,k).join(".");return et+at}function G(D){for(var k=[],V=0,et=D.length,ft,at;V<et;)ft=D.charCodeAt(V++),ft>=55296&&ft<=56319&&V<et?(at=D.charCodeAt(V++),(at&64512)==56320?k.push(((ft&1023)<<10)+(at&1023)+65536):(k.push(ft),V--)):k.push(ft);return k}function F(D){return A(D,function(k){var V="";return k>65535&&(k-=65536,V+=S(k>>>10&1023|55296),k=56320|k&1023),V+=S(k),V}).join("")}function M(D){return D-48<10?D-22:D-65<26?D-65:D-97<26?D-97:l}function N(D,k){return D+22+75*(D<26)-((k!=0)<<5)}function W(D,k,V){var et=0;for(D=V?w(D/d):D>>1,D+=w(D/k);D>v*c>>1;et+=l)D=w(D/v);return w(et+(v+1)*D/(D+u))}function K(D){var k=[],V=D.length,et,ft=0,at=p,Tt=f,It,Q,Z,J,$,O,pt,yt,Rt;for(It=D.lastIndexOf(m),It<0&&(It=0),Q=0;Q<It;++Q)D.charCodeAt(Q)>=128&&I("not-basic"),k.push(D.charCodeAt(Q));for(Z=It>0?It+1:0;Z<V;){for(J=ft,$=1,O=l;Z>=V&&I("invalid-input"),pt=M(D.charCodeAt(Z++)),(pt>=l||pt>w((a-ft)/$))&&I("overflow"),ft+=pt*$,yt=O<=Tt?h:O>=Tt+c?c:O-Tt,!(pt<yt);O+=l)Rt=l-yt,$>w(a/Rt)&&I("overflow"),$*=Rt;et=k.length+1,Tt=W(ft-J,et,J==0),w(ft/et)>a-at&&I("overflow"),at+=w(ft/et),ft%=et,k.splice(ft++,0,at)}return F(k)}function H(D){var k,V,et,ft,at,Tt,It,Q,Z,J,$,O=[],pt,yt,Rt,Bt;for(D=G(D),pt=D.length,k=p,V=0,at=f,Tt=0;Tt<pt;++Tt)$=D[Tt],$<128&&O.push(S($));for(et=ft=O.length,ft&&O.push(m);et<pt;){for(It=a,Tt=0;Tt<pt;++Tt)$=D[Tt],$>=k&&$<It&&(It=$);for(yt=et+1,It-k>w((a-V)/yt)&&I("overflow"),V+=(It-k)*yt,k=It,Tt=0;Tt<pt;++Tt)if($=D[Tt],$<k&&++V>a&&I("overflow"),$==k){for(Q=V,Z=l;J=Z<=at?h:Z>=at+c?c:Z-at,!(Q<J);Z+=l)Bt=Q-J,Rt=l-J,O.push(S(N(J+Bt%Rt,0))),Q=w(Bt/Rt);O.push(S(N(Q,0))),at=W(V,yt,et==ft),V=0,++et}++V,++k}return O.join("")}function j(D){return L(D,function(k){return g.test(k)?K(k.slice(4).toLowerCase()):k})}function B(D){return L(D,function(k){return y.test(k)?"xn--"+H(k):k})}if(o={version:"1.4.1",ucs2:{decode:G,encode:F},decode:K,encode:H,toASCII:B,toUnicode:j},r&&n)if(i.exports==r)n.exports=o;else for(E in o)o.hasOwnProperty(E)&&(r[E]=o[E]);else e.punycode=o})(we)}(ya,ya.exports);var ox=ya.exports,ax=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},e=Symbol("test"),r=Object(e);if(typeof e=="string"||Object.prototype.toString.call(e)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var n=42;t[e]=n;for(e in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==e||!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(t,e);if(o.value!==n||o.enumerable!==!0)return!1}return!0},up=typeof Symbol<"u"&&Symbol,lx=ax,hx=function(){return typeof up!="function"||typeof Symbol!="function"||typeof up("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:lx()},dp={foo:{}},cx=Object,ux=function(){return{__proto__:dp}.foo===dp.foo&&!({__proto__:null}instanceof cx)},dx="Function.prototype.bind called on incompatible ",Uh=Array.prototype.slice,fx=Object.prototype.toString,px="[object Function]",mx=function(t){var e=this;if(typeof e!="function"||fx.call(e)!==px)throw new TypeError(dx+e);for(var r=Uh.call(arguments,1),n,s=function(){if(this instanceof n){var c=e.apply(this,r.concat(Uh.call(arguments)));return Object(c)===c?c:this}else return e.apply(t,r.concat(Uh.call(arguments)))},o=Math.max(0,e.length-r.length),a=[],l=0;l<o;l++)a.push("$"+l);if(n=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")(s),e.prototype){var h=function(){};h.prototype=e.prototype,n.prototype=new h,h.prototype=null}return n},gx=mx,Xh=Function.prototype.bind||gx,yx=Xh,bx=yx.call(Function.call,Object.prototype.hasOwnProperty),St,jn=SyntaxError,fp=Function,Jn=TypeError,Wh=function(i){try{return fp('"use strict"; return ('+i+").constructor;")()}catch{}},nn=Object.getOwnPropertyDescriptor;if(nn)try{nn({},"")}catch{nn=null}var Zh=function(){throw new Jn},xx=nn?function(){try{return arguments.callee,Zh}catch{try{return nn(arguments,"callee").get}catch{return Zh}}}():Zh,$n=hx(),_x=ux(),ae=Object.getPrototypeOf||(_x?function(i){return i.__proto__}:null),Qn={},vx=typeof Uint8Array>"u"||!ae?St:ae(Uint8Array),sn={"%AggregateError%":typeof AggregateError>"u"?St:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?St:ArrayBuffer,"%ArrayIteratorPrototype%":$n&&ae?ae([][Symbol.iterator]()):St,"%AsyncFromSyncIteratorPrototype%":St,"%AsyncFunction%":Qn,"%AsyncGenerator%":Qn,"%AsyncGeneratorFunction%":Qn,"%AsyncIteratorPrototype%":Qn,"%Atomics%":typeof Atomics>"u"?St:Atomics,"%BigInt%":typeof BigInt>"u"?St:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?St:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?St:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?St:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?St:Float32Array,"%Float64Array%":typeof Float64Array>"u"?St:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?St:FinalizationRegistry,"%Function%":fp,"%GeneratorFunction%":Qn,"%Int8Array%":typeof Int8Array>"u"?St:Int8Array,"%Int16Array%":typeof Int16Array>"u"?St:Int16Array,"%Int32Array%":typeof Int32Array>"u"?St:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":$n&&ae?ae(ae([][Symbol.iterator]())):St,"%JSON%":typeof JSON=="object"?JSON:St,"%Map%":typeof Map>"u"?St:Map,"%MapIteratorPrototype%":typeof Map>"u"||!$n||!ae?St:ae(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?St:Promise,"%Proxy%":typeof Proxy>"u"?St:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?St:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?St:Set,"%SetIteratorPrototype%":typeof Set>"u"||!$n||!ae?St:ae(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?St:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":$n&&ae?ae(""[Symbol.iterator]()):St,"%Symbol%":$n?Symbol:St,"%SyntaxError%":jn,"%ThrowTypeError%":xx,"%TypedArray%":vx,"%TypeError%":Jn,"%Uint8Array%":typeof Uint8Array>"u"?St:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?St:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?St:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?St:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?St:WeakMap,"%WeakRef%":typeof WeakRef>"u"?St:WeakRef,"%WeakSet%":typeof WeakSet>"u"?St:WeakSet};if(ae)try{null.error}catch(i){var wx=ae(ae(i));sn["%Error.prototype%"]=wx}var Tx=function i(t){var e;if(t==="%AsyncFunction%")e=Wh("async function () {}");else if(t==="%GeneratorFunction%")e=Wh("function* () {}");else if(t==="%AsyncGeneratorFunction%")e=Wh("async function* () {}");else if(t==="%AsyncGenerator%"){var r=i("%AsyncGeneratorFunction%");r&&(e=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var n=i("%AsyncGenerator%");n&&ae&&(e=ae(n.prototype))}return sn[t]=e,e},pp={"%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"]},qs=Xh,ba=bx,Sx=qs.call(Function.call,Array.prototype.concat),Cx=qs.call(Function.apply,Array.prototype.splice),mp=qs.call(Function.call,String.prototype.replace),xa=qs.call(Function.call,String.prototype.slice),Ex=qs.call(Function.call,RegExp.prototype.exec),Ix=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Ax=/\\(\\)?/g,Mx=function(t){var e=xa(t,0,1),r=xa(t,-1);if(e==="%"&&r!=="%")throw new jn("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&e!=="%")throw new jn("invalid intrinsic syntax, expected opening `%`");var n=[];return mp(t,Ix,function(s,o,a,l){n[n.length]=a?mp(l,Ax,"$1"):o||s}),n},Rx=function(t,e){var r=t,n;if(ba(pp,r)&&(n=pp[r],r="%"+n[0]+"%"),ba(sn,r)){var s=sn[r];if(s===Qn&&(s=Tx(r)),typeof s>"u"&&!e)throw new Jn("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:s}}throw new jn("intrinsic "+t+" does not exist!")},Vh=function(t,e){if(typeof t!="string"||t.length===0)throw new Jn("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof e!="boolean")throw new Jn('"allowMissing" argument must be a boolean');if(Ex(/^%?[^%]*%?$/,t)===null)throw new jn("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=Mx(t),n=r.length>0?r[0]:"",s=Rx("%"+n+"%",e),o=s.name,a=s.value,l=!1,h=s.alias;h&&(n=h[0],Cx(r,Sx([0,1],h)));for(var c=1,u=!0;c<r.length;c+=1){var d=r[c],f=xa(d,0,1),p=xa(d,-1);if((f==='"'||f==="'"||f==="`"||p==='"'||p==="'"||p==="`")&&f!==p)throw new jn("property names with quotes must have matching quotes");if((d==="constructor"||!u)&&(l=!0),n+="."+d,o="%"+n+"%",ba(sn,o))a=sn[o];else if(a!=null){if(!(d in a)){if(!e)throw new Jn("base intrinsic for "+t+" exists, but the property is not available.");return}if(nn&&c+1>=r.length){var m=nn(a,d);u=!!m,u&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[d]}else u=ba(a,d),a=a[d];u&&!l&&(sn[o]=a)}}return a},gp={exports:{}};(function(i){var t=Xh,e=Vh,r=e("%Function.prototype.apply%"),n=e("%Function.prototype.call%"),s=e("%Reflect.apply%",!0)||t.call(n,r),o=e("%Object.getOwnPropertyDescriptor%",!0),a=e("%Object.defineProperty%",!0),l=e("%Math.max%");if(a)try{a({},"a",{value:1})}catch{a=null}i.exports=function(u){var d=s(t,n,arguments);if(o&&a){var f=o(d,"length");f.configurable&&a(d,"length",{value:1+l(0,u.length-(arguments.length-1))})}return d};var h=function(){return s(t,r,arguments)};a?a(i.exports,"apply",{value:h}):i.exports.apply=h})(gp);var Px=gp.exports,yp=Vh,bp=Px,Lx=bp(yp("String.prototype.indexOf")),Gx=function(t,e){var r=yp(t,!!e);return typeof r=="function"&&Lx(t,".prototype.")>-1?bp(r):r};const kx=Xb(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Hh=typeof Map=="function"&&Map.prototype,Kh=Object.getOwnPropertyDescriptor&&Hh?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,_a=Hh&&Kh&&typeof Kh.get=="function"?Kh.get:null,xp=Hh&&Map.prototype.forEach,zh=typeof Set=="function"&&Set.prototype,Yh=Object.getOwnPropertyDescriptor&&zh?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,va=zh&&Yh&&typeof Yh.get=="function"?Yh.get:null,_p=zh&&Set.prototype.forEach,Fx=typeof WeakMap=="function"&&WeakMap.prototype,to=Fx?WeakMap.prototype.has:null,Dx=typeof WeakSet=="function"&&WeakSet.prototype,eo=Dx?WeakSet.prototype.has:null,Nx=typeof WeakRef=="function"&&WeakRef.prototype,vp=Nx?WeakRef.prototype.deref:null,Ox=Boolean.prototype.valueOf,Bx=Object.prototype.toString,Ux=Function.prototype.toString,Xx=String.prototype.match,jh=String.prototype.slice,Sr=String.prototype.replace,Wx=String.prototype.toUpperCase,wp=String.prototype.toLowerCase,Tp=RegExp.prototype.test,Sp=Array.prototype.concat,Ei=Array.prototype.join,Zx=Array.prototype.slice,Cp=Math.floor,Jh=typeof BigInt=="function"?BigInt.prototype.valueOf:null,$h=Object.getOwnPropertySymbols,Qh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,qn=typeof Symbol=="function"&&typeof Symbol.iterator=="object",me=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===qn||!0)?Symbol.toStringTag:null,Ep=Object.prototype.propertyIsEnumerable,Ip=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(i){return i.__proto__}:null);function Ap(i,t){if(i===1/0||i===-1/0||i!==i||i&&i>-1e3&&i<1e3||Tp.call(/e/,t))return t;var e=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof i=="number"){var r=i<0?-Cp(-i):Cp(i);if(r!==i){var n=String(r),s=jh.call(t,n.length+1);return Sr.call(n,e,"$&_")+"."+Sr.call(Sr.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Sr.call(t,e,"$&_")}var qh=kx,Mp=qh.custom,Rp=Gp(Mp)?Mp:null,Vx=function i(t,e,r,n){var s=e||{};if(Cr(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Cr(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=Cr(s,"customInspect")?s.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Cr(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Cr(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=s.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Fp(t,s);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?Ap(t,l):l}if(typeof t=="bigint"){var h=String(t)+"n";return a?Ap(t,h):h}var c=typeof s.depth>"u"?5:s.depth;if(typeof r>"u"&&(r=0),r>=c&&c>0&&typeof t=="object")return tc(t)?"[Array]":"[Object]";var u=l_(s,r);if(typeof n>"u")n=[];else if(kp(n,t)>=0)return"[Circular]";function d(M,N,W){if(N&&(n=Zx.call(n),n.push(N)),W){var K={depth:s.depth};return Cr(s,"quoteStyle")&&(K.quoteStyle=s.quoteStyle),i(M,K,r+1,n)}return i(M,s,r+1,n)}if(typeof t=="function"&&!Lp(t)){var f=qx(t),p=wa(t,d);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(p.length>0?" { "+Ei.call(p,", ")+" }":"")}if(Gp(t)){var m=qn?Sr.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Qh.call(t);return typeof t=="object"&&!qn?io(m):m}if(s_(t)){for(var g="<"+wp.call(String(t.nodeName)),y=t.attributes||[],x=0;x<y.length;x++)g+=" "+y[x].name+"="+Pp(Hx(y[x].value),"double",s);return g+=">",t.childNodes&&t.childNodes.length&&(g+="..."),g+="</"+wp.call(String(t.nodeName))+">",g}if(tc(t)){if(t.length===0)return"[]";var b=wa(t,d);return u&&!a_(b)?"["+ic(b,u)+"]":"[ "+Ei.call(b,", ")+" ]"}if(zx(t)){var v=wa(t,d);return!("cause"in Error.prototype)&&"cause"in t&&!Ep.call(t,"cause")?"{ ["+String(t)+"] "+Ei.call(Sp.call("[cause]: "+d(t.cause),v),", ")+" }":v.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Ei.call(v,", ")+" }"}if(typeof t=="object"&&o){if(Rp&&typeof t[Rp]=="function"&&qh)return qh(t,{depth:c-r});if(o!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(t_(t)){var w=[];return xp&&xp.call(t,function(M,N){w.push(d(N,t,!0)+" => "+d(M,t))}),Dp("Map",_a.call(t),w,u)}if(r_(t)){var S=[];return _p&&_p.call(t,function(M){S.push(d(M,t))}),Dp("Set",va.call(t),S,u)}if(e_(t))return ec("WeakMap");if(n_(t))return ec("WeakSet");if(i_(t))return ec("WeakRef");if(jx(t))return io(d(Number(t)));if($x(t))return io(d(Jh.call(t)));if(Jx(t))return io(Ox.call(t));if(Yx(t))return io(d(String(t)));if(!Kx(t)&&!Lp(t)){var E=wa(t,d),I=Ip?Ip(t)===Object.prototype:t instanceof Object||t.constructor===Object,A=t instanceof Object?"":"null prototype",L=!I&&me&&Object(t)===t&&me in t?jh.call(Er(t),8,-1):A?"Object":"",G=I||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",F=G+(L||A?"["+Ei.call(Sp.call([],L||[],A||[]),": ")+"] ":"");return E.length===0?F+"{}":u?F+"{"+ic(E,u)+"}":F+"{ "+Ei.call(E,", ")+" }"}return String(t)};function Pp(i,t,e){var r=(e.quoteStyle||t)==="double"?'"':"'";return r+i+r}function Hx(i){return Sr.call(String(i),/"/g,"&quot;")}function tc(i){return Er(i)==="[object Array]"&&(!me||!(typeof i=="object"&&me in i))}function Kx(i){return Er(i)==="[object Date]"&&(!me||!(typeof i=="object"&&me in i))}function Lp(i){return Er(i)==="[object RegExp]"&&(!me||!(typeof i=="object"&&me in i))}function zx(i){return Er(i)==="[object Error]"&&(!me||!(typeof i=="object"&&me in i))}function Yx(i){return Er(i)==="[object String]"&&(!me||!(typeof i=="object"&&me in i))}function jx(i){return Er(i)==="[object Number]"&&(!me||!(typeof i=="object"&&me in i))}function Jx(i){return Er(i)==="[object Boolean]"&&(!me||!(typeof i=="object"&&me in i))}function Gp(i){if(qn)return i&&typeof i=="object"&&i instanceof Symbol;if(typeof i=="symbol")return!0;if(!i||typeof i!="object"||!Qh)return!1;try{return Qh.call(i),!0}catch{}return!1}function $x(i){if(!i||typeof i!="object"||!Jh)return!1;try{return Jh.call(i),!0}catch{}return!1}var Qx=Object.prototype.hasOwnProperty||function(i){return i in this};function Cr(i,t){return Qx.call(i,t)}function Er(i){return Bx.call(i)}function qx(i){if(i.name)return i.name;var t=Xx.call(Ux.call(i),/^function\s*([\w$]+)/);return t?t[1]:null}function kp(i,t){if(i.indexOf)return i.indexOf(t);for(var e=0,r=i.length;e<r;e++)if(i[e]===t)return e;return-1}function t_(i){if(!_a||!i||typeof i!="object")return!1;try{_a.call(i);try{va.call(i)}catch{return!0}return i instanceof Map}catch{}return!1}function e_(i){if(!to||!i||typeof i!="object")return!1;try{to.call(i,to);try{eo.call(i,eo)}catch{return!0}return i instanceof WeakMap}catch{}return!1}function i_(i){if(!vp||!i||typeof i!="object")return!1;try{return vp.call(i),!0}catch{}return!1}function r_(i){if(!va||!i||typeof i!="object")return!1;try{va.call(i);try{_a.call(i)}catch{return!0}return i instanceof Set}catch{}return!1}function n_(i){if(!eo||!i||typeof i!="object")return!1;try{eo.call(i,eo);try{to.call(i,to)}catch{return!0}return i instanceof WeakSet}catch{}return!1}function s_(i){return!i||typeof i!="object"?!1:typeof HTMLElement<"u"&&i instanceof HTMLElement?!0:typeof i.nodeName=="string"&&typeof i.getAttribute=="function"}function Fp(i,t){if(i.length>t.maxStringLength){var e=i.length-t.maxStringLength,r="... "+e+" more character"+(e>1?"s":"");return Fp(jh.call(i,0,t.maxStringLength),t)+r}var n=Sr.call(Sr.call(i,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,o_);return Pp(n,"single",t)}function o_(i){var t=i.charCodeAt(0),e={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return e?"\\"+e:"\\x"+(t<16?"0":"")+Wx.call(t.toString(16))}function io(i){return"Object("+i+")"}function ec(i){return i+" { ? }"}function Dp(i,t,e,r){var n=r?ic(e,r):Ei.call(e,", ");return i+" ("+t+") {"+n+"}"}function a_(i){for(var t=0;t<i.length;t++)if(kp(i[t],`
1
+ (function(kt,Y){typeof exports=="object"&&typeof module<"u"?Y(exports,require("vue"),require("@prefecthq/vue-compositions"),require("@prefecthq/prefect-design")):typeof define=="function"&&define.amd?define(["exports","vue","@prefecthq/vue-compositions","@prefecthq/prefect-design"],Y):(kt=typeof globalThis<"u"?globalThis:kt||self,Y(kt["prefect-graphs"]={},kt.Vue,kt.vueCompositions,kt.prefectDesign))})(this,function(kt,Y,wr,Ji){"use strict";var AR=Object.defineProperty;var MR=(kt,Y,wr)=>Y in kt?AR(kt,Y,{enumerable:!0,configurable:!0,writable:!0,value:wr}):kt[Y]=wr;var Nf=(kt,Y,wr)=>(MR(kt,typeof Y!="symbol"?Y+"":Y,wr),wr);const Hf="nodes-container",Lb="node-container",Gb="edge-container";function Ph(i){const t=Object.prototype.toString.call(i);return i instanceof Date||typeof i=="object"&&t==="[object Date]"?new i.constructor(+i):typeof i=="number"||t==="[object Number]"||typeof i=="string"||t==="[object String]"?new Date(i):new Date(NaN)}function kb(i,t){return i instanceof Date?new i.constructor(t):new Date(t)}function Fb(i,t){const e=+Ph(i);return kb(i,e+t)}const ua=1e3;function Db(i,t){return Fb(i,t*1e3)}function Nb(i){return t=>{const r=(i?Math[i]:Math.trunc)(t);return r===0?0:r}}function Kf(i,t){return+Ph(i)-+Ph(t)}function Ob(i,t,e){const r=Kf(i,t)/1e3;return Nb(e==null?void 0:e.roundingMethod)(r)}var en=(i=>(i[i.WEBGL_LEGACY=0]="WEBGL_LEGACY",i[i.WEBGL=1]="WEBGL",i[i.WEBGL2=2]="WEBGL2",i))(en||{}),zf=(i=>(i[i.UNKNOWN=0]="UNKNOWN",i[i.WEBGL=1]="WEBGL",i[i.CANVAS=2]="CANVAS",i))(zf||{}),Lh=(i=>(i[i.COLOR=16384]="COLOR",i[i.DEPTH=256]="DEPTH",i[i.STENCIL=1024]="STENCIL",i))(Lh||{}),mt=(i=>(i[i.NORMAL=0]="NORMAL",i[i.ADD=1]="ADD",i[i.MULTIPLY=2]="MULTIPLY",i[i.SCREEN=3]="SCREEN",i[i.OVERLAY=4]="OVERLAY",i[i.DARKEN=5]="DARKEN",i[i.LIGHTEN=6]="LIGHTEN",i[i.COLOR_DODGE=7]="COLOR_DODGE",i[i.COLOR_BURN=8]="COLOR_BURN",i[i.HARD_LIGHT=9]="HARD_LIGHT",i[i.SOFT_LIGHT=10]="SOFT_LIGHT",i[i.DIFFERENCE=11]="DIFFERENCE",i[i.EXCLUSION=12]="EXCLUSION",i[i.HUE=13]="HUE",i[i.SATURATION=14]="SATURATION",i[i.COLOR=15]="COLOR",i[i.LUMINOSITY=16]="LUMINOSITY",i[i.NORMAL_NPM=17]="NORMAL_NPM",i[i.ADD_NPM=18]="ADD_NPM",i[i.SCREEN_NPM=19]="SCREEN_NPM",i[i.NONE=20]="NONE",i[i.SRC_OVER=0]="SRC_OVER",i[i.SRC_IN=21]="SRC_IN",i[i.SRC_OUT=22]="SRC_OUT",i[i.SRC_ATOP=23]="SRC_ATOP",i[i.DST_OVER=24]="DST_OVER",i[i.DST_IN=25]="DST_IN",i[i.DST_OUT=26]="DST_OUT",i[i.DST_ATOP=27]="DST_ATOP",i[i.ERASE=26]="ERASE",i[i.SUBTRACT=28]="SUBTRACT",i[i.XOR=29]="XOR",i))(mt||{}),vi=(i=>(i[i.POINTS=0]="POINTS",i[i.LINES=1]="LINES",i[i.LINE_LOOP=2]="LINE_LOOP",i[i.LINE_STRIP=3]="LINE_STRIP",i[i.TRIANGLES=4]="TRIANGLES",i[i.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",i[i.TRIANGLE_FAN=6]="TRIANGLE_FAN",i))(vi||{}),z=(i=>(i[i.RGBA=6408]="RGBA",i[i.RGB=6407]="RGB",i[i.RG=33319]="RG",i[i.RED=6403]="RED",i[i.RGBA_INTEGER=36249]="RGBA_INTEGER",i[i.RGB_INTEGER=36248]="RGB_INTEGER",i[i.RG_INTEGER=33320]="RG_INTEGER",i[i.RED_INTEGER=36244]="RED_INTEGER",i[i.ALPHA=6406]="ALPHA",i[i.LUMINANCE=6409]="LUMINANCE",i[i.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",i[i.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",i[i.DEPTH_STENCIL=34041]="DEPTH_STENCIL",i))(z||{}),Kn=(i=>(i[i.TEXTURE_2D=3553]="TEXTURE_2D",i[i.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",i[i.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",i[i.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",i[i.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",i[i.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",i[i.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",i[i.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",i[i.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",i))(Kn||{}),ct=(i=>(i[i.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",i[i.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",i[i.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",i[i.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",i[i.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",i[i.UNSIGNED_INT=5125]="UNSIGNED_INT",i[i.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",i[i.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",i[i.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",i[i.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",i[i.BYTE=5120]="BYTE",i[i.SHORT=5122]="SHORT",i[i.INT=5124]="INT",i[i.FLOAT=5126]="FLOAT",i[i.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",i[i.HALF_FLOAT=36193]="HALF_FLOAT",i))(ct||{}),rt=(i=>(i[i.FLOAT=0]="FLOAT",i[i.INT=1]="INT",i[i.UINT=2]="UINT",i))(rt||{}),$i=(i=>(i[i.NEAREST=0]="NEAREST",i[i.LINEAR=1]="LINEAR",i))($i||{}),wi=(i=>(i[i.CLAMP=33071]="CLAMP",i[i.REPEAT=10497]="REPEAT",i[i.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",i))(wi||{}),Ti=(i=>(i[i.OFF=0]="OFF",i[i.POW2=1]="POW2",i[i.ON=2]="ON",i[i.ON_MANUAL=3]="ON_MANUAL",i))(Ti||{}),Ee=(i=>(i[i.NPM=0]="NPM",i[i.UNPACK=1]="UNPACK",i[i.PMA=2]="PMA",i[i.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",i[i.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",i[i.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA",i))(Ee||{}),Si=(i=>(i[i.NO=0]="NO",i[i.YES=1]="YES",i[i.AUTO=2]="AUTO",i[i.BLEND=0]="BLEND",i[i.CLEAR=1]="CLEAR",i[i.BLIT=2]="BLIT",i))(Si||{}),Gh=(i=>(i[i.AUTO=0]="AUTO",i[i.MANUAL=1]="MANUAL",i))(Gh||{}),Ye=(i=>(i.LOW="lowp",i.MEDIUM="mediump",i.HIGH="highp",i))(Ye||{}),re=(i=>(i[i.NONE=0]="NONE",i[i.SCISSOR=1]="SCISSOR",i[i.STENCIL=2]="STENCIL",i[i.SPRITE=3]="SPRITE",i[i.COLOR=4]="COLOR",i))(re||{}),$t=(i=>(i[i.NONE=0]="NONE",i[i.LOW=2]="LOW",i[i.MEDIUM=4]="MEDIUM",i[i.HIGH=8]="HIGH",i))($t||{}),Ci=(i=>(i[i.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",i[i.ARRAY_BUFFER=34962]="ARRAY_BUFFER",i[i.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",i))(Ci||{});const nt={ADAPTER:{createCanvas:(i,t)=>{const e=document.createElement("canvas");return e.width=i,e.height=t,e},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(i,t)=>fetch(i,t),parseXML:i=>new DOMParser().parseFromString(i,"text/xml")},RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var kh=/iPhone/i,Yf=/iPod/i,jf=/iPad/i,Jf=/\biOS-universal(?:.+)Mac\b/i,Fh=/\bAndroid(?:.+)Mobile\b/i,$f=/Android/i,zn=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,da=/Silk/i,Qi=/Windows Phone/i,Qf=/\bWindows(?:.+)ARM\b/i,qf=/BlackBerry/i,tp=/BB10/i,ep=/Opera Mini/i,ip=/\b(CriOS|Chrome)(?:.+)Mobile/i,rp=/Mobile(?:.+)Firefox\b/i,np=function(i){return typeof i<"u"&&i.platform==="MacIntel"&&typeof i.maxTouchPoints=="number"&&i.maxTouchPoints>1&&typeof MSStream>"u"};function Bb(i){return function(t){return t.test(i)}}function sp(i){var t={userAgent:"",platform:"",maxTouchPoints:0};!i&&typeof navigator<"u"?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof i=="string"?t.userAgent=i:i&&i.userAgent&&(t={userAgent:i.userAgent,platform:i.platform,maxTouchPoints:i.maxTouchPoints||0});var e=t.userAgent,r=e.split("[FBAN");typeof r[1]<"u"&&(e=r[0]),r=e.split("Twitter"),typeof r[1]<"u"&&(e=r[0]);var n=Bb(e),s={apple:{phone:n(kh)&&!n(Qi),ipod:n(Yf),tablet:!n(kh)&&(n(jf)||np(t))&&!n(Qi),universal:n(Jf),device:(n(kh)||n(Yf)||n(jf)||n(Jf)||np(t))&&!n(Qi)},amazon:{phone:n(zn),tablet:!n(zn)&&n(da),device:n(zn)||n(da)},android:{phone:!n(Qi)&&n(zn)||!n(Qi)&&n(Fh),tablet:!n(Qi)&&!n(zn)&&!n(Fh)&&(n(da)||n($f)),device:!n(Qi)&&(n(zn)||n(da)||n(Fh)||n($f))||n(/\bokhttp\b/i)},windows:{phone:n(Qi),tablet:n(Qf),device:n(Qi)||n(Qf)},other:{blackberry:n(qf),blackberry10:n(tp),opera:n(ep),firefox:n(rp),chrome:n(ip),device:n(qf)||n(tp)||n(ep)||n(rp)||n(ip)},any:!1,phone:!1,tablet:!1};return s.any=s.apple.device||s.android.device||s.windows.device||s.other.device,s.phone=s.apple.phone||s.android.phone||s.windows.phone,s.tablet=s.apple.tablet||s.android.tablet||s.windows.tablet,s}const Ub=sp.default??sp,qi=Ub(globalThis.navigator);nt.RETINA_PREFIX=/@([0-9\.]+)x/,nt.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var we=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Tr(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function Xb(i){if(i.__esModule)return i;var t=i.default;if(typeof t=="function"){var e=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};e.prototype=t.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(i).forEach(function(r){var n=Object.getOwnPropertyDescriptor(i,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:function(){return i[r]}})}),e}var op={exports:{}};(function(i){var t=Object.prototype.hasOwnProperty,e="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(e=!1));function n(l,h,c){this.fn=l,this.context=h,this.once=c||!1}function s(l,h,c,u,d){if(typeof c!="function")throw new TypeError("The listener must be a function");var f=new n(c,u||l,d),p=e?e+h:h;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 o(l,h){--l._eventsCount===0?l._events=new r:delete l._events[h]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var h=[],c,u;if(this._eventsCount===0)return h;for(u in c=this._events)t.call(c,u)&&h.push(e?u.slice(1):u);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(c)):h},a.prototype.listeners=function(h){var c=e?e+h:h,u=this._events[c];if(!u)return[];if(u.fn)return[u.fn];for(var d=0,f=u.length,p=new Array(f);d<f;d++)p[d]=u[d].fn;return p},a.prototype.listenerCount=function(h){var c=e?e+h:h,u=this._events[c];return u?u.fn?1:u.length:0},a.prototype.emit=function(h,c,u,d,f,p){var m=e?e+h:h;if(!this._events[m])return!1;var g=this._events[m],y=arguments.length,x,b;if(g.fn){switch(g.once&&this.removeListener(h,g.fn,void 0,!0),y){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,c),!0;case 3:return g.fn.call(g.context,c,u),!0;case 4:return g.fn.call(g.context,c,u,d),!0;case 5:return g.fn.call(g.context,c,u,d,f),!0;case 6:return g.fn.call(g.context,c,u,d,f,p),!0}for(b=1,x=new Array(y-1);b<y;b++)x[b-1]=arguments[b];g.fn.apply(g.context,x)}else{var v=g.length,w;for(b=0;b<v;b++)switch(g[b].once&&this.removeListener(h,g[b].fn,void 0,!0),y){case 1:g[b].fn.call(g[b].context);break;case 2:g[b].fn.call(g[b].context,c);break;case 3:g[b].fn.call(g[b].context,c,u);break;case 4:g[b].fn.call(g[b].context,c,u,d);break;default:if(!x)for(w=1,x=new Array(y-1);w<y;w++)x[w-1]=arguments[w];g[b].fn.apply(g[b].context,x)}}return!0},a.prototype.on=function(h,c,u){return s(this,h,c,u,!1)},a.prototype.once=function(h,c,u){return s(this,h,c,u,!0)},a.prototype.removeListener=function(h,c,u,d){var f=e?e+h:h;if(!this._events[f])return this;if(!c)return o(this,f),this;var p=this._events[f];if(p.fn)p.fn===c&&(!d||p.once)&&(!u||p.context===u)&&o(this,f);else{for(var m=0,g=[],y=p.length;m<y;m++)(p[m].fn!==c||d&&!p[m].once||u&&p[m].context!==u)&&g.push(p[m]);g.length?this._events[f]=g.length===1?g[0]:g:o(this,f)}return this},a.prototype.removeAllListeners=function(h){var c;return h?(c=e?e+h:h,this._events[c]&&o(this,c)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=e,a.EventEmitter=a,i.exports=a})(op);var Wb=op.exports;const js=Tr(Wb);var Dh={exports:{}};Dh.exports=fa,Dh.exports.default=fa;function fa(i,t,e){e=e||2;var r=t&&t.length,n=r?t[0]*e:i.length,s=ap(i,0,n,e,!0),o=[];if(!s||s.next===s.prev)return o;var a,l,h,c,u,d,f;if(r&&(s=zb(i,t,s,e)),i.length>80*e){a=h=i[0],l=c=i[1];for(var p=e;p<n;p+=e)u=i[p],d=i[p+1],u<a&&(a=u),d<l&&(l=d),u>h&&(h=u),d>c&&(c=d);f=Math.max(h-a,c-l),f=f!==0?32767/f:0}return Js(s,o,e,a,l,f,0),o}function ap(i,t,e,r,n){var s,o;if(n===Bh(i,t,e,r)>0)for(s=t;s<e;s+=r)o=cp(s,i[s],i[s+1],o);else for(s=e-r;s>=t;s-=r)o=cp(s,i[s],i[s+1],o);return o&&pa(o,o.next)&&(Qs(o),o=o.next),o}function rn(i,t){if(!i)return i;t||(t=i);var e=i,r;do if(r=!1,!e.steiner&&(pa(e,e.next)||Wt(e.prev,e,e.next)===0)){if(Qs(e),e=t=e.prev,e===e.next)break;r=!0}else e=e.next;while(r||e!==t);return t}function Js(i,t,e,r,n,s,o){if(i){!o&&s&&Qb(i,r,n,s);for(var a=i,l,h;i.prev!==i.next;){if(l=i.prev,h=i.next,s?Vb(i,r,n,s):Zb(i)){t.push(l.i/e|0),t.push(i.i/e|0),t.push(h.i/e|0),Qs(i),i=h.next,a=h.next;continue}if(i=h,i===a){o?o===1?(i=Hb(rn(i),t,e),Js(i,t,e,r,n,s,2)):o===2&&Kb(i,t,e,r,n,s):Js(rn(i),t,e,r,n,s,1);break}}}}function Zb(i){var t=i.prev,e=i,r=i.next;if(Wt(t,e,r)>=0)return!1;for(var n=t.x,s=e.x,o=r.x,a=t.y,l=e.y,h=r.y,c=n<s?n<o?n:o:s<o?s:o,u=a<l?a<h?a:h:l<h?l:h,d=n>s?n>o?n:o:s>o?s:o,f=a>l?a>h?a:h:l>h?l:h,p=r.next;p!==t;){if(p.x>=c&&p.x<=d&&p.y>=u&&p.y<=f&&Yn(n,a,s,l,o,h,p.x,p.y)&&Wt(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function Vb(i,t,e,r){var n=i.prev,s=i,o=i.next;if(Wt(n,s,o)>=0)return!1;for(var a=n.x,l=s.x,h=o.x,c=n.y,u=s.y,d=o.y,f=a<l?a<h?a:h:l<h?l:h,p=c<u?c<d?c:d:u<d?u:d,m=a>l?a>h?a:h:l>h?l:h,g=c>u?c>d?c:d:u>d?u:d,y=Nh(f,p,t,e,r),x=Nh(m,g,t,e,r),b=i.prevZ,v=i.nextZ;b&&b.z>=y&&v&&v.z<=x;){if(b.x>=f&&b.x<=m&&b.y>=p&&b.y<=g&&b!==n&&b!==o&&Yn(a,c,l,u,h,d,b.x,b.y)&&Wt(b.prev,b,b.next)>=0||(b=b.prevZ,v.x>=f&&v.x<=m&&v.y>=p&&v.y<=g&&v!==n&&v!==o&&Yn(a,c,l,u,h,d,v.x,v.y)&&Wt(v.prev,v,v.next)>=0))return!1;v=v.nextZ}for(;b&&b.z>=y;){if(b.x>=f&&b.x<=m&&b.y>=p&&b.y<=g&&b!==n&&b!==o&&Yn(a,c,l,u,h,d,b.x,b.y)&&Wt(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;v&&v.z<=x;){if(v.x>=f&&v.x<=m&&v.y>=p&&v.y<=g&&v!==n&&v!==o&&Yn(a,c,l,u,h,d,v.x,v.y)&&Wt(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function Hb(i,t,e){var r=i;do{var n=r.prev,s=r.next.next;!pa(n,s)&&lp(n,r,r.next,s)&&$s(n,s)&&$s(s,n)&&(t.push(n.i/e|0),t.push(r.i/e|0),t.push(s.i/e|0),Qs(r),Qs(r.next),r=i=s),r=r.next}while(r!==i);return rn(r)}function Kb(i,t,e,r,n,s){var o=i;do{for(var a=o.next.next;a!==o.prev;){if(o.i!==a.i&&ex(o,a)){var l=hp(o,a);o=rn(o,o.next),l=rn(l,l.next),Js(o,t,e,r,n,s,0),Js(l,t,e,r,n,s,0);return}a=a.next}o=o.next}while(o!==i)}function zb(i,t,e,r){var n=[],s,o,a,l,h;for(s=0,o=t.length;s<o;s++)a=t[s]*r,l=s<o-1?t[s+1]*r:i.length,h=ap(i,a,l,r,!1),h===h.next&&(h.steiner=!0),n.push(tx(h));for(n.sort(Yb),s=0;s<n.length;s++)e=jb(n[s],e);return e}function Yb(i,t){return i.x-t.x}function jb(i,t){var e=Jb(i,t);if(!e)return t;var r=hp(e,i);return rn(r,r.next),rn(e,e.next)}function Jb(i,t){var e=t,r=i.x,n=i.y,s=-1/0,o;do{if(n<=e.y&&n>=e.next.y&&e.next.y!==e.y){var a=e.x+(n-e.y)*(e.next.x-e.x)/(e.next.y-e.y);if(a<=r&&a>s&&(s=a,o=e.x<e.next.x?e:e.next,a===r))return o}e=e.next}while(e!==t);if(!o)return null;var l=o,h=o.x,c=o.y,u=1/0,d;e=o;do r>=e.x&&e.x>=h&&r!==e.x&&Yn(n<c?r:s,n,h,c,n<c?s:r,n,e.x,e.y)&&(d=Math.abs(n-e.y)/(r-e.x),$s(e,i)&&(d<u||d===u&&(e.x>o.x||e.x===o.x&&$b(o,e)))&&(o=e,u=d)),e=e.next;while(e!==l);return o}function $b(i,t){return Wt(i.prev,i,t.prev)<0&&Wt(t.next,i,i.next)<0}function Qb(i,t,e,r){var n=i;do n.z===0&&(n.z=Nh(n.x,n.y,t,e,r)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next;while(n!==i);n.prevZ.nextZ=null,n.prevZ=null,qb(n)}function qb(i){var t,e,r,n,s,o,a,l,h=1;do{for(e=i,i=null,s=null,o=0;e;){for(o++,r=e,a=0,t=0;t<h&&(a++,r=r.nextZ,!!r);t++);for(l=h;a>0||l>0&&r;)a!==0&&(l===0||!r||e.z<=r.z)?(n=e,e=e.nextZ,a--):(n=r,r=r.nextZ,l--),s?s.nextZ=n:i=n,n.prevZ=s,s=n;e=r}s.nextZ=null,h*=2}while(o>1);return i}function Nh(i,t,e,r,n){return i=(i-e)*n|0,t=(t-r)*n|0,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,i|t<<1}function tx(i){var t=i,e=i;do(t.x<e.x||t.x===e.x&&t.y<e.y)&&(e=t),t=t.next;while(t!==i);return e}function Yn(i,t,e,r,n,s,o,a){return(n-o)*(t-a)>=(i-o)*(s-a)&&(i-o)*(r-a)>=(e-o)*(t-a)&&(e-o)*(s-a)>=(n-o)*(r-a)}function ex(i,t){return i.next.i!==t.i&&i.prev.i!==t.i&&!ix(i,t)&&($s(i,t)&&$s(t,i)&&rx(i,t)&&(Wt(i.prev,i,t.prev)||Wt(i,t.prev,t))||pa(i,t)&&Wt(i.prev,i,i.next)>0&&Wt(t.prev,t,t.next)>0)}function Wt(i,t,e){return(t.y-i.y)*(e.x-t.x)-(t.x-i.x)*(e.y-t.y)}function pa(i,t){return i.x===t.x&&i.y===t.y}function lp(i,t,e,r){var n=ga(Wt(i,t,e)),s=ga(Wt(i,t,r)),o=ga(Wt(e,r,i)),a=ga(Wt(e,r,t));return!!(n!==s&&o!==a||n===0&&ma(i,e,t)||s===0&&ma(i,r,t)||o===0&&ma(e,i,r)||a===0&&ma(e,t,r))}function ma(i,t,e){return t.x<=Math.max(i.x,e.x)&&t.x>=Math.min(i.x,e.x)&&t.y<=Math.max(i.y,e.y)&&t.y>=Math.min(i.y,e.y)}function ga(i){return i>0?1:i<0?-1:0}function ix(i,t){var e=i;do{if(e.i!==i.i&&e.next.i!==i.i&&e.i!==t.i&&e.next.i!==t.i&&lp(e,e.next,i,t))return!0;e=e.next}while(e!==i);return!1}function $s(i,t){return Wt(i.prev,i,i.next)<0?Wt(i,t,i.next)>=0&&Wt(i,i.prev,t)>=0:Wt(i,t,i.prev)<0||Wt(i,i.next,t)<0}function rx(i,t){var e=i,r=!1,n=(i.x+t.x)/2,s=(i.y+t.y)/2;do e.y>s!=e.next.y>s&&e.next.y!==e.y&&n<(e.next.x-e.x)*(s-e.y)/(e.next.y-e.y)+e.x&&(r=!r),e=e.next;while(e!==i);return r}function hp(i,t){var e=new Oh(i.i,i.x,i.y),r=new Oh(t.i,t.x,t.y),n=i.next,s=t.prev;return i.next=t,t.prev=i,e.next=n,n.prev=e,r.next=e,e.prev=r,s.next=r,r.prev=s,r}function cp(i,t,e,r){var n=new Oh(i,t,e);return r?(n.next=r.next,n.prev=r,r.next.prev=n,r.next=n):(n.prev=n,n.next=n),n}function Qs(i){i.next.prev=i.prev,i.prev.next=i.next,i.prevZ&&(i.prevZ.nextZ=i.nextZ),i.nextZ&&(i.nextZ.prevZ=i.prevZ)}function Oh(i,t,e){this.i=i,this.x=t,this.y=e,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}fa.deviation=function(i,t,e,r){var n=t&&t.length,s=n?t[0]*e:i.length,o=Math.abs(Bh(i,0,s,e));if(n)for(var a=0,l=t.length;a<l;a++){var h=t[a]*e,c=a<l-1?t[a+1]*e:i.length;o-=Math.abs(Bh(i,h,c,e))}var u=0;for(a=0;a<r.length;a+=3){var d=r[a]*e,f=r[a+1]*e,p=r[a+2]*e;u+=Math.abs((i[d]-i[p])*(i[f+1]-i[d+1])-(i[d]-i[f])*(i[p+1]-i[d+1]))}return o===0&&u===0?0:Math.abs((u-o)/o)};function Bh(i,t,e,r){for(var n=0,s=t,o=e-r;s<e;s+=r)n+=(i[o]-i[s])*(i[s+1]+i[o+1]),o=s;return n}fa.flatten=function(i){for(var t=i[0][0].length,e={vertices:[],holes:[],dimensions:t},r=0,n=0;n<i.length;n++){for(var s=0;s<i[n].length;s++)for(var o=0;o<t;o++)e.vertices.push(i[n][s][o]);n>0&&(r+=i[n-1].length,e.holes.push(r))}return e};var nx=Dh.exports;const sx=Tr(nx);var ya={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */ya.exports,function(i,t){(function(e){var r=t&&!t.nodeType&&t,n=i&&!i.nodeType&&i,s=typeof we=="object"&&we;(s.global===s||s.window===s||s.self===s)&&(e=s);var o,a=2147483647,l=36,h=1,c=26,u=38,d=700,f=72,p=128,m="-",g=/^xn--/,y=/[^\x20-\x7E]/,x=/[\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-h,w=Math.floor,S=String.fromCharCode,E;function I(D){throw new RangeError(b[D])}function A(D,k){for(var V=D.length,et=[];V--;)et[V]=k(D[V]);return et}function L(D,k){var V=D.split("@"),et="";V.length>1&&(et=V[0]+"@",D=V[1]),D=D.replace(x,".");var ft=D.split("."),at=A(ft,k).join(".");return et+at}function G(D){for(var k=[],V=0,et=D.length,ft,at;V<et;)ft=D.charCodeAt(V++),ft>=55296&&ft<=56319&&V<et?(at=D.charCodeAt(V++),(at&64512)==56320?k.push(((ft&1023)<<10)+(at&1023)+65536):(k.push(ft),V--)):k.push(ft);return k}function F(D){return A(D,function(k){var V="";return k>65535&&(k-=65536,V+=S(k>>>10&1023|55296),k=56320|k&1023),V+=S(k),V}).join("")}function M(D){return D-48<10?D-22:D-65<26?D-65:D-97<26?D-97:l}function N(D,k){return D+22+75*(D<26)-((k!=0)<<5)}function W(D,k,V){var et=0;for(D=V?w(D/d):D>>1,D+=w(D/k);D>v*c>>1;et+=l)D=w(D/v);return w(et+(v+1)*D/(D+u))}function K(D){var k=[],V=D.length,et,ft=0,at=p,Tt=f,It,Q,Z,J,$,O,pt,yt,Rt;for(It=D.lastIndexOf(m),It<0&&(It=0),Q=0;Q<It;++Q)D.charCodeAt(Q)>=128&&I("not-basic"),k.push(D.charCodeAt(Q));for(Z=It>0?It+1:0;Z<V;){for(J=ft,$=1,O=l;Z>=V&&I("invalid-input"),pt=M(D.charCodeAt(Z++)),(pt>=l||pt>w((a-ft)/$))&&I("overflow"),ft+=pt*$,yt=O<=Tt?h:O>=Tt+c?c:O-Tt,!(pt<yt);O+=l)Rt=l-yt,$>w(a/Rt)&&I("overflow"),$*=Rt;et=k.length+1,Tt=W(ft-J,et,J==0),w(ft/et)>a-at&&I("overflow"),at+=w(ft/et),ft%=et,k.splice(ft++,0,at)}return F(k)}function H(D){var k,V,et,ft,at,Tt,It,Q,Z,J,$,O=[],pt,yt,Rt,Bt;for(D=G(D),pt=D.length,k=p,V=0,at=f,Tt=0;Tt<pt;++Tt)$=D[Tt],$<128&&O.push(S($));for(et=ft=O.length,ft&&O.push(m);et<pt;){for(It=a,Tt=0;Tt<pt;++Tt)$=D[Tt],$>=k&&$<It&&(It=$);for(yt=et+1,It-k>w((a-V)/yt)&&I("overflow"),V+=(It-k)*yt,k=It,Tt=0;Tt<pt;++Tt)if($=D[Tt],$<k&&++V>a&&I("overflow"),$==k){for(Q=V,Z=l;J=Z<=at?h:Z>=at+c?c:Z-at,!(Q<J);Z+=l)Bt=Q-J,Rt=l-J,O.push(S(N(J+Bt%Rt,0))),Q=w(Bt/Rt);O.push(S(N(Q,0))),at=W(V,yt,et==ft),V=0,++et}++V,++k}return O.join("")}function j(D){return L(D,function(k){return g.test(k)?K(k.slice(4).toLowerCase()):k})}function B(D){return L(D,function(k){return y.test(k)?"xn--"+H(k):k})}if(o={version:"1.4.1",ucs2:{decode:G,encode:F},decode:K,encode:H,toASCII:B,toUnicode:j},r&&n)if(i.exports==r)n.exports=o;else for(E in o)o.hasOwnProperty(E)&&(r[E]=o[E]);else e.punycode=o})(we)}(ya,ya.exports);var ox=ya.exports,ax=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},e=Symbol("test"),r=Object(e);if(typeof e=="string"||Object.prototype.toString.call(e)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var n=42;t[e]=n;for(e in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==e||!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(t,e);if(o.value!==n||o.enumerable!==!0)return!1}return!0},up=typeof Symbol<"u"&&Symbol,lx=ax,hx=function(){return typeof up!="function"||typeof Symbol!="function"||typeof up("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:lx()},dp={foo:{}},cx=Object,ux=function(){return{__proto__:dp}.foo===dp.foo&&!({__proto__:null}instanceof cx)},dx="Function.prototype.bind called on incompatible ",Uh=Array.prototype.slice,fx=Object.prototype.toString,px="[object Function]",mx=function(t){var e=this;if(typeof e!="function"||fx.call(e)!==px)throw new TypeError(dx+e);for(var r=Uh.call(arguments,1),n,s=function(){if(this instanceof n){var c=e.apply(this,r.concat(Uh.call(arguments)));return Object(c)===c?c:this}else return e.apply(t,r.concat(Uh.call(arguments)))},o=Math.max(0,e.length-r.length),a=[],l=0;l<o;l++)a.push("$"+l);if(n=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")(s),e.prototype){var h=function(){};h.prototype=e.prototype,n.prototype=new h,h.prototype=null}return n},gx=mx,Xh=Function.prototype.bind||gx,yx=Xh,bx=yx.call(Function.call,Object.prototype.hasOwnProperty),St,jn=SyntaxError,fp=Function,Jn=TypeError,Wh=function(i){try{return fp('"use strict"; return ('+i+").constructor;")()}catch{}},nn=Object.getOwnPropertyDescriptor;if(nn)try{nn({},"")}catch{nn=null}var Zh=function(){throw new Jn},xx=nn?function(){try{return arguments.callee,Zh}catch{try{return nn(arguments,"callee").get}catch{return Zh}}}():Zh,$n=hx(),_x=ux(),ae=Object.getPrototypeOf||(_x?function(i){return i.__proto__}:null),Qn={},vx=typeof Uint8Array>"u"||!ae?St:ae(Uint8Array),sn={"%AggregateError%":typeof AggregateError>"u"?St:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?St:ArrayBuffer,"%ArrayIteratorPrototype%":$n&&ae?ae([][Symbol.iterator]()):St,"%AsyncFromSyncIteratorPrototype%":St,"%AsyncFunction%":Qn,"%AsyncGenerator%":Qn,"%AsyncGeneratorFunction%":Qn,"%AsyncIteratorPrototype%":Qn,"%Atomics%":typeof Atomics>"u"?St:Atomics,"%BigInt%":typeof BigInt>"u"?St:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?St:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?St:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?St:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?St:Float32Array,"%Float64Array%":typeof Float64Array>"u"?St:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?St:FinalizationRegistry,"%Function%":fp,"%GeneratorFunction%":Qn,"%Int8Array%":typeof Int8Array>"u"?St:Int8Array,"%Int16Array%":typeof Int16Array>"u"?St:Int16Array,"%Int32Array%":typeof Int32Array>"u"?St:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":$n&&ae?ae(ae([][Symbol.iterator]())):St,"%JSON%":typeof JSON=="object"?JSON:St,"%Map%":typeof Map>"u"?St:Map,"%MapIteratorPrototype%":typeof Map>"u"||!$n||!ae?St:ae(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?St:Promise,"%Proxy%":typeof Proxy>"u"?St:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?St:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?St:Set,"%SetIteratorPrototype%":typeof Set>"u"||!$n||!ae?St:ae(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?St:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":$n&&ae?ae(""[Symbol.iterator]()):St,"%Symbol%":$n?Symbol:St,"%SyntaxError%":jn,"%ThrowTypeError%":xx,"%TypedArray%":vx,"%TypeError%":Jn,"%Uint8Array%":typeof Uint8Array>"u"?St:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?St:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?St:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?St:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?St:WeakMap,"%WeakRef%":typeof WeakRef>"u"?St:WeakRef,"%WeakSet%":typeof WeakSet>"u"?St:WeakSet};if(ae)try{null.error}catch(i){var wx=ae(ae(i));sn["%Error.prototype%"]=wx}var Tx=function i(t){var e;if(t==="%AsyncFunction%")e=Wh("async function () {}");else if(t==="%GeneratorFunction%")e=Wh("function* () {}");else if(t==="%AsyncGeneratorFunction%")e=Wh("async function* () {}");else if(t==="%AsyncGenerator%"){var r=i("%AsyncGeneratorFunction%");r&&(e=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var n=i("%AsyncGenerator%");n&&ae&&(e=ae(n.prototype))}return sn[t]=e,e},pp={"%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"]},qs=Xh,ba=bx,Sx=qs.call(Function.call,Array.prototype.concat),Cx=qs.call(Function.apply,Array.prototype.splice),mp=qs.call(Function.call,String.prototype.replace),xa=qs.call(Function.call,String.prototype.slice),Ex=qs.call(Function.call,RegExp.prototype.exec),Ix=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Ax=/\\(\\)?/g,Mx=function(t){var e=xa(t,0,1),r=xa(t,-1);if(e==="%"&&r!=="%")throw new jn("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&e!=="%")throw new jn("invalid intrinsic syntax, expected opening `%`");var n=[];return mp(t,Ix,function(s,o,a,l){n[n.length]=a?mp(l,Ax,"$1"):o||s}),n},Rx=function(t,e){var r=t,n;if(ba(pp,r)&&(n=pp[r],r="%"+n[0]+"%"),ba(sn,r)){var s=sn[r];if(s===Qn&&(s=Tx(r)),typeof s>"u"&&!e)throw new Jn("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:s}}throw new jn("intrinsic "+t+" does not exist!")},Vh=function(t,e){if(typeof t!="string"||t.length===0)throw new Jn("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof e!="boolean")throw new Jn('"allowMissing" argument must be a boolean');if(Ex(/^%?[^%]*%?$/,t)===null)throw new jn("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=Mx(t),n=r.length>0?r[0]:"",s=Rx("%"+n+"%",e),o=s.name,a=s.value,l=!1,h=s.alias;h&&(n=h[0],Cx(r,Sx([0,1],h)));for(var c=1,u=!0;c<r.length;c+=1){var d=r[c],f=xa(d,0,1),p=xa(d,-1);if((f==='"'||f==="'"||f==="`"||p==='"'||p==="'"||p==="`")&&f!==p)throw new jn("property names with quotes must have matching quotes");if((d==="constructor"||!u)&&(l=!0),n+="."+d,o="%"+n+"%",ba(sn,o))a=sn[o];else if(a!=null){if(!(d in a)){if(!e)throw new Jn("base intrinsic for "+t+" exists, but the property is not available.");return}if(nn&&c+1>=r.length){var m=nn(a,d);u=!!m,u&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[d]}else u=ba(a,d),a=a[d];u&&!l&&(sn[o]=a)}}return a},gp={exports:{}};(function(i){var t=Xh,e=Vh,r=e("%Function.prototype.apply%"),n=e("%Function.prototype.call%"),s=e("%Reflect.apply%",!0)||t.call(n,r),o=e("%Object.getOwnPropertyDescriptor%",!0),a=e("%Object.defineProperty%",!0),l=e("%Math.max%");if(a)try{a({},"a",{value:1})}catch{a=null}i.exports=function(u){var d=s(t,n,arguments);if(o&&a){var f=o(d,"length");f.configurable&&a(d,"length",{value:1+l(0,u.length-(arguments.length-1))})}return d};var h=function(){return s(t,r,arguments)};a?a(i.exports,"apply",{value:h}):i.exports.apply=h})(gp);var Px=gp.exports,yp=Vh,bp=Px,Lx=bp(yp("String.prototype.indexOf")),Gx=function(t,e){var r=yp(t,!!e);return typeof r=="function"&&Lx(t,".prototype.")>-1?bp(r):r};const kx=Xb(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Hh=typeof Map=="function"&&Map.prototype,Kh=Object.getOwnPropertyDescriptor&&Hh?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,_a=Hh&&Kh&&typeof Kh.get=="function"?Kh.get:null,xp=Hh&&Map.prototype.forEach,zh=typeof Set=="function"&&Set.prototype,Yh=Object.getOwnPropertyDescriptor&&zh?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,va=zh&&Yh&&typeof Yh.get=="function"?Yh.get:null,_p=zh&&Set.prototype.forEach,Fx=typeof WeakMap=="function"&&WeakMap.prototype,to=Fx?WeakMap.prototype.has:null,Dx=typeof WeakSet=="function"&&WeakSet.prototype,eo=Dx?WeakSet.prototype.has:null,Nx=typeof WeakRef=="function"&&WeakRef.prototype,vp=Nx?WeakRef.prototype.deref:null,Ox=Boolean.prototype.valueOf,Bx=Object.prototype.toString,Ux=Function.prototype.toString,Xx=String.prototype.match,jh=String.prototype.slice,Sr=String.prototype.replace,Wx=String.prototype.toUpperCase,wp=String.prototype.toLowerCase,Tp=RegExp.prototype.test,Sp=Array.prototype.concat,Ei=Array.prototype.join,Zx=Array.prototype.slice,Cp=Math.floor,Jh=typeof BigInt=="function"?BigInt.prototype.valueOf:null,$h=Object.getOwnPropertySymbols,Qh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,qn=typeof Symbol=="function"&&typeof Symbol.iterator=="object",me=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===qn||!0)?Symbol.toStringTag:null,Ep=Object.prototype.propertyIsEnumerable,Ip=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(i){return i.__proto__}:null);function Ap(i,t){if(i===1/0||i===-1/0||i!==i||i&&i>-1e3&&i<1e3||Tp.call(/e/,t))return t;var e=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof i=="number"){var r=i<0?-Cp(-i):Cp(i);if(r!==i){var n=String(r),s=jh.call(t,n.length+1);return Sr.call(n,e,"$&_")+"."+Sr.call(Sr.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Sr.call(t,e,"$&_")}var qh=kx,Mp=qh.custom,Rp=Gp(Mp)?Mp:null,Vx=function i(t,e,r,n){var s=e||{};if(Cr(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Cr(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=Cr(s,"customInspect")?s.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Cr(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Cr(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=s.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Fp(t,s);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?Ap(t,l):l}if(typeof t=="bigint"){var h=String(t)+"n";return a?Ap(t,h):h}var c=typeof s.depth>"u"?5:s.depth;if(typeof r>"u"&&(r=0),r>=c&&c>0&&typeof t=="object")return tc(t)?"[Array]":"[Object]";var u=l_(s,r);if(typeof n>"u")n=[];else if(kp(n,t)>=0)return"[Circular]";function d(M,N,W){if(N&&(n=Zx.call(n),n.push(N)),W){var K={depth:s.depth};return Cr(s,"quoteStyle")&&(K.quoteStyle=s.quoteStyle),i(M,K,r+1,n)}return i(M,s,r+1,n)}if(typeof t=="function"&&!Lp(t)){var f=qx(t),p=wa(t,d);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(p.length>0?" { "+Ei.call(p,", ")+" }":"")}if(Gp(t)){var m=qn?Sr.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Qh.call(t);return typeof t=="object"&&!qn?io(m):m}if(s_(t)){for(var g="<"+wp.call(String(t.nodeName)),y=t.attributes||[],x=0;x<y.length;x++)g+=" "+y[x].name+"="+Pp(Hx(y[x].value),"double",s);return g+=">",t.childNodes&&t.childNodes.length&&(g+="..."),g+="</"+wp.call(String(t.nodeName))+">",g}if(tc(t)){if(t.length===0)return"[]";var b=wa(t,d);return u&&!a_(b)?"["+ic(b,u)+"]":"[ "+Ei.call(b,", ")+" ]"}if(zx(t)){var v=wa(t,d);return!("cause"in Error.prototype)&&"cause"in t&&!Ep.call(t,"cause")?"{ ["+String(t)+"] "+Ei.call(Sp.call("[cause]: "+d(t.cause),v),", ")+" }":v.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Ei.call(v,", ")+" }"}if(typeof t=="object"&&o){if(Rp&&typeof t[Rp]=="function"&&qh)return qh(t,{depth:c-r});if(o!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(t_(t)){var w=[];return xp&&xp.call(t,function(M,N){w.push(d(N,t,!0)+" => "+d(M,t))}),Dp("Map",_a.call(t),w,u)}if(r_(t)){var S=[];return _p&&_p.call(t,function(M){S.push(d(M,t))}),Dp("Set",va.call(t),S,u)}if(e_(t))return ec("WeakMap");if(n_(t))return ec("WeakSet");if(i_(t))return ec("WeakRef");if(jx(t))return io(d(Number(t)));if($x(t))return io(d(Jh.call(t)));if(Jx(t))return io(Ox.call(t));if(Yx(t))return io(d(String(t)));if(!Kx(t)&&!Lp(t)){var E=wa(t,d),I=Ip?Ip(t)===Object.prototype:t instanceof Object||t.constructor===Object,A=t instanceof Object?"":"null prototype",L=!I&&me&&Object(t)===t&&me in t?jh.call(Er(t),8,-1):A?"Object":"",G=I||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",F=G+(L||A?"["+Ei.call(Sp.call([],L||[],A||[]),": ")+"] ":"");return E.length===0?F+"{}":u?F+"{"+ic(E,u)+"}":F+"{ "+Ei.call(E,", ")+" }"}return String(t)};function Pp(i,t,e){var r=(e.quoteStyle||t)==="double"?'"':"'";return r+i+r}function Hx(i){return Sr.call(String(i),/"/g,"&quot;")}function tc(i){return Er(i)==="[object Array]"&&(!me||!(typeof i=="object"&&me in i))}function Kx(i){return Er(i)==="[object Date]"&&(!me||!(typeof i=="object"&&me in i))}function Lp(i){return Er(i)==="[object RegExp]"&&(!me||!(typeof i=="object"&&me in i))}function zx(i){return Er(i)==="[object Error]"&&(!me||!(typeof i=="object"&&me in i))}function Yx(i){return Er(i)==="[object String]"&&(!me||!(typeof i=="object"&&me in i))}function jx(i){return Er(i)==="[object Number]"&&(!me||!(typeof i=="object"&&me in i))}function Jx(i){return Er(i)==="[object Boolean]"&&(!me||!(typeof i=="object"&&me in i))}function Gp(i){if(qn)return i&&typeof i=="object"&&i instanceof Symbol;if(typeof i=="symbol")return!0;if(!i||typeof i!="object"||!Qh)return!1;try{return Qh.call(i),!0}catch{}return!1}function $x(i){if(!i||typeof i!="object"||!Jh)return!1;try{return Jh.call(i),!0}catch{}return!1}var Qx=Object.prototype.hasOwnProperty||function(i){return i in this};function Cr(i,t){return Qx.call(i,t)}function Er(i){return Bx.call(i)}function qx(i){if(i.name)return i.name;var t=Xx.call(Ux.call(i),/^function\s*([\w$]+)/);return t?t[1]:null}function kp(i,t){if(i.indexOf)return i.indexOf(t);for(var e=0,r=i.length;e<r;e++)if(i[e]===t)return e;return-1}function t_(i){if(!_a||!i||typeof i!="object")return!1;try{_a.call(i);try{va.call(i)}catch{return!0}return i instanceof Map}catch{}return!1}function e_(i){if(!to||!i||typeof i!="object")return!1;try{to.call(i,to);try{eo.call(i,eo)}catch{return!0}return i instanceof WeakMap}catch{}return!1}function i_(i){if(!vp||!i||typeof i!="object")return!1;try{return vp.call(i),!0}catch{}return!1}function r_(i){if(!va||!i||typeof i!="object")return!1;try{va.call(i);try{_a.call(i)}catch{return!0}return i instanceof Set}catch{}return!1}function n_(i){if(!eo||!i||typeof i!="object")return!1;try{eo.call(i,eo);try{to.call(i,to)}catch{return!0}return i instanceof WeakSet}catch{}return!1}function s_(i){return!i||typeof i!="object"?!1:typeof HTMLElement<"u"&&i instanceof HTMLElement?!0:typeof i.nodeName=="string"&&typeof i.getAttribute=="function"}function Fp(i,t){if(i.length>t.maxStringLength){var e=i.length-t.maxStringLength,r="... "+e+" more character"+(e>1?"s":"");return Fp(jh.call(i,0,t.maxStringLength),t)+r}var n=Sr.call(Sr.call(i,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,o_);return Pp(n,"single",t)}function o_(i){var t=i.charCodeAt(0),e={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return e?"\\"+e:"\\x"+(t<16?"0":"")+Wx.call(t.toString(16))}function io(i){return"Object("+i+")"}function ec(i){return i+" { ? }"}function Dp(i,t,e,r){var n=r?ic(e,r):Ei.call(e,", ");return i+" ("+t+") {"+n+"}"}function a_(i){for(var t=0;t<i.length;t++)if(kp(i[t],`
2
2
  `)>=0)return!1;return!0}function l_(i,t){var e;if(i.indent===" ")e=" ";else if(typeof i.indent=="number"&&i.indent>0)e=Ei.call(Array(i.indent+1)," ");else return null;return{base:e,prev:Ei.call(Array(t+1),e)}}function ic(i,t){if(i.length===0)return"";var e=`
3
3
  `+t.prev+t.base;return e+Ei.call(i,","+e)+`
4
4
  `+t.prev}function wa(i,t){var e=tc(i),r=[];if(e){r.length=i.length;for(var n=0;n<i.length;n++)r[n]=Cr(i,n)?t(i[n],i):""}var s=typeof $h=="function"?$h(i):[],o;if(qn){o={};for(var a=0;a<s.length;a++)o["$"+s[a]]=s[a]}for(var l in i)Cr(i,l)&&(e&&String(Number(l))===l&&l<i.length||qn&&o["$"+l]instanceof Symbol||(Tp.call(/[^\w$]/,l)?r.push(t(l,i)+": "+t(i[l],i)):r.push(l+": "+t(i[l],i))));if(typeof $h=="function")for(var h=0;h<s.length;h++)Ep.call(i,s[h])&&r.push("["+t(s[h])+"]: "+t(i[s[h]],i));return r}var rc=Vh,ts=Gx,h_=Vx,c_=rc("%TypeError%"),Ta=rc("%WeakMap%",!0),Sa=rc("%Map%",!0),u_=ts("WeakMap.prototype.get",!0),d_=ts("WeakMap.prototype.set",!0),f_=ts("WeakMap.prototype.has",!0),p_=ts("Map.prototype.get",!0),m_=ts("Map.prototype.set",!0),g_=ts("Map.prototype.has",!0),nc=function(i,t){for(var e=i,r;(r=e.next)!==null;e=r)if(r.key===t)return e.next=r.next,r.next=i.next,i.next=r,r},y_=function(i,t){var e=nc(i,t);return e&&e.value},b_=function(i,t,e){var r=nc(i,t);r?r.value=e:i.next={key:t,next:i.next,value:e}},x_=function(i,t){return!!nc(i,t)},__=function(){var t,e,r,n={assert:function(s){if(!n.has(s))throw new c_("Side channel does not contain "+h_(s))},get:function(s){if(Ta&&s&&(typeof s=="object"||typeof s=="function")){if(t)return u_(t,s)}else if(Sa){if(e)return p_(e,s)}else if(r)return y_(r,s)},has:function(s){if(Ta&&s&&(typeof s=="object"||typeof s=="function")){if(t)return f_(t,s)}else if(Sa){if(e)return g_(e,s)}else if(r)return x_(r,s);return!1},set:function(s,o){Ta&&s&&(typeof s=="object"||typeof s=="function")?(t||(t=new Ta),d_(t,s,o)):Sa?(e||(e=new Sa),m_(e,s,o)):(r||(r={key:{},next:null}),b_(r,s,o))}};return n},v_=String.prototype.replace,w_=/%20/g,sc={RFC1738:"RFC1738",RFC3986:"RFC3986"},oc={default:sc.RFC3986,formatters:{RFC1738:function(i){return v_.call(i,w_,"+")},RFC3986:function(i){return String(i)}},RFC1738:sc.RFC1738,RFC3986:sc.RFC3986},T_=oc,ac=Object.prototype.hasOwnProperty,on=Array.isArray,Ii=function(){for(var i=[],t=0;t<256;++t)i.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return i}(),S_=function(t){for(;t.length>1;){var e=t.pop(),r=e.obj[e.prop];if(on(r)){for(var n=[],s=0;s<r.length;++s)typeof r[s]<"u"&&n.push(r[s]);e.obj[e.prop]=n}}},Np=function(t,e){for(var r=e&&e.plainObjects?Object.create(null):{},n=0;n<t.length;++n)typeof t[n]<"u"&&(r[n]=t[n]);return r},C_=function i(t,e,r){if(!e)return t;if(typeof e!="object"){if(on(t))t.push(e);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!ac.call(Object.prototype,e))&&(t[e]=!0);else return[t,e];return t}if(!t||typeof t!="object")return[t].concat(e);var n=t;return on(t)&&!on(e)&&(n=Np(t,r)),on(t)&&on(e)?(e.forEach(function(s,o){if(ac.call(t,o)){var a=t[o];a&&typeof a=="object"&&s&&typeof s=="object"?t[o]=i(a,s,r):t.push(s)}else t[o]=s}),t):Object.keys(e).reduce(function(s,o){var a=e[o];return ac.call(s,o)?s[o]=i(s[o],a,r):s[o]=a,s},n)},E_=function(t,e){return Object.keys(e).reduce(function(r,n){return r[n]=e[n],r},t)},I_=function(i,t,e){var r=i.replace(/\+/g," ");if(e==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},A_=function(t,e,r,n,s){if(t.length===0)return t;var o=t;if(typeof t=="symbol"?o=Symbol.prototype.toString.call(t):typeof t!="string"&&(o=String(t)),r==="iso-8859-1")return escape(o).replace(/%u[0-9a-f]{4}/gi,function(c){return"%26%23"+parseInt(c.slice(2),16)+"%3B"});for(var a="",l=0;l<o.length;++l){var h=o.charCodeAt(l);if(h===45||h===46||h===95||h===126||h>=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||s===T_.RFC1738&&(h===40||h===41)){a+=o.charAt(l);continue}if(h<128){a=a+Ii[h];continue}if(h<2048){a=a+(Ii[192|h>>6]+Ii[128|h&63]);continue}if(h<55296||h>=57344){a=a+(Ii[224|h>>12]+Ii[128|h>>6&63]+Ii[128|h&63]);continue}l+=1,h=65536+((h&1023)<<10|o.charCodeAt(l)&1023),a+=Ii[240|h>>18]+Ii[128|h>>12&63]+Ii[128|h>>6&63]+Ii[128|h&63]}return a},M_=function(t){for(var e=[{obj:{o:t},prop:"o"}],r=[],n=0;n<e.length;++n)for(var s=e[n],o=s.obj[s.prop],a=Object.keys(o),l=0;l<a.length;++l){var h=a[l],c=o[h];typeof c=="object"&&c!==null&&r.indexOf(c)===-1&&(e.push({obj:o,prop:h}),r.push(c))}return S_(e),t},R_=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},P_=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},L_=function(t,e){return[].concat(t,e)},G_=function(t,e){if(on(t)){for(var r=[],n=0;n<t.length;n+=1)r.push(e(t[n]));return r}return e(t)},Op={arrayToObject:Np,assign:E_,combine:L_,compact:M_,decode:I_,encode:A_,isBuffer:P_,isRegExp:R_,maybeMap:G_,merge:C_},Bp=__,Ca=Op,ro=oc,k_=Object.prototype.hasOwnProperty,Up={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},tr=Array.isArray,F_=Array.prototype.push,Xp=function(i,t){F_.apply(i,tr(t)?t:[t])},D_=Date.prototype.toISOString,Wp=ro.default,ge={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Ca.encode,encodeValuesOnly:!1,format:Wp,formatter:ro.formatters[Wp],indices:!1,serializeDate:function(t){return D_.call(t)},skipNulls:!1,strictNullHandling:!1},N_=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},lc={},O_=function i(t,e,r,n,s,o,a,l,h,c,u,d,f,p,m,g){for(var y=t,x=g,b=0,v=!1;(x=x.get(lc))!==void 0&&!v;){var w=x.get(t);if(b+=1,typeof w<"u"){if(w===b)throw new RangeError("Cyclic object value");v=!0}typeof x.get(lc)>"u"&&(b=0)}if(typeof l=="function"?y=l(e,y):y instanceof Date?y=u(y):r==="comma"&&tr(y)&&(y=Ca.maybeMap(y,function(K){return K instanceof Date?u(K):K})),y===null){if(s)return a&&!p?a(e,ge.encoder,m,"key",d):e;y=""}if(N_(y)||Ca.isBuffer(y)){if(a){var S=p?e:a(e,ge.encoder,m,"key",d);return[f(S)+"="+f(a(y,ge.encoder,m,"value",d))]}return[f(e)+"="+f(String(y))]}var E=[];if(typeof y>"u")return E;var I;if(r==="comma"&&tr(y))p&&a&&(y=Ca.maybeMap(y,a)),I=[{value:y.length>0?y.join(",")||null:void 0}];else if(tr(l))I=l;else{var A=Object.keys(y);I=h?A.sort(h):A}for(var L=n&&tr(y)&&y.length===1?e+"[]":e,G=0;G<I.length;++G){var F=I[G],M=typeof F=="object"&&typeof F.value<"u"?F.value:y[F];if(!(o&&M===null)){var N=tr(y)?typeof r=="function"?r(L,F):L:L+(c?"."+F:"["+F+"]");g.set(t,b);var W=Bp();W.set(lc,g),Xp(E,i(M,N,r,n,s,o,r==="comma"&&p&&tr(y)?null:a,l,h,c,u,d,f,p,m,W))}}return E},B_=function(t){if(!t)return ge;if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var e=t.charset||ge.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=ro.default;if(typeof t.format<"u"){if(!k_.call(ro.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var n=ro.formatters[r],s=ge.filter;return(typeof t.filter=="function"||tr(t.filter))&&(s=t.filter),{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:ge.addQueryPrefix,allowDots:typeof t.allowDots>"u"?ge.allowDots:!!t.allowDots,charset:e,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:ge.charsetSentinel,delimiter:typeof t.delimiter>"u"?ge.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:ge.encode,encoder:typeof t.encoder=="function"?t.encoder:ge.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:ge.encodeValuesOnly,filter:s,format:r,formatter:n,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:ge.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:ge.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:ge.strictNullHandling}},U_=function(i,t){var e=i,r=B_(t),n,s;typeof r.filter=="function"?(s=r.filter,e=s("",e)):tr(r.filter)&&(s=r.filter,n=s);var o=[];if(typeof e!="object"||e===null)return"";var a;t&&t.arrayFormat in Up?a=t.arrayFormat:t&&"indices"in t?a=t.indices?"indices":"repeat":a="indices";var l=Up[a];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var h=l==="comma"&&t&&t.commaRoundTrip;n||(n=Object.keys(e)),r.sort&&n.sort(r.sort);for(var c=Bp(),u=0;u<n.length;++u){var d=n[u];r.skipNulls&&e[d]===null||Xp(o,O_(e[d],d,l,h,r.strictNullHandling,r.skipNulls,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,c))}var f=o.join(r.delimiter),p=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?p+="utf8=%26%2310003%3B&":p+="utf8=%E2%9C%93&"),f.length>0?p+f:""},es=Op,hc=Object.prototype.hasOwnProperty,X_=Array.isArray,le={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:es.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},W_=function(i){return i.replace(/&#(\d+);/g,function(t,e){return String.fromCharCode(parseInt(e,10))})},Zp=function(i,t){return i&&typeof i=="string"&&t.comma&&i.indexOf(",")>-1?i.split(","):i},Z_="utf8=%26%2310003%3B",V_="utf8=%E2%9C%93",H_=function(t,e){var r={__proto__:null},n=e.ignoreQueryPrefix?t.replace(/^\?/,""):t,s=e.parameterLimit===1/0?void 0:e.parameterLimit,o=n.split(e.delimiter,s),a=-1,l,h=e.charset;if(e.charsetSentinel)for(l=0;l<o.length;++l)o[l].indexOf("utf8=")===0&&(o[l]===V_?h="utf-8":o[l]===Z_&&(h="iso-8859-1"),a=l,l=o.length);for(l=0;l<o.length;++l)if(l!==a){var c=o[l],u=c.indexOf("]="),d=u===-1?c.indexOf("="):u+1,f,p;d===-1?(f=e.decoder(c,le.decoder,h,"key"),p=e.strictNullHandling?null:""):(f=e.decoder(c.slice(0,d),le.decoder,h,"key"),p=es.maybeMap(Zp(c.slice(d+1),e),function(m){return e.decoder(m,le.decoder,h,"value")})),p&&e.interpretNumericEntities&&h==="iso-8859-1"&&(p=W_(p)),c.indexOf("[]=")>-1&&(p=X_(p)?[p]:p),hc.call(r,f)?r[f]=es.combine(r[f],p):r[f]=p}return r},K_=function(i,t,e,r){for(var n=r?t:Zp(t,e),s=i.length-1;s>=0;--s){var o,a=i[s];if(a==="[]"&&e.parseArrays)o=[].concat(n);else{o=e.plainObjects?Object.create(null):{};var l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,h=parseInt(l,10);!e.parseArrays&&l===""?o={0:n}:!isNaN(h)&&a!==l&&String(h)===l&&h>=0&&e.parseArrays&&h<=e.arrayLimit?(o=[],o[h]=n):l!=="__proto__"&&(o[l]=n)}n=o}return n},z_=function(t,e,r,n){if(t){var s=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,o=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=r.depth>0&&o.exec(s),h=l?s.slice(0,l.index):s,c=[];if(h){if(!r.plainObjects&&hc.call(Object.prototype,h)&&!r.allowPrototypes)return;c.push(h)}for(var u=0;r.depth>0&&(l=a.exec(s))!==null&&u<r.depth;){if(u+=1,!r.plainObjects&&hc.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;c.push(l[1])}return l&&c.push("["+s.slice(l.index)+"]"),K_(c,e,r,n)}},Y_=function(t){if(!t)return le;if(t.decoder!==null&&t.decoder!==void 0&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var e=typeof t.charset>"u"?le.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?le.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:le.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:le.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:le.arrayLimit,charset:e,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:le.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:le.comma,decoder:typeof t.decoder=="function"?t.decoder:le.decoder,delimiter:typeof t.delimiter=="string"||es.isRegExp(t.delimiter)?t.delimiter:le.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:le.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:le.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:le.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:le.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:le.strictNullHandling}},j_=function(i,t){var e=Y_(t);if(i===""||i===null||typeof i>"u")return e.plainObjects?Object.create(null):{};for(var r=typeof i=="string"?H_(i,e):i,n=e.plainObjects?Object.create(null):{},s=Object.keys(r),o=0;o<s.length;++o){var a=s[o],l=z_(a,r[a],e,typeof i=="string");n=es.merge(n,l,e)}return e.allowSparse===!0?n:es.compact(n)},J_=U_,$_=j_,Q_=oc,q_={formats:Q_,parse:$_,stringify:J_},tv=ox;function er(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var ev=/^([a-z0-9.+-]+:)/i,iv=/:[0-9]*$/,rv=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,nv=["<",">",'"',"`"," ","\r",`
@@ -1164,7 +1164,7 @@ void main(void)\r
1164
1164
  * Subject to the terms at https://gsap.com/standard-license or for
1165
1165
  * Club GSAP members, the agreement issued with that membership.
1166
1166
  * @author: Jack Doyle, jack@greensock.com
1167
- */var Be={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},fs={duration:.5,overwrite:!1,delay:0},Cu,ye,Ut,$e=1e8,Ft=1/$e,Eu=Math.PI*2,QS=Eu/4,qS=0,hg=Math.sqrt,tC=Math.cos,eC=Math.sin,ce=function(t){return typeof t=="string"},Yt=function(t){return typeof t=="function"},lr=function(t){return typeof t=="number"},Iu=function(t){return typeof t>"u"},ki=function(t){return typeof t=="object"},Ae=function(t){return t!==!1},Au=function(){return typeof window<"u"},yl=function(t){return Yt(t)||ce(t)},cg=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},be=Array.isArray,Mu=/(?:-?\.?\d|\.)+/gi,ug=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,ps=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,Ru=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,dg=/[+-]=-?[.\d]+/,fg=/[^,'"\[\]\s]+/gi,iC=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,Ht,Fi,Pu,Lu,Ue={},bl={},pg,mg=function(t){return(bl=Tn(t,Ue))&&Pe},Gu=function(t,e){return console.warn("Invalid property",t,"set to",e,"Missing plugin? gsap.registerPlugin()")},mo=function(t,e){return!e&&console.warn(t)},gg=function(t,e){return t&&(Ue[t]=e)&&bl&&(bl[t]=e)||Ue},go=function(){return 0},rC={suppressEvents:!0,isStart:!0,kill:!1},xl={suppressEvents:!0,kill:!1},nC={suppressEvents:!0},ku={},Br=[],Fu={},yg,Xe={},Du={},bg=30,_l=[],Nu="",Ou=function(t){var e=t[0],r,n;if(ki(e)||Yt(e)||(t=[t]),!(r=(e._gsap||{}).harness)){for(n=_l.length;n--&&!_l[n].targetTest(e););r=_l[n]}for(n=t.length;n--;)t[n]&&(t[n]._gsap||(t[n]._gsap=new zg(t[n],r)))||t.splice(n,1);return t},wn=function(t){return t._gsap||Ou(ti(t))[0]._gsap},xg=function(t,e,r){return(r=t[e])&&Yt(r)?t[e]():Iu(r)&&t.getAttribute&&t.getAttribute(e)||r},Me=function(t,e){return(t=t.split(",")).forEach(e)||t},Jt=function(t){return Math.round(t*1e5)/1e5||0},ue=function(t){return Math.round(t*1e7)/1e7||0},ms=function(t,e){var r=e.charAt(0),n=parseFloat(e.substr(2));return t=parseFloat(t),r==="+"?t+n:r==="-"?t-n:r==="*"?t*n:t/n},sC=function(t,e){for(var r=e.length,n=0;t.indexOf(e[n])<0&&++n<r;);return n<r},vl=function(){var t=Br.length,e=Br.slice(0),r,n;for(Fu={},Br.length=0,r=0;r<t;r++)n=e[r],n&&n._lazy&&(n.render(n._lazy[0],n._lazy[1],!0)._lazy=0)},_g=function(t,e,r,n){Br.length&&!ye&&vl(),t.render(e,r,n||ye&&e<0&&(t._initted||t._startAt)),Br.length&&!ye&&vl()},vg=function(t){var e=parseFloat(t);return(e||e===0)&&(t+"").match(fg).length<2?e:ce(t)?t.trim():t},wg=function(t){return t},Qe=function(t,e){for(var r in e)r in t||(t[r]=e[r]);return t},oC=function(t){return function(e,r){for(var n in r)n in e||n==="duration"&&t||n==="ease"||(e[n]=r[n])}},Tn=function(t,e){for(var r in e)t[r]=e[r];return t},Tg=function i(t,e){for(var r in e)r!=="__proto__"&&r!=="constructor"&&r!=="prototype"&&(t[r]=ki(e[r])?i(t[r]||(t[r]={}),e[r]):e[r]);return t},wl=function(t,e){var r={},n;for(n in t)n in e||(r[n]=t[n]);return r},yo=function(t){var e=t.parent||Ht,r=t.keyframes?oC(be(t.keyframes)):Qe;if(Ae(t.inherit))for(;e;)r(t,e.vars.defaults),e=e.parent||e._dp;return t},aC=function(t,e){for(var r=t.length,n=r===e.length;n&&r--&&t[r]===e[r];);return r<0},Sg=function(t,e,r,n,s){r===void 0&&(r="_first"),n===void 0&&(n="_last");var o=t[n],a;if(s)for(a=e[s];o&&o[s]>a;)o=o._prev;return o?(e._next=o._next,o._next=e):(e._next=t[r],t[r]=e),e._next?e._next._prev=e:t[n]=e,e._prev=o,e.parent=e._dp=t,e},Tl=function(t,e,r,n){r===void 0&&(r="_first"),n===void 0&&(n="_last");var s=e._prev,o=e._next;s?s._next=o:t[r]===e&&(t[r]=o),o?o._prev=s:t[n]===e&&(t[n]=s),e._next=e._prev=e.parent=null},Ur=function(t,e){t.parent&&(!e||t.parent.autoRemoveChildren)&&t.parent.remove&&t.parent.remove(t),t._act=0},Sn=function(t,e){if(t&&(!e||e._end>t._dur||e._start<0))for(var r=t;r;)r._dirty=1,r=r.parent;return t},lC=function(t){for(var e=t.parent;e&&e.parent;)e._dirty=1,e.totalDuration(),e=e.parent;return t},Bu=function(t,e,r,n){return t._startAt&&(ye?t._startAt.revert(xl):t.vars.immediateRender&&!t.vars.autoRevert||t._startAt.render(e,!0,n))},hC=function i(t){return!t||t._ts&&i(t.parent)},Cg=function(t){return t._repeat?gs(t._tTime,t=t.duration()+t._rDelay)*t:0},gs=function(t,e){var r=Math.floor(t/=e);return t&&r===t?r-1:r},Sl=function(t,e){return(t-e._start)*e._ts+(e._ts>=0?0:e._dirty?e.totalDuration():e._tDur)},Cl=function(t){return t._end=ue(t._start+(t._tDur/Math.abs(t._ts||t._rts||Ft)||0))},El=function(t,e){var r=t._dp;return r&&r.smoothChildTiming&&t._ts&&(t._start=ue(r._time-(t._ts>0?e/t._ts:((t._dirty?t.totalDuration():t._tDur)-e)/-t._ts)),Cl(t),r._dirty||Sn(r,t)),t},Eg=function(t,e){var r;if((e._time||!e._dur&&e._initted||e._start<t._time&&(e._dur||!e.add))&&(r=Sl(t.rawTime(),e),(!e._dur||xo(0,e.totalDuration(),r)-e._tTime>Ft)&&e.render(r,!0)),Sn(t,e)._dp&&t._initted&&t._time>=t._dur&&t._ts){if(t._dur<t.duration())for(r=t;r._dp;)r.rawTime()>=0&&r.totalTime(r._tTime),r=r._dp;t._zTime=-Ft}},Di=function(t,e,r,n){return e.parent&&Ur(e),e._start=ue((lr(r)?r:r||t!==Ht?qe(t,r,e):t._time)+e._delay),e._end=ue(e._start+(e.totalDuration()/Math.abs(e.timeScale())||0)),Sg(t,e,"_first","_last",t._sort?"_start":0),Uu(e)||(t._recent=e),n||Eg(t,e),t._ts<0&&El(t,t._tTime),t},Ig=function(t,e){return(Ue.ScrollTrigger||Gu("scrollTrigger",e))&&Ue.ScrollTrigger.create(e,t)},Ag=function(t,e,r,n,s){if(ju(t,e,s),!t._initted)return 1;if(!r&&t._pt&&!ye&&(t._dur&&t.vars.lazy!==!1||!t._dur&&t.vars.lazy)&&yg!==Ze.frame)return Br.push(t),t._lazy=[s,n],1},cC=function i(t){var e=t.parent;return e&&e._ts&&e._initted&&!e._lock&&(e.rawTime()<0||i(e))},Uu=function(t){var e=t.data;return e==="isFromStart"||e==="isStart"},uC=function(t,e,r,n){var s=t.ratio,o=e<0||!e&&(!t._start&&cC(t)&&!(!t._initted&&Uu(t))||(t._ts<0||t._dp._ts<0)&&!Uu(t))?0:1,a=t._rDelay,l=0,h,c,u;if(a&&t._repeat&&(l=xo(0,t._tDur,e),c=gs(l,a),t._yoyo&&c&1&&(o=1-o),c!==gs(t._tTime,a)&&(s=1-o,t.vars.repeatRefresh&&t._initted&&t.invalidate())),o!==s||ye||n||t._zTime===Ft||!e&&t._zTime){if(!t._initted&&Ag(t,e,n,r,l))return;for(u=t._zTime,t._zTime=e||(r?Ft:0),r||(r=e&&!u),t.ratio=o,t._from&&(o=1-o),t._time=0,t._tTime=l,h=t._pt;h;)h.r(o,h.d),h=h._next;e<0&&Bu(t,e,r,!0),t._onUpdate&&!r&&We(t,"onUpdate"),l&&t._repeat&&!r&&t.parent&&We(t,"onRepeat"),(e>=t._tDur||e<0)&&t.ratio===o&&(o&&Ur(t,1),!r&&!ye&&(We(t,o?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=e)},dC=function(t,e,r){var n;if(r>e)for(n=t._first;n&&n._start<=r;){if(n.data==="isPause"&&n._start>e)return n;n=n._next}else for(n=t._last;n&&n._start>=r;){if(n.data==="isPause"&&n._start<e)return n;n=n._prev}},ys=function(t,e,r,n){var s=t._repeat,o=ue(e)||0,a=t._tTime/t._tDur;return a&&!n&&(t._time*=o/t._dur),t._dur=o,t._tDur=s?s<0?1e10:ue(o*(s+1)+t._rDelay*s):o,a>0&&!n&&El(t,t._tTime=t._tDur*a),t.parent&&Cl(t),r||Sn(t.parent,t),t},Mg=function(t){return t instanceof Ce?Sn(t):ys(t,t._dur)},fC={_start:0,endTime:go,totalDuration:go},qe=function i(t,e,r){var n=t.labels,s=t._recent||fC,o=t.duration()>=$e?s.endTime(!1):t._dur,a,l,h;return ce(e)&&(isNaN(e)||e in n)?(l=e.charAt(0),h=e.substr(-1)==="%",a=e.indexOf("="),l==="<"||l===">"?(a>=0&&(e=e.replace(/=/,"")),(l==="<"?s._start:s.endTime(s._repeat>=0))+(parseFloat(e.substr(1))||0)*(h?(a<0?s:r).totalDuration()/100:1)):a<0?(e in n||(n[e]=o),n[e]):(l=parseFloat(e.charAt(a-1)+e.substr(a+1)),h&&r&&(l=l/100*(be(r)?r[0]:r).totalDuration()),a>1?i(t,e.substr(0,a-1),r)+l:o+l)):e==null?o:+e},bo=function(t,e,r){var n=lr(e[1]),s=(n?2:1)+(t<2?0:1),o=e[s],a,l;if(n&&(o.duration=e[1]),o.parent=r,t){for(a=o,l=r;l&&!("immediateRender"in a);)a=l.vars.defaults||{},l=Ae(l.vars.inherit)&&l.parent;o.immediateRender=Ae(a.immediateRender),t<2?o.runBackwards=1:o.startAt=e[s-1]}return new te(e[0],o,e[s+1])},Xr=function(t,e){return t||t===0?e(t):e},xo=function(t,e,r){return r<t?t:r>e?e:r},xe=function(t,e){return!ce(t)||!(e=iC.exec(t))?"":e[1]},pC=function(t,e,r){return Xr(r,function(n){return xo(t,e,n)})},Xu=[].slice,Rg=function(t,e){return t&&ki(t)&&"length"in t&&(!e&&!t.length||t.length-1 in t&&ki(t[0]))&&!t.nodeType&&t!==Fi},mC=function(t,e,r){return r===void 0&&(r=[]),t.forEach(function(n){var s;return ce(n)&&!e||Rg(n,1)?(s=r).push.apply(s,ti(n)):r.push(n)})||r},ti=function(t,e,r){return Ut&&!e&&Ut.selector?Ut.selector(t):ce(t)&&!r&&(Pu||!xs())?Xu.call((e||Lu).querySelectorAll(t),0):be(t)?mC(t,r):Rg(t)?Xu.call(t,0):t?[t]:[]},Wu=function(t){return t=ti(t)[0]||mo("Invalid scope")||{},function(e){var r=t.current||t.nativeElement||t;return ti(e,r.querySelectorAll?r:r===t?mo("Invalid scope")||Lu.createElement("div"):t)}},Pg=function(t){return t.sort(function(){return .5-Math.random()})},Lg=function(t){if(Yt(t))return t;var e=ki(t)?t:{each:t},r=Cn(e.ease),n=e.from||0,s=parseFloat(e.base)||0,o={},a=n>0&&n<1,l=isNaN(n)||a,h=e.axis,c=n,u=n;return ce(n)?c=u={center:.5,edges:.5,end:1}[n]||0:!a&&l&&(c=n[0],u=n[1]),function(d,f,p){var m=(p||e).length,g=o[m],y,x,b,v,w,S,E,I,A;if(!g){if(A=e.grid==="auto"?0:(e.grid||[1,$e])[1],!A){for(E=-$e;E<(E=p[A++].getBoundingClientRect().left)&&A<m;);A<m&&A--}for(g=o[m]=[],y=l?Math.min(A,m)*c-.5:n%A,x=A===$e?0:l?m*u/A-.5:n/A|0,E=0,I=$e,S=0;S<m;S++)b=S%A-y,v=x-(S/A|0),g[S]=w=h?Math.abs(h==="y"?v:b):hg(b*b+v*v),w>E&&(E=w),w<I&&(I=w);n==="random"&&Pg(g),g.max=E-I,g.min=I,g.v=m=(parseFloat(e.amount)||parseFloat(e.each)*(A>m?m-1:h?h==="y"?m/A:A:Math.max(A,m/A))||0)*(n==="edges"?-1:1),g.b=m<0?s-m:s,g.u=xe(e.amount||e.each)||0,r=r&&m<0?Vg(r):r}return m=(g[d]-g.min)/g.max||0,ue(g.b+(r?r(m):m)*g.v)+g.u}},Zu=function(t){var e=Math.pow(10,((t+"").split(".")[1]||"").length);return function(r){var n=ue(Math.round(parseFloat(r)/t)*t*e);return(n-n%1)/e+(lr(r)?0:xe(r))}},Gg=function(t,e){var r=be(t),n,s;return!r&&ki(t)&&(n=r=t.radius||$e,t.values?(t=ti(t.values),(s=!lr(t[0]))&&(n*=n)):t=Zu(t.increment)),Xr(e,r?Yt(t)?function(o){return s=t(o),Math.abs(s-o)<=n?s:o}:function(o){for(var a=parseFloat(s?o.x:o),l=parseFloat(s?o.y:0),h=$e,c=0,u=t.length,d,f;u--;)s?(d=t[u].x-a,f=t[u].y-l,d=d*d+f*f):d=Math.abs(t[u]-a),d<h&&(h=d,c=u);return c=!n||h<=n?t[c]:o,s||c===o||lr(o)?c:c+xe(o)}:Zu(t))},kg=function(t,e,r,n){return Xr(be(t)?!e:r===!0?!!(r=0):!n,function(){return be(t)?t[~~(Math.random()*t.length)]:(r=r||1e-5)&&(n=r<1?Math.pow(10,(r+"").length-2):1)&&Math.floor(Math.round((t-r/2+Math.random()*(e-t+r*.99))/r)*r*n)/n})},gC=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(n){return e.reduce(function(s,o){return o(s)},n)}},yC=function(t,e){return function(r){return t(parseFloat(r))+(e||xe(r))}},bC=function(t,e,r){return Dg(t,e,0,1,r)},Fg=function(t,e,r){return Xr(r,function(n){return t[~~e(n)]})},xC=function i(t,e,r){var n=e-t;return be(t)?Fg(t,i(0,t.length),e):Xr(r,function(s){return(n+(s-t)%n)%n+t})},_C=function i(t,e,r){var n=e-t,s=n*2;return be(t)?Fg(t,i(0,t.length-1),e):Xr(r,function(o){return o=(s+(o-t)%s)%s||0,t+(o>n?s-o:o)})},_o=function(t){for(var e=0,r="",n,s,o,a;~(n=t.indexOf("random(",e));)o=t.indexOf(")",n),a=t.charAt(n+7)==="[",s=t.substr(n+7,o-n-7).match(a?fg:Mu),r+=t.substr(e,n-e)+kg(a?s:+s[0],a?0:+s[1],+s[2]||1e-5),e=o+1;return r+t.substr(e,t.length-e)},Dg=function(t,e,r,n,s){var o=e-t,a=n-r;return Xr(s,function(l){return r+((l-t)/o*a||0)})},vC=function i(t,e,r,n){var s=isNaN(t+e)?0:function(f){return(1-f)*t+f*e};if(!s){var o=ce(t),a={},l,h,c,u,d;if(r===!0&&(n=1)&&(r=null),o)t={p:t},e={p:e};else if(be(t)&&!be(e)){for(c=[],u=t.length,d=u-2,h=1;h<u;h++)c.push(i(t[h-1],t[h]));u--,s=function(p){p*=u;var m=Math.min(d,~~p);return c[m](p-m)},r=e}else n||(t=Tn(be(t)?[]:{},t));if(!c){for(l in e)zu.call(a,t,l,"get",e[l]);s=function(p){return Qu(p,a)||(o?t.p:t)}}}return Xr(r,s)},Ng=function(t,e,r){var n=t.labels,s=$e,o,a,l;for(o in n)a=n[o]-e,a<0==!!r&&a&&s>(a=Math.abs(a))&&(l=o,s=a);return l},We=function(t,e,r){var n=t.vars,s=n[e],o=Ut,a=t._ctx,l,h,c;if(s)return l=n[e+"Params"],h=n.callbackScope||t,r&&Br.length&&vl(),a&&(Ut=a),c=l?s.apply(h,l):s.call(h),Ut=o,c},vo=function(t){return Ur(t),t.scrollTrigger&&t.scrollTrigger.kill(!!ye),t.progress()<1&&We(t,"onInterrupt"),t},bs,Og=[],Bg=function(t){if(t)if(t=!t.name&&t.default||t,Au()||t.headless){var e=t.name,r=Yt(t),n=e&&!r&&t.init?function(){this._props=[]}:t,s={init:go,render:Qu,add:zu,kill:NC,modifier:DC,rawVars:0},o={targetTest:0,get:0,getSetter:$u,aliases:{},register:0};if(xs(),t!==n){if(Xe[e])return;Qe(n,Qe(wl(t,s),o)),Tn(n.prototype,Tn(s,wl(t,o))),Xe[n.prop=e]=n,t.targetTest&&(_l.push(n),ku[e]=1),e=(e==="css"?"CSS":e.charAt(0).toUpperCase()+e.substr(1))+"Plugin"}gg(e,n),t.register&&t.register(Pe,n,Re)}else Og.push(t)},Gt=255,wo={aqua:[0,Gt,Gt],lime:[0,Gt,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,Gt],navy:[0,0,128],white:[Gt,Gt,Gt],olive:[128,128,0],yellow:[Gt,Gt,0],orange:[Gt,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[Gt,0,0],pink:[Gt,192,203],cyan:[0,Gt,Gt],transparent:[Gt,Gt,Gt,0]},Vu=function(t,e,r){return t+=t<0?1:t>1?-1:0,(t*6<1?e+(r-e)*t*6:t<.5?r:t*3<2?e+(r-e)*(2/3-t)*6:e)*Gt+.5|0},Ug=function(t,e,r){var n=t?lr(t)?[t>>16,t>>8&Gt,t&Gt]:0:wo.black,s,o,a,l,h,c,u,d,f,p;if(!n){if(t.substr(-1)===","&&(t=t.substr(0,t.length-1)),wo[t])n=wo[t];else if(t.charAt(0)==="#"){if(t.length<6&&(s=t.charAt(1),o=t.charAt(2),a=t.charAt(3),t="#"+s+s+o+o+a+a+(t.length===5?t.charAt(4)+t.charAt(4):"")),t.length===9)return n=parseInt(t.substr(1,6),16),[n>>16,n>>8&Gt,n&Gt,parseInt(t.substr(7),16)/255];t=parseInt(t.substr(1),16),n=[t>>16,t>>8&Gt,t&Gt]}else if(t.substr(0,3)==="hsl"){if(n=p=t.match(Mu),!e)l=+n[0]%360/360,h=+n[1]/100,c=+n[2]/100,o=c<=.5?c*(h+1):c+h-c*h,s=c*2-o,n.length>3&&(n[3]*=1),n[0]=Vu(l+1/3,s,o),n[1]=Vu(l,s,o),n[2]=Vu(l-1/3,s,o);else if(~t.indexOf("="))return n=t.match(ug),r&&n.length<4&&(n[3]=1),n}else n=t.match(Mu)||wo.transparent;n=n.map(Number)}return e&&!p&&(s=n[0]/Gt,o=n[1]/Gt,a=n[2]/Gt,u=Math.max(s,o,a),d=Math.min(s,o,a),c=(u+d)/2,u===d?l=h=0:(f=u-d,h=c>.5?f/(2-u-d):f/(u+d),l=u===s?(o-a)/f+(o<a?6:0):u===o?(a-s)/f+2:(s-o)/f+4,l*=60),n[0]=~~(l+.5),n[1]=~~(h*100+.5),n[2]=~~(c*100+.5)),r&&n.length<4&&(n[3]=1),n},Xg=function(t){var e=[],r=[],n=-1;return t.split(Wr).forEach(function(s){var o=s.match(ps)||[];e.push.apply(e,o),r.push(n+=o.length+1)}),e.c=r,e},Wg=function(t,e,r){var n="",s=(t+n).match(Wr),o=e?"hsla(":"rgba(",a=0,l,h,c,u;if(!s)return t;if(s=s.map(function(d){return(d=Ug(d,e,1))&&o+(e?d[0]+","+d[1]+"%,"+d[2]+"%,"+d[3]:d.join(","))+")"}),r&&(c=Xg(t),l=r.c,l.join(n)!==c.c.join(n)))for(h=t.replace(Wr,"1").split(ps),u=h.length-1;a<u;a++)n+=h[a]+(~l.indexOf(a)?s.shift()||o+"0,0,0,0)":(c.length?c:s.length?s:r).shift());if(!h)for(h=t.split(Wr),u=h.length-1;a<u;a++)n+=h[a]+s[a];return n+h[u]},Wr=function(){var i="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",t;for(t in wo)i+="|"+t+"\\b";return new RegExp(i+")","gi")}(),wC=/hsl[a]?\(/,Zg=function(t){var e=t.join(" "),r;if(Wr.lastIndex=0,Wr.test(e))return r=wC.test(e),t[1]=Wg(t[1],r),t[0]=Wg(t[0],r,Xg(t[1])),!0},To,Ze=function(){var i=Date.now,t=500,e=33,r=i(),n=r,s=1e3/240,o=s,a=[],l,h,c,u,d,f,p=function m(g){var y=i()-n,x=g===!0,b,v,w,S;if((y>t||y<0)&&(r+=y-e),n+=y,w=n-r,b=w-o,(b>0||x)&&(S=++u.frame,d=w-u.time*1e3,u.time=w=w/1e3,o+=b+(b>=s?4:s-b),v=1),x||(l=h(m)),v)for(f=0;f<a.length;f++)a[f](w,d,S,g)};return u={time:0,frame:0,tick:function(){p(!0)},deltaRatio:function(g){return d/(1e3/(g||60))},wake:function(){pg&&(!Pu&&Au()&&(Fi=Pu=window,Lu=Fi.document||{},Ue.gsap=Pe,(Fi.gsapVersions||(Fi.gsapVersions=[])).push(Pe.version),mg(bl||Fi.GreenSockGlobals||!Fi.gsap&&Fi||{}),Og.forEach(Bg)),c=typeof requestAnimationFrame<"u"&&requestAnimationFrame,l&&u.sleep(),h=c||function(g){return setTimeout(g,o-u.time*1e3+1|0)},To=1,p(2))},sleep:function(){(c?cancelAnimationFrame:clearTimeout)(l),To=0,h=go},lagSmoothing:function(g,y){t=g||1/0,e=Math.min(y||33,t)},fps:function(g){s=1e3/(g||240),o=u.time*1e3+s},add:function(g,y,x){var b=y?function(v,w,S,E){g(v,w,S,E),u.remove(b)}:g;return u.remove(g),a[x?"unshift":"push"](b),xs(),b},remove:function(g,y){~(y=a.indexOf(g))&&a.splice(y,1)&&f>=y&&f--},_listeners:a},u}(),xs=function(){return!To&&Ze.wake()},Et={},TC=/^[\d.\-M][\d.\-,\s]/,SC=/["']/g,CC=function(t){for(var e={},r=t.substr(1,t.length-3).split(":"),n=r[0],s=1,o=r.length,a,l,h;s<o;s++)l=r[s],a=s!==o-1?l.lastIndexOf(","):l.length,h=l.substr(0,a),e[n]=isNaN(h)?h.replace(SC,"").trim():+h,n=l.substr(a+1).trim();return e},EC=function(t){var e=t.indexOf("(")+1,r=t.indexOf(")"),n=t.indexOf("(",e);return t.substring(e,~n&&n<r?t.indexOf(")",r+1):r)},IC=function(t){var e=(t+"").split("("),r=Et[e[0]];return r&&e.length>1&&r.config?r.config.apply(null,~t.indexOf("{")?[CC(e[1])]:EC(t).split(",").map(vg)):Et._CE&&TC.test(t)?Et._CE("",t):r},Vg=function(t){return function(e){return 1-t(1-e)}},Hg=function i(t,e){for(var r=t._first,n;r;)r instanceof Ce?i(r,e):r.vars.yoyoEase&&(!r._yoyo||!r._repeat)&&r._yoyo!==e&&(r.timeline?i(r.timeline,e):(n=r._ease,r._ease=r._yEase,r._yEase=n,r._yoyo=e)),r=r._next},Cn=function(t,e){return t&&(Yt(t)?t:Et[t]||IC(t))||e},En=function(t,e,r,n){r===void 0&&(r=function(l){return 1-e(1-l)}),n===void 0&&(n=function(l){return l<.5?e(l*2)/2:1-e((1-l)*2)/2});var s={easeIn:e,easeOut:r,easeInOut:n},o;return Me(t,function(a){Et[a]=Ue[a]=s,Et[o=a.toLowerCase()]=r;for(var l in s)Et[o+(l==="easeIn"?".in":l==="easeOut"?".out":".inOut")]=Et[a+"."+l]=s[l]}),s},Kg=function(t){return function(e){return e<.5?(1-t(1-e*2))/2:.5+t((e-.5)*2)/2}},Hu=function i(t,e,r){var n=e>=1?e:1,s=(r||(t?.3:.45))/(e<1?e:1),o=s/Eu*(Math.asin(1/n)||0),a=function(c){return c===1?1:n*Math.pow(2,-10*c)*eC((c-o)*s)+1},l=t==="out"?a:t==="in"?function(h){return 1-a(1-h)}:Kg(a);return s=Eu/s,l.config=function(h,c){return i(t,h,c)},l},Ku=function i(t,e){e===void 0&&(e=1.70158);var r=function(o){return o?--o*o*((e+1)*o+e)+1:0},n=t==="out"?r:t==="in"?function(s){return 1-r(1-s)}:Kg(r);return n.config=function(s){return i(t,s)},n};Me("Linear,Quad,Cubic,Quart,Quint,Strong",function(i,t){var e=t<5?t+1:t;En(i+",Power"+(e-1),t?function(r){return Math.pow(r,e)}:function(r){return r},function(r){return 1-Math.pow(1-r,e)},function(r){return r<.5?Math.pow(r*2,e)/2:1-Math.pow((1-r)*2,e)/2})}),Et.Linear.easeNone=Et.none=Et.Linear.easeIn,En("Elastic",Hu("in"),Hu("out"),Hu()),function(i,t){var e=1/t,r=2*e,n=2.5*e,s=function(a){return a<e?i*a*a:a<r?i*Math.pow(a-1.5/t,2)+.75:a<n?i*(a-=2.25/t)*a+.9375:i*Math.pow(a-2.625/t,2)+.984375};En("Bounce",function(o){return 1-s(1-o)},s)}(7.5625,2.75),En("Expo",function(i){return i?Math.pow(2,10*(i-1)):0}),En("Circ",function(i){return-(hg(1-i*i)-1)}),En("Sine",function(i){return i===1?1:-tC(i*QS)+1}),En("Back",Ku("in"),Ku("out"),Ku()),Et.SteppedEase=Et.steps=Ue.SteppedEase={config:function(t,e){t===void 0&&(t=1);var r=1/t,n=t+(e?0:1),s=e?1:0,o=1-Ft;return function(a){return((n*xo(0,o,a)|0)+s)*r}}},fs.ease=Et["quad.out"],Me("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(i){return Nu+=i+","+i+"Params,"});var zg=function(t,e){this.id=qS++,t._gsap=this,this.target=t,this.harness=e,this.get=e?e.get:xg,this.set=e?e.getSetter:$u},So=function(){function i(e){this.vars=e,this._delay=+e.delay||0,(this._repeat=e.repeat===1/0?-2:e.repeat||0)&&(this._rDelay=e.repeatDelay||0,this._yoyo=!!e.yoyo||!!e.yoyoEase),this._ts=1,ys(this,+e.duration,1,1),this.data=e.data,Ut&&(this._ctx=Ut,Ut.data.push(this)),To||Ze.wake()}var t=i.prototype;return t.delay=function(r){return r||r===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+r-this._delay),this._delay=r,this):this._delay},t.duration=function(r){return arguments.length?this.totalDuration(this._repeat>0?r+(r+this._rDelay)*this._repeat:r):this.totalDuration()&&this._dur},t.totalDuration=function(r){return arguments.length?(this._dirty=0,ys(this,this._repeat<0?r:(r-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},t.totalTime=function(r,n){if(xs(),!arguments.length)return this._tTime;var s=this._dp;if(s&&s.smoothChildTiming&&this._ts){for(El(this,r),!s._dp||s.parent||Eg(s,this);s&&s.parent;)s.parent._time!==s._start+(s._ts>=0?s._tTime/s._ts:(s.totalDuration()-s._tTime)/-s._ts)&&s.totalTime(s._tTime,!0),s=s.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&r<this._tDur||this._ts<0&&r>0||!this._tDur&&!r)&&Di(this._dp,this,this._start-this._delay)}return(this._tTime!==r||!this._dur&&!n||this._initted&&Math.abs(this._zTime)===Ft||!r&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=r),_g(this,r,n)),this},t.time=function(r,n){return arguments.length?this.totalTime(Math.min(this.totalDuration(),r+Cg(this))%(this._dur+this._rDelay)||(r?this._dur:0),n):this._time},t.totalProgress=function(r,n){return arguments.length?this.totalTime(this.totalDuration()*r,n):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>0?1:0},t.progress=function(r,n){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-r:r)+Cg(this),n):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},t.iteration=function(r,n){var s=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(r-1)*s,n):this._repeat?gs(this._tTime,s)+1:1},t.timeScale=function(r,n){if(!arguments.length)return this._rts===-Ft?0:this._rts;if(this._rts===r)return this;var s=this.parent&&this._ts?Sl(this.parent._time,this):this._tTime;return this._rts=+r||0,this._ts=this._ps||r===-Ft?0:this._rts,this.totalTime(xo(-Math.abs(this._delay),this._tDur,s),n!==!1),Cl(this),lC(this)},t.paused=function(r){return arguments.length?(this._ps!==r&&(this._ps=r,r?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(xs(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==Ft&&(this._tTime-=Ft)))),this):this._ps},t.startTime=function(r){if(arguments.length){this._start=r;var n=this.parent||this._dp;return n&&(n._sort||!this.parent)&&Di(n,this,r-this._delay),this}return this._start},t.endTime=function(r){return this._start+(Ae(r)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},t.rawTime=function(r){var n=this.parent||this._dp;return n?r&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Sl(n.rawTime(r),this):this._tTime:this._tTime},t.revert=function(r){r===void 0&&(r=nC);var n=ye;return ye=r,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(r),this.totalTime(-.01,r.suppressEvents)),this.data!=="nested"&&r.kill!==!1&&this.kill(),ye=n,this},t.globalTime=function(r){for(var n=this,s=arguments.length?r:n.rawTime();n;)s=n._start+s/(Math.abs(n._ts)||1),n=n._dp;return!this.parent&&this._sat?this._sat.globalTime(r):s},t.repeat=function(r){return arguments.length?(this._repeat=r===1/0?-2:r,Mg(this)):this._repeat===-2?1/0:this._repeat},t.repeatDelay=function(r){if(arguments.length){var n=this._time;return this._rDelay=r,Mg(this),n?this.time(n):this}return this._rDelay},t.yoyo=function(r){return arguments.length?(this._yoyo=r,this):this._yoyo},t.seek=function(r,n){return this.totalTime(qe(this,r),Ae(n))},t.restart=function(r,n){return this.play().totalTime(r?-this._delay:0,Ae(n))},t.play=function(r,n){return r!=null&&this.seek(r,n),this.reversed(!1).paused(!1)},t.reverse=function(r,n){return r!=null&&this.seek(r||this.totalDuration(),n),this.reversed(!0).paused(!1)},t.pause=function(r,n){return r!=null&&this.seek(r,n),this.paused(!0)},t.resume=function(){return this.paused(!1)},t.reversed=function(r){return arguments.length?(!!r!==this.reversed()&&this.timeScale(-this._rts||(r?-Ft:0)),this):this._rts<0},t.invalidate=function(){return this._initted=this._act=0,this._zTime=-Ft,this},t.isActive=function(){var r=this.parent||this._dp,n=this._start,s;return!!(!r||this._ts&&this._initted&&r.isActive()&&(s=r.rawTime(!0))>=n&&s<this.endTime(!0)-Ft)},t.eventCallback=function(r,n,s){var o=this.vars;return arguments.length>1?(n?(o[r]=n,s&&(o[r+"Params"]=s),r==="onUpdate"&&(this._onUpdate=n)):delete o[r],this):o[r]},t.then=function(r){var n=this;return new Promise(function(s){var o=Yt(r)?r:wg,a=function(){var h=n.then;n.then=null,Yt(o)&&(o=o(n))&&(o.then||o===n)&&(n.then=h),s(o),n.then=h};n._initted&&n.totalProgress()===1&&n._ts>=0||!n._tTime&&n._ts<0?a():n._prom=a})},t.kill=function(){vo(this)},i}();Qe(So.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-Ft,_prom:0,_ps:!1,_rts:1});var Ce=function(i){lg(t,i);function t(r,n){var s;return r===void 0&&(r={}),s=i.call(this,r)||this,s.labels={},s.smoothChildTiming=!!r.smoothChildTiming,s.autoRemoveChildren=!!r.autoRemoveChildren,s._sort=Ae(r.sortChildren),Ht&&Di(r.parent||Ht,ar(s),n),r.reversed&&s.reverse(),r.paused&&s.paused(!0),r.scrollTrigger&&Ig(ar(s),r.scrollTrigger),s}var e=t.prototype;return e.to=function(n,s,o){return bo(0,arguments,this),this},e.from=function(n,s,o){return bo(1,arguments,this),this},e.fromTo=function(n,s,o,a){return bo(2,arguments,this),this},e.set=function(n,s,o){return s.duration=0,s.parent=this,yo(s).repeatDelay||(s.repeat=0),s.immediateRender=!!s.immediateRender,new te(n,s,qe(this,o),1),this},e.call=function(n,s,o){return Di(this,te.delayedCall(0,n,s),o)},e.staggerTo=function(n,s,o,a,l,h,c){return o.duration=s,o.stagger=o.stagger||a,o.onComplete=h,o.onCompleteParams=c,o.parent=this,new te(n,o,qe(this,l)),this},e.staggerFrom=function(n,s,o,a,l,h,c){return o.runBackwards=1,yo(o).immediateRender=Ae(o.immediateRender),this.staggerTo(n,s,o,a,l,h,c)},e.staggerFromTo=function(n,s,o,a,l,h,c,u){return a.startAt=o,yo(a).immediateRender=Ae(a.immediateRender),this.staggerTo(n,s,a,l,h,c,u)},e.render=function(n,s,o){var a=this._time,l=this._dirty?this.totalDuration():this._tDur,h=this._dur,c=n<=0?0:ue(n),u=this._zTime<0!=n<0&&(this._initted||!h),d,f,p,m,g,y,x,b,v,w,S,E;if(this!==Ht&&c>l&&n>=0&&(c=l),c!==this._tTime||o||u){if(a!==this._time&&h&&(c+=this._time-a,n+=this._time-a),d=c,v=this._start,b=this._ts,y=!b,u&&(h||(a=this._zTime),(n||!s)&&(this._zTime=n)),this._repeat){if(S=this._yoyo,g=h+this._rDelay,this._repeat<-1&&n<0)return this.totalTime(g*100+n,s,o);if(d=ue(c%g),c===l?(m=this._repeat,d=h):(m=~~(c/g),m&&m===c/g&&(d=h,m--),d>h&&(d=h)),w=gs(this._tTime,g),!a&&this._tTime&&w!==m&&this._tTime-w*g-this._dur<=0&&(w=m),S&&m&1&&(d=h-d,E=1),m!==w&&!this._lock){var I=S&&w&1,A=I===(S&&m&1);if(m<w&&(I=!I),a=I?0:c%h?h:c,this._lock=1,this.render(a||(E?0:ue(m*g)),s,!h)._lock=0,this._tTime=c,!s&&this.parent&&We(this,"onRepeat"),this.vars.repeatRefresh&&!E&&(this.invalidate()._lock=1),a&&a!==this._time||y!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(h=this._dur,l=this._tDur,A&&(this._lock=2,a=I?h:-1e-4,this.render(a,!0),this.vars.repeatRefresh&&!E&&this.invalidate()),this._lock=0,!this._ts&&!y)return this;Hg(this,E)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(x=dC(this,ue(a),ue(d)),x&&(c-=d-(d=x._start))),this._tTime=c,this._time=d,this._act=!b,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=n,a=0),!a&&d&&!s&&!m&&(We(this,"onStart"),this._tTime!==c))return this;if(d>=a&&n>=0)for(f=this._first;f;){if(p=f._next,(f._act||d>=f._start)&&f._ts&&x!==f){if(f.parent!==this)return this.render(n,s,o);if(f.render(f._ts>0?(d-f._start)*f._ts:(f._dirty?f.totalDuration():f._tDur)+(d-f._start)*f._ts,s,o),d!==this._time||!this._ts&&!y){x=0,p&&(c+=this._zTime=-Ft);break}}f=p}else{f=this._last;for(var L=n<0?n:d;f;){if(p=f._prev,(f._act||L<=f._end)&&f._ts&&x!==f){if(f.parent!==this)return this.render(n,s,o);if(f.render(f._ts>0?(L-f._start)*f._ts:(f._dirty?f.totalDuration():f._tDur)+(L-f._start)*f._ts,s,o||ye&&(f._initted||f._startAt)),d!==this._time||!this._ts&&!y){x=0,p&&(c+=this._zTime=L?-Ft:Ft);break}}f=p}}if(x&&!s&&(this.pause(),x.render(d>=a?0:-Ft)._zTime=d>=a?1:-1,this._ts))return this._start=v,Cl(this),this.render(n,s,o);this._onUpdate&&!s&&We(this,"onUpdate",!0),(c===l&&this._tTime>=this.totalDuration()||!c&&a)&&(v===this._start||Math.abs(b)!==Math.abs(this._ts))&&(this._lock||((n||!h)&&(c===l&&this._ts>0||!c&&this._ts<0)&&Ur(this,1),!s&&!(n<0&&!a)&&(c||a||!l)&&(We(this,c===l&&n>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(c<l&&this.timeScale()>0)&&this._prom())))}return this},e.add=function(n,s){var o=this;if(lr(s)||(s=qe(this,s,n)),!(n instanceof So)){if(be(n))return n.forEach(function(a){return o.add(a,s)}),this;if(ce(n))return this.addLabel(n,s);if(Yt(n))n=te.delayedCall(0,n);else return this}return this!==n?Di(this,n,s):this},e.getChildren=function(n,s,o,a){n===void 0&&(n=!0),s===void 0&&(s=!0),o===void 0&&(o=!0),a===void 0&&(a=-$e);for(var l=[],h=this._first;h;)h._start>=a&&(h instanceof te?s&&l.push(h):(o&&l.push(h),n&&l.push.apply(l,h.getChildren(!0,s,o)))),h=h._next;return l},e.getById=function(n){for(var s=this.getChildren(1,1,1),o=s.length;o--;)if(s[o].vars.id===n)return s[o]},e.remove=function(n){return ce(n)?this.removeLabel(n):Yt(n)?this.killTweensOf(n):(Tl(this,n),n===this._recent&&(this._recent=this._last),Sn(this))},e.totalTime=function(n,s){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=ue(Ze.time-(this._ts>0?n/this._ts:(this.totalDuration()-n)/-this._ts))),i.prototype.totalTime.call(this,n,s),this._forcing=0,this):this._tTime},e.addLabel=function(n,s){return this.labels[n]=qe(this,s),this},e.removeLabel=function(n){return delete this.labels[n],this},e.addPause=function(n,s,o){var a=te.delayedCall(0,s||go,o);return a.data="isPause",this._hasPause=1,Di(this,a,qe(this,n))},e.removePause=function(n){var s=this._first;for(n=qe(this,n);s;)s._start===n&&s.data==="isPause"&&Ur(s),s=s._next},e.killTweensOf=function(n,s,o){for(var a=this.getTweensOf(n,o),l=a.length;l--;)Zr!==a[l]&&a[l].kill(n,s);return this},e.getTweensOf=function(n,s){for(var o=[],a=ti(n),l=this._first,h=lr(s),c;l;)l instanceof te?sC(l._targets,a)&&(h?(!Zr||l._initted&&l._ts)&&l.globalTime(0)<=s&&l.globalTime(l.totalDuration())>s:!s||l.isActive())&&o.push(l):(c=l.getTweensOf(a,s)).length&&o.push.apply(o,c),l=l._next;return o},e.tweenTo=function(n,s){s=s||{};var o=this,a=qe(o,n),l=s,h=l.startAt,c=l.onStart,u=l.onStartParams,d=l.immediateRender,f,p=te.to(o,Qe({ease:s.ease||"none",lazy:!1,immediateRender:!1,time:a,overwrite:"auto",duration:s.duration||Math.abs((a-(h&&"time"in h?h.time:o._time))/o.timeScale())||Ft,onStart:function(){if(o.pause(),!f){var g=s.duration||Math.abs((a-(h&&"time"in h?h.time:o._time))/o.timeScale());p._dur!==g&&ys(p,g,0,1).render(p._time,!0,!0),f=1}c&&c.apply(p,u||[])}},s));return d?p.render(0):p},e.tweenFromTo=function(n,s,o){return this.tweenTo(s,Qe({startAt:{time:qe(this,n)}},o))},e.recent=function(){return this._recent},e.nextLabel=function(n){return n===void 0&&(n=this._time),Ng(this,qe(this,n))},e.previousLabel=function(n){return n===void 0&&(n=this._time),Ng(this,qe(this,n),1)},e.currentLabel=function(n){return arguments.length?this.seek(n,!0):this.previousLabel(this._time+Ft)},e.shiftChildren=function(n,s,o){o===void 0&&(o=0);for(var a=this._first,l=this.labels,h;a;)a._start>=o&&(a._start+=n,a._end+=n),a=a._next;if(s)for(h in l)l[h]>=o&&(l[h]+=n);return Sn(this)},e.invalidate=function(n){var s=this._first;for(this._lock=0;s;)s.invalidate(n),s=s._next;return i.prototype.invalidate.call(this,n)},e.clear=function(n){n===void 0&&(n=!0);for(var s=this._first,o;s;)o=s._next,this.remove(s),s=o;return this._dp&&(this._time=this._tTime=this._pTime=0),n&&(this.labels={}),Sn(this)},e.totalDuration=function(n){var s=0,o=this,a=o._last,l=$e,h,c,u;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-n:n));if(o._dirty){for(u=o.parent;a;)h=a._prev,a._dirty&&a.totalDuration(),c=a._start,c>l&&o._sort&&a._ts&&!o._lock?(o._lock=1,Di(o,a,c-a._delay,1)._lock=0):l=c,c<0&&a._ts&&(s-=c,(!u&&!o._dp||u&&u.smoothChildTiming)&&(o._start+=c/o._ts,o._time-=c,o._tTime-=c),o.shiftChildren(-c,!1,-1/0),l=0),a._end>s&&a._ts&&(s=a._end),a=h;ys(o,o===Ht&&o._time>s?o._time:s,1,1),o._dirty=0}return o._tDur},t.updateRoot=function(n){if(Ht._ts&&(_g(Ht,Sl(n,Ht)),yg=Ze.frame),Ze.frame>=bg){bg+=Be.autoSleep||120;var s=Ht._first;if((!s||!s._ts)&&Be.autoSleep&&Ze._listeners.length<2){for(;s&&!s._ts;)s=s._next;s||Ze.sleep()}}},t}(So);Qe(Ce.prototype,{_lock:0,_hasPause:0,_forcing:0});var AC=function(t,e,r,n,s,o,a){var l=new Re(this._pt,t,e,0,1,qg,null,s),h=0,c=0,u,d,f,p,m,g,y,x;for(l.b=r,l.e=n,r+="",n+="",(y=~n.indexOf("random("))&&(n=_o(n)),o&&(x=[r,n],o(x,t,e),r=x[0],n=x[1]),d=r.match(Ru)||[];u=Ru.exec(n);)p=u[0],m=n.substring(h,u.index),f?f=(f+1)%5:m.substr(-5)==="rgba("&&(f=1),p!==d[c++]&&(g=parseFloat(d[c-1])||0,l._pt={_next:l._pt,p:m||c===1?m:",",s:g,c:p.charAt(1)==="="?ms(g,p)-g:parseFloat(p)-g,m:f&&f<4?Math.round:0},h=Ru.lastIndex);return l.c=h<n.length?n.substring(h,n.length):"",l.fp=a,(dg.test(n)||y)&&(l.e=0),this._pt=l,l},zu=function(t,e,r,n,s,o,a,l,h,c){Yt(n)&&(n=n(s||0,t,o));var u=t[e],d=r!=="get"?r:Yt(u)?h?t[e.indexOf("set")||!Yt(t["get"+e.substr(3)])?e:"get"+e.substr(3)](h):t[e]():u,f=Yt(u)?h?GC:$g:Ju,p;if(ce(n)&&(~n.indexOf("random(")&&(n=_o(n)),n.charAt(1)==="="&&(p=ms(d,n)+(xe(d)||0),(p||p===0)&&(n=p))),!c||d!==n||Yu)return!isNaN(d*n)&&n!==""?(p=new Re(this._pt,t,e,+d||0,n-(d||0),typeof u=="boolean"?FC:Qg,0,f),h&&(p.fp=h),a&&p.modifier(a,this,t),this._pt=p):(!u&&!(e in t)&&Gu(e,n),AC.call(this,t,e,d,n,f,l||Be.stringFilter,h))},MC=function(t,e,r,n,s){if(Yt(t)&&(t=Co(t,s,e,r,n)),!ki(t)||t.style&&t.nodeType||be(t)||cg(t))return ce(t)?Co(t,s,e,r,n):t;var o={},a;for(a in t)o[a]=Co(t[a],s,e,r,n);return o},Yg=function(t,e,r,n,s,o){var a,l,h,c;if(Xe[t]&&(a=new Xe[t]).init(s,a.rawVars?e[t]:MC(e[t],n,s,o,r),r,n,o)!==!1&&(r._pt=l=new Re(r._pt,s,t,0,1,a.render,a,0,a.priority),r!==bs))for(h=r._ptLookup[r._targets.indexOf(s)],c=a._props.length;c--;)h[a._props[c]]=l;return a},Zr,Yu,ju=function i(t,e,r){var n=t.vars,s=n.ease,o=n.startAt,a=n.immediateRender,l=n.lazy,h=n.onUpdate,c=n.runBackwards,u=n.yoyoEase,d=n.keyframes,f=n.autoRevert,p=t._dur,m=t._startAt,g=t._targets,y=t.parent,x=y&&y.data==="nested"?y.vars.targets:g,b=t._overwrite==="auto"&&!Cu,v=t.timeline,w,S,E,I,A,L,G,F,M,N,W,K,H;if(v&&(!d||!s)&&(s="none"),t._ease=Cn(s,fs.ease),t._yEase=u?Vg(Cn(u===!0?s:u,fs.ease)):0,u&&t._yoyo&&!t._repeat&&(u=t._yEase,t._yEase=t._ease,t._ease=u),t._from=!v&&!!n.runBackwards,!v||d&&!n.stagger){if(F=g[0]?wn(g[0]).harness:0,K=F&&n[F.prop],w=wl(n,ku),m&&(m._zTime<0&&m.progress(1),e<0&&c&&a&&!f?m.render(-1,!0):m.revert(c&&p?xl:rC),m._lazy=0),o){if(Ur(t._startAt=te.set(g,Qe({data:"isStart",overwrite:!1,parent:y,immediateRender:!0,lazy:!m&&Ae(l),startAt:null,delay:0,onUpdate:h&&function(){return We(t,"onUpdate")},stagger:0},o))),t._startAt._dp=0,t._startAt._sat=t,e<0&&(ye||!a&&!f)&&t._startAt.revert(xl),a&&p&&e<=0&&r<=0){e&&(t._zTime=e);return}}else if(c&&p&&!m){if(e&&(a=!1),E=Qe({overwrite:!1,data:"isFromStart",lazy:a&&!m&&Ae(l),immediateRender:a,stagger:0,parent:y},w),K&&(E[F.prop]=K),Ur(t._startAt=te.set(g,E)),t._startAt._dp=0,t._startAt._sat=t,e<0&&(ye?t._startAt.revert(xl):t._startAt.render(-1,!0)),t._zTime=e,!a)i(t._startAt,Ft,Ft);else if(!e)return}for(t._pt=t._ptCache=0,l=p&&Ae(l)||l&&!p,S=0;S<g.length;S++){if(A=g[S],G=A._gsap||Ou(g)[S]._gsap,t._ptLookup[S]=N={},Fu[G.id]&&Br.length&&vl(),W=x===g?S:x.indexOf(A),F&&(M=new F).init(A,K||w,t,W,x)!==!1&&(t._pt=I=new Re(t._pt,A,M.name,0,1,M.render,M,0,M.priority),M._props.forEach(function(j){N[j]=I}),M.priority&&(L=1)),!F||K)for(E in w)Xe[E]&&(M=Yg(E,w,t,W,A,x))?M.priority&&(L=1):N[E]=I=zu.call(t,A,E,"get",w[E],W,x,0,n.stringFilter);t._op&&t._op[S]&&t.kill(A,t._op[S]),b&&t._pt&&(Zr=t,Ht.killTweensOf(A,N,t.globalTime(e)),H=!t.parent,Zr=0),t._pt&&l&&(Fu[G.id]=1)}L&&ty(t),t._onInit&&t._onInit(t)}t._onUpdate=h,t._initted=(!t._op||t._pt)&&!H,d&&e<=0&&v.render($e,!0,!0)},RC=function(t,e,r,n,s,o,a,l){var h=(t._pt&&t._ptCache||(t._ptCache={}))[e],c,u,d,f;if(!h)for(h=t._ptCache[e]=[],d=t._ptLookup,f=t._targets.length;f--;){if(c=d[f][e],c&&c.d&&c.d._pt)for(c=c.d._pt;c&&c.p!==e&&c.fp!==e;)c=c._next;if(!c)return Yu=1,t.vars[e]="+=0",ju(t,a),Yu=0,l?mo(e+" not eligible for reset"):1;h.push(c)}for(f=h.length;f--;)u=h[f],c=u._pt||u,c.s=(n||n===0)&&!s?n:c.s+(n||0)+o*c.c,c.c=r-c.s,u.e&&(u.e=Jt(r)+xe(u.e)),u.b&&(u.b=c.s+xe(u.b))},PC=function(t,e){var r=t[0]?wn(t[0]).harness:0,n=r&&r.aliases,s,o,a,l;if(!n)return e;s=Tn({},e);for(o in n)if(o in s)for(l=n[o].split(","),a=l.length;a--;)s[l[a]]=s[o];return s},LC=function(t,e,r,n){var s=e.ease||n||"power1.inOut",o,a;if(be(e))a=r[t]||(r[t]=[]),e.forEach(function(l,h){return a.push({t:h/(e.length-1)*100,v:l,e:s})});else for(o in e)a=r[o]||(r[o]=[]),o==="ease"||a.push({t:parseFloat(t),v:e[o],e:s})},Co=function(t,e,r,n,s){return Yt(t)?t.call(e,r,n,s):ce(t)&&~t.indexOf("random(")?_o(t):t},jg=Nu+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",Jg={};Me(jg+",id,stagger,delay,duration,paused,scrollTrigger",function(i){return Jg[i]=1});var te=function(i){lg(t,i);function t(r,n,s,o){var a;typeof n=="number"&&(s.duration=n,n=s,s=null),a=i.call(this,o?n:yo(n))||this;var l=a.vars,h=l.duration,c=l.delay,u=l.immediateRender,d=l.stagger,f=l.overwrite,p=l.keyframes,m=l.defaults,g=l.scrollTrigger,y=l.yoyoEase,x=n.parent||Ht,b=(be(r)||cg(r)?lr(r[0]):"length"in n)?[r]:ti(r),v,w,S,E,I,A,L,G;if(a._targets=b.length?Ou(b):mo("GSAP target "+r+" not found. https://gsap.com",!Be.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=f,p||d||yl(h)||yl(c)){if(n=a.vars,v=a.timeline=new Ce({data:"nested",defaults:m||{},targets:x&&x.data==="nested"?x.vars.targets:b}),v.kill(),v.parent=v._dp=ar(a),v._start=0,d||yl(h)||yl(c)){if(E=b.length,L=d&&Lg(d),ki(d))for(I in d)~jg.indexOf(I)&&(G||(G={}),G[I]=d[I]);for(w=0;w<E;w++)S=wl(n,Jg),S.stagger=0,y&&(S.yoyoEase=y),G&&Tn(S,G),A=b[w],S.duration=+Co(h,ar(a),w,A,b),S.delay=(+Co(c,ar(a),w,A,b)||0)-a._delay,!d&&E===1&&S.delay&&(a._delay=c=S.delay,a._start+=c,S.delay=0),v.to(A,S,L?L(w,A,b):0),v._ease=Et.none;v.duration()?h=c=0:a.timeline=0}else if(p){yo(Qe(v.vars.defaults,{ease:"none"})),v._ease=Cn(p.ease||n.ease||"none");var F=0,M,N,W;if(be(p))p.forEach(function(K){return v.to(b,K,">")}),v.duration();else{S={};for(I in p)I==="ease"||I==="easeEach"||LC(I,p[I],S,p.easeEach);for(I in S)for(M=S[I].sort(function(K,H){return K.t-H.t}),F=0,w=0;w<M.length;w++)N=M[w],W={ease:N.e,duration:(N.t-(w?M[w-1].t:0))/100*h},W[I]=N.v,v.to(b,W,F),F+=W.duration;v.duration()<h&&v.to({},{duration:h-v.duration()})}}h||a.duration(h=v.duration())}else a.timeline=0;return f===!0&&!Cu&&(Zr=ar(a),Ht.killTweensOf(b),Zr=0),Di(x,ar(a),s),n.reversed&&a.reverse(),n.paused&&a.paused(!0),(u||!h&&!p&&a._start===ue(x._time)&&Ae(u)&&hC(ar(a))&&x.data!=="nested")&&(a._tTime=-Ft,a.render(Math.max(0,-c)||0)),g&&Ig(ar(a),g),a}var e=t.prototype;return e.render=function(n,s,o){var a=this._time,l=this._tDur,h=this._dur,c=n<0,u=n>l-Ft&&!c?l:n<Ft?0:n,d,f,p,m,g,y,x,b,v;if(!h)uC(this,n,s,o);else if(u!==this._tTime||!n||o||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==c){if(d=u,b=this.timeline,this._repeat){if(m=h+this._rDelay,this._repeat<-1&&c)return this.totalTime(m*100+n,s,o);if(d=ue(u%m),u===l?(p=this._repeat,d=h):(p=~~(u/m),p&&p===ue(u/m)&&(d=h,p--),d>h&&(d=h)),y=this._yoyo&&p&1,y&&(v=this._yEase,d=h-d),g=gs(this._tTime,m),d===a&&!o&&this._initted&&p===g)return this._tTime=u,this;p!==g&&(b&&this._yEase&&Hg(b,y),this.vars.repeatRefresh&&!y&&!this._lock&&this._time!==m&&this._initted&&(this._lock=o=1,this.render(ue(m*p),!0).invalidate()._lock=0))}if(!this._initted){if(Ag(this,c?n:d,o,s,u))return this._tTime=0,this;if(a!==this._time&&!(o&&this.vars.repeatRefresh&&p!==g))return this;if(h!==this._dur)return this.render(n,s,o)}if(this._tTime=u,this._time=d,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=x=(v||this._ease)(d/h),this._from&&(this.ratio=x=1-x),d&&!a&&!s&&!p&&(We(this,"onStart"),this._tTime!==u))return this;for(f=this._pt;f;)f.r(x,f.d),f=f._next;b&&b.render(n<0?n:b._dur*b._ease(d/this._dur),s,o)||this._startAt&&(this._zTime=n),this._onUpdate&&!s&&(c&&Bu(this,n,s,o),We(this,"onUpdate")),this._repeat&&p!==g&&this.vars.onRepeat&&!s&&this.parent&&We(this,"onRepeat"),(u===this._tDur||!u)&&this._tTime===u&&(c&&!this._onUpdate&&Bu(this,n,!0,!0),(n||!h)&&(u===this._tDur&&this._ts>0||!u&&this._ts<0)&&Ur(this,1),!s&&!(c&&!a)&&(u||a||y)&&(We(this,u===l?"onComplete":"onReverseComplete",!0),this._prom&&!(u<l&&this.timeScale()>0)&&this._prom()))}return this},e.targets=function(){return this._targets},e.invalidate=function(n){return(!n||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(n),i.prototype.invalidate.call(this,n)},e.resetTo=function(n,s,o,a,l){To||Ze.wake(),this._ts||this.play();var h=Math.min(this._dur,(this._dp._time-this._start)*this._ts),c;return this._initted||ju(this,h),c=this._ease(h/this._dur),RC(this,n,s,o,a,c,h,l)?this.resetTo(n,s,o,a,1):(El(this,0),this.parent||Sg(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},e.kill=function(n,s){if(s===void 0&&(s="all"),!n&&(!s||s==="all"))return this._lazy=this._pt=0,this.parent?vo(this):this;if(this.timeline){var o=this.timeline.totalDuration();return this.timeline.killTweensOf(n,s,Zr&&Zr.vars.overwrite!==!0)._first||vo(this),this.parent&&o!==this.timeline.totalDuration()&&ys(this,this._dur*this.timeline._tDur/o,0,1),this}var a=this._targets,l=n?ti(n):a,h=this._ptLookup,c=this._pt,u,d,f,p,m,g,y;if((!s||s==="all")&&aC(a,l))return s==="all"&&(this._pt=0),vo(this);for(u=this._op=this._op||[],s!=="all"&&(ce(s)&&(m={},Me(s,function(x){return m[x]=1}),s=m),s=PC(a,s)),y=a.length;y--;)if(~l.indexOf(a[y])){d=h[y],s==="all"?(u[y]=s,p=d,f={}):(f=u[y]=u[y]||{},p=s);for(m in p)g=d&&d[m],g&&((!("kill"in g.d)||g.d.kill(m)===!0)&&Tl(this,g,"_pt"),delete d[m]),f!=="all"&&(f[m]=1)}return this._initted&&!this._pt&&c&&vo(this),this},t.to=function(n,s){return new t(n,s,arguments[2])},t.from=function(n,s){return bo(1,arguments)},t.delayedCall=function(n,s,o,a){return new t(s,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:n,onComplete:s,onReverseComplete:s,onCompleteParams:o,onReverseCompleteParams:o,callbackScope:a})},t.fromTo=function(n,s,o){return bo(2,arguments)},t.set=function(n,s){return s.duration=0,s.repeatDelay||(s.repeat=0),new t(n,s)},t.killTweensOf=function(n,s,o){return Ht.killTweensOf(n,s,o)},t}(So);Qe(te.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),Me("staggerTo,staggerFrom,staggerFromTo",function(i){te[i]=function(){var t=new Ce,e=Xu.call(arguments,0);return e.splice(i==="staggerFromTo"?5:4,0,0),t[i].apply(t,e)}});var Ju=function(t,e,r){return t[e]=r},$g=function(t,e,r){return t[e](r)},GC=function(t,e,r,n){return t[e](n.fp,r)},kC=function(t,e,r){return t.setAttribute(e,r)},$u=function(t,e){return Yt(t[e])?$g:Iu(t[e])&&t.setAttribute?kC:Ju},Qg=function(t,e){return e.set(e.t,e.p,Math.round((e.s+e.c*t)*1e6)/1e6,e)},FC=function(t,e){return e.set(e.t,e.p,!!(e.s+e.c*t),e)},qg=function(t,e){var r=e._pt,n="";if(!t&&e.b)n=e.b;else if(t===1&&e.e)n=e.e;else{for(;r;)n=r.p+(r.m?r.m(r.s+r.c*t):Math.round((r.s+r.c*t)*1e4)/1e4)+n,r=r._next;n+=e.c}e.set(e.t,e.p,n,e)},Qu=function(t,e){for(var r=e._pt;r;)r.r(t,r.d),r=r._next},DC=function(t,e,r,n){for(var s=this._pt,o;s;)o=s._next,s.p===n&&s.modifier(t,e,r),s=o},NC=function(t){for(var e=this._pt,r,n;e;)n=e._next,e.p===t&&!e.op||e.op===t?Tl(this,e,"_pt"):e.dep||(r=1),e=n;return!r},OC=function(t,e,r,n){n.mSet(t,e,n.m.call(n.tween,r,n.mt),n)},ty=function(t){for(var e=t._pt,r,n,s,o;e;){for(r=e._next,n=s;n&&n.pr>e.pr;)n=n._next;(e._prev=n?n._prev:o)?e._prev._next=e:s=e,(e._next=n)?n._prev=e:o=e,e=r}t._pt=s},Re=function(){function i(e,r,n,s,o,a,l,h,c){this.t=r,this.s=s,this.c=o,this.p=n,this.r=a||Qg,this.d=l||this,this.set=h||Ju,this.pr=c||0,this._next=e,e&&(e._prev=this)}var t=i.prototype;return t.modifier=function(r,n,s){this.mSet=this.mSet||this.set,this.set=OC,this.m=r,this.mt=s,this.tween=n},i}();Me(Nu+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(i){return ku[i]=1}),Ue.TweenMax=Ue.TweenLite=te,Ue.TimelineLite=Ue.TimelineMax=Ce,Ht=new Ce({sortChildren:!1,defaults:fs,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),Be.stringFilter=Zg;var In=[],Il={},BC=[],ey=0,UC=0,qu=function(t){return(Il[t]||BC).map(function(e){return e()})},td=function(){var t=Date.now(),e=[];t-ey>2&&(qu("matchMediaInit"),In.forEach(function(r){var n=r.queries,s=r.conditions,o,a,l,h;for(a in n)o=Fi.matchMedia(n[a]).matches,o&&(l=1),o!==s[a]&&(s[a]=o,h=1);h&&(r.revert(),l&&e.push(r))}),qu("matchMediaRevert"),e.forEach(function(r){return r.onMatch(r,function(n){return r.add(null,n)})}),ey=t,qu("matchMedia"))},iy=function(){function i(e,r){this.selector=r&&Wu(r),this.data=[],this._r=[],this.isReverted=!1,this.id=UC++,e&&this.add(e)}var t=i.prototype;return t.add=function(r,n,s){Yt(r)&&(s=n,n=r,r=Yt);var o=this,a=function(){var h=Ut,c=o.selector,u;return h&&h!==o&&h.data.push(o),s&&(o.selector=Wu(s)),Ut=o,u=n.apply(o,arguments),Yt(u)&&o._r.push(u),Ut=h,o.selector=c,o.isReverted=!1,u};return o.last=a,r===Yt?a(o,function(l){return o.add(null,l)}):r?o[r]=a:a},t.ignore=function(r){var n=Ut;Ut=null,r(this),Ut=n},t.getTweens=function(){var r=[];return this.data.forEach(function(n){return n instanceof i?r.push.apply(r,n.getTweens()):n instanceof te&&!(n.parent&&n.parent.data==="nested")&&r.push(n)}),r},t.clear=function(){this._r.length=this.data.length=0},t.kill=function(r,n){var s=this;if(r?function(){for(var a=s.getTweens(),l=s.data.length,h;l--;)h=s.data[l],h.data==="isFlip"&&(h.revert(),h.getChildren(!0,!0,!1).forEach(function(c){return a.splice(a.indexOf(c),1)}));for(a.map(function(c){return{g:c._dur||c._delay||c._sat&&!c._sat.vars.immediateRender?c.globalTime(0):-1/0,t:c}}).sort(function(c,u){return u.g-c.g||-1/0}).forEach(function(c){return c.t.revert(r)}),l=s.data.length;l--;)h=s.data[l],h instanceof Ce?h.data!=="nested"&&(h.scrollTrigger&&h.scrollTrigger.revert(),h.kill()):!(h instanceof te)&&h.revert&&h.revert(r);s._r.forEach(function(c){return c(r,s)}),s.isReverted=!0}():this.data.forEach(function(a){return a.kill&&a.kill()}),this.clear(),n)for(var o=In.length;o--;)In[o].id===this.id&&In.splice(o,1)},t.revert=function(r){this.kill(r||{})},i}(),XC=function(){function i(e){this.contexts=[],this.scope=e,Ut&&Ut.data.push(this)}var t=i.prototype;return t.add=function(r,n,s){ki(r)||(r={matches:r});var o=new iy(0,s||this.scope),a=o.conditions={},l,h,c;Ut&&!o.selector&&(o.selector=Ut.selector),this.contexts.push(o),n=o.add("onMatch",n),o.queries=r;for(h in r)h==="all"?c=1:(l=Fi.matchMedia(r[h]),l&&(In.indexOf(o)<0&&In.push(o),(a[h]=l.matches)&&(c=1),l.addListener?l.addListener(td):l.addEventListener("change",td)));return c&&n(o,function(u){return o.add(null,u)}),this},t.revert=function(r){this.kill(r||{})},t.kill=function(r){this.contexts.forEach(function(n){return n.kill(r,!0)})},i}(),Al={registerPlugin:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];e.forEach(function(n){return Bg(n)})},timeline:function(t){return new Ce(t)},getTweensOf:function(t,e){return Ht.getTweensOf(t,e)},getProperty:function(t,e,r,n){ce(t)&&(t=ti(t)[0]);var s=wn(t||{}).get,o=r?wg:vg;return r==="native"&&(r=""),t&&(e?o((Xe[e]&&Xe[e].get||s)(t,e,r,n)):function(a,l,h){return o((Xe[a]&&Xe[a].get||s)(t,a,l,h))})},quickSetter:function(t,e,r){if(t=ti(t),t.length>1){var n=t.map(function(c){return Pe.quickSetter(c,e,r)}),s=n.length;return function(c){for(var u=s;u--;)n[u](c)}}t=t[0]||{};var o=Xe[e],a=wn(t),l=a.harness&&(a.harness.aliases||{})[e]||e,h=o?function(c){var u=new o;bs._pt=0,u.init(t,r?c+r:c,bs,0,[t]),u.render(1,u),bs._pt&&Qu(1,bs)}:a.set(t,l);return o?h:function(c){return h(t,l,r?c+r:c,a,1)}},quickTo:function(t,e,r){var n,s=Pe.to(t,Tn((n={},n[e]="+=0.1",n.paused=!0,n),r||{})),o=function(l,h,c){return s.resetTo(e,l,h,c)};return o.tween=s,o},isTweening:function(t){return Ht.getTweensOf(t,!0).length>0},defaults:function(t){return t&&t.ease&&(t.ease=Cn(t.ease,fs.ease)),Tg(fs,t||{})},config:function(t){return Tg(Be,t||{})},registerEffect:function(t){var e=t.name,r=t.effect,n=t.plugins,s=t.defaults,o=t.extendTimeline;(n||"").split(",").forEach(function(a){return a&&!Xe[a]&&!Ue[a]&&mo(e+" effect requires "+a+" plugin.")}),Du[e]=function(a,l,h){return r(ti(a),Qe(l||{},s),h)},o&&(Ce.prototype[e]=function(a,l,h){return this.add(Du[e](a,ki(l)?l:(h=l)&&{},this),h)})},registerEase:function(t,e){Et[t]=Cn(e)},parseEase:function(t,e){return arguments.length?Cn(t,e):Et},getById:function(t){return Ht.getById(t)},exportRoot:function(t,e){t===void 0&&(t={});var r=new Ce(t),n,s;for(r.smoothChildTiming=Ae(t.smoothChildTiming),Ht.remove(r),r._dp=0,r._time=r._tTime=Ht._time,n=Ht._first;n;)s=n._next,(e||!(!n._dur&&n instanceof te&&n.vars.onComplete===n._targets[0]))&&Di(r,n,n._start-n._delay),n=s;return Di(Ht,r,0),r},context:function(t,e){return t?new iy(t,e):Ut},matchMedia:function(t){return new XC(t)},matchMediaRefresh:function(){return In.forEach(function(t){var e=t.conditions,r,n;for(n in e)e[n]&&(e[n]=!1,r=1);r&&t.revert()})||td()},addEventListener:function(t,e){var r=Il[t]||(Il[t]=[]);~r.indexOf(e)||r.push(e)},removeEventListener:function(t,e){var r=Il[t],n=r&&r.indexOf(e);n>=0&&r.splice(n,1)},utils:{wrap:xC,wrapYoyo:_C,distribute:Lg,random:kg,snap:Gg,normalize:bC,getUnit:xe,clamp:pC,splitColor:Ug,toArray:ti,selector:Wu,mapRange:Dg,pipe:gC,unitize:yC,interpolate:vC,shuffle:Pg},install:mg,effects:Du,ticker:Ze,updateRoot:Ce.updateRoot,plugins:Xe,globalTimeline:Ht,core:{PropTween:Re,globals:gg,Tween:te,Timeline:Ce,Animation:So,getCache:wn,_removeLinkedListItem:Tl,reverting:function(){return ye},context:function(t){return t&&Ut&&(Ut.data.push(t),t._ctx=Ut),Ut},suppressOverwrites:function(t){return Cu=t}}};Me("to,from,fromTo,delayedCall,set,killTweensOf",function(i){return Al[i]=te[i]}),Ze.add(Ce.updateRoot),bs=Al.to({},{duration:0});var WC=function(t,e){for(var r=t._pt;r&&r.p!==e&&r.op!==e&&r.fp!==e;)r=r._next;return r},ZC=function(t,e){var r=t._targets,n,s,o;for(n in e)for(s=r.length;s--;)o=t._ptLookup[s][n],o&&(o=o.d)&&(o._pt&&(o=WC(o,n)),o&&o.modifier&&o.modifier(e[n],t,r[s],n))},ed=function(t,e){return{name:t,rawVars:1,init:function(n,s,o){o._onInit=function(a){var l,h;if(ce(s)&&(l={},Me(s,function(c){return l[c]=1}),s=l),e){l={};for(h in s)l[h]=e(s[h]);s=l}ZC(a,s)}}}},Pe=Al.registerPlugin({name:"attr",init:function(t,e,r,n,s){var o,a,l;this.tween=r;for(o in e)l=t.getAttribute(o)||"",a=this.add(t,"setAttribute",(l||0)+"",e[o],n,s,0,0,o),a.op=o,a.b=l,this._props.push(o)},render:function(t,e){for(var r=e._pt;r;)ye?r.set(r.t,r.p,r.b,r):r.r(t,r.d),r=r._next}},{name:"endArray",init:function(t,e){for(var r=e.length;r--;)this.add(t,r,t[r]||0,e[r],0,0,0,0,0,1)}},ed("roundProps",Zu),ed("modifiers"),ed("snap",Gg))||Al;te.version=Ce.version=Pe.version="3.12.5",pg=1,Au()&&xs(),Et.Power0,Et.Power1,Et.Power2,Et.Power3,Et.Power4,Et.Linear,Et.Quad,Et.Cubic,Et.Quart,Et.Quint,Et.Strong,Et.Elastic,Et.Back,Et.SteppedEase,Et.Bounce,Et.Sine,Et.Expo,Et.Circ;/*!
1167
+ */var Be={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},fs={duration:.5,overwrite:!1,delay:0},Cu,ye,Ut,$e=1e8,Ft=1/$e,Eu=Math.PI*2,QS=Eu/4,qS=0,hg=Math.sqrt,tC=Math.cos,eC=Math.sin,ce=function(t){return typeof t=="string"},Yt=function(t){return typeof t=="function"},lr=function(t){return typeof t=="number"},Iu=function(t){return typeof t>"u"},ki=function(t){return typeof t=="object"},Ae=function(t){return t!==!1},Au=function(){return typeof window<"u"},yl=function(t){return Yt(t)||ce(t)},cg=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},be=Array.isArray,Mu=/(?:-?\.?\d|\.)+/gi,ug=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,ps=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,Ru=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,dg=/[+-]=-?[.\d]+/,fg=/[^,'"\[\]\s]+/gi,iC=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,Ht,Fi,Pu,Lu,Ue={},bl={},pg,mg=function(t){return(bl=Tn(t,Ue))&&Pe},Gu=function(t,e){return console.warn("Invalid property",t,"set to",e,"Missing plugin? gsap.registerPlugin()")},mo=function(t,e){return!e&&console.warn(t)},gg=function(t,e){return t&&(Ue[t]=e)&&bl&&(bl[t]=e)||Ue},go=function(){return 0},rC={suppressEvents:!0,isStart:!0,kill:!1},xl={suppressEvents:!0,kill:!1},nC={suppressEvents:!0},ku={},Br=[],Fu={},yg,Xe={},Du={},bg=30,_l=[],Nu="",Ou=function(t){var e=t[0],r,n;if(ki(e)||Yt(e)||(t=[t]),!(r=(e._gsap||{}).harness)){for(n=_l.length;n--&&!_l[n].targetTest(e););r=_l[n]}for(n=t.length;n--;)t[n]&&(t[n]._gsap||(t[n]._gsap=new zg(t[n],r)))||t.splice(n,1);return t},wn=function(t){return t._gsap||Ou(ti(t))[0]._gsap},xg=function(t,e,r){return(r=t[e])&&Yt(r)?t[e]():Iu(r)&&t.getAttribute&&t.getAttribute(e)||r},Me=function(t,e){return(t=t.split(",")).forEach(e)||t},Jt=function(t){return Math.round(t*1e5)/1e5||0},ue=function(t){return Math.round(t*1e7)/1e7||0},ms=function(t,e){var r=e.charAt(0),n=parseFloat(e.substr(2));return t=parseFloat(t),r==="+"?t+n:r==="-"?t-n:r==="*"?t*n:t/n},sC=function(t,e){for(var r=e.length,n=0;t.indexOf(e[n])<0&&++n<r;);return n<r},vl=function(){var t=Br.length,e=Br.slice(0),r,n;for(Fu={},Br.length=0,r=0;r<t;r++)n=e[r],n&&n._lazy&&(n.render(n._lazy[0],n._lazy[1],!0)._lazy=0)},_g=function(t,e,r,n){Br.length&&!ye&&vl(),t.render(e,r,n||ye&&e<0&&(t._initted||t._startAt)),Br.length&&!ye&&vl()},vg=function(t){var e=parseFloat(t);return(e||e===0)&&(t+"").match(fg).length<2?e:ce(t)?t.trim():t},wg=function(t){return t},Qe=function(t,e){for(var r in e)r in t||(t[r]=e[r]);return t},oC=function(t){return function(e,r){for(var n in r)n in e||n==="duration"&&t||n==="ease"||(e[n]=r[n])}},Tn=function(t,e){for(var r in e)t[r]=e[r];return t},Tg=function i(t,e){for(var r in e)r!=="__proto__"&&r!=="constructor"&&r!=="prototype"&&(t[r]=ki(e[r])?i(t[r]||(t[r]={}),e[r]):e[r]);return t},wl=function(t,e){var r={},n;for(n in t)n in e||(r[n]=t[n]);return r},yo=function(t){var e=t.parent||Ht,r=t.keyframes?oC(be(t.keyframes)):Qe;if(Ae(t.inherit))for(;e;)r(t,e.vars.defaults),e=e.parent||e._dp;return t},aC=function(t,e){for(var r=t.length,n=r===e.length;n&&r--&&t[r]===e[r];);return r<0},Sg=function(t,e,r,n,s){r===void 0&&(r="_first"),n===void 0&&(n="_last");var o=t[n],a;if(s)for(a=e[s];o&&o[s]>a;)o=o._prev;return o?(e._next=o._next,o._next=e):(e._next=t[r],t[r]=e),e._next?e._next._prev=e:t[n]=e,e._prev=o,e.parent=e._dp=t,e},Tl=function(t,e,r,n){r===void 0&&(r="_first"),n===void 0&&(n="_last");var s=e._prev,o=e._next;s?s._next=o:t[r]===e&&(t[r]=o),o?o._prev=s:t[n]===e&&(t[n]=s),e._next=e._prev=e.parent=null},Ur=function(t,e){t.parent&&(!e||t.parent.autoRemoveChildren)&&t.parent.remove&&t.parent.remove(t),t._act=0},Sn=function(t,e){if(t&&(!e||e._end>t._dur||e._start<0))for(var r=t;r;)r._dirty=1,r=r.parent;return t},lC=function(t){for(var e=t.parent;e&&e.parent;)e._dirty=1,e.totalDuration(),e=e.parent;return t},Bu=function(t,e,r,n){return t._startAt&&(ye?t._startAt.revert(xl):t.vars.immediateRender&&!t.vars.autoRevert||t._startAt.render(e,!0,n))},hC=function i(t){return!t||t._ts&&i(t.parent)},Cg=function(t){return t._repeat?gs(t._tTime,t=t.duration()+t._rDelay)*t:0},gs=function(t,e){var r=Math.floor(t/=e);return t&&r===t?r-1:r},Sl=function(t,e){return(t-e._start)*e._ts+(e._ts>=0?0:e._dirty?e.totalDuration():e._tDur)},Cl=function(t){return t._end=ue(t._start+(t._tDur/Math.abs(t._ts||t._rts||Ft)||0))},El=function(t,e){var r=t._dp;return r&&r.smoothChildTiming&&t._ts&&(t._start=ue(r._time-(t._ts>0?e/t._ts:((t._dirty?t.totalDuration():t._tDur)-e)/-t._ts)),Cl(t),r._dirty||Sn(r,t)),t},Eg=function(t,e){var r;if((e._time||!e._dur&&e._initted||e._start<t._time&&(e._dur||!e.add))&&(r=Sl(t.rawTime(),e),(!e._dur||xo(0,e.totalDuration(),r)-e._tTime>Ft)&&e.render(r,!0)),Sn(t,e)._dp&&t._initted&&t._time>=t._dur&&t._ts){if(t._dur<t.duration())for(r=t;r._dp;)r.rawTime()>=0&&r.totalTime(r._tTime),r=r._dp;t._zTime=-Ft}},Di=function(t,e,r,n){return e.parent&&Ur(e),e._start=ue((lr(r)?r:r||t!==Ht?qe(t,r,e):t._time)+e._delay),e._end=ue(e._start+(e.totalDuration()/Math.abs(e.timeScale())||0)),Sg(t,e,"_first","_last",t._sort?"_start":0),Uu(e)||(t._recent=e),n||Eg(t,e),t._ts<0&&El(t,t._tTime),t},Ig=function(t,e){return(Ue.ScrollTrigger||Gu("scrollTrigger",e))&&Ue.ScrollTrigger.create(e,t)},Ag=function(t,e,r,n,s){if(ju(t,e,s),!t._initted)return 1;if(!r&&t._pt&&!ye&&(t._dur&&t.vars.lazy!==!1||!t._dur&&t.vars.lazy)&&yg!==Ze.frame)return Br.push(t),t._lazy=[s,n],1},cC=function i(t){var e=t.parent;return e&&e._ts&&e._initted&&!e._lock&&(e.rawTime()<0||i(e))},Uu=function(t){var e=t.data;return e==="isFromStart"||e==="isStart"},uC=function(t,e,r,n){var s=t.ratio,o=e<0||!e&&(!t._start&&cC(t)&&!(!t._initted&&Uu(t))||(t._ts<0||t._dp._ts<0)&&!Uu(t))?0:1,a=t._rDelay,l=0,h,c,u;if(a&&t._repeat&&(l=xo(0,t._tDur,e),c=gs(l,a),t._yoyo&&c&1&&(o=1-o),c!==gs(t._tTime,a)&&(s=1-o,t.vars.repeatRefresh&&t._initted&&t.invalidate())),o!==s||ye||n||t._zTime===Ft||!e&&t._zTime){if(!t._initted&&Ag(t,e,n,r,l))return;for(u=t._zTime,t._zTime=e||(r?Ft:0),r||(r=e&&!u),t.ratio=o,t._from&&(o=1-o),t._time=0,t._tTime=l,h=t._pt;h;)h.r(o,h.d),h=h._next;e<0&&Bu(t,e,r,!0),t._onUpdate&&!r&&We(t,"onUpdate"),l&&t._repeat&&!r&&t.parent&&We(t,"onRepeat"),(e>=t._tDur||e<0)&&t.ratio===o&&(o&&Ur(t,1),!r&&!ye&&(We(t,o?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=e)},dC=function(t,e,r){var n;if(r>e)for(n=t._first;n&&n._start<=r;){if(n.data==="isPause"&&n._start>e)return n;n=n._next}else for(n=t._last;n&&n._start>=r;){if(n.data==="isPause"&&n._start<e)return n;n=n._prev}},ys=function(t,e,r,n){var s=t._repeat,o=ue(e)||0,a=t._tTime/t._tDur;return a&&!n&&(t._time*=o/t._dur),t._dur=o,t._tDur=s?s<0?1e10:ue(o*(s+1)+t._rDelay*s):o,a>0&&!n&&El(t,t._tTime=t._tDur*a),t.parent&&Cl(t),r||Sn(t.parent,t),t},Mg=function(t){return t instanceof Ce?Sn(t):ys(t,t._dur)},fC={_start:0,endTime:go,totalDuration:go},qe=function i(t,e,r){var n=t.labels,s=t._recent||fC,o=t.duration()>=$e?s.endTime(!1):t._dur,a,l,h;return ce(e)&&(isNaN(e)||e in n)?(l=e.charAt(0),h=e.substr(-1)==="%",a=e.indexOf("="),l==="<"||l===">"?(a>=0&&(e=e.replace(/=/,"")),(l==="<"?s._start:s.endTime(s._repeat>=0))+(parseFloat(e.substr(1))||0)*(h?(a<0?s:r).totalDuration()/100:1)):a<0?(e in n||(n[e]=o),n[e]):(l=parseFloat(e.charAt(a-1)+e.substr(a+1)),h&&r&&(l=l/100*(be(r)?r[0]:r).totalDuration()),a>1?i(t,e.substr(0,a-1),r)+l:o+l)):e==null?o:+e},bo=function(t,e,r){var n=lr(e[1]),s=(n?2:1)+(t<2?0:1),o=e[s],a,l;if(n&&(o.duration=e[1]),o.parent=r,t){for(a=o,l=r;l&&!("immediateRender"in a);)a=l.vars.defaults||{},l=Ae(l.vars.inherit)&&l.parent;o.immediateRender=Ae(a.immediateRender),t<2?o.runBackwards=1:o.startAt=e[s-1]}return new te(e[0],o,e[s+1])},Xr=function(t,e){return t||t===0?e(t):e},xo=function(t,e,r){return r<t?t:r>e?e:r},xe=function(t,e){return!ce(t)||!(e=iC.exec(t))?"":e[1]},pC=function(t,e,r){return Xr(r,function(n){return xo(t,e,n)})},Xu=[].slice,Rg=function(t,e){return t&&ki(t)&&"length"in t&&(!e&&!t.length||t.length-1 in t&&ki(t[0]))&&!t.nodeType&&t!==Fi},mC=function(t,e,r){return r===void 0&&(r=[]),t.forEach(function(n){var s;return ce(n)&&!e||Rg(n,1)?(s=r).push.apply(s,ti(n)):r.push(n)})||r},ti=function(t,e,r){return Ut&&!e&&Ut.selector?Ut.selector(t):ce(t)&&!r&&(Pu||!xs())?Xu.call((e||Lu).querySelectorAll(t),0):be(t)?mC(t,r):Rg(t)?Xu.call(t,0):t?[t]:[]},Wu=function(t){return t=ti(t)[0]||mo("Invalid scope")||{},function(e){var r=t.current||t.nativeElement||t;return ti(e,r.querySelectorAll?r:r===t?mo("Invalid scope")||Lu.createElement("div"):t)}},Pg=function(t){return t.sort(function(){return .5-Math.random()})},Lg=function(t){if(Yt(t))return t;var e=ki(t)?t:{each:t},r=Cn(e.ease),n=e.from||0,s=parseFloat(e.base)||0,o={},a=n>0&&n<1,l=isNaN(n)||a,h=e.axis,c=n,u=n;return ce(n)?c=u={center:.5,edges:.5,end:1}[n]||0:!a&&l&&(c=n[0],u=n[1]),function(d,f,p){var m=(p||e).length,g=o[m],y,x,b,v,w,S,E,I,A;if(!g){if(A=e.grid==="auto"?0:(e.grid||[1,$e])[1],!A){for(E=-$e;E<(E=p[A++].getBoundingClientRect().left)&&A<m;);A<m&&A--}for(g=o[m]=[],y=l?Math.min(A,m)*c-.5:n%A,x=A===$e?0:l?m*u/A-.5:n/A|0,E=0,I=$e,S=0;S<m;S++)b=S%A-y,v=x-(S/A|0),g[S]=w=h?Math.abs(h==="y"?v:b):hg(b*b+v*v),w>E&&(E=w),w<I&&(I=w);n==="random"&&Pg(g),g.max=E-I,g.min=I,g.v=m=(parseFloat(e.amount)||parseFloat(e.each)*(A>m?m-1:h?h==="y"?m/A:A:Math.max(A,m/A))||0)*(n==="edges"?-1:1),g.b=m<0?s-m:s,g.u=xe(e.amount||e.each)||0,r=r&&m<0?Vg(r):r}return m=(g[d]-g.min)/g.max||0,ue(g.b+(r?r(m):m)*g.v)+g.u}},Zu=function(t){var e=Math.pow(10,((t+"").split(".")[1]||"").length);return function(r){var n=ue(Math.round(parseFloat(r)/t)*t*e);return(n-n%1)/e+(lr(r)?0:xe(r))}},Gg=function(t,e){var r=be(t),n,s;return!r&&ki(t)&&(n=r=t.radius||$e,t.values?(t=ti(t.values),(s=!lr(t[0]))&&(n*=n)):t=Zu(t.increment)),Xr(e,r?Yt(t)?function(o){return s=t(o),Math.abs(s-o)<=n?s:o}:function(o){for(var a=parseFloat(s?o.x:o),l=parseFloat(s?o.y:0),h=$e,c=0,u=t.length,d,f;u--;)s?(d=t[u].x-a,f=t[u].y-l,d=d*d+f*f):d=Math.abs(t[u]-a),d<h&&(h=d,c=u);return c=!n||h<=n?t[c]:o,s||c===o||lr(o)?c:c+xe(o)}:Zu(t))},kg=function(t,e,r,n){return Xr(be(t)?!e:r===!0?!!(r=0):!n,function(){return be(t)?t[~~(Math.random()*t.length)]:(r=r||1e-5)&&(n=r<1?Math.pow(10,(r+"").length-2):1)&&Math.floor(Math.round((t-r/2+Math.random()*(e-t+r*.99))/r)*r*n)/n})},gC=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(n){return e.reduce(function(s,o){return o(s)},n)}},yC=function(t,e){return function(r){return t(parseFloat(r))+(e||xe(r))}},bC=function(t,e,r){return Dg(t,e,0,1,r)},Fg=function(t,e,r){return Xr(r,function(n){return t[~~e(n)]})},xC=function i(t,e,r){var n=e-t;return be(t)?Fg(t,i(0,t.length),e):Xr(r,function(s){return(n+(s-t)%n)%n+t})},_C=function i(t,e,r){var n=e-t,s=n*2;return be(t)?Fg(t,i(0,t.length-1),e):Xr(r,function(o){return o=(s+(o-t)%s)%s||0,t+(o>n?s-o:o)})},_o=function(t){for(var e=0,r="",n,s,o,a;~(n=t.indexOf("random(",e));)o=t.indexOf(")",n),a=t.charAt(n+7)==="[",s=t.substr(n+7,o-n-7).match(a?fg:Mu),r+=t.substr(e,n-e)+kg(a?s:+s[0],a?0:+s[1],+s[2]||1e-5),e=o+1;return r+t.substr(e,t.length-e)},Dg=function(t,e,r,n,s){var o=e-t,a=n-r;return Xr(s,function(l){return r+((l-t)/o*a||0)})},vC=function i(t,e,r,n){var s=isNaN(t+e)?0:function(f){return(1-f)*t+f*e};if(!s){var o=ce(t),a={},l,h,c,u,d;if(r===!0&&(n=1)&&(r=null),o)t={p:t},e={p:e};else if(be(t)&&!be(e)){for(c=[],u=t.length,d=u-2,h=1;h<u;h++)c.push(i(t[h-1],t[h]));u--,s=function(p){p*=u;var m=Math.min(d,~~p);return c[m](p-m)},r=e}else n||(t=Tn(be(t)?[]:{},t));if(!c){for(l in e)zu.call(a,t,l,"get",e[l]);s=function(p){return Qu(p,a)||(o?t.p:t)}}}return Xr(r,s)},Ng=function(t,e,r){var n=t.labels,s=$e,o,a,l;for(o in n)a=n[o]-e,a<0==!!r&&a&&s>(a=Math.abs(a))&&(l=o,s=a);return l},We=function(t,e,r){var n=t.vars,s=n[e],o=Ut,a=t._ctx,l,h,c;if(s)return l=n[e+"Params"],h=n.callbackScope||t,r&&Br.length&&vl(),a&&(Ut=a),c=l?s.apply(h,l):s.call(h),Ut=o,c},vo=function(t){return Ur(t),t.scrollTrigger&&t.scrollTrigger.kill(!!ye),t.progress()<1&&We(t,"onInterrupt"),t},bs,Og=[],Bg=function(t){if(t)if(t=!t.name&&t.default||t,Au()||t.headless){var e=t.name,r=Yt(t),n=e&&!r&&t.init?function(){this._props=[]}:t,s={init:go,render:Qu,add:zu,kill:NC,modifier:DC,rawVars:0},o={targetTest:0,get:0,getSetter:$u,aliases:{},register:0};if(xs(),t!==n){if(Xe[e])return;Qe(n,Qe(wl(t,s),o)),Tn(n.prototype,Tn(s,wl(t,o))),Xe[n.prop=e]=n,t.targetTest&&(_l.push(n),ku[e]=1),e=(e==="css"?"CSS":e.charAt(0).toUpperCase()+e.substr(1))+"Plugin"}gg(e,n),t.register&&t.register(Pe,n,Re)}else Og.push(t)},Gt=255,wo={aqua:[0,Gt,Gt],lime:[0,Gt,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,Gt],navy:[0,0,128],white:[Gt,Gt,Gt],olive:[128,128,0],yellow:[Gt,Gt,0],orange:[Gt,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[Gt,0,0],pink:[Gt,192,203],cyan:[0,Gt,Gt],transparent:[Gt,Gt,Gt,0]},Vu=function(t,e,r){return t+=t<0?1:t>1?-1:0,(t*6<1?e+(r-e)*t*6:t<.5?r:t*3<2?e+(r-e)*(2/3-t)*6:e)*Gt+.5|0},Ug=function(t,e,r){var n=t?lr(t)?[t>>16,t>>8&Gt,t&Gt]:0:wo.black,s,o,a,l,h,c,u,d,f,p;if(!n){if(t.substr(-1)===","&&(t=t.substr(0,t.length-1)),wo[t])n=wo[t];else if(t.charAt(0)==="#"){if(t.length<6&&(s=t.charAt(1),o=t.charAt(2),a=t.charAt(3),t="#"+s+s+o+o+a+a+(t.length===5?t.charAt(4)+t.charAt(4):"")),t.length===9)return n=parseInt(t.substr(1,6),16),[n>>16,n>>8&Gt,n&Gt,parseInt(t.substr(7),16)/255];t=parseInt(t.substr(1),16),n=[t>>16,t>>8&Gt,t&Gt]}else if(t.substr(0,3)==="hsl"){if(n=p=t.match(Mu),!e)l=+n[0]%360/360,h=+n[1]/100,c=+n[2]/100,o=c<=.5?c*(h+1):c+h-c*h,s=c*2-o,n.length>3&&(n[3]*=1),n[0]=Vu(l+1/3,s,o),n[1]=Vu(l,s,o),n[2]=Vu(l-1/3,s,o);else if(~t.indexOf("="))return n=t.match(ug),r&&n.length<4&&(n[3]=1),n}else n=t.match(Mu)||wo.transparent;n=n.map(Number)}return e&&!p&&(s=n[0]/Gt,o=n[1]/Gt,a=n[2]/Gt,u=Math.max(s,o,a),d=Math.min(s,o,a),c=(u+d)/2,u===d?l=h=0:(f=u-d,h=c>.5?f/(2-u-d):f/(u+d),l=u===s?(o-a)/f+(o<a?6:0):u===o?(a-s)/f+2:(s-o)/f+4,l*=60),n[0]=~~(l+.5),n[1]=~~(h*100+.5),n[2]=~~(c*100+.5)),r&&n.length<4&&(n[3]=1),n},Xg=function(t){var e=[],r=[],n=-1;return t.split(Wr).forEach(function(s){var o=s.match(ps)||[];e.push.apply(e,o),r.push(n+=o.length+1)}),e.c=r,e},Wg=function(t,e,r){var n="",s=(t+n).match(Wr),o=e?"hsla(":"rgba(",a=0,l,h,c,u;if(!s)return t;if(s=s.map(function(d){return(d=Ug(d,e,1))&&o+(e?d[0]+","+d[1]+"%,"+d[2]+"%,"+d[3]:d.join(","))+")"}),r&&(c=Xg(t),l=r.c,l.join(n)!==c.c.join(n)))for(h=t.replace(Wr,"1").split(ps),u=h.length-1;a<u;a++)n+=h[a]+(~l.indexOf(a)?s.shift()||o+"0,0,0,0)":(c.length?c:s.length?s:r).shift());if(!h)for(h=t.split(Wr),u=h.length-1;a<u;a++)n+=h[a]+s[a];return n+h[u]},Wr=function(){var i="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",t;for(t in wo)i+="|"+t+"\\b";return new RegExp(i+")","gi")}(),wC=/hsl[a]?\(/,Zg=function(t){var e=t.join(" "),r;if(Wr.lastIndex=0,Wr.test(e))return r=wC.test(e),t[1]=Wg(t[1],r),t[0]=Wg(t[0],r,Xg(t[1])),!0},To,Ze=function(){var i=Date.now,t=500,e=33,r=i(),n=r,s=1e3/240,o=s,a=[],l,h,c,u,d,f,p=function m(g){var y=i()-n,x=g===!0,b,v,w,S;if((y>t||y<0)&&(r+=y-e),n+=y,w=n-r,b=w-o,(b>0||x)&&(S=++u.frame,d=w-u.time*1e3,u.time=w=w/1e3,o+=b+(b>=s?4:s-b),v=1),x||(l=h(m)),v)for(f=0;f<a.length;f++)a[f](w,d,S,g)};return u={time:0,frame:0,tick:function(){p(!0)},deltaRatio:function(g){return d/(1e3/(g||60))},wake:function(){pg&&(!Pu&&Au()&&(Fi=Pu=window,Lu=Fi.document||{},Ue.gsap=Pe,(Fi.gsapVersions||(Fi.gsapVersions=[])).push(Pe.version),mg(bl||Fi.GreenSockGlobals||!Fi.gsap&&Fi||{}),Og.forEach(Bg)),c=typeof requestAnimationFrame<"u"&&requestAnimationFrame,l&&u.sleep(),h=c||function(g){return setTimeout(g,o-u.time*1e3+1|0)},To=1,p(2))},sleep:function(){(c?cancelAnimationFrame:clearTimeout)(l),To=0,h=go},lagSmoothing:function(g,y){t=g||1/0,e=Math.min(y||33,t)},fps:function(g){s=1e3/(g||240),o=u.time*1e3+s},add:function(g,y,x){var b=y?function(v,w,S,E){g(v,w,S,E),u.remove(b)}:g;return u.remove(g),a[x?"unshift":"push"](b),xs(),b},remove:function(g,y){~(y=a.indexOf(g))&&a.splice(y,1)&&f>=y&&f--},_listeners:a},u}(),xs=function(){return!To&&Ze.wake()},Et={},TC=/^[\d.\-M][\d.\-,\s]/,SC=/["']/g,CC=function(t){for(var e={},r=t.substr(1,t.length-3).split(":"),n=r[0],s=1,o=r.length,a,l,h;s<o;s++)l=r[s],a=s!==o-1?l.lastIndexOf(","):l.length,h=l.substr(0,a),e[n]=isNaN(h)?h.replace(SC,"").trim():+h,n=l.substr(a+1).trim();return e},EC=function(t){var e=t.indexOf("(")+1,r=t.indexOf(")"),n=t.indexOf("(",e);return t.substring(e,~n&&n<r?t.indexOf(")",r+1):r)},IC=function(t){var e=(t+"").split("("),r=Et[e[0]];return r&&e.length>1&&r.config?r.config.apply(null,~t.indexOf("{")?[CC(e[1])]:EC(t).split(",").map(vg)):Et._CE&&TC.test(t)?Et._CE("",t):r},Vg=function(t){return function(e){return 1-t(1-e)}},Hg=function i(t,e){for(var r=t._first,n;r;)r instanceof Ce?i(r,e):r.vars.yoyoEase&&(!r._yoyo||!r._repeat)&&r._yoyo!==e&&(r.timeline?i(r.timeline,e):(n=r._ease,r._ease=r._yEase,r._yEase=n,r._yoyo=e)),r=r._next},Cn=function(t,e){return t&&(Yt(t)?t:Et[t]||IC(t))||e},En=function(t,e,r,n){r===void 0&&(r=function(l){return 1-e(1-l)}),n===void 0&&(n=function(l){return l<.5?e(l*2)/2:1-e((1-l)*2)/2});var s={easeIn:e,easeOut:r,easeInOut:n},o;return Me(t,function(a){Et[a]=Ue[a]=s,Et[o=a.toLowerCase()]=r;for(var l in s)Et[o+(l==="easeIn"?".in":l==="easeOut"?".out":".inOut")]=Et[a+"."+l]=s[l]}),s},Kg=function(t){return function(e){return e<.5?(1-t(1-e*2))/2:.5+t((e-.5)*2)/2}},Hu=function i(t,e,r){var n=e>=1?e:1,s=(r||(t?.3:.45))/(e<1?e:1),o=s/Eu*(Math.asin(1/n)||0),a=function(c){return c===1?1:n*Math.pow(2,-10*c)*eC((c-o)*s)+1},l=t==="out"?a:t==="in"?function(h){return 1-a(1-h)}:Kg(a);return s=Eu/s,l.config=function(h,c){return i(t,h,c)},l},Ku=function i(t,e){e===void 0&&(e=1.70158);var r=function(o){return o?--o*o*((e+1)*o+e)+1:0},n=t==="out"?r:t==="in"?function(s){return 1-r(1-s)}:Kg(r);return n.config=function(s){return i(t,s)},n};Me("Linear,Quad,Cubic,Quart,Quint,Strong",function(i,t){var e=t<5?t+1:t;En(i+",Power"+(e-1),t?function(r){return Math.pow(r,e)}:function(r){return r},function(r){return 1-Math.pow(1-r,e)},function(r){return r<.5?Math.pow(r*2,e)/2:1-Math.pow((1-r)*2,e)/2})}),Et.Linear.easeNone=Et.none=Et.Linear.easeIn,En("Elastic",Hu("in"),Hu("out"),Hu()),function(i,t){var e=1/t,r=2*e,n=2.5*e,s=function(a){return a<e?i*a*a:a<r?i*Math.pow(a-1.5/t,2)+.75:a<n?i*(a-=2.25/t)*a+.9375:i*Math.pow(a-2.625/t,2)+.984375};En("Bounce",function(o){return 1-s(1-o)},s)}(7.5625,2.75),En("Expo",function(i){return i?Math.pow(2,10*(i-1)):0}),En("Circ",function(i){return-(hg(1-i*i)-1)}),En("Sine",function(i){return i===1?1:-tC(i*QS)+1}),En("Back",Ku("in"),Ku("out"),Ku()),Et.SteppedEase=Et.steps=Ue.SteppedEase={config:function(t,e){t===void 0&&(t=1);var r=1/t,n=t+(e?0:1),s=e?1:0,o=1-Ft;return function(a){return((n*xo(0,o,a)|0)+s)*r}}},fs.ease=Et["quad.out"],Me("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(i){return Nu+=i+","+i+"Params,"});var zg=function(t,e){this.id=qS++,t._gsap=this,this.target=t,this.harness=e,this.get=e?e.get:xg,this.set=e?e.getSetter:$u},So=function(){function i(e){this.vars=e,this._delay=+e.delay||0,(this._repeat=e.repeat===1/0?-2:e.repeat||0)&&(this._rDelay=e.repeatDelay||0,this._yoyo=!!e.yoyo||!!e.yoyoEase),this._ts=1,ys(this,+e.duration,1,1),this.data=e.data,Ut&&(this._ctx=Ut,Ut.data.push(this)),To||Ze.wake()}var t=i.prototype;return t.delay=function(r){return r||r===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+r-this._delay),this._delay=r,this):this._delay},t.duration=function(r){return arguments.length?this.totalDuration(this._repeat>0?r+(r+this._rDelay)*this._repeat:r):this.totalDuration()&&this._dur},t.totalDuration=function(r){return arguments.length?(this._dirty=0,ys(this,this._repeat<0?r:(r-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},t.totalTime=function(r,n){if(xs(),!arguments.length)return this._tTime;var s=this._dp;if(s&&s.smoothChildTiming&&this._ts){for(El(this,r),!s._dp||s.parent||Eg(s,this);s&&s.parent;)s.parent._time!==s._start+(s._ts>=0?s._tTime/s._ts:(s.totalDuration()-s._tTime)/-s._ts)&&s.totalTime(s._tTime,!0),s=s.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&r<this._tDur||this._ts<0&&r>0||!this._tDur&&!r)&&Di(this._dp,this,this._start-this._delay)}return(this._tTime!==r||!this._dur&&!n||this._initted&&Math.abs(this._zTime)===Ft||!r&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=r),_g(this,r,n)),this},t.time=function(r,n){return arguments.length?this.totalTime(Math.min(this.totalDuration(),r+Cg(this))%(this._dur+this._rDelay)||(r?this._dur:0),n):this._time},t.totalProgress=function(r,n){return arguments.length?this.totalTime(this.totalDuration()*r,n):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>0?1:0},t.progress=function(r,n){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-r:r)+Cg(this),n):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},t.iteration=function(r,n){var s=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(r-1)*s,n):this._repeat?gs(this._tTime,s)+1:1},t.timeScale=function(r,n){if(!arguments.length)return this._rts===-Ft?0:this._rts;if(this._rts===r)return this;var s=this.parent&&this._ts?Sl(this.parent._time,this):this._tTime;return this._rts=+r||0,this._ts=this._ps||r===-Ft?0:this._rts,this.totalTime(xo(-Math.abs(this._delay),this._tDur,s),n!==!1),Cl(this),lC(this)},t.paused=function(r){return arguments.length?(this._ps!==r&&(this._ps=r,r?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(xs(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==Ft&&(this._tTime-=Ft)))),this):this._ps},t.startTime=function(r){if(arguments.length){this._start=r;var n=this.parent||this._dp;return n&&(n._sort||!this.parent)&&Di(n,this,r-this._delay),this}return this._start},t.endTime=function(r){return this._start+(Ae(r)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},t.rawTime=function(r){var n=this.parent||this._dp;return n?r&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Sl(n.rawTime(r),this):this._tTime:this._tTime},t.revert=function(r){r===void 0&&(r=nC);var n=ye;return ye=r,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(r),this.totalTime(-.01,r.suppressEvents)),this.data!=="nested"&&r.kill!==!1&&this.kill(),ye=n,this},t.globalTime=function(r){for(var n=this,s=arguments.length?r:n.rawTime();n;)s=n._start+s/(Math.abs(n._ts)||1),n=n._dp;return!this.parent&&this._sat?this._sat.globalTime(r):s},t.repeat=function(r){return arguments.length?(this._repeat=r===1/0?-2:r,Mg(this)):this._repeat===-2?1/0:this._repeat},t.repeatDelay=function(r){if(arguments.length){var n=this._time;return this._rDelay=r,Mg(this),n?this.time(n):this}return this._rDelay},t.yoyo=function(r){return arguments.length?(this._yoyo=r,this):this._yoyo},t.seek=function(r,n){return this.totalTime(qe(this,r),Ae(n))},t.restart=function(r,n){return this.play().totalTime(r?-this._delay:0,Ae(n))},t.play=function(r,n){return r!=null&&this.seek(r,n),this.reversed(!1).paused(!1)},t.reverse=function(r,n){return r!=null&&this.seek(r||this.totalDuration(),n),this.reversed(!0).paused(!1)},t.pause=function(r,n){return r!=null&&this.seek(r,n),this.paused(!0)},t.resume=function(){return this.paused(!1)},t.reversed=function(r){return arguments.length?(!!r!==this.reversed()&&this.timeScale(-this._rts||(r?-Ft:0)),this):this._rts<0},t.invalidate=function(){return this._initted=this._act=0,this._zTime=-Ft,this},t.isActive=function(){var r=this.parent||this._dp,n=this._start,s;return!!(!r||this._ts&&this._initted&&r.isActive()&&(s=r.rawTime(!0))>=n&&s<this.endTime(!0)-Ft)},t.eventCallback=function(r,n,s){var o=this.vars;return arguments.length>1?(n?(o[r]=n,s&&(o[r+"Params"]=s),r==="onUpdate"&&(this._onUpdate=n)):delete o[r],this):o[r]},t.then=function(r){var n=this;return new Promise(function(s){var o=Yt(r)?r:wg,a=function(){var h=n.then;n.then=null,Yt(o)&&(o=o(n))&&(o.then||o===n)&&(n.then=h),s(o),n.then=h};n._initted&&n.totalProgress()===1&&n._ts>=0||!n._tTime&&n._ts<0?a():n._prom=a})},t.kill=function(){vo(this)},i}();Qe(So.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-Ft,_prom:0,_ps:!1,_rts:1});var Ce=function(i){lg(t,i);function t(r,n){var s;return r===void 0&&(r={}),s=i.call(this,r)||this,s.labels={},s.smoothChildTiming=!!r.smoothChildTiming,s.autoRemoveChildren=!!r.autoRemoveChildren,s._sort=Ae(r.sortChildren),Ht&&Di(r.parent||Ht,ar(s),n),r.reversed&&s.reverse(),r.paused&&s.paused(!0),r.scrollTrigger&&Ig(ar(s),r.scrollTrigger),s}var e=t.prototype;return e.to=function(n,s,o){return bo(0,arguments,this),this},e.from=function(n,s,o){return bo(1,arguments,this),this},e.fromTo=function(n,s,o,a){return bo(2,arguments,this),this},e.set=function(n,s,o){return s.duration=0,s.parent=this,yo(s).repeatDelay||(s.repeat=0),s.immediateRender=!!s.immediateRender,new te(n,s,qe(this,o),1),this},e.call=function(n,s,o){return Di(this,te.delayedCall(0,n,s),o)},e.staggerTo=function(n,s,o,a,l,h,c){return o.duration=s,o.stagger=o.stagger||a,o.onComplete=h,o.onCompleteParams=c,o.parent=this,new te(n,o,qe(this,l)),this},e.staggerFrom=function(n,s,o,a,l,h,c){return o.runBackwards=1,yo(o).immediateRender=Ae(o.immediateRender),this.staggerTo(n,s,o,a,l,h,c)},e.staggerFromTo=function(n,s,o,a,l,h,c,u){return a.startAt=o,yo(a).immediateRender=Ae(a.immediateRender),this.staggerTo(n,s,a,l,h,c,u)},e.render=function(n,s,o){var a=this._time,l=this._dirty?this.totalDuration():this._tDur,h=this._dur,c=n<=0?0:ue(n),u=this._zTime<0!=n<0&&(this._initted||!h),d,f,p,m,g,y,x,b,v,w,S,E;if(this!==Ht&&c>l&&n>=0&&(c=l),c!==this._tTime||o||u){if(a!==this._time&&h&&(c+=this._time-a,n+=this._time-a),d=c,v=this._start,b=this._ts,y=!b,u&&(h||(a=this._zTime),(n||!s)&&(this._zTime=n)),this._repeat){if(S=this._yoyo,g=h+this._rDelay,this._repeat<-1&&n<0)return this.totalTime(g*100+n,s,o);if(d=ue(c%g),c===l?(m=this._repeat,d=h):(m=~~(c/g),m&&m===c/g&&(d=h,m--),d>h&&(d=h)),w=gs(this._tTime,g),!a&&this._tTime&&w!==m&&this._tTime-w*g-this._dur<=0&&(w=m),S&&m&1&&(d=h-d,E=1),m!==w&&!this._lock){var I=S&&w&1,A=I===(S&&m&1);if(m<w&&(I=!I),a=I?0:c%h?h:c,this._lock=1,this.render(a||(E?0:ue(m*g)),s,!h)._lock=0,this._tTime=c,!s&&this.parent&&We(this,"onRepeat"),this.vars.repeatRefresh&&!E&&(this.invalidate()._lock=1),a&&a!==this._time||y!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(h=this._dur,l=this._tDur,A&&(this._lock=2,a=I?h:-1e-4,this.render(a,!0),this.vars.repeatRefresh&&!E&&this.invalidate()),this._lock=0,!this._ts&&!y)return this;Hg(this,E)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(x=dC(this,ue(a),ue(d)),x&&(c-=d-(d=x._start))),this._tTime=c,this._time=d,this._act=!b,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=n,a=0),!a&&d&&!s&&!m&&(We(this,"onStart"),this._tTime!==c))return this;if(d>=a&&n>=0)for(f=this._first;f;){if(p=f._next,(f._act||d>=f._start)&&f._ts&&x!==f){if(f.parent!==this)return this.render(n,s,o);if(f.render(f._ts>0?(d-f._start)*f._ts:(f._dirty?f.totalDuration():f._tDur)+(d-f._start)*f._ts,s,o),d!==this._time||!this._ts&&!y){x=0,p&&(c+=this._zTime=-Ft);break}}f=p}else{f=this._last;for(var L=n<0?n:d;f;){if(p=f._prev,(f._act||L<=f._end)&&f._ts&&x!==f){if(f.parent!==this)return this.render(n,s,o);if(f.render(f._ts>0?(L-f._start)*f._ts:(f._dirty?f.totalDuration():f._tDur)+(L-f._start)*f._ts,s,o||ye&&(f._initted||f._startAt)),d!==this._time||!this._ts&&!y){x=0,p&&(c+=this._zTime=L?-Ft:Ft);break}}f=p}}if(x&&!s&&(this.pause(),x.render(d>=a?0:-Ft)._zTime=d>=a?1:-1,this._ts))return this._start=v,Cl(this),this.render(n,s,o);this._onUpdate&&!s&&We(this,"onUpdate",!0),(c===l&&this._tTime>=this.totalDuration()||!c&&a)&&(v===this._start||Math.abs(b)!==Math.abs(this._ts))&&(this._lock||((n||!h)&&(c===l&&this._ts>0||!c&&this._ts<0)&&Ur(this,1),!s&&!(n<0&&!a)&&(c||a||!l)&&(We(this,c===l&&n>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(c<l&&this.timeScale()>0)&&this._prom())))}return this},e.add=function(n,s){var o=this;if(lr(s)||(s=qe(this,s,n)),!(n instanceof So)){if(be(n))return n.forEach(function(a){return o.add(a,s)}),this;if(ce(n))return this.addLabel(n,s);if(Yt(n))n=te.delayedCall(0,n);else return this}return this!==n?Di(this,n,s):this},e.getChildren=function(n,s,o,a){n===void 0&&(n=!0),s===void 0&&(s=!0),o===void 0&&(o=!0),a===void 0&&(a=-$e);for(var l=[],h=this._first;h;)h._start>=a&&(h instanceof te?s&&l.push(h):(o&&l.push(h),n&&l.push.apply(l,h.getChildren(!0,s,o)))),h=h._next;return l},e.getById=function(n){for(var s=this.getChildren(1,1,1),o=s.length;o--;)if(s[o].vars.id===n)return s[o]},e.remove=function(n){return ce(n)?this.removeLabel(n):Yt(n)?this.killTweensOf(n):(Tl(this,n),n===this._recent&&(this._recent=this._last),Sn(this))},e.totalTime=function(n,s){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=ue(Ze.time-(this._ts>0?n/this._ts:(this.totalDuration()-n)/-this._ts))),i.prototype.totalTime.call(this,n,s),this._forcing=0,this):this._tTime},e.addLabel=function(n,s){return this.labels[n]=qe(this,s),this},e.removeLabel=function(n){return delete this.labels[n],this},e.addPause=function(n,s,o){var a=te.delayedCall(0,s||go,o);return a.data="isPause",this._hasPause=1,Di(this,a,qe(this,n))},e.removePause=function(n){var s=this._first;for(n=qe(this,n);s;)s._start===n&&s.data==="isPause"&&Ur(s),s=s._next},e.killTweensOf=function(n,s,o){for(var a=this.getTweensOf(n,o),l=a.length;l--;)Zr!==a[l]&&a[l].kill(n,s);return this},e.getTweensOf=function(n,s){for(var o=[],a=ti(n),l=this._first,h=lr(s),c;l;)l instanceof te?sC(l._targets,a)&&(h?(!Zr||l._initted&&l._ts)&&l.globalTime(0)<=s&&l.globalTime(l.totalDuration())>s:!s||l.isActive())&&o.push(l):(c=l.getTweensOf(a,s)).length&&o.push.apply(o,c),l=l._next;return o},e.tweenTo=function(n,s){s=s||{};var o=this,a=qe(o,n),l=s,h=l.startAt,c=l.onStart,u=l.onStartParams,d=l.immediateRender,f,p=te.to(o,Qe({ease:s.ease||"none",lazy:!1,immediateRender:!1,time:a,overwrite:"auto",duration:s.duration||Math.abs((a-(h&&"time"in h?h.time:o._time))/o.timeScale())||Ft,onStart:function(){if(o.pause(),!f){var g=s.duration||Math.abs((a-(h&&"time"in h?h.time:o._time))/o.timeScale());p._dur!==g&&ys(p,g,0,1).render(p._time,!0,!0),f=1}c&&c.apply(p,u||[])}},s));return d?p.render(0):p},e.tweenFromTo=function(n,s,o){return this.tweenTo(s,Qe({startAt:{time:qe(this,n)}},o))},e.recent=function(){return this._recent},e.nextLabel=function(n){return n===void 0&&(n=this._time),Ng(this,qe(this,n))},e.previousLabel=function(n){return n===void 0&&(n=this._time),Ng(this,qe(this,n),1)},e.currentLabel=function(n){return arguments.length?this.seek(n,!0):this.previousLabel(this._time+Ft)},e.shiftChildren=function(n,s,o){o===void 0&&(o=0);for(var a=this._first,l=this.labels,h;a;)a._start>=o&&(a._start+=n,a._end+=n),a=a._next;if(s)for(h in l)l[h]>=o&&(l[h]+=n);return Sn(this)},e.invalidate=function(n){var s=this._first;for(this._lock=0;s;)s.invalidate(n),s=s._next;return i.prototype.invalidate.call(this,n)},e.clear=function(n){n===void 0&&(n=!0);for(var s=this._first,o;s;)o=s._next,this.remove(s),s=o;return this._dp&&(this._time=this._tTime=this._pTime=0),n&&(this.labels={}),Sn(this)},e.totalDuration=function(n){var s=0,o=this,a=o._last,l=$e,h,c,u;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-n:n));if(o._dirty){for(u=o.parent;a;)h=a._prev,a._dirty&&a.totalDuration(),c=a._start,c>l&&o._sort&&a._ts&&!o._lock?(o._lock=1,Di(o,a,c-a._delay,1)._lock=0):l=c,c<0&&a._ts&&(s-=c,(!u&&!o._dp||u&&u.smoothChildTiming)&&(o._start+=c/o._ts,o._time-=c,o._tTime-=c),o.shiftChildren(-c,!1,-1/0),l=0),a._end>s&&a._ts&&(s=a._end),a=h;ys(o,o===Ht&&o._time>s?o._time:s,1,1),o._dirty=0}return o._tDur},t.updateRoot=function(n){if(Ht._ts&&(_g(Ht,Sl(n,Ht)),yg=Ze.frame),Ze.frame>=bg){bg+=Be.autoSleep||120;var s=Ht._first;if((!s||!s._ts)&&Be.autoSleep&&Ze._listeners.length<2){for(;s&&!s._ts;)s=s._next;s||Ze.sleep()}}},t}(So);Qe(Ce.prototype,{_lock:0,_hasPause:0,_forcing:0});var AC=function(t,e,r,n,s,o,a){var l=new Re(this._pt,t,e,0,1,qg,null,s),h=0,c=0,u,d,f,p,m,g,y,x;for(l.b=r,l.e=n,r+="",n+="",(y=~n.indexOf("random("))&&(n=_o(n)),o&&(x=[r,n],o(x,t,e),r=x[0],n=x[1]),d=r.match(Ru)||[];u=Ru.exec(n);)p=u[0],m=n.substring(h,u.index),f?f=(f+1)%5:m.substr(-5)==="rgba("&&(f=1),p!==d[c++]&&(g=parseFloat(d[c-1])||0,l._pt={_next:l._pt,p:m||c===1?m:",",s:g,c:p.charAt(1)==="="?ms(g,p)-g:parseFloat(p)-g,m:f&&f<4?Math.round:0},h=Ru.lastIndex);return l.c=h<n.length?n.substring(h,n.length):"",l.fp=a,(dg.test(n)||y)&&(l.e=0),this._pt=l,l},zu=function(t,e,r,n,s,o,a,l,h,c){Yt(n)&&(n=n(s||0,t,o));var u=t[e],d=r!=="get"?r:Yt(u)?h?t[e.indexOf("set")||!Yt(t["get"+e.substr(3)])?e:"get"+e.substr(3)](h):t[e]():u,f=Yt(u)?h?GC:$g:Ju,p;if(ce(n)&&(~n.indexOf("random(")&&(n=_o(n)),n.charAt(1)==="="&&(p=ms(d,n)+(xe(d)||0),(p||p===0)&&(n=p))),!c||d!==n||Yu)return!isNaN(d*n)&&n!==""?(p=new Re(this._pt,t,e,+d||0,n-(d||0),typeof u=="boolean"?FC:Qg,0,f),h&&(p.fp=h),a&&p.modifier(a,this,t),this._pt=p):(!u&&!(e in t)&&Gu(e,n),AC.call(this,t,e,d,n,f,l||Be.stringFilter,h))},MC=function(t,e,r,n,s){if(Yt(t)&&(t=Co(t,s,e,r,n)),!ki(t)||t.style&&t.nodeType||be(t)||cg(t))return ce(t)?Co(t,s,e,r,n):t;var o={},a;for(a in t)o[a]=Co(t[a],s,e,r,n);return o},Yg=function(t,e,r,n,s,o){var a,l,h,c;if(Xe[t]&&(a=new Xe[t]).init(s,a.rawVars?e[t]:MC(e[t],n,s,o,r),r,n,o)!==!1&&(r._pt=l=new Re(r._pt,s,t,0,1,a.render,a,0,a.priority),r!==bs))for(h=r._ptLookup[r._targets.indexOf(s)],c=a._props.length;c--;)h[a._props[c]]=l;return a},Zr,Yu,ju=function i(t,e,r){var n=t.vars,s=n.ease,o=n.startAt,a=n.immediateRender,l=n.lazy,h=n.onUpdate,c=n.runBackwards,u=n.yoyoEase,d=n.keyframes,f=n.autoRevert,p=t._dur,m=t._startAt,g=t._targets,y=t.parent,x=y&&y.data==="nested"?y.vars.targets:g,b=t._overwrite==="auto"&&!Cu,v=t.timeline,w,S,E,I,A,L,G,F,M,N,W,K,H;if(v&&(!d||!s)&&(s="none"),t._ease=Cn(s,fs.ease),t._yEase=u?Vg(Cn(u===!0?s:u,fs.ease)):0,u&&t._yoyo&&!t._repeat&&(u=t._yEase,t._yEase=t._ease,t._ease=u),t._from=!v&&!!n.runBackwards,!v||d&&!n.stagger){if(F=g[0]?wn(g[0]).harness:0,K=F&&n[F.prop],w=wl(n,ku),m&&(m._zTime<0&&m.progress(1),e<0&&c&&a&&!f?m.render(-1,!0):m.revert(c&&p?xl:rC),m._lazy=0),o){if(Ur(t._startAt=te.set(g,Qe({data:"isStart",overwrite:!1,parent:y,immediateRender:!0,lazy:!m&&Ae(l),startAt:null,delay:0,onUpdate:h&&function(){return We(t,"onUpdate")},stagger:0},o))),t._startAt._dp=0,t._startAt._sat=t,e<0&&(ye||!a&&!f)&&t._startAt.revert(xl),a&&p&&e<=0&&r<=0){e&&(t._zTime=e);return}}else if(c&&p&&!m){if(e&&(a=!1),E=Qe({overwrite:!1,data:"isFromStart",lazy:a&&!m&&Ae(l),immediateRender:a,stagger:0,parent:y},w),K&&(E[F.prop]=K),Ur(t._startAt=te.set(g,E)),t._startAt._dp=0,t._startAt._sat=t,e<0&&(ye?t._startAt.revert(xl):t._startAt.render(-1,!0)),t._zTime=e,!a)i(t._startAt,Ft,Ft);else if(!e)return}for(t._pt=t._ptCache=0,l=p&&Ae(l)||l&&!p,S=0;S<g.length;S++){if(A=g[S],G=A._gsap||Ou(g)[S]._gsap,t._ptLookup[S]=N={},Fu[G.id]&&Br.length&&vl(),W=x===g?S:x.indexOf(A),F&&(M=new F).init(A,K||w,t,W,x)!==!1&&(t._pt=I=new Re(t._pt,A,M.name,0,1,M.render,M,0,M.priority),M._props.forEach(function(j){N[j]=I}),M.priority&&(L=1)),!F||K)for(E in w)Xe[E]&&(M=Yg(E,w,t,W,A,x))?M.priority&&(L=1):N[E]=I=zu.call(t,A,E,"get",w[E],W,x,0,n.stringFilter);t._op&&t._op[S]&&t.kill(A,t._op[S]),b&&t._pt&&(Zr=t,Ht.killTweensOf(A,N,t.globalTime(e)),H=!t.parent,Zr=0),t._pt&&l&&(Fu[G.id]=1)}L&&t1(t),t._onInit&&t._onInit(t)}t._onUpdate=h,t._initted=(!t._op||t._pt)&&!H,d&&e<=0&&v.render($e,!0,!0)},RC=function(t,e,r,n,s,o,a,l){var h=(t._pt&&t._ptCache||(t._ptCache={}))[e],c,u,d,f;if(!h)for(h=t._ptCache[e]=[],d=t._ptLookup,f=t._targets.length;f--;){if(c=d[f][e],c&&c.d&&c.d._pt)for(c=c.d._pt;c&&c.p!==e&&c.fp!==e;)c=c._next;if(!c)return Yu=1,t.vars[e]="+=0",ju(t,a),Yu=0,l?mo(e+" not eligible for reset"):1;h.push(c)}for(f=h.length;f--;)u=h[f],c=u._pt||u,c.s=(n||n===0)&&!s?n:c.s+(n||0)+o*c.c,c.c=r-c.s,u.e&&(u.e=Jt(r)+xe(u.e)),u.b&&(u.b=c.s+xe(u.b))},PC=function(t,e){var r=t[0]?wn(t[0]).harness:0,n=r&&r.aliases,s,o,a,l;if(!n)return e;s=Tn({},e);for(o in n)if(o in s)for(l=n[o].split(","),a=l.length;a--;)s[l[a]]=s[o];return s},LC=function(t,e,r,n){var s=e.ease||n||"power1.inOut",o,a;if(be(e))a=r[t]||(r[t]=[]),e.forEach(function(l,h){return a.push({t:h/(e.length-1)*100,v:l,e:s})});else for(o in e)a=r[o]||(r[o]=[]),o==="ease"||a.push({t:parseFloat(t),v:e[o],e:s})},Co=function(t,e,r,n,s){return Yt(t)?t.call(e,r,n,s):ce(t)&&~t.indexOf("random(")?_o(t):t},jg=Nu+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",Jg={};Me(jg+",id,stagger,delay,duration,paused,scrollTrigger",function(i){return Jg[i]=1});var te=function(i){lg(t,i);function t(r,n,s,o){var a;typeof n=="number"&&(s.duration=n,n=s,s=null),a=i.call(this,o?n:yo(n))||this;var l=a.vars,h=l.duration,c=l.delay,u=l.immediateRender,d=l.stagger,f=l.overwrite,p=l.keyframes,m=l.defaults,g=l.scrollTrigger,y=l.yoyoEase,x=n.parent||Ht,b=(be(r)||cg(r)?lr(r[0]):"length"in n)?[r]:ti(r),v,w,S,E,I,A,L,G;if(a._targets=b.length?Ou(b):mo("GSAP target "+r+" not found. https://gsap.com",!Be.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=f,p||d||yl(h)||yl(c)){if(n=a.vars,v=a.timeline=new Ce({data:"nested",defaults:m||{},targets:x&&x.data==="nested"?x.vars.targets:b}),v.kill(),v.parent=v._dp=ar(a),v._start=0,d||yl(h)||yl(c)){if(E=b.length,L=d&&Lg(d),ki(d))for(I in d)~jg.indexOf(I)&&(G||(G={}),G[I]=d[I]);for(w=0;w<E;w++)S=wl(n,Jg),S.stagger=0,y&&(S.yoyoEase=y),G&&Tn(S,G),A=b[w],S.duration=+Co(h,ar(a),w,A,b),S.delay=(+Co(c,ar(a),w,A,b)||0)-a._delay,!d&&E===1&&S.delay&&(a._delay=c=S.delay,a._start+=c,S.delay=0),v.to(A,S,L?L(w,A,b):0),v._ease=Et.none;v.duration()?h=c=0:a.timeline=0}else if(p){yo(Qe(v.vars.defaults,{ease:"none"})),v._ease=Cn(p.ease||n.ease||"none");var F=0,M,N,W;if(be(p))p.forEach(function(K){return v.to(b,K,">")}),v.duration();else{S={};for(I in p)I==="ease"||I==="easeEach"||LC(I,p[I],S,p.easeEach);for(I in S)for(M=S[I].sort(function(K,H){return K.t-H.t}),F=0,w=0;w<M.length;w++)N=M[w],W={ease:N.e,duration:(N.t-(w?M[w-1].t:0))/100*h},W[I]=N.v,v.to(b,W,F),F+=W.duration;v.duration()<h&&v.to({},{duration:h-v.duration()})}}h||a.duration(h=v.duration())}else a.timeline=0;return f===!0&&!Cu&&(Zr=ar(a),Ht.killTweensOf(b),Zr=0),Di(x,ar(a),s),n.reversed&&a.reverse(),n.paused&&a.paused(!0),(u||!h&&!p&&a._start===ue(x._time)&&Ae(u)&&hC(ar(a))&&x.data!=="nested")&&(a._tTime=-Ft,a.render(Math.max(0,-c)||0)),g&&Ig(ar(a),g),a}var e=t.prototype;return e.render=function(n,s,o){var a=this._time,l=this._tDur,h=this._dur,c=n<0,u=n>l-Ft&&!c?l:n<Ft?0:n,d,f,p,m,g,y,x,b,v;if(!h)uC(this,n,s,o);else if(u!==this._tTime||!n||o||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==c){if(d=u,b=this.timeline,this._repeat){if(m=h+this._rDelay,this._repeat<-1&&c)return this.totalTime(m*100+n,s,o);if(d=ue(u%m),u===l?(p=this._repeat,d=h):(p=~~(u/m),p&&p===ue(u/m)&&(d=h,p--),d>h&&(d=h)),y=this._yoyo&&p&1,y&&(v=this._yEase,d=h-d),g=gs(this._tTime,m),d===a&&!o&&this._initted&&p===g)return this._tTime=u,this;p!==g&&(b&&this._yEase&&Hg(b,y),this.vars.repeatRefresh&&!y&&!this._lock&&this._time!==m&&this._initted&&(this._lock=o=1,this.render(ue(m*p),!0).invalidate()._lock=0))}if(!this._initted){if(Ag(this,c?n:d,o,s,u))return this._tTime=0,this;if(a!==this._time&&!(o&&this.vars.repeatRefresh&&p!==g))return this;if(h!==this._dur)return this.render(n,s,o)}if(this._tTime=u,this._time=d,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=x=(v||this._ease)(d/h),this._from&&(this.ratio=x=1-x),d&&!a&&!s&&!p&&(We(this,"onStart"),this._tTime!==u))return this;for(f=this._pt;f;)f.r(x,f.d),f=f._next;b&&b.render(n<0?n:b._dur*b._ease(d/this._dur),s,o)||this._startAt&&(this._zTime=n),this._onUpdate&&!s&&(c&&Bu(this,n,s,o),We(this,"onUpdate")),this._repeat&&p!==g&&this.vars.onRepeat&&!s&&this.parent&&We(this,"onRepeat"),(u===this._tDur||!u)&&this._tTime===u&&(c&&!this._onUpdate&&Bu(this,n,!0,!0),(n||!h)&&(u===this._tDur&&this._ts>0||!u&&this._ts<0)&&Ur(this,1),!s&&!(c&&!a)&&(u||a||y)&&(We(this,u===l?"onComplete":"onReverseComplete",!0),this._prom&&!(u<l&&this.timeScale()>0)&&this._prom()))}return this},e.targets=function(){return this._targets},e.invalidate=function(n){return(!n||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(n),i.prototype.invalidate.call(this,n)},e.resetTo=function(n,s,o,a,l){To||Ze.wake(),this._ts||this.play();var h=Math.min(this._dur,(this._dp._time-this._start)*this._ts),c;return this._initted||ju(this,h),c=this._ease(h/this._dur),RC(this,n,s,o,a,c,h,l)?this.resetTo(n,s,o,a,1):(El(this,0),this.parent||Sg(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},e.kill=function(n,s){if(s===void 0&&(s="all"),!n&&(!s||s==="all"))return this._lazy=this._pt=0,this.parent?vo(this):this;if(this.timeline){var o=this.timeline.totalDuration();return this.timeline.killTweensOf(n,s,Zr&&Zr.vars.overwrite!==!0)._first||vo(this),this.parent&&o!==this.timeline.totalDuration()&&ys(this,this._dur*this.timeline._tDur/o,0,1),this}var a=this._targets,l=n?ti(n):a,h=this._ptLookup,c=this._pt,u,d,f,p,m,g,y;if((!s||s==="all")&&aC(a,l))return s==="all"&&(this._pt=0),vo(this);for(u=this._op=this._op||[],s!=="all"&&(ce(s)&&(m={},Me(s,function(x){return m[x]=1}),s=m),s=PC(a,s)),y=a.length;y--;)if(~l.indexOf(a[y])){d=h[y],s==="all"?(u[y]=s,p=d,f={}):(f=u[y]=u[y]||{},p=s);for(m in p)g=d&&d[m],g&&((!("kill"in g.d)||g.d.kill(m)===!0)&&Tl(this,g,"_pt"),delete d[m]),f!=="all"&&(f[m]=1)}return this._initted&&!this._pt&&c&&vo(this),this},t.to=function(n,s){return new t(n,s,arguments[2])},t.from=function(n,s){return bo(1,arguments)},t.delayedCall=function(n,s,o,a){return new t(s,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:n,onComplete:s,onReverseComplete:s,onCompleteParams:o,onReverseCompleteParams:o,callbackScope:a})},t.fromTo=function(n,s,o){return bo(2,arguments)},t.set=function(n,s){return s.duration=0,s.repeatDelay||(s.repeat=0),new t(n,s)},t.killTweensOf=function(n,s,o){return Ht.killTweensOf(n,s,o)},t}(So);Qe(te.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),Me("staggerTo,staggerFrom,staggerFromTo",function(i){te[i]=function(){var t=new Ce,e=Xu.call(arguments,0);return e.splice(i==="staggerFromTo"?5:4,0,0),t[i].apply(t,e)}});var Ju=function(t,e,r){return t[e]=r},$g=function(t,e,r){return t[e](r)},GC=function(t,e,r,n){return t[e](n.fp,r)},kC=function(t,e,r){return t.setAttribute(e,r)},$u=function(t,e){return Yt(t[e])?$g:Iu(t[e])&&t.setAttribute?kC:Ju},Qg=function(t,e){return e.set(e.t,e.p,Math.round((e.s+e.c*t)*1e6)/1e6,e)},FC=function(t,e){return e.set(e.t,e.p,!!(e.s+e.c*t),e)},qg=function(t,e){var r=e._pt,n="";if(!t&&e.b)n=e.b;else if(t===1&&e.e)n=e.e;else{for(;r;)n=r.p+(r.m?r.m(r.s+r.c*t):Math.round((r.s+r.c*t)*1e4)/1e4)+n,r=r._next;n+=e.c}e.set(e.t,e.p,n,e)},Qu=function(t,e){for(var r=e._pt;r;)r.r(t,r.d),r=r._next},DC=function(t,e,r,n){for(var s=this._pt,o;s;)o=s._next,s.p===n&&s.modifier(t,e,r),s=o},NC=function(t){for(var e=this._pt,r,n;e;)n=e._next,e.p===t&&!e.op||e.op===t?Tl(this,e,"_pt"):e.dep||(r=1),e=n;return!r},OC=function(t,e,r,n){n.mSet(t,e,n.m.call(n.tween,r,n.mt),n)},t1=function(t){for(var e=t._pt,r,n,s,o;e;){for(r=e._next,n=s;n&&n.pr>e.pr;)n=n._next;(e._prev=n?n._prev:o)?e._prev._next=e:s=e,(e._next=n)?n._prev=e:o=e,e=r}t._pt=s},Re=function(){function i(e,r,n,s,o,a,l,h,c){this.t=r,this.s=s,this.c=o,this.p=n,this.r=a||Qg,this.d=l||this,this.set=h||Ju,this.pr=c||0,this._next=e,e&&(e._prev=this)}var t=i.prototype;return t.modifier=function(r,n,s){this.mSet=this.mSet||this.set,this.set=OC,this.m=r,this.mt=s,this.tween=n},i}();Me(Nu+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(i){return ku[i]=1}),Ue.TweenMax=Ue.TweenLite=te,Ue.TimelineLite=Ue.TimelineMax=Ce,Ht=new Ce({sortChildren:!1,defaults:fs,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),Be.stringFilter=Zg;var In=[],Il={},BC=[],e1=0,UC=0,qu=function(t){return(Il[t]||BC).map(function(e){return e()})},td=function(){var t=Date.now(),e=[];t-e1>2&&(qu("matchMediaInit"),In.forEach(function(r){var n=r.queries,s=r.conditions,o,a,l,h;for(a in n)o=Fi.matchMedia(n[a]).matches,o&&(l=1),o!==s[a]&&(s[a]=o,h=1);h&&(r.revert(),l&&e.push(r))}),qu("matchMediaRevert"),e.forEach(function(r){return r.onMatch(r,function(n){return r.add(null,n)})}),e1=t,qu("matchMedia"))},i1=function(){function i(e,r){this.selector=r&&Wu(r),this.data=[],this._r=[],this.isReverted=!1,this.id=UC++,e&&this.add(e)}var t=i.prototype;return t.add=function(r,n,s){Yt(r)&&(s=n,n=r,r=Yt);var o=this,a=function(){var h=Ut,c=o.selector,u;return h&&h!==o&&h.data.push(o),s&&(o.selector=Wu(s)),Ut=o,u=n.apply(o,arguments),Yt(u)&&o._r.push(u),Ut=h,o.selector=c,o.isReverted=!1,u};return o.last=a,r===Yt?a(o,function(l){return o.add(null,l)}):r?o[r]=a:a},t.ignore=function(r){var n=Ut;Ut=null,r(this),Ut=n},t.getTweens=function(){var r=[];return this.data.forEach(function(n){return n instanceof i?r.push.apply(r,n.getTweens()):n instanceof te&&!(n.parent&&n.parent.data==="nested")&&r.push(n)}),r},t.clear=function(){this._r.length=this.data.length=0},t.kill=function(r,n){var s=this;if(r?function(){for(var a=s.getTweens(),l=s.data.length,h;l--;)h=s.data[l],h.data==="isFlip"&&(h.revert(),h.getChildren(!0,!0,!1).forEach(function(c){return a.splice(a.indexOf(c),1)}));for(a.map(function(c){return{g:c._dur||c._delay||c._sat&&!c._sat.vars.immediateRender?c.globalTime(0):-1/0,t:c}}).sort(function(c,u){return u.g-c.g||-1/0}).forEach(function(c){return c.t.revert(r)}),l=s.data.length;l--;)h=s.data[l],h instanceof Ce?h.data!=="nested"&&(h.scrollTrigger&&h.scrollTrigger.revert(),h.kill()):!(h instanceof te)&&h.revert&&h.revert(r);s._r.forEach(function(c){return c(r,s)}),s.isReverted=!0}():this.data.forEach(function(a){return a.kill&&a.kill()}),this.clear(),n)for(var o=In.length;o--;)In[o].id===this.id&&In.splice(o,1)},t.revert=function(r){this.kill(r||{})},i}(),XC=function(){function i(e){this.contexts=[],this.scope=e,Ut&&Ut.data.push(this)}var t=i.prototype;return t.add=function(r,n,s){ki(r)||(r={matches:r});var o=new i1(0,s||this.scope),a=o.conditions={},l,h,c;Ut&&!o.selector&&(o.selector=Ut.selector),this.contexts.push(o),n=o.add("onMatch",n),o.queries=r;for(h in r)h==="all"?c=1:(l=Fi.matchMedia(r[h]),l&&(In.indexOf(o)<0&&In.push(o),(a[h]=l.matches)&&(c=1),l.addListener?l.addListener(td):l.addEventListener("change",td)));return c&&n(o,function(u){return o.add(null,u)}),this},t.revert=function(r){this.kill(r||{})},t.kill=function(r){this.contexts.forEach(function(n){return n.kill(r,!0)})},i}(),Al={registerPlugin:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];e.forEach(function(n){return Bg(n)})},timeline:function(t){return new Ce(t)},getTweensOf:function(t,e){return Ht.getTweensOf(t,e)},getProperty:function(t,e,r,n){ce(t)&&(t=ti(t)[0]);var s=wn(t||{}).get,o=r?wg:vg;return r==="native"&&(r=""),t&&(e?o((Xe[e]&&Xe[e].get||s)(t,e,r,n)):function(a,l,h){return o((Xe[a]&&Xe[a].get||s)(t,a,l,h))})},quickSetter:function(t,e,r){if(t=ti(t),t.length>1){var n=t.map(function(c){return Pe.quickSetter(c,e,r)}),s=n.length;return function(c){for(var u=s;u--;)n[u](c)}}t=t[0]||{};var o=Xe[e],a=wn(t),l=a.harness&&(a.harness.aliases||{})[e]||e,h=o?function(c){var u=new o;bs._pt=0,u.init(t,r?c+r:c,bs,0,[t]),u.render(1,u),bs._pt&&Qu(1,bs)}:a.set(t,l);return o?h:function(c){return h(t,l,r?c+r:c,a,1)}},quickTo:function(t,e,r){var n,s=Pe.to(t,Tn((n={},n[e]="+=0.1",n.paused=!0,n),r||{})),o=function(l,h,c){return s.resetTo(e,l,h,c)};return o.tween=s,o},isTweening:function(t){return Ht.getTweensOf(t,!0).length>0},defaults:function(t){return t&&t.ease&&(t.ease=Cn(t.ease,fs.ease)),Tg(fs,t||{})},config:function(t){return Tg(Be,t||{})},registerEffect:function(t){var e=t.name,r=t.effect,n=t.plugins,s=t.defaults,o=t.extendTimeline;(n||"").split(",").forEach(function(a){return a&&!Xe[a]&&!Ue[a]&&mo(e+" effect requires "+a+" plugin.")}),Du[e]=function(a,l,h){return r(ti(a),Qe(l||{},s),h)},o&&(Ce.prototype[e]=function(a,l,h){return this.add(Du[e](a,ki(l)?l:(h=l)&&{},this),h)})},registerEase:function(t,e){Et[t]=Cn(e)},parseEase:function(t,e){return arguments.length?Cn(t,e):Et},getById:function(t){return Ht.getById(t)},exportRoot:function(t,e){t===void 0&&(t={});var r=new Ce(t),n,s;for(r.smoothChildTiming=Ae(t.smoothChildTiming),Ht.remove(r),r._dp=0,r._time=r._tTime=Ht._time,n=Ht._first;n;)s=n._next,(e||!(!n._dur&&n instanceof te&&n.vars.onComplete===n._targets[0]))&&Di(r,n,n._start-n._delay),n=s;return Di(Ht,r,0),r},context:function(t,e){return t?new i1(t,e):Ut},matchMedia:function(t){return new XC(t)},matchMediaRefresh:function(){return In.forEach(function(t){var e=t.conditions,r,n;for(n in e)e[n]&&(e[n]=!1,r=1);r&&t.revert()})||td()},addEventListener:function(t,e){var r=Il[t]||(Il[t]=[]);~r.indexOf(e)||r.push(e)},removeEventListener:function(t,e){var r=Il[t],n=r&&r.indexOf(e);n>=0&&r.splice(n,1)},utils:{wrap:xC,wrapYoyo:_C,distribute:Lg,random:kg,snap:Gg,normalize:bC,getUnit:xe,clamp:pC,splitColor:Ug,toArray:ti,selector:Wu,mapRange:Dg,pipe:gC,unitize:yC,interpolate:vC,shuffle:Pg},install:mg,effects:Du,ticker:Ze,updateRoot:Ce.updateRoot,plugins:Xe,globalTimeline:Ht,core:{PropTween:Re,globals:gg,Tween:te,Timeline:Ce,Animation:So,getCache:wn,_removeLinkedListItem:Tl,reverting:function(){return ye},context:function(t){return t&&Ut&&(Ut.data.push(t),t._ctx=Ut),Ut},suppressOverwrites:function(t){return Cu=t}}};Me("to,from,fromTo,delayedCall,set,killTweensOf",function(i){return Al[i]=te[i]}),Ze.add(Ce.updateRoot),bs=Al.to({},{duration:0});var WC=function(t,e){for(var r=t._pt;r&&r.p!==e&&r.op!==e&&r.fp!==e;)r=r._next;return r},ZC=function(t,e){var r=t._targets,n,s,o;for(n in e)for(s=r.length;s--;)o=t._ptLookup[s][n],o&&(o=o.d)&&(o._pt&&(o=WC(o,n)),o&&o.modifier&&o.modifier(e[n],t,r[s],n))},ed=function(t,e){return{name:t,rawVars:1,init:function(n,s,o){o._onInit=function(a){var l,h;if(ce(s)&&(l={},Me(s,function(c){return l[c]=1}),s=l),e){l={};for(h in s)l[h]=e(s[h]);s=l}ZC(a,s)}}}},Pe=Al.registerPlugin({name:"attr",init:function(t,e,r,n,s){var o,a,l;this.tween=r;for(o in e)l=t.getAttribute(o)||"",a=this.add(t,"setAttribute",(l||0)+"",e[o],n,s,0,0,o),a.op=o,a.b=l,this._props.push(o)},render:function(t,e){for(var r=e._pt;r;)ye?r.set(r.t,r.p,r.b,r):r.r(t,r.d),r=r._next}},{name:"endArray",init:function(t,e){for(var r=e.length;r--;)this.add(t,r,t[r]||0,e[r],0,0,0,0,0,1)}},ed("roundProps",Zu),ed("modifiers"),ed("snap",Gg))||Al;te.version=Ce.version=Pe.version="3.12.5",pg=1,Au()&&xs(),Et.Power0,Et.Power1,Et.Power2,Et.Power3,Et.Power4,Et.Linear,Et.Quad,Et.Cubic,Et.Quart,Et.Quint,Et.Strong,Et.Elastic,Et.Back,Et.SteppedEase,Et.Bounce,Et.Sine,Et.Expo,Et.Circ;/*!
1168
1168
  * CSSPlugin 3.12.5
1169
1169
  * https://gsap.com
1170
1170
  *
@@ -1172,6 +1172,6 @@ void main(void)\r
1172
1172
  * Subject to the terms at https://gsap.com/standard-license or for
1173
1173
  * Club GSAP members, the agreement issued with that membership.
1174
1174
  * @author: Jack Doyle, jack@greensock.com
1175
- */var ry,Vr,_s,id,An,ny,rd,VC=function(){return typeof window<"u"},hr={},Mn=180/Math.PI,vs=Math.PI/180,ws=Math.atan2,sy=1e8,nd=/([A-Z])/g,HC=/(left|right|width|margin|padding|x)/i,KC=/[\s,\(]\S/,Ni={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},sd=function(t,e){return e.set(e.t,e.p,Math.round((e.s+e.c*t)*1e4)/1e4+e.u,e)},zC=function(t,e){return e.set(e.t,e.p,t===1?e.e:Math.round((e.s+e.c*t)*1e4)/1e4+e.u,e)},YC=function(t,e){return e.set(e.t,e.p,t?Math.round((e.s+e.c*t)*1e4)/1e4+e.u:e.b,e)},jC=function(t,e){var r=e.s+e.c*t;e.set(e.t,e.p,~~(r+(r<0?-.5:.5))+e.u,e)},oy=function(t,e){return e.set(e.t,e.p,t?e.e:e.b,e)},ay=function(t,e){return e.set(e.t,e.p,t!==1?e.b:e.e,e)},JC=function(t,e,r){return t.style[e]=r},$C=function(t,e,r){return t.style.setProperty(e,r)},QC=function(t,e,r){return t._gsap[e]=r},qC=function(t,e,r){return t._gsap.scaleX=t._gsap.scaleY=r},tE=function(t,e,r,n,s){var o=t._gsap;o.scaleX=o.scaleY=r,o.renderTransform(s,o)},eE=function(t,e,r,n,s){var o=t._gsap;o[e]=r,o.renderTransform(s,o)},Kt="transform",Le=Kt+"Origin",iE=function i(t,e){var r=this,n=this.target,s=n.style,o=n._gsap;if(t in hr&&s){if(this.tfm=this.tfm||{},t!=="transform")t=Ni[t]||t,~t.indexOf(",")?t.split(",").forEach(function(a){return r.tfm[a]=cr(n,a)}):this.tfm[t]=o.x?o[t]:cr(n,t),t===Le&&(this.tfm.zOrigin=o.zOrigin);else return Ni.transform.split(",").forEach(function(a){return i.call(r,a,e)});if(this.props.indexOf(Kt)>=0)return;o.svg&&(this.svgo=n.getAttribute("data-svg-origin"),this.props.push(Le,e,"")),t=Kt}(s||e)&&this.props.push(t,e,s[t])},ly=function(t){t.translate&&(t.removeProperty("translate"),t.removeProperty("scale"),t.removeProperty("rotate"))},rE=function(){var t=this.props,e=this.target,r=e.style,n=e._gsap,s,o;for(s=0;s<t.length;s+=3)t[s+1]?e[t[s]]=t[s+2]:t[s+2]?r[t[s]]=t[s+2]:r.removeProperty(t[s].substr(0,2)==="--"?t[s]:t[s].replace(nd,"-$1").toLowerCase());if(this.tfm){for(o in this.tfm)n[o]=this.tfm[o];n.svg&&(n.renderTransform(),e.setAttribute("data-svg-origin",this.svgo||"")),s=rd(),(!s||!s.isStart)&&!r[Kt]&&(ly(r),n.zOrigin&&r[Le]&&(r[Le]+=" "+n.zOrigin+"px",n.zOrigin=0,n.renderTransform()),n.uncache=1)}},hy=function(t,e){var r={target:t,props:[],revert:rE,save:iE};return t._gsap||Pe.core.getCache(t),e&&e.split(",").forEach(function(n){return r.save(n)}),r},cy,od=function(t,e){var r=Vr.createElementNS?Vr.createElementNS((e||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):Vr.createElement(t);return r&&r.style?r:Vr.createElement(t)},Oi=function i(t,e,r){var n=getComputedStyle(t);return n[e]||n.getPropertyValue(e.replace(nd,"-$1").toLowerCase())||n.getPropertyValue(e)||!r&&i(t,Ts(e)||e,1)||""},uy="O,Moz,ms,Ms,Webkit".split(","),Ts=function(t,e,r){var n=e||An,s=n.style,o=5;if(t in s&&!r)return t;for(t=t.charAt(0).toUpperCase()+t.substr(1);o--&&!(uy[o]+t in s););return o<0?null:(o===3?"ms":o>=0?uy[o]:"")+t},ad=function(){VC()&&window.document&&(ry=window,Vr=ry.document,_s=Vr.documentElement,An=od("div")||{style:{}},od("div"),Kt=Ts(Kt),Le=Kt+"Origin",An.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",cy=!!Ts("perspective"),rd=Pe.core.reverting,id=1)},ld=function i(t){var e=od("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),r=this.parentNode,n=this.nextSibling,s=this.style.cssText,o;if(_s.appendChild(e),e.appendChild(this),this.style.display="block",t)try{o=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=i}catch{}else this._gsapBBox&&(o=this._gsapBBox());return r&&(n?r.insertBefore(this,n):r.appendChild(this)),_s.removeChild(e),this.style.cssText=s,o},dy=function(t,e){for(var r=e.length;r--;)if(t.hasAttribute(e[r]))return t.getAttribute(e[r])},fy=function(t){var e;try{e=t.getBBox()}catch{e=ld.call(t,!0)}return e&&(e.width||e.height)||t.getBBox===ld||(e=ld.call(t,!0)),e&&!e.width&&!e.x&&!e.y?{x:+dy(t,["x","cx","x1"])||0,y:+dy(t,["y","cy","y1"])||0,width:0,height:0}:e},py=function(t){return!!(t.getCTM&&(!t.parentNode||t.ownerSVGElement)&&fy(t))},Rn=function(t,e){if(e){var r=t.style,n;e in hr&&e!==Le&&(e=Kt),r.removeProperty?(n=e.substr(0,2),(n==="ms"||e.substr(0,6)==="webkit")&&(e="-"+e),r.removeProperty(n==="--"?e:e.replace(nd,"-$1").toLowerCase())):r.removeAttribute(e)}},Hr=function(t,e,r,n,s,o){var a=new Re(t._pt,e,r,0,1,o?ay:oy);return t._pt=a,a.b=n,a.e=s,t._props.push(r),a},my={deg:1,rad:1,turn:1},nE={grid:1,flex:1},Kr=function i(t,e,r,n){var s=parseFloat(r)||0,o=(r+"").trim().substr((s+"").length)||"px",a=An.style,l=HC.test(e),h=t.tagName.toLowerCase()==="svg",c=(h?"client":"offset")+(l?"Width":"Height"),u=100,d=n==="px",f=n==="%",p,m,g,y;if(n===o||!s||my[n]||my[o])return s;if(o!=="px"&&!d&&(s=i(t,e,r,"px")),y=t.getCTM&&py(t),(f||o==="%")&&(hr[e]||~e.indexOf("adius")))return p=y?t.getBBox()[l?"width":"height"]:t[c],Jt(f?s/p*u:s/100*p);if(a[l?"width":"height"]=u+(d?o:n),m=~e.indexOf("adius")||n==="em"&&t.appendChild&&!h?t:t.parentNode,y&&(m=(t.ownerSVGElement||{}).parentNode),(!m||m===Vr||!m.appendChild)&&(m=Vr.body),g=m._gsap,g&&f&&g.width&&l&&g.time===Ze.time&&!g.uncache)return Jt(s/g.width*u);if(f&&(e==="height"||e==="width")){var x=t.style[e];t.style[e]=u+n,p=t[c],x?t.style[e]=x:Rn(t,e)}else(f||o==="%")&&!nE[Oi(m,"display")]&&(a.position=Oi(t,"position")),m===t&&(a.position="static"),m.appendChild(An),p=An[c],m.removeChild(An),a.position="absolute";return l&&f&&(g=wn(m),g.time=Ze.time,g.width=m[c]),Jt(d?p*s/u:p&&s?u/p*s:0)},cr=function(t,e,r,n){var s;return id||ad(),e in Ni&&e!=="transform"&&(e=Ni[e],~e.indexOf(",")&&(e=e.split(",")[0])),hr[e]&&e!=="transform"?(s=Io(t,n),s=e!=="transformOrigin"?s[e]:s.svg?s.origin:Rl(Oi(t,Le))+" "+s.zOrigin+"px"):(s=t.style[e],(!s||s==="auto"||n||~(s+"").indexOf("calc("))&&(s=Ml[e]&&Ml[e](t,e,r)||Oi(t,e)||xg(t,e)||(e==="opacity"?1:0))),r&&!~(s+"").trim().indexOf(" ")?Kr(t,e,s,r)+r:s},sE=function(t,e,r,n){if(!r||r==="none"){var s=Ts(e,t,1),o=s&&Oi(t,s,1);o&&o!==r?(e=s,r=o):e==="borderColor"&&(r=Oi(t,"borderTopColor"))}var a=new Re(this._pt,t.style,e,0,1,qg),l=0,h=0,c,u,d,f,p,m,g,y,x,b,v,w;if(a.b=r,a.e=n,r+="",n+="",n==="auto"&&(m=t.style[e],t.style[e]=n,n=Oi(t,e)||n,m?t.style[e]=m:Rn(t,e)),c=[r,n],Zg(c),r=c[0],n=c[1],d=r.match(ps)||[],w=n.match(ps)||[],w.length){for(;u=ps.exec(n);)g=u[0],x=n.substring(l,u.index),p?p=(p+1)%5:(x.substr(-5)==="rgba("||x.substr(-5)==="hsla(")&&(p=1),g!==(m=d[h++]||"")&&(f=parseFloat(m)||0,v=m.substr((f+"").length),g.charAt(1)==="="&&(g=ms(f,g)+v),y=parseFloat(g),b=g.substr((y+"").length),l=ps.lastIndex-b.length,b||(b=b||Be.units[e]||v,l===n.length&&(n+=b,a.e+=b)),v!==b&&(f=Kr(t,e,m,b)||0),a._pt={_next:a._pt,p:x||h===1?x:",",s:f,c:y-f,m:p&&p<4||e==="zIndex"?Math.round:0});a.c=l<n.length?n.substring(l,n.length):""}else a.r=e==="display"&&n==="none"?ay:oy;return dg.test(n)&&(a.e=0),this._pt=a,a},gy={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},oE=function(t){var e=t.split(" "),r=e[0],n=e[1]||"50%";return(r==="top"||r==="bottom"||n==="left"||n==="right")&&(t=r,r=n,n=t),e[0]=gy[r]||r,e[1]=gy[n]||n,e.join(" ")},aE=function(t,e){if(e.tween&&e.tween._time===e.tween._dur){var r=e.t,n=r.style,s=e.u,o=r._gsap,a,l,h;if(s==="all"||s===!0)n.cssText="",l=1;else for(s=s.split(","),h=s.length;--h>-1;)a=s[h],hr[a]&&(l=1,a=a==="transformOrigin"?Le:Kt),Rn(r,a);l&&(Rn(r,Kt),o&&(o.svg&&r.removeAttribute("transform"),Io(r,1),o.uncache=1,ly(n)))}},Ml={clearProps:function(t,e,r,n,s){if(s.data!=="isFromStart"){var o=t._pt=new Re(t._pt,e,r,0,0,aE);return o.u=n,o.pr=-10,o.tween=s,t._props.push(r),1}}},Eo=[1,0,0,1,0,0],yy={},by=function(t){return t==="matrix(1, 0, 0, 1, 0, 0)"||t==="none"||!t},xy=function(t){var e=Oi(t,Kt);return by(e)?Eo:e.substr(7).match(ug).map(Jt)},hd=function(t,e){var r=t._gsap||wn(t),n=t.style,s=xy(t),o,a,l,h;return r.svg&&t.getAttribute("transform")?(l=t.transform.baseVal.consolidate().matrix,s=[l.a,l.b,l.c,l.d,l.e,l.f],s.join(",")==="1,0,0,1,0,0"?Eo:s):(s===Eo&&!t.offsetParent&&t!==_s&&!r.svg&&(l=n.display,n.display="block",o=t.parentNode,(!o||!t.offsetParent)&&(h=1,a=t.nextElementSibling,_s.appendChild(t)),s=xy(t),l?n.display=l:Rn(t,"display"),h&&(a?o.insertBefore(t,a):o?o.appendChild(t):_s.removeChild(t))),e&&s.length>6?[s[0],s[1],s[4],s[5],s[12],s[13]]:s)},cd=function(t,e,r,n,s,o){var a=t._gsap,l=s||hd(t,!0),h=a.xOrigin||0,c=a.yOrigin||0,u=a.xOffset||0,d=a.yOffset||0,f=l[0],p=l[1],m=l[2],g=l[3],y=l[4],x=l[5],b=e.split(" "),v=parseFloat(b[0])||0,w=parseFloat(b[1])||0,S,E,I,A;r?l!==Eo&&(E=f*g-p*m)&&(I=v*(g/E)+w*(-m/E)+(m*x-g*y)/E,A=v*(-p/E)+w*(f/E)-(f*x-p*y)/E,v=I,w=A):(S=fy(t),v=S.x+(~b[0].indexOf("%")?v/100*S.width:v),w=S.y+(~(b[1]||b[0]).indexOf("%")?w/100*S.height:w)),n||n!==!1&&a.smooth?(y=v-h,x=w-c,a.xOffset=u+(y*f+x*m)-y,a.yOffset=d+(y*p+x*g)-x):a.xOffset=a.yOffset=0,a.xOrigin=v,a.yOrigin=w,a.smooth=!!n,a.origin=e,a.originIsAbsolute=!!r,t.style[Le]="0px 0px",o&&(Hr(o,a,"xOrigin",h,v),Hr(o,a,"yOrigin",c,w),Hr(o,a,"xOffset",u,a.xOffset),Hr(o,a,"yOffset",d,a.yOffset)),t.setAttribute("data-svg-origin",v+" "+w)},Io=function(t,e){var r=t._gsap||new zg(t);if("x"in r&&!e&&!r.uncache)return r;var n=t.style,s=r.scaleX<0,o="px",a="deg",l=getComputedStyle(t),h=Oi(t,Le)||"0",c,u,d,f,p,m,g,y,x,b,v,w,S,E,I,A,L,G,F,M,N,W,K,H,j,B,D,k,V,et,ft,at;return c=u=d=m=g=y=x=b=v=0,f=p=1,r.svg=!!(t.getCTM&&py(t)),l.translate&&((l.translate!=="none"||l.scale!=="none"||l.rotate!=="none")&&(n[Kt]=(l.translate!=="none"?"translate3d("+(l.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(l.rotate!=="none"?"rotate("+l.rotate+") ":"")+(l.scale!=="none"?"scale("+l.scale.split(" ").join(",")+") ":"")+(l[Kt]!=="none"?l[Kt]:"")),n.scale=n.rotate=n.translate="none"),E=hd(t,r.svg),r.svg&&(r.uncache?(j=t.getBBox(),h=r.xOrigin-j.x+"px "+(r.yOrigin-j.y)+"px",H=""):H=!e&&t.getAttribute("data-svg-origin"),cd(t,H||h,!!H||r.originIsAbsolute,r.smooth!==!1,E)),w=r.xOrigin||0,S=r.yOrigin||0,E!==Eo&&(G=E[0],F=E[1],M=E[2],N=E[3],c=W=E[4],u=K=E[5],E.length===6?(f=Math.sqrt(G*G+F*F),p=Math.sqrt(N*N+M*M),m=G||F?ws(F,G)*Mn:0,x=M||N?ws(M,N)*Mn+m:0,x&&(p*=Math.abs(Math.cos(x*vs))),r.svg&&(c-=w-(w*G+S*M),u-=S-(w*F+S*N))):(at=E[6],et=E[7],D=E[8],k=E[9],V=E[10],ft=E[11],c=E[12],u=E[13],d=E[14],I=ws(at,V),g=I*Mn,I&&(A=Math.cos(-I),L=Math.sin(-I),H=W*A+D*L,j=K*A+k*L,B=at*A+V*L,D=W*-L+D*A,k=K*-L+k*A,V=at*-L+V*A,ft=et*-L+ft*A,W=H,K=j,at=B),I=ws(-M,V),y=I*Mn,I&&(A=Math.cos(-I),L=Math.sin(-I),H=G*A-D*L,j=F*A-k*L,B=M*A-V*L,ft=N*L+ft*A,G=H,F=j,M=B),I=ws(F,G),m=I*Mn,I&&(A=Math.cos(I),L=Math.sin(I),H=G*A+F*L,j=W*A+K*L,F=F*A-G*L,K=K*A-W*L,G=H,W=j),g&&Math.abs(g)+Math.abs(m)>359.9&&(g=m=0,y=180-y),f=Jt(Math.sqrt(G*G+F*F+M*M)),p=Jt(Math.sqrt(K*K+at*at)),I=ws(W,K),x=Math.abs(I)>2e-4?I*Mn:0,v=ft?1/(ft<0?-ft:ft):0),r.svg&&(H=t.getAttribute("transform"),r.forceCSS=t.setAttribute("transform","")||!by(Oi(t,Kt)),H&&t.setAttribute("transform",H))),Math.abs(x)>90&&Math.abs(x)<270&&(s?(f*=-1,x+=m<=0?180:-180,m+=m<=0?180:-180):(p*=-1,x+=x<=0?180:-180)),e=e||r.uncache,r.x=c-((r.xPercent=c&&(!e&&r.xPercent||(Math.round(t.offsetWidth/2)===Math.round(-c)?-50:0)))?t.offsetWidth*r.xPercent/100:0)+o,r.y=u-((r.yPercent=u&&(!e&&r.yPercent||(Math.round(t.offsetHeight/2)===Math.round(-u)?-50:0)))?t.offsetHeight*r.yPercent/100:0)+o,r.z=d+o,r.scaleX=Jt(f),r.scaleY=Jt(p),r.rotation=Jt(m)+a,r.rotationX=Jt(g)+a,r.rotationY=Jt(y)+a,r.skewX=x+a,r.skewY=b+a,r.transformPerspective=v+o,(r.zOrigin=parseFloat(h.split(" ")[2])||!e&&r.zOrigin||0)&&(n[Le]=Rl(h)),r.xOffset=r.yOffset=0,r.force3D=Be.force3D,r.renderTransform=r.svg?hE:cy?_y:lE,r.uncache=0,r},Rl=function(t){return(t=t.split(" "))[0]+" "+t[1]},ud=function(t,e,r){var n=xe(e);return Jt(parseFloat(e)+parseFloat(Kr(t,"x",r+"px",n)))+n},lE=function(t,e){e.z="0px",e.rotationY=e.rotationX="0deg",e.force3D=0,_y(t,e)},Pn="0deg",Ao="0px",Ln=") ",_y=function(t,e){var r=e||this,n=r.xPercent,s=r.yPercent,o=r.x,a=r.y,l=r.z,h=r.rotation,c=r.rotationY,u=r.rotationX,d=r.skewX,f=r.skewY,p=r.scaleX,m=r.scaleY,g=r.transformPerspective,y=r.force3D,x=r.target,b=r.zOrigin,v="",w=y==="auto"&&t&&t!==1||y===!0;if(b&&(u!==Pn||c!==Pn)){var S=parseFloat(c)*vs,E=Math.sin(S),I=Math.cos(S),A;S=parseFloat(u)*vs,A=Math.cos(S),o=ud(x,o,E*A*-b),a=ud(x,a,-Math.sin(S)*-b),l=ud(x,l,I*A*-b+b)}g!==Ao&&(v+="perspective("+g+Ln),(n||s)&&(v+="translate("+n+"%, "+s+"%) "),(w||o!==Ao||a!==Ao||l!==Ao)&&(v+=l!==Ao||w?"translate3d("+o+", "+a+", "+l+") ":"translate("+o+", "+a+Ln),h!==Pn&&(v+="rotate("+h+Ln),c!==Pn&&(v+="rotateY("+c+Ln),u!==Pn&&(v+="rotateX("+u+Ln),(d!==Pn||f!==Pn)&&(v+="skew("+d+", "+f+Ln),(p!==1||m!==1)&&(v+="scale("+p+", "+m+Ln),x.style[Kt]=v||"translate(0, 0)"},hE=function(t,e){var r=e||this,n=r.xPercent,s=r.yPercent,o=r.x,a=r.y,l=r.rotation,h=r.skewX,c=r.skewY,u=r.scaleX,d=r.scaleY,f=r.target,p=r.xOrigin,m=r.yOrigin,g=r.xOffset,y=r.yOffset,x=r.forceCSS,b=parseFloat(o),v=parseFloat(a),w,S,E,I,A;l=parseFloat(l),h=parseFloat(h),c=parseFloat(c),c&&(c=parseFloat(c),h+=c,l+=c),l||h?(l*=vs,h*=vs,w=Math.cos(l)*u,S=Math.sin(l)*u,E=Math.sin(l-h)*-d,I=Math.cos(l-h)*d,h&&(c*=vs,A=Math.tan(h-c),A=Math.sqrt(1+A*A),E*=A,I*=A,c&&(A=Math.tan(c),A=Math.sqrt(1+A*A),w*=A,S*=A)),w=Jt(w),S=Jt(S),E=Jt(E),I=Jt(I)):(w=u,I=d,S=E=0),(b&&!~(o+"").indexOf("px")||v&&!~(a+"").indexOf("px"))&&(b=Kr(f,"x",o,"px"),v=Kr(f,"y",a,"px")),(p||m||g||y)&&(b=Jt(b+p-(p*w+m*E)+g),v=Jt(v+m-(p*S+m*I)+y)),(n||s)&&(A=f.getBBox(),b=Jt(b+n/100*A.width),v=Jt(v+s/100*A.height)),A="matrix("+w+","+S+","+E+","+I+","+b+","+v+")",f.setAttribute("transform",A),x&&(f.style[Kt]=A)},cE=function(t,e,r,n,s){var o=360,a=ce(s),l=parseFloat(s)*(a&&~s.indexOf("rad")?Mn:1),h=l-n,c=n+h+"deg",u,d;return a&&(u=s.split("_")[1],u==="short"&&(h%=o,h!==h%(o/2)&&(h+=h<0?o:-o)),u==="cw"&&h<0?h=(h+o*sy)%o-~~(h/o)*o:u==="ccw"&&h>0&&(h=(h-o*sy)%o-~~(h/o)*o)),t._pt=d=new Re(t._pt,e,r,n,h,zC),d.e=c,d.u="deg",t._props.push(r),d},vy=function(t,e){for(var r in e)t[r]=e[r];return t},uE=function(t,e,r){var n=vy({},r._gsap),s="perspective,force3D,transformOrigin,svgOrigin",o=r.style,a,l,h,c,u,d,f,p;n.svg?(h=r.getAttribute("transform"),r.setAttribute("transform",""),o[Kt]=e,a=Io(r,1),Rn(r,Kt),r.setAttribute("transform",h)):(h=getComputedStyle(r)[Kt],o[Kt]=e,a=Io(r,1),o[Kt]=h);for(l in hr)h=n[l],c=a[l],h!==c&&s.indexOf(l)<0&&(f=xe(h),p=xe(c),u=f!==p?Kr(r,l,h,p):parseFloat(h),d=parseFloat(c),t._pt=new Re(t._pt,a,l,u,d-u,sd),t._pt.u=p||0,t._props.push(l));vy(a,n)};Me("padding,margin,Width,Radius",function(i,t){var e="Top",r="Right",n="Bottom",s="Left",o=(t<3?[e,r,n,s]:[e+s,e+r,n+r,n+s]).map(function(a){return t<2?i+a:"border"+a+i});Ml[t>1?"border"+i:i]=function(a,l,h,c,u){var d,f;if(arguments.length<4)return d=o.map(function(p){return cr(a,p,h)}),f=d.join(" "),f.split(d[0]).length===5?d[0]:f;d=(c+"").split(" "),f={},o.forEach(function(p,m){return f[p]=d[m]=d[m]||d[(m-1)/2|0]}),a.init(l,f,u)}});var wy={name:"css",register:ad,targetTest:function(t){return t.style&&t.nodeType},init:function(t,e,r,n,s){var o=this._props,a=t.style,l=r.vars.startAt,h,c,u,d,f,p,m,g,y,x,b,v,w,S,E,I;id||ad(),this.styles=this.styles||hy(t),I=this.styles.props,this.tween=r;for(m in e)if(m!=="autoRound"&&(c=e[m],!(Xe[m]&&Yg(m,e,r,n,t,s)))){if(f=typeof c,p=Ml[m],f==="function"&&(c=c.call(r,n,t,s),f=typeof c),f==="string"&&~c.indexOf("random(")&&(c=_o(c)),p)p(this,t,m,c,r)&&(E=1);else if(m.substr(0,2)==="--")h=(getComputedStyle(t).getPropertyValue(m)+"").trim(),c+="",Wr.lastIndex=0,Wr.test(h)||(g=xe(h),y=xe(c)),y?g!==y&&(h=Kr(t,m,h,y)+y):g&&(c+=g),this.add(a,"setProperty",h,c,n,s,0,0,m),o.push(m),I.push(m,0,a[m]);else if(f!=="undefined"){if(l&&m in l?(h=typeof l[m]=="function"?l[m].call(r,n,t,s):l[m],ce(h)&&~h.indexOf("random(")&&(h=_o(h)),xe(h+"")||h==="auto"||(h+=Be.units[m]||xe(cr(t,m))||""),(h+"").charAt(1)==="="&&(h=cr(t,m))):h=cr(t,m),d=parseFloat(h),x=f==="string"&&c.charAt(1)==="="&&c.substr(0,2),x&&(c=c.substr(2)),u=parseFloat(c),m in Ni&&(m==="autoAlpha"&&(d===1&&cr(t,"visibility")==="hidden"&&u&&(d=0),I.push("visibility",0,a.visibility),Hr(this,a,"visibility",d?"inherit":"hidden",u?"inherit":"hidden",!u)),m!=="scale"&&m!=="transform"&&(m=Ni[m],~m.indexOf(",")&&(m=m.split(",")[0]))),b=m in hr,b){if(this.styles.save(m),v||(w=t._gsap,w.renderTransform&&!e.parseTransform||Io(t,e.parseTransform),S=e.smoothOrigin!==!1&&w.smooth,v=this._pt=new Re(this._pt,a,Kt,0,1,w.renderTransform,w,0,-1),v.dep=1),m==="scale")this._pt=new Re(this._pt,w,"scaleY",w.scaleY,(x?ms(w.scaleY,x+u):u)-w.scaleY||0,sd),this._pt.u=0,o.push("scaleY",m),m+="X";else if(m==="transformOrigin"){I.push(Le,0,a[Le]),c=oE(c),w.svg?cd(t,c,0,S,0,this):(y=parseFloat(c.split(" ")[2])||0,y!==w.zOrigin&&Hr(this,w,"zOrigin",w.zOrigin,y),Hr(this,a,m,Rl(h),Rl(c)));continue}else if(m==="svgOrigin"){cd(t,c,1,S,0,this);continue}else if(m in yy){cE(this,w,m,d,x?ms(d,x+c):c);continue}else if(m==="smoothOrigin"){Hr(this,w,"smooth",w.smooth,c);continue}else if(m==="force3D"){w[m]=c;continue}else if(m==="transform"){uE(this,c,t);continue}}else m in a||(m=Ts(m)||m);if(b||(u||u===0)&&(d||d===0)&&!KC.test(c)&&m in a)g=(h+"").substr((d+"").length),u||(u=0),y=xe(c)||(m in Be.units?Be.units[m]:g),g!==y&&(d=Kr(t,m,h,y)),this._pt=new Re(this._pt,b?w:a,m,d,(x?ms(d,x+u):u)-d,!b&&(y==="px"||m==="zIndex")&&e.autoRound!==!1?jC:sd),this._pt.u=y||0,g!==y&&y!=="%"&&(this._pt.b=h,this._pt.r=YC);else if(m in a)sE.call(this,t,m,h,x?x+c:c);else if(m in t)this.add(t,m,h||t[m],x?x+c:c,n,s);else if(m!=="parseTransform"){Gu(m,c);continue}b||(m in a?I.push(m,0,a[m]):I.push(m,1,h||t[m])),o.push(m)}}E&&ty(this)},render:function(t,e){if(e.tween._time||!rd())for(var r=e._pt;r;)r.r(t,r.d),r=r._next;else e.styles.revert()},get:cr,aliases:Ni,getSetter:function(t,e,r){var n=Ni[e];return n&&n.indexOf(",")<0&&(e=n),e in hr&&e!==Le&&(t._gsap.x||cr(t,"x"))?r&&ny===r?e==="scale"?qC:QC:(ny=r||{})&&(e==="scale"?tE:eE):t.style&&!Iu(t.style[e])?JC:~e.indexOf("-")?$C:$u(t,e)},core:{_removeProperty:Rn,_getMatrix:hd}};Pe.utils.checkPrefix=Ts,Pe.core.getStyleSaver=hy,function(i,t,e,r){var n=Me(i+","+t+","+e,function(s){hr[s]=1});Me(t,function(s){Be.units[s]="deg",yy[s]=1}),Ni[n[13]]=i+","+t,Me(r,function(s){var o=s.split(":");Ni[o[1]]=n[o[0]]})}("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY"),Me("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(i){Be.units[i]="px"}),Pe.registerPlugin(wy);var Ty=Pe.registerPlugin(wy)||Pe;Ty.core.Tween;const Gn=new gt;class dE{constructor(t={}){this._recursive=typeof t.recursive=="boolean"?t.recursive:!0,this._toggle=t.toggle||"visible",this._targetList=new Set}add(t){return this._targetList.add(t),this}addAll(t){for(let e=0,r=t.length;e<r;e++)this._targetList.add(t[e]);return this}remove(t){return this._targetList.delete(t),this}removeAll(t){for(let e=0,r=t.length;e<r;e++)this._targetList.delete(t[e]);return this}clear(){return this._targetList.clear(),this}cull(t,e=!1){return e||this.uncull(),this._targetList.forEach(r=>{e||r.getBounds(!1,Gn),this._recursive?this.cullRecursive(t,r,e):(e&&r._bounds.getRectangle(t),r[this._toggle]=Gn.right>t.left&&Gn.left<t.right&&Gn.bottom>t.top&&Gn.top<t.bottom)}),this}uncull(){return this._targetList.forEach(t=>{this._recursive?this.uncullRecursive(t):t[this._toggle]=!1}),this}cullRecursive(t,e,r){const n=r?e._bounds.getRectangle(Gn):e.getBounds(!0,Gn);if(e[this._toggle]=n.right>t.left&&n.left<t.right&&n.bottom>t.top&&n.top<t.bottom,!(n.left>=t.left&&n.top>=t.top&&n.right<=t.right&&n.bottom<=t.bottom)&&e[this._toggle]&&e.children&&e.children.length){const o=e.children;for(let a=0,l=o.length;a<l;a++)this.cullRecursive(t,o[a])}}uncullRecursive(t){if(t[this._toggle]=!0,t.children&&t.children.length){const e=t.children;for(let r=0,n=e.length;r<n;r++)this.uncullRecursive(e[r])}}}var Pl={exports:{}};Pl.exports,function(i,t){var e=200,r="__lodash_hash_undefined__",n=1,s=2,o=9007199254740991,a="[object Arguments]",l="[object Array]",h="[object AsyncFunction]",c="[object Boolean]",u="[object Date]",d="[object Error]",f="[object Function]",p="[object GeneratorFunction]",m="[object Map]",g="[object Number]",y="[object Null]",x="[object Object]",b="[object Promise]",v="[object Proxy]",w="[object RegExp]",S="[object Set]",E="[object String]",I="[object Symbol]",A="[object Undefined]",L="[object WeakMap]",G="[object ArrayBuffer]",F="[object DataView]",M="[object Float32Array]",N="[object Float64Array]",W="[object Int8Array]",K="[object Int16Array]",H="[object Int32Array]",j="[object Uint8Array]",B="[object Uint8ClampedArray]",D="[object Uint16Array]",k="[object Uint32Array]",V=/[\\^$.*+?()[\]{}|]/g,et=/^\[object .+?Constructor\]$/,ft=/^(?:0|[1-9]\d*)$/,at={};at[M]=at[N]=at[W]=at[K]=at[H]=at[j]=at[B]=at[D]=at[k]=!0,at[a]=at[l]=at[G]=at[c]=at[F]=at[u]=at[d]=at[f]=at[m]=at[g]=at[x]=at[w]=at[S]=at[E]=at[L]=!1;var Tt=typeof we=="object"&&we&&we.Object===Object&&we,It=typeof self=="object"&&self&&self.Object===Object&&self,Q=Tt||It||Function("return this")(),Z=t&&!t.nodeType&&t,J=Z&&!0&&i&&!i.nodeType&&i,$=J&&J.exports===Z,O=$&&Tt.process,pt=function(){try{return O&&O.binding&&O.binding("util")}catch{}}(),yt=pt&&pt.isTypedArray;function Rt(T,R){for(var _=-1,C=T==null?0:T.length,P=0,X=[];++_<C;){var ut=T[_];R(ut,_,T)&&(X[P++]=ut)}return X}function Bt(T,R){for(var _=-1,C=R.length,P=T.length;++_<C;)T[P+_]=R[_];return T}function Fe(T,R){for(var _=-1,C=T==null?0:T.length;++_<C;)if(R(T[_],_,T))return!0;return!1}function Ve(T,R){for(var _=-1,C=Array(T);++_<T;)C[_]=R(_);return C}function Ko(T){return function(R){return T(R)}}function $r(T,R){return T.has(R)}function ks(T,R){return T==null?void 0:T[R]}function Fs(T){var R=-1,_=Array(T.size);return T.forEach(function(C,P){_[++R]=[P,C]}),_}function yi(T,R){return function(_){return T(R(_))}}function sh(T){var R=-1,_=Array(T.size);return T.forEach(function(C){_[++R]=C}),_}var oh=Array.prototype,ef=Function.prototype,Ds=Object.prototype,Qr=Q["__core-js_shared__"],zo=ef.toString,He=Ds.hasOwnProperty,Yo=function(){var T=/[^.]+$/.exec(Qr&&Qr.keys&&Qr.keys.IE_PROTO||"");return T?"Symbol(src)_1."+T:""}(),jo=Ds.toString,ah=RegExp("^"+zo.call(He).replace(V,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),lh=$?Q.Buffer:void 0,Ns=Q.Symbol,Vi=Q.Uint8Array,Un=Ds.propertyIsEnumerable,rf=oh.splice,Hi=Ns?Ns.toStringTag:void 0,hh=Object.getOwnPropertySymbols,ch=lh?lh.isBuffer:void 0,Xn=yi(Object.keys,Object),Jo=vr(Q,"DataView"),Ke=vr(Q,"Map"),$o=vr(Q,"Promise"),Qo=vr(Q,"Set"),qo=vr(Q,"WeakMap"),Wn=vr(Object,"create"),nf=xi(Jo),bi=xi(Ke),sf=xi($o),of=xi(Qo),af=xi(qo),uh=Ns?Ns.prototype:void 0,ta=uh?uh.valueOf:void 0;function De(T){var R=-1,_=T==null?0:T.length;for(this.clear();++R<_;){var C=T[R];this.set(C[0],C[1])}}function lf(){this.__data__=Wn?Wn(null):{},this.size=0}function hf(T){var R=this.has(T)&&delete this.__data__[T];return this.size-=R?1:0,R}function cf(T){var R=this.__data__;if(Wn){var _=R[T];return _===r?void 0:_}return He.call(R,T)?R[T]:void 0}function uf(T){var R=this.__data__;return Wn?R[T]!==void 0:He.call(R,T)}function df(T,R){var _=this.__data__;return this.size+=this.has(T)?0:1,_[T]=Wn&&R===void 0?r:R,this}De.prototype.clear=lf,De.prototype.delete=hf,De.prototype.get=cf,De.prototype.has=uf,De.prototype.set=df;function _e(T){var R=-1,_=T==null?0:T.length;for(this.clear();++R<_;){var C=T[R];this.set(C[0],C[1])}}function ff(){this.__data__=[],this.size=0}function pf(T){var R=this.__data__,_=Bs(R,T);if(_<0)return!1;var C=R.length-1;return _==C?R.pop():rf.call(R,_,1),--this.size,!0}function mf(T){var R=this.__data__,_=Bs(R,T);return _<0?void 0:R[_][1]}function gf(T){return Bs(this.__data__,T)>-1}function yf(T,R){var _=this.__data__,C=Bs(_,T);return C<0?(++this.size,_.push([T,R])):_[C][1]=R,this}_e.prototype.clear=ff,_e.prototype.delete=pf,_e.prototype.get=mf,_e.prototype.has=gf,_e.prototype.set=yf;function xr(T){var R=-1,_=T==null?0:T.length;for(this.clear();++R<_;){var C=T[R];this.set(C[0],C[1])}}function ea(){this.size=0,this.__data__={hash:new De,map:new(Ke||_e),string:new De}}function bf(T){var R=Xs(this,T).delete(T);return this.size-=R?1:0,R}function Os(T){return Xs(this,T).get(T)}function ia(T){return Xs(this,T).has(T)}function xf(T,R){var _=Xs(this,T),C=_.size;return _.set(T,R),this.size+=_.size==C?0:1,this}xr.prototype.clear=ea,xr.prototype.delete=bf,xr.prototype.get=Os,xr.prototype.has=ia,xr.prototype.set=xf;function _r(T){var R=-1,_=T==null?0:T.length;for(this.__data__=new xr;++R<_;)this.add(T[R])}function dh(T){return this.__data__.set(T,r),this}function _f(T){return this.__data__.has(T)}_r.prototype.add=_r.prototype.push=dh,_r.prototype.has=_f;function Ki(T){var R=this.__data__=new _e(T);this.size=R.size}function vf(){this.__data__=new _e,this.size=0}function fh(T){var R=this.__data__,_=R.delete(T);return this.size=R.size,_}function wf(T){return this.__data__.get(T)}function Tf(T){return this.__data__.has(T)}function Sf(T,R){var _=this.__data__;if(_ instanceof _e){var C=_.__data__;if(!Ke||C.length<e-1)return C.push([T,R]),this.size=++_.size,this;_=this.__data__=new xr(C)}return _.set(T,R),this.size=_.size,this}Ki.prototype.clear=vf,Ki.prototype.delete=fh,Ki.prototype.get=wf,Ki.prototype.has=Tf,Ki.prototype.set=Sf;function Cf(T,R){var _=Vs(T),C=!_&&sa(T),P=!_&&!C&&Vn(T),X=!_&&!C&&!P&&wh(T),ut=_||C||P||X,bt=ut?Ve(T.length,String):[],_t=bt.length;for(var ht in T)(R||He.call(T,ht))&&!(ut&&(ht=="length"||P&&(ht=="offset"||ht=="parent")||X&&(ht=="buffer"||ht=="byteLength"||ht=="byteOffset")||na(ht,_t)))&&bt.push(ht);return bt}function Bs(T,R){for(var _=T.length;_--;)if(Zs(T[_][0],R))return _;return-1}function Ef(T,R,_){var C=R(T);return Vs(T)?C:Bt(C,_(T))}function Zn(T){return T==null?T===void 0?A:y:Hi&&Hi in Object(T)?Rf(T):Ws(T)}function ph(T){return tn(T)&&Zn(T)==a}function mh(T,R,_,C,P){return T===R?!0:T==null||R==null||!tn(T)&&!tn(R)?T!==T&&R!==R:If(T,R,_,C,mh,P)}function If(T,R,_,C,P,X){var ut=Vs(T),bt=Vs(R),_t=ut?l:zi(T),ht=bt?l:zi(R);_t=_t==a?x:_t,ht=ht==a?x:ht;var vt=_t==x,Xt=ht==x,Pt=_t==ht;if(Pt&&Vn(T)){if(!Vn(R))return!1;ut=!0,vt=!1}if(Pt&&!vt)return X||(X=new Ki),ut||wh(T)?gh(T,R,_,C,P,X):yh(T,R,_t,_,C,P,X);if(!(_&n)){var fe=vt&&He.call(T,"__wrapped__"),ve=Xt&&He.call(R,"__wrapped__");if(fe||ve){var si=fe?T.value():T,oi=ve?R.value():R;return X||(X=new Ki),P(si,oi,_,C,X)}}return Pt?(X||(X=new Ki),Mf(T,R,_,C,P,X)):!1}function Us(T){if(!vh(T)||Gf(T))return!1;var R=Yi(T)?ah:et;return R.test(xi(T))}function ra(T){return tn(T)&&qr(T.length)&&!!at[Zn(T)]}function Af(T){if(!kf(T))return Xn(T);var R=[];for(var _ in Object(T))He.call(T,_)&&_!="constructor"&&R.push(_);return R}function gh(T,R,_,C,P,X){var ut=_&n,bt=T.length,_t=R.length;if(bt!=_t&&!(ut&&_t>bt))return!1;var ht=X.get(T);if(ht&&X.get(R))return ht==R;var vt=-1,Xt=!0,Pt=_&s?new _r:void 0;for(X.set(T,R),X.set(R,T);++vt<bt;){var fe=T[vt],ve=R[vt];if(C)var si=ut?C(ve,fe,vt,R,T,X):C(fe,ve,vt,T,R,X);if(si!==void 0){if(si)continue;Xt=!1;break}if(Pt){if(!Fe(R,function(oi,Hn){if(!$r(Pt,Hn)&&(fe===oi||P(fe,oi,_,C,X)))return Pt.push(Hn)})){Xt=!1;break}}else if(!(fe===ve||P(fe,ve,_,C,X))){Xt=!1;break}}return X.delete(T),X.delete(R),Xt}function yh(T,R,_,C,P,X,ut){switch(_){case F:if(T.byteLength!=R.byteLength||T.byteOffset!=R.byteOffset)return!1;T=T.buffer,R=R.buffer;case G:return!(T.byteLength!=R.byteLength||!X(new Vi(T),new Vi(R)));case c:case u:case g:return Zs(+T,+R);case d:return T.name==R.name&&T.message==R.message;case w:case E:return T==R+"";case m:var bt=Fs;case S:var _t=C&n;if(bt||(bt=sh),T.size!=R.size&&!_t)return!1;var ht=ut.get(T);if(ht)return ht==R;C|=s,ut.set(T,R);var vt=gh(bt(T),bt(R),C,P,X,ut);return ut.delete(T),vt;case I:if(ta)return ta.call(T)==ta.call(R)}return!1}function Mf(T,R,_,C,P,X){var ut=_&n,bt=bh(T),_t=bt.length,ht=bh(R),vt=ht.length;if(_t!=vt&&!ut)return!1;for(var Xt=_t;Xt--;){var Pt=bt[Xt];if(!(ut?Pt in R:He.call(R,Pt)))return!1}var fe=X.get(T);if(fe&&X.get(R))return fe==R;var ve=!0;X.set(T,R),X.set(R,T);for(var si=ut;++Xt<_t;){Pt=bt[Xt];var oi=T[Pt],Hn=R[Pt];if(C)var Ib=ut?C(Hn,oi,Pt,R,T,X):C(oi,Hn,Pt,T,R,X);if(!(Ib===void 0?oi===Hn||P(oi,Hn,_,C,X):Ib)){ve=!1;break}si||(si=Pt=="constructor")}if(ve&&!si){var Sh=T.constructor,Ch=R.constructor;Sh!=Ch&&"constructor"in T&&"constructor"in R&&!(typeof Sh=="function"&&Sh instanceof Sh&&typeof Ch=="function"&&Ch instanceof Ch)&&(ve=!1)}return X.delete(T),X.delete(R),ve}function bh(T){return Ef(T,Th,Pf)}function Xs(T,R){var _=T.__data__;return Lf(R)?_[typeof R=="string"?"string":"hash"]:_.map}function vr(T,R){var _=ks(T,R);return Us(_)?_:void 0}function Rf(T){var R=He.call(T,Hi),_=T[Hi];try{T[Hi]=void 0;var C=!0}catch{}var P=jo.call(T);return C&&(R?T[Hi]=_:delete T[Hi]),P}var Pf=hh?function(T){return T==null?[]:(T=Object(T),Rt(hh(T),function(R){return Un.call(T,R)}))}:Ff,zi=Zn;(Jo&&zi(new Jo(new ArrayBuffer(1)))!=F||Ke&&zi(new Ke)!=m||$o&&zi($o.resolve())!=b||Qo&&zi(new Qo)!=S||qo&&zi(new qo)!=L)&&(zi=function(T){var R=Zn(T),_=R==x?T.constructor:void 0,C=_?xi(_):"";if(C)switch(C){case nf:return F;case bi:return m;case sf:return b;case of:return S;case af:return L}return R});function na(T,R){return R=R??o,!!R&&(typeof T=="number"||ft.test(T))&&T>-1&&T%1==0&&T<R}function Lf(T){var R=typeof T;return R=="string"||R=="number"||R=="symbol"||R=="boolean"?T!=="__proto__":T===null}function Gf(T){return!!Yo&&Yo in T}function kf(T){var R=T&&T.constructor,_=typeof R=="function"&&R.prototype||Ds;return T===_}function Ws(T){return jo.call(T)}function xi(T){if(T!=null){try{return zo.call(T)}catch{}try{return T+""}catch{}}return""}function Zs(T,R){return T===R||T!==T&&R!==R}var sa=ph(function(){return arguments}())?ph:function(T){return tn(T)&&He.call(T,"callee")&&!Un.call(T,"callee")},Vs=Array.isArray;function xh(T){return T!=null&&qr(T.length)&&!Yi(T)}var Vn=ch||Df;function _h(T,R){return mh(T,R)}function Yi(T){if(!vh(T))return!1;var R=Zn(T);return R==f||R==p||R==h||R==v}function qr(T){return typeof T=="number"&&T>-1&&T%1==0&&T<=o}function vh(T){var R=typeof T;return T!=null&&(R=="object"||R=="function")}function tn(T){return T!=null&&typeof T=="object"}var wh=yt?Ko(yt):ra;function Th(T){return xh(T)?Cf(T):Af(T)}function Ff(){return[]}function Df(){return!1}i.exports=_h}(Pl,Pl.exports);var fE=Pl.exports;const Sy=Tr(fE);var pE=Object.defineProperty,mE=(i,t,e)=>t in i?pE(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,U=(i,t,e)=>(mE(i,typeof t!="symbol"?t+"":t,e),e);class ei{constructor(t){U(this,"parent"),U(this,"paused"),this.parent=t,this.paused=!1}destroy(){}down(t){return!1}move(t){return!1}up(t){return!1}wheel(t){return!1}update(t){}resize(){}reset(){}pause(){this.paused=!0}resume(){this.paused=!1}}var gE=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Cy={exports:{}};(function(i,t){(function(){var e,r;r=function(n){return i.exports=n},e={linear:function(n,s,o,a){return o*n/a+s},easeInQuad:function(n,s,o,a){return o*(n/=a)*n+s},easeOutQuad:function(n,s,o,a){return-o*(n/=a)*(n-2)+s},easeInOutQuad:function(n,s,o,a){return(n/=a/2)<1?o/2*n*n+s:-o/2*(--n*(n-2)-1)+s},easeInCubic:function(n,s,o,a){return o*(n/=a)*n*n+s},easeOutCubic:function(n,s,o,a){return o*((n=n/a-1)*n*n+1)+s},easeInOutCubic:function(n,s,o,a){return(n/=a/2)<1?o/2*n*n*n+s:o/2*((n-=2)*n*n+2)+s},easeInQuart:function(n,s,o,a){return o*(n/=a)*n*n*n+s},easeOutQuart:function(n,s,o,a){return-o*((n=n/a-1)*n*n*n-1)+s},easeInOutQuart:function(n,s,o,a){return(n/=a/2)<1?o/2*n*n*n*n+s:-o/2*((n-=2)*n*n*n-2)+s},easeInQuint:function(n,s,o,a){return o*(n/=a)*n*n*n*n+s},easeOutQuint:function(n,s,o,a){return o*((n=n/a-1)*n*n*n*n+1)+s},easeInOutQuint:function(n,s,o,a){return(n/=a/2)<1?o/2*n*n*n*n*n+s:o/2*((n-=2)*n*n*n*n+2)+s},easeInSine:function(n,s,o,a){return-o*Math.cos(n/a*(Math.PI/2))+o+s},easeOutSine:function(n,s,o,a){return o*Math.sin(n/a*(Math.PI/2))+s},easeInOutSine:function(n,s,o,a){return-o/2*(Math.cos(Math.PI*n/a)-1)+s},easeInExpo:function(n,s,o,a){return n===0?s:o*Math.pow(2,10*(n/a-1))+s},easeOutExpo:function(n,s,o,a){return n===a?s+o:o*(-Math.pow(2,-10*n/a)+1)+s},easeInOutExpo:function(n,s,o,a){return(n/=a/2)<1?o/2*Math.pow(2,10*(n-1))+s:o/2*(-Math.pow(2,-10*--n)+2)+s},easeInCirc:function(n,s,o,a){return-o*(Math.sqrt(1-(n/=a)*n)-1)+s},easeOutCirc:function(n,s,o,a){return o*Math.sqrt(1-(n=n/a-1)*n)+s},easeInOutCirc:function(n,s,o,a){return(n/=a/2)<1?-o/2*(Math.sqrt(1-n*n)-1)+s:o/2*(Math.sqrt(1-(n-=2)*n)+1)+s},easeInElastic:function(n,s,o,a){var l,h,c;return c=1.70158,h=0,l=o,n===0||(n/=a),h||(h=a*.3),l<Math.abs(o)?(l=o,c=h/4):c=h/(2*Math.PI)*Math.asin(o/l),-(l*Math.pow(2,10*(n-=1))*Math.sin((n*a-c)*(2*Math.PI)/h))+s},easeOutElastic:function(n,s,o,a){var l,h,c;return c=1.70158,h=0,l=o,n===0||(n/=a),h||(h=a*.3),l<Math.abs(o)?(l=o,c=h/4):c=h/(2*Math.PI)*Math.asin(o/l),l*Math.pow(2,-10*n)*Math.sin((n*a-c)*(2*Math.PI)/h)+o+s},easeInOutElastic:function(n,s,o,a){var l,h,c;return c=1.70158,h=0,l=o,n===0||(n/=a/2),h||(h=a*(.3*1.5)),l<Math.abs(o)?(l=o,c=h/4):c=h/(2*Math.PI)*Math.asin(o/l),n<1?-.5*(l*Math.pow(2,10*(n-=1))*Math.sin((n*a-c)*(2*Math.PI)/h))+s:l*Math.pow(2,-10*(n-=1))*Math.sin((n*a-c)*(2*Math.PI)/h)*.5+o+s},easeInBack:function(n,s,o,a,l){return l===void 0&&(l=1.70158),o*(n/=a)*n*((l+1)*n-l)+s},easeOutBack:function(n,s,o,a,l){return l===void 0&&(l=1.70158),o*((n=n/a-1)*n*((l+1)*n+l)+1)+s},easeInOutBack:function(n,s,o,a,l){return l===void 0&&(l=1.70158),(n/=a/2)<1?o/2*(n*n*(((l*=1.525)+1)*n-l))+s:o/2*((n-=2)*n*(((l*=1.525)+1)*n+l)+2)+s},easeInBounce:function(n,s,o,a){var l;return l=e.easeOutBounce(a-n,0,o,a),o-l+s},easeOutBounce:function(n,s,o,a){return(n/=a)<1/2.75?o*(7.5625*n*n)+s:n<2/2.75?o*(7.5625*(n-=1.5/2.75)*n+.75)+s:n<2.5/2.75?o*(7.5625*(n-=2.25/2.75)*n+.9375)+s:o*(7.5625*(n-=2.625/2.75)*n+.984375)+s},easeInOutBounce:function(n,s,o,a){var l;return n<a/2?(l=e.easeInBounce(n*2,0,o,a),l*.5+s):(l=e.easeOutBounce(n*2-a,0,o,a),l*.5+o*.5+s)}},r(e)}).call(gE)})(Cy);const Ey=Cy.exports;function Ll(i,t){if(i){if(typeof i=="function")return i;if(typeof i=="string")return Ey[i]}else return Ey[t]}const yE={removeOnInterrupt:!1,ease:"linear",time:1e3};class bE extends ei{constructor(t,e={}){super(t),U(this,"options"),U(this,"startX"),U(this,"startY"),U(this,"deltaX"),U(this,"deltaY"),U(this,"keepCenter"),U(this,"startWidth",null),U(this,"startHeight",null),U(this,"deltaWidth",null),U(this,"deltaHeight",null),U(this,"width",null),U(this,"height",null),U(this,"time",0),this.options=Object.assign({},yE,e),this.options.ease=Ll(this.options.ease),this.setupPosition(),this.setupZoom(),this.time=0}setupPosition(){typeof this.options.position<"u"?(this.startX=this.parent.center.x,this.startY=this.parent.center.y,this.deltaX=this.options.position.x-this.parent.center.x,this.deltaY=this.options.position.y-this.parent.center.y,this.keepCenter=!1):this.keepCenter=!0}setupZoom(){this.width=null,this.height=null,typeof this.options.scale<"u"?this.width=this.parent.screenWidth/this.options.scale:typeof this.options.scaleX<"u"||typeof this.options.scaleY<"u"?(typeof this.options.scaleX<"u"&&(this.width=this.parent.screenWidth/this.options.scaleX),typeof this.options.scaleY<"u"&&(this.height=this.parent.screenHeight/this.options.scaleY)):(typeof this.options.width<"u"&&(this.width=this.options.width),typeof this.options.height<"u"&&(this.height=this.options.height)),this.width!==null&&(this.startWidth=this.parent.screenWidthInWorldPixels,this.deltaWidth=this.width-this.startWidth),this.height!==null&&(this.startHeight=this.parent.screenHeightInWorldPixels,this.deltaHeight=this.height-this.startHeight)}down(){return this.options.removeOnInterrupt&&this.parent.plugins.remove("animate"),!1}complete(){this.parent.plugins.remove("animate"),this.width!==null&&this.parent.fitWidth(this.width,this.keepCenter,this.height===null),this.height!==null&&this.parent.fitHeight(this.height,this.keepCenter,this.width===null),!this.keepCenter&&this.options.position&&this.parent.moveCenter(this.options.position),this.parent.emit("animate-end",this.parent),this.options.callbackOnComplete&&this.options.callbackOnComplete(this.parent)}update(t){if(this.paused)return;this.time+=t;const e=new dt(this.parent.scale.x,this.parent.scale.y);if(this.time>=this.options.time){const r=this.parent.width,n=this.parent.height;this.complete(),(r!==this.parent.width||n!==this.parent.height)&&this.parent.emit("zoomed",{viewport:this.parent,original:e,type:"animate"})}else{const r=this.options.ease(this.time,0,1,this.options.time);if(this.width!==null){const n=this.startWidth,s=this.deltaWidth;this.parent.fitWidth(n+s*r,this.keepCenter,this.height===null)}if(this.height!==null){const n=this.startHeight,s=this.deltaHeight;this.parent.fitHeight(n+s*r,this.keepCenter,this.width===null)}if(this.width===null?this.parent.scale.x=this.parent.scale.y:this.height===null&&(this.parent.scale.y=this.parent.scale.x),!this.keepCenter){const n=this.startX,s=this.startY,o=this.deltaX,a=this.deltaY,l=new dt(this.parent.x,this.parent.y);this.parent.moveCenter(n+o*r,s+a*r),this.parent.emit("moved",{viewport:this.parent,original:l,type:"animate"})}(this.width||this.height)&&this.parent.emit("zoomed",{viewport:this.parent,original:e,type:"animate"})}}}const xE={sides:"all",friction:.5,time:150,ease:"easeInOutSine",underflow:"center",bounceBox:null};class _E extends ei{constructor(t,e={}){super(t),U(this,"options"),U(this,"left"),U(this,"top"),U(this,"right"),U(this,"bottom"),U(this,"underflowX"),U(this,"underflowY"),U(this,"ease"),U(this,"toX"),U(this,"toY"),this.options=Object.assign({},xE,e),this.ease=Ll(this.options.ease,"easeInOutSine"),this.options.sides?this.options.sides==="all"?this.top=this.bottom=this.left=this.right=!0:this.options.sides==="horizontal"?(this.right=this.left=!0,this.top=this.bottom=!1):this.options.sides==="vertical"?(this.left=this.right=!1,this.top=this.bottom=!0):(this.top=this.options.sides.indexOf("top")!==-1,this.bottom=this.options.sides.indexOf("bottom")!==-1,this.left=this.options.sides.indexOf("left")!==-1,this.right=this.options.sides.indexOf("right")!==-1):this.left=this.top=this.right=this.bottom=!1;const r=this.options.underflow.toLowerCase();r==="center"?(this.underflowX=0,this.underflowY=0):(this.underflowX=r.indexOf("left")!==-1?-1:r.indexOf("right")!==-1?1:0,this.underflowY=r.indexOf("top")!==-1?-1:r.indexOf("bottom")!==-1?1:0),this.reset()}isActive(){return this.toX!==null||this.toY!==null}down(){return this.toX=this.toY=null,!1}up(){return this.bounce(),!1}update(t){if(!this.paused){if(this.bounce(),this.toX){const e=this.toX;e.time+=t,this.parent.emit("moved",{viewport:this.parent,type:"bounce-x"}),e.time>=this.options.time?(this.parent.x=e.end,this.toX=null,this.parent.emit("bounce-x-end",this.parent)):this.parent.x=this.ease(e.time,e.start,e.delta,this.options.time)}if(this.toY){const e=this.toY;e.time+=t,this.parent.emit("moved",{viewport:this.parent,type:"bounce-y"}),e.time>=this.options.time?(this.parent.y=e.end,this.toY=null,this.parent.emit("bounce-y-end",this.parent)):this.parent.y=this.ease(e.time,e.start,e.delta,this.options.time)}}}calcUnderflowX(){let t;switch(this.underflowX){case-1:t=0;break;case 1:t=this.parent.screenWidth-this.parent.screenWorldWidth;break;default:t=(this.parent.screenWidth-this.parent.screenWorldWidth)/2}return t}calcUnderflowY(){let t;switch(this.underflowY){case-1:t=0;break;case 1:t=this.parent.screenHeight-this.parent.screenWorldHeight;break;default:t=(this.parent.screenHeight-this.parent.screenWorldHeight)/2}return t}oob(){const t=this.options.bounceBox;if(t){const e=typeof t.x>"u"?0:t.x,r=typeof t.y>"u"?0:t.y,n=typeof t.width>"u"?this.parent.worldWidth:t.width,s=typeof t.height>"u"?this.parent.worldHeight:t.height;return{left:this.parent.left<e,right:this.parent.right>n,top:this.parent.top<r,bottom:this.parent.bottom>s,topLeft:new dt(e*this.parent.scale.x,r*this.parent.scale.y),bottomRight:new dt(n*this.parent.scale.x-this.parent.screenWidth,s*this.parent.scale.y-this.parent.screenHeight)}}return{left:this.parent.left<0,right:this.parent.right>this.parent.worldWidth,top:this.parent.top<0,bottom:this.parent.bottom>this.parent.worldHeight,topLeft:new dt(0,0),bottomRight:new dt(this.parent.worldWidth*this.parent.scale.x-this.parent.screenWidth,this.parent.worldHeight*this.parent.scale.y-this.parent.screenHeight)}}bounce(){var t,e;if(this.paused)return;let r,n=this.parent.plugins.get("decelerate",!0);n&&(n.x||n.y)&&(n.x&&n.percentChangeX===((t=n.options)==null?void 0:t.friction)||n.y&&n.percentChangeY===((e=n.options)==null?void 0:e.friction))&&(r=this.oob(),(r.left&&this.left||r.right&&this.right)&&(n.percentChangeX=this.options.friction),(r.top&&this.top||r.bottom&&this.bottom)&&(n.percentChangeY=this.options.friction));const s=this.parent.plugins.get("drag",!0)||{},o=this.parent.plugins.get("pinch",!0)||{};if(n=n||{},!(s!=null&&s.active)&&!(o!=null&&o.active)&&(!this.toX||!this.toY)&&(!n.x||!n.y)){r=r||this.oob();const a=r.topLeft,l=r.bottomRight;if(!this.toX&&!n.x){let h=null;r.left&&this.left?h=this.parent.screenWorldWidth<this.parent.screenWidth?this.calcUnderflowX():-a.x:r.right&&this.right&&(h=this.parent.screenWorldWidth<this.parent.screenWidth?this.calcUnderflowX():-l.x),h!==null&&this.parent.x!==h&&(this.toX={time:0,start:this.parent.x,delta:h-this.parent.x,end:h},this.parent.emit("bounce-x-start",this.parent))}if(!this.toY&&!n.y){let h=null;r.top&&this.top?h=this.parent.screenWorldHeight<this.parent.screenHeight?this.calcUnderflowY():-a.y:r.bottom&&this.bottom&&(h=this.parent.screenWorldHeight<this.parent.screenHeight?this.calcUnderflowY():-l.y),h!==null&&this.parent.y!==h&&(this.toY={time:0,start:this.parent.y,delta:h-this.parent.y,end:h},this.parent.emit("bounce-y-start",this.parent))}}}reset(){this.toX=this.toY=null,this.bounce()}}const vE={left:!1,right:!1,top:!1,bottom:!1,direction:null,underflow:"center"};class wE extends ei{constructor(t,e={}){super(t),U(this,"options"),U(this,"last"),U(this,"noUnderflow"),U(this,"underflowX"),U(this,"underflowY"),this.options=Object.assign({},vE,e),this.options.direction&&(this.options.left=this.options.direction==="x"||this.options.direction==="all"?!0:null,this.options.right=this.options.direction==="x"||this.options.direction==="all"?!0:null,this.options.top=this.options.direction==="y"||this.options.direction==="all"?!0:null,this.options.bottom=this.options.direction==="y"||this.options.direction==="all"?!0:null),this.parseUnderflow(),this.last={x:null,y:null,scaleX:null,scaleY:null},this.update()}parseUnderflow(){const t=this.options.underflow.toLowerCase();t==="none"?this.noUnderflow=!0:t==="center"?(this.underflowX=this.underflowY=0,this.noUnderflow=!1):(this.underflowX=t.indexOf("left")!==-1?-1:t.indexOf("right")!==-1?1:0,this.underflowY=t.indexOf("top")!==-1?-1:t.indexOf("bottom")!==-1?1:0,this.noUnderflow=!1)}move(){return this.update(),!1}update(){if(this.paused||this.parent.x===this.last.x&&this.parent.y===this.last.y&&this.parent.scale.x===this.last.scaleX&&this.parent.scale.y===this.last.scaleY)return;const t=new dt(this.parent.x,this.parent.y),e=this.parent.plugins.decelerate||{};if(this.options.left!==null||this.options.right!==null){let r=!1;if(!this.noUnderflow&&this.parent.screenWorldWidth<this.parent.screenWidth)switch(this.underflowX){case-1:this.parent.x!==0&&(this.parent.x=0,r=!0);break;case 1:this.parent.x!==this.parent.screenWidth-this.parent.screenWorldWidth&&(this.parent.x=this.parent.screenWidth-this.parent.screenWorldWidth,r=!0);break;default:this.parent.x!==(this.parent.screenWidth-this.parent.screenWorldWidth)/2&&(this.parent.x=(this.parent.screenWidth-this.parent.screenWorldWidth)/2,r=!0)}else this.options.left!==null&&this.parent.left<(this.options.left===!0?0:this.options.left)&&(this.parent.x=-(this.options.left===!0?0:this.options.left)*this.parent.scale.x,e.x=0,r=!0),this.options.right!==null&&this.parent.right>(this.options.right===!0?this.parent.worldWidth:this.options.right)&&(this.parent.x=-(this.options.right===!0?this.parent.worldWidth:this.options.right)*this.parent.scale.x+this.parent.screenWidth,e.x=0,r=!0);r&&this.parent.emit("moved",{viewport:this.parent,original:t,type:"clamp-x"})}if(this.options.top!==null||this.options.bottom!==null){let r=!1;if(!this.noUnderflow&&this.parent.screenWorldHeight<this.parent.screenHeight)switch(this.underflowY){case-1:this.parent.y!==0&&(this.parent.y=0,r=!0);break;case 1:this.parent.y!==this.parent.screenHeight-this.parent.screenWorldHeight&&(this.parent.y=this.parent.screenHeight-this.parent.screenWorldHeight,r=!0);break;default:this.parent.y!==(this.parent.screenHeight-this.parent.screenWorldHeight)/2&&(this.parent.y=(this.parent.screenHeight-this.parent.screenWorldHeight)/2,r=!0)}else this.options.top!==null&&this.parent.top<(this.options.top===!0?0:this.options.top)&&(this.parent.y=-(this.options.top===!0?0:this.options.top)*this.parent.scale.y,e.y=0,r=!0),this.options.bottom!==null&&this.parent.bottom>(this.options.bottom===!0?this.parent.worldHeight:this.options.bottom)&&(this.parent.y=-(this.options.bottom===!0?this.parent.worldHeight:this.options.bottom)*this.parent.scale.y+this.parent.screenHeight,e.y=0,r=!0);r&&this.parent.emit("moved",{viewport:this.parent,original:t,type:"clamp-y"})}this.last.x=this.parent.x,this.last.y=this.parent.y,this.last.scaleX=this.parent.scale.x,this.last.scaleY=this.parent.scale.y}reset(){this.update()}}const TE={minWidth:null,minHeight:null,maxWidth:null,maxHeight:null,minScale:null,maxScale:null};class SE extends ei{constructor(t,e={}){super(t),U(this,"options"),this.options=Object.assign({},TE,e),this.clamp()}resize(){this.clamp()}clamp(){if(!this.paused){if(this.options.minWidth||this.options.minHeight||this.options.maxWidth||this.options.maxHeight){let t=this.parent.worldScreenWidth,e=this.parent.worldScreenHeight;if(this.options.minWidth!==null&&t<this.options.minWidth){const r=this.parent.scale.x;this.parent.fitWidth(this.options.minWidth,!1,!1,!0),this.parent.scale.y*=this.parent.scale.x/r,t=this.parent.worldScreenWidth,e=this.parent.worldScreenHeight,this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"})}if(this.options.maxWidth!==null&&t>this.options.maxWidth){const r=this.parent.scale.x;this.parent.fitWidth(this.options.maxWidth,!1,!1,!0),this.parent.scale.y*=this.parent.scale.x/r,t=this.parent.worldScreenWidth,e=this.parent.worldScreenHeight,this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"})}if(this.options.minHeight!==null&&e<this.options.minHeight){const r=this.parent.scale.y;this.parent.fitHeight(this.options.minHeight,!1,!1,!0),this.parent.scale.x*=this.parent.scale.y/r,t=this.parent.worldScreenWidth,e=this.parent.worldScreenHeight,this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"})}if(this.options.maxHeight!==null&&e>this.options.maxHeight){const r=this.parent.scale.y;this.parent.fitHeight(this.options.maxHeight,!1,!1,!0),this.parent.scale.x*=this.parent.scale.y/r,this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"})}}else if(this.options.minScale||this.options.maxScale){const t={x:null,y:null},e={x:null,y:null};if(typeof this.options.minScale=="number")t.x=this.options.minScale,t.y=this.options.minScale;else if(this.options.minScale!==null){const s=this.options.minScale;t.x=typeof s.x>"u"?null:s.x,t.y=typeof s.y>"u"?null:s.y}if(typeof this.options.maxScale=="number")e.x=this.options.maxScale,e.y=this.options.maxScale;else if(this.options.maxScale!==null){const s=this.options.maxScale;e.x=typeof s.x>"u"?null:s.x,e.y=typeof s.y>"u"?null:s.y}let r=this.parent.scale.x,n=this.parent.scale.y;t.x!==null&&r<t.x&&(r=t.x),e.x!==null&&r>e.x&&(r=e.x),t.y!==null&&n<t.y&&(n=t.y),e.y!==null&&n>e.y&&(n=e.y),(r!==this.parent.scale.x||n!==this.parent.scale.y)&&(this.parent.scale.set(r,n),this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"}))}}}reset(){this.clamp()}}const CE={friction:.98,bounce:.8,minSpeed:.01},zr=16;class EE extends ei{constructor(t,e={}){super(t),U(this,"options"),U(this,"x"),U(this,"y"),U(this,"percentChangeX"),U(this,"percentChangeY"),U(this,"saved"),U(this,"timeSinceRelease"),this.options=Object.assign({},CE,e),this.saved=[],this.timeSinceRelease=0,this.reset(),this.parent.on("moved",r=>this.handleMoved(r))}down(){return this.saved=[],this.x=this.y=null,!1}isActive(){return!!(this.x||this.y)}move(){if(this.paused)return!1;const t=this.parent.input.count();return(t===1||t>1&&!this.parent.plugins.get("pinch",!0))&&(this.saved.push({x:this.parent.x,y:this.parent.y,time:performance.now()}),this.saved.length>60&&this.saved.splice(0,30)),!1}handleMoved(t){if(this.saved.length){const e=this.saved[this.saved.length-1];t.type==="clamp-x"&&t.original?e.x===t.original.x&&(e.x=this.parent.x):t.type==="clamp-y"&&t.original&&e.y===t.original.y&&(e.y=this.parent.y)}}up(){if(this.parent.input.count()===0&&this.saved.length){const t=performance.now();for(const e of this.saved)if(e.time>=t-100){const r=t-e.time;this.x=(this.parent.x-e.x)/r,this.y=(this.parent.y-e.y)/r,this.percentChangeX=this.percentChangeY=this.options.friction,this.timeSinceRelease=0;break}}return!1}activate(t){t=t||{},typeof t.x<"u"&&(this.x=t.x,this.percentChangeX=this.options.friction),typeof t.y<"u"&&(this.y=t.y,this.percentChangeY=this.options.friction)}update(t){if(this.paused)return;const e=this.x||this.y,r=this.timeSinceRelease,n=this.timeSinceRelease+t;if(this.x){const s=this.percentChangeX,o=Math.log(s);this.parent.x+=this.x*zr/o*(Math.pow(s,n/zr)-Math.pow(s,r/zr)),this.x*=Math.pow(this.percentChangeX,t/zr)}if(this.y){const s=this.percentChangeY,o=Math.log(s);this.parent.y+=this.y*zr/o*(Math.pow(s,n/zr)-Math.pow(s,r/zr)),this.y*=Math.pow(this.percentChangeY,t/zr)}this.timeSinceRelease+=t,this.x&&this.y?Math.abs(this.x)<this.options.minSpeed&&Math.abs(this.y)<this.options.minSpeed&&(this.x=0,this.y=0):(Math.abs(this.x||0)<this.options.minSpeed&&(this.x=0),Math.abs(this.y||0)<this.options.minSpeed&&(this.y=0)),e&&this.parent.emit("moved",{viewport:this.parent,type:"decelerate"})}reset(){this.x=this.y=null}}const IE={direction:"all",pressDrag:!0,wheel:!0,wheelScroll:1,reverse:!1,clampWheel:!1,underflow:"center",factor:1,mouseButtons:"all",keyToPress:null,ignoreKeyToPressOnTouch:!1,lineHeight:20,wheelSwapAxes:!1};class AE extends ei{constructor(t,e={}){super(t),U(this,"options"),U(this,"moved"),U(this,"reverse"),U(this,"xDirection"),U(this,"yDirection"),U(this,"keyIsPressed"),U(this,"mouse"),U(this,"underflowX"),U(this,"underflowY"),U(this,"last"),U(this,"current"),U(this,"windowEventHandlers",[]),this.options=Object.assign({},IE,e),this.moved=!1,this.reverse=this.options.reverse?1:-1,this.xDirection=!this.options.direction||this.options.direction==="all"||this.options.direction==="x",this.yDirection=!this.options.direction||this.options.direction==="all"||this.options.direction==="y",this.keyIsPressed=!1,this.parseUnderflow(),this.mouseButtons(this.options.mouseButtons),this.options.keyToPress&&this.handleKeyPresses(this.options.keyToPress)}handleKeyPresses(t){const e=n=>{t.includes(n.code)&&(this.keyIsPressed=!0)},r=n=>{t.includes(n.code)&&(this.keyIsPressed=!1)};this.addWindowEventHandler("keyup",r),this.addWindowEventHandler("keydown",e)}addWindowEventHandler(t,e){window.addEventListener(t,e),this.windowEventHandlers.push({event:t,handler:e})}destroy(){this.windowEventHandlers.forEach(({event:t,handler:e})=>{window.removeEventListener(t,e)})}mouseButtons(t){!t||t==="all"?this.mouse=[!0,!0,!0]:this.mouse=[t.indexOf("left")!==-1,t.indexOf("middle")!==-1,t.indexOf("right")!==-1]}parseUnderflow(){const t=this.options.underflow.toLowerCase();t==="center"?(this.underflowX=0,this.underflowY=0):(t.includes("left")?this.underflowX=-1:t.includes("right")?this.underflowX=1:this.underflowX=0,t.includes("top")?this.underflowY=-1:t.includes("bottom")?this.underflowY=1:this.underflowY=0)}checkButtons(t){const e=t.pointerType==="mouse",r=this.parent.input.count();return!!((r===1||r>1&&!this.parent.plugins.get("pinch",!0))&&(!e||this.mouse[t.button]))}checkKeyPress(t){return!this.options.keyToPress||this.keyIsPressed||this.options.ignoreKeyToPressOnTouch&&t.data.pointerType==="touch"}down(t){return this.paused||!this.options.pressDrag?!1:this.checkButtons(t)&&this.checkKeyPress(t)?(this.last={x:t.global.x,y:t.global.y},this.current=t.pointerId,!0):(this.last=null,!1)}get active(){return this.moved}move(t){if(this.paused||!this.options.pressDrag)return!1;if(this.last&&this.current===t.data.pointerId){const e=t.global.x,r=t.global.y,n=this.parent.input.count();if(n===1||n>1&&!this.parent.plugins.get("pinch",!0)){const s=e-this.last.x,o=r-this.last.y;if(this.moved||this.xDirection&&this.parent.input.checkThreshold(s)||this.yDirection&&this.parent.input.checkThreshold(o)){const a={x:e,y:r};return this.xDirection&&(this.parent.x+=(a.x-this.last.x)*this.options.factor),this.yDirection&&(this.parent.y+=(a.y-this.last.y)*this.options.factor),this.last=a,this.moved||this.parent.emit("drag-start",{event:t,screen:new dt(this.last.x,this.last.y),world:this.parent.toWorld(new dt(this.last.x,this.last.y)),viewport:this.parent}),this.moved=!0,this.parent.emit("moved",{viewport:this.parent,type:"drag"}),!0}}else this.moved=!1}return!1}up(t){if(this.paused)return!1;const e=this.parent.input.touches;if(e.length===1){const r=e[0];return r.last&&(this.last={x:r.last.x,y:r.last.y},this.current=r.id),this.moved=!1,!0}else if(this.last&&this.moved){const r=new dt(this.last.x,this.last.y);return this.parent.emit("drag-end",{event:t,screen:r,world:this.parent.toWorld(r),viewport:this.parent}),this.last=null,this.moved=!1,!0}return!1}wheel(t){if(this.paused)return!1;if(this.options.wheel){const e=this.parent.plugins.get("wheel",!0);if(!e||!e.options.wheelZoom&&!t.ctrlKey){const r=t.deltaMode?this.options.lineHeight:1,n=[t.deltaX,t.deltaY],[s,o]=this.options.wheelSwapAxes?n.reverse():n;return this.xDirection&&(this.parent.x+=s*r*this.options.wheelScroll*this.reverse),this.yDirection&&(this.parent.y+=o*r*this.options.wheelScroll*this.reverse),this.options.clampWheel&&this.clamp(),this.parent.emit("wheel-scroll",this.parent),this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.parent.options.passiveWheel||t.preventDefault(),this.parent.options.stopPropagation&&t.stopPropagation(),!0}}return!1}resume(){this.last=null,this.paused=!1}clamp(){const t=this.parent.plugins.get("decelerate",!0)||{};if(this.options.clampWheel!=="y")if(this.parent.screenWorldWidth<this.parent.screenWidth)switch(this.underflowX){case-1:this.parent.x=0;break;case 1:this.parent.x=this.parent.screenWidth-this.parent.screenWorldWidth;break;default:this.parent.x=(this.parent.screenWidth-this.parent.screenWorldWidth)/2}else this.parent.left<0?(this.parent.x=0,t.x=0):this.parent.right>this.parent.worldWidth&&(this.parent.x=-this.parent.worldWidth*this.parent.scale.x+this.parent.screenWidth,t.x=0);if(this.options.clampWheel!=="x")if(this.parent.screenWorldHeight<this.parent.screenHeight)switch(this.underflowY){case-1:this.parent.y=0;break;case 1:this.parent.y=this.parent.screenHeight-this.parent.screenWorldHeight;break;default:this.parent.y=(this.parent.screenHeight-this.parent.screenWorldHeight)/2}else this.parent.top<0&&(this.parent.y=0,t.y=0),this.parent.bottom>this.parent.worldHeight&&(this.parent.y=-this.parent.worldHeight*this.parent.scale.y+this.parent.screenHeight,t.y=0)}}const ME={speed:0,acceleration:null,radius:null};class RE extends ei{constructor(t,e,r={}){super(t),U(this,"options"),U(this,"target"),U(this,"velocity"),this.target=e,this.options=Object.assign({},ME,r),this.velocity={x:0,y:0}}update(t){if(this.paused)return;const e=this.parent.center;let r=this.target.x,n=this.target.y;if(this.options.radius)if(Math.sqrt(Math.pow(this.target.y-e.y,2)+Math.pow(this.target.x-e.x,2))>this.options.radius){const a=Math.atan2(this.target.y-e.y,this.target.x-e.x);r=this.target.x-Math.cos(a)*this.options.radius,n=this.target.y-Math.sin(a)*this.options.radius}else return;const s=r-e.x,o=n-e.y;if(s||o)if(this.options.speed)if(this.options.acceleration){const a=Math.atan2(n-e.y,r-e.x),l=Math.sqrt(Math.pow(s,2)+Math.pow(o,2));if(l){const h=(Math.pow(this.velocity.x,2)+Math.pow(this.velocity.y,2))/(2*this.options.acceleration);l>h?this.velocity={x:Math.min(this.velocity.x+(this.options.acceleration*t,this.options.speed)),y:Math.min(this.velocity.y+(this.options.acceleration*t,this.options.speed))}:this.velocity={x:Math.max(this.velocity.x-this.options.acceleration*this.options.speed,0),y:Math.max(this.velocity.y-this.options.acceleration*this.options.speed,0)};const c=Math.cos(a)*this.velocity.x,u=Math.sin(a)*this.velocity.y,d=Math.abs(c)>Math.abs(s)?r:e.x+c,f=Math.abs(u)>Math.abs(o)?n:e.y+u;this.parent.moveCenter(d,f),this.parent.emit("moved",{viewport:this.parent,type:"follow"})}}else{const a=Math.atan2(n-e.y,r-e.x),l=Math.cos(a)*this.options.speed,h=Math.sin(a)*this.options.speed,c=Math.abs(l)>Math.abs(s)?r:e.x+l,u=Math.abs(h)>Math.abs(o)?n:e.y+h;this.parent.moveCenter(c,u),this.parent.emit("moved",{viewport:this.parent,type:"follow"})}else this.parent.moveCenter(r,n),this.parent.emit("moved",{viewport:this.parent,type:"follow"})}}const PE={radius:null,distance:null,top:null,bottom:null,left:null,right:null,speed:8,reverse:!1,noDecelerate:!1,linear:!1,allowButtons:!1};class LE extends ei{constructor(t,e={}){super(t),U(this,"options"),U(this,"reverse"),U(this,"radiusSquared"),U(this,"left"),U(this,"top"),U(this,"right"),U(this,"bottom"),U(this,"horizontal"),U(this,"vertical"),this.options=Object.assign({},PE,e),this.reverse=this.options.reverse?1:-1,this.radiusSquared=typeof this.options.radius=="number"?Math.pow(this.options.radius,2):null,this.resize()}resize(){const t=this.options.distance;t!==null?(this.left=t,this.top=t,this.right=this.parent.screenWidth-t,this.bottom=this.parent.screenHeight-t):this.options.radius||(this.left=this.options.left,this.top=this.options.top,this.right=this.options.right===null?null:this.parent.screenWidth-this.options.right,this.bottom=this.options.bottom===null?null:this.parent.screenHeight-this.options.bottom)}down(){return this.paused||this.options.allowButtons||(this.horizontal=this.vertical=null),!1}move(t){if(this.paused||t.pointerType!=="mouse"&&t.pointerId!==1||!this.options.allowButtons&&t.buttons!==0)return!1;const e=t.global.x,r=t.global.y;if(this.radiusSquared){const n=this.parent.toScreen(this.parent.center);if(Math.pow(n.x-e,2)+Math.pow(n.y-r,2)>=this.radiusSquared){const s=Math.atan2(n.y-r,n.x-e);this.options.linear?(this.horizontal=Math.round(Math.cos(s))*this.options.speed*this.reverse*(60/1e3),this.vertical=Math.round(Math.sin(s))*this.options.speed*this.reverse*(60/1e3)):(this.horizontal=Math.cos(s)*this.options.speed*this.reverse*(60/1e3),this.vertical=Math.sin(s)*this.options.speed*this.reverse*(60/1e3))}else this.horizontal&&this.decelerateHorizontal(),this.vertical&&this.decelerateVertical(),this.horizontal=this.vertical=0}else this.left!==null&&e<this.left?this.horizontal=Number(this.reverse)*this.options.speed*(60/1e3):this.right!==null&&e>this.right?this.horizontal=-1*this.reverse*this.options.speed*(60/1e3):(this.decelerateHorizontal(),this.horizontal=0),this.top!==null&&r<this.top?this.vertical=Number(this.reverse)*this.options.speed*(60/1e3):this.bottom!==null&&r>this.bottom?this.vertical=-1*this.reverse*this.options.speed*(60/1e3):(this.decelerateVertical(),this.vertical=0);return!1}decelerateHorizontal(){const t=this.parent.plugins.get("decelerate",!0);this.horizontal&&t&&!this.options.noDecelerate&&t.activate({x:this.horizontal*this.options.speed*this.reverse/(1e3/60)})}decelerateVertical(){const t=this.parent.plugins.get("decelerate",!0);this.vertical&&t&&!this.options.noDecelerate&&t.activate({y:this.vertical*this.options.speed*this.reverse/(1e3/60)})}up(){return this.paused||(this.horizontal&&this.decelerateHorizontal(),this.vertical&&this.decelerateVertical(),this.horizontal=this.vertical=null),!1}update(){if(!this.paused&&(this.horizontal||this.vertical)){const t=this.parent.center;this.horizontal&&(t.x+=this.horizontal*this.options.speed),this.vertical&&(t.y+=this.vertical*this.options.speed),this.parent.moveCenter(t),this.parent.emit("moved",{viewport:this.parent,type:"mouse-edges"})}}}const GE={noDrag:!1,percent:1,center:null,factor:1,axis:"all"};class kE extends ei{constructor(t,e={}){super(t),U(this,"options"),U(this,"active",!1),U(this,"pinching",!1),U(this,"moved",!1),U(this,"lastCenter"),this.options=Object.assign({},GE,e)}down(){return this.parent.input.count()>=2?(this.active=!0,!0):!1}isAxisX(){return["all","x"].includes(this.options.axis)}isAxisY(){return["all","y"].includes(this.options.axis)}move(t){if(this.paused||!this.active)return!1;const e=t.global.x,r=t.global.y,n=this.parent.input.touches;if(n.length>=2){const s=n[0],o=n[1],a=s.last&&o.last?Math.sqrt(Math.pow(o.last.x-s.last.x,2)+Math.pow(o.last.y-s.last.y,2)):null;if(s.id===t.pointerId?s.last={x:e,y:r,data:t}:o.id===t.pointerId&&(o.last={x:e,y:r,data:t}),a){let l;const h=new dt(s.last.x+(o.last.x-s.last.x)/2,s.last.y+(o.last.y-s.last.y)/2);this.options.center||(l=this.parent.toLocal(h));let c=Math.sqrt(Math.pow(o.last.x-s.last.x,2)+Math.pow(o.last.y-s.last.y,2));c=c===0?c=1e-10:c;const u=(1-a/c)*this.options.percent*(this.isAxisX()?this.parent.scale.x:this.parent.scale.y);this.isAxisX()&&(this.parent.scale.x+=u),this.isAxisY()&&(this.parent.scale.y+=u),this.parent.emit("zoomed",{viewport:this.parent,type:"pinch",center:h});const d=this.parent.plugins.get("clamp-zoom",!0);if(d&&d.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{const f=this.parent.toGlobal(l);this.parent.x+=(h.x-f.x)*this.options.factor,this.parent.y+=(h.y-f.y)*this.options.factor,this.parent.emit("moved",{viewport:this.parent,type:"pinch"})}!this.options.noDrag&&this.lastCenter&&(this.parent.x+=(h.x-this.lastCenter.x)*this.options.factor,this.parent.y+=(h.y-this.lastCenter.y)*this.options.factor,this.parent.emit("moved",{viewport:this.parent,type:"pinch"})),this.lastCenter=h,this.moved=!0}else this.pinching||(this.parent.emit("pinch-start",this.parent),this.pinching=!0);return!0}return!1}up(){return this.pinching&&this.parent.input.touches.length<=1?(this.active=!1,this.lastCenter=null,this.pinching=!1,this.moved=!1,this.parent.emit("pinch-end",this.parent),!0):!1}}const FE={topLeft:!1,friction:.8,time:1e3,ease:"easeInOutSine",interrupt:!0,removeOnComplete:!1,removeOnInterrupt:!1,forceStart:!1};class DE extends ei{constructor(t,e,r,n={}){super(t),U(this,"options"),U(this,"ease"),U(this,"x"),U(this,"y"),U(this,"percent"),U(this,"snapping"),U(this,"deltaX"),U(this,"deltaY"),U(this,"startX"),U(this,"startY"),this.options=Object.assign({},FE,n),this.ease=Ll(n.ease,"easeInOutSine"),this.x=e,this.y=r,this.options.forceStart&&this.snapStart()}snapStart(){this.percent=0,this.snapping={time:0};const t=this.options.topLeft?this.parent.corner:this.parent.center;this.deltaX=this.x-t.x,this.deltaY=this.y-t.y,this.startX=t.x,this.startY=t.y,this.parent.emit("snap-start",this.parent)}wheel(){return this.options.removeOnInterrupt&&this.parent.plugins.remove("snap"),!1}down(){return this.options.removeOnInterrupt?this.parent.plugins.remove("snap"):this.options.interrupt&&(this.snapping=null),!1}up(){if(this.parent.input.count()===0){const t=this.parent.plugins.get("decelerate",!0);t&&(t.x||t.y)&&(t.percentChangeX=t.percentChangeY=this.options.friction)}return!1}update(t){if(!this.paused&&!(this.options.interrupt&&this.parent.input.count()!==0))if(this.snapping){const e=this.snapping;e.time+=t;let r,n,s;const o=this.startX,a=this.startY,l=this.deltaX,h=this.deltaY;if(e.time>this.options.time)r=!0,n=o+l,s=a+h;else{const c=this.ease(e.time,0,1,this.options.time);n=o+l*c,s=a+h*c}this.options.topLeft?this.parent.moveCorner(n,s):this.parent.moveCenter(n,s),this.parent.emit("moved",{viewport:this.parent,type:"snap"}),r&&(this.options.removeOnComplete&&this.parent.plugins.remove("snap"),this.parent.emit("snap-end",this.parent),this.snapping=null)}else{const e=this.options.topLeft?this.parent.corner:this.parent.center;(e.x!==this.x||e.y!==this.y)&&this.snapStart()}}}const NE={width:0,height:0,time:1e3,ease:"easeInOutSine",center:null,interrupt:!0,removeOnComplete:!1,removeOnInterrupt:!1,forceStart:!1,noMove:!1};class OE extends ei{constructor(t,e={}){super(t),U(this,"options"),U(this,"ease"),U(this,"xScale"),U(this,"yScale"),U(this,"xIndependent"),U(this,"yIndependent"),U(this,"snapping"),this.options=Object.assign({},NE,e),this.ease=Ll(this.options.ease),this.xIndependent=!1,this.yIndependent=!1,this.xScale=0,this.yScale=0,this.options.width>0&&(this.xScale=t.screenWidth/this.options.width,this.xIndependent=!0),this.options.height>0&&(this.yScale=t.screenHeight/this.options.height,this.yIndependent=!0),this.xScale=this.xIndependent?this.xScale:this.yScale,this.yScale=this.yIndependent?this.yScale:this.xScale,this.options.time===0?(t.container.scale.x=this.xScale,t.container.scale.y=this.yScale,this.options.removeOnComplete&&this.parent.plugins.remove("snap-zoom")):e.forceStart&&this.createSnapping()}createSnapping(){const t=this.parent.worldScreenWidth,e=this.parent.worldScreenHeight,r=this.parent.screenWidth/this.xScale,n=this.parent.screenHeight/this.yScale;this.snapping={time:0,startX:t,startY:e,deltaX:r-t,deltaY:n-e},this.parent.emit("snap-zoom-start",this.parent)}resize(){this.snapping=null,this.options.width>0&&(this.xScale=this.parent.screenWidth/this.options.width),this.options.height>0&&(this.yScale=this.parent.screenHeight/this.options.height),this.xScale=this.xIndependent?this.xScale:this.yScale,this.yScale=this.yIndependent?this.yScale:this.xScale}wheel(){return this.options.removeOnInterrupt&&this.parent.plugins.remove("snap-zoom"),!1}down(){return this.options.removeOnInterrupt?this.parent.plugins.remove("snap-zoom"):this.options.interrupt&&(this.snapping=null),!1}update(t){if(this.paused||this.options.interrupt&&this.parent.input.count()!==0)return;let e;if(!this.options.center&&!this.options.noMove&&(e=this.parent.center),!this.snapping)(this.parent.scale.x!==this.xScale||this.parent.scale.y!==this.yScale)&&this.createSnapping();else if(this.snapping){const r=this.snapping;if(r.time+=t,r.time>=this.options.time)this.parent.scale.set(this.xScale,this.yScale),this.options.removeOnComplete&&this.parent.plugins.remove("snap-zoom"),this.parent.emit("snap-zoom-end",this.parent),this.snapping=null;else{const s=this.snapping,o=this.ease(s.time,s.startX,s.deltaX,this.options.time),a=this.ease(s.time,s.startY,s.deltaY,this.options.time);this.parent.scale.x=this.parent.screenWidth/o,this.parent.scale.y=this.parent.screenHeight/a}const n=this.parent.plugins.get("clamp-zoom",!0);n&&n.clamp(),this.options.noMove||(this.options.center?this.parent.moveCenter(this.options.center):this.parent.moveCenter(e))}}resume(){this.snapping=null,super.resume()}}const BE={percent:.1,smooth:!1,interrupt:!0,reverse:!1,center:null,lineHeight:20,axis:"all",keyToPress:null,trackpadPinch:!1,wheelZoom:!0};class UE extends ei{constructor(t,e={}){super(t),U(this,"options"),U(this,"smoothing"),U(this,"smoothingCenter"),U(this,"smoothingCount"),U(this,"keyIsPressed"),this.options=Object.assign({},BE,e),this.keyIsPressed=!1,this.options.keyToPress&&this.handleKeyPresses(this.options.keyToPress)}handleKeyPresses(t){window.addEventListener("keydown",e=>{t.includes(e.code)&&(this.keyIsPressed=!0)}),window.addEventListener("keyup",e=>{t.includes(e.code)&&(this.keyIsPressed=!1)})}checkKeyPress(){return!this.options.keyToPress||this.keyIsPressed}down(){return this.options.interrupt&&(this.smoothing=null),!1}isAxisX(){return["all","x"].includes(this.options.axis)}isAxisY(){return["all","y"].includes(this.options.axis)}update(){if(this.smoothing){const t=this.smoothingCenter,e=this.smoothing;let r;this.options.center||(r=this.parent.toLocal(t)),this.isAxisX()&&(this.parent.scale.x+=e.x),this.isAxisY()&&(this.parent.scale.y+=e.y),this.parent.emit("zoomed",{viewport:this.parent,type:"wheel"});const n=this.parent.plugins.get("clamp-zoom",!0);if(n&&n.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{const s=this.parent.toGlobal(r);this.parent.x+=t.x-s.x,this.parent.y+=t.y-s.y}this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.smoothingCount++,this.smoothingCount>=this.options.smooth&&(this.smoothing=null)}}pinch(t){if(this.paused)return;const e=this.parent.input.getPointerPosition(t),r=-t.deltaY*(t.deltaMode?this.options.lineHeight:1)/200,n=Math.pow(2,(1+this.options.percent)*r);let s;this.options.center||(s=this.parent.toLocal(e)),this.isAxisX()&&(this.parent.scale.x*=n),this.isAxisY()&&(this.parent.scale.y*=n),this.parent.emit("zoomed",{viewport:this.parent,type:"wheel"});const o=this.parent.plugins.get("clamp-zoom",!0);if(o&&o.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{const a=this.parent.toGlobal(s);this.parent.x+=e.x-a.x,this.parent.y+=e.y-a.y}this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.parent.emit("wheel-start",{event:t,viewport:this.parent})}wheel(t){if(this.paused||!this.checkKeyPress())return!1;if(t.ctrlKey&&this.options.trackpadPinch)this.pinch(t);else if(this.options.wheelZoom){const e=this.parent.input.getPointerPosition(t),r=(this.options.reverse?-1:1)*-t.deltaY*(t.deltaMode?this.options.lineHeight:1)/500,n=Math.pow(2,(1+this.options.percent)*r);if(this.options.smooth){const s={x:this.smoothing?this.smoothing.x*(this.options.smooth-this.smoothingCount):0,y:this.smoothing?this.smoothing.y*(this.options.smooth-this.smoothingCount):0};this.smoothing={x:((this.parent.scale.x+s.x)*n-this.parent.scale.x)/this.options.smooth,y:((this.parent.scale.y+s.y)*n-this.parent.scale.y)/this.options.smooth},this.smoothingCount=0,this.smoothingCenter=e}else{let s;this.options.center||(s=this.parent.toLocal(e)),this.isAxisX()&&(this.parent.scale.x*=n),this.isAxisY()&&(this.parent.scale.y*=n),this.parent.emit("zoomed",{viewport:this.parent,type:"wheel"});const o=this.parent.plugins.get("clamp-zoom",!0);if(o&&o.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{const a=this.parent.toGlobal(s);this.parent.x+=e.x-a.x,this.parent.y+=e.y-a.y}}this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.parent.emit("wheel-start",{event:t,viewport:this.parent})}return!this.parent.options.passiveWheel}}class XE{constructor(t){U(this,"viewport"),U(this,"clickedAvailable"),U(this,"isMouseDown"),U(this,"last"),U(this,"wheelFunction"),U(this,"touches"),this.viewport=t,this.touches=[],this.addListeners()}addListeners(){this.viewport.interactive=!0,this.viewport.forceHitArea||(this.viewport.hitArea=new gt(0,0,this.viewport.worldWidth,this.viewport.worldHeight)),this.viewport.on("pointerdown",this.down,this),this.viewport.options.allowPreserveDragOutside?this.viewport.on("globalpointermove",this.move,this):this.viewport.on("pointermove",this.move,this),this.viewport.on("pointerup",this.up,this),this.viewport.on("pointerupoutside",this.up,this),this.viewport.on("pointercancel",this.up,this),this.viewport.options.allowPreserveDragOutside||this.viewport.on("pointerleave",this.up,this),this.wheelFunction=t=>this.handleWheel(t),this.viewport.options.events.domElement.addEventListener("wheel",this.wheelFunction,{passive:this.viewport.options.passiveWheel}),this.isMouseDown=!1}destroy(){this.viewport.options.events.domElement.removeEventListener("wheel",this.wheelFunction)}down(t){if(!(this.viewport.pause||!this.viewport.worldVisible)){if(t.pointerType==="mouse"?this.isMouseDown=!0:this.get(t.pointerId)||this.touches.push({id:t.pointerId,last:null}),this.count()===1){this.last=t.global.clone();const e=this.viewport.plugins.get("decelerate",!0),r=this.viewport.plugins.get("bounce",!0);(!e||!e.isActive())&&(!r||!r.isActive())?this.clickedAvailable=!0:this.clickedAvailable=!1}else this.clickedAvailable=!1;this.viewport.plugins.down(t)&&this.viewport.options.stopPropagation&&t.stopPropagation()}}clear(){this.isMouseDown=!1,this.touches=[],this.last=null}checkThreshold(t){return Math.abs(t)>=this.viewport.threshold}move(t){if(this.viewport.pause||!this.viewport.worldVisible)return;const e=this.viewport.plugins.move(t);if(this.clickedAvailable&&this.last){const r=t.global.x-this.last.x,n=t.global.y-this.last.y;(this.checkThreshold(r)||this.checkThreshold(n))&&(this.clickedAvailable=!1)}e&&this.viewport.options.stopPropagation&&t.stopPropagation()}up(t){if(this.viewport.pause||!this.viewport.worldVisible)return;t.pointerType==="mouse"&&(this.isMouseDown=!1),t.pointerType!=="mouse"&&this.remove(t.pointerId);const e=this.viewport.plugins.up(t);this.clickedAvailable&&this.count()===0&&this.last&&(this.viewport.emit("clicked",{event:t,screen:this.last,world:this.viewport.toWorld(this.last),viewport:this.viewport}),this.clickedAvailable=!1),e&&this.viewport.options.stopPropagation&&t.stopPropagation()}getPointerPosition(t){const e=new dt;return this.viewport.options.events.mapPositionToPoint(e,t.clientX,t.clientY),e}handleWheel(t){if(this.viewport.pause||!this.viewport.worldVisible)return;const e=this.viewport.toLocal(this.getPointerPosition(t));this.viewport.left<=e.x&&e.x<=this.viewport.right&&this.viewport.top<=e.y&&e.y<=this.viewport.bottom&&this.viewport.plugins.wheel(t)&&!this.viewport.options.passiveWheel&&t.preventDefault()}pause(){this.touches=[],this.isMouseDown=!1}get(t){for(const e of this.touches)if(e.id===t)return e;return null}remove(t){for(let e=0;e<this.touches.length;e++)if(this.touches[e].id===t){this.touches.splice(e,1);return}}count(){return(this.isMouseDown?1:0)+this.touches.length}}const Mo=["drag","pinch","wheel","follow","mouse-edges","decelerate","animate","bounce","snap-zoom","clamp-zoom","snap","clamp"];class WE{constructor(t){U(this,"plugins"),U(this,"list"),U(this,"viewport"),this.viewport=t,this.list=[],this.plugins={}}add(t,e,r=Mo.length){const n=this.plugins[t];n&&n.destroy(),this.plugins[t]=e;const s=Mo.indexOf(t);s!==-1&&Mo.splice(s,1),Mo.splice(r,0,t),this.sort()}get(t,e){var r;return e&&(r=this.plugins[t])!=null&&r.paused?null:this.plugins[t]}update(t){for(const e of this.list)e.update(t)}resize(){for(const t of this.list)t.resize()}reset(){for(const t of this.list)t.reset()}removeAll(){this.list.forEach(t=>{t.destroy()}),this.plugins={},this.sort()}remove(t){var e;this.plugins[t]&&((e=this.plugins[t])==null||e.destroy(),delete this.plugins[t],this.viewport.emit("plugin-remove",t),this.sort())}pause(t){var e;(e=this.plugins[t])==null||e.pause()}resume(t){var e;(e=this.plugins[t])==null||e.resume()}sort(){this.list=[];for(const t of Mo)this.plugins[t]&&this.list.push(this.plugins[t])}down(t){let e=!1;for(const r of this.list)r.down(t)&&(e=!0);return e}move(t){let e=!1;for(const r of this.viewport.plugins.list)r.move(t)&&(e=!0);return e}up(t){let e=!1;for(const r of this.list)r.up(t)&&(e=!0);return e}wheel(t){let e=!1;for(const r of this.list)r.wheel(t)&&(e=!0);return e}}const ZE={screenWidth:window.innerWidth,screenHeight:window.innerHeight,worldWidth:null,worldHeight:null,threshold:5,passiveWheel:!0,stopPropagation:!1,forceHitArea:null,noTicker:!1,disableOnContextMenu:!1,ticker:Se.shared,allowPreserveDragOutside:!1};class VE extends Ct{constructor(t){super(),U(this,"moving"),U(this,"screenWidth"),U(this,"screenHeight"),U(this,"threshold"),U(this,"input"),U(this,"plugins"),U(this,"zooming"),U(this,"lastViewport"),U(this,"options"),U(this,"_dirty"),U(this,"_forceHitArea"),U(this,"_hitAreaDefault"),U(this,"_pause"),U(this,"tickerFunction"),U(this,"_worldWidth"),U(this,"_worldHeight"),U(this,"_disableOnContextMenu",e=>e.preventDefault()),this.options={...ZE,...t},this.screenWidth=this.options.screenWidth,this.screenHeight=this.options.screenHeight,this._worldWidth=this.options.worldWidth,this._worldHeight=this.options.worldHeight,this.forceHitArea=this.options.forceHitArea,this.threshold=this.options.threshold,this.options.disableOnContextMenu&&this.options.events.domElement.addEventListener("contextmenu",this._disableOnContextMenu),this.options.noTicker||(this.tickerFunction=()=>this.update(this.options.ticker.elapsedMS),this.options.ticker.add(this.tickerFunction)),this.input=new XE(this),this.plugins=new WE(this)}destroy(t){!this.options.noTicker&&this.tickerFunction&&this.options.ticker.remove(this.tickerFunction),this.options.disableOnContextMenu&&this.options.events.domElement.removeEventListener("contextmenu",this._disableOnContextMenu),this.input.destroy(),super.destroy(t)}update(t){this.pause||(this.plugins.update(t),this.lastViewport&&(this.lastViewport.x!==this.x||this.lastViewport.y!==this.y?this.moving=!0:this.moving&&(this.emit("moved-end",this),this.moving=!1),this.lastViewport.scaleX!==this.scale.x||this.lastViewport.scaleY!==this.scale.y?this.zooming=!0:this.zooming&&(this.emit("zoomed-end",this),this.zooming=!1)),this.forceHitArea||(this._hitAreaDefault=new gt(this.left,this.top,this.worldScreenWidth,this.worldScreenHeight),this.hitArea=this._hitAreaDefault),this._dirty=this._dirty||!this.lastViewport||this.lastViewport.x!==this.x||this.lastViewport.y!==this.y||this.lastViewport.scaleX!==this.scale.x||this.lastViewport.scaleY!==this.scale.y,this.lastViewport={x:this.x,y:this.y,scaleX:this.scale.x,scaleY:this.scale.y},this.emit("frame-end",this))}resize(t=window.innerWidth,e=window.innerHeight,r,n){this.screenWidth=t,this.screenHeight=e,typeof r<"u"&&(this._worldWidth=r),typeof n<"u"&&(this._worldHeight=n),this.plugins.resize(),this.dirty=!0}get worldWidth(){return this._worldWidth?this._worldWidth:this.width/this.scale.x}set worldWidth(t){this._worldWidth=t,this.plugins.resize()}get worldHeight(){return this._worldHeight?this._worldHeight:this.height/this.scale.y}set worldHeight(t){this._worldHeight=t,this.plugins.resize()}getVisibleBounds(){return new gt(this.left,this.top,this.worldScreenWidth,this.worldScreenHeight)}toWorld(t,e){return arguments.length===2?this.toLocal(new dt(t,e)):this.toLocal(t)}toScreen(t,e){return arguments.length===2?this.toGlobal(new dt(t,e)):this.toGlobal(t)}get worldScreenWidth(){return this.screenWidth/this.scale.x}get worldScreenHeight(){return this.screenHeight/this.scale.y}get screenWorldWidth(){return this.worldWidth*this.scale.x}get screenWorldHeight(){return this.worldHeight*this.scale.y}get center(){return new dt(this.worldScreenWidth/2-this.x/this.scale.x,this.worldScreenHeight/2-this.y/this.scale.y)}set center(t){this.moveCenter(t)}moveCenter(...t){let e,r;typeof t[0]=="number"?(e=t[0],r=t[1]):(e=t[0].x,r=t[0].y);const n=(this.worldScreenWidth/2-e)*this.scale.x,s=(this.worldScreenHeight/2-r)*this.scale.y;return(this.x!==n||this.y!==s)&&(this.position.set(n,s),this.plugins.reset(),this.dirty=!0),this}get corner(){return new dt(-this.x/this.scale.x,-this.y/this.scale.y)}set corner(t){this.moveCorner(t)}moveCorner(...t){let e,r;return t.length===1?(e=-t[0].x*this.scale.x,r=-t[0].y*this.scale.y):(e=-t[0]*this.scale.x,r=-t[1]*this.scale.y),(e!==this.x||r!==this.y)&&(this.position.set(e,r),this.plugins.reset(),this.dirty=!0),this}get screenWidthInWorldPixels(){return this.screenWidth/this.scale.x}get screenHeightInWorldPixels(){return this.screenHeight/this.scale.y}findFitWidth(t){return this.screenWidth/t}findFitHeight(t){return this.screenHeight/t}findFit(t,e){const r=this.screenWidth/t,n=this.screenHeight/e;return Math.min(r,n)}findCover(t,e){const r=this.screenWidth/t,n=this.screenHeight/e;return Math.max(r,n)}fitWidth(t=this.worldWidth,e,r=!0,n){let s;e&&(s=this.center),this.scale.x=this.screenWidth/t,r&&(this.scale.y=this.scale.x);const o=this.plugins.get("clamp-zoom",!0);return!n&&o&&o.clamp(),e&&s&&this.moveCenter(s),this}fitHeight(t=this.worldHeight,e,r=!0,n){let s;e&&(s=this.center),this.scale.y=this.screenHeight/t,r&&(this.scale.x=this.scale.y);const o=this.plugins.get("clamp-zoom",!0);return!n&&o&&o.clamp(),e&&s&&this.moveCenter(s),this}fitWorld(t){let e;t&&(e=this.center),this.scale.x=this.screenWidth/this.worldWidth,this.scale.y=this.screenHeight/this.worldHeight,this.scale.x<this.scale.y?this.scale.y=this.scale.x:this.scale.x=this.scale.y;const r=this.plugins.get("clamp-zoom",!0);return r&&r.clamp(),t&&e&&this.moveCenter(e),this}fit(t,e=this.worldWidth,r=this.worldHeight){let n;t&&(n=this.center),this.scale.x=this.screenWidth/e,this.scale.y=this.screenHeight/r,this.scale.x<this.scale.y?this.scale.y=this.scale.x:this.scale.x=this.scale.y;const s=this.plugins.get("clamp-zoom",!0);return s&&s.clamp(),t&&n&&this.moveCenter(n),this}setZoom(t,e){let r;e&&(r=this.center),this.scale.set(t);const n=this.plugins.get("clamp-zoom",!0);return n&&n.clamp(),e&&r&&this.moveCenter(r),this}zoomPercent(t,e){return this.setZoom(this.scale.x+this.scale.x*t,e)}zoom(t,e){return this.fitWidth(t+this.worldScreenWidth,e),this}get scaled(){return this.scale.x}set scaled(t){this.setZoom(t,!0)}snapZoom(t){return this.plugins.add("snap-zoom",new OE(this,t)),this}OOB(){return{left:this.left<0,right:this.right>this.worldWidth,top:this.top<0,bottom:this.bottom>this.worldHeight,cornerPoint:new dt(this.worldWidth*this.scale.x-this.screenWidth,this.worldHeight*this.scale.y-this.screenHeight)}}get right(){return-this.x/this.scale.x+this.worldScreenWidth}set right(t){this.x=-t*this.scale.x+this.screenWidth,this.plugins.reset()}get left(){return-this.x/this.scale.x}set left(t){this.x=-t*this.scale.x,this.plugins.reset()}get top(){return-this.y/this.scale.y}set top(t){this.y=-t*this.scale.y,this.plugins.reset()}get bottom(){return-this.y/this.scale.y+this.worldScreenHeight}set bottom(t){this.y=-t*this.scale.y+this.screenHeight,this.plugins.reset()}get dirty(){return!!this._dirty}set dirty(t){this._dirty=t}get forceHitArea(){return this._forceHitArea}set forceHitArea(t){t?(this._forceHitArea=t,this.hitArea=t):(this._forceHitArea=null,this.hitArea=new gt(0,0,this.worldWidth,this.worldHeight))}drag(t){return this.plugins.add("drag",new AE(this,t)),this}clamp(t){return this.plugins.add("clamp",new wE(this,t)),this}decelerate(t){return this.plugins.add("decelerate",new EE(this,t)),this}bounce(t){return this.plugins.add("bounce",new _E(this,t)),this}pinch(t){return this.plugins.add("pinch",new kE(this,t)),this}snap(t,e,r){return this.plugins.add("snap",new DE(this,t,e,r)),this}follow(t,e){return this.plugins.add("follow",new RE(this,t,e)),this}wheel(t){return this.plugins.add("wheel",new UE(this,t)),this}animate(t){return this.plugins.add("animate",new bE(this,t)),this}clampZoom(t){return this.plugins.add("clamp-zoom",new SE(this,t)),this}mouseEdges(t){return this.plugins.add("mouse-edges",new LE(this,t)),this}get pause(){return!!this._pause}set pause(t){this._pause=t,this.lastViewport=null,this.moving=!1,this.zooming=!1,t&&this.input.pause()}ensureVisible(t,e,r,n,s){s&&(r>this.worldScreenWidth||n>this.worldScreenHeight)&&(this.fit(!0,r,n),this.emit("zoomed",{viewport:this,type:"ensureVisible"}));let o=!1;t<this.left?(this.left=t,o=!0):t+r>this.right&&(this.right=t+r,o=!0),e<this.top?(this.top=e,o=!0):e+n>this.bottom&&(this.bottom=e+n,o=!0),o&&this.emit("moved",{viewport:this,type:"ensureVisible"})}}function Gl(i,t){return i==null||t==null?NaN:i<t?-1:i>t?1:i>=t?0:NaN}function HE(i,t){return i==null||t==null?NaN:t<i?-1:t>i?1:t>=i?0:NaN}function dd(i){let t,e,r;i.length!==2?(t=Gl,e=(a,l)=>Gl(i(a),l),r=(a,l)=>i(a)-l):(t=i===Gl||i===HE?i:KE,e=i,r=i);function n(a,l,h=0,c=a.length){if(h<c){if(t(l,l)!==0)return c;do{const u=h+c>>>1;e(a[u],l)<0?h=u+1:c=u}while(h<c)}return h}function s(a,l,h=0,c=a.length){if(h<c){if(t(l,l)!==0)return c;do{const u=h+c>>>1;e(a[u],l)<=0?h=u+1:c=u}while(h<c)}return h}function o(a,l,h=0,c=a.length){const u=n(a,l,h,c-1);return u>h&&r(a[u-1],l)>-r(a[u],l)?u-1:u}return{left:n,center:o,right:s}}function KE(){return 0}function zE(i){return i===null?NaN:+i}const YE=dd(Gl).right;dd(zE).center;const jE=Math.sqrt(50),JE=Math.sqrt(10),$E=Math.sqrt(2);function kl(i,t,e){const r=(t-i)/Math.max(0,e),n=Math.floor(Math.log10(r)),s=r/Math.pow(10,n),o=s>=jE?10:s>=JE?5:s>=$E?2:1;let a,l,h;return n<0?(h=Math.pow(10,-n)/o,a=Math.round(i*h),l=Math.round(t*h),a/h<i&&++a,l/h>t&&--l,h=-h):(h=Math.pow(10,n)*o,a=Math.round(i/h),l=Math.round(t/h),a*h<i&&++a,l*h>t&&--l),l<a&&.5<=e&&e<2?kl(i,t,e*2):[a,l,h]}function QE(i,t,e){if(t=+t,i=+i,e=+e,!(e>0))return[];if(i===t)return[i];const r=t<i,[n,s,o]=r?kl(t,i,e):kl(i,t,e);if(!(s>=n))return[];const a=s-n+1,l=new Array(a);if(r)if(o<0)for(let h=0;h<a;++h)l[h]=(s-h)/-o;else for(let h=0;h<a;++h)l[h]=(s-h)*o;else if(o<0)for(let h=0;h<a;++h)l[h]=(n+h)/-o;else for(let h=0;h<a;++h)l[h]=(n+h)*o;return l}function fd(i,t,e){return t=+t,i=+i,e=+e,kl(i,t,e)[2]}function pd(i,t,e){t=+t,i=+i,e=+e;const r=t<i,n=r?fd(t,i,e):fd(i,t,e);return(r?-1:1)*(n<0?1/-n:n)}function md(i,t,e){i.prototype=t.prototype=e,e.constructor=i}function Iy(i,t){var e=Object.create(i.prototype);for(var r in t)e[r]=t[r];return e}function Ro(){}var Po=.7,Fl=1/Po,Ss="\\s*([+-]?\\d+)\\s*",Lo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Bi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",qE=/^#([0-9a-f]{3,8})$/,tI=new RegExp(`^rgb\\(${Ss},${Ss},${Ss}\\)$`),eI=new RegExp(`^rgb\\(${Bi},${Bi},${Bi}\\)$`),iI=new RegExp(`^rgba\\(${Ss},${Ss},${Ss},${Lo}\\)$`),rI=new RegExp(`^rgba\\(${Bi},${Bi},${Bi},${Lo}\\)$`),nI=new RegExp(`^hsl\\(${Lo},${Bi},${Bi}\\)$`),sI=new RegExp(`^hsla\\(${Lo},${Bi},${Bi},${Lo}\\)$`),Ay={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};md(Ro,Go,{copy(i){return Object.assign(new this.constructor,this,i)},displayable(){return this.rgb().displayable()},hex:My,formatHex:My,formatHex8:oI,formatHsl:aI,formatRgb:Ry,toString:Ry});function My(){return this.rgb().formatHex()}function oI(){return this.rgb().formatHex8()}function aI(){return Fy(this).formatHsl()}function Ry(){return this.rgb().formatRgb()}function Go(i){var t,e;return i=(i+"").trim().toLowerCase(),(t=qE.exec(i))?(e=t[1].length,t=parseInt(t[1],16),e===6?Py(t):e===3?new Ge(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):e===8?Dl(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):e===4?Dl(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=tI.exec(i))?new Ge(t[1],t[2],t[3],1):(t=eI.exec(i))?new Ge(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=iI.exec(i))?Dl(t[1],t[2],t[3],t[4]):(t=rI.exec(i))?Dl(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=nI.exec(i))?ky(t[1],t[2]/100,t[3]/100,1):(t=sI.exec(i))?ky(t[1],t[2]/100,t[3]/100,t[4]):Ay.hasOwnProperty(i)?Py(Ay[i]):i==="transparent"?new Ge(NaN,NaN,NaN,0):null}function Py(i){return new Ge(i>>16&255,i>>8&255,i&255,1)}function Dl(i,t,e,r){return r<=0&&(i=t=e=NaN),new Ge(i,t,e,r)}function lI(i){return i instanceof Ro||(i=Go(i)),i?(i=i.rgb(),new Ge(i.r,i.g,i.b,i.opacity)):new Ge}function gd(i,t,e,r){return arguments.length===1?lI(i):new Ge(i,t,e,r??1)}function Ge(i,t,e,r){this.r=+i,this.g=+t,this.b=+e,this.opacity=+r}md(Ge,gd,Iy(Ro,{brighter(i){return i=i==null?Fl:Math.pow(Fl,i),new Ge(this.r*i,this.g*i,this.b*i,this.opacity)},darker(i){return i=i==null?Po:Math.pow(Po,i),new Ge(this.r*i,this.g*i,this.b*i,this.opacity)},rgb(){return this},clamp(){return new Ge(kn(this.r),kn(this.g),kn(this.b),Nl(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ly,formatHex:Ly,formatHex8:hI,formatRgb:Gy,toString:Gy}));function Ly(){return`#${Fn(this.r)}${Fn(this.g)}${Fn(this.b)}`}function hI(){return`#${Fn(this.r)}${Fn(this.g)}${Fn(this.b)}${Fn((isNaN(this.opacity)?1:this.opacity)*255)}`}function Gy(){const i=Nl(this.opacity);return`${i===1?"rgb(":"rgba("}${kn(this.r)}, ${kn(this.g)}, ${kn(this.b)}${i===1?")":`, ${i})`}`}function Nl(i){return isNaN(i)?1:Math.max(0,Math.min(1,i))}function kn(i){return Math.max(0,Math.min(255,Math.round(i)||0))}function Fn(i){return i=kn(i),(i<16?"0":"")+i.toString(16)}function ky(i,t,e,r){return r<=0?i=t=e=NaN:e<=0||e>=1?i=t=NaN:t<=0&&(i=NaN),new mi(i,t,e,r)}function Fy(i){if(i instanceof mi)return new mi(i.h,i.s,i.l,i.opacity);if(i instanceof Ro||(i=Go(i)),!i)return new mi;if(i instanceof mi)return i;i=i.rgb();var t=i.r/255,e=i.g/255,r=i.b/255,n=Math.min(t,e,r),s=Math.max(t,e,r),o=NaN,a=s-n,l=(s+n)/2;return a?(t===s?o=(e-r)/a+(e<r)*6:e===s?o=(r-t)/a+2:o=(t-e)/a+4,a/=l<.5?s+n:2-s-n,o*=60):a=l>0&&l<1?0:o,new mi(o,a,l,i.opacity)}function cI(i,t,e,r){return arguments.length===1?Fy(i):new mi(i,t,e,r??1)}function mi(i,t,e,r){this.h=+i,this.s=+t,this.l=+e,this.opacity=+r}md(mi,cI,Iy(Ro,{brighter(i){return i=i==null?Fl:Math.pow(Fl,i),new mi(this.h,this.s,this.l*i,this.opacity)},darker(i){return i=i==null?Po:Math.pow(Po,i),new mi(this.h,this.s,this.l*i,this.opacity)},rgb(){var i=this.h%360+(this.h<0)*360,t=isNaN(i)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*t,n=2*e-r;return new Ge(yd(i>=240?i-240:i+120,n,r),yd(i,n,r),yd(i<120?i+240:i-120,n,r),this.opacity)},clamp(){return new mi(Dy(this.h),Ol(this.s),Ol(this.l),Nl(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const i=Nl(this.opacity);return`${i===1?"hsl(":"hsla("}${Dy(this.h)}, ${Ol(this.s)*100}%, ${Ol(this.l)*100}%${i===1?")":`, ${i})`}`}}));function Dy(i){return i=(i||0)%360,i<0?i+360:i}function Ol(i){return Math.max(0,Math.min(1,i||0))}function yd(i,t,e){return(i<60?t+(e-t)*i/60:i<180?e:i<240?t+(e-t)*(240-i)/60:t)*255}const bd=i=>()=>i;function uI(i,t){return function(e){return i+e*t}}function dI(i,t,e){return i=Math.pow(i,e),t=Math.pow(t,e)-i,e=1/e,function(r){return Math.pow(i+r*t,e)}}function fI(i){return(i=+i)==1?Ny:function(t,e){return e-t?dI(t,e,i):bd(isNaN(t)?e:t)}}function Ny(i,t){var e=t-i;return e?uI(i,e):bd(isNaN(i)?t:i)}const Oy=function i(t){var e=fI(t);function r(n,s){var o=e((n=gd(n)).r,(s=gd(s)).r),a=e(n.g,s.g),l=e(n.b,s.b),h=Ny(n.opacity,s.opacity);return function(c){return n.r=o(c),n.g=a(c),n.b=l(c),n.opacity=h(c),n+""}}return r.gamma=i,r}(1);function pI(i,t){t||(t=[]);var e=i?Math.min(t.length,i.length):0,r=t.slice(),n;return function(s){for(n=0;n<e;++n)r[n]=i[n]*(1-s)+t[n]*s;return r}}function mI(i){return ArrayBuffer.isView(i)&&!(i instanceof DataView)}function gI(i,t){var e=t?t.length:0,r=i?Math.min(e,i.length):0,n=new Array(r),s=new Array(e),o;for(o=0;o<r;++o)n[o]=vd(i[o],t[o]);for(;o<e;++o)s[o]=t[o];return function(a){for(o=0;o<r;++o)s[o]=n[o](a);return s}}function yI(i,t){var e=new Date;return i=+i,t=+t,function(r){return e.setTime(i*(1-r)+t*r),e}}function Bl(i,t){return i=+i,t=+t,function(e){return i*(1-e)+t*e}}function bI(i,t){var e={},r={},n;(i===null||typeof i!="object")&&(i={}),(t===null||typeof t!="object")&&(t={});for(n in t)n in i?e[n]=vd(i[n],t[n]):r[n]=t[n];return function(s){for(n in e)r[n]=e[n](s);return r}}var xd=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,_d=new RegExp(xd.source,"g");function xI(i){return function(){return i}}function _I(i){return function(t){return i(t)+""}}function vI(i,t){var e=xd.lastIndex=_d.lastIndex=0,r,n,s,o=-1,a=[],l=[];for(i=i+"",t=t+"";(r=xd.exec(i))&&(n=_d.exec(t));)(s=n.index)>e&&(s=t.slice(e,s),a[o]?a[o]+=s:a[++o]=s),(r=r[0])===(n=n[0])?a[o]?a[o]+=n:a[++o]=n:(a[++o]=null,l.push({i:o,x:Bl(r,n)})),e=_d.lastIndex;return e<t.length&&(s=t.slice(e),a[o]?a[o]+=s:a[++o]=s),a.length<2?l[0]?_I(l[0].x):xI(t):(t=l.length,function(h){for(var c=0,u;c<t;++c)a[(u=l[c]).i]=u.x(h);return a.join("")})}function vd(i,t){var e=typeof t,r;return t==null||e==="boolean"?bd(t):(e==="number"?Bl:e==="string"?(r=Go(t))?(t=r,Oy):vI:t instanceof Go?Oy:t instanceof Date?yI:mI(t)?pI:Array.isArray(t)?gI:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?bI:Bl)(i,t)}function wI(i,t){return i=+i,t=+t,function(e){return Math.round(i*(1-e)+t*e)}}function TI(i){return Math.abs(i=Math.round(i))>=1e21?i.toLocaleString("en").replace(/,/g,""):i.toString(10)}function Ul(i,t){if((e=(i=t?i.toExponential(t-1):i.toExponential()).indexOf("e"))<0)return null;var e,r=i.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+i.slice(e+1)]}function Cs(i){return i=Ul(Math.abs(i)),i?i[1]:NaN}function SI(i,t){return function(e,r){for(var n=e.length,s=[],o=0,a=i[0],l=0;n>0&&a>0&&(l+a+1>r&&(a=Math.max(1,r-l)),s.push(e.substring(n-=a,n+a)),!((l+=a+1)>r));)a=i[o=(o+1)%i.length];return s.reverse().join(t)}}function CI(i){return function(t){return t.replace(/[0-9]/g,function(e){return i[+e]})}}var EI=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Xl(i){if(!(t=EI.exec(i)))throw new Error("invalid format: "+i);var t;return new wd({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Xl.prototype=wd.prototype;function wd(i){this.fill=i.fill===void 0?" ":i.fill+"",this.align=i.align===void 0?">":i.align+"",this.sign=i.sign===void 0?"-":i.sign+"",this.symbol=i.symbol===void 0?"":i.symbol+"",this.zero=!!i.zero,this.width=i.width===void 0?void 0:+i.width,this.comma=!!i.comma,this.precision=i.precision===void 0?void 0:+i.precision,this.trim=!!i.trim,this.type=i.type===void 0?"":i.type+""}wd.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function II(i){t:for(var t=i.length,e=1,r=-1,n;e<t;++e)switch(i[e]){case".":r=n=e;break;case"0":r===0&&(r=e),n=e;break;default:if(!+i[e])break t;r>0&&(r=0);break}return r>0?i.slice(0,r)+i.slice(n+1):i}var By;function AI(i,t){var e=Ul(i,t);if(!e)return i+"";var r=e[0],n=e[1],s=n-(By=Math.max(-8,Math.min(8,Math.floor(n/3)))*3)+1,o=r.length;return s===o?r:s>o?r+new Array(s-o+1).join("0"):s>0?r.slice(0,s)+"."+r.slice(s):"0."+new Array(1-s).join("0")+Ul(i,Math.max(0,t+s-1))[0]}function Uy(i,t){var e=Ul(i,t);if(!e)return i+"";var r=e[0],n=e[1];return n<0?"0."+new Array(-n).join("0")+r:r.length>n+1?r.slice(0,n+1)+"."+r.slice(n+1):r+new Array(n-r.length+2).join("0")}const Xy={"%":(i,t)=>(i*100).toFixed(t),b:i=>Math.round(i).toString(2),c:i=>i+"",d:TI,e:(i,t)=>i.toExponential(t),f:(i,t)=>i.toFixed(t),g:(i,t)=>i.toPrecision(t),o:i=>Math.round(i).toString(8),p:(i,t)=>Uy(i*100,t),r:Uy,s:AI,X:i=>Math.round(i).toString(16).toUpperCase(),x:i=>Math.round(i).toString(16)};function Wy(i){return i}var Zy=Array.prototype.map,Vy=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function MI(i){var t=i.grouping===void 0||i.thousands===void 0?Wy:SI(Zy.call(i.grouping,Number),i.thousands+""),e=i.currency===void 0?"":i.currency[0]+"",r=i.currency===void 0?"":i.currency[1]+"",n=i.decimal===void 0?".":i.decimal+"",s=i.numerals===void 0?Wy:CI(Zy.call(i.numerals,String)),o=i.percent===void 0?"%":i.percent+"",a=i.minus===void 0?"−":i.minus+"",l=i.nan===void 0?"NaN":i.nan+"";function h(u){u=Xl(u);var d=u.fill,f=u.align,p=u.sign,m=u.symbol,g=u.zero,y=u.width,x=u.comma,b=u.precision,v=u.trim,w=u.type;w==="n"?(x=!0,w="g"):Xy[w]||(b===void 0&&(b=12),v=!0,w="g"),(g||d==="0"&&f==="=")&&(g=!0,d="0",f="=");var S=m==="$"?e:m==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",E=m==="$"?r:/[%p]/.test(w)?o:"",I=Xy[w],A=/[defgprs%]/.test(w);b=b===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b));function L(G){var F=S,M=E,N,W,K;if(w==="c")M=I(G)+M,G="";else{G=+G;var H=G<0||1/G<0;if(G=isNaN(G)?l:I(Math.abs(G),b),v&&(G=II(G)),H&&+G==0&&p!=="+"&&(H=!1),F=(H?p==="("?p:a:p==="-"||p==="("?"":p)+F,M=(w==="s"?Vy[8+By/3]:"")+M+(H&&p==="("?")":""),A){for(N=-1,W=G.length;++N<W;)if(K=G.charCodeAt(N),48>K||K>57){M=(K===46?n+G.slice(N+1):G.slice(N))+M,G=G.slice(0,N);break}}}x&&!g&&(G=t(G,1/0));var j=F.length+G.length+M.length,B=j<y?new Array(y-j+1).join(d):"";switch(x&&g&&(G=t(B+G,B.length?y-M.length:1/0),B=""),f){case"<":G=F+G+M+B;break;case"=":G=F+B+G+M;break;case"^":G=B.slice(0,j=B.length>>1)+F+G+M+B.slice(j);break;default:G=B+F+G+M;break}return s(G)}return L.toString=function(){return u+""},L}function c(u,d){var f=h((u=Xl(u),u.type="f",u)),p=Math.max(-8,Math.min(8,Math.floor(Cs(d)/3)))*3,m=Math.pow(10,-p),g=Vy[8+p/3];return function(y){return f(m*y)+g}}return{format:h,formatPrefix:c}}var Wl,Hy,Ky;RI({thousands:",",grouping:[3],currency:["$",""]});function RI(i){return Wl=MI(i),Hy=Wl.format,Ky=Wl.formatPrefix,Wl}function PI(i){return Math.max(0,-Cs(Math.abs(i)))}function LI(i,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Cs(t)/3)))*3-Cs(Math.abs(i)))}function GI(i,t){return i=Math.abs(i),t=Math.abs(t)-i,Math.max(0,Cs(t)-Cs(i))+1}function zy(i,t){switch(arguments.length){case 0:break;case 1:this.range(i);break;default:this.range(t).domain(i);break}return this}function kI(i){return function(){return i}}function FI(i){return+i}var Yy=[0,1];function Es(i){return i}function Td(i,t){return(t-=i=+i)?function(e){return(e-i)/t}:kI(isNaN(t)?NaN:.5)}function DI(i,t){var e;return i>t&&(e=i,i=t,t=e),function(r){return Math.max(i,Math.min(t,r))}}function NI(i,t,e){var r=i[0],n=i[1],s=t[0],o=t[1];return n<r?(r=Td(n,r),s=e(o,s)):(r=Td(r,n),s=e(s,o)),function(a){return s(r(a))}}function OI(i,t,e){var r=Math.min(i.length,t.length)-1,n=new Array(r),s=new Array(r),o=-1;for(i[r]<i[0]&&(i=i.slice().reverse(),t=t.slice().reverse());++o<r;)n[o]=Td(i[o],i[o+1]),s[o]=e(t[o],t[o+1]);return function(a){var l=YE(i,a,1,r)-1;return s[l](n[l](a))}}function jy(i,t){return t.domain(i.domain()).range(i.range()).interpolate(i.interpolate()).clamp(i.clamp()).unknown(i.unknown())}function BI(){var i=Yy,t=Yy,e=vd,r,n,s,o=Es,a,l,h;function c(){var d=Math.min(i.length,t.length);return o!==Es&&(o=DI(i[0],i[d-1])),a=d>2?OI:NI,l=h=null,u}function u(d){return d==null||isNaN(d=+d)?s:(l||(l=a(i.map(r),t,e)))(r(o(d)))}return u.invert=function(d){return o(n((h||(h=a(t,i.map(r),Bl)))(d)))},u.domain=function(d){return arguments.length?(i=Array.from(d,FI),c()):i.slice()},u.range=function(d){return arguments.length?(t=Array.from(d),c()):t.slice()},u.rangeRound=function(d){return t=Array.from(d),e=wI,c()},u.clamp=function(d){return arguments.length?(o=d?!0:Es,c()):o!==Es},u.interpolate=function(d){return arguments.length?(e=d,c()):e},u.unknown=function(d){return arguments.length?(s=d,u):s},function(d,f){return r=d,n=f,c()}}function Jy(){return BI()(Es,Es)}function UI(i,t,e,r){var n=pd(i,t,e),s;switch(r=Xl(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(i),Math.abs(t));return r.precision==null&&!isNaN(s=LI(n,o))&&(r.precision=s),Ky(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(s=GI(n,Math.max(Math.abs(i),Math.abs(t))))&&(r.precision=s-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(s=PI(n))&&(r.precision=s-(r.type==="%")*2);break}}return Hy(r)}function XI(i){var t=i.domain;return i.ticks=function(e){var r=t();return QE(r[0],r[r.length-1],e??10)},i.tickFormat=function(e,r){var n=t();return UI(n[0],n[n.length-1],e??10,r)},i.nice=function(e){e==null&&(e=10);var r=t(),n=0,s=r.length-1,o=r[n],a=r[s],l,h,c=10;for(a<o&&(h=o,o=a,a=h,h=n,n=s,s=h);c-- >0;){if(h=fd(o,a,e),h===l)return r[n]=o,r[s]=a,t(r);if(h>0)o=Math.floor(o/h)*h,a=Math.ceil(a/h)*h;else if(h<0)o=Math.ceil(o*h)/h,a=Math.floor(a*h)/h;else break;l=h}return i},i}function $y(){var i=Jy();return i.copy=function(){return jy(i,$y())},zy.apply(i,arguments),XI(i)}function WI(i,t){i=i.slice();var e=0,r=i.length-1,n=i[e],s=i[r],o;return s<n&&(o=e,e=r,r=o,o=n,n=s,s=o),i[e]=t.floor(n),i[r]=t.ceil(s),i}const Sd=new Date,Cd=new Date;function se(i,t,e,r){function n(s){return i(s=arguments.length===0?new Date:new Date(+s)),s}return n.floor=s=>(i(s=new Date(+s)),s),n.ceil=s=>(i(s=new Date(s-1)),t(s,1),i(s),s),n.round=s=>{const o=n(s),a=n.ceil(s);return s-o<a-s?o:a},n.offset=(s,o)=>(t(s=new Date(+s),o==null?1:Math.floor(o)),s),n.range=(s,o,a)=>{const l=[];if(s=n.ceil(s),a=a==null?1:Math.floor(a),!(s<o)||!(a>0))return l;let h;do l.push(h=new Date(+s)),t(s,a),i(s);while(h<s&&s<o);return l},n.filter=s=>se(o=>{if(o>=o)for(;i(o),!s(o);)o.setTime(o-1)},(o,a)=>{if(o>=o)if(a<0)for(;++a<=0;)for(;t(o,-1),!s(o););else for(;--a>=0;)for(;t(o,1),!s(o););}),e&&(n.count=(s,o)=>(Sd.setTime(+s),Cd.setTime(+o),i(Sd),i(Cd),Math.floor(e(Sd,Cd))),n.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?n.filter(r?o=>r(o)%s===0:o=>n.count(0,o)%s===0):n)),n}const Zl=se(()=>{},(i,t)=>{i.setTime(+i+t)},(i,t)=>t-i);Zl.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?se(t=>{t.setTime(Math.floor(t/i)*i)},(t,e)=>{t.setTime(+t+e*i)},(t,e)=>(e-t)/i):Zl),Zl.range;const ur=1e3,ii=ur*60,dr=ii*60,fr=dr*24,Ed=fr*7,Qy=fr*30,Id=fr*365,Is=se(i=>{i.setTime(i-i.getMilliseconds())},(i,t)=>{i.setTime(+i+t*ur)},(i,t)=>(t-i)/ur,i=>i.getUTCSeconds());Is.range;const Ad=se(i=>{i.setTime(i-i.getMilliseconds()-i.getSeconds()*ur)},(i,t)=>{i.setTime(+i+t*ii)},(i,t)=>(t-i)/ii,i=>i.getMinutes());Ad.range,se(i=>{i.setUTCSeconds(0,0)},(i,t)=>{i.setTime(+i+t*ii)},(i,t)=>(t-i)/ii,i=>i.getUTCMinutes()).range;const Md=se(i=>{i.setTime(i-i.getMilliseconds()-i.getSeconds()*ur-i.getMinutes()*ii)},(i,t)=>{i.setTime(+i+t*dr)},(i,t)=>(t-i)/dr,i=>i.getHours());Md.range,se(i=>{i.setUTCMinutes(0,0,0)},(i,t)=>{i.setTime(+i+t*dr)},(i,t)=>(t-i)/dr,i=>i.getUTCHours()).range;const ko=se(i=>i.setHours(0,0,0,0),(i,t)=>i.setDate(i.getDate()+t),(i,t)=>(t-i-(t.getTimezoneOffset()-i.getTimezoneOffset())*ii)/fr,i=>i.getDate()-1);ko.range;const Rd=se(i=>{i.setUTCHours(0,0,0,0)},(i,t)=>{i.setUTCDate(i.getUTCDate()+t)},(i,t)=>(t-i)/fr,i=>i.getUTCDate()-1);Rd.range,se(i=>{i.setUTCHours(0,0,0,0)},(i,t)=>{i.setUTCDate(i.getUTCDate()+t)},(i,t)=>(t-i)/fr,i=>Math.floor(i/fr)).range;function Dn(i){return se(t=>{t.setDate(t.getDate()-(t.getDay()+7-i)%7),t.setHours(0,0,0,0)},(t,e)=>{t.setDate(t.getDate()+e*7)},(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ii)/Ed)}const Vl=Dn(0),Hl=Dn(1),ZI=Dn(2),VI=Dn(3),As=Dn(4),HI=Dn(5),KI=Dn(6);Vl.range,Hl.range,ZI.range,VI.range,As.range,HI.range,KI.range;function Nn(i){return se(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-i)%7),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e*7)},(t,e)=>(e-t)/Ed)}const qy=Nn(0),Kl=Nn(1),zI=Nn(2),YI=Nn(3),Ms=Nn(4),jI=Nn(5),JI=Nn(6);qy.range,Kl.range,zI.range,YI.range,Ms.range,jI.range,JI.range;const Pd=se(i=>{i.setDate(1),i.setHours(0,0,0,0)},(i,t)=>{i.setMonth(i.getMonth()+t)},(i,t)=>t.getMonth()-i.getMonth()+(t.getFullYear()-i.getFullYear())*12,i=>i.getMonth());Pd.range,se(i=>{i.setUTCDate(1),i.setUTCHours(0,0,0,0)},(i,t)=>{i.setUTCMonth(i.getUTCMonth()+t)},(i,t)=>t.getUTCMonth()-i.getUTCMonth()+(t.getUTCFullYear()-i.getUTCFullYear())*12,i=>i.getUTCMonth()).range;const pr=se(i=>{i.setMonth(0,1),i.setHours(0,0,0,0)},(i,t)=>{i.setFullYear(i.getFullYear()+t)},(i,t)=>t.getFullYear()-i.getFullYear(),i=>i.getFullYear());pr.every=i=>!isFinite(i=Math.floor(i))||!(i>0)?null:se(t=>{t.setFullYear(Math.floor(t.getFullYear()/i)*i),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e*i)}),pr.range;const On=se(i=>{i.setUTCMonth(0,1),i.setUTCHours(0,0,0,0)},(i,t)=>{i.setUTCFullYear(i.getUTCFullYear()+t)},(i,t)=>t.getUTCFullYear()-i.getUTCFullYear(),i=>i.getUTCFullYear());On.every=i=>!isFinite(i=Math.floor(i))||!(i>0)?null:se(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/i)*i),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e*i)}),On.range;function $I(i,t,e,r,n,s){const o=[[Is,1,ur],[Is,5,5*ur],[Is,15,15*ur],[Is,30,30*ur],[s,1,ii],[s,5,5*ii],[s,15,15*ii],[s,30,30*ii],[n,1,dr],[n,3,3*dr],[n,6,6*dr],[n,12,12*dr],[r,1,fr],[r,2,2*fr],[e,1,Ed],[t,1,Qy],[t,3,3*Qy],[i,1,Id]];function a(h,c,u){const d=c<h;d&&([h,c]=[c,h]);const f=u&&typeof u.range=="function"?u:l(h,c,u),p=f?f.range(h,+c+1):[];return d?p.reverse():p}function l(h,c,u){const d=Math.abs(c-h)/u,f=dd(([,,g])=>g).right(o,d);if(f===o.length)return i.every(pd(h/Id,c/Id,u));if(f===0)return Zl.every(Math.max(pd(h,c,u),1));const[p,m]=o[d/o[f-1][2]<o[f][2]/d?f-1:f];return p.every(m)}return[a,l]}const[QI,qI]=$I(pr,Pd,Vl,ko,Md,Ad);function Ld(i){if(0<=i.y&&i.y<100){var t=new Date(-1,i.m,i.d,i.H,i.M,i.S,i.L);return t.setFullYear(i.y),t}return new Date(i.y,i.m,i.d,i.H,i.M,i.S,i.L)}function Gd(i){if(0<=i.y&&i.y<100){var t=new Date(Date.UTC(-1,i.m,i.d,i.H,i.M,i.S,i.L));return t.setUTCFullYear(i.y),t}return new Date(Date.UTC(i.y,i.m,i.d,i.H,i.M,i.S,i.L))}function Fo(i,t,e){return{y:i,m:t,d:e,H:0,M:0,S:0,L:0}}function tA(i){var t=i.dateTime,e=i.date,r=i.time,n=i.periods,s=i.days,o=i.shortDays,a=i.months,l=i.shortMonths,h=Do(n),c=No(n),u=Do(s),d=No(s),f=Do(o),p=No(o),m=Do(a),g=No(a),y=Do(l),x=No(l),b={a:H,A:j,b:B,B:D,c:null,d:s1,e:s1,f:TA,g:GA,G:FA,H:_A,I:vA,j:wA,L:o1,m:SA,M:CA,p:k,q:V,Q:d1,s:f1,S:EA,u:IA,U:AA,V:MA,w:RA,W:PA,x:null,X:null,y:LA,Y:kA,Z:DA,"%":u1},v={a:et,A:ft,b:at,B:Tt,c:null,d:l1,e:l1,f:UA,g:JA,G:QA,H:NA,I:OA,j:BA,L:h1,m:XA,M:WA,p:It,q:Q,Q:d1,s:f1,S:ZA,u:VA,U:HA,V:KA,w:zA,W:YA,x:null,X:null,y:jA,Y:$A,Z:qA,"%":u1},w={a:L,A:G,b:F,B:M,c:N,d:r1,e:r1,f:gA,g:i1,G:e1,H:n1,I:n1,j:dA,L:mA,m:uA,M:fA,p:A,q:cA,Q:bA,s:xA,S:pA,u:sA,U:oA,V:aA,w:nA,W:lA,x:W,X:K,y:i1,Y:e1,Z:hA,"%":yA};b.x=S(e,b),b.X=S(r,b),b.c=S(t,b),v.x=S(e,v),v.X=S(r,v),v.c=S(t,v);function S(Z,J){return function($){var O=[],pt=-1,yt=0,Rt=Z.length,Bt,Fe,Ve;for($ instanceof Date||($=new Date(+$));++pt<Rt;)Z.charCodeAt(pt)===37&&(O.push(Z.slice(yt,pt)),(Fe=t1[Bt=Z.charAt(++pt)])!=null?Bt=Z.charAt(++pt):Fe=Bt==="e"?" ":"0",(Ve=J[Bt])&&(Bt=Ve($,Fe)),O.push(Bt),yt=pt+1);return O.push(Z.slice(yt,pt)),O.join("")}}function E(Z,J){return function($){var O=Fo(1900,void 0,1),pt=I(O,Z,$+="",0),yt,Rt;if(pt!=$.length)return null;if("Q"in O)return new Date(O.Q);if("s"in O)return new Date(O.s*1e3+("L"in O?O.L:0));if(J&&!("Z"in O)&&(O.Z=0),"p"in O&&(O.H=O.H%12+O.p*12),O.m===void 0&&(O.m="q"in O?O.q:0),"V"in O){if(O.V<1||O.V>53)return null;"w"in O||(O.w=1),"Z"in O?(yt=Gd(Fo(O.y,0,1)),Rt=yt.getUTCDay(),yt=Rt>4||Rt===0?Kl.ceil(yt):Kl(yt),yt=Rd.offset(yt,(O.V-1)*7),O.y=yt.getUTCFullYear(),O.m=yt.getUTCMonth(),O.d=yt.getUTCDate()+(O.w+6)%7):(yt=Ld(Fo(O.y,0,1)),Rt=yt.getDay(),yt=Rt>4||Rt===0?Hl.ceil(yt):Hl(yt),yt=ko.offset(yt,(O.V-1)*7),O.y=yt.getFullYear(),O.m=yt.getMonth(),O.d=yt.getDate()+(O.w+6)%7)}else("W"in O||"U"in O)&&("w"in O||(O.w="u"in O?O.u%7:"W"in O?1:0),Rt="Z"in O?Gd(Fo(O.y,0,1)).getUTCDay():Ld(Fo(O.y,0,1)).getDay(),O.m=0,O.d="W"in O?(O.w+6)%7+O.W*7-(Rt+5)%7:O.w+O.U*7-(Rt+6)%7);return"Z"in O?(O.H+=O.Z/100|0,O.M+=O.Z%100,Gd(O)):Ld(O)}}function I(Z,J,$,O){for(var pt=0,yt=J.length,Rt=$.length,Bt,Fe;pt<yt;){if(O>=Rt)return-1;if(Bt=J.charCodeAt(pt++),Bt===37){if(Bt=J.charAt(pt++),Fe=w[Bt in t1?J.charAt(pt++):Bt],!Fe||(O=Fe(Z,$,O))<0)return-1}else if(Bt!=$.charCodeAt(O++))return-1}return O}function A(Z,J,$){var O=h.exec(J.slice($));return O?(Z.p=c.get(O[0].toLowerCase()),$+O[0].length):-1}function L(Z,J,$){var O=f.exec(J.slice($));return O?(Z.w=p.get(O[0].toLowerCase()),$+O[0].length):-1}function G(Z,J,$){var O=u.exec(J.slice($));return O?(Z.w=d.get(O[0].toLowerCase()),$+O[0].length):-1}function F(Z,J,$){var O=y.exec(J.slice($));return O?(Z.m=x.get(O[0].toLowerCase()),$+O[0].length):-1}function M(Z,J,$){var O=m.exec(J.slice($));return O?(Z.m=g.get(O[0].toLowerCase()),$+O[0].length):-1}function N(Z,J,$){return I(Z,t,J,$)}function W(Z,J,$){return I(Z,e,J,$)}function K(Z,J,$){return I(Z,r,J,$)}function H(Z){return o[Z.getDay()]}function j(Z){return s[Z.getDay()]}function B(Z){return l[Z.getMonth()]}function D(Z){return a[Z.getMonth()]}function k(Z){return n[+(Z.getHours()>=12)]}function V(Z){return 1+~~(Z.getMonth()/3)}function et(Z){return o[Z.getUTCDay()]}function ft(Z){return s[Z.getUTCDay()]}function at(Z){return l[Z.getUTCMonth()]}function Tt(Z){return a[Z.getUTCMonth()]}function It(Z){return n[+(Z.getUTCHours()>=12)]}function Q(Z){return 1+~~(Z.getUTCMonth()/3)}return{format:function(Z){var J=S(Z+="",b);return J.toString=function(){return Z},J},parse:function(Z){var J=E(Z+="",!1);return J.toString=function(){return Z},J},utcFormat:function(Z){var J=S(Z+="",v);return J.toString=function(){return Z},J},utcParse:function(Z){var J=E(Z+="",!0);return J.toString=function(){return Z},J}}}var t1={"-":"",_:" ",0:"0"},de=/^\s*\d+/,eA=/^%/,iA=/[\\^$*+?|[\]().{}]/g;function Mt(i,t,e){var r=i<0?"-":"",n=(r?-i:i)+"",s=n.length;return r+(s<e?new Array(e-s+1).join(t)+n:n)}function rA(i){return i.replace(iA,"\\$&")}function Do(i){return new RegExp("^(?:"+i.map(rA).join("|")+")","i")}function No(i){return new Map(i.map((t,e)=>[t.toLowerCase(),e]))}function nA(i,t,e){var r=de.exec(t.slice(e,e+1));return r?(i.w=+r[0],e+r[0].length):-1}function sA(i,t,e){var r=de.exec(t.slice(e,e+1));return r?(i.u=+r[0],e+r[0].length):-1}function oA(i,t,e){var r=de.exec(t.slice(e,e+2));return r?(i.U=+r[0],e+r[0].length):-1}function aA(i,t,e){var r=de.exec(t.slice(e,e+2));return r?(i.V=+r[0],e+r[0].length):-1}function lA(i,t,e){var r=de.exec(t.slice(e,e+2));return r?(i.W=+r[0],e+r[0].length):-1}function e1(i,t,e){var r=de.exec(t.slice(e,e+4));return r?(i.y=+r[0],e+r[0].length):-1}function i1(i,t,e){var r=de.exec(t.slice(e,e+2));return r?(i.y=+r[0]+(+r[0]>68?1900:2e3),e+r[0].length):-1}function hA(i,t,e){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(e,e+6));return r?(i.Z=r[1]?0:-(r[2]+(r[3]||"00")),e+r[0].length):-1}function cA(i,t,e){var r=de.exec(t.slice(e,e+1));return r?(i.q=r[0]*3-3,e+r[0].length):-1}function uA(i,t,e){var r=de.exec(t.slice(e,e+2));return r?(i.m=r[0]-1,e+r[0].length):-1}function r1(i,t,e){var r=de.exec(t.slice(e,e+2));return r?(i.d=+r[0],e+r[0].length):-1}function dA(i,t,e){var r=de.exec(t.slice(e,e+3));return r?(i.m=0,i.d=+r[0],e+r[0].length):-1}function n1(i,t,e){var r=de.exec(t.slice(e,e+2));return r?(i.H=+r[0],e+r[0].length):-1}function fA(i,t,e){var r=de.exec(t.slice(e,e+2));return r?(i.M=+r[0],e+r[0].length):-1}function pA(i,t,e){var r=de.exec(t.slice(e,e+2));return r?(i.S=+r[0],e+r[0].length):-1}function mA(i,t,e){var r=de.exec(t.slice(e,e+3));return r?(i.L=+r[0],e+r[0].length):-1}function gA(i,t,e){var r=de.exec(t.slice(e,e+6));return r?(i.L=Math.floor(r[0]/1e3),e+r[0].length):-1}function yA(i,t,e){var r=eA.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function bA(i,t,e){var r=de.exec(t.slice(e));return r?(i.Q=+r[0],e+r[0].length):-1}function xA(i,t,e){var r=de.exec(t.slice(e));return r?(i.s=+r[0],e+r[0].length):-1}function s1(i,t){return Mt(i.getDate(),t,2)}function _A(i,t){return Mt(i.getHours(),t,2)}function vA(i,t){return Mt(i.getHours()%12||12,t,2)}function wA(i,t){return Mt(1+ko.count(pr(i),i),t,3)}function o1(i,t){return Mt(i.getMilliseconds(),t,3)}function TA(i,t){return o1(i,t)+"000"}function SA(i,t){return Mt(i.getMonth()+1,t,2)}function CA(i,t){return Mt(i.getMinutes(),t,2)}function EA(i,t){return Mt(i.getSeconds(),t,2)}function IA(i){var t=i.getDay();return t===0?7:t}function AA(i,t){return Mt(Vl.count(pr(i)-1,i),t,2)}function a1(i){var t=i.getDay();return t>=4||t===0?As(i):As.ceil(i)}function MA(i,t){return i=a1(i),Mt(As.count(pr(i),i)+(pr(i).getDay()===4),t,2)}function RA(i){return i.getDay()}function PA(i,t){return Mt(Hl.count(pr(i)-1,i),t,2)}function LA(i,t){return Mt(i.getFullYear()%100,t,2)}function GA(i,t){return i=a1(i),Mt(i.getFullYear()%100,t,2)}function kA(i,t){return Mt(i.getFullYear()%1e4,t,4)}function FA(i,t){var e=i.getDay();return i=e>=4||e===0?As(i):As.ceil(i),Mt(i.getFullYear()%1e4,t,4)}function DA(i){var t=i.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Mt(t/60|0,"0",2)+Mt(t%60,"0",2)}function l1(i,t){return Mt(i.getUTCDate(),t,2)}function NA(i,t){return Mt(i.getUTCHours(),t,2)}function OA(i,t){return Mt(i.getUTCHours()%12||12,t,2)}function BA(i,t){return Mt(1+Rd.count(On(i),i),t,3)}function h1(i,t){return Mt(i.getUTCMilliseconds(),t,3)}function UA(i,t){return h1(i,t)+"000"}function XA(i,t){return Mt(i.getUTCMonth()+1,t,2)}function WA(i,t){return Mt(i.getUTCMinutes(),t,2)}function ZA(i,t){return Mt(i.getUTCSeconds(),t,2)}function VA(i){var t=i.getUTCDay();return t===0?7:t}function HA(i,t){return Mt(qy.count(On(i)-1,i),t,2)}function c1(i){var t=i.getUTCDay();return t>=4||t===0?Ms(i):Ms.ceil(i)}function KA(i,t){return i=c1(i),Mt(Ms.count(On(i),i)+(On(i).getUTCDay()===4),t,2)}function zA(i){return i.getUTCDay()}function YA(i,t){return Mt(Kl.count(On(i)-1,i),t,2)}function jA(i,t){return Mt(i.getUTCFullYear()%100,t,2)}function JA(i,t){return i=c1(i),Mt(i.getUTCFullYear()%100,t,2)}function $A(i,t){return Mt(i.getUTCFullYear()%1e4,t,4)}function QA(i,t){var e=i.getUTCDay();return i=e>=4||e===0?Ms(i):Ms.ceil(i),Mt(i.getUTCFullYear()%1e4,t,4)}function qA(){return"+0000"}function u1(){return"%"}function d1(i){return+i}function f1(i){return Math.floor(+i/1e3)}var Rs,p1;tM({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function tM(i){return Rs=tA(i),p1=Rs.format,Rs.parse,Rs.utcFormat,Rs.utcParse,Rs}function eM(i){return new Date(i)}function iM(i){return i instanceof Date?+i:+new Date(+i)}function m1(i,t,e,r,n,s,o,a,l,h){var c=Jy(),u=c.invert,d=c.domain,f=h(".%L"),p=h(":%S"),m=h("%I:%M"),g=h("%I %p"),y=h("%a %d"),x=h("%b %d"),b=h("%B"),v=h("%Y");function w(S){return(l(S)<S?f:a(S)<S?p:o(S)<S?m:s(S)<S?g:r(S)<S?n(S)<S?y:x:e(S)<S?b:v)(S)}return c.invert=function(S){return new Date(u(S))},c.domain=function(S){return arguments.length?d(Array.from(S,iM)):d().map(eM)},c.ticks=function(S){var E=d();return i(E[0],E[E.length-1],S??10)},c.tickFormat=function(S,E){return E==null?w:h(E)},c.nice=function(S){var E=d();return(!S||typeof S.range!="function")&&(S=t(E[0],E[E.length-1],S??10)),S?d(WI(E,S)):c},c.copy=function(){return jy(c,m1(i,t,e,r,n,s,o,a,l,h))},c}function rM(){return zy.apply(m1(QI,qI,pr,Pd,Vl,ko,Md,Ad,Is,p1).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Oo(i,t,e){this.k=i,this.x=t,this.y=e}Oo.prototype={constructor:Oo,scale:function(i){return i===1?this:new Oo(this.k*i,this.x,this.y)},translate:function(i,t){return i===0&t===0?this:new Oo(this.k,this.x+this.k*i,this.y+this.k*t)},apply:function(i){return[i[0]*this.k+this.x,i[1]*this.k+this.y]},applyX:function(i){return i*this.k+this.x},applyY:function(i){return i*this.k+this.y},invert:function(i){return[(i[0]-this.x)/this.k,(i[1]-this.y)/this.k]},invertX:function(i){return(i-this.x)/this.k},invertY:function(i){return(i-this.y)/this.k},rescaleX:function(i){return i.copy().domain(i.range().map(this.invertX,this).map(i.invert,i))},rescaleY:function(i){return i.copy().domain(i.range().map(this.invertY,this).map(i.invert,i))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},Oo.prototype;function g1(i){return i.mode==="temporal"||i.mode==="left-aligned"?nM(i):sM(i)}function nM({domain:i,range:t}){return rM().domain(i).range(t)}function sM({domain:i,range:t}){return $y().domain(i).range(t)}function kd(i){return{mode:it.horizontal,range:g3(),domain:y3(i)}}function oM(){return{mode:it.vertical}}let Ps=null;async function aM(){const i=await Zi();y1(i.start_time),tt.on("layoutSettingsUpdated",()=>y1(i.start_time))}function lM(){Ps=null}async function ri(){return Ps||await Ie("scaleCreated")}async function y1(i){await ie();const t=Ps?"scaleUpdated":"scaleCreated",e=kd(i);Ps=g1(e),tt.emit(t,Ps)}let ke=null,Fd=null;async function hM(){const i=await qt(),t=await Su();ke=new VE({screenHeight:t.clientHeight,screenWidth:t.clientWidth,events:i.renderer.events,passiveWheel:!1}),ke.zIndex=1,ke.drag().pinch().wheel({trackpadPinch:!0}).decelerate({friction:.9}).clampZoom({minWidth:t.clientWidth/2}),ke.on("moved",()=>{tt.emit("viewportMoved",null)}).on("moved-end",()=>{tt.emit("viewportMoved",null)}),i.stage.addChild(ke),tt.emit("viewportCreated",ke),tt.on("applicationResized",gM),tt.on("scaleUpdated",()=>Bo()),pM()}function cM(){ke=null,Fd=null}async function Dd({animate:i}={}){const e=(await ee()).getChildByName(Hf);if(!e)throw new Error("Nodes container not found");xM();const{x:r,y:n,width:s,height:o}=e.getLocalBounds();if(!s||!o){dM({animate:i});return}uM({x:r,y:n,width:s,height:o,animate:i})}async function uM({x:i,y:t,width:e,height:r,animate:n}){const s=await Lt(),o=await ee(),{guideTextSize:a,guideTextTopPadding:l,columnGap:h,rowGap:c,eventTargetSize:u}=s.styles,d=a+l,f=e+h*2,p=r+c*4+d+u,m=o.findFit(f,p);o.animate({position:{x:i+e/2,y:t+r/2+d},scale:Math.min(m,1),time:n?s.animationDuration:0,ease:"easeInOutQuad",removeOnInterrupt:!0,callbackOnComplete:()=>{Yl(),Bo()}})}async function dM({animate:i}){const t=await Zi(),e=await Lt(),r=await ee(),n=await ri();let s=n(t.start_time)-e.styles.columnGap,o=n(t.end_time??new Date)+e.styles.columnGap;if(s>o){const c=s;s=o,o=c}const a=o-s,l=s+a/2,h=r.findFit(a,0);r.animate({position:{x:l,y:0},scale:h,time:i?e.animationDuration:0,ease:"easeInOutQuad",removeOnInterrupt:!0,callbackOnComplete:()=>{Yl(),Bo()}})}async function ee(){return ke||await Ie("viewportCreated")}function b1(i){Sy(Fd,i)||(Fd=i,tt.emit("viewportDateRangeUpdated",i))}function fM({xOffset:i,yOffset:t}){if(!ke)return;const{x:e,y:r}=ke.transform.position;ke.setTransform(e+i,r+t,ke.transform.scale.x,ke.transform.scale.y)}async function pM(){const i=await ee();Bo(),i.on("moved",()=>Bo())}async function Bo(){const i=await x1();i&&b1(i)}async function x1(){const i=await ee(),t=await ri(),e=t.invert(i.left),r=t.invert(i.right);return e instanceof Date&&r instanceof Date?[e,r]:null}async function mM(i){const t=await x1(),e=await ie();if(i===void 0||e.isDependency()||Sy(i,t))return;const r=await ee(),n=await ri(),[s,o]=i,a=n(s),l=n(o),h=a+(l-a)/2;b1(i),r.fitWidth(l-a,!0),r.moveCenter(h,r.center.y)}async function gM(){const i=await qt(),t=await ee(),e=await Su(),r=t.screenWidth,n=t.screenHeight,s=e.clientWidth,o=e.clientHeight,a=(s-r)/2,l=(o-n)/2;t.resize(i.screen.width,i.screen.height),fM({xOffset:a,yOffset:l})}class zl{constructor(){Nf(this,"status","visible");Nf(this,"labels",new Set)}get visible(){return this.status==="visible"}get hidden(){return this.status==="hidden"}show(){if(this.status!=="visible"){for(const t of this.labels)t.visible=!0;this.status="visible"}}hide(){if(this.status!=="hidden"){for(const t of this.labels)t.visible=!1;this.status="hidden"}}toggle(t){t?this.show():this.hide()}add(t){this.labels.add(t),t.visible=this.visible}clear(){this.labels.clear()}}let Ui=null,ni=null,Xi=null,mr=null,gi=null;async function yM(){const i=await ee(),t=await qt();Ui=new dE({toggle:"renderable"}),ni=new zl,Xi=new zl,gi=new zl,mr=new zl,t.ticker.add(()=>{if(i.dirty){const e=i.scale.x>.1,r=i.scale.x>.2,n=i.scale.x>.2,s=i.scale.x>.2;gi==null||gi.toggle(e),ni==null||ni.toggle(r),Xi==null||Xi.toggle(n),mr==null||mr.toggle(s),Ui==null||Ui.cull(t.renderer.screen),i.dirty=!1}}),tt.emit("cullCreated",Ui),tt.emit("labelCullCreated",ni),tt.emit("iconCullCreated",ni),tt.emit("edgeCullCreated",gi),tt.emit("toggleCullCreated",mr)}function bM(){Ui=null,ni==null||ni.clear(),ni=null,Xi==null||Xi.clear(),Xi=null,gi==null||gi.clear(),gi=null,mr==null||mr.clear(),mr=null}async function Yl(){const i=await ee();i.dirty=!0}function xM(){Ui&&Ui.uncull()}async function _1(){return Ui||await Ie("cullCreated")}async function _M(){return gi||await Ie("edgeCullCreated")}async function v1(){return ni||await Ie("labelCullCreated")}async function w1(){return Xi||await Ie("iconCullCreated")}async function T1(){const i=await ie(),t=await Lt();function e(r,n,s){const a=i.disableAnimations||s?0:t.animationDuration/1e3;return Ty.to(r,{...n,duration:a,ease:"power1.out",onUpdate:()=>{Yl()}})}return{animate:e}}let jl=new Map;function vM(){jl=new Map}async function Uo(i,t){const e=`${i.toString()}-${JSON.stringify(t)}`;if(jl.has(e))return jl.get(e);const r=await i(...t);return jl.set(e,r),r}async function wM({size:i,stroke:t=1,radius:e=0}){const r=await qt(),n=new kr;return n.lineStyle(t,"#fff",1,0),n.drawRoundedRect(0,0,i*2,i*2,e),r.renderer.generateTexture(n,{region:new gt(0,0,i,i),resolution:10})}async function Xo(i){return await Uo(wM,[i])}var Jl=(i=>(i[i.Up=0]="Up",i[i.Down=180]="Down",i[i.Left=270]="Left",i[i.Right=90]="Right",i))(Jl||{});function S1(){const i=new Qt;async function t(e){const{rotate:r=0}=e,n={size:e.size,radius:e.radius,stroke:e.stroke},s=await Xo(n);return i.texture=s,i.anchor.set(.5,.5),i.angle=45+r,i}return{element:i,render:t}}async function TM(){const i=await qt(),t=new kr;return t.beginFill("#fff"),t.drawRect(0,0,1,1),t.endFill(),i.renderer.generateTexture(t,{wrapMode:wi.REPEAT})}async function Nd(){return await Uo(TM,[])}function Od(i,t){return Array.from({length:i},(e,r)=>t(r))}const SM=8,CM=2;async function EM(){const i=await Lt(),t=await _1(),e=await _M(),{animate:r}=await T1(),n=new Ct,{element:s,render:o}=await S1(),a=await Nd(),l=Od(20,()=>new dt),h=new sS(a,l);let c=!1;n.name=Gb,n.addChild(s),n.addChild(h),t.addAll([s,h]),e.add(n);async function u(){return await o({size:10,rotate:Jl.Right}),s.tint=i.styles.edgeColor,h.tint=i.styles.edgeColor,n}async function d(p,m){const g=f(m);c||await u();for(const[y,x]of l.entries()){const{x:b,y:v}=g[y];r(x,{x:b,y:v},!c)}r(n,{x:p.x,y:p.y},!c),r(s,{x:m.x-SM,y:m.y},!c),c=!0}function f({x:p,y:m}){const g=[],y={x:0,y:0},x={x:p-CM,y:m},b={x:C1(y.x,{source:y,target:x}),y:y.y},v={x:C1(x.x,{source:y,target:x},!0),y:x.y};for(const[w]of l.entries()){if(w===l.length-1){g[w]=x;continue}const S=IM(w,{source:y,target:x,sourceBezier:b,targetBezier:v});g[w]=S}return g}return{element:n,render:u,setPosition:d}}function C1(i,{source:t,target:e},r){const n=(e.x-t.x)/2;return i+(n>64?n:64)*(r?-1:1)}function IM(i,t){const e=i/20,{source:r,target:n,sourceBezier:s,targetBezier:o}=t,a=r.x+(s.x-r.x)*e,l=r.y+(s.y-r.y)*e,h=s.x+(o.x-s.x)*e,c=s.y+(o.y-s.y)*e,u=o.x+(n.x-o.x)*e,d=o.y+(n.y-o.y)*e,f=a+(h-a)*e,p=l+(c-l)*e,m=h+(u-h)*e,g=c+(d-c)*e,y=f+(m-f)*e,x=p+(g-p)*e;return{x:y,y:x}}async function AM({height:i,radius:t}){const e=await qt(),r=new kr;return r.beginFill("#fff"),r.drawRoundedRect(0,0,t*2,i,t),r.endFill(),e.renderer.generateTexture(r,{region:new gt(0,0,t,i),resolution:10})}async function MM(i){return await Uo(AM,[i])}function RM(){const i=new Qt,t=new Qt;async function e(r){const n=await MM(r);return i.texture=n,t.texture=n,t.anchor.x=1,t.scale.x=-1,{left:i,right:t}}return{left:i,right:t,render:e}}async function gr(){const i=await Nd();return new Qt(i)}async function Bd(){const i=new Ct,t=await gr(),{left:e,right:r,render:n}=await RM();i.addChild(t),i.addChild(e),i.addChild(r);async function s(l){const{width:h,x:c,visible:u}=a(l);return await n({height:l.height,radius:l.radius}),t.visible=u,t.width=h,t.height=l.height,t.x=c,e.visible=o(l.capLeft,l.radius),r.visible=o(l.capRight,l.radius),r.x=l.radius+h,t.tint=l.background,e.tint=l.background,r.tint=l.background,i}function o(l,h){return h===0?!1:l??!0}function a(l){const h=o(l.capLeft,l.radius),c=o(l.capRight,l.radius);let u=0;h&&(u+=l.radius),c&&(u+=l.radius);const d=Math.max(l.width-u,0),f=d>0,p=h?l.radius:0;return{width:d,visible:f,x:p}}return{element:i,render:s}}function Ud(){const i=new Ct,t=new Qt,e=new Qt,r=new Qt,n=new Qt,s=new Qt,o=new Qt,a=new Qt,l=new Qt;t.name="border-corner-top-left",e.name="border-corner-top-right",r.name="border-corner-bottom-left",n.name="border-corner-bottom-right",s.name="border-corner-left",o.name="border-corner-right",a.name="border-corner-top",l.name="border-corner-bottom",e.anchor.x=1,e.scale.x=-1,r.anchor.y=1,r.scale.y=-1,n.anchor.x=1,n.scale.x=-1,n.anchor.y=1,n.scale.y=-1,i.addChild(t),i.addChild(e),i.addChild(r),i.addChild(n),i.addChild(s),i.addChild(o),i.addChild(a),i.addChild(l);async function h(p){const{radius:m=0,color:g="#fff",stroke:y,width:x,height:b}=p,v=typeof m=="number",w={topLeft:c(v?m:m[0],x,b),topRight:c(v?m:m[1],x,b),bottomLeft:c(v?m:m[2],x,b),bottomRight:c(v?m:m[3],x,b)};return await u({width:x,height:b,stroke:y,cornerSizes:w}),await d({width:x,height:b,stroke:y,cornerSizes:w}),f(g),i}function c(p,m,g){const y=Math.min(m,g);return{size:p*2>y?y/2:p,radius:p}}async function u({width:p,height:m,stroke:g,cornerSizes:y}){const{topLeft:x,topRight:b,bottomLeft:v,bottomRight:w}=y,[S,E,I,A]=await Promise.all([Xo({...x,stroke:g}),Xo({...b,stroke:g}),Xo({...v,stroke:g}),Xo({...w,stroke:g})]);t.texture=S,e.texture=E,r.texture=A,n.texture=I,t.position.set(0,0),e.position.set(p-b.size,0),r.position.set(0,m-v.size),n.position.set(p-w.size,m-w.size)}async function d({width:p,height:m,stroke:g,cornerSizes:y}){const x=await Nd(),{topLeft:b,topRight:v,bottomLeft:w,bottomRight:S}=y;a.texture=x,s.texture=x,o.texture=x,l.texture=x,s.position.set(0,b.size),s.height=Math.max(m-b.size-w.size,0),s.width=g,o.position.set(p-g,v.size),o.height=Math.max(m-v.size-S.size,0),o.width=g,a.position.set(b.size,0),a.width=Math.max(p-b.size-v.size,0),a.height=g,l.position.set(w.size,m-g),l.width=Math.max(p-w.size-S.size,0),l.height=g}function f(p){t.tint=p,e.tint=p,r.tint=p,n.tint=p,a.tint=p,s.tint=p,o.tint=p,l.tint=p}return{element:i,render:h}}async function $l(){const i=await Lt(),t=new Ct,{element:e,render:r}=await Ud();async function n({selected:s,width:o,height:a}){if(!s)return t.removeChild(e),t;const{selectedBorderColor:l,selectedBorderWidth:h,selectedBorderOffset:c,selectedBorderRadius:u}=i.styles;return e.position.set(-c,-c),t.addChild(e),await r({stroke:h,radius:u,width:o+c*2,height:a+c*2,color:l}),t}return{element:t,render:n}}async function PM(){const i=await Lt(),t=new Ct,{element:e,render:r}=await Bd(),{element:n,render:s}=await $l();t.addChild(e),t.addChild(n);async function o({selected:a,width:l,height:h}){const{artifactBgColor:c,artifactBorderRadius:u}=i.styles,d={width:l,height:h,background:c,radius:u,capLeft:!0,capRight:!0};return await Promise.all([r(d),s({selected:a,width:l,height:h})]),t}return{element:t,render:o}}var LM=Object.defineProperty,GM=(i,t,e)=>t in i?LM(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,Wo=(i,t,e)=>(GM(i,typeof t!="symbol"?t+"":t,e),e);class kM extends Ct{constructor(t){super(),Wo(this,"_progress",0),Wo(this,"options"),Wo(this,"bgCircle",new kr),Wo(this,"fillCircle",new kr),Wo(this,"innerView",new Ct),this.options=t,this.addChild(this.innerView),this.innerView.addChild(this.bgCircle,this.fillCircle),this.addBackground(),t.value&&(this.progress=t.value)}addBackground(){const{backgroundColor:t,lineWidth:e,radius:r,backgroundAlpha:n}=this.options;let s=1;n>0&&(s=n),t===void 0&&(s=1e-6),this.bgCircle.lineStyle({width:e,color:t,alpha:s}).drawCircle(0,0,r)}set progress(t){t>100&&(t=100),t<0&&(t=0),this._progress=t;const{lineWidth:e,radius:r,fillColor:n,fillAlpha:s,cap:o}=this.options;if(t===0&&s===0){this.fillCircle.clear();return}const a=0,l=360/100*t;this.fillCircle.clear().lineStyle({width:e,color:n,cap:o,alpha:s}).arc(0,0,r,(-90+a)*Lc,(-90+a+l)*Lc)}get progress(){return this._progress}}async function FM(i={}){const t=await w1(),e=new kM({fillColor:16777215,cullAtZoomThreshold:!0,backgroundColor:0,backgroundAlpha:1,value:50,cap:"round",fillAlpha:1,lineWidth:20,radius:50,...i});i.cullAtZoomThreshold&&t.add(e);function r(n){e.progress=n.value??0;const s=(n.radius+n.lineWidth)*2;return e.width=s,e.height=s,e.position.set(s/2),e}return{element:e,render:r}}const DM=Object.freeze(Object.defineProperty({__proto__:null,Artifact:"data:image/svg+xml,%3csvg%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_11_257)'%3e%3cpath%20d='M12%2022C17.5228%2022%2022%2017.5228%2022%2012C22%206.47715%2017.5228%202%2012%202C6.47715%202%202%206.47715%202%2012C2%2017.5228%206.47715%2022%2012%2022Z'%20stroke='white'%20stroke-width='2'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M7.25%207.2C7.25%206.67533%207.67533%206.25%208.2%206.25H15.8C16.3247%206.25%2016.75%206.67533%2016.75%207.2V16.6764C16.75%2017.3826%2016.0068%2017.8419%2015.3751%2017.5261L14%2016.8385L12.4249%2017.6261C12.1574%2017.7598%2011.8426%2017.7598%2011.5751%2017.6261L10%2016.8385L8.62485%2017.5261C7.9932%2017.8419%207.25%2017.3826%207.25%2016.6764V7.2ZM8.75%207.75V15.7865L9.57515%2015.3739C9.8426%2015.2402%2010.1574%2015.2402%2010.4249%2015.3739L12%2016.1615L13.5751%2015.3739C13.8426%2015.2402%2014.1574%2015.2402%2014.4249%2015.3739L15.25%2015.7865V7.75H8.75Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M8%2010.5C8%2010.2239%208.22386%2010%208.5%2010L8.68421%2010C8.96035%2010%209.18421%2010.2239%209.18421%2010.5C9.18421%2010.7761%208.96035%2011%208.68421%2011L8.5%2011C8.22386%2011%208%2010.7761%208%2010.5ZM9.56579%2010.5C9.56579%2010.2239%209.78965%2010%2010.0658%2010L10.4342%2010C10.7104%2010%2010.9342%2010.2239%2010.9342%2010.5C10.9342%2010.7761%2010.7104%2011%2010.4342%2011L10.0658%2011C9.78965%2011%209.56579%2010.7761%209.56579%2010.5ZM11.3158%2010.5C11.3158%2010.2239%2011.5396%2010%2011.8158%2010L12.1842%2010C12.4604%2010%2012.6842%2010.2239%2012.6842%2010.5C12.6842%2010.7761%2012.4604%2011%2012.1842%2011L11.8158%2011C11.5396%2011%2011.3158%2010.7761%2011.3158%2010.5ZM13.0658%2010.5C13.0658%2010.2239%2013.2896%2010%2013.5658%2010L13.9342%2010C14.2104%2010%2014.4342%2010.2239%2014.4342%2010.5C14.4342%2010.7761%2014.2104%2011%2013.9342%2011L13.5658%2011C13.2896%2011%2013.0658%2010.7761%2013.0658%2010.5ZM14.8158%2010.5C14.8158%2010.2239%2015.0396%2010%2015.3158%2010L15.5%2010C15.7761%2010%2016%2010.2239%2016%2010.5C16%2010.7761%2015.7761%2011%2015.5%2011L15.3158%2011C15.0396%2011%2014.8158%2010.7761%2014.8158%2010.5Z'%20fill='white'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_11_257'%3e%3crect%20width='24'%20height='24'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",ArtifactImage:"data:image/svg+xml,%3csvg%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_11_236)'%3e%3cpath%20d='M12%2022C17.5228%2022%2022%2017.5228%2022%2012C22%206.47715%2017.5228%202%2012%202C6.47715%202%202%206.47715%202%2012C2%2017.5228%206.47715%2022%2012%2022Z'%20stroke='white'%20stroke-width='2'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M13.619%2012.0268C13.3824%2011.9709%2013.1335%2012.0031%2012.9188%2012.1174L3.52996%2017.1174C3.04249%2017.377%202.85776%2017.9826%203.11736%2018.47C3.37696%2018.9575%203.98258%2019.1422%204.47005%2018.8826L13.5259%2014.06L20.7699%2015.7732C21.3073%2015.9003%2021.8461%2015.5676%2021.9732%2015.0301C22.1003%2014.4927%2021.7676%2013.954%2021.2302%2013.8268L13.619%2012.0268Z'%20fill='white'/%3e%3cpath%20d='M7.68063%2011C6.85218%2011%206.18063%2010.3284%206.18063%209.5C6.18063%208.67157%206.85218%208%207.68063%208C8.50908%208%209.18063%208.67157%209.18063%209.5C9.18063%2010.3284%208.50908%2011%207.68063%2011Z'%20fill='white'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_11_236'%3e%3crect%20width='24'%20height='24'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",ArtifactMarkdown:"data:image/svg+xml,%3csvg%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_11_270)'%3e%3cpath%20d='M12%2022C17.5228%2022%2022%2017.5228%2022%2012C22%206.47715%2017.5228%202%2012%202C6.47715%202%202%206.47715%202%2012C2%2017.5228%206.47715%2022%2012%2022Z'%20stroke='white'%20stroke-width='2'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M8%2012C8%2011.4477%208.44772%2011%209%2011H15C15.5523%2011%2016%2011.4477%2016%2012C16%2012.5523%2015.5523%2013%2015%2013H9C8.44772%2013%208%2012.5523%208%2012Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M8%2016C8%2015.4477%208.44772%2015%209%2015H11C11.5523%2015%2012%2015.4477%2012%2016C12%2016.5523%2011.5523%2017%2011%2017H9C8.44772%2017%208%2016.5523%208%2016Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M8%208C8%207.44772%208.44772%207%209%207H14C14.5523%207%2015%207.44772%2015%208C15%208.55228%2014.5523%209%2014%209H9C8.44772%209%208%208.55228%208%208Z'%20fill='white'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_11_270'%3e%3crect%20width='24'%20height='24'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",ArtifactProgress:"data:image/svg+xml,%3csvg%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_11_222)'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M9.85431%201.20935C10.5491%201.07191%2011.2666%201%2012%201C12.7334%201%2013.4509%201.07191%2014.1457%201.20935L13.7576%203.17133C13.1899%203.05903%2012.6023%203%2012%203C11.3977%203%2010.8101%203.05903%2010.2424%203.17133L9.85431%201.20935ZM18.1125%202.85338C19.3116%203.65618%2020.3438%204.68839%2021.1466%205.88752L19.4847%207.00016C18.8273%206.01827%2017.9817%205.17268%2016.9998%204.51531L18.1125%202.85338ZM2.85338%205.88752C3.65618%204.68839%204.68839%203.65618%205.88752%202.85338L7.00016%204.51531C6.01827%205.17268%205.17268%206.01827%204.51531%207.00016L2.85338%205.88752ZM22.7906%209.85431C22.9281%2010.5491%2023%2011.2666%2023%2012C23%2012.7334%2022.9281%2013.4509%2022.7906%2014.1457L20.8287%2013.7576C20.941%2013.1899%2021%2012.6023%2021%2012C21%2011.3977%2020.941%2010.8101%2020.8287%2010.2424L22.7906%209.85431ZM1%2012C1%2011.2666%201.07191%2010.5491%201.20935%209.85431L3.17133%2010.2424C3.05903%2010.8101%203%2011.3977%203%2012C3%2012.6023%203.05903%2013.1899%203.17133%2013.7576L1.20935%2014.1457C1.07191%2013.4509%201%2012.7334%201%2012ZM21.1466%2018.1125C20.3438%2019.3116%2019.3116%2020.3438%2018.1125%2021.1466L16.9998%2019.4847C17.9817%2018.8273%2018.8273%2017.9817%2019.4847%2016.9998L21.1466%2018.1125ZM5.88752%2021.1466C4.68839%2020.3438%203.65618%2019.3116%202.85338%2018.1125L4.51531%2016.9998C5.17268%2017.9817%206.01827%2018.8273%207.00016%2019.4847L5.88752%2021.1466ZM12%2023C11.2666%2023%2010.5491%2022.9281%209.85431%2022.7906L10.2424%2020.8287C10.8101%2020.941%2011.3977%2021%2012%2021C12.6023%2021%2013.1899%2020.941%2013.7576%2020.8287L14.1457%2022.7906C13.4509%2022.9281%2012.7334%2023%2012%2023Z'%20fill='white'/%3e%3cpath%20d='M12%2014C10.8954%2014%2010%2013.1046%2010%2012C10%2010.8954%2010.8954%2010%2012%2010C13.1046%2010%2014%2010.8954%2014%2012C14%2013.1046%2013.1046%2014%2012%2014Z'%20fill='white'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_11_222'%3e%3crect%20width='24'%20height='24'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",ArtifactResult:"data:image/svg+xml,%3csvg%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_11_257)'%3e%3cpath%20d='M12%2022C17.5228%2022%2022%2017.5228%2022%2012C22%206.47715%2017.5228%202%2012%202C6.47715%202%202%206.47715%202%2012C2%2017.5228%206.47715%2022%2012%2022Z'%20stroke='white'%20stroke-width='2'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M7.25%207.2C7.25%206.67533%207.67533%206.25%208.2%206.25H15.8C16.3247%206.25%2016.75%206.67533%2016.75%207.2V16.6764C16.75%2017.3826%2016.0068%2017.8419%2015.3751%2017.5261L14%2016.8385L12.4249%2017.6261C12.1574%2017.7598%2011.8426%2017.7598%2011.5751%2017.6261L10%2016.8385L8.62485%2017.5261C7.9932%2017.8419%207.25%2017.3826%207.25%2016.6764V7.2ZM8.75%207.75V15.7865L9.57515%2015.3739C9.8426%2015.2402%2010.1574%2015.2402%2010.4249%2015.3739L12%2016.1615L13.5751%2015.3739C13.8426%2015.2402%2014.1574%2015.2402%2014.4249%2015.3739L15.25%2015.7865V7.75H8.75Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M8%2010.5C8%2010.2239%208.22386%2010%208.5%2010L8.68421%2010C8.96035%2010%209.18421%2010.2239%209.18421%2010.5C9.18421%2010.7761%208.96035%2011%208.68421%2011L8.5%2011C8.22386%2011%208%2010.7761%208%2010.5ZM9.56579%2010.5C9.56579%2010.2239%209.78965%2010%2010.0658%2010L10.4342%2010C10.7104%2010%2010.9342%2010.2239%2010.9342%2010.5C10.9342%2010.7761%2010.7104%2011%2010.4342%2011L10.0658%2011C9.78965%2011%209.56579%2010.7761%209.56579%2010.5ZM11.3158%2010.5C11.3158%2010.2239%2011.5396%2010%2011.8158%2010L12.1842%2010C12.4604%2010%2012.6842%2010.2239%2012.6842%2010.5C12.6842%2010.7761%2012.4604%2011%2012.1842%2011L11.8158%2011C11.5396%2011%2011.3158%2010.7761%2011.3158%2010.5ZM13.0658%2010.5C13.0658%2010.2239%2013.2896%2010%2013.5658%2010L13.9342%2010C14.2104%2010%2014.4342%2010.2239%2014.4342%2010.5C14.4342%2010.7761%2014.2104%2011%2013.9342%2011L13.5658%2011C13.2896%2011%2013.0658%2010.7761%2013.0658%2010.5ZM14.8158%2010.5C14.8158%2010.2239%2015.0396%2010%2015.3158%2010L15.5%2010C15.7761%2010%2016%2010.2239%2016%2010.5C16%2010.7761%2015.7761%2011%2015.5%2011L15.3158%2011C15.0396%2011%2014.8158%2010.7761%2014.8158%2010.5Z'%20fill='white'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_11_257'%3e%3crect%20width='24'%20height='24'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",ArtifactTable:"data:image/svg+xml,%3csvg%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_11_250)'%3e%3cpath%20d='M12%2022C17.5228%2022%2022%2017.5228%2022%2012C22%206.47715%2017.5228%202%2012%202C6.47715%202%202%206.47715%202%2012C2%2017.5228%206.47715%2022%2012%2022Z'%20stroke='white'%20stroke-width='2'/%3e%3crect%20x='7'%20y='7'%20width='4'%20height='4'%20rx='1'%20fill='white'/%3e%3crect%20x='13'%20y='7'%20width='4'%20height='4'%20rx='1'%20fill='white'/%3e%3crect%20x='13'%20y='13'%20width='4'%20height='4'%20rx='1'%20fill='white'/%3e%3crect%20x='7'%20y='13'%20width='4'%20height='4'%20rx='1'%20fill='white'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_11_250'%3e%3crect%20width='24'%20height='24'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e"},Symbol.toStringTag,{value:"Module"}));function NM(i){const t={resolution:4};return ot.from(DM[i],t)}async function OM(i){return await Uo(NM,[i])}async function BM({cullAtZoomThreshold:i=!0}={}){const t=await w1(),e=new Qt;i&&t.add(e);async function r(n){const s=await OM(n);return e.texture=s,e}return{element:e,render:r}}var UM={aqua:/#00ffff(ff)?(?!\w)|#0ff(f)?(?!\w)/gi,azure:/#f0ffff(ff)?(?!\w)/gi,beige:/#f5f5dc(ff)?(?!\w)/gi,bisque:/#ffe4c4(ff)?(?!\w)/gi,black:/#000000(ff)?(?!\w)|#000(f)?(?!\w)/gi,blue:/#0000ff(ff)?(?!\w)|#00f(f)?(?!\w)/gi,brown:/#a52a2a(ff)?(?!\w)/gi,coral:/#ff7f50(ff)?(?!\w)/gi,cornsilk:/#fff8dc(ff)?(?!\w)/gi,crimson:/#dc143c(ff)?(?!\w)/gi,cyan:/#00ffff(ff)?(?!\w)|#0ff(f)?(?!\w)/gi,darkblue:/#00008b(ff)?(?!\w)/gi,darkcyan:/#008b8b(ff)?(?!\w)/gi,darkgrey:/#a9a9a9(ff)?(?!\w)/gi,darkred:/#8b0000(ff)?(?!\w)/gi,deeppink:/#ff1493(ff)?(?!\w)/gi,dimgrey:/#696969(ff)?(?!\w)/gi,gold:/#ffd700(ff)?(?!\w)/gi,green:/#008000(ff)?(?!\w)/gi,grey:/#808080(ff)?(?!\w)/gi,honeydew:/#f0fff0(ff)?(?!\w)/gi,hotpink:/#ff69b4(ff)?(?!\w)/gi,indigo:/#4b0082(ff)?(?!\w)/gi,ivory:/#fffff0(ff)?(?!\w)/gi,khaki:/#f0e68c(ff)?(?!\w)/gi,lavender:/#e6e6fa(ff)?(?!\w)/gi,lime:/#00ff00(ff)?(?!\w)|#0f0(f)?(?!\w)/gi,linen:/#faf0e6(ff)?(?!\w)/gi,maroon:/#800000(ff)?(?!\w)/gi,moccasin:/#ffe4b5(ff)?(?!\w)/gi,navy:/#000080(ff)?(?!\w)/gi,oldlace:/#fdf5e6(ff)?(?!\w)/gi,olive:/#808000(ff)?(?!\w)/gi,orange:/#ffa500(ff)?(?!\w)/gi,orchid:/#da70d6(ff)?(?!\w)/gi,peru:/#cd853f(ff)?(?!\w)/gi,pink:/#ffc0cb(ff)?(?!\w)/gi,plum:/#dda0dd(ff)?(?!\w)/gi,purple:/#800080(ff)?(?!\w)/gi,red:/#ff0000(ff)?(?!\w)|#f00(f)?(?!\w)/gi,salmon:/#fa8072(ff)?(?!\w)/gi,seagreen:/#2e8b57(ff)?(?!\w)/gi,seashell:/#fff5ee(ff)?(?!\w)/gi,sienna:/#a0522d(ff)?(?!\w)/gi,silver:/#c0c0c0(ff)?(?!\w)/gi,skyblue:/#87ceeb(ff)?(?!\w)/gi,snow:/#fffafa(ff)?(?!\w)/gi,tan:/#d2b48c(ff)?(?!\w)/gi,teal:/#008080(ff)?(?!\w)/gi,thistle:/#d8bfd8(ff)?(?!\w)/gi,tomato:/#ff6347(ff)?(?!\w)/gi,violet:/#ee82ee(ff)?(?!\w)/gi,wheat:/#f5deb3(ff)?(?!\w)/gi,white:/#ffffff(ff)?(?!\w)|#fff(f)?(?!\w)/gi},Xd=UM,Wd={whitespace:/\s+/g,urlHexPairs:/%[\dA-F]{2}/g,quotes:/"/g};function XM(i){return i.trim().replace(Wd.whitespace," ")}function WM(i){return encodeURIComponent(i).replace(Wd.urlHexPairs,VM)}function ZM(i){return Object.keys(Xd).forEach(function(t){Xd[t].test(i)&&(i=i.replace(Xd[t],t))}),i}function VM(i){switch(i){case"%20":return" ";case"%3D":return"=";case"%3A":return":";case"%2F":return"/";default:return i.toLowerCase()}}function Zd(i){if(typeof i!="string")throw new TypeError("Expected a string, but received "+typeof i);i.charCodeAt(0)===65279&&(i=i.slice(1));var t=ZM(XM(i)).replace(Wd.quotes,"'");return"data:image/svg+xml,"+WM(t)}Zd.toSrcset=function(t){return Zd(t).replace(/ /g,"%20")};var HM=Zd,E1={},I1={};(function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"default",{enumerable:!0,get:function(){return e}});function t(r,n){return{handler:r,config:n}}t.withOptions=function(r,n=()=>({})){const s=function(o){return{__options:o,handler:r(o),config:n(o)}};return s.__isOptionsFunction=!0,s.__pluginFunction=r,s.__configFunction=n,s};const e=t})(I1),function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"default",{enumerable:!0,get:function(){return r}});const t=e(I1);function e(n){return n&&n.__esModule?n:{default:n}}const r=t.default}(E1);let Vd=E1;var Hd=(Vd.__esModule?Vd:{default:Vd}).default;const KM=Tr(Hd);var A1={},M1={};(function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"cloneDeep",{enumerable:!0,get:function(){return t}});function t(e){return Array.isArray(e)?e.map(r=>t(r)):typeof e=="object"&&e!==null?Object.fromEntries(Object.entries(e).map(([r,n])=>[r,t(n)])):e}})(M1);var zM={content:[],presets:[],darkMode:"media",theme:{accentColor:({theme:i})=>({...i("colors"),auto:"auto"}),animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0, 0, 0.2, 1) infinite",pulse:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",bounce:"bounce 1s infinite"},aria:{busy:'busy="true"',checked:'checked="true"',disabled:'disabled="true"',expanded:'expanded="true"',hidden:'hidden="true"',pressed:'pressed="true"',readonly:'readonly="true"',required:'required="true"',selected:'selected="true"'},aspectRatio:{auto:"auto",square:"1 / 1",video:"16 / 9"},backdropBlur:({theme:i})=>i("blur"),backdropBrightness:({theme:i})=>i("brightness"),backdropContrast:({theme:i})=>i("contrast"),backdropGrayscale:({theme:i})=>i("grayscale"),backdropHueRotate:({theme:i})=>i("hueRotate"),backdropInvert:({theme:i})=>i("invert"),backdropOpacity:({theme:i})=>i("opacity"),backdropSaturate:({theme:i})=>i("saturate"),backdropSepia:({theme:i})=>i("sepia"),backgroundColor:({theme:i})=>i("colors"),backgroundImage:{none:"none","gradient-to-t":"linear-gradient(to top, var(--tw-gradient-stops))","gradient-to-tr":"linear-gradient(to top right, var(--tw-gradient-stops))","gradient-to-r":"linear-gradient(to right, var(--tw-gradient-stops))","gradient-to-br":"linear-gradient(to bottom right, var(--tw-gradient-stops))","gradient-to-b":"linear-gradient(to bottom, var(--tw-gradient-stops))","gradient-to-bl":"linear-gradient(to bottom left, var(--tw-gradient-stops))","gradient-to-l":"linear-gradient(to left, var(--tw-gradient-stops))","gradient-to-tl":"linear-gradient(to top left, var(--tw-gradient-stops))"},backgroundOpacity:({theme:i})=>i("opacity"),backgroundPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{0:"0",none:"0",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},borderColor:({theme:i})=>({...i("colors"),DEFAULT:i("colors.gray.200","currentColor")}),borderOpacity:({theme:i})=>i("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},borderSpacing:({theme:i})=>({...i("spacing")}),borderWidth:{DEFAULT:"1px",0:"0px",2:"2px",4:"4px",8:"8px"},boxShadow:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",DEFAULT:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",none:"none"},boxShadowColor:({theme:i})=>i("colors"),brightness:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",200:"2"},caretColor:({theme:i})=>i("colors"),colors:({colors:i})=>({inherit:i.inherit,current:i.current,transparent:i.transparent,black:i.black,white:i.white,slate:i.slate,gray:i.gray,zinc:i.zinc,neutral:i.neutral,stone:i.stone,red:i.red,orange:i.orange,amber:i.amber,yellow:i.yellow,lime:i.lime,green:i.green,emerald:i.emerald,teal:i.teal,cyan:i.cyan,sky:i.sky,blue:i.blue,indigo:i.indigo,violet:i.violet,purple:i.purple,fuchsia:i.fuchsia,pink:i.pink,rose:i.rose}),columns:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"},container:{},content:{none:"none"},contrast:{0:"0",50:".5",75:".75",100:"1",125:"1.25",150:"1.5",200:"2"},cursor:{auto:"auto",default:"default",pointer:"pointer",wait:"wait",text:"text",move:"move",help:"help","not-allowed":"not-allowed",none:"none","context-menu":"context-menu",progress:"progress",cell:"cell",crosshair:"crosshair","vertical-text":"vertical-text",alias:"alias",copy:"copy","no-drop":"no-drop",grab:"grab",grabbing:"grabbing","all-scroll":"all-scroll","col-resize":"col-resize","row-resize":"row-resize","n-resize":"n-resize","e-resize":"e-resize","s-resize":"s-resize","w-resize":"w-resize","ne-resize":"ne-resize","nw-resize":"nw-resize","se-resize":"se-resize","sw-resize":"sw-resize","ew-resize":"ew-resize","ns-resize":"ns-resize","nesw-resize":"nesw-resize","nwse-resize":"nwse-resize","zoom-in":"zoom-in","zoom-out":"zoom-out"},divideColor:({theme:i})=>i("borderColor"),divideOpacity:({theme:i})=>i("borderOpacity"),divideWidth:({theme:i})=>i("borderWidth"),dropShadow:{sm:"0 1px 1px rgb(0 0 0 / 0.05)",DEFAULT:["0 1px 2px rgb(0 0 0 / 0.1)","0 1px 1px rgb(0 0 0 / 0.06)"],md:["0 4px 3px rgb(0 0 0 / 0.07)","0 2px 2px rgb(0 0 0 / 0.06)"],lg:["0 10px 8px rgb(0 0 0 / 0.04)","0 4px 3px rgb(0 0 0 / 0.1)"],xl:["0 20px 13px rgb(0 0 0 / 0.03)","0 8px 5px rgb(0 0 0 / 0.08)"],"2xl":"0 25px 25px rgb(0 0 0 / 0.15)",none:"0 0 #0000"},fill:({theme:i})=>({none:"none",...i("colors")}),flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:i})=>({auto:"auto",...i("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%"}),flexGrow:{0:"0",DEFAULT:"1"},flexShrink:{0:"0",DEFAULT:"1"},fontFamily:{sans:["ui-sans-serif","system-ui","sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'],serif:["ui-serif","Georgia","Cambria",'"Times New Roman"',"Times","serif"],mono:["ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"]},fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}],"4xl":["2.25rem",{lineHeight:"2.5rem"}],"5xl":["3rem",{lineHeight:"1"}],"6xl":["3.75rem",{lineHeight:"1"}],"7xl":["4.5rem",{lineHeight:"1"}],"8xl":["6rem",{lineHeight:"1"}],"9xl":["8rem",{lineHeight:"1"}]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:({theme:i})=>i("spacing"),gradientColorStops:({theme:i})=>i("colors"),gradientColorStopPositions:{"0%":"0%","5%":"5%","10%":"10%","15%":"15%","20%":"20%","25%":"25%","30%":"30%","35%":"35%","40%":"40%","45%":"45%","50%":"50%","55%":"55%","60%":"60%","65%":"65%","70%":"70%","75%":"75%","80%":"80%","85%":"85%","90%":"90%","95%":"95%","100%":"100%"},grayscale:{0:"0",DEFAULT:"100%"},gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridColumn:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridColumnEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridColumnStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridRow:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridRowEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridRowStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridTemplateColumns:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))"},gridTemplateRows:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))"},height:({theme:i})=>({auto:"auto",...i("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content"}),hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},inset:({theme:i})=>({auto:"auto",...i("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%"}),invert:{0:"0",DEFAULT:"100%"},keyframes:{spin:{to:{transform:"rotate(360deg)"}},ping:{"75%, 100%":{transform:"scale(2)",opacity:"0"}},pulse:{"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},listStyleType:{none:"none",disc:"disc",decimal:"decimal"},listStyleImage:{none:"none"},margin:({theme:i})=>({auto:"auto",...i("spacing")}),lineClamp:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6"},maxHeight:({theme:i})=>({...i("spacing"),none:"none",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content"}),maxWidth:({theme:i,breakpoints:t})=>({...i("spacing"),none:"none",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch",...t(i("screens"))}),minHeight:({theme:i})=>({...i("spacing"),full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content"}),minWidth:({theme:i})=>({...i("spacing"),full:"100%",min:"min-content",max:"max-content",fit:"fit-content"}),objectPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},opacity:{0:"0",5:"0.05",10:"0.1",15:"0.15",20:"0.2",25:"0.25",30:"0.3",35:"0.35",40:"0.4",45:"0.45",50:"0.5",55:"0.55",60:"0.6",65:"0.65",70:"0.7",75:"0.75",80:"0.8",85:"0.85",90:"0.9",95:"0.95",100:"1"},order:{first:"-9999",last:"9999",none:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12"},outlineColor:({theme:i})=>i("colors"),outlineOffset:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},outlineWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},padding:({theme:i})=>i("spacing"),placeholderColor:({theme:i})=>i("colors"),placeholderOpacity:({theme:i})=>i("opacity"),ringColor:({theme:i})=>({DEFAULT:i("colors.blue.500","#3b82f6"),...i("colors")}),ringOffsetColor:({theme:i})=>i("colors"),ringOffsetWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},ringOpacity:({theme:i})=>({DEFAULT:"0.5",...i("opacity")}),ringWidth:{DEFAULT:"3px",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},rotate:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",45:"45deg",90:"90deg",180:"180deg"},saturate:{0:"0",50:".5",100:"1",150:"1.5",200:"2"},scale:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5"},screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},scrollMargin:({theme:i})=>({...i("spacing")}),scrollPadding:({theme:i})=>i("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg"},space:({theme:i})=>({...i("spacing")}),spacing:{px:"1px",0:"0px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},stroke:({theme:i})=>({none:"none",...i("colors")}),strokeWidth:{0:"0",1:"1",2:"2"},supports:{},data:{},textColor:({theme:i})=>i("colors"),textDecorationColor:({theme:i})=>i("colors"),textDecorationThickness:{auto:"auto","from-font":"from-font",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},textIndent:({theme:i})=>({...i("spacing")}),textOpacity:({theme:i})=>i("opacity"),textUnderlineOffset:{auto:"auto",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},transformOrigin:{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"},transitionDelay:{0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},transitionDuration:{DEFAULT:"150ms",0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},transitionProperty:{none:"none",all:"all",DEFAULT:"color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",colors:"color, background-color, border-color, text-decoration-color, fill, stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4, 0, 0.2, 1)",linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},translate:({theme:i})=>({...i("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%"}),size:({theme:i})=>({auto:"auto",...i("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"}),width:({theme:i})=>({auto:"auto",...i("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",screen:"100vw",svw:"100svw",lvw:"100lvw",dvw:"100dvw",min:"min-content",max:"max-content",fit:"fit-content"}),willChange:{auto:"auto",scroll:"scroll-position",contents:"contents",transform:"transform"},zIndex:{auto:"auto",0:"0",10:"10",20:"20",30:"30",40:"40",50:"50"}},plugins:[]};(function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"default",{enumerable:!0,get:function(){return n}});const t=M1,e=r(zM);function r(s){return s&&s.__esModule?s:{default:s}}const n=(0,t.cloneDeep)(e.default.theme)})(A1);let Kd=A1;var R1=(Kd.__esModule?Kd:{default:Kd}).default;const P1=Tr(R1);var L1={},G1={},zd={exports:{}},Ot=String,k1=function(){return{isColorSupported:!1,reset:Ot,bold:Ot,dim:Ot,italic:Ot,underline:Ot,inverse:Ot,hidden:Ot,strikethrough:Ot,black:Ot,red:Ot,green:Ot,yellow:Ot,blue:Ot,magenta:Ot,cyan:Ot,white:Ot,gray:Ot,bgBlack:Ot,bgRed:Ot,bgGreen:Ot,bgYellow:Ot,bgBlue:Ot,bgMagenta:Ot,bgCyan:Ot,bgWhite:Ot}};zd.exports=k1(),zd.exports.createColors=k1;var YM=zd.exports;(function(i){Object.defineProperty(i,"__esModule",{value:!0});function t(l,h){for(var c in h)Object.defineProperty(l,c,{enumerable:!0,get:h[c]})}t(i,{dim:function(){return o},default:function(){return a}});const e=r(YM);function r(l){return l&&l.__esModule?l:{default:l}}let n=new Set;function s(l,h,c){typeof process<"u"&&process.env.JEST_WORKER_ID||c&&n.has(c)||(c&&n.add(c),console.warn(""),h.forEach(u=>console.warn(l,"-",u)))}function o(l){return e.default.dim(l)}const a={info(l,h){s(e.default.bold(e.default.cyan("info")),...Array.isArray(l)?[l]:[h,l])},warn(l,h){s(e.default.bold(e.default.yellow("warn")),...Array.isArray(l)?[l]:[h,l])},risk(l,h){s(e.default.bold(e.default.magenta("risk")),...Array.isArray(l)?[l]:[h,l])}}})(G1),function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"default",{enumerable:!0,get:function(){return n}});const t=e(G1);function e(s){return s&&s.__esModule?s:{default:s}}function r({version:s,from:o,to:a}){t.default.warn(`${o}-color-renamed`,[`As of Tailwind CSS ${s}, \`${o}\` has been renamed to \`${a}\`.`,"Update your configuration file to silence this warning."])}const n={inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519"},get lightBlue(){return r({version:"v2.2",from:"lightBlue",to:"sky"}),this.sky},get warmGray(){return r({version:"v3.0",from:"warmGray",to:"stone"}),this.stone},get trueGray(){return r({version:"v3.0",from:"trueGray",to:"neutral"}),this.neutral},get coolGray(){return r({version:"v3.0",from:"coolGray",to:"gray"}),this.gray},get blueGray(){return r({version:"v3.0",from:"blueGray",to:"slate"}),this.slate}}}(L1);let Yd=L1;var jM=(Yd.__esModule?Yd:{default:Yd}).default;const Ql=HM,JM=Hd,F1=R1,Yr=jM,[$M,{lineHeight:QM}]=F1.fontSize.base,{spacing:yr,borderWidth:D1,borderRadius:N1}=F1;JM.withOptions(function(i={strategy:void 0}){return function({addBase:t,addComponents:e,theme:r}){const n=i.strategy===void 0?["base","class"]:[i.strategy],s=[{base:["[type='text']","[type='email']","[type='url']","[type='password']","[type='number']","[type='date']","[type='datetime-local']","[type='month']","[type='search']","[type='tel']","[type='time']","[type='week']","[multiple]","textarea","select"],class:[".form-input",".form-textarea",".form-select",".form-multiselect"],styles:{appearance:"none","background-color":"#fff","border-color":r("colors.gray.500",Yr.gray[500]),"border-width":D1.DEFAULT,"border-radius":N1.none,"padding-top":yr[2],"padding-right":yr[3],"padding-bottom":yr[2],"padding-left":yr[3],"font-size":$M,"line-height":QM,"--tw-shadow":"0 0 #0000","&:focus":{outline:"2px solid transparent","outline-offset":"2px","--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":"0px","--tw-ring-offset-color":"#fff","--tw-ring-color":r("colors.blue.600",Yr.blue[600]),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)","box-shadow":"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)","border-color":r("colors.blue.600",Yr.blue[600])}}},{base:["input::placeholder","textarea::placeholder"],class:[".form-input::placeholder",".form-textarea::placeholder"],styles:{color:r("colors.gray.500",Yr.gray[500]),opacity:"1"}},{base:["::-webkit-datetime-edit-fields-wrapper"],class:[".form-input::-webkit-datetime-edit-fields-wrapper"],styles:{padding:"0"}},{base:["::-webkit-date-and-time-value"],class:[".form-input::-webkit-date-and-time-value"],styles:{"min-height":"1.5em"}},{base:["::-webkit-datetime-edit","::-webkit-datetime-edit-year-field","::-webkit-datetime-edit-month-field","::-webkit-datetime-edit-day-field","::-webkit-datetime-edit-hour-field","::-webkit-datetime-edit-minute-field","::-webkit-datetime-edit-second-field","::-webkit-datetime-edit-millisecond-field","::-webkit-datetime-edit-meridiem-field"],class:[".form-input::-webkit-datetime-edit",".form-input::-webkit-datetime-edit-year-field",".form-input::-webkit-datetime-edit-month-field",".form-input::-webkit-datetime-edit-day-field",".form-input::-webkit-datetime-edit-hour-field",".form-input::-webkit-datetime-edit-minute-field",".form-input::-webkit-datetime-edit-second-field",".form-input::-webkit-datetime-edit-millisecond-field",".form-input::-webkit-datetime-edit-meridiem-field"],styles:{"padding-top":0,"padding-bottom":0}},{base:["select"],class:[".form-select"],styles:{"background-image":`url("${Ql(`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20"><path stroke="${r("colors.gray.500",Yr.gray[500])}" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M6 8l4 4 4-4"/></svg>`)}")`,"background-position":`right ${yr[2]} center`,"background-repeat":"no-repeat","background-size":"1.5em 1.5em","padding-right":yr[10],"print-color-adjust":"exact"}},{base:["[multiple]"],class:null,styles:{"background-image":"initial","background-position":"initial","background-repeat":"unset","background-size":"initial","padding-right":yr[3],"print-color-adjust":"unset"}},{base:["[type='checkbox']","[type='radio']"],class:[".form-checkbox",".form-radio"],styles:{appearance:"none",padding:"0","print-color-adjust":"exact",display:"inline-block","vertical-align":"middle","background-origin":"border-box","user-select":"none","flex-shrink":"0",height:yr[4],width:yr[4],color:r("colors.blue.600",Yr.blue[600]),"background-color":"#fff","border-color":r("colors.gray.500",Yr.gray[500]),"border-width":D1.DEFAULT,"--tw-shadow":"0 0 #0000"}},{base:["[type='checkbox']"],class:[".form-checkbox"],styles:{"border-radius":N1.none}},{base:["[type='radio']"],class:[".form-radio"],styles:{"border-radius":"100%"}},{base:["[type='checkbox']:focus","[type='radio']:focus"],class:[".form-checkbox:focus",".form-radio:focus"],styles:{outline:"2px solid transparent","outline-offset":"2px","--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":"2px","--tw-ring-offset-color":"#fff","--tw-ring-color":r("colors.blue.600",Yr.blue[600]),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)","box-shadow":"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)"}},{base:["[type='checkbox']:checked","[type='radio']:checked"],class:[".form-checkbox:checked",".form-radio:checked"],styles:{"border-color":"transparent","background-color":"currentColor","background-size":"100% 100%","background-position":"center","background-repeat":"no-repeat"}},{base:["[type='checkbox']:checked"],class:[".form-checkbox:checked"],styles:{"background-image":`url("${Ql('<svg viewBox="0 0 16 16" fill="white" xmlns="http://www.w3.org/2000/svg"><path d="M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z"/></svg>')}")`}},{base:["[type='radio']:checked"],class:[".form-radio:checked"],styles:{"background-image":`url("${Ql('<svg viewBox="0 0 16 16" fill="white" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="8" r="3"/></svg>')}")`}},{base:["[type='checkbox']:checked:hover","[type='checkbox']:checked:focus","[type='radio']:checked:hover","[type='radio']:checked:focus"],class:[".form-checkbox:checked:hover",".form-checkbox:checked:focus",".form-radio:checked:hover",".form-radio:checked:focus"],styles:{"border-color":"transparent","background-color":"currentColor"}},{base:["[type='checkbox']:indeterminate"],class:[".form-checkbox:indeterminate"],styles:{"background-image":`url("${Ql('<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16"><path stroke="white" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 8h8"/></svg>')}")`,"border-color":"transparent","background-color":"currentColor","background-size":"100% 100%","background-position":"center","background-repeat":"no-repeat"}},{base:["[type='checkbox']:indeterminate:hover","[type='checkbox']:indeterminate:focus"],class:[".form-checkbox:indeterminate:hover",".form-checkbox:indeterminate:focus"],styles:{"border-color":"transparent","background-color":"currentColor"}},{base:["[type='file']"],class:null,styles:{background:"unset","border-color":"inherit","border-width":"0","border-radius":"0",padding:"0","font-size":"unset","line-height":"inherit"}},{base:["[type='file']:focus"],class:null,styles:{outline:["1px solid ButtonText","1px auto -webkit-focus-ring-color"]}}],o=a=>s.map(l=>l[a]===null?null:{[l[a]]:l.styles}).filter(Boolean);n.includes("base")&&t(o("base")),n.includes("class")&&e(o("class"))}});const qM=Hd;function O1(i){return Object.fromEntries(Object.entries(i).filter(([t])=>t!=="DEFAULT"))}qM(({addUtilities:i,matchUtilities:t,theme:e})=>{i({"@keyframes enter":e("keyframes.enter"),"@keyframes exit":e("keyframes.exit"),".animate-in":{animationName:"enter",animationDuration:e("animationDuration.DEFAULT"),"--tw-enter-opacity":"initial","--tw-enter-scale":"initial","--tw-enter-rotate":"initial","--tw-enter-translate-x":"initial","--tw-enter-translate-y":"initial"},".animate-out":{animationName:"exit",animationDuration:e("animationDuration.DEFAULT"),"--tw-exit-opacity":"initial","--tw-exit-scale":"initial","--tw-exit-rotate":"initial","--tw-exit-translate-x":"initial","--tw-exit-translate-y":"initial"}}),t({"fade-in":r=>({"--tw-enter-opacity":r}),"fade-out":r=>({"--tw-exit-opacity":r})},{values:e("animationOpacity")}),t({"zoom-in":r=>({"--tw-enter-scale":r}),"zoom-out":r=>({"--tw-exit-scale":r})},{values:e("animationScale")}),t({"spin-in":r=>({"--tw-enter-rotate":r}),"spin-out":r=>({"--tw-exit-rotate":r})},{values:e("animationRotate")}),t({"slide-in-from-top":r=>({"--tw-enter-translate-y":`-${r}`}),"slide-in-from-bottom":r=>({"--tw-enter-translate-y":r}),"slide-in-from-left":r=>({"--tw-enter-translate-x":`-${r}`}),"slide-in-from-right":r=>({"--tw-enter-translate-x":r}),"slide-out-to-top":r=>({"--tw-exit-translate-y":`-${r}`}),"slide-out-to-bottom":r=>({"--tw-exit-translate-y":r}),"slide-out-to-left":r=>({"--tw-exit-translate-x":`-${r}`}),"slide-out-to-right":r=>({"--tw-exit-translate-x":r})},{values:e("animationTranslate")}),t({duration:r=>({animationDuration:r})},{values:O1(e("animationDuration"))}),t({delay:r=>({animationDelay:r})},{values:e("animationDelay")}),t({ease:r=>({animationTimingFunction:r})},{values:O1(e("animationTimingFunction"))}),i({".running":{animationPlayState:"running"},".paused":{animationPlayState:"paused"}}),t({"fill-mode":r=>({animationFillMode:r})},{values:e("animationFillMode")}),t({direction:r=>({animationDirection:r})},{values:e("animationDirection")}),t({repeat:r=>({animationIterationCount:r})},{values:e("animationRepeat")})},{theme:{extend:{animationDelay:({theme:i})=>({...i("transitionDelay")}),animationDuration:({theme:i})=>({0:"0ms",...i("transitionDuration")}),animationTimingFunction:({theme:i})=>({...i("transitionTimingFunction")}),animationFillMode:{none:"none",forwards:"forwards",backwards:"backwards",both:"both"},animationDirection:{normal:"normal",reverse:"reverse",alternate:"alternate","alternate-reverse":"alternate-reverse"},animationOpacity:({theme:i})=>({DEFAULT:0,...i("opacity")}),animationTranslate:({theme:i})=>({DEFAULT:"100%",...i("translate")}),animationScale:({theme:i})=>({DEFAULT:0,...i("scale")}),animationRotate:({theme:i})=>({DEFAULT:"30deg",...i("rotate")}),animationRepeat:{0:"0",1:"1",infinite:"infinite"},keyframes:{enter:{from:{opacity:"var(--tw-enter-opacity, 1)",transform:"translate3d(var(--tw-enter-translate-x, 0), var(--tw-enter-translate-y, 0), 0) scale3d(var(--tw-enter-scale, 1), var(--tw-enter-scale, 1), var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))"}},exit:{to:{opacity:"var(--tw-exit-opacity, 1)",transform:"translate3d(var(--tw-exit-translate-x, 0), var(--tw-exit-translate-y, 0), 0) scale3d(var(--tw-exit-scale, 1), var(--tw-exit-scale, 1), var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))"}}}}}});const B1="Inter Variable",tR="Inconsolata Variable";[...P1.fontFamily.sans],[...P1.fontFamily.mono];const eR={".bg-floating":{backgroundColor:"var(--p-color-bg-floating)"},".bg-floating-sticky":{backgroundColor:"var(--p-color-bg-floating-sticky)"},".bg-code":{backgroundColor:"var(--p-color-bg-code)"},".bg-overlay":{backgroundColor:"var(--p-color-bg-overlay)"},".bg-selected":{backgroundColor:"var(--p-color-selected)"},".border-default":{borderColor:"var(--p-color-divider)"},".border-selected":{borderColor:"var(--p-color-selected)"},".text-default":{color:"var(--p-color-text-default)"},".text-subdued":{color:"var(--p-color-text-subdued)"},".text-inverse":{color:"var(--p-color-text-inverse)"},".text-link":{color:"var(--p-color-text-link)"},".text-code":{color:"var(--p-color-text-code)"},".text-invalid":{color:"var(--p-color-text-invalid)"},".text-selected":{color:"var(--p-color-text-selected)"},".caret-default":{caretColor:"var(--p-color-text-default)"}};KM(({addUtilities:i})=>i(eR));var U1={exports:{}};(function(i){(function(){function t(m,g){document.addEventListener?m.addEventListener("scroll",g,!1):m.attachEvent("scroll",g)}function e(m){document.body?m():document.addEventListener?document.addEventListener("DOMContentLoaded",function g(){document.removeEventListener("DOMContentLoaded",g),m()}):document.attachEvent("onreadystatechange",function g(){(document.readyState=="interactive"||document.readyState=="complete")&&(document.detachEvent("onreadystatechange",g),m())})}function r(m){this.g=document.createElement("div"),this.g.setAttribute("aria-hidden","true"),this.g.appendChild(document.createTextNode(m)),this.h=document.createElement("span"),this.i=document.createElement("span"),this.m=document.createElement("span"),this.j=document.createElement("span"),this.l=-1,this.h.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;",this.i.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;",this.j.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;",this.m.style.cssText="display:inline-block;width:200%;height:200%;font-size:16px;max-width:none;",this.h.appendChild(this.m),this.i.appendChild(this.j),this.g.appendChild(this.h),this.g.appendChild(this.i)}function n(m,g){m.g.style.cssText="max-width:none;min-width:20px;min-height:20px;display:inline-block;overflow:hidden;position:absolute;width:auto;margin:0;padding:0;top:-999px;white-space:nowrap;font-synthesis:none;font:"+g+";"}function s(m){var g=m.g.offsetWidth,y=g+100;return m.j.style.width=y+"px",m.i.scrollLeft=y,m.h.scrollLeft=m.h.scrollWidth+100,m.l!==g?(m.l=g,!0):!1}function o(m,g){function y(){var b=x;s(b)&&b.g.parentNode!==null&&g(b.l)}var x=m;t(m.h,y),t(m.i,y),s(m)}function a(m,g,y){g=g||{},y=y||window,this.family=m,this.style=g.style||"normal",this.weight=g.weight||"normal",this.stretch=g.stretch||"normal",this.context=y}var l=null,h=null,c=null,u=null;function d(m){return h===null&&(f(m)&&/Apple/.test(window.navigator.vendor)?(m=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))(?:\.([0-9]+))/.exec(window.navigator.userAgent),h=!!m&&603>parseInt(m[1],10)):h=!1),h}function f(m){return u===null&&(u=!!m.document.fonts),u}function p(m,g){var y=m.style,x=m.weight;if(c===null){var b=document.createElement("div");try{b.style.font="condensed 100px sans-serif"}catch{}c=b.style.font!==""}return[y,x,c?m.stretch:"","100px",g].join(" ")}a.prototype.load=function(m,g){var y=this,x=m||"BESbswy",b=0,v=g||3e3,w=new Date().getTime();return new Promise(function(S,E){if(f(y.context)&&!d(y.context)){var I=new Promise(function(L,G){function F(){new Date().getTime()-w>=v?G(Error(""+v+"ms timeout exceeded")):y.context.document.fonts.load(p(y,'"'+y.family+'"'),x).then(function(M){1<=M.length?L():setTimeout(F,25)},G)}F()}),A=new Promise(function(L,G){b=setTimeout(function(){G(Error(""+v+"ms timeout exceeded"))},v)});Promise.race([A,I]).then(function(){clearTimeout(b),S(y)},E)}else e(function(){function L(){var V;(V=W!=-1&&K!=-1||W!=-1&&H!=-1||K!=-1&&H!=-1)&&((V=W!=K&&W!=H&&K!=H)||(l===null&&(V=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent),l=!!V&&(536>parseInt(V[1],10)||parseInt(V[1],10)===536&&11>=parseInt(V[2],10))),V=l&&(W==j&&K==j&&H==j||W==B&&K==B&&H==B||W==D&&K==D&&H==D)),V=!V),V&&(k.parentNode!==null&&k.parentNode.removeChild(k),clearTimeout(b),S(y))}function G(){if(new Date().getTime()-w>=v)k.parentNode!==null&&k.parentNode.removeChild(k),E(Error(""+v+"ms timeout exceeded"));else{var V=y.context.document.hidden;(V===!0||V===void 0)&&(W=F.g.offsetWidth,K=M.g.offsetWidth,H=N.g.offsetWidth,L()),b=setTimeout(G,50)}}var F=new r(x),M=new r(x),N=new r(x),W=-1,K=-1,H=-1,j=-1,B=-1,D=-1,k=document.createElement("div");k.dir="ltr",n(F,p(y,"sans-serif")),n(M,p(y,"serif")),n(N,p(y,"monospace")),k.appendChild(F.g),k.appendChild(M.g),k.appendChild(N.g),y.context.document.body.appendChild(k),j=F.g.offsetWidth,B=M.g.offsetWidth,D=N.g.offsetWidth,G(),o(F,function(V){W=V,L()}),n(F,p(y,'"'+y.family+'",sans-serif')),o(M,function(V){K=V,L()}),n(M,p(y,'"'+y.family+'",serif')),o(N,function(V){H=V,L()}),n(N,p(y,'"'+y.family+'",monospace'))})})},i.exports=a})()})(U1);var iR=U1.exports;const rR=Tr(iR),X1={inter:{fontFamily:B1,fontSize:16,lineHeight:20,fill:16777215}},W1={resolution:4,chars:pi.ASCII},Z1="sans-serif",V1={inter:aR(X1.inter)};let jd=!1;async function nR(){const i=Object.values(X1);await Promise.all(i.map(t=>sR(t))),jd=!0,tt.emit("fontsLoaded",V1)}async function sR(i){const{fontFamily:t,...e}=i,r=new rR(t);try{await r.load()}catch(n){console.error(n),console.warn(`fonts: font ${t} failed to load, falling back to ${Z1}`),pi.from(t,{fontFamily:Z1,...e},W1);return}pi.from(t,i,W1)}function oR(){jd=!1}async function H1(){return jd?V1:await Ie("fontsLoaded")}function aR(i){const{fontFamily:t,...e}=i,r={fontName:t,...e};return n=>new GS(n,r)}async function ql({cullAtZoomThreshold:i=!0}={}){const{inter:t}=await H1(),e=await v1(),r=t("");i&&e.add(r);async function n(s){return r.text=s,await r}return{element:r,render:n}}const lR=["result","markdown","table","progress","image","unknown"],K1={markdown:"ArtifactMarkdown",table:"ArtifactTable",result:"ArtifactResult",image:"ArtifactImage",progress:"ArtifactProgress",unknown:"Artifact"},Jd=["flow-run","task-run"];function hR(i){return Jd.includes(i)}function th(i){return Jd.includes(i.kind)}function z1(i){return i.kind==="artifact"}function Y1(i){return i.kind==="artifacts"}function j1(i){return i.kind==="state"}function J1(i){return i.kind==="event"}function $1(i){return i.kind==="events"}const cR=["COMPLETED","RUNNING","SCHEDULED","PENDING","FAILED","CANCELLED","CANCELLING","CRASHED","PAUSED"];async function Q1({cullAtZoomThreshold:i}){const t=await Lt(),e=new Ct,r=new Ct,{element:n,render:s}=await BM({cullAtZoomThreshold:i}),{element:o,render:a}=await FM(),{element:l,render:h}=await ql({cullAtZoomThreshold:i}),{element:c,render:u}=await PM();let d=!1,f=null,p;r.addChild(l),e.addChild(c),e.addChild(r);async function m(v){const{selected:w,name:S,type:E}=v;return d=w??d,f=S??f,p=E,p==="progress"?r.addChild(o):r.addChild(n),v.type==="progress"?await Promise.all([y(v.data),x()]):await Promise.all([g(),x()]),await b(),e}async function g(){if(p==="progress")return n;const v=K1[p],{artifactIconSize:w,artifactIconColor:S,artifactPaddingLeft:E,artifactPaddingY:I}=t.styles,A=await s(v);return A.position={x:E,y:I},A.width=w,A.height=w,A.tint=S,A}async function y(v){const{artifactPaddingLeft:w,artifactPaddingRight:S,artifactPaddingY:E,artifactIconSize:I}=t.styles,A=20,L=(I-A*2)/2,G=a({value:v,radius:L,lineWidth:A});return f?G.position.x+=w:G.position.x+=(w+S)/2,G.position.y+=E,o}async function x(){if(!f)return l.visible=!1,l;await h(f);const{artifactPaddingLeft:v,artifactPaddingY:w,artifactTextColor:S,artifactIconSize:E,artifactContentGap:I}=t.styles,A=f?I:0,L=v+E+A,G=w;return l.tint=S,l.scale.set(.75),l.position={x:L,y:G},l.visible=!0,l}async function b(){const{artifactPaddingLeft:v,artifactPaddingRight:w,artifactPaddingY:S}=t.styles,E={selected:d,width:r.width+v+w,height:r.height+S*2};return await u(E)}return{element:e,render:m}}let zt=null,eh=!1;async function uR(){const i=await ee();i.on("click",()=>Wi(null)),i.on("drag-start",()=>{eh=!0}),i.on("drag-end",()=>{setTimeout(()=>{eh=!1})})}function dR(){zt=null,eh=!1}function Wi(i){if(!eh&&!(!i&&!zt||i&&br(i))){if(zt=i,i===null){tt.emit("itemSelected",null);return}tt.emit("itemSelected",i)}}function br(i){if(zt===null)return!1;const{kind:t}=i;switch(t){case"task-run":return th(zt)&&zt.id===i.id;case"flow-run":return th(zt)&&zt.id===i.id;case"artifact":return z1(zt)&&zt.id===i.id;case"artifacts":return Y1(zt)&&zt.ids.length===i.ids.length&&zt.ids.every(r=>i.ids.includes(r));case"state":return j1(zt)&&zt.id===i.id;case"event":return J1(zt)&&zt.id===i.id;case"events":return $1(zt)&&zt.ids.length===i.ids.length&&zt.ids.every(r=>i.ids.includes(r));default:const e=t;throw new Error(`switch does not have case for value: ${e}`)}}function fR(){return zt&&th(zt)?zt:null}async function $d(i,{cullAtZoomThreshold:t=!0,enableLocalClickHandling:e=!1}={}){const{element:r,render:n}=await Q1({cullAtZoomThreshold:t});let s=!1,o=i;r.eventMode="static",r.cursor="pointer",e&&r.on("click",u=>{u.stopPropagation(),Wi({kind:"artifact",id:o.id})}),tt.on("itemSelected",()=>{const u=br({kind:"artifact",id:o.id});u!==s&&(s=u,a(o))});async function a(u){o=u,await n({selected:s,name:o.key,...o})}function l(){return s}function h(){return o.created}function c(){return o.id}return{isArtifact:!0,element:r,render:a,getSelected:l,getDate:h,getId:c}}function q1(i){return i.isArtifact===!0}async function tb(i,t){const e=await Zi(),r=await Lt();let n,s=null;async function o(){try{s=await r.fetchEvents(Y.toValue(i)),t(s)}catch(l){console.error(l)}e.end_time||(n=setTimeout(()=>o(),r.fetchEventsInterval))}function a(){clearTimeout(n)}return{start:o,stop:a}}async function pR(){const i=await Lt(),t=await v1(),e=new Ct,{element:r,render:n}=await S1(),{element:s,render:o}=await Bd(),{element:a,render:l}=await Ud();t.add(e);let h=!1;e.eventMode="static",e.cursor="pointer",e.addChild(s),e.addChild(r),e.addChild(a),e.on("mouseover",u),e.on("mouseout",d);async function c({inside:f,isOpen:p}){h=f;const m={size:10,stroke:2,rotate:p?Jl.Up:Jl.Down},g=await n(m),y={width:i.styles.nodeToggleSize,height:i.styles.nodeToggleSize,background:i.styles.nodeToggleBgColor,radius:i.styles.nodeToggleBorderRadius},x=await o(y);x.alpha=f?0:.5;const b=await l({width:y.width,height:y.height,radius:y.radius,stroke:1,color:i.styles.nodeToggleBorderColor});b.alpha=f?0:1;const v={y:x.height/2,x:x.width/2},w=m.size/4;return g.x=v.x,g.y=p?v.y+w:v.y-w,e}function u(){s.alpha=h?.5:1}function d(){s.alpha=h?0:.5}return{element:e,render:c}}async function eb(){const i=await Lt(),t=await ie(),e=new Ct,{element:r,render:n}=await Bd(),{element:s,render:o}=await $l();e.addChild(r),e.addChild(s);async function a(h){const{background:c="#fff"}=i.styles.node(h),{nodeHeight:u,nodeRadius:d}=i.styles,f=br({kind:h.kind,id:h.id}),p=l(h,d),m=h.state_type!=="RUNNING"||t.isDependency();return await Promise.all([n({width:p,height:u,radius:d,background:c,capRight:m}),o({selected:f,width:p,height:u})]),r}function l(h,c){const u=qd();if(it.isTemporal()||it.isLeftAligned()){const d=h.start_time,f=h.end_time??new Date,m=Kf(f,d)/ua*u;return Math.max(m,c*2)}return u}return{element:e,render:a}}var ib="Expected a function",rb=NaN,mR="[object Symbol]",gR=/^\s+|\s+$/g,yR=/^[-+]0x[0-9a-f]+$/i,bR=/^0b[01]+$/i,xR=/^0o[0-7]+$/i,_R=parseInt,vR=typeof we=="object"&&we&&we.Object===Object&&we,wR=typeof self=="object"&&self&&self.Object===Object&&self,TR=vR||wR||Function("return this")(),SR=Object.prototype,CR=SR.toString,ER=Math.max,IR=Math.min,Qd=function(){return TR.Date.now()};function AR(i,t,e){var r,n,s,o,a,l,h=0,c=!1,u=!1,d=!0;if(typeof i!="function")throw new TypeError(ib);t=nb(t)||0,ih(e)&&(c=!!e.leading,u="maxWait"in e,s=u?ER(nb(e.maxWait)||0,t):s,d="trailing"in e?!!e.trailing:d);function f(S){var E=r,I=n;return r=n=void 0,h=S,o=i.apply(I,E),o}function p(S){return h=S,a=setTimeout(y,t),c?f(S):o}function m(S){var E=S-l,I=S-h,A=t-E;return u?IR(A,s-I):A}function g(S){var E=S-l,I=S-h;return l===void 0||E>=t||E<0||u&&I>=s}function y(){var S=Qd();if(g(S))return x(S);a=setTimeout(y,m(S))}function x(S){return a=void 0,d&&r?f(S):(r=n=void 0,o)}function b(){a!==void 0&&clearTimeout(a),h=0,r=l=n=a=void 0}function v(){return a===void 0?o:x(Qd())}function w(){var S=Qd(),E=g(S);if(r=arguments,n=this,l=S,E){if(a===void 0)return p(l);if(u)return a=setTimeout(y,t),f(l)}return a===void 0&&(a=setTimeout(y,t)),o}return w.cancel=b,w.flush=v,w}function MR(i,t,e){var r=!0,n=!0;if(typeof i!="function")throw new TypeError(ib);return ih(e)&&(r="leading"in e?!!e.leading:r,n="trailing"in e?!!e.trailing:n),AR(i,t,{leading:r,maxWait:t,trailing:n})}function ih(i){var t=typeof i;return!!i&&(t=="object"||t=="function")}function RR(i){return!!i&&typeof i=="object"}function PR(i){return typeof i=="symbol"||RR(i)&&CR.call(i)==mR}function nb(i){if(typeof i=="number")return i;if(PR(i))return rb;if(ih(i)){var t=typeof i.valueOf=="function"?i.valueOf():i;i=ih(t)?t+"":t}if(typeof i!="string")return i===0?i:+i;i=i.replace(gR,"");var e=bR.test(i);return e||xR.test(i)?_R(i.slice(2),e?2:8):yR.test(i)?rb:+i}var LR=MR;const sb=Tr(LR);async function ob(){const{element:i,render:t}=await Q1({cullAtZoomThreshold:!1});let e=null,r=[],n=!1;i.eventMode="static",i.cursor="pointer",tt.on("itemSelected",()=>{const h=br({kind:"artifacts",ids:r});h!==n&&e&&(n=h,s({ids:r,date:e}))});async function s(h){if(!h){e=null,r=[],i.visible=!1;return}const{ids:c,date:u}=h;e=u,r=c,await t({selected:n,type:"unknown",name:c.length.toString()}),i.visible=!0}function o(){return n}function a(){return e}function l(){return r}return{isArtifactCluster:!0,element:i,render:s,getSelected:o,getDate:a,getIds:l,isCluster:!0}}async function GR(){const i=await qt(),t=await Zi(),e=await ie(),{element:r,render:n,update:s}=await _b({isRoot:!0});r.zIndex=4;function o(a){if(it.isTemporal()&&!e.disableArtifacts){i.stage.addChild(r),n(a==null?void 0:a.artifacts);return}i.stage.removeChild(r)}t.artifacts&&o(t),tt.on("viewportMoved",()=>s()),tt.on("runDataCreated",a=>o(a)),tt.on("runDataUpdated",a=>o(a)),tt.on("configUpdated",()=>o()),tt.on("layoutSettingsUpdated",()=>o())}function gP(){}async function kR({radius:i}){const t=await qt(),e=new kr;return e.beginFill("#fff"),e.drawCircle(0,0,i),e.endFill(),t.renderer.generateTexture(e,{resolution:10})}async function FR(i){return await Uo(kR,[i])}async function ab(i){const t=await FR(i);return new Qt(t)}async function lb(i){const t=new Ct,e=await Lt(),r=await gr(),n=await ab({radius:e.styles.eventRadiusDefault}),{element:s,render:o}=await $l();let a=!1;t.addChild(r),t.addChild(n),t.addChild(s),t.eventMode="static",t.cursor="pointer",t.on("mouseenter",()=>{a||n.scale.set(1.5)}),t.on("mouseleave",()=>{a||n.scale.set(1)}),tt.on("itemSelected",()=>{const u=br({kind:"event",id:i.id,occurred:i.occurred});u!==a&&(a=u,n.scale.set(u?1.5:1),l())});function l(){const{eventColor:u,eventTargetSize:d,eventSelectedBorderInset:f}=e.styles;r.alpha=0,r.width=d,r.height=d,n.tint=u,n.anchor.set(.5),n.position.set(d/2,d/2),s.position.set(f,f),o({selected:a,width:d-f*2,height:d-f*2})}function h(){return i.id}function c(){return i.occurred}return{element:t,render:l,getId:h,getDate:c}}async function hb(){const i=new Ct,t=await Lt(),e=await gr(),r=await ab({radius:t.styles.eventClusterRadiusDefault}),{element:n,render:s}=await $l(),{element:o,render:a}=await ql({cullAtZoomThreshold:!1});let l=null,h=[],c=!1;i.addChild(e),i.addChild(r),i.addChild(o),i.addChild(n),i.eventMode="static",i.cursor="pointer",i.on("mouseenter",()=>{c||r.scale.set(1.5)}),i.on("mouseleave",()=>{c||r.scale.set(1)}),tt.on("itemSelected",()=>{const x=br({kind:"events",occurred:l,ids:h});x!==c&&(c=x,r.scale.set(x?1.5:1),l&&u({ids:h,date:l}))});async function u(x){if(!x){l=null,h=[],i.visible=!1;return}const{ids:b,date:v}=x;l=v,h=b,d(),f(),m(),await p(b.length.toString()),i.visible=!0}function d(){const{eventTargetSize:x}=t.styles;e.alpha=0,e.width=x,e.height=x}function f(){const{eventClusterColor:x,eventTargetSize:b}=t.styles;r.tint=x,r.anchor.set(.5),r.position.set(b/2,b/2)}async function p(x){if(h.length<2)return;const{eventTargetSize:b}=t.styles,v=-1;o.scale.set(.6),o.anchor.set(.5),o.position.set(b/2,b/2+v),await a(x)}function m(){const{eventSelectedBorderInset:x,eventTargetSize:b}=t.styles;n.position.set(x,x),s({selected:c,width:b-x*2,height:b-x*2})}function g(){return h}function y(){return l}return{element:i,render:u,getIds:g,getDate:y}}function jr(i){return"getIds"in i}async function cb({items:i,createCluster:t}){const e=[...i.values()].sort((o,a)=>o.element.x-a.element.x);async function r(o){let a,l=null,h=null;for(let c=o??0;c<e.length;c++){const u=e[c],d=u.element.x;if(u.element.visible=!0,l!==null&&a&&d<a){h=c;break}l=c,a=d+u.element.width}if(h!==null&&l!==null){const c=e[l],u=e[h];c.element.visible=!1,u.element.visible=!1;const d=await n(c,u);d&&(e.splice(l,1,d),e.splice(h,1)),r(l)}}async function n(o,a){const l=o.getDate(),h=a.getDate(),c=jr(o)?o.getIds():[o.getId()],u=jr(a)?a.getIds():[a.getId()];if(!l||!h)return console.error("flowRunArtifacts: visible item is missing date"),null;let d;jr(o)?d=o:jr(a)?d=a:d=await t();const f=[...c,...u],p=s(f);return await d.render({ids:f,date:p}),d}function s(o){const a=o.reduce((c,u)=>{const d=i.get(u),f=d==null?void 0:d.getDate();return f&&c.push(f.getTime()),c},[]),l=Math.min(...a),h=Math.max(...a);return new Date((l+h)/2)}await r()}async function ub(i){const t=await qt(),e=await ee(),r=await Lt(),n=await ie();let s=await ri();const o=await l();o.element.on("click",c=>{c.stopPropagation();const{element:u}=o,d={x:u.position.x,y:u.position.y,width:u.width,height:u.height},f=jr(o)?{kind:"events",ids:o.getIds(),occurred:o.getDate(),position:d}:{kind:"event",id:o.getId(),occurred:o.getDate(),position:d};Wi(f)}),tt.on("scaleUpdated",c=>{s=c,h()}),tt.on("viewportMoved",()=>h());async function a(c){await o.render(c),h()}async function l(){return i.type==="event"?await lb(i.event):await hb()}function h(){const c=o.getDate();if(!c||n.disableEvents||!it.isTemporal())return;const{element:u}=o,f=s(c)*e.scale._x+e.worldTransform.tx-u.width/2,p=t.screen.height-u.height-r.styles.eventBottomMargin;u.position.set(f,p)}return{...o,render:a}}async function db(i){const t=await ee(),e=await ie();let r=await ri();const n=await o();n.element.on("click",l=>{l.stopPropagation();const{element:h}=n,c=h.getGlobalPosition(),u={x:c.x,y:c.y,width:h.width*t.scale.x,height:h.height*t.scale.y},d=jr(n)?{kind:"events",ids:n.getIds(),occurred:n.getDate(),position:u}:{kind:"event",id:n.getId(),occurred:n.getDate(),position:u};Wi(d)}),tt.on("scaleUpdated",l=>{r=l,a()});async function s(l){await n.render(l),a()}async function o(){return i.type==="event"?await lb(i.event):await hb()}function a(){const l=n.getDate(),{parentStartDate:h}=i;if(!l||e.disableEvents||!it.isTemporal()||!h)return;const{element:c}=n,d=r(l)-r(h)-c.width/2,f=-c.height;c.position.set(d,f)}return{...n,render:s}}async function fb({isRoot:i,parentStartDate:t}={}){const e=await ie(),r=new Map,n=new Map,s=[];let o=[];const a=new Ct;let l=null;tt.on("scaleUpdated",()=>u());async function h(p){if(p&&(l=p),!l)return;const m=[];for(const g of l)m.push(c(g));await Promise.all(m),u()}async function c(p){if(r.has(p.id))return r.get(p.id).render();if(n.has(p.id))return await n.get(p.id);const m=(async()=>{const g=i?await ub({type:"event",event:p}):await db({type:"event",event:p,parentStartDate:t});r.set(p.id,g),a.addChild(g.element)})();return n.set(p.id,m),await m,n.delete(p.id),r.get(p.id).render()}function u(){e.disableEvents||!it.isTemporal()||d()}const d=sb(async()=>{o=[...s],await cb({items:r,createCluster:f});for(const p of o)p.render()},250);async function f(){if(o.length>0)return o.pop();const p=i?await ub({type:"cluster"}):await db({type:"cluster",parentStartDate:t});return a.addChild(p.element),s.push(p),p}return{element:a,render:h,update:u}}let Zo=null,Ls=null;async function DR(){const i=await qt(),t=await Lt(),e=await ie(),r=await Zi(),{element:n,render:s,update:o}=await fb({isRoot:!0});n.zIndex=2;async function a(h){if(!it.isTemporal()||e.disableEvents){i.stage.removeChild(n);return}i.stage.addChild(n),await s(h)}const l=await tb(()=>({nodeId:t.runId,since:r.start_time,until:r.end_time??new Date}),h=>{const c=Ls?"eventDataUpdated":"eventDataCreated";Ls=h,tt.emit(c,Ls),a(h)});tt.on("configUpdated",()=>a()),tt.on("viewportMoved",()=>o()),tt.on("layoutSettingsUpdated",()=>a()),Zo=l.stop,l.start()}function NR(){Zo==null||Zo(),Zo=null,Ls=null}async function OR(){return Ls||await Ie("eventDataCreated")}async function BR(i){const t=await qt(),e=await ee(),r=await Lt(),n=await Zi();let s=await ri();const o=new Ct,a=await gr(),l=await gr();let h=null,c=!1,u=!1;t.stage.addChild(l),o.addChild(a),a.eventMode="static",a.cursor="pointer",a.on("mouseover",()=>{c=!0,d()}),a.on("mouseleave",()=>{c=!1,d()}),a.on("click",()=>{const b={x:a.position.x,y:a.position.y,width:a.width,height:a.height};Wi({...i,kind:"state",position:b})}),tt.on("viewportMoved",()=>d()),tt.on("scaleUpdated",b=>{s=b,d()}),tt.on("itemSelected",()=>{const b=br({kind:"state",...i});b!==u&&(u=b,c=!1,d())}),i.type==="RUNNING"&&!n.end_time&&g();function d(b){const{end:v}=b??{};if(v&&(h=v),n.end_time&&y(),!it.isTemporal()){l.visible=!1,o.visible=!1;return}const w=f();p(w),m(w),l.visible=!0,o.visible=!0}function f(){const{background:b="#fff"}=r.styles.state(i),v=Math.max(s(i.timestamp)*e.scale._x+e.worldTransform.tx,0);let w=0;return i.type==="RUNNING"&&!n.end_time?w=s(new Date)*e.scale._x+e.worldTransform.tx-v:h?w=s(h)*e.scale._x+e.worldTransform.tx-v:w=t.screen.width-v,{x:v,width:Math.max(w,0),background:b}}function p({x:b,width:v,background:w}){const{flowStateBarHeight:S,flowStateSelectedBarHeight:E}=r.styles,I=c||u?E:S;a.x=b,a.y=t.screen.height-I,a.width=v,a.height=I,a.tint=w}function m({x:b,width:v,background:w}){if(i.type==="RUNNING"){l.visible=!1;return}const{flowStateBarHeight:S,flowStateAreaAlpha:E}=r.styles;l.x=b,l.y=0,l.width=v,l.height=t.screen.height-S,l.tint=w,l.alpha=E}function g(){t.ticker.add(x)}function y(){t.ticker.remove(x)}function x(){d()}return{element:o,render:d}}function UR(i){return"isNodesFlowRunStateFactory"in i}async function XR(i){const t=await qt(),e=await ee(),r=await Lt(),n=await Zi();let s=await ri();const o=new Ct,a=await gr(),l=await gr();let h=null,c=null,u=0,d=0,f=!1,p=!1;o.visible=!1,o.addChild(l),o.addChild(a),a.eventMode="static",a.cursor="pointer",a.on("mouseover",()=>{f=!0,m()}),a.on("mouseleave",()=>{f=!1,m()}),a.on("click",S=>{S.stopPropagation();const E=a.getGlobalPosition(),I={x:E.x,y:E.y,width:a.width*e.scale.x,height:a.height*e.scale.y};Wi({...i,kind:"state",position:I})}),l.eventMode="none",l.cursor="default",tt.on("scaleUpdated",S=>{s=S,m()}),tt.on("itemSelected",()=>{const S=br({kind:"state",...i});S!==p&&(p=S,f=!1,m())}),i.type==="RUNNING"&&!n.end_time&&b();function m(S){const{end:E,parentStartDate:I,width:A,height:L}=S??{};if(E&&(h=E),I&&(c=I),A&&(u=A),L&&(d=L),n.end_time&&v(),!it.isTemporal()){o.visible=!1;return}if(!c||u<=0){o.visible=!1;return}const G=g();if(G.width<=0){o.visible=!1;return}y(G),x(G),o.visible=!0}function g(){const{background:S="#fff"}=r.styles.state(i);if(!c)return{x:0,width:0,background:S};const E=s(c);let I=s(i.timestamp)-E;if(I>=u)return{x:u,width:0,background:S};I<0&&(I=0);let A=s(h??new Date)-E;A>u&&(A=u);const L=Math.max(A-I,0);return{x:I,width:L,background:S}}function y({x:S,width:E,background:I}){const{flowStateBarHeight:A,flowStateSelectedBarHeight:L}=r.styles,G=f||p?L:A;a.x=S,a.y=d-G,a.width=E,a.height=G,a.tint=I}function x({x:S,width:E,background:I}){const{flowStateBarHeight:A,flowStateAreaAlpha:L,nodeHeight:G}=r.styles,F=G/2;l.x=S,l.y=F,l.width=E,l.height=d-A-F,l.tint=I,l.alpha=L}function b(){t.ticker.add(w)}function v(){t.ticker.remove(w)}function w(){m()}return{element:o,render:m,isNodesFlowRunStateFactory:!0}}function pb({isRoot:i}={}){const t=new Ct,e=new Map,r=new Map;let n=null;async function s(a,l){if(a&&(n=a),!n)return;const h=[];for(let c=0;c<n.length;c++)h.push(o(n[c],c,l));await Promise.all(h)}async function o(a,l,h){const c=n&&n.length>=l+1&&n[l+1],u=c?c.timestamp:void 0;let d;if(r.has(a.id)&&await r.get(a.id),e.has(a.id))d=e.get(a.id);else{const f=(async()=>{const p=i?await BR(a):await XR(a);e.set(a.id,p),t.addChild(p.element)})();r.set(a.id,f),await f,r.delete(a.id),d=e.get(a.id)}UR(d)?await d.render({end:u,...h}):await d.render(u?{end:u}:void 0)}return{element:t,render:s}}async function WR(){const i=await qt(),t=await Zi(),{element:e,render:r}=await pb({isRoot:!0});e.zIndex=3,i.stage.addChild(e);function n(s){r(s==null?void 0:s.states)}t.states&&n(t),tt.on("runDataUpdated",s=>n(s)),tt.on("configUpdated",()=>n()),tt.on("layoutSettingsUpdated",()=>n())}function yP(){}async function ZR(){const i=await qt(),t=await ee(),e=await ie(),r=await Lt(),{inter:n}=await H1(),s=new Ct,o=await gr();s.addChild(o);const a=n("");s.addChild(a);let l=await ri(),h,c;tt.on("scaleUpdated",m=>{l=m,p()}),tt.on("viewportMoved",()=>{e.disableGuides||(p(),s.height!==i.screen.height&&d())});function u(m,g){h=m,c=g,d(),f(m)}function d(){o.width=r.styles.guideLineWidth,o.height=i.screen.height,o.tint=r.styles.guideLineColor}function f(m){a.text=c(m),a.fontSize=r.styles.guideTextSize,a.tint=r.styles.guideTextColor,a.position.set(r.styles.guideTextLeftPadding,r.styles.guideTextTopPadding)}function p(){h!==void 0&&(s.position.x=l(h)*t.scale._x+t.worldTransform.tx)}return{element:s,render:u}}class mb extends Error{constructor(){super("Layout is not temporal")}}function VR(i){return i.toLocaleTimeString()}function gb(i){const t=navigator.language;return new Intl.DateTimeFormat(t,{timeStyle:"short"}).format(i)}function HR(i){const t=navigator.language;return new Intl.DateTimeFormat(t,{dateStyle:"short"}).format(i)}function KR(i){return i.getHours()===0&&i.getMinutes()===0?`${rh.date(i)}
1176
- ${gb(i)}`:gb(i)}const rh={timeBySeconds:VR,timeByMinutesWithDates:KR,date:HR},oe={seconds:"seconds",minutes:"minutes",date:"date"},Vo={day:i=>{const t=new Date(i.getTime());return t.setHours(0,0,0,0),t.getTime()},week:i=>{const t=new Date(i.getTime());return t.setHours(0,0,0,0),t.setDate(i.getDate()-i.getDay()+1),t.getTime()}},At={second:1e3,minute:1e3*60,hour:1e3*60*60,day:1e3*60*60*24,week:1e3*60*60*24*7},yb=[{ceiling:At.second*4,increment:At.second,labelFormat:oe.seconds},{ceiling:At.second*8,increment:At.second*5,labelFormat:oe.seconds},{ceiling:At.second*13,increment:At.second*10,labelFormat:oe.seconds},{ceiling:At.second*20,increment:At.second*15,labelFormat:oe.seconds},{ceiling:At.second*45,increment:At.second*30,labelFormat:oe.seconds},{ceiling:At.minute*4,increment:At.minute,labelFormat:oe.minutes},{ceiling:At.minute*8,increment:At.minute*5,labelFormat:oe.minutes},{ceiling:At.minute*13,increment:At.minute*10,labelFormat:oe.minutes},{ceiling:At.minute*28,increment:At.minute*15,labelFormat:oe.minutes},{ceiling:At.hour*1.24,increment:At.minute*30,labelFormat:oe.minutes},{ceiling:At.hour*3,increment:At.hour,labelFormat:oe.minutes},{ceiling:At.hour*8,increment:At.hour*2,getAnchor:Vo.day,labelFormat:oe.minutes},{ceiling:At.hour*13,increment:At.hour*6,getAnchor:Vo.day,labelFormat:oe.minutes},{ceiling:At.hour*22,increment:At.hour*12,getAnchor:Vo.day,labelFormat:oe.minutes},{ceiling:At.day*4,increment:At.day,getAnchor:Vo.day,labelFormat:oe.date},{ceiling:At.week*2,increment:At.week,getAnchor:Vo.week,labelFormat:oe.date},{ceiling:1/0,increment:At.week*4,labelFormat:oe.date}],zR=300;async function YR(){const i=await ee(),t=await ie(),e=new Ct,r=new Map;let n=await ri();tt.on("scaleUpdated",d=>n=d),await o();function s(){if(e.visible=!t.disableGuides,!t.disableGuides)try{const{anchor:d,increment:f,labelFormat:p}=a(),m=u(d,f);c(m,p)}catch(d){if(d instanceof mb)return;console.error(d)}}async function o(){const d=[];Od(30,async f=>{const p=ZR();d.push(p);const m=await p;e.addChild(m.element),r.set(f,m)}),await Promise.all(d)}function a(){const d=i.left-zR,f=n.invert(d),p=n.invert(d+260/i.scale.x);if(!(f instanceof Date)||!(p instanceof Date))throw new mb;const m=p.getTime()-f.getTime(),{increment:g,getAnchor:y,labelFormat:x}=l(m);return{anchor:y(f),increment:g,labelFormat:h(x)}}function l(d){const f=yb.find(p=>p.ceiling>d)??yb[0];return f.getAnchor||(f.getAnchor=p=>Math.floor(p.getTime()/f.increment)*f.increment),f}function h(d){switch(d){case oe.minutes:return rh.timeByMinutesWithDates;case oe.date:return rh.date;default:return rh.timeBySeconds}}function c(d,f){const p=new Map(r.entries()),m=Array.from(p.keys()).filter(g=>!d.includes(g));r.clear();for(const g of d){if(p.has(g)){const x=p.get(g);r.set(g,x),x.render(new Date(g),f);continue}const y=p.get(m.pop()??-1);if(y===void 0){console.warn("Guides: No unused guides available to render.");continue}y.render(new Date(g),f),r.set(g,y)}}function u(d,f){return Od(30,p=>d+f*p)}return{element:e,render:s}}async function jR(){const i=await qt(),{element:t,render:e}=await YR();i.stage.addChild(t),e(),tt.on("viewportDateRangeUpdated",()=>e()),tt.on("layoutSettingsUpdated",()=>e()),tt.on("configUpdated",()=>e())}function bP(){}const JR=80;async function $R(){const i=await qt(),t=await ee(),e=await ie(),r=await Lt(),n=await gr();let s=await ri();tt.on("scaleUpdated",l=>s=l);function o(){if(!e.isTemporal()){n.visible=!1;return}n.width=r.styles.playheadWidth,n.height=i.stage.height,n.tint=r.styles.playheadColor,n.position.x=s(new Date)*t.scale.x+t.worldTransform.tx,a()}function a(){if(t.moving||!(n.position.x>0&&n.position.x<i.screen.width)||!(n.position.x>i.screen.width-JR))return;const c=t.left;t.zoomPercent(-.1,!0),t.left=c}return{element:n,render:o}}async function QR(){const i=await qt(),t=await Zi(),{element:e,render:r}=await $R();t.end_time||(i.stage.addChild(e),i.ticker.add(r)),tt.on("runDataUpdated",({end_time:n})=>{n&&(i.ticker.remove(r),i.stage.removeChild(e))})}function xP(){}function qR({stage:i,props:t}){BS(),hM(),aM(),jR(),l3(),GR(),DR(),WR(),QR(),HS(),nR(),NS(i),jS(t),yM(),p3(),uR()}function t3(){tt.clear();try{US(),cM(),lM(),OS(),h3(),NR(),JS(),KS(),oR(),bM(),m3(),dR(),vM()}catch(i){console.error(i)}}async function bb(i){const t=await qt(),e=await ee(),r=await Lt(),n=await ie(),s=await OR();let o=await ri(),a=s&&s.length>0;const l=await c();l.element.on("click",d=>{d.stopPropagation();const{element:f}=l,p=f.getGlobalPosition(),m={x:p.x,y:p.y,width:f.width,height:f.height},g=jr(l)?{kind:"artifacts",ids:l.getIds(),position:m}:{kind:"artifact",id:l.getId()};Wi(g)}),tt.on("scaleUpdated",d=>{o=d,u()}),tt.on("viewportMoved",()=>u()),tt.on("eventDataCreated",d=>{a=d.length>0,u()}),tt.on("eventDataUpdated",d=>{a=d.length>0,u()});async function h(d){if(q1(l)){if(i.type!=="artifact")throw new Error(`ArtifactFactory attempted to render a ${i.type}`);await l.render(i.artifact)}else await l.render(d);u()}async function c(){return i.type==="artifact"?await $d(i.artifact,{cullAtZoomThreshold:!1}):await ob()}function u(){const d=l.getDate();if(!d||!it.isTemporal()||n.disableArtifacts)return;const f=l.getSelected(),{element:p}=l,{eventTargetSize:m,flowStateSelectedBarHeight:g}=r.styles;let y=0;if(f){const{selectedBorderOffset:S,selectedBorderWidth:E}=r.styles;y=S+E*2}const b=o(d)*e.scale._x+e.worldTransform.tx-(p.width-y)/2,v=a&&!n.disableEvents?m:g,w=t.screen.height-(p.height-y)-v;p.position.set(b,w)}return{...l,render:h}}async function xb(i){const t=await ee(),e=await Lt(),r=await ie();let n=await ri();const s=await a();s.element.on("click",h=>{h.stopPropagation();const{element:c}=s,u=c.getGlobalPosition(),d={x:u.x,y:u.y,width:c.width*t.scale.x,height:c.height*t.scale.y},f=jr(s)?{kind:"artifacts",ids:s.getIds(),position:d}:{kind:"artifact",id:s.getId()};Wi(f)}),tt.on("scaleUpdated",h=>{n=h,l()});async function o(h){if(q1(s)){if(i.type!=="artifact")throw new Error(`ArtifactFactory attempted to render a ${i.type}`);await s.render(i.artifact)}else await s.render(h);l()}async function a(){return i.type==="artifact"?await $d(i.artifact):await ob()}function l(){const h=s.getDate(),{parentStartDate:c}=i;if(!h||!it.isTemporal()||r.disableArtifacts||!c)return;const u=s.getSelected(),{element:d}=s;let f=0;if(u){const{selectedBorderOffset:y,selectedBorderWidth:x}=e.styles;f=y+x*2}const m=n(h)-n(c)-(d.width-f)/2,g=-(d.height-f);d.position.set(m,g)}return{...s,render:o}}async function _b({isRoot:i,parentStartDate:t}={}){const e=await ie(),r=new Map,n=new Map,s=[];let o=[];const a=new Ct;let l=null;async function h(p){if(p&&(l=p),!l)return;const m=[];for(const g of l)m.push(c(g));await Promise.all(m),u()}async function c(p){if(r.has(p.id))return r.get(p.id).render(p);n.has(p.id)&&await n.get(p.id);const m=(async()=>{const g=i?await bb({type:"artifact",artifact:p}):await xb({type:"artifact",artifact:p,parentStartDate:t});r.set(p.id,g),a.addChild(g.element)})();return n.set(p.id,m),await m,n.delete(p.id),r.get(p.id).render(p)}function u(){if(!(e.disableArtifacts||!it.isTemporal())){if(!it.isTemporal()){a.visible=!1;return}a.visible=!0,a.position.x=0,d()}}const d=sb(async()=>{o=[...s],await cb({items:r,createCluster:f});for(const p of o)p.render()},250);async function f(){if(o.length>0)return o.pop();const p=i?await bb({type:"cluster"}):await xb({type:"cluster",parentStartDate:t});return a.addChild(p.element),s.push(p),p}return{element:a,render:h,update:u}}class vb extends Ct{updateTransform(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(let t=0,e=this.children.length;t<e;++t)this.children[t].updateTransform()}calculateBounds(){this._bounds.clear(),this._calculateBounds();for(const t of this.children)if(t.calculateBounds(),t._mask){const e=t._mask.isMaskData?t._mask.maskObject:t._mask;e?(e.calculateBounds(),this._bounds.addBoundsMask(t._bounds,e._bounds)):this._bounds.addBounds(t._bounds)}else t.filterArea?this._bounds.addBoundsArea(t._bounds,t.filterArea):this._bounds.addBounds(t._bounds);this._bounds.updateID=this._boundsID}}async function e3(i){const t=new vb,e=await Lt(),r=await ie(),{element:n,render:s}=await eb(),{element:o,render:a}=await ql(),{element:l,render:h}=await pR(),{element:c,render:u}=await Ud(),{element:d,render:f,getSize:p,stopWorker:m}=await Cb(),{element:g,render:y}=await pb(),{element:x,render:b,update:v}=await fb({parentStartDate:i.start_time}),{element:w,render:S,update:E}=await _b({parentStartDate:i.start_time});let I=!1,A=!1,L=i,G=!1;t.sortableChildren=!0,c.zIndex=0,n.zIndex=4,o.zIndex=5,l.zIndex=5,d.zIndex=2,x.zIndex=1,g.zIndex=2,w.zIndex=3,c.eventMode="none",c.cursor="default";const{start:F,stop:M}=await ag(L.id,Q=>{A=!!Q.artifacts&&Q.artifacts.length>0,f(Q),B(Q.states),k(Q.artifacts),j()}),{start:N,stop:W}=await tb(()=>({nodeId:L.id,since:L.start_time,until:L.end_time??new Date}),Q=>{I=Q.length>0,D(Q)});t.addChild(n),t.addChild(o),t.addChild(l),l.on("click",Q=>{Q.stopPropagation(),H()}),d.position={x:0,y:e.styles.nodeHeight+e.styles.nodesPadding},d.on("rendered",()=>{Yl(),Tt()});async function K(Q){return L=Q,await s(Q),await ft(),await at(),G&&(await B(),await D(),await k(),await j()),t}async function H(){G?await et():await V()}async function j(){const{background:Q="#fff"}=e.styles.node(L),{width:Z,height:J}=p(),{height:$}=It(),{nodeBorderRadius:O}=e.styles,pt=2;c.position={x:-pt,y:-pt};const yt=it.isTemporal()?$+pt*2:J+pt*2;await u({width:Z+pt*2,height:yt,stroke:pt,radius:[O,O,0,0],color:Q})}async function B(Q){const{height:Z}=It(),{width:J}=n;await y(Q??void 0,{parentStartDate:L.start_time,width:J,height:Z})}async function D(Q){if(!G||!it.isTemporal()||r.disableEvents){t.removeChild(x);return}t.addChild(x);const{height:Z}=It();if(x.position={x:0,y:Z-e.styles.eventBottomMargin},Q){await b(Q);return}await v()}async function k(Q){if(!G||!it.isTemporal()||r.disableArtifacts){t.removeChild(w);return}t.addChild(w);const{eventTargetSize:Z,flowStateSelectedBarHeight:J}=e.styles,{height:$}=It(),O=$-(I&&!r.disableEvents?Z:J);if(w.position={x:0,y:O},Q){await S(Q);return}await E()}async function V(){G=!0,t.addChild(g),t.addChild(d),t.addChild(c),await Promise.all([F(),N(),K(L)]),Tt()}async function et(){G=!1,t.removeChild(g),t.removeChild(d),t.removeChild(c),t.removeChild(x),t.removeChild(w),m(),await Promise.all([M(),W(),K(L)]),Tt()}async function ft(){const Q=e.styles.nodeToggleSize,Z=e.styles.nodeHeight-Q,J=n.width>Q,$=await h({inside:J,isOpen:G});return $.x=J?Z/2:n.width+e.styles.nodePadding,$.y=Z/2,$}async function at(){const Q=await a(L.label),Z=e.styles.colorMode==="dark"?e.styles.textDefault:e.styles.textInverse,J=e.styles.nodePadding,$=l.x+l.width+J,O=n.width+J,pt=n.width>$+Q.width+J,yt=e.styles.nodeHeight/2-Q.height/2,Rt=pt?$:Math.max(O,$);return Q.position={x:Rt,y:yt},Q.tint=pt?Z:e.styles.textDefault,Q}function Tt(){G&&(B(),D(),k(),j());const Q=It();t.emit("resized",Q)}function It(){const Q=p(),{nodeHeight:Z,nodesPadding:J,eventTargetSize:$,eventBottomMargin:O,artifactPaddingY:pt,artifactIconSize:yt}=e.styles,Bt=A&&it.isTemporal()&&!r.disableArtifacts?yt+pt*2:0,Ve=I&&it.isTemporal()&&!r.disableEvents?$+O:0,Ko=G?Q.height+Bt+Ve+J*2:0,$r=G?Q.width:0;return{height:Z+Ko,width:Math.max($r,t.width)}}return{kind:"flow-run",element:t,bar:n,render:K}}async function i3(){const i=await Lt(),t=new vb,{element:e,render:r}=await ql(),{element:n,render:s}=await eb();t.addChild(n),t.addChild(e);async function o(l){return await Promise.all([s(l),r(l.label)]),a(),t}function a(){const l=i.styles.colorMode==="dark"?i.styles.textDefault:i.styles.textInverse,h=i.styles.nodePadding,c=n.width>h+e.width+h,u=c?h:n.width+h,d=i.styles.nodeHeight/2-e.height/2;e.position={x:u,y:d},e.tint=c?l:i.styles.textDefault}return{kind:"task-run",element:t,render:o,bar:n}}async function r3(i){const t=await Lt(),e=await qt(),r=await _1(),n=await ie();let s=null;const o=new Map,{animate:a}=await T1(),{element:l,render:h,bar:c}=await E(i);let u=i,d=null,f=!1,p=!1;r.add(l),l.eventMode="static",l.cursor="pointer",l.name=Lb,l.on("click",L=>{L.stopPropagation(),Wi({kind:u.kind,id:u.id})}),u.end_time||v(),tt.on("itemSelected",()=>{const L=br({kind:u.kind,id:u.id});L!==f&&(f=L,h(u))});async function m(L){u=L;const G=I(L);return G===d||(d=G,await Promise.all([h(L),g(L.artifacts)]),L.end_time&&w()),l}async function g(L){if(!L||(x(),n.disableArtifacts||!it.isTemporal()))return;const G=[];for(const F of L)G.push(y(F));await Promise.all(G),b()}async function y(L){if(o.has(L.id))return o.get(L.id).render(L);const G=await $d(L,{enableLocalClickHandling:!0});return o.set(L.id,G),s.addChild(G.element),G.render(L)}function x(){if(it.isTemporal()&&!n.disableArtifacts){s||(s=new Ct),l.addChild(s);return}s&&l.removeChild(s)}function b(){if(!s)return;const{artifactsGap:L,artifactsNodeOverlap:G}=t.styles;let F=0;for(const M of o.values())M.element.position.x=F,F+=M.element.width+L;s.position.y=-s.height+G,s.width<c.width&&(s.position.x=c.width-s.width)}function v(){e.ticker.add(S)}function w(){e.ticker.remove(S)}function S(){m(u)}async function E(L){const{kind:G}=L;switch(G){case"task-run":return await i3();case"flow-run":return await e3(L);default:const F=G;throw new Error(`switch does not have case for value: ${F}`)}}function I(L){var N;const G=L.end_time??new Date,F=(N=L.artifacts)==null?void 0:N.map(W=>W.type==="progress"?`${W.id}-${W.data}`:W.id).join("|");return[L.state_type,G.getTime(),it.horizontal,it.horizontalScaleMultiplier,t.styles.colorMode,n.disableArtifacts||F].join("-")}function A({x:L,y:G}){a(l,{x:L,y:G},!p),p=!0}return{element:l,render:m,bar:c,setPosition:A}}function wb({gap:i=0,minimum:t=0}={}){const e=new Map;function r(c){const u=e.get(c)??[];return Math.max(...u.values(),Y.toValue(t))+Y.toValue(i)}function n(c){let u=0;for(let d=0;d<c;d++)u+=r(d);return u}function s(c){return n(c+1)-Y.toValue(i)}function o({axis:c,nodeId:u,offset:d}){const f=e.get(c)??new Map;f.set(u,d),e.set(c,f)}function a({axis:c,nodeId:u}){let d,f;for(const[p,m]of e.entries())if(m.has(u)){d=p,f=m.get(u);break}d===c||d===void 0||f===void 0||(l({axis:d,nodeId:u}),o({axis:c,nodeId:u,offset:f}))}function l({axis:c,nodeId:u}){var d;(d=e.get(c))==null||d.delete(u)}function h(){e.clear()}return{getOffset:r,getTotalOffset:n,getTotalValue:s,setOffset:o,updateNodeAxis:a,removeOffset:l,clear:h}}function n3(i){throw new Error(`switch does not have case for value: ${i}`)}const Tb="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Z1bmN0aW9uIEtlKG4pe3Rocm93IG5ldyBFcnJvcihgc3dpdGNoIGRvZXMgbm90IGhhdmUgY2FzZSBmb3IgdmFsdWU6ICR7bn1gKX1mdW5jdGlvbiBDbihuLGUpe3JldHVybiBuPT1udWxsfHxlPT1udWxsP05hTjpuPGU/LTE6bj5lPzE6bj49ZT8wOk5hTn1mdW5jdGlvbiBudChuLGUpe3JldHVybiBuPT1udWxsfHxlPT1udWxsP05hTjplPG4/LTE6ZT5uPzE6ZT49bj8wOk5hTn1mdW5jdGlvbiBSbihuKXtsZXQgZSx0LHI7bi5sZW5ndGghPT0yPyhlPUNuLHQ9KHUsbCk9PkNuKG4odSksbCkscj0odSxsKT0+bih1KS1sKTooZT1uPT09Q258fG49PT1udD9uOmV0LHQ9bixyPW4pO2Z1bmN0aW9uIG8odSxsLGY9MCxnPXUubGVuZ3RoKXtpZihmPGcpe2lmKGUobCxsKSE9PTApcmV0dXJuIGc7ZG97Y29uc3QgbT1mK2c+Pj4xO3QodVttXSxsKTwwP2Y9bSsxOmc9bX13aGlsZShmPGcpfXJldHVybiBmfWZ1bmN0aW9uIGkodSxsLGY9MCxnPXUubGVuZ3RoKXtpZihmPGcpe2lmKGUobCxsKSE9PTApcmV0dXJuIGc7ZG97Y29uc3QgbT1mK2c+Pj4xO3QodVttXSxsKTw9MD9mPW0rMTpnPW19d2hpbGUoZjxnKX1yZXR1cm4gZn1mdW5jdGlvbiBhKHUsbCxmPTAsZz11Lmxlbmd0a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WVzc2FnZT1VbztmdW5jdGlvbiBVbyh7ZGF0YTpufSl7Y29uc3R7dHlwZTplfT1uO3N3aXRjaChlKXtjYXNlImxheW91dCI6a28obik7cmV0dXJuO2RlZmF1bHQ6S2UoZSl9fWZ1bmN0aW9uIERvKG4pe3Bvc3RNZXNzYWdlKG4pfWFzeW5jIGZ1bmN0aW9uIGtvKG4pe2NvbnN0e2RhdGE6ZX09bix0PXBvKG4pLHI9YXdhaXQgVG8obix0KSxvPW5ldyBNYXA7bGV0IGk9MCxhPTA7Zm9yKGNvbnN0W3UsbF1vZiBlLm5vZGVzKXtjb25zdCBmPXQuZ2V0KHUpLGc9ci5nZXQodSk7aWYoZj09PXZvaWQgMCl7Y29uc29sZS53YXJuKGBOb2RlSWQgbm90IGZvdW5kIGluIGhvcml6b250YWwgbGF5b3V0OiBTa2lwcGluZyAke2wubGFiZWx9YCk7Y29udGludWV9aWYoZz09PXZvaWQgMCl7Y29uc29sZS53YXJuKGBOb2RlSWQgbm90IGZvdW5kIGluIHZlcnRpY2FsIGxheW91dDogU2tpcHBpbmcgJHtsLmxhYmVsfWApO2NvbnRpbnVlfWk9TWF0aC5tYXgoaSxnKSxhPU1hdGgubWF4KGEsZi5jb2x1bW4pLG8uc2V0KHUsey4uLmYseTpnLHJvdzpnfSl9RG8oe3R5cGU6ImxheW91dCIsbGF5b3V0OnttYXhSb3c6aSxtYXhDb2x1bW46YSxwb3NpdGlvbnM6b319KX19KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1ydW5HcmFwaC53b3JrZXItQzRjMjBKZ3UuanMubWFwCg==",s3=i=>Uint8Array.from(atob(i),t=>t.charCodeAt(0)),Sb=typeof window<"u"&&window.Blob&&new Blob([s3(Tb)],{type:"text/javascript;charset=utf-8"});function o3(i){let t;try{if(t=Sb&&(window.URL||window.webkitURL).createObjectURL(Sb),!t)throw"";const e=new Worker(t,{name:i==null?void 0:i.name});return e.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(t)}),e}catch{return new Worker("data:text/javascript;base64,"+Tb,{name:i==null?void 0:i.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}function a3(i){const t=new o3;return t.onmessage=i,t}async function Cb(){const i=new Map,t=new Map,e=new Ct,r=new Ct,n=await Lt();let s=null;const o=wb({gap:()=>n.styles.rowGap,minimum:()=>n.styles.nodeHeight}),a=wb({gap:()=>n.styles.columnGap,minimum:()=>qd()});let l=null,h=null;e.name=Hf,tt.on("layoutUpdated",()=>{o.clear(),a.clear()}),tt.on("layoutSettingsUpdated",()=>{h&&e.parent&&c(h),M()}),tt.on("itemSelected",()=>{M()});async function c(B){u(),h=B,l=null,await Promise.all([f(B),m(B)]),y(B)}function u(){s||(s=a3(G))}function d(){s&&(s.terminate(),s=null)}async function f(B){const D=[];for(const k of B.nodes.values())D.push(p(k));await Promise.all(D)}async function p(B){const{render:D}=await v(B);return await D(B)}async function m(B){if((await ie()).disableEdges){e.removeChild(r);return}e.addChildAt(r,0);const k=[];for(const[V,{children:et}]of B.nodes)for(const{id:ft}of et)k.push(g(V,ft));await Promise.all(k)}async function g(B,D){const k=`${B}_${D}`;if(t.has(k))return;const V=await EM();t.has(k)||(t.set(k,V),r.addChild(V.element))}function y(B){if(!s)throw new Error("Layout worker not initialized");const D=new Map;for(const[k,{element:V}]of i)D.set(k,V.width);s.postMessage({type:"layout",data:B,widths:D,horizontalSettings:kd(B.start_time),verticalSettings:oM()})}function x(){if(l)for(const[B,D]of t){const[k,V]=B.split("_"),et=l.positions.get(k),ft=l.positions.get(V),at=i.get(k);if(!et||!ft){console.warn(`Could not find edge in layout: Skipping ${B}`);continue}if(!at){console.warn(`Could not find parent node in nodes: Skipping ${k}`);continue}const Tt=at.bar.width,It=S(et),Q={x:It.x+Tt,y:It.y+n.styles.nodeHeight/2},Z=S(ft),J={x:Z.x-Q.x,y:Z.y-Q.y+n.styles.nodeHeight/2};D.setPosition(Q,J)}}function b(){if(l){for(const[B,D]of i){const k=l.positions.get(B);if(!k){console.warn(`Could not find node in layout: Skipping ${B}`);continue}const V=S(k);D.setPosition(V),o.updateNodeAxis({nodeId:B,axis:k.y}),a.updateNodeAxis({nodeId:B,axis:k.column})}x(),e.emit("rendered"),e.emit("resized",L())}}async function v(B){const D=i.get(B.id);if(D)return D;const k=await r3(B);return k.element.on("resized",V=>w(B.id,V)),i.set(B.id,k),e.addChild(k.element),k}function w(B,D){if(!l)return;const k=i.get(B),V=l.positions.get(B);!k||!V||(o.setOffset({nodeId:B,axis:V.y,offset:D.height}),a.setOffset({nodeId:B,axis:V.column,offset:D.width}),b())}function S(B){const D=o.getTotalOffset(B.y);return{x:E(B),y:D}}function E(B){return it.isDependency()?a.getTotalOffset(B.column):B.x}function I(){return l?o.getTotalValue(l.maxRow):0}function A(){if(!l||!h)return 0;if(it.isDependency())return a.getTotalValue(l.maxColumn);const B=kd(h.start_time),D=g1(B),k=D(h.end_time??new Date),V=D(h.start_time);return k-V}function L(){return{width:A(),height:I()}}function G({data:B}){const{type:D}=B;switch(D){case"layout":F(B);return;default:n3(D)}}function F(B){l=B.layout,b()}async function M(){const B=await ie(),D=fR();if(B.disableEdges||!D||!(h!=null&&h.nodes.has(D.id))){N([]);return}const k=H(D.id);N(k)}function N(B){W(B),K(B)}function W(B){for(const[D,{element:k}]of i){if(B.length===0||B.includes(D)){k.alpha=1;continue}k.alpha=n.styles.nodeUnselectedAlpha}}function K(B){for(const[D,{element:k}]of t){const[V,et]=D.split("_");if(B.length===0||B.includes(V)&&B.includes(et)){k.alpha=1;continue}k.alpha=n.styles.nodeUnselectedAlpha}}function H(B){const D=j(B,"parents"),k=j(B,"children");return[B,...D,...k]}function j(B,D){const k=h==null?void 0:h.nodes.get(B);if(!k)return[];const V=[];for(const{id:et}of k[D])V.push(et),V.push(...j(et,D));return V}return{element:e,stopWorker:d,getSize:L,render:c}}let Ho=null,Jr=null,Bn=null;async function l3(){const i=await ee(),t=await Lt(),{element:e,render:r}=await Cb();i.addChild(e),e.alpha=0;const n=await ag(t.runId,async s=>{const o=Jr?"runDataUpdated":"runDataCreated";Jr=s,tt.emit(o,Jr),await ie(),r(s)});tt.on("configUpdated",()=>{Jr&&r(Jr)}),Bn=e,Ho=n.stop,Bn.once("rendered",()=>c3()),tt.on("layoutUpdated",()=>u3()),n.start()}function h3(){Ho==null||Ho(),Ho=null,Bn=null,Jr=null}async function Zi(){return Jr||await Ie("runDataCreated")}function c3(){Dd(),Se.shared.addOnce(()=>{Bn&&(Bn.alpha=1)})}async function u3(){if(!Bn)return;const i=await Lt();Bn.once("rendered",()=>{setTimeout(()=>{Dd({animate:!0})},i.animationDuration)})}function d3(i){let t=0;for(const[,{children:e}]of i)t+=e.length;return t}function f3({start_time:i,end_time:t,nodes:e},r,n){const s=Math.max(Ob(t??new Date,i),1),o=r.styles.nodeHeight+r.styles.rowGap;return(e.size>0?e.size*o*.5:o*4)*n/(s*20)}async function p3(){const i=await Zi(),t=await Lt(),e=await qt(),r=e.view.width/e.view.height,n=f3(i,t,r);nh(n,!0),i.nodes.size>t.disableAnimationsThreshold&&(it.disableAnimations=!0),d3(i.nodes)>t.disableEdgesThreshold&&(it.disableEdges=!0)}function m3(){it.horizontal="temporal",it.vertical="nearest-parent",it.horizontalScaleMultiplierDefault=0,it.horizontalScaleMultiplier=0,it.disableAnimations=!1,it.disableGuides=!1,it.disableEdges=!1,it.disableArtifacts=!1,it.disableEvents=!1}const it=Y.reactive({horizontal:"temporal",vertical:"nearest-parent",horizontalScaleMultiplierDefault:0,horizontalScaleMultiplier:0,disableAnimations:!1,disableGuides:!1,disableEdges:!1,disableArtifacts:!1,disableEvents:!1,isTemporal(){return this.horizontal==="temporal"},isDependency(){return this.horizontal==="dependency"},isWaterfall(){return this.vertical==="waterfall"},isNearestParent(){return this.vertical==="nearest-parent"},isLeftAligned(){return this.horizontal==="left-aligned"}});async function ie(){return tf()?it:await Ie("layoutSettingsCreated")}function qd(){return it.isDependency()?200:20*it.horizontalScaleMultiplier}function g3(){return[0,qd()]}function y3(i){if(it.isDependency())return[0,1];const t=i,e=Db(t,1);return[t,e]}function nh(i,t=!1){if(it.horizontalScaleMultiplier===i)return;const e=Gs();it.horizontalScaleMultiplier=i,t&&(it.horizontalScaleMultiplierDefault=i),e()}function b3(){nh(it.horizontalScaleMultiplierDefault)}function x3(i){if(it.horizontal===i)return;const t=Gs();it.horizontal=i,it.disableGuides=it.isDependency()||it.isLeftAligned(),t()}function _3(i){if(it.vertical===i)return;const t=Gs();it.vertical=i,t()}function v3(i){if(it.disableEdges===i)return;const t=Gs();it.disableEdges=i,t()}function w3(i){if(it.disableArtifacts===i)return;const t=Gs();it.disableArtifacts=i,t()}function T3(i){if(it.disableEvents===i)return;const t=Gs();it.disableEvents=i,t()}function Gs(){const i=tf()?"layoutSettingsUpdated":"layoutSettingsCreated",{horizontal:t,vertical:e}=it;return()=>{tf()&&tt.emit(i,it),(t!==it.horizontal||e!==it.vertical)&&tt.emit("layoutUpdated")}}function tf(){return it.horizontalScaleMultiplier!==0}function Eb(i){if(!(i instanceof HTMLElement))return!1;const t=i.tagName.toLowerCase();return["input","textarea"].includes(t)}const S3={class:"flex items-center gap-2"},C3=Y.defineComponent({__name:"RunGraphSettings",setup(i){const t=[Ji.positions.topRight,Ji.positions.bottomRight,Ji.positions.topLeft,Ji.positions.bottomLeft],e=[{label:"Temporal dependency",value:"temporal_nearest-parent"},{label:"Temporal sequence",value:"temporal_waterfall"},{label:"Dependency grid",value:"dependency_nearest-parent"},{label:"Sequential grid",value:"dependency_waterfall"},{label:"Comparative duration",value:"left-aligned_duration-sorted"}],r=Y.computed({get(){return`${it.horizontal}_${it.vertical}`},set(u){const[d,f]=u.split("_");x3(d),_3(f)}}),n=Y.computed({get(){return it.disableEdges},set(u){v3(u)}}),s=Y.computed({get(){return it.disableArtifacts},set(u){w3(u)}}),o=Y.computed({get(){return it.disableEvents},set(u){T3(u)}});function a(){const d=it.horizontalScaleMultiplier*1.25;nh(d)}function l(){const u=Math.abs(-.75),d=it.horizontalScaleMultiplier*u;nh(d)}wr.useKeyDown(["-","="],h);function h(u){if(!(Eb(u.target)||u.metaKey||u.ctrlKey))switch(u.key){case"-":l();break;case"=":a();break}}function c(){b3()}return(u,d)=>{const f=Y.resolveComponent("p-radio-group"),p=Y.resolveComponent("p-label"),m=Y.resolveComponent("p-divider"),g=Y.resolveComponent("p-checkbox"),y=Y.resolveComponent("p-overflow-menu");return Y.openBlock(),Y.createBlock(Y.unref(Ji.PPopOver),{class:"run-graph-settings","auto-close":"",placement:t},{target:Y.withCtx(({toggle:x})=>[Y.createVNode(Y.unref(Ji.PButton),{"aria-label":"Run Graph Options",icon:"CogIcon",flat:"",onClick:x},null,8,["onClick"])]),default:Y.withCtx(()=>[Y.createVNode(y,{class:"run-graph-settings__menu"},{default:Y.withCtx(()=>[Y.createVNode(p,{label:"Layout"},{default:Y.withCtx(()=>[Y.createVNode(f,{modelValue:r.value,"onUpdate:modelValue":d[0]||(d[0]=x=>r.value=x),options:e},{label:Y.withCtx(({option:x})=>[Y.createTextVNode(Y.toDisplayString(x.label),1)]),_:1},8,["modelValue"])]),_:1}),Y.unref(it).isTemporal()||Y.unref(it).isLeftAligned()?(Y.openBlock(),Y.createElementBlock(Y.Fragment,{key:0},[Y.createVNode(m),Y.createVNode(p,{label:"Scaling"},{default:Y.withCtx(()=>[Y.createElementVNode("div",S3,[Y.createVNode(Y.unref(Ji.PButton),{title:"Decrease scale (-)",small:"",icon:"MinusIcon",onClick:l}),Y.createVNode(Y.unref(Ji.PButton),{title:"Increase scale (+)",small:"",icon:"PlusIcon",onClick:a}),Y.createVNode(Y.unref(Ji.PButton),{small:"",onClick:c},{default:Y.withCtx(()=>[Y.createTextVNode(" Reset ")]),_:1})])]),_:1})],64)):Y.createCommentVNode("",!0),Y.createVNode(m),Y.createVNode(g,{modelValue:n.value,"onUpdate:modelValue":d[1]||(d[1]=x=>n.value=x),label:"Hide dependency arrows"},null,8,["modelValue"]),Y.createVNode(g,{modelValue:s.value,"onUpdate:modelValue":d[2]||(d[2]=x=>s.value=x),label:"Hide artifacts"},null,8,["modelValue"]),Y.createVNode(g,{modelValue:o.value,"onUpdate:modelValue":d[3]||(d[3]=x=>o.value=x),label:"Hide events"},null,8,["modelValue"])]),_:1})]),_:1})}}}),E3={class:"run-graph__actions"},I3=Y.defineComponent({__name:"RunGraph",props:{config:{},viewport:{},fullscreen:{type:[Boolean,null],default:null},selected:{default:null}},emits:["update:viewport","update:fullscreen","update:selected"],setup(i,{emit:t}){const e=i,r=t,n=Y.ref(),s=Y.ref(!1),o=Y.computed({get(){return e.fullscreen??s.value},set(u){s.value=u,r("update:fullscreen",u)}});Y.watch(()=>e.selected,u=>Wi(u)),tt.on("itemSelected",u=>r("update:selected",u)),Y.watch(()=>e.viewport,u=>mM(u));const a=Y.computed(()=>({root:{"run-graph--fullscreen":o.value}}));tt.on("viewportDateRangeUpdated",u=>r("update:viewport",u));function l(){Dd({animate:!0})}function h(){o.value=!o.value}Y.onMounted(()=>{if(!n.value)throw new Error("Stage does not exist");qR({stage:n.value,props:e})}),Y.onBeforeUnmount(()=>{t3()}),wr.useKeyDown(["c","f","Escape"],c);function c(u){if(!(Eb(u.target)||u.metaKey||u.ctrlKey))switch(u.key){case"c":l();break;case"f":h();break;case"Escape":o.value&&h();break}}return(u,d)=>{const f=Y.resolveComponent("p-button");return Y.openBlock(),Y.createElementBlock("div",{class:Y.normalizeClass(["run-graph",a.value.root])},[Y.createElementVNode("div",{ref_key:"stage",ref:n,class:"run-graph__stage"},null,512),Y.createElementVNode("div",E3,[Y.createVNode(f,{title:"Recenter graph (c)",icon:"Target",flat:"",onClick:l}),Y.createVNode(f,{title:"Toggle fullscreen (f)",icon:"ArrowsPointingOutIcon",flat:"",onClick:h}),Y.createVNode(C3)])],2)}}});kt.RunGraph=I3,kt.artifactTypeIconMap=K1,kt.artifactTypes=lR,kt.isArtifactSelection=z1,kt.isArtifactsSelection=Y1,kt.isEventSelection=J1,kt.isEventsSelection=$1,kt.isNodeSelection=th,kt.isRunGraphNodeType=hR,kt.isStateSelection=j1,kt.runGraphNodeKinds=Jd,kt.stateType=cR,Object.defineProperty(kt,Symbol.toStringTag,{value:"Module"})});
1175
+ */var r1,Vr,_s,id,An,n1,rd,VC=function(){return typeof window<"u"},hr={},Mn=180/Math.PI,vs=Math.PI/180,ws=Math.atan2,s1=1e8,nd=/([A-Z])/g,HC=/(left|right|width|margin|padding|x)/i,KC=/[\s,\(]\S/,Ni={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},sd=function(t,e){return e.set(e.t,e.p,Math.round((e.s+e.c*t)*1e4)/1e4+e.u,e)},zC=function(t,e){return e.set(e.t,e.p,t===1?e.e:Math.round((e.s+e.c*t)*1e4)/1e4+e.u,e)},YC=function(t,e){return e.set(e.t,e.p,t?Math.round((e.s+e.c*t)*1e4)/1e4+e.u:e.b,e)},jC=function(t,e){var r=e.s+e.c*t;e.set(e.t,e.p,~~(r+(r<0?-.5:.5))+e.u,e)},o1=function(t,e){return e.set(e.t,e.p,t?e.e:e.b,e)},a1=function(t,e){return e.set(e.t,e.p,t!==1?e.b:e.e,e)},JC=function(t,e,r){return t.style[e]=r},$C=function(t,e,r){return t.style.setProperty(e,r)},QC=function(t,e,r){return t._gsap[e]=r},qC=function(t,e,r){return t._gsap.scaleX=t._gsap.scaleY=r},tE=function(t,e,r,n,s){var o=t._gsap;o.scaleX=o.scaleY=r,o.renderTransform(s,o)},eE=function(t,e,r,n,s){var o=t._gsap;o[e]=r,o.renderTransform(s,o)},Kt="transform",Le=Kt+"Origin",iE=function i(t,e){var r=this,n=this.target,s=n.style,o=n._gsap;if(t in hr&&s){if(this.tfm=this.tfm||{},t!=="transform")t=Ni[t]||t,~t.indexOf(",")?t.split(",").forEach(function(a){return r.tfm[a]=cr(n,a)}):this.tfm[t]=o.x?o[t]:cr(n,t),t===Le&&(this.tfm.zOrigin=o.zOrigin);else return Ni.transform.split(",").forEach(function(a){return i.call(r,a,e)});if(this.props.indexOf(Kt)>=0)return;o.svg&&(this.svgo=n.getAttribute("data-svg-origin"),this.props.push(Le,e,"")),t=Kt}(s||e)&&this.props.push(t,e,s[t])},l1=function(t){t.translate&&(t.removeProperty("translate"),t.removeProperty("scale"),t.removeProperty("rotate"))},rE=function(){var t=this.props,e=this.target,r=e.style,n=e._gsap,s,o;for(s=0;s<t.length;s+=3)t[s+1]?e[t[s]]=t[s+2]:t[s+2]?r[t[s]]=t[s+2]:r.removeProperty(t[s].substr(0,2)==="--"?t[s]:t[s].replace(nd,"-$1").toLowerCase());if(this.tfm){for(o in this.tfm)n[o]=this.tfm[o];n.svg&&(n.renderTransform(),e.setAttribute("data-svg-origin",this.svgo||"")),s=rd(),(!s||!s.isStart)&&!r[Kt]&&(l1(r),n.zOrigin&&r[Le]&&(r[Le]+=" "+n.zOrigin+"px",n.zOrigin=0,n.renderTransform()),n.uncache=1)}},h1=function(t,e){var r={target:t,props:[],revert:rE,save:iE};return t._gsap||Pe.core.getCache(t),e&&e.split(",").forEach(function(n){return r.save(n)}),r},c1,od=function(t,e){var r=Vr.createElementNS?Vr.createElementNS((e||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):Vr.createElement(t);return r&&r.style?r:Vr.createElement(t)},Oi=function i(t,e,r){var n=getComputedStyle(t);return n[e]||n.getPropertyValue(e.replace(nd,"-$1").toLowerCase())||n.getPropertyValue(e)||!r&&i(t,Ts(e)||e,1)||""},u1="O,Moz,ms,Ms,Webkit".split(","),Ts=function(t,e,r){var n=e||An,s=n.style,o=5;if(t in s&&!r)return t;for(t=t.charAt(0).toUpperCase()+t.substr(1);o--&&!(u1[o]+t in s););return o<0?null:(o===3?"ms":o>=0?u1[o]:"")+t},ad=function(){VC()&&window.document&&(r1=window,Vr=r1.document,_s=Vr.documentElement,An=od("div")||{style:{}},od("div"),Kt=Ts(Kt),Le=Kt+"Origin",An.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",c1=!!Ts("perspective"),rd=Pe.core.reverting,id=1)},ld=function i(t){var e=od("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),r=this.parentNode,n=this.nextSibling,s=this.style.cssText,o;if(_s.appendChild(e),e.appendChild(this),this.style.display="block",t)try{o=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=i}catch{}else this._gsapBBox&&(o=this._gsapBBox());return r&&(n?r.insertBefore(this,n):r.appendChild(this)),_s.removeChild(e),this.style.cssText=s,o},d1=function(t,e){for(var r=e.length;r--;)if(t.hasAttribute(e[r]))return t.getAttribute(e[r])},f1=function(t){var e;try{e=t.getBBox()}catch{e=ld.call(t,!0)}return e&&(e.width||e.height)||t.getBBox===ld||(e=ld.call(t,!0)),e&&!e.width&&!e.x&&!e.y?{x:+d1(t,["x","cx","x1"])||0,y:+d1(t,["y","cy","y1"])||0,width:0,height:0}:e},p1=function(t){return!!(t.getCTM&&(!t.parentNode||t.ownerSVGElement)&&f1(t))},Rn=function(t,e){if(e){var r=t.style,n;e in hr&&e!==Le&&(e=Kt),r.removeProperty?(n=e.substr(0,2),(n==="ms"||e.substr(0,6)==="webkit")&&(e="-"+e),r.removeProperty(n==="--"?e:e.replace(nd,"-$1").toLowerCase())):r.removeAttribute(e)}},Hr=function(t,e,r,n,s,o){var a=new Re(t._pt,e,r,0,1,o?a1:o1);return t._pt=a,a.b=n,a.e=s,t._props.push(r),a},m1={deg:1,rad:1,turn:1},nE={grid:1,flex:1},Kr=function i(t,e,r,n){var s=parseFloat(r)||0,o=(r+"").trim().substr((s+"").length)||"px",a=An.style,l=HC.test(e),h=t.tagName.toLowerCase()==="svg",c=(h?"client":"offset")+(l?"Width":"Height"),u=100,d=n==="px",f=n==="%",p,m,g,y;if(n===o||!s||m1[n]||m1[o])return s;if(o!=="px"&&!d&&(s=i(t,e,r,"px")),y=t.getCTM&&p1(t),(f||o==="%")&&(hr[e]||~e.indexOf("adius")))return p=y?t.getBBox()[l?"width":"height"]:t[c],Jt(f?s/p*u:s/100*p);if(a[l?"width":"height"]=u+(d?o:n),m=~e.indexOf("adius")||n==="em"&&t.appendChild&&!h?t:t.parentNode,y&&(m=(t.ownerSVGElement||{}).parentNode),(!m||m===Vr||!m.appendChild)&&(m=Vr.body),g=m._gsap,g&&f&&g.width&&l&&g.time===Ze.time&&!g.uncache)return Jt(s/g.width*u);if(f&&(e==="height"||e==="width")){var x=t.style[e];t.style[e]=u+n,p=t[c],x?t.style[e]=x:Rn(t,e)}else(f||o==="%")&&!nE[Oi(m,"display")]&&(a.position=Oi(t,"position")),m===t&&(a.position="static"),m.appendChild(An),p=An[c],m.removeChild(An),a.position="absolute";return l&&f&&(g=wn(m),g.time=Ze.time,g.width=m[c]),Jt(d?p*s/u:p&&s?u/p*s:0)},cr=function(t,e,r,n){var s;return id||ad(),e in Ni&&e!=="transform"&&(e=Ni[e],~e.indexOf(",")&&(e=e.split(",")[0])),hr[e]&&e!=="transform"?(s=Io(t,n),s=e!=="transformOrigin"?s[e]:s.svg?s.origin:Rl(Oi(t,Le))+" "+s.zOrigin+"px"):(s=t.style[e],(!s||s==="auto"||n||~(s+"").indexOf("calc("))&&(s=Ml[e]&&Ml[e](t,e,r)||Oi(t,e)||xg(t,e)||(e==="opacity"?1:0))),r&&!~(s+"").trim().indexOf(" ")?Kr(t,e,s,r)+r:s},sE=function(t,e,r,n){if(!r||r==="none"){var s=Ts(e,t,1),o=s&&Oi(t,s,1);o&&o!==r?(e=s,r=o):e==="borderColor"&&(r=Oi(t,"borderTopColor"))}var a=new Re(this._pt,t.style,e,0,1,qg),l=0,h=0,c,u,d,f,p,m,g,y,x,b,v,w;if(a.b=r,a.e=n,r+="",n+="",n==="auto"&&(m=t.style[e],t.style[e]=n,n=Oi(t,e)||n,m?t.style[e]=m:Rn(t,e)),c=[r,n],Zg(c),r=c[0],n=c[1],d=r.match(ps)||[],w=n.match(ps)||[],w.length){for(;u=ps.exec(n);)g=u[0],x=n.substring(l,u.index),p?p=(p+1)%5:(x.substr(-5)==="rgba("||x.substr(-5)==="hsla(")&&(p=1),g!==(m=d[h++]||"")&&(f=parseFloat(m)||0,v=m.substr((f+"").length),g.charAt(1)==="="&&(g=ms(f,g)+v),y=parseFloat(g),b=g.substr((y+"").length),l=ps.lastIndex-b.length,b||(b=b||Be.units[e]||v,l===n.length&&(n+=b,a.e+=b)),v!==b&&(f=Kr(t,e,m,b)||0),a._pt={_next:a._pt,p:x||h===1?x:",",s:f,c:y-f,m:p&&p<4||e==="zIndex"?Math.round:0});a.c=l<n.length?n.substring(l,n.length):""}else a.r=e==="display"&&n==="none"?a1:o1;return dg.test(n)&&(a.e=0),this._pt=a,a},g1={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},oE=function(t){var e=t.split(" "),r=e[0],n=e[1]||"50%";return(r==="top"||r==="bottom"||n==="left"||n==="right")&&(t=r,r=n,n=t),e[0]=g1[r]||r,e[1]=g1[n]||n,e.join(" ")},aE=function(t,e){if(e.tween&&e.tween._time===e.tween._dur){var r=e.t,n=r.style,s=e.u,o=r._gsap,a,l,h;if(s==="all"||s===!0)n.cssText="",l=1;else for(s=s.split(","),h=s.length;--h>-1;)a=s[h],hr[a]&&(l=1,a=a==="transformOrigin"?Le:Kt),Rn(r,a);l&&(Rn(r,Kt),o&&(o.svg&&r.removeAttribute("transform"),Io(r,1),o.uncache=1,l1(n)))}},Ml={clearProps:function(t,e,r,n,s){if(s.data!=="isFromStart"){var o=t._pt=new Re(t._pt,e,r,0,0,aE);return o.u=n,o.pr=-10,o.tween=s,t._props.push(r),1}}},Eo=[1,0,0,1,0,0],y1={},b1=function(t){return t==="matrix(1, 0, 0, 1, 0, 0)"||t==="none"||!t},x1=function(t){var e=Oi(t,Kt);return b1(e)?Eo:e.substr(7).match(ug).map(Jt)},hd=function(t,e){var r=t._gsap||wn(t),n=t.style,s=x1(t),o,a,l,h;return r.svg&&t.getAttribute("transform")?(l=t.transform.baseVal.consolidate().matrix,s=[l.a,l.b,l.c,l.d,l.e,l.f],s.join(",")==="1,0,0,1,0,0"?Eo:s):(s===Eo&&!t.offsetParent&&t!==_s&&!r.svg&&(l=n.display,n.display="block",o=t.parentNode,(!o||!t.offsetParent)&&(h=1,a=t.nextElementSibling,_s.appendChild(t)),s=x1(t),l?n.display=l:Rn(t,"display"),h&&(a?o.insertBefore(t,a):o?o.appendChild(t):_s.removeChild(t))),e&&s.length>6?[s[0],s[1],s[4],s[5],s[12],s[13]]:s)},cd=function(t,e,r,n,s,o){var a=t._gsap,l=s||hd(t,!0),h=a.xOrigin||0,c=a.yOrigin||0,u=a.xOffset||0,d=a.yOffset||0,f=l[0],p=l[1],m=l[2],g=l[3],y=l[4],x=l[5],b=e.split(" "),v=parseFloat(b[0])||0,w=parseFloat(b[1])||0,S,E,I,A;r?l!==Eo&&(E=f*g-p*m)&&(I=v*(g/E)+w*(-m/E)+(m*x-g*y)/E,A=v*(-p/E)+w*(f/E)-(f*x-p*y)/E,v=I,w=A):(S=f1(t),v=S.x+(~b[0].indexOf("%")?v/100*S.width:v),w=S.y+(~(b[1]||b[0]).indexOf("%")?w/100*S.height:w)),n||n!==!1&&a.smooth?(y=v-h,x=w-c,a.xOffset=u+(y*f+x*m)-y,a.yOffset=d+(y*p+x*g)-x):a.xOffset=a.yOffset=0,a.xOrigin=v,a.yOrigin=w,a.smooth=!!n,a.origin=e,a.originIsAbsolute=!!r,t.style[Le]="0px 0px",o&&(Hr(o,a,"xOrigin",h,v),Hr(o,a,"yOrigin",c,w),Hr(o,a,"xOffset",u,a.xOffset),Hr(o,a,"yOffset",d,a.yOffset)),t.setAttribute("data-svg-origin",v+" "+w)},Io=function(t,e){var r=t._gsap||new zg(t);if("x"in r&&!e&&!r.uncache)return r;var n=t.style,s=r.scaleX<0,o="px",a="deg",l=getComputedStyle(t),h=Oi(t,Le)||"0",c,u,d,f,p,m,g,y,x,b,v,w,S,E,I,A,L,G,F,M,N,W,K,H,j,B,D,k,V,et,ft,at;return c=u=d=m=g=y=x=b=v=0,f=p=1,r.svg=!!(t.getCTM&&p1(t)),l.translate&&((l.translate!=="none"||l.scale!=="none"||l.rotate!=="none")&&(n[Kt]=(l.translate!=="none"?"translate3d("+(l.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(l.rotate!=="none"?"rotate("+l.rotate+") ":"")+(l.scale!=="none"?"scale("+l.scale.split(" ").join(",")+") ":"")+(l[Kt]!=="none"?l[Kt]:"")),n.scale=n.rotate=n.translate="none"),E=hd(t,r.svg),r.svg&&(r.uncache?(j=t.getBBox(),h=r.xOrigin-j.x+"px "+(r.yOrigin-j.y)+"px",H=""):H=!e&&t.getAttribute("data-svg-origin"),cd(t,H||h,!!H||r.originIsAbsolute,r.smooth!==!1,E)),w=r.xOrigin||0,S=r.yOrigin||0,E!==Eo&&(G=E[0],F=E[1],M=E[2],N=E[3],c=W=E[4],u=K=E[5],E.length===6?(f=Math.sqrt(G*G+F*F),p=Math.sqrt(N*N+M*M),m=G||F?ws(F,G)*Mn:0,x=M||N?ws(M,N)*Mn+m:0,x&&(p*=Math.abs(Math.cos(x*vs))),r.svg&&(c-=w-(w*G+S*M),u-=S-(w*F+S*N))):(at=E[6],et=E[7],D=E[8],k=E[9],V=E[10],ft=E[11],c=E[12],u=E[13],d=E[14],I=ws(at,V),g=I*Mn,I&&(A=Math.cos(-I),L=Math.sin(-I),H=W*A+D*L,j=K*A+k*L,B=at*A+V*L,D=W*-L+D*A,k=K*-L+k*A,V=at*-L+V*A,ft=et*-L+ft*A,W=H,K=j,at=B),I=ws(-M,V),y=I*Mn,I&&(A=Math.cos(-I),L=Math.sin(-I),H=G*A-D*L,j=F*A-k*L,B=M*A-V*L,ft=N*L+ft*A,G=H,F=j,M=B),I=ws(F,G),m=I*Mn,I&&(A=Math.cos(I),L=Math.sin(I),H=G*A+F*L,j=W*A+K*L,F=F*A-G*L,K=K*A-W*L,G=H,W=j),g&&Math.abs(g)+Math.abs(m)>359.9&&(g=m=0,y=180-y),f=Jt(Math.sqrt(G*G+F*F+M*M)),p=Jt(Math.sqrt(K*K+at*at)),I=ws(W,K),x=Math.abs(I)>2e-4?I*Mn:0,v=ft?1/(ft<0?-ft:ft):0),r.svg&&(H=t.getAttribute("transform"),r.forceCSS=t.setAttribute("transform","")||!b1(Oi(t,Kt)),H&&t.setAttribute("transform",H))),Math.abs(x)>90&&Math.abs(x)<270&&(s?(f*=-1,x+=m<=0?180:-180,m+=m<=0?180:-180):(p*=-1,x+=x<=0?180:-180)),e=e||r.uncache,r.x=c-((r.xPercent=c&&(!e&&r.xPercent||(Math.round(t.offsetWidth/2)===Math.round(-c)?-50:0)))?t.offsetWidth*r.xPercent/100:0)+o,r.y=u-((r.yPercent=u&&(!e&&r.yPercent||(Math.round(t.offsetHeight/2)===Math.round(-u)?-50:0)))?t.offsetHeight*r.yPercent/100:0)+o,r.z=d+o,r.scaleX=Jt(f),r.scaleY=Jt(p),r.rotation=Jt(m)+a,r.rotationX=Jt(g)+a,r.rotationY=Jt(y)+a,r.skewX=x+a,r.skewY=b+a,r.transformPerspective=v+o,(r.zOrigin=parseFloat(h.split(" ")[2])||!e&&r.zOrigin||0)&&(n[Le]=Rl(h)),r.xOffset=r.yOffset=0,r.force3D=Be.force3D,r.renderTransform=r.svg?hE:c1?_1:lE,r.uncache=0,r},Rl=function(t){return(t=t.split(" "))[0]+" "+t[1]},ud=function(t,e,r){var n=xe(e);return Jt(parseFloat(e)+parseFloat(Kr(t,"x",r+"px",n)))+n},lE=function(t,e){e.z="0px",e.rotationY=e.rotationX="0deg",e.force3D=0,_1(t,e)},Pn="0deg",Ao="0px",Ln=") ",_1=function(t,e){var r=e||this,n=r.xPercent,s=r.yPercent,o=r.x,a=r.y,l=r.z,h=r.rotation,c=r.rotationY,u=r.rotationX,d=r.skewX,f=r.skewY,p=r.scaleX,m=r.scaleY,g=r.transformPerspective,y=r.force3D,x=r.target,b=r.zOrigin,v="",w=y==="auto"&&t&&t!==1||y===!0;if(b&&(u!==Pn||c!==Pn)){var S=parseFloat(c)*vs,E=Math.sin(S),I=Math.cos(S),A;S=parseFloat(u)*vs,A=Math.cos(S),o=ud(x,o,E*A*-b),a=ud(x,a,-Math.sin(S)*-b),l=ud(x,l,I*A*-b+b)}g!==Ao&&(v+="perspective("+g+Ln),(n||s)&&(v+="translate("+n+"%, "+s+"%) "),(w||o!==Ao||a!==Ao||l!==Ao)&&(v+=l!==Ao||w?"translate3d("+o+", "+a+", "+l+") ":"translate("+o+", "+a+Ln),h!==Pn&&(v+="rotate("+h+Ln),c!==Pn&&(v+="rotateY("+c+Ln),u!==Pn&&(v+="rotateX("+u+Ln),(d!==Pn||f!==Pn)&&(v+="skew("+d+", "+f+Ln),(p!==1||m!==1)&&(v+="scale("+p+", "+m+Ln),x.style[Kt]=v||"translate(0, 0)"},hE=function(t,e){var r=e||this,n=r.xPercent,s=r.yPercent,o=r.x,a=r.y,l=r.rotation,h=r.skewX,c=r.skewY,u=r.scaleX,d=r.scaleY,f=r.target,p=r.xOrigin,m=r.yOrigin,g=r.xOffset,y=r.yOffset,x=r.forceCSS,b=parseFloat(o),v=parseFloat(a),w,S,E,I,A;l=parseFloat(l),h=parseFloat(h),c=parseFloat(c),c&&(c=parseFloat(c),h+=c,l+=c),l||h?(l*=vs,h*=vs,w=Math.cos(l)*u,S=Math.sin(l)*u,E=Math.sin(l-h)*-d,I=Math.cos(l-h)*d,h&&(c*=vs,A=Math.tan(h-c),A=Math.sqrt(1+A*A),E*=A,I*=A,c&&(A=Math.tan(c),A=Math.sqrt(1+A*A),w*=A,S*=A)),w=Jt(w),S=Jt(S),E=Jt(E),I=Jt(I)):(w=u,I=d,S=E=0),(b&&!~(o+"").indexOf("px")||v&&!~(a+"").indexOf("px"))&&(b=Kr(f,"x",o,"px"),v=Kr(f,"y",a,"px")),(p||m||g||y)&&(b=Jt(b+p-(p*w+m*E)+g),v=Jt(v+m-(p*S+m*I)+y)),(n||s)&&(A=f.getBBox(),b=Jt(b+n/100*A.width),v=Jt(v+s/100*A.height)),A="matrix("+w+","+S+","+E+","+I+","+b+","+v+")",f.setAttribute("transform",A),x&&(f.style[Kt]=A)},cE=function(t,e,r,n,s){var o=360,a=ce(s),l=parseFloat(s)*(a&&~s.indexOf("rad")?Mn:1),h=l-n,c=n+h+"deg",u,d;return a&&(u=s.split("_")[1],u==="short"&&(h%=o,h!==h%(o/2)&&(h+=h<0?o:-o)),u==="cw"&&h<0?h=(h+o*s1)%o-~~(h/o)*o:u==="ccw"&&h>0&&(h=(h-o*s1)%o-~~(h/o)*o)),t._pt=d=new Re(t._pt,e,r,n,h,zC),d.e=c,d.u="deg",t._props.push(r),d},v1=function(t,e){for(var r in e)t[r]=e[r];return t},uE=function(t,e,r){var n=v1({},r._gsap),s="perspective,force3D,transformOrigin,svgOrigin",o=r.style,a,l,h,c,u,d,f,p;n.svg?(h=r.getAttribute("transform"),r.setAttribute("transform",""),o[Kt]=e,a=Io(r,1),Rn(r,Kt),r.setAttribute("transform",h)):(h=getComputedStyle(r)[Kt],o[Kt]=e,a=Io(r,1),o[Kt]=h);for(l in hr)h=n[l],c=a[l],h!==c&&s.indexOf(l)<0&&(f=xe(h),p=xe(c),u=f!==p?Kr(r,l,h,p):parseFloat(h),d=parseFloat(c),t._pt=new Re(t._pt,a,l,u,d-u,sd),t._pt.u=p||0,t._props.push(l));v1(a,n)};Me("padding,margin,Width,Radius",function(i,t){var e="Top",r="Right",n="Bottom",s="Left",o=(t<3?[e,r,n,s]:[e+s,e+r,n+r,n+s]).map(function(a){return t<2?i+a:"border"+a+i});Ml[t>1?"border"+i:i]=function(a,l,h,c,u){var d,f;if(arguments.length<4)return d=o.map(function(p){return cr(a,p,h)}),f=d.join(" "),f.split(d[0]).length===5?d[0]:f;d=(c+"").split(" "),f={},o.forEach(function(p,m){return f[p]=d[m]=d[m]||d[(m-1)/2|0]}),a.init(l,f,u)}});var w1={name:"css",register:ad,targetTest:function(t){return t.style&&t.nodeType},init:function(t,e,r,n,s){var o=this._props,a=t.style,l=r.vars.startAt,h,c,u,d,f,p,m,g,y,x,b,v,w,S,E,I;id||ad(),this.styles=this.styles||h1(t),I=this.styles.props,this.tween=r;for(m in e)if(m!=="autoRound"&&(c=e[m],!(Xe[m]&&Yg(m,e,r,n,t,s)))){if(f=typeof c,p=Ml[m],f==="function"&&(c=c.call(r,n,t,s),f=typeof c),f==="string"&&~c.indexOf("random(")&&(c=_o(c)),p)p(this,t,m,c,r)&&(E=1);else if(m.substr(0,2)==="--")h=(getComputedStyle(t).getPropertyValue(m)+"").trim(),c+="",Wr.lastIndex=0,Wr.test(h)||(g=xe(h),y=xe(c)),y?g!==y&&(h=Kr(t,m,h,y)+y):g&&(c+=g),this.add(a,"setProperty",h,c,n,s,0,0,m),o.push(m),I.push(m,0,a[m]);else if(f!=="undefined"){if(l&&m in l?(h=typeof l[m]=="function"?l[m].call(r,n,t,s):l[m],ce(h)&&~h.indexOf("random(")&&(h=_o(h)),xe(h+"")||h==="auto"||(h+=Be.units[m]||xe(cr(t,m))||""),(h+"").charAt(1)==="="&&(h=cr(t,m))):h=cr(t,m),d=parseFloat(h),x=f==="string"&&c.charAt(1)==="="&&c.substr(0,2),x&&(c=c.substr(2)),u=parseFloat(c),m in Ni&&(m==="autoAlpha"&&(d===1&&cr(t,"visibility")==="hidden"&&u&&(d=0),I.push("visibility",0,a.visibility),Hr(this,a,"visibility",d?"inherit":"hidden",u?"inherit":"hidden",!u)),m!=="scale"&&m!=="transform"&&(m=Ni[m],~m.indexOf(",")&&(m=m.split(",")[0]))),b=m in hr,b){if(this.styles.save(m),v||(w=t._gsap,w.renderTransform&&!e.parseTransform||Io(t,e.parseTransform),S=e.smoothOrigin!==!1&&w.smooth,v=this._pt=new Re(this._pt,a,Kt,0,1,w.renderTransform,w,0,-1),v.dep=1),m==="scale")this._pt=new Re(this._pt,w,"scaleY",w.scaleY,(x?ms(w.scaleY,x+u):u)-w.scaleY||0,sd),this._pt.u=0,o.push("scaleY",m),m+="X";else if(m==="transformOrigin"){I.push(Le,0,a[Le]),c=oE(c),w.svg?cd(t,c,0,S,0,this):(y=parseFloat(c.split(" ")[2])||0,y!==w.zOrigin&&Hr(this,w,"zOrigin",w.zOrigin,y),Hr(this,a,m,Rl(h),Rl(c)));continue}else if(m==="svgOrigin"){cd(t,c,1,S,0,this);continue}else if(m in y1){cE(this,w,m,d,x?ms(d,x+c):c);continue}else if(m==="smoothOrigin"){Hr(this,w,"smooth",w.smooth,c);continue}else if(m==="force3D"){w[m]=c;continue}else if(m==="transform"){uE(this,c,t);continue}}else m in a||(m=Ts(m)||m);if(b||(u||u===0)&&(d||d===0)&&!KC.test(c)&&m in a)g=(h+"").substr((d+"").length),u||(u=0),y=xe(c)||(m in Be.units?Be.units[m]:g),g!==y&&(d=Kr(t,m,h,y)),this._pt=new Re(this._pt,b?w:a,m,d,(x?ms(d,x+u):u)-d,!b&&(y==="px"||m==="zIndex")&&e.autoRound!==!1?jC:sd),this._pt.u=y||0,g!==y&&y!=="%"&&(this._pt.b=h,this._pt.r=YC);else if(m in a)sE.call(this,t,m,h,x?x+c:c);else if(m in t)this.add(t,m,h||t[m],x?x+c:c,n,s);else if(m!=="parseTransform"){Gu(m,c);continue}b||(m in a?I.push(m,0,a[m]):I.push(m,1,h||t[m])),o.push(m)}}E&&t1(this)},render:function(t,e){if(e.tween._time||!rd())for(var r=e._pt;r;)r.r(t,r.d),r=r._next;else e.styles.revert()},get:cr,aliases:Ni,getSetter:function(t,e,r){var n=Ni[e];return n&&n.indexOf(",")<0&&(e=n),e in hr&&e!==Le&&(t._gsap.x||cr(t,"x"))?r&&n1===r?e==="scale"?qC:QC:(n1=r||{})&&(e==="scale"?tE:eE):t.style&&!Iu(t.style[e])?JC:~e.indexOf("-")?$C:$u(t,e)},core:{_removeProperty:Rn,_getMatrix:hd}};Pe.utils.checkPrefix=Ts,Pe.core.getStyleSaver=h1,function(i,t,e,r){var n=Me(i+","+t+","+e,function(s){hr[s]=1});Me(t,function(s){Be.units[s]="deg",y1[s]=1}),Ni[n[13]]=i+","+t,Me(r,function(s){var o=s.split(":");Ni[o[1]]=n[o[0]]})}("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY"),Me("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(i){Be.units[i]="px"}),Pe.registerPlugin(w1);var T1=Pe.registerPlugin(w1)||Pe;T1.core.Tween;const Gn=new gt;class dE{constructor(t={}){this._recursive=typeof t.recursive=="boolean"?t.recursive:!0,this._toggle=t.toggle||"visible",this._targetList=new Set}add(t){return this._targetList.add(t),this}addAll(t){for(let e=0,r=t.length;e<r;e++)this._targetList.add(t[e]);return this}remove(t){return this._targetList.delete(t),this}removeAll(t){for(let e=0,r=t.length;e<r;e++)this._targetList.delete(t[e]);return this}clear(){return this._targetList.clear(),this}cull(t,e=!1){return e||this.uncull(),this._targetList.forEach(r=>{e||r.getBounds(!1,Gn),this._recursive?this.cullRecursive(t,r,e):(e&&r._bounds.getRectangle(t),r[this._toggle]=Gn.right>t.left&&Gn.left<t.right&&Gn.bottom>t.top&&Gn.top<t.bottom)}),this}uncull(){return this._targetList.forEach(t=>{this._recursive?this.uncullRecursive(t):t[this._toggle]=!1}),this}cullRecursive(t,e,r){const n=r?e._bounds.getRectangle(Gn):e.getBounds(!0,Gn);if(e[this._toggle]=n.right>t.left&&n.left<t.right&&n.bottom>t.top&&n.top<t.bottom,!(n.left>=t.left&&n.top>=t.top&&n.right<=t.right&&n.bottom<=t.bottom)&&e[this._toggle]&&e.children&&e.children.length){const o=e.children;for(let a=0,l=o.length;a<l;a++)this.cullRecursive(t,o[a])}}uncullRecursive(t){if(t[this._toggle]=!0,t.children&&t.children.length){const e=t.children;for(let r=0,n=e.length;r<n;r++)this.uncullRecursive(e[r])}}}var Pl={exports:{}};Pl.exports,function(i,t){var e=200,r="__lodash_hash_undefined__",n=1,s=2,o=9007199254740991,a="[object Arguments]",l="[object Array]",h="[object AsyncFunction]",c="[object Boolean]",u="[object Date]",d="[object Error]",f="[object Function]",p="[object GeneratorFunction]",m="[object Map]",g="[object Number]",y="[object Null]",x="[object Object]",b="[object Promise]",v="[object Proxy]",w="[object RegExp]",S="[object Set]",E="[object String]",I="[object Symbol]",A="[object Undefined]",L="[object WeakMap]",G="[object ArrayBuffer]",F="[object DataView]",M="[object Float32Array]",N="[object Float64Array]",W="[object Int8Array]",K="[object Int16Array]",H="[object Int32Array]",j="[object Uint8Array]",B="[object Uint8ClampedArray]",D="[object Uint16Array]",k="[object Uint32Array]",V=/[\\^$.*+?()[\]{}|]/g,et=/^\[object .+?Constructor\]$/,ft=/^(?:0|[1-9]\d*)$/,at={};at[M]=at[N]=at[W]=at[K]=at[H]=at[j]=at[B]=at[D]=at[k]=!0,at[a]=at[l]=at[G]=at[c]=at[F]=at[u]=at[d]=at[f]=at[m]=at[g]=at[x]=at[w]=at[S]=at[E]=at[L]=!1;var Tt=typeof we=="object"&&we&&we.Object===Object&&we,It=typeof self=="object"&&self&&self.Object===Object&&self,Q=Tt||It||Function("return this")(),Z=t&&!t.nodeType&&t,J=Z&&!0&&i&&!i.nodeType&&i,$=J&&J.exports===Z,O=$&&Tt.process,pt=function(){try{return O&&O.binding&&O.binding("util")}catch{}}(),yt=pt&&pt.isTypedArray;function Rt(T,R){for(var _=-1,C=T==null?0:T.length,P=0,X=[];++_<C;){var ut=T[_];R(ut,_,T)&&(X[P++]=ut)}return X}function Bt(T,R){for(var _=-1,C=R.length,P=T.length;++_<C;)T[P+_]=R[_];return T}function Fe(T,R){for(var _=-1,C=T==null?0:T.length;++_<C;)if(R(T[_],_,T))return!0;return!1}function Ve(T,R){for(var _=-1,C=Array(T);++_<T;)C[_]=R(_);return C}function Ko(T){return function(R){return T(R)}}function $r(T,R){return T.has(R)}function ks(T,R){return T==null?void 0:T[R]}function Fs(T){var R=-1,_=Array(T.size);return T.forEach(function(C,P){_[++R]=[P,C]}),_}function yi(T,R){return function(_){return T(R(_))}}function sh(T){var R=-1,_=Array(T.size);return T.forEach(function(C){_[++R]=C}),_}var oh=Array.prototype,ef=Function.prototype,Ds=Object.prototype,Qr=Q["__core-js_shared__"],zo=ef.toString,He=Ds.hasOwnProperty,Yo=function(){var T=/[^.]+$/.exec(Qr&&Qr.keys&&Qr.keys.IE_PROTO||"");return T?"Symbol(src)_1."+T:""}(),jo=Ds.toString,ah=RegExp("^"+zo.call(He).replace(V,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),lh=$?Q.Buffer:void 0,Ns=Q.Symbol,Vi=Q.Uint8Array,Un=Ds.propertyIsEnumerable,rf=oh.splice,Hi=Ns?Ns.toStringTag:void 0,hh=Object.getOwnPropertySymbols,ch=lh?lh.isBuffer:void 0,Xn=yi(Object.keys,Object),Jo=vr(Q,"DataView"),Ke=vr(Q,"Map"),$o=vr(Q,"Promise"),Qo=vr(Q,"Set"),qo=vr(Q,"WeakMap"),Wn=vr(Object,"create"),nf=xi(Jo),bi=xi(Ke),sf=xi($o),of=xi(Qo),af=xi(qo),uh=Ns?Ns.prototype:void 0,ta=uh?uh.valueOf:void 0;function De(T){var R=-1,_=T==null?0:T.length;for(this.clear();++R<_;){var C=T[R];this.set(C[0],C[1])}}function lf(){this.__data__=Wn?Wn(null):{},this.size=0}function hf(T){var R=this.has(T)&&delete this.__data__[T];return this.size-=R?1:0,R}function cf(T){var R=this.__data__;if(Wn){var _=R[T];return _===r?void 0:_}return He.call(R,T)?R[T]:void 0}function uf(T){var R=this.__data__;return Wn?R[T]!==void 0:He.call(R,T)}function df(T,R){var _=this.__data__;return this.size+=this.has(T)?0:1,_[T]=Wn&&R===void 0?r:R,this}De.prototype.clear=lf,De.prototype.delete=hf,De.prototype.get=cf,De.prototype.has=uf,De.prototype.set=df;function _e(T){var R=-1,_=T==null?0:T.length;for(this.clear();++R<_;){var C=T[R];this.set(C[0],C[1])}}function ff(){this.__data__=[],this.size=0}function pf(T){var R=this.__data__,_=Bs(R,T);if(_<0)return!1;var C=R.length-1;return _==C?R.pop():rf.call(R,_,1),--this.size,!0}function mf(T){var R=this.__data__,_=Bs(R,T);return _<0?void 0:R[_][1]}function gf(T){return Bs(this.__data__,T)>-1}function yf(T,R){var _=this.__data__,C=Bs(_,T);return C<0?(++this.size,_.push([T,R])):_[C][1]=R,this}_e.prototype.clear=ff,_e.prototype.delete=pf,_e.prototype.get=mf,_e.prototype.has=gf,_e.prototype.set=yf;function xr(T){var R=-1,_=T==null?0:T.length;for(this.clear();++R<_;){var C=T[R];this.set(C[0],C[1])}}function ea(){this.size=0,this.__data__={hash:new De,map:new(Ke||_e),string:new De}}function bf(T){var R=Xs(this,T).delete(T);return this.size-=R?1:0,R}function Os(T){return Xs(this,T).get(T)}function ia(T){return Xs(this,T).has(T)}function xf(T,R){var _=Xs(this,T),C=_.size;return _.set(T,R),this.size+=_.size==C?0:1,this}xr.prototype.clear=ea,xr.prototype.delete=bf,xr.prototype.get=Os,xr.prototype.has=ia,xr.prototype.set=xf;function _r(T){var R=-1,_=T==null?0:T.length;for(this.__data__=new xr;++R<_;)this.add(T[R])}function dh(T){return this.__data__.set(T,r),this}function _f(T){return this.__data__.has(T)}_r.prototype.add=_r.prototype.push=dh,_r.prototype.has=_f;function Ki(T){var R=this.__data__=new _e(T);this.size=R.size}function vf(){this.__data__=new _e,this.size=0}function fh(T){var R=this.__data__,_=R.delete(T);return this.size=R.size,_}function wf(T){return this.__data__.get(T)}function Tf(T){return this.__data__.has(T)}function Sf(T,R){var _=this.__data__;if(_ instanceof _e){var C=_.__data__;if(!Ke||C.length<e-1)return C.push([T,R]),this.size=++_.size,this;_=this.__data__=new xr(C)}return _.set(T,R),this.size=_.size,this}Ki.prototype.clear=vf,Ki.prototype.delete=fh,Ki.prototype.get=wf,Ki.prototype.has=Tf,Ki.prototype.set=Sf;function Cf(T,R){var _=Vs(T),C=!_&&sa(T),P=!_&&!C&&Vn(T),X=!_&&!C&&!P&&wh(T),ut=_||C||P||X,bt=ut?Ve(T.length,String):[],_t=bt.length;for(var ht in T)(R||He.call(T,ht))&&!(ut&&(ht=="length"||P&&(ht=="offset"||ht=="parent")||X&&(ht=="buffer"||ht=="byteLength"||ht=="byteOffset")||na(ht,_t)))&&bt.push(ht);return bt}function Bs(T,R){for(var _=T.length;_--;)if(Zs(T[_][0],R))return _;return-1}function Ef(T,R,_){var C=R(T);return Vs(T)?C:Bt(C,_(T))}function Zn(T){return T==null?T===void 0?A:y:Hi&&Hi in Object(T)?Rf(T):Ws(T)}function ph(T){return tn(T)&&Zn(T)==a}function mh(T,R,_,C,P){return T===R?!0:T==null||R==null||!tn(T)&&!tn(R)?T!==T&&R!==R:If(T,R,_,C,mh,P)}function If(T,R,_,C,P,X){var ut=Vs(T),bt=Vs(R),_t=ut?l:zi(T),ht=bt?l:zi(R);_t=_t==a?x:_t,ht=ht==a?x:ht;var vt=_t==x,Xt=ht==x,Pt=_t==ht;if(Pt&&Vn(T)){if(!Vn(R))return!1;ut=!0,vt=!1}if(Pt&&!vt)return X||(X=new Ki),ut||wh(T)?gh(T,R,_,C,P,X):yh(T,R,_t,_,C,P,X);if(!(_&n)){var fe=vt&&He.call(T,"__wrapped__"),ve=Xt&&He.call(R,"__wrapped__");if(fe||ve){var si=fe?T.value():T,oi=ve?R.value():R;return X||(X=new Ki),P(si,oi,_,C,X)}}return Pt?(X||(X=new Ki),Mf(T,R,_,C,P,X)):!1}function Us(T){if(!vh(T)||Gf(T))return!1;var R=Yi(T)?ah:et;return R.test(xi(T))}function ra(T){return tn(T)&&qr(T.length)&&!!at[Zn(T)]}function Af(T){if(!kf(T))return Xn(T);var R=[];for(var _ in Object(T))He.call(T,_)&&_!="constructor"&&R.push(_);return R}function gh(T,R,_,C,P,X){var ut=_&n,bt=T.length,_t=R.length;if(bt!=_t&&!(ut&&_t>bt))return!1;var ht=X.get(T);if(ht&&X.get(R))return ht==R;var vt=-1,Xt=!0,Pt=_&s?new _r:void 0;for(X.set(T,R),X.set(R,T);++vt<bt;){var fe=T[vt],ve=R[vt];if(C)var si=ut?C(ve,fe,vt,R,T,X):C(fe,ve,vt,T,R,X);if(si!==void 0){if(si)continue;Xt=!1;break}if(Pt){if(!Fe(R,function(oi,Hn){if(!$r(Pt,Hn)&&(fe===oi||P(fe,oi,_,C,X)))return Pt.push(Hn)})){Xt=!1;break}}else if(!(fe===ve||P(fe,ve,_,C,X))){Xt=!1;break}}return X.delete(T),X.delete(R),Xt}function yh(T,R,_,C,P,X,ut){switch(_){case F:if(T.byteLength!=R.byteLength||T.byteOffset!=R.byteOffset)return!1;T=T.buffer,R=R.buffer;case G:return!(T.byteLength!=R.byteLength||!X(new Vi(T),new Vi(R)));case c:case u:case g:return Zs(+T,+R);case d:return T.name==R.name&&T.message==R.message;case w:case E:return T==R+"";case m:var bt=Fs;case S:var _t=C&n;if(bt||(bt=sh),T.size!=R.size&&!_t)return!1;var ht=ut.get(T);if(ht)return ht==R;C|=s,ut.set(T,R);var vt=gh(bt(T),bt(R),C,P,X,ut);return ut.delete(T),vt;case I:if(ta)return ta.call(T)==ta.call(R)}return!1}function Mf(T,R,_,C,P,X){var ut=_&n,bt=bh(T),_t=bt.length,ht=bh(R),vt=ht.length;if(_t!=vt&&!ut)return!1;for(var Xt=_t;Xt--;){var Pt=bt[Xt];if(!(ut?Pt in R:He.call(R,Pt)))return!1}var fe=X.get(T);if(fe&&X.get(R))return fe==R;var ve=!0;X.set(T,R),X.set(R,T);for(var si=ut;++Xt<_t;){Pt=bt[Xt];var oi=T[Pt],Hn=R[Pt];if(C)var Ib=ut?C(Hn,oi,Pt,R,T,X):C(oi,Hn,Pt,T,R,X);if(!(Ib===void 0?oi===Hn||P(oi,Hn,_,C,X):Ib)){ve=!1;break}si||(si=Pt=="constructor")}if(ve&&!si){var Sh=T.constructor,Ch=R.constructor;Sh!=Ch&&"constructor"in T&&"constructor"in R&&!(typeof Sh=="function"&&Sh instanceof Sh&&typeof Ch=="function"&&Ch instanceof Ch)&&(ve=!1)}return X.delete(T),X.delete(R),ve}function bh(T){return Ef(T,Th,Pf)}function Xs(T,R){var _=T.__data__;return Lf(R)?_[typeof R=="string"?"string":"hash"]:_.map}function vr(T,R){var _=ks(T,R);return Us(_)?_:void 0}function Rf(T){var R=He.call(T,Hi),_=T[Hi];try{T[Hi]=void 0;var C=!0}catch{}var P=jo.call(T);return C&&(R?T[Hi]=_:delete T[Hi]),P}var Pf=hh?function(T){return T==null?[]:(T=Object(T),Rt(hh(T),function(R){return Un.call(T,R)}))}:Ff,zi=Zn;(Jo&&zi(new Jo(new ArrayBuffer(1)))!=F||Ke&&zi(new Ke)!=m||$o&&zi($o.resolve())!=b||Qo&&zi(new Qo)!=S||qo&&zi(new qo)!=L)&&(zi=function(T){var R=Zn(T),_=R==x?T.constructor:void 0,C=_?xi(_):"";if(C)switch(C){case nf:return F;case bi:return m;case sf:return b;case of:return S;case af:return L}return R});function na(T,R){return R=R??o,!!R&&(typeof T=="number"||ft.test(T))&&T>-1&&T%1==0&&T<R}function Lf(T){var R=typeof T;return R=="string"||R=="number"||R=="symbol"||R=="boolean"?T!=="__proto__":T===null}function Gf(T){return!!Yo&&Yo in T}function kf(T){var R=T&&T.constructor,_=typeof R=="function"&&R.prototype||Ds;return T===_}function Ws(T){return jo.call(T)}function xi(T){if(T!=null){try{return zo.call(T)}catch{}try{return T+""}catch{}}return""}function Zs(T,R){return T===R||T!==T&&R!==R}var sa=ph(function(){return arguments}())?ph:function(T){return tn(T)&&He.call(T,"callee")&&!Un.call(T,"callee")},Vs=Array.isArray;function xh(T){return T!=null&&qr(T.length)&&!Yi(T)}var Vn=ch||Df;function _h(T,R){return mh(T,R)}function Yi(T){if(!vh(T))return!1;var R=Zn(T);return R==f||R==p||R==h||R==v}function qr(T){return typeof T=="number"&&T>-1&&T%1==0&&T<=o}function vh(T){var R=typeof T;return T!=null&&(R=="object"||R=="function")}function tn(T){return T!=null&&typeof T=="object"}var wh=yt?Ko(yt):ra;function Th(T){return xh(T)?Cf(T):Af(T)}function Ff(){return[]}function Df(){return!1}i.exports=_h}(Pl,Pl.exports);var fE=Pl.exports;const S1=Tr(fE);var pE=Object.defineProperty,mE=(i,t,e)=>t in i?pE(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,U=(i,t,e)=>(mE(i,typeof t!="symbol"?t+"":t,e),e);class ei{constructor(t){U(this,"parent"),U(this,"paused"),this.parent=t,this.paused=!1}destroy(){}down(t){return!1}move(t){return!1}up(t){return!1}wheel(t){return!1}update(t){}resize(){}reset(){}pause(){this.paused=!0}resume(){this.paused=!1}}var gE=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},C1={exports:{}};(function(i,t){(function(){var e,r;r=function(n){return i.exports=n},e={linear:function(n,s,o,a){return o*n/a+s},easeInQuad:function(n,s,o,a){return o*(n/=a)*n+s},easeOutQuad:function(n,s,o,a){return-o*(n/=a)*(n-2)+s},easeInOutQuad:function(n,s,o,a){return(n/=a/2)<1?o/2*n*n+s:-o/2*(--n*(n-2)-1)+s},easeInCubic:function(n,s,o,a){return o*(n/=a)*n*n+s},easeOutCubic:function(n,s,o,a){return o*((n=n/a-1)*n*n+1)+s},easeInOutCubic:function(n,s,o,a){return(n/=a/2)<1?o/2*n*n*n+s:o/2*((n-=2)*n*n+2)+s},easeInQuart:function(n,s,o,a){return o*(n/=a)*n*n*n+s},easeOutQuart:function(n,s,o,a){return-o*((n=n/a-1)*n*n*n-1)+s},easeInOutQuart:function(n,s,o,a){return(n/=a/2)<1?o/2*n*n*n*n+s:-o/2*((n-=2)*n*n*n-2)+s},easeInQuint:function(n,s,o,a){return o*(n/=a)*n*n*n*n+s},easeOutQuint:function(n,s,o,a){return o*((n=n/a-1)*n*n*n*n+1)+s},easeInOutQuint:function(n,s,o,a){return(n/=a/2)<1?o/2*n*n*n*n*n+s:o/2*((n-=2)*n*n*n*n+2)+s},easeInSine:function(n,s,o,a){return-o*Math.cos(n/a*(Math.PI/2))+o+s},easeOutSine:function(n,s,o,a){return o*Math.sin(n/a*(Math.PI/2))+s},easeInOutSine:function(n,s,o,a){return-o/2*(Math.cos(Math.PI*n/a)-1)+s},easeInExpo:function(n,s,o,a){return n===0?s:o*Math.pow(2,10*(n/a-1))+s},easeOutExpo:function(n,s,o,a){return n===a?s+o:o*(-Math.pow(2,-10*n/a)+1)+s},easeInOutExpo:function(n,s,o,a){return(n/=a/2)<1?o/2*Math.pow(2,10*(n-1))+s:o/2*(-Math.pow(2,-10*--n)+2)+s},easeInCirc:function(n,s,o,a){return-o*(Math.sqrt(1-(n/=a)*n)-1)+s},easeOutCirc:function(n,s,o,a){return o*Math.sqrt(1-(n=n/a-1)*n)+s},easeInOutCirc:function(n,s,o,a){return(n/=a/2)<1?-o/2*(Math.sqrt(1-n*n)-1)+s:o/2*(Math.sqrt(1-(n-=2)*n)+1)+s},easeInElastic:function(n,s,o,a){var l,h,c;return c=1.70158,h=0,l=o,n===0||(n/=a),h||(h=a*.3),l<Math.abs(o)?(l=o,c=h/4):c=h/(2*Math.PI)*Math.asin(o/l),-(l*Math.pow(2,10*(n-=1))*Math.sin((n*a-c)*(2*Math.PI)/h))+s},easeOutElastic:function(n,s,o,a){var l,h,c;return c=1.70158,h=0,l=o,n===0||(n/=a),h||(h=a*.3),l<Math.abs(o)?(l=o,c=h/4):c=h/(2*Math.PI)*Math.asin(o/l),l*Math.pow(2,-10*n)*Math.sin((n*a-c)*(2*Math.PI)/h)+o+s},easeInOutElastic:function(n,s,o,a){var l,h,c;return c=1.70158,h=0,l=o,n===0||(n/=a/2),h||(h=a*(.3*1.5)),l<Math.abs(o)?(l=o,c=h/4):c=h/(2*Math.PI)*Math.asin(o/l),n<1?-.5*(l*Math.pow(2,10*(n-=1))*Math.sin((n*a-c)*(2*Math.PI)/h))+s:l*Math.pow(2,-10*(n-=1))*Math.sin((n*a-c)*(2*Math.PI)/h)*.5+o+s},easeInBack:function(n,s,o,a,l){return l===void 0&&(l=1.70158),o*(n/=a)*n*((l+1)*n-l)+s},easeOutBack:function(n,s,o,a,l){return l===void 0&&(l=1.70158),o*((n=n/a-1)*n*((l+1)*n+l)+1)+s},easeInOutBack:function(n,s,o,a,l){return l===void 0&&(l=1.70158),(n/=a/2)<1?o/2*(n*n*(((l*=1.525)+1)*n-l))+s:o/2*((n-=2)*n*(((l*=1.525)+1)*n+l)+2)+s},easeInBounce:function(n,s,o,a){var l;return l=e.easeOutBounce(a-n,0,o,a),o-l+s},easeOutBounce:function(n,s,o,a){return(n/=a)<1/2.75?o*(7.5625*n*n)+s:n<2/2.75?o*(7.5625*(n-=1.5/2.75)*n+.75)+s:n<2.5/2.75?o*(7.5625*(n-=2.25/2.75)*n+.9375)+s:o*(7.5625*(n-=2.625/2.75)*n+.984375)+s},easeInOutBounce:function(n,s,o,a){var l;return n<a/2?(l=e.easeInBounce(n*2,0,o,a),l*.5+s):(l=e.easeOutBounce(n*2-a,0,o,a),l*.5+o*.5+s)}},r(e)}).call(gE)})(C1);const E1=C1.exports;function Ll(i,t){if(i){if(typeof i=="function")return i;if(typeof i=="string")return E1[i]}else return E1[t]}const yE={removeOnInterrupt:!1,ease:"linear",time:1e3};class bE extends ei{constructor(t,e={}){super(t),U(this,"options"),U(this,"startX"),U(this,"startY"),U(this,"deltaX"),U(this,"deltaY"),U(this,"keepCenter"),U(this,"startWidth",null),U(this,"startHeight",null),U(this,"deltaWidth",null),U(this,"deltaHeight",null),U(this,"width",null),U(this,"height",null),U(this,"time",0),this.options=Object.assign({},yE,e),this.options.ease=Ll(this.options.ease),this.setupPosition(),this.setupZoom(),this.time=0}setupPosition(){typeof this.options.position<"u"?(this.startX=this.parent.center.x,this.startY=this.parent.center.y,this.deltaX=this.options.position.x-this.parent.center.x,this.deltaY=this.options.position.y-this.parent.center.y,this.keepCenter=!1):this.keepCenter=!0}setupZoom(){this.width=null,this.height=null,typeof this.options.scale<"u"?this.width=this.parent.screenWidth/this.options.scale:typeof this.options.scaleX<"u"||typeof this.options.scaleY<"u"?(typeof this.options.scaleX<"u"&&(this.width=this.parent.screenWidth/this.options.scaleX),typeof this.options.scaleY<"u"&&(this.height=this.parent.screenHeight/this.options.scaleY)):(typeof this.options.width<"u"&&(this.width=this.options.width),typeof this.options.height<"u"&&(this.height=this.options.height)),this.width!==null&&(this.startWidth=this.parent.screenWidthInWorldPixels,this.deltaWidth=this.width-this.startWidth),this.height!==null&&(this.startHeight=this.parent.screenHeightInWorldPixels,this.deltaHeight=this.height-this.startHeight)}down(){return this.options.removeOnInterrupt&&this.parent.plugins.remove("animate"),!1}complete(){this.parent.plugins.remove("animate"),this.width!==null&&this.parent.fitWidth(this.width,this.keepCenter,this.height===null),this.height!==null&&this.parent.fitHeight(this.height,this.keepCenter,this.width===null),!this.keepCenter&&this.options.position&&this.parent.moveCenter(this.options.position),this.parent.emit("animate-end",this.parent),this.options.callbackOnComplete&&this.options.callbackOnComplete(this.parent)}update(t){if(this.paused)return;this.time+=t;const e=new dt(this.parent.scale.x,this.parent.scale.y);if(this.time>=this.options.time){const r=this.parent.width,n=this.parent.height;this.complete(),(r!==this.parent.width||n!==this.parent.height)&&this.parent.emit("zoomed",{viewport:this.parent,original:e,type:"animate"})}else{const r=this.options.ease(this.time,0,1,this.options.time);if(this.width!==null){const n=this.startWidth,s=this.deltaWidth;this.parent.fitWidth(n+s*r,this.keepCenter,this.height===null)}if(this.height!==null){const n=this.startHeight,s=this.deltaHeight;this.parent.fitHeight(n+s*r,this.keepCenter,this.width===null)}if(this.width===null?this.parent.scale.x=this.parent.scale.y:this.height===null&&(this.parent.scale.y=this.parent.scale.x),!this.keepCenter){const n=this.startX,s=this.startY,o=this.deltaX,a=this.deltaY,l=new dt(this.parent.x,this.parent.y);this.parent.moveCenter(n+o*r,s+a*r),this.parent.emit("moved",{viewport:this.parent,original:l,type:"animate"})}(this.width||this.height)&&this.parent.emit("zoomed",{viewport:this.parent,original:e,type:"animate"})}}}const xE={sides:"all",friction:.5,time:150,ease:"easeInOutSine",underflow:"center",bounceBox:null};class _E extends ei{constructor(t,e={}){super(t),U(this,"options"),U(this,"left"),U(this,"top"),U(this,"right"),U(this,"bottom"),U(this,"underflowX"),U(this,"underflowY"),U(this,"ease"),U(this,"toX"),U(this,"toY"),this.options=Object.assign({},xE,e),this.ease=Ll(this.options.ease,"easeInOutSine"),this.options.sides?this.options.sides==="all"?this.top=this.bottom=this.left=this.right=!0:this.options.sides==="horizontal"?(this.right=this.left=!0,this.top=this.bottom=!1):this.options.sides==="vertical"?(this.left=this.right=!1,this.top=this.bottom=!0):(this.top=this.options.sides.indexOf("top")!==-1,this.bottom=this.options.sides.indexOf("bottom")!==-1,this.left=this.options.sides.indexOf("left")!==-1,this.right=this.options.sides.indexOf("right")!==-1):this.left=this.top=this.right=this.bottom=!1;const r=this.options.underflow.toLowerCase();r==="center"?(this.underflowX=0,this.underflowY=0):(this.underflowX=r.indexOf("left")!==-1?-1:r.indexOf("right")!==-1?1:0,this.underflowY=r.indexOf("top")!==-1?-1:r.indexOf("bottom")!==-1?1:0),this.reset()}isActive(){return this.toX!==null||this.toY!==null}down(){return this.toX=this.toY=null,!1}up(){return this.bounce(),!1}update(t){if(!this.paused){if(this.bounce(),this.toX){const e=this.toX;e.time+=t,this.parent.emit("moved",{viewport:this.parent,type:"bounce-x"}),e.time>=this.options.time?(this.parent.x=e.end,this.toX=null,this.parent.emit("bounce-x-end",this.parent)):this.parent.x=this.ease(e.time,e.start,e.delta,this.options.time)}if(this.toY){const e=this.toY;e.time+=t,this.parent.emit("moved",{viewport:this.parent,type:"bounce-y"}),e.time>=this.options.time?(this.parent.y=e.end,this.toY=null,this.parent.emit("bounce-y-end",this.parent)):this.parent.y=this.ease(e.time,e.start,e.delta,this.options.time)}}}calcUnderflowX(){let t;switch(this.underflowX){case-1:t=0;break;case 1:t=this.parent.screenWidth-this.parent.screenWorldWidth;break;default:t=(this.parent.screenWidth-this.parent.screenWorldWidth)/2}return t}calcUnderflowY(){let t;switch(this.underflowY){case-1:t=0;break;case 1:t=this.parent.screenHeight-this.parent.screenWorldHeight;break;default:t=(this.parent.screenHeight-this.parent.screenWorldHeight)/2}return t}oob(){const t=this.options.bounceBox;if(t){const e=typeof t.x>"u"?0:t.x,r=typeof t.y>"u"?0:t.y,n=typeof t.width>"u"?this.parent.worldWidth:t.width,s=typeof t.height>"u"?this.parent.worldHeight:t.height;return{left:this.parent.left<e,right:this.parent.right>n,top:this.parent.top<r,bottom:this.parent.bottom>s,topLeft:new dt(e*this.parent.scale.x,r*this.parent.scale.y),bottomRight:new dt(n*this.parent.scale.x-this.parent.screenWidth,s*this.parent.scale.y-this.parent.screenHeight)}}return{left:this.parent.left<0,right:this.parent.right>this.parent.worldWidth,top:this.parent.top<0,bottom:this.parent.bottom>this.parent.worldHeight,topLeft:new dt(0,0),bottomRight:new dt(this.parent.worldWidth*this.parent.scale.x-this.parent.screenWidth,this.parent.worldHeight*this.parent.scale.y-this.parent.screenHeight)}}bounce(){var t,e;if(this.paused)return;let r,n=this.parent.plugins.get("decelerate",!0);n&&(n.x||n.y)&&(n.x&&n.percentChangeX===((t=n.options)==null?void 0:t.friction)||n.y&&n.percentChangeY===((e=n.options)==null?void 0:e.friction))&&(r=this.oob(),(r.left&&this.left||r.right&&this.right)&&(n.percentChangeX=this.options.friction),(r.top&&this.top||r.bottom&&this.bottom)&&(n.percentChangeY=this.options.friction));const s=this.parent.plugins.get("drag",!0)||{},o=this.parent.plugins.get("pinch",!0)||{};if(n=n||{},!(s!=null&&s.active)&&!(o!=null&&o.active)&&(!this.toX||!this.toY)&&(!n.x||!n.y)){r=r||this.oob();const a=r.topLeft,l=r.bottomRight;if(!this.toX&&!n.x){let h=null;r.left&&this.left?h=this.parent.screenWorldWidth<this.parent.screenWidth?this.calcUnderflowX():-a.x:r.right&&this.right&&(h=this.parent.screenWorldWidth<this.parent.screenWidth?this.calcUnderflowX():-l.x),h!==null&&this.parent.x!==h&&(this.toX={time:0,start:this.parent.x,delta:h-this.parent.x,end:h},this.parent.emit("bounce-x-start",this.parent))}if(!this.toY&&!n.y){let h=null;r.top&&this.top?h=this.parent.screenWorldHeight<this.parent.screenHeight?this.calcUnderflowY():-a.y:r.bottom&&this.bottom&&(h=this.parent.screenWorldHeight<this.parent.screenHeight?this.calcUnderflowY():-l.y),h!==null&&this.parent.y!==h&&(this.toY={time:0,start:this.parent.y,delta:h-this.parent.y,end:h},this.parent.emit("bounce-y-start",this.parent))}}}reset(){this.toX=this.toY=null,this.bounce()}}const vE={left:!1,right:!1,top:!1,bottom:!1,direction:null,underflow:"center"};class wE extends ei{constructor(t,e={}){super(t),U(this,"options"),U(this,"last"),U(this,"noUnderflow"),U(this,"underflowX"),U(this,"underflowY"),this.options=Object.assign({},vE,e),this.options.direction&&(this.options.left=this.options.direction==="x"||this.options.direction==="all"?!0:null,this.options.right=this.options.direction==="x"||this.options.direction==="all"?!0:null,this.options.top=this.options.direction==="y"||this.options.direction==="all"?!0:null,this.options.bottom=this.options.direction==="y"||this.options.direction==="all"?!0:null),this.parseUnderflow(),this.last={x:null,y:null,scaleX:null,scaleY:null},this.update()}parseUnderflow(){const t=this.options.underflow.toLowerCase();t==="none"?this.noUnderflow=!0:t==="center"?(this.underflowX=this.underflowY=0,this.noUnderflow=!1):(this.underflowX=t.indexOf("left")!==-1?-1:t.indexOf("right")!==-1?1:0,this.underflowY=t.indexOf("top")!==-1?-1:t.indexOf("bottom")!==-1?1:0,this.noUnderflow=!1)}move(){return this.update(),!1}update(){if(this.paused||this.parent.x===this.last.x&&this.parent.y===this.last.y&&this.parent.scale.x===this.last.scaleX&&this.parent.scale.y===this.last.scaleY)return;const t=new dt(this.parent.x,this.parent.y),e=this.parent.plugins.decelerate||{};if(this.options.left!==null||this.options.right!==null){let r=!1;if(!this.noUnderflow&&this.parent.screenWorldWidth<this.parent.screenWidth)switch(this.underflowX){case-1:this.parent.x!==0&&(this.parent.x=0,r=!0);break;case 1:this.parent.x!==this.parent.screenWidth-this.parent.screenWorldWidth&&(this.parent.x=this.parent.screenWidth-this.parent.screenWorldWidth,r=!0);break;default:this.parent.x!==(this.parent.screenWidth-this.parent.screenWorldWidth)/2&&(this.parent.x=(this.parent.screenWidth-this.parent.screenWorldWidth)/2,r=!0)}else this.options.left!==null&&this.parent.left<(this.options.left===!0?0:this.options.left)&&(this.parent.x=-(this.options.left===!0?0:this.options.left)*this.parent.scale.x,e.x=0,r=!0),this.options.right!==null&&this.parent.right>(this.options.right===!0?this.parent.worldWidth:this.options.right)&&(this.parent.x=-(this.options.right===!0?this.parent.worldWidth:this.options.right)*this.parent.scale.x+this.parent.screenWidth,e.x=0,r=!0);r&&this.parent.emit("moved",{viewport:this.parent,original:t,type:"clamp-x"})}if(this.options.top!==null||this.options.bottom!==null){let r=!1;if(!this.noUnderflow&&this.parent.screenWorldHeight<this.parent.screenHeight)switch(this.underflowY){case-1:this.parent.y!==0&&(this.parent.y=0,r=!0);break;case 1:this.parent.y!==this.parent.screenHeight-this.parent.screenWorldHeight&&(this.parent.y=this.parent.screenHeight-this.parent.screenWorldHeight,r=!0);break;default:this.parent.y!==(this.parent.screenHeight-this.parent.screenWorldHeight)/2&&(this.parent.y=(this.parent.screenHeight-this.parent.screenWorldHeight)/2,r=!0)}else this.options.top!==null&&this.parent.top<(this.options.top===!0?0:this.options.top)&&(this.parent.y=-(this.options.top===!0?0:this.options.top)*this.parent.scale.y,e.y=0,r=!0),this.options.bottom!==null&&this.parent.bottom>(this.options.bottom===!0?this.parent.worldHeight:this.options.bottom)&&(this.parent.y=-(this.options.bottom===!0?this.parent.worldHeight:this.options.bottom)*this.parent.scale.y+this.parent.screenHeight,e.y=0,r=!0);r&&this.parent.emit("moved",{viewport:this.parent,original:t,type:"clamp-y"})}this.last.x=this.parent.x,this.last.y=this.parent.y,this.last.scaleX=this.parent.scale.x,this.last.scaleY=this.parent.scale.y}reset(){this.update()}}const TE={minWidth:null,minHeight:null,maxWidth:null,maxHeight:null,minScale:null,maxScale:null};class SE extends ei{constructor(t,e={}){super(t),U(this,"options"),this.options=Object.assign({},TE,e),this.clamp()}resize(){this.clamp()}clamp(){if(!this.paused){if(this.options.minWidth||this.options.minHeight||this.options.maxWidth||this.options.maxHeight){let t=this.parent.worldScreenWidth,e=this.parent.worldScreenHeight;if(this.options.minWidth!==null&&t<this.options.minWidth){const r=this.parent.scale.x;this.parent.fitWidth(this.options.minWidth,!1,!1,!0),this.parent.scale.y*=this.parent.scale.x/r,t=this.parent.worldScreenWidth,e=this.parent.worldScreenHeight,this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"})}if(this.options.maxWidth!==null&&t>this.options.maxWidth){const r=this.parent.scale.x;this.parent.fitWidth(this.options.maxWidth,!1,!1,!0),this.parent.scale.y*=this.parent.scale.x/r,t=this.parent.worldScreenWidth,e=this.parent.worldScreenHeight,this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"})}if(this.options.minHeight!==null&&e<this.options.minHeight){const r=this.parent.scale.y;this.parent.fitHeight(this.options.minHeight,!1,!1,!0),this.parent.scale.x*=this.parent.scale.y/r,t=this.parent.worldScreenWidth,e=this.parent.worldScreenHeight,this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"})}if(this.options.maxHeight!==null&&e>this.options.maxHeight){const r=this.parent.scale.y;this.parent.fitHeight(this.options.maxHeight,!1,!1,!0),this.parent.scale.x*=this.parent.scale.y/r,this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"})}}else if(this.options.minScale||this.options.maxScale){const t={x:null,y:null},e={x:null,y:null};if(typeof this.options.minScale=="number")t.x=this.options.minScale,t.y=this.options.minScale;else if(this.options.minScale!==null){const s=this.options.minScale;t.x=typeof s.x>"u"?null:s.x,t.y=typeof s.y>"u"?null:s.y}if(typeof this.options.maxScale=="number")e.x=this.options.maxScale,e.y=this.options.maxScale;else if(this.options.maxScale!==null){const s=this.options.maxScale;e.x=typeof s.x>"u"?null:s.x,e.y=typeof s.y>"u"?null:s.y}let r=this.parent.scale.x,n=this.parent.scale.y;t.x!==null&&r<t.x&&(r=t.x),e.x!==null&&r>e.x&&(r=e.x),t.y!==null&&n<t.y&&(n=t.y),e.y!==null&&n>e.y&&(n=e.y),(r!==this.parent.scale.x||n!==this.parent.scale.y)&&(this.parent.scale.set(r,n),this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"}))}}}reset(){this.clamp()}}const CE={friction:.98,bounce:.8,minSpeed:.01},zr=16;class EE extends ei{constructor(t,e={}){super(t),U(this,"options"),U(this,"x"),U(this,"y"),U(this,"percentChangeX"),U(this,"percentChangeY"),U(this,"saved"),U(this,"timeSinceRelease"),this.options=Object.assign({},CE,e),this.saved=[],this.timeSinceRelease=0,this.reset(),this.parent.on("moved",r=>this.handleMoved(r))}down(){return this.saved=[],this.x=this.y=null,!1}isActive(){return!!(this.x||this.y)}move(){if(this.paused)return!1;const t=this.parent.input.count();return(t===1||t>1&&!this.parent.plugins.get("pinch",!0))&&(this.saved.push({x:this.parent.x,y:this.parent.y,time:performance.now()}),this.saved.length>60&&this.saved.splice(0,30)),!1}handleMoved(t){if(this.saved.length){const e=this.saved[this.saved.length-1];t.type==="clamp-x"&&t.original?e.x===t.original.x&&(e.x=this.parent.x):t.type==="clamp-y"&&t.original&&e.y===t.original.y&&(e.y=this.parent.y)}}up(){if(this.parent.input.count()===0&&this.saved.length){const t=performance.now();for(const e of this.saved)if(e.time>=t-100){const r=t-e.time;this.x=(this.parent.x-e.x)/r,this.y=(this.parent.y-e.y)/r,this.percentChangeX=this.percentChangeY=this.options.friction,this.timeSinceRelease=0;break}}return!1}activate(t){t=t||{},typeof t.x<"u"&&(this.x=t.x,this.percentChangeX=this.options.friction),typeof t.y<"u"&&(this.y=t.y,this.percentChangeY=this.options.friction)}update(t){if(this.paused)return;const e=this.x||this.y,r=this.timeSinceRelease,n=this.timeSinceRelease+t;if(this.x){const s=this.percentChangeX,o=Math.log(s);this.parent.x+=this.x*zr/o*(Math.pow(s,n/zr)-Math.pow(s,r/zr)),this.x*=Math.pow(this.percentChangeX,t/zr)}if(this.y){const s=this.percentChangeY,o=Math.log(s);this.parent.y+=this.y*zr/o*(Math.pow(s,n/zr)-Math.pow(s,r/zr)),this.y*=Math.pow(this.percentChangeY,t/zr)}this.timeSinceRelease+=t,this.x&&this.y?Math.abs(this.x)<this.options.minSpeed&&Math.abs(this.y)<this.options.minSpeed&&(this.x=0,this.y=0):(Math.abs(this.x||0)<this.options.minSpeed&&(this.x=0),Math.abs(this.y||0)<this.options.minSpeed&&(this.y=0)),e&&this.parent.emit("moved",{viewport:this.parent,type:"decelerate"})}reset(){this.x=this.y=null}}const IE={direction:"all",pressDrag:!0,wheel:!0,wheelScroll:1,reverse:!1,clampWheel:!1,underflow:"center",factor:1,mouseButtons:"all",keyToPress:null,ignoreKeyToPressOnTouch:!1,lineHeight:20,wheelSwapAxes:!1};class AE extends ei{constructor(t,e={}){super(t),U(this,"options"),U(this,"moved"),U(this,"reverse"),U(this,"xDirection"),U(this,"yDirection"),U(this,"keyIsPressed"),U(this,"mouse"),U(this,"underflowX"),U(this,"underflowY"),U(this,"last"),U(this,"current"),U(this,"windowEventHandlers",[]),this.options=Object.assign({},IE,e),this.moved=!1,this.reverse=this.options.reverse?1:-1,this.xDirection=!this.options.direction||this.options.direction==="all"||this.options.direction==="x",this.yDirection=!this.options.direction||this.options.direction==="all"||this.options.direction==="y",this.keyIsPressed=!1,this.parseUnderflow(),this.mouseButtons(this.options.mouseButtons),this.options.keyToPress&&this.handleKeyPresses(this.options.keyToPress)}handleKeyPresses(t){const e=n=>{t.includes(n.code)&&(this.keyIsPressed=!0)},r=n=>{t.includes(n.code)&&(this.keyIsPressed=!1)};this.addWindowEventHandler("keyup",r),this.addWindowEventHandler("keydown",e)}addWindowEventHandler(t,e){window.addEventListener(t,e),this.windowEventHandlers.push({event:t,handler:e})}destroy(){this.windowEventHandlers.forEach(({event:t,handler:e})=>{window.removeEventListener(t,e)})}mouseButtons(t){!t||t==="all"?this.mouse=[!0,!0,!0]:this.mouse=[t.indexOf("left")!==-1,t.indexOf("middle")!==-1,t.indexOf("right")!==-1]}parseUnderflow(){const t=this.options.underflow.toLowerCase();t==="center"?(this.underflowX=0,this.underflowY=0):(t.includes("left")?this.underflowX=-1:t.includes("right")?this.underflowX=1:this.underflowX=0,t.includes("top")?this.underflowY=-1:t.includes("bottom")?this.underflowY=1:this.underflowY=0)}checkButtons(t){const e=t.pointerType==="mouse",r=this.parent.input.count();return!!((r===1||r>1&&!this.parent.plugins.get("pinch",!0))&&(!e||this.mouse[t.button]))}checkKeyPress(t){return!this.options.keyToPress||this.keyIsPressed||this.options.ignoreKeyToPressOnTouch&&t.data.pointerType==="touch"}down(t){return this.paused||!this.options.pressDrag?!1:this.checkButtons(t)&&this.checkKeyPress(t)?(this.last={x:t.global.x,y:t.global.y},this.current=t.pointerId,!0):(this.last=null,!1)}get active(){return this.moved}move(t){if(this.paused||!this.options.pressDrag)return!1;if(this.last&&this.current===t.data.pointerId){const e=t.global.x,r=t.global.y,n=this.parent.input.count();if(n===1||n>1&&!this.parent.plugins.get("pinch",!0)){const s=e-this.last.x,o=r-this.last.y;if(this.moved||this.xDirection&&this.parent.input.checkThreshold(s)||this.yDirection&&this.parent.input.checkThreshold(o)){const a={x:e,y:r};return this.xDirection&&(this.parent.x+=(a.x-this.last.x)*this.options.factor),this.yDirection&&(this.parent.y+=(a.y-this.last.y)*this.options.factor),this.last=a,this.moved||this.parent.emit("drag-start",{event:t,screen:new dt(this.last.x,this.last.y),world:this.parent.toWorld(new dt(this.last.x,this.last.y)),viewport:this.parent}),this.moved=!0,this.parent.emit("moved",{viewport:this.parent,type:"drag"}),!0}}else this.moved=!1}return!1}up(t){if(this.paused)return!1;const e=this.parent.input.touches;if(e.length===1){const r=e[0];return r.last&&(this.last={x:r.last.x,y:r.last.y},this.current=r.id),this.moved=!1,!0}else if(this.last&&this.moved){const r=new dt(this.last.x,this.last.y);return this.parent.emit("drag-end",{event:t,screen:r,world:this.parent.toWorld(r),viewport:this.parent}),this.last=null,this.moved=!1,!0}return!1}wheel(t){if(this.paused)return!1;if(this.options.wheel){const e=this.parent.plugins.get("wheel",!0);if(!e||!e.options.wheelZoom&&!t.ctrlKey){const r=t.deltaMode?this.options.lineHeight:1,n=[t.deltaX,t.deltaY],[s,o]=this.options.wheelSwapAxes?n.reverse():n;return this.xDirection&&(this.parent.x+=s*r*this.options.wheelScroll*this.reverse),this.yDirection&&(this.parent.y+=o*r*this.options.wheelScroll*this.reverse),this.options.clampWheel&&this.clamp(),this.parent.emit("wheel-scroll",this.parent),this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.parent.options.passiveWheel||t.preventDefault(),this.parent.options.stopPropagation&&t.stopPropagation(),!0}}return!1}resume(){this.last=null,this.paused=!1}clamp(){const t=this.parent.plugins.get("decelerate",!0)||{};if(this.options.clampWheel!=="y")if(this.parent.screenWorldWidth<this.parent.screenWidth)switch(this.underflowX){case-1:this.parent.x=0;break;case 1:this.parent.x=this.parent.screenWidth-this.parent.screenWorldWidth;break;default:this.parent.x=(this.parent.screenWidth-this.parent.screenWorldWidth)/2}else this.parent.left<0?(this.parent.x=0,t.x=0):this.parent.right>this.parent.worldWidth&&(this.parent.x=-this.parent.worldWidth*this.parent.scale.x+this.parent.screenWidth,t.x=0);if(this.options.clampWheel!=="x")if(this.parent.screenWorldHeight<this.parent.screenHeight)switch(this.underflowY){case-1:this.parent.y=0;break;case 1:this.parent.y=this.parent.screenHeight-this.parent.screenWorldHeight;break;default:this.parent.y=(this.parent.screenHeight-this.parent.screenWorldHeight)/2}else this.parent.top<0&&(this.parent.y=0,t.y=0),this.parent.bottom>this.parent.worldHeight&&(this.parent.y=-this.parent.worldHeight*this.parent.scale.y+this.parent.screenHeight,t.y=0)}}const ME={speed:0,acceleration:null,radius:null};class RE extends ei{constructor(t,e,r={}){super(t),U(this,"options"),U(this,"target"),U(this,"velocity"),this.target=e,this.options=Object.assign({},ME,r),this.velocity={x:0,y:0}}update(t){if(this.paused)return;const e=this.parent.center;let r=this.target.x,n=this.target.y;if(this.options.radius)if(Math.sqrt(Math.pow(this.target.y-e.y,2)+Math.pow(this.target.x-e.x,2))>this.options.radius){const a=Math.atan2(this.target.y-e.y,this.target.x-e.x);r=this.target.x-Math.cos(a)*this.options.radius,n=this.target.y-Math.sin(a)*this.options.radius}else return;const s=r-e.x,o=n-e.y;if(s||o)if(this.options.speed)if(this.options.acceleration){const a=Math.atan2(n-e.y,r-e.x),l=Math.sqrt(Math.pow(s,2)+Math.pow(o,2));if(l){const h=(Math.pow(this.velocity.x,2)+Math.pow(this.velocity.y,2))/(2*this.options.acceleration);l>h?this.velocity={x:Math.min(this.velocity.x+(this.options.acceleration*t,this.options.speed)),y:Math.min(this.velocity.y+(this.options.acceleration*t,this.options.speed))}:this.velocity={x:Math.max(this.velocity.x-this.options.acceleration*this.options.speed,0),y:Math.max(this.velocity.y-this.options.acceleration*this.options.speed,0)};const c=Math.cos(a)*this.velocity.x,u=Math.sin(a)*this.velocity.y,d=Math.abs(c)>Math.abs(s)?r:e.x+c,f=Math.abs(u)>Math.abs(o)?n:e.y+u;this.parent.moveCenter(d,f),this.parent.emit("moved",{viewport:this.parent,type:"follow"})}}else{const a=Math.atan2(n-e.y,r-e.x),l=Math.cos(a)*this.options.speed,h=Math.sin(a)*this.options.speed,c=Math.abs(l)>Math.abs(s)?r:e.x+l,u=Math.abs(h)>Math.abs(o)?n:e.y+h;this.parent.moveCenter(c,u),this.parent.emit("moved",{viewport:this.parent,type:"follow"})}else this.parent.moveCenter(r,n),this.parent.emit("moved",{viewport:this.parent,type:"follow"})}}const PE={radius:null,distance:null,top:null,bottom:null,left:null,right:null,speed:8,reverse:!1,noDecelerate:!1,linear:!1,allowButtons:!1};class LE extends ei{constructor(t,e={}){super(t),U(this,"options"),U(this,"reverse"),U(this,"radiusSquared"),U(this,"left"),U(this,"top"),U(this,"right"),U(this,"bottom"),U(this,"horizontal"),U(this,"vertical"),this.options=Object.assign({},PE,e),this.reverse=this.options.reverse?1:-1,this.radiusSquared=typeof this.options.radius=="number"?Math.pow(this.options.radius,2):null,this.resize()}resize(){const t=this.options.distance;t!==null?(this.left=t,this.top=t,this.right=this.parent.screenWidth-t,this.bottom=this.parent.screenHeight-t):this.options.radius||(this.left=this.options.left,this.top=this.options.top,this.right=this.options.right===null?null:this.parent.screenWidth-this.options.right,this.bottom=this.options.bottom===null?null:this.parent.screenHeight-this.options.bottom)}down(){return this.paused||this.options.allowButtons||(this.horizontal=this.vertical=null),!1}move(t){if(this.paused||t.pointerType!=="mouse"&&t.pointerId!==1||!this.options.allowButtons&&t.buttons!==0)return!1;const e=t.global.x,r=t.global.y;if(this.radiusSquared){const n=this.parent.toScreen(this.parent.center);if(Math.pow(n.x-e,2)+Math.pow(n.y-r,2)>=this.radiusSquared){const s=Math.atan2(n.y-r,n.x-e);this.options.linear?(this.horizontal=Math.round(Math.cos(s))*this.options.speed*this.reverse*(60/1e3),this.vertical=Math.round(Math.sin(s))*this.options.speed*this.reverse*(60/1e3)):(this.horizontal=Math.cos(s)*this.options.speed*this.reverse*(60/1e3),this.vertical=Math.sin(s)*this.options.speed*this.reverse*(60/1e3))}else this.horizontal&&this.decelerateHorizontal(),this.vertical&&this.decelerateVertical(),this.horizontal=this.vertical=0}else this.left!==null&&e<this.left?this.horizontal=Number(this.reverse)*this.options.speed*(60/1e3):this.right!==null&&e>this.right?this.horizontal=-1*this.reverse*this.options.speed*(60/1e3):(this.decelerateHorizontal(),this.horizontal=0),this.top!==null&&r<this.top?this.vertical=Number(this.reverse)*this.options.speed*(60/1e3):this.bottom!==null&&r>this.bottom?this.vertical=-1*this.reverse*this.options.speed*(60/1e3):(this.decelerateVertical(),this.vertical=0);return!1}decelerateHorizontal(){const t=this.parent.plugins.get("decelerate",!0);this.horizontal&&t&&!this.options.noDecelerate&&t.activate({x:this.horizontal*this.options.speed*this.reverse/(1e3/60)})}decelerateVertical(){const t=this.parent.plugins.get("decelerate",!0);this.vertical&&t&&!this.options.noDecelerate&&t.activate({y:this.vertical*this.options.speed*this.reverse/(1e3/60)})}up(){return this.paused||(this.horizontal&&this.decelerateHorizontal(),this.vertical&&this.decelerateVertical(),this.horizontal=this.vertical=null),!1}update(){if(!this.paused&&(this.horizontal||this.vertical)){const t=this.parent.center;this.horizontal&&(t.x+=this.horizontal*this.options.speed),this.vertical&&(t.y+=this.vertical*this.options.speed),this.parent.moveCenter(t),this.parent.emit("moved",{viewport:this.parent,type:"mouse-edges"})}}}const GE={noDrag:!1,percent:1,center:null,factor:1,axis:"all"};class kE extends ei{constructor(t,e={}){super(t),U(this,"options"),U(this,"active",!1),U(this,"pinching",!1),U(this,"moved",!1),U(this,"lastCenter"),this.options=Object.assign({},GE,e)}down(){return this.parent.input.count()>=2?(this.active=!0,!0):!1}isAxisX(){return["all","x"].includes(this.options.axis)}isAxisY(){return["all","y"].includes(this.options.axis)}move(t){if(this.paused||!this.active)return!1;const e=t.global.x,r=t.global.y,n=this.parent.input.touches;if(n.length>=2){const s=n[0],o=n[1],a=s.last&&o.last?Math.sqrt(Math.pow(o.last.x-s.last.x,2)+Math.pow(o.last.y-s.last.y,2)):null;if(s.id===t.pointerId?s.last={x:e,y:r,data:t}:o.id===t.pointerId&&(o.last={x:e,y:r,data:t}),a){let l;const h=new dt(s.last.x+(o.last.x-s.last.x)/2,s.last.y+(o.last.y-s.last.y)/2);this.options.center||(l=this.parent.toLocal(h));let c=Math.sqrt(Math.pow(o.last.x-s.last.x,2)+Math.pow(o.last.y-s.last.y,2));c=c===0?c=1e-10:c;const u=(1-a/c)*this.options.percent*(this.isAxisX()?this.parent.scale.x:this.parent.scale.y);this.isAxisX()&&(this.parent.scale.x+=u),this.isAxisY()&&(this.parent.scale.y+=u),this.parent.emit("zoomed",{viewport:this.parent,type:"pinch",center:h});const d=this.parent.plugins.get("clamp-zoom",!0);if(d&&d.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{const f=this.parent.toGlobal(l);this.parent.x+=(h.x-f.x)*this.options.factor,this.parent.y+=(h.y-f.y)*this.options.factor,this.parent.emit("moved",{viewport:this.parent,type:"pinch"})}!this.options.noDrag&&this.lastCenter&&(this.parent.x+=(h.x-this.lastCenter.x)*this.options.factor,this.parent.y+=(h.y-this.lastCenter.y)*this.options.factor,this.parent.emit("moved",{viewport:this.parent,type:"pinch"})),this.lastCenter=h,this.moved=!0}else this.pinching||(this.parent.emit("pinch-start",this.parent),this.pinching=!0);return!0}return!1}up(){return this.pinching&&this.parent.input.touches.length<=1?(this.active=!1,this.lastCenter=null,this.pinching=!1,this.moved=!1,this.parent.emit("pinch-end",this.parent),!0):!1}}const FE={topLeft:!1,friction:.8,time:1e3,ease:"easeInOutSine",interrupt:!0,removeOnComplete:!1,removeOnInterrupt:!1,forceStart:!1};class DE extends ei{constructor(t,e,r,n={}){super(t),U(this,"options"),U(this,"ease"),U(this,"x"),U(this,"y"),U(this,"percent"),U(this,"snapping"),U(this,"deltaX"),U(this,"deltaY"),U(this,"startX"),U(this,"startY"),this.options=Object.assign({},FE,n),this.ease=Ll(n.ease,"easeInOutSine"),this.x=e,this.y=r,this.options.forceStart&&this.snapStart()}snapStart(){this.percent=0,this.snapping={time:0};const t=this.options.topLeft?this.parent.corner:this.parent.center;this.deltaX=this.x-t.x,this.deltaY=this.y-t.y,this.startX=t.x,this.startY=t.y,this.parent.emit("snap-start",this.parent)}wheel(){return this.options.removeOnInterrupt&&this.parent.plugins.remove("snap"),!1}down(){return this.options.removeOnInterrupt?this.parent.plugins.remove("snap"):this.options.interrupt&&(this.snapping=null),!1}up(){if(this.parent.input.count()===0){const t=this.parent.plugins.get("decelerate",!0);t&&(t.x||t.y)&&(t.percentChangeX=t.percentChangeY=this.options.friction)}return!1}update(t){if(!this.paused&&!(this.options.interrupt&&this.parent.input.count()!==0))if(this.snapping){const e=this.snapping;e.time+=t;let r,n,s;const o=this.startX,a=this.startY,l=this.deltaX,h=this.deltaY;if(e.time>this.options.time)r=!0,n=o+l,s=a+h;else{const c=this.ease(e.time,0,1,this.options.time);n=o+l*c,s=a+h*c}this.options.topLeft?this.parent.moveCorner(n,s):this.parent.moveCenter(n,s),this.parent.emit("moved",{viewport:this.parent,type:"snap"}),r&&(this.options.removeOnComplete&&this.parent.plugins.remove("snap"),this.parent.emit("snap-end",this.parent),this.snapping=null)}else{const e=this.options.topLeft?this.parent.corner:this.parent.center;(e.x!==this.x||e.y!==this.y)&&this.snapStart()}}}const NE={width:0,height:0,time:1e3,ease:"easeInOutSine",center:null,interrupt:!0,removeOnComplete:!1,removeOnInterrupt:!1,forceStart:!1,noMove:!1};class OE extends ei{constructor(t,e={}){super(t),U(this,"options"),U(this,"ease"),U(this,"xScale"),U(this,"yScale"),U(this,"xIndependent"),U(this,"yIndependent"),U(this,"snapping"),this.options=Object.assign({},NE,e),this.ease=Ll(this.options.ease),this.xIndependent=!1,this.yIndependent=!1,this.xScale=0,this.yScale=0,this.options.width>0&&(this.xScale=t.screenWidth/this.options.width,this.xIndependent=!0),this.options.height>0&&(this.yScale=t.screenHeight/this.options.height,this.yIndependent=!0),this.xScale=this.xIndependent?this.xScale:this.yScale,this.yScale=this.yIndependent?this.yScale:this.xScale,this.options.time===0?(t.container.scale.x=this.xScale,t.container.scale.y=this.yScale,this.options.removeOnComplete&&this.parent.plugins.remove("snap-zoom")):e.forceStart&&this.createSnapping()}createSnapping(){const t=this.parent.worldScreenWidth,e=this.parent.worldScreenHeight,r=this.parent.screenWidth/this.xScale,n=this.parent.screenHeight/this.yScale;this.snapping={time:0,startX:t,startY:e,deltaX:r-t,deltaY:n-e},this.parent.emit("snap-zoom-start",this.parent)}resize(){this.snapping=null,this.options.width>0&&(this.xScale=this.parent.screenWidth/this.options.width),this.options.height>0&&(this.yScale=this.parent.screenHeight/this.options.height),this.xScale=this.xIndependent?this.xScale:this.yScale,this.yScale=this.yIndependent?this.yScale:this.xScale}wheel(){return this.options.removeOnInterrupt&&this.parent.plugins.remove("snap-zoom"),!1}down(){return this.options.removeOnInterrupt?this.parent.plugins.remove("snap-zoom"):this.options.interrupt&&(this.snapping=null),!1}update(t){if(this.paused||this.options.interrupt&&this.parent.input.count()!==0)return;let e;if(!this.options.center&&!this.options.noMove&&(e=this.parent.center),!this.snapping)(this.parent.scale.x!==this.xScale||this.parent.scale.y!==this.yScale)&&this.createSnapping();else if(this.snapping){const r=this.snapping;if(r.time+=t,r.time>=this.options.time)this.parent.scale.set(this.xScale,this.yScale),this.options.removeOnComplete&&this.parent.plugins.remove("snap-zoom"),this.parent.emit("snap-zoom-end",this.parent),this.snapping=null;else{const s=this.snapping,o=this.ease(s.time,s.startX,s.deltaX,this.options.time),a=this.ease(s.time,s.startY,s.deltaY,this.options.time);this.parent.scale.x=this.parent.screenWidth/o,this.parent.scale.y=this.parent.screenHeight/a}const n=this.parent.plugins.get("clamp-zoom",!0);n&&n.clamp(),this.options.noMove||(this.options.center?this.parent.moveCenter(this.options.center):this.parent.moveCenter(e))}}resume(){this.snapping=null,super.resume()}}const BE={percent:.1,smooth:!1,interrupt:!0,reverse:!1,center:null,lineHeight:20,axis:"all",keyToPress:null,trackpadPinch:!1,wheelZoom:!0};class UE extends ei{constructor(t,e={}){super(t),U(this,"options"),U(this,"smoothing"),U(this,"smoothingCenter"),U(this,"smoothingCount"),U(this,"keyIsPressed"),this.options=Object.assign({},BE,e),this.keyIsPressed=!1,this.options.keyToPress&&this.handleKeyPresses(this.options.keyToPress)}handleKeyPresses(t){window.addEventListener("keydown",e=>{t.includes(e.code)&&(this.keyIsPressed=!0)}),window.addEventListener("keyup",e=>{t.includes(e.code)&&(this.keyIsPressed=!1)})}checkKeyPress(){return!this.options.keyToPress||this.keyIsPressed}down(){return this.options.interrupt&&(this.smoothing=null),!1}isAxisX(){return["all","x"].includes(this.options.axis)}isAxisY(){return["all","y"].includes(this.options.axis)}update(){if(this.smoothing){const t=this.smoothingCenter,e=this.smoothing;let r;this.options.center||(r=this.parent.toLocal(t)),this.isAxisX()&&(this.parent.scale.x+=e.x),this.isAxisY()&&(this.parent.scale.y+=e.y),this.parent.emit("zoomed",{viewport:this.parent,type:"wheel"});const n=this.parent.plugins.get("clamp-zoom",!0);if(n&&n.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{const s=this.parent.toGlobal(r);this.parent.x+=t.x-s.x,this.parent.y+=t.y-s.y}this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.smoothingCount++,this.smoothingCount>=this.options.smooth&&(this.smoothing=null)}}pinch(t){if(this.paused)return;const e=this.parent.input.getPointerPosition(t),r=-t.deltaY*(t.deltaMode?this.options.lineHeight:1)/200,n=Math.pow(2,(1+this.options.percent)*r);let s;this.options.center||(s=this.parent.toLocal(e)),this.isAxisX()&&(this.parent.scale.x*=n),this.isAxisY()&&(this.parent.scale.y*=n),this.parent.emit("zoomed",{viewport:this.parent,type:"wheel"});const o=this.parent.plugins.get("clamp-zoom",!0);if(o&&o.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{const a=this.parent.toGlobal(s);this.parent.x+=e.x-a.x,this.parent.y+=e.y-a.y}this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.parent.emit("wheel-start",{event:t,viewport:this.parent})}wheel(t){if(this.paused||!this.checkKeyPress())return!1;if(t.ctrlKey&&this.options.trackpadPinch)this.pinch(t);else if(this.options.wheelZoom){const e=this.parent.input.getPointerPosition(t),r=(this.options.reverse?-1:1)*-t.deltaY*(t.deltaMode?this.options.lineHeight:1)/500,n=Math.pow(2,(1+this.options.percent)*r);if(this.options.smooth){const s={x:this.smoothing?this.smoothing.x*(this.options.smooth-this.smoothingCount):0,y:this.smoothing?this.smoothing.y*(this.options.smooth-this.smoothingCount):0};this.smoothing={x:((this.parent.scale.x+s.x)*n-this.parent.scale.x)/this.options.smooth,y:((this.parent.scale.y+s.y)*n-this.parent.scale.y)/this.options.smooth},this.smoothingCount=0,this.smoothingCenter=e}else{let s;this.options.center||(s=this.parent.toLocal(e)),this.isAxisX()&&(this.parent.scale.x*=n),this.isAxisY()&&(this.parent.scale.y*=n),this.parent.emit("zoomed",{viewport:this.parent,type:"wheel"});const o=this.parent.plugins.get("clamp-zoom",!0);if(o&&o.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{const a=this.parent.toGlobal(s);this.parent.x+=e.x-a.x,this.parent.y+=e.y-a.y}}this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.parent.emit("wheel-start",{event:t,viewport:this.parent})}return!this.parent.options.passiveWheel}}class XE{constructor(t){U(this,"viewport"),U(this,"clickedAvailable"),U(this,"isMouseDown"),U(this,"last"),U(this,"wheelFunction"),U(this,"touches"),this.viewport=t,this.touches=[],this.addListeners()}addListeners(){this.viewport.interactive=!0,this.viewport.forceHitArea||(this.viewport.hitArea=new gt(0,0,this.viewport.worldWidth,this.viewport.worldHeight)),this.viewport.on("pointerdown",this.down,this),this.viewport.options.allowPreserveDragOutside?this.viewport.on("globalpointermove",this.move,this):this.viewport.on("pointermove",this.move,this),this.viewport.on("pointerup",this.up,this),this.viewport.on("pointerupoutside",this.up,this),this.viewport.on("pointercancel",this.up,this),this.viewport.options.allowPreserveDragOutside||this.viewport.on("pointerleave",this.up,this),this.wheelFunction=t=>this.handleWheel(t),this.viewport.options.events.domElement.addEventListener("wheel",this.wheelFunction,{passive:this.viewport.options.passiveWheel}),this.isMouseDown=!1}destroy(){this.viewport.options.events.domElement.removeEventListener("wheel",this.wheelFunction)}down(t){if(!(this.viewport.pause||!this.viewport.worldVisible)){if(t.pointerType==="mouse"?this.isMouseDown=!0:this.get(t.pointerId)||this.touches.push({id:t.pointerId,last:null}),this.count()===1){this.last=t.global.clone();const e=this.viewport.plugins.get("decelerate",!0),r=this.viewport.plugins.get("bounce",!0);(!e||!e.isActive())&&(!r||!r.isActive())?this.clickedAvailable=!0:this.clickedAvailable=!1}else this.clickedAvailable=!1;this.viewport.plugins.down(t)&&this.viewport.options.stopPropagation&&t.stopPropagation()}}clear(){this.isMouseDown=!1,this.touches=[],this.last=null}checkThreshold(t){return Math.abs(t)>=this.viewport.threshold}move(t){if(this.viewport.pause||!this.viewport.worldVisible)return;const e=this.viewport.plugins.move(t);if(this.clickedAvailable&&this.last){const r=t.global.x-this.last.x,n=t.global.y-this.last.y;(this.checkThreshold(r)||this.checkThreshold(n))&&(this.clickedAvailable=!1)}e&&this.viewport.options.stopPropagation&&t.stopPropagation()}up(t){if(this.viewport.pause||!this.viewport.worldVisible)return;t.pointerType==="mouse"&&(this.isMouseDown=!1),t.pointerType!=="mouse"&&this.remove(t.pointerId);const e=this.viewport.plugins.up(t);this.clickedAvailable&&this.count()===0&&this.last&&(this.viewport.emit("clicked",{event:t,screen:this.last,world:this.viewport.toWorld(this.last),viewport:this.viewport}),this.clickedAvailable=!1),e&&this.viewport.options.stopPropagation&&t.stopPropagation()}getPointerPosition(t){const e=new dt;return this.viewport.options.events.mapPositionToPoint(e,t.clientX,t.clientY),e}handleWheel(t){if(this.viewport.pause||!this.viewport.worldVisible)return;const e=this.viewport.toLocal(this.getPointerPosition(t));this.viewport.left<=e.x&&e.x<=this.viewport.right&&this.viewport.top<=e.y&&e.y<=this.viewport.bottom&&this.viewport.plugins.wheel(t)&&!this.viewport.options.passiveWheel&&t.preventDefault()}pause(){this.touches=[],this.isMouseDown=!1}get(t){for(const e of this.touches)if(e.id===t)return e;return null}remove(t){for(let e=0;e<this.touches.length;e++)if(this.touches[e].id===t){this.touches.splice(e,1);return}}count(){return(this.isMouseDown?1:0)+this.touches.length}}const Mo=["drag","pinch","wheel","follow","mouse-edges","decelerate","animate","bounce","snap-zoom","clamp-zoom","snap","clamp"];class WE{constructor(t){U(this,"plugins"),U(this,"list"),U(this,"viewport"),this.viewport=t,this.list=[],this.plugins={}}add(t,e,r=Mo.length){const n=this.plugins[t];n&&n.destroy(),this.plugins[t]=e;const s=Mo.indexOf(t);s!==-1&&Mo.splice(s,1),Mo.splice(r,0,t),this.sort()}get(t,e){var r;return e&&(r=this.plugins[t])!=null&&r.paused?null:this.plugins[t]}update(t){for(const e of this.list)e.update(t)}resize(){for(const t of this.list)t.resize()}reset(){for(const t of this.list)t.reset()}removeAll(){this.list.forEach(t=>{t.destroy()}),this.plugins={},this.sort()}remove(t){var e;this.plugins[t]&&((e=this.plugins[t])==null||e.destroy(),delete this.plugins[t],this.viewport.emit("plugin-remove",t),this.sort())}pause(t){var e;(e=this.plugins[t])==null||e.pause()}resume(t){var e;(e=this.plugins[t])==null||e.resume()}sort(){this.list=[];for(const t of Mo)this.plugins[t]&&this.list.push(this.plugins[t])}down(t){let e=!1;for(const r of this.list)r.down(t)&&(e=!0);return e}move(t){let e=!1;for(const r of this.viewport.plugins.list)r.move(t)&&(e=!0);return e}up(t){let e=!1;for(const r of this.list)r.up(t)&&(e=!0);return e}wheel(t){let e=!1;for(const r of this.list)r.wheel(t)&&(e=!0);return e}}const ZE={screenWidth:window.innerWidth,screenHeight:window.innerHeight,worldWidth:null,worldHeight:null,threshold:5,passiveWheel:!0,stopPropagation:!1,forceHitArea:null,noTicker:!1,disableOnContextMenu:!1,ticker:Se.shared,allowPreserveDragOutside:!1};class VE extends Ct{constructor(t){super(),U(this,"moving"),U(this,"screenWidth"),U(this,"screenHeight"),U(this,"threshold"),U(this,"input"),U(this,"plugins"),U(this,"zooming"),U(this,"lastViewport"),U(this,"options"),U(this,"_dirty"),U(this,"_forceHitArea"),U(this,"_hitAreaDefault"),U(this,"_pause"),U(this,"tickerFunction"),U(this,"_worldWidth"),U(this,"_worldHeight"),U(this,"_disableOnContextMenu",e=>e.preventDefault()),this.options={...ZE,...t},this.screenWidth=this.options.screenWidth,this.screenHeight=this.options.screenHeight,this._worldWidth=this.options.worldWidth,this._worldHeight=this.options.worldHeight,this.forceHitArea=this.options.forceHitArea,this.threshold=this.options.threshold,this.options.disableOnContextMenu&&this.options.events.domElement.addEventListener("contextmenu",this._disableOnContextMenu),this.options.noTicker||(this.tickerFunction=()=>this.update(this.options.ticker.elapsedMS),this.options.ticker.add(this.tickerFunction)),this.input=new XE(this),this.plugins=new WE(this)}destroy(t){!this.options.noTicker&&this.tickerFunction&&this.options.ticker.remove(this.tickerFunction),this.options.disableOnContextMenu&&this.options.events.domElement.removeEventListener("contextmenu",this._disableOnContextMenu),this.input.destroy(),super.destroy(t)}update(t){this.pause||(this.plugins.update(t),this.lastViewport&&(this.lastViewport.x!==this.x||this.lastViewport.y!==this.y?this.moving=!0:this.moving&&(this.emit("moved-end",this),this.moving=!1),this.lastViewport.scaleX!==this.scale.x||this.lastViewport.scaleY!==this.scale.y?this.zooming=!0:this.zooming&&(this.emit("zoomed-end",this),this.zooming=!1)),this.forceHitArea||(this._hitAreaDefault=new gt(this.left,this.top,this.worldScreenWidth,this.worldScreenHeight),this.hitArea=this._hitAreaDefault),this._dirty=this._dirty||!this.lastViewport||this.lastViewport.x!==this.x||this.lastViewport.y!==this.y||this.lastViewport.scaleX!==this.scale.x||this.lastViewport.scaleY!==this.scale.y,this.lastViewport={x:this.x,y:this.y,scaleX:this.scale.x,scaleY:this.scale.y},this.emit("frame-end",this))}resize(t=window.innerWidth,e=window.innerHeight,r,n){this.screenWidth=t,this.screenHeight=e,typeof r<"u"&&(this._worldWidth=r),typeof n<"u"&&(this._worldHeight=n),this.plugins.resize(),this.dirty=!0}get worldWidth(){return this._worldWidth?this._worldWidth:this.width/this.scale.x}set worldWidth(t){this._worldWidth=t,this.plugins.resize()}get worldHeight(){return this._worldHeight?this._worldHeight:this.height/this.scale.y}set worldHeight(t){this._worldHeight=t,this.plugins.resize()}getVisibleBounds(){return new gt(this.left,this.top,this.worldScreenWidth,this.worldScreenHeight)}toWorld(t,e){return arguments.length===2?this.toLocal(new dt(t,e)):this.toLocal(t)}toScreen(t,e){return arguments.length===2?this.toGlobal(new dt(t,e)):this.toGlobal(t)}get worldScreenWidth(){return this.screenWidth/this.scale.x}get worldScreenHeight(){return this.screenHeight/this.scale.y}get screenWorldWidth(){return this.worldWidth*this.scale.x}get screenWorldHeight(){return this.worldHeight*this.scale.y}get center(){return new dt(this.worldScreenWidth/2-this.x/this.scale.x,this.worldScreenHeight/2-this.y/this.scale.y)}set center(t){this.moveCenter(t)}moveCenter(...t){let e,r;typeof t[0]=="number"?(e=t[0],r=t[1]):(e=t[0].x,r=t[0].y);const n=(this.worldScreenWidth/2-e)*this.scale.x,s=(this.worldScreenHeight/2-r)*this.scale.y;return(this.x!==n||this.y!==s)&&(this.position.set(n,s),this.plugins.reset(),this.dirty=!0),this}get corner(){return new dt(-this.x/this.scale.x,-this.y/this.scale.y)}set corner(t){this.moveCorner(t)}moveCorner(...t){let e,r;return t.length===1?(e=-t[0].x*this.scale.x,r=-t[0].y*this.scale.y):(e=-t[0]*this.scale.x,r=-t[1]*this.scale.y),(e!==this.x||r!==this.y)&&(this.position.set(e,r),this.plugins.reset(),this.dirty=!0),this}get screenWidthInWorldPixels(){return this.screenWidth/this.scale.x}get screenHeightInWorldPixels(){return this.screenHeight/this.scale.y}findFitWidth(t){return this.screenWidth/t}findFitHeight(t){return this.screenHeight/t}findFit(t,e){const r=this.screenWidth/t,n=this.screenHeight/e;return Math.min(r,n)}findCover(t,e){const r=this.screenWidth/t,n=this.screenHeight/e;return Math.max(r,n)}fitWidth(t=this.worldWidth,e,r=!0,n){let s;e&&(s=this.center),this.scale.x=this.screenWidth/t,r&&(this.scale.y=this.scale.x);const o=this.plugins.get("clamp-zoom",!0);return!n&&o&&o.clamp(),e&&s&&this.moveCenter(s),this}fitHeight(t=this.worldHeight,e,r=!0,n){let s;e&&(s=this.center),this.scale.y=this.screenHeight/t,r&&(this.scale.x=this.scale.y);const o=this.plugins.get("clamp-zoom",!0);return!n&&o&&o.clamp(),e&&s&&this.moveCenter(s),this}fitWorld(t){let e;t&&(e=this.center),this.scale.x=this.screenWidth/this.worldWidth,this.scale.y=this.screenHeight/this.worldHeight,this.scale.x<this.scale.y?this.scale.y=this.scale.x:this.scale.x=this.scale.y;const r=this.plugins.get("clamp-zoom",!0);return r&&r.clamp(),t&&e&&this.moveCenter(e),this}fit(t,e=this.worldWidth,r=this.worldHeight){let n;t&&(n=this.center),this.scale.x=this.screenWidth/e,this.scale.y=this.screenHeight/r,this.scale.x<this.scale.y?this.scale.y=this.scale.x:this.scale.x=this.scale.y;const s=this.plugins.get("clamp-zoom",!0);return s&&s.clamp(),t&&n&&this.moveCenter(n),this}setZoom(t,e){let r;e&&(r=this.center),this.scale.set(t);const n=this.plugins.get("clamp-zoom",!0);return n&&n.clamp(),e&&r&&this.moveCenter(r),this}zoomPercent(t,e){return this.setZoom(this.scale.x+this.scale.x*t,e)}zoom(t,e){return this.fitWidth(t+this.worldScreenWidth,e),this}get scaled(){return this.scale.x}set scaled(t){this.setZoom(t,!0)}snapZoom(t){return this.plugins.add("snap-zoom",new OE(this,t)),this}OOB(){return{left:this.left<0,right:this.right>this.worldWidth,top:this.top<0,bottom:this.bottom>this.worldHeight,cornerPoint:new dt(this.worldWidth*this.scale.x-this.screenWidth,this.worldHeight*this.scale.y-this.screenHeight)}}get right(){return-this.x/this.scale.x+this.worldScreenWidth}set right(t){this.x=-t*this.scale.x+this.screenWidth,this.plugins.reset()}get left(){return-this.x/this.scale.x}set left(t){this.x=-t*this.scale.x,this.plugins.reset()}get top(){return-this.y/this.scale.y}set top(t){this.y=-t*this.scale.y,this.plugins.reset()}get bottom(){return-this.y/this.scale.y+this.worldScreenHeight}set bottom(t){this.y=-t*this.scale.y+this.screenHeight,this.plugins.reset()}get dirty(){return!!this._dirty}set dirty(t){this._dirty=t}get forceHitArea(){return this._forceHitArea}set forceHitArea(t){t?(this._forceHitArea=t,this.hitArea=t):(this._forceHitArea=null,this.hitArea=new gt(0,0,this.worldWidth,this.worldHeight))}drag(t){return this.plugins.add("drag",new AE(this,t)),this}clamp(t){return this.plugins.add("clamp",new wE(this,t)),this}decelerate(t){return this.plugins.add("decelerate",new EE(this,t)),this}bounce(t){return this.plugins.add("bounce",new _E(this,t)),this}pinch(t){return this.plugins.add("pinch",new kE(this,t)),this}snap(t,e,r){return this.plugins.add("snap",new DE(this,t,e,r)),this}follow(t,e){return this.plugins.add("follow",new RE(this,t,e)),this}wheel(t){return this.plugins.add("wheel",new UE(this,t)),this}animate(t){return this.plugins.add("animate",new bE(this,t)),this}clampZoom(t){return this.plugins.add("clamp-zoom",new SE(this,t)),this}mouseEdges(t){return this.plugins.add("mouse-edges",new LE(this,t)),this}get pause(){return!!this._pause}set pause(t){this._pause=t,this.lastViewport=null,this.moving=!1,this.zooming=!1,t&&this.input.pause()}ensureVisible(t,e,r,n,s){s&&(r>this.worldScreenWidth||n>this.worldScreenHeight)&&(this.fit(!0,r,n),this.emit("zoomed",{viewport:this,type:"ensureVisible"}));let o=!1;t<this.left?(this.left=t,o=!0):t+r>this.right&&(this.right=t+r,o=!0),e<this.top?(this.top=e,o=!0):e+n>this.bottom&&(this.bottom=e+n,o=!0),o&&this.emit("moved",{viewport:this,type:"ensureVisible"})}}function Gl(i,t){return i==null||t==null?NaN:i<t?-1:i>t?1:i>=t?0:NaN}function HE(i,t){return i==null||t==null?NaN:t<i?-1:t>i?1:t>=i?0:NaN}function dd(i){let t,e,r;i.length!==2?(t=Gl,e=(a,l)=>Gl(i(a),l),r=(a,l)=>i(a)-l):(t=i===Gl||i===HE?i:KE,e=i,r=i);function n(a,l,h=0,c=a.length){if(h<c){if(t(l,l)!==0)return c;do{const u=h+c>>>1;e(a[u],l)<0?h=u+1:c=u}while(h<c)}return h}function s(a,l,h=0,c=a.length){if(h<c){if(t(l,l)!==0)return c;do{const u=h+c>>>1;e(a[u],l)<=0?h=u+1:c=u}while(h<c)}return h}function o(a,l,h=0,c=a.length){const u=n(a,l,h,c-1);return u>h&&r(a[u-1],l)>-r(a[u],l)?u-1:u}return{left:n,center:o,right:s}}function KE(){return 0}function zE(i){return i===null?NaN:+i}const YE=dd(Gl).right;dd(zE).center;const jE=Math.sqrt(50),JE=Math.sqrt(10),$E=Math.sqrt(2);function kl(i,t,e){const r=(t-i)/Math.max(0,e),n=Math.floor(Math.log10(r)),s=r/Math.pow(10,n),o=s>=jE?10:s>=JE?5:s>=$E?2:1;let a,l,h;return n<0?(h=Math.pow(10,-n)/o,a=Math.round(i*h),l=Math.round(t*h),a/h<i&&++a,l/h>t&&--l,h=-h):(h=Math.pow(10,n)*o,a=Math.round(i/h),l=Math.round(t/h),a*h<i&&++a,l*h>t&&--l),l<a&&.5<=e&&e<2?kl(i,t,e*2):[a,l,h]}function QE(i,t,e){if(t=+t,i=+i,e=+e,!(e>0))return[];if(i===t)return[i];const r=t<i,[n,s,o]=r?kl(t,i,e):kl(i,t,e);if(!(s>=n))return[];const a=s-n+1,l=new Array(a);if(r)if(o<0)for(let h=0;h<a;++h)l[h]=(s-h)/-o;else for(let h=0;h<a;++h)l[h]=(s-h)*o;else if(o<0)for(let h=0;h<a;++h)l[h]=(n+h)/-o;else for(let h=0;h<a;++h)l[h]=(n+h)*o;return l}function fd(i,t,e){return t=+t,i=+i,e=+e,kl(i,t,e)[2]}function pd(i,t,e){t=+t,i=+i,e=+e;const r=t<i,n=r?fd(t,i,e):fd(i,t,e);return(r?-1:1)*(n<0?1/-n:n)}function md(i,t,e){i.prototype=t.prototype=e,e.constructor=i}function I1(i,t){var e=Object.create(i.prototype);for(var r in t)e[r]=t[r];return e}function Ro(){}var Po=.7,Fl=1/Po,Ss="\\s*([+-]?\\d+)\\s*",Lo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Bi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",qE=/^#([0-9a-f]{3,8})$/,tI=new RegExp(`^rgb\\(${Ss},${Ss},${Ss}\\)$`),eI=new RegExp(`^rgb\\(${Bi},${Bi},${Bi}\\)$`),iI=new RegExp(`^rgba\\(${Ss},${Ss},${Ss},${Lo}\\)$`),rI=new RegExp(`^rgba\\(${Bi},${Bi},${Bi},${Lo}\\)$`),nI=new RegExp(`^hsl\\(${Lo},${Bi},${Bi}\\)$`),sI=new RegExp(`^hsla\\(${Lo},${Bi},${Bi},${Lo}\\)$`),A1={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};md(Ro,Go,{copy(i){return Object.assign(new this.constructor,this,i)},displayable(){return this.rgb().displayable()},hex:M1,formatHex:M1,formatHex8:oI,formatHsl:aI,formatRgb:R1,toString:R1});function M1(){return this.rgb().formatHex()}function oI(){return this.rgb().formatHex8()}function aI(){return F1(this).formatHsl()}function R1(){return this.rgb().formatRgb()}function Go(i){var t,e;return i=(i+"").trim().toLowerCase(),(t=qE.exec(i))?(e=t[1].length,t=parseInt(t[1],16),e===6?P1(t):e===3?new Ge(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):e===8?Dl(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):e===4?Dl(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=tI.exec(i))?new Ge(t[1],t[2],t[3],1):(t=eI.exec(i))?new Ge(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=iI.exec(i))?Dl(t[1],t[2],t[3],t[4]):(t=rI.exec(i))?Dl(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=nI.exec(i))?k1(t[1],t[2]/100,t[3]/100,1):(t=sI.exec(i))?k1(t[1],t[2]/100,t[3]/100,t[4]):A1.hasOwnProperty(i)?P1(A1[i]):i==="transparent"?new Ge(NaN,NaN,NaN,0):null}function P1(i){return new Ge(i>>16&255,i>>8&255,i&255,1)}function Dl(i,t,e,r){return r<=0&&(i=t=e=NaN),new Ge(i,t,e,r)}function lI(i){return i instanceof Ro||(i=Go(i)),i?(i=i.rgb(),new Ge(i.r,i.g,i.b,i.opacity)):new Ge}function gd(i,t,e,r){return arguments.length===1?lI(i):new Ge(i,t,e,r??1)}function Ge(i,t,e,r){this.r=+i,this.g=+t,this.b=+e,this.opacity=+r}md(Ge,gd,I1(Ro,{brighter(i){return i=i==null?Fl:Math.pow(Fl,i),new Ge(this.r*i,this.g*i,this.b*i,this.opacity)},darker(i){return i=i==null?Po:Math.pow(Po,i),new Ge(this.r*i,this.g*i,this.b*i,this.opacity)},rgb(){return this},clamp(){return new Ge(kn(this.r),kn(this.g),kn(this.b),Nl(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:L1,formatHex:L1,formatHex8:hI,formatRgb:G1,toString:G1}));function L1(){return`#${Fn(this.r)}${Fn(this.g)}${Fn(this.b)}`}function hI(){return`#${Fn(this.r)}${Fn(this.g)}${Fn(this.b)}${Fn((isNaN(this.opacity)?1:this.opacity)*255)}`}function G1(){const i=Nl(this.opacity);return`${i===1?"rgb(":"rgba("}${kn(this.r)}, ${kn(this.g)}, ${kn(this.b)}${i===1?")":`, ${i})`}`}function Nl(i){return isNaN(i)?1:Math.max(0,Math.min(1,i))}function kn(i){return Math.max(0,Math.min(255,Math.round(i)||0))}function Fn(i){return i=kn(i),(i<16?"0":"")+i.toString(16)}function k1(i,t,e,r){return r<=0?i=t=e=NaN:e<=0||e>=1?i=t=NaN:t<=0&&(i=NaN),new mi(i,t,e,r)}function F1(i){if(i instanceof mi)return new mi(i.h,i.s,i.l,i.opacity);if(i instanceof Ro||(i=Go(i)),!i)return new mi;if(i instanceof mi)return i;i=i.rgb();var t=i.r/255,e=i.g/255,r=i.b/255,n=Math.min(t,e,r),s=Math.max(t,e,r),o=NaN,a=s-n,l=(s+n)/2;return a?(t===s?o=(e-r)/a+(e<r)*6:e===s?o=(r-t)/a+2:o=(t-e)/a+4,a/=l<.5?s+n:2-s-n,o*=60):a=l>0&&l<1?0:o,new mi(o,a,l,i.opacity)}function cI(i,t,e,r){return arguments.length===1?F1(i):new mi(i,t,e,r??1)}function mi(i,t,e,r){this.h=+i,this.s=+t,this.l=+e,this.opacity=+r}md(mi,cI,I1(Ro,{brighter(i){return i=i==null?Fl:Math.pow(Fl,i),new mi(this.h,this.s,this.l*i,this.opacity)},darker(i){return i=i==null?Po:Math.pow(Po,i),new mi(this.h,this.s,this.l*i,this.opacity)},rgb(){var i=this.h%360+(this.h<0)*360,t=isNaN(i)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*t,n=2*e-r;return new Ge(yd(i>=240?i-240:i+120,n,r),yd(i,n,r),yd(i<120?i+240:i-120,n,r),this.opacity)},clamp(){return new mi(D1(this.h),Ol(this.s),Ol(this.l),Nl(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const i=Nl(this.opacity);return`${i===1?"hsl(":"hsla("}${D1(this.h)}, ${Ol(this.s)*100}%, ${Ol(this.l)*100}%${i===1?")":`, ${i})`}`}}));function D1(i){return i=(i||0)%360,i<0?i+360:i}function Ol(i){return Math.max(0,Math.min(1,i||0))}function yd(i,t,e){return(i<60?t+(e-t)*i/60:i<180?e:i<240?t+(e-t)*(240-i)/60:t)*255}const bd=i=>()=>i;function uI(i,t){return function(e){return i+e*t}}function dI(i,t,e){return i=Math.pow(i,e),t=Math.pow(t,e)-i,e=1/e,function(r){return Math.pow(i+r*t,e)}}function fI(i){return(i=+i)==1?N1:function(t,e){return e-t?dI(t,e,i):bd(isNaN(t)?e:t)}}function N1(i,t){var e=t-i;return e?uI(i,e):bd(isNaN(i)?t:i)}const O1=function i(t){var e=fI(t);function r(n,s){var o=e((n=gd(n)).r,(s=gd(s)).r),a=e(n.g,s.g),l=e(n.b,s.b),h=N1(n.opacity,s.opacity);return function(c){return n.r=o(c),n.g=a(c),n.b=l(c),n.opacity=h(c),n+""}}return r.gamma=i,r}(1);function pI(i,t){t||(t=[]);var e=i?Math.min(t.length,i.length):0,r=t.slice(),n;return function(s){for(n=0;n<e;++n)r[n]=i[n]*(1-s)+t[n]*s;return r}}function mI(i){return ArrayBuffer.isView(i)&&!(i instanceof DataView)}function gI(i,t){var e=t?t.length:0,r=i?Math.min(e,i.length):0,n=new Array(r),s=new Array(e),o;for(o=0;o<r;++o)n[o]=vd(i[o],t[o]);for(;o<e;++o)s[o]=t[o];return function(a){for(o=0;o<r;++o)s[o]=n[o](a);return s}}function yI(i,t){var e=new Date;return i=+i,t=+t,function(r){return e.setTime(i*(1-r)+t*r),e}}function Bl(i,t){return i=+i,t=+t,function(e){return i*(1-e)+t*e}}function bI(i,t){var e={},r={},n;(i===null||typeof i!="object")&&(i={}),(t===null||typeof t!="object")&&(t={});for(n in t)n in i?e[n]=vd(i[n],t[n]):r[n]=t[n];return function(s){for(n in e)r[n]=e[n](s);return r}}var xd=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,_d=new RegExp(xd.source,"g");function xI(i){return function(){return i}}function _I(i){return function(t){return i(t)+""}}function vI(i,t){var e=xd.lastIndex=_d.lastIndex=0,r,n,s,o=-1,a=[],l=[];for(i=i+"",t=t+"";(r=xd.exec(i))&&(n=_d.exec(t));)(s=n.index)>e&&(s=t.slice(e,s),a[o]?a[o]+=s:a[++o]=s),(r=r[0])===(n=n[0])?a[o]?a[o]+=n:a[++o]=n:(a[++o]=null,l.push({i:o,x:Bl(r,n)})),e=_d.lastIndex;return e<t.length&&(s=t.slice(e),a[o]?a[o]+=s:a[++o]=s),a.length<2?l[0]?_I(l[0].x):xI(t):(t=l.length,function(h){for(var c=0,u;c<t;++c)a[(u=l[c]).i]=u.x(h);return a.join("")})}function vd(i,t){var e=typeof t,r;return t==null||e==="boolean"?bd(t):(e==="number"?Bl:e==="string"?(r=Go(t))?(t=r,O1):vI:t instanceof Go?O1:t instanceof Date?yI:mI(t)?pI:Array.isArray(t)?gI:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?bI:Bl)(i,t)}function wI(i,t){return i=+i,t=+t,function(e){return Math.round(i*(1-e)+t*e)}}function TI(i){return Math.abs(i=Math.round(i))>=1e21?i.toLocaleString("en").replace(/,/g,""):i.toString(10)}function Ul(i,t){if((e=(i=t?i.toExponential(t-1):i.toExponential()).indexOf("e"))<0)return null;var e,r=i.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+i.slice(e+1)]}function Cs(i){return i=Ul(Math.abs(i)),i?i[1]:NaN}function SI(i,t){return function(e,r){for(var n=e.length,s=[],o=0,a=i[0],l=0;n>0&&a>0&&(l+a+1>r&&(a=Math.max(1,r-l)),s.push(e.substring(n-=a,n+a)),!((l+=a+1)>r));)a=i[o=(o+1)%i.length];return s.reverse().join(t)}}function CI(i){return function(t){return t.replace(/[0-9]/g,function(e){return i[+e]})}}var EI=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Xl(i){if(!(t=EI.exec(i)))throw new Error("invalid format: "+i);var t;return new wd({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Xl.prototype=wd.prototype;function wd(i){this.fill=i.fill===void 0?" ":i.fill+"",this.align=i.align===void 0?">":i.align+"",this.sign=i.sign===void 0?"-":i.sign+"",this.symbol=i.symbol===void 0?"":i.symbol+"",this.zero=!!i.zero,this.width=i.width===void 0?void 0:+i.width,this.comma=!!i.comma,this.precision=i.precision===void 0?void 0:+i.precision,this.trim=!!i.trim,this.type=i.type===void 0?"":i.type+""}wd.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function II(i){t:for(var t=i.length,e=1,r=-1,n;e<t;++e)switch(i[e]){case".":r=n=e;break;case"0":r===0&&(r=e),n=e;break;default:if(!+i[e])break t;r>0&&(r=0);break}return r>0?i.slice(0,r)+i.slice(n+1):i}var B1;function AI(i,t){var e=Ul(i,t);if(!e)return i+"";var r=e[0],n=e[1],s=n-(B1=Math.max(-8,Math.min(8,Math.floor(n/3)))*3)+1,o=r.length;return s===o?r:s>o?r+new Array(s-o+1).join("0"):s>0?r.slice(0,s)+"."+r.slice(s):"0."+new Array(1-s).join("0")+Ul(i,Math.max(0,t+s-1))[0]}function U1(i,t){var e=Ul(i,t);if(!e)return i+"";var r=e[0],n=e[1];return n<0?"0."+new Array(-n).join("0")+r:r.length>n+1?r.slice(0,n+1)+"."+r.slice(n+1):r+new Array(n-r.length+2).join("0")}const X1={"%":(i,t)=>(i*100).toFixed(t),b:i=>Math.round(i).toString(2),c:i=>i+"",d:TI,e:(i,t)=>i.toExponential(t),f:(i,t)=>i.toFixed(t),g:(i,t)=>i.toPrecision(t),o:i=>Math.round(i).toString(8),p:(i,t)=>U1(i*100,t),r:U1,s:AI,X:i=>Math.round(i).toString(16).toUpperCase(),x:i=>Math.round(i).toString(16)};function W1(i){return i}var Z1=Array.prototype.map,V1=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function MI(i){var t=i.grouping===void 0||i.thousands===void 0?W1:SI(Z1.call(i.grouping,Number),i.thousands+""),e=i.currency===void 0?"":i.currency[0]+"",r=i.currency===void 0?"":i.currency[1]+"",n=i.decimal===void 0?".":i.decimal+"",s=i.numerals===void 0?W1:CI(Z1.call(i.numerals,String)),o=i.percent===void 0?"%":i.percent+"",a=i.minus===void 0?"−":i.minus+"",l=i.nan===void 0?"NaN":i.nan+"";function h(u){u=Xl(u);var d=u.fill,f=u.align,p=u.sign,m=u.symbol,g=u.zero,y=u.width,x=u.comma,b=u.precision,v=u.trim,w=u.type;w==="n"?(x=!0,w="g"):X1[w]||(b===void 0&&(b=12),v=!0,w="g"),(g||d==="0"&&f==="=")&&(g=!0,d="0",f="=");var S=m==="$"?e:m==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",E=m==="$"?r:/[%p]/.test(w)?o:"",I=X1[w],A=/[defgprs%]/.test(w);b=b===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b));function L(G){var F=S,M=E,N,W,K;if(w==="c")M=I(G)+M,G="";else{G=+G;var H=G<0||1/G<0;if(G=isNaN(G)?l:I(Math.abs(G),b),v&&(G=II(G)),H&&+G==0&&p!=="+"&&(H=!1),F=(H?p==="("?p:a:p==="-"||p==="("?"":p)+F,M=(w==="s"?V1[8+B1/3]:"")+M+(H&&p==="("?")":""),A){for(N=-1,W=G.length;++N<W;)if(K=G.charCodeAt(N),48>K||K>57){M=(K===46?n+G.slice(N+1):G.slice(N))+M,G=G.slice(0,N);break}}}x&&!g&&(G=t(G,1/0));var j=F.length+G.length+M.length,B=j<y?new Array(y-j+1).join(d):"";switch(x&&g&&(G=t(B+G,B.length?y-M.length:1/0),B=""),f){case"<":G=F+G+M+B;break;case"=":G=F+B+G+M;break;case"^":G=B.slice(0,j=B.length>>1)+F+G+M+B.slice(j);break;default:G=B+F+G+M;break}return s(G)}return L.toString=function(){return u+""},L}function c(u,d){var f=h((u=Xl(u),u.type="f",u)),p=Math.max(-8,Math.min(8,Math.floor(Cs(d)/3)))*3,m=Math.pow(10,-p),g=V1[8+p/3];return function(y){return f(m*y)+g}}return{format:h,formatPrefix:c}}var Wl,H1,K1;RI({thousands:",",grouping:[3],currency:["$",""]});function RI(i){return Wl=MI(i),H1=Wl.format,K1=Wl.formatPrefix,Wl}function PI(i){return Math.max(0,-Cs(Math.abs(i)))}function LI(i,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Cs(t)/3)))*3-Cs(Math.abs(i)))}function GI(i,t){return i=Math.abs(i),t=Math.abs(t)-i,Math.max(0,Cs(t)-Cs(i))+1}function z1(i,t){switch(arguments.length){case 0:break;case 1:this.range(i);break;default:this.range(t).domain(i);break}return this}function kI(i){return function(){return i}}function FI(i){return+i}var Y1=[0,1];function Es(i){return i}function Td(i,t){return(t-=i=+i)?function(e){return(e-i)/t}:kI(isNaN(t)?NaN:.5)}function DI(i,t){var e;return i>t&&(e=i,i=t,t=e),function(r){return Math.max(i,Math.min(t,r))}}function NI(i,t,e){var r=i[0],n=i[1],s=t[0],o=t[1];return n<r?(r=Td(n,r),s=e(o,s)):(r=Td(r,n),s=e(s,o)),function(a){return s(r(a))}}function OI(i,t,e){var r=Math.min(i.length,t.length)-1,n=new Array(r),s=new Array(r),o=-1;for(i[r]<i[0]&&(i=i.slice().reverse(),t=t.slice().reverse());++o<r;)n[o]=Td(i[o],i[o+1]),s[o]=e(t[o],t[o+1]);return function(a){var l=YE(i,a,1,r)-1;return s[l](n[l](a))}}function j1(i,t){return t.domain(i.domain()).range(i.range()).interpolate(i.interpolate()).clamp(i.clamp()).unknown(i.unknown())}function BI(){var i=Y1,t=Y1,e=vd,r,n,s,o=Es,a,l,h;function c(){var d=Math.min(i.length,t.length);return o!==Es&&(o=DI(i[0],i[d-1])),a=d>2?OI:NI,l=h=null,u}function u(d){return d==null||isNaN(d=+d)?s:(l||(l=a(i.map(r),t,e)))(r(o(d)))}return u.invert=function(d){return o(n((h||(h=a(t,i.map(r),Bl)))(d)))},u.domain=function(d){return arguments.length?(i=Array.from(d,FI),c()):i.slice()},u.range=function(d){return arguments.length?(t=Array.from(d),c()):t.slice()},u.rangeRound=function(d){return t=Array.from(d),e=wI,c()},u.clamp=function(d){return arguments.length?(o=d?!0:Es,c()):o!==Es},u.interpolate=function(d){return arguments.length?(e=d,c()):e},u.unknown=function(d){return arguments.length?(s=d,u):s},function(d,f){return r=d,n=f,c()}}function J1(){return BI()(Es,Es)}function UI(i,t,e,r){var n=pd(i,t,e),s;switch(r=Xl(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(i),Math.abs(t));return r.precision==null&&!isNaN(s=LI(n,o))&&(r.precision=s),K1(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(s=GI(n,Math.max(Math.abs(i),Math.abs(t))))&&(r.precision=s-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(s=PI(n))&&(r.precision=s-(r.type==="%")*2);break}}return H1(r)}function XI(i){var t=i.domain;return i.ticks=function(e){var r=t();return QE(r[0],r[r.length-1],e??10)},i.tickFormat=function(e,r){var n=t();return UI(n[0],n[n.length-1],e??10,r)},i.nice=function(e){e==null&&(e=10);var r=t(),n=0,s=r.length-1,o=r[n],a=r[s],l,h,c=10;for(a<o&&(h=o,o=a,a=h,h=n,n=s,s=h);c-- >0;){if(h=fd(o,a,e),h===l)return r[n]=o,r[s]=a,t(r);if(h>0)o=Math.floor(o/h)*h,a=Math.ceil(a/h)*h;else if(h<0)o=Math.ceil(o*h)/h,a=Math.floor(a*h)/h;else break;l=h}return i},i}function $1(){var i=J1();return i.copy=function(){return j1(i,$1())},z1.apply(i,arguments),XI(i)}function WI(i,t){i=i.slice();var e=0,r=i.length-1,n=i[e],s=i[r],o;return s<n&&(o=e,e=r,r=o,o=n,n=s,s=o),i[e]=t.floor(n),i[r]=t.ceil(s),i}const Sd=new Date,Cd=new Date;function se(i,t,e,r){function n(s){return i(s=arguments.length===0?new Date:new Date(+s)),s}return n.floor=s=>(i(s=new Date(+s)),s),n.ceil=s=>(i(s=new Date(s-1)),t(s,1),i(s),s),n.round=s=>{const o=n(s),a=n.ceil(s);return s-o<a-s?o:a},n.offset=(s,o)=>(t(s=new Date(+s),o==null?1:Math.floor(o)),s),n.range=(s,o,a)=>{const l=[];if(s=n.ceil(s),a=a==null?1:Math.floor(a),!(s<o)||!(a>0))return l;let h;do l.push(h=new Date(+s)),t(s,a),i(s);while(h<s&&s<o);return l},n.filter=s=>se(o=>{if(o>=o)for(;i(o),!s(o);)o.setTime(o-1)},(o,a)=>{if(o>=o)if(a<0)for(;++a<=0;)for(;t(o,-1),!s(o););else for(;--a>=0;)for(;t(o,1),!s(o););}),e&&(n.count=(s,o)=>(Sd.setTime(+s),Cd.setTime(+o),i(Sd),i(Cd),Math.floor(e(Sd,Cd))),n.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?n.filter(r?o=>r(o)%s===0:o=>n.count(0,o)%s===0):n)),n}const Zl=se(()=>{},(i,t)=>{i.setTime(+i+t)},(i,t)=>t-i);Zl.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?se(t=>{t.setTime(Math.floor(t/i)*i)},(t,e)=>{t.setTime(+t+e*i)},(t,e)=>(e-t)/i):Zl),Zl.range;const ur=1e3,ii=ur*60,dr=ii*60,fr=dr*24,Ed=fr*7,Q1=fr*30,Id=fr*365,Is=se(i=>{i.setTime(i-i.getMilliseconds())},(i,t)=>{i.setTime(+i+t*ur)},(i,t)=>(t-i)/ur,i=>i.getUTCSeconds());Is.range;const Ad=se(i=>{i.setTime(i-i.getMilliseconds()-i.getSeconds()*ur)},(i,t)=>{i.setTime(+i+t*ii)},(i,t)=>(t-i)/ii,i=>i.getMinutes());Ad.range,se(i=>{i.setUTCSeconds(0,0)},(i,t)=>{i.setTime(+i+t*ii)},(i,t)=>(t-i)/ii,i=>i.getUTCMinutes()).range;const Md=se(i=>{i.setTime(i-i.getMilliseconds()-i.getSeconds()*ur-i.getMinutes()*ii)},(i,t)=>{i.setTime(+i+t*dr)},(i,t)=>(t-i)/dr,i=>i.getHours());Md.range,se(i=>{i.setUTCMinutes(0,0,0)},(i,t)=>{i.setTime(+i+t*dr)},(i,t)=>(t-i)/dr,i=>i.getUTCHours()).range;const ko=se(i=>i.setHours(0,0,0,0),(i,t)=>i.setDate(i.getDate()+t),(i,t)=>(t-i-(t.getTimezoneOffset()-i.getTimezoneOffset())*ii)/fr,i=>i.getDate()-1);ko.range;const Rd=se(i=>{i.setUTCHours(0,0,0,0)},(i,t)=>{i.setUTCDate(i.getUTCDate()+t)},(i,t)=>(t-i)/fr,i=>i.getUTCDate()-1);Rd.range,se(i=>{i.setUTCHours(0,0,0,0)},(i,t)=>{i.setUTCDate(i.getUTCDate()+t)},(i,t)=>(t-i)/fr,i=>Math.floor(i/fr)).range;function Dn(i){return se(t=>{t.setDate(t.getDate()-(t.getDay()+7-i)%7),t.setHours(0,0,0,0)},(t,e)=>{t.setDate(t.getDate()+e*7)},(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ii)/Ed)}const Vl=Dn(0),Hl=Dn(1),ZI=Dn(2),VI=Dn(3),As=Dn(4),HI=Dn(5),KI=Dn(6);Vl.range,Hl.range,ZI.range,VI.range,As.range,HI.range,KI.range;function Nn(i){return se(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-i)%7),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e*7)},(t,e)=>(e-t)/Ed)}const q1=Nn(0),Kl=Nn(1),zI=Nn(2),YI=Nn(3),Ms=Nn(4),jI=Nn(5),JI=Nn(6);q1.range,Kl.range,zI.range,YI.range,Ms.range,jI.range,JI.range;const Pd=se(i=>{i.setDate(1),i.setHours(0,0,0,0)},(i,t)=>{i.setMonth(i.getMonth()+t)},(i,t)=>t.getMonth()-i.getMonth()+(t.getFullYear()-i.getFullYear())*12,i=>i.getMonth());Pd.range,se(i=>{i.setUTCDate(1),i.setUTCHours(0,0,0,0)},(i,t)=>{i.setUTCMonth(i.getUTCMonth()+t)},(i,t)=>t.getUTCMonth()-i.getUTCMonth()+(t.getUTCFullYear()-i.getUTCFullYear())*12,i=>i.getUTCMonth()).range;const pr=se(i=>{i.setMonth(0,1),i.setHours(0,0,0,0)},(i,t)=>{i.setFullYear(i.getFullYear()+t)},(i,t)=>t.getFullYear()-i.getFullYear(),i=>i.getFullYear());pr.every=i=>!isFinite(i=Math.floor(i))||!(i>0)?null:se(t=>{t.setFullYear(Math.floor(t.getFullYear()/i)*i),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e*i)}),pr.range;const On=se(i=>{i.setUTCMonth(0,1),i.setUTCHours(0,0,0,0)},(i,t)=>{i.setUTCFullYear(i.getUTCFullYear()+t)},(i,t)=>t.getUTCFullYear()-i.getUTCFullYear(),i=>i.getUTCFullYear());On.every=i=>!isFinite(i=Math.floor(i))||!(i>0)?null:se(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/i)*i),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e*i)}),On.range;function $I(i,t,e,r,n,s){const o=[[Is,1,ur],[Is,5,5*ur],[Is,15,15*ur],[Is,30,30*ur],[s,1,ii],[s,5,5*ii],[s,15,15*ii],[s,30,30*ii],[n,1,dr],[n,3,3*dr],[n,6,6*dr],[n,12,12*dr],[r,1,fr],[r,2,2*fr],[e,1,Ed],[t,1,Q1],[t,3,3*Q1],[i,1,Id]];function a(h,c,u){const d=c<h;d&&([h,c]=[c,h]);const f=u&&typeof u.range=="function"?u:l(h,c,u),p=f?f.range(h,+c+1):[];return d?p.reverse():p}function l(h,c,u){const d=Math.abs(c-h)/u,f=dd(([,,g])=>g).right(o,d);if(f===o.length)return i.every(pd(h/Id,c/Id,u));if(f===0)return Zl.every(Math.max(pd(h,c,u),1));const[p,m]=o[d/o[f-1][2]<o[f][2]/d?f-1:f];return p.every(m)}return[a,l]}const[QI,qI]=$I(pr,Pd,Vl,ko,Md,Ad);function Ld(i){if(0<=i.y&&i.y<100){var t=new Date(-1,i.m,i.d,i.H,i.M,i.S,i.L);return t.setFullYear(i.y),t}return new Date(i.y,i.m,i.d,i.H,i.M,i.S,i.L)}function Gd(i){if(0<=i.y&&i.y<100){var t=new Date(Date.UTC(-1,i.m,i.d,i.H,i.M,i.S,i.L));return t.setUTCFullYear(i.y),t}return new Date(Date.UTC(i.y,i.m,i.d,i.H,i.M,i.S,i.L))}function Fo(i,t,e){return{y:i,m:t,d:e,H:0,M:0,S:0,L:0}}function t3(i){var t=i.dateTime,e=i.date,r=i.time,n=i.periods,s=i.days,o=i.shortDays,a=i.months,l=i.shortMonths,h=Do(n),c=No(n),u=Do(s),d=No(s),f=Do(o),p=No(o),m=Do(a),g=No(a),y=Do(l),x=No(l),b={a:H,A:j,b:B,B:D,c:null,d:sy,e:sy,f:T3,g:G3,G:F3,H:_3,I:v3,j:w3,L:oy,m:S3,M:C3,p:k,q:V,Q:dy,s:fy,S:E3,u:I3,U:A3,V:M3,w:R3,W:P3,x:null,X:null,y:L3,Y:k3,Z:D3,"%":uy},v={a:et,A:ft,b:at,B:Tt,c:null,d:ly,e:ly,f:U3,g:J3,G:Q3,H:N3,I:O3,j:B3,L:hy,m:X3,M:W3,p:It,q:Q,Q:dy,s:fy,S:Z3,u:V3,U:H3,V:K3,w:z3,W:Y3,x:null,X:null,y:j3,Y:$3,Z:q3,"%":uy},w={a:L,A:G,b:F,B:M,c:N,d:ry,e:ry,f:g3,g:iy,G:ey,H:ny,I:ny,j:d3,L:m3,m:u3,M:f3,p:A,q:c3,Q:b3,s:x3,S:p3,u:s3,U:o3,V:a3,w:n3,W:l3,x:W,X:K,y:iy,Y:ey,Z:h3,"%":y3};b.x=S(e,b),b.X=S(r,b),b.c=S(t,b),v.x=S(e,v),v.X=S(r,v),v.c=S(t,v);function S(Z,J){return function($){var O=[],pt=-1,yt=0,Rt=Z.length,Bt,Fe,Ve;for($ instanceof Date||($=new Date(+$));++pt<Rt;)Z.charCodeAt(pt)===37&&(O.push(Z.slice(yt,pt)),(Fe=ty[Bt=Z.charAt(++pt)])!=null?Bt=Z.charAt(++pt):Fe=Bt==="e"?" ":"0",(Ve=J[Bt])&&(Bt=Ve($,Fe)),O.push(Bt),yt=pt+1);return O.push(Z.slice(yt,pt)),O.join("")}}function E(Z,J){return function($){var O=Fo(1900,void 0,1),pt=I(O,Z,$+="",0),yt,Rt;if(pt!=$.length)return null;if("Q"in O)return new Date(O.Q);if("s"in O)return new Date(O.s*1e3+("L"in O?O.L:0));if(J&&!("Z"in O)&&(O.Z=0),"p"in O&&(O.H=O.H%12+O.p*12),O.m===void 0&&(O.m="q"in O?O.q:0),"V"in O){if(O.V<1||O.V>53)return null;"w"in O||(O.w=1),"Z"in O?(yt=Gd(Fo(O.y,0,1)),Rt=yt.getUTCDay(),yt=Rt>4||Rt===0?Kl.ceil(yt):Kl(yt),yt=Rd.offset(yt,(O.V-1)*7),O.y=yt.getUTCFullYear(),O.m=yt.getUTCMonth(),O.d=yt.getUTCDate()+(O.w+6)%7):(yt=Ld(Fo(O.y,0,1)),Rt=yt.getDay(),yt=Rt>4||Rt===0?Hl.ceil(yt):Hl(yt),yt=ko.offset(yt,(O.V-1)*7),O.y=yt.getFullYear(),O.m=yt.getMonth(),O.d=yt.getDate()+(O.w+6)%7)}else("W"in O||"U"in O)&&("w"in O||(O.w="u"in O?O.u%7:"W"in O?1:0),Rt="Z"in O?Gd(Fo(O.y,0,1)).getUTCDay():Ld(Fo(O.y,0,1)).getDay(),O.m=0,O.d="W"in O?(O.w+6)%7+O.W*7-(Rt+5)%7:O.w+O.U*7-(Rt+6)%7);return"Z"in O?(O.H+=O.Z/100|0,O.M+=O.Z%100,Gd(O)):Ld(O)}}function I(Z,J,$,O){for(var pt=0,yt=J.length,Rt=$.length,Bt,Fe;pt<yt;){if(O>=Rt)return-1;if(Bt=J.charCodeAt(pt++),Bt===37){if(Bt=J.charAt(pt++),Fe=w[Bt in ty?J.charAt(pt++):Bt],!Fe||(O=Fe(Z,$,O))<0)return-1}else if(Bt!=$.charCodeAt(O++))return-1}return O}function A(Z,J,$){var O=h.exec(J.slice($));return O?(Z.p=c.get(O[0].toLowerCase()),$+O[0].length):-1}function L(Z,J,$){var O=f.exec(J.slice($));return O?(Z.w=p.get(O[0].toLowerCase()),$+O[0].length):-1}function G(Z,J,$){var O=u.exec(J.slice($));return O?(Z.w=d.get(O[0].toLowerCase()),$+O[0].length):-1}function F(Z,J,$){var O=y.exec(J.slice($));return O?(Z.m=x.get(O[0].toLowerCase()),$+O[0].length):-1}function M(Z,J,$){var O=m.exec(J.slice($));return O?(Z.m=g.get(O[0].toLowerCase()),$+O[0].length):-1}function N(Z,J,$){return I(Z,t,J,$)}function W(Z,J,$){return I(Z,e,J,$)}function K(Z,J,$){return I(Z,r,J,$)}function H(Z){return o[Z.getDay()]}function j(Z){return s[Z.getDay()]}function B(Z){return l[Z.getMonth()]}function D(Z){return a[Z.getMonth()]}function k(Z){return n[+(Z.getHours()>=12)]}function V(Z){return 1+~~(Z.getMonth()/3)}function et(Z){return o[Z.getUTCDay()]}function ft(Z){return s[Z.getUTCDay()]}function at(Z){return l[Z.getUTCMonth()]}function Tt(Z){return a[Z.getUTCMonth()]}function It(Z){return n[+(Z.getUTCHours()>=12)]}function Q(Z){return 1+~~(Z.getUTCMonth()/3)}return{format:function(Z){var J=S(Z+="",b);return J.toString=function(){return Z},J},parse:function(Z){var J=E(Z+="",!1);return J.toString=function(){return Z},J},utcFormat:function(Z){var J=S(Z+="",v);return J.toString=function(){return Z},J},utcParse:function(Z){var J=E(Z+="",!0);return J.toString=function(){return Z},J}}}var ty={"-":"",_:" ",0:"0"},de=/^\s*\d+/,e3=/^%/,i3=/[\\^$*+?|[\]().{}]/g;function Mt(i,t,e){var r=i<0?"-":"",n=(r?-i:i)+"",s=n.length;return r+(s<e?new Array(e-s+1).join(t)+n:n)}function r3(i){return i.replace(i3,"\\$&")}function Do(i){return new RegExp("^(?:"+i.map(r3).join("|")+")","i")}function No(i){return new Map(i.map((t,e)=>[t.toLowerCase(),e]))}function n3(i,t,e){var r=de.exec(t.slice(e,e+1));return r?(i.w=+r[0],e+r[0].length):-1}function s3(i,t,e){var r=de.exec(t.slice(e,e+1));return r?(i.u=+r[0],e+r[0].length):-1}function o3(i,t,e){var r=de.exec(t.slice(e,e+2));return r?(i.U=+r[0],e+r[0].length):-1}function a3(i,t,e){var r=de.exec(t.slice(e,e+2));return r?(i.V=+r[0],e+r[0].length):-1}function l3(i,t,e){var r=de.exec(t.slice(e,e+2));return r?(i.W=+r[0],e+r[0].length):-1}function ey(i,t,e){var r=de.exec(t.slice(e,e+4));return r?(i.y=+r[0],e+r[0].length):-1}function iy(i,t,e){var r=de.exec(t.slice(e,e+2));return r?(i.y=+r[0]+(+r[0]>68?1900:2e3),e+r[0].length):-1}function h3(i,t,e){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(e,e+6));return r?(i.Z=r[1]?0:-(r[2]+(r[3]||"00")),e+r[0].length):-1}function c3(i,t,e){var r=de.exec(t.slice(e,e+1));return r?(i.q=r[0]*3-3,e+r[0].length):-1}function u3(i,t,e){var r=de.exec(t.slice(e,e+2));return r?(i.m=r[0]-1,e+r[0].length):-1}function ry(i,t,e){var r=de.exec(t.slice(e,e+2));return r?(i.d=+r[0],e+r[0].length):-1}function d3(i,t,e){var r=de.exec(t.slice(e,e+3));return r?(i.m=0,i.d=+r[0],e+r[0].length):-1}function ny(i,t,e){var r=de.exec(t.slice(e,e+2));return r?(i.H=+r[0],e+r[0].length):-1}function f3(i,t,e){var r=de.exec(t.slice(e,e+2));return r?(i.M=+r[0],e+r[0].length):-1}function p3(i,t,e){var r=de.exec(t.slice(e,e+2));return r?(i.S=+r[0],e+r[0].length):-1}function m3(i,t,e){var r=de.exec(t.slice(e,e+3));return r?(i.L=+r[0],e+r[0].length):-1}function g3(i,t,e){var r=de.exec(t.slice(e,e+6));return r?(i.L=Math.floor(r[0]/1e3),e+r[0].length):-1}function y3(i,t,e){var r=e3.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function b3(i,t,e){var r=de.exec(t.slice(e));return r?(i.Q=+r[0],e+r[0].length):-1}function x3(i,t,e){var r=de.exec(t.slice(e));return r?(i.s=+r[0],e+r[0].length):-1}function sy(i,t){return Mt(i.getDate(),t,2)}function _3(i,t){return Mt(i.getHours(),t,2)}function v3(i,t){return Mt(i.getHours()%12||12,t,2)}function w3(i,t){return Mt(1+ko.count(pr(i),i),t,3)}function oy(i,t){return Mt(i.getMilliseconds(),t,3)}function T3(i,t){return oy(i,t)+"000"}function S3(i,t){return Mt(i.getMonth()+1,t,2)}function C3(i,t){return Mt(i.getMinutes(),t,2)}function E3(i,t){return Mt(i.getSeconds(),t,2)}function I3(i){var t=i.getDay();return t===0?7:t}function A3(i,t){return Mt(Vl.count(pr(i)-1,i),t,2)}function ay(i){var t=i.getDay();return t>=4||t===0?As(i):As.ceil(i)}function M3(i,t){return i=ay(i),Mt(As.count(pr(i),i)+(pr(i).getDay()===4),t,2)}function R3(i){return i.getDay()}function P3(i,t){return Mt(Hl.count(pr(i)-1,i),t,2)}function L3(i,t){return Mt(i.getFullYear()%100,t,2)}function G3(i,t){return i=ay(i),Mt(i.getFullYear()%100,t,2)}function k3(i,t){return Mt(i.getFullYear()%1e4,t,4)}function F3(i,t){var e=i.getDay();return i=e>=4||e===0?As(i):As.ceil(i),Mt(i.getFullYear()%1e4,t,4)}function D3(i){var t=i.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Mt(t/60|0,"0",2)+Mt(t%60,"0",2)}function ly(i,t){return Mt(i.getUTCDate(),t,2)}function N3(i,t){return Mt(i.getUTCHours(),t,2)}function O3(i,t){return Mt(i.getUTCHours()%12||12,t,2)}function B3(i,t){return Mt(1+Rd.count(On(i),i),t,3)}function hy(i,t){return Mt(i.getUTCMilliseconds(),t,3)}function U3(i,t){return hy(i,t)+"000"}function X3(i,t){return Mt(i.getUTCMonth()+1,t,2)}function W3(i,t){return Mt(i.getUTCMinutes(),t,2)}function Z3(i,t){return Mt(i.getUTCSeconds(),t,2)}function V3(i){var t=i.getUTCDay();return t===0?7:t}function H3(i,t){return Mt(q1.count(On(i)-1,i),t,2)}function cy(i){var t=i.getUTCDay();return t>=4||t===0?Ms(i):Ms.ceil(i)}function K3(i,t){return i=cy(i),Mt(Ms.count(On(i),i)+(On(i).getUTCDay()===4),t,2)}function z3(i){return i.getUTCDay()}function Y3(i,t){return Mt(Kl.count(On(i)-1,i),t,2)}function j3(i,t){return Mt(i.getUTCFullYear()%100,t,2)}function J3(i,t){return i=cy(i),Mt(i.getUTCFullYear()%100,t,2)}function $3(i,t){return Mt(i.getUTCFullYear()%1e4,t,4)}function Q3(i,t){var e=i.getUTCDay();return i=e>=4||e===0?Ms(i):Ms.ceil(i),Mt(i.getUTCFullYear()%1e4,t,4)}function q3(){return"+0000"}function uy(){return"%"}function dy(i){return+i}function fy(i){return Math.floor(+i/1e3)}var Rs,py;tA({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function tA(i){return Rs=t3(i),py=Rs.format,Rs.parse,Rs.utcFormat,Rs.utcParse,Rs}function eA(i){return new Date(i)}function iA(i){return i instanceof Date?+i:+new Date(+i)}function my(i,t,e,r,n,s,o,a,l,h){var c=J1(),u=c.invert,d=c.domain,f=h(".%L"),p=h(":%S"),m=h("%I:%M"),g=h("%I %p"),y=h("%a %d"),x=h("%b %d"),b=h("%B"),v=h("%Y");function w(S){return(l(S)<S?f:a(S)<S?p:o(S)<S?m:s(S)<S?g:r(S)<S?n(S)<S?y:x:e(S)<S?b:v)(S)}return c.invert=function(S){return new Date(u(S))},c.domain=function(S){return arguments.length?d(Array.from(S,iA)):d().map(eA)},c.ticks=function(S){var E=d();return i(E[0],E[E.length-1],S??10)},c.tickFormat=function(S,E){return E==null?w:h(E)},c.nice=function(S){var E=d();return(!S||typeof S.range!="function")&&(S=t(E[0],E[E.length-1],S??10)),S?d(WI(E,S)):c},c.copy=function(){return j1(c,my(i,t,e,r,n,s,o,a,l,h))},c}function rA(){return z1.apply(my(QI,qI,pr,Pd,Vl,ko,Md,Ad,Is,py).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Oo(i,t,e){this.k=i,this.x=t,this.y=e}Oo.prototype={constructor:Oo,scale:function(i){return i===1?this:new Oo(this.k*i,this.x,this.y)},translate:function(i,t){return i===0&t===0?this:new Oo(this.k,this.x+this.k*i,this.y+this.k*t)},apply:function(i){return[i[0]*this.k+this.x,i[1]*this.k+this.y]},applyX:function(i){return i*this.k+this.x},applyY:function(i){return i*this.k+this.y},invert:function(i){return[(i[0]-this.x)/this.k,(i[1]-this.y)/this.k]},invertX:function(i){return(i-this.x)/this.k},invertY:function(i){return(i-this.y)/this.k},rescaleX:function(i){return i.copy().domain(i.range().map(this.invertX,this).map(i.invert,i))},rescaleY:function(i){return i.copy().domain(i.range().map(this.invertY,this).map(i.invert,i))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},Oo.prototype;function gy(i){return i.mode==="temporal"||i.mode==="left-aligned"?nA(i):sA(i)}function nA({domain:i,range:t}){return rA().domain(i).range(t)}function sA({domain:i,range:t}){return $1().domain(i).range(t)}function kd(i){return{mode:it.horizontal,range:gR(),domain:yR(i)}}function oA(){return{mode:it.vertical}}let Ps=null;async function aA(){const i=await Zi();yy(i.start_time),tt.on("layoutSettingsUpdated",()=>yy(i.start_time))}function lA(){Ps=null}async function ri(){return Ps||await Ie("scaleCreated")}async function yy(i){await ie();const t=Ps?"scaleUpdated":"scaleCreated",e=kd(i);Ps=gy(e),tt.emit(t,Ps)}let ke=null,Fd=null;async function hA(){const i=await qt(),t=await Su();ke=new VE({screenHeight:t.clientHeight,screenWidth:t.clientWidth,events:i.renderer.events,passiveWheel:!1}),ke.zIndex=1,ke.drag().pinch().wheel({trackpadPinch:!0}).decelerate({friction:.9}).clampZoom({minWidth:t.clientWidth/2}),ke.on("moved",()=>{tt.emit("viewportMoved",null)}).on("moved-end",()=>{tt.emit("viewportMoved",null)}),i.stage.addChild(ke),tt.emit("viewportCreated",ke),tt.on("applicationResized",gA),tt.on("scaleUpdated",()=>Bo()),pA()}function cA(){ke=null,Fd=null}async function Dd({animate:i}={}){const e=(await ee()).getChildByName(Hf);if(!e)throw new Error("Nodes container not found");xA();const{x:r,y:n,width:s,height:o}=e.getLocalBounds();if(!s||!o){dA({animate:i});return}uA({x:r,y:n,width:s,height:o,animate:i})}async function uA({x:i,y:t,width:e,height:r,animate:n}){const s=await Lt(),o=await ee(),{guideTextSize:a,guideTextTopPadding:l,columnGap:h,rowGap:c,eventTargetSize:u}=s.styles,d=a+l,f=e+h*2,p=r+c*4+d+u,m=o.findFit(f,p);o.animate({position:{x:i+e/2,y:t+r/2+d},scale:Math.min(m,1),time:n?s.animationDuration:0,ease:"easeInOutQuad",removeOnInterrupt:!0,callbackOnComplete:()=>{Yl(),Bo()}})}async function dA({animate:i}){const t=await Zi(),e=await Lt(),r=await ee(),n=await ri();let s=n(t.start_time)-e.styles.columnGap,o=n(t.end_time??new Date)+e.styles.columnGap;if(s>o){const c=s;s=o,o=c}const a=o-s,l=s+a/2,h=r.findFit(a,0);r.animate({position:{x:l,y:0},scale:h,time:i?e.animationDuration:0,ease:"easeInOutQuad",removeOnInterrupt:!0,callbackOnComplete:()=>{Yl(),Bo()}})}async function ee(){return ke||await Ie("viewportCreated")}function by(i){S1(Fd,i)||(Fd=i,tt.emit("viewportDateRangeUpdated",i))}function fA({xOffset:i,yOffset:t}){if(!ke)return;const{x:e,y:r}=ke.transform.position;ke.setTransform(e+i,r+t,ke.transform.scale.x,ke.transform.scale.y)}async function pA(){const i=await ee();Bo(),i.on("moved",()=>Bo())}async function Bo(){const i=await xy();i&&by(i)}async function xy(){const i=await ee(),t=await ri(),e=t.invert(i.left),r=t.invert(i.right);return e instanceof Date&&r instanceof Date?[e,r]:null}async function mA(i){const t=await xy(),e=await ie();if(i===void 0||e.isDependency()||S1(i,t))return;const r=await ee(),n=await ri(),[s,o]=i,a=n(s),l=n(o),h=a+(l-a)/2;by(i),r.fitWidth(l-a,!0),r.moveCenter(h,r.center.y)}async function gA(){const i=await qt(),t=await ee(),e=await Su(),r=t.screenWidth,n=t.screenHeight,s=e.clientWidth,o=e.clientHeight,a=(s-r)/2,l=(o-n)/2;t.resize(i.screen.width,i.screen.height),fA({xOffset:a,yOffset:l})}class zl{constructor(){Nf(this,"status","visible");Nf(this,"labels",new Set)}get visible(){return this.status==="visible"}get hidden(){return this.status==="hidden"}show(){if(this.status!=="visible"){for(const t of this.labels)t.visible=!0;this.status="visible"}}hide(){if(this.status!=="hidden"){for(const t of this.labels)t.visible=!1;this.status="hidden"}}toggle(t){t?this.show():this.hide()}add(t){this.labels.add(t),t.visible=this.visible}clear(){this.labels.clear()}}let Ui=null,ni=null,Xi=null,mr=null,gi=null;async function yA(){const i=await ee(),t=await qt();Ui=new dE({toggle:"renderable"}),ni=new zl,Xi=new zl,gi=new zl,mr=new zl,t.ticker.add(()=>{if(i.dirty){const e=i.scale.x>.1,r=i.scale.x>.2,n=i.scale.x>.2,s=i.scale.x>.2;gi==null||gi.toggle(e),ni==null||ni.toggle(r),Xi==null||Xi.toggle(n),mr==null||mr.toggle(s),Ui==null||Ui.cull(t.renderer.screen),i.dirty=!1}}),tt.emit("cullCreated",Ui),tt.emit("labelCullCreated",ni),tt.emit("iconCullCreated",ni),tt.emit("edgeCullCreated",gi),tt.emit("toggleCullCreated",mr)}function bA(){Ui=null,ni==null||ni.clear(),ni=null,Xi==null||Xi.clear(),Xi=null,gi==null||gi.clear(),gi=null,mr==null||mr.clear(),mr=null}async function Yl(){const i=await ee();i.dirty=!0}function xA(){Ui&&Ui.uncull()}async function _y(){return Ui||await Ie("cullCreated")}async function _A(){return gi||await Ie("edgeCullCreated")}async function vy(){return ni||await Ie("labelCullCreated")}async function wy(){return Xi||await Ie("iconCullCreated")}async function Ty(){const i=await ie(),t=await Lt();function e(r,n,s){const a=i.disableAnimations||s?0:t.animationDuration/1e3;return T1.to(r,{...n,duration:a,ease:"power1.out",onUpdate:()=>{Yl()}})}return{animate:e}}let jl=new Map;function vA(){jl=new Map}async function Uo(i,t){const e=`${i.toString()}-${JSON.stringify(t)}`;if(jl.has(e))return jl.get(e);const r=await i(...t);return jl.set(e,r),r}async function wA({size:i,stroke:t=1,radius:e=0}){const r=await qt(),n=new kr;return n.lineStyle(t,"#fff",1,0),n.drawRoundedRect(0,0,i*2,i*2,e),r.renderer.generateTexture(n,{region:new gt(0,0,i,i),resolution:10})}async function Xo(i){return await Uo(wA,[i])}var Jl=(i=>(i[i.Up=0]="Up",i[i.Down=180]="Down",i[i.Left=270]="Left",i[i.Right=90]="Right",i))(Jl||{});function Sy(){const i=new Qt;async function t(e){const{rotate:r=0}=e,n={size:e.size,radius:e.radius,stroke:e.stroke},s=await Xo(n);return i.texture=s,i.anchor.set(.5,.5),i.angle=45+r,i}return{element:i,render:t}}async function TA(){const i=await qt(),t=new kr;return t.beginFill("#fff"),t.drawRect(0,0,1,1),t.endFill(),i.renderer.generateTexture(t,{wrapMode:wi.REPEAT})}async function Nd(){return await Uo(TA,[])}function Od(i,t){return Array.from({length:i},(e,r)=>t(r))}const SA=8,CA=2;async function EA(){const i=await Lt(),t=await _y(),e=await _A(),{animate:r}=await Ty(),n=new Ct,{element:s,render:o}=await Sy(),a=await Nd(),l=Od(20,()=>new dt),h=new sS(a,l);let c=!1;n.name=Gb,n.addChild(s),n.addChild(h),t.addAll([s,h]),e.add(n);async function u(){return await o({size:10,rotate:Jl.Right}),s.tint=i.styles.edgeColor,h.tint=i.styles.edgeColor,n}async function d(p,m){const g=f(m);c||await u();for(const[y,x]of l.entries()){const{x:b,y:v}=g[y];r(x,{x:b,y:v},!c)}r(n,{x:p.x,y:p.y},!c),r(s,{x:m.x-SA,y:m.y},!c),c=!0}function f({x:p,y:m}){const g=[],y={x:0,y:0},x={x:p-CA,y:m},b={x:Cy(y.x,{source:y,target:x}),y:y.y},v={x:Cy(x.x,{source:y,target:x},!0),y:x.y};for(const[w]of l.entries()){if(w===l.length-1){g[w]=x;continue}const S=IA(w,{source:y,target:x,sourceBezier:b,targetBezier:v});g[w]=S}return g}return{element:n,render:u,setPosition:d}}function Cy(i,{source:t,target:e},r){const n=(e.x-t.x)/2;return i+(n>64?n:64)*(r?-1:1)}function IA(i,t){const e=i/20,{source:r,target:n,sourceBezier:s,targetBezier:o}=t,a=r.x+(s.x-r.x)*e,l=r.y+(s.y-r.y)*e,h=s.x+(o.x-s.x)*e,c=s.y+(o.y-s.y)*e,u=o.x+(n.x-o.x)*e,d=o.y+(n.y-o.y)*e,f=a+(h-a)*e,p=l+(c-l)*e,m=h+(u-h)*e,g=c+(d-c)*e,y=f+(m-f)*e,x=p+(g-p)*e;return{x:y,y:x}}async function AA({height:i,radius:t}){const e=await qt(),r=new kr;return r.beginFill("#fff"),r.drawRoundedRect(0,0,t*2,i,t),r.endFill(),e.renderer.generateTexture(r,{region:new gt(0,0,t,i),resolution:10})}async function MA(i){return await Uo(AA,[i])}function RA(){const i=new Qt,t=new Qt;async function e(r){const n=await MA(r);return i.texture=n,t.texture=n,t.anchor.x=1,t.scale.x=-1,{left:i,right:t}}return{left:i,right:t,render:e}}async function gr(){const i=await Nd();return new Qt(i)}async function Bd(){const i=new Ct,t=await gr(),{left:e,right:r,render:n}=await RA();i.addChild(t),i.addChild(e),i.addChild(r);async function s(l){const{width:h,x:c,visible:u}=a(l);return await n({height:l.height,radius:l.radius}),t.visible=u,t.width=h,t.height=l.height,t.x=c,e.visible=o(l.capLeft,l.radius),r.visible=o(l.capRight,l.radius),r.x=l.radius+h,t.tint=l.background,e.tint=l.background,r.tint=l.background,i}function o(l,h){return h===0?!1:l??!0}function a(l){const h=o(l.capLeft,l.radius),c=o(l.capRight,l.radius);let u=0;h&&(u+=l.radius),c&&(u+=l.radius);const d=Math.max(l.width-u,0),f=d>0,p=h?l.radius:0;return{width:d,visible:f,x:p}}return{element:i,render:s}}function Ud(){const i=new Ct,t=new Qt,e=new Qt,r=new Qt,n=new Qt,s=new Qt,o=new Qt,a=new Qt,l=new Qt;t.name="border-corner-top-left",e.name="border-corner-top-right",r.name="border-corner-bottom-left",n.name="border-corner-bottom-right",s.name="border-corner-left",o.name="border-corner-right",a.name="border-corner-top",l.name="border-corner-bottom",e.anchor.x=1,e.scale.x=-1,r.anchor.y=1,r.scale.y=-1,n.anchor.x=1,n.scale.x=-1,n.anchor.y=1,n.scale.y=-1,i.addChild(t),i.addChild(e),i.addChild(r),i.addChild(n),i.addChild(s),i.addChild(o),i.addChild(a),i.addChild(l);async function h(p){const{radius:m=0,color:g="#fff",stroke:y,width:x,height:b}=p,v=typeof m=="number",w={topLeft:c(v?m:m[0],x,b),topRight:c(v?m:m[1],x,b),bottomLeft:c(v?m:m[2],x,b),bottomRight:c(v?m:m[3],x,b)};return await u({width:x,height:b,stroke:y,cornerSizes:w}),await d({width:x,height:b,stroke:y,cornerSizes:w}),f(g),i}function c(p,m,g){const y=Math.min(m,g);return{size:p*2>y?y/2:p,radius:p}}async function u({width:p,height:m,stroke:g,cornerSizes:y}){const{topLeft:x,topRight:b,bottomLeft:v,bottomRight:w}=y,[S,E,I,A]=await Promise.all([Xo({...x,stroke:g}),Xo({...b,stroke:g}),Xo({...v,stroke:g}),Xo({...w,stroke:g})]);t.texture=S,e.texture=E,r.texture=A,n.texture=I,t.position.set(0,0),e.position.set(p-b.size,0),r.position.set(0,m-v.size),n.position.set(p-w.size,m-w.size)}async function d({width:p,height:m,stroke:g,cornerSizes:y}){const x=await Nd(),{topLeft:b,topRight:v,bottomLeft:w,bottomRight:S}=y;a.texture=x,s.texture=x,o.texture=x,l.texture=x,s.position.set(0,b.size),s.height=Math.max(m-b.size-w.size,0),s.width=g,o.position.set(p-g,v.size),o.height=Math.max(m-v.size-S.size,0),o.width=g,a.position.set(b.size,0),a.width=Math.max(p-b.size-v.size,0),a.height=g,l.position.set(w.size,m-g),l.width=Math.max(p-w.size-S.size,0),l.height=g}function f(p){t.tint=p,e.tint=p,r.tint=p,n.tint=p,a.tint=p,s.tint=p,o.tint=p,l.tint=p}return{element:i,render:h}}async function $l(){const i=await Lt(),t=new Ct,{element:e,render:r}=await Ud();async function n({selected:s,width:o,height:a}){if(!s)return t.removeChild(e),t;const{selectedBorderColor:l,selectedBorderWidth:h,selectedBorderOffset:c,selectedBorderRadius:u}=i.styles;return e.position.set(-c,-c),t.addChild(e),await r({stroke:h,radius:u,width:o+c*2,height:a+c*2,color:l}),t}return{element:t,render:n}}async function PA(){const i=await Lt(),t=new Ct,{element:e,render:r}=await Bd(),{element:n,render:s}=await $l();t.addChild(e),t.addChild(n);async function o({selected:a,width:l,height:h}){const{artifactBgColor:c,artifactBorderRadius:u}=i.styles,d={width:l,height:h,background:c,radius:u,capLeft:!0,capRight:!0};return await Promise.all([r(d),s({selected:a,width:l,height:h})]),t}return{element:t,render:o}}var LA=Object.defineProperty,GA=(i,t,e)=>t in i?LA(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,Wo=(i,t,e)=>(GA(i,typeof t!="symbol"?t+"":t,e),e);class kA extends Ct{constructor(t){super(),Wo(this,"_progress",0),Wo(this,"options"),Wo(this,"bgCircle",new kr),Wo(this,"fillCircle",new kr),Wo(this,"innerView",new Ct),this.options=t,this.addChild(this.innerView),this.innerView.addChild(this.bgCircle,this.fillCircle),this.addBackground(),t.value&&(this.progress=t.value)}addBackground(){const{backgroundColor:t,lineWidth:e,radius:r,backgroundAlpha:n}=this.options;let s=1;n>0&&(s=n),t===void 0&&(s=1e-6),this.bgCircle.lineStyle({width:e,color:t,alpha:s}).drawCircle(0,0,r)}set progress(t){t>100&&(t=100),t<0&&(t=0),this._progress=t;const{lineWidth:e,radius:r,fillColor:n,fillAlpha:s,cap:o}=this.options;if(t===0&&s===0){this.fillCircle.clear();return}const a=0,l=360/100*t;this.fillCircle.clear().lineStyle({width:e,color:n,cap:o,alpha:s}).arc(0,0,r,(-90+a)*Lc,(-90+a+l)*Lc)}get progress(){return this._progress}}async function FA(i={}){const t=await wy(),e=new kA({fillColor:16777215,cullAtZoomThreshold:!0,backgroundColor:0,backgroundAlpha:1,value:50,cap:"round",fillAlpha:1,lineWidth:20,radius:50,...i});i.cullAtZoomThreshold&&t.add(e);function r(n){e.progress=n.value??0;const s=(n.radius+n.lineWidth)*2;return e.width=s,e.height=s,e.position.set(s/2),e}return{element:e,render:r}}const DA=Object.freeze(Object.defineProperty({__proto__:null,Artifact:"data:image/svg+xml,%3csvg%20viewBox='0%200%2020%2020'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_7_19)'%3e%3cmask%20id='mask0_7_19'%20style='mask-type:luminance'%20maskUnits='userSpaceOnUse'%20x='-1'%20y='-1'%20width='22'%20height='22'%3e%3cpath%20d='M20.9091%20-0.909058H-0.909088V20.9091H20.9091V-0.909058Z'%20fill='white'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_7_19)'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M0%2010C0%204.47715%204.47715%200%2010%200C15.5228%200%2020%204.47715%2020%2010C20%2015.5228%2015.5228%2020%2010%2020C4.47715%2020%200%2015.5228%200%2010ZM10%201.81818C5.4813%201.81818%201.81818%205.4813%201.81818%2010C1.81818%2014.5187%205.48131%2018.1818%2010%2018.1818C14.5187%2018.1818%2018.1818%2014.5187%2018.1818%2010C18.1818%205.48131%2014.5187%201.81818%2010%201.81818Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M5.68182%205.63634C5.68182%205.15937%206.06849%204.77271%206.54546%204.77271H13.4546C13.9316%204.77271%2014.3182%205.15937%2014.3182%205.63634V14.2512C14.3182%2014.8932%2013.6426%2015.3108%2013.0683%2015.0237L11.8182%2014.3986L10.3863%2015.1146C10.1431%2015.2362%209.85691%2015.2362%209.61373%2015.1146L8.18182%2014.3986L6.93169%2015.0237C6.35746%2015.3108%205.68182%2014.8932%205.68182%2014.2512V5.63634ZM7.04546%206.13634V13.4423L7.7956%2013.0672C8.03873%2012.9456%208.32491%2012.9456%208.5681%2013.0672L10%2013.7832L11.4319%2013.0672C11.6751%2012.9456%2011.9613%2012.9456%2012.2045%2013.0672L12.9546%2013.4423V6.13634H7.04546Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.36365%208.63631C6.36365%208.38531%206.56716%208.18176%206.81819%208.18176H6.98566C7.23669%208.18176%207.4402%208.38531%207.4402%208.63631C7.4402%208.88731%207.23669%209.09085%206.98566%209.09085H6.81819C6.56716%209.09085%206.36365%208.88731%206.36365%208.63631ZM7.78709%208.63631C7.78709%208.38531%207.9906%208.18176%208.24165%208.18176H8.57656C8.82765%208.18176%209.0311%208.38531%209.0311%208.63631C9.0311%208.88731%208.82765%209.09085%208.57656%209.09085H8.24165C7.9906%209.09085%207.78709%208.88731%207.78709%208.63631ZM9.37801%208.63631C9.37801%208.38531%209.58147%208.18176%209.83256%208.18176H10.1675C10.4186%208.18176%2010.622%208.38531%2010.622%208.63631C10.622%208.88731%2010.4186%209.09085%2010.1675%209.09085H9.83256C9.58147%209.09085%209.37801%208.88731%209.37801%208.63631ZM10.9689%208.63631C10.9689%208.38531%2011.1724%208.18176%2011.4235%208.18176H11.7584C12.0095%208.18176%2012.2129%208.38531%2012.2129%208.63631C12.2129%208.88731%2012.0095%209.09085%2011.7584%209.09085H11.4235C11.1724%209.09085%2010.9689%208.88731%2010.9689%208.63631ZM12.5598%208.63631C12.5598%208.38531%2012.7633%208.18176%2013.0144%208.18176H13.1818C13.4328%208.18176%2013.6364%208.38531%2013.6364%208.63631C13.6364%208.88731%2013.4328%209.09085%2013.1818%209.09085H13.0144C12.7633%209.09085%2012.5598%208.88731%2012.5598%208.63631Z'%20fill='white'/%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_7_19'%3e%3crect%20width='20'%20height='20'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",ArtifactImage:"data:image/svg+xml,%3csvg%20viewBox='0%200%2020%2020'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_7_36)'%3e%3cmask%20id='mask0_7_36'%20style='mask-type:luminance'%20maskUnits='userSpaceOnUse'%20x='-1'%20y='-1'%20width='22'%20height='22'%3e%3cpath%20d='M20.9091%20-0.909058H-0.909088V20.9091H20.9091V-0.909058Z'%20fill='white'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_7_36)'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M0%2010C0%204.47715%204.47715%200%2010%200C15.5228%200%2020%204.47715%2020%2010C20%2015.5228%2015.5228%2020%2010%2020C4.47715%2020%200%2015.5228%200%2010ZM10%201.81818C5.4813%201.81818%201.81818%205.4813%201.81818%2010C1.81818%2014.5187%205.48131%2018.1818%2010%2018.1818C14.5187%2018.1818%2018.1818%2014.5187%2018.1818%2010C18.1818%205.48131%2014.5187%201.81818%2010%201.81818Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M11.4718%2010.0244C11.2567%209.97354%2011.0304%2010.0028%2010.8353%2010.1067L2.29995%2014.6522C1.8568%2014.8882%201.68886%2015.4387%201.92486%2015.8818C2.16086%2016.325%202.71143%2016.4929%203.15458%2016.2569L11.3872%2011.8727L17.9726%2013.4302C18.4612%2013.5457%2018.951%2013.2433%2019.0665%2012.7546C19.1821%2012.2661%2018.8796%2011.7764%2018.3911%2011.6607L11.4718%2010.0244Z'%20fill='white'/%3e%3cpath%20d='M6.07329%209.09092C5.32016%209.09092%204.70966%208.48037%204.70966%207.72728C4.70966%206.97417%205.32016%206.36365%206.07329%206.36365C6.82643%206.36365%207.43693%206.97417%207.43693%207.72728C7.43693%208.48037%206.82643%209.09092%206.07329%209.09092Z'%20fill='white'/%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_7_36'%3e%3crect%20width='20'%20height='20'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",ArtifactMarkdown:"data:image/svg+xml,%3csvg%20viewBox='0%200%2020%2020'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_7_27)'%3e%3cmask%20id='mask0_7_27'%20style='mask-type:luminance'%20maskUnits='userSpaceOnUse'%20x='-1'%20y='-1'%20width='22'%20height='22'%3e%3cpath%20d='M20.9091%20-0.909058H-0.909088V20.9091H20.9091V-0.909058Z'%20fill='white'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_7_27)'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M0%2010C0%204.47715%204.47715%200%2010%200C15.5228%200%2020%204.47715%2020%2010C20%2015.5228%2015.5228%2020%2010%2020C4.47715%2020%200%2015.5228%200%2010ZM10%201.81818C5.4813%201.81818%201.81818%205.4813%201.81818%2010C1.81818%2014.5187%205.48131%2018.1818%2010%2018.1818C14.5187%2018.1818%2018.1818%2014.5187%2018.1818%2010C18.1818%205.48131%2014.5187%201.81818%2010%201.81818Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.36365%2010C6.36365%209.49794%206.77067%209.09094%207.27274%209.09094H12.7273C13.2294%209.09094%2013.6364%209.49794%2013.6364%2010C13.6364%2010.5021%2013.2294%2010.9091%2012.7273%2010.9091H7.27274C6.77067%2010.9091%206.36365%2010.5021%206.36365%2010Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.36365%2013.6364C6.36365%2013.1343%206.77067%2012.7273%207.27274%2012.7273H9.09092C9.59301%2012.7273%2010%2013.1343%2010%2013.6364C10%2014.1385%209.59301%2014.5455%209.09092%2014.5455H7.27274C6.77067%2014.5455%206.36365%2014.1385%206.36365%2013.6364Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.36365%206.36368C6.36365%205.86161%206.77067%205.45459%207.27274%205.45459H11.8182C12.3203%205.45459%2012.7273%205.86161%2012.7273%206.36368C12.7273%206.86575%2012.3203%207.27277%2011.8182%207.27277H7.27274C6.77067%207.27277%206.36365%206.86575%206.36365%206.36368Z'%20fill='white'/%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_7_27'%3e%3crect%20width='20'%20height='20'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",ArtifactProgress:"data:image/svg+xml,%3csvg%20viewBox='0%200%2020%2020'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_7_2)'%3e%3cmask%20id='mask0_7_2'%20style='mask-type:luminance'%20maskUnits='userSpaceOnUse'%20x='-1'%20y='-1'%20width='22'%20height='22'%3e%3cpath%20d='M20.9091%20-0.909058H-0.909088V20.9091H20.9091V-0.909058Z'%20fill='white'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_7_2)'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M8.04937%200.190318C8.681%200.0653727%209.33327%200%2010%200C10.6667%200%2011.319%200.0653727%2011.9506%200.190318L11.5978%201.97394C11.0817%201.87185%2010.5475%201.81818%2010%201.81818C9.45245%201.81818%208.91827%201.87185%208.40218%201.97394L8.04937%200.190318ZM15.5568%201.68489C16.6469%202.41471%2017.5853%203.35308%2018.3151%204.4432L16.8043%205.45469C16.2066%204.56206%2015.4379%203.79335%2014.5453%203.19574L15.5568%201.68489ZM1.68489%204.4432C2.41471%203.35308%203.35308%202.41471%204.4432%201.68489L5.45469%203.19574C4.56206%203.79335%203.79335%204.56206%203.19574%205.45469L1.68489%204.4432ZM19.8096%208.04937C19.9346%208.681%2020%209.33327%2020%2010C20%2010.6667%2019.9346%2011.319%2019.8096%2011.9506L18.0261%2011.5978C18.1282%2011.0817%2018.1818%2010.5475%2018.1818%2010C18.1818%209.45245%2018.1282%208.91827%2018.0261%208.40218L19.8096%208.04937ZM0%2010C0%209.33327%200.0653727%208.681%200.190318%208.04937L1.97394%208.40218C1.87185%208.91827%201.81818%209.45245%201.81818%2010C1.81818%2010.5475%201.87185%2011.0817%201.97394%2011.5978L0.190318%2011.9506C0.0653727%2011.319%200%2010.6667%200%2010ZM18.3151%2015.5568C17.5853%2016.6469%2016.6469%2017.5853%2015.5568%2018.3151L14.5453%2016.8043C15.4379%2016.2066%2016.2066%2015.4379%2016.8043%2014.5453L18.3151%2015.5568ZM4.4432%2018.3151C3.35308%2017.5853%202.41471%2016.6469%201.68489%2015.5568L3.19574%2014.5453C3.79335%2015.4379%204.56206%2016.2066%205.45469%2016.8043L4.4432%2018.3151ZM10%2020C9.33327%2020%208.681%2019.9346%208.04937%2019.8096L8.40218%2018.0261C8.91827%2018.1282%209.45245%2018.1818%2010%2018.1818C10.5475%2018.1818%2011.0817%2018.1282%2011.5978%2018.0261L11.9506%2019.8096C11.319%2019.9346%2010.6667%2020%2010%2020Z'%20fill='white'/%3e%3cpath%20d='M10%2011.8181C8.99582%2011.8181%208.18182%2011.0041%208.18182%209.99994C8.18182%208.99576%208.99582%208.18176%2010%208.18176C11.0042%208.18176%2011.8182%208.99576%2011.8182%209.99994C11.8182%2011.0041%2011.0042%2011.8181%2010%2011.8181Z'%20fill='white'/%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_7_2'%3e%3crect%20width='20'%20height='20'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",ArtifactResult:"data:image/svg+xml,%3csvg%20viewBox='0%200%2020%2020'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_7_19)'%3e%3cmask%20id='mask0_7_19'%20style='mask-type:luminance'%20maskUnits='userSpaceOnUse'%20x='-1'%20y='-1'%20width='22'%20height='22'%3e%3cpath%20d='M20.9091%20-0.909058H-0.909088V20.9091H20.9091V-0.909058Z'%20fill='white'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_7_19)'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M0%2010C0%204.47715%204.47715%200%2010%200C15.5228%200%2020%204.47715%2020%2010C20%2015.5228%2015.5228%2020%2010%2020C4.47715%2020%200%2015.5228%200%2010ZM10%201.81818C5.4813%201.81818%201.81818%205.4813%201.81818%2010C1.81818%2014.5187%205.48131%2018.1818%2010%2018.1818C14.5187%2018.1818%2018.1818%2014.5187%2018.1818%2010C18.1818%205.48131%2014.5187%201.81818%2010%201.81818Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M5.68182%205.63634C5.68182%205.15937%206.06849%204.77271%206.54546%204.77271H13.4546C13.9316%204.77271%2014.3182%205.15937%2014.3182%205.63634V14.2512C14.3182%2014.8932%2013.6426%2015.3108%2013.0683%2015.0237L11.8182%2014.3986L10.3863%2015.1146C10.1431%2015.2362%209.85691%2015.2362%209.61373%2015.1146L8.18182%2014.3986L6.93169%2015.0237C6.35746%2015.3108%205.68182%2014.8932%205.68182%2014.2512V5.63634ZM7.04546%206.13634V13.4423L7.7956%2013.0672C8.03873%2012.9456%208.32491%2012.9456%208.5681%2013.0672L10%2013.7832L11.4319%2013.0672C11.6751%2012.9456%2011.9613%2012.9456%2012.2045%2013.0672L12.9546%2013.4423V6.13634H7.04546Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.36365%208.63631C6.36365%208.38531%206.56716%208.18176%206.81819%208.18176H6.98566C7.23669%208.18176%207.4402%208.38531%207.4402%208.63631C7.4402%208.88731%207.23669%209.09085%206.98566%209.09085H6.81819C6.56716%209.09085%206.36365%208.88731%206.36365%208.63631ZM7.78709%208.63631C7.78709%208.38531%207.9906%208.18176%208.24165%208.18176H8.57656C8.82765%208.18176%209.0311%208.38531%209.0311%208.63631C9.0311%208.88731%208.82765%209.09085%208.57656%209.09085H8.24165C7.9906%209.09085%207.78709%208.88731%207.78709%208.63631ZM9.37801%208.63631C9.37801%208.38531%209.58147%208.18176%209.83256%208.18176H10.1675C10.4186%208.18176%2010.622%208.38531%2010.622%208.63631C10.622%208.88731%2010.4186%209.09085%2010.1675%209.09085H9.83256C9.58147%209.09085%209.37801%208.88731%209.37801%208.63631ZM10.9689%208.63631C10.9689%208.38531%2011.1724%208.18176%2011.4235%208.18176H11.7584C12.0095%208.18176%2012.2129%208.38531%2012.2129%208.63631C12.2129%208.88731%2012.0095%209.09085%2011.7584%209.09085H11.4235C11.1724%209.09085%2010.9689%208.88731%2010.9689%208.63631ZM12.5598%208.63631C12.5598%208.38531%2012.7633%208.18176%2013.0144%208.18176H13.1818C13.4328%208.18176%2013.6364%208.38531%2013.6364%208.63631C13.6364%208.88731%2013.4328%209.09085%2013.1818%209.09085H13.0144C12.7633%209.09085%2012.5598%208.88731%2012.5598%208.63631Z'%20fill='white'/%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_7_19'%3e%3crect%20width='20'%20height='20'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",ArtifactTable:"data:image/svg+xml,%3csvg%20viewBox='0%200%2020%2020'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_7_9)'%3e%3cmask%20id='mask0_7_9'%20style='mask-type:luminance'%20maskUnits='userSpaceOnUse'%20x='-1'%20y='-1'%20width='22'%20height='22'%3e%3cpath%20d='M20.9091%20-0.909058H-0.909088V20.9091H20.9091V-0.909058Z'%20fill='white'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_7_9)'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M0%2010C0%204.47715%204.47715%200%2010%200C15.5228%200%2020%204.47715%2020%2010C20%2015.5228%2015.5228%2020%2010%2020C4.47715%2020%200%2015.5228%200%2010ZM10%201.81818C5.4813%201.81818%201.81818%205.4813%201.81818%2010C1.81818%2014.5187%205.48131%2018.1818%2010%2018.1818C14.5187%2018.1818%2018.1818%2014.5187%2018.1818%2010C18.1818%205.48131%2014.5187%201.81818%2010%201.81818Z'%20fill='white'/%3e%3cpath%20d='M8.18183%205.45459H6.36365C5.86157%205.45459%205.45456%205.8616%205.45456%206.36368V8.18186C5.45456%208.68394%205.86157%209.09095%206.36365%209.09095H8.18183C8.68391%209.09095%209.09092%208.68394%209.09092%208.18186V6.36368C9.09092%205.8616%208.68391%205.45459%208.18183%205.45459Z'%20fill='white'/%3e%3cpath%20d='M13.6364%205.45459H11.8182C11.3161%205.45459%2010.9091%205.8616%2010.9091%206.36368V8.18186C10.9091%208.68394%2011.3161%209.09095%2011.8182%209.09095H13.6364C14.1384%209.09095%2014.5455%208.68394%2014.5455%208.18186V6.36368C14.5455%205.8616%2014.1384%205.45459%2013.6364%205.45459Z'%20fill='white'/%3e%3cpath%20d='M13.6364%2010.9091H11.8182C11.3161%2010.9091%2010.9091%2011.3161%2010.9091%2011.8181V13.6363C10.9091%2014.1384%2011.3161%2014.5454%2011.8182%2014.5454H13.6364C14.1384%2014.5454%2014.5455%2014.1384%2014.5455%2013.6363V11.8181C14.5455%2011.3161%2014.1384%2010.9091%2013.6364%2010.9091Z'%20fill='white'/%3e%3cpath%20d='M8.18183%2010.9091H6.36365C5.86157%2010.9091%205.45456%2011.3161%205.45456%2011.8181V13.6363C5.45456%2014.1384%205.86157%2014.5454%206.36365%2014.5454H8.18183C8.68391%2014.5454%209.09092%2014.1384%209.09092%2013.6363V11.8181C9.09092%2011.3161%208.68391%2010.9091%208.18183%2010.9091Z'%20fill='white'/%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_7_9'%3e%3crect%20width='20'%20height='20'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e"},Symbol.toStringTag,{value:"Module"}));function NA(i){const t={resolution:4};return ot.from(DA[i],t)}async function OA(i){return await Uo(NA,[i])}async function BA({cullAtZoomThreshold:i=!0}={}){const t=await wy(),e=new Qt;i&&t.add(e);async function r(n){const s=await OA(n);return e.texture=s,e}return{element:e,render:r}}var UA={aqua:/#00ffff(ff)?(?!\w)|#0ff(f)?(?!\w)/gi,azure:/#f0ffff(ff)?(?!\w)/gi,beige:/#f5f5dc(ff)?(?!\w)/gi,bisque:/#ffe4c4(ff)?(?!\w)/gi,black:/#000000(ff)?(?!\w)|#000(f)?(?!\w)/gi,blue:/#0000ff(ff)?(?!\w)|#00f(f)?(?!\w)/gi,brown:/#a52a2a(ff)?(?!\w)/gi,coral:/#ff7f50(ff)?(?!\w)/gi,cornsilk:/#fff8dc(ff)?(?!\w)/gi,crimson:/#dc143c(ff)?(?!\w)/gi,cyan:/#00ffff(ff)?(?!\w)|#0ff(f)?(?!\w)/gi,darkblue:/#00008b(ff)?(?!\w)/gi,darkcyan:/#008b8b(ff)?(?!\w)/gi,darkgrey:/#a9a9a9(ff)?(?!\w)/gi,darkred:/#8b0000(ff)?(?!\w)/gi,deeppink:/#ff1493(ff)?(?!\w)/gi,dimgrey:/#696969(ff)?(?!\w)/gi,gold:/#ffd700(ff)?(?!\w)/gi,green:/#008000(ff)?(?!\w)/gi,grey:/#808080(ff)?(?!\w)/gi,honeydew:/#f0fff0(ff)?(?!\w)/gi,hotpink:/#ff69b4(ff)?(?!\w)/gi,indigo:/#4b0082(ff)?(?!\w)/gi,ivory:/#fffff0(ff)?(?!\w)/gi,khaki:/#f0e68c(ff)?(?!\w)/gi,lavender:/#e6e6fa(ff)?(?!\w)/gi,lime:/#00ff00(ff)?(?!\w)|#0f0(f)?(?!\w)/gi,linen:/#faf0e6(ff)?(?!\w)/gi,maroon:/#800000(ff)?(?!\w)/gi,moccasin:/#ffe4b5(ff)?(?!\w)/gi,navy:/#000080(ff)?(?!\w)/gi,oldlace:/#fdf5e6(ff)?(?!\w)/gi,olive:/#808000(ff)?(?!\w)/gi,orange:/#ffa500(ff)?(?!\w)/gi,orchid:/#da70d6(ff)?(?!\w)/gi,peru:/#cd853f(ff)?(?!\w)/gi,pink:/#ffc0cb(ff)?(?!\w)/gi,plum:/#dda0dd(ff)?(?!\w)/gi,purple:/#800080(ff)?(?!\w)/gi,red:/#ff0000(ff)?(?!\w)|#f00(f)?(?!\w)/gi,salmon:/#fa8072(ff)?(?!\w)/gi,seagreen:/#2e8b57(ff)?(?!\w)/gi,seashell:/#fff5ee(ff)?(?!\w)/gi,sienna:/#a0522d(ff)?(?!\w)/gi,silver:/#c0c0c0(ff)?(?!\w)/gi,skyblue:/#87ceeb(ff)?(?!\w)/gi,snow:/#fffafa(ff)?(?!\w)/gi,tan:/#d2b48c(ff)?(?!\w)/gi,teal:/#008080(ff)?(?!\w)/gi,thistle:/#d8bfd8(ff)?(?!\w)/gi,tomato:/#ff6347(ff)?(?!\w)/gi,violet:/#ee82ee(ff)?(?!\w)/gi,wheat:/#f5deb3(ff)?(?!\w)/gi,white:/#ffffff(ff)?(?!\w)|#fff(f)?(?!\w)/gi},Xd=UA,Wd={whitespace:/\s+/g,urlHexPairs:/%[\dA-F]{2}/g,quotes:/"/g};function XA(i){return i.trim().replace(Wd.whitespace," ")}function WA(i){return encodeURIComponent(i).replace(Wd.urlHexPairs,VA)}function ZA(i){return Object.keys(Xd).forEach(function(t){Xd[t].test(i)&&(i=i.replace(Xd[t],t))}),i}function VA(i){switch(i){case"%20":return" ";case"%3D":return"=";case"%3A":return":";case"%2F":return"/";default:return i.toLowerCase()}}function Zd(i){if(typeof i!="string")throw new TypeError("Expected a string, but received "+typeof i);i.charCodeAt(0)===65279&&(i=i.slice(1));var t=ZA(XA(i)).replace(Wd.quotes,"'");return"data:image/svg+xml,"+WA(t)}Zd.toSrcset=function(t){return Zd(t).replace(/ /g,"%20")};var HA=Zd,Ey={},Iy={};(function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"default",{enumerable:!0,get:function(){return e}});function t(r,n){return{handler:r,config:n}}t.withOptions=function(r,n=()=>({})){const s=function(o){return{__options:o,handler:r(o),config:n(o)}};return s.__isOptionsFunction=!0,s.__pluginFunction=r,s.__configFunction=n,s};const e=t})(Iy),function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"default",{enumerable:!0,get:function(){return r}});const t=e(Iy);function e(n){return n&&n.__esModule?n:{default:n}}const r=t.default}(Ey);let Vd=Ey;var Hd=(Vd.__esModule?Vd:{default:Vd}).default;const KA=Tr(Hd);var Ay={},My={};(function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"cloneDeep",{enumerable:!0,get:function(){return t}});function t(e){return Array.isArray(e)?e.map(r=>t(r)):typeof e=="object"&&e!==null?Object.fromEntries(Object.entries(e).map(([r,n])=>[r,t(n)])):e}})(My);var zA={content:[],presets:[],darkMode:"media",theme:{accentColor:({theme:i})=>({...i("colors"),auto:"auto"}),animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0, 0, 0.2, 1) infinite",pulse:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",bounce:"bounce 1s infinite"},aria:{busy:'busy="true"',checked:'checked="true"',disabled:'disabled="true"',expanded:'expanded="true"',hidden:'hidden="true"',pressed:'pressed="true"',readonly:'readonly="true"',required:'required="true"',selected:'selected="true"'},aspectRatio:{auto:"auto",square:"1 / 1",video:"16 / 9"},backdropBlur:({theme:i})=>i("blur"),backdropBrightness:({theme:i})=>i("brightness"),backdropContrast:({theme:i})=>i("contrast"),backdropGrayscale:({theme:i})=>i("grayscale"),backdropHueRotate:({theme:i})=>i("hueRotate"),backdropInvert:({theme:i})=>i("invert"),backdropOpacity:({theme:i})=>i("opacity"),backdropSaturate:({theme:i})=>i("saturate"),backdropSepia:({theme:i})=>i("sepia"),backgroundColor:({theme:i})=>i("colors"),backgroundImage:{none:"none","gradient-to-t":"linear-gradient(to top, var(--tw-gradient-stops))","gradient-to-tr":"linear-gradient(to top right, var(--tw-gradient-stops))","gradient-to-r":"linear-gradient(to right, var(--tw-gradient-stops))","gradient-to-br":"linear-gradient(to bottom right, var(--tw-gradient-stops))","gradient-to-b":"linear-gradient(to bottom, var(--tw-gradient-stops))","gradient-to-bl":"linear-gradient(to bottom left, var(--tw-gradient-stops))","gradient-to-l":"linear-gradient(to left, var(--tw-gradient-stops))","gradient-to-tl":"linear-gradient(to top left, var(--tw-gradient-stops))"},backgroundOpacity:({theme:i})=>i("opacity"),backgroundPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{0:"0",none:"0",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},borderColor:({theme:i})=>({...i("colors"),DEFAULT:i("colors.gray.200","currentColor")}),borderOpacity:({theme:i})=>i("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},borderSpacing:({theme:i})=>({...i("spacing")}),borderWidth:{DEFAULT:"1px",0:"0px",2:"2px",4:"4px",8:"8px"},boxShadow:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",DEFAULT:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",none:"none"},boxShadowColor:({theme:i})=>i("colors"),brightness:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",200:"2"},caretColor:({theme:i})=>i("colors"),colors:({colors:i})=>({inherit:i.inherit,current:i.current,transparent:i.transparent,black:i.black,white:i.white,slate:i.slate,gray:i.gray,zinc:i.zinc,neutral:i.neutral,stone:i.stone,red:i.red,orange:i.orange,amber:i.amber,yellow:i.yellow,lime:i.lime,green:i.green,emerald:i.emerald,teal:i.teal,cyan:i.cyan,sky:i.sky,blue:i.blue,indigo:i.indigo,violet:i.violet,purple:i.purple,fuchsia:i.fuchsia,pink:i.pink,rose:i.rose}),columns:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"},container:{},content:{none:"none"},contrast:{0:"0",50:".5",75:".75",100:"1",125:"1.25",150:"1.5",200:"2"},cursor:{auto:"auto",default:"default",pointer:"pointer",wait:"wait",text:"text",move:"move",help:"help","not-allowed":"not-allowed",none:"none","context-menu":"context-menu",progress:"progress",cell:"cell",crosshair:"crosshair","vertical-text":"vertical-text",alias:"alias",copy:"copy","no-drop":"no-drop",grab:"grab",grabbing:"grabbing","all-scroll":"all-scroll","col-resize":"col-resize","row-resize":"row-resize","n-resize":"n-resize","e-resize":"e-resize","s-resize":"s-resize","w-resize":"w-resize","ne-resize":"ne-resize","nw-resize":"nw-resize","se-resize":"se-resize","sw-resize":"sw-resize","ew-resize":"ew-resize","ns-resize":"ns-resize","nesw-resize":"nesw-resize","nwse-resize":"nwse-resize","zoom-in":"zoom-in","zoom-out":"zoom-out"},divideColor:({theme:i})=>i("borderColor"),divideOpacity:({theme:i})=>i("borderOpacity"),divideWidth:({theme:i})=>i("borderWidth"),dropShadow:{sm:"0 1px 1px rgb(0 0 0 / 0.05)",DEFAULT:["0 1px 2px rgb(0 0 0 / 0.1)","0 1px 1px rgb(0 0 0 / 0.06)"],md:["0 4px 3px rgb(0 0 0 / 0.07)","0 2px 2px rgb(0 0 0 / 0.06)"],lg:["0 10px 8px rgb(0 0 0 / 0.04)","0 4px 3px rgb(0 0 0 / 0.1)"],xl:["0 20px 13px rgb(0 0 0 / 0.03)","0 8px 5px rgb(0 0 0 / 0.08)"],"2xl":"0 25px 25px rgb(0 0 0 / 0.15)",none:"0 0 #0000"},fill:({theme:i})=>({none:"none",...i("colors")}),flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:i})=>({auto:"auto",...i("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%"}),flexGrow:{0:"0",DEFAULT:"1"},flexShrink:{0:"0",DEFAULT:"1"},fontFamily:{sans:["ui-sans-serif","system-ui","sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'],serif:["ui-serif","Georgia","Cambria",'"Times New Roman"',"Times","serif"],mono:["ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"]},fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}],"4xl":["2.25rem",{lineHeight:"2.5rem"}],"5xl":["3rem",{lineHeight:"1"}],"6xl":["3.75rem",{lineHeight:"1"}],"7xl":["4.5rem",{lineHeight:"1"}],"8xl":["6rem",{lineHeight:"1"}],"9xl":["8rem",{lineHeight:"1"}]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:({theme:i})=>i("spacing"),gradientColorStops:({theme:i})=>i("colors"),gradientColorStopPositions:{"0%":"0%","5%":"5%","10%":"10%","15%":"15%","20%":"20%","25%":"25%","30%":"30%","35%":"35%","40%":"40%","45%":"45%","50%":"50%","55%":"55%","60%":"60%","65%":"65%","70%":"70%","75%":"75%","80%":"80%","85%":"85%","90%":"90%","95%":"95%","100%":"100%"},grayscale:{0:"0",DEFAULT:"100%"},gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridColumn:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridColumnEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridColumnStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridRow:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridRowEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridRowStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridTemplateColumns:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))"},gridTemplateRows:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))"},height:({theme:i})=>({auto:"auto",...i("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content"}),hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},inset:({theme:i})=>({auto:"auto",...i("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%"}),invert:{0:"0",DEFAULT:"100%"},keyframes:{spin:{to:{transform:"rotate(360deg)"}},ping:{"75%, 100%":{transform:"scale(2)",opacity:"0"}},pulse:{"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},listStyleType:{none:"none",disc:"disc",decimal:"decimal"},listStyleImage:{none:"none"},margin:({theme:i})=>({auto:"auto",...i("spacing")}),lineClamp:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6"},maxHeight:({theme:i})=>({...i("spacing"),none:"none",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content"}),maxWidth:({theme:i,breakpoints:t})=>({...i("spacing"),none:"none",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch",...t(i("screens"))}),minHeight:({theme:i})=>({...i("spacing"),full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content"}),minWidth:({theme:i})=>({...i("spacing"),full:"100%",min:"min-content",max:"max-content",fit:"fit-content"}),objectPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},opacity:{0:"0",5:"0.05",10:"0.1",15:"0.15",20:"0.2",25:"0.25",30:"0.3",35:"0.35",40:"0.4",45:"0.45",50:"0.5",55:"0.55",60:"0.6",65:"0.65",70:"0.7",75:"0.75",80:"0.8",85:"0.85",90:"0.9",95:"0.95",100:"1"},order:{first:"-9999",last:"9999",none:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12"},outlineColor:({theme:i})=>i("colors"),outlineOffset:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},outlineWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},padding:({theme:i})=>i("spacing"),placeholderColor:({theme:i})=>i("colors"),placeholderOpacity:({theme:i})=>i("opacity"),ringColor:({theme:i})=>({DEFAULT:i("colors.blue.500","#3b82f6"),...i("colors")}),ringOffsetColor:({theme:i})=>i("colors"),ringOffsetWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},ringOpacity:({theme:i})=>({DEFAULT:"0.5",...i("opacity")}),ringWidth:{DEFAULT:"3px",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},rotate:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",45:"45deg",90:"90deg",180:"180deg"},saturate:{0:"0",50:".5",100:"1",150:"1.5",200:"2"},scale:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5"},screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},scrollMargin:({theme:i})=>({...i("spacing")}),scrollPadding:({theme:i})=>i("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg"},space:({theme:i})=>({...i("spacing")}),spacing:{px:"1px",0:"0px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},stroke:({theme:i})=>({none:"none",...i("colors")}),strokeWidth:{0:"0",1:"1",2:"2"},supports:{},data:{},textColor:({theme:i})=>i("colors"),textDecorationColor:({theme:i})=>i("colors"),textDecorationThickness:{auto:"auto","from-font":"from-font",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},textIndent:({theme:i})=>({...i("spacing")}),textOpacity:({theme:i})=>i("opacity"),textUnderlineOffset:{auto:"auto",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},transformOrigin:{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"},transitionDelay:{0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},transitionDuration:{DEFAULT:"150ms",0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},transitionProperty:{none:"none",all:"all",DEFAULT:"color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",colors:"color, background-color, border-color, text-decoration-color, fill, stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4, 0, 0.2, 1)",linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},translate:({theme:i})=>({...i("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%"}),size:({theme:i})=>({auto:"auto",...i("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"}),width:({theme:i})=>({auto:"auto",...i("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",screen:"100vw",svw:"100svw",lvw:"100lvw",dvw:"100dvw",min:"min-content",max:"max-content",fit:"fit-content"}),willChange:{auto:"auto",scroll:"scroll-position",contents:"contents",transform:"transform"},zIndex:{auto:"auto",0:"0",10:"10",20:"20",30:"30",40:"40",50:"50"}},plugins:[]};(function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"default",{enumerable:!0,get:function(){return n}});const t=My,e=r(zA);function r(s){return s&&s.__esModule?s:{default:s}}const n=(0,t.cloneDeep)(e.default.theme)})(Ay);let Kd=Ay;var Ry=(Kd.__esModule?Kd:{default:Kd}).default;const Py=Tr(Ry);var Ly={},Gy={},zd={exports:{}},Ot=String,ky=function(){return{isColorSupported:!1,reset:Ot,bold:Ot,dim:Ot,italic:Ot,underline:Ot,inverse:Ot,hidden:Ot,strikethrough:Ot,black:Ot,red:Ot,green:Ot,yellow:Ot,blue:Ot,magenta:Ot,cyan:Ot,white:Ot,gray:Ot,bgBlack:Ot,bgRed:Ot,bgGreen:Ot,bgYellow:Ot,bgBlue:Ot,bgMagenta:Ot,bgCyan:Ot,bgWhite:Ot}};zd.exports=ky(),zd.exports.createColors=ky;var YA=zd.exports;(function(i){Object.defineProperty(i,"__esModule",{value:!0});function t(l,h){for(var c in h)Object.defineProperty(l,c,{enumerable:!0,get:h[c]})}t(i,{dim:function(){return o},default:function(){return a}});const e=r(YA);function r(l){return l&&l.__esModule?l:{default:l}}let n=new Set;function s(l,h,c){typeof process<"u"&&process.env.JEST_WORKER_ID||c&&n.has(c)||(c&&n.add(c),console.warn(""),h.forEach(u=>console.warn(l,"-",u)))}function o(l){return e.default.dim(l)}const a={info(l,h){s(e.default.bold(e.default.cyan("info")),...Array.isArray(l)?[l]:[h,l])},warn(l,h){s(e.default.bold(e.default.yellow("warn")),...Array.isArray(l)?[l]:[h,l])},risk(l,h){s(e.default.bold(e.default.magenta("risk")),...Array.isArray(l)?[l]:[h,l])}}})(Gy),function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"default",{enumerable:!0,get:function(){return n}});const t=e(Gy);function e(s){return s&&s.__esModule?s:{default:s}}function r({version:s,from:o,to:a}){t.default.warn(`${o}-color-renamed`,[`As of Tailwind CSS ${s}, \`${o}\` has been renamed to \`${a}\`.`,"Update your configuration file to silence this warning."])}const n={inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519"},get lightBlue(){return r({version:"v2.2",from:"lightBlue",to:"sky"}),this.sky},get warmGray(){return r({version:"v3.0",from:"warmGray",to:"stone"}),this.stone},get trueGray(){return r({version:"v3.0",from:"trueGray",to:"neutral"}),this.neutral},get coolGray(){return r({version:"v3.0",from:"coolGray",to:"gray"}),this.gray},get blueGray(){return r({version:"v3.0",from:"blueGray",to:"slate"}),this.slate}}}(Ly);let Yd=Ly;var jA=(Yd.__esModule?Yd:{default:Yd}).default;const Ql=HA,JA=Hd,Fy=Ry,Yr=jA,[$A,{lineHeight:QA}]=Fy.fontSize.base,{spacing:yr,borderWidth:Dy,borderRadius:Ny}=Fy;JA.withOptions(function(i={strategy:void 0}){return function({addBase:t,addComponents:e,theme:r}){const n=i.strategy===void 0?["base","class"]:[i.strategy],s=[{base:["[type='text']","[type='email']","[type='url']","[type='password']","[type='number']","[type='date']","[type='datetime-local']","[type='month']","[type='search']","[type='tel']","[type='time']","[type='week']","[multiple]","textarea","select"],class:[".form-input",".form-textarea",".form-select",".form-multiselect"],styles:{appearance:"none","background-color":"#fff","border-color":r("colors.gray.500",Yr.gray[500]),"border-width":Dy.DEFAULT,"border-radius":Ny.none,"padding-top":yr[2],"padding-right":yr[3],"padding-bottom":yr[2],"padding-left":yr[3],"font-size":$A,"line-height":QA,"--tw-shadow":"0 0 #0000","&:focus":{outline:"2px solid transparent","outline-offset":"2px","--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":"0px","--tw-ring-offset-color":"#fff","--tw-ring-color":r("colors.blue.600",Yr.blue[600]),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)","box-shadow":"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)","border-color":r("colors.blue.600",Yr.blue[600])}}},{base:["input::placeholder","textarea::placeholder"],class:[".form-input::placeholder",".form-textarea::placeholder"],styles:{color:r("colors.gray.500",Yr.gray[500]),opacity:"1"}},{base:["::-webkit-datetime-edit-fields-wrapper"],class:[".form-input::-webkit-datetime-edit-fields-wrapper"],styles:{padding:"0"}},{base:["::-webkit-date-and-time-value"],class:[".form-input::-webkit-date-and-time-value"],styles:{"min-height":"1.5em"}},{base:["::-webkit-datetime-edit","::-webkit-datetime-edit-year-field","::-webkit-datetime-edit-month-field","::-webkit-datetime-edit-day-field","::-webkit-datetime-edit-hour-field","::-webkit-datetime-edit-minute-field","::-webkit-datetime-edit-second-field","::-webkit-datetime-edit-millisecond-field","::-webkit-datetime-edit-meridiem-field"],class:[".form-input::-webkit-datetime-edit",".form-input::-webkit-datetime-edit-year-field",".form-input::-webkit-datetime-edit-month-field",".form-input::-webkit-datetime-edit-day-field",".form-input::-webkit-datetime-edit-hour-field",".form-input::-webkit-datetime-edit-minute-field",".form-input::-webkit-datetime-edit-second-field",".form-input::-webkit-datetime-edit-millisecond-field",".form-input::-webkit-datetime-edit-meridiem-field"],styles:{"padding-top":0,"padding-bottom":0}},{base:["select"],class:[".form-select"],styles:{"background-image":`url("${Ql(`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20"><path stroke="${r("colors.gray.500",Yr.gray[500])}" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M6 8l4 4 4-4"/></svg>`)}")`,"background-position":`right ${yr[2]} center`,"background-repeat":"no-repeat","background-size":"1.5em 1.5em","padding-right":yr[10],"print-color-adjust":"exact"}},{base:["[multiple]"],class:null,styles:{"background-image":"initial","background-position":"initial","background-repeat":"unset","background-size":"initial","padding-right":yr[3],"print-color-adjust":"unset"}},{base:["[type='checkbox']","[type='radio']"],class:[".form-checkbox",".form-radio"],styles:{appearance:"none",padding:"0","print-color-adjust":"exact",display:"inline-block","vertical-align":"middle","background-origin":"border-box","user-select":"none","flex-shrink":"0",height:yr[4],width:yr[4],color:r("colors.blue.600",Yr.blue[600]),"background-color":"#fff","border-color":r("colors.gray.500",Yr.gray[500]),"border-width":Dy.DEFAULT,"--tw-shadow":"0 0 #0000"}},{base:["[type='checkbox']"],class:[".form-checkbox"],styles:{"border-radius":Ny.none}},{base:["[type='radio']"],class:[".form-radio"],styles:{"border-radius":"100%"}},{base:["[type='checkbox']:focus","[type='radio']:focus"],class:[".form-checkbox:focus",".form-radio:focus"],styles:{outline:"2px solid transparent","outline-offset":"2px","--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":"2px","--tw-ring-offset-color":"#fff","--tw-ring-color":r("colors.blue.600",Yr.blue[600]),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)","box-shadow":"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)"}},{base:["[type='checkbox']:checked","[type='radio']:checked"],class:[".form-checkbox:checked",".form-radio:checked"],styles:{"border-color":"transparent","background-color":"currentColor","background-size":"100% 100%","background-position":"center","background-repeat":"no-repeat"}},{base:["[type='checkbox']:checked"],class:[".form-checkbox:checked"],styles:{"background-image":`url("${Ql('<svg viewBox="0 0 16 16" fill="white" xmlns="http://www.w3.org/2000/svg"><path d="M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z"/></svg>')}")`}},{base:["[type='radio']:checked"],class:[".form-radio:checked"],styles:{"background-image":`url("${Ql('<svg viewBox="0 0 16 16" fill="white" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="8" r="3"/></svg>')}")`}},{base:["[type='checkbox']:checked:hover","[type='checkbox']:checked:focus","[type='radio']:checked:hover","[type='radio']:checked:focus"],class:[".form-checkbox:checked:hover",".form-checkbox:checked:focus",".form-radio:checked:hover",".form-radio:checked:focus"],styles:{"border-color":"transparent","background-color":"currentColor"}},{base:["[type='checkbox']:indeterminate"],class:[".form-checkbox:indeterminate"],styles:{"background-image":`url("${Ql('<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16"><path stroke="white" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 8h8"/></svg>')}")`,"border-color":"transparent","background-color":"currentColor","background-size":"100% 100%","background-position":"center","background-repeat":"no-repeat"}},{base:["[type='checkbox']:indeterminate:hover","[type='checkbox']:indeterminate:focus"],class:[".form-checkbox:indeterminate:hover",".form-checkbox:indeterminate:focus"],styles:{"border-color":"transparent","background-color":"currentColor"}},{base:["[type='file']"],class:null,styles:{background:"unset","border-color":"inherit","border-width":"0","border-radius":"0",padding:"0","font-size":"unset","line-height":"inherit"}},{base:["[type='file']:focus"],class:null,styles:{outline:["1px solid ButtonText","1px auto -webkit-focus-ring-color"]}}],o=a=>s.map(l=>l[a]===null?null:{[l[a]]:l.styles}).filter(Boolean);n.includes("base")&&t(o("base")),n.includes("class")&&e(o("class"))}});const qA=Hd;function Oy(i){return Object.fromEntries(Object.entries(i).filter(([t])=>t!=="DEFAULT"))}qA(({addUtilities:i,matchUtilities:t,theme:e})=>{i({"@keyframes enter":e("keyframes.enter"),"@keyframes exit":e("keyframes.exit"),".animate-in":{animationName:"enter",animationDuration:e("animationDuration.DEFAULT"),"--tw-enter-opacity":"initial","--tw-enter-scale":"initial","--tw-enter-rotate":"initial","--tw-enter-translate-x":"initial","--tw-enter-translate-y":"initial"},".animate-out":{animationName:"exit",animationDuration:e("animationDuration.DEFAULT"),"--tw-exit-opacity":"initial","--tw-exit-scale":"initial","--tw-exit-rotate":"initial","--tw-exit-translate-x":"initial","--tw-exit-translate-y":"initial"}}),t({"fade-in":r=>({"--tw-enter-opacity":r}),"fade-out":r=>({"--tw-exit-opacity":r})},{values:e("animationOpacity")}),t({"zoom-in":r=>({"--tw-enter-scale":r}),"zoom-out":r=>({"--tw-exit-scale":r})},{values:e("animationScale")}),t({"spin-in":r=>({"--tw-enter-rotate":r}),"spin-out":r=>({"--tw-exit-rotate":r})},{values:e("animationRotate")}),t({"slide-in-from-top":r=>({"--tw-enter-translate-y":`-${r}`}),"slide-in-from-bottom":r=>({"--tw-enter-translate-y":r}),"slide-in-from-left":r=>({"--tw-enter-translate-x":`-${r}`}),"slide-in-from-right":r=>({"--tw-enter-translate-x":r}),"slide-out-to-top":r=>({"--tw-exit-translate-y":`-${r}`}),"slide-out-to-bottom":r=>({"--tw-exit-translate-y":r}),"slide-out-to-left":r=>({"--tw-exit-translate-x":`-${r}`}),"slide-out-to-right":r=>({"--tw-exit-translate-x":r})},{values:e("animationTranslate")}),t({duration:r=>({animationDuration:r})},{values:Oy(e("animationDuration"))}),t({delay:r=>({animationDelay:r})},{values:e("animationDelay")}),t({ease:r=>({animationTimingFunction:r})},{values:Oy(e("animationTimingFunction"))}),i({".running":{animationPlayState:"running"},".paused":{animationPlayState:"paused"}}),t({"fill-mode":r=>({animationFillMode:r})},{values:e("animationFillMode")}),t({direction:r=>({animationDirection:r})},{values:e("animationDirection")}),t({repeat:r=>({animationIterationCount:r})},{values:e("animationRepeat")})},{theme:{extend:{animationDelay:({theme:i})=>({...i("transitionDelay")}),animationDuration:({theme:i})=>({0:"0ms",...i("transitionDuration")}),animationTimingFunction:({theme:i})=>({...i("transitionTimingFunction")}),animationFillMode:{none:"none",forwards:"forwards",backwards:"backwards",both:"both"},animationDirection:{normal:"normal",reverse:"reverse",alternate:"alternate","alternate-reverse":"alternate-reverse"},animationOpacity:({theme:i})=>({DEFAULT:0,...i("opacity")}),animationTranslate:({theme:i})=>({DEFAULT:"100%",...i("translate")}),animationScale:({theme:i})=>({DEFAULT:0,...i("scale")}),animationRotate:({theme:i})=>({DEFAULT:"30deg",...i("rotate")}),animationRepeat:{0:"0",1:"1",infinite:"infinite"},keyframes:{enter:{from:{opacity:"var(--tw-enter-opacity, 1)",transform:"translate3d(var(--tw-enter-translate-x, 0), var(--tw-enter-translate-y, 0), 0) scale3d(var(--tw-enter-scale, 1), var(--tw-enter-scale, 1), var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))"}},exit:{to:{opacity:"var(--tw-exit-opacity, 1)",transform:"translate3d(var(--tw-exit-translate-x, 0), var(--tw-exit-translate-y, 0), 0) scale3d(var(--tw-exit-scale, 1), var(--tw-exit-scale, 1), var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))"}}}}}});const By="Inter Variable",tM="Inconsolata Variable";[...Py.fontFamily.sans],[...Py.fontFamily.mono];const eM={".bg-floating":{backgroundColor:"var(--p-color-bg-floating)"},".bg-floating-sticky":{backgroundColor:"var(--p-color-bg-floating-sticky)"},".bg-code":{backgroundColor:"var(--p-color-bg-code)"},".bg-overlay":{backgroundColor:"var(--p-color-bg-overlay)"},".bg-selected":{backgroundColor:"var(--p-color-selected)"},".border-default":{borderColor:"var(--p-color-divider)"},".border-selected":{borderColor:"var(--p-color-selected)"},".text-default":{color:"var(--p-color-text-default)"},".text-subdued":{color:"var(--p-color-text-subdued)"},".text-inverse":{color:"var(--p-color-text-inverse)"},".text-link":{color:"var(--p-color-text-link)"},".text-code":{color:"var(--p-color-text-code)"},".text-invalid":{color:"var(--p-color-text-invalid)"},".text-selected":{color:"var(--p-color-text-selected)"},".caret-default":{caretColor:"var(--p-color-text-default)"}};KA(({addUtilities:i})=>i(eM));var Uy={exports:{}};(function(i){(function(){function t(m,g){document.addEventListener?m.addEventListener("scroll",g,!1):m.attachEvent("scroll",g)}function e(m){document.body?m():document.addEventListener?document.addEventListener("DOMContentLoaded",function g(){document.removeEventListener("DOMContentLoaded",g),m()}):document.attachEvent("onreadystatechange",function g(){(document.readyState=="interactive"||document.readyState=="complete")&&(document.detachEvent("onreadystatechange",g),m())})}function r(m){this.g=document.createElement("div"),this.g.setAttribute("aria-hidden","true"),this.g.appendChild(document.createTextNode(m)),this.h=document.createElement("span"),this.i=document.createElement("span"),this.m=document.createElement("span"),this.j=document.createElement("span"),this.l=-1,this.h.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;",this.i.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;",this.j.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;",this.m.style.cssText="display:inline-block;width:200%;height:200%;font-size:16px;max-width:none;",this.h.appendChild(this.m),this.i.appendChild(this.j),this.g.appendChild(this.h),this.g.appendChild(this.i)}function n(m,g){m.g.style.cssText="max-width:none;min-width:20px;min-height:20px;display:inline-block;overflow:hidden;position:absolute;width:auto;margin:0;padding:0;top:-999px;white-space:nowrap;font-synthesis:none;font:"+g+";"}function s(m){var g=m.g.offsetWidth,y=g+100;return m.j.style.width=y+"px",m.i.scrollLeft=y,m.h.scrollLeft=m.h.scrollWidth+100,m.l!==g?(m.l=g,!0):!1}function o(m,g){function y(){var b=x;s(b)&&b.g.parentNode!==null&&g(b.l)}var x=m;t(m.h,y),t(m.i,y),s(m)}function a(m,g,y){g=g||{},y=y||window,this.family=m,this.style=g.style||"normal",this.weight=g.weight||"normal",this.stretch=g.stretch||"normal",this.context=y}var l=null,h=null,c=null,u=null;function d(m){return h===null&&(f(m)&&/Apple/.test(window.navigator.vendor)?(m=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))(?:\.([0-9]+))/.exec(window.navigator.userAgent),h=!!m&&603>parseInt(m[1],10)):h=!1),h}function f(m){return u===null&&(u=!!m.document.fonts),u}function p(m,g){var y=m.style,x=m.weight;if(c===null){var b=document.createElement("div");try{b.style.font="condensed 100px sans-serif"}catch{}c=b.style.font!==""}return[y,x,c?m.stretch:"","100px",g].join(" ")}a.prototype.load=function(m,g){var y=this,x=m||"BESbswy",b=0,v=g||3e3,w=new Date().getTime();return new Promise(function(S,E){if(f(y.context)&&!d(y.context)){var I=new Promise(function(L,G){function F(){new Date().getTime()-w>=v?G(Error(""+v+"ms timeout exceeded")):y.context.document.fonts.load(p(y,'"'+y.family+'"'),x).then(function(M){1<=M.length?L():setTimeout(F,25)},G)}F()}),A=new Promise(function(L,G){b=setTimeout(function(){G(Error(""+v+"ms timeout exceeded"))},v)});Promise.race([A,I]).then(function(){clearTimeout(b),S(y)},E)}else e(function(){function L(){var V;(V=W!=-1&&K!=-1||W!=-1&&H!=-1||K!=-1&&H!=-1)&&((V=W!=K&&W!=H&&K!=H)||(l===null&&(V=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent),l=!!V&&(536>parseInt(V[1],10)||parseInt(V[1],10)===536&&11>=parseInt(V[2],10))),V=l&&(W==j&&K==j&&H==j||W==B&&K==B&&H==B||W==D&&K==D&&H==D)),V=!V),V&&(k.parentNode!==null&&k.parentNode.removeChild(k),clearTimeout(b),S(y))}function G(){if(new Date().getTime()-w>=v)k.parentNode!==null&&k.parentNode.removeChild(k),E(Error(""+v+"ms timeout exceeded"));else{var V=y.context.document.hidden;(V===!0||V===void 0)&&(W=F.g.offsetWidth,K=M.g.offsetWidth,H=N.g.offsetWidth,L()),b=setTimeout(G,50)}}var F=new r(x),M=new r(x),N=new r(x),W=-1,K=-1,H=-1,j=-1,B=-1,D=-1,k=document.createElement("div");k.dir="ltr",n(F,p(y,"sans-serif")),n(M,p(y,"serif")),n(N,p(y,"monospace")),k.appendChild(F.g),k.appendChild(M.g),k.appendChild(N.g),y.context.document.body.appendChild(k),j=F.g.offsetWidth,B=M.g.offsetWidth,D=N.g.offsetWidth,G(),o(F,function(V){W=V,L()}),n(F,p(y,'"'+y.family+'",sans-serif')),o(M,function(V){K=V,L()}),n(M,p(y,'"'+y.family+'",serif')),o(N,function(V){H=V,L()}),n(N,p(y,'"'+y.family+'",monospace'))})})},i.exports=a})()})(Uy);var iM=Uy.exports;const rM=Tr(iM),Xy={inter:{fontFamily:By,fontSize:16,lineHeight:20,fill:16777215}},Wy={resolution:4,chars:pi.ASCII},Zy="sans-serif",Vy={inter:aM(Xy.inter)};let jd=!1;async function nM(){const i=Object.values(Xy);await Promise.all(i.map(t=>sM(t))),jd=!0,tt.emit("fontsLoaded",Vy)}async function sM(i){const{fontFamily:t,...e}=i,r=new rM(t);try{await r.load()}catch(n){console.error(n),console.warn(`fonts: font ${t} failed to load, falling back to ${Zy}`),pi.from(t,{fontFamily:Zy,...e},Wy);return}pi.from(t,i,Wy)}function oM(){jd=!1}async function Hy(){return jd?Vy:await Ie("fontsLoaded")}function aM(i){const{fontFamily:t,...e}=i,r={fontName:t,...e};return n=>new GS(n,r)}async function ql({cullAtZoomThreshold:i=!0}={}){const{inter:t}=await Hy(),e=await vy(),r=t("");i&&e.add(r);async function n(s){return r.text=s,await r}return{element:r,render:n}}const lM=["result","markdown","table","progress","image","unknown"],Ky={markdown:"ArtifactMarkdown",table:"ArtifactTable",result:"ArtifactResult",image:"ArtifactImage",progress:"ArtifactProgress",unknown:"Artifact"},Jd=["flow-run","task-run"];function hM(i){return Jd.includes(i)}function th(i){return Jd.includes(i.kind)}function zy(i){return i.kind==="artifact"}function Yy(i){return i.kind==="artifacts"}function jy(i){return i.kind==="state"}function Jy(i){return i.kind==="event"}function $y(i){return i.kind==="events"}const cM=["COMPLETED","RUNNING","SCHEDULED","PENDING","FAILED","CANCELLED","CANCELLING","CRASHED","PAUSED"];async function Qy({cullAtZoomThreshold:i}){const t=await Lt(),e=new Ct,r=new Ct,{element:n,render:s}=await BA({cullAtZoomThreshold:i}),{element:o,render:a}=await FA(),{element:l,render:h}=await ql({cullAtZoomThreshold:i}),{element:c,render:u}=await PA();let d=!1,f=null,p;r.addChild(l),e.addChild(c),e.addChild(r);async function m(v){const{selected:w,name:S,type:E}=v;return d=w??d,f=S??f,p=E,p==="progress"?r.addChild(o):r.addChild(n),v.type==="progress"?await Promise.all([y(v.data),x()]):await Promise.all([g(),x()]),await b(),e}async function g(){if(p==="progress")return n;const v=Ky[p],{artifactIconSize:w,artifactIconColor:S,artifactPaddingLeft:E,artifactPaddingY:I}=t.styles,A=await s(v);return A.position={x:E,y:I},A.width=w,A.height=w,A.tint=S,A}async function y(v){const{artifactPaddingLeft:w,artifactPaddingRight:S,artifactPaddingY:E,artifactIconSize:I}=t.styles,A=20,L=(I-A*2)/2,G=a({value:v,radius:L,lineWidth:A});return f?G.position.x+=w:G.position.x+=(w+S)/2,G.position.y+=E,o}async function x(){if(!f)return l.visible=!1,l;await h(f);const{artifactPaddingLeft:v,artifactPaddingY:w,artifactTextColor:S,artifactIconSize:E,artifactContentGap:I}=t.styles,A=f?I:0,L=v+E+A,G=w;return l.tint=S,l.scale.set(.75),l.position={x:L,y:G},l.visible=!0,l}async function b(){const{artifactPaddingLeft:v,artifactPaddingRight:w,artifactPaddingY:S}=t.styles,E={selected:d,width:r.width+v+w,height:r.height+S*2};return await u(E)}return{element:e,render:m}}let zt=null,eh=!1;async function uM(){const i=await ee();i.on("click",()=>Wi(null)),i.on("drag-start",()=>{eh=!0}),i.on("drag-end",()=>{setTimeout(()=>{eh=!1})})}function dM(){zt=null,eh=!1}function Wi(i){if(!eh&&!(!i&&!zt||i&&br(i))){if(zt=i,i===null){tt.emit("itemSelected",null);return}tt.emit("itemSelected",i)}}function br(i){if(zt===null)return!1;const{kind:t}=i;switch(t){case"task-run":return th(zt)&&zt.id===i.id;case"flow-run":return th(zt)&&zt.id===i.id;case"artifact":return zy(zt)&&zt.id===i.id;case"artifacts":return Yy(zt)&&zt.ids.length===i.ids.length&&zt.ids.every(r=>i.ids.includes(r));case"state":return jy(zt)&&zt.id===i.id;case"event":return Jy(zt)&&zt.id===i.id;case"events":return $y(zt)&&zt.ids.length===i.ids.length&&zt.ids.every(r=>i.ids.includes(r));default:const e=t;throw new Error(`switch does not have case for value: ${e}`)}}function fM(){return zt&&th(zt)?zt:null}async function $d(i,{cullAtZoomThreshold:t=!0,enableLocalClickHandling:e=!1}={}){const{element:r,render:n}=await Qy({cullAtZoomThreshold:t});let s=!1,o=i;r.eventMode="static",r.cursor="pointer",e&&r.on("click",u=>{u.stopPropagation(),Wi({kind:"artifact",id:o.id})}),tt.on("itemSelected",()=>{const u=br({kind:"artifact",id:o.id});u!==s&&(s=u,a(o))});async function a(u){o=u,await n({selected:s,name:o.key,...o})}function l(){return s}function h(){return o.created}function c(){return o.id}return{isArtifact:!0,element:r,render:a,getSelected:l,getDate:h,getId:c}}function qy(i){return i.isArtifact===!0}async function tb(i,t){const e=await Zi(),r=await Lt();let n,s=null;async function o(){try{s=await r.fetchEvents(Y.toValue(i)),t(s)}catch(l){console.error(l)}e.end_time||(n=setTimeout(()=>o(),r.fetchEventsInterval))}function a(){clearTimeout(n)}return{start:o,stop:a}}async function pM(){const i=await Lt(),t=await vy(),e=new Ct,{element:r,render:n}=await Sy(),{element:s,render:o}=await Bd(),{element:a,render:l}=await Ud();t.add(e);let h=!1;e.eventMode="static",e.cursor="pointer",e.addChild(s),e.addChild(r),e.addChild(a),e.on("mouseover",u),e.on("mouseout",d);async function c({inside:f,isOpen:p}){h=f;const m={size:10,stroke:2,rotate:p?Jl.Up:Jl.Down},g=await n(m),y={width:i.styles.nodeToggleSize,height:i.styles.nodeToggleSize,background:i.styles.nodeToggleBgColor,radius:i.styles.nodeToggleBorderRadius},x=await o(y);x.alpha=f?0:.5;const b=await l({width:y.width,height:y.height,radius:y.radius,stroke:1,color:i.styles.nodeToggleBorderColor});b.alpha=f?0:1;const v={y:x.height/2,x:x.width/2},w=m.size/4;return g.x=v.x,g.y=p?v.y+w:v.y-w,e}function u(){s.alpha=h?.5:1}function d(){s.alpha=h?0:.5}return{element:e,render:c}}async function eb(){const i=await Lt(),t=await ie(),e=new Ct,{element:r,render:n}=await Bd(),{element:s,render:o}=await $l();e.addChild(r),e.addChild(s);async function a(h){const{background:c="#fff"}=i.styles.node(h),{nodeHeight:u,nodeRadius:d}=i.styles,f=br({kind:h.kind,id:h.id}),p=l(h,d),m=h.state_type!=="RUNNING"||t.isDependency();return await Promise.all([n({width:p,height:u,radius:d,background:c,capRight:m}),o({selected:f,width:p,height:u})]),r}function l(h,c){const u=qd();if(it.isTemporal()||it.isLeftAligned()){const d=h.start_time,f=h.end_time??new Date,m=Kf(f,d)/ua*u;return Math.max(m,c*2)}return u}return{element:e,render:a}}var ib="Expected a function",rb=NaN,mM="[object Symbol]",gM=/^\s+|\s+$/g,yM=/^[-+]0x[0-9a-f]+$/i,bM=/^0b[01]+$/i,xM=/^0o[0-7]+$/i,_M=parseInt,vM=typeof we=="object"&&we&&we.Object===Object&&we,wM=typeof self=="object"&&self&&self.Object===Object&&self,TM=vM||wM||Function("return this")(),SM=Object.prototype,CM=SM.toString,EM=Math.max,IM=Math.min,Qd=function(){return TM.Date.now()};function AM(i,t,e){var r,n,s,o,a,l,h=0,c=!1,u=!1,d=!0;if(typeof i!="function")throw new TypeError(ib);t=nb(t)||0,ih(e)&&(c=!!e.leading,u="maxWait"in e,s=u?EM(nb(e.maxWait)||0,t):s,d="trailing"in e?!!e.trailing:d);function f(S){var E=r,I=n;return r=n=void 0,h=S,o=i.apply(I,E),o}function p(S){return h=S,a=setTimeout(y,t),c?f(S):o}function m(S){var E=S-l,I=S-h,A=t-E;return u?IM(A,s-I):A}function g(S){var E=S-l,I=S-h;return l===void 0||E>=t||E<0||u&&I>=s}function y(){var S=Qd();if(g(S))return x(S);a=setTimeout(y,m(S))}function x(S){return a=void 0,d&&r?f(S):(r=n=void 0,o)}function b(){a!==void 0&&clearTimeout(a),h=0,r=l=n=a=void 0}function v(){return a===void 0?o:x(Qd())}function w(){var S=Qd(),E=g(S);if(r=arguments,n=this,l=S,E){if(a===void 0)return p(l);if(u)return a=setTimeout(y,t),f(l)}return a===void 0&&(a=setTimeout(y,t)),o}return w.cancel=b,w.flush=v,w}function MM(i,t,e){var r=!0,n=!0;if(typeof i!="function")throw new TypeError(ib);return ih(e)&&(r="leading"in e?!!e.leading:r,n="trailing"in e?!!e.trailing:n),AM(i,t,{leading:r,maxWait:t,trailing:n})}function ih(i){var t=typeof i;return!!i&&(t=="object"||t=="function")}function RM(i){return!!i&&typeof i=="object"}function PM(i){return typeof i=="symbol"||RM(i)&&CM.call(i)==mM}function nb(i){if(typeof i=="number")return i;if(PM(i))return rb;if(ih(i)){var t=typeof i.valueOf=="function"?i.valueOf():i;i=ih(t)?t+"":t}if(typeof i!="string")return i===0?i:+i;i=i.replace(gM,"");var e=bM.test(i);return e||xM.test(i)?_M(i.slice(2),e?2:8):yM.test(i)?rb:+i}var LM=MM;const sb=Tr(LM);async function ob(){const{element:i,render:t}=await Qy({cullAtZoomThreshold:!1});let e=null,r=[],n=!1;i.eventMode="static",i.cursor="pointer",tt.on("itemSelected",()=>{const h=br({kind:"artifacts",ids:r});h!==n&&e&&(n=h,s({ids:r,date:e}))});async function s(h){if(!h){e=null,r=[],i.visible=!1;return}const{ids:c,date:u}=h;e=u,r=c,await t({selected:n,type:"unknown",name:c.length.toString()}),i.visible=!0}function o(){return n}function a(){return e}function l(){return r}return{isArtifactCluster:!0,element:i,render:s,getSelected:o,getDate:a,getIds:l,isCluster:!0}}async function GM(){const i=await qt(),t=await Zi(),e=await ie(),{element:r,render:n,update:s}=await _b({isRoot:!0});r.zIndex=4;function o(a){if(it.isTemporal()&&!e.disableArtifacts){i.stage.addChild(r),n(a==null?void 0:a.artifacts);return}i.stage.removeChild(r)}t.artifacts&&o(t),tt.on("viewportMoved",()=>s()),tt.on("runDataCreated",a=>o(a)),tt.on("runDataUpdated",a=>o(a)),tt.on("configUpdated",()=>o()),tt.on("layoutSettingsUpdated",()=>o())}function g5(){}async function kM({radius:i}){const t=await qt(),e=new kr;return e.beginFill("#fff"),e.drawCircle(0,0,i),e.endFill(),t.renderer.generateTexture(e,{resolution:10})}async function FM(i){return await Uo(kM,[i])}async function ab(i){const t=await FM(i);return new Qt(t)}async function lb(i){const t=new Ct,e=await Lt(),r=await gr(),n=await ab({radius:e.styles.eventRadiusDefault}),{element:s,render:o}=await $l();let a=!1;t.addChild(r),t.addChild(n),t.addChild(s),t.eventMode="static",t.cursor="pointer",t.on("mouseenter",()=>{a||n.scale.set(1.5)}),t.on("mouseleave",()=>{a||n.scale.set(1)}),tt.on("itemSelected",()=>{const u=br({kind:"event",id:i.id,occurred:i.occurred});u!==a&&(a=u,n.scale.set(u?1.5:1),l())});function l(){const{eventColor:u,eventTargetSize:d,eventSelectedBorderInset:f}=e.styles;r.alpha=0,r.width=d,r.height=d,n.tint=u,n.anchor.set(.5),n.position.set(d/2,d/2),s.position.set(f,f),o({selected:a,width:d-f*2,height:d-f*2})}function h(){return i.id}function c(){return i.occurred}return{element:t,render:l,getId:h,getDate:c}}async function hb(){const i=new Ct,t=await Lt(),e=await gr(),r=await ab({radius:t.styles.eventClusterRadiusDefault}),{element:n,render:s}=await $l(),{element:o,render:a}=await ql({cullAtZoomThreshold:!1});let l=null,h=[],c=!1;i.addChild(e),i.addChild(r),i.addChild(o),i.addChild(n),i.eventMode="static",i.cursor="pointer",i.on("mouseenter",()=>{c||r.scale.set(1.5)}),i.on("mouseleave",()=>{c||r.scale.set(1)}),tt.on("itemSelected",()=>{const x=br({kind:"events",occurred:l,ids:h});x!==c&&(c=x,r.scale.set(x?1.5:1),l&&u({ids:h,date:l}))});async function u(x){if(!x){l=null,h=[],i.visible=!1;return}const{ids:b,date:v}=x;l=v,h=b,d(),f(),m(),await p(b.length.toString()),i.visible=!0}function d(){const{eventTargetSize:x}=t.styles;e.alpha=0,e.width=x,e.height=x}function f(){const{eventClusterColor:x,eventTargetSize:b}=t.styles;r.tint=x,r.anchor.set(.5),r.position.set(b/2,b/2)}async function p(x){if(h.length<2)return;const{eventTargetSize:b}=t.styles,v=-1;o.scale.set(.6),o.anchor.set(.5),o.position.set(b/2,b/2+v),await a(x)}function m(){const{eventSelectedBorderInset:x,eventTargetSize:b}=t.styles;n.position.set(x,x),s({selected:c,width:b-x*2,height:b-x*2})}function g(){return h}function y(){return l}return{element:i,render:u,getIds:g,getDate:y}}function jr(i){return"getIds"in i}async function cb({items:i,createCluster:t}){const e=[...i.values()].sort((o,a)=>o.element.x-a.element.x);async function r(o){let a,l=null,h=null;for(let c=o??0;c<e.length;c++){const u=e[c],d=u.element.x;if(u.element.visible=!0,l!==null&&a&&d<a){h=c;break}l=c,a=d+u.element.width}if(h!==null&&l!==null){const c=e[l],u=e[h];c.element.visible=!1,u.element.visible=!1;const d=await n(c,u);d&&(e.splice(l,1,d),e.splice(h,1)),r(l)}}async function n(o,a){const l=o.getDate(),h=a.getDate(),c=jr(o)?o.getIds():[o.getId()],u=jr(a)?a.getIds():[a.getId()];if(!l||!h)return console.error("flowRunArtifacts: visible item is missing date"),null;let d;jr(o)?d=o:jr(a)?d=a:d=await t();const f=[...c,...u],p=s(f);return await d.render({ids:f,date:p}),d}function s(o){const a=o.reduce((c,u)=>{const d=i.get(u),f=d==null?void 0:d.getDate();return f&&c.push(f.getTime()),c},[]),l=Math.min(...a),h=Math.max(...a);return new Date((l+h)/2)}await r()}async function ub(i){const t=await qt(),e=await ee(),r=await Lt(),n=await ie();let s=await ri();const o=await l();o.element.on("click",c=>{c.stopPropagation();const{element:u}=o,d={x:u.position.x,y:u.position.y,width:u.width,height:u.height},f=jr(o)?{kind:"events",ids:o.getIds(),occurred:o.getDate(),position:d}:{kind:"event",id:o.getId(),occurred:o.getDate(),position:d};Wi(f)}),tt.on("scaleUpdated",c=>{s=c,h()}),tt.on("viewportMoved",()=>h());async function a(c){await o.render(c),h()}async function l(){return i.type==="event"?await lb(i.event):await hb()}function h(){const c=o.getDate();if(!c||n.disableEvents||!it.isTemporal())return;const{element:u}=o,f=s(c)*e.scale._x+e.worldTransform.tx-u.width/2,p=t.screen.height-u.height-r.styles.eventBottomMargin;u.position.set(f,p)}return{...o,render:a}}async function db(i){const t=await ee(),e=await ie();let r=await ri();const n=await o();n.element.on("click",l=>{l.stopPropagation();const{element:h}=n,c=h.getGlobalPosition(),u={x:c.x,y:c.y,width:h.width*t.scale.x,height:h.height*t.scale.y},d=jr(n)?{kind:"events",ids:n.getIds(),occurred:n.getDate(),position:u}:{kind:"event",id:n.getId(),occurred:n.getDate(),position:u};Wi(d)}),tt.on("scaleUpdated",l=>{r=l,a()});async function s(l){await n.render(l),a()}async function o(){return i.type==="event"?await lb(i.event):await hb()}function a(){const l=n.getDate(),{parentStartDate:h}=i;if(!l||e.disableEvents||!it.isTemporal()||!h)return;const{element:c}=n,d=r(l)-r(h)-c.width/2,f=-c.height;c.position.set(d,f)}return{...n,render:s}}async function fb({isRoot:i,parentStartDate:t}={}){const e=await ie(),r=new Map,n=new Map,s=[];let o=[];const a=new Ct;let l=null;tt.on("scaleUpdated",()=>u());async function h(p){if(p&&(l=p),!l)return;const m=[];for(const g of l)m.push(c(g));await Promise.all(m),u()}async function c(p){if(r.has(p.id))return r.get(p.id).render();if(n.has(p.id))return await n.get(p.id);const m=(async()=>{const g=i?await ub({type:"event",event:p}):await db({type:"event",event:p,parentStartDate:t});r.set(p.id,g),a.addChild(g.element)})();return n.set(p.id,m),await m,n.delete(p.id),r.get(p.id).render()}function u(){e.disableEvents||!it.isTemporal()||d()}const d=sb(async()=>{o=[...s],await cb({items:r,createCluster:f});for(const p of o)p.render()},250);async function f(){if(o.length>0)return o.pop();const p=i?await ub({type:"cluster"}):await db({type:"cluster",parentStartDate:t});return a.addChild(p.element),s.push(p),p}return{element:a,render:h,update:u}}let Zo=null,Ls=null;async function DM(){const i=await qt(),t=await Lt(),e=await ie(),r=await Zi(),{element:n,render:s,update:o}=await fb({isRoot:!0});n.zIndex=2;async function a(h){if(!it.isTemporal()||e.disableEvents){i.stage.removeChild(n);return}i.stage.addChild(n),await s(h)}const l=await tb(()=>({nodeId:t.runId,since:r.start_time,until:r.end_time??new Date}),h=>{const c=Ls?"eventDataUpdated":"eventDataCreated";Ls=h,tt.emit(c,Ls),a(h)});tt.on("configUpdated",()=>a()),tt.on("viewportMoved",()=>o()),tt.on("layoutSettingsUpdated",()=>a()),Zo=l.stop,l.start()}function NM(){Zo==null||Zo(),Zo=null,Ls=null}async function OM(){return Ls||await Ie("eventDataCreated")}async function BM(i){const t=await qt(),e=await ee(),r=await Lt(),n=await Zi();let s=await ri();const o=new Ct,a=await gr(),l=await gr();let h=null,c=!1,u=!1;t.stage.addChild(l),o.addChild(a),a.eventMode="static",a.cursor="pointer",a.on("mouseover",()=>{c=!0,d()}),a.on("mouseleave",()=>{c=!1,d()}),a.on("click",()=>{const b={x:a.position.x,y:a.position.y,width:a.width,height:a.height};Wi({...i,kind:"state",position:b})}),tt.on("viewportMoved",()=>d()),tt.on("scaleUpdated",b=>{s=b,d()}),tt.on("itemSelected",()=>{const b=br({kind:"state",...i});b!==u&&(u=b,c=!1,d())}),i.type==="RUNNING"&&!n.end_time&&g();function d(b){const{end:v}=b??{};if(v&&(h=v),n.end_time&&y(),!it.isTemporal()){l.visible=!1,o.visible=!1;return}const w=f();p(w),m(w),l.visible=!0,o.visible=!0}function f(){const{background:b="#fff"}=r.styles.state(i),v=Math.max(s(i.timestamp)*e.scale._x+e.worldTransform.tx,0);let w=0;return i.type==="RUNNING"&&!n.end_time?w=s(new Date)*e.scale._x+e.worldTransform.tx-v:h?w=s(h)*e.scale._x+e.worldTransform.tx-v:w=t.screen.width-v,{x:v,width:Math.max(w,0),background:b}}function p({x:b,width:v,background:w}){const{flowStateBarHeight:S,flowStateSelectedBarHeight:E}=r.styles,I=c||u?E:S;a.x=b,a.y=t.screen.height-I,a.width=v,a.height=I,a.tint=w}function m({x:b,width:v,background:w}){if(i.type==="RUNNING"){l.visible=!1;return}const{flowStateBarHeight:S,flowStateAreaAlpha:E}=r.styles;l.x=b,l.y=0,l.width=v,l.height=t.screen.height-S,l.tint=w,l.alpha=E}function g(){t.ticker.add(x)}function y(){t.ticker.remove(x)}function x(){d()}return{element:o,render:d}}function UM(i){return"isNodesFlowRunStateFactory"in i}async function XM(i){const t=await qt(),e=await ee(),r=await Lt(),n=await Zi();let s=await ri();const o=new Ct,a=await gr(),l=await gr();let h=null,c=null,u=0,d=0,f=!1,p=!1;o.visible=!1,o.addChild(l),o.addChild(a),a.eventMode="static",a.cursor="pointer",a.on("mouseover",()=>{f=!0,m()}),a.on("mouseleave",()=>{f=!1,m()}),a.on("click",S=>{S.stopPropagation();const E=a.getGlobalPosition(),I={x:E.x,y:E.y,width:a.width*e.scale.x,height:a.height*e.scale.y};Wi({...i,kind:"state",position:I})}),l.eventMode="none",l.cursor="default",tt.on("scaleUpdated",S=>{s=S,m()}),tt.on("itemSelected",()=>{const S=br({kind:"state",...i});S!==p&&(p=S,f=!1,m())}),i.type==="RUNNING"&&!n.end_time&&b();function m(S){const{end:E,parentStartDate:I,width:A,height:L}=S??{};if(E&&(h=E),I&&(c=I),A&&(u=A),L&&(d=L),n.end_time&&v(),!it.isTemporal()){o.visible=!1;return}if(!c||u<=0){o.visible=!1;return}const G=g();if(G.width<=0){o.visible=!1;return}y(G),x(G),o.visible=!0}function g(){const{background:S="#fff"}=r.styles.state(i);if(!c)return{x:0,width:0,background:S};const E=s(c);let I=s(i.timestamp)-E;if(I>=u)return{x:u,width:0,background:S};I<0&&(I=0);let A=s(h??new Date)-E;A>u&&(A=u);const L=Math.max(A-I,0);return{x:I,width:L,background:S}}function y({x:S,width:E,background:I}){const{flowStateBarHeight:A,flowStateSelectedBarHeight:L}=r.styles,G=f||p?L:A;a.x=S,a.y=d-G,a.width=E,a.height=G,a.tint=I}function x({x:S,width:E,background:I}){const{flowStateBarHeight:A,flowStateAreaAlpha:L,nodeHeight:G}=r.styles,F=G/2;l.x=S,l.y=F,l.width=E,l.height=d-A-F,l.tint=I,l.alpha=L}function b(){t.ticker.add(w)}function v(){t.ticker.remove(w)}function w(){m()}return{element:o,render:m,isNodesFlowRunStateFactory:!0}}function pb({isRoot:i}={}){const t=new Ct,e=new Map,r=new Map;let n=null;async function s(a,l){if(a&&(n=a),!n)return;const h=[];for(let c=0;c<n.length;c++)h.push(o(n[c],c,l));await Promise.all(h)}async function o(a,l,h){const c=n&&n.length>=l+1&&n[l+1],u=c?c.timestamp:void 0;let d;if(r.has(a.id)&&await r.get(a.id),e.has(a.id))d=e.get(a.id);else{const f=(async()=>{const p=i?await BM(a):await XM(a);e.set(a.id,p),t.addChild(p.element)})();r.set(a.id,f),await f,r.delete(a.id),d=e.get(a.id)}UM(d)?await d.render({end:u,...h}):await d.render(u?{end:u}:void 0)}return{element:t,render:s}}async function WM(){const i=await qt(),t=await Zi(),{element:e,render:r}=await pb({isRoot:!0});e.zIndex=3,i.stage.addChild(e);function n(s){r(s==null?void 0:s.states)}t.states&&n(t),tt.on("runDataUpdated",s=>n(s)),tt.on("configUpdated",()=>n()),tt.on("layoutSettingsUpdated",()=>n())}function y5(){}async function ZM(){const i=await qt(),t=await ee(),e=await ie(),r=await Lt(),{inter:n}=await Hy(),s=new Ct,o=await gr();s.addChild(o);const a=n("");s.addChild(a);let l=await ri(),h,c;tt.on("scaleUpdated",m=>{l=m,p()}),tt.on("viewportMoved",()=>{e.disableGuides||(p(),s.height!==i.screen.height&&d())});function u(m,g){h=m,c=g,d(),f(m)}function d(){o.width=r.styles.guideLineWidth,o.height=i.screen.height,o.tint=r.styles.guideLineColor}function f(m){a.text=c(m),a.fontSize=r.styles.guideTextSize,a.tint=r.styles.guideTextColor,a.position.set(r.styles.guideTextLeftPadding,r.styles.guideTextTopPadding)}function p(){h!==void 0&&(s.position.x=l(h)*t.scale._x+t.worldTransform.tx)}return{element:s,render:u}}class mb extends Error{constructor(){super("Layout is not temporal")}}function VM(i){return i.toLocaleTimeString()}function gb(i){const t=navigator.language;return new Intl.DateTimeFormat(t,{timeStyle:"short"}).format(i)}function HM(i){const t=navigator.language;return new Intl.DateTimeFormat(t,{dateStyle:"short"}).format(i)}function KM(i){return i.getHours()===0&&i.getMinutes()===0?`${rh.date(i)}
1176
+ ${gb(i)}`:gb(i)}const rh={timeBySeconds:VM,timeByMinutesWithDates:KM,date:HM},oe={seconds:"seconds",minutes:"minutes",date:"date"},Vo={day:i=>{const t=new Date(i.getTime());return t.setHours(0,0,0,0),t.getTime()},week:i=>{const t=new Date(i.getTime());return t.setHours(0,0,0,0),t.setDate(i.getDate()-i.getDay()+1),t.getTime()}},At={second:1e3,minute:1e3*60,hour:1e3*60*60,day:1e3*60*60*24,week:1e3*60*60*24*7},yb=[{ceiling:At.second*4,increment:At.second,labelFormat:oe.seconds},{ceiling:At.second*8,increment:At.second*5,labelFormat:oe.seconds},{ceiling:At.second*13,increment:At.second*10,labelFormat:oe.seconds},{ceiling:At.second*20,increment:At.second*15,labelFormat:oe.seconds},{ceiling:At.second*45,increment:At.second*30,labelFormat:oe.seconds},{ceiling:At.minute*4,increment:At.minute,labelFormat:oe.minutes},{ceiling:At.minute*8,increment:At.minute*5,labelFormat:oe.minutes},{ceiling:At.minute*13,increment:At.minute*10,labelFormat:oe.minutes},{ceiling:At.minute*28,increment:At.minute*15,labelFormat:oe.minutes},{ceiling:At.hour*1.24,increment:At.minute*30,labelFormat:oe.minutes},{ceiling:At.hour*3,increment:At.hour,labelFormat:oe.minutes},{ceiling:At.hour*8,increment:At.hour*2,getAnchor:Vo.day,labelFormat:oe.minutes},{ceiling:At.hour*13,increment:At.hour*6,getAnchor:Vo.day,labelFormat:oe.minutes},{ceiling:At.hour*22,increment:At.hour*12,getAnchor:Vo.day,labelFormat:oe.minutes},{ceiling:At.day*4,increment:At.day,getAnchor:Vo.day,labelFormat:oe.date},{ceiling:At.week*2,increment:At.week,getAnchor:Vo.week,labelFormat:oe.date},{ceiling:1/0,increment:At.week*4,labelFormat:oe.date}],zM=300;async function YM(){const i=await ee(),t=await ie(),e=new Ct,r=new Map;let n=await ri();tt.on("scaleUpdated",d=>n=d),await o();function s(){if(e.visible=!t.disableGuides,!t.disableGuides)try{const{anchor:d,increment:f,labelFormat:p}=a(),m=u(d,f);c(m,p)}catch(d){if(d instanceof mb)return;console.error(d)}}async function o(){const d=[];Od(30,async f=>{const p=ZM();d.push(p);const m=await p;e.addChild(m.element),r.set(f,m)}),await Promise.all(d)}function a(){const d=i.left-zM,f=n.invert(d),p=n.invert(d+260/i.scale.x);if(!(f instanceof Date)||!(p instanceof Date))throw new mb;const m=p.getTime()-f.getTime(),{increment:g,getAnchor:y,labelFormat:x}=l(m);return{anchor:y(f),increment:g,labelFormat:h(x)}}function l(d){const f=yb.find(p=>p.ceiling>d)??yb[0];return f.getAnchor||(f.getAnchor=p=>Math.floor(p.getTime()/f.increment)*f.increment),f}function h(d){switch(d){case oe.minutes:return rh.timeByMinutesWithDates;case oe.date:return rh.date;default:return rh.timeBySeconds}}function c(d,f){const p=new Map(r.entries()),m=Array.from(p.keys()).filter(g=>!d.includes(g));r.clear();for(const g of d){if(p.has(g)){const x=p.get(g);r.set(g,x),x.render(new Date(g),f);continue}const y=p.get(m.pop()??-1);if(y===void 0){console.warn("Guides: No unused guides available to render.");continue}y.render(new Date(g),f),r.set(g,y)}}function u(d,f){return Od(30,p=>d+f*p)}return{element:e,render:s}}async function jM(){const i=await qt(),{element:t,render:e}=await YM();i.stage.addChild(t),e(),tt.on("viewportDateRangeUpdated",()=>e()),tt.on("layoutSettingsUpdated",()=>e()),tt.on("configUpdated",()=>e())}function b5(){}const JM=80;async function $M(){const i=await qt(),t=await ee(),e=await ie(),r=await Lt(),n=await gr();let s=await ri();tt.on("scaleUpdated",l=>s=l);function o(){if(!e.isTemporal()){n.visible=!1;return}n.width=r.styles.playheadWidth,n.height=i.stage.height,n.tint=r.styles.playheadColor,n.position.x=s(new Date)*t.scale.x+t.worldTransform.tx,a()}function a(){if(t.moving||!(n.position.x>0&&n.position.x<i.screen.width)||!(n.position.x>i.screen.width-JM))return;const c=t.left;t.zoomPercent(-.1,!0),t.left=c}return{element:n,render:o}}async function QM(){const i=await qt(),t=await Zi(),{element:e,render:r}=await $M();t.end_time||(i.stage.addChild(e),i.ticker.add(r)),tt.on("runDataUpdated",({end_time:n})=>{n&&(i.ticker.remove(r),i.stage.removeChild(e))})}function x5(){}function qM({stage:i,props:t}){BS(),hA(),aA(),jM(),lR(),GM(),DM(),WM(),QM(),HS(),nM(),NS(i),jS(t),yA(),pR(),uM()}function tR(){tt.clear();try{US(),cA(),lA(),OS(),hR(),NM(),JS(),KS(),oM(),bA(),mR(),dM(),vA()}catch(i){console.error(i)}}async function bb(i){const t=await qt(),e=await ee(),r=await Lt(),n=await ie(),s=await OM();let o=await ri(),a=s&&s.length>0;const l=await c();l.element.on("click",d=>{d.stopPropagation();const{element:f}=l,p=f.getGlobalPosition(),m={x:p.x,y:p.y,width:f.width,height:f.height},g=jr(l)?{kind:"artifacts",ids:l.getIds(),position:m}:{kind:"artifact",id:l.getId()};Wi(g)}),tt.on("scaleUpdated",d=>{o=d,u()}),tt.on("viewportMoved",()=>u()),tt.on("eventDataCreated",d=>{a=d.length>0,u()}),tt.on("eventDataUpdated",d=>{a=d.length>0,u()});async function h(d){if(qy(l)){if(i.type!=="artifact")throw new Error(`ArtifactFactory attempted to render a ${i.type}`);await l.render(i.artifact)}else await l.render(d);u()}async function c(){return i.type==="artifact"?await $d(i.artifact,{cullAtZoomThreshold:!1}):await ob()}function u(){const d=l.getDate();if(!d||!it.isTemporal()||n.disableArtifacts)return;const f=l.getSelected(),{element:p}=l,{eventTargetSize:m,flowStateSelectedBarHeight:g}=r.styles;let y=0;if(f){const{selectedBorderOffset:S,selectedBorderWidth:E}=r.styles;y=S+E*2}const b=o(d)*e.scale._x+e.worldTransform.tx-(p.width-y)/2,v=a&&!n.disableEvents?m:g,w=t.screen.height-(p.height-y)-v;p.position.set(b,w)}return{...l,render:h}}async function xb(i){const t=await ee(),e=await Lt(),r=await ie();let n=await ri();const s=await a();s.element.on("click",h=>{h.stopPropagation();const{element:c}=s,u=c.getGlobalPosition(),d={x:u.x,y:u.y,width:c.width*t.scale.x,height:c.height*t.scale.y},f=jr(s)?{kind:"artifacts",ids:s.getIds(),position:d}:{kind:"artifact",id:s.getId()};Wi(f)}),tt.on("scaleUpdated",h=>{n=h,l()});async function o(h){if(qy(s)){if(i.type!=="artifact")throw new Error(`ArtifactFactory attempted to render a ${i.type}`);await s.render(i.artifact)}else await s.render(h);l()}async function a(){return i.type==="artifact"?await $d(i.artifact):await ob()}function l(){const h=s.getDate(),{parentStartDate:c}=i;if(!h||!it.isTemporal()||r.disableArtifacts||!c)return;const u=s.getSelected(),{element:d}=s;let f=0;if(u){const{selectedBorderOffset:y,selectedBorderWidth:x}=e.styles;f=y+x*2}const m=n(h)-n(c)-(d.width-f)/2,g=-(d.height-f);d.position.set(m,g)}return{...s,render:o}}async function _b({isRoot:i,parentStartDate:t}={}){const e=await ie(),r=new Map,n=new Map,s=[];let o=[];const a=new Ct;let l=null;async function h(p){if(p&&(l=p),!l)return;const m=[];for(const g of l)m.push(c(g));await Promise.all(m),u()}async function c(p){if(r.has(p.id))return r.get(p.id).render(p);n.has(p.id)&&await n.get(p.id);const m=(async()=>{const g=i?await bb({type:"artifact",artifact:p}):await xb({type:"artifact",artifact:p,parentStartDate:t});r.set(p.id,g),a.addChild(g.element)})();return n.set(p.id,m),await m,n.delete(p.id),r.get(p.id).render(p)}function u(){if(!(e.disableArtifacts||!it.isTemporal())){if(!it.isTemporal()){a.visible=!1;return}a.visible=!0,a.position.x=0,d()}}const d=sb(async()=>{o=[...s],await cb({items:r,createCluster:f});for(const p of o)p.render()},250);async function f(){if(o.length>0)return o.pop();const p=i?await bb({type:"cluster"}):await xb({type:"cluster",parentStartDate:t});return a.addChild(p.element),s.push(p),p}return{element:a,render:h,update:u}}class vb extends Ct{updateTransform(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(let t=0,e=this.children.length;t<e;++t)this.children[t].updateTransform()}calculateBounds(){this._bounds.clear(),this._calculateBounds();for(const t of this.children)if(t.calculateBounds(),t._mask){const e=t._mask.isMaskData?t._mask.maskObject:t._mask;e?(e.calculateBounds(),this._bounds.addBoundsMask(t._bounds,e._bounds)):this._bounds.addBounds(t._bounds)}else t.filterArea?this._bounds.addBoundsArea(t._bounds,t.filterArea):this._bounds.addBounds(t._bounds);this._bounds.updateID=this._boundsID}}async function eR(i){const t=new vb,e=await Lt(),r=await ie(),{element:n,render:s}=await eb(),{element:o,render:a}=await ql(),{element:l,render:h}=await pM(),{element:c,render:u}=await Ud(),{element:d,render:f,getSize:p,stopWorker:m}=await Cb(),{element:g,render:y}=await pb(),{element:x,render:b,update:v}=await fb({parentStartDate:i.start_time}),{element:w,render:S,update:E}=await _b({parentStartDate:i.start_time});let I=!1,A=!1,L=i,G=!1;t.sortableChildren=!0,c.zIndex=0,n.zIndex=4,o.zIndex=5,l.zIndex=5,d.zIndex=2,x.zIndex=1,g.zIndex=2,w.zIndex=3,c.eventMode="none",c.cursor="default";const{start:F,stop:M}=await ag(L.id,Q=>{A=!!Q.artifacts&&Q.artifacts.length>0,f(Q),B(Q.states),k(Q.artifacts),j()}),{start:N,stop:W}=await tb(()=>({nodeId:L.id,since:L.start_time,until:L.end_time??new Date}),Q=>{I=Q.length>0,D(Q)});t.addChild(n),t.addChild(o),t.addChild(l),l.on("click",Q=>{Q.stopPropagation(),H()}),d.position={x:0,y:e.styles.nodeHeight+e.styles.nodesPadding},d.on("rendered",()=>{Yl(),Tt()});async function K(Q){return L=Q,await s(Q),await ft(),await at(),G&&(await B(),await D(),await k(),await j()),t}async function H(){G?await et():await V()}async function j(){const{background:Q="#fff"}=e.styles.node(L),{width:Z,height:J}=p(),{height:$}=It(),{nodeBorderRadius:O}=e.styles,pt=2;c.position={x:-pt,y:-pt};const yt=it.isTemporal()?$+pt*2:J+pt*2;await u({width:Z+pt*2,height:yt,stroke:pt,radius:[O,O,0,0],color:Q})}async function B(Q){const{height:Z}=It(),{width:J}=n;await y(Q??void 0,{parentStartDate:L.start_time,width:J,height:Z})}async function D(Q){if(!G||!it.isTemporal()||r.disableEvents){t.removeChild(x);return}t.addChild(x);const{height:Z}=It();if(x.position={x:0,y:Z-e.styles.eventBottomMargin},Q){await b(Q);return}await v()}async function k(Q){if(!G||!it.isTemporal()||r.disableArtifacts){t.removeChild(w);return}t.addChild(w);const{eventTargetSize:Z,flowStateSelectedBarHeight:J}=e.styles,{height:$}=It(),O=$-(I&&!r.disableEvents?Z:J);if(w.position={x:0,y:O},Q){await S(Q);return}await E()}async function V(){G=!0,t.addChild(g),t.addChild(d),t.addChild(c),await Promise.all([F(),N(),K(L)]),Tt()}async function et(){G=!1,t.removeChild(g),t.removeChild(d),t.removeChild(c),t.removeChild(x),t.removeChild(w),m(),await Promise.all([M(),W(),K(L)]),Tt()}async function ft(){const Q=e.styles.nodeToggleSize,Z=e.styles.nodeHeight-Q,J=n.width>Q,$=await h({inside:J,isOpen:G});return $.x=J?Z/2:n.width+e.styles.nodePadding,$.y=Z/2,$}async function at(){const Q=await a(L.label),Z=e.styles.colorMode==="dark"?e.styles.textDefault:e.styles.textInverse,J=e.styles.nodePadding,$=l.x+l.width+J,O=n.width+J,pt=n.width>$+Q.width+J,yt=e.styles.nodeHeight/2-Q.height/2,Rt=pt?$:Math.max(O,$);return Q.position={x:Rt,y:yt},Q.tint=pt?Z:e.styles.textDefault,Q}function Tt(){G&&(B(),D(),k(),j());const Q=It();t.emit("resized",Q)}function It(){const Q=p(),{nodeHeight:Z,nodesPadding:J,eventTargetSize:$,eventBottomMargin:O,artifactPaddingY:pt,artifactIconSize:yt}=e.styles,Bt=A&&it.isTemporal()&&!r.disableArtifacts?yt+pt*2:0,Ve=I&&it.isTemporal()&&!r.disableEvents?$+O:0,Ko=G?Q.height+Bt+Ve+J*2:0,$r=G?Q.width:0;return{height:Z+Ko,width:Math.max($r,t.width)}}return{kind:"flow-run",element:t,bar:n,render:K}}async function iR(){const i=await Lt(),t=new vb,{element:e,render:r}=await ql(),{element:n,render:s}=await eb();t.addChild(n),t.addChild(e);async function o(l){return await Promise.all([s(l),r(l.label)]),a(),t}function a(){const l=i.styles.colorMode==="dark"?i.styles.textDefault:i.styles.textInverse,h=i.styles.nodePadding,c=n.width>h+e.width+h,u=c?h:n.width+h,d=i.styles.nodeHeight/2-e.height/2;e.position={x:u,y:d},e.tint=c?l:i.styles.textDefault}return{kind:"task-run",element:t,render:o,bar:n}}async function rR(i){const t=await Lt(),e=await qt(),r=await _y(),n=await ie();let s=null;const o=new Map,{animate:a}=await Ty(),{element:l,render:h,bar:c}=await E(i);let u=i,d=null,f=!1,p=!1;r.add(l),l.eventMode="static",l.cursor="pointer",l.name=Lb,l.on("click",L=>{L.stopPropagation(),Wi({kind:u.kind,id:u.id})}),u.end_time||v(),tt.on("itemSelected",()=>{const L=br({kind:u.kind,id:u.id});L!==f&&(f=L,h(u))});async function m(L){u=L;const G=I(L);return G===d||(d=G,await Promise.all([h(L),g(L.artifacts)]),L.end_time&&w()),l}async function g(L){if(!L||(x(),n.disableArtifacts||!it.isTemporal()))return;const G=[];for(const F of L)G.push(y(F));await Promise.all(G),b()}async function y(L){if(o.has(L.id))return o.get(L.id).render(L);const G=await $d(L,{enableLocalClickHandling:!0});return o.set(L.id,G),s.addChild(G.element),G.render(L)}function x(){if(it.isTemporal()&&!n.disableArtifacts){s||(s=new Ct),l.addChild(s);return}s&&l.removeChild(s)}function b(){if(!s)return;const{artifactsGap:L,artifactsNodeOverlap:G}=t.styles;let F=0;for(const M of o.values())M.element.position.x=F,F+=M.element.width+L;s.position.y=-s.height+G,s.width<c.width&&(s.position.x=c.width-s.width)}function v(){e.ticker.add(S)}function w(){e.ticker.remove(S)}function S(){m(u)}async function E(L){const{kind:G}=L;switch(G){case"task-run":return await iR();case"flow-run":return await eR(L);default:const F=G;throw new Error(`switch does not have case for value: ${F}`)}}function I(L){var N;const G=L.end_time??new Date,F=(N=L.artifacts)==null?void 0:N.map(W=>W.type==="progress"?`${W.id}-${W.data}`:W.id).join("|");return[L.state_type,G.getTime(),it.horizontal,it.horizontalScaleMultiplier,t.styles.colorMode,n.disableArtifacts||F].join("-")}function A({x:L,y:G}){a(l,{x:L,y:G},!p),p=!0}return{element:l,render:m,bar:c,setPosition:A}}function wb({gap:i=0,minimum:t=0}={}){const e=new Map;function r(c){const u=e.get(c)??[];return Math.max(...u.values(),Y.toValue(t))+Y.toValue(i)}function n(c){let u=0;for(let d=0;d<c;d++)u+=r(d);return u}function s(c){return n(c+1)-Y.toValue(i)}function o({axis:c,nodeId:u,offset:d}){const f=e.get(c)??new Map;f.set(u,d),e.set(c,f)}function a({axis:c,nodeId:u}){let d,f;for(const[p,m]of e.entries())if(m.has(u)){d=p,f=m.get(u);break}d===c||d===void 0||f===void 0||(l({axis:d,nodeId:u}),o({axis:c,nodeId:u,offset:f}))}function l({axis:c,nodeId:u}){var d;(d=e.get(c))==null||d.delete(u)}function h(){e.clear()}return{getOffset:r,getTotalOffset:n,getTotalValue:s,setOffset:o,updateNodeAxis:a,removeOffset:l,clear:h}}function nR(i){throw new Error(`switch does not have case for value: ${i}`)}const Tb="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Z1bmN0aW9uIEtlKG4pe3Rocm93IG5ldyBFcnJvcihgc3dpdGNoIGRvZXMgbm90IGhhdmUgY2FzZSBmb3IgdmFsdWU6ICR7bn1gKX1mdW5jdGlvbiBDbihuLGUpe3JldHVybiBuPT1udWxsfHxlPT1udWxsP05hTjpuPGU/LTE6bj5lPzE6bj49ZT8wOk5hTn1mdW5jdGlvbiBudChuLGUpe3JldHVybiBuPT1udWxsfHxlPT1udWxsP05hTjplPG4/LTE6ZT5uPzE6ZT49bj8wOk5hTn1mdW5jdGlvbiBSbihuKXtsZXQgZSx0LHI7bi5sZW5ndGghPT0yPyhlPUNuLHQ9KHUsbCk9PkNuKG4odSksbCkscj0odSxsKT0+bih1KS1sKTooZT1uPT09Q258fG49PT1udD9uOmV0LHQ9bixyPW4pO2Z1bmN0aW9uIG8odSxsLGY9MCxnPXUubGVuZ3RoKXtpZihmPGcpe2lmKGUobCxsKSE9PTApcmV0dXJuIGc7ZG97Y29uc3QgbT1mK2c+Pj4xO3QodVttXSxsKTwwP2Y9bSsxOmc9bX13aGlsZShmPGcpfXJldHVybiBmfWZ1bmN0aW9uIGkodSxsLGY9MCxnPXUubGVuZ3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<"u"&&window.Blob&&new Blob([sR(Tb)],{type:"text/javascript;charset=utf-8"});function oR(i){let t;try{if(t=Sb&&(window.URL||window.webkitURL).createObjectURL(Sb),!t)throw"";const e=new Worker(t,{name:i==null?void 0:i.name});return e.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(t)}),e}catch{return new Worker("data:text/javascript;base64,"+Tb,{name:i==null?void 0:i.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}function aR(i){const t=new oR;return t.onmessage=i,t}async function Cb(){const i=new Map,t=new Map,e=new Ct,r=new Ct,n=await Lt();let s=null;const o=wb({gap:()=>n.styles.rowGap,minimum:()=>n.styles.nodeHeight}),a=wb({gap:()=>n.styles.columnGap,minimum:()=>qd()});let l=null,h=null;e.name=Hf,tt.on("layoutUpdated",()=>{o.clear(),a.clear()}),tt.on("layoutSettingsUpdated",()=>{h&&e.parent&&c(h),M()}),tt.on("itemSelected",()=>{M()});async function c(B){u(),h=B,l=null,await Promise.all([f(B),m(B)]),y(B)}function u(){s||(s=aR(G))}function d(){s&&(s.terminate(),s=null)}async function f(B){const D=[];for(const k of B.nodes.values())D.push(p(k));await Promise.all(D)}async function p(B){const{render:D}=await v(B);return await D(B)}async function m(B){if((await ie()).disableEdges){e.removeChild(r);return}e.addChildAt(r,0);const k=[];for(const[V,{children:et}]of B.nodes)for(const{id:ft}of et)k.push(g(V,ft));await Promise.all(k)}async function g(B,D){const k=`${B}_${D}`;if(t.has(k))return;const V=await EA();t.has(k)||(t.set(k,V),r.addChild(V.element))}function y(B){if(!s)throw new Error("Layout worker not initialized");const D=new Map;for(const[k,{element:V}]of i)D.set(k,V.width);s.postMessage({type:"layout",data:B,widths:D,horizontalSettings:kd(B.start_time),verticalSettings:oA()})}function x(){if(l)for(const[B,D]of t){const[k,V]=B.split("_"),et=l.positions.get(k),ft=l.positions.get(V),at=i.get(k);if(!et||!ft){console.warn(`Could not find edge in layout: Skipping ${B}`);continue}if(!at){console.warn(`Could not find parent node in nodes: Skipping ${k}`);continue}const Tt=at.bar.width,It=S(et),Q={x:It.x+Tt,y:It.y+n.styles.nodeHeight/2},Z=S(ft),J={x:Z.x-Q.x,y:Z.y-Q.y+n.styles.nodeHeight/2};D.setPosition(Q,J)}}function b(){if(l){for(const[B,D]of i){const k=l.positions.get(B);if(!k){console.warn(`Could not find node in layout: Skipping ${B}`);continue}const V=S(k);D.setPosition(V),o.updateNodeAxis({nodeId:B,axis:k.y}),a.updateNodeAxis({nodeId:B,axis:k.column})}x(),e.emit("rendered"),e.emit("resized",L())}}async function v(B){const D=i.get(B.id);if(D)return D;const k=await rR(B);return k.element.on("resized",V=>w(B.id,V)),i.set(B.id,k),e.addChild(k.element),k}function w(B,D){if(!l)return;const k=i.get(B),V=l.positions.get(B);!k||!V||(o.setOffset({nodeId:B,axis:V.y,offset:D.height}),a.setOffset({nodeId:B,axis:V.column,offset:D.width}),b())}function S(B){const D=o.getTotalOffset(B.y);return{x:E(B),y:D}}function E(B){return it.isDependency()?a.getTotalOffset(B.column):B.x}function I(){return l?o.getTotalValue(l.maxRow):0}function A(){if(!l||!h)return 0;if(it.isDependency())return a.getTotalValue(l.maxColumn);const B=kd(h.start_time),D=gy(B),k=D(h.end_time??new Date),V=D(h.start_time);return k-V}function L(){return{width:A(),height:I()}}function G({data:B}){const{type:D}=B;switch(D){case"layout":F(B);return;default:nR(D)}}function F(B){l=B.layout,b()}async function M(){const B=await ie(),D=fM();if(B.disableEdges||!D||!(h!=null&&h.nodes.has(D.id))){N([]);return}const k=H(D.id);N(k)}function N(B){W(B),K(B)}function W(B){for(const[D,{element:k}]of i){if(B.length===0||B.includes(D)){k.alpha=1;continue}k.alpha=n.styles.nodeUnselectedAlpha}}function K(B){for(const[D,{element:k}]of t){const[V,et]=D.split("_");if(B.length===0||B.includes(V)&&B.includes(et)){k.alpha=1;continue}k.alpha=n.styles.nodeUnselectedAlpha}}function H(B){const D=j(B,"parents"),k=j(B,"children");return[B,...D,...k]}function j(B,D){const k=h==null?void 0:h.nodes.get(B);if(!k)return[];const V=[];for(const{id:et}of k[D])V.push(et),V.push(...j(et,D));return V}return{element:e,stopWorker:d,getSize:L,render:c}}let Ho=null,Jr=null,Bn=null;async function lR(){const i=await ee(),t=await Lt(),{element:e,render:r}=await Cb();i.addChild(e),e.alpha=0;const n=await ag(t.runId,async s=>{const o=Jr?"runDataUpdated":"runDataCreated";Jr=s,tt.emit(o,Jr),await ie(),r(s)});tt.on("configUpdated",()=>{Jr&&r(Jr)}),Bn=e,Ho=n.stop,Bn.once("rendered",()=>cR()),tt.on("layoutUpdated",()=>uR()),n.start()}function hR(){Ho==null||Ho(),Ho=null,Bn=null,Jr=null}async function Zi(){return Jr||await Ie("runDataCreated")}function cR(){Dd(),Se.shared.addOnce(()=>{Bn&&(Bn.alpha=1)})}async function uR(){if(!Bn)return;const i=await Lt();Bn.once("rendered",()=>{setTimeout(()=>{Dd({animate:!0})},i.animationDuration)})}function dR(i){let t=0;for(const[,{children:e}]of i)t+=e.length;return t}function fR({start_time:i,end_time:t,nodes:e},r,n){const s=Math.max(Ob(t??new Date,i),1),o=r.styles.nodeHeight+r.styles.rowGap;return(e.size>0?e.size*o*.5:o*4)*n/(s*20)}async function pR(){const i=await Zi(),t=await Lt(),e=await qt(),r=e.view.width/e.view.height,n=fR(i,t,r);nh(n,!0),i.nodes.size>t.disableAnimationsThreshold&&(it.disableAnimations=!0),dR(i.nodes)>t.disableEdgesThreshold&&(it.disableEdges=!0)}function mR(){it.horizontal="temporal",it.vertical="nearest-parent",it.horizontalScaleMultiplierDefault=0,it.horizontalScaleMultiplier=0,it.disableAnimations=!1,it.disableGuides=!1,it.disableEdges=!1,it.disableArtifacts=!1,it.disableEvents=!1}const it=Y.reactive({horizontal:"temporal",vertical:"nearest-parent",horizontalScaleMultiplierDefault:0,horizontalScaleMultiplier:0,disableAnimations:!1,disableGuides:!1,disableEdges:!1,disableArtifacts:!1,disableEvents:!1,isTemporal(){return this.horizontal==="temporal"},isDependency(){return this.horizontal==="dependency"},isWaterfall(){return this.vertical==="waterfall"},isNearestParent(){return this.vertical==="nearest-parent"},isLeftAligned(){return this.horizontal==="left-aligned"}});async function ie(){return tf()?it:await Ie("layoutSettingsCreated")}function qd(){return it.isDependency()?200:20*it.horizontalScaleMultiplier}function gR(){return[0,qd()]}function yR(i){if(it.isDependency())return[0,1];const t=i,e=Db(t,1);return[t,e]}function nh(i,t=!1){if(it.horizontalScaleMultiplier===i)return;const e=Gs();it.horizontalScaleMultiplier=i,t&&(it.horizontalScaleMultiplierDefault=i),e()}function bR(){nh(it.horizontalScaleMultiplierDefault)}function xR(i){if(it.horizontal===i)return;const t=Gs();it.horizontal=i,it.disableGuides=it.isDependency()||it.isLeftAligned(),t()}function _R(i){if(it.vertical===i)return;const t=Gs();it.vertical=i,t()}function vR(i){if(it.disableEdges===i)return;const t=Gs();it.disableEdges=i,t()}function wR(i){if(it.disableArtifacts===i)return;const t=Gs();it.disableArtifacts=i,t()}function TR(i){if(it.disableEvents===i)return;const t=Gs();it.disableEvents=i,t()}function Gs(){const i=tf()?"layoutSettingsUpdated":"layoutSettingsCreated",{horizontal:t,vertical:e}=it;return()=>{tf()&&tt.emit(i,it),(t!==it.horizontal||e!==it.vertical)&&tt.emit("layoutUpdated")}}function tf(){return it.horizontalScaleMultiplier!==0}function Eb(i){if(!(i instanceof HTMLElement))return!1;const t=i.tagName.toLowerCase();return["input","textarea"].includes(t)}const SR={class:"flex items-center gap-2"},CR=Y.defineComponent({__name:"RunGraphSettings",setup(i){const t=[Ji.positions.topRight,Ji.positions.bottomRight,Ji.positions.topLeft,Ji.positions.bottomLeft],e=[{label:"Temporal dependency",value:"temporal_nearest-parent"},{label:"Temporal sequence",value:"temporal_waterfall"},{label:"Dependency grid",value:"dependency_nearest-parent"},{label:"Sequential grid",value:"dependency_waterfall"},{label:"Comparative duration",value:"left-aligned_duration-sorted"}],r=Y.computed({get(){return`${it.horizontal}_${it.vertical}`},set(u){const[d,f]=u.split("_");xR(d),_R(f)}}),n=Y.computed({get(){return it.disableEdges},set(u){vR(u)}}),s=Y.computed({get(){return it.disableArtifacts},set(u){wR(u)}}),o=Y.computed({get(){return it.disableEvents},set(u){TR(u)}});function a(){const d=it.horizontalScaleMultiplier*1.25;nh(d)}function l(){const u=Math.abs(-.75),d=it.horizontalScaleMultiplier*u;nh(d)}wr.useKeyDown(["-","="],h);function h(u){if(!(Eb(u.target)||u.metaKey||u.ctrlKey))switch(u.key){case"-":l();break;case"=":a();break}}function c(){bR()}return(u,d)=>{const f=Y.resolveComponent("p-radio-group"),p=Y.resolveComponent("p-label"),m=Y.resolveComponent("p-divider"),g=Y.resolveComponent("p-checkbox"),y=Y.resolveComponent("p-overflow-menu");return Y.openBlock(),Y.createBlock(Y.unref(Ji.PPopOver),{class:"run-graph-settings","auto-close":"",placement:t},{target:Y.withCtx(({toggle:x})=>[Y.createVNode(Y.unref(Ji.PButton),{"aria-label":"Run Graph Options",icon:"CogIcon",flat:"",onClick:x},null,8,["onClick"])]),default:Y.withCtx(()=>[Y.createVNode(y,{class:"run-graph-settings__menu"},{default:Y.withCtx(()=>[Y.createVNode(p,{label:"Layout"},{default:Y.withCtx(()=>[Y.createVNode(f,{modelValue:r.value,"onUpdate:modelValue":d[0]||(d[0]=x=>r.value=x),options:e},{label:Y.withCtx(({option:x})=>[Y.createTextVNode(Y.toDisplayString(x.label),1)]),_:1},8,["modelValue"])]),_:1}),Y.unref(it).isTemporal()||Y.unref(it).isLeftAligned()?(Y.openBlock(),Y.createElementBlock(Y.Fragment,{key:0},[Y.createVNode(m),Y.createVNode(p,{label:"Scaling"},{default:Y.withCtx(()=>[Y.createElementVNode("div",SR,[Y.createVNode(Y.unref(Ji.PButton),{title:"Decrease scale (-)",small:"",icon:"MinusIcon",onClick:l}),Y.createVNode(Y.unref(Ji.PButton),{title:"Increase scale (+)",small:"",icon:"PlusIcon",onClick:a}),Y.createVNode(Y.unref(Ji.PButton),{small:"",onClick:c},{default:Y.withCtx(()=>[Y.createTextVNode(" Reset ")]),_:1})])]),_:1})],64)):Y.createCommentVNode("",!0),Y.createVNode(m),Y.createVNode(g,{modelValue:n.value,"onUpdate:modelValue":d[1]||(d[1]=x=>n.value=x),label:"Hide dependency arrows"},null,8,["modelValue"]),Y.createVNode(g,{modelValue:s.value,"onUpdate:modelValue":d[2]||(d[2]=x=>s.value=x),label:"Hide artifacts"},null,8,["modelValue"]),Y.createVNode(g,{modelValue:o.value,"onUpdate:modelValue":d[3]||(d[3]=x=>o.value=x),label:"Hide events"},null,8,["modelValue"])]),_:1})]),_:1})}}}),ER={class:"run-graph__actions"},IR=Y.defineComponent({__name:"RunGraph",props:{config:{},viewport:{},fullscreen:{type:[Boolean,null],default:null},selected:{default:null}},emits:["update:viewport","update:fullscreen","update:selected"],setup(i,{emit:t}){const e=i,r=t,n=Y.ref(),s=Y.ref(!1),o=Y.computed({get(){return e.fullscreen??s.value},set(u){s.value=u,r("update:fullscreen",u)}});Y.watch(()=>e.selected,u=>Wi(u)),tt.on("itemSelected",u=>r("update:selected",u)),Y.watch(()=>e.viewport,u=>mA(u));const a=Y.computed(()=>({root:{"run-graph--fullscreen":o.value}}));tt.on("viewportDateRangeUpdated",u=>r("update:viewport",u));function l(){Dd({animate:!0})}function h(){o.value=!o.value}Y.onMounted(()=>{if(!n.value)throw new Error("Stage does not exist");qM({stage:n.value,props:e})}),Y.onBeforeUnmount(()=>{tR()}),wr.useKeyDown(["c","f","Escape"],c);function c(u){if(!(Eb(u.target)||u.metaKey||u.ctrlKey))switch(u.key){case"c":l();break;case"f":h();break;case"Escape":o.value&&h();break}}return(u,d)=>{const f=Y.resolveComponent("p-button");return Y.openBlock(),Y.createElementBlock("div",{class:Y.normalizeClass(["run-graph",a.value.root])},[Y.createElementVNode("div",{ref_key:"stage",ref:n,class:"run-graph__stage"},null,512),Y.createElementVNode("div",ER,[Y.createVNode(f,{title:"Recenter graph (c)",icon:"Target",flat:"",onClick:l}),Y.createVNode(f,{title:"Toggle fullscreen (f)",icon:"ArrowsPointingOutIcon",flat:"",onClick:h}),Y.createVNode(CR)])],2)}}});kt.RunGraph=IR,kt.artifactTypeIconMap=Ky,kt.artifactTypes=lM,kt.isArtifactSelection=zy,kt.isArtifactsSelection=Yy,kt.isEventSelection=Jy,kt.isEventsSelection=$y,kt.isNodeSelection=th,kt.isRunGraphNodeType=hM,kt.isStateSelection=jy,kt.runGraphNodeKinds=Jd,kt.stateType=cM,Object.defineProperty(kt,Symbol.toStringTag,{value:"Module"})});
1177
1177
  //# sourceMappingURL=graphs.umd.js.map